From aff8d054df4a638f399dc8f15d98c19b9c9aa785 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期二, 29 四月 2025 10:11:25 +0800 Subject: [PATCH] 扫码视频播放 --- pages/index/bookDetail.js | 62 +++++++++++++++++++----------- 1 files changed, 39 insertions(+), 23 deletions(-) diff --git a/pages/index/bookDetail.js b/pages/index/bookDetail.js index 7072e18..99e82a8 100644 --- a/pages/index/bookDetail.js +++ b/pages/index/bookDetail.js @@ -1,4 +1,6 @@ // pages/index/bookDetail.js +import request from '../../assets/request/index' + const app = getApp() import { loginInfo @@ -47,31 +49,45 @@ }, getBookList() { - const obj = { - storeInfo: app.config.jslx, - path: "*", - queryType: '*', - coverSize: { - width: 150 - }, - paging: { - start: 0, - size: 6 - }, - filterList: [{ - value: 'Normal', - field: 'state' - }], - fields: { - author: [], - 'RefCodes': [this.data.refcode] - } + let url = '/store/api/ApiQueryProductByAppUser' + let fields = { + Name: [], + 'RefCodes': [this.data.refcode] } - app.MG.store.getProductList(obj).then((res) => { - console.log(res.datas, '鍥句功淇℃伅') - let book = res.datas[0] + let queryBook = { + AccessControl: { + Path: '*', + StoreRefCode: `defaultGoodsStore${app.config.appId}`, + Type: '*', + LinkType: '' + }, + PageQuery: { + Start: 0, + Size: 3, + }, + SortQuery: [{ + LinkOrder: 'Desc' + }], + Name: [], + RefCode: [], + ...fields + } + let body = { + query: JSON.stringify({ + Query: [{ + queryBook: queryBook + }] + }) + } + request({ + url: url, + method: 'post', + data: body + }).then((res) => { + console.log(res[0], 'resp'); + let book = res[0].datas[0] wx.redirectTo({ - url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}&storeInfo=${app.config.jslx}`, + url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.datas.Name}`, }); }) }, -- Gitblit v1.9.1