16 changed files with 417 additions and 245 deletions
@ -1,52 +1,52 @@ |
|||||||
<template> |
<template> |
||||||
<view class="container"> |
<view class="container"> |
||||||
<s-header :title="title" :isTab="isTab" :isCustom="isCustom"> |
<s-header :title="title" :isTab="isTab" :isCustom="isCustom" @goback="$emit('goback')"> |
||||||
<slot name="header"></slot> |
<slot name="header"></slot> |
||||||
</s-header> |
</s-header> |
||||||
<view class="view"> |
<view class="view"> |
||||||
<view class="inner"> |
<view class="inner"> |
||||||
<slot></slot> |
<slot></slot> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<s-tabber v-if="isTab" :selected="selected" /> |
<s-tabber v-if="isTab" :selected="selected" /> |
||||||
</view> |
</view> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
export default { |
export default { |
||||||
name: 'cs-page', |
name: 'cs-page', |
||||||
props: { |
props: { |
||||||
selected: Number, |
selected: Number, |
||||||
title: String, |
title: String, |
||||||
isTab: { |
isTab: { |
||||||
type: Boolean, |
type: Boolean, |
||||||
default: false |
default: false |
||||||
}, |
}, |
||||||
isCustom: { |
isCustom: { |
||||||
type: Boolean, |
type: Boolean, |
||||||
default: false |
default: false |
||||||
} |
} |
||||||
}, |
}, |
||||||
data() { |
data() { |
||||||
return {} |
return {} |
||||||
} |
} |
||||||
} |
} |
||||||
</script> |
</script> |
||||||
|
|
||||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||||
.container { |
.container { |
||||||
display: grid; |
display: grid; |
||||||
grid-template-columns: 1fr; |
grid-template-columns: 1fr; |
||||||
grid-template-rows: auto 1fr auto; |
grid-template-rows: auto 1fr auto; |
||||||
height: 100vh; |
height: 100vh; |
||||||
width: 100vw; |
width: 100vw; |
||||||
display: grid; |
display: grid; |
||||||
.view { |
.view { |
||||||
position: relative; |
position: relative; |
||||||
.inner { |
.inner { |
||||||
position: absolute; |
position: absolute; |
||||||
inset: 0; |
inset: 0; |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
</style> |
</style> |
||||||
|
@ -1,106 +1,133 @@ |
|||||||
<template> |
<template> |
||||||
<cs-page :selected="4" isTab isCustom> |
<cs-page :selected="4" isTab isCustom> |
||||||
<template #header> |
<template #header> |
||||||
<view class="header"> |
<view class="header"> |
||||||
<u--image src="/static/favicon.png" width="20px" height="20px" mode="aspectFit"></u--image> |
<u--image src="/static/favicon.png" width="20px" height="20px" mode="aspectFit"></u--image> |
||||||
<view class="title">个人中心</view> |
<view class="title">个人中心</view> |
||||||
</view> |
</view> |
||||||
</template> |
</template> |
||||||
<scroll-view class="owner-container" scroll-y> |
<scroll-view class="owner-container" scroll-y> |
||||||
<view class="section wd-flex wd-flex-row wd-justify-between wd-items-center" @tap="edit"> |
<view class="section wd-flex wd-flex-row wd-justify-between wd-items-center" @tap="edit"> |
||||||
<view class="wd-flex wd-flex-col" style="gap: 4px"> |
<view class="wd-flex wd-flex-col" style="gap: 4px"> |
||||||
<view class="wd-flex wd-flex-row" style="gap: 8px"> |
<view class="wd-flex wd-flex-row" style="gap: 8px"> |
||||||
<text class="wd-font-800">姓名</text> |
<text class="wd-font-800">{{ user.realName }}</text> |
||||||
<u-tag text="部门" shape="circle" bgColor="#000" borderColor="#000" size="mini"></u-tag> |
<u-tag :text="user.dept.name" shape="circle" bgColor="#000" borderColor="#000" size="mini"></u-tag> |
||||||
</view> |
</view> |
||||||
<view class="">手机号</view> |
<view class="moblie">{{ user.mobile }}</view> |
||||||
</view> |
</view> |
||||||
<view class="wd-flex wd-flex-row" style="gap: 10px"> |
<view class="wd-flex wd-flex-row" style="gap: 10px"> |
||||||
<u-avatar src="/static/images/avatar.jpg"></u-avatar> |
<u-avatar :src="user.avatar"></u-avatar> |
||||||
<u-icon name="arrow-right"></u-icon> |
<u-icon name="arrow-right"></u-icon> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="section wd-flex wd-flex-row wd-justify-between"> |
<view class="section wd-flex wd-flex-row wd-justify-between"> |
||||||
<view class="wd-flex wd-flex-row" style="gap: 8px"> |
<view class="wd-flex wd-flex-row" style="gap: 8px"> |
||||||
<u--image src="/static/images/owner/message.png" width="20px" height="20px" mode="aspectFit"></u--image> |
<u--image src="/static/images/owner/message.png" width="20px" height="20px" mode="aspectFit"></u--image> |
||||||
<text class="wd-font-800">消息通知</text> |
<text class="wd-font-800">消息通知</text> |
||||||
</view> |
</view> |
||||||
<view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |
<view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |
||||||
<u-count-to :startVal="30" :endVal="500" fontSize="14px" separator=","></u-count-to> |
<u-count-to :startVal="30" :endVal="500" fontSize="14px" separator=","></u-count-to> |
||||||
<u-icon name="arrow-right"></u-icon> |
<u-icon name="arrow-right"></u-icon> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="section wd-flex wd-flex-row wd-justify-between"> |
<view class="section wd-flex wd-flex-row wd-justify-between"> |
||||||
<view class="wd-flex wd-flex-row" style="gap: 8px"> |
<view class="wd-flex wd-flex-row" style="gap: 8px"> |
||||||
<u--image src="/static/images/owner/edit.png" width="20px" height="20px" mode="aspectFit"></u--image> |
<u--image src="/static/images/owner/edit.png" width="20px" height="20px" mode="aspectFit"></u--image> |
||||||
<text class="wd-font-800">执法记录</text> |
<text class="wd-font-800">执法记录</text> |
||||||
</view> |
</view> |
||||||
<view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |
<view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |
||||||
<u-count-to :startVal="30" :endVal="500" fontSize="14px" separator=","></u-count-to> |
<u-count-to :startVal="30" :endVal="500" fontSize="14px" separator=","></u-count-to> |
||||||
<u-icon name="arrow-right"></u-icon> |
<u-icon name="arrow-right"></u-icon> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="section wd-flex wd-flex-row wd-justify-between"> |
<view class="section wd-flex wd-flex-row wd-justify-between"> |
||||||
<view class="wd-flex wd-flex-row" style="gap: 8px"> |
<view class="wd-flex wd-flex-row" style="gap: 8px"> |
||||||
<u--image src="/static/images/owner/list.png" width="20px" height="20px" mode="aspectFit"></u--image> |
<u--image src="/static/images/owner/list.png" width="20px" height="20px" mode="aspectFit"></u--image> |
||||||
<text class="wd-font-800">政策法规</text> |
<text class="wd-font-800">政策法规</text> |
||||||
</view> |
</view> |
||||||
<view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |
<view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |
||||||
<u-count-to :startVal="30" :endVal="500" fontSize="14px" separator=","></u-count-to> |
<u-count-to :startVal="30" :endVal="500" fontSize="14px" separator=","></u-count-to> |
||||||
<u-icon name="arrow-right"></u-icon> |
<u-icon name="arrow-right"></u-icon> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="section wd-flex wd-flex-row wd-justify-between"> |
<view class="section wd-flex wd-flex-row wd-justify-between" @click="invite"> |
||||||
<view class="wd-flex wd-flex-row" style="gap: 8px"> |
<view class="wd-flex wd-flex-row" style="gap: 8px"> |
||||||
<u--image src="/static/images/owner/phone.png" width="20px" height="20px" mode="aspectFit"></u--image> |
<u--image src="/static/images/owner/phone.png" width="20px" height="20px" mode="aspectFit"></u--image> |
||||||
<text class="wd-font-800">内部专线</text> |
<text class="wd-font-800">企业入驻</text> |
||||||
</view> |
</view> |
||||||
<view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |
<view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |
||||||
<text>点击呼叫</text> |
<u-icon name="arrow-right"></u-icon> |
||||||
<u-icon name="arrow-right"></u-icon> |
</view> |
||||||
</view> |
</view> |
||||||
</view> |
<view class="section wd-flex wd-flex-row wd-justify-between"> |
||||||
</scroll-view> |
<view class="wd-flex wd-flex-row" style="gap: 8px"> |
||||||
</cs-page> |
<u--image src="/static/images/owner/phone.png" width="20px" height="20px" mode="aspectFit"></u--image> |
||||||
|
<text class="wd-font-800">内部专线</text> |
||||||
|
</view> |
||||||
|
<view class="wd-flex wd-flex-row wd-items-center" style="gap: 8px"> |
||||||
|
<text>点击呼叫</text> |
||||||
|
<u-icon name="arrow-right"></u-icon> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</scroll-view> |
||||||
|
</cs-page> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
|
import { mapGetters } from 'vuex' |
||||||
|
import { getUserProfile } from '@/api/system/user.js' |
||||||
export default { |
export default { |
||||||
data() { |
data() { |
||||||
return {} |
return { |
||||||
}, |
user: {} |
||||||
methods: { |
} |
||||||
edit() { |
}, |
||||||
uni.navigateTo({ |
computed: {}, |
||||||
url: '/sub/owner/edit', |
onShow() { |
||||||
fail: (err) => { |
this.init() |
||||||
console.log(err) |
}, |
||||||
} |
methods: { |
||||||
}) |
init() { |
||||||
} |
getUserProfile().then(res => { |
||||||
} |
this.user = res.data |
||||||
|
}) |
||||||
|
}, |
||||||
|
edit() { |
||||||
|
uni.navigateTo({ |
||||||
|
url: '/sub/owner/edit' |
||||||
|
}) |
||||||
|
}, |
||||||
|
invite() { |
||||||
|
uni.navigateTo({ |
||||||
|
url: '/sub/owner/invite' |
||||||
|
}) |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
</script> |
</script> |
||||||
|
|
||||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||||
.header { |
.header { |
||||||
display: flex; |
display: flex; |
||||||
flex-flow: row nowrap; |
flex-flow: row nowrap; |
||||||
gap: 10px; |
gap: 10px; |
||||||
align-items: center; |
align-items: center; |
||||||
.title { |
.title { |
||||||
font-size: 16px; |
font-size: 16px; |
||||||
} |
} |
||||||
} |
} |
||||||
.owner-container { |
.owner-container { |
||||||
padding: 10px; |
padding: 10px; |
||||||
height: 100%; |
height: 100%; |
||||||
.section { |
.section { |
||||||
border-radius: $cs-border-radius; |
border-radius: $cs-border-radius; |
||||||
background: #fff; |
background: #fff; |
||||||
box-shadow: 0 0 4px 2px $cs-shadow-color; |
box-shadow: 0 0 4px 2px $cs-shadow-color; |
||||||
margin-bottom: $cs-gap; |
margin-bottom: $cs-gap; |
||||||
padding: 24px; |
padding: 24px; |
||||||
} |
} |
||||||
|
.moblie { |
||||||
|
color: $uni-text-color-grey; |
||||||
|
} |
||||||
} |
} |
||||||
</style> |
</style> |
||||||
|
@ -1,6 +1,12 @@ |
|||||||
// global |
// global |
||||||
@import "./global.scss"; |
@import './global.scss'; |
||||||
// color-ui |
// color-ui |
||||||
@import "@/static/scss/colorui.css"; |
@import '@/static/scss/colorui.css'; |
||||||
// iconfont |
// iconfont |
||||||
@import "@/static/font/iconfont.css"; |
@import '@/static/font/iconfont.css'; |
||||||
|
|
||||||
|
.icon-box { |
||||||
|
padding: 5px; |
||||||
|
border-radius: 50%; |
||||||
|
box-shadow: 0 0 4px 2px $cs-shadow-color; |
||||||
|
} |
||||||
|
@ -1,8 +1,10 @@ |
|||||||
const getters = { |
const getters = { |
||||||
token: state => state.user.token, |
token: state => state.user.token, |
||||||
avatar: state => state.user.avatar, |
avatar: state => state.user.avatar, |
||||||
name: state => state.user.name, |
name: state => state.user.name, |
||||||
roles: state => state.user.roles, |
roles: state => state.user.roles, |
||||||
permissions: state => state.user.permissions |
permissions: state => state.user.permissions, |
||||||
|
userId: state => state.user.id, |
||||||
|
phone: state => state.user.phone |
||||||
} |
} |
||||||
export default getters |
export default getters |
@ -1,8 +1,10 @@ |
|||||||
const constant = { |
const constant = { |
||||||
avatar: 'vuex_avatar', |
avatar: 'vuex_avatar', |
||||||
name: 'vuex_name', |
name: 'vuex_name', |
||||||
roles: 'vuex_roles', |
roles: 'vuex_roles', |
||||||
permissions: 'vuex_permissions' |
permissions: 'vuex_permissions', |
||||||
} |
userId: 'vuex_userId', |
||||||
|
phone: 'vuex_phone' |
||||||
|
} |
||||||
|
|
||||||
export default constant |
export default constant |
Loading…
Reference in new issue