|
|
|
@ -4,7 +4,6 @@ |
|
|
|
|
<u-navbar title="" :border-bottom="false" title-color="#fff"></u-navbar> |
|
|
|
|
</view> |
|
|
|
|
<view class="head"> |
|
|
|
|
|
|
|
|
|
<view class="search"> |
|
|
|
|
<image src="/static/tabbar/home.png" mode="" class="icon" @click="goHome"></image> |
|
|
|
|
<view class="searInput" @click="goSearch"> |
|
|
|
@ -68,8 +67,8 @@ |
|
|
|
|
{{goods.goods_name}} |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsOpera"> |
|
|
|
|
<view class="goodsNum"> |
|
|
|
|
<text>100999080000</text> |
|
|
|
|
<view class="goodsNum" @click="copyNum(item.skuList[0].goods_sku_id)"> |
|
|
|
|
<text>{{item.skuList[0].goods_sku_id}}</text> |
|
|
|
|
<image src="/static/detail/copy.png" mode=""></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="operaImg"> |
|
|
|
@ -134,15 +133,15 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsList"> |
|
|
|
|
<view class="goodsItem" v-for="(item,index) in 6" :key="index"> |
|
|
|
|
<view class="goodsItem" v-for="(item,index) in suggestGoodsList" :key="index"> |
|
|
|
|
<view class="img"> |
|
|
|
|
<image src="/static/detail/tv.png" mode="" class="goodsImg"></image> |
|
|
|
|
<image :src="item.goods_image" mode="" class="goodsImg"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsName "> |
|
|
|
|
夏普4T-M70H7DA 70 |
|
|
|
|
{{item.goods_name}} |
|
|
|
|
</view> |
|
|
|
|
<view class="price"> |
|
|
|
|
¥2220 |
|
|
|
|
¥{{item.goods_price_min}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -295,24 +294,38 @@ |
|
|
|
|
openDialog: false, |
|
|
|
|
goodsId: '', |
|
|
|
|
goods: {}, |
|
|
|
|
suggestGoodsList: [] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad(options) { |
|
|
|
|
this.isPre = options.isPre |
|
|
|
|
this.getGoodsDetail(options.goodsId) |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
|
this.getSuggestGoods() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 获取商品信息 |
|
|
|
|
getGoodsDetail(val) { |
|
|
|
|
getGoodsDetail() { |
|
|
|
|
const that = this |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
GoodsApi.detail(val) |
|
|
|
|
GoodsApi.detail('10001') |
|
|
|
|
.then(result => { |
|
|
|
|
that.goods = result.data.detail |
|
|
|
|
}) |
|
|
|
|
.catch(reject) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getSuggestGoods() { |
|
|
|
|
// 获取推荐商品列表 |
|
|
|
|
const that = this |
|
|
|
|
GoodsApi.recommended() |
|
|
|
|
.then(result => { |
|
|
|
|
console.log(result, '获取推荐商品列表') |
|
|
|
|
that.suggestGoodsList = result.data.goodsList |
|
|
|
|
}) |
|
|
|
|
.catch(reject) |
|
|
|
|
}, |
|
|
|
|
goHome() { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/index/index' |
|
|
|
@ -610,6 +623,7 @@ |
|
|
|
|
color: #000000; |
|
|
|
|
line-height: 33rpx; |
|
|
|
|
margin: 28rpx 0 0 28rpx; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.goodsOpera { |
|
|
|
@ -786,7 +800,7 @@ |
|
|
|
|
|
|
|
|
|
.about { |
|
|
|
|
width: 720rpx; |
|
|
|
|
height: 730rpx; |
|
|
|
|
// height: 730rpx; |
|
|
|
|
background: #FFFFFF; |
|
|
|
|
border-radius: 6rpx 6rpx 6rpx 6rpx; |
|
|
|
|
opacity: 1; |
|
|
|
@ -854,7 +868,14 @@ |
|
|
|
|
font-weight: 400; |
|
|
|
|
color: #000000; |
|
|
|
|
line-height: 33rpx; |
|
|
|
|
|
|
|
|
|
display: -webkit-box; |
|
|
|
|
overflow: hidden; |
|
|
|
|
text-overflow: ellipsis; |
|
|
|
|
white-space: normal !important; |
|
|
|
|
word-wrap: break-word; |
|
|
|
|
-webkit-box-orient: vertical; |
|
|
|
|
-webkit-box-align: start; |
|
|
|
|
-webkit-box-pack: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.price { |
|
|
|
|