Browse Source

患者端联调

master
kola-web 2 days ago
parent
commit
798f2cde34
  1. 5
      src/app.ts
  2. 2
      src/pages/index/index.scss
  3. 1
      src/pages/interactivePatient/index.scss
  4. 2
      src/pages/myLive/index.json
  5. 280
      src/pages/myLive/index.scss
  6. 4
      src/pages/myLive/index.ts
  7. 155
      src/pages/myLive/index.wxml
  8. 2
      src/pages/mySave/index.wxml
  9. 16
      src/pages/repository/index.ts

5
src/app.ts

@ -361,7 +361,8 @@ App<IAppOption>({
self?.setData({ self?.setData({
userInfo: res, userInfo: res,
}) })
const { doctorId, inviteChan, recDoctorId: recommendDoctorId } = this.globalData.scene // this.globalData.scene.doctorId = 3
const { doctorId, recDoctorId: recommendDoctorId } = this.globalData.scene
if ( if (
doctorId && doctorId &&
res.InviteDoctorId != doctorId && res.InviteDoctorId != doctorId &&
@ -374,7 +375,7 @@ App<IAppOption>({
url: '?r=igg4/account/update-doctor', url: '?r=igg4/account/update-doctor',
data: { data: {
inviteDoctorId: doctorId, inviteDoctorId: doctorId,
inviteChannel: inviteChan, inviteChannel: 1,
}, },
}) })
} }

2
src/pages/index/index.scss

