123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="one">
- <rich-text :nodes="info.agree"></rich-text>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- info: {}
- };
- },
- onShow: function() {
- const that = this;
- that.search();
- },
- methods: {
- search() {
- const that = this;
- try {
- const res = uni.getStorageSync('config');
- if (res) {
- res.agree = res.agree.replace(/\<img/gi, '<img class="rich-img"');
- that.$set(that, `info`, res);
- }
- } catch (err) {
- uni.showToast({
- title: err.errmsg,
- icon: 'error',
- duration: 2000
- });
- }
- }
- }
- }
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction: column;
- width: 100vw;
- height: 100vh;
- .one {
- padding: 2vw;
- .rich-img {
- width: 100% !important;
- display: block;
- }
- }
- }
- </style>
|