Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Card } from 'vant';
import { Stepper } from 'vant';
import { SubmitBar } from 'vant';
import { Icon } from 'vant';
import { mapMutations} from "vuex";
import CarHeader from '../../common/header';
export default{
data(){
return{
checkedAll:true
}
},
components:{
[Checkbox.name]:Checkbox,
[CheckboxGroup.name]:CheckboxGroup,
[Card.name]:Card,
[Stepper.name]:Stepper,
[SubmitBar.name]:SubmitBar,
[Icon.name]:Icon,
CarHeader
},
computed:{
...mapState([
"carts"
])
},
created(){
console.log(this.carts);
},
methods:{
...mapMutations(["shanchu"]),
toggleCheckedAll(){
const couponId = this.coupons[index].cid;
const userCouponId = this.coupons[index].id;
setLocalStorage({CouponId: couponId, UserCouponId: userCouponId});
}
this.init()
},
onExchange() {
this.$toast("兑换暂不支持");
}
},
components: {
[Toast.name]: Toast ,
[SubmitBar.name]: SubmitBar,
[Card.name]: Card,
[Field.name]: Field,
[Tag.name]: Tag,
[CouponCell.name]: CouponCell,
[CouponList.name]: CouponList,
[Popup.name]: Popup
}
};
id: 0
}
],
allCoach: 0,
havePage: false,
productId: [],
addressData: [],
orderData: [],
addressInfo: {}
};
},
components: {
[NavBar.name]: NavBar,
[Dialog.name]: Dialog,
[Popup.name]: Popup,
[Card.name]: Card,
[SubmitBar.name]: SubmitBar,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[ContactList.name]: ContactList,
[Toast.name]: Toast
},
computed: {
cardType() {
return this.chosenContactId !== null ? "edit" : "add";
},
currentContact() {
const id = this.chosenContactId;
return id !== null ? this.list.filter(item => item.id === id)[0] : {};
},
...mapGetters(["this.$store.state.orders", "this.$store.state.address", "this.$store.state.addressStatus"])
await this.searchGoods();
this.loading = false;
if (this.pages <= this.page) {
this.finished = true;
}
},
itemClick(id) {
this.$router.push(`/items/detail/${id}`);
}
},
activated() {
this.wordHistory = this.getKeyWordHistory();
},
components: {
[Search.name]: Search,
[Card.name]: Card,
[Tag.name]: Tag,
[List.name]: List,
[IsEmpty.name]: IsEmpty
}
};
this.brand = res.data.data;
});
goodsList({
brandId: this.brandId
}).then(res => {
this.brandGoods = res.data.data.list;
});
},
itemClick(id) {
this.$router.push(`/items/detail/${id}`);
}
},
components: {
[Card.name]: Card,
[Row.name]: Row,
[Col.name]: Col
}
};
var data = res.data.data;
this.orderInfo = data.orderInfo;
this.orderGoods = data.orderGoods;
this.handleOption = data.orderInfo.handleOption;
this.expressInfo = data.expressInfo;
});
}
},
components: {
[Dialog.name]: Dialog,
[CellGroup.name]: CellGroup,
[Cell.name]: Cell,
[Button.name]: Button,
[SubmitBar.name]: SubmitBar,
[Card.name]: Card,
[Field.name]: Field
}
};
if (o instanceof Array) {
productIds = o;
} else {
productIds.push(o);
}
cartDelete({productIds: productIds}).then(res => {
this.goods = res.data.data.cartList;
this.allGoods = this.getAllList();
this.checkedGoods = this.getCheckedList(this.goods);
});
}
},
components: {
[Card.name]: Card,
[Tag.name]: Tag,
[Stepper.name]: Stepper,
[isEmpty.name]: isEmpty,
[Checkbox.name]: Checkbox,
[SubmitBar.name]: SubmitBar,
[CheckboxGroup.name]: CheckboxGroup
}
};
if (this.activeIndex != index) {
this.activeIndex = index;
}
},
getStatusText(status) {
return STATUS_TEXT[status] || '';
},
getRefundList(){
}
},
components: {
[Tab.name]: Tab,
[Tabs.name]: Tabs,
[Panel.name]: Panel,
[Card.name]: Card,
[List.name]: List
}
};
page: this.page,
limit: this.limit
}).then(res => {
this.goodsList.push(...res.data.data.list);
this.loading = false;
this.finished = res.data.data.page >= res.data.data.pages;
});
},
itemClick(id) {
this.$router.push(`/items/detail/${id}`);
}
},
components: {
[List.name]: List,
[Card.name]: Card,
[Tab.name]: Tab,
[Tabs.name]: Tabs
}
};