bayi 2 年之前
父節點
當前提交
ceee33c61d

+ 1 - 0
custom-tab-bar/index.js

@@ -64,6 +64,7 @@ Component({
       wx.switchTab({
         url
       });
+      console.log(this.data.userInfo);
     }
   }
 })

+ 4 - 1
custom-tab-bar/index.wxml

@@ -1,7 +1,10 @@
 <view class="tab-bar">
   <view wx:for="{{listTab}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}"
     bindtap="switchTab">
-    <view class="noticeTips" wx:if="{{item.pagePath=='/pages/my/index'&&userInfo.messageCount>0}}">{{userInfo.messageCount}}</view>
+    <view class="noticeTips" wx:if="{{item.pagePath=='/pages/my/index'&&userInfo.myCount>0}}">
+      {{userInfo.myCount}}</view>
+    <view class="noticeTips" wx:if="{{item.pagePath=='/pages/message/index'&&userInfo.mCount>0}}">
+      {{userInfo.mCount}}</view>
     <image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image>
     <view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view>
   </view>

+ 4 - 2
pages/chat/index.js

@@ -22,7 +22,7 @@ Page({
     triggered: false,
     isIos: app.globalData.isIOS,
     navBarHeight: app.globalData.navBarHeight,
-    uid: wx.getStorageSync('uid')
+    uid: ''
   },
   onLoad(options) {
     console.log(options);
@@ -30,7 +30,8 @@ Page({
       title: options.title,
     })
     this.setData({
-      targetUid: options.uid
+      targetUid: options.uid,
+      uid:wx.getStorageSync('uid')
     })
     this.storeBindings = createStoreBindings(this, {
       store,
@@ -131,6 +132,7 @@ Page({
     })
   },
   bindKeyInput(e) {
+    console.log(e);
     this.setData({
       value: e.detail.value
     })

+ 1 - 1
pages/chat/index.wxml

@@ -3,7 +3,7 @@
     refresher-enabled bindrefresherrefresh='getMsgDet' refresher-triggered="{{triggered}}">
     <block wx:for="{{list}}" wx:key="id">
       <view class="base someone" wx:if="{{uid!=item.senderUid}}">
-        <image src="{{item.user.avatar}}" class="avatar" bindtap="jumpUserInfo" data-uid='{{item.receiverUid}}' />
+        <image src="{{item.user.avatar}}" class="avatar" bindtap="jumpUserInfo" data-uid='{{item.senderUid}}' />
         <view class="message" wx:if="{{item.type==1}}">{{item.content}}</view>
         <image src="{{item.content}}" wx:else class="msgImg" mode="widthFix" />
       </view>

+ 0 - 93
pages/friend/index.less

@@ -193,99 +193,6 @@
         }
       }
     }
-
-    /* 
-    .follow {
-      margin-top: 30rpx;
-      box-sizing: border-box;
-      width: 100%;
-      background-color: white;
-      border-radius: 20rpx;
-      padding: 20rpx 34rpx 16rpx;
-      display: flex;
-      align-items: center;
-      box-shadow: rgba(99, 99, 99, 0.1) 0px 2px 8px 0px;
-
-      .left {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-
-        .avatar {
-          width: 106rpx;
-          height: 106rpx;
-          border-radius: 50%;
-        }
-
-        .profession {
-          display: inline-block;
-          margin-top: 4rpx;
-          padding: 4rpx 20rpx;
-          font-size: 24rpx;
-          color: white;
-          background-color: #10CA61;
-          border-radius: 20rpx;
-        }
-      }
-
-      .right {
-        margin-left: 46rpx;
-        flex: 1;
-
-        .infoBox {
-          border-bottom: 1rpx solid #00000020;
-
-          .top {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-
-            .nickName {
-              font-size: 32rpx;
-            }
-
-            .state {
-              text-align: center;
-
-              .stateText {
-                width: 160rpx;
-                padding: 12rpx 0rpx;
-                border-radius: 50rpx;
-                font-size: 24rpx;
-              }
-
-              .already {
-                background-color: #E4EDFB;
-              }
-
-              .yet {
-                background-color: #1BC665;
-                color: white;
-              }
-            }
-          }
-
-          .number {
-            padding-bottom: 14rpx;
-            font-size: 24rpx;
-            color: #00000060;
-          }
-        }
-
-        .statistics {
-          display: flex;
-          justify-content: space-between;
-          align-items: center;
-          padding-top: 12rpx;
-          font-size: 28rpx;
-          color: #00000060;
-
-          text {
-            margin-left: 6rpx;
-          }
-        }
-      }
-    } */
   }
 }
 

