Commit 365ff456 authored by Mac's avatar Mac

1

parent a522530c
...@@ -384,10 +384,10 @@ ...@@ -384,10 +384,10 @@
},{ },{
"path":"personal/cardList"//学习卡中心 "path":"personal/cardList"//学习卡中心
},{ },{
"path":"mystudy/mystudy" "path":"mystudy/mystudy",
// "style": { "style": {
// "navigationStyle": "custom" "navigationStyle": "custom"
// } }
},{ },{
"path":"mystudy/studyrecord", "path":"mystudy/studyrecord",
"style": { "style": {
......
...@@ -31,7 +31,7 @@ var config = { ...@@ -31,7 +31,7 @@ var config = {
fontSize: 13, fontSize: 13,
//dataPointShape: ['diamond', 'circle', 'triangle', 'rect'], //dataPointShape: ['diamond', 'circle', 'triangle', 'rect'],
dataPointShape: ['circle', 'circle', 'circle', 'circle'], dataPointShape: ['circle', 'circle', 'circle', 'circle'],
colors: ['#1890ff', '#2fc25b', '#facc14', '#f04864', '#8543e0', '#90ed7d'], colors: ['#facc14', '#f04864', '#8543e0', '#90ed7d'],
pieChartLinePadding: 15, pieChartLinePadding: 15,
pieChartTextPadding: 5, pieChartTextPadding: 5,
xAxisTextPadding: 3, xAxisTextPadding: 3,
......
This diff is collapsed.
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
width: calc(100vw - 20px); width: calc(100vw - 20px);
padding-top: 10px; padding-top: 10px;
"> ">
<u-empty text="没有找到商品信息" font-size="36" mode="list" ></u-empty> <u-empty text="没有找到课程信息" font-size="36" mode="list" ></u-empty>
</view> </view>
<!-- <view class="quick" v-if="!loading"> <!-- <view class="quick" v-if="!loading">
<view class="item"> <view class="item">
......
<template> <template>
<view class="mystudy"> <view class="mystudy">
<view > <view >
<!-- <view <view
class="headStatus" class="headStatus"
:style="[ :style="[
headStyle, headStyle,
]" ]"
> >
<view class="arrow" @click="goback"> <view class="arrow" @click="goback">
<u-icon name="arrow-left" size="48" color="#000"></u-icon> <u-icon name="arrow-left" size="48" color="#FFF"></u-icon>
</view>
<view style="width: 400rpx;">
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color='mc'></u-tabs>
</view> </view>
<view class="title" style="color: #FFF;" >{{pageTitle}}</view>
<view class="arrow"></view> <view class="arrow"></view>
</view> --> </view>
<view v-if="current==0" class="studyBox"> <view class="studyBox" :style="{'padding-top':scrollHeight}">
<view class="plot"> <view class="plot">
<canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" @touchstart="touchLineA"></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>
</view> </view>
<view class="studyB-b"> <view class="studyB-b">
<view class="s-b-time"> <view class="s-b-time">
...@@ -135,7 +135,8 @@ ...@@ -135,7 +135,8 @@
cWidth:'', cWidth:'',
cHeight:'', cHeight:'',
pixelRatio:1, pixelRatio:1,
textarea:'' textarea:'',
scrollHeight:0,
} }
}, },
components: { components: {
...@@ -168,6 +169,7 @@ ...@@ -168,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 = {
...@@ -180,10 +182,21 @@ ...@@ -180,10 +182,21 @@
this.getMyStudyTime()//我的学习时间 this.getMyStudyTime()//我的学习时间
this.getMyRecentStudyPageList()//最近学习 this.getMyRecentStudyPageList()//最近学习
this.getMyOrderStudyRecordPageList()//我的报名记录列表 this.getMyOrderStudyRecordPageList()//我的报名记录列表
} }
}, },
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({})
}, },
...@@ -194,7 +207,7 @@ ...@@ -194,7 +207,7 @@
getMyStudyTime(){ getMyStudyTime(){
this.request2({ this.request2({
url: '/api/AppletEducation/GetMyStudyTime', url: '/api/AppletEducation/GetMyStudyTime',
data: {Day: 6} data: {Day: 5}
}, },
res => { res => {
this.studyTime = res.data this.studyTime = res.data
...@@ -255,11 +268,11 @@ ...@@ -255,11 +268,11 @@
canvasId: canvasId, canvasId: canvasId,
type: 'line', type: 'line',
fontSize:11, fontSize:11,
padding:[15,20,0,15], padding:[15,20,30,110],
legend:{show:false}, legend:{show:false},
dataLabel:true, dataLabel:true,
dataPointShape:true, dataPointShape:true,
background:'#FFFFFF', background:'rgba(255, 255, 255, 0.1)',
pixelRatio:_self.pixelRatio, pixelRatio:_self.pixelRatio,
categories: chartData.categories, categories: chartData.categories,
series: chartData.series, series: chartData.series,
...@@ -267,16 +280,19 @@ ...@@ -267,16 +280,19 @@
xAxis: { xAxis: {
// disabled:true, // disabled:true,
type:'grid', type:'grid',
gridColor:'#CCCCCC',
gridType:'dash',
dashLength:8,
splitNumber:1, splitNumber:1,
axisLine:true, axisLine:true,
boundaryGap:'justify', boundaryGap:'justify',
disableGrid:true, disableGrid:true,
}, },
yAxis: { yAxis: {
disableGrid:true,
disabled:true, disabled:true,
gridType:'dash',
gridEval:3,
gridColor:'#E2E2E2',
dashLength:8
}, },
width: _self.cWidth*_self.pixelRatio, width: _self.cWidth*_self.pixelRatio,
height: _self.cHeight*_self.pixelRatio, height: _self.cHeight*_self.pixelRatio,
...@@ -286,29 +302,9 @@ ...@@ -286,29 +302,9 @@
} }
} }
}); });
// //下面是默认选中索引
// let cindex=5;
// //下面是自定义文案
// let textList=[{text:'我是一个标题',color:null},{text:'自定义1:值1',color:'#2fc25b'},{text:'自定义2:值2',color:'#facc14'},{text:'自定义3:值3',color:'#f04864'}];
// //下面是event的模拟,tooltip的Y坐标值通过这个mp.changedTouches[0].y控制
// let tmpevent={mp:{changedTouches:[{x: 0, y: 120}]}};
// setTimeout(()=>{
// canvaLineA.showToolTip( tmpevent , {
// index:cindex,
// // textList:textList
// });
// },200)
},
touchLineA(e) {
canvaLineA.touchLegend(e);
canvaLineA.showToolTip(e, {
format: function (item, category) {
console.log(item,category,e)
return category + ' ' + item.name + ':' + item.data+'分钟'
}
});
}, },
} }
} }
</script> </script>
...@@ -334,6 +330,10 @@ ...@@ -334,6 +330,10 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background: #FFF; 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: 9999;
} }
.mystudy .arrow { .mystudy .arrow {
height: 24px; height: 24px;
...@@ -349,12 +349,22 @@ ...@@ -349,12 +349,22 @@
.mystudy .plot{ .mystudy .plot{
width: 750upx; width: 750upx;
height: 400upx; height: 400upx;
position: relative;
} }
.plot .charts { .plot .charts {
width: 750upx; width: 750upx;
height: 400upx; height: 400upx;
background-color: #FFFFFF; background-color: #FFFFFF;
background-image: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mystudybg.png');
background-repeat: no-repeat;
background-size: cover;
}
.plot .plotimg{
width: 100px;
height: 62px;
position: absolute;
left: 5px;
bottom: 20px;
} }
.mystudy .studyB-b{ .mystudy .studyB-b{
width: 100%; width: 100%;
...@@ -362,6 +372,8 @@ ...@@ -362,6 +372,8 @@
background: #FFF; background: #FFF;
border-top-left-radius:30px ; border-top-left-radius:30px ;
border-top-right-radius: 30px; border-top-right-radius: 30px;
margin-top: -24px;
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