体验优化添加失败时的提醒

This commit is contained in:
liub
2026-04-03 08:48:00 +08:00
parent 222c578f2c
commit aef68d5968
19 changed files with 851 additions and 1046 deletions

View File

@ -1,22 +1,24 @@
<template>
<view class="content contentBg">
<uni-nav-bar :border="false" @clickLeft="prevPage" fixed="true" statusBar="true"
background-color="#121212" color="#FFFFFF" :title="Status.navbar.title">
<template v-slot:left><view>
<uni-icons type="left" size="24" color="#FFFFFF"></uni-icons>
</view></template>
<uni-nav-bar :border="false" @clickLeft="prevPage" fixed="true" statusBar="true"
background-color="#121212" color="#FFFFFF" :title="Status.navbar.title">
<template v-slot:left>
<view>
<uni-icons type="left" size="24" color="#FFFFFF"></uni-icons>
</view>
</template>
<block slot="right">
<view class="navbarRight center">
<image @click.stop="handleRightClick(index,item)" v-for="item,index in Status.navbar.icons" class="img" :src="item.src" mode="aspectFit"></image>
<image @click.stop="handleRightClick(index,item)" v-for="item,index in Status.navbar.icons" class="img" :src="item.src" mode="aspectFit"></image>
</view>
</block>
</uni-nav-bar>
<view class="eq" >
<view class="eq">
<view class="leftImg" @click.stop="previewImg(device.devicePic?device.devicePic:formData.img)">
<image class="img" :src="device.devicePic?device.devicePic:formData.img" mode="aspectFit"></image>
</view>
@ -55,7 +57,7 @@
<text class="lbl">蓝牙名称</text>
<text class="value valueFont">{{device.bluetoothName}}</text>
</view>
<view class="item" @click.top="bleStatuToggle">
<view class="item" @click.top="bleStatuToggle">
<text class="lbl">蓝牙状态</text>
<text class="value" :class="formData.bleStatu?'green':'red'">{{getbleStatu}}</text>
</view>
@ -80,7 +82,7 @@
<view style="width:80%;float: right;text-align: right;" class="valueFont">
<uni-icons type="location" size="17" color="rgba(255, 255, 255, 0.8)"
style="vertical-align: bottom;" />
style="vertical-align: bottom;" />
{{formData.address}}
</view>
<view class="clear"></view>
@ -114,19 +116,19 @@
</view>
<view class="modeSetting">
<view class="item" :class="formData.modeCurr=='low'?'active':''"
@click="GearSetting('low','staticBattery')">
@click="GearSetting('low','staticBattery')">
<view class="p100 center">低档</view>
</view>
<view class="item " :class="formData.modeCurr=='center'?'active':''"
@click="GearSetting('center','staticBattery')">
@click="GearSetting('center','staticBattery')">
<view class="p100 center">中档</view>
</view>
<view class="item " :class="formData.modeCurr=='hight'?'active':''"
@click="GearSetting('hight','staticBattery')">
@click="GearSetting('hight','staticBattery')">
<view class="p100 center">高档</view>
</view>
<view class="item " :class="formData.modeCurr=='close'?'active':''"
@click="GearSetting('close','staticBattery')">
@click="GearSetting('close','staticBattery')">
<view class="p100 center">关闭</view>
</view>
@ -138,18 +140,19 @@
<view class="item" @click="sosSetting('sg')" :class="formData.SOS=='sg'?'active':''">
<view class="imgContent center">
<image class="img"
:src="formData.SOS=='sg'?'/static/images/670/sgActive.png':'/static/images/670/sg.png'"
mode="aspectFit"></image>
:src="formData.SOS=='sg'?'/static/images/670/sgActive.png':'/static/images/670/sg.png'"
mode="aspectFit"></image>
</view>
<view :class="(formData.qzwarn && Status.staticWarn.time)?'':'displayNone'">
报警中{{Status.staticWarn.time}}</view>
报警中{{Status.staticWarn.time}}
</view>
<view :class="(formData.qzwarn && Status.staticWarn.time)?'displayNone':''" class="txt">声光报警</view>
</view>
<view class="item" @click="sosSetting('rb')" :class="formData.SOS=='rb'?'active':''">
<view class="imgContent center">
<image class="img"
:src="formData.SOS=='rb'?'/static/images/670/rbActive.png':'/static/images/670/rb.png'"
mode="aspectFit"></image>
:src="formData.SOS=='rb'?'/static/images/670/rbActive.png':'/static/images/670/rb.png'"
mode="aspectFit"></image>
</view>
<view class="txt">红蓝闪烁</view>
</view>
@ -161,24 +164,24 @@
<view class="item" @click="lightSetting('qiang')" :class="formData.lightCurr=='qiang'?'active':''">
<view class="imgContent center">
<image class="img"
:src="formData.lightCurr=='qiang'?'/static/images/670/qiangActive.png':'/static/images/670/qiang.png'"
mode="aspectFit"></image>
:src="formData.lightCurr=='qiang'?'/static/images/670/qiangActive.png':'/static/images/670/qiang.png'"
mode="aspectFit"></image>
</view>
<view class="txt">强光</view>
</view>
<view class="item" @click="lightSetting('ruo')" :class="formData.lightCurr=='ruo'?'active':''">
<view class="imgContent center">
<image class="img"
:src="formData.lightCurr=='ruo'?'/static/images/670/ruoActive.png':'/static/images/670/ruo.png'"
mode="aspectFit"></image>
:src="formData.lightCurr=='ruo'?'/static/images/670/ruoActive.png':'/static/images/670/ruo.png'"
mode="aspectFit"></image>
</view>
<view class="txt">弱光</view>
</view>
<view class="item" @click="lightSetting('close')" :class="formData.lightCurr=='close'?'active':''">
<view class="imgContent center">
<image class="img"
:src="formData.lightCurr=='close'?'/static/images/lightImg/jieNActive.png':'/static/images/lightImg/jieN.png'"
mode="aspectFit"></image>
:src="formData.lightCurr=='close'?'/static/images/lightImg/jieNActive.png':'/static/images/lightImg/jieN.png'"
mode="aspectFit"></image>
</view>
<view class="txt">关闭</view>
</view>
@ -230,7 +233,7 @@
<view class="item">
<input maxlength="16" class="value" style="text-indent: 20rpx;" v-model="formData.msgTxt"
placeholder="请输入文字" placeholder-class="usrplace" />
placeholder="请输入文字" placeholder-class="usrplace" />
</view>
</view>
@ -267,18 +270,10 @@
</view>
</view>
<!-- 弹窗通知 -->
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
@buttonClick="HidePop" @closePop="closePop" @cancelPop="closePop" :visiblePrompt="Status.Pop.visiblePrompt"
:promptTitle="Status.Pop.promptTitle" v-model="Status.Pop.modelValue" :showCancel="Status.Pop.showCancel"
:buttonCancelText="Status.Pop.buttonCancelText" />
<!-- 下方菜单 -->
<BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
@btnClick="btnClick">
@btnClick="btnClick">
<view>
<view class="addIco">
<view class="icoContent center" v-on:click.stop="checkImgUpload()">
@ -288,7 +283,17 @@
</view>
</BottomSlideMenuPlus>
<!-- 弹窗通知 -->
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
@buttonClick="HidePop" @closePop="closePop" @cancelPop="closePop" :visiblePrompt="Status.Pop.visiblePrompt"
:promptTitle="Status.Pop.promptTitle" v-model="Status.Pop.modelValue" :showCancel="Status.Pop.showCancel"
:buttonCancelText="Status.Pop.buttonCancelText" />
<global-loading ref="loading" />
<MsgBox ref="msgPop" />
</view>
</template>
@ -306,7 +311,14 @@
} from '@/utils/loading.js'
import request, { baseURL } from '@/utils/request.js';
import lnglatConvert from '@/utils/wgs84_to_gcj02.js';
import {
MsgSuccess,
MsgError,
MsgClose,
MsgWarning,
showPop,
MsgInfo
} from '@/utils/MsgPops.js'
const pagePath = "/pages/670/HBY670";
var ble = null;
var these = null;
@ -336,28 +348,28 @@
time: 0,
inteval: null
},
Pop: {
showPop: false, //是否显示弹窗
Pop: {
showPop: false, //是否显示弹窗
popType: 'custom',
bgColor: '#383934bd',
borderColor: '#BBE600',
textColor: '#ffffffde',
buttonBgColor: '#BBE600',
buttonTextColor: '#232323DE',
popType: 'custom',
bgColor: '#383934bd',
borderColor: '#BBE600',
textColor: '#ffffffde',
buttonBgColor: '#BBE600',
buttonTextColor: '#232323DE',
iconUrl: '',
message: '您确定要这样做吗?',
buttonText: '确定',
showCancel: false,
buttonCancelText: '取消',
clickEvt: '',
visiblePrompt: false,
promptTitle: '设备名称',
modelValue: '',
visibleClose: false,
okCallback: null
},
iconUrl: '',
message: '您确定要这样做吗?',
buttonText: '确定',
showCancel: false,
buttonCancelText: '取消',
clickEvt: '',
visiblePrompt: false,
promptTitle: '设备名称',
modelValue: '',
visibleClose: false,
okCallback: null
},
BottomMenu: {
show: false,
showHeader: true,
@ -490,8 +502,8 @@
recei = BleReceive.getBleReceive();
ble = BleTool.getBleTool();
this.$watch("formData.battary", (newVal, oldVal) => {
if (newVal <= 20 && this.formData.sta_system==2) {
this.showMsg("设备电量低");
if (newVal <= 20 && this.formData.sta_system == 2) {
MsgError("设备电量低",'',these);
}
});
@ -555,7 +567,10 @@
these.formData.bleStatu='connecting';
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
these.formData.bleStatu = true;
});
}).catch(ex => {
these.formData.bleStatu = 'err';
MsgError("连接错误:" + ex.msg, "确定", these);
});;
});
},
@ -568,7 +583,10 @@
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
console.log("连接成功")
these.formData.bleStatu = true;
});
}).catch(ex => {
these.formData.bleStatu = 'err';
MsgError("连接错误:" + ex.msg, "确定", these);
});;
}
},
onHide: function() {
@ -615,6 +633,7 @@
these.formData.bleStatu = true;
}).catch(ex=>{
these.formData.bleStatu = 'err';
MsgError("连接错误:" + ex.msg, "确定", these);
});
return;
}
@ -693,7 +712,8 @@
}).catch(ex => {
updateLoading(these, {
text: ex.msg
})
});
these.formData.bleStatu = 'err';
}).finally(() => {
setTimeout(() => {
hideLoading(these);
@ -715,7 +735,7 @@
if (this.Status.bleLinkCnt > 3) {
return;
}
this.showPop({
showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备,取消" + (4 - this.Status.bleLinkCnt) + "次后不再提醒",
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
@ -747,7 +767,7 @@
}
})
}
});
},these);
},
gotoMap() {
let promise = lnglatConvert.wgs84_to_gcj02(this.formData.Lon, this.formData.Lat);
@ -943,11 +963,11 @@
// }
if (keys.indexOf('sta_BreakNews') > -1) { //紧急通知
if(json.sta_BreakNews=='I get it'){
these.showPop({
showPop({
showPop: true,
message: "用户已确认收到紧急通知",
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png"
});
},these);
}
}
@ -1129,14 +1149,14 @@
msgs.push("设备静止报警中");
}
if (msgs.length > 0) {
this.showPop({
showPop({
message: msgs.join(";"),
iconUrl: "/static/images/6155/DeviceDetail/warnning.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
buttonText: "确定",
clickEvt: "staticWarn"
});
},these);
}
@ -1169,14 +1189,14 @@
lightSetting: function(type) {
if (!this.permissions.includes('1') && this.Status.apiType !== 'listA') {
this.showPop({
showPop({
message: '无操作权限',
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
okCallback: null,
buttonText: "确定"
})
},these)
return;
}
if (this.formData.lightCurr == type) {
@ -1212,12 +1232,12 @@
console.log("4g发送成功");
}).catch((ex) => {
console.log("ex=", ex);
these.showPop({
showPop({
message: "通信异常,请检查手机或设备网络",
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
});
},these);
}).finally(() => {
hideLoading(these);
@ -1260,9 +1280,10 @@
CloseWarn: function(ispop) { //解除强制报警
let closeEvt = () => {
these.Status.Pop.showPop = false;
these.formData.qzwarn = false;
these.Status.staticWarn.inteval=null
clearInterval(these.Status.staticWarn.inteval);
let requestCloseSOS = () => {
@ -1276,12 +1297,12 @@
}).catch((ex) => {
console.log("ex=", ex);
these.showPop({
showPop({
message: "通信异常,请检查手机或设备网络",
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
});
},these);
}).finally(() => {
hideLoading(these);
@ -1352,20 +1373,20 @@
this.Status.Pop.okCallback = null;
},
clickEvt: 'time'
});
},these);
},
sosSetting: function(type) {
debugger;
if (!this.permissions.includes('42') && this.Status.apiType !== 'listA') {
this.showPop({
showPop({
message: '无操作权限',
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
okCallback: null,
buttonText: "确定"
})
},these)
return;
}
@ -1374,9 +1395,7 @@
type = "close";
}
showLoading(this, {
text: "请稍候..."
});
let task = () => {
let dic = {
@ -1432,12 +1451,12 @@
}
}).catch((ex) => {
console.log("ex=", ex);
these.showPop({
showPop({
message: "通信异常,请检查手机或设备网络",
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
});
},these);
}).finally(() => {
hideLoading(these);
@ -1484,7 +1503,11 @@
}
let OpenSOS = () => {
showLoading(this, {
text: "请稍候..."
});
let execSos = () => {
these.formData.qzwarn = true; //标记为强制报警了
these.Status.staticWarn.time = 180;
@ -1550,17 +1573,18 @@
} else if (type == 'sg') //强制报警
{
this.showPop({
showPop({
message: '确定开启声光报警模式?',
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
okCallback: OpenSOS,
buttonText: "开启"
});
},these);
return;
} else if (type == 'close') {
console.log("this.formData.SOS=",this.formData.SOS);
console.log("inteval=",this.Status.staticWarn.inteval);
if (this.formData.SOS = 'sg' && this.Status.staticWarn.inteval) { //解除声光报警
this.CloseWarn(true);
} else {
@ -1578,14 +1602,14 @@
GearSetting: function(type) { //档位设置
if (!this.permissions.includes('41') && this.Status.apiType !== 'listA') {
this.showPop({
showPop({
message: '无操作权限',
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
okCallback: null,
buttonText: "确定"
})
},these)
return;
}
if (this.formData.modeCurr == type) {
@ -1620,12 +1644,12 @@
console.log("4g发送成功");
}).catch((ex) => {
console.log("ex=", ex)
these.showPop({
showPop({
message: "通信异常,请检查手机或设备网络",
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
});
},these);
}).finally(() => {
hideLoading(these);
@ -1676,14 +1700,14 @@
proDetail: function(type) {
if (!this.permissions.includes('41') && this.Status.apiType !== 'listA') {
this.showPop({
showPop({
message: '无操作权限',
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
okCallback: null,
buttonText: "确定"
})
},these)
return;
}
uni.navigateTo({
@ -1706,21 +1730,21 @@
deviceImei: these.device.deviceImei
}).then((res) => {
if (res.code == 200) {
these.showPop({
showPop({
showPop: true,
message: "上传成功",
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png",
});
},these);
resolve();
return;
} else {
these.showPop({
showPop({
message: res.errMsg ? res.errMsg : "未知的原因上传失败了",
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
});
},these);
reject(res);
}
}).catch((ex) => {
@ -1752,11 +1776,11 @@
if (currentPacket > totalPackets) {
hideLoading(these);
these.Status.BottomMenu.show = false;
these.showPop({
showPop({
showPop: true,
message: "上传成功",
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png",
});
},these);
if (!ReSendNo) {
setTimeout(() => {
these.HoldYouHand("transmit complete", 0, f
@ -1826,11 +1850,11 @@
});
currentPacket++;
setTimeout(sendNextPacket, 0);
setTimeout(sendNextPacket, 80);
}).catch(err => {
console.log("发送数据包失败了" + JSON.stringify(err));
if (err.code == '10007') {
setTimeout(sendNextPacket, 0);
setTimeout(sendNextPacket, 500);
return;
} else {
updateLoading(these, {
@ -1839,7 +1863,7 @@
sendImgByRequest().then(resolve).catch(reject);
}
// these.Status.BottomMenu.show = false;
// these.showPop({
// showPop({
// message: err.msg,
// iconUrl: "/static/images/common/uploadErr.png",
// borderColor: "#e034344d",
@ -1937,11 +1961,11 @@
}
these.Status.BottomMenu.show = false;
hideLoading(these);
these.showPop({
showPop({
showPop: true,
message: "上传成功",
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png"
});
},these);
@ -1989,7 +2013,7 @@
let inteval = 30;
let inteval = 50;
console.log("开始发送一段视频"); //
ble.sendData(f.deviceId, buffer, f.writeServiceId, f
.wirteCharactId, 10).then(() => {
@ -2013,14 +2037,14 @@
these.Status.BottomMenu.show = false;
hideLoading(these);
these.showPop({
showPop({
showPop: true,
message: err.msg + ",发送失败了",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
buttonText: "确定",
iconUrl: "/static/images/common/uploadErr.png"
});
},these);
reject(err);
return;
}
@ -2117,23 +2141,23 @@
console.log("服务器未返回正确的数据", arr);
these.showPop({
showPop({
message: "与服务器连接出现异常,请检查网络设置",
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
});
},these);
}
}).catch((ex) => {
hideLoading(these);
these.showPop({
showPop({
message: "出现异常," + ex.msg,
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
});
},these);
})
}
@ -2199,14 +2223,14 @@
ShowUpload: function() {
if (!this.permissions.includes('3') && this.Status.apiType !== 'listA') {
this.showPop({
showPop({
message: '无操作权限',
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
okCallback: null,
buttonText: "确定"
})
},these)
return;
}
//上传开机画面
@ -2248,86 +2272,86 @@
this.Status.BottomMenu.activeIndex = index;
},
HidePop: function() {
if (this.Status.Pop.clickEvt == 'staticWarn') {
// this.Status.staticWarnTime=0;
// clearInterval(this.Status.staticWarn.inteval);
// this.formData.staticWarn=false;
}
if (this.Status.Pop.okCallback) {
console.log("执行点击按钮回调");
this.Status.Pop.okCallback();
}
HidePop: function () {
if (this.Status.Pop.clickEvt == 'staticWarn') {
// this.Status.staticWarnTime=0;
// clearInterval(this.Status.staticWarn.inteval);
// this.formData.staticWarn=false;
}
if (this.Status.Pop.okCallback) {
console.log("执行点击按钮回调");
this.Status.Pop.okCallback();
}
this.Status.Pop.showPop = false;
},
closePop: function() {
this.Status.Pop.showPop = false;
this.Status.Pop.showPop = false;
},
closePop: function () {
this.Status.Pop.showPop = false;
if (this.Status.Pop.cancelCallback) {
this.Status.Pop.cancelCallback();
}
},
showPop: function(option) {
hideLoading(this);
let def = {
showPop: true, //是否显示弹窗
popType: 'custom',
bgColor: '#383934bd',
borderColor: '#BBE600',
textColor: '#ffffffde',
buttonBgColor: '#BBE600',
buttonTextColor: '#232323DE',
iconUrl: '',
message: '',
buttonText: '确定',
clickEvt: '',
visiblePrompt: false,
promptTitle: '',
modelValue: '',
visibleClose: false,
okCallback: null,
showSlot: false,
buttonCancelText: '',
showCancel: false,
}
if (this.Status.Pop.cancelCallback) {
this.Status.Pop.cancelCallback();
}
},
showPop: function (option) {
hideLoading(this);
let def = {
showPop: true, //是否显示弹窗
popType: 'custom',
bgColor: '#383934bd',
borderColor: '#BBE600',
textColor: '#ffffffde',
buttonBgColor: '#BBE600',
buttonTextColor: '#232323DE',
iconUrl: '',
message: '',
buttonText: '确定',
clickEvt: '',
visiblePrompt: false,
promptTitle: '',
modelValue: '',
visibleClose: false,
okCallback: null,
showSlot: false,
buttonCancelText: '',
showCancel: false,
}
let keys = Object.keys(def);
let keys = Object.keys(def);
for (let i = 0; i < keys.length; i++) {
let key = keys[i];
if (key in option) {
continue;
}
this.Status.Pop[key] = def[key];
}
if (option) {
keys = Object.keys(option);
for (let i = 0; i < keys.length; i++) {
let key = keys[i];
for (let i = 0; i < keys.length; i++) {
let key = keys[i];
if (key in option) {
continue;
}
this.Status.Pop[key] = def[key];
}
if (option) {
keys = Object.keys(option);
for (let i = 0; i < keys.length; i++) {
let key = keys[i];
this.Status.Pop[key] = option[key];
}
}
this.Status.Pop[key] = option[key];
}
}
if (!option.borderColor) {
option.borderColor = '#BBE600';
option.buttonBgColor = '#BBE600';
}
these.Status.Pop.showPop = true;
},
if (!option.borderColor) {
option.borderColor = '#BBE600';
option.buttonBgColor = '#BBE600';
}
these.Status.Pop.showPop = true;
},
sendUsr: function(ReSendNo) {
if (!this.permissions.includes('4') && this.Status.apiType !== 'listA') {
this.showPop({
showPop({
message: '无操作权限',
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
okCallback: null,
buttonText: "确定"
})
},these)
return;
}
@ -2343,7 +2367,7 @@
code: this.formData.usrid
};
api.sendUsr(json).then((res) => {
these.showPop({
showPop({
showPop: true, //是否显示弹窗
popType: 'custom',
bgColor: '#383934bd',
@ -2359,15 +2383,15 @@
promptTitle: '',
modelValue: '',
visibleClose: true
});
},these);
these.setBleFormData();
}).catch((ex) => {
these.showPop({
showPop({
message: "文字发送失败," + ex.msg,
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
});
},these);
}).finally(() => {
hideLoading(these);
});
@ -2415,7 +2439,7 @@
}
these.showPop({
showPop({
showPop: true, //是否显示弹窗
popType: 'custom',
bgColor: '#383934bd',
@ -2431,7 +2455,7 @@
promptTitle: '',
modelValue: '',
visibleClose: true
});
},these);
these.setBleFormData();
hideLoading(these);
@ -2522,7 +2546,7 @@
requestSend();
// console.log("握手没有成功", ex);
// hideLoading(these);
// these.showPop({
// showPop({
// message: ex.msg,
// iconUrl: "/static/images/common/uploadErr.png",
// borderColor: "#e034344d",
@ -2538,14 +2562,14 @@
if (!this.permissions.includes('5') && this.Status.apiType !== 'listA') {
this.showPop({
showPop({
message: '无操作权限',
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
okCallback: null,
buttonText: "确定"
})
},these)
return;
}
if (!this.formData.msgTxt) {
@ -2573,7 +2597,7 @@
}).then((res) => {
console.log("res=", res)
if (res.code == 200) {
these.showPop({
showPop({
showPop: true, //是否显示弹窗
popType: 'custom',
bgColor: '#383934bd',
@ -2589,7 +2613,7 @@
promptTitle: '',
modelValue: '',
visibleClose: true
});
},these);
// clearInterval(this.Status.msgOkIntval);
@ -2605,12 +2629,12 @@
} else {
these.showPop({
showPop({
message: res.msg,
iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
});
},these);
}
}).finally(() => {
hideLoading(this);