zhaoxiaohai пре 3 година
родитељ
комит
c2ff6f1252

+ 12 - 4
README.md

@@ -4,11 +4,15 @@
 
 ​	userCenter -- 用户中心
 
+​	tabbar-pages -- tabbar页面
+
+​	teamManagement -- index-团队管理 change-成员管理
+
 # 自定义组件:
 
 ​	My_Background -- 背景图片 //登录页面背景
 
-​	My_RectangularFrame -- 矩形架构 //登录页面表单矩型盒子
+​	My_GreyRectangleForm -- 灰色矩形架构 //登录页面表单矩型盒子
 
 ​	My_ChangeUser -- 切换用户
 
@@ -20,9 +24,11 @@
 
 ​	My_GreyRectangle -- 灰色矩形 用于个人信息表单
 
+​	My_MembersAndProducts -- 团队管理与产品管理
+
 # 缓存
 
-userData -- 用户基本数据 -- 保存数据:index-用户列表下标,token,fisadministrator--是否主账号,tagentsid,tenterpriseid,userid
+userData -- 用户基本数据 -- 保存数据:index-用户列表下标,token,fisadministrator--是否主账号,tagentsid,tenterpriseid,userid
 
 
 
@@ -30,10 +36,12 @@ userData -- 用户基本数据 -- 保存数据:index-用户列表下标,toke
 
 # wxss
 
-​	css/form.wxss -- 表单样式
+​	css/form.wxss -- 表单样式 登录
+
+​	css/form2.wxss -- 表单样式 个人信息
 
 ​	#ED6876 -- 报错颜色
 
 # UI组件库修改
 
-van-cell -- wxss -- 注释了 -- padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px)
+van-cell -- wxss -- 注释了 -- padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px)

+ 6 - 2
app.json

@@ -2,12 +2,16 @@
     "pages": [
         "pages/login/index",
         "pages/userCenter/index",
-        "pages/tabbar-pages/user/index"
+        "pages/tabbar-pages/user/index",
+        "pages/teamManagement/index",
+        "pages/teamManagement/change"
     ],
     "usingComponents": {
         "van-button": "@vant/weapp/button/index",
         "van-field": "@vant/weapp/field/index",
-        "van-icon": "@vant/weapp/icon/index"
+        "van-icon": "@vant/weapp/icon/index",
+        "My_GeneralTemplate":"/components/My_GeneralTemplate/index",
+        "My_GreyRectangleForm":"/components/My_GreyRectangleForm/index"
     },
     "window": {
         "backgroundTextStyle": "light",

+ 12 - 0
app.wxss

@@ -2,3 +2,15 @@ page {
     font-family: PingFangSC-Medium, PingFang SC;
     background-color: #F6F7F8;
 }
+
+/* 灰色矩形盒子 */
+.grey_rectangle{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 28rpx;
+    background-color: #F6F7F8;
+    border-radius: 10rpx;
+    box-sizing: border-box;
+    margin-bottom: 30rpx;
+}

+ 0 - 26
components/My_GreyRectangle/index.wxss

@@ -1,26 +0,0 @@
-/* 盒子 */
-.grey_rectangle{
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    padding: 28rpx;
-    background-color: #F6F7F8;
-    border-radius: 10rpx;
-    box-sizing: border-box;
-    margin-bottom: 30rpx;
-}
-
-/* 标题 */
-.grey_rectangle_title{
-    font-size: 32rpx;
-    color: #000000;
-}
-.grey_rectangle_title>text{
-    color: #4BBECF;
-}
-
-/* 插槽 */
-.grey_rectangle_slot{
-    display: flex;
-    align-items: center;
-}

+ 3 - 0
components/My_GreyRectangle/index.js → components/My_GreyRectangleForm/index.js

@@ -14,6 +14,9 @@ Component({
             type: Boolean
         }
     },
+    options: {
+        addGlobalClass: true,
+    },
 
     /**
      * 组件的初始数据

+ 0 - 0
components/My_GreyRectangle/index.json → components/My_GreyRectangleForm/index.json


+ 0 - 0
components/My_GreyRectangle/index.wxml → components/My_GreyRectangleForm/index.wxml


+ 14 - 0
components/My_GreyRectangleForm/index.wxss

@@ -0,0 +1,14 @@
+/* 标题 */
+.grey_rectangle_title{
+    font-size: 32rpx;
+    color: #000000;
+}
+.grey_rectangle_title>text{
+    color: #4BBECF;
+}
+
+/* 插槽 */
+.grey_rectangle_slot{
+    display: flex;
+    align-items: center;
+}

+ 47 - 0
components/My_MembersAndProducts/index.js

@@ -0,0 +1,47 @@
+// components/My_MembersAndProducts/index.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        /* 是否主账号 */
+        fisadministrator: {
+            type: Boolean
+        },
+        /* 图片 */
+        attinfos: {
+            type: Object
+        },
+        /* 标题 */
+        title: {
+            type: String
+        },
+        /* 第二行 */
+        twoRow: {
+            type: String
+        },
+        /* 第三行 */
+        threeRow: {
+            type: String
+        }
+    },
+    options: {
+        addGlobalClass: true,
+    },
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        /* 修改成员信息 */
+        changeMessage() {
+            this.triggerEvent("changeMessage")
+        }
+    }
+})

