Files
dvcp_v2_wxcp_app/library/apps/AppPageHome/AppPageHome.vue

112 lines
2.5 KiB
Vue
Raw Normal View History

2022-08-30 16:40:51 +08:00
<template>
<section class="AppPageHome">
2022-09-01 15:32:35 +08:00
<div class="header" :style="`backgroundImage: url(${appInfo.banner});`">
<p>{{appInfo.title}}</p>
2022-08-30 16:40:51 +08:00
</div>
2022-09-01 15:32:35 +08:00
<div class="content" v-if="appInfo.wxApplicationList && appInfo.wxApplicationList.length">
<div class="title">{{appInfo.title}}</div>
2022-08-30 16:40:51 +08:00
<div class="app-list">
2022-09-01 15:32:35 +08:00
<div class="item" v-for="(item, index) in appInfo.wxApplicationList" :key="index" @click="linkTo(item.accessPath)">
<img :src="item.icon" alt="" class="icon">
<p>{{item.title}}</p>
2022-08-30 16:40:51 +08:00
</div>
</div>
</div>
</section>
</template>
<script>
export default {
name: "AppPageHome",
appName: '企微应用配置',
data() {
return {
2022-09-01 15:32:35 +08:00
id: '',
appInfo: {},
2022-08-30 16:40:51 +08:00
}
},
onLoad(options) {
2022-09-01 17:45:50 +08:00
this.id = options.id
2022-09-06 17:17:49 +08:00
// this.id = '7a4701d5641543cca4419488db368d3e'
2022-08-30 16:40:51 +08:00
this.getAppInfo()
},
methods: {
getAppInfo() {
2022-09-01 15:32:35 +08:00
this.$http.post(`/app/appwxapplication/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.appInfo = res.data
}
});
2022-08-30 16:40:51 +08:00
},
linkTo(url) {
uni.navigateTo({url})
}
}
}
</script>
<style lang="scss" scoped>
.AppPageHome {
padding-top: 20px;
.header{
width: calc(100% - 36px);
height: 240px;
margin: 0 18px 20px 18px;
background-size: 100% 100%;
p{
font-size: 46px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #26385C;
line-height: 64px;
padding: 48px 50px 0 50px;
word-break: break-all;
}
}
.content{
margin: 0 20px 20px;
width: calc(100% - 40px);
background: #FFF;
border-radius: 16px;
.title{
line-height: 70px;
border-bottom: 1px solid #eee;
padding-left: 20px;
font-size: 26px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #999;
}
.app-list{
overflow: hidden;
.item{
text-align: center;
padding-bottom: 38px;
border-right: 1px solid #eee;
width: calc(33% - 1px);
float: left;
.icon{
display: inline-block;
width: 58px;
height: 58px;
margin: 40px 0 18px 0;
}
p{
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3D434A;
line-height: 40px;
}
}
.item:nth-of-type(3n) {
border-right: 0;
}
2022-09-01 15:32:35 +08:00
.item:nth-of-type(n+4) {
border-top: 1px solid #eee;
}
2022-08-30 16:40:51 +08:00
}
}
}
</style>