|
@@ -8,7 +8,8 @@
|
|
|
<span class="shop-name">每天汪汪的店铺</span>
|
|
<span class="shop-name">每天汪汪的店铺</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="auth-status">
|
|
<div class="auth-status">
|
|
|
- <span class="status-badge">未认证</span>
|
|
|
|
|
|
|
+ <span class="status-badge" v-if="!userInfo.idCard">未认证</span>
|
|
|
|
|
+ <span class="status-badge status-badge-success" v-if="userInfo.idCard">已认证</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -33,19 +34,42 @@
|
|
|
<div class="auth-div" v-if="!goAuth">
|
|
<div class="auth-div" v-if="!goAuth">
|
|
|
<el-row class="auth-row">
|
|
<el-row class="auth-row">
|
|
|
<el-col :span="2"> 姓名 </el-col>
|
|
<el-col :span="2"> 姓名 </el-col>
|
|
|
- <el-col :span="12"> 王* </el-col>
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ {{ userInfo.name }}
|
|
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row class="auth-row">
|
|
<el-row class="auth-row">
|
|
|
<el-col :span="2"> 身份证号 </el-col>
|
|
<el-col :span="2"> 身份证号 </el-col>
|
|
|
- <el-col :span="12"> 2315************9966 </el-col>
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ {{ userInfo.idCard }}
|
|
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row class="auth-row">
|
|
<el-row class="auth-row">
|
|
|
<el-col :span="2"> 认证时间 </el-col>
|
|
<el-col :span="2"> 认证时间 </el-col>
|
|
|
- <el-col :span="12"> 2025/11/19 </el-col>
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ {{ userInfo.createdTime }}
|
|
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- 实名认证对话框 -->
|
|
|
|
|
+ <el-dialog v-model="dialogVisible" title="实名认证" width="500px" :close-on-click-modal="false">
|
|
|
|
|
+ <el-form ref="authFormRef" :model="authForm" :rules="authRules" label-width="100px" label-position="left">
|
|
|
|
|
+ <el-form-item label="姓名" prop="name">
|
|
|
|
|
+ <el-input v-model="authForm.name" placeholder="请输入姓名" clearable />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="身份证号码" prop="idCard">
|
|
|
|
|
+ <el-input v-model="authForm.idCard" placeholder="请输入身份证号码" clearable maxlength="18" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <span class="dialog-footer">
|
|
|
|
|
+ <el-button @click="handleCancel">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" :loading="loading" @click="handleConfirm">确认</el-button>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
|
|
|
<!-- 提现密码 -->
|
|
<!-- 提现密码 -->
|
|
|
<div class="content-section" v-if="activeTab === 'withdrawPassword'">
|
|
<div class="content-section" v-if="activeTab === 'withdrawPassword'">
|
|
@@ -163,10 +187,10 @@
|
|
|
</div>
|
|
</div>
|
|
|
</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"> 添加支付宝账号 </el-button> -->
|
|
|
|
|
+ <!-- <div class="zfb-wrapper">
|
|
|
<div class="zfb-left">
|
|
<div class="zfb-left">
|
|
|
<el-image :src="zfbIcon" class="zfbIcon" />
|
|
<el-image :src="zfbIcon" class="zfbIcon" />
|
|
|
<div>
|
|
<div>
|
|
@@ -180,10 +204,10 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
|
|
|
|
|
<!-- 忘记密码对话框 -->
|
|
<!-- 忘记密码对话框 -->
|
|
|
- <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
|
|
<el-form
|
|
|
ref="forgotPasswordFormRef"
|
|
ref="forgotPasswordFormRef"
|
|
|
:model="forgotPasswordForm"
|
|
:model="forgotPasswordForm"
|
|
@@ -214,29 +238,11 @@
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 实名认证对话框 -->
|
|
|
|
|
- <el-dialog v-model="dialogVisible" title="实名认证" width="500px" :close-on-click-modal="false">
|
|
|
|
|
- <el-form ref="authFormRef" :model="authForm" :rules="authRules" label-width="100px" label-position="left">
|
|
|
|
|
- <el-form-item label="姓名" prop="name">
|
|
|
|
|
- <el-input v-model="authForm.name" placeholder="请输入姓名" clearable />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="身份证号码" prop="idCard">
|
|
|
|
|
- <el-input v-model="authForm.idCard" placeholder="请输入身份证号码" clearable maxlength="18" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <span class="dialog-footer">
|
|
|
|
|
- <el-button @click="handleCancel">取消</el-button>
|
|
|
|
|
- <el-button type="primary" :loading="loading" @click="handleConfirm">确认</el-button>
|
|
|
|
|
- </span>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
+ </el-dialog> -->
|
|
|
|
|
|
|
|
<!--添加支付宝账号--->
|
|
<!--添加支付宝账号--->
|
|
|
- <el-dialog v-model="dialogVisibleZFB" title="添加支付宝账号" width="500px" :close-on-click-modal="false">
|
|
|
|
|
- <el-form ref="authFormRef" :model="authForm" :rules="authRules" label-width="100px" label-position="left">
|
|
|
|
|
|
|
+ <!-- <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-form-item label="支付宝账号" prop="name">
|
|
|
<el-input v-model="authForm.zfbName" placeholder="请输入支付宝账号" clearable />
|
|
<el-input v-model="authForm.zfbName" placeholder="请输入支付宝账号" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -247,29 +253,29 @@
|
|
|
<el-button type="primary" :loading="loading" @click="handleConfirmZFB">确认</el-button>
|
|
<el-button type="primary" :loading="loading" @click="handleConfirmZFB">确认</el-button>
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
+ </el-dialog> -->
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref, reactive, computed } from "vue";
|
|
|
|
|
|
|
+import { ref, reactive, computed, onMounted } from "vue";
|
|
|
import { useRouter } from "vue-router";
|
|
import { useRouter } from "vue-router";
|
|
|
import { ElMessage, type FormInstance, type FormRules } from "element-plus";
|
|
import { ElMessage, type FormInstance, type FormRules } from "element-plus";
|
|
|
|
|
+import { verifyIdInfo, checkPayPassword } from "@/api/modules/homeEntry";
|
|
|
import { localGet } from "@/utils/index";
|
|
import { localGet } from "@/utils/index";
|
|
|
import homeIcon from "../../assets/images/home-icon.png";
|
|
import homeIcon from "../../assets/images/home-icon.png";
|
|
|
import zfbIcon from "../../assets/financial/zfb-icon.png";
|
|
import zfbIcon from "../../assets/financial/zfb-icon.png";
|
|
|
-
|
|
|
|
|
|
|
+const userInfo = localGet("geeker-user").userInfo;
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const activeTab = ref("realName");
|
|
const activeTab = ref("realName");
|
|
|
const dialogVisible = ref(false);
|
|
const dialogVisible = ref(false);
|
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
|
//实名认证
|
|
//实名认证
|
|
|
-const goAuth = ref(true);
|
|
|
|
|
|
|
+const goAuth = ref(!userInfo.idCard);
|
|
|
const authFormRef = ref<FormInstance>();
|
|
const authFormRef = ref<FormInstance>();
|
|
|
const authForm = reactive({
|
|
const authForm = reactive({
|
|
|
name: "",
|
|
name: "",
|
|
|
- idCard: "",
|
|
|
|
|
- zfbName: ""
|
|
|
|
|
|
|
+ idCard: ""
|
|
|
});
|
|
});
|
|
|
// 实名认证表单验证规则
|
|
// 实名认证表单验证规则
|
|
|
const authRules = reactive<FormRules>({
|
|
const authRules = reactive<FormRules>({
|
|
@@ -284,25 +290,47 @@ const authRules = reactive<FormRules>({
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
});
|
|
});
|
|
|
|
|
+//去实名认证
|
|
|
|
|
+const handleGoAuth = () => {
|
|
|
|
|
+ // 打开实名认证对话框
|
|
|
|
|
+ dialogVisible.value = true;
|
|
|
|
|
+ // 重置表单
|
|
|
|
|
+ if (authFormRef.value) {
|
|
|
|
|
+ authFormRef.value.resetFields();
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
//实名认证 确认
|
|
//实名认证 确认
|
|
|
const handleConfirm = async () => {
|
|
const handleConfirm = async () => {
|
|
|
if (!authFormRef.value) return;
|
|
if (!authFormRef.value) return;
|
|
|
|
|
|
|
|
// 表单验证
|
|
// 表单验证
|
|
|
- await authFormRef.value.validate(valid => {
|
|
|
|
|
|
|
+ await authFormRef.value.validate(async valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
- // 这里可以调用API提交实名认证信息
|
|
|
|
|
- // 模拟API调用
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ name: authForm.name,
|
|
|
|
|
+ idCard: authForm.idCard,
|
|
|
|
|
+ appType: 1
|
|
|
|
|
+ };
|
|
|
|
|
+ const res: any = await verifyIdInfo(params);
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ if (res && res.code == 200) {
|
|
|
|
|
+ ElMessage.success(res.msg || "实名认证提交成功");
|
|
|
|
|
+ dialogVisible.value = false;
|
|
|
|
|
+ goAuth.value = false;
|
|
|
|
|
+ // 重置表单
|
|
|
|
|
+ authFormRef.value?.resetFields();
|
|
|
|
|
+ // 这里可以更新认证状态或刷新页面数据
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage.error(res.msg || "实名认证失败,请重试");
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error("实名认证失败:", error);
|
|
|
|
|
+ ElMessage.error("实名认证失败,请重试");
|
|
|
|
|
+ } finally {
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
|
- ElMessage.success("实名认证提交成功");
|
|
|
|
|
- dialogVisible.value = false;
|
|
|
|
|
- goAuth.value = false;
|
|
|
|
|
- // 重置表单
|
|
|
|
|
- authFormRef.value?.resetFields();
|
|
|
|
|
- // 这里可以更新认证状态或刷新页面数据
|
|
|
|
|
- }, 1000);
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
@@ -396,6 +424,33 @@ const forgotPasswordForm = reactive({
|
|
|
const forgotPasswordRules: FormRules = {
|
|
const forgotPasswordRules: FormRules = {
|
|
|
verificationCode: [{ required: true, message: "请输入验证码", trigger: "blur" }]
|
|
verificationCode: [{ required: true, message: "请输入验证码", trigger: "blur" }]
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+// 检查提现密码并自动跳转
|
|
|
|
|
+const checkWithdrawPassword = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ // 如果已实名认证,检查是否设置了提现密码
|
|
|
|
|
+ if (userInfo.idCard) {
|
|
|
|
|
+ const param = {
|
|
|
|
|
+ storeUserId: userInfo.id
|
|
|
|
|
+ };
|
|
|
|
|
+ const res: any = await checkPayPassword(param as any);
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ // 如果未设置提现密码,自动跳转到提现密码标签页
|
|
|
|
|
+ if (res.data.data == "false") {
|
|
|
|
|
+ activeTab.value = "withdrawPassword";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error("检查提现密码失败:", error);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 页面加载时检查
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ checkWithdrawPassword();
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
// 获取用户手机号
|
|
// 获取用户手机号
|
|
|
const userPhone = computed(() => {
|
|
const userPhone = computed(() => {
|
|
|
return localGet("iphone") || localGet("geeker-user")?.userInfo?.phone || "";
|
|
return localGet("iphone") || localGet("geeker-user")?.userInfo?.phone || "";
|
|
@@ -414,15 +469,6 @@ const handleTabClick = (tab: any) => {
|
|
|
// 这里可以根据需要实现路由跳转或内容切换
|
|
// 这里可以根据需要实现路由跳转或内容切换
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const handleGoAuth = () => {
|
|
|
|
|
- // 打开实名认证对话框
|
|
|
|
|
- dialogVisible.value = true;
|
|
|
|
|
- // 重置表单
|
|
|
|
|
- if (authFormRef.value) {
|
|
|
|
|
- authFormRef.value.resetFields();
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
const handleCancel = () => {
|
|
const handleCancel = () => {
|
|
|
dialogVisible.value = false;
|
|
dialogVisible.value = false;
|
|
|
// 重置表单
|
|
// 重置表单
|
|
@@ -488,6 +534,9 @@ const handleCancel = () => {
|
|
|
background: #f81515;
|
|
background: #f81515;
|
|
|
border-radius: 39px;
|
|
border-radius: 39px;
|
|
|
}
|
|
}
|
|
|
|
|
+ .status-badge-success {
|
|
|
|
|
+ background: #6c8ff8;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -555,7 +604,6 @@ const handleCancel = () => {
|
|
|
background-color: #ffffff;
|
|
background-color: #ffffff;
|
|
|
.content-wrapper-realName {
|
|
.content-wrapper-realName {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- border: 1px solid red;
|
|
|
|
|
.goAuthBtn {
|
|
.goAuthBtn {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
@@ -564,7 +612,6 @@ const handleCancel = () => {
|
|
|
.auth-div {
|
|
.auth-div {
|
|
|
padding-top: 10px;
|
|
padding-top: 10px;
|
|
|
padding-left: 41px;
|
|
padding-left: 41px;
|
|
|
- border: 1px solid red;
|
|
|
|
|
.auth-row {
|
|
.auth-row {
|
|
|
padding: 10px 0;
|
|
padding: 10px 0;
|
|
|
}
|
|
}
|