Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
cef01ba3
Commit
cef01ba3
authored
Aug 19, 2025
by
王炽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
66666
parent
b7013c8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
100 additions
and
43 deletions
+100
-43
request.js
api/request.js
+8
-8
monthGift.vue
components/pointRightsCom/monthGift.vue
+2
-2
Integral.vue
views/Integral.vue
+90
-33
No files found.
api/request.js
View file @
cef01ba3
...
...
@@ -44,10 +44,10 @@ const request = (options = {}) => {
})
.
then
((
data
)
=>
{
if
(
data
.
statusCode
!==
HTTP_STATUS
.
SUCCESS
)
{
uni
.
showToast
({
title
:
data
.
errMsg
,
icon
:
'none'
});
//
uni.showToast({
//
title: data.errMsg,
//
icon: 'none'
//
});
// 返回完整的响应数据,包括状态码和错误信息
reject
({
statusCode
:
data
.
statusCode
,
...
...
@@ -58,10 +58,10 @@ const request = (options = {}) => {
globalStore
.
setIsShowLoading
(
false
);
}
else
if
(
!
data
.
data
?.
ok
)
{
uni
.
showToast
({
title
:
data
.
data
?.
message
,
icon
:
'none'
});
//
uni.showToast({
//
title: data.data?.message,
//
icon: 'none'
//
});
// 返回业务逻辑错误的数据
reject
({
...
data
.
data
,
...
...
components/pointRightsCom/monthGift.vue
View file @
cef01ba3
...
...
@@ -955,7 +955,7 @@ onUnmounted(() => {
// 初始化
onMounted
(
async
()
=>
{
console
.
log
(
'MonthGift component mounted, current level:'
,
props
.
currentLevel
,
props
.
userLevel
)
await
fetchMonthlyGiftData
()
//
await fetchMonthlyGiftData()
})
// 调试函数:打印当前状态
...
...
@@ -1163,7 +1163,7 @@ watch(() => props.userLevel, (newUserLevel, oldUserLevel) => {
if
(
newUserLevel
!==
oldUserLevel
)
{
console
.
log
(
'newUserLevel'
,
newUserLevel
)
console
.
log
(
'Refreshing data due to userLevel change'
)
fetchMonthlyGiftData
()
//
fetchMonthlyGiftData()
}
},
{
immediate
:
false
})
...
...
views/Integral.vue
View file @
cef01ba3
...
...
@@ -76,7 +76,7 @@
<
text
class
=
"separator"
:
style
=
"{ color: getColor('jifen')[index]?.totalPoints
}
"
>
/</
text
>
<
text
class
=
"total-points"
:
style
=
"{ color: getColor('jifen')[index]?.totalPoints
}
"
>
{{
maxVal
[
index
]
}}
<
/text
>
:
style
=
"{ color: getColor('jifen')[index]?.totalPoints
}
"
>
{{
getHuangjinMaxVal
()
[
index
]
}}
<
/text
>
<
/text
>
<
/view
>
...
...
@@ -95,7 +95,7 @@
:
src
=
"$baseUrl + `integral/${tupianBanben
}
/barVip${index
}
.png`"
class
=
"progress-bar-fill"
mode
=
"aspectFit"
:
style
=
"{ transform: `translateX(${
(points/gradeList[index]?.gradeScoreRuleMax)*100 -
100
}
%)`
}
"
:
style
=
"{ transform: `translateX(${
getProgress(index) -
100
}
%)`
}
"
@
error
=
"onProgressBarError"
/>
<
/view
>
...
...
@@ -104,7 +104,7 @@
<
text
class
=
"current-xingyaodengji-tips"
v
-
if
=
"getHuangjinMaxVal()[index] == -1 && !(memberInfo.grade == 0 && !memberInfo.orderUpgrade && points == 1)"
:
style
=
"{ color:
'#f6cb9d'
}
"
:
style
=
"{ color:
getColor('jifen')[index]?.currentPoints
}
"
>
{{
memberInfo
.
grade
>
3
?
'您已经升至最高等级'
:
'您已超越该等级'
}}
<
/text
>
<
view
class
=
"saoma-tips"
v
-
if
=
"memberInfo.grade == 0 && !memberInfo.orderUpgrade && points == 1"
>
...
...
@@ -123,7 +123,7 @@
>
{{
points
}}
<
/text
>
<
text
class
=
"saoma-tips-text-tips-maxnum"
:
style
=
"{ color: getColor('saomaTips')[index]?.textColor
}
"
>
/{{
gradeList
[
index
]?
.gradeScoreRuleMax
}}
</
text
>
>
/{{
getHuangjinMaxVal
()[
index
]
}}
</
text
>
<
/text
>
<
/view
>
...
...
@@ -626,7 +626,7 @@ import YearGift from '../components/pointRightsCom/yearGift.vue';
}
const orderUpgrade = ref(false);
const maxVal = ref([]);
//
const maxVal = ref([]);
const integralData = ref({
"
tupianBanben
": "
1017
",
"
swiper
": [
...
...
@@ -788,44 +788,44 @@ import YearGift from '../components/pointRightsCom/yearGift.vue';
}
,
{
"img"
:
"mainfeiIcon0.png"
,
"width"
:
"
99
rpx"
,
"height"
:
"
99
rpx"
,
"width"
:
"
102
rpx"
,
"height"
:
"
102
rpx"
,
"name"
:
"免费问诊"
}
,
{
"img"
:
"aibenxinrenliIcon0.png"
,
"width"
:
"
99
rpx"
,
"height"
:
"
99
rpx"
,
"width"
:
"
102
rpx"
,
"height"
:
"
102
rpx"
,
"name"
:
"爱本新人礼"
}
,
{
"img"
:
"zhuanduanliIcon0.png"
,
"width"
:
"
99
rpx"
,
"height"
:
"
99
rpx"
,
"width"
:
"
102
rpx"
,
"height"
:
"
102
rpx"
,
"name"
:
"转段礼"
}
,
{
"img"
:
"zhousuiliIcon0.png"
,
"width"
:
"
99
rpx"
,
"height"
:
"
99
rpx"
,
"width"
:
"
102
rpx"
,
"height"
:
"
102
rpx"
,
"name"
:
"周岁礼"
}
,
{
"img"
:
"shengriliIcon0.png"
,
"width"
:
"
99
rpx"
,
"height"
:
"
99
rpx"
,
"width"
:
"
102
rpx"
,
"height"
:
"
102
rpx"
,
"name"
:
"生日礼"
}
,
{
"img"
:
"jinjiliIcon0.png"
,
"width"
:
"
99
rpx"
,
"height"
:
"
99
rpx"
,
"width"
:
"
102
rpx"
,
"height"
:
"
102
rpx"
,
"name"
:
"晋级礼"
}
,
{
"img"
:
"suyuanyouIcon0.png"
,
"width"
:
"
99
rpx"
,
"height"
:
"
99
rpx"
,
"width"
:
"
102
rpx"
,
"height"
:
"
102
rpx"
,
"name"
:
"溯源游"
}
],
...
...
@@ -1553,7 +1553,20 @@ import YearGift from '../components/pointRightsCom/yearGift.vue';
isshowShouqi
.
value
=
!
isshowShouqi
.
value
;
isshowQuanyiDetail
.
value
=
!
isshowQuanyiDetail
.
value
;
}
//原始数值:(points.value/maxVal.value[memberInfo.value.grade])*100;
const
getProgress
=
(
index
)
=>
{
let
progress
=
0
;
const
val
=
getHuangjinMaxVal
()[
index
];
console
.
log
(
'val666666=='
,
val
);
progress
=
(
points
.
value
/
val
)
*
100
;
if
(
progress
>
100
){
progress
=
100
;
}
if
(
progress
<
0
){
progress
=
0
;
}
return
progress
;
}
const
getColor
=
(
type
)
=>
{
let
colors
=
''
;
switch
(
type
){
...
...
@@ -1688,27 +1701,24 @@ import YearGift from '../components/pointRightsCom/yearGift.vue';
const
getHuangjinMaxVal
=
()
=>
{
let
maxVal
=
[];
console
.
log
(
'memberInfo.value.grade=='
,
memberInfo
.
value
.
grade
);
switch
(
memberInfo
.
value
.
grade
){
switch
(
Number
(
memberInfo
.
value
.
grade
)){
case
0
:
maxVal
=
[
1
,
1
,
1000
,
5000
,
10000
];
maxVal
=
[
gradeList
.
value
[
0
].
gradeScoreRuleMax
,
gradeList
.
value
[
1
].
gradeScoreRuleMin
,
gradeList
.
value
[
2
].
gradeScoreRuleMin
,
gradeList
.
value
[
3
].
gradeScoreRuleMin
,
gradeList
.
value
[
4
].
gradeScoreRuleMin
];
break
;
case
1
:
maxVal
=
[
-
1
,
1000
,
1000
,
5000
,
10000
];
maxVal
=
[
-
1
,
gradeList
.
value
[
1
].
gradeScoreRuleMax
,
gradeList
.
value
[
2
].
gradeScoreRuleMin
,
gradeList
.
value
[
3
].
gradeScoreRuleMin
,
gradeList
.
value
[
4
].
gradeScoreRuleMin
];
break
;
case
2
:
maxVal
=
[
-
1
,
-
1
,
5000
,
5000
,
10000
];
maxVal
=
[
-
1
,
-
1
,
gradeList
.
value
[
2
].
gradeScoreRuleMax
,
gradeList
.
value
[
3
].
gradeScoreRuleMin
,
gradeList
.
value
[
4
].
gradeScoreRuleMin
];
break
;
case
3
:
maxVal
=
[
-
1
,
-
1
,
-
1
,
10000
,
10000
];
maxVal
=
[
-
1
,
-
1
,
-
1
,
gradeList
.
value
[
3
].
gradeScoreRuleMax
,
gradeList
.
value
[
4
].
gradeScoreRuleMin
];
break
;
case
4
:
maxVal
=
[
-
1
,
-
1
,
-
1
,
-
1
,
-
1
];
break
;
}
console
.
log
(
'maxVal=='
,
maxVal
);
return
maxVal
;
}
onBeforeMount
(
async
()
=>
{
...
...
@@ -1721,7 +1731,7 @@ import YearGift from '../components/pointRightsCom/yearGift.vue';
onMounted
(
async
()
=>
{
showLoading
();
maxVal
.
value
=
getHuangjinMaxVal
();
//
maxVal.value = getHuangjinMaxVal();
mdMap
.
value
=
[];
...
...
@@ -1779,7 +1789,51 @@ import YearGift from '../components/pointRightsCom/yearGift.vue';
console
.
log
(
'initNetData'
);
memberInfo
.
value
=
userStore
.
memberInfo
;
memberInfo
.
value
=
{
"grade"
:
"3"
,
"gradeList"
:[{
"grade"
:
"0"
,
"gradeName"
:
"V1黄金会员"
,
"gradeScoreRuleMax"
:
1
,
"gradeScoreRuleMin"
:
-
2147483648
}
,{
"grade"
:
"1"
,
"gradeName"
:
"V2铂金会员"
,
"gradeScoreRuleMax"
:
1000
,
"gradeScoreRuleMin"
:
1
}
,{
"grade"
:
"2"
,
"gradeName"
:
"V3钻石会员"
,
"gradeScoreRuleMax"
:
5000
,
"gradeScoreRuleMin"
:
1000
}
,{
"grade"
:
"3"
,
"gradeName"
:
"V4星光会员"
,
"gradeScoreRuleMax"
:
10000
,
"gradeScoreRuleMin"
:
5000
}
,{
"grade"
:
"4"
,
"gradeName"
:
"V5星耀会员"
,
"gradeScoreRuleMax"
:
2147483647
,
"gradeScoreRuleMin"
:
10000
}
],
"gradeName"
:
"V4星光会员"
,
"maxGrade"
:
false
,
"memberId"
:
"CRM000000000948094264"
,
"memberName"
:
"文慧17637145052"
,
"mobile"
:
"17637145052"
,
"nextGradeScoreRuleMin"
:
10000
,
"orderUpgrade"
:
true
,
"points"
:
5001
,
"recentAnnualPointsTotal"
:
5500
,
"willExpiredPoints"
:
100000
}
// memberInfo.value =
{
// "grade": "2",
// "gradeList": [
//
{
// "grade": "0",
// "gradeName": "V1黄金会员",
// "gradeScoreRuleMax": 1,
// "gradeScoreRuleMin": -2147483648
//
}
,
//
{
// "grade": "1",
// "gradeName": "V2铂金会员",
// "gradeScoreRuleMax": 1000,
// "gradeScoreRuleMin": 1
//
}
,
//
{
// "grade": "2",
// "gradeName": "V3钻石会员",
// "gradeScoreRuleMax": 5000,
// "gradeScoreRuleMin": 1000
//
}
,
//
{
// "grade": "3",
// "gradeName": "V4星光会员",
// "gradeScoreRuleMax": 10000,
// "gradeScoreRuleMin": 5000
//
}
,
//
{
// "grade": "4",
// "gradeName": "V5星耀会员",
// "gradeScoreRuleMax": 2147483647,
// "gradeScoreRuleMin": 10000
//
}
// ],
// "gradeName": "V4星光会员",
// "maxGrade": false,
// "memberId": "CRM000000000948094264",
// "memberName": "文慧17637145052",
// "mobile": "17637145052",
// "nextGradeScoreRuleMin": 10000,
// "orderUpgrade": true,
// "points": 999,
// "recentAnnualPointsTotal": 5500,
// "willExpiredPoints": 100000
//
}
;
recentAnnualPointsTotal
.
value
=
memberInfo
.
value
.
recentAnnualPointsTotal
;
willExpiredPoints
.
value
=
memberInfo
.
value
.
willExpiredPoints
;
...
...
@@ -2236,7 +2290,9 @@ import YearGift from '../components/pointRightsCom/yearGift.vue';
switch
(
data
.
index
){
case
4000
:
if
(
memberInfo
.
value
?.
grade
<
2
){
gotoGonglue
();
}
break
;
case
3000
:
//去领取
...
...
@@ -2406,7 +2462,8 @@ import YearGift from '../components/pointRightsCom/yearGift.vue';
}
.
current
-
tag
{
top
:
32
rpx
;
top
:
30
rpx
;
left
:
0
rpx
;
width
:
121
rpx
;
height
:
40
rpx
;
position
:
absolute
;
...
...
@@ -2784,7 +2841,7 @@ import YearGift from '../components/pointRightsCom/yearGift.vue';
padding-left: 16rpx;
.privilege-item {
position: relative;
width:
99
rpx;
width:
102
rpx;
height: 140rpx;
// &:nth-child(1) { width: 68rpx; height: 87rpx;
}
// 月月礼
// &:nth-child(2) { width: 70rpx; height: 91rpx;
}
// 生日礼
...
...
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