后臺裝修欄目,任意模塊選擇鏈接,專題頁鏈接無法分頁
【產品名稱】:CRMEBPRO版/多店版
【產品版本】:v2.4.0
【部署方式】:linux
【部署環境】:本地環境 / 線上環境
【php版本】:7.4
【Mysql版本】:5.7
【使用終端】:后臺
問題原因:
分頁調用getList方法,getList里的判斷沒有 this.currenType == 'special' 專題頁處理邏輯
修復方案:
1.修改 ./view/admin/src/components/linkaddress/index.vue 中的 getList 方法,添加special判斷邏輯
if (this.currenType == 'special') {
pageLink(this.categoryId, this.pid, this.formValidate).then(res => {
this.loading = false;
const data = res.data.list;
const list = [];
data.forEach((e) => {
e.url = `/pages/annex/special/index?id=${e.id}`;
if (e.is_diy) {
list.push(e);
}
});
this.total = res.data.count;
this.tableList = list;
}).catch(err => {
this.loading = false;
this.$Message.error(err.msg);
});
}
2. 修改 ./view/admin/src/api/diy.js 中的 pageLink 方法,添加分頁參數
export function pageLink(id, pid, params) {
return request({
url: `diy/get_page_link/${id}`,
method: "get",
params: { pid: pid, ...params },
});
}