<template>
|
<view class="container">
|
<view class="card">
|
<van-cell-group>
|
<van-cell icon="cluster-o" title="所属公司" :value="userStore.currentFactoryName" />
|
<van-cell icon="manager-o" title="岗位" :value="postGroup" />
|
</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"
|
import useUserStore from "@/store/modules/user";
|
const userStore = useUserStore()
|
|
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; /* 24rpx -> 0.75rem */
|
box-sizing: border-box;
|
}
|
|
/* 列表卡片容器 */
|
.card {
|
background-color: #ffffff;
|
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: 3rem; /* 92rpx -> 2.875rem */
|
align-items: center;
|
}
|
|
:deep(.van-cell__title) {
|
font-weight: 500;
|
color: #1f2937; /* 深灰 */
|
}
|
|
:deep(.van-cell__value) {
|
color: #6b7280; /* 次要灰 */
|
}
|
|
/* 移除不再使用的 .cell-icon 样式 */
|
</style>
|