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.
75 lines
1.3 KiB
75 lines
1.3 KiB
2 years ago
|
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,
|
||
|
|
||
|
});
|
||
|
}
|
||
|
},
|
||
|
|
||
|
|
||
|
},
|
||
|
});
|