deming/components/informations/titles/titles.vue

123 lines
2.0 KiB
Vue
Raw Normal View History

2020-06-11 08:43:51 +08:00
<template>
2020-06-15 15:31:31 +08:00
<view id="info_title">
<view>
<view class="url_info" v-for="(item,index) in list" :key="index" @click="route_skip(index)">
<image :src="item.url"></image>
<text>{{item.text}}</text>
</view>
</view>
</view>
2020-06-11 08:43:51 +08:00
</template>
<style lang="scss" scoped>
2020-06-15 15:31:31 +08:00
.url_info {
2020-06-11 08:43:51 +08:00
width: 127rpx;
float: left;
2020-06-15 15:31:31 +08:00
flex: 1;
2020-06-11 08:43:51 +08:00
}
2020-06-15 15:31:31 +08:00
.url_info image {
2020-06-11 08:43:51 +08:00
width: 84rpx;
height: 84rpx;
margin: 0 auto;
display: block;
margin-bottom: 16rpx;
}
2020-06-15 15:31:31 +08:00
.url_info text {
2020-06-11 08:43:51 +08:00
display: block;
text-align: center;
2020-06-15 15:31:31 +08:00
font-size: 28rpx;
color: rgba(102, 102, 102, 1);
2020-06-11 08:43:51 +08:00
}
2020-06-15 15:31:31 +08:00
2020-06-11 08:43:51 +08:00
.sousuo {
height: 113rpx;
border: 1px #f00 solid;
}
2020-06-15 15:31:31 +08:00
2020-06-11 08:43:51 +08:00
#info_title {
width: 620rpx;
margin: 0 auto;
padding: 37rpx 0;
2020-06-15 15:31:31 +08:00
2020-06-11 08:43:51 +08:00
}
2020-06-15 15:31:31 +08:00
#info_title>view {
2020-06-11 08:43:51 +08:00
overflow: hidden;
zoom: 1;
2020-06-15 15:31:31 +08:00
display: flex;
flex-wrap: wrap;
display: -webkit-flex;
/* Safari */
2020-06-11 08:43:51 +08:00
}
</style>
<script>
2020-06-15 15:31:31 +08:00
export default {
2020-07-09 16:35:23 +08:00
props:['information'],
2020-06-15 15:31:31 +08:00
name: "info_title",
data() {
return {
list: [{
id: 0,
url: '../../static/pageD/info(11).png',
text: '公告/资讯'
},
{
id: 0,
url: '../../static/pageD/info(6).png',
text: '活动消息'
},
{
id: 0,
url: '../../static/pageD/info(14).png',
text: '交易物流'
},
{
id: 0,
url: '../../static/pageD/info(15).png',
text: '关注消息'
},
],
}
},
methods: {
// 点击顶部的标题模块跳转
route_skip(index) {
console.log(index)
switch (index) {
case 0:
uni.navigateTo({
url: '/pageD' + "/notice/notice"
});
break;
case 1:
uni.navigateTo({
url: '/pageD' + "/activity/activity"
});
break;
case 2:
uni.navigateTo({
url: '/pageD' + "/logistics/logistics"
});
break;
case 3:
uni.navigateTo({
url: '/pageD' + "/attention/attention"
});
break;
default:
break;
}
2020-07-09 16:35:23 +08:00
},
// 获取消息首页的内容
messageIndex(){
console.log("333")
2020-06-15 15:31:31 +08:00
}
}
}
</script>