Commit c15aa5e7 by 朱建香

2018/01/11 15:29

#11首页三条记录样式修改【已完成】
#12邀请绑定通知提示【已完成】
#13远程开门有效时间改为2分钟【已完成】
#14门铃时间更改【已完成】
#15通知页面返回上一页刷新页面【已完成】
#16门锁管理解绑成功提示框样式更改【已完成】
parent 6c368916
...@@ -115,7 +115,8 @@ ...@@ -115,7 +115,8 @@
"doorLockRinging": "门铃响了", "doorLockRinging": "门铃响了",
"defaultNewMsg": "您尚未绑定门锁", "defaultNewMsg": "您尚未绑定门锁",
"noNewMsg": "门锁休息中", "noNewMsg": "门锁休息中",
"bindDoorlock": "绑定门锁" "bindDoorlock": "绑定门锁",
"use": "使用"
}, },
"opendoorRecord":{ "opendoorRecord":{
"noRecordTip": "暂无记录", "noRecordTip": "暂无记录",
...@@ -153,12 +154,11 @@ ...@@ -153,12 +154,11 @@
"logoutDialogTip": "确定要退出系统吗?", "logoutDialogTip": "确定要退出系统吗?",
"defaultNickname": "门锁", "defaultNickname": "门锁",
"isClearRecord": "清除所有信息", "isClearRecord": "清除所有信息",
"unbindSuccess": "解绑成功",
"doorbellMsgPush": "门铃消息推送", "doorbellMsgPush": "门铃消息推送",
"alarmMsgPush": "报警消息推送", "alarmMsgPush": "报警消息推送",
"opendoorMsgPush": "开门消息推送", "opendoorMsgPush": "开门消息推送",
"unbindDialogTip": "确认解除绑定", "unbindDialogTip": "确认解除绑定",
"unbindSuccess": "解绑成功", "unbindSuccess": "<span></span>解绑成功",
"unbindFailue": "解绑失败" "unbindFailue": "解绑失败"
}, },
"editName":{ "editName":{
...@@ -184,11 +184,11 @@ ...@@ -184,11 +184,11 @@
"bindFailure": "绑定失败", "bindFailure": "绑定失败",
"reBindDevice": "请重新绑定" "reBindDevice": "请重新绑定"
}, },
"wifiAddHelp": { "wifiAddHelp": {
"helpTitle": "配置WIFI说明:", "helpTitle": "配置WIFI说明:",
"helpCont1": "1.确认设备端进入配网模式(详情操作请见产品说明书)", "helpCont1": "确认设备端进入配网模式(详情操作请见产品说明书)",
"helpCont2": "2.点击页面下方“开始配置Wi-Fi”按钮,进入WiFi配网页面", "helpCont2": "点击页面下方“开始配置Wi-Fi”按钮,进入WiFi配网页面",
"helpCont3": "3.输入Wi-Fi密码,点击“连接”,等待锁端响应,至配网成功。", "helpCont3": "输入Wi-Fi密码,点击“连接”,等待锁端响应,至配网成功。",
"helpCont4": "(提示:如果指纹锁已经绑定过用户,重新绑定成功后会清除之前所有绑定信息)" "helpCont4": "(提示:如果指纹锁已经绑定过用户,重新绑定成功后会清除之前所有绑定信息)"
}, },
"wifiAdd": { "wifiAdd": {
...@@ -277,9 +277,9 @@ ...@@ -277,9 +277,9 @@
"inviteBind":{ "inviteBind":{
"qrcodeExpireTip": "二维码已过期,请重新生成", "qrcodeExpireTip": "二维码已过期,请重新生成",
"title": "绑定方法:", "title": "绑定方法:",
"cont1": "1.受邀用户登录“U智锁”APP", "cont1": "受邀用户登录“U智锁”APP",
"cont2": "2.选择“扫描绑定设备”", "cont2": "选择“扫描绑定设备”",
"cont3": "3.扫描上方二维码完成绑定", "cont3": "扫描上方二维码完成绑定",
"tip": "注: 二维码有效时间为10分钟,过期请重新生成" "tip": "注: 二维码有效时间为10分钟,过期请重新生成"
}, },
"unlockInfo":{ "unlockInfo":{
...@@ -376,5 +376,11 @@ ...@@ -376,5 +376,11 @@
"step3content":"操作步骤:启动本APP后打开多任务页面(清理后台应用的页面),将本APP加入白名单。", "step3content":"操作步骤:启动本APP后打开多任务页面(清理后台应用的页面),将本APP加入白名单。",
"endSetting":"保存设置并开启应用", "endSetting":"保存设置并开启应用",
"toIndex":"进入首页" "toIndex":"进入首页"
},
"newFeature":{
"newVersion":"您有新的版本更新",
"tip": "版本更新",
"update":"更新",
"miss": "暂不更新"
} }
} }
\ No newline at end of file
...@@ -154,12 +154,11 @@ ...@@ -154,12 +154,11 @@
"logoutDialogTip": "确定要退出系统吗?", "logoutDialogTip": "确定要退出系统吗?",
"defaultNickname": "门锁", "defaultNickname": "门锁",
"isClearRecord": "清除所有信息", "isClearRecord": "清除所有信息",
"unbindSuccess": "解绑成功",
"doorbellMsgPush": "门铃消息推送", "doorbellMsgPush": "门铃消息推送",
"alarmMsgPush": "报警消息推送", "alarmMsgPush": "报警消息推送",
"opendoorMsgPush": "开门消息推送", "opendoorMsgPush": "开门消息推送",
"unbindDialogTip": "确认解除绑定", "unbindDialogTip": "确认解除绑定",
"unbindSuccess": "解绑成功", "unbindSuccess": "<span></span>解绑成功",
"unbindFailue": "解绑失败" "unbindFailue": "解绑失败"
}, },
"editName":{ "editName":{
...@@ -185,7 +184,7 @@ ...@@ -185,7 +184,7 @@
"bindFailure": "绑定失败", "bindFailure": "绑定失败",
"reBindDevice": "请重新绑定" "reBindDevice": "请重新绑定"
}, },
"wifiAddHelp": { "wifiAddHelp": {
"helpTitle": "配置WIFI说明:", "helpTitle": "配置WIFI说明:",
"helpCont1": "确认设备端进入配网模式(详情操作请见产品说明书)", "helpCont1": "确认设备端进入配网模式(详情操作请见产品说明书)",
"helpCont2": "点击页面下方“开始配置Wi-Fi”按钮,进入WiFi配网页面", "helpCont2": "点击页面下方“开始配置Wi-Fi”按钮,进入WiFi配网页面",
......
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
}, },
"model": "UGEN_SECURITY_SMARTDOOR_YJ2017", "model": "UGEN_SECURITY_SMARTDOOR_YJ2017",
"GET_MSG_INTERVAL": 5000, "GET_MSG_INTERVAL": 5000,
"wifi_add_timeout": 3000, "wifi_add_timeout": 150000,
//门铃晃动间隔时间 //门铃晃动间隔时间
"await_time": 3000, "await_time": 3000,
//门铃晃动次数 //门铃晃动次数
......
...@@ -36,8 +36,8 @@ function init() { ...@@ -36,8 +36,8 @@ function init() {
openScanCode(self); openScanCode(self);
} }
window.addEventListener('returnPage',() => { window.addEventListener('returnPage',() => {
this.noticeTipShowFlag = !iot.native.isNotifycationOpen(); self.noticeTipShowFlag = !iot.native.isNotifycationOpen();
addSuccess(this); scanCodeSuccess(self);
}); });
}, },
methods:{ methods:{
...@@ -194,7 +194,7 @@ function deviceBind(self, lockId, relId){ ...@@ -194,7 +194,7 @@ function deviceBind(self, lockId, relId){
function scanCodeSuccess(self){ function scanCodeSuccess(self){
self.noticeTipShowFlag = !iot.native.isNotifycationOpen(); self.noticeTipShowFlag = !iot.native.isNotifycationOpen();
if(self.noticeTipShowFlag){ if(self.noticeTipShowFlag){
uComponents.showProcess(self, 1, Vue.t('wifiAdd.deviceActivateSuccess'), [{ uComponents.showProcess(self, 1, Vue.t('addDevice.bindSuccess'), [{
"class": 'custom-process-button', 'text': Vue.t('btn.openNotify'), 'callback': () => { "class": 'custom-process-button', 'text': Vue.t('btn.openNotify'), 'callback': () => {
//开启推送通知 //开启推送通知
if(plus.os.name == 'Android'){ if(plus.os.name == 'Android'){
...@@ -224,7 +224,8 @@ function scanCodeSuccess(self){ ...@@ -224,7 +224,8 @@ function scanCodeSuccess(self){
} }
}]); }]);
}else{ }else{
uComponents.showProcess(self, 1, Vue.t('wifiAdd.deviceActivateSuccess'), [{ console.log("通知开启了");
uComponents.showProcess(self, 1, Vue.t('addDevice.bindSuccess'), [{
"class": 'custom-process-button', 'text': Vue.t('btn.startNow'), 'callback': () => { "class": 'custom-process-button', 'text': Vue.t('btn.startNow'), 'callback': () => {
//立即体验 //立即体验
uComponents.hideProcess(self); uComponents.hideProcess(self);
...@@ -241,7 +242,7 @@ function scanCodeSuccess(self){ ...@@ -241,7 +242,7 @@ function scanCodeSuccess(self){
} }
function scanCodeFailue(self){ function scanCodeFailue(self){
uComponents.showProcess(self, 2, Vue.t('wifiAdd.deviceActivateFailure'), [{ uComponents.showProcess(self, 2, Vue.t('addDevice.bindFailure'), [{
"class": 'custom-process-button', 'text': Vue.t('addDevice.reBindDevice'), 'callback': () => { "class": 'custom-process-button', 'text': Vue.t('addDevice.reBindDevice'), 'callback': () => {
//激活失败 //激活失败
uComponents.hideProcess(self); uComponents.hideProcess(self);
......
...@@ -23,15 +23,15 @@ function init() { ...@@ -23,15 +23,15 @@ function init() {
textErrorTip: null, textErrorTip: null,
//配置组件 //配置组件
componentsConfig: initComponentsConfig(), componentsConfig: initComponentsConfig(),
status: 0,
noticeTipShowFlag: false, noticeTipShowFlag: false,
timeout: null timeout: null
}, },
mounted(){ mounted(){
resolve(this); resolve(this);
let self = this;
window.addEventListener('returnPage',() => { window.addEventListener('returnPage',() => {
this.noticeTipShowFlag = !iot.native.isNotifycationOpen(); self.noticeTipShowFlag = !iot.native.isNotifycationOpen();
addSuccess(this); addSuccess(self);
}); });
}, },
methods:{ methods:{
...@@ -53,12 +53,6 @@ function init() { ...@@ -53,12 +53,6 @@ function init() {
setTextErrorTip(tip){ setTextErrorTip(tip){
this.textErrorTip = tip; this.textErrorTip = tip;
}, },
getStatus(){
return this.status;
},
setStatus(status){
this.status = status;
},
onPasswordChange(text){ onPasswordChange(text){
passwordChange(this,text); passwordChange(this,text);
}, },
...@@ -159,7 +153,6 @@ function connectButtonTap(self){ ...@@ -159,7 +153,6 @@ function connectButtonTap(self){
}else if(self.getTextPassword() == null || self.getTextPassword().trim() == ''){ }else if(self.getTextPassword() == null || self.getTextPassword().trim() == ''){
self.setTextErrorTip(Vue.t('wifiAdd.passwordInputTip')); self.setTextErrorTip(Vue.t('wifiAdd.passwordInputTip'));
}else{ }else{
// uComponents.showCommLoading(self);
uComponents.showProcess(self, 0, Vue.t('addDevice.loading')); uComponents.showProcess(self, 0, Vue.t('addDevice.loading'));
iot.business.sds.findWifi({ iot.business.sds.findWifi({
data: { data: {
...@@ -185,7 +178,6 @@ function connectButtonTap(self){ ...@@ -185,7 +178,6 @@ function connectButtonTap(self){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'配网中'); iotDebug.upload(iot,'配网中');
} }
// uComponents.changeCommLoadingStatusAndText(self, 0, Vue.t('wifiAdd.wifiBinding'));
uComponents.showProcess(self, 0, Vue.t('wifiAdd.wifiBinding')); uComponents.showProcess(self, 0, Vue.t('wifiAdd.wifiBinding'));
}else if(response.data == 'provisioned success'){ }else if(response.data == 'provisioned success'){
if(window.iotDebug){ if(window.iotDebug){
...@@ -195,7 +187,6 @@ function connectButtonTap(self){ ...@@ -195,7 +187,6 @@ function connectButtonTap(self){
iotDebug.upload(iot,'配网成功'); iotDebug.upload(iot,'配网成功');
} }
//wifi连接成功,停止连接wifi //wifi连接成功,停止连接wifi
// uComponents.changeCommLoadingStatusAndText(self, 0, Vue.t('wifiAdd.wifiBindSuccess'));
uComponents.showProcess(self, 0, Vue.t('wifiAdd.wifiBindSuccess')); uComponents.showProcess(self, 0, Vue.t('wifiAdd.wifiBindSuccess'));
} }
}, },
...@@ -227,7 +218,6 @@ function connectButtonTap(self){ ...@@ -227,7 +218,6 @@ function connectButtonTap(self){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'激活中'); iotDebug.upload(iot,'激活中');
} }
// uComponents.changeCommLoadingStatusAndText(self, 0, Vue.t('wifiAdd.deviceActivating'));
uComponents.showProcess(self, 0, Vue.t('wifiAdd.deviceActivating')); uComponents.showProcess(self, 0, Vue.t('wifiAdd.deviceActivating'));
}else if(response.data == "joined success"){ }else if(response.data == "joined success"){
if(window.iotDebug){ if(window.iotDebug){
...@@ -246,10 +236,7 @@ function connectButtonTap(self){ ...@@ -246,10 +236,7 @@ function connectButtonTap(self){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'激活失败'); iotDebug.upload(iot,'激活失败');
} }
// uComponents.changeCommLoadingStatusAndText(self, 2, Vue.t('wifiAdd.deviceActivateFailure'));
addFailue(self); addFailue(self);
self.setStatus(2);
// uComponents.changeCommButtonText(self, Vue.t('addDevice.reBindDevice'));
//停止查找设备 //停止查找设备
iot.business.sds.stopFindDevices({ iot.business.sds.stopFindDevices({
success: (response) => {}, success: (response) => {},
...@@ -270,20 +257,13 @@ function connectButtonTap(self){ ...@@ -270,20 +257,13 @@ function connectButtonTap(self){
}); });
} }
self.timeout = setTimeout(function (){ self.timeout = setTimeout(function (){
if(self.getStatus() == 0){ console.log("timeout");
console.log("timeout"); window.clearTimeout(self.timeout);
//连接失败 addFailue(self);
// uComponents.changeCommLoadingStatusAndText(self, 2, Vue.t('wifiAdd.bindTimeout')); iot.business.sds.stopFindDevices({
self.setStatus(2); success: (response) => {},
// uComponents.changeCommButtonText(self, Vue.t('addDevice.reBindDevice')); error: (error) => {}
addFailue(self); });
//停止查找设备
iot.business.sds.stopFindDevices({
success: (response) => {},
error: (error) => {}
});
window.clearTimeout(self.timeout);
}
},config.wifi_add_timeout); },config.wifi_add_timeout);
} }
...@@ -312,10 +292,7 @@ function unbind(self, deviceId, productId){ ...@@ -312,10 +292,7 @@ function unbind(self, deviceId, productId){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'解绑失败'); iotDebug.upload(iot,'解绑失败');
} }
// uComponents.changeCommLoadingStatusAndText(self, 2, Vue.t('wifiAdd.deviceActivateFailure'));
// uComponents.changeCommButtonText(self, Vue.t('addDevice.reBindDevice'));
addFailue(self); addFailue(self);
self.setStatus(2);
}, },
complete: () => { complete: () => {
} }
...@@ -335,9 +312,6 @@ function bind(self, deviceId, productId){ ...@@ -335,9 +312,6 @@ function bind(self, deviceId, productId){
console.log(response); console.log(response);
let data = response.data; let data = response.data;
if(data.success){ if(data.success){
// uComponents.changeCommLoadingStatusAndText(self, 1, Vue.t('wifiAdd.deviceActivateSuccess'));
// uComponents.changeCommButtonText(self, Vue.t('btn.confirm'));
self.setStatus(1);
addSuccess(self); addSuccess(self);
} }
if(window.iotDebug){ if(window.iotDebug){
...@@ -355,10 +329,7 @@ function bind(self, deviceId, productId){ ...@@ -355,10 +329,7 @@ function bind(self, deviceId, productId){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'绑定失败'); iotDebug.upload(iot,'绑定失败');
} }
// uComponents.changeCommLoadingStatusAndText(self, 2, Vue.t('wifiAdd.deviceActivateFailure'));
// uComponents.changeCommButtonText(self, Vue.t('addDevice.reBindDevice'));、
addFailue(self); addFailue(self);
self.setStatus(2);
}, },
complete: () => {} complete: () => {}
}); });
...@@ -420,24 +391,4 @@ function addSuccess(self){ ...@@ -420,24 +391,4 @@ function addSuccess(self){
} }
}]); }]);
} }
} }
\ No newline at end of file
//tap loading button
//function commLoadingButtonTap(self) {
// if(self.getStatus() == 1){
// //绑定成功
// uComponents.hideCommLoading(self);
// iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{
// needClose: true
// });
// iot.navigator.openWindow({
// url: '../device/index.html',
// id: 'device'
// });
// }else if(self.getStatus() == 2){
// //绑定失败
// uComponents.hideCommLoading(self);
// self.setStatus(0);
// uComponents.changeCommLoadingStatusAndText(self, 0, Vue.t('addDevice.loading'));
// }
//}
\ No newline at end of file
...@@ -43,6 +43,14 @@ function init() { ...@@ -43,6 +43,14 @@ function init() {
unbindShowDialog: false unbindShowDialog: false
}, },
mounted(){ mounted(){
// uComponents.openAlert(this, Vue.t('doorlockManage.unbindSuccess'), {
// text: Vue.t('dialog.confirm'), callback: function () {
// iot.navigator.openWindow({
// url: '../device/index.html',
// id: 'device'
// });
// }
// });
this.extras = iot.navigator.getExtras(); this.extras = iot.navigator.getExtras();
console.log(this.extras); console.log(this.extras);
this.role = this.extras.lockInfo.role; this.role = this.extras.lockInfo.role;
...@@ -55,6 +63,7 @@ function init() { ...@@ -55,6 +63,7 @@ function init() {
getDoorlockInfo(self); getDoorlockInfo(self);
}); });
}, },
methods:{ methods:{
getStateShowFlag(){ getStateShowFlag(){
...@@ -289,9 +298,17 @@ function unbind(self){ ...@@ -289,9 +298,17 @@ function unbind(self){
console.log(error); console.log(error);
uPublic.openRequestErrorAlert(self); uPublic.openRequestErrorAlert(self);
}); });
self.setStateShowFlag(true); // self.setStateShowFlag(true);
self.setShowMsg(Vue.t('doorlockManage.unbindSuccess')); // self.setShowMsg(Vue.t('doorlockManage.unbindSuccess'));
self.setUnbindSucceess(true); // self.setUnbindSucceess(true);
uComponents.openAlert(self, Vue.t('doorlockManage.unbindSuccess'), {
text: Vue.t('dialog.confirm'), callback: function () {
iot.navigator.openWindow({
url: '../device/index.html',
id: 'device'
});
}
});
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{}); iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{});
}, },
error: (error) => { error: (error) => {
...@@ -372,11 +389,12 @@ function cancelTap(self){ ...@@ -372,11 +389,12 @@ function cancelTap(self){
//tap 绑定成功弹框提示-->回到首页 //tap 绑定成功弹框提示-->回到首页
function unbindStateDialogTap(self){ function unbindStateDialogTap(self){
self.setStateShowFlag(false); // self.setStateShowFlag(false);
if(self.getUnbindSucceess){ // if(self.getUnbindSucceess){
iot.navigator.openWindow({ // iot.navigator.openWindow({
url: '../device/index.html', // url: '../device/index.html',
id: 'device' // id: 'device'
}); // });
} // }
} }
...@@ -288,3 +288,12 @@ ...@@ -288,3 +288,12 @@
.unbindState-dialog(); .unbindState-dialog();
.custom-dialog{
.u-dialog-box{
.u-dialog-content{
span{
.bgImgSize(51px,51px,"green_unbindSuccess_icon.png",center,cover);
}
}
}
}
...@@ -379,6 +379,14 @@ p { ...@@ -379,6 +379,14 @@ p {
display: none; display: none;
} }
.u-dialog-box .u-dialog-content span {
width: 1.36rem;
height: 1.36rem;
background: url("../../resources/image/green_unbindSuccess_icon.png") no-repeat center;
-webkit-background-size: cover;
background-size: cover;
}
.header { .header {
position: fixed; position: fixed;
top: 0; top: 0;
...@@ -1060,4 +1068,12 @@ p { ...@@ -1060,4 +1068,12 @@ p {
width: 1.733rem; width: 1.733rem;
height: 1.733rem; height: 1.733rem;
margin-bottom: 0.373rem; margin-bottom: 0.373rem;
}
.custom-dialog .u-dialog-box .u-dialog-content span {
width: 1.36rem;
height: 1.36rem;
background: url("../../resources/image/green_unbindSuccess_icon.png") no-repeat center;
-webkit-background-size: cover;
background-size: cover;
} }
\ No newline at end of file
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