|
|
@@ -13,16 +13,23 @@ |
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="input-box">
|
|
|
|
<input v-model="state.money" placeholder="请输入金额" class="input" />
|
|
|
|
<view class="tips">最低充值金额不小于10元</view>
|
|
|
|
</view>
|
|
|
|
<view class="tabs">
|
|
|
|
<view class="tab-tit as-gravity-center-start">充值方式
|
|
|
|
<radio-group @change="radioChange" style="margin-left: 40rpx;flex: 1;display:flex;margin-right: 30rpx;">
|
|
|
|
<radio class="as-weight as-gravity-center" value="blu" :checked="state.transWay === 'blu'">蓝牙</radio>
|
|
|
|
<radio class="as-weight" value="nfc" :checked="state.transWay === 'nfc'">NFC</radio>
|
|
|
|
</radio-group>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="tab-tit">在线充值</view>
|
|
|
|
<view class="tab">
|
|
|
|
<view v-for="(item,index) in state.moneryArray" @click="tableIndexAction(index)" :key="index"
|
|
|
|
:class="{'item':state.moneryArray,'active':state.tableIndex===index}">{{item.name}}</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="btn btn-primary" @click="rechargeAction">立即充值</view>
|
|
|
@@ -75,7 +82,7 @@ |
|
|
|
const bluetoothUtil = require("../../static/etcUtil/index.js");
|
|
|
|
const cmd = require("../../static/etcUtil/cmdConfig.js");
|
|
|
|
const tools = require("../../static/etcUtil/tools.js");
|
|
|
|
const NFCAPI = require('../../utils/nfc/NFCAPI.js');
|
|
|
|
const NFCAPI = require('../../static/nfc/NFCAPI.js');
|
|
|
|
|
|
|
|
const state = reactive({
|
|
|
|
isShowBlue: false,
|
|
|
@@ -104,7 +111,7 @@ |
|
|
|
fee: 5000,
|
|
|
|
money: 50,
|
|
|
|
orderNum: "",
|
|
|
|
transWay: "", //“blu”为蓝牙充值方式、“nfc”为NFC充值方式
|
|
|
|
transWay: "blu", //“blu”为蓝牙充值方式、“nfc”为NFC充值方式
|
|
|
|
cardId: "", //卡号 需要传参
|
|
|
|
mockpreBalance: 2000, //fix:模拟余额 目前没有检测状态接口,第一次会模拟圈层检测来检测状态
|
|
|
|
show: false,
|
|
|
@@ -149,7 +156,6 @@ |
|
|
|
/*获取openId 用途:(用户支付)*/
|
|
|
|
getOpenID();
|
|
|
|
/*传参*/
|
|
|
|
state.transWay = option.transWay; //“blu”为蓝牙充值方式、“nfc”为NFC充值方式
|
|
|
|
state.cardId = option.cardId;
|
|
|
|
state.connectSuccess = option.connectSuccess;
|
|
|
|
state.orderNum = getItem("orderNum");
|
|
|
@@ -191,6 +197,11 @@ |
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
function radioChange(evt) {
|
|
|
|
console.log('输出内容', evt)
|
|
|
|
state.transWay = evt.detail.value; //“blu”为蓝牙充值方式、“nfc”为NFC充值方式
|
|
|
|
}
|
|
|
|
|
|
|
|
function go() {
|
|
|
|
uni.showModal({
|
|
|
|
title: '提示',
|
|
|
@@ -721,7 +732,7 @@ |
|
|
|
};
|
|
|
|
request(cardCzPayResult, options).then((res) => {
|
|
|
|
const data = stringToJson(res.bizContent);
|
|
|
|
if (data.tradeState === "SUCCESS"){
|
|
|
|
if (data.tradeState === "SUCCESS") {
|
|
|
|
uni.redirectTo({
|
|
|
|
url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}&&fee=${state.fee}`,
|
|
|
|
});
|