| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <view class="u-content">
- <u-parse :content="conent"></u-parse>
- </view>
- </template>
- <script>
- import mineApi from '@/api/mine/index.js'
- export default {
- data() {
- return {
- primary:this.$theme.primary,
- conent: '',
- settingFile: getApp().globalData.siteinfo,
- }
- },
- onLoad(options) {
- let that=this;
- if (options) {
- if (options.type == 1) {
- uni.setNavigationBarTitle({
- title: '关于我们'
- });
- mineApi.about({}).then(ret => {
- if (ret.status == 200) {
- that.conent = ret.data.content.replace(/\<img src="/gi,
- `<img style='width:100%;display:block' src="${that.settingFile.root_rich_img}`);
- }
- console.log(that.conent)
- })
- } else if (options.type == 2) {
- // uni.setNavigationBarTitle({
- // title: options.title
- // });
- // mineApi.about({}).then(ret => {
- // if (ret.status == 200) {
- // this.conent = ret.data.mcjs.content.replace(/\<img src="/gi,
- // `<img style='width:100%' src="${this.settingFile.root_rich_img}`);
- // }
- // })
- }
- }
- },
- methods: {
- }
- }
- </script>
- <style lang="scss" scoped>
- .u-content {
- padding: 24rpx;
- }
- </style>
|