+ 4 - 0
components/My_MembersAndProducts/index.json

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

+ 25 - 0
components/My_MembersAndProducts/index.wxml

@@ -0,0 +1,25 @@
+<view class="grey_rectangle" style="padding: 14rpx 30rpx;">
+    <view class="grey_rectangle_box">
+        <!-- 图片 -->
+        <view class="grey_rectangle_image" style="height: 100rpx; width: 100rpx; border-radius: 50%;">
+            <image wx:if="{{attinfos.fobsurl}}" src="{{attinfos.fobsurl}}" mode="aspectFill"></image>
+            <image wx:else src="/static/userImage.png" mode="aspectFit"></image>
+        </view>
+        <!-- 文本信息 -->
+        <view class="grey_rectangle_text">
+            <view class="grey_rectangle_text_title">
+                {{title}}
+            </view>
+            <view class="grey_rectangle_text_row">
+                {{twoRow}}
+            </view>
+            <view class="grey_rectangle_text_row">
+                {{threeRow}}
+            </view>
+        </view>
+        <!-- 图标 -->
+        <view class="grey_rectangle_icon" wx:if="{{fisadministrator}}">
+            <image src="/static/changeImg.png" mode="aspectFit" bindtap="changeMessage"></image>
+        </view>
+    </view>
+</view>

+ 53 - 0
components/My_MembersAndProducts/index.wxss

@@ -0,0 +1,53 @@
+/* 盒子大小 */
+.grey_rectangle_box {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    width: 100%;
+    height: 136rpx;
+}
+
+/* 图片 */
+.grey_rectangle_image {
+    overflow: hidden;
+}
+
+.grey_rectangle_image>image {
+    width: 100%;
+    height: 100%;
+}
+
+/* 文本 */
+.grey_rectangle_text {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    margin-left: 30rpx;
+}
+
+.grey_rectangle_text_title {
+    font-size: 32rpx;
+    color: #000000;
+    margin-bottom: 8rpx;
+}
+
+.grey_rectangle_text_row {
+    font-size: 28rpx;
+    color: #000000;
+    opacity: .4;
+    margin-bottom: 4rpx;
+}
+
+/* 图标 */
+.grey_rectangle_icon {
+    display: flex;
+    align-items: center;
+    height: 100%;
+    width: 48rpx;
+}
+
+.grey_rectangle_icon>image {
+    width: 48rpx;
+    height: 48rpx;
+    border-radius: 50%;
+}

+ 29 - 0
css/form2.wxss

