完成片区经理功能,优化头像

This commit is contained in:
weipengfei 2023-07-21 16:05:49 +08:00
parent 1817e314c9
commit 0914395ee7
7 changed files with 85 additions and 57 deletions

View File

@ -14,3 +14,8 @@ export const companyIndex = (data) => oahttp.get('/company/index', data)
* 公司详情 * 公司详情
*/ */
export const companyView = (data) => oahttp.get('/company/view', data) export const companyView = (data) => oahttp.get('/company/view', data)
/**
* 公司详情
*/
export const companyAreaManager = (data) => oahttp.get('/company/areaManager', data)

View File

@ -9,7 +9,7 @@
<!-- #endif --> <!-- #endif -->
<view class="my_info flex_a_c"> <view class="my_info flex_a_c">
<view class=""> <view class="">
<u--image :showLoading="true" :src="myOaInfo.avatar||''" width="112.28rpx" height="112.28rpx" shape="circle"></u--image> <u--image :showLoading="true" :src="myOaInfo.avatar||'../../static/img/public/man.png'" width="112.28rpx" height="112.28rpx" shape="circle"></u--image>
</view> </view>
<view class="mesg_box"> <view class="mesg_box">
<view class="name">{{ myOaInfo.nickname }} {{ myOaInfo.mobile }}</view> <view class="name">{{ myOaInfo.nickname }} {{ myOaInfo.mobile }}</view>

View File

@ -28,21 +28,23 @@
</view> </view>
</view> </view>
<view class="list"> <view class="list">
<view class="item" v-for="item in 10" :key="item"> <view class="item" v-for="item in areaManagerList" :key="item.id">
<view class="left"> <view class="left">
<view class="top"> <view class="top">
<image class="avatar" src="../../static/logo.png"></image> <!-- <image class="avatar" :src="item.avatar||'../../static/img/public/man.png'"></image> -->
<u--image class="u_avatar" :showLoading="true" :src="item.avatar||'../../static/img/public/man.png'" width="112.28rpx" height="112.28rpx" shape="circle">
</u--image>
<view class="text"> <view class="text">
<view class="name">经理名称</view> <view class="name">{{item.name}}</view>
<view class="mobile"> <view class="mobile">
联系人-<text @click="copyPhone('17685151643')">13565632345</text> <uni-icons type="phone" color="#999999FF"></uni-icons>联系人-<text @click="copyPhone('17685151643')">{{item.account}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="circle"></view> <view class="circle"></view>
<view class="green">所属片区</view> <view class="green">所属片区</view>
<view>片区详情XXXX</view> <view>{{item.area}}</view>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
@ -55,21 +57,24 @@
</view> </view>
</view> </view>
</view> </view>
<u-loadmore :status="status" :loading-text="loadingText" :loadmore-text="loadmoreText" :nomore-text="nomoreText" /> <u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view> </view>
</template> </template>
<script> <script>
import { Toast } from '@/libs/uniApi.js' import { Toast } from '@/libs/uniApi.js'
import {companyAreaManager} from "@/api/company.js"
export default { export default {
data() { data() {
return { return {
show: false, show: false,
lastpage: '', loadConfig:{
loadingText: '努力加载中', loadingText: '努力加载中',
loadmoreText: '轻轻上拉', loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~', nomoreText: '我也是有底线的~~',
status: 'loadmore' status: 'nomore'
},
areaManagerList:[]
} }
}, },
onReady() { onReady() {
@ -79,8 +84,14 @@
}) })
}, },
onLoad() {}, onLoad() {},
onShow() {}, onShow() {
this.loadAreaManager();
},
methods: { methods: {
async loadAreaManager(){
let res = await companyAreaManager();
this.areaManagerList = res.data;
},
// //
callUp(phone) { callUp(phone) {
uni.makePhoneCall({ uni.makePhoneCall({
@ -207,7 +218,7 @@
.item { .item {
width: 694rpx; width: 694rpx;
height: 231rpx; height: 201rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1; opacity: 1;
@ -233,10 +244,13 @@
border-radius: 50%; border-radius: 50%;
margin-right: 18rpx; margin-right: 18rpx;
} }
.u_avatar{
margin-right: 18rpx;
}
.text { .text {
display: flex; display: flex;
justify-content: space-between; justify-content: space-around;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;

View File

@ -15,7 +15,7 @@
<view v-else class="personage"> <view v-else class="personage">
<view class="my_msg flex_a_c_j_sb"> <view class="my_msg flex_a_c_j_sb">
<view class="flex_a_c"> <view class="flex_a_c">
<u--image :showLoading="true" :src="oaUserInfo.avatar" width="112.28rpx" height="112.28rpx" shape="circle"> <u--image :showLoading="true" :src="oaUserInfo.avatar||'../../static/img/public/man.png'" width="112.28rpx" height="112.28rpx" shape="circle">
</u--image> </u--image>
<view class="name_work"> <view class="name_work">
<view class="name"> <view class="name">

BIN
static/img/public/man.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -3,7 +3,7 @@
<view class="finance_head"> <view class="finance_head">
<view class="top"> <view class="top">
<view class="left"> <view class="left">
<u--image :showLoading="true" :src="userInfo.avatar||''" width="44px" height="44px" shape="circle"></u--image> <u--image :showLoading="true" :src="userInfo.avatar||'../../static/img/public/man.png'" width="44px" height="44px" shape="circle"></u--image>
<view class="name">{{userInfo.nickname}}</view> <view class="name">{{userInfo.nickname}}</view>
<image src="../../static/img/contract/setting.png"></image> <image src="../../static/img/contract/setting.png"></image>
</view> </view>

View File

@ -1,6 +1,7 @@
<template> <template>
<view class="personnel"> <view class="personnel">
<button class="new_btn">创建</button> <!-- <button class="new_btn">创建</button> -->
<view class="personnel_list">
<view class="personnel_item"> <view class="personnel_item">
<view class="type"> <view class="type">
<image src="../../static/icons/err.png"></image> <image src="../../static/icons/err.png"></image>
@ -12,6 +13,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
@ -52,6 +54,11 @@ export default {
line-height: 80rpx; line-height: 80rpx;
text-align: center; text-align: center;
} }
.personnel_list{
display: flex;
flex-direction: column;
align-items: center;
padding-top: 32rpx;
.personnel_item{ .personnel_item{
width: 694rpx; width: 694rpx;
height: 407rpx; height: 407rpx;
@ -86,5 +93,7 @@ export default {
} }
} }
}
} }
</style> </style>