优化页面
This commit is contained in:
86
unpackage/dist/dev/mp-weixin/pages/Mine/Mine.js
vendored
86
unpackage/dist/dev/mp-weixin/pages/Mine/Mine.js
vendored
@@ -1,11 +1,15 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const components_request = require("../../components/request.js");
|
||||
const components_formatDate = require("../../components/formatDate.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const tabBar = () => "../../components/tabBar/tabBar.js";
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
userinfo: {}
|
||||
userinfo: {},
|
||||
pkInformationdata: [],
|
||||
myPkRecorddata: []
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@@ -13,30 +17,80 @@ const _sfc_main = {
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.userinfo = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:132", this.userinfo);
|
||||
this.getpkInformation();
|
||||
this.getmyPkRecord();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
formatDate: components_formatDate.formatDate,
|
||||
//获取pk信息
|
||||
getpkInformation() {
|
||||
components_request.request({
|
||||
url: "user/queryMyAllPkData",
|
||||
method: "POST",
|
||||
data: {
|
||||
userId: this.userinfo.id,
|
||||
page: 0,
|
||||
size: 4
|
||||
},
|
||||
userInfo: false
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.pkInformationdata = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:154", this.pkInformationdata);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:156", res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取pk记录
|
||||
getmyPkRecord() {
|
||||
components_request.request({
|
||||
url: "user/handlePkInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
type: 1,
|
||||
userId: this.userinfo.id,
|
||||
page: 0,
|
||||
size: 4
|
||||
},
|
||||
userInfo: false
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.myPkRecorddata = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:175", this.myPkRecorddata);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:177", res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 跳转到PK信息页面
|
||||
pkInformation() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/Mine/minecomponents/pkInformation"
|
||||
});
|
||||
},
|
||||
// 跳转到PK记录页面
|
||||
pkRecord() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/Mine/minecomponents/pkRecord"
|
||||
});
|
||||
},
|
||||
// 跳转到联系客服页面
|
||||
contact() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/Mine/minecomponents/contact"
|
||||
});
|
||||
},
|
||||
// 跳转到设置页面
|
||||
goSetting() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/Setting/Setting"
|
||||
});
|
||||
},
|
||||
// 退出登录
|
||||
logout() {
|
||||
common_vendor.index.removeStorage({
|
||||
key: "chatInfo"
|
||||
@@ -69,14 +123,28 @@ if (!Math) {
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: $data.userinfo.headerIcon,
|
||||
b: common_vendor.t($data.userinfo.nickName),
|
||||
c: common_assets._imports_0$2,
|
||||
d: common_vendor.o$1((...args) => $options.goSetting && $options.goSetting(...args)),
|
||||
e: common_vendor.o$1((...args) => $options.pkInformation && $options.pkInformation(...args)),
|
||||
f: common_vendor.o$1((...args) => $options.pkRecord && $options.pkRecord(...args)),
|
||||
g: common_vendor.o$1((...args) => $options.contact && $options.contact(...args)),
|
||||
h: common_vendor.o$1((...args) => $options.logout && $options.logout(...args))
|
||||
a: common_assets._imports_0$1,
|
||||
b: $data.userinfo.headerIcon,
|
||||
c: common_vendor.t($data.userinfo.nickName),
|
||||
d: common_assets._imports_1$1,
|
||||
e: common_vendor.o$1((...args) => $options.goSetting && $options.goSetting(...args)),
|
||||
f: common_assets._imports_2,
|
||||
g: common_vendor.o$1((...args) => $options.pkInformation && $options.pkInformation(...args)),
|
||||
h: common_vendor.f($data.pkInformationdata, (item, index, i0) => {
|
||||
return {
|
||||
a: item.anchorIcon,
|
||||
b: common_vendor.t($options.formatDate(item.pkTime)),
|
||||
c: common_vendor.t(item.coin),
|
||||
d: index
|
||||
};
|
||||
}),
|
||||
i: common_assets._imports_2,
|
||||
j: common_vendor.o$1((...args) => $options.pkRecord && $options.pkRecord(...args)),
|
||||
k: common_assets._imports_3,
|
||||
l: common_vendor.o$1((...args) => $options.contact && $options.contact(...args)),
|
||||
m: common_assets._imports_4,
|
||||
n: common_assets._imports_5,
|
||||
o: common_vendor.o$1((...args) => $options.logout && $options.logout(...args))
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-402ad917"]]);
|
||||
|
||||
Reference in New Issue
Block a user