670 SOS转到服务端进行
This commit is contained in:
@ -52,9 +52,9 @@
|
||||
<view class="valueItem">
|
||||
|
||||
<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;" />
|
||||
{{formData.address}}
|
||||
<uni-icons type="location" size="17" color="rgba(255, 255, 255, 0.8)"
|
||||
style="vertical-align: bottom;" />
|
||||
{{formData.address}}
|
||||
</view>
|
||||
<view class="clear"></view>
|
||||
</view>
|
||||
@ -449,7 +449,8 @@
|
||||
|
||||
},
|
||||
onLoad: function() {
|
||||
// console.log("670页面加载");
|
||||
|
||||
|
||||
these = this;
|
||||
recei = BleReceive.getBleReceive();
|
||||
ble = BleTool.getBleTool();
|
||||
@ -516,8 +517,8 @@
|
||||
},
|
||||
methods: {
|
||||
gotoMap() {
|
||||
this.detailData.longitude=this.formData.Lon;
|
||||
this.detailData.latitude=this.formData.Lat;
|
||||
this.detailData.longitude = this.formData.Lon;
|
||||
this.detailData.latitude = this.formData.Lat;
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/map/index',
|
||||
events: {
|
||||
@ -718,8 +719,9 @@
|
||||
});
|
||||
},
|
||||
|
||||
sendMQ(message) {
|
||||
message = JSON.stringify(message);
|
||||
sendMQ(json, url) {
|
||||
|
||||
let message = JSON.stringify(json);
|
||||
console.log("imei=", this.formData.imei ? this.formData.imei : this.device.deviceImei);
|
||||
const topic = `B/${this.formData.imei?this.formData.imei:this.device.deviceImei}`;
|
||||
return new Promise((resolve, reject) => {
|
||||
@ -747,6 +749,8 @@
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
parseDataMQ(json) {
|
||||
let receiveData = {};
|
||||
@ -1137,7 +1141,9 @@
|
||||
let requestSend = () => {
|
||||
this.sendMQ(json).then((res) => {
|
||||
console.log("4g发送成功");
|
||||
|
||||
json.deviceId = these.device.id;
|
||||
json.deviceImei = these.device.deviceImei;
|
||||
api.sendSos(json);
|
||||
|
||||
}).catch((ex) => {
|
||||
console.log("ex=", ex);
|
||||
|
||||
Reference in New Issue
Block a user