Commit d234c5de authored by 王炽's avatar 王炽

异业券点击兑换带参

parent 2b6f19fd
{ {
"ok": true, "code": "000000",
"success": true,
"msg": "获取签到任务成功",
"code": "200",
"data": { "data": {
"checkInTodo": { "checkInTodo": {
"id": 1,
"name": "每日签到",
"checkInExtra": { "checkInExtra": {
"rule": "连续签到7天可获得额外奖励",
"type": "daily_checkin",
"taskCode": "CHECKIN_001",
"taskId": "checkin_daily_001",
"joinRecord": [ "joinRecord": [
{ {
"index": 1, "coefficient": null,
"joined": true, "credits": "5",
"credits": 10, "index": "1",
"coefficient": 0, "joined": false,
"today": false "today": false
}, },
{ {
"index": 2, "coefficient": null,
"credits": "5",
"index": "2",
"joined": true, "joined": true,
"credits": 10, "today": true
"coefficient": 0,
"today": false
}, },
{ {
"index": 3, "coefficient": null,
"joined": true, "credits": "6",
"credits": 10, "index": "3",
"coefficient": 1, "joined": false,
"today": true "today": false
}, },
{ {
"index": 4, "coefficient": null,
"credits": "6",
"index": "4",
"joined": false, "joined": false,
"credits": 10,
"coefficient": 1,
"today": false "today": false
}, },
{ {
"index": 5, "coefficient": null,
"credits": "6",
"index": "5",
"joined": false, "joined": false,
"credits": 10,
"coefficient": 1,
"today": false "today": false
}, },
{ {
"index": 6, "coefficient": null,
"credits": "6",
"index": "6",
"joined": false, "joined": false,
"credits": 10,
"coefficient": 1,
"today": false "today": false
}, },
{ {
"index": 7, "coefficient": null,
"credits": "6",
"index": "7",
"joined": false, "joined": false,
"credits": 20,
"coefficient": 2,
"today": false "today": false
} }
] ],
} "rule": null,
"taskCode": null,
"taskId": "1115",
"type": "CheckIn"
},
"id": 1115,
"name": "每日签到-修改"
}, },
"taskTodo": [ "taskTodo": [
{ {
"id": 1, "id": 1195,
"name": "完善信息", "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": { "taskTodoExtra": {
"title": "浏览星妈优选商城", "credits": "20",
"sort": 3, "desc": "小哇演示",
"credits": 20, "extra": "{\"type\":\"GOODS\",\"value\":\"607028533731099656\",\"label\":\"飞鹤星飞帆1段婴儿配方奶粉一段700g(0-6月龄)JXH自营积分+现金1\",\"url\":\"#/goods/607028533731099656\",\"skuId\":\"607028533731099657\"}",
"type": "BROWSE_PAGE", "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",
"icon": "https://course.feihe.com/momclub-picture/brandpage/v1_ip1.png", "limit": null,
"desc": "浏览星妈优选商城商品", "sort": "1",
"extra": "浏览星妈优选商城", "status": "1",
"status": "1" "title": "小哇演示",
"type": "BROWSE_PAGE"
} }
}, },
{ {
"id": 4, "id": 1120,
"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": "关注公众号", "name": "关注公众号",
"taskTodoExtra": { "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": "关注公众号", "title": "关注公众号",
"sort": 5, "type": "FollowWx"
"credits": 20,
"type": "FollowWx",
"icon": "https://course.feihe.com/momclub-picture/brandpage/v1_ip2.png",
"desc": "关注星妈会官方微信公众号",
"extra": "关注公众号",
"status": "1"
} }
}, },
{ {
"id": 6, "id": 1202,
"name": "添加企业微信", "name": "浏览test",
"taskTodoExtra": { "taskTodoExtra": {
"title": "添加企业微信", "credits": "10",
"sort": 6, "desc": "浏览test",
"credits": 20, "extra": "{\"type\":\"GOODS\",\"value\":\"827000540328343497\",\"label\":\"sku图片\",\"url\":\"#/goods/827000540328343497\",\"skuId\":\"827000540332537391\"}",
"type": "AddQw", "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",
"icon": "https://course.feihe.com/momclub-picture/brandpage/v1_ip1.png", "limit": null,
"desc": "添加星妈会企业微信客服", "sort": "10",
"extra": "添加企业微信", "status": "1",
"status": "1" "title": "浏览test",
"type": "BROWSE_PAGE"
} }
}, },
{ {
"id": 7, "id": 1127,
"name": "注册会员", "name": "消费任务消费任务消费任务",
"taskTodoExtra": { "taskTodoExtra": {
"title": "注册会员", "credits": "100",
"sort": 7, "desc": "消费任务副标题",
"credits": 20, "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支联营\"}]",
"type": "Register", "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",
"icon": "https://course.feihe.com/momclub-picture/brandpage/v1_ip1.png", "limit": null,
"desc": "注册星妈会会员", "sort": "23",
"extra": "注册会员", "status": "3",
"status": "1" "title": "消费任务消费任务消费任务",
"type": "EXCHANGE_GOODS"
} }
} }
] ]
} },
"message": "success",
"ok": true,
"success": true
} }
\ 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-popup">
<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) => {
...@@ -354,6 +368,9 @@ const handleTaskClick = async (data) => { ...@@ -354,6 +368,9 @@ const handleTaskClick = async (data) => {
// 这里可以设置任务ID用于后续完成检测 // 这里可以设置任务ID用于后续完成检测
const extra1 = JSON.parse(data?.task?.taskTodoExtra?.extra); const extra1 = JSON.parse(data?.task?.taskTodoExtra?.extra);
if(extra1.type == 'VIDEO') {
}
console.log('extra66666:', extra1); console.log('extra66666:', extra1);
jump({ jump({
type: JumpType.H5, type: JumpType.H5,
...@@ -493,6 +510,24 @@ const handleTaskPersonSubmit = (formData) => { ...@@ -493,6 +510,24 @@ const handleTaskPersonSubmit = (formData) => {
icon: 'success' icon: 'success'
}); });
}; };
// 视频弹窗相关方法
const closeVideo = () => {
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 +640,31 @@ const handleTaskPersonSubmit = (formData) => { ...@@ -605,4 +640,31 @@ const handleTaskPersonSubmit = (formData) => {
.auth-phone-btn:active { .auth-phone-btn:active {
transform: scale(0.95); transform: scale(0.95);
} }
.video-popup {
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
...@@ -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