Browse Source

我的课程进入详情页

孙志雷 6 years ago
parent
commit
24aa6ea7c1

+ 1 - 1
pages/groupPage/group-details/group-details.js

@@ -211,7 +211,6 @@ Page({
           })
         }
       }else {
-        debugger;
         setTimeout(() => {
           wx.navigateTo({
             url: `/pages/groupPage/collage-details/collage-details?orderId=${detailId}`
@@ -244,6 +243,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    debugger
     wx.setNavigationBarTitle({
       title: '拼团详情'
     })

+ 9 - 1
pages/user/mycourse/mycourse.js

@@ -33,7 +33,15 @@ Page({
       // }
     ]
   },
-
+  // 进入课本
+  toCourse: function(e) {
+    let productId = e.currentTarget.dataset.productid;
+    let productTitle = e.currentTarget.dataset.producttitle;
+    debugger
+    wx.navigateTo({
+      url: `../../groupPage/grade-details/grade-details?productId=${productId}&title=${productTitle}`
+    });
+  },
   /**
    * 生命周期函数--监听页面加载
    */

+ 1 - 1
pages/user/mycourse/mycourse.wxml

@@ -1,7 +1,7 @@
 <view class='my-course'>
   <block wx:for="{{ bookList }}" wx:key="{{ index }}">
     <view class="book-item">
-      <view class='book-box'>
+      <view class='book-box' bindtap='toCourse' data-productId='{{ item.productId }}' data-productTitle='{{ item.productTitle }}'>
         <image class="item-img" src="{{ item.iconImg }}"></image>
       </view>
       <view class='item-title'>{{ item.groupTitle }}</view>