Commit c755b612 authored by jt's avatar jt

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

parents 99a3c713 25a8330b
<template> <template>
<uni-popup ref="answerPopup" type="bottom" :maskClick="false" :safe-area="true"> <uni-popup ref="answerPopup" type="bottom" :maskClick="false" :safe-area="true" :backgroundColor="'rgba(0, 0, 0, 0.5)'">
<view class="answer-popup-container"> <view class="answer-popup-container">
<view class="answer-popup"> <view class="answer-popup">
<!-- 关闭按钮 --> <!-- 关闭按钮 -->
<view class="close-btn" @tap="handleClose">×</view> <view class="close-btn" @tap="handleClose">
<image :src="`${$baseUrl}homepage/Q3Res/canEatCloseBtn.png`" mode="aspectFit"></image>
</view>
<!-- 结果标题和图标 --> <!-- 结果标题和图标 -->
<view class="result-header"> <view class="result-header">
...@@ -94,11 +96,11 @@ export default { ...@@ -94,11 +96,11 @@ export default {
// 根据fallResult或allResult字符串生成显示用的选项分布数据 // 根据fallResult或allResult字符串生成显示用的选项分布数据
displayOptionDistribution() { displayOptionDistribution() {
const labels = ['能吃', '少吃', '慎吃', '禁吃']; const labels = ['能吃', '少吃', '慎吃', '禁吃'];
// 确保所有数据都被正确记录 // 确保所有数据都被正确记录
console.log('AllResult数据:', this.allResult, '类型:', typeof this.allResult); console.log('AllResult数据:', this.allResult, '类型:', typeof this.allResult);
console.log('FallResult数据:', this.fallResult, '类型:', typeof this.fallResult); console.log('FallResult数据:', this.fallResult, '类型:', typeof this.fallResult);
// 首先检查fallResult // 首先检查fallResult
if (this.fallResult && this.fallResult !== null && this.fallResult.trim() !== '' && this.fallResult.includes('|')) { if (this.fallResult && this.fallResult !== null && this.fallResult.trim() !== '' && this.fallResult.includes('|')) {
try { try {
...@@ -112,7 +114,7 @@ export default { ...@@ -112,7 +114,7 @@ export default {
console.error('处理fallResult时出错:', error); console.error('处理fallResult时出错:', error);
} }
} }
// 然后检查allResult,使用更宽松的判断条件 // 然后检查allResult,使用更宽松的判断条件
if (this.allResult && this.allResult !== null && typeof this.allResult === 'string') { if (this.allResult && this.allResult !== null && typeof this.allResult === 'string') {
// 即使不包含|符号,也尝试处理 // 即使不包含|符号,也尝试处理
...@@ -129,7 +131,7 @@ export default { ...@@ -129,7 +131,7 @@ export default {
percentage: `${percent}%` percentage: `${percent}%`
})); }));
} }
// 最后使用默认的optionDistribution // 最后使用默认的optionDistribution
console.log('使用默认optionDistribution'); console.log('使用默认optionDistribution');
return this.optionDistribution; return this.optionDistribution;
...@@ -149,9 +151,21 @@ export default { ...@@ -149,9 +151,21 @@ export default {
}, },
methods: { methods: {
openPopup() { openPopup() {
// 禁止背景页面滚动(小程序原生方式)
wx.setPageStyle({
style: {
overflow: 'hidden'
}
});
this.$refs.answerPopup.open(); this.$refs.answerPopup.open();
}, },
closePopup() { closePopup() {
// 恢复背景页面滚动(小程序原生方式)
wx.setPageStyle({
style: {
overflow: 'auto'
}
});
if (this.$refs.answerPopup) { if (this.$refs.answerPopup) {
this.$refs.answerPopup.close(); this.$refs.answerPopup.close();
} }
...@@ -191,11 +205,15 @@ export default { ...@@ -191,11 +205,15 @@ export default {
right: 20rpx; right: 20rpx;
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
line-height: 60rpx;
text-align: center;
font-size: 40rpx;
color: #999;
z-index: 10; z-index: 10;
display: flex;
align-items: center;
justify-content: center;
}
.close-btn image {
width: 100%;
height: 100%;
} }
.result-header { .result-header {
...@@ -241,7 +259,7 @@ export default { ...@@ -241,7 +259,7 @@ export default {
.option-distribution { .option-distribution {
display: flex; display: flex;
gap: 5rpx; gap: 3rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
align-items: center; align-items: center;
width: 100%; width: 100%;
...@@ -264,18 +282,22 @@ export default { ...@@ -264,18 +282,22 @@ export default {
/* 从左到右4种颜色 - 反转顺序 */ /* 从左到右4种颜色 - 反转顺序 */
.option-bar:nth-child(1) { .option-bar:nth-child(1) {
border-radius: 50rpx 20rpx 50rpx 50rpx;
background: #D3A458; background: #D3A458;
} }
.option-bar:nth-child(2) { .option-bar:nth-child(2) {
border-radius: 20rpx 10rpx 20rpx 10rpx;
background: #B27C1E; background: #B27C1E;
} }
.option-bar:nth-child(3) { .option-bar:nth-child(3) {
border-radius: 20rpx 10rpx 20rpx 10rpx;
background: #8D5C05; background: #8D5C05;
} }
.option-bar:nth-child(4) { .option-bar:nth-child(4) {
border-radius: 20rpx 50rpx 50rpx 20rpx;
background: #644104; background: #644104;
} }
...@@ -298,8 +320,8 @@ export default { ...@@ -298,8 +320,8 @@ export default {
.question-answer-section { .question-answer-section {
background: #FFFFFF; background: #FFFFFF;
height: 164rpx; /* height: 164rpx; */
padding: 20rpx; padding: 40rpx;
border-radius: 20rpx; border-radius: 20rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
overflow-y: auto; overflow-y: auto;
...@@ -309,6 +331,7 @@ export default { ...@@ -309,6 +331,7 @@ export default {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
display: block; display: block;
font-weight: bolder;
margin-bottom: 15rpx; margin-bottom: 15rpx;
line-height: 1.6; line-height: 1.6;
} }
...@@ -317,13 +340,13 @@ export default { ...@@ -317,13 +340,13 @@ export default {
font-size: 28rpx; font-size: 28rpx;
color: #D3A358; color: #D3A358;
display: block; display: block;
font-weight: bold; /* font-weight: bold; */
} }
.analysis-section { .analysis-section {
background: #FFFFFF; background: #FFFFFF;
height: 446rpx; height: 446rpx;
padding: 20rpx; padding: 40rpx;
border-radius: 36rpx; border-radius: 36rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
overflow-y: auto; overflow-y: auto;
...@@ -331,15 +354,15 @@ export default { ...@@ -331,15 +354,15 @@ export default {
.analysis-title { .analysis-title {
font-size: 30rpx; font-size: 30rpx;
font-weight: bold; font-weight: bolder;
color: #333; color: #000;
display: block; display: block;
margin-bottom: 15rpx; margin-bottom: 15rpx;
} }
.analysis-content { .analysis-content {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #999999;
line-height: 1.8; line-height: 1.8;
white-space: pre-wrap; white-space: pre-wrap;
} }
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
</view> </view>
</view> </view>
<view class="agreement_section"> <!-- <view class="agreement_section">
<view class="agreement_checkbox"> <view class="agreement_checkbox">
<view class="checkbox" :class="{ checked: agreementChecked }" @click="agreementChecked = !agreementChecked"> <view class="checkbox" :class="{ checked: agreementChecked }" @click="agreementChecked = !agreementChecked">
<text v-if="agreementChecked" class="checkmark"></text> <text v-if="agreementChecked" class="checkmark"></text>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
data-type="member">《星妈会用户注册协议》</text><text class="agreement_link" @click="openAgreement" data-type="member">《星妈会用户注册协议》</text><text class="agreement_link" @click="openAgreement"
data-type="privacy">《星妈会隐私政策》</text></text> data-type="privacy">《星妈会隐私政策》</text></text>
</view> </view>
</view> </view> -->
<button v-if="pageStatus.btnStatus" form-type="submit" class="form_btn" :class="{ disabled: !isBtnActive }"> <button v-if="pageStatus.btnStatus" form-type="submit" class="form_btn" :class="{ disabled: !isBtnActive }">
完成 完成
......
...@@ -66,10 +66,6 @@ onMounted(() => { ...@@ -66,10 +66,6 @@ onMounted(() => {
// 去邀请按钮点击事件 // 去邀请按钮点击事件
const handleInviteClick = () => { const handleInviteClick = () => {
console.log('去邀请按钮点击'); console.log('去邀请按钮点击');
// jump({
// url: '/pages/invate/sharepage',
// type: JumpType.INNER
// });
emit('invite'); emit('invite');
}; };
......
...@@ -36,22 +36,30 @@ ...@@ -36,22 +36,30 @@
} }
.rule_list { .rule_list {
width: 100%; margin-left: 56rpx;
margin-left: 108rpx; margin-right: 56rpx;
height: 190rpx;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
.rule_date { .rule_rich_text {
font-size: 26rpx;
color: #54390D;
width: 100%; width: 100%;
display: block;
}
.rule_text { // :deep(.rule_date) {
font-size: 26rpx; // font-size: 26rpx;
color: #54390D; // color: #54390D;
// line-height: 1.5; // // line-height: 1.5;
display: block; // // margin-bottom: 12rpx;
// margin-bottom: 20rpx; // display: block;
// }
:deep(.rule_text) {
font-size: 24rpx;
color: #54390D;
// line-height: 1.8;
display: block;
// margin-bottom: 8rpx;
}
} }
} }
} }
......
...@@ -6,11 +6,7 @@ ...@@ -6,11 +6,7 @@
<text class="rule_title">任务规则</text> <text class="rule_title">任务规则</text>
<view class="rule_list"> <view class="rule_list">
<text class="rule_date">2025年4月1日签到规则升级</text> <rich-text class="rule_rich_text" :nodes="ruleContent"></rich-text>
<text class="rule_text">1. 当月连签2天后,单日签到奖励升至2分</text>
<text class="rule_text">2. 当周满签7天,额外再奖励5分</text>
<text class="rule_text">3. 断签也有机会补,邀请小伙伴帮你助力</text>
<text class="rule_text">4. 每月1号连签次数清零</text>
</view> </view>
</view> </view>
...@@ -23,7 +19,8 @@ ...@@ -23,7 +19,8 @@
</template> </template>
<script setup> <script setup>
import { defineProps, defineEmits } from 'vue'; import { defineProps, defineEmits, ref } from 'vue';
import { useIntegralStore } from '../../stores/integral';
// Props 定义 // Props 定义
const props = defineProps({ const props = defineProps({
...@@ -35,6 +32,11 @@ const props = defineProps({ ...@@ -35,6 +32,11 @@ const props = defineProps({
// Emits 定义 // Emits 定义
const emit = defineEmits(['close']); const emit = defineEmits(['close']);
const integralStore = useIntegralStore();
const ruleText = ref(integralStore.signinAndTaskInfo?.checkInTodo?.checkInExtra?.rule);
// 富文本内容字符串
const ruleContent = ref(ruleText.value ? ruleText.value : '<div class="rule_text">2025年4月1日签到规则升级</div><div class="rule_text">1. 当月连签2天后,单日签到奖励升至2分</div><div class="rule_text">2. 当周满签7天,额外再奖励5分</div><div class="rule_text">3. 断签也有机会补,邀请小伙伴帮你助力</div><div class="rule_text">4. 每月1号连签次数清零</div>');
// 关闭弹窗 // 关闭弹窗
const handleClose = () => { const handleClose = () => {
......
<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>
......
...@@ -30,17 +30,22 @@ ...@@ -30,17 +30,22 @@
z-index: 2; z-index: 2;
.tips_title { .tips_title {
font-size: 50rpx; font-size: 64rpx;
font-weight: bold; font-weight: 400rpx;
color: #ffffff; color: #ffffff;
margin-bottom: 20rpx; margin-bottom: 20rpx;
text-align: center; text-align: center;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 560rpx;
} }
.points_text { .points_text {
font-size: 32rpx; font-size: 32rpx;
color: #ffffff; color: #ffffff;
margin-bottom: 80rpx; margin-bottom: 60rpx;
text-align: center; text-align: center;
} }
...@@ -48,7 +53,7 @@ ...@@ -48,7 +53,7 @@
position: relative; position: relative;
width: 300rpx; width: 300rpx;
height: 300rpx; height: 300rpx;
margin-bottom: 90rpx; margin-bottom: 60rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -56,8 +61,8 @@ ...@@ -56,8 +61,8 @@
.task_complete_icon { .task_complete_icon {
position: absolute; position: absolute;
width: 122rpx; width: 238rpx;
height: 122rpx; height: 232rpx;
left: 50%; left: 50%;
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
...@@ -69,8 +74,8 @@ ...@@ -69,8 +74,8 @@
} }
.accept_button { .accept_button {
width: 300rpx; width: 324rpx;
height: 80rpx; height: 78rpx;
background: #D3A458; background: #D3A458;
border-radius: 40rpx; border-radius: 40rpx;
display: flex; display: flex;
...@@ -81,7 +86,7 @@ ...@@ -81,7 +86,7 @@
.accept_button_text { .accept_button_text {
font-size: 32rpx; font-size: 32rpx;
color: #ffffff; color: #ffffff;
font-weight: 500; font-weight: 400;
} }
} }
...@@ -92,14 +97,14 @@ ...@@ -92,14 +97,14 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: rgba(0, 0, 0, 0.5); background: rgba(255, 255, 255, 0.5);
.close_icon { .close_icon {
margin-top: -7rpx; margin-top: -7rpx;
margin-left: 2rpx; margin-left: 2rpx;
font-size: 40rpx; font-size: 40rpx;
color: #ffffff; color: #ffffff;
font-weight: bold; // font-weight: bold;
} }
} }
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<!-- 第三行:图片 --> <!-- 第三行:图片 -->
<view class="task_complete_icon_container"> <view class="task_complete_icon_container">
<image class="task_complete_icon" :class="{ 'task_complete_icon_animating': isAnimating }" :src="$baseUrl + `integral/1023/jifenIcon1.png`" mode="aspectFit" /> <image class="task_complete_icon" :class="{ 'task_complete_icon_animating': isAnimating }" :src="$baseUrl + `integral/1023/jifenIcon_renwu.png`" mode="aspectFit" />
</view> </view>
<!-- 第四行:开心收下按钮 --> <!-- 第四行:开心收下按钮 -->
...@@ -40,7 +40,7 @@ const props = defineProps({ ...@@ -40,7 +40,7 @@ const props = defineProps({
}, },
points: { points: {
type: Number, type: Number,
default: 100 default: 0
}, },
taskTitle: { taskTitle: {
type: String, type: String,
......
...@@ -103,14 +103,14 @@ ...@@ -103,14 +103,14 @@
</view> </view>
</view> </view>
<view class="agreement_section"> <!-- <view class="agreement_section">
<view class="agreement_checkbox"> <view class="agreement_checkbox">
<view class="checkbox" :class="{ checked: agreementChecked }" @click="toggleAgreement"> <view class="checkbox" :class="{ checked: agreementChecked }" @click="toggleAgreement">
<text v-if="agreementChecked" class="checkmark"></text> <text v-if="agreementChecked" class="checkmark"></text>
</view> </view>
<text class="agreement_text">我已阅读并同意<text class="agreement_link" @click="handleAgreementClick('member')">《星妈会用户注册协议》</text><text class="agreement_link" @click="handleAgreementClick('privacy')">《星妈会隐私政策》</text></text> <text class="agreement_text">我已阅读并同意<text class="agreement_link" @click="handleAgreementClick('member')">《星妈会用户注册协议》</text><text class="agreement_link" @click="handleAgreementClick('privacy')">《星妈会隐私政策》</text></text>
</view> </view>
</view> </view> -->
<button v-if="pageStatus.btnStatus" form-type="submit" class="form_btn" :class="{ disabled: !agreementChecked }"> <button v-if="pageStatus.btnStatus" form-type="submit" class="form_btn" :class="{ disabled: !agreementChecked }">
完成 完成
......
{ {"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="{
...@@ -68,9 +76,9 @@ ...@@ -68,9 +76,9 @@
<!-- 悬浮授权手机号模块 --> <!-- 悬浮授权手机号模块 -->
<view class="auth-phone-module" v-if="!userStore.memberInfo?.mobile"> <view class="auth-phone-module" v-if="!userStore.memberInfo?.mobile">
<image class="auth-phone-bg" :src="$baseUrl + 'homepage/Q3Res/accessBg2.png'"></image> <image class="auth-phone-bg" :src="$baseUrl + 'homepage/Q3Res/accessBg3.png'"></image>
<view class="auth-phone-btn-container"> <view class="auth-phone-btn-container">
<image class="auth-phone-btn" :src="$baseUrl + 'homepage/Q3Res/accessBtn2.png'" @tap="handleAuthPhoneClick"> <image class="auth-phone-btn" :src="$baseUrl + 'homepage/Q3Res/accessBtn3.png'" @tap="handleAuthPhoneClick">
</image> </image>
</view> </view>
</view> </view>
...@@ -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,26 @@ const handleCloseTaskCompleteTips = async () => { ...@@ -209,23 +223,26 @@ 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 +356,7 @@ const handleTaskClick = async (data) => { ...@@ -339,7 +356,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 +371,42 @@ const handleTaskClick = async (data) => { ...@@ -354,11 +371,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 +541,30 @@ const handleTaskPersonSubmit = (formData) => { ...@@ -493,6 +541,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 +677,31 @@ const handleTaskPersonSubmit = (formData) => { ...@@ -605,4 +677,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
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 2462rpx; height: 2800rpx;
.background_image { .background_image {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
// 一键领取按钮 // 一键领取按钮
.claim_button { .claim_button {
position: absolute; position: fixed;
bottom: 60rpx; bottom: 60rpx;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="sharepage_container"> <view class="sharepage_container">
<view class="background_image_container"> <view class="background_image_container">
<!-- 背景图片 --> <!-- 背景图片 -->
<image class="background_image" :src="$baseUrl + 'homepage/shareImg_jf1.jpg'" mode="aspectFit" /> <image class="background_image" :src="$baseUrl + 'homepage/shareImg_jf2.jpg'" mode="aspectFit" />
<!-- 一键领取按钮 --> <!-- 一键领取按钮 -->
<view class="claim_button" @click="handleClaim"> <view class="claim_button" @click="handleClaim">
......
This diff is collapsed.
...@@ -30,14 +30,22 @@ ...@@ -30,14 +30,22 @@
<!-- 删除确认弹窗 --> <!-- 删除确认弹窗 -->
<view v-if="showDeleteConfirm" class="modal-overlay" @tap="cancelDelete"> <view v-if="showDeleteConfirm" class="modal-overlay" @tap="cancelDelete">
<view class="modal-container" @tap.stop> <view class="modal-content" @tap.stop>
<view class="modal-title">确认删除</view> <view class="modal-title">确认删除</view>
<view class="modal-content">确定要删除该收货地址吗?</view> <view class="modal-message">确定要删除该收货地址吗?</view>
<view class="modal-buttons"> <view class="modal-buttons">
<view class="modal-cancel" @tap="cancelDelete">取消</view> <view class="modal-btn cancel-btn" @tap="cancelDelete">
<view class="modal-confirm" @tap="deleteAddress">删除</view> <image :src="$baseUrl + 'homepage/Q3Res/buyCancelBtn.png'" mode="aspectFill"></image>
</view>
<view class="modal-btn confirm-btn" @tap="deleteAddress">
<image :src="$baseUrl + 'homepage/Q3Res/buyComfirmBtn.png'" mode="aspectFill"></image>
</view>
</view> </view>
</view> </view>
<!-- 关闭按钮 -->
<view class="modal-close-btn" @tap="cancelDelete">
<image :src="$baseUrl + 'homepage/Q3Res/commonCloseBtn1.png'" mode="aspectFill"></image>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -95,7 +103,7 @@ export default { ...@@ -95,7 +103,7 @@ export default {
// 使用uni-app的全局状态来存储选中的地址 // 使用uni-app的全局状态来存储选中的地址
// 这是一种更可靠的数据传递方式 // 这是一种更可靠的数据传递方式
uni.setStorageSync('selectedAddressForSettlement', addressData); uni.setStorageSync('selectedAddressForSettlement', addressData);
console.log('存储选中的地址信息:', addressData); console.log('存储选中的地址信息:', addressData);
// 返回上一页(结算页面) // 返回上一页(结算页面)
...@@ -180,7 +188,7 @@ export default { ...@@ -180,7 +188,7 @@ export default {
addAddress() { addAddress() {
// 防连点检查 // 防连点检查
if (this.isSubmitting) return; if (this.isSubmitting) return;
// 检查地址数量限制 // 检查地址数量限制
if (this.addressList.length >= 20) { if (this.addressList.length >= 20) {
uni.showToast({ uni.showToast({
...@@ -221,7 +229,7 @@ export default { ...@@ -221,7 +229,7 @@ export default {
if (this.isSubmitting || this.currentDeleteIndex < 0) return; if (this.isSubmitting || this.currentDeleteIndex < 0) return;
this.isSubmitting = true; this.isSubmitting = true;
this.isLoading = true; this.isLoading = true;
const address = this.addressList[this.currentDeleteIndex]; const address = this.addressList[this.currentDeleteIndex];
try { try {
const response = await deleteAddress({ id: address.id }); const response = await deleteAddress({ id: address.id });
...@@ -231,7 +239,7 @@ export default { ...@@ -231,7 +239,7 @@ export default {
this.addressList.splice(this.currentDeleteIndex, 1); this.addressList.splice(this.currentDeleteIndex, 1);
uni.showToast({ uni.showToast({
title: '删除成功', title: '删除成功',
icon: 'success' icon: 'none'
}); });
} else { } else {
uni.showToast({ uni.showToast({
...@@ -485,47 +493,60 @@ export default { ...@@ -485,47 +493,60 @@ export default {
z-index: 200; z-index: 200;
} }
.modal-container { .modal-content {
width: 600rpx; width: 550rpx;
background-color: #ffffff; background-color: #ffffff;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; padding: 50rpx;
text-align: center;
} }
.modal-title { .modal-title {
text-align: center;
font-size: 34rpx; font-size: 34rpx;
font-weight: bold; font-weight: bold;
padding: 30rpx; margin-bottom: 30rpx;
border-bottom: 1rpx solid #e0e0e0; text-align: center;
} }
.modal-content { .modal-message {
text-align: center;
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
padding: 40rpx 30rpx; margin-bottom: 30rpx;
text-align: center;
} }
.modal-buttons { .modal-buttons {
display: flex; display: flex;
border-top: 1rpx solid #e0e0e0; justify-content: space-between;
gap: 30rpx;
} }
.modal-cancel, .modal-btn {
.modal-confirm { height: 78rpx;
flex: 1;
text-align: center;
padding: 30rpx;
font-size: 32rpx;
} }
.modal-cancel { .modal-btn image {
color: #666666; width: 220rpx !important;
border-right: 1rpx solid #e0e0e0; height: 78rpx !important;
}
.cancel-btn {
margin-right: 20rpx;
}
.confirm-btn {
margin-left: 20rpx;
}
.modal-close-btn {
position: absolute;
top: 30rpx;
right: 30rpx;
z-index: 201;
} }
.modal-confirm { .modal-close-btn image {
color: #ff4444; width: 40rpx;
height: 40rpx;
} }
</style> </style>
...@@ -49,18 +49,26 @@ ...@@ -49,18 +49,26 @@
<view class="detail-section"> <view class="detail-section">
<text class="detail-title">详情信息</text> <text class="detail-title">详情信息</text>
<view class="detail-banner" v-if="goodsData.goodsContent"> <view class="detail-banner" v-if="goodsData.goodsContent">
<rich-text class="banner-text" :nodes="goodsData.goodsContent"></rich-text> <rich-text style="width: 100%; /* 或设置为具体的像素值 */ overflow-x: hidden;" class="banner-text"
:nodes="formatRichText(goodsData.goodsContent)"></rich-text>
</view> </view>
</view> </view>
</view> </view>
<!-- 底部兑换按钮 --> <!-- 底部兑换按钮 -->
<view class="bottom-bar"> <view class="bottom-bar">
<button class="exchange-btn" :class="getButtonClass()" :disabled="!canExchange" @click="handleExchange"> <button class="exchange-btn" :class="getButtonClass()" @click="handleExchange">
{{ getButtonText() }} {{ getButtonText() }}
</button> </button>
</view> </view>
<!-- 悬浮客服按钮 -->
<view class="service-btn" @click="handleServiceClick">
<image class="service-icon" :src="$baseUrl + 'homepage/Q3Res/settlementCenter_serviceBtn.png'"
mode="aspectFit">
</image>
</view>
<!-- 规格选择弹窗 --> <!-- 规格选择弹窗 -->
<view class="spec-modal-overlay" v-if="showSpecModal" @click="closeSpecModal"> <view class="spec-modal-overlay" v-if="showSpecModal" @click="closeSpecModal">
<view class="spec-modal-content" @click.stop> <view class="spec-modal-content" @click.stop>
...@@ -78,7 +86,7 @@ ...@@ -78,7 +86,7 @@
</view> </view>
<view class="product-details"> <view class="product-details">
<text class="product-points">{{ goodsData.points }}{{ goodsData.creditsTypeName || '积分' <text class="product-points">{{ goodsData.points }}{{ goodsData.creditsTypeName || '积分'
}}</text> }}</text>
<text class="product-stock">库存 {{ formatCount(goodsData.exchangeCount) }}</text> <text class="product-stock">库存 {{ formatCount(goodsData.exchangeCount) }}</text>
</view> </view>
</view> </view>
...@@ -101,6 +109,8 @@ ...@@ -101,6 +109,8 @@
<text class="quantity-label">选择数量 <text class="limit-text" v-if="goodsData.goodsLimit">(限购{{ <text class="quantity-label">选择数量 <text class="limit-text" v-if="goodsData.goodsLimit">(限购{{
goodsData.goodsLimit }}件)</text></text> goodsData.goodsLimit }}件)</text></text>
<view class="quantity-selector"> <view class="quantity-selector">
<image class="quantity-bg" :src="$baseUrl + 'homepage/Q3Res/objectSelectConBg.png'"
mode="aspectFill"></image>
<view class="quantity-btn " @click="decreaseQuantity" :disabled="quantity <= 1">-</view> <view class="quantity-btn " @click="decreaseQuantity" :disabled="quantity <= 1">-</view>
<text class="quantity-value">{{ quantity }}</text> <text class="quantity-value">{{ quantity }}</text>
<view class="quantity-btn " @click="increaseQuantity" <view class="quantity-btn " @click="increaseQuantity"
...@@ -126,14 +136,18 @@ ...@@ -126,14 +136,18 @@
<view class="modal-title">兑换确认</view> <view class="modal-title">兑换确认</view>
<view class="modal-message">本次兑换需要消耗{{ goodsData.points }}{{ goodsData.creditsTypeName || '积分' }}</view> <view class="modal-message">本次兑换需要消耗{{ goodsData.points }}{{ goodsData.creditsTypeName || '积分' }}</view>
<view class="modal-buttons"> <view class="modal-buttons">
<button class="modal-btn cancel-btn" @click="closeModal">取消</button> <view class="modal-btn cancel-btn" @click="closeModal">
<button class="modal-btn confirm-btn" @click="confirmExchange">确定</button> <image :src="$baseUrl + 'homepage/Q3Res/buyCancelBtn.png'" mode="aspectFill"></image>
</view>
<view class="modal-btn confirm-btn" @click="confirmExchange">
<image :src="$baseUrl + 'homepage/Q3Res/buyComfirmBtn.png'" mode="aspectFill"></image>
</view>
</view> </view>
<view class="modal-disclaimer">{{ isPhysicalGoods() ? '已发货商品非质量问题不退不换' : '兑换完成后不退不换' }}</view> <view class="modal-disclaimer">{{ isPhysicalGoods() ? '已发货商品非质量问题不退不换' : '兑换完成后不退不换' }}</view>
</view> </view>
<!-- 关闭按钮 --> <!-- 关闭按钮 -->
<view class="modal-close-btn" @click="closeModal"> <view class="modal-close-btn" @click="closeModal">
<text class="modal-close-icon">×</text> <image :src="$baseUrl + 'homepage/Q3Res/commonCloseBtn1.png'" mode="aspectFit"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -143,6 +157,7 @@ ...@@ -143,6 +157,7 @@
import { fetchGoodsDetail, fetchSeckillDetail, fetchGoodsPrice, fetchTradeCredits, fetchSeckillTakeOrder } from '@/api/goods.js'; import { fetchGoodsDetail, fetchSeckillDetail, fetchGoodsPrice, fetchTradeCredits, fetchSeckillTakeOrder } from '@/api/goods.js';
import { useUserStore } from '@/stores/user'; import { useUserStore } from '@/stores/user';
import { jump, JumpType } from '../../utils'; import { jump, JumpType } from '../../utils';
import { useHomeStore } from '../../stores/home';
export default { export default {
data() { data() {
...@@ -345,6 +360,27 @@ export default { ...@@ -345,6 +360,27 @@ export default {
uni.navigateBack(); uni.navigateBack();
}, },
// 客服按钮点击事件
handleServiceClick() {
// 客服功能逻辑,可根据实际需求调整
console.log('客服按钮点击');
// 可以跳转到客服页面或打开客服弹窗
console.log('客服点击');
const homeStore = useHomeStore();
const {
memberId,
mobile,
openId,
unionId
} = homeStore.homeInfo;
const customerUrl =
`https://intelcc-user.icsoc.net/?channelKey=45839e0505554f8c8aea3c7b6259b049&init=1&crmld=${memberId}&mobile=${mobile}&openId=${openId}&unionId=${unionId}`;
jump({
type: JumpType.H5,
url: customerUrl
});
},
// 初始化用户状态 // 初始化用户状态
async initUserStatus() { async initUserStatus() {
// 获取用户store实例 // 获取用户store实例
...@@ -563,6 +599,23 @@ export default { ...@@ -563,6 +599,23 @@ export default {
}; };
return levelMap[memberLevelName] || 1; return levelMap[memberLevelName] || 1;
}, },
// 富文本格式化处理函数
formatRichText(html) {
let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
return match;
});
newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
return match;
});
newContent = newContent.replace(/<br[^>]*\/>/gi, '');
newContent = newContent.replace(/<img/gi, '<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"');
return newContent;
},
// 根据等级数字获取等级名称 // 根据等级数字获取等级名称
getUserLevelName(level) { getUserLevelName(level) {
...@@ -729,8 +782,14 @@ export default { ...@@ -729,8 +782,14 @@ export default {
// 处理兑换 // 处理兑换
handleExchange() { handleExchange() {
console.log('handleExchange 被调用');
console.log('登录状态:', this.cfgStatus.isRegister);
console.log('canExchange:', this.canExchange);
console.log('goodsState:', this.goodsData.goodsState);
if (!this.cfgStatus.isRegister) { if (!this.cfgStatus.isRegister) {
// 未登录,跳转到登录注册页面 // 未登录,跳转到登录注册页面
console.log('未登录,跳转到登录页面');
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/activity/register", url: "/pages/activity/register",
...@@ -738,10 +797,13 @@ export default { ...@@ -738,10 +797,13 @@ export default {
return; return;
} }
if (!this.canExchange) { if (!this.canExchange) {
console.log('不可兑换,显示提示信息');
this.showStatusMessage(); this.showStatusMessage();
return; return;
} }
console.log('可以兑换,继续执行兑换流程');
// 根据商品类型决定弹窗流程 // 根据商品类型决定弹窗流程
if (this.isPhysicalGoods()) { if (this.isPhysicalGoods()) {
// 实物商品:显示规格选择弹窗 // 实物商品:显示规格选择弹窗
...@@ -1073,7 +1135,7 @@ export default { ...@@ -1073,7 +1135,7 @@ export default {
orderId: orderData ? (orderData.orderId || orderData.orderNo || orderData.id) : '', orderId: orderData ? (orderData.orderId || orderData.orderNo || orderData.id) : '',
// 积分信息 // 积分信息
pointsValue: `${this.goodsData.points}${this.goodsData.creditsTypeName || '积分'}`, pointsValue: `${this.goodsData.points}`,
creditsTypeName: this.goodsData.creditsTypeName || '积分', creditsTypeName: this.goodsData.creditsTypeName || '积分',
// 商品信息 // 商品信息
...@@ -1134,14 +1196,15 @@ export default { ...@@ -1134,14 +1196,15 @@ export default {
min-height: 100vh; min-height: 100vh;
background-color: #f5f5f5; background-color: #f5f5f5;
box-sizing: border-box; box-sizing: border-box;
overflow-x: hidden; /* 禁止横向滚动 */ overflow-x: hidden;
/* 禁止横向滚动 */
position: relative; position: relative;
} }
/* 禁止整个页面横向滚动 */ /* 禁止整个页面横向滚动 */
page { page {
overflow-x: hidden; overflow-x: hidden;
width: 100%; width: 100%;
} }
/* 确保所有内容区域都不会超出屏幕宽度 */ /* 确保所有内容区域都不会超出屏幕宽度 */
...@@ -1203,7 +1266,7 @@ page { ...@@ -1203,7 +1266,7 @@ page {
.goods-carousel { .goods-carousel {
width: 100%; width: 100%;
height: 750rpx; height: 750rpx;
margin-bottom: 20rpx; /* margin-bottom: 20rpx; */
} }
.carousel-swiper { .carousel-swiper {
...@@ -1390,9 +1453,10 @@ page { ...@@ -1390,9 +1453,10 @@ page {
.detail-banner { .detail-banner {
width: 100%; width: 100%;
min-height: 200rpx; min-height: 200rpx;
background-color: #f8f8f8; overflow: hidden;
padding: 30rpx; /* background-color: #f8f8f8; */
border-radius: 10rpx; /* padding: 30rpx; */
/* border-radius: 10rpx; */
} }
.banner-text { .banner-text {
...@@ -1413,6 +1477,26 @@ page { ...@@ -1413,6 +1477,26 @@ page {
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1); box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
} }
/* 悬浮客服按钮 */
.service-btn {
position: fixed;
bottom: 200rpx;
right: 30rpx;
width: 96rpx;
height: 96rpx;
background-color: #d3a458;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
}
.service-icon {
width: 60rpx;
height: 60rpx;
}
.exchange-btn { .exchange-btn {
width: 100%; width: 100%;
height: 90rpx; height: 90rpx;
...@@ -1605,28 +1689,39 @@ page { ...@@ -1605,28 +1689,39 @@ page {
.quantity-selector { .quantity-selector {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
gap: 0; gap: 0;
border: 2rpx solid #A8A8A8;
border-radius: 8rpx;
padding: 0; padding: 0;
width: fit-content; position: relative;
width: 204rpx;
height: 58rpx;
margin-right: auto;
}
.quantity-bg {
position: absolute;
width: 204rpx;
height: 58rpx;
z-index: 1;
} }
.quantity-btn { .quantity-btn {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
border-right: 1rpx solid #A8A8A8; /* background-color: #F5F5F5; */
background-color: #fff; color: #333;
color: #A8A8A8; font-size: 40rpx;
font-size: 32rpx; font-weight: bold;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 2;
border-right: none;
} }
.quantity-btn:last-child { .quantity-btn:last-child {
border-right: none; /* border-right: none;
border-left: 1rpx solid #A8A8A8; border-left: 1rpx solid #A8A8A8; */
} }
.quantity-btn:disabled { .quantity-btn:disabled {
...@@ -1635,12 +1730,13 @@ page { ...@@ -1635,12 +1730,13 @@ page {
} }
.quantity-value { .quantity-value {
margin: 0 30rpx;
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #333;
font-weight: 500; min-width: 40rpx;
min-width: 80rpx;
text-align: center; text-align: center;
padding: 0 20rpx; z-index: 2;
padding: 0;
} }
/* 秒杀商品数量显示 */ /* 秒杀商品数量显示 */
...@@ -1721,13 +1817,12 @@ page { ...@@ -1721,13 +1817,12 @@ page {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 40rpx auto 0; margin: 40rpx auto 0;
background-color: #B0B0B0;
border-radius: 50%; border-radius: 50%;
} }
.modal-close-icon { .modal-close-btn {
font-size: 40rpx; width: 56rpx;
color: #fff; height: 56rpx;
} }
.modal-title { .modal-title {
...@@ -1748,30 +1843,25 @@ page { ...@@ -1748,30 +1843,25 @@ page {
.modal-buttons { .modal-buttons {
display: flex; display: flex;
gap: 20rpx; justify-content: space-between;
margin-top: 25rpx; /* gap: 30rpx; */
} }
.modal-btn { .modal-btn {
flex: 1; height: 78rpx;
height: 80rpx; }
border-radius: 40rpx;
font-size: 28rpx; .modal-btn image {
border: none; width: 220rpx !important;
display: flex; height: 78rpx !important;
align-items: center;
justify-content: center;
} }
.cancel-btn { .cancel-btn {
background-color: #fff; /* margin-right: 20rpx; */
color: #D3A458;
border: 2rpx solid #D3A458;
} }
.confirm-btn { .confirm-btn {
background-color: #D3A458; /* margin-left: 20rpx; */
color: #fff;
} }
.modal-disclaimer { .modal-disclaimer {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</view> </view>
<text class="menu-text">异业合作</text> <text class="menu-text">异业合作</text>
</view> </view>
<text class="arrow"></text> <image class="arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
<view class="menu-item" @tap="handleItemTap('feedback')"> <view class="menu-item" @tap="handleItemTap('feedback')">
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</view> </view>
<text class="menu-text">意见反馈</text> <text class="menu-text">意见反馈</text>
</view> </view>
<text class="arrow"></text> <image class="arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
<view class="menu-item" @tap="handleItemTap('userPolicy')"> <view class="menu-item" @tap="handleItemTap('userPolicy')">
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</view> </view>
<text class="menu-text">用户政策</text> <text class="menu-text">用户政策</text>
</view> </view>
<text class="arrow"></text> <image class="arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
<view class="menu-item" @tap="handleItemTap('privacyPolicy')"> <view class="menu-item" @tap="handleItemTap('privacyPolicy')">
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</view> </view>
<text class="menu-text">隐私协议</text> <text class="menu-text">隐私协议</text>
</view> </view>
<text class="arrow"></text> <image class="arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
<view class="menu-item cancel-account" @tap="handleItemTap('cancelAccount')"> <view class="menu-item cancel-account" @tap="handleItemTap('cancelAccount')">
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</view> </view>
<view class="cancel-text-container"> <view class="cancel-text-container">
<text class="cancel-text">注销后无法恢复</text> <text class="cancel-text">注销后无法恢复</text>
<text class="arrow"></text> <image class="arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
</view> </view>
</view> </view>
...@@ -219,8 +219,8 @@ export default { ...@@ -219,8 +219,8 @@ export default {
} }
.arrow { .arrow {
font-size: 40rpx; width: 14rpx;
color: #C8C8C8; height: 23rpx;
} }
/* 注销账号特殊样式 */ /* 注销账号特殊样式 */
...@@ -232,6 +232,6 @@ export default { ...@@ -232,6 +232,6 @@ export default {
.cancel-text { .cancel-text {
font-size: 26rpx; font-size: 26rpx;
color: #999999; color: #999999;
margin-right: 10rpx; margin-right: 30rpx;
} }
</style> </style>
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<view class="container"> <view class="container">
<!-- 内容区域 --> <!-- 内容区域 -->
<view class="content"> <view class="content">
<!-- 顶部背景渐变 -->
<view class="top-gradient-bg"></view>
<!-- 订单状态 --> <!-- 订单状态 -->
<view class="status-section" :class="statusClass"> <view class="status-section" :class="statusClass">
<image class="status-icon" :src="getStatusIcon()" mode="aspectFit"></image> <image class="status-icon" :src="getStatusIcon()" mode="aspectFit"></image>
...@@ -56,11 +58,21 @@ ...@@ -56,11 +58,21 @@
<view <view
v-if="orderData.virtualType === 'card' && orderData.coupon && orderData.coupon.cards && orderData.coupon.cards.length > 0 && orderData.coupon.cards[0].code" v-if="orderData.virtualType === 'card' && orderData.coupon && orderData.coupon.cards && orderData.coupon.cards.length > 0 && orderData.coupon.cards[0].code"
class="coupon-code-item"> class="coupon-code-item">
<text class="coupon-label">券码</text> <!-- 当只有code没有pwd时显示券码,否则显示卡号 -->
<text class="coupon-label">{{ orderData.coupon.cards[0].pwd ? '卡号' : '券码' }}</text>
<view class="coupon-code-content"> <view class="coupon-code-content">
<text class="coupon-code">{{ orderData.coupon.cards[0].code }}</text> <text class="coupon-code">{{ orderData.coupon.cards[0].code }}</text>
<text class="copy-btn" @click="copyCouponCode(orderData.coupon.cards[0].code)">复制</text> <text class="copy-btn" @click="copyCouponCode(orderData.coupon.cards[0].code)">复制</text>
</view> </view>
<!-- 卡密展示 - 如果存在pwd字段,换行显示 -->
<view v-if="orderData.coupon.cards[0].pwd" class="pwd-section">
<text class="coupon-label">卡密</text>
<view class="coupon-code-content">
<text class="coupon-code">{{ orderData.coupon.cards[0].pwd }}</text>
<text class="copy-btn" @click="copyCouponCode(orderData.coupon.cards[0].pwd)">复制</text>
</view>
</view>
</view> </view>
<!-- 过期时间 --> <!-- 过期时间 -->
...@@ -149,9 +161,11 @@ ...@@ -149,9 +161,11 @@
<!-- 操作按钮 - 实物订单退货按钮在右下角 --> <!-- 操作按钮 - 实物订单退货按钮在右下角 -->
<view v-if="showActionButton" class="action-container"> <view v-if="showActionButton" class="action-container">
<button class="action-btn" :class="{ <view v-if="orderData.productType === 'virtual' && orderData.virtualType === 'coupon'" class="action-btn btn-use" @click="handleAction">
<image :src="$baseUrl + 'homepage/Q3Res/orderDetailToUseBtn.png'" mode="aspectFill"></image>
</view>
<button v-else class="action-btn" :class="{
'btn-refund': orderData.productType === 'physical', 'btn-refund': orderData.productType === 'physical',
'btn-use': orderData.productType === 'virtual',
'corner-btn': orderData.productType === 'physical' 'corner-btn': orderData.productType === 'physical'
}" @click="handleAction">{{ actionButtonText }}</button> }" @click="handleAction">{{ actionButtonText }}</button>
</view> </view>
...@@ -172,14 +186,18 @@ ...@@ -172,14 +186,18 @@
<view class="modal-title">确认退货</view> <view class="modal-title">确认退货</view>
<view class="modal-message">确定要申请退货吗?</view> <view class="modal-message">确定要申请退货吗?</view>
<view class="modal-buttons"> <view class="modal-buttons">
<button class="modal-btn cancel-btn" @click="closeRefundModal">取消</button> <view class="modal-btn cancel-btn" @click="closeRefundModal">
<button class="modal-btn confirm-btn" @click="confirmRefund">确定</button> <image :src="$baseUrl + 'homepage/Q3Res/buyCancelBtn.png'" mode="aspectFill"></image>
</view>
<view class="modal-btn confirm-btn" @click="confirmRefund">
<image :src="$baseUrl + 'homepage/Q3Res/buyComfirmBtn.png'" mode="aspectFill"></image>
</view>
</view> </view>
<view class="modal-disclaimer">申请退货后将由客服进行审核处理</view> <!-- <view class="modal-disclaimer">申请退货后将由客服进行审核处理</view> -->
</view> </view>
<!-- 关闭按钮 --> <!-- 关闭按钮 -->
<view class="modal-close-btn" @click="closeRefundModal"> <view class="modal-close-btn" @click="closeRefundModal">
<text class="modal-close-icon">×</text> <image :src="$baseUrl + 'homepage/Q3Res/commonCloseBtn1.png'" mode="aspectFit"></image>
</view> </view>
</view> </view>
</template> </template>
...@@ -377,7 +395,7 @@ export default { ...@@ -377,7 +395,7 @@ export default {
// 页面跳转 // 页面跳转
navigateToCoupon: () => { navigateToCoupon: () => {
const url = 'subPackages/xmhMainProcess/mine/index'; const url = 'subPackages/shopMainProcess/coupons/couponList';
const type = JumpType.MINI; const type = JumpType.MINI;
const extra = { const extra = {
appId: 'wx4205ec55b793245e', //星妈优选小程序 appId: 'wx4205ec55b793245e', //星妈优选小程序
...@@ -749,6 +767,7 @@ export default { ...@@ -749,6 +767,7 @@ export default {
min-height: 100vh; min-height: 100vh;
background-color: #f5f5f5; background-color: #f5f5f5;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden;
} }
/* 内容区域 */ /* 内容区域 */
...@@ -757,12 +776,21 @@ export default { ...@@ -757,12 +776,21 @@ export default {
box-sizing: border-box; box-sizing: border-box;
} }
/* 顶部背景渐变 */
.top-gradient-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 200rpx;
background: linear-gradient(180deg, #ECC990 0%, rgba(211, 164, 88, 0) 100%);
}
/* 订单状态 */ /* 订单状态 */
.status-section { .status-section {
padding: 40rpx 20rpx; padding: 20rpx 80rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background: linear-gradient(180deg, #ECC990 0%, rgba(211, 164, 88, 0) 100%);
position: relative; position: relative;
margin: 0 -20rpx; margin: 0 -20rpx;
width: calc(100% + 40rpx); width: calc(100% + 40rpx);
...@@ -807,6 +835,8 @@ export default { ...@@ -807,6 +835,8 @@ export default {
/* 收货地址 */ /* 收货地址 */
.address-section { .address-section {
z-index: 1;
position: relative;
background-color: #fff; background-color: #fff;
padding: 30rpx 20rpx; padding: 30rpx 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
...@@ -1082,8 +1112,13 @@ export default { ...@@ -1082,8 +1112,13 @@ export default {
padding: 80rpx 30rpx; padding: 80rpx 30rpx;
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1); box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
z-index: 100; z-index: 100;
/* 实物商品按钮使用flex布局,将按钮推到右侧 */ /* 虚拟商品按钮居中显示,实物商品按钮推到右侧 */
display: flex; display: flex;
justify-content: center;
}
/* 实物商品按钮容器特殊样式 */
.action-container:has(.btn-refund) {
justify-content: flex-end; justify-content: flex-end;
} }
...@@ -1094,6 +1129,7 @@ export default { ...@@ -1094,6 +1129,7 @@ export default {
border-radius: 44rpx; border-radius: 44rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
text-align: center;
} }
/* 实物商品申请退货按钮样式 - 右下角 */ /* 实物商品申请退货按钮样式 - 右下角 */
...@@ -1113,20 +1149,38 @@ export default { ...@@ -1113,20 +1149,38 @@ export default {
z-index: 101; z-index: 101;
} }
/* 去使用图片按钮样式 */
.action-btn.btn-use { .action-btn.btn-use {
background-color: #d3a458; background-color: transparent;
color: #fff;
/* 虚拟商品按钮保持在容器中 */ /* 虚拟商品按钮保持在容器中 */
position: static; position: static;
box-shadow: none; box-shadow: none;
/* 确保图片充满按钮 */
overflow: hidden;
/* 调整按钮尺寸为484*90 */
width: 484rpx;
height: 90rpx;
border-radius: 45rpx;
}
/* 去使用按钮内的图片样式 */
.action-btn.btn-use image {
width: 100%;
height: 100%;
border-radius: 45rpx;
} }
/* 券码和过期时间样式 - 现在是模块1的一部分 */ /* 券码和过期时间样式 - 现在是模块1的一部分 */
.coupon-section { .coupon-section {
/* 已迁移到module-card-code */ margin-top: 30rpx;
padding-top: 30rpx;
border-top: 1rpx solid #f0f0f0;
}
.coupon-code-item {
margin-bottom: 20rpx;
} }
.coupon-code-item,
.expire-time-item { .expire-time-item {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -1134,6 +1188,11 @@ export default { ...@@ -1134,6 +1188,11 @@ export default {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
/* 卡号和卡密之间的间距 */
.pwd-section {
margin-top: 20rpx;
}
.coupon-label { .coupon-label {
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #666;
...@@ -1185,18 +1244,15 @@ export default { ...@@ -1185,18 +1244,15 @@ export default {
.module-payment, .module-payment,
.module-order-info, .module-order-info,
.module-logistics { .module-logistics {
z-index: 1;
position: relative;
background-color: #fff; background-color: #fff;
padding: 30rpx 20rpx; padding: 30rpx 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
border-radius: 20rpx; border-radius: 20rpx;
} }
/* 券码和过期时间样式 */ /* 券码和过期时间样式 - 已在上方定义 */
.coupon-section {
margin-top: 30rpx;
padding-top: 30rpx;
border-top: 1rpx solid #f0f0f0;
}
/* 使用说明样式 - 现在是模块3 */ /* 使用说明样式 - 现在是模块3 */
.usage-instructions { .usage-instructions {
...@@ -1228,8 +1284,8 @@ export default { ...@@ -1228,8 +1284,8 @@ export default {
position: fixed; position: fixed;
bottom: 200rpx; bottom: 200rpx;
right: 30rpx; right: 30rpx;
width: 120rpx; width: 96rpx;
height: 120rpx; height: 96rpx;
background-color: #d3a458; background-color: #d3a458;
border-radius: 50%; border-radius: 50%;
display: flex; display: flex;
...@@ -1255,6 +1311,7 @@ export default { ...@@ -1255,6 +1311,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 9999; z-index: 9999;
flex-direction: column;
} }
.modal-content { .modal-content {
...@@ -1289,23 +1346,20 @@ export default { ...@@ -1289,23 +1346,20 @@ export default {
} }
.modal-btn { .modal-btn {
flex: 1; height: 78rpx;
height: 88rpx; }
line-height: 88rpx;
text-align: center; .modal-btn image {
font-size: 32rpx; width: 220rpx !important;
border-radius: 44rpx; height: 78rpx !important;
border: none;
} }
.cancel-btn { .cancel-btn {
background-color: #f5f5f5; margin-right: 20rpx;
color: #666;
} }
.confirm-btn { .confirm-btn {
background-color: #d3a458; margin-left: 20rpx;
color: #fff;
} }
.modal-disclaimer { .modal-disclaimer {
...@@ -1316,18 +1370,17 @@ export default { ...@@ -1316,18 +1370,17 @@ export default {
} }
.modal-close-btn { .modal-close-btn {
position: absolute; width: 56rpx;
top: -80rpx; height: 56rpx;
right: 20rpx; border-radius: 50%;
width: 60rpx;
height: 60rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-top: 80rpx;
} }
.modal-close-icon { .modal-close-btn {
font-size: 60rpx; width: 56rpx;
color: #fff; height: 56rpx;
} }
</style> </style>
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
<view class="result-section"> <view class="result-section">
<!-- 状态图标 --> <!-- 状态图标 -->
<view class="result-icon" :class="resultIconClass"> <view class="result-icon" :class="resultIconClass">
<text class="icon-text">{{ resultIcon }}</text> <image
:src="$baseUrl + (isSuccess ? 'homepage/Q3Res/payResultSucIcon.png' : 'homepage/Q3Res/payResultFailIcon.png')"
mode="aspectFit" class="result-icon-img"></image>
</view> </view>
<!-- 状态文字 --> <!-- 状态文字 -->
...@@ -15,12 +17,12 @@ ...@@ -15,12 +17,12 @@
<!-- 成功状态显示积分信息 --> <!-- 成功状态显示积分信息 -->
<view v-if="isSuccess" class="points-info"> <view v-if="isSuccess" class="points-info">
<text class="points-value">{{ pointsValue }}</text> <text class="points-value">{{ pointsValue }}</text>
<!-- <text class="points-unit">{{ resultData.creditsTypeName || '积分' }}</text> --> <text class="points-unit">{{ resultData.creditsTypeName || '积分' }}</text>
</view> </view>
<!-- 失败状态显示失败原因 --> <!-- 失败状态显示失败原因 -->
<view v-if="!isSuccess" class="failure-info"> <view v-if="!isSuccess" class="failure-info">
<text class="failure-reason">{{ failureReason }}</text> <text class="failure-reason">失败原因:{{ failureReason }}</text>
</view> </view>
<!-- 支付方式信息 - 仅成功状态显示 --> <!-- 支付方式信息 - 仅成功状态显示 -->
...@@ -34,7 +36,11 @@ ...@@ -34,7 +36,11 @@
<!-- 底部操作按钮 --> <!-- 底部操作按钮 -->
<view class="action-section"> <view class="action-section">
<button class="action-btn" @click="handleAction">{{ actionButtonText }}</button> <view class="action-btn" @click="handleAction">
<image
:src="$baseUrl + (isSuccess ? 'homepage/Q3Res/payResultLookOrderBtn.png' : 'homepage/Q3Res/payResultBackHome.png')"
mode="aspectFit" class="action-btn-img"></image>
</view>
</view> </view>
<!-- 活动banner --> <!-- 活动banner -->
...@@ -224,7 +230,7 @@ export default { ...@@ -224,7 +230,7 @@ export default {
// 处理活动banner点击 // 处理活动banner点击
handleVipActiveClick(index, item) { handleVipActiveClick(index, item) {
console.log('活动banner点击:', item); console.log('活动banner点击:', item);
// 只保留跳转功能,从item.link获取跳转参数 // 只保留跳转功能,从item.link获取跳转参数
const url = item?.link?.url || item?.linkUrl || ''; const url = item?.link?.url || item?.linkUrl || '';
const type = item?.link?.type || (item?.linkType === 'h5' ? JumpType.H5 : JumpType.PAGE); const type = item?.link?.type || (item?.linkType === 'h5' ? JumpType.H5 : JumpType.PAGE);
...@@ -246,6 +252,7 @@ export default { ...@@ -246,6 +252,7 @@ export default {
min-height: 100vh; min-height: 100vh;
background-color: #f5f5f5; background-color: #f5f5f5;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff;
} }
...@@ -253,16 +260,18 @@ export default { ...@@ -253,16 +260,18 @@ export default {
.content { .content {
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff;
} }
/* 支付结果状态 */ /* 支付结果状态 */
.result-section { .result-section {
background-color: #fff; background-color: #fff;
padding: 80rpx 30rpx 40rpx; padding: 60rpx 30rpx 30rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
text-align: center; text-align: center;
margin-bottom: 20rpx;
} }
.result-icon { .result-icon {
...@@ -272,34 +281,42 @@ export default { ...@@ -272,34 +281,42 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-bottom: 30rpx; margin-bottom: 20rpx;
} }
.result-icon.icon-success { .result-icon.icon-success {
background-color: #d3a458; /* background-color: #d3a458; */
} }
.result-icon.icon-failure { .result-icon.icon-failure {
background-color: #d3a458; /* background-color: #d3a458; */
} }
.icon-text { .result-icon-img {
font-size: 60rpx; width: 80rpx;
color: #fff; height: 80rpx;
font-weight: bold; }
.action-btn-img {
width: 100%;
height: 88rpx;
} }
.result-text { .result-text {
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
margin-bottom: 20rpx; margin-bottom: 25rpx;
padding: 10rpx 30rpx;
border-radius: 10rpx;
} }
.points-info { .points-info {
display: flex; display: flex;
align-items: baseline; align-items: baseline;
margin-bottom: 30rpx; margin-bottom: 25rpx;
padding: 10rpx 30rpx;
border-radius: 10rpx;
} }
.points-value { .points-value {
...@@ -315,7 +332,9 @@ export default { ...@@ -315,7 +332,9 @@ export default {
} }
.failure-info { .failure-info {
margin-bottom: 30rpx; margin-bottom: 60rpx;
padding: 10rpx 30rpx;
border-radius: 10rpx;
} }
.failure-reason { .failure-reason {
...@@ -325,6 +344,9 @@ export default { ...@@ -325,6 +344,9 @@ export default {
.payment-info { .payment-info {
width: 100%; width: 100%;
padding: 10rpx 30rpx;
border-radius: 10rpx;
margin-bottom: 10rpx;
} }
.payment-row { .payment-row {
...@@ -341,13 +363,14 @@ export default { ...@@ -341,13 +363,14 @@ export default {
.payment-value { .payment-value {
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #000;
} }
/* 操作按钮区域 */ /* 操作按钮区域 */
.action-section { .action-section {
padding: 40rpx 30rpx; padding: 30rpx 30rpx;
background-color: #fff; background-color: #fff;
margin-bottom: 20rpx;
} }
.action-btn { .action-btn {
...@@ -357,8 +380,8 @@ export default { ...@@ -357,8 +380,8 @@ export default {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
background-color: #fff; background-color: #fff;
color: #333; color: #000000;
border: 1rpx solid #ddd; /* border: 2rpx solid #000000; */
} }
/* 活动banner区域 */ /* 活动banner区域 */
...@@ -383,8 +406,8 @@ export default { ...@@ -383,8 +406,8 @@ export default {
position: fixed; position: fixed;
bottom: 200rpx; bottom: 200rpx;
right: 30rpx; right: 30rpx;
width: 120rpx; width: 96rpx;
height: 120rpx; height: 96rpx;
background-color: #d3a458; background-color: #d3a458;
border-radius: 50%; border-radius: 50%;
display: flex; display: flex;
......
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
</view> </view>
</view> </view>
</view> </view>
<view class="arrow-icon">{{ ">" }}</view> <view class="arrow-icon">
<image :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFill"></image>
</view>
</view> </view>
<!-- 订单信息模块 --> <!-- 订单信息模块 -->
...@@ -91,14 +93,18 @@ ...@@ -91,14 +93,18 @@
<view class="modal-message">本次兑换需要消耗{{ goodsInfo.points * goodsInfo.quantity }}{{ goodsInfo.creditsTypeName <view class="modal-message">本次兑换需要消耗{{ goodsInfo.points * goodsInfo.quantity }}{{ goodsInfo.creditsTypeName
|| '积分' }}</view> || '积分' }}</view>
<view class="modal-buttons"> <view class="modal-buttons">
<button class="modal-btn cancel-btn" @click="closeModal">取消</button> <view class="modal-btn cancel-btn" @click="closeModal">
<button class="modal-btn confirm-btn" @click="confirmExchange">确定</button> <image :src="$baseUrl + 'homepage/Q3Res/buyCancelBtn.png'" mode="aspectFill"></image>
</view>
<view class="modal-btn confirm-btn" @click="confirmExchange">
<image :src="$baseUrl + 'homepage/Q3Res/buyComfirmBtn.png'" mode="aspectFill"></image>
</view>
</view> </view>
<view class="modal-disclaimer">{{ isPhysicalGoods() ? '已发货商品非质量问题不退不换' : '兑换完成后不退不换' }}</view> <view class="modal-disclaimer">{{ isPhysicalGoods() ? '已发货商品非质量问题不退不换' : '兑换完成后不退不换' }}</view>
</view> </view>
<!-- 关闭按钮 --> <!-- 关闭按钮 -->
<view class="modal-close-btn" @click="closeModal"> <view class="modal-close-btn" @click="closeModal">
<text class="modal-close-icon">×</text> <image :src="$baseUrl + 'homepage/Q3Res/commonCloseBtn1.png'" mode="aspectFit"></image>
</view> </view>
</view> </view>
<!-- 地址添加确认弹窗 --> <!-- 地址添加确认弹窗 -->
...@@ -107,13 +113,36 @@ ...@@ -107,13 +113,36 @@
<view class="modal-title">提示</view> <view class="modal-title">提示</view>
<view class="modal-message">您还没有收货地址,是否添加地址?</view> <view class="modal-message">您还没有收货地址,是否添加地址?</view>
<view class="modal-buttons"> <view class="modal-buttons">
<button class="modal-btn cancel-btn" @click="handleAddressCancel">取消</button> <view class="modal-btn cancel-btn" @click="handleAddressCancel">
<button class="modal-btn confirm-btn" @click="confirmAddAddress">添加地址</button> <image :src="$baseUrl + 'homepage/Q3Res/buyCancelBtn.png'" mode="aspectFill"></image>
</view>
<view class="modal-btn confirm-btn" @click="confirmAddAddress">
<image :src="$baseUrl + 'homepage/Q3Res/buyComfirmBtn.png'" mode="aspectFill"></image>
</view>
</view> </view>
</view> </view>
<!-- 关闭按钮 --> <!-- 关闭按钮 -->
<view class="modal-close-btn" @click="closeAddressModal"> <view class="modal-close-btn" @click="closeAddressModal">
<text class="modal-close-icon">×</text> <image :src="$baseUrl + 'homepage/Q3Res/commonCloseBtn1.png'" mode="aspectFit"></image>
</view>
</view>
<!-- 选择地址提示弹窗 -->
<view class="modal-overlay" v-if="showSelectAddressModal" @click="closeSelectAddressModal">
<view class="modal-content" @click.stop>
<view class="modal-title">提示</view>
<view class="modal-message">请先选择收货地址</view>
<view class="modal-buttons">
<view class="modal-btn cancel-btn" @click="closeSelectAddressModal">
<image :src="$baseUrl + 'homepage/Q3Res/buyCancelBtn.png'" mode="aspectFill"></image>
</view>
<view class="modal-btn confirm-btn" @click="handleGoSelectAddress">
<image :src="$baseUrl + 'homepage/Q3Res/buyComfirmBtn.png'" mode="aspectFill"></image>
</view>
</view>
</view>
<!-- 关闭按钮 -->
<view class="modal-close-btn" @click="closeSelectAddressModal">
<image :src="$baseUrl + 'homepage/Q3Res/commonCloseBtn1.png'" mode="aspectFit"></image>
</view> </view>
</view> </view>
</template> </template>
...@@ -126,34 +155,35 @@ import { jump, JumpType } from '../../utils'; ...@@ -126,34 +155,35 @@ import { jump, JumpType } from '../../utils';
export default { export default {
data() { data() {
return { return {
orderNotes: '', orderNotes: '',
// 订单来源子渠道 // 订单来源子渠道
orderSubSource: '', orderSubSource: '',
// 订单参数 // 订单参数
orderParams: {}, orderParams: {},
priceData: null, priceData: null,
// 地址信息 // 地址信息
selectedAddress: null, selectedAddress: null,
hasAddress: false, hasAddress: false,
fullAddress: '', fullAddress: '',
recipientName: '', recipientName: '',
recipientPhone: '', recipientPhone: '',
// 商品信息 // 商品信息
goodsInfo: { goodsInfo: {
name: '', name: '',
spec: '', spec: '',
points: 0, points: 0,
quantity: 1 quantity: 1
}, },
// 商店信息 // 商店信息
homeStore: null, homeStore: null,
// 弹窗状态 // 弹窗状态
showConfirmModal: false, showConfirmModal: false,
showAddressModal: false, showAddressModal: false,
// 用于防连点 showSelectAddressModal: false,
isSubmitting: false // 用于防连点
} isSubmitting: false
}
}, },
onLoad(options) { onLoad(options) {
console.log('结算页面参数:', options); console.log('结算页面参数:', options);
...@@ -204,8 +234,11 @@ export default { ...@@ -204,8 +234,11 @@ export default {
} }
} }
// 页面显示时重新检查地址(从地址编辑页面返回时或无选中地址时) // 只有在没有选中地址的情况下才重新检查地址
this.checkAddress(); // 这样当用户从地址选择页返回但没有选择新地址时,会保留之前已有的地址
if (!this.selectedAddress || !this.hasAddress) {
this.checkAddress();
}
// 如果已经有地址了,关闭地址弹窗 // 如果已经有地址了,关闭地址弹窗
if (this.hasAddress && this.showAddressModal) { if (this.hasAddress && this.showAddressModal) {
...@@ -312,6 +345,17 @@ export default { ...@@ -312,6 +345,17 @@ export default {
closeAddressModal() { closeAddressModal() {
this.showAddressModal = false; this.showAddressModal = false;
}, },
// 关闭选择地址提示弹窗
closeSelectAddressModal() {
this.showSelectAddressModal = false;
},
// 处理选择地址
handleGoSelectAddress() {
this.closeSelectAddressModal();
this.selectAddress();
},
// 处理地址弹窗取消 // 处理地址弹窗取消
handleAddressCancel() { handleAddressCancel() {
...@@ -360,17 +404,8 @@ export default { ...@@ -360,17 +404,8 @@ export default {
try { try {
// 检查是否有收货地址 // 检查是否有收货地址
if (!this.hasAddress || !this.selectedAddress) { if (!this.hasAddress || !this.selectedAddress) {
uni.showModal({ // 显示选择地址提示弹窗
title: '提示', this.showSelectAddressModal = true;
content: '请先选择收货地址',
confirmText: '去选择',
cancelText: '取消',
success: (res) => {
if (res.confirm) {
this.selectAddress();
}
}
});
return; return;
} }
...@@ -467,7 +502,7 @@ export default { ...@@ -467,7 +502,7 @@ export default {
orderId: orderId, orderId: orderId,
// 积分信息 // 积分信息
pointsValue: `${this.goodsInfo.points * this.goodsInfo.quantity}${this.goodsInfo.creditsTypeName}`, pointsValue: `${this.goodsInfo.points * this.goodsInfo.quantity}`,
creditsTypeName: this.goodsInfo.creditsTypeName, creditsTypeName: this.goodsInfo.creditsTypeName,
// 商品信息 // 商品信息
...@@ -539,6 +574,7 @@ export default { ...@@ -539,6 +574,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 9999; z-index: 9999;
flex-direction: column;
} }
.modal-content { .modal-content {
...@@ -570,27 +606,27 @@ export default { ...@@ -570,27 +606,27 @@ export default {
display: flex; display: flex;
gap: 20rpx; gap: 20rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
justify-content: center;
} }
.modal-btn { .modal-btn {
flex: 1; width: 220rpx !important;
height: 88rpx; height: 78rpx !important;
border-radius: 44rpx; position: relative;
font-size: 30rpx; }
line-height: 88rpx;
padding: 0; .modal-btn image {
width: 220rpx !important;
height: 78rpx !important;
} }
.cancel-btn { .cancel-btn {
background-color: #f5f5f5;
color: #666;
border: none; border: none;
} }
.confirm-btn { .confirm-btn {
background-color: #e6a23c;
color: #fff;
border: none; border: none;
margin-left: 20rpx;
} }
.modal-disclaimer { .modal-disclaimer {
...@@ -601,22 +637,16 @@ export default { ...@@ -601,22 +637,16 @@ export default {
} }
.modal-close-btn { .modal-close-btn {
position: absolute; width: 56rpx;
bottom: -100rpx; height: 56rpx;
width: 80rpx;
height: 80rpx;
background-color: #fff;
border-radius: 50%; border-radius: 50%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1); margin-top: 80rpx;
} }
.modal-close-icon {
font-size: 50rpx;
color: #999;
}
.container { .container {
width: 100%; width: 100%;
...@@ -657,6 +687,7 @@ export default { ...@@ -657,6 +687,7 @@ export default {
.address-info { .address-info {
flex: 1; flex: 1;
margin-right: 20rpx;
} }
.address-text { .address-text {
...@@ -685,8 +716,13 @@ export default { ...@@ -685,8 +716,13 @@ export default {
} }
.arrow-icon { .arrow-icon {
font-size: 32rpx; width: 20rpx;
color: #999; height: 32rpx;
}
.arrow-icon image {
width: 100%;
height: 100%;
} }
/* 订单信息模块 */ /* 订单信息模块 */
...@@ -770,7 +806,7 @@ export default { ...@@ -770,7 +806,7 @@ export default {
.product-price { .product-price {
font-size: 32rpx; font-size: 32rpx;
color: #e6a23c; color: #D3A458;
font-weight: bold; font-weight: bold;
display: inline-block; display: inline-block;
margin-right: 20rpx; margin-right: 20rpx;
...@@ -862,29 +898,29 @@ export default { ...@@ -862,29 +898,29 @@ export default {
.summary-price { .summary-price {
font-size: 28rpx; font-size: 28rpx;
color: #e6a23c; color: #D3A458;
font-weight: bold; font-weight: bold;
} }
/* 客服按钮 */ /* 客服按钮 */
.service-btn { .service-btn {
position: fixed; position: fixed;
bottom: 200rpx; bottom: 220rpx;
right: 30rpx; right: 30rpx;
width: 120rpx; width: 96rpx;
height: 120rpx; height: 96rpx;
background-color: #e6a23c; background-color: #D3A458;
border-radius: 50%; border-radius: 50%;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 100; z-index: 100;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.2);
} }
.service-icon { .service-icon {
width: 100%; width: 60rpx;
height: 100%; height: 60rpx;
} }
/* 底部提交栏 */ /* 底部提交栏 */
...@@ -894,42 +930,46 @@ export default { ...@@ -894,42 +930,46 @@ export default {
left: 0; left: 0;
right: 0; right: 0;
background-color: #fff; background-color: #fff;
padding: 20rpx 30rpx 40rpx; padding: 40rpx 20rpx 60rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1); box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: space-between;
width: 100%;
} }
.total-info { .total-info {
width: 60%;
display: flex; display: flex;
flex-direction: column; flex-direction: row;
margin-right: 20rpx;
align-items: center;
} }
.total-label { .total-label {
font-size: 24rpx; font-size: 24rpx;
color: #666; color: #666;
margin-bottom: 5rpx;
} }
.total-price { .total-price {
font-size: 32rpx; font-size: 32rpx;
color: #e6a23c; color: #D3A458;
font-weight: bold; font-weight: bold;
margin-left: 20rpx;
display: block;
} }
.submit-btn { .submit-btn {
width: 200rpx; width: 248rpx;
height: 80rpx; height: 74rpx;
background-color: #e6a23c; background-color: #D3A458;
color: #fff; color: #fff;
font-size: 28rpx; font-size: 28rpx;
border-radius: 40rpx; border-radius: 37rpx;
border: none; border: none;
display: flex; line-height: 74rpx;
align-items: center; padding: 0;
justify-content: center;
} }
.submit-btn:active { .submit-btn:active {
......
...@@ -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) {
......
...@@ -467,7 +467,7 @@ export default { ...@@ -467,7 +467,7 @@ export default {
currentQuestion: '', currentQuestion: '',
correctAnswer: '', correctAnswer: '',
answerAnalysis: '', answerAnalysis: '',
// 悬浮图片相关配置 // 悬浮图片相关配置
floatIcon: { floatIcon: {
// imageUrl: 'homepage/btnclose.png', // imageUrl: 'homepage/btnclose.png',
...@@ -1036,6 +1036,15 @@ export default { ...@@ -1036,6 +1036,15 @@ export default {
// 处理能不能吃答题 // 处理能不能吃答题
async handleCanEatAnswer(answerIndex) { async handleCanEatAnswer(answerIndex) {
// 添加登录检查
if (!this.homeStore.isLogin) {
jump({
type: JumpType.INNER,
url: "/pages/activity/register",
});
return;
}
if (!this.canEatData || !this.canEatData.id) { if (!this.canEatData || !this.canEatData.id) {
uni.showToast({ uni.showToast({
title: '数据异常,请稍后重试', title: '数据异常,请稍后重试',
...@@ -1100,21 +1109,7 @@ export default { ...@@ -1100,21 +1109,7 @@ export default {
// 显示奖励弹窗 // 显示奖励弹窗
showRewardPopup(rewardData) { showRewardPopup(rewardData) {
// 设置奖励信息 // 设置奖励信息
let rewardText = ''; let rewardText = rewardData.prizeName;
if (rewardData.credits) {
// 处理字符串格式的积分
const credits = parseInt(rewardData.credits) || 0;
if (credits > 0) {
rewardText += `${credits}`;
}
}
if (rewardData.prizeName) {
if (rewardText) {
rewardText += `${rewardData.prizeName}`;
} else {
rewardText = rewardData.prizeName;
}
}
// 根据奖品类型设置图片 // 根据奖品类型设置图片
let imageUrl = ''; let imageUrl = '';
......
...@@ -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;
}
}
} }
} }
......
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
mode="aspectFit" /> mode="aspectFit" />
</view> </view>
<text class="day_label" :class="`item-${itemIndex}`">{{ (day < todaynum && !signinStatus[day - 1]) <text class="day_label" :class="`item-${itemIndex}`">{{ (day < todaynum && !signinStatus[day - 1])
? '未签到' : `第${day}天` }}</text> ? '未签到' : getWeekdayLabel(day) }}</text>
</view> </view>
</view> </view>
...@@ -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>
<!-- 积分限时购 --> <!-- 积分限时购 -->
...@@ -381,14 +381,18 @@ ...@@ -381,14 +381,18 @@
<view class="title-container1"> <view class="title-container1">
<text class="title-text1">{{ goodItem?.goodsName }}</text> <text class="title-text1">{{ goodItem?.goodsName }}</text>
</view> </view>
<text v-if="Number(goodItem?.priceSale) && Number(goodItem?.credits)" class="num0">低至{{
<text class="price-text"><text class="num">{{
goodItem?.credits }}</text>积分</text>
<!-- <text v-if="Number(goodItem?.priceSale) && Number(goodItem?.credits)" class="num0">低至{{
goodItem?.credits }}<text class="price-text0">积分</text><text goodItem?.credits }}<text class="price-text0">积分</text><text
class="price-text1">+</text><text class="price-text0">¥</text>{{ class="price-text1">+</text><text class="price-text0">¥</text>{{
goodItem?.priceSale }}</text> goodItem?.priceSale }}</text>
<text v-else-if="Number(goodItem?.priceSale)" class="price-text"><text class="num">{{ <text v-else-if="Number(goodItem?.priceSale)" class="price-text"><text class="num">{{
goodItem?.priceSale }}</text></text> goodItem?.priceSale }}</text></text>
<text v-else-if="Number(goodItem?.credits)" class="price-text"><text class="num">{{ <text v-else-if="Number(goodItem?.credits)" class="price-text"><text class="num">{{
goodItem?.credits }}</text>积分</text> goodItem?.credits }}</text>积分</text> -->
</view> </view>
</view> </view>
...@@ -455,10 +459,10 @@ ...@@ -455,10 +459,10 @@
</view> </view>
<!-- 查看更多容器 --> <!-- 查看更多容器 -->
<view class="more-container" v-if="goodsDataArr?.length > 0" @click="handleMoreClick"> <!-- <view class="more-container" v-if="goodsDataArr?.length > 0" @click="handleMoreClick">
<text class="more-text">点击查看更多</text> <text class="more-text">点击查看更多</text>
<image class="more-arrow" :src="$baseUrl + `integral/${tupianBanben}/integralArrow.png`" mode="aspectFit" /> <image class="more-arrow" :src="$baseUrl + `integral/${tupianBanben}/integralArrow.png`" mode="aspectFit" />
</view> </view> -->
<!-- 测试注册层按钮(开发调试用) --> <!-- 测试注册层按钮(开发调试用) -->
<!-- <view class="test-register-btn" @click="showRegisterDialog" v-if="!islogin"> <!-- <view class="test-register-btn" @click="showRegisterDialog" v-if="!islogin">
...@@ -1635,6 +1639,12 @@ const getProgress = (index) => { ...@@ -1635,6 +1639,12 @@ const getProgress = (index) => {
} }
return progress; return progress;
} }
// 将天数转换为星期标签
const getWeekdayLabel = (day) => {
const weekdays = ['', '周一', '周二', '周三', '周四', '周五', '周六', '周日'];
return weekdays[day] || `第${day}天`;
}
const getColor = (type) => { const getColor = (type) => {
let colors = ''; let colors = '';
switch (type) { switch (type) {
...@@ -1880,9 +1890,9 @@ onMounted(async () => { ...@@ -1880,9 +1890,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 +2718,12 @@ const handleSigninClick = async () => { ...@@ -2708,12 +2718,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 +2802,7 @@ const handleExchangeClick = (benefit, index) => { ...@@ -2792,7 +2802,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) {
...@@ -2908,7 +2918,7 @@ const handleRecordClick = () => { ...@@ -2908,7 +2918,7 @@ const handleRecordClick = () => {
// 分享配置 // 分享配置
onShareAppMessage(() => { onShareAppMessage(() => {
return { return {
title: '积分分享', title: integralStore.originInviteHome?.data?.invitationText,
path: '/pages/invate/sharepage' + '?inviteCode=' + integralStore.originInviteHome?.data?.invitationCode, path: '/pages/invate/sharepage' + '?inviteCode=' + integralStore.originInviteHome?.data?.invitationCode,
imageUrl: integralStore.originInviteHome?.data?.invitationImageUrl || 'https://course.feihe.com/momclub-picture/integral/1023/invate_star_character1023.png' imageUrl: integralStore.originInviteHome?.data?.invitationImageUrl || 'https://course.feihe.com/momclub-picture/integral/1023/invate_star_character1023.png'
}; };
......
...@@ -103,7 +103,8 @@ ...@@ -103,7 +103,8 @@
</view> </view>
<!-- 完成任务模块 --> <!-- 完成任务模块 -->
<view class="task-module"> <view class="task-module"
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>
...@@ -145,7 +146,7 @@ ...@@ -145,7 +146,7 @@
}"> }">
<image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_myOrder.png'" mode="aspectFit" /> <image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_myOrder.png'" mode="aspectFit" />
<text class="menu-title">我的订单</text> <text class="menu-title">我的订单</text>
<text class="menu-arrow"></text> <image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
<view class="menu-item" @click="navigateToWithLogin('/v3/addressList/addressList')" :data-log="{ <view class="menu-item" @click="navigateToWithLogin('/v3/addressList/addressList')" :data-log="{
xcxClick: '我的页面点击', xcxClick: '我的页面点击',
...@@ -154,7 +155,7 @@ ...@@ -154,7 +155,7 @@
}"> }">
<image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_address.png'" mode="aspectFit" /> <image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_address.png'" mode="aspectFit" />
<text class="menu-title">收货地址管理</text> <text class="menu-title">收货地址管理</text>
<text class="menu-arrow"></text> <image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
<view class="menu-item" @click="navigateToCouponWithLogin()" :data-log="{ <view class="menu-item" @click="navigateToCouponWithLogin()" :data-log="{
xcxClick: '我的页面点击', xcxClick: '我的页面点击',
...@@ -163,7 +164,7 @@ ...@@ -163,7 +164,7 @@
}"> }">
<image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_myCupon.png'" mode="aspectFit" /> <image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_myCupon.png'" mode="aspectFit" />
<text class="menu-title">我的优惠券</text> <text class="menu-title">我的优惠券</text>
<text class="menu-arrow"></text> <image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
<view class="menu-item" @click="navigateToWithLogin('/v3/more/index')" :data-log="{ <view class="menu-item" @click="navigateToWithLogin('/v3/more/index')" :data-log="{
xcxClick: '我的页面点击', xcxClick: '我的页面点击',
...@@ -172,12 +173,12 @@ ...@@ -172,12 +173,12 @@
}"> }">
<image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_more.png'" mode="aspectFit" /> <image class="menu-icon" :src="$baseUrl + 'homepage/Q3Res/myIcon_more.png'" mode="aspectFit" />
<text class="menu-title">更多</text> <text class="menu-title">更多</text>
<text class="menu-arrow"></text> <image class="menu-arrow" :src="$baseUrl + 'homepage/Q3Res/rightArrowBtn.png'" mode="aspectFit" />
</view> </view>
</view> </view>
<!-- 协议 --> <!-- 协议 -->
<view class="protocol-container"> <!-- <view class="protocol-container">
<image :src="$baseUrl + 'my/protocol.png'" mode="aspectFit" /> <image :src="$baseUrl + 'my/protocol.png'" mode="aspectFit" />
<view class="hot-member" :data-log="{ <view class="hot-member" :data-log="{
xcxClick: '我的页面点击', xcxClick: '我的页面点击',
...@@ -189,7 +190,7 @@ ...@@ -189,7 +190,7 @@
pageName: '我的页面', pageName: '我的页面',
buttonName: '隐私协议', buttonName: '隐私协议',
}" @click="handleHot" data-type="privacy"></view> }" @click="handleHot" data-type="privacy"></view>
</view> </view> -->
<RegisterLayer v-model="showRegisterLayer" @confirm="onRegisterConfirm" /> <RegisterLayer v-model="showRegisterLayer" @confirm="onRegisterConfirm" />
</view> </view>
...@@ -210,6 +211,7 @@ ...@@ -210,6 +211,7 @@
.menu-container { .menu-container {
width: 702rpx; width: 702rpx;
margin: 0 auto; margin: 0 auto;
margin-bottom: 100rpx;
} }
.menu-item { .menu-item {
...@@ -226,7 +228,7 @@ ...@@ -226,7 +228,7 @@
.menu-icon { .menu-icon {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-right: 20rpx; margin-right: 35rpx;
} }
.menu-title { .menu-title {
...@@ -236,8 +238,8 @@ ...@@ -236,8 +238,8 @@
} }
.menu-arrow { .menu-arrow {
font-size: 24rpx; width: 14rpx;
color: #999999; height: 23rpx;
} }
/* 任务模块样式 */ /* 任务模块样式 */
...@@ -316,7 +318,7 @@ const handleTaskClick = async () => { ...@@ -316,7 +318,7 @@ const handleTaskClick = async () => {
}); });
return; return;
} }
// 已登录,正常执行任务逻辑 // 已登录,正常执行任务逻辑
await integralStore.getSigninAndTaskInfo(false); await integralStore.getSigninAndTaskInfo(false);
globalStore.showTaskPop(integralStore?.signinAndTaskInfo?.data?.taskTodo); globalStore.showTaskPop(integralStore?.signinAndTaskInfo?.data?.taskTodo);
...@@ -350,7 +352,7 @@ function clickRegisterShield() { ...@@ -350,7 +352,7 @@ function clickRegisterShield() {
// 页面跳转 // 页面跳转
const navigateToCoupon = () => { const navigateToCoupon = () => {
const url = 'subPackages/xmhMainProcess/mine/index'; const url = 'subPackages/shopMainProcess/coupons/couponList';
const type = JumpType.MINI; const type = JumpType.MINI;
const extra = { const extra = {
appId: 'wx4205ec55b793245e', //星妈优选小程序 appId: 'wx4205ec55b793245e', //星妈优选小程序
......
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