优化页面
This commit is contained in:
@@ -83,11 +83,15 @@ export default {
|
||||
list: [], // 列表数据
|
||||
detailsdata: {}, //详情数据
|
||||
triggered: false, //下拉刷新标识
|
||||
RealTimePklist: [], // PK大厅列表数据
|
||||
MakeAppointmentPKlist: [], // 今日PK列表数据
|
||||
listtype: 1, // 列表类型 1 当天 2 大于当天
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// 页面加载完成后请求数据
|
||||
this.pkList();
|
||||
this.pkList({type:2});
|
||||
this.pkList({type:1});
|
||||
},
|
||||
onLoad() {
|
||||
uni.getStorage({
|
||||
@@ -104,13 +108,6 @@ export default {
|
||||
success: (res) => {
|
||||
this.chatInfo = res.data;
|
||||
TUIlogin(this.chatInfo.appId, this.info.id, this.myuserSig.userSig);
|
||||
// let options = {
|
||||
// SDKAppID: this.chatInfo.appId,
|
||||
// };
|
||||
// console.log("`````````````````````````````````````````", this.chatInfo);
|
||||
// let chat = TencentCloudChat.create(options);
|
||||
// console.log("chat````````````````````````````````````````", this.chat);
|
||||
// chat.login({ userID: String(this.info.id), userSig: this.myuserSig.userSig });
|
||||
},
|
||||
});
|
||||
},
|
||||
@@ -119,11 +116,13 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
goRealTimePk() {
|
||||
console.log("goRealTimePk");
|
||||
},
|
||||
goMakeAppointmentPK() {
|
||||
console.log("goMakeAppointmentPK");
|
||||
this.listtype = 1;
|
||||
this.list = this.MakeAppointmentPKlist;
|
||||
},
|
||||
goRealTimePk() {
|
||||
this.listtype = 2;
|
||||
this.list = this.RealTimePklist;
|
||||
},
|
||||
goAdvertisement() {
|
||||
// this.$global.lastPage = getCurrentPages().router;
|
||||
@@ -132,8 +131,13 @@ export default {
|
||||
onRefresherRefresh() {
|
||||
this.page = 0;
|
||||
this.list = [];
|
||||
if(this.listtype === 1){
|
||||
this.MakeAppointmentPKlist = [];
|
||||
}else{
|
||||
this.RealTimePklist = [];
|
||||
}
|
||||
this.triggered = true;
|
||||
this.pkList();
|
||||
this.pkList({type:this.listtype});
|
||||
},
|
||||
async goDetail(item) {
|
||||
uni.showLoading({
|
||||
@@ -177,7 +181,8 @@ export default {
|
||||
}
|
||||
},
|
||||
formatDate: formatDate,
|
||||
async pkList() {
|
||||
|
||||
async pkList(condition) {
|
||||
const res = await request({
|
||||
url: "pk/pkList",
|
||||
method: "POST",
|
||||
@@ -185,21 +190,27 @@ export default {
|
||||
status: 0,
|
||||
page: this.page,
|
||||
size: this.size,
|
||||
condition:condition
|
||||
},
|
||||
userInfo: false,
|
||||
});
|
||||
console.log(res);
|
||||
if (res.code === 200) {
|
||||
this.list.push(...res.data);
|
||||
console.log(this.list);
|
||||
this.triggered = false;
|
||||
if (condition.type === 1) {
|
||||
this.MakeAppointmentPKlist.push(...res.data);
|
||||
this.list = this.MakeAppointmentPKlist;
|
||||
} else {
|
||||
this.RealTimePklist.push(...res.data);
|
||||
this.list = this.RealTimePklist;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onScrollToLower() {
|
||||
this.page++;
|
||||
this.pkList();
|
||||
this.pkList({type:this.listtype});
|
||||
},
|
||||
},
|
||||
components: {
|
||||
topNavigation,
|
||||
Advertisement,
|
||||
|
||||
Reference in New Issue
Block a user