bayi пре 2 година
родитељ
комит
a0562270f4

+ 1 - 1
api/global.js

@@ -23,7 +23,7 @@ module.exports = {
   // 获取消息通知列表
   getMessageList: data => request('/message', 'get', data),
   // 用户行为统计
-  // RECOMMEND(name: "推荐”) ,MY(name: ”我的 "),RESOURCES(name: "资源"), SUBSCRIBE(name: "关注"),REC_ READ(name: ”推荐 - 我要配音 "),READING(name: ”开始朗读 ") ,EXAMPLE(name: "示范"), RERECORDING(name: "重录"), UPLOAD(name: "上传作品"), MY_ INFO(name: “个人信息 ") ,INTEGRAL(name: "小红花"), MY_ SUBSCRIBE(name: "我的关注"), MY_ FAVORITES(name: ”我的收藏”),MESSAGE(name: ”消息通知”), SERVICE(name: "客服"),
+  // RECOMMEND(name: "推荐”) ,MY(name: ”我的 "),RESOURCES(name: "资源"), SUBSCRIBE(name: "关注"),REC_ READ(name: ”推荐 - 我要配音 "),READING(name: ”开始朗读 ") ,APP_EXAMPLE(name: "示范"), RERECORDING(name: "重录"), UPLOAD(name: "上传作品"), MY_ INFO(name: “个人信息 ") ,INTEGRAL(name: "小红花"), MY_ SUBSCRIBE(name: "我的关注"), MY_ FAVORITES(name: ”我的收藏”),MESSAGE(name: ”消息通知”), SERVICE(name: "客服"),
   userEvent: data => request('/userEvent/v2', 'post', data),
 
 }

+ 2 - 2
components/activityList/index.less

@@ -51,7 +51,7 @@
 
         .nickName {
           width: 140rpx;
-          font-size: 20rpx;
+          font-size: 26rpx;
           margin-top: 14rpx;
         }
 
@@ -126,7 +126,7 @@
 
           .nickName {
             width: 120rpx;
-            font-size: 20rpx;
+            font-size: 26rpx;
             margin-top: 14rpx;
           }
         }

+ 2 - 2
components/activityList/index.wxss

@@ -44,7 +44,7 @@
 }
 .activityList .ranking-class-1 .body .top .nickName {
   width: 140rpx;
-  font-size: 20rpx;
+  font-size: 26rpx;
   margin-top: 14rpx;
 }
 .activityList .ranking-class-1 .body .top .firstUser {
@@ -108,7 +108,7 @@
 }
 .activityList .ranking-class-1 .body .btm .userBox .nickName {
   width: 120rpx;
-  font-size: 20rpx;
+  font-size: 26rpx;
   margin-top: 14rpx;
 }
 .activityList .ranking-class-2 {

+ 1 - 1
components/videoPreview/index.js

@@ -46,7 +46,7 @@ Component({
     videoType: {
       type: String,
       // value 为public时是默认公共样式,为my时为“我的”样式,展示下载删除是否公开,pk为pk的样式文案,excellent是优秀作品展播
-      value: 'public'
+      value: 'public',
     },
     currentId: {
       type: Number

+ 1 - 1
components/videoPreview/index.wxml

@@ -111,7 +111,7 @@
       <image src="/static/reading.png" class="reading" mode="" />
       <view class="reading-text">挑战PK</view>
     </view>
-    <view class="toReading" bindtap="toPkPage" wx:if="{{videoInfoCopy.userRead.type=='EXAMPLE'}}">
+    <view class="toReading" bindtap="toPkPage" wx:if="{{videoInfoCopy.userRead.type=='APP_EXAMPLE'}}">
       <image src="/static/reading.png" class="reading" mode="" />
       <view class="reading-text">去朗读</view>
     </view>

+ 2 - 2
components/worksList/index.js

@@ -53,7 +53,7 @@ Component({
     videoType: {
       type: String,
       // value 为public时是默认公共样式,为my时为“我的”样式,展示下载删除是否公开,pk为pk的样式文案,collection为收藏时的样式,excellent优秀作品展播
-      value: 'public'
+      value: 'public',
     },
     // 是否在tabbar页面使用
     tabBarPadding: {
@@ -84,7 +84,7 @@ Component({
         worksListCopy
       })
     },
- 
+
     addCommentNum({
       detail
     }) {

+ 3 - 11
pages/childClassify/index.js

@@ -83,21 +83,13 @@ Page({
     if (!this.data.text) {
       return
     }
-    let res = await searchWorks({
+    let list = await searchWorks({
       title: this.data.text,
       grade: this.data.userInfo.grade
     })
-    let list = res.map(item => {
-      console.log(item);
-      return {
-        readAmount: item.readAmount,
-        ...item.userRead
-      }
+    this.setData({
+      list
     })
-    /*  console.log(list);
-     this.setData({
-       list
-     }) */
   },
   goRead({
     currentTarget

+ 5 - 4
pages/childClassify/index.less

@@ -40,16 +40,16 @@
     .input {
       background-color: white;
       border-radius: 50rpx;
-      padding: 10rpx 30rpx;
+      padding: 12rpx 30rpx;
       padding-right: 140rpx;
     }
 
     .searchBtn {
       position: absolute;
       right: 40rpx;
-      top: 13rpx;
-      padding: 4rpx 40rpx;
-      background: #F2F6FC;
+      top: 12rpx;
+      padding: 6rpx 40rpx;
+      background: #00C657;
       border-radius: 40rpx;
 
       .img {
@@ -81,6 +81,7 @@
         flex: 1;
         display: flex;
         align-items: center;
+
         .cover {
           width: 230rpx;
           height: 128rpx;

+ 1 - 1
pages/childClassify/index.wxml

@@ -10,7 +10,7 @@
   <view class="searchBox" wx:if="{{type=='search'}}">
     <input class="input" placeholder="请输入搜索内容" bindblur="setSearch" />
     <view class="searchBtn" catchtap="search">
-      <image src="/static/search.png" class="img" />
+      <image src="/static/search-2.png" class="img" />
     </view>
   </view>
   <!-- 内容区域 -->

+ 4 - 4
pages/childClassify/index.wxss

@@ -37,15 +37,15 @@
 .classBox .searchBox .input {
   background-color: white;
   border-radius: 50rpx;
-  padding: 10rpx 30rpx;
+  padding: 12rpx 30rpx;
   padding-right: 140rpx;
 }
 .classBox .searchBox .searchBtn {
   position: absolute;
   right: 40rpx;
-  top: 13rpx;
-  padding: 4rpx 40rpx;
-  background: #F2F6FC;
+  top: 12rpx;
+  padding: 6rpx 40rpx;
+  background: #00C657;
   border-radius: 40rpx;
 }
 .classBox .searchBox .searchBtn .img {

+ 2 - 2
pages/match/index.js

@@ -58,12 +58,12 @@ Page({
     let {
       activityUserList,
       myActivityUser,
-      explain
+      activity
     } = await getReadRanking()
     this.setData({
       activityUserList,
       myActivityUser,
-      explain
+      explain:activity.explain
     })
   },
   async getSelfReadRanking() {

+ 2 - 2
pages/match/index.less

@@ -119,7 +119,7 @@
         display: flex;
         align-items: center;
         justify-content: space-between;
-        font-size: 36rpx;
+        font-size: 30rpx;
       }
 
       .contentBox {
@@ -155,7 +155,7 @@
             margin-left: 20rpx;
 
             .nickName {
-              font-size: 28rpx;
+              font-size: 30rpx;
               margin-bottom: 6rpx;
             }
 

+ 2 - 3
pages/match/index.wxml

@@ -37,9 +37,8 @@
             <image src="/static/{{index+1}}-1.png" class="rankingImg" wx:if="{{index<3}}" />
             <text wx:else>{{index+1}}</text>
           </view>
-          <view class="secondCol">
-            <image lazy-load src="{{item.user.avatar}}" class="avatar" bindtap="jumpUserInfo"
-              data-uid='{{item.user.uid}}' />
+          <view class="secondCol" bindtap="jumpUserInfo" data-uid='{{item.user.uid}}'>
+            <image lazy-load src="{{item.user.avatar}}" class="avatar" />
             <view class="userInfo">
               <view class="nickName">{{item.user.nickName||item.user.eid}}</view>
               <view class="date">

+ 2 - 2
pages/match/index.wxss

@@ -105,7 +105,7 @@
   display: flex;
   align-items: center;
   justify-content: space-between;
-  font-size: 36rpx;
+  font-size: 30rpx;
 }
 .matchBox .rankList .table .contentBox {
   margin-top: 24rpx;
@@ -137,7 +137,7 @@
   margin-left: 20rpx;
 }
 .matchBox .rankList .table .contentBox .secondCol .userInfo .nickName {
-  font-size: 28rpx;
+  font-size: 30rpx;
   margin-bottom: 6rpx;
 }
 .matchBox .rankList .table .contentBox .secondCol .userInfo .date {

+ 1 - 1
pages/my/index.less

@@ -131,7 +131,7 @@
 
       .title {
         margin-top: 8rpx;
-        font-size: 24rpx;
+        font-size: 28rpx;
         color: #333;
       }
 

+ 1 - 1
pages/my/index.wxss

@@ -123,7 +123,7 @@
 }
 .container .sectionBoxs .sBox .title {
   margin-top: 8rpx;
-  font-size: 24rpx;
+  font-size: 28rpx;
   color: #333;
 }
 .container .sectionBoxs .contactBtn {

+ 3 - 2
pages/personal/index.js

@@ -15,7 +15,8 @@ Page({
     userInfo: {},
     // type为pk,顶部显示为pk时样式,user为默认样式
     type: 'user',
-    uid: wx.getStorageSync('uid')
+    uid: '',
+    localUid: wx.getStorageSync('uid')
   },
   /**
    * 生命周期函数--监听页面加载
@@ -67,7 +68,7 @@ Page({
   toPkPage({
     currentTarget
   }) {
-    if (this.data.userInfo.user.profession == '官方' || this.data.userInfo.user.uid == this.data.uid) {
+    if (this.data.userInfo.user.profession == '官方' || wx.getStorageSync('uid') == this.data.uid) {
       wx.navigateTo({
         url: `/pages/reading/index?videoId=${currentTarget.dataset.id}`
       })

+ 1 - 1
pages/personal/index.wxml

@@ -78,7 +78,7 @@
           </view>
         </view>
         <view class="goRead">
-          {{userInfo.user.profession=='官方'||userInfo.user.uid==uid?'去朗读':'挑战PK'}}
+          {{userInfo.user.profession=='官方'||userInfo.user.uid==localUid?'去朗读':'挑战PK'}}
         </view>
       </view>
     </scroll-view>

+ 2 - 2
pages/pkPage/index.wxml

@@ -9,9 +9,9 @@
     <view class="title">挑战记录</view>
     <scroll-view scroll-y="true" class="scrollBox" enhanced="true" show-scrollbar="{{false}}"
       bindscrolltolower='loadMore'>
-      <view class="record" wx:for="{{recordList}}" wx:key="id">
+      <view class="record" wx:for="{{recordList}}" wx:key="id" bindtap="jumpUserInfo" data-uid='{{item.user.uid}}'>
         <view class="record-left">
-          <image src="{{item.user.avatar}}" class="avatar" bindtap="jumpUserInfo" data-uid='{{item.user.uid}}' />
+          <image src="{{item.user.avatar}}" class="avatar" />
           <view class="rl-info">
             <view class="nickName">{{item.user.nickName||item.user.eid}}</view>
             <view class="time">{{filters.formatDate(item.userRead.gmtCreated,1)}}</view>

+ 71 - 23
pages/score/index.js

@@ -68,29 +68,77 @@ Page({
           pic.src = video.resourcesType == 1 ? video.aBg : video.coverImg;
           pic.onload = () => {
             ctx.drawImage(pic, 0, 0, 375, 211);
-            if (video.resourcesType == 1) {
-              let aBg = canvas.createImage();
-              aBg.src = '/static/shareAudioBg.png';
-              aBg.onload = () => {
-                ctx.drawImage(aBg, 127.5, 38, 120, 120);
-                let rate = 0.5
-                ctx.arc(
-                  Math.floor(375 * rate),
-                  98,
-                  Math.floor(100 * rate),
-                  0,
-                  2 * Math.PI
-                );
-                ctx.clip() //裁剪
-                let coverImg = canvas.createImage();
-                coverImg.src = video.coverImg;
-                coverImg.onload = () => {
-                  ctx.drawImage( //定位在圆圈范围内便会出现
-                    coverImg, //图片暂存路径
-                    129, 42,
-                    110, 110,
-                  );
-                  ctx.restore()
+            let peiyin = canvas.createImage();
+            peiyin.src = '/static/peiyin.jpg';
+            peiyin.onload = () => {
+              ctx.drawImage(peiyin, 0, 211, 375, 89);
+              //分享
+              let fx = canvas.createImage();
+              fx.src = '/static/share.png'
+              fx.onload = () => {
+                ctx.drawImage(fx, 12, 220, 20, 20)
+                ctx.fillText('分享', 36, 238)
+                // 收藏,一个一个渲染
+                let sc = canvas.createImage();
+                sc.src = '/static/no_collect.png'
+                sc.onload = () => {
+                  ctx.drawImage(sc, 110, 220, 19, 19)
+                  ctx.fillText('收藏', 134, 238)
+                  //点赞
+                  let dz = canvas.createImage();
+                  dz.src = '/static/heart.png'
+                  dz.onload = () => {
+                    ctx.drawImage(dz, 318, 222, 22, 22)
+                    ctx.fillText(0, 254, 238)
+                    // 评论
+                    let pl = canvas.createImage();
+                    pl.src = '/static/comment.png'
+                    pl.onload = () => {
+                      ctx.drawImage(pl, 228, 222, 22, 22)
+                      ctx.fillText(0, 340, 238)
+                      if (video.resourcesType == 1) {
+                        let aBg = canvas.createImage();
+                        aBg.src = '/static/shareAudioBg.png';
+                        aBg.onload = () => {
+                          ctx.drawImage(aBg, 127.5, 38, 120, 120);
+                          let rate = 0.5
+                          ctx.arc(
+                            Math.floor(375 * rate),
+                            98,
+                            Math.floor(100 * rate),
+                            0,
+                            2 * Math.PI
+                          );
+                          ctx.clip() //裁剪
+                          let coverImg = canvas.createImage();
+                          coverImg.src = video.coverImg;
+                          coverImg.onload = () => {
+                            ctx.drawImage( //定位在圆圈范围内便会出现
+                              coverImg, //图片暂存路径
+                              129, 42,
+                              110, 110,
+                            );
+                            ctx.restore()
+                          }
+                        }
+                      }
+                      setTimeout(() => {
+                        wx.canvasToTempFilePath({
+                          canvas: canvas,
+                          success(res) {
+                            resolve({
+                              title: '我的新作品发布啦,快来捧场点赞!',
+                              path: `/pages/pkPage/index?videoId=${wx.getStorageSync('shareVideoId')}&uid=${wx.getStorageSync('uid')}`,
+                              imageUrl: res.tempFilePath
+                            })
+                          },
+                          fail(res) {
+                            reject()
+                          }
+                        }, this)
+                      }, 500)
+                    }
+                  }
                 }
               }
             }

BIN
static/search-2.png