| | |
| | | <template> |
| | | <view class="container"> |
| | | <view class="head"> |
| | | <image src="/static/img/center-bg.png" class="head-bg" /> |
| | | <image src="/static/img/center-bg.png" class="head-bg" v-if="roleType == 1" /> |
| | | <image src="/static/img/center-bg-2.png" class="head-bg" v-if="roleType == 2" /> |
| | | <!-- 用户信息 --> |
| | | <view class="user-box"> |
| | | <view class="left"> |
| | |
| | | </navigator> |
| | | </view> |
| | | </view> |
| | | <view class="cell-box" v-if="isLogin"> |
| | | <u-cell-group :border="false" icon="star" :customStyle="{fontSize:'26rpx',color:'#585b61'}"> |
| | | <u-cell v-if="roleType == 1" title="切换角色" isLink url="/subPackage/user/role/index"> |
| | | <image slot="icon" src="/static/icon/menu-center-02.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell v-if="roleType == 2" title="切换角色" isLink url="/subPackage/user/role/index"> |
| | | <image slot="icon" src="/static/icon/menu-center-05.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell v-if="siteInfo.addressType == 1" title="我的事件" isLink |
| | | url="/subPackage/bs/views/repairList?from=center"> |
| | | <image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell v-if="siteInfo.addressType == 2" title="我的事件" isLink url="/subPackage/user/event/event"> |
| | | <image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell v-if="roleType == 1" title="我的评价" isLink url="/subPackage/user/commentList/evaluateList"> |
| | | <image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell v-if="roleType == 1" title="我的评论" isLink url="/subPackage/user/commentList/commentList"> |
| | | <image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell v-if="roleType == 1" title="修改密码" :border="false" isLink url="/subPackage/user/password/index"> |
| | | <image slot="icon" src="/static/icon/menu-center-03.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell v-if="roleType == 2" title="修改密码" :border="false" isLink url="/subPackage/user/password/index"> |
| | | <image slot="icon" src="/static/icon/menu-center-06.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | |
| | | <view class="main"> |
| | | <view class="cell-box" v-if="isLogin"> |
| | | <u-cell-group :border="false" icon="star" :customStyle="{fontSize:'26rpx',color:'#585b61'}"> |
| | | <u-cell title="切换角色" isLink url="/subPackage/user/role/index" :border="false"> |
| | | <image slot="icon" src="/static/icon/menu-center-02.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell v-if="siteInfo.addressType == 1" title="我的事件" isLink |
| | | url="/subPackage/bs/views/repairList?from=center" :border="false"> |
| | | <image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell v-if="siteInfo.addressType == 2" title="我的事件" :border="false" isLink |
| | | url="/subPackage/user/event/event"> |
| | | <image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell v-if="roleType == 1" :border="false" title="我的评价" isLink |
| | | url="/subPackage/user/commentList/evaluateList"> |
| | | <image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell v-if="roleType == 1" :border="false" title="我的评论" isLink |
| | | url="/subPackage/user/commentList/commentList"> |
| | | <image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell title="修改密码" :border="false" isLink url="/subPackage/user/password/index"> |
| | | <image slot="icon" src="/static/icon/menu-center-03.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | </u-cell-group> |
| | | </view> |
| | | <!-- <view class="cell-box" v-if="isLogin"> |
| | | <u-cell-group :border="false"> |
| | | <u-cell title="退出登录" :border="false" @click="logOut" isLink> |
| | | <image slot="icon" src="/static/icon/menu-center-04.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | </u-cell-group> |
| | | </view> --> |
| | | |
| | | </u-cell-group> |
| | | </view> |
| | | <!-- <view class="cell-box" v-if="isLogin"> |
| | | <u-cell-group :border="false"> |
| | | <u-cell title="退出登录" :border="false" @click="logOut" isLink> |
| | | <image slot="icon" src="/static/icon/menu-center-04.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | </u-cell-group> |
| | | </view> --> |
| | | |
| | | |
| | | |
| | | <view class="exit-btn" @click="logOut" :style="{color:color}"> |
| | | 退出登录 |
| | | </view> |
| | | |
| | | |
| | | <tabBar :current="2" :list="tabList" @change="changeTabbar" /> |
| | | <tabBar :current="2" :list="tabbarList" /> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import tabBar from "@/components/tabBar/tabBar.vue" |
| | | import { |
| | | getTabbarList |
| | | } from "@/common/common.js" |
| | | } from "@/common/common.js"; |
| | | export default { |
| | | components: { |
| | | tabBar |
| | |
| | | roleType: 1, |
| | | addressType: 1, |
| | | user_info: {}, |
| | | tabList: [] |
| | | color: "#017BFC", |
| | | tabbarList: [] |
| | | }; |
| | | }, |
| | | |
| | |
| | | // this.getUserInfo(); |
| | | let role = uni.getStorageSync('activeRole') |
| | | if (role.roleName == "居民") { |
| | | this.tabList = getTabbarList(1); |
| | | this.tabbarList = getTabbarList(1) |
| | | this.roleType = 1 |
| | | this.color = "#017BFC" |
| | | |
| | | } else { |
| | | this.tabList = getTabbarList(2); |
| | | this.tabbarList = getTabbarList(2) |
| | | this.roleType = 2; |
| | | this.color = "#003399" |
| | | } |
| | | this.addressType = uni.getStorageSync("siteInfo").addressType; |
| | | }, |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | changeTabbar() { |
| | | uni.$emit('refreshStatistics') |
| | | }, |
| | | |
| | | setAvatar(avatar) { |
| | | return `${minioBaseUrl}${avatar}` |
| | |
| | | |
| | | <style lang="scss"> |
| | | .container { |
| | | background-color: #fff; |
| | | // background-color: #f7f7f7; |
| | | background-color: #f7f7f7; |
| | | min-height: 100vh; |
| | | overflow: hidden; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | .main { |
| | | border-radius: 30rpx 30rpx 0 0; |
| | | position: relative; |
| | | top: -40rpx; |
| | | z-index: 10; |
| | | padding: 30rpx 30rpx 0; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .cell-box { |
| | | // background: #ffffff; |
| | | // margin: 18rpx; |
| | | border-radius: 20rpx; |
| | | box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(107, 134, 159, 0.2); |
| | | background: #ffffff; |
| | | margin: 18rpx; |
| | | |
| | | .icon { |
| | | width: 52rpx; |
| | | height: 52rpx; |
| | | margin-right: 12rpx; |
| | | margin-right: 22rpx; |
| | | } |
| | | } |
| | | |
| | |
| | | font-weight: 500; |
| | | color: #585b61; |
| | | } |
| | | |
| | | .exit-btn { |
| | | width: 690rpx; |
| | | height: 80rpx; |
| | | line-height: 80rpx; |
| | | border-radius: 16rpx; |
| | | border: 1px solid currentColor; |
| | | text-align: center; |
| | | position: fixed; |
| | | bottom: 150rpx; |
| | | left: calc((100% - 690rpx)/2); |
| | | } |
| | | </style> |