Kaynağa Gözat

2023年7月25日14:06:25

yxb
wq 1 yıl önce
ebeveyn
işleme
e00f997904

+ 22
- 33
pages/bluetooth/bluetooth.vue Dosyayı Görüntüle

@@ -1,38 +1,27 @@
<!--设备选择 -->
<template>
<view class="devices">
<view
class="device"
v-for="(item, index) in deviceList"
:key="index"
@click="connectDevice(item)"
>
<image :src="`${$imgUrl}bluetooth/card1.png`" class="head" mode="aspectFill"></image>
<view class="center">
<view class="name">{{ item._name }}</view>
<view class="desc">编号 {{ item.name }}</view>
</view>
<image
:src="item.selected ? selectedUrl : unSelectedUrl"
class="icon"
mode="aspectFill"
></image>
</view>

<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 class="grey-txt"
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
指令执行过程中,请勿关闭蓝牙,勿将手机远离电子标签,以免导致写卡、写签失败。</view
>
</view>
<view class="btn">
<submit-button title="点击重新搜索蓝牙" @submit="load"></submit-button>
</view>
</view>
<view class="devices">
<view class="device" v-for="(item, index) in deviceList" :key="index" @click="connectDevice(item)">
<image :src="`${$imgUrl}bluetooth/card1.png`" class="head" mode="aspectFill"></image>
<view class="center">
<view class="name">{{ item._name }}</view>
<view class="desc">编号 {{ item.name }}</view>
</view>
<image :src="item.selected ? selectedUrl : unSelectedUrl" class="icon" mode="aspectFill"></image>
</view>

<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 class="grey-txt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
指令执行过程中,请勿关闭蓝牙,勿将手机远离电子标签,以免导致写卡、写签失败。</view>
</view>
<view class="btn">
<submit-button title="点击重新搜索蓝牙" @submit="load"></submit-button>
</view>
</view>
</template>

<script setup lang="ts">

+ 0
- 1
pages/user/user.vue Dosyayı Görüntüle

@@ -274,7 +274,6 @@
if (state.data.opId) {
getUserInfo();
}

});
// 查询车辆信息
const queryCarMsg = () => {

+ 4
- 4
utils/network/api.js Dosyayı Görüntüle

@@ -6,13 +6,13 @@ export const URL = "192.168.100.63";
export const envs = {
//开发环境配置
development: {
// baseUrl: "192.168.100.63:8087",
baseUrl: "qtzl.etcjz.cn",
baseUrl: "192.168.100.63:8087",
// baseUrl: "qtzl.etcjz.cn",
},
//生产环境配置
production: {
baseUrl: "222.85.144.89:19002",
// baseUrl: "192.168.100.63:8087"
// baseUrl: "222.85.144.89:19002",
baseUrl: "192.168.100.63:8087"
}
}

+ 7
- 4
utils/network/request.js Dosyayı Görüntüle

@@ -116,12 +116,15 @@ export function request(code, options = {}) {
console.log('请求失败返回参数:', res)
uni.hideLoading()
console.log('请求错误', err)
// if (err == 'openId无效,请核实传参!') {
// setItem(StorageKeys.OpenId, openId);
// }
//处理请求错误
reject(err)
}
uni.getNetworkType({
success: function (res) {
if(res.networkType=='none'){
success: function(res) {
if (res.networkType == 'none') {
uni.showModal({
title: '提示',
content: "网络异常",
@@ -133,10 +136,10 @@ export function request(code, options = {}) {
}
}
});
}else{
} else {
uni.request(options)
}
console.log("res.networkType",res.networkType);
console.log("res.networkType", res.networkType);
}
});
});

Loading…
İptal
Kaydet