Commit c662d6c6 authored by Mac's avatar Mac

1

parent a2dc5494
<template> <template>
<scroll-view class="mystudy" <view class="mystudy">
:scroll-y="true"
@scroll="scrollHandler"
@scrolltoupper="scrollTopHandler"
>
<view > <view >
<view <view
class="headStatus" class="headStatus"
v-if="scrollTop > 180"
:style="[ :style="[
headStyle, headStyle,
]" ]"
> >
<view class="arrow" @click="goback"> <view class="arrow" @click="goback">
...@@ -20,20 +14,8 @@ ...@@ -20,20 +14,8 @@
<view class="arrow"></view> <view class="arrow"></view>
</view> </view>
<view class="studyBox" > <view class="studyBox" :style="{'padding-top':scrollHeight}">
<view class="plot"> <view class="plot">
<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>
<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>
...@@ -116,7 +98,7 @@ ...@@ -116,7 +98,7 @@
</view> </view>
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</scroll-view> </view>
</template> </template>
<script> <script>
...@@ -155,7 +137,6 @@ ...@@ -155,7 +137,6 @@
pixelRatio:1, pixelRatio:1,
textarea:'', textarea:'',
scrollHeight:0, scrollHeight:0,
scrollTop:0,
} }
}, },
components: { components: {
...@@ -188,6 +169,7 @@ ...@@ -188,6 +169,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 = {
...@@ -200,16 +182,20 @@ ...@@ -200,16 +182,20 @@
this.getMyStudyTime()//我的学习时间 this.getMyStudyTime()//我的学习时间
this.getMyRecentStudyPageList()//最近学习 this.getMyRecentStudyPageList()//最近学习
this.getMyOrderStudyRecordPageList()//我的报名记录列表 this.getMyOrderStudyRecordPageList()//我的报名记录列表
} }
}, },
methods:{ methods:{
getHeadHeight() {
scrollHandler(e) { let that = this;
this.scrollTop = e.detail.scrollTop; const query = uni.createSelectorQuery().in(this);
//this.$forceUpdate(); query
}, .select(".headStatus")
scrollTopHandler() { .boundingClientRect((data) => {
this.scrollTop = 0; console.log(data)
that.scrollHeight = data.height + "px";
})
.exec();
}, },
goback(){ goback(){
uni.navigateBack({}) uni.navigateBack({})
...@@ -335,7 +321,7 @@ ...@@ -335,7 +321,7 @@
width: 140vw; width: 140vw;
padding-right: 40vw; padding-right: 40vw;
padding-bottom: 10px; padding-bottom: 10px;
position: fixed; position: fixed;
left: 0; left: 0;
right: 0; right: 0;
top: 0; top: 0;
...@@ -349,21 +335,10 @@ ...@@ -349,21 +335,10 @@
background-size: cover; background-size: cover;
z-index: 999; z-index: 999;
} }
.headStatus2{
width: 140vw;
padding-right: 40vw;
padding-bottom: 10px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.mystudy .arrow { .mystudy .arrow {
height: 24px; height: 24px;
margin: 5px; margin: 5px;
width: 24px; width: 24px;
} }
.mystudy .studyBox{ .mystudy .studyBox{
width: 100%; width: 100%;
...@@ -373,11 +348,8 @@ ...@@ -373,11 +348,8 @@
} }
.mystudy .plot{ .mystudy .plot{
width: 750upx; width: 750upx;
height: 540upx; height: 400upx;
position: relative; position: relative;
background-image: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mystudybg.png');
background-repeat: no-repeat;
background-size: cover;
} }
.plot .charts { .plot .charts {
width: 750upx; width: 750upx;
...@@ -401,7 +373,7 @@ ...@@ -401,7 +373,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: 997; z-index: 99999;
} }
.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