Browse Source

标的详情

master
453530270@qq.com 2 years ago
parent
commit
edbf34fab3
  1. 25
      pages/goods/detail.scss
  2. 49
      pages/goods/detail.vue

25
pages/goods/detail.scss

@ -153,6 +153,31 @@
} }
} }
// 店铺详情
.dpxq{
position: fixed;
bottom: var(--window-bottom);
left: 0;
right: 0;
display: flex;
z-index: 11;
height: 86rpx;
box-shadow: 0 -4rpx 40rpx 0 rgba(151, 151, 151, 0.24);
background: #fff;
// 设置ios刘海屏底部横线安全区域
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.xqbtn{
margin:20rpx auto;
line-height: 62rpx;
width: 40%;
height: 62rpx;
text-align: center;
color: #5500ff;
}
}
// 底部操作栏 // 底部操作栏
.footer-fixed { .footer-fixed {
position: fixed; position: fixed;

49
pages/goods/detail.vue

@ -130,7 +130,7 @@
</view> </view>
<!-- 资源信息 --> <!-- 资源信息 -->
<view v-if="!isLoading" class="bdcontent m-top20"> <view v-if="!isLoading || goods.source" class="bdcontent m-top20">
<view class="item-title b-f"> <view class="item-title b-f">
<text>资源信息</text> <text>资源信息</text>
</view> </view>
@ -154,24 +154,19 @@
</view> </view>
</view> </view>
<!-- 店铺详情 -->
<view class="dpxq">
<view class="xqbtn" @click="goteshop()">进入店铺</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import * as GoodsApi from '@/api/goods' import * as GoodsApi from '@/api/goods'
import * as CartApi from '@/api/cart'
// import Shortcut from '@/components/shortcut'
import SlideImage from './components/SlideImage'
import SkuPopup from './components/SkuPopup'
import Comment from './components/Comment'
export default { export default {
components: { components: {
// Shortcut, // Shortcut,
SlideImage,
SkuPopup,
Comment
}, },
data() { data() {
return { return {
@ -233,49 +228,25 @@
}else{ }else{
this.bdprice = '¥'+this.goods.price this.bdprice = '¥'+this.goods.price
} }
resolve(result) resolve(res)
}).catch(reject); }).catch(reject);
}) })
}, },
// //
getCartTotal() { goteshop(){
const app = this const app = this
return new Promise((resolve, reject) => { let spname = this.goods.username
CartApi.total() this.$navTo("pages/goods/list?k="+spname+'&dt='+new Date().getTime())
.then(result => {
app.cartTotal = result.data.cartTotal
resolve(result)
})
.catch(reject)
})
}, },
//
onAddCart(total) {
this.cartTotal = total
},
/**
* 显示/隐藏SKU弹窗
* @param {skuMode} 模式 1:都显示 2:只显示购物车 3:只显示立即购买
*/
onShowSkuPopup(skuMode = 1) {
this.skuMode = skuMode
this.showSkuPopup = !this.showSkuPopup
},
// //
onTargetHome(e) { onTargetHome(e) {
this.$navTo('pages/index/index') this.$navTo('pages/index/index')
}, },
//
onTargetCart() {
this.$navTo('pages/cart/index')
},
}, },
/** /**

Loading…
Cancel
Save