
小程序
挣钱养媳妇儿
多年的项目开发经验以及授课经验
展开
-
小程序云开发实现图片上传功能
1.wxml触发选择图片事件<button type="primary" bindtap="_choseImage">选择头像</button>2.选择图片 // 选取图片 _choseImage() { let _this = this; wx.chooseImage({ count: 1, // 最多9张 sizeType: ['original', 'compressed'],// 原图 缩略图 sourceTy原创 2020-11-17 20:01:55 · 788 阅读 · 1 评论 -
小程序云开发实现多文件上传
1.调用文件上传功能模块async _doSubmit(e) { let files= ["XXX.jpg","xxxx.jpg"]; //文件 let filesID = await this._uploaderFiles(files);},2.多文件上传功能async _uploaderFiles(files) { let filesID = []; //处理之后的所有的存储地址 // 多文件上传处理 files.forEach((item, index)原创 2020-11-17 19:54:37 · 519 阅读 · 0 评论 -
微信小程序实现遮罩层删除效果
效果图wxml页面结构<view class="hot-recipe-list" wx:else> <block wx:for="{{ recipes }}" wx:key="id"> <view class="hot-recipe-list-item" bindlongpress="_delStyle" data-index="{{ index }}" > <!-- 内容区域 -->原创 2020-11-12 19:27:08 · 480 阅读 · 0 评论 -
微信小程序网络请求封装promise
网络请求封装promise(1)封装配置文件global.js// 定义主域名const url = "http://localhost:3000";export default url;(2)封装网络请求promisehttp.js文件// 封装网络请求,变成promise形式import url from "./global"const http = (options={}) => { /* options = { url:"/login"原创 2020-11-12 14:30:27 · 795 阅读 · 2 评论 -
uni-app编译运行微信小程序,static没有进行编译问题
uni-app运行编译时,在H5页面,static内容的图片路径没有错,图片不进行加载,同时在微信小程序,static不进行编译等问题。可能的解决办法:当前工程的文件路径出现了类似于()括号等一些特殊字符,直接更换修改工程路径...原创 2020-10-29 21:03:31 · 2213 阅读 · 1 评论