优化页面
This commit is contained in:
128
unpackage/dist/dev/mp-weixin/pages/Home/Home.js
vendored
128
unpackage/dist/dev/mp-weixin/pages/Home/Home.js
vendored
@@ -1,11 +1,12 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const components_TUILogin = require("../../components/TUILogin.js");
|
||||
const components_request = require("../../components/request.js");
|
||||
const components_formatDate = require("../../components/formatDate.js");
|
||||
const stores_counter = require("../../stores/counter.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const topNavigation = () => "../../components/topNavigation/topNavigation.js";
|
||||
const Advertisement = () => "../../components/Advertisement/Advertisement.js";
|
||||
const contentList = () => "../../components/contentList/contentList.js";
|
||||
const tabBar = () => "../../components/tabBar/tabBar.js";
|
||||
const counter = stores_counter.useCounterStore();
|
||||
const _sfc_main = {
|
||||
@@ -14,9 +15,22 @@ const _sfc_main = {
|
||||
return {
|
||||
info: {},
|
||||
myuserSig: "",
|
||||
chatInfo: {}
|
||||
chatInfo: {},
|
||||
page: 0,
|
||||
//页码
|
||||
size: 10,
|
||||
//每页条数
|
||||
list: [],
|
||||
// 列表数据
|
||||
detailsdata: {},
|
||||
//详情数据
|
||||
triggered: false
|
||||
//下拉刷新标识
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.pkList();
|
||||
},
|
||||
onLoad() {
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
@@ -40,33 +54,131 @@ const _sfc_main = {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
goRealTimePk() {
|
||||
common_vendor.index.__f__("log", "at pages/Home/Home.vue:123", "goRealTimePk");
|
||||
},
|
||||
goMakeAppointmentPK() {
|
||||
common_vendor.index.__f__("log", "at pages/Home/Home.vue:126", "goMakeAppointmentPK");
|
||||
},
|
||||
goAdvertisement() {
|
||||
common_vendor.index.navigateTo({ url: "/pages/pkDetail/pkDetail" });
|
||||
},
|
||||
onRefresherRefresh() {
|
||||
this.page = 0;
|
||||
this.list = [];
|
||||
this.triggered = true;
|
||||
this.pkList();
|
||||
},
|
||||
async goDetail(item) {
|
||||
common_vendor.index.showLoading({
|
||||
title: "加载中...",
|
||||
mask: true
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/Home/Home.vue:143", "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 pages/Home/Home.vue:152", "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 pages/Home/Home.vue:157", "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() {
|
||||
const res = await components_request.request({
|
||||
url: "pk/pkList",
|
||||
method: "POST",
|
||||
data: {
|
||||
status: 0,
|
||||
page: this.page,
|
||||
size: this.size
|
||||
},
|
||||
userInfo: false
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/Home/Home.vue:191", res);
|
||||
if (res.code === 200) {
|
||||
this.list.push(...res.data);
|
||||
common_vendor.index.__f__("log", "at pages/Home/Home.vue:194", this.list);
|
||||
this.triggered = false;
|
||||
}
|
||||
},
|
||||
onScrollToLower() {
|
||||
this.page++;
|
||||
this.pkList();
|
||||
}
|
||||
},
|
||||
components: {
|
||||
topNavigation,
|
||||
Advertisement,
|
||||
contentList,
|
||||
tabBar
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _component_top_navigation = common_vendor.resolveComponent("top-navigation");
|
||||
const _component_advertisement = common_vendor.resolveComponent("advertisement");
|
||||
const _easycom_contentList2 = common_vendor.resolveComponent("contentList");
|
||||
const _component_uni_card = common_vendor.resolveComponent("uni-card");
|
||||
const _easycom_tabBar2 = common_vendor.resolveComponent("tabBar");
|
||||
(_component_top_navigation + _component_advertisement + _easycom_contentList2 + _easycom_tabBar2)();
|
||||
(_component_top_navigation + _component_advertisement + _component_uni_card + _easycom_tabBar2)();
|
||||
}
|
||||
const _easycom_contentList = () => "../../components/contentList/contentList.js";
|
||||
const _easycom_tabBar = () => "../../components/tabBar/tabBar.js";
|
||||
if (!Math) {
|
||||
(_easycom_contentList + _easycom_tabBar)();
|
||||
_easycom_tabBar();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_assets._imports_0$1,
|
||||
b: common_vendor.o$1((...args) => $options.goAdvertisement && $options.goAdvertisement(...args))
|
||||
b: common_vendor.o$1($options.goRealTimePk),
|
||||
c: common_vendor.o$1($options.goMakeAppointmentPK),
|
||||
d: common_vendor.o$1((...args) => $options.goAdvertisement && $options.goAdvertisement(...args)),
|
||||
e: common_vendor.f($data.list, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.anchorIcon,
|
||||
b: common_vendor.t(item.anchorId),
|
||||
c: item.sex === "2"
|
||||
}, item.sex === "2" ? {
|
||||
d: common_assets._imports_3
|
||||
} : {
|
||||
e: common_assets._imports_2
|
||||
}, {
|
||||
f: common_vendor.t(item.sex === "1" ? "男" : "女"),
|
||||
g: item.sex === "1" ? 1 : "",
|
||||
h: item.sex === "2" ? 1 : "",
|
||||
i: common_vendor.t($options.formatDate(item.pkTime)),
|
||||
j: common_vendor.t(item.coin + "K"),
|
||||
k: common_vendor.o$1(($event) => $options.goDetail(item)),
|
||||
l: "7ffebbf4-2-" + i0
|
||||
});
|
||||
}),
|
||||
f: common_vendor.o$1((...args) => $options.onRefresherRefresh && $options.onRefresherRefresh(...args)),
|
||||
g: common_vendor.o$1((...args) => $options.onScrollToLower && $options.onScrollToLower(...args)),
|
||||
h: $data.triggered
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7ffebbf4"]]);
|
||||
|
||||
Reference in New Issue
Block a user