feat:syncBook增加sign签名参数(与仓库列表一致的算法)

This commit is contained in:
97694732@qq.com 2026-06-06 11:21:53 +08:00
parent 50f70c25a1
commit 4c66c8b85f
2 changed files with 11 additions and 3 deletions

View File

@ -843,7 +843,7 @@
</template>
<script>
import { getWarehouseList, getLocationList, searchBookByIsbn } from '@/utils/api.js'
import { getWarehouseList, getLocationList, searchBookByIsbn, calculateSign } from '@/utils/api.js'
import { login as kongfzLogin, searchProducts, searchFacet } from '@/utils/kongfz.js'
import { uploadImages } from '@/utils/minio.js'
@ -2132,7 +2132,8 @@ export default {
try {
const token = uni.getStorageSync('token') || ''
//
//
var timestamp = String(Math.floor(Date.now() / 1000))
const params = {
app_key: 'psi',
client_id: 'psi',
@ -2150,9 +2151,15 @@ export default {
page_count: '0',
word_count: this.noIsbnWordCount || '',
book_format: '',
live_image: imageUrls.join(',')
live_image: imageUrls.join(','),
timestamp: timestamp,
sign_method: 'md5'
}
//
var sign = calculateSign(params)
params.sign = sign
const apiUrl = 'https://psi.api.buzhiyushu.cn/api/syncBook'
console.log('【syncBook】请求地址:', apiUrl)
console.log('【syncBook】请求参数:', params)

View File

@ -330,6 +330,7 @@ export function searchBookByIsbn(isbn) {
}
export default {
calculateSign,
getWarehouseList,
getLocationList,
psiLogin,