From f5932f85898de7284c9f16d314b4a1c572b31c73 Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期五, 21 六月 2024 11:51:16 +0800 Subject: [PATCH] 视频 --- assets/js/middleGround/api/store.js | 119 ++++++++++++++++++++++++++++------------------------------- 1 files changed, 56 insertions(+), 63 deletions(-) diff --git a/assets/js/middleGround/api/store.js b/assets/js/middleGround/api/store.js index 85105ec..2626394 100644 --- a/assets/js/middleGround/api/store.js +++ b/assets/js/middleGround/api/store.js @@ -1,6 +1,12 @@ import request from "../../../request/index"; -import { tokenKey, goodsStore } from '../../config' -import { handleQueryResourceListData, handleDetailQueryRequestData } from '../tool' +import { + tokenKey, + goodsStore +} from '../../config' +import { + handleQueryResourceListData, + handleDetailQueryRequestData +} from '../tool' const storeApi = { /* **鑾峰彇鍟嗗搧鍒楄〃** @@ -42,16 +48,9 @@ Start: paging.start || '0', Size: paging.size || '10' }, - SortQuery: - sort?.length == 0 - ? [] - : sort - ? [sort] - : [ - { - LinkOrder: 'Desc' - } - ], + SortQuery: sort?.length == 0 ? [] : sort ? [sort] : [{ + LinkOrder: 'Desc' + }], CreateDate: [], Description: [], Name: [], @@ -78,36 +77,32 @@ query.AccessControl.MainProductId = mainProductId } if (handelEBooK) { - query.ProductCmsQuery = [ - { - QueryCms: { - Path: '*', - Type: '\\', - Name: [], - Icon: [], - TypeId: [], - RefCode: [], - ChildrenCount: [], - ChildrenFolderCount: [], - CreateDate: [], - SysType: [], - SaleMethod: [], - PageQuery: { - Start: 0, - Size: 9999 - }, - ProductLinkInfo: [] - } + query.ProductCmsQuery = [{ + QueryCms: { + Path: '*', + Type: '\\', + Name: [], + Icon: [], + TypeId: [], + RefCode: [], + ChildrenCount: [], + ChildrenFolderCount: [], + CreateDate: [], + SysType: [], + SaleMethod: [], + PageQuery: { + Start: 0, + Size: 9999 + }, + ProductLinkInfo: [] } - ] + }] } const body = { query: JSON.stringify({ - Query: [ - { - Q1: query - } - ] + Query: [{ + Q1: query + }] }) } let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : ''; @@ -189,13 +184,9 @@ Start: 0, Size: 9999 }, - SortQuery: cmsSort - ? [cmsSort] - : [ - { - ProductLinkOrder: 'Asc' - } - ], + SortQuery: cmsSort ? [cmsSort] : [{ + ProductLinkOrder: 'Asc' + }], ProductLinkInfo: [], ...itemFields } @@ -261,13 +252,9 @@ Size: '1' }, 'Id=': [`${productId}`], - SortQuery: sort - ? [sort] - : [ - { - LinkOrder: 'Desc' - } - ], + SortQuery: sort ? [sort] : [{ + LinkOrder: 'Desc' + }], CreateDate: [], Description: [], Name: [], @@ -294,11 +281,9 @@ const body = { query: JSON.stringify({ - Query: [ - { - Q1: query - } - ] + Query: [{ + Q1: query + }] }) } @@ -307,11 +292,11 @@ let url = token ? '/store/api/ApiQueryProductByAppUser' : '/store/api/ApiQueryProduct' return request({ - url: url, - method: 'post', - data: body, - cancelToken: source?.token - }) + url: url, + method: 'post', + data: body, + cancelToken: source?.token + }) .then((resp) => { if (resp.length > 0) { const data = resp[0] @@ -664,7 +649,15 @@ method: 'post', data }) + }, + //鏍规嵁閿�鍞柟寮忔煡璇㈠晢鍝佷俊鎭� + getProductBySaleMethod(data) { + return request({ + url: '/store/api/ApiGetProductBySaleMethod', + method: 'post', + data + }) } } -export default storeApi +export default storeApi \ No newline at end of file -- Gitblit v1.9.1