|
|
@@ -5042,7 +5042,7 @@ if (uni.restoreGlobal) {
|
|
|
}
|
|
|
]);
|
|
|
const handleNavigation = (path) => {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: path,
|
|
|
fail: () => {
|
|
|
uni.showToast({
|
|
|
@@ -6107,7 +6107,7 @@ if (uni.restoreGlobal) {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: item.path
|
|
|
});
|
|
|
};
|
|
|
@@ -9411,7 +9411,7 @@ This will fail in production.`);
|
|
|
}
|
|
|
]);
|
|
|
const navigateToDetail = (path) => {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: path
|
|
|
});
|
|
|
};
|
|
|
@@ -10888,7 +10888,7 @@ This will fail in production.`);
|
|
|
);
|
|
|
}
|
|
|
const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__scopeId", "data-v-c8491d64"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
|
|
|
- const baseUrl = "https://bk.shuhi.com";
|
|
|
+ const baseUrl = "https://bpi.shuhi.com";
|
|
|
function initRequest() {
|
|
|
formatAppLog("log", "at config/request.js:6", "初始化了 http 请求代码");
|
|
|
uni.$u.http.setConfig((config2) => {
|
|
|
@@ -12994,7 +12994,7 @@ This will fail in production.`);
|
|
|
setup(__props, { expose: __expose }) {
|
|
|
__expose();
|
|
|
function goScan() {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: "/pages/index/express/scan"
|
|
|
});
|
|
|
}
|
|
|
@@ -14293,7 +14293,7 @@ This will fail in production.`);
|
|
|
const props2 = __props;
|
|
|
const emit2 = __emit;
|
|
|
const handleCheckLogistics = () => {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/express/logistics-detail?orderId=${props2.order.orderId}&status=${props2.order.checkStatus}&id=${props2.order.id}`
|
|
|
});
|
|
|
};
|
|
|
@@ -15683,7 +15683,7 @@ This will fail in production.`);
|
|
|
return;
|
|
|
}
|
|
|
uni.setStorageSync("isbnList", isbnList.value);
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: "/pages/index/audit/isbn-order"
|
|
|
});
|
|
|
};
|
|
|
@@ -15915,12 +15915,12 @@ This will fail in production.`);
|
|
|
});
|
|
|
};
|
|
|
const handleAudit = () => {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/detail/index?id=${props2.item.orderId}`
|
|
|
});
|
|
|
};
|
|
|
const handleView = () => {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/detail/index?id=${props2.item.orderId}&type=2`
|
|
|
});
|
|
|
};
|
|
|
@@ -16182,7 +16182,7 @@ This will fail in production.`);
|
|
|
}).then((res2) => {
|
|
|
if (res2.code == 200) {
|
|
|
uni.setStorageSync("orderDetail", res2.data);
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/detail/index?id=${res2.data.orderId}`
|
|
|
});
|
|
|
} else {
|
|
|
@@ -17760,7 +17760,7 @@ This will fail in production.`);
|
|
|
__expose();
|
|
|
const props2 = __props;
|
|
|
const handleUserOrders = () => {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/detail/user-orders?userId=${props2.detail.userId}`
|
|
|
});
|
|
|
};
|
|
|
@@ -18683,7 +18683,7 @@ This will fail in production.`);
|
|
|
uni.$u.ttsModule.speak("订单已审核完成");
|
|
|
return;
|
|
|
}
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/detail/book-audit?isbn=${book.isbn}&orderId=${props2.detail.orderId}`
|
|
|
});
|
|
|
uni.setStorageSync("auditBook", book);
|
|
|
@@ -19436,7 +19436,7 @@ This will fail in production.`);
|
|
|
let text = `请注意${isbnStr}需要取出`;
|
|
|
uni.$u.ttsModule.speak(text);
|
|
|
}
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/detail/book-audit?isbn=${isbn}&orderId=${orderDetail.value.orderId}`
|
|
|
});
|
|
|
uni.setStorageSync("auditBook", book);
|
|
|
@@ -19952,7 +19952,7 @@ This will fail in production.`);
|
|
|
}
|
|
|
scannedBooks.value.push(isbn);
|
|
|
uni.setStorageSync("scannedBooks", scannedBooks.value);
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/detail/batch-audit?orderId=${orderId.value}`
|
|
|
});
|
|
|
}
|
|
|
@@ -26230,84 +26230,6 @@ This will fail in production.`);
|
|
|
]);
|
|
|
}
|
|
|
const BadItem = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-93494456"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/components/BadItem.vue"]]);
|
|
|
- class VolumeTTS {
|
|
|
- constructor(opts) {
|
|
|
- __publicField(this, "ttsParams", {
|
|
|
- lang: "zh-CN",
|
|
|
- speed: 1,
|
|
|
- // 将 0-10 转换为 0-1
|
|
|
- pitch: 1,
|
|
|
- // 将 0-10 转换为 0-1
|
|
|
- volume: 1
|
|
|
- });
|
|
|
- __publicField(this, "TTSModule");
|
|
|
- __publicField(this, "platform", uni.getSystemInfoSync().platform);
|
|
|
- let audioConfig = uni.getStorageSync("audioConfig");
|
|
|
- if (opts) {
|
|
|
- this.ttsParams = opts;
|
|
|
- } else if (audioConfig) {
|
|
|
- this.ttsParams = {
|
|
|
- lang: "zh-CN",
|
|
|
- speed: audioConfig.audioSpeed / 10,
|
|
|
- pitch: audioConfig.audioVolume,
|
|
|
- volume: 1
|
|
|
- };
|
|
|
- }
|
|
|
- this.init();
|
|
|
- }
|
|
|
- init() {
|
|
|
- this.TTSModule = requireNativePlugin("nrb-tts-plugin");
|
|
|
- this.TTSModule && this.TTSModule.init(
|
|
|
- {
|
|
|
- lang: "zh",
|
|
|
- country: "CN"
|
|
|
- },
|
|
|
- (res2) => {
|
|
|
- if (res2.success == 0) {
|
|
|
- formatAppLog("log", "at utils/VolumeTTS.js:39", "TTS初始化成功");
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- //加一个text的预处理,将text中的数字替换成 零一二三四五六七八九十
|
|
|
- preprocessText(text) {
|
|
|
- const digitMap = {
|
|
|
- 0: "零",
|
|
|
- 1: "一",
|
|
|
- 2: "二",
|
|
|
- 3: "三",
|
|
|
- 4: "四",
|
|
|
- 5: "五",
|
|
|
- 6: "六",
|
|
|
- 7: "七",
|
|
|
- 8: "八",
|
|
|
- 9: "九"
|
|
|
- };
|
|
|
- return text.replace(/\d+/g, (match) => {
|
|
|
- return match.split("").map((digit) => digitMap[digit] || digit).join("");
|
|
|
- });
|
|
|
- }
|
|
|
- speak(text) {
|
|
|
- text = this.preprocessText(text);
|
|
|
- let opts = this.platform == "ios" ? {
|
|
|
- rate: this.ttsParams.speed,
|
|
|
- lang: "zh-CN",
|
|
|
- volume: 1
|
|
|
- } : {
|
|
|
- pitch: this.ttsParams.pitch,
|
|
|
- speechRate: this.ttsParams.speed,
|
|
|
- queueMode: 1
|
|
|
- };
|
|
|
- this.TTSModule.speak(text, opts, (e) => {
|
|
|
- formatAppLog("log", "at utils/VolumeTTS.js:98", e, "读取成功");
|
|
|
- });
|
|
|
- }
|
|
|
- stop() {
|
|
|
- if (this.TTSModule) {
|
|
|
- this.TTSModule.stop();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
const _sfc_main$I = {
|
|
|
__name: "RemarkDialog",
|
|
|
props: {
|
|
|
@@ -26572,7 +26494,7 @@ This will fail in production.`);
|
|
|
uni.$u.ttsModule.speak("请先选择仓库");
|
|
|
return;
|
|
|
}
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: "/pages/index/wms/location-select?godownId=" + formData.godownId + "&positionCode=" + formData.positionCode
|
|
|
});
|
|
|
}
|
|
|
@@ -26615,7 +26537,7 @@ This will fail in production.`);
|
|
|
currentRemark.value = "";
|
|
|
};
|
|
|
const selectWarehouse = () => {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: "/pages/index/wms/warehouse-select?godownId=" + formData.godownId
|
|
|
});
|
|
|
};
|
|
|
@@ -26623,9 +26545,7 @@ This will fail in production.`);
|
|
|
return onShow;
|
|
|
}, get onUnload() {
|
|
|
return onUnload;
|
|
|
- }, BadItem, get VolumeTTS() {
|
|
|
- return VolumeTTS;
|
|
|
- }, RemarkDialog };
|
|
|
+ }, BadItem, RemarkDialog };
|
|
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
|
return __returned__;
|
|
|
}
|
|
|
@@ -26819,7 +26739,7 @@ This will fail in production.`);
|
|
|
uni.$u.playClickSound();
|
|
|
}
|
|
|
const onSearch = () => {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/wms/bad-out-order?searchText=${searchText.value}&searchType=${searchType.value}`
|
|
|
});
|
|
|
};
|
|
|
@@ -27406,7 +27326,7 @@ This will fail in production.`);
|
|
|
try {
|
|
|
const response = await uni.$u.http.post(`/app/appstock/lockStockTask?taskCode=${task.taskCode}`);
|
|
|
if (response.code === 200) {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/wms/task-detail?taskCode=${task.taskCode}`
|
|
|
});
|
|
|
} else {
|
|
|
@@ -27542,7 +27462,7 @@ This will fail in production.`);
|
|
|
uni.$u.toast("请输入快递单号/订单编号");
|
|
|
return;
|
|
|
}
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/wms/order-query-list?id=${query.search}`
|
|
|
});
|
|
|
};
|
|
|
@@ -28263,7 +28183,7 @@ This will fail in production.`);
|
|
|
const positionCode = vue.ref("");
|
|
|
const onSearch = () => {
|
|
|
if (positionCode.value) {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: "/pages/index/wms/location-order-list?positionCode=" + positionCode.value
|
|
|
});
|
|
|
} else {
|
|
|
@@ -28360,7 +28280,7 @@ This will fail in production.`);
|
|
|
emit2("select", props2.item);
|
|
|
};
|
|
|
const handleQuickJump = () => {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: `/pages/index/wms/order-query-list?id=${props2.item.orderId}`
|
|
|
});
|
|
|
};
|
|
|
@@ -28975,7 +28895,7 @@ This will fail in production.`);
|
|
|
uni.$u.toast("请选择库位");
|
|
|
return;
|
|
|
}
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: "/pages/index/wms/speedy-check-add?location=" + location2.value
|
|
|
});
|
|
|
}
|
|
|
@@ -30579,7 +30499,7 @@ This will fail in production.`);
|
|
|
const ttsModule2 = vue.ref(null);
|
|
|
const taskCode = vue.ref("");
|
|
|
onUnload(() => {
|
|
|
- ttsModule2.value.stop();
|
|
|
+ uni.$u.ttsModule.stop();
|
|
|
uni.$u.cleanupOnPageUnload();
|
|
|
});
|
|
|
function playGlobalSound() {
|
|
|
@@ -30591,7 +30511,7 @@ This will fail in production.`);
|
|
|
if (currentTask.value < totalTasks.value) {
|
|
|
currentTask.value++;
|
|
|
if (currentTask.value == totalTasks.value) {
|
|
|
- ttsModule2.value.speak("任务完成");
|
|
|
+ uni.$u.ttsModule.speak("任务完成");
|
|
|
} else {
|
|
|
curTaskInfo.value = orderList.value[currentTask.value];
|
|
|
badList.value = curTaskInfo.value.detailVoList || [];
|
|
|
@@ -30622,7 +30542,7 @@ This will fail in production.`);
|
|
|
orderList.value[currentTask.value] = curTaskInfo.value;
|
|
|
handleNextTask();
|
|
|
isFirstScan.value = false;
|
|
|
- ttsModule2.value.speak("下架成功");
|
|
|
+ uni.$u.ttsModule.speak("下架成功");
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res2.msg,
|
|
|
@@ -30654,7 +30574,7 @@ This will fail in production.`);
|
|
|
playGlobalSound();
|
|
|
if (res2.confirm) {
|
|
|
uni.navigateBack();
|
|
|
- ttsModule2.value.speak("任务已提交");
|
|
|
+ uni.$u.ttsModule.speak("任务已提交");
|
|
|
unlockTask();
|
|
|
}
|
|
|
}
|
|
|
@@ -30668,7 +30588,7 @@ This will fail in production.`);
|
|
|
playGlobalSound();
|
|
|
if (res2.confirm) {
|
|
|
uni.navigateBack();
|
|
|
- ttsModule2.value.speak("任务已放弃");
|
|
|
+ uni.$u.ttsModule.speak("任务已放弃");
|
|
|
unlockTask();
|
|
|
}
|
|
|
}
|
|
|
@@ -30676,7 +30596,7 @@ This will fail in production.`);
|
|
|
}
|
|
|
let isFirstScan = vue.ref(false);
|
|
|
const checkScanText = (scanText) => {
|
|
|
- formatAppLog("log", "at pages/index/wms/task-detail.vue:228", scanText, "scanText");
|
|
|
+ formatAppLog("log", "at pages/index/wms/task-detail.vue:227", scanText, "scanText");
|
|
|
let length = scanText ? scanText.length : 0;
|
|
|
let isPositionCode = scanText.indexOf("-") > -1 && length == 9;
|
|
|
let isWaybillCode = /^(?=.*[A-Z])(?=.*\d)[A-Z0-9]+$/.test(scanText);
|
|
|
@@ -30694,7 +30614,7 @@ This will fail in production.`);
|
|
|
}
|
|
|
}
|
|
|
if (!isFirstScan.value) {
|
|
|
- ttsModule2.value.speak("请先校验库位号");
|
|
|
+ uni.$u.ttsModule.speak("请先校验库位号");
|
|
|
return;
|
|
|
}
|
|
|
if (isWaybillCode || isOrderId) {
|
|
|
@@ -30728,7 +30648,6 @@ This will fail in production.`);
|
|
|
onLoad((opts) => {
|
|
|
taskCode.value = opts.taskCode;
|
|
|
onSearch();
|
|
|
- ttsModule2.value = new VolumeTTS();
|
|
|
uni.$u.useGlobalEvent((e) => {
|
|
|
if (e.barcode) {
|
|
|
searchText.value = e.barcode;
|
|
|
@@ -30743,9 +30662,7 @@ This will fail in production.`);
|
|
|
return isFirstScan;
|
|
|
}, set isFirstScan(v) {
|
|
|
isFirstScan = v;
|
|
|
- }, checkScanText, openScan, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, get VolumeTTS() {
|
|
|
- return VolumeTTS;
|
|
|
- }, get onLoad() {
|
|
|
+ }, checkScanText, openScan, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, get onLoad() {
|
|
|
return onLoad;
|
|
|
}, get onUnload() {
|
|
|
return onUnload;
|
|
|
@@ -31885,6 +31802,94 @@ This will fail in production.`);
|
|
|
);
|
|
|
}
|
|
|
const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-7b84e269"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-slider/u-slider.vue"]]);
|
|
|
+ class VolumeTTS {
|
|
|
+ constructor(opts) {
|
|
|
+ __publicField(this, "ttsParams", {
|
|
|
+ lang: "zh-CN",
|
|
|
+ speed: 1,
|
|
|
+ // 将 0-10 转换为 0-1
|
|
|
+ pitch: 1,
|
|
|
+ // 将 0-10 转换为 0-1
|
|
|
+ volume: 1
|
|
|
+ });
|
|
|
+ __publicField(this, "TTSModule");
|
|
|
+ __publicField(this, "platform", uni.getSystemInfoSync().platform);
|
|
|
+ let audioConfig = uni.getStorageSync("audioConfig");
|
|
|
+ if (opts) {
|
|
|
+ this.ttsParams = opts;
|
|
|
+ } else if (audioConfig) {
|
|
|
+ this.ttsParams = {
|
|
|
+ lang: "zh-CN",
|
|
|
+ speed: audioConfig.audioSpeed / 10,
|
|
|
+ pitch: audioConfig.audioVolume,
|
|
|
+ volume: 1
|
|
|
+ };
|
|
|
+ }
|
|
|
+ this.init();
|
|
|
+ }
|
|
|
+ init() {
|
|
|
+ this.TTSModule = requireNativePlugin("nrb-tts-plugin");
|
|
|
+ this.TTSModule && this.TTSModule.init(
|
|
|
+ {
|
|
|
+ lang: "zh",
|
|
|
+ country: "CN"
|
|
|
+ },
|
|
|
+ (res2) => {
|
|
|
+ if (res2.success == 0) {
|
|
|
+ formatAppLog("log", "at utils/VolumeTTS.js:39", "TTS初始化成功");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ //加一个text的预处理,将text中的数字替换成 零一二三四五六七八九十
|
|
|
+ preprocessText(text) {
|
|
|
+ const digitMap = {
|
|
|
+ 0: "零",
|
|
|
+ 1: "一",
|
|
|
+ 2: "二",
|
|
|
+ 3: "三",
|
|
|
+ 4: "四",
|
|
|
+ 5: "五",
|
|
|
+ 6: "六",
|
|
|
+ 7: "七",
|
|
|
+ 8: "八",
|
|
|
+ 9: "九"
|
|
|
+ };
|
|
|
+ return text.replace(/\d+/g, (match) => {
|
|
|
+ return match.split("").map((digit) => digitMap[digit] || digit).join("");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ speak(text) {
|
|
|
+ text = this.preprocessText(text);
|
|
|
+ let opts = this.platform == "ios" ? {
|
|
|
+ rate: this.ttsParams.speed,
|
|
|
+ lang: "zh-CN",
|
|
|
+ volume: 1
|
|
|
+ } : {
|
|
|
+ pitch: this.ttsParams.pitch,
|
|
|
+ speechRate: this.ttsParams.speed,
|
|
|
+ queueMode: 1
|
|
|
+ };
|
|
|
+ this.TTSModule.speak(text, opts, (e) => {
|
|
|
+ formatAppLog("log", "at utils/VolumeTTS.js:98", e, "读取成功");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ stop() {
|
|
|
+ if (this.TTSModule) {
|
|
|
+ this.TTSModule.stop();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ destroy() {
|
|
|
+ this.stop();
|
|
|
+ this.TTSModule = null;
|
|
|
+ this.ttsParams = {
|
|
|
+ lang: "zh-CN",
|
|
|
+ speed: 1,
|
|
|
+ pitch: 1,
|
|
|
+ volume: 1
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
const _sfc_main$a = {
|
|
|
__name: "volume",
|
|
|
setup(__props, { expose: __expose }) {
|
|
|
@@ -31894,8 +31899,8 @@ This will fail in production.`);
|
|
|
audioStart: "书嗨,不辜负每一个爱书的人",
|
|
|
audioSpeed: 10,
|
|
|
audioVolume: 5,
|
|
|
- "audioPlay": false,
|
|
|
- "audioClick": false
|
|
|
+ audioPlay: false,
|
|
|
+ audioClick: false
|
|
|
});
|
|
|
function changeSpeed(value2) {
|
|
|
settings.value.audioSpeed = value2;
|
|
|
@@ -31959,7 +31964,7 @@ This will fail in production.`);
|
|
|
Object.assign(settings, savedSettings);
|
|
|
}
|
|
|
} catch (error2) {
|
|
|
- formatAppLog("error", "at pages/my/page/volume.vue:161", "加载设置失败:", error2);
|
|
|
+ formatAppLog("error", "at pages/my/page/volume.vue:205", "加载设置失败:", error2);
|
|
|
}
|
|
|
}
|
|
|
function playClickSound2() {
|
|
|
@@ -31972,8 +31977,13 @@ This will fail in production.`);
|
|
|
vue.onMounted(async () => {
|
|
|
loadSettings();
|
|
|
});
|
|
|
+ onUnload(() => {
|
|
|
+ tts.value && tts.value.destroy();
|
|
|
+ });
|
|
|
const __returned__ = { settings, changeSpeed, changeVolume, getVoiceBroadcast, saveVoiceBroadcast, tts, initTTS, stopPlayback, restartApp, loadSettings, playClickSound: playClickSound2, ref: vue.ref, reactive: vue.reactive, onMounted: vue.onMounted, get VolumeTTS() {
|
|
|
return VolumeTTS;
|
|
|
+ }, get onUnload() {
|
|
|
+ return onUnload;
|
|
|
} };
|
|
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
|
return __returned__;
|
|
|
@@ -32752,7 +32762,6 @@ This will fail in production.`);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- useInit();
|
|
|
});
|
|
|
onShow(() => {
|
|
|
});
|