sun2511 преди 2 години
родител
ревизия
3cc7f72524

+ 2 - 4
component/video-swiper/index.wxss

@@ -27,7 +27,7 @@
     width: 100%;
     background: #ffffff;
     margin-bottom: 20rpx;
-    padding-bottom: 20rpx;
+    padding-bottom: 10rpx;
     overflow: hidden;
     position: relative;
 }
@@ -321,13 +321,11 @@
 
 .swiper_container .swiper_item .btn_wrapper {
     width: 100%;
-    height: 111rpx;
+    height: 98rpx;
     display: flex;
     align-items: center;
     justify-content: center;
-    margin-top: 30rpx;
     margin-bottom: 10rpx;
-    padding-bottom: 20rpx;
     box-sizing: border-box;
 }
 

+ 1 - 2
component/videoPreview/index.wxml

@@ -42,8 +42,7 @@
         </video>
     </view>
     <view class="workFooter">
-        <!-- <view class="mange" wx:if="{{videoInfo.userRead.status!='CHECK'}}"> -->
-        <view class="mange">
+        <view class="mange" wx:if="{{videoInfo.userRead.status!='CHECK'}}">
             <view class="mangeL" bindtap="collect">
                 <view class="mangeL-box">
                     <image src="{{videoInfo.isFavorites ? '/static/index/star_colored.png' : '/static/index/star.png'}}" mode="" class="icon" />

+ 1 - 1
pages/index/index.js

@@ -858,7 +858,7 @@ Page({
         if (res.from === 'button') {
             return {
                 title: '请欣赏我的课文朗读作品,点赞+评论。',
-                path: `/pages/index/index?readId=${this.data.shareId}&activity=${this.data.ifTapActivity}`,
+                path: `/pages/index/index?readId=${this.data.shareId}&activity=${this.data.ifTapActivity}&uid=${wx.getStorageSync('uid')}`,
                 imageUrl: this.data.shareImg
             }
         } else {

+ 1 - 1
pages/my/index.wxml

@@ -21,7 +21,7 @@
         <view class="userRight">
             <view class="uRtop" bindtap="jump" data-url="/pages/user/myEdit/myEdit">
                 <view class="uRtopleft">
-                    <view class="nickName textOver">昵称:{{userInfo.user.nickName }}</view>
+                    <view class="nickName textOver">昵称:{{userInfo.user.nickName||userInfo.user.eid }}</view>
                     <view class="gradeText">年级:{{filters.gradeFilter(userInfo.user.grade)}}</view>
                 </view>
                 <view class="uRtopRight">

+ 1 - 1
pages/mycollection/mycollection.js

@@ -221,7 +221,7 @@ Page({
         if (res.from === 'button') {
             return {
                 title: '请欣赏我的课文朗读作品,点赞+评论。',
-                path: `/pages/index/index?readId=${this.data.shareId}&activity=${this.data.ifTapActivity}`,
+                path: `/pages/index/index?readId=${this.data.shareId}&activity=${this.data.ifTapActivity}&uid=${wx.getStorageSync('uid')}`,
                 imageUrl: this.data.shareImg
 
             }

+ 90 - 90
pages/myconcern/myconcern.js

@@ -1,108 +1,108 @@
 import httpRequestApi from '../../utils/APIClient';
 Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-      fullScreenBtn: false,
-      playBtn: false,
-      gesture: true,
-      fanList:[],
-      imageShow: false,
-      line1: '您暂时没有关注过其他人哦',
-      line2: '快去关注其他人吧',
-      statusbarobj: {
-        isshowbtn: false, //是否显示按钮
-        title: "小学语文朗读配音", //标题
-      },
-  },
-  toUserDetails: function(e){
-    let uid = e.currentTarget.dataset.uid;
-    console.log(uid);
-    wx.navigateTo({
-      url: `../myworks/myworks?uid=${uid}`
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (option) {
-    console.log(option.title);
-    if (option.title) {
-      wx.setNavigationBarTitle({
-        title: option.title//页面标题为路由参数
-      });
-      this.setData({
-        title: option.title
-      });
-    }
-    httpRequestApi.myFans().success(res => {
-      this.setData({
-        fanList: res.data.data.list
-      },() => {
-        console.log(this.data.fanList);
-      });
-    });
-  },
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        fullScreenBtn: false,
+        playBtn: false,
+        gesture: true,
+        fanList: [],
+        imageShow: false,
+        line1: '您暂时没有关注过其他人哦',
+        line2: '快去关注其他人吧',
+        statusbarobj: {
+            isshowbtn: false, //是否显示按钮
+            title: "小学语文朗读配音", //标题
+        },
+    },
+    toUserDetails: function(e) {
+        let uid = e.currentTarget.dataset.uid;
+        console.log(uid);
+        wx.navigateTo({
+            url: `../myworks/myworks?uid=${uid}`
+        });
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function(option) {
+        console.log(option.title);
+        if (option.title) {
+            wx.setNavigationBarTitle({
+                title: option.title //页面标题为路由参数
+            });
+            this.setData({
+                title: option.title
+            });
+        }
+        httpRequestApi.myFans().success(res => {
+            this.setData({
+                fanList: res.data.data.list
+            }, () => {
+                console.log(this.data.fanList);
+            });
+        });
+    },
 
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function() {
 
-  },
+    },
 
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function() {
 
-  },
+    },
 
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function() {
 
-  },
+    },
 
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function() {
 
-  },
+    },
 
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function() {
 
-  },
+    },
 
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function() {
 
-  },
+    },
 
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-    if (res.from === 'button') {
-      return {
-        title: '请欣赏我的课文朗读作品,点赞+评论。',
-        path: `/pages/index/index?readId=${this.data.shareId}`,
-        imageUrl: '../../static/index/share_icon.png'
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function() {
+        if (res.from === 'button') {
+            return {
+                title: '请欣赏我的课文朗读作品,点赞+评论。',
+                path: `/pages/index/index?readId=${this.data.shareId}&uid=${wx.getStorageSync('uid')}`,
+                imageUrl: '../../static/index/share_icon.png'
 
-      }
-    } else {
-      return {
-        title: '课文朗读,从未如此有趣。',
-        path: '/pages/index/index',
-      }
+            }
+        } else {
+            return {
+                title: '课文朗读,从未如此有趣。',
+                path: '/pages/index/index',
+            }
+        }
     }
-  }
 })

