|
|
|
|
@ -7,27 +7,27 @@
|
|
|
|
|
@load="onLoad"
|
|
|
|
|
>
|
|
|
|
|
<div v-for="(item,index) in list" :key="index">
|
|
|
|
|
<!-- <van-swipe-cell :right-width="65" :on-close="onClose(item)">-->
|
|
|
|
|
<!-- <product-card :product='item' />-->
|
|
|
|
|
<!-- <span>{{item.spuName}}</span>-->
|
|
|
|
|
<!-- <span slot="right" >删除</span>-->
|
|
|
|
|
<!-- </van-swipe-cell>-->
|
|
|
|
|
<van-swipe-cell :right-width="65" :on-close="onClose(item)">
|
|
|
|
|
<van-card
|
|
|
|
|
:price="formatPrice(item.price)"
|
|
|
|
|
:desc="item.sellPoint"
|
|
|
|
|
:title="item.spuName"
|
|
|
|
|
:thumb="item.spuImage"
|
|
|
|
|
/>
|
|
|
|
|
@click="skipProductSpuInfo(item.spuId)"
|
|
|
|
|
>
|
|
|
|
|
</van-card>
|
|
|
|
|
<template slot="right">
|
|
|
|
|
<van-button square type="danger" text="删除"/>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
</van-swipe-cell>
|
|
|
|
|
</div>
|
|
|
|
|
</van-list>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
// import { Card } from 'vant';
|
|
|
|
|
import {GetFavoritePage, DelFavorite} from "../../../api/user.js";
|
|
|
|
|
|
|
|
|
|
// Vue.use(Card);
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
@ -42,6 +42,10 @@ export default {
|
|
|
|
|
formatPrice(data) {
|
|
|
|
|
return (data / 100).toFixed(2);
|
|
|
|
|
},
|
|
|
|
|
skipProductSpuInfo(data) {
|
|
|
|
|
// return getProductSpuInfo(data);
|
|
|
|
|
this.$router.push('/product/'+data);
|
|
|
|
|
},
|
|
|
|
|
onClose(item) {
|
|
|
|
|
return function (clickPosition, instance) {
|
|
|
|
|
switch (clickPosition) {
|
|
|
|
|
|