gaoluyang
5 小时以前 d34f4e33ff328a05228b803285b17c6432ae9c16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<template>
  <view class="container">
    <view class="card">
      <van-cell-group inset>
        <van-cell icon="user" title="昵称" :value="user.nickName" />
        <van-cell icon="phone" title="手机号码" :value="user.phonenumber" />
        <van-cell icon="invitation" title="邮箱" :value="user.email" />
        <van-cell icon="medal" title="岗位" :value="postGroup" />
        <van-cell icon="friends" title="角色" :value="roleGroup" />
        <van-cell icon="notes" title="创建日期" :value="user.createTime" />
      </van-cell-group>
    </view>
 
    <!-- <u-button @click="register()">绑定微信</u-button> -->
  </view>
</template>
 
<script setup>
import { getUserProfile } from "@/api/system/user"
import { ref } from "vue";
import modal from "@/plugins/modal"
 
const user = ref({})
const roleGroup = ref("")
const postGroup = ref("")
function getUser() {
  getUserProfile().then(response => {
    user.value = response.data
    roleGroup.value = response.roleGroup
    postGroup.value = response.postGroup
  })
}
getUser()
 
import { wxRegister } from "@/api/oauth"
import { getWxCode } from "@/utils/geek"
function register(){
  modal.loading('绑定微信中...')
  getWxCode().then(res=>{
    wxRegister('miniapp',res).then(res=>{
      modal.closeLoading()
    })
  })
  
}
 
</script>
 
<style lang="scss">
/* 背景更柔和,卡片更突出 */
page {
  background-color: #f5f7fb;
}
 
.container {
  min-height: 100vh;
  padding: 0.75rem; /* 24rpx -> 0.75rem */
  box-sizing: border-box;
}
 
/* 列表卡片容器 */
.card {
  background-color: #ffffff;
  border-radius: 0.625rem; /* 20rpx -> 0.625rem */
  box-shadow: 0 0.375rem 1rem rgba(0, 0, 0, 0.06); /* 0 12rpx 32rpx -> 0 0.375rem 1rem */
  overflow: hidden;
}
 
/* 适配 Vant Cell */
:deep(.van-cell) {
  min-height: 2.875rem; /* 92rpx -> 2.875rem */
}
 
:deep(.van-cell__title) {
  font-weight: 500;
  color: #1f2937; /* 深灰 */
}
 
:deep(.van-cell__value) {
  color: #6b7280; /* 次要灰 */
}
 
/* 移除不再使用的 .cell-icon 样式 */
</style>