zhaoxiaohai %!s(int64=3) %!d(string=hai) anos
pai
achega
f55580df50

+ 3 - 3
components/My_MembersAndProducts/index.wxml

@@ -7,13 +7,13 @@
         </view>
         <!-- 文本信息 -->
         <view class="grey_rectangle_text">
-            <view class="grey_rectangle_text_title">
+            <view class="grey_rectangle_text_title u-line-1">
                 {{title}}
             </view>
-            <view class="grey_rectangle_text_row">
+            <view class="grey_rectangle_text_row u-line-1">
                 {{twoRow}}
             </view>
-            <view class="grey_rectangle_text_row">
+            <view class="grey_rectangle_text_row u-line-1">
                 {{threeRow}}
             </view>
         </view>

+ 2 - 1
components/My_MembersAndProducts/index.wxss

@@ -19,9 +19,10 @@
 
 /* 文本 */
 .grey_rectangle_text {
-    flex: 1;
+    width: 360rpx;
     display: flex;
     flex-direction: column;
+    justify-content: space-between;
     margin-left: 30rpx;
 }
 

+ 9 - 2
pages/announceDemand/index.js

@@ -20,6 +20,7 @@ Page({
         ftitle: "", //供需标题
         fcontent: "", //需求内容	
         fenddate: "", //截止日期
+        throttle:false,//节流阀
         /* 必填 */
         errTips: {
             ftype: false,
@@ -109,6 +110,7 @@ Page({
             title: '请检查表单内容',
             icon: "error"
         });
+        if(this.data.throttle) return;
         this.addOrModify()
     },
     /* 新增或修改 */
@@ -127,8 +129,13 @@ Page({
                 "fissupply": 0
             }
         }).then(res => {
-            if (res.msg != "成功") return;
-            console.log(res)
+            if (res.msg != "成功") return wx.showToast({
+                title: res.data,
+                icon: "none"
+            });
+            this.setData({
+                throttle:true
+            })
             let content = {
                 ownerid: res.data[0].tsupplyanddemandid,
                 ownertable: "tsupplyanddemand",

+ 17 - 14
pages/productManagement/change.js

@@ -19,6 +19,8 @@ Page({
         showSaleprod: "", //标签显示
         tagents_productid: 0, //识别产品ID
         checked: false, //开关控件
+        fisonsale: 0, //是否上架
+        throttle: false, //保存节流阀
         errTips: {
             fprodname: false,
             fprodnum: false,
@@ -117,7 +119,7 @@ Page({
     },
     /* 提交 */
     submit() {
-        if (!this.formVerify()) return;
+        if (!this.formVerify() || this.data.throttle) return;
         //请求参数
         _Http.basic({
             "accesstoken": wx.getStorageSync('userData').token,
@@ -133,7 +135,13 @@ Page({
             }
         }).then(res => {
             console.log(res)
-            if (res.msg != "成功") return;
+            if (res.msg != "成功") return wx.showToast({
+                title: res.data,
+                icon: "none"
+            });
+            this.setData({
+                throttle: true//设置节流阀
+            });
             let content = {
                 ownerid: res.data[0].tagents_productid,
                 ownertable: "tagents_product",
@@ -160,7 +168,6 @@ Page({
         /* 经营类目提示框 */
         if (name == 'showSaleprod') {
             errTips[name] = true;
-            console.log(23)
         }
         this.setData({
             errTips
@@ -174,23 +181,19 @@ Page({
         const {
             value
         } = e.detail;
+        let errTips = this.data.errTips;
+        if (value.trim() == "") errTips[name] = true;
         /* 经营类目提示框,字符串转化数组 */
         if (name == 'showSaleprod') {
-            let errTips = this.data.errTips;
-            const ftag = this.data.showSaleprod.split(" ");
             errTips[name] = false;
+            const ftag = this.data.showSaleprod.split(" ");
             this.setData({
-                ftag,
-                errTips
+                ftag
             })
         };
-        if (value.trim() == "") {
-            let errTips = this.data.errTips;
-            errTips[name] = true;
-            this.setData({
-                errTips
-            })
-        }
+        this.setData({
+            errTips
+        })
     },
     /**
      * 生命周期函数--监听页面显示

+ 1 - 1
pages/productManagement/change.wxml

@@ -23,7 +23,7 @@
             <van-field autosize model:value="{{ fintroduction }}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
-        <My_GreyRectangleForm title="是否上架">
+        <My_GreyRectangleForm title="产品上架">
             <van-switch style="position: absolute; margin-left: -110rpx; margin-top: 10rpx;" checked="{{ checked }}" bind:change="switchChange" />
         </My_GreyRectangleForm>
 

+ 1 - 2
pages/tabbar-pages/supplyAndDemand/index.wxml

@@ -71,8 +71,7 @@
                             浏览次数:{{item.freadtimes}}<text catchtap="showCommunicationOfNumber">意向沟通人数</text>:{{item.fcommunicationtimes}}次
                         </view>
                         <view class="dataAndBut_but">
-                            <van-button wx:if="{{item.fstatus == '待对接'}}" color="#4DC2D4" style="margin-left: 16rpx;" custom-class="custom-slotBut" catchtap="contact">一键联系</van-button>
-                            <van-button wx:else color="#4DC2D4" style="margin-left: 16rpx;" custom-class="custom-NoSlotBut" catchtap="stop">{{item.fstatus}}</van-button>
+                            <van-button color="#4DC2D4" data-index="{{index}}" style="margin-left: 16rpx;" custom-class="custom-slotBut" catchtap="productEdit">编辑</van-button>
                         </view>
                     </view>
                 </view>

+ 1 - 1
pages/tabbar-pages/user/index.wxml

@@ -12,7 +12,7 @@
             <!-- 信息 -->
             <view class="user_message" bindtap="toUserCenter">
                 <!-- 用户名 -->
-                <view class="user_name">
+                <view class="user_name u-line-1">
                     {{userMessage.fname}}<text>{{userMessage.frole}}</text>
                 </view>
                 <view class="user_nubmer">

+ 1 - 0
pages/tabbar-pages/user/index.wxss

@@ -39,6 +39,7 @@
 }
 
 .user_name {
+    width: 350rpx;
     font-size: 36rpx;
     font-weight: 500;
     color: #000000;

+ 10 - 1
pages/teamManagement/change.js

@@ -18,6 +18,7 @@ Page({
         tenterprise_userid: 0, //用户id
         checked: true, //是否启用
         fisused: 1,
+        throttle:false,//节流阀
         /* 必填项 */
         errTips: {
             fname: false,
@@ -51,6 +52,7 @@ Page({
             title: '请检查表单内容',
             icon: "none"
         });
+        if(this.data.throttle) return;
         _Http.basic({
             "accesstoken": wx.getStorageSync('userData').token,
             "classname": "customer.usercenter.teammsg.teammsg",
@@ -65,7 +67,14 @@ Page({
             }
         }).then(res => {
             console.log(res)
-            if (res.msg != "成功") return
+            if (res.msg != "成功") return wx.showToast({
+                title: res.data,
+                icon: "none"
+            });
+            //节流阀
+            this.setData({
+                throttle:true
+            })
             wx.showToast({
                 title: '保存成功',
             });

+ 40 - 7
pages/userCenter/index.js

@@ -26,6 +26,7 @@ Page({
             fname: false, //用户名
             frole: false, //身份/职位
             fphonenumber: false, //手机号
+            femail: false, //邮箱
         },
     },
 
@@ -34,13 +35,16 @@ Page({
      */
     onLoad: function (options) {
         const userMessage = JSON.parse(options.data);
-        let attinfos = [{
-            url: userMessage.attinfos[0].fobsurl,
-            ownerid: userMessage.attinfos[0].ownerid,
-            tattachmentid: userMessage.attinfos[0].tattachmentid,
-            ownertable: userMessage.attinfos[0].ownertable,
-            fdocument: userMessage.attinfos[0].fdocument
-        }];
+        let attinfos = [];
+        if (userMessage.attinfos.length >= 1) {
+            attinfos = [{
+                url: userMessage.attinfos[0].fobsurl,
+                ownerid: userMessage.attinfos[0].ownerid,
+                tattachmentid: userMessage.attinfos[0].tattachmentid,
+                ownertable: userMessage.attinfos[0].ownertable,
+                fdocument: userMessage.attinfos[0].fdocument
+            }];
+        }
         this.setData({
             attinfos,
             fname: userMessage.fname,
@@ -53,6 +57,12 @@ Page({
             frole: userMessage.frole
         })
     },
+    /* 修改性别 */
+    sexOnChange(event) {
+        this.setData({
+            fsex: event.detail,
+        });
+    },
     /* 打开时间选择器 */
     setDate() {
         this.selectComponent("#SetDate").dateOnClose()
@@ -77,6 +87,14 @@ Page({
             errTips.frole = true;
             verify = false;
         }
+        /* 验证邮箱 */
+        if (this.data.errTips.femail && this.data.femail != '') {
+            wx.showToast({
+                title: '请检查邮箱格式!',
+                icon: "none"
+            })
+            verify = false;
+        }
         if (!verify) {
             this.setData({
                 errTips
@@ -135,6 +153,21 @@ Page({
         const {
             value
         } = e.detail;
+        if (name == 'femail') {
+            var reg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
+            if (!reg.test(value.trim())) {
+                wx.showToast({
+                    title: '请检查邮箱格式!',
+                    icon: "none"
+                })
+                let errTips = this.data.errTips;
+                errTips[name] = true;
+                this.setData({
+                    errTips
+                })
+            }
+            return;
+        }
         if (value.trim() == "") {
             let errTips = this.data.errTips;
             errTips[name] = true;

+ 3 - 1
pages/userCenter/index.json

@@ -1,6 +1,8 @@
 {
   "usingComponents": {
     "My_UploadFiles": "../../components/My_UploadFiles/index",
-    "My_selectTime": "/components/My_selectTime/index"
+    "My_selectTime": "/components/My_selectTime/index",
+    "van-radio": "@vant/weapp/radio/index",
+    "van-radio-group": "@vant/weapp/radio-group/index"
   }
 }

+ 6 - 2
pages/userCenter/index.wxml

@@ -23,7 +23,7 @@
             <van-field autosize model:value="{{ frole }}" data-name="frole" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.frole}}" input-class="input-class" placeholder="身份/职位" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="手机" required>
-            <van-field autosize disabled model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="身份/职位" border="{{ false }}" />
+            <van-field autosize disabled model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="手机号" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="微信">
             <van-field autosize model:value="{{ fwechatno }}" input-class="input-class" placeholder="微信号/手机号" border="{{ false }}" />
@@ -32,13 +32,17 @@
             <van-field autosize model:value="{{ faddress }}" input-class="input-class" placeholder="请输入地址" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="性别">
+            <van-radio-group value="{{ fsex }}" bind:change="sexOnChange" direction="horizontal">
+                <van-radio name="男">男</van-radio>
+                <van-radio name="女">女</van-radio>
+            </van-radio-group>
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="生日">
             <view style="width: 100%; height: 100%; z-index: 999; position: absolute;" bindtap="setDate"></view>
             <van-field autosize model:value="{{ fbirthdate }}" input-class="input-class" placeholder="点击设置" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="邮箱">
-            <van-field autosize model:value="{{ femail }}" input-class="input-class" placeholder="邮箱地址" border="{{ false }}" />
+            <van-field autosize model:value="{{ femail }}" input-class="input-class" placeholder="邮箱地址" border="{{ false }}" data-name="femail" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.femail}}" />
         </My_GreyRectangleForm>
     </view>
 </My_GeneralTemplate>