1
0
forked from dyf/APP

Compare commits

...

4 Commits

24 changed files with 1979 additions and 93 deletions

View File

@ -7,7 +7,7 @@
},
{
"customPlaygroundType" : "local",
"playground" : "custom",
"playground" : "standard",
"type" : "uni-app:app-android"
}
]

View File

@ -62,3 +62,7 @@ export function mapReverseGeocoding(data) {
data: data
})
}
export function deviceRealTimeStatus(){
return Promise.resolve({code:500});
}

View File

@ -1,5 +1,5 @@
import request from '@/utils/request'
import qs from 'qs'
// 设备列表
export function deviceInfo(params) {
return request({

View File

@ -1,5 +1,5 @@
import request from '@/utils/request'
import qs from 'qs'
// 查询列表
export function fileInfo(params) {
return request({

View File

@ -7,6 +7,9 @@
"transformPx" : false,
/* 5+App */
"app-plus" : {
"compatible" : {
"ignoreVersion" : true
},
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,

View File

@ -317,24 +317,14 @@
}
},
{
"path": "pages/4877/BJQ4877",
"style": {
"navigationBarTitleText": "BJQ 4877"
}
},
{
"path": "pages/4877/BJQ4877V1",
"style": {
"navigationBarTitleText": "BJQ 4877"
}
},
{
"path": "pages/100/HBY100",
"style": {
"navigationBarTitleText": "HBY 100"
}
},
{
"path" : "pages/4877/BJQ4877CheckColor",
"style" :
@ -355,6 +345,20 @@
{
"navigationBarTitleText" : "注销账号"
}
},
{
"path" : "pages/common/aboutUs/ContactUs",
"style" :
{
"navigationBarTitleText" : "联系我们"
}
},
{
"path" : "pages/018A/HBY018A",
"style" :
{
"navigationBarTitleText" : "HBY018A"
}
}

1554
pages/018A/HBY018A.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -917,7 +917,7 @@
if (!item) {
item = this.dic.sta_VoiceType[index];
}
console.log("item=", item);
// console.log("item=", item);
let val = item.key;
if (this.formData.sta_VoiceType === val) {
val = '0';

View File

@ -131,15 +131,15 @@
<view class="section-title">产品信息</view>
<view class="mode-buttons">
<view class="mode_1" @click="productparams">
<image src="/static/images/common/cp.png" mode="" class="cpIMG" mode="aspectFit"></image>
<image src="/static/images/common/cp.png" class="cpIMG" mode="aspectFit"></image>
<view class="">产品参数</view>
</view>
<view class="mode_1" @click="operatingInst">
<image src="/static/images/common/sm.png" mode="" class="cpIMG" mode="aspectFit"></image>
<image src="/static/images/common/sm.png" class="cpIMG" mode="aspectFit"></image>
<view class="">操作说明</view>
</view>
<view class="mode_1" @click="operatingVideo">
<image src="/static/images/common/sp.png" mode="" class="cpIMG" mode="aspectFit"></image>
<image src="/static/images/common/sp.png" class="cpIMG" mode="aspectFit"></image>
<view class="">操作视频</view>
</view>
</view>

View File

@ -172,15 +172,15 @@
<view class="section-title">产品信息</view>
<view class="mode-buttons">
<view class="mode_1" @click="productparams">
<image src="/static/images/common/cp.png" mode="" class="cpIMG" mode="aspectFit"></image>
<image src="/static/images/common/cp.png" class="cpIMG" mode="aspectFit"></image>
<view class="">产品参数</view>
</view>
<view class="mode_1" @click="operatingInst">
<image src="/static/images/common/sm.png" mode="" class="cpIMG" mode="aspectFit"></image>
<image src="/static/images/common/sm.png" class="cpIMG" mode="aspectFit"></image>
<view class="">操作说明</view>
</view>
<view class="mode_1" @click="operatingVideo">
<image src="/static/images/common/sp.png" mode="" class="cpIMG" mode="aspectFit"></image>
<image src="/static/images/common/sp.png" class="cpIMG" mode="aspectFit"></image>
<view class="">操作视频</view>
</view>
</view>

View File

@ -65,7 +65,7 @@
</view>
<view class="rightTxt">
<text class="bigTxt">主灯模式</text>
<text class="smallTxt">{{getMode}}</text>
<text class="smallTxt">{{getMode('main')}}</text>
</view>
</view>
<view class="mode marginLeft fleft" v-on:click.stop="ModeSetting('fu')">
@ -74,7 +74,7 @@
</view>
<view class="rightTxt">
<text class="bigTxt">辅灯模式</text>
<text class="smallTxt">泛光模式</text>
<text class="smallTxt">{{getMode('fu')}}</text>
</view>
</view>
<view class="mode fleft" v-on:click.stop="UploadOpenImg()">
@ -108,15 +108,18 @@
<view class="item">
<text class="lbl">单位</text>
<input class="value" v-model.trim="formData.textLines[0]" placeholder="请输入单位" placeholder-class="usrplace" />
<input class="value" v-model.trim="formData.textLines[0]" placeholder="请输入单位"
placeholder-class="usrplace" />
</view>
<view class="item">
<text class="lbl">部门</text>
<input class="value" v-model.trim="formData.textLines[1]" placeholder="请输入姓名" placeholder-class="usrplace" />
<input class="value" v-model.trim="formData.textLines[1]" placeholder="请输入姓名"
placeholder-class="usrplace" />
</view>
<view class="item">
<text class="lbl">姓名</text>
<input class="value" v-model.trim="formData.textLines[2]" placeholder="请输入职位" placeholder-class="usrplace" />
<input class="value" v-model.trim="formData.textLines[2]" placeholder="请输入职位"
placeholder-class="usrplace" />
</view>
</view>
@ -257,6 +260,7 @@
deviceId: '',
textLines: ['', '', ''],
mode: '',
light:null,
bleStatu: ''
},
inteval: 80,
@ -415,33 +419,48 @@
remark = '微弱';
}
},
getMode() {
},
methods: {
getMode(type) {
let txt = "关闭";
if (this.Status.BottomMenu.type == 'fu') {
return txt;
}
switch (this.formData.mode) {
switch (this.formData.light) {
case 0:
txt = "强光模式";
if (type == 'fu' && this.formData.mode == 'fu') {
txt = '泛光';
} else if (type == 'main' && this.formData.mode == 'main') {
txt = "强光";
}
break;
case 1:
txt = "弱光模式";
if (type == 'fu' && this.formData.mode == 'fu') {
txt = '强+泛光';
} else if (type == 'main' && this.formData.mode == 'main') {
txt = "弱光";
}
break;
case 2:
txt = "爆闪模式";
if (type == 'main' && this.formData.mode == 'main') {
txt = "爆闪";
}
break;
case 3:
if (type == 'main' && this.formData.mode == 'main') {
txt = "关闭";
}
break;
default:
txt = "关闭";
break;
}
return txt;
}
},
methods: {
calcTotalPackets(frames) {
if (!Array.isArray(frames) || frames.length === 0) {
return 0;
@ -570,7 +589,8 @@
if (!json) {
return;
}
console.log("收到设备数据:", json);
console.log("收到原始数据:", receive);
console.log("解析设备数据:", json);
let keys = Object.keys(json);
keys.forEach((key) => {
if (key in these.formData) {
@ -1264,9 +1284,10 @@
},
ModeSetting: function(type) {
this.formData.mode = type;
let items = [];
let title = '';
switch (type) {
case "main":
title = '主灯模式';
@ -1310,6 +1331,10 @@
this.Status.BottomMenu.title = title;
this.Status.BottomMenu.type = type;
this.Status.BottomMenu.show = true;
if(this.formData.mode != type){
this.Status.BottomMenu.activeIndex =null;
}
},
showMenu(flag) {
@ -1320,8 +1345,8 @@
},
btnClick(item, index) {
if (this.Status.BottomMenu.activeIndex == -1) {
this.showToast('请选择模式');
if (parseInt(this.Status.BottomMenu.activeIndex) === NaN) {
uni.showToast('请选择模式');
return;
}
//发送指令给设备
@ -1386,7 +1411,8 @@
});
ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId, 30).then(() => {
this.formData.mode = mode;
this.formData.light = mode;
this.formData.mode = type
this.setBleFormData();
}).catch((ex) => {
these.showPop({
@ -1404,14 +1430,14 @@
},
handleItemClick(item, index) {
switch (this.Status.BottomMenu.type) {
case "main":
// switch (this.Status.BottomMenu.type) {
// case "main":
break;
case "fu":
// break;
// case "fu":
break;
}
// break;
// }
this.Status.BottomMenu.activeIndex = index;
},
@ -1569,7 +1595,7 @@
logicalDataView.setUint8(logicalPacketSize - 1, 0xFF);
// 4. 将逻辑大包分包发送
const CHUNK_SIZE = 20; // 每个物理包的大小
const CHUNK_SIZE = 500; // 每个物理包的大小
const totalChunks = Math.ceil(logicalPacketSize / CHUNK_SIZE);
updateLoading(these, {

View File

@ -0,0 +1,272 @@
<template>
<view class="maincontent contentBg">
<view class="title">
您可以反馈App使用中的问题产品问题投诉意见或建议,向我们获取使用教程,我们将在收到您的反馈后,15个工作日内答复您,请保持您的注册手机号畅通
</view>
<view class="main">
<view class="text-content">
<textarea class="textarea" v-model="txt" auto-focus="true" placeholder-class="placehoderClass" auto-height="true"
placeholder="您需要反馈的内容" :auto-height="true" maxlength="2000" cursor-color="#BBE600" />
</view>
<view class="footBtn">
<view class="fright convert" @click.stop="Send">发送</view>
<view class="fright audioSett" @click.stop="txt=''">清空</view>
<view class="clear"></view>
</view>
</view>
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
v-model="Status.Pop.modelValue" @closePop="closePop" />
<global-loading ref="loading" />
</view>
</template>
<script>
import {
showLoading,
hideLoading,
updateLoading
} from '@/utils/loading.js' ;
var these=null;
export default {
data() {
return {
txt: "",
Status: {
Pop: {
showPop: false, //是否显示弹窗
popType: 'custom',
bgColor: '#383934bd',
borderColor: '#BBE600',
textColor: '#ffffffde',
buttonBgColor: '#BBE600',
buttonTextColor: '#232323DE',
iconUrl: '',
message: '您确定要这样做吗?',
buttonText: '确定',
clickEvt: '',
visiblePrompt: false,
promptTitle: '设备名称',
modelValue: '',
visibleClose: false,
okCallback: null
}
}
}
},
onLoad(){
these=this;
},
methods: {
Send() {
if(!this.txt){
this.showPop({
showPop: true,
message: "请输入反馈内容",
iconUrl: "/static/images/6155/DeviceDetail/warnning.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
});
return;
}
showLoading(this,{text:'正在发送'});
setTimeout(()=>{
//假装联系了我们
this.showPop({
showPop: true,
message: "已收到您的反馈",
iconUrl: "/static/images/common/success.png"
});
this.txt="";
hideLoading(this);
},800);
},
closePop: function() {
this.Status.Pop.showPop = false;
if (this.Status.Pop.cancelCallback) {
this.Status.Pop.cancelCallback();
}
},
HidePop: function() {
if (this.Status.Pop.clickEvt == 'SendUsr') {
}
this.Status.Pop.showPop = false;
if (this.Status.Pop.okCallback) {
this.Status.Pop.okCallback();
}
},
showPop: function(option) {
hideLoading(this);
let def = {
showPop: true, //是否显示弹窗
popType: 'custom',
bgColor: '#383934bd',
borderColor: '#BBE600',
textColor: '#ffffffde',
buttonBgColor: '#BBE600',
buttonTextColor: '#232323DE',
iconUrl: '',
message: '',
buttonText: '确定',
clickEvt: '',
visiblePrompt: false,
promptTitle: '',
modelValue: '',
visibleClose: false,
okCallback: null,
showSlot: false,
buttonCancelText: '',
showCancel: false,
}
let keys = Object.keys(def);
for (let i = 0; i < keys.length; i++) {
let key = keys[i];
if (key in option) {
continue;
}
this.Status.Pop[key] = def[key];
}
if (option) {
keys = Object.keys(option);
for (let i = 0; i < keys.length; i++) {
let key = keys[i];
this.Status.Pop[key] = option[key];
}
}
if (!option.borderColor) {
option.borderColor = '#BBE600';
option.buttonBgColor = '#BBE600';
}
these.Status.Pop.showPop = true;
},
}
}
</script>
<style>
.title{
margin: 50rpx 0rpx;
color: #FFFFFFDE;
font-family: PingFang SC;
font-size: 27rpx;
font-weight: 400;
line-height: 40rpx;
letter-spacing: 0px;
text-align: left;
}
.footBtn .audioSett {
margin-right: 50rpx;
color: #FFFFFFDE;
font-family: PingFang SC;
font-size: 28rpx;
font-weight: 400;
line-height: 55rpx;
letter-spacing: 0px;
text-align: center;
}
.footBtn .convert {
/* 组合 99 */
width: 130rpx;
height: 55rpx;
line-height: 55rpx;
border-radius: 180px;
color: #232323;
background-color: #AED600;
text-align: center;
font-family: PingFang SC;
font-size: 24rpx;
font-weight: 400;
letter-spacing: 12rpx;
}
.main {
width: 100%;
height: 100%;
}
.maincontent {
height: 100vh;
overflow: hidden;
}
.footBtn {
width: 100%;
}
.line {
width: 100%;
height: 0rpx;
border-bottom: 1rpx solid rgba(255, 255, 255, 0.36);
margin-bottom: 20rpx;
}
.placehoderClass {
color: rgba(255, 255, 255, 0.6);
font-family: PingFang SC;
font-size: 28rpx;
font-weight: 400;
line-height: 44rpx;
letter-spacing: 0.14px;
}
.text-content {
border-radius: 16rpx;
background: rgba(26, 26, 26, 1);
width: 100%;
height: 70%;
box-sizing: border-box;
padding: 20rpx;
margin-bottom: 20rpx;
overflow-y: scroll;
}
.importTxt {
color: rgba(174, 214, 0, 1);
font-family: PingFang SC;
font-size: 28rpx;
font-weight: 400;
height: 60rpx;
line-height: 60rpx;
letter-spacing: 0.14px;
}
.textarea {
overflow-y: scroll;
width: 100%;
box-sizing: border-box;
}
</style>

View File

@ -34,7 +34,7 @@
<view class="centertxt ">
<view class="name" v-text="item.name"></view>
<view class="id">
<text>信号:{{110+item.RSSI>100?100:110+item.RSSI}}%</text>
<text>信号:{{item.RSSI}}dBm</text>
</view>
</view>
<view class="rightIco center">
@ -71,7 +71,7 @@
</view>
<view class="id">
<text>信号:{{110+item.RSSI>100?100:110+item.RSSI}}%</text>
<text>信号:{{item.RSSI}}dBm</text>
</view>
</view>
@ -377,6 +377,8 @@
}
these.EquipMents.push(device);
}
these.EquipMents.sort((a, b) => b.RSSI - a.RSSI);//信号好的排前面,一般信号好的是目标设备
}
}, pagePath);
}

View File

@ -19,8 +19,8 @@
<view class="smallTitle">
<text>{{item.createTime}}</text>
<text v-show="item.time">{{item.time}}</text>
<image :class="{'displayNone':!item.localPath}"
class="img" src="/static/images/100/volume.png" mode="aspectFit"
<image :class="{'displayNone':!item.localPath}" class="img"
src="/static/images/100/volume.png" mode="aspectFit"
@click.stop="play(item,index)"></image>
</view>
</view>
@ -94,9 +94,9 @@
<view class="displayNone">
<audio :src="cPlay.src" :id="cPlay.Id" :name="cPlay.name" author=""></audio>
</view>
<global-loading ref="loading" />
</view>
<global-loading ref="loading"></global-loading>
</view>
</template>
<script>

View File

@ -72,7 +72,7 @@
agreed: false,
isCounting: false,
countdown: 0,
isChecked: true,
isChecked: false,
showAgreement: false, // 控制弹窗显示
}
},

View File

@ -217,7 +217,9 @@
this.showAgreement = true
return false
}
try {
uni.showLoading({
title: '登录中...'
})

View File

@ -75,7 +75,7 @@
agreed: false,
isCounting: false,
countdown: 0,
isChecked: true,
isChecked: false,
showAgreement: false, // 控制弹窗显示
}
},

View File

@ -27,13 +27,18 @@
<text class="title">版本更新 ({{appVersion}})</text>
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
</view>
<view class="menu-item" @click="sendCounsel">
<image src="/static/images/common/yijianfankui.png" class="icon"></image>
<text class="title">举报反馈</text>
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
</view>
<view class="menu-item" @click="aboutUs">
<image src="/static/images/common/wm.png" class="icon"></image>
<image src="/static/images/common/guanyuwomen.png" class="icon"></image>
<text class="title">关于我们</text>
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
</view>
<view class="menu-item" @click="logOff">
<image src="/static/images/common/wm.png" class="icon"></image>
<image src="/static/images/common/zhuxiao.png" class="icon"></image>
<text class="title">注销账号</text>
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
</view>
@ -160,7 +165,7 @@
},
logOff(){
uni.navigateTo({
url:'/pages/common/user/logOff'
url:'/pages/common/account/deleteAccount/index'
})
},
// 关于我们
@ -169,6 +174,12 @@
url: '/pages/common/aboutUs/index'
})
},
//举报反馈、联系我们
sendCounsel(){
uni.navigateTo({
url: '/pages/common/aboutUs/ContactUs'
})
},
// 账户安全
account(){
uni.navigateTo({

View File

@ -65,7 +65,7 @@
logOff(){
let task=()=>{
return new Promise((resolve,reject)=>{
//假装注销
setTimeout(()=>{
resolve();
},500)
@ -74,7 +74,9 @@
}
let logOut=()=>{
let phone=uni.getStorageSync('phone');
uni.clearStorageSync();
uni.setStorageSync("logOutPhone",phone)
uni.reLaunch({
url:'/pages/common/login/index'
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

View File

@ -415,37 +415,42 @@ class BleReceive {
if (bytes[0] == 0xFB && bytes[1] == 0x64 && bytes.length >= 8) {
try {
let staticLevelByte = bytes[2];
let getName = function(type) {
let getName = function(type,) {
let name = "";
switch (type) {
case 0x02:
// name = '弱光';
name=1;
break;
case 0x04:
name = '工作光';
break;
case 0x01:
// name = '强光';
name=0;
break;
case 0x02:
// name = '弱光';
name=1;
break;
case 0x03:
// name = '爆闪';
name=2;
break;
case 0x00:
case 0x04:
name = 0;//泛光
break;
case 0x0A:
name = 1;//强光&泛光
break;
default:
// name = '关闭';
name=3;
name=null;
break;
}
return name;
}
let staticLevelText = getName(staticLevelByte);
let staticLevelText = getName(bytes[2]);
// 解析照明档位
let lightingLevelByte = bytes[3];
let lightingLevelText = getName(lightingLevelByte);
let lightingLevelText = getName(bytes[3]);
// 解析剩余电量
@ -470,8 +475,9 @@ class BleReceive {
let mm = Math.max(0, Math.min(100, bytes[7]));
lightingTime = HH + "小时" + mm + "分钟";
let formData = {};
formData.mode = staticLevelText;
formData.fuMode = lightingLevelText;
formData.mode = (bytes[2]===0x00 || bytes[2]===0x0B)?'fu':'main';
formData.light=formData.mode=='fu'?lightingLevelText:staticLevelText;
formData.battary = batteryLevel;
formData.statu = warn;
formData.xuhang = lightingTime;
@ -539,7 +545,7 @@ class BleReceive {
try {
console.log("str=",receive.str);
// console.log("str=",receive.str);
receiveData = JSON.parse(receive.str);
let recCnt = recArr.find(v => {

View File

@ -50,7 +50,7 @@ class MqHelper {
});
}
//订阅消息
//订阅消息{topic:'主题名称',callback:fn(payload,receive)}
subscribes(topics) {
return new Promise((resolve,reject)=>{