+ 0 - 1
pages/myconcern/myconcern.json

@@ -3,6 +3,5 @@
     "usingComponents": {
         "myPlacerholder": "/component/myPlacerholder/myPlacerholder",
         "StatusBar": "/component/statusBar/statusBar"
-
     }
 }

+ 23 - 23
pages/myconcern/myconcern.wxml

@@ -1,29 +1,29 @@
 <!-- <wxs src="../../commonWxs/format.wxs" module="format" /> -->
 <!-- <StatusBar receiveData="{{statusbarobj}}" grade="{{grade}}" bindgradeTap="gradeTap" /> -->
 <view class='my-concern'>
-  <view class="concern-center">
-    <view class='concern-info' wx:for="{{ fanList }}" wx:key="{{ index }}" bindtap='toUserDetails' data-uid='{{ item.user.uid }}' data-fanId='{{ item.fans.fanId }}'>
-      <view class='avatar-box'>
-        <image class='avatar-image' src="{{ item.user.avatar }}" />
-        <view class="user-profession">{{item.user.profession}}</view>
-      </view>
-      <view class="avatar-name">
-        <text class="nickName">{{ item.user.nickName }}</text>
-        <text class="time">{{ format.formatDate(item.fans.gmtCreated) }}</text>
-      </view>
-      <view class="avatar-follow" wx:if='{{ item.isEachOther }}'>
-        <view class='avatar-img'>
-          <image class='avatar-images' src="../../static/image/concernback.png" />
+    <view class="concern-center">
+        <view class='concern-info' wx:for="{{ fanList }}" wx:key="{{ index }}" bindtap='toUserDetails' data-uid='{{ item.user.uid }}' data-fanId='{{ item.fans.fanId }}'>
+            <view class='avatar-box'>
+                <image class='avatar-image' src="{{ item.user.avatar }}" />
+                <view class="user-profession">{{item.user.profession}}</view>
+            </view>
+            <view class="avatar-name">
+                <text class="nickName">{{ item.user.nickName ||item.user.eid}}</text>
+                <text class="time">{{ format.formatDate(item.fans.gmtCreated) }}</text>
+            </view>
+            <view class="avatar-follow" wx:if='{{ item.isEachOther }}'>
+                <view class='avatar-img'>
+                    <image class='avatar-images' src="../../static/image/concernback.png" />
+                </view>
+                <view class="follow-status">相互关注</view>
+            </view>
+            <view class="avatar-follow" wx:elif='{{ item.followBack === item.followBack || item.isEachOther }}'>
+                <view class='avatar-img'>
+                    <image class='avatar-images' src="../../static/image/concerned.png" />
+                </view>
+                <view class="follow-status">已关注</view>
+            </view>
         </view>
