Bladeren bron

'2023年8月17日17:37:49'

yxb
wq 1 jaar geleden
bovenliggende
commit
26bf74da00

+ 1
- 1
pages/nfc/nfc.vue Bestand weergeven

@@ -11,7 +11,7 @@
reactive
} from "vue";
const tools = require("../../static/etcUtil/tools.js");
const NFCAPI = require('../../utils/nfc/NFCAPI.js');
const NFCAPI = require('../../static/nfc/NFCAPI.js');
const cmd = require("../../static/etcUtil/cmdConfig.js");
const routeType = ref(null); //来源 1激活 2圈存 3信息重写 4信息读取


+ 16
- 5
pages/recharge/recharge.vue Bestand weergeven

@@ -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}`,
});

utils/nfc/NFCAPI.js → static/nfc/NFCAPI.js Bestand weergeven


utils/nfc/NFCConfig.js → static/nfc/NFCConfig.js Bestand weergeven


utils/nfc/NFCDeviceWechat.js → static/nfc/NFCDeviceWechat.js Bestand weergeven


utils/nfc/NFCManagerTool.js → static/nfc/NFCManagerTool.js Bestand weergeven


+ 2
- 2
utils/network/request.js Bestand weergeven

@@ -59,8 +59,8 @@ export function request(code, options = {}, start = false) {
rbacSource: 'MINI_PROGRAM',
accessToken: getItem(StorageKeys.Token)
}
// options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn'
options.url = envs[process.env.NODE_ENV].baseUrl + '/ifzt/api/interfaceMidGroundIn'
options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn'
// options.url = envs[process.env.NODE_ENV].baseUrl + '/ifzt/api/interfaceMidGroundIn'
// options.url = envs[process.env.NODE_ENV].baseUrl + '/ifzt/api/interfaceMidGroundIn'
//默认json数据格式提交`
let contentType = 'application/x-www-form-urlencoded'

Laden…
Annuleren
Opslaan