| | |
| | | <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"> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | baseUrl: '', |
| | | cstmrTypes: [], |
| | | cstmrType: '', |
| | | directors: [], |
| | |
| | | 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','') |
| | | }, |
| | |
| | | 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:{ |
| | |
| | | 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); |
| | | }) |
| | | } |
| | | } |