1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <view class="wrap">
- <u-navbar :autoBack="true" title="答题" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
- <view class="b-image" v-if="activityImage" @click="onPreview">
- <image :src="activityImage || '/static/imgs/activity_loading.jpg'" mode="widthFix"></image>
- </view>
- <view class="b-rich" v-else>
- <rich-text :nodes="activityRich"></rich-text>
- </view>
- </view>
- </template>
- <script>
- import mixinsCommon from '@/mixins/common.js';
- import mixinsAuth from '../../mixins/auth.js';
- import { formatRichText } from '@/common/util.js';
- export default {
- mixins: [mixinsCommon, mixinsAuth],
- data() {
- return {};
- },
- onLoad() {},
- computed: {
- activityRich() {
- return formatRichText(this.$store.getters.globalConfig.activity_rich);
- },
- activityImage() {
- return this.$store.getters.globalConfig.activity_img;
- }
- },
- methods: {
- onPreview() {
- uni.previewImage({
- current: 0,
- urls: [this.activityImage]
- });
- }
- }
- };
- </script>
- <style>
- .b-rich {
- background: #fff;
- font-size: 28upx;
- }
- .b-image image {
- width: 100%;
- height: 460upx;
- }
- </style>
|