@jetthai/cuora 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/package.json +2 -1
- package/plugin/user.js +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.5](https://github.com/jetthai/cuora-module/compare/v1.0.4...v1.0.5) (2021-08-09)
|
|
6
|
+
|
|
7
|
+
### [1.0.4](https://github.com/jetthai/cuora-module/compare/v1.0.3...v1.0.4) (2021-08-09)
|
|
8
|
+
|
|
5
9
|
### [1.0.3](https://github.com/jetthai/cuora-module/compare/v1.0.2...v1.0.3) (2021-08-09)
|
|
6
10
|
|
|
7
11
|
### [1.0.2](https://github.com/jetthai/cuora-module/compare/v1.0.1...v1.0.2) (2021-08-05)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetthai/cuora",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"lodash": "^4.17.21",
|
|
23
|
+
"universal-cookie": "^4.0.4",
|
|
23
24
|
"url-join": "^4.0.1"
|
|
24
25
|
}
|
|
25
26
|
}
|
package/plugin/user.js
CHANGED
|
@@ -169,8 +169,13 @@ function createStore({ $request, $loadingRequest, $fullURL }) {
|
|
|
169
169
|
async acknowledge({}, requestId, code) {
|
|
170
170
|
return $loadingRequest(api.acknowledge({ requestId, code }))
|
|
171
171
|
},
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
socialLogin({}, method) {
|
|
173
|
+
const supports = ['line', 'facebook', 'qq', 'wechat', 'weibo', 'zalo', 'google', 'telegram']
|
|
174
|
+
if (!supports.includes(method)) {
|
|
175
|
+
throw { code: 'ERR_A106', method }
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const url = (
|
|
174
179
|
$fullURL +
|
|
175
180
|
'login?' +
|
|
176
181
|
qs.stringify({
|
|
@@ -180,6 +185,7 @@ function createStore({ $request, $loadingRequest, $fullURL }) {
|
|
|
180
185
|
subchannel: 'pwa',
|
|
181
186
|
})
|
|
182
187
|
)
|
|
188
|
+
window.location.href = url
|
|
183
189
|
},
|
|
184
190
|
},
|
|
185
191
|
}
|