first commit
This commit is contained in:
1
UniAppMobile/pages/authorization/.pydio
Normal file
1
UniAppMobile/pages/authorization/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
c9b89ada-5572-47b3-9ed2-1ae864de57d5
|
||||
59
UniAppMobile/pages/authorization/authorization.vue
Normal file
59
UniAppMobile/pages/authorization/authorization.vue
Normal file
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<view class="authorization">
|
||||
<h2>授权登录</h2>
|
||||
<button type="primary" @click="AuthorizationLogin">授权Web登录</button>
|
||||
<p class="tips">{{tips}}</p>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tips: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
AuthorizationLogin() {
|
||||
console.log("授权Web登录");
|
||||
uni.request({
|
||||
url: `${this.$config.baseUrl}/AuthorizedWeb`,
|
||||
method: 'GET',
|
||||
data: {
|
||||
uid: uni.getStorageSync('userinfo').id
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 404) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
});
|
||||
this.tips = res.data.msg
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.authorization {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 20% 0;
|
||||
text-align: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
h2 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user