浏览代码

[券包,卡包,个人中心,扫一扫付款]

tags/广东版3.2.1
meo 6 年前
父节点
当前提交
9e781f1e03
共有 14 个文件被更改,包括 164 次插入112 次删除
  1. 二进制
      assets/images/give.png
  2. 二进制
      assets/images/icon01.png
  3. +11
    -24
      pages/cardorder/index/index.js
  4. +8
    -13
      pages/cardorder/index/index.wxml
  5. +26
    -29
      pages/cardorder/index/index.wxss
  6. +1
    -0
      pages/couponorder/index/index.wxml
  7. +14
    -7
      pages/couponorder/index/index.wxss
  8. +3
    -9
      pages/order/index/index.wxml
  9. +8
    -1
      pages/order/index/index.wxss
  10. +80
    -4
      pages/scanPay/scanPay.js
  11. +4
    -4
      pages/scanPay/scanPay.wxml
  12. +6
    -1
      pages/scanPay/scanPay.wxss
  13. +0
    -17
      pages/user/index.wxml
  14. +3
    -3
      pages/user/index.wxss

二进制
assets/images/give.png 查看文件

之前 之后
宽度: 200  |  高度: 200  |  大小: 10 KiB

二进制
assets/images/icon01.png 查看文件

之前 之后
宽度: 46  |  高度: 46  |  大小: 1.5 KiB

+ 11
- 24
pages/cardorder/index/index.js 查看文件

