<style lang="scss" scoped>
	.title{ padding:30rpx 20rpx; border-bottom:1px solid #f1f1f1; display:flex; align-items: center;
	   image{width:40rpx; height:40rpx; margin-right:15rpx;}
				view{ color:$main-color; font-weight: bold; label{ font-weight: normal; font-size:28rpx; color:#bfbfbf; padding-left:12rpx;}}
	}
	.line{ height:15rpx; background:#f1f1f1;}
	.ul{ overflow:hidden; padding:0 10rpx; padding-bottom:20rpx; color:#666;
					 .item{ margin-top:12rpx; padding:10rpx 0; float:left; width:33.3333333%;  text-align: center; text{ color:#666; }
				  image{ width:110rpx; height:110rpx; display:block; margin:0 auto; margin-bottom:10rpx;}
				}
	}
	.pdbox{ padding:30rpx 20rpx; line-height:40rpx; rich-text{ margin-bottom:15rpx; line-height:1.8em; color:#666;}}
</style>
<template>
	<view>
		 <swiper autoplay indicator-dots=true  indicator-active-color="#01adec">
		 	<block v-for="(item, index) in banner" :key="index">
		 		<swiper-item >
		 			<view class="swiper-item"><image :src="item.img" mode="widthFix" /></view>
		 		</swiper-item>
		 	</block>
		 </swiper>			
			<view class="ul">
				 <navigator class="item" :url="item.url" v-for="(item,index) in nav1" :key="index">
						 <image :src="item.img"></image>
							<text>{{item.text}}</text>
					</navigator>
			</view>	
			<view class="line"></view>
			<view class="title"><view>关于我们</view></view>
			<view class="pdbox">
				 <image :src="about.imgurl" mode="widthFix"></image>
					<rich-text :nodes="about.note"></rich-text>
			</view>		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				 banner:[],
					content:'',
					nav1:[
						 {img:'/static/n1.png',text:'关于我们',url:'/pages/show/index?id=14'},
							{img:'/static/n2.png',text:'产品中心',url:'/pages/product/index'},
							{img:'/static/n3.png',text:'优惠券',url:'/pages/my/coupon/index'},
							{img:'/static/n4.png',text:'新闻列表',url:'/pages/article/index?nid=2'},
							{img:'/static/n5.png',text:'联系我们',url:'/pages/show/index?id=140'},
							{img:'/static/n6.png',text:'我的订单',url:'/pages/my/order/index'}
					],
					about:{},
			}
		},
		onShow() {
			  this.getBanner();		
					this.getOne();
		},
		methods: {
			 async getBanner(){
					  const json = await this.api.getList({q:{nid:103,field:'img'},loading:false})
							if(json.data.code==0){
								 this.banner = json.data.data;
							}
				},
				
				async getOne(){
					  const json = await this.api.getOne({q:{id:14,field:'note,img'},loading:false})
							if(json.data.code==0){
								 this.about = json.data.data;
							}
				},
		}
	}
</script>
