Commit 14b2ed3a by wjd

Merge branch 'jianxiang' into 'test/96'

Jianxiang

See merge request iot-project-js/doorlock!43
parents a0e23a2d b69005ef
...@@ -2,7 +2,7 @@ const path = require('path'); ...@@ -2,7 +2,7 @@ const path = require('path');
const srcPath = path.join(__dirname,"..","src"); const srcPath = path.join(__dirname,"..","src");
const outputPath = "../resources/lang/"; const outputPath = "../resources/lang/";
module.exports = { module.exports = {
lang:["zh","en"], lang:["zh"],
group:srcPath, group:srcPath,
output:outputPath output:outputPath
}; };
\ No newline at end of file
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
...@@ -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;
......
...@@ -72,11 +72,11 @@ function resolve(self){ ...@@ -72,11 +72,11 @@ function resolve(self){
}, function (err) { }, function (err) {
console.log('error', err); console.log('error', err);
plus.nativeUI.confirm(Vue.t("addDevice.openCameraTip"), (e)=>{ plus.nativeUI.confirm(Vue.t("addDevice.openCameraTip"), (e)=>{
if(e.index == 0){ if(e.index == 1){
iot.native.toAppSetting(); iot.native.toAppSetting();
} }
backTap(self); backTap(self);
},{"title": "","buttons": [Vue.t("addDevice.openCamera"),Vue.t("btn.cancel")]}); },{"title": "","buttons": [Vue.t("btn.cancel"),Vue.t("addDevice.openCamera")]});
}); });
}else{ }else{
let isFistOpenCamera = iot.storage.getMap('isFistOpenCamera'); let isFistOpenCamera = iot.storage.getMap('isFistOpenCamera');
...@@ -88,11 +88,11 @@ function resolve(self){ ...@@ -88,11 +88,11 @@ function resolve(self){
}, function (err) { }, function (err) {
console.log('error', err); console.log('error', err);
plus.nativeUI.confirm(Vue.t("addDevice.openCameraTip"), (e)=>{ plus.nativeUI.confirm(Vue.t("addDevice.openCameraTip"), (e)=>{
if(e.index == 0){ if(e.index == 1){
iot.native.toAppSetting(); iot.native.toAppSetting();
} }
backTap(self); backTap(self);
},{"title": "","buttons": [Vue.t("addDevice.openCamera"),Vue.t("btn.cancel")]}); },{"title": "","buttons": [Vue.t("btn.cancel"),Vue.t("addDevice.openCamera")]});
}); });
}else{ }else{
openScanCode(self); openScanCode(self);
......
...@@ -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){
......
...@@ -188,11 +188,11 @@ ...@@ -188,11 +188,11 @@
.bgImg("red_securityAlarm_icon.png"); .bgImg("red_securityAlarm_icon.png");
&:before{ &:before{
content: ''; content: '';
width: 100%;
height: 100%;
display: block; display: block;
position: absolute; position: absolute;
.bgImgSize(40px,40px,"red_securityAlarmLight_icon.png",center,cover); top: 0;
left: 0;
.bgImgSize(100%,100%,"red_securityAlarmLight_icon.png",center,cover);
.animation(alarmLight 2.5s linear infinite); .animation(alarmLight 2.5s linear infinite);
} }
} }
......
...@@ -1143,12 +1143,12 @@ p { ...@@ -1143,12 +1143,12 @@ p {
.securityAlarm_img:before { .securityAlarm_img:before {
content: ''; content: '';
width: 100%;
height: 100%;
display: block; display: block;
position: absolute; position: absolute;
width: 1.067rem; top: 0;
height: 1.067rem; left: 0;
width: 100%;
height: 100%;
background: url("../../resources/image/red_securityAlarmLight_icon.png") no-repeat center; background: url("../../resources/image/red_securityAlarmLight_icon.png") no-repeat center;
-webkit-background-size: cover; -webkit-background-size: cover;
background-size: cover; background-size: cover;
......
...@@ -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