zhaoxiaohai il y a 3 ans
Parent
commit
276488d357

+ 2 - 0
README.md

@@ -34,6 +34,8 @@
 
 ​	My_SearchInputBox -- 搜索输入框
 
+​	My_Checkbox -- 多选框 经营类目
+
 # 缓存
 
 ​	userData -- 用户基本数据 -- 保存数据:index-用户列表下标,token,fisadministrator--是否主账号,tagentsid,tenterpriseid,userid

+ 2 - 1
app.json

@@ -15,7 +15,8 @@
         "van-field": "@vant/weapp/field/index",
         "van-icon": "@vant/weapp/icon/index",
         "My_GeneralTemplate": "/components/My_GeneralTemplate/index",
-        "My_GreyRectangleForm": "/components/My_GreyRectangleForm/index"
+        "My_GreyRectangleForm": "/components/My_GreyRectangleForm/index",
+        "My_UploadFiles":"/components/My_UploadFiles/index"
     },
     "window": {
         "backgroundTextStyle": "light",

+ 91 - 0
components/My_Checkbox/index.js

@@ -0,0 +1,91 @@
+import {
+    ApiModel
+} from "../../utils/api"
+const _Http = new ApiModel();
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        /* 标题 */
+        title: {
+            type: String,
+        },
+        /* 选中列表 */
+        saleprodclass: {
+            type: Array,
+            value: []
+        },
+        /* 回调 */
+        saleprodChange: {
+            type: Function
+        }
+
+    },
+    lifetimes: {
+        attached: function () {
+            //查询类目列表
+            _Http.basic({
+                "accesstoken": wx.getStorageSync('userData').token,
+                "classname": "enterprise.system.prodclass",
+                "method": "query_typeselectList",
+                "content": {}
+            }).then(res => {
+                if (res.msg != '成功') return;
+                let dataList = [];
+                for (let i = 0; i < res.data.length; i++) {
+                    dataList.push({
+                        value: res.data[i],
+                        index: i,
+                        checked: false
+                    })
+                }
+                //遍历选中数据
+                const arr = this.data.saleprodclass;
+                for (let i = 0; i < arr.length; i++) {
+                    for (let k = 0; k < dataList.length; k++) {
+                        if (arr[i] == dataList[k].value) {
+                            dataList[k].checked = true;
+                            break;
+                        }
+                    }
+                }
+                this.setData({
+                    dataList
+                })
+            })
+        },
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        dataList: [], //类目列表
+        pitchOnList: [], //选中列表
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        /* 确定 */
+        confirm() {
+            this.triggerEvent("saleprodChange", this.data.pitchOnList)
+        },
+        /* 多选框返回数值 */
+        checkedChange(e) {
+            this.setData({
+                pitchOnList: e.detail.value
+            });
+        },
+        /* 添加背景色 */
+        pitchOn(e) {
+            let dataList = this.data.dataList;
+            dataList[e.currentTarget.dataset.index].checked = !dataList[e.currentTarget.dataset.index].checked
+            this.setData({
+                dataList
+            })
+        }
+    }
+})

+ 6 - 0
components/My_Checkbox/index.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+
+    }
+}

+ 12 - 0
components/My_Checkbox/index.wxml

@@ -0,0 +1,12 @@
+<view class="checkbox_title">{{title}}</view>
+<checkbox-group change class="checkbox_list" bindchange="checkedChange">
+    <view wx:for="{{dataList}}" data-index="{{index}}" wx:key="{{item.index}}" bindtap="pitchOn">
+        <label class="checkbox_item {{item.checked?'choice':''}}" for="{{item.index}}">{{item.value}}</label>
+        <checkbox hidden="{{true}}" id="{{item.index}}" checked="{{item.checked}}" value="{{item.value}}"></checkbox>
+    </view>
+</checkbox-group>
+<view class="checkbox_but">
+    <view>
+        <van-button type="info" size="large" color="#4EBFCF" custom-class="customClass" bindtap="confirm">确定</van-button>
+    </view>
+</view>

+ 62 - 0
components/My_Checkbox/index.wxss

