Browse Source

打包

master
chenkainan 3 weeks ago
parent
commit
fbf84d5022
  1. 1
      dist/css/512.a445f3d6.css
  2. 2
      dist/css/83.e0b9b1ac.css
  3. 1
      dist/css/896.4400289a.css
  4. 2
      dist/index.html
  5. 2
      dist/js/512.f7e0fd2d.js
  6. 1
      dist/js/512.f7e0fd2d.js.map
  7. 2
      dist/js/83.4f3ee6fe.js
  8. 1
      dist/js/83.4f3ee6fe.js.map
  9. 2
      dist/js/896.87e420a5.js
  10. 1
      dist/js/896.87e420a5.js.map
  11. 2
      dist/js/934.c3cb9093.js
  12. 1
      dist/js/934.c3cb9093.js.map
  13. 2
      dist/js/app.0b4d0b5a.js
  14. 2
      dist/js/app.0b4d0b5a.js.map
  15. 2
      dist/js/app.4470121a.js
  16. 11
      src/components/layout/HomeLayout.vue
  17. 62
      src/views/ProductPage/Index.vue

1
dist/css/512.a445f3d6.css

@ -0,0 +1 @@
.product-grid-page[data-v-01008c52]{padding:20px;background-color:#f5f7fa;max-width:1400px;margin:0 auto}.product-grid-page .filter-bar[data-v-01008c52]{display:flex;gap:15px;margin-bottom:20px;flex-wrap:wrap;align-items:center;padding:15px;background-color:#fff;border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.05)}.product-grid-page .filter-bar .search-input[data-v-01008c52]{flex:1;min-width:200px}.product-grid-page .filter-bar .filter-select[data-v-01008c52]{min-width:140px}.product-grid-page .result-stats[data-v-01008c52]{margin:0 0 15px 5px;color:#666;font-size:14px;padding:5px 0}.product-grid-page .result-stats .category[data-v-01008c52],.product-grid-page .result-stats .keyword[data-v-01008c52]{color:#ff4d4f;font-weight:500;margin:0 5px}.product-grid-page .product-grid[data-v-01008c52]{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px;margin-bottom:30px}.product-grid-page .product-card[data-v-01008c52]{background:#fff;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.05);overflow:hidden;transition:transform .3s,box-shadow .3s;cursor:pointer;position:relative}.product-grid-page .product-card[data-v-01008c52]:hover{transform:translateY(-5px);box-shadow:0 8px 16px rgba(0,0,0,.1)}.product-grid-page .product-card .product-img[data-v-01008c52]{width:100%;height:200px;background-color:#f5f5f5}.product-grid-page .product-card .image-placeholder[data-v-01008c52]{width:100%;height:200px;display:flex;align-items:center;justify-content:center;background-color:#f5f5f5}.product-grid-page .product-card .tag[data-v-01008c52]{position:absolute;top:10px;left:10px;padding:3px 8px;font-size:12px;color:#fff;border-radius:4px;z-index:1}.product-grid-page .product-card .product-info[data-v-01008c52]{padding:15px}.product-grid-page .product-card .product-info .product-name[data-v-01008c52]{font-size:14px;color:#333;margin-bottom:10px;height:40px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.product-grid-page .product-card .product-info .price-row[data-v-01008c52]{display:flex;align-items:center;margin-bottom:8px}.product-grid-page .product-card .product-info .price-row .current-price[data-v-01008c52]{color:#ff4d4f;font-weight:700;font-size:16px}.product-grid-page .product-card .product-info .price-row .original-price[data-v-01008c52]{color:#999;font-size:12px;text-decoration:line-through;margin-left:8px}.product-grid-page .product-card .product-info .sales-volume[data-v-01008c52]{font-size:12px;color:#666;margin-bottom:10px;display:flex;align-items:center}.product-grid-page .product-card .product-info .sales-volume i[data-v-01008c52]{font-size:12px;margin-right:4px}.product-grid-page .product-card .product-info .cart-btn[data-v-01008c52]{width:100%}.product-grid-page .empty-state[data-v-01008c52]{grid-column:1/-1;padding:60px 0;text-align:center}.product-grid-page .pagination-container[data-v-01008c52]{display:flex;justify-content:center;margin-top:20px;padding:10px}@media(max-width:768px){.product-grid-page[data-v-01008c52]{padding:10px}.product-grid-page .filter-bar[data-v-01008c52]{padding:10px;gap:10px}.product-grid-page .product-grid[data-v-01008c52]{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}.product-grid-page .product-card .image-placeholder[data-v-01008c52],.product-grid-page .product-card .product-img[data-v-01008c52]{height:140px}}

2
dist/css/934.80745de8.css → dist/css/83.e0b9b1ac.css

@ -1 +1 @@
.home-layout-container[data-v-185af175]{display:flex;width:100%;height:auto}.left-nav[data-v-185af175]{width:200px;background-color:#f8f9fa;padding:20px 0;box-sizing:border-box;border-radius:10px 0 0 10px}.nav-list[data-v-185af175]{list-style:none;margin:0;padding:0}.nav-item[data-v-185af175]{padding:12px 20px;cursor:pointer;color:#333;transition:all .3s ease;display:flex}.nav-item img[data-v-185af175]{width:20px;margin-right:5px}.nav-item[data-v-185af175]:hover{background-color:#e9ecef;padding-left:25px;color:#fff;background:#6a8a27}.main-content[data-v-185af175]{flex:1;height:auto;overflow:hidden}.carousel-img[data-v-185af175]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.main-content[data-v-185af175] .el-carousel__container{height:100%!important}.right-info[data-v-185af175]{width:280px;background-color:#fff;padding:20px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;border-left:1px solid #eee;border-radius:0 10px 10px 0}.avatar-container[data-v-185af175]{display:flex;flex-direction:column;align-items:center;margin-bottom:20px}.user-avatar[data-v-185af175]{width:60px;height:60px;border-radius:50%;margin-bottom:10px;border:2px solid #f0f0f0}.welcome-text[data-v-185af175]{font-size:14px;color:#333}.btn-group[data-v-185af175]{display:flex;gap:10px;margin-bottom:30px;width:100%}.func-icons[data-v-185af175]{display:flex;justify-content:space-around;flex-wrap:wrap;width:100%;margin-bottom:10px;padding:10px 0;border-top:1px dashed #eee;border-bottom:1px dashed #eee}.icon-item[data-v-185af175]{display:flex;flex-direction:column;align-items:center;cursor:pointer;color:#666;transition:color .3s ease;width:50%}.icon-item[data-v-185af175]:nth-child(n+3){margin-top:20px}.icon-item[data-v-185af175]:hover{color:#1890ff}.icon[data-v-185af175]{font-size:24px;margin-bottom:5px}.icon-item span[data-v-185af175]{font-size:12px}.announcement[data-v-185af175]{display:flex;align-items:center;font-size:12px;color:#666;width:100%;padding-top:10px;cursor:pointer}.announcement span[data-v-185af175]{margin-left:10px}.product-list .product-grid[data-v-71ee3626]{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:20px}.product-list .product-card[data-v-71ee3626]{border:1px solid #eaeaea;border-radius:8px;overflow:hidden;transition:all .3s ease;padding:10px;background:#fff;border-radius:10px}.product-list .product-card[data-v-71ee3626]:hover{transform:translateY(-5px);box-shadow:0 5px 15px rgba(0,0,0,.1)}.product-list .product-card .product-img[data-v-71ee3626]{height:250px;overflow:hidden}.product-list .product-card .product-img .product-pic[data-v-71ee3626]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;transition:transform .5s ease}.product-list .product-card .product-img .product-pic[data-v-71ee3626]:hover{transform:scale(1.05)}.product-list .product-card .product-info[data-v-71ee3626]{padding:10px}.product-list .product-card .product-info .product-name[data-v-71ee3626]{font-size:14px;line-height:20px;min-height:40px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-bottom:10px}.product-list .product-card .product-info .product-name a[data-v-71ee3626]{color:#333}.product-list .product-card .product-info .product-name a[data-v-71ee3626]:hover{color:#409eff}.product-list .product-card .product-info .product-price[data-v-71ee3626]{margin-bottom:15px}.product-list .product-card .product-info .product-price .current-price[data-v-71ee3626]{color:#f40;font-size:16px;font-weight:700}.product-list .product-card .product-info .product-price .original-price[data-v-71ee3626]{color:#999;font-size:12px;text-decoration:line-through;margin-left:8px}.product-list .product-card .product-info .product-actions[data-v-71ee3626]{margin-bottom:10px}.product-list .product-card .product-info .product-sales[data-v-71ee3626]{font-size:12px;color:#999;margin-bottom:15px}.product-list .no-products[data-v-71ee3626]{padding:50px 0;text-align:center}.product-box[data-v-6fb8cf7d]{margin:30px 0}.product-box h2[data-v-6fb8cf7d]{margin-bottom:20px} .home-layout-container[data-v-6d7df74e]{display:flex;width:100%;height:auto}.left-nav[data-v-6d7df74e]{width:200px;background-color:#f8f9fa;padding:20px 0;box-sizing:border-box;border-radius:10px 0 0 10px}.nav-list[data-v-6d7df74e]{list-style:none;margin:0;padding:0}.nav-item[data-v-6d7df74e]{padding:12px 20px;cursor:pointer;color:#333;transition:all .3s ease;display:flex}.nav-item img[data-v-6d7df74e]{width:20px;margin-right:5px}.nav-item[data-v-6d7df74e]:hover{background-color:#e9ecef;padding-left:25px;color:#fff;background:#6a8a27}.main-content[data-v-6d7df74e]{flex:1;height:auto;overflow:hidden}.carousel-img[data-v-6d7df74e]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.main-content[data-v-6d7df74e] .el-carousel__container{height:100%!important}.right-info[data-v-6d7df74e]{width:280px;background-color:#fff;padding:20px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;border-left:1px solid #eee;border-radius:0 10px 10px 0}.avatar-container[data-v-6d7df74e]{display:flex;flex-direction:column;align-items:center;margin-bottom:20px}.user-avatar[data-v-6d7df74e]{width:60px;height:60px;border-radius:50%;margin-bottom:10px;border:2px solid #f0f0f0}.welcome-text[data-v-6d7df74e]{font-size:14px;color:#333}.btn-group[data-v-6d7df74e]{display:flex;gap:10px;margin-bottom:30px;width:100%}.func-icons[data-v-6d7df74e]{display:flex;justify-content:space-around;flex-wrap:wrap;width:100%;margin-bottom:10px;padding:10px 0;border-top:1px dashed #eee;border-bottom:1px dashed #eee}.icon-item[data-v-6d7df74e]{display:flex;flex-direction:column;align-items:center;cursor:pointer;color:#666;transition:color .3s ease;width:50%}.icon-item[data-v-6d7df74e]:nth-child(n+3){margin-top:20px}.icon-item[data-v-6d7df74e]:hover{color:#1890ff}.icon[data-v-6d7df74e]{font-size:24px;margin-bottom:5px}.icon-item span[data-v-6d7df74e]{font-size:12px}.announcement[data-v-6d7df74e]{display:flex;align-items:center;font-size:12px;color:#666;width:100%;padding-top:10px;cursor:pointer}.announcement span[data-v-6d7df74e]{margin-left:10px}.product-list .product-grid[data-v-71ee3626]{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:20px}.product-list .product-card[data-v-71ee3626]{border:1px solid #eaeaea;border-radius:8px;overflow:hidden;transition:all .3s ease;padding:10px;background:#fff;border-radius:10px}.product-list .product-card[data-v-71ee3626]:hover{transform:translateY(-5px);box-shadow:0 5px 15px rgba(0,0,0,.1)}.product-list .product-card .product-img[data-v-71ee3626]{height:250px;overflow:hidden}.product-list .product-card .product-img .product-pic[data-v-71ee3626]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;transition:transform .5s ease}.product-list .product-card .product-img .product-pic[data-v-71ee3626]:hover{transform:scale(1.05)}.product-list .product-card .product-info[data-v-71ee3626]{padding:10px}.product-list .product-card .product-info .product-name[data-v-71ee3626]{font-size:14px;line-height:20px;min-height:40px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-bottom:10px}.product-list .product-card .product-info .product-name a[data-v-71ee3626]{color:#333}.product-list .product-card .product-info .product-name a[data-v-71ee3626]:hover{color:#409eff}.product-list .product-card .product-info .product-price[data-v-71ee3626]{margin-bottom:15px}.product-list .product-card .product-info .product-price .current-price[data-v-71ee3626]{color:#f40;font-size:16px;font-weight:700}.product-list .product-card .product-info .product-price .original-price[data-v-71ee3626]{color:#999;font-size:12px;text-decoration:line-through;margin-left:8px}.product-list .product-card .product-info .product-actions[data-v-71ee3626]{margin-bottom:10px}.product-list .product-card .product-info .product-sales[data-v-71ee3626]{font-size:12px;color:#999;margin-bottom:15px}.product-list .no-products[data-v-71ee3626]{padding:50px 0;text-align:center}.product-box[data-v-6fb8cf7d]{margin:30px 0}.product-box h2[data-v-6fb8cf7d]{margin-bottom:20px}

1
dist/css/896.4400289a.css

@ -1 +0,0 @@
.product-grid-page[data-v-4eb980d8]{padding:20px;background-color:#f5f7fa;max-width:1400px;margin:0 auto}.product-grid-page .filter-bar[data-v-4eb980d8]{display:flex;gap:15px;margin-bottom:20px;flex-wrap:wrap;align-items:center;padding:15px;background-color:#fff;border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.05)}.product-grid-page .filter-bar .search-input[data-v-4eb980d8]{flex:1;min-width:200px}.product-grid-page .filter-bar .filter-select[data-v-4eb980d8]{min-width:140px}.product-grid-page .result-stats[data-v-4eb980d8]{margin:0 0 15px 5px;color:#666;font-size:14px;padding:5px 0}.product-grid-page .result-stats .category[data-v-4eb980d8],.product-grid-page .result-stats .keyword[data-v-4eb980d8]{color:#ff4d4f;font-weight:500;margin:0 5px}.product-grid-page .product-grid[data-v-4eb980d8]{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px;margin-bottom:30px}.product-grid-page .product-card[data-v-4eb980d8]{background:#fff;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.05);overflow:hidden;transition:transform .3s,box-shadow .3s;cursor:pointer;position:relative}.product-grid-page .product-card[data-v-4eb980d8]:hover{transform:translateY(-5px);box-shadow:0 8px 16px rgba(0,0,0,.1)}.product-grid-page .product-card .product-img[data-v-4eb980d8]{width:100%;height:200px;background-color:#f5f5f5}.product-grid-page .product-card .image-placeholder[data-v-4eb980d8]{width:100%;height:200px;display:flex;align-items:center;justify-content:center;background-color:#f5f5f5}.product-grid-page .product-card .tag[data-v-4eb980d8]{position:absolute;top:10px;left:10px;padding:3px 8px;font-size:12px;color:#fff;border-radius:4px;z-index:1}.product-grid-page .product-card .product-info[data-v-4eb980d8]{padding:15px}.product-grid-page .product-card .product-info .product-name[data-v-4eb980d8]{font-size:14px;color:#333;margin-bottom:10px;height:40px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.product-grid-page .product-card .product-info .price-row[data-v-4eb980d8]{display:flex;align-items:center;margin-bottom:8px}.product-grid-page .product-card .product-info .price-row .current-price[data-v-4eb980d8]{color:#ff4d4f;font-weight:700;font-size:16px}.product-grid-page .product-card .product-info .price-row .original-price[data-v-4eb980d8]{color:#999;font-size:12px;text-decoration:line-through;margin-left:8px}.product-grid-page .product-card .product-info .sales-volume[data-v-4eb980d8]{font-size:12px;color:#666;margin-bottom:10px;display:flex;align-items:center}.product-grid-page .product-card .product-info .sales-volume i[data-v-4eb980d8]{font-size:12px;margin-right:4px}.product-grid-page .product-card .product-info .cart-btn[data-v-4eb980d8]{width:100%}.product-grid-page .empty-state[data-v-4eb980d8]{grid-column:1/-1;padding:60px 0;text-align:center}.product-grid-page .pagination-container[data-v-4eb980d8]{display:flex;justify-content:center;margin-top:20px;padding:10px}@media(max-width:768px){.product-grid-page[data-v-4eb980d8]{padding:10px}.product-grid-page .filter-bar[data-v-4eb980d8]{padding:10px;gap:10px}.product-grid-page .product-grid[data-v-4eb980d8]{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}.product-grid-page .product-card .image-placeholder[data-v-4eb980d8],.product-grid-page .product-card .product-img[data-v-4eb980d8]{height:140px}}

2
dist/index.html

@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>shiweisuzhou</title><script defer="defer" src="/js/chunk-vendors.12a86b61.js"></script><script defer="defer" src="/js/app.4470121a.js"></script><link href="/css/chunk-vendors.10dd4e95.css" rel="stylesheet"><link href="/css/app.bb526a7c.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but shiweisuzhou doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>shiweisuzhou</title><script defer="defer" src="/js/chunk-vendors.12a86b61.js"></script><script defer="defer" src="/js/app.0b4d0b5a.js"></script><link href="/css/chunk-vendors.10dd4e95.css" rel="stylesheet"><link href="/css/app.bb526a7c.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but shiweisuzhou doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

2
dist/js/512.f7e0fd2d.js

File diff suppressed because one or more lines are too long

1
dist/js/512.f7e0fd2d.js.map

File diff suppressed because one or more lines are too long

2
dist/js/83.4f3ee6fe.js

File diff suppressed because one or more lines are too long

1
dist/js/83.4f3ee6fe.js.map

File diff suppressed because one or more lines are too long

2
dist/js/896.87e420a5.js

@ -1,2 +0,0 @@
"use strict";(self["webpackChunkshiweisuzhou"]=self["webpackChunkshiweisuzhou"]||[]).push([[896],{3896:function(e,t,s){s.r(t),s.d(t,{default:function(){return n}});s(8111),s(116);var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"product-grid-page"},[e.showFilter?t("div",{staticClass:"filter-bar"},[t("el-select",{staticClass:"filter-select",attrs:{placeholder:"全部分类"},on:{change:e.handleCategoryChange},model:{value:e.selectedCategory,callback:function(t){e.selectedCategory=t},expression:"selectedCategory"}},e._l(e.categories,function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1),t("el-select",{staticClass:"filter-select",attrs:{placeholder:"综合排序"},on:{change:e.handleSortChange},model:{value:e.selectedSort,callback:function(t){e.selectedSort=t},expression:"selectedSort"}},[t("el-option",{attrs:{label:"综合排序",value:"default"}}),t("el-option",{attrs:{label:"销量↑",value:"sales_asc"}}),t("el-option",{attrs:{label:"销量↓",value:"sales_desc"}}),t("el-option",{attrs:{label:"价格↑",value:"price_asc"}}),t("el-option",{attrs:{label:"价格↓",value:"price_desc"}})],1)],1):e._e(),"search"==e.type?t("div",{staticClass:"result-stats"},[t("span",[e._v("全部结果 >")]),e.searchKeyword?t("span",{staticClass:"keyword"},[e._v('"'+e._s(e.searchKeyword)+'"')]):e._e(),e.selectedCategory&&e.categories.find(t=>t.value===e.selectedCategory)?t("span",{staticClass:"category"},[e._v(' "'+e._s(e.categories.find(t=>t.value===e.selectedCategory).label)+'" ')]):e._e(),t("span",[e._v("共"+e._s(e.totalProducts)+"个结果")])]):e._e(),t("div",{staticClass:"product-grid"},[e._l(e.visibleProducts,function(s,a){return t("div",{key:a,staticClass:"product-card",on:{click:function(t){return e.goToDetail(s.id)}}},[t("img",{directives:[{name:"lazy",rawName:"v-lazy",value:s.headimg,expression:"product.headimg"}],staticClass:"product-img",attrs:{alt:s.title,fit:"cover"}}),t("div",{staticClass:"product-info"},[t("div",{staticClass:"product-name"},[e._v(e._s(s.title))]),t("div",{staticClass:"price-row"},[t("span",{staticClass:"current-price"},[e._v("¥"+e._s(s.price/100))]),s.market_price?t("span",{staticClass:"original-price"},[e._v("¥"+e._s(s.market_price/100))]):e._e()]),t("div",{staticClass:"sales-volume"},[t("i",{staticClass:"el-icon-shopping-cart"}),e._v(" 已售 "+e._s(s.sales_number)+" ")]),t("el-button",{staticClass:"cart-btn",attrs:{type:"primary",size:"mini"}},[e._v(" 立即购买 ")])],1)])}),0===e.visibleProducts.length?t("div",{staticClass:"empty-state"},[t("el-empty",{attrs:{description:"暂无符合条件的商品"}})],1):e._e()],2),e.totalProducts>0?t("div",{staticClass:"pagination-container"},[t("el-pagination",{attrs:{"current-page":e.currentPage,"page-sizes":[12,24,36],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalProducts},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()])},r=[],i=(s(4114),s(3518)),c={name:"ProductGridPage",data(){return{type:"",searchKeyword:"",selectedCategory:"",selectedSort:"default",showFilter:!0,currentPage:1,pageSize:12,visibleProducts:[],totalProducts:0,categories:[],id:"",keyword:""}},computed:{...(0,i.L8)(["getSearchText"]),currentOffset(){return(this.currentPage-1)*this.pageSize}},watch:{getSearchText(e,t){e!==t&&(this.searchKeyword=e,this.fetchProducts())}},created(){this.type=this.$route.query?.type,this.searchKeyword=this.getSearchText,this.getTagList()},beforeDestroy(){this.searchKeyword="",this.$store.commit("setSearchText",""),this.currentPage=1,this.selectedCategory="",this.selectedSort="default"},methods:{getTagList(){this.post({pid:this.VUE_APP_GLOBAL_TAGS.side_all},"/api/product/tag_list").then(e=>{this.categories=e.data,this.categories[0].id=this.VUE_APP_GLOBAL_TAGS.pc_all;const t=this.$route.query.id||this.VUE_APP_GLOBAL_TAGS.pc_all;if(t){this.id=t;const e=this.categories.find(e=>e.id==t);console.log(t,e),e&&(this.selectedCategory=e.name)}this.fetchProducts()})},async fetchProducts(){const e={tag_id:this.id||this.selectedCategory,offset:this.currentOffset,limit:this.pageSize,title:this.searchKeyword,...this.parseSortParams()};this.searchKeyword&&(e.keyword=this.searchKeyword);const t=await this.post(e,"/api/product/get_product_by_tag");this.visibleProducts=t.data.list||[],this.totalProducts=Number(t.data.total)||0},parseSortParams(){if("default"===this.selectedSort)return{};const[e,t]=this.selectedSort.split("_"),s={sales:"sales_number",price:"price"};return{sort:s[e],order:t}},handleCategoryChange(e){this.id=e,this.currentPage=1,this.fetchProducts()},handleSortChange(){this.currentPage=1,this.fetchProducts()},handleSizeChange(e){this.pageSize=e,this.currentPage=1,this.fetchProducts()},handleCurrentChange(e){this.currentPage=e,this.fetchProducts(),window.scrollTo(0,0)},goToDetail(e){this.$router.push(`/Detail/${e}`)}}},l=c,o=s(845),d=(0,o.A)(l,a,r,!1,null,"4eb980d8",null),n=d.exports}}]);
//# sourceMappingURL=896.87e420a5.js.map

1
dist/js/896.87e420a5.js.map

File diff suppressed because one or more lines are too long

2
dist/js/934.c3cb9093.js

File diff suppressed because one or more lines are too long

1
dist/js/934.c3cb9093.js.map

File diff suppressed because one or more lines are too long

2
dist/js/app.0b4d0b5a.js

File diff suppressed because one or more lines are too long

2
dist/js/app.4470121a.js.map → dist/js/app.0b4d0b5a.js.map

File diff suppressed because one or more lines are too long

2
dist/js/app.4470121a.js

File diff suppressed because one or more lines are too long

11
src/components/layout/HomeLayout.vue

@ -4,9 +4,9 @@
<div class="left-nav"> <div class="left-nav">
<ul class="nav-list"> <ul class="nav-list">
<router-link <router-link
:to="'/productList?id=' + item.id" :to="'/productList?id=' + (index != 0 ? item.id : '')"
tag="li" tag="li"
v-for="item in tagList" v-for="(item, index) in tagList"
:key="item.id" :key="item.id"
class="nav-item" class="nav-item"
> >
@ -64,7 +64,10 @@
</router-link> </router-link>
</div> </div>
<router-link :to="'/NoticeDetail?type=notice&id='+notice.id" class="announcement"> <router-link
:to="'/NoticeDetail?type=notice&id=' + notice.id"
class="announcement"
>
<el-tag type="danger" size="mini">公告</el-tag> <el-tag type="danger" size="mini">公告</el-tag>
<span class="text-overflowRows">{{ notice.title }}</span> <span class="text-overflowRows">{{ notice.title }}</span>
</router-link> </router-link>
@ -206,7 +209,7 @@ export default {
transition: color 0.3s ease; transition: color 0.3s ease;
width: 50%; width: 50%;
} }
.icon-item:nth-child(n+3) { .icon-item:nth-child(n + 3) {
margin-top: 20px; margin-top: 20px;
} }
.icon-item:hover { .icon-item:hover {

62
src/views/ProductPage/Index.vue

@ -170,22 +170,54 @@ export default {
"/api/product/tag_list" "/api/product/tag_list"
).then((res) => { ).then((res) => {
this.categories = res.data; this.categories = res.data;
this.categories[0].id = this.VUE_APP_GLOBAL_TAGS.pc_all;
// id let ids = [];
const routeId = this.$route.query.id || this.VUE_APP_GLOBAL_TAGS.pc_all; // pc_all
if (routeId) { this.post(
// id {
this.id = routeId; pid: this.VUE_APP_GLOBAL_TAGS.pc_all,
// },
const matchedCategory = this.categories.find( "/api/product/tag_list"
(cat) => cat.id == routeId ).then((res) => {
// id
res.data.forEach((item) => ids.push(item.id));
// Promise
const subTagPromises = res.data.map((item) =>
this.post({ pid: item.id }, "/api/product/tag_list").then(
(subRes) => {
// id
subRes.data.forEach((i) => ids.push(i.id));
}
)
); );
console.log(routeId, matchedCategory);
if (matchedCategory) { //
this.selectedCategory = matchedCategory.name; Promise.all(subTagPromises).then(() => {
} // id
} this.categories[0].id = ids.join(",");
this.fetchProducts();
// id
const routeId = this.$route.query.id;
if (routeId) {
// id
this.id = routeId;
//
const matchedCategory = this.categories.find(
(cat) => cat.id == routeId
);
console.log(routeId, matchedCategory);
if (matchedCategory) {
this.selectedCategory = matchedCategory.name;
}
this.fetchProducts();
} else {
// ids
this.id = ids.join(",");
this.fetchProducts();
}
});
});
}); });
}, },
// - 使offsetlimit // - 使offsetlimit

Loading…
Cancel
Save