| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <view class="meitidetail">
- <view class="title">{{shuju.title}}</view>
- <!-- <view class="author">{{shuju.author}}</view> -->
- <view v-if="content">
- <view v-html="content"></view>
- </view>
- </view>
- </template>
- <script>
- import mineApi from '@/api/mine/index.js'
- export default {
- data() {
- return {
- primary:this.$theme.primary,
- shuju: {
- content: '',
- },
- settingFile:getApp().globalData.siteinfo
- };
- },
- onLoad(options) {
- mineApi.articledetail({id:options.id}).then(ret=>{
- if (ret.status == 0) {
- this.$u.toast("参数错误")
- }
- if (ret.status == 200) {
- this.shuju = ret.data
- this.content = ret.data.content.replace(/\<img src="/gi,`<img style='width:100%;display:block' src="${this.settingFile.root_rich_img}`);
- }
- })
- }
- }
- </script>
- <style lang="scss">
- page{
- width: 100%;
- height: 100%;
- }
- .meitidetail{
- width: 100%;
- height: 100%;
- padding: 20rpx;
- text-align: center;
- }
- .title{
- font-weight: bold;
- margin: 10rpx 0 30rpx 0rpx;
- font-size: 35rpx;
- }
- .author{
- font-weight: bold;
- margin: 5rpx 0 25rpx 0;
- font-size: 28rpx;
- }
- </style>
|