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 @@
-->
-
-
-
\ No newline at end of file
diff --git a/pages/classDetails/classDetails.ttss b/pages/classDetails/classDetails.ttss
index 7ddaf8a..de880df 100644
--- a/pages/classDetails/classDetails.ttss
+++ b/pages/classDetails/classDetails.ttss
@@ -1,6 +1,9 @@
.Box{
min-height: 100vh;
}
+#BoxBg{
+ position: relative;
+}
#myVideo{
width: 100%;
height: 420rpx;
@@ -216,39 +219,19 @@
position: fixed;
right: 0;
bottom: 274rpx;
+ z-index: 100000000000000000;
}
.addBox{
padding: 0 40rpx;
- /* width: 90%; */
height: 100rpx;
background: linear-gradient(0deg, #2A3042, #464D61);
+ background-color: #2A3042;
box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.93);
border-radius: 49rpx;
position: fixed;
- left: 100%;
+ left: 5%;
bottom: 300rpx;
}
-.addBox-transition {
- transition: all 0.5s;
- }
-
- .addBox-moved {
- left: 5%;
- }
-
- @keyframes addBox-ani {
- from {
- left: 100%;
- }
-
- to {
- left: 5%;
- }
- }
-
- .addBox-animation {
- animation: addBox-ani 1s alternate infinite;
- }
.goruzu{
float: left;
}
@@ -660,7 +643,7 @@
margin: 10rpx 20rpx 20rpx 20rpx;
}
.answer::before{
- content: "";
+ content: "答:";
color: #07E881;
}
button::after {
@@ -682,3 +665,12 @@ button {
button {
border-radius:0;
}
+.temp{
+ position: fixed;
+ width: 100rpx;
+ height: 100rpx;
+ background: linear-gradient(0deg, #2A3042, #464D61);
+ border-radius: 50%;
+ top: 200px;
+ left: 0;
+}
diff --git a/pages/index/index.js b/pages/index/index.js
index cdbccda..73089a4 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -241,4 +241,27 @@ Page({
this.getSwiperLsit()
tt.stopPullDownRefresh();
},
+ onShareAppMessage: function (shareOption) {
+ let that = this
+ if (shareOption.channel == 'video') { // 判断是是不是分享视频
+ return {
+ channel: 'video', // 必写 video
+ // templateId: '', // 分享的模版 id (如果未设置就是默认,下面会说如何设置)
+ title: '小程序 | 看视频,学知识,有趣好玩内容尽在知播堂。', // 分享的标题
+ // desc: '我是简介', // 分享的内容介绍目前没有用
+ // path: `/pages/index/index`, // 分享的路径
+ extra: {
+ videoTopics: ["知播堂"] // 只有抖音才会有的属性
+ },
+ }
+ } else { // 右上角分享
+ return {
+ templateId: '', //分享的模版 id
+ title: '', //分享的标题
+ desc: '', // 分享的内容
+ // path: ``, // 分享的路径
+ }
+ }
+},
+
})
diff --git a/pages/order/order.ttml b/pages/order/order.ttml
index 0ee659a..5562bef 100644
--- a/pages/order/order.ttml
+++ b/pages/order/order.ttml
@@ -24,11 +24,14 @@
{{item.productTitle}}
-
-
- {{item.author}}
-
+
+
+
+ {{item.author}}
+
+
+
diff --git a/pages/order/order.ttss b/pages/order/order.ttss
index c7e5ae8..3af6e25 100644
--- a/pages/order/order.ttss
+++ b/pages/order/order.ttss
@@ -60,32 +60,47 @@ text-align: center;
width: 250rpx;
height: 160rpx;
border-radius: 10rpx;
- background-color: coral;
}
.courseBox {
+ width: 320rpx;
margin-left: 30rpx;
float: left;
}
.h3{
- width: 300rpx;
- line-height: 60rpx;
- font-size: 34rpx;
- color: #ffffff;
- font-weight: 560;
+ height: 50rpx;
+ line-height: 50rpx;
+ font-size: 30rpx;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:1;
+ color: #ffffff;
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: #FEFEFE;
}
.headImg{
- width: 60rpx;
- height: 60rpx;
+ position: absolute;
+
+ width: 50rpx;
+ height: 50rpx;
border-radius: 50%;
+ top: 0;
+ left: 0;
+}
+.annotation{
+ padding-left:70rpx ;
+ padding-right:50rpx ;
float: left;
-
+ border-radius: 50rpx;
+ height: 50rpx;
+ background-color: #333;
+ text-align: center;
+ line-height: 50rpx;
+ color: #9999cc;
}
.name{
width: 220rpx;
@@ -104,9 +119,10 @@ text-align: center;
float: left;
color: #ff3366;
line-height: 60rpx;
+ font-size: 28rpx;
}
.price{
- font-size: 34rpx;
+ font-size: 28rpx;
color: #ff3366;
float: left;
line-height: 60rpx;
diff --git a/pages/publicity/publicity.js b/pages/publicity/publicity.js
index 301e24b..0548eda 100644
--- a/pages/publicity/publicity.js
+++ b/pages/publicity/publicity.js
@@ -3,6 +3,7 @@ const config = require("../../config/config")
const Http = require("../../utils/HttpBasics.js")
const navigationBarHeight = (getApp().statusBarHeight + 44)+"px"
var WxParse = require('../../wxParse/wxParse.js');
+const convert = require("../../utils/util.js")
Page({
data:{
imgHttps:app.globalData.imgHttps,
@@ -16,8 +17,14 @@ Page({
url:config.api.getPublicityDetail,
data:{id:this.data.id}
}).then(res=>{
+ let temp = res.data
+ if(temp.ttCoupons){
+ temp.ttCoupons.map(item=>{
+ item.popularity = convert.moodsText(item.popularity)
+ })
+ }
this.setData({
- allLsit:res.data
+ allLsit:temp
})
}).catch(err=>{
tt.showToast({
diff --git a/pages/publicity/publicity.ttml b/pages/publicity/publicity.ttml
index fe37666..8ee3055 100644
--- a/pages/publicity/publicity.ttml
+++ b/pages/publicity/publicity.ttml
@@ -17,12 +17,11 @@
{{item.title}}
-
-
-
- {{item.merchantName}}
-
-
+
+
+
+ {{item.merchantName}}
+
diff --git a/pages/publicity/publicity.ttss b/pages/publicity/publicity.ttss
index ec1c510..88512a5 100644
--- a/pages/publicity/publicity.ttss
+++ b/pages/publicity/publicity.ttss
@@ -63,28 +63,32 @@
float: left;
}
.courseName{
- height: 50rpx;
- line-height: 50rpx;
+ width: 100%;
+ height: 40rpx;
+ line-height: 40rpx;
font-size: 30rpx;
+ color: #ffffff;
+ font-weight: 500;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:1;
- color: #ffffff;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FEFEFE;
}
.headImg{
- float: left;
+ position: absolute;
+
width: 50rpx;
height: 50rpx;
border-radius: 50%;
+ top: 0;
+ left: 0;
}
.annotation{
- width: 168rpx;
+ padding-left:70rpx ;
+ padding-right:50rpx ;
+ float: left;
border-radius: 50rpx;
height: 50rpx;
background-color: #333;
@@ -93,17 +97,19 @@
color: #9999cc;
}
.incomeBox{
- margin-top: 10rpx;
+ margin-top: 20rpx;
}
.money{
float: left;
color: #ff3366;
font-size: 28rpx;
+ line-height: 30rpx;
}
.py{
float: left;
color: #ff3366;
- font-size: 24rpx;
+ font-size: 28rpx;
+ line-height: 30rpx;
}
.moodsImg{
float: right;
diff --git a/pages/ranking/ranking.js b/pages/ranking/ranking.js
index 85e4b21..7688dd3 100644
--- a/pages/ranking/ranking.js
+++ b/pages/ranking/ranking.js
@@ -2,6 +2,7 @@ const app = getApp()
const navigationBarHeight = (getApp().statusBarHeight + 44)+"px"
const config = require("../../config/config")
const Http = require("../../utils/HttpBasics.js")
+const convert = require("../../utils/util.js")
Page({
data:{
navigationBarHeight,
@@ -35,6 +36,9 @@ Page({
}else{
temp = res.data.list
}
+ temp.map(item => {
+ item.popularity = convert.moodsText(item.popularity)
+ })
this.setData({
list:temp
})
@@ -63,6 +67,9 @@ Page({
}else{
temp = res.data.list
}
+ temp.map(item => {
+ item.popularity = convert.moodsText(item.popularity)
+ })
this.setData({
list:temp
})
@@ -90,6 +97,9 @@ Page({
}else{
temp = res.data.list
}
+ temp.map(item => {
+ item.popularity = convert.moodsText(item.popularity)
+ })
this.setData({
list:temp
})
diff --git a/pages/ranking/ranking.ttml b/pages/ranking/ranking.ttml
index a9fd5db..a322fcf 100644
--- a/pages/ranking/ranking.ttml
+++ b/pages/ranking/ranking.ttml
@@ -20,7 +20,7 @@
{{item.title}}
-
+
{{item.merchantName}}
diff --git a/pages/ranking/ranking.ttss b/pages/ranking/ranking.ttss
index 1fcc70b..c3b5a34 100644
--- a/pages/ranking/ranking.ttss
+++ b/pages/ranking/ranking.ttss
@@ -73,13 +73,18 @@
color: #FEFEFE;
}
.headImg{
- float: left;
+ position: absolute;
+
width: 50rpx;
height: 50rpx;
border-radius: 50%;
+ top: 0;
+ left: 0;
}
.annotation{
- width: 168rpx;
+ padding-left:70rpx ;
+ padding-right:50rpx ;
+ float: left;
border-radius: 50rpx;
height: 50rpx;
background-color: #333;
@@ -94,10 +99,12 @@
float: left;
color: #ff3366;
font-size: 28rpx;
+ /* line-height: 60rpx; */
}
.py{
- font-size: 24rpx;
+ font-size: 28rpx;
float: left;
+ /* line-height: 60rpx; */
color: #ff3366;
}
.moodsImg{
diff --git a/pages/user/user.js b/pages/user/user.js
index 0f2b5f8..9e533dc 100644
--- a/pages/user/user.js
+++ b/pages/user/user.js
@@ -15,41 +15,72 @@ Page({
let _this = this
tt.login({
success(_res) {
- // 获取用户信息
- tt.getUserInfo({
- withCredentials: true,
- // withRealNameAuthenticationInfo: true,
- success(res) {
- console.log(res);
- _this.setData({
- userData: res.userInfo
- })
+ let {code} = _res
+ Http.post({
+ url:config.api.login,
+ data:{
+ code:code,
+ appId:'tt8183f73e1ebb053701'
+ }
+ }).then(res=>{
+ Http.setToken(res.data.token);
+ app.globalData.token = res.data.token
+ tt.getUserInfo({// 获取用户信息
+ withCredentials: true,
+ // withRealNameAuthenticationInfo: true,
+ success(res) {
+ console.log(res);
+ _this.setData({
+ userData: res.userInfo
+ })
+
+ Http.get({
+ url: config.api.checkUserInfo
+ }).then(res => {
+ }).catch(err=>{
+ console.log("我没提交授权",err.code);
+ if(err.code == 11004){
+ Http.post({
+ url:config.api.userInfo,
+ data:{
+ iv:res.iv,
+ encryptedData:res.encryptedData
+ }
+ }).then(res=>{
+ console.log(res);
+ })
+ }
+ })
+
+ },
+ fail(res) {
+ tt.navigateTo({
+ url: 'pages/index/index' // 指定页面的url
+ });
+ },
+ });
- Http.get({
- url: config.api.checkUserInfo
- }).then(res => {
- }).catch(err=>{
- console.log("我没提交授权",err.code);
- if(err.code == 11004){
- Http.post({
- url:config.api.userInfo,
- data:{
- iv:res.iv,
- encryptedData:res.encryptedData
- }
- }).then(res=>{
- console.log(res);
- })
- }
- })
-
- },
- fail(res) {
- tt.navigateTo({
- url: 'pages/index/index' // 指定页面的url
- });
- },
- });
+ }).catch(err=>{
+ console.log(err);
+ tt.showModal({
+ title: '提示',
+ showCancel: false,
+ content: '登录失败,请重新尝试',
+ success: (res) => {
+ if (res.cancel) {
+ //点击取消,默认隐藏弹框
+ } else {
+ //点击确定
+ wx.reLaunch({
+ url: '/pages/index/index',
+ })
+ }
+ }
+ });
+ })
+
+
+
},
});
}
diff --git a/project.config.json b/project.config.json
index 1b04201..2373e0d 100644
--- a/project.config.json
+++ b/project.config.json
@@ -13,7 +13,7 @@
"projectname": "知播堂",
"condition": {
"miniprogram": {
- "current": 1625040084950,
+ "current": -1,
"list": [
{
"id": 1625040084950,