Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zgyz
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qd01
zgyz
Commits
9ea2ac50
Commit
9ea2ac50
authored
Feb 24, 2025
by
zhangsan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1fe157a2
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
646 additions
and
94 deletions
+646
-94
components.d.ts
src/components.d.ts
+2
-1
payUp.vue
src/components/payUp.vue
+5
-9
index.ts
src/router/index.ts
+7
-8
generateRoutes.ts
src/utils/generateRoutes.ts
+1
-0
index.vue
src/views/home/index.vue
+0
-1
cardsl.vue
src/views/kpsl/cardsl.vue
+36
-16
index.vue
src/views/kpsl/index.vue
+1
-1
index.vue
src/views/ryds/index.vue
+42
-27
address.vue
src/views/user/address.vue
+3
-1
index.vue
src/views/user/index.vue
+2
-1
myteam.vue
src/views/user/myteam.vue
+47
-19
shiming.vue
src/views/user/shiming.vue
+118
-5
yongjin.vue
src/views/user/yongjin.vue
+379
-0
zjmx.vue
src/views/user/zjmx.vue
+1
-3
vite.config.ts
vite.config.ts
+2
-2
No files found.
src/components.d.ts
View file @
9ea2ac50
...
...
@@ -20,7 +20,6 @@ declare module 'vue' {
VanCell
:
typeof
import
(
'
vant/es
'
)[
'
Cell
'
]
VanCellGroup
:
typeof
import
(
'
vant/es
'
)[
'
CellGroup
'
]
VanEmpty
:
typeof
import
(
'
vant/es
'
)[
'
Empty
'
]
VanField
:
typeof
import
(
'
vant/es
'
)[
'
Field
'
]
VanIcon
:
typeof
import
(
'
vant/es
'
)[
'
Icon
'
]
VanList
:
typeof
import
(
'
vant/es
'
)[
'
List
'
]
VanLoading
:
typeof
import
(
'
vant/es
'
)[
'
Loading
'
]
...
...
@@ -40,9 +39,11 @@ declare module 'vue' {
VarForm
:
typeof
import
(
'
@varlet/ui
'
)[
'
Form
'
]
VarIcon
:
typeof
import
(
'
@varlet/ui
'
)[
'
Icon
'
]
VarInput
:
typeof
import
(
'
@varlet/ui
'
)[
'
Input
'
]
VarOption
:
typeof
import
(
'
@varlet/ui
'
)[
'
Option
'
]
VarPopup
:
typeof
import
(
'
@varlet/ui
'
)[
'
Popup
'
]
VarRadio
:
typeof
import
(
'
@varlet/ui
'
)[
'
Radio
'
]
VarRadioGroup
:
typeof
import
(
'
@varlet/ui
'
)[
'
RadioGroup
'
]
VarSelect
:
typeof
import
(
'
@varlet/ui
'
)[
'
Select
'
]
VarSpace
:
typeof
import
(
'
@varlet/ui
'
)[
'
Space
'
]
VarStep
:
typeof
import
(
'
@varlet/ui
'
)[
'
Step
'
]
VarSteps
:
typeof
import
(
'
@varlet/ui
'
)[
'
Steps
'
]
...
...
src/components/payUp.vue
View file @
9ea2ac50
...
...
@@ -169,22 +169,18 @@ const handleSubmit = async () => {
// 提交支付请求
const
submitPay
=
async
()
=>
{
showToast
(
'
暂未开启支付...
'
)
return
false
try
{
isSubmitting
.
value
=
true
const
payData
=
{
remark
:
selectedMethod
.
value
,
balance
:
payParams
.
value
.
amount
,
type
:
payParams
.
value
.
payType
,
productId
:
payParams
.
value
.
productId
payType
:
selectedMethod
.
value
,
amount
:
payParams
.
value
.
amount
,
productCode
:
payParams
.
value
.
payType
,
}
const
res
=
await
request
.
post
(
'
/ops/daybook
'
,
payData
)
const
res
=
await
request
.
post
(
'
/business/businessPayOrder/add
'
,
payData
)
if
(
res
.
code
===
200
)
{
const
payUrl
=
res
.
msg
const
payUrl
=
res
.
result
// 根据环境跳转支付链接
if
(
navigator
.
userAgent
.
includes
(
'
APP
'
))
{
window
.
plus
?.
runtime
.
openURL
(
encodeURI
(
payUrl
))
...
...
src/router/index.ts
View file @
9ea2ac50
...
...
@@ -7,7 +7,6 @@ import { useUserInfo } from "@/composables/useUserInfo";
const
routes
=
generateRoutes
();
const
router
=
createRouter
({
history
:
createWebHistory
(),
routes
,
...
...
@@ -29,8 +28,9 @@ router.beforeEach(async (to, from, next) => {
const
storedVersion
=
sessionStorage
.
getItem
(
"
app_version
"
);
if
(
version
!==
storedVersion
)
{
sessionStorage
.
setItem
(
"
app_version
"
,
version
);
window
.
location
.
href
=
to
.
fullPath
;
return
;
if
(
to
.
path
!==
"
/login
"
)
{
window
.
location
.
reload
();
}
}
}
}
catch
(
error
)
{
...
...
@@ -53,10 +53,10 @@ router.beforeEach(async (to, from, next) => {
}
next
();
// 获取用户信息
if
(
token
)
{
await
getUserInfo
();
}
// 获取用户信息
if
(
token
)
{
await
getUserInfo
();
}
});
router
.
afterEach
(()
=>
{
...
...
@@ -64,4 +64,3 @@ router.afterEach(() => {
});
export
default
router
;
src/utils/generateRoutes.ts
View file @
9ea2ac50
...
...
@@ -40,6 +40,7 @@ const titleMap: Record<string, string> = {
group
:
"
官网群聊
"
,
signIn
:
"
每日签到
"
,
txjd
:
"
邀请奖励提现进度
"
,
yongjin
:
"
团队佣金
"
,
};
...
...
src/views/home/index.vue
View file @
9ea2ac50
...
...
@@ -69,7 +69,6 @@ import { onPageShow, onPageHide } from '@/composables'
import
request
from
'
@/utils/request
'
import
GuideModal
from
'
@/components/GuideModal.vue
'
const
appUpUrl
=
ref
(
sessionStorage
.
getItem
(
'
appUpUrl
'
))
console
.
log
(
appUpUrl
.
value
)
const
router
=
useRouter
()
const
showGuide
=
ref
(
false
)
const
content
=
ref
([])
...
...
src/views/kpsl/cardsl.vue
View file @
9ea2ac50
<
template
>
<div
class=
"cards-page"
>
<van-tabs
v-model:active=
"active"
@
click-tab=
"onClickTab"
>
<van-tab
title=
"本人申请"
></van-tab>
<van-tab
title=
"替他人申请"
></van-tab>
</van-tabs>
<div
class=
"content-wrap"
v-if=
"cardList.length"
>
<var-collapse
v-model=
"activeCard"
accordion
:offset=
"false"
>
<var-collapse-item
title=
"经济发展专项卡"
:name=
"card.id"
v-for=
"(card, index) in cardList"
:key=
"card.id"
>
...
...
@@ -31,7 +35,7 @@
<var-icon
name=
"chart-timeline"
color=
"#333"
/>
<span>
办理进度
</span>
</div>
<var-steps
direction=
"vertical"
:active=
"Number(card.a6)"
active-color=
"red"
>
<var-steps
direction=
"vertical"
:active=
"Number(card.a6)"
active-color=
"red"
>
<var-step
v-for=
"(step, stepIndex) in getSteps(card)"
:key=
"stepIndex"
>
<div
class=
"step-content"
>
<div
class=
"step-main"
>
...
...
@@ -40,9 +44,11 @@
<div
class=
"step-action"
v-if=
"step.amount"
>
<var-button
v-if=
"stepIndex >= card.a7"
size=
"small"
class=
"pay-btn"
@
click=
"handlePay(step, card)"
>
立即缴纳
{{
step
.
amount
==
1
?
'
成为荣誉董事
'
:
'
立即缴纳
'
}}
</var-button>
<var-button
v-else
size=
"small"
class=
"pay-btn"
>
<span
v-if=
"stepIndex == 1 && card.a7 >= 2"
>
已成为荣誉董事
</span>
</var-button>
<span
v-else
class=
"status-completed"
>
已完成
</span>
</div>
</div>
</var-step>
...
...
@@ -69,6 +75,8 @@
import
{
ref
,
onMounted
}
from
'
vue
'
import
request
from
'
@/utils/request
'
import
payUp
from
'
@/components/payUp.vue
'
import
{
useRouter
}
from
'
vue-router
'
const
router
=
useRouter
()
const
activeCard
=
ref
<
string
>
(
''
)
interface
CardStep
{
text
:
string
...
...
@@ -92,12 +100,17 @@ const getSteps = (card: Card) => {
return
steps
}
const
cardList
=
ref
<
Card
[]
>
([])
const
cardListAll
=
ref
<
Card
[]
>
([])
const
payUpRef
=
ref
<
any
>
(
null
)
const
active
=
ref
(
0
)
const
onClickTab
=
(
tab
:
any
)
=>
{
tab
.
name
==
1
?
cardList
.
value
=
cardListAll
.
value
.
filter
((
item
:
any
)
=>
item
.
a1
==
2
)
:
cardList
.
value
=
cardListAll
.
value
.
filter
((
item
:
any
)
=>
item
.
a1
!=
2
)
}
// 步骤配置
const
stepsBase
:
CardStep
[]
=
[
{
text
:
'
您的申报已提交审核,请耐心等待结果!
'
},
{
text
:
'
恭喜您的申报已通过,请立即点击制卡并且保密运输发货!
'
,
amount
:
300
,
tips
:
"
保密运输费用
"
},
{
text
:
'
您的审核已通过,成为荣誉董事可开始免费制卡
'
,
tips
:
'
成为荣誉董事
'
,
amount
:
1
},
{
text
:
'
恭喜您成为荣誉董事,您的专项卡正在免费制作中!
'
},
{
text
:
'
线上免费激活
'
},
{
text
:
'
激活成功
'
},
{
text
:
'
正在入款
'
},
...
...
@@ -114,28 +127,33 @@ const stepsBase: CardStep[] = [
{
text
:
'
操作不当,资料丢失
'
,
amount
:
300
,
tips
:
"
操作不当费用
"
},
]
const
handlePay
=
(
step
:
CardStep
,
card
:
Card
)
=>
{
if
(
!
payUpRef
.
value
)
return
payUpRef
.
value
.
open
({
amount
:
step
.
amount
,
payTitle
:
step
.
tips
,
payType
:
1
,
productId
:
card
.
id
,
needPassword
:
false
})
if
(
step
.
amount
==
1
)
{
router
.
push
(
'
/ryds
'
)
}
else
{
if
(
!
payUpRef
.
value
)
return
payUpRef
.
value
.
open
({
amount
:
step
.
amount
,
payTitle
:
step
.
tips
,
payType
:
1
,
productId
:
card
.
id
,
needPassword
:
false
})
}
}
const
fetchCardList
=
async
()
=>
{
try
{
const
res
=
await
request
.
get
(
'
/business/businessYw1/listByU
'
)
if
(
res
?.
result
?.
records
)
{
cardList
.
value
=
res
.
result
.
records
.
map
((
card
:
any
)
=>
({
cardList
All
.
value
=
res
.
result
.
records
.
map
((
card
:
any
)
=>
({
...
card
,
isShow
:
false
,
mainStep
:
parseInt
(
card
.
a3
)
||
0
,
paySteps
:
parseInt
(
card
.
a4
)
||
0
,
}))
cardList
.
value
=
cardList
.
value
.
filter
((
item
:
any
)
=>
item
.
a1
!=
2
)
activeCard
.
value
=
cardList
.
value
[
0
]?.
id
cardList
.
value
=
cardListAll
.
value
.
filter
((
item
:
any
)
=>
item
.
a1
!=
2
)
}
}
catch
(
error
)
{
console
.
error
(
'
获取卡片列表失败:
'
,
error
)
...
...
@@ -161,9 +179,11 @@ onMounted(() => {
margin-left
:
auto
;
margin-right
:
auto
;
}
::v-deep
.var-step__vertical-content
{
flex
:
1
;
}
.card-main
{
background
:
white
;
border-radius
:
12px
;
...
...
@@ -256,7 +276,7 @@ onMounted(() => {
}
.progress-section
{
padding
:
2
0px
;
padding
:
1
0px
;
.progress-title
{
display
:
flex
;
...
...
src/views/kpsl/index.vue
View file @
9ea2ac50
...
...
@@ -251,7 +251,7 @@ const handleCheckProgress = () => {
.progress-link
{
text-align
:
center
;
color
:
#007B5F
;
color
:
red
;
font-size
:
14px
;
padding
:
15px
0
;
font-weight
:
700
;
...
...
src/views/ryds/index.vue
View file @
9ea2ac50
...
...
@@ -24,14 +24,14 @@
3、按照国家项目规定成为荣誉董事!退休之后即可享受社会保障及公积金福利!另外还配套100平米面积的精装小区高品质一栋国产红旗汽车!
</div>
</div>
<div
class=
"apply-form"
>
<
!--
<
div
class=
"apply-form"
>
<van-field
:readonly=
"isSubmit"
v-model=
"formData.name"
label=
"姓名"
placeholder=
"请输入您的姓名"
/>
<van-field
:readonly=
"isSubmit"
v-model=
"formData.age"
label=
"年龄"
type=
"number"
placeholder=
"请输入您的年龄"
/>
</div>
</div>
-->
</div>
<div
class=
"submit-btn"
>
<van-button
type=
"primary"
block
:loading=
"loading"
@
click=
"handleSubmit"
>
{{
isSubmit
?
'
即将开放
'
:
'
成为荣誉董事
'
}}
{{
isSubmit
?
'
已成为荣誉董事
'
:
'
成为荣誉董事
'
}}
</van-button>
</div>
</div>
...
...
@@ -67,6 +67,7 @@
</div>
</div>
</div>
<pay-up
ref=
"payUpRef"
/>
</
template
>
<
script
setup
lang=
"ts"
>
...
...
@@ -74,41 +75,53 @@ import { ref, reactive } from 'vue'
import
request
from
'
@/utils/request
'
import
{
useRouter
}
from
'
vue-router
'
import
{
isEealNameAuthentication
}
from
'
@/utils/userInfoCheck
'
import
payUp
from
'
@/components/payUp.vue
'
const
router
=
useRouter
()
const
loading
=
ref
(
false
)
const
formData
=
reactive
({
name
:
''
,
age
:
''
})
const
payUpRef
=
ref
<
any
>
(
null
)
const
isSubmit
=
ref
(
false
)
const
userInfo
=
ref
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'
userInfo
'
)
||
'
{}
'
))
const
handleSubmit
=
async
()
=>
{
if
(
isSubmit
.
value
)
{
showToast
(
'
等待开放
'
)
return
}
if
(
!
formData
.
name
)
{
showToast
(
'
请输入姓名
'
)
return
}
if
(
!
formData
.
age
)
{
showToast
(
'
请输入年龄
'
)
if
(
userInfo
.
value
.
sysUser
.
a8
){
showToast
(
'
已成为荣誉董事
'
)
return
}
if
(
!
userInfo
.
value
.
sysUser
.
identityId
)
{
if
(
!
isEealNameAuthentication
())
{
return
}
return
}
if
(
userInfo
.
value
.
smCount
<
5
)
{
showToast
(
'
需要邀请5名好友才能成为荣誉董事
'
)
return
}
else
{
showToast
(
'
即将开放
'
)
return
false
// if (isSubmit.value) {
// showToast('等待开放')
// return
// }
// if (!formData.name) {
// showToast('请输入姓名')
// return
// }
// if (!formData.age) {
// showToast('请输入年龄')
// return
// }
// if (!userInfo.value.sysUser.identityId) {
// if (!isEealNameAuthentication()) {
// return
// }
// return
// }
// if (userInfo.value.smCount
<
5
)
{
// showToast('需要邀请5名好友才能成为荣誉董事')
// return
// }
if
(
!
isSubmit
.
value
)
{
payUpRef
.
value
.
open
({
amount
:
200
,
payTitle
:
'
成为荣誉董事
'
,
payType
:
1
,
productId
:
''
,
needPassword
:
false
})
}
return
false
try
{
loading
.
value
=
true
let
data
=
{
a1
:
formData
.
name
,
a2
:
formData
.
age
}
...
...
@@ -130,7 +143,6 @@ const getDs = async () => {
if
(
res
.
code
==
200
&&
res
.
result
?.
a1
)
{
formData
.
name
=
res
.
result
.
a1
formData
.
age
=
res
.
result
.
a2
isSubmit
.
value
=
true
}
}
getDs
()
...
...
@@ -138,6 +150,8 @@ const getUserInfo = async () => {
const
res
=
await
request
.
get
(
'
/business/businessWallet/getInfo
'
)
if
(
res
.
code
==
200
)
{
userInfo
.
value
=
res
.
result
isSubmit
.
value
=
userInfo
.
value
.
sysUser
.
a8
console
.
log
(
userInfo
.
value
);
}
}
const
handleInvite
=
async
()
=>
{
...
...
@@ -150,6 +164,7 @@ const handleInvite = async () => {
getUserInfo
()
}
}
getUserInfo
()
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/user/address.vue
View file @
9ea2ac50
...
...
@@ -22,7 +22,7 @@
<var-button
v-if=
"!isEditing"
@
click=
"startEdit"
block
type=
"primary"
class=
"submit-button"
>
修改地址
</var-button>
<var-button
v-else
:loading=
"loading"
@
click=
"handleSubmit"
block
type=
"
primary
"
class=
"submit-button"
>
<var-button
v-else
:loading=
"loading"
@
click=
"handleSubmit"
block
type=
"
danger
"
class=
"submit-button"
>
提交修改信息
</var-button>
</
template
>
...
...
@@ -74,6 +74,8 @@ const getCardList = () => {
...
formData
.
value
,
...
JSON
.
parse
(
JSON
.
stringify
(
result
.
records
[
0
]))
}
}
else
{
isEditing
.
value
=
true
}
}
})
...
...
src/views/user/index.vue
View file @
9ea2ac50
...
...
@@ -23,7 +23,7 @@ const MENU_ITEMS = [
{
name
:
"
专项卡进度
"
,
icon
:
pnga9
,
path
:
"
/kpsl/cardsl
"
},
{
name
:
"
邀请奖励
"
,
icon
:
pnga10
,
path
:
"
/yqjl/txjd
"
,
tips
:
'
提现进度
'
},
{
name
:
"
其他资金
"
,
icon
:
pnga11
,
path
:
"
/user/withdraw?tab=q3
"
,
tips
:
'
提现进度
'
},
{
name
:
"
官方群聊
"
,
icon
:
pnga12
,
path
:
"
/user/group
"
},
{
name
:
"
团队佣金
"
,
icon
:
pnga12
,
path
:
"
/user/yongjin
"
},
{
name
:
"
在线客服
"
,
icon
:
pnga13
,
path
:
kfurl
},
{
name
:
"
我的团队
"
,
icon
:
pnga14
,
path
:
"
/user/myteam
"
},
...
...
@@ -33,6 +33,7 @@ const userData = ref({});
const
loading
=
ref
(
true
);
const
activeCard
=
ref
(
null
);
const
sysUser
=
ref
({});
// 处理点击事件
const
handleClick
=
(
item
)
=>
{
if
(
item
.
name
===
"
在线客服
"
)
{
...
...
src/views/user/myteam.vue
View file @
9ea2ac50
...
...
@@ -30,7 +30,7 @@
<!-- 团队层级切换 -->
<div
class=
"level-tabs"
>
<van-tabs
v-model:active=
"currentLevel"
animated
swipeable
>
<van-tab
v-for=
"tab in levelTabs"
:key=
"tab.level"
:title=
"tab.title"
>
<van-tab
v-for=
"tab in levelTabs"
:key=
"tab.level"
:title=
"tab.title"
:name=
"tab.level"
>
<div
class=
"level-stats"
>
<div
class=
"stat-box"
>
<var-icon
name=
"account-group"
:size=
"24"
/>
...
...
@@ -57,20 +57,19 @@
<span>
状态
</span>
</div>
<div
class=
"list-body custom-scroll"
>
<template
v-if=
"tab.members.length"
>
<div
v-for=
"member in tab.members"
:key=
"member.id"
class=
"member-item"
>
<span
class=
"account"
>
{{
maskUsername
(
member
.
username
)
}}
</span>
<span
class=
"name"
>
{{
member
.
realname
||
'
--
'
}}
</span>
<span
class=
"date"
>
{{
formatDate
(
member
.
createTime
)
}}
</span>
<span
:class=
"['status', member.identityId ? 'verified' : 'unverified']"
>
{{
member
.
identityId
?
'
已实名
'
:
'
未实名
'
}}
</span>
</div>
</
template
>
<div
v-else
class=
"empty-state"
>
<var-icon
name=
"account-group-outline"
:size=
"48"
/>
<p>
暂无团队成员
</p>
</div>
<van-list
v-model:loading=
"loading"
:finished=
"finished"
finished-text=
"没有更多了"
:immediate-check=
"false"
@
load=
"getTeamInfo"
>
<template
v-if=
"members.length"
>
<div
v-for=
"member in members"
:key=
"member.id"
class=
"member-item"
>
<span
class=
"account"
>
{{
maskUsername
(
member
.
username
)
}}
</span>
<span
class=
"name"
>
{{
member
.
realname
||
'
--
'
}}
</span>
<span
class=
"date"
>
{{
formatDate
(
member
.
createTime
)
}}
</span>
<span
:class=
"['status', member.identityId ? 'verified' : 'unverified']"
>
{{
member
.
identityId
?
'
已实名
'
:
'
未实名
'
}}
</span>
</div>
</
template
>
</van-list>
</div>
</div>
</van-tab>
...
...
@@ -85,6 +84,12 @@ import { ref, computed } from 'vue'
import
request
from
'
@/utils/request
'
import
type
{
AxiosResponse
}
from
'
axios
'
import
handleCopy
from
'
@/utils/handleCopy
'
const
loading
=
ref
(
false
)
const
finished
=
ref
(
false
)
const
pageSize
=
ref
(
10
)
const
pageNum
=
ref
(
1
)
const
total
=
ref
(
0
)
const
members
=
ref
([])
const
linkstr
=
ref
(
''
)
const
userInfo
=
ref
<
any
>
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'
userInfo
'
)
||
'
{}
'
))
linkstr
.
value
=
`https://
${
location
.
host
}
/register?yqm=
${
userInfo
?.
value
?.
sysUser
?.
yqm
}
`
...
...
@@ -110,7 +115,14 @@ interface TeamInfo {
sjsmrs: number // 三级实名人数
}
const currentLevel = ref(0)
const currentLevel = ref(1)
watch(currentLevel, () => {
pageNum.value = 1
finished.value = false
loading.value = false
total.value = 0
members.value = []
})
const teamInfo = ref<TeamInfo>({
zzchy: 0,
zsmrs: 0,
...
...
@@ -175,15 +187,26 @@ const getTeamInfo = async () => {
code: number
message: string
result: TeamInfo
}>>(
'/business/businessWallet/getMyTeam'
)
}>>(
`
/
business
/
businessWallet
/
getMyTeam
?
pageNo
=
$
{
pageNum
.
value
}
&
pageSize
=
$
{
pageSize
.
value
}
&
type
=
$
{
currentLevel
.
value
}
`
)
if (res.code === 200) {
teamInfo.value = res.result
members.value = [...members.value, ...(res.result.page.records || [])]
total.value = res.result.page.total || 0
if (members.value.length >= total.value) {
finished.value = true
} else {
pageNum.value++
}
} else {
showFailToast(res.message || '加载失败')
finished.value = true
}
} catch (error: any) {
console.error('获取团队信息失败:', error)
showFailToast(error?.message || '加载失败,请重试')
finished.value = true
} finally {
loading.value = false
}
}
...
...
@@ -200,10 +223,12 @@ getTeamInfo()
flex-direction
:
column
;
overflow
:
hidden
;
// 防止页面滚动
}
.invite-code
{
.invite-code
{
font-size
:
16px
;
font-weight
:
700
;
}
.btn
{
width
:
100px
;
// 240rpx / 2
line-height
:
30px
;
// 80rpx / 2
...
...
@@ -217,9 +242,11 @@ getTeamInfo()
font-size
:
14px
;
margin-top
:
10px
;
}
.btn
:first-of-type
{
.btn
:first-of-type
{
margin-right
:
10px
;
}
.content-wrapper
{
flex
:
1
;
padding
:
16px
;
...
...
@@ -336,6 +363,7 @@ getTeamInfo()
display
:
flex
;
flex-direction
:
column
;
height
:
260px
;
.list-header
{
position
:
sticky
;
top
:
0
;
...
...
src/views/user/shiming.vue
View file @
9ea2ac50
...
...
@@ -2,6 +2,15 @@
<div
class=
"shiming-container"
>
<div
class=
"form-container"
>
<var-form
ref=
"formRef"
@
submit=
"onSubmit"
>
<var-select
v-model=
"idType"
placeholder=
"请选择证件类型"
:rules=
"[(v) => !!v || '请选择证件类型']"
>
<var-option
label=
"中国大陆居民身份证"
value=
"1"
/>
<var-option
label=
"港澳居民来往内地通行证"
value=
"2"
/>
<var-option
label=
"台湾居民来往大陆通行证"
value=
"3"
/>
</var-select>
<var-input
v-model=
"realname"
placeholder=
"请输入真实姓名"
:rules=
"[
(value) =>
{
if (!value) return '请输入真实姓名';
...
...
@@ -13,10 +22,12 @@
<var-icon
name=
"account-circle"
/>
</
template
>
</var-input>
<var-input
v-model=
"identityId"
placeholder=
"请输入身份证号
"
:rules=
"[
<var-input
v-model=
"identityId"
:placeholder=
"getIdPlaceholder()
"
:rules=
"[
(value: string) => {
if (!value) return '请输入身份证号';
if (!validateIdCard(value)) return '请输入正确的身份证号';
if (!value) return '请输入证件号码';
if (!validateCard(value)) {
return '请输入正确的证件号码';
}
return true;
}
]"
>
...
...
@@ -53,6 +64,7 @@ const formRef = ref()
const
realname
=
ref
(
''
)
const
identityId
=
ref
(
''
)
const
loading
=
ref
(
false
)
const
idType
=
ref
(
'
1
'
)
const
{
checkAuthStatus
,
updateUserInfo
}
=
useUserInfo
()
const
userInfo
=
ref
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'
userInfo
'
)
||
'
{}
'
))
...
...
@@ -82,7 +94,8 @@ const onSubmit = async () => {
loading
.
value
=
true
const
res
=
await
request
.
post
(
'
/business/businessWallet/certified
'
,
{
realname
:
realname
.
value
,
identityId
:
identityId
.
value
identityId
:
identityId
.
value
,
idType
:
idType
.
value
})
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
...
...
@@ -107,7 +120,56 @@ const onSubmit = async () => {
}
}
const
validateIdCard
=
(
idCard
:
string
):
boolean
=>
{
// 获取不同证件类型的提示文字
const
getIdPlaceholder
=
()
=>
{
switch
(
idType
.
value
)
{
case
'
1
'
:
return
'
请输入身份证号码
'
case
'
2
'
:
return
'
请输入港澳居民来往内地通行证号码
'
case
'
3
'
:
return
'
请输入台湾居民来往大陆通行证号码
'
default
:
return
'
请输入证件号码
'
}
}
// 统一的证件验证函数
const
validateCard
=
(
value
:
string
):
boolean
=>
{
switch
(
idType
.
value
)
{
case
'
1
'
:
return
validateIdCard
(
value
)
case
'
2
'
:
return
validateHKMacauCard
(
value
)
case
'
3
'
:
return
validateTWCard
(
value
)
default
:
return
false
}
}
// 修改港澳通行证验证逻辑
const
validateHKMacauCard
=
(
cardNo
:
string
):
boolean
=>
{
// 新版: H/M + 8位数字 + 2/3位数字或字母
const
newPattern
=
/^
[
HM
]\d{8}[\d
A-Z
]{2,3}
$/
// 旧版: H/M + 10位数字
const
oldPattern
=
/^
[
HM
]\d{10}
$/
// 出境通行证: H + 8位数字
const
exitPattern
=
/^
[
HM
]\d{8}
$/
return
newPattern
.
test
(
cardNo
)
||
oldPattern
.
test
(
cardNo
)
||
exitPattern
.
test
(
cardNo
)
}
// 修改台湾通行证验证逻辑
const
validateTWCard
=
(
cardNo
:
string
):
boolean
=>
{
// 新版: 8位数字
const
newPattern
=
/^
\d{8}
$/
// 旧版: 8位数字 + 字母
const
oldPattern
=
/^
\d{8}[
A-Z
]
$/
return
newPattern
.
test
(
cardNo
)
||
oldPattern
.
test
(
cardNo
)
}
//算法完整验证
const
validateIdCard1
=
(
idCard
:
string
):
boolean
=>
{
// 基本格式校验
const
reg
=
/
(
^
\d{15}
$
)
|
(
^
\d{18}
$
)
|
(
^
\d{17}(\d
|X|x
)
$
)
/
;
if
(
!
reg
.
test
(
idCard
))
{
...
...
@@ -159,6 +221,50 @@ const validateIdCard = (idCard: string): boolean => {
return
true
;
}
//算法简化验证
const
validateIdCard
=
(
idCard
:
string
):
boolean
=>
{
// 基本格式校验
const
reg
=
/
(
^
\d{15}
$
)
|
(
^
\d{18}
$
)
|
(
^
\d{17}(\d
|X|x
)
$
)
/
;
if
(
!
reg
.
test
(
idCard
))
{
return
false
;
}
// 15位身份证转18位
if
(
idCard
.
length
===
15
)
{
idCard
=
idCard
.
slice
(
0
,
6
)
+
'
19
'
+
idCard
.
slice
(
6
);
// 补充校验位(仅保留对X的验证)
// 不再加权和计算,只进行X的验证
}
// 提取生日部分
const
year
=
parseInt
(
idCard
.
substr
(
6
,
4
));
const
month
=
parseInt
(
idCard
.
substr
(
10
,
2
));
const
day
=
parseInt
(
idCard
.
substr
(
12
,
2
));
const
date
=
new
Date
(
year
,
month
-
1
,
day
);
// 检查日期是否有效
if
(
date
.
getFullYear
()
!==
year
||
date
.
getMonth
()
+
1
!==
month
||
date
.
getDate
()
!==
day
)
{
return
false
;
}
// 检查年份范围
const
currentYear
=
new
Date
().
getFullYear
();
if
(
year
<
1900
||
year
>
currentYear
)
{
return
false
;
}
// 校验18位身份证最后一位是否为X(不进行加权和计算)
if
(
idCard
.
length
===
18
)
{
const
lastChar
=
idCard
[
17
].
toUpperCase
();
// 获取第18位,并转为大写
// 检查最后一位是否为数字或X
if
(
/^
\d
$/
.
test
(
lastChar
)
||
lastChar
===
'
X
'
)
{
return
true
;
}
return
false
;
// 如果最后一位既不是数字也不是X,返回false
}
return
true
;
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -218,6 +324,13 @@ const validateIdCard = (idCard: string): boolean => {
line-height
:
1
.5
;
}
}
:deep
(
.var-select
)
{
margin-bottom
:
20px
;
background
:
#fff
;
border-radius
:
8px
;
padding
:
4px
12px
;
}
}
}
</
style
>
\ No newline at end of file
src/views/user/yongjin.vue
0 → 100644
View file @
9ea2ac50
<
template
>
<div
class=
"page-container"
>
<div
class=
"content-wrapper"
>
<div
class=
"level-tabs"
>
<van-tabs
v-model:active=
"currentLevel"
animated
swipeable
>
<van-tab
v-for=
"tab in levelTabs"
:key=
"tab"
:title=
"tab"
:name=
"tab"
>
<div
class=
"overview-card"
>
<div
class=
"stat-item"
>
<span
class=
"label"
>
{{
currentLevel
}}
总佣金
</span>
<span
class=
"value"
>
{{
sum
||
0.00
}}
</span>
<span
class=
"unit"
>
元
</span>
</div>
</div>
<!--
<div
class=
"level-stats"
>
<div
class=
"stat-box"
>
<var-icon
name=
"account-group"
:size=
"24"
/>
<div
class=
"stat-content"
>
<span
class=
"label"
>
{{
tab
.
totalLabel
}}
</span>
<span
class=
"number"
>
{{
tab
.
total
}}
人
</span>
</div>
</div>
<div
class=
"stat-box"
>
<var-icon
name=
"account-check"
:size=
"24"
/>
<div
class=
"stat-content"
>
<span
class=
"label"
>
{{
tab
.
verifiedLabel
}}
</span>
<span
class=
"number"
>
{{
tab
.
verified
}}
人
</span>
</div>
</div>
</div>
-->
<!-- 团队成员列表 -->
<div
class=
"member-list"
>
<div
class=
"list-header"
>
<span>
下级账户
</span>
<span>
姓名
</span>
<span>
佣金
</span>
</div>
<div
class=
"list-body custom-scroll"
>
<template
v-if=
"teamInfo?.length"
>
<van-list
v-model:loading=
"loading"
:finished=
"finished"
:immediate-check=
"false"
:offset=
"10"
@
load=
"getTeamInfo"
>
<div
v-for=
"member in teamInfo"
:key=
"member.id"
class=
"member-item"
>
<span
class=
"account"
>
{{
maskUsername
(
getUser
(
member
.
changeNote
)[
2
])
}}
</span>
<span
class=
"name"
>
{{
getUser
(
member
.
changeNote
)[
1
]
||
'
--
'
}}
</span>
<span
class=
"date"
>
{{
member
.
changeAmount
}}
</span>
</div>
</van-list>
</
template
>
<div
v-else
class=
"empty-state"
>
<var-icon
name=
"account-group-outline"
:size=
"48"
/>
<p>
暂无团队成员
</p>
</div>
</div>
</div>
</van-tab>
</van-tabs>
</div>
</div>
</div>
</template>
<
script
setup
lang=
"ts"
>
import
{
ref
,
computed
}
from
'
vue
'
import
request
from
'
@/utils/request
'
const
linkstr
=
ref
(
''
)
const
userInfo
=
ref
<
any
>
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'
userInfo
'
)
||
'
{}
'
))
linkstr
.
value
=
`https://
${
location
.
host
}
/register?yqm=
${
userInfo
?.
value
?.
sysUser
?.
yqm
}
`
const levelTabs = ref(['一级', '二级', '三级'])
const sum = ref(0.00)
const currentLevel = ref('一级')
const teamInfo = ref([])
// 格式化用户名(隐私保护)
const maskUsername = (username: string): string => {
if (!username) return '--'
return `
$
{
username
.
slice
(
0
,
3
)}
****
$
{
username
.
slice
(
-
4
)}
`
}
const loading = ref(false)
const finished = ref(false)
const pageSize = ref(20)
const pageNum = ref(1)
const total = ref(0)
watch(currentLevel, () => {
resetList()
})
const resetList = () => {
teamInfo.value = []
pageNum.value = 1
finished.value = false
loading.value = false
total.value = 0
getTeamInfo()
}
const getUser = (changeNote: string) => {
if (!changeNote) return ['--', '--', '--', '--']
return changeNote.split('_')
}
// 获取团队信息
const getTeamInfo = async () => {
try {
loading.value = true
const res = await request.post(`
/
business
/
businessWalletDetail
/
yjlist
?
pageNum
=
$
{
pageNum
.
value
}
&
pageSize
=
$
{
pageSize
.
value
}
`,
{ changeNote: currentLevel.value })
if (res.code === 200) {
const result = res.result
sum.value = result.sum
teamInfo.value = [...teamInfo.value, ...(result.pageList.records || [])]
total.value = result.pageList.total || 0
console.log(res.result)
if (teamInfo.value.length >= total.value) {
finished.value = true
} else {
pageNum.value++
}
} else {
showFailToast(res.data.message || '加载失败')
finished.value = true
}
} catch (error: any) {
console.error('获取团队信息失败:', error)
showFailToast(error?.message || '加载失败,请重试')
finished.value = true
} finally {
loading.value = false
}
}
getTeamInfo()
</
script
>
<
style
lang=
"scss"
scoped
>
.page-container
{
height
:
inherit
;
background
:
url('@/static/cbg1.png')
no-repeat
center
center
;
background-size
:
100%
100%
;
box-sizing
:
border-box
;
display
:
flex
;
flex-direction
:
column
;
overflow
:
hidden
;
// 防止页面滚动
}
.invite-code
{
font-size
:
16px
;
font-weight
:
700
;
}
.btn
{
width
:
100px
;
// 240rpx / 2
line-height
:
30px
;
// 80rpx / 2
background
:
#3a9256
;
text-align
:
center
;
border-radius
:
5px
;
// 10rpx / 2
margin-bottom
:
6px
;
// 12rpx / 2
cursor
:
pointer
;
border
:
none
;
color
:
#fff
;
font-size
:
14px
;
margin-top
:
10px
;
}
.btn
:first-of-type
{
margin-right
:
10px
;
}
.content-wrapper
{
flex
:
1
;
padding
:
16px
;
overflow
:
hidden
;
// 防止整体内容滚动
}
.overview-card
{
border-radius
:
16px
;
padding
:
10px
20px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
color
:
#000
;
margin-bottom
:
10px
;
box-shadow
:
0
4px
12px
rgba
(
74
,
144
,
226
,
0
.2
);
.stat-item
{
flex
:
1
;
text-align
:
center
;
.label
{
display
:
block
;
font-size
:
14px
;
opacity
:
0
.9
;
margin-bottom
:
8px
;
}
.value
{
font-size
:
28px
;
font-weight
:
600
;
margin-right
:
4px
;
}
.unit
{
font-size
:
14px
;
opacity
:
0
.9
;
}
}
.divider
{
width
:
1px
;
height
:
40px
;
background
:
rgba
(
255
,
255
,
255
,
0
.2
);
margin
:
0
20px
;
}
}
.level-tabs
{
background
:
white
;
border-radius
:
12px
;
overflow
:
hidden
;
box-shadow
:
0
2px
8px
rgba
(
0
,
0
,
0
,
0
.05
);
height
:
100%
;
// 减去顶部卡片的高度
display
:
flex
;
flex-direction
:
column
;
:deep
(
.van-tabs
)
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
:deep
(
.van-tabs__content
)
{
flex
:
1
;
overflow
:
hidden
;
}
:deep
(
.van-tab__pane
)
{
height
:
100%
;
overflow
:
hidden
;
display
:
flex
;
flex-direction
:
column
;
}
}
.level-stats
{
padding
:
10px
20px
;
display
:
flex
;
gap
:
16px
;
.stat-box
{
flex
:
1
;
background
:
#dbf5ce
;
border-radius
:
12px
;
padding
:
8px
;
display
:
flex
;
align-items
:
center
;
gap
:
12px
;
.var-icon
{
color
:
#4a90e2
;
}
.stat-content
{
display
:
flex
;
flex-direction
:
column
;
.label
{
font-size
:
13px
;
color
:
#64748b
;
margin-bottom
:
4px
;
}
.number
{
font-size
:
18px
;
font-weight
:
600
;
color
:
#1e293b
;
}
}
}
}
.member-list
{
display
:
flex
;
flex-direction
:
column
;
height
:
445px
;
.list-header
{
position
:
sticky
;
top
:
0
;
z-index
:
1
;
display
:
grid
;
grid-template-columns
:
2fr
1fr
1
.5fr
;
padding
:
12px
16px
;
background
:
#f8fafc
;
font-size
:
14px
;
color
:
#64748b
;
font-weight
:
500
;
border-bottom
:
1px
solid
#e2e8f0
;
span
{
flex
:
1
;
text-align
:
center
;
}
}
.list-body
{
height
:
100%
;
overflow-y
:
auto
;
-webkit-overflow-scrolling
:
touch
;
&
.custom-scroll
{
&
:
:-
webkit-scrollbar
{
width
:
4px
;
}
&
:
:-
webkit-scrollbar-track
{
background
:
#f1f1f1
;
border-radius
:
2px
;
}
&
:
:-
webkit-scrollbar-thumb
{
background
:
#ccc
;
border-radius
:
2px
;
&
:hover
{
background
:
#999
;
}
}
}
.member-item
{
display
:
grid
;
grid-template-columns
:
2fr
1fr
1
.5fr
;
padding
:
4px
8px
;
border-bottom
:
1px
solid
#e2e8f0
;
font-size
:
14px
;
align-items
:
center
;
background
:
white
;
span
{
text-align
:
center
;
}
&
:last-child
{
border-bottom
:
none
;
}
.account
{
color
:
#1e293b
;
font-family
:
monospace
;
}
.name
{
color
:
#475569
;
}
.date
{
color
:
#64748b
;
}
}
}
.empty-state
{
padding
:
40px
0
;
text-align
:
center
;
color
:
#94a3b8
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
.var-icon
{
margin-bottom
:
12px
;
}
p
{
margin
:
0
;
font-size
:
14px
;
}
}
}
</
style
>
\ No newline at end of file
src/views/user/zjmx.vue
View file @
9ea2ac50
...
...
@@ -53,9 +53,7 @@ const getList = async () => {
}
else
{
pageNum
.
value
++
}
if
(
list
.
value
.
length
>=
total
.
value
)
{
finished
.
value
=
true
}
}
else
{
showFailToast
(
res
.
msg
||
'
加载失败
'
)
finished
.
value
=
true
...
...
vite.config.ts
View file @
9ea2ac50
...
...
@@ -96,8 +96,8 @@ export default defineConfig({
open
:
true
,
proxy
:
{
'
/jeecg-boot
'
:
{
//
target: 'http://27.124.5.14:8080',
target
:
'
https://www.yzcxyh18.com
'
,
target
:
'
http://27.124.5.14:8080
'
,
//
target: 'https://www.yzcxyh18.com',
changeOrigin
:
true
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment