zhaoxiaohai %!s(int64=4) %!d(string=hai) anos
pai
achega
cc8038f5bc

+ 12 - 0
README.md

@@ -32,6 +32,8 @@
 
 ​	My_MembersAndProducts -- 团队管理与产品管理
 
+​	My_SearchInputBox -- 搜索输入框
+
 # 缓存
 
 ​	userData -- 用户基本数据 -- 保存数据:index-用户列表下标,token,fisadministrator--是否主账号,tagentsid,tenterpriseid,userid
@@ -48,6 +50,16 @@
 
 ​	#ED6876 -- 报错颜色
 
+# js文件
+
+Http.js 封装请求
+
+api.js 封装接口
+
+md5.js 表单加密
+
+verify.js 表单验证
+
 # UI组件库修改
 
 ​	van-cell -- wxss -- 注释了 -- padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px)

+ 2 - 2
app.json

@@ -6,9 +6,9 @@
         "pages/teamManagement/index",
         "pages/teamManagement/change",
         "pages/productManagement/index",
-        "pages/productManagement/change",
         "pages/storeMessage/index",
-        "pages/announceDemand/index"
+        "pages/announceDemand/index",
+        "pages/productManagement/change"
     ],
     "usingComponents": {
         "van-button": "@vant/weapp/button/index",

+ 1 - 0
components/My_GreyRectangleForm/index.wxss

@@ -9,6 +9,7 @@
 
 /* 插槽 */
 .grey_rectangle_slot{
+    position: relative;
     display: flex;
     align-items: center;
 }

+ 2 - 1
components/My_MembersAndProducts/index.js

@@ -10,7 +10,8 @@ Component({
         },
         /* 图片 */
         attinfos: {
-            type: Object
+            type: Object,
+            value:{}
         },
         /* 标题 */
         title: {

+ 58 - 0
components/My_SearchInputBox/index.js

@@ -0,0 +1,58 @@
+// components/My_SearchInputBox/index.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        /* 搜索方法 */
+        searchQuery: {
+            type: Function
+        },
+        /* 新增按钮跳转 */
+        route: {
+            type: String
+        }
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        text: ""
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        /* 输入 */
+        inputText(e) {
+            this.setData({
+                text: e.detail.value
+            })
+        },
+        /* 失去焦点 */
+        searchBlur(e) {
+            const {
+                value
+            } = e.detail;
+            this.triggerEvent("searchQuery", value.trim())
+        },
+        /* 跳转页面 */
+        itemAdd() {
+            if (this.data.route == 'product') {
+                wx.navigateTo({
+                    url: '/pages/productManagement/change',
+                })
+            }
+
+        },
+        /* 清空 */
+        clearInput() {
+            this.setData({
+                text: ""
+            })
+            this.triggerEvent("searchQuery", '')
+        }
+    }
+})

+ 4 - 0
components/My_SearchInputBox/index.json

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

+ 9 - 0
components/My_SearchInputBox/index.wxml

@@ -0,0 +1,9 @@
+<view class="search_box">
+    <view class="searc">
+        <van-icon name="search" /><input type="search" confirm-type="search" placeholder="请输入搜索关键字" value="{{text}}" bindblur='searchBlur' bindinput="inputText" />
+        <view class="clear" bindtap="clearInput"><van-icon name="clear" /></view>
+    </view>
+    <view class="searc_but" bindtap="itemAdd">
+        <van-icon name="add" />新增
+    </view>
+</view>

+ 50 - 0
components/My_SearchInputBox/index.wxss

@@ -0,0 +1,50 @@
+.search_box {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    height: 60rpx;
+    width: 100vw;
+    padding: 0 24rpx;
+    box-sizing: border-box;
+    margin-top: 30rpx;
+}
+
+.searc {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    height: 100%;
+    background: #FFFFFF;
+    border-radius: 10rpx;
+    opacity: 0.37;
+    padding-left: 20rpx;
+}
+
+input {
+    flex: 1;
+    text-align: left;
+    padding-left: 5rpx;
+}
+
+.searc_but {
+    width: 118rpx;
+    height: 60rpx;
+    line-height: 60rpx;
+    text-align: center;
+    background: #4BBECF;
+    border-radius: 10rpx;
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #FFFFFF;
+    margin-left: 16rpx;
+}
+
+.clear {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 50rpx;
+    height: 100%;
+    line-height: 100%;
+    z-index: 999;
+}

