Commit 982fd472 by 朱建香

#34

1.有安全报警以及劫持报警时,首页进入安全报警以及劫持报警返回后,就恢复正常状态
无安全报警以及劫持报警时,首页进入安全报警以及劫持报警返回后,不做事情
2.远程开门结束与按钮同步
3.门铃和远程开门推送5分钟内
4.安全报警以及劫持报警24小时
5.判断相机权限为未开状态,提示去开启,从设置中心返回后到扫一扫前一个页面
6.扫一扫相机背景全透明
parent 2eaf3d41
...@@ -28,9 +28,10 @@ ...@@ -28,9 +28,10 @@
"add": "添加", "add": "添加",
"next": "下一步", "next": "下一步",
"iSee": "我知道了", "iSee": "我知道了",
"unbindDoorlock": "解除授权门锁", "unbindDoorlock": "解门锁",
"finish": "完成", "finish": "完成",
"cancel": "取消" "cancel": "取消",
"search": "搜索"
}, },
"dialog":{ "dialog":{
"confirm": "确认", "confirm": "确认",
...@@ -51,9 +52,9 @@ ...@@ -51,9 +52,9 @@
"editName": "修改名称", "editName": "修改名称",
"qrcode": "生成绑定二维码", "qrcode": "生成绑定二维码",
"addDevice": "添加设备", "addDevice": "添加设备",
"scanCodeAdd": "扫描绑定设备", "scanCodeAdd": "扫码添加设备",
"wifiAddHelp": "配置Wi-Fi", "wifiAddHelp": "配网添加设备",
"wifiAdd": "连接Wi-Fi", "wifiAdd": "搜索设备",
"bindUserHelp": "ID-姓名绑定", "bindUserHelp": "ID-姓名绑定",
"bindUser": "绑定用户", "bindUser": "绑定用户",
"userList": "用户列表", "userList": "用户列表",
...@@ -116,9 +117,10 @@ ...@@ -116,9 +117,10 @@
"newMsgDoorlock": "门锁最新消息", "newMsgDoorlock": "门锁最新消息",
"doorLockRinging": "门铃响了", "doorLockRinging": "门铃响了",
"defaultNewMsg": "您尚未绑定门锁", "defaultNewMsg": "您尚未绑定门锁",
"noNewMsg": "门锁休息中", "noNewMsg": "暂无开门记录",
"bindDoorlock": "绑定门锁", "bindDoorlock": "绑定门锁",
"use": "使用" "use": "使用",
"networkError": "检测到您网络连接异常,请关闭APP重新打开后再次尝试"
}, },
"opendoorRecord":{ "opendoorRecord":{
"noRecordTip": "暂无记录", "noRecordTip": "暂无记录",
...@@ -162,8 +164,8 @@ ...@@ -162,8 +164,8 @@
"alarmMsgPush": "报警消息推送", "alarmMsgPush": "报警消息推送",
"opendoorMsgPush": "开门消息推送", "opendoorMsgPush": "开门消息推送",
"unbindDialogTip": "确认解除绑定", "unbindDialogTip": "确认解除绑定",
"unbindSuccess": "<img src='../../resources/image/green_unbindSuccess_icon.png'>解除授权成功", "unbindSuccess": "<img src='../../resources/image/green_unbindSuccess_icon.png'>解除绑定成功",
"unbindFailue": "<img src='../../resources/image/green_unbindSuccess_icon.png'>解除授权失败" "unbindFailue": "<img src='../../resources/image/green_unbindSuccess_icon.png'>解除绑定失败"
}, },
"editName":{ "editName":{
"nameInputTip": "请输入门锁名称", "nameInputTip": "请输入门锁名称",
...@@ -181,20 +183,24 @@ ...@@ -181,20 +183,24 @@
"helpCont4": "4.绑定失败则需要重新生成二维码进行绑定" "helpCont4": "4.绑定失败则需要重新生成二维码进行绑定"
}, },
"addDevice": { "addDevice": {
"scanCodeAdd": "扫描绑定设备", "scanCodeAdd": "扫码添加",
"wifiAdd": "配置Wi-Fi", "wifiAdd": "配网添加",
"scanCodeAddTip": "注:扫描门锁主人分享的邀请授权二维码,完成添加。",
"wifiAddTip": "注:门锁尚未联网时,配置门锁联网信息,完成添加。",
"loading": "loading", "loading": "loading",
"bindSuccess": "绑定成功", "bindSuccess": "绑定成功",
"bindFailure": "绑定失败", "bindFailure": "绑定失败",
"reBindDevice": "请重新绑定", "reBindDevice": "请重新绑定",
"addDeviceTip": "扫描授权设备:受邀用户扫描“邀请授权”二维码。配置Wi-Fi:激活智能锁,激活成功后默认成为门锁管理员。" "addDeviceTip": "扫描授权设备:受邀用户扫描“邀请授权”二维码。配置Wi-Fi:激活智能锁,激活成功后默认成为门锁管理员。",
"openCameraTip": "摄像头权限被关闭,请开启权限后重试",
"openCamera": "去开启"
}, },
"wifiAddHelp": { "wifiAddHelp": {
"helpTitle": "配置WIFI说明:", "helpTitle": "配置Wi-Fi说明:",
"helpCont1": "确认设备端进入配网模式(详情操作请见产品说明书)", "helpCont1": "确认设备端进入配网模式(详情操作请见产品说明书)",
"helpCont2": "点击页面下方“开始配置Wi-Fi”按钮,进入WiFi配网页面", "helpCont2": "点击页面下方“开始配置Wi-Fi”按钮,输入正确Wi-Fi密码后开始搜索设备",
"helpCont3": "输入Wi-Fi密码,点击“连接”,等待锁端响应,至配网成功。", "helpCont3": "当系统搜索到设备后,设备将会连接Wi-Fi并完成激活",
"helpCont4": "提示:如果智能锁已经授权过用户,重新授权成功后会清除之前所有授权信息" "helpCont4": "提示:重新配网后,系统将会自动解除已授权用户"
}, },
"wifiAdd": { "wifiAdd": {
"unbindWifiTip": "当前无Wi-Fi", "unbindWifiTip": "当前无Wi-Fi",
...@@ -288,10 +294,11 @@ ...@@ -288,10 +294,11 @@
"cont1": "受邀用户登录“U智锁”APP", "cont1": "受邀用户登录“U智锁”APP",
"cont2": "选择“扫描绑定设备”", "cont2": "选择“扫描绑定设备”",
"cont3": "扫描上方二维码完成绑定", "cont3": "扫描上方二维码完成绑定",
"tip": "注: 二维码有效时间为10分钟,过期请重新生成" "tip": "注: 二维码有效时间为10分钟,过期请",
"buttonText": "重新生成",
"userTip": "授权用户仅可查看开门、报警等记录,无法进行远程开门操作。"
}, },
"unlockInfo":{ "unlockInfo":{
"bindUnlockInfo": "已关联的开锁信息",
"noInfoTip": "尚未关联开锁信息", "noInfoTip": "尚未关联开锁信息",
"bindSoon": "快速关联", "bindSoon": "快速关联",
"passwordOpenDoor": "密码", "passwordOpenDoor": "密码",
...@@ -302,7 +309,8 @@ ...@@ -302,7 +309,8 @@
"appRemoteOpenDoor": "app远程", "appRemoteOpenDoor": "app远程",
"hijackingAlarm": "劫持指纹", "hijackingAlarm": "劫持指纹",
"setHijack": "设为劫持", "setHijack": "设为劫持",
"bindUnlockInfo": "关联开锁信息", "bindUnlockInfo": "关联",
"bindedLockInfo": "已关联的开锁信息",
"addInfoSuccess": "关联开锁信息成功", "addInfoSuccess": "关联开锁信息成功",
"setHijackTip": "确定设为劫持指纹? 设定成功后用该指<br>纹开锁时,系统将会视为劫持报警。", "setHijackTip": "确定设为劫持指纹? 设定成功后用该指<br>纹开锁时,系统将会视为劫持报警。",
"cancelHijack": "取消劫持", "cancelHijack": "取消劫持",
......
...@@ -46,8 +46,10 @@ export default { ...@@ -46,8 +46,10 @@ export default {
"maxlength": 12, "maxlength": 12,
"minlength": 6 "minlength": 6
}, },
"ringBell_timeout": 300, "pushMsg_timeout": 300,
"intervalTime": 3, "intervalTime": 3,
//小红点超时时间,24小时之前的新消息没有小红点提示
"newMsg_timeout": 86400,
"getHistoryTime": 10, "getHistoryTime": 10,
"audioUrl": "../../resources/audio/tipSound.mp3", "audioUrl": "../../resources/audio/tipSound.mp3",
// "audioUrl": "_www/resources/audio/tipSound.mp3" // "audioUrl": "_www/resources/audio/tipSound.mp3"
......
...@@ -23,30 +23,7 @@ function init() { ...@@ -23,30 +23,7 @@ function init() {
}, },
mounted(){ mounted(){
let self = this; let self = this;
if(plus.os.name == 'Android') { resolve(self);
iot.permission.checkPermission(['CAMERA'], function (res) {
console.log('success', res);
console.log("openScanCode"+ new Date().getTime());
openScanCode(self);
}, function (err) {
console.log('error', err);
});
}else{
let isFistOpenCamera = iot.storage.getMap('isFistOpenCamera');
if(isFistOpenCamera){
iot.permission.checkPermission(['CAMERA'], function (res) {
console.log('success', res);
console.log("openScanCode"+ new Date().getTime());
openScanCode(self);
}, function (err) {
console.log('error', err);
});
}else{
openScanCode(self);
iot.storage.setMap('isFistOpenCamera', true,() => {
}, (err) => {});
}
}
window.addEventListener('returnPage',() => { window.addEventListener('returnPage',() => {
self.noticeTipShowFlag = !iot.native.isNotifycationOpen(); self.noticeTipShowFlag = !iot.native.isNotifycationOpen();
scanCodeSuccess(self); scanCodeSuccess(self);
...@@ -86,6 +63,45 @@ function initComponentsConfig() { ...@@ -86,6 +63,45 @@ function initComponentsConfig() {
} }
} }
function resolve(self){
if(plus.os.name == 'Android') {
iot.permission.checkPermission(['CAMERA'], function (res) {
console.log('success', res);
console.log("openScanCode"+ new Date().getTime());
openScanCode(self);
}, function (err) {
console.log('error', err);
plus.nativeUI.confirm(Vue.t("addDevice.openCameraTip"), (e)=>{
if(e.index == 0){
iot.native.toAppSetting();
}
backTap(self);
},{"title": "","buttons": [Vue.t("addDevice.openCamera"),Vue.t("btn.cancel")]});
});
}else{
let isFistOpenCamera = iot.storage.getMap('isFistOpenCamera');
if(isFistOpenCamera){
iot.permission.checkPermission(['CAMERA'], function (res) {
console.log('success', res);
console.log("openScanCode"+ new Date().getTime());
openScanCode(self);
}, function (err) {
console.log('error', err);
plus.nativeUI.confirm(Vue.t("addDevice.openCameraTip"), (e)=>{
if(e.index == 0){
iot.native.toAppSetting();
}
backTap(self);
},{"title": "","buttons": [Vue.t("addDevice.openCamera"),Vue.t("btn.cancel")]});
});
}else{
openScanCode(self);
iot.storage.setMap('isFistOpenCamera', true,() => {
}, (err) => {});
}
}
}
//tap < //tap <
function backTap(self){ function backTap(self){
iot.utils.closeScanBarcode(self.barcode); iot.utils.closeScanBarcode(self.barcode);
...@@ -93,13 +109,18 @@ function backTap(self){ ...@@ -93,13 +109,18 @@ function backTap(self){
} }
function openScanCode(self){ function openScanCode(self){
let bcidBg = '#3a3d54';
// alert(plus.os.name);
if(plus.os.name == 'iOS'){
bcidBg = '#3a3d5400';
}
self.barcode = iot.utils.scanBarcode({ self.barcode = iot.utils.scanBarcode({
data: { data: {
id: 'bcid', id: 'bcid',
styles: { styles: {
frameColor: '#00ffff', frameColor: '#00ffff',
scanbarColor: '#00ffff', scanbarColor: '#00ffff',
background: '#3a3d54' background: bcidBg
} }
}, },
success: (response) => { success: (response) => {
......
...@@ -88,7 +88,7 @@ function initComponentsConfig() { ...@@ -88,7 +88,7 @@ function initComponentsConfig() {
connectButton: { connectButton: {
initParam: { initParam: {
class: 'custom-button', class: 'custom-button',
text: Vue.t('btn.connect') text: Vue.t('btn.search')
} }
}, },
dialog: { dialog: {
...@@ -165,7 +165,7 @@ function connectButtonTap(self){ ...@@ -165,7 +165,7 @@ function connectButtonTap(self){
addFailue(self, Vue.t('wifiAdd.bindTimeout')); addFailue(self, Vue.t('wifiAdd.bindTimeout'));
} }
},1000); },1000);
uComponents.showProcess(self, 0, Vue.t('addDevice.loading'), [{ uComponents.showProcess(self, 0, Vue.t('wifiAdd.wifiBinding'), [{
"class": 'custom-process-button custom-process-cancelButton', 'text': Vue.t('btn.cancel'), 'callback': () => { "class": 'custom-process-button custom-process-cancelButton', 'text': Vue.t('btn.cancel'), 'callback': () => {
uComponents.hideProcess(self); uComponents.hideProcess(self);
window.clearInterval(self.timeout); window.clearInterval(self.timeout);
......
...@@ -116,7 +116,6 @@ function init() { ...@@ -116,7 +116,6 @@ function init() {
warmingShowFlag: false, warmingShowFlag: false,
normalApertureShow: false, normalApertureShow: false,
warmingApertureShow: false, warmingApertureShow: false,
preMsgStatus: {},
//是否显示远程开门页面 //是否显示远程开门页面
remoteOpendoorShowFlag: false, remoteOpendoorShowFlag: false,
//远程开门密码 //远程开门密码
...@@ -530,7 +529,12 @@ function getDevices(self){ ...@@ -530,7 +529,12 @@ function getDevices(self){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'获取设备信息'); iotDebug.upload(iot,'获取设备信息');
} }
uPublic.openRequestErrorAlert(self); // uPublic.openRequestErrorAlert(self);
uComponents.openAlert(self, Vue.t('device.networkError'), {
text: Vue.t('btn.iSee'), callback: function () {
plus.runtime.quit();
}
});
uComponents.hideLoading(self); uComponents.hideLoading(self);
}, },
complete: () => {} complete: () => {}
...@@ -612,7 +616,16 @@ function getLockInfoSuccess(self, data){ ...@@ -612,7 +616,16 @@ function getLockInfoSuccess(self, data){
}); });
//存储历史、安全、劫持记录的时间 //存储历史、安全、劫持记录的时间
let historyRecord = data.info.history; let historyRecord = data.info.history;
updateHistoryMap(self, historyRecord); if((historyRecord.open.length != 0) || Boolean(historyRecord.alarm) || Boolean(historyRecord.notify)){
updateHistoryMap(self, historyRecord);
}else{
iot.storage.delMaps(['historyId','history'], (response) => {
console.log(response);
updateHistoryMap(self, historyRecord);
}, (error) => {
console.log(error);
});
}
//拼接首页滚动的三条记录 //拼接首页滚动的三条记录
getTreenRecord(self, data.info.history.open); getTreenRecord(self, data.info.history.open);
}else{ }else{
...@@ -702,7 +715,7 @@ async function updateHistoryMap(self, historyRecord){ ...@@ -702,7 +715,7 @@ async function updateHistoryMap(self, historyRecord){
let now = moment(new Date()).unix(); let now = moment(new Date()).unix();
if(openHistory.length && oldHistory.open.time < moment(openHistory[0].time).unix() && now - moment(openHistory[0].time).unix() < 3600){ if(openHistory.length && oldHistory.open.time < moment(openHistory[0].time).unix() && now - moment(openHistory[0].time).unix() < config.newMsg_timeout){
newHistory.open.time = moment(openHistory[0].time).unix(); newHistory.open.time = moment(openHistory[0].time).unix();
newHistory.open.isReadFlag = false; newHistory.open.isReadFlag = false;
let record = openHistory; let record = openHistory;
...@@ -729,7 +742,7 @@ async function updateHistoryMap(self, historyRecord){ ...@@ -729,7 +742,7 @@ async function updateHistoryMap(self, historyRecord){
let historyType = ['alarm','notify']; let historyType = ['alarm','notify'];
for(let i=0 ; i < historyType.length; i++){ for(let i=0 ; i < historyType.length; i++){
if(historyRecord.hasOwnProperty(historyType[i]) && oldHistory[historyType[i]].time < moment(historyRecord[historyType[i]]).unix() && now - moment(historyRecord[historyType[i]]).unix() < 3600){ if(historyRecord.hasOwnProperty(historyType[i]) && oldHistory[historyType[i]].time < moment(historyRecord[historyType[i]]).unix() && now - moment(historyRecord[historyType[i]]).unix() < config.newMsg_timeout){
newHistory[historyType[i]].time = moment(historyRecord[historyType[i]]).unix(); newHistory[historyType[i]].time = moment(historyRecord[historyType[i]]).unix();
newHistory[historyType[i]].isReadFlag = false; newHistory[historyType[i]].isReadFlag = false;
...@@ -751,28 +764,25 @@ async function updateHistoryMap(self, historyRecord){ ...@@ -751,28 +764,25 @@ async function updateHistoryMap(self, historyRecord){
self.hijackAlarmFlag = !response.alarm.isReadFlag; self.hijackAlarmFlag = !response.alarm.isReadFlag;
self.opendoorRecordFlag = !response.open.isReadFlag; self.opendoorRecordFlag = !response.open.isReadFlag;
console.log(self.securityAlarmFlag); console.log(self.securityAlarmFlag);
// setMsgStatus(self, false, "default_img", false, false, '', '');
if(self.hijackAlarmFlag == true){ if(self.hijackAlarmFlag == true){
if(historyRecord.hasOwnProperty('alarm')){ if(historyRecord.alarm){
//显示劫持报警 //显示劫持报警
setMsgStatus(self, true, "hijack_img", false, true, moment(historyRecord.alarm,"YYYY-MM-DD hh:mm:ss").format("HH:mm"), Vue.t('device.hijackAlarm')); setMsgStatus(self, true, "hijack_img", false, true, moment(historyRecord.alarm,"YYYY-MM-DD hh:mm:ss").format("HH:mm"), Vue.t('device.hijackAlarm'));
}else{ }else{
//显示劫持报警 //显示安全报警
setMsgStatus(self, true, "hijack_img", false, true, moment.unix(response.alarm.time).format("HH:mm"), Vue.t('device.hijackAlarm')); setMsgStatus(self, true, "hijack_img", false, true, moment.unix(response.alarm.time).format("HH:mm"), Vue.t('device.hijackAlarm'));
} }
}else if(self.securityAlarmFlag == true){ }else if(self.securityAlarmFlag == true){
if(historyRecord.hasOwnProperty('notify')){ if(historyRecord.notify){
//显示安全报警 //显示安全报警
setMsgStatus(self, true, "securityAlarm_img", false, true, moment(historyRecord.notify,"YYYY-MM-DD hh:mm:ss").format("HH:mm"), Vue.t('device.securityAlarm')); setMsgStatus(self, true, "securityAlarm_img", false, true, moment(historyRecord.notify,"YYYY-MM-DD hh:mm:ss").format("HH:mm"), Vue.t('device.securityAlarm'));
}else{ }else{
//显示劫持报警 //显示安全报警
setMsgStatus(self, true, "securityAlarm_img", false, true, moment.unix(response.notify.time).format("HH:mm"), Vue.t('device.securityAlarm')); setMsgStatus(self, true, "securityAlarm_img", false, true, moment.unix(response.notify.time).format("HH:mm"), Vue.t('device.securityAlarm'));
} }
}else{ }else{
if((self.getMsgClass() == 'hijack_img') || (self.getMsgClass() == 'securityAlarm_img')){ if((self.getMsgClass() == 'hijack_img') || (self.getMsgClass() == 'securityAlarm_img')){
//显示之前的记录 setMsgStatus(self, false, "default_img", false, false, '', '');
setMsgStatus(self, self.preMsgStatus.warmingShowFlag, self.preMsgStatus.msgClass, self.preMsgStatus.normalApertureShow, self.preMsgStatus.warmingApertureShow, self.preMsgStatus.msgTime, self.preMsgStatus.msgText);
} }
} }
}, () => { }, () => {
...@@ -986,7 +996,7 @@ function setBatteryPercentAndIcon(self, value){ ...@@ -986,7 +996,7 @@ function setBatteryPercentAndIcon(self, value){
function setBellRing(self, time){ function setBellRing(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");
if(now.diff(time,'seconds') < config.ringBell_timeout && now.diff(time,'seconds') >= 0){ if(now.diff(time,'seconds') < config.pushMsg_timeout && now.diff(time,'seconds') >= 0){
ringBell(self, time); ringBell(self, time);
} }
} }
...@@ -996,7 +1006,7 @@ function setRemoteOpendoor(self, time){ ...@@ -996,7 +1006,7 @@ 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.remote_timeout && now.diff(time,'seconds') >= 0){ if(now.diff(time,'seconds') < config.pushMsg_timeout && now.diff(time,'seconds') >= 0){
self.setValueRemoteOpendoor(true); self.setValueRemoteOpendoor(true);
self.setRemoteOpendoorDisabledFlag(false); self.setRemoteOpendoorDisabledFlag(false);
setMsgStatus(self, false, "remoteOpendoor_img", true, false, time.format("HH:mm"), Vue.t('device.remoteOpendoor')); setMsgStatus(self, false, "remoteOpendoor_img", true, false, time.format("HH:mm"), Vue.t('device.remoteOpendoor'));
...@@ -1018,15 +1028,6 @@ function setRemoteOpendoor(self, time){ ...@@ -1018,15 +1028,6 @@ function setRemoteOpendoor(self, time){
//设置信息提示 //设置信息提示
function setMsgStatus(self, warmingShow, imgClass, normalAperture, warmingAperture, msgTime, msgText){ function setMsgStatus(self, warmingShow, imgClass, normalAperture, warmingAperture, msgTime, msgText){
//记录前一条信息提示
self.preMsgStatus = {
'warmingShowFlag': self.getWarmingShowFlag(),
'msgClass': self.getMsgClass(),
'normalApertureShow': self.getNormalApertureShow(),
'warmingApertureShow': self.getWarmingApertureShow(),
'msgTime': self.getMsgTime(),
'msgText': self.getMsgText()
}
//设置当前为普通状态 //设置当前为普通状态
self.setWarmingShowFlag(warmingShow); self.setWarmingShowFlag(warmingShow);
//更换icon //更换icon
...@@ -1058,23 +1059,8 @@ function setRemoteOpenDoorLoading(self, status, text, buttonText){ ...@@ -1058,23 +1059,8 @@ function setRemoteOpenDoorLoading(self, status, text, buttonText){
//响铃动画和铃声设置 //响铃动画和铃声设置
function ringBell(self, time){ function ringBell(self, time){
// window.clearInterval(self.time);
// window.clearTimeout(self.timeout);
// let i = 0;
// simpleRingBell(self,i);
// self.setRingTime(config.ring_time);
// self.time = setInterval(function(){
// i++;
// simpleRingBell(self,i);
// },config.await_time*2);
if(self.getDoorbellRingingFlag() === false){ if(self.getDoorbellRingingFlag() === false){
self.setDoorbellRingingFlag(true); self.setDoorbellRingingFlag(true);
// //设置当前为普通状态
// self.setWarmingShowFlag(false);
// //更换icon
// self.setMsgClass("doorbell_img");
// //开启普通动画效果
// self.setNormalApertureShow(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);
self.timeout = setTimeout(() => { self.timeout = setTimeout(() => {
...@@ -1104,41 +1090,6 @@ function ringBell(self, time){ ...@@ -1104,41 +1090,6 @@ function ringBell(self, time){
} }
} }
//铃声和动画循环一遍
//function simpleRingBell(self,i){
// window.clearTimeout(self.timeout);
// self.setDoorbellRingingFlag(true);
// let p = plus.audio.createPlayer(config.audioUrl);
// p.play( function () {
// console.log( "Audio play success!" );
// }, function ( e ) {
// console.log( "Audio play error: " + e.message );
// });
//
// self.timeout = setTimeout(function(){
// p = plus.audio.createPlayer(config.audioUrl);
// p.play( function () {
// console.log( "Audio play success!" );
// }, function ( e ) {
// console.log( "Audio play error: " + e.message );
// });
// window.clearTimeout(self.timeout);
// self.timeout = setTimeout(function(){
// self.setDoorbellRingingFlag(false);
// window.clearTimeout(self.timeout);
// if(i>=1){
// window.clearInterval(self.time);
// }
// },1500);
// if(i>=1){
// window.clearInterval(self.time);
// }
// },500);
// if(i>=1){
// window.clearInterval(self.time);
// }
//}
function pushAction(self, msg) { function pushAction(self, msg) {
var payload = msg.payload; var payload = msg.payload;
if (typeof payload == 'string') { if (typeof payload == 'string') {
......
...@@ -45,7 +45,7 @@ function init() { ...@@ -45,7 +45,7 @@ function init() {
this.role = this.extras.role; this.role = this.extras.role;
console.log(this.extras); console.log(this.extras);
let self = this; let self = this;
this.lockItems = [{text: Vue.t('unlockInfo.bindSoon')},{text: Vue.t('unlockInfo.bindUnlockInfo')}]; this.lockItems = [{text: Vue.t('unlockInfo.bindSoon')},{text: Vue.t('unlockInfo.bindedLockInfo')}];
itemChange(this, this.selectItem); itemChange(this, this.selectItem);
// this.setLoadShowFlag(this.infoList.length); // this.setLoadShowFlag(this.infoList.length);
// let ulistDom = this.$refs.infoList; // let ulistDom = this.$refs.infoList;
......
...@@ -5,25 +5,35 @@ ...@@ -5,25 +5,35 @@
// .noBottomGradient(); // .noBottomGradient();
.addDevice li{ .addDevice li{
margin: 10px; margin: 44px 44px 0 44px;
border: 1px solid;/*no*/ border: 1px solid;/*no*/
border-radius: 5px; border-radius: 5px;
color: @ADDDEVICE-TEXT-COLOR; color: @ADDDEVICE-TEXT-COLOR;
font-size: @ADDDEVICE-TEXT-FONTSIZE; font-size: @ADDDEVICE-TEXT-FONTSIZE;
height: 214px; height: 150px;
line-height: 214px; line-height: 150px;
padding-left: 58px; padding-left: 58px;
&:nth-child(1) img{
width: 90px;
height: 90px;
margin-right: 40px;
}
&:nth-child(2) img{
width: 135px;
height: 64px;
margin-right: 25px;
}
.tap_row(@ADDDEVICE-ROW-ACTIVE-BG); .tap_row(@ADDDEVICE-ROW-ACTIVE-BG);
font-size: 16px;
}
.addDevice p{
width: 100%;
font-size: 12px;
line-height: 32px;
color: #cfcfd1;
text-align: center;
}
.scanAdd img{
width: 70px;
height: 70px;
margin-right: 40px;
}
.wifiAdd img{
width: 105px;
height: 50px;
margin-right: 5px;
} }
//产品型号 //产品型号
...@@ -211,6 +221,7 @@ ...@@ -211,6 +221,7 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
background: rgba(0,0,0,0);
} }
.noticeContent{ .noticeContent{
......
...@@ -560,16 +560,21 @@ ...@@ -560,16 +560,21 @@
} }
} }
.newMsg .custom-switch:before{ .newMsg .custom-switch{
content: ''; .u-switch-handle{
position: absolute; position: relative;
top: 0; &:after{
right: 110px; content: '';
width: 7px;/*no*/ position: absolute;
height: 7px;/*no*/ top: 3.55px;
border-radius: 50%; right: 3.55px;
background-color: #fc2168; width: 9px;/*no*/
z-index: 3; height: 9px;/*no*/
border-radius: 50%;
background-color: #fc2168;
z-index: 3;
}
}
} }
.followServiceNumber-dialog{ .followServiceNumber-dialog{
......
...@@ -200,6 +200,29 @@ ...@@ -200,6 +200,29 @@
} }
} }
} }
.tip{
span{
display: inline;
border-radius: 0;
border-width: 0 0 1px 0;/*no*/
background: none;
outline: none;
margin: 0;
padding: 0;
}
}
}
.invite-usertip{
margin: 41px 42px 0 62px;
&:before{
color: #00FFFF;
content:'\e648';
.iconfont(16px);
line-height: 2;
position: absolute;
left: 41px;
}
} }
.unbindState-dialog(); .unbindState-dialog();
......
...@@ -447,30 +447,39 @@ p { ...@@ -447,30 +447,39 @@ p {
} }
.addDevice li { .addDevice li {
margin: 0.267rem; margin: 1.173rem 1.173rem 0 1.173rem;
border: 1px solid; border: 1px solid;
border-radius: 0.133rem; border-radius: 0.133rem;
color: #00ffff; color: #00ffff;
font-size: 0.48rem; font-size: 0.48rem;
height: 5.707rem; height: 4rem;
line-height: 5.707rem; line-height: 4rem;
padding-left: 1.547rem; padding-left: 1.547rem;
font-size: 0.427rem;
} }
.addDevice li:nth-child(1) img { .addDevice li:active {
width: 2.4rem; background-color: #153D4C;
height: 2.4rem;
margin-right: 1.067rem;
} }
.addDevice li:nth-child(2) img { .addDevice p {
width: 3.6rem; width: 100%;
height: 1.707rem; font-size: 0.32rem;
margin-right: 0.667rem; line-height: 0.853rem;
color: #cfcfd1;
text-align: center;
} }
.addDevice li:active { .scanAdd img {
background-color: #153D4C; width: 1.867rem;
height: 1.867rem;
margin-right: 1.067rem;
}
.wifiAdd img {
width: 2.8rem;
height: 1.333rem;
margin-right: 0.133rem;
} }
.u-list { .u-list {
...@@ -1155,6 +1164,7 @@ p { ...@@ -1155,6 +1164,7 @@ p {
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
background: rgba(0, 0, 0, 0);
} }
.noticeContent { .noticeContent {
......
...@@ -26,12 +26,14 @@ ...@@ -26,12 +26,14 @@
</div> </div>
<div class="content"> <div class="content">
<ul class="addDevice"> <ul class="addDevice">
<v-touch tag="li" v-on:tap="onScanAddTap"> <v-touch class="scanAdd" tag="li" v-on:tap="onScanAddTap">
<img src="../../resources/image/scanCodeAdd.png">{{ $t('addDevice.scanCodeAdd') }} <img src="../../resources/image/scanCodeAdd.png">{{ $t('addDevice.scanCodeAdd') }}
</v-touch> </v-touch>
<v-touch tag="li" v-on:tap="onWifiAddTap"> <p>{{ $t('addDevice.scanCodeAddTip') }}</p>
<v-touch class="wifiAdd" tag="li" v-on:tap="onWifiAddTap">
<img src="../../resources/image/wifiAdd.png">{{ $t('addDevice.wifiAdd') }} <img src="../../resources/image/wifiAdd.png">{{ $t('addDevice.wifiAdd') }}
</v-touch> </v-touch>
<p>{{ $t('addDevice.wifiAddTip') }}</p>
</ul> </ul>
</div> </div>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
......
...@@ -1743,13 +1743,17 @@ p { ...@@ -1743,13 +1743,17 @@ p {
background-position: -0.72rem 0; background-position: -0.72rem 0;
} }
.newMsg .custom-switch:before { .newMsg .custom-switch .u-switch-handle {
position: relative;
}
.newMsg .custom-switch .u-switch-handle:after {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0.095rem;
right: 2.933rem; right: 0.095rem;
width: 7px; width: 9px;
height: 7px; height: 9px;
border-radius: 50%; border-radius: 50%;
background-color: #fc2168; background-color: #fc2168;
z-index: 3; z-index: 3;
......
...@@ -861,6 +861,32 @@ p { ...@@ -861,6 +861,32 @@ p {
background-color: #00ffff; background-color: #00ffff;
} }
.inviteBind .tip span {
display: inline;
border-radius: 0;
border-width: 0 0 1px 0;
background: none;
outline: none;
margin: 0;
padding: 0;
}
.invite-usertip {
margin: 1.093rem 1.12rem 0 1.653rem;
}
.invite-usertip:before {
color: #00FFFF;
content: '\e648';
font-family: iconfont;
font-size: 0.427rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
line-height: 2;
position: absolute;
left: 1.093rem;
}
.unbindState-dialog { .unbindState-dialog {
position: fixed; position: fixed;
top: 0; top: 0;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<p>{{ $t('title.inviteBind') }}</p> <p>{{ $t('title.inviteBind') }}</p>
</div> </div>
<div class="content"> <div class="content">
<p class="invite-usertip">{{ $t('inviteBind.userTip') }}</p>
<ul class="inviteBind"> <ul class="inviteBind">
<li class="qrcode"> <li class="qrcode">
<canvas ref="qrcode"></canvas> <canvas ref="qrcode"></canvas>
...@@ -33,13 +34,13 @@ ...@@ -33,13 +34,13 @@
<span>{{ $t('inviteBind.qrcodeExpireTip') }}</span> <span>{{ $t('inviteBind.qrcodeExpireTip') }}</span>
</p> </p>
</li> </li>
<li class="tip">{{ $t('inviteBind.tip') }}<v-touch tag="span" v-on:tap="onQRcodeButtonTap">{{ $t('inviteBind.buttonText') }}</v-touch></li>
<li class="title">{{ $t('inviteBind.title') }}</li> <li class="title">{{ $t('inviteBind.title') }}</li>
<li><span>&#xe6c1;</span>{{ $t('inviteBind.cont1') }}</li> <li><span>&#xe6c1;</span>{{ $t('inviteBind.cont1') }}</li>
<li><span>&#xe6c0;</span>{{ $t('inviteBind.cont2') }}</li> <li><span>&#xe6c0;</span>{{ $t('inviteBind.cont2') }}</li>
<li class="noBorder"><span>&#xe6c2;</span>{{ $t('inviteBind.cont3') }}</li> <li class="noBorder"><span>&#xe6c2;</span>{{ $t('inviteBind.cont3') }}</li>
<li class="tip">{{ $t('inviteBind.tip') }}</li>
</ul> </ul>
<u-button :init-param="componentsConfig.qrcodeButton.initParam" v-on:u-button-tap="onQRcodeButtonTap"></u-button> <!--<u-button :init-param="componentsConfig.qrcodeButton.initParam" v-on:u-button-tap="onQRcodeButtonTap"></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