新增分享按钮,自动复制分享链接(傻逼Safari),狮子可以查看下载人(同步更新)
This commit is contained in:
+5
-3
@@ -154,7 +154,7 @@ const actions = {
|
||||
axios.post(BaseUrl + "validate?AuthCode=" + AuthCode).then((res)=>{
|
||||
if(res.data.result === 'success'){
|
||||
state.userId = parseInt(res.data.data)
|
||||
context.commit("_authed", AuthCode)
|
||||
context.commit("_authed", {AuthCode, userId: parseInt(res.data.data)})
|
||||
//初始化
|
||||
context.dispatch("loadMaskDomain").then()
|
||||
context.dispatch("loadWeekUsedAmount").then()
|
||||
@@ -432,14 +432,16 @@ const mutations = {
|
||||
_changePage(state, targetPage){
|
||||
state.page = targetPage
|
||||
},
|
||||
_authed(state, AuthCode){
|
||||
state.AuthCode = AuthCode
|
||||
_authed(state, data){
|
||||
state.AuthCode = data.AuthCode
|
||||
state.userId = data.userId
|
||||
state.isAuth = true
|
||||
ElMessage("验证成功,加载中")
|
||||
},
|
||||
_unAuthed(state){
|
||||
state.isAuth = false
|
||||
state.AuthCode = ""
|
||||
state.userId = -1
|
||||
ElMessage("授权码错误")
|
||||
localStorage.removeItem("auth")
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user