1
0
forked from dyf/APP

封装发送照片、视频、文字,各设备调用公共模块

This commit is contained in:
liub
2026-04-24 17:28:56 +08:00
parent 5128c29d86
commit 677586e51c
11 changed files with 961 additions and 1417 deletions

View File

@ -258,13 +258,7 @@
<!-- 下方菜单 -->
<BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
@btnClick="btnClick">
<view>
<view class="addIco">
<view class="icoContent center" v-on:click.stop="checkImgUpload()">
<image mode="aspectFit" class="img" src="/static/images/6155/DeviceDetail/add.png"></image>
</view>
</view>
</view>
</BottomSlideMenuPlus>
<!-- 弹窗通知 -->
@ -304,6 +298,8 @@
MsgInfo
} from '@/utils/MsgPops.js'
const pagePath = "/pages/670/HBY670";
import SendBatchData from '@/utils/SendBatchData.js';
var batchTool=null;
var ble = null;
var these = null;
var recei = null;
@ -358,16 +354,12 @@
show: false,
showHeader: true,
menuItems: [{
text: '强光',
icon: '/static/images/lightImg/qiang.png'
text: '照片',
value:'img'
},
{
text: '弱光',
icon: '/static/images/lightImg/ruo.png'
},
{
text: '爆闪',
icon: '/static/images/lightImg/shan.png'
text: '动画',
value:'flash'
}
],
activeIndex: -1,
@ -1694,7 +1686,26 @@
checkImgUpload: function(type, index) {
console.log("123213213213");
let f = these.getDevice();
if(!f){
this.showBleUnConnect();
return;
}
if(!batchTool){
batchTool=new SendBatchData(these,f,ble);
}
if (type) {
if (type == 'img') {
// sendImagePackets(index);
batchTool.SendImg();
} else {
// sendVideoPackets(index);
batchTool.SendVideo(506);
}
}
return;
var sendImgByRequest = () => {
return new Promise((resolve, reject) => {
api.sendPic({
@ -2208,11 +2219,12 @@
return;
}
//上传开机画面
this.Status.BottomMenu.menuItems = [];
this.Status.BottomMenu.title = "上传开机画面";
this.Status.BottomMenu.type = "checkImg";
this.Status.BottomMenu.show = true;
this.Status.BottomMenu.showBtn = false;
this.Status.BottomMenu.showBtn = true;
this.Status.BottomMenu.activeIndex=0;
},
showMenu(flag) {
@ -2222,10 +2234,8 @@
this.Status.BottomMenu.show = false;
},
btnClick(item, index) {
this.Status.BottomMenu.show = false;
this.checkImgUpload(item.value,index);
},
setMode(mode) {