|
@@ -64,18 +64,17 @@
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
index: 0,
|
|
index: 0,
|
|
|
- roomSelect: '', //房间号
|
|
|
|
|
|
|
+ roomSelect: '', //校区宿舍号
|
|
|
remainElec: 0.00.toFixed(2), //剩余电量
|
|
remainElec: 0.00.toFixed(2), //剩余电量
|
|
|
add_class: '', //增加class属性
|
|
add_class: '', //增加class属性
|
|
|
add_class1: '',
|
|
add_class1: '',
|
|
|
inputMoney: '', //手动输入增加金额
|
|
inputMoney: '', //手动输入增加金额
|
|
|
addMoney: 0, //选择充值金额
|
|
addMoney: 0, //选择充值金额
|
|
|
- campus: '', //校区
|
|
|
|
|
sub_appid: '', //商户号
|
|
sub_appid: '', //商户号
|
|
|
xiaofei_items: '', // 消费记录
|
|
xiaofei_items: '', // 消费记录
|
|
|
ceshi: 'code',
|
|
ceshi: 'code',
|
|
|
- dorm_number: '', //房间号
|
|
|
|
|
- compus: '',
|
|
|
|
|
|
|
+ dorm_number: '', //栋宿舍号
|
|
|
|
|
+ compus: '', //校区
|
|
|
test: this.$store.state.test
|
|
test: this.$store.state.test
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -84,7 +83,8 @@
|
|
|
this.$store.state.building.roomSelect = '';
|
|
this.$store.state.building.roomSelect = '';
|
|
|
this.$store.state.building.add_class = 0;
|
|
this.$store.state.building.add_class = 0;
|
|
|
this.$store.state.building.dorm_number = '';
|
|
this.$store.state.building.dorm_number = '';
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 获得code
|
|
|
this.getCode()
|
|
this.getCode()
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
@@ -93,7 +93,8 @@
|
|
|
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
|
|
|
if (this.roomSelect != '') {
|
|
if (this.roomSelect != '') {
|
|
|
this.getDianLiang()
|
|
this.getDianLiang()
|
|
|
}
|
|
}
|
|
@@ -162,19 +163,22 @@
|
|
|
|
|
|
|
|
// console.log('获得openid', res);
|
|
// console.log('获得openid', res);
|
|
|
if (res.data.mess == '返回成功') {
|
|
if (res.data.mess == '返回成功') {
|
|
|
|
|
+ // 学号
|
|
|
this.$store.state.stu_number = res.data.info[0].stu_number
|
|
this.$store.state.stu_number = res.data.info[0].stu_number
|
|
|
- // 宿舍号
|
|
|
|
|
|
|
+ // 栋宿舍号
|
|
|
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
|
|
|
// 校区
|
|
// 校区
|
|
|
this.compus = res.data.info[0].campus
|
|
this.compus = res.data.info[0].campus
|
|
|
- // 填充校区楼栋号
|
|
|
|
|
|
|
+ // 填充校区宿舍号
|
|
|
this.roomSelect = this.compus + this.dorm_number.split('栋')[1]
|
|
this.roomSelect = this.compus + this.dorm_number.split('栋')[1]
|
|
|
|
|
+ // 存储选择
|
|
|
this.$store.state.building.roomSelect = this.roomSelect
|
|
this.$store.state.building.roomSelect = this.roomSelect
|
|
|
|
|
+ // 样式
|
|
|
this.add_class = 1
|
|
this.add_class = 1
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 请求选定的月份消费记录
|
|
// 请求选定的月份消费记录
|
|
|
this.getDianLiang()
|
|
this.getDianLiang()
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
} else if (res.data.mess == '未查询到用户信息') {
|
|
} else if (res.data.mess == '未查询到用户信息') {
|
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
|
url: '../index/index'
|
|
url: '../index/index'
|