update
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
<script setup>
|
||||
import {ref, reactive} from 'vue';
|
||||
import {reactive} from 'vue';
|
||||
import VerificationCode from "../../components/VerificationCode/index.vue";
|
||||
import Api from "../../api/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const from = reactive({
|
||||
phone: null,
|
||||
verificationCode: null,
|
||||
wechat: null,
|
||||
mobile: null,
|
||||
password: null,
|
||||
captcha: null,
|
||||
invite: null,
|
||||
});
|
||||
|
||||
const register = async () => {
|
||||
const {msg} = await Api.merchant.register(from);
|
||||
Message.success(msg);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -14,27 +24,28 @@ const from = reactive({
|
||||
<div class="mt-[30px] flex flex-col gap-[20px]">
|
||||
<a-form layout="vertical">
|
||||
<a-form-item label="微信号">
|
||||
<a-input placeholder="请输入微信号"></a-input>
|
||||
<a-input v-model:model-value="from.wechat" placeholder="请输入微信号"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="手机号">
|
||||
<a-input v-model:model-value="from.phone" placeholder="请输入手机号"></a-input>
|
||||
<a-input v-model:model-value="from.mobile" placeholder="请输入手机号"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="验证码">
|
||||
<VerificationCode
|
||||
:phone="from.phone"
|
||||
v-model:verification-code="from.verificationCode">
|
||||
:api="Api.merchant.sendSms"
|
||||
:mobile="from.mobile"
|
||||
v-model:verification-code="from.captcha">
|
||||
</VerificationCode>
|
||||
</a-form-item>
|
||||
<a-form-item label="登陆密码">
|
||||
<a-input placeholder="请输入登陆密码"></a-input>
|
||||
<a-input v-model:model-value="from.password" placeholder="请输入登陆密码"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="邀请码(选填)">
|
||||
<a-input placeholder="请输入邀请码"></a-input>
|
||||
<a-input v-model:model-value="from.invite" placeholder="请输入邀请码"></a-input>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="flex flex-col mt-[30px] gap-[32px]">
|
||||
<a-button type="primary">确认注册</a-button>
|
||||
<a-button type="primary" @click="register">确认注册</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -42,6 +53,7 @@ const from = reactive({
|
||||
<style scoped>
|
||||
.card {
|
||||
box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.1);
|
||||
|
||||
:deep(.arco-form-item-label-col) {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user