摘要: 文件上传使用axios 文件上传2使用fetch 阅读全文
posted @ 2019-04-11 11:59 小白是鱼骨头呀! 阅读(123) 评论(0) 推荐(0) 编辑
摘要: import axios from 'axios' import JSZip from 'jszip' //打包压缩必备,参考链接https://stuk.github.io/jszip/ import FileSaver from 'file-saver' //文件保存至本地,参考链接https: 阅读全文
posted @ 2019-04-11 11:41 小白是鱼骨头呀! 阅读(1025) 评论(0) 推荐(0) 编辑
摘要: 1 // 上传文件 2 // wx.cloud.uploadFile({ 3 // cloudPath:'xuanyu.jpg', 4 // filePath:'/images/xianyu.jpg', 5 // success: res=>{ 6 // console.log(res) 7 // ... 阅读全文
posted @ 2019-02-28 17:52 小白是鱼骨头呀! 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 1 // 云开发 2 // 初始化 3 wx.cloud.init() 4 const db = wx.cloud.database() 5 6 // 插入数据 7 // db.collection('user').add({ 8 // data: { 9 // descriptio... 阅读全文
posted @ 2019-02-27 15:19 小白是鱼骨头呀! 阅读(430) 评论(0) 推荐(0) 编辑
摘要: wxml js wxss 阅读全文
posted @ 2019-01-17 18:34 小白是鱼骨头呀! 阅读(507) 评论(0) 推荐(0) 编辑
摘要: substr(start,length) 阅读全文
posted @ 2019-01-14 15:59 小白是鱼骨头呀! 阅读(1926) 评论(0) 推荐(0) 编辑
摘要: 最重要的是要注意换算比例以及自定义组件this参数,draw(true,this), 生存图片的时候也要带上this参数 wx.canvasToTempFilePath(Object object, Object this) 阅读全文
posted @ 2019-01-14 15:26 小白是鱼骨头呀! 阅读(754) 评论(0) 推荐(0) 编辑
摘要: 基于mpvue实现的1080*1900小程序海报 html 1 <canvas class="canvas" :style="'width:'+windowWidth+'px;height:'+windowWidth/(1080/1900)+'px;'" canvas-id="firstCanvas 阅读全文
posted @ 2018-12-28 15:21 小白是鱼骨头呀! 阅读(535) 评论(0) 推荐(0) 编辑
摘要: Math.trunc() 用于去除一个数的小数部分,只返回整数部分 Math.sign() Math.sign方法用来判断一个数到底是正数、负数、还是零。对于非数值,会先将其转换为数值。 参数为正数,返回+1; 参数为负数,返回-1; 参数为 0,返回0; 参数为-0,返回-0; 其他值,返回NaN 阅读全文
posted @ 2018-10-10 15:06 小白是鱼骨头呀! 阅读(238) 评论(0) 推荐(0) 编辑
摘要: jsonp:只支持GET,不支持POST请求,不安全XSS postMessage:配合使用iframe,需要兼容IE6、7、8、9 document.domain:仅限于同一域名下的子域 cors:需要后台配合进行相关的设置 websocket:需要后台配合修改协议,不兼容,需要使用scoket. 阅读全文
posted @ 2018-10-09 14:29 小白是鱼骨头呀! 阅读(122) 评论(0) 推荐(0) 编辑