摘要: type WxImage struct { Type string `json:"type"` MediaId string `json:"media_id"` CreatedAt int `json:"created_at"` } func UpImage(token, filename string) string { //打开文件 ... 阅读全文
posted @ 2019-08-05 17:54 yewook 阅读(729) 评论(0) 推荐(0) 编辑
摘要: 安装:npm i mpvue-wxparse js:import wxparse from "mpvue-wxparse"; css:@import url('~mpvue-wxparse/src/wxParse.css'); htm:<wxparse :content="detail" @prev 阅读全文
posted @ 2019-04-18 11:06 yewook 阅读(1136) 评论(0) 推荐(0) 编辑
摘要: 关于枚举类型 阅读全文
posted @ 2019-03-28 15:40 yewook 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 云函数中有以下未安装的依赖,如果未安装即全量上传在新建的云函数,右击终端打开->cmd,安装依赖npm install --production依赖安装成功之后,文件里面会出现package-lock.json文件。 阅读全文
posted @ 2019-03-13 16:18 yewook 阅读(5771) 评论(0) 推荐(0) 编辑
摘要: 见图:JSON.stringify( new Date(Date.parse('xxxx-xx-xx'))) 若是传的日期,在10号前,要进行转换。 阅读全文
posted @ 2018-12-06 20:25 yewook 阅读(641) 评论(0) 推荐(0) 编辑
摘要: 微信小程序大转盘 代码源码:https://github.com/yewook/Lottery-turntable 阅读全文
posted @ 2018-09-28 10:16 yewook 阅读(2678) 评论(0) 推荐(0) 编辑
摘要: onLoad: function (options) { var that = this; var oDate = new Date(); var dayArr = []; for (var i = 0; i < 7; i++) {/*后7天*/ dayArr.push(new Date(oDate.getFullYear(), oD... 阅读全文
posted @ 2018-09-10 16:18 yewook 阅读(185) 评论(0) 推荐(0) 编辑
摘要: (function () { /**code*/ })() 上面写法是函数声明..下面写法是转变成函数表达式 (function () { /*code*/ } ()) !function () { /*code*/ }() ~function () { /*code*/ }() -function 阅读全文
posted @ 2018-09-09 10:35 yewook 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 设备宽度为375*667 1rem=100px 阅读全文
posted @ 2018-09-07 16:11 yewook 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 闭包最主要概念:有权访问另一个函数作用域内变量的函数 当前函数执行会形成一个私有上下文,当前私有上下文内成员被外部函数成员占有,此私有上下文不会被释放,则形成闭包 function add(){ var result; result = function(x,y){ return y+x } ret 阅读全文
posted @ 2018-08-31 09:43 yewook 阅读(117) 评论(0) 推荐(0) 编辑