|
|
|
@ -249,10 +249,10 @@
|
|
|
|
|
<text>{{storeInfo.userCollect?'已收藏':'收藏'}}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="bnt acea-row row-between"> |
|
|
|
|
<view class="joinCart" @click="joinCart"> |
|
|
|
|
<view class="joinCart" :class="{'isOn':attr.productSelect.stock==0}" @click="joinCart"> |
|
|
|
|
<text>加入购物车</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="buy" @click="tapBuy"> |
|
|
|
|
<view class="buy" :class="{'isOn':attr.productSelect.stock==0}" @click="tapBuy"> |
|
|
|
|
<text>立即购买</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -574,6 +574,13 @@
|
|
|
|
|
}) |
|
|
|
|
getProductDetail(that.id, from) |
|
|
|
|
.then(res => { |
|
|
|
|
// for(let key in res.data.productValue){ |
|
|
|
|
// if(res.data.productValue[key].stock==0){ |
|
|
|
|
// res.data.productValue[key].isNo=false |
|
|
|
|
// }else{ |
|
|
|
|
// res.data.productValue[key].isNo=true |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
res.data.storeInfo.description = res.data.storeInfo.description.replace(/\<img/gi, |
|
|
|
|
'<img style="max-width:100%;height:auto;"') |
|
|
|
|
// res.data.storeInfo.description = res.data.storeInfo.description.replace(/ /gi,'') |
|
|
|
@ -582,6 +589,7 @@
|
|
|
|
|
// 给 attr 赋值,将请求回来的规格赋值给 attr |
|
|
|
|
that.$set(that.attr, 'productAttr', res.data.productAttr) |
|
|
|
|
that.$set(that, 'productValue', res.data.productValue) |
|
|
|
|
that.$set(that.attr, 'productValues', res.data.productValue) |
|
|
|
|
that.$set(that, 'replyCount', res.data.replyCount) |
|
|
|
|
that.$set(that, 'replyChance', res.data.replyChance) |
|
|
|
|
that.reply = res.data.reply ? [res.data.reply] : [] |
|
|
|
@ -754,7 +762,6 @@
|
|
|
|
|
//选择属性; |
|
|
|
|
ChangeAttr: function(res) { |
|
|
|
|
// 修改了规格 |
|
|
|
|
|
|
|
|
|
let productSelect = this.productValue[res.value] |
|
|
|
|
console.log(productSelect) |
|
|
|
|
if (productSelect) { |
|
|
|
@ -805,6 +812,7 @@
|
|
|
|
|
// 点击加入购物车按钮 |
|
|
|
|
joinCart: function() { |
|
|
|
|
//0=加入购物车 |
|
|
|
|
if(this.attr.productSelect.stock==0) return |
|
|
|
|
this.goCat(0) |
|
|
|
|
}, |
|
|
|
|
// 加入购物车; |
|
|
|
@ -900,6 +908,7 @@
|
|
|
|
|
//立即购买; |
|
|
|
|
tapBuy: function() { |
|
|
|
|
// 1=直接购买 |
|
|
|
|
if(this.attr.productSelect.stock==0) return |
|
|
|
|
this.goCat(1) |
|
|
|
|
}, |
|
|
|
|
linktap(e) { |
|
|
|
@ -976,6 +985,10 @@
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped lang="less"> |
|
|
|
|
.isOn{ |
|
|
|
|
background-color: #a0d2d0 !important; |
|
|
|
|
// color: #3A3A3C; |
|
|
|
|
} |
|
|
|
|
// .geoPage { |
|
|
|
|
// position: fixed; |
|
|
|
|
// width: 100%; |
|
|
|
|