@@ -0,0 +1,29 @@
+/* 表单输入 */
+.user_message_input {
+    padding: 0 30rpx;
+    margin-top: 40rpx;
+    box-sizing: border-box;
+}
+
+.input-class {
+    font-size: 32rpx !important;
+    width: 350rpx !important;
+    text-align: right !important;
+    background-color: #F6F7F8 !important;
+}
+
+/* 提交按钮 */
+.submit_but {
+    width: 240rpx;
+    height: 88rpx;
+    box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.1);
+    border-radius: 44px;
+    margin: 60rpx auto;
+    font-size: 32rpx !important;
+    font-family: PingFangSC-Medium, PingFang SC !important;
+    font-weight: 500 !important;
+}
+
+.custom-class {
+    width: 100% !important;
+}

+ 12 - 12
pages/login/index.wxml

@@ -10,14 +10,14 @@
             <view class="input_text_box">
                 <image class="input_text_img" src="../../static/login/Phone.png" mode="aspectFill"></image>
                 <view class="input_text_input">
-                    <van-field autosize model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" type="number" input-class="input-class" placeholder="请输入手机号" border="{{ false }}" bind:change="onChange" />
+                    <van-field autosize model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" type="number" input-class="input-class" placeholder="请输入手机号" border="{{ false }}" />
                 </view>
             </view>
             <!-- 验证码 -->
             <view class="input_text_box">
                 <image class="input_text_img" src="../../static/login/verificationcode.png" mode="aspectFill"></image>
                 <view class="input_text_input">
-                    <van-field autosize model:value="{{ password }}" data-name="password" bind:focus='inputFocus' type="number" input-class="input-class" error="{{errTips.password}}" placeholder="请输入验证码" border="{{ false }}" bind:change="onChange" />
+                    <van-field autosize model:value="{{ password }}" data-name="password" bind:focus='inputFocus' type="number" input-class="input-class" error="{{errTips.password}}" placeholder="请输入验证码" border="{{ false }}" />
                 </view>
                 <view class="input_text_code" bindtap="getVerifyCode">
                     获取
@@ -34,14 +34,14 @@
             <view class="input_text_box">
                 <image class="input_text_img" src="../../static/login/username.png" mode="aspectFit"></image>
                 <view class="input_text_input">
-                    <van-field autosize model:value="{{ fname }}" input-class="input-class" placeholder="请输入账号名" border="{{ false }}" bind:change="onChange" />
+                    <van-field autosize model:value="{{ fname }}" input-class="input-class" placeholder="请输入账号名" border="{{ false }}" />
                 </view>
             </view>
             <!-- 验证码 -->
             <view class="input_text_box">
                 <image class="input_text_img" src="../../static/login/identity.png" mode="aspectFill"></image>
                 <view class="input_text_input">
-                    <van-field autosize model:value="{{ frole }}" input-class="input-class" placeholder="请填写身份/职位" border="{{ false }}" bind:change="onChange" />
+                    <van-field autosize model:value="{{ frole }}" input-class="input-class" placeholder="请填写身份/职位" border="{{ false }}" />
                 </view>
             </view>
         </view>
@@ -55,13 +55,13 @@
             <view class="input_text_title">品牌名<text>*</text></view>
             <view class="input_text_box box_mar_bot">
                 <view class="input_text_input marLeft">
-                    <van-field autosize model:value="{{ fbrand }}" data-name="fbrand" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fbrand}}" input-class="input-class" placeholder="请输入品牌名" border="{{ false }}" bind:change="onChange" />
+                    <van-field autosize model:value="{{ fbrand }}" data-name="fbrand" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fbrand}}" input-class="input-class" placeholder="请输入品牌名" border="{{ false }}" />
                 </view>
             </view>
             <!-- 品牌LOGO -->
             <view class="input_text_title">品牌LOGO<text>*</text></view>
             <view class="box_mar_bot">
-                <My_UploadFiles  id="loadFiles" UploadShow="{{true}}" upType="Logo" maxCount='1' logoTips="{{errTips.logoTips}}" Tips="请上传logo图片"></My_UploadFiles>
+                <My_UploadFiles id="loadFiles" UploadShow="{{true}}" upType="Logo" maxCount='1' logoTips="{{errTips.logoTips}}" Tips="请上传logo图片"></My_UploadFiles>
             </view>
             <!-- 经营类目 -->
             <view style="position: relative;">
