Commit d31ac793 by 朱建香

1012

parent 3d49faac
...@@ -7,8 +7,6 @@ web/lib/dist ...@@ -7,8 +7,6 @@ web/lib/dist
web/view/*.map web/view/*.map
web/view/*.js
web/view/*/*.map web/view/*/*.map
web/view/*/*.js
webpackJsonp([26],{
/***/ 136:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_index.js
* Version: 0.1
* User: wy
* Date: 2017-09-07
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 添加设备页面
*/
function init() {
//通用 dialog、loading组件
_public.uPublic.componentsInit(['u-dialog', 'u-loading']);
var app = new Vue({
data: {
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
//tap <
onBackTap: function onBackTap() {
backTap();
},
//tap 扫描绑定设备
onScanAddTap: function onScanAddTap() {
scanAddTap();
},
//tap 配置Wi-Fi
onWifiAddTap: function onWifiAddTap() {
wifiAddTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
//tap 扫描绑定设备
function scanAddTap() {
_public.iot.navigator.openWindow({
url: './scanCodeAdd.html',
id: 'scanCodeAdd'
});
}
//tap 配置Wi-Fi
function wifiAddTap() {
_public.iot.navigator.openWindow({
url: './wifiAddHelp.html',
id: 'wifiAddHelp'
});
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 252:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(136);
/***/ })
},[252]);
//# sourceMappingURL=index.js.map
\ No newline at end of file
webpackJsonp([25],{
/***/ 137:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_scanCodeAdd.js
* Version: 0.1
* User: wy
* Date: 2017-09-07
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 扫描绑定设备页面
*/
function init() {
//通用 dialog、loading组件
_public.uPublic.componentsInit(['u-dialog', 'u-loading']);
var app = new Vue({
data: {
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {
openScanCode(this);
},
methods: {
//tap <
onBackTap: function onBackTap() {
backTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
function openScanCode(self) {
_public.iot.utils.scanBarcode({
data: {
id: 'bcid',
styles: {
frameColor: '#00ffff',
scanbarColor: '#00ffff',
background: '#242b35'
}
},
success: function success(response) {
var data = _public.uPublic.checkResponseData(response.data);
if (data) {
//扫描成功
var qrKey = data.result;
//绑定设备
_public.iot.business.sds.scanqr({
data: {
qrKey: qrKey
},
success: function success(response) {
var data = _public.uPublic.checkResponseData(response.data);
if (data) {
console.log(response);
_public.uComponents.openAlert(self, Vue.t('addDevice.bindSuccess'), {
text: Vue.t('btn.confirm'), callback: function callback() {
_public.iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
}
});
} else {}
},
error: function error(_error) {
//请求失败
_public.uPublic.openRequestErrorAlert(self);
}
});
} else {}
},
error: function error(_error2) {
console.log(_error2);
//请求失败
_public.uPublic.openRequestErrorAlert(self);
}
});
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 253:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(137);
/***/ })
},[253]);
//# sourceMappingURL=scanCodeAdd.js.map
\ No newline at end of file
webpackJsonp([23],{
/***/ 139:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_wifiAddHelp.js
* Version: 0.1
* User: wy
* Date: 2017-09-07
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 配置Wi-Fi页面
*/
function init() {
//通用 按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-button', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
//tap <
onBackTap: function onBackTap() {
backTap();
},
//tap 开始配置Wi-Fi
onWifiAddButtonTap: function onWifiAddButtonTap() {
wifiAddButtonTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
//开始配置Wi-Fi button 参数
wifiAddButton: {
initParam: {
class: 'custom-help-button',
text: Vue.t('btn.wifiAdd')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
//tap 开始配置Wi-Fi
function wifiAddButtonTap() {
_public.iot.navigator.openWindow({
url: './wifiAdd.html',
id: 'wifiAdd'
});
console.log("in");
// iot.business.sds.wifiDeviceConfig({
// success: function (response) {
// console.log('wifiDeviceConfig success');
// console.log(response);
// },
// error: function (error) {
// console.log('wifiDeviceConfig error');
// console.log(error);
// }
// });
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 255:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(139);
/***/ })
},[255]);
//# sourceMappingURL=wifiAddHelp.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([22],{
/***/ 145:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /**
* v_remoteOpendoor.js
* Version: 0.1
* User: wy
* Date: 2017-09-06
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 远程开门页面
*/
_public.iot.ready(init);
function init() {
var _methods;
//通用 input、按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-text', 'u-button', 'u-commstatus-loading', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
textPassword: null,
textErrorTip: null,
textLoading: 'loading...',
status: 0,
//配置组件
componentsConfig: initComponentsConfig(),
//设备uuid
uuid: null
},
mounted: function mounted() {
resolve(this);
},
methods: (_methods = {
getTextPassword: function getTextPassword() {
return this.textPassword;
},
setTextPassword: function setTextPassword(pwd) {
this.textPassword = pwd;
},
setTextErrorTip: function setTextErrorTip(tip) {
this.textErrorTip = tip;
},
getTextLoading: function getTextLoading() {
return this.textLoading;
},
setTextLoading: function setTextLoading(text) {
this.textLoading = text;
},
getStatus: function getStatus() {
return this.status;
},
setStatus: function setStatus(value) {
this.status = value;
},
onPasswordChange: function onPasswordChange(text) {
passwordChange(this, text);
}
}, _defineProperty(_methods, 'onPasswordChange', function onPasswordChange(text) {
passwordChange(this, text);
}), _defineProperty(_methods, 'getUuid', function getUuid() {
return this.uuid;
}), _defineProperty(_methods, 'setUuid', function setUuid(id) {
this.uuid = id;
}), _defineProperty(_methods, 'onBackTap', function onBackTap() {
backTap();
}), _defineProperty(_methods, 'onConfirmButtonTap', function onConfirmButtonTap() {
confirmButtonTap(this);
}), _methods)
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
passwordInput: {
initParam: {
class: 'custom-text',
icon: '&#xe64d;',
placeholder: Vue.t('remoteOpendoor.passwordInputTip')
}
},
//确定 button 参数
confirmButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.confirm')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
},
ucommstatusloading: {
initParam: {
class: 'custom-commstatus-loading',
buttonText: Vue.t('btn.confirm')
}
}
};
}
function resolve(self) {
var extras = _public.iot.navigator.getExtras();
self.setUuid(extras.uuid);
console.log(self.getUuid());
}
function passwordChange(self, text) {
self.setTextPassword(text);
self.setTextErrorTip('');
console.log('passwordChange: ' + self.textPassword);
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
//tap 确定
function confirmButtonTap(self) {
console.log(self.getTextPassword());
if (self.getTextPassword() == null || self.getTextPassword().trim() == '') {
self.setTextErrorTip(Vue.t('remoteOpendoor.error.noPasswordTip'));
} else {
_public.uComponents.showLoading(self);
_public.iot.business.sds.setDeviceStatus({
data: {
uuid: self.getUuid(),
setParams: {
'lock_action': {
'value': '0'
// 'remote_open_door': {
// 'value': self.getTextPassword()
// }
} }
},
success: function success(response) {
console.log(response);
_public.uComponents.openAlert(self, Vue.t('remoteOpendoor.openDoorSuccess'), {
text: Vue.t('dialog.confirm'), callback: function callback() {
//返回首页
_public.iot.navigator.back();
}
});
},
error: function error(_error) {
console.log(_error);
_public.uComponents.openAlert(self, Vue.t('remoteOpendoor.openDoorFailure'), {
text: Vue.t('dialog.confirm'), callback: function callback() {}
});
},
complete: function complete() {
_public.uComponents.hideLoading(self);
}
});
}
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 261:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(145);
/***/ })
},[261]);
//# sourceMappingURL=remoteOpendoor.js.map
\ No newline at end of file
webpackJsonp([21],{
/***/ 146:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_editName.js
* Version: 0.1
* User: wy
* Date: 2017-09-06
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 修改名称页面
*/
function init() {
//通用 input、按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-text', 'u-button', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
textName: _public.iot.navigator.getExtras().nickname,
textErrorTip: null,
//配置组件
componentsConfig: initComponentsConfig(),
extras: {}
},
mounted: function mounted() {
this.extras = _public.iot.navigator.getExtras();
console.log(this.extras);
},
methods: {
getTextName: function getTextName() {
return this.textName;
},
setTextName: function setTextName(text) {
this.textName = text;
},
setTextErrorTip: function setTextErrorTip(text) {
this.textErrorTip = text;
},
onNameChange: function onNameChange(text) {
nameChange(this, text);
},
//tap <
onBackTap: function onBackTap() {
backTap();
},
//tap 保存
onSaveTap: function onSaveTap() {
saveTap(this);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
nameInput: {
initParam: {
class: 'custom-editName-text',
placeholder: Vue.t('editName.nameInputTip')
}
},
//保存 button 参数
saveButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.save')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
function alert() {
alert('aaa');
}
function nameChange(self, text) {
self.setTextName(text);
self.setTextErrorTip('');
console.log('nameChange: ' + self.textName);
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
//tap 保存
function saveTap(self) {
if (self.getTextName() == null || self.getTextName().trim() == '') {
self.setTextErrorTip(Vue.t('editName.error.nameCanNotBeBlank'));
} else {
_public.uComponents.showLoading(self);
_public.iot.business.device.setNickname({
data: {
device_id: self.extras.deviceId,
nickname: self.getTextName()
},
success: function success(response) {
console.log(response);
var data = _public.uPublic.checkResponseData(response.data);
if (data) {
_public.uComponents.openAlert(self, Vue.t('editName.editNameSuccess'), {
text: Vue.t('btn.confirm'), callback: function callback() {
var opener = plus.webview.currentWebview().opener();
var view = plus.webview.getWebviewById(opener.id);
console.log(view);
_public.iot.navigator.fire(plus.webview.currentWebview().opener(), 'returnPage', {});
console.log('returnPage');
_public.iot.navigator.back();
}
});
}
},
error: function error(_error) {
console.log(_error);
_public.uComponents.hideLoading(self);
_public.uComponents.openAlert(self, Vue.t('editName.editNameFailue'), {
text: Vue.t('btn.confirm'), callback: function callback() {
var opener = plus.webview.currentWebview().opener();
_public.iot.navigator.back();
}
});
},
complete: function complete() {
_public.uComponents.hideLoading(self);
}
});
}
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 262:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(146);
/***/ })
},[262]);
//# sourceMappingURL=editName.js.map
\ No newline at end of file
webpackJsonp([6],{
/***/ 147:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
var _components = __webpack_require__(201);
/**
* v_index.js
* Version: 0.1
* User: wy
* Date: 2017-09-06
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 门锁管理页面
*/
_public.iot.ready(init);
function init() {
//通用 按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-button', 'u-dialog', 'u-loading']);
//项目 list组件
_public.uPublic.componentsExtend(['grid-list']);
var app = new Vue({
data: {
//配置组件
componentsConfig: initComponentsConfig(),
//提示框是否显示
stateShowFlag: false,
//我的门锁
doorlock: null,
//提示框显示文字
showMsg: '',
textNickname: null,
extras: {},
unbindSucceess: false
},
mounted: function mounted() {
this.extras = _public.iot.navigator.getExtras();
console.log(this.extras);
//获取门锁
getDoorlockInfo(this);
//监听returnPage返回事件,重新获取最新数据
var self = this;
window.addEventListener('returnPage', function (event) {
console.log("returnPage");
getDoorlockInfo(self);
});
},
methods: {
getStateShowFlag: function getStateShowFlag() {
return this.stateShowFlag;
},
setStateShowFlag: function setStateShowFlag(flag) {
this.stateShowFlag = flag;
},
getDoorlock: function getDoorlock() {
return this.doorlock;
},
setDoorlock: function setDoorlock(obj) {
this.doorlock = obj;
},
getShowMsg: function getShowMsg() {
return this.showMsg;
},
setShowMsg: function setShowMsg(msg) {
this.showMsg = msg;
},
getTextNickname: function getTextNickname() {
return this.textNickname;
},
setTextNickname: function setTextNickname(text) {
this.textNickname = text;
},
getUnbindSucceess: function getUnbindSucceess() {
return this.unbindSucceess;
},
setUnbindSucceess: function setUnbindSucceess(bool) {
this.unbindSucceess = bool;
},
//tap <
onBackTap: function onBackTap() {
backTap();
},
//tap 修改设备昵称
onEditNameTap: function onEditNameTap() {
editNameTap(this);
},
//tap 解绑门锁
onUnbindDoorlockButtonTap: function onUnbindDoorlockButtonTap() {
unbindDoorlockButtonTap(this);
},
//tap 隐藏提示框
onUnbindStateDialogTap: function onUnbindStateDialogTap() {
unbindStateDialogTap(this);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
unbindDoorlockButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.unbindDoorlock')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
function getDoorlockInfo(self) {
_public.uComponents.showLoading(self);
_public.iot.business.api.send('device/getList', {
data: {
sds: false,
device_id: self.extras.deviceId,
product_id: 2,
parent_id: 0,
start_id: 0,
number: 10
},
success: function success(response) {
console.log(response);
var data = _public.uPublic.checkResponseData(response.data);
if (data) {
self.setDoorlock(response.data[0]);
self.setTextNickname(self.getDoorlock().nickname);
console.log(self.getDoorlock());
}
},
error: function error(_error) {
//请求失败
_public.uPublic.openRequestErrorAlert(self);
console.log(_error);
},
complete: function complete() {
_public.uComponents.hideLoading(self);
}
}, true);
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
//tap 修改设备昵称
function editNameTap(self) {
_public.iot.navigator.openWindow({
url: './editName.html',
id: 'editName',
extras: {
deviceId: self.getDoorlock().id,
nickname: self.getTextNickname()
}
});
}
//tap 解绑门锁
function unbindDoorlockButtonTap(self) {
_public.uComponents.openConfirm(self, Vue.t('doorlockUser.unbindDialogTip'), { text: Vue.t('dialog.cancel'), callback: function callback() {} }, { text: Vue.t('dialog.unbind'), callback: function callback() {
// uComponents.showLoading(self);
// //云端解绑
// iot.business.device.unbind({
// data: {
// device_id: self.getDoorlock().id
// },
// success: (response) => {
// console.log(response);
_public.iot.business.device.unbind({
data: {
sds: true,
uuid: self.extras.uuid,
device_id: self.getDoorlock().id
},
success: function success(response) {
console.log(response);
self.setStateShowFlag(true);
self.setShowMsg(Vue.t('doorlockUser.unbindSuccess'));
self.setUnbindSucceess(true);
},
error: function error(_error2) {
console.log(_error2);
self.setStateShowFlag(false);
self.setShowMsg(Vue.t('doorlockUser.unbindFailue'));
self.setUnbindSucceess(false);
},
complete: function complete() {
_public.uComponents.hideLoading(self);
}
});
// },
// error: (error) => {
// console.log(error);
// self.setStateShowFlag(true);
// self.setShowMsg(Vue.t('doorlockUser.unbindFailue'));
// self.setUnbindSucceess(false);
// },
// complete: () => {
// uComponents.hideLoading(self);
// }
// });
} });
}
//tap 隐藏提示框
function unbindStateDialogTap(self) {
self.setStateShowFlag(false);
if (self.getUnbindSucceess) {
_public.iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
}
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 201:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var projectMethods = {};
projectMethods.changeGridList = function (vmObj, list) {
vmObj.$refs.gridlist.changeList(list);
};
projectMethods.changeTimeline = function (vmObj, list) {
vmObj.$refs.timeline.changeList(list);
};
exports.projectMethods = projectMethods;
/***/ }),
/***/ 263:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(147);
/***/ })
},[263]);
//# sourceMappingURL=index.js.map
\ No newline at end of file
webpackJsonp([20],{
/***/ 149:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_addUnlockInfo.js
* Version: 0.1
* User: wy
* Date: 2017-10-09
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 绑定开锁信息页面
*/
function init() {
//通用 select、按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-select', 'u-button', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
recordSelectIndex: 0,
recordSelectList: [],
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
//tap <
onBackTap: function onBackTap() {
backTap();
},
onRecordSelectChange: function onRecordSelectChange(value) {
recordSelectChange(this, value);
},
//tap 添加
onAddButtonTap: function onAddButtonTap() {
addButtonTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
recordSelect: {
initParam: {
class: 'custom-select',
list: [{ value: 1, title: '16:35', subtitle: 'ID:001' }, { value: 2, title: '15:33', subtitle: 'ID:002' }, { value: 3, title: '15:06', subtitle: 'ID:007' }],
pagesize: Number.MAX_VALUE
}
},
//添加 button 参数
addButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.add')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
function recordSelectChange(self, value) {
self.recordSelectIndex = value;
console.log('recordSelectChange:' + self.recordSelectIndex);
}
//tap 添加
function addButtonTap() {
_public.iot.navigator.back();
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 265:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(149);
/***/ })
},[265]);
//# sourceMappingURL=addUnlockInfo.js.map
\ No newline at end of file
webpackJsonp([19],{
/***/ 150:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_addUser.js
* Version: 0.1
* User: wy
* Date: 2017-10-09
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 添加用户页面
*/
function init() {
//通用 input、按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-text', 'u-button', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
textName: null,
textErrorTip: null,
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
getTextName: function getTextName() {
return this.textName;
},
setTextName: function setTextName(text) {
this.textName = text;
},
getTextErrorTip: function getTextErrorTip() {
return this.textErrorTip;
},
setTextErrorTip: function setTextErrorTip(tip) {
this.textErrorTip = tip;
},
//tap <
onBackTap: function onBackTap() {
backTap();
},
onNameChange: function onNameChange(text) {
nameChange(this, text);
},
//tap 确定
onConfirmButtonTap: function onConfirmButtonTap() {
confirmButtonTap(this);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
nameInput: {
initParam: {
class: 'custom-text',
icon: '&#xe6b0;',
placeholder: Vue.t('addUser.nameInputTip')
}
},
//确定 button 参数
confirmButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.confirm')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
function nameChange(self, text) {
self.textName = text;
self.setTextErrorTip(null);
console.log('nameChange: ' + self.textName);
}
//tap 确定
function confirmButtonTap(self) {
if (self.getTextName() == null || self.getTextName().trim() == '') {
self.setTextErrorTip(Vue.t('addUser.error.nameCanNotEmpty'));
} else {
_public.uComponents.showLoading(self);
_public.iot.business.api.sendCustom('lock/addUser', {
data: {
device_id: self.extras.deviceId
},
success: function success(response) {
console.log(response);
_public.uComponents.openAlert(self, Vue.t('addUser.addUserSuccess'), {
text: Vue.t('btn.confirm'), callback: function callback() {
console.log("添加用户成功");
_public.iot.storage.getMap('isFirstAdd', function (res) {
if (res) {
//跳转到门锁用户界面
_public.iot.navigator.openWindow({
url: './doorlockUser.html',
id: 'doorlockUser'
});
} else {}
}, function () {});
}
});
},
error: function error(_error) {
console.log(_error);
_public.uComponents.openAlert(self, Vue.t('addUser.addUserFailure'), {
text: Vue.t('btn.confirm'), callback: function callback() {
console.log("添加用户失败");
}
});
},
complete: function complete() {
_public.uComponents.hideLoading(self);
}
});
}
}
function showGuide() {}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 266:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(150);
/***/ })
},[266]);
//# sourceMappingURL=addUser.js.map
\ No newline at end of file
webpackJsonp([18],{
/***/ 151:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_doorlockUsers.js
* Version: 0.1
* User: wy
* Date: 2017-10-09
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 门锁用户页面
*/
function init() {
//通用 按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-button', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
userInfo: {
image: '../../resources/image/gray_unbindHead_icon.png',
role: 1,
title: '我是个用户二号',
subtitle: ''
},
bindShowFlag: true,
unbindShowFlag: false,
stateShowFlag: false,
guideShowFlag: false,
guideStep1ShowFlag: false,
guideStep2ShowFlag: false,
guideStep3ShowFlag: false,
guideStep4ShowFlag: false,
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
getBindShowFlag: function getBindShowFlag() {
return this.bindShowFlag;
},
setBindShowFlag: function setBindShowFlag(boolean) {
this.bindShowFlag = boolean;
},
getUnbindShowFlag: function getUnbindShowFlag() {
return this.unbindShowFlag;
},
setUnbindShowFlag: function setUnbindShowFlag(boolean) {
this.unbindShowFlag = boolean;
},
getStateShowFlag: function getStateShowFlag() {
return this.stateShowFlag;
},
setStateShowFlag: function setStateShowFlag(boolean) {
this.stateShowFlag = boolean;
},
getGuideShowFlag: function getGuideShowFlag() {
return this.guideShowFlag;
},
setGuideShowFlag: function setGuideShowFlag(boolean) {
this.guideShowFlag = boolean;
},
getGuideStep1ShowFlag: function getGuideStep1ShowFlag() {
return this.guideStep1ShowFlag;
},
setGuideStep1ShowFlag: function setGuideStep1ShowFlag(boolean) {
this.guideStep1ShowFlag = boolean;
},
getGuideStep2ShowFlag: function getGuideStep2ShowFlag() {
return this.guideStep2ShowFlag;
},
setGuideStep2ShowFlag: function setGuideStep2ShowFlag(boolean) {
this.guideStep2ShowFlag = boolean;
},
getGuideStep3ShowFlag: function getGuideStep3ShowFlag() {
return this.guideStep3ShowFlag;
},
setGuideStep3ShowFlag: function setGuideStep3ShowFlag(boolean) {
this.guideStep3ShowFlag = boolean;
},
getGuideStep4ShowFlag: function getGuideStep4ShowFlag() {
return this.guideStep4ShowFlag;
},
setGuideStep4ShowFlag: function setGuideStep4ShowFlag(boolean) {
this.guideStep4ShowFlag = boolean;
},
//tap <
onBackTap: function onBackTap() {
backTap();
},
onEditNameTap: function onEditNameTap() {
editNameTap();
},
//tap 邀请绑定
onBindTap: function onBindTap() {
bindTap();
},
//tap 解绑
onUnbindButtonTap: function onUnbindButtonTap() {
unbindButtonTap(this);
},
//tap 绑定开锁信息
onBindUnlockInfoTap: function onBindUnlockInfoTap() {
bindUnlockInfoTap();
},
//tap 历史开门记录
onOpendoorRecordTap: function onOpendoorRecordTap() {
opendoorRecordTap();
},
//tap 删除该用户
onDeleteUserButtonTap: function onDeleteUserButtonTap() {
deleteUserButtonTap(this);
},
onUnbindStateDialogTap: function onUnbindStateDialogTap() {
unbindStateDialogTap(this);
},
//tap 下一步
onNextButtonTap: function onNextButtonTap() {
nextButtonTap(this);
},
//tap 我知道了
onISeeButtonTap: function onISeeButtonTap() {
iSeeButtonTap(this);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
//解绑 button 参数
unbindButton: {
initParam: {
class: 'custom-unbind-button',
text: Vue.t('btn.unbind')
}
},
//删除该用户 button 参数
deleteUserButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.deleteUser')
}
},
//下一步 button 参数
nextButton: {
initParam: {
class: 'custom-dialog-button',
text: Vue.t('btn.next')
}
},
//我知道了 button 参数
iSeeButton: {
initParam: {
class: 'custom-dialog-button',
text: Vue.t('btn.iSee')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
function editNameTap() {
_public.iot.navigator.openWindow({
url: './editName.html',
id: 'editName'
});
}
//tap 邀请绑定
function bindTap() {
_public.iot.navigator.openWindow({
url: './inviteBind.html',
id: 'inviteBind'
});
}
//tap 解绑
function unbindButtonTap(self) {
_public.uComponents.openConfirm(self, Vue.t('doorlockUsers.unbindDialogTip'), { text: Vue.t('dialog.cancel'), callback: function callback() {} }, { text: Vue.t('dialog.unbind'), callback: function callback() {
self.setStateShowFlag(true);
} });
}
function unbindStateDialogTap(self) {
self.setStateShowFlag(false);
self.setBindShowFlag(true);
self.setUnbindShowFlag(false);
}
//tap 绑定开锁信息
function bindUnlockInfoTap() {
_public.iot.navigator.openWindow({
url: './unlockInfo.html',
id: 'unlockInfo'
});
}
//tap 历史开门记录
function opendoorRecordTap() {
_public.iot.navigator.openWindow({
url: '../device/opendoorRecord.html',
id: 'opendoorRecord'
});
}
//tap 删除该用户
function deleteUserButtonTap(self) {
_public.uComponents.openConfirm(self, Vue.t('doorlockUsers.deleteUserDialogTip'), { text: Vue.t('dialog.cancel'), callback: function callback() {} }, { text: Vue.t('dialog.delete'), callback: function callback() {} });
}
//tap 下一步
function nextButtonTap(self) {
self.setGuideStep1ShowFlag(false);
self.setGuideStep2ShowFlag(false);
self.setGuideStep3ShowFlag(true);
self.setGuideStep4ShowFlag(true);
}
//tap 我知道了
function iSeeButtonTap(self) {
self.setGuideShowFlag(false);
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 267:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(151);
/***/ })
},[267]);
//# sourceMappingURL=doorlockUser.js.map
\ No newline at end of file
webpackJsonp([17],{
/***/ 152:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_editName.js
* Version: 0.1
* User: wy
* Date: 2017-10-09
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 修改名称页面
*/
function init() {
//通用 input、dialog、loading组件
_public.uPublic.componentsInit(['u-text', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
textName: '我是个用户二号',
textErrorTip: null,
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
//tap <
onBackTap: function onBackTap() {
backTap();
},
//tap 保存
onSaveTap: function onSaveTap() {
saveTap();
},
onNameChange: function onNameChange(text) {
nameChange(this, text);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
nameInput: {
initParam: {
class: 'custom-editName-text',
placeholder: Vue.t('editName.nameInputTip')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
//tap 保存
function saveTap() {
_public.iot.navigator.back();
}
function nameChange(self, text) {
self.textName = text;
console.log('nameChange: ' + self.textName);
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 268:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(152);
/***/ })
},[268]);
//# sourceMappingURL=editName.js.map
\ No newline at end of file
webpackJsonp([16],{
/***/ 153:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _config = __webpack_require__(124);
var _config2 = _interopRequireDefault(_config);
var _public = __webpack_require__(2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* v_index.js
* Version: 0.1
* User: zjx
* Date: 2017-09-29
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 门锁用户
*/
_public.iot.ready(init);
function init() {
//通用 图片轮播、跑马灯、开关、按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-swipe-list', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
//配置组件
componentsConfig: initComponentsConfig(),
//用户列表
userList: [],
userListIndex: null,
loadShowFlag: false,
loadFlag: false,
loadText: 'loading',
pagesize: 10,
tip: '无数据',
extras: {}
},
mounted: function mounted() {
this.extras = _public.iot.navigator.getExtras();
//获取用户列表
getUserList(this);
//
},
methods: {
getUserList: function getUserList() {
return this.userList;
},
setUserList: function setUserList(list) {
this.userList = list;
},
onBackTap: function onBackTap() {
backTap();
},
onAddUserTap: function onAddUserTap() {
addUserTap();
},
setLoadShowFlag: function setLoadShowFlag(number) {
this.loadShowFlag = number >= this.pagesize;
},
onSwipeLeftRow: function onSwipeLeftRow(index) {
swipeLeftRow(this, index);
},
onSwipeRightRow: function onSwipeRightRow() {
swipeRightRow(this);
},
onTapLoad: function onTapLoad() {
tapLoad();
},
onTapUserList: function onTapUserList(index) {
_onTapUserList(this, index);
},
onTapButton: function onTapButton(buttonIndex) {
tapButton(buttonIndex);
},
changeUserList: function changeUserList(list) {
_changeUserList(this, list);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
//获取用户列表
function getUserList(self) {
console.log(self.extras);
_public.uComponents.showLoading(self);
_public.iot.business.device.getUsers({
data: {
device_id: self.extras.deviceId
},
success: function success(response) {
console.log(response);
// let data = uPublic.checkResponseData(response.data);
// if(data){
// let list = [];
// for(let i = 0; i < data.length ; i++){
// list[i] = {
// value: data.userId,
// role: data.role,
// image: data.role == 0 ? '../../resources/image/green_admin_icon.png' : data.name == null ? '../../resources/image/gray_unbindHead_icon.png' : '../../resources/image/green_bindhead_icon.png',
// title: data.nickname,
// subTitle: data.name
// }
// }
var list = [{ value: 1, role: 0, image: '../../resources/image/green_admin_icon.png', title: '我是用户', subtitle: "MM" }, { value: 1, role: 1, image: '../../resources/image/green_bindhead_icon.png', title: '我是用户', subtitle: "MM" }];
self.setUserList(self.getUserList().concat(list));
console.log(self.getUserList());
// if(data.length > 0){
// self.setStartId(data[data.length-1].id);
// }
// }
},
error: function error(_error) {
console.log(_error);
_public.uPublic.openRequestErrorAlert(self);
},
complete: function complete() {
_public.uComponents.hideLoading(self);
}
});
}
//返回上一页
function backTap() {
_public.iot.navigator.back();
}
//添加用户
function addUserTap() {
_public.iot.navigator.openWindow({
url: '../doorlockUsers/addUser.html',
id: 'addUser'
});
}
// 向左滑动用户列表,修改用户列表下标
function swipeLeftRow(self, index) {
self.userListIndex = index;
}
// 向右滑动用户列表,修改用户列表下标
function swipeRightRow(self) {
self.userListIndex = null;
}
// 点击组件列表 通知事件和当前点击列表下标
function _onTapUserList(self, listIndex) {
_public.iot.navigator.openWindow({
url: './doorlockUser.html',
id: 'doorlockUser'
});
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;
});
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 269:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(153);
/***/ })
},[269]);
//# sourceMappingURL=index.js.map
\ No newline at end of file
webpackJsonp([15],{
/***/ 154:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_inviteBind.js
* Version: 0.1
* User: wy
* Date: 2017-10-09
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 邀请绑定页面
*/
function init() {
//通用 按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-button', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
//tap <
onBackTap: function onBackTap() {
backTap();
},
//tap 重新生成二维码
onQRcodeButtonTap: function onQRcodeButtonTap() {
qrcodeButtonTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
//重新生成二维码 button 参数
qrcodeButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.qrcodeReset')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
//tap 重新生成二维码
function qrcodeButtonTap() {
alert('重新生成二维码');
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 270:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(154);
/***/ })
},[270]);
//# sourceMappingURL=inviteBind.js.map
\ No newline at end of file
webpackJsonp([14],{
/***/ 155:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_unlockInfo.js
* Version: 0.1
* User: wy
* Date: 2017-10-09
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 绑定开锁信息页面
*/
function init() {
//通用 dialog、loading组件
_public.uPublic.componentsInit(['u-dialog', 'u-loading']);
var app = new Vue({
data: {
unlockInfoList: [{ value: 1, title: '指纹1', rightText: 123456 }, { value: 2, title: '指纹2', rightText: 123456 }],
loadShowFlag: false,
loadFlag: false,
loadText: Vue.t('scroll.clickToLoadMore'),
pagesize: 10,
tip: Vue.t('unlockInfo.noInfoTip'),
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
//tap <
onBackTap: function onBackTap() {
backTap();
},
//tap 添加
onAddTap: function onAddTap() {
addTap();
},
onTapLoad: function onTapLoad() {
tapLoad();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
//tap 添加
function addTap() {
_public.iot.navigator.openWindow({
url: './addUnlockInfo.html',
id: 'addUnlockInfo'
});
}
//点击加载更多
function tapLoad() {
if (!self.loadFlag) {
self.loadText = Vue.t('scroll.loading');
self.loadFlag = true;
//再次发送获取用户列表请求
}
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 271:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(155);
/***/ })
},[271]);
//# sourceMappingURL=unlockInfo.js.map
\ No newline at end of file
webpackJsonp([13],{
/***/ 156:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_forgetPassword.js
* Version: 0.1
* User: wy
* Date: 2017-09-06
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 忘记密码页面
*/
function init() {
//通用 input、按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-text', 'u-button', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
numberTel: null,
textCode: null,
codeDisabledFlag: false,
textPassword: null,
textErrorTip: null,
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
getCodeDisabledFlag: function getCodeDisabledFlag() {
return this.codeDisabledFlag;
},
setCodeDisabledFlag: function setCodeDisabledFlag(boolean) {
this.codeDisabledFlag = boolean;
},
onTelChange: function onTelChange(number) {
telChange(this, number);
},
onCodeChange: function onCodeChange(text) {
codeChange(this, text);
},
onPasswordChange: function onPasswordChange(text) {
passwordChange(this, text);
},
//tap <
onBackTap: function onBackTap() {
backTap();
},
//tap 获取验证码
onCodeButtonTap: function onCodeButtonTap() {
codeButtonTap(this);
},
//tap 确定
onConfirmButtonTap: function onConfirmButtonTap() {
confirmButtonTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
telInput: {
initParam: {
class: 'custom-text',
icon: '&#xe6e8;',
placeholder: Vue.t('forgetPassword.telInputTip'),
maxlength: 11,
minlength: 11
}
},
codeInput: {
initParam: {
class: 'custom-code-text',
icon: '&#xe805;',
placeholder: Vue.t('forgetPassword.codeInputTip')
}
},
//获取验证码 button 参数
codeButton: {
initParam: {
class: 'custom-code-button',
text: Vue.t('btn.getCode')
}
},
passwordInput: {
initParam: {
class: 'custom-password-text',
icon: '&#xe64d;',
placeholder: Vue.t('forgetPassword.passwordInputTip'),
type: 'password',
maxlength: 6,
minlength: 6
}
},
//确定 button 参数
confirmButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.confirm')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
function telChange(self, number) {
self.numberTel = number;
console.log('telChange: ' + self.numberTel);
}
function codeChange(self, text) {
self.textCode = text;
console.log('codeChange: ' + self.textCode);
}
//tap 获取验证码
function codeButtonTap(self) {
self.setCodeDisabledFlag(true);
}
function passwordChange(self, text) {
self.textPassword = text;
console.log('passwordChange: ' + self.textPassword);
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
//tap 确定
function confirmButtonTap() {
_public.iot.navigator.back();
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 272:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(156);
/***/ })
},[272]);
//# sourceMappingURL=forgetPassword.js.map
\ No newline at end of file
webpackJsonp([12],{
/***/ 157:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_index.js
* Version: 0.1
* User: wy
* Date: 2017-09-06
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 引导页面
*/
function init() {
//通用 dialog、loading组件
_public.uPublic.componentsInit(['u-dialog', 'u-loading', 'u-button']);
var app = new Vue({
data: {
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {
// setTimeout(function(){
// iot.navigator.openWindow({
// url: './login.html',
// id: 'login'
// });
// },2000)
var self = this;
},
methods: {
onLoginButtonTap: function onLoginButtonTap() {
loginButtonTap(this);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
//登录 button 参数
loginButton: {
initParam: {
class: 'custom-guide-button',
text: Vue.t('btn.guideLogin')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
function loginButtonTap(self) {
_public.uComponents.showLoading(self);
_public.iot.business.sds.init({
data: {
oa: true
},
success: function success(response) {
console.log(response);
_public.iot.business.user.login({
data: {
sds: true
},
success: function success(response) {
console.log(response);
var data = _public.uPublic.checkResponseData(response.data);
if (data) {
console.log("云端登陆");
cloudsLogin(self, data.UserID);
// iot.navigator.openWindow({
// url: '../device/',
// id: 'device'
// });
} else {}
},
error: function error(_error) {
console.log(_error);
//请求失败
_public.uPublic.openRequestErrorAlert(self);
},
complete: function complete() {}
});
},
error: function error(_error2) {
console.log(_error2);
//请求失败
_public.uPublic.openRequestErrorAlert(self);
}
});
}
//云端登陆
function cloudsLogin(self, id) {
_public.iot.business.user.autoLogin({
success: function success(response) {
console.log(response);
var data = _public.uPublic.checkResponseData(response.data);
if (data) {
_public.uComponents.hideLoading(self);
_public.iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
} else {}
},
error: function error(_error3) {
console.log(_error3);
_public.iot.business.user.login({
data: {
username: id,
pwd: id
},
success: function success(response) {
console.log(response);
var data = _public.uPublic.checkResponseData(response.data);
if (data) {
_public.uComponents.hideLoading(self);
_public.iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
} else {}
},
error: function error(_error4) {
console.log(_error4);
//不存在此用户
// if(code == 10002){
//用户注册
_public.iot.business.user.reg({
data: {
username: id,
pwd: id,
vcode: id
},
success: function success(response) {
console.log(response);
//注册成功
var data = _public.uPublic.checkResponseData(response.data);
if (data) {
_public.uComponents.hideLoading(self);
_public.iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
} else {}
},
error: function error(_error5) {
console.log(_error5);
//注册失败
_public.uComponents.openAlert(self, Vue.t('login.failure'), {
text: Vue.t('dialog.confirm'), callback: function callback() {
plus.webview.currentWebview().reload();
}
});
},
complete: function complete() {}
});
// }
//请求失败
_public.uPublic.openRequestErrorAlert(self);
},
complete: function complete() {}
});
},
complete: function complete() {}
});
//
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 273:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(157);
/***/ })
},[273]);
//# sourceMappingURL=index.js.map
\ No newline at end of file
webpackJsonp([11],{
/***/ 158:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_login.js
* Version: 0.1
* User: wy
* Date: 2017-09-06
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 登录页面
*/
function init() {
//通用 input、按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-text', 'u-button', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
numberTel: null,
textPassword: null,
textErrorTip: null,
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {
_public.iot.business.sds.init({
data: {
oa: true
},
success: function success(response) {
console.log(response);
_public.iot.business.user.login({
data: {
sds: true
},
success: function success(response) {
console.log(response);
var data = _public.uPublic.checkResponseData(response.data);
if (data) {
_public.iot.business.user.login({
data: {
username: data.UserId,
pwd: data.UserId
},
success: function success(response) {
var data = _public.uPublic.checkResponseData(response.data);
if (data) {
_public.iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
} else {}
},
error: function error(_error) {},
complete: function complete() {}
});
} else {}
},
error: function error(_error2) {
console.log(_error2);
},
complete: function complete() {}
});
},
error: function error(_error3) {
console.log(_error3);
}
});
},
methods: {
onTelChange: function onTelChange(number) {
telChange(this, number);
},
onPasswordChange: function onPasswordChange(text) {
passwordChange(this, text);
},
//tap 登录
onLoginButtonTap: function onLoginButtonTap() {
loginButtonTap();
},
//tap 快速注册
onRegisterTap: function onRegisterTap() {
registerTap();
},
//tap 忘记密码
onForgetPasswordTap: function onForgetPasswordTap() {
forgetPasswordTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
telInput: {
initParam: {
class: 'custom-text',
icon: '&#xe6e8;',
placeholder: Vue.t('login.telInputTip'),
maxlength: 11,
minlength: 11
}
},
passwordInput: {
initParam: {
class: 'custom-password-text',
icon: '&#xe64d;',
placeholder: Vue.t('login.passwordInputTip'),
type: 'password'
}
},
//登录 button 参数
loginButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.login')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
function telChange(self, number) {
self.numberTel = number;
console.log('telChange: ' + self.numberTel);
}
function passwordChange(self, text) {
self.textPassword = text;
console.log('passwordChange: ' + self.textPassword);
}
//tap 登录
function loginButtonTap() {
_public.iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
}
//tap 快速注册
function registerTap() {}
// iot.navigator.openWindow({
// url: './register.html',
// id: 'register'
// });
//tap 忘记密码
function forgetPasswordTap() {
_public.iot.navigator.openWindow({
url: './forgetPassword.html',
id: 'forgetPassword'
});
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 274:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(158);
/***/ })
},[274]);
//# sourceMappingURL=login.js.map
\ No newline at end of file
webpackJsonp([10],{
/***/ 159:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_register.js
* Version: 0.1
* User: wy
* Date: 2017-09-06
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 注册页面
*/
function init() {
//通用 input、按钮、dialog、loading组件
_public.uPublic.componentsInit(['u-text', 'u-button', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
numberTel: null,
textCode: null,
codeDisabledFlag: false,
textPassword: null,
textErrorTip: null,
//配置组件
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
getCodeDisabledFlag: function getCodeDisabledFlag() {
return this.codeDisabledFlag;
},
setCodeDisabledFlag: function setCodeDisabledFlag(boolean) {
this.codeDisabledFlag = boolean;
},
onTelChange: function onTelChange(number) {
telChange(this, number);
},
onCodeChange: function onCodeChange(text) {
codeChange(this, text);
},
onPasswordChange: function onPasswordChange(text) {
passwordChange(this, text);
},
//tap <
onBackTap: function onBackTap() {
backTap();
},
//tap 获取验证码
onCodeButtonTap: function onCodeButtonTap() {
codeButtonTap(this);
},
//tap 注册
onRegisterButtonTap: function onRegisterButtonTap() {
registerButtonTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
telInput: {
initParam: {
class: 'custom-text',
icon: '&#xe6e8;',
placeholder: Vue.t('register.telInputTip'),
maxlength: 11,
minlength: 11
}
},
codeInput: {
initParam: {
class: 'custom-code-text',
icon: '&#xe805;',
placeholder: Vue.t('register.codeInputTip')
}
},
//获取验证码 button 参数
codeButton: {
initParam: {
class: 'custom-code-button',
text: Vue.t('btn.getCode')
}
},
passwordInput: {
initParam: {
class: 'custom-password-text',
icon: '&#xe64d;',
placeholder: Vue.t('register.passwordInputTip'),
type: 'password',
maxlength: 6,
minlength: 6
}
},
//注册 button 参数
registerButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.register')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
function telChange(self, number) {
self.numberTel = number;
console.log('telChange: ' + self.numberTel);
}
function codeChange(self, text) {
self.textCode = text;
console.log('codeChange: ' + self.textCode);
}
//tap 获取验证码
function codeButtonTap(self) {
self.setCodeDisabledFlag(true);
}
function passwordChange(self, text) {
self.textPassword = text;
console.log('passwordChange: ' + self.textPassword);
}
//tap <
function backTap() {
_public.iot.navigator.back();
}
//tap 注册
function registerButtonTap() {
_public.iot.navigator.openWindow({
url: '../device/',
id: 'device'
});
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 275:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(159);
/***/ })
},[275]);
//# sourceMappingURL=register.js.map
\ No newline at end of file
webpackJsonp([9],{
/***/ 160:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_editNickname.js
* Version: 0.1
* User: zjx
* Date: 2017-09-29
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 引导页面
*/
function init() {
//通用 dialog、loading组件
_public.uPublic.componentsInit(['u-dialog', 'u-loading', 'u-text']);
var app = new Vue({
data: {
//配置组件
textNickName: _public.iot.navigator.getExtras().nickname,
textErrorTip: null,
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
getTextNickName: function getTextNickName() {
return this.textNickName;
},
setTextNickName: function setTextNickName(text) {
this.textNickName = this;
},
onSaveTap: function onSaveTap() {
saveTap(this);
},
onBackTap: function onBackTap() {
backTap();
},
onNicknameChange: function 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 {
_public.uComponents.showLoading(self);
_public.iot.business.user.setInfo({
data: {
nickname: self.textNickName,
head: '',
info: {}
},
success: function success(response) {
if (response.data = 'success') {
_public.iot.navigator.fire(plus.webview.currentWebview().opener(), 'returnPage', {
// name: 'zhu'
});
_public.iot.navigator.back();
}
},
error: function error(_error) {
console.log(_error);
},
complete: function complete() {
_public.uComponents.hideLoading(self);
}
});
}
}
//返回上一页
function backTap() {
_public.iot.navigator.back();
}
function nicknameChange(self, text) {
self.textNickName = text;
self.textErrorTip = '';
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 276:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(160);
/***/ })
},[276]);
//# sourceMappingURL=editNickname.js.map
\ No newline at end of file
webpackJsonp([8],{
/***/ 161:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_editPassword.js
* Version: 0.1
* User: zjx
* Date: 2017-09-29
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 引导页面
*/
function init() {
//通用 dialog、loading组件
_public.uPublic.componentsInit(['u-dialog', 'u-loading', 'u-text']);
var app = new Vue({
data: {
//配置组件
textNewPassword: null,
textOldPassword: null,
textOldPasswordAgain: null,
textErrorTip: '密码不能为空',
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {},
methods: {
onSaveTap: function onSaveTap() {
saveTap();
},
onBackTap: function 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() {
_public.iot.navigator.back();
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 277:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(161);
/***/ })
},[277]);
//# sourceMappingURL=editPassword.js.map
\ No newline at end of file
webpackJsonp([7],{
/***/ 162:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {
var _public = __webpack_require__(2);
_public.iot.ready(init); /**
* v_index.js
* Version: 0.1
* User: zjx
* Date: 2017-09-26
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 引导页面
*/
function init() {
//通用 dialog、loading组件
_public.uPublic.componentsInit(['u-button', 'u-dialog', 'u-loading']);
var app = new Vue({
data: {
//配置组件
nickname: 'bank',
componentsConfig: initComponentsConfig()
},
mounted: function mounted() {
var self = this;
getInfo(this);
window.addEventListener('returnPage', function (event) {
console.log("in");
getInfo(self);
});
},
methods: {
//tap 修改昵称
onEditNicknameTap: function onEditNicknameTap() {
editNicknameTap(this);
},
//tap 修改密码
onEditPasswordTap: function onEditPasswordTap() {
editPasswordTap();
},
onBackTap: function onBackTap() {
backTap();
},
//tap 退出系统
onLogoutButtonTap: function onLogoutButtonTap() {
logoutButtonTap(this);
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
logoutButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.logout')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
};
}
//tap 修改昵称
function editNicknameTap(self) {
_public.iot.navigator.openWindow({
url: '../myInfo/editNickname.html',
id: 'editNickname',
extras: {
nickname: self.nickname
}
});
}
//tap 修改密码
function editPasswordTap() {
_public.iot.navigator.openWindow({
url: '../myInfo/editPassword.html',
id: 'editPassword'
});
}
function backTap() {
_public.iot.navigator.back();
}
function getInfo(self) {
_public.iot.business.user.getInfo({
success: function success(response) {
var data = _public.uPublic.checkResponseData(response.data);
if (data) {
console.log(data);
self.nickname = data.nickname;
} else {}
},
error: function error(_error) {},
complete: function complete() {}
});
}
//tap 退出系统
function logoutButtonTap(self) {
_public.uComponents.openConfirm(self, Vue.t('myInfo.logoutDialogTip'), { text: Vue.t('dialog.cancel'), callback: function callback() {} }, { text: Vue.t('dialog.confirm'), callback: function callback() {
_public.iot.business.user.logout({
data: {
sds: true
},
success: function success(response) {
_public.iot.business.websql.delMaps(['utoken', 'userinfo'], function (response) {
console.log(response);
}, function (error) {
console.log(error);
});
_public.iot.navigator.openWindow({
url: '../login/',
id: 'login'
});
var wvs = plus.webview.all();
for (var i = 0; i < wvs.length - 1; i++) {
plus.webview.close(wvs[i]);
}
},
error: function error(_error2) {},
complete: function complete() {
console.log("complete");
}
});
} });
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)["default"]))
/***/ }),
/***/ 278:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(162);
/***/ })
},[278]);
//# sourceMappingURL=index.js.map
\ 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