Commit a87097a9ca79cace922dea836397c150df239d7d
1 parent
b157e7f3
首页js修改
Showing
2 changed files
with
24 additions
and
3 deletions
pages/index/index/index.js
@@ -42,6 +42,10 @@ Page({ | @@ -42,6 +42,10 @@ Page({ | ||
42 | isTemplate:0, | 42 | isTemplate:0, |
43 | template_arr:null, | 43 | template_arr:null, |
44 | bgcolor_t:'', | 44 | bgcolor_t:'', |
45 | + | ||
46 | + banner_index:0, | ||
47 | + flash_index:0, | ||
48 | + pt_index:0, | ||
45 | }, | 49 | }, |
46 | onLoad: function () { | 50 | onLoad: function () { |
47 | var th = this; | 51 | var th = this; |
@@ -298,13 +302,16 @@ Page({ | @@ -298,13 +302,16 @@ Page({ | ||
298 | scrollTop: e.scrollTop | 302 | scrollTop: e.scrollTop |
299 | }); | 303 | }); |
300 | var t = getCurrentPages(); | 304 | var t = getCurrentPages(); |
301 | - "pages/index/index/index" == t[t.length - 1].route && (e.scrollTop > 10 ? wx.setNavigationBarColor({ | 305 | + "pages/index/index/index" == t[t.length - 1].route; |
306 | + /*-- | ||
307 | + && (e.scrollTop > 10 ? wx.setNavigationBarColor({ | ||
302 | frontColor: "#ffffff", | 308 | frontColor: "#ffffff", |
303 | backgroundColor: "#f95959" | 309 | backgroundColor: "#f95959" |
304 | }) : wx.setNavigationBarColor({ | 310 | }) : wx.setNavigationBarColor({ |
305 | frontColor: "#000000", | 311 | frontColor: "#000000", |
306 | backgroundColor: "#eeeeee" | 312 | backgroundColor: "#eeeeee" |
307 | - })); | 313 | + }));--*/ |
314 | + | ||
308 | }, | 315 | }, |
309 | jumpSearch: function () { | 316 | jumpSearch: function () { |
310 | wx.navigateTo({ | 317 | wx.navigateTo({ |
@@ -449,5 +456,18 @@ Page({ | @@ -449,5 +456,18 @@ Page({ | ||
449 | setTimeout(th.countDown2, 1000); | 456 | setTimeout(th.countDown2, 1000); |
450 | }, | 457 | }, |
451 | 458 | ||
459 | + bannerSwiperChange:function (e) { | ||
460 | + var index=e.detail.current; | ||
461 | + this.setData({banner_index:index}); | ||
462 | + }, | ||
463 | + flashSwiperChange:function (e) { | ||
464 | + var index=e.detail.current; | ||
465 | + this.setData({flash_index:index}); | ||
466 | + }, | ||
467 | + ptSwiperChange:function (e) { | ||
468 | + var index=e.detail.current; | ||
469 | + this.setData({pt_index:index}); | ||
470 | + } | ||
471 | + | ||
452 | 472 | ||
453 | }); | 473 | }); |
454 | \ No newline at end of file | 474 | \ No newline at end of file |
pages/index/index/index.json
1 | { | 1 | { |
2 | - "navigationBarBackgroundColor": "#eeeeee", | 2 | + "navigationBarBackgroundColor": "#ff7295", |
3 | + "navigationBarTextStyle": "white", | ||
3 | "usingComponents": { | 4 | "usingComponents": { |
4 | "nav": "/components/diy_nav/diy_nav", | 5 | "nav": "/components/diy_nav/diy_nav", |
5 | "advertising":"/components/diy_advertising/diy_advertising", | 6 | "advertising":"/components/diy_advertising/diy_advertising", |