Commit 8459bc40 authored by zhengke's avatar zhengke

修改

parent 1037fdca
<template> <template>
<view <view
style="padding: 12px; padding-bottom: 0;width:100%;" style="padding:0 12px;width:100%;"
:style="{ :style="{
'background-color': goodsInfo.backgroundColor, 'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl, 'background-image': goodsInfo.backgroundPicUrl,
......
...@@ -6,20 +6,20 @@ ...@@ -6,20 +6,20 @@
'padding-left':goods.PaddingLeft+'px', 'padding-left':goods.PaddingLeft+'px',
'bottom':posiTop+'px' 'bottom':posiTop+'px'
}" }"
v-if="isshow==true" @click="goUrl"
> v-if="isshow==true">
<view class='Rstudy-box' :style="{width:windowWidth+'px'}"> <view class='Rstudy-box' :style="{width:windowWidth+'px'}">
<view class="close" @click="isshow=false"> <view class="close" @click.stop="isshow=false">
<u-icon name="cross" color="#FFF" size="40"></u-icon> <u-icon name="cross" color="#FFF" size="40"></u-icon>
</view> </view>
<view class="content" :style="{width:textWidth+'px'}"> <view class="content" :style="{width:textWidth+'px'}">
<view class="cover"> <view class="cover">
<image :src="goods.Cover" style="width: 100%;height: 100%;border-radius: 5px;"></image> <image :src="goods.Cover" style="width: 100%;height: 100%;border-radius: 5px;"></image>
</view> </view>
<view class="content-r" :style="{width:(textWidth-70-10)+'px'}"> <view class="content-r" :style="{width:(textWidth-70-30)+'px'}">
<text class="content-Name">{{goods.Name}}</text> <text class="content-Name">{{goods.Name}}</text>
<view class="progress-box"> <view class="progress-box">
<progress percent="40" active stroke-width="3" /> <progress :percent="progress" active stroke-width="3" />
</view> </view>
</view> </view>
</view> </view>
...@@ -29,46 +29,54 @@ ...@@ -29,46 +29,54 @@
</template> </template>
<script> <script>
export default{ export default {
props: ['goods'], props: ['goods'],
data(){ data() {
return{ return {
info:{ textWidth: 0,
PaddingTop:0, windowWidth: 0,
PaddingRight:0, isshow: false,
PaddingBottom:0, posiTop: 0,
PaddingLeft:0, laststudy: {},
isimg:1, progress: 0
isName:1, }
isschedule:1,
isleft:2,
}, },
textWidth:0, created() {
windowWidth:0, this.posiTop = this.$uiConfig.is_bang ? 80 : 52;
isshow:true, this.windowWidth = this.$utils.SystemInfo().windowWidth;
posiTop:0, this.textWidth = this.windowWidth - this.goods.PaddingRight - this.goods.PaddingLeft - 30 - 20 - 10
this.laststudy = uni.getStorageSync('laststudy');
if (this.laststudy) {
this.isshow = true;
this.goods.Name = this.laststudy.name;
this.goods.Cover = this.laststudy.cover_pic;
this.progress = parseInt(this.laststudy.learned / this.laststudy.count);
} }
}, },
created(){ methods:{
this.posiTop = this.$uiConfig.is_bang?80:52; goUrl(){
this.windowWidth = this.$utils.SystemInfo().windowWidth; var sort = this.laststudy.Sort-1;
this.textWidth = this.windowWidth - this.info.PaddingRight-this.info.PaddingLeft - 30 - 20-10 uni.navigateTo({
url:'/pages/school/courseContent?id='+this.laststudy.id+'&name='+this.laststudy.name+'&cover_pic='+this.laststudy.cover_pic+'&index='+sort
})
}
} }
} }
</script> </script>
<style> <style>
.Rstudy{ .Rstudy {
position: absolute; position: absolute;
left: 0; left: 0;
z-index: 999;
} }
.Rstudy-box{
.Rstudy-box {
width: 100%; width: 100%;
padding: 10px; padding: 10px;
display: flex;flex-direction: row; display: flex;
flex-direction: row;
align-items: center; align-items: center;
/* background: rgba(99, 99, 107, 0.8); */ /* background: rgba(99, 99, 107, 0.8); */
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
...@@ -77,25 +85,29 @@ ...@@ -77,25 +85,29 @@
justify-content: space-between; justify-content: space-between;
} }
.Rstudy .close{
.Rstudy .close {
width: 30px; width: 30px;
height: 30px; height: 30px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.Rstudy .content{
.Rstudy .content {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
.Rstudy .content .cover{
.Rstudy .content .cover {
width: 70px; width: 70px;
height: 35px; height: 35px;
margin-right: 10px; margin-right: 10px;
border-radius: 5px; border-radius: 5px;
} }
.Rstudy .content .content-r{
.Rstudy .content .content-r {
height: 35px; height: 35px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -104,14 +116,16 @@ ...@@ -104,14 +116,16 @@
color: #FFF; color: #FFF;
font-family: aa; font-family: aa;
} }
.Rstudy .content .content-Name{
.Rstudy .content .content-Name {
font-size: 12px; font-size: 12px;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.Rstudy .content .progress{
.Rstudy .content .progress {
font-size: 14px; font-size: 14px;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
......
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