浏览代码

页面问题处理,发布小程序的版本

QAQ 陈 3 月之前
父节点
当前提交
3a57cc24ec
共有 3 个文件被更改,包括 29 次插入15 次删除
  1. 6 5
      app.js
  2. 22 9
      pages/lijijiaofei/lijijiaofei.js
  3. 1 1
      project.private.config.json

+ 6 - 5
app.js

@@ -1,8 +1,9 @@
 // app.js
 const utils = require('/utils/util.js')
 // const baseIp= "http://127.0.0.1:9747"
-const baseIp= "http://61.177.40.178:8000/zhsw"
+// const baseIp= "http://61.177.40.178:8000/zhsw"
 // const baseIp = "http://192.168.0.215:9000/zhsw"
+const baseIp = "https://www.izilaishui.com:9000/zhsw"
 // 图片预览地址
 
 App({
@@ -119,13 +120,13 @@ App({
     },
     // 微信静态文件预览方式 使用二开服务的使用次方法
     // weChatImgPreviewUrl: "http://192.168.0.215:8020/wechat/",
-    weChatImgPreviewUrl: "http://61.177.40.178:8020/wechat/",
-    // weChatImgPreviewUrl: "https://www.izilaishui.com:8020/wechat/",
+    // weChatImgPreviewUrl: "http://61.177.40.178:8020/wechat/",
+    weChatImgPreviewUrl: "https://www.izilaishui.com:8020/wechat/",
 
     // 平台
     // imgPreviewUrl:"http://192.168.0.215:9000/common/sys/sysfile/preview/",
-    imgPreviewUrl:"http://61.177.40.178:9000/common/sys/sysfile/preview/",
-    // imgPreviewUrl:"https://www.izilaishui.com:9000/common/sys/sysfile/preview/",
+    // imgPreviewUrl:"http://61.177.40.178:9000/common/sys/sysfile/preview/",
+    imgPreviewUrl:"https://www.izilaishui.com:9000/common/sys/sysfile/preview/",
 
     // 统一管理图片路径
     images: {

+ 22 - 9
pages/lijijiaofei/lijijiaofei.js

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

+ 1 - 1
project.private.config.json

@@ -3,7 +3,7 @@
   "projectname": "zhsw_wechat",
   "setting": {
     "compileHotReLoad": true,
-    "urlCheck": false,
+    "urlCheck": true,
     "coverView": true,
     "lazyloadPlaceholderEnable": false,
     "skylineRenderEnable": false,