Browse Source

no message

BF-202210271038\Administrator 2 years ago
parent
commit
56bab1bf76

+ 3 - 3
components/dgex-tantan/dgex-tantan.vue

@@ -67,12 +67,12 @@
                 </view>
                 <view class="open-wechat">
                   <image  class="open-wechat-img"     mode="aspectFill" src="/static/img/index/wechat.png" ></image>
-                  <view class="open-wechat-text sys-color-white sys-weight-400">yxk********</view>
+                  <view class="open-wechat-text sys-color-white sys-weight-400">{{item.weChat}}</view>
                   <image  class="lock-wechat-img"     mode="aspectFill" src="/static/img/index/lock.png" ></image>
                 </view>
               </view>
-              <view class="user-content">
-                <user-content :user-id="item.userId"></user-content>
+              <view class="user-content" v-if="currentIndex===index">
+                <user-content :user-item="item"></user-content>
               </view>
               </scroll-view>
             </view>

+ 0 - 285
pages/common/dynamic/dynamic-items-new.vue

@@ -1,285 +0,0 @@
-<template>
-  <view class="dynamic-item-box">
-    <view class="dynamic-item" v-show="showAdd">
-      <view class="dynamic-title">
-        <view class="dynamic-title-left">
-          <text class="dynamic-title-text  sys-weight-600" :style="{'color':textColor}">今天</text>
-        </view>
-      </view>
-      <view class="dynamic-data" :style="{'border-left':' 1rpx solid '+divisionColor}">
-          <view class="data-issue">
-            <view class="issue-left">
-              <image  class="left-one"   mode="aspectFill" src="/static/img/temporary/2.png" ></image>
-              <view class="left-two">
-                <view class="two-title sys-color-black sys-weight-600">发布动态</view>
-                <view class="two-text sys-color-gray-9">认识更多朋友</view>
-              </view>
-            </view>
-            <view class="issue-right sys-color-black sys-weight-600">去发布</view>
-          </view>
-      </view>
-    </view>
-    {{dynamicList.length}}
-    <view class="dynamic-item" v-for="(item,itemIndex) in dynamicList">
-      12121
-      <view class="dynamic-title">
-        <view class="dynamic-title-left">
-          <text class="dynamic-title-text  sys-weight-600" :style="{'color':textColor}">item.dateArr[2]</text>
-          <text class="dynamic-title-text  sys-weight-400" :style="{'color':textColor}">item.dateArr[1]月</text>
-          <text class="dynamic-title-text  sys-weight-400" :style="{'color':textColor}">item.dateArr[0]年</text>
-        </view>
-        <view class="dynamic-title-right">
-          <image  class="dynamic-right-img"   mode="aspectFill" src="/static/img/index/dynamic-all.png" ></image>
-        </view>
-      </view>
-      <view class="dynamic-data" :style="{'border-left':' 1rpx solid '+divisionColor}">
-        <view class="data-text">
-          <text class="text-item" :style="{'color':textColor}">{{item.content}}</text>
-        </view>
-
-        <view class="data-img" v-if="item.galleryUrls.length>0">
-          <view class="one-img" v-if="item.galleryUrls.length===1">
-            <img-one :file-list="item.galleryUrls"></img-one>
-          </view>
-          <view class="two-img" v-else-if="item.galleryUrls.length===2 || item.galleryUrls.length===4">
-            <img-two :file-list="item.galleryUrls"></img-two>
-          </view>
-          <view class="three-img" v-else>
-            <img-three :file-list="item.galleryUrls"></img-three>
-          </view>
-
-        </view>
-        <view class="data-tag-list" v-if="false"	>
-          <dynamic-tag :list="item.tag" :tag-bg="tagBg" :tag-color="tagColor"></dynamic-tag>
-
-        </view>
-        <view class="data-operation">
-          <view class="operation-item" @click="setLike(itemIndex)">
-<!--            <image  class="operation-img"   mode="aspectFill" :src="'/static/img/index/like-'+(item.isLike?'ok':'no')+'.png'" ></image>-->
-            <view class="operation-icon">
-              <text class="iconfont icon-dianzan" v-if="!item.liked"  :style="{'color':operateColor}"> &#xe8ad;</text>
-              <text class="iconfont icon-dianzan1" v-else  :style="{'color':'#ED301D'}"> &#xe8c3;</text>
-            </view>
-            <view class="operation-text sys-weight-400" :style="{'color':operateColor}">{{item.likeCount>0?item.likeCount:'点赞'}}</view>
-          </view>
-          <view class="operation-item">
-<!--            <image  class="operation-img"   mode="aspectFill" src="/static/img/index/evaluate.png" ></image>-->
-            <view class="operation-icon"><text class="iconfont icon-pinglun"  :style="{'color':operateColor}">&#xe891;</text></view>
-            <view class="operation-text sys-weight-400" :style="{'color':operateColor}">{{item.commentCount>0?item.commentCount:'评论'}}</view>
-          </view>
-        </view>
-
-      </view>
-    </view>
-
-  </view>
-</template>
-
-<script>
-import ImgOne from "@/pages/common/img/img-one";
-import ImgTwo from "@/pages/common/img/img-two";
-import ImgThree from "@/pages/common/img/img-three";
-import DynamicTag from "@/pages/common/tag/dynamic-tag";
-import {getMoments} from "@/api/discovery";
-import tools from "@/service/tools";
-export default {
-  name: "dynamic-items",
-  components: {DynamicTag, ImgThree, ImgTwo, ImgOne},
-  props: {
-    'userId':{
-      default:0
-    },
-      textColor:{
-        type:String,
-        default:'#fff'
-      },
-    tagColor:{
-      type:String,
-      default:'#282828'
-    },
-    tagBg:{
-      type:String,
-      default:'rgba(255,255,255,0.4)'
-    },
-    operateColor:{
-      type:String,
-      default:'#fff'
-    },
-    divisionColor:{
-      type:String,
-      default:'rgba(255,255,255,0.2)'
-    },
-    showAdd:{
-      type:Boolean,
-      default:false
-    },
-  },
-  data() {
-    return {
-      page:1,
-      total:undefined,
-      isAjax:false,
-      dynamicList:[]
-    }
-  },
-  watch: {
-    'userId':function () {
-      // this.startList()
-    }
-  },
-  mounted() {
-    this.startList()
-  },
-  methods: {
-    startList(){
-      if(this.userId<=0){
-        return false
-      }
-      // this.dynamicList=[]
-      this.isAjax=false
-      this.total=undefined
-      this.page=1
-      this.getMoments()
-    },
-    getMoments(){
-      if(this.isAjax){
-        return
-      }
-      this.isAjax=true
-      let that=this
-      getMoments({'userId':this.userId,'pageNo':this.page,'pageSize':20}).then((res)=>{
-        this.isAjax=false
-        if(res.code===0){
-          // console.log(this.dynamicList)
-          res.data.data.forEach((item)=>{
-            item.dateArr=tools.getDateArr(item.createdAt)
-            console.log(that.dynamicList)
-            that.dynamicList.push(item)
-          })
-          // console.log( this.dynamicList)
-          // console.log( this.dynamicList.length)
-          ++that.page
-          that.total=res.data.total
-        }
-      })
-    },
-    setLike(index){
-      this.dynamicList[index].liked=!this.dynamicList[index].liked
-      if(this.dynamicListdynamicList[index].liked){
-        ++this.dynamicList[index].likeCount
-      }else {
-        --this.dynamicList[index].likeCount
-      }
-    }
-  }
-}
-</script>
-
-<style scoped lang="scss">
-@import "/static/css/en-iconfont.css";
-.dynamic-item-box{
-  .dynamic-item{
-    margin-top: 16rpx;
-    .dynamic-title{
-      display: flex;
-      justify-content: space-between;
-      .dynamic-title-left{
-        display:table-cell;
-        vertical-align:bottom;
-        .dynamic-title-text{
-          font-size: 28rpx;
-        }
-        .dynamic-title-text:first-child{
-          font-size: 48rpx;
-          margin-right: 12rpx;
-        }
-      }
-      .dynamic-title-right{
-        .dynamic-right-img{
-          width: 6rpx;
-          height: 26rpx;
-        }
-      }
-    }
-    .dynamic-data{
-      margin-left: 26rpx;
-      border-left: 1rpx solid rgba(255,255,255,0.2);
-      padding: 4rpx 0 44rpx 40rpx;
-      .data-issue{
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        height: 92rpx;
-        .issue-left{
-          display: flex;
-          justify-content: flex-start;
-          .left-one{
-            border-radius: 8rpx;
-            height: 92rpx;
-            width: 92rpx;
-            margin-right: 22rpx;
-          }
-          .left-two{
-            .two-title{
-              font-size: 32rpx;
-            }
-            .two-text{
-              font-size: 28rpx;
-            }
-          }
-        }
-        .issue-right{
-          border: 2rpx solid #E0E0E0;
-          border-radius: 200rpx;
-          padding: 8rpx 24rpx;
-          font-size: 28rpx;
-        }
-      }
-      .data-text{
-        .text-item{
-          font-size: 28rpx;
-        }
-
-      }
-      .data-img{
-        margin-top: 30rpx;
-      }
-      .data-tag-list{
-        margin-top: 28rpx;
-      }
-      .data-operation{
-        margin-top: 40rpx;
-        display: flex;
-        justify-content: flex-start;
-        .operation-item{
-          width: 200rpx;
-          display: flex;
-          justify-content: flex-start;
-          .operation-img{
-            width: 40rpx;
-            height: 40rpx;
-            margin-right: 8rpx;
-          }
-          .operation-icon{
-            width: 40rpx;
-            height: 40rpx;
-            margin-right: 8rpx;
-            text{
-              font-size: 40rpx;
-              line-height: 40rpx;
-            }
-          }
-          .operation-text{
-            height: 40rpx;
-            line-height: 41rpx;
-            font-size: 26rpx;
-
-          }
-
-        }
-      }
-
-    }
-  }
-}
-</style>

