xiaohaizhao 4 месяцев назад
Родитель
Сommit
bc468ad3c6

+ 3 - 3
packageA/fittings/modules/product/index.js

@@ -156,7 +156,7 @@ Component({
                 sa_workorderid: detail.sa_workorderid || '',
             }
             _Http.basic({
-                "id": 20221109093602,
+                "id": 2025121314111503,
                 "content": {
                     ...this.data.base,
                     "items": [content]
@@ -406,7 +406,7 @@ Component({
         }) {
             return new Promise((resolve) => {
                 _Http.basic({
-                    "id": 20221109093602,
+                    "id": 2025121314111503,
                     content: {
                         ...this.data.base,
                         "items": list.map(v => {
@@ -487,7 +487,7 @@ Component({
 
             function change(items) {
                 _Http.basic({
-                    "id": 20221109093602,
+                    "id": 2025121314111503,
                     "content": {
                         ...that.data.base,
                         items: items.map(v => {

+ 1 - 0
packageA/orderForm/index.js

@@ -214,6 +214,7 @@ Page({
               let item = v.data.find(s => s.isdefault);
               if (!item && v.data.length) data = v.data[0];
               content.contact = item.name;
+              content.name = item.name;
               content.phonenumber = item.phonenumber;
               content.province = item.province;
               content.city = item.city;

+ 22 - 2
pages/address/update.js

@@ -20,8 +20,7 @@ Page({
             value: "",
             placeholder: "联系人手机号码",
             valueName: "phonenumber",
-            required: true,
-            checking: "phone"
+            required: true
         }, {
             label: "省市县",
             error: false,
@@ -74,6 +73,27 @@ Page({
             "workaddress": 1,
             "isdefault": 0
         }, this.selectComponent("#Form").submit());
+
+        function validatePhoneNumber(value) {
+            // 空值/非字符串直接返回false
+            if (!value || typeof value !== 'string') return false;
+            const trimmedValue = value.trim();
+
+            // 1. 精准手机号校验(使用你提供的规则)
+            const mobileReg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
+            if (mobileReg.test(trimmedValue)) {
+                return true;
+            }
+
+            // 2. 手机号不通过,校验座机号(0开头区号+3-4位区号+7-8位号码)
+            const cleanedTel = trimmedValue.replace(/[- ]/g, ''); // 去除分隔符
+            const telReg = /^0\d{2,3}\d{7,8}$/; // 座机号规则:0开头区号(3-4位)+ 7-8位号码
+            return telReg.test(cleanedTel);
+        }
+        if (!validatePhoneNumber(content.phonenumber)) return wx.showToast({
+            title: '手机号不符合规格',
+            icon: 'none'
+        })
         content.province = content.region[0] || "";
         content.city = content.region[1] || "";
         content.county = content.region[2] || "";

+ 23 - 1
pages/index/index.js

@@ -191,6 +191,16 @@ Page({
 						}
 					})
 				});
+				if (!list.some(v => v.name == '商城')) {
+					wx.redirectTo({
+						url: '/pages/login/phone',
+					})
+					wx.showModal({
+						title: '提示',
+						content: '暂无权限使用!',
+						showCancel: false
+					})
+				}
 				return dye(list.sort((a, b) => a.index - b.index))
 			};
 			//染色
@@ -329,6 +339,13 @@ Page({
 				fcount
 			})
 		});
+		let privacyFieldC = ''
+		try {
+			privacyFieldC = wx.getStorageSync('auth').worderform.forms.detail.formcols.map(v => v.title);
+			console.log("privacyFieldC", privacyFieldC)
+		} catch (error) {
+			console.error(error)
+		}
 		_Http.basic({
 			"classname": "system.message.Message",
 			"method": "queryMessage",
@@ -342,7 +359,12 @@ Page({
 		}).then(res => {
 			if (res.msg != '成功') return;
 			this.selectComponent("#Home").setData({
-				msgList: res.data
+				msgList: res.data.map(v => {
+					if (!privacyFieldC.find(v => v == '详情金额')) {
+						if (v.message.includes('】元')) v.message = v.message.replace(/【(.*?)】/g, '【****】')
+					}
+					return v
+				})
 			})
 		})
 	},

+ 1 - 1
pages/index/message/detail.js

@@ -24,7 +24,7 @@ Page({
         title: res.msg,
         icon: "none"
       })
-      if (!this.data.privacyFieldC.find(v => v == '列表金额')) {
+      if (!this.data.privacyFieldC.find(v => v == '详情金额')) {
         if (res.data.message.includes('】元')) res.data.message = res.data.message.replace(/【(.*?)】/g, '【****】')
       }
       this.setData({

+ 1 - 1
pages/index/message/index.js

@@ -55,7 +55,7 @@ Component({
           title: res.msg,
           icon: "none"
         })
-        if (!this.data.privacyFieldC.find(v => v == '列表金额')) res.data = res.data.map(v => {
+        if (!this.data.privacyFieldC.find(v => v == '详情金额')) res.data = res.data.map(v => {
           if (v.message.includes('】元')) v.message = v.message.replace(/【(.*?)】/g, '【****】')
           return v
         })

+ 2 - 2
utils/Http.js

@@ -11,8 +11,8 @@ class HTTP {
 		if (this.ENV === 'release') { // 正式版
 			this.baseUrl = "https://crm.meida.com:16691";
 		} else {
-			this.baseUrl = "http://61.164.207.46:8300";
-			// this.baseUrl = "https://crm.meida.com:16691";
+			// this.baseUrl = "http://61.164.207.46:8300";
+			this.baseUrl = "https://crm.meida.com:16691";
 		}