diff --git a/src/components/CommodityCard/CommodityCard.vue b/src/components/CommodityCard/CommodityCard.vue
index 4ee7115..8143d6f 100644
--- a/src/components/CommodityCard/CommodityCard.vue
+++ b/src/components/CommodityCard/CommodityCard.vue
@@ -77,7 +77,7 @@ image {
}
.name {
width: 92%;
- height: 54rpx;
+ height: 56rpx;
padding: 5px 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
diff --git a/src/components/HMFilterDropdown/HMFilterDropdown.vue b/src/components/HMFilterDropdown/HMFilterDropdown.vue
index d01799e..69d04ac 100644
--- a/src/components/HMFilterDropdown/HMFilterDropdown.vue
+++ b/src/components/HMFilterDropdown/HMFilterDropdown.vue
@@ -12,7 +12,7 @@
- {{loadedText}}
-
+ {{loadingText}}
+ {{loadedText}}
@@ -140,7 +140,7 @@ export default {
valueArr: "",
isLoading: true, //初始化加载状态
loadingText: "data loading...",
- loadedText: "~~到底啦~~",
+ loadedText: "~~暂无更多数据~~",
filterDropdownValue: [],
filterData: [],
searchText: "",
@@ -158,7 +158,12 @@ export default {
goodsList() {
// 也可以从 getters 获取
// console.log('index-list=====>',this.$store.state.index.list)
- return this.$store.state.index.list;
+ let list = this.$store.state.index.list;
+ if(list.length == 0){
+ this.isLoading = false;
+ }
+ this.scrollTop = 0.1;
+ return list
},
categoryList() {
return this.$store.state.index.categoryList;
@@ -260,7 +265,6 @@ export default {
flex-direction: column;
align-items: center;
justify-content: center;
- background-color: #f7f6f6;
}
.header {
display: flex;
diff --git a/src/store/modules/index.js b/src/store/modules/index.js
index d16ecb5..cf272d4 100644
--- a/src/store/modules/index.js
+++ b/src/store/modules/index.js
@@ -16,6 +16,350 @@ initArr.forEach(function (value) {
list.push(initData)
});
+let categoryList = [
+ {
+ "type": "checkbox",
+ "name": "产品",
+ "value": "category",
+ "submenu": [
+ {
+ "label": "镜框",
+ "name": "镜框",
+ "value": "1"
+ },
+ {
+ "label": "镜片",
+ "name": "镜片",
+ "value": "2"
+ },
+ {
+ "label": "特种镜",
+ "name": "特种镜",
+ "value": "146"
+ }
+ ],
+ "groups": [
+ "001"
+ ]
+ },
+ {
+ "type": "radio",
+ "name": "规则",
+ "value": "px",
+ "submenu": [
+ {
+ "name": "按价格排",
+ "value": "1"
+ },
+ {
+ "name": "按销量排",
+ "value": "2"
+ }
+ ],
+ "groups": [
+ "002"
+ ]
+ },
+ {
+ "type": "radio",
+ "name": "排序",
+ "value": "sort",
+ "submenu": [
+ {
+ "name": "从高到低",
+ "value": "1"
+ },
+ {
+ "name": "从低到高",
+ "value": "2"
+ }
+ ],
+ "groups": [
+ "003"
+ ]
+ },
+ {
+ "type": "filter",
+ "name": "筛选",
+ "value": "filter",
+ "submenu": [
+ {
+ "type": "checkbox",
+ "name": "性别",
+ "value": "sex",
+ "submenu": [
+ {
+ "label": "男性",
+ "name": "男性",
+ "value": "27"
+ },
+ {
+ "label": "女性",
+ "name": "女性",
+ "value": "28"
+ }
+ ]
+ },
+ {
+ "type": "checkbox",
+ "name": "年龄",
+ "value": "age",
+ "submenu": [
+ {
+ "label": "通用",
+ "name": "通用",
+ "value": "24"
+ }
+ ]
+ },
+ {
+ "type": "checkbox",
+ "name": "适用场景",
+ "value": "sense",
+ "submenu": [
+ {
+ "label": "行政风",
+ "name": "行政风",
+ "value": "53"
+ },
+ {
+ "label": "青春学子风",
+ "name": "青春学子风",
+ "value": "54"
+ },
+ {
+ "label": "运动风",
+ "name": "运动风",
+ "value": "55"
+ },
+ {
+ "label": "简约-极简文艺范",
+ "name": "简约-极简文艺范",
+ "value": "56"
+ },
+ {
+ "label": "奶奶风",
+ "name": "奶奶风",
+ "value": "57"
+ },
+ {
+ "label": "流线洛可可",
+ "name": "流线洛可可",
+ "value": "58"
+ },
+ {
+ "label": "自然舒视角",
+ "name": "自然舒视角",
+ "value": "59"
+ },
+ {
+ "label": "无界人文系",
+ "name": "无界人文系",
+ "value": "60"
+ },
+ {
+ "label": "有机未来时",
+ "name": "有机未来时",
+ "value": "61"
+ },
+ {
+ "label": "立体巴洛克",
+ "name": "立体巴洛克",
+ "value": "62"
+ },
+ {
+ "label": "多元新风尚",
+ "name": "多元新风尚",
+ "value": "63"
+ },
+ {
+ "label": "理性几何派",
+ "name": "理性几何派",
+ "value": "64"
+ },
+ {
+ "label": "轻简北欧风",
+ "name": "轻简北欧风",
+ "value": "65"
+ },
+ {
+ "label": "质感哥特潮",
+ "name": "质感哥特潮",
+ "value": "66"
+ },
+ {
+ "label": "时尚",
+ "name": "时尚",
+ "value": "67"
+ },
+ {
+ "label": "复古",
+ "name": "复古",
+ "value": "68"
+ },
+ {
+ "label": "商务",
+ "name": "商务",
+ "value": "69"
+ },
+ {
+ "label": "休闲",
+ "name": "休闲",
+ "value": "70"
+ },
+ {
+ "label": "折射率",
+ "name": "折射率",
+ "value": "285"
+ }
+ ]
+ },
+ {
+ "type": "checkbox",
+ "name": "价格",
+ "value": "price",
+ "submenu": [
+ {
+ "name": "100以下",
+ "value": "1,100"
+ },
+ {
+ "name": "100-300",
+ "value": "100,300"
+ },
+ {
+ "name": "300-1000",
+ "value": "300,1000"
+ },
+ {
+ "name": "1000以上",
+ "value": "1000,-1"
+ }
+ ]
+ },
+ {
+ "type": "checkbox",
+ "name": "材质",
+ "value": "glasscate",
+ "submenu": [
+ {
+ "label": "购易",
+ "name": "购易",
+ "value": "72"
+ },
+ {
+ "label": "海俪恩",
+ "name": "海俪恩",
+ "value": "73"
+ },
+ {
+ "label": "沙漠风暴",
+ "name": "沙漠风暴",
+ "value": "74"
+ },
+ {
+ "label": "古诗",
+ "name": "古诗",
+ "value": "75"
+ },
+ {
+ "label": "暴龙",
+ "name": "暴龙",
+ "value": "76"
+ },
+ {
+ "label": "犀牛",
+ "name": "犀牛",
+ "value": "77"
+ },
+ {
+ "label": "Ray-Ban雷朋",
+ "name": "Ray-Ban雷朋",
+ "value": "78"
+ },
+ {
+ "label": "PARIM派丽蒙",
+ "name": "PARIM派丽蒙",
+ "value": "79"
+ },
+ {
+ "label": "石狼",
+ "name": "石狼",
+ "value": "80"
+ },
+ {
+ "label": "木九十",
+ "name": "木九十",
+ "value": "81"
+ }
+ ]
+ },
+ {
+ "type": "checkbox",
+ "name": "品牌",
+ "value": "brand",
+ "submenu": [
+ {
+ "label": "购易",
+ "name": "购易",
+ "value": "72"
+ },
+ {
+ "label": "海俪恩",
+ "name": "海俪恩",
+ "value": "73"
+ },
+ {
+ "label": "沙漠风暴",
+ "name": "沙漠风暴",
+ "value": "74"
+ },
+ {
+ "label": "古诗",
+ "name": "古诗",
+ "value": "75"
+ },
+ {
+ "label": "暴龙",
+ "name": "暴龙",
+ "value": "76"
+ },
+ {
+ "label": "犀牛",
+ "name": "犀牛",
+ "value": "77"
+ },
+ {
+ "label": "Ray-Ban雷朋",
+ "name": "Ray-Ban雷朋",
+ "value": "78"
+ },
+ {
+ "label": "PARIM派丽蒙",
+ "name": "PARIM派丽蒙",
+ "value": "79"
+ },
+ {
+ "label": "石狼",
+ "name": "石狼",
+ "value": "80"
+ },
+ {
+ "label": "木九十",
+ "name": "木九十",
+ "value": "81"
+ }
+ ]
+ }
+ ],
+ "groups": [
+ "001",
+ "002",
+ "003"
+ ],
+ }
+ ]
+
//初始化数据是为了显示默认骨架
const state = {
categoryList: [],
@@ -52,7 +396,6 @@ initArr.forEach(function (value) {
});
commit('CATEGORY', data);
resolve(data)
- console.log('3333')
},
fail: (res) => {
console.log("fail status === > ", res);
@@ -67,8 +410,7 @@ initArr.forEach(function (value) {
url: shopList,
success: (res) => {
commit('LIST', res.data.data)
- resolve(res.data)
- console.log('3333')
+ resolve(res.data)
},
fail: (res) => {
console.log("fail status === > ", res);