体验优化添加失败时的提醒
This commit is contained in:
@ -22,19 +22,19 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="eqinfo">
|
||||
<view class="item">
|
||||
<view class="item">
|
||||
<text class="lbl">设备名称</text>
|
||||
<text class="value">{{device.deviceName}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="lbl">Mac地址</text>
|
||||
<text class="value">{{device.deviceMac}}</text>
|
||||
</view>
|
||||
<text class="lbl">Mac地址</text>
|
||||
<text class="value">{{device.deviceMac}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="lbl">蓝牙名称</text>
|
||||
<text class="value">{{device.bluetoothName}}</text>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="item">
|
||||
<text class="lbl">蓝牙状态</text>
|
||||
<text class="value" :class="formData.bleStatu?'green':'red'">{{formData.bleStatu?'已连接':'未连接'}}</text>
|
||||
@ -45,34 +45,34 @@
|
||||
<view class="title">
|
||||
<text>照明模式</text>
|
||||
<text @click="showLihgtPercent('shuxie')"
|
||||
:class="formData.lightCurr=='shuxie'?'active':'noActive'">亮度</text>
|
||||
:class="formData.lightCurr=='shuxie'?'active':'noActive'">亮度</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="lightMode">
|
||||
<view class="item" @click="lightSetting('shuxie')" @longpress="showLihgtPercent('shuxie')"
|
||||
:class="formData.lightCurr=='shuxie'?'active':''">
|
||||
:class="formData.lightCurr=='shuxie'?'active':''">
|
||||
<view class="imgContent center">
|
||||
<image class="img"
|
||||
:src="formData.lightCurr=='shuxie'?'/static/images/6331/shuxieActive.png':'/static/images/6331/shuXie.png'"
|
||||
mode="aspectFit"></image>
|
||||
:src="formData.lightCurr=='shuxie'?'/static/images/6331/shuxieActive.png':'/static/images/6331/shuXie.png'"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="txt">书写</view>
|
||||
</view>
|
||||
<view class="item" @click="lightSetting('work')" :class="formData.lightCurr=='work'?'active':''">
|
||||
<view class="imgContent center">
|
||||
<image class="img"
|
||||
:src="formData.lightCurr=='work'?'/static/images/6331/workActive.png':'/static/images/6331/work.png'"
|
||||
mode="aspectFit"></image>
|
||||
:src="formData.lightCurr=='work'?'/static/images/6331/workActive.png':'/static/images/6331/work.png'"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="txt">工作光</view>
|
||||
</view>
|
||||
<view class="item" @click="lightSetting('jieN')" :class="formData.lightCurr=='jieN'?'active':''">
|
||||
<view class="imgContent center">
|
||||
<image class="img"
|
||||
:src="formData.lightCurr=='jieN'?'/static/images/lightImg/jieNActive.png':'/static/images/lightImg/jieN.png'"
|
||||
mode="aspectFit"></image>
|
||||
:src="formData.lightCurr=='jieN'?'/static/images/lightImg/jieNActive.png':'/static/images/lightImg/jieN.png'"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="txt">节能光</view>
|
||||
</view>
|
||||
@ -130,7 +130,7 @@
|
||||
</view>
|
||||
|
||||
<view class="mode fleft marginLeft noMargintop" :class="formData.cMode?'active':''"
|
||||
v-on:click.stop="audioManage()">
|
||||
v-on:click.stop="audioManage()">
|
||||
<view class="leftImg">
|
||||
<image class="img" src="/static/images/6331/upload.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
@ -173,11 +173,11 @@
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
<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" :showSlot="Status.Pop.showSlot">
|
||||
: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" :showSlot="Status.Pop.showSlot">
|
||||
|
||||
<view :class="Status.showLightingSet?'':'displayNone'">
|
||||
<view class="slideTitle">
|
||||
@ -186,8 +186,8 @@
|
||||
</view>
|
||||
<view class="slider-container">
|
||||
<slider min="1" max="100" step="1" :disabled="false" :value="formData.liangDu" activeColor="#bbe600"
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChange" class="custom-slider" />
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChange" class="custom-slider" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -199,8 +199,8 @@
|
||||
</view>
|
||||
<view class="slider-container">
|
||||
<slider min="1" max="100" step="1" :disabled="false" :value="formData.volume" activeColor="#bbe600"
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChange" class="custom-slider" />
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChange" class="custom-slider" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -209,7 +209,7 @@
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
<BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
|
||||
@btnClick="btnClick">
|
||||
@btnClick="btnClick">
|
||||
<view>
|
||||
<view class="addIco">
|
||||
<view class="icoContent center" v-on:click.stop="checkImgUpload()">
|
||||
@ -221,7 +221,7 @@
|
||||
|
||||
<global-loading ref="loading" />
|
||||
|
||||
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -236,7 +236,15 @@
|
||||
} from '@/utils/loading.js'
|
||||
import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
import usrApi from '@/api/670/HBY670.js'
|
||||
import usrApi from '@/api/670/HBY670.js';
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
const pagePath = "pages/6331/BJQ6331";
|
||||
|
||||
var ble = null;
|
||||
@ -401,7 +409,10 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
these.formData.deviceId = f.deviceId;
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
these.setBleFormData();
|
||||
these.getDetail();
|
||||
|
||||
@ -420,7 +431,10 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -452,7 +466,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
let play = () => {
|
||||
alert('正在播放中');
|
||||
}
|
||||
this.showPop({
|
||||
showPop({
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
@ -469,7 +483,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
modelValue: '',
|
||||
visibleClose: true,
|
||||
okCallback: play
|
||||
});
|
||||
},these);
|
||||
},
|
||||
audioManage() { //语音管理
|
||||
uni.navigateTo({
|
||||
@ -594,12 +608,12 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
|
||||
ble.sendHexs(f.deviceId, array, f.writeServiceId, f.wirteCharactId, 100).catch(ex => {
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "发送失败," + ex.msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
});
|
||||
|
||||
},
|
||||
@ -670,7 +684,8 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
}).catch(ex => {
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
});
|
||||
these.formData.bleStatu = 'err';
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
@ -734,7 +749,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
showBleUnConnect() {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -762,7 +777,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},these);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user