Commit 3bf3b47b authored by Mac's avatar Mac

1

parent c662d6c6
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<view > <view >
<view <view
class="headStatus" class="headStatus"
v-if="scrollTop>180"
:style="[ :style="[
headStyle, headStyle,
]" ]"
...@@ -15,6 +16,18 @@ ...@@ -15,6 +16,18 @@
</view> </view>
<view class="studyBox" :style="{'padding-top':scrollHeight}"> <view class="studyBox" :style="{'padding-top':scrollHeight}">
<view
class="headStatus2"
:style="[
headStyle,
]"
>
<view class="arrow" @click="goback">
<u-icon name="arrow-left" size="48" color="#FFF"></u-icon>
</view>
<view class="title" style="color: #FFF;" >{{pageTitle}}</view>
<view class="arrow"></view>
</view>
<view class="plot"> <view class="plot">
<canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" ></canvas> <canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" ></canvas>
<image mode="aspectFill" class="plotimg" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mystudyrw.png" ></image> <image mode="aspectFill" class="plotimg" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mystudyrw.png" ></image>
...@@ -117,11 +130,6 @@ ...@@ -117,11 +130,6 @@
pricecolor:'', pricecolor:'',
secondary:'', secondary:'',
paddingHTop:0, paddingHTop:0,
list: [{
name: '学习概况'
}, {
name: '课程缓存'
}],
windowWidth:0, windowWidth:0,
scrollTop:0, scrollTop:0,
headStyle:{}, headStyle:{},
...@@ -169,7 +177,7 @@ ...@@ -169,7 +177,7 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.pageTitle, title: this.pageTitle,
}); });
this.getHeadHeight();
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) { if (!this.u) {
this.u = { this.u = {
...@@ -185,23 +193,18 @@ ...@@ -185,23 +193,18 @@
} }
}, },
onPageScroll(e){
this.scrollTop = e.scrollTop
},
methods:{ methods:{
getHeadHeight() {
let that = this;
const query = uni.createSelectorQuery().in(this);
query
.select(".headStatus")
.boundingClientRect((data) => {
console.log(data)
that.scrollHeight = data.height + "px";
})
.exec();
},
goback(){ goback(){
uni.navigateBack({}) uni.navigateBack({})
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
this.getMyStudyTime()//我的学习时间
this.getMyRecentStudyPageList()//最近学习
this.getMyOrderStudyRecordPageList()//我的报名记录列表
}, },
getMyStudyTime(){ getMyStudyTime(){
...@@ -335,6 +338,21 @@ ...@@ -335,6 +338,21 @@
background-size: cover; background-size: cover;
z-index: 999; z-index: 999;
} }
.mystudy .headStatus2 {
overflow: hidden;
position: relative;
width: 100vw;
padding-bottom: 10px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background: #FFF;
background-image: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mystudybg.png');
background-repeat: no-repeat;
background-size: cover;
z-index: 999;
}
.mystudy .arrow { .mystudy .arrow {
height: 24px; height: 24px;
margin: 5px; margin: 5px;
...@@ -373,7 +391,7 @@ ...@@ -373,7 +391,7 @@
border-top-left-radius:30px ; border-top-left-radius:30px ;
border-top-right-radius: 30px; border-top-right-radius: 30px;
margin-top: -24px; margin-top: -24px;
z-index: 99999; z-index: 995;
} }
.mystudy .s-b-time{ .mystudy .s-b-time{
width: 100%; width: 100%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment