feat: 保存改人声并默认正式环境地址
This commit is contained in:
@@ -248,7 +248,7 @@ export default {
|
||||
this.applyOrder(order);
|
||||
this.headerSaved = true;
|
||||
this.syncCanScanFromStatus(order.audit_status);
|
||||
this.showSuccess('保存成功,可以扫码', '提交成功');
|
||||
this.showSuccess('保存成功,可以扫码', '保存成功', { voiceOnly: true });
|
||||
this.registerOrderScanBroadcast();
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -398,8 +398,8 @@ export default {
|
||||
if (!options.skipErrorAudio) util.playErrorAudio(message);
|
||||
uni.showModal({ title: '提示', content: message, showCancel: false });
|
||||
},
|
||||
showSuccess(message, voiceText) {
|
||||
util.playSuccessAudio(voiceText || message);
|
||||
showSuccess(message, voiceText, options) {
|
||||
util.playSuccessAudio(voiceText || message, options);
|
||||
uni.showToast({ title: message, icon: 'success' });
|
||||
},
|
||||
getBillTypeName() {
|
||||
|
||||
@@ -496,7 +496,7 @@ export default {
|
||||
this.headerSaved = true;
|
||||
this.clearWarehouseBin();
|
||||
this.syncCanScanFromStatus(order.audit_status);
|
||||
this.showSuccess('保存成功,请先扫描仓位', '提交成功');
|
||||
this.showSuccess('保存成功,请先扫描仓位', '保存成功', { voiceOnly: true });
|
||||
this.registerOrderScanBroadcast();
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -645,8 +645,8 @@ export default {
|
||||
util.playErrorAudio(message);
|
||||
uni.showModal({ title: '提示', content: message, showCancel: false });
|
||||
},
|
||||
showSuccess(message, voiceText) {
|
||||
util.playSuccessAudio(voiceText || message);
|
||||
showSuccess(message, voiceText, options) {
|
||||
util.playSuccessAudio(voiceText || message, options);
|
||||
uni.showToast({ title: message, icon: 'success' });
|
||||
},
|
||||
},
|
||||
|
||||
@@ -367,7 +367,7 @@ export default {
|
||||
this.applyOrder(order);
|
||||
this.headerSaved = true;
|
||||
this.syncCanScanFromStatus(order.audit_status);
|
||||
this.showSuccess('保存成功,请开始扫码', '提交成功');
|
||||
this.showSuccess('保存成功,请开始扫码', '保存成功', { voiceOnly: true });
|
||||
this.registerOrderScanBroadcast();
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -488,8 +488,8 @@ export default {
|
||||
util.playErrorAudio(message);
|
||||
uni.showModal({ title: '提示', content: message, showCancel: false });
|
||||
},
|
||||
showSuccess(message, voiceText) {
|
||||
util.playSuccessAudio(voiceText || message);
|
||||
showSuccess(message, voiceText, options) {
|
||||
util.playSuccessAudio(voiceText || message, options);
|
||||
uni.showToast({ title: message, icon: 'success' });
|
||||
},
|
||||
},
|
||||
|
||||
@@ -419,7 +419,7 @@ export default {
|
||||
this.headerSaved = true;
|
||||
this.clearWarehouseBin();
|
||||
this.syncCanScanFromStatus(order.audit_status);
|
||||
this.showSuccess('保存成功,请先扫描仓位', '提交成功');
|
||||
this.showSuccess('保存成功,请先扫描仓位', '保存成功', { voiceOnly: true });
|
||||
this.registerOrderScanBroadcast();
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -545,8 +545,8 @@ export default {
|
||||
util.playErrorAudio(message);
|
||||
uni.showModal({ title: '提示', content: message, showCancel: false });
|
||||
},
|
||||
showSuccess(message, voiceText) {
|
||||
util.playSuccessAudio(voiceText || message);
|
||||
showSuccess(message, voiceText, options) {
|
||||
util.playSuccessAudio(voiceText || message, options);
|
||||
uni.showToast({ title: message, icon: 'success' });
|
||||
},
|
||||
},
|
||||
|
||||
@@ -501,7 +501,7 @@ export default {
|
||||
this.headerSaved = true;
|
||||
this.clearWarehouseBin();
|
||||
this.syncCanScanFromStatus(order.audit_status);
|
||||
this.showSuccess('保存成功,请先扫描仓位', '提交成功');
|
||||
this.showSuccess('保存成功,请先扫描仓位', '保存成功', { voiceOnly: true });
|
||||
this.registerOrderScanBroadcast();
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -650,8 +650,8 @@ export default {
|
||||
util.playErrorAudio(message);
|
||||
uni.showModal({ title: '提示', content: message, showCancel: false });
|
||||
},
|
||||
showSuccess(message, voiceText) {
|
||||
util.playSuccessAudio(voiceText || message);
|
||||
showSuccess(message, voiceText, options) {
|
||||
util.playSuccessAudio(voiceText || message, options);
|
||||
uni.showToast({ title: message, icon: 'success' });
|
||||
},
|
||||
},
|
||||
|
||||
@@ -104,8 +104,8 @@
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </div>-->
|
||||
<u-select class="login-env-picker" v-model="showApiUrlPicker" :list="apiUrlList" title="选择服务器"
|
||||
@confirm="onApiUrlConfirm" @cancel="showApiUrlPicker = false"></u-select>
|
||||
<u-select class="login-env-picker" v-model="showApiUrlPicker" :list="apiUrlList" :default-value="apiUrlDefaultIndex"
|
||||
title="选择服务器" @confirm="onApiUrlConfirm" @cancel="showApiUrlPicker = false"></u-select>
|
||||
<!-- 版本信息显示 -->
|
||||
<view class="version-info">
|
||||
<text class="version-text">版本: {{ appVersion }}</text>
|
||||
@@ -136,10 +136,8 @@ export default {
|
||||
password: ""
|
||||
},
|
||||
showApiUrlPicker: false,
|
||||
// 暂时在打包后也展示服务器选项;生产包默认正式环境
|
||||
selectedApiUrl: config.isDevelopment
|
||||
? config.devApiUrlOptions[0].value
|
||||
: ((config.devApiUrlOptions.find(item => item.label === '正式环境') || {}).value || config.productionApiUrl),
|
||||
// 登录默认正式环境,本地已选过的地址仍会在 onShow 里恢复
|
||||
selectedApiUrl: (config.devApiUrlOptions.find(item => item.label === '正式环境') || {}).value || config.productionApiUrl,
|
||||
customApiUrl: 'http://192.168.1.66:50002/hcscm/pda/v1',
|
||||
apiUrlList: config.devApiUrlOptions,
|
||||
phoneNo: '',
|
||||
@@ -169,6 +167,12 @@ export default {
|
||||
},
|
||||
envName() {
|
||||
return process.env.VUE_APP_ENV_NAME || '';
|
||||
},
|
||||
apiUrlDefaultIndex() {
|
||||
const list = this.apiUrlList || [];
|
||||
let index = list.findIndex(item => item.value === this.selectedApiUrl);
|
||||
if (index < 0) index = list.findIndex(item => item.label === '正式环境');
|
||||
return [index >= 0 ? index : 0];
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user