|
|
@@ -77,25 +77,22 @@
|
|
|
},
|
|
|
onLoad() {
|
|
|
try {
|
|
|
- const eventChannel = this.getOpenerEventChannel();
|
|
|
- // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
|
|
|
- let _this = this;
|
|
|
- eventChannel.on('params', function(data) {
|
|
|
- // console.log(data)
|
|
|
- // 获取学号
|
|
|
- _this.stu_number = data.data.card_number
|
|
|
- _this.roomSelect = data.data.roomSelect
|
|
|
- })
|
|
|
-
|
|
|
- if (this.stu_number == '' || this.roomSelect == '' || typeof(this.stu_number) == 'undefined' || typeof(this
|
|
|
- .roomSelect) == 'undefined') {
|
|
|
+ // const eventChannel = this.getOpenerEventChannel();
|
|
|
+ // // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
|
|
|
+ // let _this = this;
|
|
|
+ // eventChannel.on('params', function(data) {
|
|
|
+ // console.log('eventChannel', data);
|
|
|
+ // // 获取学号
|
|
|
+ // _this.stu_number = data.data.card_number;
|
|
|
+ // _this.roomSelect = data.data.roomSelect;
|
|
|
+ // });
|
|
|
+
|
|
|
+ if (this.stu_number == '' || this.roomSelect == '' || typeof(this.stu_number) == 'undefined' || typeof(this.roomSelect) == 'undefined') {
|
|
|
// 获取学号
|
|
|
this.stu_number = this.$store.state.userInfo.card_number
|
|
|
this.roomSelect = this.$store.state.building.roomSelect
|
|
|
|
|
|
- if (this.stu_number == '' || this.roomSelect == '' || typeof(this.stu_number) == 'undefined' || typeof(
|
|
|
- this
|
|
|
- .roomSelect) == 'undefined') {
|
|
|
+ if (this.stu_number == '' || this.roomSelect == '' || typeof(this.stu_number) == 'undefined' || typeof(this.roomSelect) == 'undefined') {
|
|
|
const userinfo = uni.getStorageSync('userinfo_storage_key')
|
|
|
if (userinfo) {
|
|
|
this.stu_number = userinfo.card_number
|
|
|
@@ -133,7 +130,9 @@
|
|
|
* 判断是否选择了宿舍号
|
|
|
*/
|
|
|
haveSelectRoom() {
|
|
|
- if (this.roomSelect != '' && typeof(this.roomSelect) != 'undefined') {
|
|
|
+ if (this.roomSelect == '' || typeof(this.roomSelect) == 'undefined') {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
// 当月详情
|
|
|
try {
|
|
|
this.get_sameMonthDetails()
|
|
|
@@ -151,8 +150,6 @@
|
|
|
})
|
|
|
}
|
|
|
return false
|
|
|
- } else {
|
|
|
- return true
|
|
|
}
|
|
|
},
|
|
|
/**
|