Commit 7aa5295c authored by spc's avatar spc

Merge branch 'feihesanqi_20251014' of http://gitlab.dui88.com/fh/20250528_FHQ1...

Merge branch 'feihesanqi_20251014' of http://gitlab.dui88.com/fh/20250528_FHQ1 into feihesanqi_20251014
parents d74a8012 090f2060
<template> <template>
<view class="gongzhonghao_pop_overlay" v-if="visible" @click="handleClose"> <view class="gongzhonghao_pop_overlay" v-if="visible">
<view class="gongzhonghao_pop_container" @click.stop> <view class="gongzhonghao_pop_container">
<!-- 弹窗头部 --> <!-- 弹窗头部 -->
<view class="pop_header"> <view class="pop_header">
<text class="pop_title">{{ props.title }}</text> <text class="pop_title">{{ props.title }}</text>
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
class="qr_code_img" class="qr_code_img"
:src="props.qrCodeUrl" :src="props.qrCodeUrl"
mode="aspectFit" mode="aspectFit"
:show-menu-by-longpress="true"
/> />
</view> </view>
......
{ {"code":"000000","data":{"checkInTodo":{"checkInExtra":{"joinRecord":[{"coefficient":null,"credits":"5","index":"1","joined":false,"today":false},{"coefficient":null,"credits":"5","index":"2","joined":true,"today":true},{"coefficient":null,"credits":"6","index":"3","joined":false,"today":false},{"coefficient":null,"credits":"6","index":"4","joined":false,"today":false},{"coefficient":null,"credits":"6","index":"5","joined":false,"today":false},{"coefficient":null,"credits":"6","index":"6","joined":false,"today":false},{"coefficient":null,"credits":"6","index":"7","joined":false,"today":false}],"rule":null,"taskCode":null,"taskId":"1115","type":"CheckIn"},"id":1115,"name":"每日签到-修改"},"taskTodo":[{"id":1195,"name":"小哇演示","taskTodoExtra":{"credits":"20","desc":"小哇演示","extra":"{\"type\":\"GOODS\",\"value\":\"607028533731099656\",\"label\":\"飞鹤星飞帆1段婴儿配方奶粉一段700g(0-6月龄)JXH自营积分+现金1\",\"url\":\"#/goods/607028533731099656\",\"skuId\":\"607028533731099657\"}","icon":"https://firmus-member-test-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/manager/image/2025/10/28/xmh-mini-program_1761636548928_c8b83a5e3c4a40b5b8971f3acbd83362.png","limit":null,"sort":"1","status":"1","title":"小哇演示","type":"BROWSE_PAGE"}},{"id":1120,"name":"关注公众号","taskTodoExtra":{"credits":"10","desc":"关注公众号","extra":null,"icon":"https://firmus-member-test-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/manager/image/2025/10/19/xmh-mini-program_1760883654444_2791e90272af46f29fa07bf4ae90dd53.png","limit":null,"sort":"4","status":"1","title":"关注公众号","type":"FollowWx"}},{"id":1207,"name":"浏览test","taskTodoExtra":{"credits":"10","desc":"浏览test","extra":"{\"type\":\"SELF_GOODS\",\"value\":82,\"label\":\"飞鹤星飞帆1段婴儿配方奶粉xiaowa \",\"url\":\"#/goods/82\"}","icon":"https://firmus-member-test-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/manager/image/2025/10/28/xmh-mini-program_1761652747376_75e68bd480a34eea9ec5b693a8de65f5.png","limit":null,"sort":"10","status":"1","title":"浏览test","type":"BROWSE_PAGE"}},{"id":1127,"name":"消费任务消费任务消费任务","taskTodoExtra":{"credits":"100","desc":"消费任务副标题","extra":"[{\"itemFeaturesPayType\":\"7\",\"itemId\":\"825847777614046618\",\"pictUrl\":\"https://fh01-dev-bucket.oss-cn-beijing.aliyuncs.com/xxyx-fn_bp_bs/item-img/c9a1a676-48ce-7e9a-e7d7d0f70faa009b.jpg\",\"price\":\"100\",\"skuFeatures\":\"1\",\"skuId\":\"825847777614046619\",\"skuProperties\":\"435315499745502188:700462790409131774;435315875667965138:183166545774596244;\",\"skuStatus\":1,\"status\":1,\"storeName\":\"xgren联营店铺001分店\",\"title\":\"任相阁-黑人牙刷30支联营\"}]","icon":"https://firmus-member-test-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/manager/image/2025/10/21/xmh-mini-program_1761027269827_446aa82498834c3abb6b98126599308d.jpg","limit":null,"sort":"23","status":"3","title":"消费任务消费任务消费任务","type":"EXCHANGE_GOODS"}}]},"message":"success","ok":true,"success":true}
"ok": true, \ No newline at end of file
"success": true,
"msg": "获取签到任务成功",
"code": "200",
"data": {
"checkInTodo": {
"id": 1,
"name": "每日签到",
"checkInExtra": {
"rule": "连续签到7天可获得额外奖励",
"type": "daily_checkin",
"taskCode": "CHECKIN_001",
"taskId": "checkin_daily_001",
"joinRecord": [
{
"index": 1,
"joined": true,
"credits": 10,
"coefficient": 0,
"today": false
},
{
"index": 2,
"joined": true,
"credits": 10,
"coefficient": 0,
"today": false
},
{
"index": 3,
"joined": true,
"credits": 10,
"coefficient": 1,
"today": true
},
{
"index": 4,
"joined": false,
"credits": 10,
"coefficient": 1,
"today": false
},
{
"index": 5,
"joined": false,
"credits": 10,
"coefficient": 1,
"today": false
},
{
"index": 6,
"joined": false,
"credits": 10,
"coefficient": 1,
"today": false
},
{
"index": 7,
"joined": false,
"credits": 20,
"coefficient": 2,
"today": false
}
]
}
},
"taskTodo": [
{
"id": 1,
"name": "完善信息",
"taskTodoExtra": {
"title": "完善信息",
"sort": 1,
"credits": 20,
"type": "Perfect",
"icon": "https://course.feihe.com/momclub-picture/brandpage/v1_ip1.png",
"desc": "完善宝宝基本信息,获得个性化推荐",
"extra": "完善信息",
"status": "1"
}
},
{
"id": 3,
"name": "浏览星妈优选商城",
"taskTodoExtra": {
"title": "浏览星妈优选商城",
"sort": 3,
"credits": 20,
"type": "BROWSE_PAGE",
"icon": "https://course.feihe.com/momclub-picture/brandpage/v1_ip1.png",
"desc": "浏览星妈优选商城商品",
"extra": "浏览星妈优选商城",
"status": "1"
}
},
{
"id": 4,
"name": "完成首单优选消费",
"taskTodoExtra": {
"title": "完成首单优选消费",
"sort": 4,
"credits": 20,
"type": "EXCHANGE_GOODS",
"icon": "https://course.feihe.com/momclub-picture/brandpage/v1_ip2.png",
"desc": "在星妈优选商城完成首单消费",
"extra": "完成首单优选消费",
"status": "1"
}
},
{
"id": 5,
"name": "关注公众号",
"taskTodoExtra": {
"title": "关注公众号",
"sort": 5,
"credits": 20,
"type": "FollowWx",
"icon": "https://course.feihe.com/momclub-picture/brandpage/v1_ip2.png",
"desc": "关注星妈会官方微信公众号",
"extra": "关注公众号",
"status": "1"
}
},
{
"id": 6,
"name": "添加企业微信",
"taskTodoExtra": {
"title": "添加企业微信",
"sort": 6,
"credits": 20,
"type": "AddQw",
"icon": "https://course.feihe.com/momclub-picture/brandpage/v1_ip1.png",
"desc": "添加星妈会企业微信客服",
"extra": "添加企业微信",
"status": "1"
}
},
{
"id": 7,
"name": "注册会员",
"taskTodoExtra": {
"title": "注册会员",
"sort": 7,
"credits": 20,
"type": "Register",
"icon": "https://course.feihe.com/momclub-picture/brandpage/v1_ip1.png",
"desc": "注册星妈会会员",
"extra": "注册会员",
"status": "1"
}
}
]
}
}
\ No newline at end of file
...@@ -56,6 +56,14 @@ ...@@ -56,6 +56,14 @@
:description="gongzhonghaoDescription" :qrCodeUrl="gongzhonghaoQrCodeUrl" :description="gongzhonghaoDescription" :qrCodeUrl="gongzhonghaoQrCodeUrl"
@close="handleCloseGongzhonghaoPop" @download="handleDownloadQrCode" /> @close="handleCloseGongzhonghaoPop" @download="handleDownloadQrCode" />
<!-- 视频弹窗 -->
<view v-if="showVideo" class="video-popup1">
<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>
<button v-if="isBackApp" class="back-app" open-type="launchApp" app-parameter="wechat" @binderror="handleLaunchAppError" <button v-if="isBackApp" class="back-app" open-type="launchApp" app-parameter="wechat" @binderror="handleLaunchAppError"
:style="{ :style="{
...@@ -133,6 +141,12 @@ const gongzhonghaoTitle = ref('公众号'); ...@@ -133,6 +141,12 @@ const gongzhonghaoTitle = ref('公众号');
const gongzhonghaoDescription = ref('长按关注星妈会公众号,了解更多专业育儿资讯'); const gongzhonghaoDescription = ref('长按关注星妈会公众号,了解更多专业育儿资讯');
const gongzhonghaoQrCodeUrl = ref('https://course.feihe.com/momclub-picture/homepage/qrcode_gzh.png'); const gongzhonghaoQrCodeUrl = ref('https://course.feihe.com/momclub-picture/homepage/qrcode_gzh.png');
// 视频弹窗相关
const showVideo = ref(false);
const currentVideoUrl = ref('');
const videoWidth = ref(375);
const videoHeight = ref(210);
// 处理返回APP失败的情况 // 处理返回APP失败的情况
const handleLaunchAppError = (e) => { const handleLaunchAppError = (e) => {
...@@ -209,23 +223,28 @@ const handleCloseTaskCompleteTips = async () => { ...@@ -209,23 +223,28 @@ const handleCloseTaskCompleteTips = async () => {
}; };
// 完成任务并显示完成提示
const handleTaskComplete = async (taskIdParam) => {
taskId.value = 0;
const integralStore = useIntegralStore();
const res = await taskCompleteJSON(taskIdParam);
console.log('taskCompleteJSON res:', res);
globalStore.isShowTaskComplete = true;
globalStore.taskCompletePoints = res?.data?.actualCredits;
globalStore.taskCompleteTitle = res?.data?.taskName;
//刷新签到和任务信息
await integralStore.getSigninAndTaskInfo();
};
onShow(async () => { onShow(async () => {
console.log('onShow--index'); console.log('onShow--index');
//完成了浏览任务 //完成了浏览任务
if(taskId.value > 0) { if(taskId.value > 0) {
const integralStore = useIntegralStore(); await handleTaskComplete(taskId.value);
const res = await taskCompleteJSON(taskId.value);
console.log('taskCompleteJSON res:', res);
globalStore.isShowTaskComplete = true;
globalStore.taskCompletePoints = res?.data?.actualCredits;
globalStore.taskCompleteTitle = res?.data?.taskName;
//刷新签到和任务信息
await integralStore.getSigninAndTaskInfo();
} }
}); });
...@@ -339,7 +358,7 @@ const handleTaskClick = async (data) => { ...@@ -339,7 +358,7 @@ const handleTaskClick = async (data) => {
}); });
return; return;
} }
// data.task.taskTodoExtra.type = 'FollowWx'
taskId.value = 0; taskId.value = 0;
switch (data.task.taskTodoExtra.type) { switch (data.task.taskTodoExtra.type) {
case 'Perfect': case 'Perfect':
...@@ -354,11 +373,42 @@ const handleTaskClick = async (data) => { ...@@ -354,11 +373,42 @@ const handleTaskClick = async (data) => {
// 这里可以设置任务ID用于后续完成检测 // 这里可以设置任务ID用于后续完成检测
const extra1 = JSON.parse(data?.task?.taskTodoExtra?.extra); const extra1 = JSON.parse(data?.task?.taskTodoExtra?.extra);
console.log('extra66666:', extra1); if(extra1.type == 'VIDEO') {
jump({ showVideo.value = true;
type: JumpType.H5, currentVideoUrl.value = extra1.url;
url: extra1.url } else if(extra1.type == 'GOODS'){
}); let url = `subPackages/shopMainProcess/product/index?productId=${extra1.value}&skuId=${extra1.skuId}&entrySource=xmh_wechatmp_points_north`;
jump({
type: JumpType.MINI,
url: url,
extra: {envVersion: "release", appId: "wx4205ec55b793245e",embedded: true}
});
}else if(extra1.type == 'PAGE' || extra1.type == 'MINI_APP'){
jump({
type: JumpType.INNER,
url: extra1.url
});
}else if(extra1.type == 'MINI_APP_THIRD'){
jump({
type: JumpType.MINI,
url: extra1.url,
extra: {envVersion: "release", appId: extra1.value,embedded: true}
});
}else if(extra1.type == 'SELF_GOODS'){
jump({
type: JumpType.INNER,
url: `/v3/goodDetail/goodDetail?gid=${extra1.value}`
});
}else{
jump({
type: JumpType.H5,
url: extra1.url
});
}
// 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);
...@@ -493,6 +543,30 @@ const handleTaskPersonSubmit = (formData) => { ...@@ -493,6 +543,30 @@ const handleTaskPersonSubmit = (formData) => {
icon: 'success' icon: 'success'
}); });
}; };
// 视频弹窗相关方法
const closeVideo = async () => {
//完成了浏览任务
if(taskId.value > 0) {
await handleTaskComplete(taskId.value);
}
showVideo.value = false;
currentVideoUrl.value = '';
};
const onVideoLoadedMeta = (e) => {
const { width, height } = e.detail;
const pageWidth = uni.upx2px(750);
const ratio = height / width;
videoWidth.value = pageWidth;
videoHeight.value = pageWidth;// pageWidth * ratio;
};
const onVideoPlay = () => {
console.log('视频播放');
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -605,4 +679,31 @@ const handleTaskPersonSubmit = (formData) => { ...@@ -605,4 +679,31 @@ const handleTaskPersonSubmit = (formData) => {
.auth-phone-btn:active { .auth-phone-btn:active {
transform: scale(0.95); transform: scale(0.95);
} }
.video-popup1 {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 9999;
}
.close-btn-bottom {
margin: 32rpx auto 0 auto;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: rgba(0, 0, 0, 0.5);
color: #fff;
font-size: 44rpx;
line-height: 64rpx;
text-align: center;
z-index: 10001;
}
</style> </style>
\ No newline at end of file
...@@ -547,6 +547,8 @@ export default { ...@@ -547,6 +547,8 @@ export default {
}, },
jumpLink(_link, videoUrl, evt) { jumpLink(_link, videoUrl, evt) {
console.log('jumpLink1111111:', _link, videoUrl);
if (evt) { if (evt) {
md.sensorLog(evt); md.sensorLog(evt);
if (evt.currentTarget.dataset.comlog) { if (evt.currentTarget.dataset.comlog) {
......
...@@ -730,7 +730,7 @@ ...@@ -730,7 +730,7 @@
width: 384rpx; width: 384rpx;
height: 86rpx; height: 86rpx;
background: rgba(255, 255, 255, 0); background: rgba(255, 255, 255, 0);
border: 1px solid #e6a23c; border: 2px solid #e6a23c;
border-radius: 60rpx; border-radius: 60rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -748,6 +748,51 @@ ...@@ -748,6 +748,51 @@
&:active { &:active {
transform: scale(0.95); transform: scale(0.95);
} }
// itemIndex = 0
&.item-0 {
border-color: #503404;
.task_button_text.item-0 {
color: #503404;
}
}
// itemIndex = 1
&.item-1 {
border-color: #284A6C;
.task_button_text.item-1 {
color: #284A6C;
}
}
// itemIndex = 2
&.item-2 {
border-color: #322D6F;
.task_button_text.item-2 {
color: #322D6F;
}
}
// itemIndex = 3
&.item-3 {
border-color: #513403;
.task_button_text.item-3 {
color: #513403;
}
}
// itemIndex = 4
&.item-4 {
border-color: #F7D1A0;
.task_button_text.item-4 {
color: #F7D1A0;
}
}
} }
} }
......
...@@ -267,8 +267,8 @@ ...@@ -267,8 +267,8 @@
<text class="signin_button_text">立即签到</text> <text class="signin_button_text">立即签到</text>
</view> </view>
<!-- 已签到状态 --> <!-- 已签到状态 -->
<view v-else class="task_button" @click="handleTaskButtonClick"> <view v-else class="task_button" :class="`item-${itemIndex}`" @click="handleTaskButtonClick">
<text class="task_button_text">赚更多积分</text> <text class="task_button_text" :class="`item-${itemIndex}`">赚更多积分</text>
</view> </view>
</view> </view>
<!-- 积分限时购 --> <!-- 积分限时购 -->
...@@ -1880,9 +1880,9 @@ onMounted(async () => { ...@@ -1880,9 +1880,9 @@ onMounted(async () => {
}); });
await userStore.loadMemberInfo(); await userStore.loadMemberInfo();
await integralStore.getSigninAndTaskInfo(isdebug.value); await integralStore.getSigninAndTaskInfo();
await integralStore.getPointsBenefitCoupon(isdebug.value); await integralStore.getPointsBenefitCoupon();
//初始化签掉数据 //初始化签掉数据
...@@ -2708,12 +2708,12 @@ const handleSigninClick = async () => { ...@@ -2708,12 +2708,12 @@ const handleSigninClick = async () => {
buttonName: "立即签到", buttonName: "立即签到",
}); });
const data = await integralStore.checkIn(signinInfo.value.id, isdebug.value); const data = await integralStore.checkIn(signinInfo.value.id, );
console.log('datacheckIn=', data); console.log('datacheckIn=', data);
if (data.success) { if (data.success) {
showSignedTips.value = true; showSignedTips.value = true;
earnedPoints.value = data?.data?.credits; earnedPoints.value = data?.data?.credits;
await integralStore.getSigninAndTaskInfo(isdebug.value); await integralStore.getSigninAndTaskInfo();
console.log('5555555'); console.log('5555555');
initSignin(); initSignin();
} else { } else {
...@@ -2792,7 +2792,7 @@ const handleExchangeClick = (benefit, index) => { ...@@ -2792,7 +2792,7 @@ const handleExchangeClick = (benefit, index) => {
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: `/v3/goodDetail/goodDetail?gid=${benefit.appGoodsId}` url: `/v3/goodDetail/goodDetail?gid=${benefit.appGoodsId}&orderSubSource=resource`
}); });
// 如果有跳转链接,则跳转 // 如果有跳转链接,则跳转
// if (benefit.url) { // if (benefit.url) {
......
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