邹能昇 3 gün önce
ebeveyn
işleme
8924aa90e1

+ 35 - 1
nova-werun/components/my/index.js

@@ -1,4 +1,6 @@
 // nova-werun/components/my/index.js
+const Parse = getApp().Parse;
+const company = getApp().globalData.company;
 Component({
     /**
      * 组件的属性列表
@@ -18,6 +20,8 @@ Component({
         bottomNavHeight: 0, // 底部导航栏高度
         contentHeight: 0, // 可用内容高度
         contentpadding: 0, //顶部padding高度
+
+        circlecount: 0
     },
     lifetimes: {
 
@@ -44,7 +48,7 @@ Component({
                 contentHeight,
                 contentpadding
             });
-
+            this.getcircle()
         },
     },
 
@@ -58,5 +62,35 @@ Component({
                 url: `${url}` // 目标页面的路径
             });
         },
+        //查全部朋友圈
+        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 getpoint(){
+            
+        }
     }
 })

+ 1 - 1
nova-werun/components/my/index.wxml

@@ -12,7 +12,7 @@
         </view>
         <view class="infobox">
             <view class="info">
-                <view class="info-num">0</view>
+                <view class="info-num">{{circlecount}}</view>
                 <view class="info-tex">我的动态</view>
             </view>
             <view class="info">