@@ -1,5 +1,19 @@ | |||
<!--设备选择 --> | |||
<template> | |||
<div></div> | |||
<view class="devices"> | |||
<view class="hint"> | |||
<view class="orange-txt as-layout-horizontal as-gravity-center-start"> | |||
<image :src="`${$imgUrl}common/icon-hint.png`" mode="aspectFill"></image> | |||
<view>温馨提示:</view> | |||
</view> | |||
<view>1、请在手机设置中打开NFC功能。</view> | |||
<view>2、请将ETC储值卡对准手机NFC天线位置(手机背部顶端),不灵敏或无响应时,请及时调整卡片位置。</view> | |||
<view>3、充值过程请保证卡片在手机背部,请勿移开。</view> | |||
</view> | |||
<view class="btn"> | |||
<submit-button title="点击重新扫描NFC标签" @submit="load"></submit-button> | |||
</view> | |||
</view> | |||
</template> | |||
<script setup lang='ts'> | |||
import { | |||
@@ -34,6 +48,10 @@ | |||
scanNfc(); | |||
}) | |||
function load() { | |||
scanNfc(); | |||
} | |||
function scanNfc() { | |||
tools.showLoadingAlert("扫描蓝牙中"); | |||
//先断开所有设备 |
@@ -20,8 +20,9 @@ | |||
</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-group @change="radioChange" style="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> | |||
@@ -733,9 +734,15 @@ | |||
request(cardCzPayResult, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
if (data.tradeState === "SUCCESS") { | |||
uni.redirectTo({ | |||
url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}&&fee=${state.fee}`, | |||
}); | |||
if (state.transWay == 'blu') { | |||
uni.redirectTo({ | |||
url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}&&fee=${state.fee}`, | |||
}); | |||
} else { | |||
uni.redirectTo({ | |||
url: `/pages/nfc/nfc?routeType=2&&cardId=${state.cardId}&&fee=${state.fee}`, | |||
}); | |||
} | |||
} | |||
// state.isShowBlue=true; | |||
console.log(data); |
@@ -60,10 +60,6 @@ export function request(code, options = {}, start = false) { | |||
accessToken: getItem(StorageKeys.Token) | |||
} | |||
options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn' | |||
<<<<<<< HEAD | |||
// options.url = envs[process.env.NODE_ENV].baseUrl + '/ifzt/api/interfaceMidGroundIn' | |||
======= | |||
>>>>>>> 29fd2fd4ca7fc1cfd9a89c58cda5f16861e566da | |||
// options.url = envs[process.env.NODE_ENV].baseUrl + '/ifzt/api/interfaceMidGroundIn' | |||
//默认json数据格式提交` | |||
let contentType = 'application/x-www-form-urlencoded' |