Browse Source

正式

master
jiazhipeng 3 weeks ago
parent
commit
b7de9dd1d8
  1. 2
      .env.production
  2. 1
      dist/css/220.409c24a4.css
  3. 1
      dist/css/87.aa23ef52.css
  4. 2
      dist/css/98.a80e6c68.css
  5. 2
      dist/index.html
  6. 2
      dist/js/220.18d44668.js
  7. 1
      dist/js/220.18d44668.js.map
  8. 2
      dist/js/750.df13650b.js
  9. 1
      dist/js/750.df13650b.js.map
  10. 1
      dist/js/828.deb87761.js.map
  11. 2
      dist/js/828.eee73d2f.js
  12. 1
      dist/js/828.eee73d2f.js.map
  13. 2
      dist/js/87.48a2ebc1.js
  14. 1
      dist/js/87.48a2ebc1.js.map
  15. 2
      dist/js/98.2ceeb0b5.js
  16. 1
      dist/js/98.2ceeb0b5.js.map
  17. 2
      dist/js/app.bde3f723.js
  18. 1
      dist/js/app.bde3f723.js.map
  19. 2
      dist/js/app.ca5d00ec.js
  20. 1
      dist/js/app.ca5d00ec.js.map

2
.env.production

@ -1,5 +1,5 @@
NODE_ENV='production'
# 请求域名前缀
VUE_APP_URL='https://swsz.api.js-dyyj.com'
VUE_APP_URL='https://api.sutenong.com'
# 打包后输出目录
VUE_APP_OUTPUTDIR='dist'

1
dist/css/220.409c24a4.css

@ -1 +0,0 @@
.product-grid-page[data-v-f31b94e0]{padding:20px;background-color:#f5f7fa;max-width:1400px;margin:0 auto}.product-grid-page .filter-bar[data-v-f31b94e0]{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-f31b94e0]{flex:1;min-width:200px}.product-grid-page .filter-bar .filter-select[data-v-f31b94e0]{min-width:140px}.product-grid-page .result-stats[data-v-f31b94e0]{margin:0 0 15px 5px;color:#666;font-size:14px;padding:5px 0}.product-grid-page .result-stats .category[data-v-f31b94e0],.product-grid-page .result-stats .keyword[data-v-f31b94e0]{color:#ff4d4f;font-weight:500;margin:0 5px}.product-grid-page .product-grid[data-v-f31b94e0]{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px;margin-bottom:30px}.product-grid-page .product-card[data-v-f31b94e0]{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-f31b94e0]:hover{transform:translateY(-5px);box-shadow:0 8px 16px rgba(0,0,0,.1)}.product-grid-page .product-card .product-img[data-v-f31b94e0]{width:100%;height:200px;background-color:#f5f5f5}.product-grid-page .product-card .image-placeholder[data-v-f31b94e0]{width:100%;height:200px;display:flex;align-items:center;justify-content:center;background-color:#f5f5f5}.product-grid-page .product-card .tag[data-v-f31b94e0]{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-f31b94e0]{padding:15px}.product-grid-page .product-card .product-info .product-name[data-v-f31b94e0]{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-f31b94e0]{display:flex;align-items:center;margin-bottom:8px}.product-grid-page .product-card .product-info .price-row .current-price[data-v-f31b94e0]{color:#ff4d4f;font-weight:700;font-size:16px}.product-grid-page .product-card .product-info .price-row .original-price[data-v-f31b94e0]{color:#999;font-size:12px;text-decoration:line-through;margin-left:8px}.product-grid-page .product-card .product-info .sales-volume[data-v-f31b94e0]{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-f31b94e0]{font-size:12px;margin-right:4px}.product-grid-page .product-card .product-info .cart-btn[data-v-f31b94e0]{width:100%}.product-grid-page .empty-state[data-v-f31b94e0]{grid-column:1/-1;padding:60px 0;text-align:center}.product-grid-page .pagination-container[data-v-f31b94e0]{display:flex;justify-content:center;margin-top:20px;padding:10px}@media(max-width:768px){.product-grid-page[data-v-f31b94e0]{padding:10px}.product-grid-page .filter-bar[data-v-f31b94e0]{padding:10px;gap:10px}.product-grid-page .product-grid[data-v-f31b94e0]{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}.product-grid-page .product-card .image-placeholder[data-v-f31b94e0],.product-grid-page .product-card .product-img[data-v-f31b94e0]{height:140px}}

1
dist/css/87.aa23ef52.css

@ -0,0 +1 @@
.product-grid-page[data-v-770ecff0]{padding:20px;background-color:#f5f7fa;max-width:1400px;margin:0 auto}.product-grid-page .filter-bar[data-v-770ecff0]{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-770ecff0]{flex:1;min-width:200px}.product-grid-page .filter-bar .filter-select[data-v-770ecff0]{min-width:140px}.product-grid-page .result-stats[data-v-770ecff0]{margin:0 0 15px 5px;color:#666;font-size:14px;padding:5px 0}.product-grid-page .result-stats .category[data-v-770ecff0],.product-grid-page .result-stats .keyword[data-v-770ecff0]{color:#ff4d4f;font-weight:500;margin:0 5px}.product-grid-page .product-grid[data-v-770ecff0]{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px;margin-bottom:30px}.product-grid-page .product-card[data-v-770ecff0]{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-770ecff0]:hover{transform:translateY(-5px);box-shadow:0 8px 16px rgba(0,0,0,.1)}.product-grid-page .product-card .product-img[data-v-770ecff0]{width:100%;height:200px;background-color:#f5f5f5}.product-grid-page .product-card .image-placeholder[data-v-770ecff0]{width:100%;height:200px;display:flex;align-items:center;justify-content:center;background-color:#f5f5f5}.product-grid-page .product-card .tag[data-v-770ecff0]{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-770ecff0]{padding:15px}.product-grid-page .product-card .product-info .product-name[data-v-770ecff0]{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-770ecff0]{display:flex;align-items:center;margin-bottom:8px}.product-grid-page .product-card .product-info .price-row .current-price[data-v-770ecff0]{color:#ff4d4f;font-weight:700;font-size:16px}.product-grid-page .product-card .product-info .price-row .original-price[data-v-770ecff0]{color:#999;font-size:12px;text-decoration:line-through;margin-left:8px}.product-grid-page .product-card .product-info .sales-volume[data-v-770ecff0]{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-770ecff0]{font-size:12px;margin-right:4px}.product-grid-page .product-card .product-info .cart-btn[data-v-770ecff0]{width:100%}.product-grid-page .empty-state[data-v-770ecff0]{grid-column:1/-1;padding:60px 0;text-align:center}.product-grid-page .pagination-container[data-v-770ecff0]{display:flex;justify-content:center;margin-top:20px;padding:10px}@media(max-width:768px){.product-grid-page[data-v-770ecff0]{padding:10px}.product-grid-page .filter-bar[data-v-770ecff0]{padding:10px;gap:10px}.product-grid-page .product-grid[data-v-770ecff0]{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}.product-grid-page .product-card .image-placeholder[data-v-770ecff0],.product-grid-page .product-card .product-img[data-v-770ecff0]{height:140px}}

2
dist/css/750.f4921ea4.css → dist/css/98.a80e6c68.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-c53f5724]{margin:30px 0}.product-box h2[data-v-c53f5724]{margin-bottom:20px}
.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-a8d92a36]{margin:30px 0}.product-box h2[data-v-a8d92a36]{margin-bottom:20px}

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.9c0851b6.js"></script><script defer="defer" src="/js/app.bde3f723.js"></script><link href="/css/chunk-vendors.10dd4e95.css" rel="stylesheet"><link href="/css/app.7266d7b4.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.9c0851b6.js"></script><script defer="defer" src="/js/app.ca5d00ec.js"></script><link href="/css/chunk-vendors.10dd4e95.css" rel="stylesheet"><link href="/css/app.7266d7b4.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/220.18d44668.js

