【update】 发票信息页面功能的增加、报名页面增加编辑、删除功能
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
// components/imageUpload/imageUpload.js
|
||||
|
||||
import {baseUrl, URL_CONFIG} from '../../assets/js/project.config'
|
||||
import {
|
||||
baseUrl,
|
||||
URL_CONFIG
|
||||
} from '../../assets/js/project.config'
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
@@ -17,11 +20,27 @@ Component({
|
||||
value: 1
|
||||
},
|
||||
// 图片的回显
|
||||
initImgsList:{
|
||||
type:String
|
||||
initImgsList: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
observers: {
|
||||
'initImgsList': function (initImgsList) {
|
||||
let initImgArr
|
||||
if (!!this.data.initImgsList) {
|
||||
initImgArr = this.data.initImgsList.split(',')
|
||||
}
|
||||
const arr = []
|
||||
if (initImgArr && initImgArr.length > 0) {
|
||||
for (let index = 0; index < initImgArr.length; index++) {
|
||||
arr.push(baseUrl + URL_CONFIG + 'sys/common/download/' + initImgArr[index])
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
tempFilePaths: arr
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
@@ -30,20 +49,19 @@ Component({
|
||||
tempFilePaths: []
|
||||
},
|
||||
lifetimes: {
|
||||
attached: function() {
|
||||
console.log(' this.data.initImgsList', this.data.initImgsList);
|
||||
attached: function () {
|
||||
let initImgArr
|
||||
if(!!this.data.initImgsList){
|
||||
if (!!this.data.initImgsList) {
|
||||
initImgArr = this.data.initImgsList.split(',')
|
||||
}
|
||||
const arr = []
|
||||
if(initImgArr && initImgArr.length > 0){
|
||||
if (initImgArr && initImgArr.length > 0) {
|
||||
for (let index = 0; index < initImgArr.length; index++) {
|
||||
arr.push( baseUrl + URL_CONFIG + 'sys/common/download/' + initImgArr[index])
|
||||
}
|
||||
arr.push(baseUrl + URL_CONFIG + 'sys/common/download/' + initImgArr[index])
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
tempFilePaths:arr
|
||||
tempFilePaths: arr
|
||||
})
|
||||
console.log(this.data.tempFilePaths);
|
||||
},
|
||||
@@ -129,7 +147,7 @@ Component({
|
||||
//如果是最后一张,则隐藏等待中
|
||||
if (count == tempFilePaths.length) {
|
||||
wx.hideToast();
|
||||
that.triggerEvent("getIds",imgids)
|
||||
that.triggerEvent("getIds", imgids)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user