周立森 5 vuotta sitten
vanhempi
commit
d9b13191e2

+ 83
- 49
src/App.vue Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div id="app">
3 3
     <div>
4
-      <nav class="navbar navbar-default navbar-fixed-top" :class="{ 'scroll': scrolled }">
4
+      <nav class="navbar navbar-default navbar-fixed-top app" :class="{ 'scroll': scrolled }">
5 5
         <div class="container-fluid con">
6 6
           <!-- Brand and toggle get grouped for better mobile display -->
7 7
           <div class="navbar-header">
@@ -57,19 +57,19 @@
57 57
           </el-col>
58 58
 
59 59
           <el-col :span="24" class="a">
60
-            <a href="/case">02 案例展示</a>
60
+            <a href="/case" class="btn1">02 案例展示</a>
61 61
           </el-col>
62 62
 
63 63
           <el-col :span="24" class="a">
64
-            <a href="/dynamic">03 动态分享</a>
64
+            <a href="/dynamic" class="btn1">03 动态分享</a>
65 65
           </el-col>
66 66
 
67 67
           <el-col :span="24" class="a">
68
-            <a href="/about">04 关于福予</a>
68
+            <a href="/about" class="btn1">04 关于福予</a>
69 69
           </el-col>
70 70
 
71 71
           <el-col :span="24" class="a">
72
-            <a href="/contact">05 联系我们</a>
72
+            <a href="/contact" class="btn1">05 联系我们</a>
73 73
           </el-col>
74 74
 
75 75
           <el-col :span="24" class="a">
@@ -82,30 +82,30 @@
82 82
     <div class="main">
83 83
       <router-view />
84 84
     </div>
85
-<div id="hide">
86
-    <div class="coll">
87
-      <div >
88
-        <div class="btn btn-default" href="#" role="button" @mouseenter="enter1()" style="position:fixed;right:0;bottom:306px;margin:0;padding:0;z-index: 3;">
89
-          <img src="./assets/image/联系我们.jpg" alt style="position:fixed;right:0;bottom:306px;margin:0;padding:0;z-index: 3;" />
90
-        </div>
91
-        <div class="btn btn-default" role="button" @click="open" v-if="current1" @mouseenter.stop="enter1() " @mouseleave="leave1()" style="position:fixed;right:0;bottom:306px;margin:0;padding:0;z-index: 4;">
92
-          <img src="./assets/image/联系我们触发.png" @mouseleave="leave1()" alt style="position:fixed;right:0;bottom:306px;margin:0;padding:0;z-index: 4;" />
85
+    <div id="hide">
86
+      <div class="coll">
87
+        <div>
88
+          <div v-if="!current1" class="btn btn-default" role="button" @mouseenter="enter1()" style="position:fixed;right:0;bottom:306px;margin:0;padding:0;z-index: 3;">
89
+            <img src="./assets/image/联系我们.jpg" alt style="position:fixed;right:0;bottom:306px;margin:0;padding:0;z-index: 3;" />
90
+          </div>
91
+          <div v-if="current1" class="btn btn-default" role="button" @click="open" @mouseenter.stop="enter1() " @mouseleave="leave1()" style="position:fixed;right:0;bottom:306px;margin:0;padding:0;z-index: 4;">
92
+            <img src="./assets/image/联系我们触发.png" @mouseleave="leave1()" alt style="position:fixed;right:0;bottom:306px;margin:0;padding:0;z-index: 4;" />
93
+          </div>
93 94
         </div>
94 95
       </div>
95
-    </div>
96
-    <div class="coll">
97
-      <div>
98
-        <a href="#" role="button" @mouseenter="enter2()" style="position:fixed;right:0;bottom:250px;margin:0;padding:0;z-index: 3;">
99
-          <img src="./assets/image/返回顶层.jpg" style="position:fixed;right:0;bottom:250px;margin:0;padding:0;z-index: 3;" />
100
-        </a>
101
-      </div>
102
-      <div>
103
-        <a class="back-top" href="#" role="button" v-if="current2" @mouseenter.stop="enter2()" @mouseleave="leave2()" style="position:fixed;right:0;bottom:250px;margin:0;padding:0;z-index: 4;">
104
-          <img src="./assets/image/返回顶层触发.jpg" style="position:fixed;right:0;bottom:250px;margin:0;padding:0;z-index: 4;" />
105
-        </a>
96
+      <div class="coll">
97
+        <div>
98
+          <a href="#" v-if="!current2" role="button" @mouseenter="enter2()" style="position:fixed;right:0;bottom:250px;margin:0;padding:0;z-index: 3;">
99
+            <img src="./assets/image/返回顶层.jpg" style="position:fixed;right:0;bottom:250px;margin:0;padding:0;z-index: 3;" />
100
+          </a>
101
+        </div>
102
+        <div>
103
+          <a class="back-top" href="#" v-if="current2" role="button" @mouseenter.stop="enter2()" @mouseleave="leave2()" style="position:fixed;right:0;bottom:250px;margin:0;padding:0;z-index: 4;">
104
+            <img src="./assets/image/返回顶层触发.jpg" style="position:fixed;right:0;bottom:250px;margin:0;padding:0;z-index: 4;" />
105
+          </a>
106
+        </div>
106 107
       </div>
107 108
     </div>
108
-</div>
109 109
     <div class="page-footer" style="background-color:#1b1b1b">
110 110
       <p class="footer-p" style="color:rgb(255,255,255)">© 2019 All rights reserved.</p>
