|
|
|
@ -17,7 +17,8 @@ |
|
|
|
<uni-swiper-dot :info="info" :current="current" field="content" mode="nav" class="page_padding " :class="isVedio?'showVedio':''" > |
|
|
|
<swiper class="swiper" @change="gridSwiper" :circular="true"> |
|
|
|
<swiper-item> |
|
|
|
<view class="swiper-item uni-bg-red"> |
|
|
|
<view class="swiper-item"> |
|
|
|
<!-- <img src="" alt="" class="swiper-item-image"> --> |
|
|
|
<image src="../../static/img/play.png" class="vedio_play" mode=""></image> |
|
|
|
</view> |
|
|
|
</swiper-item> |
|
|
|
@ -41,7 +42,7 @@ |
|
|
|
</swiper> |
|
|
|
</uni-swiper-dot> |
|
|
|
</view> |
|
|
|
<view class="special"> |
|
|
|
<view class="special" v-if="goodsDate.is_promote==1"> |
|
|
|
<view class="special_left"> |
|
|
|
<image src="../../static/img/naozhong.png" mode=""></image> |
|
|
|
<text>Flash Sale</text> |
|
|
|
@ -54,13 +55,14 @@ |
|
|
|
</view> |
|
|
|
<view class="goods_info"> |
|
|
|
<view class="goods_info_price"> |
|
|
|
<text>US$314.00</text> |
|
|
|
<text>US${{goodsDate.shop_price}}</text> |
|
|
|
<view class="info_price_right"> |
|
|
|
<image src="/static/img/like.png" mode=""></image> |
|
|
|
<image src="/static/img/like.png" mode="" v-show="goodsDate.is_attention==0" @click="addLike(goodsDate.id)"></image> |
|
|
|
<image src="../../static/img/like1.png" mode="" v-show="goodsDate.is_attention==1" @click="removeLike(goodsDate.id)"></image> |
|
|
|
<image src="../../static/img/share.png" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view>Adidas Yeezy Boost 350 V2 Dazzling Blue Black GY 7164 Men's Sizes </view> |
|
|
|
<view>{{goodsDate.goods_name}} </view> |
|
|
|
<view class="evaluate"> |
|
|
|
<uni-rate size="18" :value="4" active-color="red" :is-fill="false"/> |
|
|
|
<view class="evaluate_text">4.0</view> |
|
|
|
@ -298,6 +300,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import {defaultRequest,defaultRequest2} from '../../api/index.js' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -305,6 +308,10 @@ |
|
|
|
current:0, |
|
|
|
isVedio:false, |
|
|
|
isSecurity:false, |
|
|
|
query:{ |
|
|
|
_action:'getgoodsdetail', |
|
|
|
goods_id:'' |
|
|
|
}, |
|
|
|
info: [{ |
|
|
|
colorClass: 'uni-bg-red', |
|
|
|
url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg', |
|
|
|
@ -322,10 +329,55 @@ |
|
|
|
} |
|
|
|
], |
|
|
|
isCart:false, |
|
|
|
|
|
|
|
goodsDate:{}, |
|
|
|
user_info:{} |
|
|
|
} |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
// 添加收藏 |
|
|
|
addLike(id){ |
|
|
|
let data={_action:'setfaviouritegoods',goods_id:this.query.goods_id} |
|
|
|
defaultRequest2(data).then(res=>{ |
|
|
|
console.info(res) |
|
|
|
if(res.error==0){ |
|
|
|
uni.showToast({ |
|
|
|
title:res.message, |
|
|
|
icon:'none' |
|
|
|
}) |
|
|
|
this.goodsDate.is_attention=1 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 取消收藏 |
|
|
|
removeLike(id){ |
|
|
|
let data={_action:'unsetfaviouritegoods',goods_id:this.query.goods_id} |
|
|
|
defaultRequest2(data).then(res=>{ |
|
|
|
console.info(res) |
|
|
|
if(res.error==0){ |
|
|
|
uni.showToast({ |
|
|
|
title:res.message, |
|
|
|
icon:'none' |
|
|
|
}) |
|
|
|
this.goodsDate.is_attention=0 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 添加商品足迹 |
|
|
|
setFavorites(){ |
|
|
|
let data={_action:'setgoodsbrowsehistory',goods_id:this.query.goods_id} |
|
|
|
defaultRequest2(data).then(res=>{ |
|
|
|
console.info(res) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取商品详情数据 |
|
|
|
getDate(){ |
|
|
|
defaultRequest(this.query).then(res=>{ |
|
|
|
console.info(res) |
|
|
|
if(res.error==0){ |
|
|
|
this.goodsDate=res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
addCart(){ |
|
|
|
this.isCart=true |
|
|
|
}, |
|
|
|
@ -343,6 +395,15 @@ |
|
|
|
back(){ |
|
|
|
uni.navigateBack() |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(e) { |
|
|
|
this.query.goods_id=e.goods_id |
|
|
|
this.getDate() |
|
|
|
this.user_info=uni.getStorageSync('user_info') |
|
|
|
if(this.user_info.isLogin){ |
|
|
|
this.setFavorites() |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
@ -699,6 +760,10 @@ |
|
|
|
color: white; |
|
|
|
position: relative; |
|
|
|
|
|
|
|
.swiper-item-image{ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
.vedioControl{ |
|
|
|
position: absolute; |
|
|
|
bottom: 18.67rpx; |
|
|
|
|