Commit 18a258b1 authored by zhangsan's avatar zhangsan

1

parent adbcb2f6
......@@ -19,13 +19,16 @@ declare module 'vue' {
VanButton: typeof import('vant/es')['Button']
VanCell: typeof import('vant/es')['Cell']
VanCellGroup: typeof import('vant/es')['CellGroup']
VanDialog: typeof import('vant/es')['Dialog']
VanEmpty: typeof import('vant/es')['Empty']
VanField: typeof import('vant/es')['Field']
VanForm: typeof import('vant/es')['Form']
VanIcon: typeof import('vant/es')['Icon']
VanList: typeof import('vant/es')['List']
VanLoading: typeof import('vant/es')['Loading']
VanNavBar: typeof import('vant/es')['NavBar']
VanPopup: typeof import('vant/es')['Popup']
VanProgress: typeof import('vant/es')['Progress']
VanRadio: typeof import('vant/es')['Radio']
VanRadioGroup: typeof import('vant/es')['RadioGroup']
VanSwipe: typeof import('vant/es')['Swipe']
......@@ -39,11 +42,10 @@ declare module 'vue' {
VarIcon: typeof import('@varlet/ui')['Icon']
VarInput: typeof import('@varlet/ui')['Input']
VarOption: typeof import('@varlet/ui')['Option']
VarPopup: typeof import('@varlet/ui')['Popup']
VarPullRefresh: typeof import('@varlet/ui')['PullRefresh']
VarRadio: typeof import('@varlet/ui')['Radio']
VarRadioGroup: typeof import('@varlet/ui')['RadioGroup']
VarSelect: typeof import('@varlet/ui')['Select']
VarSpace: typeof import('@varlet/ui')['Space']
VarTab: typeof import('@varlet/ui')['Tab']
VarTabs: typeof import('@varlet/ui')['Tabs']
}
......
......@@ -4,6 +4,7 @@
<div v-if="visible" class="guide-modal-overlay" @click.self="handleClose">
<Transition :name="transitionName" mode="out-in" @before-leave="beforeLeave" @after-leave="afterLeave">
<div class="guide-modal" :key="currentIndex">
<!-- <var-icon name="close-circle-outline" class="close-icon" size="36" @click="handleClose" /> -->
<!-- 使用插槽或v-html展示内容 -->
<div class="guide-content">
<slot :index="currentIndex">
......@@ -33,7 +34,6 @@
const props = defineProps<Props>()
const emit = defineEmits(['update:modelValue'])
const currentIndex = ref(0)
const slideDirection = ref('next')
const transitionName = computed(() => `slide-${slideDirection.value}`)
......@@ -95,8 +95,13 @@
display: flex;
flex-direction: column;
overflow: hidden; // 防止内容溢出
position: relative;
}
.close-icon{
position: absolute;
color: #fff;
top: 0;
}
.guide-content {
flex: 1;
overflow-y: auto; // 内容过多时可滚动
......@@ -109,16 +114,22 @@
}
.guide-button {
width: 100%; // 按钮宽度设为90%
position: absolute;
bottom: 0px;
left: 50%;
transform: translateX(-50%);
width: 60%; // 按钮宽度设为90%
margin: 0 auto;
display: block;
background: red;
background: #e4b571;
color: #fff;
border: none;
padding: 12px 0;
font-size: 16px;
cursor: pointer;
transition: opacity 0.3s;
border-radius: 10px;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
}
// 淡入淡出动画
......
......@@ -179,11 +179,9 @@ const submitPay = async () => {
const payData = {
payType: selectedMethod.value,
amount: payParams.value.amount,
productCode: payParams.value.payType,
a1: payParams.value.a1,
a2: payParams.value.a2,
a3: payParams.value.a3,
a4: payParams.value.a4,
a5: payParams.value.a5,
}
const res = await request.post('/business/businessPayOrder/add', payData)
if (res.code === 200) {
......
......@@ -172,7 +172,8 @@ onMounted(() => {
<div class="header">
<div class="checkin-info">
<h4>累计签到 <span>{{ checkinDays }}</span></h4>
<!-- <p>每日签到奖励10000元</p> -->
<p>1、每日签到奖励20枚国币</p>
<p>2、签到满30天免费绑定便捷支付</p>
</div>
<!-- <div class="actions">
<span v-if="supplementary" class="makeup-btn" @click="$emit('shift')">
......
......@@ -39,7 +39,7 @@ const tabItems = [
{ name: 'home', path: '/home', title: '首页', icon: tab1, iconActive: tab1Active },
{ name: 'smtx', path: '/smtx', title: '实名提现', icon: tab2, iconActive: tab2Active },
{ name: 'gbjy', path: '/gbjy', title: '国币交易', icon: tab3, iconActive: tab3Active },
{ name: 'gbcp', path: '/gbcp', title: '国币持仓', icon: tab4, iconActive: tab4Active },
// { name: 'gbcp', path: '/gbcp', title: '国币持仓', icon: tab4, iconActive: tab4Active },
{ name: 'user', path: '/user', title: '我的', icon: tab4, iconActive: tab4Active },
];
......
src/static/cbg.png

317 KB | W: | H:

src/static/cbg.png

236 KB | W: | H:

src/static/cbg.png
src/static/cbg.png
src/static/cbg.png
src/static/cbg.png
  • 2-up
  • Swipe
  • Onion skin
src/static/cbg1.png

317 KB | W: | H:

src/static/cbg1.png

236 KB | W: | H:

src/static/cbg1.png
src/static/cbg1.png
src/static/cbg1.png
src/static/cbg1.png
  • 2-up
  • Swipe
  • Onion skin
src/static/common/1.png

19.1 KB | W: | H:

src/static/common/1.png

13.6 KB | W: | H:

src/static/common/1.png
src/static/common/1.png
src/static/common/1.png
src/static/common/1.png
  • 2-up
  • Swipe
  • Onion skin
src/static/common/2.png

25.7 KB | W: | H:

src/static/common/2.png

25.8 KB | W: | H:

src/static/common/2.png
src/static/common/2.png
src/static/common/2.png
src/static/common/2.png
  • 2-up
  • Swipe
  • Onion skin
src/static/common/3.png

603 Bytes | W: | H:

src/static/common/3.png

547 Bytes | W: | H:

src/static/common/3.png
src/static/common/3.png
src/static/common/3.png
src/static/common/3.png
  • 2-up
  • Swipe
  • Onion skin
src/static/common/4.png

349 Bytes | W: | H:

src/static/common/4.png

319 Bytes | W: | H:

src/static/common/4.png
src/static/common/4.png
src/static/common/4.png
src/static/common/4.png
  • 2-up
  • Swipe
  • Onion skin
src/static/common/44.png

71.3 KB | W: | H:

src/static/common/44.png

61.4 KB | W: | H:

src/static/common/44.png
src/static/common/44.png
src/static/common/44.png
src/static/common/44.png
  • 2-up
  • Swipe
  • Onion skin
src/static/common/77.png

19.4 KB | W: | H:

src/static/common/77.png

17.7 KB | W: | H:

src/static/common/77.png
src/static/common/77.png
src/static/common/77.png
src/static/common/77.png
  • 2-up
  • Swipe
  • Onion skin
src/static/common/azxz.png

27.7 KB | W: | H:

src/static/common/azxz.png

26.8 KB | W: | H:

src/static/common/azxz.png
src/static/common/azxz.png
src/static/common/azxz.png
src/static/common/azxz.png
  • 2-up
  • Swipe
  • Onion skin
src/static/common/iosxz.png

26.9 KB | W: | H:

src/static/common/iosxz.png

24.7 KB | W: | H:

src/static/common/iosxz.png
src/static/common/iosxz.png
src/static/common/iosxz.png
src/static/common/iosxz.png
  • 2-up
  • Swipe
  • Onion skin
src/static/common/tip.png

5.66 KB | W: | H:

src/static/common/tip.png

5.23 KB | W: | H:

src/static/common/tip.png
src/static/common/tip.png
src/static/common/tip.png
src/static/common/tip.png
  • 2-up
  • Swipe
  • Onion skin
src/static/commonbg.png

317 KB | W: | H:

src/static/commonbg.png

236 KB | W: | H:

src/static/commonbg.png
src/static/commonbg.png
src/static/commonbg.png
src/static/commonbg.png
  • 2-up
  • Swipe
  • Onion skin
src/static/dialog.png

236 KB | W: | H:

src/static/dialog.png

189 KB | W: | H:

src/static/dialog.png
src/static/dialog.png
src/static/dialog.png
src/static/dialog.png
  • 2-up
  • Swipe
  • Onion skin
src/static/gbjy/1.png

13.7 KB | W: | H:

src/static/gbjy/1.png

9.91 KB | W: | H:

src/static/gbjy/1.png
src/static/gbjy/1.png
src/static/gbjy/1.png
src/static/gbjy/1.png
  • 2-up
  • Swipe
  • Onion skin
src/static/gbjy/2.png

3.08 KB | W: | H:

src/static/gbjy/2.png

2.65 KB | W: | H:

src/static/gbjy/2.png
src/static/gbjy/2.png
src/static/gbjy/2.png
src/static/gbjy/2.png
  • 2-up
  • Swipe
  • Onion skin
src/static/gbjy/3.png

5.88 KB | W: | H:

src/static/gbjy/3.png

1.34 KB | W: | H:

src/static/gbjy/3.png
src/static/gbjy/3.png
src/static/gbjy/3.png
src/static/gbjy/3.png
  • 2-up
  • Swipe
  • Onion skin
src/static/gbjy/4.png

4.8 KB | W: | H:

src/static/gbjy/4.png

4.2 KB | W: | H:

src/static/gbjy/4.png
src/static/gbjy/4.png
src/static/gbjy/4.png
src/static/gbjy/4.png
  • 2-up
  • Swipe
  • Onion skin
src/static/gbjy/5.png

80.1 KB | W: | H:

src/static/gbjy/5.png

62.7 KB | W: | H:

src/static/gbjy/5.png
src/static/gbjy/5.png
src/static/gbjy/5.png
src/static/gbjy/5.png
  • 2-up
  • Swipe
  • Onion skin
src/static/home/2.png

317 KB | W: | H:

src/static/home/2.png

236 KB | W: | H:

src/static/home/2.png
src/static/home/2.png
src/static/home/2.png
src/static/home/2.png
  • 2-up
  • Swipe
  • Onion skin
src/static/home/3.png

75.9 KB | W: | H:

src/static/home/3.png

57.8 KB | W: | H:

src/static/home/3.png
src/static/home/3.png
src/static/home/3.png
src/static/home/3.png
  • 2-up
  • Swipe
  • Onion skin
src/static/home/4.png

4 KB | W: | H:

src/static/home/4.png

3.66 KB | W: | H:

src/static/home/4.png
src/static/home/4.png
src/static/home/4.png
src/static/home/4.png
  • 2-up
  • Swipe
  • Onion skin
src/static/home/5.png

21.3 KB | W: | H:

src/static/home/5.png

15 KB | W: | H:

src/static/home/5.png
src/static/home/5.png
src/static/home/5.png
src/static/home/5.png
  • 2-up
  • Swipe
  • Onion skin
src/static/invite/1.png

66.7 KB | W: | H:

src/static/invite/1.png

60.6 KB | W: | H:

src/static/invite/1.png
src/static/invite/1.png
src/static/invite/1.png
src/static/invite/1.png
  • 2-up
  • Swipe
  • Onion skin
src/static/invite/2.png

294 KB | W: | H:

src/static/invite/2.png

209 KB | W: | H:

src/static/invite/2.png
src/static/invite/2.png
src/static/invite/2.png
src/static/invite/2.png
  • 2-up
  • Swipe
  • Onion skin
src/static/invite/3.png

23.7 KB | W: | H:

src/static/invite/3.png

25.9 KB | W: | H:

src/static/invite/3.png
src/static/invite/3.png
src/static/invite/3.png
src/static/invite/3.png
  • 2-up
  • Swipe
  • Onion skin
src/static/invite/4.png

25.2 KB | W: | H:

src/static/invite/4.png

26.6 KB | W: | H:

src/static/invite/4.png
src/static/invite/4.png
src/static/invite/4.png
src/static/invite/4.png
  • 2-up
  • Swipe
  • Onion skin
src/static/invite/5.png

19.7 KB | W: | H:

src/static/invite/5.png

22.2 KB | W: | H:

src/static/invite/5.png
src/static/invite/5.png
src/static/invite/5.png
src/static/invite/5.png
  • 2-up
  • Swipe
  • Onion skin
src/static/login.png

352 KB | W: | H:

src/static/login.png

242 KB | W: | H:

src/static/login.png
src/static/login.png
src/static/login.png
src/static/login.png
  • 2-up
  • Swipe
  • Onion skin
src/static/loginbtn.png

3.37 KB | W: | H:

src/static/loginbtn.png

2.82 KB | W: | H:

src/static/loginbtn.png
src/static/loginbtn.png
src/static/loginbtn.png
src/static/loginbtn.png
  • 2-up
  • Swipe
  • Onion skin
src/static/smtx/fbg.png

49.7 KB | W: | H:

src/static/smtx/fbg.png

36.7 KB | W: | H:

src/static/smtx/fbg.png
src/static/smtx/fbg.png
src/static/smtx/fbg.png
src/static/smtx/fbg.png
  • 2-up
  • Swipe
  • Onion skin
src/static/smtx/sub.png

7.38 KB | W: | H:

src/static/smtx/sub.png

7.04 KB | W: | H:

src/static/smtx/sub.png
src/static/smtx/sub.png
src/static/smtx/sub.png
src/static/smtx/sub.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tabbar/1.png

992 Bytes | W: | H:

src/static/tabbar/1.png

941 Bytes | W: | H:

src/static/tabbar/1.png
src/static/tabbar/1.png
src/static/tabbar/1.png
src/static/tabbar/1.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tabbar/2.png

1015 Bytes | W: | H:

src/static/tabbar/2.png

922 Bytes | W: | H:

src/static/tabbar/2.png
src/static/tabbar/2.png
src/static/tabbar/2.png
src/static/tabbar/2.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tabbar/3.png

600 Bytes | W: | H:

src/static/tabbar/3.png

515 Bytes | W: | H:

src/static/tabbar/3.png
src/static/tabbar/3.png
src/static/tabbar/3.png
src/static/tabbar/3.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tabbar/4.png

524 Bytes | W: | H:

src/static/tabbar/4.png

448 Bytes | W: | H:

src/static/tabbar/4.png
src/static/tabbar/4.png
src/static/tabbar/4.png
src/static/tabbar/4.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tabbar/a1.png

1.04 KB | W: | H:

src/static/tabbar/a1.png

879 Bytes | W: | H:

src/static/tabbar/a1.png
src/static/tabbar/a1.png
src/static/tabbar/a1.png
src/static/tabbar/a1.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tabbar/a2.png

1.08 KB | W: | H:

src/static/tabbar/a2.png

866 Bytes | W: | H:

src/static/tabbar/a2.png
src/static/tabbar/a2.png
src/static/tabbar/a2.png
src/static/tabbar/a2.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tabbar/a3.png

614 Bytes | W: | H:

src/static/tabbar/a3.png

489 Bytes | W: | H:

src/static/tabbar/a3.png
src/static/tabbar/a3.png
src/static/tabbar/a3.png
src/static/tabbar/a3.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tabbar/a4.png

590 Bytes | W: | H:

src/static/tabbar/a4.png

497 Bytes | W: | H:

src/static/tabbar/a4.png
src/static/tabbar/a4.png
src/static/tabbar/a4.png
src/static/tabbar/a4.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/1.png

4.32 KB | W: | H:

src/static/user/1.png

3.7 KB | W: | H:

src/static/user/1.png
src/static/user/1.png
src/static/user/1.png
src/static/user/1.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/2.png

15.7 KB | W: | H:

src/static/user/2.png

15.9 KB | W: | H:

src/static/user/2.png
src/static/user/2.png
src/static/user/2.png
src/static/user/2.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/22.png

499 Bytes | W: | H:

src/static/user/22.png

449 Bytes | W: | H:

src/static/user/22.png
src/static/user/22.png
src/static/user/22.png
src/static/user/22.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/23.png

490 Bytes | W: | H:

src/static/user/23.png

430 Bytes | W: | H:

src/static/user/23.png
src/static/user/23.png
src/static/user/23.png
src/static/user/23.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/24.png

395 Bytes | W: | H:

src/static/user/24.png

344 Bytes | W: | H:

src/static/user/24.png
src/static/user/24.png
src/static/user/24.png
src/static/user/24.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/25.png

507 Bytes | W: | H:

src/static/user/25.png

409 Bytes | W: | H:

src/static/user/25.png
src/static/user/25.png
src/static/user/25.png
src/static/user/25.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/26.png

497 Bytes | W: | H:

src/static/user/26.png

460 Bytes | W: | H:

src/static/user/26.png
src/static/user/26.png
src/static/user/26.png
src/static/user/26.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/27.png

421 Bytes | W: | H:

src/static/user/27.png

364 Bytes | W: | H:

src/static/user/27.png
src/static/user/27.png
src/static/user/27.png
src/static/user/27.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/28.png

549 Bytes | W: | H:

src/static/user/28.png

470 Bytes | W: | H:

src/static/user/28.png
src/static/user/28.png
src/static/user/28.png
src/static/user/28.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/29.png

335 Bytes | W: | H:

src/static/user/29.png

278 Bytes | W: | H:

src/static/user/29.png
src/static/user/29.png
src/static/user/29.png
src/static/user/29.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/4.png

868 Bytes | W: | H:

src/static/user/4.png

767 Bytes | W: | H:

src/static/user/4.png
src/static/user/4.png
src/static/user/4.png
src/static/user/4.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/mx.png

1.12 KB | W: | H:

src/static/user/mx.png

971 Bytes | W: | H:

src/static/user/mx.png
src/static/user/mx.png
src/static/user/mx.png
src/static/user/mx.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/out.png

4.97 KB | W: | H:

src/static/user/out.png

4.77 KB | W: | H:

src/static/user/out.png
src/static/user/out.png
src/static/user/out.png
src/static/user/out.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/qbbg.png

3.44 KB | W: | H:

src/static/user/qbbg.png

2.88 KB | W: | H:

src/static/user/qbbg.png
src/static/user/qbbg.png
src/static/user/qbbg.png
src/static/user/qbbg.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/qbc.png

2.09 KB | W: | H:

src/static/user/qbc.png

2.06 KB | W: | H:

src/static/user/qbc.png
src/static/user/qbc.png
src/static/user/qbc.png
src/static/user/qbc.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/tx.png

2.61 KB | W: | H:

src/static/user/tx.png

2.17 KB | W: | H:

src/static/user/tx.png
src/static/user/tx.png
src/static/user/tx.png
src/static/user/tx.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/user.png

2.38 KB | W: | H:

src/static/user/user.png

1.97 KB | W: | H:

src/static/user/user.png
src/static/user/user.png
src/static/user/user.png
src/static/user/user.png
  • 2-up
  • Swipe
  • Onion skin
src/static/user/zc.png

5.6 KB | W: | H:

src/static/user/zc.png

5.38 KB | W: | H:

src/static/user/zc.png
src/static/user/zc.png
src/static/user/zc.png
src/static/user/zc.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -50,6 +50,10 @@ const titleMap: Record<string, string> = {
smtx: "实名提现",
gbjy: "国币交易所",
gbcp: "国币产品",
bindInfo: "绑定信息",
bindDetail: "绑定详情",
tx: "现金提现双向验证",
chicRecord: "持仓记录",
};
// 处理路径转换为路由配置
......
......@@ -3,6 +3,7 @@
*/
import router from '@/router'
export const isEealNameAuthentication = () => {
return true
const userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}')
if(userInfo?.sysUser?.identityId){
return true
......@@ -69,7 +70,7 @@ interface IDCardValidationResult {
if (len < 16 || len > 19) {
return false;
}
return true
// 3. Luhn 算法验证
let sum = 0;
let isEven = false;
......
<template>
<div class="position-record">
<div class="record-list" v-if="recordList.length > 0">
<var-pull-refresh v-model="refreshing" @refresh="onRefresh">
<div class="record-item" v-for="item in recordList" :key="item.id">
<div class="item-content">
<div class="info-row">
<span class="label">订单号:</span>
<span class="value">{{ item.id }}</span>
</div>
<div class="info-row">
<span class="label">购买时间:</span>
<span class="value">{{ formatDate(item.createTime) }}</span>
</div>
<div class="info-row">
<span class="label">产品名称:</span>
<span class="value">{{ item?.businessProduct?.name }}</span>
</div>
<div class="info-row">
<span class="label">金额:</span>
<span class="value price">{{ item?.businessProduct?.amount }}</span>
</div>
<div class="info-row">
<span class="label">国币:</span>
<span class="value price">{{ item?.businessProduct?.cardLimit }}</span>
</div>
<div class="info-row">
<span class="label">钱包余额:</span>
<span class="value price">{{ item?.businessProduct?.bondFund }}</span>
</div>
<div class="info-row">
<span class="label">每日收益:</span>
<span class="value price">{{ item?.businessProduct?.dayAmount }}</span>
</div>
</div>
</div>
</var-pull-refresh>
</div>
<div class="empty-list" v-else>
<van-empty description="暂无记录" />
</div>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import request from '@/utils/request'
const recordList = ref([])
const loading = ref(false)
const finished = ref(false)
const refreshing = ref(false)
const formatDate = (timestamp: string | number) => {
const date = new Date(timestamp)
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')} ${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`
}
const getRecordList = () => {
request.get('/business/businessCpqrs/list', {
params: {
pageNo: 1,
pageSize: 100
}
}).then(res => {
console.log(res)
if (res?.code === 200) {
recordList.value = res.result.records
finished.value = true
} else {
showToast('获取数据失败')
}
loading.value = false
refreshing.value = false
}).catch(() => {
loading.value = false
refreshing.value = false
showToast('获取数据失败')
})
}
const onRefresh = () => {
finished.value = false
recordList.value = []
getRecordList()
}
// 初始加载
getRecordList()
</script>
<style lang="scss" scoped>
.position-record {
height: inherit;
background: url('@/static/home/2.png') no-repeat;
background-size: 100% 100%;
padding-bottom: 20px;
box-sizing: border-box;
overflow-y: auto;
.header-section {
background: linear-gradient(to right, #1989fa, #39b9fa);
padding: 15px 0;
.header {
color: #fff;
font-size: 18px;
text-align: center;
font-weight: bold;
}
}
.empty-list {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
:deep(.van-empty__description) {
color: #000;
}
.record-list {
padding: 10px;
.record-item {
background: #fff;
border-radius: 8px;
margin-bottom: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
.item-content {
padding: 15px;
.info-row {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
font-size: 14px;
&:last-child {
margin-bottom: 0;
}
.label {
color: #666;
}
.value {
color: #333;
&.price {
color: #f44336;
font-weight: bold;
}
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="smtx">
<div class="header-section">
<div class="smtx-header">国币强化管理</div>
</div>
<div class="balance-card">
<div class="balance-content">
<div class="balance-amount">
<span class="label">零钱余额</span>
<span class="amount">{{ userData?.q3 || 0.00 }}</span>
</div>
<var-button class="position-btn" size="small" type="danger" @click="handlePosition">持仓记录</var-button>
<div class="action-buttons">
<var-button type="primary" size="small" block @click="handleDetail('q3')">
明细
</var-button>
<var-button type="danger" size="small" block @click="handleWithdraw(userData?.q3, 'q3', '现金余额')">
提现
</var-button>
</div>
</div>
</div>
<div class="product">
<div class="product-item">
<template v-for="item in listApp" :key="item.id">
......@@ -17,6 +37,10 @@
<div>国币</div>
<div class="price">{{ item.cardLimit }}</div>
</div>
<div class="item">
<div>钱包余额</div>
<div class="price">{{ item.bondFund }}</div>
</div>
<div class="item">
<div>每日收益</div>
<div class="price">{{ item.dayAmount }}</div>
......@@ -36,11 +60,15 @@
<script lang="ts" setup>
import payUp from '@/components/payUp.vue'
import request from '@/utils/request'
import { useRouter } from 'vue-router'
import { isEealNameAuthentication } from '@/utils/userInfoCheck'
const userData = ref(JSON.parse(sessionStorage.getItem('userInfo') || '{}'))
const router = useRouter()
const listApp = ref([])
const payUpRef = ref()
const getListApp = () => {
request.get('/business/businessProduct/list').then(res => {
if(res.code === 200) {
if (res.code === 200) {
listApp.value = res.result.records
}
})
......@@ -48,15 +76,31 @@ const getListApp = () => {
getListApp()
const handleBuy = (item: any) => {
payUpRef.value.open({
title: '国币强化管理',
payTitle: item.name,
amount: item.amount,
amount2: item.dayAmount,
amount3: item.cardLimit,
amount4: item.id,
amount5: item.status,
a3: '2',
a4:item.id
})
}
const handleDetail = (type: string) => {
router.push(`/user/zjmx?tab=${type}`)
}
const handleWithdraw = (amount: number, type: string, label: string) => {
if (amount && amount > 0) {
if (!isEealNameAuthentication()) {
return
}
router.push(`/user/tixian?balance=${amount}&type=${type}&title=${label}`);
} else {
showFailToast("余额不足");
}
}
const handlePosition = () => {
router.push('/gbcp/chicRecord')
}
</script>
<style lang="scss" scoped>
......@@ -70,15 +114,63 @@ const handleBuy = (item: any) => {
padding: 0px 20px 50px;
overflow-y: auto;
.header-section {
padding: 20px 0 10px;
.smtx-header {
font-size: 16px;
color: #fff;
text-align: center;
padding: 20px 0;
margin-bottom: 15px;
}
}
.balance-card {
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(10px);
border-radius: 10px;
position: relative;
.position-btn{
position: absolute;
right: 10px;
top: 10px;
}
.balance-content {
padding: 10px;
.balance-amount {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 15px;
.label {
font-size: 14px;
color: #666;
margin-bottom: 8px;
}
.amount {
font-size: 24px;
font-weight: bold;
color: #333;
}
}
}
}
.action-buttons {
display: flex;
width: 100%;
box-sizing: border-box;
padding: 0 40px;
gap: 20px;
}
.product {
margin-top: 40px;
margin-top: 10px;
width: 100%;
box-sizing: border-box;
......
<template>
<div class="smtx">
<div class="smtx-header">国币交易所</div>
<div class="smtx-title">目前币值:<span>1000</span>
<div class="smtx-title">目前币值:<span>{{ listApp[listApp.length - 1]?.a4 }}</span>
<van-icon style="transform: rotate(180deg);" name="down" />
</div>
<div class="card">
<div ref="chartRef" style="width: 100%; height: 260px"></div>
</div>
<div class="card1">
<div class="card1-title">可出售国币数量:{{ userInfo?.q1 || 0 }}</div>
<var-input size="small" type="number" variant="outlined" v-model="username" placeholder="请输入数量" />
<var-input size="small" readonly style="margin-top: 10px;" variant="outlined"
v-model="password" placeholder="可获得现金余额" />
......@@ -25,20 +26,32 @@ import { ref, onMounted, onUnmounted } from 'vue';
import * as echarts from 'echarts';
import request from '@/utils/request';
import { useRouter } from 'vue-router';
const userInfo = ref(JSON.parse(sessionStorage.getItem('userInfo') || '{}'))
const router = useRouter();
const username = ref('');
const password = ref('');
watch(username, (newVal) => {
password.value = ((newVal|| 0) * (listApp.value[listApp.value.length - 1].a4||0)).toFixed(2)
password.value = ((newVal|| 0) * (listApp.value[listApp.value.length - 1].a4||0))
})
const chartRef = ref<HTMLElement | null>(null);
let chart: echarts.ECharts | null = null;
const handleSell = () => {
if(username.value && password.value) {
if(username.value > userInfo.value?.q1) {
showFailToast('抛售数量不能大于可出售国币数量')
return
}
if(username.value <= 0) {
showFailToast('每次最低抛售数量1枚')
return
}
if(username.value >200) {
showFailToast('每天最高 可售200枚国币')
return
}
request.post('/business/businessWallet/transferAccountsPs', {
amount: username.value,
amount2: password.value
amount: Number(username.value),
amount2: listApp.value[listApp.value.length - 1].a4||0
}).then(res => {
if(res.code === 200) {
showSuccessToast('抛售成功')
......@@ -66,10 +79,17 @@ interface AppData {
const listApp = ref<AppData[]>([]);
// 修复类型错误,添加类型定义
interface ApiResponse<T> {
code: number;
result: T;
message?: string;
}
const getListApp = () => {
request.get<{ code: number; result: AppData[] }>('/business/businessGbkxt/listApp').then(res => {
if (res.code === 200) {
listApp.value = res.result;
request.get<ApiResponse<AppData[]>>('/business/businessGbkxt/listApp').then(res => {
if (res.code === 200) { // 使用 res.data 访问响应数据
listApp.value = res.result.reverse();
initChart();
}
});
......@@ -94,23 +114,28 @@ const initChart = () => {
trigger: 'axis',
axisPointer: {
type: 'cross',
animation: true,
label: {
backgroundColor: '#1b1b1b'
backgroundColor: '#1b1b1b',
borderRadius: 4,
padding: [4, 8]
}
},
backgroundColor: 'rgba(27, 27, 27, 0.9)',
borderColor: '#333',
borderRadius: 4,
padding: [8, 12],
textStyle: {
color: '#fff'
color: '#fff',
fontSize: 12
},
formatter: (params: any) => {
const data = params[0].data;
return `
日期:${dates[params[0].dataIndex]}<br/>
开盘:${data[1]}<br/>
收盘:${data[2]}<br/>
最高:${data[3]}<br/>
最低:${data[4]}
<div style="font-weight: bold">日期:${dates[params[0].dataIndex]}</div>
<div>开盘:${data[1]}</div>
<div>收盘:${data[2]}</div>
<div>最高:${data[3]}</div>
<div>最低:${data[4]}</div>
`;
}
},
......@@ -130,6 +155,25 @@ const initChart = () => {
formatter: (value: string) => {
return value.split('/')[2];
}
},
// 默认显示最后一天
axisPointer: {
value: dates[dates.length - 1],
snap: true,
lineStyle: {
color: '#666',
width: 1
},
label: {
show: true,
formatter: (params: any) => {
return params.value;
}
},
handle: {
show: true,
color: '#666'
}
}
},
yAxis: {
......@@ -166,6 +210,13 @@ const initChart = () => {
};
chart.setOption(option);
// 触发最后一个数据点的显示
chart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: dates.length - 1
});
};
const handleResize = () => {
......@@ -234,6 +285,14 @@ onUnmounted(() => {
padding-bottom: 10px;
padding-top: 20px;
margin-bottom: 10px;
.card1-title{
font-size: 14px;
color: #751c1c;
font-weight: 700;
text-align: center;
padding: 0;
margin-bottom: 10px;
}
.title {
font-size: 14px;
color: #751c1c;
......
<template>
<div class="bind-detail">
<div class="bind-icon">
<img :src="getIconByType(route.query.type as string)" :alt="route.query.name as string">
</div>
<div class="step">
<div :class="stepItemClass(0)">申请绑定</div>
<var-icon name="arrow-down" style="transform: rotate(-90deg)" />
<div :class="stepItemClass(1)">
<span>绑定审核中</span>
</div>
<var-icon name="arrow-down" style="transform: rotate(-90deg);" />
<div :class="stepItemClass(2)">
<span>审核通过</span>
</div>
<var-icon name="arrow-down" style="transform: rotate(-90deg);" />
<div :class="stepItemClass(3)">
<span>绑定成功</span>
</div>
</div>
<div class="title">{{
bindingId == 1 ? '绑定审核中' : bindingId == 2 ? '绑定审核中 ' : bindingId == 3 ? '审核通过 ' :
bindingId == 4 ? '绑定成功' : '您还未绑定' }}</div>
<div class="title1">{{ currentType === '1' ? '微信' : currentType === '2' ?
'支付宝' : currentType === '3' ? '云闪付' : '数字人民币' }}线上支付功能</div>
<div class="tips">绑定成功后 出示付款吗</div>
<div class="tips">即可快速完成付款</div>
<div class="bind-button" @click="showPopup" v-if="!['1', '2', '3'].includes(bindingId)">马上启用绑定</div>
<van-form style="margin-top: 20px;" v-else ref="formRef">
<van-field readonly v-model="formData.a2" name="姓名" label="姓名" placeholder="请输入姓名" />
<van-field readonly v-model="formData.a3" name="身份证号" label="身份证号" placeholder="请输入身份证号" />
<van-field readonly v-model="formData.a4" name="手机号" label="手机号" placeholder="请输入注册手机号" />
</van-form>
<van-popup v-model:show="isShowForm" position="bottom" round :style="{ height: '60%' }">
<div class="popup-title">绑定信息</div>
<div class="bind-form">
<van-form ref="formRef">
<van-field v-model="formData.a2" name="姓名" label="姓名" placeholder="请输入姓名" />
<van-field v-model="formData.a3" name="身份证号" label="身份证号" placeholder="请输入身份证号" />
<van-field v-model="formData.a4" name="手机号" label="手机号" placeholder="请输入注册手机号" />
<div style="margin: 16px" class="bind-button" @click="onSubmit">
提交绑定
</div>
</van-form>
</div>
</van-popup>
<!-- 确认信息弹窗 -->
<van-dialog v-model:show="showConfirm" title="确认信息" show-cancel-button @confirm="handleSubmit"
:before-close="beforeClose">
<div class="confirm-content">
<p>姓名:{{ formData.a2 }}</p>
<p>身份证号:{{ formData.a3 }}</p>
<p>手机号:{{ formData.a4 }}</p>
<div class="warning-text">提交后信息将无法修改,请确认信息准确无误</div>
</div>
</van-dialog>
</div>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import type { FormInstance } from 'vant'
import request from '@/utils/request'
import { isValidIDCard } from '@/utils/userInfoCheck'
// 静态资源导入
const wechatIcon = new URL('@/static/bind/3.png', import.meta.url).href
const alipayIcon = new URL('@/static/bind/4.png', import.meta.url).href
const unionpayIcon = new URL('@/static/bind/2.png', import.meta.url).href
const dcepIcon = new URL('@/static/bind/1.png', import.meta.url).href
const route = useRoute()
const router = useRouter()
const formRef = ref<FormInstance>()
const isShowForm = ref(false)
const showConfirm = ref(false)
const currentType = ref(route.query.type)
const formData = reactive({
a2: '', // 姓名
a3: '', // 身份证
a4: '', // 手机号
a5: '0', // 状态
a6: route.query.type // 绑定类型
})
const stepItemClass = (index: number) => {
console.log(formData.a5, index)
return index == formData.a5 ? 'step-item active-item' : 'step-item'
}
const bindingId = ref(-1)
const showPopup = () => {
isShowForm.value = true
}
const getPageList = () => {
request.get('/business/businessTwoyw1/list?a6=' + route.query.type).then(res => {
if (res.code === 200) {
if (res.result.records.length > 0) {
formData.a2 = res.result.records[0].a2
formData.a3 = res.result.records[0].a3
formData.a4 = res.result.records[0].a4
formData.a5 = res.result.records[0].a5
formData.a6 = res.result.records[0].a6
bindingId.value = res.result.records[0].a6
}
}
})
}
getPageList()
const getIconByType = (type: string) => {
const iconMap: Record<string, string> = {
'1': wechatIcon,
'2': alipayIcon,
'3': unionpayIcon,
'4': dcepIcon
}
return iconMap[type]
}
const onSubmit = () => {
if (formData.a2 == '' || formData.a3 == '' || formData.a4 == '') {
showToast('请输入完整信息')
return
}
if (!isValidIDCard(formData.a3)) {
showToast('请输入正确的身份证号码')
return
}
if (!/^1[3-9]\d{9}$/.test(formData.a4)) {
showToast('请输入正确的手机号码')
return
}
showConfirm.value = true
}
const beforeClose = (action: string) => {
if (action === 'confirm') {
return true
}
return true
}
const handleSubmit = async () => {
try {
formData.a5 = '1'
const response = await request.post('/business/businessTwoyw1/add', formData)
if (response.code == 200) {
showToast(response.message || '提交成功')
isShowForm.value = false
router.push('/home/bindInfo')
} else {
showFailToast(response.message || '提交失败')
}
} catch (error) {
showFailToast(error.message || '提交失败')
} finally {
getPageList()
}
}
</script>
<style lang="scss" scoped>
.bind-detail {
height: inherit;
background: url('@/static/commonbg.png') no-repeat;
background-size: 100% 100%;
padding: 10px;
}
.bind-icon {
text-align: center;
margin-bottom: 10px;
margin-top: 60px;
img {
width: 100%;
object-fit: contain;
}
}
.step {
background: #fff;
padding: 10px 0;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
:deep(.var-icon) {
color: #930401;
}
.step-item {
// background: #fecccb;
// color: #9a2022;
color: #000;
border-radius: 50%;
width: 70px;
text-align: center;
height: 65px;
display: flex;
align-items: center;
justify-content: center;
}
.active-item {
// background: #e4f7d9;
color: red;
}
}
.title {
text-align: center;
font-size: 16px;
font-weight: bold;
margin-top: 10px;
color: #000;
}
.title1 {
text-align: center;
font-size: 18px;
margin: 5px 0;
font-weight: 700;
color: #000;
}
.tips {
text-align: center;
font-size: 14px;
margin: 5px 0;
color: #000;
}
.bind-button {
margin-top: 20px;
padding: 0 16px;
background: #e50112;
color: #fff;
border-radius: 5px;
height: 40px;
line-height: 40px;
width: 70%;
margin: 0 auto;
text-align: center;
margin-top: 20px;
border-radius: 20px;
}
.popup-title {
text-align: center;
font-size: 18px;
font-weight: bold;
padding: 16px;
border-bottom: 1px solid #eee;
}
.bind-form {
background: #fff;
padding: 20px;
}
.confirm-content {
padding: 16px;
p {
margin: 8px 0;
font-size: 14px;
}
.warning-text {
color: #ff4d4f;
font-size: 12px;
margin-top: 16px;
}
}
</style>
\ No newline at end of file
<template>
<div class="bind-info">
<div class="topimg">
<img src="@/static/bind/img1.png" alt="绑定">
</div>
<div class="bind-list">
<div class="title">选择快捷支付方式</div>
<div class="listwarp">
<van-radio-group direction="horizontal" v-model="checked">
<van-radio label-position="left" :name="item.type" v-for="item in bindItems" :key="item.type">
<div class="bind-item">
<div class="icon-wrapper">
<img :src="item.icon" :alt="item.name">
</div>
<!-- <div class="item-name">{{ item.name }}</div> -->
<div class="bind-status" :class="item.status ? 'bound' : ''">
<!-- {{ item.status ? '已绑定' : '未绑定' }} -->
{{ item.name }}
</div>
</div>
</van-radio>
</van-radio-group>
</div>
</div>
<div class="warpbtn" @click="handleBindClick">
<img src="@/static/bind/img2.png" alt="绑定">
</div>
<div class="topimg" style="margin-top: 20px;">
<img src="@/static/bind/img3.png" alt="绑定">
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import wechatIcon from '@/static/bind/wx.png'
import alipayIcon from '@/static/bind/zfb.png'
import unionpayIcon from '@/static/bind/ysf.png'
import dcepIcon from '@/static/bind/szrmb.png'
const checked = ref(2)
interface BindItem {
type: number
name: string
icon: string
status: boolean
}
const router = useRouter()
const bindItems = ref<BindItem[]>([
{ type: 2, name: '支付宝', icon: alipayIcon, status: false },
{ type: 1, name: '微信支付', icon: wechatIcon, status: false },
{ type: 3, name: '云闪付', icon: unionpayIcon, status: false },
{ type: 4, name: '数字人民币', icon: dcepIcon, status: false }
])
const handleBindClick = () => {
showFailToast('连续签到30天,即可免费绑定')
return false
router.push({
path: '/home/bindDetail',
query: {
type: checked.value,
name: bindItems.value.find(item => item.type === checked.value)?.name
}
})
}
// 获取绑定状态
const getBindStatus = async () => {
try {
const res = await fetch('/business/businessTwoyw1/list')
const data = await res.json()
if (data.success) {
bindItems.value = bindItems.value.map(item => {
const bound = data.data.find((d: any) => d.a6 === item.type)
return {
...item,
status: !!bound
}
})
}
} catch (error) {
}
}
onMounted(() => {
getBindStatus()
})
</script>
<style lang="scss" scoped>
.bind-info {
height: inherit;
background: url('@/static/commonbg.png') no-repeat;
background-size: 100% 100%;
padding: 10px 10px 0;
}
.warpbtn {
width: 70%;
margin: 0 auto;
margin-top: 20px;
img {
width: 100%;
}
}
.topimg {
width: 100%;
img {
width: 100%;
}
}
.bind-list {
margin-top: 10px;
background: url('@/static/bind/bg.png') no-repeat;
background-size: 100% 100%;
padding: 10px 0 20px;
.title {
font-size: 14px;
color: #86817e;
text-align: center;
margin-bottom: 20px;
}
}
.listwarp {
display: flex;
}
.bind-item {
flex: 1;
border-radius: 8px;
text-align: center;
cursor: pointer;
img {
width: 30px;
}
&:hover {
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
}
:deep(.van-radio-group) {
width: 100%;
box-sizing: border-box;
padding: 0 30px;
display: flex;
}
:deep(.van-radio) {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
margin-right: 0;
}
.item-name {
font-size: 16px;
margin-bottom: 8px;
}
.bind-status {
font-size: 12px;
color: #000;
margin: 5px 0;
}
</style>
......@@ -4,12 +4,12 @@
<div class="topbox">
<img src="@/static/home/3.png" alt="">
</div>
<div class="centerbox">
<div class="centerbox" @click="handleCenterbox">
<img src="@/static/home/4.png" alt="">
</div>
<div class="card">
<div class="card-item">
<div class="left">持有共产币数量:<span>{{ userInfo?.q1 || 0 }}</span></div>
<div class="left">持有币数量:<span>{{ userInfo?.q1 || 0 }}</span></div>
<div class="left">目前币值:<span>{{ (userInfo?.q1 || 0) * (listApp.a4 || 0) }}</span></div>
</div>
<div class="card-item1">现金余额: </div>
......@@ -39,6 +39,9 @@ const content = ref([])
const banner = ref([])
const newList = ref([])
const listApp = ref({})
const handleCenterbox = () => {
router.push('/home/bindInfo')
}
const fetchData = async () => {
try {
// 并发请求,loading 会显示请求数量
......@@ -84,6 +87,10 @@ const gotx = (balance, type, title) => {
if (!isEealNameAuthentication()) {
return
}
if(userInfo.value?.sysUser?.a1 == 99){
router.push('/smtx/tx')
return
}
router.push(`/user/tixian?balance=${balance}&type=${type}&title=${title}`);
} else {
showFailToast("余额不足");
......
<template>
<div class="smtx">
<div class="smtx-header">实名提现</div>
<div class="card"></div>
<div class="card">
<div class="step">
<div :class="stepItemClass(1)">
<span>提交</span>
<span>认证信息</span>
</div>
<var-icon name="arrow-down" style="transform: rotate(-90deg)" />
<div :class="stepItemClass(2)">
<span>审核预计</span>
<span>1-7工作日</span>
</div>
<var-icon name="arrow-down" style="transform: rotate(-90deg);" />
<div :class="stepItemClass(3)">
<span>通过审核</span>
</div>
<var-icon name="arrow-down" style="transform: rotate(-90deg);" />
<div :class="stepItemClass(4)">
<span>提现并核对</span>
<span>到账信息</span>
</div>
<var-icon name="arrow-down" style="transform: rotate(-90deg);" />
<div :class="stepItemClass(5)">
<span>提现到账</span>
</div>
</div>
</div>
<div class="card1">
<img src="@/static/smtx/111.png" v-if="userInfo?.sysUser?.a1 >= 3" alt="" class="card-img">
<div class="title">填写实名信息</div>
<var-input size="small" :readonly="userInfo?.sysUser?.a1 != 1" variant="outlined" v-model="username" :rules="[
(value) => {
......@@ -11,7 +37,8 @@
return true;
}
]" placeholder="请输入姓名" />
<var-input size="small" :readonly="userInfo?.sysUser?.a1 != 1" variant="outlined" style="margin-top: 10px;" v-model="password" :rules="[
<var-input size="small" :readonly="userInfo?.sysUser?.a1 != 1" variant="outlined" style="margin-top: 10px;"
v-model="password" :rules="[
(value) => {
if (!value) return '请输入身份证号码';
if (!validateIdCard(value)) return '请输入正确的身份证号码';
......@@ -19,16 +46,20 @@
}
]" placeholder="请输入身份证号码" />
</div>
<div class="btn" @click="onSubmit">{{ userInfo?.sysUser?.a1 == 1 ? '提交审核' :
userInfo?.sysUser?.a1 == 2 ? '审核中' :
userInfo?.sysUser?.a1 == 3 ? '审核通过' :
userInfo?.sysUser?.a1 == 4 ? '审核失败' : '' }}</div>
<div :class="getBtnClass()" @click="onSubmit">{{ userInfo?.sysUser?.a1 == 1 ? '提交审核' :
userInfo?.sysUser?.a1 == 2 ? '审核中,预计需要1-7个工作日' :
userInfo?.sysUser?.a1 == 3 ? '立即提现' :
userInfo?.sysUser?.a1 == 4 ? '提现并核对到账信息' :
userInfo?.sysUser?.a1 == 99 ? '前往查看提现进度' :
'提现到账' }}</div>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import request from '@/utils/request';
import { useRouter } from 'vue-router';
const router = useRouter()
const username = ref('');
const password = ref('');
const userInfo = ref({})
......@@ -36,10 +67,26 @@ const getUserInfo = async () => {
const res = await request.get('/business/businessWallet/getInfo')
if (res.code === 200) {
userInfo.value = res.result
username.value = userInfo.value?.sysUser?.realname
username.value = !/^[\u4e00-\u9fa5]{2,}$/.test(userInfo.value?.sysUser?.realname) ? '' : userInfo.value?.sysUser?.realname
password.value = userInfo.value?.sysUser?.identityId
}
}
const getBtnClass = () => {
let str = 'btn'
if (userInfo.value?.sysUser?.a1 == 3) {
str += ' successbtn'
}
if (userInfo.value?.sysUser?.a1 == 2) {
str += ' warningbtn'
}
return str
}
const stepItemClass = (index: number) => {
if(userInfo.value?.sysUser?.a1 == 99 && index == 4){
return 'step-item active-item'
}
return index == userInfo.value?.sysUser?.a1 ? 'step-item active-item' : 'step-item '
}
getUserInfo()
const validateIdCard = (idCard: string): boolean => {
// 基本格式校验
......@@ -84,7 +131,16 @@ const validateIdCard = (idCard: string): boolean => {
return true;
}
const onSubmit = async () => {
if (userInfo?.sysUser?.a1 != 1) {
if (userInfo.value?.sysUser?.a1 == 3) {
router.push(`/user/tixian?balance=${userInfo.value?.q2}&type=q2&title=现金余额`)
return
}
if (userInfo.value?.sysUser?.a1 == 99) {
router.push('/smtx/tx')
return
}
if (userInfo.value?.sysUser?.a1 != 1) {
return
}
if (username.value && password.value) {
......@@ -102,7 +158,7 @@ const onSubmit = async () => {
})
if (res.code === 200) {
getUserInfo()
showSuccessToast('实名认证成功')
showSuccessToast('提交成功')
}
} else {
showToast('请输入真实姓名和身份证号码')
......@@ -118,7 +174,7 @@ const onSubmit = async () => {
font-family: Microsoft YaHei;
width: 100%;
box-sizing: border-box;
padding: 0px 20px;
padding: 0px 10px;
.smtx-header {
font-size: 16px;
......@@ -127,15 +183,63 @@ const onSubmit = async () => {
padding: 20px 0;
}
.step {
padding-top: 130px;
display: flex;
align-items: center;
justify-content: center;
:deep(.var-icon) {
color: #930401;
}
.step-item {
// background: #fecccb;
// color: #9a2022;
color: #000;
border-radius: 50%;
width: 50px;
text-align: center;
height: 50px;
display: flex;
font-size: 10px;
align-items: center;
justify-content: center;
flex-direction: column;
}
.active-item {
// background: #e4f7d9;
// color: #000;
color: red;
font-weight: 700;
}
}
.card {
width: 100%;
height: 160px;
background: #801b18;
background: url('@/static/1.png') no-repeat;
background-size: 100% 100%;
border-radius: 10px;
box-sizing: border-box;
height: 200px;
.title {
font-size: 14px;
color: #751c1c;
text-align: center;
}
.content {
text-indent: 2em;
font-size: 12px;
color: #751c1c;
}
}
.btn {
width: 70%;
width: 80%;
height: 50px;
margin: 15px auto 0;
background: url('@/static/loginbtn.png') no-repeat;
......@@ -146,11 +250,30 @@ const onSubmit = async () => {
line-height: 46px;
}
.successbtn {
background: url('@/static/smtx/113.png') no-repeat;
background-size: 100% 100%;
}
.warningbtn {
background: url('@/static/smtx/112.png') no-repeat;
background-size: 100% 100%;
}
.card1 {
background: url('@/static/smtx/fbg.png') no-repeat;
background-size: 100% 100%;
margin-top: 20px;
margin-top: 10px;
padding-bottom: 30px;
position: relative;
.card-img {
position: absolute;
top: 20%;
left: 50%;
transform: translateX(-50%);
width: 50%;
}
.title {
font-size: 14px;
......
<template>
<div class="page-container">
<!-- 顶部导航 -->
<!-- 主要内容区域 -->
<div class="content-wrapper" v-if="userInfo.sysUser.a1 == 3">
<img src="@/static/smtx/1.png" alt="" class="tx-img">
<div class="verification-card">
<div class="amount-required">
<span class="label">本次提现金额</span>
<span class="amount">¥{{ amount }}</span>
</div>
<div class="amount-required">
<span class="label">双向验证金额</span>
<span class="amount">¥500</span>
</div>
<div class="description">
请向您的现金钱包转入验证金,用于提现验证,双向验证通过后,会立即启动打款程序,并发放提现列队奖励。
</div>
</div>
<!-- 验证按钮 -->
<div class="button-container" @click="startVerification">
<img src="@/static/smtx/2.png" alt="" class="tx-img">
</div>
</div>
<!-- 进度展示页面 -->
<div class="progress-page" v-else>
<div class="success-header">
<img src="@/static/smtx/3.png" alt="" class="tx-img1">
</div>
<div class="progress-section">
<h3>本次提现金额:{{ drawList[0]?.withdrawAmount }}</h3>
<h3>您的现金提现进度</h3>
<van-progress :pivot-text="drawList[0]?.jds * 10 + '%'"
:percentage="drawList[0]?.jds * 10" color="#e50112"
track-color="#e6e6e6" line-width="12">
</van-progress>
</div>
<div class="rewards-card">
<div class="rewards-title">
您的提现已在打款列队,当进度值达到100%会立即打款,请留意到账信息
</div>
<div class="rewards-title">
恭喜您已获得以下列队奖励:
</div>
<img src="@/static/smtx/5.png" alt="" class="tx-img2">
</div>
</div>
</div>
<payUp ref="payUpRef" />
</template>
<script setup>
import { ref } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import payUp from '@/components/payUp.vue'
import request from '@/utils/request'
const router = useRouter()
const route = useRoute()
const showProgress = ref(false)
const progressValue = ref(20)
const payUpRef = ref()
const bankId = ref(route.query.bankId)
const amount = ref(route.query.amount)
const userInfo = ref(JSON.parse(sessionStorage.getItem('userInfo') || '{}'))
const drawList = ref([])
const getDrawList = async () => {
const res = await request.get(`/business/businessWithdraw/list`, {
params: {
walletCode: 'q2',
userId: userInfo.value.sysUser.id
}
})
drawList.value = res.result.records
}
getDrawList()
const startVerification = () => {
// 这里添加支付逻辑
payUpRef.value.open({
payTitle: '现金提现双向验证',
amount: 500,
a3: '1',
a4: amount.value,
a5: bankId.value,
})
showProgress.value = true
startProgressSimulation()
}
const startProgressSimulation = () => {
// 模拟进度增长
const interval = setInterval(() => {
if (progressValue.value < 100) {
progressValue.value += 20
} else {
clearInterval(interval)
handleWithdrawRejection()
}
}, 24 * 60 * 60 * 1000) // 每24小时增加20%
}
const handleWithdrawRejection = () => {
Snackbar.error('银行卡信息有误或已被限额')
showProgress.value = false
progressValue.value = 1
}
</script>
<style scoped>
.page-container {
height: inherit;
background: url('@/static/home/2.png') no-repeat center center;
background-size: 100% 100%;
width: 100%;
padding: 0 10px;
box-sizing: border-box;
padding-top: 80px;
overflow-y: auto;
}
.tx-img {
width: 100%;
}
.content-wrapper {
margin-top: 10px;
}
.verification-card {
border-radius: 8px;
padding: 20px;
margin-bottom: 24px;
}
.amount-required {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
border-bottom: 1px solid #c5a9a8;
padding-bottom: 6px;
}
.label {
color: #000;
font-size: 16px;
font-weight: 700;
}
.amount {
color: #8e0805;
font-size: 24px;
font-weight: bold;
}
.description {
color: #000;
font-size: 14px;
line-height: 1.4;
font-weight: 500;
}
.button-container {
width: 70%;
margin: 0 auto;
margin-top: 32px;
}
.success-header {
text-align: center;
margin-bottom: 32px;
width: 36%;
margin: 0 auto;
img {
width: 100%;
}
}
.progress-section {
background: url('@/static/smtx/4.png') no-repeat center center;
background-size: 100% 100%;
border-radius: 8px;
padding: 20px;
margin-top: 20px;
margin-bottom: 6px;
}
.progress-section h3 {
color: #000;
text-align: center;
margin-bottom: 16px;
}
.rewards-card {
border-radius: 8px;
padding: 20px;
img {
width: 100%;
}
}
.rewards-title {
text-align: center;
color: #8b0a0c;
font-size: 16px;
font-weight: bold;
margin-bottom: 16px;
}
.rewards-list {
display: flex;
flex-direction: column;
gap: 16px;
}
.reward-item {
display: flex;
align-items: center;
gap: 12px;
color: #666;
font-size: 14px;
}
</style>
\ No newline at end of file
......@@ -56,6 +56,10 @@ const gotx = (balance, type, title) => {
if (!isEealNameAuthentication()) {
return
}
if(type == 'q2' && userData.value?.sysUser?.a1 == 99){
router.push('/smtx/tx')
return
}
router.push(`/user/tixian?balance=${balance}&type=${type}&title=${title}`);
} else {
showFailToast("余额不足");
......@@ -122,7 +126,7 @@ onMounted(fetchData);
<span class="copy" @click="handleCopy(sysUser?.yqm)">复制</span>
</div>
</div>
<div class="sign-in" style="visibility: hidden;" @click="signIn">
<div class="sign-in" @click="signIn">
<img src="@/static/user/4.png" alt="sign" />
<span>每日签到</span>
</div>
......@@ -130,7 +134,7 @@ onMounted(fetchData);
</div>
<div class="amoutcard">
<div class="item">
<div class="title">钱包余额</div>
<div class="title">现金余额</div>
<div class="balance">{{ userData?.q2 || 0.00 }}</div>
<div class="btn" @click="gotx(userData?.q2, 'q2', '现金余额')">提现</div>
</div>
......
......@@ -47,7 +47,7 @@ const userInfo = ref({})
const user = JSON.parse(sessionStorage.getItem('userInfo') || '{}')
userInfo.value = user?.sysUser
const smCount = ref(user?.smCount || 0)
linkstr.value = `https://${location.host}/register?yqm=${userInfo?.value?.yqm}`
linkstr.value = `https://${location.host}/#/register?yqm=${userInfo?.value?.yqm}`
// 奖励配置
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment