<template>
	<view class="contioner">

		<view class="header">
			<view :class="flage==2?'collect active left':'collect active'" >
				<text>{{text1}}</text>
			</view>
			<view :class="flage==2?'collect rigth':'collect'" @click="qiehuan">
				<text>{{text2}}</text>
			</view>
		</view>

		<view class="care" v-show="flage==1">

			<view class="mycare">
				我的关注
			</view>
			<scroll-view scroll-x="true" class="scroll">
				<view class="craeImg" v-for="(item,index) in 3" @click="xiangqin(item)">
					<image :class="initclass?'init cz':'init'" src="../../static/bcimg/bc.jpeg" mode=""></image>
					<view class="craeImgname">
						这个杀手
					</view>
				</view>
				<!-- <view class="craeImg">
					<image src="../../static/bcimg/bc.jpeg" mode=""></image>
					<view class="craeImgname">
						这个杀手
					</view>
				</view>
				<view class="craeImg">
					<image src="../../static/bcimg/bc.jpeg" mode=""></image>
					<view class="craeImgname">
						杀猪的
					</view>
				</view> -->

			</scroll-view>


			<view class="all">
				<view class="allname">
					全部
				</view>
				<view class="ruzhu">
					艺术家入驻>
				</view>
			</view>

			<view class="artistlist">
				<view  :class="initclass?'artistlistitem inits czs':'artistlistitem inits'" class="artistlistitem" @click="xiangqin(item)" v-for="(item,index)  in 3" :key="index">
					<view class="shouchang" @click.stop="shouchang(item)">
						<image src="../../static/xinkong.png"></image>
						<text>收藏</text>
					</view>
					<view class="artistlistitemImg">
						<image src="../../static/bcimg/bc.jpeg" mode=""></image>
					</view>
					<view class="artistlistitemTitle">
						这个杀手不太冷
					</view>
					<view class="RNM">
						安抚对啊覅嗨嗨欭人
						安抚对啊覅嗨嗨欭人
						安抚对啊覅嗨嗨欭人
						安抚对啊覅嗨嗨欭人
					</view>
					<view class="headerimg">
						<image :class="initclass?'init cz':'init'" src="../../static/bcimg/bc.jpeg" mode=""></image>
					</view>
				</view>
			</view>
		</view>
		
		
		<view class="list" v-show="flage==2">
<!-- 			<view class="Title">
				我的藏品
			</view> -->
			<view class="listcontent">
				<view class="listitem" v-for="(item,index) in 4" @click="godatail(item)">
					<view class="item-img">
						<image src="../../static/bcimg/bc.jpeg" mode=""></image>
					</view>
					
					<view class="item-name">
						<view class="">
							《两只老虎》
						</view>
					</view>
					<view class="foot">
						<view class="footimg">
							<image src="../../static/bcimg/bc.jpeg" mode=""></image>
						</view>
						<view class="footname">
							琳琅天上
						</view>
						<view class="price">
							￥12800
						</view>
					</view>
				</view>
			</view>
		</view>
		<Uitabber selectpage="2" />
	</view>
</template>

<script>
	import Uitabber from '@/components/uitabbar/uitabbar.vue'
	export default {
		components:{
			Uitabber
		},
		data() {
			return {
				flage: 1,
				initclass:false,
				text1:'艺术家',
				text2:'数字藏品'
			}
		},
		onShow:function(){
			this.initclass=true
		},
		onHide:function(){
			this.initclass=false
		},
		methods: {
			qiehuan(){
				// this.flage=val
				if(this.flage==1){
					this.flage=2
					setTimeout(item=>{
						this.text2='艺术家'
						this.text1='数字藏品'
					},400)
				}else{
					this.flage=1
					setTimeout(item=>{
						this.text2='数字藏品'
						this.text1='艺术家'
					},400)
				}
				if(this.flage==2){
					this.initclass=false
				}else{
					setTimeout(item=>{
					this.initclass=true
					},30)
				}
				// console.log(this.initclass);
			},
			xiangqin(val){
				uni.navigateTo({
					url:'../Artistdetails/Artistdetails'
				})
			},
			godatail(val){
				uni.navigateTo({
					url:'../datail/datail'
				})
			},
			shouchang(val){
				
			}
		}
	}
</script>

<style lang="scss">
	@import "./artist.scss"
</style>
