diff --git a/App.vue b/App.vue
deleted file mode 100644
index 35e20f9..0000000
--- a/App.vue
+++ /dev/null
@@ -1,178 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/pages.json b/pages.json
index acfd99c..e855b70 100644
--- a/pages.json
+++ b/pages.json
@@ -156,7 +156,8 @@
{
"path": "pages/6155/deviceDetail",
"style": {
- "navigationBarTitleText": "HBY 6155"
+ "navigationBarTitleText": "HBY 6155",
+ "navigationStyle": "custom"
}
},
{
@@ -375,7 +376,8 @@
"path" : "pages/6155/BJQ6155",
"style" :
{
- "navigationBarTitleText" : "BJQ6155"
+ "navigationBarTitleText" : "BJQ6155",
+ "navigationStyle": "custom"
}
},
{
diff --git a/pages/6155/BJQ6155.vue b/pages/6155/BJQ6155.vue
index b4ad2a2..84e0fbb 100644
--- a/pages/6155/BJQ6155.vue
+++ b/pages/6155/BJQ6155.vue
@@ -1,5 +1,26 @@
+
+
+
+
+
+ {{Status.navbar.title}}
+
+
+
+
+
+ {{item.math>9?'9+':item.math}}
+
+
+
+
+
+
+
+
@@ -168,6 +189,7 @@
import TextToHexV1 from '@/components/TextToHex/TextToHexV1.vue';
import bleTool from '@/utils/BleHelper.js';
import usrApi from '@/api/670/HBY670.js'
+ import Common from '@/utils/Common.js';
import {
showLoading,
hideLoading,
@@ -192,6 +214,16 @@
data() {
return {
Status: {
+ apiType: '',
+ navbar: {
+ icons: [{
+ src: '/static/images/common/shape.png',
+ callback: this.gotoShare,
+ apiType:'listA'
+ }],
+ title: 'BJQ6155'
+
+ },
lightMode: {
},
@@ -276,6 +308,7 @@
},
videoHexArray: [],
rgb565Data: [],
+ permissions: [],
dic: {
menuItems: [{
text: '强光',
@@ -325,52 +358,7 @@
these = this;
recei = BleReceive.getBleReceive();
ble = bleTool.getBleTool();
- // let bleName = 'FB_Site_UART'; //JQZM-EF4651 FB_Site_UART
-
- // let f = ble.data.LinkedList.find((v) => {
- // if (v.name == bleName) {
- // console.log("找到设备了", v);
- // these.formData.deviceId = v.deviceId;
- // return true;
- // }
- // return false;
- // });
-
- // let link = () => {
- // if (bleName == 'FB_Site_UART') {
- // ble.LinkBlue(f.deviceId, '0000AE30-0000-1000-8000-00805F9B34FB',
- // '0000AE03-0000-1000-8000-00805F9B34FB', '0000AE02-0000-1000-8000-00805F9B34FB');
- // } else {
- // ble.LinkBlue(f.deviceId, '0000FFE0-0000-1000-8000-00805F9B34FB',
- // '0000FFE1-0000-1000-8000-00805F9B34FB', '0000FFE2-0000-1000-8000-00805F9B34FB');
- // }
-
- // }
- // if (!f) {
-
-
- // ble.addDeviceFound((res) => {
- // // console.log("发现新设备", res);
- // f = res.devices.find((v) => {
- // return v.name == bleName;
- // });
- // if (f) {
-
- // console.log("找到目标设备了", f);
- // these.formData.deviceId = f.deviceId;
-
- // link();
-
- // ble.StopSearch();
- // }
- // });
-
- // ble.StartSearch();
- // } else {
- // link();
- // }
- console.log("6155");
ble.addReceiveCallback(these.bleValueNotify, pagePath);
ble.addStateBreakCallback(these.bleStateBreak, pagePath);
ble.addStateRecoveryCallback(these.bleStateRecovry, pagePath);
@@ -384,7 +372,17 @@
let device = data.data;
these.device = device;
-
+ these.Status.apiType = data.apiType;
+ these.Status.navbar.title=device.deviceName;
+ if (data.apiType !== 'listA') {
+ Common.getdeviceShareId(data.data.id).then(res => {
+ if (res.code == 200) {
+ if (res.data.permission) {
+ these.permissions = res.data.permission.split(',');
+ }
+ }
+ });
+ }
let f = ble.data.LinkedList.find((v) => {
if (v.macAddress == device.deviceMac) {
console.log("找到设备了", v);
@@ -441,6 +439,36 @@
},
methods: {
+ handleRightClick(item, s) {
+ if (item && item.callback) {
+ item.callback(item, s);
+ } else {
+ uni.showModal({
+ content: '敬请期待'
+ })
+
+ }
+ },
+ navigatorBack() {
+ uni.navigateBack();
+ },
+ gotoShare(item, s) {
+ uni.navigateTo({
+ url: '/pages/common/share/index',
+ events: {
+ ack: function(data) {}
+ },
+ success: (res) => {
+ let json = {
+ persissonType: '6155'
+ };
+ Object.assign(json, this.device);
+ res.eventChannel.emit('share', {
+ data: json
+ });
+ }
+ })
+ },
getMode(type) {
let txt = "关闭";
@@ -869,6 +897,18 @@
},
UploadOpenVideo: function() { //开机动画
+ if (!this.permissions.includes('3') && this.Status.apiType !== 'listA') {
+
+ this.showPop({
+ message: '无操作权限',
+ iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
+ borderColor: "#e034344d",
+ buttonBgColor: "#E03434",
+ okCallback: null,
+ buttonText: "确定"
+ })
+ return;
+ }
let f = these.getDevice();
if (!f) {
@@ -1215,6 +1255,18 @@
},
UploadOpenImg: function() {
+ if (!this.permissions.includes('3') && this.Status.apiType !== 'listA') {
+
+ this.showPop({
+ message: '无操作权限',
+ iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
+ borderColor: "#e034344d",
+ buttonBgColor: "#E03434",
+ okCallback: null,
+ buttonText: "确定"
+ })
+ return;
+ }
//上传开机画面
this.Status.BottomMenu.menuItems = [];
this.Status.BottomMenu.title = "上传开机画面";
@@ -1259,6 +1311,18 @@
this.Status.BottomMenu.show = false;
},
btnClick(item, index) {
+ if (!this.permissions.includes('1') && this.Status.apiType !== 'listA') {
+
+ this.showPop({
+ message: '无操作权限',
+ iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
+ borderColor: "#e034344d",
+ buttonBgColor: "#E03434",
+ okCallback: null,
+ buttonText: "确定"
+ })
+ return;
+ }
if (parseInt(this.Status.BottomMenu.activeIndex) === NaN) {
uni.showToast('请选择模式');
@@ -1440,6 +1504,18 @@
these.Status.Pop.showPop = true;
},
sendUsr() {
+ if (!this.permissions.includes('4') && this.Status.apiType !== 'listA') {
+
+ this.showPop({
+ message: '无操作权限',
+ iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
+ borderColor: "#e034344d",
+ buttonBgColor: "#E03434",
+ okCallback: null,
+ buttonText: "确定"
+ })
+ return;
+ }
let f = this.getDevice();
if (!f) {
these.showBleUnConnect()
@@ -1669,6 +1745,19 @@
},
sliderChange: function(evt) {
+
+ if (!this.permissions.includes('1') && this.Status.apiType !== 'listA') {
+
+ this.showPop({
+ message: '无操作权限',
+ iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
+ borderColor: "#e034344d",
+ buttonBgColor: "#E03434",
+ okCallback: null,
+ buttonText: "确定"
+ })
+ return;
+ }
let f = this.getDevice();
if (!f) {
these.showBleUnConnect()
@@ -1716,8 +1805,8 @@
ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId, 30).then(res => {
this.setBleFormData();
- }).catch(err=>{
-
+ }).catch(err => {
+
});
}
@@ -2163,4 +2252,70 @@
left: -99999rpx;
visibility: hidden;
}
+
+ .navbarRight {
+ width: 40px;
+ height: 100%;
+
+ }
+
+ .navbarRight .imgContent {
+ width: 36rpx;
+ height: 36rpx;
+ position: relative;
+ }
+
+ .navbarRight .imgContent:first-child {
+
+ width: 38rpx !important;
+ height: 38rpx !important;
+ margin-top: -2rpx;
+ }
+
+ .navbarRight .imgContent .baber {
+ position: absolute;
+ z-index: 100;
+ width: 30rpx;
+ height: 30rpx;
+ line-height: 30rpx;
+ right: -15rpx;
+ top: -15rpx;
+ border-radius: 50%;
+ background: #f12828;
+ color: #ffffff;
+ font-family: 'PingFang SC';
+ font-style: Regular;
+ font-size: 20rpx;
+ font-weight: 400;
+
+ text-align: center;
+ overflow: hidden;
+ white-space: nowrap;
+
+ }
+
+ .navbarRight .imgContent .img {
+ width: 100%;
+ height: 100%;
+
+ box-sizing: border-box;
+ position: relative;
+ }
+
+ .navbarRight .imgContent .img:last-child {
+ padding: 1rpx;
+ }
+
+ .nvbar {
+ top: 0px;
+ }
+
+ /deep/ .uni-navbar--fixed {
+ top: 0px;
+ }
+
+ .uninavebartext {
+ width: 100%;
+ font-size: 32rpx;
+ }
\ No newline at end of file
diff --git a/pages/6155/deviceDetail.vue b/pages/6155/deviceDetail.vue
index 75ec006..9b06f13 100644
--- a/pages/6155/deviceDetail.vue
+++ b/pages/6155/deviceDetail.vue
@@ -1,5 +1,27 @@
+
+
+
+
+
+
+ {{Status.navbar.title}}
+
+
+
+
+
+ {{item.math>9?'9+':item.math}}
+
+
+
+
+
+
+
+
@@ -167,7 +189,8 @@