|
|
|
@ -24,7 +24,6 @@
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="collectionGoods" v-if="collectProductList.length > 0"> |
|
|
|
|
<view class="item" v-for="(item, collectProductListIndex) in collectProductList" |
|
|
|
|
:key="collectProductListIndex" :data-index="collectProductListIndex" @touchstart="drawStart" |
|
|
|
@ -47,15 +46,9 @@
|
|
|
|
|
<!-- <view v-else class="review-box acea-row row-between" @click="goEvaluation(item)"> |
|
|
|
|
<view class="left acea-row row-column-between"> |
|
|
|
|
<view class="acea-row row-column-between"> |
|
|
|
|
<view class="title"> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
<view class="title1"> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
<view class="title2"> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
<view class="title"></view> |
|
|
|
|
<view class="title1"></view> |
|
|
|
|
<view class="title2"></view> |
|
|
|
|
</view> |
|
|
|
|
<view @tap.stop="goMore" class="more"> |
|
|
|
|
MORE |
|
|
|
@ -66,21 +59,17 @@
|
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
<view v-else class="review-box acea-row row-between" @click="goEvaluation(item)"> |
|
|
|
|
<image src="@/static/images/ceping.png" mode="widthFix"></image> |
|
|
|
|
<view @tap.stop="goMore" class="more"> |
|
|
|
|
<image class="img" :src="item.homeImage" mode="aspectFill"></image> |
|
|
|
|
<view class="more"> |
|
|
|
|
MORE |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="delete" @tap.stop="delCollection(collectProductListIndex)" |
|
|
|
|
:style="item.right?'right: -122rpx;':''" :class="{'del-height':navType==1}">删除</view> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Loading :loaded="loadend" :loading="loading"></Loading> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
@ -145,7 +134,6 @@
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
drawStart(e) { |
|
|
|
|
console.log(155555); |
|
|
|
|
var touch = e.touches[0]; |
|
|
|
|
// let index = e.currentTarget.dataset.index; |
|
|
|
|
for (var index in this.collectProductList) { |
|
|
|
@ -203,29 +191,21 @@
|
|
|
|
|
goEvaluation(item) { |
|
|
|
|
this.$yrouter.push({ |
|
|
|
|
// 跳转评测详情 |
|
|
|
|
path: 'pages/shop/Evaluations/EvaluationDetail/index', |
|
|
|
|
path: '/pages/shop/Evaluations/EvaluationDetail/index', |
|
|
|
|
query: { |
|
|
|
|
id: item.pid |
|
|
|
|
id: item.evaluationId |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
goMore() { |
|
|
|
|
this.$yrouter.push({ |
|
|
|
|
// 跳转评测详情 |
|
|
|
|
path: 'pages/shop/Evaluations/index', |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
get_user_collect_product: function(navType) { |
|
|
|
|
|
|
|
|
|
let that = this |
|
|
|
|
console.log(navType, '】】】】】】'); |
|
|
|
|
|
|
|
|
|
// if (that.loading) return //阻止下次请求(false可以进行请求); |
|
|
|
|
if (that.loading) return //阻止下次请求(false可以进行请求); |
|
|
|
|
// if (that.loadend) return //阻止结束当前请求(false可以进行请求); |
|
|
|
|
that.loading = true |
|
|
|
|
if (navType === 1) { |
|
|
|
|
// 获取评测收藏 collectEvaluation/user |
|
|
|
|
console.log('评测收藏=========='); |
|
|
|
|
getCollectEvaluation(that.page, that.limit, that.type).then(res => { |
|
|
|
|
that.loading = false |
|
|
|
|
//apply();js将一个数组插入另一个数组; |
|
|
|
@ -244,7 +224,6 @@
|
|
|
|
|
} else { |
|
|
|
|
getCollectUser(that.page, that.limit, that.type).then(res => { |
|
|
|
|
that.loading = false |
|
|
|
|
console.log('切换------------'); |
|
|
|
|
//apply();js将一个数组插入另一个数组; |
|
|
|
|
var arr = []; |
|
|
|
|
for (var i in res.data) { |
|
|
|
@ -264,11 +243,11 @@
|
|
|
|
|
}, |
|
|
|
|
//删除收藏; |
|
|
|
|
delCollection: function(index) { |
|
|
|
|
let that = this, |
|
|
|
|
id = that.collectProductList[index].pid, |
|
|
|
|
category = that.collectProductList[index].category |
|
|
|
|
let that = this |
|
|
|
|
|
|
|
|
|
if (that.navType === 0) { |
|
|
|
|
let id = that.collectProductList[index].pid, |
|
|
|
|
category = that.collectProductList[index].category |
|
|
|
|
getCollectDel(id, category).then(function() { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '删除成功', |
|
|
|
@ -282,7 +261,10 @@
|
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
// 取消评测收藏 |
|
|
|
|
delUserCollection(id, category).then(function() { |
|
|
|
|
let param={} |
|
|
|
|
param.id=that.collectProductList[index].evaluationId, |
|
|
|
|
param.category= "collect" |
|
|
|
|
delUserCollection(param).then(function() { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '删除成功', |
|
|
|
|
icon: 'success', |
|
|
|
@ -363,14 +345,16 @@
|
|
|
|
|
|
|
|
|
|
.review-box { |
|
|
|
|
// padding: 30rpx 30rpx 20rpx 30rpx; |
|
|
|
|
width: 687rpx; |
|
|
|
|
height: 240rpx; |
|
|
|
|
// width: 687rpx; |
|
|
|
|
// height: 240rpx; |
|
|
|
|
border-radius: 16rpx; |
|
|
|
|
background: #F5F6F8; |
|
|
|
|
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.15); |
|
|
|
|
position: relative; |
|
|
|
|
image { |
|
|
|
|
width: 100%; |
|
|
|
|
.img { |
|
|
|
|
width: 687rpx; |
|
|
|
|
height: 240rpx; |
|
|
|
|
border-radius: 16rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.more { |
|
|
|
|