@@ -45,10 +45,8 @@ Page({
let that = this;
wx.scanCode({
success: (res) => {
that.merChantId = res.result;
console.log(res);
wx.navigateTo({
url: `/pages/scanPay/scanPay?`,
url: `/pages/scanPay/scanPay?merChant=${res.result}&cardid=${e.currentTarget.dataset.cardid}`,
})
},
fail: (res) => {
@@ -56,27 +54,7 @@ Page({
}
})
},
// gotoPayMoney:function(){
// let that = this;
// Http.post({
// url: config.api.orderCreate,
// data: {
// cardId: e.currentTarget.dataset.cardid,
// merchantCode: that.data.merChantId,
// totalFee: "5"
// }
// })
// .then(res => {
// console.log(res)
// })
// .catch(err => {
// wx.showModal({
// title: "抱歉",
// content: err.message,
// showCancel: false
// })
// })
// },
//点击跳转到券详情页面
gotouse: function (e) {
if (this.data.mystatus == '' || this.data.mystatus == 'undefined') {
@@ -124,6 +102,15 @@ Page({
}
res.data.list.map(file => {
file.expiredTime = util.fmtDate(file.expiredTime);
if (file.remainingAmount > 0 && 500 >= file.remainingAmount){
file.background = '#7184E2'
}
else if (file.remainingAmount > 500 && 5000 >= file.remainingAmount) {
file.background = '#63AAE6'
}
else if (file.remainingAmount > 5000) {
file.background = '#E2A471'
}
});
setTimeout(function () {
that.setData({


+ 8
- 13
pages/cardorder/index/index.wxml 查看文件

@@ -14,27 +14,22 @@
</view>

<view class='section' wx:for='{{list}}' wx:key='{{index}}'>
<view class='mms'>
<view class='mms' style='background:{{item.background}}'>
<view class='detail_msg'>
<view class='logo'>
<image mode="aspectFill" src='{{item.coverImg}}'></image>
</view>
<view class='info'>
<view class='title'>
<text>{{item.title}}</text>
<image class='fr' src='./../../../assets/images/icon01.png' mode="widthFix"></image>
</view>
<view class='subtitle'>
<text>{{item.subTitle}}</text>
<view class='expiretime'>
<text class="txt2">{{item.expiredTime}}到期</text>
<text class='txt2 fr'>金额<text class='money'>{{item.remainingAmount/10000}}</text>元</text>
</view>
<view hover-class='active' bindtap='gotoPay' data-cardId="{{item.id}}" data-couponorderstatus="{{item.couponOrderStatus}}" wx:if="{{item.couponOrderStatus==4}}" class="btns">扫一扫</view>
<view hover-class='active' wx:if="{{item.couponOrderStatus!=4}}" class="btns">已失效</view>
<view hover-class='active' bindtap='gotoPay' data-cardId="{{item.id}}" data-couponorderstatus="{{item.couponOrderStatus}}" wx:if="{{item.couponOrderStatus==4}}" class="btns">扫一扫付款</view>
<view hover-class='active' wx:if="{{item.couponOrderStatus!=4}}" class="btns">已失效</view>
</view>
</view>
<image class="liness" src='{{linessUrl}}' mode="widthFix"></image>
<view class='expiretime'>
<text class="txt1">有效期至:</text>
<text class="txt2">{{item.expiredTime}}</text>
</view>

</view>
</view>
<view class="loading" wx:if="{{loading}}">


+ 26
- 29
pages/cardorder/index/index.wxss 查看文件

@@ -26,23 +26,16 @@

.mms {
width: 690rpx;
height: 170rpx !important;
background: #fff;
padding: 30rpx 0 0;
padding: 36rpx 0 0;
margin: 0 auto 40rpx;
border-radius: 16rpx;
border-top: 8rpx solid #02b7ff;
box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10);
}

.detail_msg {
display: flex;
padding-bottom: 26rpx;
}

.expiretime {
display: block;
width: 100%;
width: 100%!important;
text-align: left;
text-indent: 1em;
height: 40rpx;
@@ -51,7 +44,14 @@
color: #333;
letter-spacing: 0;
}

.expiretime .fr{
margin-right: 20rpx;
}
.money{
margin-left: 10rpx;
font-size: 30rpx;
font-weight: bold;
}
.liness {
display: block;
width: 100%;
@@ -86,19 +86,19 @@
font-size: 32rpx;
line-height: 32rpx;
height: 32rpx;
color: #333;
color: #fff;
letter-spacing: 0;
width: 400rpx;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin-bottom: 10rpx;
}

.info view:nth-child(2) {
padding-left: 2%;
font-size: 22rpx;
color: #333;
font-size: 26rpx;
color: #fff;
letter-spacing: 0;
margin-top: 6rpx;
display: inline-block;
@@ -108,32 +108,25 @@
width: 400rpx;
}

.info view:nth-child(3) {
margin-left: 20rpx;
}

.btns {
position: absolute;
right: 57rpx;
top: 38rpx;
width: 120rpx;
height: 48rpx;
line-height: 48rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
border: 2rpx solid #02c0ff;
border-radius: 60rpx;
color: #02c0ff;
color: #fff;
font-size: 28rpx;
margin-top: 46rpx;
border-top:1px solid #e6e6e6;
}

.active {
color: #fff;
background: #02c0ff;
opacity: .6;
}

.txt1 {
font-size: 22rpx;
color: #333;
font-size: 24rpx;
color: #fff;
letter-spacing: 0;
}

@@ -203,3 +196,7 @@
text-align: center;
line-height: 32px;
}
.title .fr{
width: 30rpx;
margin-right: 10rpx;
}

+ 1
- 0
pages/couponorder/index/index.wxml 查看文件

@@ -36,6 +36,7 @@
<text class="txt2">{{item.expiredTime}}</text>
</view>
</view>
<image class='sendImg' wx:if="{{item.sendChannelType!=1&&item.sendChannelType!=undefined}}" src='./../../../assets/images/give.png' mode='widthFix'></image>
</view>
<view class="loading" wx:if="{{loading}}">
<image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}


+ 14
- 7
pages/couponorder/index/index.wxss 查看文件

@@ -25,8 +25,9 @@
}

.mms {
position: relative;
width: 690rpx;
height: 170rpx !important;
height: 197rpx !important;
background: #fff;
padding: 30rpx 0 0;
margin: 0 auto 40rpx;
@@ -45,9 +46,9 @@
width: 100%;
text-align: left;
text-indent: 1em;
height: 40rpx;
line-height: 36rpx;
font-size: 22rpx;
height:54rpx;
line-height:54rpx;
font-size: 26rpx;
color: #333;
letter-spacing: 0;
}
@@ -114,14 +115,14 @@

.btns {
position: absolute;
right: 57rpx;
right: 30rpx;
top: 38rpx;
width: 120rpx;
height: 48rpx;
line-height: 48rpx;
text-align: center;
border: 2rpx solid #02c0ff;
border-radius: 60rpx;
border-radius: 10rpx;
color: #02c0ff;
font-size: 28rpx;
}
@@ -132,7 +133,7 @@
}

.txt1 {
font-size: 22rpx;
font-size: 26rpx;
color: #333;
letter-spacing: 0;
}
@@ -203,3 +204,9 @@
text-align: center;
line-height: 32px;
}
.sendImg{
position: absolute;
width: 100rpx;
top:109rpx;
right:72rpx;
}

+ 3
- 9
pages/order/index/index.wxml 查看文件

@@ -21,6 +21,9 @@
</view>
<view class="sub">{{item.subTitle}}</view>
<view class="value">面额:<text wx:if="{{item.unit==0}}">{{item.price/100}}元</text><text wx:if="{{item.unit==1}}">{{item.price/100}}小时</text></view>
<image class='sendImg' wx:if="{{item.sendChannelType!=1&&item.sendChannelType!=undefined}}" src='./../../../assets/images/give.png' mode='widthFix'></image>
<view class="value">下单时间:<text>{{item.createDate}}</text>
</view>
</view>
@@ -41,15 +44,6 @@
<view wx:if="{{item.orderStatus==0}}" class="btn" data-id="{{item.id}}" bindtap="gotopay">
<text>去支付</text>
</view>
<!-- <view wx:if="{{item.orderStatus==2}}" style="background:#999;opacity: .6;" class="btn">
<text>已取消</text>
</view> -->
<!-- <view wx:if="{{item.orderStatus==3}}" style="background:#999;opacity: .6;color:#fff;" class="btn">
<text>待退款</text>
</view> -->
<!-- <view wx:if="{{item.orderStatus==4}}" style="background:#999;opacity: .6;" class="btn">
<text>已退款</text>
</view> -->
<view wx:if="{{item.orderStatus==5}}" style="background:#999;opacity: .6;" class="btn">
<text>退款失败</text>
</view>


+ 8
- 1
pages/order/index/index.wxss 查看文件

@@ -20,6 +20,7 @@
}
.detail_msg {
position: relative;
width: 92%;
background: #fff;
display: flex;
@@ -28,6 +29,12 @@
padding-top: 30rpx;
border-bottom: 1rpx solid #eee;
}
.sendImg{
position: absolute;
width: 100rpx;
top: 100rpx;
right: 6rpx;
}
.logo {
display: block;
@@ -188,7 +195,7 @@ text-overflow: ellipsis;
float: right;
font-size: 28rpx;
border: 2rpx solid #02c0ff;
border-radius: 30rpx;
border-radius: 10rpx;
}
.payment view:nth-child(2) text {


+ 80
- 4
pages/scanPay/scanPay.js 查看文件

@@ -1,20 +1,96 @@
// pages/scanPay/scanPay.js
const util = require("../../utils/util.js");
const config = require("../../config/config.js");
const Http = require("../../utils/HttpBasics");
let app = getApp();
Page({

/**
* 页面的初始数据
*/
data: {

merChant:{},
focus: true,
inputValue: ''
},

/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {

console.log(options)
let that = this;
that.setData({
merChant: JSON.parse(options.merChant),
cardid:options.cardid
})
},
bindKeyInput(e) {
console.log(e)
this.setData({
inputValue: e.detail.value
})
console.log(this.data.inputValue)
},
gotoPayMoney:function(){
let that = this;
Http.post({
url: config.api.orderCreate,
data: {
cardId: that.data.cardid,
merchantCode: that.data.merChant.merchant_id,
totalFee: that.data.inputValue
}
})
.then(res => {
console.log(res)
})
.catch(err => {
wx.showModal({
title: "抱歉",
content: err.message,
showCancel: false
})
})
},
gotoPayMoneys(e) {
var that = this;
if (wx.canIUse("checkIsSupportSoterAuthentication")) {
//判断此接口是否可用
console.log(e)
wx.checkIsSupportSoterAuthentication({
success: function (res) {
console.log('本机支持的 SOTER 生物认证', res);
var keys = [];
for (var key in res) {
keys.push(res[key])
}
console.log(res)
that.setData({
print: keys//页面中输出支持情况
})
if (res.supportMode == "fingerPrint") {
wx.startSoterAuthentication({
requestAuthModes: ['fingerPrint'],
challenge: '123456',
authContent: "请用指纹解锁",
success: function (res) {
console.log('js', res);
},
fail: function (res) {
that.setData({
c: "用户取消了指纹识别,或调用出现错误"
})
}
})
} else {
that.setData({
b: "当前该设备不支持指纹识别"
})
}
}
})
}
},

/**
* 生命周期函数--监听页面初次渲染完成
*/


+ 4
- 4
pages/scanPay/scanPay.wxml 查看文件

@@ -1,12 +1,12 @@
<view class='content'>
<view class='head clearfix'>
<text class='fl'>付款给呷脯呷脯</text>
<image class='fr' src='./../../assets/img/logo.png' mode='widthFix'></image>
<text class='fl'>付款给{{merChant.merchant_name}}</text>
<image class='fr' src='{{merChant.merchant_img_url}}' mode='widthFix'></image>
</view>
<text class='txt1'>金额</text>
<view class='money'>
<text class='icon'>¥</text>
<text class='num'>200</text>
<button>确认付款</button>
<input bindinput="bindKeyInput" class='num' type="digit" focus='true' placeholder="" />
<button bindtap='gotoPayMoney'>确认付款</button>
</view>
</view>

+ 6
- 1
pages/scanPay/scanPay.wxss 查看文件

@@ -36,8 +36,13 @@
color:rgba(51,51,51,1);
}
.money .num{
font-size:77rpx;
font-size:60rpx!important;
font-family:PingFang-SC-Bold;
font-weight:bold;
color:rgba(51,51,51,1);
display: inline-block!important;
width: 300rpx;
height: 60rpx;
margin-top: 20rpx;
line-height: 60rpx;
}

+ 0
- 17
pages/user/index.wxml 查看文件

@@ -29,23 +29,6 @@
<view class="user-btn app-border-bottom">
<view>
<image class='icons' style='width:36rpx;' src="{{dingUrl}}" mode='widthFix'></image>我的订单</view>
<view>
<text class='look'>查看全部</text>
<text class="iconfont icon-right"></text>
</view>
</view>
</navigator>
<navigator url="/pages/order/index/index?id=0">
<view class="user-btn app-border-bottom">
<view style='padding-left:64rpx;color:#666;'>待付款</view>
<view>
<text class="iconfont icon-right"></text>
</view>
</view>
</navigator>
<navigator url="/pages/order/index/index?id=1">
<view class="user-btn app-border-bottom">
<view style='padding-left:64rpx;color:#666;'>已完成</view>
<view>
<text class="iconfont icon-right"></text>
</view>


+ 3
- 3
pages/user/index.wxss 查看文件

@@ -183,11 +183,11 @@ page{
right: 0;
top: 0;
bottom: 0;
width: 44rpx;
height: 44rpx;
width: 30rpx;
height: 30rpx;
line-height: 44rpx;
color: #c7c7cc;
font-size: 44rpx;
font-size: 30rpx;
margin: auto;
}



正在加载...
取消
保存