Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else{
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
}
};
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(){
this.checkedAll= !this.checkedAll;
if(!this.checkedAll){
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
}
};
export default{
data(){
return{
currentAddressList:[],
invoiceTitle:"",
"pay_active":0,
"orderTotal":0,
"payStyle":"在线支付",
"orderMessage":"",
tabNum:0
}
},
components:{
[Tab.name]:Tab,
[Tabs.name]:Tabs,
[SubmitBar.name]:SubmitBar,
PayHeader
},
methods:{
orderTotalNum(){
var totalSum = 0;
this.orders.forEach((item)=>{
totalSum+=item.proPrice*item.homeValue*100
})
return totalSum;
},
paySuccess(){
var orderObj={};
orderObj.orders = this.orders;
orderObj.orderMessage = this.orderMessage;
orderObj.invoiceTitle = this.invoiceTitle;
orderObj.payStyle = this.payStyle;
}
],
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"])
},
return {
goodsRadioAll: false,
allCoach: 0,
radioArr: [],
itemIndex: "",
cartsData: [],
checked: true,
showEdit: false
};
},
mixins: [dataMixin],
components: {
[NavBar.name]: NavBar,
[Checkbox.name]: Checkbox,
[CheckboxGroup.name]: CheckboxGroup,
[SubmitBar.name]: SubmitBar,
[Icon.name]: Icon,
[Dialog.name]: Dialog,
[Toast.name]: Toast
},
created() {
this.getCart();
},
mounted() {},
methods: {
async getCart() {
let res = await apiGetCart();
if (res.data.code == -1) {
this.title = this.$t("m.login.noLogin");
setTimeout(() => {
this.$refs.nopage.onDisplay();
orderDetail({ orderId: orderId }).then(res => {
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
}
};