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');
const srcPath = path.join(__dirname,"..","src");
const outputPath = "../resources/lang/";
module.exports = {
lang:["zh","en"],
lang:["zh"],
group:srcPath,
output:outputPath
};
\ No newline at end of file
......@@ -72,11 +72,11 @@ function resolve(self){
}, function (err) {
console.log('error', err);
plus.nativeUI.confirm(Vue.t("addDevice.openCameraTip"), (e)=>{
if(e.index == 0){
if(e.index == 1){
iot.native.toAppSetting();
}
backTap(self);
},{"title": "","buttons": [Vue.t("addDevice.openCamera"),Vue.t("btn.cancel")]});
},{"title": "","buttons": [Vue.t("btn.cancel"),Vue.t("addDevice.openCamera")]});
});
}else{
let isFistOpenCamera = iot.storage.getMap('isFistOpenCamera');
......@@ -88,11 +88,11 @@ function resolve(self){
}, function (err) {
console.log('error', err);
plus.nativeUI.confirm(Vue.t("addDevice.openCameraTip"), (e)=>{
if(e.index == 0){
if(e.index == 1){
iot.native.toAppSetting();
}
backTap(self);
},{"title": "","buttons": [Vue.t("addDevice.openCamera"),Vue.t("btn.cancel")]});
},{"title": "","buttons": [Vue.t("btn.cancel"),Vue.t("addDevice.openCamera")]});
});
}else{
openScanCode(self);
......
......@@ -1010,12 +1010,14 @@ function setRemoteOpendoor(self, time){
let now = moment(new Date(), "YYYY-MM-DD hh:mm:ss");
time = moment(time, "YYYY-MM-DD hh:mm:ss");
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.setRemoteOpendoorDisabledFlag(false);
//停止响铃
stopDoorbellRing(self);
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);
// //更换icon
......@@ -1067,7 +1069,7 @@ function setRemoteOpenDoorLoading(self, status, text, buttonText){
//响铃动画和铃声设置
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);
setMsgStatus(self, false, "doorbell_img", true, false, time.format("HH:mm"), Vue.t('device.doorLockRinging'));
let p = plus.audio.createPlayer(config.audioUrl);
......
......@@ -32,6 +32,8 @@ function init() {
console.log(iot.business.user.isLogin());
if(iot.business.user.isLogin()){
loginButtonTap(this);
}else{
this.setShowLoginButtonFlag(true);
}
// document.addEventListener("resume", () => {
// if(!this.showLoginButtonFlag){
......
......@@ -188,11 +188,11 @@
.bgImg("red_securityAlarm_icon.png");
&:before{
content: '';
width: 100%;
height: 100%;
display: block;
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);
}
}
......
......@@ -1143,12 +1143,12 @@ p {
.securityAlarm_img:before {
content: '';
width: 100%;
height: 100%;
display: block;
position: absolute;
width: 1.067rem;
height: 1.067rem;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url("../../resources/image/red_securityAlarmLight_icon.png") no-repeat center;
-webkit-background-size: cover;
background-size: cover;
......
......@@ -23,7 +23,7 @@
<div id="app" v-cloak>
<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>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<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