Commit b68db882 authored by 王炽's avatar 王炽

Merge branch 'dev' of http://gitlab2.dui88.com/fh/20250528_FHQ1 into dev

parents a2b6920a 53447696
...@@ -3,17 +3,17 @@ ...@@ -3,17 +3,17 @@
<!-- 弹窗内容 --> <!-- 弹窗内容 -->
<view class="content"> <view class="content">
<p class="title"> <p class="title">
{{showOptions?.awardImageUrl ? '恭喜您获得了' : '很遗憾未中奖'}}</p> {{showOptions?.prizeImageUrl ? '恭喜您获得了' : '很遗憾未中奖'}}</p>
<image v-if="showOptions?.awardImageUrl" class="prize-image" <image v-if="showOptions?.prizeImageUrl" class="prize-image"
:src="showOptions?.awardImageUrl" mode="aspectFit" :src="showOptions?.prizeImageUrl" mode="aspectFit"
@error="console.log('奖品图片加载失败')"/> @error="console.log('奖品图片加载失败')"/>
<span class="prize-name"> <span class="prize-name">
{{ showOptions?.awardImageUrl ? showOptions?.awardName : '别灰心,再试试吧~' }} {{ showOptions?.prizeImageUrl ? showOptions?.prizeName : '别灰心,再试试吧~' }}
</span> </span>
<button class="confirm-btn" @click="onClickConfirm"> <button class="confirm-btn" @click="onClickConfirm">
{{ showOptions?.awardImageUrl ? '开心收下' : '我知道了' }} {{ showOptions?.prizeImageUrl ? '开心收下' : '我知道了' }}
</button> </button>
<p v-if="showOptions?.awardImageUrl" class="tips">奖品可在首页 我的奖品 中查看</p> <p v-if="showOptions?.prizeImageUrl" class="tips">奖品可在首页 我的奖品 中查看</p>
<image src="@/assets/images/close-btn.png" <image src="@/assets/images/close-btn.png"
class="close-btn" class="close-btn"
...@@ -107,8 +107,7 @@ defineExpose({ ...@@ -107,8 +107,7 @@ defineExpose({
} }
.prize-name { .prize-name {
width: 348rpx; width: 100%;
height: 30rpx;
font-size: 34rpx; font-size: 34rpx;
line-height: 30rpx; line-height: 30rpx;
color: rgba(0, 0, 0, 1); color: rgba(0, 0, 0, 1);
......
<script setup lang="ts"> <script setup lang="ts">
import {ref, computed, inject, onMounted, watch} from 'vue' import {ref, computed, inject, onMounted, watch, getCurrentInstance} from 'vue'
import ClickArea from "./ClickArea.vue"; import ClickArea from "./ClickArea.vue";
import {InvitationInfo} from "../types" import {InvitationInfo} from "../types"
import {getCdnUrl} from "../utils" import {getCdnUrl} from "../utils"
...@@ -13,6 +13,9 @@ const gotPrizeModalRef = ref<InstanceType<typeof GotPrizeModal>>() ...@@ -13,6 +13,9 @@ const gotPrizeModalRef = ref<InstanceType<typeof GotPrizeModal>>()
const updateShareData = inject('updateShareData') const updateShareData = inject('updateShareData')
const onGetPhoneNumber = inject('onGetPhoneNumber') const onGetPhoneNumber = inject('onGetPhoneNumber')
const { proxy } = getCurrentInstance()
const $baseUrl = proxy.$baseUrl
const props = defineProps<{ const props = defineProps<{
properties?: { properties?: {
area?: { x: number, y: number, width: number, height: number } area?: { x: number, y: number, width: number, height: number }
...@@ -99,12 +102,12 @@ async function initComponent() { ...@@ -99,12 +102,12 @@ async function initComponent() {
}) })
const {unclaimedPrizes} = invitationInfo.value const {unclaimedPrizes} = invitationInfo.value
if (unclaimedPrizes.value?.length > 0) { if (unclaimedPrizes.length > 0) {
const totalQuantity = unclaimedPrizes.value.reduce((sum, prize) => sum + (prize.quantity || 1), 0) const totalQuantity = unclaimedPrizes.reduce((sum, prize) => sum + (prize.quantity || 1), 0)
const firstPrize = unclaimedPrizes.value[0] const firstPrize = unclaimedPrizes[0]
gotPrizeModalRef.value.show({ gotPrizeModalRef.value.show({
prizeName: `${firstPrize.prizeName} × ${totalQuantity}`, prizeName: `${firstPrize.prizeName} × ${totalQuantity}`,
prizeImageUrl: firstPrize.prizeImageUrl, prizeImageUrl: $baseUrl + firstPrize.prizeImageUrl,
}) })
} }
} }
...@@ -123,7 +126,7 @@ onMounted(async () => { ...@@ -123,7 +126,7 @@ onMounted(async () => {
<template> <template>
<view class="invite-task" :class="{'debug-mode': debugMode}" :style="style"> <view class="invite-task" :class="{'debug-mode': debugMode}" :style="style">
<view class="avatars"> <view class="avatars" v-if="invitationInfo">
<template <template
v-for="i in 2"> v-for="i in 2">
<image <image
......
...@@ -516,7 +516,7 @@ const startHighlightAnimation = (targetIndex, isWin) => { ...@@ -516,7 +516,7 @@ const startHighlightAnimation = (targetIndex, isWin) => {
const {prizeName, prizeImageUrl} = turntablePrizes.value[targetIndex] const {prizeName, prizeImageUrl} = turntablePrizes.value[targetIndex]
gotPrizeModalRef.value.show({ gotPrizeModalRef.value.show({
prizeName, prizeName,
prizeImageUrl, prizeImageUrl: $baseUrl + prizeImageUrl,
}) })
} else { } else {
gotPrizeModalRef.value.show({}) gotPrizeModalRef.value.show({})
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
<image class="diamondbtn" :src="`${$baseUrl}${BABY_CLASS_IMAGES.DIAMOND.BTN}`" mode="aspectFit" <image class="diamondbtn" :src="`${$baseUrl}${BABY_CLASS_IMAGES.DIAMOND.BTN}`" mode="aspectFit"
@click="jump('diamond')"></image> @click="jump('diamond')"></image>
<!-- <image class="diamonddesc" :src="`${$baseUrl}${BABY_CLASS_IMAGES.DIAMOND.DESC}`" mode="aspectFit"></image> --> <!-- <image class="diamonddesc" :src="`${$baseUrl}${BABY_CLASS_IMAGES.DIAMOND.DESC}`" mode="aspectFit"></image> -->
<view class="diamonddesc" :style="{ color: getColor() }"> <!-- <view class="diamonddesc" :style="{ color: getColor() }">
7类课程:⼩⼉常⻅病-急救,产后恢复运动实操课,痱⼦,尿布疹,⼩⼉常⻅病-常⻅疾病护理,新⽣⼉⻩疸,⼉童安全⽤药操作课 7类课程:⼩⼉常⻅病-急救,产后恢复运动实操课,痱⼦,尿布疹,⼩⼉常⻅病-常⻅疾病护理,新⽣⼉⻩疸,⼉童安全⽤药操作课
</view> </view>-->
</view> </view>
<view v-if="currentLevelName === 'starshine'" class="starshine"> <view v-if="currentLevelName === 'starshine'" class="starshine">
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
@click="jump('starshine')"></image> @click="jump('starshine')"></image>
<!-- <image class="starshinedesc" :src="`${$baseUrl}${BABY_CLASS_IMAGES.STARSHINE.DESC}`" mode="aspectFit"> <!-- <image class="starshinedesc" :src="`${$baseUrl}${BABY_CLASS_IMAGES.STARSHINE.DESC}`" mode="aspectFit">
</image> --> </image> -->
<view class="starshinedesc" :style="{ color: getColor() }"> <!-- <view class="starshinedesc" :style="{ color: getColor() }">
7类课程:⼩⼉常⻅病-急救,产后恢复运动实操课,痱⼦,尿布疹,⼩⼉常⻅病-常⻅疾病护理,新⽣⼉⻩疸,⼉童安全⽤药操作课 7类课程:⼩⼉常⻅病-急救,产后恢复运动实操课,痱⼦,尿布疹,⼩⼉常⻅病-常⻅疾病护理,新⽣⼉⻩疸,⼉童安全⽤药操作课
</view> </view>-->
</view> </view>
<view v-if="currentLevelName === 'starlight'" class="starlight"> <view v-if="currentLevelName === 'starlight'" class="starlight">
...@@ -63,9 +63,9 @@ ...@@ -63,9 +63,9 @@
@click="jump('starlight')"></image> @click="jump('starlight')"></image>
<!-- <image class="starlightdesc" :src="`${$baseUrl}${BABY_CLASS_IMAGES.STARLIGHT.DESC}`" mode="aspectFit"> <!-- <image class="starlightdesc" :src="`${$baseUrl}${BABY_CLASS_IMAGES.STARLIGHT.DESC}`" mode="aspectFit">
</image> --> </image> -->
<view class="starlightdesc" :style="{ color: getColor() }"> <!-- <view class="starlightdesc" :style="{ color: getColor() }">
7类课程:⼩⼉常⻅病-急救,产后恢复运动实操课,痱⼦,尿布疹,⼩⼉常⻅病-常⻅疾病护理,新⽣⼉⻩疸,⼉童安全⽤药操作课 7类课程:⼩⼉常⻅病-急救,产后恢复运动实操课,痱⼦,尿布疹,⼩⼉常⻅病-常⻅疾病护理,新⽣⼉⻩疸,⼉童安全⽤药操作课
</view> </view>-->
</view> </view>
<view v-if="currentLevelName === 'gold'" class="gold"> <view v-if="currentLevelName === 'gold'" class="gold">
...@@ -80,9 +80,9 @@ ...@@ -80,9 +80,9 @@
<image class="goldbtn" :src="`${$baseUrl}${BABY_CLASS_IMAGES.GOLD.BTN}`" mode="aspectFit" <image class="goldbtn" :src="`${$baseUrl}${BABY_CLASS_IMAGES.GOLD.BTN}`" mode="aspectFit"
@click="jump('gold')"></image> @click="jump('gold')"></image>
<!-- <image class="golddesc" :src="`${$baseUrl}${BABY_CLASS_IMAGES.GOLD.DESC}`" mode="aspectFit"></image> --> <!-- <image class="golddesc" :src="`${$baseUrl}${BABY_CLASS_IMAGES.GOLD.DESC}`" mode="aspectFit"></image> -->
<view class="golddesc" :style="{ color: getColor() }"> <!-- <view class="golddesc" :style="{ color: getColor() }">
5类课程:产检,⼉童疫苗,婴幼⼉护理,⼩⼉发热,⼩⼉7种常⻅病的治疗⽅法和⽤药原则 5类课程:产检,⼉童疫苗,婴幼⼉护理,⼩⼉发热,⼩⼉7种常⻅病的治疗⽅法和⽤药原则
</view> </view>-->
</view> </view>
<view v-if="currentLevelName === 'platinum'" class="platinum"> <view v-if="currentLevelName === 'platinum'" class="platinum">
...@@ -102,9 +102,9 @@ ...@@ -102,9 +102,9 @@
<image class="platinumbtn" :src="`${$baseUrl}${BABY_CLASS_IMAGES.PLATINUM.BTN}`" mode="aspectFit" <image class="platinumbtn" :src="`${$baseUrl}${BABY_CLASS_IMAGES.PLATINUM.BTN}`" mode="aspectFit"
@click="jump('platinum')"></image> @click="jump('platinum')"></image>
<!-- <image class="platinumdesc" :src="`${$baseUrl}${BABY_CLASS_IMAGES.PLATINUM.DESC}`" mode="aspectFit"></image> --> <!-- <image class="platinumdesc" :src="`${$baseUrl}${BABY_CLASS_IMAGES.PLATINUM.DESC}`" mode="aspectFit"></image> -->
<view class="platinumdesc" :style="{ color: getColor() }"> <!-- <view class="platinumdesc" :style="{ color: getColor() }">
5类课程:产检,⼉童疫苗,婴幼⼉护理,⼩⼉发热,⼩⼉7种常⻅病的治疗⽅法和⽤药原则 5类课程:产检,⼉童疫苗,婴幼⼉护理,⼩⼉发热,⼩⼉7种常⻅病的治疗⽅法和⽤药原则
</view> </view>-->
</view> </view>
</view> </view>
...@@ -195,7 +195,8 @@ const jump = (level) => { ...@@ -195,7 +195,8 @@ const jump = (level) => {
// 跳转到 H5 页面,地址暂时默认 https://www.baidu.com // 跳转到 H5 页面,地址暂时默认 https://www.baidu.com
// 可以根据不同等级跳转到不同的地址 // 可以根据不同等级跳转到不同的地址
const url = 'https://member.feihe.com/memberH5/#/courses' //const url = 'https://member.feihe.com/memberH5/#/courses'
const url = 'https://mom.feihe.com/expertsView?from=home'
// 使用 uni.navigateTo 跳转到 webview 页面 // 使用 uni.navigateTo 跳转到 webview 页面
uni.navigateTo({ uni.navigateTo({
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<template v-if="type == '2'"> <template v-if="type == '2'">
{{ isType == '0' ? '添加状态' : isType == '3' ? '我知道了' : isType == '1' ? '切换状态' : '修改状态' }} {{ isType == '0' ? '添加状态' : isType == '3' ? '我知道了' : isType == '1' ? '切换状态' : '修改状态' }}
</template> </template>
<button v-if="isNotLogin" type="primary" class="phone-button" open-type="getPhoneNumber" <button v-if="false && isNotLogin" type="primary" class="phone-button" open-type="getPhoneNumber"
@getphonenumber="getRealtimePhoneNumber" /> @getphonenumber="getRealtimePhoneNumber" />
</view> </view>
</view> </view>
...@@ -60,6 +60,7 @@ import { ...@@ -60,6 +60,7 @@ import {
watch watch
} from 'vue' } from 'vue'
import { useUserStore } from "@/stores/user"; import { useUserStore } from "@/stores/user";
import {jump, JumpType} from "@/utils";
// 接受父组件参数 // 接受父组件参数
const props = defineProps({ const props = defineProps({
type: { type: {
...@@ -147,6 +148,10 @@ const modifyState = async () => { ...@@ -147,6 +148,10 @@ const modifyState = async () => {
// 跳转新增产检页面 // 跳转新增产检页面
const onAdd = () => { const onAdd = () => {
if (props.isNotLogin == true) { if (props.isNotLogin == true) {
jump({
type: JumpType.INNER,
url: "/pages/activity/register",
})
return; return;
} }
// 0 添加状态或者宝宝 1 切换状态 2 修改状态 3 宝宝已达上限 // 0 添加状态或者宝宝 1 切换状态 2 修改状态 3 宝宝已达上限
......
...@@ -812,4 +812,4 @@ ...@@ -812,4 +812,4 @@
} }
] ]
} }
} }
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -27,6 +27,20 @@ ...@@ -27,6 +27,20 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/activity/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/activity/register",
"style": {
"navigationBarTitleText": "注册",
"navigationStyle": "custom"
}
},
{ {
"path": "pages/search/search", "path": "pages/search/search",
"style": { "style": {
...@@ -198,17 +212,15 @@ ...@@ -198,17 +212,15 @@
} }
}, },
{ {
"path" : "pages/middlePage/middlePage", "path": "pages/middlePage/middlePage",
"style" : "style": {
{ "navigationBarTitleText": ""
"navigationBarTitleText" : ""
} }
}, },
{ {
"path" : "pages/heliaixinTools/heliaixinTools", "path": "pages/heliaixinTools/heliaixinTools",
"style" : "style": {
{ "navigationBarTitleText": "鹤礼爱心"
"navigationBarTitleText" : "鹤礼爱心"
} }
} }
], ],
...@@ -296,6 +308,23 @@ ...@@ -296,6 +308,23 @@
} }
} }
] ]
},
{
"root": "subPackages",
"pages": [
{
"path": "momclub/momclub",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "xmhAactivity/xmhAactivity",
"style": {
"navigationBarTitleText": ""
}
}
]
} }
], ],
"globalStyle": { "globalStyle": {
......
<template>
<web-view :src="src" @message="onMessage"/>
</template>
<script setup>
import {ref, watch, nextTick} from "vue";
import {onLoad, onShow, onShareAppMessage, onShareTimeline} from "@dcloudio/uni-app";
import {useGlobalStore} from "../../stores/global";
import {useUserStore} from "../../stores/user";
import {jump, JumpType} from "../../utils";
const userStore = useUserStore();
const globalStore = useGlobalStore()
function getRegistered() {
return userStore.userInfo?.memberId !== "not_login"
}
const pageOptions = ref({})
const src = ref("");
const registered = ref(false)
const urlMap = {
//'main': 'http://192.168.0.5:8001/#/page',
'main': 'https://momclub-uat.feihe.com/h5/#/page',
};
const shareData = ref(null)
onShow(() => {
registered.value = getRegistered()
})
function joinUrlAndQs(url, qs) {
return qs
? url + (url.includes('?') ? (url.endsWith('?') ? '' : '&') : '?') + qs
: url
}
watch(() => registered.value, (newVal, oldVal) => {
if (newVal !== oldVal) {
const oldSrc = src.value
src.value = ''
nextTick(() => {
src.value = joinUrlAndQs(oldSrc, 'registered=' + newVal)
})
}
})
function initOk() {
console.log(userStore.userInfo)
let url = "";
const options = pageOptions.value
if (options.type) {
const type = options.type;
url = urlMap[type];
} else if (options.url) {
url = decodeURIComponent(options.url)
}
const params = {}
const {unionId, cuk} = globalStore
if (unionId && !params.unionId) params.unionId = unionId
if (cuk && !params.cuk) params.cuk = cuk
const {memberId} = userStore.userInfo
if (memberId) params.crmId = memberId
const paramStr = Object.keys(params)
.filter(key => params[key] !== undefined && params[key] !== null && params[key] !== '')
.map(key => `${key}=${encodeURIComponent(params[key])}`)
.join('&')
url = joinUrlAndQs(url, paramStr)
if(options.params){
url = joinUrlAndQs(url, decodeURIComponent(options.params))
}
src.value = url
console.log('webview url:', url)
}
onLoad(async (options) => {
pageOptions.value = options
console.log('页面参数:', options)
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
await userStore.normalAutoLogin()
await userStore.loadUserInfo()
registered.value = getRegistered()
if(options.needLogin && !registered.value) {
jump({
type: JumpType.INNER,
url: '/pages/activity/register',
})
}else{
initOk()
}
});
function onMessage(e) {
const data = e.detail.data
const lastData = data[data.length - 1]
console.log('webview 消息接收:', lastData)
switch (lastData.type) {
case 'share':
shareData.value = lastData.payload
break;
}
}
function shareHook() {
if (shareData.value) {
const {url, title, imageUrl = ''} = shareData.value
console.log('使用分享数据:', shareData.value)
return {
title,
path: url || '/pages/index/index',
imageUrl,
success: function (res) {
console.log('分享成功:', res)
//星妈会埋点方法,用户分享成功后触发事件
},
fail: function (res) {
console.log('分享失败:', res)
},
complete: function (res) {
console.log('分享完成:', res)
}
}
}
// 如果没有分享数据,返回默认分享
return {
path: '/pages/index/index'
}
}
onShareAppMessage((options) => {
console.log('分享给朋友数据:', shareData.value)
return shareHook()
})
onShareTimeline((options) => {
console.log('分享到朋友圈数据:', shareData.value)
return shareHook()
})
</script>
<script>
/*export default {
onShareAppMessage() {
return this.shareHook()
}
}*/
</script>
\ No newline at end of file
<script setup>
import {ref} from "vue";
import RegisterLayer from "../../components/RegisterLayer.vue";
import {useUserStore} from "../../stores/user";
import {jump, JumpType} from "../../utils";
import md from "../../md";
import Checkbox from "./toggle-button/index.vue";
const userStore = useUserStore();
const showRegisterLayer = ref(false);
const readProtocol = ref(false);
async function clickBack() {
uni.navigateBack({
delta: 1
})
}
async function onRegisterConfirm(data) {
console.log('注册确认:', data);
showRegisterLayer.value = false;
await Promise.all([
userStore.loadMemberInfo(),
userStore.loadUserInfo(),
])
uni.navigateBack({
delta: 1
})
}
async function getRealtimePhoneNumber(e) {
console.log("获取手机号码", e);
if (e.detail.errMsg !== "getPhoneNumber:ok") {
uni.showToast({
title: "请授权使用手机号",
icon: "none",
});
return;
}
await userStore.phoneCallback(e.detail, () => {
showRegisterLayer.value = true;
});
}
// 页面跳转
const navigateTo = (url) => {
uni.navigateTo({
url,
animationDuration: 0,
fail: (err) => {
console.error("页面跳转失败:", err);
uni.showToast({
title: "页面跳转失败",
icon: "none",
});
},
});
};
const handleHot = (e) => {
const type = e.currentTarget.dataset.type;
md.sensorLog(e);
console.log("handleHot", type);
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "我的页面",
componentName: "查看协议",
componentContent: type === "member" ? "会员规则" : "隐私协议"
})
if (type === "member") {
navigateTo("/pages/webview/webview?type=MEMBER_URL");
} else if (type === "privacy") {
navigateTo("/pages/webview/webview?type=PRIVACY_URL");
}
};
function clickRegister(e){
uni.showToast({
title: "请先阅读并同意协议《会员规则》及《隐私协议》",
icon: "none",
});
}
function testClick() {
jump({
type: JumpType.MINI,
url: '/subPackages/xmhMainProcess/mine/index',
extra: {
appId: 'wx4205ec55b793245e',
}
})
}
</script>
<template>
<div class="page">
<view >
<image src="@/assets/images/back-btn.png" class="btn-back" @click="clickBack"/>
</view>
<div class="content">
<div class="logo-container">
<image src="@/assets/logo.png" class="logo"/>
<text>星妈会</text>
</div>
<button v-if="readProtocol" class="register-button" open-type="getPhoneNumber" @getphonenumber="getRealtimePhoneNumber">
授权登录
</button>
<button v-else class="register-button disabled" @click="clickRegister">
授权登录
</button>
<!-- <button @click="testClick">
测试
</button>-->
<view class="protocol-container">
<Checkbox v-model="readProtocol" class="checkbox"/>
我已阅读并同意
<view class="link" :data-log="{
xcxClick: '注册页面点击',
pageName: '注册页面',
buttonName: '会员规则',
}" @click="handleHot" data-type="member">《会员规则》
</view>
<view class="link" :data-log="{
xcxClick: '注册页面点击',
pageName: '注册页面',
buttonName: '隐私协议',
}" @click="handleHot" data-type="privacy">《隐私协议》
</view>
</view>
</div>
<RegisterLayer v-model="showRegisterLayer" @confirm="onRegisterConfirm"/>
</div>
</template>
<style lang="less" scoped>
.page {
width: 100vw;
display: flex;
flex-direction: column;
align-items: center;
.btn-back{
position: absolute;
left: 10rpx;
top: 100rpx;
width: 60rpx;
height: 60rpx;
}
.logo-container{
width: 100vw;
display: flex;
align-items: center;
gap: 12rpx;
flex-direction: column;
background-image: linear-gradient(180deg, #F4E2B2 0%, transparent 100%);
padding-top: 350rpx;
padding-bottom: 80rpx;
.logo{
width: 176rpx;
height: 176rpx;
}
}
.content {
display: flex;
flex-direction: column;
align-items: center;
.register-button {
width: 600rpx;
height: 94rpx;
border-radius: 100rpx;
background-color: #d3a358;
color: white;
margin-top: 130rpx;
&.disabled{
background-color: #E3CC9E;
}
}
.protocol-container {
margin: 40rpx 0;
font-size: 24rpx;
display: flex;
align-items: center;
gap: 4rpx;
color: #797979;
.link {
color: #d3a358;
}
}
}
}
</style>
\ No newline at end of file
<script setup>
import { ref } from 'vue'
import checkSelectImg from './assets/check-select.png'
import checkUnselectImg from './assets/check-unselect.png'
const props = defineProps({
modelValue: {
type: Boolean,
default: false
}
})
const emit = defineEmits(['update:modelValue'])
const handleClick = () => {
emit('update:modelValue', !props.modelValue)
}
</script>
<template>
<div class="checkbox-wrapper">
<img :src="modelValue ? checkSelectImg : checkUnselectImg" class="checkbox" @click="handleClick"/>
</div>
</template>
<style scoped lang="less">
.checkbox-wrapper {
display: flex;
align-items: center;
justify-content: center;
.checkbox {
width: 22rpx;
height: 22rpx;
}
}
</style>
\ No newline at end of file
...@@ -209,6 +209,7 @@ import { showLoading, hideLoading, jump, JumpType } from '../../utils/index.js' ...@@ -209,6 +209,7 @@ import { showLoading, hideLoading, jump, JumpType } from '../../utils/index.js'
import { useXingmaLabStore } from '../../stores/xingmaLab' import { useXingmaLabStore } from '../../stores/xingmaLab'
import Xingmalabnotimepop from '../../components/xingmaLab/Xingmalabnotimepop.vue' import Xingmalabnotimepop from '../../components/xingmaLab/Xingmalabnotimepop.vue'
import md from '../../md'; import md from '../../md';
import {useUserStore} from "@/stores/user";
// 定义组件名称 // 定义组件名称
defineOptions({ defineOptions({
...@@ -223,6 +224,7 @@ const cangpinList = ref([]); ...@@ -223,6 +224,7 @@ const cangpinList = ref([]);
const shoucangList = ref([]); const shoucangList = ref([]);
const xingmaLabStore = useXingmaLabStore(); const xingmaLabStore = useXingmaLabStore();
const userStore = useUserStore();
// 弹窗显示状态 // 弹窗显示状态
const showNoTimePopup = ref(false) // 无次数弹窗 const showNoTimePopup = ref(false) // 无次数弹窗
...@@ -537,6 +539,13 @@ const switchSubTab = async (subTab) => { ...@@ -537,6 +539,13 @@ const switchSubTab = async (subTab) => {
} }
const handleBottomNavFabu = () => { const handleBottomNavFabu = () => {
if(userStore.userInfo?.memberId === "not_login"){
jump({
type: JumpType.INNER,
url: "/pages/activity/register",
})
return
}
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: "true",
......
const hosts = [
{value: 'https://guide-api.feihe.com', alias: '生产环境'},
{value: 'https://guide-api-test.feihe.com', alias: 'test环境'},
{value: 'https://guide-api-uat.feihe.com', alias: 'uat环境'},
]
const pages = [
{value: '/mini/#/page/momHome/index', alias: '妈妈爱活动'},
{value: '/mini/#/page/home/index?page_source=3', alias: '路演活动'},
]
const mpPage = 'pages/activity/index'
function joinUrlAndQs(url, qs) {
return qs
? url + (url.includes('?') ? (url.endsWith('?') ? '' : '&') : '?') + qs
: url
}
for (const page of pages) {
for (const host of hosts) {
const url = joinUrlAndQs(mpPage, `url=${encodeURIComponent(host.value + page.value)}`)
console.log(`${page.alias}-${host.alias}: ${url}`)
}
}
This diff is collapsed.
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
...@@ -37,8 +37,10 @@ export function jump({ type, url, extra = {} }) { ...@@ -37,8 +37,10 @@ export function jump({ type, url, extra = {} }) {
console.log("jumpParams:", jumpParams); console.log("jumpParams:", jumpParams);
if(extra.embedded || jumpParams.appId === 'wx4205ec55b793245e'){ // 星妈优选的小程序都为半屏拉起 if(extra.embedded || jumpParams.appId === 'wx4205ec55b793245e'){ // 星妈优选的小程序都为半屏拉起
console.log('半屏拉起', jumpParams)
uni.openEmbeddedMiniProgram(jumpParams); uni.openEmbeddedMiniProgram(jumpParams);
}else{ }else{
console.log('直接跳转', jumpParams)
uni.navigateToMiniProgram(jumpParams); uni.navigateToMiniProgram(jumpParams);
} }
break; break;
...@@ -64,7 +66,7 @@ export function formatDate(timestamp){ ...@@ -64,7 +66,7 @@ export function formatDate(timestamp){
console.error('无效的时间戳:', timestamp); console.error('无效的时间戳:', timestamp);
return ''; return '';
} }
const year = date.getFullYear() const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0') const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0') const day = String(date.getDate()).padStart(2, '0')
......
...@@ -409,6 +409,9 @@ export default { ...@@ -409,6 +409,9 @@ export default {
this.initBrandInfo(); this.initBrandInfo();
// 初始化视频上下文
this.initVideoContexts();
// 初始化曝光检测工具 // 初始化曝光检测工具
this.exposureTracker = new ExposureTracker(this); this.exposureTracker = new ExposureTracker(this);
this.exposureTracker.addExposureElements(EXPOSURE_CONFIGS); this.exposureTracker.addExposureElements(EXPOSURE_CONFIGS);
...@@ -566,9 +569,9 @@ export default { ...@@ -566,9 +569,9 @@ export default {
} }
const { productId, skuId, contentImg, contentImgLen, shareTitle, shareImg, title, link } = item; const { productId, skuId, contentImg, contentImgLen, shareTitle, shareImg, title, link } = item;
const tabName = this.productTabList[this.channelTabIndex]; const tabName = this.productTabList[this.channelTabIndex];
if (productId && skuId) { if(productId && skuId){
const url = `subPackages/shopMainProcess/product/index?productId=${productId}&skuId=${skuId}`; const url = `subPackages/shopMainProcess/product/index?productId=${productId}&skuId=${skuId}&entrySource=xmh_wechatmp_brand_profamily`;
const type = JumpType.MINI; const type = JumpType.MINI;
const extra = { const extra = {
appId: 'wx4205ec55b793245e', //星妈优选小程序 appId: 'wx4205ec55b793245e', //星妈优选小程序
...@@ -815,6 +818,25 @@ export default { ...@@ -815,6 +818,25 @@ export default {
if (this.currentPlayingVideo === 'brandVideo1') { if (this.currentPlayingVideo === 'brandVideo1') {
this.currentPlayingVideo = null; this.currentPlayingVideo = null;
} }
// 重置视频src来进行初始化
const videoId = 'brandVideo1';
if (this.videoContexts[videoId]) {
try {
// 保存原始URL
const originalUrl = this.video1Channel.videoUrl;
// 先设置为空字符串来重置
this.videoContexts[videoId].src = '';
// 延迟一小段时间后恢复原始URL,以确保重置生效
setTimeout(() => {
if (this.videoContexts[videoId]) {
this.videoContexts[videoId].src = originalUrl.indexOf('http') === 0 ? originalUrl : this.$baseUrl + originalUrl;
}
}, 100);
console.log('视频1已重置初始化');
} catch (error) {
console.error('重置视频1失败:', error);
}
}
}, },
// 视频2播放结束事件 // 视频2播放结束事件
...@@ -825,6 +847,26 @@ export default { ...@@ -825,6 +847,26 @@ export default {
if (this.currentPlayingVideo === 'brandVideo2') { if (this.currentPlayingVideo === 'brandVideo2') {
this.currentPlayingVideo = null; this.currentPlayingVideo = null;
} }
// 重置视频src来进行初始化
const videoId = 'brandVideo2';
if (this.videoContexts[videoId]) {
console.warn('视频上下文已存在:', videoId);
try {
// 保存原始URL
const originalUrl = this.video2Channel.videoUrl;
// 先设置为空字符串来重置
this.videoContexts[videoId].src = '';
// 延迟一小段时间后恢复原始URL,以确保重置生效
// setTimeout(() => {
// if (this.videoContexts[videoId]) {
// this.videoContexts[videoId].src = originalUrl.indexOf('http') === 0 ? originalUrl : this.$baseUrl + originalUrl;
// }
// }, 100);
console.log('视频2已重置初始化');
} catch (error) {
console.error('重置视频2失败:', error);
}
}
}, },
// 处理视频播放(互斥逻辑) // 处理视频播放(互斥逻辑)
......
...@@ -1439,6 +1439,7 @@ export default { ...@@ -1439,6 +1439,7 @@ export default {
color: #000; color: #000;
font-size: 36rpx; font-size: 36rpx;
width: 300rpx; width: 300rpx;
font-weight: bolder;
z-index: 2; z-index: 2;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
......
This diff is collapsed.
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
<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>
<button v-if="!cfgStatus.isRegister" type="primary" class="phone-button" open-type="getPhoneNumber" <button v-if="!cfgStatus.isRegister" type="primary" class="phone-button" @click="clickRegisterShield" />
@getphonenumber="getRealtimePhoneNumber" />
<!-- 用户信息区域 --> <!-- 用户信息区域 -->
<view class="user-info" :style="{ 'min-height': cfgStatus.showDetail ? '343rpx' : '180rpx' }"> <view class="user-info" :style="{ 'min-height': cfgStatus.showDetail ? '343rpx' : '180rpx' }">
...@@ -95,13 +94,15 @@ ...@@ -95,13 +94,15 @@
<view class="tool-container" v-if="toolList?.length > 0"> <view class="tool-container" v-if="toolList?.length > 0">
<text class="tool-title"> 工具 </text> <text class="tool-title"> 工具 </text>
<view class="tool-list"> <view class="tool-list">
<view class="tool-item" v-for="item in toolList" :key="item.title" @click="handleToolClick(item)"> <template v-for="item in toolList" :key="item.title">
<image class="tool-icon" :src="item.bgUrl?.includes('http') ? item.bgUrl : $baseUrl + item.bgUrl" <view v-if="!item.hidden" class="tool-item" @click="handleToolClick(item)">
mode="aspectFit" /> <image class="tool-icon" :src="item.bgUrl?.includes('http') ? item.bgUrl : $baseUrl + item.bgUrl"
<!-- || item.title == '产检提醒' || item.title == '喂养记录' || item.title == '生长测评' --> mode="aspectFit" />
<button v-if="(item.title == '医生问诊') && !cfgStatus.isRegister" class="tool-btn-register" type="primary" <!-- || item.title == '产检提醒' || item.title == '喂养记录' || item.title == '生长测评' -->
open-type="getPhoneNumber" @getphonenumber="getRealtimePhoneNumber" /> <button v-if="(item.title == '医生问诊') && !cfgStatus.isRegister" class="tool-btn-register" type="primary"
</view> open-type="getPhoneNumber" @getphonenumber="getRealtimePhoneNumber" />
</view>
</template>
</view> </view>
</view> </view>
...@@ -111,9 +112,8 @@ ...@@ -111,9 +112,8 @@
:autoplay="true" :circular="true" indicator-color="#dfddd9" indicator-active-color="#b27c1e" :autoplay="true" :circular="true" indicator-color="#dfddd9" indicator-active-color="#b27c1e"
:indicator-top="32"> :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" <image class="vip-active-img" :src="item?.bgUrl?.includes('http') ? item?.bgUrl : $baseUrl + `${item?.bgUrl}`"
:src="item?.bgUrl?.includes('http') ? item?.bgUrl : $baseUrl + `${item?.bgUrl}`" mode="aspectFit" mode="aspectFit" @click="handleVipActiveClick(index, item)" />
@click="handleVipActiveClick(index, item)" />
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
...@@ -204,6 +204,12 @@ const handleHot = (e) => { ...@@ -204,6 +204,12 @@ const handleHot = (e) => {
} }
}; };
function clickRegisterShield() {
jump({
type: JumpType.INNER,
url: "/pages/activity/register",
})
}
// 页面跳转 // 页面跳转
const navigateTo = (url) => { const navigateTo = (url) => {
...@@ -304,12 +310,12 @@ const handleEditProfile = (e) => { ...@@ -304,12 +310,12 @@ const handleEditProfile = (e) => {
componentContent: "资料编辑" componentContent: "资料编辑"
}) })
const type = userStore.babyInfo?.allBabyBaseInfo?.length == 0 ? "add" : "edit"; const type = userStore.babyInfo?.allBabyBaseInfo?.length ? "edit" : "add";
babyId.value = userStore.babyInfo?.allBabyBaseInfo.find(
(item) => item.selected
)?.id;
if (type === "edit") { if (type === "edit") {
babyId.value = userStore.babyInfo?.allBabyBaseInfo.find(
(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}`);
...@@ -918,7 +924,7 @@ defineExpose({}); ...@@ -918,7 +924,7 @@ defineExpose({});
.tool-title { .tool-title {
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: bolder;
color: @color-black-deep; color: @color-black-deep;
margin-left: 21rpx; margin-left: 21rpx;
} }
...@@ -964,6 +970,7 @@ defineExpose({}); ...@@ -964,6 +970,7 @@ defineExpose({});
.vip-title { .vip-title {
margin-left: 20rpx; margin-left: 20rpx;
font-weight: bolder;
} }
.vip-active-swiper { .vip-active-swiper {
......
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