gaoluyang
7 天以前 567fb186b00e8cb8cc90beb9e18c1b01b9c3f4ec
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
85
86
87
88
89
90
91
92
93
94
95
96
97
<template>
  <view class="container">
    <view class="card">
      <van-cell-group>
        <van-cell icon="underway-o" title="合同开始时间" :value="user.contractStartTime" />
        <van-cell icon="underway-o" title="合同结束时间" :value="user.contractEndTime" />
        <van-cell icon="medal-o" title="岗位" :value="user.postJob" />
        <van-cell icon="label-o" title="第一学历" :value="user.firstStudy" />
      </van-cell-group>
    </view>
 
    <!-- <u-button @click="register()">绑定微信</u-button> -->
  </view>
</template>
 
<script setup>
import { ref } from "vue";
import modal from "@/plugins/modal"
 
const user = ref({
    contractStartTime: '',
    contractEndTime: '',
    postJob: '',
    firstStudy: '',
})
const roleGroup = ref("")
const postGroup = ref("")
 
 
import { wxRegister } from "@/api/oauth"
import { getWxCode } from "@/utils/geek"
import useUserStore from "@/store/modules/user";
import {staffJoinListPage} from "@/api/personnelManagement/onboarding";
const userStore = useUserStore()
 
function getUser() {
    const params = {
        staffState: 1,
        current: 1,
        size: 1,
        staffName: userStore.nickName
    }
    staffJoinListPage({...params}).then(response => {
        user.value = {...response.data.records[0]}
        roleGroup.value = response.roleGroup
        postGroup.value = response.postGroup
    })
}
getUser()
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>