From bd99a5211f3a5fcaa051e5da868d87bb870148f5 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Fri, 01 Mar 2024 09:58:45 +0800
Subject: [PATCH] fix:手持设备
---
pages/actionChange/myInfor/index.vue | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 112 insertions(+), 0 deletions(-)
diff --git a/pages/actionChange/myInfor/index.vue b/pages/actionChange/myInfor/index.vue
new file mode 100644
index 0000000..5adeb68
--- /dev/null
+++ b/pages/actionChange/myInfor/index.vue
@@ -0,0 +1,112 @@
+<template>
+ <view class="mainContent">
+ <view class="headerAvatar">
+ <view class="">
+ <u-avatar :src="avatarUrl" fontSize="40" randomBgColor size='100'></u-avatar>
+ </view>
+ </view>
+ <view class="inforBox">
+ <u-cell-group :custom-style='fontStyleobj'>
+ <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 icon="clock-fill" title="������������������" v-if="userInfor.device===1" isLink
+ url="/pages/actionChange/secondLevelData/index"></u-cell>
+ <u-cell icon="clock-fill" title="������������" v-if="userInfor.handDevice===1" isLink
+ url="/pages/actionChange/handheldDevices/index"></u-cell>
+ </u-cell-group>
+ </view>
+ <view class="bunts">
+ <u-button type="error" text="������" @click="goOut"></u-button>
+ </view>
+ </view>
+</template>
+<script>
+ import store from '@/store/index.js'
+ export default {
+ data() {
+ return {
+ loading: false,
+ userInfor: {},
+ avatarUrl: '',
+ unitList: [],
+ fontStyleobj: {
+ 'fontSize': '16px'
+ }
+ }
+ },
+ computed: {
+ unitName() {
+ let data = ''
+ if (Object.values(this.userInfor).length > 0 && this.unitList.length > 0) {
+ if (this.userInfor.unitId) {
+ data = this.unitList.find(a => parseInt(a.unitId) === this.userInfor.unitId).unitName
+ }
+ }
+ return data || ''
+ },
+ // firstFont() {
+ // let data = ''
+ // if (Object.values(this.userInfor).length > 0) {
+ // data = this.userInfor.userName[0]
+ // }
+ // return data || '���'
+ // }
+ },
+ created() {
+ this.$http.httpGet('/allocation/unit').then(res => {
+ this.unitList = res.data
+ })
+ this.userInfor = JSON.parse(uni.getStorageSync('userInfor') || '{}')
+ console.log('this.userInforGet', this.userInfor)
+ let baseUrl = this.$storage.get('baseUrl')
+ this.avatarUrl = `${baseUrl}/file/preview/${this.userInfor.file.fileId}`
+ },
+ methods: {
+ goOut() {
+ let openId = uni.getStorageSync('openId')
+ uni.showModal({
+ title: '������',
+ content: '������������������',
+ success: res => {
+ if (res.confirm) {
+ this.$http.httpGet('/AppUser/wx/exit', {
+ userId: this.userInfor.userId
+ }).then(res => {
+ uni.clearStorageSync()
+ uni.setStorageSync('openId', openId)
+ uni.reLaunch({
+ url: '/pages/login/login',
+ })
+ })
+ }
+ }
+ })
+ }
+ }
+ }
+</script>
+<style lang="scss" scoped>
+ .mainContent {
+ padding: 20px;
+ }
+
+ .headerAvatar {
+ display: flex;
+ justify-content: center;
+ }
+
+ .inforBox {
+ margin-top: 57.69rpx;
+ }
+
+ .bunts {
+ margin-top: 57.69rpx;
+ }
+
+ /deep/ .u-cell__title-text,
+ /deep/.u-cell__value {
+ font-size: 30.77rpx !important;
+ }
+</style>
\ No newline at end of file
--
Gitblit v1.8.0