Commit a00ec4d1 by 朱建香

1.您还未开启通知,将无法及时接受安全推送!(接受改成接收)

2.wifi配网绑定成功后,点击android的物理返回按钮需要提示“再按一次退出应用”因为这里重写了mui.back
3.wifi配网成功或扫一扫配网成功后跳转首页效果有点奇怪(可试一下在不关闭的情况下跳转到首页)
4.点击sds登录按钮之后需要增加loading
5.英文多语言修改
6.默认昵称修改
  a. 首页左上角“安全退出”
  b. 配网绑定接口默认增加门锁用户昵称
parent fd8f3f8e
...@@ -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"], lang:["zh","en"],
group:srcPath, group:srcPath,
output:outputPath output:outputPath
}; };
\ No newline at end of file
{ {
"loading": "loading...", "loading": "数据加载中...",
"scroll": { "scroll": {
"clickToLoadMore": "上拉加载更多", "clickToLoadMore": "上拉加载更多",
"loading": "loading" "loading": "loading"
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"openNotify": "开启推送通知", "openNotify": "开启推送通知",
"reBound": "重新绑定", "reBound": "重新绑定",
"saveQRcode": "保存二维码到相册", "saveQRcode": "保存二维码到相册",
"unbind": "解", "unbind": "解除授权",
"deleteUser": "删除该用户", "deleteUser": "删除该用户",
"qrcodeReset": "重新生成二维码", "qrcodeReset": "重新生成二维码",
"add": "添加", "add": "添加",
...@@ -30,12 +30,13 @@ ...@@ -30,12 +30,13 @@
"iSee": "我知道了", "iSee": "我知道了",
"unbindDoorlock": "解绑门锁", "unbindDoorlock": "解绑门锁",
"finish": "完成", "finish": "完成",
"cancel": "取消" "cancel": "取消",
"search": "搜索"
}, },
"dialog":{ "dialog":{
"confirm": "确认", "confirm": "确认",
"cancel": "取消", "cancel": "取消",
"unbind": "解", "unbind": "解除授权",
"delete": "删除" "delete": "删除"
}, },
"title":{ "title":{
...@@ -51,15 +52,15 @@ ...@@ -51,15 +52,15 @@
"editName": "修改名称", "editName": "修改名称",
"qrcode": "生成绑定二维码", "qrcode": "生成绑定二维码",
"addDevice": "添加设备", "addDevice": "添加设备",
"scanCodeAdd": "扫描绑定设备", "scanCodeAdd": "扫码添加设备",
"wifiAddHelp": "配置Wi-Fi", "wifiAddHelp": "配网添加设备",
"wifiAdd": "连接Wi-Fi", "wifiAdd": "搜索设备",
"bindUserHelp": "ID-姓名绑定", "bindUserHelp": "ID-姓名绑定",
"bindUser": "绑定用户", "bindUser": "绑定用户",
"userList": "用户列表", "userList": "用户列表",
"doorlockUser": "门锁用户", "doorlockUser": "门锁用户",
"addUser": "添加用户", "addUser": "添加用户",
"inviteBind": "邀请绑定", "inviteBind": "邀请授权",
"unlockInfo": "关联开锁信息", "unlockInfo": "关联开锁信息",
"myInfo": "个人信息", "myInfo": "个人信息",
"editNickname": "修改昵称", "editNickname": "修改昵称",
...@@ -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,25 +183,31 @@ ...@@ -181,25 +183,31 @@
"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:激活智能锁,激活成功后默认成为门锁管理员。",
"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",
"wifiBinding": "正在连接网络...", "wifiBinding": "正在搜索设备...",
"wifiBindSuccess": "Wi-Fi连接成功,正在激活设备...", "wifiBindSuccess": "设备正在连接Wi-Fi...",
"deviceActivating": "Wi-Fi连接成功,正在激活设备...", "wifiBindFailue": "设备连接Wi-Fi失败",
"deviceActivating": "正在等待设备激活...",
"deviceActivateSuccess":"激活成功", "deviceActivateSuccess":"激活成功",
"deviceActivateFailure":"激活失败", "deviceActivateFailure":"激活失败",
"bindTimeout":"连接超时", "bindTimeout":"连接超时",
...@@ -209,6 +217,7 @@ ...@@ -209,6 +217,7 @@
"remindCont2": "2. 本产品暂不支持5GHz无线网络", "remindCont2": "2. 本产品暂不支持5GHz无线网络",
"noticeTip": "检测到您还未开启通知,将无法及时<br>接收安全推送", "noticeTip": "检测到您还未开启通知,将无法及时<br>接收安全推送",
"countDownText": "{0}s", "countDownText": "{0}s",
"defaultNickName": "主用户",
"error": { "error": {
} }
...@@ -255,20 +264,21 @@ ...@@ -255,20 +264,21 @@
}, },
"doorlockUser":{ "doorlockUser":{
"name": "昵称:", "name": "昵称:",
"inviteBind": "邀请绑定", "inviteBind": "邀请授权",
"bindUnlockInfo": "关联开锁信息", "bindUnlockInfo": "关联开锁信息",
"editUsername": "编辑用户昵称", "editUsername": "编辑用户昵称",
"opendoorRecord": "历史开门记录", "opendoorRecord": "历史开门记录",
"unbindDialogTip": "<img src='../../resources/image/green_unbind_icon.png'>解后,该用户不能对门锁下的信息进行查看", "unbindDialogTip": "<img src='../../resources/image/green_unbind_icon.png'>解除授权后,该用户不能对门锁下的信息进行查看",
"deleteUserDialogTip": "删除后,用户对应的开锁id取消关联,同时失去信息查看权限。", "deleteUserDialogTip": "删除后,用户对应的开锁id取消关联,同时失去信息查看权限。",
"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'>解除授权失败",
"guideStep1Tip1": "邀请绑定成功", "guideStep1Tip1": "邀请授权成功",
"guideStep1Tip2": "(受邀用户可查看开门记录,报警记录等<br>相关门锁信息)", "guideStep1Tip2": "(受邀用户可查看开门记录,报警记录等<br>相关门锁信息)",
"guideStep3Tip": "关联后可了解<br>该用户的开门情况", "guideStep3Tip": "关联后可了解<br>该用户的开门情况",
"deleteSuccess": "删除成功", "deleteSuccess": "删除成功",
"deleteFailure": "删除失败", "deleteFailure": "删除失败",
"defaultName": "管理员" "defaultName": "管理员",
"bindedTip": "当前用户已授权,不可重复授权"
}, },
"editName":{ "editName":{
"nameInputTip": "请输入设备名称", "nameInputTip": "请输入设备名称",
...@@ -286,10 +296,11 @@ ...@@ -286,10 +296,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": "密码",
...@@ -300,11 +311,14 @@ ...@@ -300,11 +311,14 @@
"appRemoteOpenDoor": "app远程", "appRemoteOpenDoor": "app远程",
"hijackingAlarm": "劫持指纹", "hijackingAlarm": "劫持指纹",
"setHijack": "设为劫持", "setHijack": "设为劫持",
"setHijackTip": "确认设为劫持指纹?设定后使用该指纹开锁时,门锁用户将会收到劫持报警", "bindUnlockInfo": "关联",
"bindedLockInfo": "已关联的开锁信息",
"addInfoSuccess": "关联开锁信息成功",
"setHijackTip": "确定设为劫持指纹? 设定成功后用该指<br>纹开锁时,系统将会视为劫持报警。",
"cancelHijack": "取消劫持", "cancelHijack": "取消劫持",
"cancelHijackTip": "确认取消劫持指纹?取消后,门锁用户不再收到劫持报警", "cancelHijackTip": "确定取消劫持指纹? 取消后用该指纹开<br>锁时,系统将会视为正常开锁。",
"cancelAssociated": "取消关联", "cancelAssociated": "取消关联",
"cancelAssociatedTip": "取消关联后,开门历史记录中将不再显示关联的用户信息。", "cancelAssociatedTip": "取消关联后,开门记录中将不再显示关联的用户信息。",
"cancelAssociatedSuccess": "取消关联成功", "cancelAssociatedSuccess": "取消关联成功",
"cancelAssociatedFailue": "取消关联失败", "cancelAssociatedFailue": "取消关联失败",
"setHijackSuccess": "设为劫持指纹成功", "setHijackSuccess": "设为劫持指纹成功",
...@@ -349,7 +363,7 @@ ...@@ -349,7 +363,7 @@
"oldPasswordInputTipAgain": "请再次输入旧密码" "oldPasswordInputTipAgain": "请再次输入旧密码"
}, },
"request":{ "request":{
"error": "请求发送失败", "error": "数据加载失败",
"initError": "初始化失败,请关闭APP重试" "initError": "初始化失败,请关闭APP重试"
}, },
"deviceList":{ "deviceList":{
...@@ -357,7 +371,7 @@ ...@@ -357,7 +371,7 @@
"noDeviceTip": "暂无产品型号" "noDeviceTip": "暂无产品型号"
}, },
"notice":{ "notice":{
"tip": "您还未开启通知,将无法及时接安全推送!", "tip": "您还未开启通知,将无法及时接安全推送!",
"button": "去开启" "button": "去开启"
}, },
"help": { "help": {
......
...@@ -217,6 +217,7 @@ ...@@ -217,6 +217,7 @@
"remindCont2": "2. 本产品暂不支持5GHz无线网络", "remindCont2": "2. 本产品暂不支持5GHz无线网络",
"noticeTip": "检测到您还未开启通知,将无法及时<br>接收安全推送", "noticeTip": "检测到您还未开启通知,将无法及时<br>接收安全推送",
"countDownText": "{0}s", "countDownText": "{0}s",
"defaultNickName": "主用户",
"error": { "error": {
} }
...@@ -370,7 +371,7 @@ ...@@ -370,7 +371,7 @@
"noDeviceTip": "暂无产品型号" "noDeviceTip": "暂无产品型号"
}, },
"notice":{ "notice":{
"tip": "您还未开启通知,将无法及时接安全推送!", "tip": "您还未开启通知,将无法及时接安全推送!",
"button": "去开启" "button": "去开启"
}, },
"help": { "help": {
......
...@@ -137,11 +137,11 @@ function passwordChange(self,text){ ...@@ -137,11 +137,11 @@ function passwordChange(self,text){
self.setTextErrorTip(''); self.setTextErrorTip('');
} }
//重新mui.back ////重新mui.back
mui.back = function(){ //mui.back = function(){
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{ }); // iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{ });
iot.navigator.back(); // iot.navigator.back();
} //}
//tap < //tap <
function backTap(){ function backTap(){
...@@ -167,7 +167,7 @@ function connectButtonTap(self){ ...@@ -167,7 +167,7 @@ function connectButtonTap(self){
},1000); },1000);
uComponents.showProcess(self, 0, Vue.t('wifiAdd.wifiBinding'), [{ 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);
//停止配网 //停止配网
iot.business.sds.stopFindDevices({ iot.business.sds.stopFindDevices({
...@@ -350,38 +350,6 @@ function sendDeviceStatus(self, deviceId, productId, uuid){ ...@@ -350,38 +350,6 @@ function sendDeviceStatus(self, deviceId, productId, uuid){
}); });
} }
//云端绑定之前先解绑
function unbind(self, deviceId, productId){
console.log(deviceId);
iot.business.api.sendCustom('lock/unbindDevice',{
data: {
device_sn: deviceId
},
success: (response) => {
console.log(response);
bind(self, deviceId, productId);
if(window.iotDebug){
iotDebug.push('end: 解绑成功'+JSON.stringify(response));
}
if (window.iotDebug) {
iotDebug.upload(iot,'解绑成功');
}
},
error: (error) => {
console.log(error);
if(window.iotDebug){
iotDebug.push('end: 解绑失败'+JSON.stringify(error));
}
if (window.iotDebug) {
iotDebug.upload(iot,'解绑失败');
}
addFailue(self);
},
complete: () => {
}
});
}
//获取设备详情 //获取设备详情
function getInfo(self, deviceId, productId,uuid){ function getInfo(self, deviceId, productId,uuid){
if(uuid){ if(uuid){
...@@ -415,7 +383,8 @@ function bind(self, deviceId, productId, auid){ ...@@ -415,7 +383,8 @@ function bind(self, deviceId, productId, auid){
device_id: deviceId, device_id: deviceId,
auid: auid, auid: auid,
// mac: sn, // mac: sn,
nickname: '' nickname: '',
// username: Vue.t('wifiAdd.defaultNickName')
}, },
success: (response) => { success: (response) => {
console.log(response); console.log(response);
...@@ -488,10 +457,10 @@ function addSuccess(self){ ...@@ -488,10 +457,10 @@ function addSuccess(self){
},{ },{
"class": 'custom-process-button custom-process-cancelButton', 'text': Vue.t('btn.ignore'), 'callback': () => { "class": 'custom-process-button custom-process-cancelButton', 'text': Vue.t('btn.ignore'), 'callback': () => {
//暂不开启 //暂不开启
uComponents.hideProcess(self); // uComponents.hideProcess(self);
iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{ // iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{
needClose: true // needClose: true
}); // });
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../device/index.html', url: '../device/index.html',
id: 'device', id: 'device',
...@@ -505,7 +474,7 @@ function addSuccess(self){ ...@@ -505,7 +474,7 @@ function addSuccess(self){
uComponents.showProcess(self, 1, Vue.t('wifiAdd.deviceActivateSuccess'), [{ uComponents.showProcess(self, 1, Vue.t('wifiAdd.deviceActivateSuccess'), [{
"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);
iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{ iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{
needClose: true needClose: true
}); });
......
...@@ -389,6 +389,10 @@ function init() { ...@@ -389,6 +389,10 @@ function init() {
}, },
onPasswordMatchlength(value){ onPasswordMatchlength(value){
passwordMatchlength(this, value); passwordMatchlength(this, value);
},
//tap 退出系统
onLogoutButtonTap(){
logoutButtonTap(this);
} }
} }
}).$mount('#app'); }).$mount('#app');
...@@ -638,6 +642,7 @@ function getLockInfoSuccess(self, data){ ...@@ -638,6 +642,7 @@ function getLockInfoSuccess(self, data){
function getTreenRecord(self, record){ function getTreenRecord(self, record){
if(record && record.length){ if(record && record.length){
self.newMsg = []; self.newMsg = [];
console.log(self.newMsg);
for(let i = record.length - 1; i >= 0; i--){ for(let i = record.length - 1; i >= 0; i--){
let msg = ''; let msg = '';
if((record[i].mode != 30) && (record[i].mode != 5)){ if((record[i].mode != 30) && (record[i].mode != 5)){
...@@ -645,6 +650,7 @@ function getTreenRecord(self, record){ ...@@ -645,6 +650,7 @@ function getTreenRecord(self, record){
} }
self.newMsg.push(moment(record[i].time).format("YY.MM.DD HH:mm")+ ' ' + msg + Vue.t('device.use') + Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+'')); self.newMsg.push(moment(record[i].time).format("YY.MM.DD HH:mm")+ ' ' + msg + Vue.t('device.use') + Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+''));
} }
console.log(self.newMsg);
uComponents.changeMarqueeText(self, self.newMsg); uComponents.changeMarqueeText(self, self.newMsg);
if(self.newMsg.length >= 2){ if(self.newMsg.length >= 2){
self.activeFlag = true; self.activeFlag = true;
...@@ -725,8 +731,12 @@ async function updateHistoryMap(self, historyRecord){ ...@@ -725,8 +731,12 @@ async function updateHistoryMap(self, historyRecord){
if((record[i].mode != 30) && (record[i].mode != 5)){ if((record[i].mode != 30) && (record[i].mode != 5)){
msg = record[i].nickname; msg = record[i].nickname;
} }
self.newMsg.shift(); if(self.newMsg.length >= 3){
self.newMsg.push(moment(record[i].time).format("YY.MM.DD HH:mm")+ ' ' + msg + Vue.t('device.use') + Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+'')); self.newMsg.shift();
self.newMsg.push(moment(record[i].time).format("YY.MM.DD HH:mm")+ ' ' + msg + Vue.t('device.use') + Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+''));
}else{
self.newMsg.push(moment(record[i].time).format("YY.MM.DD HH:mm")+ ' ' + msg + Vue.t('device.use') + Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+''));
}
} }
uComponents.changeMarqueeText(self, self.newMsg); uComponents.changeMarqueeText(self, self.newMsg);
if(self.newMsg.length >= 2){ if(self.newMsg.length >= 2){
...@@ -1415,3 +1425,44 @@ function commLoadingButtonTap(self){ ...@@ -1415,3 +1425,44 @@ function commLoadingButtonTap(self){
uComponents.hideCommLoading(self); uComponents.hideCommLoading(self);
} }
//tap 退出系统
function logoutButtonTap(self){
uComponents.openConfirm(self, Vue.t('myInfo.logoutDialogTip'),
{text: Vue.t('dialog.cancel'), callback: function () {}},
{text: Vue.t('dialog.confirm'), callback: function () {
iot.business.user.logout({
data: {
// sds: false
},
success: (response) => {
console.log("sdsLogout:"+response);
let sdsResponse = response;
iot.business.websql.delMaps(['utoken', 'userinfo'], (response) => {
iot.storage.delMaps(['historyId','history','isFirstAddUser','isFristAddUnlockInfo'], (response) => {
console.log("clearMap"+response);
//打开登录页面
iot.navigator.openWindow({
url: '../login/index.html',
id: 'login',
extras: {
needClose: true
}
});
}, (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
});
}, (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
});
},
error: (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
},
complete: () => {}
});
}}
);
}
\ No newline at end of file
...@@ -145,6 +145,7 @@ function openSdsLogin(self){ ...@@ -145,6 +145,7 @@ function openSdsLogin(self){
var data = uPublic.checkResponseData(response.data); var data = uPublic.checkResponseData(response.data);
if(data){ if(data){
if(data.hasOwnProperty('UserID')){ if(data.hasOwnProperty('UserID')){
uComponents.hideLoading(self);
cloudsLogin(self, data.UserID); cloudsLogin(self, data.UserID);
} }
}else{ }else{
...@@ -160,9 +161,10 @@ function openSdsLogin(self){ ...@@ -160,9 +161,10 @@ function openSdsLogin(self){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'sds登陆失败'); iotDebug.upload(iot,'sds登陆失败');
} }
uComponents.hideLoading(self);
}, },
complete: () => { complete: () => {
uComponents.hideLoading(self); // uComponents.hideLoading(self);
} }
}); });
}, },
...@@ -189,6 +191,7 @@ function openSdsLogin(self){ ...@@ -189,6 +191,7 @@ function openSdsLogin(self){
//云端登陆 //云端登陆
function cloudsLogin(self, id){ function cloudsLogin(self, id){
console.log("showLoading");
uComponents.showLoading(self); uComponents.showLoading(self);
if(window.iotDebug){ if(window.iotDebug){
iotDebug.push('start: cloudsLogin'); iotDebug.push('start: cloudsLogin');
...@@ -221,12 +224,11 @@ function cloudsLogin(self, id){ ...@@ -221,12 +224,11 @@ function cloudsLogin(self, id){
console.log(response); console.log(response);
}, },
error: (error) => { error: (error) => {
uComponents.hideLoading(self);
console.log(error); console.log(error);
uPublic.openRequestErrorAlert(self); uPublic.openRequestErrorAlert(self);
}, },
complete: () => { complete: () => {}
uComponents.hideLoading(self);
}
}); });
} }
iot.navigator.openWindow({ iot.navigator.openWindow({
......
...@@ -129,7 +129,7 @@ function logoutButtonTap(self){ ...@@ -129,7 +129,7 @@ function logoutButtonTap(self){
iot.business.websql.delMaps(['utoken', 'userinfo'], (response) => { iot.business.websql.delMaps(['utoken', 'userinfo'], (response) => {
iot.storage.delMaps(['historyId','history','isFirstAddUser','isFristAddUnlockInfo'], (response) => { iot.storage.delMaps(['historyId','history','isFirstAddUser','isFristAddUnlockInfo'], (response) => {
console.log("clearMap"+response); console.log("clearMap"+response);
//打开首页 //打开登录页面
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../login/index.html', url: '../login/index.html',
id: 'login', id: 'login',
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
@font-face{ @font-face{
font-family: 'iconfont'; font-family: 'iconfont';
src: url('@{ICONFONT_PATH}/iconfont.ttf') format('truetype'); src: url('@{ICONFONT_PATH}/iconfont.ttf') format('truetype');
//src: url('//at.alicdn.com/t/font_372681_j5n6zgpz0py14i.ttf') format('truetype'); //src: url('//at.alicdn.com/t/font_372681_jxwih2qfoaafko6r.ttf') format('truetype');
} }
@font-face{ @font-face{
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
@CUSTOM-EDITTEXT-COMPONENT-INPUT-FONTSIZE: @F_SIZE_16; @CUSTOM-EDITTEXT-COMPONENT-INPUT-FONTSIZE: @F_SIZE_16;
//自定义弹出框组件 //自定义弹出框组件
@CUSTOM-DIALOG-COMPONENT-BOX-BG: @OPACITY; @CUSTOM-DIALOG-COMPONENT-BOX-BG: @C_BLUE_2;
@CUSTOM-DIALOG-COMPONENT-COLOR: @C_BLUE_4; @CUSTOM-DIALOG-COMPONENT-COLOR: @C_BLUE_4;
@CUSTOM-DIALOG-COMPONENT-CONTENT-FONTSIZE: @F_SIZE_16; @CUSTOM-DIALOG-COMPONENT-CONTENT-FONTSIZE: @F_SIZE_16;
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="header"> <div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onMyInfoTap">&#xe6bf;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onLogoutButtonTap">&#xe6ce;</v-touch>
<p>{{ $t('title.device') }}</p> <p>{{ $t('title.device') }}</p>
</div> </div>
<div class="content"> <div class="content">
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
...@@ -309,7 +309,7 @@ p { ...@@ -309,7 +309,7 @@ p {
.custom-dialog .u-dialog-box { .custom-dialog .u-dialog-box {
width: 8.933rem; width: 8.933rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: #242635;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
padding-bottom: 0.4rem; padding-bottom: 0.4rem;
......
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