From d8b41fff43a2cee6a8f714ffa807623b15803786 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Fri, 20 Oct 2023 15:21:35 +0800
Subject: [PATCH] fix:立行立改Uniapp小程序新建项目
---
pages/actionChange/myInfor/index.vue | 91 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 91 insertions(+), 0 deletions(-)
diff --git a/pages/actionChange/myInfor/index.vue b/pages/actionChange/myInfor/index.vue
new file mode 100644
index 0000000..b63dc6c
--- /dev/null
+++ b/pages/actionChange/myInfor/index.vue
@@ -0,0 +1,91 @@
+<template>
+ <view class="mainContent">
+ <view class="headerAvatar">
+ <view class="">
+ <u-avatar :text="firstFont" fontSize="40" randomBgColor size='100'></u-avatar>
+ </view>
+ </view>
+ <view class="inforBox">
+ <u-cell-group>
+ <u-cell icon="server-man" title="������" :value="userInfor.userName"></u-cell>
+ <u-cell icon="account-fill" title="������" :value="userInfor.account"></u-cell>
+ <u-cell icon="integral-fill" title="������������" :value="unitName"></u-cell>
+ <u-cell icon="phone-fill" title="���������" :value="userInfor.mobile"></u-cell>
+ </u-cell-group>
+ </view>
+ <view class="bunts">
+ <u-button type="error" text="������" @click="goOut"></u-button>
+ </view>
+ </view>
+</template>
+<script>
+ import {
+ created
+ } from '../../../uni_modules/uview-ui/libs/mixin/mixin'
+ export default {
+ data() {
+ return {
+ loading: false,
+ userInfor: {},
+ unitList: []
+ }
+ },
+ computed: {
+ unitName() {
+ let data = ''
+ if (this.unitList.length > 0) {
+ data = this.unitList.find(a => parseInt(a.unitId) === this.userInfor.unitId).unitName
+ }
+ return data || ''
+ },
+ firstFont() {
+ return this.userInfor.userName[0] || '���'
+ }
+ },
+ created() {
+ this.$http.httpGet('/allocation/unit').then(res => {
+ this.unitList = res.data
+ })
+ this.userInfor = this.$storage.getJson('userInfo')
+ console.log('userInfor', this.userInfor.userName[0])
+ },
+ methods: {
+ goOut() {
+ uni.showModal({
+ title: '������',
+ content: '������������������',
+ success: res => {
+ if (res.confirm) {
+ this.$http.httpGet('/AppUser/wx/exit', {
+ userId: this.userInfor.userId
+ }).then(res => {
+ uni.clearStorageSync()
+ uni.reLaunch({
+ url: '/pages/login/login',
+ })
+ }).catch(uni.$u.toast('������������'))
+ }
+ }
+ })
+ }
+ }
+ }
+</script>
+<style lang="scss" scoped>
+ .mainContent {
+ padding: 20px;
+ }
+
+ .headerAvatar {
+ display: flex;
+ justify-content: center;
+ }
+
+ .inforBox {
+ margin-top: 57.69rpx;
+ }
+
+ .bunts {
+ margin-top: 57.69rpx;
+ }
+</style>
\ No newline at end of file
--
Gitblit v1.8.0