Commit 272e4330 authored by jt's avatar jt

x

parents d162c8e7 e6571a75
...@@ -17,8 +17,8 @@ const { ...@@ -17,8 +17,8 @@ const {
// 通常可以吧 baseUrl 单独放在一个 js 文件了 // 通常可以吧 baseUrl 单独放在一个 js 文件了
// const baseUrl = "http://172.16.230.108:7777/pmall"; // const baseUrl = "http://172.16.230.108:7777/pmall";
// const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境 // const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
// const baseUrl = "https://momclub-test.feihe.com/pmall"; const baseUrl = "https://momclub-test.feihe.com/pmall";
let baseUrl = "https://momclub.feihe.com/pmall";//生产环境 // let baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock // const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
// const baseUrl = "https://feihe.m.duibatest.com.cn/pmall" // const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
......
...@@ -9,10 +9,11 @@ ...@@ -9,10 +9,11 @@
<!-- 结果标题和图标 --> <!-- 结果标题和图标 -->
<view class="result-header"> <view class="result-header">
<text class="result-title">{{ isCorrect ? '你太棒了,回答正确!' : '快来补课吧,回答错误哦!' }}</text> <text class="result-title">{{ isCorrect ? '你太棒了,回答正确!' : '快来补课吧回答错误哦!' }}</text>
<view class="result-icon"> <view class="result-icon">
<image v-if="isCorrect" :src="`${$baseUrl}homepage/Q3Res/eat_goodIcon.png`" mode="aspectFit"></image> <image class="correct" v-if="isCorrect" :src="`${$baseUrl}homepage/Q3Res/eat_goodIcon.png`"
<image v-else :src="`${$baseUrl}homepage/Q3Res/eat_cryIcon.png`" mode="aspectFit"></image> mode="aspectFit"></image>
<image class="incorrect" v-else :src="`${$baseUrl}homepage/Q3Res/eat_cryIcon.png`" mode="aspectFit"></image>
</view> </view>
</view> </view>
...@@ -164,9 +165,9 @@ export default { ...@@ -164,9 +165,9 @@ export default {
// 添加曝光埋点 // 添加曝光埋点
this.$nextTick(() => { this.$nextTick(() => {
md.sensorPopLogTake({ md.sensorPopLogTake({
xcxPopExposure: "true", xcxPopExposure: "true",
toolName: "能不能吃", toolName: "能不能吃",
popName: "解析弹窗" popName: "解析弹窗"
}); });
}); });
}, },
...@@ -191,9 +192,9 @@ export default { ...@@ -191,9 +192,9 @@ export default {
<style scoped> <style scoped>
.answer-popup-container { .answer-popup-container {
width: 750rpx; width: 750rpx;
height: 986rpx;
position: relative; position: relative;
margin: 0 auto; margin: 0 auto;
bottom: 0rpx;
overflow: visible; overflow: visible;
} }
...@@ -244,7 +245,20 @@ export default { ...@@ -244,7 +245,20 @@ export default {
line-height: 1.4; line-height: 1.4;
} }
.result-icon {
.result-icon .correct {
width: 164rpx;
height: 164rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
top: -20rpx;
left: -170rpx;
}
.result-icon .incorrect {
width: 164rpx; width: 164rpx;
height: 164rpx; height: 164rpx;
display: flex; display: flex;
...@@ -252,7 +266,7 @@ export default { ...@@ -252,7 +266,7 @@ export default {
justify-content: center; justify-content: center;
position: relative; position: relative;
top: 0rpx; top: 0rpx;
left: -140rpx; left: -120rpx;
} }
.result-icon image { .result-icon image {
...@@ -356,7 +370,7 @@ export default { ...@@ -356,7 +370,7 @@ export default {
.analysis-section { .analysis-section {
background: #FFFFFF; background: #FFFFFF;
height: 446rpx; max-height: 446rpx;
padding: 40rpx; padding: 40rpx;
border-radius: 36rpx; border-radius: 36rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
......
...@@ -88,8 +88,8 @@ const getMessage = (e) => { ...@@ -88,8 +88,8 @@ const getMessage = (e) => {
const initWebviewUrl = async () => { const initWebviewUrl = async () => {
// 使用固定的基础URL,从 options 中获取或使用默认值 // 使用固定的基础URL,从 options 中获取或使用默认值
const options = pageOptions.value const options = pageOptions.value
let baseUrl = options.url || options.baseUrl || 'https://momclub-test.feihe.com/h5/game/index.html' let baseUrl = 'https://momclub-test.feihe.com/h5/game/index.html'
// 如果 baseUrl 已经包含协议,直接使用;否则添加协议 // 如果 baseUrl 已经包含协议,直接使用;否则添加协议
if (!baseUrl.startsWith('http://') && !baseUrl.startsWith('https://')) { if (!baseUrl.startsWith('http://') && !baseUrl.startsWith('https://')) {
baseUrl = 'https://' + baseUrl baseUrl = 'https://' + baseUrl
...@@ -113,17 +113,23 @@ const initWebviewUrl = async () => { ...@@ -113,17 +113,23 @@ const initWebviewUrl = async () => {
const params = { ...cleanOptions } const params = { ...cleanOptions }
if (cuk && !params.cuk) params.cuk = cuk if (cuk && !params.cuk) params.cuk = cuk
// 添加用户信息参数 // 添加用户信息参数
if (openId && !params.openId) params.openId = openId if (openId && !params.miniopenid) params.miniopenid = openId
if (unionId && !params.unionId) params.unionId = unionId if (unionId && !params.unionId) params.unionId = unionId
// 获取会员信息(优先从 memberInfo 获取,如果没有则从 userInfo 获取) // 获取会员信息(优先从 memberInfo 获取,如果没有则从 userInfo 获取)
const memberInfo = userStore.memberInfo || userStore.userInfo const memberInfo = userStore.memberInfo || userStore.userInfo
const userInfo = userStore.userInfo
// 添加微信昵称(如果存在)
if (userInfo?.nickname) {
params.wxNickName = userInfo.nickname
}
// 添加 memberId(如果已注册) // 添加 memberId(如果已注册)
if (memberInfo?.memberId && memberInfo.memberId !== "not_login") { if (memberInfo?.memberId && memberInfo.memberId !== "not_login") {
params.crmId = memberInfo.memberId params.crmId = memberInfo.memberId
// 添加会员ID // 添加会员ID
params.memberId = memberInfo.memberId params.memberid = memberInfo.memberId
// 添加是否登录(1表示已登录,0表示未登录) // 添加是否登录(1表示已登录,0表示未登录)
params.programLogin = '1' params.programLogin = '1'
// 添加会员等级(从 gradeList 中根据 grade 获取 gradeName) // 添加会员等级(从 gradeList 中根据 grade 获取 gradeName)
...@@ -315,7 +321,7 @@ onShareTimeline((options) => { ...@@ -315,7 +321,7 @@ onShareTimeline((options) => {
return { return {
title: title || '分享', title: title || '分享',
path: shareurl || '/pages/index/index', path: shareurl || '/pages/gameWebview/webview',
imageUrl: imageUrl || '', imageUrl: imageUrl || '',
success: function (res) { success: function (res) {
//星妈会埋点方法,用户分享成功后触发事件 //星妈会埋点方法,用户分享成功后触发事件
......
...@@ -248,7 +248,7 @@ export const useUserStore = defineStore("userInfo", { ...@@ -248,7 +248,7 @@ export const useUserStore = defineStore("userInfo", {
console.log("fetchMemberInfo=", data); console.log("fetchMemberInfo=", data);
this.setMemberInfo(data); this.setMemberInfo(data);
if (data?.memberId !== "not_login") { if (data?.memberId !== "not_login") {
uni.setStorageSync('memberId', data?.memberId) uni.setStorageSync('memberId', data?.memberId)
} }
...@@ -393,16 +393,16 @@ export const useUserStore = defineStore("userInfo", { ...@@ -393,16 +393,16 @@ export const useUserStore = defineStore("userInfo", {
/** /**
* 清除用户信息(注销时使用) * 清除用户信息(注销时使用)
*/ */
// clearUserData() { clearUserData() {
// this.userInfo = null; this.userInfo = null;
// this.babyInfo = null; this.babyInfo = null;
// this.memberInfo = null; this.memberInfo = null;
// this.babyNickCache = []; this.babyNickCache = [];
// this.cepingjieguoInfo = null; this.cepingjieguoInfo = null;
// // 清除本地存储 // 清除本地存储
// uni.removeStorageSync('memberId'); uni.removeStorageSync('memberId');
// uni.removeStorageSync('loginStatus'); uni.removeStorageSync('loginStatus');
// }, },
}, },
}); });
\ No newline at end of file
...@@ -809,7 +809,7 @@ export default { ...@@ -809,7 +809,7 @@ export default {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: "true",
pageName: "商品详情页", pageName: "商品详情页",
componentName: "立即兑换", componentName: "商品详情",
componentContent: "立即兑换" componentContent: "立即兑换"
}); });
console.log('handleExchange 被调用'); console.log('handleExchange 被调用');
......
...@@ -88,11 +88,11 @@ export default { ...@@ -88,11 +88,11 @@ export default {
uni.hideLoading(); uni.hideLoading();
if (res.ok) { if (res.ok) {
// 清除本地缓存的用户信息 // 清除本地缓存的用户信息
// const userStore = useUserStore(); const userStore = useUserStore();
// const globalStore = useGlobalStore(); // const globalStore = useGlobalStore();
// const homeStore = useHomeStore(); // const homeStore = useHomeStore();
// userStore.clearUserData(); userStore.clearUserData();
// globalStore.clearAuthData(); // globalStore.clearAuthData();
// homeStore.clearHomeData(); // homeStore.clearHomeData();
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
// 跳转到首页 // 跳转到首页
uni.reLaunch({ uni.reLaunch({
url: '/pages/index/index' url: '/pages/index/index?pageType=home'
}); });
} else { } else {
uni.showToast({ uni.showToast({
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<text class="product-name">{{ order.productName }}</text> <text class="product-name">{{ order.productName }}</text>
<text class="product-points">{{ order.points }}{{ order.creditsTypeName }}</text> <text class="product-points">{{ order.points }}{{ order.creditsTypeName }}</text>
</view> </view>
<text class="product-description">{{ order.description }}</text> <!-- <text class="product-description">{{ order.description }}</text> -->
<!-- 卡券有效期 --> <!-- 卡券有效期 -->
<text v-if="order.productType === 'coupon' && order.validUntil" class="validity-period"> <text v-if="order.productType === 'coupon' && order.validUntil" class="validity-period">
...@@ -115,8 +115,8 @@ export default { ...@@ -115,8 +115,8 @@ export default {
// 遍历订单列表,为显示"查看详情"按钮的订单添加曝光埋点 // 遍历订单列表,为显示"查看详情"按钮的订单添加曝光埋点
this.orderList.forEach((order) => { this.orderList.forEach((order) => {
// 只有当订单状态不是 pending_payment、pending_use、pending_take 时才显示"查看详情"按钮 // 只有当订单状态不是 pending_payment、pending_use、pending_take 时才显示"查看详情"按钮
if (order.status !== 'pending_payment' && if (order.status !== 'pending_payment' &&
order.status !== 'pending_use' && order.status !== 'pending_use' &&
order.status !== 'pending_take') { order.status !== 'pending_take') {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: "true",
...@@ -548,6 +548,7 @@ export default { ...@@ -548,6 +548,7 @@ export default {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between;
} }
.product-name-row { .product-name-row {
...@@ -558,11 +559,15 @@ export default { ...@@ -558,11 +559,15 @@ export default {
} }
.product-name { .product-name {
width: 350rpx;
font-size: 30rpx; font-size: 30rpx;
color: #333333; color: #333333;
font-weight: 600; font-weight: 600;
flex: 1; flex: 1;
margin-right: 20rpx; margin-right: 20rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.product-points { .product-points {
......
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
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
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</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>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<!-- 完成任务模块 --> <!-- 完成任务模块 -->
<view class="task-module" <view class="task-module"
v-if="!cfgStatus.isRegister || (babyInfo?.allBabyBaseInfo && babyInfo.allBabyBaseInfo.length > 0)"> 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>
...@@ -420,7 +420,7 @@ const navigateTo = (url) => { ...@@ -420,7 +420,7 @@ const navigateTo = (url) => {
const navigateToWithLogin = (url) => { const navigateToWithLogin = (url) => {
console.warn('navigateToWithLogin', url); console.warn('navigateToWithLogin', url);
console.warn('cfgStatus.value.isRegister', cfgStatus.value.isRegister); console.warn('cfgStatus.value.isRegister', cfgStatus.value.isRegister);
// 添加点击埋点 - 根据 URL 判断是哪个菜单项 // 添加点击埋点 - 根据 URL 判断是哪个菜单项
let componentContent = ''; let componentContent = '';
if (url.includes('/v3/orderList/orderList')) { if (url.includes('/v3/orderList/orderList')) {
...@@ -430,7 +430,7 @@ const navigateToWithLogin = (url) => { ...@@ -430,7 +430,7 @@ const navigateToWithLogin = (url) => {
} else if (url.includes('/v3/more/index')) { } else if (url.includes('/v3/more/index')) {
componentContent = '更多'; componentContent = '更多';
} }
if (componentContent) { if (componentContent) {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: "true",
...@@ -576,6 +576,27 @@ const handleWheelChange = (val) => { ...@@ -576,6 +576,27 @@ const handleWheelChange = (val) => {
const initExposure = () => { const initExposure = () => {
// 添加宝宝信息引导模块曝光埋点
if (cfgStatus.value.isRegister && (!babyInfo.value?.allBabyBaseInfo || babyInfo.value?.allBabyBaseInfo?.length === 0)) {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "添加宝宝信息引导",
componentContent: "添加宝宝信息引导"
});
}
// 添加做任务赚更多积分模块曝光埋点
if (!cfgStatus.value.isRegister || (babyInfo.value?.allBabyBaseInfo && babyInfo.value?.allBabyBaseInfo?.length > 0)) {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "做任务赚更多积分",
componentContent: "去做任务"
});
}
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: "true",
pageName: "我的页面", pageName: "我的页面",
...@@ -657,26 +678,7 @@ onShow(async () => { ...@@ -657,26 +678,7 @@ onShow(async () => {
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)
// 添加宝宝信息引导模块曝光埋点
if (cfgStatus.value.isRegister && (!babyInfo.value?.allBabyBaseInfo || babyInfo.value?.allBabyBaseInfo?.length === 0)) {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "添加宝宝信息引导",
componentContent: "添加宝宝信息引导"
});
}
// 添加做任务赚更多积分模块曝光埋点
if (!cfgStatus.value.isRegister || (babyInfo.value?.allBabyBaseInfo && babyInfo.value?.allBabyBaseInfo?.length > 0)) {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "做任务赚更多积分",
componentContent: "去做任务"
});
}
// 添加拓展工具菜单曝光埋点 // 添加拓展工具菜单曝光埋点
md.sensorComponentLogTake({ md.sensorComponentLogTake({
......
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