111 111
     </div>
@@ -165,25 +165,24 @@ export default {
165 165
     }
166 166
 
167 167
   },
168
- 
168
+
169 169
   mounted () {
170 170
     window.addEventListener('scroll', () => {
171 171
       this.scrolled = (document.documentElement.scrollTop || document.body.scrollTop) > 200
172 172
     })
173 173
 
174
-    window.onscroll=function(){
175
-    var scrollTop = document.documentElement.scrollTop||document.body.scrollTop;
176
-    if(scrollTop!=0)
177
-    {
178
-        document.getElementById("hide").style.display="block";  
179
-        
180
-    }else{document.getElementById("hide").style.display="none";  }
181
-}
174
+    window.onscroll = function () {
175
+      var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
176
+      if (scrollTop != 0) {
177
+        document.getElementById("hide").style.display = "block";
178
+
179
+      } else { document.getElementById("hide").style.display = "none"; }
180
+    }
182 181
 
183 182
 
184 183
   }
185 184
 
186
-  
185
+
187 186
 
188 187
 
189 188
 
@@ -203,16 +202,21 @@ p {
203 202
 
204 203
 <style>
205 204
 #app {
206
-  font-family: Microsoft YaHei;
205
+  
206
+  font-family: "Microsoft Yahei Light","Microsoft Yahei","Helvetica Neue","Helvetica","Arial",sans-serif;
207 207
   -webkit-font-smoothing: antialiased;
208 208
   -moz-osx-font-smoothing: grayscale;
209 209
   text-align: center;
210
-  background-color: fafafa;
210
+  /* background-color: fafafa; */
211 211
   color: #2c3e50;
212 212
   margin-top: px;
213 213
   width: auto;
214 214
   margin: 0;
215 215
 }
216
+.app{
217
+
218
+  font-family: "Microsoft Yahei","Helvetica Neue","Helvetica","Arial",sans-serif;
219
+}
216 220
 