@@ -71,7 +71,7 @@
                 </view>
                 <view class="input_text_box box_mar_bot">
                     <view class="input_text_input marLeft">
-                        <van-field autosize model:value="{{ showSaleprod }}" data-name="showSaleprod" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.showSaleprod}}" input-class="input-class" placeholder="请输入经营类目" border="{{ false }}" bind:change="onChange" />
+                        <van-field autosize model:value="{{ showSaleprod }}" data-name="showSaleprod" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.showSaleprod}}" input-class="input-class" placeholder="请输入经营类目" border="{{ false }}" />
                     </view>
                 </view>
             </view>
@@ -79,21 +79,21 @@
             <view class="input_text_title">注册公司名<text>*</text></view>
             <view class="input_text_box box_mar_bot">
                 <view class="input_text_input marLeft">
-                    <van-field autosize model:value="{{ fagentname }}" data-name="fagentname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fagentname}}" input-class="input-class" placeholder="请输入公司名称" border="{{ false }}" bind:change="onChange" />
+                    <van-field autosize model:value="{{ fagentname }}" data-name="fagentname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fagentname}}" input-class="input-class" placeholder="请输入公司名称" border="{{ false }}" />
                 </view>
             </view>
             <!-- 联系人 -->
             <view class="input_text_title">联系人<text>*</text></view>
             <view class="input_text_box box_mar_bot">
                 <view class="input_text_input marLeft">
-                    <van-field autosize model:value="{{ fcontact }}" data-name="fcontact" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fcontact}}" input-class="input-class" placeholder="请输入联系人" border="{{ false }}" bind:change="onChange" />
+                    <van-field autosize model:value="{{ fcontact }}" data-name="fcontact" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fcontact}}" input-class="input-class" placeholder="请输入联系人" border="{{ false }}" />
                 </view>
             </view>
             <!-- 联系方式 -->
             <view class="input_text_title">联系方式<text>*</text></view>
             <view class="input_text_box box_mar_bot">
                 <view class="input_text_input marLeft">
-                    <van-field autosize model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="请输入联系方式" border="{{ false }}" bind:change="onChange" />
+                    <van-field autosize model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="请输入联系方式" border="{{ false }}" />
                 </view>
             </view>
             <!-- 公司介绍 -->
@@ -106,14 +106,14 @@
             <view class="input_text_title">地址</view>
             <view class="input_text_box box_mar_bot">
                 <view class="input_text_input marLeft">
-                    <van-field autosize model:value="{{ faddress }}" input-class="input-class" placeholder="请输入地址" border="{{ false }}" bind:change="onChange" />
+                    <van-field autosize model:value="{{ faddress }}" input-class="input-class" placeholder="请输入地址" border="{{ false }}" />
                 </view>
             </view>
             <!-- 统一社会代码 -->
             <view class="input_text_title">统一社会代码</view>
             <view class="input_text_box box_mar_bot">
                 <view class="input_text_input marLeft">
-                    <van-field autosize model:value="{{ fdutyparagraph }}" input-class="input-class" placeholder="请输入统一社会代码" border="{{ false }}" bind:change="onChange" />
+                    <van-field autosize model:value="{{ fdutyparagraph }}" input-class="input-class" placeholder="请输入统一社会代码" border="{{ false }}" />
                 </view>
             </view>
         </view>

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

