153 lines
4.5 KiB
JavaScript
153 lines
4.5 KiB
JavaScript
"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: {},
|
|
pkInformationdata: [],
|
|
myPkRecorddata: []
|
|
};
|
|
},
|
|
onShow() {
|
|
common_vendor.index.getStorage({
|
|
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"
|
|
});
|
|
common_vendor.index.removeStorage({
|
|
key: "userinfo"
|
|
});
|
|
common_vendor.index.removeStorage({
|
|
key: "userSig"
|
|
});
|
|
common_vendor.index.removeStorage({
|
|
key: "lastPage"
|
|
});
|
|
common_vendor.index.reLaunch({
|
|
url: "/pages/login/login"
|
|
});
|
|
}
|
|
},
|
|
components: {
|
|
tabBar
|
|
}
|
|
};
|
|
if (!Array) {
|
|
const _easycom_tabBar2 = common_vendor.resolveComponent("tabBar");
|
|
_easycom_tabBar2();
|
|
}
|
|
const _easycom_tabBar = () => "../../components/tabBar/tabBar.js";
|
|
if (!Math) {
|
|
_easycom_tabBar();
|
|
}
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return {
|
|
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$1,
|
|
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$1,
|
|
j: common_vendor.o$1((...args) => $options.pkRecord && $options.pkRecord(...args)),
|
|
k: common_assets._imports_3$1,
|
|
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"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Mine/Mine.js.map
|