Commit f62c5c8a by 朱建香

1010

parent 6e40dbb7
......@@ -9,6 +9,7 @@
"hammerjs": "2.0.8",
"iscroll": "5.2.0",
"moment": "^2.18.1",
"qrcode": "^0.9.0",
"ugen-components": "^0.1.0",
"underscore": "1.8.3",
"vue": "2.2.6",
......
......@@ -91,7 +91,8 @@
"followCont2": "1.保存二维码-2.用微信从<span>相册选取扫码</span>-3.关注",
"laterFollow": "稍后关注",
"newMsgDoorlock": "门锁最新消息",
"doorLockRinging": "门铃响了"
"doorLockRinging": "门铃响了",
"defaultNewMsg": "您尚未绑定门锁"
},
"opendoorRecord":{
"noRecordTip": "暂无记录",
......
......@@ -24,6 +24,7 @@ function init() {
},
mounted(){
resolve(this);
},
methods:{
getTextWiFiName(){
......@@ -157,7 +158,7 @@ function connectButtonTap(self){
}else{
iot.business.sds.findWifi({
data: {
model: 'THM_LIVING_ELECTRICALBLANKET_TH_1507',
model: 'UGEN_LIVING_ELECTRICALBLANKET_THM_BL',
ssid: self.getTextWiFiName(),
wifiPwd: self.getTextPassword(),
timeout: 20000
......@@ -180,19 +181,62 @@ function connectButtonTap(self){
console.log(error);
}
});
let deviceId = null;
iot.business.sds.findDevices({
success: (response) => {
console.log("findDevices");
console.log(response);
let parameters = {};
// let data = "DeviceInfo:[model = THM_LIVING_ELECTRICALBLANKET_TH_1507,xModel = null,mac = B0:F8:93:10:D5:09,sn = B0F89310D509,uuid = null,connectMode = alibaba_smartconfig_v3,supportRouterProvision = false,productName = null,gatewayUuid = null,deviceType = null,alinkJoinVersion = Bind, ]"
// console.log(data);
if (response.data) {
let info = response.data.split(':[');
if(info[1]){
let query = info[1].split(',');
console.log(query);
for(let i=0; i< query.length; i++){
let pari = query[i].split(' = ');
console.log(pari);
parameters[pari[0]] = pari[1];
}
console.log(parameters.sn);
}
}
if(parameters.sn){
deviceId = parameters.sn;
}
console.log(typeof(deviceId));
if(response.data == "joined success"){
//云端绑定
iot.business.device.bind({
data: {
product_id: 2,
device_id: deviceId,
// mac: parameters.mac,
nickname: ''
},
success: (response) => {
console.log(response);
//连接成功
uComponents.changeCommLoadingStatusAndText(self, 1, '绑定成功');
self.setStatus(1);
},
error: (error) => {
console.log(error);
},
complete: () => {}
});
//连接成功
uComponents.changeCommLoadingStatusAndText(self, 1, '绑定成功');
self.setStatus(1);
// uComponents.changeCommLoadingStatusAndText(self, 1, '绑定成功');
// self.setStatus(1);
// //停止查找设备
iot.business.sds.stopFindDevices({
success: (response) => {},
error: (error) => {}
});
}else if(response.data == "fail"){
//连接失败
uComponents.changeCommLoadingStatusAndText(self, 2, '绑定失败');
......
......@@ -63,18 +63,18 @@ function backTap(){
//tap 开始配置Wi-Fi
function wifiAddButtonTap(){
iot.navigator.openWindow({
url: './wifiAdd.html',
id: 'wifiAdd'
});
// iot.business.sds.wifiDeviceConfig({
// success: function (response) {
// console.log('wifiDeviceConfig success');
// console.log(response);
// },
// error: function (error) {
// console.log('wifiDeviceConfig error');
// console.log(error);
// }
// });
// iot.navigator.openWindow({
// url: './wifiAdd.html',
// id: 'wifiAdd'
// });
iot.business.sds.wifiDeviceConfig({
success: function (response) {
console.log('wifiDeviceConfig success');
console.log(response);
},
error: function (error) {
console.log('wifiDeviceConfig error');
console.log(error);
}
});
}
\ No newline at end of file
......@@ -45,7 +45,9 @@ function init() {
//设备ID
deviceId: null,
//设备uuid
uuid: null
uuid: null,
//最新消息
newMsg: null
},
mounted(){
let self = this;
......@@ -54,7 +56,9 @@ function init() {
iot.business.sds.getDevicesByUser({
success: (response) => {
let data = uPublic.checkResponseData(response.data);
if(data){
if(response.data == 'success'){
// console.log(self.uuid);
}else if(data){
self.uuid = data[0].uuid;
self.deviceId = data[0].sn;
iot.business.sds.getDeviceStatus({
......@@ -69,30 +73,7 @@ function init() {
uPublic.openRequestErrorAlert(self);
}
});
iot.business.api.sendCustom('lock/getLockInfo',{
data: {
// device_id:"600194283588"
device_id: self.deviceId
},
success: (response) => {
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
console.log(data.info);
let 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, newMsg);
}else{
}
},
error: (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
}
});
}else{
getLockInfo(self);
}
},
error: (error) => {}
......@@ -101,10 +82,46 @@ function init() {
iot.business.sds.registerPushListener({
success: (response) => {
console.log(response);
if(response.hasOwnProperty('params')){
console.log(JSON.parse(response));
setDevceInfo(self, response.params);
if(typeof(response) == 'string'){
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);
}
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);
......@@ -114,13 +131,10 @@ function init() {
let power = 5;
this.batteryPercent = power/5*100;
this.batteryState = config.powerIcon[power];
let newMsg = '2017.08.02 18:45 宝贝指纹开门';
// let newMsg = '2017.08.02 18:45 宝贝指纹开门';
// uComponents.changeMarqueeText(this, newMsg);
let time = new Date();
this.ringingTime = moment(time).format("HH:mm");
// getNewOpenDoorRecord(this);
},
methods:{
getValueOpendoorRecord(){
......@@ -247,7 +261,7 @@ function initComponentsConfig() {
marquee: {
initParam: {
class: "custom-marquee",
text: "2017.08.02 18:45 宝贝指纹开门<br>2017.08.02 18:45 宝贝指纹开门<br>2017.08.02 18:45 宝贝指纹开门"
text: Vue.t('device.defaultNewMsg')
}
},
//开门记录switch 参数
......@@ -316,38 +330,51 @@ function initComponentsConfig() {
}
}
//设置设备信息
function setDevceInfo(self, data) {
self.setBatteryState(config.powerIcon[data.power]);
self.setBatteryPercent(data.power/5*100);
self.setRingingTime(moment(data.time).format("HH:mm"));
self.setDoorbellRingingFlag(data);
self.setRemoteOpendoorFlag(flag);
}
//获取最新开门记录
function getNewOpenDoorRecord(self){
iot.business.api.sendCustom('',{
function getLockInfo(self){
iot.business.api.sendCustom('lock/getLockInfo',{
data: {
uuid: 'uuid',
start_id: 0,
page_size: 0
// device_id:"600194283588"
device_id: self.deviceId
},
success: (response) => {
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
uComponents.changeMarqueeText(self, data.message);
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);
}else{
}
},
error: (error) => {
uPublic.openRequestErrorAlert(self);
error: (error) => {
console.log(error);
},
complete: () => {}
uPublic.openRequestErrorAlert(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){
self.setDoorbellRingingFlag(true);
setTimeout(() => {
self.setDoorbellRingingFlag(false);
},3000);
}else if(data.notify_type == 4){
self.setRemoteOpendoorFlag(false);
}
}
//tap 个人信息
function myInfoTap(self){
iot.navigator.openWindow({
......
......@@ -137,8 +137,11 @@ function confirmButtonTap(self){
data: {
uuid: self.getUuid(),
setParams: {
'POW': {
'value': '20'
'action': {
'value': 'openDoor'
},
'remote_open_door': {
'value': self.getTextPassword()
}
}
},
......
/**
* v_addUnlockInfo.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() {
//通用 select、按钮、dialog、loading组件
uPublic.componentsInit(['u-select','u-button','u-dialog','u-loading']);
const app = new Vue({
data:{
recordSelectIndex: 0,
recordSelectList: [],
//配置组件
componentsConfig: initComponentsConfig()
},
mounted(){
},
methods:{
//tap <
onBackTap(){
backTap();
},
onRecordSelectChange(value) {
recordSelectChange(this, value);
},
//tap 添加
onAddButtonTap(){
addButtonTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
recordSelect: {
initParam: {
class: 'custom-select',
list: [
{value: 1, title: '16:35',subtitle: 'ID:001'},
{value: 2, title: '15:33',subtitle: 'ID:002'},
{value: 3, title: '15:06',subtitle: 'ID:007'}
],
pagesize: Number.MAX_VALUE
}
},
//添加 button 参数
addButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.add')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//tap <
function backTap(){
iot.navigator.back();
}
function recordSelectChange(self, value) {
self.recordSelectIndex = value;
console.log('recordSelectChange:' + self.recordSelectIndex);
}
//tap 添加
function addButtonTap(){
iot.navigator.back();
}
\ No newline at end of file
/**
* v_addUser.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() {
//通用 input、按钮、dialog、loading组件
uPublic.componentsInit(['u-text','u-button','u-dialog','u-loading']);
const app = new Vue({
data:{
textName: null,
textErrorTip: null,
//配置组件
componentsConfig: initComponentsConfig()
},
mounted(){
},
methods:{
//tap <
onBackTap(){
backTap();
},
onNameChange(text){
nameChange(this,text);
},
//tap 确定
onConfirmButtonTap(){
confirmButtonTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
nameInput: {
initParam: {
class: 'custom-text',
icon: '&#xe6b0;',
placeholder: Vue.t('addUser.nameInputTip')
}
},
//确定 button 参数
confirmButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.confirm')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//tap <
function backTap(){
iot.navigator.back();
}
function nameChange(self,text){
self.textName = text;
console.log('nameChange: ' + self.textName);
}
//tap 确定
function confirmButtonTap(){
iot.navigator.openWindow({
url: './doorlockUsers.html',
id: 'doorlockUsers'
});
}
\ No newline at end of file
/**
* 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
/**
* v_editName.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() {
//通用 input、dialog、loading组件
uPublic.componentsInit(['u-text','u-dialog','u-loading']);
const app = new Vue({
data:{
textName: '我是个用户二号',
textErrorTip: null,
//配置组件
componentsConfig: initComponentsConfig()
},
mounted(){
},
methods:{
//tap <
onBackTap(){
backTap();
},
//tap 保存
onSaveTap(){
saveTap();
},
onNameChange(text){
nameChange(this,text);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
nameInput: {
initParam: {
class: 'custom-text',
placeholder: Vue.t('editName.nameInputTip')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//tap <
function backTap(){
iot.navigator.back();
}
//tap 保存
function saveTap(){
iot.navigator.back();
}
function nameChange(self,text){
self.textName = text;
console.log('nameChange: ' + self.textName);
}
\ No newline at end of file
/**
* v_inviteBind.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:{
//配置组件
componentsConfig: initComponentsConfig()
},
mounted(){
},
methods:{
//tap <
onBackTap(){
backTap();
},
//tap 重新生成二维码
onQRcodeButtonTap(){
qrcodeButtonTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
//重新生成二维码 button 参数
qrcodeButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.qrcodeReset')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//tap <
function backTap(){
iot.navigator.back();
}
//tap 重新生成二维码
function qrcodeButtonTap(){
alert('重新生成二维码');
}
\ No newline at end of file
/**
* v_unlockInfo.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-dialog','u-loading']);
const app = new Vue({
data:{
unlockInfoList: [{value: 1, title: '指纹1', rightText: 123456},
{value: 2, title: '指纹2', rightText: 123456}],
loadShowFlag: false,
loadFlag: false,
loadText: Vue.t('scroll.clickToLoadMore'),
pagesize: 10,
tip: Vue.t('unlockInfo.noInfoTip'),
//配置组件
componentsConfig: initComponentsConfig()
},
mounted(){
},
methods:{
//tap <
onBackTap(){
backTap();
},
//tap 添加
onAddTap(){
addTap();
},
onTapLoad(){
tapLoad();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//tap <
function backTap(){
iot.navigator.back();
}
//tap 添加
function addTap(){
iot.navigator.openWindow({
url: './addUnlockInfo.html',
id: 'addUnlockInfo'
});
}
//点击加载更多
function tapLoad(){
if (!self.loadFlag) {
self.loadText = Vue.t('scroll.loading');
self.loadFlag = true;
//再次发送获取用户列表请求
}
}
\ No newline at end of file
@import "../public/public.less";
@import "../public/header.less";
.u-select();
.u-button();
\ 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();
}
}
\ No newline at end of file
......@@ -51,27 +51,27 @@
// line-height: 1;
// .flex();
// }
&:first-child{
float: right;
font-family: iconfont;
font-size: @TEXT-COMPONENT-ICON-FONTSIZE;
-webkit-font-smoothing: antialiased;
.transform(rotate(180deg));
}
&:last-child{
// &:first-child{
// float: right;
// font-family: iconfont;
// font-size: @TEXT-COMPONENT-ICON-FONTSIZE;
// -webkit-font-smoothing: antialiased;
// .transform(rotate(180deg));
// }
// &:last-child{
font-size: 12px;
float: right;
}
// }
}
}
.editPassword{
span{
&:nth-child(2){
// &:nth-child(2){
font-family: iconfont;
font-size: @TEXT-COMPONENT-ICON-FONTSIZE;
-webkit-font-smoothing: antialiased;
}
// }
}
}
}
......
......@@ -33,10 +33,10 @@
</div>
<div class="doorbellTip" v-bind:class="[{active: doorbellRingingFlag}]"><span>{{ ringingTime }}</span>{{ $t('device.doorLockRinging') }}</div>
</div>
<p class="batteryState"><span v-html="batteryState"></span>{{ batteryPercent }}%</p>
<p class="batteryState" v-show="uuid"><span v-html="batteryState"></span>{{ batteryPercent }}%</p>
</div>
<div class="deviceHandle">
<p class="title">{{ $t('device.newMsgDoorlock') }}</p>
<p class="title" v-if="uuid">{{ $t('device.newMsgDoorlock') }}</p>
<u-marquee ref="umarquee" :init-param="componentsConfig.marquee.initParam" :active="activeFlag"></u-marquee>
<div class="switchGroup">
<div class="guoupRow">
......
<!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="./unlockInfo.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.unlockInfo') }}</p>
</div>
<div class="content">
<div class="opendoorMode">
<p class="title">{{ $t('addUnlockInfo.opendoorMode') }}</p>
<ul>
<li class="active">{{ $t('addUnlockInfo.fingerprint') }}</li>
<li>{{ $t('addUnlockInfo.password') }}</li>
<li>{{ $t('addUnlockInfo.icCard') }}</li>
<li>{{ $t('addUnlockInfo.key') }}</li>
<li>{{ $t('addUnlockInfo.hijackFingerprint') }}</li>
</ul>
</div>
<div class="opendoorRecord">
<p class="title">{{ $t('addUnlockInfo.opendoorRecord') }}</p>
<u-select ref="uselect" :value="recordSelectIndex" :init-param="componentsConfig.recordSelect.initParam"
v-on:u-select-change="onRecordSelectChange(arguments[0])"></u-select>
<p class="tip">{{ $t('addUnlockInfo.tip') }}</p>
</div>
<u-button :init-param="componentsConfig.addButton.initParam" v-on:u-button-tap="onAddButtonTap"></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="./addUnlockInfo.js" defer async></script>
</body>
</html>
\ No newline at end of file
<!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="./doorlockUsers.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.addUser') }}</p>
</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>
</div>
<u-button :init-param="componentsConfig.confirmButton.initParam" v-on:u-button-tap="onConfirmButtonTap"></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="./addUser.js" defer async></script>
</body>
</html>
\ No newline at end of file
<!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="./doorlockUsers.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>
</div>
<div class="content">
<ul class="userInfoLink">
<li class="userInfo" v-bind:class="{noBind: userInfo.role != 0}">
<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>
<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>
</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>
</div>
</<v-touch>
</transition>
<transition name="fade">
<div class="guide-dialog" v-show="guideShowFlag">
<transition name="fade">
<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>
</div>
<div class="guideStep1Tip">
<p>{{ $t('doorlockUsers.guideStep1Tip1') }}</p>
<p v-html="$t('doorlockUsers.guideStep1Tip2')"></p>
</div>
</div>
</transition>
<transition name="fade">
<div class="guideStep2" v-show="guideStep2ShowFlag">
<u-button :init-param="componentsConfig.nextButton.initParam" v-on:u-button-tap="onNextButtonTap"></u-button>
</div>
</transition>
<transition name="fade">
<div class="guideStep3" v-show="guideStep3ShowFlag">
<div class="guideStep3Cont">
<p>{{ $t('doorlockUsers.bindUnlockInfo') }}</p>
</div>
<div class="guideStep3Tip" v-html="$t('doorlockUsers.guideStep3Tip')"></div>
</div>
</transition>
<transition name="fade">
<div class="guideStep4" v-show="guideStep4ShowFlag">
<u-button :init-param="componentsConfig.iSeeButton.initParam" v-on:u-button-tap="onISeeButtonTap"></u-button>
</div>
</transition>
</div>
</transition>
<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="./doorlockUsers.js" defer async></script>
</body>
</html>
\ No newline at end of file
<!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="./doorlockUsers.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.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>
</div>
</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="./editName.js" defer async></script>
</body>
</html>
\ No newline at end of file
<!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="./doorlockUsers.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.inviteBind') }}</p>
</div>
<div class="content">
<ul class="inviteBind">
<li>
<p></p>
</li>
<li>{{ $t('inviteBind.title') }}</li>
<li>{{ $t('inviteBind.cont1') }}</li>
<li>{{ $t('inviteBind.cont2') }}</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="./inviteBind.js" defer async></script>
</body>
</html>
\ No newline at end of file
<!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="./unlockInfo.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.unlockInfo') }}</p>
<v-touch tag="span" class="header-right" v-on:tap="onAddTap">{{ $t('btn.add') }}</v-touch>
</div>
<div class="content">
<p class="title" v-show="unlockInfoList.length">{{ $t('unlockInfo.bindUnlockInfo') }}</p>
<div class="unlockInfo-list">
<ul class="unlockInfo-list-scroll" v-show="unlockInfoList.length">
<li class="unlockInfo-list-row" v-for="item in unlockInfoList">
{{ item.title }}
<p>ID:{{ item.rightText }}</p>
</li>
<v-touch tag="li" class="uunlockInfo-list-load" v-on:tap="onTapLoad" v-show="loadShowFlag">{{ loadText }}</v-touch>
</ul>
<p class="unlockInfo-list-tip" v-show="(unlockInfoList.length == 0)">{{ tip }}</p>
</div>
</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="./unlockInfo.js" defer async></script>
</body>
</html>
\ No newline at end of file
......@@ -26,13 +26,11 @@
<ul class="editMyInfo">
<v-touch tag="li" class="editNickname" v-on:tap="onEditNicknameTap">
{{ $t('myInfo.editNickname') }}
<span>&#xe611;</span><span>{{ nickname }}</span>
<span>{{ nickname }}</span>
</v-touch>
<v-touch tag="li" class="editPassword" v-on:tap="onEditPasswordTap">
{{ $t('myInfo.editPassword') }}
<span>&#xe611;</span><span>&#xe655;</span>
<span>&#xe655;</span>
</v-touch>
</ul>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
......
......@@ -589,21 +589,12 @@ p {
background: linear-gradient(to right, #242635, #fff, #242635);
}
.editMyInfo li span:first-child {
float: right;
font-family: iconfont;
font-size: 0.533rem;
-webkit-font-smoothing: antialiased;
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}
.editMyInfo li span:last-child {
.editMyInfo li span {
font-size: 0.32rem;
float: right;
}
.editMyInfo .editPassword span:nth-child(2) {
.editMyInfo .editPassword span {
font-family: iconfont;
font-size: 0.533rem;
-webkit-font-smoothing: antialiased;
......
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