feat:测试第三方授权
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, onMounted } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { authOtherLogin, authOtherBind } from "@/apis/auth.js";
|
import { authOtherLogin, authOtherBind } from "@/apis/auth.js";
|
||||||
|
|
||||||
@@ -23,12 +23,14 @@ watch(
|
|||||||
const authParam = result != null ? result[1].toUpperCase() : null;
|
const authParam = result != null ? result[1].toUpperCase() : null;
|
||||||
if (type.value === 0) {
|
if (type.value === 0) {
|
||||||
const res = await authOtherLogin({ code: val }, authParam);
|
const res = await authOtherLogin({ code: val }, authParam);
|
||||||
|
message.value = res;
|
||||||
console.log(res, "type.value === 0");
|
console.log(res, "type.value === 0");
|
||||||
} else if (type.value === 1) {
|
} else if (type.value === 1) {
|
||||||
const res = await authOtherBind({ code: val }, authParam);
|
const res = await authOtherBind({ code: val }, authParam);
|
||||||
|
message.value = res;
|
||||||
console.log(res, "type.value === 1");
|
console.log(res, "type.value === 1");
|
||||||
}
|
}
|
||||||
message.value = "授权成功";
|
// message.value = "授权成功";
|
||||||
// window.close();
|
// window.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user