| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | baseUrl: '', |
| | | token: '', |
| | | } |
| | | }, |
| | | onShow() { |
| | | let _this = this |
| | | this.baseUrl = uni.getStorageSync('baseUrl'); |
| | | this.token = uni.getStorageSync('token'); |
| | | // const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 |
| | | eventChannel.on('item', function(data) { |
| | | console.log(data); |
| | | _this.getLocDetl(data.item.locNo,data.item.barcode) |
| | | }) |
| | | }, |
| | | methods: { |
| | | |
| | | getLocDetl(locNo,barcode) { |
| | | let _this = this |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agvMobile/check/detl/v1`, |
| | | header: {'token': uni.getStorageSync('token')}, |
| | | data: { locNo: locNo,barcode: barcode }, |
| | | method: 'GET', |
| | | success(res) { |
| | | res = res.data |
| | | console.log(res); |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |