Commit 753018f9 authored by Mac's avatar Mac

1

parent ccf5f2e0
<template>
<view class="mystudy">
<scroll-view class="mystudy"
:scroll-y="true"
@scroll="scrollHandler"
@scrolltoupper="scrollTopHandler"
>
<view >
<view
class="headStatus"
v-if="scrollTop > 180"
:style="[
headStyle,
]"
>
<view class="arrow" @click="goback">
......@@ -14,8 +20,20 @@
<view class="arrow"></view>
</view>
<view class="studyBox" :style="{'padding-top':scrollHeight}">
<view class="studyBox" >
<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>
......@@ -90,7 +108,7 @@
</view>
</view>
</view>
<view style="width: 100%;height: 500px;"></view>
</view>
<view style="width: 100%;background: #FFF;" v-if="StudyRecord.length==0">
<u-empty text="暂无报名记录" mode="list"></u-empty>
......@@ -98,7 +116,7 @@
</view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view>
</scroll-view>
</template>
<script>
......@@ -137,6 +155,7 @@
pixelRatio:1,
textarea:'',
scrollHeight:0,
scrollTop:0,
}
},
components: {
......@@ -169,7 +188,6 @@
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.getHeadHeight();
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
......@@ -182,20 +200,16 @@
this.getMyStudyTime()//我的学习时间
this.getMyRecentStudyPageList()//最近学习
this.getMyOrderStudyRecordPageList()//我的报名记录列表
}
},
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();
scrollHandler(e) {
this.scrollTop = e.detail.scrollTop;
//this.$forceUpdate();
},
scrollTopHandler() {
this.scrollTop = 0;
},
goback(){
uni.navigateBack({})
......@@ -211,7 +225,7 @@
},
res => {
this.studyTime = res.data
let LineA={categories:[],series:[{data:[],name:'学习时间'}]};
let LineA={categories:[],series:[{data:[],name:'学习时间',textColor:'#FFF'}]};
//这里我后台返回的是数组,所以用等于,如果您后台返回的是单条数据,需要push进去
res.data.MyStudyTimeList.forEach(x=>{
let obj = x.Date.split('-')[1]+'.'+x.Date.split('-')[2]
......@@ -321,7 +335,7 @@
width: 140vw;
padding-right: 40vw;
padding-bottom: 10px;
position: fixed;
position: fixed;
left: 0;
right: 0;
top: 0;
......@@ -333,12 +347,23 @@
background-image: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mystudybg.png');
background-repeat: no-repeat;
background-size: cover;
z-index: 9999;
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%;
......@@ -348,8 +373,11 @@
}
.mystudy .plot{
width: 750upx;
height: 400upx;
height: 540upx;
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;
......@@ -373,7 +401,7 @@
border-top-left-radius:30px ;
border-top-right-radius: 30px;
margin-top: -24px;
z-index: 99999;
z-index: 997;
}
.mystudy .s-b-time{
width: 100%;
......
......@@ -314,7 +314,7 @@
//获取数据
getData() {
this.request2({
url: "/api/AppletEducation/GetAppletGuidecarOrderOrderInfo",
url: "/api/AppletGoods/GetAppletMyOrderAgentInfo",
data: this.msg,
},
(res) => {
......
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