Compare commits
No commits in common. "12187283cc5414828b3aaec2f70df15f221a9ef8" and "e1ac017a3c09c82cd612952df24ec0c44083bfe3" have entirely different histories.
12187283cc
...
e1ac017a3c
@ -24,14 +24,9 @@ const install = (Vue, vm) => {
|
|||||||
Vue.prototype.$u.http.interceptor.request = (req) => {
|
Vue.prototype.$u.http.interceptor.request = (req) => {
|
||||||
const reqUrl = req && req.url ? String(req.url) : '';
|
const reqUrl = req && req.url ? String(req.url) : '';
|
||||||
const isAbsolute = /^https?:\/\//i.test(reqUrl);
|
const isAbsolute = /^https?:\/\//i.test(reqUrl);
|
||||||
const fullUrl = isAbsolute ? reqUrl : (vm.$store.state.apiurl + reqUrl);
|
console.log('request', req);
|
||||||
// 用 JSON 字符串输出,避免 HBuilderX 控制台对象被截断、点击 URL 跳浏览器
|
console.log('baseUrl', vm.$store.state.apiurl);
|
||||||
console.log('request => ' + JSON.stringify({
|
console.log('完整URL', isAbsolute ? reqUrl : (vm.$store.state.apiurl + reqUrl));
|
||||||
url: fullUrl,
|
|
||||||
method: req.method,
|
|
||||||
data: req.data,
|
|
||||||
header: req.header
|
|
||||||
}, null, 2));
|
|
||||||
if (!req.header){
|
if (!req.header){
|
||||||
req.header = [];
|
req.header = [];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -239,8 +239,8 @@ export function buildScanUpdateParams({ id, scanCode, arrangeType, warehouseBinI
|
|||||||
if (warehouseBinId) {
|
if (warehouseBinId) {
|
||||||
params.warehouse_bin_id = Number(warehouseBinId);
|
params.warehouse_bin_id = Number(warehouseBinId);
|
||||||
}
|
}
|
||||||
// 长度大于25走二维码,否则走条码
|
// 长码走二维码,短码走条码
|
||||||
if (code.length > 25) {
|
if (code.length > 20) {
|
||||||
params.qr_code = code;
|
params.qr_code = code;
|
||||||
} else {
|
} else {
|
||||||
params.bar_code = code;
|
params.bar_code = code;
|
||||||
|
|||||||
@ -250,8 +250,8 @@ export function buildScanUpdateParams({ id, scanCode, arrangeType, warehouseBinI
|
|||||||
if (warehouseBinId) {
|
if (warehouseBinId) {
|
||||||
params.warehouse_bin_id = Number(warehouseBinId);
|
params.warehouse_bin_id = Number(warehouseBinId);
|
||||||
}
|
}
|
||||||
// 长度大于25走二维码,否则走条码
|
// 长码走二维码,短码走条码
|
||||||
if (code.length > 25) {
|
if (code.length > 20) {
|
||||||
params.qr_code = code;
|
params.qr_code = code;
|
||||||
} else {
|
} else {
|
||||||
params.bar_code = code;
|
params.bar_code = code;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user