@@ -64,45 +64,37 @@ Page({ | |||||
data: { | data: { | ||||
cardId: options.cardId, | cardId: options.cardId, | ||||
pageNum:1, | pageNum:1, | ||||
pageSize:10 | |||||
pageSize:100 | |||||
} | } | ||||
}; | }; | ||||
Http.get(parmer) | Http.get(parmer) | ||||
.then(res => { | .then(res => { | ||||
if(res.code==200){ | |||||
console.log(res); | |||||
if (res.code == 200 && res.data.list.length>0){ | |||||
that.setData({ | that.setData({ | ||||
showPage:true | showPage:true | ||||
}) | }) | ||||
} | |||||
if (res.data.endTime) { | |||||
that.countdown(res.data.endTime); | |||||
//当前时间与优惠券下架时间做计算 | |||||
var endTime = util.formatTime(res.data.endTime, "yyyy-MM-dd hh:mm:ss"); | |||||
if (util.timechuo(endTime).indexOf('-') == 0) { | |||||
that.setData({ | |||||
endtime: "活动已结束", | |||||
}); | |||||
} else { | |||||
that.setData({ | |||||
endtime: util.timechuo(endTime) | |||||
}); | |||||
} | |||||
}else{ | |||||
wx.showModal({ | |||||
title: '抱歉', | |||||
content: '暂无数据', | |||||
showCancel:false, | |||||
success:function(res){ | |||||
if(res.confirm){ | |||||
wx.navigateBack({ | |||||
url: '/pages/cardorder/index' | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} | } | ||||
wx.hideLoading(); | wx.hideLoading(); | ||||
res.data.list.map(file=>{ | |||||
file.updateDate = util.formatTime(file.updateDate, "yyyy-MM-dd hh:mm:ss") | |||||
}) | |||||
that.setData({ | that.setData({ | ||||
data: res.data | |||||
data: res.data.list | |||||
}); | }); | ||||
if (res.data.validType == 1) { | |||||
that.setData({ | |||||
validStartDate: util.formatTime(res.data.validStartDate, "yyyy-MM-dd"), | |||||
validEndDate: util.formatTime(res.data.validEndDate, "yyyy-MM-dd"), | |||||
}); | |||||
} else { | |||||
that.setData({ | |||||
validDays: res.data.validDays | |||||
}); | |||||
} | |||||
}).catch(err => { | }).catch(err => { | ||||
wx.showToast({ | wx.showToast({ | ||||
title: err.message, | title: err.message, | ||||
@@ -112,274 +104,9 @@ Page({ | |||||
}); | }); | ||||
}) | }) | ||||
}, | }, | ||||
/** | |||||
* 支付订单更新 | |||||
*/ | |||||
payOrderUpdate: (orderId, payOrderId, status, reason, type, _this) => { | |||||
let that = this; | |||||
// 支付成功 | |||||
Http.post({ | |||||
url: config.api.payOrderUpdate, | |||||
data: { | |||||
payOrderId: payOrderId, | |||||
orderId: orderId, | |||||
status: status, | |||||
reason: reason | |||||
} | |||||
}) | |||||
.then(res => { | |||||
wx.hideLoading() | |||||
// 有价券 | |||||
if (!type&&type!='free') { | |||||
wx.navigateTo({ | |||||
url: `/pages/order/detail/index?orderId=${ | |||||
orderId | |||||
}` | |||||
}); | |||||
}else if(type=='free'){ | |||||
wx.navigateTo({ | |||||
url: `/pages/order/detail/index?orderId=${ | |||||
orderId | |||||
}` | |||||
}); | |||||
} | |||||
}) | |||||
.catch(err => { | |||||
console.log(err); | |||||
if (!type) { | |||||
setTimeout(function () { | |||||
_this.payOrderUpdate(orderId, payOrderId, status, reason, type, _this); | |||||
}, 2000) | |||||
} | |||||
}) | |||||
}, | |||||
/** | |||||
* 发起支付 | |||||
*/ | |||||
orderFunc(flag) { | |||||
var that = this; | |||||
// wx.showLoading({ | |||||
// title: "加载中..." | |||||
// }); | |||||
Http.post({ | |||||
url: config.api.checkPhoneStatus, | |||||
data: {} | |||||
}) | |||||
.then(res => { | |||||
var data = { | |||||
couponChannelId: "" + that.data.couponChannelId, | |||||
couponId: "" + that.data.couponId | |||||
}; | |||||
if (that.data.couponChannelId == null) { | |||||
var data = { | |||||
couponId: "" + that.data.couponId | |||||
}; | |||||
} | |||||
/** | |||||
* orderSave 下单 | |||||
*/ | |||||
return Http.post({ | |||||
url: config.api.orderSave, | |||||
data: data | |||||
}); | |||||
}) | |||||
.catch(err => { | |||||
if (err.code == "2011") { | |||||
wx.showToast({ | |||||
title: "商户信息没找到", | |||||
image:imgurl.fail.url, | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} else if (err.code == "2013") { | |||||
wx.showToast({ | |||||
title: "商户信息禁用", | |||||
image:imgurl.fail.url, | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} else if (err.code == "3000") { | |||||
wx.showToast({ | |||||
title: "库存不足", | |||||
image:imgurl.fail.url, | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} else if (err.code == "3001") { | |||||
wx.showToast({ | |||||
title: "领取达到上限", | |||||
image:imgurl.fail.url, | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} else if (err.code == "3002") { | |||||
wx.showToast({ | |||||
title: "订单失败", | |||||
image:imgurl.fail.url, | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} else if (err.code == "3003") { | |||||
wx.showToast({ | |||||
title: "订单不存在", | |||||
image:imgurl.fail.url, | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} else if (err.code == "3004") { | |||||
wx.showToast({ | |||||
title: "订单不存在", | |||||
image:imgurl.fail.url, | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} else if (err.code == "4003") { | |||||
wx.showToast({ | |||||
title: "卡券已作废", | |||||
image:imgurl.fail.url, | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} else if (err.code == 11005) { | |||||
/** | |||||
* 将值传到用户手机号授权的页面 | |||||
* | |||||
*/ | |||||
wx.redirectTo({ | |||||
url: "/pages/getphoneInfo/index?couponChannelId=" + | |||||
that.data.couponChannelId + | |||||
"&couponId=" + | |||||
that.data.couponId | |||||
}); | |||||
} else if (err.code == 11006) { | |||||
// 用户手机已加密 | |||||
wx.redirectTo({ | |||||
url: "/pages/phoneinput/phoneinput?couponChannelId=" + | |||||
that.data.couponChannelId + | |||||
"&couponId=" + | |||||
that.data.couponId | |||||
}); | |||||
} else { | |||||
wx.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} | |||||
}) | |||||
.then(res => { | |||||
if (typeof (res) != "undefined") { | |||||
let orderId = "" + res.data.id; | |||||
that.setData({ | |||||
orderId: orderId | |||||
}); | |||||
if (res.data.payment > 0) { | |||||
// 支付金额不为0 | |||||
/** | |||||
* 支付订单创建 | |||||
*/ | |||||
Http.post({ | |||||
url: config.api.payOrderCreate, | |||||
data: { | |||||
orderId: orderId | |||||
} | |||||
}).then(res => { | |||||
var payOrderId = "" + res.data.payOrderId; | |||||
wx.hideLoading(); | |||||
wx.requestPayment({ | |||||
timeStamp: res.data.timeStamp, | |||||
nonceStr: res.data.nonceStr, | |||||
package: res.data.package, | |||||
signType: (res.data.signType) ? res.data.signType : "MD5", | |||||
paySign: res.data.paySign, | |||||
success: res => { | |||||
wx.showLoading({ | |||||
title: '订单正在处理中...', | |||||
}) | |||||
setTimeout(function(){ | |||||
wx.hideLoading() | |||||
},5000) | |||||
that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that); | |||||
if (res.errMsg == "requestPayment:ok") { | |||||
setTimeout(function () { | |||||
wx.hideLoading(); | |||||
}, 2000); | |||||
/** | |||||
* 用户支付成功以后跳转到券包列表 | |||||
*/ | |||||
wx.setStorage({ | |||||
key: 'couponNum', | |||||
data: "couponNum", | |||||
}) | |||||
} | |||||
}, | |||||
fail: res => { | |||||
/** | |||||
* 支付失败,需要更新订单的状态 | |||||
*/ | |||||
that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', 'fail', that); | |||||
that.setData({ | |||||
showbutton: false | |||||
}) | |||||
return; | |||||
}, | |||||
complete: res => {} | |||||
}); | |||||
/// End payment -------- | |||||
}) | |||||
.catch(err => { | |||||
wx.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
} else { | |||||
// 免费券 | |||||
that.payOrderUpdate(orderId, "0", 1, '', 'free'); | |||||
wx.setStorage({ | |||||
key: 'couponNum', | |||||
data: "couponNum" | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
.catch(err => { | |||||
wx.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
}, | |||||
onShow(){ | onShow(){ | ||||
this.setData({ | this.setData({ | ||||
showbutton:false | showbutton:false | ||||
}) | }) | ||||
}, | }, | ||||
onShareAppMessage: function (options) { | |||||
var that = this; | |||||
var shareObj = { | |||||
title: that.data.data.title, | |||||
path: `/pages/index/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}`, | |||||
success: function (res) { | |||||
if (res.errMsg == 'shareAppMessage:ok') {} | |||||
}, | |||||
fail: function (error) { | |||||
if (res.errMsg == 'shareAppMessage:fail cancel') {} else if (res.errMsg == 'shareAppMessage:fail') {} | |||||
} | |||||
}; | |||||
// 来自页面内的按钮的转发 | |||||
if (options.from == 'button') { | |||||
var eData = options.target.dataset.id; | |||||
var couponId = options.target.dataset.couponid; | |||||
shareObj.path = `/pages/index/index?couponChannelId=${eData}&couponId=${couponId}`; | |||||
} | |||||
// 返回shareObj | |||||
return shareObj; | |||||
}, | |||||
}); | }); |
@@ -1,82 +1,17 @@ | |||||
<view wx:if="{{showPage}}"> | |||||
<view wx:if="{{showPage}}" class='notes'> | |||||
<!-- 券的详情页面 --> | <!-- 券的详情页面 --> | ||||
<view class='coupons'> | |||||
<view class="coupons-body"> | |||||
<view class='banner'> | |||||
<image src='{{data.coverImg}}'></image> | |||||
</view> | |||||
<view class='coupons_info' style='position:relative;z-index:9'> | |||||
<view class='fenxiang'> | |||||
<image class="fenxiang" src='{{fenxiangUrl}}' mode="widthFix"></image> | |||||
<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 class='distance' wx:if="{{data.targetAd==2&&data.endTime!=undefined&&data.type!=5}}"> | |||||
<view style='text-align:center;display:inline-block;'> | |||||
<image class='clock' src='{{clockUrl}}' mode='widthFix'></image> | |||||
<text class="qiang">距结束还剩 :</text> | |||||
</view> | |||||
<view wx:if="{{clock=='已经截止'||data.remainInventory==0||data.status==1}}" class='times'> | |||||
<text>{{day}}</text>天 | |||||
<text>{{hour}}</text>: | |||||
<text>{{min}}</text>: | |||||
<text>{{sec}}</text> | |||||
</view> | |||||
<view wx:if="{{clock!='已经截止'&&data.remainInventory!=0}}" class='times'> | |||||
<text>{{day}}</text>天 | |||||
<text>{{hour}}</text>: | |||||
<text>{{min}}</text>: | |||||
<text>{{sec}}</text> | |||||
</view> | |||||
</view> | |||||
<text class='title'>{{data.title}}<text class="elecard">电子卡</text></text> | |||||
<text class="subTitle">{{data.subTitle}}</text> | |||||
<view class='salePriceStr clearfix'> | |||||
<view class="fl">售价: | |||||
<text class="pri01">{{data.salePriceStr}}</text> | |||||
<text class="yuan">元</text> | |||||
<text class='throgh' wx:if="{{data.unit==0}}">{{data.priceStr}}元</text> | |||||
<text wx:if="{{data.unit==1}}">{{data.priceStr}}小时</text> | |||||
</view> | |||||
<text class="restNum fr">剩余<text>{{data.remainInventory}}件</text></text> | |||||
</view> | |||||
<view class='rest' wx:if="{{data.validType==2}}">有效期:自领取之日起 | |||||
<text class='time'>{{validDays}}</text>天内有效</view> | |||||
<view class='rest' wx:if="{{data.validType==1}}">有效期: | |||||
<text class='time'>{{validStartDate}}至{{validEndDate}}</text> | |||||
</view> | |||||
<view class='rest' wx:if="{{data.type==5}}"> | |||||
<text class='time'>当次有效</text> | |||||
</view> | |||||
<view class='rest' wx:if="{{data.type==1}}"> | |||||
<text class='txt01'>使用条件:</text> | |||||
<text class='time'>满{{data.usePriceStr}}元可用</text> | |||||
</view> | |||||
<view class='rest'> | |||||
<text class='txt01'>限购条件:</text> | |||||
<text class='time'>每人{{data.useLimitQuantity}}张</text> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view class='posi'> | |||||
<view class='posi_logo' wx:for="{{data.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> | |||||
<text class="title">交易明细:</text> | |||||
</view> | |||||
<view wx:for="{{data}}" wx:key="{{index}}"> | |||||
<view class='record clearfix record1'> | |||||
<text>{{item.merchantName}}</text> | |||||
<text>-{{item.payment/100}}元</text> | |||||
</view> | </view> | ||||
<view class='notes'> | |||||
<view> | |||||
<text>购买须知</text> | |||||
</view> | |||||
<view> | |||||
<text><text class='spot'></text>{{data.remark}}</text> | |||||
</view> | |||||
<view class='record clearfix record2'> | |||||
<text>{{item.updateDate}}</text> | |||||
<text>余额{{item.cardRemainAmount/100}}元</text> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> |
@@ -1,446 +1,29 @@ | |||||
@import "../../app.wxss"; | |||||
page { | |||||
background: #fff; | |||||
.notes{ | |||||
padding: 0 32rpx; | |||||
} | } | ||||
.coupons { | |||||
width: 100%; | |||||
position: relative; | |||||
overflow: hidden; | |||||
padding-bottom: 170rpx; | |||||
} | |||||
.banner { | |||||
position: relative; | |||||
width: 750rpx; | |||||
height: 534.5rpx; | |||||
} | |||||
.banner image { | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.coupons_info { | |||||
width: 92%; | |||||
padding: 0 4%; | |||||
background: #fff; | |||||
border-top-left-radius: 20rpx; | |||||
border-top-right-radius: 20rpx; | |||||
margin-top: -25rpx; | |||||
} | |||||
.fenxiang { | |||||
position: absolute; | |||||
right: 36rpx; | |||||
top: 27rpx; | |||||
width: 77rpx; | |||||
} | |||||
.fenxiang image { | |||||
width: 50rpx; | |||||
position: absolute; | |||||
top: 0; | |||||
right: 0; | |||||
} | |||||
.user-motto { | |||||
width: 100rpx; | |||||
border: 0; | |||||
background: none; | |||||
height: 60rpx; | |||||
color: #fff; | |||||
} | |||||
.user-motto::after { | |||||
border: none; | |||||
} | |||||
.title { | |||||
display: block; | |||||
font-size: 32rpx; | |||||
color: #000; | |||||
letter-spacing: 1.09rpx; | |||||
line-height: 45rpx; | |||||
width: 542rpx; | |||||
overflow: hidden; | |||||
white-space: nowrap; | |||||
text-overflow: ellipsis; | |||||
padding-top: 30rpx; | |||||
} | |||||
.subTitle { | |||||
display: block; | |||||
width: 588rpx; | |||||
/* height: 37rpx; */ | |||||
font-size: 26rpx; | |||||
color: #999; | |||||
letter-spacing: 1.16rpx; | |||||
overflow: hidden; | |||||
white-space: nowrap; | |||||
text-overflow: ellipsis; | |||||
padding: 6rpx 0; | |||||
} | |||||
.rest { | |||||
font-size: 24rpx; | |||||
color: #919191; | |||||
letter-spacing: 0; | |||||
height: 70rpx; | |||||
line-height: 70rpx; | |||||
/* border-bottom: 1px solid #eee; */ | |||||
border-bottom: 1px solid #f9f9f9; | |||||
} | |||||
.restNum { | |||||
font-size: 24rpx; | |||||
color: #999; | |||||
letter-spacing: 1.16rpx; | |||||
text-align: right; | |||||
} | |||||
.time { | |||||
font-size: 24rpx; | |||||
color: #333; | |||||
letter-spacing: 0; | |||||
line-height: 33rpx; | |||||
display: inline-block; | |||||
} | |||||
.txt01 { | |||||
font-size: 24rpx; | |||||
color: #919191; | |||||
letter-spacing: 0; | |||||
} | |||||
.price { | |||||
font-size: 24rpx; | |||||
color: #999; | |||||
letter-spacing: 0; | |||||
} | |||||
.salePriceStr { | |||||
font-size: 24rpx; | |||||
color: #999; | |||||
letter-spacing: 0; | |||||
} | |||||
.salePriceStr .pri01 { | |||||
font-size: 40rpx; | |||||
color: #ff4949; | |||||
letter-spacing: 0; | |||||
margin-left: 10rpx; | |||||
} | |||||
.salePriceStr .yuan { | |||||
font-size: 24rpx; | |||||
color: #ff4949; | |||||
letter-spacing: 0; | |||||
} | |||||
.price text { | |||||
font-size: 24rpx; | |||||
color: #333; | |||||
letter-spacing: 0; | |||||
} | |||||
.throgh { | |||||
text-decoration: line-through; | |||||
margin-left: 10rpx; | |||||
} | |||||
.posi { | |||||
position: relative; | |||||
width: 92%; | |||||
margin: 0 auto; | |||||
} | |||||
.fl { | |||||
.record text:nth-of-type(2n+1){ | |||||
float: left; | float: left; | ||||
} | } | ||||
.fr { | |||||
.record text:nth-of-type(2n){ | |||||
float: right; | float: right; | ||||
} | } | ||||
.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; | |||||
} | |||||
.notes view:nth-child(1) { | |||||
width: 92%; | |||||
height: 87rpx; | |||||
padding: 0 4%; | |||||
line-height: 87rpx; | |||||
background: #fff; | |||||
} | |||||
.active { | |||||
opacity: 0.6; | |||||
} | |||||
.notes view:nth-child(1) text { | |||||
font-size: 24rpx; | |||||
.record text{ | |||||
font-size: 28rpx; | |||||
color: #333; | color: #333; | ||||
letter-spacing: 0; | |||||
} | } | ||||
.notes view:nth-child(2) { | |||||
width: 92%; | |||||
padding: 0 4%; | |||||
background: #fff; | |||||
display: flex; | |||||
flex-direction: column; | |||||
.record1 text:nth-of-type(2){ | |||||
color: #FF3535; | |||||
} | } | ||||
.notes view:nth-child(2)>text { | |||||
font-size: 24rpx; | |||||
color: #919191; | |||||
letter-spacing: 0; | |||||
line-height: 42rpx; | |||||
.record1 text:nth-of-type(1){ | |||||
font-size: 32rpx; | |||||
} | } | ||||
.buy-view { | |||||
background: #fff; | |||||
height: 96rpx; | |||||
bottom: 0; | |||||
left: 0; | |||||
right: 0; | |||||
padding-bottom: 22rpx; | |||||
padding-top: 22rpx; | |||||
.record1{ | |||||
margin-top: 15rpx; | |||||
} | } | ||||
.buy { | |||||
position: relative; | |||||
background: #00c0ff; | |||||
height: 94rpx; | |||||
width: 670rpx; | |||||
margin: 0 auto 30rpx; | |||||
color: #fff; | |||||
.title{ | |||||
font-size: 36rpx; | font-size: 36rpx; | ||||
line-height: 94rpx; | |||||
border-radius: 61rpx; | |||||
} | |||||
.tel { | |||||
right: 0; | |||||
top: 0; | |||||
bottom: 0; | |||||
margin: auto; | |||||
width: 50rpx; | |||||
height: 50rpx; | |||||
} | |||||
.txt { | |||||
margin-right: 30rpx; | |||||
} | |||||
.distance{ | |||||
border: none; | |||||
border-radius:16rpx; | |||||
width: 600rpx; | |||||
padding: 16rpx 6rpx 0 0; | |||||
} | |||||
.distance .txt01{ | |||||
display: block; | |||||
font-size: 26rpx; | |||||
color: #ff4949; | |||||
} | |||||
.clock{ | |||||
width: 116rpx!important; | |||||
vertical-align: middle; | |||||
margin-right: 10rpx; | |||||
margin-top: -4rpx; | |||||
} | |||||
.qiang{ | |||||
position: inline-block; | |||||
width: 60rpx; | |||||
height: 40rpx; | |||||
line-height: 40rpx; | |||||
color: #ff4949; | |||||
text-align: center; | |||||
font-size: 28rpx; | |||||
margin-right: 10rpx; | |||||
} | |||||
.times{ | |||||
display: inline-block; | |||||
color: #ff4949; | |||||
font-weight:bold; | |||||
font-size: 26rpx; | |||||
text-align:center; | |||||
} | |||||
.times text{ | |||||
display: inline-block; | |||||
margin: 6rpx; | |||||
width: 46rpx; | |||||
height: 56rpx; | |||||
text-align: center; | |||||
font-size: 28rpx; | |||||
line-height: 60rpx; | |||||
border-radius:12rpx; | |||||
color: #fff; | |||||
font-weight:bold; | |||||
background: #ff4949; | |||||
} | |||||
.b1 { | |||||
position: fixed; | |||||
top: 0px; | |||||
bottom: 0px; | |||||
left: 0px; | |||||
right: 0px; | |||||
background: rgba(0, 0, 0, 0.8); | |||||
overflow: hidden; | |||||
z-index: 10; | |||||
} | |||||
.con { | |||||
position: absolute; | |||||
top: 35rpx; | |||||
right: 0; | |||||
bottom: 0; | |||||
left: 0; | |||||
margin: auto; | |||||
width: 587rpx; | |||||
} | |||||
.con .image{ | |||||
display: block; | |||||
width: 100%; | |||||
} | |||||
.img { | |||||
margin-top: -50rpx; | |||||
} | |||||
.question { | |||||
display: block; | |||||
width: 587rpx; | |||||
background: #fff; | |||||
border-bottom-left-radius: 22rpx; | |||||
border-bottom-right-radius: 22rpx; | |||||
overflow: hidden; | |||||
} | |||||
.ques { | |||||
display: block; | |||||
width: 511rpx; | |||||
margin: 0 auto; | |||||
height: 95rpx; | |||||
line-height: 95rpx; | |||||
font-size: 30rpx; | |||||
color: #333; | |||||
border-bottom: 1rpx solid #eee; | |||||
} | |||||
.titles { | |||||
width: 511rpx; | |||||
display: block; | |||||
text-align: center; | |||||
height: 50rpx; | |||||
margin: 0 auto; | |||||
padding-top:10rpx; | |||||
padding-bottom:20rpx; | |||||
font-size: 32rpx; | |||||
font-weight: bold; | font-weight: bold; | ||||
line-height: 41rpx; | |||||
border-bottom: 1rpx solid #eee; | |||||
} | |||||
.quessss >view:last-child{ | |||||
border-bottom:0; | |||||
} | |||||
.close{ | |||||
position: relative; | |||||
z-index: 10000; | |||||
display: block; | |||||
width: 70rpx; | |||||
} | |||||
.ques_gou{ | |||||
position: absolute; | |||||
width: 20rpx; | |||||
top: 160rpx; | |||||
left: 23rpx; | |||||
} | |||||
.btns{ | |||||
color: #f8755b; | |||||
font-weight: bold; | |||||
font-size: 30rpx!important; | |||||
text-align: center!important; | |||||
} | |||||
.radios{ | |||||
display: block; | |||||
font-size:28rpx; | |||||
height: 95rpx; | |||||
line-height: 95rpx; | |||||
color: #333; | |||||
text-indent: .5em; | |||||
} | } | ||||
.elecard{ | |||||
display: inline-block; | |||||
margin-left: 6rpx; | |||||
color: #00c0ff; | |||||
border: 1px solid #00c0ff; | |||||
border-radius:8rpx; | |||||
font-style: normal; | |||||
font-size: 30rpx; | |||||
line-height: 40rpx; | |||||
padding: 0 6rpx; | |||||
.record2{ | |||||
margin-top: 16rpx; | |||||
} | } |
@@ -57,7 +57,8 @@ Page({ | |||||
// 指纹识别 | // 指纹识别 | ||||
startAuth() { | startAuth() { | ||||
let that = this; | let that = this; | ||||
if (that.data.inputValue != "") { | |||||
// 卡余额充足的时候,才可以付钱 | |||||
if (that.data.inputValue != "" && that.data.remainingAmount > that.data.inputValue) { | |||||
const startSoterAuthentication = () => { | const startSoterAuthentication = () => { | ||||
wx.startSoterAuthentication({ | wx.startSoterAuthentication({ | ||||
requestAuthModes: [AUTH_MODE], | requestAuthModes: [AUTH_MODE], | ||||
@@ -105,12 +106,18 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
} else { | |||||
} else if (that.data.inputValue == ""){ | |||||
wx.showModal({ | wx.showModal({ | ||||
title: '抱歉', | title: '抱歉', | ||||
content: '请输入金额', | content: '请输入金额', | ||||
showCancel: false | showCancel: false | ||||
}) | }) | ||||
} else if (that.data.inputValue != ""&&that.data.remainingAmount < that.data.inputValue){ | |||||
wx.showModal({ | |||||
title: '抱歉', | |||||
content: '余额不足', | |||||
showCancel:false | |||||
}) | |||||
} | } | ||||
}, | }, | ||||
/** | /** | ||||
@@ -1,5 +1,5 @@ | |||||
<view class='content'> | <view class='content'> | ||||
<view class='title'>卡余额:{{remainingAmount}}元</view> | |||||
<!-- <view class='title'>卡余额:{{remainingAmount}}元</view> --> | |||||
<view class='head clearfix'> | <view class='head clearfix'> | ||||
<text class='fl'>付款给{{merChant.merchant_name}}</text> | <text class='fl'>付款给{{merChant.merchant_name}}</text> | ||||
<image class='fr' src='{{merChant.merchant_img_url}}' mode='widthFix'></image> | <image class='fr' src='{{merChant.merchant_img_url}}' mode='widthFix'></image> | ||||
@@ -7,7 +7,7 @@ | |||||
<text class='txt1'>金额</text> | <text class='txt1'>金额</text> | ||||
<view class='money'> | <view class='money'> | ||||
<text class='icon'>¥</text> | <text class='icon'>¥</text> | ||||
<input bindinput="bindKeyInput" class='num' type="digit" focus='true' placeholder="" /> | |||||
<input bindinput="bindKeyInput" class='num' type="digit" focus placeholder="" /> | |||||
<button bindtap='startAuth' hover-class='active'>确认付款</button> | <button bindtap='startAuth' hover-class='active'>确认付款</button> | ||||
</view> | </view> | ||||
</view> | </view> |
@@ -27,8 +27,7 @@ | |||||
<view class="user-btns"> | <view class="user-btns"> | ||||
<navigator url="/pages/order/index/index?id=all"> | <navigator url="/pages/order/index/index?id=all"> | ||||
<view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
<view> | |||||
<image class='icons' style='width:36rpx;' src="{{dingUrl}}" mode='widthFix'></image>我的订单</view> | |||||
<view><image class='icons' src="{{dingUrl}}" mode='widthFix'></image>我的订单</view> | |||||
<view> | <view> | ||||
<text class="iconfont icon-right"></text> | <text class="iconfont icon-right"></text> | ||||
</view> | </view> | ||||
@@ -37,7 +36,7 @@ | |||||
<navigator url="/pages/couponorder/index/index"> | <navigator url="/pages/couponorder/index/index"> | ||||
<view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
<view> | <view> | ||||
<image class='icons' style='width:44rpx;' src="{{quansUrl}}" mode='widthFix'></image>我的券包</view> | |||||
<image class='icons' src="{{quansUrl}}" mode='widthFix'></image>我的券包</view> | |||||
<view> | <view> | ||||
<text class="couponnum" wx:if="{{couponNum=='couponNum'}}"></text> | <text class="couponnum" wx:if="{{couponNum=='couponNum'}}"></text> | ||||
<text class="iconfont icon-right"></text> | <text class="iconfont icon-right"></text> | ||||
@@ -47,7 +46,7 @@ | |||||
<navigator url="/pages/cardorder/index/index"> | <navigator url="/pages/cardorder/index/index"> | ||||
<view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
<view> | <view> | ||||
<image class='icons' style='width:44rpx;' src="{{cardiconUrl}}" mode='widthFix'></image>我的卡包</view> | |||||
<image class='icons' src="{{cardiconUrl}}" mode='widthFix'></image>我的卡包</view> | |||||
<view> | <view> | ||||
<text class="couponnum" wx:if="{{couponNum=='couponNum'}}"></text> | <text class="couponnum" wx:if="{{couponNum=='couponNum'}}"></text> | ||||
<text class="iconfont icon-right"></text> | <text class="iconfont icon-right"></text> | ||||
@@ -57,7 +56,7 @@ | |||||
<navigator url="/pages/passCar/passCar" open-type="switchTab"> | <navigator url="/pages/passCar/passCar" open-type="switchTab"> | ||||
<view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
<view> | <view> | ||||
<image style='width:44rpx;' class='icons' src="{{cheUrl}}" mode='widthFix'></image>智能停车</view> | |||||
<image class='icons' src="{{cheUrl}}" mode='widthFix'></image>智能停车</view> | |||||
<view> | <view> | ||||
<text class="iconfont icon-right"></text> | <text class="iconfont icon-right"></text> | ||||
</view> | </view> | ||||
@@ -67,7 +66,7 @@ | |||||
<navigator url="/pages/specialcourtesy/specialcourtesy" wx:if="{{discountEnable}}"> | <navigator url="/pages/specialcourtesy/specialcourtesy" wx:if="{{discountEnable}}"> | ||||
<view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
<view> | <view> | ||||
<image style='width:50rpx;' class='icons' src="{{giftUrl}}" mode='widthFix'></image>特享礼遇</view> | |||||
<image class='icons' src="{{giftUrl}}" mode='widthFix'></image>特享礼遇</view> | |||||
<view> | <view> | ||||
<text class="iconfont icon-right"></text> | <text class="iconfont icon-right"></text> | ||||
</view> | </view> | ||||
@@ -77,7 +76,7 @@ | |||||
<navigator url="/pages/user/scoreHistory/index"> | <navigator url="/pages/user/scoreHistory/index"> | ||||
<view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
<view> | <view> | ||||
<image style='width:50rpx;' class='icons' src="{{giftUrl}}" mode='widthFix'></image>成长值记录</view> | |||||
<image class='icons' src="{{giftUrl}}" mode='widthFix'></image>成长值记录</view> | |||||
<view> | <view> | ||||
<text class="iconfont icon-right"></text> | <text class="iconfont icon-right"></text> | ||||
</view> | </view> | ||||
@@ -98,7 +97,7 @@ | |||||
<view class='showQrcode' bindtap='hideQrcode' wx:if="{{showQrcode}}"> | <view class='showQrcode' bindtap='hideQrcode' wx:if="{{showQrcode}}"> | ||||
<view class="canvas-box"> | <view class="canvas-box"> | ||||
<canvas hidden="{{canvasHidden}}" style="width: 500rpx;height:500rpx;background:0 0 0 .6;margin-top:10rpx;" canvas-id="mycanvas1" /> | |||||
<canvas hidden="{{canvasHidden}}" style="height:500rpx;background:0 0 0 .6;margin-top:10rpx;" canvas-id="mycanvas1" /> | |||||
<text class='memberIds'>会员号:{{memberId}}</text> | <text class='memberIds'>会员号:{{memberId}}</text> | ||||
</view> | </view> | ||||
</view> | </view> |
@@ -155,11 +155,11 @@ page{ | |||||
.user-btns .user-btn { | .user-btns .user-btn { | ||||
display: flex; | display: flex; | ||||
height: 88rpx; | |||||
height: 100rpx; | |||||
font-size: 30rpx; | font-size: 30rpx; | ||||
color: #333; | color: #333; | ||||
letter-spacing: 1.16rpx; | letter-spacing: 1.16rpx; | ||||
line-height: 88rpx; | |||||
line-height: 100rpx; | |||||
border-bottom: 1rpx solid #efefef; | border-bottom: 1rpx solid #efefef; | ||||
} | } | ||||
@@ -198,8 +198,8 @@ page{ | |||||
.user-out-btn { | .user-out-btn { | ||||
background-color: #fff; | background-color: #fff; | ||||
height: 88rpx; | |||||
line-height: 88rpx; | |||||
height: 100rpx; | |||||
line-height: 100rpx; | |||||
font-family: PingFangSC-Semibold; | font-family: PingFangSC-Semibold; | ||||
font-size: 30rpx; | font-size: 30rpx; | ||||
color: #000; | color: #000; | ||||
@@ -324,7 +324,7 @@ page{ | |||||
border-top: 1rpx solid #e5e5e5; | border-top: 1rpx solid #e5e5e5; | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
height: 88rpx; | |||||
height: 100rpx; | |||||
padding: 0 32rpx; | padding: 0 32rpx; | ||||
background-color: #fff; | background-color: #fff; | ||||
font-size: 34rpx; | font-size: 34rpx; | ||||