|
|
|
@ -130,7 +130,7 @@ |
|
|
|
</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"> |
|
|
|
<text>资源信息</text> |
|
|
|
</view> |
|
|
|
@ -153,25 +153,20 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 店铺详情 --> |
|
|
|
<view class="dpxq"> |
|
|
|
<view class="xqbtn" @click="goteshop()">进入店铺</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
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 { |
|
|
|
components: { |
|
|
|
// Shortcut, |
|
|
|
SlideImage, |
|
|
|
SkuPopup, |
|
|
|
Comment |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -233,49 +228,25 @@ |
|
|
|
}else{ |
|
|
|
this.bdprice = '¥'+this.goods.price |
|
|
|
} |
|
|
|
resolve(result) |
|
|
|
resolve(res) |
|
|
|
}).catch(reject); |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取购物车总数量 |
|
|
|
getCartTotal() { |
|
|
|
const app = this |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
CartApi.total() |
|
|
|
.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 |
|
|
|
}, |
|
|
|
|
|
|
|
// 调整 |
|
|
|
goteshop(){ |
|
|
|
const app = this |
|
|
|
let spname = this.goods.username |
|
|
|
this.$navTo("pages/goods/list?k="+spname+'&dt='+new Date().getTime()) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 跳转到首页 |
|
|
|
onTargetHome(e) { |
|
|
|
this.$navTo('pages/index/index') |
|
|
|
}, |
|
|
|
|
|
|
|
// 跳转到购物车页 |
|
|
|
onTargetCart() { |
|
|
|
this.$navTo('pages/cart/index') |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|