地址修改 购物车修改
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
<view v-for="(item, index) in argee" :key="index" style="font-size: 32rpx;">
|
<view v-for="(item, index) in argee" :key="index" style="font-size: 32rpx;">
|
||||||
<radio class="agreeRadio" :value="item.id" :checked="item.id == radioValue"
|
<radio class="agreeRadio" :value="item.id" :checked="item.id == radioValue"
|
||||||
color="#258feb" @click="radioCheck(index)"></radio>
|
color="#258feb" @click="radioCheck(index)"></radio>
|
||||||
默认收获地址
|
默认收货地址
|
||||||
</view>
|
</view>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ import { mapState } from "vuex";
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
courseDescription, //课程说明
|
courseDescription, //课程说明
|
||||||
editAddress, //编辑收获地址
|
editAddress, //编辑收货地址
|
||||||
},
|
},
|
||||||
props: ["backState", "type"],
|
props: ["backState", "type"],
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -206,12 +206,13 @@
|
|||||||
},
|
},
|
||||||
// 加入到购物车
|
// 加入到购物车
|
||||||
isAddLink(item) {
|
isAddLink(item) {
|
||||||
|
console.log('传入购物车',item);
|
||||||
// 统计商品信息
|
// 统计商品信息
|
||||||
let data = {
|
let data = {
|
||||||
"userId": this.userInfo.id,
|
"userId": this.userInfo.id,
|
||||||
"productId": item.productId,
|
"productId": item.productId,
|
||||||
"productAmount": this.productAmount,
|
"productAmount": 1,
|
||||||
"price": item.price
|
"price": item.activityPrice && item.activityPrice != 0 ? item.activityPrice : item.price
|
||||||
}
|
}
|
||||||
// 判断列表是否为空
|
// 判断列表是否为空
|
||||||
if (this.cartList.length > 0) {
|
if (this.cartList.length > 0) {
|
||||||
@@ -284,6 +285,7 @@
|
|||||||
},
|
},
|
||||||
oprate(data) {
|
oprate(data) {
|
||||||
console.log(data, '得到的内容')
|
console.log(data, '得到的内容')
|
||||||
|
|
||||||
if (data.name == 'buy') {
|
if (data.name == 'buy') {
|
||||||
this.buy(data.item)
|
this.buy(data.item)
|
||||||
} else if (data.name == 'gouwuche') {
|
} else if (data.name == 'gouwuche') {
|
||||||
|
|||||||
@@ -318,8 +318,8 @@
|
|||||||
let data = {
|
let data = {
|
||||||
"userId": this.userInfo.id,
|
"userId": this.userInfo.id,
|
||||||
"productId": item.productId,
|
"productId": item.productId,
|
||||||
"productAmount": this.productAmount,
|
"productAmount": 1,
|
||||||
"price": item.price
|
"price": item.activityPrice && item.activityPrice != 0 ? item.activityPrice : item.price
|
||||||
}
|
}
|
||||||
// 判断列表是否为空
|
// 判断列表是否为空
|
||||||
if (this.cartList.length > 0) {
|
if (this.cartList.length > 0) {
|
||||||
|
|||||||
@@ -717,8 +717,8 @@
|
|||||||
let data = {
|
let data = {
|
||||||
"userId": this.userInfo.id,
|
"userId": this.userInfo.id,
|
||||||
"productId": item.productId,
|
"productId": item.productId,
|
||||||
"productAmount": this.productAmount,
|
"productAmount": 1,
|
||||||
"price": item.price
|
"price": item.activityPrice && item.activityPrice != 0 ? item.activityPrice : item.price
|
||||||
}
|
}
|
||||||
// 判断列表是否为空
|
// 判断列表是否为空
|
||||||
if (this.cartList.length > 0) {
|
if (this.cartList.length > 0) {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="normal_box" v-else>
|
<view class="normal_box" v-else>
|
||||||
<view class="normal_box_top">
|
<view class="normal_box_top">
|
||||||
<view class="curriulum_title">请添加收获地址 </view>
|
<view class="curriulum_title">请添加收货地址 </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<z-nav-bar backState="2000" title="购物车">
|
<z-nav-bar backState="2000" title="购物车">
|
||||||
<view class="curseSet" slot="right" @click="manaCart = !manaCart" style="margin-right: 10px;">
|
<!-- <view class="curseSet" slot="right" @click="manaCart = !manaCart" style="margin-right: 10px;">
|
||||||
<text v-show="!manaCart">管理</text>
|
<text v-show="!manaCart">管理</text>
|
||||||
<text v-show="manaCart">完成</text>
|
<text v-show="manaCart">完成</text>
|
||||||
</view>
|
</view> -->
|
||||||
</z-nav-bar>
|
</z-nav-bar>
|
||||||
</z-nav-bar>
|
</z-nav-bar>
|
||||||
<view class="shopCarContent">
|
<view class="shopCarContent">
|
||||||
<scroll-view scroll-y="true">
|
<scroll-view scroll-y="true">
|
||||||
<view class="cartItem" v-for="(item,index) in cartList" :key="index">
|
<view class="cartItem" v-for="(item,index) in cartList" :key="index">
|
||||||
<view class="select" v-show="manaCart">
|
<view class="select" >
|
||||||
<checkbox :checked="item.checked" @click="checkboxGroupChange(index,item)"
|
<checkbox :checked="item.checked" @click="checkboxGroupChange(index,item)"
|
||||||
class="round checkedItem" />
|
class="round checkedItem" />
|
||||||
</view>
|
</view>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<text>{{item.productName}}</text>
|
<text>{{item.productName}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemPrice">
|
<view class="itemPrice">
|
||||||
<text v-if="item.activityPrice && item.activityPrice > 0">¥{{item.activityPrice*item.productAmount}}</text>
|
<text v-if="item.activityPrice && item.activityPrice > 0">¥-{{item.activityPrice*item.productAmount}}</text>
|
||||||
<text v-else>¥{{item.price*item.productAmount}}</text>
|
<text v-else>¥{{item.price*item.productAmount}}</text>
|
||||||
<u-number-box v-model="item.productAmount" @change="valChange($event,item)" :input-width="50"
|
<u-number-box v-model="item.productAmount" @change="valChange($event,item)" :input-width="50"
|
||||||
:input-height="20" :min="1" :max="item.productStock" integer @overlimit='overlimit'></u-number-box>
|
:input-height="20" :min="1" :max="item.productStock" integer @overlimit='overlimit'></u-number-box>
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
// }
|
// }
|
||||||
this.isCartDelShow = this.all
|
this.isCartDelShow = this.all
|
||||||
this.total()
|
this.total()
|
||||||
this.manaCart = this.all
|
// this.manaCart = this.all
|
||||||
} else {
|
} else {
|
||||||
this.all = false
|
this.all = false
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
this.totalPrice = 0
|
this.totalPrice = 0
|
||||||
this.getCartList()
|
this.getCartList()
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
this.manaCart = false
|
// this.manaCart = false
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log('cancel') //点击取消之后执行的代码
|
console.log('cancel') //点击取消之后执行的代码
|
||||||
|
|||||||
Reference in New Issue
Block a user