图片裁剪页面加入自定义尺寸,7305修改发送文字和图片的方式
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
:rightIcons="Status.navbar.icons" @icon-click="handleRightClick"></custom-navbar>
|
||||
|
||||
<view class="eq" :style="{marginTop:Status.navbar.height+'px'}">
|
||||
<view class="leftImg">
|
||||
<view class="leftImg" @click.stop="previewImg(device['devicePic'])">
|
||||
<image class="img" :src="device['devicePic']" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="rightTxt">
|
||||
@ -524,6 +524,15 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
previewImg(img){
|
||||
if(!img){
|
||||
return;
|
||||
}
|
||||
|
||||
uni.previewImage({
|
||||
urls:[img]
|
||||
})
|
||||
},
|
||||
showBleUnConnect() {
|
||||
this.Status.bleLinkCnt++;
|
||||
if(this.Status.bleLinkCnt>3){
|
||||
@ -537,7 +546,7 @@
|
||||
buttonText: '去连接',
|
||||
showCancel: true,
|
||||
cancelCallback: () => {
|
||||
this.closePop();
|
||||
// this.closePop();
|
||||
},
|
||||
okCallback: function() {
|
||||
console.log("1111");
|
||||
@ -1200,7 +1209,7 @@
|
||||
message.deviceId = these.device.id;
|
||||
message.deviceImei = these.device.deviceImei;
|
||||
|
||||
let requestSend = () => {
|
||||
let requestSend = (callback) => {
|
||||
|
||||
message.isBluetooth = false;
|
||||
api.sendSos(message).then((res) => {
|
||||
@ -1211,12 +1220,18 @@
|
||||
code: 200,
|
||||
msg: '操作成功'
|
||||
});
|
||||
if(callback){
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
return this.sendMQ(json);
|
||||
}
|
||||
|
||||
}).then((res) => {
|
||||
console.log("res=", res);
|
||||
if(callback){
|
||||
callback();
|
||||
}
|
||||
}).catch((ex) => {
|
||||
console.log("ex=", ex);
|
||||
these.showPop({
|
||||
@ -1234,7 +1249,7 @@
|
||||
|
||||
}
|
||||
|
||||
let bleSendCmd = () => {
|
||||
let bleSendCmd = (callback) => {
|
||||
let f = this.getDevice();
|
||||
let buffer = null;
|
||||
if (f) {
|
||||
@ -1255,53 +1270,59 @@
|
||||
these.setBleFormData();
|
||||
message.isBluetooth = true;
|
||||
api.sendSos(message);
|
||||
if(callback){
|
||||
callback();
|
||||
}
|
||||
}).catch((ex) => {
|
||||
//使用4G发送
|
||||
console.log("蓝牙发送失败,转4g发送", ex);
|
||||
requestSend();
|
||||
requestSend(callback);
|
||||
});
|
||||
} else {
|
||||
console.log("找不到蓝牙设备");
|
||||
requestSend();
|
||||
requestSend(callback);
|
||||
these.showBleUnConnect();
|
||||
}
|
||||
}
|
||||
|
||||
let OpenSOS = () => {
|
||||
these.formData.qzwarn = true; //标记为强制报警了
|
||||
|
||||
these.Status.staticWarn.time = 180;
|
||||
this.formData.SOS = type;
|
||||
|
||||
let loopFunc = () => {
|
||||
if (these.Status.staticWarn.inteval === null) {
|
||||
return;
|
||||
let execSos=()=>{
|
||||
these.formData.qzwarn = true; //标记为强制报警了
|
||||
|
||||
these.Status.staticWarn.time = 180;
|
||||
this.formData.SOS = type;
|
||||
|
||||
let loopFunc = () => {
|
||||
if (these.Status.staticWarn.inteval === null) {
|
||||
return;
|
||||
}
|
||||
if (these.Status.staticWarn.time === 0) {
|
||||
|
||||
|
||||
clearInterval(these.Status.staticWarn.inteval);
|
||||
these.Status.staticWarn.inteval = null;
|
||||
these.formData.qzwarn = false;
|
||||
these.formData.SOS = 'close';
|
||||
these.CloseWarn(false);
|
||||
return;
|
||||
}
|
||||
these.Status.staticWarn.time = these.Status.staticWarn
|
||||
.time - 1;
|
||||
|
||||
if (these.Status.Pop.clickEvt == 'time' && this.Status.Pop.showPop) {
|
||||
console.log("111111");
|
||||
this.showQzWarn(this.Status.Pop.okCallback);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (these.Status.staticWarn.time === 0) {
|
||||
|
||||
|
||||
clearInterval(these.Status.staticWarn.inteval);
|
||||
these.Status.staticWarn.inteval = null;
|
||||
these.formData.qzwarn = false;
|
||||
these.formData.SOS = 'close';
|
||||
these.CloseWarn(false);
|
||||
return;
|
||||
}
|
||||
these.Status.staticWarn.time = these.Status.staticWarn
|
||||
.time - 1;
|
||||
|
||||
if (these.Status.Pop.clickEvt == 'time' && this.Status.Pop.showPop) {
|
||||
console.log("111111");
|
||||
this.showQzWarn(this.Status.Pop.okCallback);
|
||||
}
|
||||
|
||||
|
||||
these.Status.staticWarn.inteval = setInterval(() => {
|
||||
loopFunc();
|
||||
}, 1000);
|
||||
}
|
||||
these.Status.staticWarn.inteval = setInterval(() => {
|
||||
loopFunc();
|
||||
}, 1000);
|
||||
|
||||
|
||||
bleSendCmd();
|
||||
bleSendCmd(execSos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user