This commit is contained in:
曹辉 2023-02-13 17:27:28 +08:00
parent b80345c43f
commit 5fc1de33e9

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="app"> <view class="app">
<view class="cards"> <view class="cards">
<view class="item" :style="{background:listcolor[index]}" @tap='goProductList(item)' <view class="item" :style="{background:listcolor[index % listcolor.length]}" @tap='goProductList(item)'
v-for="(item,index) in goodsCategoryList" :key="index"> v-for="(item,index) in goodsCategoryList" :key="index">
<image :src="item.goodsCategoryPicture" mode=""></image> <image :src="item.goodsCategoryPicture" mode=""></image>
<view class="title" style="font-size:42rpx"> <view class="title" style="font-size:42rpx">
@ -39,9 +39,7 @@
// img:'../../static/cp.png', // img:'../../static/cp.png',
// }, // },
// ], // ],
listcolor: ['#00C176', '#D43953', '#E1AE3C', '#4C7BC9', '#9e4dd0', '#00C176', '#D43953', '#E1AE3C', listcolor: ['#00C176', '#D43953', '#E1AE3C', '#4C7BC9', '#9e4dd0'], //
'#4C7BC9', '#9e4dd0',
], //
}; };
}, },
//1. //1.