You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
import http from '../../../utils/api'const baseUrl = require('../../../utils/baseUrl')Page({ data: { id: '', // 文章ID
baseUrl:baseUrl, detail: {} // 文章详情数据
},
onLoad(options) { this.getexperienceDetails(options) },
// 经验分享详情
getexperienceDetails(options){ http.experienceDetails({ data:{ id:options.id }, success:res=>{ console.log(1111,res); var ch ='<img src="/dev-api' const mmg = res.data.content.replace(new RegExp(ch, 'g'), '<img src="' + baseUrl) const images = mmg.replace(/\<img/g, '<img style="width:100%;display:block; border-radius:3px;"'); this.setData({ detail:res.data, content:images }) } }) },
})
|