guhongwei 2 years ago
parent
commit
76a4be68c6

+ 1 - 1
pages/index/index.js

@@ -17,7 +17,7 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async res => {
-                if (res.data) wx.redirectTo({ url: '/pages/school/index' })
+                if (res.data) wx.redirectTo({ url: '/pagesSchool/common/coachinfo' })
                 // /pages/school/index
                 // /pagesSchool/schAdmin/coach/list
             },

+ 1 - 1
pagesSchool/common/coachinfo.js

@@ -26,7 +26,7 @@ Page({
      */
     onLoad: async function (options) {
         const that = this;
-        that.setData({ id: options.id || '' })
+        that.setData({ id: options.id || '63561112cb0f85380e8354b9' })
         // 查询其他信息
         await that.searchOther();
         // 监听用户是否登录

+ 43 - 18
pagesSchool/common/coachinfo.less

@@ -4,34 +4,59 @@
     background-color: var(--mainColor);
 
     .one {
-        width: 96vw;
-        padding: 2vw;
+        padding: 0 2vw;
 
         .one_1 {
             display: flex;
-            flex-direction: row;
             justify-content: space-between;
-            border: 1px dashed var(--f85Color);
+            border: 1px dashed #858585;
+            padding: 2vw;
             border-radius: 5px;
-            margin: 0 0 10px 0;
-            padding: 10px;
-
-            .text {
-                width: 22vw;
-                color: var(--f85Color);
-                font-size: var(--font16Size);
-            }
-
-            .text1 {
-                width: 70vw;
-                font-size: var(--font16Size);
-                text-align: right;
-            }
+            margin: 2vw 0 0 0;
 
             .image {
                 width: 15vw;
                 height: 15vw;
+                border-radius: 5px;
+            }
+
+            view:last-child {
+                flex-grow: 1;
+                width: 10vw;
+                text-align: right;
             }
         }
     }
+
+    // .one {
+    //     width: 96vw;
+    //     padding: 2vw;
+
+    //     .one_1 {
+    //         display: flex;
+    //         flex-direction: row;
+    //         justify-content: space-between;
+    //         border: 1px dashed var(--f85Color);
+    //         border-radius: 5px;
+    //         margin: 0 0 10px 0;
+    //         padding: 10px;
+
+    //         .text {
+    //             width: 22vw;
+    //             color: var(--f85Color);
+    //             font-size: var(--font16Size);
+    //         }
+
+    //         .text1 {
+    //             width: 70vw;
+    //             font-size: var(--font16Size);
+    //             text-align: right;
+    //         }
+
+    //         .image {
+    //             width: 15vw;
+    //             height: 15vw;
+    //         }
+    //     }
+    // }
 }

+ 54 - 18
pagesSchool/common/coachinfo.wxml

@@ -2,40 +2,76 @@
     <view slot="info" class="container main">
         <view class="one">
             <view class="one_1">
-                <text class="text">头像:</text>
-                <image class="image" src="{{form.icon&&form.icon.length>0?form.icon[0].url:''}}" bindtap="toView" data-item="{{form.icon[0]}}"></image>
+                <view>
+                    <text>头像:</text>
+                </view>
+                <view>
+                    <image class="image" src="{{form.icon&&form.icon.length>0?form.icon[0].url:''}}" bindtap="toView" data-item="{{form.icon[0]}}"></image>
+                </view>
             </view>
             <view class="one_1">
-                <text class="text">姓名:</text>
-                <text class="text1">{{form.name||'暂无昵称'}}</text>
+                <view>
+                    <text>姓名:</text>
+                </view>
+                <view>
+                    <text>{{form.name||'暂无'}}</text>
+                </view>
             </view>
             <view class="one_1">
-                <text class="text">性别:</text>
-                <text class="text1">{{form.zhGender||'暂无'}}</text>
+                <view>
+                    <text>性别:</text>
+                </view>
+                <view>
+                    <text>{{form.zhGender||'暂无'}}</text>
+                </view>
             </view>
             <view class="one_1">
-                <text class="text">年龄:</text>
-                <text class="text1">{{form.age||'暂无'}}</text>
+                <view>
+                    <text>年龄:</text>
+                </view>
+                <view>
+                    <text>{{form.age||'暂无'}}</text>
+                </view>
             </view>
             <view class="one_1">
-                <text class="text">电话:</text>
-                <text class="text1">{{form.phone||'暂无'}}</text>
+                <view>
+                    <text>电话:</text>
+                </view>
+                <view>
+                    <text>{{form.phone||'暂无'}}</text>
+                </view>
             </view>
             <view class="one_1">
-                <text class="text">等级:</text>
-                <text class="text1">{{form.zhLevel||'暂无'}}</text>
+                <view>
+                    <text>等级:</text>
+                </view>
+                <view>
+                    <text>{{form.zhLevel||'暂无'}}</text>
+                </view>
             </view>
             <view class="one_1">
-                <text class="text">简介:</text>
-                <text class="text1">{{form.brief||'暂无'}}</text>
+                <view>
+                    <text>简介:</text>
+                </view>
+                <view>
+                    <text>{{form.brief||'暂无'}}</text>
+                </view>
             </view>
             <view class="one_1">
-                <text class="text">荣誉:</text>
-                <text class="text1">{{form.honor||'暂无'}}</text>
+                <view>
+                    <text>荣誉:</text>
+                </view>
+                <view>
+                    <text>{{form.honor||'暂无'}}</text>
+                </view>
             </view>
             <view class="one_1">
-                <text class="text">教学经历:</text>
-                <text class="text1">{{form.exp||'暂无'}}</text>
+                <view>
+                    <text>教学经历:</text>
+                </view>
+                <view>
+                    <text>{{form.exp||'暂无'}}</text>
+                </view>
             </view>
         </view>
     </view>

+ 10 - 16
pagesSchool/common/coachinfo.wxss

@@ -3,29 +3,23 @@
   background-color: var(--mainColor);
 }
 .main .one {
-  width: 96vw;
-  padding: 2vw;
+  padding: 0 2vw;
 }
 .main .one .one_1 {
   display: flex;
-  flex-direction: row;
   justify-content: space-between;
-  border: 1px dashed var(--f85Color);
+  border: 1px dashed #858585;
+  padding: 2vw;
   border-radius: 5px;
-  margin: 0 0 10px 0;
-  padding: 10px;
-}
-.main .one .one_1 .text {
-  width: 22vw;
-  color: var(--f85Color);
-  font-size: var(--font16Size);
-}
-.main .one .one_1 .text1 {
-  width: 70vw;
-  font-size: var(--font16Size);
-  text-align: right;
+  margin: 2vw 0 0 0;
 }
 .main .one .one_1 .image {
   width: 15vw;
   height: 15vw;
+  border-radius: 5px;
+}
+.main .one .one_1 view:last-child {
+  flex-grow: 1;
+  width: 10vw;
+  text-align: right;
 }