@@ -41,6 +41,11 @@ Page({
             name
         } = e.target.dataset
         console.log(name)
+        if(name=="团队管理"){
+            wx.navigateTo({
+              url: '/pages/teamManagement/index',
+            })
+        }
     },
     /* 跳转用户信息 */
     toUserCenter() {

+ 0 - 1
pages/tabbar-pages/user/index.json

@@ -1,6 +1,5 @@
 {
   "usingComponents": {
-    "My_GeneralTemplate": "../../../components/My_GeneralTemplate/index",
     "van-grid": "@vant/weapp/grid/index",
     "van-grid-item": "@vant/weapp/grid-item/index"
   }

+ 186 - 0
pages/teamManagement/change.js

@@ -0,0 +1,186 @@
+import {
+    ApiModel
+} from "../../utils/api";
+const _Http = new ApiModel();
+import {
+    TestVerify
+} from "../../utils/verify"
+const _Verify = new TestVerify();
+Page({
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        fname: '', //用户名称
+        frole: '', //身份/职位
+        fphonenumber: '', //手机号码
+        subusers: '', //权限
+        tenterprise_userid: 0, //用户id
+        checked: true, //是否启用
+        /* 必填项 */
+        errTips: {
+            fname: false,
+            frole: false,
+            fphonenumber: false
+        }
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        if (options.data) {
+            const memberMessage = JSON.parse(options.data);
+            console.log(memberMessage)
+            this.setData({
+                fname: memberMessage.fname,
+                frole: memberMessage.frole,
+                fphonenumber: memberMessage.fphonenumber,
+                fname: memberMessage.fname,
+                subusers: memberMessage.subusers,
+                tenterprise_userid: memberMessage.tenterprise_userid
+            })
+        }
+    },
+    /* 提交 */
+    submit() {
+        if (!this.submitVerify()) return wx.showToast({
+            title: '请检查表单内容',
+            icon: "none"
+        });
+        _Http.basic({
+            "accesstoken": wx.getStorageSync('userData').token,
+            "classname": "customer.usercenter.teammsg.teammsg",
+            "method": "update_userMsg",
+            "content": {
+                "tenterprise_userid": this.data.tenterprise_userid,
+                "fname": this.data.fname,
+                "frole": this.data.frole,
+                "fphonenumber": this.data.fphonenumber,
+                "subusers": this.data.subusers
+            }
+        }).then(res => {
+            console.log(res)
+            if (res.msg == "成功") {
+                wx.showToast({
+                  title: '保存成功',
+                });
+                setTimeout(()=>{
+                    wx.navigateBack({
+                        delta: 1
+                      })
+                },500)
+            }
+        })
+    },
+    /* 商户提交前验证表单 */
+    submitVerify() {
+        let errTips = this.data.errTips,
+            verify = true;
+        //账户名称
+        if (!_Verify.required(this.data.fname)) {
+            errTips.fname = true;
+            verify = false;
+        };
+        //身份/职位
+        if (!_Verify.required(this.data.frole)) {
+            errTips.frole = true;
+            verify = false;
+        };
+        //验证联系方式
+        if (!_Verify.phoneNumber(this.data.fphonenumber)) {
+            errTips.fphonenumber = true;
+            verify = false;
+        }
+        this.setData({
+            errTips
+        })
+        return verify;
+    },
+    /* 获取焦点 */
+    inputFocus(e) {
+        const {
+            name
+        } = e.currentTarget.dataset;
+        let errTips = this.data.errTips;
+        errTips[name] = false;
+        this.setData({
+            errTips
+        })
+    },
+    /* 失去焦点 */
+    inputBlur(e) {
+        const {
+            name
+        } = e.currentTarget.dataset;
+        const {
+            value
+        } = e.detail;
+        if (name == 'fphonenumber') {
+            if (!_Verify.phoneNumber(this.data.fphonenumber, 1)) return this.setData({
+                "errTips.fphonenumber": true
+            })
+        };
+        if (value.trim() == "") {
+            let errTips = this.data.errTips;
+            errTips[name] = true;
+            this.setData({
+                errTips
+            })
+        }
+    },
+    /* 开关 */
+    onChange() {
+        this.setData({
+            checked: !this.data.checked
+        })
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 5 - 0
pages/teamManagement/change.json

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

+ 28 - 0
pages/teamManagement/change.wxml

@@ -0,0 +1,28 @@
+<My_GeneralTemplate>
+    <view style="padding: 0 30rpx 20rpx;">
+        <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 }}" />
+        </My_GreyRectangleForm>
+
+        <My_GreyRectangleForm title="身份/职位" required>
+            <van-field autosize model:value="{{ frole }}" data-name="frole" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.frole}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+        </My_GreyRectangleForm>
+
+        <My_GreyRectangleForm title="手机号码" required>
+            <van-field autosize model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+        </My_GreyRectangleForm>
+
+        <My_GreyRectangleForm title="权限设置">
+        </My_GreyRectangleForm>
+
+        <My_GreyRectangleForm title="是否启用">
+            <van-switch style="position: absolute; margin-left: -110rpx; margin-top: 10rpx;" checked="{{ checked }}" bind:change="onChange" />
+        </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>
+</view>

+ 1 - 0
pages/teamManagement/change.wxss

@@ -0,0 +1 @@
+@import "/css/form2.wxss";

+ 93 - 0
pages/teamManagement/index.js

@@ -0,0 +1,93 @@
+import {
+    ApiModel
+} from "../../utils/api";
+const _Http = new ApiModel();
+Page({
+    options: {
+        addGlobalClass: true,
+    },
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        memberList: [], //成员列表
+        fisadministrator: false, //是否主账号
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {},
+    /* 修改成员信息 */
+    changeMemberMessage(e) {
+        const {
+            index
+        } = e.currentTarget.dataset;
+        const data = JSON.stringify(this.data.memberList[index]);
+        wx.navigateTo({
+            url: './change?data=' + data,
+        })
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+        //获取成员列表
+        _Http.basic({
+            "accesstoken": wx.getStorageSync('userData').token,
+            "classname": "customer.usercenter.teammsg.teammsg",
+            "method": "query_userList",
+            "content": {
+                "getdatafromdbanyway": true
+            }
+        }).then(res => {
+            if (res.msg != '成功') return;
+            this.setData({
+                memberList: res.data,
+                fisadministrator: (wx.getStorageSync('userData').fisadministrator == 1) ? true : false
+            })
+        })
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 5 - 0
pages/teamManagement/index.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "My_MembersAndProducts": "/components/My_MembersAndProducts/index"
+  }
+}

+ 5 - 0
pages/teamManagement/index.wxml

@@ -0,0 +1,5 @@
+<My_GeneralTemplate>
+    <view class="member_list">
+        <My_MembersAndProducts wx:for="{{memberList}}" data-index="{{index}}" bind:changeMessage="changeMemberMessage" title="{{item.fname}}" twoRow="{{'身份/职位:'+item.frole}}" threeRow="{{'手机:'+item.fphonenumber}}" fisadministrator="{{fisadministrator}}" attinfos="{{item.attinfos[0]}}"></My_MembersAndProducts>
+    </view>
+</My_GeneralTemplate>

+ 3 - 0
pages/teamManagement/index.wxss

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

+ 27 - 0
pages/userCenter/index.js

@@ -94,6 +94,33 @@ Page({
             }
         })
     },
