()
| 1 | import Request from '@/utils/luch-request/index.js' |
| 2 | const getTokenStorage = () => { |
| 3 | let token = '' |
| 4 | try{ |
| 5 | token = uni.getStorageSync('token') |
| 6 | }catch(e){ |
| 7 | //TODO handle the exception |
| 8 | } |
| 9 | return token |
| 10 | } |
| 11 | const http = new Request() |
| 12 | http.setConfig((config) => { /* 设置全局配置 */ |
| 13 | config.baseUrl = '/api/chiheyouhui' /*根域名不同 */ |