Browse Source

撤销设置方法注释

pull/10/head
zq 2 weeks ago
parent
commit
63afdf25dc
  1. 104
      src/views/weChatPayment.vue

104
src/views/weChatPayment.vue

@ -188,25 +188,9 @@ export default {
//
this.formData.set('doctor_id', this.$route.query.doctor_id)
this.formData.set('depart_id', this.$route.query.depart_id)
this.getPayment();
console.log('apiclient_cert' in this.payInfo,'apiclient_key');
},
methods: {
getPayment() {
//
// this.$http('POST', '/agentnew/ajax_get_payinfo', {
// doctor_id : this.doctor_id,
// depart_id : this.depart_id
// }).then(response => {
// this.$nextTick(() => {
// this.payinfo = response.data
// this.formData1 = response.data
// })
// }).catch(error => {
// console.error(error, 'error')
// })
},
handRemove() {
this.formData.delete('apiclient_cert');
this.payInfo.delete('apiclient_cert');
@ -259,53 +243,53 @@ export default {
// console.log(' (Key):', key);
// console.log(' (Value):', value);
// }
// if(!this.formData.has('apiclient_key') ){
// this.noFileFlag1 = true;
// if( !this.formData.has('apiclient_cert')){
// this.noFileFlag = true;
// this.$positionMessage({
// type: 'error',
// message: '',
// target: this.$refs['saveRef'], // DOM
// position: 'top'
// })
// return false;
// }
// this.$positionMessage({
// type: 'error',
// message: '',
// target: this.$refs['saveRef'], // DOM
// position: 'top'
// })
// return false;
// }
if(!this.formData.has('apiclient_key') ){
this.noFileFlag1 = true;
if( !this.formData.has('apiclient_cert')){
this.noFileFlag = true;
this.$positionMessage({
type: 'error',
message: '请先上传证书',
target: this.$refs['saveRef'], // DOM
position: 'top'
})
return false;
}
this.$positionMessage({
type: 'error',
message: '请先上传证书',
target: this.$refs['saveRef'], // DOM
position: 'top'
})
return false;
}
this.$refs.wxform.validate((valid) => {
console.log(valid, 'valid');
// if (valid) {
// for (let key in this.formData1) {
// this.formData.set(key, this.formData1[key])
// }
// this.formData.set('doctor_id', this.$route.query.doctor_id)
// this.formData.set('depart_id', this.$route.query.depart_id)
// this.formData.set('type',this.payTypeWeixin)// 2 \ 3
// this.formData.set('is_pay_public','0')
// const that = this;
// this.$http('POST', '/api/admin/set_pay_method', this.formData).then(response => {
// if(response.code == 0){
// that.$message.success('');
// // that.payList = response.data.paylist
// // that.$emit('saveEvent', that.payList)
// this.$router.go(-1);
// return true;
// }
// that.$message.error(response.msg);
// }).catch(error => {
// console.error(error, 'error')
// })
// } else {
// return false;
// }
if (valid) {
for (let key in this.formData1) {
this.formData.set(key, this.formData1[key])
}
this.formData.set('doctor_id', this.$route.query.doctor_id)
this.formData.set('depart_id', this.$route.query.depart_id)
this.formData.set('type',this.payTypeWeixin)// 2 \ 3
this.formData.set('is_pay_public','0')
const that = this;
this.$http('POST', '/api/admin/set_pay_method', this.formData).then(response => {
if(response.code == 0){
that.$message.success('保存成功');
// that.payList = response.data.paylist
// that.$emit('saveEvent', that.payList)
this.$router.go(-1);
return true;
}
that.$message.error(response.msg);
}).catch(error => {
console.error(error, 'error')
})
} else {
return false;
}
})
},
}

Loading…
Cancel
Save