Jelajahi Sumber

课程点击

Rorschach 6 tahun lalu
induk
melakukan
70c74acd1b
3 mengubah file dengan 15 tambahan dan 6 penghapusan
  1. 7 1
      component/group/group.wxss
  2. 7 4
      pages/main/class/class.js
  3. 1 1
      pages/main/class/class.wxml

+ 7 - 1
component/group/group.wxss

@@ -189,7 +189,13 @@ scroll-view {
     flex-wrap: wrap;
     padding: 0 62rpx;
 }
-
+.group-list .group-item{
+    position: relative;
+    display: flex;
+    margin-right:0;
+    justify-content: space-between;
+    /* flex-direction: column; */
+}
 .group-content-img {
     width: 214rpx;
     height: 290rpx;

+ 7 - 4
pages/main/class/class.js

@@ -110,13 +110,16 @@ Page({
     }
 },
   goToWorks: function (e) {
-    this.videoCtx = wx.createVideoContext('myVideo', this);
-    this.videoCtx.stop();
+    console.log(this.data.works)
+    // this.videoCtx = wx.createVideoContext('myVideo', this);
+    if(this.videoCtx){
+      this.videoCtx.stop(); 
+    }
     console.log(e);
-    let readId = e.target.dataset.uid;
+    let readId = e.target.dataset.id;
     let title = this.data.title;
     wx.navigateTo({
-      url: `../../social/works/works?id=${readId}&tilte=${title}`
+      url: `../../social/works/works?id=${readId}&title=${title}`
     })
   },
   collect: function (e) {

+ 1 - 1
pages/main/class/class.wxml

@@ -5,7 +5,7 @@
             <image class="peoplesIcon" src="../../../static/image/peoples.png" />
             <view class="title">共有{{total}}人完成了录音</view>
         </view>
-        <view class="workCard" wx:for="{{works}}" wx:key="{{index}}" bindtap="goToWorks" data-uid="{{item.uid}}">
+        <view class="workCard" wx:for="{{works}}" wx:key="{{index}}" bindtap="goToWorks" data-id="{{item.id}}">
             <image class="avatar" src="{{item.avatar}}" />
             <view class="name">
                 <text class="nickName">{{item.nickName}}</text>