|
@@ -92,14 +92,14 @@
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
// console.log(options);
|
|
// console.log(options);
|
|
|
if (typeof(options.from) != 'undefined' && options.from == 2) {
|
|
if (typeof(options.from) != 'undefined' && options.from == 2) {
|
|
|
- uni.navigateTo({
|
|
|
|
|
|
|
+ wx.navigateTo({
|
|
|
url: '../../pages/index/index?from=' + options.from
|
|
url: '../../pages/index/index?from=' + options.from
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
// 系统正在维护...
|
|
// 系统正在维护...
|
|
|
if (this.test == 'weihuzhong') {
|
|
if (this.test == 'weihuzhong') {
|
|
|
- uni.redirectTo({
|
|
|
|
|
|
|
+ wx.redirectTo({
|
|
|
url: '../../pages/index/index'
|
|
url: '../../pages/index/index'
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
@@ -121,7 +121,7 @@
|
|
|
this.roomSelect = this.$store.state.building.roomSelect;
|
|
this.roomSelect = this.$store.state.building.roomSelect;
|
|
|
this.add_class = this.$store.state.building.add_class;
|
|
this.add_class = this.$store.state.building.add_class;
|
|
|
this.dorm_number = this.$store.state.building.dorm_number;
|
|
this.dorm_number = this.$store.state.building.dorm_number;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.add_class = 1;
|
|
this.add_class = 1;
|
|
|
if (this.roomSelect && typeof(this.roomSelect) != 'undefined') {
|
|
if (this.roomSelect && typeof(this.roomSelect) != 'undefined') {
|
|
|
this.getDianLiang();
|
|
this.getDianLiang();
|
|
@@ -200,7 +200,7 @@
|
|
|
|
|
|
|
|
if (this.roomSelect == '' || typeof this.roomSelect == 'undefined') {
|
|
if (this.roomSelect == '' || typeof this.roomSelect == 'undefined') {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
- title: '请再次选择宿舍号',
|
|
|
|
|
|
|
+ title: '请再次选择宿舍',
|
|
|
icon: 'success'
|
|
icon: 'success'
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
@@ -222,7 +222,7 @@
|
|
|
|
|
|
|
|
if (this.roomSelect == '' || typeof this.roomSelect == 'undefined') {
|
|
if (this.roomSelect == '' || typeof this.roomSelect == 'undefined') {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
- title: '请再次选择宿舍号',
|
|
|
|
|
|
|
+ title: '请再次选择宿舍',
|
|
|
icon: 'success'
|
|
icon: 'success'
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
@@ -272,7 +272,7 @@
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 初始化参数
|
|
// 初始化参数
|
|
|
this.$store.state.building.add_class = 0;
|
|
this.$store.state.building.add_class = 0;
|
|
|
|
|
|
|
@@ -330,7 +330,7 @@
|
|
|
|
|
|
|
|
// console.log('获得openid', res);
|
|
// console.log('获得openid', res);
|
|
|
if (res.data.mess == '返回成功') {
|
|
if (res.data.mess == '返回成功') {
|
|
|
- if (!(this.$store.state.building.roomSelect && typeof(this.$store.state.building.roomSelect) !=
|
|
|
|
|
|
|
+ if (!(this.$store.state.building.roomSelect && typeof this.$store.state.building.roomSelect !=
|
|
|
'undefined')) {
|
|
'undefined')) {
|
|
|
// 栋宿舍号
|
|
// 栋宿舍号
|
|
|
this.dorm_number = res.data.info[0].build + res.data.info[0].dom
|
|
this.dorm_number = res.data.info[0].build + res.data.info[0].dom
|
|
@@ -347,7 +347,7 @@
|
|
|
// 样式
|
|
// 样式
|
|
|
this.add_class = 1
|
|
this.add_class = 1
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 请求选定的月份消费记录
|
|
// 请求选定的月份消费记录
|
|
|
this.getDianLiang()
|
|
this.getDianLiang()
|
|
|
} else if (res.data.mess == '未查询到用户信息') {
|
|
} else if (res.data.mess == '未查询到用户信息') {
|
|
@@ -430,13 +430,16 @@
|
|
|
},
|
|
},
|
|
|
// 是否选择了宿舍号
|
|
// 是否选择了宿舍号
|
|
|
haveSelectRoom() {
|
|
haveSelectRoom() {
|
|
|
- if (this.roomSelect == '请选择宿舍号') {
|
|
|
|
|
|
|
+ if (this.roomSelect == '请选择宿舍') {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
- title: '请选择宿舍号',
|
|
|
|
|
|
|
+ title: '请选择宿舍',
|
|
|
icon: 'success'
|
|
icon: 'success'
|
|
|
})
|
|
})
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ uni.setStorageSync('roomSelect', this.roomSelect);
|
|
|
|
|
+ uni.setStorageSync('stu_number', this.stu_number);
|
|
|
|
|
|
|
|
return false
|
|
return false
|
|
|
},
|
|
},
|