|
|
|
|
@ -1,17 +1,19 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="container">
|
|
|
|
|
<uni-list>
|
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'person-filled' }" title="昵称" :rightText="user.nickName" />
|
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'phone-filled' }" title="手机号码"
|
|
|
|
|
:rightText="user.phonenumber" />
|
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'contact' }" title="用户名称" :rightText="user.email" />
|
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'person-filled' }" title="昵称" :rightText="user.nickname" />
|
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'sex' }" title="性别"
|
|
|
|
|
:rightText="user.sex===2?'女' : '男'" />
|
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'phone-filled' }" title="手机号码" :rightText="user.mobile" />
|
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'email-filled' }" title="邮箱" :rightText="user.email" />
|
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'auth-filled' }" title="岗位" :rightText="postGroup" />
|
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'staff-filled' }" title="角色" :rightText="roleGroup" />
|
|
|
|
|
<!-- <uni-list-item showExtraIcon="true" :extraIcon="{ type: 'auth-filled' }" title="岗位" :rightText="postGroup" />-->
|
|
|
|
|
<!-- <uni-list-item showExtraIcon="true" :extraIcon="{ type: 'staff-filled' }" title="角色" :rightText="roleGroup" />-->
|
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'calendar-filled' }" title="创建日期"
|
|
|
|
|
:rightText="user.createTime" />
|
|
|
|
|
:rightText="timestampToTime(user.createTime)" />
|
|
|
|
|
</uni-list>
|
|
|
|
|
|
|
|
|
|
<u-button @click="register()">绑定微信</u-button>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -19,15 +21,15 @@
|
|
|
|
|
import { getUserProfile } from "@/api/system/user"
|
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
import modal from "@/plugins/modal"
|
|
|
|
|
|
|
|
|
|
import {timestampToTime} from "@/utils/dateUtil";
|
|
|
|
|
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
|
|
|
|
|
// roleGroup.value = user.value.roles
|
|
|
|
|
// postGroup.value = user.value.posts
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
getUser()
|
|
|
|
|
@ -35,12 +37,12 @@ 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()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
// modal.loading('绑定微信中...')
|
|
|
|
|
// getWxCode().then(res=>{
|
|
|
|
|
// wxRegister('miniapp',res).then(res=>{
|
|
|
|
|
// modal.closeLoading()
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|