|
@@ -67,7 +67,9 @@ export function share (opt) {
|
67
|
67
|
export function Login () {
|
68
|
68
|
console.log(store);
|
69
|
69
|
|
70
|
|
- return LoginUser('123',).then(e => {
|
|
70
|
+ const code = node.process.NODE_ENV === 'development' ? '123' : getCode()
|
|
71
|
+
|
|
72
|
+ return LoginUser(code).then(e => {
|
71
|
73
|
// PVsum
|
72
|
74
|
console.log(e);
|
73
|
75
|
let userInfo = {
|
|
@@ -98,12 +100,13 @@ function hideLoading () {
|
98
|
100
|
* 获取 code
|
99
|
101
|
* @returns
|
100
|
102
|
*/
|
101
|
|
-function getCode () {
|
|
103
|
+ export function getCode () {
|
102
|
104
|
const matched = /[?&]*code=([^&]+)/.exec(location.search)
|
103
|
105
|
if (matched) {
|
104
|
106
|
return decodeURIComponent(matched[1])
|
105
|
107
|
}
|
106
|
108
|
}
|
|
109
|
+
|
107
|
110
|
/**
|
108
|
111
|
* 跳转授权页面
|
109
|
112
|
*/
|