1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <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;
- uni.getStorage({
- key: 'config',
- success: function(res) {
- if (res.data) {
- res.data.agree = res.data.agree.replace(/\<img/gi, '<img class="rich-img"');
- that.$set(that, `info`, res.data);
- }
- },
- fail: function(err) {
- console.log(err);
- }
- })
- }
- }
- }
- </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>
|