优化页面
This commit is contained in:
127
unpackage/dist/dev/mp-weixin/pages/Mine/Mine.js
vendored
127
unpackage/dist/dev/mp-weixin/pages/Mine/Mine.js
vendored
@@ -9,7 +9,9 @@ const _sfc_main = {
|
||||
return {
|
||||
userinfo: {},
|
||||
pkInformationdata: [],
|
||||
myPkRecorddata: []
|
||||
myPkRecorddata: [],
|
||||
SignStatus: null,
|
||||
AnchorList: []
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@@ -17,13 +19,71 @@ const _sfc_main = {
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.userinfo = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:136", this.userinfo);
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:208", this.userinfo);
|
||||
this.getpkInformation();
|
||||
this.getmyPkRecord();
|
||||
this.getSignStatus();
|
||||
this.getAnchorList();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 获取主播列表
|
||||
getAnchorList() {
|
||||
components_request.request({
|
||||
url: "anchor/list",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.userinfo.id
|
||||
},
|
||||
userInfo: true
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.AnchorList = res.data.slice(0, 4);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:230", res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取签到状态
|
||||
getSignStatus() {
|
||||
components_request.request({
|
||||
url: "user/checkSignStatus",
|
||||
method: "GET",
|
||||
data: {
|
||||
userId: this.userinfo.id
|
||||
},
|
||||
userInfo: true
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.SignStatus = res.data;
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:247", res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
//签到
|
||||
sign() {
|
||||
components_request.request({
|
||||
url: "user/signIn",
|
||||
method: "POST",
|
||||
data: {
|
||||
userId: this.userinfo.id
|
||||
},
|
||||
userInfo: true
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "签到成功",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
this.getSignStatus();
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:269", res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
formatDate: components_formatDate.formatDate,
|
||||
TimeFormatting: components_TimeFormatting.TimeFormatting,
|
||||
//获取pk信息
|
||||
@@ -40,9 +100,9 @@ const _sfc_main = {
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.pkInformationdata = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:159", this.pkInformationdata);
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:289", this.pkInformationdata);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:161", res.msg);
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:291", res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -61,12 +121,17 @@ const _sfc_main = {
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.myPkRecorddata = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:180", this.myPkRecorddata);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:182", res.msg);
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:311", res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 跳转到主播库页面
|
||||
anchorLibrary() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/Mine/minecomponents/anchorLibrary"
|
||||
});
|
||||
},
|
||||
// 跳转到PK信息页面
|
||||
pkInformation() {
|
||||
common_vendor.index.navigateTo({
|
||||
@@ -122,11 +187,31 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $data.userinfo.headerIcon,
|
||||
b: common_vendor.t($data.userinfo.nickName),
|
||||
c: common_vendor.o$1((...args) => $options.goSetting && $options.goSetting(...args)),
|
||||
d: common_vendor.o$1((...args) => $options.pkInformation && $options.pkInformation(...args)),
|
||||
e: $data.pkInformationdata.length !== 0
|
||||
c: $data.SignStatus === true
|
||||
}, $data.SignStatus === true ? {
|
||||
d: common_vendor.o$1((...args) => $options.sign && $options.sign(...args))
|
||||
} : {}, {
|
||||
e: $data.SignStatus === false
|
||||
}, $data.SignStatus === false ? {} : {}, {
|
||||
f: common_vendor.o$1((...args) => $options.goSetting && $options.goSetting(...args)),
|
||||
g: common_vendor.o$1((...args) => $options.anchorLibrary && $options.anchorLibrary(...args)),
|
||||
h: $data.AnchorList.length !== 0
|
||||
}, $data.AnchorList.length !== 0 ? {
|
||||
i: common_vendor.f($data.AnchorList, (item, index, i0) => {
|
||||
return {
|
||||
a: item.headerIcon,
|
||||
b: common_vendor.t(item.anchorId),
|
||||
c: common_vendor.t(item.country),
|
||||
d: index
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
j: $data.AnchorList.length === 0
|
||||
}, $data.AnchorList.length === 0 ? {} : {}, {
|
||||
k: common_vendor.o$1((...args) => $options.pkInformation && $options.pkInformation(...args)),
|
||||
l: $data.pkInformationdata.length !== 0
|
||||
}, $data.pkInformationdata.length !== 0 ? {
|
||||
f: common_vendor.f($data.pkInformationdata, (item, index, i0) => {
|
||||
m: common_vendor.f($data.pkInformationdata, (item, index, i0) => {
|
||||
return {
|
||||
a: item.anchorIcon,
|
||||
b: common_vendor.t($options.formatDate(item.pkTime)),
|
||||
@@ -135,16 +220,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
g: $data.pkInformationdata.length === 0
|
||||
n: $data.pkInformationdata.length === 0
|
||||
}, $data.pkInformationdata.length === 0 ? {} : {}, {
|
||||
h: common_vendor.o$1((...args) => $options.pkRecord && $options.pkRecord(...args)),
|
||||
i: $data.myPkRecorddata.length !== 0
|
||||
o: common_vendor.o$1((...args) => $options.pkRecord && $options.pkRecord(...args)),
|
||||
p: $data.myPkRecorddata.length !== 0
|
||||
}, $data.myPkRecorddata.length !== 0 ? {
|
||||
j: common_vendor.f($data.myPkRecorddata, (item, index, i0) => {
|
||||
q: common_vendor.f($data.myPkRecorddata, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.anchorIconA,
|
||||
b: item.winnerAnchorId !== item.anchorIdA
|
||||
}, item.winnerAnchorId !== item.anchorIdA ? {} : item.winnerAnchorId === item.anchorIdA ? {} : {}, {
|
||||
b: item.winnerAnchorId !== item.anchorIdA && item.winnerAnchorId !== ""
|
||||
}, item.winnerAnchorId !== item.anchorIdA && item.winnerAnchorId !== "" ? {} : item.winnerAnchorId === item.anchorIdA ? {} : {}, {
|
||||
c: item.winnerAnchorId === item.anchorIdA,
|
||||
d: common_vendor.t(item.pkNumber),
|
||||
e: common_vendor.t($options.TimeFormatting(item.pkTime)),
|
||||
@@ -152,12 +237,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
k: $data.myPkRecorddata.length === 0
|
||||
r: $data.myPkRecorddata.length === 0
|
||||
}, $data.myPkRecorddata.length === 0 ? {} : {}, {
|
||||
l: common_vendor.o$1((...args) => $options.contact && $options.contact(...args)),
|
||||
m: common_vendor.o$1((...args) => $options.serviceProtocol && $options.serviceProtocol(...args)),
|
||||
n: common_vendor.o$1((...args) => $options.logout && $options.logout(...args)),
|
||||
o: common_vendor.p({
|
||||
s: common_vendor.o$1((...args) => $options.contact && $options.contact(...args)),
|
||||
t: common_vendor.o$1((...args) => $options.serviceProtocol && $options.serviceProtocol(...args)),
|
||||
v: common_vendor.o$1((...args) => $options.logout && $options.logout(...args)),
|
||||
w: common_vendor.p({
|
||||
tabIndex: 4
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user