@@ -0,0 +1,62 @@
+/* 标题 */
+.checkbox_title {
+    font-size: 32rpx;
+    font-weight: 600;
+    color: #000000;
+    margin: 40rpx 0 30rpx 54rpx;
+}
+
+/* 列表 */
+.checkbox_list {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    width: 100vw;
+    min-height: 200rpx;
+    padding: 0 60rpx;
+    box-sizing: border-box;
+}
+
+/* 子项 */
+.checkbox_item {
+    display: block;
+    min-width: 180rpx;
+    height: 64rpx;
+    line-height: 64rpx;
+    text-align: center;
+    background: #F6F7F8;
+    border-radius: 40rpx;
+    font-size: 28rpx;
+    color: rgba(0, 0, 0, .5);
+    padding: 0 8rpx;
+    margin-bottom: 30rpx;
+}
+
+/* 选中后背景颜色 */
+.choice {
+    background-color: #4EBFCF;
+    color: #ffffff;
+}
+
+/* 按钮 */
+.checkbox_but {
+    position: relative;
+    width: 100vw;
+    margin: 30rpx 0 80rpx 0;
+    box-sizing: border-box;
+}
+
+.checkbox_but>view {
+    position: absolute;
+    width: 188rpx;
+    height: 64rpx;
+    background: #4EBFCF;
+    border-radius: 14rpx;
+    right: 60rpx;
+    overflow: hidden;
+}
+
+.customClass{
+    width: 100% !important;
+    height: 100% !important;
+}

+ 1 - 1
components/My_GeneralTemplate/index.wxss

@@ -2,7 +2,7 @@
 .container {
     width: 702rpx;
     background: #FFFFFF;
-    border-radius: 40px;
+    border-radius: 40rpx;
     padding-top: 40rpx;
     box-sizing: border-box;
     margin: 252rpx auto 0;

+ 15 - 5
components/My_UploadFiles/index.js

@@ -52,9 +52,9 @@ Component({
             type: String
         },
         /* 图片尺寸 */
-        previewSize:{
-            type:String,
-            value:"80px"
+        previewSize: {
+            type: String,
+            value: "80px"
         }
     },
 
@@ -203,13 +203,19 @@ Component({
                             //普通返回
                             that.setData({
                                 fileList
+                            });
+                            that.triggerEvent("imageChange", {
+                                fileList
                             })
                         } else {
-                            that.dleeteDealWith();
                             // 需要返回到父组件中 userImage
+                            if (that.data.attinfos != null) {
+                                that.dleeteDealWith();
+                            }
                             that.triggerEvent("imageChange", {
                                 fileList
                             })
+
                         }
                     }).catch(err => {
                         console.log(err)
@@ -267,16 +273,20 @@ Component({
                 "content": content
             }).then(s => {
                 if (s.msg != '成功') return;
-                console.log(s)
                 if (that.data.upType != "userImage") {
                     let fileList = that.data.fileList;
                     fileList.splice(index - 1, 1);
+                    // 需要返回到父组件中 userImage
+                    that.triggerEvent("imageChange", {
+                        fileList
+                    })
                     that.setData({
                         fileList
                     })
                 } else {
                     console.log("删除成功")
                 }
+                console.log("删除成功")
             })
         },
         /* 验证是否上传附件 */

+ 24 - 1
pages/login/index.js

@@ -12,7 +12,8 @@ Page({
      * 页面的初始数据
      */
     data: {
-        pageType: "login", //页面类型 login 手机登录页面 signin 注册页面 firm 商户认证 changeUser 切换用户
+        popups: false, //弹出层控制
+        pageType: "firm", //页面类型 login 手机登录页面 signin 注册页面 firm 商户认证 changeUser 切换用户
         butText: "", //按钮文本
         /* 登录 */
         fphonenumber: 17757394388, //手机号码
@@ -51,6 +52,22 @@ Page({
         /* 设置按钮文本 */
         this.changeButText()
     },
+
+    /* 选择类目回调 */
+    saleprodChange(arr) {
+        let {
+            detail
+        } = arr, showSaleprodclass = "";
+        console.log(arr)
+        for (let i = 0; i < detail.length; i++) {
+            showSaleprodclass += (detail[i] + ',');
+        };
+        this.setData({
+            popups: false,
+            saleprodclass: detail,
+            showSaleprodclass: showSaleprodclass.slice(0, showSaleprodclass.length - 1)
+        })
+    },
     /* 缓存登录用户关键数据 */
     retentionOfCriticalData(index) {
         //获取用户选择的信息列表
@@ -347,6 +364,12 @@ Page({
             })
         }
     },
+    /* 弹出层控制 */
+    showPop() {
+        this.setData({
+            popups: !this.data.popups
+        })
+    },
     /**
      * 生命周期函数--监听页面初次渲染完成
      */

+ 2 - 1
pages/login/index.json

@@ -4,6 +4,7 @@
     "My_RectangularFrame": "../../components/My_RectangularFrame/index",
     "My_ChangeUser": "../../components/My_ChangeUser/index",
     "My_UploadFiles": "../../components/My_UploadFiles/index",
-    "My_inputPromptd": "../../components/My_inputPromptd/index"
+    "van-action-sheet": "@vant/weapp/action-sheet/index",
+    "My_Checkbox":"/components/My_Checkbox/index"
   }
 }

+ 8 - 6
pages/login/index.wxml

@@ -64,14 +64,12 @@
                 <My_UploadFiles id="loadFiles" UploadShow="{{true}}" upType="Logo" maxCount='1' logoTips="{{errTips.logoTips}}" Tips="请上传logo图片"></My_UploadFiles>
             </view>
             <!-- 经营类目 -->
-            <view style="position: relative;">
+            <view style="position: relative; margin-bottom: 15rpx;">
                 <view class="input_text_title">经营类目<text>*</text></view>
-                <view class="input_text_tips">
-                    <My_inputPromptd show="{{errTips.tipsShow}}" text="多种经营类目请以“空格”分隔"></My_inputPromptd>
-                </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">
-                        <van-field autosize model:value="{{ showSaleprod }}" data-name="showSaleprod" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.showSaleprod}}" input-class="input-class" placeholder="请输入经营类目" border="{{ false }}" />
+                        <van-field autosize model:value="{{ showSaleprodclass }}" data-name="showSaleprod" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.showSaleprod}}" input-class="input-class" placeholder="请输入经营类目" border="{{ false }}" />
                     </view>
                 </view>
             </view>
