| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <template>
- <view>
- <scroll-view scroll-y class="page">
- <!-- 头部logo-->
- <view class="UCenter-bg">
- <u-avatar :src="photo" size="160">
- </u-avatar>
- </view>
- <view class="padding flex text-center text-grey bg-white shadow-warp">
- <view class="flex flex-sub flex-direction solid-right animation-slide-top" :style="[{animationDelay: '0.2s'}]">
- <view class="text-xl text-orange">{{user.name}}</view>
- <view class="margin-top-sm"><text class="cuIcon-people"></text> 用户</view>
- </view>
- <view class="flex flex-sub flex-direction animation-slide-top" :style="[{animationDelay: '0.2s'}]">
- <view class="text-xl text-green">{{user.orgName || '客户'}}</view>
- <view class="margin-top-sm"><text class="cuIcon-news"></text> 职务</view>
- </view>
- </view>
- <!-- 列表list-->
- <view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius">
- <navigator class="cu-item arrow animation-slide-bottom" url="/pages/wallet/wallet" :style="[{animationDelay: '0.6s'}]">
- <view class="content">
- <text class="cuIcon-redpacket_fill text-red"></text>
- <text class="text-grey">我的钱包</text>
- </view>
- </navigator>
- <navigator class="cu-item arrow animation-slide-bottom" url="/pages/user/userdetail" :style="[{animationDelay: '0.6s'}]">
- <view class="content">
- <text class="cuIcon-settingsfill text-cyan"></text>
- <text class="text-grey">个人信息</text>
- </view>
- </navigator>
- <!-- <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.7s'}]" @click="saoma">
- <view class="content">
- <text class="cuIcon-exit text-cyan"></text>
- <text class="text-grey">扫码</text>
- </view>
- </view> -->
- <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.7s'}]" @click="getQuit">
- <view class="content">
- <text class="cuIcon-exit text-cyan"></text>
- <text class="text-grey">退出</text>
- </view>
- </view>
- </view>
- <view class="cu-tabbar-height"></view>
- </scroll-view>
- </view>
- </template>
- <script>
- import {
- ACCESS_TOKEN,
- USER_NAME,
- USER_INFO
- } from "@/common/util/constants"
- import api from '@/api/api'
- import http from '@/common/service/http.js'
- export default {
- name: "people",
- data() {
- return {
- user: {
- name: '',
- orgName: ''
- },
- id: '',
- photo: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b7c7f970-517d-11eb-97b7-0dc4655d6e68.jpg'
- };
- },
- created() {
- let user = uni.getStorageSync(USER_INFO).employee;
- this.id = user.id
- this.loadinfo()
- },
- methods: {
- loadinfo() {
- let token = uni.getStorageSync(ACCESS_TOKEN)
- this.$http.get('ibps/platform/v3/employee/load', {
- params: {
- employeeId: this.id
- }
- }).then(res => {
- if (res.data.state == '200') {
- let result = res.data.data
- this.user = result
- if (result.photo != '') {
- this.photo = http.apiHosp + 'ibps/platform/v3' + this.user.photo +
- '&access_token=' +
- token + '&tenantId='
- }
- }
- }).catch(e => {})
- },
- saoma() {
- uni.scanCode({
- success: function(res) {
- uni.showToast({
- title: res.result
- })
- }
- })
- },
- //退出逻辑
- getQuit() {
- uni.showModal({
- title: '提示',
- content: '是否退出登录?',
- success: function(res) {
- if (res.confirm) {
- let loginMessage2 = uni.getStorageSync('login-message')
- let para = {
- access_token: uni.getStorageSync(ACCESS_TOKEN)
- }
- uni.clearStorageSync()
- //ibps/oauth2/v3/user/logout?access_token=
- uni.setStorageSync('login-message', loginMessage2)
- uni.navigateTo({
- url: '/pages/login/login'
- })
- // let url = "/ibps/oauth2/v3/user/logout?access_token=" + uni.getStorageSync(
- // ACCESS_TOKEN)
- // api.logout(url, para).then(res => {
- // uni.clearStorageSync()
- // //ibps/oauth2/v3/user/logout?access_token=
- // uni.setStorageSync('login-message', loginMessage2)
- // uni.navigateTo({
- // url: '/pages/login/login'
- // })
- // })
- } else if (res.cancel) {
- }
- }
- });
- }
- }
- }
- </script>
- <style>
- .UCenter-bg {
- /* #ifdef MP-WEIXIN */
- background-image: url('https://static.jeecg.com/upload/test/blue_1595818030310.png');
- /* #endif */
- /* #ifndef MP-WEIXIN */
- background-image: url('../../static/blue.png');
- /* #endif */
- background-size: cover;
- height: 400rpx;
- display: flex;
- justify-content: center;
- padding-top: 40rpx;
- overflow: hidden;
- position: relative;
- flex-direction: column;
- align-items: center;
- color: #fff;
- font-weight: 300;
- text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
- }
- .UCenter-bg text {
- opacity: 0.8;
- }
- .UCenter-bg image {
- width: 200rpx;
- height: 200rpx;
- }
- .UCenter-bg .gif-wave {
- position: absolute;
- width: 100%;
- bottom: 0;
- left: 0;
- z-index: 99;
- mix-blend-mode: screen;
- height: 100rpx;
- }
- map,
- .mapBox {
- left: 0;
- z-index: 99;
- mix-blend-mode: screen;
- height: 100rpx;
- }
- map,
- .mapBox {
- width: 750rpx;
- height: 300rpx;
- }
- </style>
- <style scoped>
- .title-message {
- display: inline-block;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- width: 340rpx;
- }
- </style>
|