@ -1,2 +0,0 @@
"use strict";(self["webpackChunkshiweisuzhou"]=self["webpackChunkshiweisuzhou"]||[]).push([[220],{6220: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:683},"/api/product/tag_list").then(e=>{this.categories=e.data,this.categories[0].id=662;const t=this.$route.query.id||662;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(1656),d=(0,o.A)(l,a,r,!1,null,"f31b94e0",null),n=d.exports}}]);
//# sourceMappingURL=220.18d44668.js.map

1
dist/js/220.18d44668.js.map

File diff suppressed because one or more lines are too long

2
dist/js/750.df13650b.js

File diff suppressed because one or more lines are too long

1
dist/js/750.df13650b.js.map

File diff suppressed because one or more lines are too long

1
dist/js/828.deb87761.js.map

File diff suppressed because one or more lines are too long

2
dist/js/828.deb87761.js → dist/js/828.eee73d2f.js

File diff suppressed because one or more lines are too long

1
dist/js/828.eee73d2f.js.map

File diff suppressed because one or more lines are too long

2
dist/js/87.48a2ebc1.js

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkshiweisuzhou"]=self["webpackChunkshiweisuzhou"]||[]).push([[87],{8087: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:683},"/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(1656),d=(0,o.A)(l,a,r,!1,null,"770ecff0",null),n=d.exports}}]);
//# sourceMappingURL=87.48a2ebc1.js.map

1
dist/js/87.48a2ebc1.js.map

File diff suppressed because one or more lines are too long

2
dist/js/98.2ceeb0b5.js

File diff suppressed because one or more lines are too long

1
dist/js/98.2ceeb0b5.js.map

File diff suppressed because one or more lines are too long

2
dist/js/app.bde3f723.js

File diff suppressed because one or more lines are too long

1
dist/js/app.bde3f723.js.map

File diff suppressed because one or more lines are too long

2
dist/js/app.ca5d00ec.js

File diff suppressed because one or more lines are too long

1
dist/js/app.ca5d00ec.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save