Browse Source

首页联调部分

main
kola-web 4 months ago
parent
commit
205ba36939
  1. 10
      dist.nu
  2. 48
      src/echart/components/homeLevel1/index.ts
  3. 25
      src/echart/components/homeLevel1/index.wxml
  4. 6
      src/module1/pages/userInfo/index.ts
  5. 19
      src/pages/home/index.ts
  6. 8
      src/pages/home/index.wxml
  7. 10
      src/pages/my/index.wxml

10
dist.nu

@ -1,5 +1,5 @@
cd ./src/images/ cd ./src/images/;
svn add . --no-ignore --force svn add . --no-ignore --force;
svn ci -m "版本更新" svn ci -m "版本更新";
cd .. cd ..;
cd .. cd ..;

48
src/echart/components/homeLevel1/index.ts

@ -1,11 +1,14 @@
const _app = getApp<IAppOption>() const _app = getApp<IAppOption>();
// pages/story/a.ts // pages/story/a.ts
Component({ Component({
/** /**
* *
*/ */
properties: {}, properties: {
userInfo: Object,
DoctorTitleType: Object,
},
/** /**
* *
@ -13,28 +16,55 @@ Component({
data: { data: {
fold1: false, fold1: false,
foldHeight1: 10000, foldHeight1: 10000,
take: {},
}, },
lifetimes: {
attached() { attached() {
this.getHeight() this.getHeight();
this.getTake();
this.getCase();
},
}, },
/** /**
* *
*/ */
methods: { methods: {
getHeight() { getHeight() {
const query = wx.createSelectorQuery().in(this) const query = wx.createSelectorQuery().in(this);
query.select('#fold1').boundingClientRect() query.select("#fold1").boundingClientRect();
query.exec((res) => { query.exec((res) => {
this.setData({ this.setData({
foldHeight1: res[0].height, foldHeight1: res[0].height,
}) });
}) });
}, },
toggleFold1() { toggleFold1() {
this.setData({ this.setData({
fold1: !this.data.fold1, fold1: !this.data.fold1,
}) });
},
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,
});
});
}, },
}, },
}) });

25
src/echart/components/homeLevel1/index.wxml

@ -1,34 +1,33 @@
<view class="page"> <view class="page">
<view class="user"> <view class="user">
<doctorAvatar <doctorAvatar class="avatar" src="{{userInfo.Img}}" level="{{userInfo.DoctorLevel}}"></doctorAvatar>
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="wrap"> <view class="wrap">
<view class="w-header"> <view class="w-header">
<view class="name">徐萌</view> <view class="name">{{userInfo.Name}}</view>
<view class="desc">主治医师</view> <view class="desc" wx:if="{{userInfo.TitleType === 99}}">{{userInfo.OtherTitle}}</view>
<view class="desc" wx:else>{{DoctorTitleType[userInfo.TitleType]}}</view>
</view> </view>
<view class="w-footer"> <view class="w-footer">
<view class="hostipal">北京天坛医院</view> <view class="hostipal">{{userInfo.HospitalName}}</view>
<view class="tag">三甲</view> <view class="tag">{{userInfo.HospitalClassificationName}}{{userInfo.HospitalLevelName}}</view>
<view class="site">广州市/番禺区</view> <view class="site" wx:if="{{userInfo.CityName}}">
{{userInfo.CityName}}{{userInfo.CountyName?'/':''}}{{userInfo.CountyName}}
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="banner"> <view class="banner">
<view class="title">待处理事项</view> <view class="title">待处理事项</view>
<view class="bg"> <view class="bg">
<view class="b-container" wx:if="{{true}}"> <view class="b-container" wx:if="{{take.notReadFeedBackCount>0 || take.notReadChatRoomCount>0}}">
<view class="item"> <view class="item">
<view class="name">病历更新</view> <view class="name">病历更新</view>
<view class="num">27</view> <view class="num">{{take.notReadFeedBackCount}}</view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="item"> <view class="item">
<view class="name">聊天室新消息</view> <view class="name">聊天室新消息</view>
<view class="num">1</view> <view class="num">{{take.notReadChatRoomCount}}</view>
</view> </view>
</view> </view>
<view class="b-container-none" wx:else>暂时没有需要处理的事项哦~</view> <view class="b-container-none" wx:else>暂时没有需要处理的事项哦~</view>

6
src/module1/pages/userInfo/index.ts

@ -13,8 +13,8 @@ Page({
Img: "", Img: "",
Name: "", Name: "",
DepartmentId: [], DepartmentId: [] as any,
SpecialtyId: [], SpecialtyId: [] as any,
Introduce: "", Introduce: "",
}, },
onShow() { onShow() {
@ -170,4 +170,4 @@ Page({
}, },
}); });
export {} export {};

19
src/pages/home/index.ts

