Commit 8daf4ab9 authored by 王炽's avatar 王炽

666666

parent cd557ffe
No preview for this file type
......@@ -45,13 +45,13 @@
<view class="vip-info">
<text class="vip-name"
:style="{
color: islogin.value ? '#b27c1e' : '#6f6d67',
color: islogin ? '#b27c1e' : '#6f6d67',
}"
>{{`${nickName}`}}</text>
<view class="title-container">
<text class="vip-title">{{`${item?.vipName}`}}</text>
<button
v-if="!islogin.value"
v-if="true || !islogin"
type="primary"
class="phone-button"
open-type="getPhoneNumber"
......@@ -99,7 +99,15 @@
>
<!-- 第一行 -->
<view class="header-row">
<view class="integral-value">
<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
class="strategy-icon"
:src="$baseUrl + `integral/1001/${vipIntegral?.gonglue?.img}`"
......@@ -167,7 +175,7 @@
/>
<button
v-if="!islogin.value"
v-if="!islogin"
type="primary"
class="phone-button-qyIcon"
open-type="getPhoneNumber"
......@@ -304,22 +312,40 @@
/>
</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>
<RegisterLayer
v-model="showRegisterLayer"
@confirm="handleRegisterConfirm"
@cancel="handleRegisterCancel"
/>
</view>
<RegisterLayer v-model="showRegisterLayer" />
</template>
<script setup>
// 轮播图数据可在此定义(当前使用静态路径)
// "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 { useUserStore } from "@/stores/user";
import { fetchIntegralJSON } from '../api/integral';
import RegisterLayer from "../components/RegisterLayer.vue";
const integralData = ref({
swiper: [
......@@ -704,12 +730,43 @@
});
return;
}
console.log("detail=", e.detail);
await userStore.phoneCallback(e.detail);
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();
// memberInfo.value = userStore.memberInfo;
};
// 处理注册取消
const handleRegisterCancel = () => {
showRegisterLayer.value = false;
console.log("注册取消");
};
......@@ -770,6 +827,9 @@
if(islogin.value){
nickName.value = memberInfo.value.memberName;
// 清空之前的数据
vipLvDatas.value = [];
memberInfo.value?.gradeList.forEach((element, index) => {
vipLvDatas.value.push({
"vipName" : element.gradeName,
......@@ -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>
......@@ -942,11 +1017,27 @@
display: flex;
justify-content: space-between;
.integral-value{
background-color: #6f6d67;
margin-left: 26rpx;
margin-top: 23rpx;
.integral-text {
font-size: 28rpx;
color: #1d1e25;
margin-left: 26rpx;
margin-top: 23rpx;
margin-right: 13rpx;
}
.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 {
......@@ -1240,6 +1331,41 @@
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;
// }
// }
}
......
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