页面切图
This commit is contained in:
128
pages/index/message.vue
Normal file
128
pages/index/message.vue
Normal file
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<view :loading="loading">
|
||||
<view class="message">
|
||||
<view class="message-nav" @click="jump('system')">
|
||||
<image mode="aspectFill" class="message-nav-icon" src="/static/message3.png" />
|
||||
<view class="message-nav-label">系统</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="message-nav" @click="jump('report')">
|
||||
<image mode="aspectFill" class="message-nav-icon" src="/static/report.png" />
|
||||
<view class="message-nav-label">告警</view>
|
||||
<uni-badge text="3"></uni-badge>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="message-nav" @click="jump('incident')">
|
||||
<image mode="aspectFill" class="message-nav-icon" src="/static/incident.png" />
|
||||
<view class="message-nav-label">事件</view>
|
||||
<uni-badge text="3"></uni-badge>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
},
|
||||
upgrade (code) {
|
||||
console.log(code);
|
||||
uni.showToast({
|
||||
title: '升级成功',
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
jump (type) {
|
||||
switch (type) {
|
||||
case 'login':
|
||||
uni.navigateTo({
|
||||
url: `/pages/user/login`
|
||||
})
|
||||
break;
|
||||
case 'gateway':
|
||||
uni.navigateTo({
|
||||
url: `/pages/gateway/list`
|
||||
})
|
||||
break;
|
||||
case 'upgrade':
|
||||
this.$refs.inputDialog.open()
|
||||
break;
|
||||
default:
|
||||
uni.navigateTo({
|
||||
url: `/pages/message/${type}`
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad () {
|
||||
this.init()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.message {
|
||||
padding-top: 20rpx;
|
||||
.message-header {
|
||||
padding: 200rpx 34rpx 34rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: $uni-theme-white;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 4rpx 8rpx #e7e7e74c;
|
||||
|
||||
.message-header-head {
|
||||
margin-right: 30rpx;
|
||||
height: 128rpx;
|
||||
width: 128rpx;
|
||||
border-radius: $uni-theme-radius;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.message-header-name {
|
||||
margin-right: 30rpx;
|
||||
flex: 1;
|
||||
font-size: 36rpx;
|
||||
color: #111;
|
||||
font-weight: 700;
|
||||
|
||||
.tag {
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.message-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>
|
||||
Reference in New Issue
Block a user