暂存代码
This commit is contained in:
+14
-7
@@ -1,6 +1,7 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_common = require("../../api/common.js");
|
||||
const utils_enumUtils = require("../../utils/enumUtils.js");
|
||||
const CustomTabBar = () => "../../components/custom-tab-bar.js";
|
||||
const _sfc_main = {
|
||||
components: { CustomTabBar },
|
||||
@@ -15,11 +16,7 @@ const _sfc_main = {
|
||||
// 左边菜单的高度
|
||||
menuItemHeight: 0,
|
||||
// 左边菜单item的高度
|
||||
bannerList: [
|
||||
"/static/common/product_def_banner.png",
|
||||
"/static/common/product_def_banner.png",
|
||||
"/static/common/product_def_banner.png"
|
||||
],
|
||||
bannerList: [],
|
||||
tabbarList: [],
|
||||
// 左侧的主分类
|
||||
tabbarContentList: [],
|
||||
@@ -27,8 +24,6 @@ const _sfc_main = {
|
||||
tabbarContentLoading: false
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
onShow() {
|
||||
this.getSort(0).then((resp) => {
|
||||
if (resp && resp.length !== 0) {
|
||||
@@ -51,11 +46,23 @@ const _sfc_main = {
|
||||
}
|
||||
}
|
||||
});
|
||||
this.getCarouselImage();
|
||||
},
|
||||
methods: {
|
||||
checkCategory(val) {
|
||||
this.selCategory = val;
|
||||
},
|
||||
// 查询轮播图
|
||||
async getCarouselImage() {
|
||||
const params = {
|
||||
pageUi: utils_enumUtils.APP_PAGE_TYPE.SORT
|
||||
};
|
||||
const resp = await api_common.getCarouselImage(params);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
const data = resp.data || [];
|
||||
this.bannerList = data.length !== 0 ? data.map((obj) => obj.carouselImage) : [];
|
||||
}
|
||||
},
|
||||
jumpSearch(item) {
|
||||
let path = "/pages/search/search";
|
||||
if (item && Object.keys(item).length !== 0) {
|
||||
|
||||
Reference in New Issue
Block a user