Commit 0aaa2248 by 朱建香

更改首页优先级

parent 8029f26c
export default { export default {
"url": "https://cloud.iot.u-gen.net/", // "url": "https://cloud.iot.u-gen.net/",
// "url": "http://192.168.2.96:20000", "url": "http://192.168.2.96:20000",
"model": "UGEN_SECURITY_SMARTDOOR_YJ2017" // "model": "UGEN_SECURITY_SMARTDOOR_YJ2017"
// "model": "USMARTLOCK_SECURITY_SMARTDOOR_SMART_LOCK" "model": "USMARTLOCK_SECURITY_SMARTDOOR_SMART_LOCK"
} }
\ No newline at end of file
...@@ -12,8 +12,8 @@ const iot = new UIOT({ ...@@ -12,8 +12,8 @@ const iot = new UIOT({
lang: ['zh', 'en'], lang: ['zh', 'en'],
vue: Vue, vue: Vue,
i18n: VueI18n, i18n: VueI18n,
appId: '20004', appId: '10004',
appSecret: '20004', appSecret: '10004',
wx: { wx: {
appId: '' appId: ''
}, },
...@@ -81,7 +81,7 @@ uPublic.checkResponseData = function (data) { ...@@ -81,7 +81,7 @@ uPublic.checkResponseData = function (data) {
} else { } else {
return data; return data;
} }
// array // array
} else if (Array.isArray(data)) { } else if (Array.isArray(data)) {
if (data.length > 0) { if (data.length > 0) {
return data; return data;
......
...@@ -1010,12 +1010,14 @@ function setRemoteOpendoor(self, time){ ...@@ -1010,12 +1010,14 @@ function setRemoteOpendoor(self, time){
let now = moment(new Date(), "YYYY-MM-DD hh:mm:ss"); let now = moment(new Date(), "YYYY-MM-DD hh:mm:ss");
time = moment(time, "YYYY-MM-DD hh:mm:ss"); time = moment(time, "YYYY-MM-DD hh:mm:ss");
console.log(now.diff(time,'seconds')); console.log(now.diff(time,'seconds'));
if(now.diff(time,'seconds') < config.pushMsg_timeout && now.diff(time,'seconds') >= 0){ if(now.diff(time,'seconds') < config.pushMsg_timeout && now.diff(time,'seconds') >= 0 && (self.getRole() == 0)){
self.setValueRemoteOpendoor(true); self.setValueRemoteOpendoor(true);
self.setRemoteOpendoorDisabledFlag(false); self.setRemoteOpendoorDisabledFlag(false);
//停止响铃 //停止响铃
stopDoorbellRing(self); stopDoorbellRing(self);
setMsgStatus(self, false, "remoteOpendoor_img", true, false, time.format("HH:mm"), Vue.t('device.remoteOpendoor')); if((self.getMsgClass() != 'hijack_img') && (self.getMsgClass() != 'securityAlarm_img')){
setMsgStatus(self, false, "remoteOpendoor_img", true, false, time.format("HH:mm"), Vue.t('device.remoteOpendoor'));
}
// //设置当前为普通状态 // //设置当前为普通状态
// self.setWarmingShowFlag(false); // self.setWarmingShowFlag(false);
// //更换icon // //更换icon
...@@ -1067,7 +1069,7 @@ function setRemoteOpenDoorLoading(self, status, text, buttonText){ ...@@ -1067,7 +1069,7 @@ function setRemoteOpenDoorLoading(self, status, text, buttonText){
//响铃动画和铃声设置 //响铃动画和铃声设置
function ringBell(self, time){ function ringBell(self, time){
if(self.getDoorbellRingingFlag() === false){ if(self.getDoorbellRingingFlag() === false && (self.getMsgClass() != 'remoteOpendoor_img') && (self.getMsgClass() != 'hijack_img') && (self.getMsgClass() != 'securityAlarm_img')){
self.setDoorbellRingingFlag(true); self.setDoorbellRingingFlag(true);
setMsgStatus(self, false, "doorbell_img", true, false, time.format("HH:mm"), Vue.t('device.doorLockRinging')); setMsgStatus(self, false, "doorbell_img", true, false, time.format("HH:mm"), Vue.t('device.doorLockRinging'));
let p = plus.audio.createPlayer(config.audioUrl); let p = plus.audio.createPlayer(config.audioUrl);
......
...@@ -32,6 +32,8 @@ function init() { ...@@ -32,6 +32,8 @@ function init() {
console.log(iot.business.user.isLogin()); console.log(iot.business.user.isLogin());
if(iot.business.user.isLogin()){ if(iot.business.user.isLogin()){
loginButtonTap(this); loginButtonTap(this);
}else{
this.setShowLoginButtonFlag(true);
} }
// document.addEventListener("resume", () => { // document.addEventListener("resume", () => {
// if(!this.showLoginButtonFlag){ // if(!this.showLoginButtonFlag){
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="guideBg"> <div class="guideBg">
<u-button :init-param="componentsConfig.loginButton.initParam" v-on:u-button-tap="onLoginButtonTap"></u-button> <u-button :init-param="componentsConfig.loginButton.initParam" v-on:u-button-tap="onLoginButtonTap" v-show="showLoginButtonFlag"></u-button>
</div> </div>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment