Commit 898831d8 by zhuzhequan

Merge branch 'dev' into 'master'

Dev

See merge request !215
parents 30633f46 c65a2629
...@@ -48,6 +48,7 @@ type AudioKey = ...@@ -48,6 +48,7 @@ type AudioKey =
| 'weight_repeat' | 'weight_repeat'
| 'weight_search_error' | 'weight_search_error'
| 'weight_search_success' | 'weight_search_success'
| 'weight_tiktok'
type AudioFiles = Record<AudioKey, string> type AudioFiles = Record<AudioKey, string>
// API 响应类型 // API 响应类型
...@@ -87,6 +88,10 @@ class Weigh extends Lock { ...@@ -87,6 +88,10 @@ class Weigh extends Lock {
'@/assets/audio/weight_search_success.mp3', '@/assets/audio/weight_search_success.mp3',
import.meta.url, import.meta.url,
).href, ).href,
weight_tiktok: new URL(
'@/assets/audio/weight_tiktok.mp3',
import.meta.url,
).href,
} }
this.audioElements = new Map() this.audioElements = new Map()
this.preloadAudios() this.preloadAudios()
...@@ -354,6 +359,12 @@ class Weigh extends Lock { ...@@ -354,6 +359,12 @@ class Weigh extends Lock {
this.weightInput = false this.weightInput = false
callback?.(this.list) callback?.(this.list)
this.playAudio('weight_search_success') this.playAudio('weight_search_success')
if (data[0].platform === 'TIKTOK') {
setTimeout(() => {
this.playAudio('weight_tiktok')
}, 500)
}
} }
playAudio(key: AudioKey, message?: string): void { playAudio(key: AudioKey, message?: string): void {
...@@ -365,6 +376,7 @@ class Weigh extends Lock { ...@@ -365,6 +376,7 @@ class Weigh extends Lock {
weight_search_error: `请录入${this.selectType === 'trackingNumber' ? '跟踪号' : '店铺单号' weight_search_error: `请录入${this.selectType === 'trackingNumber' ? '跟踪号' : '店铺单号'
}或重量`, }或重量`,
weight_search_success: '', weight_search_success: '',
weight_tiktok: '',
} }
const displayMessage = message || messageMap[key] const displayMessage = message || messageMap[key]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment