自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

转载 js 金额转大写中文方法

js 金额转大写中文方法。

2024-03-08 13:42:14 53 1

原创 js 实现上下无缝循环滚动

js 实现上下滚动

2022-06-27 10:33:35 4812 2

原创 reduce 数组对象去重

使用 reduce 方法去重let rlist=[{id:1},{id:2}]let newrlist=rlist.reduce(function(a,b){ rlist[b.id]?"":rlist[b.id]=true&&a.push(b) return a },[]) //newrlist 是去重之后的数组

2022-03-26 10:33:11 330

原创 node egg mongodb mongoose 创建地址位置坐标查询

mode const mongoose = app.mongoose; const Schema = mongoose.Schema; const Decimal128 = Schema.Types.Decimal128 const pointSchema = new mongoose.Schema({ type: { type: String, enum: ['Point'], // required: true }, coord

2021-12-06 15:14:03 157

原创 node egg APP支付宝支付

1.首先安装 npm包npm install alipay-sdk2.使用const AlipaySdk = require('alipay-sdk').defaultconst aliUtil = require('alipay-sdk/lib/util')let Alipay=new AlipaySdk( { appId:"", privateKey:"",//私钥 alipayPublicKey:"",//支付宝公钥

2021-11-05 15:58:53 628 1

原创 node egg企业付款到微信零钱

在工具文件中 helper.js 创建下列方法(我比较常用的 全部分享出来)const Xml2js = require('xml2js')const Crypto = require('crypto')const EARTH_RADIUS = 6378.137module.exports = { // 计算两坐标点之间的距离 1. async space(lat1, lng1, lat2, lng2) { var radLat1 = lat1 * Math.PI.

2021-10-25 16:48:22 289

原创 windows环境下 node 图片合成 使用gm

首先要安装 GraphicsMagick或者ImageMagick我是安装的 ImageMagick 使用的ImageMagick 安装下好之后安装 需要勾选这一条安装完毕后进入项目中 安装GMnpm install gm项目中 使用var Gm = require('gm').subClass({ imageMagick: true });function(){ let bgImgArr = [ { src: 'share_bg1', r

2021-10-23 11:10:12 509

原创 windos环境 node使用canvas

windos环境 node使用canvas#1.安装canvas前需要安装python环境npm install --global --production windows-build-tools@4.0.0或者npm install --global --production windows-build-tools或单独安装Python 环境npm install --python=python2.7npm config set python python2.7如果安装过程中出现*P

2021-10-23 10:31:44 653

原创 node egg-ueditor

标题 egg-ueditorvue前端配合使用 https://blog.csdn.net/qq_43784821/article/details/120224147基于egg的UEditor百度编辑器后端实现,支持图片/文件上传、列表及图片远程抓取源码:https://github.com/inmyjs/egg-ueditor安装npm install egg-ueditor --save使用方法const ueditor = require('egg-ueditor')app.all(

2021-09-11 09:31:48 136

原创 小程序右滑删除

<view class="list" wx:for="{{list}}" wx:key> <view class="item"> <view class="wrap" style="transform:translateX({{item.x/2}}px);" data-index="{{index}}" bindtouchstart='touch...

2019-12-24 12:06:50 838 2

转载 转 小程序购物车

<!-- 最外层视图pages --><view class="pages"> <view wx:if="{{hasList}}"> <!-- 编辑 --> <view class='edit'> <label class='edit_btn' bindtap='btn_edit'>{{edit_name...

2019-12-21 11:30:03 72

原创 小程序服务通知

触发订阅 只有支付成功回调 和用户主动点击事件模板消息id是在微信公众号平台 订阅消息选择模板 把ID复制进数组里wx.requestSubscribeMessage({ tmplIds: ['模板消息id1','模板消息id2'], success (res) { console.log(res) if(res.模板消息id1=="accept"){ //点击确定后...

2019-12-05 16:03:51 1045

原创 三级联动小demo

您选择的是: <input type="text" value="" id="addr-show"> <!-- 省份选择 --> <select id="prov" name="prov" onchange="showCity(this)"> <option>=请选择省份=</option> </select&g...

2019-11-28 16:00:26 144

原创 ios键盘留白

ios留白原生jsconst windowHeight = window.innerHeightinput.addEventListener('blur', function () { let windowFocusHeight = window.innerHeight if (windowHeight == windowFocusHeight) { return...

2019-11-13 14:59:30 151 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除