Commit 821b80a8 authored by spc's avatar spc

Merge branch 'master' into 20250901_915Act

parents 426127d7 21692b07
......@@ -4,68 +4,45 @@
<!-- 弹窗头部 -->
<view class="popup-header">
<text class="popup-title">切换宝宝</text>
<image
class="close-btn"
:src="`${$baseUrl}shengzhangTool/1001/changeBaby/closeBtn.png`"
mode="aspectFit"
@click="closePopup"
/>
<image class="close-btn" :src="`${$baseUrl}shengzhangTool/1001/changeBaby/closeBtn.png`"
mode="aspectFit" @click="closePopup" />
</view>
<!-- 宝宝列表 -->
<view class="baby-list">
<view
v-for="(baby, index) in babyList"
:key="index"
class="baby-item"
:class="{ selected: selectIndex === index }"
@click="selectBaby(index)"
>
<view v-for="(baby, index) in babyList" :key="index" class="baby-item"
:class="{ selected: selectIndex === index }" @click="selectBaby(index)">
<!-- 选中背景 -->
<image
v-if="selectIndex === index"
class="baby-item-bg"
:src="`${$baseUrl}shengzhangTool/1001/changeBaby/babyItemBg.png`"
mode="aspectFit"
/>
<image v-if="selectIndex === index" class="baby-item-bg"
:src="`${$baseUrl}shengzhangTool/1001/changeBaby/babyItemBg.png`" mode="aspectFit" />
<!-- 宝宝头像 -->
<image
class="baby-avatar"
<image class="baby-avatar"
:src="baby.babyAvatar || `https://course.feihe.com/momclub-picture/common/default_avatar.png`"
mode="aspectFill"
/>
mode="aspectFill" />
<!-- 宝宝信息 -->
<view class="baby-info">
<view class="baby-name-row">
<text class="baby-name">{{ baby.babyName }}</text>
<image
class="gender-icon"
<image class="gender-icon"
:src="baby.babyGender === 'M' ? `${$baseUrl}shengzhangTool/1001/sex1.png` : `${$baseUrl}shengzhangTool/1001/sex0.png`"
mode="aspectFit"
/>
mode="aspectFit" />
</view>
<text class="baby-birthday">宝宝生日: {{ baby.babyBirthday }}</text>
</view>
</view>
</view>
<image
class="ok-btn"
:class="{'ok-btn-active': isOkPressed}"
:src="`${$baseUrl}shengzhangTool/1001/changeBaby/okBtn.png`"
@touchstart="handleOkTouchStart"
@touchend="handleOkTouchEnd"
mode="aspectFit"
></image>
<image class="ok-btn" :class="{ 'ok-btn-active': isOkPressed }"
:src="`${$baseUrl}shengzhangTool/1001/changeBaby/okBtn.png`" @touchstart="handleOkTouchStart"
@touchend="handleOkTouchEnd" mode="aspectFit"></image>
</view>
</view>
</template>
<script setup>
import { ref, defineEmits, defineProps, onMounted } from 'vue'
import { ref, defineEmits, defineProps, onMounted, watch } from 'vue'
import { useUserStore } from "@/stores/user";
import md from '../md.js'
......@@ -91,6 +68,7 @@ const props = defineProps({
}
})
const userStore = useUserStore();
const emit = defineEmits(['update:visible', 'update:selectedIndex', 'change'])
......@@ -145,9 +123,10 @@ const selectBaby = (index) => {
}
const babyList = ref([]);
onMounted(() => {
const initListData = () => {
babyList.value = (userStore.babyInfo?.allBabyBaseInfo || []).filter(tem => tem.babyStage === 2);
if(babyList.value === null){
if (babyList.value === null) {
babyList.value = [];
}
......@@ -159,6 +138,16 @@ onMounted(() => {
toolName: "生长曲线",
popName: "切换宝宝弹窗"
});
}
watch(() => props.visible, (val, oldVal) => {
if (val && !oldVal) {
// 打开的时候更新数据
initListData();
}
}, { immediate: true })
onMounted(() => {
initListData();
})
......@@ -285,6 +274,7 @@ onMounted(() => {
height: 98rpx;
margin-left: 35rpx;
margin-top: 0rpx;
&.ok-btn-active {
transform: scale(0.95);
}
......@@ -292,12 +282,4 @@ onMounted(() => {
}
}
</style>
\ No newline at end of file
......@@ -35,6 +35,7 @@
</template>
</view>
<view class="form-btn" @click="onAdd">
<image v-if="isType == '0' || isType == '2'" :src="`${$baseUrl}chanjianTool/1001/icon23.png`"></image>
<template v-if="type == '1'">
......@@ -43,6 +44,8 @@
<template v-if="type == '2'">
{{ isType == '0' ? '添加状态' : isType == '3' ? '我知道了' : isType == '1' ? '切换状态' : '修改状态' }}
</template>
<button v-if="isNotLogin" type="primary" class="phone-button" open-type="getPhoneNumber"
@getphonenumber="getRealtimePhoneNumber" />
</view>
</view>
</view>
......@@ -53,7 +56,8 @@ import {
ref,
onMounted,
computed,
defineEmits
defineEmits,
watch
} from 'vue'
import { useUserStore } from "@/stores/user";
// 接受父组件参数
......@@ -61,6 +65,10 @@ const props = defineProps({
type: {
type: String,
default: '1', // 1 非宝宝状态 2 非孕中状态
},
isNotLogin: {
type: Boolean,
default: false //是否未登录
}
})
// 用户信息
......@@ -68,7 +76,7 @@ const userStore = useUserStore();
const babyInfo = ref(userStore.babyInfo)
// 回调函数
const emit = defineEmits([ 'statusChange', 'close'])
const emit = defineEmits(['statusChange', 'close'])
const isType = ref('0') // 0 添加状态或者宝宝 1 切换状态 2 修改状态 3 宝宝已达上限
......@@ -98,7 +106,25 @@ const navigateToFn = () => {
url: `/pages/person/person?type=${type}`
})
}
const getRealtimePhoneNumber = async (e) => {
console.log("获取手机号码", e);
if (e.detail.errMsg !== "getPhoneNumber:ok") {
uni.showToast({
title: "请授权使用手机号",
icon: "none",
});
return;
}
await userStore.phoneCallback(e.detail, () => { }, () => {
emit('afterPhone') //如果没有宝宝信息,页面中处理宝宝注册信息
});
console.log("closeclosecloseclose");
emit('close')
emit('statusChange') //借用这个事件,刷新下页面数据
};
// 切换状态 需要对应的宝宝id 直接请求接口
const switchState = async () => {
console.log('切换状态', babyBaseId.value)
......@@ -117,8 +143,12 @@ const modifyState = async () => {
url: `/pages/person/person?type=${type}&id=${babyBaseId.value}`
})
}
//这里新增一下未登录的情况,点击事件直接去拉起手机号授权
// 跳转新增产检页面
const onAdd = () => {
if (props.isNotLogin == true) {
return;
}
// 0 添加状态或者宝宝 1 切换状态 2 修改状态 3 宝宝已达上限
switch (isType.value) {
case '0':
......@@ -131,17 +161,28 @@ const onAdd = () => {
modifyState()
break;
case '3':
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.reLaunch({
url: '/pages/index/index'
})
}
break;
default:
break;
}
}
onMounted(() => {
onMounted(async () => {
if (props.isNotLogin) {
await userStore.wxAutoLogin();
}
// 宝宝生长测试和喂养记录
console.log('babyInfo-获取宝宝', babyInfo.value)
const babyBaseInfo = babyInfo.value.allBabyBaseInfo
const babyBaseInfo = babyInfo?.value?.allBabyBaseInfo
console.log("🚀 ~ babyBaseInfo:", babyBaseInfo)
// 有宝宝状态
if (babyBaseInfo) {
......@@ -319,11 +360,19 @@ onMounted(() => {
align-items: center;
justify-content: center;
margin-top: 55rpx;
position: relative;
image {
width: 42rpx;
height: 42rpx;
margin-right: 12rpx;
}
.phone-button {
width: 100%;
height: 100%;
position: absolute;
opacity: 0;
}
}
</style>
\ No newline at end of file
......@@ -6,7 +6,7 @@ const init = (SENSORS_URL) => {
sensors.setPara({
name: "sensors",
server_url: SENSORS_URL,
show_log: true,
show_log: false,
autoTrack: {
appLaunch: true, // 默认为 true,false 则关闭 $MPLaunch 事件采集
appShow: true, // 默认为 true,false 则关闭 $MPShow 事件采集
......@@ -178,6 +178,15 @@ const sensorPopLogTake = (logObj) => {
sensorPopLog(evt);
};
const sensorUserLogTake = (logObj) => {
if (!logObj) {
return;
}
sensors.track("xcxUserStatus", {
...logObj,
});
};
export default {
init,
sensors,
......@@ -188,4 +197,5 @@ export default {
sensorComponentLogTake,
sensorPopLog,
sensorPopLogTake,
sensorUserLogTake
};
......@@ -120,6 +120,12 @@
},
"channelTabListMianTitle": "有声频道",
"swiperList": [
{
"videoUrl": "homepage/homeSwiper/V1/9_1.mp4",
"link": {},
"title": "教师节banner",
"url": "homepage/homeSwiper/V1/9.gif"
},
{
"img": "homepage/homeSwiper/V1/7.jpg",
"link": {
......
This diff is collapsed.
......@@ -323,16 +323,6 @@
"desc": "星妈会Lab",
"bgUrl": "my/icon_xingma_lab1.png"
},
{
"link": {
"extra": {},
"type": 1,
"url": "/pages/naming/naming"
},
"title": "星妈起名",
"desc": "星妈起名",
"bgUrl": "my/naming.png"
},
{
"link": {
"extra": {},
......@@ -446,13 +436,14 @@
],
"activeInfo": [
{
"img": "https://course.feihe.com/momclub-picture/my/vipAct090201.png",
"img": "https://course.feihe.com/momclub-picture/my/vipAct250910002.png",
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=739634042657637394&skuId=739635029460743612"
"url": "/subPackages/shopMainProcess/product/index?productId=543558664688883066&skuId=543560605494007100",
"title": "黄糯玉米"
},
{
"img": "https://course.feihe.com/momclub-picture/my/activeImg0823.png",
......@@ -470,4 +461,4 @@
"母婴店"
]
}
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -52,7 +52,9 @@
<button open-type="getPhoneNumber" @getphonenumber="(e) => onGetPhoneNumber(e, 'like')"
class="auth-like-btn phone-auth-btn-cover"></button>
<!-- 分享按钮授权覆盖 - 移除这个,让分享按钮正常工作 -->
<!-- 分享按钮授权覆盖 -->
<button open-type="getPhoneNumber" @getphonenumber="(e) => onGetPhoneNumber(e, 'share')"
class="auth-share-btn phone-auth-btn-cover"></button>
</div>
</div>
</view>
......@@ -72,7 +74,7 @@ defineOptions({
})
// 响应式数据
const collectionNumber = ref('123456789')
const collectionNumber = ref('')
const recordId = ref('') // 添加记录ID的响应式变量
const detailData = ref({
content: '',
......@@ -267,8 +269,8 @@ const handleGoBack = () => {
}
}
// 生命周期
onMounted(async (options) => {
// 页面初始化逻辑
const initPage = async () => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
......@@ -284,7 +286,6 @@ onMounted(async (options) => {
componentContent: "分享"
});
// 调用 home 接口获取登录状态
await homeStore.loadHomeInfo()
......@@ -297,7 +298,6 @@ onMounted(async (options) => {
recordId.value = id // 立即保存ID,确保分享时能获取到
await fetchDetailData(id)
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "星妈lab-藏品详情页",
......@@ -305,7 +305,7 @@ onMounted(async (options) => {
componentContent: "藏品详情页+" + detailData.value.content
});
} else {
console.warn('⚠️ 未获取到页面参数 id', options, currentPage.options)
console.warn('⚠️ 未获取到页面参数 id', currentPage.options)
// uni.showToast({
// title: '参数错误',
// icon: 'none'
......@@ -323,6 +323,22 @@ onMounted(async (options) => {
withShareTicket: true,
menus: ['shareAppMessage']
})
}
// 生命周期
onMounted(async (options) => {
console.log('星妈lab详情页面已加载')
// 先进行自动登录获取基础信息,登录成功后执行页面初始化
try {
console.log('开始执行 normalAutoLogin...')
await userStore.normalAutoLogin(initPage)
console.log('normalAutoLogin 完成')
} catch (error) {
console.error('normalAutoLogin 失败:', error)
// 即使登录失败也执行页面初始化
await initPage()
}
})
// 定义分享函数
......
This diff is collapsed.
This diff is collapsed.
......@@ -114,11 +114,12 @@
</view>
<!-- 提示弹窗 -->
<popup-tip v-if="isTip" type="2" @statusChange="onBabyChange" @close="isTip = false"></popup-tip>
<popup-tip v-if="isTip" type="2" @statusChange="onBabyChange" @afterPhone="isShowRegisterLayer = true"
:isNotLogin="isNotLogin" @close="isTip = false"></popup-tip>
<RegisterLayer v-model="isShowRegisterLayer" @confirm="onRegisterConfirm" />
<!-- 使用封装后的日期选择器组件 -->
<DatePicker v-model:visible="visible" :default-date="time" @confirm="handleDateConfirm"
/>
<DatePicker v-model:visible="visible" :default-date="time" @confirm="handleDateConfirm" />
</view>
</view>
</template>
......@@ -133,7 +134,9 @@ import {
} from 'vue'
import {
onLoad,
onShow
onShow,
onShareAppMessage,
onShareTimeline
} from '@dcloudio/uni-app'
import {
jump,
......@@ -150,6 +153,7 @@ import {
} from '../../api/obstetric.js';
// 导入日期选择器组件
import DatePicker from '@/components/DatePicker.vue'
import RegisterLayer from '@/components/RegisterLayer.vue'
const {
proxy
} = getCurrentInstance();
......@@ -168,6 +172,8 @@ const isWxNotification = ref(true)
// 提示弹窗
const isTip = ref(false)
const isNotLogin = ref(false);
const isShowRegisterLayer = ref(false)
// 弹窗控制
const showPicker = ref(false)
......@@ -562,8 +568,19 @@ const onBabyChange = () => {
publicFn()
}
// 公共函数
const publicFn = () => {
console.log("🚀 ~ onShow ~ userStore:", userStore.babyInfo)
const publicFn =async () => {
await userStore.loadUserInfo()
console.log("🚀 ~ onShow ~ userStore:", userStore.userInfo)
isNotLogin.value = false;
if (
userStore?.userInfo?.memberId &&
userStore?.userInfo?.memberId == "not_login" || !userStore.userInfo
) {
isNotLogin.value = true;
}
const babyInfo = userStore.babyInfo
if (babyInfo && babyInfo.babyStage == 1) {
isTip.value = false
......@@ -577,6 +594,11 @@ const publicFn = () => {
isTip.value = true
}
}
const onRegisterConfirm = async () => {
isShowRegisterLayer.value = false;
await userStore.loadBabyInfo()
publicFn()
}
onShow(async () => {
await userStore.loadBabyInfo()
console.log('宝宝信息加载完成:', userStore.babyInfo)
......@@ -589,6 +611,24 @@ onMounted(() => {
pageName: "产检提醒首页"
});
})
onShareAppMessage(() => {
return {
title: "产检工具:孕检项目全掌握,产检日程不错过",
path: "/pages/postnatalCheckUp/postnatalCheckUp",
imageUrl: $baseUrl + "share/chanjian.png",
}
});
onShareTimeline(() => {
return {
title: "产检工具:孕检项目全掌握,产检日程不错过",
path: "/pages/postnatalCheckUp/postnatalCheckUp",
imageUrl: $baseUrl + "share/chanjian.png",
}
});
</script>
<style lang="less" scoped>
......
......@@ -307,7 +307,7 @@
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, getCurrentInstance } from 'vue'
import { onLoad, onShareAppMessage } from "@dcloudio/uni-app";
import { useShengzhangStore } from '../../stores/shengzhangResult.js';
import { formatDate, jump, JumpType } from '../../utils/index.js';
......@@ -320,7 +320,8 @@ import md from '../../md';
const isRecords = ref(false);
const shareText = ref('')
const { proxy } = getCurrentInstance();
const $baseUrl = proxy.$baseUrl;
onLoad((options) => {
isRecords.value = options.isRecords;
// activeTab.value = isRecords.value ? 'history' : 'latest';
......@@ -699,9 +700,9 @@ const backFailHandler = () => {
onShareAppMessage(() => {
return {
title: shareText.value,
title: shareText.value || "生长测评:精准评估宝宝发育水平",
path: `/pages/shengzhangTestResult/shengzhangTestResult`,
imageUrl: ''
imageUrl: $baseUrl + "share/shengzhang.png",
}
})
......@@ -713,10 +714,21 @@ onMounted(async () => {
xcxPage: "测评结果页",
pageName: "测评结果页"
});
const userStore = useUserStore();
//获取历史记录
const historyListData = await getGrowthHistoryList();
console.log(userStore.babyInfo?.content?.id+'--------------------',shengzhangStore?.getGrowthCurveDataInfoHeight?.userDataPoints)
if(!userStore.babyInfo?.content?.id ){
jump({
type: JumpType.INNER,
url: "/pages/shengzhangTools/shengzhangTools"
})
return;
}
if(!historyListData.success || (!historyListData.data || historyListData.data.length == 0)){
showNoValBg.value = true;
return;
......@@ -761,7 +773,7 @@ onMounted(async () => {
}
}
const userStore = useUserStore();
const babyId = userStore.babyInfo?.content?.id;
const babyDataHeight = {
......
This diff is collapsed.
......@@ -29,8 +29,11 @@
<view class="item_cangguan_img1"
:style="`background-image: url(${item.imgUrl}); background-size: 707rpx auto; background-repeat: no-repeat;`"
mode="widthFix">
<image class="item_cangguan_img" :src="`${item.imgUrl}`" mode="widthFix" @load="(e) => handleImageLoad(e, item, index)"></image>
<image class="item_cangguan_img_up" :src="`${item.imgUrl}`" mode="aspectFill" :style="`width: ${item.targetWidth - 30}rpx; height: ${item.targetHeight - 120}rpx;`"></image>
<image class="item_cangguan_img" :src="`${item.imgUrl}`" mode="widthFix"
@load="(e) => handleImageLoad(e, item, index)"></image>
<image class="item_cangguan_img_up" :src="`${item.imgUrl}`" mode="aspectFill"
:style="`width: ${item.targetWidth - 30}rpx; height: ${item.targetHeight - 120}rpx;`">
</image>
</view>
<view class="item_cangguan_bottom">
......@@ -357,19 +360,19 @@ onShow(async () => {
console.log('currentPage=', currentPage);
// console.log('onshow')
//1收藏,-1取消收藏,不存在刷新页面
if(!isFavorite){
if (!isFavorite) {
await xingmaLabStore.loadXingmaInfo();
await reloadCangguanList();
await reloadCangpinList();
await reloadShoucangList();
}else{
if(isFavorite == 1){
} else {
if (isFavorite == 1) {
currentItem.value.collection = true;
}else{
if(currentItemType.value == 'cangguan'){
} else {
if (currentItemType.value == 'cangguan') {
currentItem.value.collection = false;
}else{
} else {
shoucangList.value.splice(currentItem.value, 1)
}
}
......@@ -477,9 +480,15 @@ const convertDobuleList = (list) => {
// 方法
const handleBack = () => {
if (getCurrentPages().length > 1) {
uni.navigateBack({
delta: 1
})
} else {
uni.redirectTo({
url: '/pages/index/index?pageType=my'
})
}
}
const switchTab = (tab) => {
......@@ -491,8 +500,8 @@ const switchTab = (tab) => {
//我的藏品/我的收藏tab
const switchSubTab = async (subTab) => {
if(subTab == 'collections'){
if(currentFrontNavType != 'collections'){
if (subTab == 'collections') {
if (currentFrontNavType != 'collections') {
currentFrontNavType = 'collections'
md.sensorComponentLogTake({
......@@ -506,8 +515,8 @@ const switchSubTab = async (subTab) => {
}
}else if(subTab == 'favorites'){
if(currentFrontNavType != 'favorites'){
} else if (subTab == 'favorites') {
if (currentFrontNavType != 'favorites') {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "星妈lab首页",
......@@ -570,7 +579,7 @@ const handleBottomNavClick = async (navType) => {
// 点击"星妈会藏馆"时,切换到藏馆tab,展示单列列表
activeTab.value = 'cangguan'
if(currentButtomNavType != 'cangguan'){
if (currentButtomNavType != 'cangguan') {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "星妈lab首页",
......@@ -600,10 +609,10 @@ const handleBottomNavClick = async (navType) => {
// 点击"我的藏品"时,切换到我的藏馆tab,默认展示我的藏品
activeTab.value = 'wodecangguan'
if(currentButtomNavType != 'wodecangguan'){
if (currentButtomNavType != 'wodecangguan') {
currentButtomNavType = 'wodecangguan';
if(currentFrontNavType == ''){
if(!(cangpinList.value && cangpinList.value.length > 0)){
if (currentFrontNavType == '') {
if (!(cangpinList.value && cangpinList.value.length > 0)) {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "星妈lab-我的藏品页",
......@@ -625,10 +634,10 @@ const handleBottomNavClick = async (navType) => {
currentFrontNavType = 'collections'
// await reloadCangpinList();
}else{
} else {
currentFrontNavType = activeSubTab.value;
if(activeSubTab.value == 'collections'){
if(!(cangpinList.value && cangpinList.value.length > 0)){
if (activeSubTab.value == 'collections') {
if (!(cangpinList.value && cangpinList.value.length > 0)) {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
......@@ -648,7 +657,7 @@ const handleBottomNavClick = async (navType) => {
// }
// await reloadCangpinList();
//走onshow刷新,因为去发布按钮埋点
}else{
} else {
// md.sensorComponentLogTake({
// xcxComponentExposure: "true",
// pageName: "星妈lab-我的藏品页",
......@@ -729,12 +738,12 @@ const handlePublish = () => {
const handleNoTimeButtonClick = () => {
showNoTimePopup.value = false
// // 显示更详细的发布次数信息
// const { currentMonthPublishCount, maxPublishCount, remainingPublishCount } = xingmaLabStore.xingmaInfo
// uni.showToast({
// title: `本月已发布${currentMonthPublishCount}次,剩余${remainingPublishCount}次`,
// icon: 'none',
// duration: 3000
// // 显示更详细的发布次数信息
// const { currentMonthPublishCount, maxPublishCount, remainingPublishCount } = xingmaLabStore.xingmaInfo
// uni.showToast({
// title: `本月已发布${currentMonthPublishCount}次,剩余${remainingPublishCount}次`,
// icon: 'none',
// duration: 3000
// })
}
</script>
......
......@@ -71,7 +71,7 @@ export const useUserStore = defineStore("userInfo", {
* @param {Object} data : {encryptedData, iv, code}
* @returns
*/
async phoneCallback(data, onOpenRegisterFn = () => { }) {
async phoneCallback(data, onOpenRegisterFn = () => { }, cb) {
uni.login({
provider: "weixin",
success: async (res) => {
......@@ -86,7 +86,11 @@ export const useUserStore = defineStore("userInfo", {
code: data.code,
codeLogin: res.code,
});
!babyExistence && onOpenRegisterFn && onOpenRegisterFn();
if (!babyExistence.value && cb) {
cb();
}
const homeStore = useHomeStore();
await homeStore.setBabyExistence(babyExistence);
......
......@@ -36,7 +36,7 @@ export function jump({ type, url, extra = {} }) {
console.log("jumpParams:", jumpParams);
if(extra.embedded){
if(extra.embedded || jumpParams.appId === 'wx4205ec55b793245e'){ // 星妈优选的小程序都为半屏拉起
uni.openEmbeddedMiniProgram(jumpParams);
}else{
uni.navigateToMiniProgram(jumpParams);
......
......@@ -58,7 +58,7 @@
<swiper-item v-for="(item, index) in toolList.tools" :key="index"
:class="['swiperItem', { 'active': currentIndex === index }]">
<view class="tool">
<button v-if="homeStore && !homeStore.isLogin && item.title!='星妈起名' && item.title!='体质测试'"
<button v-if="homeStore && !homeStore.isLogin && item.title!='星妈起名' && item.title!='喂养工具' && item.title!='产检提醒' && item.title!='宝宝生长测评' && item.title!='体质测试'"
open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber" class="sq_btn"></button>
<image class="tool_bg" :src="$baseUrl + item.icon" @tap="handleToolClick(item)">
</image>
......
......@@ -100,8 +100,9 @@
<view class="tool-list">
<view class="tool-item" v-for="item in toolList" :key="item.title" @click="handleToolClick(item)">
<image class="tool-icon" :src="$baseUrl + item.bgUrl" mode="aspectFit" />
<!-- || item.title == '产检提醒' || item.title == '喂养记录' || item.title == '生长测评' -->
<button
v-if="(item.title == '医生问诊' || item.title == '产检提醒' || item.title == '喂养记录' || item.title == '生长测评') && !cfgStatus.isRegister"
v-if="(item.title == '医生问诊') && !cfgStatus.isRegister"
class="tool-btn-register" type="primary" open-type="getPhoneNumber"
@getphonenumber="getRealtimePhoneNumber" />
</view>
......@@ -268,7 +269,7 @@ const handleToolClick = async (item) => {
}
// 三个工具校验是否授权
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 });
}
else {
......@@ -404,6 +405,8 @@ const initData = async () => {
// 已出生或孕中显示
cfgStatus.value.showDetail = __showDetail;
if (__showDetail) {
wheelOptions.value =
babyInfo.value.babyStage == 2
......
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