Browse Source

基础组件

zhaoxiaohai 2 years ago
parent
commit
8813282e88

+ 7 - 1
app.js

@@ -3,7 +3,13 @@ import {
 } from './utils/Api';
 
 App({
-	onLaunch() {},
+	onLaunch() {
+		wx.getSystemInfo({
+			success (res) {
+				console.log(res)
+			}
+		})
+	},
 	globalData: {
 		http: new ApiModel(), //接口文件
 	}

+ 47 - 10
app.json

@@ -1,12 +1,49 @@
 {
-    "pages": [
-        "pages/home/index"
-    ],
-    "window": {
-        "backgroundTextStyle": "light",
-        "navigationBarBackgroundColor": "#085CDF",
-        "navigationBarTitleText": "E-订单",
-        "navigationBarTextStyle": "white"
-    },
-    "sitemapLocation": "sitemap.json"
+  "pages": [
+    "pages/home/index",
+    "pages/base/index"
+  ],
+  "subpackages": [
+    {
+      "root": "packageA",
+      "pages": [
+        "market/index"
+      ]
+    }
+  ],
+  "usingComponents": {
+    "Yl_Filtrate": "/components/Yl_Filtrate/index",
+    "Yl_FloatingButton": "/components/Yl_FloatingButton/index",
+    "Yl_FunTabs": "/components/Yl_FunTabs/index",
+    "Yl_HeadNav": "/components/Yl_HeadNav/index",
+    "Yl_ListBox": "/components/Yl_ListBox/index",
+    "Yl_Tabbar": "/components/Yl_Tabbar/index",
+    "Yl_Field": "/components/Yl_Field/index",
+    "van-button": "@vant/weapp/button/index",
+    "van-cell": "@vant/weapp/cell/index",
+    "van-action-sheet": "@vant/weapp/action-sheet/index",
+    "van-popup": "@vant/weapp/popup/index",
+    "van-checkbox": "@vant/weapp/checkbox/index",
+    "van-checkbox-group": "@vant/weapp/checkbox-group/index",
+    "van-image": "@vant/weapp/image/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-tab": "@vant/weapp/tab/index",
+    "van-tabs": "@vant/weapp/tabs/index",
+    "van-search": "@vant/weapp/search/index"
+  },
+  "preloadRule": {
+    "pages/home/index": {
+      "packages": [
+        "packageA"
+      ],
+      "network": "all"
+    }
+  },
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#085CDF",
+    "navigationBarTitleText": "E-订单",
+    "navigationBarTextStyle": "white"
+  },
+  "sitemapLocation": "sitemap.json"
 }

+ 2 - 4
app.wxss

@@ -1,3 +1,4 @@
+@import './static/font-icon.wxss';
 page {
     /* 颜色 */
     --primary: #095DE0;
@@ -14,10 +15,7 @@ page {
     font-family: var(--FCN);
     background-color: #F4F5F7;
 
-    /* 适配苹果手机底部安全距离 */
-    padding-bottom: 0;
-    padding-bottom: constant(safe-area-inset-bottom);
-    padding-bottom: env(safe-area-inset-bottom);
+    padding-bottom: 0 !important;
 }
 
 navigator {

+ 1 - 1
components/Yl_Field/index.js

@@ -1,4 +1,4 @@
-const verify = require('../../utils/deleteMark');
+const verify = require('../../utils/Check');
 Component({
     externalClasses: [],
     properties: {

+ 64 - 0
components/Yl_Filtrate/groud.scss

@@ -0,0 +1,64 @@
+.groud {
+    width: 100%;
+    padding: 30rpx;
+    border-bottom: 1px solid #DDDDDD;
+
+    .label {
+        height: 40rpx;
+        font-size: 28rpx;
+        font-family: PingFang SC-Regular, PingFang SC;
+        color: #333333;
+    }
+
+    .content {
+        display: flex;
+        flex-wrap: wrap;
+        width: 100%;
+
+       
+
+        .but {
+            width: 188rpx;
+            height: 72rpx;
+            background: #F5F5F5;
+            border-radius: 8rpx;
+            font-size: 28rpx;
+            font-family: PingFang SC-Regular, PingFang SC;
+            color: #333333;
+            box-sizing: border-box;
+            margin-right: 20rpx;
+            margin-top: 20rpx;
+            padding: 0;
+        }
+
+        .active {
+            border: 1px solid #3874F6;
+            color: #3874F6;
+            font-weight: bold;
+            background-color: #F5F5F5;
+        }
+    }
+
+    .time{
+        .partition {
+            margin-right: 20rpx;
+            display: flex;
+            align-items: center;
+        }
+
+        .tbox {
+            width: 220rpx;
+            height: 72rpx;
+            text-align: center;
+            line-height: 72rpx;
+            background: #F5F5F5;
+            border-radius: 8rpx;
+            font-size: 28rpx;
+            font-family: PingFang SC-Regular, PingFang SC;
+            color: #333333;
+            box-sizing: border-box;
+            margin-right: 20rpx;
+            margin-top: 20rpx;
+        }
+    }
+}

+ 105 - 0
components/Yl_Filtrate/index.js

@@ -0,0 +1,105 @@
+const getHeight = require("../../utils/GetRheRemainingHeight");
+Component({
+    properties: {
+        list: {
+            type: Array,
+            value: [{
+                label: "筛选1",
+                index: null,
+                showName: "name", //显示字段
+                valueKey: "name", //返回Key
+                selectKey: "id", //传参 代表选着字段 不传参返回整个选择对象
+                value: "", //选中值
+                list: [{
+                    name: "a1",
+                    id: 0
+                }, {
+                    name: "a2",
+                    id: 1
+                }]
+            }]
+        },
+        show: Boolean,
+        handle: Function, //按钮回调函数
+        dateRange: {//是否开启日期范围筛选
+            type: Boolean,
+            value: true
+        },
+        zIndex: {
+            type: String,
+            value: 99999,
+        },
+    },
+    data: {
+        startdate: "", //开始时间
+        enddate: "", //结束时间
+    },
+    lifetimes: {
+        ready() {
+            getHeight.getHeight('.head', this).then(res => this.setData({
+                listHeight: res - 140
+            }));
+        }
+    },
+    methods: {
+        /* 选择 */
+        onSelect(e) {
+            const {
+                item, //被选项
+                index, //列表下标
+                i //被选项下标
+            } = e.currentTarget.dataset;
+            if (this.data.list[index].index == i) {
+                this.setData({
+                    [`list[${index}].value`]: "",
+                    [`list[${index}].index`]: null
+                });
+            } else {
+                this.setData({
+                    [`list[${index}].value`]: this.data.list[index].selectKey ? item[this.data.list[index].selectKey] : item,
+                    [`list[${index}].index`]: i
+                });
+            }
+        },
+        /* 点击按钮 */
+        onClick(e) {
+            const {
+                name
+            } = e.target.dataset;
+            if (name == 'reset') {
+                this.setData({
+                    list: this.data.list.map(v => {
+                        v.value = "";
+                        v.index = null;
+                        return v;
+                    })
+                })
+                this.triggerEvent("handle", {})
+            } else if (name == 'confirm') {
+                let obj = {};
+                this.data.list.forEach(v => {
+                    obj[v.valueKey] = v.value;
+                });
+                if (this.data.dateRange) {
+                    obj.startdate = this.data.startdate;
+                    obj.enddate = this.data.enddate;
+                };
+                this.triggerEvent("handle", obj);
+            }
+            this.onClose();
+        },
+        /* 筛选日期范围 */
+        changeDate(e) {
+            const name = e.currentTarget.dataset.name,
+                value = e.detail.value;
+            this.setData({
+                [name]: value
+            })
+        },
+        onClose() {
+            this.setData({
+                show: false
+            })
+        }
+    }
+})

+ 4 - 0
components/Yl_Filtrate/index.json

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

+ 29 - 0
components/Yl_Filtrate/index.scss

@@ -0,0 +1,29 @@
+@import "./groud.scss";
+.footer {
+    display: flex;
+    justify-content: space-around;
+    width: 100%;
+    box-sizing: border-box;
+    padding: 10rpx;
+    box-shadow: rgba(0, 0, 0, 0.1) 0px -2px 8rpx;
+
+    .v-but {
+        width: 190rpx;
+        height: 90rpx;
+        background: #FFFFFF;
+        border-radius: 8rpx;
+        border: 1px solid #CCCCCC;
+        font-size: 28rpx;
+        font-family: PingFang SC-Regular, PingFang SC;
+        color: #666666;
+    }
+
+    .confirm {
+        border: none;
+        background: #3874F6;
+        font-size: 28rpx;
+        font-family: PingFang SC-Bold, PingFang SC;
+        font-weight: bold;
+        color: #FFFFFF;
+    }
+}

+ 35 - 0
components/Yl_Filtrate/index.wxml

@@ -0,0 +1,35 @@
+<van-popup show="{{ show }}" position="right" custom-style="width: 660rpx; height:100vh;" z-index="{{zIndex}}" bind:close="onClose">
+    <view class="head" />
+    <Yl_ListBox height="{{listHeight}}" pullDown='{{false}}'>
+        <block wx:for="{{list}}" wx:key="item.label">
+            <view class="groud" wx:if="{{item.list.length}}">
+                <view class="label">
+                    {{item.label}}
+                </view>
+                <view class="content">
+                    <van-button custom-class='but {{item.index==i?"active":""}}' wx:for="{{item.list}}" wx:for-item="data" wx:for-index="i" wx:key="i" data-item="{{data}}" data-index="{{index}}" data-i="{{i}}" bindtap="onSelect">{{data[item.showName]}}</van-button>
+                </view>
+            </view>
+        </block>
+        <view wx:if="{{dateRange}}" class="groud">
+            <view class="label">
+                日期范围
+            </view>
+            <view class="content time">
+                <picker mode="date" bindchange='changeDate' data-name="startdate">
+                    <view class="tbox">{{startdate||'开始日期'}}</view>
+                </picker>
+                <view class="partition">-</view>
+                <picker mode="date" bindchange='changeDate' data-name="enddate">
+                    <view class="tbox">{{enddate||"结束日期"}}</view>
+                </picker>
+            </view>
+        </view>
+        <slot />
+    </Yl_ListBox>
+    <view class="footer" bindtap="onClick">
+        <van-button data-name="close" custom-class='v-but'>关闭</van-button>
+        <van-button data-name="reset" custom-class='v-but'>重置</van-button>
+        <van-button data-name="confirm" custom-class='v-but confirm'>确定</van-button>
+    </view>
+</van-popup>

+ 34 - 3
components/Yl_HeadNav/index.js

@@ -1,4 +1,4 @@
-const getHeight = require("../../utils/getRheRemainingHeight");
+const getHeight = require("../../utils/GetRheRemainingHeight");
 Component({
     options: {
         addGlobalClass: true
@@ -6,7 +6,28 @@ Component({
     properties: {
         sort: Array, //排序规则列表
         search: Boolean, //是否开启搜索
-        list: Array, //功能列表
+        list: { //功能列表
+            type: Array,
+            value: [{
+                label: "全部",
+                icon: "icon-webxialaxuanxiangjiantou",
+                color: "",
+                width: "",
+                id: "1"
+            }, {
+                label: "排序",
+                icon: "icon-shengxu",
+                color: "",
+                width: "",
+                id: "sort"
+            }, {
+                label: "筛选",
+                icon: "icon-shaixuan",
+                color: "",
+                width: "",
+                id: "filtrate"
+            }]
+        },
         condition: String, //搜索内容
         onClick: Function,
         startUsing: Boolean, //启用搜索
@@ -32,7 +53,7 @@ Component({
         },
         ready() {
             getHeight.getHeight('.Yl_head', this).then(res => this.setData({
-                listHeight: res - 200
+                listHeight: res - 140
             }));
         }
     },
@@ -100,6 +121,16 @@ Component({
                 this.setData({
                     sortShow: true
                 })
+            } else if (item.id == "filtrate") {
+                let page = getCurrentPages()[getCurrentPages().length - 1].selectComponent("#Filtrate");
+                if (page) {
+                    page.setData({
+                        show:true
+                    })
+                } else {
+                    this.triggerEvent("onClick", item)
+                }
+
             } else {
                 this.triggerEvent("onClick", item)
             }

+ 94 - 2
components/Yl_HeadNav/index.scss

@@ -1,5 +1,97 @@
-@import "../Yl_filtrate/index.scss";
-@import "../Yl_filtrate/groud.scss";
+.footer {
+    display: flex;
+    justify-content: space-around;
+    width: 100%;
+    box-sizing: border-box;
+    padding: 10rpx;
+    // border-top: 1rpx solid #ddd;
+    box-shadow: rgba(0, 0, 0, 0.1) 0px -2px 8rpx;
+
+    .v-but {
+        width: 190rpx;
+        height: 90rpx;
+        background: #FFFFFF;
+        border-radius: 8rpx;
+        border: 1px solid #CCCCCC;
+        font-size: 28rpx;
+        font-family: PingFang SC-Regular, PingFang SC;
+        color: #666666;
+    }
+
+    .confirm {
+        border: none;
+        background: #3874F6;
+        font-size: 28rpx;
+        font-family: PingFang SC-Bold, PingFang SC;
+        font-weight: bold;
+        color: #FFFFFF;
+    }
+}
+
+.groud {
+    width: 100%;
+    padding: 30rpx;
+    border-bottom: 1px solid #DDDDDD;
+
+    .label {
+        height: 40rpx;
+        font-size: 28rpx;
+        font-family: PingFang SC-Regular, PingFang SC;
+        color: #333333;
+    }
+
+    .content {
+        display: flex;
+        flex-wrap: wrap;
+        width: 100%;
+
+       
+
+        .but {
+            width: 188rpx;
+            height: 72rpx;
+            background: #F5F5F5;
+            border-radius: 8rpx;
+            font-size: 28rpx;
+            font-family: PingFang SC-Regular, PingFang SC;
+            color: #333333;
+            box-sizing: border-box;
+            margin-right: 20rpx;
+            margin-top: 20rpx;
+            padding: 0;
+        }
+
+        .active {
+            border: 1px solid #3874F6;
+            color: #3874F6;
+            font-weight: bold;
+            background-color: #F5F5F5;
+        }
+    }
+
+    .time{
+        .partition {
+            margin-right: 20rpx;
+            display: flex;
+            align-items: center;
+        }
+
+        .tbox {
+            width: 220rpx;
+            height: 72rpx;
+            text-align: center;
+            line-height: 72rpx;
+            background: #F5F5F5;
+            border-radius: 8rpx;
+            font-size: 28rpx;
+            font-family: PingFang SC-Regular, PingFang SC;
+            color: #333333;
+            box-sizing: border-box;
+            margin-right: 20rpx;
+            margin-top: 20rpx;
+        }
+    }
+}
 
 .Yl_nav_box {
     display: flex;

+ 2 - 2
components/Yl_HeadNav/index.wxml

@@ -28,7 +28,7 @@
 
 <van-popup show="{{ sortShow }}" position="right" custom-style="width: 660rpx; height:100vh;overflow: hidden;" safe-area-inset-bottom='{{false}}' bind:close="sortClose">
     <view class="Yl_head" />
-    <My_listBox height="{{listHeight}}" pullDown='{{false}}'>
+    <Yl_ListBox height="{{listHeight}}" pullDown='{{false}}'>
         <view class="groud" wx:if="{{filter.stageList.length!=0}}">
             <view class="label">
                 排序类型
@@ -46,7 +46,7 @@
                 <van-button custom-class='but {{reversed==1?"active":""}}' bindtap="handleReversed" data-id="1"><text class="iconfont icon-shengxu" />升序</van-button>
             </view>
         </view>
-    </My_listBox>
+    </Yl_ListBox>
     <view class="footer" bindtap="sortClick">
         <van-button data-name="close" custom-class='v-but'>关闭</van-button>
         <van-button data-name="confirm" custom-class='v-but confirm'>确定</van-button>

+ 0 - 1
components/Yl_ListBox/index.scss

@@ -4,7 +4,6 @@
 
 /* 适配苹果手机底部安全距离 */
 .safety {
-    box-sizing: border-box;
     height: constant(safe-area-inset-bottom);
     height: env(safe-area-inset-bottom);
 }

+ 1 - 1
components/Yl_ListBox/index.wxml

@@ -1,4 +1,4 @@
-<scroll-view class="scroll-view" scroll-y refresher-enabled='{{pullDown}}' refresher-triggered='{{inRefresh}}' style="height: {{height}}rpx;" triggered='{{true}}' bindrefresherrefresh='pullToRefresh' bindscrolltolower='loadThePage'>
+<scroll-view class="scroll-view" scroll-y refresher-enabled='{{pullDown}}' refresher-triggered='{{inRefresh}}' style="height: {{height}}px;" triggered='{{true}}' bindrefresherrefresh='pullToRefresh' bindscrolltolower='loadThePage'>
     <slot />
     <view class="safety" wx:if="{{safety}}" />
 </scroll-view>

+ 140 - 0
packageA/market/index.js

@@ -0,0 +1,140 @@
+const _Http = getApp().globalData.http;
+
+Page({
+    data: {
+        classShow: false,
+        classActions: [{
+                name: '全部',
+                index: 0
+            }, {
+                name: '我负责的',
+                index: 1
+            },
+            {
+                name: '我参与的',
+                index: 2
+            },
+            {
+                name: "我下属负责的",
+                index: 3
+            }, {
+                name: "我下属参与的",
+                index: 4
+            }
+        ],
+        content: {
+            nocache: true,
+            "type": 0,
+            "pageNumber": 1,
+            "pageSize": 20,
+            "where": {
+                "condition": "", //模糊搜索
+            },
+            "sort": []
+        }
+    },
+    onLoad(options) {
+        this.getList();
+    },
+    /* 获取列表 */
+    getList(init = false) {
+        if (init.detail != undefined) init = init.detail;
+        let content = this.data.content;
+        if (init) content.pageNumber = 1;
+        if (content.pageNumber > content.pageTotal) return;
+        _Http.basic({
+            "id": 20221020143502,
+            content
+        }).then(res => {
+            console.log("客户商机列表", res)
+            this.selectComponent('#ListBox').RefreshToComplete();
+            if (res.msg != '成功') return wx.showToast({
+                title: res.data,
+                icon: "none"
+            })
+            this.setData({
+                'content.pageNumber': res.pageNumber + 1,
+                'content.pageTotal': res.pageTotal,
+                'content.total': res.total,
+                'content.sort': res.sort,
+                list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
+            });
+            this.getTags();
+        })
+    },
+    /* 获取列表标签 */
+    getTags() {
+        let list = this.data.list,
+            ownerids = list.map(v => v.sa_projectid);
+        _Http.basic({
+            "id": 20221018102001,
+            "content": {
+                nocache: true,
+                "ownertable": "sa_project",
+                ownerids
+            }
+        }).then(res => {
+            console.log("标签", res)
+            for (let key in res.data) {
+                let index = list.findIndex(v => v.sa_projectid == key);
+                list[index].tags = res.data[key]
+            };
+            console.log(list)
+            this.setData({
+                list
+            })
+        })
+    },
+    /* 处理筛选 */
+    handleFilter({
+        detail
+    }) {
+        console.log(detail)
+    },
+    /* 处理搜索 */
+    onSearch({
+        detail
+    }) {
+        this.setData({
+            "content.where.condition": detail
+        });
+        this.getList(true);
+    },
+    /* 顶部条件导航回调 */
+    navClick({
+        detail
+    }) {
+        switch (detail.id) {
+            case '1':
+                this.setData({
+                    classShow: true
+                })
+                break;
+        }
+    },
+    /* 选择分类 */
+    classSelect({
+        detail
+    }) {
+        if (this.data.content.type == detail.index) return this.classClose();
+        this.setData({
+            "content.type": detail.index,
+            'navList[0].label': detail.name
+        })
+        this.classClose();
+        this.getList(true)
+    },
+    classClose() {
+        this.setData({
+            classShow: false
+        })
+    },
+    onReady() {
+        this.setListHeight()
+    },
+    /* 设置页面高度 */
+    setListHeight() {
+        this.selectComponent("#ListBox").setHeight(".total", this);
+    },
+    onShareAppMessage() {}
+})

+ 3 - 0
packageA/market/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 0 - 0
packageA/market/index.scss


+ 13 - 0
packageA/market/index.wxml

@@ -0,0 +1,13 @@
+<Yl_HeadNav search sort='{{content.sort}}' bind:onClick='navClick' bindonSearch="onSearch" />
+<!-- 显示类型 -->
+<van-action-sheet show="{{ classShow }}" actions="{{ classActions }}" cancel-text="取消" bind:cancel="classClose" bind:click-overlay='classClose' bind:cancel="classClose" bind:select="classSelect" />
+<view class="total">共{{content.total}}个</view>
+
+<Yl_ListBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>
+    <List list='{{list}}' />
+</Yl_ListBox>
+
+<!-- 筛选条件 -->
+<Yl_Filtrate id='Filtrate' bind:handle="handleFilter" />
+<!-- 浮动按钮 -->
+<Yl_FloatingButton wx:if="{{insert}}" bindtap="toAdd" />

+ 140 - 0
pages/base/index.js

@@ -0,0 +1,140 @@
+const _Http = getApp().globalData.http;
+
+Page({
+    data: {
+        classShow: false,
+        classActions: [{
+                name: '全部',
+                index: 0
+            }, {
+                name: '我负责的',
+                index: 1
+            },
+            {
+                name: '我参与的',
+                index: 2
+            },
+            {
+                name: "我下属负责的",
+                index: 3
+            }, {
+                name: "我下属参与的",
+                index: 4
+            }
+        ],
+        content: {
+            nocache: true,
+            "type": 0,
+            "pageNumber": 1,
+            "pageSize": 20,
+            "where": {
+                "condition": "", //模糊搜索
+            },
+            "sort": []
+        }
+    },
+    onLoad(options) {
+        this.getList();
+    },
+    /* 获取列表 */
+    getList(init = false) {
+        if (init.detail != undefined) init = init.detail;
+        let content = this.data.content;
+        if (init) content.pageNumber = 1;
+        if (content.pageNumber > content.pageTotal) return;
+        _Http.basic({
+            "id": 20221020143502,
+            content
+        }).then(res => {
+            console.log("客户商机列表", res)
+            this.selectComponent('#ListBox').RefreshToComplete();
+            if (res.msg != '成功') return wx.showToast({
+                title: res.data,
+                icon: "none"
+            })
+            this.setData({
+                'content.pageNumber': res.pageNumber + 1,
+                'content.pageTotal': res.pageTotal,
+                'content.total': res.total,
+                'content.sort': res.sort,
+                list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
+            });
+            this.getTags();
+        })
+    },
+    /* 获取列表标签 */
+    getTags() {
+        let list = this.data.list,
+            ownerids = list.map(v => v.sa_projectid);
+        _Http.basic({
+            "id": 20221018102001,
+            "content": {
+                nocache: true,
+                "ownertable": "sa_project",
+                ownerids
+            }
+        }).then(res => {
+            console.log("标签", res)
+            for (let key in res.data) {
+                let index = list.findIndex(v => v.sa_projectid == key);
+                list[index].tags = res.data[key]
+            };
+            console.log(list)
+            this.setData({
+                list
+            })
+        })
+    },
+    /* 处理筛选 */
+    handleFilter({
+        detail
+    }) {
+        console.log(detail)
+    },
+    /* 处理搜索 */
+    onSearch({
+        detail
+    }) {
+        this.setData({
+            "content.where.condition": detail
+        });
+        this.getList(true);
+    },
+    /* 顶部条件导航回调 */
+    navClick({
+        detail
+    }) {
+        switch (detail.id) {
+            case '1':
+                this.setData({
+                    classShow: true
+                })
+                break;
+        }
+    },
+    /* 选择分类 */
+    classSelect({
+        detail
+    }) {
+        if (this.data.content.type == detail.index) return this.classClose();
+        this.setData({
+            "content.type": detail.index,
+            'navList[0].label': detail.name
+        })
+        this.classClose();
+        this.getList(true)
+    },
+    classClose() {
+        this.setData({
+            classShow: false
+        })
+    },
+    onReady() {
+        this.setListHeight()
+    },
+    /* 设置页面高度 */
+    setListHeight() {
+        this.selectComponent("#ListBox").setHeight(".total", this);
+    },
+    onShareAppMessage() {}
+})

+ 3 - 0
pages/base/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 4 - 0
pages/base/index.scss

@@ -0,0 +1,4 @@
+page{
+	position: relative;
+	overflow: hidden;
+}

+ 15 - 0
pages/base/index.wxml

@@ -0,0 +1,15 @@
+<Yl_HeadNav search sort='{{content.sort}}' bind:onClick='navClick' bindonSearch="onSearch" />
+<!-- 显示类型 -->
+<van-action-sheet show="{{ classShow }}" actions="{{ classActions }}" cancel-text="取消" bind:cancel="classClose" bind:click-overlay='classClose' bind:cancel="classClose" bind:select="classSelect" />
+<view class="total">共{{content.total}}个</view>
+
+<Yl_ListBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>
+    <List list='{{list}}' />
+</Yl_ListBox>
+
+<!-- 筛选条件 -->
+<Yl_Filtrate id='Filtrate' bind:handle="handleFilter" />
+
+
+<!-- 浮动按钮 -->
+<Yl_FloatingButton bindtap="toAdd" />

+ 25 - 27
pages/home/index.js

@@ -1,29 +1,27 @@
+import {
+    hexMD5
+} from "../../utils/md5";
+const _Http = getApp().globalData.http;
 Page({
-  data: {
-
-  },
-  onLoad(options) {
-
-  },
-  onReady() {
-
-  },
-  onShow() {
-
-  },
-  onHide() {
-
-  },
-  onUnload() {
-
-  },
-  onPullDownRefresh() {
-
-  },
-  onReachBottom() {
-
-  },
-  onShareAppMessage() {
-
-  }
+    data: {
+        username: "000101",
+        password: "123456789",
+    },
+    onLoad(options) {
+
+    },
+    login() {
+        _Http.login({
+            "accountno": this.data.username,
+            "password": hexMD5(this.data.password),
+            "systemclient": "wechatsaletool"
+        }).then(res => {
+            console.log("登录", res)
+            wx.showToast({
+                title: res.msg == '成功' ? '登录成功' : res.msg,
+                icon: "none"
+            });
+            wx.setStorageSync('userMsg', res.account_list[0])
+        })
+    },
 })

+ 3 - 1
pages/home/index.json

@@ -1,3 +1,5 @@
 {
-  "usingComponents": {}
+    "usingComponents": {
+        "van-field": "@vant/weapp/field/index"
+    }
 }

+ 15 - 0
pages/home/index.scss

@@ -0,0 +1,15 @@
+.fun {
+    display: flex;
+    flex-wrap: wrap;
+    box-sizing: border-box;
+    padding: 20rpx 30rpx;
+
+    navigator {
+        width: 25%;
+        height: 80rpx;
+        line-height: 80rpx;
+        box-sizing: border-box;
+        border: 1px solid #ddd;
+        text-align: center;
+    }
+}

+ 12 - 0
pages/home/index.wxml

@@ -0,0 +1,12 @@
+<van-cell-group>
+    <van-field model:value="{{ username }}" required clearable label="账号" icon="question-o" placeholder="请输入账号" bind:click-icon="onClickIcon" />
+    <van-field model:value="{{ password }}" required clearable label="账号" icon="question-o" placeholder="请输入密码" bind:click-icon="onClickIcon" />
+</van-cell-group>
+<view style="text-align: right;margin-top: 20rpx; padding-right: 30rpx;">
+    <van-button type="primary" disabled='{{!password&&!username}}' bind:click='login'>登录</van-button>
+</view>
+
+<view class="fun">
+    <navigator url="/pages/base/index">列表模板</navigator>
+    <navigator url="/packageA/market/index">商城</navigator>
+</view>

+ 1 - 1
project.config.json

@@ -53,5 +53,5 @@
     "ignore": [],
     "include": []
   },
-  "appid": "wxb11e9f7d77c97c10"
+  "appid": "wx3f070c8a298dd1ec"
 }

+ 14 - 0
project.private.config.json

@@ -4,5 +4,19 @@
   "setting": {
     "compileHotReLoad": true,
     "urlCheck": false
+  },
+  "libVersion": "2.26.2",
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "商城",
+          "pathName": "packageA/market/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        }
+      ]
+    }
   }
 }

+ 747 - 0
static/font-icon.wxss

@@ -0,0 +1,747 @@
+@import "./stylesheet";
+
+.iconfont {
+    font-family: "iconfont" !important;
+    font-size: 16px;
+    font-style: normal;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-gonghaixiansuo:before {
+    content: "\e6c6";
+  }
+  
+  .icon-jingzhengduishou:before {
+    content: "\e6c4";
+  }
+  
+  .icon-shichanghuodong:before {
+    content: "\e6c5";
+  }
+  
+  .icon-chakanshijuan:before {
+    content: "\e6c2";
+  }
+  
+  .icon-kaoshi:before {
+    content: "\e6c3";
+  }
+  
+  .icon-xuexizuji:before {
+    content: "\e6c0";
+  }
+  
+  .icon-kaoshixuexi:before {
+    content: "\e6c1";
+  }
+  
+  .icon-xiaoshouxiansuogenjinmoshi:before {
+    content: "\e6bf";
+  }
+  
+  .icon-kehu:before {
+    content: "\e6ba";
+  }
+  
+  .icon-hetong:before {
+    content: "\e6bb";
+  }
+  
+  .icon-xiangmubaojia:before {
+    content: "\e6bc";
+  }
+  
+  .icon-gonghaikehu:before {
+    content: "\e6bd";
+  }
+  
+  .icon-xiangmushangji:before {
+    content: "\e6be";
+  }
+  
+  .icon-biaoqian:before {
+    content: "\e6b9";
+  }
+  
+  .icon-tianjiakuaijie-mian:before {
+    content: "\e6b7";
+  }
+  
+  .icon-tianjiakuaijie-xian:before {
+    content: "\e6b8";
+  }
+  
+  .icon-fuzeren:before {
+    content: "\e6b1";
+  }
+  
+  .icon-sousuo-mian:before {
+    content: "\e6b2";
+  }
+  
+  .icon-gengduo:before {
+    content: "\e6b3";
+  }
+  
+  .icon-shaixuan:before {
+    content: "\e6b4";
+  }
+  
+  .icon-shengxu:before {
+    content: "\e6b5";
+  }
+  
+  .icon-jiangxu1:before {
+    content: "\e6b6";
+  }
+  
+  .icon-dibu-chehui:before {
+    content: "\e69e";
+  }
+  
+  .icon-dibu-jieshu:before {
+    content: "\e69f";
+  }
+  
+  .icon-dibu-fenxiang:before {
+    content: "\e6a0";
+  }
+  
+  .icon-dibu-chengjiao:before {
+    content: "\e6a1";
+  }
+  
+  .icon-dibu-tuihui:before {
+    content: "\e6a2";
+  }
+  
+  .icon-dibu-diudan:before {
+    content: "\e6a3";
+  }
+  
+  .icon-dibu-genjin:before {
+    content: "\e6a4";
+  }
+  
+  .icon-dibu-genghuanjingxiaoshang:before {
+    content: "\e6a5";
+  }
+  
+  .icon-guanlian-fuzhi:before {
+    content: "\e6a6";
+  }
+  
+  .icon-guanlian-bodadianhua:before {
+    content: "\e6a7";
+  }
+  
+  .icon-tabfujian:before {
+    content: "\e6a8";
+  }
+  
+  .icon-tabxiangxixinxi:before {
+    content: "\e6a9";
+  }
+  
+  .icon-dibu-zuofei:before {
+    content: "\e6aa";
+  }
+  
+  .icon-guanlian-shanchu:before {
+    content: "\e6ab";
+  }
+  
+  .icon-guanlian-bianji:before {
+    content: "\e6ac";
+  }
+  
+  .icon-tabcaozuojilu:before {
+    content: "\e6ad";
+  }
+  
+  .icon-dibu-zhuanhuan:before {
+    content: "\e6ae";
+  }
+  
+  .icon-dibu-wuxiao:before {
+    content: "\e6af";
+  }
+  
+  .icon-tabgenjindongtai:before {
+    content: "\e6b0";
+  }
+  
+  .icon-dibu-bianji:before {
+    content: "\e69c";
+  }
+  
+  .icon-dibu-biangengchengjiaozhuangtai:before {
+    content: "\e69d";
+  }
+  
+  .icon-tousu:before {
+    content: "\e699";
+  }
+  
+  .icon-tonggao:before {
+    content: "\e69a";
+  }
+  
+  .icon-renwu:before {
+    content: "\e69b";
+  }
+  
+  .icon-meitiku:before {
+    content: "\e694";
+  }
+  
+  .icon-bangzhu:before {
+    content: "\e695";
+  }
+  
+  .icon-xiaoxi:before {
+    content: "\e696";
+  }
+  
+  .icon-tongxunlu:before {
+    content: "\e697";
+  }
+  
+  .icon-tibao:before {
+    content: "\e698";
+  }
+  
+  .icon-niandu:before {
+    content: "\e693";
+  }
+  
+  .icon-biaoti:before {
+    content: "\e692";
+  }
+  
+  .icon-xiaochengxu_qunzu:before {
+    content: "\e691";
+  }
+  
+  .icon-xiaochengxutongxunlu:before {
+    content: "\e68c";
+  }
+  
+  .icon-tianjiaqunzu:before {
+    content: "\e68f";
+  }
+  
+  .icon-tianjialianxiren:before {
+    content: "\e690";
+  }
+  
+  .icon-xiaochengxu_xiaoshoumubiao:before {
+    content: "\e68d";
+  }
+  
+  .icon-xiaochengxu_xiaoshouyuce:before {
+    content: "\e68e";
+  }
+  
+  .icon-zidingyiqunzu:before {
+    content: "\e68b";
+  }
+  
+  .icon-xitongqunzu:before {
+    content: "\e68a";
+  }
+  
+  .icon-qunzu:before {
+    content: "\e687";
+  }
+  
+  .icon-shanchu:before {
+    content: "\e688";
+  }
+  
+  .icon-shouji:before {
+    content: "\e689";
+  }
+  
+  .icon-bianji1:before {
+    content: "\e685";
+  }
+  
+  .icon-quxiao:before {
+    content: "\e686";
+  }
+  
+  .icon-mobantubiao:before {
+    content: "\e684";
+  }
+  
+  .icon-daoruxialajiantou:before {
+    content: "\e682";
+  }
+  
+  .icon-daoru:before {
+    content: "\e683";
+  }
+  
+  .icon-a-webmeitikuweixuanzhong:before {
+    content: "\e680";
+  }
+  
+  .icon-a-webmeitikuxuanzhong:before {
+    content: "\e681";
+  }
+  
+  .icon-xiaochengxu_yingxiaowuliaoxuanzhong:before {
+    content: "\e67a";
+  }
+  
+  .icon-jiangxu:before {
+    content: "\e679";
+  }
+  
+  .icon-shengxu1:before {
+    content: "\e67c";
+  }
+  
+  .icon-bianji:before {
+    content: "\e67d";
+  }
+  
+  .icon-genjin:before {
+    content: "\e67e";
+  }
+  
+  .icon-zhuanyi:before {
+    content: "\e67f";
+  }
+  
+  .icon-bodadianhua:before {
+    content: "\e67b";
+  }
+  
+  .icon-xiaoshouxiansuo:before {
+    content: "\e678";
+  }
+  
+  .icon-webshoucang:before {
+    content: "\e677";
+  }
+  
+  .icon-webweishoucang:before {
+    content: "\e676";
+  }
+  
+  .icon-a-yingxiaowuliaofuzhi:before {
+    content: "\e675";
+  }
+  
+  .icon-webfuzhi:before {
+    content: "\e674";
+  }
+  
+  .icon-webdaochu:before {
+    content: "\e673";
+  }
+  
+  .icon-webshanchutupian:before {
+    content: "\e65b";
+  }
+  
+  .icon-webmeitiku:before {
+    content: "\e656";
+  }
+  
+  .icon-webshijianqujian:before {
+    content: "\e672";
+  }
+  
+  .icon-webdenglufangshi:before {
+    content: "\e662";
+  }
+  
+  .icon-webxialaxuanxiangjiantou:before {
+    content: "\e66f";
+  }
+  
+  .icon-webmimaqiangzhiyaoqiu:before {
+    content: "\e670";
+  }
+  
+  .icon-webqiyeshuiyintupian:before {
+    content: "\e671";
+  }
+  
+  .icon-webjiangxu:before {
+    content: "\e66e";
+  }
+  
+  .icon-webtousuguanli:before {
+    content: "\e664";
+  }
+  
+  .icon-webshangxueyuan:before {
+    content: "\e665";
+  }
+  
+  .icon-webtonggaoguanli:before {
+    content: "\e666";
+  }
+  
+  .icon-webtibaoguanli:before {
+    content: "\e667";
+  }
+  
+  .icon-webyingxiaowuliao:before {
+    content: "\e668";
+  }
+  
+  .icon-webzhandianshezhi:before {
+    content: "\e669";
+  }
+  
+  .icon-webzuzhijiagou:before {
+    content: "\e66a";
+  }
+  
+  .icon-webyingxiaozuzhiguanli:before {
+    content: "\e66b";
+  }
+  
+  .icon-webyonghuguanli:before {
+    content: "\e66c";
+  }
+  
+  .icon-webtuiguangsucai:before {
+    content: "\e66d";
+  }
+  
+  .icon-webfanhui:before {
+    content: "\e663";
+  }
+  
+  .icon-a-webgengduo:before {
+    content: "\e654";
+  }
+  
+  .icon-a-webbaobiaozhongxinxuanzhong:before {
+    content: "\e655";
+  }
+  
+  .icon-a-webgongzuotaixuanzhong:before {
+    content: "\e657";
+  }
+  
+  .icon-a-webbaobiaozhongxinweixuanzhong:before {
+    content: "\e658";
+  }
+  
+  .icon-a-webxiaoxixuanzhong:before {
+    content: "\e659";
+  }
+  
+  .icon-a-webtongxunluxuanzhong:before {
+    content: "\e65a";
+  }
+  
+  .icon-a-webgongzuotaiweixuanzhong:before {
+    content: "\e65c";
+  }
+  
+  .icon-a-webtongxunluweixuanzhong:before {
+    content: "\e65d";
+  }
+  
+  .icon-a-webshujuzhongxinxuanzhong:before {
+    content: "\e65e";
+  }
+  
+  .icon-a-webshujuzhongxinweixuanzhong:before {
+    content: "\e65f";
+  }
+  
+  .icon-a-webxiaoxiweixuanzhong:before {
+    content: "\e660";
+  }
+  
+  .icon-yasuobao:before {
+    content: "\e653";
+  }
+  
+  .icon-zanwushuju:before {
+    content: "\e652";
+  }
+  
+  .icon-a-wodemima:before {
+    content: "\e651";
+  }
+  
+  .icon-PDF:before {
+    content: "\e62f";
+  }
+  
+  .icon-a-wodebangdingweixin:before {
+    content: "\e650";
+  }
+  
+  .icon-a-shouyeshujugaikuangzhanshishuju:before {
+    content: "\e64e";
+  }
+  
+  .icon-shujubodadianhua1:before {
+    content: "\e64f";
+  }
+  
+  .icon-a-shurukuangshanchu:before {
+    content: "\e64d";
+  }
+  
+  .icon-a-wodemendianxinxidizhi:before {
+    content: "\e64b";
+  }
+  
+  .icon-a-wodemendianxinxidianhua:before {
+    content: "\e64c";
+  }
+  
+  .icon-a-biaoqianlanxiaoxixuanzhong:before {
+    content: "\e64a";
+  }
+  
+  .icon-a-wodetuanduiguanli:before {
+    content: "\e640";
+  }
+  
+  .icon-a-wodegerenxinxitiaozhuan:before {
+    content: "\e641";
+  }
+  
+  .icon-a-wodedianhua:before {
+    content: "\e642";
+  }
+  
+  .icon-a-biaoqianlanwodexuanzhong:before {
+    content: "\e643";
+  }
+  
+  .icon-a-biaoqianlanshouye:before {
+    content: "\e644";
+  }
+  
+  .icon-a-wodemendianxinxi:before {
+    content: "\e645";
+  }
+  
+  .icon-a-wodeguanyuyingyong:before {
+    content: "\e646";
+  }
+  
+  .icon-a-wodetiaozhuan:before {
+    content: "\e647";
+  }
+  
+  .icon-a-wodeshezhi:before {
+    content: "\e648";
+  }
+  
+  .icon-a-woderenwuzhongxin:before {
+    content: "\e649";
+  }
+  
+  .icon-a-tibaoguanlitibao:before {
+    content: "\e63f";
+  }
+  
+  .icon-hujiao:before {
+    content: "\e63e";
+  }
+  
+  .icon-a-shangxueyuanxuexi:before {
+    content: "\e63d";
+  }
+  
+  .icon-a-shangxueyuanfujian:before {
+    content: "\e63c";
+  }
+  
+  .icon-a-tuiguangsucaishanchu:before {
+    content: "\e63a";
+  }
+  
+  .icon-a-tuiguangsucaishangchuan1:before {
+    content: "\e63b";
+  }
+  
+  .icon-pengyouquan:before {
+    content: "\e637";
+  }
+  
+  .icon-weixinhaoyou:before {
+    content: "\e638";
+  }
+  
+  .icon-weixinqunliao:before {
+    content: "\e639";
+  }
+  
+  .icon-a-tuiguangsucailaxinliang:before {
+    content: "\e634";
+  }
+  
+  .icon-a-tuiguangsucaifenxiangliang:before {
+    content: "\e635";
+  }
+  
+  .icon-a-tuiguangsucaishangchuan:before {
+    content: "\e636";
+  }
+  
+  .icon-a-biaoqianlanwode:before {
+    content: "\e62a";
+  }
+  
+  .icon-word:before {
+    content: "\e62e";
+  }
+  
+  .icon-shipin:before {
+    content: "\e630";
+  }
+  
+  .icon-PPT:before {
+    content: "\e631";
+  }
+  
+  .icon-tupian:before {
+    content: "\e632";
+  }
+  
+  .icon-biaoge:before {
+    content: "\e633";
+  }
+  
+  .icon-a-yingxiaowuliaoshoucangbiaoji:before {
+    content: "\e627";
+  }
+  
+  .icon-a-yingxiaowuliaowenjianjia:before {
+    content: "\e62d";
+  }
+  
+  .icon-paixushaixuanxuanzhong:before {
+    content: "\e62c";
+  }
+  
+  .icon-a-yingxiaowuliaozhongmingming:before {
+    content: "\e62b";
+  }
+  
+  .icon-a-sousuolansousuo:before {
+    content: "\e621";
+  }
+  
+  .icon-a-shaixuanxiala:before {
+    content: "\e628";
+  }
+  
+  .icon-a-yingxiaowuliaoxuanzhong:before {
+    content: "\e629";
+  }
+  
+  .icon-a-tonggaoshujuliulanliang:before {
+    content: "\e624";
+  }
+  
+  .icon-a-tonggaoshujuxiazailiang:before {
+    content: "\e626";
+  }
+  
+  .icon-a-shipinbofang:before {
+    content: "\e620";
+  }
+  
+  .icon-a-tonggaoxiangqingtonggaopingfenxingweixuan:before {
+    content: "\e622";
+  }
+  
+  .icon-a-tonggaoxiangqingtonggaopingfenxingyixuan:before {
+    content: "\e623";
+  }
+  
+  .icon-a-daohanglanfanhui:before {
+    content: "\e61f";
+  }
+  
+  .icon-a-shouyezuixintonggaolantiaozhuan:before {
+    content: "\e61c";
+  }
+  
+  .icon-a-tonggaofujian:before {
+    content: "\e61d";
+  }
+  
+  .icon-a-tonggaoliulanliang:before {
+    content: "\e61e";
+  }
+  
+  .icon-a-shouyezhanghuzhanshiquqianbi:before {
+    content: "\e61a";
+  }
+  
+  .icon-a-shouyexiaoxigundongquxiaoxi:before {
+    content: "\e61b";
+  }
+  
+  .icon-a-shouyejingangqushangxueyuan:before {
+    content: "\e60d";
+  }
+  
+  .icon-a-shouyejingangquhehuoren:before {
+    content: "\e60e";
+  }
+  
+  .icon-a-shouyejingangqutongxunlu:before {
+    content: "\e610";
+  }
+  
+  .icon-a-shouyejingangqutonggao:before {
+    content: "\e613";
+  }
+  
+  .icon-a-shouyejingangqutuiguangsucai:before {
+    content: "\e614";
+  }
+  
+  .icon-a-shouyejingangquxiaoshouxiansuo:before {
+    content: "\e616";
+  }
+  
+  .icon-a-shouyejingangqutibao:before {
+    content: "\e617";
+  }
+  
+  .icon-a-shouyejingangquyingxiaowuliao:before {
+    content: "\e618";
+  }
+  
+  .icon-a-shouyedaohanglanqiehuanxiala:before {
+    content: "\e60b";
+  }
+  
+  .icon-a-biaoqianlanshouyexuanzhong:before {
+    content: "\e606";
+  }
+  
+  .icon-a-biaoqianlangongzuo:before {
+    content: "\e607";
+  }
+  
+  .icon-a-biaoqianlanzhiku:before {
+    content: "\e608";
+  }
+  
+  .icon-a-biaoqianlanxiaoxi:before {
+    content: "\e609";
+  }
+  
+  

BIN
static/image/add.png


File diff suppressed because it is too large
+ 2 - 0
static/stylesheet.wxss


+ 1 - 1
utils/GetRheRemainingHeight.js

@@ -5,7 +5,7 @@
              success: (res => windowHeight = res.windowHeight)
          });
          let query = wx.createSelectorQuery().in(that).select(even).boundingClientRect();
-         query.exec(res => (!res[0]) ? reject('没有查询到元素') : resolve((windowHeight - res[0].bottom) * 2))
+         query.exec(res => (!res[0]) ? reject('没有查询到元素') : resolve(windowHeight - res[0].bottom))
      })
  }
  module.exports = {

+ 1 - 1
utils/Http.js

@@ -49,7 +49,7 @@ class HTTP {
                     })
                     count = setTimeout(() => {
                         wx.redirectTo({
-                            url: '/pages/login/phone',
+                            url: '/pages/home/index',
                         });
                     }, 500)
                 }

Some files were not shown because too many files changed in this diff