From 155f2b80f2a9b6f900c73f6e4461e9cebb7cd028 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期二, 10 十月 2023 17:12:20 +0800 Subject: [PATCH] # --- pages/business/cstmr/addCsmtr.vue | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/pages/business/cstmr/addCsmtr.vue b/pages/business/cstmr/addCsmtr.vue index 816991f..569908b 100644 --- a/pages/business/cstmr/addCsmtr.vue +++ b/pages/business/cstmr/addCsmtr.vue @@ -18,7 +18,7 @@ <uni-data-checkbox v-model="baseFormData.type" :localdata="type$" /> </uni-forms-item> <uni-forms-item label="鐪佸競鍖�" required name="citysData"> - <uni-data-picker @change="areaChange" placeholder="璇烽�夋嫨鐪佸競鍖�" popup-title="璇烽�夋嫨鎵�鍦ㄥ湴鍖�" :localdata="citysData" v-model="baseFormData.userArea"> + <uni-data-picker @change="areaChange" placeholder="璇烽�夋嫨鐪佸競鍖�" popup-title="璇烽�夋嫨鎵�鍦ㄥ湴鍖�" :localdata="citysData" v-model="baseFormData.pcd"> </uni-data-picker> </uni-forms-item> <uni-forms-item label="鐢佃瘽" required name="tel"> @@ -50,7 +50,6 @@ export default { data() { return { - baseUrl: '', cstmrTypes: [], cstmrType: '', directors: [], @@ -143,11 +142,10 @@ onReady() { // 闇�瑕佸湪onReady涓缃鍒� this.$refs.baseForm.setRules(this.rules) - }, - mounted() { + }, + onShow() { // 鑾峰彇鐪佸競鍖� this.citysData = test.citysData - this.baseUrl = uni.getStorageSync('baseUrl') this.autoLoad('cstmrType','') this.autoLoad('user','') }, @@ -214,8 +212,7 @@ if(res.remarks == undefined) { res.remarks = '' } - res.citysData = this.citysDataTemp - console.log(res); + res.pcd = this.citysDataTemp uni.request({ url: that.baseUrl + '/cstmr/add/auth', header:{ @@ -227,13 +224,20 @@ success(result) { var res = result.data if (res.code === 200) { - uni.back + uni.navigateBack() + } else if (res.code === 403) { + uni.showToast({title: res.msg, icon: "none", position: 'top'}) + setTimeout(() => { + uni.reLaunch({ + url: '../../login/login' + }); + }, 1000); + } else { + uni.showToast({title: res.msg, icon: "none",position: 'top'}) } - console.log(res); } }) }).catch(err =>{ - console.log(err); }) } } -- Gitblit v1.9.1