uu
This commit is contained in:
parent
a1e6c676f8
commit
15835eaf4d
@ -41,7 +41,11 @@ function dealRequest(def, url, param) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 统一提示 errmsg
|
// 统一提示 errmsg
|
||||||
promise.then(function(res) {}, function(res) {
|
promise.then(function(res) {
|
||||||
|
if(param && param._loading) {
|
||||||
|
hideLoading()
|
||||||
|
}
|
||||||
|
}, function(res) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
})
|
})
|
||||||
return promise;
|
return promise;
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
<tpx-layout>
|
<tpx-layout>
|
||||||
<template v-slot:body>
|
<template v-slot:body>
|
||||||
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
|
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
|
||||||
|
|
||||||
<view class="blcok-white radius-20">
|
<view class="blcok-white radius-20">
|
||||||
<u-textarea v-model="submitParam.otherDes" border="none" height="110" placeholder="粘贴或输入地址,点击“智能识别”自动拆分姓名、电话和地址" custom-style="border:0;padding: 0;"></u-textarea>
|
<u-textarea v-model="submitParam.otherDes" border="none" height="110" placeholder="粘贴或输入地址,点击“智能识别”自动拆分姓名、电话和地址" custom-style="border:0;padding: 0;"></u-textarea>
|
||||||
<u-row justify="end">
|
<u-row justify="end">
|
||||||
@ -82,17 +81,19 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAddressModels } from "./model"
|
import { getAddressModels } from "./model"
|
||||||
|
import * as apiService from "@/common/api"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
// hasLeftWin: {
|
|
||||||
// type: Boolean
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
queryOption: {
|
||||||
|
id: undefined
|
||||||
|
},
|
||||||
addressModal: {
|
addressModal: {
|
||||||
show: false,
|
show: false,
|
||||||
values: {
|
values: {
|
||||||
@ -111,17 +112,22 @@
|
|||||||
// path: 'TODO'
|
// path: 'TODO'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(queryOption) {
|
||||||
|
this.queryOption = queryOption
|
||||||
this.initData();
|
this.initData();
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
async initData() {
|
||||||
// uni.showLoading({
|
if(this.queryOption.id) {
|
||||||
// title: '加载中'
|
let res = await apiService.getAddressById({ id: this.queryOption.id, _loading: true })
|
||||||
// });
|
if(res.data.blDefaultFlag) {
|
||||||
|
res.data.blDefaultFlag = [true]
|
||||||
|
}
|
||||||
|
this.submitParam = res.data
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleAnsText(){
|
handleAnsText(){
|
||||||
|
|
||||||
@ -133,8 +139,15 @@
|
|||||||
regNames: [],
|
regNames: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
async handleSubmit() {
|
||||||
|
let params = { ...this.submitParam }
|
||||||
|
let curServiceHand = apiService.addAddress
|
||||||
|
if(this.queryOption.id) {
|
||||||
|
curServiceHand = apiService.editAddress
|
||||||
|
}
|
||||||
|
params.blDefaultFlag = !!(params.blDefaultFlag && params.blDefaultFlag.length > 0);
|
||||||
|
await curServiceHand({ ...params, _loading: true })
|
||||||
|
this.showToast("操作成功")
|
||||||
},
|
},
|
||||||
handleDialogClick(curModal) {
|
handleDialogClick(curModal) {
|
||||||
curModal.show = true
|
curModal.show = true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user