|
@@ -16,6 +16,7 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import Api from '../static/http/api'
|
|
|
+import storage from 'good-storage'
|
|
|
import { postRequest } from '../static/http'
|
|
|
import { getOauthUrl, createWindow, callBackUrl } from '../static/utils'
|
|
|
import { getStorage, removeStorage, setStorage, storageKey } from '../static/utils/storage'
|
|
@@ -105,7 +106,7 @@ const twitterAuth = () => {
|
|
|
}
|
|
|
|
|
|
const twitterLogin = (data: { authToken: string, consumerKey: string }) => {
|
|
|
- let verifier = getStorage(storageKey.verifier)
|
|
|
+ let verifier = storage.get(storageKey.verifier)
|
|
|
if (verifier) {
|
|
|
postRequest(Api.twitterLogin, {
|
|
|
params: {
|
|
@@ -117,7 +118,7 @@ const twitterLogin = (data: { authToken: string, consumerKey: string }) => {
|
|
|
let { code, data, msg } = res;
|
|
|
if ( code === 0 ) {
|
|
|
setStorage(storageKey.userInfo, data);
|
|
|
- removeStorage(storageKey.verifier);
|
|
|
+ storage.remove(storageKey.verifier);
|
|
|
location.href = `/nft/list`
|
|
|
} else {
|
|
|
ElMessage({
|