import { wxRequestPost } from "@utils/promise-wx-api"; import { cookRichContent } from "@utils/tools"; const app = getApp(); // pages/vocal/detail.js Component({ /** * 组件的属性列表 */ properties: {}, /** * 组件的初始数据 */ data: { //iniLoaded: false, id: "", detailInfo: {}, }, /** * 组件的方法列表 */ methods: { async onLoad(options) { // const { iniLoaded } = this.data; // const $loading = this.selectComponent("#loading"); // if (!iniLoaded) { // $loading.show(); // } this.setData({ id: options.id, }); await this.getDetail(); }, // 初始化访问 async getDetail() { const { id } = this.data; const { data: { data: { code, data }, }, msg, } = await wxRequestPost( "resi/partymember/icpartymemberstyle/detail", { id: id, }, { // isMock: true, isQuiet: false, } ); if (msg === "success" && code === 0) { this.setData({ detailInfo: data, }); } }, }, });