封装发送照片、视频、文字,各设备调用公共模块
This commit is contained in:
@ -113,7 +113,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mode marginLeft fleft" :class="formData.cMode=='mode'?'':'active'"
|
||||
<view class="mode marginLeft fleft"
|
||||
v-on:click.stop="ShowUpload()">
|
||||
<view class="leftImg">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/open.png" mode="aspectFit"></image>
|
||||
@ -166,13 +166,6 @@
|
||||
<!-- 下方菜单 -->
|
||||
<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>
|
||||
|
||||
<global-loading ref="loading" />
|
||||
@ -202,7 +195,8 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
const pagePath = "/pages/650/HBY650";
|
||||
|
||||
import SendBatchData from '@/utils/SendBatchData.js';
|
||||
var batchTool=null;
|
||||
var ble = null;
|
||||
var these = null;
|
||||
var recei = null;
|
||||
@ -226,16 +220,12 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
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,
|
||||
@ -864,8 +854,31 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
},
|
||||
|
||||
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;
|
||||
console.log("123213213213");
|
||||
|
||||
// 分包发送图片数据
|
||||
var sendImagePackets = function(ReSendNo) {
|
||||
|
||||
@ -1337,12 +1350,11 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
//上传开机画面
|
||||
this.Status.BottomMenu.menuItems = [];
|
||||
//上传开机画面
|
||||
this.Status.BottomMenu.title = "上传开机画面";
|
||||
this.Status.BottomMenu.type = "checkImg";
|
||||
this.Status.BottomMenu.show = true;
|
||||
this.formData.cMode = "img";
|
||||
this.Status.BottomMenu.activeIndex=0;
|
||||
},
|
||||
|
||||
showMenu(flag) {
|
||||
@ -1352,8 +1364,8 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
this.Status.BottomMenu.show = false;
|
||||
},
|
||||
btnClick(item, index) {
|
||||
|
||||
|
||||
this.Status.BottomMenu.show = false;
|
||||
this.checkImgUpload(item.value,index);
|
||||
|
||||
|
||||
},
|
||||
@ -1365,14 +1377,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
},
|
||||
handleItemClick(item, index) {
|
||||
|
||||
switch (this.Status.BottomMenu.type) {
|
||||
case "main":
|
||||
|
||||
break;
|
||||
case "fu":
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
this.Status.BottomMenu.activeIndex = index;
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user