|
|
|
@ -97,11 +97,15 @@
|
|
|
|
|
|
|
|
|
|
<view :style="addBottom?'height: 162rpx;':'height: 122rpx;'"></view> |
|
|
|
|
<view class="footer acea-row row-between" :style="addBottom?'height: 162rpx;':'height: 122rpx;'"> |
|
|
|
|
<view class="acea-row"> |
|
|
|
|
<view class="acea-row btn-box row-around"> |
|
|
|
|
<button class="item contacButton" open-type="share" hover-class="none"> |
|
|
|
|
<image src="../../../../static/images/share-icon.png" mode=""></image> |
|
|
|
|
<view class="">分享</view> |
|
|
|
|
</button> |
|
|
|
|
<button class="item contacButton" hover-class="none" @click="getCollection"> |
|
|
|
|
<image :src="`../../../../static/images/${isCollection?'star-light':'star'}.png`" mode=""></image> |
|
|
|
|
<view class="">{{isCollection? '已收藏':'收藏'}}</view> |
|
|
|
|
</button> |
|
|
|
|
<!-- <view class="item" @click="share"> |
|
|
|
|
<image src="../../../../static/images/share-icon.png" mode=""></image> |
|
|
|
|
<view class="">分享</view> |
|
|
|
@ -109,15 +113,18 @@
|
|
|
|
|
</view> |
|
|
|
|
<view class="btn" @click="goGoodsDetail">立即购买</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { getEvaluationDetail } from '@/api/store' |
|
|
|
|
import { getEvaluationDetail,getUserCollection,delUserCollection} from '@/api/store' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
isCollection:false, |
|
|
|
|
addBottom: this.addBottom, |
|
|
|
|
id: 0, |
|
|
|
|
info: {}, |
|
|
|
@ -128,6 +135,7 @@
|
|
|
|
|
onLoad() { |
|
|
|
|
this.id = this._route.query.id |
|
|
|
|
this.getInfo(this.id); |
|
|
|
|
this.getEvaluation(this.id) |
|
|
|
|
}, |
|
|
|
|
onShareAppMessage() { |
|
|
|
|
return { |
|
|
|
@ -136,12 +144,47 @@
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 删除 |
|
|
|
|
// del(){ |
|
|
|
|
// delUserCollection().then(res=>{ |
|
|
|
|
// var param={} |
|
|
|
|
// param.id=this.id |
|
|
|
|
// param.category= "" |
|
|
|
|
// delUserCollection(param).then(res=>{ |
|
|
|
|
// console.log(res,'==========11'); |
|
|
|
|
// }) |
|
|
|
|
// this.isCollection=!this.isCollection |
|
|
|
|
// console.log('++++++++'); |
|
|
|
|
// }) |
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 是否已经收藏 |
|
|
|
|
getEvaluation(id){ |
|
|
|
|
// collectEvaluation/add |
|
|
|
|
}, |
|
|
|
|
// 收藏 |
|
|
|
|
|
|
|
|
|
getCollection(){ |
|
|
|
|
|
|
|
|
|
var param={} |
|
|
|
|
param.id=this.id |
|
|
|
|
param.category= "" |
|
|
|
|
getUserCollection(param).then(res=>{ |
|
|
|
|
console.log(res,'==========11'); |
|
|
|
|
}) |
|
|
|
|
this.isCollection=!this.isCollection |
|
|
|
|
console.log('收藏---------'); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getInfo(id) { |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '' |
|
|
|
|
}) |
|
|
|
|
getEvaluationDetail(id).then(res => { |
|
|
|
|
this.info = res.data; |
|
|
|
|
console.log(this.info,4444444441); |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
@ -387,6 +430,9 @@
|
|
|
|
|
box-shadow: 0rpx -4rpx 38rpx 0rpx rgba(0,0,0,0.2); |
|
|
|
|
border-radius: 28rpx 28rpx 0rpx 0rpx; |
|
|
|
|
padding: 12rpx 32rpx 0rpx; |
|
|
|
|
.btn-box{ |
|
|
|
|
width: 35%; |
|
|
|
|
} |
|
|
|
|
.contacButton { |
|
|
|
|
height: 80rpx; |
|
|
|
|
padding: 0; |
|
|
|
|