+ 15 - 20
pages/common/dynamic/dynamic-items.vue

@@ -19,14 +19,13 @@
           </view>
       </view>
     </view>
-    {{dynamicList.length}}
-    <view class="dynamic-item" v-for="(item,itemIndex) in dynamicList">
-      12121
+    {{list.length}}
+    <view class="dynamic-item" v-for="(item,itemIndex) in list">
       <view class="dynamic-title">
-        <view class="dynamic-title-left">
-          <text class="dynamic-title-text  sys-weight-600" :style="{'color':textColor}">item.dateArr[2]</text>
-          <text class="dynamic-title-text  sys-weight-400" :style="{'color':textColor}">item.dateArr[1]月</text>
-          <text class="dynamic-title-text  sys-weight-400" :style="{'color':textColor}">item.dateArr[0]年</text>
+        <view class="dynamic-title-left" v-if="item.dateArr.length>0">
+          <text class="dynamic-title-text  sys-weight-600" :style="{'color':textColor}">{{item.dateArr[2]}}</text>
+          <text class="dynamic-title-text  sys-weight-400" :style="{'color':textColor}">{{item.dateArr[1]}}月</text>
+          <text class="dynamic-title-text  sys-weight-400" :style="{'color':textColor}">{{item.dateArr[0]}}年</text>
         </view>
         <view class="dynamic-title-right">
           <image  class="dynamic-right-img"   mode="aspectFill" src="/static/img/index/dynamic-all.png" ></image>
