Commit 920d5425 by crushh

update: dist

parent 22ccf6c1
...@@ -80,9 +80,6 @@ Vue.axios.interceptors.response.use( ...@@ -80,9 +80,6 @@ Vue.axios.interceptors.response.use(
} }
return data; return data;
} }
if (data && data.result && data.result.pageInfo) {
data.result.pageInfo.total = Number(data.result.pageInfo.total);
}
return data; return data;
}, },
err => { err => {
......
...@@ -188,8 +188,9 @@ export default { ...@@ -188,8 +188,9 @@ export default {
postJsonRequest('/haoban-manage3-web/welcome/list', { ...this.form, wxEnterpriseId: this.wxEnterpriseId, type: this.type }) postJsonRequest('/haoban-manage3-web/welcome/list', { ...this.form, wxEnterpriseId: this.wxEnterpriseId, type: this.type })
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
console.log(resData);
if (resData.code == 0 && resData.result) { if (resData.code == 0 && resData.result) {
this.tableData = resData.result.list; this.tableData = resData.result.result;
this.tableData.forEach(item => { this.tableData.forEach(item => {
item.suitDepartmentName = []; item.suitDepartmentName = [];
if (item.suitDepartmentList && item.suitDepartmentList.length) { if (item.suitDepartmentList && item.suitDepartmentList.length) {
...@@ -198,7 +199,7 @@ export default { ...@@ -198,7 +199,7 @@ export default {
}); });
} }
}); });
this.total = Number(resData.result.pageInfo.total); this.total = resData.result.totalCount;
this.$nextTick(() => { this.$nextTick(() => {
const span = document.createElement('span'); const span = document.createElement('span');
span.style.position = 'fixed'; span.style.position = 'fixed';
......
...@@ -127,10 +127,10 @@ export default { ...@@ -127,10 +127,10 @@ export default {
this.loading = true; this.loading = true;
guidePageList(param) guidePageList(param)
.then(res => { .then(res => {
const { result } = res.data; const { result, totalCount } = res.data.result;
if (result) { if (result) {
this.total = result.pageInfo.total; this.total = totalCount;
this.list = result.list; this.list = result;
} }
}) })
.finally(_ => { .finally(_ => {
...@@ -155,9 +155,9 @@ export default { ...@@ -155,9 +155,9 @@ export default {
}, },
deleteTemp(item) { deleteTemp(item) {
guidePageRelation({ pageId: item.pageId }).then(res => { guidePageRelation({ pageId: item.pageId }).then(res => {
const { result } = res.data; const { totalCount } = res.data.result;
if (result.list && result.list.length) { if (totalCount) {
this.$confirm(`当前模板已关联链接(${result.pageInfo.total}),请确认投放链接已投放结束,取消关联后才可删除该模板`, '无法删除该模板', { this.$confirm(`当前模板已关联链接(${totalCount}),请确认投放链接已投放结束,取消关联后才可删除该模板`, '无法删除该模板', {
confirmButtonText: '关联详情', confirmButtonText: '关联详情',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
pageSize: 20 pageSize: 20
}, },
loading: false, loading: false,
total: 50, total: 0,
tableData: [] tableData: []
}; };
}, },
...@@ -61,11 +61,10 @@ export default { ...@@ -61,11 +61,10 @@ export default {
this.loading = true; this.loading = true;
guidePageRelation(this.form) guidePageRelation(this.form)
.then(res => { .then(res => {
console.log(res); const { totalCount, result } = res.data.result;
const { result } = res.data;
if (result) { if (result) {
this.total = result.pageInfo.total; this.total = totalCount;
this.tableData = result.list; this.tableData = result;
} }
}) })
.finally(_ => { .finally(_ => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment