| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <template>
- <div class="appStore">
- <div class="topC">
- <img @click="backPage" src="../../../assets/images/appStoreCopy/backPage.svg" alt="" />
- <div>{{ userinfo.username }}</div>
- </div>
- <div class="infoCon">
- <div style="font-size: 14px;">账户</div>
- <!-- <div class="Blo">
- <div style="display: flex;align-items: center;gap: 10px;">
- <img src="../../../assets/images/appStoreCopy/tel.svg" alt="" />
- 账号
- </div>
- <span style="color: #969BA3;">{{ userinfo.accountNumber }}</span>
- </div> -->
- <div class="Blo">
- <div style="display: flex;align-items: center;gap: 10px;">
- <img src="../../../assets/images/appStoreCopy/sch.svg" alt="" />
- 学校
- </div>
- <span style="color: #969BA3;">{{ userinfo.schoolName }}</span>
- </div>
- <div @click="exitLogin" class="Blo">
- <div style="display: flex;align-items: center;gap: 10px;">
- <img src="../../../assets/images/appStoreCopy/logOut.svg" alt="" />
- 退出登录
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { mapGetters } from 'vuex'
- import { loginOut } from '@/api/user'
- export default {
- data() {
- return {}
- },
- computed: {
- ...mapGetters(['userinfo'])
- },
- methods: {
- backPage() {
- this.$router.push('/appStoreCopy')
- },
- // 退出登录
- exitLogin() {
- this.$dialog({
- message: '是否现在退出登录?你将回到登录界面',
- showCancelButton: true,
- beforeClose: (action, done) => {
- if (action === 'confirm') {
- loginOut()
- .then(res => {
- this.$toast({
- message: '退出成功',
- type: 'success'
- })
- this.$store.dispatch('user/logout')
- window.location.reload()
- done()
- })
- .catch(err => {
- console.error(err)
- done()
- })
- } else {
- // 拦截取消操作
- done()
- }
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .appStore {
- width: 100vw;
- height: 100vh;
- box-sizing: border-box;
- // padding: 5px;
- background-color: #f9f8f8;
- display: flex;
- flex-direction: column;
- overflow: auto;
- }
- .topC {
- display: flex;
- justify-content: center;
- width: 100%;
- align-items: center;
- height: 50px;
- padding: 0px 12px;
- box-sizing: border-box;
- position: relative;
- font-family: PingFang HK;
- font-weight: 600;
- font-size: 15px;
- line-height: 20px;
- flex-shrink: 0;
- img {
- position: absolute;
- top: 50%;
- left: 10px;
- transform: translate(0, -50%);
- width: 23px;
- }
- }
- .infoCon {
- margin-top: 35px;
- padding: 15px;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- gap: 10px;
- font-family: PingFang HK;
- font-weight: 400;
- font-size: 14px;
- .Blo {
- display: flex;
- justify-content: space-between;
- background: #fff;
- align-items: center;
- padding: 15px 20px;
- border-radius: 10px;
- }
- }
- </style>
|