Commit 09ff4637 authored by zhangchenchen's avatar zhangchenchen

feat: 鹤小飞资源位样式调整

parent 3d83a00b
import requestModule from './request.js'; import requestModule from './request.js';
const { const { api } = requestModule;
api
} = requestModule;
export const fetchBrandJSON = (type = 'brand_V1') => api.get('/c/front/content', { type });
export const fetchBrandJSON = () => api.get('/c/front/content',{type:'brand_V1'});
\ No newline at end of file
import requestModule from './request.js'; import requestModule from './request.js';
const { const { api } = requestModule;
api
} = requestModule;
/** /**
* 获取首页信息 * 获取首页信息
...@@ -9,11 +7,9 @@ const { ...@@ -9,11 +7,9 @@ const {
*/ */
export const fetchHomeInfo = () => api.get('/c/user/index'); export const fetchHomeInfo = () => api.get('/c/user/index');
export const fetchCanEatIndex = () => api.get('/c/eat/index'); export const fetchCanEatIndex = () => api.get('/c/eat/index');
export const fetchCanEatJoin = (data) => api.post('/c/eat/join', data); export const fetchCanEatJoin = (data) => api.post('/c/eat/join', data);
export const fetchHomeJSON = () => api.get('/c/front/content', { type: 'home_V1' }); export const fetchHomeJSON = (type = 'home_V1') => api.get('/c/front/content', { type });
export const fetchGameActConfigJSON = () => api.get('/c/front/content', { type: 'gameActConfig' }); export const fetchGameActConfigJSON = () => api.get('/c/front/content', { type: 'gameActConfig' });
import requestModule from './request.js'; import requestModule from './request.js';
const { const { api } = requestModule;
api
} = requestModule;
/** /**
* 获取积分信息 * 获取积分信息
* @returns * @returns
*/ */
export const fetchIntegralJSON = () => api.get('/c/front/content',{type:'integral_V1'}); export const fetchIntegralJSON = (type = 'integral_V1') => api.get('/c/front/content', { type });
/** /**
* 获取生日礼接口 * 获取生日礼接口
...@@ -35,7 +33,7 @@ export const getResourceList = () => api.get('/c/resource/list'); ...@@ -35,7 +33,7 @@ export const getResourceList = () => api.get('/c/resource/list');
export const getSigninAndTaskInfoJSON = () => api.get('/c/activity/todo/list'); export const getSigninAndTaskInfoJSON = () => api.get('/c/activity/todo/list');
//签到接口 //签到接口
export const checkInJSON = (activityId) => api.post('/c/activity/todo/checkIn', {activityId}); export const checkInJSON = (activityId) => api.post('/c/activity/todo/checkIn', { activityId });
//获取秒杀列表 //获取秒杀列表
export const getSeckillList = () => api.get('/c/seckill/list'); export const getSeckillList = () => api.get('/c/seckill/list');
...@@ -43,7 +41,7 @@ export const getSeckillList = () => api.get('/c/seckill/list'); ...@@ -43,7 +41,7 @@ export const getSeckillList = () => api.get('/c/seckill/list');
export const taskCompleteJSON = (activityId) => api.post('/c/activity/todo/complete', { activityId }); export const taskCompleteJSON = (activityId) => api.post('/c/activity/todo/complete', { activityId });
//获取异业券接口 //获取异业券接口
export const getPointsBenefitCouponJSON = () => api.get('/c/resource/pointsBenefit/coupon'); export const getPointsBenefitCouponJSON = (type) => api.get('/c/resource/pointsBenefit/coupon', { type });
//查询任务结果接口 //查询任务结果接口
export const queryTodoResultJSON = (activityId) => api.get('/c/activity/todo/queryTodoResult'); export const queryTodoResultJSON = (activityId) => api.get('/c/activity/todo/queryTodoResult');
...@@ -52,16 +50,18 @@ export const queryTodoResultJSON = (activityId) => api.get('/c/activity/todo/que ...@@ -52,16 +50,18 @@ export const queryTodoResultJSON = (activityId) => api.get('/c/activity/todo/que
export const getOriginInviteHomeJSON = () => api.get('/c/activity/origin_invite/home'); export const getOriginInviteHomeJSON = () => api.get('/c/activity/origin_invite/home');
//邀请助力接口 //邀请助力接口
export const assistInviteJSON = (invitationCode, wxUnionId) => api.post('/c/activity/origin_invite/assist', { export const assistInviteJSON = (invitationCode, wxUnionId) =>
api.post('/c/activity/origin_invite/assist', {
invitationCode, invitationCode,
wxUnionId wxUnionId,
}); });
//获取邀请记录列表接口 //获取邀请记录列表接口
export const getInvitationListJSON = () => api.get('/c/activity/origin_invite/invitationList'); export const getInvitationListJSON = () => api.get('/c/activity/origin_invite/invitationList');
//邀请绑定接口 //邀请绑定接口
export const originInviteBindJSON = (unionId, shareCode) => api.post('/c/api/activity/originInviteBind', { export const originInviteBindJSON = (unionId, shareCode) =>
api.post('/c/api/activity/originInviteBind', {
unionId, unionId,
shareCode shareCode,
}); });
import requestModule from './request.js'; import requestModule from './request.js';
const { const { api } = requestModule;
api
} = requestModule;
/** /**
* 获取用户信息 * 获取用户信息
...@@ -22,9 +20,10 @@ export const getGestationalWeeks = (dueDate) => api.get('/c/user/calGestationalW ...@@ -22,9 +20,10 @@ export const getGestationalWeeks = (dueDate) => api.get('/c/user/calGestationalW
* @param {*} code * @param {*} code
* @returns * @returns
*/ */
export const autoLoginByCode = (code) => api.get('/c/login/autologin', { export const autoLoginByCode = (code) =>
api.get('/c/login/autologin', {
code, code,
}); });
/** /**
* 手机号授权,调用微信手机号快速验证组件,获取encryptedData、iv、code * 手机号授权,调用微信手机号快速验证组件,获取encryptedData、iv、code
...@@ -46,18 +45,13 @@ export const fetchMemberInfo = () => api.get('/c/user/memberInfo'); ...@@ -46,18 +45,13 @@ export const fetchMemberInfo = () => api.get('/c/user/memberInfo');
*/ */
export const updateBabyInfo = (data) => api.post('/c/user/saveBaby', data); export const updateBabyInfo = (data) => api.post('/c/user/saveBaby', data);
export const fetchUserJSON = () => api.get('/c/front/content', { type: 'my_V1' }); export const fetchUserJSON = (type = 'my_V1') => api.get('/c/front/content', { type });
/** 查询用户是否参与生育补贴和鹤礼2.0*/ /** 查询用户是否参与生育补贴和鹤礼2.0*/
export const checkParticipation = (data) => api.get('/c/fertility/index', data); export const checkParticipation = (data) => api.get('/c/fertility/index', data);
export const doTerminate = () => api.post('/c/user/terminate'); export const doTerminate = () => api.post('/c/user/terminate');
/** /**
* 获取积分兑换记录列表(分页) * 获取积分兑换记录列表(分页)
* @param {Object} params - 请求参数 * @param {Object} params - 请求参数
...@@ -66,8 +60,6 @@ export const doTerminate = () => api.post('/c/user/terminate'); ...@@ -66,8 +60,6 @@ export const doTerminate = () => api.post('/c/user/terminate');
*/ */
export const getExchangeList = (params = {}) => api.get('/c/user/exchange/list', { params }); export const getExchangeList = (params = {}) => api.get('/c/user/exchange/list', { params });
/** /**
* *
* @param {orderNo} data * @param {orderNo} data
......
...@@ -4,14 +4,25 @@ ...@@ -4,14 +4,25 @@
<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 v-if="!globalStore.isWxFriendCircle" :curTabIndex="globalStore.curTabIndex" @tabClick="handleTabClick" /> <TabBar
v-if="!globalStore.isWxFriendCircle"
:curTabIndex="globalStore.curTabIndex"
@tabClick="handleTabClick"
/>
<WxFriendCircleSimplePage v-if="globalStore.isWxFriendCircle" /> <WxFriendCircleSimplePage v-if="globalStore.isWxFriendCircle" />
<!-- 邀请奖品弹窗 --> <!-- 邀请奖品弹窗 -->
<InvitePrizePanel :visible="globalStore.isShowInvitePrizePanel" :inviteCount="globalStore.inviteCount" <InvitePrizePanel
:prizeName="globalStore.prizeName" :prizeImage="globalStore.prizeImage" :prizeType="globalStore.prizeType" :visible="globalStore.isShowInvitePrizePanel"
:memberId="globalStore.memberId" @close="handleCloseInvitePrizePanel" @record="handleInvitePrizePanelRecord" :inviteCount="globalStore.inviteCount"
@prize="handleInvitePrizePanelPrize" /> :prizeName="globalStore.prizeName"
:prizeImage="globalStore.prizeImage"
:prizeType="globalStore.prizeType"
:memberId="globalStore.memberId"
@close="handleCloseInvitePrizePanel"
@record="handleInvitePrizePanelRecord"
@prize="handleInvitePrizePanelPrize"
/>
<!-- 任务完成弹窗 --> <!-- 任务完成弹窗 -->
<!-- <TaskComplete <!-- <TaskComplete
...@@ -23,43 +34,73 @@ ...@@ -23,43 +34,73 @@
/> --> /> -->
<!-- 任务弹窗 --> <!-- 任务弹窗 -->
<TaskPop :visible="globalStore.isShowTaskPop" :taskTodo="globalStore.taskTodo" @close="handleCloseTaskPop" <TaskPop
@taskClick="handleTaskClick" /> :visible="globalStore.isShowTaskPop"
:taskTodo="globalStore.taskTodo"
@close="handleCloseTaskPop"
@taskClick="handleTaskClick"
/>
<!-- 任务完成提示弹窗 --> <!-- 任务完成提示弹窗 -->
<TaskCompleteTips :visible="globalStore.isShowTaskComplete" :points="globalStore.taskCompletePoints" <TaskCompleteTips
:taskTitle="globalStore.taskCompleteTitle" @close="handleCloseTaskCompleteTips" /> :visible="globalStore.isShowTaskComplete"
:points="globalStore.taskCompletePoints"
:taskTitle="globalStore.taskCompleteTitle"
@close="handleCloseTaskCompleteTips"
/>
<!-- 任务信息弹窗 --> <!-- 任务信息弹窗 -->
<TaskPerson :visible="globalStore.isShowTaskPerson" @close="handleCloseTaskPerson" <TaskPerson
@submit="handleTaskPersonSubmit" /> :visible="globalStore.isShowTaskPerson"
@close="handleCloseTaskPerson"
@submit="handleTaskPersonSubmit"
/>
<!-- 公众号弹窗 --> <!-- 公众号弹窗 -->
<GongzhonghaoPop :visible="showGongzhonghaoPop" :title="gongzhonghaoTitle" :description="gongzhonghaoDescription" <GongzhonghaoPop
:qrCodeUrl="gongzhonghaoQrCodeUrl" @close="handleCloseGongzhonghaoPop" @download="handleDownloadQrCode" /> :visible="showGongzhonghaoPop"
: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 :src="currentVideoUrl" controls autoplay :style="{ width: videoWidth + 'px', height: videoHeight + 'px' }" <video
@loadedmetadata="onVideoLoadedMeta" @play="onVideoPlay"></video> :src="currentVideoUrl"
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>
<!-- 悬浮授权手机号模块 --> <!-- 悬浮授权手机号模块 -->
<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 class="auth-phone-btn" :src="$baseUrl + 'homepage/Q3Res/accessBtn3.png'" @tap="handleAuthPhoneClick"> <image
class="auth-phone-btn"
:src="$baseUrl + 'homepage/Q3Res/accessBtn3.png'"
@tap="handleAuthPhoneClick"
>
</image> </image>
</view> </view>
</view> </view>
...@@ -67,26 +108,26 @@ ...@@ -67,26 +108,26 @@
</template> </template>
<script setup> <script setup>
import { ref, getCurrentInstance, onMounted, nextTick } from "vue"; import { ref, getCurrentInstance, onMounted, nextTick } from 'vue';
import { onLoad, onShareAppMessage, onShareTimeline, onPageScroll, onShow } from "@dcloudio/uni-app"; import { onLoad, onShareAppMessage, onShareTimeline, onPageScroll, onShow } from '@dcloudio/uni-app';
import TabBar from "@/components/TabBar.vue"; import TabBar from '@/components/TabBar.vue';
import Home from "@/views/Home.vue"; import Home from '@/views/Home.vue';
import Brand from "@/views/Brand.vue"; import Brand from '@/views/Brand.vue';
import Integral from "@/views/Integral.vue"; import Integral from '@/views/Integral.vue';
import My from "@/views/My.vue"; import My from '@/views/My.vue';
import md from '@/md'; import md from '@/md';
import WxFriendCircleSimplePage from "@/components/WxFriendCircleSimplePage.vue"; import WxFriendCircleSimplePage from '@/components/WxFriendCircleSimplePage.vue';
import InvitePrizePanel from "@/components/integralArea/InvitePrizePanel.vue"; import InvitePrizePanel from '@/components/integralArea/InvitePrizePanel.vue';
// import TaskComplete from "@/components/qiandao/TaskComplete.vue"; // import TaskComplete from "@/components/qiandao/TaskComplete.vue";
import TaskPop from "@/components/renwu/TaskPop.vue"; import TaskPop from '@/components/renwu/TaskPop.vue';
import TaskPerson from "@/components/renwu/TaskPerson.vue"; import TaskPerson from '@/components/renwu/TaskPerson.vue';
import TaskCompleteTips from '@/components/renwu/TaskCompleteTips.vue'; import TaskCompleteTips from '@/components/renwu/TaskCompleteTips.vue';
import { useGlobalStore } from "@/stores/global.js"; import { useGlobalStore } from '@/stores/global.js';
import { useUserStore } from "@/stores/user.js"; import { useUserStore } from '@/stores/user.js';
import { jump, JumpType } from "../../utils"; import { jump, JumpType } from '../../utils';
import { taskCompleteJSON } from "../../api/integral"; import { taskCompleteJSON } from '../../api/integral';
import { useIntegralStore } from "@/stores/integral"; import { useIntegralStore } from '@/stores/integral';
import GongzhonghaoPop from "@/components/renwu/GongzhonghaoPop.vue"; import GongzhonghaoPop from '@/components/renwu/GongzhonghaoPop.vue';
const globalStore = useGlobalStore(); const globalStore = useGlobalStore();
const userStore = useUserStore(); const userStore = useUserStore();
...@@ -98,23 +139,22 @@ const isBackApp = ref(false); ...@@ -98,23 +139,22 @@ const isBackApp = ref(false);
const taskId = ref(0); const taskId = ref(0);
const shareOptions = { const shareOptions = {
0: { 0: {
title: "8000万中国妈妈信赖的育儿品牌", title: '8000万中国妈妈信赖的育儿品牌',
path: "/pages/index/index?pageType=home", path: '/pages/index/index?pageType=home',
imageUrl: $baseUrl + "share/share_home0901.jpg", imageUrl: $baseUrl + 'share/share_home0901.jpg',
}, },
1: { 1: {
title: "飞鹤提供家庭营养一站式解决方案", title: '飞鹤提供家庭营养一站式解决方案',
path: "/pages/index/index?pageType=brand", path: '/pages/index/index?pageType=brand',
imageUrl: $baseUrl + "share/share_brand.png", imageUrl: $baseUrl + 'share/share_brand.png',
}, },
2: { 2: {
title: "超凡吸收!更多妈妈推荐的奶粉", title: '超凡吸收!更多妈妈推荐的奶粉',
path: "/pages/index/index?pageType=integral", path: '/pages/index/index?pageType=integral',
imageUrl: $baseUrl + "share/share_integral.png", imageUrl: $baseUrl + 'share/share_integral.png',
}, },
}; };
// 公众号弹窗参数 // 公众号弹窗参数
const showGongzhonghaoPop = ref(false); const showGongzhonghaoPop = ref(false);
...@@ -128,7 +168,6 @@ const currentVideoUrl = ref(''); ...@@ -128,7 +168,6 @@ const currentVideoUrl = ref('');
const videoWidth = ref(375); const videoWidth = ref(375);
const videoHeight = ref(210); const videoHeight = ref(210);
// 处理返回APP失败的情况 // 处理返回APP失败的情况
const handleLaunchAppError = (e) => { const handleLaunchAppError = (e) => {
console.error('返回APP失败:', e.detail.errMsg); console.error('返回APP失败:', e.detail.errMsg);
...@@ -142,7 +181,7 @@ const handleLaunchAppError = (e) => { ...@@ -142,7 +181,7 @@ const handleLaunchAppError = (e) => {
uni.showToast({ uni.showToast({
title: errorMessage, title: errorMessage,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000,
}); });
}; };
...@@ -152,10 +191,10 @@ function handleTabClick({ index }) { ...@@ -152,10 +191,10 @@ function handleTabClick({ index }) {
if (!userStore.memberInfo?.mobile) { if (!userStore.memberInfo?.mobile) {
nextTick(() => { nextTick(() => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: `${['首页', '品牌', '积分', '我的'][index]}`, pageName: `${['首页', '品牌', '积分', '我的'][index]}`,
componentName: "去授权手机号引导", componentName: '去授权手机号引导',
componentContent: "去授权手机号引导" componentContent: '去授权手机号引导',
}); });
}); });
} }
...@@ -164,17 +203,16 @@ function handleTabClick({ index }) { ...@@ -164,17 +203,16 @@ function handleTabClick({ index }) {
// 处理授权手机号按钮点击 // 处理授权手机号按钮点击
const handleAuthPhoneClick = () => { const handleAuthPhoneClick = () => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: `${['首页', '品牌', '积分', '我的'][globalStore.curTabIndex]}`, pageName: `${['首页', '品牌', '积分', '我的'][globalStore.curTabIndex]}`,
componentName: "去授权手机号引导", componentName: '去授权手机号引导',
componentContent: "去授权手机号引导" componentContent: '去授权手机号引导',
}); });
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: '/pages/activity/register',
}) });
} };
// 检查任务结果并更新全局状态 // 检查任务结果并更新全局状态
const checkAndUpdateTaskResult = async () => { const checkAndUpdateTaskResult = async () => {
...@@ -212,7 +250,6 @@ onMounted(async () => { ...@@ -212,7 +250,6 @@ onMounted(async () => {
globalStore.prizeType = unclaimedPrize?.prizeType; globalStore.prizeType = unclaimedPrize?.prizeType;
globalStore.memberId = res.data?.memberId; globalStore.memberId = res.data?.memberId;
} }
} }
console.log('邀请活动首页数据:', res); console.log('邀请活动首页数据:', res);
}); });
...@@ -223,7 +260,6 @@ const handleCloseTaskCompleteTips = async () => { ...@@ -223,7 +260,6 @@ const handleCloseTaskCompleteTips = async () => {
await checkAndUpdateTaskResult(); await checkAndUpdateTaskResult();
}; };
// 完成任务并显示完成提示 // 完成任务并显示完成提示
const handleTaskComplete = async (taskIdParam) => { const handleTaskComplete = async (taskIdParam) => {
taskId.value = 0; taskId.value = 0;
...@@ -243,15 +279,13 @@ onShow(async () => { ...@@ -243,15 +279,13 @@ onShow(async () => {
if (!userStore.memberInfo?.mobile) { if (!userStore.memberInfo?.mobile) {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: `${['首页', '品牌', '积分', '我的'][globalStore.curTabIndex]}`, pageName: `${['首页', '品牌', '积分', '我的'][globalStore.curTabIndex]}`,
componentName: "去授权手机号引导", componentName: '去授权手机号引导',
componentContent: "去授权手机号引导" componentContent: '去授权手机号引导',
}); });
} }
//完成了浏览任务 //完成了浏览任务
if (taskId.value > 0) { if (taskId.value > 0) {
await handleTaskComplete(taskId.value); await handleTaskComplete(taskId.value);
...@@ -259,9 +293,9 @@ onShow(async () => { ...@@ -259,9 +293,9 @@ onShow(async () => {
}); });
onLoad((options) => { onLoad((options) => {
const optionsSync = wx.getEnterOptionsSync() const optionsSync = wx.getEnterOptionsSync();
if (optionsSync.scene == '1154') { if (optionsSync.scene == '1154') {
globalStore.setIsWxFriendCircle(true) globalStore.setIsWxFriendCircle(true);
} }
// 加载会员信息,确保能正确判断手机号授权状态 // 加载会员信息,确保能正确判断手机号授权状态
...@@ -274,19 +308,32 @@ onLoad((options) => { ...@@ -274,19 +308,32 @@ onLoad((options) => {
isBackApp.value = false; isBackApp.value = false;
} }
console.warn('options231', options, globalStore.isWxFriendCircle) if (
options.scene &&
typeof options.scene === 'string' &&
(options.scene.startsWith('home_') ||
options.scene.startsWith('brand_') ||
options.scene.startsWith('integral_') ||
options.scene.startsWith('my_'))
) {
const [page] = options.scene.split('_');
globalStore.setPreviewScene(page, options.scene);
options.pageType = page;
}
console.warn('options231', options, globalStore.isWxFriendCircle);
if (options.pageType) { if (options.pageType) {
switch (options.pageType) { switch (options.pageType) {
case "home": case 'home':
globalStore.setCurTabIndex(0); globalStore.setCurTabIndex(0);
break; break;
case "brand": case 'brand':
globalStore.setCurTabIndex(1); globalStore.setCurTabIndex(1);
break; break;
case "integral": case 'integral':
globalStore.setCurTabIndex(2); globalStore.setCurTabIndex(2);
break; break;
case "my": case 'my':
globalStore.setCurTabIndex(3); globalStore.setCurTabIndex(3);
break; break;
} }
...@@ -314,9 +361,6 @@ onPageScroll((e) => { ...@@ -314,9 +361,6 @@ onPageScroll((e) => {
// } // }
// }); // });
// 邀请奖品弹窗相关方法 // 邀请奖品弹窗相关方法
// const handleInviteClick = () => { // const handleInviteClick = () => {
// console.log('邀请按钮点击,显示奖品弹窗'); // console.log('邀请按钮点击,显示奖品弹窗');
...@@ -344,7 +388,8 @@ const handleCloseTaskComplete = () => { ...@@ -344,7 +388,8 @@ const handleCloseTaskComplete = () => {
globalStore.isShowTaskComplete = false; globalStore.isShowTaskComplete = false;
}; };
const handleAcceptTaskComplete = () => {//当前未用到 const handleAcceptTaskComplete = () => {
//当前未用到
// console.log('接受任务完成奖励'); // console.log('接受任务完成奖励');
// globalStore.isShowTaskComplete = false; // globalStore.isShowTaskComplete = false;
// 这里可以添加接受奖励后的逻辑 // 这里可以添加接受奖励后的逻辑
...@@ -355,7 +400,6 @@ const handleCloseTaskPop = () => { ...@@ -355,7 +400,6 @@ const handleCloseTaskPop = () => {
globalStore.closeTaskPop(); globalStore.closeTaskPop();
}; };
//去完成按钮,完成任务 //去完成按钮,完成任务
const handleTaskClick = async (data) => { const handleTaskClick = async (data) => {
console.log('任务点击:', data); console.log('任务点击:', data);
...@@ -364,7 +408,7 @@ const handleTaskClick = async (data) => { ...@@ -364,7 +408,7 @@ const handleTaskClick = async (data) => {
if (!data.task) { if (!data.task) {
uni.showToast({ uni.showToast({
title: '任务不存在', title: '任务不存在',
icon: 'none' icon: 'none',
}); });
return; return;
} }
...@@ -377,7 +421,7 @@ const handleTaskClick = async (data) => { ...@@ -377,7 +421,7 @@ const handleTaskClick = async (data) => {
globalStore.showTaskPerson(); // 延迟显示TaskPerson globalStore.showTaskPerson(); // 延迟显示TaskPerson
}, 100); }, 100);
break; break;
case 'BROWSE_PAGE'://浏览商城 case 'BROWSE_PAGE': //浏览商城
globalStore.closeTaskPop(); globalStore.closeTaskPop();
taskId.value = data?.task?.id; taskId.value = data?.task?.id;
// 这里可以设置任务ID用于后续完成检测 // 这里可以设置任务ID用于后续完成检测
...@@ -391,58 +435,57 @@ const handleTaskClick = async (data) => { ...@@ -391,58 +435,57 @@ const handleTaskClick = async (data) => {
jump({ jump({
type: JumpType.MINI, type: JumpType.MINI,
url: url, url: url,
extra: { envVersion: "release", appId: "wx4205ec55b793245e", embedded: true } extra: { envVersion: 'release', appId: 'wx4205ec55b793245e', embedded: true },
}); });
} else if (extra1.type == 'PAGE' || extra1.type == 'MINI_APP') { } else if (extra1.type == 'PAGE' || extra1.type == 'MINI_APP') {
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: extra1.url url: extra1.url,
}); });
} else if (extra1.type == 'MINI_APP_THIRD') { } else if (extra1.type == 'MINI_APP_THIRD') {
jump({ jump({
type: JumpType.MINI, type: JumpType.MINI,
url: extra1.url, url: extra1.url,
extra: { envVersion: "release", appId: extra1.value, embedded: true } extra: { envVersion: 'release', appId: extra1.value, embedded: true },
}); });
} else if (extra1.type == 'SELF_GOODS') { } else if (extra1.type == 'SELF_GOODS') {
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: `/v3/goodDetail/goodDetail?gid=${extra1.value}` url: `/v3/goodDetail/goodDetail?gid=${extra1.value}`,
}); });
} else { } else {
jump({ jump({
type: JumpType.H5, type: JumpType.H5,
url: extra1.url url: extra1.url,
}); });
} }
// console.log('extra66666:', extra1); // console.log('extra66666:', extra1);
break; break;
case 'FirstOrder'://完成首单优选消费 case 'FirstOrder': //完成首单优选消费
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({
type: JumpType.MINI, type: JumpType.MINI,
url: 'subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot', url: 'subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot',
extra: { envVersion: "release", appId: "wx4205ec55b793245e", embedded: true } extra: { envVersion: 'release', appId: 'wx4205ec55b793245e', embedded: true },
}); });
break; break;
case 'EXCHANGE_GOODS'://消费商品 case 'EXCHANGE_GOODS': //消费商品
const extra3 = JSON.parse(data?.task?.taskTodoExtra?.extra); const extra3 = JSON.parse(data?.task?.taskTodoExtra?.extra);
if (extra3.length > 0) { if (extra3.length > 0) {
let url = 'subPackages/shopMainProcess/product/index?productId={productId}&skuId={skuId}&entrySource=xmh_wechatmp_points_north'; let url =
'subPackages/shopMainProcess/product/index?productId={productId}&skuId={skuId}&entrySource=xmh_wechatmp_points_north';
url = url.replace('{productId}', extra3[0].itemId).replace('{skuId}', extra3[0].skuId); url = url.replace('{productId}', extra3[0].itemId).replace('{skuId}', extra3[0].skuId);
jump({ jump({
type: JumpType.MINI, type: JumpType.MINI,
url: url, url: url,
extra: { envVersion: "release", appId: "wx4205ec55b793245e", embedded: true } extra: { envVersion: 'release', appId: 'wx4205ec55b793245e', embedded: true },
}) });
} }
break; break;
case 'FollowWx'://关注公众号 case 'FollowWx': //关注公众号
globalStore.closeTaskPop(); // 先关闭TaskPop globalStore.closeTaskPop(); // 先关闭TaskPop
setTimeout(() => { setTimeout(() => {
// 设置公众号弹窗参数 // 设置公众号弹窗参数
...@@ -452,7 +495,7 @@ const handleTaskClick = async (data) => { ...@@ -452,7 +495,7 @@ const handleTaskClick = async (data) => {
showGongzhonghaoPop.value = true; // 延迟显示公众号弹窗 showGongzhonghaoPop.value = true; // 延迟显示公众号弹窗
}, 100); }, 100);
break; break;
case 'AddQw'://添加企业微信 case 'AddQw': //添加企业微信
globalStore.closeTaskPop(); // 先关闭TaskPop globalStore.closeTaskPop(); // 先关闭TaskPop
setTimeout(() => { setTimeout(() => {
// 设置公众号弹窗参数 // 设置公众号弹窗参数
...@@ -462,17 +505,17 @@ const handleTaskClick = async (data) => { ...@@ -462,17 +505,17 @@ const handleTaskClick = async (data) => {
showGongzhonghaoPop.value = true; // 延迟显示企业微信弹窗 showGongzhonghaoPop.value = true; // 延迟显示企业微信弹窗
}, 100); }, 100);
break; break;
case 'Register'://注册会员 case 'Register': //注册会员
// 这里可以处理注册逻辑 // 这里可以处理注册逻辑
uni.showToast({ uni.showToast({
title: '请先注册会员', title: '请先注册会员',
icon: 'none' icon: 'none',
}); });
break; break;
default: default:
uni.showToast({ uni.showToast({
title: '任务类型不支持', title: '任务类型不支持',
icon: 'none' icon: 'none',
}); });
break; break;
} }
...@@ -486,7 +529,7 @@ const handleCloseTaskPerson = () => { ...@@ -486,7 +529,7 @@ const handleCloseTaskPerson = () => {
// 关闭公众号弹窗 // 关闭公众号弹窗
const handleCloseGongzhonghaoPop = () => { const handleCloseGongzhonghaoPop = () => {
showGongzhonghaoPop.value = false; showGongzhonghaoPop.value = false;
} };
// 处理下载二维码 // 处理下载二维码
const handleDownloadQrCode = (title) => { const handleDownloadQrCode = (title) => {
...@@ -496,7 +539,7 @@ const handleDownloadQrCode = (title) => { ...@@ -496,7 +539,7 @@ const handleDownloadQrCode = (title) => {
md.sensorLogTake({ md.sensorLogTake({
xcxClick: `${title}拉起半屏二维码入口页面点击`, xcxClick: `${title}拉起半屏二维码入口页面点击`,
pageName: `${title}拉起半屏二维码入口页面点击`, pageName: `${title}拉起半屏二维码入口页面点击`,
buttonName: `下载二维码` buttonName: `下载二维码`,
}); });
if (title === '公众号') { if (title === '公众号') {
...@@ -506,9 +549,10 @@ const handleDownloadQrCode = (title) => { ...@@ -506,9 +549,10 @@ const handleDownloadQrCode = (title) => {
const courseUrl = 'https://course.feihe.com/momclub-picture/homepage/qrcode_qw.png'; const courseUrl = 'https://course.feihe.com/momclub-picture/homepage/qrcode_qw.png';
downloadQrCode(courseUrl); downloadQrCode(courseUrl);
} }
} };
const downloadQrCode = (imgurl) => {//现在二维码图片 const downloadQrCode = (imgurl) => {
//现在二维码图片
uni.downloadFile({ uni.downloadFile({
url: imgurl, url: imgurl,
success: (downloadRes) => { success: (downloadRes) => {
...@@ -518,31 +562,31 @@ const downloadQrCode = (imgurl) => {//现在二维码图片 ...@@ -518,31 +562,31 @@ const downloadQrCode = (imgurl) => {//现在二维码图片
success: (res) => { success: (res) => {
uni.showToast({ uni.showToast({
title: '保存成功', title: '保存成功',
icon: 'success' icon: 'success',
}); });
}, },
fail: (err) => { fail: (err) => {
uni.showToast({ uni.showToast({
title: '保存失败', title: '保存失败',
icon: 'none' icon: 'none',
}); });
} },
}); });
} else { } else {
uni.showToast({ uni.showToast({
title: '下载失败', title: '下载失败',
icon: 'none' icon: 'none',
}); });
} }
}, },
fail: (err) => { fail: (err) => {
uni.showToast({ uni.showToast({
title: '下载失败', title: '下载失败',
icon: 'none' icon: 'none',
}); });
} },
}); });
} };
const handleTaskPersonSubmit = (formData) => { const handleTaskPersonSubmit = (formData) => {
console.log('任务信息提交:', formData); console.log('任务信息提交:', formData);
...@@ -550,13 +594,12 @@ const handleTaskPersonSubmit = (formData) => { ...@@ -550,13 +594,12 @@ const handleTaskPersonSubmit = (formData) => {
// 可以显示成功提示 // 可以显示成功提示
uni.showToast({ uni.showToast({
title: '信息提交成功', title: '信息提交成功',
icon: 'success' icon: 'success',
}); });
}; };
// 视频弹窗相关方法 // 视频弹窗相关方法
const closeVideo = async () => { const closeVideo = async () => {
//完成了浏览任务 //完成了浏览任务
if (taskId.value > 0) { if (taskId.value > 0) {
await handleTaskComplete(taskId.value); await handleTaskComplete(taskId.value);
...@@ -571,7 +614,7 @@ const onVideoLoadedMeta = (e) => { ...@@ -571,7 +614,7 @@ const onVideoLoadedMeta = (e) => {
const pageWidth = uni.upx2px(750); const pageWidth = uni.upx2px(750);
const ratio = height / width; const ratio = height / width;
videoWidth.value = pageWidth; videoWidth.value = pageWidth;
videoHeight.value = pageWidth;// pageWidth * ratio; videoHeight.value = pageWidth; // pageWidth * ratio;
}; };
const onVideoPlay = () => { const onVideoPlay = () => {
...@@ -589,13 +632,11 @@ const onVideoPlay = () => { ...@@ -589,13 +632,11 @@ const onVideoPlay = () => {
} }
} }
.content { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
// .back-app{ // .back-app{
......
import { import { defineStore } from 'pinia';
defineStore
} from 'pinia';
const cuk = uni.getStorageSync('cuk') const cuk = uni.getStorageSync('cuk');
const openId = uni.getStorageSync('openId') const openId = uni.getStorageSync('openId');
const unionId = uni.getStorageSync('unionId') const unionId = uni.getStorageSync('unionId');
export const useGlobalStore = defineStore('global', { export const useGlobalStore = defineStore('global', {
state: () => { state: () => {
return { return {
cuk: cuk, // 用户登录后获取的凭证,调用接口时headers中携带 cuk: cuk, // 用户登录后获取的凭证,调用接口时headers中携带
curTabIndex: 0, // 当前Tab索引 curTabIndex: 0, // 当前Tab索引
isWxFriendCircle:false, isWxFriendCircle: false,
isShowLoading: false, isShowLoading: false,
openId: openId, openId: openId,
unionId: unionId, unionId: unionId,
...@@ -24,17 +22,18 @@ export const useGlobalStore = defineStore('global', { ...@@ -24,17 +22,18 @@ export const useGlobalStore = defineStore('global', {
isShowTaskPerson: false, // 是否显示任务信息弹窗 isShowTaskPerson: false, // 是否显示任务信息弹窗
taskTodo: [], // 任务数据 taskTodo: [], // 任务数据
invateUseType: '', // 邀请用户类型 invateUseType: '', // 邀请用户类型
previewScene: {}, // 预览场景
}; };
}, },
actions: { actions: {
setBaseUrl(url){ setBaseUrl(url) {
this.baseUrl = url this.baseUrl = url;
}, },
/** /**
* 设置用户cuk * 设置用户cuk
* @param {Object} cuk * @param {Object} cuk
*/ */
setCuk(cuk,openId,unionId) { setCuk(cuk, openId, unionId) {
this.cuk = cuk; this.cuk = cuk;
this.openId = openId; this.openId = openId;
this.unionId = unionId; this.unionId = unionId;
...@@ -54,12 +53,12 @@ export const useGlobalStore = defineStore('global', { ...@@ -54,12 +53,12 @@ export const useGlobalStore = defineStore('global', {
* 设置当前是否是小程序朋友圈单页环境 * 设置当前是否是小程序朋友圈单页环境
* @param {boolean} v * @param {boolean} v
*/ */
setIsWxFriendCircle(v){ setIsWxFriendCircle(v) {
this.isWxFriendCircle = v this.isWxFriendCircle = v;
}, },
setIsShowLoading(v){ setIsShowLoading(v) {
this.isShowLoading = v this.isShowLoading = v;
}, },
/** /**
...@@ -102,6 +101,24 @@ export const useGlobalStore = defineStore('global', { ...@@ -102,6 +101,24 @@ export const useGlobalStore = defineStore('global', {
closeTaskPerson() { closeTaskPerson() {
this.isShowTaskPerson = false; this.isShowTaskPerson = false;
}, },
/**
* 设置预览场景
* @param {*} page 页面名称,例如'home'、'brand'、'integral'、'my'
* @param {*} sceneValue 场景值,以页面名称开头,例如'home_1069'、'brand_1154'
*/
setPreviewScene(page, sceneValue) {
this.previewScene = {
[page]: sceneValue,
};
},
/**
* 获取预览场景
* @param {*} page 页面名称,例如'home'、'brand'、'integral'、'my'
* @returns 场景值,以页面名称开头,例如'home_1069'、'brand_1154'
*/
getPreviewScene(page) {
return this.previewScene[page];
},
/** /**
* 清除认证信息(注销时使用) * 清除认证信息(注销时使用)
......
import { defineStore } from "pinia"; import { defineStore } from 'pinia';
import { getSigninAndTaskInfoJSON, checkInJSON, getSeckillList, getPointsBenefitCouponJSON, queryTodoResultJSON, getOriginInviteHomeJSON, assistInviteJSON, getInvitationListJSON, originInviteBindJSON } from "../api/integral"; import {
getSigninAndTaskInfoJSON,
checkInJSON,
getSeckillList,
getPointsBenefitCouponJSON,
queryTodoResultJSON,
getOriginInviteHomeJSON,
assistInviteJSON,
getInvitationListJSON,
originInviteBindJSON,
} from '../api/integral';
import signinAndTaskInfoMock from '../mock/getSigninAndTaskInMock.json'; import signinAndTaskInfoMock from '../mock/getSigninAndTaskInMock.json';
import checkInMock from '../mock/checkIndata.json'; import checkInMock from '../mock/checkIndata.json';
import pointsBenefitCouponMock from '../mock/pointsBenefitCoupon.json'; import pointsBenefitCouponMock from '../mock/pointsBenefitCoupon.json';
...@@ -7,7 +17,7 @@ import queryTodoResultMock from '../mock/queryTodoResult.json'; ...@@ -7,7 +17,7 @@ import queryTodoResultMock from '../mock/queryTodoResult.json';
import originInviteHomeMock from '../mock/originInviteHome.json'; import originInviteHomeMock from '../mock/originInviteHome.json';
import assistInviteMock from '../mock/assistInvite.json'; import assistInviteMock from '../mock/assistInvite.json';
import invitationListMock from '../mock/invitationList.json'; import invitationListMock from '../mock/invitationList.json';
export const useIntegralStore = defineStore("integral", { export const useIntegralStore = defineStore('integral', {
state: () => { state: () => {
return { return {
_signinAndTaskInfo: null, _signinAndTaskInfo: null,
...@@ -23,23 +33,22 @@ export const useIntegralStore = defineStore("integral", { ...@@ -23,23 +33,22 @@ export const useIntegralStore = defineStore("integral", {
}, },
actions: { actions: {
async getSigninAndTaskInfo(isdebug = false) { async getSigninAndTaskInfo(isdebug = false) {
if(isdebug) { if (isdebug) {
this._signinAndTaskInfo = signinAndTaskInfoMock; this._signinAndTaskInfo = signinAndTaskInfoMock;
return signinAndTaskInfoMock; return signinAndTaskInfoMock;
}else{ } else {
const res = await getSigninAndTaskInfoJSON(); const res = await getSigninAndTaskInfoJSON();
this._signinAndTaskInfo = res; this._signinAndTaskInfo = res;
return res; return res;
} }
}, },
async checkIn(activityId,isdebug = false) { async checkIn(activityId, isdebug = false) {
// if(isdebug) { // if(isdebug) {
// this._checkInData = checkInMock; // 存储到state中 // this._checkInData = checkInMock; // 存储到state中
// return checkInMock; // return checkInMock;
// }else{ // }else{
const res = await checkInJSON(activityId); const res = await checkInJSON(activityId);
this._checkInData = res; // 存储到state中 this._checkInData = res; // 存储到state中
return res; return res;
// } // }
...@@ -74,51 +83,51 @@ export const useIntegralStore = defineStore("integral", { ...@@ -74,51 +83,51 @@ export const useIntegralStore = defineStore("integral", {
return res; return res;
// } // }
}, },
async getPointsBenefitCoupon(isdebug = false) { async getPointsBenefitCoupon(type) {
// if(isdebug) { // if(isdebug) {
// this._pointsBenefitCoupon = pointsBenefitCouponMock; // this._pointsBenefitCoupon = pointsBenefitCouponMock;
// return pointsBenefitCouponMock; // return pointsBenefitCouponMock;
// }else{ // }else{
const res = await getPointsBenefitCouponJSON(); const res = await getPointsBenefitCouponJSON(type);
this._pointsBenefitCoupon = res; this._pointsBenefitCoupon = res;
return res; return res;
// } // }
}, },
async queryTodoResultServer(isdebug = false) { async queryTodoResultServer(isdebug = false) {
if(isdebug) { if (isdebug) {
this._queryTodoResult = queryTodoResultMock; this._queryTodoResult = queryTodoResultMock;
return queryTodoResultMock; return queryTodoResultMock;
}else{ } else {
const res = await queryTodoResultJSON(); const res = await queryTodoResultJSON();
this._queryTodoResult = res; this._queryTodoResult = res;
return res; return res;
} }
}, },
async getOriginInviteHome(isdebug = false) { async getOriginInviteHome(isdebug = false) {
if(isdebug) { if (isdebug) {
this._originInviteHome = originInviteHomeMock; this._originInviteHome = originInviteHomeMock;
return originInviteHomeMock; return originInviteHomeMock;
}else{ } else {
const res = await getOriginInviteHomeJSON(); const res = await getOriginInviteHomeJSON();
this._originInviteHome = res; this._originInviteHome = res;
return res; return res;
} }
}, },
async assistInvite(invitationCode, wxUnionId, isdebug = false) { async assistInvite(invitationCode, wxUnionId, isdebug = false) {
if(isdebug) { if (isdebug) {
this._assistInviteData = assistInviteMock; this._assistInviteData = assistInviteMock;
return assistInviteMock; return assistInviteMock;
}else{ } else {
const res = await assistInviteJSON(invitationCode, wxUnionId); const res = await assistInviteJSON(invitationCode, wxUnionId);
this._assistInviteData = res; this._assistInviteData = res;
return res; return res;
} }
}, },
async getInvitationList(isdebug = false) { async getInvitationList(isdebug = false) {
if(isdebug) { if (isdebug) {
this._invitationList = invitationListMock; this._invitationList = invitationListMock;
return invitationListMock; return invitationListMock;
}else{ } else {
const res = await getInvitationListJSON(); const res = await getInvitationListJSON();
this._invitationList = res; this._invitationList = res;
return res; return res;
...@@ -131,14 +140,32 @@ export const useIntegralStore = defineStore("integral", { ...@@ -131,14 +140,32 @@ export const useIntegralStore = defineStore("integral", {
}, },
}, },
getters: { getters: {
signinAndTaskInfo : (state) => {return state._signinAndTaskInfo; }, signinAndTaskInfo: (state) => {
checkInData : (state) => {return state._checkInData; }, return state._signinAndTaskInfo;
seckillData : (state) => {return state._seckillData; }, },
pointsBenefitCoupon : (state) => {return state._pointsBenefitCoupon; }, checkInData: (state) => {
queryTodoResult : (state) => {return state._queryTodoResult; }, return state._checkInData;
originInviteHome : (state) => {return state._originInviteHome; }, },
assistInviteData : (state) => {return state._assistInviteData; }, seckillData: (state) => {
invitationList : (state) => {return state._invitationList; }, return state._seckillData;
originInviteBindData : (state) => {return state._originInviteBindData; }, },
pointsBenefitCoupon: (state) => {
return state._pointsBenefitCoupon;
},
queryTodoResult: (state) => {
return state._queryTodoResult;
},
originInviteHome: (state) => {
return state._originInviteHome;
},
assistInviteData: (state) => {
return state._assistInviteData;
},
invitationList: (state) => {
return state._invitationList;
},
originInviteBindData: (state) => {
return state._originInviteBindData;
},
}, },
}); });
import { import { defineStore } from 'pinia';
defineStore import { fetchUserJSON, checkParticipation } from '@/api/user';
} from "pinia"; import { useUserStore } from './user';
import {
fetchUserJSON,
checkParticipation
} from "@/api/user";
import {
useUserStore
} from "./user";
// 渠道名称配置 // 渠道名称配置
export const CHANNELS = { export const CHANNELS = {
...@@ -19,7 +12,7 @@ export const CHANNELS = { ...@@ -19,7 +12,7 @@ export const CHANNELS = {
hl2dsKS: '快手', hl2dsKS: '快手',
hl2dsWS: '微商城', hl2dsWS: '微商城',
hl2dsTMC: '猫超', hl2dsTMC: '猫超',
hl2dsXHS: '小红书' hl2dsXHS: '小红书',
}; };
// 获取渠道名称 // 获取渠道名称
...@@ -27,7 +20,7 @@ export function getChannelName(code) { ...@@ -27,7 +20,7 @@ export function getChannelName(code) {
return CHANNELS[code] || '线上报名'; return CHANNELS[code] || '线上报名';
} }
export const usePageCfgStore = defineStore("pageCfg", { export const usePageCfgStore = defineStore('pageCfg', {
state: () => { state: () => {
return { return {
toolList: [], toolList: [],
...@@ -42,10 +35,8 @@ export const usePageCfgStore = defineStore("pageCfg", { ...@@ -42,10 +35,8 @@ export const usePageCfgStore = defineStore("pageCfg", {
}; };
}, },
actions: { actions: {
async fetchCfg() { async fetchCfg(type) {
const { const { data } = await fetchUserJSON(type);
data
} = await fetchUserJSON();
// const data = { // const data = {
// "wheelOptionsYZ": [ // "wheelOptionsYZ": [
...@@ -486,46 +477,52 @@ export const usePageCfgStore = defineStore("pageCfg", { ...@@ -486,46 +477,52 @@ export const usePageCfgStore = defineStore("pageCfg", {
//-----------这部分是专门判断"生育补贴"和"鹤礼爱心"的逻辑------------- //-----------这部分是专门判断"生育补贴"和"鹤礼爱心"的逻辑-------------
const memberId = useUserStore().userInfo?.memberId; const memberId = useUserStore().userInfo?.memberId;
const res = await checkParticipation() const res = await checkParticipation();
// let res = {"code":"000000","data":{"channel":"DS","dsPlatform":"hl2dsXHS","fertilityJoined":true,"v2Joined":true},"message":"success","ok":true,"success":true}; // let res = {"code":"000000","data":{"channel":"DS","dsPlatform":"hl2dsXHS","fertilityJoined":true,"v2Joined":true},"message":"success","ok":true,"success":true};
console.log("生育补贴和鹤礼爱心是否参与::::", res); console.log('生育补贴和鹤礼爱心是否参与::::', res);
if (memberId == 'not_login' || !res.data?.fertilityJoined) { //未登录或者未参与,就删除生育补贴配置项,不展示 if (memberId == 'not_login' || !res.data?.fertilityJoined) {
tools = tools.filter(item => item.title !== "生育补贴"); //未登录或者未参与,就删除生育补贴配置项,不展示
tools = tools.filter((item) => item.title !== '生育补贴');
} }
if (memberId != 'not_login' && res.data?.v2Joined) { //已登录并且已报名 if (memberId != 'not_login' && res.data?.v2Joined) {
if (res.data?.channel == "DS") { //DS:表示线上报名,跳转链接换成本地页面的路径,并且有去查看按钮 //已登录并且已报名
if (res.data?.channel == 'DS') {
//DS:表示线上报名,跳转链接换成本地页面的路径,并且有去查看按钮
let channelName = getChannelName(res.data?.dsPlatform); let channelName = getChannelName(res.data?.dsPlatform);
tools = tools.map(item => tools = tools.map((item) =>
item.title === "鹤礼爱心" ? { item.title === '鹤礼爱心'
? {
...item, ...item,
link: { link: {
...item.link, ...item.link,
type: 1, // type=1跳转本地页面 type: 1, // type=1跳转本地页面
url: "/pages/heliaixinTools/heliaixinTools", url: '/pages/heliaixinTools/heliaixinTools',
go_see: true, //有“去查看”按钮 go_see: true, //有“去查看”按钮
channelName: channelName, //报名渠道的名称 channelName: channelName, //报名渠道的名称
},
} }
} : : item
item
); );
} else { //线下报名,正常跳转,不用处理 } else {
//线下报名,正常跳转,不用处理
} }
} else { //未登录或者未报名,跳转链接换成本地页面的链接 } else {
tools = tools.map(item => //未登录或者未报名,跳转链接换成本地页面的链接
item.title === "鹤礼爱心" ? { tools = tools.map((item) =>
item.title === '鹤礼爱心'
? {
...item, ...item,
link: { link: {
...item.link, ...item.link,
type: 1, // type=1跳转本地页面 type: 1, // type=1跳转本地页面
url: "/pages/heliaixinTools/heliaixinTools" url: '/pages/heliaixinTools/heliaixinTools',
},
} }
} : : item
item
); );
} }
console.log("tools---------::", tools) console.log('tools---------::', tools);
this.toolList = tools; this.toolList = tools;
//-----------这部分是专门判断"生育补贴"和"鹤礼爱心"的逻辑------------- //-----------这部分是专门判断"生育补贴"和"鹤礼爱心"的逻辑-------------
......
...@@ -312,6 +312,7 @@ ...@@ -312,6 +312,7 @@
:appid="erqiPeizhi.appId1" :appid="erqiPeizhi.appId1"
:product-id="erqiPeizhi.productId1" :product-id="erqiPeizhi.productId1"
custom-content="true" custom-content="true"
class="store-product-container"
> >
<view class="ipcontainer"> <view class="ipcontainer">
<image <image
...@@ -329,8 +330,8 @@ ...@@ -329,8 +330,8 @@
> >
</image> </image>
<view class="ipcontext"> <view class="ipcontext">
<view class="ipcontext-title">{{ '竖版标题' }}</view> <view class="ipcontext-desc">{{ erqiPeizhi.ipTitle1 || '' }}</view>
<view class="ipcontext-desc">{{ '竖版描述' }}</view> <view class="ipcontext-title">{{ erqiPeizhi.ipDesc1 || '' }}</view>
</view> </view>
</view> </view>
</store-product> </store-product>
...@@ -343,8 +344,13 @@ ...@@ -343,8 +344,13 @@
:appid="erqiPeizhi.appId2" :appid="erqiPeizhi.appId2"
:product-id="erqiPeizhi.productId2" :product-id="erqiPeizhi.productId2"
custom-content="true" custom-content="true"
class="store-product-container"
> >
<view class="ipcontainer"> <view class="ipcontainer">
<view class="ipcontext">
<view class="ipcontext-title">{{ erqiPeizhi.ipTitle2 || '' }}</view>
<view class="ipcontext-desc">{{ erqiPeizhi.ipDesc2 || '' }}</view>
</view>
<image <image
:data-log="{ :data-log="{
xcxClick: '品牌故事-三屏页面点击', xcxClick: '品牌故事-三屏页面点击',
...@@ -358,10 +364,6 @@ ...@@ -358,10 +364,6 @@
" "
> >
</image> </image>
<view class="ipcontext">
<view class="ipcontext-title">{{ '横版标题' }}</view>
<view class="ipcontext-desc">{{ '横版描述' }}</view>
</view>
</view> </view>
</store-product> </store-product>
</view> </view>
...@@ -491,7 +493,9 @@ import { fetchBrandJSON } from '../api/brand'; ...@@ -491,7 +493,9 @@ import { fetchBrandJSON } from '../api/brand';
import { jump, JumpType } from '../utils'; import { jump, JumpType } from '../utils';
import md from '../md'; import md from '../md';
import ExposureTracker from '../utils/exposure'; import ExposureTracker from '../utils/exposure';
import { useGlobalStore } from '@/stores/global.js';
const globalStore = useGlobalStore();
// 定义需要曝光检测的元素配置 // 定义需要曝光检测的元素配置
const EXPOSURE_CONFIGS = [ const EXPOSURE_CONFIGS = [
{ {
...@@ -600,7 +604,7 @@ export default { ...@@ -600,7 +604,7 @@ export default {
}, },
methods: { methods: {
async initBrandInfo() { async initBrandInfo() {
const { data } = await fetchBrandJSON(); const { data } = await fetchBrandJSON(globalStore.getPreviewScene('brand'));
if (data) { if (data) {
this.swiperList = data.swiperList || [ this.swiperList = data.swiperList || [
{ {
...@@ -1443,13 +1447,23 @@ export default { ...@@ -1443,13 +1447,23 @@ export default {
.ipcontainer { .ipcontainer {
position: relative; position: relative;
.ipcontext {
image,.ipcontext { display: flex;
position: absolute; flex-direction: column;
align-items: center;
justify-content: flex-start;
font-size: 24rpx;
text-align: center;
.ipcontext-desc,
.ipcontext-title {
width: 100%; width: 100%;
height: 100%; overflow: hidden;
top: 0; text-overflow: ellipsis;
left: 0; white-space: nowrap;
}
.ipcontext-title {
color: @color-gold-main;
}
} }
} }
...@@ -1464,34 +1478,53 @@ export default { ...@@ -1464,34 +1478,53 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.store-product-container {
display: flex;
justify-content: center;
align-items: center;
}
} }
.ip1 { .ip1 {
width: 288rpx; width: 288rpx;
height: 380rpx; height: 380rpx;
overflow: hidden; overflow: hidden;
.ipcontainer{ .ipcontainer {
width: 288 * 0.8rpx; display: flex;
height: 380 * 0.8rpx; flex-direction: column;
align-items: center;
justify-content: flex-start;
width: 268rpx;
.ipcontext {
width: 100%;
margin-top: 6rpx;
}
} }
image { image {
width: 288 * 0.8rpx; width: 213rpx;
height: 380 * 0.8rpx; height: 172rpx;
} }
} }
.ip2 { .ip2 {
width: 342rpx; width: 342rpx;
height: 201rpx; height: 201rpx;
.ipcontainer{ .ipcontainer {
width: 342 * 0.75rpx; height: 172rpx;
height: 201 * 0.75rpx; width: 322rpx;
display: flex;
flex-direction: row-reverse;
align-items: center;
justify-content: space-between;
.ipcontext {
width: 160rpx;
}
} }
image { image {
width: 342 * 0.75rpx; width: 162rpx;
height: 201 * 0.75rpx; height: 172rpx;
} }
} }
......
<template> <template>
<view class="home-container" @scroll="onPageScroll"> <view class="home-container" @scroll="onPageScroll">
<!-- 可拖拽悬浮图片 --> <!-- 可拖拽悬浮图片 -->
<view class="floating-image-container" v-if="floatIcon.imageUrl && !isAnyPopupVisible" <view
class="floating-image-container"
v-if="floatIcon.imageUrl && !isAnyPopupVisible"
:style="{ left: floatIconPosition.left + 'px', top: floatIconPosition.top + 'px' }" :style="{ left: floatIconPosition.left + 'px', top: floatIconPosition.top + 'px' }"
@touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd" @tap="onfloatIconClick"> @touchstart="onTouchStart"
<image class="floating-image" @touchmove="onTouchMove"
:src="floatIcon.imageUrl.indexOf('http') === 0 ? floatIcon.imageUrl : $baseUrl + floatIcon.imageUrl"> @touchend="onTouchEnd"
@tap="onfloatIconClick"
>
<image
class="floating-image"
:src="floatIcon.imageUrl.indexOf('http') === 0 ? floatIcon.imageUrl : $baseUrl + floatIcon.imageUrl"
>
</image> </image>
</view> </view>
<view class="content"> <view class="content">
<swiper id="firstScreen" class="swiper banner" circular :autoplay="autoplay" :interval="interval" <swiper
:duration="duration" :indicator-dots="false" @change="onBannerSwiperChange"> id="firstScreen"
class="swiper banner"
circular
:autoplay="autoplay"
:interval="interval"
:duration="duration"
:indicator-dots="false"
@change="onBannerSwiperChange"
>
<swiper-item v-for="(item, index) in swiperList" :key="item.url"> <swiper-item v-for="(item, index) in swiperList" :key="item.url">
<view class="swiper-item banneritem"> <view class="swiper-item banneritem">
<image @tap="jumpBannerHandler(item, index)" class="b-img" <image
:src="item.url.indexOf('http') === 0 ? item.url : $baseUrl + item.url"></image> @tap="jumpBannerHandler(item, index)"
class="b-img"
:src="item.url.indexOf('http') === 0 ? item.url : $baseUrl + item.url"
></image>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
...@@ -27,26 +46,43 @@ ...@@ -27,26 +46,43 @@
</view> </view>
<!-- 自定义指示点,仿照示意图 --> <!-- 自定义指示点,仿照示意图 -->
<view class="custom-banner-indicator"> <view class="custom-banner-indicator">
<view v-for="(item, idx) in swiperList" :key="item.url + idx" <view
:class="['banner-dot', { 'active': idx === bannerCurrentIndex }]"></view> v-for="(item, idx) in swiperList"
:key="item.url + idx"
:class="['banner-dot', { active: idx === bannerCurrentIndex }]"
></view>
</view> </view>
<view class="barbox" :style="`top:${statusBarHeight}px;`"> <view class="barbox" :style="`top:${statusBarHeight}px;`">
<image class="btnlogo" :src="$baseUrl + 'homepage/btnlogo.png'"></image> <image class="btnlogo" :src="$baseUrl + 'homepage/btnlogo.png'"></image>
<image :data-log="{ <image
:data-log="{
xcxClick: '首页-首屏页面点击', xcxClick: '首页-首屏页面点击',
pageName: '首页-首屏', pageName: '首页-首屏',
buttonName: '搜索框' buttonName: '搜索框',
}" class="btnsearch" @tap="goSearchHandler" :src="$baseUrl + 'homepage/btnsearch.png'"> }"
class="btnsearch"
@tap="goSearchHandler"
:src="$baseUrl + 'homepage/btnsearch.png'"
>
</image> </image>
<view class="customer-btn-wrap"> <view class="customer-btn-wrap">
<image :data-log="{ <image
:data-log="{
xcxClick: '首页-首屏页面点击', xcxClick: '首页-首屏页面点击',
pageName: '首页-首屏', pageName: '首页-首屏',
buttonName: '客服入口' buttonName: '客服入口',
}" @tap="goCustomerHandler" class="btncustomer" :src="$baseUrl + 'homepage/btncustomer.png'"> }"
@tap="goCustomerHandler"
class="btncustomer"
:src="$baseUrl + 'homepage/btncustomer.png'"
>
</image> </image>
<button v-if="homeStore && !homeStore.isLogin" open-type="getPhoneNumber" <button
@getphonenumber="onGetPhoneNumber" class="phone-auth-btn-cover"></button> v-if="homeStore && !homeStore.isLogin"
open-type="getPhoneNumber"
@getphonenumber="onGetPhoneNumber"
class="phone-auth-btn-cover"
></button>
</view> </view>
</view> </view>
<!-- <view :data-log="{ <!-- <view :data-log="{
...@@ -62,19 +98,34 @@ ...@@ -62,19 +98,34 @@
<view v-if="toolList?.tools?.length > 0" class="tools_box"> <view v-if="toolList?.tools?.length > 0" class="tools_box">
<view class="tools_maintitle">{{ toolList.maintitle }}</view> <view class="tools_maintitle">{{ toolList.maintitle }}</view>
<view class="tools_subtitle">{{ toolList.subtitle }}</view> <view class="tools_subtitle">{{ toolList.subtitle }}</view>
<swiper :vertical="false" :circular="true" class="tool_swiper" :display-multiple-items="1.65" <swiper
:next-margin="'0rpx'" :previous-margin="'0'" @change="onSwiperChange"> :vertical="false"
<swiper-item v-for="(item, index) in toolList.tools" :key="index" :circular="true"
:class="['swiperItem', { 'active': currentIndex === index }]"> class="tool_swiper"
:display-multiple-items="1.65"
:next-margin="'0rpx'"
:previous-margin="'0'"
@change="onSwiperChange"
>
<swiper-item
v-for="(item, index) in toolList.tools"
:key="index"
:class="['swiperItem', { active: currentIndex === index }]"
>
<view class="tool"> <view class="tool">
<!-- <button <!-- <button
v-if="homeStore && !homeStore.isLogin && item.title!='星妈会Lab' && item.title!='星妈起名' && item.title!='喂养工具' && item.title!='产检提醒' && item.title!='宝宝生长测评' && item.title!='体质测试'" v-if="homeStore && !homeStore.isLogin && item.title!='星妈会Lab' && item.title!='星妈起名' && item.title!='喂养工具' && item.title!='产检提醒' && item.title!='宝宝生长测评' && item.title!='体质测试'"
open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber" class="sq_btn"></button> --> open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber" class="sq_btn"></button> -->
<image class="tool_bg" :src="$baseUrl + 'homepage/Q3Res/toolBg.png'" <image
@tap="handleToolClick(item)"> class="tool_bg"
:src="$baseUrl + 'homepage/Q3Res/toolBg.png'"
@tap="handleToolClick(item)"
>
</image> </image>
<image class="tool_icon" <image
:src="item.icon?.indexOf('http') === 0 ? item.icon : $baseUrl + item.icon"></image> class="tool_icon"
:src="item.icon?.indexOf('http') === 0 ? item.icon : $baseUrl + item.icon"
></image>
<!-- <image class="tool_jt" :src="$baseUrl + toolList.jtIcon"></image> --> <!-- <image class="tool_jt" :src="$baseUrl + toolList.jtIcon"></image> -->
<view class="tool_title">{{ item.title }}</view> <view class="tool_title">{{ item.title }}</view>
<view class="tool_context">{{ item.context }}</view> <view class="tool_context">{{ item.context }}</view>
...@@ -84,8 +135,12 @@ ...@@ -84,8 +135,12 @@
<!-- 自定义指示点 --> <!-- 自定义指示点 -->
<view class="custom-indicator"> <view class="custom-indicator">
<view v-for="(item, index) in toolList.tools" :key="index" class="indicator-dot" <view
:class="{ 'active': currentIndex === index }"> v-for="(item, index) in toolList.tools"
:key="index"
class="indicator-dot"
:class="{ active: currentIndex === index }"
>
</view> </view>
</view> </view>
</view> </view>
...@@ -105,7 +160,9 @@ ...@@ -105,7 +160,9 @@
<!-- 已答题状态显示区域 --> <!-- 已答题状态显示区域 -->
<view v-else-if="canEatData.isAnswered || canEatData.myAnswer" class="can-eat-answer-section"> <view v-else-if="canEatData.isAnswered || canEatData.myAnswer" class="can-eat-answer-section">
<view class="answer-status"> <view class="answer-status">
<view class="correct-answer">正确答案:{{ ['能吃', '少吃', '慎吃', '禁吃'][canEatData.correct] }}</view> <view class="correct-answer"
>正确答案:{{ ['能吃', '少吃', '慎吃', '禁吃'][canEatData.correct] }}</view
>
</view> </view>
<view class="analysis-link" @tap="viewAnalysis">{{ '查看问题解析 >' }}</view> <view class="analysis-link" @tap="viewAnalysis">{{ '查看问题解析 >' }}</view>
</view> </view>
...@@ -113,40 +170,53 @@ ...@@ -113,40 +170,53 @@
<!--专家团--> <!--专家团-->
<view class="et_box" id="expertTeam"> <view class="et_box" id="expertTeam">
<view class="et_maintitle">{{ expertTeam.maintitle }}</view> <view class="et_maintitle">{{ expertTeam.maintitle }}</view>
<view :data-log="{ <view
:data-log="{
xcxClick: '首页-二屏页面点击', xcxClick: '首页-二屏页面点击',
pageName: '首页-二屏', pageName: '首页-二屏',
buttonName: '专家团副标题点击' buttonName: '专家团副标题点击',
}" class="et_subtitle"> }"
class="et_subtitle"
>
<view class="txtlink" @tap="showPopup1(1, 1)">星妈会医生在线答疑群,为孩子成长保驾护航</view> <view class="txtlink" @tap="showPopup1(1, 1)">星妈会医生在线答疑群,为孩子成长保驾护航</view>
<image id="et_joingroup" class="icon_more" @tap="showPopup1(1, 2)" <image
:src="$baseUrl + 'homepage/et_more.png'"></image> id="et_joingroup"
class="icon_more"
@tap="showPopup1(1, 2)"
:src="$baseUrl + 'homepage/et_more.png'"
></image>
</view> </view>
<view class="et_main_box"> <view class="et_main_box">
<view class="et_con_bg"> <view class="et_con_bg">
<view class="et_tab_box"> <view class="et_tab_box">
<view class="tab_box" @tap="onSelEtTap(0)"> <view class="tab_box" @tap="onSelEtTap(0)">
<image class="et_tab" v-show="etTabSelIndex == 0" <image
:src="$baseUrl + 'homepage/et_sel_tab11.png'"> class="et_tab"
v-show="etTabSelIndex == 0"
:src="$baseUrl + 'homepage/et_sel_tab11.png'"
>
</image> </image>
<image class="et_tab" v-show="etTabSelIndex != 0" <image class="et_tab" v-show="etTabSelIndex != 0" :src="$baseUrl + 'homepage/et_tab11.png'">
:src="$baseUrl + 'homepage/et_tab11.png'">
</image> </image>
</view> </view>
<view class="tab_box" @tap="onSelEtTap(1)"> <view class="tab_box" @tap="onSelEtTap(1)">
<image class="et_tab" v-show="etTabSelIndex == 1" <image
:src="$baseUrl + 'homepage/et_sel_tab2.png'"> class="et_tab"
v-show="etTabSelIndex == 1"
:src="$baseUrl + 'homepage/et_sel_tab2.png'"
>
</image> </image>
<image class="et_tab" v-show="etTabSelIndex != 1" <image class="et_tab" v-show="etTabSelIndex != 1" :src="$baseUrl + 'homepage/et_tab2.png'">
:src="$baseUrl + 'homepage/et_tab2.png'">
</image> </image>
</view> </view>
<view class="tab_box" @tap="onSelEtTap(2)"> <view class="tab_box" @tap="onSelEtTap(2)">
<image class="et_tab" v-show="etTabSelIndex == 2" <image
:src="$baseUrl + 'homepage/et_sel_tab3.png'"> class="et_tab"
v-show="etTabSelIndex == 2"
:src="$baseUrl + 'homepage/et_sel_tab3.png'"
>
</image> </image>
<image class="et_tab" v-show="etTabSelIndex != 2" <image class="et_tab" v-show="etTabSelIndex != 2" :src="$baseUrl + 'homepage/et_tab3.png'">
:src="$baseUrl + 'homepage/et_tab3.png'">
</image> </image>
</view> </view>
</view> </view>
...@@ -206,44 +276,62 @@ ...@@ -206,44 +276,62 @@
}" @tap="jumpLink(contentItem.link, contentItem.videoUrl, index, $event)"></image> }" @tap="jumpLink(contentItem.link, contentItem.videoUrl, index, $event)"></image>
</view> --> </view> -->
<view v-if="childrenInfoList.length > 0" id="childrenInfoList" class="channelbox"> <view v-if="childrenInfoList.length > 0" id="childrenInfoList" class="channelbox">
<text class="maintitle">{{ childrenInfoListMianTitle }}</text> <text class="maintitle">{{ childrenInfoListMianTitle }}</text>
<view class="subtitle_box"> <view class="subtitle_box">
<text class="subtitle">从专业到实用,一站式解决你的育儿难题</text> <text class="subtitle">从专业到实用,一站式解决你的育儿难题</text>
<image id="childrenInfoListMore" class="icon_more" :src="$baseUrl + 'homepage/home_more_btn_v2.png'" <image
id="childrenInfoListMore"
class="icon_more"
:src="$baseUrl + 'homepage/home_more_btn_v2.png'"
:data-log="{ :data-log="{
xcxClick: '首页-三屏页面点击', xcxClick: '首页-三屏页面点击',
pageName: '首页-三屏', pageName: '首页-三屏',
buttonName: `次位内容资源位-查看更多文字` buttonName: `次位内容资源位-查看更多文字`,
}" :data-comlog="{ }"
:data-comlog="{
xcxComponentClick: 'true', xcxComponentClick: 'true',
pageName: '首页', pageName: '首页',
componentName: '育儿智库', componentName: '育儿智库',
componentContent: '育儿智库-more' componentContent: '育儿智库-more',
}" @tap="jumpLink(suggest.link, false, false, $event)"></image> }"
@tap="jumpLink(suggest.link, false, false, $event)"
></image>
</view> </view>
<view class="channelscroll"> <view class="channelscroll">
<view class="box"> <view class="box">
<view class="infobox" :key="index" :id="'childrenInfoList' + index" <view
v-for="(infoItem, index) in childrenInfoList" :data-log="{ class="infobox"
:key="index"
:id="'childrenInfoList' + index"
v-for="(infoItem, index) in childrenInfoList"
:data-log="{
xcxClick: '首页-三屏页面点击', xcxClick: '首页-三屏页面点击',
pageName: '首页-三屏', pageName: '首页-三屏',
buttonName: `次位内容资源位-轮播-${index + 1}` buttonName: `次位内容资源位-轮播-${index + 1}`,
}" :data-comlog="{ }"
:data-comlog="{
xcxComponentClick: 'true', xcxComponentClick: 'true',
pageName: '首页', pageName: '首页',
componentName: '育儿智库', componentName: '育儿智库',
componentContent: infoItem.desc componentContent: infoItem.desc,
}" @tap="jumpLink(infoItem.link, false, false, $event)"> }"
<image class="infoimg" @tap="jumpLink(infoItem.link, false, false, $event)"
:src="infoItem.bgUrl?.indexOf('http') === 0 ? infoItem.bgUrl : $baseUrl + infoItem.bgUrl"> >
<image
class="infoimg"
:src="infoItem.bgUrl?.indexOf('http') === 0 ? infoItem.bgUrl : $baseUrl + infoItem.bgUrl"
>
</image> </image>
<view class="infotitlebox"> <view class="infotitlebox">
<view class="infotitlecon"> <view class="infotitlecon">
<view class="infotitle">{{ infoItem.desc }}</view> <view class="infotitle">{{ infoItem.desc }}</view>
<image v-if="infoItem.isNew" class="infotitletag" <image
:src="$baseUrl + 'homepage/home_new_tag_v3.png'">New</image> v-if="infoItem.isNew"
class="infotitletag"
:src="$baseUrl + 'homepage/home_new_tag_v3.png'"
>New</image
>
</view> </view>
<view class="infodesc">{{ infoItem.desc2 }}</view> <view class="infodesc">{{ infoItem.desc2 }}</view>
</view> </view>
...@@ -262,30 +350,47 @@ ...@@ -262,30 +350,47 @@
<text class="maintitle">{{ channelTabListMianTitle }}</text> <text class="maintitle">{{ channelTabListMianTitle }}</text>
<view class="subtitle_box"> <view class="subtitle_box">
<text class="subtitle">用声音传递爱与智慧,守护宝贝成长的每一步</text> <text class="subtitle">用声音传递爱与智慧,守护宝贝成长的每一步</text>
<image class="icon_more" :src="$baseUrl + 'homepage/home_more_btn_v2.png'" :data-log="{ <image
class="icon_more"
:src="$baseUrl + 'homepage/home_more_btn_v2.png'"
:data-log="{
xcxClick: '首页-三屏页面点击', xcxClick: '首页-三屏页面点击',
pageName: '首页-三屏', pageName: '首页-三屏',
buttonName: `首位内容资源位-查看更多文字` buttonName: `首位内容资源位-查看更多文字`,
}" @tap="jumpLink(voiceStory.link, false, false, $event)"></image> }"
@tap="jumpLink(voiceStory.link, false, false, $event)"
></image>
</view> </view>
<view class="listbox"> <view class="listbox">
<view @tap="channelTabHandler(index, $event)" :data-log="{ <view
@tap="channelTabHandler(index, $event)"
:data-log="{
xcxClick: '首页-三屏页面点击', xcxClick: '首页-三屏页面点击',
pageName: '首页-三屏', pageName: '首页-三屏',
buttonName: `首页内容资源位分类${index + 1}-${item}` buttonName: `首页内容资源位分类${index + 1}-${item}`,
}" :class="channelTabIndex === index ? 'tabitem tabActive' : 'tabitem'" v-for="(item, index) in channelTabList" }"
:key="index"> :class="channelTabIndex === index ? 'tabitem tabActive' : 'tabitem'"
v-for="(item, index) in channelTabList"
:key="index"
>
{{ item }} {{ item }}
</view> </view>
</view> </view>
<view class="channelscroll2"> <view class="channelscroll2">
<view class="box2"> <view class="box2">
<view class="infobox2" :key="index" <view
v-for="(infoItem, index) in changelInfoList[channelTabIndex]" :data-log="{ class="infobox2"
:key="index"
v-for="(infoItem, index) in changelInfoList[channelTabIndex]"
:data-log="{
xcxClick: '首页-三屏页面点击', xcxClick: '首页-三屏页面点击',
pageName: '首页-三屏', pageName: '首页-三屏',
buttonName: `首页内容资源位分类${channelTabIndex + 1}-${channelTabList[channelTabIndex]}-${index + 1}` buttonName: `首页内容资源位分类${channelTabIndex + 1}-${channelTabList[channelTabIndex]}-${
}" @tap="jumpLink(infoItem.link, false, false, $event)"> index + 1
}`,
}"
@tap="jumpLink(infoItem.link, false, false, $event)"
>
<image class="infoimg2" :src="$baseUrl + infoItem.bgUrl"></image> <image class="infoimg2" :src="$baseUrl + infoItem.bgUrl"></image>
<view class="infotitle2box"> <view class="infotitle2box">
<view class="infotitle2"> <view class="infotitle2">
...@@ -307,18 +412,27 @@ ...@@ -307,18 +412,27 @@
<view id="fourthScreen" class="bottomlink"> <view id="fourthScreen" class="bottomlink">
<image class="bottombg" :src="$baseUrl + 'homepage/bottombg.png'"></image> <image class="bottombg" :src="$baseUrl + 'homepage/bottombg.png'"></image>
<view class="box"> <view class="box">
<image class="icon" :id="'bottomLink' + index" v-for="(icon, index) in bottomLinkList" :key="index" <image
class="icon"
:id="'bottomLink' + index"
v-for="(icon, index) in bottomLinkList"
:key="index"
:data-log="{ :data-log="{
xcxClick: '首页-四屏页面点击', xcxClick: '首页-四屏页面点击',
pageName: '首页-四屏', pageName: '首页-四屏',
buttonName: `${qrNameList[index]}` buttonName: `${qrNameList[index]}`,
}" :data-comlog="{ }"
:data-comlog="{
xcxComponentClick: 'true', xcxComponentClick: 'true',
xcxComponentExposure: 'true', xcxComponentExposure: 'true',
pageName: '首页', pageName: '首页',
componentName: '跳转工具', componentName: '跳转工具',
componentContent: `${qrNameList[index]}` componentContent: `${qrNameList[index]}`,
}" :src="$baseUrl + icon.bgUrl" :style="icon._style" @tap="showPopup(index, $event)"></image> }"
:src="$baseUrl + icon.bgUrl"
:style="icon._style"
@tap="showPopup(index, $event)"
></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -329,8 +443,13 @@ ...@@ -329,8 +443,13 @@
</view> --> </view> -->
<view> <view>
<!-- 普通弹窗 企微等二维码--> <!-- 普通弹窗 企微等二维码-->
<uni-popup :is-mask-click="false" :safe-area="false" ref="popup" background-color="#fff" <uni-popup
border-radius="48rpx"> :is-mask-click="false"
:safe-area="false"
ref="popup"
background-color="#fff"
border-radius="48rpx"
>
<view v-if="qrObj !== null" class="popup-content"> <view v-if="qrObj !== null" class="popup-content">
<image class="btnclose" @tap="closePop" :src="$baseUrl + 'homepage/btnclose.png'"></image> <image class="btnclose" @tap="closePop" :src="$baseUrl + 'homepage/btnclose.png'"></image>
<view class="title"> <view class="title">
...@@ -338,10 +457,13 @@ ...@@ -338,10 +457,13 @@
</view> </view>
<rich-text class="desc" :nodes="qrObj.desc || ''"></rich-text> <rich-text class="desc" :nodes="qrObj.desc || ''"></rich-text>
<image :show-menu-by-longpress="true" class="qrcode" :src="$baseUrl + (qrObj.qrUrl || '')"></image> <image :show-menu-by-longpress="true" class="qrcode" :src="$baseUrl + (qrObj.qrUrl || '')"></image>
<image @tap="downloadHandler($baseUrl + (qrObj.qrUrl || ''))" class="btndownload" <image
:src="$baseUrl + 'homepage/btn_download.png'"></image> @tap="downloadHandler($baseUrl + (qrObj.qrUrl || ''))"
class="btndownload"
:src="$baseUrl + 'homepage/btn_download.png'"
></image>
</view> </view>
<view v-else class="popup-content" style="height: 977rpx;"> <view v-else class="popup-content" style="height: 977rpx">
<image class="xingmahui" :src="$baseUrl + 'homepage/xingmahui.png'"></image> <image class="xingmahui" :src="$baseUrl + 'homepage/xingmahui.png'"></image>
<image class="btnclose" @tap="closePop" :src="$baseUrl + 'homepage/btnclose.png'"></image> <image class="btnclose" @tap="closePop" :src="$baseUrl + 'homepage/btnclose.png'"></image>
</view> </view>
...@@ -352,19 +474,35 @@ ...@@ -352,19 +474,35 @@
<uni-popup :is-mask-click="false" :safe-area="false" ref="imagePopup" background-color="transparent"> <uni-popup :is-mask-click="false" :safe-area="false" ref="imagePopup" background-color="transparent">
<view class="image-popup-content"> <view class="image-popup-content">
<image class="popup-image" :src="popupImageUrl" mode="aspectFit" @tap="imagePopupJump"></image> <image class="popup-image" :src="popupImageUrl" mode="aspectFit" @tap="imagePopupJump"></image>
<image class="popup-close-btn" @tap="closeImagePopup" :src="$baseUrl + 'homepage/btnclose.png'"></image> <image
class="popup-close-btn"
@tap="closeImagePopup"
:src="$baseUrl + 'homepage/btnclose.png'"
></image>
</view> </view>
</uni-popup> </uni-popup>
<view v-if="showVideo" class="video-popup"> <view v-if="showVideo" class="video-popup">
<video :src="currentVideoUrl" controls autoplay :style="{ width: '100vw', height: videoHeight }"></video> <video
:src="currentVideoUrl"
controls
autoplay
:style="{ width: '100vw', height: videoHeight }"
></video>
<view class="close-btn-bottom" @tap="closeVideo">×</view> <view class="close-btn-bottom" @tap="closeVideo">×</view>
</view> </view>
<RegisterLayer v-model="showRegisterLayer" /> <RegisterLayer v-model="showRegisterLayer" />
<!-- 答案解析弹窗 --> <!-- 答案解析弹窗 -->
<CanEatAnswerPopup :visible="showAnswerPopup" :isCorrect="isAnswerCorrect" :rewardInfo="rewardInfo" <CanEatAnswerPopup
:question="currentQuestion" :correctAnswer="correctAnswer" :analysis="answerAnalysis" :visible="showAnswerPopup"
:allResult="canEatData?.analysis?.allResult" @close="showAnswerPopup = false" /> :isCorrect="isAnswerCorrect"
:rewardInfo="rewardInfo"
:question="currentQuestion"
:correctAnswer="correctAnswer"
:analysis="answerAnalysis"
:allResult="canEatData?.analysis?.allResult"
@close="showAnswerPopup = false"
/>
<!-- 金币动画模块 --> <!-- 金币动画模块 -->
<view class="gold-coin-animation" v-if="showGoldCoinAnimation" @tap="hideGoldCoinAnimation"> <view class="gold-coin-animation" v-if="showGoldCoinAnimation" @tap="hideGoldCoinAnimation">
...@@ -374,72 +512,63 @@ ...@@ -374,72 +512,63 @@
<view class="gold-coin-title">{{ goldCoinConfig.title }}</view> <view class="gold-coin-title">{{ goldCoinConfig.title }}</view>
<view class="gold-coin-description">{{ goldCoinConfig.description }}</view> <view class="gold-coin-description">{{ goldCoinConfig.description }}</view>
<view class="gold-coin-container"> <view class="gold-coin-container">
<image class="gold-coin gold-coin-1" <image
:src="goldCoinConfig.imageUrl || $baseUrl + 'homepage/Q3Res/goldCoin.png'"></image> class="gold-coin gold-coin-1"
:src="goldCoinConfig.imageUrl || $baseUrl + 'homepage/Q3Res/goldCoin.png'"
></image>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import { jump, JumpType } from '../utils';
jump, import { useHomeStore } from '../stores/home';
JumpType import { fetchHomeJSON, fetchCanEatIndex, fetchCanEatJoin } from '../api/home';
} from '../utils'; import { useUserStore } from '../stores/user';
import { import RegisterLayer from '../components/RegisterLayer.vue';
useHomeStore
} from '../stores/home';
import {
fetchHomeJSON,
fetchCanEatIndex,
fetchCanEatJoin
} from '../api/home';
import {
useUserStore
} from '../stores/user';
import RegisterLayer from "../components/RegisterLayer.vue";
import CanEatAnswerPopup from '../components/CanEatAnswerPopup.vue'; import CanEatAnswerPopup from '../components/CanEatAnswerPopup.vue';
import md from '../md'; import md from '../md';
import ExposureTracker from '../utils/exposure'; import ExposureTracker from '../utils/exposure';
import { import { getHealthField } from '@/api/common';
getHealthField import { useGlobalStore } from '@/stores/global.js';
} from "@/api/common";
const globalStore = useGlobalStore();
// const homeStore = useHomeStore(); // const homeStore = useHomeStore();
const userStore = useUserStore(); const userStore = useUserStore();
// 定义需要曝光检测的元素配置 // 定义需要曝光检测的元素配置
const EXPOSURE_CONFIGS = [{ const EXPOSURE_CONFIGS = [
{
id: 'firstScreen', id: 'firstScreen',
logParams: { logParams: {
xcxPage: '首页-首屏页面浏览', xcxPage: '首页-首屏页面浏览',
pageName: '首页-首屏' pageName: '首页-首屏',
} },
}, },
// 可以添加更多需要曝光检测的元素配置 // 可以添加更多需要曝光检测的元素配置
{ {
id: 'secondScreen', id: 'secondScreen',
logParams: { logParams: {
xcxPage: '首页-二屏页面浏览', xcxPage: '首页-二屏页面浏览',
pageName: '首页-二屏' pageName: '首页-二屏',
} },
}, },
{ {
id: 'thirdScreen', id: 'thirdScreen',
logParams: { logParams: {
xcxPage: '首页-三屏页面浏览', xcxPage: '首页-三屏页面浏览',
pageName: '首页-三屏' pageName: '首页-三屏',
} },
}, },
{ {
id: 'fourthScreen', id: 'fourthScreen',
logParams: { logParams: {
xcxPage: '首页-四屏页面浏览', xcxPage: '首页-四屏页面浏览',
pageName: '首页-四屏' pageName: '首页-四屏',
} },
} },
]; ];
export default { export default {
...@@ -459,7 +588,7 @@ export default { ...@@ -459,7 +588,7 @@ export default {
// 悬浮图片位置配置 // 悬浮图片位置配置
floatIconPosition: { floatIconPosition: {
left: 300, // 初始左位置 left: 300, // 初始左位置
top: 500 // 初始上位置 top: 500, // 初始上位置
}, },
// 答案弹窗相关数据 // 答案弹窗相关数据
showAnswerPopup: false, showAnswerPopup: false,
...@@ -492,8 +621,8 @@ export default { ...@@ -492,8 +621,8 @@ export default {
autoplay: true, autoplay: true,
interval: 4000, interval: 4000,
duration: 500, duration: 500,
indicatoractiveColor: "#a6a0a1", indicatoractiveColor: '#a6a0a1',
indicatorColor: "rgba(255, 255, 255, 1)", indicatorColor: 'rgba(255, 255, 255, 1)',
toolList: {}, toolList: {},
expertTeam: {}, expertTeam: {},
vipCardList: [], vipCardList: [],
...@@ -505,27 +634,32 @@ export default { ...@@ -505,27 +634,32 @@ export default {
bottomLinkList: [], bottomLinkList: [],
qrInfoObj: undefined, qrInfoObj: undefined,
popupIndex: 0, popupIndex: 0,
qrInfoList: [{ qrInfoList: [
{
title: '', title: '',
desc: '', desc: '',
qrUrl: '' qrUrl: '',
}, { },
{
title: '', title: '',
desc: '', desc: '',
qrUrl: '' qrUrl: '',
}, { },
{
title: '', title: '',
desc: '', desc: '',
qrUrl: '' qrUrl: '',
}, { },
{
title: '', title: '',
desc: '', desc: '',
qrUrl: '' qrUrl: '',
}], },
],
qrObj: { qrObj: {
title: '', title: '',
desc: '', desc: '',
qrUrl: '' qrUrl: '',
}, },
showVideo: false, showVideo: false,
currentVideoUrl: '', currentVideoUrl: '',
...@@ -555,13 +689,13 @@ export default { ...@@ -555,13 +689,13 @@ export default {
goldCoinConfig: { goldCoinConfig: {
title: '', title: '',
description: '', description: '',
imageUrl: '' // 奖品图片URL imageUrl: '', // 奖品图片URL
} },
} };
}, },
components: { components: {
RegisterLayer, RegisterLayer,
CanEatAnswerPopup CanEatAnswerPopup,
}, },
computed: { computed: {
homeStore() { homeStore() {
...@@ -582,13 +716,13 @@ export default { ...@@ -582,13 +716,13 @@ export default {
// 金币动画是否显示 // 金币动画是否显示
if (this.showGoldCoinAnimation) return true; if (this.showGoldCoinAnimation) return true;
return false; return false;
} },
}, },
props: { props: {
scrollTop: { scrollTop: {
type: Number, type: Number,
default: 0 default: 0,
} },
}, },
watch: { watch: {
homeStore: { homeStore: {
...@@ -600,13 +734,13 @@ export default { ...@@ -600,13 +734,13 @@ export default {
} }
}, },
deep: true, deep: true,
immediate: true immediate: true,
}, },
scrollTop: { scrollTop: {
handler(newVal) { handler(newVal) {
this.checkExposure(newVal); this.checkExposure(newVal);
} },
} },
}, },
mounted() { mounted() {
const menuButtonInfo = wx.getMenuButtonBoundingClientRect(); const menuButtonInfo = wx.getMenuButtonBoundingClientRect();
...@@ -639,20 +773,18 @@ export default { ...@@ -639,20 +773,18 @@ export default {
testSource() { testSource() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/syWebview/syWebview?p=xmh' url: '/pages/syWebview/syWebview?p=xmh',
}) });
}, },
async initHomeInfo() { async initHomeInfo() {
const { const { data } = await fetchHomeJSON(globalStore.getPreviewScene('home'));
data console.warn('data', data);
} = await fetchHomeJSON();
console.warn("data", data)
if (data) { if (data) {
this.swiperList = data.swiperList || [ this.swiperList = data.swiperList || [
{ {
"link": {}, link: {},
"title": "默认图", title: '默认图',
"url": this.$baseUrl + "homepage/homeSwiperDefaultBg.png" url: this.$baseUrl + 'homepage/homeSwiperDefaultBg.png',
}, },
]; ];
this.vipConfigList = data.vipConfigList; this.vipConfigList = data.vipConfigList;
...@@ -670,15 +802,16 @@ export default { ...@@ -670,15 +802,16 @@ export default {
this.suggest = data.suggest; this.suggest = data.suggest;
this.childrenInfoListMianTitle = data.childrenInfoListMianTitle; this.childrenInfoListMianTitle = data.childrenInfoListMianTitle;
this.channelTabListMianTitle = data.channelTabListMianTitle; this.channelTabListMianTitle = data.channelTabListMianTitle;
this.popupImageUrl = data.popupImageObj?.imageUrl?.startsWith('http') ? data.popupImageObj?.imageUrl : this.$baseUrl + data.popupImageObj?.imageUrl || ''; this.popupImageUrl = data.popupImageObj?.imageUrl?.startsWith('http')
? data.popupImageObj?.imageUrl
: this.$baseUrl + data.popupImageObj?.imageUrl || '';
this.popupImageObj = data.popupImageObj || {}; this.popupImageObj = data.popupImageObj || {};
this.floatIcon = data.floatIcon || {}; this.floatIcon = data.floatIcon || {};
if (this.homeStore.isLogin) { if (this.homeStore.isLogin) {
this.vipCardList[0] = data.vipConfigList.find(item => item.grade === this.homeStore.homeInfo this.vipCardList[0] = data.vipConfigList.find(
?.grade); (item) => item.grade === this.homeStore.homeInfo?.grade
);
this.vipCardList[0].level = this.homeStore.homeInfo?.gradeName; this.vipCardList[0].level = this.homeStore.homeInfo?.gradeName;
} else { } else {
this.vipCardList[0] = data.vipConfigList[0]; this.vipCardList[0] = data.vipConfigList[0];
...@@ -695,61 +828,61 @@ export default { ...@@ -695,61 +828,61 @@ export default {
if (this.canEatData && this.canEatData.id) { if (this.canEatData && this.canEatData.id) {
if (this.canEatData.isAnswered || this.canEatData.myAnswer) { if (this.canEatData.isAnswered || this.canEatData.myAnswer) {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "首页", pageName: '首页',
componentName: "能不能吃", componentName: '能不能吃',
componentContent: "查看问题解析" componentContent: '查看问题解析',
}); });
} }
if (!this.canEatData.isAnswered && !this.canEatData.myAnswer) { if (!this.canEatData.isAnswered && !this.canEatData.myAnswer) {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "首页", pageName: '首页',
componentName: "能不能吃", componentName: '能不能吃',
componentContent: "能吃" componentContent: '能吃',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "首页", pageName: '首页',
componentName: "能不能吃", componentName: '能不能吃',
componentContent: "少吃" componentContent: '少吃',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "首页", pageName: '首页',
componentName: "能不能吃", componentName: '能不能吃',
componentContent: "慎吃" componentContent: '慎吃',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "首页", pageName: '首页',
componentName: "能不能吃", componentName: '能不能吃',
componentContent: "禁吃" componentContent: '禁吃',
}); });
} }
} }
if (this.floatIcon?.imageUrl) { if (this.floatIcon?.imageUrl) {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "首页", pageName: '首页',
componentName: "悬浮窗", componentName: '悬浮窗',
componentContent: "悬浮窗" componentContent: '悬浮窗',
}); });
} }
const componentContent = this.toolList.tools?.[this.currentIndex]?.title || ''; const componentContent = this.toolList.tools?.[this.currentIndex]?.title || '';
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "首页", pageName: '首页',
componentName: "工具推荐", componentName: '工具推荐',
componentContent: componentContent componentContent: componentContent,
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "首页", pageName: '首页',
componentName: "首页banner", componentName: '首页banner',
componentContent: this.swiperList[0]?.title || '' componentContent: this.swiperList[0]?.title || '',
}); });
const childrenInfoList = this.childrenInfoList; const childrenInfoList = this.childrenInfoList;
...@@ -760,8 +893,8 @@ export default { ...@@ -760,8 +893,8 @@ export default {
xcxComponentExposure: 'true', xcxComponentExposure: 'true',
pageName: '首页', pageName: '首页',
componentName: '育儿智库', componentName: '育儿智库',
componentContent: item.desc componentContent: item.desc,
} },
}); });
}); });
this.qrNameList.forEach((item, index) => { this.qrNameList.forEach((item, index) => {
...@@ -771,20 +904,21 @@ export default { ...@@ -771,20 +904,21 @@ export default {
xcxComponentExposure: 'true', xcxComponentExposure: 'true',
pageName: '首页', pageName: '首页',
componentName: '跳转工具', componentName: '跳转工具',
componentContent: `${item}` componentContent: `${item}`,
} },
}); });
}); });
//动态添加专家团的首屏数据 //动态添加专家团的首屏数据
this.exposureTracker.addExposureElements([{ this.exposureTracker.addExposureElements([
{
id: 'expertTeam', id: 'expertTeam',
logParams: { logParams: {
xcxComponentExposure: 'true', xcxComponentExposure: 'true',
pageName: '首页', pageName: '首页',
componentName: '专家团', componentName: '专家团',
componentContent: '专家团tab切换-名医专家' componentContent: '专家团tab切换-名医专家',
} },
}, },
{ {
id: 'et_joingroup', id: 'et_joingroup',
...@@ -792,24 +926,26 @@ export default { ...@@ -792,24 +926,26 @@ export default {
xcxComponentExposure: 'true', xcxComponentExposure: 'true',
pageName: '首页', pageName: '首页',
componentName: '专家团', componentName: '专家团',
componentContent: '专家团-进群咨询' componentContent: '专家团-进群咨询',
} },
}, { },
{
id: 'et_more', id: 'et_more',
logParams: { logParams: {
xcxComponentExposure: 'true', xcxComponentExposure: 'true',
pageName: '首页', pageName: '首页',
componentName: '专家团', componentName: '专家团',
componentContent: '专家团-查看更多' componentContent: '专家团-查看更多',
} },
}, { },
{
id: 'childrenInfoList', id: 'childrenInfoList',
logParams: { logParams: {
xcxComponentExposure: 'true', xcxComponentExposure: 'true',
pageName: '首页', pageName: '首页',
componentName: '育儿智库', componentName: '育儿智库',
componentContent: '育儿智库' componentContent: '育儿智库',
} },
}, },
{ {
id: 'childrenInfoListMore', id: 'childrenInfoListMore',
...@@ -817,40 +953,39 @@ export default { ...@@ -817,40 +953,39 @@ export default {
xcxComponentExposure: 'true', xcxComponentExposure: 'true',
pageName: '首页', pageName: '首页',
componentName: '育儿智库', componentName: '育儿智库',
componentContent: '育儿智库-more' componentContent: '育儿智库-more',
} },
} },
]); ]);
}, },
changeIndicatorDots(e) { changeIndicatorDots(e) {
this.indicatorDots = !this.indicatorDots this.indicatorDots = !this.indicatorDots;
}, },
changeAutoplay(e) { changeAutoplay(e) {
this.autoplay = !this.autoplay this.autoplay = !this.autoplay;
}, },
intervalChange(e) { intervalChange(e) {
this.interval = e.target.value this.interval = e.target.value;
}, },
durationChange(e) { durationChange(e) {
this.duration = e.target.value this.duration = e.target.value;
}, },
jumpBannerHandler(item, index) { jumpBannerHandler(item, index) {
console.log("item====", item) console.log('item====', item);
md.sensorLogTake({ md.sensorLogTake({
xcxClick: '首页-首屏页面点击', xcxClick: '首页-首屏页面点击',
pageName: '首页-首屏', pageName: '首页-首屏',
buttonName: `第${index + 1}张焦点图-入口`, buttonName: `第${index + 1}张焦点图-入口`,
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "首页", pageName: '首页',
componentName: "首页banner", componentName: '首页banner',
componentContent: item.title componentContent: item.title,
}); });
if (item.videoUrl) { if (item.videoUrl) {
this.currentVideoUrl = item.videoUrl.indexOf('http') === -1 ? this.$baseUrl + item.videoUrl : item.videoUrl; this.currentVideoUrl =
item.videoUrl.indexOf('http') === -1 ? this.$baseUrl + item.videoUrl : item.videoUrl;
this.showVideo = true; this.showVideo = true;
return; return;
} }
...@@ -861,14 +996,14 @@ export default { ...@@ -861,14 +996,14 @@ export default {
// 没有 link,预览图片 // 没有 link,预览图片
uni.previewImage({ uni.previewImage({
urls: [item.url.indexOf('http') === -1 ? this.$baseUrl + item.url : item.url], // 预览当前图片 urls: [item.url.indexOf('http') === -1 ? this.$baseUrl + item.url : item.url], // 预览当前图片
current: item.url.indexOf('http') === -1 ? this.$baseUrl + item.url : item.url // 当前显示的图片 current: item.url.indexOf('http') === -1 ? this.$baseUrl + item.url : item.url, // 当前显示的图片
}); });
} }
}, },
previewImage(url) { previewImage(url) {
uni.previewImage({ uni.previewImage({
urls: [url], // 预览当前图片 urls: [url], // 预览当前图片
current: url // 当前显示的图片 current: url, // 当前显示的图片
}); });
}, },
jumpLinkWithLogin(link, evt) { jumpLinkWithLogin(link, evt) {
...@@ -904,9 +1039,9 @@ export default { ...@@ -904,9 +1039,9 @@ export default {
// 弹出视频 // 弹出视频
this.currentVideoUrl = videoUrl; this.currentVideoUrl = videoUrl;
if (index === 1) { if (index === 1) {
this.videoHeight = "100vw"; this.videoHeight = '100vw';
} else { } else {
this.videoHeight = "56vw"; this.videoHeight = '56vw';
} }
this.showVideo = true; this.showVideo = true;
return; return;
...@@ -952,14 +1087,14 @@ export default { ...@@ -952,14 +1087,14 @@ export default {
md.sensorLogTake({ md.sensorLogTake({
xcxClick: `首页-二屏页面点击`, xcxClick: `首页-二屏页面点击`,
pageName: `首页-二屏`, pageName: `首页-二屏`,
buttonName: type == 1 ? '专家团副标题点击' : '专家团进群咨询按钮点击' buttonName: type == 1 ? '专家团副标题点击' : '专家团进群咨询按钮点击',
}); });
if (type == 2) { if (type == 2) {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "首页", pageName: '首页',
componentName: "专家团", componentName: '专家团',
componentContent: '专家团-进群咨询' componentContent: '专家团-进群咨询',
}); });
} }
if (_index === 3) { if (_index === 3) {
...@@ -981,14 +1116,14 @@ export default { ...@@ -981,14 +1116,14 @@ export default {
goSearchHandler(e) { goSearchHandler(e) {
md.sensorLog(e); md.sensorLog(e);
uni.navigateTo({ uni.navigateTo({
url: "/pages/search/search" url: '/pages/search/search',
}) });
}, },
downloadHandler(imgurl) { downloadHandler(imgurl) {
md.sensorLogTake({ md.sensorLogTake({
xcxClick: `${this.qrNameList[this.popupIndex]}拉起半屏二维码入口页面点击`, xcxClick: `${this.qrNameList[this.popupIndex]}拉起半屏二维码入口页面点击`,
pageName: `${this.qrNameList[this.popupIndex]}拉起半屏二维码入口页面点击`, pageName: `${this.qrNameList[this.popupIndex]}拉起半屏二维码入口页面点击`,
buttonName: `下载二维码` buttonName: `下载二维码`,
}); });
uni.downloadFile({ uni.downloadFile({
...@@ -1000,29 +1135,29 @@ export default { ...@@ -1000,29 +1135,29 @@ export default {
success: (res) => { success: (res) => {
uni.showToast({ uni.showToast({
title: '保存成功', title: '保存成功',
icon: 'success' icon: 'success',
}); });
}, },
fail: (err) => { fail: (err) => {
uni.showToast({ uni.showToast({
title: '保存失败', title: '保存失败',
icon: 'none' icon: 'none',
}); });
} },
}); });
} else { } else {
uni.showToast({ uni.showToast({
title: '下载失败', title: '下载失败',
icon: 'none' icon: 'none',
}); });
} }
}, },
fail: (err) => { fail: (err) => {
uni.showToast({ uni.showToast({
title: '下载失败', title: '下载失败',
icon: 'none' icon: 'none',
}); });
} },
}); });
}, },
closeVideo() { closeVideo() {
...@@ -1043,17 +1178,11 @@ export default { ...@@ -1043,17 +1178,11 @@ export default {
}, },
goCustomerHandler(e) { goCustomerHandler(e) {
md.sensorLog(e); md.sensorLog(e);
const { const { memberId, mobile, openId, unionId } = this.homeStore.homeInfo;
memberId, const customerUrl = `https://intelcc-user.icsoc.net/?channelKey=45839e0505554f8c8aea3c7b6259b049&init=1&crmld=${memberId}&mobile=${mobile}&openId=${openId}&unionId=${unionId}`;
mobile,
openId,
unionId
} = this.homeStore.homeInfo;
const customerUrl =
`https://intelcc-user.icsoc.net/?channelKey=45839e0505554f8c8aea3c7b6259b049&init=1&crmld=${memberId}&mobile=${mobile}&openId=${openId}&unionId=${unionId}`;
jump({ jump({
type: JumpType.H5, type: JumpType.H5,
url: customerUrl url: customerUrl,
}); });
}, },
checkExposure(scrollTop) { checkExposure(scrollTop) {
...@@ -1088,17 +1217,17 @@ export default { ...@@ -1088,17 +1217,17 @@ export default {
// 添加埋点 // 添加埋点
const answerTexts = ['能吃', '少吃', '慎吃', '禁吃']; const answerTexts = ['能吃', '少吃', '慎吃', '禁吃'];
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "首页", pageName: '首页',
componentName: "能不能吃", componentName: '能不能吃',
componentContent: answerTexts[answerIndex] || '能吃' componentContent: answerTexts[answerIndex] || '能吃',
}); });
// 添加登录检查 // 添加登录检查
if (!this.homeStore.isLogin) { if (!this.homeStore.isLogin) {
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: '/pages/activity/register',
}); });
return; return;
} }
...@@ -1106,7 +1235,7 @@ export default { ...@@ -1106,7 +1235,7 @@ export default {
if (!this.canEatData || !this.canEatData.id) { if (!this.canEatData || !this.canEatData.id) {
uni.showToast({ uni.showToast({
title: '数据异常,请稍后重试', title: '数据异常,请稍后重试',
icon: 'none' icon: 'none',
}); });
return; return;
} }
...@@ -1114,7 +1243,7 @@ export default { ...@@ -1114,7 +1243,7 @@ export default {
try { try {
const response = await fetchCanEatJoin({ const response = await fetchCanEatJoin({
id: this.canEatData.id, id: this.canEatData.id,
answer: answerIndex answer: answerIndex,
}); });
if (response.success && response.data) { if (response.success && response.data) {
...@@ -1132,19 +1261,28 @@ export default { ...@@ -1132,19 +1261,28 @@ export default {
myAnswer: userAnswer, myAnswer: userAnswer,
correctAnswer: correctAnswer, correctAnswer: correctAnswer,
correct: correctAnswerIndex, // 保存数字格式的正确答案 correct: correctAnswerIndex, // 保存数字格式的正确答案
isCorrect: isCorrect isCorrect: isCorrect,
}; };
// 如果答对了并且有奖励,显示奖励弹窗 // 如果答对了并且有奖励,显示奖励弹窗
if (isCorrect && response.data.reward && (response.data.reward.credits > 0 || response.data.reward.prizeName)) { if (
isCorrect &&
response.data.reward &&
(response.data.reward.credits > 0 || response.data.reward.prizeName)
) {
this.showRewardPopup(response.data.reward); this.showRewardPopup(response.data.reward);
} else { } else {
// 其他情况显示解析弹窗 // 其他情况显示解析弹窗
this.showAnswerResult({ this.showAnswerResult(
{
analysis: this.canEatData.analysis?.content || '暂无解析内容', analysis: this.canEatData.analysis?.content || '暂无解析内容',
allResult: this.canEatData.analysis?.allResult || '25|25|25|25', allResult: this.canEatData.analysis?.allResult || '25|25|25|25',
reward: response.data.reward || null reward: response.data.reward || null,
}, isCorrect, userAnswer, correctAnswer); },
isCorrect,
userAnswer,
correctAnswer
);
} }
// 答题后刷新数据 // 答题后刷新数据
...@@ -1152,14 +1290,14 @@ export default { ...@@ -1152,14 +1290,14 @@ export default {
} else { } else {
uni.showToast({ uni.showToast({
title: response.message || '答题失败,请稍后重试', title: response.message || '答题失败,请稍后重试',
icon: 'none' icon: 'none',
}); });
} }
} catch (error) { } catch (error) {
console.error('提交能不能吃答案异常:', error); console.error('提交能不能吃答案异常:', error);
uni.showToast({ uni.showToast({
title: '网络异常,请稍后重试', title: '网络异常,请稍后重试',
icon: 'none' icon: 'none',
}); });
} }
}, },
...@@ -1173,7 +1311,10 @@ export default { ...@@ -1173,7 +1311,10 @@ export default {
let imageUrl = ''; let imageUrl = '';
if (rewardData.prizeImage) { if (rewardData.prizeImage) {
// 如果有奖品图片,使用奖品图片 // 如果有奖品图片,使用奖品图片
imageUrl = rewardData.prizeImage.indexOf('http') === 0 ? rewardData.prizeImage : this.$baseUrl + rewardData.prizeImage; imageUrl =
rewardData.prizeImage.indexOf('http') === 0
? rewardData.prizeImage
: this.$baseUrl + rewardData.prizeImage;
} else if (rewardData.credits && !rewardData.prizeName) { } else if (rewardData.credits && !rewardData.prizeName) {
// 如果只有积分奖励,使用金币图片 // 如果只有积分奖励,使用金币图片
imageUrl = this.$baseUrl + 'homepage/Q3Res/goldCoin.png'; imageUrl = this.$baseUrl + 'homepage/Q3Res/goldCoin.png';
...@@ -1189,7 +1330,7 @@ export default { ...@@ -1189,7 +1330,7 @@ export default {
this.goldCoinConfig = { this.goldCoinConfig = {
title: '恭喜你回答正确', title: '恭喜你回答正确',
description: `获得${rewardText}`, description: `获得${rewardText}`,
imageUrl: imageUrl imageUrl: imageUrl,
}; };
// 显示金币动画 // 显示金币动画
...@@ -1198,9 +1339,9 @@ export default { ...@@ -1198,9 +1339,9 @@ export default {
// 添加金币动画模块曝光埋点 // 添加金币动画模块曝光埋点
this.$nextTick(() => { this.$nextTick(() => {
md.sensorPopLogTake({ md.sensorPopLogTake({
xcxPopExposure: "true", xcxPopExposure: 'true',
toolName: "能不能吃", toolName: '能不能吃',
popName: "答题结果弹窗" popName: '答题结果弹窗',
}); });
}); });
...@@ -1211,12 +1352,16 @@ export default { ...@@ -1211,12 +1352,16 @@ export default {
setTimeout(() => { setTimeout(() => {
this.showGoldCoinAnimation = false; this.showGoldCoinAnimation = false;
// 动效结束展示解析弹窗 // 动效结束展示解析弹窗
this.showAnswerResult({ this.showAnswerResult(
{
analysis: currentCanEatData.analysis?.content || '暂无解析内容', analysis: currentCanEatData.analysis?.content || '暂无解析内容',
allResult: currentCanEatData.analysis?.allResult || '25|25|25|25', allResult: currentCanEatData.analysis?.allResult || '25|25|25|25',
reward: rewardData || null reward: rewardData || null,
}, true, currentCanEatData.myAnswer, currentCanEatData.correctAnswer); },
true,
currentCanEatData.myAnswer,
currentCanEatData.correctAnswer
);
}, 3000); }, 3000);
}, },
...@@ -1225,35 +1370,35 @@ export default { ...@@ -1225,35 +1370,35 @@ export default {
// 根据奖品名称或类型返回对应的图片 // 根据奖品名称或类型返回对应的图片
const prizeImages = { const prizeImages = {
// 积分类奖品 // 积分类奖品
'积分': this.$baseUrl + 'homepage/Q3Res/goldCoin.png', 积分: this.$baseUrl + 'homepage/Q3Res/goldCoin.png',
'碳能量': this.$baseUrl + 'homepage/Q3Res/goldCoin.png', 碳能量: this.$baseUrl + 'homepage/Q3Res/goldCoin.png',
// 优惠券类奖品 // 优惠券类奖品
'优惠券': this.$baseUrl + 'homepage/Q3Res/coupon.png', 优惠券: this.$baseUrl + 'homepage/Q3Res/coupon.png',
'代金券': this.$baseUrl + 'homepage/Q3Res/coupon.png', 代金券: this.$baseUrl + 'homepage/Q3Res/coupon.png',
'折扣券': this.$baseUrl + 'homepage/Q3Res/coupon.png', 折扣券: this.$baseUrl + 'homepage/Q3Res/coupon.png',
// 实物奖品 // 实物奖品
'奶粉': this.$baseUrl + 'homepage/Q3Res/milkPowder.png', 奶粉: this.$baseUrl + 'homepage/Q3Res/milkPowder.png',
'辅食': this.$baseUrl + 'homepage/Q3Res/babyFood.png', 辅食: this.$baseUrl + 'homepage/Q3Res/babyFood.png',
'玩具': this.$baseUrl + 'homepage/Q3Res/toy.png', 玩具: this.$baseUrl + 'homepage/Q3Res/toy.png',
'用品': this.$baseUrl + 'homepage/Q3Res/babyProduct.png', 用品: this.$baseUrl + 'homepage/Q3Res/babyProduct.png',
// 虚拟奖品 // 虚拟奖品
'会员': this.$baseUrl + 'homepage/Q3Res/vip.png', 会员: this.$baseUrl + 'homepage/Q3Res/vip.png',
'体验': this.$baseUrl + 'homepage/Q3Res/experience.png', 体验: this.$baseUrl + 'homepage/Q3Res/experience.png',
// 默认奖品图片 // 默认奖品图片
'default': this.$baseUrl + 'homepage/Q3Res/gift.png' default: this.$baseUrl + 'homepage/Q3Res/gift.png',
}; };
// 根据奖品类型匹配 // 根据奖品类型匹配
if (prizeType) { if (prizeType) {
const typeImages = { const typeImages = {
'CREDITS': this.$baseUrl + 'homepage/Q3Res/goldCoin.png', CREDITS: this.$baseUrl + 'homepage/Q3Res/goldCoin.png',
'COUPON': this.$baseUrl + 'homepage/Q3Res/coupon.png', COUPON: this.$baseUrl + 'homepage/Q3Res/coupon.png',
'PHYSICAL': this.$baseUrl + 'homepage/Q3Res/gift.png', PHYSICAL: this.$baseUrl + 'homepage/Q3Res/gift.png',
'VIRTUAL': this.$baseUrl + 'homepage/Q3Res/vip.png' VIRTUAL: this.$baseUrl + 'homepage/Q3Res/vip.png',
}; };
if (typeImages[prizeType]) { if (typeImages[prizeType]) {
return typeImages[prizeType]; return typeImages[prizeType];
...@@ -1282,8 +1427,8 @@ export default { ...@@ -1282,8 +1427,8 @@ export default {
this.isAnswerCorrect = isCorrect; this.isAnswerCorrect = isCorrect;
this.currentQuestion = this.canEatData.title || ''; this.currentQuestion = this.canEatData.title || '';
// 确保正确答案是文案而不是索引 // 确保正确答案是文案而不是索引
this.correctAnswer = typeof correctAnswer === 'number' ? this.correctAnswer =
['能吃', '少吃', '慎吃', '禁吃'][correctAnswer] : correctAnswer; typeof correctAnswer === 'number' ? ['能吃', '少吃', '慎吃', '禁吃'][correctAnswer] : correctAnswer;
// 设置奖励信息 // 设置奖励信息
if (responseData.reward) { if (responseData.reward) {
...@@ -1318,30 +1463,36 @@ export default { ...@@ -1318,30 +1463,36 @@ export default {
viewAnalysis() { viewAnalysis() {
// 添加埋点 // 添加埋点
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "首页", pageName: '首页',
componentName: "能不能吃", componentName: '能不能吃',
componentContent: "查看问题解析" componentContent: '查看问题解析',
}); });
console.warn('查看解析数据:', this.canEatData); console.warn('查看解析数据:', this.canEatData);
if (this.canEatData && this.canEatData.myAnswer && this.canEatData.correct !== undefined) { if (this.canEatData && this.canEatData.myAnswer && this.canEatData.correct !== undefined) {
// 将正确答案从数字格式转换为文案格式 // 将正确答案从数字格式转换为文案格式
const correctAnswerText = { 0: '能吃', 1: '少吃', 2: '慎吃', 3: '禁吃' }[this.canEatData.correct] || '能吃'; const correctAnswerText =
{ 0: '能吃', 1: '少吃', 2: '慎吃', 3: '禁吃' }[this.canEatData.correct] || '能吃';
// 通过比较用户答案和正确答案判断答题正确性 // 通过比较用户答案和正确答案判断答题正确性
const isCorrect = this.canEatData.correct == this.canEatData.myAnswer; const isCorrect = this.canEatData.correct == this.canEatData.myAnswer;
// 显示解析弹窗 // 显示解析弹窗
this.showAnswerResult({ this.showAnswerResult(
{
analysis: this.canEatData.analysis?.content || '暂无解析内容', analysis: this.canEatData.analysis?.content || '暂无解析内容',
allResult: this.canEatData.analysis?.allResult || '', allResult: this.canEatData.analysis?.allResult || '',
reward: this.canEatData.reward || null reward: this.canEatData.reward || null,
}, isCorrect, this.canEatData.myAnswer, correctAnswerText); },
isCorrect,
this.canEatData.myAnswer,
correctAnswerText
);
} else { } else {
uni.showToast({ uni.showToast({
title: '暂无解析内容', title: '暂无解析内容',
icon: 'none' icon: 'none',
}); });
} }
}, },
...@@ -1350,68 +1501,62 @@ export default { ...@@ -1350,68 +1501,62 @@ export default {
this.currentIndex = e.detail.current; this.currentIndex = e.detail.current;
const componentContent = this.toolList.tools?.[this.currentIndex]?.title || ''; const componentContent = this.toolList.tools?.[this.currentIndex]?.title || '';
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "首页", pageName: '首页',
componentName: "工具推荐", componentName: '工具推荐',
componentContent: componentContent componentContent: componentContent,
}); });
}, },
onBannerSwiperChange(e) { onBannerSwiperChange(e) {
this.bannerCurrentIndex = e.detail.current; this.bannerCurrentIndex = e.detail.current;
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "首页", pageName: '首页',
componentName: "首页banner", componentName: '首页banner',
componentContent: this.swiperList[e.detail.current].title componentContent: this.swiperList[e.detail.current].title,
}); });
}, },
async handleToolClick(item) { async handleToolClick(item) {
md.sensorLogTake({ md.sensorLogTake({
xcxClick: "首页-二屏页面点击", xcxClick: '首页-二屏页面点击',
pageName: "首页-二屏", pageName: '首页-二屏',
buttonName: item.title + "工具点击", buttonName: item.title + '工具点击',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "首页", pageName: '首页',
componentName: "工具推荐", componentName: '工具推荐',
componentContent: item.title componentContent: item.title,
}); });
if (item.title === "医生问诊") { if (item.title === '医生问诊') {
// if (!cfgStatus.value.isRegister) return; // if (!cfgStatus.value.isRegister) return;
const res = await getHealthField(); const res = await getHealthField();
if (!res.success) { if (!res.success) {
uni.showToast({ uni.showToast({
title: "获取健康字段失败", title: '获取健康字段失败',
icon: "none", icon: 'none',
}); });
return; return;
} }
const { const { sign, timestamp, appId, partnerUserId, env } = res.data;
sign,
timestamp,
appId,
partnerUserId,
env
} = res.data;
jump({ jump({
type: JumpType.MINI, type: JumpType.MINI,
url: "/pages/partner/redirect", url: '/pages/partner/redirect',
extra: { extra: {
appId: "wx81ecfb5aa3fb512f", appId: 'wx81ecfb5aa3fb512f',
envVersion: env, envVersion: env,
extraData: { extraData: {
sign, // 参考 4.请求参数 sign, // 参考 4.请求参数
timestamp, // 参考 4.请求参数 timestamp, // 参考 4.请求参数
appId, // 参考 4.请求参数 appId, // 参考 4.请求参数
partnerUserId, // 参考 4.请求参数 partnerUserId, // 参考 4.请求参数
targetApp: "/h5/partner/shining-like-a-start/landing-free-consult?sysType=CRF", targetApp: '/h5/partner/shining-like-a-start/landing-free-consult?sysType=CRF',
}, },
}, },
}); });
...@@ -1425,18 +1570,18 @@ export default { ...@@ -1425,18 +1570,18 @@ export default {
}, },
onSelEtTap(index) { onSelEtTap(index) {
let str = index === 0 ? '名医专家' : (index === 1 ? '科研专家' : '权威机构') let str = index === 0 ? '名医专家' : index === 1 ? '科研专家' : '权威机构';
md.sensorLogTake({ md.sensorLogTake({
xcxClick: "首页-二屏页面点击", xcxClick: '首页-二屏页面点击',
pageName: "首页-二屏", pageName: '首页-二屏',
buttonName: str + "tab按钮点击", buttonName: str + 'tab按钮点击',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "首页", pageName: '首页',
componentName: "专家团", componentName: '专家团',
componentContent: '专家团tab切换-' + str componentContent: '专家团tab切换-' + str,
}); });
this.etTabSelIndex = index; this.etTabSelIndex = index;
...@@ -1451,24 +1596,24 @@ export default { ...@@ -1451,24 +1596,24 @@ export default {
str = '权威机构'; str = '权威机构';
} }
if (index === 1) { if (index === 1) {
str += '内容' str += '内容';
} else { } else {
str += '点击查看更多'; str += '点击查看更多';
} }
md.sensorLogTake({ md.sensorLogTake({
xcxClick: "首页-二屏页面点击", xcxClick: '首页-二屏页面点击',
pageName: "首页-二屏", pageName: '首页-二屏',
buttonName: str + "-点击", buttonName: str + '-点击',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "首页", pageName: '首页',
componentName: "专家团", componentName: '专家团',
componentContent: str componentContent: str,
}); });
jump({ jump({
type: 1, type: 1,
url: '/pages/expertTeamPage/expertTeamPage?tab=' + (this.etTabSelIndex + 1) url: '/pages/expertTeamPage/expertTeamPage?tab=' + (this.etTabSelIndex + 1),
}); });
}, },
closeImagePopup() { closeImagePopup() {
...@@ -1479,22 +1624,22 @@ export default { ...@@ -1479,22 +1624,22 @@ export default {
imagePopupJump() { imagePopupJump() {
md.sensorPopLogTake({ md.sensorPopLogTake({
xcxPopClick: "true", xcxPopClick: 'true',
toolName: "首页", toolName: '首页',
popName: this.popupImageObj.title || "北纬47°鲜活溯源之旅", popName: this.popupImageObj.title || '北纬47°鲜活溯源之旅',
buttonName: this.popupImageObj.btnName || "立即寻宝" buttonName: this.popupImageObj.btnName || '立即寻宝',
}); });
jump({ jump({
type: this.popupImageObj.jumpType || this.popupImageObj.jumpExtra?.type, type: this.popupImageObj.jumpType || this.popupImageObj.jumpExtra?.type,
url: this.popupImageObj.jumpUrl, url: this.popupImageObj.jumpUrl,
extra: this.popupImageObj.jumpExtra extra: this.popupImageObj.jumpExtra,
}); });
}, },
showImagePopup() { showImagePopup() {
md.sensorPopLogTake({ md.sensorPopLogTake({
xcxPopExposure: "true", xcxPopExposure: 'true',
toolName: "首页", toolName: '首页',
popName: this.popupImageObj.title || "北纬47°鲜活溯源之旅" popName: this.popupImageObj.title || '北纬47°鲜活溯源之旅',
}); });
this.$refs.imagePopup.open('center'); this.$refs.imagePopup.open('center');
// 设置图片弹窗为可见状态 // 设置图片弹窗为可见状态
...@@ -1568,24 +1713,27 @@ export default { ...@@ -1568,24 +1713,27 @@ export default {
// 悬浮图片点击事件 // 悬浮图片点击事件
onfloatIconClick() { onfloatIconClick() {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "首页", pageName: '首页',
componentName: "悬浮窗", componentName: '悬浮窗',
componentContent: "悬浮窗" componentContent: '悬浮窗',
}); });
// 如果正在拖拽,则不触发点击事件 // 如果正在拖拽,则不触发点击事件
if (!this.isDragging) { if (!this.isDragging) {
// 记录点击日志 // 记录点击日志
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "首页", pageName: '首页',
componentName: "悬浮图片", componentName: '悬浮图片',
componentContent: "点击悬浮图片" componentContent: '点击悬浮图片',
}); });
if (this.floatIcon.videoUrl) { if (this.floatIcon.videoUrl) {
// 播放视频 // 播放视频
this.currentVideoUrl = this.floatIcon.videoUrl.indexOf('http') === -1 ? this.$baseUrl + this.floatIcon.videoUrl : this.floatIcon.videoUrl; this.currentVideoUrl =
this.floatIcon.videoUrl.indexOf('http') === -1
? this.$baseUrl + this.floatIcon.videoUrl
: this.floatIcon.videoUrl;
this.showVideo = true; this.showVideo = true;
return; return;
} else if (this.floatIcon.link) { } else if (this.floatIcon.link) {
...@@ -1593,9 +1741,9 @@ export default { ...@@ -1593,9 +1741,9 @@ export default {
jump(this.floatIcon.link); jump(this.floatIcon.link);
} }
} }
} },
} },
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -1692,7 +1840,7 @@ export default { ...@@ -1692,7 +1840,7 @@ export default {
width: 40rpx; width: 40rpx;
height: 16rpx; height: 16rpx;
border-radius: 8rpx; border-radius: 8rpx;
background-color: #D3A358; background-color: #d3a358;
} }
} }
} }
...@@ -1866,7 +2014,6 @@ export default { ...@@ -1866,7 +2014,6 @@ export default {
white-space: nowrap; white-space: nowrap;
word-break: break-all; word-break: break-all;
max-width: 7em; max-width: 7em;
} }
.tool_context { .tool_context {
...@@ -1884,12 +2031,10 @@ export default { ...@@ -1884,12 +2031,10 @@ export default {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
line-height: 1.5; line-height: 1.5;
max-height: 3em; max-height: 3em;
} }
} }
} }
/* 自定义指示点样式 */ /* 自定义指示点样式 */
.custom-indicator { .custom-indicator {
width: 200rpx; width: 200rpx;
...@@ -2047,7 +2192,6 @@ export default { ...@@ -2047,7 +2192,6 @@ export default {
height: 232rpx; height: 232rpx;
position: absolute; position: absolute;
z-index: 0; z-index: 0;
} }
.level { .level {
...@@ -2094,7 +2238,6 @@ export default { ...@@ -2094,7 +2238,6 @@ export default {
top: 0; top: 0;
opacity: 0; opacity: 0;
pointer-events: auto; pointer-events: auto;
} }
.cardbtnbg { .cardbtnbg {
...@@ -2146,7 +2289,6 @@ export default { ...@@ -2146,7 +2289,6 @@ export default {
.contentitem { .contentitem {
position: absolute; position: absolute;
} }
} }
.channelbox { .channelbox {
...@@ -2181,8 +2323,6 @@ export default { ...@@ -2181,8 +2323,6 @@ export default {
} }
} }
.listbox { .listbox {
display: flex; display: flex;
margin-top: 20rpx; margin-top: 20rpx;
...@@ -2262,12 +2402,9 @@ export default { ...@@ -2262,12 +2402,9 @@ export default {
width: 46rpx; width: 46rpx;
height: 22rpx; height: 22rpx;
color: #fff; color: #fff;
} }
} }
.infodesc { .infodesc {
color: #999999; color: #999999;
font-size: 22rpx; font-size: 22rpx;
...@@ -2279,12 +2416,8 @@ export default { ...@@ -2279,12 +2416,8 @@ export default {
overflow: hidden; overflow: hidden;
} }
} }
} }
} }
} }
.channelscroll2 { .channelscroll2 {
...@@ -2345,9 +2478,7 @@ export default { ...@@ -2345,9 +2478,7 @@ export default {
} }
} }
.desc { .desc {
color: @color-black-deep; color: @color-black-deep;
font-size: 24rpx; font-size: 24rpx;
display: flex; display: flex;
...@@ -2385,11 +2516,10 @@ export default { ...@@ -2385,11 +2516,10 @@ export default {
align-items: flex-end; align-items: flex-end;
justify-content: space-between; justify-content: space-between;
.icon {} .icon {
}
} }
} }
} }
.popup-content { .popup-content {
...@@ -2421,7 +2551,6 @@ export default { ...@@ -2421,7 +2551,6 @@ export default {
font-size: 36rpx; font-size: 36rpx;
color: @color-black-deep; color: @color-black-deep;
font-weight: bold; font-weight: bold;
} }
.desc { .desc {
...@@ -2431,7 +2560,6 @@ export default { ...@@ -2431,7 +2560,6 @@ export default {
font-size: 28rpx; font-size: 28rpx;
color: @color-black-medium; color: @color-black-medium;
font-weight: bold; font-weight: bold;
} }
.qrcode { .qrcode {
...@@ -2583,9 +2711,9 @@ export default { ...@@ -2583,9 +2711,9 @@ export default {
padding: 20rpx 0; padding: 20rpx 0;
margin: 0 10rpx; margin: 0 10rpx;
background-color: #fff; background-color: #fff;
border: 1px solid #B27C1E; border: 1px solid #b27c1e;
border-radius: 30rpx; border-radius: 30rpx;
color: #B27C1E; color: #b27c1e;
font-size: 28rpx; font-size: 28rpx;
} }
...@@ -2618,22 +2746,22 @@ export default { ...@@ -2618,22 +2746,22 @@ export default {
} }
.user-answer.correct { .user-answer.correct {
background-color: #E8F5E8; background-color: #e8f5e8;
color: #4CAF50; color: #4caf50;
border-color: #4CAF50; border-color: #4caf50;
} }
.user-answer.incorrect { .user-answer.incorrect {
background-color: #FFEBEE; background-color: #ffebee;
color: #F44336; color: #f44336;
border-color: #F44336; border-color: #f44336;
} }
.correct-answer { .correct-answer {
width: 100%; width: 100%;
text-align: center; text-align: center;
padding: 20rpx 0; padding: 20rpx 0;
background-color: #B27C1E; background-color: #b27c1e;
color: #ffffff; color: #ffffff;
font-size: 28rpx; font-size: 28rpx;
border-radius: 30rpx; border-radius: 30rpx;
...@@ -2641,7 +2769,7 @@ export default { ...@@ -2641,7 +2769,7 @@ export default {
.analysis-link { .analysis-link {
font-size: 28rpx; font-size: 28rpx;
color: #B27C1E; color: #b27c1e;
margin-top: 10rpx; margin-top: 10rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -2686,7 +2814,6 @@ export default { ...@@ -2686,7 +2814,6 @@ export default {
mix-blend-mode: multiply; mix-blend-mode: multiply;
} }
.gold-coin-content { .gold-coin-content {
text-align: center; text-align: center;
padding: 60rpx 40rpx; padding: 60rpx 40rpx;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<template> <template>
<view class="my-container"> <view class="my-container">
<view v-if="cfgStatus.showDetail" class="wheel-selector-fixed"> <view v-if="cfgStatus.showDetail" class="wheel-selector-fixed">
<WheelSelector :options="wheelOptions" :selectedIndex="wheelSelectedIndex" <WheelSelector
:bgImg="$baseUrl + 'my/track/track.png'" :iconNormal="$baseUrl + 'my/track/icon_stage_nor.png'" :options="wheelOptions"
:selectedIndex="wheelSelectedIndex"
:bgImg="$baseUrl + 'my/track/track.png'"
:iconNormal="$baseUrl + 'my/track/icon_stage_nor.png'"
:iconSelected="$baseUrl + 'my/track/icon_stage_sel.png'" :iconSelected="$baseUrl + 'my/track/icon_stage_sel.png'"
@update:selectedIndex="(val) => (wheelSelectedIndex = val)" @change="handleWheelChange" /> @update:selectedIndex="(val) => (wheelSelectedIndex = val)"
@change="handleWheelChange"
/>
</view> </view>
<view class="bg-container" <view
class="bg-container"
v-if="cfgStatus.isRegister" v-if="cfgStatus.isRegister"
:data-log="{ :data-log="{
xcxClick: '我的页面点击', xcxClick: '我的页面点击',
pageName: '我的页面', pageName: '我的页面',
buttonName: '个人信息修改', buttonName: '个人信息修改',
}" @click="handleUploadBackground"> }"
<image class="bg-img" :src="localBackgroundImg || babyInfo?.content?.backgroundImg || $baseUrl + 'my/default_bg.png' @click="handleUploadBackground"
" mode="widthFix" lazy-load="false" binderror="" bindload="" /> >
<image
class="bg-img"
:src="localBackgroundImg || babyInfo?.content?.backgroundImg || $baseUrl + 'my/default_bg.png'"
mode="widthFix"
lazy-load="false"
binderror=""
bindload=""
/>
<image class="banner_cover" :src="$baseUrl + 'my/cover_white.png'" mode="aspectFill" /> <image class="banner_cover" :src="$baseUrl + 'my/cover_white.png'" mode="aspectFill" />
</view> </view>
...@@ -33,10 +47,13 @@ ...@@ -33,10 +47,13 @@
buttonName: '个人信息修改', buttonName: '个人信息修改',
}" }"
open-type="chooseAvatar" open-type="chooseAvatar"
@chooseavatar="onChooseAvatar"> @chooseavatar="onChooseAvatar"
<image class="avatar" :src="localAvatarUrl || babyInfo?.content?.babyAvatar || >
$baseUrl + 'common/default_avatar.png' <image
" mode="widthFix" /> class="avatar"
:src="localAvatarUrl || babyInfo?.content?.babyAvatar || $baseUrl + 'common/default_avatar.png'"
mode="widthFix"
/>
</button> </button>
<view <view
v-else v-else
...@@ -46,49 +63,76 @@ ...@@ -46,49 +63,76 @@
pageName: '我的页面', pageName: '我的页面',
buttonName: '个人信息修改', buttonName: '个人信息修改',
}" }"
@click="handleAvatarClick"> @click="handleAvatarClick"
<image class="avatar" :src="localAvatarUrl || babyInfo?.content?.babyAvatar || >
$baseUrl + 'common/default_avatar.png' <image
" mode="widthFix" /> class="avatar"
:src="localAvatarUrl || babyInfo?.content?.babyAvatar || $baseUrl + 'common/default_avatar.png'"
mode="widthFix"
/>
</view> </view>
</view> </view>
<button v-if="!cfgStatus.isRegister" type="primary" class="avatar-container" @click="clickRegisterShield" /> <button
<image class="avatar-modify" :src="$baseUrl + 'my/icon_modify.png'" mode="aspectFit" lazy-load="false" /> v-if="!cfgStatus.isRegister"
type="primary"
class="avatar-container"
@click="clickRegisterShield"
/>
<image
class="avatar-modify"
:src="$baseUrl + 'my/icon_modify.png'"
mode="aspectFit"
lazy-load="false"
/>
<view class="user-detail"> <view class="user-detail">
<view class="user-detail-nickname" :data-log="{ <view
class="user-detail-nickname"
:data-log="{
xcxClick: '我的页面点击', xcxClick: '我的页面点击',
pageName: '我的页面', pageName: '我的页面',
buttonName: '宝宝信息切换', buttonName: '宝宝信息切换',
}"> }"
>
<text class="nickname" @click="handleEditProfile">{{ <text class="nickname" @click="handleEditProfile">{{
babyInfo?.babyStage === 0 babyInfo?.babyStage === 0
? "备孕" ? '备孕'
: babyInfo?.babyStage === 1 : babyInfo?.babyStage === 1
? "孕中" ? '孕中'
: babyInfo.babyName || "暂无昵称" : babyInfo.babyName || '暂无昵称'
}}</text> }}</text>
<view class="user-detail-nickname-icon-wrapper" @click="handleChangeBaby"> <view class="user-detail-nickname-icon-wrapper" @click="handleChangeBaby">
<image class="user-detail-nickname-icon" :src="$baseUrl + 'registerLayer/icon_arrow_yellow.png'" <image
mode="aspectFit" /> class="user-detail-nickname-icon"
:src="$baseUrl + 'registerLayer/icon_arrow_yellow.png'"
mode="aspectFit"
/>
</view> </view>
</view> </view>
<!-- 积分账户 --> <!-- 积分账户 -->
<view class="integral-account" @click="handleEditProfile"> <view class="integral-account" @click="handleEditProfile">
<text class="integral-account-text"> 账号: </text> <text class="integral-account-text"> 账号: </text>
<text class="integral-account-value"> <text class="integral-account-value"> {{ userStore.memberInfo?.mobile || '' }}</text>
{{ userStore.memberInfo?.mobile || '' }}</text>
</view> </view>
<BabySwitcher v-if="showBabySwitcher" :show="showBabySwitcher" :babyList="babyInfo.allBabyBaseInfo || []" <BabySwitcher
:addIcon="$baseUrl + 'my/baby_add_btn.png'" @close="showBabySwitcher = false" @select="onSelectBaby" v-if="showBabySwitcher"
@add="onAddBaby" /> :show="showBabySwitcher"
:babyList="babyInfo.allBabyBaseInfo || []"
:addIcon="$baseUrl + 'my/baby_add_btn.png'"
@close="showBabySwitcher = false"
@select="onSelectBaby"
@add="onAddBaby"
/>
</view> </view>
<view class="integralContainer" @click="handleIntegralClick"> <view class="integralContainer" @click="handleIntegralClick">
<image class="integralIcon" src="https://course.feihe.com/momclub-picture/my/integralBg.png" <image
mode="aspectFit" /> class="integralIcon"
<text class="integralText0">{{ points || "0" }}</text> src="https://course.feihe.com/momclub-picture/my/integralBg.png"
mode="aspectFit"
/>
<text class="integralText0">{{ points || '0' }}</text>
<text class="integralText1">积分</text> <text class="integralText1">积分</text>
</view> </view>
</view> </view>
...@@ -102,35 +146,51 @@ ...@@ -102,35 +146,51 @@
</view> </view>
<view class="desc-content"> <view class="desc-content">
<text class="desc-text">{{ <text class="desc-text"
>{{
wheelOptions[wheelSelectedIndex]?.desc.length > 46 wheelOptions[wheelSelectedIndex]?.desc.length > 46
? cfgStatus.openBabyCardDesc ? cfgStatus.openBabyCardDesc
? wheelOptions[wheelSelectedIndex]?.desc ? wheelOptions[wheelSelectedIndex]?.desc
: wheelOptions[wheelSelectedIndex]?.desc.slice(0, 46) + "..." : wheelOptions[wheelSelectedIndex]?.desc.slice(0, 46) + '...'
: wheelOptions[wheelSelectedIndex]?.desc : wheelOptions[wheelSelectedIndex]?.desc
}} }}
</text> </text>
<text v-if="wheelOptions[wheelSelectedIndex]?.desc.length > 46" class="desc-more" @click="handleOpenClick">{{ <text
cfgStatus.openBabyCardDesc ? "点击收起" : "点击展开" }}</text> v-if="wheelOptions[wheelSelectedIndex]?.desc.length > 46"
class="desc-more"
@click="handleOpenClick"
>{{ cfgStatus.openBabyCardDesc ? '点击收起' : '点击展开' }}</text
>
</view> </view>
</view> </view>
</view> </view>
<!-- 添加宝宝信息模块 --> <!-- 添加宝宝信息模块 -->
<view class="add-baby-info-module" <view
v-if="cfgStatus.isRegister && (!babyInfo?.allBabyBaseInfo || babyInfo.allBabyBaseInfo.length === 0)"> class="add-baby-info-module"
v-if="cfgStatus.isRegister && (!babyInfo?.allBabyBaseInfo || babyInfo.allBabyBaseInfo.length === 0)"
>
<image class="add-baby-info-bg" :src="$baseUrl + 'homepage/Q3Res/addBabyInfoBg2.png'"></image> <image class="add-baby-info-bg" :src="$baseUrl + 'homepage/Q3Res/addBabyInfoBg2.png'"></image>
<view class="add-baby-info-btn-container"> <view class="add-baby-info-btn-container">
<image class="add-baby-info-btn" :src="$baseUrl + 'homepage/Q3Res/addBabyInfoBtn2.png'" <image
@tap="handleAddBabyInfoClick"></image> class="add-baby-info-btn"
:src="$baseUrl + 'homepage/Q3Res/addBabyInfoBtn2.png'"
@tap="handleAddBabyInfoClick"
></image>
</view> </view>
</view> </view>
<!-- 完成任务模块 --> <!-- 完成任务模块 -->
<view class="task-module" <view
v-if="cfgStatus.isRegister && (babyInfo?.allBabyBaseInfo && babyInfo.allBabyBaseInfo.length > 0)"> class="task-module"
v-if="cfgStatus.isRegister && babyInfo?.allBabyBaseInfo && babyInfo.allBabyBaseInfo.length > 0"
>
<image class="task-guide-bg" :src="$baseUrl + 'homepage/Q3Res/my_taskGuideBg.png'"></image> <image class="task-guide-bg" :src="$baseUrl + 'homepage/Q3Res/my_taskGuideBg.png'"></image>
<image class="task-do-btn" :src="$baseUrl + 'homepage/Q3Res/my_taskDoBtn.png'" @tap="handleTaskClick"></image> <image
class="task-do-btn"
:src="$baseUrl + 'homepage/Q3Res/my_taskDoBtn.png'"
@tap="handleTaskClick"
></image>
</view> </view>
<!-- 工具 --> <!-- 工具 -->
...@@ -139,11 +199,19 @@ ...@@ -139,11 +199,19 @@
<view class="tool-list"> <view class="tool-list">
<template v-for="item in toolList" :key="item.title"> <template v-for="item in toolList" :key="item.title">
<view v-if="!item.hidden" class="tool-item" @click="handleToolClick(item)"> <view v-if="!item.hidden" class="tool-item" @click="handleToolClick(item)">
<image class="tool-icon" :src="item.bgUrl?.includes('http') ? item.bgUrl : $baseUrl + item.bgUrl" <image
mode="aspectFit" /> class="tool-icon"
:src="item.bgUrl?.includes('http') ? item.bgUrl : $baseUrl + item.bgUrl"
mode="aspectFit"
/>
<!-- || item.title == '产检提醒' || item.title == '喂养记录' || item.title == '生长测评' --> <!-- || item.title == '产检提醒' || item.title == '喂养记录' || item.title == '生长测评' -->
<button v-if="(item.title == '医生问诊') && !cfgStatus.isRegister" class="tool-btn-register" type="primary" <button
open-type="getPhoneNumber" @getphonenumber="getRealtimePhoneNumber" /> v-if="item.title == '医生问诊' && !cfgStatus.isRegister"
class="tool-btn-register"
type="primary"
open-type="getPhoneNumber"
@getphonenumber="getRealtimePhoneNumber"
/>
</view> </view>
</template> </template>
</view> </view>
...@@ -151,50 +219,76 @@ ...@@ -151,50 +219,76 @@
<view class="vip-active-area" v-if="pageCfgStore?.contentCfg?.activeInfo?.length > 0"> <view class="vip-active-area" v-if="pageCfgStore?.contentCfg?.activeInfo?.length > 0">
<text class="vip-title">精彩活动</text> <text class="vip-title">精彩活动</text>
<swiper class="vip-active-swiper" :indicator-dots="pageCfgStore?.contentCfg?.activeInfo?.length > 1" <swiper
:autoplay="true" :circular="true" indicator-color="#dfddd9" indicator-active-color="#b27c1e" class="vip-active-swiper"
:indicator-top="32"> :indicator-dots="pageCfgStore?.contentCfg?.activeInfo?.length > 1"
:autoplay="true"
:circular="true"
indicator-color="#dfddd9"
indicator-active-color="#b27c1e"
:indicator-top="32"
>
<swiper-item v-for="(item, index) in pageCfgStore?.contentCfg?.activeInfo" :key="index"> <swiper-item v-for="(item, index) in pageCfgStore?.contentCfg?.activeInfo" :key="index">
<image class="vip-active-img" :src="item?.bgUrl?.includes('http') ? item?.bgUrl : $baseUrl + `${item?.bgUrl}`" <image
mode="aspectFit" @click="handleVipActiveClick(index, item)" /> class="vip-active-img"
:src="item?.bgUrl?.includes('http') ? item?.bgUrl : $baseUrl + `${item?.bgUrl}`"
mode="aspectFit"
@click="handleVipActiveClick(index, item)"
/>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<!-- 功能菜单 --> <!-- 功能菜单 -->
<view class="menu-container"> <view class="menu-container">
<view class="menu-item" @click="navigateToWithLogin('/v3/orderList/orderList')" :data-log="{ <view
class="menu-item"
@click="navigateToWithLogin('/v3/orderList/orderList')"
:data-log="{
xcxClick: '我的页面点击', xcxClick: '我的页面点击',
pageName: '我的页面', pageName: '我的页面',
buttonName: '我的订单' buttonName: '我的订单',
}"> }"
>
<image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_myOrder.png'" mode="aspectFit" /> <image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_myOrder.png'" mode="aspectFit" />
<text class="menu-title">我的订单</text> <text class="menu-title">我的订单</text>
<image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" /> <image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
<view class="menu-item" @click="navigateToWithLogin('/v3/addressList/addressList')" :data-log="{ <view
class="menu-item"
@click="navigateToWithLogin('/v3/addressList/addressList')"
:data-log="{
xcxClick: '我的页面点击', xcxClick: '我的页面点击',
pageName: '我的页面', pageName: '我的页面',
buttonName: '收货地址管理' buttonName: '收货地址管理',
}"> }"
>
<image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_address.png'" mode="aspectFit" /> <image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_address.png'" mode="aspectFit" />
<text class="menu-title">收货地址管理</text> <text class="menu-title">收货地址管理</text>
<image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" /> <image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
<view class="menu-item" @click="navigateToCouponWithLogin()" :data-log="{ <view
class="menu-item"
@click="navigateToCouponWithLogin()"
:data-log="{
xcxClick: '我的页面点击', xcxClick: '我的页面点击',
pageName: '我的页面', pageName: '我的页面',
buttonName: '我的优惠券' buttonName: '我的优惠券',
}"> }"
>
<image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_myCupon.png'" mode="aspectFit" /> <image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_myCupon.png'" mode="aspectFit" />
<text class="menu-title">我的优惠券</text> <text class="menu-title">我的优惠券</text>
<image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" /> <image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
<view class="menu-item" @click="navigateToWithLogin('/v3/more/index')" :data-log="{ <view
class="menu-item"
@click="navigateToWithLogin('/v3/more/index')"
:data-log="{
xcxClick: '我的页面点击', xcxClick: '我的页面点击',
pageName: '我的页面', pageName: '我的页面',
buttonName: '更多' buttonName: '更多',
}"> }"
>
<image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_more.png'" mode="aspectFit" /> <image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_more.png'" mode="aspectFit" />
<text class="menu-title">更多</text> <text class="menu-title">更多</text>
<image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" /> <image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
...@@ -221,13 +315,11 @@ ...@@ -221,13 +315,11 @@
<!-- 生日弹窗 type 3 钻石、4 星光、5 星耀 --> <!-- 生日弹窗 type 3 钻石、4 星光、5 星耀 -->
<!-- <popup-shengri v-if="isTip" type="3" @close="isTip = false"></popup-shengri> --> <!-- <popup-shengri v-if="isTip" type="3" @close="isTip = false"></popup-shengri> -->
<!-- 精选好卷弹窗 isUnlock // 是否解锁 商品兑换券 type 1 黄金、2 铂金、3 钻石、4 星光、5 星耀 --> <!-- 精选好卷弹窗 isUnlock // 是否解锁 商品兑换券 type 1 黄金、2 铂金、3 钻石、4 星光、5 星耀 -->
<!-- <popup-jingxuan v-if="isTip" type="1" isUnlock="true" @close="isTip = false"></popup-jingxuan> --> <!-- <popup-jingxuan v-if="isTip" type="1" isUnlock="true" @close="isTip = false"></popup-jingxuan> -->
<!-- 新人礼券弹窗 type 1 黄金、2 铂金、3 钻石、4 星光、5 星耀--> <!-- 新人礼券弹窗 type 1 黄金、2 铂金、3 钻石、4 星光、5 星耀-->
<!-- <popup-xinren v-if="isTip" type="1" @close="isTip = false"></popup-xinren> --> <!-- <popup-xinren v-if="isTip" type="1" @close="isTip = false"></popup-xinren> -->
</template> </template>
<style scoped> <style scoped>
...@@ -292,21 +384,21 @@ ...@@ -292,21 +384,21 @@
</style> </style>
<script setup> <script setup>
import { ref, onMounted, getCurrentInstance, computed, watch } from "vue"; import { ref, onMounted, getCurrentInstance, computed, watch } from 'vue';
import RegisterLayer from "../components/RegisterLayer.vue"; import RegisterLayer from '../components/RegisterLayer.vue';
import BabySwitcher from "../components/BabySwitcher.vue"; import BabySwitcher from '../components/BabySwitcher.vue';
import WheelSelector from "../components/WheelSelector.vue"; import WheelSelector from '../components/WheelSelector.vue';
import { useUserStore } from "@/stores/user"; import { useUserStore } from '@/stores/user';
import { usePageCfgStore } from "@/stores/pageCfg"; import { usePageCfgStore } from '@/stores/pageCfg';
import { jump, JumpType } from "@/utils"; import { jump, JumpType } from '@/utils';
import { getHealthField } from "@/api/common"; import { getHealthField } from '@/api/common';
import { hideLoading, showLoading } from "../utils"; import { hideLoading, showLoading } from '../utils';
import md from "../md.js"; import md from '../md.js';
import { onShow } from '@dcloudio/uni-app'; import { onShow } from '@dcloudio/uni-app';
import { useIntegralStore } from "../stores/integral.js"; import { useIntegralStore } from '../stores/integral.js';
import { useGlobalStore } from "../stores/global.js"; import { useGlobalStore } from '../stores/global.js';
import { uploadImage } from "../api/common.js"; import { uploadImage } from '../api/common.js';
import { saveBabyExtra } from "../api/user.js"; import { saveBabyExtra } from '../api/user.js';
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const $baseUrl = proxy.$baseUrl; const $baseUrl = proxy.$baseUrl;
...@@ -329,9 +421,11 @@ const babyInfo = computed(() => userStore?.babyInfo || {}); ...@@ -329,9 +421,11 @@ const babyInfo = computed(() => userStore?.babyInfo || {});
// 判断是否可以使用选择头像功能 // 判断是否可以使用选择头像功能
const canChooseAvatar = computed(() => { const canChooseAvatar = computed(() => {
return cfgStatus.value.isRegister && return (
cfgStatus.value.isRegister &&
userStore.babyInfo?.allBabyBaseInfo && userStore.babyInfo?.allBabyBaseInfo &&
userStore.babyInfo?.allBabyBaseInfo?.length > 0; userStore.babyInfo?.allBabyBaseInfo?.length > 0
);
}); });
const showRegisterLayer = ref(false); const showRegisterLayer = ref(false);
...@@ -350,10 +444,10 @@ const localBackgroundImg = ref(''); ...@@ -350,10 +444,10 @@ const localBackgroundImg = ref('');
const handleTaskClick = async () => { const handleTaskClick = async () => {
// 添加点击埋点 // 添加点击埋点
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "做任务赚更多积分", componentName: '做任务赚更多积分',
componentContent: "去做任务" componentContent: '去做任务',
}); });
// 检查登录状态 // 检查登录状态
...@@ -361,7 +455,7 @@ const handleTaskClick = async () => { ...@@ -361,7 +455,7 @@ const handleTaskClick = async () => {
// 未登录,跳转到登录注册页面 // 未登录,跳转到登录注册页面
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: '/pages/activity/register',
}); });
return; return;
} }
...@@ -369,32 +463,31 @@ const handleTaskClick = async () => { ...@@ -369,32 +463,31 @@ const handleTaskClick = async () => {
// 已登录,正常执行任务逻辑 // 已登录,正常执行任务逻辑
await integralStore.getSigninAndTaskInfo(false); await integralStore.getSigninAndTaskInfo(false);
globalStore.showTaskPop(integralStore?.signinAndTaskInfo?.data?.taskTodo); globalStore.showTaskPop(integralStore?.signinAndTaskInfo?.data?.taskTodo);
} };
const handleHot = (e) => { const handleHot = (e) => {
const type = e.currentTarget.dataset.type; const type = e.currentTarget.dataset.type;
md.sensorLog(e); md.sensorLog(e);
console.log("handleHot", type); console.log('handleHot', type);
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "查看协议", componentName: '查看协议',
componentContent: type === "member" ? "会员规则" : "隐私协议" componentContent: type === 'member' ? '会员规则' : '隐私协议',
}) });
if (type === "member") { if (type === 'member') {
navigateTo('/pages/webview/webview?type=MEMBER_URL');
navigateTo("/pages/webview/webview?type=MEMBER_URL"); } else if (type === 'privacy') {
} else if (type === "privacy") { navigateTo('/pages/webview/webview?type=PRIVACY_URL');
navigateTo("/pages/webview/webview?type=PRIVACY_URL");
} }
}; };
function clickRegisterShield() { function clickRegisterShield() {
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: '/pages/activity/register',
}) });
} }
// 页面跳转 // 页面跳转
...@@ -411,7 +504,7 @@ const navigateToCoupon = () => { ...@@ -411,7 +504,7 @@ const navigateToCoupon = () => {
jump({ jump({
type: type, type: type,
url: url, url: url,
extra: extra extra: extra,
}); });
}; };
...@@ -419,10 +512,10 @@ const navigateToCoupon = () => { ...@@ -419,10 +512,10 @@ const navigateToCoupon = () => {
const navigateToCouponWithLogin = () => { const navigateToCouponWithLogin = () => {
// 添加点击埋点 // 添加点击埋点
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "拓展工具", componentName: '拓展工具',
componentContent: "我的优惠券" componentContent: '我的优惠券',
}); });
// 检查登录状态 // 检查登录状态
...@@ -430,7 +523,7 @@ const navigateToCouponWithLogin = () => { ...@@ -430,7 +523,7 @@ const navigateToCouponWithLogin = () => {
// 未登录,跳转到登录注册页面 // 未登录,跳转到登录注册页面
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: '/pages/activity/register',
}); });
return; return;
} }
...@@ -444,10 +537,10 @@ const navigateTo = (url) => { ...@@ -444,10 +537,10 @@ const navigateTo = (url) => {
url, url,
animationDuration: 0, animationDuration: 0,
fail: (err) => { fail: (err) => {
console.error("页面跳转失败:", err); console.error('页面跳转失败:', err);
uni.showToast({ uni.showToast({
title: "页面跳转失败", title: '页面跳转失败',
icon: "none", icon: 'none',
}); });
}, },
}); });
...@@ -470,10 +563,10 @@ const navigateToWithLogin = (url) => { ...@@ -470,10 +563,10 @@ const navigateToWithLogin = (url) => {
if (componentContent) { if (componentContent) {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "拓展工具", componentName: '拓展工具',
componentContent: componentContent componentContent: componentContent,
}); });
} }
...@@ -482,7 +575,7 @@ const navigateToWithLogin = (url) => { ...@@ -482,7 +575,7 @@ const navigateToWithLogin = (url) => {
// 未登录,跳转到登录注册页面 // 未登录,跳转到登录注册页面
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: '/pages/activity/register',
}); });
return; return;
} }
...@@ -493,29 +586,29 @@ const navigateToWithLogin = (url) => { ...@@ -493,29 +586,29 @@ const navigateToWithLogin = (url) => {
const handleToolClick = async (item) => { const handleToolClick = async (item) => {
md.sensorLogTake({ md.sensorLogTake({
xcxClick: "我的页面点击", xcxClick: '我的页面点击',
pageName: "我的页面", pageName: '我的页面',
buttonName: item.title, buttonName: item.title,
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "工具", componentName: '工具',
componentContent: item.title componentContent: item.title,
}) });
// 跳转产检提醒页面判断 // 跳转产检提醒页面判断
// let listData = userStore.babyInfo ? userStore.babyInfo.allBabyBaseInfo : [] // let listData = userStore.babyInfo ? userStore.babyInfo.allBabyBaseInfo : []
if (item.title === "医生问诊") { if (item.title === '医生问诊') {
if (!cfgStatus.value.isRegister) return; if (!cfgStatus.value.isRegister) return;
const res = await getHealthField(); const res = await getHealthField();
if (!res.success) { if (!res.success) {
uni.showToast({ uni.showToast({
title: "获取健康字段失败", title: '获取健康字段失败',
icon: "none", icon: 'none',
}); });
return; return;
} }
...@@ -524,27 +617,25 @@ const handleToolClick = async (item) => { ...@@ -524,27 +617,25 @@ const handleToolClick = async (item) => {
jump({ jump({
type: JumpType.MINI, type: JumpType.MINI,
url: "/pages/partner/redirect", url: '/pages/partner/redirect',
extra: { extra: {
appId: "wx81ecfb5aa3fb512f", appId: 'wx81ecfb5aa3fb512f',
envVersion: env, envVersion: env,
extraData: { extraData: {
sign, // 参考 4.请求参数 sign, // 参考 4.请求参数
timestamp, // 参考 4.请求参数 timestamp, // 参考 4.请求参数
appId, // 参考 4.请求参数 appId, // 参考 4.请求参数
partnerUserId, // 参考 4.请求参数 partnerUserId, // 参考 4.请求参数
targetApp: targetApp: '/h5/partner/shining-like-a-start/landing-free-consult?sysType=CRF',
"/h5/partner/shining-like-a-start/landing-free-consult?sysType=CRF",
}, },
}, },
}); });
} }
// 三个工具校验是否授权 // 三个工具校验是否授权
else if (item.title === "生长测评" || item.title === "喂养记录" || item.title === "产检提醒") { else if (item.title === '生长测评' || item.title === '喂养记录' || item.title === '产检提醒') {
// if (!cfgStatus.value.isRegister) return; // if (!cfgStatus.value.isRegister) return;
jump({ type: item.link.type, url: item.link.url }); jump({ type: item.link.type, url: item.link.url });
} } else {
else {
jump({ type: item.link.type, url: item.link.url }); jump({ type: item.link.type, url: item.link.url });
// const extra = item.link.extra; // const extra = item.link.extra;
// if(extra && extra.babyId){ // if(extra && extra.babyId){
...@@ -557,97 +648,83 @@ const handleToolClick = async (item) => { ...@@ -557,97 +648,83 @@ const handleToolClick = async (item) => {
// 编辑个人资料 // 编辑个人资料
const handleEditProfile = (e) => { const handleEditProfile = (e) => {
if (!userStore.userInfo || JSON.stringify(userStore.userInfo) === '{}') {
if (!userStore.userInfo ||
JSON.stringify(userStore.userInfo) === "{}"
) {
return; return;
} }
md.sensorLog(e); md.sensorLog(e);
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "资料编辑", componentName: '资料编辑',
componentContent: "资料编辑" componentContent: '资料编辑',
}) });
// 检查登录状态 // 检查登录状态
if (!cfgStatus.value.isRegister) { if (!cfgStatus.value.isRegister) {
// 未登录,跳转到登录注册页面 // 未登录,跳转到登录注册页面
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: '/pages/activity/register',
}); });
return; return;
} }
if(!userStore.babyInfo?.allBabyBaseInfo || userStore.babyInfo?.allBabyBaseInfo?.length === 0) { if (!userStore.babyInfo?.allBabyBaseInfo || userStore.babyInfo?.allBabyBaseInfo?.length === 0) {
navigateTo("/pages/person/person?type=add"); navigateTo('/pages/person/person?type=add');
return; return;
} }
const type = userStore.babyInfo?.allBabyBaseInfo?.length == 0 ? "add" : "edit"; const type = userStore.babyInfo?.allBabyBaseInfo?.length == 0 ? 'add' : 'edit';
babyId.value = userStore.babyInfo?.allBabyBaseInfo?.find( babyId.value = userStore.babyInfo?.allBabyBaseInfo?.find((item) => item.selected)?.id;
(item) => item.selected
)?.id;
if (type === "edit") { if (type === 'edit') {
babyId.value = userStore.babyInfo?.allBabyBaseInfo.find( babyId.value = userStore.babyInfo?.allBabyBaseInfo.find((item) => item.selected)?.id;
(item) => item.selected
)?.id;
navigateTo(`/pages/person/person?type=${type}&id=${babyId.value}`); navigateTo(`/pages/person/person?type=${type}&id=${babyId.value}`);
} else { } else {
navigateTo(`/pages/person/person?type=${type}`); navigateTo(`/pages/person/person?type=${type}`);
} }
}; };
// 头像点击事件(当不满足选择头像条件时) // 头像点击事件(当不满足选择头像条件时)
const handleAvatarClick = (e) => { const handleAvatarClick = (e) => {
md.sensorLog(e); md.sensorLog(e);
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "资料编辑", componentName: '资料编辑',
componentContent: "资料编辑" componentContent: '资料编辑',
}) });
// 检查登录状态 // 检查登录状态
if (!cfgStatus.value.isRegister) { if (!cfgStatus.value.isRegister) {
// 未登录,跳转到登录注册页面 // 未登录,跳转到登录注册页面
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: '/pages/activity/register',
}); });
return; return;
} }
if(!userStore.babyInfo?.allBabyBaseInfo || userStore.babyInfo?.allBabyBaseInfo?.length === 0) { if (!userStore.babyInfo?.allBabyBaseInfo || userStore.babyInfo?.allBabyBaseInfo?.length === 0) {
navigateTo("/pages/person/person?type=add"); navigateTo('/pages/person/person?type=add');
return; return;
} }
}; };
// 选择头像 // 选择头像
const onChooseAvatar = async (e) => { const onChooseAvatar = async (e) => {
showLoading('上传中...'); showLoading('上传中...');
md.sensorLog(e); md.sensorLog(e);
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "资料编辑", componentName: '资料编辑',
componentContent: "资料编辑" componentContent: '资料编辑',
}) });
try { try {
const fs = uni.getFileSystemManager(); const fs = uni.getFileSystemManager();
const base64 = const base64 = 'data:image/jpeg;base64,' + fs.readFileSync(e.detail.avatarUrl, 'base64');
"data:image/jpeg;base64," + fs.readFileSync(e.detail.avatarUrl, "base64");
const res = await uploadImage(base64); const res = await uploadImage(base64);
if (res.success) { if (res.success) {
...@@ -655,13 +732,10 @@ const onChooseAvatar = async (e) => { ...@@ -655,13 +732,10 @@ const onChooseAvatar = async (e) => {
localAvatarUrl.value = res.data.url; localAvatarUrl.value = res.data.url;
// 获取当前选中的宝宝信息并更新到服务器 // 获取当前选中的宝宝信息并更新到服务器
const selectedBaby = userStore.babyInfo?.allBabyBaseInfo?.find( const selectedBaby = userStore.babyInfo?.allBabyBaseInfo?.find((item) => item.selected);
(item) => item.selected
);
console.log("selectedBaby-===", selectedBaby); console.log('selectedBaby-===', selectedBaby);
if (selectedBaby) { if (selectedBaby) {
// const updateData = { // const updateData = {
// id: selectedBaby.id, // id: selectedBaby.id,
// babyAvatar: res.data.url, // babyAvatar: res.data.url,
...@@ -669,11 +743,11 @@ const onChooseAvatar = async (e) => { ...@@ -669,11 +743,11 @@ const onChooseAvatar = async (e) => {
// const updateRes = await updateBabyInfo(updateData); // const updateRes = await updateBabyInfo(updateData);
console.log("userStore.babyInfo?.content?.id====", userStore.babyInfo?.content); console.log('userStore.babyInfo?.content?.id====', userStore.babyInfo?.content);
const updateData = { const updateData = {
id: userStore.babyInfo?.content?.id, id: userStore.babyInfo?.content?.id,
babyAvatar: res.data.url babyAvatar: res.data.url,
} };
const updateRes = await saveBabyExtra(updateData); const updateRes = await saveBabyExtra(updateData);
...@@ -684,32 +758,32 @@ const onChooseAvatar = async (e) => { ...@@ -684,32 +758,32 @@ const onChooseAvatar = async (e) => {
localAvatarUrl.value = ''; localAvatarUrl.value = '';
uni.showToast({ uni.showToast({
title: "头像更新成功", title: '头像更新成功',
icon: "success", icon: 'success',
}); });
} else { } else {
uni.showToast({ uni.showToast({
title: updateRes.message || "更新失败", title: updateRes.message || '更新失败',
icon: "none", icon: 'none',
}); });
} }
} else { } else {
uni.showToast({ uni.showToast({
title: "未找到宝宝信息", title: '未找到宝宝信息',
icon: "none", icon: 'none',
}); });
} }
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: "none", icon: 'none',
}); });
} }
} catch (error) { } catch (error) {
console.error("头像选择失败:", error); console.error('头像选择失败:', error);
uni.showToast({ uni.showToast({
title: "头像选择失败", title: '头像选择失败',
icon: "none", icon: 'none',
}); });
} finally { } finally {
hideLoading(); hideLoading();
...@@ -717,7 +791,7 @@ const onChooseAvatar = async (e) => { ...@@ -717,7 +791,7 @@ const onChooseAvatar = async (e) => {
}; };
const onRegisterConfirm = async () => { const onRegisterConfirm = async () => {
await pageCfgStore.fetchCfg(); await pageCfgStore.fetchCfg(globalStore.getPreviewScene('my'));
// 只调用一次initData,loadMemberInfo已在initData内部处理 // 只调用一次initData,loadMemberInfo已在initData内部处理
initData(); initData();
showRegisterLayer.value = false; showRegisterLayer.value = false;
...@@ -728,149 +802,146 @@ const onRegisterCancel = () => { ...@@ -728,149 +802,146 @@ const onRegisterCancel = () => {
const handleWheelChange = (val) => { const handleWheelChange = (val) => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "月龄定位器", componentName: '月龄定位器',
componentContent: babyInfo.value.babyStage == 2 componentContent: babyInfo.value.babyStage == 2 ? '月龄滑动切换-' + val : '孕周滑动切换-' + val,
? "月龄滑动切换-" + val
: "孕周滑动切换-" + val
}); });
} };
const initExposure = () => { const initExposure = () => {
// 添加宝宝信息引导模块曝光埋点 // 添加宝宝信息引导模块曝光埋点
if (cfgStatus.value.isRegister && (!babyInfo.value?.allBabyBaseInfo || babyInfo.value?.allBabyBaseInfo?.length === 0)) { if (
cfgStatus.value.isRegister &&
(!babyInfo.value?.allBabyBaseInfo || babyInfo.value?.allBabyBaseInfo?.length === 0)
) {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "添加宝宝信息引导", componentName: '添加宝宝信息引导',
componentContent: "添加宝宝信息引导" componentContent: '添加宝宝信息引导',
}); });
} }
// 添加做任务赚更多积分模块曝光埋点 // 添加做任务赚更多积分模块曝光埋点
if (!cfgStatus.value.isRegister || (babyInfo.value?.allBabyBaseInfo && babyInfo.value?.allBabyBaseInfo?.length > 0)) { if (
!cfgStatus.value.isRegister ||
(babyInfo.value?.allBabyBaseInfo && babyInfo.value?.allBabyBaseInfo?.length > 0)
) {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "做任务赚更多积分", componentName: '做任务赚更多积分',
componentContent: "去做任务" componentContent: '去做任务',
}); });
} }
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "资料编辑", componentName: '资料编辑',
componentContent: "资料编辑" componentContent: '资料编辑',
}); });
toolList.value.forEach((item, index) => { toolList.value.forEach((item, index) => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "工具", componentName: '工具',
componentContent: item.title componentContent: item.title,
}); });
}); });
if (pageCfgStore?.contentCfg?.activeInfo?.length > 0) { if (pageCfgStore?.contentCfg?.activeInfo?.length > 0) {
pageCfgStore.contentCfg.activeInfo.forEach((item, index) => { pageCfgStore.contentCfg.activeInfo.forEach((item, index) => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "精彩活动", componentName: '精彩活动',
componentContent: "精彩活动-" + item.title componentContent: '精彩活动-' + item.title,
}); });
}); });
} }
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "查看协议", componentName: '查看协议',
componentContent: "会员规则" componentContent: '会员规则',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "查看协议", componentName: '查看协议',
componentContent: "隐私协议" componentContent: '隐私协议',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "月龄定位器", componentName: '月龄定位器',
componentContent: babyInfo.value.babyStage == 2 ? "月龄滑动切换" : "孕周滑动切换" componentContent: babyInfo.value.babyStage == 2 ? '月龄滑动切换' : '孕周滑动切换',
}); });
// 添加拓展工具菜单曝光埋点 // 添加拓展工具菜单曝光埋点
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "拓展工具", componentName: '拓展工具',
componentContent: "我的订单" componentContent: '我的订单',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "拓展工具", componentName: '拓展工具',
componentContent: "收货地址管理" componentContent: '收货地址管理',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "拓展工具", componentName: '拓展工具',
componentContent: "我的优惠券" componentContent: '我的优惠券',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "拓展工具", componentName: '拓展工具',
componentContent: "更多" componentContent: '更多',
}); });
};
}
onShow(async () => { onShow(async () => {
console.log('onShow') console.log('onShow');
await userStore.loadMemberInfo(); await userStore.loadMemberInfo();
points.value = userStore.memberInfo?.points; points.value = userStore.memberInfo?.points;
console.log('userStore.memberInfo=', userStore.memberInfo) console.log('userStore.memberInfo=', userStore.memberInfo);
// 添加拓展工具菜单曝光埋点 // 添加拓展工具菜单曝光埋点
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "拓展工具", componentName: '拓展工具',
componentContent: "我的订单" componentContent: '我的订单',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "拓展工具", componentName: '拓展工具',
componentContent: "收货地址管理" componentContent: '收货地址管理',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "拓展工具", componentName: '拓展工具',
componentContent: "我的优惠券" componentContent: '我的优惠券',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "拓展工具", componentName: '拓展工具',
componentContent: "更多" componentContent: '更多',
}); });
console.warn("AAAAAAAA") console.warn('AAAAAAAA');
}) });
// 获取用户信息 // 获取用户信息
const initData = async () => { const initData = async () => {
...@@ -878,10 +949,7 @@ const initData = async () => { ...@@ -878,10 +949,7 @@ const initData = async () => {
await userStore.loadMemberInfo(); await userStore.loadMemberInfo();
points.value = userStore.memberInfo?.points; points.value = userStore.memberInfo?.points;
if ( if (userStore?.userInfo?.memberId && userStore?.userInfo?.memberId == 'not_login') {
userStore?.userInfo?.memberId &&
userStore?.userInfo?.memberId == "not_login"
) {
cfgStatus.value.isRegister = false; cfgStatus.value.isRegister = false;
cfgStatus.value.showDetail = false; cfgStatus.value.showDetail = false;
return; return;
...@@ -892,50 +960,44 @@ const initData = async () => { ...@@ -892,50 +960,44 @@ const initData = async () => {
// 已出生或孕中显示 // 已出生或孕中显示
cfgStatus.value.showDetail = __showDetail; cfgStatus.value.showDetail = __showDetail;
if (__showDetail) { if (__showDetail) {
wheelOptions.value = wheelOptions.value =
babyInfo.value.babyStage == 2 babyInfo.value.babyStage == 2 ? pageCfgStore.wheelOptionsYL : pageCfgStore.wheelOptionsYZ;
? pageCfgStore.wheelOptionsYL const index = wheelOptions.value.findIndex((item) => item.label == babyInfo.value.babyAge);
: pageCfgStore.wheelOptionsYZ;
const index = wheelOptions.value.findIndex(
(item) => item.label == babyInfo.value.babyAge
);
wheelSelectedIndex.value = index > 0 ? index : 0; wheelSelectedIndex.value = index > 0 ? index : 0;
} }
}; };
const handleIntegralClick = () => { const handleIntegralClick = () => {
md.sensorLogTake({ md.sensorLogTake({
xcxClick: "我的页面-首屏页面点击", xcxClick: '我的页面-首屏页面点击',
pageName: "我的页面-首屏", pageName: '我的页面-首屏',
buttonName: "积分明细", buttonName: '积分明细',
}); });
const urlStr = 'https://mom.feihe.com/member/mine/newPointDetail?crmId={crmid}&appCode=XMH'; const urlStr = 'https://mom.feihe.com/member/mine/newPointDetail?crmId={crmid}&appCode=XMH';
const url = urlStr.replace("{crmid}", userStore.babyInfo?.memberId); const url = urlStr.replace('{crmid}', userStore.babyInfo?.memberId);
console.log('积分明细链接:==', url) console.log('积分明细链接:==', url);
jump({ jump({
type: 3, type: 3,
url: url url: url,
}) });
} };
const getRealtimePhoneNumber = async (e) => { const getRealtimePhoneNumber = async (e) => {
console.log("获取手机号码", e); console.log('获取手机号码', e);
if (e.detail.errMsg !== "getPhoneNumber:ok") { if (e.detail.errMsg !== 'getPhoneNumber:ok') {
uni.showToast({ uni.showToast({
title: "请授权使用手机号", title: '请授权使用手机号',
icon: "none", icon: 'none',
}); });
return; return;
} }
await userStore.phoneCallback(e.detail, async () => { await userStore.phoneCallback(e.detail, async () => {
// 简化回调,避免重复调用接口 // 简化回调,避免重复调用接口
showLoading(); showLoading();
await pageCfgStore.fetchCfg(); await pageCfgStore.fetchCfg(globalStore.getPreviewScene('my'));
// 只调用一次initData,loadMemberInfo已在initData内部处理 // 只调用一次initData,loadMemberInfo已在initData内部处理
initData(); initData();
hideLoading(); hideLoading();
...@@ -949,31 +1011,28 @@ const handleChangeBaby = (e) => { ...@@ -949,31 +1011,28 @@ const handleChangeBaby = (e) => {
md.sensorLog(e); md.sensorLog(e);
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "资料编辑", componentName: '资料编辑',
componentContent: "展开" componentContent: '展开',
}) });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "资料编辑", componentName: '资料编辑',
componentContent: "新增" componentContent: '新增',
}) });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "资料编辑", componentName: '资料编辑',
componentContent: "状态切换" componentContent: '状态切换',
}) });
showBabySwitcher.value = true; showBabySwitcher.value = true;
}; };
async function onSelectBaby(baby) { async function onSelectBaby(baby) {
// 处理宝宝切换逻辑 // 处理宝宝切换逻辑
showBabySwitcher.value = false; showBabySwitcher.value = false;
...@@ -982,22 +1041,22 @@ async function onSelectBaby(baby) { ...@@ -982,22 +1041,22 @@ async function onSelectBaby(baby) {
await userStore.changeBabySelected(baby.id); await userStore.changeBabySelected(baby.id);
hideLoading(); hideLoading();
console.log("onSelectBaby", baby); console.log('onSelectBaby', baby);
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "资料编辑", componentName: '资料编辑',
componentContent: "状态切换" componentContent: '状态切换',
}) });
} }
function handleAddBabyInfoClick() { function handleAddBabyInfoClick() {
// 添加点击埋点 // 添加点击埋点
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "添加宝宝信息引导", componentName: '添加宝宝信息引导',
componentContent: "添加宝宝信息引导" componentContent: '添加宝宝信息引导',
}); });
// 显示RegisterLayer弹窗 // 显示RegisterLayer弹窗
showRegisterLayer.value = true; showRegisterLayer.value = true;
...@@ -1005,27 +1064,27 @@ function handleAddBabyInfoClick() { ...@@ -1005,27 +1064,27 @@ function handleAddBabyInfoClick() {
function onAddBaby() { function onAddBaby() {
md.sensorLogTake({ md.sensorLogTake({
xcxClick: "我的页面点击", xcxClick: '我的页面点击',
pageName: "我的页面", pageName: '我的页面',
buttonName: "新增入口", buttonName: '新增入口',
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "资料编辑", componentName: '资料编辑',
componentContent: "新增" componentContent: '新增',
}) });
// 跳转到新增宝宝页面 // 跳转到新增宝宝页面
showBabySwitcher.value = false; showBabySwitcher.value = false;
navigateTo("/pages/person/person?type=add"); navigateTo('/pages/person/person?type=add');
} }
const handleOpenClick = () => { const handleOpenClick = () => {
md.sensorLogTake({ md.sensorLogTake({
xcxClick: "我的页面点击", xcxClick: '我的页面点击',
pageName: "我的页面", pageName: '我的页面',
buttonName: cfgStatus.value.openBabyCardDesc ? "收起" : "展开", buttonName: cfgStatus.value.openBabyCardDesc ? '收起' : '展开',
}); });
cfgStatus.value.openBabyCardDesc = !cfgStatus.value.openBabyCardDesc; cfgStatus.value.openBabyCardDesc = !cfgStatus.value.openBabyCardDesc;
}; };
...@@ -1034,42 +1093,39 @@ const handleOpenClick = () => { ...@@ -1034,42 +1093,39 @@ const handleOpenClick = () => {
const handleUploadBackground = async (e) => { const handleUploadBackground = async (e) => {
md.sensorLog(e); md.sensorLog(e);
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "资料编辑", componentName: '资料编辑',
componentContent: "资料编辑" componentContent: '资料编辑',
}) });
// 检查登录状态 // 检查登录状态
if (!cfgStatus.value.isRegister) { if (!cfgStatus.value.isRegister) {
// 未登录,跳转到登录注册页面 // 未登录,跳转到登录注册页面
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: '/pages/activity/register',
}); });
return; return;
} }
if(!userStore.babyInfo?.allBabyBaseInfo || userStore.babyInfo?.allBabyBaseInfo?.length === 0) { if (!userStore.babyInfo?.allBabyBaseInfo || userStore.babyInfo?.allBabyBaseInfo?.length === 0) {
navigateTo("/pages/person/person?type=add"); navigateTo('/pages/person/person?type=add');
return; return;
} }
// 唤起图片选择器 // 唤起图片选择器
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
sizeType: ["original", "compressed"], sizeType: ['original', 'compressed'],
sourceType: ["album", "camera"], sourceType: ['album', 'camera'],
success: async (res) => { success: async (res) => {
showLoading('上传中...'); showLoading('上传中...');
try { try {
const tempFilePath = res.tempFilePaths[0]; const tempFilePath = res.tempFilePaths[0];
const fs = uni.getFileSystemManager(); const fs = uni.getFileSystemManager();
const base64 = const base64 = 'data:image/jpeg;base64,' + fs.readFileSync(tempFilePath, 'base64');
"data:image/jpeg;base64," + fs.readFileSync(tempFilePath, "base64");
const uploadRes = await uploadImage(base64); const uploadRes = await uploadImage(base64);
...@@ -1078,9 +1134,7 @@ const handleUploadBackground = async (e) => { ...@@ -1078,9 +1134,7 @@ const handleUploadBackground = async (e) => {
localBackgroundImg.value = uploadRes.data.url; localBackgroundImg.value = uploadRes.data.url;
// 获取当前选中的宝宝信息并更新到服务器 // 获取当前选中的宝宝信息并更新到服务器
const selectedBaby = userStore.babyInfo?.allBabyBaseInfo?.find( const selectedBaby = userStore.babyInfo?.allBabyBaseInfo?.find((item) => item.selected);
(item) => item.selected
);
if (selectedBaby) { if (selectedBaby) {
// const updateData = { // const updateData = {
...@@ -1089,11 +1143,11 @@ const handleUploadBackground = async (e) => { ...@@ -1089,11 +1143,11 @@ const handleUploadBackground = async (e) => {
// }; // };
// const updateRes = await updateBabyInfo(updateData); // const updateRes = await updateBabyInfo(updateData);
console.log("userStore.babyInfo?.content?.id====", userStore.babyInfo); console.log('userStore.babyInfo?.content?.id====', userStore.babyInfo);
const updateData = { const updateData = {
id:userStore.babyInfo?.content?.id, id: userStore.babyInfo?.content?.id,
backgroundImg: uploadRes.data.url backgroundImg: uploadRes.data.url,
} };
const updateRes = await saveBabyExtra(updateData); const updateRes = await saveBabyExtra(updateData);
...@@ -1104,71 +1158,66 @@ const handleUploadBackground = async (e) => { ...@@ -1104,71 +1158,66 @@ const handleUploadBackground = async (e) => {
localBackgroundImg.value = ''; localBackgroundImg.value = '';
uni.showToast({ uni.showToast({
title: "背景更新成功", title: '背景更新成功',
icon: "success", icon: 'success',
}); });
} else { } else {
uni.showToast({ uni.showToast({
title: updateRes.message || "更新失败", title: updateRes.message || '更新失败',
icon: "none", icon: 'none',
}); });
} }
} else { } else {
uni.showToast({ uni.showToast({
title: "未找到宝宝信息", title: '未找到宝宝信息',
icon: "none", icon: 'none',
}); });
} }
} else { } else {
uni.showToast({ uni.showToast({
title: uploadRes.message || "上传失败", title: uploadRes.message || '上传失败',
icon: "none", icon: 'none',
}); });
} }
} catch (error) { } catch (error) {
console.error("背景图片上传失败:", error); console.error('背景图片上传失败:', error);
uni.showToast({ uni.showToast({
title: "背景图片上传失败", title: '背景图片上传失败',
icon: "none", icon: 'none',
}); });
} finally { } finally {
hideLoading(); hideLoading();
} }
}, },
fail: (err) => { fail: (err) => {
console.error("选择图片失败:", err); console.error('选择图片失败:', err);
uni.showToast({ uni.showToast({
title: "选择图片失败", title: '选择图片失败',
icon: "none", icon: 'none',
}); });
} },
}); });
}; };
// 页面加载 // 页面加载
onMounted(async () => { onMounted(async () => {
md.sensorLogTake({ md.sensorLogTake({
xcxPage: "我的页面浏览", xcxPage: '我的页面浏览',
pageName: "我的页面", pageName: '我的页面',
}); });
showLoading(); showLoading();
await userStore.loadMemberInfo(); await userStore.loadMemberInfo();
points.value = userStore.memberInfo?.points; points.value = userStore.memberInfo?.points;
await pageCfgStore.fetchCfg(); await pageCfgStore.fetchCfg(globalStore.getPreviewScene('my'));
console.log("pageCfgStore.contentCfg====", pageCfgStore.contentCfg); console.log('pageCfgStore.contentCfg====', pageCfgStore.contentCfg);
initData(); initData();
initExposure(); initExposure();
hideLoading(); hideLoading();
babyId.value = userStore.babyInfo?.allBabyBaseInfo?.find((item) => item.selected)?.id;
babyId.value = userStore.babyInfo?.allBabyBaseInfo?.find(
(item) => item.selected
)?.id;
// const a = { // const a = {
// "bgUrl": "my/shengzhangTools.png", // "bgUrl": "my/shengzhangTools.png",
...@@ -1206,17 +1255,18 @@ onMounted(async () => { ...@@ -1206,17 +1255,18 @@ onMounted(async () => {
}); });
watch([() => userStore.userInfo, () => userStore.babyInfo], () => { watch([() => userStore.userInfo, () => userStore.babyInfo], () => {
console.log("userInfo/babyInfo变化", userStore.userInfo, userStore.babyInfo); console.log('userInfo/babyInfo变化', userStore.userInfo, userStore.babyInfo);
initData(); initData();
babyId.value = userStore.babyInfo?.allBabyBaseInfo?.find( babyId.value = userStore.babyInfo?.allBabyBaseInfo?.find((item) => item.selected)?.id;
(item) => item.selected
)?.id;
}); });
watch(() => userStore.memberInfo, () => { watch(
console.log('userStore.memberInfo变化', userStore.memberInfo) () => userStore.memberInfo,
() => {
console.log('userStore.memberInfo变化', userStore.memberInfo);
points.value = userStore.memberInfo?.points; points.value = userStore.memberInfo?.points;
}) }
);
//会员活动点击事件 //会员活动点击事件
const handleVipActiveClick = (index, item) => { const handleVipActiveClick = (index, item) => {
...@@ -1231,16 +1281,16 @@ const handleVipActiveClick = (index, item) => { ...@@ -1231,16 +1281,16 @@ const handleVipActiveClick = (index, item) => {
} }
md.sensorLogTake({ md.sensorLogTake({
xcxClick: "我的页面点击", xcxClick: '我的页面点击',
pageName: "我的页面", pageName: '我的页面',
buttonName: buttonName, buttonName: buttonName,
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: 'true',
pageName: "我的页面", pageName: '我的页面',
componentName: "精彩活动", componentName: '精彩活动',
componentContent: "精彩活动-" + item.title componentContent: '精彩活动-' + item.title,
}) });
const url = item?.link.url; const url = item?.link.url;
const type = item?.link.type; const type = item?.link.type;
const extra = item?.link.extra; const extra = item?.link.extra;
...@@ -1248,15 +1298,15 @@ const handleVipActiveClick = (index, item) => { ...@@ -1248,15 +1298,15 @@ const handleVipActiveClick = (index, item) => {
jump({ jump({
type: type, type: type,
url: url, url: url,
extra: extra extra: extra,
}) });
} };
// 定义页面配置 // 定义页面配置
defineExpose({}); defineExpose({});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import "@/common.less"; @import '@/common.less';
.my-container { .my-container {
min-height: 100vh; min-height: 100vh;
...@@ -1422,10 +1472,8 @@ defineExpose({}); ...@@ -1422,10 +1472,8 @@ defineExpose({});
color: #1d1e25; color: #1d1e25;
} }
} }
} }
.integralContainer { .integralContainer {
position: absolute; position: absolute;
top: 0rpx; top: 0rpx;
...@@ -1458,7 +1506,6 @@ defineExpose({}); ...@@ -1458,7 +1506,6 @@ defineExpose({});
text-align: center; text-align: center;
right: 0rpx; right: 0rpx;
top: 81rpx; top: 81rpx;
} }
} }
......
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