Commit fbd1c04d by 高淑倩

modify: plus_img

parent 649e30e9
......@@ -10,6 +10,10 @@ Component({
type: Array,
value: [],
},
plusBgi:{
type: Object,
value: null
}
},
/**
......
<!--component/plus/plus.wxml-->
<view class="plus-wrap" wx:if="{{skuList}}">
<scroll-view scroll-x class="scroll-view_H" scroll-with-animation="{{true}}">
<block
wx:for="{{skuList}}"
wx:for-index="idx"
wx:for-item="navItem"
wx:key="idx"
<scroll-view scroll-x class="scroll-view_H" scroll-with-animation="{{true}}">
<block
wx:for="{{skuList}}"
wx:for-index="idx"
wx:for-item="navItem"
wx:key="idx"
>
<view
class="scroll-view-item {{currentTab == idx ?'poster-active':''}}"
data-current="{{idx}}"
data-startTimeStr="{{navItem.startTimeStr}}"
data-endTimeStr="{{navItem.endTimeStr}}"
data-btnText="{{navItem.buttonText}}"
data-id="{{navItem.id}}"
bindtap="switchNav"
style="{{currentTab == idx ? 'background-image: url('+ plusBgi.activeUrl +');' : 'background-image: url('+ plusBgi.inactiveUrl +');'}}"
>
<view class="plus-choose">
<text>每月仅¥{{navItem.price / navItem.duration * 30}}</text>
</view>
<view class="card-kinds">
{{navItem.name}}
</view>
<view class="plus-price">
<text class="rmb">¥</text>
<text class="amount">{{navItem.price}}</text>
</view>
<view class="select-plus" wx:if="{{idx == currentTab}}">
<view class="circle-radio theme-color">
<image class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix" />
</view>
</view>
</view>
</block>
</scroll-view>
<view class="pay">
<button class="btn btn-primary" bindtap="payPlus">
<text>立即支付</text>
<text>¥158</text>
</button>
</view>
</view>
>
<view
class="scroll-view-item {{currentTab == idx ?'poster-active':''}}"
data-current="{{idx}}"
data-startTimeStr="{{navItem.startTimeStr}}"
data-endTimeStr="{{navItem.endTimeStr}}"
data-btnText="{{navItem.buttonText}}"
data-id="{{navItem.id}}"
bindtap="switchNav"
style="background-image:url({{navItem.coverImgUrl}})"
>
<view class="plus-choose">
<text>每月仅¥{{navItem.price / navItem.duration * 30}}</text>
</view>
<view class="card-kinds">
{{navItem.name}}
</view>
<view class="plus-price">
<text class="rmb">¥</text>
<text class="amount">{{navItem.price}}</text>
</view>
<view class="select-plus" wx:if="{{idx == currentTab}}">
<view class="circle-radio theme-color">
<image class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image>
</view>
</view>
</view>
</block>
</scroll-view>
<view class="pay">
<button class="btn btn-primary" bindtap="payPlus">
<text>立即支付</text>
<text>¥158</text>
</button>
</view>
</view>
\ No newline at end of file
......@@ -12,6 +12,7 @@
padding: 36rpx 0 36rpx 30rpx;
background-color: #C09A74;
}
.scroll-view_H {
width: 100%;
}
......
......@@ -29,7 +29,8 @@ wxService.page({
// cardMember: null,
pageBackgroundColor: 0,
guidePageModalShow: false,
currHomePageId: ''
currHomePageId: '',
skuVOList:[]
},
/**
* 生命周期函数--监听页面加载
......@@ -102,7 +103,6 @@ wxService.page({
isAuthorization: true
})
}
// if (baseUserInfo){
// this.setData({
// token: wx.getStorageSync('token'),
......@@ -120,6 +120,8 @@ wxService.page({
// isAuthorization: true
// })
// }
// 获取plus购买信息
this.getPlusPurchase()
// 获取手机信息
wxService.getSystemInfo().then(res => {
this.setData({
......@@ -144,7 +146,7 @@ wxService.page({
title: '加载中'
})
// wxService.post(`/merchant/modelPage/getDetailById?pageId=${pageId}&brandId=${app.globalData.brandId}`).then(res => {
wxService.post(`/merchant/modelPage/mainSetting?brandId=${app.globalData.brandId}`).then(res => {
wxService.post(`/merchant/modelPage/mainSetting/mall?brandId=${app.globalData.brandId}`).then(res => {
if (!res) return false
const { result, data } = res.data
if (result == 0) {
......@@ -209,7 +211,18 @@ wxService.page({
wx.hideLoading()
})
},
// 获取plus购买信息
getPlusPurchase() {
wxService.get(`/sale/premium/query`).then(res => {
const { result, data } = res.data
if (result == 0) {
this.setData({
skuVOList: data
})
}
}).finally(() => {
})
},
/**
* 用户点击右上角分享
*/
......
......@@ -27,7 +27,7 @@
<attention focus-wx="{{pItem.focusWx}}" />
</view>
<view class="" wx:if="{{pItem.type == 9}}">
<plus sku-list="{{pItem.plus}}" />
<plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}"/>
</view>
</block>
</view>
......
......@@ -15,7 +15,6 @@ wxService.page({
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
......
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