+ 0 - 92
pages/friend/index.wxss

@@ -42,98 +42,6 @@
 .followBox .box {
   padding-bottom: 20rpx;
   margin-top: 88rpx;
-  /* 
-    .follow {
-      margin-top: 30rpx;
-      box-sizing: border-box;
-      width: 100%;
-      background-color: white;
-      border-radius: 20rpx;
-      padding: 20rpx 34rpx 16rpx;
-      display: flex;
-      align-items: center;
-      box-shadow: rgba(99, 99, 99, 0.1) 0px 2px 8px 0px;
-
-      .left {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-
-        .avatar {
-          width: 106rpx;
-          height: 106rpx;
-          border-radius: 50%;
-        }
-
-        .profession {
-          display: inline-block;
-          margin-top: 4rpx;
-          padding: 4rpx 20rpx;
-          font-size: 24rpx;
-          color: white;
-          background-color: #10CA61;
-          border-radius: 20rpx;
-        }
-      }
-
-      .right {
-        margin-left: 46rpx;
-        flex: 1;
-
-        .infoBox {
-          border-bottom: 1rpx solid #00000020;
-
-          .top {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-
-            .nickName {
-              font-size: 32rpx;
-            }
-
-            .state {
-              text-align: center;
-
-              .stateText {
-                width: 160rpx;
-                padding: 12rpx 0rpx;
-                border-radius: 50rpx;
-                font-size: 24rpx;
-              }
-
-              .already {
-                background-color: #E4EDFB;
-              }
-
-              .yet {
-                background-color: #1BC665;
-                color: white;
-              }
-            }
-          }
-
-          .number {
-            padding-bottom: 14rpx;
-            font-size: 24rpx;
-            color: #00000060;
-          }
-        }
-
-        .statistics {
-          display: flex;
-          justify-content: space-between;
-          align-items: center;
-          padding-top: 12rpx;
-          font-size: 28rpx;
-          color: #00000060;
-
-          text {
-            margin-left: 6rpx;
-          }
-        }
-      }
-    } */
 }
 .followBox .box .userBox {
   margin-bottom: 28rpx;

+ 13 - 22
pages/message/index.js

@@ -3,6 +3,9 @@ import {
   getMessageRecord,
   msgTopping
 } from '~/api/message'
+import {
+  getMyInfo,
+} from '~/api/user'
 import reachBottom from '~/mixins/reachBottom'
 const app = getApp()
 Page({
@@ -17,6 +20,7 @@ Page({
     menuH: 0,
     authorityMsg: {},
     uid: '',
+    userInfo: {},
     isTop: false
   },
   onLoad(options) {
@@ -24,7 +28,7 @@ Page({
       uid: wx.getStorageSync('uid')
     })
   },
-  onShow() {
+  async onShow() {
     if (typeof this.getTabBar === 'function') {
       this.getTabBar().setData({
         selected: 3
@@ -32,11 +36,16 @@ Page({
     }
     this.getAuthorityMsg()
     this.resetData()
+    let userInfo = await getMyInfo()
+    this.setData({
+      userInfo
+    })
     wx.createSelectorQuery().select('.menu').boundingClientRect((rect) => {
       this.setData({
         menuH: rect.height
       })
     }).exec()
+
   },
   async getAuthorityMsg() {
     let authorityMsg = await getAuthorityMsg()
@@ -53,27 +62,9 @@ Page({
   setSearch({
     detail
   }) {
-    /*   console.log(detail)
-      if (!detail.value) {
-        this.setData({
-          nullList: false,
-          list: []
-        });
-      }
-      this.setData({
-        text: detail.value
-      }); */
-  },
-  async search() {
-    if (!this.data.text) {
-      this.setData({
-        list: []
-      });
-      return;
-    }
-    this.setData({
-      list,
-    });
+    wx.navigateTo({
+      url: '/pages/searchFriend/index',
+    })
   },
   onLongPress(e) {
     console.log(e);

+ 6 - 22
pages/message/index.less

@@ -8,29 +8,13 @@ page {
   border-top-right-radius: 24rpx;
   background-color: white;
 
-  .searchBox {
-    position: relative;
-    padding: 20rpx 40rpx;
-
-    .input {
-      background-color: #F2F6FC;
-      font-size: 28rpx;
-      padding: 14rpx 20rpx;
-      border-radius: 26rpx;
-    }
 
-    .magnifier {
-      position: absolute;
-      right: 70rpx;
-      top: 0rpx;
-      bottom: 0rpx;
-      margin: auto;
-      padding: 10rpx 38rpx;
-      width: 28rpx;
-      height: 28rpx;
-      border-radius: 50rpx;
-      background-color: #30C866;
-    }
+  .input {
+    background-color: #F2F6FC;
+    font-size: 28rpx;
+    margin: 20rpx 30rpx 10rpx;
+    padding: 20rpx 40rpx;
+    border-radius: 26rpx;
   }
 
   .messageList {

+ 2 - 4
pages/message/index.wxml

@@ -1,10 +1,8 @@
 <wxs src="../../utils/filter.wxs" module="filters" />
-
 <navigationBar></navigationBar>
 <view class="messagePage">
-  <view class="searchBox">
-    <input class="input" maxlength="20" placeholder="查找昵称/学号/手机号" confirm-type='send' bindinput="setSearch" />
-    <image src="/static/search-2.png" class="magnifier" catchtap="search" />
+  <view class="input" bindtap="setSearch">
+    查找昵称/学号/手机号
   </view>
   <view class="messageList">
     <view class="base authority" bindtap="jump" data-url='comment'>

+ 3 - 18
pages/message/index.wxss

@@ -7,28 +7,13 @@ page {
   border-top-right-radius: 24rpx;
   background-color: white;
 }
-.messagePage .searchBox {
-  position: relative;
-  padding: 20rpx 40rpx;
-}
-.messagePage .searchBox .input {
+.messagePage .input {
   background-color: #F2F6FC;
   font-size: 28rpx;
-  padding: 14rpx 20rpx;
+  margin: 20rpx 30rpx 10rpx;
+  padding: 20rpx 40rpx;
   border-radius: 26rpx;
 }
-.messagePage .searchBox .magnifier {
-  position: absolute;
-  right: 70rpx;
-  top: 0rpx;
-  bottom: 0rpx;
-  margin: auto;
-  padding: 10rpx 38rpx;
-  width: 28rpx;
-  height: 28rpx;
-  border-radius: 50rpx;
-  background-color: #30C866;
-}
 .messagePage .messageList {
   padding: 0rpx 36rpx 250rpx;
   box-sizing: border-box;

+ 2 - 0
pages/my/index.wxml

@@ -23,10 +23,12 @@
     </view>
     <view class="below sectionBoxs">
       <view class="sBox" bindtap='jump' data-url="/pages/friend/index">
+        <view class="noticeTips" wx:if="{{userInfo.user.newFansCount>0}}">{{userInfo.user.newFansCount}}</view>
         <image class="img" src="/static/concern.png" mode="" />
         <text class="title">朋友 {{filters.numFilter(userInfo.friendCount)}}</text>
       </view>
       <view class="sBox" bindtap='jump' data-url="/pages/userWorks/index">
+        <view class="noticeTips" wx:if="{{userInfo.user.unReadPostsCount>0}}">{{userInfo.user.unReadPostsCount}}</view>
         <image class="img" src="/static/work.png" mode="" />
         <text class="title">作品 {{filters.numFilter(userInfo.readAmount)}}</text>
       </view>

+ 36 - 1
pages/searchFriend/index.js

@@ -1,4 +1,7 @@
-import { getOtherUser, setFans } from '~/api/user';
+import {
+  getOtherUser,
+  setFans
+} from '~/api/user';
 import reachBottom from '~/mixins/reachBottom';
 Page({
   behaviors: [reachBottom],
@@ -111,6 +114,38 @@ Page({
       });
     }
   },
+  sendMsg({
+    currentTarget
+  }) {
+    let user = currentTarget.dataset.user
+    let {
+      nickName,
+      eid,
+      uid
+    } = user
+    if (this.data.localUid == uid) {
+      return wx.showToast({
+        title: '不可以给自己发私信哦~',
+        icon: 'none'
+      })
+    }
+    wx.navigateTo({
+      url: `/pages/chat/index?title=${nickName||eid}&uid=${uid}`,
+    })
+  },
+  clipboar({
+    currentTarget
+  }) {
+    wx.setClipboardData({
+      data: currentTarget.dataset.eid,
+      success: function (res) { //成功回调函数
+        wx.showToast({
+          title: '已复制',
+          icon: "none"
+        })
+      }
+    })
+  },
   onReachBottom() {
     this.loadMore();
   }

+ 106 - 51
pages/searchFriend/index.less

@@ -71,100 +71,155 @@
   }
 
   .box {
-    padding-bottom: 20rpx;
-    margin-top: 100rpx;
+    padding: 20rpx;
+    margin-top: 88rpx;
 
-    .follow {
-      margin-top: 30rpx;
-      box-sizing: border-box;
-      width: 100%;
-      background-color: white;
-      border-radius: 20rpx;
-      padding: 20rpx 34rpx 16rpx;
+    .userBox {
+      margin-bottom: 28rpx;
       display: flex;
-      align-items: center;
-      box-shadow: rgba(99, 99, 99, 0.1) 0px 2px 8px 0px;
+      align-items: flex-start;
+      justify-content: space-between;
+      padding: 16rpx 24rpx 24rpx;
+      border-radius: 20rpx;
+      box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
+      background-color: white;
 
-      .left {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
+      .identity {
+        position: relative;
+        text-align: center;
 
         .avatar {
           width: 106rpx;
           height: 106rpx;
           border-radius: 50%;
+          position: relative;
+          background-color: #e4e1e1;
         }
 
-        .profession {
-          display: inline-block;
-          margin-top: 4rpx;
-          padding: 4rpx 20rpx;
+        .identityText {
+          position: absolute;
+          top: 86rpx;
+          left: 0rpx;
+          right: 0rpx;
+          margin: auto;
+          width: 80rpx;
+          margin-top: 6rpx;
           font-size: 24rpx;
           color: white;
           background-color: #10CA61;
-          border-radius: 20rpx;
+          border-radius: 25rpx;
         }
       }
 
-      .right {
-        margin-left: 46rpx;
+      .userRight {
         flex: 1;
+        margin-left: 30rpx;
 
-        .infoBox {
-          border-bottom: 1rpx solid #00000020;
-
-          .top {
+        .topBox {
+          .row {
             display: flex;
             align-items: center;
             justify-content: space-between;
 
             .nickName {
+              width: 200rpx;
+              color: #333;
               font-size: 32rpx;
             }
 
-            .state {
-              text-align: center;
+            .gradeText {
+              margin: 18rpx 0rpx 12rpx;
+              font-size: 24rpx;
+              color: rgba(0, 0, 0, 0.6);
 
-              .stateText {
-                width: 160rpx;
-                padding: 12rpx 0rpx;
-                border-radius: 50rpx;
-                font-size: 24rpx;
+              .copy {
+                width: 22rpx;
+                height: 22rpx;
               }
+            }
 
-              .already {
-                background-color: #E4EDFB;
-              }
+            .count {
+              margin-top: 10rpx;
+              flex: 1;
+              font-size: 24rpx;
+              color: rgba(0, 0, 0, 0.6);
+              text-align: left;
 
-              .yet {
-                background-color: #1BC665;
-                color: white;
+              .countNum {
+                margin-left: 10rpx;
               }
             }
-          }
 
-          .number {
-            padding-bottom: 14rpx;
-            font-size: 24rpx;
-            color: #00000060;
+
+
+            .countEnd {
+              text-align: right;
+              border: none;
+            }
           }
         }
 
-        .statistics {
+        .btmBox {
           display: flex;
-          justify-content: space-between;
           align-items: center;
-          padding-top: 12rpx;
-          font-size: 28rpx;
-          color: #00000060;
+          justify-content: space-between;
+          margin-top: 30rpx;
+
+          .state {
+            text-align: center;
+
+            .character {
+              width: 24rpx;
+              height: 24rpx;
+              margin-right: 6rpx;
+            }
+
+            .stateText {
+              width: 200rpx;
+              display: flex;
+              justify-content: center;
+              align-items: center;
+              padding: 12rpx 0rpx;
+              border-radius: 50rpx;
+              font-size: 24rpx;
+            }
+
+            .already {
+              background-color: #E4EDFB;
+            }
+
+            .yet {
+              background-color: #1BC665;
+              color: white;
+            }
+          }
 
-          text {
-            margin-left: 6rpx;
+          .follow {
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            width: 200rpx;
+            height: 52rpx;
+            font-size: 24rpx;
+            border-radius: 50rpx;
+            background-color: #10CA61;
+            color: white;
+
+            .character {
+              width: 24rpx;
+              height: 24rpx;
+              margin-right: 6rpx;
+            }
+          }
+
+          .isFans {
+            background-color: #E2ECFB;
+            color: #333;
           }
         }
       }
     }
+
   }
 
   .empty {

+ 32 - 20
pages/searchFriend/index.wxml

@@ -23,30 +23,42 @@
     </view>
   </view>
   <view class="box">
-    <view class="follow" wx:for="{{list}}" wx:key="index" bindtap="jumpUserInfo" data-uid='{{item.uid}}'>
-      <view class="left">
-        <image class='avatar' src="{{ item.avatar }}" />
-        <view class="profession">{{item.profession}}</view>
+    <view class="userBox" wx:for="{{list}}" wx:key="index" bindtap="jumpUserInfo" data-uid='{{item.uid}}'>
+      <view class="identity">
+        <image class='avatar' src='{{ item.avatar}}'></image>
+        <view class="identityText">{{item.profession}}</view>
       </view>
-      <view class="right">
-        <view class="infoBox">
-          <view class="top">
-            <view class="nickName"> {{item.nickName||item.eid}}</view>
-            <view class="state" data-uid='{{item.uid}}' data-isEachOther="{{item.isEachOther}}" catchtap="setFans">
-              <view class="stateText already" wx:if="{{item.isEachOther}}">
-                {{item.isFans?'互相关注':'已关注'}}
-              </view>
-              <view class="stateText yet" wx:else>
-                {{item.isFans?'回关':'关注'}}
-              </view>
+      <view class="userRight">
+        <view class="topBox">
+          <view class="row">
+            <view class="nickName textOver">{{item.nickName||item.eid }}</view>
+            <view class="gradeText textOver" data-eid="{{item.eid}}" catchtap="clipboar">学号:{{item.eid}}
+              <image src="/static/copy.png" class="copy" />
+            </view>
+          </view>
+          <view class="row">
+            <view class="count">
+              粉丝<text class="countNum textOver">{{filters.numFilter(item.fansAmount)|| '0'}}</text>
+            </view>
+            <view class="count">
+              作品<text class="countNum textOver">{{filters.numFilter(item.readAmount)|| 0}}</text>
+            </view>
+            <view class="count countEnd">
+              播放<text class="countNum textOver">{{filters.numFilter(item.playAmount) || 0}}</text>
             </view>
           </view>
-          <view class="number">学号:{{item.eid}}</view>
         </view>
-        <view class="statistics">
-          <view class="type">作品<text>{{filters.numFilter(item.readAmount)}}</text></view>
-          <view class="type">粉丝<text>{{filters.numFilter(item.fansAmount)}}</text></view>
-          <view class="type">播放<text>{{filters.numFilter(item.playAmount)}}</text></view>
+        <view class="btmBox">
+          <view class="state" data-uid='{{item.uid}}' data-isEachOther="{{item.isEachOther}}" catchtap="setFans">
+            <view class="stateText {{item.isEachOther?'already':'yet'}}">
+              <image src="/static/follow_2.png" class="character" wx:if="{{item.isEachOther}}" />
+              {{item.isEachOther?'互相关注':item.isFans?'回关':'关注'}}
+            </view>
+          </view>
+          <view class="follow isFans" data-user="{{item}}" catchtap="sendMsg">
+            <image src="/static/sx.png" class="character" />
+            <text>发私信</text>
+          </view>
         </view>
       </view>
     </view>

+ 89 - 45
pages/searchFriend/index.wxss

@@ -59,85 +59,129 @@
   font-size: 28rpx;
 }
 .searchFriend .box {
-  padding-bottom: 20rpx;
-  margin-top: 100rpx;
+  padding: 20rpx;
+  margin-top: 88rpx;
 }
-.searchFriend .box .follow {
-  margin-top: 30rpx;
-  box-sizing: border-box;
-  width: 100%;
-  background-color: white;
-  border-radius: 20rpx;
-  padding: 20rpx 34rpx 16rpx;
+.searchFriend .box .userBox {
+  margin-bottom: 28rpx;
   display: flex;
-  align-items: center;
-  box-shadow: rgba(99, 99, 99, 0.1) 0px 2px 8px 0px;
+  align-items: flex-start;
+  justify-content: space-between;
+  padding: 16rpx 24rpx 24rpx;
+  border-radius: 20rpx;
+  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
+  background-color: white;
 }
-.searchFriend .box .follow .left {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
+.searchFriend .box .userBox .identity {
+  position: relative;
+  text-align: center;
 }
-.searchFriend .box .follow .left .avatar {
+.searchFriend .box .userBox .identity .avatar {
   width: 106rpx;
   height: 106rpx;
   border-radius: 50%;
+  position: relative;
+  background-color: #e4e1e1;
 }
-.searchFriend .box .follow .left .profession {
-  display: inline-block;
-  margin-top: 4rpx;
-  padding: 4rpx 20rpx;
+.searchFriend .box .userBox .identity .identityText {
+  position: absolute;
+  top: 86rpx;
+  left: 0rpx;
+  right: 0rpx;
+  margin: auto;
+  width: 80rpx;
+  margin-top: 6rpx;
   font-size: 24rpx;
   color: white;
   background-color: #10CA61;
-  border-radius: 20rpx;
+  border-radius: 25rpx;
 }
-.searchFriend .box .follow .right {
-  margin-left: 46rpx;
+.searchFriend .box .userBox .userRight {
   flex: 1;
+  margin-left: 30rpx;
 }
-.searchFriend .box .follow .right .infoBox {
-  border-bottom: 1rpx solid #00000020;
-}
-.searchFriend .box .follow .right .infoBox .top {
+.searchFriend .box .userBox .userRight .topBox .row {
   display: flex;
   align-items: center;
   justify-content: space-between;
 }
-.searchFriend .box .follow .right .infoBox .top .nickName {
+.searchFriend .box .userBox .userRight .topBox .row .nickName {
+  width: 200rpx;
+  color: #333;
   font-size: 32rpx;
 }
-.searchFriend .box .follow .right .infoBox .top .state {
+.searchFriend .box .userBox .userRight .topBox .row .gradeText {
+  margin: 18rpx 0rpx 12rpx;
+  font-size: 24rpx;
+  color: rgba(0, 0, 0, 0.6);
+}
+.searchFriend .box .userBox .userRight .topBox .row .gradeText .copy {
+  width: 22rpx;
+  height: 22rpx;
+}
+.searchFriend .box .userBox .userRight .topBox .row .count {
+  margin-top: 10rpx;
+  flex: 1;
+  font-size: 24rpx;
+  color: rgba(0, 0, 0, 0.6);
+  text-align: left;
+}
+.searchFriend .box .userBox .userRight .topBox .row .count .countNum {
+  margin-left: 10rpx;
+}
+.searchFriend .box .userBox .userRight .topBox .row .countEnd {
+  text-align: right;
+  border: none;
+}
+.searchFriend .box .userBox .userRight .btmBox {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-top: 30rpx;
+}
+.searchFriend .box .userBox .userRight .btmBox .state {
   text-align: center;
 }
-.searchFriend .box .follow .right .infoBox .top .state .stateText {
-  width: 160rpx;
+.searchFriend .box .userBox .userRight .btmBox .state .character {
+  width: 24rpx;
+  height: 24rpx;
+  margin-right: 6rpx;
+}
+.searchFriend .box .userBox .userRight .btmBox .state .stateText {
+  width: 200rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
   padding: 12rpx 0rpx;
   border-radius: 50rpx;
   font-size: 24rpx;
 }
-.searchFriend .box .follow .right .infoBox .top .state .already {
+.searchFriend .box .userBox .userRight .btmBox .state .already {
   background-color: #E4EDFB;
 }
-.searchFriend .box .follow .right .infoBox .top .state .yet {
+.searchFriend .box .userBox .userRight .btmBox .state .yet {
   background-color: #1BC665;
   color: white;
 }
-.searchFriend .box .follow .right .infoBox .number {
-  padding-bottom: 14rpx;
-  font-size: 24rpx;
-  color: #00000060;
-}
-.searchFriend .box .follow .right .statistics {
+.searchFriend .box .userBox .userRight .btmBox .follow {
   display: flex;
-  justify-content: space-between;
   align-items: center;
-  padding-top: 12rpx;
-  font-size: 28rpx;
-  color: #00000060;
+  justify-content: center;
+  width: 200rpx;
+  height: 52rpx;
+  font-size: 24rpx;
+  border-radius: 50rpx;
+  background-color: #10CA61;
+  color: white;
+}
+.searchFriend .box .userBox .userRight .btmBox .follow .character {
+  width: 24rpx;
+  height: 24rpx;
+  margin-right: 6rpx;
 }
-.searchFriend .box .follow .right .statistics text {
-  margin-left: 6rpx;
+.searchFriend .box .userBox .userRight .btmBox .isFans {
+  background-color: #E2ECFB;
+  color: #333;
 }
 .searchFriend .empty {
   margin-top: 200rpx;

+ 1 - 1
pages/userWorks/index.js

@@ -29,8 +29,8 @@ Page({
         res.list = res.list.filter(item => {
           return item.userRead.id != this.data.firstWork.userRead.id
         })
+        res.list.unshift(this.data.firstWork)
       }
-      res.list.unshift(this.data.firstWork)
       reslove(res)
     })
   },

+ 7 - 7
utils/request.js

@@ -6,13 +6,13 @@ const {
     envVersion
   }
 } = wx.getAccountInfoSync();
-if (envVersion == 'develop') {
-  baseUrl = 'https://reader-api.efunbox.cn/wx'
-  oldUrl = 'https://reader-api.efunbox.cn'
-} else {
-  baseUrl = 'https://reader-api.ai160.com/wx'
-  oldUrl = 'https://reader-api.ai160.com'
-}
+// if (envVersion == 'develop') {
+baseUrl = 'https://reader-api.efunbox.cn/wx'
+oldUrl = 'https://reader-api.efunbox.cn'
+// } else {
+//   baseUrl = 'https://reader-api.ai160.com/wx'
+//   oldUrl = 'https://reader-api.ai160.com'
+// }
 
 function request(url, method, data, oldBaseUrl = false) {
   let header = {