Commit 21736cfc authored by 王炽's avatar 王炽

增加点击链接,修改攻略层级

parent dcc32887
...@@ -4,6 +4,3 @@ ...@@ -4,6 +4,3 @@
"requires": true, "requires": true,
"packages": {} "packages": {}
} }
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
class="banner-img" class="banner-img"
:src="$baseUrl + `integral/1001/${item?.bannerImg}`" :src="$baseUrl + `integral/1001/${item?.bannerImg}`"
mode="aspectFill" mode="aspectFill"
@click="bannerHandler(item?.url)" @click="bannerHandler(item)"
/> />
</swiper-item> </swiper-item>
</swiper> </swiper>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<view class="title-container"> <view class="title-container">
<text class="vip-title">{{`${item?.vipName}`}}</text> <text class="vip-title">{{`${item?.vipName}`}}</text>
<button <button
v-if="true || !islogin" v-if="!islogin"
type="primary" type="primary"
class="phone-button" class="phone-button"
open-type="getPhoneNumber" open-type="getPhoneNumber"
...@@ -95,46 +95,51 @@ ...@@ -95,46 +95,51 @@
:style="{ :style="{
background: `url(${$baseUrl}integral/1001/inteBarAreaBg.png) no-repeat center/contain` background: `url(${$baseUrl}integral/1001/inteBarAreaBg.png) no-repeat center/contain`
}" }"
@click="integralHandler"
> >
<!-- 第一行 --> <view class="integralClick"
<view class="header-row"> @click="integralHandler"
<view class="integral-value"> >
<text class="integral-text">积分</text> <!-- 第一行 -->
<text class="integral-total">{{ `(累计${recentAnnualPointsTotal}/${nextGradeScoreRuleMin})` }}</text> <view class="header-row">
<image <view class="integral-value">
class="next-icon" <text class="integral-text">积分</text>
:src="$baseUrl + 'integral/1001/nextLvTips.png'" <text class="integral-total">{{ `(累计${recentAnnualPointsTotal}/${nextGradeScoreRuleMin})` }}</text>
mode="aspectFit" <image
/> class="next-icon"
:src="$baseUrl + 'integral/1001/nextLvTips.png'"
mode="aspectFit"
/>
</view>
</view> </view>
<image <!-- 第二行 -->
class="strategy-icon" <view class="progress-bar1">
:src="$baseUrl + `integral/1001/${vipIntegral?.gonglue?.img}`"
mode="aspectFit"
@click="gonglueHandler"
/>
</view>
<!-- 第二行 -->
<view class="progress-bar1">
<image
:src="$baseUrl + `integral/1001/${vipIntegral?.progressBar?.barBgImg}`"
class="progress-bg1"
/>
<view class="progress-mask">
<image <image
:src="$baseUrl + `integral/1001/${vipIntegral?.progressBar?.barImg}`" :src="$baseUrl + `integral/1001/${vipIntegral?.progressBar?.barBgImg}`"
class="progress-img1" class="progress-bg1"
:style="{ transform: `translateX(${(recentAnnualPointsTotal/nextGradeScoreRuleMin)*100 -100}%)` }"
/> />
<view class="progress-mask">
<image
:src="$baseUrl + `integral/1001/${vipIntegral?.progressBar?.barImg}`"
class="progress-img1"
:style="{ transform: `translateX(${(recentAnnualPointsTotal/nextGradeScoreRuleMin)*100 -100}%)` }"
/>
</view>
</view>
<!-- 第三行 -->
<view class="info-row">
<text class="count-text">{{ `当前:${points}` }}</text>
<text class="expire-text">{{`(有${willExpiredPoints ? willExpiredPoints : 0}积分将到期)`}}</text>
</view> </view>
</view> </view>
<image
class="strategy-icon"
:src="$baseUrl + `integral/1001/${vipIntegral?.gonglue?.img}`"
mode="aspectFit"
@click="gonglueHandler"
/>
<!-- 第三行 -->
<view class="info-row">
<text class="count-text">{{ `${recentAnnualPointsTotal}/${nextGradeScoreRuleMin}` }}</text>
<text class="expire-text">{{`(有${willExpiredPoints ? willExpiredPoints : 0}积分将到期)`}}</text>
</view>
</view> </view>
</view> </view>
...@@ -145,7 +150,12 @@ ...@@ -145,7 +150,12 @@
<text class="title-text" v-if="islogin">可享 <text class="highlight">{{vipQuanyiData[Math.abs(itemIndex)].qunyiList.length}}</text> 项权益会员</text> <text class="title-text" v-if="islogin">可享 <text class="highlight">{{vipQuanyiData[Math.abs(itemIndex)].qunyiList.length}}</text> 项权益会员</text>
<text class="title-text" v-if="!islogin">最高可享 <text class="highlight">10</text> 项权益会员</text> <text class="title-text" v-if="!islogin">最高可享 <text class="highlight">10</text> 项权益会员</text>
<view class="rule-container"> <view class="rule-container">
<text class="rule-text">会员规则</text> <text
class="rule-text"
@click="vipRuleHandler"
>
会员规则
</text>
<image <image
class="rule-icon" class="rule-icon"
:src="$baseUrl + 'integral/1001/integralArrow.png'" :src="$baseUrl + 'integral/1001/integralArrow.png'"
...@@ -352,17 +362,21 @@ ...@@ -352,17 +362,21 @@
{ {
bannerImg:"integralBannerBg0.png", bannerImg:"integralBannerBg0.png",
url:"subPackages/shopMainList/topicNew/index?id=1000916", url:"subPackages/shopMainList/topicNew/index?id=1000916",
type:0 type:2,
extra:
{
appId: "wx4205ec55b793245e"
}
}, },
{ {
bannerImg:"integralBannerBg1.png", bannerImg:"integralBannerBg1.png",
url:"", url:"",
type:1 type:0
}, },
{ {
bannerImg:"integralBannerBg2.png", bannerImg:"integralBannerBg2.png",
url:"", url:"",
type:2 type:0
} }
], ],
viplv: { viplv: {
...@@ -376,8 +390,8 @@ ...@@ -376,8 +390,8 @@
}, },
vipIntegral: { vipIntegral: {
gonglue:{ gonglue:{
url:"https://mom.feihe.com/member/mine/newIntegralRule", url:"https://mom.feihe.com/member/mine/pointStrategy",
type:0, type:3,
img:"strategyBtn.png" img:"strategyBtn.png"
}, },
progressBar:{ progressBar:{
...@@ -385,16 +399,28 @@ ...@@ -385,16 +399,28 @@
barBgImg:"progressBarBgIntegral.png" barBgImg:"progressBarBgIntegral.png"
}, },
excharge:{ excharge:{
url:"subPackages/shopMainList/topicNew/index?id=1000187",//1000187??? url:"subPackages/shopMainList/topicNew/index?id=1000187",
type:1, type:2,
img:"integralExchargeBtn.png" img:"integralExchargeBtn.png",
extra:
{
appId: "wx4205ec55b793245e"
}
}, },
integralDetail:{ integralDetail:{
url:"https://mom.feihe.com/member/mine/newPointDetail?crmId={crmid}&appCode=XMH",//crmid????????? url:"subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot",
type:2 type:2,
extra:
{
appId: "wx4205ec55b793245e"
}
} }
}, },
qunyiInfo: { qunyiInfo: {
vipRule: {
url:"https://mom.feihe.com/member/mine/pointStrategy",
type:3,
},
imgInfos: [ imgInfos: [
{ {
img: "yueyueliBtn.png", img: "yueyueliBtn.png",
...@@ -544,7 +570,9 @@ ...@@ -544,7 +570,9 @@
const tabInfo = ref({});//tabbar信息 const tabInfo = ref({});//tabbar信息
const goodsData = ref([]);//商品数据 const goodsData = ref([]);//商品数据
const imgInfos = ref([]);//权益信息 const imgInfos = ref([]);//权益信息
const vipRule = ref({});//会员规则跳转
const vipLvsQuanyi = ref([]);//会员不同等级权益 const vipLvsQuanyi = ref([]);//会员不同等级权益
const points = ref(0);//积分
const activeIndex = ref(0);//tabbar选中项 const activeIndex = ref(0);//tabbar选中项
...@@ -643,12 +671,13 @@ ...@@ -643,12 +671,13 @@
const nickName = ref(''); const nickName = ref('');
//banner点击事件 //banner点击事件
const bannerHandler = (url) => { const bannerHandler = (item) => {
// const url = swiperData.value[index].url; // const url = swiperData.value[index].url;
if(url != ""){ if(item ?.url != ""){
jump({ jump({
type: JumpType.MINI, type: item.type,
url: url url: url,
extra: item.extra
}) })
} }
console.log('bannerHandler=',url); console.log('bannerHandler=',url);
...@@ -657,14 +686,37 @@ ...@@ -657,14 +686,37 @@
//攻略点击事件 //攻略点击事件
const gonglueHandler = () => { const gonglueHandler = () => {
const url = vipIntegral.value.gonglue.url; const url = vipIntegral.value.gonglue.url;
const type = vipIntegral.value.gonglue.type;
jump({
type: type,
url: url
})
console.log('gonglueHandler') console.log('gonglueHandler')
} }
//积分详情点击事件 //积分详情点击事件---积分进度条容器
const integralHandler = () => { const integralHandler = () => {
const url = vipIntegral.value.integralDetail.url; const item = vipIntegral.value.integralDetail;
console.log('integralHandler'); if(item.url== ""){
return;
}
jump({
type: item.type,
url: item.url,
extra: item.extra
})
}
//会员规则
const vipRuleHandler = () => {
const url = vipRule.value.url;
const type = vipRule.value.type;
jump({
type: type,
url: url
})
console.log('vipRuleHandler')
} }
const handleVipActiveClick = (index, url) => { const handleVipActiveClick = (index, url) => {
...@@ -710,12 +762,17 @@ ...@@ -710,12 +762,17 @@
// #endif // #endif
} }
//积分兑换按钮点击事件
const handleExchargeClick = () => { const handleExchargeClick = () => {
const url = vipIntegral.value.excharge.url;
const type = vipIntegral.value.excharge.type;
const extra = vipIntegral.value.excharge.extra;
jump({ jump({
type: JumpType.INNER, type: type,
url: '/pages/library/ContentLibrary' url: url,
extra:extra
}) })
const url = vipIntegral.value.excharge.url;
} }
...@@ -757,7 +814,7 @@ ...@@ -757,7 +814,7 @@
}; };
// 处理注册确认 // 处理注册确认
const handleRegisterConfirm = (babyInfo) => { const handleRegisterConfirm = async (babyInfo) => {
console.log("注册确认,宝宝信息:", babyInfo); console.log("注册确认,宝宝信息:", babyInfo);
await userStore.loadMemberInfo(); await userStore.loadMemberInfo();
showRegisterLayer.value = false; showRegisterLayer.value = false;
...@@ -782,7 +839,6 @@ ...@@ -782,7 +839,6 @@
console.log('onBeforeMount'); console.log('onBeforeMount');
const {data} = await fetchIntegralJSON(); const {data} = await fetchIntegralJSON();
integralData.value = {...data}; integralData.value = {...data};
}) })
onMounted(async() => { onMounted(async() => {
...@@ -792,6 +848,7 @@ ...@@ -792,6 +848,7 @@
vipActive.value = integralData.value.vipActive; vipActive.value = integralData.value.vipActive;
tabInfo.value = integralData.value.goodsListData.tabInfo; tabInfo.value = integralData.value.goodsListData.tabInfo;
goodsData.value = integralData.value.goodsListData.goodsData; goodsData.value = integralData.value.goodsListData.goodsData;
vipRule.value = integralData.value.qunyiInfo.vipRule;
imgInfos.value = integralData.value.qunyiInfo.imgInfos; imgInfos.value = integralData.value.qunyiInfo.imgInfos;
vipQuanyiData.value = [];////?????? vipQuanyiData.value = [];////??????
vipQuanyiData.value = integralData.value.qunyiInfo.vipLvsQuanyi; vipQuanyiData.value = integralData.value.qunyiInfo.vipLvsQuanyi;
...@@ -819,6 +876,8 @@ ...@@ -819,6 +876,8 @@
willExpiredPoints.value = memberInfo.value.willExpiredPoints; willExpiredPoints.value = memberInfo.value.willExpiredPoints;
nextGradeScoreRuleMin.value = memberInfo.value.nextGradeScoreRuleMin; nextGradeScoreRuleMin.value = memberInfo.value.nextGradeScoreRuleMin;
vipLevel.value = memberInfo.value.grade; vipLevel.value = memberInfo.value.grade;
points.value = memberInfo.value.points;
if(memberInfo.value.memberId == "not_login"){ if(memberInfo.value.memberId == "not_login"){
islogin.value = false; islogin.value = false;
}else{ }else{
...@@ -1006,96 +1065,110 @@ ...@@ -1006,96 +1065,110 @@
} }
.inte-bar-area { .inte-bar-area {
position: relative;
// flex: 1; // flex: 1;
height: 144rpx; height: 144rpx;
width: 492rpx; width: 492rpx;
// background: url('@{baseUrl}integral/1001/inteBarAreaBg.png') no-repeat center/cover; // background: url('@{baseUrl}integral/1001/inteBarAreaBg.png') no-repeat center/cover;
margin-left: 16rpx; margin-left: 16rpx;
// padding: 16rpx 24rpx; // padding: 16rpx 24rpx;
.integralClick {
.header-row { height: 100%;
position: relative; width: 100%;
display: flex;
justify-content: space-between;
.integral-value{ .header-row {
background-color: #6f6d67; position: relative;
margin-left: 26rpx; display: flex;
margin-top: 23rpx; justify-content: space-between;
.integral-text {
font-size: 28rpx; .integral-value{
color: #1d1e25; background-color: #6f6d67;
margin-right: 13rpx; margin-left: 26rpx;
} margin-top: 23rpx;
.integral-total{ .integral-text {
// position: absolute; font-size: 28rpx;
font-size: 24rpx; color: #1d1e25;
color:#1d1e25 margin-right: 13rpx;
} }
.next-icon{ .integral-total{
margin-top: -60rpx; // position: absolute;
margin-left: -30rpx; font-size: 24rpx;
width: 66rpx; color:#1d1e25
height: 27rpx; }
// position: absolute; .next-icon{
margin-top: -60rpx;
margin-left: -30rpx;
width: 66rpx;
height: 27rpx;
// position: absolute;
}
} }
} }
.strategy-icon {
position: absolute;
right: 0;
top: 0rpx;
width: 96rpx;
height: 49rpx;
}
}
.progress-bar1 { .progress-bar1 {
position: relative; position: relative;
width: 444rpx; // 根据图片宽度设置 width: 444rpx; // 根据图片宽度设置
height: 14rpx; // 根据图片高度设置 height: 14rpx; // 根据图片高度设置
margin: 14rpx auto 16rpx auto; margin: 14rpx auto 16rpx auto;
.progress-bg1 { .progress-bg1 {
margin-top: 0rpx; margin-top: 0rpx;
position: absolute;
width: 444rpx;
height: 14rpx;
top: 0rpx;
left: 0rpx;
}
.progress-mask {
position: absolute;
width: 444rpx;
height: 14rpx;
overflow: hidden;
border-radius: 7rpx;
.progress-img1 {
position: absolute; position: absolute;
width: 444rpx; width: 444rpx;
height: 14rpx; height: 14rpx;
display: block; top: 0rpx;
left: 0rpx;
}
.progress-mask {
position: absolute;
width: 444rpx;
height: 14rpx;
overflow: hidden;
border-radius: 7rpx;
.progress-img1 {
position: absolute;
width: 444rpx;
height: 14rpx;
display: block;
}
} }
}
}
.info-row {
display: flex;
flex-direction: row;
position: relative;
height: 26rpx;
margin-top: 0rpx;
margin-left: 26rpx;
.count-text {
font-size: 24rpx;
color: #b27c1e;
} }
.expire-text { .info-row {
margin-left: 15rpx; display: flex;
font-size: 22rpx; flex-direction: row;
color: #6f6d67; position: relative;
height: 26rpx;
margin-top: -5rpx;
margin-left: 26rpx;
.count-text {
font-size: 26rpx;
color: #b27c1e;
}
.expire-text {
margin-top: 2rpx;
margin-left: 15rpx;
font-size: 22rpx;
color: #6f6d67;
}
} }
} }
.strategy-icon {
position: absolute;
right: 0rpx;
top: 0rpx;
width: 96rpx;
height: 49rpx;
}
} }
} }
......
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