梁沛聪 6 anni fa
parent
commit
bb4675d655
2 ha cambiato i file con 13 aggiunte e 4 eliminazioni
  1. 11
    3
      miniapp/app/pages/home/index.js
  2. 2
    1
      miniapp/app/pages/home/index.wxml

+ 11
- 3
miniapp/app/pages/home/index.js Vedi File

42
     },
42
     },
43
     toDetail(e) {
43
     toDetail(e) {
44
         const {
44
         const {
45
-            id
45
+            id,
46
+            name
46
         } = e.target.dataset;
47
         } = e.target.dataset;
47
         if (id) {
48
         if (id) {
49
+            // $.router.goto({
50
+            //     path: `/pages/detail/index`,
51
+            //     query: {
52
+            //         id
53
+            //     }
54
+            // });
48
             $.router.goto({
55
             $.router.goto({
49
-                path: `/pages/detail/index`,
56
+                path: `/pages/introduce/index`,
50
                 query: {
57
                 query: {
51
-                    id
58
+                    id,
59
+                    name
52
                 }
60
                 }
53
             });
61
             });
54
         }
62
         }

+ 2
- 1
miniapp/app/pages/home/index.wxml Vedi File

5
             interval="5000" duration="500">
5
             interval="5000" duration="500">
6
             <block wx:for="{{top}}">
6
             <block wx:for="{{top}}">
7
                 <swiper-item>
7
                 <swiper-item>
8
-                    <image src="{{item.photo}}" class="slide-image" data-id="{{item.id}}" bindtap="toDetail" />
8
+                    <image src="{{item.photo}}" class="slide-image" data-name="{{item.server}}" data-id="{{item.id}}"
9
+                        bindtap="toDetail" />
9
                 </swiper-item>
10
                 </swiper-item>
10
             </block>
11
             </block>
11
         </swiper>
12
         </swiper>

Loading…
Annulla
Salva