|
@@ -11,18 +11,12 @@ Page({
|
|
jcsfcjtzd: ""
|
|
jcsfcjtzd: ""
|
|
},
|
|
},
|
|
userInfo: {
|
|
userInfo: {
|
|
- name: app.globalData.currentAccountInfo.username,
|
|
|
|
- id: app.globalData.currentAccountInfo.usernumber,
|
|
|
|
- address: app.globalData.currentAccountInfo.address
|
|
|
|
|
|
+ name: '',
|
|
|
|
+ id: '',
|
|
|
|
+ address: ''
|
|
},
|
|
},
|
|
billInfo: {}, // 存储从首页传递过来的账单信息
|
|
billInfo: {}, // 存储从首页传递过来的账单信息
|
|
quickAmounts: [10, 30, 50, 100, 200, 500],
|
|
quickAmounts: [10, 30, 50, 100, 200, 500],
|
|
- waterUsage: {
|
|
|
|
- lastReading: 2000,
|
|
|
|
- currentReading: 2050,
|
|
|
|
- nextReading: 3020,
|
|
|
|
- usage: 87
|
|
|
|
- },
|
|
|
|
showKeyboard: false,
|
|
showKeyboard: false,
|
|
selectedAmount: 0,
|
|
selectedAmount: 0,
|
|
customAmount: '',
|
|
customAmount: '',
|
|
@@ -34,6 +28,10 @@ Page({
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
const _this=this;
|
|
const _this=this;
|
|
|
|
+ // 更新用户信息
|
|
|
|
+ this.updateUserInfo();
|
|
|
|
+
|
|
|
|
+ debugger
|
|
wx.request({
|
|
wx.request({
|
|
url: app.globalData.interfaceUrls.pendingBill + app.globalData.currentAccountInfo.usernumber,
|
|
url: app.globalData.interfaceUrls.pendingBill + app.globalData.currentAccountInfo.usernumber,
|
|
method: 'POST',
|
|
method: 'POST',
|
|
@@ -44,6 +42,7 @@ Page({
|
|
'!SAAS_LOGIN_TOKEN_!': app.globalData.currentAccountInfo.dsKey
|
|
'!SAAS_LOGIN_TOKEN_!': app.globalData.currentAccountInfo.dsKey
|
|
},
|
|
},
|
|
success(res) {
|
|
success(res) {
|
|
|
|
+ debugger
|
|
wx.hideLoading();
|
|
wx.hideLoading();
|
|
let apiReturnData = res.data;
|
|
let apiReturnData = res.data;
|
|
_this.setData({
|
|
_this.setData({
|
|
@@ -85,6 +84,20 @@ Page({
|
|
this.fetchPaymentData();
|
|
this.fetchPaymentData();
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ onShow() {
|
|
|
|
+ // 每次页面显示时更新用户信息
|
|
|
|
+ this.updateUserInfo();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 更新用户信息的方法
|
|
|
|
+ updateUserInfo() {
|
|
|
|
+ this.setData({
|
|
|
|
+ 'userInfo.name': app.globalData.currentAccountInfo.username,
|
|
|
|
+ 'userInfo.id': app.globalData.currentAccountInfo.usernumber,
|
|
|
|
+ 'userInfo.address': app.globalData.currentAccountInfo.address
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
// 计算默认实缴金额
|
|
// 计算默认实缴金额
|
|
calculateDefaultAmount: function() {
|
|
calculateDefaultAmount: function() {
|
|
const { actualAmount, balance } = this.data;
|
|
const { actualAmount, balance } = this.data;
|