Files
app-govern/pages/index/mine.vue

133 lines
4.0 KiB
Vue
Raw Normal View History

2023-01-11 16:33:13 +08:00
<template>
2023-01-12 10:03:25 +08:00
<view :loading="loading">
2023-01-11 16:33:13 +08:00
<view class="mine">
<view class="mine-header" @click="jump('basic')">
2023-01-13 16:32:56 +08:00
<image mode="aspectFill" class="mine-header-head" src="/static/head.png" />
<view class="mine-header-name hide-txt">
<view>灿能电力</view>
<view class="tag">普通用户</view>
</view>
2023-01-11 16:33:13 +08:00
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
2023-02-01 16:59:32 +08:00
<!-- <view class="mine-nav" @click="jump('upgrade')">
2023-01-11 16:33:13 +08:00
<image mode="aspectFill" class="mine-nav-icon" src="/static/server.png" />
2023-01-13 16:32:56 +08:00
<view class="mine-nav-label">角色升级</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
2023-02-01 16:59:32 +08:00
</view> -->
2023-01-13 16:32:56 +08:00
<view class="mine-nav" @click="jump('message')"
style="border-bottom: none; box-shadow: 0 4rpx 8rpx #e7e7e74c;">
<image mode="aspectFill" class="mine-nav-icon" src="/static/message2.png" />
<view class="mine-nav-label">个人消息</view>
2023-01-11 16:33:13 +08:00
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
<view class="mine-nav" @click="jump('setup')" style="margin-top:20rpx;border-bottom: none; ">
<image mode="aspectFill" class="mine-nav-icon" src="/static/setup.png" />
<view class="mine-nav-label">设置</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
2023-01-13 16:32:56 +08:00
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" title="角色升级" placeholder="请输入六位邀请码"
@confirm="upgrade"></uni-popup-dialog>
</uni-popup>
2023-01-11 16:33:13 +08:00
</view>
2023-01-12 10:03:25 +08:00
</view>
2023-01-11 16:33:13 +08:00
</template>
<script>
export default {
data () {
return {
loading: false
}
},
methods: {
init () {
},
2023-01-13 16:32:56 +08:00
upgrade (code) {
console.log(code);
uni.showToast({
title: '升级成功',
icon: 'none'
})
},
2023-01-11 16:33:13 +08:00
jump (type) {
switch (type) {
case 'login':
uni.navigateTo({
2023-01-13 16:32:56 +08:00
url: `/pages/user/login`
2023-01-11 16:33:13 +08:00
})
2023-01-13 16:32:56 +08:00
break;
case 'upgrade':
this.$refs.inputDialog.open()
break;
2023-01-11 16:33:13 +08:00
default:
uni.navigateTo({
url: `/pages/mine/${type}`
})
break;
}
}
},
onLoad () {
this.init()
},
}
</script>
<style lang="scss">
.mine {
.mine-header {
padding: 200rpx 34rpx 34rpx;
display: flex;
align-items: center;
background: $uni-theme-white;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 8rpx #e7e7e74c;
.mine-header-head {
margin-right: 30rpx;
height: 128rpx;
width: 128rpx;
border-radius: $uni-theme-radius;
overflow: hidden;
}
.mine-header-name {
margin-right: 30rpx;
flex: 1;
font-size: 36rpx;
color: #111;
font-weight: 700;
2023-01-13 16:32:56 +08:00
.tag {
margin-top: 10rpx;
font-size: 24rpx;
color: #aaa;
}
2023-01-11 16:33:13 +08:00
}
}
.mine-nav {
padding: 34rpx;
display: flex;
align-items: center;
background: $uni-theme-white;
border-bottom: 1rpx solid #e8e8e8;
&-icon {
margin-right: 30rpx;
height: 44rpx;
width: 44rpx;
border-radius: $uni-theme-radius;
overflow: hidden;
}
&-label {
margin-right: 30rpx;
flex: 1;
font-size: 28rpx;
color: #111;
}
}
}
</style>