@@ -8,7 +8,7 @@ Page({ | |||||
navigationBarHeight, | navigationBarHeight, | ||||
id:"",//upid | id:"",//upid | ||||
name:'',//upName | name:'',//upName | ||||
indexFlog:1,//选着类别 | |||||
indexFlog:2,//选着类别 | |||||
upData:{},//作者信息 | upData:{},//作者信息 | ||||
pageNum:1, | pageNum:1, | ||||
classList:[],//课程列表 | classList:[],//课程列表 | ||||
@@ -1,7 +1,6 @@ | |||||
<view id="BoxBg"> | <view id="BoxBg"> | ||||
<view class="Box"> | <view class="Box"> | ||||
<navbar back text="{{name}}" background="#0E1119" color="#fff"></navbar> | |||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<navbar back text="{{name}}" background=" rgba(255, 255, 255, 0);" color="#fff"></navbar> | |||||
<image class="backImg" src="{{imgHttps+'upzy_tab_bnt.png'}}" mode="" /> | <image class="backImg" src="{{imgHttps+'upzy_tab_bnt.png'}}" mode="" /> | ||||
<image src="{{upData.imgUrl}}" mode="" class="headImg" /> | <image src="{{upData.imgUrl}}" mode="" class="headImg" /> | ||||
<view class="category">{{upData.sring}}</view> | <view class="category">{{upData.sring}}</view> | ||||
@@ -11,14 +10,14 @@ | |||||
</view> | </view> | ||||
<view class="text">{{upData.introduction}}</view> | <view class="text">{{upData.introduction}}</view> | ||||
<view class="classifyBox oh"> | <view class="classifyBox oh"> | ||||
<view class="singleBox"> | |||||
<view class="{{indexFlog==1?'singleText_a':'singleText'}}" bindtap="setIndex" data-index="{{1}}">专栏</view> | |||||
<view class="singleXian" tt:if="{{indexFlog==1}}"></view> | |||||
</view> | |||||
<view class="multiBox"> | <view class="multiBox"> | ||||
<view class="{{indexFlog==2?'singleText_a':'singleText'}}" bindtap="setIndex" data-index="{{2}}">单课程</view> | <view class="{{indexFlog==2?'singleText_a':'singleText'}}" bindtap="setIndex" data-index="{{2}}">单课程</view> | ||||
<view class="singleXian" tt:if="{{indexFlog==2}}"></view> | |||||
</view> | </view> | ||||
<view class="singleBox"> | |||||
<view class="{{indexFlog==1?'singleText_a':'singleText'}}" bindtap="setIndex" data-index="{{1}}">专栏</view> | |||||
</view> | |||||
</view> | </view> | ||||
@@ -4,22 +4,22 @@ | |||||
} | } | ||||
.backImg{ | .backImg{ | ||||
width: 100%; | width: 100%; | ||||
height: 400rpx; | |||||
height: 380rpx; | |||||
} | } | ||||
.headImg{ | .headImg{ | ||||
position: absolute; | position: absolute; | ||||
border: 1rpx solid #07E881; | border: 1rpx solid #07E881; | ||||
width: 200rpx; | |||||
height: 200rpx; | |||||
width: 160rpx; | |||||
height: 160rpx; | |||||
border-radius: 50%; | border-radius: 50%; | ||||
top: 480rpx; | |||||
top: 320rpx; | |||||
left: 50rpx; | left: 50rpx; | ||||
} | } | ||||
.category{ | .category{ | ||||
position: absolute; | position: absolute; | ||||
top: 560rpx; | |||||
left: 300rpx; | |||||
top: 410rpx; | |||||
left: 260rpx; | |||||
padding: 20rpx; | padding: 20rpx; | ||||
border-radius: 10rpx; | border-radius: 10rpx; | ||||
background-color: #222735; | background-color: #222735; | ||||
@@ -27,7 +27,7 @@ | |||||
line-height: 32rpx; | line-height: 32rpx; | ||||
} | } | ||||
.nameBox{ | .nameBox{ | ||||
margin-top: 180rpx; | |||||
margin-top: 150rpx; | |||||
} | } | ||||
.userName{ | .userName{ | ||||
height: 50rpx; | height: 50rpx; | ||||
@@ -42,7 +42,7 @@ | |||||
.text{ | .text{ | ||||
width: 90%; | width: 90%; | ||||
margin: 20rpx auto; | margin: 20rpx auto; | ||||
height: 120rpx; | |||||
/* height: 120rpx; */ | |||||
overflow: hidden; | overflow: hidden; | ||||
font-size: 28rpx; | font-size: 28rpx; | ||||
font-family: PingFang SC; | font-family: PingFang SC; | ||||
@@ -51,25 +51,21 @@ | |||||
line-height: 36rpx; | line-height: 36rpx; | ||||
} | } | ||||
.classifyBox{ | .classifyBox{ | ||||
height: 120rpx; | |||||
height: 100rpx; | |||||
background: #121620; | background: #121620; | ||||
} | } | ||||
.singleBox{ | .singleBox{ | ||||
float: left; | float: left; | ||||
margin-left: 30rpx; | |||||
margin-left: 40rpx; | |||||
} | } | ||||
.multiBox{ | .multiBox{ | ||||
float: left; | float: left; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
.singleXian{ | |||||
width: 60rpx; | |||||
height: 2rpx; | |||||
background-color: #07E881; | |||||
margin-left: 20rpx; | |||||
} | |||||
.singleText{ | .singleText{ | ||||
font-size: 30rpx; | font-size: 30rpx; | ||||
font-family: OPPOSans; | font-family: OPPOSans; | ||||
@@ -87,6 +83,7 @@ | |||||
line-height: 35rpx; | line-height: 35rpx; | ||||
padding: 10px 0; | padding: 10px 0; | ||||
margin-left: 20rpx; | margin-left: 20rpx; | ||||
border-bottom: 1rpx solid #07E881; | |||||
} | } | ||||
.classBox{ | .classBox{ | ||||
margin: 20rpx; | margin: 20rpx; | ||||
@@ -4,6 +4,7 @@ const config = require("../../config/config") | |||||
const Http = require("../../utils/HttpBasics.js") | const Http = require("../../utils/HttpBasics.js") | ||||
Page({ | Page({ | ||||
data: { | data: { | ||||
showAddBox:{}, | |||||
ifPay: app.globalData.platform, | ifPay: app.globalData.platform, | ||||
classTitle: "",//课程标题 | classTitle: "",//课程标题 | ||||
showIos: false,//ios字符提示 | showIos: false,//ios字符提示 | ||||
@@ -117,26 +118,46 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
hieaddCheck() { | hieaddCheck() { | ||||
let animation = tt.createAnimation({ | |||||
duration: 1000, | |||||
timingFunction: "ease", | |||||
}); | |||||
animation.opacity(0).step() | |||||
this.setData({ | this.setData({ | ||||
extraClasses: 'addBox-transition', | |||||
// extraClasses: 'addBox-transition', | |||||
showAddBox:animation.export(), | |||||
addFlag: true | addFlag: true | ||||
}) | }) | ||||
}, | }, | ||||
addCheck() {//动画 | |||||
showAddCheck:function(){ | |||||
this.setData({ | this.setData({ | ||||
addFlag: false | 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) { | setColumnIndex(e) { | ||||
let index = e.currentTarget.dataset.index | let index = e.currentTarget.dataset.index | ||||
this.setData({ | this.setData({ | ||||
@@ -183,7 +204,7 @@ Page({ | |||||
}, | }, | ||||
success: (res) => { | success: (res) => { | ||||
_this.setData({ | _this.setData({ | ||||
goPayFlag:false | |||||
goPayFlag: false | |||||
}) | }) | ||||
_this.getData() | _this.getData() | ||||
}, | }, | ||||
@@ -337,9 +358,9 @@ Page({ | |||||
this.setData({ | this.setData({ | ||||
iscollect: res.data | iscollect: res.data | ||||
}) | }) | ||||
}).catch(err=>{ | |||||
}).catch(err => { | |||||
this.setData({ | this.setData({ | ||||
iscollect:false | |||||
iscollect: false | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -386,13 +407,14 @@ Page({ | |||||
}); | }); | ||||
}) | }) | ||||
}, | }, | ||||
onReady() { | onReady() { | ||||
this.setData({ | this.setData({ | ||||
videoContext: wx.createVideoContext('myVideo') | videoContext: wx.createVideoContext('myVideo') | ||||
}) | }) | ||||
}, | }, | ||||
onLoad(options) { | onLoad(options) { | ||||
if(app.globalData.token){ | |||||
if (app.globalData.token) { | |||||
if (options.id) { | if (options.id) { | ||||
this.setData({ | this.setData({ | ||||
id: options.id, | id: options.id, | ||||
@@ -401,8 +423,8 @@ Page({ | |||||
this.ifCollect() | this.ifCollect() | ||||
this.getData() | this.getData() | ||||
} | } | ||||
}else{ | |||||
app.tokenCallback = token =>{ | |||||
} else { | |||||
app.tokenCallback = token => { | |||||
if (options.id) { | if (options.id) { | ||||
this.setData({ | this.setData({ | ||||
id: options.id, | id: options.id, | ||||
@@ -413,33 +435,41 @@ Page({ | |||||
} | } | ||||
} | } | ||||
} | } | ||||
}, | }, | ||||
onShow() { | onShow() { | ||||
let animation = tt.createAnimation({ | |||||
duration: 0, | |||||
// timingFunction: "ease", | |||||
}); | |||||
animation.opacity(0).step() | |||||
this.setData({ | |||||
showAddBox:animation.export(), | |||||
}) | |||||
}, | }, | ||||
onShareAppMessage: function (shareOption) { | onShareAppMessage: function (shareOption) { | ||||
console.log(this.data.data.dyTitle); | 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: ``, // 分享的路径 | |||||
} | |||||
} | |||||
}, | |||||
}) | }) |
@@ -150,10 +150,9 @@ | |||||
<image class="shuo" src="{{imgHttps+'details_ml_wgm.png'}}" mode="" tt:if="{{anthology==!index}}"/> --> | <image class="shuo" src="{{imgHttps+'details_ml_wgm.png'}}" mode="" tt:if="{{anthology==!index}}"/> --> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="hit"></view> | |||||
<image catchtap="addCheck" class="add" src="{{imgHttps+'details_bat_xf_zk.png'}}" mode="" tt:if="{{addFlag}}"/> | |||||
<!-- 入驻 挂载 --> | <!-- 入驻 挂载 --> | ||||
<view class="addBox {{extraClasses}} oh"> | |||||
<image catchtap="showAddCheck" class="add" src="{{imgHttps+'details_bat_xf_zk.png'}}" mode="" tt:if="{{addFlag}}"/> | |||||
<view class="addBox " animation="{{showAddBox}}"> | |||||
<view class="goruzu oh"> | <view class="goruzu oh"> | ||||
<button class="mount oh" open-type="share" data-channel="video"> | <button class="mount oh" open-type="share" data-channel="video"> | ||||
<image src="{{imgHttps+'details_xf_ic_fbsp.png'}}" mode="" class="video"/> | <image src="{{imgHttps+'details_xf_ic_fbsp.png'}}" mode="" class="video"/> | ||||
@@ -168,6 +167,9 @@ | |||||
<view class="issue" url="/pages/upEnter/upEnter">申请入驻</view> | <view class="issue" url="/pages/upEnter/upEnter">申请入驻</view> | ||||
</navigator> | </navigator> | ||||
</view> | </view> | ||||
<view class="hit"></view> | |||||
<!-- 分享 咨询 购买 --> | <!-- 分享 咨询 购买 --> | ||||
<view class="shareBox oh"> | <view class="shareBox oh"> | ||||
<image class="shareImg" src="{{imgHttps+'details_bat_fx.png'}}" mode=""/> | <image class="shareImg" src="{{imgHttps+'details_bat_fx.png'}}" mode=""/> | ||||
@@ -180,6 +182,7 @@ | |||||
<view class="nOshopping" bindtap="showIos" tt:if="{{ifPay=='ios'&&!data.view}}">¥{{data.salePriceStr}}</view> | <view class="nOshopping" bindtap="showIos" tt:if="{{ifPay=='ios'&&!data.view}}">¥{{data.salePriceStr}}</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- <view class="temp"></view> --> | |||||
<prompt bind:hie="cancelIos" tt:if="{{showIos}}" titil="提示" text="Ios当前暂不支持购买" hidText="确定" ></prompt> | <prompt bind:hie="cancelIos" tt:if="{{showIos}}" titil="提示" text="Ios当前暂不支持购买" hidText="确定" ></prompt> | ||||
</view> | </view> |
@@ -1,6 +1,9 @@ | |||||
.Box{ | .Box{ | ||||
min-height: 100vh; | min-height: 100vh; | ||||
} | } | ||||
#BoxBg{ | |||||
position: relative; | |||||
} | |||||
#myVideo{ | #myVideo{ | ||||
width: 100%; | width: 100%; | ||||
height: 420rpx; | height: 420rpx; | ||||
@@ -216,39 +219,19 @@ | |||||
position: fixed; | position: fixed; | ||||
right: 0; | right: 0; | ||||
bottom: 274rpx; | bottom: 274rpx; | ||||
z-index: 100000000000000000; | |||||
} | } | ||||
.addBox{ | .addBox{ | ||||
padding: 0 40rpx; | padding: 0 40rpx; | ||||
/* width: 90%; */ | |||||
height: 100rpx; | height: 100rpx; | ||||
background: linear-gradient(0deg, #2A3042, #464D61); | background: linear-gradient(0deg, #2A3042, #464D61); | ||||
background-color: #2A3042; | |||||
box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.93); | box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.93); | ||||
border-radius: 49rpx; | border-radius: 49rpx; | ||||
position: fixed; | position: fixed; | ||||
left: 100%; | |||||
left: 5%; | |||||
bottom: 300rpx; | 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{ | .goruzu{ | ||||
float: left; | float: left; | ||||
} | } | ||||
@@ -660,7 +643,7 @@ | |||||
margin: 10rpx 20rpx 20rpx 20rpx; | margin: 10rpx 20rpx 20rpx 20rpx; | ||||
} | } | ||||
.answer::before{ | .answer::before{ | ||||
content: "´ð£º"; | |||||
content: "ç”:"; | |||||
color: #07E881; | color: #07E881; | ||||
} | } | ||||
button::after { | button::after { | ||||
@@ -682,3 +665,12 @@ button { | |||||
button { | button { | ||||
border-radius:0; | border-radius:0; | ||||
} | } | ||||
.temp{ | |||||
position: fixed; | |||||
width: 100rpx; | |||||
height: 100rpx; | |||||
background: linear-gradient(0deg, #2A3042, #464D61); | |||||
border-radius: 50%; | |||||
top: 200px; | |||||
left: 0; | |||||
} |
@@ -241,4 +241,27 @@ Page({ | |||||
this.getSwiperLsit() | this.getSwiperLsit() | ||||
tt.stopPullDownRefresh(); | 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: ``, // 分享的路径 | |||||
} | |||||
} | |||||
}, | |||||
}) | }) |
@@ -24,11 +24,14 @@ | |||||
<view class="h3"> | <view class="h3"> | ||||
{{item.productTitle}} | {{item.productTitle}} | ||||
</view> | </view> | ||||
<image class="headImg" src="{{item.authorPic}}" mode="" /> | |||||
<view class="name"> | |||||
{{item.author}} | |||||
</view> | |||||
<view class="oh" style="margin-top: 10rpx; position: relative;"> | |||||
<image class="headImg" src="{{item.authorPic}}" mode="" /> | |||||
<view class="annotation"> | |||||
{{item.author}} | |||||
</view> | |||||
</view> | |||||
<view class="priceBox"> | <view class="priceBox"> | ||||
<view class="priceF"> | <view class="priceF"> | ||||
@@ -60,32 +60,47 @@ text-align: center; | |||||
width: 250rpx; | width: 250rpx; | ||||
height: 160rpx; | height: 160rpx; | ||||
border-radius: 10rpx; | border-radius: 10rpx; | ||||
background-color: coral; | |||||
} | } | ||||
.courseBox { | .courseBox { | ||||
width: 320rpx; | |||||
margin-left: 30rpx; | margin-left: 30rpx; | ||||
float: left; | float: left; | ||||
} | } | ||||
.h3{ | .h3{ | ||||
width: 300rpx; | |||||
line-height: 60rpx; | |||||
font-size: 34rpx; | |||||
color: #ffffff; | |||||
font-weight: 560; | |||||
height: 50rpx; | |||||
line-height: 50rpx; | |||||
font-size: 30rpx; | |||||
overflow:hidden; | overflow:hidden; | ||||
text-overflow:ellipsis; | text-overflow:ellipsis; | ||||
display:-webkit-box; | display:-webkit-box; | ||||
-webkit-box-orient:vertical; | -webkit-box-orient:vertical; | ||||
-webkit-line-clamp:1; | -webkit-line-clamp:1; | ||||
color: #ffffff; | |||||
font-family: PingFang SC; | |||||
font-weight: 500; | |||||
color: #FEFEFE; | |||||
} | } | ||||
.headImg{ | .headImg{ | ||||
width: 60rpx; | |||||
height: 60rpx; | |||||
position: absolute; | |||||
width: 50rpx; | |||||
height: 50rpx; | |||||
border-radius: 50%; | border-radius: 50%; | ||||
top: 0; | |||||
left: 0; | |||||
} | |||||
.annotation{ | |||||
padding-left:70rpx ; | |||||
padding-right:50rpx ; | |||||
float: left; | float: left; | ||||
border-radius: 50rpx; | |||||
height: 50rpx; | |||||
background-color: #333; | |||||
text-align: center; | |||||
line-height: 50rpx; | |||||
color: #9999cc; | |||||
} | } | ||||
.name{ | .name{ | ||||
width: 220rpx; | width: 220rpx; | ||||
@@ -104,9 +119,10 @@ text-align: center; | |||||
float: left; | float: left; | ||||
color: #ff3366; | color: #ff3366; | ||||
line-height: 60rpx; | line-height: 60rpx; | ||||
font-size: 28rpx; | |||||
} | } | ||||
.price{ | .price{ | ||||
font-size: 34rpx; | |||||
font-size: 28rpx; | |||||
color: #ff3366; | color: #ff3366; | ||||
float: left; | float: left; | ||||
line-height: 60rpx; | line-height: 60rpx; | ||||
@@ -3,6 +3,7 @@ const config = require("../../config/config") | |||||
const Http = require("../../utils/HttpBasics.js") | const Http = require("../../utils/HttpBasics.js") | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44)+"px" | const navigationBarHeight = (getApp().statusBarHeight + 44)+"px" | ||||
var WxParse = require('../../wxParse/wxParse.js'); | var WxParse = require('../../wxParse/wxParse.js'); | ||||
const convert = require("../../utils/util.js") | |||||
Page({ | Page({ | ||||
data:{ | data:{ | ||||
imgHttps:app.globalData.imgHttps, | imgHttps:app.globalData.imgHttps, | ||||
@@ -16,8 +17,14 @@ Page({ | |||||
url:config.api.getPublicityDetail, | url:config.api.getPublicityDetail, | ||||
data:{id:this.data.id} | data:{id:this.data.id} | ||||
}).then(res=>{ | }).then(res=>{ | ||||
let temp = res.data | |||||
if(temp.ttCoupons){ | |||||
temp.ttCoupons.map(item=>{ | |||||
item.popularity = convert.moodsText(item.popularity) | |||||
}) | |||||
} | |||||
this.setData({ | this.setData({ | ||||
allLsit:res.data | |||||
allLsit:temp | |||||
}) | }) | ||||
}).catch(err=>{ | }).catch(err=>{ | ||||
tt.showToast({ | tt.showToast({ | ||||
@@ -17,12 +17,11 @@ | |||||
<view class="courseName"> | <view class="courseName"> | ||||
{{item.title}} | {{item.title}} | ||||
</view> | </view> | ||||
<view class="oh" style="margin-top: 10rpx;"> | |||||
<image class="headImg" src="{{item.merchantPic}}" mode="" /> | |||||
<view class="annotation"> | |||||
{{item.merchantName}} | |||||
</view> | |||||
<view class="oh" style=" position: relative; margin-top: 20rpx;"> | |||||
<image class="headImg" src="{{item.merchantPic}}" mode="" /> | |||||
<view class="annotation"> | |||||
{{item.merchantName}} | |||||
</view> | |||||
</view> | </view> | ||||
<view class="incomeBox oh"> | <view class="incomeBox oh"> | ||||
<view class="py" tt:if="{{item.salePriceStr!=0}}"> | <view class="py" tt:if="{{item.salePriceStr!=0}}"> | ||||
@@ -63,28 +63,32 @@ | |||||
float: left; | float: left; | ||||
} | } | ||||
.courseName{ | .courseName{ | ||||
height: 50rpx; | |||||
line-height: 50rpx; | |||||
width: 100%; | |||||
height: 40rpx; | |||||
line-height: 40rpx; | |||||
font-size: 30rpx; | font-size: 30rpx; | ||||
color: #ffffff; | |||||
font-weight: 500; | |||||
overflow:hidden; | overflow:hidden; | ||||
text-overflow:ellipsis; | text-overflow:ellipsis; | ||||
display:-webkit-box; | display:-webkit-box; | ||||
-webkit-box-orient:vertical; | -webkit-box-orient:vertical; | ||||
-webkit-line-clamp:1; | -webkit-line-clamp:1; | ||||
color: #ffffff; | |||||
font-family: PingFang SC; | |||||
font-weight: 500; | |||||
color: #FEFEFE; | |||||
} | } | ||||
.headImg{ | .headImg{ | ||||
float: left; | |||||
position: absolute; | |||||
width: 50rpx; | width: 50rpx; | ||||
height: 50rpx; | height: 50rpx; | ||||
border-radius: 50%; | border-radius: 50%; | ||||
top: 0; | |||||
left: 0; | |||||
} | } | ||||
.annotation{ | .annotation{ | ||||
width: 168rpx; | |||||
padding-left:70rpx ; | |||||
padding-right:50rpx ; | |||||
float: left; | |||||
border-radius: 50rpx; | border-radius: 50rpx; | ||||
height: 50rpx; | height: 50rpx; | ||||
background-color: #333; | background-color: #333; | ||||
@@ -93,17 +97,19 @@ | |||||
color: #9999cc; | color: #9999cc; | ||||
} | } | ||||
.incomeBox{ | .incomeBox{ | ||||
margin-top: 10rpx; | |||||
margin-top: 20rpx; | |||||
} | } | ||||
.money{ | .money{ | ||||
float: left; | float: left; | ||||
color: #ff3366; | color: #ff3366; | ||||
font-size: 28rpx; | font-size: 28rpx; | ||||
line-height: 30rpx; | |||||
} | } | ||||
.py{ | .py{ | ||||
float: left; | float: left; | ||||
color: #ff3366; | color: #ff3366; | ||||
font-size: 24rpx; | |||||
font-size: 28rpx; | |||||
line-height: 30rpx; | |||||
} | } | ||||
.moodsImg{ | .moodsImg{ | ||||
float: right; | float: right; | ||||
@@ -2,6 +2,7 @@ const app = getApp() | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44)+"px" | const navigationBarHeight = (getApp().statusBarHeight + 44)+"px" | ||||
const config = require("../../config/config") | const config = require("../../config/config") | ||||
const Http = require("../../utils/HttpBasics.js") | const Http = require("../../utils/HttpBasics.js") | ||||
const convert = require("../../utils/util.js") | |||||
Page({ | Page({ | ||||
data:{ | data:{ | ||||
navigationBarHeight, | navigationBarHeight, | ||||
@@ -35,6 +36,9 @@ Page({ | |||||
}else{ | }else{ | ||||
temp = res.data.list | temp = res.data.list | ||||
} | } | ||||
temp.map(item => { | |||||
item.popularity = convert.moodsText(item.popularity) | |||||
}) | |||||
this.setData({ | this.setData({ | ||||
list:temp | list:temp | ||||
}) | }) | ||||
@@ -63,6 +67,9 @@ Page({ | |||||
}else{ | }else{ | ||||
temp = res.data.list | temp = res.data.list | ||||
} | } | ||||
temp.map(item => { | |||||
item.popularity = convert.moodsText(item.popularity) | |||||
}) | |||||
this.setData({ | this.setData({ | ||||
list:temp | list:temp | ||||
}) | }) | ||||
@@ -90,6 +97,9 @@ Page({ | |||||
}else{ | }else{ | ||||
temp = res.data.list | temp = res.data.list | ||||
} | } | ||||
temp.map(item => { | |||||
item.popularity = convert.moodsText(item.popularity) | |||||
}) | |||||
this.setData({ | this.setData({ | ||||
list:temp | list:temp | ||||
}) | }) | ||||
@@ -20,7 +20,7 @@ | |||||
<view class="courseName"> | <view class="courseName"> | ||||
{{item.title}} | {{item.title}} | ||||
</view> | </view> | ||||
<view class="oh" style="margin-top: 10rpx;"> | |||||
<view class="oh" style="margin-top: 10rpx; position: relative;"> | |||||
<image class="headImg" src="{{item.merchantPic}}" mode="" /> | <image class="headImg" src="{{item.merchantPic}}" mode="" /> | ||||
<view class="annotation"> | <view class="annotation"> | ||||
{{item.merchantName}} | {{item.merchantName}} | ||||
@@ -73,13 +73,18 @@ | |||||
color: #FEFEFE; | color: #FEFEFE; | ||||
} | } | ||||
.headImg{ | .headImg{ | ||||
float: left; | |||||
position: absolute; | |||||
width: 50rpx; | width: 50rpx; | ||||
height: 50rpx; | height: 50rpx; | ||||
border-radius: 50%; | border-radius: 50%; | ||||
top: 0; | |||||
left: 0; | |||||
} | } | ||||
.annotation{ | .annotation{ | ||||
width: 168rpx; | |||||
padding-left:70rpx ; | |||||
padding-right:50rpx ; | |||||
float: left; | |||||
border-radius: 50rpx; | border-radius: 50rpx; | ||||
height: 50rpx; | height: 50rpx; | ||||
background-color: #333; | background-color: #333; | ||||
@@ -94,10 +99,12 @@ | |||||
float: left; | float: left; | ||||
color: #ff3366; | color: #ff3366; | ||||
font-size: 28rpx; | font-size: 28rpx; | ||||
/* line-height: 60rpx; */ | |||||
} | } | ||||
.py{ | .py{ | ||||
font-size: 24rpx; | |||||
font-size: 28rpx; | |||||
float: left; | float: left; | ||||
/* line-height: 60rpx; */ | |||||
color: #ff3366; | color: #ff3366; | ||||
} | } | ||||
.moodsImg{ | .moodsImg{ | ||||
@@ -15,41 +15,72 @@ Page({ | |||||
let _this = this | let _this = this | ||||
tt.login({ | tt.login({ | ||||
success(_res) { | 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', | |||||
}) | |||||
} | |||||
} | |||||
}); | |||||
}) | |||||
}, | }, | ||||
}); | }); | ||||
} | } |
@@ -13,7 +13,7 @@ | |||||
"projectname": "知播堂", | "projectname": "知播堂", | ||||
"condition": { | "condition": { | ||||
"miniprogram": { | "miniprogram": { | ||||
"current": 1625040084950, | |||||
"current": -1, | |||||
"list": [ | "list": [ | ||||
{ | { | ||||
"id": 1625040084950, | "id": 1625040084950, | ||||