<template>
	<view class="page">
		<navBar title="活动商品" :back="true" color="black" background="white" />

		<view class="con">
			<view class="item" v-for="(item,index) in list" @click="goDetail">
				<view class="topBox">
					<image :src="picBase+item.image" mode=""></image>
					<!-- <view class="cutDown">
						<view class="item2">
							05
						</view>
						<view class="item2 item_d">
							:
						</view>
						<view class="item2">
							54
						</view>
						<view class="item2 item_d">
							:
						</view>
						<view class=" item2">
							38
						</view>
					</view> -->
				</view>
				<view class="bottom">
					<view class="txt">
						{{item.title}}
					</view>
				</view>
			</view>
		</view>
		<u-loadmore style="" loadmoreText="已经到底啦" color="#CCCCCC" lineColor="#CCCCCC" line />
	</view>
</template>

<script>
	import {
		getActivityDataReq,
	} from '@/api/my/index.js'
	export default {
		components: {},
		data() {
			return {
				picBase: this.$picBase,
				list: []
			}
		},
		async onLoad(o) {

		},
		async onShow() {
			let res = await getActivityDataReq()
			if (res.code == 0) {
				this.list = res.data
				console.log('活动商品返回值:', res.data, this.picBase);
			} else {
				uni.showToast({
					title: res.message,
					icon: 'none'
				})
			}
		},
		methods: {
			goDetail() {
				uni.navigateTo({
					url: '/pages/my/actGoodsDetail/index'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import "./index.scss";
</style>