文章已阅读
 

1.定义方法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
async function getIteminfo(id) {

if (id == null) id = getPara();//获取页面参数

var item_options = [];

return await axios({

url: dev_proxyftpname + "/api/findOneById",

method: "post",

data: JSON.stringify({ id: id }),

headers: { "Content-Type": "application/json" },

timeout: 1000 * 30,

})

.then((res) => {

if (res.data) {

if (res.data.data != null) {

return res.data.data;

}

}

})

}

2.调用

1
2
3
4
5
6
7
8
9
getIteminfo().then(async res => {
if (res.articleTemplateId != null) {
await getTemplates(res.articleTemplateId).then(res => {
html += res.templateContent;
$("." + className).append(analysisHtml(html));
})
}

});
2022-10-08

浏览 |

© 2023 南疆 with help from Hexo and Twitter Bootstrap. Theme by Freemind.

container-narrow -->