@ -1,200 +1,229 @@ |
|||||
<template> |
<template> |
||||
<view class="mine-container" :style="{height: `${windowHeight}px`}"> |
<view class="mine-container" :style="{height: `${windowHeight}px`}"> |
||||
<!--顶部个人信息栏--> |
<u-navbar back-icon-color='#fff' back-icon-name='' |
||||
<view class="header-section"> |
:background="{ background: 'rgba(64, 158,255,'+bgOpacity+')'}" back-text="" title-color='#fff' |
||||
<view class="flex padding justify-between"> |
:immersive='true' :border-bottom='false' title="个人中心"> |
||||
<view class="flex align-center"> |
</u-navbar> |
||||
<view v-if="!avatar" class="cu-avatar xl round bg-white"> |
<view class="header-section"> |
||||
<view class="iconfont icon-people text-gray icon"></view> |
<image src="../../static/images/bg.jpg" class="bg" mode=""></image> |
||||
</view> |
<view class="info"> |
||||
<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix"> |
<image :src="avatar" class="cu-avatar" mode=""></image> |
||||
</image> |
<view class="user-info"> |
||||
<!-- <view v-if="!name" @click="handleToLogin" class="login-tip"> |
<view class="name">用户名称 <span>部门主任</span></view> |
||||
点击登录 |
<view class="tips">生产部门一</view> |
||||
</view> --> |
</view> |
||||
<view @click="handleToInfo" class="user-info"> |
|
||||
<view class="u_title"> |
|
||||
<span>用户名:找刚子</span> 部门主任 |
|
||||
</view> |
|
||||
<view class="u_dept"> |
|
||||
生产部门 |
|
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
<view class="content-section"> |
||||
<!-- <view @click="handleToInfo" class="flex align-center"> |
<view class="mine-actions grid col-3 text-center"> |
||||
<text>个人信息</text> |
<view class="action-item" @click="handleJiaoLiuQun"> |
||||
<view class="iconfont icon-right"></view> |
<image src="../../static/images/banner/icon1.png" mode="widthFix"></image> |
||||
</view> --> |
<text class="text">我的报修</text> |
||||
</view> |
</view> |
||||
</view> |
<view class="action-item" @click="handleBuilding"> |
||||
|
<image src="../../static/images/banner/icon2.png" mode="widthFix"></image> |
||||
<view class="content-section"> |
<text class="text">我的维修</text> |
||||
<view class="mine-actions grid col-4 text-center"> |
</view> |
||||
<view class="action-item" @click="handleJiaoLiuQun"> |
<view class="action-item" @click="handleBuilding"> |
||||
<image src="../../static/images/banner/icon1.png" mode="widthFix"></image> |
<image src="../../static/images/banner/icon3.png" mode="widthFix"></image> |
||||
<text class="text">我的报修</text> |
<text class="text">我的保养</text> |
||||
</view> |
</view> |
||||
<view class="action-item" @click="handleBuilding"> |
|
||||
<image src="../../static/images/banner/icon2.png" mode="widthFix"></image> |
<view class="action-item action-item1" @click="handleBuilding"> |
||||
<text class="text">我的维修</text> |
<image src="../../static/images/banner/icon4.png" mode="widthFix"></image> |
||||
</view> |
<text class="text">巡检点检</text> |
||||
<view class="action-item" @click="handleBuilding"> |
</view> |
||||
<image src="../../static/images/banner/icon3.png" mode="widthFix"></image> |
<view class="action-item action-item1" @click="handleBuilding"> |
||||
<text class="text">我的保养</text> |
<image src="../../static/images/banner/icon5.png" mode="widthFix"></image> |
||||
</view> |
<text class="text">我的领用</text> |
||||
<view class="action-item" @click="handleBuilding"> |
</view> |
||||
<image src="../../static/images/banner/icon4.png" mode="widthFix"></image> |
<view class="action-item action-item1" @click="handleBuilding"> |
||||
<text class="text">巡检点检</text> |
<image src="../../static/images/banner/icon6.png" mode="widthFix"></image> |
||||
</view> |
<text class="text">备件维修</text> |
||||
</view> |
</view> |
||||
|
</view> |
||||
<view class="menu-list"> |
|
||||
<view class="list-cell list-cell-arrow" @click="handleToEditInfo"> |
<view class="menu-list"> |
||||
<view class="menu-item-box"> |
<view class="list-cell list-cell-arrow" @click="handleToEditInfo"> |
||||
<u-icon name="lock" color="#2979ff" size="32"></u-icon> |
<view class="menu-item-box"> |
||||
<view style="margin-left: 10rpx;">修改密码</view> |
<u-icon name="lock" color="#2979ff" size="32"></u-icon> |
||||
</view> |
<view style="margin-left: 10rpx;">修改密码</view> |
||||
</view> |
</view> |
||||
<view class="list-cell list-cell-arrow" @click="handleHelp"> |
</view> |
||||
<view class="menu-item-box"> |
<!-- <view class="list-cell list-cell-arrow" @click="handleHelp"> |
||||
<!-- <view class="iconfont icon-help menu-icon"></view> --> |
<view class="menu-item-box"> |
||||
<u-icon name="info-circle" color="#2979ff" size="32"></u-icon> |
<u-icon name="info-circle" color="#2979ff" size="32"></u-icon> |
||||
<view style="margin-left: 10rpx;">版本更新</view> |
<view style="margin-left: 10rpx;">版本更新</view> |
||||
</view> |
</view> |
||||
</view> |
</view> --> |
||||
<view class="list-cell list-cell-arrow" @click="handleAbout"> |
<view class="list-cell list-cell-arrow" @click="handleAbout"> |
||||
<view class="menu-item-box"> |
<view class="menu-item-box"> |
||||
<u-icon name="heart" color="#2979ff" size="32"></u-icon> |
<u-icon name="heart" color="#2979ff" size="32"></u-icon> |
||||
<view style="margin-left: 10rpx;">关于我们</view> |
<view style="margin-left: 10rpx;">关于我们</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
|
|
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import storage from '@/utils/storage' |
import storage from '@/utils/storage' |
||||
|
|
||||
export default { |
export default { |
||||
data() { |
data() { |
||||
return { |
return { |
||||
name: this.$store.state.user.name, |
name: this.$store.state.user.name, |
||||
version: getApp().globalData.config.appInfo.version |
version: getApp().globalData.config.appInfo.version, |
||||
} |
bgOpacity: 0, |
||||
}, |
} |
||||
computed: { |
}, |
||||
avatar() { |
computed: { |
||||
return this.$store.state.user.avatar |
avatar() { |
||||
}, |
return this.$store.state.user.avatar |
||||
windowHeight() { |
}, |
||||
return uni.getSystemInfoSync().windowHeight - 50 |
windowHeight() { |
||||
} |
return uni.getSystemInfoSync().windowHeight - 50 |
||||
}, |
} |
||||
methods: { |
}, |
||||
handleToInfo() { |
methods: { |
||||
this.$tab.navigateTo('/pages/mine/info/index') |
|
||||
}, |
handleToInfo() { |
||||
handleToEditInfo() { |
this.$tab.navigateTo('/pages/mine/info/index') |
||||
this.$tab.navigateTo('/pages/mine/changePassword') |
}, |
||||
}, |
handleToEditInfo() { |
||||
handleToSetting() { |
this.$tab.navigateTo('/pages/mine/changePassword') |
||||
this.$tab.navigateTo('/pages/mine/setting/index') |
}, |
||||
}, |
handleToSetting() { |
||||
handleToLogin() { |
this.$tab.navigateTo('/pages/mine/setting/index') |
||||
this.$tab.reLaunch('/pages/login') |
}, |
||||
}, |
handleToLogin() { |
||||
handleToAvatar() { |
this.$tab.reLaunch('/pages/login') |
||||
this.$tab.navigateTo('/pages/mine/avatar/index') |
}, |
||||
}, |
handleToAvatar() { |
||||
handleLogout() { |
this.$tab.navigateTo('/pages/mine/avatar/index') |
||||
this.$modal.confirm('确定注销并退出系统吗?').then(() => { |
}, |
||||
this.$store.dispatch('LogOut').then(() => { |
handleLogout() { |
||||
this.$tab.reLaunch('/pages/index') |
this.$modal.confirm('确定注销并退出系统吗?').then(() => { |
||||
}) |
this.$store.dispatch('LogOut').then(() => { |
||||
}) |
this.$tab.reLaunch('/pages/index') |
||||
}, |
}) |
||||
handleHelp() { |
}) |
||||
this.$tab.navigateTo('/pages/mine/help/index') |
}, |
||||
}, |
handleHelp() { |
||||
handleAbout() { |
this.$tab.navigateTo('/pages/mine/help/index') |
||||
this.$tab.navigateTo('/pages/mine/aboutUs') |
}, |
||||
}, |
handleAbout() { |
||||
handleJiaoLiuQun() { |
this.$tab.navigateTo('/pages/mine/aboutUs') |
||||
this.$modal.showToast('微信搜索 naidaguo 后,添加好友后拉你进技术交流群') |
}, |
||||
}, |
handleJiaoLiuQun() { |
||||
handleBuilding() { |
this.$modal.showToast('微信搜索 naidaguo 后,添加好友后拉你进技术交流群') |
||||
this.$modal.showToast('模块建设中~') |
}, |
||||
} |
handleBuilding() { |
||||
} |
this.$modal.showToast('模块建设中~') |
||||
} |
} |
||||
|
}, |
||||
|
onPageScroll(e) { |
||||
|
if (e.scrollTop > 0) { |
||||
|
this.bgOpacity = e.scrollTop / 200; |
||||
|
} else { |
||||
|
this.bgOpacity = 0 |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"> |
||||
page { |
page { |
||||
background-color: #f5f6f7; |
background-color: #f5f6f7; |
||||
} |
} |
||||
|
|
||||
.mine-container { |
.mine-container { |
||||
width: 100%; |
width: 100%; |
||||
height: 100%; |
height: 100%; |
||||
|
|
||||
|
|
||||
.header-section { |
.header-section { |
||||
padding: 30rpx 30rpx 90rpx 30rpx; |
color: white; |
||||
background-color: #409eff; |
position: relative; |
||||
color: white; |
|
||||
|
image { |
||||
.login-tip { |
width: 100%; |
||||
font-size: 36rpx; |
height:370rpx |
||||
margin-left: 20rpx; |
} |
||||
} |
|
||||
|
.info { |
||||
.cu-avatar { |
position: absolute; |
||||
border: 4rpx solid #eaeaea; |
top: 110rpx; |
||||
|
left:80rpx; |
||||
.icon { |
right: 80rpx; |
||||
font-size: 80rpx; |
display: flex; |
||||
} |
align-items: center; |
||||
} |
} |
||||
|
|
||||
.user-info { |
.cu-avatar { |
||||
margin-left: 30rpx; |
border: 4rpx solid #eaeaea; |
||||
|
width: 140rpx; |
||||
.u_title { |
height: 140rpx; |
||||
line-height: 60rpx; |
border-radius: 50%; |
||||
span{ |
|
||||
font-size: 36rpx; |
.icon { |
||||
line-height: 60rpx; |
font-size: 80rpx; |
||||
margin-right: 20rpx; |
} |
||||
} |
} |
||||
} |
|
||||
} |
.user-info { |
||||
} |
margin-left: 30rpx; |
||||
|
|
||||
.content-section { |
.name { |
||||
position: relative; |
line-height: 60rpx; |
||||
top: -100rpx; |
font-size: 36rpx; |
||||
|
font-weight: bold; |
||||
.mine-actions { |
line-height: 60rpx; |
||||
margin: 30rpx 30rpx; |
margin-right: 20rpx; |
||||
padding: 40rpx 0px; |
span{ |
||||
border-radius: 16rpx; |
font-weight: normal; |
||||
background-color: white; |
font-size: 28rpx; |
||||
|
padding-left: 20rpx; |
||||
.action-item { |
} |
||||
image { |
} |
||||
width: 60rpx; |
.tips{ |
||||
} |
padding: 10rpx 20rpx; |
||||
|
background: #3952ae; |
||||
.text { |
color: white; |
||||
display: block; |
border-radius: 50rpx; |
||||
font-size: 26rpx; |
font-size: 24rpx; |
||||
margin: 16rpx 0px; |
display: inline-block; |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
} |
|
||||
</style> |
.content-section { |
||||
|
position: relative; |
||||
|
top: -100rpx; |
||||
|
|
||||
|
.mine-actions { |
||||
|
margin: 30rpx 30rpx; |
||||
|
padding: 40rpx 0px; |
||||
|
border-radius: 16rpx; |
||||
|
background-color: white; |
||||
|
|
||||
|
.action-item { |
||||
|
image { |
||||
|
width: 80rpx; |
||||
|
} |
||||
|
|
||||
|
.text { |
||||
|
display: block; |
||||
|
font-size: 26rpx; |
||||
|
} |
||||
|
} |
||||
|
.action-item1{ |
||||
|
margin-top: 26rpx; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 25 KiB |