瀏覽代碼

Merge remote-tracking branch 'origin/master'

QAQ 陈 2 月之前
父節點
當前提交
d8f3ef2027

+ 1 - 1
app.js

@@ -14,7 +14,7 @@ const hostConfig = {
 App({
   onLaunch(options) {
     const updateManager = wx.getUpdateManager();
-    debugger;
+
     updateManager.onCheckForUpdate(function(res) {
       // 请求完新版本信息的回调
       console.log(res.hasUpdate);

+ 2 - 2
pages/lijijiaofei/lijijiaofei.js

@@ -31,7 +31,7 @@ Page({
     // 更新用户信息
     this.updateUserInfo();
     
-    debugger
+
     wx.request({
       url: app.globalData.interfaceUrls.pendingBill + app.globalData.currentAccountInfo.usernumber,
       method: 'POST',
@@ -205,7 +205,7 @@ Page({
       },
       data: {
         openId: app.globalData.userWxInfo.openid,
-        totalAmount: totalAmount*1000/10,
+        totalAmount: this.data.amount*1000/10,
         dskey: app.globalData.currentAccountInfo.dsKey,
         zdId: this.data.zdId,
         userNumber: app.globalData.currentAccountInfo.usernumber

+ 97 - 97
pages/usernotice/usernotice.js

@@ -1,106 +1,106 @@
 Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    noticeDetail: {
-      content: ''
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        noticeDetail: {
+            content: ''
+        },
+        phoneNumbers: [] // 存储提取出的电话号码
     },
-    phoneNumbers: [] // 存储提取出的电话号码
-  },
 
-  // 处理电话号码,将电话号码转换为可点击的链接
-  processPhoneNumbers: function(content) {
-    if (!content) return '';
-    
-    // 匹配带区号的固定电话号码(如:0516-87030707)和手机号码
-    const phoneRegex = /(?:0\d{2,3}-\d{7,8}|1[3-9]\d{9})/g;
-    const phoneNumbers = [];
-    
-    // 将内容中的电话号码替换为蓝色文本
-    let processedContent = content;
-    
-    // 找到所有匹配的电话号码,从后向前替换,避免位置变化
-    const matches = [];
-    let match;
-    while ((match = phoneRegex.exec(content)) !== null) {
-      matches.push({
-        text: match[0],
-        index: match.index,
-        length: match[0].length
-      });
-    }
-    
-    // 从后向前替换,避免索引变化
-    for (let i = matches.length - 1; i >= 0; i--) {
-      const matchInfo = matches[i];
-      const phoneText = matchInfo.text;
-      const cleanNumber = phoneText.replace(/-/g, '');
-      
-      // 保存电话号码信息
-      phoneNumbers.unshift({
-        phoneText: phoneText,
-        cleanNumber: cleanNumber
-      });
-      
-      // 替换为带颜色的HTML
-      const before = processedContent.substring(0, matchInfo.index);
-      const after = processedContent.substring(matchInfo.index + matchInfo.length);
-      processedContent = before + 
-        `<span style="color:#007AFF;">${phoneText}</span>` +
-        after;
-    }
-    
-    this.setData({
-      phoneNumbers: phoneNumbers
-    });
-    
-    return processedContent;
-  },
+    // 处理电话号码,将电话号码转换为可点击的链接
+    processPhoneNumbers: function(content) {
+        if (!content) return '';
 
-  // 处理电话号码点击事件
-  handlePhoneTap: function(e) {
-    // 获取点击的位置
-    const touchX = e.detail.x;
-    const touchY = e.detail.y;
-    
-    // 获取保存的电话号码
-    const phoneNumbers = this.data.phoneNumbers;
-    if (phoneNumbers && phoneNumbers.length > 0) {
-      // 弹出操作菜单让用户选择
-      wx.showActionSheet({
-        itemList: phoneNumbers.map(item => `拨打: ${item.phoneText}`),
-        success: (res) => {
-          if (res.tapIndex >= 0) {
-            const selectedPhone = phoneNumbers[res.tapIndex].cleanNumber;
-            wx.makePhoneCall({
-              phoneNumber: selectedPhone,
-              fail: (err) => {
-              }
+        // 匹配带区号的固定电话号码(如:0516-87030707)和手机号码
+        const phoneRegex = /(?:0\d{2,3}-\d{7,8}|1[3-9]\d{9})/g;
+        const phoneNumbers = [];
+
+        // 将内容中的电话号码替换为蓝色文本
+        let processedContent = content;
+
+        // 找到所有匹配的电话号码,从后向前替换,避免位置变化
+        const matches = [];
+        let match;
+        while ((match = phoneRegex.exec(content)) !== null) {
+            matches.push({
+                text: match[0],
+                index: match.index,
+                length: match[0].length
+            });
+        }
+
+        // 从后向前替换,避免索引变化
+        for (let i = matches.length - 1; i >= 0; i--) {
+            const matchInfo = matches[i];
+            const phoneText = matchInfo.text;
+            const cleanNumber = phoneText.replace(/-/g, '');
+
+            // 保存电话号码信息
+            phoneNumbers.unshift({
+                phoneText: phoneText,
+                cleanNumber: cleanNumber
             });
-          }
+
+            // 替换为带颜色的HTML
+            const before = processedContent.substring(0, matchInfo.index);
+            const after = processedContent.substring(matchInfo.index + matchInfo.length);
+            processedContent = before +
+                `<span style="color:#007AFF;">${phoneText}</span>` +
+                after;
         }
-      });
-    }
-  },
 
-  onLoad: function (options) {
-    const app = getApp();
-    // 从全局数据中获取用户须知信息
-    const userNotices = app.globalData.currentAccountInfo?.userNotices || '';
-    
-    // 处理电话号码
-    const processedContent = this.processPhoneNumbers(userNotices);
-    
-    this.setData({
-      'noticeDetail.content': processedContent
-    });
-  },
+        this.setData({
+            phoneNumbers: phoneNumbers
+        });
+
+        return processedContent;
+    },
+
+    // 处理电话号码点击事件
+    handlePhoneTap: function(e) {
+        // 获取点击的位置
+        const touchX = e.detail.x;
+        const touchY = e.detail.y;
 
-  /**
-   * 返回上一页
-   */
-  goBack: function() {
-    wx.navigateBack();
-  },
+        // 获取保存的电话号码
+        const phoneNumbers = this.data.phoneNumbers;
+        if (phoneNumbers && phoneNumbers.length > 0) {
+            // 弹出操作菜单让用户选择
+            wx.showActionSheet({
+                itemList: phoneNumbers.map(item => `拨打: ${item.phoneText}`),
+                success: (res) => {
+                    if (res.tapIndex >= 0) {
+                        const selectedPhone = phoneNumbers[res.tapIndex].cleanNumber;
+                        wx.makePhoneCall({
+                            phoneNumber: selectedPhone,
+                            fail: (err) => {
+                            }
+                        });
+                    }
+                }
+            });
+        }
+    },
+
+    onLoad: function (options) {
+        const app = getApp();
+        // 从全局数据中获取用户须知信息
+        const userNotices = app.globalData.currentAccountInfo?.userNotices || '';
+
+        // 处理电话号码
+        const processedContent = this.processPhoneNumbers(userNotices);
+
+        this.setData({
+            'noticeDetail.content': processedContent
+        });
+    },
+
+    /**
+     * 返回上一页
+     */
+    goBack: function() {
+        wx.navigateBack();
+    },
 }) 

+ 1 - 1
pages/usernotice/usernotice.json

@@ -2,4 +2,4 @@
   "navigationBarTitleText": "通知详情",
   "navigationStyle": "custom",
   "usingComponents": {}
-} 
+}

+ 1 - 1
pages/usernotice/usernotice.wxml

@@ -4,7 +4,7 @@
   <view class="header">
     <image class="background" src="/static_file/background.png" mode="widthFix" />
   </view>
-  
+
   <!-- 导航栏 -->
   <view class="custom-nav">
     <view bindtap="goBack">

+ 1 - 1
project.private.config.json

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