Browse Source

[券包分类][修改]:券包分类修改

tags/2.2.4
meo 6 years ago
parent
commit
5522c6d715
11 changed files with 82 additions and 34 deletions
  1. BIN
      assets/img/cou.png
  2. BIN
      assets/img/shiyong.jpg
  3. BIN
      assets/img/tui.jpg
  4. +3
    -1
      pages/addPark/addPark.wxss
  5. +5
    -5
      pages/couponorder/detail/index.js
  6. +11
    -3
      pages/couponorder/detail/index.wxml
  7. +9
    -0
      pages/couponorder/detail/index.wxss
  8. +18
    -10
      pages/couponorder/index/index.js
  9. +21
    -12
      pages/couponorder/index/index.wxml
  10. +15
    -2
      pages/couponorder/index/index.wxss
  11. +0
    -1
      pages/index/rushToBuy/index.wxss

BIN
assets/img/cou.png View File

Before After
Width: 200  |  Height: 200  |  Size: 17 KiB

BIN
assets/img/shiyong.jpg View File

Before After
Width: 510  |  Height: 581  |  Size: 30 KiB

BIN
assets/img/tui.jpg View File

Before After
Width: 510  |  Height: 581  |  Size: 27 KiB

+ 3
- 1
pages/addPark/addPark.wxss View File

@@ -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;


+ 5
- 5
pages/couponorder/detail/index.js View File

@@ -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);


+ 11
- 3
pages/couponorder/detail/index.wxml View File

@@ -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>


+ 9
- 0
pages/couponorder/detail/index.wxss View File

@@ -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;


+ 18
- 10
pages/couponorder/index/index.js View File

@@ -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
}); });


+ 21
- 12
pages/couponorder/index/index.wxml View File

@@ -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>

+ 15
- 2
pages/couponorder/index/index.wxss View File

@@ -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;
}


+ 0
- 1
pages/index/rushToBuy/index.wxss View File

@@ -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 {


Loading…
Cancel
Save