浏览代码

团队管理

zhaoxiaohai 3 年之前
父节点
当前提交
84327024ab
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 6 1
      pages/teams/index.js
  2. 1 1
      pages/teams/index.wxml

+ 6 - 1
pages/teams/index.js

@@ -37,12 +37,17 @@ Page({
             "method": this.data.butText == '账号' ? "query_teamList" : "query_roleList",
             "content": this.data.content
         }).then(res => {
-            console.log(res)
+            console.log("列表", res)
             this.selectComponent('#ListBox').RefreshToComplete();
             if (res.msg != '成功') return wx.showToast({
                 title: res.data,
                 icon: "none"
             })
+            if (this.data.butText == '账号') {
+                for (let i = 0; i < res.data.length; i++) {
+                    res.data[i].attinfos = res.data[i].attinfos.filter(v => v.usetype == 'headportrait');
+                }
+            }
             this.setData({
                 list: (res.pageNumber == 1) ? res.data : this.data.list.concat(res.data),
                 ['content.pageNumber']: res.pageNumber + 1,

+ 1 - 1
pages/teams/index.wxml

@@ -7,7 +7,7 @@
     <block wx:if="{{butText=='账号'}}">
         <navigator url="#" class="my-card user-item" wx:for="{{list}}" data-item="{{item}}" bindtap="changeUser">
             <view class="user-img">
-                <van-image width="96rpx" height="96rpx" fit='cover' radius='48rpx' lazy-load src="/static/image/user.png" />
+                <van-image width="96rpx" height="96rpx" fit='cover' radius='48rpx' lazy-load src="{{item.attinfos[0].url||'/static/image/user.png'}}" />
             </view>
             <view class="details">
                 <view class="user-name">