体验官打卡
This commit is contained in:
@@ -46,15 +46,17 @@ Page({
|
||||
let count = 9 - this.data.albumArr.length
|
||||
wx.chooseImage({
|
||||
count : count,
|
||||
|
||||
success : res=>{
|
||||
// 上传图片
|
||||
if (res.tempFilePaths){
|
||||
let pathArr = res.tempFilePaths
|
||||
wx.showLoading({
|
||||
title: '上传中',
|
||||
})
|
||||
for (let i = 0; i < pathArr.length; i++){
|
||||
wx.$api.file.uploadImg(pathArr[i], {}).then(res=>{
|
||||
wx.showLoading({
|
||||
title: '上传中',
|
||||
})
|
||||
|
||||
let albumArr = this.data.albumArr
|
||||
albumArr.push({
|
||||
path: res.path,
|
||||
@@ -63,6 +65,8 @@ Page({
|
||||
this.setData({
|
||||
albumArr
|
||||
})
|
||||
|
||||
wx.hideLoading()
|
||||
})
|
||||
|
||||
if (i == pathArr.length - 1) {
|
||||
|
||||
Reference in New Issue
Block a user