|
|
|
@ -3,7 +3,10 @@ |
|
|
|
<uni-nav-bar :statusBar="true" left-icon="left" color="#000000" :leftWidth="navWidth" :rightWidth="navWidth" :fixed="true" @clickLeft="back"> |
|
|
|
<view class="input-view"> |
|
|
|
<uni-icons class="input-uni-icon" type="search" size="18" color="#999" /> |
|
|
|
<input confirm-type="search" class="nav-bar-input" type="text" placeholder="search" @confirm="confirm" /> |
|
|
|
<navigator url="/pages/index/search"> |
|
|
|
<input confirm-type="search" class="nav-bar-input" type="text" placeholder="search" /> |
|
|
|
</navigator> |
|
|
|
|
|
|
|
</view> |
|
|
|
<block slot="right"> |
|
|
|
<view class="nav_right"> |
|
|
|
@ -66,30 +69,33 @@ |
|
|
|
</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> |
|
|
|
<uni-rate size="18" :disabled="true" disabledColor="red" :value="goodsDate.comment_summary[0].commentcount==0?'0':'4'" active-color="red" :is-fill="false" /> |
|
|
|
<view class="evaluate_text">{{goodsDate.comment_summary[0].commentcount==0?'0.0':'4.0'}}</view> |
|
|
|
<text>({{goodsDate.comment_summary[0].commentcount}}reviews)</text> |
|
|
|
</view> |
|
|
|
<view class="variations"> |
|
|
|
<view class="variations_title"> |
|
|
|
<view class="variations_title_left">Variations</view> |
|
|
|
<text>2color</text> |
|
|
|
<text>{{colorNum}}color</text> |
|
|
|
</view> |
|
|
|
<view class="variations_select"> |
|
|
|
<view class="variations_select_varieties"> |
|
|
|
<view class="select_varieties_image" v-for="(item,index) in 3" :key="index"></view> |
|
|
|
</view> |
|
|
|
<view class="variations_select_size"> |
|
|
|
<view class="select_size_item">34</view> |
|
|
|
<view class="select_size_item">35</view> |
|
|
|
<view class="select_size_item">M</view> |
|
|
|
<view class="select_size_item">L</view> |
|
|
|
<view v-for="(item,index) in goodsDate.attr_list" :key="index" class="variations_select"> |
|
|
|
<!-- <view class="variations_select_varieties" > |
|
|
|
<view class="select_varieties_image" v-for="(item,index) in 3" :key="index"></view> |
|
|
|
</view> --> |
|
|
|
<view class="variations_select_size"> |
|
|
|
<view class="select_size_item" v-for="(item1,index1) in item.goods_attrs" :key="index1">{{item1.attr_value}}</view> |
|
|
|
<!-- <view class="select_size_item">35</view> |
|
|
|
<view class="select_size_item">M</view> |
|
|
|
<view class="select_size_item">L</view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="promotion"> |
|
|
|
<view class="promotion" v-if="goodsDate.is_promote==1"> |
|
|
|
<view class="promotion_title">Promotion</view> |
|
|
|
<view class="promotion_content"> |
|
|
|
<view class="promotion_content_item"> |
|
|
|
@ -110,7 +116,7 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="transport"> |
|
|
|
<view class="goods_title">Shipping to United States</view> |
|
|
|
<view class="goods_title">Shipping to {{addressDate.country_name || 'United States'}}</view> |
|
|
|
<view class="goods_title title_Mtop"> |
|
|
|
<view class="goods_title_left"> |
|
|
|
<image src="/static/img/transport.png" mode=""></image> |
|
|
|
@ -148,8 +154,8 @@ |
|
|
|
<li>Safe Payments </li> |
|
|
|
</ul> |
|
|
|
<ul> |
|
|
|
<li>Safe Payments </li> |
|
|
|
<li>Safe Payments </li> |
|
|
|
<li>Secure Logistics </li> |
|
|
|
<li>Secure Logistics </li> |
|
|
|
</ul> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -158,7 +164,8 @@ |
|
|
|
<text>Description</text> |
|
|
|
</view> |
|
|
|
<view class="goods_title_right"> |
|
|
|
<view>#Iron #Pearls,Flowers #Fashionable</view> |
|
|
|
<!-- <view>#Iron #Pearls,Flowers #Fashionable</view> --> |
|
|
|
<view>{{goodsDate.tags}}</view> |
|
|
|
<image src="../../static/img/right.png" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -167,7 +174,7 @@ |
|
|
|
<view class="reviews"> |
|
|
|
<view class="goods_title"> |
|
|
|
<view class="goods_title_left"> |
|
|
|
<text>Reviews(24)</text> |
|
|
|
<text>Reviews({{goodsDate.comment_summary[0].commentcount}})</text> |
|
|
|
</view> |
|
|
|
<view class="goods_title_right"> |
|
|
|
<image src="../../static/img/right.png" mode=""></image> |
|
|
|
@ -175,30 +182,37 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="allReviews"> |
|
|
|
<text>4.0</text> |
|
|
|
<uni-rate size="40" :disabled="true" disabledColor="red" :value="4" active-color="red" :is-fill="false"/> |
|
|
|
<text>{{goodsDate.comment_summary[0].commentcount==0?'0.0':'4.0'}}</text> |
|
|
|
<uni-rate size="40" :disabled="true" disabledColor="red" :value="goodsDate.comment_summary[0].commentcount==0?'0':'4'" active-color="red" :is-fill="false"/> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="reviews_item" v-for="(item,index) in 2" :key="index"> |
|
|
|
<view class="reviews_item_title"> |
|
|
|
<view class="reviews_title_user"> |
|
|
|
<text>e***8</text> |
|
|
|
<uni-rate size="18" :disabled="true" disabledColor="red" :value="4" active-color="red" :is-fill="false"/> |
|
|
|
<template v-if="goodsDate.comment_summary[0].commentcount==0"> |
|
|
|
<view class="reviews_no">No comment yet</view> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<view class="reviews_item" v-for="(item,index) in 2" :key="index"> |
|
|
|
<view class="reviews_item_title"> |
|
|
|
<view class="reviews_title_user"> |
|
|
|
<text>e***8</text> |
|
|
|
<uni-rate size="18" :disabled="true" disabledColor="red" :value="4" active-color="red" :is-fill="false"/> |
|
|
|
</view> |
|
|
|
<view class="reviews_title_time">07/03/2022</view> |
|
|
|
</view> |
|
|
|
<view class="reviews_item_color">Color:Multicolor</view> |
|
|
|
<view class="reviews_item_content">So unique! Can’t wait to wear these.</view> |
|
|
|
<view class="reviews_item_image"> |
|
|
|
<view class="reviews_image_content" v-for="(item,index) in 2" :key="index"></view> |
|
|
|
</view> |
|
|
|
<view class="reviews_title_time">07/03/2022</view> |
|
|
|
</view> |
|
|
|
<view class="reviews_item_color">Color:Multicolor</view> |
|
|
|
<view class="reviews_item_content">So unique! Can’t wait to wear these.</view> |
|
|
|
<view class="reviews_item_image"> |
|
|
|
<view class="reviews_image_content" v-for="(item,index) in 2" :key="index"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="productImage"> |
|
|
|
<view class="productImage_title">Product lmage gallery</view> |
|
|
|
<view class="productImage_image"></view> |
|
|
|
<view class="recommend recommend1"> |
|
|
|
<view class="productImage_image" v-html="goodsDate.goods_desc"> |
|
|
|
<!-- {{goodsDate.goods_desc}} --> |
|
|
|
<!-- <image :src="goodsDate.goods_img" mode=""></image> --> |
|
|
|
</view> |
|
|
|
<view class="recommend recommend1" v-if="goodsDate.category_list"> |
|
|
|
<view class="recommend_title">Other options</view> |
|
|
|
<scroll-view class="spike1 " scroll-x="true" :show-scrollbar="false"> |
|
|
|
<view class="spike1_item1" v-for="(item,index) in 8" :key="index" > |
|
|
|
@ -209,14 +223,18 @@ |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
<view class="productImage_image1"></view> |
|
|
|
<view class="productImage_image1"> |
|
|
|
<image :src="goodsDate.goods_thumb" mode=""></image> |
|
|
|
</view> |
|
|
|
<view class="recommend"> |
|
|
|
<view class="recommend_title">You might also like</view> |
|
|
|
<view class="recommend_content"> |
|
|
|
<view class="recommend_content_item" v-for="(item,index) in 2 " :key="index"> |
|
|
|
<view class="recommend_content_item_image"></view> |
|
|
|
<text>Adidas Yeezy Boost 350 DazzlingBlue Black</text> |
|
|
|
<view class="recommend_content_item_pric">US$314.00</view> |
|
|
|
<view class="recommend_content_item" v-for="(item,index) in catList " :key="index" @click="goDetails(item.id)"> |
|
|
|
<view class="recommend_content_item_image"> |
|
|
|
<image :src="item.thumb" mode=""></image> |
|
|
|
</view> |
|
|
|
<text>{{item.short_name}}</text> |
|
|
|
<view class="recommend_content_item_pric">US${{item.is_promote==0? item.shop_price :item.promote_price}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -266,22 +284,33 @@ |
|
|
|
<view class="addCard" v-show="isCart"> |
|
|
|
<image src="/static/img/close1.png" mode="" class="addCard_close"></image> |
|
|
|
<scroll-view class="spike1 " scroll-x="true" :show-scrollbar="false"> |
|
|
|
<image src="../../static/img/logo.png" mode="" class="addCard_scroll" v-for="(item,index) in 3" :key="index" ></image> |
|
|
|
<image :src="item.img_url" mode="" class="addCard_scroll" v-for="(item,index) in goodsDate.gallery_list" :key="index" ></image> |
|
|
|
</scroll-view> |
|
|
|
<view class="addCard_body"> |
|
|
|
<view >Adidas Yeezy Boost 350 V2 Dazzling Blue Black GY 7164 Men's Sizes </view> |
|
|
|
<view class="addCard_price">US$314.00</view> |
|
|
|
<view >Color Family</view> |
|
|
|
<view class="color_select"> |
|
|
|
<view class="color_select_item" v-for="(item,index) in 3" :key="index" :class="index==0?'active_color':''"> |
|
|
|
<view class="color_select_item_zoom"> |
|
|
|
<image src="../../static/img/zoom.png" mode=""></image> |
|
|
|
<view >{{goodsDate.goods_name}} </view> |
|
|
|
<view class="addCard_price">US${{goodsDate.is_promote==0? goodsDate.shop_price :goodsDate.promote_price}}</view> |
|
|
|
<view v-for="(item,index) in goodsDate.attr_list" :key="item.attr_id"> |
|
|
|
<view >{{item.attr_name}}</view> |
|
|
|
<view class="color_select variations_select_size"> |
|
|
|
|
|
|
|
<view class="select_size_item" |
|
|
|
v-for="(item1,index1) in item.goods_attrs" |
|
|
|
:key="item1.goods_attr_id" |
|
|
|
:class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''" |
|
|
|
@click="selectAttr(item.attr_id,item1.goods_attr_id,index)"> |
|
|
|
{{item1.attr_value}} |
|
|
|
</view> |
|
|
|
<image src="../../static/img/logo.png" mode=""></image> |
|
|
|
<view class="color_select_item_bottom">021【Blue】</view> |
|
|
|
<!-- <view class="color_select_item" v-for="(item,index) in 3" :key="index" :class="index==0?'active_color':''"> |
|
|
|
<view class="color_select_item_zoom"> |
|
|
|
<image src="../../static/img/zoom.png" mode=""></image> |
|
|
|
</view> |
|
|
|
<image src="../../static/img/logo.png" mode=""></image> |
|
|
|
<view class="color_select_item_bottom">021【Blue】</view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view >Size</view> |
|
|
|
|
|
|
|
<!-- <view >Size</view> |
|
|
|
<view class="variations_select_size"> |
|
|
|
<view class="select_size_item">34</view> |
|
|
|
<view class="select_size_item">35</view> |
|
|
|
@ -290,7 +319,7 @@ |
|
|
|
<view class="select_size_item">38</view> |
|
|
|
<view class="select_size_item">M</view> |
|
|
|
<view class="select_size_item">L</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
<view class="quantity"> |
|
|
|
<text>Quantity</text> |
|
|
|
<uni-number-box background="#FFFFFF">1</uni-number-box> |
|
|
|
@ -302,7 +331,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import {defaultRequest,defaultRequest2} from '../../api/index.js' |
|
|
|
import {defaultRequest,defaultRequest2,defaultRequest4} from '../../api/index.js' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -319,12 +348,87 @@ |
|
|
|
goodsDate:{ |
|
|
|
comment_summary:[ |
|
|
|
{comment_summary:'',commentlabel: ""} |
|
|
|
], |
|
|
|
gallery_list:[ |
|
|
|
{content:''} |
|
|
|
] |
|
|
|
}, |
|
|
|
user_info:{} |
|
|
|
user_info:{}, |
|
|
|
addressDate:{}, |
|
|
|
colorNum:0, |
|
|
|
//选择规格的数组 |
|
|
|
goods_attr_list:[ |
|
|
|
{goods_attr_id:''} |
|
|
|
], |
|
|
|
catQuery:{ |
|
|
|
_action:'getgoods', |
|
|
|
cat:'', |
|
|
|
page_index:1, |
|
|
|
page_size:10 |
|
|
|
}, |
|
|
|
catList:[], |
|
|
|
isReachBottom:true |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
// 其他商品详情 |
|
|
|
goDetails(id){ |
|
|
|
uni.navigateTo({ |
|
|
|
url:'index?goods_id='+id |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取该分类的其他商品 |
|
|
|
getCatList(type){ |
|
|
|
defaultRequest4(this.catQuery).then(res=>{ |
|
|
|
console.info(res) |
|
|
|
if(res.error==0){ |
|
|
|
if(res.data){ |
|
|
|
if(type==0){ |
|
|
|
this.catList=res.data |
|
|
|
}else{ |
|
|
|
this.catList=this.catList.concat(res.data) |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.isReachBottom=false |
|
|
|
uni.showToast({ |
|
|
|
title: 'No more data yet', |
|
|
|
icon:'none' |
|
|
|
}) |
|
|
|
this.catQuery.page_index-- |
|
|
|
} |
|
|
|
} |
|
|
|
uni.hideNavigationBarLoading(); |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 选择规格 |
|
|
|
selectAttr(attr_id,goods_attr_id,index){ |
|
|
|
let data={attr_id:attr_id,goods_attr_id:goods_attr_id} |
|
|
|
if(this.goods_attr_list.length==0){ |
|
|
|
this.goods_attr_list.push(data) |
|
|
|
}else{ |
|
|
|
// 判断是否有新的规格加入 |
|
|
|
let isNew=false |
|
|
|
// for(i in this.goods_attr_list){ |
|
|
|
// let item=this.goods_attr_list[i] |
|
|
|
// if(item.attr_id==attr_id){ |
|
|
|
// this.goods_attr_list[i].goods_attr_id=goods_attr_id |
|
|
|
// } |
|
|
|
// } |
|
|
|
this.goods_attr_list.map(item=>{ |
|
|
|
if(item.attr_id==attr_id){ |
|
|
|
item.goods_attr_id=goods_attr_id |
|
|
|
isNew=false |
|
|
|
return |
|
|
|
}else{ |
|
|
|
isNew=true |
|
|
|
} |
|
|
|
}) |
|
|
|
if(isNew){ |
|
|
|
this.goods_attr_list.splice(index,0,data) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 添加收藏 |
|
|
|
addLike(id){ |
|
|
|
let data={_action:'setfaviouritegoods',goods_id:this.query.goods_id} |
|
|
|
@ -360,6 +464,16 @@ |
|
|
|
console.info(res) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取默认地址 |
|
|
|
getDefaultAddress(){ |
|
|
|
let data={_action:'getdefaultconsignee'} |
|
|
|
defaultRequest2(data).then(res=>{ |
|
|
|
console.info(res) |
|
|
|
if(res.error==0){ |
|
|
|
this.addressDate=res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取商品详情数据 |
|
|
|
getDate(){ |
|
|
|
defaultRequest(this.query).then(res=>{ |
|
|
|
@ -369,6 +483,13 @@ |
|
|
|
this.goodsDate.gallery_list.map(item=>{ |
|
|
|
item.content='' |
|
|
|
}) |
|
|
|
this.goodsDate.attr_list.map(item=>{ |
|
|
|
if(item.attr_name=="Color"){ |
|
|
|
this.colorNum=item.goods_attrs.length |
|
|
|
} |
|
|
|
}) |
|
|
|
this.catQuery.cat=res.data.cat_id |
|
|
|
this.getCatList(0) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -383,9 +504,6 @@ |
|
|
|
// this.isVedio=false |
|
|
|
// } |
|
|
|
this.current = e.detail.current |
|
|
|
}, |
|
|
|
confirm(){ |
|
|
|
|
|
|
|
}, |
|
|
|
back(){ |
|
|
|
uni.navigateBack() |
|
|
|
@ -397,8 +515,24 @@ |
|
|
|
this.user_info=uni.getStorageSync('user_info') |
|
|
|
if(this.user_info.isLogin){ |
|
|
|
this.setFavorites() |
|
|
|
this.getDefaultAddress() |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// 上拉加载 |
|
|
|
onReachBottom(){ |
|
|
|
if(!this.isReachBottom)return |
|
|
|
if(this.catQuery.page_index>=5){ |
|
|
|
uni.hideNavigationBarLoading(); |
|
|
|
uni.showToast({ |
|
|
|
title: 'No more data yet', |
|
|
|
icon:'none' |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
|
|
|
|
this.catQuery.page_index++ |
|
|
|
this.getCatList(1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
@ -411,6 +545,11 @@ |
|
|
|
</style> |
|
|
|
<style lang="scss" scoped> |
|
|
|
$nav-height: 30px; |
|
|
|
.reviews_no{ |
|
|
|
padding: 30rpx; |
|
|
|
text-align: center; |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
.showVedio{ |
|
|
|
/deep/ .uni-swiper__dots-nav{ |
|
|
|
display: none; |
|
|
|
@ -463,7 +602,6 @@ |
|
|
|
margin-left: 20.67rpx; |
|
|
|
display: flex; |
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
|
|
.select_size_item{ |
|
|
|
background-color: #F8F8F8; |
|
|
|
width: 121.33rpx; |
|
|
|
@ -475,6 +613,8 @@ |
|
|
|
color: #666666; |
|
|
|
font-size: 24rpx; |
|
|
|
margin-right: 18.67rpx; |
|
|
|
border: 1px solid #F8F8F8; |
|
|
|
padding: 0 10rpx; |
|
|
|
|
|
|
|
&:nth-child(-n+2){ |
|
|
|
margin-bottom: 16.67rpx; |
|
|
|
@ -581,7 +721,7 @@ |
|
|
|
margin-bottom: 40.67rpx; |
|
|
|
.select_size_item{ |
|
|
|
margin-bottom: 16.67rpx !important; |
|
|
|
&:nth-child(5n+5){ |
|
|
|
&:nth-child(4n+4){ |
|
|
|
margin-right: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1058,14 +1198,23 @@ |
|
|
|
} |
|
|
|
.productImage_image{ |
|
|
|
width: 100%; |
|
|
|
height: 788rpx; |
|
|
|
min-height: 788rpx; |
|
|
|
margin-bottom: 62rpx; |
|
|
|
background-color: #999999; |
|
|
|
|
|
|
|
image{ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
.productImage_image1{ |
|
|
|
width: 100%; |
|
|
|
height: 532rpx; |
|
|
|
background-color: #999999; |
|
|
|
image{ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
.recommend1{ |
|
|
|
padding-top: 0; |
|
|
|
|