|
@@ -197,7 +197,7 @@
|
|
|
// console.log('reshui', res);
|
|
// console.log('reshui', res);
|
|
|
if (res.code) {
|
|
if (res.code) {
|
|
|
// 请求服务器,获得openid
|
|
// 请求服务器,获得openid
|
|
|
- this.getOpenId(options, res.code)
|
|
|
|
|
|
|
+ this.getOpenId(options, res.code, param)
|
|
|
} else {
|
|
} else {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: res.errMsg,
|
|
title: res.errMsg,
|
|
@@ -210,7 +210,7 @@
|
|
|
/**
|
|
/**
|
|
|
* 请求服务器,获得openid
|
|
* 请求服务器,获得openid
|
|
|
*/
|
|
*/
|
|
|
- async getOpenId(options, param_code) {
|
|
|
|
|
|
|
+ async getOpenId(options, param_code, param) {
|
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
|
host: this.ceshi,
|
|
host: this.ceshi,
|
|
|
url: '/HotWaters/wpget_stu.action',
|
|
url: '/HotWaters/wpget_stu.action',
|
|
@@ -239,8 +239,10 @@
|
|
|
// 校区
|
|
// 校区
|
|
|
// this.compus = res.data.info[0].campus
|
|
// this.compus = res.data.info[0].campus
|
|
|
|
|
|
|
|
- // 请求选定的月份消费记录
|
|
|
|
|
- this.request_consumption_records()
|
|
|
|
|
|
|
+ if (param == 'onLoad') {
|
|
|
|
|
+ // 请求选定的月份消费记录
|
|
|
|
|
+ this.request_consumption_records()
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '学工号不一致!',
|
|
title: '学工号不一致!',
|
|
@@ -294,7 +296,6 @@
|
|
|
*/
|
|
*/
|
|
|
async request_consumption_records() {
|
|
async request_consumption_records() {
|
|
|
if (this.stu_number != '' && typeof(this.stu_number) != 'undefined') {
|
|
if (this.stu_number != '' && typeof(this.stu_number) != 'undefined') {
|
|
|
- this.xiaofei_items = []
|
|
|
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
|
host: this.ceshi,
|
|
host: this.ceshi,
|
|
|
url: '/HotWaters/wpqueryConsume.action',
|
|
url: '/HotWaters/wpqueryConsume.action',
|
|
@@ -310,6 +311,7 @@
|
|
|
|
|
|
|
|
// console.log(res);
|
|
// console.log(res);
|
|
|
if (res.data.mess == '返回成功') {
|
|
if (res.data.mess == '返回成功') {
|
|
|
|
|
+ this.xiaofei_items = []
|
|
|
// 消费记录
|
|
// 消费记录
|
|
|
let items = res.data.data
|
|
let items = res.data.data
|
|
|
for (var i = 0; i < items.length; i++) {
|
|
for (var i = 0; i < items.length; i++) {
|
|
@@ -1089,7 +1091,6 @@
|
|
|
success: (res1) => {
|
|
success: (res1) => {
|
|
|
this.use_amount = res.data.use_amount.toFixed(2)
|
|
this.use_amount = res.data.use_amount.toFixed(2)
|
|
|
this.amount = (this.amount - this.use_amount).toFixed(2)
|
|
this.amount = (this.amount - this.use_amount).toFixed(2)
|
|
|
-
|
|
|
|
|
// 刷新选定的月份消费记录
|
|
// 刷新选定的月份消费记录
|
|
|
this.request_consumption_records()
|
|
this.request_consumption_records()
|
|
|
}
|
|
}
|