feat(custom): build
This commit is contained in:
@@ -6,8 +6,6 @@ import Upload from "@/components/Upload.vue";
|
||||
|
||||
const visible = ref(false);
|
||||
|
||||
const merType = ref(false);
|
||||
|
||||
const merGooType = ref(false);
|
||||
|
||||
// 验证码按钮文字
|
||||
@@ -17,13 +15,30 @@ const smsStr = ref("获取验证码");
|
||||
const smsDisabled = ref(false);
|
||||
|
||||
// 表单数据
|
||||
const formValue = ref<any>({
|
||||
const formValue = ref<{
|
||||
name: string;
|
||||
userName: string;
|
||||
phone: string;
|
||||
mobile: string;
|
||||
code: string;
|
||||
classId: string;
|
||||
merGooTypeStr: string;
|
||||
license: any[];
|
||||
front: any[];
|
||||
back: any[];
|
||||
head_photo: any[];
|
||||
img: any[];
|
||||
bank: string;
|
||||
bank_card: string;
|
||||
bank_name: string;
|
||||
bank_user: string;
|
||||
address: string;
|
||||
}>({
|
||||
name: "",
|
||||
userName: "",
|
||||
phone: "",
|
||||
mobile: "",
|
||||
code: "",
|
||||
bType: "",
|
||||
merTypeStr: "",
|
||||
classId: "",
|
||||
merGooTypeStr: "",
|
||||
license: [],
|
||||
@@ -40,8 +55,6 @@ const formValue = ref<any>({
|
||||
|
||||
const merGooList = ref([]);
|
||||
|
||||
const merList = ref([]);
|
||||
|
||||
// 表单校验
|
||||
const ruleForm = ref<any>(null);
|
||||
|
||||
@@ -53,19 +66,10 @@ Taro.useLoad(() => {
|
||||
const getMerType = async () => {
|
||||
try {
|
||||
const res = await getMerTypeList();
|
||||
console.log(res);
|
||||
merList.value = res.data.type.map((item: any) => {
|
||||
return {
|
||||
text: item.name,
|
||||
value: item.ID,
|
||||
};
|
||||
});
|
||||
merGooList.value = res.data.class.map((item: any) => {
|
||||
return {
|
||||
text: item.name,
|
||||
value: item.ID,
|
||||
};
|
||||
});
|
||||
merGooList.value = res.data.class.map((item: any) => ({
|
||||
text: item.name,
|
||||
value: item.ID,
|
||||
}));
|
||||
} catch (e) {
|
||||
Taro.showToast({
|
||||
title: e.msg,
|
||||
@@ -139,13 +143,6 @@ const getSmsCode = () => {
|
||||
});
|
||||
};
|
||||
|
||||
// 选择商户类型
|
||||
const confirmMerType = (e: any) => {
|
||||
formValue.value.merTypeStr = e.selectedOptions[0].text;
|
||||
formValue.value.bType = e.selectedOptions[0].value;
|
||||
merType.value = false;
|
||||
};
|
||||
|
||||
// 选择经营类目
|
||||
const confirmGooType = (e: any) => {
|
||||
formValue.value.merGooTypeStr = e.selectedOptions[0].text;
|
||||
@@ -357,33 +354,6 @@ const submit = () => {
|
||||
placeholder="请输入银行卡号"
|
||||
/>
|
||||
</nut-form-item>
|
||||
<nut-form-item
|
||||
required
|
||||
label="商户类型"
|
||||
prop="merTypeStr"
|
||||
:rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择商户类型',
|
||||
},
|
||||
]"
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
:disabled="true"
|
||||
v-model="formValue.merTypeStr"
|
||||
placeholder="请选择商户类型"
|
||||
@click="merType = true"
|
||||
/>
|
||||
<nut-popup position="bottom" v-model:visible="merType">
|
||||
<nut-picker
|
||||
:columns="merList"
|
||||
title="商户类型"
|
||||
@confirm="confirmMerType"
|
||||
@cancel="merType = false"
|
||||
></nut-picker>
|
||||
</nut-popup>
|
||||
</nut-form-item>
|
||||
<nut-form-item
|
||||
required
|
||||
label="经营类目"
|
||||
@@ -402,9 +372,14 @@ const submit = () => {
|
||||
placeholder="请选择经营类目"
|
||||
@click="merGooType = true"
|
||||
/>
|
||||
<nut-popup position="bottom" v-model:visible="merGooType">
|
||||
<nut-popup
|
||||
position="bottom"
|
||||
v-model:visible="merGooType"
|
||||
:safe-area-inset-bottom="true"
|
||||
:catch-move="true"
|
||||
>
|
||||
<nut-picker
|
||||
:columns="merGooList"
|
||||
v-model:columns="merGooList"
|
||||
title="商户类型"
|
||||
@confirm="confirmGooType"
|
||||
@cancel="merGooType = false"
|
||||
@@ -494,8 +469,8 @@ const submit = () => {
|
||||
|
||||
<view class="btn">
|
||||
<nut-button block type="primary" round @click="submit()"
|
||||
>提交</nut-button
|
||||
>
|
||||
>提交
|
||||
</nut-button>
|
||||
</view>
|
||||
</nut-form>
|
||||
<!-- 入驻协议弹窗 -->
|
||||
|
||||
Reference in New Issue
Block a user