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