@@ -22,6 +22,8 @@ Component({ | |||||
barginicon: imgurl.barginicon.url, | barginicon: imgurl.barginicon.url, | ||||
wangmeimeibargin: imgurl.wangmeimeibargin.url, | wangmeimeibargin: imgurl.wangmeimeibargin.url, | ||||
kData:[], | kData:[], | ||||
kSize:'', | |||||
pSize: '', | |||||
pData:[], | pData:[], | ||||
couponId:'', | couponId:'', | ||||
couponId1: '', | couponId1: '', | ||||
@@ -52,14 +54,15 @@ Component({ | |||||
if(res.data){ | if(res.data){ | ||||
if(val=='1'){ | if(val=='1'){ | ||||
that.setData({ | that.setData({ | ||||
kData: res.data, | |||||
couponId: res.data.couponId, | |||||
// title:res.data. | |||||
kData: res.data.data, | |||||
kSize: res.data.size, | |||||
couponId: res.data.data.couponId, | |||||
}); | }); | ||||
}else{ | }else{ | ||||
that.setData({ | that.setData({ | ||||
pData: res.data, | |||||
couponId1: res.data.couponId | |||||
pData: res.data.data, | |||||
pSize:res.data.size, | |||||
couponId1: res.data.data.couponId | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
@@ -78,10 +81,11 @@ Component({ | |||||
// 换一换 | // 换一换 | ||||
getChange(){ | getChange(){ | ||||
let that = this; | let that = this; | ||||
if (that.data.couponId){ | |||||
if (that.pSize != 1 && that.pSize != 0){ | |||||
this.getList(1) | this.getList(1) | ||||
} | } | ||||
if (that.data.couponId1) { | |||||
if (that.pSize != 1 && that.pSize != 0) { | |||||
this.getList(2) | this.getList(2) | ||||
} | } | ||||
}, | }, | ||||
@@ -5,7 +5,7 @@ | |||||
<view class='sql' style='background:{{sql}}'></view> | <view class='sql' style='background:{{sql}}'></view> | ||||
<text>爆款专区</text> | <text>爆款专区</text> | ||||
</view> | </view> | ||||
<view class='titleR' bindtap='getChange' wx:if='{{kData.id || pData.id}}' > | |||||
<view class='titleR' bindtap='getChange' > | |||||
<text style='color:{{txt}}'>换一换</text> | <text style='color:{{txt}}'>换一换</text> | ||||
<view> | <view> | ||||
<image src='{{change}}' bindtap='' mode='aspectFill'></image> | <image src='{{change}}' bindtap='' mode='aspectFill'></image> | ||||
@@ -1,4 +1,4 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
var config = require("../../config/config.js"); | var config = require("../../config/config.js"); | ||||
const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
const imgurl = require("../../utils/imgurl"); | const imgurl = require("../../utils/imgurl"); | ||||
@@ -1,3 +1,4 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
var config = require("../../../config/config.js"); | var config = require("../../../config/config.js"); | ||||
var app = getApp(); | var app = getApp(); | ||||
const Http = require("../../../utils/HttpBasics"); | const Http = require("../../../utils/HttpBasics"); | ||||
@@ -9,6 +10,7 @@ Page({ | |||||
* 页面的初始数据 | * 页面的初始数据 | ||||
*/ | */ | ||||
data: { | data: { | ||||
navigationBarHeight, | |||||
bannerUrl: imgurl.banner.url, | bannerUrl: imgurl.banner.url, | ||||
wmhome: imgurl.wmhome.url, | wmhome: imgurl.wmhome.url, | ||||
wmhelp: imgurl.wmhelp.url, | wmhelp: imgurl.wmhelp.url, | ||||
@@ -2,5 +2,8 @@ | |||||
"navigationBarTitleText": "砍价详情", | "navigationBarTitleText": "砍价详情", | ||||
"navigationBarBackgroundColor":"#F4F5F9", | "navigationBarBackgroundColor":"#F4F5F9", | ||||
"navigationBarTextStyle": "black", | "navigationBarTextStyle": "black", | ||||
"enablePullDownRefresh": true | |||||
"enablePullDownRefresh": true, | |||||
"usingComponents": { | |||||
"navbar": "../../../components/navbar/navbar" | |||||
} | |||||
} | } |
@@ -1,5 +1,6 @@ | |||||
<!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | ||||
<view class="bargainDetail" hover-class="none" hover-stop-propagation="false" wx:if="{{showPage}}"> | |||||
<navbar back home text="砍价专场"></navbar> | |||||
<view class="bargainDetail" hover-class="none" hover-stop-propagation="false" wx:if="{{showPage}}" style="padding-top:{{navigationBarHeight}};"> | |||||
<view class="listitem clearfix" hover-class="none" hover-stop-propagation="false"> | <view class="listitem clearfix" hover-class="none" hover-stop-propagation="false"> | ||||
<image class="fl" src="{{data.coverImg}}" lazy-load="true" binderror="" bindload="" mode='aspectFill'></image> | <image class="fl" src="{{data.coverImg}}" lazy-load="true" binderror="" bindload="" mode='aspectFill'></image> | ||||
<view class="fl ri" hover-class="none" hover-stop-propagation="false"> | <view class="fl ri" hover-class="none" hover-stop-propagation="false"> | ||||
@@ -21,7 +21,7 @@ | |||||
<view class='coupons_info' style='position:relative;z-index:9'> | <view class='coupons_info' style='position:relative;z-index:9'> | ||||
<view class='fenxiang' wx:if="{{data.type!=50&&data.type!=51}}" bindtap='showshare'> | <view class='fenxiang' wx:if="{{data.type!=50&&data.type!=51}}" bindtap='showshare'> | ||||
<image class="fenxiang" src='{{fenxiang}}' mode="widthFix"></image> | <image class="fenxiang" src='{{fenxiang}}' mode="widthFix"></image> | ||||
<text class='gift'>分享有礼</text> | |||||
<!-- <view class='gift'>分享有礼</view> --> | |||||
<!-- <button class='share user-motto' data-id='{{data.id}}' data-couponId='{{data.couponId}}' data-title='{{data.title}}' id="shareBtn" open-type="share" hover-class="other-button-hover"></button> --> | <!-- <button class='share user-motto' data-id='{{data.id}}' data-couponId='{{data.couponId}}' data-title='{{data.title}}' id="shareBtn" open-type="share" hover-class="other-button-hover"></button> --> | ||||
</view> | </view> | ||||
<view> | <view> | ||||
@@ -79,21 +79,18 @@ button::after { | |||||
right: 28rpx; | right: 28rpx; | ||||
top: 27rpx; | top: 27rpx; | ||||
width: 108rpx; | width: 108rpx; | ||||
height: 180rpx; | |||||
/* display: flex; | |||||
flex-direction:column; */ | |||||
} | } | ||||
.fenxiang image { | .fenxiang image { | ||||
width:48rpx; | width:48rpx; | ||||
height: 48rpx; | height: 48rpx; | ||||
position: absolute; | |||||
top: 0; | |||||
right: 16rpx; | |||||
} | } | ||||
.gift{ | .gift{ | ||||
color: #3C3C3C; | color: #3C3C3C; | ||||
font-size: 20rpx; | font-size: 20rpx; | ||||
position: absolute; | |||||
top: 50rpx; | |||||
right: 0; | |||||
} | } | ||||
.user-motto { | .user-motto { | ||||