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
     NODE_ENV: '"development"'
3
     NODE_ENV: '"development"'
4
   },
4
   },
5
   defineConstants: {
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
   mini: {},
9
   mini: {},
10
   h5: {}
10
   h5: {}

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

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

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

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

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

105
             _that.WxLogin({ queryData: { code: res.code } }).then((res) => {
105
             _that.WxLogin({ queryData: { code: res.code } }).then((res) => {
106
               wx.setStorageSync('token', res.data.data.token)
106
               wx.setStorageSync('token', res.data.data.token)
107
               wx.setStorageSync('tokentime', Date.now())
107
               wx.setStorageSync('tokentime', Date.now())
108
-              if (CurrentPageRoute !== 'pages/Index/index') { // 非首页
108
+              if (_that.isAuthPage()) { // 非首页
109
                 // if (CurrentPageRoute !== '') { // 非首页
109
                 // if (CurrentPageRoute !== '') { // 非首页
110
                 if (!_that.UserInfo.avatar) { // 未授权头像
110
                 if (!_that.UserInfo.avatar) { // 未授权头像
111
                   _that.ShowUserIconAuthPopup = true
111
                   _that.ShowUserIconAuthPopup = true
121
           }
121
           }
122
         })
122
         })
123
       } else {
123
       } else {
124
-        if (CurrentPageRoute !== 'pages/Index/index') { // 非首页
124
+        if (this.isAuthPage()) { // 非首页
125
           // if (CurrentPageRoute !== '') { // 非首页
125
           // if (CurrentPageRoute !== '') { // 非首页
126
           if (!_that.UserInfo.avatar) { // 未授权头像
126
           if (!_that.UserInfo.avatar) { // 未授权头像
127
             _that.ShowUserIconAuthPopup = true
127
             _that.ShowUserIconAuthPopup = true
195
           this.$emit('UserInfoChange')
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
       })
120
       })
121
       if (Bool && !this.DataLock) {
121
       if (Bool && !this.DataLock) {
122
         this.DataLock = true
122
         this.DataLock = true
123
-        this.PostArticleAnswer({ data: { data: this.ArticleInfo.postTestList } }).then(() => {
123
+        this.PostArticleAnswer({ data: { data: this.ArticleInfo.postTestList } }).then((res) => {
124
           wx.showToast({
124
           wx.showToast({
125
-            title: '提交成功',
125
+            title: res.data.data,
126
             icon: 'none',
126
             icon: 'none',
127
             duration: 2000
127
             duration: 2000
128
           })
128
           })
129
           this.DataLock = false
129
           this.DataLock = false
130
-          wx.navigateBack({ changed: true })
130
+          window.setTimeout(() => {
131
+            wx.navigateBack({ changed: true })
132
+          }, 2000)
131
         }).catch(() => {
133
         }).catch(() => {
132
           this.DataLock = false
134
           this.DataLock = false
133
         })
135
         })

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

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

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

17
       > .FrontInfo {
17
       > .FrontInfo {
18
         position: relative;
18
         position: relative;
19
         overflow: hidden;
19
         overflow: hidden;
20
+        > .Share,
20
         > .Like {
21
         > .Like {
21
           display: inline-block;
22
           display: inline-block;
22
           position: absolute;
23
           position: absolute;
39
             }
40
             }
40
           }
41
           }
41
         }
42
         }
43
+        > .Share {
44
+          top: 120px;
45
+        }
42
         > .Img {
46
         > .Img {
43
           padding: 30px 120px;
47
           padding: 30px 120px;
44
           position: relative;
48
           position: relative;
81
                 border-radius: 6px;
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
           > .flex-h {
97
           > .flex-h {
86
             align-items: center;
98
             align-items: center;
151
     padding-left: 30px;
163
     padding-left: 30px;
152
     z-index: 2;
164
     z-index: 2;
153
     box-shadow: 0 0 10px 10px rgba(0, 0, 0, 0.05);
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
     > .Share,
175
     > .Share,
155
     .Like {
176
     .Like {
156
       font-size: 0;
177
       font-size: 0;
175
       overflow: hidden;
196
       overflow: hidden;
176
       padding: 10px 0;
197
       padding: 10px 0;
177
       margin-right: 20px;
198
       margin-right: 20px;
199
+      height: 100px;
178
       > navigator {
200
       > navigator {
179
         display: block;
201
         display: block;
180
         width: 240px;
202
         width: 240px;

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

57
                     <text>最新文章</text>
57
                     <text>最新文章</text>
58
                   </view>
58
                   </view>
59
                   <view class="ListContainer">
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
                       <BookItem :Data="item"></BookItem>
61
                       <BookItem :Data="item"></BookItem>
62
                     </view>
62
                     </view>
63
                   </view>
63
                   </view>
102
     BookItem,
102
     BookItem,
103
     PageBottom
103
     PageBottom
104
   },
104
   },
105
-  created () {
106
-  },
105
+  onShareAppMessage() {},
106
+  onShareTimeline() {},
107
   mounted () {
107
   mounted () {
108
     this.$nextTick(() => {
108
     this.$nextTick(() => {
109
     })
109
     })

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

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

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

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

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

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