Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
},
data() {
return {
menuList: [],
categoryList: [],
categoryContent: [],
pageNum: 0,
type: ""
};
},
mixins: [dataMixin],
components: {
[NavBar.name]: NavBar,
[Tab.name]: Tab,
[Tabs.name]: Tabs,
[Toast.name]: Toast,
[Icon.name]: Icon
},
computed: {},
mounted() {
this.getMenuList();
// this.getCategoryList();
},
methods: {
async getMenuList() {
let res = await apiGetCategoryMenu();
this.menuList = res.data.data.slice(1);
console.log("menuList: ", this.menuList);
this.type = this.menuList[0].title;
this.getCategoryList();
}).then(res => {
this.couponList.push(...res.data.data.list);
this.loading = false;
this.finished = res.data.data.page >= res.data.data.pages;
});
},
handleTabClick() {
this.page = 0;
this.couponList = [];
this.getCouponList();
}
},
components: {
[Tab.name]: Tab,
[Tabs.name]: Tabs,
[Panel.name]: Panel,
[Card.name]: Card,
[List.name]: List,
CouponCell,
CouponList
}
};
} from 'vant';
import { Toast } from 'vant';
import { Stepper } from 'vant';
import DetailHeader from '../../common/header';
export default{
data(){
return{
active:0,
currentFruit:[],
cartLen:0,
isCollected:false
}
},
components:{
[Tab.name]:Tab,
[Tabs.name]:Tabs,
[Swipe.name]:Swipe,
[SwipeItem.name]:SwipeItem,
[GoodsAction.name]:GoodsAction,
[GoodsActionBigBtn.name]:GoodsActionBigBtn,
[GoodsActionMiniBtn.name]:GoodsActionMiniBtn,
[Stepper.name]:Stepper,
DetailHeader
},
methods:{
addGoodsCar(goodObj){
var idExist = this.carts.find(item => {
return item.id == goodObj.id;
});
if(!idExist){
goodObj.danxuan=true;
this.$store.dispatch('addCar', goodObj);
}).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
}
};
},
handleTabClick(index) {
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
}
};
data() {
return {
havePage: false,
orderData: [],
type: "paying",
active: 0,
orderTab: [{ name: this.$t("m.order.paying") }, { name: this.$t("m.order.waitPack") }, { name: this.$t("m.order.done") }, { name: this.$t("m.order.all") }],
title: "",
showEdit: false
};
},
mixins: [dataMixin],
components: {
[NavBar.name]: NavBar,
[Tab.name]: Tab,
[Tabs.name]: Tabs,
[Toast.name]: Toast,
[Icon.name]: Icon,
[Tag.name]: Tag,
[Dialog.name]: Dialog
},
computed: {
...mapGetters(["this.$store.state.orderStatus"])
},
created() {
switch (this.$store.state.orderStatus) {
case "paying":
this.active = 0;
this.type = "paying";
break;
case "payed":
this.active = 1;
},
handleTabClick() {
this.page = 0;
this.orderList = [];
this.getOrderList();
},
toOrderDetail(id) {
this.$router.push({
path: '/order/order-detail',
query: { orderId: id }
});
}
},
components: {
[Tab.name]: Tab,
[Tabs.name]: Tabs,
[Panel.name]: Panel,
[Card.name]: Card,
[List.name]: List,
[Tag.name]: Tag
}
};
import { SubmitBar } from 'vant';
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;