|
@@ -3,14 +3,50 @@
|
|
|
import {onMounted, ref} from "vue";
|
|
|
|
|
|
let curUrl = ref("")
|
|
|
+let reUrl = ref("https://yixuefrp.cxhy.cn/test")
|
|
|
+let reUri = ref("")
|
|
|
+let fullUrl = ref("")
|
|
|
|
|
|
onMounted(function () {
|
|
|
curUrl.value = document.URL
|
|
|
})
|
|
|
+
|
|
|
+function calcURI() {
|
|
|
+ reUri.value = encodeURIComponent(reUrl.value)
|
|
|
+ fullUrl.value = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf01ec97b45a4bc49&redirect_uri=" + reUri.value + "&response_type=code&scope=snsapi_base&state=999#wechat_redirect"
|
|
|
+}
|
|
|
+
|
|
|
+function goto() {
|
|
|
+ window.location.href = fullUrl.value
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
{{ curUrl }}
|
|
|
+ <el-row style="width: 100%">
|
|
|
+ <el-col :span="4">回调URL</el-col>
|
|
|
+ <el-col :span="18">
|
|
|
+ <el-input v-model="reUrl"></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="width: 100%">
|
|
|
+ <el-col :span="4">URI</el-col>
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-text>{{ reUri }}</el-text>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-button @click="calcURI">计算</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="width: 100%">
|
|
|
+ <el-col :span="4">完整URL</el-col>
|
|
|
+ <el-col :span="18">
|
|
|
+ <el-text>{{ fullUrl }}</el-text>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="width: 100%">
|
|
|
+ <el-button @click="goto">访问</el-button>
|
|
|
+ </el-row>
|
|
|
</template>
|
|
|
|
|
|
<style scoped>
|