wq 5 years ago
parent
commit
ba6f81e492
2 changed files with 6 additions and 5 deletions
  1. 5 4
      pages/home/index.js
  2. 1 1
      pages/home/index.wxml

+ 5 - 4
pages/home/index.js

@@ -64,11 +64,12 @@ Page({
   },
 
   // 热门产品跳转
-
-  productListDetail: function (e) {
-      console.log('productListDetail',e.currentTarget.id)
+  toshow(e) {
+    var that = this;
+    var claimid = e.currentTarget.dataset.claimid;
+    console.log(claimid)
     // wx.navigateTo({
-    //     url: '/pages/policyDetail/index?id=' + e.currentTarget.id // 希望跳转过去的页面
+    //   url: '../minenotic/minenotic?noticeid=' + noticeid,
     // })
   },
 

+ 1 - 1
pages/home/index.wxml

@@ -23,7 +23,7 @@
 			<view class="mainTwo">
 				<span class="title">热门产品</span>
 				<view class="list" wx:key="unique" wx:for="{{productList}}" wx:for-item="item">
-					<view bindtap="productListDetail" id="{{list._id}}">
+					<view catchtap="toshow" data-claimid="{{item._id}}">
 						<image src="{{item.pic}}"></image>
 						<text>{{item.title}}</text>
 					</view>