武田小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

150 lines
2.9 KiB

6 months ago
const _app = getApp<IAppOption>();
// pages/story/a.ts
Component({
/**
*
*/
6 months ago
properties: {
userInfo: Object,
DoctorTitleType: Object,
hospitalClassification: Object,
hospitalLevel: Object,
},
/**
*
*/
data: {
fold1: false,
foldHeight1: 10000,
fold2: false,
foldHeight2: 10000,
6 months ago
take: {},
case: {},
cooperateList: [],
inviteList: [],
},
6 months ago
lifetimes: {
attached() {
this.getTake();
this.getCase();
this.getCooperate();
this.getInvite();
},
},
/**
*
*/
methods: {
6 months ago
getHeight1() {
const query = wx.createSelectorQuery().in(this);
query.select("#fold1").boundingClientRect();
query.exec((res) => {
this.setData({
foldHeight1: res[0].height,
6 months ago
});
});
},
getHeight2() {
const query = wx.createSelectorQuery().in(this);
query.select("#fold2").boundingClientRect();
query.exec((res) => {
this.setData({
foldHeight2: res[1].height,
6 months ago
});
});
},
toggleFold1() {
this.setData({
fold1: !this.data.fold1,
6 months ago
});
},
toggleFold2() {
this.setData({
fold2: !this.data.fold2,
6 months ago
});
},
getTake() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/todo",
data: {},
}).then((res) => {
this.setData({
take: res,
});
});
},
getCase() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/case",
data: {},
}).then((res) => {
this.setData({
case: res,
});
});
},
getCooperate() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/cooperation-doctor-list",
data: {},
}).then((res) => {
this.setData({
cooperateList: res.list,
});
this.getHeight1();
});
},
getInvite() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/invite-doctor-list",
data: {},
}).then((res) => {
this.setData({
inviteList: res.list,
});
this.getHeight2();
});
},
handleInvite() {
wx.navigateTo({
url: "/module1/pages/invite/index",
});
},
handleEntryCase() {
wx.navigateTo({
url: "/module1/pages/entryCases/index",
});
},
5 months ago
handlePendCase() {
app.globalData.needDeal = "1";
wx.switchTab({
url: "/pages/cases/index",
});
},
handleCaseUpdate() {
wx.switchTab({
url: "/pages/cases/index",
});
},
handleChat() {
wx.switchTab({
url: "/pages/chatRoomList/index",
});
},
handleAudit() {
wx.navigateTo({
url: "/module1/pages/auditDoctorList/index",
});
},
},
6 months ago
});
export {};