فهرست منبع

收心营活动

Rorschach 3 سال پیش
والد
کامیت
5e596eb634

+ 6 - 0
component/share/share.js

@@ -97,6 +97,12 @@ Component({
         ctx.drawImage(this.data.avatar, 20, 20, 61, 61);
         ctx.clip(); //剪切头像区域
         ctx.restore();
+        ctx.font = 'normal bold 14px'
+        // ctx.setFontSize(14)
+        // ctx.setFontWeight(500)
+        ctx.setFillStyle('#198165')
+        ctx.fillText(this.data.author, 82, 49)
+        ctx.restore();
         ctx.setFontSize(16)
         ctx.setFillStyle('#434343')
         ctx.fillText(`《${this.data.title}》`, (300 - ctx.measureText(`《${this.data.title}》`).width) / 2, 285)

+ 1 - 1
component/video-swiper/index.wxml

@@ -116,7 +116,7 @@
     <view class="video_place" wx:if="{{!item.videoShow}}" catchtap="{{item.ifCheck ? null : 'showVideo'}}" data-index="{{index}}">
       <image class="place_img" src="{{item.coverImg}}" />
       <image class="play_btn" src="../../static/image/play-btn.png" />
-      <image class="activity_tigs" wx:if="{{item.activity}}" src="http://reader-wx.ai160.com/images/reader/activity/activity1.png" />
+      <image class="activity_tigs" wx:if="{{item.activity && item.type != 'EXAMPLE'}}" src="http://reader-wx.ai160.com/images/reader/activity/activity1.png" />
       <view class="video_item_dialog" wx:if="{{item.ifCheck}}">
         <image class="video_item_dialog_img" src="../../static/index/checking.png" mode="aspectFit|aspectFill|widthFix" />
       </view>

+ 42 - 42
pages/activity/index/index.js

@@ -17,7 +17,7 @@ Page({
     isSwiper: false,
     noMoreWork: false,
     hotAmountTopData: [],
-    sortImg: ['../../../static/activity/1.png', '../../../static/activity/2.png' , '../../../static/activity/3.png'],
+    sortImg: ['../../../static/activity/1.png', '../../../static/activity/2.png', '../../../static/activity/3.png'],
     grades: '',
     gradeObj: {
       "PRIMARY_FIRST_GRADE": "一年级",
@@ -72,7 +72,7 @@ Page({
         })
       }
     })
-      /**
+    /**
      * 获取我的排名信息
      */
     httpRequestApi.getMyHotAmount().success(res => {
@@ -103,8 +103,8 @@ Page({
    * 下拉
    */
   onPullDownRefresh: function () {
-     wx.showNavigationBarLoading() //在标题栏中显示加载
-     /**
+    wx.showNavigationBarLoading() //在标题栏中显示加载
+    /**
      * 获取排名信息
      */
     httpRequestApi.getHotAmountTop().success(res => {
@@ -117,7 +117,7 @@ Page({
         wx.stopPullDownRefresh() //停止下拉刷新
       }
     })
-      /**
+    /**
      * 获取我的排名信息
      */
     httpRequestApi.getMyHotAmount().success(res => {
@@ -162,7 +162,7 @@ Page({
       selectInd
     });
     if (selectInd === 1) {
-        this.getMyRead();
+      this.getMyRead();
     }
   },
   /**
@@ -238,8 +238,8 @@ Page({
   },
   /**
    * 点击删除按钮
-  */
- delHideMyWork() {
+   */
+  delHideMyWork() {
     this.getMyRead()
   },
   /**
@@ -383,25 +383,25 @@ Page({
   /**
    * 点击头像
    */
-  headTap (e) {
-      if (!wx.getStorageSync('user').wechatName) {
-          wx.navigateTo({
-              url: `../../pages/login/login`
-          });
-          return;
-      }
-      let uid = e.target.dataset.uid ? e.target.dataset.uid : e.currentTarget.dataset.uid;
-      // this.trigger(e, 'headTap')
-      console.log('点击头像', e)
+  headTap(e) {
+    if (!wx.getStorageSync('user').wechatName) {
       wx.navigateTo({
-          url: `../../pages/myworks/myworks?uid=${uid}`,
-          fail: (err) => {
-              console.log('跳转错误', err)
-              wx.navigateTo({
-                  url: `../../../pages/myworks/myworks?uid=${uid}`
-              });
-          }
+        url: `../../pages/login/login`
       });
+      return;
+    }
+    let uid = e.target.dataset.uid ? e.target.dataset.uid : e.currentTarget.dataset.uid;
+    // this.trigger(e, 'headTap')
+    console.log('点击头像', e)
+    wx.navigateTo({
+      url: `../../pages/myworks/myworks?uid=${uid}`,
+      fail: (err) => {
+        console.log('跳转错误', err)
+        wx.navigateTo({
+          url: `../../../pages/myworks/myworks?uid=${uid}`
+        });
+      }
+    });
 
   },
   /**
@@ -411,22 +411,22 @@ Page({
     const followUid = e.target.dataset.uid ? e.target.dataset.uid : e.currentTarget.dataset.uid;
     const uid = wx.getStorageSync('uid');
     httpRequestApi.followUser(uid, followUid).success((res) => {
-        // this.setData({
-        //   isFans: true
-        // })
-        wx.showToast({
-          title: '关注啦',
-          icon: 'success',
-          duration: 1000
-        })
+      // this.setData({
+      //   isFans: true
+      // })
+      wx.showToast({
+        title: '关注啦',
+        icon: 'success',
+        duration: 1000
+      })
     });
     httpRequestApi.getHotAmountTop().success(res => {
-        if (res.data.code === 200) {
-          const hotAmountTopData = [...res.data.data]
-          this.setData({
-            hotAmountTopData
-          })
-        }
-      })
-    }
-})
+      if (res.data.code === 200) {
+        const hotAmountTopData = [...res.data.data]
+        this.setData({
+          hotAmountTopData
+        })
+      }
+    })
+  }
+})

+ 3 - 3
pages/activity/index/index.wxml

@@ -24,15 +24,15 @@
   </view>
   <view class="activity-ranking">
     <view class="activity-ranking-tab">
-      <image class="tab-bg" src="../../../static/activity/tab-bg.png" mode="scaleToFill"></image>
+      <!-- <image class="tab-bg" src="../../../static/activity/tab-bg.png" mode="scaleToFill"></image> -->
       <image  class="select-bg {{selectInd === 0 ? 'left' : 'right'}}" src="{{selectBg[selectInd]}}" mode="scaleToFill"></image>
-      <text class="left {{selectInd === 0 && 'select'}}" data-index="0" bindtap="tabSelect">TOP100人气榜单</text>
+      <text class="left {{selectInd === 0 && 'select'}}" data-index="0" bindtap="tabSelect">人气榜 TOP100</text>
       <text class="right {{selectInd === 1 && 'select'}}" data-index="1" bindtap="tabSelect">我的参赛作品</text>
     </view>
     <view class="activity-ranking-container" style="background: #fff;" hidden="{{selectInd === 1}}">
       <view class="activity-ranking-title">
         <text>排名</text>
-        <text>名称</text>
+        <text class="midTitle">昵称</text>
         <text>人气值</text>
       </view>
       <view class="scroll-view" style="{{myHotAmountData.activityJoinUser ? 'margin-bottom: 150rpx;' : ''}}">

+ 15 - 9
pages/activity/index/index.wxss

@@ -5,18 +5,18 @@
   height: 100%;
   box-sizing: border-box;
   overflow: scroll;
-  background: #FD423B;
+  background: #34D6B0;
 }
 .activity-bg {
   width: 100%;
-  height: 440rpx;
+  height: 400rpx;
 }
 .rule {
   position: absolute;
   top: 32rpx;
   right: 0;
-  width: 191rpx;
-  height: 60rpx;
+  width: 193rpx;
+  height: 50rpx;
 }
 .rule image {
   width: 100%;
@@ -85,6 +85,8 @@
   display: flex;
   justify-content: space-between;
   height: 88rpx;
+  background: #007a5b;
+border-radius: 0 20rpx 0 20rpx;
 }
 .tab-bg {
   position: absolute;
@@ -103,6 +105,7 @@
   color: #fff;
   font-size: 38rpx;
   z-index: 2;
+  font-weight: bold;
 }
 .activity-ranking-tab .left {
   left: 0;
@@ -118,19 +121,22 @@
   z-index: 1;
 }
 .activity-ranking-tab .select {
-  color: #FD423B;
+  color: #007A5B;
 }
 .activity-ranking-title {
   display: flex;
   justify-content: space-between;
   align-items: center;
-  padding: 21rpx 32rpx;
-  color: #D52822;
+  padding: 21rpx 42rpx;
+  color: #007A5B;
   font-size: 38rpx;
   background: #fff;
   box-sizing: border-box;
   font-weight: 600;
 }
+.activity-ranking-title .midTitle{
+  margin-left: -44rpx;
+}
 .scroll-view-item,
 .activity-my-ranking {
   display: flex;
@@ -140,7 +146,7 @@
   height: 150rpx;
   background: #fff;
   border-bottom: 2rpx solid #fff;
-  padding: 0 50rpx;
+  padding: 0 40rpx;
   box-sizing: border-box;
 }
 .scroll-view-item .ranking-number-img {
@@ -159,7 +165,7 @@
 .scroll-view-item  .ranking-message,
 .activity-my-ranking  .ranking-message{
   display: flex;
-  width: 420rpx;
+  width: 332rpx;
 }
 .scroll-view-item  .ranking-message .reanking-message-head,
 .activity-my-ranking  .ranking-message .reanking-message-head {

+ 18 - 2
pages/activity/strategy/strategy.js

@@ -8,6 +8,22 @@ Page({
 
   },
 
+  copyWx: function () {
+    // wx.showToast({
+    //   title: '复制成功',
+    // })
+    wx.setClipboardData({
+      data: "woaifanglaoshi",
+      success: function (res) {
+        // wx.getClipboardData({
+        //   //这个api是把拿到的数据放到电脑系统中的
+        //   success: function (res) {
+        //     console.log(res.data) // data
+        //   }
+        // })
+      }
+    })
+  },
   /**
    * 生命周期函数--监听页面加载
    */
@@ -63,7 +79,7 @@ Page({
   onShareAppMessage: function () {
 
   },
-    /**
+  /**
    * 下拉
    */
   onPullDownRefresh: function () {
@@ -75,4 +91,4 @@ Page({
     //   wx.stopPullDownRefresh() //停止下拉刷新
     // }, 1000);
   },
-})
+})

+ 1 - 0
pages/activity/strategy/strategy.wxml

@@ -6,4 +6,5 @@
       src="http://yfklxt-video.ai160.com/fastStudy/video/20210302001.mp4"
       autoplay
     ></video>
+    <view class="copy-btn" bindtap="copyWx">复制</view>
 </view>

+ 17 - 2
pages/activity/strategy/strategy.wxss

@@ -1,16 +1,17 @@
 /* pages/activity/strategy/strategy.wxss */
 .strategy-main {
   width: 100%;
-  height: 100%;
+  height: 1791rpx;
   background: #FD423B;
   overflow-y: scroll;
+  position: relative;
 }
 .strategy-bg {
   position: absolute;
   left: 0;
   top: 0;
   width: 100%;
-  height: 1334rpx;
+  height: 1791rpx;
 }
 .myVideo {
   position: absolute;
@@ -21,3 +22,17 @@
   transform: translateX(-50%);
   z-index: 2;
 }
+.copy-btn{
+  width: 168rpx;
+  height: 59rpx;
+  background: #ff9743;
+  border-radius: 30rpx;
+  line-height: 59rpx;
+  text-align: center;
+  color: #fff;
+  font-size: 34rpx;
+  position: absolute;
+  bottom: 128rpx;
+  right: 48rpx;
+  
+}

+ 13 - 10
pages/index/index.js

@@ -198,19 +198,21 @@ Page({
           recommendTotalNo: 1
         }, () => {
           this.formatWorksList(tempList, true);
-          console.log('插入数据')
-          // this.getHotRecommend();
-          // return;
+          this.getHotRecommend(this.uid);
         })
-        // this.showPage()
       })
-    }
-    if (options && options.index) {
-      this.updateData(options.index)
     } else {
-      console.log('又加载一边')
-      this.updateData(0)
+      console.log('没有分享')
+      if (options && options.index) {
+        this.updateData(options.index)
+      } else {
+        console.log('又加载一边')
+        this.updateData(0)
+      }
     }
+
+
+
     setTimeout(() => {
       if (wx.getStorageSync('uid')) {
         httpRequestApi.userLoginRecord().success(res => {
@@ -701,6 +703,7 @@ Page({
         temp.isFans = true;
         temp.videoShow = false;
         temp.shareImg = item.userRead.shareImg;
+        item.isActivity && (temp.activity = true);
         myWorks.push(temp);
       });
       console.log('myWorks', myWorks)
@@ -1034,4 +1037,4 @@ Page({
       url: `../activity/index/index`
     });
   }
-})
+})

+ 2 - 1
pages/index/index.wxml

@@ -74,7 +74,8 @@
 <view hidden="{{hide}}">
   <Dialog bindmyevent="jurisdiction" />
 </view>
-<view class="upgrade" hidden="{{gradeActivity === 'PRIMARY_SENIOR_GRADE' || gradeActivity === 'PRESCHOOL' || upgradeHide}}">
+<!-- <view class="upgrade" hidden="{{gradeActivity === 'PRIMARY_SENIOR_GRADE' || gradeActivity === 'PRESCHOOL' || upgradeHide}}"> -->
+<view class="upgrade" hidden="{{upgradeHide}}">
   <view class="upgrade-main">
     <image class="upgrade-icon" src="http://reader-wx.ai160.com/images/reader/activity/activity_dialog.png" bindtap="goToActivity"></image>
     <image class="close" bindtap="hideUpgrade" src="../../static/image/close.png"></image>

+ 1 - 1
pages/myworks/myworks.js

@@ -150,7 +150,7 @@ Page({
         temp.videoShow = false;
         temp.coverImg = item.userRead.coverImg;
         temp.shareImg = item.userRead.shareImg;
-
+        item.isActivity && (temp.activity = true);
         // recommendWorks.push(temp);
         this.data.videoList.push(temp);
 

BIN
static/activity/activity_tag_1.png


BIN
static/activity/activity_tag_2.png


BIN
static/activity/activity_tag_3.png


BIN
static/activity/left.png


BIN
static/activity/right.png


BIN
static/activity/rule-img.png


+ 1 - 1
templates/courses/courses.wxml

@@ -3,7 +3,7 @@
     <view class="courses_container">
         <view class="course_item" bindtap="goToReading" wx:for="{{coursesData}}" data-id="{{item.userRead.exampleId}}" data-index="{{index}}" wx:key="index">
             <image class="course_icon" src="{{item.userRead.iconImg}}" lazy-load="true" />
-            <image class="activity_tigs" wx:if="{{item.isActivity}}" src="http://reader-wx.ai160.com/images/reader/activity/activity2.png" />
+            <image class="activity_tigs" wx:if="{{item.isActivity}}" src="../../static/activity/activity_tag_1/png" />
             <view class="course_info">
                 <text class="course_title">{{item.userRead.title}}</text>
             </view>

+ 2 - 2
utils/const.js

@@ -5,6 +5,6 @@ module.exports = {
   productApi:  'https://reader-test.efunbox.cn/readerProduct/',
   // baseApi: 'https://reader.lingjiao.cn/readerBase/'
   // baseApi: 'https://readertest.lingjiao.cn:442/readerBase/'
-  // baseApi: 'https://reader-api.ai160.com/'
-  baseApi: 'https://reader-api.efunbox.cn/'
+  baseApi: 'https://reader-api.ai160.com/'
+  // baseApi: 'https://reader-api.efunbox.cn/'
 }