Commit f0e198e0 by 朱建香

Merge branch 'wangying' of http://192.168.2.91/gitlab/iot-project-js/doorlock into zjx

# Conflicts:
#	dev/src/lang/zh.json
#	dev/src/view/addDevice/v_wifiAdd.js
#	dev/src/view/addDevice/v_wifiAddHelp.js
#	dev/src/view/device/v_index.js
#	dev/src/view/device/v_remoteOpendoor.js
#	web/lib/js/p.js
#	web/resources/lang/zh.json
#	web/view/device/index.html
#	web/view/myInfo/index.html
parents f62c5c8a 3d30bb28
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>doorlock</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.aptana.projects.webnature</nature>
</natures>
</projectDescription>
1.0.6 / 2017-09-25
1.0.8 / 2017-10-10
==================
* 1.上传门锁用户、门锁管理框架(标签、多语言、基本功能)
* 2.主页添加绑定门锁
1.0.7 / 2017-09-30
==================
* 1.智能指纹锁页面添加动画效果
1.0.6 / 2017-09-25
==================
* 1.修改智能指纹锁页面样式
......
......@@ -18,11 +18,20 @@
"bindUser": "绑定姓名",
"bind": "我要绑定",
"reBound": "请重新绑定",
"saveQRcode": "保存二维码到相册"
"saveQRcode": "保存二维码到相册",
"unbind": "解绑",
"deleteUser": "删除该用户",
"qrcodeReset": "重新生成二维码",
"add": "添加",
"next": "下一步",
"iSee": "我知道了",
"unbindDoorlock": "解绑门锁"
},
"dialog":{
"confirm": "确认",
"cancel": "取消"
"cancel": "取消",
"unbind": "解绑",
"delete": "删除"
},
"title":{
"login": "登录",
......@@ -34,7 +43,6 @@
"remoteOpendoor": "远程开门",
"hijackRecord": "劫持记录",
"doorlockManage": "门锁管理",
"doorlockUsers": "门锁用户",
"editName": "修改名称",
"qrcode": "生成绑定二维码",
"addDevice": "添加设备",
......@@ -43,7 +51,13 @@
"wifiAdd": "连接Wi-Fi",
"bindUserHelp": "ID-姓名绑定",
"bindUser": "绑定用户",
"userList": "用户列表"
"userList": "用户列表",
"doorlockUser": "门锁用户",
"addUser": "添加用户",
"editName": "修改名称",
"inviteBind": "邀请绑定",
"unlockInfo": "绑定开锁信息",
"myInfo": "个人信息"
},
"guide":{
"footer": "指纹改变生活"
......@@ -53,11 +67,11 @@
"passwordInputTip": "请输入密码",
"register": "快速注册",
"forgetPassword": "忘记密码",
"failure": "登陆失败",
"error": {
"telNull": "请输入手机号",
"passWordNull": "请输入密码"
},
"failure": "登陆失败"
}
},
"register":{
"telInputTip": "请输入手机号",
......@@ -92,7 +106,8 @@
"laterFollow": "稍后关注",
"newMsgDoorlock": "门锁最新消息",
"doorLockRinging": "门铃响了",
"defaultNewMsg": "您尚未绑定门锁"
"defaultNewMsg": "您尚未绑定门锁",
"bindDoorlock": "绑定门锁"
},
"opendoorRecord":{
"noRecordTip": "暂无记录",
......@@ -124,7 +139,7 @@
"hijackingAlarm": "劫持指纹报警"
},
"doorlockManage":{
"noDeviceTip": "暂无设备",
"name": "名称",
"deleteDialogTip": "<span>{0}</span>将被删除",
"logoutDialogTip": "确定要退出系统吗?",
"deleteSuccess": "删除成功",
......@@ -148,9 +163,7 @@
},
"addDevice": {
"scanCodeAdd": "扫描绑定设备",
"wifiAdd": "配置Wi-Fi",
"bindSuccess": "绑定成功",
"bindFailue": "绑定失败"
"wifiAdd": "配置Wi-Fi"
},
"wifiAddHelp": {
"helpTitle": "配置Wi-Fi说明:",
......@@ -193,9 +206,67 @@
"id": "指纹ID:<span>{0}</span>密码ID:<span>{1}</span>IC卡ID:<span>{2}</span>",
"noUserTip": "暂无用户"
},
"commstatusLoading":{
"connectSuccess": "Wi-Fi连接成功,正在绑定...",
"bindSuccess": "绑定成功",
"bindFailed": "绑定失败"
},
"userList":{
"name": "昵称:",
"noUserTip": "暂无用户"
},
"addUser":{
"nameInputTip": "请输入您想添加的用户名",
"addUserSuccess": "添加用户成功",
"addUserFailure": "添加用户失败",
"error": {
"nameCanNotEmpty": "用户名不能为空"
}
},
"doorlockUser":{
"name": "昵称:",
"inviteBind": "邀请绑定",
"bindUnlockInfo": "绑定开锁信息",
"opendoorRecord": "历史开门记录",
"unbindDialogTip": "<span></span>解绑后,您将失去对门锁所有查看功能该用户仍在用户列表中",
"deleteUserDialogTip": "删除后,二者不再为绑定关系,用户无法查看该门锁下的任何信息,该用户名下绑定的所有ID号仍可以显示在开门记录中",
"unbindSuccess": "解绑成功",
"unbindFailue": "解绑失败",
"guideStep1Tip1": "邀请绑定成功",
"guideStep1Tip2": "(可查看开门记录,报警记录等<br>相关门锁信息)",
"guideStep3Tip": "绑定后看可了解<br>该用户的开门情况"
},
"editName":{
"nameInputTip": "请输入设备名称",
"editNameSuccess": "修改名称成功",
"editNameFailue": "修改名称失败",
"error": {
"nameCanNotBeBlank": "设备名称不能为空"
}
},
"inviteBind":{
"title": "注意事项:",
"cont1": "1.直接通过微信扫一扫添加门锁",
"cont2": "2.将此二维码保存为图片,发送给好友,好友通过长按识别二维码"
},
"unlockInfo":{
"bindUnlockInfo": "已绑定的开锁信息",
"noInfoTip": "目前无绑定任何信息,请添加"
},
"addUnlockInfo":{
"opendoorMode": "开门方式",
"fingerprint": "指纹",
"password": "密码",
"icCard": "IC卡",
"key": "钥匙",
"hijackFingerprint": "劫持指纹",
"opendoorRecord": "今日开门记录",
"tip": "仅显示未绑定开门记录"
},
"myInfo":{
"editNickname": "修改昵称",
"editPassword": "修改密码"
"editPassword": "修改密码",
"logoutDialogTip": "确定要退出系统吗?"
},
"editNickname": {
"nickNameInputTip": "请输入昵称"
......@@ -205,11 +276,6 @@
"oldPasswordInputTip": "请输入旧密码",
"oldPasswordInputTipAgain": "请再次输入旧密码"
},
"commstatusLoading":{
"connectSuccess": "Wi-Fi连接成功,正在绑定...",
"bindSuccess": "绑定成功",
"bindFailed": "绑定失败"
},
"request":{
"error": "请求发送失败"
}
......
let projectMethods = {};
projectMethods.changeGridList = function (vmObj, list) {
vmObj.$refs.gridlist.changeList(list);
};
projectMethods.changeTimeline = function (vmObj, list) {
vmObj.$refs.timeline.changeList(list);
};
export {projectMethods}
\ No newline at end of file
......@@ -158,7 +158,7 @@ function connectButtonTap(self){
}else{
iot.business.sds.findWifi({
data: {
model: 'UGEN_LIVING_ELECTRICALBLANKET_THM_BL',
model: 'THM_LIVING_ELECTRICALBLANKET_TH_1507',
ssid: self.getTextWiFiName(),
wifiPwd: self.getTextPassword(),
timeout: 20000
......
......@@ -67,6 +67,7 @@ function wifiAddButtonTap(){
// url: './wifiAdd.html',
// id: 'wifiAdd'
// });
console.log("in");
iot.business.sds.wifiDeviceConfig({
success: function (response) {
console.log('wifiDeviceConfig success');
......
......@@ -33,15 +33,15 @@ function init() {
//配置组件
componentsConfig: initComponentsConfig(),
//电量
batteryState: null,
batteryState: 5,
//电量百分比
batteryPercent: 0,
batteryPercent: 100,
//响铃时间
ringingTime: null,
//门铃是否响起
doorbellRingingFlag: true,
doorbellRingingFlag: false,
//远程开门是否开启
remoteOpendoorFlag: true,
remoteOpendoorFlag: false,
//设备ID
deviceId: null,
//设备uuid
......@@ -55,9 +55,10 @@ function init() {
//获取设备信息
iot.business.sds.getDevicesByUser({
success: (response) => {
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(response.data == 'success'){
// console.log(self.uuid);
console.log(self.uuid);
}else if(data){
self.uuid = data[0].uuid;
self.deviceId = data[0].sn;
......@@ -67,6 +68,22 @@ function init() {
},
success: (response) => {
console.log(response);
iot.business.sds.getDeviceStatus({
data: {
uuid: self.uuid
},
success: (response) => {
console.log(response);
let data = response.data;
self.setBatteryPercent(data.battery.value);
self.setBatteryState(config.powerIcon[Math.round(data.battery.value/20)]);
setDevceInfo(self, data);
},
error: (error) => {
console.log(error);
}
});
},
error: (error) => {
console.log(error);
......@@ -78,6 +95,8 @@ function init() {
},
error: (error) => {}
});
console.log("in");
//注册监听上报
iot.business.sds.registerPushListener({
success: (response) => {
......@@ -86,42 +105,42 @@ function init() {
console.log("in");
let data = JSON.parse(response);
console.log(data);
console.log(moment(data.time, "YY-MM-DD-hh-mm-ss").format("HH:mm"));
switch(data.action){
case 'lock_log':
self.setBatteryPercent(data.battery);
self.setBatteryState(config.powerIcon[Math.round(data.battery/20)]);
//user_type: 0:密码用户 1:指纹用户 2:卡用户 3:遥控器 4:钥匙
//uid: 用户id
//time
if(lock_action == 0){
//再次获取最新记录
getLockInfo(self);
setDevceInfo(self, data.params.data);
// console.log(moment(data.time, "YY-MM-DD-hh-mm-ss").format("HH:mm"));
// switch(data.action){
// case 'lock_log':
// self.setBatteryPercent(data.battery);
// self.setBatteryState(config.powerIcon[Math.round(data.battery/20)]);
// //user_type: 0:密码用户 1:指纹用户 2:卡用户 3:遥控器 4:钥匙
// //uid: 用户id
// //time
// if(lock_action == 0){
// //再次获取最新记录
// getLockInfo(self);
// }
// break;
// case 'notify':
// self.setBatteryPercent(data.battery);
// self.setBatteryState(config.powerIcon[Math.round(data.battery/20)]);
// if(data.notify_type == 3){
// self.setDoorbellRingingFlag(true);
// setTimeout(() => {
// self.setDoorbellRingingFlag(false);
// self.setRingingTime(moment(data.time, "YY-MM-DD-hh-mm-ss").format("HH:mm"));
// },3000);
// }else if(data.notify_type == 4){
// self.setRemoteOpendoorFlag(true);
// }
// break;
// case 'status':
// self.setBatteryPercent(data.battery);
// self.setBatteryState(config.powerIcon[Math.round(data.battery/20)]);
// break;
// case 'openDoor':
//
// break;
// }
}
break;
case 'notify':
self.setBatteryPercent(data.battery);
self.setBatteryState(config.powerIcon[Math.round(data.battery/20)]);
if(data.notify_type == 3){
self.setDoorbellRingingFlag(true);
setTimeout(() => {
self.setDoorbellRingingFlag(false);
self.setRingingTime(moment(data.time, "YY-MM-DD-hh-mm-ss").format("HH:mm"));
},3000);
}else if(data.notify_type == 4){
self.setRemoteOpendoorFlag(true);
}
break;
case 'status':
self.setBatteryPercent(data.battery);
self.setBatteryState(config.powerIcon[Math.round(data.battery/20)]);
break;
case 'openDoor':
break;
}
}
// setDevceInfo(self, response.params);
},
error: (error) => {
console.log(error);
......@@ -207,9 +226,13 @@ function init() {
onMyInfoTap(){
myInfoTap(this);
},
//tap 绑定门锁
onBindDoorlockTap(){
bindDoorlockTap();
},
//tap 门锁管理
onDoorlockManageTap(){
doorlockManageTap();
doorlockManageTap(this);
},
//tap 开门记录
onOpendoorRecordTap(){
......@@ -340,8 +363,8 @@ function getLockInfo(self){
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
self.setBatteryPercent(data.battery);
self.setBatteryState(config.powerIcon[Math.round(data.battery/20)]);
// self.setBatteryPercent(data.battery);
// self.setBatteryState(config.powerIcon[Math.round(data.battery/20)]);
console.log(data.info);
self.newMsg = moment(data.info[0].time).format("YY.MM.DD HH:mm") + data.info[0].nickname + Vue.t('opendoorRecord.'+config.openDoorMode[data.info[0].mode]+'');
uComponents.changeMarqueeText(self, self.newMsg);
......@@ -359,18 +382,29 @@ function getLockInfo(self){
//设置设备信息
function setDevceInfo(self, data) {
console.log("监听到了");
self.setBatteryPercent(data.battery);
self.setBatteryState(config.powerIcon[Math.round(data.battery/20)]);
self.setRingingTime(moment(data.time).format("HH:mm"));
if(data.notify_type == 3){
data = {
"battery": {"value": "32"},
"lock_action": {"value": "0"},
"notify_type": {"value": "4"},
"time": {"value": "122324433221"}
}
console.log(data);
self.setBatteryPercent(data.battery.value);
self.setBatteryState(config.powerIcon[Math.round(data.battery.value/20)]);
if(data.lock_action.value == 0){
//再次获取最新记录
console.log("有最新的开门记录");
getLockInfo(self);
}
if(data.notify_type.value == 3){
self.setDoorbellRingingFlag(true);
setTimeout(() => {
self.setDoorbellRingingFlag(false);
self.setRingingTime(moment(data.time.value, "YY-MM-DD-hh-mm-ss").format("HH:mm"));
},3000);
}else if(data.notify_type == 4){
self.setRemoteOpendoorFlag(false);
}else if(data.notify_type.value == 4){
self.setRemoteOpendoorFlag(true);
}
}
......@@ -386,11 +420,21 @@ function myInfoTap(self){
});
}
function bindDoorlockTap(){
iot.navigator.openWindow({
url: '../addDevice/',
id: 'addDevice'
});
}
//tap 门锁管理
function doorlockManageTap(){
function doorlockManageTap(self){
iot.navigator.openWindow({
url: '../doorlockManage/',
id: 'doorlockManage'
id: 'doorlockManage',
extras: {
uuid: self.getUuid()
}
});
}
......@@ -418,10 +462,10 @@ function securityAlarmTap(self){
//tap 门锁用户
function doorlockUserTap(){
iot.navigator.openWindow({
url: '../doorlockUsers/',
id: 'doorlockUsers',
});
// iot.navigator.openWindow({
// url: '../doorlockUsers/',
// id: 'doorlockUsers',
// });
}
//tap 远程开门
......
......@@ -88,6 +88,7 @@ function initComponentsConfig() {
//调用接口获取开门记录
function resolve(self) {
console.log("in");
uComponents.showLoading(self);
self.setDeviceId(iot.navigator.getExtras().deviceId);
iot.business.api.sendCustom('lock/getHistoryRecord',
......
......@@ -137,12 +137,12 @@ function confirmButtonTap(self){
data: {
uuid: self.getUuid(),
setParams: {
'action': {
'value': 'openDoor'
},
'remote_open_door': {
'value': self.getTextPassword()
'lock_action': {
'value': '0'
}
// 'remote_open_door': {
// 'value': self.getTextPassword()
// }
}
},
success: (response) => {
......
......@@ -15,7 +15,7 @@ function init() {
uPublic.componentsInit(['u-text','u-button','u-dialog','u-loading']);
const app = new Vue({
data:{
textName: iot.navigator.getExtras().nickName,
textName: iot.navigator.getExtras().nickname,
textErrorTip: null,
//配置组件
componentsConfig: initComponentsConfig(),
......@@ -23,7 +23,7 @@ function init() {
},
mounted(){
this.extras = iot.navigator.getExtras();
this.textName = self.extras.nickname;
console.log(this.extras);
},
methods:{
getTextName(){
......@@ -43,8 +43,8 @@ function init() {
backTap();
},
//tap 保存
onSaveButtonTap(){
saveButtonTap(this);
onSaveTap(){
saveTap(this);
}
}
}).$mount('#app');
......@@ -95,35 +95,34 @@ function backTap(){
}
//tap 保存
function saveButtonTap(self){
function saveTap(self){
if(self.getTextName() == null || self.getTextName().trim() == ''){
self.setTextErrorTip(Vue.t('editName.error.nameCanNotBeBlank'));
}else{
uComponents.showLoading(self);
iot.business.device.setNickname({
data: {
sds: true,
uuid: self.extras.uuid,
model: self.extras.model,
nickname: self.textName
device_id: self.extras.deviceId,
nickname: self.getTextName()
},
success: (response) => {
console.log("inn");
uComponents.hideLoading(self);
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
uComponents.openAlert(self, Vue.t('editName.editNameSuccess'), {
text: Vue.t('btn.confirm'), callback: function () {
let opener = plus.webview.currentWebview().opener();
let view = plus.webview.getWebviewById(opener.id);
console.log(view);
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{
name: 'zhu'
});
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{});
console.log('returnPage');
iot.navigator.back();
}
});
}
},
error: (error) => {
console.log(error);
uComponents.hideLoading(self);
uComponents.openAlert(self, Vue.t('editName.editNameFailue'), {
text: Vue.t('btn.confirm'), callback: function () {
......
/**
* v_qrcode.js
* Version: 0.1
* User: wy
* Date: 2017-09-06
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 生成绑定二维码页面
*/
var QRCode = require('qrcode');
console.log(QRCode);
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
function init() {
//通用 按钮、dialog、loading组件
uPublic.componentsInit(['u-button','u-dialog','u-loading']);
const app = new Vue({
data:{
//配置组件
componentsConfig: initComponentsConfig(),
//页面传递参数
extras: [],
uuid: null,
qrCodeDisabled: false
},
mounted(){
this.extras = iot.navigator.getExtras();
console.log(this.extras);
this.setUuid(this.extras.uuid);
},
methods:{
getUuid(){
return this.uuid;
},
setUuid(id){
this.uuid = id;
},
setQrCodeDisabled(boolean){
this.qrCodeDisabled = boolean;
},
//tap <
onBackTap(){
backTap();
},
//tap 生成二维码
onQRcodeButtonTap(){
qrcodeButtonTap(this);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
//生成二维码 button 参数
qrcodeButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.qrcode')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//tap <
function backTap(){
iot.navigator.back();
}
//tap 生成二维码
function qrcodeButtonTap(self){
uComponents.showLoading(self);
iot.business.sds.saveqr({
data: {
uuid: self.getUuid()
},
success: (response) => {
let data = uPublic.checkResponseData(response.data);
if(data){
let qrKey = response.data.qrKey;
let qr = self.$refs.qrcode;
QRCode.toCanvas(qr, qrKey, {
scale: 5,
margin: 2
},(error) => {
if (error) {
console.log(error)
} else {
console.log('success');
uComponents.hideLoading(self);
qr.style.width = "5.280rem";
qr.style.height = "5.280rem";
console.log(qr.style);
setTimeout(() => {
self.setQrCodeDisabled(true);
},1000*60*10);
}
});
}else{}
},
error: (error) => {
console.log(error);
//请求失败
uPublic.openRequestErrorAlert(self);
}
});
}
\ No newline at end of file
......@@ -23,6 +23,18 @@ function init() {
mounted(){
},
methods:{
getTextName(){
return this.textName;
},
setTextName(text){
this.textName = text;
},
getTextErrorTip(){
return this.textErrorTip;
},
setTextErrorTip(tip){
this.textErrorTip = tip
},
//tap <
onBackTap(){
backTap();
......@@ -32,7 +44,7 @@ function init() {
},
//tap 确定
onConfirmButtonTap(){
confirmButtonTap();
confirmButtonTap(this);
}
}
}).$mount('#app');
......@@ -75,11 +87,46 @@ function backTap(){
function nameChange(self,text){
self.textName = text;
self.setTextErrorTip(null);
console.log('nameChange: ' + self.textName);
}
//tap 确定
function confirmButtonTap(){
function confirmButtonTap(self){
if(self.getTextName() == null || self.getTextName().trim() == ''){
self.setTextErrorTip(Vue.t('addUser.nameCanNotEmpty'));
}else{
uComponents.showLoading(self);
}
iot.business.api.sendCustom('lock/addUser',{
data: {
device_id: self.extras.deviceId
},
success: (response) => {
console.log(response);
uComponents.openAlert(self, Vue.t('addUser.addUserSuccess'), {
text: Vue.t('btn.confirm'), callback: function () {
console.log("添加用户成功");
//跳转到门锁用户界面
iot.navigator.openWindow({
url: '../doorlockUsers/addUser.',
id: 'addUser',
});
}
});
},
error: (error) => {
console.log(error);
uComponents.openAlert(self, Vue.t('addUser.addUserFailure'), {
text: Vue.t('btn.confirm'), callback: function () {
console.log("添加用户失败");
}
});
},
complete: () => {
uComponents.hideLoading(self);
}
});
iot.navigator.openWindow({
url: './doorlockUsers.html',
id: 'doorlockUsers'
......
/**
* v_doorlockUsers.js
* Version: 0.1
* User: wy
* Date: 2017-10-09
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 门锁用户页面
*/
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
function init() {
//通用 按钮、dialog、loading组件
uPublic.componentsInit(['u-button','u-dialog','u-loading']);
const app = new Vue({
data:{
userInfo: {
image: '../../resources/image/gray_unbindHead_icon.png',
role: 1,
title: '我是个用户二号',
subtitle: ''
},
bindShowFlag: true,
unbindShowFlag: false,
stateShowFlag: false,
guideShowFlag: false,
guideStep1ShowFlag: false,
guideStep2ShowFlag: false,
guideStep3ShowFlag: false,
guideStep4ShowFlag: false,
//配置组件
componentsConfig: initComponentsConfig()
},
mounted(){
},
methods:{
getBindShowFlag(){
return this.bindShowFlag;
},
setBindShowFlag(boolean){
this.bindShowFlag = boolean;
},
getUnbindShowFlag(){
return this.unbindShowFlag;
},
setUnbindShowFlag(boolean){
this.unbindShowFlag = boolean;
},
getStateShowFlag(){
return this.stateShowFlag;
},
setStateShowFlag(boolean){
this.stateShowFlag = boolean;
},
getGuideShowFlag(){
return this.guideShowFlag;
},
setGuideShowFlag(boolean){
this.guideShowFlag = boolean;
},
getGuideStep1ShowFlag(){
return this.guideStep1ShowFlag;
},
setGuideStep1ShowFlag(boolean){
this.guideStep1ShowFlag = boolean;
},
getGuideStep2ShowFlag(){
return this.guideStep2ShowFlag;
},
setGuideStep2ShowFlag(boolean){
this.guideStep2ShowFlag = boolean;
},
getGuideStep3ShowFlag(){
return this.guideStep3ShowFlag;
},
setGuideStep3ShowFlag(boolean){
this.guideStep3ShowFlag = boolean;
},
getGuideStep4ShowFlag(){
return this.guideStep4ShowFlag;
},
setGuideStep4ShowFlag(boolean){
this.guideStep4ShowFlag = boolean;
},
//tap <
onBackTap(){
backTap();
},
onEditNameTap(){
editNameTap();
},
//tap 邀请绑定
onBindTap(){
bindTap();
},
//tap 解绑
onUnbindButtonTap(){
unbindButtonTap(this);
},
//tap 绑定开锁信息
onBindUnlockInfoTap(){
bindUnlockInfoTap();
},
//tap 历史开门记录
onOpendoorRecordTap(){
opendoorRecordTap();
},
//tap 删除该用户
onDeleteUserButtonTap(){
deleteUserButtonTap(this);
},
onUnbindStateDialogTap(){
unbindStateDialogTap(this);
},
//tap 下一步
onNextButtonTap(){
nextButtonTap(this);
},
//tap 我知道了
onISeeButtonTap(){
iSeeButtonTap(this);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
//解绑 button 参数
unbindButton: {
initParam: {
class: 'custom-unbind-button',
text: Vue.t('btn.unbind')
}
},
//删除该用户 button 参数
deleteUserButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.deleteUser')
}
},
//下一步 button 参数
nextButton: {
initParam: {
class: 'custom-dialog-button',
text: Vue.t('btn.next')
}
},
//我知道了 button 参数
iSeeButton: {
initParam: {
class: 'custom-dialog-button',
text: Vue.t('btn.iSee')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//tap <
function backTap(){
iot.navigator.back();
}
function editNameTap(){
iot.navigator.openWindow({
url: './editName.html',
id: 'editName'
});
}
//tap 邀请绑定
function bindTap(){
iot.navigator.openWindow({
url: './inviteBind.html',
id: 'inviteBind'
});
}
//tap 解绑
function unbindButtonTap(self){
uComponents.openConfirm(self, Vue.t('doorlockUsers.unbindDialogTip'),
{text: Vue.t('dialog.cancel'), callback: function () {}},
{text: Vue.t('dialog.unbind'), callback: function () {
self.setStateShowFlag(true);
}}
);
}
function unbindStateDialogTap(self){
self.setStateShowFlag(false);
self.setBindShowFlag(true);
self.setUnbindShowFlag(false);
}
//tap 绑定开锁信息
function bindUnlockInfoTap(){
iot.navigator.openWindow({
url: './unlockInfo.html',
id: 'unlockInfo'
});
}
//tap 历史开门记录
function opendoorRecordTap(){
iot.navigator.openWindow({
url: '../device/opendoorRecord.html',
id: 'opendoorRecord'
});
}
//tap 删除该用户
function deleteUserButtonTap(self){
uComponents.openConfirm(self, Vue.t('doorlockUsers.deleteUserDialogTip'),
{text: Vue.t('dialog.cancel'), callback: function () {}},
{text: Vue.t('dialog.delete'), callback: function () {}}
);
}
//tap 下一步
function nextButtonTap(self){
self.setGuideStep1ShowFlag(false);
self.setGuideStep2ShowFlag(false);
self.setGuideStep3ShowFlag(true);
self.setGuideStep4ShowFlag(true);
}
//tap 我知道了
function iSeeButtonTap(self){
self.setGuideShowFlag(false);
}
\ No newline at end of file
......@@ -43,7 +43,7 @@ function initComponentsConfig() {
return {
nameInput: {
initParam: {
class: 'custom-text',
class: 'custom-editName-text',
placeholder: Vue.t('editName.nameInputTip')
}
},
......
......@@ -15,6 +15,8 @@ function init() {
uPublic.componentsInit(['u-swipe-list','u-dialog','u-loading']);
const app = new Vue({
data:{
//配置组件
componentsConfig: initComponentsConfig(),
//用户列表
userList: [],
userListIndex: null,
......@@ -22,18 +24,28 @@ function init() {
loadFlag: false,
loadText: 'loading',
pagesize: 10,
tip: '无数据'
tip: '无数据',
extras: {}
},
mounted(){
this.userList = [{value: 1, role: 0, image: '../../resources/image/green_head_icon.png', title: '我是用户', subtitle: "昵称: MM"},
{value: 1, role: 1, image: '../../resources/image/green_head_icon.png', title: '我是用户', subtitle: "昵称: MM"}]
self.extras = iot.navigator.getExtras();
//获取用户列表
getUserList();
// this.userList = [{value: 1, role: 0, image: '../../resources/image/green_admin_icon.png', title: '我是用户', subtitle: "MM"},
// {value: 1, role: 1, image: '../../resources/image/green_bindhead_icon.png', title: '我是用户', subtitle: "MM"}]
},
methods:{
getUserList(){
return this.userList;
},
setUserList(list){
this.userList = list;
},
onBackTap(){
backTap();
},
onUserTap(){
addUser();
onAddUserTap(){
addUserTap();
},
setLoadShowFlag(number){
this.loadShowFlag = (number >= this.pagesize);
......@@ -61,17 +73,70 @@ function init() {
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//获取用户列表
function getUserList(self){
uComponents.showLoading(self);
iot.business.device.getUsers({
data: {
device_id: self.extras.deviceId
},
success: (response) => {
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
let list = [];
for(let i = 0; i < data.length ; i++){
list[i] = {
value: data.userId,
role: data.role,
image: data.role == 0 ? '../../resources/image/green_admin_icon.png' : data.name == null ? '../../resources/image/gray_unbindHead_icon.png' : '../../resources/image/green_bindhead_icon.png',
title: data.nickname,
subTitle: data.name
}
}
self.setUserList(self.getUserList().concat(list));
if(data.length > 0){
self.setStartId(data[data.length-1].id);
}
}
},
error: (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
},
complete: () => {
uComponents.hideLoading(self);
}
});
}
//返回上一页
function backTap(){
iot.navigator.back();
}
//添加用户
function addUser(){
// iot.navigator.openWindow({
// url: '../doorlockUsers/addUser',
// id: 'addUser',
// });
function addUserTap(){
iot.navigator.openWindow({
url: '../doorlockUsers/addUser.html',
id: 'addUser',
});
}
// 向左滑动用户列表,修改用户列表下标
......@@ -84,6 +149,10 @@ function swipeRightRow(self) {
}
// 点击组件列表 通知事件和当前点击列表下标
function onTapUserList(self, listIndex) {
iot.navigator.openWindow({
url: '../doorlockUsers/doorlockUsers.html',
id: 'doorlockUsers',
});
if (self.userListIndex != null) {
self.userListIndex = null;
}
......
......@@ -75,6 +75,10 @@ function loginButtonTap(self){
let data = uPublic.checkResponseData(response.data);
if(data){
cloudsLogin(self, data.UserID);
// iot.navigator.openWindow({
// url: '../device/',
// id: 'device'
// });
}else{
}
......@@ -159,7 +163,7 @@ function cloudsLogin(self, id){
error: (error) => {
console.log(error);
//注册失败
uComponents.openAlert(self, 'login.failure', {
uComponents.openAlert(self, Vue.t('login.failure'), {
text: Vue.t('dialog.confirm'), callback: function () {
plus.webview.currentWebview().reload();
}
......
/**
* v_editNickname.js
* Version: 0.1
* User: zjx
* Date: 2017-09-29
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 引导页面
*/
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
function init() {
//通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading','u-text']);
const app = new Vue({
data:{
//配置组件
textNickName: iot.navigator.getExtras().nickname,
textErrorTip: null,
componentsConfig: initComponentsConfig()
},
mounted(){
},
methods:{
getTextNickName(){
return this.textNickName;
},
setTextNickName(text){
this.textNickName = this;
},
onSaveTap(){
saveTap(this);
},
onBackTap(){
backTap();
},
onNicknameChange(text){
nicknameChange(this, text);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
nameInput: {
initParam: {
class: 'custom-editNickname-text',
placeholder: Vue.t('editNickname.nickNameInputTip')
}
},
//保存 button 参数
saveButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.save')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//保存昵称
function saveTap(self){
if(self.textNickName == null || self.textNickName.trim() == ''){
self.textErrorTip = Vue.t('editNickname.nickNameInputTip');
}else{
uComponents.showLoading(self);
iot.business.user.setInfo({
data: {
nickname: self.textNickName,
head: '',
info: {}
},
success: (response) => {
if(response.data = 'success'){
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{
// name: 'zhu'
});
iot.navigator.back();
}
},
error: (error) => {
console.log(error);
},
complete: () => {
uComponents.hideLoading(self);
}
});
}
}
//返回上一页
function backTap(){
iot.navigator.back();
}
function nicknameChange(self, text){
self.textNickName = text;
self.textErrorTip = '';
}
/**
* v_editPassword.js
* Version: 0.1
* User: zjx
* Date: 2017-09-29
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 引导页面
*/
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
function init() {
//通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading','u-text']);
const app = new Vue({
data:{
//配置组件
textNewPassword: null,
textOldPassword: null,
textOldPasswordAgain: null,
textErrorTip: '密码不能为空',
componentsConfig: initComponentsConfig()
},
mounted(){
},
methods:{
onSaveTap(){
saveTap();
},
onBackTap(){
backTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
newPassword: {
initParam: {
class: 'custom-editPassword-text',
placeholder: Vue.t('editPassword.newPasswordInputTip')
}
},
oldPassword: {
initParam: {
class: 'custom-editPassword-text',
placeholder: Vue.t('editPassword.oldPasswordInputTip')
}
},
oldPasswordAgain: {
initParam: {
class: 'custom-editPassword-text',
placeholder: Vue.t('editPassword.oldPasswordInputTipAgain')
}
},
//保存 button 参数
saveButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.save')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//保存昵称
function saveTap(){
}
//返回上一页
function backTap(){
iot.navigator.back();
}
/**
* v_index.js
* Version: 0.1
* User: zjx
* Date: 2017-09-26
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 引导页面
*/
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
function init() {
//通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading']);
const app = new Vue({
data:{
//配置组件
nickname: 'bank',
componentsConfig: initComponentsConfig()
},
mounted(){
let self = this;
getInfo(this);
window.addEventListener('returnPage',function(event){
console.log("in");
getInfo(self);
});
},
methods:{
//tap 修改昵称
onEditNicknameTap(){
editNicknameTap(this);
},
//tap 修改密码
onEditPasswordTap(){
editPasswordTap();
},
onBackTap(){
backTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//tap 修改昵称
function editNicknameTap(self){
iot.navigator.openWindow({
url: '../myInfo/editNickname.html',
id: 'editNickname',
extras: {
nickname: self.nickname
}
});
}
//tap 修改密码
function editPasswordTap(){
iot.navigator.openWindow({
url: '../myInfo/editPassword.html',
id: 'editPassword'
});
}
function backTap(){
iot.navigator.back();
}
function getInfo(self){
iot.business.user.getInfo({
success: (response) => {
let data = uPublic.checkResponseData(response.data);
if(data){
console.log(data);
self.nickname = data.nickname;
}else{
}
},
error: (error) => {},
complete: () => {}
});
}
......@@ -87,7 +87,7 @@
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "" + ({"0":"device/opendoorRecord","1":"device/index","2":"device/hijackRecord","3":"device/alarmInfo","4":"doorlockManage/qrcode","5":"bindUser/index","6":"doorlockManage/index","7":"myInfo/index","8":"myInfo/editPassword","9":"myInfo/editNickname","10":"login/register","11":"login/login","12":"login/index","13":"login/forgetPassword","14":"doorlockUsers/unlockInfo","15":"doorlockUsers/inviteBind","16":"doorlockUsers/index","17":"doorlockUsers/editName","18":"doorlockUsers/doorlockUsers","19":"doorlockUsers/addUser","20":"doorlockUsers/addUnlockInfo","21":"doorlockManage/editName","22":"device/remoteOpendoor","23":"addDevice/wifiAddHelp","24":"addDevice/wifiAdd","25":"addDevice/scanCodeAdd","26":"addDevice/index"}[chunkId]||chunkId) + ".js";
/******/ script.src = __webpack_require__.p + "" + ({"0":"device/opendoorRecord","1":"device/index","2":"device/hijackRecord","3":"device/alarmInfo","4":"doorlockManage/qrcode","5":"bindUser/index","6":"doorlockManage/index","7":"myInfo/index","8":"myInfo/editPassword","9":"myInfo/editNickname","10":"login/register","11":"login/login","12":"login/index","13":"login/forgetPassword","14":"doorlockUsers/unlockInfo","15":"doorlockUsers/inviteBind","16":"doorlockUsers/index","17":"doorlockUsers/editName","18":"doorlockUsers/doorlockUser","19":"doorlockUsers/addUser","20":"doorlockUsers/addUnlockInfo","21":"doorlockManage/editName","22":"device/remoteOpendoor","23":"addDevice/wifiAddHelp","24":"addDevice/wifiAdd","25":"addDevice/scanCodeAdd","26":"addDevice/index"}[chunkId]||chunkId) + ".js";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
......
......@@ -89,6 +89,16 @@
background-repeat: no-repeat;
background-color: #242635;
.background-size(80px 80px);
&:before,
&:after{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
}
p{
position: absolute;
top: 30px;
......@@ -96,7 +106,7 @@
right: 0;
margin: 0 auto;
.bgImgSize(40px,40px,"green_doorbell_icon.png",center,cover);
.transform-origin(top center);
.transform-origin(center 5px);
}
}
}
......@@ -113,6 +123,31 @@
}
}
.active .doorbellCircle .doorbell{
&:before,
&:after{
.animation(aperture 2s linear infinite);
}
&:after{
.animation-delay(-1s);
}
p{
.animation(shake 1s linear infinite);
}
}
.keyframes(shake,{
0%,50%,100%{
.transform(rotate(0deg));
}
25%{
.transform(rotate(-30deg));
}
75%{
.transform(rotate(30deg));
}
});
.batteryState{
text-align: right;
padding-right: 22px;
......@@ -283,7 +318,7 @@
height: 55px;
border-width: 1px;/*no*/
border-radius: 50%;
margin-right: 6px;
margin-right: 7px;
display: inline-block;
vertical-align: middle;
&:before{
......@@ -337,7 +372,7 @@
content: '\e681';
position: absolute;
top: 0;
right: 52px;
right: 104px;
.iconfont(@NEWMSG-ICON-FONTSIZE);
color: @NEWMSG-ICON-COLOR;
z-index: 3;
......
......@@ -161,3 +161,7 @@
.errorTip{
.errorTip();
}
.unbindState-dialog{
.mask();
}
\ No newline at end of file
@import "../public/public.less";
@import "../public/header.less";
//侧滑列表
.user-list{
width: 100%;
height: 100%;
overflow: auto;
position: absolute;
top: 44px;
bottom: 0;
left: 0;
height: auto;
}
.user-list-scroll .user-list-row{
position: relative;
overflow: hidden;
.user-list-handle{
position: relative;
.transition(left 0.4s ease);
left: 0;
background-color: @BODY-BG-COLOR;
padding: 15px 20px;
.display-box();
.box-vertical-alignment();
z-index: 2;
.user-list-image{
width: 50px;
height: 50px;
margin-right: 10px;
}
.user-list-icon{
margin-right: 10px;
.iconfont(@SWIPELIST-COMPONENT-ICON-FONTSIZE);
}
div{
.flex();
min-width: 0;
}
.user-list-title{
.text_oneRow_ellipsis();
}
.user-sub-image{
width: 17px;
height: 17px;
}
.user-list-subtitle{
.text_oneRow_ellipsis();
display: inline-block;
}
&.user-list-selected{
left: -120px;
}
&:after{
content: "\e611";
display: block;
.iconfont(@TEXT-COMPONENT-ICON-FONTSIZE);
.transform(rotate(180deg));
}
}
.user-list-button{
position: absolute;
top: 0;
bottom: 0;
right: 0;
z-index: 1;
div{
width: 60px;
height: 100%;
.display-box();
.box-horizontal-alignment();
.box-vertical-alignment();
color: @SWIPELIST-COMPONENT-BUTTON-COLOR;
float: left;
&:nth-last-of-type(1){
background-color: transparent;
.iconfont(@TEXT-COMPONENT-ICON-FONTSIZE);
color: #00FFFF;
}
}
}
&:after{
.defaultBorder();
z-index: 2;
.white_gradient_border();
}
}
.u-text();
.u-button();
.unbindState-dialog{
.mask();
}
.guide-dialog{
.mask();
}
\ No newline at end of file
......@@ -26,6 +26,13 @@
}
}
.u-button();
.custom-button{
.button();
.buttonPosition();
}
.editMyInfo{
position: absolute;
top: 44px;
......
......@@ -1018,6 +1018,17 @@ p {
background-size: 2.133rem 2.133rem;
}
.doorbellBg .doorbellCircle .doorbell:before,
.doorbellBg .doorbellCircle .doorbell:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
}
.doorbellBg .doorbellCircle .doorbell p {
position: absolute;
top: 0.8rem;
......@@ -1029,8 +1040,8 @@ p {
background: url("../../resources/image/green_doorbell_icon.png") no-repeat center;
-webkit-background-size: cover;
background-size: cover;
-webkit-transform-origin: top center;
transform-origin: top center;
-webkit-transform-origin: center 0.133rem;
transform-origin: center 0.133rem;
}
.doorbellBg .doorbellTip {
......@@ -1046,6 +1057,56 @@ p {
margin-right: 0.267rem;
}
.active .doorbellCircle .doorbell:before,
.active .doorbellCircle .doorbell:after {
-webkit-animation: aperture 2s linear infinite;
animation: aperture 2s linear infinite;
}
.active .doorbellCircle .doorbell:after {
-webkit-animation-delay: -1s;
animation-delay: -1s;
}
.active .doorbellCircle .doorbell p {
-webkit-animation: shake 1s linear infinite;
animation: shake 1s linear infinite;
}
@-webkit-keyframes shake {
0%, 50%, 100% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
25% {
-webkit-transform: rotate(-30deg);
transform: rotate(-30deg);
}
75% {
-webkit-transform: rotate(30deg);
transform: rotate(30deg);
}
}
@keyframes shake {
0%, 50%, 100% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
25% {
-webkit-transform: rotate(-30deg);
transform: rotate(-30deg);
}
75% {
-webkit-transform: rotate(30deg);
transform: rotate(30deg);
}
}
.batteryState {
text-align: right;
padding-right: 0.587rem;
......@@ -1349,7 +1410,7 @@ p {
height: 1.467rem;
border-width: 1px;
border-radius: 50%;
margin-right: 0.16rem;
margin-right: 0.187rem;
display: inline-block;
vertical-align: middle;
}
......@@ -1413,7 +1474,7 @@ p {
content: '\e681';
position: absolute;
top: 0;
right: 1.387rem;
right: 2.773rem;
font-family: iconfont;
font-size: 0.427rem;
-webkit-font-smoothing: antialiased;
......
......@@ -18,22 +18,28 @@
<script type="text/javascript" src="../../lib/js/UIOT.js"></script>
</head>
<body ontouchstart="">
<div id="app" v-cloak>
<div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onMyInfoTap()">&#xe66f;</v-touch>
<v-touch tag="span" class="header-left icon" v-on:tap="onMyInfoTap">&#xe66f;</v-touch>
<p>{{ $t('title.device') }}</p>
</div>
<div class="content">
<div class="topCpnt">
<div class="doorbellBg active">
<div v-show="uuid">
<div class="doorbellBg" v-bind:class="{ active: doorbellRingingFlag }">
<div class="doorbellCircle">
<div class="doorbell">
<p></p>
</div>
</div>
<div class="doorbellTip" v-bind:class="[{active: doorbellRingingFlag}]"><span>{{ ringingTime }}</span>{{ $t('device.doorLockRinging') }}</div>
<div class="doorbellTip"><span>17:30</span>门铃响了</div>
</div>
<p class="batteryState"><span v-html="batteryState"></span>{{ batteryPercent }}%</p>
</div>
<p class="batteryState" v-show="uuid"><span v-html="batteryState"></span>{{ batteryPercent }}%</p>
<v-touch tag="div" v-show="!uuid" class="bindDoorlock" v-on:tap="onBindDoorlockTap">
<p>{{ $t('device.bindDoorlock') }}</p>
</v-touch>
</div>
<div class="deviceHandle">
<p class="title" v-if="uuid">{{ $t('device.newMsgDoorlock') }}</p>
......@@ -61,7 +67,7 @@
</div>
<div class="guoupRow">
<!-- 远程开门 -->
<div class="col-xs-6 remoteOpendoor" :class="[{newMsg: remoteOpendoorFlag}]">
<div class="col-xs-6 remoteOpendoor" v-bind:class="{newMsg: remoteOpendoorFlag}">
<u-switch :value="valueRemoteOpendoor" :init-param="componentsConfig.remoteOpendoorSwitch.initParam" v-on:u-switch-tap="onRemoteOpendoorTap"></u-switch>
</div>
<!-- 门锁管理 -->
......@@ -84,7 +90,7 @@
</li>
</ul>
<u-button :init-param="componentsConfig.saveQRcodeButton.initParam" v-on:u-button-tap="onSaveQRcodeButtonTap"></u-button>
<v-touch tag="p" v-on:tap="onLaterFollowTap">{{ $t('device.laterFollow') }}</v-touch>
<p class="linkText"><v-touch tag="span" v-on:tap="onLaterFollowTap">{{ $t('device.laterFollow') }}</v-touch></p>
</div>
</div>
</transition>
......
......@@ -32,6 +32,11 @@
</div>
<u-button :init-param="componentsConfig.confirmButton.initParam" v-on:u-button-tap="onConfirmButtonTap"></u-button>
</div>
<u-commstatus-loading ref="ucommstatusloading" :text="textLoading" :status="status"
:init-param="componentsConfig.ucommstatusloading.initParam" v-on:u-commstatus-loading-tap="onCommstatusLoadingButtonTap()">
<p class="loader"></p>
<p class="icon"></p>
</u-commstatus-loading>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
......
......@@ -772,3 +772,13 @@ p {
height: 1.067rem;
line-height: 1.067rem;
}
.unbindState-dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1051;
background-color: rgba(0, 0, 0, 0.8);
}
\ No newline at end of file
@font-face {
font-family: 'defaultIconfont';
src: url('../../resources/font/defaultIconfont.ttf') format('truetype');
}
@font-face {
font-family: 'iconfont';
src: url('//at.alicdn.com/t/font_372681_ifeqlzhn1k9e8kt9.ttf') format('truetype');
}
html,
body {
width: 100%;
height: 100%;
}
body {
-webkit-user-select: none;
user-select: none;
color: #fff;
font-size: 0.373rem;
background: -webkit-linear-gradient(left, #242635, #fff, #242635);
background: linear-gradient(to right, #242635, #fff, #242635);
background-color: #242635;
-webkit-background-size: 100% 1px;
background-size: 100% 1px;
background-repeat: no-repeat;
background-position: bottom center;
}
ul {
padding-left: 0;
list-style: none;
margin-bottom: 0;
}
p {
margin-bottom: 0;
}
.u-loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1050;
background-color: rgba(0, 0, 0, 0.8);
}
.u-loading .u-loading-box {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.u-loading .u-loading-box .u-loading-icon {
width: 30px;
height: 30px;
background-position: center;
background-repeat: no-repeat;
background-image: url("../../resources/image/white_loading_icon.png");
-webkit-background-size: cover;
background-size: cover;
margin: 0 auto;
-webkit-animation: uLoading 1s steps(12, end) infinite;
animation: uLoading 1s steps(12, end) infinite;
}
.u-loading .u-loading-box .u-loading-text {
color: #fff;
margin-top: 0.32rem;
text-align: center;
}
@-webkit-keyframes uLoading {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
@keyframes uLoading {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
.u-dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1050;
background-color: rgba(0, 0, 0, 0.8);
}
.u-dialog .u-dialog-box {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
width: 6.667rem;
background-color: #fff;
border-radius: 0.32rem;
}
.u-dialog .u-dialog-box .u-dialog-content {
padding: 0.4rem;
text-align: center;
position: relative;
}
.u-dialog .u-dialog-box .u-dialog-content:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;
background: #bbb;
}
.u-dialog .u-dialog-box .u-dialog-button {
display: table;
width: 100%;
table-layout: fixed;
border-collapse: separate;
}
.u-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel,
.u-dialog .u-dialog-box .u-dialog-button .u-dialog-confirm {
display: table-cell;
color: #007aff;
text-align: center;
padding: 0.4rem 0;
line-height: 1;
position: relative;
}
.u-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel:after {
content: '';
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 1px;
-webkit-transform: scaleX(0.5);
transform: scaleX(0.5);
background-color: #bbb;
}
.fade-enter-active,
.fade-leave-active {
-webkit-transition: opacity 0.5s linear;
transition: opacity 0.5s linear;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
}
.custom-dialog .u-dialog-box {
width: 7.2rem;
height: 4rem;
border-radius: 0.133rem;
}
.custom-dialog .u-dialog-box .u-dialog-content {
width: 100%;
height: 2.667rem;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
font-size: 0.48rem;
line-height: 0.587rem;
padding: 0 0.4rem;
}
.custom-dialog .u-dialog-box .u-dialog-content:after {
height: 0;
}
.custom-dialog .u-dialog-box .u-dialog-button {
border-spacing: 0.613rem 0;
}
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel,
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-confirm {
background-color: ;
padding: 0.213rem 0;
border-radius: 0.8rem;
}
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel:active,
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-confirm:active {
background-color: ;
}
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel {
color: ;
}
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel:after {
width: 0;
}
.header {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 1.173rem;
z-index: 1030;
background-color: #010d19;
}
.header p {
position: absolute;
top: 0;
left: 1.467rem;
right: 1.467rem;
line-height: 1.173rem;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #fff;
font-size: 0.507rem;
text-align: center;
}
.header span {
color: #fff;
width: 1.467rem;
line-height: 1.173rem;
display: block;
}
.header span:active {
opacity: 0.5;
}
.header .header-left {
float: left;
padding-left: 0.133rem;
}
.header .header-right {
float: right;
padding-right: 0.133rem;
text-align: right;
}
.header .icon {
font-family: iconfont;
font-size: 0.667rem;
-webkit-font-smoothing: antialiased;
line-height: 1.173rem;
}
.header ~ .content {
padding-top: 1.173rem;
}
.u-text {
width: 100%;
display: table;
position: relative;
}
.u-text input {
display: table-cell;
width: 100%;
border: 0;
outline: 0;
-webkit-appearance: none;
padding: 0.533rem 1.867rem 0.533rem 0.533rem;
background-color: transparent;
}
.u-text input[type=text] ~ .u-text-see {
color: #007aff;
}
.u-text .u-text-icon {
font-family: iconfont;
font-size: 0.533rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
width: 1.173rem;
padding-left: 0.453rem;
display: table-cell;
vertical-align: middle;
}
.u-text .u-text-icon ~ input {
padding-left: 0;
}
.u-text .u-text-title {
width: 1.92rem;
padding-left: 0.533rem;
display: table-cell;
vertical-align: middle;
}
.u-text .u-text-title ~ input {
padding-left: 0;
}
.u-text .u-text-clear,
.u-text .u-text-see {
position: absolute;
top: 0;
width: 0.8rem;
height: 100%;
}
.u-text .u-text-clear:before,
.u-text .u-text-see:before {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-family: defaultIconfont;
font-size: 0.667rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
}
.u-text .u-text-clear {
right: 0.8rem;
}
.u-text .u-text-clear:before {
content: '\e724';
}
.u-text .u-text-see {
right: 0;
}
.u-text .u-text-see:before {
content: '\e73c';
}
.u-text:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;
background: #bbb;
}
@media (max-height: 400px /*no*/) {
#app {
height: 17.253rem;
position: relative;
}
}
.u-button {
width: 6.4rem;
color: #fff;
font-size: inherit;
background-color: #007aff;
border-radius: 0.533rem;
text-align: center;
line-height: 1;
margin: 0 auto;
padding: 0.267rem 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
background-clip: padding-box;
}
.u-button:active {
background-color: #0065ff;
}
.u-button.disabled {
background-color: #bbb;
}
\ No newline at end of file
@font-face {
font-family: 'defaultIconfont';
src: url('../../resources/font/defaultIconfont.ttf') format('truetype');
}
@font-face {
font-family: 'iconfont';
src: url('//at.alicdn.com/t/font_372681_ifeqlzhn1k9e8kt9.ttf') format('truetype');
}
html,
body {
width: 100%;
height: 100%;
}
body {
-webkit-user-select: none;
user-select: none;
color: #fff;
font-size: 0.373rem;
background: -webkit-linear-gradient(left, #242635, #fff, #242635);
background: linear-gradient(to right, #242635, #fff, #242635);
background-color: #242635;
-webkit-background-size: 100% 1px;
background-size: 100% 1px;
background-repeat: no-repeat;
background-position: bottom center;
}
ul {
padding-left: 0;
list-style: none;
margin-bottom: 0;
}
p {
margin-bottom: 0;
}
.u-loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1050;
background-color: rgba(0, 0, 0, 0.8);
}
.u-loading .u-loading-box {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.u-loading .u-loading-box .u-loading-icon {
width: 30px;
height: 30px;
background-position: center;
background-repeat: no-repeat;
background-image: url("../../resources/image/white_loading_icon.png");
-webkit-background-size: cover;
background-size: cover;
margin: 0 auto;
-webkit-animation: uLoading 1s steps(12, end) infinite;
animation: uLoading 1s steps(12, end) infinite;
}
.u-loading .u-loading-box .u-loading-text {
color: #fff;
margin-top: 0.32rem;
text-align: center;
}
@-webkit-keyframes uLoading {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
@keyframes uLoading {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
.u-dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1050;
background-color: rgba(0, 0, 0, 0.8);
}
.u-dialog .u-dialog-box {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
width: 6.667rem;
background-color: #fff;
border-radius: 0.32rem;
}
.u-dialog .u-dialog-box .u-dialog-content {
padding: 0.4rem;
text-align: center;
position: relative;
}
.u-dialog .u-dialog-box .u-dialog-content:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;
background: #bbb;
}
.u-dialog .u-dialog-box .u-dialog-button {
display: table;
width: 100%;
table-layout: fixed;
border-collapse: separate;
}
.u-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel,
.u-dialog .u-dialog-box .u-dialog-button .u-dialog-confirm {
display: table-cell;
color: #007aff;
text-align: center;
padding: 0.4rem 0;
line-height: 1;
position: relative;
}
.u-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel:after {
content: '';
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 1px;
-webkit-transform: scaleX(0.5);
transform: scaleX(0.5);
background-color: #bbb;
}
.fade-enter-active,
.fade-leave-active {
-webkit-transition: opacity 0.5s linear;
transition: opacity 0.5s linear;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
}
.custom-dialog .u-dialog-box {
width: 7.2rem;
height: 4rem;
border-radius: 0.133rem;
}
.custom-dialog .u-dialog-box .u-dialog-content {
width: 100%;
height: 2.667rem;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
font-size: 0.48rem;
line-height: 0.587rem;
padding: 0 0.4rem;
}
.custom-dialog .u-dialog-box .u-dialog-content:after {
height: 0;
}
.custom-dialog .u-dialog-box .u-dialog-button {
border-spacing: 0.613rem 0;
}
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel,
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-confirm {
background-color: ;
padding: 0.213rem 0;
border-radius: 0.8rem;
}
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel:active,
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-confirm:active {
background-color: ;
}
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel {
color: ;
}
.custom-dialog .u-dialog-box .u-dialog-button .u-dialog-cancel:after {
width: 0;
}
.header {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 1.173rem;
z-index: 1030;
background-color: #010d19;
}
.header p {
position: absolute;
top: 0;
left: 1.467rem;
right: 1.467rem;
line-height: 1.173rem;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #fff;
font-size: 0.507rem;
text-align: center;
}
.header span {
color: #fff;
width: 1.467rem;
line-height: 1.173rem;
display: block;
}
.header span:active {
opacity: 0.5;
}
.header .header-left {
float: left;
padding-left: 0.133rem;
}
.header .header-right {
float: right;
padding-right: 0.133rem;
text-align: right;
}
.header .icon {
font-family: iconfont;
font-size: 0.667rem;
-webkit-font-smoothing: antialiased;
line-height: 1.173rem;
}
.header ~ .content {
padding-top: 1.173rem;
}
.u-text {
width: 100%;
display: table;
position: relative;
}
.u-text input {
display: table-cell;
width: 100%;
border: 0;
outline: 0;
-webkit-appearance: none;
padding: 0.533rem 1.867rem 0.533rem 0.533rem;
background-color: transparent;
}
.u-text input[type=text] ~ .u-text-see {
color: #007aff;
}
.u-text .u-text-icon {
font-family: iconfont;
font-size: 0.533rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
width: 1.173rem;
padding-left: 0.453rem;
display: table-cell;
vertical-align: middle;
}
.u-text .u-text-icon ~ input {
padding-left: 0;
}
.u-text .u-text-title {
width: 1.92rem;
padding-left: 0.533rem;
display: table-cell;
vertical-align: middle;
}
.u-text .u-text-title ~ input {
padding-left: 0;
}
.u-text .u-text-clear,
.u-text .u-text-see {
position: absolute;
top: 0;
width: 0.8rem;
height: 100%;
}
.u-text .u-text-clear:before,
.u-text .u-text-see:before {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-family: defaultIconfont;
font-size: 0.667rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
}
.u-text .u-text-clear {
right: 0.8rem;
}
.u-text .u-text-clear:before {
content: '\e724';
}
.u-text .u-text-see {
right: 0;
}
.u-text .u-text-see:before {
content: '\e73c';
}
.u-text:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;
background: #bbb;
}
@media (max-height: 400px /*no*/) {
#app {
height: 17.253rem;
position: relative;
}
}
.u-button {
width: 6.4rem;
color: #fff;
font-size: inherit;
background-color: #007aff;
border-radius: 0.533rem;
text-align: center;
line-height: 1;
margin: 0 auto;
padding: 0.267rem 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
background-clip: padding-box;
}
.u-button:active {
background-color: #0065ff;
}
.u-button.disabled {
background-color: #bbb;
}
\ No newline at end of file
......@@ -23,12 +23,14 @@
<div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.editName') }}</p>
<v-touch tag="span" class="header-right" v-on:tap="onSaveTap">{{ $t('btn.save') }}</v-touch>
</div>
<div class="content">
<div class="inputBox">
<u-text :init-param="componentsConfig.nameInput.initParam" :text="textName"
v-on:u-text-change="onNameChange(arguments[0])"></u-text>
<p class="errorTip" v-if="textErrorTip">{{ textErrorTip }}</p>
<u-button :init-param="componentsConfig.saveButton.initParam" v-on:u-button-tap="onSaveButtonTap"></u-button>
</div>
</div>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
......
......@@ -23,10 +23,21 @@
<div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.doorlockManage') }}</p>
<v-touch tag="span" class="header-right icon" v-on:tap="onAddTap">&#xe600;</v-touch>
</div>
<grid-list ref="gridlist" :init-param="componentsConfig.doorlockList.initParam" v-on:grid-list-tap="onDoorlockListTap(arguments[0])" v-on:grid-list-button-tap="onDoorlockListButtonTap(arguments[0],arguments[1])"></grid-list>
<u-button :init-param="componentsConfig.logoutButton.initParam" v-on:u-button-tap="onLogoutButtonTap"></u-button>
<div class="content">
<v-touch tag="div" class="doorlockManage" v-on:tap="onEditNameTap">
{{ $t('doorlockManage.name') }}
<p>{{ textNickname }}</p>
</v-touch>
<u-button :init-param="componentsConfig.unbindDoorlockButton.initParam" v-on:u-button-tap="onUnbindDoorlockButtonTap"></u-button>
</div>
<transition name="fade">
<v-touch tag="div" class="unbindState-dialog" v-show="stateShowFlag" v-on:tap="onUnbindStateDialogTap">
<div>
<p>{{ showMsg }}</p>
</div>
</<v-touch>
</transition>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<title></title>
<link rel="stylesheet" type="text/css" href="../../lib/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./doorlockManage.css">
<style type="text/css">
[v-cloak]{
display: none;
}
</style>
<script type="text/javascript" src="../../lib/js/p.js"></script>
<script type="text/javascript" src="../../lib/js/UIOT.js"></script>
</head>
<body ontouchstart="">
<div id="app" v-cloak>
<div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.qrcode') }}</p>
</div>
<div class="content">
<ul class="qrcodeHelp">
<li>{{ $t('qrcode.helpTitle') }}</li>
<li>{{ $t('qrcode.helpCont1') }}</li>
<li>{{ $t('qrcode.helpCont2') }}</li>
<li>{{ $t('qrcode.helpCont3') }}</li>
<li>{{ $t('qrcode.helpCont4') }}</li>
<li>
<p>
<canvas ref="qrcode"></canvas>
</p>
</li>
</ul>
<u-button :init-param="componentsConfig.qrcodeButton.initParam" v-on:u-button-tap="onQRcodeButtonTap"></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>
</div>
<script type="text/javascript" src="./qrcode.js" defer async></script>
</body>
</html>
\ No newline at end of file
......@@ -8,7 +8,7 @@
<meta name="format-detection" content="telephone=no"/>
<title></title>
<link rel="stylesheet" type="text/css" href="../../lib/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./doorlockUsers.css">
<link rel="stylesheet" type="text/css" href="./userList.css">
<style type="text/css">
[v-cloak]{
display: none;
......
......@@ -8,7 +8,7 @@
<meta name="format-detection" content="telephone=no"/>
<title></title>
<link rel="stylesheet" type="text/css" href="../../lib/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./doorlockUsers.css">
<link rel="stylesheet" type="text/css" href="./doorlockUser.css">
<style type="text/css">
[v-cloak]{
display: none;
......@@ -22,31 +22,31 @@
<div id="app" v-cloak>
<div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.doorlockUsers') }}</p>
<p>{{ $t('title.doorlockUser') }}</p>
</div>
<div class="content">
<ul class="userInfoLink">
<li class="userInfo" v-bind:class="{noBind: userInfo.role != 0}">
<li class="userInfo">
<img class="userInfo-image" v-if="userInfo.image && userInfo.role == 0" v-bind:src="userInfo.image">
<div>
<v-touch tag="p" class="userInfo-title" v-on:tap="onEditNameTap">{{ userInfo.title }}</v-touch>
<p class="userInfo-subtitle">
<img class="userInfo-subimage" v-if="userInfo.image && userInfo.role != 0" v-bind:src="userInfo.image">
{{ $t('doorlockUsers.name') }}<span class="userInfo-name" v-if="userInfo.subtitle">{{ userInfo.subtitle }}</span>
<v-touch tag="span" class="userInfo-toBind" v-show="bindShowFlag" v-on:tap="onBindTap">{{ $t('doorlockUsers.inviteBind') }}</v-touch>
{{ $t('doorlockUser.name') }}<span class="userInfo-name" v-if="userInfo.subtitle">{{ userInfo.subtitle }}</span>
<v-touch tag="span" class="userInfo-toBind" v-show="bindShowFlag" v-on:tap="onBindTap">{{ $t('doorlockUser.inviteBind') }}</v-touch>
<u-button :init-param="componentsConfig.unbindButton.initParam" v-on:u-button-tap="onUnbindButtonTap" v-show="unbindShowFlag"></u-button>
</p>
</div>
</li>
<v-touch tag="li" v-on:tap="onBindUnlockInfoTap">{{ $t('doorlockUsers.bindUnlockInfo') }}</v-touch>
<v-touch tag="li" v-on:tap="onOpendoorRecordTap">{{ $t('doorlockUsers.opendoorRecord') }}</v-touch>
<v-touch tag="li" v-on:tap="onBindUnlockInfoTap">{{ $t('doorlockUser.bindUnlockInfo') }}</v-touch>
<v-touch tag="li" v-on:tap="onOpendoorRecordTap">{{ $t('doorlockUser.opendoorRecord') }}</v-touch>
</ul>
<u-button :init-param="componentsConfig.deleteUserButton.initParam" v-on:u-button-tap="onDeleteUserButtonTap"></u-button>
</div>
<transition name="fade">
<v-touch tag="div" class="unbindState-dialog" v-show="stateShowFlag" v-on:tap="onUnbindStateDialogTap">
<div>
<p>{{ $t('doorlockUsers.unbindSuccess') }}</p>
<p>{{ $t('doorlockUser.unbindSuccess') }}</p>
</div>
</<v-touch>
</transition>
......@@ -56,11 +56,11 @@
<div class="guideStep1" v-show="guideStep1ShowFlag">
<div class="guideStep1Cont">
<p>我是个用户</p>
<p><img src="../../resources/image/gray_unbindHead_icon.png">{{ $t('doorlockUsers.name') }}<span>{{ $t('doorlockUsers.inviteBind') }}</span></p>
<p><img src="../../resources/image/gray_unbindHead_icon.png">{{ $t('doorlockUser.name') }}<span>{{ $t('doorlockUser.inviteBind') }}</span></p>
</div>
<div class="guideStep1Tip">
<p>{{ $t('doorlockUsers.guideStep1Tip1') }}</p>
<p v-html="$t('doorlockUsers.guideStep1Tip2')"></p>
<p>{{ $t('doorlockUser.guideStep1Tip1') }}</p>
<p v-html="$t('doorlockUser.guideStep1Tip2')"></p>
</div>
</div>
</transition>
......@@ -72,9 +72,9 @@
<transition name="fade">
<div class="guideStep3" v-show="guideStep3ShowFlag">
<div class="guideStep3Cont">
<p>{{ $t('doorlockUsers.bindUnlockInfo') }}</p>
<p>{{ $t('doorlockUser.bindUnlockInfo') }}</p>
</div>
<div class="guideStep3Tip" v-html="$t('doorlockUsers.guideStep3Tip')"></div>
<div class="guideStep3Tip" v-html="$t('doorlockUser.guideStep3Tip')"></div>
</div>
</transition>
<transition name="fade">
......@@ -88,7 +88,7 @@
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
<script type="text/javascript" src="./doorlockUsers.js" defer async></script>
<script type="text/javascript" src="./doorlockUser.js" defer async></script>
</body>
</html>
\ No newline at end of file
......@@ -430,126 +430,90 @@ p {
padding-top: 1.173rem;
}
.user-list {
.u-text {
width: 100%;
height: 100%;
overflow: auto;
position: absolute;
top: 1.173rem;
bottom: 0;
left: 0;
height: auto;
}
.user-list-scroll .user-list-row {
display: table;
position: relative;
overflow: hidden;
}
.user-list-scroll .user-list-row .user-list-handle {
position: relative;
-webkit-transition: left 0.4s ease;
transition: left 0.4s ease;
left: 0;
background-color: #242635;
padding: 0.4rem 0.533rem;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
z-index: 2;
.u-text input {
display: table-cell;
width: 100%;
border: 0;
outline: 0;
-webkit-appearance: none;
padding: 0.533rem 1.867rem 0.533rem 0.533rem;
background-color: transparent;
}
.user-list-scroll .user-list-row .user-list-handle .user-list-image {
width: 1.333rem;
height: 1.333rem;
margin-right: 0.267rem;
.u-text input[type=text] ~ .u-text-see {
color: #007aff;
}
.user-list-scroll .user-list-row .user-list-handle .user-list-icon {
margin-right: 0.267rem;
.u-text .u-text-icon {
font-family: iconfont;
font-size: 0.533rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
width: 1.12rem;
padding-left: 0.453rem;
display: table-cell;
vertical-align: middle;
}
.user-list-scroll .user-list-row .user-list-handle div {
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
min-width: 0;
}
.user-list-scroll .user-list-row .user-list-handle .user-list-title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
.u-text .u-text-icon ~ input {
padding-left: 0;
}
.user-list-scroll .user-list-row .user-list-handle .user-sub-image {
width: 0.453rem;
height: 0.453rem;
.u-text .u-text-title {
width: 1.92rem;
padding-left: 0.533rem;
display: table-cell;
vertical-align: middle;
}
.user-list-scroll .user-list-row .user-list-handle .user-list-subtitle {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
display: inline-block;
.u-text .u-text-title ~ input {
padding-left: 0;
}
.user-list-scroll .user-list-row .user-list-handle.user-list-selected {
left: -3.2rem;
.u-text .u-text-clear,
.u-text .u-text-see {
position: absolute;
top: 0;
width: 0.8rem;
height: 100%;
}
.user-list-scroll .user-list-row .user-list-handle:after {
content: "\e611";
display: block;
font-family: iconfont;
font-size: 0.533rem;
.u-text .u-text-clear:before,
.u-text .u-text-see:before {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-family: defaultIconfont;
font-size: 0.667rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}
.user-list-scroll .user-list-row .user-list-button {
position: absolute;
top: 0;
bottom: 0;
right: 0;
z-index: 1;
.u-text .u-text-clear {
right: 0.8rem;
}
.user-list-scroll .user-list-row .user-list-button div {
width: 1.6rem;
height: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
color: #fff;
float: left;
.u-text .u-text-clear:before {
content: '\e724';
}
.user-list-scroll .user-list-row .user-list-button div:nth-last-of-type(1) {
background-color: transparent;
font-family: iconfont;
font-size: 0.533rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
color: #00FFFF;
.u-text .u-text-see {
right: 0;
}
.u-text .u-text-see:before {
content: '\e73c';
}
.user-list-scroll .user-list-row:after {
.u-text:after {
content: '';
position: absolute;
bottom: 0;
......@@ -557,7 +521,54 @@ p {
right: 0;
height: 1px;
background: #bbb;
z-index: 2;
background: -webkit-linear-gradient(left, #242635, #fff, #242635);
background: linear-gradient(to right, #242635, #fff, #242635);
}
@media (max-height: 400px /*no*/) {
#app {
height: 17.253rem;
position: relative;
}
}
.u-button {
width: 6.4rem;
color: #fff;
font-size: inherit;
background-color: #007aff;
border-radius: 0.533rem;
text-align: center;
line-height: 1;
margin: 0 auto;
padding: 0.267rem 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
background-clip: padding-box;
}
.u-button:active {
background-color: #0065ff;
}
.u-button.disabled {
background-color: #bbb;
}
.unbindState-dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1051;
background-color: rgba(0, 0, 0, 0.8);
}
.guide-dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1051;
background-color: rgba(0, 0, 0, 0.8);
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<title></title>
<link rel="stylesheet" type="text/css" href="../../lib/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./doorlockUsers.css">
<link rel="stylesheet" type="text/css" href="./userList.css">
<style type="text/css">
[v-cloak]{
display: none;
......@@ -16,44 +16,43 @@
</style>
<script type="text/javascript" src="../../lib/js/p.js"></script>
<script type="text/javascript" src="../../lib/js/UIOT.js"></script>
</head>
<body ontouchstart="">
</head>
<body ontouchstart="">
<div id="app" v-cloak>
<div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.doorlockUsers') }}</p>
<v-touch tag="span" class="header-right icon" v-on:tap="onUserTap">&#xe600;</v-touch>
<p>{{ $t('title.doorlockUser') }}</p>
<v-touch tag="span" class="header-right icon" v-on:tap="onAddUserTap">&#xe600;</v-touch>
</div>
<div class="user-list">
<ul class="user-list-scroll" v-show="userList.length">
<v-touch tag="li" class="user-list-row" v-for="(item, index) in userList" :key="index"
v-on:swipeleft="onSwipeLeftRow(index)"
v-on:swiperight="onSwipeRightRow"
v-bind:swipe-options="{direction: 'horizontal'}">
<v-touch tag="li" class="user-list-row" v-for="(item, index) in userList" :key="index" v-on:swipeleft="onSwipeLeftRow(index)" v-on:swiperight="onSwipeRightRow" v-bind:swipe-options="{direction: 'horizontal'}">
<v-touch tag="div" class="user-list-handle"
v-bind:class="{'user-list-selected': (index == userListIndex)}"
v-on:tap="onTapUserList(index)">
<img class="user-list-image" v-if="item.image && item.role == 0" v-bind:src="item.image">
<div>
<p class="user-list-title">{{ item.title }}</p>
<p class="user-list-subtitle">
<img class="user-sub-image" v-if="item.image && item.role != 0" v-bind:src="item.image">
{{ item.subtitle }}
<img class="user-list-subimage" v-if="item.image && item.role != 0" v-bind:src="item.image">
{{ $t('userList.name') }}<span v-if="item.subtitle">{{ item.subtitle }}</span>
</p>
</div>
</v-touch>
<div class="user-list-button">
<v-touch tag="div" v-on:tap="onTapButton(index)">
&#xe66d;
</v-touch>
<v-touch tag="div" v-on:tap="onTapButton(index)">&#xe66d;</v-touch>
</div>
</v-touch>
<v-touch tag="li" class="user-list-load" v-on:tap="onTapLoad" v-show="loadShowFlag">{{ loadText }}
<v-touch tag="li" class="user-list-load" v-on:tap="onTapLoad" v-show="loadShowFlag">{{ loadText }}</v-touch>
</ul>
<p class="user-list-tip" v-show="(userList.length == 0)">{{ tip }}</p>
</div>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
<script type="text/javascript" src="./index.js" defer async></script>
</body>
</body>
</html>
\ No newline at end of file
......@@ -26,7 +26,6 @@
</div>
<div class="content">
<div class="inputBox">
<p class="logo"></p>
<u-text :init-param="componentsConfig.telInput.initParam" :text="numberTel"
v-on:u-text-change="onTelChange(arguments[0])"></u-text>
<div class="code">
......
......@@ -25,7 +25,6 @@
</div>
<div class="content">
<div class="inputBox">
<u-text :init-param="componentsConfig.telInput.initParam" :text="numberTel"
v-on:u-text-change="onTelChange(arguments[0])"></u-text>
<u-text :init-param="componentsConfig.passwordInput.initParam" :text="textPassword"
......
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<title></title>
<link rel="stylesheet" type="text/css" href="../../lib/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./myInfo.css">
<style type="text/css">
[v-cloak]{
display: none;
}
</style>
<script type="text/javascript" src="../../lib/js/p.js"></script>
<script type="text/javascript" src="../../lib/js/UIOT.js"></script>
</head>
<body ontouchstart="">
<div id="app" v-cloak>
<div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.doorlockUsers') }}</p>
<v-touch tag="span" class="header-right" v-on:tap="onSaveTap">{{ $t('btn.save') }}</v-touch>
</div>
<div class="content">
<u-text :init-param="componentsConfig.nameInput.initParam" :text="textNickName"
v-on:u-text-change="onNicknameChange(arguments[0])"></u-text>
<p class="errorTip" v-if="textErrorTip">{{ textErrorTip }}</p>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
</div>
<script type="text/javascript" src="./editNickname.js" defer async></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<title></title>
<link rel="stylesheet" type="text/css" href="../../lib/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./myInfo.css">
<style type="text/css">
[v-cloak]{
display: none;
}
</style>
<script type="text/javascript" src="../../lib/js/p.js"></script>
<script type="text/javascript" src="../../lib/js/UIOT.js"></script>
</head>
<body ontouchstart="">
<div id="app" v-cloak>
<div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.doorlockUsers') }}</p>
<v-touch tag="span" class="header-right" v-on:tap="onSaveTap">{{ $t('btn.save') }}</v-touch>
</div>
<div class="content">
<u-text :init-param="componentsConfig.newPassword.initParam" :text="textNewPassword"
v-on:u-text-change="onNewPasswordChange(arguments[0])"></u-text>
<u-text :init-param="componentsConfig.oldPassword.initParam" :text="textOldPassword"
v-on:u-text-change="onOldPasswordChange(arguments[0])"></u-text>
<u-text :init-param="componentsConfig.oldPasswordAgain.initParam" :text="textOldPasswordAgain"
v-on:u-text-change="onOldPasswordAgainChange(arguments[0])"></u-text>
<p class="errorTip" v-if="textErrorTip">{{ textErrorTip }}</p>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
</div>
<script type="text/javascript" src="./editPassword.js" defer async></script>
</body>
</html>
......@@ -21,7 +21,7 @@
<div id="app" v-cloak>
<div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.doorlockUsers') }}</p>
<p>{{ $t('title.myInfo') }}</p>
</div>
<ul class="editMyInfo">
<v-touch tag="li" class="editNickname" v-on:tap="onEditNicknameTap">
......@@ -33,6 +33,8 @@
<span>&#xe655;</span>
</v-touch>
</ul>
<u-button :init-param="componentsConfig.logoutButton.initParam" v-on:u-button-tap="onLogoutButtonTap"></u-button>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
<script type="text/javascript" src="./index.js" defer async></script>
......
......@@ -560,6 +560,51 @@ p {
background: linear-gradient(to right, #242635, #fff, #242635);
}
.u-button {
width: 6.4rem;
color: #fff;
font-size: inherit;
background-color: #007aff;
border-radius: 0.533rem;
text-align: center;
line-height: 1;
margin: 0 auto;
padding: 0.267rem 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
background-clip: padding-box;
}
.u-button:active {
background-color: #0065ff;
}
.u-button.disabled {
background-color: #bbb;
}
.custom-button {
width: 7.333rem;
border-radius: 0.133rem;
background-color: transparent;
border: 1px solid;
color: #00ffff;
font-size: 0.427rem;
position: absolute;
bottom: 1.733rem;
left: 0;
right: 0;
}
.custom-button:active {
background-color: #153D4C;
}
.custom-button.disabled {
background-color: transparent;
color: #999;
}
.editMyInfo {
position: absolute;
top: 1.173rem;
......
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