Commit 254339d8 authored by Mac's avatar Mac

1

parent 013a3c55
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
} }
}, },
created() { created() {
this.posiTop = this.$uiConfig.is_bang ? 80 : 52; this.posiTop = this.$uiConfig.is_bang ? 80 : 52;
this.windowWidth = this.$utils.SystemInfo().windowWidth; this.windowWidth = this.$utils.SystemInfo().windowWidth;
this.textWidth = this.windowWidth - this.goods.PaddingRight - this.goods.PaddingLeft - 30 - 20 - 10 this.textWidth = this.windowWidth - this.goods.PaddingRight - this.goods.PaddingLeft - 30 - 20 - 10
...@@ -62,6 +63,15 @@ ...@@ -62,6 +63,15 @@
uni.navigateTo({ uni.navigateTo({
url:'/pages/school/courseContent?id='+this.laststudy.id+'&name='+this.laststudy.name+'&cover_pic='+this.laststudy.cover_pic+'&index='+sort url:'/pages/school/courseContent?id='+this.laststudy.id+'&name='+this.laststudy.name+'&cover_pic='+this.laststudy.cover_pic+'&index='+sort
}) })
},
getData(){
this.laststudy = uni.getStorageSync('laststudy');
if (this.laststudy) {
this.isshow = true;
this.Name = this.laststudy.name;
this.Cover = this.laststudy.cover_pic;
this.progress = parseInt((this.laststudy.learned / this.laststudy.count)*100);
}
} }
} }
} }
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<!-- 资讯 --> <!-- 资讯 -->
<argoods v-if="d.id == 'educationArticle'" :goods="d.data"></argoods> <argoods v-if="d.id == 'educationArticle'" :goods="d.data"></argoods>
<!-- 最近学习组件 --> <!-- 最近学习组件 -->
<rstudy v-if="d.id == 'education'" :goods="d.data"></rstudy> <rstudy v-if="d.id == 'education'" :goods="d.data" ref='study'></rstudy>
</template> </template>
</view> </view>
</template> </template>
...@@ -651,7 +651,10 @@ export default { ...@@ -651,7 +651,10 @@ export default {
uni.setStorageSync("navs", res.data.navbar.navs); uni.setStorageSync("navs", res.data.navbar.navs);
} }
uni.setStorageSync("basedata", res.data); uni.setStorageSync("basedata", res.data);
if(this.$refs.study[0].getData()){
this.$refs.study[0].getData(); //调取最近学习组件的方法
}
if(this.myPageData.home_pages.navs.length>0&&this.myPageData.home_pages.navs[0].template.data.length>0){ if(this.myPageData.home_pages.navs.length>0&&this.myPageData.home_pages.navs[0].template.data.length>0){
this.myPageData.home_pages.navs[0].template.data.forEach(x=>{ this.myPageData.home_pages.navs[0].template.data.forEach(x=>{
if(x.id=='search'){ if(x.id=='search'){
......
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