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
| <template>
| <view>
|
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
|
| };
| },
| onLoad(options) {
| uni.setStorageSync('token', options.token);
| uni.setStorageSync('user_id', options.user_id);
| // 获取登录前页面
| let url = '/' + uni.getStorageSync('currentPage');
| let pageOptions = uni.getStorageSync('currentPageOptions');
| if(Object.keys(pageOptions).length > 0){
| url += '?';
| for(let i in pageOptions){
| url += i + '=' + pageOptions[i] + '&';
| }
| url = url.substring(0, url.length - 1);
| }
|
| // 执行回调函数
| this.gotoPage(url, 'reLaunch');
| },
| }
| </script>
|
| <style>
|
| </style>
|
|