<!--设备选择 --> | |||||
<template> | <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> | </template> | ||||
<script setup lang='ts'> | <script setup lang='ts'> | ||||
import { | import { | ||||
scanNfc(); | scanNfc(); | ||||
}) | }) | ||||
function load() { | |||||
scanNfc(); | |||||
} | |||||
function scanNfc() { | function scanNfc() { | ||||
tools.showLoadingAlert("扫描蓝牙中"); | tools.showLoadingAlert("扫描蓝牙中"); | ||||
//先断开所有设备 | //先断开所有设备 |
</view> | </view> | ||||
<view class="tabs"> | <view class="tabs"> | ||||
<view class="tab-tit as-gravity-center-start">充值方式 | <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 class="as-weight" value="nfc" :checked="state.transWay === 'nfc'">NFC</radio> | ||||
</radio-group> | </radio-group> | ||||
</view> | </view> | ||||
request(cardCzPayResult, options).then((res) => { | request(cardCzPayResult, options).then((res) => { | ||||
const data = stringToJson(res.bizContent); | 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}`, | |||||
}); | |||||
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; | // state.isShowBlue=true; | ||||
console.log(data); | console.log(data); |
accessToken: getItem(StorageKeys.Token) | accessToken: getItem(StorageKeys.Token) | ||||
} | } | ||||
options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn' | 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' | // options.url = envs[process.env.NODE_ENV].baseUrl + '/ifzt/api/interfaceMidGroundIn' | ||||
//默认json数据格式提交` | //默认json数据格式提交` | ||||
let contentType = 'application/x-www-form-urlencoded' | let contentType = 'application/x-www-form-urlencoded' |