城阳工作端uniH5前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

339 lines
9.0 KiB

10 months ago
<template>
<view>
<!-- pages/mine/mine.wxml -->
<view class="header">
<view class="navigation" :style="'height: ' + navigationHeight + 'px; top: ' + statusHeight + 'px;'">
<view style="margin-top: 100rpx"></view>
10 months ago
</view>
<view class="content">
<view class="left"><image v-if="avatar" :src="avatar" mode="aspectFill" /></view>
<view class="right">
<view class="top">
<b>{{ userName }}</b>
<text>{{ agencyName }}</text>
</view>
<view class="bto">
<view class="text-wrapper_24">
<text class="text_63">网格长</text>
</view>
<view class="text-wrapper_24">
<text class="text_63">楼长</text>
</view>
</view>
</view>
</view>
</view>
<view class="nase">
<view class="body">
<view class="card">
<!-- <view class="item" bind:tap="handelInformation">
<view class="left">
<image src="../../images/mine/cj.png" mode=""/>
<view>我采集的信息</view>
</view>
<view class="right"> <image src="../../images/right.png" mode=""/></view>
</view>
<view class="item" bind:tap="toFollowUpList">
<view class="left">
<image src="../../images/mine/hf.png" mode=""/>
<view>我回访的居民</view>
</view>
<view class="right"> <image src="../../images/right.png" mode=""/></view>
</view>
<view class="item" bind:tap="toMyTroubleshootDemand">
<view class="left">
<image src="../../images/mine/sqmp.png" mode=""/>
<view>我摸排的诉求</view>
</view>
<view class="right"> <image src="../../images/right.png" mode=""/></view>
</view>
<view class="item">
<view class="left">
<image src="../../images/mine/gy.png" mode=""/>
<view>关于</view>
</view>
<view class="right"> <image src="../../images/right.png" mode=""/></view>
</view> -->
<view class="item" @tap="toSettings">
<view class="left">
<image src="/static/images/mine/sz.png" mode="" />
<view>设置</view>
</view>
<view class="right"><image src="/static/images/right.png" mode="" /></view>
</view>
<view class="item" @tap="toSettings">
<view class="left" @tap="toChangePassword">
<image src="/static/images/login/password.png" mode="" />
<view>修改密码</view>
</view>
<view class="right"><image src="/static/images/right.png" mode="" /></view>
</view>
<!-- <view class="item no-pseudo">-->
<!-- <view class="left">-->
<!-- <image src="/static/images/mine/gy.png" mode="" />-->
<!-- <view>使用指南</view>-->
<!-- </view>-->
<!-- <view class="right"><image src="/static/images/right.png" mode="" /></view>-->
<!-- </view>-->
10 months ago
</view>
</view>
</view>
<custom-tab-bar></custom-tab-bar>
</view>
</template>
<script>
import customTabBar from '../../components/custom-tab-bar/index.vue';
// pages/mine/mine.js
const app = getApp();
export default {
components: {
customTabBar
},
data() {
return {
statusHeight: '',
navigationHeight: '',
agencyName: '',
userName: '',
avatar: ''
};
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// 获取存储在本地缓存中的用户信息
const avatarU = uni.getStorageSync('avatarUrl');
// 输出用户信息
console.log('12312', avatarU);
this.setData({
avatar: avatarU
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
agencyName: app.globalData.user.agencyName,
userName: app.globalData.user.realName
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
methods: {
toChangePassword() {
uni.navigateTo({
url: '/subpages/settings/pages/changePassword/changePassword'
});
},
handelInformation() {
uni.navigateTo({
url: '/subpages/gatherInformation/pages/gatherInformation/gatherInformation'
});
},
toFollowUpList() {
uni.navigateTo({
url: '/subpages/communitySelfInsp/pages/followUpList/followUpList'
});
},
toSettings() {
uni.navigateTo({
url: '/subpages/settings/pages/index/index'
});
},
toMyTroubleshootDemand() {
uni.navigateTo({
url: '/subpages/myTroubleshootDemand/pages/index/index'
});
}
}
};
</script>
<style>
/* pages/mine/mine.wxss */
page {
height: 100vh;
width: 100%;
background-color: #f7f7f7;
}
.nase {
/* height: 100%; */
border: 3rpx solid #f7f7f7;
border-radius: 30rpx;
position: relative;
top: -20rpx;
background: #f7f7f7;
}
.header {
width: 100%;
height: 370rpx;
/* position: fixed;
top: 0;
left: 0;
z-index: 1000; */
background: #3973f6;
overflow: hidden;
}
.header .navigation {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #fdfdfd;
font-size: 32rpx;
position: relative;
z-index: 100;
}
.header .navigation image {
width: 34rpx;
height: 34rpx;
margin-right: 17rpx;
}
.header .content {
margin: 60rpx 0 0;
height: 130rpx;
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
display: flex;
justify-content: space-around;
}
.header .content .left image {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
.header .content .right {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
padding-left: 30rpx;
}
.header .content .right .top b {
font-size: 36rpx;
font-family: PingFang SC;
color: #ffffff;
}
.header .content .right .top text {
margin-left: 19rpx;
padding-left: 19rpx;
height: 31rpx;
font-size: 30rpx;
border-left: 1rpx solid #fffefe;
color: #ffffff;
}
.header .content .right .bto {
display: flex;
margin-top: 20rpx;
}
.header .content .right .bto view {
width: fit-content;
padding: 7rpx 24rpx 7rpx 17rpx;
height: 46rpx;
display: flex;
align-items: center;
/* background: #FFFFFF; */
border-radius: 46rpx;
font-size: 28rpx;
color: rgb(255, 255, 255);
margin-right: 10rpx;
}
.header .content .right .bto image {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.body {
padding: 0 20rpx;
/* height: auto; */
/* top: -120rpx; */
margin-top: 30rpx;
}
.body .card {
background-color: #ffffff;
border-radius: 20rpx;
height: auto;
}
.body .card .item {
position: relative;
height: 100rpx;
display: flex;
align-items: center;
padding: 0 30rpx;
box-sizing: border-box;
}
.text-wrapper_24 {
background-color: #84acf0;
border-radius: 0;
}
.text_63 {
overflow-wrap: break-word;
color: rgb(255, 255, 255);
font-family: PingFang-SC-Medium;
white-space: nowrap;
margin-left: 5rpx;
}
.body .card .item::before {
content: '';
position: absolute;
left: 30rpx;
right: 30rpx;
bottom: 0;
border-bottom: 2rpx solid #eaeaea;
}
.no-pseudo::before {
display: none;
}
.body .card .item .left {
flex: 1;
display: flex;
align-items: center;
font-size: 32rpx;
}
.body .card .item .left image {
width: 40rpx;
height: 40rpx;
margin-right: 22rpx;
}
.body .card .item .right image {
width: 20rpx;
height: 20rpx;
}
</style>