|
@ -1,10 +1,10 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view> |
|
|
<view> |
|
|
<view class="block"> |
|
|
<view class="block"> |
|
|
<view class="title"> |
|
|
<!-- <view class="title"> |
|
|
<text>我的账户</text> |
|
|
<text>我的账户</text> |
|
|
<text style="font-size: 28rpx;padding-left: 60rpx;color: #007AFF;" @click="gominxi">交易明细</text> |
|
|
<text style="font-size: 28rpx;padding-left: 60rpx;color: #007AFF;" @click="gominxi">交易明细</text> |
|
|
</view> |
|
|
</view> --> |
|
|
|
|
|
|
|
|
<view class="content"> |
|
|
<view class="content"> |
|
|
<view class="my"> |
|
|
<view class="my"> |
|
@ -19,7 +19,8 @@ |
|
|
<view class="content"> |
|
|
<view class="content"> |
|
|
<view class="amount"> |
|
|
<view class="amount"> |
|
|
<view class="list"> |
|
|
<view class="list"> |
|
|
<view class="box" v-for="(amount,index) in amountList" :key="index" @tap="select(amount)" :class="{'on':amount == inputAmount}"> |
|
|
<view class="box" v-for="(amount,index) in amountList" :key="index" @tap="select(amount)" |
|
|
|
|
|
:class="{'on':amount == inputAmount}"> |
|
|
{{amount}}元 |
|
|
{{amount}}元 |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -43,7 +44,7 @@ |
|
|
<!-- #ifdef APP-PLUS --> |
|
|
<!-- #ifdef APP-PLUS --> |
|
|
<view class="row" @tap="paytype='alipay'"> |
|
|
<view class="row" @tap="paytype='alipay'"> |
|
|
<view class="left"> |
|
|
<view class="left"> |
|
|
<image src="../../static/img/alipay.png"></image> |
|
|
<image style="width: 30px;height: 30px;" src="../../static/img/alipay.png"></image> |
|
|
</view> |
|
|
</view> |
|
|
<view class="center"> |
|
|
<view class="center"> |
|
|
支付宝支付 |
|
|
支付宝支付 |
|
@ -55,7 +56,7 @@ |
|
|
<!-- #endif --> |
|
|
<!-- #endif --> |
|
|
<view class="row" @tap="paytype='wxpay'"> |
|
|
<view class="row" @tap="paytype='wxpay'"> |
|
|
<view class="left"> |
|
|
<view class="left"> |
|
|
<image src="../../static/image/wechatpay.png"></image> |
|
|
<image style="width: 30px;height: 30px;" src="../../static/image/wechatpay.png"></image> |
|
|
</view> |
|
|
</view> |
|
|
<view class="center"> |
|
|
<view class="center"> |
|
|
微信支付 |
|
|
微信支付 |
|
@ -75,90 +76,99 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> --> |
|
|
</view> --> |
|
|
</view> |
|
|
</view> |
|
|
<view class="pay"> |
|
|
<!-- <view class="pay"> |
|
|
<view class="btn btn-tixi" @click="gopage">去提现</view> |
|
|
<view class="btn btn-tixi" @click="gopage">去提现</view> |
|
|
</view> |
|
|
</view> --> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue'; |
|
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue'; |
|
|
import Api from '@/common/api'; |
|
|
import Api from '@/common/api'; |
|
|
import eonfox from '@/components/eonfox/eonfox.js'; |
|
|
import eonfox from '@/components/eonfox/eonfox.js'; |
|
|
import fns from '@/components/eonfox/fns.js'; |
|
|
import fns from '@/components/eonfox/fns.js'; |
|
|
var ef=new eonfox() |
|
|
var ef = new eonfox() |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
money:0, |
|
|
money: 0, |
|
|
inputAmount:'',//金额 |
|
|
inputAmount: '', //金额 |
|
|
amountList:[100,200,500],//预设3个可选快捷金额 |
|
|
amountList: [100, 200, 500], //预设3个可选快捷金额 |
|
|
paytype:'wxpay'//支付类型 |
|
|
paytype: 'wxpay' //支付类型 |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onShow(){ |
|
|
onShow() { |
|
|
this.load() |
|
|
this.load() |
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
methods: { |
|
|
async load(){ |
|
|
async load() { |
|
|
let params = { }; |
|
|
let params = {}; |
|
|
let data1 = await Api.apiCall('get', Api.member.currentMember, params); |
|
|
let data1 = await Api.apiCall('get', Api.member.currentMember, params); |
|
|
this.money = data1.blance; |
|
|
this.money = data1.blance; |
|
|
}, |
|
|
}, |
|
|
async onload() { |
|
|
async onload() { |
|
|
let params = { }; |
|
|
let params = {}; |
|
|
let data1 = await Api.apiCall('get', Api.index.currentMember, params); |
|
|
let data1 = await Api.apiCall('get', Api.index.currentMember, params); |
|
|
this.money = data1.blance; |
|
|
this.money = data1.blance; |
|
|
}, |
|
|
}, |
|
|
select(amount){ |
|
|
select(amount) { |
|
|
this.inputAmount = amount; |
|
|
this.inputAmount = amount; |
|
|
}, |
|
|
}, |
|
|
doDeposit(){ |
|
|
doDeposit() { |
|
|
if(this.paytype=='alipay'){ |
|
|
if (this.paytype == 'alipay') { |
|
|
console.log('支付宝') |
|
|
console.log('支付宝') |
|
|
|
|
|
|
|
|
return |
|
|
return |
|
|
}else{ |
|
|
} else { |
|
|
console.log('微信') |
|
|
console.log('微信') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (parseFloat(this.inputAmount).toString() == "NaN") { |
|
|
if (parseFloat(this.inputAmount).toString() == "NaN") { |
|
|
uni.showToast({title:'请输入正确金额',icon:'none'}); |
|
|
uni.showToast({ |
|
|
return ; |
|
|
title: '请输入正确金额', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
if(this.inputAmount<=0){ |
|
|
if (this.inputAmount <= 0) { |
|
|
uni.showToast({title:'请输入大于100的金额',icon:'none'}); |
|
|
uni.showToast({ |
|
|
return ; |
|
|
title: '请输入大于100的金额', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
if(parseFloat(this.inputAmount).toFixed(2)!=parseFloat(this.inputAmount)){ |
|
|
if (parseFloat(this.inputAmount).toFixed(2) != parseFloat(this.inputAmount)) { |
|
|
uni.showToast({title:'最多只能输入两位小数哦~',icon:'none'}); |
|
|
uni.showToast({ |
|
|
return ; |
|
|
title: '最多只能输入两位小数哦~', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
//模板模拟支付,实际应用请调起微信/支付宝 |
|
|
//模板模拟支付,实际应用请调起微信/支付宝 |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title:'支付中...' |
|
|
title: '支付中...' |
|
|
}); |
|
|
}); |
|
|
setTimeout(()=>{ |
|
|
setTimeout(() => { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title:'支付成功' |
|
|
title: '支付成功' |
|
|
}); |
|
|
}); |
|
|
setTimeout(()=>{ |
|
|
setTimeout(() => { |
|
|
uni.switchTab({ |
|
|
uni.switchTab({ |
|
|
url:'../../pages/index/user' |
|
|
url: '../../pages/index/user' |
|
|
}); |
|
|
}); |
|
|
},300); |
|
|
}, 300); |
|
|
},700) |
|
|
}, 700) |
|
|
}, |
|
|
}, |
|
|
pay(){ |
|
|
pay() { |
|
|
var _this=this |
|
|
var _this = this |
|
|
if(!/^\d+(\.\d+)?$/.test(_this.inputAmount)||_this.inputAmount<=0){ |
|
|
if (!/^\d+(\.\d+)?$/.test(_this.inputAmount) || _this.inputAmount <= 0) { |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title:'请输入正确金额', |
|
|
title: '请输入正确金额', |
|
|
icon:'none' |
|
|
icon: 'none' |
|
|
}) |
|
|
}) |
|
|
}else{ |
|
|
} else { |
|
|
if(_this.paytype!='alipay'){ |
|
|
if (_this.paytype != 'alipay') { |
|
|
_this.WeChatPay() |
|
|
_this.WeChatPay() |
|
|
// // #ifdef MP-WEIXIN |
|
|
// // #ifdef MP-WEIXIN |
|
|
// _this.pay_mp_weixin() |
|
|
// _this.pay_mp_weixin() |
|
@ -167,11 +177,11 @@ import Api from '@/common/api'; |
|
|
// _this.pay_APP_weixin() |
|
|
// _this.pay_APP_weixin() |
|
|
// // #endif |
|
|
// // #endif |
|
|
} |
|
|
} |
|
|
if(_this.paytype=='alipay'){ |
|
|
if (_this.paytype == 'alipay') { |
|
|
// #ifdef H5 || MP-WEIXIN |
|
|
// #ifdef H5 || MP-WEIXIN |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: '开发中。。。', |
|
|
title: '开发中。。。', |
|
|
icon:'none' |
|
|
icon: 'none' |
|
|
}); |
|
|
}); |
|
|
// #endif |
|
|
// #endif |
|
|
// #ifdef APP-PLUS |
|
|
// #ifdef APP-PLUS |
|
@ -182,80 +192,67 @@ import Api from '@/common/api'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
payAli(){ |
|
|
payAli() { |
|
|
var _this=this; |
|
|
var _this = this; |
|
|
ef.submit({ |
|
|
ef.submit({ |
|
|
request: { |
|
|
request: { |
|
|
s: ['APPLICATIONORDERSELFBUYUSERMONEY', [{ |
|
|
s: ['APPLICATIONORDERSELFBUYUSERMONEY', [{ |
|
|
money_fen:_this.inputAmount*100,//必须|要购买余额(人民币,分) |
|
|
money_fen: _this.inputAmount * 100, //必须|要购买余额(人民币,分) |
|
|
pay_method: 'alipay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
pay_method: 'alipay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
alipay_trade_type:'APP' |
|
|
alipay_trade_type: 'APP' |
|
|
} ]] |
|
|
}]] |
|
|
}, |
|
|
}, |
|
|
callback(data){ |
|
|
callback(data) { |
|
|
console.log('调起支付宝支付',data) |
|
|
console.log('调起支付宝支付', data) |
|
|
|
|
|
|
|
|
fns.checkError(data,'s',function(errno,error){ |
|
|
fns.checkError(data, 's', function(errno, error) { |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title:error, |
|
|
title: error, |
|
|
icon:'none' |
|
|
icon: 'none' |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
var ali=data.data.s.data.alipay |
|
|
var ali = data.data.s.data.alipay |
|
|
if(ali){ |
|
|
if (ali) { |
|
|
uni.requestPayment({ |
|
|
uni.requestPayment({ |
|
|
provider: 'alipay', |
|
|
provider: 'alipay', |
|
|
orderInfo:ali, |
|
|
orderInfo: ali, |
|
|
success: function (res) { |
|
|
success: function(res) { |
|
|
console.log('success:' + JSON.stringify(res)); |
|
|
console.log('success:' + JSON.stringify(res)); |
|
|
_this.onload() |
|
|
_this.onload() |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title:'充值成功', |
|
|
title: '充值成功', |
|
|
icon:'none' |
|
|
icon: 'none' |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
fail: function (err) { |
|
|
fail: function(err) { |
|
|
console.log('fail:' + JSON.stringify(err)); |
|
|
console.log('fail:' + JSON.stringify(err)); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
error(err){ |
|
|
error(err) { |
|
|
fns.err('提交订单失败',err,1) |
|
|
fns.err('提交订单失败', err, 1) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 微信充值 |
|
|
// 微信充值 |
|
|
WeChatPay(){ |
|
|
WeChatPay() { |
|
|
var _this=this |
|
|
var _this = this |
|
|
// if (!/^\d+(\.\d+)?$/.test(_this.pay_money) || _this.pay_money <= 0) { |
|
|
var money_fen = _this.inputAmount * 100 |
|
|
// uni.showToast({ |
|
|
|
|
|
// title: '请输入正确金额', |
|
|
|
|
|
// icon: 'none' |
|
|
|
|
|
// }); |
|
|
|
|
|
// }else{ |
|
|
|
|
|
var money_fen=_this.inputAmount*100 |
|
|
|
|
|
// if(_this.tabIndex!=0){ |
|
|
|
|
|
// money_fen=_this.tabIndex*100 |
|
|
|
|
|
// }else{ |
|
|
|
|
|
// money_fen=_this.pay_money*100 |
|
|
|
|
|
// } |
|
|
|
|
|
// APP充值 |
|
|
// APP充值 |
|
|
// #ifdef APP-PLUS |
|
|
// #ifdef APP-PLUS |
|
|
ef.submit({ |
|
|
ef.submit({ |
|
|
request: { |
|
|
request: { |
|
|
s: [ |
|
|
s: [ |
|
|
'APPLICATIONORDERSELFBUYUSERMONEY', |
|
|
'APPLICATIONORDERSELFBUYUSERMONEY', |
|
|
[ |
|
|
[{ |
|
|
{ |
|
|
|
|
|
money_fen: money_fen, //必须|要购买余额(人民币,分) |
|
|
money_fen: money_fen, //必须|要购买余额(人民币,分) |
|
|
pay_method: 'weixinpay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
pay_method: 'weixinpay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
weixin_trade_type: 'APP' |
|
|
weixin_trade_type: 'APP' |
|
|
} |
|
|
}] |
|
|
] |
|
|
|
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
callback: function(data) { |
|
|
callback: function(data) { |
|
@ -300,8 +297,7 @@ import Api from '@/common/api'; |
|
|
request: { |
|
|
request: { |
|
|
s: [ |
|
|
s: [ |
|
|
'APPLICATIONORDERSELFBUYUSERMONEY', |
|
|
'APPLICATIONORDERSELFBUYUSERMONEY', |
|
|
[ |
|
|
[{ |
|
|
{ |
|
|
|
|
|
money_fen: money_fen, //必须|要购买余额(人民币,分) |
|
|
money_fen: money_fen, //必须|要购买余额(人民币,分) |
|
|
// #ifdef MP-WEIXIN |
|
|
// #ifdef MP-WEIXIN |
|
|
weixin_login_code: _this.code, |
|
|
weixin_login_code: _this.code, |
|
@ -313,8 +309,7 @@ import Api from '@/common/api'; |
|
|
pay_method: 'weixinpay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
pay_method: 'weixinpay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
weixin_trade_type: 'APP' |
|
|
weixin_trade_type: 'APP' |
|
|
// #endif |
|
|
// #endif |
|
|
} |
|
|
}] |
|
|
] |
|
|
|
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
callback: function(data) { |
|
|
callback: function(data) { |
|
@ -376,14 +371,12 @@ import Api from '@/common/api'; |
|
|
ef.submit({ |
|
|
ef.submit({ |
|
|
request: { |
|
|
request: { |
|
|
s: ['APPLICATIONORDERSELFBUYUSERMONEY', |
|
|
s: ['APPLICATIONORDERSELFBUYUSERMONEY', |
|
|
[ |
|
|
[{ |
|
|
{ |
|
|
|
|
|
money_fen: money_fen, //必须|要购买余额(人民币,分) |
|
|
money_fen: money_fen, //必须|要购买余额(人民币,分) |
|
|
pay_method: 'weixinpay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
pay_method: 'weixinpay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
weixin_trade_type: 'MPJSAPI', |
|
|
weixin_trade_type: 'MPJSAPI', |
|
|
weixin_login_openid: dataList.s.openid |
|
|
weixin_login_openid: dataList.s.openid |
|
|
} |
|
|
}] |
|
|
] |
|
|
|
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -401,9 +394,11 @@ import Api from '@/common/api'; |
|
|
|
|
|
|
|
|
var getBrandWCPayRequest = { |
|
|
var getBrandWCPayRequest = { |
|
|
appId: ress.appid, |
|
|
appId: ress.appid, |
|
|
timeStamp: String(ress.time_stamp), // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 |
|
|
timeStamp: String(ress |
|
|
|
|
|
.time_stamp), // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 |
|
|
nonceStr: ress.nonce_str, // 支付签名随机串,不长于 32 位 |
|
|
nonceStr: ress.nonce_str, // 支付签名随机串,不长于 32 位 |
|
|
package: 'prepay_id=' + ress.prepay_id, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*) |
|
|
package: 'prepay_id=' + ress |
|
|
|
|
|
.prepay_id, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*) |
|
|
signType: ress.sign_type, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5' |
|
|
signType: ress.sign_type, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5' |
|
|
paySign: ress.pay_sign, // 支付签名 |
|
|
paySign: ress.pay_sign, // 支付签名 |
|
|
}; |
|
|
}; |
|
@ -426,13 +421,15 @@ import Api from '@/common/api'; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
if (res.err_msg == "get_brand_wcpay_request:fail") { |
|
|
if (res.err_msg == |
|
|
|
|
|
"get_brand_wcpay_request:fail") { |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: '支付失败', |
|
|
title: '支付失败', |
|
|
icon: 'none' |
|
|
icon: 'none' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
if (res.err_msg == "get_brand_wcpay_request:cancel") { |
|
|
if (res.err_msg == |
|
|
|
|
|
"get_brand_wcpay_request:cancel") { |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: '已取消支付', |
|
|
title: '已取消支付', |
|
|
icon: 'none', |
|
|
icon: 'none', |
|
@ -450,10 +447,12 @@ import Api from '@/common/api'; |
|
|
|
|
|
|
|
|
if (typeof WeixinJSBridge == "undefined") { |
|
|
if (typeof WeixinJSBridge == "undefined") { |
|
|
if (document.addEventListener) { |
|
|
if (document.addEventListener) { |
|
|
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false); |
|
|
document.addEventListener('WeixinJSBridgeReady', |
|
|
|
|
|
onBridgeReady, false); |
|
|
} else if (document.attachEvent) { |
|
|
} else if (document.attachEvent) { |
|
|
document.attachEvent('WeixinJSBridgeReady', onBridgeReady); |
|
|
document.attachEvent('WeixinJSBridgeReady', onBridgeReady); |
|
|
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady); |
|
|
document.attachEvent('onWeixinJSBridgeReady', |
|
|
|
|
|
onBridgeReady); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
onBridgeReady(); |
|
|
onBridgeReady(); |
|
@ -480,7 +479,8 @@ import Api from '@/common/api'; |
|
|
//当 ACCESSTOKEN 不存在 |
|
|
//当 ACCESSTOKEN 不存在 |
|
|
ef.left_token(function(left_token) { |
|
|
ef.left_token(function(left_token) { |
|
|
var notify_url = encodeURIComponent(location.href); |
|
|
var notify_url = encodeURIComponent(location.href); |
|
|
var url = ef.api_server_url + "?" + encodeURI('data=[["SESSIONWEIXINAUTHORIZE",[{"notify_url":"' + |
|
|
var url = ef.api_server_url + "?" + encodeURI( |
|
|
|
|
|
'data=[["SESSIONWEIXINAUTHORIZE",[{"notify_url":"' + |
|
|
notify_url + '"}]]]') + "&token=" + left_token; |
|
|
notify_url + '"}]]]') + "&token=" + left_token; |
|
|
console.log(url); |
|
|
console.log(url); |
|
|
location.href = url; |
|
|
location.href = url; |
|
@ -503,13 +503,11 @@ import Api from '@/common/api'; |
|
|
request: { |
|
|
request: { |
|
|
s: [ |
|
|
s: [ |
|
|
'APPLICATIONORDERSELFBUYUSERMONEY', |
|
|
'APPLICATIONORDERSELFBUYUSERMONEY', |
|
|
[ |
|
|
[{ |
|
|
{ |
|
|
|
|
|
money_fen: _this.pay_money * 100, //必须|要购买余额(人民币,分) |
|
|
money_fen: _this.pay_money * 100, //必须|要购买余额(人民币,分) |
|
|
pay_method: 'weixinpay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
pay_method: 'weixinpay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
weixin_trade_type: 'APP' |
|
|
weixin_trade_type: 'APP' |
|
|
} |
|
|
}] |
|
|
] |
|
|
|
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
callback: function(data) { |
|
|
callback: function(data) { |
|
@ -555,8 +553,7 @@ import Api from '@/common/api'; |
|
|
request: { |
|
|
request: { |
|
|
s: [ |
|
|
s: [ |
|
|
'APPLICATIONORDERSELFBUYUSERMONEY', |
|
|
'APPLICATIONORDERSELFBUYUSERMONEY', |
|
|
[ |
|
|
[{ |
|
|
{ |
|
|
|
|
|
money_fen: _this.pay_money * 100, //必须|要购买余额(人民币,分) |
|
|
money_fen: _this.pay_money * 100, //必须|要购买余额(人民币,分) |
|
|
// #ifdef MP-WEIXIN |
|
|
// #ifdef MP-WEIXIN |
|
|
weixin_login_code: _this.code, |
|
|
weixin_login_code: _this.code, |
|
@ -568,8 +565,7 @@ import Api from '@/common/api'; |
|
|
pay_method: 'weixinpay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
pay_method: 'weixinpay', //支付方式 weixinpay 微信支付、alipay 支付宝支付 |
|
|
weixin_trade_type: 'APP' |
|
|
weixin_trade_type: 'APP' |
|
|
// #endif |
|
|
// #endif |
|
|
} |
|
|
}] |
|
|
] |
|
|
|
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
callback: function(data) { |
|
|
callback: function(data) { |
|
@ -692,11 +688,9 @@ import Api from '@/common/api'; |
|
|
request: { |
|
|
request: { |
|
|
s: [ |
|
|
s: [ |
|
|
'APPLICATIONORDERSELFPAYSTATE', |
|
|
'APPLICATIONORDERSELFPAYSTATE', |
|
|
[ |
|
|
[{ |
|
|
{ |
|
|
|
|
|
order_id: order_id |
|
|
order_id: order_id |
|
|
} |
|
|
}] |
|
|
] |
|
|
|
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
callback: function(data) { |
|
|
callback: function(data) { |
|
@ -715,12 +709,12 @@ import Api from '@/common/api'; |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
gominxi(){ |
|
|
gominxi() { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '../../pagesU/user/balance' |
|
|
url: '../../pagesU/user/balance' |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
gopage(){ |
|
|
gopage() { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '../../pagesU/user/myPurse' |
|
|
url: '../../pagesU/user/myPurse' |
|
|
}) |
|
|
}) |
|
@ -733,15 +727,17 @@ import Api from '@/common/api'; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
<style lang="scss"> |
|
|
.block{ |
|
|
.block { |
|
|
width: 94%; |
|
|
width: 94%; |
|
|
padding: 20upx 3%; |
|
|
padding: 20upx 3%; |
|
|
.title{ |
|
|
|
|
|
|
|
|
.title { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
font-size: 34upx; |
|
|
font-size: 34upx; |
|
|
} |
|
|
} |
|
|
.content{ |
|
|
|
|
|
.my{ |
|
|
.content { |
|
|
|
|
|
.my { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 120upx; |
|
|
height: 120upx; |
|
|
display: flex; |
|
|
display: flex; |
|
@ -749,46 +745,53 @@ import Api from '@/common/api'; |
|
|
font-size: 30upx; |
|
|
font-size: 30upx; |
|
|
border-bottom: solid 1upx #eee; |
|
|
border-bottom: solid 1upx #eee; |
|
|
} |
|
|
} |
|
|
.amount{ |
|
|
|
|
|
|
|
|
.amount { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
|
|
|
|
|
|
.list{ |
|
|
.list { |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
padding: 20upx 0; |
|
|
padding: 20upx 0; |
|
|
.box{ |
|
|
|
|
|
|
|
|
.box { |
|
|
width: 30%; |
|
|
width: 30%; |
|
|
height: 120upx; |
|
|
height: 120upx; |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
border-radius: 10upx; |
|
|
border-radius: 10upx; |
|
|
box-shadow: 0upx 5upx 20upx rgba(0,0,0,0.05); |
|
|
box-shadow: 0upx 5upx 20upx rgba(0, 0, 0, 0.05); |
|
|
font-size: 36upx; |
|
|
font-size: 36upx; |
|
|
background-color: #f1f1f1; |
|
|
background-color: #f1f1f1; |
|
|
color: 333; |
|
|
color: 333; |
|
|
&.on{ |
|
|
|
|
|
|
|
|
&.on { |
|
|
background-color: $uni-color-success; |
|
|
background-color: $uni-color-success; |
|
|
color: #fff; |
|
|
color: #fff; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.num{ |
|
|
|
|
|
|
|
|
.num { |
|
|
margin-top: 10upx; |
|
|
margin-top: 10upx; |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: flex-end; |
|
|
justify-content: flex-end; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
.text{ |
|
|
|
|
|
|
|
|
.text { |
|
|
padding-right: 10upx; |
|
|
padding-right: 10upx; |
|
|
font-size: 30upx; |
|
|
font-size: 30upx; |
|
|
} |
|
|
} |
|
|
.input{ |
|
|
|
|
|
|
|
|
.input { |
|
|
width: 28.2vw; |
|
|
width: 28.2vw; |
|
|
border-bottom: solid 2upx #999; |
|
|
border-bottom: solid 2upx #999; |
|
|
|
|
|
|
|
|
justify-content: flex-end; |
|
|
justify-content: flex-end; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
input{ |
|
|
|
|
|
|
|
|
input { |
|
|
margin: 0 20upx; |
|
|
margin: 0 20upx; |
|
|
height: 60upx; |
|
|
height: 60upx; |
|
|
font-size: 30upx; |
|
|
font-size: 30upx; |
|
@ -799,29 +802,35 @@ import Api from '@/common/api'; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.pay-list{ |
|
|
|
|
|
|
|
|
.pay-list { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
border-bottom: solid 1upx #eee; |
|
|
border-bottom: solid 1upx #eee; |
|
|
.row{ |
|
|
|
|
|
|
|
|
.row { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 120upx; |
|
|
height: 120upx; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
.left{ |
|
|
|
|
|
width: 100upx; |
|
|
.left { |
|
|
flex-shrink: 0; |
|
|
flex-shrink: 0; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
image{ |
|
|
|
|
|
|
|
|
image { |
|
|
width: 80upx; |
|
|
width: 80upx; |
|
|
height: 80upx; |
|
|
height: 80upx; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.center{ |
|
|
|
|
|
|
|
|
.center { |
|
|
|
|
|
margin-left: 15px; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
font-size: 30upx; |
|
|
font-size: 30upx; |
|
|
} |
|
|
} |
|
|
.right{ |
|
|
|
|
|
|
|
|
.right { |
|
|
width: 100upx; |
|
|
width: 100upx; |
|
|
flex-shrink: 0; |
|
|
flex-shrink: 0; |
|
|
display: flex; |
|
|
display: flex; |
|
@ -831,13 +840,15 @@ import Api from '@/common/api'; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.pay{ |
|
|
|
|
|
|
|
|
.pay { |
|
|
margin-top: 20upx; |
|
|
margin-top: 20upx; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
flex-wrap: wrap; |
|
|
flex-wrap: wrap; |
|
|
.btn{ |
|
|
|
|
|
|
|
|
.btn { |
|
|
width: 70%; |
|
|
width: 70%; |
|
|
height: 80upx; |
|
|
height: 80upx; |
|
|
border-radius: 80upx; |
|
|
border-radius: 80upx; |
|
@ -846,14 +857,16 @@ import Api from '@/common/api'; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
color: #fff; |
|
|
color: #fff; |
|
|
background-color: $uni-color-success; |
|
|
background-color: $uni-color-success; |
|
|
box-shadow: 0upx 5upx 10upx rgba(0,0,0,0.2); |
|
|
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.2); |
|
|
} |
|
|
} |
|
|
.btn-tixi{ |
|
|
|
|
|
|
|
|
.btn-tixi { |
|
|
color: $uni-color-success; |
|
|
color: $uni-color-success; |
|
|
background: #FFFFFF; |
|
|
background: #FFFFFF; |
|
|
border:1upx solid $uni-color-success; |
|
|
border: 1upx solid $uni-color-success; |
|
|
} |
|
|
} |
|
|
.tis{ |
|
|
|
|
|
|
|
|
.tis { |
|
|
margin-top: 10upx; |
|
|
margin-top: 10upx; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
font-size: 24upx; |
|
|
font-size: 24upx; |
|
@ -861,7 +874,8 @@ import Api from '@/common/api'; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: baseline; |
|
|
align-items: baseline; |
|
|
color: #999; |
|
|
color: #999; |
|
|
.terms{ |
|
|
|
|
|
|
|
|
.terms { |
|
|
color: #5a9ef7; |
|
|
color: #5a9ef7; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|