@ -275,7 +275,7 @@ page {
} }
} }
.book { .book {
margin: $page-margin; margin: 8rpx $page-margin 0;
.swiper { .swiper {
margin: 0 -40rpx; margin: 0 -40rpx;
height: 700rpx; height: 700rpx;

1
src/pages/interactivePatient/index.scss

@ -2,6 +2,7 @@ page {
background-color: rgba(242, 244, 245, 1); background-color: rgba(242, 244, 245, 1);
} }
.page { .page {
padding-top: 40rpx;
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
display: flex; display: flex;

2
src/pages/myLive/index.json

@ -1,8 +1,6 @@
{ {
"navigationBarTitleText": "我报名的活动", "navigationBarTitleText": "我报名的活动",
"usingComponents": { "usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-icon": "@vant/weapp/icon/index" "van-icon": "@vant/weapp/icon/index"
} }
} }

280
src/pages/myLive/index.scss

@ -1,5 +1,9 @@
.page { .page {
overflow: hidden;
padding-bottom: 120rpx; padding-bottom: 120rpx;
min-height: 100vh;
background-color: #f7f7f7;
position: relative;
.sticky { .sticky {
position: sticky; position: sticky;
top: 0; top: 0;
@ -17,11 +21,10 @@
color: #484848; color: #484848;
} }
} }
.info-list {
.allin-list { padding: 32rpx 30rpx;
margin: 32rpx 30rpx; .list-item {
.on-list-item { margin-bottom: 32rpx;
margin-bottom: 20rpx;
background: #ffffff; background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05); box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx; border-radius: 24rpx;
@ -33,57 +36,29 @@
border-radius: 24rpx 24rpx 0 0; border-radius: 24rpx 24rpx 0 0;
display: block; display: block;
width: 100%; width: 100%;
height: 388rpx; height: 344rpx;
} }
.status { .status {
padding: 6rpx 32rpx; padding: 8rpx 20rpx;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; right: 0;
display: flex; display: flex;
align-items: center; align-items: center;
background: linear-gradient(90deg, #e5e9f5 0%, #fde4ec 100%); background: linear-gradient(270deg, #ffd454 0%, #ffa851 100%);
border-radius: 24rpx 0rpx 24rpx 0rpx; border-radius: 0 24rpx 0 24rpx;
font-size: 28rpx; font-size: 24rpx;
color: #e04775; color: rgba(255, 255, 255, 1);
.dot { .dot {
margin-right: 8rpx; margin-right: 8rpx;
width: 13rpx; width: 13rpx;
height: 13rpx; height: 13rpx;
border-radius: 50%; border-radius: 50%;
background-color: #e04775; background-color: #fff;
}
&.bad {
color: #484848;
background: #e6e6e6;
.dot {
display: none;
}
}
}
.date {
padding: 18rpx 18rpx 8rpx;
position: absolute;
left: 40rpx;
bottom: 0;
background: #e04775;
border-radius: 11rpx 11rpx 0rpx 0rpx;
text-align: center;
.d-title {
font-size: 22rpx;
color: #ffffff;
font-weight: bold;
}
.ymd {
font-size: 18rpx;
color: #fff;
line-height: 28rpx;
border-bottom: 2rpx solid rgba(255, 255, 255, 0.34);
} }
.hm { &.unsigned {
font-size: 18rpx; color: rgba(34, 34, 34, 0.5);
color: #fff; background: rgba(246, 246, 246, 1);
line-height: 28rpx;
} }
} }
} }
@ -91,220 +66,49 @@
padding: 32rpx 34rpx; padding: 32rpx 34rpx;
background-color: #fff; background-color: #fff;
border-radius: 0 0 24rpx 24rpx; border-radius: 0 0 24rpx 24rpx;
.tag {
margin-bottom: 16rpx;
width: 112rpx;
height: 36rpx;
font-size: 22rpx;
color: #ffffff;
line-height: 36rpx;
text-align: center;
background: #ffc137;
border-radius: 8rpx;
}
.title { .title {
font-size: 32rpx; font-size: 36rpx;
color: #252525; color: #222222;
font-weight: bold; font-weight: bold;
.t-tag {
display: inline-block;
width: 112rpx;
height: 36rpx;
font-size: 22rpx;
color: #ffffff;
line-height: 36rpx;
text-align: center;
background: #e04775;
border-radius: 8rpx;
margin-right: 1em;
}
}
.content {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
.labels {
display: flex;
align-items: center;
flex-wrap: wrap;
.label {
margin-right: 16rpx;
margin-bottom: 16rpx;
padding: 2rpx 20rpx;
font-size: 22rpx;
color: #e04775;
border-radius: 18rpx;
background-color: rgba(224, 71, 117, 0.13);
word-break: break-all;
}
}
.people {
color: #9e9e9e;
font-size: 22rpx;
} }
.site {
margin-top: 16rpx;
font-size: 32rpx;
color: rgba(34, 34, 34, 0.7);
} }
.footer { .footer {
margin-top: 32rpx; margin-top: 32rpx;
padding-top: 24rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.site { border-top: 1px solid rgba(0, 0, 0, 0.04);
font-size: 22rpx;
color: #bebebe;
}
.btn {
margin-left: 10rpx;
flex-shrink: 0;
padding: 4rpx 36rpx;
font-size: 28rpx;
color: #ffffff;
background: #e04775;
border-radius: 24rpx;
&.active {
color: #484848;
background-color: #e7e7e7;
}
.icon {
width: 24rpx;
height: 24rpx;
}
}
}
}
}
.off-list-item {
margin-bottom: 20rpx;
background: #ffffff;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx;
border: 2rpx solid #ebecee;
.photo-wrap {
position: relative;
.photo {
border-radius: 24rpx 24rpx 0 0;
display: block;
width: 100%;
height: 388rpx;
}
.status {
padding: 6rpx 32rpx;
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
background: linear-gradient(90deg, #e5e9f5 0%, #fde4ec 100%);
border-radius: 24rpx 0rpx 24rpx 0rpx;
font-size: 28rpx;
color: #e04775;
.dot {
margin-right: 8rpx;
width: 13rpx;
height: 13rpx;
border-radius: 50%;
background-color: #e04775;
}
&.bad {
color: #484848;
background: #e6e6e6;
.dot {
display: none;
}
}
}
.date {
padding: 18rpx 18rpx 8rpx;
position: absolute;
left: 40rpx;
bottom: 0;
background: #e04775;
border-radius: 11rpx 11rpx 0rpx 0rpx;
text-align: center;
.d-title {
font-size: 22rpx;
color: #ffffff;
font-weight: bold;
}
.ymd {
font-size: 18rpx;
color: #fff;
line-height: 28rpx;
border-bottom: 2rpx solid rgba(255, 255, 255, 0.34);
}
.hm {
font-size: 18rpx;
color: #fff;
line-height: 28rpx;
}
}
}
.inner {
padding: 32rpx 34rpx;
background-color: #fff;
border-radius: 0 0 24rpx 24rpx;
.tag {
margin-bottom: 16rpx;
width: 112rpx;
height: 36rpx;
font-size: 22rpx;
color: #ffffff;
line-height: 36rpx;
text-align: center;
background: #ffc137;
border-radius: 8rpx;
}
.title {
font-size: 32rpx;
color: #252525;
font-weight: bold;
}
.content { .content {
margin-top: 20rpx; margin-top: 20rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: flex-start;
.labels {
display: flex;
align-items: center;
flex-wrap: wrap;
.label {
margin-right: 16rpx;
margin-bottom: 16rpx;
padding: 2rpx 20rpx;
font-size: 22rpx;
color: #e04775;
border-radius: 18rpx;
background-color: rgba(224, 71, 117, 0.13);
word-break: break-all;
}
}
.people { .people {
color: #9e9e9e; flex-shrink: 0;
font-size: 22rpx; color: rgba(34, 34, 34, 0.3);
} font-size: 32rpx;
} }
.footer {
margin-top: 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
.site {
font-size: 22rpx;
color: #bebebe;
} }
.btn { .btn {
margin-left: 10rpx; margin-left: 10rpx;
flex-shrink: 0; flex-shrink: 0;
padding: 4rpx 36rpx; padding: 10rpx 46rpx;
font-size: 28rpx; font-size: 36rpx;
color: #ffffff; color: #ffffff;
background: #e04775; background: linear-gradient(94deg, #0eb66d 0%, #00d277 100%);
border-radius: 24rpx; border-radius: 66rpx;
&.active { &.signed {
color: #484848; color: rgba(14, 182, 109, 1);
background-color: #e7e7e7; background: rgba(205, 248, 229, 1);
}
&.ended {
color: rgba(34, 34, 34, 0.7);
background: rgba(246, 246, 246, 1);
} }
.icon { .icon {
width: 24rpx; width: 24rpx;

4
src/pages/myLive/index.ts

@ -13,9 +13,7 @@ Page({
}, },
online_open_status: 1, // 线上 online_open_status: 1, // 线上
offline_open_status: 1, // 线下 offline_open_status: 1, // 线下
liveStatus: app.globalData.liveStatus, dateValue: 0,
activityStatus: app.globalData.activityStatus,
userInfo: {},
}, },
onLoad() { onLoad() {
this.setData({ this.setData({

155
src/pages/myLive/index.wxml

@ -1,158 +1,27 @@
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> <view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<view class="sticky"> <view class="info-list">
<van-tabs <view class="list-item" wx:for="{{list}}" wx:key="Id" bind:tap="handleDetail" data-id="{{item.Id}}">
wx:if="{{online_open_status==1 && offline_open_status==1}}"
class="navbar"
active="{{ active }}"
bind:change="tabChange"
title-inactive-color="#9E9E9E"
title-active-color="#484848"
line-width="{{17}}"
line-height="{{4}}"
color="#E04775"
tab-class="tab"
tab-active-class="tab-active"
>
<van-tab title="全部"></van-tab>
<van-tab title="线上活动"></van-tab>
<van-tab title="线下活动"></van-tab>
</van-tabs>
</view>
<view class="allin-list">
<block wx:for="{{list}}" wx:key="Id">
<view class="on-list-item" wx:if="{{item.Type==1}}" bind:tap="handleDetail" data-id="{{item.Id}}">
<view class="photo-wrap"> <view class="photo-wrap">
<image class="photo" mode="aspectFill" src="{{item.IntroductionUrl}}"></image> <image class="photo" mode="aspectFill" src="{{item.IntroductionUrl}}"></image>
<view class="status {{item.Status != 2 && 'bad'}}"> <view class="status {{item.IsSignUp != 1 && 'unsigned'}}">
<view class="dot"></view> <view class="dot" wx:if="{{item.IsSignUp==1}}"></view>
{{liveStatus[item.Status]}} {{item.IsSignUp==1 ? '已报名' : '未报名'}}
</view> </view>
<!-- <view class="date"> -->
<!-- <view class="d-title"> -->
<!-- <van-icon class="icon" name="play" /> -->
<!-- 会议时间 -->
<!-- </view> -->
<!-- <block wx:if="{{item.isDay}}"> -->
<!-- <view class="ymd">{{item.BeginDate}}</view> -->
<!-- <view class="hm">{{item.BeginHm}}-{{item.EndHm}}</view> -->
<!-- </block> -->
<!-- <block wx:else> -->
<!-- <view class="ymd">{{item.BeginTime}}</view> -->
<!-- <view class="hm">{{item.EndTime}}</view> -->
<!-- </block> -->
<!-- </view> -->
</view> </view>
<view class="inner"> <view class="inner">
<view class="tag" wx:if="{{active==0}}">线上活动</view>
<view class="title">{{item.Name}}</view> <view class="title">{{item.Name}}</view>
<view class="content">
<view class="labels">
<view class="label" wx:for="{{item.Labels}}" wx:for-item="label" wx:key="index">{{label}}</view>
</view>
<view class="people" wx:if="{{~~item.SignUpPeopleNum}}">{{item.SignUpPeopleNum}}人已报名</view>
</view>
<view class="footer">
<view class="site">{{item.MasterName}} {{item.MasterTitle}}</view> <view class="site">{{item.MasterName}} {{item.MasterTitle}}</view>
<view class="btn active" wx:if="{{ item.Status==99}}">已取消</view>
<view class="btn active" wx:elif="{{ item.Status==100}}">已删除</view>
<view class="btn" wx:elif="{{item.Status==3 && item.ReplayVideoUrl}}">看回放</view>
<view class="btn active" wx:elif="{{item.Status==3 && !item.ReplayVideoUrl}}">回放生成中</view>
<block wx:elif="{{item.IsSignUp==1}}">
<view class="btn active" wx:if="{{item.SignUpStatus==1}}">审核中</view>
<block wx:elif="{{item.SignUpStatus==2}}">
<view class="btn" wx:if="{{item.BeginTimeValue * 1 < dateValue * 1}}">参会</view>
<view class="btn active" wx:else>已报名</view>
</block>
<block wx:elif="{{item.SignUpStatus==3}}">
<view
class="btn active"
wx:if="{{item.IsLimitUser==1 && item.SignUpPeopleNum * 1 >= item.LimitPeopleNum * 1}}"
>
已满额
</view>
</block>
</block>
<block wx:else>
<view
class="btn active"
wx:if="{{item.IsLimitUser==1 && item.SignUpPeopleNum * 1 >= item.LimitPeopleNum * 1}}"
>
已满额
</view>
<view class="btn active" wx:elif="{{item.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view>
<view class="btn" wx:else>报名</view>
</block>
</view>
</view>
</view>
<view class="off-list-item" wx:elif="{{item.Type==2}}" bind:tap="handleDetail" data-id="{{item.Id}}">
<view class="photo-wrap">
<image class="photo" mode="aspectFill" src="{{item.IntroductionUrl}}"></image>
<view class="status {{item.Status != 2 && 'bad'}}">
<view class="dot"></view>
{{activityStatus[item.Status]}}
</view>
<!-- <view class="date"> -->
<!-- <view class="d-title"> -->
<!-- <van-icon name="play" /> -->
<!-- 活动时间 -->
<!-- </view> -->
<!-- <block wx:if="{{item.isDay}}"> -->
<!-- <view class="ymd">{{item.BeginDate}}</view> -->
<!-- <view class="hm">{{item.BeginHm}}-{{item.EndHm}}</view> -->
<!-- </block> -->
<!-- <block wx:else> -->
<!-- <view class="ymd">{{item.BeginTime}}</view> -->
<!-- <view class="hm">{{item.EndTime}}</view> -->
<!-- </block> -->
<!-- </view> -->
</view>
<view class="inner">
<view class="tag" wx:if="{{active==0}}">线下活动</view>
<view class="title">{{item.Name}}</view>
<view class="content">
<view class="labels">
<view class="label" wx:for="{{item.Labels}}" wx:for-item="label" wx:key="index">{{label}}</view>
</view>
<view class="people" wx:if="{{~~item.SignUpPeopleNum}}">{{item.SignUpPeopleNum}}人已报名</view>
</view>
<view class="footer"> <view class="footer">
<view class="site"> <view class="content">
<view>{{item.Location}}</view> <view class="people" wx:if="{{item.SignUpPeopleNum * 1}}">{{item.SignUpPeopleNum}}人已报名</view>
<view>{{item.Distance}}</view>
</view>
<view class="btn active" wx:if="{{ item.Status==3}}">已结束</view>
<view class="btn active" wx:elif="{{ item.Status==99}}">已取消</view>
<view class="btn active" wx:elif="{{ item.Status==100}}">已删除</view>
<block wx:elif="{{item.IsSignUp==1}}">
<view class="btn active" wx:if="{{item.SignUpStatus==1}}">审核中</view>
<block wx:elif="{{item.SignUpStatus==2}}">
<view class="btn" wx:if="{{item.BeginTimeValue * 1 < dateValue * 1}}">已报名</view>
<view class="btn active" wx:else>已报名</view>
</block>
<block wx:elif="{{item.SignUpStatus==3}}">
<view
class="btn active"
wx:if="{{item.IsLimitUser==1 && item.SignUpPeopleNum * 1 >= item.LimitPeopleNum * 1}}"
>
已满额
</view>
</block>
</block>
<block wx:else>
<view
class="btn active"
wx:if="{{item.IsLimitUser==1 && item.SignUpPeopleNum * 1 >= item.LimitPeopleNum * 1}}"
>
已满额
</view> </view>
<view class="btn active" wx:elif="{{item.SignUpDeadlineValue * 1 < dateValue * 1}}">报名已截止</view> <view class="btn ended" wx:if="{{item.Status==3 || item.Status==99 || item.Status==100}}">已结束</view>
<view class="btn" wx:else>报名</view> <view class="btn" wx:elif="{{item.IsSignUp==1 && item.BeginTimeValue * 1 <= dateValue * 1}}">立即参与</view>
</block> <view class="btn signed" wx:elif="{{item.IsSignUp==1}}">已报名</view>
<view class="btn" wx:else>立即报名</view>
</view> </view>
</view> </view>
</view> </view>
</block>
</view> </view>
<pagination pagination="{{pagination}}"></pagination> <pagination pagination="{{pagination}}"></pagination>
</view> </view>

2
src/pages/mySave/index.wxml

@ -1,4 +1,4 @@
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> <view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<view class="info-list" wx:if="{{list.length}}"> <view class="info-list" wx:if="{{list.length}}">
<view <view
class="list-item" class="list-item"

16
src/pages/repository/index.ts

@ -88,15 +88,21 @@ Page({
url: '?r=igg4/pic-text/cate-list', url: '?r=igg4/pic-text/cate-list',
data: {}, data: {},
}).then((res) => { }).then((res) => {
const storyCate = res.find((item: any) => item.CateName === '患者故事')
const storyCateId = storyCate ? storyCate.CateId : ''
const infoCateList = res.filter((item: any) => item.CateName !== '患者故事') const infoCateList = res.filter((item: any) => item.CateName !== '患者故事')
this.setData({ this.setData({
infoCateList, infoCateList,
storyCateId,
}) })
if (this.data.active == 1 && storyCateId) { })
this.setData({ CateId: storyCateId }) wx.ajax({
method: 'GET',
url: '?r=igg4/pic-text/story-cate-id',
data: {},
}).then((res) => {
this.setData({
storyCateId: res,
})
if (this.data.active == 1 && res) {
this.setData({ CateId: res })
} }
this.getList() this.getList()
}) })

Loading…
Cancel
Save