完善公告

This commit is contained in:
TOP糯米 2023-03-18 19:17:14 +08:00
parent 055ab13172
commit 1f02e2722b
3 changed files with 32 additions and 11 deletions

View File

@ -8,14 +8,17 @@ export default {
url: "/wxapp/index/one",
showLoading: true,
},
notify: {
list: {
url: "/wxapp/index/newlistbycateid",
showLoading: true,
}
},
},
index: {
banner: {
url: "/wxapp/index/banner",
},
notify: {
url: "/wxapp/index/message",
},
},
user: {
sendCode: {

View File

@ -33,5 +33,24 @@ export default {
return reject(response.msg);
}).catch(e => { });
});
},
/**
* 公告列表
*/
notifyList() {
return new Promise((resolve, reject) => {
prototype.$request({
api: "system.notify.list",
data: {
cateid: 1,
page: 1,
}
}).then(response => {
if (response.code == 1) {
return resolve(response.data);
}
return reject(response.msg);
}).catch(e => { throw e; });
});
}
}

View File

@ -124,14 +124,13 @@ export default {
});
});
//
this.$request({
api: "index.notify",
}).then((response) => {
this.notifyList = [
{
title: response.data.message,
},
];
this.$models.system.notifyList().then((list) => {
list.forEach((item) => {
this.notifyList.push({
id: item.id,
title: item.title,
});
});
});
//
this.$models.service.getInstallCate().then((list) => {