diff --git a/App.vue b/App.vue
index 89526a8..b46d08f 100644
--- a/App.vue
+++ b/App.vue
@@ -15,27 +15,52 @@
\ No newline at end of file
diff --git a/api/common/operatingInstruct/index.js b/api/common/operatingInstruct/index.js
new file mode 100644
index 0000000..63694f3
--- /dev/null
+++ b/api/common/operatingInstruct/index.js
@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+import qs from 'qs'
+// 查询列表
+export function fileInfo(params) {
+ return request({
+ url: '/app/file/list',
+ method: 'GET',
+ data: params
+ })
+}
+
+
+// 删除
+export function fileDelete(ids) {
+ return request({
+ url: `/app/file/delete/${ids}`,
+ method: 'delete',
+ })
+}
diff --git a/api/common/operationVideo/index.js b/api/common/operationVideo/index.js
new file mode 100644
index 0000000..35841be
--- /dev/null
+++ b/api/common/operationVideo/index.js
@@ -0,0 +1,32 @@
+import request from '@/utils/request'
+// 视频列表
+export function listOperationVideos(params) {
+ return request({
+ url: '/app/operationVideo/listOperationVideos',
+ method: 'GET',
+ data: params
+ })
+}
+// 添加
+export function addOperationVideo(data) {
+ return request({
+ url: '/app/operationVideo/addOperationVideo',
+ method: 'post',
+ data
+ })
+}
+// 编辑
+export function editOperationVideo(data) {
+ return request({
+ url: '/app/operationVideo/editOperationVideo',
+ method: 'post',
+ data
+ })
+}
+// 删除视频列表
+export function deleteOperationVideo(ids) {
+ return request({
+ url: `/app/operationVideo/deleteOperationVideo/${ids}`,
+ method: 'delete',
+ })
+}
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index 86e2a73..d4a5a53 100644
--- a/manifest.json
+++ b/manifest.json
@@ -59,6 +59,7 @@
},
/* ios打包配置 */
"ios" : {
+ "appid" : "uni.app.UNIA21EF43",
"privacyDescription" : {
"NSBluetoothPeripheralUsageDescription" : "需要蓝牙访问权限,用于设备通信",
"NSBluetoothAlwaysUsageDescription" : "需要蓝牙访问权限,用于设备通信"
diff --git a/pages.json b/pages.json
index 9cd1049..e2b9a17 100644
--- a/pages.json
+++ b/pages.json
@@ -1,5 +1,6 @@
{
"pages": [
+
{
"path": "pages/common/login/index",
"style": {
@@ -8,14 +9,7 @@
},
- {
- "path" : "pages/6155/deviceDetail",
- "style" :
- {
- "navigationBarTitleText" : "HBY 6155"
- }
- },
-
+
{
"path": "pages/common/index/index",
@@ -72,25 +66,27 @@
}
},
{
- "path": "pages/6170/operationVideo/index",
+ "path": "pages/common/operationVideo/index",
"style": {
"navigationStyle": "custom"
}
},
{
- "path": "pages/6170/addvideo/index",
+ "path": "pages/common/addvideo/index",
"style": {
- "navigationBarTitleText": "添加"
+ "navigationStyle": "custom"
}
},
+ // 操作说明
{
- "path": "pages/6170/editVideo/index",
+ "path": "pages/common/operatingInstruct/index",
"style": {
- "navigationBarTitleText": "编辑视频"
+ "navigationStyle": "custom"
}
},
+ // 产品说明
{
- "path": "pages/6170/operatingInstruct/index",
+ "path": "pages/common/productDes/index",
"style": {
"navigationStyle": "custom"
}
@@ -109,7 +105,13 @@
"navigationBarTitleText" : "扫描到的设备"
}
},
-
+ {
+ "path" : "pages/6155/deviceDetail",
+ "style" :
+ {
+ "navigationBarTitleText" : "HBY 6155"
+ }
+ },
{
"path" : "pages/6155/ImgCrop",
"style" :
@@ -119,10 +121,7 @@
"fullscreen": true
}
}
-
-
-
- ],
+ ],
"tabBar": {
"color": "#fff",
"selectedColor": "#BBE600",
diff --git a/pages/6155/ImgCrop.vue b/pages/6155/ImgCrop.vue
index 2fc323d..cf66c28 100644
--- a/pages/6155/ImgCrop.vue
+++ b/pages/6155/ImgCrop.vue
@@ -1,16 +1,11 @@
-
-
@@ -22,64 +17,58 @@
},
data() {
return {
- src:"",
+ src: "",
Statu: false
-
+
}
},
- onLoad:function(option){
- const eventChannel = this.getOpenerEventChannel();
- var these=this;
- eventChannel.on('checkImg', function(data) {
- console.log("我收到你的消息了,消息内容是:"+JSON.stringify(data));
- these.src=data.data;
- })
+ onLoad: function(option) {
+ const eventChannel = this.getOpenerEventChannel();
+ var these = this;
+ eventChannel.on('checkImg', function(data) {
+ console.log("我收到你的消息了,消息内容是:" + JSON.stringify(data));
+ these.src = data.data;
+ })
},
methods: {
handleCrop(e) {
- var these=this;
+ var these = this;
this.Statu = true;
console.log("裁剪完成");
console.log(e.tempFilePath);
-
-
- const ctx = uni.createCanvasContext('splashCanvas', these);
- console.log("1111111");
- // 绘制图片到canvas
- ctx.drawImage(e.tempFilePath, 0, 0, 160, 80);
- console.log("22222");
- ctx.draw(false, () => {
- // 获取canvas像素数据
- console.log("444444");
- setTimeout(() => {
- uni.canvasGetImageData({
- canvasId: 'splashCanvas',
- x: 0,
- y: 0,
- width: 160,
- height: 80,
- success: (res) => {
- // 处理像素数据并发送
- console.log("res.data.length="+res.data.length);
- // this.processAndSendImageData(res.data).then(
- // resolve).catch(reject);
- const eventChannel = these.getOpenerEventChannel();
- eventChannel.emit('ImgCutOver',res.data);
- uni.navigateBack();
- },
- fail: (err) => {
- reject(`获取canvas数据失败: ${err.errMsg}`);
- }
- });
- }, 500); // 等待canvas绘制完成
- });
-
- console.log("333333");
-
-
+ const ctx = uni.createCanvasContext('splashCanvas', this);
+ ctx.drawImage(
+ e.tempFilePath,
+ 0,0,160,80
+ );
+ setTimeout(() => {
+ ctx.draw(false, ()=>{
+ console.log("abcdefg")
+ uni.canvasGetImageData({
+ canvasId: 'splashCanvas',
+ x: 0,
+ y: 0,
+ width: 160,
+ height: 80,
+ success: (res) => {
+ // 处理像素数据并发送
+ console.log("res.data.length="+res.data.length);
+ // this.processAndSendImageData(res.data).then(
+ // resolve).catch(reject);
+ const eventChannel = these.getOpenerEventChannel();
+ eventChannel.emit('ImgCutOver',res.data);
+ uni.navigateBack();
+ },
+ fail: (err) => {
+ reject(`获取canvas数据失败: ${err.errMsg}`);
+ }
+ });
+ });
+ }, 500);
+
}
-
+
}
}
diff --git a/pages/6155/deviceDetail.vue b/pages/6155/deviceDetail.vue
index 9483a94..e1170bf 100644
--- a/pages/6155/deviceDetail.vue
+++ b/pages/6155/deviceDetail.vue
@@ -503,9 +503,9 @@ import { deviceReName } from '../../api/common';
//发送数据包
- sendDataNew(f.deviceId, f.writeServiceId, f.wirteCharactId, buffer)
+ ble.sendDataNew(f.deviceId, f.writeServiceId, f.wirteCharactId, buffer)
.then(() => {
-
+ console.log("发送一个包完成了");
these.Status.Progress.curr = currentPacket;
currentPacket++;
diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue
index ce55170..52afed3 100644
--- a/pages/6170/deviceControl/index.vue
+++ b/pages/6170/deviceControl/index.vue
@@ -2,7 +2,7 @@
+ @right-click="uploadStartup">
@@ -231,7 +231,8 @@
lightModeB: false,
lightModeC: false, //激光提示框
items: [],
- isFormExpanded: true // 默认展开
+ isFormExpanded: true, // 默认展开
+ deviceID: ''
}
},
computed: {
@@ -314,17 +315,19 @@
// 操纵说明
operatingInst() {
uni.navigateTo({
- url: '/pages/6170/operatingInstruct/index'
+ url: `/pages/common/operatingInstruct/index?id=${this.deviceID}`
})
},
// 产品参数
productparams() {
-
+ uni.navigateTo({
+ url: `/pages/common/productDes/index?id=${this.deviceID}`
+ })
},
// 操作视频
operatingVideo() {
uni.navigateTo({
- url: '/pages/6170/operationVideo/index'
+ url: `/pages/common/operationVideo/index?id=${this.deviceID}`
})
},
@@ -338,6 +341,10 @@
handleDisagree() {
this.lightModeC = false
},
+ },
+ onLoad(options) {
+ console.log(options.id) // 输出: 123
+ this.deviceID = options.id
}
}
@@ -549,7 +556,8 @@
transform: translate(-17%, -100%);
}
- .uni-file-picker__container{
+
+ .uni-file-picker__container {
width: 200rpx !important;
border: 1px solid rgb(58, 58, 58);
}
diff --git a/pages/6170/addvideo/index.vue b/pages/common/addvideo/index.vue
similarity index 50%
rename from pages/6170/addvideo/index.vue
rename to pages/common/addvideo/index.vue
index 571569a..3b34679 100644
--- a/pages/6170/addvideo/index.vue
+++ b/pages/common/addvideo/index.vue
@@ -1,50 +1,60 @@
-
-
-
-
-
- 名称
-
+
+
+
+
+
+
+
+ 名称
+
+
+
+
+
+ 视频链接
+
+
-
-
- 视频链接
-
-
-
+
+
-
-
-
-
-
-
-
diff --git a/pages/common/index/index.vue b/pages/common/index/index.vue
index 01ed200..326ef0b 100644
--- a/pages/common/index/index.vue
+++ b/pages/common/index/index.vue
@@ -376,7 +376,7 @@
});
return;
}
-
+
if (item.typeName == '6155') {
uni.navigateTo({
url: "/pages/6155/deviceDetail",
diff --git a/pages/common/login/index.vue b/pages/common/login/index.vue
index 72d8fcc..9563062 100644
--- a/pages/common/login/index.vue
+++ b/pages/common/login/index.vue
@@ -23,7 +23,6 @@
class="agreeT">《隐私政策》
-