| | |
| | | "name" : "智云LMES", |
| | | "appid" : "__UNI__B002F49", |
| | | "description" : "", |
| | | "versionName" : "1.0.94", |
| | | "versionCode" : 194, |
| | | "versionName" : "1.0.96", |
| | | "versionCode" : 196, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | console.log('扫码返回', res.data); |
| | | this.hform.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | if (data.hBarTypeField == '仓库条码') { |
| | | this.hform.HWHName = data.hWhNameField |
| | |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | this.refreshHBarCodeFocus() |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | |
| | | // uni-app 播放音频封装 |
| | | playSound(e) { |
| | | console.log(e); |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | if (e == 1) { |
| | | innerAudioContext.src = '/static/success.wav'; |
| | |
| | | innerAudioContext.src = '/static/jingbao.wav'; |
| | | } |
| | | innerAudioContext.play(); // 播放音频 |
| | | |
| | | innerAudioContext.onPlay(() => { |
| | | console.log('开始播放'); |
| | | }); |
| | | innerAudioContext.onError((res) => { |
| | | console.log(res.errMsg); |
| | | console.log(res.errCode); |
| | | }); |
| | | innerAudioContext.onPause(function(){ |
| | | console.log('播放出现错误,销毁'); |
| | | innerAudioContext.destroy(); |
| | | }) |
| | | } |
| | | |
| | | replaceWithFunction(str, handler) { |