diff --git a/pages/UpHome/UpHome.js b/pages/UpHome/UpHome.js index 4e8b83b..237026a 100644 --- a/pages/UpHome/UpHome.js +++ b/pages/UpHome/UpHome.js @@ -8,7 +8,7 @@ Page({ navigationBarHeight, id:"",//upid name:'',//upName - indexFlog:1,//选着类别 + indexFlog:2,//选着类别 upData:{},//作者信息 pageNum:1, classList:[],//课程列表 diff --git a/pages/UpHome/UpHome.ttml b/pages/UpHome/UpHome.ttml index fa68eef..0c2f548 100644 --- a/pages/UpHome/UpHome.ttml +++ b/pages/UpHome/UpHome.ttml @@ -1,7 +1,6 @@ - - + {{upData.sring}} @@ -11,14 +10,14 @@ {{upData.introduction}} - - 专栏 - - + 单课程 - + + 专栏 + + diff --git a/pages/UpHome/UpHome.ttss b/pages/UpHome/UpHome.ttss index ade364a..c32f069 100644 --- a/pages/UpHome/UpHome.ttss +++ b/pages/UpHome/UpHome.ttss @@ -4,22 +4,22 @@ } .backImg{ width: 100%; - height: 400rpx; + height: 380rpx; } .headImg{ position: absolute; border: 1rpx solid #07E881; - width: 200rpx; - height: 200rpx; + width: 160rpx; + height: 160rpx; border-radius: 50%; - top: 480rpx; + top: 320rpx; left: 50rpx; } .category{ position: absolute; - top: 560rpx; - left: 300rpx; + top: 410rpx; + left: 260rpx; padding: 20rpx; border-radius: 10rpx; background-color: #222735; @@ -27,7 +27,7 @@ line-height: 32rpx; } .nameBox{ - margin-top: 180rpx; + margin-top: 150rpx; } .userName{ height: 50rpx; @@ -42,7 +42,7 @@ .text{ width: 90%; margin: 20rpx auto; - height: 120rpx; + /* height: 120rpx; */ overflow: hidden; font-size: 28rpx; font-family: PingFang SC; @@ -51,25 +51,21 @@ line-height: 36rpx; } .classifyBox{ - height: 120rpx; + height: 100rpx; background: #121620; } .singleBox{ float: left; - margin-left: 30rpx; + margin-left: 40rpx; } .multiBox{ float: left; text-align: center; + } -.singleXian{ - width: 60rpx; - height: 2rpx; - background-color: #07E881; - margin-left: 20rpx; -} + .singleText{ font-size: 30rpx; font-family: OPPOSans; @@ -87,6 +83,7 @@ line-height: 35rpx; padding: 10px 0; margin-left: 20rpx; + border-bottom: 1rpx solid #07E881; } .classBox{ margin: 20rpx; diff --git a/pages/classDetails/classDetails.js b/pages/classDetails/classDetails.js index 70c9851..ac8e2fc 100644 --- a/pages/classDetails/classDetails.js +++ b/pages/classDetails/classDetails.js @@ -4,6 +4,7 @@ const config = require("../../config/config") const Http = require("../../utils/HttpBasics.js") Page({ data: { + showAddBox:{}, ifPay: app.globalData.platform, classTitle: "",//课程标题 showIos: false,//ios字符提示 @@ -117,26 +118,46 @@ Page({ }) }, hieaddCheck() { + let animation = tt.createAnimation({ + duration: 1000, + timingFunction: "ease", + }); + animation.opacity(0).step() this.setData({ - extraClasses: 'addBox-transition', + // extraClasses: 'addBox-transition', + showAddBox:animation.export(), addFlag: true }) }, - addCheck() {//动画 + showAddCheck:function(){ this.setData({ addFlag: false }) - if (this.data.extraClasses == 'addBox-transition addBox-moved') { - this.setData({ - extraClasses: 'addBox-transition', - - }) - } else { - this.setData({ - extraClasses: 'addBox-transition addBox-moved' - }) - } + let animation = tt.createAnimation({ + duration: 1000, + timingFunction: "ease", + }); + animation.opacity(1).step() + this.setData({ + showAddBox:animation.export(), + + }) }, + // addCheck() {//动画 + // this.setData({ + // addFlag: false + // }) + // if (this.data.extraClasses == 'addBox-transition addBox-moved') { + // this.setData({ + // extraClasses: 'addBox-transition', + + // }) + // } else { + // this.setData({ + // extraClasses: 'addBox-transition addBox-moved' + // }) + // } + // }, setColumnIndex(e) { let index = e.currentTarget.dataset.index this.setData({ @@ -183,7 +204,7 @@ Page({ }, success: (res) => { _this.setData({ - goPayFlag:false + goPayFlag: false }) _this.getData() }, @@ -337,9 +358,9 @@ Page({ this.setData({ iscollect: res.data }) - }).catch(err=>{ + }).catch(err => { this.setData({ - iscollect:false + iscollect: false }) }) }, @@ -386,13 +407,14 @@ Page({ }); }) }, + onReady() { this.setData({ videoContext: wx.createVideoContext('myVideo') }) }, onLoad(options) { - if(app.globalData.token){ + if (app.globalData.token) { if (options.id) { this.setData({ id: options.id, @@ -401,8 +423,8 @@ Page({ this.ifCollect() this.getData() } - }else{ - app.tokenCallback = token =>{ + } else { + app.tokenCallback = token => { if (options.id) { this.setData({ id: options.id, @@ -413,33 +435,41 @@ Page({ } } } - - + + }, onShow() { + let animation = tt.createAnimation({ + duration: 0, + // timingFunction: "ease", + }); + animation.opacity(0).step() + this.setData({ + showAddBox:animation.export(), + }) }, onShareAppMessage: function (shareOption) { console.log(this.data.data.dyTitle); -  let that = this -  if (shareOption.channel == 'video') { // 判断是是不是分享视频 -    return { -     channel: 'video', // 必写 video - //     templateId: '',   // 分享的模版 id (如果未设置就是默认,下面会说如何设置) -     title: '知播堂',     // 分享的标题 - //     desc: '我是简介',     // 分享的内容介绍目前没有用 - //     path: `/pages/index/index`,  // 分享的路径 -     extra: { -      videoTopics: ["知播堂", that.data.data.dyTitle] // 只有抖音才会有的属性 -     }, -    } -   } else { // 右上角分享 -     return { -      templateId: '',         //分享的模版 id -      title: '',            //分享的标题 -      desc: '',           // 分享的内容 - //      path: ``, // 分享的路径 -     } -    } -   }, + let that = this + if (shareOption.channel == 'video') { // 判断是是不是分享视频 + return { + channel: 'video', // 必写 video + //     templateId: '',   // 分享的模版 id (如果未设置就是默认,下面会说如何设置) + title: '知播堂',     // 分享的标题 + //     desc: '我是简介',     // 分享的内容介绍目前没有用 + //     path: `/pages/index/index`,  // 分享的路径 + extra: { + videoTopics: ["知播堂", that.data.data.dyTitle] // 只有抖音才会有的属性 + }, + } + } else { // 右上角分享 + return { + templateId: '',         //分享的模版 id + title: '',            //分享的标题 + desc: '',           // 分享的内容 + //      path: ``, // 分享的路径 + } + } + }, }) \ No newline at end of file diff --git a/pages/classDetails/classDetails.ttml b/pages/classDetails/classDetails.ttml index 60267cc..71d698a 100644 --- a/pages/classDetails/classDetails.ttml +++ b/pages/classDetails/classDetails.ttml @@ -150,10 +150,9 @@ --> - - - + +