import Api from "../../model/api"; import {handleRichTextImgAuto} from "../../utils/utils"; Page({ data: { item: {}, bookTag: '', bannerImgs: [], }, async onLoad(options) { const id = options.id; const tag = options.tag; const res = await Api.getBookDetail(id, true); res.data.textbookIntro = handleRichTextImgAuto(res.data.textbookIntro); const bannerImgs = res.data.textbookPicturesList.map(item => { return { imgPath: item, } }) this.setData({ bookTag: tag, item: res.data, bannerImgs }) }, })