This commit is contained in:
aihe 2024-06-20 22:27:46 +08:00
parent d9ee6678d5
commit 5c84150b5f
2 changed files with 11 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<template>
<u-textarea shape="circle" placeholder-style=""
:modelValue="value" :clearable="true" :placeholder="placeholder"
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 15rpx 20rpx;" height="160"
custom-style="border-radius: 10rpx;padding: 15rpx 20rpx;" height="160"
@change="handleChange"
></u-textarea>
</template>

View File

@ -87,6 +87,7 @@
import { addressNameCodeMap } from "@/common/enum"
import { pageEventNames } from "@/common/enum"
import { getAddressDetail, setAddresModalParam } from "@/common/util"
import { checkParams } from "@/common/validate"
export default {
props: {
@ -111,7 +112,14 @@
ansValue: '',
submitParam: {
...getAddressModels(),
}
},
submitValidConfig: {
name: { required: true, requiredMsg: '姓名不能为空' },
phone: { required: true, requiredMsg: '手机号不能为空' },
country: { required: true, requiredMsg: '国家不能为空' },
province: { required: true, requiredMsg: '省份不能为空' },
address: { required: true, requiredMsg: '详细地址' },
},
}
},
onShareAppMessage() {
@ -163,6 +171,7 @@
},
async handleSubmit() {
let params = { ...this.submitParam }
await checkParams(params, this.submitValidConfig)
let curServiceHand = apiService.addAddress
if(this.queryOption.id) {
curServiceHand = apiService.editAddress