@ -3,10 +3,13 @@ export {};
Page({ Page({
data: { data: {
level: 1, level: 0,
show1: false, show1: false,
bindDoctorName: "", bindDoctorName: "",
userInfo: {},
DoctorTitleType: {},
}, },
onLoad() { onLoad() {
this.getTabBar().setData({ this.getTabBar().setData({
@ -15,6 +18,9 @@ Page({
app.waitLogin().then(() => { app.waitLogin().then(() => {
this.handleBindDoctor(); this.handleBindDoctor();
app.getUserInfo(this, (userInfo) => { app.getUserInfo(this, (userInfo) => {
this.setData({
level: userInfo.DoctorLevel,
});
this.getTabBar().setData({ this.getTabBar().setData({
userInfo, userInfo,
}); });
@ -41,6 +47,17 @@ Page({
}); });
} }
}, },
getDoctorDict() {
wx.ajax({
method: "GET",
url: "?r=takeda/reg/doctor-dict",
data: {},
}).then((res) => {
this.setData({
DoctorTitleType: res.DoctorTitleType,
});
});
},
handleSure() { handleSure() {
this.setData({ this.setData({
show1: false, show1: false,

8
src/pages/home/index.wxml

@ -3,10 +3,10 @@
style="background: url({{imageUrl}}home-bg.png?r={{Timestamp}}) no-repeat top center/100% 560rpx;padding-top:{{menuButtonInfo.top}}px;" style="background: url({{imageUrl}}home-bg.png?r={{Timestamp}}) no-repeat top center/100% 560rpx;padding-top:{{menuButtonInfo.top}}px;"
> >
<image class="logo" src="{{imageUrl}}home-logo.png?t={{Timestamp}}"></image> <image class="logo" src="{{imageUrl}}home-logo.png?t={{Timestamp}}"></image>
<homeLevel1 wx:if="{{level===1}}"></homeLevel1> <homeLevel1 wx:if="{{level===1}}" DoctorTitleType="{{DoctorTitleType}}" userInfo="{{userInfo}}"></homeLevel1>
<homeLevel2 wx:elif="{{level===2}}"></homeLevel2> <homeLevel2 wx:elif="{{level===2}}" DoctorTitleType="{{DoctorTitleType}}" userInfo="{{userInfo}}"></homeLevel2>
<homeLevel3 wx:elif="{{level===3}}"></homeLevel3> <homeLevel3 wx:elif="{{level===3}}" DoctorTitleType="{{DoctorTitleType}}" userInfo="{{userInfo}}"></homeLevel3>
<homeLevel4 wx:elif="{{level===4}}"></homeLevel4> <homeLevel4 wx:elif="{{level===4}}" DoctorTitleType="{{DoctorTitleType}}" userInfo="{{userInfo}}"></homeLevel4>
</view> </view>
<van-popup show="{{ show1 }}" bind:close="onClose" round custom-style="background:transparent"> <van-popup show="{{ show1 }}" bind:close="onClose" round custom-style="background:transparent">

10
src/pages/my/index.wxml

@ -19,7 +19,9 @@
<view class="w-container"> <view class="w-container">
<view class="hostipal">{{userInfo.HospitalName}}</view> <view class="hostipal">{{userInfo.HospitalName}}</view>
<view class="tag">{{userInfo.HospitalClassificationName}}{{userInfo.HospitalName}}</view> <view class="tag">{{userInfo.HospitalClassificationName}}{{userInfo.HospitalName}}</view>
<view class="site" wx:if="{{userInfo.CityName}}">{{userInfo.CityName}}{{userInfo.CountyName?'/':''}}{{userInfo.CountyName}}</view> <view class="site" wx:if="{{userInfo.CityName}}">
{{userInfo.CityName}}{{userInfo.CountyName?'/':''}}{{userInfo.CountyName}}
</view>
</view> </view>
<view class="w-footer" wx:if="{{userInfo.Specialty.length}}"> <view class="w-footer" wx:if="{{userInfo.Specialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image> <image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
@ -27,7 +29,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="invite" wx:if="{{userInfo.DoctorLevel>1}}"> <view class="invite" wx:if="{{userInfo.DoctorLevel>1}}" bind:tap="handleInvite">
<image class="code" src="{{imageUrl}}icon-code.png?t={{Timestamp}}"></image> <image class="code" src="{{imageUrl}}icon-code.png?t={{Timestamp}}"></image>
<view class="wrap"> <view class="wrap">
<view class="title">我的专属邀约码</view> <view class="title">我的专属邀约码</view>
@ -36,8 +38,8 @@
<view class="btn">邀约</view> <view class="btn">邀约</view>
</view> </view>
<view class="list"> <view class="list">
<view class="list-item"> <view class="list-item" bind:tap="handleUserInfo">
<view class="label" bind:tap="handleUserInfo"> <view class="label">
<image class="icon" src="{{imageUrl}}my-list-icon1.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}my-list-icon1.png?t={{Timestamp}}"></image>
个人信息 个人信息
</view> </view>

Loading…
Cancel
Save