Browse Source

Merge branch 'main' of http://git.ycjcjy.com/medical-plat/wechat-yiyao into main

1002884655 3 years ago
parent
commit
da1c25cc40

+ 2
- 2
config/dev.js View File

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    SERVER_API: '"https://api.medical.p.njyunzhi.com"'
7
-    // SERVER_API: '"http://127.0.0.1:8080"'
6
+    // SERVER_API: '"https://api.medical.p.njyunzhi.com"'
7
+    SERVER_API: '"http://127.0.0.1:8081"'
8 8
   },
9 9
   mini: {},
10 10
   h5: {}

+ 2
- 1
src/components/BodyCheckItem/index.vue View File

@@ -4,7 +4,8 @@
4 4
       <text>{{Data.name}}</text>
5 5
       <text>{{ToolClass.DateFormat(Data.createDate)}}</text>
6 6
     </view>
7
-    <navigator url="" hover-class="none">查看报告</navigator>
7
+    <view>{{Data.attchment}}</view>
8
+    <!-- <navigator url="" hover-class="none">查看报告</navigator> -->
8 9
   </view>
9 10
 </template>
10 11
 

+ 2
- 2
src/components/BookItem/page.scss View File

@@ -28,8 +28,8 @@
28 28
     }
29 29
     > .Desc {
30 30
       > text {
31
-        font-size: 28px;
32
-        line-height: 40px;
31
+        font-size: 26px;
32
+        line-height: 1.8em;
33 33
         overflow: hidden;
34 34
         text-overflow: ellipsis;
35 35
         display: -webkit-box;

+ 13
- 2
src/components/MainPage/index.vue View File

@@ -105,7 +105,7 @@ export default {
105 105
             _that.WxLogin({ queryData: { code: res.code } }).then((res) => {
106 106
               wx.setStorageSync('token', res.data.data.token)
107 107
               wx.setStorageSync('tokentime', Date.now())
108
-              if (CurrentPageRoute !== 'pages/Index/index') { // 非首页
108
+              if (_that.isAuthPage()) { // 非首页
109 109
                 // if (CurrentPageRoute !== '') { // 非首页
110 110
                 if (!_that.UserInfo.avatar) { // 未授权头像
111 111
                   _that.ShowUserIconAuthPopup = true
@@ -121,7 +121,7 @@ export default {
121 121
           }
122 122
         })
123 123
       } else {
124
-        if (CurrentPageRoute !== 'pages/Index/index') { // 非首页
124
+        if (this.isAuthPage()) { // 非首页
125 125
           // if (CurrentPageRoute !== '') { // 非首页
126 126
           if (!_that.UserInfo.avatar) { // 未授权头像
127 127
             _that.ShowUserIconAuthPopup = true
@@ -195,6 +195,17 @@ export default {
195 195
           this.$emit('UserInfoChange')
196 196
         }
197 197
       })
198
+    },
199
+    isAuthPage() {
200
+      const whiteList = [
201
+        'pages/Index/index',
202
+        'pages/Study/index',
203
+      ]
204
+
205
+      const current = Taro.getCurrentPages()[Taro.getCurrentPages().length - 1].route
206
+      const exists = whiteList.filter((it) => current.indexOf(it) > -1)
207
+
208
+      return exists.length < 1
198 209
     }
199 210
   }
200 211
 }

+ 5
- 3
src/pages/Index/BookAnswer/index.vue View File

@@ -120,14 +120,16 @@ export default {
120 120
       })
121 121
       if (Bool && !this.DataLock) {
122 122
         this.DataLock = true
123
-        this.PostArticleAnswer({ data: { data: this.ArticleInfo.postTestList } }).then(() => {
123
+        this.PostArticleAnswer({ data: { data: this.ArticleInfo.postTestList } }).then((res) => {
124 124
           wx.showToast({
125
-            title: '提交成功',
125
+            title: res.data.data,
126 126
             icon: 'none',
127 127
             duration: 2000
128 128
           })
129 129
           this.DataLock = false
130
-          wx.navigateBack({ changed: true })
130
+          window.setTimeout(() => {
131
+            wx.navigateBack({ changed: true })
132
+          }, 2000)
131 133
         }).catch(() => {
132 134
           this.DataLock = false
133 135
         })

+ 12
- 9
src/pages/Index/BookDetail/index.vue View File

@@ -8,20 +8,22 @@
8 8
 
9 9
             <!-- 封面内容 -->
10 10
             <view class="FrontInfo">
11
-              <view class="Like" @tap="TriggerSave">
11
+              <!-- <view class="Like" @tap="TriggerSave">
12 12
                 <text class="iconfont iconshoucang1" :class="{'active': ArticleInfo.isSaved}"></text>
13
-                <!-- <text>收藏</text> -->
14
-              </view>
13
+              </view> -->
15 14
               <view class="Img">
16 15
                 <view>
17 16
                   <image mode="aspectFit" :src="ArticleInfo.poster" class="centerLabel"></image>
18 17
                 </view>
19 18
               </view>
20 19
               <view class="SubInfo">
21
-                <view class="Tag">
20
+                <view class="Tag flex-h">
22 21
                   <text class="iconfont iconbiaoqian"></text>
23 22
                   <text>分类:</text>
24 23
                   <text class="active">{{ArticleInfo.typeName}}</text>
24
+                  <view class="flex-item"></view>
25
+                  <!-- <text class="iconfont iconfenxiang" @tap="ShareArticle"></text> -->
26
+                  <!-- <button open-type="share" class="ShareBtn">分享</button> -->
25 27
                 </view>
26 28
                 <view class="flex-h">
27 29
                   <view class="flex-item flex-h" style="flex: 3; -webkit-flex: 3;">
@@ -30,7 +32,7 @@
30 32
                   </view>
31 33
                   <view class="flex-item flex-h" style="flex: 1; -webkit-flex: 1;">
32 34
                     <text>阅读量:</text>
33
-                    <text class="flex-item">{{ArticleInfo.answerNum}}</text>
35
+                    <text class="flex-item">{{ArticleInfo.postData ? ArticleInfo.postData.pv : 0}}</text>
34 36
                   </view>
35 37
                 </view>
36 38
                 <view class="flex-h">
@@ -66,8 +68,9 @@
66 68
         </view>
67 69
 
68 70
         <!-- 底部 -->
69
-        <!-- <view class="flex-h Bottom">
70
-          <view class="Share" @tap="ShareArticle">
71
+        <view class="flex-h Bottom">
72
+          <button open-type="share" class="ShareBtn">分享</button>
73
+          <view class="Share">
71 74
             <text class="iconfont iconfenxiang"></text>
72 75
             <text>分享</text>
73 76
           </view>
@@ -76,10 +79,10 @@
76 79
             <text>收藏</text>
77 80
           </view>
78 81
           <view class="flex-item"></view>
79
-          <view class="Answer">
82
+          <view class="Answer" v-if="ArticleInfo.postTestList && ArticleInfo.postTestList.length">
80 83
             <navigator :url="`/pages/Index/BookAnswer/index?id=${ArticleInfo.postId}`" hover-class="none">去答题</navigator>
81 84
           </view>
82
-        </view> -->
85
+        </view>
83 86
       </view>
84 87
     </MainPage>
85 88
   </view>

+ 22
- 0
src/pages/Index/BookDetail/page.scss View File

@@ -17,6 +17,7 @@
17 17
       > .FrontInfo {
18 18
         position: relative;
19 19
         overflow: hidden;
20
+        > .Share,
20 21
         > .Like {
21 22
           display: inline-block;
22 23
           position: absolute;
@@ -39,6 +40,9 @@
39 40
             }
40 41
           }
41 42
         }
43
+        > .Share {
44
+          top: 120px;
45
+        }
42 46
         > .Img {
43 47
           padding: 30px 120px;
44 48
           position: relative;
@@ -81,6 +85,14 @@
81 85
                 border-radius: 6px;
82 86
               }
83 87
             }
88
+            > .ShareBtn {
89
+              opacity: 0;
90
+              width: 40px;
91
+              position: absolute;
92
+              z-index: 3;
93
+              right: 30px;
94
+              top: 0;
95
+            }
84 96
           }
85 97
           > .flex-h {
86 98
             align-items: center;
@@ -151,6 +163,15 @@
151 163
     padding-left: 30px;
152 164
     z-index: 2;
153 165
     box-shadow: 0 0 10px 10px rgba(0, 0, 0, 0.05);
166
+    min-height: 100px;
167
+    > .ShareBtn {
168
+      width: 92px;
169
+      opacity: 0;
170
+      position: absolute;
171
+      left: 30px;
172
+      top: 10px;
173
+      z-index: 2;
174
+    }
154 175
     > .Share,
155 176
     .Like {
156 177
       font-size: 0;
@@ -175,6 +196,7 @@
175 196
       overflow: hidden;
176 197
       padding: 10px 0;
177 198
       margin-right: 20px;
199
+      height: 100px;
178 200
       > navigator {
179 201
         display: block;
180 202
         width: 240px;

+ 3
- 3
src/pages/Index/index.vue View File

@@ -57,7 +57,7 @@
57 57
                     <text>最新文章</text>
58 58
                   </view>
59 59
                   <view class="ListContainer">
60
-                    <view class="ArticleItem flex-h" v-for="(item, index) in NewestArticleList">
60
+                    <view class="ArticleItem flex-h" v-for="(item, index) in NewestArticleList" :key="index">
61 61
                       <BookItem :Data="item"></BookItem>
62 62
                     </view>
63 63
                   </view>
@@ -102,8 +102,8 @@ export default {
102 102
     BookItem,
103 103
     PageBottom
104 104
   },
105
-  created () {
106
-  },
105
+  onShareAppMessage() {},
106
+  onShareTimeline() {},
107 107
   mounted () {
108 108
     this.$nextTick(() => {
109 109
     })

+ 9
- 7
src/pages/Index/page.scss View File

@@ -14,11 +14,11 @@
14 14
     > view {
15 15
       position: relative;
16 16
       overflow: hidden;
17
-      background: #fff;
17
+      background: #fafafa;
18 18
       border-radius: 20px;
19 19
       align-items: center;
20 20
       box-sizing: border-box;
21
-      border: 2px solid #333;
21
+      border: 1px solid rgba(0, 0, 0, 0.05);
22 22
       > text {
23 23
         font-size: 32px;
24 24
         color: #333;
@@ -86,7 +86,8 @@
86 86
               display: block;
87 87
               font-size: 32px;
88 88
               font-weight: bold;
89
-              line-height: 60px;
89
+              line-height: 1.8em;
90
+              padding: 0.5em 0;
90 91
             }
91 92
           }
92 93
           > .ListContainer {
@@ -120,7 +121,7 @@
120 121
                     margin-top: 6px;
121 122
                     display: block;
122 123
                     font-size: 28px;
123
-                    line-height: 40px;
124
+                    line-height: 1.8em;
124 125
                     white-space: nowrap;
125 126
                     overflow: hidden;
126 127
                     text-overflow: ellipsis;
@@ -142,7 +143,8 @@
142 143
               display: block;
143 144
               font-size: 32px;
144 145
               font-weight: bold;
145
-              line-height: 60px;
146
+              line-height: 1.8em;
147
+              padding: 0.5em 0;
146 148
             }
147 149
           }
148 150
           > .ListContainer {
@@ -184,8 +186,8 @@
184 186
                 }
185 187
                 > .Desc {
186 188
                   > text {
187
-                    font-size: 28px;
188
-                    line-height: 40px;
189
+                    font-size: 24px;
190
+                    line-height: 28px;
189 191
                     overflow: hidden;
190 192
                     text-overflow: ellipsis;
191 193
                     display: -webkit-box;

+ 1
- 1
src/pages/Mine/MyBodyCheck/index.vue View File

@@ -2,7 +2,7 @@
2 2
   <view class="page">
3 3
     <MainPage ref="MainPage" @UserInfoChange="Init">
4 4
       <view class="page flex-v">
5
-        <view class="UserInfo">
5
+        <view class="UserInfo" v-if="UserInfo.studentId">
6 6
           <view class="flex-h">
7 7
             <view class="flex-h flex-item">
8 8
               <text>姓名:</text>

+ 6
- 3
src/pages/Mine/MyInfo/index.vue View File

@@ -7,7 +7,7 @@
7 7
             <view>头像</view>
8 8
             <view class="flex-item">
9 9
               <view class="UserIcon">
10
-                <image mode="aspectFill" :src="UserInfo.avatar" class="centerLabel"></image>
10
+                <image mode="aspectFill" :src="UserInfo.avatar" class="centerLabel" style="height: 100%"></image>
11 11
               </view>
12 12
             </view>
13 13
           </view>
@@ -19,7 +19,7 @@
19 19
             </view>
20 20
           </view>
21 21
           <view class="flex-h">
22
-            <view>姓名</view>
22
+            <view><text class="Point">*</text>姓名</view>
23 23
             <view class="flex-item">
24 24
               <input placeholder="请输入姓名" v-model="Form.name" />
25 25
               <!-- <input placeholder="请输入姓名" /> -->
@@ -84,6 +84,7 @@
84 84
 </template>
85 85
 
86 86
 <script>
87
+import Taro from '@tarojs/taro'
87 88
 import MainPage from '@/components/MainPage'
88 89
 import Picker from '@/components/Picker'
89 90
 import { createNamespacedHelpers } from 'vuex'
@@ -188,7 +189,9 @@ export default {
188 189
           })
189 190
           this.DataLock = false
190 191
           Taro.navigateBack({ delta: 1 })
191
-        }).catch(() => {
192
+          console.log('--------navigateBack------')
193
+        }).catch((err) => {
194
+          console.error(err)
192 195
           this.DataLock = false
193 196
         })
194 197
       }