Commit c662d6c6 authored by Mac's avatar Mac

1

parent a2dc5494
<template>
<scroll-view class="mystudy"
:scroll-y="true"
@scroll="scrollHandler"
@scrolltoupper="scrollTopHandler"
>
<view class="mystudy">
<view >
<view
class="headStatus"
v-if="scrollTop > 180"
:style="[
headStyle,
]"
>
<view class="arrow" @click="goback">
......@@ -20,20 +14,8 @@
<view class="arrow"></view>
</view>
<view class="studyBox" >
<view class="studyBox" :style="{'padding-top':scrollHeight}">
<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>
<image mode="aspectFill" class="plotimg" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mystudyrw.png" ></image>
......@@ -116,7 +98,7 @@
</view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</scroll-view>
</view>
</template>
<script>
......@@ -155,7 +137,6 @@
pixelRatio:1,
textarea:'',
scrollHeight:0,
scrollTop:0,
}
},
components: {
......@@ -188,6 +169,7 @@
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.getHeadHeight();
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
......@@ -200,16 +182,20 @@
this.getMyStudyTime()//我的学习时间
this.getMyRecentStudyPageList()//最近学习
this.getMyOrderStudyRecordPageList()//我的报名记录列表
}
},
methods:{
scrollHandler(e) {
this.scrollTop = e.detail.scrollTop;
//this.$forceUpdate();
},
scrollTopHandler() {
this.scrollTop = 0;
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(){
uni.navigateBack({})
......@@ -335,7 +321,7 @@
width: 140vw;
padding-right: 40vw;
padding-bottom: 10px;
position: fixed;
position: fixed;
left: 0;
right: 0;
top: 0;
......@@ -349,21 +335,10 @@
background-size: cover;
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 {
height: 24px;
margin: 5px;
width: 24px;
}
.mystudy .studyBox{
width: 100%;
......@@ -373,11 +348,8 @@
}
.mystudy .plot{
width: 750upx;
height: 540upx;
height: 400upx;
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 {
width: 750upx;
......@@ -401,7 +373,7 @@
border-top-left-radius:30px ;
border-top-right-radius: 30px;
margin-top: -24px;
z-index: 997;
z-index: 99999;
}
.mystudy .s-b-time{
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