Commit 0f115d95 authored by 李超鹏's avatar 李超鹏

保存本地和上传异步执行

parent 495e2482
......@@ -38,7 +38,7 @@
// 获取规格Id
this.standardId = app.globalData.photo.currentItem._id
}
getApp().trackPage('照片预览页')
const globalTempPath = getApp().globalData.photo.tempPath
if(globalTempPath && globalTempPath.mixWater){
......@@ -47,7 +47,7 @@
if(e.standardId) {
this.standardId = e.standardId
}
this.token = getApp().globalData.token
},
methods: {
......@@ -132,11 +132,12 @@
uni.showLoading({
title:'图片保存中……'
})
self.saveTempToLocal()
self.confirmUpload(true)
},
submitFile() {
let self = this
if(self.keys.length) {
for (let s of self.keys) {
self.$u.cloudApi.saveImage({
......@@ -147,7 +148,6 @@
console.log(res, "云服务保存图片");
if(res.result) {
// TODO 参数是否要来回传递
self.saveTempToLocal()
const photo = getApp().globalData.photo
photo.currentItemLength++
// photo.currentItem.
......@@ -208,7 +208,7 @@
.pic {
flex:1;
width: 100%;
/* height:auto */
/* height: 760rpx; */
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment