Browse Source

移除tabbar

xiaohaizhao 1 year ago
parent
commit
4aaae4dd89

+ 5 - 30
app.json

@@ -3,19 +3,14 @@
     "pages/login/phone",
     "pages/login/selectSite",
     "pages/login/retrievePassword",
-    "pages/tabbar/home/index",
-    "pages/tabbar/mine/index",
-    "pages/tabbar/mine/userMsg/index",
-    "pages/tabbar/mine/changePassword/index",
     "pages/teams/index",
     "pages/teams/addUsers",
     "pages/teams/addRole",
-    "pages/tabbar/mine/address/index",
-    "pages/tabbar/mine/address/update",
     "pages/index/index",
-    "pages/index/orderForm/modules/setBrand/index"
+    "pages/index/message/detail"
   ],
-  "subpackages": [{
+  "subpackages": [
+    {
       "root": "packageA",
       "pages": [
         "options/index",
@@ -44,7 +39,8 @@
         "dispatchBill/detail",
         "activity/selectProduct/index",
         "orderForm/index",
-        "orderForm/add/add"
+        "orderForm/add/add",
+        "orderForm/modules/setBrand/index"
       ]
     },
     {
@@ -68,14 +64,6 @@
     }
   ],
   "preloadRule": {
-    "pages/tabbar/home/index": {
-      "packages": [
-        "packageA",
-        "select",
-        "Universal"
-      ],
-      "network": "all"
-    },
     "pages/login/phone": {
       "packages": [
         "packageA",
@@ -107,19 +95,6 @@
     "van-tabs": "@vant/weapp/tabs/index",
     "van-search": "@vant/weapp/search/index"
   },
-  "tabBar": {
-    "custom": true,
-    "color": "#000000",
-    "selectedColor": "#000000",
-    "backgroundColor": "#000000",
-    "list": [{
-        "pagePath": "pages/tabbar/home/index"
-      },
-      {
-        "pagePath": "pages/tabbar/mine/index"
-      }
-    ]
-  },
   "window": {
     "backgroundTextStyle": "light",
     "navigationBarBackgroundColor": "#085CDF",

+ 0 - 229
pages/tabbar/home/index.js

@@ -1,229 +0,0 @@
-let _Http = getApp().globalData.http,
-    DataCarousel = null;
-Page({
-    data: {
-        appid: "wxc1b6ae925ac1d06a",
-        bannerList: [], //banner列表
-        gridList: [],
-        notice: "",
-        msgCount: 1,
-        msgList: [], //消息列表
-    },
-    onLoad(options) {
-        this.setData({ //获取胶囊位置信息
-            capsule: wx.getMenuButtonBoundingClientRect()
-        })
-        this.refreshData() //更新权限等信息
-    },
-    /* 更新站点信息 */
-    refreshData() {
-        this.setData({
-            user: wx.getStorageSync('userMsg')
-        })
-        if (wx.getStorageSync('userauth').length != 0) {
-            let authList = {},
-                entrance = [{
-                    label: "E-订单",
-                    appid: "wxc1b6ae925ac1d06a",
-                    icon: "work-E-dingdan",
-                    list: getedd()
-                }];
-            //E订单
-            function getedd() {
-                let paths = [{
-                    name: "商城",
-                    path: "/packageA/market/index",
-                    icon: "work-shangcheng"
-                }, {
-                    name: "销售订单",
-                    path: "/packageA/orderForm/index",
-                    icon: "work-dingdan"
-                }, {
-                    name: "账户",
-                    path: "/packageA/account/index",
-                    icon: "work-zhanghu"
-                }, {
-                    name: "促销活动",
-                    path: "/packageA/activity/index",
-                    icon: "work-cuxiaohuodong"
-                }, {
-                    name: "购物车",
-                    path: "/packageA/shopping/index",
-                    icon: "work-gouwuche"
-                },  {
-                    name: "打款凭证",
-                    path: "/packageA/remitVoucher/index",
-                    icon: "work-dakuanpingzheng"
-                },{
-                    name: "退返申请",
-                    path: "/packageA/returnOne/index",
-                    icon: "work-shujuchaxun"
-                },{
-                    name: "发货单",
-                    path: "/packageA/dispatchBill/index",
-                    icon: "icon-shouhuo"
-                }];
-                let edd = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ["E-订单"], ["商品档案", "销售管理", "财务管理", "售后管理", "发货与库存", "业绩查询"]),
-                    list = [];
-                edd.forEach(v => {
-                    v.apps.forEach(s => {
-                        authList[s.name] = {
-                            options: s.meta.auth.map(a => a.option),
-                            optionnames: s.meta.auth.map(a => a.optionname),
-                        }
-                        if (authList[s.name].options.some(s => s == "read")) {
-                            let i = paths.findIndex(k => k.name == s.meta.title);
-                            if (i != -1) {
-                                paths[i].index = i;
-                                list.push(paths[i])
-                            }
-                        }
-                    })
-                });
-                return dye(list.sort((a, b) => a.index - b.index))
-            };
-            //染色
-            function dye(list) {
-                let colorList = [{
-                    color: "#3874F6",
-                    bColor: "#F0F3FF",
-                }, {
-                    color: "#5AB73F",
-                    bColor: "#F4FAEF",
-                }, {
-                    color: "#F29C37",
-                    bColor: "#FCF6EF",
-                }, {
-                    color: "#EB4B5C",
-                    bColor: "#FDF1ED",
-                }, {
-                    color: "#3874F6",
-                    bColor: "#F0F3FF",
-                }, {
-                    color: "#F29C37",
-                    bColor: "#FCF6EF",
-                }, {
-                    color: "#EB4B5C",
-                    bColor: "#FDF1ED",
-                }, {
-                    color: "#3874F6",
-                    bColor: "#F0F3FF",
-                }, {
-                    color: "#5AB73F",
-                    bColor: "#F4FAEF",
-                }, {
-                    color: "#F29C37",
-                    bColor: "#FCF6EF",
-                }, {
-                    color: "#5AB73F",
-                    bColor: "#F4FAEF",
-                }, {
-                    color: "#3874F6",
-                    bColor: "#F0F3FF",
-                }, {
-                    color: "#F29C37",
-                    bColor: "#FCF6EF",
-                }, {
-                    color: "#EB4B5C",
-                    bColor: "#FDF1ED",
-                }, {
-                    color: "#5AB73F",
-                    bColor: "#F4FAEF",
-                }];
-                return list.map((v, i) => {
-                    return {
-                        ...v,
-                        ...colorList[i > colorList.length - 1 ? i - colorList.length : i]
-                    }
-                })
-            };
-            wx.setStorageSync('auth', authList)
-            this.setData({
-                entrance,
-                auth: JSON.stringify(authList),
-                userMsg: JSON.stringify(wx.getStorageSync('userMsg')),
-                site: JSON.stringify(wx.getStorageSync('siteP'))
-            })
-            /* 获取首页banner */
-            let banner = wx.getStorageSync('banner_list').find(v => v.location == "index_top");
-            if (banner) this.setData({
-                bannerList: banner.ads
-            })
-        } else {
-            setTimeout(this.refreshData, 10);
-            return;
-        }
-
-    },
-    /* 获取最新信息 */
-    queryMessage(i = 0) {
-        _Http.basic({
-            "classname": "system.message.Message",
-            "method": "queryMessage",
-            content: {
-                nocache: true,
-                pageNumber: 1,
-                pageSize: 5,
-                pageTotal: 1,
-                type: "",
-                where: {}
-            },
-        }, false).then(res => {
-            if (res.msg != '成功') return (i <= 5) ? this.queryMessage(i + 1) : wx.showToast({
-                title: res.msg,
-                icon: "none"
-            })
-            this.setData({
-                msgList: res.data,
-                notice: res.data[0]
-            })
-            if (this.data.msgList.length > 2) this.startDataCarousel();
-        })
-    },
-    /* 开启消息轮播 */
-    startDataCarousel() {
-        clearInterval(DataCarousel);
-        DataCarousel = setInterval(() => {
-            let count = this.data.msgCount < this.data.msgList.length ? this.data.msgCount : 0;
-            this.setData({
-                msgCount: count + 1,
-                notice: this.data.msgList[count]
-            })
-        }, 5000)
-    },
-    /* 去消息详情 */
-    toMsg(e) {
-        const {
-            item
-        } = e.currentTarget.dataset;
-        wx.navigateTo({
-            url: '/pages/tabbar/message/details?id=' + item.messageid,
-        })
-    },
-    /* banner */
-    bannerClick(e) {
-        const {
-            item
-        } = e.currentTarget.dataset,
-            hyperlink = item.hyperlink.split(":");
-        if (hyperlink[0] == 'path') wx.navigateTo({
-            url: hyperlink[1]
-        })
-    },
-    onShow() {
-        this.getTabBar().init();
-        if (this.data.msgList.length > 2) this.startDataCarousel();
-        this.queryMessage(0); //更新最新消息
-    },
-    onHide() {
-        clearInterval(DataCarousel);
-    },
-    onReady() {
-        // this.setListHeight();
-    },
-    /* 设置页面高度 */
-    setListHeight() {
-        this.selectComponent("#ListBox").setHeight(".grld-title", this);
-    },
-    onShareAppMessage() {}
-})

+ 0 - 6
pages/tabbar/home/index.json

@@ -1,6 +0,0 @@
-{
-    "usingComponents": {
-        "van-notice-bar": "@vant/weapp/notice-bar/index"
-    },
-    "navigationStyle": "custom"
-}

+ 0 - 102
pages/tabbar/home/index.scss

@@ -1,102 +0,0 @@
-/* 顶部 */
-.header {
-    display: flex;
-    align-items: center;
-    width: 750rpx;
-    height: 88rpx;
-    background-color: var(--bgColor);
-
-    &_title {
-        height: 50rpx;
-        font-size: 36rpx;
-        font-family: PingFang SC-Bold, PingFang SC;
-        font-weight: bold;
-        color: #FFFFFF;
-        margin: 0 8rpx 0 24rpx;
-    }
-}
-
-/* 滚动播放 */
-.notice-bar {
-    font-size: 28rpx;
-    font-family: PingFang SC-Regular, PingFang SC;
-
-    .work {
-        color: #FA8C16;
-        margin-right: 20rpx;
-    }
-}
-
-/* 轮播图区域 */
-.banner {
-    height: 240rpx !important;
-
-    swiper-item {
-        width: 100vw;
-        height: 240rpx !important;
-
-        image {
-            width: 100vw;
-            height: 240rpx;
-        }
-    }
-}
-
-.grld {
-    width: 100vw;
-    background-color: #fff;
-    box-sizing: border-box;
-    padding-top: 30rpx;
-
-    .group {
-        margin-bottom: 30rpx;
-
-        .label {
-            height: 36rpx;
-            font-size: 30rpx;
-            font-family: AppleSystemUIFont-Bold, AppleSystemUIFont;
-            font-weight: bold;
-            color: #333333;
-            margin-bottom: 10rpx;
-
-            text {
-                margin: 0 20rpx 0 30rpx;
-            }
-        }
-
-        .main {
-            display: flex;
-            flex-wrap: wrap;
-
-            .item {
-                display: flex;
-                flex-direction: column;
-                align-items: center;
-                padding: 20rpx 0;
-                width: 20%;
-                border-radius: 16rpx;
-
-                .icon-box {
-                    width: 80rpx;
-                    border-radius: 16rpx;
-                    line-height: 80rpx;
-                    text-align: center;
-
-                    text {
-                        font-size: 40rpx;
-                    }
-                }
-
-                .name {
-                    width: 80%;
-                    line-height: 30rpx;
-                    font-size: 24rpx;
-                    font-family: AppleSystemUIFont-Regular, AppleSystemUIFont;
-                    color: #333333;
-                    margin-top: 16rpx;
-                    text-align: center;
-                }
-            }
-        }
-    }
-}

+ 0 - 38
pages/tabbar/home/index.wxml

@@ -1,38 +0,0 @@
-<view style="width: 1rpx;height: {{capsule.top-6+'px'}};" />
-<view class="header" />
-<!-- 自定义nav -->
-<view style="position: fixed;top: 0; z-index: 999999999;">
-    <view style="width: 100vw;height: {{capsule.top-6+'px'}};background-color:#085CDF;" />
-    <view class="header">
-        <navigator url="/pages/login/selectSite" open-type="reLaunch" class="header_title">
-            {{user.sitename}}
-            <van-icon name="arrow-down" />
-        </navigator>
-    </view>
-</view>
-<!-- 滚动通知 -->
-<van-notice-bar custom-class='notice-bar' mode="link" background="none" data-item="{{notice}}" background='#FCF6EF' color='#666' text="{{notice.message}}">
-    <text slot="left-icon" data-item="{{notice}}" class="work work-xiaoxigundong" />
-</van-notice-bar>
-<!-- 轮播区域 -->
-<swiper class='banner' wx:if="{{bannerList.length}}" autoplay circular>
-    <swiper-item wx:for="{{bannerList}}" wx:key="index">
-        <image src="{{item.attinfos[0].url}}" mode="aspectFill" data-item="{{item}}" catchtap="bannerClick" />
-    </swiper-item>
-</swiper>
-<view class="grld">
-    <block wx:for="{{entrance}}" wx:key="index">
-        <view class="group" wx:if="{{item.list.length}}">
-            <view class="label"><text class="work {{item.icon}}" />{{item.label}}</view>
-            <view class="main">
-                <navigator version='trial' class="item" wx:for="{{item.list}}" wx:for-item="it" wx:for-index="i" target='{{item.appid!=appid?"miniProgram":"self"}}' app-id='{{item.appid}}' path="{{it.path+'?auth='+auth+'&userMsg='+userMsg+'&site='+site}}" url="{{it.path}}" open-type="{{it.openType||'navigate'}}" wx:key="name" data-it="{{it}}" data-item="{{item}}" bindtap="openRecord">
-                    <view class="icon-box" style="background-color: {{it.bColor}};">
-                        <text class="work {{it.icon}}" style="color: {{it.color}};" />
-                    </view>
-                    <view class="name">{{it.name}}</view>
-                </navigator>
-            </view>
-        </view>
-    </block>
-</view>
-<view style="height: 160rpx;" />

+ 0 - 60
pages/tabbar/mine/address/index.js

@@ -1,60 +0,0 @@
-const _Http = getApp().globalData.http;
-Page({
-  data: {
-    "content": {
-      nocache: true,
-      sys_enterpriseid: "",
-      pageNumber: 1,
-      pageTotal: 1,
-      "where": {
-        "condition": "",
-        "workaddress": 1
-      }
-    }
-  },
-  onLoad(options) {
-    this.setData({
-      "content.sys_enterpriseid": options.id
-    })
-    this.getList(true);
-  },
-  /* 获取产品 */
-  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": "20221009155803",
-      content
-    }).then(res => {
-      console.log("我的地址列表", res)
-      this.selectComponent('#ListBox').RefreshToComplete();
-      if (res.msg != '成功') return wx.showToast({
-        title: res.msg,
-        icon: "none",
-        mask: true
-      });
-      content.pageNumber = res.pageNumber + 1;
-      content.pageTotal = res.pageTotal;
-      this.setData({
-        list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
-      })
-    })
-  },
-  /* 开始搜索 */
-  onSearch({
-    detail
-  }) {
-    if (detail == this.data.content.where.condition) return;
-    this.data.content.where.condition = detail;
-    this.getList(true);
-  },
-  onClear(e) {
-    this.data.content.where.condition = "";
-    this.getList(true);
-  },
-  onReady() {
-    this.selectComponent("#ListBox").setHeight(".top", this);
-  }
-})

+ 0 - 5
pages/tabbar/mine/address/index.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "List": "./modules/list/index"
-  }
-}

+ 0 - 0
pages/tabbar/mine/address/index.scss


+ 0 - 7
pages/tabbar/mine/address/index.wxml

@@ -1,7 +0,0 @@
-<van-search class="top" value="{{ content.where.condition }}" use-action-slot placeholder="请输入搜索关键词" bind:search="onSearch" bind:clear='onClear'>
-	<navigator url="/pages/tabbar/mine/address/update?id={{content.sys_enterpriseid}}" slot="action">添加地址</navigator>
-</van-search>
-<Yl_ListBox id='ListBox' bind:getlist='getList'>
-	<view style="height: 20rpx;" />
-	<List list="{{list}}" />
-</Yl_ListBox>

+ 0 - 11
pages/tabbar/mine/address/modules/list/index.js

@@ -1,11 +0,0 @@
-Component({
-  properties: {
-    list: Array
-  },
-  data: {
-
-  },
-  methods: {
-
-  }
-})

+ 0 - 4
pages/tabbar/mine/address/modules/list/index.json

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

+ 0 - 33
pages/tabbar/mine/address/modules/list/index.scss

@@ -1,33 +0,0 @@
-.item {
-    width: 100vw;
-    margin-bottom: 20rpx;
-    background-color: #ffffff;
-
-    .content {
-        position: relative;
-        padding: 20rpx 30rpx;
-        padding-top: 0;
-        box-sizing: border-box;
-
-        .num {
-            font-size: 28rpx;
-            color: #333333;
-            padding: 20rpx 0 10rpx;
-            font-weight: 700;
-        }
-
-        .exp {
-            line-height: 34rpx;
-            font-size: 24rpx;
-            margin-bottom: 8rpx;
-            color: #999999;
-        }
-    }
-}
-
-/* 文本行数限制 */
-.line-1 {
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-}

+ 0 - 15
pages/tabbar/mine/address/modules/list/index.wxml

@@ -1,15 +0,0 @@
-<view class="item" wx:for="{{list}}" wx:key="index">
-	<navigator url="#" class="content">
-		<view class="num">
-			{{item.name}} {{item.phonenumber}}
-		</view>
-		<view class="exp">
-			省市县:{{(item.province + item.city + item.county)||" --"}}
-		</view>
-		<view class="exp">
-			地址:{{item.address|| ' --'}}
-		</view>
-	</navigator>
-</view>
-
-<Yl_Empty wx:if="{{list.length==0}}" />

+ 0 - 121
pages/tabbar/mine/address/update.js

@@ -1,121 +0,0 @@
-const _Http = getApp().globalData.http;
-let sys_enterpriseid = null;
-Page({
-    data: {
-        form: [{
-            label: "联系人",
-            error: false,
-            errMsg: "",
-            type: "text",
-            value: "",
-            placeholder: "请填写",
-            valueName: "name",
-            required: true,
-            checking: "base"
-        }, {
-            label: "手机号",
-            error: false,
-            errMsg: "",
-            type: "number",
-            value: "",
-            placeholder: "联系人手机号码",
-            valueName: "phonenumber",
-            required: true,
-            checking: "phone"
-        }, {
-            label: "省市县",
-            error: false,
-            errMsg: "",
-            type: "region",
-            value: [],
-            placeholder: "省,市,县",
-            valueName: "region",
-            required: true
-        }, {
-            label: "详细地址",
-            error: false,
-            errMsg: "",
-            type: "textarea",
-            value: "",
-            placeholder: "例: 科创园11栋1103室",
-            valueName: "address",
-            required: true,
-            checking: "base"
-        }, {
-            label: "备注",
-            error: false,
-            errMsg: "",
-            type: "textarea",
-            value: "",
-            placeholder: "地址说明",
-            valueName: "remarks",
-            required: false,
-            checking: "base"
-        }],
-        disabled: true
-    },
-    onLoad(options) {
-        sys_enterpriseid = options.id
-    },
-    submit() {
-        let content = Object.assign({
-            "contactsid": 0,
-            sys_enterpriseid,
-            sex: "男",
-            "name": "",
-            "depname": "",
-            "position": "",
-            "isleader": 1,
-            "birthday": "",
-            "phonenumber": "",
-            "email": "",
-            "address": "",
-            "remarks": "",
-            "workaddress": 1,
-            "isdefault": 0
-        }, this.selectComponent("#Form").submit());
-        content.province = content.region[0] || "";
-        content.city = content.region[1] || "";
-        content.county = content.region[2] || "";
-        delete(content.region);
-        _Http.basic({
-            id: 20221009155703,
-            content
-        }).then(res => {
-            console.log("新建地址", res)
-            wx.showToast({
-                title: res.msg != '成功' ? res.msg : "添加成功",
-                icon: "none",
-                mask: true
-            });
-            if (res.msg == '成功') setTimeout(() => {
-                wx.navigateBack();
-                let page = getCurrentPages().find(v => v.route == 'pages/tabbar/mine/address/index');
-                if (page) {
-                    let content = JSON.parse(JSON.stringify(page.data.content));
-                    content.pageNumber = 1;
-                    content.pageSize = (page.data.content.pageNumber - 1) * (page.data.content.pageSize || 20);
-                    _Http.basic({
-                        "id": "20221009155803",
-                        content
-                    }).then(res => {
-                        if (res.msg == '成功') page.setData({
-                            list: res.data
-                        })
-                    })
-                }
-            }, 500)
-
-
-
-        })
-    },
-    /* 表单是否填写完成 */
-    onConfirm({
-        detail
-    }) {
-        this.setData({
-            disabled: detail
-        })
-    },
-})

+ 0 - 3
pages/tabbar/mine/address/update.json

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

+ 0 - 26
pages/tabbar/mine/address/update.scss

@@ -1,26 +0,0 @@
-.footer {
-	display: flex;
-	justify-content: center;
-	padding: 0 30rpx;
-	position: fixed;
-	width: 100vw;
-	height: 130rpx;
-	background: #FFFFFF;
-	box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
-	bottom: 0;
-	box-sizing: border-box;
-	z-index: 9999;
-	padding-top: 10rpx;
-
-	.but {
-		width: 690rpx;
-		height: 90rpx;
-		background: var(--warning);
-		border-radius: 16rpx;
-		font-size: 28rpx;
-		font-family: PingFang SC-Bold, PingFang SC;
-		font-weight: bold;
-		color: #fff;
-	}
-
-}

+ 0 - 5
pages/tabbar/mine/address/update.wxml

@@ -1,5 +0,0 @@
-<Yl_Field id='Form' form="{{form}}" bind:onConfirm='onConfirm' />
-
-<view class="footer">
-	<van-button custom-class='but' bind:click="submit" disabled='{{disabled}}'>保存地址</van-button>
-</view>

+ 0 - 103
pages/tabbar/mine/changePassword/index.js

@@ -1,103 +0,0 @@
-const md5 = require("../../../../utils/md5");
-const _Http = getApp().globalData.http;
-import Toast from '@vant/weapp/toast/toast';
-Page({
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        from: {
-            password: "", //原密码
-            newPassword: "", //新密码
-            verifyNewPassword: "" //确认密码
-        },
-        disabled: true,
-        loading: false,
-        confirmPassword: "",
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-
-    },
-    /* 修改密码 */
-    changePassword() {
-        if (this.data.disabled || this.data.loading) return;
-        if (this.data.confirmPassword != true) return Toast({
-            message: '请检查新密码与确认密码',
-            position: 'bottom'
-        });
-        let from = this.data.from;
-        this.setData({
-            loading: true
-        })
-        _Http.basic({
-            "classname": "common.usercenter.usercenter",
-            "method": "changePassWord",
-            "content": {
-                "password": md5.hexMD5(from.password),
-                "newpassword": md5.hexMD5(from.newPassword)
-            }
-        }).then(res => {
-            console.log(res)
-            this.setData({
-                loading: false
-            })
-            if (res.msg != '成功') return wx.showToast({
-                title: res.msg,
-                icon: "none"
-            })
-            /* Toast({
-                           message: res.msg,
-                           position: 'bottom'
-                       }); */
-            this.setData({
-                disabled: true
-            })
-            wx.showToast({
-                title: '修改成功!',
-            })
-            setTimeout(() => {
-                wx.navigateBack({
-                    delta: 0
-                })
-            }, 300)
-        })
-    },
-    /* 表单输入 */
-    formInput(e) {
-        let v = e.detail.value.trim(),
-            name = e.currentTarget.dataset.name;
-        this.setData({
-            [`from.${name}`]: v
-        });
-        let disabled = false,
-            from = this.data.from;
-        for (let i in from) {
-            if (from[i] == '') disabled = true;
-        }
-        this.setData({
-            disabled
-        })
-    },
-    /* 验证确认密码 */
-    passwordBlur() {
-        let {
-            from
-        } = this.data,
-            confirmPassword = from.newPassword == from.verifyNewPassword;
-        if (from.newPassword == '' || from.verifyNewPassword == '') confirmPassword = ""
-        this.setData({
-            confirmPassword
-        })
-    },
-    /* 清除确认密码 */
-    clearNewPassword() {
-        this.setData({
-            ['from.verifyNewPassword']: '',
-            confirmPassword: ""
-        })
-    },
-})

+ 0 - 4
pages/tabbar/mine/changePassword/index.json

@@ -1,4 +0,0 @@
-{
-    "navigationBarTitleText": "修改密码",
-    "usingComponents": {}
-}

+ 0 - 64
pages/tabbar/mine/changePassword/index.scss

@@ -1,64 +0,0 @@
-.input-field {
-    width: 690rpx;
-    background-color: #fff;
-    box-sizing: border-box;
-    border-radius: 16rpx;
-    display: flex;
-    position: relative;
-    padding: 26rpx 20rpx 24rpx 30rpx;
-    margin: 20rpx auto;
-
-    .icon-box {
-        width: 40rpx;
-        height: 40rpx;
-        margin-right: 50rpx;
-
-        .iconfont {
-            font-size: 40rpx;
-            color: var(--assist);
-        }
-    }
-
-    .input {
-        flex: 1;
-        font-size: 28rpx;
-        font-family: PingFang SC-Regular, PingFang SC;
-        color: #333333;
-        margin-top: -5rpx;
-    }
-
-    .auth-code {
-        width: 180rpx;
-        height: 40rpx;
-        line-height: 40rpx;
-        text-align: center;
-        flex-shrink: 0;
-        font-size: 28rpx;
-        font-family: PingFang SC-Regular, PingFang SC;
-        color: #3874F6;
-        border-left: 1rpx solid #EEE;
-    }
-
-    .errmsg {
-        font-size: 24rpx;
-        font-family: PingFang SC-Regular, PingFang SC;
-        color: #FF3B30;
-
-        .iconfont {
-            padding-left: 10rpx;
-            color: #BBBBBB;
-        }
-    }
-}
-
-.but-style {
-    width: 500rpx;
-    height: 90rpx;
-    background: #3874F6 !important;
-    border-radius: 45rpx !important;
-    opacity: 0.85;
-    font-size: 28rpx;
-    font-family: PingFang SC-Bold, PingFang SC;
-    font-weight: bold;
-    color: #FFFFFF !important;
-}

+ 0 - 26
pages/tabbar/mine/changePassword/index.wxml

@@ -1,26 +0,0 @@
-<view class='input-field'>
-    <view class="icon-box">
-        <text class="iconfont icon-a-wodemima" />
-    </view>
-    <input class="input" bindinput="inputNumber" password bindinput="formInput" data-name="password" placeholder='请填写原密码' />
-</view>
-<view class='input-field'>
-    <view class="icon-box">
-        <text class="iconfont icon-a-wodemima" />
-    </view>
-    <input class="input" password bindinput="formInput" bindblur='passwordBlur' data-name="newPassword" placeholder='请设置6-20位新密码' />
-</view>
-<view class='input-field'>
-    <view class="icon-box">
-        <text class="iconfont icon-a-wodemima" />
-    </view>
-    <input class="input" password bindinput="formInput" value="{{from.verifyNewPassword}}" bindblur='passwordBlur' data-name="verifyNewPassword" placeholder='请确认新密码' />
-    <view wx:if="{{confirmPassword===false}}" class="errmsg">两次密码不一致
-        <van-icon class="iconfont" name="clear" bind:click="clearNewPassword" />
-    </view>
-</view>
-<view style="width: 100%; text-align: center;margin-top: 100rpx;">
-    <van-button disabled='{{disabled}}' loading='{{loading}}' bindtap="changePassword" loading-text="修改中..." custom-class='but-style'>确定修改</van-button>
-</view>
-
-<van-toast id="van-toast" />

+ 0 - 150
pages/tabbar/mine/index.js

@@ -1,150 +0,0 @@
-const _Http = getApp().globalData.http;
-let downCount = null;
-Page({
-    data: {
-        userMsg: {},
-        pathList: [], //功能权限
-        teamAuth: '', //团队管理权限列表 JSON字符串 用于传递
-    },
-    onLoad(options) {
-        this.queryUserMsg();
-        let authlist = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['通用'], ['个人中心']);
-        let pathList = [{
-            name: "修改登录密码",
-            icon: "icon-a-wodeguanyuyingyong",
-            color: "var(--warning)",
-            path: `/pages/tabbar/mine/changePassword/index`
-        }]
-        if (authlist.length != 0) authlist[0].apps.forEach(v => {
-            switch (v.name) {
-                case "teamManagement":
-                    console.log(v)
-                    pathList.unshift({
-                        name: "团队管理",
-                        icon: "icon-a-wodetuanduiguanli",
-                        color: "var(--assist)",
-                        path: `/${v.path}`
-                    })
-                    this.setData({
-                        teamAuth: JSON.stringify(v.meta.auth)
-                    })
-                    break;
-            }
-        });
-        this.setData({
-            pathList
-        })
-    },
-    /* 查询用户信息 */
-    queryUserMsg() {
-        _Http.basic({
-            "classname": "common.usercenter.usercenter",
-            "method": "queryUserMsg",
-            "content": {
-                "nocache": true
-            }
-        }).then(res => {
-            if (res.msg != '成功') return wx.showToast({
-                title: res.msg,
-                icon: "none"
-            })
-            this.setData({
-                userMsg: res.data
-            })
-        })
-    },
-    onShow() {
-        this.getTabBar().init();
-    },
-    /* 退出登录 */
-    outLogin() {
-        clearTimeout(downCount);
-        wx.showLoading({
-            title: '正在退出...',
-        })
-        downCount = setTimeout(() => {
-            _Http.logout().then(res => {
-                wx.showToast({
-                    title: '退出成功'
-                });
-                let loginMsg = wx.getStorageSync("loginMsg");
-                wx.clearStorageSync();
-                wx.setStorageSync('loginMsg', loginMsg)
-                setTimeout(() => {
-                    wx.reLaunch({
-                        url: '/pages/login/phone',
-                    })
-                }, 300)
-            })
-        }, 300);
-    },
-    /* 去修改用户信息 */
-    changeUserMsg() {
-        let {
-            name,
-            phonenumber,
-            attinfos,
-            hr
-        } = this.data.userMsg;
-        wx.navigateTo({
-            url: `./userMsg/index?attinfos=${JSON.stringify(attinfos)}&name=${name}&phonenumber=${phonenumber}&email=${hr.email}`
-        })
-    },
-    /* 绑定或解绑微信 */
-    bindingWechat(e) {
-        if (this.data.userMsg.iswechatbinding) {
-            let that = this;
-            wx.showModal({
-                title: "提示",
-                content: "是否解除绑定",
-                success: (res) => {
-                    if (res.confirm) that.handleBDWechat(0);
-                }
-            })
-        } else {
-            this.handleBDWechat(1);
-        }
-    },
-    handleBDWechat(isbinging) {
-        let that = this;
-        wx.getUserProfile({
-            desc: '用于完善用户资料',
-            success: ({
-                userInfo
-            }) => {
-                wx.login({
-                    success(res) {
-                        if (res.code) _Http.basic({
-                            "classname": "common.usercenter.usercenter",
-                            "method": "WechatBinding",
-                            content: {
-                                "wechat_code": res.code,
-                                isbinging, // 0解绑 1绑定
-                                wechatuserinfo: userInfo
-                            }
-                        }).then(s => {
-                            if (s.msg != '成功') return wx.showToast({
-                                title: s.data,
-                                icon: "none"
-                            });
-                            setTimeout(() => {
-                                wx.showToast({
-                                    title: isbinging == 0 ? '解除成功' : '绑定成功',
-                                    icon: "none"
-                                })
-                            }, 100);
-                            that.queryUserMsg();
-                        })
-                    }
-                })
-            },
-            fail: () => {
-                wx.showToast({
-                    title: '操作失败,未获得授权',
-                    icon: "none"
-                })
-            }
-        })
-    },
-    onShareAppMessage() {}
-})

+ 0 - 5
pages/tabbar/mine/index.json

@@ -1,5 +0,0 @@
-{
-    "navigationBarTitleText": "我的",
-    "usingComponents": {
-    }
-}

+ 0 - 140
pages/tabbar/mine/index.scss

@@ -1,140 +0,0 @@
-.user-box {
-    width: 750rpx;
-    background-color: var(--bgColor);
-    padding: 30rpx;
-    box-sizing: border-box;
-    color: #FFFFFF;
-    font-family: PingFang SC-Regular, PingFang SC;
-
-    /* 用户展示内容 */
-    .user-con {
-        display: flex;
-        height: 128rpx;
-        align-items: center;
-        background: none;
-
-        .v-img {
-            margin-top: 5rpx;
-        }
-
-        .user-msg {
-            flex: 1;
-            height: 100%;
-            margin-left: 30rpx;
-
-            .user-name {
-                height: 50rpx;
-                font-size: 36rpx;
-                font-weight: bold;
-                margin-top: 16rpx;
-
-                text {
-                    display: inline-block;
-                    height: 40rpx;
-                    font-size: 28rpx;
-                    margin-left: 40rpx;
-                }
-            }
-
-            .user-phone {
-                height: 38rpx;
-                font-size: 24rpx;
-                font-family: PingFang SC-Regular, PingFang SC;
-                line-height: 38rpx;
-                margin-top: 10rpx;
-            }
-        }
-    }
-}
-
-.operating {
-    width: 690rpx;
-    margin: 0 auto;
-    background-color: #fff;
-    margin-top: 40rpx;
-    border-radius: 16rpx;
-    overflow: hidden;
-
-    .item {
-        width: 100%;
-
-        .con {
-            display: flex;
-            justify-content: space-between;
-            width: calc(100% - 30rpx);
-            height: 90rpx;
-            line-height: 90rpx;
-            border-bottom: 1rpx solid #eeeeee;
-            margin-left: 30rpx;
-            padding-right: 20rpx;
-            box-sizing: border-box;
-
-            .label {
-                display: flex;
-                align-items: center;
-                font-size: 28rpx;
-                font-family: PingFang SC-Medium, PingFang SC;
-                font-weight: 500;
-                color: #333333;
-
-                text {
-                    font-size: 50rpx;
-                    margin-right: 10rpx;
-                }
-
-                .bd-wechat {
-                    width: 90rpx;
-                    height: 36rpx;
-                    line-height: 36rpx;
-                    text-align: center;
-                    border-radius: 4rpx;
-                    border: 1rpx solid #CCCCCC;
-                    font-size: 20rpx;
-                    font-family: PingFangSC-Regular-, PingFangSC-Regular;
-                    font-weight: normal;
-                    color: #999999;
-                    margin-left: 10rpx;
-                }
-            }
-
-        }
-    }
-
-    .item:last-child .con {
-        border-bottom: 0;
-    }
-
-    .item-right {
-        display: flex;
-        align-items: center;
-        line-height: 20rpx;
-
-        .user-img {
-            width: 58rpx;
-            height: 58rpx;
-            border-radius: 50%;
-            margin-right: 20rpx;
-        }
-    }
-
-    .tips {
-        font-size: 24rpx !important;
-        margin-top: -4rpx;
-        margin-right: 10rpx;
-        color: #333333;
-    }
-
-    .right-false {
-        color: var(--error);
-    }
-}
-
-/* 退出登录 */
-.out-login {
-    width: 500rpx;
-    height: 90rpx;
-    border-radius: 90rpx !important;
-    font-size: 28rpx;
-    font-family: PingFang SC-Regular, PingFang SC;
-    color: #333333 !important;
-}

+ 0 - 61
pages/tabbar/mine/index.wxml

@@ -1,61 +0,0 @@
-<view class="user-box">
-    <navigator url="#" class="user-con" bindtap="changeUserMsg">
-        <van-image image-class="v-img" round width="128rpx" height="128rpx" src="{{userMsg.attinfos[0].url||'/static/image/user.png'}}" />
-        <view class="user-msg">
-            <view class="user-name">
-                {{userMsg.name}}<text>{{userMsg.hr.position}}</text>
-            </view>
-            <view class="user-phone">
-                {{userMsg.phonenumber}}
-            </view>
-        </view>
-        <van-icon size='40rpx' name="arrow" />
-    </navigator>
-</view>
-
-<view class="operating">
-    <navigator class="item" wx:if="{{userMsg.enterprise.sys_enterpriseid}}" url="/pages/tabbar/mine/address/index?id={{userMsg.enterprise.sys_enterpriseid}}">
-        <view class="con">
-            <view class="label">
-                <text class="iconfont icon-a-wodemendianxinxidizhi" style="color: #085CDF;" />
-                我的地址
-            </view>
-            <view class="item-right">
-                <van-icon size='30rpx' name="arrow" />
-            </view>
-        </view>
-    </navigator>
-    <navigator class="item" url="{{item.name=='团队管理'?item.path+'?auth='+teamAuth:item.path}}" wx:for="{{pathList}}">
-        <view class="con">
-            <view class="label">
-                <text class="iconfont {{item.icon}}" style="color: {{item.color}};" />
-                {{item.name}}
-            </view>
-            <view class="item-right">
-                <van-icon size='30rpx' name="arrow" />
-            </view>
-        </view>
-    </navigator>
-
-    <navigator class="item" url="#" bindtap="bindingWechat">
-        <view class="con">
-            <view class="label">
-                <text class="iconfont icon-a-wodebangdingweixin" style="color: var(--success);" />
-                绑定微信
-                <view wx:if="{{userMsg.iswechatbinding}}" class="bd-wechat">已绑定</view>
-            </view>
-            <view class="item-right">
-                <image class="user-img" wx:if="{{userMsg.iswechatbinding}}" src="{{userMsg.wechatuserinfo.avatarUrl}}" />
-                <view class="tips right-false" wx:else>
-                    未绑定
-                </view>
-                <van-icon size='30rpx' name="arrow" />
-            </view>
-        </view>
-    </navigator>
-
-</view>
-<view style="width: 100vw;text-align: center;margin-top: 200rpx;">
-    <van-button custom-class='out-login' color="#CCC" bindtap="outLogin" plain>退出登录</van-button>
-</view>
-<view style="height: 140rpx;" />

+ 0 - 194
pages/tabbar/mine/userMsg/index.js

@@ -1,194 +0,0 @@
-let time = null;
-const _Http = getApp().globalData.http;
-const MD5 = require('../../../../utils/md5'),
-    deletMark = require("../../../../utils/Check");
-Page({
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        site: getApp().globalData.site,
-        attinfos: [],
-        fromList1: [{
-            label: "姓名",
-            error: false,
-            errMsg: "",
-            type: "text",
-            value: "",
-            placeholder: "请填写",
-            valueName: "name", //绑定的字段名称
-            required: true, //必填
-        }, {
-            label: "邮箱",
-            error: false,
-            errMsg: "",
-            type: "text",
-            value: "",
-            placeholder: "请填写",
-            valueName: "email", //绑定的字段名称
-            required: true //必填
-        }],
-        disabled: true, //禁用按钮
-        show: false, //显示验证码输入框
-        password: "", //验证码
-        countDown: 0, //倒计时
-        loading: false
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-        const that = this;
-        console.log(options.email)
-        this.setData({
-            attinfos: JSON.parse(options.attinfos),
-            "fromList1[0].value": options.name,
-            "fromList1[1].value": options.email == "undefined" ? "" : options.email,
-            "copyPhonenumber": options.phonenumber
-        });
-        if (!['美大'].includes(this.data.site)) { //美大禁用修改手机号
-            this.data.fromList1.push({
-                label: "手机号",
-                error: false,
-                errMsg: "",
-                type: "text",
-                value: options.phonenumber,
-                placeholder: "请填写",
-                valueName: "phonenumber", //绑定的字段名称
-                required: true, //必填
-                callback: function ({
-                    value
-                }) {
-                    that.setData({
-                        show: (value != that.data.copyPhonenumber) ? true : false,
-                        newPhone: value
-                    })
-                },
-            })
-            this.setData({
-                fromList1:this.data.fromList1
-            })
-        }
-    },
-    /* from1监听 */
-    form1CompletedOrNot({
-        detail
-    }) {
-        this.setData({
-            disabled: !detail
-        })
-        if (this.data.show) this.setData({
-            disabled: this.data.password.length == 6
-        })
-    },
-    /* 开始倒计时 */
-    startCountDown() {
-        let countDown = this.data.countDown;
-        if (countDown != 0) return wx.showToast({
-            title: '已发送验证码,请勿重新发送',
-            icon: "none"
-        });
-        if (!deletMark.CheckPhoneNumber(this.data.newPhone.trim() - 0)) return;
-        _Http.basic({
-            "classname": "common.usercenter.usercenter",
-            "method": "updateUserMsg_getPassWord",
-            "content": {
-                "phonenumber": this.data.newPhone.trim()
-            }
-        }).then(res => {
-            console.log(res)
-            wx.showToast({
-                title: res.msg,
-                icon: "none"
-            })
-            if (res.code != 1) return;
-            this.setData({
-                countDown: 30
-            })
-            time = setInterval(() => {
-                if (this.data.countDown == '0') return clearInterval(time);
-                this.setData({
-                    countDown: this.data.countDown - 1
-                })
-            }, 1000);
-        })
-    },
-    /* 提交 */
-    submit() {
-        if (this.data.disabled || this.data.loading) return;
-        let data = this.selectComponent("#form1").getData().returnData;
-        if (!['美大'].includes(this.data.site) && !deletMark.CheckPhoneNumber(data.phonenumber.trim() - 0)) return;
-        if (!deletMark.CheckEmail(data.email.trim())) return;
-        if (this.data.show && this.data.password.length == 0) return wx.showToast({
-            title: '请输入短信验证码',
-            icon: "none"
-        });
-        this.setData({
-            loading: true
-        });
-        _Http.basic({
-            "classname": "common.usercenter.usercenter",
-            "method": "updateUserMsg",
-            "content": {
-                "name": data.name,
-                "phonenumber": !['美大'].includes(this.data.site) ? data.phonenumber : this.data.copyPhonenumber,
-                "email": data.email,
-                "password": MD5.hexMD5(this.data.password.trim())
-            }
-        }).then(res => {
-            this.setData({
-                loading: false
-            })
-            if (res.code != 1) return wx.showToast({
-                title: res.msg,
-                icon: "none"
-            });
-            wx.showToast({
-                title: '修改成功'
-            });
-            this.changeUserMsg();
-            setTimeout(() => {
-                wx.navigateBack({
-                    delta: 0,
-                })
-            }, 300);
-        })
-    },
-    changeUserMsg() {
-        let pages = getCurrentPages();
-        let prevPage = pages[pages.length - 2];
-        prevPage.queryUserMsg();
-    },
-    changeUserImage({
-        detail
-    }) {
-        _Http.basic({
-            "classname": "system.attachment.Attachment",
-            "method": "createFileLink",
-            "content": {
-                "ownertable": "sys_users",
-                "ownerid": wx.getStorageSync('userMsg').userid,
-                "usetype": "headportrait",
-                "attachmentids": detail
-            }
-        }).then(async res => {
-            if (res.msg != '成功') return wx.showToast({
-                title: res.msg,
-                icon: "none"
-            })
-            let linksids = this.data.attinfos.map(v => v.linksid);
-            if (linksids.length) await _Http.basic({
-                "classname": "system.attachment.Attachment",
-                "method": "deleteFileLink",
-                "content": {
-                    "linksids": linksids
-                }
-            });
-            this.setData({
-                attinfos: res.data
-            })
-            this.changeUserMsg();
-        })
-    },
-})

+ 0 - 9
pages/tabbar/mine/userMsg/index.json

@@ -1,9 +0,0 @@
-{
-    "navigationBarTitleText": "个人信息",
-    "usingComponents": {
-        "van-cell-group": "@vant/weapp/cell-group/index",
-        "van-field": "@vant/weapp/field/index",
-        "Yl_Upload": "/components/Yl_Upload/index",
-        "My_form": "/components/My_form/index"
-    }
-}

+ 0 - 68
pages/tabbar/mine/userMsg/index.scss

@@ -1,68 +0,0 @@
-/* 用户头像 */
-.picture {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    width: 750rpx;
-    height: 120rpx;
-    padding: 0 30rpx;
-    background-color: #ffffff;
-    box-sizing: border-box;
-
-    .label {
-        font-size: 28rpx;
-        font-family: PingFang SC-Regular, PingFang SC;
-        color: #666666;
-        line-height: 28rpx;
-    }
-
-    .picture_right {
-        display: flex;
-        align-items: center;
-        color: #CCCCCC;
-        .user-img {
-            width: 64rpx !important;
-            height: 64rpx !important;
-            border-radius: 50% !important;
-            margin-right: 15rpx;
-        }
-    }
-
-
-}
-
-/* 职务 */
-.duty-box {
-    width: 750rpx;
-    height: 90rpx;
-    background-color: #ffffff;
-
-    .con {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        width: calc(100% - 60rpx);
-        height: 100%;
-        margin-left: 30rpx;
-        font-size: 28rpx;
-        font-family: PingFang SC-Regular, PingFang SC;
-
-        .duty-name {
-            color: #666666;
-        }
-
-        .job {
-            color: #262626;
-        }
-    }
-}
-
-/* 保存按钮 */
-.save-but {
-    width: 500rpx;
-    height: 90rpx;
-    background: #FA8C16;
-    border-radius: 45rpx !important;
-    opacity: 0.85;
-    margin-top: 100rpx;
-}

+ 0 - 24
pages/tabbar/mine/userMsg/index.wxml

@@ -1,24 +0,0 @@
-<!-- 头像 -->
-<Yl_Upload maxCount='1' accept='image' bind:uploadCallback='changeUserImage'>
-    <navigator url="#" class="picture">
-        <view class="label">头像</view>
-        <view class="picture_right">
-            <image class="user-img" src="{{attinfos[0].url||'/static/image/user.png'}}"></image>
-            <van-icon size='30rpx' name="arrow" />
-        </view>
-    </navigator>
-</Yl_Upload>
-<view style="height: 20rpx;" />
-
-<!-- "My_form": "/components/My_form/index", -->
-<My_form id='form1' fromList='{{fromList1}}' bindCompletedOrNot='form1CompletedOrNot' />
-<van-cell-group wx:if="{{show}}">
-    <van-field model:value="{{ password }}" required center clearable label="短信验证码" placeholder="请输入短信验证码" border="{{ false }}" use-button-slot>
-        <van-button slot="button" size="small" color='var(--assist)' bindtap="startCountDown">
-            {{countDown==0?'发送验证码':countDown+'s'}}
-        </van-button>
-    </van-field>
-</van-cell-group>
-<view style="width: 100%;text-align: center;">
-    <van-button custom-class='save-but' disabled='{{disabled}}' loading="{{loading}}" loading-text="保存中..." color="var(--warning)" bindtap="submit">保存</van-button>
-</view>