<template>
	<Layout :index="2" :banner="0"  :imgs="'../static/img/page/fx1.jpg'" :titles="'我要发行'" :title_content="'我要发行'">
		<view class="content-fx2" >
			<image class="content-fx3" @tap="goPath('/apply')" src="../static/img/page/fx3.png"></image>
		</view>
	<Kefu></Kefu>
	</Layout>
	
</template>
  
<script>
	import Layout from './part/layout.vue';
	import Kefu from './part/kefu.vue';
	export default {
		components:{
			Layout,
			Kefu
		},
		data(){
			return {
				
			}
		},
		created() {
			// this.getZhishu();
		},
		beforeDestroy() {
		},
		methods:{
			tob(){
				 window.scrollTo(0, document.body.scrollHeight);
			},
			getZhishu(){
				this._get('cms.cms/home_zx',{
					
				},res=>{
					if(res.code==1){
						let list = res.data.lists;
						let arr = [];
						list.forEach(e=>{
							let categories = e.dates.split(',');
							let data = e.value.split(',');
							let max = Math.ceil(Math.max(...data)/5)*5;
							let eoptsData = this.$mUtils.deepClone(eopts);
							eoptsData.yAxis[0].max = max;
							arr.push({
								name: e.name,
								chartData: {
									categories: categories,
									series: [
										{
											name: e.name,
											data: data,
											color: '#ffb21c',
											linearGradient: [0,0,0,1,[{offset: 0, color: "#FBF4D7"},{ offset: 1, color: "#FFFFFF" }]],
											symbol:'circle',
											symbolSize: 8,
											markLine: {
												data: [
													{type: 'average', name: '平均值'}
												],
												label: {
													show: false
												}
											},
											barWidth: '50%',
											type: 'line'
										}
									]
								},
								eopts: eoptsData
							})
						});
						this.chartsList = arr;
						if(this.chartsList.length==1){
							this.listClass = ['left1 zindex'];
						}else if(this.chartsList.length==2){
							this.listClass = ['left1','left2 zindex'];
						}else if(this.chartsList.length==3){
							this.listClass = ['left1','left2','left3 zindex'];
						}else if(this.chartsList.length==4){
							this.listClass = ['left1','left2','left3','center zindex'];
						}else if(this.chartsList.length==5){
							this.listClass = ['left1','left2','left3','center','right1 zindex'];
						}else if(this.chartsList.length==6){
							this.listClass = ['left1','left2','left3','center','right1','right2'];
						}
					}
				})
			},
			getProduct(){
				this._get('product.indexs/lists',{
					page: 1,
					list_rows: 50,
				},res=>{
					this.productList = res.data.list.data;
				})
			},
			getArticle(category_id=3,list_rows=20){
				this._get('article.article/index',{
					page: 1,
					list_rows: list_rows,
					category_id: category_id,
					is_home: 1,
				},res=>{
					if(res.code==1){
						if(category_id==3){
							this.zhishuList = res.data.list.data;
						}else if(category_id==1){
							this.shichangList = res.data.list.data;
						}else if(category_id==2){
							this.wenhuanList = res.data.list.data;
						}
					}
				})
			},
			getStore(){
				this._get('store.store/lists',{
					page: 1,
					list_rows: 20,
				},res=>{
					if(res.code==1){
						this.storeList = res.data.list.data;
					}
				})
			},
			goDetail(e){
				this.$router.push({
					path: 'articleDetails',
					query: {
						id: e.article_id,
						index: 0
					}
				})
			},
			goJianjie(e){
				this.$router.push({
					path: 'companyProflie',
					query:{
						id: e.store_id,
						index: 0
					}
				})
			},
			changeNum(){
				this.listClass.unshift(this.listClass[this.listClass.length-1]);
				this.listClass.splice(this.listClass.length-1,1);
			},
			setClass(index){
				if(index==0){
					return this.listClass[0];
				}else if(index==1){
					return this.listClass[1];
				}else if(index==2){
					return this.listClass[2];
				}else if(index==3){
					return this.listClass[3];
				}else if(index==4){
					return this.listClass[4];
				}else if(index==5){
					return this.listClass[5];
				}
			},
			// 鼠标移入事件
			mouseover(e){
				this.is_xuan = false;
			},
			// 鼠标移出事件
			mouseleave(e){
				this.is_xuan = true;
			},
			change(e){
				this.currentIndex = e.detail.current;
			},
			changeSub(){
				if(this.currentIndex<=0){
					this.currentIndex = this.storeList.length-1;
				}else{
					this.currentIndex--;
				}
			},
			changeAdd(){
				if(this.currentIndex>=(this.storeList.length-1)){
					this.currentIndex = 0;
				}else{
					this.currentIndex++;
				}
			},
		}
	}
</script>

<style lang="scss">
	.content-fx2{
		width: 100%;
		height: 878px;
		background-image: url('../static/img/page/fx2.png');
		background-size: cover;
		position:relative;
	}
	.content-fx3{
		width: 196px;
		height: 51px;
		bottom: 100px;
		left: 862px;
		position: absolute;
		cursor: pointer;
	}
</style>
