|
|
|
|
@ -6,12 +6,15 @@
|
|
|
|
|
<view class="memberCon">
|
|
|
|
|
<view class="topTit">
|
|
|
|
|
<text class="titInner">
|
|
|
|
|
<text class="titCon"><text class="f_blue">¥<text
|
|
|
|
|
class="f_big">{{packages.price}}</text></text>{{packages.name}}</text>
|
|
|
|
|
<text class="titCon"><text class="f_blue">
|
|
|
|
|
|
|
|
|
|
<block v-if="packages.price>0">¥<text class="f_big">{{packages.price}}</text></block>
|
|
|
|
|
<block v-else><text class="f_big">免费</text></block>
|
|
|
|
|
</text>{{packages.name}}</text>
|
|
|
|
|
<text class="line"></text>
|
|
|
|
|
</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="title flex_center">
|
|
|
|
|
<view class="title flex_center" style="display: none;">
|
|
|
|
|
<view class="i_left">
|
|
|
|
|
<image src="../../../../static/i_left.png"></image>
|
|
|
|
|
</view>
|
|
|
|
|
@ -20,12 +23,14 @@
|
|
|
|
|
<image src="../../../../static/i_right.png"></image>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="mealCol flex_start flex_wrap">
|
|
|
|
|
<view class="mealCol flex_start flex_wrap" style="display: none;">
|
|
|
|
|
|
|
|
|
|
<block v-for="(mod, i) in packages.items">
|
|
|
|
|
<view class="colInfo">
|
|
|
|
|
<view class="flex_between"><text class="colInfoText">{{mod.product_type.name}}</text><text
|
|
|
|
|
class="f_black">{{((mod.num!=""&&mod.num!=undefined)? mod.num:"1")}} {{((mod.unit!=""&&mod.unit!=undefined)? mod.unit:"次")}}</text></view>
|
|
|
|
|
<view class="flex_between" style="align-items: unset;"><text
|
|
|
|
|
class="colInfoText">{{mod.product_type.name}}</text><text
|
|
|
|
|
class="f_black">{{((mod.num!=""&&mod.num!=undefined)? mod.num:"1")}}{{((mod.unit!=""&&mod.unit!=undefined)? mod.unit:"次")}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
|
|
|
|
</view>
|
|
|
|
|
@ -34,18 +39,40 @@
|
|
|
|
|
<view class="cardOuter">
|
|
|
|
|
<view :class="cardActive" @click="cardActive">
|
|
|
|
|
|
|
|
|
|
<view class="note">{{packages.content}}</view>
|
|
|
|
|
<view class="note">
|
|
|
|
|
<u-parse :domain="domain" :html="packages.content"></u-parse>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<button class="buyNow" @click="goBuy">立即购买</button>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="shareIcon" @click="shareOpen" v-if="user_info.promotion == 1">
|
|
|
|
|
<image src="../../../../static/share.png"></image>
|
|
|
|
|
<view class="footer">
|
|
|
|
|
<view class="menuLink">
|
|
|
|
|
<navigator url="../../../../pages/home/home" open-type="switchTab">
|
|
|
|
|
<view class="menuCol">
|
|
|
|
|
<text class="iconfont icon-home"></text>
|
|
|
|
|
<text>首页</text>
|
|
|
|
|
</view>
|
|
|
|
|
</navigator>
|
|
|
|
|
<view class="menuCol" @click="shareOpen" v-if="user_info.promotion == 1">
|
|
|
|
|
<text class="iconfont icon-Share"></text>
|
|
|
|
|
<text>分享</text>
|
|
|
|
|
</view>
|
|
|
|
|
<button open-type="contact" class="menuCol" style="display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
line-height: inherit;
|
|
|
|
|
background: none;
|
|
|
|
|
padding: unset;">
|
|
|
|
|
<text class="iconfont icon-Icon_customerservice"></text>
|
|
|
|
|
<text>客服</text>
|
|
|
|
|
</button>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="buyBtn" @click="goBuy">立即购买</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<uni-popup ref="shareCode" :mask-click="true" type="bottom" class="shareBox">
|
|
|
|
|
<view class="codeOuter">
|
|
|
|
|
<view class="shareCon" @click="shareClose">
|
|
|
|
|
@ -92,7 +119,9 @@
|
|
|
|
|
sharePath: "",
|
|
|
|
|
scare: 1,
|
|
|
|
|
shareHeight: 500,
|
|
|
|
|
id: ""
|
|
|
|
|
domain: "",
|
|
|
|
|
id: "",
|
|
|
|
|
promotion_id: ""
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(option) {
|
|
|
|
|
@ -103,11 +132,21 @@
|
|
|
|
|
this.id = option.id;
|
|
|
|
|
this.getPackages();
|
|
|
|
|
}
|
|
|
|
|
const scene = decodeURIComponent(option.scene);
|
|
|
|
|
if (!weixin.isNull(scene)) {
|
|
|
|
|
console.log(scene)
|
|
|
|
|
this.id = weixin.getParam(scene, "id");
|
|
|
|
|
this.promotion_id = weixin.getParam(scene, "promotion_id");
|
|
|
|
|
uni.setStorageSync("base_promotion_id", this.promotion_id);
|
|
|
|
|
this.getPackages();
|
|
|
|
|
}
|
|
|
|
|
weixin.getOpenidInfo(info => {
|
|
|
|
|
this.user_info = info
|
|
|
|
|
}, false)
|
|
|
|
|
|
|
|
|
|
this.scare = windowWidth / 375;
|
|
|
|
|
console.log(weixin.getBaseUrl())
|
|
|
|
|
this.domain = weixin.getBaseUrl();
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
if (this.checkLogin()) {
|
|
|
|
|
@ -117,11 +156,12 @@
|
|
|
|
|
onShareAppMessage() {
|
|
|
|
|
return {
|
|
|
|
|
title: this.packages.name,
|
|
|
|
|
path: 'packages/packageBuy/pages/packageInfo/index?id='+this.id+'&promotion_id=' + this.user_info.id,
|
|
|
|
|
path: 'packages/packageBuy/pages/packageInfo/index?id=' + this.id + '&promotion_id=' + this.user_info.id,
|
|
|
|
|
imageUrl: this.img
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
shareOpen() {
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '加载中'
|
|
|
|
|
@ -138,19 +178,18 @@
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getAvatar: function() {
|
|
|
|
|
let userProfile = uni.getStorageSync('user_profile');
|
|
|
|
|
if(!weixin.isNull(userProfile)){
|
|
|
|
|
uni.getImageInfo({
|
|
|
|
|
src: userProfile.avatarUrl, // 头像
|
|
|
|
|
success: rlogo => {
|
|
|
|
|
this.imgAvatar = rlogo.path;
|
|
|
|
|
this.draw();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
this.imgAvatar="../../../../static/avatar.jpg";
|
|
|
|
|
this.draw();
|
|
|
|
|
let userProfile = uni.getStorageSync('user_profile');
|
|
|
|
|
if (!weixin.isNull(userProfile)) {
|
|
|
|
|
uni.getImageInfo({
|
|
|
|
|
src: userProfile.avatarUrl, // 头像
|
|
|
|
|
success: rlogo => {
|
|
|
|
|
this.imgAvatar = rlogo.path;
|
|
|
|
|
this.draw();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.imgAvatar = "../../../../static/avatar.jpg";
|
|
|
|
|
this.draw();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
draw: function() {
|
|
|
|
|
@ -161,7 +200,7 @@
|
|
|
|
|
method: 'GET',
|
|
|
|
|
data: {
|
|
|
|
|
path: 'packages/packageBuy/pages/packageInfo/index',
|
|
|
|
|
scene: 'id='+this.id+'&promotion_id=' + this.user_info.id
|
|
|
|
|
scene: 'id=' + this.id + '&promotion_id=' + this.user_info.id
|
|
|
|
|
},
|
|
|
|
|
success: r => {
|
|
|
|
|
if (r.data.status === 1) {
|
|
|
|
|
@ -290,8 +329,8 @@
|
|
|
|
|
if (this.checkLogin()) {
|
|
|
|
|
let package_id = this.id;
|
|
|
|
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:"../buyMember/buyMember?package_id=" + package_id
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "../buyMember/buyMember?package_id=" + package_id
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -340,7 +379,62 @@
|
|
|
|
|
padding-bottom: 160rpx;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
button::after {
|
|
|
|
|
border: none
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.footer {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 112rpx;
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
box-shadow: 0px -1rpx 0px 0px #DEDEDE;
|
|
|
|
|
padding: 0 30rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
|
|
|
|
|
.menuLink {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
align-items: center;
|
|
|
|
|
color: #333;
|
|
|
|
|
|
|
|
|
|
.menuCol {
|
|
|
|
|
margin: 0 30rpx;
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
|
|
|
|
|
text {
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.iconfont {
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
margin-bottom: 6rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.buyBtn {
|
|
|
|
|
width: 220rpx;
|
|
|
|
|
height: 72rpx;
|
|
|
|
|
background: linear-gradient(90deg, #FF7E95 0%, #FF447B 100%);
|
|
|
|
|
border-radius: 36rpx;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 72rpx;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.content {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
@ -605,7 +699,7 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mealCol {
|
|
|
|
|
.mealCol {
|
|
|
|
|
padding: 0 20rpx;
|
|
|
|
|
|
|
|
|
|
.width_453 {
|
|
|
|
|
|