体验官打卡

This commit is contained in:
2023-07-17 17:33:54 +08:00
parent 3ecd1fefa7
commit 38391e46a1
18 changed files with 389 additions and 56 deletions

View File

@@ -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) {