+ 24 - 1
components/My_UploadFiles/index.js

@@ -15,7 +15,7 @@ Component({
         attinfos: {
             type: Object
         },
-        /* 上传类型 Logo-品牌logo userImage-用户头像 */
+        /* 上传类型 Logo-品牌logo userImage-用户头像  productImage-产品图片*/
         upType: {
             type: String
         },
@@ -46,6 +46,15 @@ Component({
         /* 返回图片数据函数 */
         imageChange: {
             type: Function
+        },
+        /* 产品ID */
+        tagents_productid: {
+            type: String
+        },
+        /* 图片尺寸 */
+        previewSize:{
+            type:String,
+            value:"80px"
         }
     },
 
@@ -132,6 +141,20 @@ Component({
                         "ftype": "headportrait"
                     }
                 }
+            } else if (this.data.upType == 'productImage') {
+                //产品图片上传
+                data = {
+                    "accesstoken": wx.getStorageSync('userData').token,
+                    "classname": "system.system.docManage",
+                    "method": "getFileName",
+                    "content": {
+                        "filename": timestamp,
+                        "filetype": ext,
+                        "ownertable": "tagents_product",
+                        "ownerid": this.data.tagents_productid,
+                        "ftype": "default"
+                    }
+                }
             }
             //发送请求
             wx.getFileSystemManager().readFile({

+ 3 - 3
components/My_UploadFiles/index.wxml

@@ -1,13 +1,13 @@
-<van-uploader file-list="{{ fileList }}" max-count="{{maxCount}}" bind:after-read="afterRead" deletable="{{ true }}" use-before-read bind:before-read="beforeRead" bind:delete="imagesDelete">
+<van-uploader file-list="{{ fileList }}" preview-size='{{previewSize}}' max-count="{{maxCount}}" bind:after-read="afterRead" deletable="{{ true }}" use-before-read bind:before-read="beforeRead" bind:delete="imagesDelete">
     <!-- 默认样式 -->
-    <block wx:if="{{UploadShow}}">
+    <view wx:if="{{UploadShow}}" style="height: 100%; display: flex; align-items: center;">
         <view class="upImage_ltem">
             <van-icon class="upImage_add" name="plus" />
         </view>
         <view class="image-tips" wx:if="{{logoTips}}">
             <van-icon name="clear" />{{Tips}}
         </view>
-    </block>
+    </view>
     <!-- 文本样式 -->
     <view wx:else style="display: flex;align-items: center; height: {{lineHeight}};">
         <slot></slot>

+ 4 - 0
components/My_UploadFiles/index.wxss

@@ -23,4 +23,8 @@
     top: 50%;
     right: -365rpx;
     transform: translate(0,-50%);
+}
+
+.van-uploader__preview-image{
+    width: 50rpx !important;
 }

+ 268 - 9
pages/productManagement/change.js

@@ -1,23 +1,282 @@
-// pages/productManagement/change.js
-Component({
+import {
+    ApiModel
+} from "../../utils/api";
+const _Http = new ApiModel();
+import {
+    TestVerify
+} from "../../utils/verify";
+const _Verify = new TestVerify();
+Page({
+
     /**
-     * 组件的属性列表
+     * 页面的初始数据
      */
-    properties: {
+    data: {
+        fprodname: "", //产品名称
+        fprodnum: "", //产品编码
+        attinfos: [], //附件列表
+        fintroduction: "", //产品说明
+        ftag: [], //产品标签
+        showSaleprod: "", //标签显示
+        tagents_productid: 0, //识别产品ID
+        checked: false, //开关控件
+        newAdd: false, //新增标识,新增时true,在保存后会更改为false 如果退出页面仍为true 改产品会被删除
+        errTips: {
+            fprodname: false,
+            fprodnum: false,
+            showSaleprod: false,
+        }
+    },
 
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        if (options.data) {
+            const data = JSON.parse(options.data)
+            let imageList = []
+            console.log(data)
+            /* 格式化图片列表 */
+            for (let i = 0; i < data.attinfos.length; i++) {
+                let obj = {
+                    url: data.attinfos[i].fobsurl,
+                    ownerid: data.attinfos[i].ownerid,
+                    tattachmentid: data.attinfos[i].tattachmentid
+                }
+                imageList.push(obj)
+            };
+            /* 是否上架 */
+            if (data.fisonsale == 1) {
+                this.setData({
+                    checked: true
+                })
+            }
+            let showSaleprod = "",
+                ftag = data.ftag
+            /* 空标签转换为数组格式 */
+            if (data.ftag == null || data.ftag == '') {
+                console.log(21)
+                ftag = []
+            } else {
+                /* 字符串数组转换数组 */
+                for (var i = 0; i < ftag.length; i++) {
+                    showSaleprod += ftag[i] + ' ';
+                }
+            }
+            /* 渲染数据 */
+            this.setData({
+                fprodname: data.fprodname, //产品名称
+                fprodnum: data.fprodnum, //产品编码
+                attinfos: imageList, //附件列表
+                fintroduction: data.fintroduction, //产品说明
+                fisonsale: data.fisonsale, //是否上架
+                ftag: ftag, //产品标签
+                tagents_productid: data.tagents_productid, //识别产品ID
+                showSaleprod, // 显示标签
+            });
+        } else {
+            //新增产品,先新建一个产品,未保存退出页面会删除
+            this.submit();
+            this.setData({
+                newAdd: true
+            })
+        }
     },
 
     /**
-     * 组件的初始数据
+     * 生命周期函数--监听页面初次渲染完成
      */
-    data: {
+    onReady: function () {
+
+    },
+    /* 上架开关 */
+    switchChange() {
+        const checked = !this.data.checked;
+        this.setData({
+            checked
+        });
+        const fisonsale = (checked) ? 1 : 0;
+        _Http.basic({
+            "accesstoken": wx.getStorageSync('userData').token,
+            "classname": "customer.products.products",
+            "method": "updatesalestatus",
+            "content": {
+                "productlist": [{
+                    "tagents_productid": this.data.tagents_productid,
+                    "fisonsale": fisonsale
+                }]
+            }
+        }).then(res => {
+            console.log(res)
+            if (res.msg != "成功") return wx.showToast({
+                title: res.data,
+                icon: "error"
+            })
+        })
+    },
+    /* 表单验证 */
+    formVerify() {
+        let errTips = this.data.errTips,
+            verify = true;
+        /* 验证产品名称  */
+        if (!_Verify.required(this.data.fprodname)) {
+            errTips.fprodname = true;
+            verify = false;
+        }
+        /* 验证产品编码  */
+        if (!_Verify.required(this.data.fprodnum)) {
+            errTips.fprodnum = true;
+            verify = false;
+        }
+        /* 验证附件列表  */
+        if (!_Verify.required(this.data.attinfos, "请上传产品图片")) {
+            errTips.fprodnum = true;
+        }
+        this.setData({
+            errTips
+        })
+        return verify;
+    },
+    /* 提交 */
+    submit() {
+        if (!this.formVerify()) return;
+        let content = {};
+        //请求参数
+        if (this.data.tagents_productid != 0) {
+            content = {
+                "tagents_productid": this.data.tagents_productid,
+                "fprodnum": this.data.fprodnum,
+                "fprodname": this.data.fprodname,
+                "fintroduction": this.data.fintroduction,
+                "ftag": this.data.ftag,
+            }
+        } else {
+            content = {
+                "tagents_productid": 0
+            }
+        };
+        _Http.basic({
+            "accesstoken": wx.getStorageSync('userData').token,
+            "classname": "customer.products.products",
+            "method": "insertOrModifyProducts",
+            "content": content
+        }).then(res => {
+            console.log(res)
+            if (res.msg == "成功") {
+                if (this.data.tagents_productid != 0) {
+                    //非新增项目
+                    wx.showToast({
+                        title: '保存成功',
+                    })
+                    this.setData({
+                        newAdd: false
+                    })
+                    setTimeout(() => {
+                        wx.navigateBack({
+                            delta: 1,
+                        })
+                    }, 500)
+                } else {
+                    //新增未保存项目
+                    this.setData({
+                        tagents_productid: res.data[0].tagents_productid
+                    })
+                }
+            }
+        })
+    },
+    /* 获取焦点 */
+    inputFocus(e) {
+        const {
+            name
+        } = e.currentTarget.dataset;
+        let errTips = this.data.errTips;
+        errTips[name] = false;
+        /* 经营类目提示框 */
+        if (name == 'showSaleprod') {
+            errTips[name] = true;
+            console.log(23)
+        }
+        this.setData({
+            errTips
+        })
+    },
+    /* 失去焦点 */
+    inputBlur(e) {
+        const {
+            name
+        } = e.currentTarget.dataset;
+        const {
+            value
+        } = e.detail;
+        /* 经营类目提示框,字符串转化数组 */
+        if (name == 'showSaleprod') {
+            let errTips = this.data.errTips;
+            const ftag = this.data.showSaleprod.split(" ");
+            errTips[name] = false;
+            this.setData({
+                ftag,
+                errTips
+            })
+        };
+        if (value.trim() == "") {
+            let errTips = this.data.errTips;
+            errTips[name] = true;
+            this.setData({
+                errTips
+            })
+        }
+    },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+        if (this.data.newAdd) {
+            _Http.basic({
+                "accesstoken": wx.getStorageSync('userData').token,
+                "classname": "customer.products.products",
+                "method": "deleteProducts",
+                "content": {
+                    "tagents_productid": this.data.tagents_productid
+                }
+            }).then(res => {
+                console.log(res)
+            })
+        }
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
 
     },
 
     /**
-     * 组件的方法列表
+     * 用户点击右上角分享
      */
-    methods: {
+    onShareAppMessage: function () {
 
     }
-})
+})

+ 3 - 2
pages/productManagement/change.json

@@ -1,6 +1,7 @@
 {
-    "component": true,
     "usingComponents": {
-        "van-switch": "@vant/weapp/switch/index"
+        "van-switch": "@vant/weapp/switch/index",
+        "My_UploadFiles": "/components/My_UploadFiles/index",
+        "My_inputPromptd": "/components/My_inputPromptd/index"
     }
 }

+ 14 - 9
pages/productManagement/change.wxml

@@ -1,30 +1,35 @@
 <My_GeneralTemplate padBot="20rpx">
     <view class="product_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="{{ fprodname }}" data-name="fprodname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fprodname}}" 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="{{ fprodnum }}" data-name="fprodnum" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fprodnum}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="产品图" required>
-
+            <My_UploadFiles fileList="{{attinfos}}" upType="productImage" UploadShow="{{true}}" maxCount="3" tagents_productid="{{tagents_productid}}" previewSize="65px"></My_UploadFiles>
         </My_GreyRectangleForm>
 
-        <My_GreyRectangleForm title="标签" required>
-            <van-field autosize model:value="{{ fname }}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+        <My_GreyRectangleForm title="标签">
+            <view class="input_text_tips">
+                <My_inputPromptd show="{{errTips.showSaleprod}}" text="多种产品标签请以“空格”分隔"></My_inputPromptd>
+            </view>
+            <van-field autosize model:value="{{ showSaleprod }}" data-name="showSaleprod" input-class="input-class" bind:focus='inputFocus' bindblur='inputBlur' 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="{{ fintroduction }}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
-        <My_GreyRectangleForm title="是否启用">
-            <van-switch style="position: absolute; margin-left: -110rpx; margin-top: 10rpx;" checked="{{ checked }}" bind:change="onChange" />
+        <My_GreyRectangleForm title="是否上架">
+            <van-switch style="position: absolute; margin-left: -110rpx; margin-top: 10rpx;" checked="{{ checked }}" bind:change="switchChange" />
         </My_GreyRectangleForm>
+
     </view>
 </My_GeneralTemplate>
+
 <!-- 提交按钮 -->
 <view class="submit_but">
     <van-button bindtap="submit" custom-class="custom-class" round color="linear-gradient(180deg, #82E0E9 0%, #4BBECF 100%);">保存</van-button>

+ 8 - 0
pages/productManagement/change.wxss

@@ -2,4 +2,12 @@
 
 .product_message {
     padding: 0 30rpx;
+}
+
+/* 输入提示定位 */
+.input_text_tips{
+    position: absolute;
+    top: 0;
+    left: 120rpx;
+    transform: translate(0,-110%);
 }

+ 49 - 13
pages/productManagement/index.js

@@ -10,14 +10,42 @@ Page({
     data: {
         active: 0, //tabs选中下标
         pageNumber: 1, //请求页号
+        pageTotal: 1, //总页码
         productList: [], //产品列表
+        loadMore: true, //加载更多
+        fisadministrator: false, //是否主账号
+        searchContent: "", //模糊搜索字段
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-
+        this.setData({
+            fisadministrator: (wx.getStorageSync('userData').fisadministrator == 1) ? true : false
+        })
+    },
+    /* 搜索查询 */
+    searchQuery(value) {
+        if (value.detail == this.data.searchContent) return;
+        this.gettingData(this.data.active, value.detail)
+        this.setData({
+            searchContent: value.detail
+        })
+    },
+    /* 滑动区域上拉触底 */
+    scrolltolower() {
+        if (this.data.loadMore) {
+            if (this.data.pageNumber < this.data.pageTotal) {
+                this.setData({
+                    pageNumber: this.data.pageNumber + 1
+                })
+                this.gettingData(this.data.active)
+            }
+            this.setData({
+                loadMore: false
+            })
+        }
     },
     /* tabs 切换事件 */
     tabsChange(e) {
@@ -25,9 +53,12 @@ Page({
             index
         } = e.detail;
         this.setData({
-            active: e.detail.index
+            active: e.detail.index,
+            pageNumber: 1, //请求页号
+            pageTotal: 1, //总页码
+            loadMore: true //加载更多
         })
-        this.gettingData(index)
+        this.gettingData(index, this.data.searchContent)
     },
     /* 获取数据 */
     gettingData(index, value) {
@@ -57,17 +88,20 @@ Page({
                 "where": where
             }
         }).then(res => {
-            console.log(res)
             if (res.msg != '成功') return;
+            console.log(res)
+            /* 拼接列表 */
+            let productList = [];
+            if (this.data.pageNumber != 1) {
+                productList = this.data.productList.concat(res.data);
+            } else {
+                productList = res.data;
+            }
             this.setData({
-                productList: res.data
+                productList,
+                loadMore: true, //加载更多
+                pageTotal: res.pageTotal
             })
-            //增加页码
-            if (res.pageTotal > res.pageNumber) {
-                this.setData({
-                    pageNumber: res.pageNumber + 1
-                })
-            }
         })
     },
     /* 产品信息修改 */
@@ -75,8 +109,10 @@ Page({
         const {
             index
         } = e.currentTarget.dataset;
-        console.log(index)
-        
+        const data = JSON.stringify(this.data.productList[index])
+        wx.navigateTo({
+            url: '/pages/productManagement/change?data=' + data,
+        })
     },
     /**
      * 生命周期函数--监听页面初次渲染完成

+ 4 - 1
pages/productManagement/index.json

@@ -2,6 +2,9 @@
   "usingComponents": {
     "My_MembersAndProducts": "/components/My_MembersAndProducts/index",
     "van-tab": "@vant/weapp/tab/index",
-    "van-tabs": "@vant/weapp/tabs/index"
+    "van-tabs": "@vant/weapp/tabs/index",
+    "van-divider": "@vant/weapp/divider/index",
+    "van-loading": "@vant/weapp/loading/index",
+    "My_SearchInputBox":"/components/My_SearchInputBox/index"
   }
 }

+ 42 - 5
pages/productManagement/index.wxml

@@ -1,10 +1,47 @@
+<My_SearchInputBox bind:searchQuery="searchQuery" route="product"></My_SearchInputBox>
 <My_GeneralTemplate padBot="20rpx">
     <view class="product_list">
-        <van-tabs active="{{ active }}" bind:change="tabsChange">
-            <van-tab title="全部" />
-            <van-tab title="上架中" />
-            <van-tab title="已下架" />
+        <!-- tabs -->
+        <van-tabs swipeable active="{{ active }}" bind:change="tabsChange" color="#4BBECF" title-active-color='#4BBECF'>
+            <van-tab title="全部">
+                <!-- 占位 -->
+                <view style="height: 30rpx;"></view>
+                <!-- 滚动区域 -->
+                <scroll-view scroll-y="true" style="max-height: 60vh;" lower-threshold="500px" scroll-top="0px" bindscrolltolower="scrolltolower">
+                    <!-- 产品列表 -->
+                    <My_MembersAndProducts wx:for="{{productList}}" wx:key="{{item.tagents_productid}}" bind:changeMessage="changeProductMessage" data-index="{{index}}" attinfos="{{item.attinfos[0]}}" imgSize="120rpx" radius="8rpx" title="{{item.fprodname}}" twoRow="{{item.fintroduction}}" threeRow="{{item.ftag}}"  fisadministrator="{{fisadministrator}}"></My_MembersAndProducts>
+                    <!-- 上拉到底,加载中样式 -->
+                    <van-loading wx:if="{{pageTotal>pageNumber}}" style="width: 100%;display: flex; justify-content: center;" size="24px" color="#4BBECF">加载中...</van-loading>
+                    <!-- 全部加载完成 -->
+                    <van-divider wx:else contentPosition="center">我也是有底线的</van-divider>
+                </scroll-view>
+            </van-tab>
+            <van-tab title="上架中">
+                <!-- 占位 -->
+                <view style="height: 30rpx;"></view>
+                <!-- 滚动区域 -->
+                <scroll-view scroll-y="true" style="max-height: 60vh;" bindscrolltolower="scrolltolower">
+                    <!-- 产品列表 -->
+                    <My_MembersAndProducts wx:for="{{productList}}" wx:key="{{item.tagents_productid}}" bind:changeMessage="changeProductMessage" data-index="{{index}}" attinfos="{{item.attinfos[0]}}" imgSize="120rpx" radius="8rpx" title="{{item.fprodname}}" twoRow="{{item.fintroduction}}" threeRow="{{item.ftag}}"  fisadministrator="{{fisadministrator}}"></My_MembersAndProducts>
+                    <!-- 上拉到底,加载中样式 -->
+                    <van-loading wx:if="{{pageTotal>pageNumber}}" style="width: 100%;display: flex; justify-content: center;" size="24px" color="#4BBECF">加载中...</van-loading>
+                    <!-- 全部加载完成 -->
+                    <van-divider wx:else contentPosition="center">我也是有底线的</van-divider>
+                </scroll-view>
+            </van-tab>
+            <van-tab title="已下架">
+                <!-- 占位 -->
+                <view style="height: 30rpx;"></view>
+                <!-- 滚动区域 -->
+                <scroll-view scroll-y="true" style="max-height: 60vh;" bindscrolltolower="scrolltolower">
+                    <!-- 产品列表 -->
+                    <My_MembersAndProducts wx:for="{{productList}}" wx:key="{{item.tagents_productid}}" bind:changeMessage="changeProductMessage" data-index="{{index}}" attinfos="{{item.attinfos[0]}}" imgSize="120rpx" radius="8rpx" title="{{item.fprodname}}" twoRow="{{item.fintroduction}}" threeRow="{{item.ftag}}" fisadministrator="{{fisadministrator}}"></My_MembersAndProducts>
+                    <!-- 上拉到底,加载中样式 -->
+                    <van-loading wx:if="{{pageTotal>pageNumber}}" style="width: 100%;display: flex; justify-content: center;" size="24px" color="#4BBECF">加载中...</van-loading>
+                    <!-- 全部加载完成 -->
+                    <van-divider wx:else contentPosition="center">我也是有底线的</van-divider>
+                </scroll-view>
+            </van-tab>
         </van-tabs>
-        <My_MembersAndProducts wx:for="{{productList}}" bind:changeMessage="changeProductMessage" data-index="{{index}}" attinfos="{{item.attinfos[0]}}" imgSize="120rpx" radius="8rpx" title="{{item.fprodname}}" twoRow="{{item.fintroduction}}" threeRow="{{item.ftag}}" fisadministrator></My_MembersAndProducts>
     </view>
 </My_GeneralTemplate>

+ 2 - 2
pages/productManagement/index.wxss

@@ -1,3 +1,3 @@
-.product_list{
+.product_list {
     padding: 0 30rpx;
-}
+}

+ 4 - 0
pages/tabbar-pages/user/index.js

@@ -49,6 +49,10 @@ Page({
             wx.navigateTo({
                 url: '/pages/productManagement/index'
             })
+        } else if (name == '商户管理') {
+            wx.navigateTo({
+                url: '/pages/storeMessage/index'
+            })
         }
     },
     /* 跳转用户信息 */

+ 6 - 0
project.private.config.json

@@ -59,6 +59,12 @@
                     "pathName": "pages/announceDemand/index",
                     "query": "",
                     "scene": null
+                },
+                {
+                    "name": "商户管理",
+                    "pathName": "pages/storeMessage/index",
+                    "query": "",
+                    "scene": null
                 }
             ]
         }