【update】 发票信息页面功能的增加、报名页面增加编辑、删除功能

This commit is contained in:
fengchenchen
2023-07-23 18:14:54 +08:00
parent 23b68045f9
commit 803d80d363
24 changed files with 1088 additions and 230 deletions
+30 -12
View File
@@ -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)
}
},