1234567891011121314151617181920 |
- const {post, config} = require('./promise.js');
- const $ = require("jquery");
- $(function(){
- function getVersion() {
- post(config.getVersion, '').then((res) => {
- const data = res.data.data;
- const dtl = data.detail;
- const time = data.refreshTime.substr(0,10);
- let dom = '';
- $("h1 span").html(data.name);
- $("h1 i").html(time);
- for(let i=0;i<dtl.length;i++){
- dom += '<p>'+dtl[i].title+'</p><p>'+dtl[i].description+'</p>';
- }
- $(".content").html(dom);
- })
- }
- getVersion();
- })
|