Pārlūkot izejas kodu

change: 分类页同步au的排序逻辑.

peter 3 nedēļas atpakaļ
vecāks
revīzija
f23d04beef

+ 6 - 6
.nuxt/components/index.js

@@ -35,12 +35,6 @@ export const TinymceDynamicLoadScript = () => import('../../components/Tinymce/d
 export const Tinymce = () => import('../../components/Tinymce/index.vue' /* webpackChunkName: "components/tinymce" */).then(c => wrapFunctional(c.default || c))
 export const TinymcePlugins = () => import('../../components/Tinymce/plugins.js' /* webpackChunkName: "components/tinymce-plugins" */).then(c => wrapFunctional(c.default || c))
 export const TinymceToolbar = () => import('../../components/Tinymce/toolbar.js' /* webpackChunkName: "components/tinymce-toolbar" */).then(c => wrapFunctional(c.default || c))
-export const CustomElSliderButton = () => import('../../components/custom-el-slider/button.vue' /* webpackChunkName: "components/custom-el-slider-button" */).then(c => wrapFunctional(c.default || c))
-export const CustomElSlider = () => import('../../components/custom-el-slider/index.vue' /* webpackChunkName: "components/custom-el-slider" */).then(c => wrapFunctional(c.default || c))
-export const CustomElSliderMarker = () => import('../../components/custom-el-slider/marker.vue' /* webpackChunkName: "components/custom-el-slider-marker" */).then(c => wrapFunctional(c.default || c))
-export const ProductLeft = () => import('../../components/product/ProductLeft.vue' /* webpackChunkName: "components/product-left" */).then(c => wrapFunctional(c.default || c))
-export const ProductRight = () => import('../../components/product/ProductRight.vue' /* webpackChunkName: "components/product-right" */).then(c => wrapFunctional(c.default || c))
-export const ProductQuote = () => import('../../components/product/Quote.vue' /* webpackChunkName: "components/product-quote" */).then(c => wrapFunctional(c.default || c))
 export const TableChangeTable = () => import('../../components/table/ChangeTable.vue' /* webpackChunkName: "components/table-change-table" */).then(c => wrapFunctional(c.default || c))
 export const TableMailTable = () => import('../../components/table/MailTable.vue' /* webpackChunkName: "components/table-mail-table" */).then(c => wrapFunctional(c.default || c))
 export const TableNewPriceTable = () => import('../../components/table/NewPriceTable.vue' /* webpackChunkName: "components/table-new-price-table" */).then(c => wrapFunctional(c.default || c))
@@ -48,6 +42,12 @@ export const TableStockTable = () => import('../../components/table/StockTable.v
 export const TableTotalTable = () => import('../../components/table/TotalTable.vue' /* webpackChunkName: "components/table-total-table" */).then(c => wrapFunctional(c.default || c))
 export const TableUnitTable = () => import('../../components/table/UnitTable.vue' /* webpackChunkName: "components/table-unit-table" */).then(c => wrapFunctional(c.default || c))
 export const TableParamTable = () => import('../../components/table/paramTable.vue' /* webpackChunkName: "components/table-param-table" */).then(c => wrapFunctional(c.default || c))
+export const ProductLeft = () => import('../../components/product/ProductLeft.vue' /* webpackChunkName: "components/product-left" */).then(c => wrapFunctional(c.default || c))
+export const ProductRight = () => import('../../components/product/ProductRight.vue' /* webpackChunkName: "components/product-right" */).then(c => wrapFunctional(c.default || c))
+export const ProductQuote = () => import('../../components/product/Quote.vue' /* webpackChunkName: "components/product-quote" */).then(c => wrapFunctional(c.default || c))
+export const CustomElSliderButton = () => import('../../components/custom-el-slider/button.vue' /* webpackChunkName: "components/custom-el-slider-button" */).then(c => wrapFunctional(c.default || c))
+export const CustomElSlider = () => import('../../components/custom-el-slider/index.vue' /* webpackChunkName: "components/custom-el-slider" */).then(c => wrapFunctional(c.default || c))
+export const CustomElSliderMarker = () => import('../../components/custom-el-slider/marker.vue' /* webpackChunkName: "components/custom-el-slider-marker" */).then(c => wrapFunctional(c.default || c))
 export const TinymceComponentsEditorImage = () => import('../../components/Tinymce/components/EditorImage.vue' /* webpackChunkName: "components/tinymce-components-editor-image" */).then(c => wrapFunctional(c.default || c))
 
 // nuxt/nuxt.js#8607

+ 6 - 6
.nuxt/components/readme.md

@@ -43,12 +43,6 @@ You can directly use them in pages and other components without the need to impo
 - `<Tinymce>` | `<tinymce>` (components/Tinymce/index.vue)
 - `<TinymcePlugins>` | `<tinymce-plugins>` (components/Tinymce/plugins.js)
 - `<TinymceToolbar>` | `<tinymce-toolbar>` (components/Tinymce/toolbar.js)
-- `<CustomElSliderButton>` | `<custom-el-slider-button>` (components/custom-el-slider/button.vue)
-- `<CustomElSlider>` | `<custom-el-slider>` (components/custom-el-slider/index.vue)
-- `<CustomElSliderMarker>` | `<custom-el-slider-marker>` (components/custom-el-slider/marker.vue)
-- `<ProductLeft>` | `<product-left>` (components/product/ProductLeft.vue)
-- `<ProductRight>` | `<product-right>` (components/product/ProductRight.vue)
-- `<ProductQuote>` | `<product-quote>` (components/product/Quote.vue)
 - `<TableChangeTable>` | `<table-change-table>` (components/table/ChangeTable.vue)
 - `<TableMailTable>` | `<table-mail-table>` (components/table/MailTable.vue)
 - `<TableNewPriceTable>` | `<table-new-price-table>` (components/table/NewPriceTable.vue)
@@ -56,4 +50,10 @@ You can directly use them in pages and other components without the need to impo
 - `<TableTotalTable>` | `<table-total-table>` (components/table/TotalTable.vue)
 - `<TableUnitTable>` | `<table-unit-table>` (components/table/UnitTable.vue)
 - `<TableParamTable>` | `<table-param-table>` (components/table/paramTable.vue)
+- `<ProductLeft>` | `<product-left>` (components/product/ProductLeft.vue)
+- `<ProductRight>` | `<product-right>` (components/product/ProductRight.vue)
+- `<ProductQuote>` | `<product-quote>` (components/product/Quote.vue)
+- `<CustomElSliderButton>` | `<custom-el-slider-button>` (components/custom-el-slider/button.vue)
+- `<CustomElSlider>` | `<custom-el-slider>` (components/custom-el-slider/index.vue)
+- `<CustomElSliderMarker>` | `<custom-el-slider-marker>` (components/custom-el-slider/marker.vue)
 - `<TinymceComponentsEditorImage>` | `<tinymce-components-editor-image>` (components/Tinymce/components/EditorImage.vue)

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/client/2dc0a1f.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/client/3da0f65.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/client/3da0f65.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/client/6bee1c9.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/client/6bee1c9.js.map


+ 7 - 7
.nuxt/dist/client/LICENSES

@@ -83,13 +83,6 @@
  */
 
 
-/*!
- * vue-infinite-loading v2.4.5
- * (c) 2016-2020 PeachScript
- * MIT License
- */
-
-
 /**
  * Prism: Lightweight, robust, elegant syntax highlighting
  *
@@ -140,6 +133,13 @@
  */
 
 
+/*!
+ * vue-infinite-loading v2.4.5
+ * (c) 2016-2020 PeachScript
+ * MIT License
+ */
+
+
 /**!
  * Sortable 1.10.2
  * @author	RubaXa   <trash@rubaxa.org>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/client/bdfa56f.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/client/bdfa56f.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 196 - 196
.nuxt/dist/server/client.manifest.json


+ 1 - 1
.nuxt/dist/server/index.spa.html

@@ -5,5 +5,5 @@
   <link href="/_nuxt/css/9b69cf1.css" rel="stylesheet"><link href="/_nuxt/css/0cf415b.css" rel="stylesheet"></head>
   <body {{ body_attrs }}>
     {{ APP }}
-  <script src="/_nuxt/6cff73c.js"></script><script src="/_nuxt/1d2d4a5.js"></script><script src="/_nuxt/00e8603.js"></script><script src="/_nuxt/e4f4f21.js"></script></body>
+  <script src="/_nuxt/3da0f65.js"></script><script src="/_nuxt/1d2d4a5.js"></script><script src="/_nuxt/00e8603.js"></script><script src="/_nuxt/6bee1c9.js"></script></body>
 </html>

+ 14 - 23
.nuxt/dist/server/pages/category/_firstCategory/_secondCategory/_thirdCategory/index.js

@@ -3539,8 +3539,8 @@ const defaultSortFunc = (a, b) => {
       return this.productsList.filter(item => {
         let moqFlag = true;
 
-        // moq 过滤. 要筛出1到最大输入quantities范围的
-        if (!item.moq || item.moq > this.quantity) {
+        // moq 过滤. 要筛出1到最大输入quantities范围的. 直接进入页面忽视这个值, 只有手动更改moq才会触发enableQuantity验证.
+        if (this.enableQuantity && (!item.moq || item.moq > this.quantity)) {
           moqFlag = false;
         }
 
@@ -3833,7 +3833,7 @@ const defaultSortFunc = (a, b) => {
       cate: [],
       order_name: '',
       order_type: '',
-      quantityMin: 1,
+      enableQuantity: false,
       quantity: 1000,
       priceMin: 1000,
       priceMax: 0.01,
@@ -3868,7 +3868,8 @@ const defaultSortFunc = (a, b) => {
       let sortFunc = defaultSortFunc;
       let keyword = this.$route.params.thirdCategory || this.$route.params.secondCategory || this.$route.params.firstCategory || '';
       const config = {
-        hitsPerPage: 1000
+        hitsPerPage: 1000,
+        restrictSearchableAttributes: ['name', 'keywords', 'colour', 'moq', 'collection', 'filter']
         // attributesToRetrieve: ['cat_name'], // 限定只返回某个属性
       };
       if (this.$route.query.keyword && this.$route.fullPath.includes('searchResult')) {
@@ -3957,7 +3958,7 @@ const defaultSortFunc = (a, b) => {
               cycle: (typeof item.cycle === 'string' ? JSON.parse(item.cycle) : item.cycle) || [],
               cycle_icon: (typeof item.cycle === 'string' ? JSON.parse(item.cycle) : item.cycle) || [],
               collection_detail: (typeof item.collection_detail === 'string' ? JSON.parse(item.collection_detail) : item.collection_detail) || [],
-              product_name: item.alias_name || item.name || '',
+              product_name: item.name || '',
               info: {
                 image: colorImg || item.img || '',
                 id: item.id
@@ -3975,16 +3976,6 @@ const defaultSortFunc = (a, b) => {
               create_time: item.create_time ? new Date(item.create_time).getTime() : new Date().getTime(),
               ranking: item.rank ? parseInt(item.rank) : Math.floor(Math.random() * 10000)
             };
-            // if (item.price_max) {
-            //   console.log(item.product_code)
-            // } else {
-            //   console.log(item.product_code, ' null max')
-            // }
-            // if (item.price_min) {
-            //   console.log(item.product_code)
-            // } else {
-            //   console.log(item.product_code, ' null min')
-            // }
             const min = Number(item.price_min);
             const max = Number(item.price_max);
             if (min < this.priceMin && min !== 0) {
@@ -4050,14 +4041,13 @@ const defaultSortFunc = (a, b) => {
         this.colourList = colorList;
         // this.decorationList = []
         // this.complianceList = []
-        if (this.$route.fullPath.includes('searchResult')) {
-          temp.sort((a, b) => {
-            if (a.hasBestSeller !== b.hasBestSeller) {
-              return b.hasBestSeller - a.hasBestSeller;
-            }
-          });
-        } else {
-          temp.sort(sortFunc);
+
+        if (!this.$route.fullPath.includes('searchResult')) {
+          if (this.$route.query.feature && Number(this.$route.query.feature) === 54) {
+            temp.sort((a, b) => b.create_time - a.create_time);
+          } else {
+            temp.sort(sortFunc);
+          }
         }
         this.productsList = temp;
         this.loaded = true;
@@ -4171,6 +4161,7 @@ const defaultSortFunc = (a, b) => {
     handleChangeQuantity(value) {
       if (value) {
         this.quantity = value;
+        this.enableQuantity = true;
         // this.$router.replace({
         //   path: this.$route.path,
         //   query: {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/server/pages/category/_firstCategory/_secondCategory/_thirdCategory/index.js.map


+ 14 - 23
.nuxt/dist/server/pages/category/_firstCategory/_secondCategory/index.js

@@ -3539,8 +3539,8 @@ const defaultSortFunc = (a, b) => {
       return this.productsList.filter(item => {
         let moqFlag = true;
 
-        // moq 过滤. 要筛出1到最大输入quantities范围的
-        if (!item.moq || item.moq > this.quantity) {
+        // moq 过滤. 要筛出1到最大输入quantities范围的. 直接进入页面忽视这个值, 只有手动更改moq才会触发enableQuantity验证.
+        if (this.enableQuantity && (!item.moq || item.moq > this.quantity)) {
           moqFlag = false;
         }
 
@@ -3833,7 +3833,7 @@ const defaultSortFunc = (a, b) => {
       cate: [],
       order_name: '',
       order_type: '',
-      quantityMin: 1,
+      enableQuantity: false,
       quantity: 1000,
       priceMin: 1000,
       priceMax: 0.01,
@@ -3868,7 +3868,8 @@ const defaultSortFunc = (a, b) => {
       let sortFunc = defaultSortFunc;
       let keyword = this.$route.params.thirdCategory || this.$route.params.secondCategory || this.$route.params.firstCategory || '';
       const config = {
-        hitsPerPage: 1000
+        hitsPerPage: 1000,
+        restrictSearchableAttributes: ['name', 'keywords', 'colour', 'moq', 'collection', 'filter']
         // attributesToRetrieve: ['cat_name'], // 限定只返回某个属性
       };
       if (this.$route.query.keyword && this.$route.fullPath.includes('searchResult')) {
@@ -3957,7 +3958,7 @@ const defaultSortFunc = (a, b) => {
               cycle: (typeof item.cycle === 'string' ? JSON.parse(item.cycle) : item.cycle) || [],
               cycle_icon: (typeof item.cycle === 'string' ? JSON.parse(item.cycle) : item.cycle) || [],
               collection_detail: (typeof item.collection_detail === 'string' ? JSON.parse(item.collection_detail) : item.collection_detail) || [],
-              product_name: item.alias_name || item.name || '',
+              product_name: item.name || '',
               info: {
                 image: colorImg || item.img || '',
                 id: item.id
@@ -3975,16 +3976,6 @@ const defaultSortFunc = (a, b) => {
               create_time: item.create_time ? new Date(item.create_time).getTime() : new Date().getTime(),
               ranking: item.rank ? parseInt(item.rank) : Math.floor(Math.random() * 10000)
             };
-            // if (item.price_max) {
-            //   console.log(item.product_code)
-            // } else {
-            //   console.log(item.product_code, ' null max')
-            // }
-            // if (item.price_min) {
-            //   console.log(item.product_code)
-            // } else {
-            //   console.log(item.product_code, ' null min')
-            // }
             const min = Number(item.price_min);
             const max = Number(item.price_max);
             if (min < this.priceMin && min !== 0) {
@@ -4050,14 +4041,13 @@ const defaultSortFunc = (a, b) => {
         this.colourList = colorList;
         // this.decorationList = []
         // this.complianceList = []
-        if (this.$route.fullPath.includes('searchResult')) {
-          temp.sort((a, b) => {
-            if (a.hasBestSeller !== b.hasBestSeller) {
-              return b.hasBestSeller - a.hasBestSeller;
-            }
-          });
-        } else {
-          temp.sort(sortFunc);
+
+        if (!this.$route.fullPath.includes('searchResult')) {
+          if (this.$route.query.feature && Number(this.$route.query.feature) === 54) {
+            temp.sort((a, b) => b.create_time - a.create_time);
+          } else {
+            temp.sort(sortFunc);
+          }
         }
         this.productsList = temp;
         this.loaded = true;
@@ -4171,6 +4161,7 @@ const defaultSortFunc = (a, b) => {
     handleChangeQuantity(value) {
       if (value) {
         this.quantity = value;
+        this.enableQuantity = true;
         // this.$router.replace({
         //   path: this.$route.path,
         //   query: {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/server/pages/category/_firstCategory/_secondCategory/index.js.map


+ 14 - 23
.nuxt/dist/server/pages/category/_firstCategory/index.js

@@ -3539,8 +3539,8 @@ const defaultSortFunc = (a, b) => {
       return this.productsList.filter(item => {
         let moqFlag = true;
 
-        // moq 过滤. 要筛出1到最大输入quantities范围的
-        if (!item.moq || item.moq > this.quantity) {
+        // moq 过滤. 要筛出1到最大输入quantities范围的. 直接进入页面忽视这个值, 只有手动更改moq才会触发enableQuantity验证.
+        if (this.enableQuantity && (!item.moq || item.moq > this.quantity)) {
           moqFlag = false;
         }
 
@@ -3833,7 +3833,7 @@ const defaultSortFunc = (a, b) => {
       cate: [],
       order_name: '',
       order_type: '',
-      quantityMin: 1,
+      enableQuantity: false,
       quantity: 1000,
       priceMin: 1000,
       priceMax: 0.01,
@@ -3868,7 +3868,8 @@ const defaultSortFunc = (a, b) => {
       let sortFunc = defaultSortFunc;
       let keyword = this.$route.params.thirdCategory || this.$route.params.secondCategory || this.$route.params.firstCategory || '';
       const config = {
-        hitsPerPage: 1000
+        hitsPerPage: 1000,
+        restrictSearchableAttributes: ['name', 'keywords', 'colour', 'moq', 'collection', 'filter']
         // attributesToRetrieve: ['cat_name'], // 限定只返回某个属性
       };
       if (this.$route.query.keyword && this.$route.fullPath.includes('searchResult')) {
@@ -3957,7 +3958,7 @@ const defaultSortFunc = (a, b) => {
               cycle: (typeof item.cycle === 'string' ? JSON.parse(item.cycle) : item.cycle) || [],
               cycle_icon: (typeof item.cycle === 'string' ? JSON.parse(item.cycle) : item.cycle) || [],
               collection_detail: (typeof item.collection_detail === 'string' ? JSON.parse(item.collection_detail) : item.collection_detail) || [],
-              product_name: item.alias_name || item.name || '',
+              product_name: item.name || '',
               info: {
                 image: colorImg || item.img || '',
                 id: item.id
@@ -3975,16 +3976,6 @@ const defaultSortFunc = (a, b) => {
               create_time: item.create_time ? new Date(item.create_time).getTime() : new Date().getTime(),
               ranking: item.rank ? parseInt(item.rank) : Math.floor(Math.random() * 10000)
             };
-            // if (item.price_max) {
-            //   console.log(item.product_code)
-            // } else {
-            //   console.log(item.product_code, ' null max')
-            // }
-            // if (item.price_min) {
-            //   console.log(item.product_code)
-            // } else {
-            //   console.log(item.product_code, ' null min')
-            // }
             const min = Number(item.price_min);
             const max = Number(item.price_max);
             if (min < this.priceMin && min !== 0) {
@@ -4050,14 +4041,13 @@ const defaultSortFunc = (a, b) => {
         this.colourList = colorList;
         // this.decorationList = []
         // this.complianceList = []
-        if (this.$route.fullPath.includes('searchResult')) {
-          temp.sort((a, b) => {
-            if (a.hasBestSeller !== b.hasBestSeller) {
-              return b.hasBestSeller - a.hasBestSeller;
-            }
-          });
-        } else {
-          temp.sort(sortFunc);
+
+        if (!this.$route.fullPath.includes('searchResult')) {
+          if (this.$route.query.feature && Number(this.$route.query.feature) === 54) {
+            temp.sort((a, b) => b.create_time - a.create_time);
+          } else {
+            temp.sort(sortFunc);
+          }
         }
         this.productsList = temp;
         this.loaded = true;
@@ -4171,6 +4161,7 @@ const defaultSortFunc = (a, b) => {
     handleChangeQuantity(value) {
       if (value) {
         this.quantity = value;
+        this.enableQuantity = true;
         // this.$router.replace({
         //   path: this.$route.path,
         //   query: {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/server/pages/category/_firstCategory/index.js.map


+ 14 - 23
.nuxt/dist/server/pages/category/index.js

@@ -3539,8 +3539,8 @@ const defaultSortFunc = (a, b) => {
       return this.productsList.filter(item => {
         let moqFlag = true;
 
-        // moq 过滤. 要筛出1到最大输入quantities范围的
-        if (!item.moq || item.moq > this.quantity) {
+        // moq 过滤. 要筛出1到最大输入quantities范围的. 直接进入页面忽视这个值, 只有手动更改moq才会触发enableQuantity验证.
+        if (this.enableQuantity && (!item.moq || item.moq > this.quantity)) {
           moqFlag = false;
         }
 
@@ -3833,7 +3833,7 @@ const defaultSortFunc = (a, b) => {
       cate: [],
       order_name: '',
       order_type: '',
-      quantityMin: 1,
+      enableQuantity: false,
       quantity: 1000,
       priceMin: 1000,
       priceMax: 0.01,
@@ -3868,7 +3868,8 @@ const defaultSortFunc = (a, b) => {
       let sortFunc = defaultSortFunc;
       let keyword = this.$route.params.thirdCategory || this.$route.params.secondCategory || this.$route.params.firstCategory || '';
       const config = {
-        hitsPerPage: 1000
+        hitsPerPage: 1000,
+        restrictSearchableAttributes: ['name', 'keywords', 'colour', 'moq', 'collection', 'filter']
         // attributesToRetrieve: ['cat_name'], // 限定只返回某个属性
       };
       if (this.$route.query.keyword && this.$route.fullPath.includes('searchResult')) {
@@ -3957,7 +3958,7 @@ const defaultSortFunc = (a, b) => {
               cycle: (typeof item.cycle === 'string' ? JSON.parse(item.cycle) : item.cycle) || [],
               cycle_icon: (typeof item.cycle === 'string' ? JSON.parse(item.cycle) : item.cycle) || [],
               collection_detail: (typeof item.collection_detail === 'string' ? JSON.parse(item.collection_detail) : item.collection_detail) || [],
-              product_name: item.alias_name || item.name || '',
+              product_name: item.name || '',
               info: {
                 image: colorImg || item.img || '',
                 id: item.id
@@ -3975,16 +3976,6 @@ const defaultSortFunc = (a, b) => {
               create_time: item.create_time ? new Date(item.create_time).getTime() : new Date().getTime(),
               ranking: item.rank ? parseInt(item.rank) : Math.floor(Math.random() * 10000)
             };
-            // if (item.price_max) {
-            //   console.log(item.product_code)
-            // } else {
-            //   console.log(item.product_code, ' null max')
-            // }
-            // if (item.price_min) {
-            //   console.log(item.product_code)
-            // } else {
-            //   console.log(item.product_code, ' null min')
-            // }
             const min = Number(item.price_min);
             const max = Number(item.price_max);
             if (min < this.priceMin && min !== 0) {
@@ -4050,14 +4041,13 @@ const defaultSortFunc = (a, b) => {
         this.colourList = colorList;
         // this.decorationList = []
         // this.complianceList = []
-        if (this.$route.fullPath.includes('searchResult')) {
-          temp.sort((a, b) => {
-            if (a.hasBestSeller !== b.hasBestSeller) {
-              return b.hasBestSeller - a.hasBestSeller;
-            }
-          });
-        } else {
-          temp.sort(sortFunc);
+
+        if (!this.$route.fullPath.includes('searchResult')) {
+          if (this.$route.query.feature && Number(this.$route.query.feature) === 54) {
+            temp.sort((a, b) => b.create_time - a.create_time);
+          } else {
+            temp.sort(sortFunc);
+          }
         }
         this.productsList = temp;
         this.loaded = true;
@@ -4171,6 +4161,7 @@ const defaultSortFunc = (a, b) => {
     handleChangeQuantity(value) {
       if (value) {
         this.quantity = value;
+        this.enableQuantity = true;
         // this.$router.replace({
         //   path: this.$route.path,
         //   query: {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/server/pages/category/index.js.map


+ 14 - 23
.nuxt/dist/server/pages/category/searchResult/index.js

@@ -3539,8 +3539,8 @@ const defaultSortFunc = (a, b) => {
       return this.productsList.filter(item => {
         let moqFlag = true;
 
-        // moq 过滤. 要筛出1到最大输入quantities范围的
-        if (!item.moq || item.moq > this.quantity) {
+        // moq 过滤. 要筛出1到最大输入quantities范围的. 直接进入页面忽视这个值, 只有手动更改moq才会触发enableQuantity验证.
+        if (this.enableQuantity && (!item.moq || item.moq > this.quantity)) {
           moqFlag = false;
         }
 
@@ -3833,7 +3833,7 @@ const defaultSortFunc = (a, b) => {
       cate: [],
       order_name: '',
       order_type: '',
-      quantityMin: 1,
+      enableQuantity: false,
       quantity: 1000,
       priceMin: 1000,
       priceMax: 0.01,
@@ -3868,7 +3868,8 @@ const defaultSortFunc = (a, b) => {
       let sortFunc = defaultSortFunc;
       let keyword = this.$route.params.thirdCategory || this.$route.params.secondCategory || this.$route.params.firstCategory || '';
       const config = {
-        hitsPerPage: 1000
+        hitsPerPage: 1000,
+        restrictSearchableAttributes: ['name', 'keywords', 'colour', 'moq', 'collection', 'filter']
         // attributesToRetrieve: ['cat_name'], // 限定只返回某个属性
       };
       if (this.$route.query.keyword && this.$route.fullPath.includes('searchResult')) {
@@ -3957,7 +3958,7 @@ const defaultSortFunc = (a, b) => {
               cycle: (typeof item.cycle === 'string' ? JSON.parse(item.cycle) : item.cycle) || [],
               cycle_icon: (typeof item.cycle === 'string' ? JSON.parse(item.cycle) : item.cycle) || [],
               collection_detail: (typeof item.collection_detail === 'string' ? JSON.parse(item.collection_detail) : item.collection_detail) || [],
-              product_name: item.alias_name || item.name || '',
+              product_name: item.name || '',
               info: {
                 image: colorImg || item.img || '',
                 id: item.id
@@ -3975,16 +3976,6 @@ const defaultSortFunc = (a, b) => {
               create_time: item.create_time ? new Date(item.create_time).getTime() : new Date().getTime(),
               ranking: item.rank ? parseInt(item.rank) : Math.floor(Math.random() * 10000)
             };
-            // if (item.price_max) {
-            //   console.log(item.product_code)
-            // } else {
-            //   console.log(item.product_code, ' null max')
-            // }
-            // if (item.price_min) {
-            //   console.log(item.product_code)
-            // } else {
-            //   console.log(item.product_code, ' null min')
-            // }
             const min = Number(item.price_min);
             const max = Number(item.price_max);
             if (min < this.priceMin && min !== 0) {
@@ -4050,14 +4041,13 @@ const defaultSortFunc = (a, b) => {
         this.colourList = colorList;
         // this.decorationList = []
         // this.complianceList = []
-        if (this.$route.fullPath.includes('searchResult')) {
-          temp.sort((a, b) => {
-            if (a.hasBestSeller !== b.hasBestSeller) {
-              return b.hasBestSeller - a.hasBestSeller;
-            }
-          });
-        } else {
-          temp.sort(sortFunc);
+
+        if (!this.$route.fullPath.includes('searchResult')) {
+          if (this.$route.query.feature && Number(this.$route.query.feature) === 54) {
+            temp.sort((a, b) => b.create_time - a.create_time);
+          } else {
+            temp.sort(sortFunc);
+          }
         }
         this.productsList = temp;
         this.loaded = true;
@@ -4171,6 +4161,7 @@ const defaultSortFunc = (a, b) => {
     handleChangeQuantity(value) {
       if (value) {
         this.quantity = value;
+        this.enableQuantity = true;
         // this.$router.replace({
         //   path: this.$route.path,
         //   query: {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/server/pages/category/searchResult/index.js.map


+ 12 - 12
.nuxt/dist/server/server.js

@@ -71163,12 +71163,6 @@ __webpack_require__.d(components_namespaceObject, "TinymceDynamicLoadScript", fu
 __webpack_require__.d(components_namespaceObject, "Tinymce", function() { return Tinymce; });
 __webpack_require__.d(components_namespaceObject, "TinymcePlugins", function() { return TinymcePlugins; });
 __webpack_require__.d(components_namespaceObject, "TinymceToolbar", function() { return TinymceToolbar; });
-__webpack_require__.d(components_namespaceObject, "CustomElSliderButton", function() { return CustomElSliderButton; });
-__webpack_require__.d(components_namespaceObject, "CustomElSlider", function() { return CustomElSlider; });
-__webpack_require__.d(components_namespaceObject, "CustomElSliderMarker", function() { return CustomElSliderMarker; });
-__webpack_require__.d(components_namespaceObject, "ProductLeft", function() { return ProductLeft; });
-__webpack_require__.d(components_namespaceObject, "ProductRight", function() { return ProductRight; });
-__webpack_require__.d(components_namespaceObject, "ProductQuote", function() { return ProductQuote; });
 __webpack_require__.d(components_namespaceObject, "TableChangeTable", function() { return TableChangeTable; });
 __webpack_require__.d(components_namespaceObject, "TableMailTable", function() { return TableMailTable; });
 __webpack_require__.d(components_namespaceObject, "TableNewPriceTable", function() { return TableNewPriceTable; });
@@ -71176,6 +71170,12 @@ __webpack_require__.d(components_namespaceObject, "TableStockTable", function()
 __webpack_require__.d(components_namespaceObject, "TableTotalTable", function() { return TableTotalTable; });
 __webpack_require__.d(components_namespaceObject, "TableUnitTable", function() { return TableUnitTable; });
 __webpack_require__.d(components_namespaceObject, "TableParamTable", function() { return TableParamTable; });
+__webpack_require__.d(components_namespaceObject, "ProductLeft", function() { return ProductLeft; });
+__webpack_require__.d(components_namespaceObject, "ProductRight", function() { return ProductRight; });
+__webpack_require__.d(components_namespaceObject, "ProductQuote", function() { return ProductQuote; });
+__webpack_require__.d(components_namespaceObject, "CustomElSliderButton", function() { return CustomElSliderButton; });
+__webpack_require__.d(components_namespaceObject, "CustomElSlider", function() { return CustomElSlider; });
+__webpack_require__.d(components_namespaceObject, "CustomElSliderMarker", function() { return CustomElSliderMarker; });
 __webpack_require__.d(components_namespaceObject, "TinymceComponentsEditorImage", function() { return TinymceComponentsEditorImage; });
 
 // EXTERNAL MODULE: external "vue"
@@ -72759,12 +72759,6 @@ const TinymceDynamicLoadScript = () => __webpack_require__.e(/* import() | compo
 const Tinymce = () => __webpack_require__.e(/* import() | components/tinymce */ 42).then(__webpack_require__.bind(null, 205)).then(c => wrapFunctional(c.default || c));
 const TinymcePlugins = () => __webpack_require__.e(/* import() | components/tinymce-plugins */ 45).then(__webpack_require__.bind(null, 193)).then(c => wrapFunctional(c.default || c));
 const TinymceToolbar = () => __webpack_require__.e(/* import() | components/tinymce-toolbar */ 46).then(__webpack_require__.bind(null, 194)).then(c => wrapFunctional(c.default || c));
-const CustomElSliderButton = () => __webpack_require__.e(/* import() | components/custom-el-slider-button */ 8).then(__webpack_require__.bind(null, 157)).then(c => wrapFunctional(c.default || c));
-const CustomElSlider = () => __webpack_require__.e(/* import() | components/custom-el-slider */ 7).then(__webpack_require__.bind(null, 159)).then(c => wrapFunctional(c.default || c));
-const CustomElSliderMarker = () => __webpack_require__.e(/* import() | components/custom-el-slider-marker */ 9).then(__webpack_require__.bind(null, 158)).then(c => wrapFunctional(c.default || c));
-const ProductLeft = () => __webpack_require__.e(/* import() | components/product-left */ 25).then(__webpack_require__.bind(null, 298)).then(c => wrapFunctional(c.default || c));
-const ProductRight = () => __webpack_require__.e(/* import() | components/product-right */ 27).then(__webpack_require__.bind(null, 299)).then(c => wrapFunctional(c.default || c));
-const ProductQuote = () => __webpack_require__.e(/* import() | components/product-quote */ 26).then(__webpack_require__.bind(null, 227)).then(c => wrapFunctional(c.default || c));
 const TableChangeTable = () => __webpack_require__.e(/* import() | components/table-change-table */ 35).then(__webpack_require__.bind(null, 229)).then(c => wrapFunctional(c.default || c));
 const TableMailTable = () => __webpack_require__.e(/* import() | components/table-mail-table */ 36).then(__webpack_require__.bind(null, 203)).then(c => wrapFunctional(c.default || c));
 const TableNewPriceTable = () => __webpack_require__.e(/* import() | components/table-new-price-table */ 37).then(__webpack_require__.bind(null, 200)).then(c => wrapFunctional(c.default || c));
@@ -72772,6 +72766,12 @@ const TableStockTable = () => __webpack_require__.e(/* import() | components/tab
 const TableTotalTable = () => __webpack_require__.e(/* import() | components/table-total-table */ 40).then(__webpack_require__.bind(null, 201)).then(c => wrapFunctional(c.default || c));
 const TableUnitTable = () => __webpack_require__.e(/* import() | components/table-unit-table */ 41).then(__webpack_require__.bind(null, 202)).then(c => wrapFunctional(c.default || c));
 const TableParamTable = () => __webpack_require__.e(/* import() | components/table-param-table */ 38).then(__webpack_require__.bind(null, 292)).then(c => wrapFunctional(c.default || c));
+const ProductLeft = () => __webpack_require__.e(/* import() | components/product-left */ 25).then(__webpack_require__.bind(null, 298)).then(c => wrapFunctional(c.default || c));
+const ProductRight = () => __webpack_require__.e(/* import() | components/product-right */ 27).then(__webpack_require__.bind(null, 299)).then(c => wrapFunctional(c.default || c));
+const ProductQuote = () => __webpack_require__.e(/* import() | components/product-quote */ 26).then(__webpack_require__.bind(null, 227)).then(c => wrapFunctional(c.default || c));
+const CustomElSliderButton = () => __webpack_require__.e(/* import() | components/custom-el-slider-button */ 8).then(__webpack_require__.bind(null, 157)).then(c => wrapFunctional(c.default || c));
+const CustomElSlider = () => __webpack_require__.e(/* import() | components/custom-el-slider */ 7).then(__webpack_require__.bind(null, 159)).then(c => wrapFunctional(c.default || c));
+const CustomElSliderMarker = () => __webpack_require__.e(/* import() | components/custom-el-slider-marker */ 9).then(__webpack_require__.bind(null, 158)).then(c => wrapFunctional(c.default || c));
 const TinymceComponentsEditorImage = () => __webpack_require__.e(/* import() | components/tinymce-components-editor-image */ 43).then(__webpack_require__.bind(null, 387)).then(c => wrapFunctional(c.default || c));
 
 // nuxt/nuxt.js#8607

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
.nuxt/dist/server/server.js.map


+ 18 - 18
.nuxt/vetur/tags.json

@@ -110,24 +110,6 @@
   "TinymceToolbar": {
     "description": "Auto imported from components/Tinymce/toolbar.js"
   },
-  "CustomElSliderButton": {
-    "description": "Auto imported from components/custom-el-slider/button.vue"
-  },
-  "CustomElSlider": {
-    "description": "Auto imported from components/custom-el-slider/index.vue"
-  },
-  "CustomElSliderMarker": {
-    "description": "Auto imported from components/custom-el-slider/marker.vue"
-  },
-  "ProductLeft": {
-    "description": "Auto imported from components/product/ProductLeft.vue"
-  },
-  "ProductRight": {
-    "description": "Auto imported from components/product/ProductRight.vue"
-  },
-  "ProductQuote": {
-    "description": "Auto imported from components/product/Quote.vue"
-  },
   "TableChangeTable": {
     "description": "Auto imported from components/table/ChangeTable.vue"
   },
@@ -149,6 +131,24 @@
   "TableParamTable": {
     "description": "Auto imported from components/table/paramTable.vue"
   },
+  "ProductLeft": {
+    "description": "Auto imported from components/product/ProductLeft.vue"
+  },
+  "ProductRight": {
+    "description": "Auto imported from components/product/ProductRight.vue"
+  },
+  "ProductQuote": {
+    "description": "Auto imported from components/product/Quote.vue"
+  },
+  "CustomElSliderButton": {
+    "description": "Auto imported from components/custom-el-slider/button.vue"
+  },
+  "CustomElSlider": {
+    "description": "Auto imported from components/custom-el-slider/index.vue"
+  },
+  "CustomElSliderMarker": {
+    "description": "Auto imported from components/custom-el-slider/marker.vue"
+  },
   "TinymceComponentsEditorImage": {
     "description": "Auto imported from components/Tinymce/components/EditorImage.vue"
   }

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels