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

保存本地和上传异步执行

parent 495e2482
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
// 获取规格Id // 获取规格Id
this.standardId = app.globalData.photo.currentItem._id this.standardId = app.globalData.photo.currentItem._id
} }
getApp().trackPage('照片预览页') getApp().trackPage('照片预览页')
const globalTempPath = getApp().globalData.photo.tempPath const globalTempPath = getApp().globalData.photo.tempPath
if(globalTempPath && globalTempPath.mixWater){ if(globalTempPath && globalTempPath.mixWater){
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
if(e.standardId) { if(e.standardId) {
this.standardId = e.standardId this.standardId = e.standardId
} }
this.token = getApp().globalData.token this.token = getApp().globalData.token
}, },
methods: { methods: {
...@@ -132,11 +132,12 @@ ...@@ -132,11 +132,12 @@
uni.showLoading({ uni.showLoading({
title:'图片保存中……' title:'图片保存中……'
}) })
self.saveTempToLocal()
self.confirmUpload(true) self.confirmUpload(true)
}, },
submitFile() { submitFile() {
let self = this let self = this
if(self.keys.length) { if(self.keys.length) {
for (let s of self.keys) { for (let s of self.keys) {
self.$u.cloudApi.saveImage({ self.$u.cloudApi.saveImage({
...@@ -147,7 +148,6 @@ ...@@ -147,7 +148,6 @@
console.log(res, "云服务保存图片"); console.log(res, "云服务保存图片");
if(res.result) { if(res.result) {
// TODO 参数是否要来回传递 // TODO 参数是否要来回传递
self.saveTempToLocal()
const photo = getApp().globalData.photo const photo = getApp().globalData.photo
photo.currentItemLength++ photo.currentItemLength++
// photo.currentItem. // photo.currentItem.
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
.pic { .pic {
flex:1; flex:1;
width: 100%; width: 100%;
/* height:auto */ /* height:auto */
/* height: 760rpx; */ /* 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