Commit f2623ee2 by yanju

Merge branch 'xue' into 'master'

完成首页,错误页面

See merge request !9
parents 76206a1b 3b7b8d81
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
:flex-v="['row','space-between','center']"> :flex-v="['row','space-between','center']">
<yun-div :flex-v="['row','flex-start','baseline']" :font-style="[30,40,500,'#2F2F2F','left']"> <yun-div :flex-v="['row','flex-start','baseline']" :font-style="[30,40,500,'#2F2F2F','left']">
<yun-div :width-v="4" :height-v="16" bg-color-v="#00AAE6" :border-r="[0,2,2,0]" :margin-v="[0,13,0,0]"></yun-div> <yun-div :width-v="4" :height-v="16" bg-color-v="#00AAE6" :border-r="[0,2,2,0]" :margin-v="[0,13,0,0]"></yun-div>
<p>社区精英</p> <p>{{title}}</p>
</yun-div> </yun-div>
<yun-div :font-style="[24,32,500,'#999','left']">换一换</yun-div> <yun-div :font-style="[24,32,500,'#999','left']">换一换</yun-div>
</yun-div> </yun-div>
...@@ -29,6 +29,9 @@ export default { ...@@ -29,6 +29,9 @@ export default {
handleMore() { handleMore() {
console.log(2); console.log(2);
} }
},
props:{
title:String,
} }
} }
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
:margin-v="[16,0,0]" :margin-v="[16,0,0]"
:skeW="500" :skeW="500"
:skeH="40" :skeH="40"
v-if="cardType===2"
> >
1、引言 如今我们所处的时代,是移动互联网时代,也可以说是视频时代。啊啊啊啊啊从快播到抖生。 1、引言 如今我们所处的时代,是移动互联网时代,也可以说是视频时代。啊啊啊啊啊从快播到抖生。
</yun-div> </yun-div>
...@@ -128,7 +129,7 @@ ...@@ -128,7 +129,7 @@
data(){ data(){
return{ return{
src:'https://beyondclouds.oss-cn-beijing.aliyuncs.com/blog/cover/018440fd-961d-4af9-80d9-cf05f25823ab.jpg', src:'https://beyondclouds.oss-cn-beijing.aliyuncs.com/blog/cover/018440fd-961d-4af9-80d9-cf05f25823ab.jpg',
cardType:1, //(props)1、项目 2、博客 3、资讯 cardType:3, //(props)1、项目 2、博客 3、资讯
cardName:'老虎老虎', cardName:'老虎老虎',
cardIntro:'老虎老虎', cardIntro:'老虎老虎',
cardId:'老虎老虎', cardId:'老虎老虎',
...@@ -148,7 +149,8 @@ ...@@ -148,7 +149,8 @@
isMy:{ isMy:{
type:Boolean, type:Boolean,
default:false, default:false,
} },
}, },
methods: { methods: {
onSwipeLeft(){ onSwipeLeft(){
......
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
+ 空卡片(1)✅ + 空卡片(1)✅
+ 错误页面 layouts/error.vue (2) + 错误页面 layouts/error.vue (2)
+ 首页 pages/index(2) + 首页 pages/index(2)
<template>
<nuxt/>
</template>
<script>
export default {
name: "blank"
}
</script>
<style scoped>
</style>
<template>
<yun-slider>
<yun-div
style="position: fixed;
top: 0;
left:0;
right:0;
bottom:0;"
width-v="100%"
:padding-v="[34,0,40]"
:flex-v="['row','center','center']"
slot="card"
>
<yun-div
v-if="true"
:flex-v="['column','flex-start','center']"
>
<yun-img
:width-v="350"
:src="this.error404"
>
</yun-img>
<yun-div
:font-style="[16,30,400,'black','center']"
:margin-v="[20,0,40,0]"
>加载失败,请重新尝试</yun-div>
<yun-button
:size="[148,48]"
:border-r="[4]"
:font-size="16"
bg-color="#75D098"
@click="reload"
>返回首页</yun-button>
</yun-div>
<yun-div
v-if="false"
:flex-v="['column','flex-start','center']"
>
<yun-img
:width-v="250"
:src="this.error500"
>
</yun-img>
<yun-div
:font-style="[16,30,400,'black','center']"
:margin-v="[37,0,47,0]"
>服务器连接异常,请稍后重试</yun-div>
<yun-button
:size="[148,48]"
:border-r="[4]"
:font-size="16"
bg-color="#75D098"
@click="close"
>关闭页面</yun-button>
</yun-div>
</yun-div>
</yun-slider>
</template>
<script>
import commonMixin from "../components/moblie/commonMixin";
import error404 from '../assets/svg/404.png';
import error500 from '../assets/svg/500.svg'
export default {
name: "error",
layout:'blank',
mixins: [commonMixin],
created(){
this.error404 = error404;
this.error500= error500
},
methods:{
close(){
window.opener = null;
window.open("http://www.baidu.com", "_self");
window.close();
},
reload(){
this.$router.replace('/')
}
}
}
</script>
<style scoped>
img {
display: block;
}
</style>
<template> <template>
<yun-slider>
<yun-div <yun-div
height-v="auto" height-v="auto"
slot="card"
> >
<banner></banner>
<project-card v-for="val in 5" key="val.projectId"></project-card> <container-card
title="项目推荐"
>
<project-card v-for="val in 1" key="val.projectId"></project-card>
</container-card>
<container-card
title="最新资讯"
>
<project-card v-for="val in 1" key="val.projectId"></project-card>
</container-card>
<container-card
title="社区精英"
>
<user-card-x v-for="val in 1" key="val.userId"></user-card-x>
</container-card>
<container-card
title="精选博文"
>
<project-card v-for="val in 1" key="val.projectId"></project-card>
</container-card>
<container-card
title="推荐问答"
>
<answer-card v-for="val in 1" key="val.answerId"></answer-card>
</container-card>
</yun-div> </yun-div>
</yun-slider>
</template> </template>
<script> <script>
import YunButton from '../components/common/button/src/main'; import YunButton from '../components/common/button/src/main';
import projectCard from '../components/moblie/projectCard'; import projectCard from '../components/moblie/projectCard';
import {getLineHeight} from "../action/utils/get-lineheight"; import {getLineHeight} from "../action/utils/get-lineheight";
import banner from '../components/moblie/banner';
import containerCard from '../components/moblie/containerCard';
import answerCard from '../components/moblie/answerCard';
import userCardX from '../components/moblie/userCardX'
export default { export default {
components: { components: {
projectCard,YunButton projectCard,YunButton,banner,containerCard,answerCard,userCardX
}, },
mounted() { mounted() {
}, },
......
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