1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
| <template>
| <view>
| <view>
|
| </view>
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
|
| }
| },
| 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);
| })
| },
| methods: {
| getLocDetl() {
| let _this = this
| uni.request({
| url: `${_this.baseUrl}/agvMobile/query/locDetl/v1`,
| header: { 'token': uni.getStorageSync('token') },
| data: {
| },
| method: 'POST',
| success(res) {
| res = res.data
| console.log(res);
| if (res.code === 200) {
|
| } else if (res.code == 403) {
| uni.showToast({ title: res.msg, icon: "error", position: 'top' })
| setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
| } else {
| uni.showToast({ title: res.msg, icon: "error", position: 'top' })
| }
| }
| })
| }
| }
| }
| </script>
|
| <style>
|
| </style>
|
|