app_tree_planting/pages/duty/dutyexplain.vue
2023-02-07 17:55:09 +08:00

218 lines
4.0 KiB
Vue

<template>
<view class="page">
<view class="content">
<view class="state-bar">
<image src="../../static/images/ic_arrow_left_black.png" mode="aspectFill" @click="closePage()"></image>
<text>尽责形式说明</text>
</view>
<view class="box">
<image class="title-img" src="../../static/images/ic_explan_title_bg.png" mode="aspectFill"></image>
<view class="container-box">
<view class="container-item" v-for="(item,index) in list" :key="index">
<view class="container-title">
<text>{{item.orderNum}}</text>
<rich-text :nodes="item.description"></rich-text>
</view>
<rich-text class="container-content" :nodes="item.content"></rich-text>
</view>
</view>
</view>
</view>
<pageLoading v-if="showPageLoading"></pageLoading>
</view>
</template>
<script>
import pageLoading from '@/components/loading/pageLoading.vue';
export default {
components: {
pageLoading
},
data() {
return {
list: [],
showPageLoading: true,
}
},
onLoad(res) {
this.getExplain()
},
methods: {
closePage() {
uni.navigateBack()
},
getExplain() {
this.$app.request({
url: this.$api.duty.getDutyExplain,
method: 'GET',
dataType: 'json',
success: res => {
console.log(res)
if (res.status) {
uni.showToast({
icon: 'error',
title: "系统错误"
})
} else {
uni.hideLoading()
this.list = res
}
},
fail: res => {
},
complete: res => {
this.showPageLoading = false
uni.hideLoading()
}
});
}
}
}
</script>
<style lang="scss">
page {
height: 100%;
}
.page {
display: flex;
flex: 1;
flex-direction: column;
overflow: auto;
height: 100%;
background-image: url('../../static/images/ic_explan_bg.png');
background-size: 100% 100%;
background-repeat: no-repeat;
}
.content {
width: 100%;
position: relative;
}
.box {
display: flex;
flex-direction: column;
justify-content: flex-start;
min-height: 700rpx;
height: auto;
width: 90%;
position: absolute;
top: 300rpx;
left: 50%;
transform: translate(-50%, 0);
-webkit-transform: translate(-50%, 0);
box-shadow: 0rpx 7rpx 33rpx 16rpx rgba(188, 226, 204, 0.15);
border-radius: 30rpx;
background: white;
.title-img {
align-items: center;
align-self: center;
width: 360rpx;
height: 100rpx;
margin-top: -12rpx;
}
}
.tab-bar {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-around;
padding-top: 15rpx;
.tab-active {
text-align: center;
font-size: 40rpx;
font-weight: bold;
color: #00821E;
}
.tab-default {
text-align: center;
font-size: 40rpx;
font-weight: 200;
color: #00821E;
}
}
.title-box {
width: 100%;
height: 100%;
background-image: url('../../static/images/ic_explan_bg.png');
background-size: 100% 100%;
background-repeat: no-repeat;
}
.state-bar {
position: absolute;
top: 0%;
left: 0%;
width: 100%;
margin: 45rpx 0rpx;
height: 100rpx;
display: flex;
flex-direction: row;
align-items: center;
color: black;
image {
width: 50rpx;
height: 50rpx;
margin-left: 20rpx;
}
text {
font-size: 40rpx;
align-self: center;
text-align: center;
width: 100%;
margin-left: -70rpx;
}
}
.container-box {
display: flex;
flex-direction: column;
padding: 20rpx;
margin-top: 20rpx;
.container-item {
display: flex;
flex-direction: column;
.container-title {
display: flex;
flex-direction: row;
padding: 20rpx 10rpx;
background: #EDFCED;
text {
background: #00821E;
border-radius: 50%;
width: 45rpx;
height: 45rpx;
text-align: center;
color: white;
margin-right: 20rpx;
}
}
.container-content {
padding: 20rpx;
}
}
}
</style>