-        <view class="follow-status">相互关注</view>
-      </view>
-      <view class="avatar-follow" wx:elif='{{ item.followBack === item.followBack || item.isEachOther }}'>
-        <view class='avatar-img'>
-          <image class='avatar-images' src="../../static/image/concerned.png" />
-        </view>
-        <view class="follow-status">已关注</view>
-      </view>
     </view>
-  </view>
-  <!-- <myPlacerholder class="placerholder" imageShow="{{imageShow}}" line1="{{line1}}" line2="{{line2}}" wx:if="{{fanList.length <= 1}}" />         -->
+    <!-- <myPlacerholder class="placerholder" imageShow="{{imageShow}}" line1="{{line1}}" line2="{{line2}}" wx:if="{{fanList.length <= 1}}" />         -->
 </view>

+ 1 - 1
pages/myworks/myworks.js

@@ -271,7 +271,7 @@ Page({
         if (res.from === 'button') {
             return {
                 title: '请欣赏我的课文朗读作品,点赞+评论。',
-                path: `/pages/index/index?readId=${this.data.shareId}&activity=${this.data.ifTapActivity}`,
+                path: `/pages/index/index?readId=${this.data.shareId}&activity=${this.data.ifTapActivity}&uid=${wx.getStorageSync('uid')}`,
                 imageUrl: this.data.shareImg
 
             }

+ 1 - 3
pages/reading/reading.js

@@ -283,10 +283,8 @@ Page({
                 this.videoComplete();
                 if (this.data.btnFlag) {
                     httpRequestApi.userEvent('RERECORDING');
-
                 } else {
-                    httpRequestApi.userEvent('READING');
-
+                    httpRequestApi.userEvent('READING', this.data.exampleId);
                 }
                 // this.getMicAuth()
                 return;

+ 4 - 2
pages/user/myEdit/myEdit.js

@@ -98,9 +98,11 @@ Page({
         })
     },
     formSubmit: function(e) {
-        console.log(e.detail.value)
-        console.log(e)
         if (e.detail.value.nickname === '') {
+            wx.showToast({
+                title: '请填写昵称',
+                icon: "none"
+            })
             return false
         }
         // const uid = wx.getStorageSync('uid');

+ 2 - 2
pages/userWorks/index.js

@@ -98,7 +98,7 @@ Page({
                                                 success(res) {
                                                     resolve({
                                                         title: '请欣赏我的课文朗读作品,点赞+评论。',
-                                                        path: `/pages/index/index?readId=${video.userRead.id}`,
+                                                        path: `/pages/index/index?readId=${video.userRead.id}&uid=${wx.getStorageSync('uid')}`,
                                                         imageUrl: res.tempFilePath
                                                     })
                                                 },
@@ -158,7 +158,7 @@ Page({
         console.log(video);
         return {
             title: '请欣赏我的课文朗读作品,点赞+评论。',
-            path: `/pages/index/index?readId=${video.userRead.id}`,
+            path: `/pages/index/index?readId=${video.userRead.id}&uid=${wx.getStorageSync('uid')}`,
             imageUrl: video.userRead.coverImg,
             promise
         }

+ 3 - 1
pages/userWorks/index.json

@@ -3,6 +3,8 @@
         "videoPreview": "/component/videoPreview/index",
         "emptyBg": "/component/empty/index",
         "Comment": "/component/comment/comment"
+
     },
-    "enablePullDownRefresh": false
+    "enablePullDownRefresh": false,
+    "navigationBarTitleText": "我的作品"
 }

+ 3 - 2
utils/APIClient.js

@@ -481,12 +481,13 @@ module.exports = {
         }).url(url).method('POST').send();
     },
     // 用户行为统计
-    userEvent(code) {
+    userEvent(code, readId = false) {
         let url = getBaseUrl('wx/userEvent/v2');
         return request.getInstance().header({
             uid: wx.getStorageSync('uid')
         }).data({
-            action: code
+            action: code,
+            readId
         }).url(url).method('POST').send();
     },
     // 用户播放视频时长统计