Files
xiao_electron/src/renderer/src/页面目录/学习页面/子组件.vue
T
2026-08-07 21:40:55 +08:00

53 lines
1.7 KiB
Vue

<script setup lang="ts">
defineOptions({ name: "Zhong" });
let root_url = "https://open.weixin.qq.com/connect/qrconnect?";
let response_type = "response_type=code";
let appid = "appid=wx6c9d4541e0285d02";
let scope = "scope=snsapi_login";
const encoded = encodeURIComponent("https://six.sixgou.com/web/auth/get_code/");
let redirect_uri = "redirect_uri=" + encoded;
let url = `${root_url}&${appid}&${redirect_uri}&${response_type}&${scope}&state=STATE#wechat_redirect`;
async function 测试跨域(): Promise<void> {
// let data = await instance.post("https://six.sixgou.com/demo/xiaozizi/", {});
console.log(url);
// let data = await instance.get(url, {});
window.location.href = url;
}
</script>
<template>
<div class="子组件">
<div>
<button class="毛玻璃按钮" @click="测试跨域">测试跨域</button>
</div>
</div>
</template>
<style lang="scss" scoped>
.子组件 {
.毛玻璃按钮 {
padding: 10px 18px;
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 8px;
background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.1));
color: #e0e0e0;
font-weight: 500;
cursor: pointer;
transition: all 0.3s;
backdrop-filter: blur(5px);
&:hover {
background: rgba(255, 255, 255, 0.2);
color: #fff;
border-color: rgba(255, 255, 255, 0.4);
transform: scale(1.05);
}
&:active {
transform: scale(0.95);
}
}
}
</style>