<template>
	<view class="container">
		<view class="list">
			<navigator :url="`/saomaDiancan/goodsCatDetail/goodsCatDetail?id=${item.id}`" class="item" v-for="(item,index) in list" :key="index">
				<view class="name">{{item.title}}</view>
				<view class="content flex flex-y-center">
					<view class="cell flex flex-y-center arr-r">
						<view class="title">分类描述：</view>
						<view class="desc text-1">{{item.keywords}}</view>
					</view>
				</view>
			</navigator>
			<view class="no-more">没有更多内容了~</view>
		</view>
		
		<view class="footer-bar">
			<view class="content flex flex-center">
				<navigator url="/saomaDiancan/editGoodsCat/editGoodsCat" class="btn">+新增分类</navigator>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
			}
		},
		onLoad() {
			
		},
		onShow() {
			this.cygoods_category_index();
		},
		methods: {
			cygoods_category_index(e) {
				this.request({
					url: "Smdcshop/cygoods_category_index",
					data: {
						store_id: uni.getStorageSync("store_id")
					},
				}).then(res => {
					console.log(res, "res")
					if (res.code === '200') {
						this.list = res.data;
					}
				});
			},
		},
		
	}
</script>

<style>
	@import url("../static/css/common.css");
	page{
		background-color: #F4F5F7;
	}
	.list{
		padding:30rpx 25rpx;
	}
	.list .item{
		border-radius: 8rpx;
		overflow: hidden;
		padding-left: 30rpx;
		border-left: 8rpx solid #247EFF;
		background-color: #fff;
		margin-bottom: 30rpx;
	}
	.list .item .name{
		height: 80rpx;
		border-bottom: 1rpx solid #f5f5f5;
		font-size: 30rpx;
		line-height: 80rpx;
		font-weight: bold;
	}
	.list .item .content{
		padding:20rpx 0 24rpx;
	}
	.list .item .content .cell{
		flex:none;
		width: 100%;
		box-sizing: border-box;
		padding-right: 30rpx;
		font-size: 26rpx;
		line-height: 37rpx;
		color: #666;
	}
	.list .item .content .cell .title{
		color: #99A0AD;
		flex:none;
	}
	
</style>
