Commit 681a5479 authored by spc's avatar spc

fixed

parent 2402f40d
No preview for this file type
...@@ -140,6 +140,7 @@ const generateQrcodeFunc = async () => { ...@@ -140,6 +140,7 @@ const generateQrcodeFunc = async () => {
const result = await generateQRCode({ const result = await generateQRCode({
scene: `id=${props.recordId}`, scene: `id=${props.recordId}`,
page: `pages/XingmaLabDetailPage/XingmaLabDetailPage`, page: `pages/XingmaLabDetailPage/XingmaLabDetailPage`,
// TODO: 切换环境 需要切换envVersion
envVersion: 'release'//trial develop release envVersion: 'release'//trial develop release
}) })
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</view> </view>
<view class="content-right"> <view class="content-right">
<view <view
:class="(item.prized === 0 || (item.prized !== 1 && Date.now() > new Date(item.signupEndTime).getTime())) ? 'btn gray' : 'btn'"> :class="(item.prized === 0 || (item.signupState !== 1 && Date.now() > new Date(item.signupEndTime).getTime())) ? 'btn gray' : 'btn'">
{{ formatStatus(item) }} {{ formatStatus(item) }}
</view> </view>
</view> </view>
...@@ -80,12 +80,11 @@ ...@@ -80,12 +80,11 @@
<script setup> <script setup>
import { ref, nextTick, computed } from 'vue' import { ref, nextTick, computed } from 'vue'
import { onLoad,onShow, onReachBottom } from '@dcloudio/uni-app' import { onLoad, onReachBottom } from '@dcloudio/uni-app'
import { activityListApi, signupListApi } from '@/api/momclub/index.js'; import { activityListApi, signupListApi } from '@/api/momclub/index.js';
import md from "../../md.js"; import md from "../../md.js";
import { useUserStore } from "@/stores/user"; import { useUserStore } from "@/stores/user";
const userStore = useUserStore(); const userStore = useUserStore();
const isShare = ref('')
const currentPage = ref(1) const currentPage = ref(1)
const pageSize = ref(10) const pageSize = ref(10)
const loadMore = ref(false) const loadMore = ref(false)
...@@ -219,7 +218,18 @@ onReachBottom(() => { ...@@ -219,7 +218,18 @@ onReachBottom(() => {
getInfo(searchType.value) getInfo(searchType.value)
}) })
}) })
// 登录获取 cuk
const wxAutoLogin = async () => {
let cuk = uni.getStorageSync('cuk');
let memberId = uni.getStorageSync('memberId');
// 如果本地没有缓存登录信息,则需要登录
console.log(cuk ,memberId,'cukkkkk')
if (!cuk || !memberId) {
await new Promise(resolve => {
userStore.syWxAutoLogin(resolve)
})
}
}
onLoad(async(options) => { onLoad(async(options) => {
md.sensorSignTake({ md.sensorSignTake({
hdjhPage: "true", hdjhPage: "true",
...@@ -229,32 +239,13 @@ onLoad(async(options) => { ...@@ -229,32 +239,13 @@ onLoad(async(options) => {
}); });
loadMoreFlag.value = true loadMoreFlag.value = true
searchType.value = options.type ? options.type : '' searchType.value = options.type ? options.type : ''
isShare.value = options.share ? options.share : '' if(options.share && options.share == 'true'){
getInfo(searchType.value)
})
// 登录获取 cuk
const wxAutoLogin = async () => {
await new Promise(resolve => {
userStore.syWxAutoLogin(resolve)
})
}
onShow(async()=> {
console.log(isShare.value,'onShow---')
if(isShare.value == 'true'){
// 确保登录以获取 cuk // 确保登录以获取 cuk
await wxAutoLogin() await wxAutoLogin()
await userStore.loadUserInfo() await userStore.loadUserInfo()
console.log(userStore.userInfo,'userStore.userInfo?.memberId') console.log(userStore.userInfo,'userStore.userInfo?.memberId')
if ((userStore?.userInfo?.memberId && userStore?.userInfo?.memberId == "not_login") || !userStore.userInfo) {
//非会员 未登录,跳转到登录注册页面
uni.navigateTo({
url: `/pages/activity/register`
})
return
}
getInfo(searchType.value)
} }
getInfo(searchType.value)
}) })
</script> </script>
......
...@@ -321,7 +321,7 @@ const hasFilledOutList = (list) => { ...@@ -321,7 +321,7 @@ const hasFilledOutList = (list) => {
} }
.custom-radio { .custom-radio {
margin: -40rpx 45rpx 0rpx 0rpx; margin: -40rpx 35rpx 0rpx 0rpx;
display: flex; display: flex;
align-items: center; align-items: center;
image { image {
......
...@@ -2,16 +2,14 @@ ...@@ -2,16 +2,14 @@
<uni-popup ref="noticePopup" :mask-click="false" type="center"> <uni-popup ref="noticePopup" :mask-click="false" type="center">
<view class="popup-container"> <view class="popup-container">
<view class="title-box"> <view class="title-box">
<view class=""> <view class="title-empty"></view>
<view class="title">星妈会活动参与协议</view>
</view> <view @click="close" class="title-img">
<view class="title"> <image :src="$baseUrl + 'sign-up/cross.png'" mode="aspectFit" />
星妈会活动参与协议
</view> </view>
<image @click="close" :src="$baseUrl + 'sign-up/cross.png'" mode="aspectFit" />
</view> </view>
<!-- 可滚动内容区域 --> <!-- 可滚动内容区域 -->
<scroll-view class="content-box" scroll-y @scroll="onScroll" @scrolltolower="onScrollLower"> <scroll-view class="content-box" scroll-y @scrolltolower="onScrollLower">
<view class="sub-title">发布/更新于:2025年12月1日 </view> <view class="sub-title">发布/更新于:2025年12月1日 </view>
<view class="sub-content"> <view class="sub-content">
<text class="sub-tips">重要提示:本协议是您与星妈会之间关于参与线下活动的法律文件。为使您更好地参与活动并保障您的合法权益,星妈会特别提示您仔细阅读、理解并同意本协议的全部内容,特别是其中加粗或以其他显著方式标识的,与您的权益(可能)有重大关系的条款(包括但不限于免除、限制星妈会责任的条款及争议解决条款)。如您对本协议的任何条款存在疑问,请在报名前通过官方公布的联系方式与我们联系。如您不同意本协议的任何内容,您应立即停止活动报名程序。</text> <text class="sub-tips">重要提示:本协议是您与星妈会之间关于参与线下活动的法律文件。为使您更好地参与活动并保障您的合法权益,星妈会特别提示您仔细阅读、理解并同意本协议的全部内容,特别是其中加粗或以其他显著方式标识的,与您的权益(可能)有重大关系的条款(包括但不限于免除、限制星妈会责任的条款及争议解决条款)。如您对本协议的任何条款存在疑问,请在报名前通过官方公布的联系方式与我们联系。如您不同意本协议的任何内容,您应立即停止活动报名程序。</text>
...@@ -85,11 +83,6 @@ ...@@ -85,11 +83,6 @@
<view class="read-text"> <view class="read-text">
本人知晓并同意《星妈会活动协议》全部条款 本人知晓并同意《星妈会活动协议》全部条款
</view> </view>
<!-- <checkbox-group @change="onChange">
<checkbox value="1" :checked="isAgree[0] == 1">
本人已认真、完整地阅读了本协议全文,尤其是加粗部分的条款,充分理解其含义及可能产生的法律后果,并自愿同意接受本协议全部内容的约束
</checkbox>
</checkbox-group> -->
</view> </view>
</scroll-view> </scroll-view>
<view :class="!isBottom ? 'btn-box':'btn-box btn-opaque'"> <view :class="!isBottom ? 'btn-box':'btn-box btn-opaque'">
...@@ -120,17 +113,6 @@ const noticePopup = ref(null) ...@@ -120,17 +113,6 @@ const noticePopup = ref(null)
//是否到达中奖公布日期 //是否到达中奖公布日期
const isBottom=ref(false) const isBottom=ref(false)
// 滚动事件处理 - 核心方法 // 滚动事件处理 - 核心方法
const onScroll=(e)=> {
// const { scrollHeight, scrollTop, height } = e.detail;
// // 检测是否滚动到底部(留5px容错)
// const isAtBottom = scrollHeight - scrollTop <= height + 5;
// // console.log(e.detail, scrollHeight, scrollTop, height,isAtBottom,'滚动个----')
// if (isAtBottom && !isBottom.value) {
// isBottom.value = true
// } else if (!isAtBottom && isBottom.value) {
// isBottom.value = false
// }
}
const onScrollLower=()=>{ const onScrollLower=()=>{
console.log(isBottom.value,'到底部') console.log(isBottom.value,'到底部')
if(!isBottom.value){ if(!isBottom.value){
...@@ -177,14 +159,23 @@ defineExpose({ ...@@ -177,14 +159,23 @@ defineExpose({
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.title-empty{
width: 50rpx;
}
.title{ .title{
font-weight: 600; font-weight: 600;
font-size: 36rpx; font-size: 36rpx;
color: #D3A458; color: #D3A458;
} }
image { .title-img{
width: 19rpx; width: 50rpx;
height: 19rpx; height: 50rpx;
line-height: 50rpx;
text-align: center;
image {
width: 19rpx;
height: 19rpx;
}
} }
} }
.content-box{ .content-box{
...@@ -201,12 +192,10 @@ defineExpose({ ...@@ -201,12 +192,10 @@ defineExpose({
font-weight: 600; font-weight: 600;
} }
.sub-content{ .sub-content{
// color: #A8A8A8;
font-size: 20rpx; font-size: 20rpx;
text-align: justify; text-align: justify;
margin: 30rpx 0rpx; margin: 30rpx 0rpx;
.sub-tips{ .sub-tips{
// color: #000000;
font-weight: 600; font-weight: 600;
} }
} }
......
...@@ -384,9 +384,15 @@ onLoad((options) => { ...@@ -384,9 +384,15 @@ onLoad((options) => {
}) })
// 登录获取 cuk // 登录获取 cuk
const wxAutoLogin = async () => { const wxAutoLogin = async () => {
await new Promise(resolve => { let cuk = uni.getStorageSync('cuk');
let memberId = uni.getStorageSync('memberId');
// 如果本地没有缓存登录信息,则需要登录
console.log(cuk ,memberId,'cukkkkk')
if (!cuk || !memberId) {
await new Promise(resolve => {
userStore.syWxAutoLogin(resolve) userStore.syWxAutoLogin(resolve)
}) })
}
} }
onShow(async()=> { onShow(async()=> {
...@@ -395,7 +401,7 @@ onShow(async()=> { ...@@ -395,7 +401,7 @@ onShow(async()=> {
uni.removeStorageSync('needRefresh'); uni.removeStorageSync('needRefresh');
isShowSignUp.value = true isShowSignUp.value = true
} }
if (query.value.share == 'true') { if (query.value.share && query.value.share == 'true') {
// 确保登录以获取 cuk // 确保登录以获取 cuk
await wxAutoLogin() await wxAutoLogin()
await userStore.loadUserInfo() await userStore.loadUserInfo()
......
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