Commit 1300ad17 by wangying

Merge remote-tracking branch 'remotes/origin/zjx' into wangying

parents 01362c04 6e40dbb7
<?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>
......@@ -34,6 +34,7 @@
"remoteOpendoor": "远程开门",
"hijackRecord": "劫持记录",
"doorlockManage": "门锁管理",
"doorlockUsers": "门锁用户",
"editName": "修改名称",
"qrcode": "生成绑定二维码",
"addDevice": "添加设备",
......@@ -55,7 +56,8 @@
"error": {
"telNull": "请输入手机号",
"passWordNull": "请输入密码"
}
},
"failure": "登陆失败"
},
"register":{
"telInputTip": "请输入手机号",
......@@ -87,32 +89,53 @@
"followTitle": "关注服务号",
"followCont1": "关注 “i智信” 微信服务号可随时随地掌握设备动态<br>再也不担心错过重要通知,赶紧按下方提示试试吧",
"followCont2": "1.保存二维码-2.用微信从<span>相册选取扫码</span>-3.关注",
"laterFollow": "稍后关注"
"laterFollow": "稍后关注",
"newMsgDoorlock": "门锁最新消息",
"doorLockRinging": "门铃响了"
},
"opendoorRecord":{
"noRecordTip": "暂无记录"
"noRecordTip": "暂无记录",
"passwordOpenDoor": "密码开门",
"fingerprintOpenDoor": "指纹开门",
"ICcardOpenDoor": "IC卡开门",
"remoteOpenDoor": "遥控器开门",
"keyOpenDoor": "钥匙开门",
"hijackingAlarm": "劫持报警",
"appRemoteOpenDoor": "app远程开门"
},
"alarmInfo":{
"noInfoTip": "暂无信息"
"noInfoTip": "暂无信息",
"tamperAlarm": "防撬报警",
"trialAlarm": "试错报警",
"powerAlarm": "欠电报警",
"fackLockAlram": "假锁报警"
},
"remoteOpendoor":{
"passwordInputTip": "请输入远程开门密码",
"openDoorSuccess": "远程开门成功",
"openDoorFailure": "远程开门失败",
"error": {
"noPasswordTip": "远程密码不能为空"
}
},
"hijackRecord":{
"noRecordTip": "暂无记录"
"noRecordTip": "暂无记录",
"hijackingAlarm": "劫持指纹报警"
},
"doorlockManage":{
"noDeviceTip": "暂无设备",
"deleteDialogTip": "<span>{0}</span>将被删除",
"logoutDialogTip": "确定要退出系统吗?"
"logoutDialogTip": "确定要退出系统吗?",
"deleteSuccess": "删除成功",
"deleteFailue": "删除失败",
"defaultNickname": "门锁"
},
"editName":{
"nameInputTip": "请输入门锁名称",
"editNameSuccess": "名字修改成功",
"editNameFailue": "名字修改失败",
"error": {
"nameCanNotBeBlank": "昵称不能为空"
}
},
"qrcode":{
......@@ -124,7 +147,9 @@
},
"addDevice": {
"scanCodeAdd": "扫描绑定设备",
"wifiAdd": "配置Wi-Fi"
"wifiAdd": "配置Wi-Fi",
"bindSuccess": "绑定成功",
"bindFailue": "绑定失败"
},
"wifiAddHelp": {
"helpTitle": "配置Wi-Fi说明:",
......@@ -167,9 +192,24 @@
"id": "指纹ID:<span>{0}</span>密码ID:<span>{1}</span>IC卡ID:<span>{2}</span>",
"noUserTip": "暂无用户"
},
"myInfo":{
"editNickname": "修改昵称",
"editPassword": "修改密码"
},
"editNickname": {
"nickNameInputTip": "请输入昵称"
},
"editPassword": {
"newPasswordInputTip": "请输入新密码",
"oldPasswordInputTip": "请输入旧密码",
"oldPasswordInputTipAgain": "请再次输入旧密码"
},
"commstatusLoading":{
"connectSuccess": "Wi-Fi连接成功,正在绑定...",
"bindSuccess": "绑定成功",
"bindFailed": "绑定失败"
},
"request":{
"error": "请求发送失败"
}
}
\ No newline at end of file
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
let uComponents = {};
uComponents.changeGridList = function (vmObj, list) {
vmObj.$refs.gridlist.changeList(list);
};
uComponents.changeTimeline = function (vmObj, list) {
vmObj.$refs.timeline.changeList(list);
};
export {uComponents}
\ No newline at end of file
export default {
"powerIcon":["&#xe6e5;", "&#xe62b;", "&#xe627;", "&#xe628;", "&#xe62a;", "&#xe629;"],
"openDoorMode": {
0: "passwordOpenDoor",
1: "fingerprintOpenDoor",
2: "ICcardOpenDoor",
3: "remoteOpenDoor",
4: "keyOpenDoor",
5: "hijackingAlarm",
6: "appRemoteOpenDoor"
},
"alarmMode": {
0: "tamperAlarm",
1: "trialAlarm",
2: "powerAlarm",
3: "fackLockAlram"
}
}
\ No newline at end of file
......@@ -11,12 +11,12 @@ const iot = new UIOT({
lang: ['zh', 'en'],
vue: Vue,
i18n: VueI18n,
appId: '10003',
appId: '10004',
wx: {
appId: ''
},
cloud: {
url: 'http://192.168.2.97:20007'
url: 'http://192.168.2.96:20000'
},
plugin: {
log: {
......@@ -54,7 +54,155 @@ uPublic.componentsExtend = function (array) {
});
};
//请求发送失败弹框
uPublic.openRequestErrorAlert = function (vmObj, content = Vue.t('request.error')) {
uComponents.openAlert(vmObj, content, {
text: Vue.t('dialog.confirm'), callback: function () {
}
});
};
// 检查请求成功后data参数
uPublic.checkResponseData = function (data) {
// json
if (data != null && typeof data === 'object') {
if (Object.keys(data).length == 0 || data.hasOwnProperty('msg')) {
return false;
} else {
return data;
}
// array
} else if (Array.isArray(data)) {
if (data.length > 0) {
return data;
} else {
return false;
}
}
};
iot.ready(() => {
uPublic.recalc();
});
iot.navigator.getAllWebviw = function () {
return plus.webview.all();
}
iot.navigator.fire = function (webview, eventType, data) {
if (webview) {
if (typeof data === 'undefined') {
data = '';
} else if (typeof data === 'boolean' || typeof data === 'number') {
webview.evalJS("typeof mui!=='undefined'&&mui.receive('" + eventType + "'," + data + ")");
return;
} else if (typeof data === 'object' && Object.keys(data).length == 0) {
data = JSON.stringify(data || {}).replace(/\'/g, "\\u0027").replace(/\\/g, "\\u005c");
}
webview.evalJS('iot.navigator.receive("' + eventType + '","' + data + '")');
}
};
window.iot = iot;
iot.navigator.receive = function (eventType, data) {
console.log("receive。。。");
if (eventType) {
try {
if (data && typeof data === 'string') {
data = JSON.parse(data);
}
} catch (e) {
}
iot.navigator.trigger(document, eventType, data);
}
};
iot.navigator.trigger = function (element, eventType, eventData) {
console.log("trigger。。。");
console.log(element);
console.log(eventType);
element.dispatchEvent(new CustomEvent(eventType, {
detail: eventData,
bubbles: true,
cancelable: true
}));
return this;
};
iot.navigator.closeAllBesidesItself = function () {
var wvs = plus.webview.all();
// var curWb = plus.webview.currentWebview();
for (var i = 0; i < wvs.length-1; i++) {
// if (wvs[i].id != curWb.id) {
wvs[i].close();
// }
}
}
iot.navigator.closeAll = function (){
var wvs = plus.webview.all();
var curWb = plus.webview.currentWebview();
for (var i = 0; i < wvs.length; i++) {
wvs[i].close();
}
}
iot.ready(function(){
plus.key.addEventListener('backbutton',iot.navigator.aback,false);
// plus.key.addEventListener('backbutton',iot.navigator.aback,false);
})
iot.navigator.aback =function(){
var wobj = plus.webview.currentWebview();
var parent = wobj.parent();
var wbs = iot.navigator.getAllWebviw();
if (wbs.length>1) {
// console.log("不止一个webview...");
// return;
iot.navigator.back();
// console.log("有父webview...");
// return;
// parent.evalJS('iot.navigator.back()');
// parent.evalJS('mui&&mui.back();');
} else {
console.log("只有一个webView");
// return;
wobj.canBack(function(e) {
console.log("是否可以返回canback...");
console.log(window.history);
window.history.back();
console.log(e);
//by chb 暂时注释,在碰到类似popover之类的锚点的时候,需多次点击才能返回;
if (e.canBack) { //webview history back
console.log("e.canback....");
// return;
window.history.back();
// iot.navigator.back();
} else { //webview close or hide
console.log("不能back。。。");
if (!__back__first) {
__back__first = new Date().getTime();
console.log("给back_first设值....");
plus.nativeUI.toast( "再按一次退出应用");
// mui.toast('再按一次退出应用');
setTimeout(function() {
__back__first = null;
}, 2000);
} else {
console.log("back_first不为空....");
if (new Date().getTime() - __back__first < 2000) {
console.log("两次的间隔时间少于2秒");
plus.runtime.quit();
}else{
console.log("时间间隔大于2s");
}
}
return;
}
});
}
}
export {iot, uPublic, uComponents}
\ No newline at end of file
......@@ -19,6 +19,7 @@ function init() {
componentsConfig: initComponentsConfig()
},
mounted(){
openScanCode(this);
},
methods:{
//tap <
......@@ -49,3 +50,52 @@ function initComponentsConfig() {
function backTap(){
iot.navigator.back();
}
function openScanCode(self){
iot.utils.scanBarcode({
data: {
id: 'bcid',
styles: {
frameColor: '#00ffff',
scanbarColor: '#00ffff',
background: '#242b35'
}
},
success: (response) => {
let data = uPublic.checkResponseData(response.data);
if(data){
//扫描成功
let qrKey = data.result;
//绑定设备
iot.business.sds.scanqr({
data: {
qrKey: qrKey
},
success: (response) => {
let data = uPublic.checkResponseData(response.data);
if(data){
console.log(response);
uComponents.openAlert(self, Vue.t('addDevice.bindSuccess'), {
text: Vue.t('btn.confirm'), callback: function () {
iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
}
});
}else{}
},
error: (error) => {
//请求失败
uPublic.openRequestErrorAlert(self);
}
});
}else{}
},
error: (error) => {
console.log(error);
//请求失败
uPublic.openRequestErrorAlert(self);
}
});
}
......@@ -12,30 +12,43 @@ import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
function init() {
//通用 input、按钮、dialog、loading组件
uPublic.componentsInit(['u-text','u-button','u-commstatus-loading','u-dialog','u-loading']);
uPublic.componentsInit(['u-text','u-button','u-comm-loading','u-dialog','u-loading']);
const app = new Vue({
data:{
textWiFiName: null,
textPassword: null,
textErrorTip: null,
textLoading: 'loading...',
status: 0,
//配置组件
componentsConfig: initComponentsConfig()
componentsConfig: initComponentsConfig(),
status: 0
},
mounted(){
resolve(this);
},
methods:{
getTextLoading(){
return this.textLoading;
getTextWiFiName(){
return this.textWiFiName;
},
setTextLoading(text){
this.textLoading = text;
setTextWiFiName(text){
this.textWiFiName = text;
},
getTextPassword(){
return this.textPassword;
},
setTextPassword(pwd){
this.textPassword = pwd;
},
gettTextErrorTip(){
return this.textErrorTip;
},
setTextErrorTip(tip){
this.textErrorTip = tip;
},
getStatus(){
return this.status;
},
setStatus(value){
this.status = value;
setStatus(status){
this.status = status;
},
onPasswordChange(text){
passwordChange(this,text);
......@@ -49,8 +62,8 @@ function init() {
connectButtonTap(this);
},
//tap loading button
onCommstatusLoadingButtonTap(){
commstatusLoadingButtonTap(this);
onCommLoadingButtonTap(){
commLoadingButtonTap(this);
}
}
}).$mount('#app');
......@@ -84,15 +97,32 @@ function initComponentsConfig() {
class: 'custom-loading'
}
},
ucommstatusloading: {
ucommloading: {
initParam: {
class: 'custom-commstatus-loading',
buttonText: Vue.t('btn.confirm')
class: 'custom-comm-loading',
buttonText: Vue.t('btn.confirm'),
text: 'loading',
status: 0
}
}
}
}
function resolve(self){
iot.business.sds.getSSId({
success: (response) => {
console.log(response);
let data = JSON.parse(response);
self.textWiFiName = data.ssid;
console.log(self.textWiFiName);
},
error: (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
}
});
}
function passwordChange(self,text){
self.textPassword = text;
console.log('passwordChange: ' + self.textPassword);
......@@ -105,29 +135,94 @@ function backTap(){
//tap 连接
function connectButtonTap(self){
uComponents.showCommstatusloading(self);
setTimeout(function(){
self.setTextLoading(Vue.t('commstatusLoading.connectSuccess'));
setTimeout(function(){
//绑定成功
// uComponents.showCommstatusloading(self);
// setTimeout(function(){
// self.setTextLoading(Vue.t('commstatusLoading.connectSuccess'));
// setTimeout(function(){
// //绑定成功
// self.setStatus(1);
// self.setTextLoading(Vue.t('commstatusLoading.bindSuccess'));
// //绑定失败
// //self.setStatus(2);
// //self.setTextLoading(Vue.t('commstatusLoading.bindFailed'));
// //uComponents.changeCommstatusButtonText(self,Vue.t('btn.reBound'));
// },3000);
// },3000);
console.log(self.getTextWiFiName());
// self.setTextPassword('macro_scope00');
console.log(self.getTextPassword());
if(self.getTextPassword() == null || self.getTextPassword().trim() == ''){
self.setTextErrorTip(Vue.t('wifiAdd.passwordInputTip'));
}else{
iot.business.sds.findWifi({
data: {
model: 'THM_LIVING_ELECTRICALBLANKET_TH_1507',
ssid: self.getTextWiFiName(),
wifiPwd: self.getTextPassword(),
timeout: 20000
},
success: (response) => {
console.log("findWifi");
console.log(response);
if(response.data == 'onProvisioning'){
//wifi链接中
uComponents.showCommLoading(self);
}else if(response.data == 'provisioned success'){
//wifi连接成功,停止连接wifi
// iot.business.sds.stopFindWifi({
// success: (response) => {},
// error: (error) => {}
// });
}
},
error: (error) => {
console.log(error);
}
});
iot.business.sds.findDevices({
success: (response) => {
console.log("findDevices");
console.log(response);
if(response.data == "joined success"){
//连接成功
uComponents.changeCommLoadingStatusAndText(self, 1, '绑定成功');
self.setStatus(1);
self.setTextLoading(Vue.t('commstatusLoading.bindSuccess'));
//绑定失败
//self.setStatus(2);
//self.setTextLoading(Vue.t('commstatusLoading.bindFailed'));
//uComponents.changeCommstatusButtonText(self,Vue.t('btn.reBound'));
},3000);
},3000);
// //停止查找设备
iot.business.sds.stopFindDevices({
success: (response) => {},
error: (error) => {}
});
}else if(response.data == "fail"){
//连接失败
uComponents.changeCommLoadingStatusAndText(self, 2, '绑定失败');
self.setStatus(2);
uComponents.changeCommButtonText('请重新绑定');
//停止查找设备
iot.business.sds.stopFindDevices({
success: (response) => {},
error: (error) => {}
});
}
},
error: (error) => {
console.log(error);
}
});
}
}
//tap loading button
function commstatusLoadingButtonTap(self) {
function commLoadingButtonTap(self) {
if(self.getStatus() == 1){
//绑定成功
uComponents.hideCommstatusloading(self);
uComponents.hideCommLoading(self);
iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
}else if(self.getStatus() == 2){
//绑定失败
//uComponents.hideCommstatusloading(self);
uComponents.hideCommLoading(self);
}
}
\ No newline at end of file
......@@ -67,4 +67,14 @@ function wifiAddButtonTap(){
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
......@@ -6,7 +6,9 @@
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 报警信息页面
*/
const PAGE_SIZE = 10;
import moment from 'moment';
import config from '../../public/config.js';
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
......@@ -16,11 +18,36 @@ function init() {
const app = new Vue({
data:{
//配置组件
componentsConfig: initComponentsConfig()
componentsConfig: initComponentsConfig(),
list:[],
startId: 0,
deviceId: null,
},
mounted(){
resolve(this);
},
methods:{
getList(){
return this.list;
},
setList(list){
this.list = list;
},
getStartId(){
return this.startId;
},
setStartId(id){
this.startId = id;
},
getDeviceId(){
return this.deviceId;
},
setDeviceId(id){
this.deviceId = id;
},
onListLoadTap(){
listLoadTap(this);
},
//tap <
onBackTap(){
backTap();
......@@ -35,12 +62,13 @@ function initComponentsConfig() {
alarmInfoList:{
initParam: {
class: 'custom-list',
list: [
{value: 1, leftImage: '../../resources/image/green_alarmInfo0_icon.png', title:'', subtitle:'禁试报警', rightText: '2017.06.2315:56:26'},
{value: 2, leftImage: '../../resources/image/green_alarmInfo1_icon.png', title:'', subtitle:'防撬报警', rightText: '2017.06.2315:01:01'},
{value: 3, leftImage: '../../resources/image/green_alarmInfo2_icon.png', title:'', subtitle:'欠电报警', rightText: '2017.05.2315:56:26'},
{value: 4, leftImage: '../../resources/image/green_alarmInfo3_icon.png', title:'', subtitle:'假锁报警', rightText: '2017.03.2315:01:01'}
],
// list: [
// {value: 1, leftImage: '../../resources/image/green_alarmInfo0_icon.png', title:'', subtitle:'禁试报警', rightText: '2017.06.2315:56:26'},
// {value: 2, leftImage: '../../resources/image/green_alarmInfo1_icon.png', title:'', subtitle:'防撬报警', rightText: '2017.06.2315:01:01'},
// {value: 3, leftImage: '../../resources/image/green_alarmInfo2_icon.png', title:'', subtitle:'欠电报警', rightText: '2017.05.2315:56:26'},
// {value: 4, leftImage: '../../resources/image/green_alarmInfo3_icon.png', title:'', subtitle:'假锁报警', rightText: '2017.03.2315:01:01'}
// ],
list: [],
tip: Vue.t('alarmInfo.noInfoTip')
}
},
......@@ -57,7 +85,57 @@ function initComponentsConfig() {
}
}
function resolve(self) {
self.setDeviceId(iot.navigator.getExtras().deviceId);
uComponents.showLoading(self);
iot.business.api.sendCustom('lock/getHistoryRecord',
{
data: {
device_id: self.getDeviceId(),
action: 2,
start_id: self.getStartId(),
page_size: PAGE_SIZE
},
success: (response) => {
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
let list = [];
let record = data.record;
for(let i=0; i<record.length; i++){
list[i] = {
value: record[i].openId,
leftImage: '../../resources/image/green_alarmInfo'+record[i].mode+'_icon.png',
subtitle: Vue.t('alarmInfo.'+config.alarmMode[record[i].mode]+''),
rightText: moment(record[i].time).format("YYYY.MM.DD HH:mm:ss")
};
}
self.setList(self.getList().concat(list));
if(record.length > 0){
self.setStartId(record[record.length-1].id);
}
//更新列表数据
uComponents.changeList(self, self.getList());
}else{
}
uComponents.hideLoading(self);
},
error: (err) => {
uPublic.openRequestErrorAlert(self);
console.log(err);
},
complete: () => {
uComponents.hideLoading(self);
}
});
}
//tap <
function backTap(){
iot.navigator.back();
}
//tap 点击加载更多
function listLoadTap(self) {
resolve(self);
}
\ No newline at end of file
......@@ -6,9 +6,12 @@
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 劫持记录页面
*/
import moment from 'moment';
const PAGE_SIZE = 10;
import config from '../../public/config.js';
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
function init() {
//通用 list、dialog、loading组件
......@@ -16,11 +19,43 @@ function init() {
const app = new Vue({
data:{
//配置组件
componentsConfig: initComponentsConfig()
componentsConfig: initComponentsConfig(),
list: [],
startId: 0,
deviceId: null,
userInfo: []
},
mounted(){
resolve(this);
},
methods:{
getList(){
return this.list;
},
setList(list){
this.list = list;
},
getStartId(){
return this.startId;
},
setStartId(id){
this.startId = id;
},
getDeviceId(){
return this.deviceId;
},
setDeviceId(id){
this.deviceId = id;
},
getUserInfo(){
return this.userInfo;
},
setUserInfo(info){
this.userInfo = info;
},
onListLoadTap(){
listLoadTap(this);
},
//tap <
onBackTap(){
backTap();
......@@ -35,10 +70,11 @@ function initComponentsConfig() {
hijackRecordList:{
initParam: {
class: 'custom-list',
list: [
{value: 1, leftImage: '../../resources/image/green_opendoor2_icon.png', title:'测试用户02', subtitle: '劫持指纹开门', rightText: '2017.07.1306:10:10'},
{value: 2, leftImage: '../../resources/image/green_opendoor2_icon.png', title:'ID:117', subtitle: '劫持指纹开门', rightText: '2017.07.0322:57:44'}
],
// list: [
// {value: 1, leftImage: '../../resources/image/green_opendoor2_icon.png', title:'测试用户02', subtitle: '劫持指纹开门', rightText: '2017.07.1306:10:10'},
// {value: 2, leftImage: '../../resources/image/green_opendoor2_icon.png', title:'ID:117', subtitle: '劫持指纹开门', rightText: '2017.07.0322:57:44'}
// ],
list: [],
tip: Vue.t('hijackRecord.noRecordTip')
}
},
......@@ -55,7 +91,70 @@ function initComponentsConfig() {
}
}
function resolve(self) {
self.setDeviceId(iot.navigator.getExtras().deviceId);
uComponents.showLoading(self);
iot.business.api.sendCustom('lock/getHistoryRecord',
{
data: {
device_id: self.getDeviceId(),
action: 3,
start_id: self.getStartId(),
page_size: PAGE_SIZE
},
success: (response) => {
let data = uPublic.checkResponseData(response.data);
if(data){
console.log(data);
let list = [];
let record = data.record;
if(data.hasOwnProperty('info')){
self.setUserInfo(data.info);
}
for(let i=0; i<record.length; i++){
list[i] = {
value: record[i].openId,
leftImage: '../../resources/image/green_opendoor5_icon.png',
subtitle: Vue.t('hijackRecord.'+config.openDoorMode[record[i].mode]+''),
// title: ('ID:'+record[i].id),
rightText: moment(record[i].time).format("YYYY.MM.DD HH:mm:ss")
};
for(let j=0; j<self.getUserInfo().length; j++){
if(record[i].openId == self.getUserInfo()[j].openId && record[i].mode == self.getUserInfo()[j].mode){
if(self.getUserInfo()[j].nickname != null && self.getUserInfo()[j].id != null){
list[i].title = self.getUserInfo()[j].nickname + " ID:"+self.getUserInfo()[j].id;
}else if(self.getUserInfo()[j].nickname != null){
list[i].title = "ID:"+self.getUserInfo()[j].id;
}
}
}
}
self.setList(self.getList().concat(list));
if(record.length > 0){
self.setStartId(record[record.length-1].id);
}
//更新列表数据
uComponents.changeList(self, self.getList());
}else{
}
uComponents.hideLoading(self);
},
error: (err) => {
uPublic.openRequestErrorAlert(self);
console.log(err);
},
complete: () => {
uComponents.hideLoading(self);
}
});
}
//tap <
function backTap(){
iot.navigator.back();
}
//tap 点击加载更多
function listLoadTap(self) {
resolve(self);
}
\ No newline at end of file
......@@ -6,7 +6,8 @@
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 主控页面
*/
import moment from 'moment';
import config from '../../public/config.js';
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
......@@ -30,9 +31,96 @@ function init() {
activeFlag: true,
followShowFlag: false,
//配置组件
componentsConfig: initComponentsConfig()
componentsConfig: initComponentsConfig(),
//电量
batteryState: null,
//电量百分比
batteryPercent: 0,
//响铃时间
ringingTime: null,
//门铃是否响起
doorbellRingingFlag: true,
//远程开门是否开启
remoteOpendoorFlag: true,
//设备ID
deviceId: null,
//设备uuid
uuid: null
},
mounted(){
let self = this;
iot.navigator.closeAllBesidesItself();
//获取设备信息
iot.business.sds.getDevicesByUser({
success: (response) => {
let data = uPublic.checkResponseData(response.data);
if(data){
self.uuid = data[0].uuid;
self.deviceId = data[0].sn;
iot.business.sds.getDeviceStatus({
data: {
uuid: self.uuid
},
success: (response) => {
console.log(response);
},
error: (error) => {
console.log(error);
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{
}
},
error: (error) => {}
});
//注册监听上报
iot.business.sds.registerPushListener({
success: (response) => {
console.log(response);
if(response.hasOwnProperty('params')){
console.log(JSON.parse(response));
setDevceInfo(self, response.params);
}
},
error: (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
}
});
let power = 5;
this.batteryPercent = power/5*100;
this.batteryState = config.powerIcon[power];
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(){
......@@ -65,17 +153,57 @@ function init() {
setFollowShowFlag(boolean){
this.followShowFlag = boolean;
},
getBatteryState(){
return this.batteryState();
},
setBatteryState(number){
this.batteryState = number
},
getBatteryPercent(){
return this.batteryPercent;
},
setBatteryPercent(percent){
this.batteryPercent = percent;
},
getRingingTime(){
return this.ringingTime;
},
setRingingTime(time){
this.ringingTime = time
},
getDoorbellRingingFlag(){
return this.doorbellRingingFlag;
},
setDoorbellRingingFlag(boolean){
this.doorbellRingingFlag = boolean;
},
getRemoteOpendoorFlag(){
return this.remoteOpendoorFlag;
},
setRemoteOpendoorFlag(flag){
this.remoteOpendoorFlag = flag;
},
getUuid(){
return this.uuid;
},
setUuid(){
this.uuid = id;
},
//tap 个人信息
onMyInfoTap(){
myInfoTap(this);
},
//tap 门锁管理
onDoorlockManageTap(){
doorlockManageTap();
},
//tap 开门记录
onOpendoorRecordTap(){
opendoorRecordTap();
opendoorRecordTap(this);
},
//tap 安全报警
onSecurityAlarmTap(){
securityAlarmTap();
securityAlarmTap(this);
},
//tap 门锁用户
onDoorlockUserTap(){
......@@ -83,11 +211,11 @@ function init() {
},
//tap 远程开门
onRemoteOpendoorTap(){
remoteOpendoorTap();
remoteOpendoorTap(this);
},
//tap 劫持报警
onHijackAlarmTap(){
hijackAlarmTap();
hijackAlarmTap(this);
},
//tap 保存二维码到相册
onSaveQRcodeButtonTap(){
......@@ -188,6 +316,49 @@ 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('',{
data: {
uuid: 'uuid',
start_id: 0,
page_size: 0
},
success: (response) => {
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
uComponents.changeMarqueeText(self, data.message);
}
},
error: (error) => {
uPublic.openRequestErrorAlert(self);
console.log(error);
},
complete: () => {}
});
}
//tap 个人信息
function myInfoTap(self){
iot.navigator.openWindow({
url: '../myInfo/',
id: 'myInfo',
extras: {
nickname: self.nickname
}
});
}
//tap 门锁管理
function doorlockManageTap(){
iot.navigator.openWindow({
......@@ -197,39 +368,54 @@ function doorlockManageTap(){
}
//tap 开门记录
function opendoorRecordTap(){
function opendoorRecordTap(self){
iot.navigator.openWindow({
url: './opendoorRecord.html',
id: 'opendoorRecord'
id: 'opendoorRecord',
extras: {
deviceId: self.deviceId
}
});
}
//tap 安全报警
function securityAlarmTap(){
function securityAlarmTap(self){
iot.navigator.openWindow({
url: './alarmInfo.html',
id: 'alarmInfo'
id: 'alarmInfo',
extras: {
deviceId: self.deviceId
}
});
}
//tap 门锁用户
function doorlockUserTap(){
iot.navigator.openWindow({
url: '../doorlockUsers/',
id: 'doorlockUsers',
});
}
//tap 远程开门
function remoteOpendoorTap(){
function remoteOpendoorTap(self){
iot.navigator.openWindow({
url: './remoteOpendoor.html',
id: 'remoteOpendoor'
id: 'remoteOpendoor',
extras: {
uuid: self.getUuid()
}
});
}
//tap 劫持报警
function hijackAlarmTap(){
function hijackAlarmTap(self){
iot.navigator.openWindow({
url: './hijackRecord.html',
id: 'hijackRecord'
id: 'hijackRecord',
extras: {
deviceId: self.deviceId
}
});
}
......
......@@ -6,7 +6,9 @@
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 开门记录页面
*/
import moment from 'moment';
const PAGE_SIZE = 10;
import config from '../../public/config.js';
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
......@@ -16,11 +18,43 @@ function init() {
const app = new Vue({
data:{
//配置组件
componentsConfig: initComponentsConfig()
componentsConfig: initComponentsConfig(),
list: [],
startId: 0,
deviceId: null,
userInfo: []
},
mounted(){
resolve(this);
},
methods:{
getList(){
return this.list;
},
setList(list){
this.list = list;
},
getStartId(){
return this.startId;
},
setStartId(id){
this.startId = id;
},
getDeviceId(){
return this.deviceId;
},
getUserInfo(){
return this.userInfo;
},
setUserInfo(info){
this.userInfo = info;
},
setDeviceId(id){
this.deviceId = id;
},
onListLoadTap(){
listLoadTap(this);
},
//tap <
onBackTap(){
backTap();
......@@ -35,16 +69,7 @@ function initComponentsConfig() {
opendoorRecordList:{
initParam: {
class: 'custom-list',
list: [
{value: 1, leftImage: '../../resources/image/green_opendoor0_icon.png', title:'', subtitle: '手机远程开门', rightText: '2017.08.0310:29:53'},
{value: 2, leftImage: '../../resources/image/green_opendoor0_icon.png', title:'', subtitle: '手机远程开门', rightText: '2017.08.0310:27:56'},
{value: 3, leftImage: '../../resources/image/green_opendoor1_icon.png', title:'ID:6', subtitle: '指纹开门', rightText: '2017.08.0310:25:47'},
{value: 4, leftImage: '../../resources/image/green_opendoor0_icon.png', title:'', subtitle: '手机远程开门', rightText: '2017.07.3117:13:03',},
{value: 5, leftImage: '../../resources/image/green_opendoor2_icon.png', title:'测试用户02', subtitle: '劫持指纹开门', rightText: '2017.07.3117:10:10'},
{value: 6, leftImage: '../../resources/image/green_opendoor3_icon.png', title:'测试用户', subtitle: '密码开门', rightText: '2017.07.3117:09:59'},
{value: 7, leftImage: '../../resources/image/green_opendoor2_icon.png', title:'ID:117', subtitle: '劫持指纹开门', rightText: '2017.07.3117:05:19'},
{value: 8, leftImage: '../../resources/image/green_opendoor3_icon.png', title:'测试用户', subtitle: '密码开门', rightText: '2017.07.3117:03:50',}
],
list: [],
tip: Vue.t('opendoorRecord.noRecordTip')
}
},
......@@ -61,7 +86,71 @@ function initComponentsConfig() {
}
}
//调用接口获取开门记录
function resolve(self) {
uComponents.showLoading(self);
self.setDeviceId(iot.navigator.getExtras().deviceId);
iot.business.api.sendCustom('lock/getHistoryRecord',
{
data: {
device_id: self.getDeviceId(),
action: 0,
start_id: self.getStartId(),
page_size: PAGE_SIZE
},
success: (response) => {
let data = uPublic.checkResponseData(response.data);
if(data){
console.log(data);
let list = [];
let record = data.record;
if(data.hasOwnProperty('info')){
self.setUserInfo(data.info);
}
for(let i=0; i<record.length; i++){
list[i] = {
value: record[i].openId,
leftImage: '../../resources/image/green_opendoor'+record[i].mode+'_icon.png',
subtitle: Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+''),
rightText: moment(record[i].time).format("YYYY.MM.DD HH:mm:ss")
};
for(let j=0; j<self.getUserInfo().length; j++){
if(record[i].openId == self.getUserInfo()[j].openId && record[i].mode == self.getUserInfo()[j].mode){
if(self.getUserInfo()[j].nickname != null && self.getUserInfo()[j].id != null){
list[i].title = self.getUserInfo()[j].nickname + " ID:"+self.getUserInfo()[j].id;
}else if(self.getUserInfo()[j].nickname != null){
list[i].title = "ID:"+self.getUserInfo()[j].id;
}
}
}
}
self.setList(self.getList().concat(list));
if(record.length > 0){
self.setStartId(record[record.length-1].id);
}
//更新列表数据
uComponents.changeList(self, self.getList());
console.log("in");
}else{
}
uComponents.hideLoading(self);
},
error: (err) => {
uPublic.openRequestErrorAlert(self);
console.log(err);
},
complete: () => {
uComponents.hideLoading(self);
}
});
}
//tap <
function backTap(){
iot.navigator.back();
}
//tap 点击加载更多
function listLoadTap(self) {
resolve(self);
}
\ No newline at end of file
......@@ -20,11 +20,23 @@ function init() {
textLoading: 'loading...',
status: 0,
//配置组件
componentsConfig: initComponentsConfig()
componentsConfig: initComponentsConfig(),
//设备uuid
uuid: null
},
mounted(){
resolve(this);
},
methods:{
getTextPassword(){
return this.textPassword;
},
setTextPassword(pwd){
this.textPassword = pwd;
},
setTextErrorTip(tip){
this.textErrorTip = tip;
},
getTextLoading(){
return this.textLoading;
},
......@@ -43,6 +55,12 @@ function init() {
onPasswordChange(text){
passwordChange(this,text);
},
getUuid(){
return this.uuid;
},
setUuid(id){
this.uuid = id;
},
//tap <
onBackTap(){
backTap();
......@@ -50,10 +68,6 @@ function init() {
//tap 确定
onConfirmButtonTap(){
confirmButtonTap(this);
},
//tap loading button
onCommstatusLoadingButtonTap(){
commstatusLoadingButtonTap(this);
}
}
}).$mount('#app');
......@@ -95,8 +109,15 @@ function initComponentsConfig() {
}
}
function resolve(self){
let extras = iot.navigator.getExtras();
self.setUuid(extras.uuid);
console.log(self.getUuid());
}
function passwordChange(self,text){
self.textPassword = text;
self.setTextPassword(text);
self.setTextErrorTip('');
console.log('passwordChange: ' + self.textPassword);
}
......@@ -107,26 +128,39 @@ function backTap(){
//tap 确定
function confirmButtonTap(self){
uComponents.showCommstatusloading(self);
setTimeout(function(){
self.setTextLoading(Vue.t('commstatusLoading.connectSuccess'));
setTimeout(function(){
//绑定成功
self.setStatus(1);
self.setTextLoading(Vue.t('commstatusLoading.bindSuccess'));
//绑定失败
//self.setStatus(2);
//self.setTextLoading(Vue.t('commstatusLoading.bindFailed'));
//uComponents.changeCommstatusButtonText(self,Vue.t('btn.reBound'));
},3000);
},3000);
}
//tap loading button
function commstatusLoadingButtonTap(self) {
//绑定成功
uComponents.hideCommstatusloading(self);
console.log(self.getTextPassword());
if(self.getTextPassword() == null || self.getTextPassword().trim() == ''){
self.setTextErrorTip(Vue.t('remoteOpendoor.error.noPasswordTip'));
}else{
uComponents.showLoading(self);
iot.business.sds.setDeviceStatus({
data: {
uuid: self.getUuid(),
setParams: {
'POW': {
'value': '20'
}
}
},
success: (response) => {
console.log(response);
uComponents.openAlert(self, Vue.t('remoteOpendoor.openDoorSuccess'), {
text: Vue.t('dialog.confirm'), callback: function () {
//返回首页
iot.navigator.back();
//绑定失败
//uComponents.hideCommstatusloading(self);
}
});
},
error: (error) => {
console.log(error);
uComponents.openAlert(self, Vue.t('remoteOpendoor.openDoorFailure'), {
text: Vue.t('dialog.confirm'), callback: function () {
}
});
},
complete(){
uComponents.hideLoading(self);
}
});
}
}
......@@ -15,14 +15,26 @@ function init() {
uPublic.componentsInit(['u-text','u-button','u-dialog','u-loading']);
const app = new Vue({
data:{
textName: '门锁-001',
textName: iot.navigator.getExtras().nickName,
textErrorTip: null,
//配置组件
componentsConfig: initComponentsConfig()
componentsConfig: initComponentsConfig(),
extras: {}
},
mounted(){
this.extras = iot.navigator.getExtras();
this.textName = self.extras.nickname;
},
methods:{
getTextName(){
return this.textName;
},
setTextName(text){
this.textName = text;
},
setTextErrorTip(text){
this.textErrorTip = text;
},
onNameChange(text){
nameChange(this,text);
},
......@@ -32,7 +44,7 @@ function init() {
},
//tap 保存
onSaveButtonTap(){
saveButtonTap();
saveButtonTap(this);
}
}
}).$mount('#app');
......@@ -67,8 +79,13 @@ function initComponentsConfig() {
}
}
function alert(){
alert('aaa');
}
function nameChange(self,text){
self.textName = text;
self.setTextName(text);
self.setTextErrorTip('');
console.log('nameChange: ' + self.textName);
}
......@@ -78,6 +95,46 @@ function backTap(){
}
//tap 保存
function saveButtonTap(){
function saveButtonTap(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
},
success: (response) => {
console.log("inn");
uComponents.hideLoading(self);
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'
});
console.log('returnPage');
iot.navigator.back();
}
});
},
error: (error) => {
uComponents.hideLoading(self);
uComponents.openAlert(self, Vue.t('editName.editNameFailue'), {
text: Vue.t('btn.confirm'), callback: function () {
let opener = plus.webview.currentWebview().opener();
iot.navigator.back();
}
});
},
complete: () => {
uComponents.hideLoading(self);
}
});
}
}
\ No newline at end of file
......@@ -8,6 +8,7 @@
*/
import {iot, uPublic, uComponents} from '../../public/public.js';
import {projectMethods} from '../../public/components.js';
iot.ready(init);
function init() {
......@@ -18,11 +19,33 @@ function init() {
const app = new Vue({
data:{
//配置组件
componentsConfig: initComponentsConfig()
componentsConfig: initComponentsConfig(),
//设备列表
deviceList: [],
showDeviceList: []
},
mounted(){
let self = this;
window.addEventListener('returnPage',function(event){
self.showDeviceList = [];
getDeviceList(self);
});
//获取设备列表
getDeviceList(self);
},
methods:{
getDeviceList(){
return this.deviceList;
},
setDeviceList(list){
this.deviceList = list;
},
getShowDeviceList(){
return this.showDeviceList;
},
setShowDeviceList(list){
this.showDeviceList = list;
},
//tap <
onBackTap(){
backTap();
......@@ -47,17 +70,14 @@ function init() {
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
doorlockList: {
initParam: {
class: '',
list: [{value: 1,'leftImage': '../../resources/image/device.png','title': '门锁-001','buttons': [{'icon': '&#xe728;'},{'icon': '&#xe61b;'},{'icon': '&#xe63e;'},{'icon': '&#xe742;'}]},
{value: 2,'leftImage': '../../resources/image/device.png','title': '门锁-002','buttons': [{'icon': '&#xe728;'},{'icon': '&#xe61b;'},{'icon': '&#xe63e;'},{'icon': '&#xe742;'}]},
{value: 3,'leftImage': '../../resources/image/device.png','title': '门锁-003','buttons': [{'icon': '&#xe728;'},{'icon': '&#xe61b;'},{'icon': '&#xe63e;'},{'icon': '&#xe742;'}]},
{value: 4,'leftImage': '../../resources/image/device.png','title': '门锁-004','buttons': [{'icon': '&#xe728;'},{'icon': '&#xe61b;'},{'icon': '&#xe63e;'},{'icon': '&#xe742;'}]},
{value: 5,'leftImage': '../../resources/image/device.png','title': '门锁-005','buttons': [{'icon': '&#xe728;'},{'icon': '&#xe61b;'},{'icon': '&#xe63e;'},{'icon': '&#xe742;'}]}],
list: [],
tip: Vue.t('doorlockManage.noDeviceTip')
}
},
......@@ -81,6 +101,49 @@ function initComponentsConfig() {
}
}
//获取所有的设备
function getDeviceList(self){
//显示loading
uComponents.showLoading(self);
iot.business.device.getList({
data: {
sds: true,
// product_id: 'product_id',
// parent_id: 0,
// start_id: 0,
// number: 10
},
success: (response) => {
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
self.setDeviceList(data);
for(let i=0; i<data.length; i++){
self.getShowDeviceList().push({
value: data[i].uuid,
leftImage: '../../resources/image/device.png',
title: (data[i].nickName && data[i].nickName != 'null') ? data[i].nickName : Vue.t('doorlockManage.defaultNickname'),
buttons: [{'icon': '&#xe728;'},{'icon': '&#xe61b;'},{'icon': '&#xe63e;'},{'icon': '&#xe742;'}]
});
}
//更新设备列表
projectMethods.changeGridList(self, self.getShowDeviceList());
uComponents.hideLoading(self);
}else{
uComponents.hideLoading(self);
}
},
error: (error) => {
console.log(error);
//请求失败
uPublic.openRequestErrorAlert(self);
},
complete: () => {
uComponents.hideLoading(self);
}
});
}
//tap <
function backTap(){
iot.navigator.back();
......@@ -108,14 +171,22 @@ function doorlockListButtonTap(self, value, buttonValue) {
if(buttonValue == '0'){
iot.navigator.openWindow({
url: './editName.html',
id: 'editName'
id: 'editName',
extras: {
uuid: self.getDeviceList()[value].uuid,
model: self.getDeviceList()[value].model,
nickName: self.getDeviceList()[value].nickName
}
});
}
//tap 生成绑定二维码
else if(buttonValue == '1'){
iot.navigator.openWindow({
url: './qrcode.html',
id: 'qrcode'
id: 'qrcode',
extras: {
uuid: self.getDeviceList()[value].uuid
}
});
}
//tap ID-姓名绑定
......@@ -128,8 +199,12 @@ function doorlockListButtonTap(self, value, buttonValue) {
//tap 删除门锁
else if(buttonValue == '3'){
uComponents.openConfirm(self, Vue.t('doorlockManage.deleteDialogTip', ['门锁-001']),
{text: Vue.t('dialog.cancel'), callback: function () {}},
{text: Vue.t('dialog.confirm'), callback: function () {}}
{text: Vue.t('dialog.cancel'), callback: function () {
}},
{text: Vue.t('dialog.confirm'), callback: function () {
deleteDoorlook(self, value);
}}
);
}
}
......@@ -139,10 +214,72 @@ function logoutButtonTap(self){
uComponents.openConfirm(self, Vue.t('doorlockManage.logoutDialogTip'),
{text: Vue.t('dialog.cancel'), callback: function () {}},
{text: Vue.t('dialog.confirm'), callback: function () {
iot.business.user.logout({
data: {
sds: true
},
success: (response) => {
iot.navigator.openWindow({
url: '../login/login.html',
url: '../login/',
id: 'login'
});
let wvs = plus.webview.all();
for (var i = 0; i < wvs.length-1; i++) {
plus.webview.close(wvs[i]);
}
},
error: (error) => {},
complete: () => {
console.log("complete");
}
});
}}
);
}
//17621209360
//yyl111
function deleteDoorlook(self, index){
// 显示loading
let uuId = self.getDeviceList()[index].id;
uComponents.showLoading(self);
iot.business.sds.unbindDevice({
data: {
sds: true,
uuid: self.getDeviceList()[index].uuid
},
success: function (response){
console.log(response);
if(response.data == 'success'){
//删除成功
self.getDeviceList().splice(index, 1);
self.getShowDeviceList().splice(index, 1);
projectMethods.changeGridList(self, self.getDeviceList());
uComponents.openAlert(self, Vue.t('doorlockManage.deleteSuccess'), {
text: Vue.t('btn.confirm'), callback: function () {
console.log("删除成功");
projectMethods.changeGridList(self, self.getShowDeviceList());
uComponents.hideLoading(self);
}
});
}else{
//删除失败
uComponents.openAlert(self, Vue.t('doorlockManage.deleteFailue'), {
text: Vue.t('btn.confirm'), callback: function () {
console.log("删除失败");
uComponents.hideLoading(self);
}
});
}
},
error: function (err){
console.log(err);
//请求失败
uPublic.openRequestErrorAlert(self);
},
complete: function (){
console.log("complete");
uComponents.hideLoading(self);
}
});
}
......@@ -7,8 +7,9 @@
* 生成绑定二维码页面
*/
var QRCode = require('qrcode');
console.log(QRCode);
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
function init() {
//通用 按钮、dialog、loading组件
......@@ -16,18 +17,34 @@ function init() {
const app = new Vue({
data:{
//配置组件
componentsConfig: initComponentsConfig()
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();
qrcodeButtonTap(this);
}
}
}).$mount('#app');
......@@ -62,6 +79,40 @@ function backTap(){
}
//tap 生成二维码
function qrcodeButtonTap(){
alert("生成二维码");
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
/**
* v_index.js
* Version: 0.1
* User: zjx
* Date: 2017-09-29
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 门锁用户
*/
import config from '../../public/config.js';
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
function init() {
//通用 图片轮播、跑马灯、开关、按钮、dialog、loading组件
uPublic.componentsInit(['u-swipe-list','u-dialog','u-loading']);
const app = new Vue({
data:{
//用户列表
userList: [],
userListIndex: null,
loadShowFlag: false,
loadFlag: false,
loadText: 'loading',
pagesize: 10,
tip: '无数据'
},
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"}]
},
methods:{
onBackTap(){
backTap();
},
onUserTap(){
addUser();
},
setLoadShowFlag(number){
this.loadShowFlag = (number >= this.pagesize);
},
onSwipeLeftRow(index){
swipeLeftRow(this, index);
},
onSwipeRightRow(){
swipeRightRow(this);
},
onTapLoad(){
tapLoad();
},
onTapUserList(index){
onTapUserList(this, index);
},
onTapButton(buttonIndex){
tapButton(buttonIndex);
},
changeUserList(list){
changeUserList(this, list);
}
}
}).$mount('#app');
}
//返回上一页
function backTap(){
iot.navigator.back();
}
//添加用户
function addUser(){
// iot.navigator.openWindow({
// url: '../doorlockUsers/addUser',
// id: 'addUser',
// });
}
// 向左滑动用户列表,修改用户列表下标
function swipeLeftRow(self, index) {
self.userListIndex = index;
}
// 向右滑动用户列表,修改用户列表下标
function swipeRightRow(self) {
self.userListIndex = null;
}
// 点击组件列表 通知事件和当前点击列表下标
function onTapUserList(self, listIndex) {
if (self.userListIndex != null) {
self.userListIndex = null;
}
}
//点击加载更多
function tapLoad(){
if (!self.loadFlag) {
self.loadText = 'loading';
self.loadFlag = true;
//再次发送获取用户列表请求
}
}
//点击按钮
function tapButton(buttonIndex){
console.log(buttonIndex);
}
// 修改userList列表
function changeUserList(self, list) {
self.setLoadShowFlag(list.length - self.swipeList.length);
self.userList = list;
self.$nextTick(function () {
self.loadText = '点击加载更多';
self.loadFlag = false;
});
}
\ No newline at end of file
......@@ -11,19 +11,25 @@ import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
function init() {
//通用 按钮、dialog、loading组件
uPublic.componentsInit(['u-button','u-dialog','u-loading']);
//通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading','u-button']);
const app = new Vue({
data:{
//配置组件
componentsConfig: initComponentsConfig()
},
mounted(){
// setTimeout(function(){
// iot.navigator.openWindow({
// url: './login.html',
// id: 'login'
// });
// },2000)
let self = this;
},
methods:{
//tap 账号/密码登录
onLoginButtonTap(){
loginButtonTap();
loginButtonTap(this);
}
}
}).$mount('#app');
......@@ -52,9 +58,123 @@ function initComponentsConfig() {
}
}
function loginButtonTap(){
function loginButtonTap(self){
uComponents.showLoading(self);
iot.business.sds.init({
data: {
oa: true
},
success: (response) => {
console.log(response);
iot.business.user.login({
data: {
sds: true
},
success: (response) => {
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
cloudsLogin(self, data.UserID);
}else{
}
},
error: (error) => {
console.log(error);
//请求失败
uPublic.openRequestErrorAlert(self);
},
complete: () => {}
});
},
error: (error) => {
console.log(error);
//请求失败
uPublic.openRequestErrorAlert(self);
}
});
}
//云端登陆
function cloudsLogin(self, id){
iot.business.user.autoLogin({
success: (response) => {
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
uComponents.hideLoading(self);
iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
}else{
}
},
error: (error) => {
console.log(error);
iot.business.user.login({
data: {
username: id,
pwd: id,
},
success: (response) => {
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
uComponents.hideLoading(self);
iot.navigator.openWindow({
url: './login.html',
id: 'login'
url: '../device/',
id: 'device'
});
}else{
}
},
error: (error) => {
console.log(error);
//不存在此用户
// if(code == 10002){
//用户注册
iot.business.user.reg({
data: {
username: id,
pwd: id,
vcode: id
},
success: (response) => {
console.log(response);
//注册成功
let data = uPublic.checkResponseData(response.data);
if(data){
uComponents.hideLoading(self);
iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
}else{
}
},
error: (error) => {
console.log(error);
//注册失败
uComponents.openAlert(self, 'login.failure', {
text: Vue.t('dialog.confirm'), callback: function () {
plus.webview.currentWebview().reload();
}
});
},
complete: () => {}
});
// }
//请求失败
uPublic.openRequestErrorAlert(self);
},
complete: () => {}
});
},
complete: () => {}
});
//
}
......@@ -22,6 +22,55 @@ function init() {
componentsConfig: initComponentsConfig()
},
mounted(){
iot.business.sds.init({
data: {
oa: true
},
success: (response) => {
console.log(response);
iot.business.user.login({
data: {
sds: true
},
success: (response) => {
console.log(response);
let data = uPublic.checkResponseData(response.data);
if(data){
iot.business.user.login({
data: {
username: data.UserId,
pwd: data.UserId,
},
success: (response) => {
let data = uPublic.checkResponseData(response.data);
if(data){
iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
}else{
}
},
error: (error) => {
},
complete: () => {}
});
}else{
}
},
error: (error) => {
console.log(error);
},
complete: () => {}
});
},
error: (error) => {
console.log(error);
}
});
},
methods:{
onTelChange(number){
......@@ -106,10 +155,11 @@ function loginButtonTap(){
//tap 快速注册
function registerTap(){
iot.navigator.openWindow({
url: './register.html',
id: 'register'
});
// iot.navigator.openWindow({
// url: './register.html',
// id: 'register'
// });
}
//tap 忘记密码
......
/**
* 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: () => {}
});
}
This source diff could not be displayed because it is too large. You can view the blob instead.
@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();
}
}
@import "../public/public.less";
@import "../public/header.less";
.u-text();
.custom-editNickname-text,.custom-editPassword-text{
input{
font-size: @CUSTOM-EDITNAMETEXT-COMPONENT-INPUT-FONTSIZE;
padding-left: 46px;
&::-webkit-input-placeholder{
color: @CUSTOM-TEXT-COMPONENT-INPUT-PLACEHOLDER-COLOR;
}
}
//x icon
.u-text-clear{
right: 41px;
&:before{
content: '\e601';
font-family: iconfont;
color: @CUSTOM-TEXT-COMPONENT-DEFAULTICON-COLOR;
font-size: @CUSTOM-EDITNAMETEXT-COMPONENT-DEFAULTICON-FONTSIZE;
}
}
&:after{
.white_gradient_border();
}
}
.editMyInfo{
position: absolute;
top: 44px;
bottom: 0;
left: 0;
height: auto;
width: 100%;
li{
width: 100%;
height: 55px;
position: relative;
line-height: 55px;
padding: 0 43px;
&:after{
//
.defaultBorder();
.white_gradient_border();
}
span{
//去掉span
// &:first-child{
// font-size: 16px;
// 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{
font-size: 12px;
float: right;
}
}
}
.editPassword{
span{
&:nth-child(2){
font-family: iconfont;
font-size: @TEXT-COMPONENT-ICON-FONTSIZE;
-webkit-font-smoothing: antialiased;
}
}
}
}
.errorTip{
.errorTip();
}
\ No newline at end of file
......@@ -17,7 +17,7 @@
<script type="text/javascript" src="../../lib/js/p.js"></script>
<script type="text/javascript" src="../../lib/js/UIOT.js"></script>
</head>
<body ontouchstart="" class="noBottomGradient">
<body ontouchstart="">
<div id="app" v-cloak>
<div class="header">
......
......@@ -24,7 +24,7 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.scanCodeAdd') }}</p>
</div>
<div class="content">
<div class="content" id="bcid" style="width: 100%; height: 560px; margin-top: 40px;">
</div>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
......
......@@ -41,11 +41,10 @@
</ul>
<u-button :init-param="componentsConfig.connectButton.initParam" v-on:u-button-tap="onConnectButtonTap"></u-button>
</div>
<u-commstatus-loading ref="ucommstatusloading" :text="textLoading" :status="status"
:init-param="componentsConfig.ucommstatusloading.initParam" v-on:u-commstatus-loading-tap="onCommstatusLoadingButtonTap()">
<u-comm-loading ref="ucommloading" :init-param="componentsConfig.ucommloading.initParam" v-on:u-comm-loading-tap="onCommLoadingButtonTap()">
<p class="loader"></p>
<p class="icon"></p>
</u-commstatus-loading>
</u-comm-loading>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
......
......@@ -24,7 +24,7 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.alarmInfo') }}</p>
</div>
<u-list :init-param="componentsConfig.alarmInfoList.initParam"></u-list>
<u-list ref="ulist" :init-param="componentsConfig.alarmInfoList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
......
......@@ -24,7 +24,7 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.hijackRecord') }}</p>
</div>
<u-list :init-param="componentsConfig.hijackRecordList.initParam"></u-list>
<u-list ref="ulist" :init-param="componentsConfig.hijackRecordList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
......
......@@ -18,10 +18,9 @@
<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="onDoorlockManageTap">&#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">
......@@ -32,13 +31,13 @@
<p></p>
</div>
</div>
<div class="doorbellTip"><span>17:30</span>门铃响了</div>
<div class="doorbellTip" v-bind:class="[{active: doorbellRingingFlag}]"><span>{{ ringingTime }}</span>{{ $t('device.doorLockRinging') }}</div>
</div>
<p class="batteryState"><span>&#xe629;</span>100%</p>
<p class="batteryState"><span v-html="batteryState"></span>{{ batteryPercent }}%</p>
</div>
<div class="deviceHandle">
<p class="title">门锁最新消息</p>
<u-marquee :init-param="componentsConfig.marquee.initParam" :active="activeFlag"></u-marquee>
<p class="title">{{ $t('device.newMsgDoorlock') }}</p>
<u-marquee ref="umarquee" :init-param="componentsConfig.marquee.initParam" :active="activeFlag"></u-marquee>
<div class="switchGroup">
<div class="guoupRow">
<!-- 开门记录 -->
......@@ -62,7 +61,7 @@
</div>
<div class="guoupRow">
<!-- 远程开门 -->
<div class="col-xs-6 remoteOpendoor">
<div class="col-xs-6 remoteOpendoor" :class="[{newMsg: remoteOpendoorFlag}]">
<u-switch :value="valueRemoteOpendoor" :init-param="componentsConfig.remoteOpendoorSwitch.initParam" v-on:u-switch-tap="onRemoteOpendoorTap"></u-switch>
</div>
<!-- 门锁管理 -->
......@@ -85,7 +84,7 @@
</li>
</ul>
<u-button :init-param="componentsConfig.saveQRcodeButton.initParam" v-on:u-button-tap="onSaveQRcodeButtonTap"></u-button>
<p class="linkText"><v-touch tag="span" v-on:tap="onLaterFollowTap">{{ $t('device.laterFollow') }}</v-touch></p>
<v-touch tag="p" v-on:tap="onLaterFollowTap">{{ $t('device.laterFollow') }}</v-touch>
</div>
</div>
</transition>
......
......@@ -24,7 +24,7 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.opendoorRecord') }}</p>
</div>
<u-list :init-param="componentsConfig.opendoorRecordList.initParam"></u-list>
<u-list ref="ulist" :init-param="componentsConfig.opendoorRecordList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
......
......@@ -32,11 +32,6 @@
</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>
......
@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
......@@ -32,7 +32,9 @@
<li>{{ $t('qrcode.helpCont3') }}</li>
<li>{{ $t('qrcode.helpCont4') }}</li>
<li>
<p></p>
<p>
<canvas ref="qrcode"></canvas>
</p>
</li>
</ul>
<u-button :init-param="componentsConfig.qrcodeButton.initParam" v-on:u-button-tap="onQRcodeButtonTap"></u-button>
......
<!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>
<v-touch tag="span" class="header-right icon" v-on:tap="onUserTap">&#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="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 }}
</p>
</div>
</v-touch>
<div class="user-list-button">
<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 }}
</ul>
<p class="user-list-tip" v-show="(userList.length == 0)">{{ tip }}</p>
</div>
</div>
<script type="text/javascript" src="./index.js" defer async></script>
</body>
</html>
......@@ -26,6 +26,7 @@
</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,6 +25,7 @@
</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>
<!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>
</div>
<ul class="editMyInfo">
<v-touch tag="li" class="editNickname" v-on:tap="onEditNicknameTap">
{{ $t('myInfo.editNickname') }}
<span>&#xe611;</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>
</v-touch>
</ul>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div>
<script type="text/javascript" src="./index.js" defer async></script>
</body>
</html>
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