邹能昇 3 сар өмнө
parent
commit
f2e4e0dc54

+ 18 - 1
nova-werun/components/circle/index.js

@@ -53,7 +53,7 @@ Component({
                 contentHeight
             });
             // console.log('123', contentHeight);
-            this.getcircle()
+            this.iddepe()
         },
 
     },
@@ -137,6 +137,23 @@ Component({
                 url: `${url}` // 目标页面的路径
             });
         },
+        //判断是否有部门
+       async  iddepe(){
+            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.first();
+            if(P2){
+                this.getcircle()
+            }else{
+                wx.navigateTo({
+                    url: '../../pages/my/my-profile/index'// 目标页面的路径
+                });
+            }
+        }
 
 
     }

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

@@ -21,5 +21,5 @@
             </view>
         </view>
     </view>
-    <view bindtap="gourl" data-url="../../pages/circle/my-circle/index">我的动态</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>

+ 13 - 3
nova-werun/pages/my/my-profile/index.js

@@ -156,10 +156,16 @@ Page({
             User1List
         })
         this.setData({
-            avatar: User1List[0].avatar,
-            nickname: User1List[0].nickname,
+            avatar: User1List[0].avatar||'https://file-cloud.fmode.cn/qpFbRRSZrO/20241120/95uip6030022742.png?imageView2/1/w/200/h/200',
+            nickname: User1List[0].nickname||'微信用户',
             sex: User1List[0].sex || '男',
+            
         })
+        if(User1List[0].diyform){
+            this.setData({
+                height:User1List[0].diyform.height
+            })
+        }
         console.log(this.data.User1List);
     },
     //获取部门
@@ -214,7 +220,7 @@ Page({
     },
     //上传信息
     async setinfo() {
-        if (!this.data.nickname || !this.data.sex || !this.data.selectobjectid || !this.data.avatar) {
+        if (!this.data.nickname || !this.data.sex || !this.data.selectobjectid || !this.data.avatar||!this.data.height) {
             wx.showToast({
                 title: '请输入相关内容',
                 icon: 'none',
@@ -230,6 +236,10 @@ Page({
         let user = await Userquery.first();
         user.set('sex', this.data.sex)
         user.set('avatar', this.data.avatar)
+        let diyform = {
+            height:this.data.height
+        }
+        user.set('diyform', diyform)
         user.set('nickname', this.data.nickname)
         try {
             user.save()

+ 1 - 1
nova-werun/pages/my/my-profile/index.wxml

@@ -12,7 +12,7 @@
     </view>
     <van-field value="{{ nickname }}" required clearable label="昵称" maxlength="8" placeholder="请输入昵称" bind:change="changenickname" />
     <van-field class="field" required model:value="{{ sex }}" readonly maxlength="1" label="性别" bind:tap="showSelect" />
-    <van-field value="{{ height }}" required clearable label="身高" type="number" placeholder="请输入身高" bind:blur="getHeight" bind:clear='clearHeight' />
+    <van-field value="{{ height }}" required clearable label="身高" type="number" placeholder="请输入身高(例如:170)" bind:blur="getHeight" bind:clear='clearHeight' />
     <van-action-sheet show="{{ show2 }}" actions="{{ actions }}" bind:select="onSelect" />
     <view class="selectbox" bindtap="onClickShow">
         <view class="fuhao">*</view>