| | |
| | | this.baseIP = UIP; |
| | | const UPORT = uni.getStorageSync('UPORT'); |
| | | this.basePORT = UPORT |
| | | const PROJ = uni.getStorageSync('UPROJ'); |
| | | this.baseUrl = PROJ |
| | | this.getUrl() |
| | | }, |
| | | onLoad() { |
| | |
| | | methods: { |
| | | // 获取url |
| | | getUrl() { |
| | | this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + this.baseUrl |
| | | this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl |
| | | }, |
| | | radioChange(evt) { |
| | | for (let i = 0; i < this.origins.length; i++) { |
| | |
| | | }, |
| | | // 添加扫描日志 |
| | | addLog(matCode,userName) { |
| | | |
| | | let that = this; |
| | | uni.request({ |
| | | url: that.commonUrl + "/mobile/addLog/auth", |
| | |
| | | }, |
| | | // method:"POST", |
| | | success(result) { |
| | | var res = result.data |
| | | if(res.code === 200) { |
| | | // uni.showToast({title: "添加成功", icon: "none",position: 'center'}) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | |
| | |
| | | // return; |
| | | // uni.showLoading(); |
| | | uni.request({ |
| | | url: that.commonUrl + '/mat/auth', |
| | | url: that.commonUrl + '/barcode/check/auth', |
| | | data: { |
| | | matnr:matnr |
| | | barcode:that.matnrId |
| | | }, |
| | | header: { |
| | | 'token':uni.getStorageSync('token') |