feat: 添加我的店铺api
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view class="tab2-wrap p-x-32 p-b-24">
|
||||
<view
|
||||
class="shop-card m-b-24"
|
||||
v-for="(v, i) in mockList"
|
||||
v-for="(v, i) in renderList"
|
||||
:key="v.id || i"
|
||||
@tap="toListRecord(v)"
|
||||
>
|
||||
@@ -45,9 +45,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
@@ -60,38 +60,7 @@
|
||||
|
||||
const emit = defineEmits(['addCar', 'update', 'shipment']);
|
||||
|
||||
const mockList = ref([
|
||||
{
|
||||
id: 1,
|
||||
name: '卓玛阳光防断洗发水',
|
||||
// level: 'LV.3 超级店长',
|
||||
createTime: '2026-03-09',
|
||||
progress: 75,
|
||||
earnings: 200,
|
||||
leaf: 3200,
|
||||
cover: '/static/home/img1.png',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '治山贡鸡源头旗舰店',
|
||||
// level: 'LV.2 高级店长',
|
||||
createTime: '2026-02-18',
|
||||
progress: 62,
|
||||
earnings: 870,
|
||||
leaf: 5600,
|
||||
cover: '/static/home/5.png',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '有购精选生活馆',
|
||||
// level: 'LV.1 初级店长',
|
||||
createTime: '2026-01-25',
|
||||
progress: 48,
|
||||
earnings: 126.5,
|
||||
leaf: 2100,
|
||||
cover: '/static/home/6.png',
|
||||
},
|
||||
]);
|
||||
const renderList = computed(() => (Array.isArray(props.list) ? props.list : []));
|
||||
|
||||
const formatMoney = (value) => {
|
||||
const num = Number(value);
|
||||
|
||||
Reference in New Issue
Block a user