1
0
forked from dyf/APP

将产品信息、操作说明、操作视频封装成组件

This commit is contained in:
liub
2026-04-03 10:01:04 +08:00
parent aef68d5968
commit 1264ec70a2
20 changed files with 1406 additions and 1329 deletions

View File

@ -23,14 +23,14 @@
</view>
<view class="rightTxt">
<view class="row">
<image class="img" src="/static/images/6155/DeviceDetail/battry.png" mode="aspectFit"></image>
<image class="img" src="/static/images/common/battry.png" mode="aspectFit"></image>
<view class="txt">
<view class="bigTxt">{{formData.battary}}%</view>
<view class="smallTxt">电量</view>
</view>
</view>
<view class="row">
<image class="img" src="/static/images/6155/DeviceDetail/time.png" mode="aspectFit"></image>
<image class="img" src="/static/images/common/time.png" mode="aspectFit"></image>
<view class="txt">
<view class="bigTxt">{{formData.xuhang}}</view>
<view class="smallTxt">续航时间</view>
@ -43,10 +43,7 @@
<text class="lbl">设备名称</text>
<text class="value valueFont">{{device.deviceName}}</text>
</view>
<view class="item">
<text class="lbl">设备IMEI</text>
<text class="value valueFont">{{device.deviceImei}}</text>
</view>
<view class="item">
<text class="lbl">Mac地址</text>
@ -65,55 +62,10 @@
<text class="value valueFont">{{formData.sta_system}}</text>
</view>
<view class="item">
<text class="lbl">定位信息</text>
<view class="multiValue" @click.stop="gotoMap()">
<view class="valueItem valueFont">
{{formData.Lon}}
</view>
<view class="valueItem valueFont">
{{formData.Lat}}
</view>
<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}}
</view>
<view class="clear"></view>
</view>
</view>
</view>
</view>
<view class="proinfo lamp">
<text class="title">产品信息</text>
<view class="itemcontent">
<view class="item" @click="proDetail('productDes')">
<image class="img" src="/static/images/6155/DeviceDetail/param.png" mode="aspectFit"></image>
<text class="txt">产品参数</text>
</view>
<view class="item" @click="proDetail('operatingInstruct')">
<image class="img" src="/static/images/6155/DeviceDetail/remark.png" mode="aspectFit"></image>
<text class="txt">操作说明</text>
</view>
<view class="item" @click="proDetail('operationVideo')">
<image class="img" src="/static/images/6155/DeviceDetail/video.png" mode="aspectFit"></image>
<text class="txt">操作视频</text>
</view>
</view>
</view>
<ProParams :id="device.id"></ProParams>
<MsgBox ref="msgPop" />
<global-loading ref="loading" />
</view>
@ -143,9 +95,9 @@
var eventChannel = null;
var these = null;
var ble = null;
var rec = null;
var recei = null;
var mq = null;
var pagePath="pages/008A/HBY008A";
export default {
data() {
@ -163,7 +115,7 @@
src: '/static/images/common/shape.png'
}
],
title: 'BJQ6075',
title: 'HBY008A',
showBack: true,
height: 90
},
@ -241,9 +193,11 @@
onUnload() {
console.log("页面卸载,释放资源");
let statusTopic = `A/${this.formData.imei?this.formData.imei:this.device.deviceImei}`;
if(ble){
ble.removeAllCallback(pagePath);
ble.removeReceiveCallback(pagePath);
ble.removeReceiveCallback(pagePath);
}
if (mq) {
mq.unsubscribe(statusTopic);
mq.disconnect();
@ -258,7 +212,8 @@
this.Status.pageHide = true;
},
onload() {
onLoad() {
these = this;
recei = BleReceive.getBleReceive();
ble = BleTool.getBleTool();
@ -270,7 +225,7 @@
ble.addDisposeCallback(these.deviceDispose, pagePath);
ble.addRecoveryCallback(these.deviceRecovry, pagePath);
let eventChannel = this.getOpenerEventChannel();
eventChannel = this.getOpenerEventChannel();
eventChannel.on('detailData', function(data) {
@ -493,23 +448,7 @@
});
},
proDetail: function(pgetpe) {
debugger;
if (!this.permissions.includes('41') && this.Status.apiType !== 'listA') {
MsgError("无操作权限", "确定", this);
return;
}
let url = '/pages/common/' + pgetpe + '/index?id=' + (this.device.id ? this.device.id : 0);
uni.navigateTo({
url: url,
fail(ex) {
console.error(ex);
}
});
},
prevPage() {
uni.navigateBack({