@@ -98,7 +98,9 @@ | |||||
margin: 10rpx; | margin: 10rpx; | ||||
} | } | ||||
.addpark-choose-font p{ | |||||
display: block; | |||||
} | |||||
.addpark-choose-font p image{ | .addpark-choose-font p image{ | ||||
width:5vmin; | width:5vmin; | ||||
height:3.5vmin; | height:3.5vmin; | ||||
@@ -7,8 +7,8 @@ Page({ | |||||
data: { | data: { | ||||
code: "", | code: "", | ||||
data: {}, | data: {}, | ||||
createDate:'', | |||||
expiredTime:'' | |||||
createDate: "", | |||||
expiredTime: "" | |||||
}, | }, | ||||
onLoad: function(options) { | onLoad: function(options) { | ||||
console.log(options); | console.log(options); | ||||
@@ -33,9 +33,9 @@ Page({ | |||||
data: res.data.data | data: res.data.data | ||||
}); | }); | ||||
that.setData({ | that.setData({ | ||||
expiredTime:util.fmtDate(that.data.data.expiredTime), | |||||
createDate:util.fmtDate(that.data.data.createDate) | |||||
}) | |||||
expiredTime: util.fmtDate(that.data.data.expiredTime), | |||||
createDate: util.fmtDate(that.data.data.createDate) | |||||
}); | |||||
}); | }); | ||||
} | } | ||||
util.barcode("barcode", options.quancode, 680, 100); | util.barcode("barcode", options.quancode, 680, 100); | ||||
@@ -16,8 +16,16 @@ | |||||
<text>有效期至:</text> | <text>有效期至:</text> | ||||
<text>{{expiredTime}}</text> | <text>{{expiredTime}}</text> | ||||
</view> | </view> | ||||
<view class="panel"> | |||||
<view class="pane2" wx:if="{{data.couponOrderStatus==1}}"> | |||||
<image src="./../../../assets/img/shiyong.jpg" mode="widthFix"></image> | |||||
</view> | |||||
<view class="pane2" wx:if="{{data.couponOrderStatus==2}}"> | |||||
<image src="./../../../assets/img/tui.png" mode="widthFix"></image> | |||||
</view> | |||||
<view class="pane2" wx:if="{{data.couponOrderStatus==3}}"> | |||||
<image src="./../../../assets/img/tui.jpg" mode="widthFix"></image> | |||||
</view> | |||||
<view class="panel" wx:if="{{data.couponOrderStatus==0}}"> | |||||
<view class="barcode"> | <view class="barcode"> | ||||
<canvas canvas-id="barcode" /> | <canvas canvas-id="barcode" /> | ||||
</view> | </view> | ||||
@@ -36,7 +44,7 @@ | |||||
</view> | </view> | ||||
<view> | <view> | ||||
<text>{{data.merchantName}}</text> | <text>{{data.merchantName}}</text> | ||||
<text>北京市西城区西单北大街131号</text> | |||||
<text>{{data.addr}}{{data.buildingName}}{{data.floorName}}</text> | |||||
</view> | </view> | ||||
<image bindtap='phone' class="tel" src="../../../../assets/img/tel.gif" mode="widthFix" /> | <image bindtap='phone' class="tel" src="../../../../assets/img/tel.gif" mode="widthFix" /> | ||||
</view> | </view> | ||||
@@ -14,6 +14,15 @@ | |||||
background-color: #fff; | background-color: #fff; | ||||
margin: 30rpx auto 0; | margin: 30rpx auto 0; | ||||
} | } | ||||
.pane2{ | |||||
background: #fff; | |||||
opacity: .6; | |||||
} | |||||
.pane2 image{ | |||||
width: 500rpx; | |||||
display: block; | |||||
margin: 40rpx auto 0; | |||||
} | |||||
.barcode { | .barcode { | ||||
display: flex; | display: flex; | ||||
@@ -1,6 +1,6 @@ | |||||
let format = require("../../../utils/util.js"); | |||||
let config = require("../../../config/config.js"); | |||||
let app = getApp(); | |||||
const format = require("../../../utils/util.js"); | |||||
const config = require("../../../config/config.js"); | |||||
const app = getApp(); | |||||
const Http = require("../../../utils/HttpBasics"); | const Http = require("../../../utils/HttpBasics"); | ||||
//1535126400000 | //1535126400000 | ||||
Page({ | Page({ | ||||
@@ -28,17 +28,20 @@ Page({ | |||||
current_scroll: "1" | current_scroll: "1" | ||||
}, | }, | ||||
onLoad() { | onLoad() { | ||||
this.getList(0, 1); | |||||
this.getList(1, 1); | |||||
}, | }, | ||||
//点击跳转到券详情页面 | //点击跳转到券详情页面 | ||||
gotouse: function(e) { | gotouse: function(e) { | ||||
console.log(e.currentTarget.dataset.quancode); | console.log(e.currentTarget.dataset.quancode); | ||||
console.log("点击跳转到券详情"); | console.log("点击跳转到券详情"); | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: `/pages/couponorder/detail/index?quancode=${e.currentTarget.dataset.quancode}`, | |||||
success: function(res){ | |||||
url: `/pages/couponorder/detail/index?quancode=${ | |||||
e.currentTarget.dataset.quancode | |||||
}`, | |||||
success: function(res) { | |||||
// success | // success | ||||
console.log("点击跳转到券详情页面") | |||||
console.log("点击跳转到券详情页面"); | |||||
}, | }, | ||||
fail: function() { | fail: function() { | ||||
// fail | // fail | ||||
@@ -46,16 +49,18 @@ Page({ | |||||
complete: function() { | complete: function() { | ||||
// complete | // complete | ||||
} | } | ||||
}) | |||||
}); | |||||
}, | }, | ||||
getList(key, pageNum) { | getList(key, pageNum) { | ||||
var that = this; | var that = this; | ||||
console.log(key); | |||||
console.log(pageNum); | |||||
Http.get({ | Http.get({ | ||||
url: config.api.couponOrderList, | url: config.api.couponOrderList, | ||||
data: { | data: { | ||||
pageNum: pageNum, | pageNum: pageNum, | ||||
pageSize: 10, | pageSize: 10, | ||||
orderStatus: key | |||||
couponOrderStatus: key | |||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
console.log(res); | console.log(res); | ||||
@@ -71,12 +76,15 @@ Page({ | |||||
}); | }); | ||||
}, | }, | ||||
handleChange({ detail }) { | handleChange({ detail }) { | ||||
console.log(detail); | |||||
this.setData({ | this.setData({ | ||||
current: detail.key | current: detail.key | ||||
}); | }); | ||||
}, | }, | ||||
handleChangeScroll({ detail }) { | handleChangeScroll({ detail }) { | ||||
this.getList(detail.key); | |||||
console.log(detail.key); | |||||
console.log("0000"); | |||||
this.getList(detail.key,1); | |||||
this.setData({ | this.setData({ | ||||
current_scroll: detail.key | current_scroll: detail.key | ||||
}); | }); | ||||
@@ -3,20 +3,29 @@ | |||||
<i-tabs class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll"> | <i-tabs class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll"> | ||||
<i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab> | <i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab> | ||||
</i-tabs> | </i-tabs> | ||||
<view class='section' wx:for='{{list}}' wx:key='{{index}}'> | |||||
<view class='detail_msg'> | |||||
<view class='logo'> | |||||
<image src='{{item.coverImg}}'></image> | |||||
</view> | |||||
<view class='info'> | |||||
<view> | |||||
<text>{{item.title}}</text> | |||||
<view> | |||||
<view class="nocoupon" wx:if="{{list.length==0}}"> | |||||
<image src="./../../../assets/img/cou.png" mode="widthFix" /> | |||||
<text>没有优惠券哦</text> | |||||
</view> | |||||
<view class='section' wx:for='{{list}}' wx:key='{{index}}'> | |||||
<view class='detail_msg'> | |||||
<view class='logo'> | |||||
<image src='{{item.coverImg}}'></image> | |||||
</view> | </view> | ||||
<view> | |||||
<text class="txt1">有效期至:</text> | |||||
<text class="txt2">{{item.expiredTime}}</text> | |||||
<view class='info'> | |||||
<view> | |||||
<text>{{item.title}}</text> | |||||
</view> | |||||
<view> | |||||
<text class="txt1">有效期至:</text> | |||||
<text class="txt2">{{item.expiredTime}}</text> | |||||
</view> | |||||
<view wx:if="{{item.couponOrderStatus==0}}" class="btns" bindtap="gotouse" data-quancode="{{item.id}}">立即使用</view> | |||||
<view wx:elif="{{item.couponOrderStatus==1||item.couponOrderStatus==2||item.couponOrderStatus==3}}" class="btns" bindtap="gotouse" data-quancode="{{item.id}}">查看</view> | |||||
</view> | </view> | ||||
<view class="btns" bindtap="gotouse" data-quancode="{{item.id}}">立即使用</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> |
@@ -17,8 +17,8 @@ | |||||
.section { | .section { | ||||
margin-top: 2%; | margin-top: 2%; | ||||
} | } | ||||
.section:nth-of-type(1){ | |||||
margin-top:30rpx; | |||||
.section:nth-of-type(1) { | |||||
margin-top: 30rpx; | |||||
} | } | ||||
.detail_msg { | .detail_msg { | ||||
@@ -90,3 +90,16 @@ | |||||
font-size: 22rpx; | font-size: 22rpx; | ||||
color: red; | color: red; | ||||
} | } | ||||
.nocoupon image{ | |||||
width: 100rpx; | |||||
display: block; | |||||
margin: 200rpx auto 0; | |||||
} | |||||
.nocoupon text{ | |||||
display: block; | |||||
text-align: center; | |||||
font-size:30rpx; | |||||
color: #999; | |||||
} | |||||
@@ -15,7 +15,6 @@ | |||||
.index-scroll-view { | .index-scroll-view { | ||||
width: 100%; | width: 100%; | ||||
white-space: nowrap; | white-space: nowrap; | ||||
padding-right: 30rpx; | |||||
} | } | ||||
.index-scroll-view .commodity { | .index-scroll-view .commodity { | ||||