|
@@ -36,34 +36,28 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="add-money-list">
|
|
<view class="add-money-list">
|
|
|
<view class="add-money-button">
|
|
<view class="add-money-button">
|
|
|
- <button class="select-submit" :data-item="10" @tap="add_money"
|
|
|
|
|
- :class="{selStyle:amount == 10}">10元</button>
|
|
|
|
|
|
|
+ <button class="select-submit" :data-item="10" @tap="add_money" :class="{selStyle:amount == 10}">10元</button>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="add-money-button">
|
|
<view class="add-money-button">
|
|
|
- <button class="select-submit" :data-item="20" @tap="add_money"
|
|
|
|
|
- :class="{selStyle:amount == 20}">20元</button>
|
|
|
|
|
|
|
+ <button class="select-submit" :data-item="20" @tap="add_money" :class="{selStyle:amount == 20}">20元</button>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="add-money-button">
|
|
<view class="add-money-button">
|
|
|
- <button class="select-submit" :data-item="30" @tap="add_money"
|
|
|
|
|
- :class="{selStyle:amount == 30}">30元</button>
|
|
|
|
|
|
|
+ <button class="select-submit" :data-item="30" @tap="add_money" :class="{selStyle:amount == 30}">30元</button>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="add-money-button">
|
|
<view class="add-money-button">
|
|
|
- <button class="select-submit" :data-item="50" @tap="add_money"
|
|
|
|
|
- :class="{selStyle:amount == 50}">50元</button>
|
|
|
|
|
|
|
+ <button class="select-submit" :data-item="50" @tap="add_money" :class="{selStyle:amount == 50}">50元</button>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="add-money-button">
|
|
<view class="add-money-button">
|
|
|
- <button class="select-submit" :data-item="100" @tap="add_money"
|
|
|
|
|
- :class="{selStyle:amount == 100}">100元</button>
|
|
|
|
|
|
|
+ <button class="select-submit" :data-item="100" @tap="add_money" :class="{selStyle:amount == 100}">100元</button>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="add-money-button">
|
|
<view class="add-money-button">
|
|
|
- <button class="select-submit" :data-item="200" @tap="add_money"
|
|
|
|
|
- :class="{selStyle:amount == 200}">200元</button>
|
|
|
|
|
|
|
+ <button class="select-submit" :data-item="200" @tap="add_money" :class="{selStyle:amount == 200}">200元</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="show-item jine">
|
|
<view class="show-item jine">
|
|
|
- <input type="number" class="input-money" maxlength="4" placeholder="请输入金额(10-200)"
|
|
|
|
|
- placeholder-class="input-ph-color" v-model:value="amount" @input="onInput" @blur="onBlur" />
|
|
|
|
|
|
|
+ <input type="number" class="input-money" maxlength="4" placeholder="请输入金额(10-200)" placeholder-class="input-ph-color" v-model:value="amount"
|
|
|
|
|
+ @input="onInput" @blur="onBlur" />
|
|
|
</view>
|
|
</view>
|
|
|
<view class="submit-item" v-if="true">
|
|
<view class="submit-item" v-if="true">
|
|
|
<button class="submit" :data-rooms='room' @tap="input_money">充值</button>
|
|
<button class="submit" :data-rooms='room' @tap="input_money">充值</button>
|
|
@@ -97,23 +91,22 @@
|
|
|
},
|
|
},
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
// console.log(options);
|
|
// console.log(options);
|
|
|
- // if (typeof(options.from) != 'undefined' && options.from == 2) {
|
|
|
|
|
- // uni.navigateTo({
|
|
|
|
|
- // url: '../../pages/index/index?from=' + options.from
|
|
|
|
|
- // })
|
|
|
|
|
- // return
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ if (typeof(options.from) != 'undefined' && options.from == 2) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '../../pages/index/index?from=' + options.from
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
// 系统正在维护...
|
|
// 系统正在维护...
|
|
|
if (this.test == 'weihuzhong') {
|
|
if (this.test == 'weihuzhong') {
|
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
|
url: '../../pages/index/index'
|
|
url: '../../pages/index/index'
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
|
|
+ });
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
// 测试环境
|
|
// 测试环境
|
|
|
if (this.test) {
|
|
if (this.test) {
|
|
|
- this.amount = 0.01
|
|
|
|
|
|
|
+ this.amount = 0.01;
|
|
|
}
|
|
}
|
|
|
// 获取基本信息
|
|
// 获取基本信息
|
|
|
this.get_base_info(options, 'onLoad');
|
|
this.get_base_info(options, 'onLoad');
|
|
@@ -129,16 +122,16 @@
|
|
|
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();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 初始化参数
|
|
// 初始化参数
|
|
|
this.$store.state.building.add_class = 0;
|
|
this.$store.state.building.add_class = 0;
|
|
|
|
|
|
|
|
// 获取code
|
|
// 获取code
|
|
|
- this.getCode('options', 'onShow')
|
|
|
|
|
|
|
+ this.getCode('options', 'onShow');
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -170,7 +163,7 @@
|
|
|
if (typeof res.data.data == 'undefined' || res.data.data.length == 0) {
|
|
if (typeof res.data.data == 'undefined' || res.data.data.length == 0) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
|
let tf = false;
|
|
let tf = false;
|
|
|
let tmpData = res.data.data;
|
|
let tmpData = res.data.data;
|
|
@@ -202,42 +195,43 @@
|
|
|
*/
|
|
*/
|
|
|
dfxq_click() {
|
|
dfxq_click() {
|
|
|
if (this.haveSelectRoom()) {
|
|
if (this.haveSelectRoom()) {
|
|
|
- return
|
|
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- let _this = this;
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: '../dfxq/dfxq',
|
|
|
|
|
- success: function(res) {
|
|
|
|
|
- res.eventChannel.emit('params', {
|
|
|
|
|
- data: {
|
|
|
|
|
- roomSelect: _this.roomSelect,
|
|
|
|
|
- card_number: _this.stu_number
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (this.roomSelect == '' || typeof this.roomSelect == 'undefined') {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '请再次选择宿舍号',
|
|
|
|
|
+ icon: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '../dfxq/dfxq?rooSelect=' + this.roomSelect + '&card_number=' + this.stu_number,
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 水费详情页面
|
|
* 水费详情页面
|
|
|
*/
|
|
*/
|
|
|
sfxq_click() {
|
|
sfxq_click() {
|
|
|
if (this.haveSelectRoom()) {
|
|
if (this.haveSelectRoom()) {
|
|
|
- return
|
|
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- let _this = this;
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: '../sfxq/sfxq',
|
|
|
|
|
- success: function(res) {
|
|
|
|
|
- res.eventChannel.emit('params', {
|
|
|
|
|
- data: {
|
|
|
|
|
- roomSelect: _this.roomSelect,
|
|
|
|
|
- card_number: _this.stu_number
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if (this.roomSelect == '' || typeof this.roomSelect == 'undefined') {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '请再次选择宿舍号',
|
|
|
|
|
+ icon: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '../sfxq/sfxq?rooSelect=' + this.roomSelect + '&card_number=' + this.stu_number,
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 跳转到ad页面
|
|
* 跳转到ad页面
|
|
@@ -376,7 +370,7 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (!this.roomSelect || this.roomSelect == '' || typeof(this.roomSelect) == 'undefined') {
|
|
|
|
|
|
|
+ if (this.roomSelect == '' || typeof this.roomSelect == 'undefined' || !this.roomSelect) {
|
|
|
const userinfo = uni.getStorageSync('userinfo_storage_key')
|
|
const userinfo = uni.getStorageSync('userinfo_storage_key')
|
|
|
if (userinfo && typeof(userinfo) != 'undefined' && typeof(userinfo.campus) != 'undefined' &&
|
|
if (userinfo && typeof(userinfo) != 'undefined' && typeof(userinfo.campus) != 'undefined' &&
|
|
|
typeof(userinfo.dorm_number) != 'undefined' && userinfo.campus != '' && userinfo
|
|
typeof(userinfo.dorm_number) != 'undefined' && userinfo.campus != '' && userinfo
|
|
@@ -453,9 +447,18 @@
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: '../show/show',
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (this.roomSelect == '' || typeof this.roomSelect == 'undefined') {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '请再次选择宿舍号',
|
|
|
|
|
+ icon: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '../show/show?rooSelect=' + this.roomSelect + '&card_number=' + this.stu_number,
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -650,4 +653,4 @@
|
|
|
|
|
|
|
|
<style>
|
|
<style>
|
|
|
@import url("jiaofei.css");
|
|
@import url("jiaofei.css");
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|