Commit 753018f9 authored by Mac's avatar Mac

1

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