Commit 8459bc40 authored by zhengke's avatar zhengke

修改

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