Task:点击购物车图标加入购物车
This commit is contained in:
@@ -571,7 +571,7 @@
|
||||
<text class="v12-font-bold v12-primary-text v12-font-24">¥</text>
|
||||
<text class="v12-font-bold v12-primary-text v12-font-28">{{ item.productPrice }}</text>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<view class="btn" @click.stop="addToCart(item, 'productId')">
|
||||
<image
|
||||
:src="webUrl + '/home/icon-cart.png'"
|
||||
class="img"
|
||||
@@ -632,6 +632,14 @@
|
||||
/>
|
||||
</view>
|
||||
</u-popup>
|
||||
<ProductWindow
|
||||
ref="attrWindow"
|
||||
:attr="attr"
|
||||
:cartNum="cart_num"
|
||||
:showOk="true"
|
||||
@changeFun="changeFun"
|
||||
@ok="handleOk"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -653,6 +661,8 @@ import {
|
||||
getShareImg,
|
||||
getSaleList
|
||||
} from '@/api/qianxian'
|
||||
import ProductWindow from '@/components/ProductWindow'
|
||||
import goCartMixin from '@/mixins/goCartMixins'
|
||||
import {formatDateTime} from '@/utils'
|
||||
import {getUrlParam} from '@/utils/common.js'
|
||||
import imgBox from '@/components/imageTypeSet/imagebox.vue'
|
||||
@@ -663,9 +673,10 @@ import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
components: {
|
||||
imgBox,
|
||||
XddProductItem
|
||||
XddProductItem,
|
||||
ProductWindow
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
mixins: [pageListenMixins, goCartMixin],
|
||||
data() {
|
||||
return {
|
||||
saleActived: null,
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
<text class="v12-font-32">¥</text>
|
||||
<text class="v12-font-36">{{ item.price }}</text>
|
||||
</view>
|
||||
<view class="cart-img">
|
||||
<view class="cart-img" @click.stop="addToCart(item, 'productId')">
|
||||
<image
|
||||
class="cart-img"
|
||||
:src="webUrl + '/orderIcon/组 355.png'"
|
||||
@@ -177,11 +177,25 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<ProductWindow
|
||||
ref="attrWindow"
|
||||
:attr="attr"
|
||||
:cartNum="cart_num"
|
||||
:showOk="true"
|
||||
@changeFun="changeFun"
|
||||
@ok="handleOk"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getRank, getFoods, getRecipe } from "@/api/health";
|
||||
import ProductWindow from '@/components/ProductWindow'
|
||||
import goCartMixin from '@/mixins/goCartMixins'
|
||||
export default {
|
||||
components: {
|
||||
ProductWindow
|
||||
},
|
||||
mixins: [goCartMixin],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
|
||||
Reference in New Issue
Block a user