+    /* 获取焦点 */
+    inputFocus(e) {
+        const {
+            name
+        } = e.currentTarget.dataset;
+        let errTips = this.data.errTips;
+        errTips[name] = false;
+        this.setData({
+            errTips
+        })
+    },
+    /* 失去焦点 */
+    inputBlur(e) {
+        const {
+            name
+        } = e.currentTarget.dataset;
+        const {
+            value
+        } = e.detail;
+        if (value.trim() == "") {
+            let errTips = this.data.errTips;
+            errTips[name] = true;
+            this.setData({
+                errTips
+            })
+        }
+    },
     /* 修改用户头像 */
     userImageChange(data) {
         const attinfos = [{

+ 1 - 3
pages/userCenter/index.json

@@ -1,7 +1,5 @@
 {
   "usingComponents": {
-    "My_GeneralTemplate": "../../components/My_GeneralTemplate/index",
-    "My_UploadFiles":"../../components/My_UploadFiles/index",
-    "My_GreyRectangle":"../../components/My_GreyRectangle/index"
+    "My_UploadFiles":"../../components/My_UploadFiles/index"
   }
 }

+ 22 - 22
pages/userCenter/index.wxml

@@ -16,29 +16,29 @@
     </view>
     <!-- 表单输入区 -->
     <view class="user_message_input">
-        <My_GreyRectangle 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 }}" bind:change="onChange" />
-        </My_GreyRectangle>
-        <My_GreyRectangle title="身份/职位" required>
-            <van-field autosize model:value="{{ frole }}" data-name="frole" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.frole}}" input-class="input-class" placeholder="身份/职位" border="{{ false }}" bind:change="onChange" />
-        </My_GreyRectangle>
-        <My_GreyRectangle title="手机" required>
-            <van-field autosize disabled model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="身份/职位" border="{{ false }}" bind:change="onChange" />
-        </My_GreyRectangle>
-        <My_GreyRectangle title="微信">
-            <van-field autosize model:value="{{ fwechatno }}" input-class="input-class" placeholder="微信号/手机号" border="{{ false }}" bind:change="onChange" />
-        </My_GreyRectangle>
-        <My_GreyRectangle title="地址">
-            <van-field autosize model:value="{{ faddress }}" input-class="input-class" placeholder="请输入地址" border="{{ false }}" bind:change="onChange" />
-        </My_GreyRectangle>
-        <My_GreyRectangle title="性别">
-        </My_GreyRectangle>
-        <My_GreyRectangle title="生日">
+        <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 }}" />
+        </My_GreyRectangleForm>
+        <My_GreyRectangleForm title="身份/职位" required>
+            <van-field autosize model:value="{{ frole }}" data-name="frole" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.frole}}" input-class="input-class" placeholder="身份/职位" border="{{ false }}" />
+        </My_GreyRectangleForm>
+        <My_GreyRectangleForm title="手机" required>
+            <van-field autosize disabled model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="身份/职位" border="{{ false }}" />
+        </My_GreyRectangleForm>
+        <My_GreyRectangleForm title="微信">
+            <van-field autosize model:value="{{ fwechatno }}" input-class="input-class" placeholder="微信号/手机号" border="{{ false }}" />
+        </My_GreyRectangleForm>
+        <My_GreyRectangleForm title="地址">
+            <van-field autosize model:value="{{ faddress }}" input-class="input-class" placeholder="请输入地址" border="{{ false }}" />
+        </My_GreyRectangleForm>
+        <My_GreyRectangleForm title="性别">
+        </My_GreyRectangleForm>
+        <My_GreyRectangleForm title="生日">
             <view></view>
