1234567891011121314151617181920212223242526272829 |
- import Api from "../../model/api";
- import {handleRichTextImgAuto} from "../../utils/utils";
- Page({
- data: {
- item: {},
- bookTag: '',
- bannerImgs: [],
- },
- async onLoad(options) {
- const {id, tag} = options;
- 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
- })
- },
- })
|