diff --git a/packageB/editAct.vue b/packageB/editAct.vue index 0c9f2e3..7951e8d 100644 --- a/packageB/editAct.vue +++ b/packageB/editAct.vue @@ -772,115 +772,115 @@ }).catch(error => {}); }, //草稿箱详情 - getDraftDetail() { - console.log('getDraftDetail', this.draftId); - uni.$u.http.get('/api/school.newactivity.activity_drafts/detail', { - params: { - id: this.draftId, - } - }).then(res => { - if (res.code == 1) { - this.form = res.data.detail - this.form.cate_idsName = this.form.classes_cate.join(','); - // this.form.cate_ids = res.data.detail.cate_ids; - console.log('cate_ids', this.form.cate_ids); - const idBqSet = new Set(this.form.cate_ids); - const bqArray = this.bqList.reduce((acc, obj) => { - if (this.form.cate_ids.includes(obj.id)) { - acc.push(obj); - } - return acc; - }, []); - console.log('bqArray', bqArray); - console.log('cate_idsName', this.form.cate_idsName); - this.list = bqArray - console.log('getDraftDetail——list', this.list); + // getDraftDetail() { + // console.log('getDraftDetail', this.draftId); + // uni.$u.http.get('/api/school.newactivity.activity_drafts/detail', { + // params: { + // id: this.draftId, + // } + // }).then(res => { + // if (res.code == 1) { + // this.form = res.data.detail + // this.form.cate_idsName = this.form.classes_cate.join(','); + // // this.form.cate_ids = res.data.detail.cate_ids; + // console.log('cate_ids', this.form.cate_ids); + // const idBqSet = new Set(this.form.cate_ids); + // const bqArray = this.bqList.reduce((acc, obj) => { + // if (this.form.cate_ids.includes(obj.id)) { + // acc.push(obj); + // } + // return acc; + // }, []); + // console.log('bqArray', bqArray); + // console.log('cate_idsName', this.form.cate_idsName); + // this.list = bqArray + // console.log('getDraftDetail——list', this.list); - console.log('this.priceName',this.priceName,this.price); - this.form.content = this.form.content.replace(/<[^>]+>/g, ''); // 输出: "运动" - this.value_slide = res.data.detail.join_info.percent; + // console.log('this.priceName',this.priceName,this.price); + // this.form.content = this.form.content.replace(/<[^>]+>/g, ''); // 输出: "运动" + // this.value_slide = res.data.detail.join_info.percent; - this.form.refund_idn = this.form.refund_info.title; - // 转换为 fileList 格式 - this.fileList1 = this.form.images.map(url => ({ - url: url, - status: 'success', - message: '' - })); - this.list1 = this.form.images - console.log('fileList1', this.fileList1); + // this.form.refund_idn = this.form.refund_info.title; + // // 转换为 fileList 格式 + // this.fileList1 = this.form.images.map(url => ({ + // url: url, + // status: 'success', + // message: '' + // })); + // this.list1 = this.form.images + // console.log('fileList1', this.fileList1); - if(this.form.image == '' || this.form.image == null){ - this.qunQrcode = '' - this.QunQrcode1 = this.qunQrcode - console.log('草稿详情',this.QunQrcode1,this.QunQrcode); - }else { - this.qunQrcode = ({ - url: this.form.image || res.data.detail, - status: 'success', - message: '' - }) - this.QunQrcode1 = this.qunQrcode - console.log('草稿详情2',this.QunQrcode1,this.QunQrcode); - } - // this.qunQrcode = ({ - // url: this.form.image || res.data.detail, - // status: 'success', - // message: '' - // }) - // this.QunQrcode1 = this.qunQrcode - // console.log('草稿详情',this.QunQrcode1,this.QunQrcode); - // console.log('qunQrcode', this.qunQrcode); - // formatDate(dateStr) { - // if (!dateStr) return ''; - // return dateStr.slice(5, 16); - // } - // this.times_b_int = this.form.start_time_text - // this.times_e_int = this.form.end_time_text - // res.data.detail - this.currents = this.form.refund_id; - const time_start = this.form.start_time_text.slice(5, 16) - const time_end = this.form.end_time_text.slice(5, 16) - this.form.time = time_start + ' - ' + time_end + // if(this.form.image == '' || this.form.image == null){ + // this.qunQrcode = '' + // this.QunQrcode1 = this.qunQrcode + // console.log('草稿详情',this.QunQrcode1,this.QunQrcode); + // }else { + // this.qunQrcode = ({ + // url: this.form.image || res.data.detail, + // status: 'success', + // message: '' + // }) + // this.QunQrcode1 = this.qunQrcode + // console.log('草稿详情2',this.QunQrcode1,this.QunQrcode); + // } + // // this.qunQrcode = ({ + // // url: this.form.image || res.data.detail, + // // status: 'success', + // // message: '' + // // }) + // // this.QunQrcode1 = this.qunQrcode + // // console.log('草稿详情',this.QunQrcode1,this.QunQrcode); + // // console.log('qunQrcode', this.qunQrcode); + // // formatDate(dateStr) { + // // if (!dateStr) return ''; + // // return dateStr.slice(5, 16); + // // } + // // this.times_b_int = this.form.start_time_text + // // this.times_e_int = this.form.end_time_text + // // res.data.detail + // this.currents = this.form.refund_id; + // const time_start = this.form.start_time_text.slice(5, 16) + // const time_end = this.form.end_time_text.slice(5, 16) + // this.form.time = time_start + ' - ' + time_end - const signTime_start = this.form.sign_start_time_text.slice(5, 16) - const signTime_end = this.form.sign_end_time_text.slice(5, 16) - this.form.sign_time = signTime_start + ' - ' + signTime_end - console.log('this.form.sign_time',this.form.sign_time); + // const signTime_start = this.form.sign_start_time_text.slice(5, 16) + // const signTime_end = this.form.sign_end_time_text.slice(5, 16) + // this.form.sign_time = signTime_start + ' - ' + signTime_end + // console.log('this.form.sign_time',this.form.sign_time); - if (!this.original_activity_id) { - this.times_b_int = this.form.start_time_text - this.times_e_int = this.form.end_time_text - this.times_sinb_int = this.form.sign_start_time_text - this.times_sine_int = this.form.sign_end_time_text - } else { - this.times_b_int = '' - this.times_e_int = '' - this.times_sinb_int = '' - this.times_sine_int = '' - this.form.sign_time = '' - this.form.time = '' - } - if (this.type == 2) { - this.form.title = '' - } + // if (!this.original_activity_id) { + // this.times_b_int = this.form.start_time_text + // this.times_e_int = this.form.end_time_text + // this.times_sinb_int = this.form.sign_start_time_text + // this.times_sine_int = this.form.sign_end_time_text + // } else { + // this.times_b_int = '' + // this.times_e_int = '' + // this.times_sinb_int = '' + // this.times_sine_int = '' + // this.form.sign_time = '' + // this.form.time = '' + // } + // if (this.type == 2) { + // this.form.title = '' + // } - this.price = res.data.detail.price - this.priceDo() - this.mobile = this.detail.user.mobile.slice(0, 3) + 'XXXX' + this.detail.user.mobile.slice( - 7); - } else { - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 2000 - }) - } - }).catch(error => {}); - }, + // this.price = res.data.detail.price + // this.priceDo() + // this.mobile = this.detail.user.mobile.slice(0, 3) + 'XXXX' + this.detail.user.mobile.slice( + // 7); + // } else { + // uni.showToast({ + // title: res.msg, + // icon: 'none', + // duration: 2000 + // }) + // } + // }).catch(error => {}); + // }, priceDo() { var price = this.price; console.log('priceDo price:', price); @@ -1955,14 +1955,28 @@ this.list1 = this.form.images console.log('fileList1', this.fileList1); } - if (this.form.image) { + // if (this.form.image) { + // this.qunQrcode = ({ + // url: this.form.image, + // status: 'success', + // message: '' + // }) + // this.QunQrcode1 = this.qunQrcode + // console.log('qunQrcode222', this.qunQrcode); + // } + + if(this.form.image == '' || this.form.image == null){ + this.qunQrcode = '' + this.QunQrcode1 = this.qunQrcode + console.log('草稿详情',this.QunQrcode1,this.QunQrcode); + }else { this.qunQrcode = ({ - url: this.form.image, + url: this.form.image || res.data.detail, status: 'success', message: '' }) this.QunQrcode1 = this.qunQrcode - console.log('qunQrcode222', this.qunQrcode); + console.log('草稿详情2',this.QunQrcode1,this.QunQrcode); } if (this.form.start_time_text != '' && this.form.end_time_text != '') {