Commit c9948b00 authored by Morson's avatar Morson

初始化列表项参数

parent 2b1099d2
......@@ -12,6 +12,7 @@
<script>
import qiniup from '@/components/upload/qiniup';
const app = getApp()
export default {
mixins: [qiniup],
data() {
......@@ -25,19 +26,28 @@
fileMaps: [],
keys: [],
token: '',
product: '',
}
},
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('照片预览页')
console.log(e, 'e')
if(e.standardId) {
this.standardId = e.standardId
}
if (e.img) {
this.images = [e.img]
this.downloadImages()
}
// if() {
// }
console.log(this.images, 'this.images')
this.token = getApp().globalData.token
......@@ -71,6 +81,7 @@
},
submitFile() {
let self = this
if(self.keys.length) {
for (let s of self.keys) {
self.$u.cloudApi.saveImage({
......@@ -82,7 +93,7 @@
if(res.result) {
// TODO 参数是否要来回传递
uni.navigateTo({
url: '/pages/photo/list'
url: '/pages/photo/list' + self.product
})
} else {
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