@@ -136,4 +134,8 @@
     <text bindtap="jumpOverToIndex">{{pageType=="signin"?'进入首页':'跳过'}}</text>
 </view>
 <!-- 背景图片 -->
-<My_Background></My_Background>
+<My_Background></My_Background>
+<!-- 弹出层 -->
+<van-action-sheet show="{{ popups }}" bind:close="showPop">
+    <My_Checkbox title="经营类目" saleprodclass="{{saleprodclass}}" bind:saleprodChange="saleprodChange"></My_Checkbox>
+</van-action-sheet>

+ 234 - 4
pages/storeMessage/index.js

@@ -1,20 +1,250 @@
-// pages/storeMessage/index.js
+import {
+    ApiModel
+} from "../../utils/api";
+const _Http = new ApiModel();
+import {
+    TestVerify
+} from "../../utils/verify";
+const _Verify = new TestVerify();
 Page({
 
     /**
      * 页面的初始数据
      */
     data: {
-
+        fisadministrator: (wx.getStorageSync('userData').fisadministrator == 1) ? true : false, //是否主账号
+        butText: "保存", //按钮文字
+        disabled: false, //禁用
+        popups: false, //弹出层控制
+        /*  */
+        fbrand: "", //品牌名称
+        attinfos: [], // 图片列表
+        isLogo: [], //用于判断是否上传logo
+        saleprodclass: [], //经营类目
+        showSaleprodclass: "", //显示经营类目
+        fcontact: "", //联系人
+        fphonenumber: "", //联系方式
+        fagentname: "", //商户名称
+        fintroduction: "", //商户介绍
+        faddress: "", //地址
+        fdutyparagraph: "", //统一社会代码
+        requestType: "普通修改", //请求类型
+        /*  */
+        errTips: {
+            fbrand: false,
+            attinfos: false,
+            saleprodclass: false,
+            fcontact: false,
+            fphonenumber: false,
+            fagentname: false,
+            fintroduction: false,
+            faddress: false,
+        }
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-
+        _Http.basic({
+            "accesstoken": wx.getStorageSync('userData').token,
+            "classname": "customer.tagents.tagents",
+            "method": "query_enterpriseAgentsMain",
+            "content": {}
+        }).then(res => {
+            console.log(res)
+            const data = res.data[0];
+            let butText = '保存',
+                disabled = false;
+            if (data.ftype == '个人' && data.fisauthenticating == 1) {
+                wx.showToast({
+                    title: '商户信息审核中',
+                    icon: "none",
+                    duration: 5000,
+                })
+                butText = "审核中";
+                disabled = true;
+                this.returnData(data)
+            } else if (data.ftype == '个人' && data.fisauthenticating == 0) {
+                butText = "立即认证";
+                this.setData({
+                    requestType: "商户认证"
+                })
+            } else {
+                this.returnData(data)
+            };
+            this.setData({
+                butText,
+                disabled
+            })
+        })
+    },
+    /* 选择类目回调 */
+    saleprodChange(arr) {
+        let {
+            detail
+        } = arr, showSaleprodclass = "";
+        console.log(arr)
+        for (let i = 0; i < detail.length; i++) {
+            showSaleprodclass += (detail[i] + ',');
+        };
+        this.setData({
+            popups: false,
+            saleprodclass: detail,
+            showSaleprodclass: showSaleprodclass.slice(0, showSaleprodclass.length - 1)
+        })
+    },
+    /* 返回数据 */
+    returnData(data) {
+        console.log(data)
+        let imageData = [];
+        if (data.attinfos.length >= 1) {
+            imageData = [{
+                url: data.attinfos[0].fobsurl,
+                ownerid: data.attinfos[0].ownerid,
+                tattachmentid: data.attinfos[0].tattachmentid
+            }];
+        }
+        this.saleprodChange({
+            detali: data.saleprodclass
+        })
+        this.setData({
+            fbrand: data.fbrand,
+            saleprodclass: data.saleprodclass,
+            fcontact: data.fcontact,
+            fphonenumber: data.fphonenumber,
+            fintroduction: data.fintroduction,
+            fagentname: data.fagentname,
+            faddress: data.faddress,
+            fdutyparagraph: data.fdutyparagraph,
+            attinfos: imageData,
+            isLogo: imageData
+        })
+    },
+    /* 提交数据 */
+    submit() {
+        if (!this.formVerify()) return wx.showToast({
+            title: '请检查表单内容',
+            icon: "error"
+        });
+        /* 验证附件列表  */
+        if (!_Verify.required(this.data.isLogo, "请上传品牌logo")) return;
+        /* 发送请求 */
+        _Http.basic({
+            "accesstoken": wx.getStorageSync('userData').token,
+            "classname": "customer.tagents.tagents",
+            "method": "modify_enterpriseAgent",
+            "content": {
+                "ftype": this.data.requestType,
+                "data": [{
+                    "fbrand": this.data.fbrand,
+                    "saleprodclass": this.data.saleprodclass,
+                    "fcontact": this.data.fcontact,
+                    "fphonenumber": this.data.fphonenumber,
+                    "fagentname": this.data.fagentname,
+                    "fintroduction": this.data.fintroduction,
+                    "faddress": this.data.faddress,
+                    "fdutyparagraph": this.data.fdutyparagraph,
+                }]
+            }
+        }).then(res => {
+            if (res.data == '成功') {
+                wx.showToast({
+                    title: '提交成功',
+                });
+                wx.navigateBack({
+                    delta: 1,
+                })
+            }
+        })
+    },
+    /* 表单验证 */
+    formVerify() {
+        let errTips = this.data.errTips,
+            verify = true;
+        /* 验证品牌名 */
+        if (!_Verify.required(this.data.fbrand)) {
+            errTips.fbrand = true;
+            verify = false;
+        }
+        /* 验证经营类目  */
+        if (!_Verify.required(this.data.saleprodclass)) {
+            errTips.saleprodclass = 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.fagentname)) {
+            errTips.fagentname = true;
+            verify = false;
+        }
+        /* 验证商户介绍  */
+        if (!_Verify.required(this.data.fintroduction)) {
+            errTips.fintroduction = true;
+            verify = false;
+        }
+        /* 验证地址  */
+        if (!_Verify.required(this.data.faddress)) {
+            errTips.faddress = true;
+            verify = false;
+        }
+        this.setData({
+            errTips
+        })
+        return verify;
+    },
+    /* 弹出层 */
+    showPop() {
+        this.setData({
+            popups: !this.data.popups
+        })
+    },
+    /* 获取焦点 */
+    inputFocus(e) {
+        const {
+            name
+        } = e.currentTarget.dataset;
+        let errTips = this.data.errTips;
+        errTips[name] = false;
+        this.setData({
+            errTips
+        })
+    },
+    /* 失去焦点 */
+    inputBlur(e) {
+        const {
+            name
+        } = e.currentTarget.dataset;
+        const {
+            value
+        } = e.detail;
+        /* 联系方式验证 */
+        if (name == 'fphonenumber') {
+            _Verify.phoneNumber(this.data.fphonenumber, true)
+        }
+        if (value.trim() == "") {
+            let errTips = this.data.errTips;
+            errTips[name] = true;
+            this.setData({
+                errTips
+            })
+        }
+    },
+    /* 更改logo */
+    logoChange(data) {
+        this.setData({
+            isLogo: data.detail.fileList
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */

+ 4 - 1
pages/storeMessage/index.json

@@ -1,3 +1,6 @@
 {
-  "usingComponents": {}
+  "usingComponents": {
+    "van-action-sheet": "@vant/weapp/action-sheet/index",
+    "My_Checkbox":"/components/My_Checkbox/index"
+  }
 }

+ 17 - 12
pages/storeMessage/index.wxml

@@ -1,43 +1,48 @@
+<!-- 表单 -->
 <My_GeneralTemplate padBot="20rpx">
     <view class="store_message">
         <My_GreyRectangleForm title="品牌名" required>
-            <van-field autosize model:value="{{ fname }}" data-name="fname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fname}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+            <van-field autosize model:value="{{ fbrand }}" data-name="fbrand" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fbrand}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="品牌LOGO" required>
+            <My_UploadFiles id="loadFiles" UploadShow="{{true}}" fileList="{{attinfos}}" bind:imageChange="logoChange" previewSize="65px" upType="Logo" maxCount='1' Tips="请上传logo图片"></My_UploadFiles>
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="经营类目" required>
-            <van-field autosize model:value="{{ fname }}" data-name="fname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fname}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+            <view style="width: 100%; height: 100%; z-index: 999; position: absolute;" bindtap="showPop"></view>
+            <van-field autosize model:value="{{ showSaleprodclass }}" data-name="saleprodclass" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.saleprodclass}}" input-class="input-class" placeholder="点击设置" border="{{ false }}" />
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="联系人" required>
-            <van-field autosize model:value="{{ fname }}" data-name="fname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fname}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+            <van-field autosize model:value="{{ fcontact }}" data-name="fcontact" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fcontact}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="联系方式" required>
-            <van-field autosize model:value="{{ fname }}" data-name="fname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fname}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+            <van-field autosize 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="注册公司名" required>
-            <van-field autosize model:value="{{ fname }}" data-name="fname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fname}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+            <van-field autosize model:value="{{ fagentname }}" data-name="fagentname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fagentname}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="公司介绍" required>
-            <van-field autosize model:value="{{ fname }}" data-name="fname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fname}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+            <van-field autosize model:value="{{ fintroduction }}" data-name="fintroduction" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fintroduction}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="地址" required>
-            <van-field autosize model:value="{{ fname }}" data-name="fname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fname}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+            <van-field autosize model:value="{{ faddress }}" data-name="faddress" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.faddress}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
-
-        <My_GreyRectangleForm title="统一社会代码" required>
-            <van-field autosize model:value="{{ fname }}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+        <My_GreyRectangleForm title="统一社会代码">
+            <van-field autosize model:value="{{ fdutyparagraph }}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
-
     </view>
 </My_GeneralTemplate>
+<!-- 弹出层 -->
+<van-action-sheet show="{{ popups }}" bind:close="showPop">
+    <My_Checkbox title="经营类目" saleprodclass="{{saleprodclass}}"  bind:saleprodChange="saleprodChange"></My_Checkbox>
+</van-action-sheet>
 <!-- 提交按钮 -->
 <view class="submit_but">
-    <van-button bindtap="submit" custom-class="custom-class" round color="linear-gradient(180deg, #82E0E9 0%, #4BBECF 100%);">保存</van-button>
+    <van-button bindtap="submit" custom-class="custom-class" round color="linear-gradient(180deg, #82E0E9 0%, #4BBECF 100%);">{{butText}}</van-button>
 </view>

+ 0 - 11
pages/teamManagement/index.js

@@ -17,17 +17,6 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {},
-    /* 模糊搜索 */
-    searchQuery(value) {
-        let memberList = this.data.memberList;
-        const value1 = value.detail;
-        let query = memberList.filter((item, index) => {
-            if (item.fname == value1 || item.fphonenumber == value1 || item.frole == value1) {
-                return item;
-            }
-        });
-        console.log(query)
-    },
     /* 修改成员信息 */
     changeMemberMessage(e) {
         const {