Commit b09d38d7 by wangying

Merge branch 'zjx' of http://116.62.143.3:10080/iot-project-js/doorlock into wangying

# Conflicts:
#	web/lib/less/device/device.less
#	web/lib/less/myInfo/help.less
#	web/view/myInfo/help.css
parents d2cdee4c a5c4372f
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"iscroll": "5.2.0", "iscroll": "5.2.0",
"moment": "^2.18.1", "moment": "^2.18.1",
"qrcode": "^0.9.0", "qrcode": "^0.9.0",
"ugen-components": "^0.2.4", "ugen-components": "^0.3.1",
"underscore": "1.8.3", "underscore": "1.8.3",
"vue": "2.2.6", "vue": "2.2.6",
"vue-i18n": "5.0.3", "vue-i18n": "5.0.3",
......
{ {
"loading": "loading...", "loading": "loading...",
"scroll": { "scroll": {
"clickToLoadMore": "点击加载更多", "clickToLoadMore": "上拉加载更多",
"loading": "loading..." "loading": "loading"
}, },
"btn": { "btn": {
"confirm": "确定", "confirm": "确定",
...@@ -191,8 +191,8 @@ ...@@ -191,8 +191,8 @@
"wifiAdd": { "wifiAdd": {
"unbindWifiTip": "当前无Wi-Fi", "unbindWifiTip": "当前无Wi-Fi",
"wifiBinding": "配网中", "wifiBinding": "配网中",
"wifiBindSuccess": "配网成功,请激活设备", "wifiBindSuccess": "Wi-Fi连接成功,正在激活设备",
"deviceActivating": "设备激活中", "deviceActivating": "Wi-Fi连接成功,正在激活设备",
"deviceActivateSuccess":"激活成功", "deviceActivateSuccess":"激活成功",
"deviceActivateFailure":"激活失败", "deviceActivateFailure":"激活失败",
"bindTimeout":"连接超时", "bindTimeout":"连接超时",
...@@ -272,10 +272,10 @@ ...@@ -272,10 +272,10 @@
}, },
"inviteBind":{ "inviteBind":{
"qrcodeExpireTip": "二维码已过期,请重新生成", "qrcodeExpireTip": "二维码已过期,请重新生成",
"title": "注意事项:", "title": "绑定方法:",
"cont1": "1.被邀请的用户选择添加设备页面中的扫二维码方式进行添加门锁", "cont1": "1.受邀用户登录“U智锁”APP",
"cont2": "2.长按二维码保存为图片,发送给被邀请用户,用户通过长按识别二维码", "cont2": "2.选择“扫描绑定设备”",
"cont3": "3.有效时间10分钟,失效后请点击“重新生成二维码" "cont3": "3.扫描上方二维码完成绑定"
}, },
"unlockInfo":{ "unlockInfo":{
"bindUnlockInfo": "已关联的开锁信息", "bindUnlockInfo": "已关联的开锁信息",
......
export default {
"url": "https://cloud.iot.u-gen.net/"
}
\ No newline at end of file
import config from './config.js'; import config from './config.js';
import VueI18n from 'vue-i18n'; import VueI18n from 'vue-i18n';
import defaultConfig from './defaultConfig';
var VueTouch = require('vue-touch'); var VueTouch = require('vue-touch');
Vue.use(VueTouch); Vue.use(VueTouch);
...@@ -19,7 +20,7 @@ const iot = new UIOT({ ...@@ -19,7 +20,7 @@ const iot = new UIOT({
cloud: { cloud: {
// url: 'http://wx.iotface.com' // url: 'http://wx.iotface.com'
//96环境 //96环境
url: 'http://192.168.2.96:20000' url: defaultConfig.url
//96外网 //96外网
// url: 'http://jycinema.u-gen.net' // url: 'http://jycinema.u-gen.net'
//正式 //正式
......
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
* @class * @class
* loop * loop
*/ */
//轮询通用方法:http://116.62.143.3:10080/iot-project-js/doorlock/issues/1
class Loop{ class Loop{
constructor(params) { constructor(params) {
this.handle = null; this.handle = null;
this.watcher = null; this.watcher = null;
this.time = null; this.time = null;
// this.url = params.request.url;
// this.opts = params.request.opts;
this.loopContent = params.loopContent; this.loopContent = params.loopContent;
this.timeout = params.timeout || 10; this.times = params.times || 10;
this.fincb = params.fincb; this.fincb = params.fincb;
this.intervalTime = params.interval.delay; this.intervalTime = params.interval.delay;
this.intervalcb = params.interval.cb; this.intervalcb = params.interval.cb;
...@@ -21,15 +20,6 @@ class Loop{ ...@@ -21,15 +20,6 @@ class Loop{
this.canDo = true; this.canDo = true;
this.i = 0; this.i = 0;
} }
requestsend(url, opts, needAuth, isPublic, i){
let data = [0,0,0,0,0,0,0,1,0,0,0];
console.log("请求时间"+this.i+'-'+new Date().getTime());
setTimeout(() => {
console.log("返回时间"+this.i+'-'+new Date().getTime());
opts.success(data[this.i]);
},100);
}
clearTime(){ clearTime(){
clearInterval(this.handle); clearInterval(this.handle);
...@@ -74,15 +64,6 @@ class Loop{ ...@@ -74,15 +64,6 @@ class Loop{
start(){ start(){
console.log("开始"); console.log("开始");
// this.time = setTimeout(() => {
// this.clearTime();
// this.canDo = false;
// this.fincb.error('timeout');
// this.fincb.complete();
// console.log("超时");
// this.intervalcb = null;
// this.fincb = null;
// },this.timeout);
console.log("第"+this.i+"次发送了请求"); console.log("第"+this.i+"次发送了请求");
console.log("发送时间"+new Date().getTime()); console.log("发送时间"+new Date().getTime());
this.i++; this.i++;
...@@ -101,7 +82,7 @@ class Loop{ ...@@ -101,7 +82,7 @@ class Loop{
this.handle = setInterval(() => { this.handle = setInterval(() => {
times++; times++;
console.log('times'+times); console.log('times'+times);
if(times > this.timeout){ if(times > this.times){
this.clearTime(); this.clearTime();
this.canDo = false; this.canDo = false;
this.fincb.error('timeout'); this.fincb.error('timeout');
...@@ -114,43 +95,4 @@ class Loop{ ...@@ -114,43 +95,4 @@ class Loop{
},this.intervalTime); },this.intervalTime);
} }
} }
//new Loop({
// request: {
// url: 'http://www.baidu.com',
// opts: {
// type: 'post',
// data: {}
// }
// },
// timeout: 6000,
// interval:{
// delay: 1000,
// cb: {
// success: (response) => {
// console.log('intervalcbSuccess:'+response);
// },
// error: (error) => {
// console.log('intervalcbSuccess:'+error);
// }
// }
// },
// fincb: {
// success: (response) => {
// console.log('fincbSuccess:'+response);
// },
// error: (error) => {
// console.log('fincbError:'+error);
// },
// complete: () => {}
// },
// stopcondition: (response) => {
// if(response == 1){
// return true;
// }else{
// return false;
// }
// }
//}).start();
export default Loop; export default Loop;
//module.exports = Loop;
\ No newline at end of file
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
*/ */
import uloop from './uloop'; import uloop from './uloop';
//获取cid: http://116.62.143.3:10080/iot-project-js/doorlock/issues/4
class unotify{ class unotify{
//在一个周期内获取cid //在一个周期内获取cid
static getCid(successCallback, errorCallback){ static getCid(successCallback, errorCallback){
...@@ -15,43 +17,13 @@ class unotify{ ...@@ -15,43 +17,13 @@ class unotify{
} }
//周期性获取cid,周期可调整 //周期性获取cid,周期可调整
static getCidPeriotic(times){ static getCidPeriotic(times){
// var self = this;
// return new Promise(function(resolve, reject){
// var i = 0;
// var cid = null;
// var handle = null;
// i++;
// cid = self.getCidOnce(i);
// console.log("第"+i+"次"+"获取的cid为"+cid);
// if(cid != null && cid != 'null' || i >= times){
// window.clearInterval(handle);
// resolve(cid);
// }else{
// handle = setInterval(function(){
// i++;
// cid = self.getCidOnce(i);
// console.log("第"+i+"次"+"获取的cid为"+cid);
// if(cid != null && cid != 'null' || i >= times){
// window.clearInterval(handle);
// resolve(cid);
// }
// },1000);
// }
// });
var self = this; var self = this;
return new Promise(function(resolve, reject){ return new Promise(function(resolve, reject){
new uloop({ new uloop({
loopContent: () => { loopContent: () => {
// var urlParams = {
// type: 'get',
// data: {},
// };
// return iot.network.send('http://192.168.2.75:3000/get', urlParams);
console.log(self.getCidOnce());
return self.getCidOnce(); return self.getCidOnce();
}, },
timeout: times, times: times,
interval:{ interval:{
delay: 1000, delay: 1000,
cb: { cb: {
...@@ -77,9 +49,6 @@ class unotify{ ...@@ -77,9 +49,6 @@ class unotify{
complete: () => {} complete: () => {}
}, },
stopcondition: async (response) => { stopcondition: async (response) => {
// if(response.data.msg == 5){
// return true;
// }
if(response != null && response != 'null' ){ if(response != null && response != 'null' ){
return true; return true;
} }
...@@ -88,14 +57,10 @@ class unotify{ ...@@ -88,14 +57,10 @@ class unotify{
}); });
} }
//单次获取cid //单次获取cid
static getCidOnce(i){ static getCidOnce(){
var clientInfo = plus.push.getClientInfo(); var clientInfo = plus.push.getClientInfo();
if(clientInfo && clientInfo.hasOwnProperty('clientid') && clientInfo.clientid){ if(clientInfo && clientInfo.hasOwnProperty('clientid') && clientInfo.clientid){
// if(i == 6){ return(clientInfo.clientid);
return(clientInfo.clientid);
// }else{
// return(null);
// }
}else{ }else{
return(null); return(null);
} }
...@@ -112,6 +77,7 @@ class unotify{ ...@@ -112,6 +77,7 @@ class unotify{
clienId: cid clienId: cid
}, },
success: (response) => { success: (response) => {
console.log(response);
if(typeof successCallback == 'function'){ if(typeof successCallback == 'function'){
successCallback('cid updateSuccess'); successCallback('cid updateSuccess');
} }
......
...@@ -13,7 +13,7 @@ iot.ready(init); ...@@ -13,7 +13,7 @@ iot.ready(init);
function init() { function init() {
//通用 dialog、loading组件 //通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading']); uPublic.componentsInit(['u-dialog','u-loading']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
......
...@@ -14,7 +14,7 @@ function init() { ...@@ -14,7 +14,7 @@ function init() {
console.log("init" + new Date().getTime()); console.log("init" + new Date().getTime());
//通用 dialog、loading组件 //通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading']); uPublic.componentsInit(['u-dialog','u-loading']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
...@@ -145,7 +145,9 @@ function deviceBind(self, lockId, relId){ ...@@ -145,7 +145,9 @@ function deviceBind(self, lockId, relId){
if(data.success){ if(data.success){
uComponents.openAlert(self, Vue.t('addDevice.bindSuccess'), { uComponents.openAlert(self, Vue.t('addDevice.bindSuccess'), {
text: Vue.t('dialog.confirm'), callback: function () { text: Vue.t('dialog.confirm'), callback: function () {
iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{}); iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{
needClose: true
});
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../device/index.html', url: '../device/index.html',
id: 'device' id: 'device'
......
...@@ -354,7 +354,9 @@ function commLoadingButtonTap(self) { ...@@ -354,7 +354,9 @@ function commLoadingButtonTap(self) {
if(self.getStatus() == 1){ if(self.getStatus() == 1){
//绑定成功 //绑定成功
uComponents.hideCommLoading(self); uComponents.hideCommLoading(self);
iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{}); iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{
needClose: true
});
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../device/index.html', url: '../device/index.html',
id: 'device' id: 'device'
......
...@@ -13,7 +13,7 @@ iot.ready(init); ...@@ -13,7 +13,7 @@ iot.ready(init);
function init() { function init() {
//通用 按钮、dialog、loading组件 //通用 按钮、dialog、loading组件
uPublic.componentsInit(['u-button','u-dialog','u-loading']); uPublic.componentsInit(['u-button','u-dialog','u-loading']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
......
...@@ -26,6 +26,7 @@ function init() { ...@@ -26,6 +26,7 @@ function init() {
flag: true flag: true
}, },
mounted(){ mounted(){
uComponents.showLoading(this);
resolve(this); resolve(this);
}, },
methods:{ methods:{
...@@ -48,8 +49,11 @@ function init() { ...@@ -48,8 +49,11 @@ function init() {
this.deviceId = id; this.deviceId = id;
}, },
//tap 点击加载更多 //tap 点击加载更多
onListLoadTap(){ onListLoad(){
listLoadTap(this); listLoad(this);
},
onRefreshFresh(){
refreshFresh(this);
}, },
//tap < //tap <
onBackTap(){ onBackTap(){
...@@ -67,7 +71,8 @@ function initComponentsConfig() { ...@@ -67,7 +71,8 @@ function initComponentsConfig() {
class: 'custom-list', class: 'custom-list',
list: [], list: [],
tip: Vue.t('alarmInfo.noInfoTip'), tip: Vue.t('alarmInfo.noInfoTip'),
pagesize: PAGE_SIZE pagesize: PAGE_SIZE,
pullup: true
} }
}, },
dialog: { dialog: {
...@@ -79,21 +84,22 @@ function initComponentsConfig() { ...@@ -79,21 +84,22 @@ function initComponentsConfig() {
initParam: { initParam: {
class: 'custom-loading' class: 'custom-loading'
} }
} }
} }
} }
// 获取历史记录 // 获取历史记录
function resolve(self) { function resolve(self) {
self.setDeviceId(iot.navigator.getExtras().deviceId); self.setDeviceId(iot.navigator.getExtras().deviceId);
uComponents.showLoading(self); // uComponents.showLoading(self);
iot.business.api.sendCustom('lock/getHistoryRecord', iot.business.api.sendCustom('lock/getHistoryRecord',
{ {
data: { data: {
device_id: self.getDeviceId(), device_id: self.getDeviceId(),
action: 2, action: 2,
start_id: self.getStartId(), start_id: self.getStartId(),
page_size: PAGE_SIZE page_size: PAGE_SIZE,
pullUpLoading: true
}, },
success: async (response) => { success: async (response) => {
console.log(response); console.log(response);
...@@ -149,6 +155,6 @@ mui.back = function(){ ...@@ -149,6 +155,6 @@ mui.back = function(){
} }
//tap 点击加载更多 //tap 点击加载更多
function listLoadTap(self) { function listLoad(self) {
resolve(self); resolve(self);
} }
\ No newline at end of file
...@@ -28,6 +28,7 @@ function init() { ...@@ -28,6 +28,7 @@ function init() {
flag: true flag: true
}, },
mounted(){ mounted(){
uComponents.showLoading(this);
resolve(this); resolve(this);
}, },
methods:{ methods:{
...@@ -55,8 +56,11 @@ function init() { ...@@ -55,8 +56,11 @@ function init() {
setUserInfo(info){ setUserInfo(info){
this.userInfo = info; this.userInfo = info;
}, },
onListLoadTap(){ onListLoad(){
listLoadTap(this); listLoad(this);
},
onRefreshFresh(){
refreshFresh(this);
}, },
//tap < //tap <
onBackTap(){ onBackTap(){
...@@ -74,7 +78,8 @@ function initComponentsConfig() { ...@@ -74,7 +78,8 @@ function initComponentsConfig() {
class: 'custom-list', class: 'custom-list',
list: [], list: [],
tip: Vue.t('hijackRecord.noRecordTip'), tip: Vue.t('hijackRecord.noRecordTip'),
pagesize: PAGE_SIZE pagesize: PAGE_SIZE,
pullup: true
} }
}, },
dialog: { dialog: {
...@@ -86,13 +91,13 @@ function initComponentsConfig() { ...@@ -86,13 +91,13 @@ function initComponentsConfig() {
initParam: { initParam: {
class: 'custom-loading' class: 'custom-loading'
} }
} }
} }
} }
function resolve(self) { function resolve(self) {
self.setDeviceId(iot.navigator.getExtras().deviceId); self.setDeviceId(iot.navigator.getExtras().deviceId);
uComponents.showLoading(self); //
iot.business.api.sendCustom('lock/getHistoryRecord', iot.business.api.sendCustom('lock/getHistoryRecord',
{ {
data: { data: {
...@@ -168,6 +173,10 @@ mui.back = function(){ ...@@ -168,6 +173,10 @@ mui.back = function(){
} }
//tap 点击加载更多 //tap 点击加载更多
function listLoadTap(self) { function listLoad(self) {
resolve(self);
}
function refreshFresh(self){
resolve(self); resolve(self);
} }
\ No newline at end of file
...@@ -125,6 +125,9 @@ function init() { ...@@ -125,6 +125,9 @@ function init() {
getDevices(self); getDevices(self);
//注册监听上报 //注册监听上报
registerPushListener(self); registerPushListener(self);
if(event.detail.needClose){
iot.navigator.closeAllBesidesItself();
}
}); });
}, },
...@@ -635,6 +638,10 @@ async function updateHistoryMap(self, historyRecord){ ...@@ -635,6 +638,10 @@ async function updateHistoryMap(self, historyRecord){
} }
} }
console.log(oldHistory);
console.log(newHistory);
iot.storage.setMap('history', newHistory, (response) => { iot.storage.setMap('history', newHistory, (response) => {
console.log(res); console.log(res);
}, () => { }, () => {
...@@ -689,7 +696,7 @@ async function loopGetLockInfo(self, delay, timeout){ ...@@ -689,7 +696,7 @@ async function loopGetLockInfo(self, delay, timeout){
return iot.business.api.send('lock/getNewInfo', urlParams, true, false); return iot.business.api.send('lock/getNewInfo', urlParams, true, false);
// return plus.push.getClientInfo().clientid; // return plus.push.getClientInfo().clientid;
}, },
timeout: 3, times: 3,
interval:{ interval:{
delay: config.intervalTime*1000, delay: config.intervalTime*1000,
cb: { cb: {
......
...@@ -26,7 +26,8 @@ function init() { ...@@ -26,7 +26,8 @@ function init() {
userInfo: [], userInfo: [],
flag: true flag: true
}, },
mounted(){ mounted(){
uComponents.showLoading(this);
resolve(this); resolve(this);
}, },
methods:{ methods:{
...@@ -54,8 +55,11 @@ function init() { ...@@ -54,8 +55,11 @@ function init() {
setDeviceId(id){ setDeviceId(id){
this.deviceId = id; this.deviceId = id;
}, },
onListLoadTap(){ onListLoad(){
listLoadTap(this); listLoad(this);
},
onRefreshFresh(){
refreshFresh(this);
}, },
//tap < //tap <
onBackTap(){ onBackTap(){
...@@ -73,7 +77,8 @@ function initComponentsConfig() { ...@@ -73,7 +77,8 @@ function initComponentsConfig() {
class: 'custom-list', class: 'custom-list',
list: [], list: [],
tip: Vue.t('opendoorRecord.noRecordTip'), tip: Vue.t('opendoorRecord.noRecordTip'),
pagesize: PAGE_SIZE pagesize: PAGE_SIZE,
pullup: true
} }
}, },
dialog: { dialog: {
...@@ -85,14 +90,14 @@ function initComponentsConfig() { ...@@ -85,14 +90,14 @@ function initComponentsConfig() {
initParam: { initParam: {
class: 'custom-loading' class: 'custom-loading'
} }
} }
} }
} }
//调用接口获取开门记录 //调用接口获取开门记录
function resolve(self) { function resolve(self) {
console.log("in"); console.log("in");
uComponents.showLoading(self); // uComponents.showLoading(self);
self.setDeviceId(iot.navigator.getExtras().deviceId); self.setDeviceId(iot.navigator.getExtras().deviceId);
console.log(iot.navigator.getExtras()); console.log(iot.navigator.getExtras());
if(iot.navigator.getExtras().relId){ if(iot.navigator.getExtras().relId){
...@@ -115,7 +120,7 @@ mui.back = function(){ ...@@ -115,7 +120,7 @@ mui.back = function(){
} }
//tap 点击加载更多 //tap 点击加载更多
function listLoadTap(self) { function listLoad(self) {
resolve(self); resolve(self);
} }
...@@ -186,7 +191,7 @@ function setListData(self, response){ ...@@ -186,7 +191,7 @@ function setListData(self, response){
for(let i=0; i<record.length; i++){ for(let i=0; i<record.length; i++){
list[i] = { list[i] = {
value: record[i].openId, value: record[i].openId,
title: "ID:"+record[i].openId, title: ((record[i].mode == 30 ) || (record[i].mode == 5 )) ? '':"ID:"+record[i].openId,
leftImage: '../../resources/image/green_opendoor'+record[i].mode+'_icon.png', leftImage: '../../resources/image/green_opendoor'+record[i].mode+'_icon.png',
subtitle: Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+''), subtitle: Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+''),
rightText: moment(record[i].time).format("YYYY.MM.DD HH:mm:ss") rightText: moment(record[i].time).format("YYYY.MM.DD HH:mm:ss")
......
...@@ -284,6 +284,12 @@ function unbind(self){ ...@@ -284,6 +284,12 @@ function unbind(self){
}, },
success: (response) => { success: (response) => {
console.log(response); console.log(response);
iot.storage.delMaps(['historyId','history'], (response) => {
console.log("clearMap"+response);
}, (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
});
self.setStateShowFlag(true); self.setStateShowFlag(true);
self.setShowMsg(Vue.t('doorlockManage.unbindSuccess')); self.setShowMsg(Vue.t('doorlockManage.unbindSuccess'));
self.setUnbindSucceess(true); self.setUnbindSucceess(true);
......
...@@ -30,6 +30,8 @@ function init() { ...@@ -30,6 +30,8 @@ function init() {
userListData: [], userListData: [],
startId: 0, startId: 0,
role: null, role: null,
//当前用户id
currentId: null
}, },
mounted(){ mounted(){
this.extras = iot.navigator.getExtras(); this.extras = iot.navigator.getExtras();
...@@ -151,9 +153,8 @@ function getUserInfoMap() { ...@@ -151,9 +153,8 @@ function getUserInfoMap() {
} }
async function sortUsers(self, data){ async function sortUsers(self, data){
let id = [];
try { try {
id = await getUserInfoMap(); self.currentId = await getUserInfoMap();
} }
catch (err) { catch (err) {
console.log(err); console.log(err);
...@@ -161,7 +162,7 @@ async function sortUsers(self, data){ ...@@ -161,7 +162,7 @@ async function sortUsers(self, data){
let users = []; let users = [];
let manage = []; let manage = [];
for(let i=0;i<data.length;i++){ for(let i=0;i<data.length;i++){
if(data[i].user_id == null ||data[i].role && data[i].user_id != id){ if(data[i].user_id == null ||data[i].role && data[i].user_id != self.currentId){
users.push(data[i]); users.push(data[i]);
}else{ }else{
manage.push(data[i]); manage.push(data[i]);
......
...@@ -177,6 +177,9 @@ function cloudsLogin(self, id){ ...@@ -177,6 +177,9 @@ function cloudsLogin(self, id){
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../device/index.html', url: '../device/index.html',
id: 'device', id: 'device',
styles: {
popGesture: 'none'
},
extras: { extras: {
needClose: true needClose: true
} }
......
...@@ -13,7 +13,7 @@ iot.ready(init); ...@@ -13,7 +13,7 @@ iot.ready(init);
function init() { function init() {
//通用 dialog、loading组件 //通用 dialog、loading组件
uPublic.componentsInit(['u-button','u-dialog','u-loading']); uPublic.componentsInit(['u-button','u-dialog','u-loading']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
......
/**
* 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';
import unotify from '../../public/unotify.js';
import uloop from '../../public/uloop.js';
iot.ready(init);
function init() {
const app = new Vue({
data:{
},
mounted(){
unotify.getCid((response) => {
console.log(response);
},(error) => {
console.log(error);
});
mui("#refreshContainer").pullRefresh({
up:{
contentrefresh : "正在加載...",//可選,正在加載狀態時,上拉加載控件上顯示的標題內容
contentnomore:'沒 有 更 多 數 據 了',//可選,請求完畢若沒有更多數據時顯示的提醒內容;
callback: beginLoopTap()
},
down : {
height:50,//可選,默認50.觸發下拉刷新拖動距離,
auto: true,//可選,默認false.首次加載自動下拉刷新一次
contentdown : "下拉可以刷新",//可選,在下拉可刷新狀態時,下拉刷新控件上顯示的標題內容
contentover : "釋放立即刷新",//可選,在釋放可刷新狀態時,下拉刷新控件上顯示的標題內容
contentrefresh : "正在刷新...",//可選,正在刷新狀態時,下拉刷新控件上顯示的標題內容
callback : beginLoopTap()
}
});
},
methods:{
// onBeginLoopTap(){
// beginLoopTap();
// }
}
}).$mount('#app');
}
function beginLoopTap(){
console.log("innnnn");
mui('#refreshContainer').pullRefresh().endPullupToRefresh(true);
}
...@@ -481,9 +481,9 @@ ...@@ -481,9 +481,9 @@
animation: none; animation: none;
} }
.u-notice{ .u-notification{
.mask(1051,@CUSTOM-BACKDROP-BG); .mask(1051,@CUSTOM-BACKDROP-BG);
.u-notice-box{ .u-notification-box{
width: 335px; width: 335px;
height: 300px; height: 300px;
.transform_center(); .transform_center();
...@@ -491,13 +491,13 @@ ...@@ -491,13 +491,13 @@
color: #00ffff; color: #00ffff;
border: 1px solid;/*no*/ border: 1px solid;/*no*/
border-radius: 5px; border-radius: 5px;
.u-notice-title{ .u-notification-title{
position: relative; position: relative;
padding-top: 10px; padding-top: 10px;
font-size: 16px; font-size: 16px;
text-align: center; text-align: center;
} }
.u-notice-close{ .u-notification-close{
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
...@@ -506,17 +506,17 @@ ...@@ -506,17 +506,17 @@
padding-top: 10px; padding-top: 10px;
.iconfont(25px); .iconfont(25px);
} }
.u-notice-content{ .u-notification-content{
.bgImgSize(100%,147px,"noticeContBg.png",center,auto 100%); .bgImgSize(100%,147px,"noticeContBg.png",center,auto 100%);
padding-top: 61px; padding-top: 61px;
} }
.u-notice-switch{ .u-notification-switch{
width: 150px; width: 150px;
margin: 15px auto; margin: 15px auto;
padding: 10px 0; padding: 10px 0;
text-align: center; text-align: center;
font-size: 12px; font-size: 12px;
.u-notice-switch-handle{ .u-notification-switch-handle{
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
position: relative; position: relative;
...@@ -530,19 +530,21 @@ ...@@ -530,19 +530,21 @@
.iconfont(17px); .iconfont(17px);
} }
} }
&.u-notice-switch-on .u-notice-switch-handle:before{ &.u-notification-switch-on .u-notification-switch-handle:before{
content: '\e6aa'; content: '\e6aa';
} }
&.u-notice-switch-off .u-notice-switch-handle:before{ &.u-notification-switch-off .u-notification-switch-handle:before{
content: '\e6a9'; content: '\e6a9';
} }
} }
.u-notice-button{ .u-notification-button{
.button(235px); li{
line-height: 1; .button(235px);
margin: 0 auto; line-height: 1;
text-align: center; margin: 0 auto;
padding: 10px 0; text-align: center;
padding: 10px 0;
}
} }
.clearfix{ .clearfix{
overflow: hidden; overflow: hidden;
......
...@@ -33,8 +33,39 @@ ...@@ -33,8 +33,39 @@
} }
.u-list-load{ .u-list-load{
.listLoad(); .listLoad();
.u-list-load-animation{
width: 24px;
height: 24px;
display: inline-block;
.bgImg("loading.png");
-webkit-animation: refresh 1s steps(8, end) infinite;
animation: refresh 1s steps(8, end) infinite;
background-size: cover;
vertical-align: middle;
}
} }
.u-list-tip{ .u-list-tip{
.listNoCont(); .listNoCont();
} }
}
@-webkit-keyframes refresh {
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 refresh {
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);
}
} }
\ No newline at end of file
...@@ -133,4 +133,8 @@ ...@@ -133,4 +133,8 @@
.buttonPosition(); .buttonPosition();
} }
.mediaPosition(); .mediaPosition();
\ No newline at end of file
.currentUser{
color: @CUSTOM-SWIPELIST-COMPONENT-TITLE-COLOR;
}
...@@ -34,4 +34,13 @@ ...@@ -34,4 +34,13 @@
margin-top: 28px; margin-top: 28px;
margin-bottom: 20px; margin-bottom: 20px;
} }
} }
\ No newline at end of file
.u-button();
.custom-button{
.button();
.buttonPosition();
}
.mediaPosition();
\ No newline at end of file
...@@ -254,6 +254,7 @@ ...@@ -254,6 +254,7 @@
@CUSTOM-SWIPELIST-COMPONENT-BUTTON-COLOR: @C_BLUE_4; @CUSTOM-SWIPELIST-COMPONENT-BUTTON-COLOR: @C_BLUE_4;
@CUSTOM-SWIPELIST-COMPONENT-BUTTON-ICON-FONTSIZE: @F_SIZE_16; @CUSTOM-SWIPELIST-COMPONENT-BUTTON-ICON-FONTSIZE: @F_SIZE_16;
@CUSTOM-SWIPELIST-COMPONENT-DELETEBUTTON-BG: @BODY-BG-COLOR; @CUSTOM-SWIPELIST-COMPONENT-DELETEBUTTON-BG: @BODY-BG-COLOR;
@CUSTOM-SWIPELIST-COMPONENT-TITLE-COLOR: @C_BLUE_4;
//门锁用户列表 //门锁用户列表
@USERLIST-ROW-BG: @BODY-BG-COLOR; @USERLIST-ROW-BG: @BODY-BG-COLOR;
......
{"loading":"loading...","scroll":{"clickToLoadMore":"点击加载更多","loading":"loading..."},"btn":{"confirm":"确定","guideLogin":"账号/密码登录","login":"登录","getCode":"获取验证码","register":"注册","logout":"退出系统","save":"保存","qrcode":"生成二维码","wifiAdd":"开始配置Wi-Fi","connect":"连接","bindUser":"绑定姓名","bind":"我要绑定","reBound":"请重新绑定","saveQRcode":"保存二维码到相册","unbind":"解绑","deleteUser":"删除该用户","qrcodeReset":"重新生成二维码","add":"添加","next":"下一步","iSee":"我知道了","unbindDoorlock":"解绑门锁"},"dialog":{"confirm":"确认","cancel":"取消","unbind":"解绑","delete":"删除"},"title":{"login":"登录","register":"注册","forgetPassword":"忘记密码","device":"U智锁","opendoorRecord":"开门记录","alarmInfo":"报警记录","remoteOpendoor":"远程开门","hijackRecord":"劫持记录","doorlockManage":"门锁管理","editName":"修改名称","qrcode":"生成绑定二维码","addDevice":"添加设备","scanCodeAdd":"扫描绑定设备","wifiAddHelp":"配置Wi-Fi","wifiAdd":"连接Wi-Fi","bindUserHelp":"ID-姓名绑定","bindUser":"绑定用户","userList":"用户列表","doorlockUser":"门锁用户","addUser":"添加用户","inviteBind":"邀请绑定","unlockInfo":"关联开锁信息","myInfo":"个人信息","editNickname":"修改昵称","editPassword":"修改密码","addUnlockInfo":"关联开锁ID","deviceList":"产品型号"},"guide":{"footer":"指纹改变生活"},"login":{"telInputTip":"请输入手机号","passwordInputTip":"请输入密码","register":"快速注册","forgetPassword":"忘记密码","failure":"登陆失败","error":{"telNull":"请输入手机号","passWordNull":"请输入密码"}},"register":{"telInputTip":"请输入手机号","codeInputTip":"请输入验证码","passwordInputTip":"请输入6位登录密码","error":{"telNull":"请输入手机号","codeNull":"请输入验证码","passWordNull":"请输入密码"}},"forgetPassword":{"telInputTip":"请输入手机号","codeInputTip":"请输入验证码","passwordInputTip":"请输入6位登录密码","error":{"telNull":"请输入手机号","codeNull":"请输入验证码","passWordNull":"请输入密码"}},"device":{"opendoorRecord":"开门记录","securityAlarm":"安全报警","doorlockUser":"门锁用户","remoteOpendoor":"远程开门","hijackAlarm":"劫持报警","doorlockManage":"门锁管理","followTitle":"关注服务号","followCont1":"关注 “i智信” 微信服务号可随时随地掌握设备动态<br>再也不担心错过重要通知,赶紧按下方提示试试吧","followCont2":"1.保存二维码-2.用微信从<span>相册选取扫码</span>-3.关注","laterFollow":"稍后关注","newMsgDoorlock":"门锁最新消息","doorLockRinging":"门铃响了","defaultNewMsg":"您尚未绑定门锁","noNewMsg":"门锁休息中","bindDoorlock":"绑定门锁"},"opendoorRecord":{"noRecordTip":"暂无记录","passwordOpenDoor":"密码开门","fingerprintOpenDoor":"指纹开门","ICcardOpenDoor":"IC卡开门","remoteOpenDoor":"遥控器开门","keyOpenDoor":"钥匙开门","hijackingAlarm":"劫持报警","appRemoteOpenDoor":"app远程开门"},"alarmInfo":{"noInfoTip":"暂无信息","tamperAlarm":"防撬报警","trialAlarm":"试错报警","powerAlarm":"欠电报警"},"remoteOpendoor":{"loading":"远程开门中","passwordInputTip":"请输入远程开门密码","openDoorSuccess":"远程开门成功","openDoorFailure":"远程开门失败","remoteTimeout":"远程开门超时","remoteOpendoorAgain":"请尝试重试","error":{"noPasswordTip":"远程密码不能为空"}},"hijackRecord":{"noRecordTip":"暂无记录","hijackingAlarm":"劫持指纹报警"},"doorlockManage":{"name":"名称","logoutDialogTip":"确定要退出系统吗?","defaultNickname":"门锁","isClearRecord":"清除所有信息","unbindSuccess":"解绑成功","doorbellMsgPush":"门铃消息推送","alarmMsgPush":"报警消息推送","opendoorMsgPush":"开门消息推送","unbindDialogTip":"确认解除绑定","unbindFailue":"解绑失败"},"editName":{"nameInputTip":"请输入设备名称","nickNameInputTip":"请输入用户名","editNameSuccess":"修改名称成功","editNameFailue":"修改名称失败","error":{"nameCanNotBeBlank":"设备名称不能为空","nicknameCanNotBeBlank":"用户名不能为空"}},"qrcode":{"helpTitle":"注意事项:","helpCont1":"1.仅超级管理员(通过Wi-Fi配网绑定的用户为超级管理员)可以生成绑定二维码","helpCont2":"2.二维码有效时间为10分钟且只能使用一次","helpCont3":"3.用户只需要扫描该二维码即可绑定指纹锁","helpCont4":"4.绑定失败则需要重新生成二维码进行绑定"},"addDevice":{"scanCodeAdd":"扫描绑定设备","wifiAdd":"配置Wi-Fi","loading":"loading","bindSuccess":"绑定成功","bindFailure":"绑定失败","reBindDevice":"请重新绑定"},"wifiAddHelp":{"helpTitle":"配置WIFI说明:","helpCont1":"1.确认设备端进入配网模式(详情操作请见产品说明书)","helpCont2":"2.点击页面下方“开始配置Wi-Fi”按钮,进入WiFi配网页面","helpCont3":"3.输入Wi-Fi密码,点击“连接”,等待锁端响应,至配网成功。","helpCont4":"(提示:如果指纹锁已经绑定过用户,重新绑定成功后会清除之前所有绑定信息)"},"wifiAdd":{"unbindWifiTip":"当前无Wi-Fi","wifiBinding":"配网中","wifiBindSuccess":"配网成功,请激活设备","deviceActivating":"设备激活中","deviceActivateSuccess":"激活成功","deviceActivateFailure":"激活失败","bindTimeout":"连接超时","passwordInputTip":"请输入Wi-Fi密码","remindTitle":"配置Wi-Fi提醒:","remindCont1":"1. 请确保Wi-Fi信号良好","remindCont2":"2. 本产品暂不支持5GHz无线网络","error":{}},"bindUserHelp":{"helpTitle":"配对姓名说明:","helpCont1":"1.在指纹锁上录入指纹、密码、卡并获得相应ID","helpCont2":"2.通过姓名绑定将该ID绑定对应用户姓名","helpCont3":"3.绑定成功后,开门记录中将会显示已绑定的用户姓名","helpCont4":"4.用户姓名信息只保存在APP端,不影响锁端设置","boundUser":"查看已绑定ID姓名"},"bindUser":{"editHeadTip":"点击编辑用户头像","nameTitle":"姓名","fingerprintIDTitle":"指纹ID","passwordIDTitle":"密码ID","ICCardIDTitle":"IC卡ID","requiredInputTip":"(必填)","optionalInputTip":"(选填)","error":{}},"commstatusLoading":{"connectSuccess":"Wi-Fi连接成功,正在绑定...","bindSuccess":"绑定成功","bindFailed":"绑定失败"},"userList":{"name":"昵称:","noUserTip":"暂无用户","defaultName":"管理员","binded":"已绑定","unbind":"未绑定"},"addUser":{"nameInputTip":"请输入您想添加的用户名","addUserSuccess":"添加用户成功","addUserFailure":"添加用户失败","error":{"nameCanNotEmpty":"用户名不能为空"}},"doorlockUser":{"name":"昵称:","inviteBind":"邀请绑定","bindUnlockInfo":"关联开锁信息","opendoorRecord":"历史开门记录","unbindDialogTip":"<span></span>解绑后,该用户不能对门锁下的信息进行查看","deleteUserDialogTip":"删除后,用户对应的开锁id取消关联,同时失去信息查看权限。","unbindSuccess":"解绑成功","unbindFailue":"解绑失败","guideStep1Tip1":"邀请绑定成功","guideStep1Tip2":"(可查看开门记录,报警记录等<br>相关门锁信息)","guideStep3Tip":"绑定后看可了解<br>该用户的开门情况","deleteSuccess":"删除成功","deleteFailure":"删除失败","defaultName":"管理员"},"inviteBind":{"qrcodeExpireTip":"二维码已过期,请重新生成","title":"注意事项:","cont1":"1.被邀请的用户选择添加设备页面中的扫二维码方式进行添加门锁","cont2":"2.长按二维码保存为图片,发送给被邀请用户,用户通过长按识别二维码","cont3":"3.有效时间10分钟,失效后请点击“重新生成二维码"},"unlockInfo":{"bindUnlockInfo":"已关联的开锁信息","noInfoTip":"当前无绑定开锁ID,请添加","passwordOpenDoor":"密码","fingerprintOpenDoor":"指纹","ICcardOpenDoor":"IC卡","remoteOpenDoor":"遥控器","keyOpenDoor":"钥匙","appRemoteOpenDoor":"app远程","hijackingAlarm":"劫持指纹","setHijack":"设为劫持","setHijackTip":"确认设为劫持指纹?","cancelHijack":"取消劫持","cancelHijackTip":"确认取消劫持指纹?","cancelAssociated":"取消关联","cancelAssociatedTip":"取消关联后,开门历史记录中将不再显示关联的用户信息。","cancelAssociatedSuccess":"取消关联成功","cancelAssociatedFailue":"取消关联失败","setHijackSuccess":"设为劫持指纹成功","setHijackFailue":"设为劫持指纹失败","cancelHijackSuccess":"取消劫持指纹成功","cancelHijackFailue":"取消劫持指纹失败"},"addUnlockInfo":{"opendoorMode":"选择要关联的开锁方式","fingerprint":"指纹","password":"密码","icCard":"IC卡","key":"钥匙","remote":"遥控器","hijackFingerprint":"劫持指纹","opendoorRecord":"选择要关联的开锁ID","tip":"仅显示未绑定开门记录","addInfoSuccess":"添加绑定开锁信息成功","addInfoFailue":"添加绑定开锁信息失败","noRecordTip":"暂无记录","setHijackSwitch":"设为劫持指纹","guideStep1Tip":"选择需要添加关联的开门方式","guideStep3Tip":"根据开门记录中的开门时间,选择关联的<br>开门ID<span>(一个ID只能被一个用户绑定)</span>","guideStep5Tip":"使用劫持指纹开门时,会以报警形式<br>通知到该门锁名下的其他绑定用户"},"myInfo":{"editNickname":"修改昵称","editPassword":"修改密码","logoutDialogTip":"确定要退出系统吗?"},"editNickname":{"nickNameInputTip":"请输入昵称"},"editPassword":{"newPasswordInputTip":"请输入新密码","oldPasswordInputTip":"请输入旧密码","oldPasswordInputTipAgain":"请再次输入旧密码"},"request":{"error":"请求发送失败","initError":"初始化失败,请关闭APP重试"},"deviceList":{"model":"型号:","noDeviceTip":"暂无产品型号"}} {"loading":"loading...","scroll":{"clickToLoadMore":"上拉加载更多","loading":"loading"},"btn":{"confirm":"确定","guideLogin":"账号/密码登录","login":"登录","getCode":"获取验证码","register":"注册","logout":"退出系统","save":"保存","qrcode":"生成二维码","wifiAdd":"开始配置Wi-Fi","connect":"连接","bindUser":"绑定姓名","bind":"我要绑定","reBound":"请重新绑定","saveQRcode":"保存二维码到相册","unbind":"解绑","deleteUser":"删除该用户","qrcodeReset":"重新生成二维码","add":"添加","next":"下一步","iSee":"我知道了","unbindDoorlock":"解绑门锁"},"dialog":{"confirm":"确认","cancel":"取消","unbind":"解绑","delete":"删除"},"title":{"login":"登录","register":"注册","forgetPassword":"忘记密码","device":"U智锁","opendoorRecord":"开门记录","alarmInfo":"报警记录","remoteOpendoor":"远程开门","hijackRecord":"劫持记录","doorlockManage":"门锁管理","editName":"修改名称","qrcode":"生成绑定二维码","addDevice":"添加设备","scanCodeAdd":"扫描绑定设备","wifiAddHelp":"配置Wi-Fi","wifiAdd":"连接Wi-Fi","bindUserHelp":"ID-姓名绑定","bindUser":"绑定用户","userList":"用户列表","doorlockUser":"门锁用户","addUser":"添加用户","inviteBind":"邀请绑定","unlockInfo":"关联开锁信息","myInfo":"个人信息","editNickname":"修改昵称","editPassword":"修改密码","addUnlockInfo":"关联开锁ID","deviceList":"产品型号"},"guide":{"footer":"指纹改变生活"},"login":{"telInputTip":"请输入手机号","passwordInputTip":"请输入密码","register":"快速注册","forgetPassword":"忘记密码","failure":"登陆失败","error":{"telNull":"请输入手机号","passWordNull":"请输入密码"}},"register":{"telInputTip":"请输入手机号","codeInputTip":"请输入验证码","passwordInputTip":"请输入6位登录密码","error":{"telNull":"请输入手机号","codeNull":"请输入验证码","passWordNull":"请输入密码"}},"forgetPassword":{"telInputTip":"请输入手机号","codeInputTip":"请输入验证码","passwordInputTip":"请输入6位登录密码","error":{"telNull":"请输入手机号","codeNull":"请输入验证码","passWordNull":"请输入密码"}},"device":{"opendoorRecord":"开门记录","securityAlarm":"安全报警","doorlockUser":"门锁用户","remoteOpendoor":"远程开门","hijackAlarm":"劫持报警","doorlockManage":"门锁管理","followTitle":"关注服务号","followCont1":"关注 “i智信” 微信服务号可随时随地掌握设备动态<br>再也不担心错过重要通知,赶紧按下方提示试试吧","followCont2":"1.保存二维码-2.用微信从<span>相册选取扫码</span>-3.关注","laterFollow":"稍后关注","newMsgDoorlock":"门锁最新消息","doorLockRinging":"门铃响了","defaultNewMsg":"您尚未绑定门锁","noNewMsg":"门锁休息中","bindDoorlock":"绑定门锁"},"opendoorRecord":{"noRecordTip":"暂无记录","passwordOpenDoor":"密码开门","fingerprintOpenDoor":"指纹开门","ICcardOpenDoor":"IC卡开门","remoteOpenDoor":"遥控器开门","keyOpenDoor":"钥匙开门","hijackingAlarm":"劫持报警","appRemoteOpenDoor":"app远程开门"},"alarmInfo":{"noInfoTip":"暂无信息","tamperAlarm":"防撬报警","trialAlarm":"试错报警","powerAlarm":"欠电报警"},"remoteOpendoor":{"loading":"远程开门中","passwordInputTip":"请输入远程开门密码","openDoorSuccess":"远程开门成功","openDoorFailure":"远程开门失败","remoteTimeout":"远程开门超时","remoteOpendoorAgain":"请尝试重试","error":{"noPasswordTip":"远程密码不能为空"}},"hijackRecord":{"noRecordTip":"暂无记录","hijackingAlarm":"劫持指纹报警"},"doorlockManage":{"name":"名称","logoutDialogTip":"确定要退出系统吗?","defaultNickname":"门锁","isClearRecord":"清除所有信息","unbindSuccess":"解绑成功","doorbellMsgPush":"门铃消息推送","alarmMsgPush":"报警消息推送","opendoorMsgPush":"开门消息推送","unbindDialogTip":"确认解除绑定","unbindFailue":"解绑失败"},"editName":{"nameInputTip":"请输入设备名称","nickNameInputTip":"请输入用户名","editNameSuccess":"修改名称成功","editNameFailue":"修改名称失败","error":{"nameCanNotBeBlank":"设备名称不能为空","nicknameCanNotBeBlank":"用户名不能为空"}},"qrcode":{"helpTitle":"注意事项:","helpCont1":"1.仅超级管理员(通过Wi-Fi配网绑定的用户为超级管理员)可以生成绑定二维码","helpCont2":"2.二维码有效时间为10分钟且只能使用一次","helpCont3":"3.用户只需要扫描该二维码即可绑定指纹锁","helpCont4":"4.绑定失败则需要重新生成二维码进行绑定"},"addDevice":{"scanCodeAdd":"扫描绑定设备","wifiAdd":"配置Wi-Fi","loading":"loading","bindSuccess":"绑定成功","bindFailure":"绑定失败","reBindDevice":"请重新绑定"},"wifiAddHelp":{"helpTitle":"配置WIFI说明:","helpCont1":"1.确认设备端进入配网模式(详情操作请见产品说明书)","helpCont2":"2.点击页面下方“开始配置Wi-Fi”按钮,进入WiFi配网页面","helpCont3":"3.输入Wi-Fi密码,点击“连接”,等待锁端响应,至配网成功。","helpCont4":"(提示:如果指纹锁已经绑定过用户,重新绑定成功后会清除之前所有绑定信息)"},"wifiAdd":{"unbindWifiTip":"当前无Wi-Fi","wifiBinding":"配网中","wifiBindSuccess":"Wi-Fi连接成功,正在激活设备","deviceActivating":"Wi-Fi连接成功,正在激活设备","deviceActivateSuccess":"激活成功","deviceActivateFailure":"激活失败","bindTimeout":"连接超时","passwordInputTip":"请输入Wi-Fi密码","remindTitle":"配置Wi-Fi提醒:","remindCont1":"1. 请确保Wi-Fi信号良好","remindCont2":"2. 本产品暂不支持5GHz无线网络","error":{}},"bindUserHelp":{"helpTitle":"配对姓名说明:","helpCont1":"1.在指纹锁上录入指纹、密码、卡并获得相应ID","helpCont2":"2.通过姓名绑定将该ID绑定对应用户姓名","helpCont3":"3.绑定成功后,开门记录中将会显示已绑定的用户姓名","helpCont4":"4.用户姓名信息只保存在APP端,不影响锁端设置","boundUser":"查看已绑定ID姓名"},"bindUser":{"editHeadTip":"点击编辑用户头像","nameTitle":"姓名","fingerprintIDTitle":"指纹ID","passwordIDTitle":"密码ID","ICCardIDTitle":"IC卡ID","requiredInputTip":"(必填)","optionalInputTip":"(选填)","error":{}},"commstatusLoading":{"connectSuccess":"Wi-Fi连接成功,正在绑定...","bindSuccess":"绑定成功","bindFailed":"绑定失败"},"userList":{"name":"昵称:","noUserTip":"暂无用户","defaultName":"管理员","binded":"已绑定","unbind":"未绑定"},"addUser":{"nameInputTip":"请输入您想添加的用户名","addUserSuccess":"添加用户成功","addUserFailure":"添加用户失败","error":{"nameCanNotEmpty":"用户名不能为空"}},"doorlockUser":{"name":"昵称:","inviteBind":"邀请绑定","bindUnlockInfo":"关联开锁信息","opendoorRecord":"历史开门记录","unbindDialogTip":"<span></span>解绑后,该用户不能对门锁下的信息进行查看","deleteUserDialogTip":"删除后,用户对应的开锁id取消关联,同时失去信息查看权限。","unbindSuccess":"解绑成功","unbindFailue":"解绑失败","guideStep1Tip1":"邀请绑定成功","guideStep1Tip2":"(可查看开门记录,报警记录等<br>相关门锁信息)","guideStep3Tip":"绑定后看可了解<br>该用户的开门情况","deleteSuccess":"删除成功","deleteFailure":"删除失败","defaultName":"管理员"},"inviteBind":{"qrcodeExpireTip":"二维码已过期,请重新生成","title":"绑定方法:","cont1":"1.受邀用户登录“U智锁”APP","cont2":"2.选择“扫描绑定设备”","cont3":"3.扫描上方二维码完成绑定"},"unlockInfo":{"bindUnlockInfo":"已关联的开锁信息","noInfoTip":"当前无绑定开锁ID,请添加","passwordOpenDoor":"密码","fingerprintOpenDoor":"指纹","ICcardOpenDoor":"IC卡","remoteOpenDoor":"遥控器","keyOpenDoor":"钥匙","appRemoteOpenDoor":"app远程","hijackingAlarm":"劫持指纹","setHijack":"设为劫持","setHijackTip":"确认设为劫持指纹?","cancelHijack":"取消劫持","cancelHijackTip":"确认取消劫持指纹?","cancelAssociated":"取消关联","cancelAssociatedTip":"取消关联后,开门历史记录中将不再显示关联的用户信息。","cancelAssociatedSuccess":"取消关联成功","cancelAssociatedFailue":"取消关联失败","setHijackSuccess":"设为劫持指纹成功","setHijackFailue":"设为劫持指纹失败","cancelHijackSuccess":"取消劫持指纹成功","cancelHijackFailue":"取消劫持指纹失败"},"addUnlockInfo":{"opendoorMode":"选择要关联的开锁方式","fingerprint":"指纹","password":"密码","icCard":"IC卡","key":"钥匙","remote":"遥控器","hijackFingerprint":"劫持指纹","opendoorRecord":"选择要关联的开锁ID","tip":"仅显示未绑定开门记录","addInfoSuccess":"添加绑定开锁信息成功","addInfoFailue":"添加绑定开锁信息失败","noRecordTip":"暂无记录","setHijackSwitch":"设为劫持指纹","guideStep1Tip":"选择需要添加关联的开门方式","guideStep3Tip":"根据开门记录中的开门时间,选择关联的<br>开门ID<span>(一个ID只能被一个用户绑定)</span>","guideStep5Tip":"使用劫持指纹开门时,会以报警形式<br>通知到该门锁名下的其他绑定用户"},"myInfo":{"editNickname":"修改昵称","editPassword":"修改密码","logoutDialogTip":"确定要退出系统吗?"},"editNickname":{"nickNameInputTip":"请输入昵称"},"editPassword":{"newPasswordInputTip":"请输入新密码","oldPasswordInputTip":"请输入旧密码","oldPasswordInputTipAgain":"请再次输入旧密码"},"request":{"error":"请求发送失败","initError":"初始化失败,请关闭APP重试"},"deviceList":{"model":"型号:","noDeviceTip":"暂无产品型号"}}
\ No newline at end of file \ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.alarmInfo') }}</p> <p>{{ $t('title.alarmInfo') }}</p>
</div> </div>
<u-list ref="ulist" :init-param="componentsConfig.alarmInfoList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list> <u-list ref="ulist" :init-param="componentsConfig.alarmInfoList.initParam" v-on:u-list-load="onListLoad()"></u-list>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
...@@ -1631,4 +1631,154 @@ p { ...@@ -1631,4 +1631,154 @@ p {
.active .u-marquee-text { .active .u-marquee-text {
-webkit-animation: none; -webkit-animation: none;
animation: none; animation: none;
}
.u-notification {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1051;
background-color: rgba(36, 38, 53, 0.9);
}
.u-notification .u-notification-box {
width: 8.933rem;
height: 8rem;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
background-color: #242635;
color: #00ffff;
border: 1px solid;
border-radius: 0.133rem;
}
.u-notification .u-notification-box .u-notification-title {
position: relative;
padding-top: 0.267rem;
font-size: 0.427rem;
text-align: center;
}
.u-notification .u-notification-box .u-notification-close {
position: absolute;
top: 0;
right: 0;
width: 1.067rem;
height: 100%;
padding-top: 0.267rem;
font-family: iconfont;
font-size: 0.667rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
}
.u-notification .u-notification-box .u-notification-content {
width: 100%;
height: 3.92rem;
background: url("../../resources/image/noticeContBg.png") no-repeat center;
-webkit-background-size: auto 100%;
background-size: auto 100%;
padding-top: 1.627rem;
}
.u-notification .u-notification-box .u-notification-switch {
width: 4rem;
margin: 0.4rem auto;
padding: 0.267rem 0;
text-align: center;
font-size: 0.32rem;
}
.u-notification .u-notification-box .u-notification-switch .u-notification-switch-handle {
display: inline-block;
vertical-align: middle;
position: relative;
margin-right: 0.267rem;
width: 0.453rem;
height: 0.453rem;
}
.u-notification .u-notification-box .u-notification-switch .u-notification-switch-handle:before {
position: absolute;
top: 0;
left: 0;
font-family: iconfont;
font-size: 0.453rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
}
.u-notification .u-notification-box .u-notification-switch.u-notification-switch-on .u-notification-switch-handle:before {
content: '\e6aa';
}
.u-notification .u-notification-box .u-notification-switch.u-notification-switch-off .u-notification-switch-handle:before {
content: '\e6a9';
}
.u-notification .u-notification-box .u-notification-button li {
width: 6.267rem;
border-radius: 0.133rem;
background-color: transparent;
border: 1px solid;
color: #00ffff;
font-size: 0.427rem;
line-height: 1;
margin: 0 auto;
text-align: center;
padding: 0.267rem 0;
}
.u-notification .u-notification-box .u-notification-button li:active {
background-color: #153D4C;
}
.u-notification .u-notification-box .u-notification-button li.disabled {
background-color: transparent;
color: #999;
}
.u-notification .u-notification-box .clearfix {
overflow: hidden;
padding: 0 1.44rem;
}
.u-notification .u-notification-box .leftCont {
float: left;
}
.u-notification .u-notification-box .rightCont {
float: right;
}
.u-notification .u-notification-box .logo {
width: 0.4rem;
height: 0.4rem;
background: url("../../resources/image/logo1.png") no-repeat center;
-webkit-background-size: cover;
background-size: cover;
display: inline-block;
vertical-align: middle;
margin: 0 -0.213rem 0 0.213rem;
}
.u-notification .u-notification-box .smallFont {
color: #00b2b2;
font-size: 0.427rem;
-webkit-transform: scale(0.5);
transform: scale(0.5);
display: inline-block;
vertical-align: middle;
}
.u-notification .u-notification-box .tip {
text-align: center;
font-size: 0.32rem;
margin-top: 0.24rem;
line-height: 0.427rem;
} }
\ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.hijackRecord') }}</p> <p>{{ $t('title.hijackRecord') }}</p>
</div> </div>
<u-list ref="ulist" :init-param="componentsConfig.hijackRecordList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list> <u-list ref="ulist" :init-param="componentsConfig.hijackRecordList.initParam" v-on:u-list-load="onListLoad()"></u-list>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="header"> <div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onMyInfoTap">&#xe69b;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onMyInfoTap">&#xe6bf;</v-touch>
<p>{{ $t('title.device') }}</p> <p>{{ $t('title.device') }}</p>
</div> </div>
<div class="content"> <div class="content">
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.opendoorRecord') }}</p> <p>{{ $t('title.opendoorRecord') }}</p>
</div> </div>
<u-list ref="ulist" :init-param="componentsConfig.opendoorRecordList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list> <u-list ref="ulist" :init-param="componentsConfig.opendoorRecordList.initParam" v-on:u-list-load="onListLoad()"></u-list>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
...@@ -577,6 +577,17 @@ p { ...@@ -577,6 +577,17 @@ p {
line-height: 0.933rem; line-height: 0.933rem;
} }
.custom-list .u-list-load .u-list-load-animation {
width: 0.64rem;
height: 0.64rem;
display: inline-block;
background-image: url("../../resources/image/loading.png");
-webkit-animation: refresh 1s steps(8, end) infinite;
animation: refresh 1s steps(8, end) infinite;
background-size: cover;
vertical-align: middle;
}
.custom-list .u-list-tip { .custom-list .u-list-tip {
background-image: url("../../resources/image/noCont.png"); background-image: url("../../resources/image/noCont.png");
background-position: top center; background-position: top center;
...@@ -586,4 +597,28 @@ p { ...@@ -586,4 +597,28 @@ p {
color: #91929a; color: #91929a;
font-size: 0.427rem; font-size: 0.427rem;
padding-top: 2.347rem; padding-top: 2.347rem;
}
@-webkit-keyframes refresh {
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 refresh {
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);
}
} }
\ No newline at end of file
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
</div> </div>
<div class="user-list"> <div class="user-list">
<ul class="user-list-scroll" v-show="userList.length"> <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-touch tag="li" class="user-list-row" v-for="(item, index) in userList" :key="index" >
<v-touch tag="div" class="user-list-handle" <v-touch tag="div" class="user-list-handle"
v-on:tap="onTapUserList(index)"> v-on:tap="onTapUserList(index)">
<img class="user-list-image" v-if="item.image && item.role == 0" v-bind:src="item.image"> <img class="user-list-image" v-if="item.image && item.role == 0" v-bind:src="item.image">
<div> <div>
<p class="user-list-title">{{ item.title == (null || '')? $t('userList.defaultName'):item.title}}</p> <p class="user-list-title" v-bind:class="{'currentUser': userListData[index].user_id == currentId }" >{{ item.title == (null || '')? $t('userList.defaultName'):item.title}}</p>
<p class="user-list-subtitle"> <p class="user-list-subtitle">
<img class="user-list-subimage" v-if="item.image && item.role != 0" v-bind:src="item.image"> <img class="user-list-subimage" v-if="item.image && item.role != 0" v-bind:src="item.image">
<span v-if="item.subtitle">{{ item.subtitle }}</span> <span v-if="item.subtitle">{{ item.subtitle }}</span>
......
...@@ -806,4 +806,8 @@ p { ...@@ -806,4 +806,8 @@ p {
.custom-button { .custom-button {
bottom: 1.2rem; bottom: 1.2rem;
} }
}
.currentUser {
color: #00ffff;
} }
\ No newline at end of file
...@@ -488,4 +488,55 @@ p { ...@@ -488,4 +488,55 @@ p {
font-size: 0.427rem; font-size: 0.427rem;
margin-top: 0.747rem; margin-top: 0.747rem;
margin-bottom: 0.533rem; margin-bottom: 0.533rem;
}
.u-button {
width: 6.4rem;
color: #fff;
font-size: inherit;
background-color: #007aff;
border-radius: 0.533rem;
text-align: center;
line-height: 1;
margin: 0 auto;
padding: 0.267rem 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
background-clip: padding-box;
}
.u-button:active {
background-color: #0065ff;
}
.u-button.disabled {
background-color: #bbb;
}
.custom-button {
width: 7.333rem;
border-radius: 0.133rem;
background-color: transparent;
border: 1px solid;
color: #00ffff;
font-size: 0.427rem;
position: absolute;
bottom: 1.733rem;
left: 0;
right: 0;
}
.custom-button:active {
background-color: #153D4C;
}
.custom-button.disabled {
background-color: transparent;
color: #999;
}
@media (min-width: 360px /*no*/) and (max-height: 570px /*no*/) {
.custom-button {
bottom: 1.2rem;
}
} }
\ No newline at end of file
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