zhaoxiaohai 3 سال پیش
والد
کامیت
e1619524c4
4فایلهای تغییر یافته به همراه43 افزوده شده و 146 حذف شده
  1. 1 48
      pages/login/index.js
  2. 16 16
      pages/login/index.wxml
  3. 10 66
      pages/storeMessage/index.js
  4. 16 16
      pages/storeMessage/index.wxml

+ 1 - 48
pages/login/index.js

@@ -14,7 +14,7 @@ Page({
      */
     data: {
         popups: false, //弹出层控制
-        pageType: "login", //页面类型 login 手机登录页面 signin 注册页面 firm 商户认证 changeUser 切换用户
+        pageType: "firm", //页面类型 login 手机登录页面 signin 注册页面 firm 商户认证 changeUser 切换用户
         butText: "", //按钮文本
         attinfos: [], //logo
         /* 登录 */
@@ -39,14 +39,6 @@ Page({
         errTips: {
             fphonenumber: false, //手机号码
             password: false, //验证码
-            fbrand: false, //品牌名
-            showSaleprod: false, //经营类目
-            tipsShow: false, //经营类目提示框
-            fagentname: false, //注册公司名
-            fcontact: false, //联系人
-            logoTips: false, //未上传图片提示
-            coverTips: false,
-            faddress: false,
         },
         countDownTime: 60, //倒计时
         dataList: ["暂无分类"], //分类列表
@@ -219,50 +211,11 @@ Page({
     merchantsToSubmitVerify() {
         let errTips = this.data.errTips,
             verify = true;
-        //验证品牌名称
-        if (!_Verify.required(this.data.fbrand)) {
-            errTips.fbrand = true;
-            verify = false;
-        };
-        // 验证图片是否上传
-        if (!this.selectComponent('#UploadFiles').VerifyThere()) {
-            errTips.logoTips = true;
-            verify = false;
-        }
-        // 验证图片是否上传
-        if (!this.selectComponent('#coverUploadFiles').VerifyThere()) {
-            errTips.coverTips = true;
-            verify = false;
-        }
-        // 经营类目验证
-        if (!_Verify.required(this.data.showSaleprodclass)) {
-            errTips.showSaleprod = true;
-            verify = false;
-        };
-        // 注册公司名验证
-        if (!_Verify.required(this.data.fagentname)) {
-            errTips.fagentname = true;
-            verify = false;
-        };
-        // 联系人验证
-        if (!_Verify.required(this.data.fcontact)) {
-            errTips.fcontact = true;
-            verify = false;
-        };
         //验证联系方式
         if (!_Verify.phoneNumber(this.data.fphonenumber)) {
             errTips.fphonenumber = true;
             verify = false;
         }
-        // 地址验证
-        if (!_Verify.required(this.data.faddress)) {
-            errTips.faddress = true;
-            verify = false;
-        };
-        // 公司介绍验证
-        if (!_Verify.required(this.data.fintroduction)) {
-            verify = false;
-        };
         this.setData({
             errTips
         })

+ 16 - 16
pages/login/index.wxml

@@ -52,25 +52,25 @@
     <My_RectangularFrame title="成为布万家商户">
         <view class="form_box firm">
             <!-- 品牌名 -->
-            <view class="input_text_title">品牌名<text>*</text></view>
+            <view class="input_text_title">品牌名</view>
             <view class="input_text_box box_mar_bot">
                 <view class="input_text_input marLeft">
-                    <van-field value="{{ fbrand }}" bind:input='eliminate' data-name="fbrand" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fbrand}}" input-class="input-class" placeholder="请输入品牌名" border="{{ false }}" />
+                    <van-field value="{{ fbrand }}" bind:input='eliminate' data-name="fbrand" input-class="input-class" placeholder="请输入品牌名" border="{{ false }}" />
                 </view>
             </view>
             <!-- 品牌LOGO -->
-            <view class="input_text_title">品牌LOGO<text>*</text></view>
+            <view class="input_text_title">品牌LOGO</view>
             <view class="box_mar_bot">
-                <My_UploadFiles id="UploadFiles" UploadShow="1" fileList="{{attinfos}}" UploadShow="{{true}}" upType="Logo" maxCount='1' logoTips="{{errTips.logoTips}}" size="55px" Tips="请上传logo图片" bindimageChange="imageChange"></My_UploadFiles>
+                <My_UploadFiles id="UploadFiles" UploadShow="1" fileList="{{attinfos}}" UploadShow="{{true}}" upType="Logo" maxCount='1' size="55px" bindimageChange="imageChange"></My_UploadFiles>
             </view>
             <!-- 品牌展示图 -->
-            <view class="input_text_title">品牌展示图<text>*</text></view>
+            <view class="input_text_title">品牌展示图</view>
             <view class="box_mar_bot">
-                <My_UploadFiles id="coverUploadFiles" UploadShow="1" fileList="{{coverAttinfos}}" UploadShow="{{true}}" upType="LogoCover" maxCount='1' logoTips="{{errTips.coverTips}}" size="55px" Tips="请上传品牌展示图" bindimageChange="coverImageChange"></My_UploadFiles>
+                <My_UploadFiles id="coverUploadFiles" UploadShow="1" fileList="{{coverAttinfos}}" UploadShow="{{true}}" upType="LogoCover" maxCount='1' size="55px" bindimageChange="coverImageChange"></My_UploadFiles>
             </view>
             <!-- 经营类目 -->
             <view style="position: relative; margin-bottom: 15rpx;">
-                <view class="input_text_title">经营类目<text>*</text></view>
+                <view class="input_text_title">经营类目</view>
                 <view style="width: 100%; height: 50%; z-index: 999; position: absolute;" bindtap="showPop"></view>
                 <view class="input_text_box box_mar_bot">
                     <view class="input_text_input marLeft">
@@ -79,36 +79,36 @@
                 </view>
             </view>
             <!-- 注册公司名 -->
-            <view class="input_text_title">注册公司名<text>*</text></view>
+            <view class="input_text_title">注册公司名</view>
             <view class="input_text_box box_mar_bot">
                 <view class="input_text_input marLeft">
-                    <van-field value="{{ fagentname }}" bind:input='eliminate' data-name="fagentname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fagentname}}" input-class="input-class" placeholder="请输入公司名称" border="{{ false }}" />
+                    <van-field value="{{ fagentname }}" bind:input='eliminate' data-name="fagentname" input-class="input-class" placeholder="请输入公司名称" border="{{ false }}" />
                 </view>
             </view>
             <!-- 联系人 -->
-            <view class="input_text_title">联系人<text>*</text></view>
+            <view class="input_text_title">联系人</view>
             <view class="input_text_box box_mar_bot">
                 <view class="input_text_input marLeft">
-                    <van-field model:value="{{ fcontact }}" bind:input='eliminate' data-name="fcontact" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fcontact}}" input-class="input-class" placeholder="请输入联系人" border="{{ false }}" />
+                    <van-field model:value="{{ fcontact }}" bind:input='eliminate' data-name="fcontact" input-class="input-class" placeholder="请输入联系人" border="{{ false }}" />
                 </view>
             </view>
             <!-- 联系方式 -->
-            <view class="input_text_title">联系方式<text>*</text></view>
+            <view class="input_text_title">联系方式</view>
             <view class="input_text_box box_mar_bot">
                 <view class="input_text_input marLeft">
-                    <van-field model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="请输入联系方式" border="{{ false }}" />
+                    <van-field model:value="{{ fphonenumber }}" data-name="fphonenumber" input-class="input-class" placeholder="请输入联系方式" border="{{ false }}" />
                 </view>
             </view>
             <!-- 公司介绍 -->
-            <view class="input_text_title">公司介绍<text>*</text></view>
+            <view class="input_text_title">公司介绍</view>
             <view class="input_text_box box_mar_bot" style="height: 230rpx; align-items: flex-start;">
                 <van-field value="{{ fintroduction }}" data-name="fintroduction" bind:input='eliminate' type="textarea" placeholder="请填写公司介绍" autosize border="{{ false }}" input-class="input-class-textarea" />
             </view>
             <!-- 地址 -->
-            <view class="input_text_title">地址<text>*</text></view>
+            <view class="input_text_title">地址</view>
             <view class="input_text_box box_mar_bot">
                 <view class="input_text_input marLeft">
-                    <van-field value="{{ faddress }}" bind:input='eliminate' data-name="faddress" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.faddress}}" input-class="input-class" placeholder="请输入地址" border="{{ false }}" />
+                    <van-field value="{{ faddress }}" bind:input='eliminate' data-name="faddress" input-class="input-class" placeholder="请输入地址" border="{{ false }}" />
                 </view>
             </view>
             <!-- 统一社会代码 -->

+ 10 - 66
pages/storeMessage/index.js

@@ -28,17 +28,6 @@ Page({
         faddress: "", //地址
         fdutyparagraph: "", //统一社会代码
         requestType: "普通修改", //请求类型
-        /*  */
-        errTips: {
-            fbrand: false,
-            attinfos: false,
-            saleprodclass: false,
-            fcontact: false,
-            fphonenumber: false,
-            fagentname: false,
-            fintroduction: false,
-            faddress: false,
-        }
     },
     /* input事件剔除特殊字符 */
     eliminate(value) {
@@ -162,18 +151,13 @@ Page({
     },
     /* 提交数据 */
     submit() {
-        if (!this.formVerify()) return wx.showToast({
-            title: '请检查表单内容',
-            icon: "error"
-        });
-        if (this.data.attinfos.length < 1) return wx.showToast({
-            title: '请上传品牌LOGO!',
-            icon: "none"
-        });
-        if (this.data.coverAttinfos.length < 1) return wx.showToast({
-            title: '请上传品牌展示图!',
-            icon: "none"
-        });
+        if (!this.formVerify()) {
+            wx.showToast({
+                title: '请检查',
+                icon: "error"
+            });
+            return;
+        }
         const that = this;
         if (this.data.requestType == '普通修改') {
             wx.showModal({
@@ -224,50 +208,10 @@ Page({
     },
     /* 表单验证 */
     formVerify() {
-        let errTips = this.data.errTips,
-            verify = true;
-        /* 验证品牌名 */
-        if (!_Verify.required(this.data.fbrand)) {
-            errTips.fbrand = true;
-            verify = false;
-        }
-        /* 验证经营类目  */
-        if (!_Verify.required(this.data.showSaleprodclass)) {
-            errTips.saleprodclass = true;
-            verify = false;
-        }
-        /* 验证联系人  */
-        if (!_Verify.required(this.data.fcontact)) {
-            errTips.fcontact = true;
-            verify = false;
-        }
+        let verify = true;
         /* 验证联系方式  */
-        if (!_Verify.phoneNumber(this.data.fphonenumber)) {
-            errTips.fphonenumber = true;
-            verify = false;
-        }
-        /* 验证商户名称  */
-        if (!_Verify.required(this.data.fagentname)) {
-            errTips.fagentname = true;
-            verify = false;
-        }
-        /* 验证商户介绍  */
-        if (!_Verify.required(this.data.fintroduction)) {
-            errTips.fintroduction = true;
-            verify = false;
-        }
-        /* 验证商户介绍  */
-        if (this.data.fintroduction == '<p><br></p>') {
-            errTips.fintroduction = true;
-            verify = false;
-        }
-        /* 验证地址  */
-        if (!_Verify.required(this.data.faddress)) {
-            errTips.faddress = true;
-            verify = false;
-        }
-        this.setData({
-            errTips
+        if (!_Verify.phoneNumber(this.data.fphonenumber)) wx.showToast({
+            title: '请检查联系方式',
         })
         return verify;
     },

+ 16 - 16
pages/storeMessage/index.wxml

@@ -1,42 +1,42 @@
 <!-- 表单 -->
 <My_GeneralTemplate padBot="20rpx">
     <view class="store_message">
-        <My_GreyRectangleForm title="品牌名" required>
-            <van-field disabled="{{isDisabled}}" value="{{ fbrand }}" bind:input='eliminate' data-name="fbrand" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fbrand}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+        <My_GreyRectangleForm title="品牌名">
+            <van-field disabled="{{isDisabled}}" value="{{ fbrand }}" bind:input='eliminate' data-name="fbrand" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
-        <My_GreyRectangleForm title="品牌LOGO" required>
-            <My_UploadFiles id="UploadFiles" fisadministrator="{{isDisabled}}" fileList="{{attinfos}}" previewSize="57px" upType="Logo" maxCount='1' Tips="请上传logo图片" bindimageChange="imageChange"></My_UploadFiles>
+        <My_GreyRectangleForm title="品牌LOGO">
+            <My_UploadFiles id="UploadFiles" fisadministrator="{{isDisabled}}" fileList="{{attinfos}}" previewSize="57px" upType="Logo" maxCount='1' bindimageChange="imageChange"></My_UploadFiles>
         </My_GreyRectangleForm>
 
-        <My_GreyRectangleForm title="品牌展示图片" required>
-            <My_UploadFiles id="UploadFiles" fisadministrator="{{isDisabled}}" fileList="{{coverAttinfos}}" previewSize="57px" upType="LogoCover" maxCount='1' Tips="请上传logo图片" bindimageChange="coverImageChange"></My_UploadFiles>
+        <My_GreyRectangleForm title="品牌展示图片">
+            <My_UploadFiles id="UploadFiles" fisadministrator="{{isDisabled}}" fileList="{{coverAttinfos}}" previewSize="57px" upType="LogoCover" maxCount='1' bindimageChange="coverImageChange"></My_UploadFiles>
         </My_GreyRectangleForm>
 
-        <My_GreyRectangleForm title="经营类目" required>
+        <My_GreyRectangleForm title="经营类目">
             <view class="manage u-line-1 {{showSaleprodclass==''?'ismanage':''}}" style="opacity: {{isDisabled?'0.3':'1'}};" bindtap="showPop">{{showSaleprodclass==''?'点击选择':showSaleprodclass}}</view>
         </My_GreyRectangleForm>
 
-        <My_GreyRectangleForm title="联系人" required>
-            <van-field disabled="{{isDisabled}}" value="{{ fcontact }}" bind:input='eliminate' data-name="fcontact" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fcontact}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+        <My_GreyRectangleForm title="联系人">
+            <van-field disabled="{{isDisabled}}" value="{{ fcontact }}" bind:input='eliminate' data-name="fcontact" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
-        <My_GreyRectangleForm title="联系方式" required>
-            <van-field disabled="{{isDisabled}}" model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+        <My_GreyRectangleForm title="联系方式">
+            <van-field disabled="{{isDisabled}}" model:value="{{ fphonenumber }}" data-name="fphonenumber" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
-        <My_GreyRectangleForm title="注册公司名" required>
-            <van-field disabled="{{isDisabled}}" value="{{ fagentname }}" bind:input='eliminate' data-name="fagentname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fagentname}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+        <My_GreyRectangleForm title="注册公司名">
+            <van-field disabled="{{isDisabled}}" value="{{ fagentname }}" bind:input='eliminate' data-name="fagentname" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
         <import src="/wxParse/wxParse" />
-        <My_GreyRectangleForm title="公司介绍" required>
+        <My_GreyRectangleForm title="公司介绍">
             <view style="width: 400rpx; text-align: right; color:{{errTips.fintroduction?'#EF2855':'#4BBECF'}} ; text-decoration: underline;" catchtap="toRichText">
                 编辑/预览
             </view>
         </My_GreyRectangleForm>
 
-        <My_GreyRectangleForm title="地址" required>
-            <van-field disabled="{{isDisabled}}" value="{{ faddress }}" bind:input='eliminate' data-name="faddress" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.faddress}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+        <My_GreyRectangleForm title="地址">
+            <van-field disabled="{{isDisabled}}" value="{{ faddress }}" bind:input='eliminate' data-name="faddress" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="统一社会代码">
             <van-field disabled="{{isDisabled}}" value="{{ fdutyparagraph }}" data-name="fdutyparagraph" bind:input='eliminate' input-class="input-class" placeholder="点击填写" border="{{ false }}" />