邹能昇 3 months ago
parent
commit
4445709ca7

+ 1 - 1
nova-werun/components/circle-card/index.wxml

@@ -180,7 +180,7 @@
     <view class="picture3" wx:if="{{images.length==1}}">
         <image mode="scaleToFill" class="{{imageclass}}" data-index="{{index}}" wx:for="{{images}}" wx:key="index" src="{{item}}" bindload="onImageLoad" bindtap="openpreviewImg"> </image>
     </view>
-
+    <!-- 预览组件 -->
     <previewImg id="previewComponent" previewImgList = "{{imgList}}" previewImg = "{{currentImg}}"  />
 
 

+ 66 - 11
nova-werun/components/my/index.js

@@ -20,9 +20,12 @@ Component({
         bottomNavHeight: 0, // 底部导航栏高度
         contentHeight: 0, // 可用内容高度
         contentpadding: 0, //顶部padding高度
+        navheight:0,
 
         circlecount: 0,
-        User1List:[]
+        likesCount:0,
+        User1List:[],
+        profile1List2:[]
     },
     lifetimes: {
 
@@ -41,13 +44,15 @@ Component({
 
             const contentpadding = (statusBarHeight + customHeight) * 750 / systemInfo.windowWidth;
             const contentHeight = (screenHeight - bottomNavHeight - 50 - statusBarHeight - customHeight) * 750 / systemInfo.windowWidth;
+            const navheight = (statusBarHeight+customHeight) * 750 / systemInfo.windowWidth;
             this.setData({
                 statusBarHeight,
-                screenHeight,
+                screenHeight:(screenHeight-50-bottomNavHeight) * 750 / systemInfo.windowWidth,
                 customHeight,
                 bottomNavHeight,
                 contentHeight,
-                contentpadding
+                contentpadding,
+                navheight
             });
             this.getcircle()
             this.getname()
@@ -65,28 +70,78 @@ Component({
             });
         },
         //查全部朋友圈
+        // async getcircle() {
+        //     const currentUser = Parse.User.current();
+        //     let Profilequery2 = new Parse.Query('Profile');
+        //     Profilequery2.equalTo('company', company);
+        //     Profilequery2.equalTo('user', currentUser.id);
+        //     Profilequery2.equalTo('isCheck', true);
+        //     Profilequery2.notEqualTo('isDeleted', true)
+        //     let P2 = await Profilequery2.find();
+        //     let profile1List2 = P2.map(item => item.toJSON());
+
+        //     let Profilequery = new Parse.Query('AIMoment');
+        //     Profilequery.equalTo('company', company);
+        //     Profilequery.equalTo('isVisible', true);
+        //     Profilequery.notEqualTo('isDeleted', true)
+        //     Profilequery.equalTo('profile', profile1List2[0].objectId);
+        //     Profilequery.descending('createdAt');
+
+        //     let count = await Profilequery.count();
+
+        //     if (count) {
+        //         this.setData({
+        //             circlecount: count
+        //         })
+        //     }
+        // },
         async getcircle() {
             const currentUser = Parse.User.current();
             let Profilequery2 = new Parse.Query('Profile');
             Profilequery2.equalTo('company', company);
             Profilequery2.equalTo('user', currentUser.id);
             Profilequery2.equalTo('isCheck', true);
-            Profilequery2.notEqualTo('isDeleted', true)
+            Profilequery2.notEqualTo('isDeleted', true);
+            Profilequery2.include('user');
+            Profilequery2.include('center');
+            Profilequery2.include('department');
             let P2 = await Profilequery2.find();
             let profile1List2 = P2.map(item => item.toJSON());
-
+            this.setData({
+                profile1List2,
+            })
+            console.log('信息',this.data.profile1List2);
             let Profilequery = new Parse.Query('AIMoment');
             Profilequery.equalTo('company', company);
             Profilequery.equalTo('isVisible', true);
-            Profilequery.notEqualTo('isDeleted', true)
+            Profilequery.notEqualTo('isDeleted', true);
             Profilequery.equalTo('profile', profile1List2[0].objectId);
             Profilequery.descending('createdAt');
-
-            let count = await Profilequery.count();
-
-            if (count) {
+        
+            let moments = await Profilequery.find(); // 查找所有动态
+        
+            if (moments.length) {
+                this.setData({
+                    circlecount: moments.length
+                });
+        
+                // 获取所有动态的ID
+                let momentIds = moments.map(moment => moment.id);
+        
+                // 创建对 AIMomentLike 表的查询
+                let LikeQuery = new Parse.Query('AIMomentLike');
+                LikeQuery.equalTo('isLiked', true);
+                LikeQuery.equalTo('company', company);
+                LikeQuery.notEqualTo('isDeleted', true);
+                LikeQuery.containedIn('moment', momentIds); // 使用 containedIn 来一次性查询多个动态的点赞
+        
+                // 统计点赞数量
+                let likesCount = await LikeQuery.count();
+        
+                // 这里可以进一步处理 likesCount,按动态分配点赞数量
+                console.log(`总点赞数量: ${likesCount}`);
                 this.setData({
-                    circlecount: count
+                    likesCount,
                 })
             }
         },

+ 3 - 1
nova-werun/components/my/index.json

@@ -1,4 +1,6 @@
 {
     "component": true,
-    "usingComponents": {}
+    "usingComponents": {
+        "van-icon": "@vant/weapp/icon/index"
+    }
 }

+ 119 - 35
nova-werun/components/my/index.less

@@ -1,30 +1,67 @@
 /* nova-werun/components/my/index.wxss */
 .all{
     width: 100vw;
-    background-color: #e6e6e6;
+    background-color: #F1F1F2;
+    background-image: url(https://file-cloud.fmode.cn/qpFbRRSZrO/20241225/h1105d091940141.png);
+    background-repeat: no-repeat; /* 不重复背景图片 */
+    background-size: 750rpx 468rpx ; 
+    display: flex;
+    align-items: center;
+    flex-direction: column;
+    font-family: MicrosoftYaHei;
+    color: #333333;
+    .navbox{
+        width: 100vw;
+        display: flex;
+        align-items: flex-end;
+        .nav{
+            width: 100%;
+            display: flex;
+            justify-content: center;
+            position: relative;
+            margin-bottom: 20rpx;
+            height: 40rpx;
+            image{
+                position: absolute;
+                left: 38rpx;
+                top: 8rpx;
+                width: 44rpx;
+                height: 35rpx;
+            }
+            .nav-title{
+                height: 36rpx;
+                font-family: MicrosoftYaHei;
+                font-size: 36rpx;
+                color: #333333;
+                line-height: 40rpx;
+                text-align: center;
+            }
+        }
+    }
     .perxonalbox{
         width: 100%;
-        height: 270rpx;
-        background-color: #87ceeb;
+        height: 162rpx;
         padding-top: 20rpx;
         display: flex;
         position: relative;
-        margin-bottom: 80rpx;
-        padding-left: 5%;
+        margin-bottom: 70rpx;
+        padding-left:34rpx;
+        padding-right: 34rpx;
+        align-items: center;
         .avatar{
-            width: 130rpx;
-            height: 130rpx;
-            border-radius: 20rpx;
+            width: 120rpx;
+            height: 120rpx;
+            border-radius: 50%;
         }
         .namebox{
-            width: 200rpx;
-            height: 130rpx;
+            width: 450rpx;
+            height: 162rpx;
             display: flex;
             justify-content: center;
             flex-direction: column;
             margin-left: 20rpx;
             .name{
-                font-size: 34rpx;
+                font-size: 32rpx;
             }
             .databox{
                 width: 100%;
@@ -42,36 +79,83 @@
                     margin-left: 10rpx;
                 }
             }
+            .numberbox{
+                width: 100%;
+                font-size: 26rpx;
+                margin-top: 20rpx;
+            }
         }
-        .infobox{
-            width: 90%;
-            height: 130rpx;
+        .picbox{
+            height: 100%;
             display: flex;
             justify-content: center;
             align-items: center;
-            background-color: white;
-            position: absolute;
-            left: 5%;
-            bottom: -66rpx;
-            border-radius: 20rpx;
-            .info{
-                width: 120rpx;
-                height: 100rpx;
-                display: flex;
-                justify-content: center;
-                align-items: center;
-                flex-direction: column;
+            margin-left: auto;
+            image{
+                width: 34rpx;
+                height: 34rpx;
+            }
+            image:nth-child(2){
+                margin-left: 20rpx;
+            }
+        }
+    }
+    .infobox{
+        width: 627rpx;
+        height: 139rpx;
+        display: flex;
+        justify-content: space-around;
+        align-items: center;
+        background-color: white;
+        border-radius: 20rpx;
+        .info{
+            width: 120rpx;
+            height: 100rpx;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            flex-direction: column;
+            margin-left: 10rpx;
+            margin-right: 10rpx;
+            .info-num{
+                font-weight: bold;
+                font-size: 31rpx;
+                color: #333333;
+            }
+            .info-tex{
+                font-size: 26rpx;
+                color: #333333;
+                margin-top: 4rpx;
+            }
+        }
+    }
+    .textbox{
+        width: 100%;
+        height: auto;
+        padding-left: 33rpx;
+        padding-right: 33rpx;
+        background-color: white;
+        margin-top: 26rpx;
+        .text1box{
+            width: 100%;
+            height: 110rpx;
+            display: flex;
+            align-items: center;
+            justify-content: flex-end;
+            border-bottom: #E0E0E0 2rpx solid;
+            image{
+                width: 34rpx;
+                height: 34rpx;
+                margin-left: 10rpx;
+            }
+            .text1{
+                font-size: 28rpx;
+                margin-right: auto;
                 margin-left: 10rpx;
-                margin-right: 10rpx;
-                .info-num{
-                    font-size: 30rpx;
-                }
-                .info-tex{
-                    font-size: 28rpx;
-                    color: gray;
-                    margin-top: 10rpx;
-                }
             }
         }
+        .text1box:last-child {
+            border-bottom: #E0E0E0 0rpx solid;
+        }
     }
 }

+ 59 - 13
nova-werun/components/my/index.wxml

@@ -1,25 +1,71 @@
 <!--nova-werun/components/my/index.wxml-->
-<nav type="title"  background-color="{{'#87ceeb'}}" front-color="{{'#ffffff'}}"></nav>
-<view class="all" style="height: {{contentHeight}}rpx;">
+<view class="all" style="height: {{screenHeight}}rpx;">
+    <view class="navbox" style="height: {{navheight}}rpx;">
+        <view class="nav">
+            <view class="nav-title">步小圈</view>
+        </view>
+    </view>
     <view class="perxonalbox">
         <image class="avatar" src="{{User1List[0].avatar||'https://file-cloud.fmode.cn/qpFbRRSZrO/20241120/63c55i022235020.png?imageView2/1/w/200/h/200'}}" mode="scaleToFill"></image>
         <view class="namebox">
             <view class="name">{{User1List[0].nickname}}</view>
-            <view class="databox" data-url="../../pages/my/my-profile/index" bindtap="gourl">
+            <!-- <view class="databox" data-url="../../pages/my/my-profile/index" bindtap="gourl">
                 <view class="data">完善资料</view>
                 <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241120/1ssc1a102512989.png?imageView2/1/w/200/h/200"></image>
+            </view> -->
+            <view class="numberbox">
+                <view class="num">{{profile1List2[0].user.mobile}} | {{profile1List2[0].department.name}}{{profile1List2[0].center.name}}</view>
             </view>
         </view>
-        <view class="infobox">
-            <view class="info">
-                <view class="info-num">{{circlecount}}</view>
-                <view class="info-tex">我的动态</view>
-            </view>
-            <view class="info">
-                <view class="info-num">0</view>
-                <view class="info-tex">我的积分</view>
-            </view>
+        <view class="picbox">
+            <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241225/k17mbg095037093.png"></image>
+            <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241225/dkebge095058533.png"></image>
+        </view>
+    </view>
+    <view class="infobox">
+        <view class="info">
+            <view class="info-num">{{circlecount}}</view>
+            <view class="info-tex">动态</view>
+        </view>
+        <view class="info">
+            <view class="info-num">0</view>
+            <view class="info-tex">粉丝</view>
+        </view>
+        <view class="info">
+            <view class="info-num">{{likesCount}}</view>
+            <view class="info-tex">点赞</view>
+        </view>
+    </view>
+    <view class="textbox">
+        <view class="text1box">
+            <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241225/rpfahq101147971.png"></image>
+            <view class="text1">我的路线</view>
+            <van-icon name="arrow" size='30rpx' />
+        </view>
+        <view class="text1box" bindtap="gourl" data-url="../../pages/circle/my-circle/index">
+            <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241225/rpfahq101147971.png"></image>
+            <view class="text1">我的动态</view>
+            <van-icon name="arrow" size='30rpx' />
+        </view>
+        <view class="text1box">
+            <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241225/rpfahq101147971.png"></image>
+            <view class="text1">资料认证</view>
+            <van-icon name="arrow" size='30rpx' />
+        </view>
+        <view class="text1box">
+            <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241225/rpfahq101147971.png"></image>
+            <view class="text1">问题反馈</view>
+            <van-icon name="arrow" size='30rpx' />
+        </view>
+        <view class="text1box">
+            <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241225/rpfahq101147971.png"></image>
+            <view class="text1">隐私协议</view>
+            <van-icon name="arrow" size='30rpx' />
+        </view>
+        <view class="text1box">
+            <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241225/rpfahq101147971.png"></image>
+            <view class="text1">退出登录</view>
+            <van-icon name="arrow" size='30rpx' />
         </view>
     </view>
-    <view bindtap="gourl" data-url="../../pages/circle/my-circle/index" style="width: 100%;height: 60rpx;display: flex;align-items: center;background-color: white;">我的动态</view>
 </view>

File diff suppressed because it is too large
+ 0 - 1
nova-werun/components/my/index.wxss


Some files were not shown because too many files changed in this diff