feat: 封装响应拦截

This commit is contained in:
王奥斯
2021-10-26 11:30:25 +08:00
parent f81a0c0418
commit 1323a2c3a2
23 changed files with 57 additions and 61 deletions
+2 -2
View File
@@ -142,7 +142,7 @@ export default {
/* 获取视频,音频,直播信息 */
this.$httpApi.newsList({ type: linkType }).then((res) => {
this.activ = 0
if (res.code !== 0) return this.$message.error(res.msg)
res.data.length === 0 ? (this.emptyText = '暂无数据') : null
this.options = res.data
@@ -155,7 +155,7 @@ export default {
} else if (linkType === '10') {
// 历史页面
this.$httpApi.shopTemplate().then((res) => {
if (res.code !== 0) return this.$message.error(res.msg)
this.options = res.data.shopTemplateList
// 校验数据