Commit f82046bc authored by Facius's avatar Facius

Merge branch 'dev-photo-v2' of https://git.banshouhui.com/heyinchen/take_order into dev-photo-v2

parents 1ed284c2 c9948b00
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<script> <script>
import qiniup from '@/components/upload/qiniup'; import qiniup from '@/components/upload/qiniup';
const app = getApp()
export default { export default {
mixins: [qiniup], mixins: [qiniup],
data() { data() {
...@@ -25,19 +26,28 @@ ...@@ -25,19 +26,28 @@
fileMaps: [], fileMaps: [],
keys: [], keys: [],
token: '', token: '',
product: '',
} }
}, },
onLoad(e) { onLoad(e) {
// 获取照片选项对象
const product = app.globalData.photo.product
this.product = `?brandId=${product.brandId}&brand=${product.brandName}&classifyId=${product.classifyId}&systemId=${product.systemId}`
if(app.globalData.photo.currentItem) {
// 获取规格Id
this.standardId = app.globalData.photo.currentItem._id
}
getApp().trackPage('照片预览页') getApp().trackPage('照片预览页')
console.log(e, 'e') console.log(e, 'e')
if(e.standardId) {
this.standardId = e.standardId
}
if (e.img) { if (e.img) {
this.images = [e.img] this.images = [e.img]
this.downloadImages() this.downloadImages()
} }
// if() {
// }
console.log(this.images, 'this.images') console.log(this.images, 'this.images')
this.token = getApp().globalData.token this.token = getApp().globalData.token
...@@ -71,6 +81,7 @@ ...@@ -71,6 +81,7 @@
}, },
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({
...@@ -82,7 +93,7 @@ ...@@ -82,7 +93,7 @@
if(res.result) { if(res.result) {
// TODO 参数是否要来回传递 // TODO 参数是否要来回传递
uni.navigateTo({ uni.navigateTo({
url: '/pages/photo/list' url: '/pages/photo/list' + self.product
}) })
} else { } else {
uni.showToast({ uni.showToast({
......
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