Browse Source

静态页面

1002884655 4 years ago
parent
commit
e44d021f6b

+ 10
- 10
project.config.json View File

5
 	"appid": "wx75ce0dc4b59e0458",
5
 	"appid": "wx75ce0dc4b59e0458",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
+		"scopeDataCheck": false,
9
+		"coverView": true,
8
 		"es6": false,
10
 		"es6": false,
9
-		"enhance": false,
10
 		"postcss": false,
11
 		"postcss": false,
12
+		"compileHotReLoad": false,
11
 		"preloadBackgroundData": false,
13
 		"preloadBackgroundData": false,
12
 		"minified": false,
14
 		"minified": false,
15
+		"autoAudits": false,
13
 		"newFeature": false,
16
 		"newFeature": false,
14
-		"coverView": true,
17
+		"uglifyFileName": false,
18
+		"uploadWithSourceMap": true,
19
+		"useIsolateContext": true,
15
 		"nodeModules": false,
20
 		"nodeModules": false,
16
-		"autoAudits": false,
21
+		"enhance": false,
22
+		"useCompilerModule": false,
23
+		"userConfirmedUseCompilerModuleSwitch": false,
17
 		"showShadowRootInWxmlPanel": true,
24
 		"showShadowRootInWxmlPanel": true,
18
-		"scopeDataCheck": false,
19
-		"uglifyFileName": false,
20
 		"checkInvalidKey": true,
25
 		"checkInvalidKey": true,
21
 		"checkSiteMap": true,
26
 		"checkSiteMap": true,
22
-		"uploadWithSourceMap": true,
23
-		"compileHotReLoad": false,
24
 		"useMultiFrameRuntime": true,
27
 		"useMultiFrameRuntime": true,
25
 		"useApiHook": true,
28
 		"useApiHook": true,
26
 		"useApiHostProcess": false,
29
 		"useApiHostProcess": false,
31
 		},
34
 		},
32
 		"enableEngineNative": false,
35
 		"enableEngineNative": false,
33
 		"bundle": false,
36
 		"bundle": false,
34
-		"useIsolateContext": true,
35
-		"useCompilerModule": false,
36
-		"userConfirmedUseCompilerModuleSwitch": false,
37
 		"userConfirmedBundleSwitch": false,
37
 		"userConfirmedBundleSwitch": false,
38
 		"packNpmManually": false,
38
 		"packNpmManually": false,
39
 		"packNpmRelationList": [],
39
 		"packNpmRelationList": [],

+ 10
- 15
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">
12
+                <text class="iconfont iconshoucang1" :class="{'active': ArticleInfo.isSaved}"></text>
13
+                <!-- <text>收藏</text> -->
14
+              </view>
11
               <view class="Img">
15
               <view class="Img">
12
                 <view>
16
                 <view>
13
                   <image mode="aspectFit" :src="ArticleInfo.poster" class="centerLabel"></image>
17
                   <image mode="aspectFit" :src="ArticleInfo.poster" class="centerLabel"></image>
17
                 <view class="Tag">
21
                 <view class="Tag">
18
                   <text class="iconfont iconbiaoqian"></text>
22
                   <text class="iconfont iconbiaoqian"></text>
19
                   <text>分类:</text>
23
                   <text>分类:</text>
20
-                  <text v-for="(item, index) in (ArticleInfo.tags || [])" :key="index">{{item}}</text>
24
+                  <text class="active">{{ArticleInfo.typeName}}</text>
21
                 </view>
25
                 </view>
22
                 <view class="flex-h">
26
                 <view class="flex-h">
23
-                  <view class="flex-item flex-h">
27
+                  <view class="flex-item flex-h" style="flex: 3; -webkit-flex: 3;">
24
                     <text>名称:</text>
28
                     <text>名称:</text>
25
                     <text class="flex-item">{{ArticleInfo.name}}</text>
29
                     <text class="flex-item">{{ArticleInfo.name}}</text>
26
                   </view>
30
                   </view>
27
-                  <view class="flex-item flex-h">
31
+                  <view class="flex-item flex-h" style="flex: 1; -webkit-flex: 1;">
28
                     <text>阅读量:</text>
32
                     <text>阅读量:</text>
29
                     <text class="flex-item">{{ArticleInfo.answerNum}}</text>
33
                     <text class="flex-item">{{ArticleInfo.answerNum}}</text>
30
                   </view>
34
                   </view>
40
                   </view>
44
                   </view>
41
                 </view>
45
                 </view>
42
                 <view class="Desc">
46
                 <view class="Desc">
43
-                  <text>简介:{{ArticleInfo.summary}}</text>
47
+                  简介:<text>{{ArticleInfo.summary}}</text>
44
                 </view>
48
                 </view>
45
               </view>
49
               </view>
46
 
50
 
61
         </view>
65
         </view>
62
 
66
 
63
         <!-- 底部 -->
67
         <!-- 底部 -->
64
-        <view class="flex-h Bottom">
68
+        <!-- <view class="flex-h Bottom">
65
           <view class="Share" @tap="ShareArticle">
69
           <view class="Share" @tap="ShareArticle">
66
             <text class="iconfont iconfenxiang"></text>
70
             <text class="iconfont iconfenxiang"></text>
67
             <text>分享</text>
71
             <text>分享</text>
