<template>
	<view>
		<view v-if="list.length > 0">
			<view class="display" v-for="(item,index) in list">
				<view class="store-content" @click="handleClick(item)">
					<image :src="image(item.shopsPic)" mode="" class="store-image"></image>
					<view class="text-content">
						<view class="font-thirty-two font-color2">
							{{item.shopsName}}
						</view>
						<view class="font-twenty font-color5" style="margin-top: 20rpx;">
							类别：店铺信息修改
						</view>
					</view>
				</view>
			</view>
		</view>
		<view v-else style="padding-top: 200rpx;">
			<u-empty text="暂无数据" mode="list"></u-empty>
		</view>
		<u-toast ref="uToast" />
	</view>
</template>

<script>
	import server from "@/api/index";
	import http from '@/common/http.js'
	export default {
		data() {
			return {
				id: null,
				list: [],
				userInfo:{}
			}
		},
		mounted() {
			this.userInfo = uni.getStorageSync('userInfo');
			this.getList();
		},
		methods: {
			showModel(){
				console.log('showModel')
				this.userInfo = uni.getStorageSync('userInfo');
				this.getList();
			},
			image(e) {
				return http.webUrl + e
			},
			getList(){
				server.getManageShopList({shopsStatus :'1', shopsId: this.userInfo.nickName}).then(res =>{
					this.list = [];
					if(res){
						this.list = res
					}
				})
			},
			handleClick(item){
				uni.navigateTo({
					url: '/pages/manage/modifyInfo/modifyInfo?id=' + item.shopsId + '&flag="false"'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.display {
		margin: 30rpx 30rpx 0;
		padding: 30rpx;
		background: #FFFFFF;
		opacity: 1;
		border-radius: 8rpx;

		.store-content {
			display: flex;
			align-items: center;
			padding-bottom: 30rpx;
			border-bottom: 2rpx solid #DEDEDE;

			.store-image {
				width: 220rpx;
				height: 150rpx;
			}

			.text-content {
				margin-left: 30rpx;
			}
		}
	}
</style>
