that.modelMessage()
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: function (res) {
console.log('res', res)
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
uploadImage(res.tempFilePaths[0], 'produce_badge',
function (result) {
console.log('result', result)
wx.hideLoading();
Http.request({
url: '/keep/Badge/lightUpProduct',
method: 'POST',
data: {
uid: app.globalData.uid,
pic_url: result[1],
os_type: app.globalData.os_type,
token: app.globalData.access_token,
d_id: that.data.datas.id
},
loading: false
}).then(result => {
const { data: rest } = result
console.log('res', rest)
if (rest.status == 1) {
that.setData({
isShows: false,
})
wx.showToast({
title: '上传已完成,静待审核',
icon: "none",
})
that.getMyBadgeList()
}
})
}
)
}
})
完整实现照片的上传 ,但是没有添加微信自带的照片审核功能 我这个是后台人工审核
最新推荐文章于 2024-07-06 10:12:58 发布