74
           <view class="Answer">
78
           <view class="Answer">
75
             <navigator :url="`/pages/Index/BookAnswer/index?id=${ArticleInfo.postId}`" hover-class="none">去答题</navigator>
79
             <navigator :url="`/pages/Index/BookAnswer/index?id=${ArticleInfo.postId}`" hover-class="none">去答题</navigator>
76
           </view>
80
           </view>
77
-          <!-- <view class="ReadInfo">
78
-            <text>阅读时长:1小时22分钟22秒</text>
79
-            <view class="Progress flex-h">
80
-              <view class="flex-item">
81
-                <view :style="{width: '50%'}"></view>
82
-              </view>
83
-              <text>完成进度</text>
84
-            </view>
85
-          </view> -->
86
-        </view>
81
+        </view> -->
87
       </view>
82
       </view>
88
     </MainPage>
83
     </MainPage>
89
   </view>
84
   </view>

+ 43
- 5
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
+        > .Like {
21
+          display: inline-block;
22
+          position: absolute;
23
+          z-index: 2;
24
+          right: 30px;
25
+          top: 30px;
26
+          font-size: 0;
27
+          white-space: nowrap;
28
+          > text {
29
+            display: inline-block;
30
+            vertical-align: middle;
31
+            font-size: 28px;
32
+            color: #333;
33
+            &:first-child {
34
+              font-size: 48px;
35
+              color: #ccc;
36
+              &.active {
37
+                color: #f4c819;
38
+              }
39
+            }
40
+          }
41
+        }
20
         > .Img {
42
         > .Img {
21
           padding: 30px 120px;
43
           padding: 30px 120px;
44
+          position: relative;
45
+          z-index: 1;
22
           > view {
46
           > view {
23
             width: 100%;
47
             width: 100%;
24
             padding-bottom: 125%;
48
             padding-bottom: 125%;
48
                 font-weight: normal;
72
                 font-weight: normal;
49
                 font-size: 40px;
73
                 font-size: 40px;
50
               }
74
               }
75
+              &.active {
76
+                font-size: 24px;
77
+                line-height: 50px;
78
+                font-weight: normal;
79
+                background: #f4c819;
80
+                padding: 0 20px;
81
+                border-radius: 6px;
82
+              }
51
             }
83
             }
52
           }
84
           }
53
           > .flex-h {
85
           > .flex-h {
54
             align-items: center;
86
             align-items: center;
55
             padding: 0 30px;
87
             padding: 0 30px;
88
+            margin-top: 30px;
56
             > view {
89
             > view {
57
               align-items: center;
90
               align-items: center;
58
               > text {
91
               > text {
61
                 white-space: nowrap;
94
                 white-space: nowrap;
62
                 overflow: hidden;
95
                 overflow: hidden;
63
                 text-overflow: ellipsis;
96
                 text-overflow: ellipsis;
64
-                color: #999;
97
+                color: #333;
98
+                font-weight: bold;
65
                 &:first-child {
99
                 &:first-child {
66
                   margin-right: 10px;
100
                   margin-right: 10px;
101
+                  color: #999;
102
+                  font-weight: normal;
67
                 }
103
                 }
68
               }
104
               }
69
             }
105
             }
72
             padding: 0 30px;
108
             padding: 0 30px;
73
             position: relative;
109
             position: relative;
74
             overflow: hidden;
110
             overflow: hidden;
111
+            margin-top: 30px;
112
+            font-size: 28px;
113
+            line-height: 60px;
114
+            color: #999;
75
             > text {
115
             > text {
76
-              width: 100%;
77
-              display: block;
78
               font-size: 28px;
116
               font-size: 28px;
79
-              line-height: 40px;
80
-              color: #999;
117
+              line-height: 60px;
118
+              color: #333;
81
             }
119
             }
82
           }
120
           }
83
         }
121
         }

+ 6
- 1
src/pages/Index/index.vue View File

24
                   <view>
24
                   <view>
25
                     <swiper :indicator-dots="true" :autoplay="true" :interval="3000">
25
                     <swiper :indicator-dots="true" :autoplay="true" :interval="3000">
26
                       <swiper-item v-for="(item, index) in BannerList" :key="index">
26
                       <swiper-item v-for="(item, index) in BannerList" :key="index">
27
-                        <view class="BannerItem">
27
+                        <view class="BannerItem" @tap="BannerClick(item)">
28
                           <image mode="aspectFill" :src="item.image" class="centerLabel"></image>
28
                           <image mode="aspectFill" :src="item.image" class="centerLabel"></image>
29
                         </view>
29
                         </view>
30
                       </swiper-item>
30
                       </swiper-item>
118
       'GetIndexHotList',
118
       'GetIndexHotList',
119
       'GetIndexNewestArticle'
119
       'GetIndexNewestArticle'
120
     ]),
120
     ]),
121
+    BannerClick (item) {
122
+      if (item.targetType === 'post') {
123
+        wx.navigateTo({ url: `/pages/Index/BookDetail/index?id=${item.targetId}` })
124
+      }
125
+    },
121
     UserInfoChange () {
126
     UserInfoChange () {
122
       this.GetIndexBanner().then((res) => {
127
       this.GetIndexBanner().then((res) => {
123
         this.BannerList = [...res.data.data]
128
         this.BannerList = [...res.data.data]