OfficeApp/pages/views/application.vue
2023-08-24 17:14:32 +08:00

103 lines
2.2 KiB
Vue

<template>
<view class="application">
<block v-for="item in appDataList" :key="item.title">
<view class="apply_line">
<view class="title flex_a_c">
<view class="text flex_a_c">
{{ item.title }}
</view>
</view>
<view class="line_cent">
<block v-for="(itemData,i) in item.data" :key="i">
<view class="line_item" @click="lineCentClick(itemData.url)">
<u--image :showLoading="true" :src="itemData.src" width="77.19rpx" height="77.19rpx"></u--image>
<view class="name">{{ itemData.name }}</view>
</view>
</block>
</view>
</view>
</block>
</view>
</template>
<script>
import { Toast } from '@/libs/uniApi.js'
import { appDataList } from '@/static/server/server.js'
export default {
data() {
return {
appDataList: appDataList,
src: 'https://cdn.uviewui.com/uview/album/1.jpg'
}
},
onReady() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#0122c7'
})
},
onLoad() {},
onShow() {},
methods: {
lineCentClick(url) {
url.length > 0 ? uni.navigateTo({
url: url
}) : Toast('暂未开放')
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.application {}
.apply_line {
width: 100%;
padding: 0 28.07rpx;
background-color: #fff;
margin-bottom: 31.58rpx;
.title {
width: 100%;
height: 77.19rpx;
border-bottom: 1px solid rgba(204, 204, 204, 0.5);
.text {
font-size: 31.58rpx;
&::before {
content: '';
display: inline-block;
width: 2px;
height: 33.33rpx;
background-color: $theme-oa-color;
margin-right: 10.53rpx;
}
}
}
.line_cent {
display: flex;
flex-wrap: wrap;
.line_item {
width: 231.58rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 28.07rpx 0;
.name {
font-size: 24.56rpx;
margin-top: 14.04rpx;
}
}
}
}
</style>