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
8daf4ab9
Commit
8daf4ab9
authored
Jun 11, 2025
by
王炽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
666666
parent
cd557ffe
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
139 additions
and
13 deletions
+139
-13
.DS_Store
.DS_Store
+0
-0
.DS_Store
integral/.DS_Store
+0
-0
nextLvTips.png
integral/1001/nextLvTips.png
+0
-0
Integral.vue
views/Integral.vue
+139
-13
No files found.
.DS_Store
View file @
8daf4ab9
No preview for this file type
integral/.DS_Store
0 → 100644
View file @
8daf4ab9
File added
integral/1001/nextLvTips.png
0 → 100644
View file @
8daf4ab9
4.17 KB
views/Integral.vue
View file @
8daf4ab9
...
@@ -45,13 +45,13 @@
...
@@ -45,13 +45,13 @@
<view
class=
"vip-info"
>
<view
class=
"vip-info"
>
<text
class=
"vip-name"
<text
class=
"vip-name"
:style=
"
{
:style=
"
{
color: islogin
.value
? '#b27c1e' : '#6f6d67',
color: islogin ? '#b27c1e' : '#6f6d67',
}"
}"
>
{{
`${nickName
}
`
}}
<
/text
>
>
{{
`${nickName
}
`
}}
<
/text
>
<
view
class
=
"title-container"
>
<
view
class
=
"title-container"
>
<
text
class
=
"vip-title"
>
{{
`${item?.vipName
}
`
}}
<
/text
>
<
text
class
=
"vip-title"
>
{{
`${item?.vipName
}
`
}}
<
/text
>
<
button
<
button
v
-
if
=
"
!islogin.value
"
v
-
if
=
"
true || !islogin
"
type
=
"primary"
type
=
"primary"
class
=
"phone-button"
class
=
"phone-button"
open
-
type
=
"getPhoneNumber"
open
-
type
=
"getPhoneNumber"
...
@@ -99,7 +99,15 @@
...
@@ -99,7 +99,15 @@
>
>
<!--
第一行
-->
<!--
第一行
-->
<
view
class
=
"header-row"
>
<
view
class
=
"header-row"
>
<
view
class
=
"integral-value"
>
<
text
class
=
"integral-text"
>
积分
<
/text
>
<
text
class
=
"integral-text"
>
积分
<
/text
>
<
text
class
=
"integral-total"
>
{{
`(累计${recentAnnualPointsTotal
}
/${nextGradeScoreRuleMin
}
)`
}}
<
/text
>
<
image
class
=
"next-icon"
:
src
=
"$baseUrl + 'integral/1001/nextLvTips.png'"
mode
=
"aspectFit"
/>
<
/view
>
<
image
<
image
class
=
"strategy-icon"
class
=
"strategy-icon"
:
src
=
"$baseUrl + `integral/1001/${vipIntegral?.gonglue?.img
}
`"
:
src
=
"$baseUrl + `integral/1001/${vipIntegral?.gonglue?.img
}
`"
...
@@ -167,7 +175,7 @@
...
@@ -167,7 +175,7 @@
/>
/>
<
button
<
button
v
-
if
=
"!islogin
.value
"
v
-
if
=
"!islogin"
type
=
"primary"
type
=
"primary"
class
=
"phone-button-qyIcon"
class
=
"phone-button-qyIcon"
open
-
type
=
"getPhoneNumber"
open
-
type
=
"getPhoneNumber"
...
@@ -304,22 +312,40 @@
...
@@ -304,22 +312,40 @@
/>
/>
<
/view
>
<
/view
>
<!--
测试注册层按钮(开发调试用)
-->
<!--
<
view
class
=
"test-register-btn"
@
click
=
"showRegisterDialog"
v
-
if
=
"!islogin"
>
<
text
class
=
"test-btn-text"
>
测试注册层
<
/text
>
<
/view> --
>
<!--
调试信息(开发调试用)
-->
<!--
<
view
class
=
"debug-info"
v
-
if
=
"!islogin"
>
<
text
class
=
"debug-text"
>
登录状态
:
{{
islogin
?
'已登录'
:
'未登录'
}}
<
/text
>
<
text
class
=
"debug-text"
>
注册层状态
:
{{
showRegisterLayer
?
'显示'
:
'隐藏'
}}
<
/text
>
<
text
class
=
"debug-text"
>
用户昵称
:
{{
nickName
}}
<
/text
>
<
/view> --
>
<!--
积分底部填充位置
-->
<!--
积分底部填充位置
-->
<
view
class
=
"content"
>
<
view
class
=
"content"
>
<
/view
>
<
/view
>
<
RegisterLayer
v
-
model
=
"showRegisterLayer"
@
confirm
=
"handleRegisterConfirm"
@
cancel
=
"handleRegisterCancel"
/>
<
/view
>
<
/view
>
<
RegisterLayer
v
-
model
=
"showRegisterLayer"
/>
<
/template
>
<
/template
>
<
script
setup
>
<
script
setup
>
// 轮播图数据可在此定义(当前使用静态路径)
// 轮播图数据可在此定义(当前使用静态路径)
// "rgba(255,255,255,0.5)"
// "rgba(255,255,255,0.5)"
import
{
ref
,
onMounted
,
onBeforeMount
,
computed
}
from
'vue'
;
import
{
ref
,
onMounted
,
onBeforeMount
,
computed
,
watch
}
from
'vue'
;
import
{
jump
,
JumpType
}
from
'@/utils/index.js'
import
{
jump
,
JumpType
}
from
'@/utils/index.js'
import
{
useUserStore
}
from
"@/stores/user"
;
import
{
useUserStore
}
from
"@/stores/user"
;
import
{
fetchIntegralJSON
}
from
'../api/integral'
;
import
{
fetchIntegralJSON
}
from
'../api/integral'
;
import
RegisterLayer
from
"../components/RegisterLayer.vue"
;
const
integralData
=
ref
({
const
integralData
=
ref
({
swiper
:
[
swiper
:
[
...
@@ -704,12 +730,43 @@
...
@@ -704,12 +730,43 @@
}
);
}
);
return
;
return
;
}
}
console
.
log
(
"detail="
,
e
.
detail
);
await
userStore
.
phoneCallback
(
e
.
detail
);
showRegisterLayer
.
value
=
true
;
showRegisterLayer
.
value
=
true
;
islogin
.
value
=
true
;
await
userStore
.
phoneCallback
(
e
.
detail
);
// try
{
// await userStore.phoneCallback(e.detail);
// await userStore.loadMemberInfo();
// initNetData();
// // 检查是否需要显示注册层
// // 如果是新用户或需要补充宝宝信息,显示注册层
// if (userStore.memberInfo && userStore.memberInfo.memberId !== "not_login")
{
// // 显示注册层
// showRegisterLayer.value = true;
// console.log("用户登录成功,显示注册层 showRegisterLayer=", showRegisterLayer.value);
//
}
//
}
catch
(
error
)
{
// console.error("手机号授权处理失败:", error);
// uni.showToast(
{
// title: "登录失败,请重试",
// icon: "none"
//
}
);
//
}
}
;
// 处理注册确认
const
handleRegisterConfirm
=
(
babyInfo
)
=>
{
console
.
log
(
"注册确认,宝宝信息:"
,
babyInfo
);
showRegisterLayer
.
value
=
false
;
initNetData
();
initNetData
();
// memberInfo.value = userStore.memberInfo;
}
;
// 处理注册取消
const
handleRegisterCancel
=
()
=>
{
showRegisterLayer
.
value
=
false
;
console
.
log
(
"注册取消"
);
}
;
}
;
...
@@ -770,6 +827,9 @@
...
@@ -770,6 +827,9 @@
if
(
islogin
.
value
){
if
(
islogin
.
value
){
nickName
.
value
=
memberInfo
.
value
.
memberName
;
nickName
.
value
=
memberInfo
.
value
.
memberName
;
// 清空之前的数据
vipLvDatas
.
value
=
[];
memberInfo
.
value
?.
gradeList
.
forEach
((
element
,
index
)
=>
{
memberInfo
.
value
?.
gradeList
.
forEach
((
element
,
index
)
=>
{
vipLvDatas
.
value
.
push
({
vipLvDatas
.
value
.
push
({
"vipName"
:
element
.
gradeName
,
"vipName"
:
element
.
gradeName
,
...
@@ -787,6 +847,21 @@
...
@@ -787,6 +847,21 @@
}
}
}
}
// 手动显示注册层(用于测试)
const
showRegisterDialog
=
()
=>
{
console
.
log
(
'手动显示注册层'
);
showRegisterLayer
.
value
=
true
;
}
// 添加 watch 监听 showRegisterLayer 变化
// watch(showRegisterLayer, (newVal, oldVal) =>
{
// console.log('showRegisterLayer 状态变化:',
{
// 旧值: oldVal,
// 新值: newVal,
// 时间: new Date().toLocaleString()
//
}
);
//
}
,
{
immediate
:
true
}
);
<
/script
>
<
/script
>
...
@@ -942,11 +1017,27 @@
...
@@ -942,11 +1017,27 @@
display: flex;
display: flex;
justify-content: space-between;
justify-content: space-between;
.integral-value{
background-color: #6f6d67;
margin-left: 26rpx;
margin-top: 23rpx;
.integral-text {
.integral-text {
font-size: 28rpx;
font-size: 28rpx;
color: #1d1e25;
color: #1d1e25;
margin-left: 26rpx;
margin-right: 13rpx;
margin-top: 23rpx;
}
.integral-total{
// position: absolute;
font-size: 24rpx;
color:#1d1e25
}
.next-icon{
margin-top: -60rpx;
margin-left: -30rpx;
width: 66rpx;
height: 27rpx;
// position: absolute;
}
}
}
.strategy-icon {
.strategy-icon {
...
@@ -1240,6 +1331,41 @@
...
@@ -1240,6 +1331,41 @@
height: 180rpx;
height: 180rpx;
}
}
// 测试注册层按钮样式
// .test-register-btn {
// width: 300rpx;
// height: 80rpx;
// background: #d3a358;
// border-radius: 40rpx;
// display: flex;
// align-items: center;
// justify-content: center;
// margin: 20rpx auto;
// .test-btn-text {
// font-size: 28rpx;
// color: #fff;
// font-weight: 500;
//
}
//
}
// 调试信息样式
// .debug-info {
// width: 600rpx;
// margin: 20rpx auto;
// padding: 20rpx;
// background: rgba(0, 0, 0, 0.1);
// border-radius: 10rpx;
// .debug-text {
// display: block;
// font-size: 24rpx;
// color: #666;
// margin-bottom: 10rpx;
// line-height: 1.5;
//
}
//
}
}
}
...
...
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