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
57
58
59
60
61
62
63
64
65
66
67
68
| <template>
| <view>
|
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
| commonUrl:null,
| listData: [],
|
| };
| },
| onLoad() {
| const UIP = uni.getStorageSync('UIP');
| this.baseIP = UIP;
| const UPORT = uni.getStorageSync('UPORT');
| this.basePORT = UPORT
| const PROJ = uni.getStorageSync('UPROJ');
| this.baseUrl = PROJ
| this.getUrl()
| this.getList()
| },
| onPullDownRefresh() {
| this.getList()
| },
| onReachBottom() {
|
| },
| methods: {
| // 获取url
| getUrl() {
| this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
| },
| getList() {
| let that = this
| console.log(that.commonUrl);
| uni.request({
| url: that.commonUrl + '/waitPakin/list/auth',
| data:{
| curr:1,
| limit:16,
| },
| header: {
| 'token':uni.getStorageSync('token')
| },
| method:'GET',
| success: result =>{
| console.log(result);
| let res = result.data
| if (res.code === 200) {
| if (res.data) {
| that.listData = this.reload ? list : this.listData.concat(list);
|
| }
| }
| }
| })
| }
| }
|
| }
| </script>
|
| <style>
| </style>
|
|