|
@@ -78,13 +78,16 @@
|
|
|
for (let i = 0; i < lists.length; i++) {
|
|
|
const result = await this.uploadFilePromise(lists[i])
|
|
|
let item = this.fileList[fileListLen]
|
|
|
+
|
|
|
this.fileList.splice(fileListLen, 1, Object.assign(item, {
|
|
|
status: 'success',
|
|
|
message: '',
|
|
|
url: result
|
|
|
}))
|
|
|
+ console.log("result", result);
|
|
|
fileListLen++
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
uploadFilePromise(url) {
|
|
|
return new Promise((resolve, reject) => {
|
|
@@ -98,7 +101,7 @@
|
|
|
formData: url,
|
|
|
success: (res) => {
|
|
|
setTimeout(() => {
|
|
|
- resolve(res.data.data)
|
|
|
+ resolve(res.data)
|
|
|
}, 1000)
|
|
|
}
|
|
|
});
|
|
@@ -110,23 +113,23 @@
|
|
|
uni.showLoading()
|
|
|
let files = []
|
|
|
if (this.fileList.length > 0) {
|
|
|
- this.fileLists.forEach(item => {
|
|
|
+ this.fileList.forEach(item => {
|
|
|
files.push(item.url)
|
|
|
})
|
|
|
this.inputForm.signPic = files.join(",");
|
|
|
+
|
|
|
}
|
|
|
userService.saveInfo(this.inputForm).then((data) => {
|
|
|
uni.showToast({
|
|
|
title: data,
|
|
|
- icon: "success"
|
|
|
+ icon: "success",
|
|
|
+ complete: function(res) {
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/index/index'
|
|
|
+ })
|
|
|
+ }
|
|
|
});
|
|
|
- uni.clearStorage();
|
|
|
- uni.reLaunch({
|
|
|
- url: '/pages/login/login'
|
|
|
- })
|
|
|
- // }).catch((e) => {
|
|
|
- // console.log(e)
|
|
|
- // })
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
}
|