Initial commit: MSH System\n\n- msh_single_uniapp: Vue 2 + UniApp 前端(微信小程序/H5/App/支付宝小程序)\n- msh_crmeb_22: Spring Boot 2.2 后端(C端API/管理端/业务逻辑)\n- models-integration: AI服务集成(Coze/KieAI/腾讯ASR)\n- docs: 产品文档与设计稿
This commit is contained in:
78
msh_single_uniapp/pages/auth/index.vue
Normal file
78
msh_single_uniapp/pages/auth/index.vue
Normal file
@@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<view class="lottie-bg">
|
||||
<view id="lottie">
|
||||
<image :src="urlDomain+'crmebimage/perset/staticImg/live-logo.gif'" rel="preload" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import wechat from "@/libs/wechat";
|
||||
import {
|
||||
getUserInfo
|
||||
} from "@/api/user";
|
||||
export default {
|
||||
name: "Auth",
|
||||
data(){
|
||||
return{
|
||||
urlDomain: this.$Cache.get("imgHost"),
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad(option) {
|
||||
let that = this
|
||||
const {
|
||||
code,
|
||||
state
|
||||
} = option;
|
||||
wechat.auth(code, state)
|
||||
.then(() => {
|
||||
getUserInfo().then(res => {
|
||||
location.href = decodeURIComponent(
|
||||
decodeURIComponent(option.back_url)
|
||||
);
|
||||
}).catch(res => {
|
||||
console.log('getUserInfo错误='+res);
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('auth错误='+err);
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.lottie-bg {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 999;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#lottie {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
transform: translate3d(0, 0, 0);
|
||||
margin: auto;
|
||||
|
||||
image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user