@@ -290,7 +290,7 @@ | |||
console.log("device._name11111", device._name) | |||
if (deviceList.value.length == 0) { | |||
// #ifdef MP-ALIPAY | |||
if (device._name == '聚利' || device._name == '万集' || device._name == '天地融') { | |||
if (device._name == '聚利' || device._name == '万集' || device._name == '天地融' || device._name == '建投') { | |||
foundDevices.push(device); | |||
console.log("device._name", device._name) | |||
} | |||
@@ -441,9 +441,11 @@ | |||
jtApi.connectDevice( | |||
device, | |||
function (res) { | |||
console.log('回调=======',res) | |||
connectSuccess(res); | |||
}, | |||
function (res) { | |||
console.log('回调=======2',res) | |||
listenStatus(res); | |||
} | |||
); | |||
@@ -531,6 +533,7 @@ | |||
console.log(res); | |||
if (res.code == 0) { | |||
console.log("连接成功"); | |||
tools.hideLoadingAlert(); //关闭加载框 | |||
datas.setData("bluLinkStatus", true); | |||
datas.setData("connectPrefixName", connectPrefixName.value); | |||
@@ -41,14 +41,14 @@ | |||
<view style="background-color: #A5A5A5;top: 60%;width: 100%;height: 40%;position: absolute;"> | |||
<view style="display: flex;flex-direction: row;justify-content: center;align-items: center;height: 100%;"> | |||
<view style="flex: 1;"></view> | |||
<image v-if="!startPhoto" @click="camera" src="/static/image/etc_bd_ocr_cancel.png" | |||
<image v-if="false" @click="camera" src="/static/image/etc_bd_ocr_cancel.png" | |||
style="width: 50rpx;height: 50rpx;"></image> | |||
<view style="flex: 1;"></view> | |||
<image @click="takePhoto" | |||
:src="startPhoto ? '/static/image/etc_bd_ocr_take_photo_normal.png': '/static/etc_bd_ocr_rotate.png'" | |||
:style="startPhoto ? 'width: 140rpx;height: 140rpx;' : 'width: 80rpx;height: 80rpx;'"></image> | |||
<view style="flex: 1;"></view> | |||
<image v-if="!startPhoto" @click="success" src="/static/image/etc_bd_ocr_confirm.png" | |||
<image v-if="false" @click="success" src="/static/image/etc_bd_ocr_confirm.png" | |||
style="width: 50rpx;height: 50rpx;"></image> | |||
<view style="flex: 1;"></view> | |||
</view> |
@@ -60,8 +60,6 @@ | |||
jtApi = require("../../static/etc/JTAPIS/BleUtil.js"); | |||
// 执行支付宝小程序的特定功能 | |||
// #endif | |||
const state = reactive({ | |||
fee: "", | |||
id: "", | |||
@@ -79,11 +77,9 @@ | |||
], | |||
connectSuccess: 1 | |||
}); | |||
const deviceList = ref([]); | |||
const connectPrefixName = ref(null); | |||
const routeType = ref(null); //来源 1激活 2圈存 3信息重写 4信息读取 | |||
interface DeviceType { | |||
name : string; //设备名称 | |||
deviceId : string; //uuid | |||
@@ -91,7 +87,6 @@ | |||
selected : boolean; //判断点击次数 | |||
_name : string; //中文名称 | |||
} | |||
let device : DeviceType = reactive({ | |||
name: "", //设备名称 | |||
deviceId: "", //uuid | |||
@@ -99,7 +94,6 @@ | |||
selected: false, //判断点击次数 | |||
_name: "", //中文名称 | |||
}); | |||
onReady(() => { | |||
load(); | |||
}); | |||
@@ -204,10 +198,12 @@ | |||
uni.openBluetoothAdapter({ | |||
success: function (item : any) { | |||
console.log('初始化蓝牙模块', item) | |||
tools.showLoadingAlert("扫描蓝牙中..."); | |||
//开始搜索附近的蓝牙设备 | |||
uni.startBluetoothDevicesDiscovery({ | |||
success: function (res) { | |||
console.log('开始搜寻附近的蓝牙外围设备', res); | |||
//扫描结果的监听 | |||
//监听搜索到新设备的事件 | |||
uni.onBluetoothDeviceFound(function (res) { | |||
console.log('监听寻找到新设备的事件', res, res.devices); | |||
for (let i = 0; i < res.devices.length; i++) { | |||
@@ -216,11 +212,7 @@ | |||
let deviceId = res.devices[i]["deviceId"]; | |||
console.log("res.devices[i]", res.devices[i]["name"]); | |||
if (name != "" && name != undefined && name != "undefined") { | |||
if ( | |||
name.indexOf("G-WJ") != -1 || | |||
name.indexOf("ETC") != -1 || | |||
name.indexOf("G-JL") != -1 | |||
) { | |||
if (name.indexOf("G-WJ") != -1 || name.indexOf("ETC") != -1 || name.indexOf("G-JL") != -1) { | |||
//前装设备 | |||
prefixName = "ETC"; | |||
} else { | |||
@@ -319,6 +311,7 @@ | |||
}, | |||
fail: function (res) { | |||
console.log(res); | |||
tools.hideLoadingAlert(); | |||
}, | |||
}); | |||
}, | |||
@@ -520,11 +513,10 @@ | |||
console.log(res); | |||
if (res.code == 0) { | |||
console.log("连接成功"); | |||
tools.hideLoadingAlert(); //关闭加载框 | |||
datas.setData("bluLinkStatus", true); | |||
datas.setData("connectPrefixName", connectPrefixName.value); | |||
oks(); | |||
} else { | |||
alertF(res.msg); | |||
} | |||
@@ -554,10 +546,13 @@ | |||
url: "/subpackage/after-sale/deviceInfo/deviceInfo", | |||
}); | |||
} else if (routeType.value == "5") { | |||
uni.$emit('bluetoothLink', { status: true }) | |||
uni.navigateBack({ | |||
delta: 1 | |||
}) | |||
// uni.$emit('bluetoothLink', { status: true }) | |||
// uni.navigateBack({ | |||
// delta: 1 | |||
// }) | |||
uni.navigateTo({ | |||
url: "/subpackage/after-sale/activation-once-again/activation-once-again?state=true&id=" + state.id, | |||
}); | |||
} else if (routeType.value == "6") { | |||
uni.navigateTo({ | |||
url: "/subpackage/after-sale/activation-once-again/activation-once-again?state=true&id=" + state.id |
@@ -613,18 +613,25 @@ | |||
}) | |||
} | |||
const cardRecharge = (val) => { | |||
// #ifdef MP-ALIPAY | |||
msg("业务升级中,请前往九州ETC公众号进行办理。或拨打客服电话400-800-8787") | |||
// val==1 navTo('/pages/recharge/select-car', true) 去圈存的 支付宝 | |||
// #endif | |||
// #ifdef MP-WEIXIN | |||
// // #ifdef MP-ALIPAY | |||
// msg("业务升级中,请前往九州ETC公众号进行办理。或拨打客服电话400-800-8787") | |||
// // val==1 navTo('/pages/recharge/select-car', true) 去圈存的 支付宝 | |||
// // #endif | |||
// // #ifdef MP-WEIXIN | |||
// if (val == 1) { | |||
// navTo('/pages/recharge/recharge-pay', true) | |||
// // navTo('/pages/recharge/recharge', true) | |||
// } else if (val == 2) { | |||
// navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select', true) | |||
// } | |||
// // #endif | |||
if (val == 1) { | |||
navTo('/pages/recharge/recharge-pay', true) | |||
// navTo('/pages/recharge/recharge', true) | |||
} else if (val == 2) { | |||
navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select', true) | |||
} | |||
// #endif | |||
} | |||
</script> | |||
@@ -239,6 +239,10 @@ function showLoadingAlert(title = '加载中...', mask = true, successFunc = nul | |||
if (completeFun != null) { | |||
completeFun(res); | |||
} | |||
//添加安全锁,防止Loading不会关闭 | |||
setTimeout(() => { | |||
hideLoadingAlert() | |||
}, 5000) | |||
} | |||
}); | |||
} |
@@ -237,9 +237,7 @@ | |||
// }) | |||
if(option.state){ | |||
setTimeout(()=>{ | |||
getObuId() | |||
}) | |||
getObuId() | |||
} | |||
}); | |||
@@ -269,7 +267,7 @@ | |||
activationRecordQuery().then((val) => { | |||
console.log("激活次数", val) | |||
if (val.limit) { | |||
navTo("/pages/bluetooth/bluetooth?routeType=5"); | |||
navTo("/pages/bluetooth/bluetooth?routeType=5&id=" + ids); | |||
} else { | |||
msg("一年内到达激活次数上限5次") | |||
} |