Commit 75e5ec8e authored by spc's avatar spc

fixed

parent e1139d43
...@@ -4,25 +4,14 @@ ...@@ -4,25 +4,14 @@
<Brand v-if="globalStore.curTabIndex == 1 && !globalStore.isWxFriendCircle" :scroll-top="scrollTop" /> <Brand v-if="globalStore.curTabIndex == 1 && !globalStore.isWxFriendCircle" :scroll-top="scrollTop" />
<Integral v-if="globalStore.curTabIndex == 2 && !globalStore.isWxFriendCircle" :scrollTop="scrollTop" /> <Integral v-if="globalStore.curTabIndex == 2 && !globalStore.isWxFriendCircle" :scrollTop="scrollTop" />
<My v-if="globalStore.curTabIndex == 3 && !globalStore.isWxFriendCircle" /> <My v-if="globalStore.curTabIndex == 3 && !globalStore.isWxFriendCircle" />
<TabBar <TabBar v-if="!globalStore.isWxFriendCircle" :curTabIndex="globalStore.curTabIndex" @tabClick="handleTabClick" />
v-if="!globalStore.isWxFriendCircle"
:curTabIndex="globalStore.curTabIndex"
@tabClick="handleTabClick"
/>
<WxFriendCircleSimplePage v-if="globalStore.isWxFriendCircle" /> <WxFriendCircleSimplePage v-if="globalStore.isWxFriendCircle" />
<!-- 邀请奖品弹窗 --> <!-- 邀请奖品弹窗 -->
<InvitePrizePanel <InvitePrizePanel :visible="globalStore.isShowInvitePrizePanel" :inviteCount="globalStore.inviteCount"
:visible="globalStore.isShowInvitePrizePanel" :prizeName="globalStore.prizeName" :prizeImage="globalStore.prizeImage" :prizeType="globalStore.prizeType"
:inviteCount="globalStore.inviteCount" :memberId="globalStore.memberId" @close="handleCloseInvitePrizePanel" @record="handleInvitePrizePanelRecord"
:prizeName="globalStore.prizeName" @prize="handleInvitePrizePanelPrize" />
:prizeImage="globalStore.prizeImage"
:prizeType="globalStore.prizeType"
:memberId="globalStore.memberId"
@close="handleCloseInvitePrizePanel"
@record="handleInvitePrizePanelRecord"
@prize="handleInvitePrizePanelPrize"
/>
<!-- 任务完成弹窗 --> <!-- 任务完成弹窗 -->
<!-- <TaskComplete <!-- <TaskComplete
...@@ -34,61 +23,32 @@ ...@@ -34,61 +23,32 @@
/> --> /> -->
<!-- 任务弹窗 --> <!-- 任务弹窗 -->
<TaskPop <TaskPop :visible="globalStore.isShowTaskPop" :taskTodo="globalStore.taskTodo" @close="handleCloseTaskPop"
:visible="globalStore.isShowTaskPop" @taskClick="handleTaskClick" />
:taskTodo="globalStore.taskTodo"
@close="handleCloseTaskPop"
@taskClick="handleTaskClick"
/>
<!-- 任务完成提示弹窗 --> <!-- 任务完成提示弹窗 -->
<TaskCompleteTips <TaskCompleteTips :visible="globalStore.isShowTaskComplete" :points="globalStore.taskCompletePoints"
:visible="globalStore.isShowTaskComplete" :taskTitle="globalStore.taskCompleteTitle" @close="handleCloseTaskCompleteTips" />
:points="globalStore.taskCompletePoints"
:taskTitle="globalStore.taskCompleteTitle"
@close="handleCloseTaskCompleteTips"
/>
<!-- 任务信息弹窗 --> <!-- 任务信息弹窗 -->
<TaskPerson <TaskPerson :visible="globalStore.isShowTaskPerson" @close="handleCloseTaskPerson"
:visible="globalStore.isShowTaskPerson" @submit="handleTaskPersonSubmit" />
@close="handleCloseTaskPerson"
@submit="handleTaskPersonSubmit"
/>
<!-- 公众号弹窗 --> <!-- 公众号弹窗 -->
<GongzhonghaoPop <GongzhonghaoPop :visible="showGongzhonghaoPop" :title="gongzhonghaoTitle" :description="gongzhonghaoDescription"
:visible="showGongzhonghaoPop" :qrCodeUrl="gongzhonghaoQrCodeUrl" @close="handleCloseGongzhonghaoPop" @download="handleDownloadQrCode" />
:title="gongzhonghaoTitle"
:description="gongzhonghaoDescription"
:qrCodeUrl="gongzhonghaoQrCodeUrl"
@close="handleCloseGongzhonghaoPop"
@download="handleDownloadQrCode"
/>
<!-- 视频弹窗 --> <!-- 视频弹窗 -->
<view v-if="showVideo" class="video-popup1"> <view v-if="showVideo" class="video-popup1">
<video <video :src="currentVideoUrl" controls autoplay :style="{ width: videoWidth + 'px', height: videoHeight + 'px' }"
:src="currentVideoUrl" @loadedmetadata="onVideoLoadedMeta" @play="onVideoPlay"></video>
controls
autoplay
:style="{ width: videoWidth + 'px', height: videoHeight + 'px' }"
@loadedmetadata="onVideoLoadedMeta"
@play="onVideoPlay"
></video>
<view class="close-btn-bottom" @tap="closeVideo">×</view> <view class="close-btn-bottom" @tap="closeVideo">×</view>
</view> </view>
<button <button v-if="isBackApp" class="back-app" open-type="launchApp" app-parameter="wechat"
v-if="isBackApp" @binderror="handleLaunchAppError" :style="{
class="back-app"
open-type="launchApp"
app-parameter="wechat"
@binderror="handleLaunchAppError"
:style="{
backgroundImage: `url(${$baseUrl}homepage/backAppBtn.png)`, backgroundImage: `url(${$baseUrl}homepage/backAppBtn.png)`,
}" }">
>
<!-- <text class="back-text">返回app</text> --> <!-- <text class="back-text">返回app</text> -->
</button> </button>
...@@ -96,11 +56,7 @@ ...@@ -96,11 +56,7 @@
<view class="auth-phone-module" v-if="!userStore.memberInfo?.mobile"> <view class="auth-phone-module" v-if="!userStore.memberInfo?.mobile">
<image class="auth-phone-bg" :src="$baseUrl + 'homepage/Q3Res/accessBg3.png'"></image> <image class="auth-phone-bg" :src="$baseUrl + 'homepage/Q3Res/accessBg3.png'"></image>
<view class="auth-phone-btn-container"> <view class="auth-phone-btn-container">
<image <image class="auth-phone-btn" :src="$baseUrl + 'homepage/Q3Res/accessBtn3.png'" @tap="handleAuthPhoneClick">
class="auth-phone-btn"
:src="$baseUrl + 'homepage/Q3Res/accessBtn3.png'"
@tap="handleAuthPhoneClick"
>
</image> </image>
</view> </view>
</view> </view>
...@@ -256,13 +212,13 @@ onMounted(async () => { ...@@ -256,13 +212,13 @@ onMounted(async () => {
// 关闭了任务奖励弹窗 // 关闭了任务奖励弹窗
const handleCloseTaskCompleteTips = async () => { const handleCloseTaskCompleteTips = async () => {
globalStore.isShowTaskComplete = false; globalStore.isShowTaskComplete = false;
await checkAndUpdateTaskResult(); await checkAndUpdateTaskResult();
// 如果当前在积分权益页,通过事件通知 Integral 组件刷新数据 // 如果当前在积分权益页,通过事件通知 Integral 组件刷新数据
if (globalStore.curTabIndex === 2) { if (globalStore.curTabIndex === 2) {
uni.$emit('refreshIntegralData'); uni.$emit('refreshIntegralData');
} }
}; };
// 完成任务并显示完成提示 // 完成任务并显示完成提示
...@@ -286,7 +242,7 @@ const handleTaskComplete = async (taskIdParam) => { ...@@ -286,7 +242,7 @@ const handleTaskComplete = async (taskIdParam) => {
globalStore.isShowTaskComplete = true; globalStore.isShowTaskComplete = true;
globalStore.taskCompletePoints = integralStore.queryTodoResult.data[0]?.actualCredits; globalStore.taskCompletePoints = integralStore.queryTodoResult.data[0]?.actualCredits;
globalStore.taskCompleteTitle = integralStore.queryTodoResult.data[0]?.taskName; globalStore.taskCompleteTitle = integralStore.queryTodoResult.data[0]?.taskName;
}else{ } else {
console.info('taskCompleteJSON res error:', integralStore.queryTodoResult); console.info('taskCompleteJSON res error:', integralStore.queryTodoResult);
} }
...@@ -308,6 +264,11 @@ onShow(async () => { ...@@ -308,6 +264,11 @@ onShow(async () => {
//完成了浏览任务 //完成了浏览任务
if (taskId.value > 0) { if (taskId.value > 0) {
await handleTaskComplete(taskId.value); await handleTaskComplete(taskId.value);
} else {
const integralStore = useIntegralStore();
await integralStore.getSigninAndTaskInfo();
await integralStore.queryTodoResultServer();
} }
}); });
...@@ -368,7 +329,7 @@ onShareAppMessage((e) => { ...@@ -368,7 +329,7 @@ onShareAppMessage((e) => {
title: integralStore.originInviteHome?.data?.invitationText, title: integralStore.originInviteHome?.data?.invitationText,
path: '/pages/invate/sharepage' + '?inviteCode=' + integralStore.originInviteHome?.data?.invitationCode, path: '/pages/invate/sharepage' + '?inviteCode=' + integralStore.originInviteHome?.data?.invitationCode,
imageUrl: imageUrl:
integralStore.originInviteHome?.data?.invitationImageUrl integralStore.originInviteHome?.data?.invitationImageUrl
}; };
} }
return shareOptions[pageType] || shareOptions[0]; return shareOptions[pageType] || shareOptions[0];
...@@ -453,7 +414,7 @@ const handleTaskClick = async (data) => { ...@@ -453,7 +414,7 @@ const handleTaskClick = async (data) => {
return; return;
} }
switch (data.task.taskTodoExtra.type) { switch (data.task.taskTodoExtra.type) {
case 'Perfect': case 'Perfect':
globalStore.closeTaskPop(); // 先关闭TaskPop globalStore.closeTaskPop(); // 先关闭TaskPop
...@@ -503,6 +464,7 @@ const handleTaskClick = async (data) => { ...@@ -503,6 +464,7 @@ const handleTaskClick = async (data) => {
// console.log('extra66666:', extra1); // console.log('extra66666:', extra1);
break; break;
case 'FirstOrder': //完成首单优选消费 case 'FirstOrder': //完成首单优选消费
globalStore.closeTaskPop(); // 先关闭TaskPop
const extra2 = JSON.parse(data?.task?.taskTodoExtra?.extra); const extra2 = JSON.parse(data?.task?.taskTodoExtra?.extra);
console.log('extra666661111:', extra2); console.log('extra666661111:', extra2);
jump({ jump({
...@@ -512,6 +474,7 @@ const handleTaskClick = async (data) => { ...@@ -512,6 +474,7 @@ const handleTaskClick = async (data) => {
}); });
break; break;
case 'EXCHANGE_GOODS': //消费商品 case 'EXCHANGE_GOODS': //消费商品
globalStore.closeTaskPop(); // 先关闭TaskPop
const extra3 = JSON.parse(data?.task?.taskTodoExtra?.extra); const extra3 = JSON.parse(data?.task?.taskTodoExtra?.extra);
if (extra3.length > 0) { if (extra3.length > 0) {
......
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