@@ -5,17 +5,18 @@ const util = require("../../utils/util"); | |||
const imgurl = require("../../utils/imgurl"); | |||
Page({ | |||
data: { | |||
fenxiangUrl:imgurl.fenxiang.url, | |||
clockUrl:imgurl.clock.url, | |||
teljpgUrl:imgurl.teljpg.url, | |||
closedUrl:imgurl.closed.url, | |||
quesGouUrl:imgurl.ques_gou.url, | |||
headbgUrl:imgurl.headbg.url, | |||
quesBgUrl:imgurl.ques_bg.url, | |||
fenxiangUrl: imgurl.fenxiang.url, | |||
clockUrl: imgurl.clock.url, | |||
teljpgUrl: imgurl.teljpg.url, | |||
closedUrl: imgurl.closed.url, | |||
quesGouUrl: imgurl.ques_gou.url, | |||
headbgUrl: imgurl.headbg.url, | |||
quesBgUrl: imgurl.ques_bg.url, | |||
cardDetail:null, | |||
data: { | |||
title: null | |||
}, | |||
showPage:false, | |||
showPage: false, | |||
questions1: null, | |||
questions2: null, | |||
carList: [], | |||
@@ -31,7 +32,7 @@ Page({ | |||
id: null, | |||
result: [], | |||
end_time: null, | |||
checked:false, | |||
checked: false, | |||
clock: "已经截止", | |||
questionnaire: {}, | |||
questionId: null, | |||
@@ -42,11 +43,11 @@ Page({ | |||
scaleData: null, | |||
skewData: null, | |||
matrixData: null, | |||
opacity:0, | |||
queueData:null, | |||
zIndex:11, | |||
display:"none", | |||
showbutton:false | |||
opacity: 0, | |||
queueData: null, | |||
zIndex: 11, | |||
display: "none", | |||
showbutton: false | |||
}, | |||
phone: function (e) { | |||
let that = this; | |||
@@ -55,6 +56,12 @@ Page({ | |||
}); | |||
}, | |||
onLoad(options) { | |||
let that = this; | |||
console.log(options.cardId) | |||
that.cardpayList(options.cardId); | |||
that.cardDetail(options.cardId); | |||
}, | |||
cardpayList: function (cardId) { | |||
let that = this; | |||
wx.showLoading({ | |||
title: "加载中..." | |||
@@ -62,51 +69,68 @@ Page({ | |||
var parmer = { | |||
url: config.api.cardpayList, | |||
data: { | |||
cardId: options.cardId, | |||
pageNum:1, | |||
pageSize:100 | |||
cardId: cardId, | |||
pageNum: 1, | |||
pageSize: 100 | |||
} | |||
}; | |||
Http.get(parmer) | |||
.then(res => { | |||
console.log(res); | |||
if (res.code == 200 && res.data.list.length > 0) { | |||
that.setData({ | |||
showPage: true | |||
}) | |||
} else { | |||
wx.showModal({ | |||
title: '抱歉', | |||
content: '暂无消费记录', | |||
showCancel: false, | |||
success: function (res) { | |||
} | |||
}) | |||
} | |||
wx.hideLoading(); | |||
res.data.list.map(file => { | |||
file.updateDate = util.formatTime(file.updateDate, "yyyy-MM-dd hh:mm:ss") | |||
}) | |||
that.setData({ | |||
data: res.data.list | |||
}); | |||
}).catch(err => { | |||
wx.showToast({ | |||
title: err.message, | |||
icon: 'none', | |||
duration: 2000, | |||
mask: false | |||
}); | |||
}) | |||
}, | |||
cardDetail: function (couponOrderId) { | |||
let that = this; | |||
Http.get({ | |||
url: config.api.cardDetail, | |||
data: { | |||
couponOrderId: couponOrderId | |||
} | |||
}) | |||
.then(res => { | |||
console.log(res); | |||
if (res.code == 200 && res.data.list.length>0){ | |||
console.log(res) | |||
if (res.code == 200) { | |||
res.data.expiredTime = util.formatTime(res.data.expiredTime, "yyyy-MM-dd hh:mm:ss") | |||
that.setData({ | |||
showPage:true | |||
}) | |||
}else{ | |||
wx.showModal({ | |||
title: '抱歉', | |||
content: '暂无数据', | |||
showCancel:false, | |||
success:function(res){ | |||
if(res.confirm){ | |||
wx.navigateBack({ | |||
url: '/pages/cardorder/index' | |||
}) | |||
} | |||
} | |||
showPage: true, | |||
cardDetail:res.data | |||
}) | |||
} | |||
wx.hideLoading(); | |||
res.data.list.map(file=>{ | |||
file.updateDate = util.formatTime(file.updateDate, "yyyy-MM-dd hh:mm:ss") | |||
}) | |||
that.setData({ | |||
data: res.data.list | |||
}); | |||
}).catch(err => { | |||
wx.showToast({ | |||
title: err.message, | |||
icon: 'none', | |||
duration: 2000, | |||
mask: false | |||
}); | |||
}) | |||
}, | |||
onShow(){ | |||
this.setData({ | |||
showbutton:false | |||
.catch(err => { | |||
console.log(err) | |||
}) | |||
}, | |||
}); | |||
onShow() { | |||
this.setData({ | |||
showbutton: false | |||
}) | |||
}, | |||
}); |
@@ -1,9 +1,37 @@ | |||
<view wx:if="{{showPage}}" class='notes'> | |||
<!-- 券的详情页面 --> | |||
<view> | |||
<view class='head'> | |||
<view class='titles'>{{cardDetail.title}}</view> | |||
<view class='titles clearfix'> | |||
<text class='fl'>{{cardDetail.expiredTime}}</text> | |||
<text class='fr'>余额:¥{{cardDetail.remainingAmount/100}}</text> | |||
</view> | |||
</view> | |||
<view class='notess'> | |||
<view> | |||
<text class="title">交易明细:</text> | |||
<text class='title'>购买须知</text> | |||
</view> | |||
<view> | |||
<text><text class='spot'></text>{{cardDetail.remark}}</text> | |||
</view> | |||
</view> | |||
<view> | |||
<text class='title'>使用门店:</text> | |||
<view class='posi'> | |||
<view class='posi_logo' wx:for="{{cardDetail.merchantVoList}}" wx:key="index"> | |||
<view> | |||
<image src='{{item.merchantImgUrl}}'></image> | |||
</view> | |||
<view> | |||
<text>{{item.merchantName}}</text> | |||
<text>{{item.addr}}{{item.buildingName}}{{item.floorName}}</text> | |||
</view> | |||
<image bindtap='phone' data-merchantLinkPhone='{{item.merchantLinkPhone}}' class="tel" src="{{teljpgUrl}}" mode="widthFix" /> | |||
</view> | |||
</view> | |||
</view> | |||
<view> | |||
<text class="title">交易明细:</text> | |||
<view wx:for="{{data}}" wx:key="{{index}}"> | |||
<view class='record clearfix record1'> | |||
<text>{{item.merchantName}}</text> | |||
@@ -1,29 +1,149 @@ | |||
.notes{ | |||
padding: 0 32rpx; | |||
.notes { | |||
padding: 32rpx; | |||
} | |||
.record text:nth-of-type(2n+1){ | |||
.record text:nth-of-type(2n+1) { | |||
float: left; | |||
} | |||
.record text:nth-of-type(2n){ | |||
.record text:nth-of-type(2n) { | |||
float: right; | |||
} | |||
.record text{ | |||
.record text { | |||
font-size: 28rpx; | |||
color: #333; | |||
} | |||
.record1 text:nth-of-type(2){ | |||
color: #FF3535; | |||
.record1 text:nth-of-type(2) { | |||
color: #ff3535; | |||
} | |||
.record1 text:nth-of-type(1){ | |||
.record1 text:nth-of-type(1) { | |||
font-size: 32rpx; | |||
} | |||
.record1{ | |||
.record1 { | |||
margin-top: 15rpx; | |||
} | |||
.title{ | |||
font-size: 34rpx; | |||
.title { | |||
display: block; | |||
font-weight: bold; | |||
font-size: 32rpx; | |||
color: rgba(51, 51, 51, 1); | |||
} | |||
.record2{ | |||
.record2 { | |||
margin-top: 16rpx; | |||
} | |||
.posi { | |||
position: relative; | |||
width: 100%; | |||
margin: 0 auto; | |||
} | |||
.posi>view:nth-child(2) { | |||
width: 100%; | |||
height: 87rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
border-top: 1px solid #f6f6f6; | |||
line-height: 87rpx; | |||
} | |||
.posi>view:nth-child(2) text:nth-child(1) { | |||
font-size: 30rpx; | |||
color: #a9a9a9; | |||
} | |||
.posi>view:nth-child(2) text:nth-child(2) { | |||
font-size: 30rpx; | |||
color: #a9a9a9; | |||
} | |||
.posi_logo { | |||
width: 100%; | |||
display: flex; | |||
padding: 20rpx 0; | |||
background: #fff; | |||
height: 100rpx; | |||
margin-bottom: 20rpx; | |||
} | |||
.posi_logo view:nth-child(1) { | |||
width: 100rpx; | |||
height: 100rpx; | |||
border-radius: 16rpx; | |||
} | |||
.posi_logo view:nth-child(1) image { | |||
display: block; | |||
width: 100rpx; | |||
height: 100rpx; | |||
border-radius: 16rpx; | |||
border: 1px solid #e5e5e5; | |||
} | |||
.posi_logo view:nth-child(2) { | |||
display: flex; | |||
flex-direction: column; | |||
flex: 8; | |||
padding-left: 30rpx; | |||
} | |||
.posi_logo view:nth-child(2) text:nth-child(1) { | |||
font-size: 32rpx; | |||
color: #333; | |||
letter-spacing: 0; | |||
} | |||
.posi_logo view:nth-child(2) text:nth-child(2) { | |||
font-size: 24rpx; | |||
color: #b8b8b8; | |||
padding-top: 3rpx; | |||
width: 450rpx; | |||
height: 36rpx; | |||
overflow: hidden; | |||
} | |||
.titles { | |||
font-size: 30rpx; | |||
color: #333; | |||
height: 60rpx; | |||
line-height: 60rpx; | |||
} | |||
.titles .fr { | |||
color: red; | |||
} | |||
.notess view:nth-child(1) { | |||
width: 92%; | |||
height: 87rpx; | |||
line-height: 87rpx; | |||
background: #fff; | |||
} | |||
.notess view:nth-child(2) { | |||
width: 92%; | |||
background: #fff; | |||
display: flex; | |||
flex-direction: column; | |||
} | |||
.notess view:nth-child(2)>text { | |||
font-size: 28rpx; | |||
color: #919191; | |||
letter-spacing: 0; | |||
line-height: 42rpx; | |||
} | |||
.tel { | |||
right: 0; | |||
top: 0; | |||
bottom: 0; | |||
margin: auto; | |||
width: 50rpx; | |||
height: 50rpx; | |||
} |
@@ -17,7 +17,7 @@ | |||
<view class='mms' style='background:{{item.background}}'> | |||
<view class='detail_msg'> | |||
<view class='info'> | |||
<view data-id='{{item.id}}' bindtap='gotoConsumeDetail'> | |||
<view data-id='{{item.id}}' bindtap='gotoConsumeDetail' data-id='{{item.id}}'> | |||
<view class='title'> | |||
<text>{{item.title}}</text> | |||
<image class='fr' src='./../../../assets/images/icon01.png' mode="widthFix"></image> | |||
@@ -150,11 +150,7 @@ page { | |||
margin-left: 10rpx; | |||
} | |||
.posi { | |||
position: relative; | |||
width: 92%; | |||
margin: 0 auto; | |||
} | |||
.fl { | |||
float: left; | |||
@@ -164,6 +160,11 @@ page { | |||
float: right; | |||
} | |||
.posi { | |||
position: relative; | |||
width: 92%; | |||
margin: 0 auto; | |||
} | |||
.posi>view:nth-child(2) { | |||
width: 100%; | |||
height: 87rpx; | |||