Commit dc98b393 authored by jt's avatar jt

x

parents aec73058 566b24d2
......@@ -42,7 +42,7 @@
<script setup>
import { defineProps, defineEmits } from 'vue';
import { jump } from '../../utils';
import { jump, JumpType } from '../../utils';
// Props 定义
const props = defineProps({
......@@ -61,6 +61,14 @@ const props = defineProps({
prizeImage: {
type: String,
default: ''
},
prizeType: {
type: String,
default: ''
},
memberId: {
type: String,
default: ''
}
});
......@@ -85,6 +93,22 @@ const handleRecordClick = () => {
// 查看奖品按钮点击事件
const handlePrizeClick = () => {
console.log('查看奖品按钮点击');
if(props.prizeType === 'credits') {
const urlStr = 'https://mom.feihe.com/member/mine/newPointDetail?crmId={crmid}&appCode=XMH';
const url = urlStr.replace("{crmid}", props.memberId);
console.log('积分明细链接:==', url)
jump({
type: 3,
url: url
})
} else {
jump({
type: 2,
url: '/subPackages/xmhMainProcess/mine/index',
extra: { envVersion: "release", appId: "wx4205ec55b793245e"}//, embedded: true }
});
}
emit('prize');
};
</script>
......
......@@ -9,7 +9,7 @@
<!-- 邀请奖品弹窗 -->
<InvitePrizePanel :visible="globalStore.isShowInvitePrizePanel" :inviteCount="globalStore.inviteCount"
:prizeName="globalStore.prizeName" :prizeImage="globalStore.prizeImage" @close="handleCloseInvitePrizePanel"
:prizeName="globalStore.prizeName" :prizeImage="globalStore.prizeImage" :prizeType="globalStore.prizeType" :memberId="globalStore.memberId" @close="handleCloseInvitePrizePanel"
@record="handleInvitePrizePanelRecord" @prize="handleInvitePrizePanelPrize" />
<!-- 任务完成弹窗 -->
......@@ -172,6 +172,7 @@ const checkAndUpdateTaskResult = async () => {
};
onMounted(async () => {
// globalStore.isShowInvitePrizePanel = true;return
// globalStore.isShowTaskComplete = true;//?????????
//任务奖品
await checkAndUpdateTaskResult();
......@@ -190,6 +191,8 @@ onMounted(async () => {
globalStore.inviteCount = res.data?.invitedCount;
globalStore.prizeName = unclaimedPrize?.prizeName;
globalStore.prizeImage = unclaimedPrize?.prizeImageUrl;
globalStore.prizeType = unclaimedPrize?.prizeType;
globalStore.memberId = res.data?.memberId;
}
}
......
......@@ -20,9 +20,11 @@
<!-- 邀请奖品弹窗 -->
<InvitePrizePanel
:visible="isShowInvitePrizePanel"
:inviteCount="1"
:prizeName="'奖品名称奖品名称'"
:prizeImage="''"
:inviteCount="inviteCount"
:prizeName="prizeName"
:prizeImage="prizeImage"
:prizeType="prizeType"
:memberId="memberId"
@close="handleCloseInvitePrizePanel"
@record="handleInvitePrizePanelRecord"
@prize="handleInvitePrizePanelPrize"
......@@ -90,6 +92,8 @@ const isShowInvitePrizePanel = ref(false);
const inviteCount = ref(0);
const prizeName = ref('');
const prizeImage = ref('');
const prizeType = ref('');
const memberId = ref('');
// 获取邀请码和unionId
const initInviteParams = () => {
......@@ -149,6 +153,8 @@ const initPage = async () => {
//获取邀请码和奖励
const res = await integralStore.getOriginInviteHome();
memberId.value = res.data?.memberId;
console.log('res--sharepage:', res);
// const unionId = uni.getStorageSync('unionId');
......@@ -166,7 +172,8 @@ const initPage = async () => {
isShowInvitePrizePanel.value = true;
inviteCount.value = res.data?.invitedCount;
prizeName.value = unclaimedPrize?.prizeName;
prizeImage.value = res.data?.prizeImageUrl;
prizeImage.value = unclaimedPrize?.prizeImageUrl;
prizeType.value = unclaimedPrize?.prizeType;
}
if(isLogin.value) {
......@@ -338,6 +345,22 @@ const gotoIntegral = () => {
});
};
const handleCloseInvitePrizePanel = () => {
isShowInvitePrizePanel.value = false;
};
const handleInvitePrizePanelRecord = () => {
console.log('查看邀请记录');
isShowInvitePrizePanel.value = false;
// 这里可以添加跳转到邀请记录页面的逻辑
};
const handleInvitePrizePanelPrize = () => {
console.log('查看奖品');
isShowInvitePrizePanel.value = false;
// 这里可以添加跳转到奖品页面的逻辑
};
// // 分享配置
// onShareAppMessage(() => {
// return {
......
......@@ -948,7 +948,7 @@
.goods-item {
background-color: #ffffff;
position: relative;
width: 333rpx;
width: 332rpx;
height: 459rpx;
.goods-item-container {
......
......@@ -338,8 +338,7 @@
<text class="benefit_points" :class="`item-${itemIndex}`">{{ benefit.credits }}积分</text>
<!-- 兑换按钮 -->
<view class="exchange_button" :class="`item-${itemIndex}`"
@click="handleExchangeClick(benefit, index)">
<view class="exchange_button" :class="`item-${itemIndex}`">
<text class="exchange_text">兑换</text>
</view>
</template>
......@@ -390,17 +389,19 @@
<text class="title-text1">{{ goodItem?.goodsName }}</text>
</view>
<text class="price-text"><text class="num">{{
<text v-if="Number(goodItem?.urlType) !== 2" 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
class="price-text1">+</text><text class="price-text0">¥</text>{{
goodItem?.priceSale }}</text>
<text v-else-if="Number(goodItem?.priceSale)" class="price-text"><text class="num">{{
goodItem?.priceSale }}</text></text>
<text v-else-if="Number(goodItem?.credits)" class="price-text"><text class="num">{{
goodItem?.credits }}</text>积分</text> -->
<template v-else>
<text v-if="Number(goodItem?.priceMarket) && Number(goodItem?.credits)" class="num0">低至{{
goodItem?.credits }}<text class="price-text0">积分</text><text
class="price-text1">+</text><text class="price-text0">¥</text>{{
goodItem?.priceMarket/ 100 }}</text>
<text v-else-if="Number(goodItem?.priceSale)" class="price-text"><text class="num">{{
goodItem?.priceMarket / 100 }}</text></text>
<text v-else-if="Number(goodItem?.credits)" class="price-text"><text class="num">{{
goodItem?.credits }}</text>积分</text>
</template>
</view>
</view>
......
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