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
c9a24b8b
Commit
c9a24b8b
authored
Aug 18, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
b7e90c1c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
456 additions
and
267 deletions
+456
-267
monthGift.js
api/monthGift.js
+2
-1
request.js
api/request.js
+2
-2
babyClass.vue
components/pointRightsCom/babyClass.vue
+91
-86
monthGift.vue
components/pointRightsCom/monthGift.vue
+245
-119
yearGift.vue
components/pointRightsCom/yearGift.vue
+111
-54
yearGiftImages.js
components/pointRightsCom/yearGiftImages.js
+5
-5
No files found.
api/monthGift.js
View file @
c9a24b8b
...
@@ -40,7 +40,8 @@ data:{
...
@@ -40,7 +40,8 @@ data:{
receiveStatus:1,//优惠券状态 0-未领取 1-已领取
receiveStatus:1,//优惠券状态 0-未领取 1-已领取
receiveTime:1,//领取时间
receiveTime:1,//领取时间
}
}
]
],
next2810Countdown:0,//2810活动倒计时
}
}
*/
*/
...
...
api/request.js
View file @
c9a24b8b
...
@@ -15,11 +15,11 @@ const {
...
@@ -15,11 +15,11 @@ const {
// request.js
// request.js
// 通常可以吧 baseUrl 单独放在一个 js 文件了
// 通常可以吧 baseUrl 单独放在一个 js 文件了
//
const baseUrl = "http://172.16.230.108:7777/pmall";
const
baseUrl
=
"http://172.16.230.108:7777/pmall"
;
// const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
// const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
// let baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// let baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
// const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
const
baseUrl
=
"https://feihe.m.duibatest.com.cn/pmall"
//
const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
const
request
=
(
options
=
{})
=>
{
const
request
=
(
options
=
{})
=>
{
// 在这里可以对请求头进行一些设置
// 在这里可以对请求头进行一些设置
...
...
components/pointRightsCom/babyClass.vue
View file @
c9a24b8b
This diff is collapsed.
Click to expand it.
components/pointRightsCom/monthGift.vue
View file @
c9a24b8b
This diff is collapsed.
Click to expand it.
components/pointRightsCom/yearGift.vue
View file @
c9a24b8b
...
@@ -22,10 +22,9 @@
...
@@ -22,10 +22,9 @@
<image
class=
"diamondthreeaward"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.DIAMOND.THREE.AWARD}`"
<image
class=
"diamondthreeaward"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.DIAMOND.THREE.AWARD}`"
mode="aspectFit">
mode="aspectFit">
</image>
</image>
<image
class=
"diamondthreebtn"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.DIAMOND.THREE.BTN}`"
<view
class=
"diamondthreebtn active"
@
click=
"handleButtonClick('diamond')"
>
mode="aspectFit" @click="handleButtonClick('diamond')">
<text>
{{
buttonInfo
.
text
}}
</text>
</image>
</view>
</view>
</view>
</view>
</view>
...
@@ -52,10 +51,9 @@
...
@@ -52,10 +51,9 @@
</image>
</image>
<image
class=
"starshinethreeaward"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.STARSHINE.THREE.AWARD}`"
<image
class=
"starshinethreeaward"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.STARSHINE.THREE.AWARD}`"
mode="aspectFit">
</image>
mode="aspectFit">
</image>
<image
class=
"starshinethreebtn"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.STARSHINE.THREE.BTN}`"
<view
class=
"starshinethreebtn starshine"
@
click=
"handleButtonClick('starshine')"
>
mode="aspectFit" @click="handleButtonClick('starshine')">
<text>
{{
buttonInfo
.
text
}}
</text>
</image>
</view>
</view>
</view>
</view>
</view>
...
@@ -82,10 +80,9 @@
...
@@ -82,10 +80,9 @@
</image>
</image>
<image
class=
"starlightthreeaward"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.STARLIGHT.THREE.AWARD}`"
<image
class=
"starlightthreeaward"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.STARLIGHT.THREE.AWARD}`"
mode="aspectFit">
</image>
mode="aspectFit">
</image>
<image
class=
"starlightthreebtn"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.STARLIGHT.THREE.BTN}`"
<view
class=
"starlightthreebtn starlight"
@
click=
"handleButtonClick('starlight')"
>
mode="aspectFit" @click="handleButtonClick('starlight')">
<text>
{{
buttonInfo
.
text
}}
</text>
</image>
</view>
</view>
</view>
</view>
</view>
...
@@ -106,9 +103,9 @@
...
@@ -106,9 +103,9 @@
</image>
</image>
<image
class=
"goldthreeaward"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.GOLD.THREE.AWARD}`" mode="aspectFit">
<image
class=
"goldthreeaward"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.GOLD.THREE.AWARD}`" mode="aspectFit">
</image>
</image>
<
image
class=
"goldthreebtn"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.GOLD.THREE.BTN}`" mode="aspectFit"
<
view
class=
"goldthreebtn gold"
@
click=
"handleButtonClick('gold')"
>
@click="handleButtonClick('gold')">
</image
>
<text>
{{
buttonInfo
.
text
}}
</text
>
</view>
</view>
</view>
<image
class=
"goldlocktip"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.GOLD.LOCKTIP}`" mode="aspectFit">
</image>
<image
class=
"goldlocktip"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.GOLD.LOCKTIP}`" mode="aspectFit">
</image>
</view>
</view>
...
@@ -138,10 +135,9 @@
...
@@ -138,10 +135,9 @@
<image
class=
"platinumthreebg"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.PLATINUM.THREE.BG}`"
<image
class=
"platinumthreebg"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.PLATINUM.THREE.BG}`"
mode="aspectFit">
mode="aspectFit">
</image>
</image>
<image
class=
"platinumthreebtn"
:src=
"`$
{$baseUrl}${YEAR_GIFT_IMAGES.PLATINUM.THREE.BTN}`"
<view
class=
"platinumthreebtn platinum"
@
click=
"handleButtonClick('platinum')"
>
mode="aspectFit" @click="handleButtonClick('platinum')">
<text>
{{
buttonInfo
.
text
}}
</text>
</image>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -188,48 +184,34 @@ const userLevelName = computed(() => LEVEL_MAP[props.userLevel])
...
@@ -188,48 +184,34 @@ const userLevelName = computed(() => LEVEL_MAP[props.userLevel])
const
buttonInfo
=
computed
(()
=>
{
const
buttonInfo
=
computed
(()
=>
{
const
levelOrder
=
[
0
,
1
,
2
,
3
,
4
];
// gold, platinum, diamond, starlight, starshine
const
levelOrder
=
[
0
,
1
,
2
,
3
,
4
];
// gold, platinum, diamond, starlight, starshine
const
userLevelIndex
=
levelOrder
.
indexOf
(
props
.
userLevel
);
const
userLevelIndex
=
levelOrder
.
indexOf
(
props
.
userLevel
);
const
requiredLevelIndex
=
levelOrder
.
indexOf
(
props
.
currentLevel
);
const
diamondIndex
=
levelOrder
.
indexOf
(
2
);
// Diamond level
const
platinumIndex
=
levelOrder
.
indexOf
(
1
);
// Platinum level
if
(
userLevelIndex
<
requiredLevelIndex
)
{
return
{
if
(
userLevelIndex
<=
platinumIndex
)
{
text
:
'待解锁'
,
action
:
'none'
};
}
else
if
(
state
.
isReceived
)
{
return
{
return
{
text
:
'
已领取
'
,
text
:
'
去升级
'
,
action
:
'
non
e'
action
:
'
upgrad
e'
};
};
}
else
{
}
else
if
(
userLevelIndex
>=
diamondIndex
)
{
return
{
return
{
text
:
'
立即领取
'
,
text
:
'
去查看
'
,
action
:
'
receive
'
action
:
'
view
'
};
};
}
}
})
})
// 按钮点击事件处理
// 按钮点击事件处理
const
handleButtonClick
=
()
=>
{
const
handleButtonClick
=
()
=>
{
if
(
buttonInfo
.
value
.
action
===
'receive'
)
{
if
(
buttonInfo
.
value
.
action
===
'upgrade'
)
{
// 检查用户等级是否符合领取条件
const
levelOrder
=
[
0
,
1
,
2
,
3
,
4
];
// gold, platinum, diamond, starlight, starshine
const
userLevelIndex
=
levelOrder
.
indexOf
(
props
.
userLevel
);
const
requiredLevelIndex
=
levelOrder
.
indexOf
(
props
.
currentLevel
);
if
(
userLevelIndex
<
requiredLevelIndex
)
{
uni
.
showToast
({
title
:
'等级不够,无法领取'
,
icon
:
'none'
,
duration
:
2000
});
return
;
}
receiveYearGift
();
}
else
if
(
buttonInfo
.
value
.
action
===
'upgrade'
)
{
// 跳转到升级页面
// 跳转到升级页面
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/upgrade/upgradeGuide'
url
:
'/pages/upgrade/upgradeGuide'
});
});
}
else
if
(
buttonInfo
.
value
.
action
===
'view'
)
{
// 跳转到查看页面
uni
.
navigateTo
({
url
:
'/pages/webview/webview?url=https://member.feihe.com/memberH5/#/coupon'
});
}
}
}
}
</
script
>
</
script
>
...
@@ -237,7 +219,7 @@ const handleButtonClick = () => {
...
@@ -237,7 +219,7 @@ const handleButtonClick = () => {
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.yeargift {
.yeargift {
width: 686rpx;
width: 686rpx;
height: 1
139
rpx;
height: 1
218
rpx;
left: 0rpx;
left: 0rpx;
top: 0rpx;
top: 0rpx;
right: 0rpx;
right: 0rpx;
...
@@ -358,7 +340,7 @@ const handleButtonClick = () => {
...
@@ -358,7 +340,7 @@ const handleButtonClick = () => {
left: 61rpx;
left: 61rpx;
top: 436rpx;
top: 436rpx;
position: absolute;
position: absolute;
cursor: pointer;
transition: transform 0.2s ease;
transition: transform 0.2s ease;
&:active {
&:active {
...
@@ -473,7 +455,7 @@ const handleButtonClick = () => {
...
@@ -473,7 +455,7 @@ const handleButtonClick = () => {
left: 61rpx;
left: 61rpx;
top: 436rpx;
top: 436rpx;
position: absolute;
position: absolute;
cursor: pointer;
transition: transform 0.2s ease;
transition: transform 0.2s ease;
&:active {
&:active {
...
@@ -588,7 +570,7 @@ const handleButtonClick = () => {
...
@@ -588,7 +570,7 @@ const handleButtonClick = () => {
left: 61rpx;
left: 61rpx;
top: 436rpx;
top: 436rpx;
position: absolute;
position: absolute;
cursor: pointer;
transition: transform 0.2s ease;
transition: transform 0.2s ease;
&:active {
&:active {
...
@@ -703,7 +685,7 @@ const handleButtonClick = () => {
...
@@ -703,7 +685,7 @@ const handleButtonClick = () => {
left: 61rpx;
left: 61rpx;
top: 436rpx;
top: 436rpx;
position: absolute;
position: absolute;
cursor: pointer;
transition: transform 0.2s ease;
transition: transform 0.2s ease;
&:active {
&:active {
...
@@ -833,7 +815,7 @@ const handleButtonClick = () => {
...
@@ -833,7 +815,7 @@ const handleButtonClick = () => {
left: 61rpx;
left: 61rpx;
top: 436rpx;
top: 436rpx;
position: absolute;
position: absolute;
cursor: pointer;
transition: transform 0.2s ease;
transition: transform 0.2s ease;
&:active {
&:active {
...
@@ -845,4 +827,79 @@ const handleButtonClick = () => {
...
@@ -845,4 +827,79 @@ const handleButtonClick = () => {
}
}
}
}
}
}
/* 按钮样式 */
.diamondthreebtn,
.starshinethreebtn,
.starlightthreebtn,
.goldthreebtn,
.platinumthreebtn {
display: flex;
align-items: center;
justify-content: center;
border-radius: 42.5rpx;
font-size: 32rpx;
font-weight: bold;
transition: transform 0.2s ease;
&.active {
background: linear-gradient(to right, #7253a5, #9879cc);
/* 钻石 */
color: #fff;
box-shadow: 0 4rpx 12rpx rgba(114, 83, 165, 0.3);
&:active {
transform: scale(0.95);
box-shadow: 0 2rpx 8rpx rgba(114, 83, 165, 0.4);
}
}
&.starshine {
background: linear-gradient(to right, #000000, #2c1600);
/* 星耀 */
color: #fff;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.3);
&:active {
transform: scale(0.95);
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.4);
}
}
&.starlight {
background: linear-gradient(to right, #cda36b, #e0b97d);
/* 星光 */
color: #fff;
box-shadow: 0 4rpx 12rpx rgba(205, 163, 107, 0.3);
&:active {
transform: scale(0.95);
box-shadow: 0 2rpx 8rpx rgba(205, 163, 107, 0.4);
}
}
&.gold {
background: linear-gradient(to right, #906632, #ab7a44);
/* 黄金 */
color: #fff;
box-shadow: 0 4rpx 12rpx rgba(144, 102, 50, 0.3);
&:active {
transform: scale(0.95);
box-shadow: 0 2rpx 8rpx rgba(144, 102, 50, 0.4);
}
}
&.platinum {
background: linear-gradient(to right, #5189c0, #6fa2d5);
/* 白金 */
color: #fff;
box-shadow: 0 4rpx 12rpx rgba(81, 137, 192, 0.3);
&:active {
transform: scale(0.95);
box-shadow: 0 2rpx 8rpx rgba(81, 137, 192, 0.4);
}
}
}
</
style
>
</
style
>
components/pointRightsCom/yearGiftImages.js
View file @
c9a24b8b
...
@@ -15,7 +15,7 @@ export const YEAR_GIFT_IMAGES = {
...
@@ -15,7 +15,7 @@ export const YEAR_GIFT_IMAGES = {
},
},
THREE
:
{
THREE
:
{
BG
:
`pointRights/YearGift/
${
version
}
/diamondThreeBg.png`
,
BG
:
`pointRights/YearGift/
${
version
}
/diamondThreeBg.png`
,
AWARD
:
`pointRights/YearGift/
${
version
}
/
diamondThreeAward
.png`
,
AWARD
:
`pointRights/YearGift/
${
version
}
/
goldThreeAward2
.png`
,
BTN
:
`pointRights/YearGift/
${
version
}
/diamondThreeBtn.png`
BTN
:
`pointRights/YearGift/
${
version
}
/diamondThreeBtn.png`
}
}
},
},
...
@@ -33,7 +33,7 @@ export const YEAR_GIFT_IMAGES = {
...
@@ -33,7 +33,7 @@ export const YEAR_GIFT_IMAGES = {
},
},
THREE
:
{
THREE
:
{
BG
:
`pointRights/YearGift/
${
version
}
/starshineThreeBg.png`
,
BG
:
`pointRights/YearGift/
${
version
}
/starshineThreeBg.png`
,
AWARD
:
`pointRights/YearGift/
${
version
}
/
starshineThreeAward
.png`
,
AWARD
:
`pointRights/YearGift/
${
version
}
/
goldThreeAward2
.png`
,
BTN
:
`pointRights/YearGift/
${
version
}
/starshineThreeBtn.png`
BTN
:
`pointRights/YearGift/
${
version
}
/starshineThreeBtn.png`
}
}
},
},
...
@@ -51,7 +51,7 @@ export const YEAR_GIFT_IMAGES = {
...
@@ -51,7 +51,7 @@ export const YEAR_GIFT_IMAGES = {
},
},
THREE
:
{
THREE
:
{
BG
:
`pointRights/YearGift/
${
version
}
/starlightThreeBg.png`
,
BG
:
`pointRights/YearGift/
${
version
}
/starlightThreeBg.png`
,
AWARD
:
`pointRights/YearGift/
${
version
}
/
starlightThreeAward
.png`
,
AWARD
:
`pointRights/YearGift/
${
version
}
/
goldThreeAward2
.png`
,
BTN
:
`pointRights/YearGift/
${
version
}
/starlightThreeBtn.png`
BTN
:
`pointRights/YearGift/
${
version
}
/starlightThreeBtn.png`
}
}
},
},
...
@@ -69,7 +69,7 @@ export const YEAR_GIFT_IMAGES = {
...
@@ -69,7 +69,7 @@ export const YEAR_GIFT_IMAGES = {
},
},
THREE
:
{
THREE
:
{
BG
:
`pointRights/YearGift/
${
version
}
/goldThreeBg.png`
,
BG
:
`pointRights/YearGift/
${
version
}
/goldThreeBg.png`
,
AWARD
:
`pointRights/YearGift/
${
version
}
/goldThreeAward.png`
,
AWARD
:
`pointRights/YearGift/
${
version
}
/goldThreeAward
2
.png`
,
BTN
:
`pointRights/YearGift/
${
version
}
/goldThreeBtn.png`
BTN
:
`pointRights/YearGift/
${
version
}
/goldThreeBtn.png`
},
},
LOCKTIP
:
`pointRights/YearGift/
${
version
}
/goldLockTip.png`
LOCKTIP
:
`pointRights/YearGift/
${
version
}
/goldLockTip.png`
...
@@ -89,7 +89,7 @@ export const YEAR_GIFT_IMAGES = {
...
@@ -89,7 +89,7 @@ export const YEAR_GIFT_IMAGES = {
},
},
THREE
:
{
THREE
:
{
BG
:
`pointRights/YearGift/
${
version
}
/platinumThreeBg.png`
,
BG
:
`pointRights/YearGift/
${
version
}
/platinumThreeBg.png`
,
AWARD
:
`pointRights/YearGift/
${
version
}
/
platinumThreeAward
.png`
,
AWARD
:
`pointRights/YearGift/
${
version
}
/
goldThreeAward2
.png`
,
BTN
:
`pointRights/YearGift/
${
version
}
/platinumThreeBtn.png`
BTN
:
`pointRights/YearGift/
${
version
}
/platinumThreeBtn.png`
}
}
}
}
...
...
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