uniapp 结合 uview 关于我们 富文本页面ui

uniapp yekong

页面ui

结合iview 接口调用加富文本渲染

uniapp 关于我们 富文本页面


<template>
	<view class="flex-col page">
		<view class="flex-col group_5">
			<view class="group_6">
				<u-parse :content="data" :tagStyle="style"></u-parse>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		aboutus
	} from '../../config/api.js'
	export default {
		data() {
			return {
				data: '',
				style: {
					// 字符串的形式
					p: 'font-size:28rpx;',
					span: 'font-size: 28rpx;',
				}
			};
		},
		mounted() {
			this.getdata()
		},
		methods: {
			getdata() {
				var that = this;
				aboutus({}, {
					custom: {
						auth: true
					}
				}).then(res => {
					if (res.code == 1) {
						that.data = res.data
					}
				}).catch(err => {

				})
			},
		}

	};
</script>

<style scoped lang="scss">
	.page {
		background-color: rgb(255, 255, 255);
		width: 100%;
		height: 100%;
		overflow-y: auto;

		.group_5 {
			padding: 25rpx 0 968rpx;
			flex: 1 1 auto;
			color: rgb(46, 46, 46);
			font-size: 26rpx;
			line-height: 40rpx;
			overflow-y: auto;

			.group_6 {
				margin-left: 38rpx;
				margin-right: 24rpx;
			}
		}

		.tab-bar {
			padding: 7rpx 55rpx 29rpx 62rpx;

			.group_7 {
				color: rgb(0, 0, 0);
				font-size: 22rpx;
				line-height: 22rpx;
				white-space: nowrap;
				width: 59rpx;
				height: 81rpx;

				.text_8 {
					margin-top: 5rpx;
				}
			}

			.group_8 {
				width: 59rpx;
				height: 81rpx;

				.text_9 {
					margin-top: 6rpx;
				}

				.text_10 {
					margin-top: 5rpx;
				}
			}

			.view {
				color: rgb(0, 0, 0);
				font-size: 22rpx;
				line-height: 21rpx;
				white-space: nowrap;
			}

			.view_1 {
				color: rgb(0, 0, 0);
				font-size: 22rpx;
				line-height: 22rpx;
				white-space: nowrap;
			}

			.group_9 {
				color: rgb(0, 0, 0);
				font-size: 22rpx;
				line-height: 20rpx;
				white-space: nowrap;
				width: 60rpx;
				height: 80rpx;

				.text_11 {
					margin-top: 6rpx;
				}
			}

			.image_6 {
				width: 54rpx;
				height: 54rpx;
			}
		}
	}
</style>

喜欢