|
|
@@ -106,7 +106,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" class="submit-button" :loading="passwordLoading" @click="handlePasswordSubmit">
|
|
|
+ <el-button type="primary" class="submit-button" :loading="passwordLoading" @click="handlePasswordOneSubmit">
|
|
|
确认
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
@@ -134,7 +134,7 @@
|
|
|
>
|
|
|
<el-form-item label="验证原密码" prop="password">
|
|
|
<el-input
|
|
|
- v-model="passwordForm.password"
|
|
|
+ v-model="oldPasswordForm.password"
|
|
|
type="password"
|
|
|
placeholder="请输入6位提现密码"
|
|
|
clearable
|
|
|
@@ -143,13 +143,13 @@
|
|
|
class="password-input"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <div class="forget-password">忘记密码</div>
|
|
|
+ <div class="forget-password" @click="getForgetPassword">忘记密码</div>
|
|
|
<el-button type="primary" class="submit-button" @click="nextStept"> 下一步 </el-button>
|
|
|
</el-form>
|
|
|
<el-form
|
|
|
ref="passwordFormRef"
|
|
|
- :model="passwordForm"
|
|
|
- :rules="passwordRules"
|
|
|
+ :model="oldTwoPasswordForm"
|
|
|
+ :rules="passwordRulesTwo"
|
|
|
label-width="120px"
|
|
|
label-position="left"
|
|
|
class="form-wrapper"
|
|
|
@@ -157,7 +157,7 @@
|
|
|
>
|
|
|
<el-form-item label="设置提现密码" prop="password">
|
|
|
<el-input
|
|
|
- v-model="passwordForm.password"
|
|
|
+ v-model="oldTwoPasswordForm.password"
|
|
|
type="password"
|
|
|
placeholder="请输入6位提现密码"
|
|
|
clearable
|
|
|
@@ -168,7 +168,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="请确认密码" prop="confirmPassword">
|
|
|
<el-input
|
|
|
- v-model="passwordForm.confirmPassword"
|
|
|
+ v-model="oldTwoPasswordForm.confirmPassword"
|
|
|
type="password"
|
|
|
placeholder="请输入6位提现密码"
|
|
|
clearable
|
|
|
@@ -178,7 +178,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" class="submit-button" :loading="passwordLoading" @click="handlePasswordSubmit">
|
|
|
+ <el-button type="primary" class="submit-button" :loading="passwordLoading" @click="handlePasswordTwoSubmit">
|
|
|
确认
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
@@ -187,15 +187,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--收款账户-->
|
|
|
- <!-- <div class="content-section" v-if="activeTab === 'receivingAccount'">
|
|
|
- <div class="content-wrapper"> -->
|
|
|
- <!-- <el-button type="primary" class="auth-button" @click="handleGoZFB"> 添加支付宝账号 </el-button> -->
|
|
|
- <!-- <div class="zfb-wrapper">
|
|
|
+ <div class="content-section" v-if="activeTab === 'receivingAccount'">
|
|
|
+ <div class="content-wrapper">
|
|
|
+ <el-button type="primary" class="auth-button" @click="handleGoZFB" v-if="userInfo.alipayAccount == null">
|
|
|
+ 添加支付宝账号
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <div class="zfb-wrapper" v-else>
|
|
|
<div class="zfb-left">
|
|
|
<el-image :src="zfbIcon" class="zfbIcon" />
|
|
|
<div>
|
|
|
<div>支付宝</div>
|
|
|
- <div>130******111</div>
|
|
|
+ <div>{{ userInfo.phone }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="operate">
|
|
|
@@ -204,10 +207,24 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
-
|
|
|
+ </div>
|
|
|
+ <el-button type="primary" @click="goToCashApply"> 去提现 </el-button>
|
|
|
+ <!--添加支付宝账号--->
|
|
|
+ <el-dialog v-model="dialogVisibleZFB" :title="zfbTitle" width="500px" :close-on-click-modal="false">
|
|
|
+ <el-form ref="authFormRef1" :model="authForm1" :rules="authRules1" label-width="100px" label-position="left">
|
|
|
+ <el-form-item label="支付宝账号" prop="zfbName">
|
|
|
+ <el-input v-model="authForm1.zfbName" placeholder="请输入支付宝账号" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="handleCancelZFB">取消</el-button>
|
|
|
+ <el-button type="primary" :loading="loading" @click="handleConfirmZFB">确认</el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
<!-- 忘记密码对话框 -->
|
|
|
- <!-- <el-dialog v-model="forgotPasswordVisible" title="忘记密码" width="500px" draggable :close-on-click-modal="false">
|
|
|
+ <el-dialog v-model="forgotPasswordVisible" title="忘记密码" width="500px" draggable :close-on-click-modal="false">
|
|
|
<el-form
|
|
|
ref="forgotPasswordFormRef"
|
|
|
:model="forgotPasswordForm"
|
|
|
@@ -219,11 +236,11 @@
|
|
|
<span>{{ maskedPhone }}</span>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="" prop="verificationCode">
|
|
|
+ <el-form-item label="验证码">
|
|
|
<div style="display: flex; gap: 12px; width: 100%">
|
|
|
<el-input v-model="forgotPasswordForm.verificationCode" placeholder="请输入" clearable style="flex: 1" />
|
|
|
- <el-button type="primary" :disabled="codeCountdown > 0" @click="sendLoginCode">
|
|
|
- {{ codeCountdown > 0 ? `${codeCountdown}秒后重新获取` : "获取验证码" }}
|
|
|
+ <el-button :disabled="codeCountdown > 0" @click="sendForgotCode" class="code-button">
|
|
|
+ {{ codeCountdown > 0 ? `${codeCountdown}秒后重试` : "获取验证码" }}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
@@ -232,39 +249,41 @@
|
|
|
<el-input
|
|
|
v-model="forgotPasswordForm.newPassword"
|
|
|
type="password"
|
|
|
- placeholder="请输入6-16位的密码,包含字母和数字"
|
|
|
+ placeholder="请输入6位提现密码"
|
|
|
show-password
|
|
|
clearable
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
- </el-dialog> -->
|
|
|
-
|
|
|
- <!--添加支付宝账号--->
|
|
|
- <!-- <el-dialog v-model="dialogVisibleZFB" title="添加支付宝账号" width="500px" :close-on-click-modal="false">
|
|
|
- <el-form ref="authFormRef1" :model="authForm" :rules="authRules" label-width="100px" label-position="left">
|
|
|
- <el-form-item label="支付宝账号" prop="name">
|
|
|
- <el-input v-model="authForm.zfbName" placeholder="请输入支付宝账号" clearable />
|
|
|
+ <el-form-item label="确认密码" prop="newPassword">
|
|
|
+ <el-input
|
|
|
+ v-model="forgotPasswordForm.confireNewPassword"
|
|
|
+ type="password"
|
|
|
+ placeholder="请输入6位提现密码"
|
|
|
+ show-password
|
|
|
+ clearable
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
- <el-button @click="handleCancel">取消</el-button>
|
|
|
+ <el-button @click="handleCancelZFB">取消</el-button>
|
|
|
<el-button type="primary" :loading="loading" @click="handleConfirmZFB">确认</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
- </el-dialog> -->
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { ref, reactive, computed, onMounted } from "vue";
|
|
|
import { useRouter } from "vue-router";
|
|
|
-import { ElMessage, type FormInstance, type FormRules } from "element-plus";
|
|
|
-import { verifyIdInfo, checkPayPassword } from "@/api/modules/homeEntry";
|
|
|
-import { localGet } from "@/utils/index";
|
|
|
+import { ElMessage, type FormInstance, ElMessageBox, type FormRules } from "element-plus";
|
|
|
+import { verifyIdInfo, checkPayPassword, setPayPassword, getMerchantByPhone, addAlipayAccount } from "@/api/modules/homeEntry";
|
|
|
+import { localGet, localSet } from "@/utils/index";
|
|
|
import homeIcon from "../../assets/images/home-icon.png";
|
|
|
import zfbIcon from "../../assets/financial/zfb-icon.png";
|
|
|
+import { lo } from "element-plus/es/locale";
|
|
|
+import { getPhoneCode } from "@/api/modules/newLoginApi";
|
|
|
const userInfo = localGet("geeker-user").userInfo;
|
|
|
const router = useRouter();
|
|
|
const activeTab = ref("realName");
|
|
|
@@ -300,6 +319,7 @@ const handleGoAuth = () => {
|
|
|
}
|
|
|
};
|
|
|
//实名认证 确认
|
|
|
+const shimingInfo = ref(null);
|
|
|
const handleConfirm = async () => {
|
|
|
if (!authFormRef.value) return;
|
|
|
|
|
|
@@ -317,11 +337,18 @@ const handleConfirm = async () => {
|
|
|
console.log(res);
|
|
|
if (res && res.code == 200) {
|
|
|
ElMessage.success(res.msg || "实名认证提交成功");
|
|
|
- dialogVisible.value = false;
|
|
|
- goAuth.value = false;
|
|
|
- // 重置表单
|
|
|
- authFormRef.value?.resetFields();
|
|
|
- // 这里可以更新认证状态或刷新页面数据
|
|
|
+ let param = {
|
|
|
+ phone: userInfo.phone
|
|
|
+ };
|
|
|
+ const res1: any = await getMerchantByPhone(param);
|
|
|
+ if (res1.code == 200) {
|
|
|
+ dialogVisible.value = false;
|
|
|
+ goAuth.value = false;
|
|
|
+ // 重置表单
|
|
|
+ authFormRef.value?.resetFields();
|
|
|
+ shimingInfo.value = res1.data;
|
|
|
+ // 这里可以更新认证状态或刷新页面数据
|
|
|
+ }
|
|
|
} else {
|
|
|
ElMessage.error(res.msg || "实名认证失败,请重试");
|
|
|
}
|
|
|
@@ -366,22 +393,78 @@ const passwordRules = reactive<FormRules>({
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
+// 第二步修改密码的验证规则
|
|
|
+const passwordRulesTwo = reactive<FormRules>({
|
|
|
+ password: [
|
|
|
+ { required: true, message: "请输入6位提现密码", trigger: "blur" },
|
|
|
+ {
|
|
|
+ pattern: /^\d{6}$/,
|
|
|
+ message: "请输入6位数字密码",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ confirmPassword: [
|
|
|
+ { required: true, message: "请确认密码", trigger: "blur" },
|
|
|
+ {
|
|
|
+ validator: (rule: any, value: any, callback: any) => {
|
|
|
+ if (value !== oldTwoPasswordForm.password) {
|
|
|
+ callback(new Error("两次输入的密码不一致"));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+});
|
|
|
//提现密码 确认
|
|
|
-const handlePasswordSubmit = async () => {
|
|
|
+const passwordLoading = ref(false);
|
|
|
+const handlePasswordOneSubmit = async () => {
|
|
|
if (!passwordFormRef.value) return;
|
|
|
|
|
|
// 表单验证
|
|
|
- await passwordFormRef.value.validate(valid => {
|
|
|
+ await passwordFormRef.value.validate(async valid => {
|
|
|
if (valid) {
|
|
|
passwordLoading.value = true;
|
|
|
- // 这里可以调用API设置提现密码
|
|
|
- // 模拟API调用
|
|
|
- setTimeout(() => {
|
|
|
+ try {
|
|
|
+ const res: any = await setPayPassword({
|
|
|
+ payPassword: passwordForm.password,
|
|
|
+ id: userInfo.id
|
|
|
+ });
|
|
|
+ if (res.code == 200) {
|
|
|
+ ElMessage.success(res.msg || "提现密码设置成功");
|
|
|
+
|
|
|
+ // 更新本地存储中的提现密码
|
|
|
+ try {
|
|
|
+ const geekerUser = localGet("geeker-user");
|
|
|
+ if (geekerUser && geekerUser.userInfo) {
|
|
|
+ geekerUser.userInfo.payPassword = passwordForm.password;
|
|
|
+ localSet("geeker-user", geekerUser);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error("更新本地存储失败:", error);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 重置表单
|
|
|
+ passwordFormRef.value?.resetFields();
|
|
|
+ // 如果是在修改密码流程中(twoEnterPage为true),设置状态为已设置
|
|
|
+ if (twoEnterPage.value) {
|
|
|
+ twoEnterPage.value = true;
|
|
|
+ withdrawPass.value = false;
|
|
|
+ currentStep.value = 1; // 重置步骤
|
|
|
+ } else {
|
|
|
+ // 首次设置密码,跳转到收款账户
|
|
|
+ activeTab.value = "receivingAccount";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.msg || "提现密码设置失败");
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error("设置提现密码失败:", error);
|
|
|
+ ElMessage.error("提现密码设置失败,请重试");
|
|
|
+ } finally {
|
|
|
passwordLoading.value = false;
|
|
|
- ElMessage.success("提现密码设置成功");
|
|
|
- // 重置表单
|
|
|
- passwordFormRef.value?.resetFields();
|
|
|
- }, 1000);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
@@ -397,34 +480,209 @@ const passList = [
|
|
|
title: "设置新密码"
|
|
|
}
|
|
|
];
|
|
|
+//忘记密码
|
|
|
+
|
|
|
+const forgotPasswordVisible = ref(false);
|
|
|
+const forgotPasswordFormRef = ref<FormInstance>();
|
|
|
+// 验证码倒计时
|
|
|
+const codeCountdown = ref(0);
|
|
|
+let countdownTimer: NodeJS.Timeout | null = null;
|
|
|
+const forgotPasswordForm = reactive({
|
|
|
+ newPassword: "",
|
|
|
+ confireNewPassword: "",
|
|
|
+ verificationCode: ""
|
|
|
+});
|
|
|
+const getForgetPassword = async () => {
|
|
|
+ forgotPasswordVisible.value = true;
|
|
|
+};
|
|
|
+// 发送短信验证码
|
|
|
+const sendForgotCode = async () => {
|
|
|
+ let phoneCode: any = await getPhoneCode({ phone: userInfo.phone, appType: "2", businessType: "6" });
|
|
|
+ if (phoneCode.code === 200) {
|
|
|
+ ElMessage.success("验证码已发送");
|
|
|
+ // 开始倒计时
|
|
|
+ codeCountdown.value = 60;
|
|
|
+ countdownTimer = setInterval(() => {
|
|
|
+ codeCountdown.value--;
|
|
|
+ if (codeCountdown.value <= 0) {
|
|
|
+ if (countdownTimer) {
|
|
|
+ clearInterval(countdownTimer);
|
|
|
+ countdownTimer = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
+};
|
|
|
//下一步
|
|
|
+
|
|
|
+const oldPasswordForm = reactive({
|
|
|
+ password: ""
|
|
|
+});
|
|
|
+
|
|
|
+const oldTwoPasswordForm = reactive({
|
|
|
+ password: "",
|
|
|
+ confirmPassword: ""
|
|
|
+});
|
|
|
+
|
|
|
const nextStept = async () => {
|
|
|
- currentStep.value = 2;
|
|
|
+ if (oldPasswordForm.password === userInfo.payPassword) {
|
|
|
+ currentStep.value = 2;
|
|
|
+ } else {
|
|
|
+ ElMessage.error("原密码错误");
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const handlePasswordTwoSubmit = async () => {
|
|
|
+ if (!passwordFormRef.value) return;
|
|
|
+
|
|
|
+ // 表单验证
|
|
|
+ await passwordFormRef.value.validate(async valid => {
|
|
|
+ if (valid) {
|
|
|
+ passwordLoading.value = true;
|
|
|
+ try {
|
|
|
+ const res: any = await setPayPassword({
|
|
|
+ payPassword: oldTwoPasswordForm.password,
|
|
|
+ id: userInfo.id
|
|
|
+ });
|
|
|
+ if (res.code == 200) {
|
|
|
+ ElMessage.success(res.msg || "提现密码修改成功");
|
|
|
+
|
|
|
+ // 更新本地存储中的提现密码
|
|
|
+ try {
|
|
|
+ const geekerUser = localGet("geeker-user");
|
|
|
+ if (geekerUser && geekerUser.userInfo) {
|
|
|
+ geekerUser.userInfo.payPassword = oldTwoPasswordForm.password;
|
|
|
+ localSet("geeker-user", geekerUser);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error("更新本地存储失败:", error);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 重置表单
|
|
|
+ passwordFormRef.value?.resetFields();
|
|
|
+ oldPasswordForm.password = "";
|
|
|
+ oldTwoPasswordForm.password = "";
|
|
|
+ oldTwoPasswordForm.confirmPassword = "";
|
|
|
+ // 重置步骤
|
|
|
+ currentStep.value = 1;
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.msg || "提现密码修改失败");
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error("修改提现密码失败:", error);
|
|
|
+ ElMessage.error("提现密码修改失败,请重试");
|
|
|
+ } finally {
|
|
|
+ passwordLoading.value = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
//收款账户
|
|
|
+const authFormRef1 = ref<FormInstance>();
|
|
|
+const authRules1 = reactive<FormRules>({
|
|
|
+ zfbName: [{ required: true, message: "请输入支付宝账号", trigger: "blur" }]
|
|
|
+});
|
|
|
+const authForm1 = reactive({
|
|
|
+ zfbName: ""
|
|
|
+});
|
|
|
+const zfbShow = ref(false);
|
|
|
+const zfbTitle = ref("");
|
|
|
const dialogVisibleZFB = ref(false);
|
|
|
const handleGoZFB = async () => {
|
|
|
+ zfbTitle.value = "添加支付宝账号";
|
|
|
dialogVisibleZFB.value = true;
|
|
|
};
|
|
|
const handleConfirmZFB = async () => {
|
|
|
- dialogVisibleZFB.value = false;
|
|
|
+ if (!authFormRef1.value) return;
|
|
|
+ await authFormRef1.value.validate(async valid => {
|
|
|
+ if (valid) {
|
|
|
+ loading.value = true;
|
|
|
+ try {
|
|
|
+ const params = {
|
|
|
+ alipayAccount: authForm1.zfbName
|
|
|
+ };
|
|
|
+ const res: any = await addAlipayAccount(params);
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ ElMessage.success(res.msg || "添加支付宝账号成功");
|
|
|
+
|
|
|
+ // 更新本地存储中的支付宝账号
|
|
|
+ try {
|
|
|
+ const geekerUser = localGet("geeker-user");
|
|
|
+ if (geekerUser && geekerUser.userInfo) {
|
|
|
+ geekerUser.userInfo.aliPayAccount = authForm1.zfbName;
|
|
|
+ localSet("geeker-user", geekerUser);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error("更新本地存储失败:", error);
|
|
|
+ }
|
|
|
+
|
|
|
+ dialogVisibleZFB.value = false;
|
|
|
+ zfbShow.value = true;
|
|
|
+ // 重置表单
|
|
|
+ authFormRef1.value?.resetFields();
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.msg || "添加支付宝账号失败,请重试");
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error("添加支付宝账号失败:", error);
|
|
|
+ ElMessage.error("添加支付宝账号失败,请重试");
|
|
|
+ } finally {
|
|
|
+ loading.value = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
+const getEditZfb = async () => {
|
|
|
+ zfbTitle.value = "编辑支付宝账号";
|
|
|
+ dialogVisibleZFB.value = true;
|
|
|
+ authForm1.zfbName = userInfo.phone;
|
|
|
+};
|
|
|
+const getDelZfb = async () => {
|
|
|
+ ElMessageBox.confirm("确定要删除该账号,删除后无法进行提现操作", "删除账号", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消"
|
|
|
+ })
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {});
|
|
|
+};
|
|
|
+
|
|
|
+// 跳转到提现申请页面
|
|
|
+const goToCashApply = () => {
|
|
|
+ router.push("/financialManagement/cashApply");
|
|
|
};
|
|
|
-const getEditZfb = async () => {};
|
|
|
-const getDelZfb = async () => {};
|
|
|
|
|
|
-const passwordLoading = ref(false);
|
|
|
-const forgotPasswordVisible = ref(false);
|
|
|
-const forgotPasswordFormRef = ref<FormInstance>();
|
|
|
-const forgotPasswordForm = reactive({
|
|
|
- verificationCode: "",
|
|
|
- newPassword: ""
|
|
|
-});
|
|
|
// 忘记密码表单验证规则
|
|
|
const forgotPasswordRules: FormRules = {
|
|
|
verificationCode: [{ required: true, message: "请输入验证码", trigger: "blur" }]
|
|
|
};
|
|
|
|
|
|
+// 检查提现密码状态
|
|
|
+const checkPasswordStatus = async () => {
|
|
|
+ try {
|
|
|
+ if (userInfo.idCard && userInfo.id) {
|
|
|
+ const param = {
|
|
|
+ storeUserId: userInfo.id
|
|
|
+ };
|
|
|
+ const res: any = await checkPayPassword(param as any);
|
|
|
+ if (res.code == 200) {
|
|
|
+ // 如果已设置提现密码,显示修改密码界面
|
|
|
+ if (res.data.data == "true") {
|
|
|
+ twoEnterPage.value = true;
|
|
|
+ withdrawPass.value = false;
|
|
|
+ currentStep.value = 1; // 重置步骤
|
|
|
+ } else {
|
|
|
+ // 如果未设置提现密码,显示首次设置界面
|
|
|
+ twoEnterPage.value = false;
|
|
|
+ withdrawPass.value = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error("检查提现密码状态失败:", error);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
// 检查提现密码并自动跳转
|
|
|
const checkWithdrawPassword = async () => {
|
|
|
try {
|
|
|
@@ -438,6 +696,8 @@ const checkWithdrawPassword = async () => {
|
|
|
// 如果未设置提现密码,自动跳转到提现密码标签页
|
|
|
if (res.data.data == "false") {
|
|
|
activeTab.value = "withdrawPassword";
|
|
|
+ } else {
|
|
|
+ activeTab.value = "receivingAccount";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -463,10 +723,13 @@ const maskedPhone = computed(() => {
|
|
|
return userPhone.value.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
|
|
|
});
|
|
|
|
|
|
-const handleTabClick = (tab: any) => {
|
|
|
+const handleTabClick = async (tab: any) => {
|
|
|
// 根据不同的标签页可以跳转到不同的页面或显示不同的内容
|
|
|
console.log("切换到标签:", tab.props.name);
|
|
|
- // 这里可以根据需要实现路由跳转或内容切换
|
|
|
+ // 如果切换到提现密码标签页,检查提现密码状态
|
|
|
+ if (tab.props.name === "withdrawPassword") {
|
|
|
+ await checkPasswordStatus();
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const handleCancel = () => {
|
|
|
@@ -476,6 +739,14 @@ const handleCancel = () => {
|
|
|
authFormRef.value.resetFields();
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+const handleCancelZFB = () => {
|
|
|
+ dialogVisibleZFB.value = false;
|
|
|
+ // 重置表单
|
|
|
+ if (authFormRef1.value) {
|
|
|
+ authFormRef1.value.resetFields();
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
@@ -625,10 +896,10 @@ const handleCancel = () => {
|
|
|
.zfb-wrapper {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- width: 800px;
|
|
|
+ width: 100%;
|
|
|
height: 80px;
|
|
|
padding: 0 20px;
|
|
|
- border: 1px solid #aaaaaa;
|
|
|
+ border: 1px solid #dddddd;
|
|
|
border-radius: 8px;
|
|
|
.operate {
|
|
|
display: flex;
|