@@ -37,7 +36,7 @@
           <text class="text-item" :style="{'color':textColor}">{{item.content}}</text>
         </view>
 
-        <view class="data-img" v-if="item.galleryUrls.length>0">
+        <view class="data-img" v-if="item.galleryUrls">
           <view class="one-img" v-if="item.galleryUrls.length===1">
             <img-one :file-list="item.galleryUrls"></img-one>
           </view>
@@ -86,7 +85,7 @@ export default {
   name: "dynamic-items",
   components: {DynamicTag, ImgThree, ImgTwo, ImgOne},
   props: {
-    'userId':{
+    userId:{
       default:0
     },
       textColor:{
@@ -116,15 +115,15 @@ export default {
   },
   data() {
     return {
-      page:1,
-      total:undefined,
+      list:[],
       isAjax:false,
-      dynamicList:[]
+      total:undefined,
+      page:1,
     }
   },
   watch: {
     'userId':function () {
-      // this.startList()
+      this.startList()
     }
   },
   mounted() {
@@ -133,9 +132,9 @@ export default {
   methods: {
     startList(){
       if(this.userId<=0){
-        return false
+        // return false
       }
-      // this.dynamicList=[]
+      this.list=[]
       this.isAjax=false
       this.total=undefined
       this.page=1
@@ -150,14 +149,10 @@ export default {
       getMoments({'userId':this.userId,'pageNo':this.page,'pageSize':20}).then((res)=>{
         this.isAjax=false
         if(res.code===0){
-          // console.log(this.dynamicList)
           res.data.data.forEach((item)=>{
             item.dateArr=tools.getDateArr(item.createdAt)
-            console.log(that.dynamicList)
-            that.dynamicList.push(item)
+            that.list.push(item )
           })
-          // console.log( this.dynamicList)
-          // console.log( this.dynamicList.length)
           ++that.page
           that.total=res.data.total
         }

+ 3 - 0
pages/index/model/slide-item.vue

@@ -59,6 +59,9 @@ export default {
                 distance: 17,
                 city:  item.province+' '+item.city,
                 weChat:  item.wechatId,
+                likeCount:  item.likeCount,
+                tagList:  item.tagList,
+                slogan:  item.slogan,
                 animation:{}
               }
               console.log(newdata)

+ 14 - 9
pages/index/model/user-content.vue

@@ -4,14 +4,14 @@
       <view class="top-left">“</view>
       <view class="top-right">
         <image  class="right-img"   mode="aspectFill" src="/static/img/index/like.png" ></image>
-        <view class="right-text sys-color-white sys-weight-400">108喜欢</view>
+        <view class="right-text sys-color-white sys-weight-400">{{userItem.likeCount}}喜欢</view>
       </view>
     </view>
-    <view class="user-signature sys-color-white sys-weight-400">崇尚自由,热爱生活,足以!</view>
-    <view class="user-tag">
-      <view class="tag-item" v-for="i in 5">
+    <view class="user-signature sys-color-white sys-weight-400">{{userItem.slogan}}</view>
+    <view class="user-tag" v-if="userItem.tagList.length>0">
+      <view class="tag-item" v-for="i in userItem.tagList">
         <image  class="tag-img"   mode="aspectFill" src="/static/img/index/tag-img.png" ></image>
-        <view class="tag-text sys-color-gray-3 sys-weight-400">认识朋友</view>
+        <view class="tag-text sys-color-gray-3 sys-weight-400">{{i}}</view>
       </view>
     </view>
     <view class="user-wire"></view>
@@ -37,7 +37,7 @@
     </view>
 
     <view class="dynamic-list">
-      <dynamic-item :user-id="userId"></dynamic-item>
+      <dynamic-item :user-id="userItem.userId"></dynamic-item>
 
     </view>
 
@@ -54,8 +54,12 @@ export default {
   name: "user-content",
   components: {DynamicItem, ImgThree, ImgTwo, ImgOne},
   props: {
-    'userId':{
-      default:0
+    'userItem':{
+      default:{
+        'userId':0,
+        'likeCount':0,
+        'tagList':[],
+      }
     }
   },
   data() {
@@ -69,6 +73,7 @@ export default {
         {'num':0,'url':'/static/img/temporary/gift3.png'},
       ],
 
+
     }
   },
   watch: {
@@ -77,7 +82,7 @@ export default {
     }
   },
   mounted() {
-
+    console.log()
   },
   methods: {