-        </My_GreyRectangle>
-        <My_GreyRectangle title="邮箱">
-            <van-field autosize model:value="{{ femail }}" input-class="input-class" placeholder="邮箱地址" border="{{ false }}" bind:change="onChange" />
-        </My_GreyRectangle>
+        </My_GreyRectangleForm>
+        <My_GreyRectangleForm title="邮箱">
+            <van-field autosize model:value="{{ femail }}" input-class="input-class" placeholder="邮箱地址" border="{{ false }}" />
+        </My_GreyRectangleForm>
     </view>
 </My_GeneralTemplate>
 <!-- 时间选择器 -->

+ 2 - 30
pages/userCenter/index.wxss

@@ -1,3 +1,5 @@
+@import "/css/form2.wxss";
+
 /* 用户头部 */
 .user_header {
     width: 100%;
@@ -34,34 +36,4 @@
 .changeImage {
     font-size: 32rpx;
     color: #333333;
-}
-
-/* 表单输入 */
-.user_message_input {
-    padding: 0 30rpx;
-    margin-top: 40rpx;
-    box-sizing: border-box;
-}
-
-.input-class {
-    font-size: 32rpx !important;
-    width: 350rpx !important;
-    text-align: right !important;
-    background-color: #F6F7F8 !important;
-}
-
-/* 提交按钮 */
-.submit_but {
-    width: 240rpx;
-    height: 88rpx;
-    box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.1);
-    border-radius: 44px;
-    margin: 60rpx auto;
-    font-size: 32rpx !important;
-    font-family: PingFangSC-Medium, PingFang SC !important;
-    font-weight: 500 !important;
-}
-
-.custom-class {
-    width: 100% !important;
 }

Разлика између датотеке није приказан због своје велике величине
+ 10 - 0
project.private.config.json


BIN
static/changeImg.png


Неке датотеке нису приказане због велике количине промена