修改意见

master
lion 1 year ago
parent 2b09eb5395
commit 2b1f373026

@ -252,7 +252,7 @@
let valueArr = []
let fileListArr = []
console.log("item.fileListArr",item.fileListArr)
if(item.fileListArr.length>0){
if(item.fileListArr && item.fileListArr.length>0){
item.fileListArr.map(f=>{
if(f.response){
valueArr.push(f.response.url.replace(baseUrl, ''))
@ -262,6 +262,8 @@
fileListArr.push(f)
}
})
}else{
item.fileListArr = []
}
item.value = valueArr.join(",")
item.fileList = fileListArr

@ -22,9 +22,10 @@
is_fee: 0, //
form: {},
apply_form: [],
course_forms: [],
sign_id:'', // id
opType:'add', // edit
course_forms: [],
sign_id: '', // id
opType: 'add', // edit
isLocked: false
}
},
onReady() {
@ -32,8 +33,8 @@
},
onLoad(options) {
this.course_id = options.id
if (options.type === 'edit') {
this.opType = 'edit'
if (options.type === 'edit') {
this.opType = 'edit'
this.getSignDetail(options.id)
} else {
this.getCourseDetail(options.id)
@ -65,7 +66,7 @@
async getSignDetail(id) {
const res = await this.$u.api.courseGetSign({
course_id: id
})
})
this.sign_id = res.detail.id
if (res.detail.data && res.detail.data.length > 0) {
res.detail.data.map(item => {
@ -93,23 +94,17 @@
})
this.apply_form = _arr
console.log("this.apply_form", this.apply_form, this.form)
// return
this.saveUser()
if(this.opType == 'edit'){
this.updateApplyCourse()
}else{
this.applyCourse()
// return
if (this.isLocked) {
return
}
this.isLocked = true
this.saveUser()
if (this.opType == 'edit') {
this.updateApplyCourse()
} else {
this.applyCourse()
}
// this.$refs.uForm.validate(valid => {
// if (valid) {
// } else {
// console.log('');
// // this.base.toast("")
// }
// });
},
async saveUser() {
let that = this
@ -119,11 +114,16 @@
// this.$u.api.user().then(res => {
// this.$u.vuex('vuex_user', res.user)
// })
}).catch(err => {
console.log("err", err)
that.isLocked = false
})
},
async applyCourse() {
let that = this
// let that = this
// let that = this
await this.$u.api.courseSign({
course_id: this.course_id,
data: this.apply_form
@ -140,23 +140,29 @@
})
}
}).catch(err => {
console.log("err", err)
that.isLocked = false
})
},
//
async updateApplyCourse() {
let that = this
this.$u.api.courseUpdateSign({
id: this.sign_id,
data: this.apply_form
}).then(res => {
that.base.toast("修改成功", 1500, function() {
setTimeout(function() {
uni.redirectTo({
url: '/packages/mycourse/index'
})
}, 500)
})
}).catch(err => {
console.log("err", err)
that.isLocked = false
})
},
//
async updateApplyCourse() {
let that = this
this.$u.api.courseUpdateSign({
id: this.sign_id,
data:this.apply_form
}).then(res => {
that.base.toast("修改成功", 1500, function() {
setTimeout(function() {
uni.redirectTo({
url: '/packages/mycourse/index'
})
}, 500)
})
})
},
//

@ -1,10 +1,10 @@
<template>
<view class="container">
<image class="cbg" :src="base.imgHost('common_bg.png')"></image>
<view class="qrcode" @click="showBigCode = true" >
<view class="qrcode" @click="showBigCode = true" v-if="myQrcode.qrcode">
<view class="qrcode-code">
<!-- myQrcode.qrcode -->
<uqrcode ref="uqrcode" canvas-id="qrcode" :value="'123'" :sizeUnit="'rpx'" :size="110" :options="{
<uqrcode ref="uqrcode" canvas-id="qrcode" :value="myQrcode.qrcode" :sizeUnit="'rpx'" :size="110" :options="{
margin: 5,
foregroundImageSrc: '/static/index_icon1.png',
}"></uqrcode>

@ -101,7 +101,9 @@
</u-popup>
</view>
<!-- 预约须知 -->
<u-popup v-model="showTips" mode="bottom" border-radius="30rpx" :mask-close-able="false" class="configwrap">
<u-popup v-model="showTips" mode="bottom"
height="800rpx"
border-radius="30rpx" :mask-close-able="false" class="configwrap">
<view class="slot-content">
<!-- <view class="configtitle">
{{configInfo.name}}
@ -625,7 +627,7 @@
}
.slot-content {
padding: 30rpx;
padding: 40rpx;
padding-top: 20rpx;
&>view {
@ -637,9 +639,9 @@
}
&-input {
height: 700rpx;
// line-height: 1.6;
overflow: scroll;
// height: 700rpx;
// // line-height: 1.6;
// overflow: scroll;
}
&-btn {

@ -100,7 +100,6 @@
this.hasMobile = false
}
this.getCourseDetail(this.course_id)
this.getCourseSign()
}
},
onHide() {
@ -135,7 +134,6 @@
that.hasMobile = false
}
that.getCourseDetail(that.course_id)
that.getCourseSign(that.course_id)
},
fail(err) {
console.log("err", err)
@ -170,9 +168,7 @@
}
});
},
async getCourseSign() {
},
//
//
//

Loading…
Cancel
Save