217 221
 .coll {
218 222
   display: none;
@@ -229,6 +233,26 @@ p {
229 233
 .iconfont:hover {
230 234
   color: red;
231 235
 }
236
+
237
+
238
+
239
+@media (min-width: 768px) and (max-width: 992px) {
240
+  .con {
241
+    padding-left: 5vw !important;
242
+    padding-right: 5vw !important;
243
+  }
244
+  .logo{
245
+    margin-top: 0 !important;
246
+  }
247
+  .nav li {margin-left: 0 !important;}
248
+  .a {
249
+    font-size: 2.4rem !important;
250
+    margin-top: 0.5rem !important;
251
+    color: #000;
252
+    padding-left: 0px !important;
253
+    padding-right: 0px !important;
254
+  }
255
+}
232 256
 @media (min-width: 992px) {
233 257
   .coll {
234 258
     display: block;
@@ -237,7 +261,7 @@ p {
237 261
     padding-left: 10%;
238 262
     padding-right: 10%;
239 263
   }
240
-  
264
+
241 265
   .page-footer {
242 266
     height: 120px;
243 267
   }
@@ -246,18 +270,23 @@ p {
246 270
     font-size: 20px;
247 271
     margin: 0;
248 272
   }
273
+  .main {
274
+    padding-bottom: 9.4rem;
275
+  }
276
+ 
249 277
 }
250 278
 
251
-.main {
252
-  padding-bottom: 9.4rem;
253
-}
254
-.rtl #drawer__title{
279
+.rtl #drawer__title {
255 280
   margin: 0;
256 281
 }
257
-#hide{
258
-  display: none
282
+#hide {
283
+  display: none;
259 284
 }
285
+
260 286
 @media (max-width: 992px) {
287
+  .navbar {
288
+    height: 60px;
289
+  }
261 290
   .navbar-brand {
262 291
     padding: 0;
263 292
   }
@@ -270,7 +299,7 @@ p {
270 299
     background: url("./assets/logo1.png");
271 300
   }
272 301
   .logoimg {
273
-    margin: -20px auto 20px ;
302
+    margin: -20px auto 0px;
274 303
   }
275 304
   .a {
276 305
     font-size: 2.4rem;
@@ -280,7 +309,9 @@ p {
280 309
   .a a {
281 310
     color: #000;
282 311
   }
283
- 
312
+  .main {
313
+    padding-bottom: 3rem;
314
+  }
284 315
 
285 316
   .line {
286 317
     height: 2px;
@@ -317,7 +348,7 @@ p {
317 348
 
318 349
 
319 350
 <style lang="less" scoped>
320
-@media (min-width: 992px) {
351
+@media (min-width: 768px) {
321 352
   .navbar {
322 353
     padding: 30px 0;
323 354
     // background-color: transparent;
@@ -340,8 +371,11 @@ p {
340 371
       li {
341 372
         margin-left: 2vw;
342 373
         a {
343
-          color: #000;
344
-
374
+      
375
+color: #000;
376
+    padding-left: 5px;
377
+    padding-right: 5px;
378
+    margin: 0 10px;
345 379
           &:hover {
346 380
             border-bottom: 3px solid #000;
347 381
           }

+ 7
- 6
src/components/CaseCard.vue Näytä tiedosto

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <el-card class="case-card" shadow="hover" :body-style="{ padding: '0px' }" style=" padding: 0px">
2
+  <el-card class="case-card app" shadow="hover" :body-style="{ padding: '0px' }" style=" padding: 0px">
3 3
     <img :style="{background: `url(${thumb})`}" class="image" />
4 4
     <div class="body">
5 5
       <h3>{{title}}</h3>
@@ -49,10 +49,11 @@ export default {
49 49
       }
50 50
  text-decoration: none !important;
51 51
       .caption {
52
-        font-size: 2.4rem;
52
+        font-size: 2.0rem;
53 53
         color: #727171;
54
-        line-height: 1.2em;
55 54
         
55
+        line-height: 1.2em;
56
+        margin-top: 6px;
56 57
       }
57 58
     }
58 59
   }
@@ -73,20 +74,20 @@ export default {
73 74
     }
74 75
 
75 76
     .body {
76
-      padding: 0.5rem 1rem;
77
+      padding: 0.3rem 1rem;
77 78
       text-align: left;
78 79
 
79 80
       h3 {
80 81
         margin: 0;
81 82
         padding: 0;
82 83
         font-weight: 400;
83
-        font-size: 2rem;
84
+        font-size: 1.2rem;
84 85
         color: #000;
85 86
         line-height: 1em;
86 87
       }
87 88
 
88 89
       .caption {
89
-        font-size: 1.6rem;
90
+        font-size: 0.8rem;
90 91
         color: #727171;
91 92
         line-height: 1em;
92 93
       }

+ 5
- 1
src/components/ClickContact.vue Näytä tiedosto

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <div class="clickcontact">
2
+  <div class="clickcontact app">
3 3
     <div class="contact-1">
4 4
       <div class="contact-main">
5 5
         <h1 style="margin-bottom:70px">联系我们</h1>
@@ -37,6 +37,10 @@
37 37
 
38 38
 
39 39
 <style scoped>
40
+.clickcontact{
41
+  color: #000;
42
+}
43
+
40 44
 /* .contact-box {
41 45
   width: 80%;
42 46
   margin: 0 auto - 120px;

+ 26
- 7
src/components/Wheelplanting.vue Näytä tiedosto

@@ -62,14 +62,18 @@ export default {
62 62
     initSwiper () {
63 63
       if (!this.swiper) {
64 64
         this.swiper = new Swiper(".swiper-container", {
65
-          autoplay: true,
65
+          // loop:true,
66
+          // autoplay: true,
66 67
           direction: this.direction || 'horizontal',
67 68
           observer: true,
68 69
           observeSlideChildren: true,
69 70
 
70 71
           pagination: {
71
-            el: ".swiper-pagination",
72
-            hideOnClick: true
72
+            el: '.swiper-pagination',
73
+            bulletClass : 'swiper-pagination-bullet',
74
+            bulletActiveClass: 'my-bullet-active',
75
+            hideOnClick: true,
76
+         
73 77
           }
74 78
         });
75 79
       } else {
@@ -89,11 +93,26 @@ export default {
89 93
     z-index: 60;
90 94
   }
91 95
 }
92
-@media (max-width: 992px){
93
-  
96
+@media (max-width: 992px) {
94 97
   .wheelplanting .con-swiper {
95 98
     width: 100%;
96
-   height: 300px;
99
+    height: 300px;
97 100
   }
98 101
 }
99
-</style>
102
+</style>
103
+<style type="text/css">
104
+.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet {
105
+  opacity: 0.7;
106
+    margin: 8px 10vw 7px 0;
107
+    display: block;
108
+}
109
+.swiper-pagination-bullet{
110
+
111
+ /* margin:7px 0 7px -40px !important; 
112
+ z-index: 60 !important; */
113
+}
114
+
115
+.my-bullet-active{
116
+  background: #fff;
117
+  opacity: 1;
118
+}</style>

+ 3
- 2
src/config/api.js Näytä tiedosto

@@ -1,9 +1,10 @@
1
-const commPrefix = '/pc'
1
+const commPrefix = '/api/pc'
2 2
 
3 3
 const apis = {
4 4
   carousel:{
5 5
     list:{
6
-      url:`${commPrefix}/carousel/list`
6
+      url:`${commPrefix}/carousel/list`,
7
+      method: 'get',
7 8
     }
8 9
   },
9 10
   case: {

+ 8
- 0
src/main.js Näytä tiedosto

@@ -12,6 +12,14 @@ Vue.use(ElementUI)
12 12
 new Vue({
13 13
   router,
14 14
   store,
15
+  // scrollBehavior(to,from,savedPosition){
16
+  //   if(savedPosition){
17
+  //     return savedPosition;
18
+  //   }else{
19
+  //     return {x:0,y:0}
20
+  //   }
21
+  // },
15 22
   
23
+
16 24
   render: h => h(App)
17 25
 }).$mount('#app')

+ 9
- 1
src/router.js Näytä tiedosto

@@ -85,5 +85,13 @@ export default new Router({
85 85
     //   // which is lazy-loaded when the route is visited.
86 86
     //   component: () => import(/* webpackChunkName: "wheelplantings" */ './components/wheelplantings.vue')
87 87
     // },
88
-  ]
88
+  ],
89
+  scrollBehavior (to, from, saveTop) {
90
+    // return 期望滚动到哪个的位置
91
+    if(saveTop){
92
+      return saveTop
93
+    }else{
94
+      return {x:0,y:0}
95
+    }
96
+  },
89 97
 })

+ 14
- 4
src/views/About.vue Näytä tiedosto

@@ -159,7 +159,7 @@
159 159
   }
160 160
   .sssss {
161 161
     font-size: 1rem;
162
-
162
+color: #3e3a39;
163 163
     padding: 20px 20px;
164 164
   }
165 165
   .about-1 {
@@ -194,16 +194,18 @@
194 194
 
195 195
   .st div div .sssss {
196 196
     padding: 40px 20px;
197
-
197
+color: #3e3a39;
198 198
     font-size: 2.4rem;
199 199
   }
200 200
   .h1 {
201 201
     padding-top: 32px;
202 202
     font-size: 4.8rem;
203
+    font-weight: bold;
203 204
   }
204 205
 
205 206
   h2 {
206 207
     padding-bottom: 30px;
208
+    font-weight: bold;
207 209
   }
208 210
   .about-1-img {
209 211
     width: 175px;
@@ -226,17 +228,20 @@
226 228
   .teamh1 {
227 229
     margin-top: 0;
228 230
     font-size: 1.9vw;
231
+    font-weight: bold;
229 232
   }
230 233
   .teamp1 {
231 234
     font-size: 1.1vw;
232 235
     color: #595757;
233 236
     margin-bottom: 20px;
237
+    
234 238
   }
235 239
   .teamp2 {
236 240
     font-size: 1.1vw;
237 241
   }
238 242
 }
239 243
 
244
+
240 245
 /* 大屏幕(大桌面显示器,大于等于 1200px) */
241 246
 @media (min-width: 1200px) {
242 247
 }
@@ -249,6 +254,10 @@
249 254
  }
250 255
 
251 256
 @media (min-width: 992px) {
257
+  .p1{
258
+  color: #000;
259
+  font-size: 2.0rem;
260
+}
252 261
   .about-2 {
253 262
     padding-top: 60px;
254 263
     div {
@@ -274,9 +283,10 @@
274 283
     }
275 284
   }
276 285
 }
286
+
277 287
 @media (max-width: 992px) {
278 288
   .about-1 {
279
-    padding: 20px 30px;
289
+    padding: 20px 0px;
280 290
     div {
281 291
       // .about-1-img {
282 292
       // }
@@ -294,7 +304,7 @@
294 304
   .h1{
295 305
     font-size: 2.2rem;
296 306
     font-weight: bold;
297
-    margin-bottom: 24px;
307
+    margin-bottom: 0px;
298 308
   }
299 309
   .about-2 {
300 310
      

+ 11
- 5
src/views/Case.vue Näytä tiedosto

@@ -7,8 +7,8 @@
7 7
 
8 8
     <div class="border-bottom comtype">
9 9
       <div>
10
-        <button type="button" class="btn1 btn-link" style="color:black;font-size: 24px;padding: 25px" @click="() => filterCase()">全部案例</button>
11
-        <button v-for="cas in casetype" :key="cas.id" @click="() => filterCase(cas)" type="button" class="btn1 btn-link" style="color:black;font-size: 24px;padding: 25px">{{cas.typeName}}</button>
10
+        <button type="button" class="btn1 btn-link app" style="color:black;font-size: 24px;padding: 25px" @click="() => filterCase()">全部案例</button>
11
+        <button v-for="cas in casetype" :key="cas.id" @click="() => filterCase(cas)" type="button" class="btn1 btn-link app" style="color:black;font-size: 24px;padding: 25px">{{cas.typeName}}</button>
12 12
       </div>
13 13
     </div>
14 14
 
@@ -19,7 +19,7 @@
19 19
         </div>
20 20
       </div>
21 21
       <div class="col-xs-6">
22
-        <el-button class="btn-link mobbtn" @click="drawer = true" type="button" style="margin-left: 16px;">全部案例</el-button>
22
+        <el-button class="btn-link mobbtn" @click="drawer = true" type="button" style="margin-left: 16px;">{{currentTypeName}}</el-button>
23 23
       </div>
24 24
     </div>
25 25
     <el-drawer :visible.sync="drawer" :direction="direction" :show-close="true" size="80%">
@@ -33,7 +33,7 @@
33 33
             <button type="button" class="btn-link" @click="() => filterCase(cas)" style="color:black;font-size: 24px">{{cas.typeName}}</button>
34 34
           </el-col>
35 35
           <el-col :span="24">
36
-            <button type="button" class="btn btn-default" @click="drawer = flase" style="color:black;font-size: 24px;padding:auto 40px; margin-top:30px">返回</button>
36
+            <button type="button" class="btn btn-default" @click="drawer = flase" style="color:black;font-size: 24px;padding-left: 40px;padding-right: 40px; margin-top:30px">返回</button>
37 37
           </el-col>
38 38
         </el-row>
39 39
       </div>
@@ -85,7 +85,7 @@ export default {
85 85
       drawer: false,
86 86
       navdrawer: false,
87 87
       direction: 'rtl',
88
-
88
+      currentTypeName: '全部案例',
89 89
     }
90 90
   },
91 91
 
@@ -151,7 +151,11 @@ export default {
151 151
     },
152 152
 
153 153
     filterCase (caseType) {
154
+      this.currentTypeName = caseType ? caseType.typeName : '全部案例'
155
+
154 156
       this.getCaseList({ pageNum: 1, caseType: caseType ? caseType.id : '' })
157
+      this.drawer = false;
158
+
155 159
     },
156 160
   }
157 161
 
@@ -226,6 +230,8 @@ color: #e03723;
226 230
   }
227 231
   .dyn-main {
228 232
     margin-top: 20px;
233
+    padding-left: 15px;
234
+    padding-right: 15px;
229 235
   }
230 236
 }
231 237
 .row {

+ 7
- 2
src/views/Contact.vue Näytä tiedosto

@@ -9,7 +9,7 @@
9 9
       <div class="contact-main">
10 10
         <h1 style="margin-bottom:70px">联系我们</h1>
11 11
 
12
-        <div class="row" style="margin:0">
12
+        <div class="row app" style="margin:0" >
13 13
           <div class="col-md-6 col-xs-6 st1" style="border-right: 1px solid #aaa;">
14 14
             <img class="img1" src="../assets/image/contact/weixin.jpg" />
15 15
             <div>
@@ -37,7 +37,7 @@
37 37
           <strong>南京福予文化传媒有限公司</strong>
38 38
         </p>
39 39
 
40
-        <p class="p2">地址:南京市江宁区秣周东路12号悠谷三号楼(砂之船奥特莱斯旁)</p>
40
+        <p class="p2 app">地址:南京市江宁区秣周东路12号悠谷三号楼(砂之船奥特莱斯旁)</p>
41 41
       </div>
42 42
     </div>
43 43
   </div>
@@ -55,6 +55,11 @@ font-size: 1.2rem;padding-top: 14px;
55 55
   }
56 56
 }
57 57
 @media (min-width: 992px){
58
+
59
+
60
+  h1{
61
+    font-weight: bold;
62
+  }
58 63
   .address{
59 64
     .p1{
60 65
       padding-top: 70px;font-size: 3.6rem

+ 23
- 7
src/views/Details.vue Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="details">
3 3
     <div class="head">
4
-      <img :src="cover.coverImg" width="100%" />
4
+      <img :src="current.caseCoverImg" width="100%" />
5 5
     </div>
6 6
 
7 7
     <div class="contanier st">
@@ -58,7 +58,12 @@
58 58
           <router-link :to="{name: 'details', params: { id: item.id }}">
59 59
             <div class="st4" :style="{background: `url(${item.caseCoverImg})`}">
60 60
               <div class="casetitle">
61
-                <p>{{item.caseTitle}}</p>
61
+                <div style="width: 100%">
62
+                  <hr>
63
+                  <p>
64
+                    {{item.caseTitle}}
65
+                  </p>
66
+                </div>
62 67
               </div>
63 68
             </div>
64 69
           </router-link>
@@ -100,8 +105,10 @@ export default {
100 105
   computed: {
101 106
     shareConfig () {
102 107
       return {
108
+        
103 109
         url: window.location.href,
104 110
         title: this.current.caseTitle,
111
+        image: this.current.caseCoverImg, // 图片, 默认取网页中第一个img标签
105 112
         description: this.current.caseSummary,
106 113
       }
107 114
     },
@@ -145,7 +152,6 @@ export default {
145 152
 // socialShare('.social-share-cs', $config);
146 153
 
147 154
 
148
-
149 155
     this.getDetail(this.$route.params.id)
150 156
   },
151 157
   beforeRouteUpdate (to, from, next) {
@@ -192,6 +198,16 @@ export default {
192 198
 </script>
193 199
 
194 200
 <style lang="less" scoped>
201
+
202
+
203
+.casetitle {
204
+  hr {
205
+    margin-bottom: 20px;
206
+    width: 50px;
207
+    border: 2px solid red;
208
+  }
209
+}
210
+
195 211
 @media (min-width: 992px) {
196 212
   .pull-left {
197 213
     font-size: 3.6rem;
@@ -212,6 +228,7 @@ export default {
212 228
   .st {
213 229
     h1 {
214 230
       font-size: 4.8rem;
231
+      font-weight: bold;
215 232
     }
216 233
     p {
217 234
       font-size: 2.4rem;
@@ -356,9 +373,7 @@ display:inline-block;line-height:42px
356 373
 
357 374
     margin: 0;
358 375
   }
359
-  .st4 .casetitle {
360
-    display: none;
361
-  }
376
+ 
362 377
 }
363 378
 </style>
364 379
 
@@ -431,7 +446,8 @@ display:inline-block;line-height:42px
431 446
 
432 447
     text-align: center;
433 448
   }
434
-  .st4:hover .casetitle p {
449
+  .st4 .casetitle p {
450
+    font-size: 2.4rem;
435 451
     text-align: center;
436 452
     display: block;
437 453
     color: #fff;

+ 16
- 7
src/views/Dynamic.vue Näytä tiedosto

@@ -7,8 +7,8 @@
7 7
 
8 8
     <div class="border-bottom comtype">
9 9
       <div>
10
-        <button type="button" class="btn1 btn-link" @click="() => filterCase()" style="color:black;font-size: 24px;padding: 25px">全部动态</button>
11
-        <button v-for="cas in casetype" :key="cas.id" @click="() => filterCase(cas)" type="button" class="btn1 btn-link" style="color:black;font-size: 24px;padding: 25px">{{cas.typeName}}</button>
10
+        <button type="button" class="btn1 btn-link app" @click="() => filterCase()" style="color:black;font-size: 24px;padding: 25px">全部动态</button>
11
+        <button v-for="cas in casetype" :key="cas.id" @click="() => filterCase(cas)" type="button" class="btn1 btn-link app" style="color:black;font-size: 24px;padding: 25px">{{cas.typeName}}</button>
12 12
       </div>
13 13
     </div>
14 14
 
@@ -19,7 +19,7 @@
19 19
         </div>
20 20
       </div>
21 21
       <div class="col-xs-6">
22
-        <el-button class="btn-link mobbtn" @click="drawer = true" type="button" style="margin-left: 16px;">全部动态</el-button>
22
+        <el-button class="btn-link mobbtn" @click="drawer = true" type="button" style="margin-left: 16px;">{{currentTypeName}}</el-button>
23 23
       </div>
24 24
     </div>
25 25
     <el-drawer :visible.sync="drawer" :direction="direction" :show-close="true" size="80%">
@@ -32,7 +32,7 @@
32 32
             <button type="button" class="btn-link" @click="() => filterCase(cas)" style="color:black;font-size: 24px">{{cas.typeName}}</button>
33 33
           </el-col>
34 34
           <el-col :span="24">
35
-            <button type="button" class="btn btn-default" @click="drawer = flase" style="color:black;font-size: 24px;padding:auto 40px; margin-top:30px">返回</button>
35
+            <button type="button" class="btn btn-default" @click="drawer = flase" style="color:black;font-size: 24px;padding-left: 40px;padding-right: 40px; margin-top:30px">返回</button>
36 36
           </el-col>
37 37
         </el-row>
38 38
       </div>
@@ -81,6 +81,8 @@ export default {
81 81
       drawer: false,
82 82
       navdrawer: false,
83 83
       direction: 'rtl',
84
+
85
+      currentTypeName: '全部动态',
84 86
     }
85 87
   },
86 88
   components: {
@@ -153,7 +155,11 @@ export default {
153 155
     },
154 156
 
155 157
     filterCase (caseType) {
156
-      this.getCaseList({ pageNum: 1, caseType: caseType ? caseType.id : '' })
158
+this.currentTypeName = caseType ? caseType.typeName : '全部动态'
159
+
160
+      
161
+      this.getCaseList({ pageNum: 1, caseType: caseType ? caseType.id : '' });
162
+      this.drawer = false;
157 163
     },
158 164
   }
159 165
 
@@ -219,7 +225,7 @@ color: #e03723;
219 225
 }
220 226
 
221 227
 @media (max-width: 992px) {
222
-  .case{
228
+  .dynamic{
223 229
     margin-top: 58px;
224 230
   }
225 231
   .comtype {
@@ -228,6 +234,9 @@ color: #e03723;
228 234
   }
229 235
   .dyn-main {
230 236
     margin-top: 20px;
237
+    
238
+    padding-left: 15px;
239
+    padding-right: 15px;
231 240
   }
232 241
 }
233 242
 .row {
@@ -246,7 +255,7 @@ color: #e03723;
246 255
     /* flex-flow: <flex-direction> <flex-wrap>; */ /*简写*/
247 256
     justify-content: center;
248 257
   }
249
-  .case {
258
+  .dynamic {
250 259
   margin-top: 116px;
251 260
   margin-bottom: -116px;
252 261
   padding-bottom: 116px; 

+ 135
- 25
src/views/Home.vue Näytä tiedosto

@@ -1,13 +1,11 @@
1 1
 <template>
2 2
   <div class="home">
3
-    <nav class="navbar navbar-default navbar-fixed-top" :class="{ 'scroll': scrolled }">
3
+    <nav class="navbar navbar-default navbar-fixed-top app" :class="{ 'scroll': scrolled}">
4 4
       <div class="container-fluid con">
5 5
         <div class="navbar-header">
6 6
           <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
7 7
             <span class="sr-only">Toggle navigation</span>
8
-            <span class="icon-bar"></span>
9
-            <span class="icon-bar"></span>
10
-            <span class="icon-bar"></span>
8
+            
11 9
           </button>
12 10
           <a class="navbar-brand" href="/">
13 11
             <div alt="Brand" class="logo"></div>
@@ -48,7 +46,7 @@
48 46
     <div class="contanier" style="margin-top: 110px">
49 47
       <div class="row">
50 48
         <div class="col-md-12" style="padding:0;width: 100%;">
51
-          <h2>多元化服务 一站式解决客户需求</h2>
49
+          <h2>多元化服务&nbsp;&nbsp; 一站式解决客户需求</h2>
52 50
         </div>
53 51
       </div>
54 52
 
@@ -126,7 +124,12 @@
126 124
           <router-link :to="{ name: 'details', params: { id: item.id }}">
127 125
             <div class="st4" :style="{background: `url(${item.caseCoverImg})`}">
128 126
               <div class="casetitle">
129
-                <p>{{item.caseTitle}}</p>
127
+                <div style="width: 100%">
128
+                  <hr>
129
+                  <p>
130
+                    {{item.caseTitle}}
131
+                  </p>
132
+                </div>
130 133
               </div>
131 134
             </div>
132 135
           </router-link>
@@ -162,8 +165,8 @@
162 165
           <div class="row">
163 166
             <div class="col-xs-6 col-md-6 home-news-hover home-news" v-for="(item,index) in dynamiclist" :key="index">
164 167
               <router-link :to="{ name: 'details', params: { id: item.id }}" class="routelink">
165
-                <div :style="{background: `url(${item.caseCoverImg})`}" class="home-dynamic"></div>
166
-                <h3 class="text-left" style>{{item.caseTitle}}</h3>
168
+                <div :style="{background: `url(${item.caseCoverImg})`}" class="home-dynamic"><h3 class="text-left" style>{{item.caseTitle}}</h3></div>
169
+                
167 170
               </router-link>
168 171
             </div>
169 172
             <!-- item.caseCoverImg -->
@@ -171,7 +174,7 @@
171 174
         </div>
172 175
       </div>
173 176
     </div>
174
-    <router-link class="btn btn-default btn-lg" role="button" :to="{ name: 'dynamic' }">更多案例</router-link>
177
+    <router-link class="btn btn-default btn-lg" role="button" :to="{ name: 'dynamic' }">更多动态</router-link>
175 178
   </div>
176 179
 </template>
177 180
 
@@ -192,6 +195,7 @@ export default {
192 195
   data () {
193 196
     return {
194 197
       scrolled: false,
198
+      // rescrolled: false,
195 199
       isMobilePhone,
196 200
       show: true,
197 201
       data: '',
@@ -213,8 +217,16 @@ export default {
213 217
   mounted () {
214 218
     window.addEventListener('scroll', () => {
215 219
       this.scrolled = (document.documentElement.scrollTop || document.body.scrollTop) > 300
220
+      
216 221
     })
217 222
 
223
+    // window.addEventListener('scrolll', () => {
224
+    //   this.rescrolled = (document.documentElement.scrollTop || document.body.scrollTop) < 300
225
+      
226
+    // })
227
+
228
+    
229
+
218 230
 
219 231
   },
220 232
  
@@ -248,10 +260,10 @@ export default {
248 260
     request({
249 261
       ...apis.case.list,
250 262
       urlData: { type: 'case' },
251
-      params: { topping: 1 }
263
+      params: { pageSize: 100 }
252 264
     }).then(con => {
253 265
       // console.log(con,"124")
254
-      this.caselist = con.records;
266
+      this.caselist = (con.records || []).filter(x => x.topping === 1);
255 267
       // window.console.log(this.caselist, "543");
256 268
     })
257 269
 
@@ -269,13 +281,37 @@ export default {
269 281
 </script>
270 282
 
271 283
 <style scoped>
284
+@media (min-width: 768px) and (max-width: 992px) {
272 285
 
286
+  .home {
287
+  margin-top: 116px;
288
+  margin-bottom: -116px;
289
+  padding-bottom: 116px; 
290
+  
291
+}
292
+  .con {
293
+    padding-left: 5vw !important;
294
+    padding-right: 5vw !important;
295
+  }
296
+  .logo{
297
+    margin-top: 0 !important;
298
+  }
299
+  .nav li {margin-left: 0 !important;}
300
+  .a {
301
+    font-size: 2.4rem !important;
302
+    margin-top: 0.5rem !important;
303
+    color: #000;
304
+    padding-left: 0px !important;
305
+    padding-right: 0px !important;
306
+  }
307
+}
273 308
 
274 309
 @media (max-width: 992px) {
275 310
   .business-text {
276 311
     display: none;
277 312
   }
278 313
   h2 {
314
+    font-family: Microsoft Yahei Light;
279 315
     margin-top: 20px;
280 316
     font-size: 20px;
281 317
     font-weight: bold;
@@ -295,16 +331,17 @@ export default {
295 331
     padding-bottom: 10px !important;
296 332
   }
297 333
   h4 {
334
+    font-family: Microsoft Yahei Light;
298 335
     font-size: 1.6rem;
299 336
     padding: 5px;
300
-    background-color: red;
337
+    background-color: #e03723;
301 338
     color: #fff;
302 339
     margin: 0;
303 340
     height: 30px;
304 341
     letter-spacing: 6px;
305 342
   }
306 343
   .st {
307
-    margin-bottom: 30px !important;
344
+    margin-bottom: 20px !important;
308 345
     padding: 0 1% !important;
309 346
   }
310 347
   .sw {
@@ -325,7 +362,7 @@ export default {
325 362
   .top-case {
326 363
     margin-top: 40px;
327 364
     padding: 0;
328
-
365
+    padding-bottom: 30px !important;
329 366
     border: none;
330 367
   }
331 368
   .aarow_box {
@@ -341,19 +378,19 @@ export default {
341 378
   }
342 379
 
343 380
   p {
344
-    padding: 0 0 30px 0;
381
+    padding: 0 0 20px 0;
345 382
     font-size: 1.2rem;
346 383
     color: #595757;
347 384
   }
348 385
   .btn {
349 386
     font-size: 1.2rem;
350
-    margin-top: 30px;
387
+    margin-top: 0px;
351 388
     width: 140px;
352 389
 
353 390
     border-radius: 0px;
354 391
     color: #000;
355 392
     background-color: #fff;
356
-    border: 2px solid #aaaaaa;
393
+    border: 1px solid #aaaaaa;
357 394
   }
358 395
   h1 {
359 396
     margin-top: 30px;
@@ -361,6 +398,7 @@ export default {
361 398
     font-size: 1.8rem;
362 399
     font-weight: bold;
363 400
     letter-spacing: 0.3rem;
401
+    color: #000;
364 402
   }
365 403
   .dynbtn {
366 404
     margin-top: 0px !important;
@@ -369,8 +407,11 @@ export default {
369 407
 
370 408
 @media (min-width: 992px) {
371 409
   h1 {
410
+    font-size: 4.8rem;
372 411
     margin: 0;
373 412
     padding-top: 85px;
413
+    padding-bottom: 10px;
414
+    color: #000;
374 415
   }
375 416
   .btn {
376 417
     font-size: 24px;
@@ -379,20 +420,23 @@ export default {
379 420
     border-radius: 0px;
380 421
     color: #000;
381 422
     background-color: #fff;
382
-    border: 2px solid #aaaaaa;
423
+    border: 1px solid #aaaaaa;
383 424
   }
384 425
   .btn:hover {
385 426
     color: #e03723;
386
-    border: 2px solid #e03723;
427
+    border: 1px solid #e03723;
387 428
   }
388 429
 
389 430
   p {
390
-    padding: 28px 0 50px 0;
431
+    padding: 18px 5px 0 5px;
391 432
     font-size: 2.4rem;
392 433
     color: #595757;
393 434
   }
394 435
   h2 {
436
+    font-family: Microsoft Yahei Light;
437
+    font-size: 4.8rem;
395 438
     margin-top: 86px;
439
+    color: #000;
396 440
   }
397 441
   h3 {
398 442
     font-size: 2.4rem;
@@ -404,12 +448,14 @@ export default {
404 448
     margin: 0;
405 449
   }
406 450
   h4 {
451
+    font-family: Microsoft Yahei Light;
407 452
     font-size: 2.4rem;
408 453
     padding: 10px;
409
-    background-color: red;
454
+    background-color: #e03723;
410 455
     color: #fff;
411 456
     margin: 0;
412 457
     height: 43px;
458
+    letter-spacing: 3px;
413 459
   }
414 460
   .sw {
415 461
     padding: 33px;
@@ -421,6 +467,7 @@ export default {
421 467
     margin: 0;
422 468
   }
423 469
   .st .sw p {
470
+    line-height: 1.6em;
424 471
     font-size: 2.2rem;
425 472
     padding-bottom: 0;
426 473
   }
@@ -531,7 +578,7 @@ export default {
531 578
 
532 579
   text-align: center;
533 580
 }
534
-.st4:hover .casetitle p {
581
+.st4 .casetitle p {
535 582
   text-align: center;
536 583
   display: block;
537 584
   color: #fff;
@@ -543,13 +590,37 @@ export default {
543 590
 }
544 591
 
545 592
 .home-dynamic {
546
-  bottom: 0;
593
+  /* position: absolute;
547 594
   width: 100%;
595
+  height: 100%;
596
+  float: left;
597
+  padding: 0 auto;
598
+  background: rgba(0, 0, 0, 0.7);
599
+  align-items: center;
600
+  display: -webkit-flex;
601
+  display: flex;
602
+  bottom: 0;
603
+  width: 100%; 
604
+      position: absolute;
605
+    bottom: 0;
606
+  
607
+    width: calc(100% - 12px);
608
+    */
548 609
 
549 610
   height: 0;
550
-  padding-bottom: 48.5%;
611
+  padding-bottom: 60%;
551 612
   background-size: 100% 100% !important;
552 613
 }
614
+h3{
615
+      position: absolute;
616
+   
617
+    width: calc(100% - 12px);
618
+ bottom: 0;
619
+  color: #fff;
620
+ 
621
+  background: rgba(0, 0, 0, 0.8);
622
+}
623
+
553 624
 </style>
554 625
 
555 626
 
@@ -557,6 +628,18 @@ export default {
557 628
 .routelink{
558 629
   text-decoration: none;
559 630
 }
631
+
632
+
633
+
634
+.casetitle {
635
+  hr {
636
+    margin-bottom: 0px;
637
+    width: 50px;
638
+    border: 2px solid red;
639
+  }
640
+}
641
+
642
+
560 643
 @media (max-width: 992px) {
561 644
   .navbar {
562 645
     display: none;
@@ -596,6 +679,9 @@ export default {
596 679
         a {
597 680
           color: #fff;
598 681
 
682
+     padding-left: 5px;
683
+    padding-right: 5px;
684
+    margin: 0 10px;
599 685
           &:hover {
600 686
             border-bottom: 3px solid #fff;
601 687
           }
@@ -618,6 +704,10 @@ export default {
618 704
           a {
619 705
             color: #000;
620 706
 
707
+    padding-left: 5px;
708
+    padding-right: 5px;
709
+    margin: 0 10px;
710
+
621 711
             &:hover {
622 712
               border-bottom: 3px solid #000;
623 713
             }
@@ -629,6 +719,26 @@ export default {
629 719
         background: url("../assets/logo1.png");
630 720
       }
631 721
     }
722
+
723
+    //  &.scrolll {
724
+    //   transition: all 0.5s;
725
+    //   background-color: transparent;
726
+    //   .nav {
727
+    //     li {
728
+    //       a {
729
+    //         color: #fff;
730
+
731
+    //         &:hover {
732
+    //           border-bottom: 3px solid #fff;
733
+    //         }
734
+    //       }
735
+    //     }
736
+    //   }
737
+
738
+    //   .logo {
739
+    //     background: url("../assets/logo.png");
740
+    //   }
741
+    // }
632 742
   }
633 743
 }
634
-</style>
744
+</style>

+ 2
- 6
vue.config.js Näytä tiedosto

@@ -4,12 +4,8 @@ module.exports = {
4 4
       '/api': {
5 5
         target: 'http://localhost:8080',
6 6
         ws: true,
7
-        changeOrigin: true
8
-      },
9
-      '/pc': {
10
-        target: 'http://localhost:8080',
11
-        ws: true,
12
-        changeOrigin: true
7
+        changeOrigin: true,
8
+        pathRewrite: {'^/api': ''}
13 9
       }
14 10
     }
15 11
   }