优化页面
This commit is contained in:
@@ -11,8 +11,10 @@ const _sfc_main = {
|
||||
//页码
|
||||
size: 10,
|
||||
//每页条数
|
||||
list: []
|
||||
list: [],
|
||||
// 列表数据
|
||||
detailsdata: {}
|
||||
//详情数据
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -24,15 +26,46 @@ const _sfc_main = {
|
||||
this.list = [];
|
||||
this.pkList();
|
||||
},
|
||||
goDetail(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/pkDetail/pkDetail",
|
||||
success: function(res) {
|
||||
res.eventChannel.emit("itemDetail", {
|
||||
item
|
||||
});
|
||||
}
|
||||
async goDetail(item) {
|
||||
common_vendor.index.showLoading({
|
||||
title: "加载中...",
|
||||
mask: true
|
||||
});
|
||||
common_vendor.index.__f__("log", "at components/contentList/contentList.vue:75", "id", item.id);
|
||||
const res = await components_request.request({
|
||||
url: "pk/pkInfoDetail",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: item.id
|
||||
},
|
||||
userInfo: true
|
||||
});
|
||||
common_vendor.index.__f__("log", "at components/contentList/contentList.vue:84", "res", res);
|
||||
this.detailsdata = res.data;
|
||||
if (res.code === 200) {
|
||||
if (res.data.length !== 0) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("log", "at components/contentList/contentList.vue:89", "res.data", res.data);
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/pkDetail/pkDetail",
|
||||
success: (res2) => {
|
||||
res2.eventChannel.emit("itemDetail", {
|
||||
item: this.detailsdata
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.hideLoading();
|
||||
this.openPopupQuantity();
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "加载失败",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
}
|
||||
},
|
||||
formatDate: components_formatDate.formatDate,
|
||||
async pkList() {
|
||||
@@ -46,10 +79,10 @@ const _sfc_main = {
|
||||
},
|
||||
userInfo: false
|
||||
});
|
||||
common_vendor.index.__f__("log", "at components/contentList/contentList.vue:71", res);
|
||||
common_vendor.index.__f__("log", "at components/contentList/contentList.vue:123", res);
|
||||
if (res.code === 200) {
|
||||
this.list.push(...res.data);
|
||||
common_vendor.index.__f__("log", "at components/contentList/contentList.vue:74", this.list);
|
||||
common_vendor.index.__f__("log", "at components/contentList/contentList.vue:126", this.list);
|
||||
}
|
||||
},
|
||||
onScrollToLower() {
|
||||
|
||||
Reference in New Issue
Block a user