| | |
| | | var APIURL = "http://192.168.1.145:83/api/"; |
| | | //var APIURL = "http://localhost:5204/api/"; |
| | | /*var APIURL = "http://192.168.1.145:83/api/";*/ |
| | | var APIURL = "http://localhost:5204/api/"; |
| | | var APIURL_PC = "http://192.168.1.145:81/"; |
| | | var APIURL_IMAGE = APIURL_PC+"upload/"; |
| | | var ISNEEDLOGIN = true; |
| | | String.prototype.trim = function () { |
| | | return this.replace(/(^\s*)|(\s*$)/g, ""); |
| | |
| | | return; |
| | | window.history.back(); |
| | | } |
| | | |
| | | // 新增音频播放方法 |
| | | Vue.prototype.$playSound = function(type = 'success') { |
| | | try { |
| | | const audioMap = { |
| | | success: '/audio/OK.wav', |
| | | error: '/audio/NG.wav' |
| | | }; |
| | | const audio = new Audio(audioMap[type]); |
| | | audio.play().catch(error => { |
| | | console.error('音频播放失败:', error); |
| | | this.$toast.fail('提示音加载失败'); |
| | | }); |
| | | } catch (e) { |
| | | console.error('音频初始化错误:', e); |
| | | } |
| | | }; |