Fix:5184 【商城小程序】猜你喜欢商品列表,点击购物车图标商品未添加购物车
This commit is contained in:
+20
-6
@@ -109,7 +109,7 @@
|
||||
<view v-if="item.isNegotiable === 1" class="v12-primary-text v12-font-32 v12-font-weight" @clicks.stop="goRoom(item)">
|
||||
价格面议
|
||||
</view>
|
||||
<view class="btn">
|
||||
<view class="btn" @click.stop="addToCart(item, 'productId')">
|
||||
<image
|
||||
:src="webUrl + '/home/icon-cart.png'"
|
||||
class="img-icon"
|
||||
@@ -309,14 +309,14 @@
|
||||
:key="attr"
|
||||
:class="{
|
||||
'on': attr.check,
|
||||
'disabled': getAttrItemData(attr.attr).stock === 0
|
||||
'disabled': getAttrItemData1(attr.attr).stock === 0
|
||||
}"
|
||||
class="attr"
|
||||
@click="attrItemClick(attr, attrIndex, index)"
|
||||
>
|
||||
{{ attr.attr }}
|
||||
<text
|
||||
v-if="getAttrItemData(attr.attr).stock === 0"
|
||||
v-if="getAttrItemData1(attr.attr).stock === 0"
|
||||
class="tag"
|
||||
>缺货</text>
|
||||
</view>
|
||||
@@ -368,28 +368,41 @@
|
||||
</view>
|
||||
|
||||
</u-popup>
|
||||
<ProductWindow
|
||||
ref="attrWindow"
|
||||
:attr="attr"
|
||||
:cartNum="cart_num"
|
||||
:showOk="true"
|
||||
@changeFun="changeFun"
|
||||
@ok="handleOk(() => this.getCart())"
|
||||
/>
|
||||
<xdd-tabbar :curr-index="2" />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import XddTabbar from '@/components/xdd-tabbar'
|
||||
import ProductWindow from '@/components/ProductWindow'
|
||||
import {getAddressList, getUserLike} from "@/api/user";
|
||||
import {
|
||||
changeCartNum,
|
||||
getCartGroup,
|
||||
postCartDel,
|
||||
postCartAdd,
|
||||
getCartGoodAttr,
|
||||
cartGoodChangeAttr
|
||||
} from '@/api/store'
|
||||
import CheckboxIcon from '@/components/CheckboxIcon.vue'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
import goCartMixin from '@/mixins/goCartMixins'
|
||||
import { mapGetters } from 'vuex'
|
||||
import cookie from "@/utils/store/cookie"
|
||||
export default {
|
||||
components: {
|
||||
CheckboxIcon,
|
||||
XddTabbar
|
||||
XddTabbar,
|
||||
ProductWindow
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
mixins: [pageListenMixins, goCartMixin],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -415,6 +428,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin']),
|
||||
total() {
|
||||
let price = 0
|
||||
this.list.forEach(item => {
|
||||
@@ -766,7 +780,7 @@ export default {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
getAttrItemData(attr) {
|
||||
getAttrItemData1(attr) {
|
||||
let result = {
|
||||
stock: 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user