Commit b1348d9c by 朱建香

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

# Conflicts:
#	History.md
#	web/lib/less/addDevice/addDevice.less
#	web/lib/less/bindUser/bindUser.less
#	web/lib/less/device/device.less
#	web/lib/less/doorlockManage/doorlockManage.less
#	web/lib/less/public/core.less
#	web/lib/less/public/public.less
#	web/lib/less/public/variables.less
#	web/resources/lang/zh.json
#	web/view/addDevice/addDevice.css
#	web/view/bindUser/bindUser.css
#	web/view/doorlockManage/doorlockManage.css
parents 89f60d04 ab1de6fe
{ {
"loading": "请耐心等待...", "loading": "loading...",
"scroll": { "scroll": {
"clickToLoadMore": "点击加载更多", "clickToLoadMore": "点击加载更多",
"loading": "loading..." "loading": "loading..."
......
...@@ -107,7 +107,7 @@ function initComponentsConfig() { ...@@ -107,7 +107,7 @@ function initComponentsConfig() {
}, },
ucommstatusloading: { ucommstatusloading: {
initParam: { initParam: {
class: '', class: 'custom-commstatus-loading',
buttonText: Vue.t('btn.confirm') buttonText: Vue.t('btn.confirm')
} }
} }
......
...@@ -69,12 +69,12 @@ ...@@ -69,12 +69,12 @@
initParam: { initParam: {
class: 'custom-swipe-list', class: 'custom-swipe-list',
list: [ list: [
{value: 1, image: '../../resources/image/white_head_icon.png', title: '姓名:迷失者', subtitle: subtitle, buttons: [{"text": "删除"}]}, {value: 1, image: '../../resources/image/white_head_icon.png', title: '姓名:迷失者', subtitle: subtitle, buttons: [{"text": ""}]},
{value: 2, image: '../../resources/image/white_head_icon.png', title: '姓名:漫步者', subtitle: subtitle, buttons: [{"text": "删除"}],}, {value: 2, image: '../../resources/image/white_head_icon.png', title: '姓名:漫步者', subtitle: subtitle, buttons: [{"text": ""}],},
{value: 3, image: '../../resources/image/white_head_icon.png', title: '姓名:太空旅行者', subtitle: subtitle, buttons: [{"text": "删除"}],}, {value: 3, image: '../../resources/image/white_head_icon.png', title: '姓名:太空旅行者', subtitle: subtitle, buttons: [{"text": ""}],},
{value: 4, image: '../../resources/image/white_head_icon.png', title: '姓名:探索迷失者', subtitle: subtitle, buttons: [{"text": "删除"}],}, {value: 4, image: '../../resources/image/white_head_icon.png', title: '姓名:探索迷失者', subtitle: subtitle, buttons: [{"text": ""}],},
{value: 5, image: '../../resources/image/white_head_icon.png', title: '姓名:麻麻272', subtitle: subtitle, buttons: [{"text": "删除"}],}, {value: 5, image: '../../resources/image/white_head_icon.png', title: '姓名:麻麻272', subtitle: subtitle, buttons: [{"text": ""}],},
{value: 6, image: '../../resources/image/white_head_icon.png', title: '姓名:代号小黄人', subtitle: subtitle, buttons: [{"text": "删除"}],} {value: 6, image: '../../resources/image/white_head_icon.png', title: '姓名:代号小黄人', subtitle: subtitle, buttons: [{"text": ""}],}
], ],
tip: Vue.t('userList.noUserTip') tip: Vue.t('userList.noUserTip')
} }
......
...@@ -12,17 +12,34 @@ import {iot, uPublic, uComponents} from '../../public/public.js'; ...@@ -12,17 +12,34 @@ import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init); iot.ready(init);
function init() { function init() {
//通用 input、按钮、dialog、loading组件 //通用 input、按钮、dialog、loading组件
uPublic.componentsInit(['u-text','u-button','u-dialog','u-loading']); uPublic.componentsInit(['u-text','u-button','u-commstatus-loading','u-dialog','u-loading']);
const app = new Vue({ const app = new Vue({
data:{ data:{
textPassword: null, textPassword: null,
textErrorTip: null, textErrorTip: null,
textLoading: 'loading...',
status: 0,
//配置组件 //配置组件
componentsConfig: initComponentsConfig() componentsConfig: initComponentsConfig()
}, },
mounted(){ mounted(){
}, },
methods:{ methods:{
getTextLoading(){
return this.textLoading;
},
setTextLoading(text){
this.textLoading = text;
},
getStatus(){
return this.status;
},
setStatus(value){
this.status = value;
},
onPasswordChange(text){
passwordChange(this,text);
},
onPasswordChange(text){ onPasswordChange(text){
passwordChange(this,text); passwordChange(this,text);
}, },
...@@ -32,7 +49,11 @@ function init() { ...@@ -32,7 +49,11 @@ function init() {
}, },
//tap 确定 //tap 确定
onConfirmButtonTap(){ onConfirmButtonTap(){
confirmButtonTap(); confirmButtonTap(this);
},
//tap loading button
onCommstatusLoadingButtonTap(){
commstatusLoadingButtonTap(this);
} }
} }
}).$mount('#app'); }).$mount('#app');
...@@ -64,7 +85,13 @@ function initComponentsConfig() { ...@@ -64,7 +85,13 @@ function initComponentsConfig() {
initParam: { initParam: {
class: 'custom-loading' class: 'custom-loading'
} }
} },
ucommstatusloading: {
initParam: {
class: 'custom-commstatus-loading',
buttonText: Vue.t('btn.confirm')
}
}
} }
} }
...@@ -79,6 +106,27 @@ function backTap(){ ...@@ -79,6 +106,27 @@ function backTap(){
} }
//tap 确定 //tap 确定
function confirmButtonTap(){ 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);
iot.navigator.back(); iot.navigator.back();
//绑定失败
//uComponents.hideCommstatusloading(self);
} }
\ 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