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);
meta: [
{
name: this.$t("m.meta.member.name"),
content: this.$t("m.meta.member.content")
}
]
};
},
data() {
return {};
},
computed: {
...mapGetters(["user"])
},
components: {
[NavBar.name]: NavBar,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup
},
mounted() {
console.log("金如意");
},
methods: {
onInfo() {
this.$store.state.user.user ? this.$router.push("./info") : this.toLogin();
},
toOrder() {
if (this.$store.state.user.user) {
this.setOrderStatus("paying");
this.$router.push("./order");
} else {
this.toLogin();
{
name: "张三",
tel: "13000000000",
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;
name: this.$t("m.meta.product.name"),
content: this.$t("m.meta.product.content")
}
]
};
},
data() {
return {
pageNum: 0,
bannerList: [],
productList: [],
isLoading: false
};
},
components: {
[NavBar.name]: NavBar,
[Swipe.name]: Swipe,
[SwipeItem.name]: SwipeItem,
[PullRefresh.name]: PullRefresh,
[Toast.name]: Toast,
[Icon.name]: Icon
},
mounted() {
this.getBannerList();
this.getProductData();
},
methods: {
async getProductData() {
let res = await apiGetProduct(this.pageNum, "热门");
this.productList = res.data.data;
this.isLoading = false;
var list = res.data.data.list;
for(var i = 0; i < list.length; i++ ){
var item = list[i]
this.addressList.push({
id: item.id,
name: item.name,
tel: item.tel,
address: item.province + item.city + item.county + " " + item.addressDetail
})
}
})
}
},
components: {
[NavBar.name]: NavBar,
[AddressList.name]: AddressList
}
};
post: "518000",
address: "深圳市南山区",
detailAddress: "腾讯",
isDefault: false
},
areaList: null,
showArea: false,
title: this.$t("addAddressTitle"),
state: "add"
};
},
computed: {
...mapGetters(["this.$store.state.addressStatus"])
},
components: {
[NavBar.name]: NavBar,
[Area.name]: Area,
[Field.name]: Field,
[Dialog.name]: Dialog,
[SwitchCell.name]: SwitchCell,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[Icon.name]: Icon,
[Toast.name]: Toast
},
created() {
this.areaList = areaList;
if (this.$route.query.state == "edit") {
let data = this.$route.query.item;
this.addressInfo = data;
this.title = this.$t("editAddressTitle");
this.state = "edit";
};
},
data() {
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) {
};
},
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;
this.$toast('成功');
this.$router.push({ path: '/user/address' });
});
},
onDelete(content) {
addressDelete({ id: content.id });
removeLocalStorage('AddressId')
this.$router.go(-1);
},
goback() {
this.$router.go(-1);
}
},
components: {
[NavBar.name]: NavBar,
[AddressEdit.name]: AddressEdit
}
};
content: this.$t("m.meta.detail.content")
}
]
};
},
data() {
return {
goodsNum: 1,
addCartModel: false,
isBuy: true,
cartNum: false,
detailInfo: {}
};
},
components: {
[NavBar.name]: NavBar,
[GoodsAction.name]: GoodsAction,
[GoodsActionBigBtn.name]: GoodsActionBigBtn,
[GoodsActionMiniBtn.name]: GoodsActionMiniBtn,
[ImagePreview.name]: ImagePreview,
[Icon.name]: Icon,
[Toast.name]: Toast
},
mounted() {
this.getData();
},
methods: {
toCart() {
this.$router.push("./cart");
},
onCartModel() {
this.addCartModel = true;