fix:API地址改为psi.api.buzhiyushu.cn,增加Authorization Bearer

This commit is contained in:
97694732@qq.com 2026-06-05 14:06:21 +08:00
parent c14d0ce85e
commit fd36be8d40

View File

@ -2031,7 +2031,8 @@ export default {
}
// API
const apiUrl = 'http://192.168.101.213:9092/api/product/pushToShop'
const apiUrl = 'https://psi.api.buzhiyushu.cn/api/product/pushToShop'
const token = uni.getStorageSync('token') || ''
console.log('【上传】推送API:', apiUrl, apiData)
// 使 uni.request form-urlencoded
@ -2039,7 +2040,10 @@ export default {
uni.request({
url: apiUrl,
method: 'POST',
header: { 'Content-Type': 'application/x-www-form-urlencoded' },
header: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer ' + token
},
data: {
userid: apiData.userid,
warehouse_id: apiData.warehouse_id,