Browse Source

2.0bug处理

2.0
kola-web 2 weeks ago
parent
commit
34eefab0bb
  1. 34
      src/app.ts
  2. 1
      src/components/popup/index.scss
  3. 17
      src/components/popup/index.wxml
  4. 2
      src/components/popupDoctor/index.scss
  5. 2
      src/doctor/pages/changeTel/index.wxml
  6. 2
      src/doctor/pages/login/index.ts
  7. 2
      src/doctor/pages/my/index.ts
  8. BIN
      src/images/icon22.png
  9. 6
      src/pages/applyFrom/index.wxml
  10. 2
      src/pages/my/index.ts
  11. 6
      src/pages/start/index.ts
  12. 6
      src/patient/pages/askPatient/index.scss
  13. 19
      src/patient/pages/askPatient/index.ts
  14. 2
      src/patient/pages/askPatient/index.wxml
  15. 4
      src/patient/pages/bindDoctor/index.ts
  16. 2
      src/patient/pages/changeTel/index.wxml
  17. 7
      src/patient/pages/doctorList/index.ts
  18. 2
      src/patient/pages/doctorList/index.wxml
  19. 3
      src/patient/pages/entryInfo/index.json
  20. 3
      src/patient/pages/entryInfo/index.ts
  21. 11
      src/patient/pages/entryInfo/index.wxml
  22. 3
      src/patient/pages/family/index.scss
  23. 2
      src/patient/pages/familyList/index.scss
  24. 2
      src/patient/pages/familyList/index.ts
  25. 6
      src/patient/pages/familyList/index.wxml
  26. 14
      src/patient/pages/familyScan/index.ts
  27. 4
      src/patient/pages/familyScan/index.wxml
  28. 9
      src/patient/pages/index/index.scss
  29. 10
      src/patient/pages/index/index.ts
  30. 13
      src/patient/pages/index/index.wxml
  31. 4
      src/patient/pages/login/index.json
  32. 5
      src/patient/pages/login/index.scss
  33. 17
      src/patient/pages/login/index.ts
  34. 18
      src/patient/pages/login/index.wxml
  35. 2
      src/patient/pages/my/index.ts
  36. 12
      src/patient/pages/my/index.wxml
  37. 9
      src/patient/pages/userInfo/index.ts
  38. 2
      typings/index.d.ts

34
src/app.ts

@ -115,20 +115,30 @@ App<IAppOption>({ @@ -115,20 +115,30 @@ App<IAppOption>({
})
},
checkLoginType(type: 0 | 1 | 2) {
const { loginType, isLogin } = this.globalData.initLoginInfo
if (!isLogin) {
const { loginType, isLogin, isReg } = this.globalData.initLoginInfo
if (type === 0) {
return true
} else {
}
if (isLogin !== 1) {
wx.reLaunch({
url: '/pages/index/index',
})
}
return false
}
if (loginType === type) {
return true
if (isReg !== 1) {
const typePageUrl = {
1: '/patient/pages/entryInfo/index',
2: '/doctor/pages/login/index',
}[loginType as 1 | 2]
wx.reLaunch({
url: typePageUrl,
})
return false
}
if (loginType !== type) {
const typePageUrl = {
1: '/patient/pages/index/index',
2: '/doctor/pages/index/index',
@ -136,7 +146,9 @@ App<IAppOption>({ @@ -136,7 +146,9 @@ App<IAppOption>({
wx.reLaunch({
url: typePageUrl,
})
return false
}
return true
},
mpBehavior(data: { PageName: string }) {
wx.ajax({
@ -150,11 +162,11 @@ App<IAppOption>({ @@ -150,11 +162,11 @@ App<IAppOption>({
})
},
getUserInfo(type: 1 | 2 | 3 = 1) {
getUserInfo(type: 0 | 1 | 2 = 0) {
const url = {
1: '?r=wtx/user/userinfo',
2: '?r=wtx/account/info',
3: '?r=wtx/doctor/account/info',
0: '?r=wtx/user/userinfo',
1: '?r=wtx/account/info',
2: '?r=wtx/doctor/account/info',
}[type]
return wx.ajax({
method: 'GET',

1
src/components/popup/index.scss

@ -898,6 +898,7 @@ @@ -898,6 +898,7 @@
color: rgba(161, 164, 172, 1);
}
.tag {
vertical-align: 2rpx;
display: inline-block;
font-size: 20rpx;
color: rgba(255, 255, 255, 1);

17
src/components/popup/index.wxml

@ -235,7 +235,7 @@ @@ -235,7 +235,7 @@
</view>
<view class="footer">
<view class="cancel" bind:tap="handleCancel">取消</view>
<view class="submit" bind:tap="handleOk">提交</view>
<view class="submit" bind:tap="handleOk">确定</view>
</view>
</view>
</view>
@ -256,15 +256,12 @@ @@ -256,15 +256,12 @@
<view class="container">
<image class="title" src="{{imageUrl}}title10.png?t={{Timestamp}}"></image>
<view class="card">
<image
class="avatar"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
<image class="avatar" src="{{params.avatar}}"></image>
<view class="wrap">
<view class="name">王青</view>
<view class="name">{{params.name}}</view>
<view class="hostipal">
<view class="content">北京积水潭医院龙泽院区</view>
<view class="tag">三甲</view>
<view class="content">{{params.hostipal}}</view>
<view class="tag">{{params.className}}{{params.levelName}}</view>
</view>
</view>
</view>
@ -296,8 +293,8 @@ @@ -296,8 +293,8 @@
</view>
</view>
<view class="footer">
<view class="cancel">取消</view>
<view class="submit">确定</view>
<view class="cancel" bind:tap="handleCancel">取消</view>
<view class="submit" bind:tap="handleOk">确定</view>
</view>
</view>
</view>

2
src/components/popupDoctor/index.scss

@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
.col {
.content {
margin-right: 8rpx;
display: inline-block;
display: inline;
font-size: 32rpx;
color: rgba(1, 1, 5, 1);
max-height: 30vh;

2
src/doctor/pages/changeTel/index.wxml

@ -26,5 +26,5 @@ @@ -26,5 +26,5 @@
</view>
</view>
</view>
<view class="login-out">提交</view>
<view class="login-out" bind:tap="handleSubmit">提交</view>
</view>

2
src/doctor/pages/login/index.ts

@ -100,7 +100,7 @@ Page({ @@ -100,7 +100,7 @@ Page({
}
},
submitCallback() {
app.getUserInfo(3).then(() => {
app.getUserInfo(2).then(() => {
wx.reLaunch({
url: `/doctor/pages/index/index`,
})

2
src/doctor/pages/my/index.ts

@ -11,7 +11,7 @@ Page({ @@ -11,7 +11,7 @@ Page({
},
onLoad() {
app.waitLogin().then(() => {
app.getUserInfo(3).then((userInfo) => {
app.getUserInfo(2).then((userInfo) => {
this.setData({
userInfo,
// 数字变红

BIN
src/images/icon22.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

6
src/pages/applyFrom/index.wxml

@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
class="input"
placeholder-class="place-input"
type="text"
placeholder="如何称呼您"
placeholder="如何称呼{{Relation == 1 ? '的' : '患者'}}"
/>
</view>
</view>
@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
<picker mode="date" model:value="{{BirthMonth}}" fields="month">
<view class="picker">
<view class="picker-content">
<view class="picker-text" data-place="请选择您的出生月">{{BirthMonth}}</view>
<view class="picker-text" data-place="请选择{{Relation == 1 ? '的' : '患者'}}的出生月">{{BirthMonth}}</view>
<van-icon name="arrow-down" color="rgba(51,51,51,0.73)" />
</view>
</view>
@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
<view class="picker">
<view class="picker-content">
<!-- prettier-ignore -->
<view class="picker-text" data-place="请选择您的所在地区">{{ProvinceName ? ProvinceName+ '/' : ProvinceName }}{{CityName}}</view>
<view class="picker-text" data-place="请选择{{Relation == 1 ? '的' : '患者'}}的所在地区">{{ProvinceName ? ProvinceName+ '/' : ProvinceName }}{{CityName}}</view>
<van-icon name="arrow-down" color="rgba(51,51,51,0.73)" />
</view>
</view>

2
src/pages/my/index.ts

@ -8,7 +8,7 @@ Page({ @@ -8,7 +8,7 @@ Page({
showPatient: false,
},
onLoad() {
onShow() {
app.waitLogin().then(() => {
app.mpBehavior({ PageName: 'BTN_MY_NAV' })
app.getUserInfo().then((userInfo) => {

6
src/pages/start/index.ts

@ -16,9 +16,15 @@ Page({ @@ -16,9 +16,15 @@ Page({
})
}
if (initLoginInfo.loginType === 1) {
if (initLoginInfo.isReg === 1) {
wx.reLaunch({
url: '/patient/pages/index/index',
})
return
}
wx.reLaunch({
url: '/patient/pages/entryInfo/login',
})
}
if (initLoginInfo.loginType === 2) {
wx.reLaunch({

6
src/patient/pages/askPatient/index.scss

@ -45,14 +45,20 @@ page { @@ -45,14 +45,20 @@ page {
}
.name {
margin: -20rpx auto 0;
padding: 0 0.5em;
width: 116rpx;
height: 36rpx;
line-height: 36rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, 1);
text-align: center;
box-sizing: border-box;
background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%);
border-radius: 35rpx 35rpx 35rpx 35rpx;
max-width: 5em;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}

19
src/patient/pages/askPatient/index.ts

@ -56,7 +56,7 @@ Page({ @@ -56,7 +56,7 @@ Page({
userInfo: {},
},
onLoad() {
app.waitLogin().then(() => {
app.waitLogin({ type: 1 }).then(() => {
app.mpBehavior({ PageName: 'PG_FAQ' })
app.getUserInfo().then((userInfo) => {
this.setData({
@ -68,6 +68,11 @@ Page({ @@ -68,6 +68,11 @@ Page({
this.getMessageList()
})
},
onShow() {
if (app.globalData.loginState) {
this.getBindDoctorList()
}
},
getBindDoctorList() {
wx.ajax({
method: 'GET',
@ -266,6 +271,13 @@ Page({ @@ -266,6 +271,13 @@ Page({
messageList,
})
},
handleSendDate() {
this.setData({
popupShow: true,
popupType: 'selectDoctor',
popupParams: {},
})
},
handleQuestionTab(e) {
const { index } = e.currentTarget.dataset
this.setData({
@ -288,6 +300,11 @@ Page({ @@ -288,6 +300,11 @@ Page({
url: '/patient/pages/doctorList/index',
})
},
handlePopupCancel() {
this.setData({
popupShow: false,
})
},
handleBack() {
wx.navigateBack()
},

2
src/patient/pages/askPatient/index.wxml

@ -124,7 +124,7 @@ @@ -124,7 +124,7 @@
<image class="icon" src="{{imageUrl}}icon11.png?t={{Timestamp}}"></image>
我要提问
</view>
<view class="title">
<view class="title" catch:tap="handleSendDate">
<image class="icon" src="{{imageUrl}}icon86.png?t={{Timestamp}}"></image>
出诊时间
</view>

4
src/patient/pages/bindDoctor/index.ts

@ -73,6 +73,10 @@ Page({ @@ -73,6 +73,10 @@ Page({
})
},
handlePopupOk() {
const { popupType } = this.data
if (popupType === 'bindDoctor') {
wx.navigateBack()
}
this.handlePopupCancel()
},
handlePopupCancel() {

2
src/patient/pages/changeTel/index.wxml

@ -26,5 +26,5 @@ @@ -26,5 +26,5 @@
</view>
</view>
</view>
<view class="login-out">提交</view>
<view class="login-out" bind:tap="handleSubmit">提交</view>
</view>

7
src/patient/pages/doctorList/index.ts

@ -3,6 +3,12 @@ const app = getApp<IAppOption>() @@ -3,6 +3,12 @@ const app = getApp<IAppOption>()
Page({
data: {
doctorList: [],
pagination: {
page: 1,
pages: 1,
count: 1,
},
},
onShow() {
app.waitLogin({ type: 1 }).then(() => {
@ -17,6 +23,7 @@ Page({ @@ -17,6 +23,7 @@ Page({
}).then((res) => {
this.setData({
doctorList: res,
['pagination.count']: res.length,
})
})
},

2
src/patient/pages/doctorList/index.wxml

@ -20,5 +20,7 @@ @@ -20,5 +20,7 @@
<view class="content">{{item.introduce}}</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
<image class="add" src="{{imageUrl}}icon53.png?t={{Timestamp}}" bind:tap="handleAdd"></image>
</view>

3
src/patient/pages/entryInfo/index.json

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
{
"navigationStyle": "custom",
"usingComponents": {
"pickerArea": "/components/pickerArea/index"
"pickerArea": "/components/pickerArea/index",
"navbar": "/components/navbar/index"
}
}

3
src/patient/pages/entryInfo/index.ts

@ -95,6 +95,9 @@ Page({ @@ -95,6 +95,9 @@ Page({
})
})
},
handleBack() {
wx.navigateBack()
},
})
export {}

11
src/patient/pages/entryInfo/index.wxml

@ -1,3 +1,6 @@ @@ -1,3 +1,6 @@
<navbar fixed title="" custom-style="background:{{background}}" back>
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<view
class="page"
style="padding-top: {{pageTop + 60}}px;background:url('{{imageUrl}}bg1.png?t={{Timestamp}}') no-repeat top center/100% 976rpx;"
@ -25,14 +28,14 @@ @@ -25,14 +28,14 @@
model:value="{{name}}"
placeholder-class="place-input"
type="text"
placeholder="请输入您的姓名"
placeholder="请输入{{relationType == 1 ? '' : '亲友'}}的姓名"
/>
</view>
</view>
<view class="form-row">
<picker mode="date" model:value="{{birthMonth}}" fields="month">
<view class="picker-content">
<view class="value" data-place="请选择您的出生年月">{{birthMonth}}</view>
<view class="value" data-place="请选择{{relationType == 1 ? '' : '亲友'}}的出生年月">{{birthMonth}}</view>
<view class="tril"></view>
</view>
</picker>
@ -41,12 +44,12 @@ @@ -41,12 +44,12 @@
<pickerArea mode="region" value="{{CityId}}" level="city" level="{{2}}" bind:change="handleAreaChange">
<view class="picker-content">
<!-- prettier-ignore -->
<view class="value" data-place="请选择您的所住地">{{provinceName ? provinceName+ '/' : provinceName }}{{cityName}}</view>
<view class="value" data-place="请选择{{relationType == 1 ? '' : '亲友'}}的所住地">{{provinceName ? provinceName+ '/' : provinceName }}{{cityName}}</view>
<view class="tril"></view>
</view>
</pickerArea>
</view>
</view>
<view class="submit" bind:tap="handleSubmit">立即加入</view>
<view class="cancel">取消</view>
<view class="cancel" bind:tap="handleBack">取消</view>
</view>

3
src/patient/pages/family/index.scss

@ -7,7 +7,7 @@ page { @@ -7,7 +7,7 @@ page {
.container {
margin-top: 184rpx;
position: relative;
background: linear-gradient(292deg, #ffffff 0%, #fff3f2 100%);
background: linear-gradient( 291deg, #FFFFFF 0%, #FFFCFC 55%, #FFF7F7 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff;
padding: 136rpx 40rpx 48rpx;
@ -43,6 +43,7 @@ page { @@ -43,6 +43,7 @@ page {
display: block;
width: 296rpx;
height: 296rpx;
border-radius: 50%;
}
.tip {
margin-top: 22rpx;

2
src/patient/pages/familyList/index.scss

@ -13,6 +13,8 @@ page { @@ -13,6 +13,8 @@ page {
justify-content: space-between;
.wrap {
.w-header {
display: flex;
align-items: center;
.name {
display: inline;
font-size: 32rpx;

2
src/patient/pages/familyList/index.ts

@ -8,7 +8,7 @@ Page({ @@ -8,7 +8,7 @@ Page({
onLoad() {
app.waitLogin().then(() => {
this.getList()
app.getUserInfo(2).then((res) => {
app.getUserInfo(1).then((res) => {
this.setData({
userInfo: res,
})

6
src/patient/pages/familyList/index.wxml

@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
<view class="card" wx:for="{{list}}" wx:key="UserId">
<view class="wrap">
<view class="w-header">
<view class="name" wx:if="{{item.RelationType === '1'}}">ID:{{userInfo.PatientId}}</view>
<view class="name" wx:else>ID:{{userInfo.PatientId}}亲友</view>
<view class="tag">{{item.RelationType === '1' ? '本人': '亲友'}}</view>
<view class="name" wx:if="{{item.RelationType === '1'}}">{{userInfo.PatientName}}</view>
<view class="name" wx:else>{{userInfo.PatientName}}亲友</view>
<view class="tag" wx:if="{{item.RelationType === '1'}}">本人</view>
</view>
<view class="date">绑定时间:{{item.BindPatientTime}}</view>
</view>

14
src/patient/pages/familyScan/index.ts

@ -20,6 +20,12 @@ Page({ @@ -20,6 +20,12 @@ Page({
},
onShow() {
app.waitLogin().then(() => {
if (app.globalData.initLoginInfo.loginType === 2) {
wx.reLaunch({
url: '/doctor/pages/index/index',
})
return
}
app.getUserInfo().then(() => {
this.getMpPatientInfo()
})
@ -35,13 +41,11 @@ Page({ @@ -35,13 +41,11 @@ Page({
loading: true,
}).then((res) => {
let RelationType = res.HasSelf == 1 ? '2' : ''
if (!res.PatientId) {
if (!this.data.ignoreAgreement) {
if (!res.isLogin) {
wx.navigateTo({
url: `/patient/pages/login/index?page=/patient/pages/familyScan/index`,
url: `/patient/pages/login/index?back=1`,
})
}
}
this.setData({
mpPatientInfo: res,
RelationType: res.HasSelf ? '2' : RelationType,
@ -59,7 +63,7 @@ Page({ @@ -59,7 +63,7 @@ Page({
resetBind: true,
})
},
handleSwitchRType(e) {
handleSwitchType(e) {
const { type } = e.currentTarget.dataset
this.setData({
RelationType: type,

4
src/patient/pages/familyScan/index.wxml

@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
<view class="title">请选择您的身份?</view>
<view class="identity">
<view
bind:tap="handleSwitchRType"
bind:tap="handleSwitchType"
class="item {{RelationType == 1 && 'active' }}"
data-type="1"
wx:if="{{!mpPatientInfo.HasSelf}}"
@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
<image class="icon-active" src="{{imageUrl}}icon79.png?t={{Timestamp}}"></image>
<view class="name">本人</view>
</view>
<view bind:tap="handleSwitchRType" class="item {{RelationType > 1 && 'active' }}" data-type="2">
<view bind:tap="handleSwitchType" class="item {{RelationType > 1 && 'active' }}" data-type="2">
<image class="icon" src="{{imageUrl}}icon80.png?t={{Timestamp}}"></image>
<image class="icon-active" src="{{imageUrl}}icon81.png?t={{Timestamp}}"></image>
<view class="name">亲友</view>

9
src/patient/pages/index/index.scss

@ -105,13 +105,14 @@ page { @@ -105,13 +105,14 @@ page {
}
.name {
margin: -20rpx auto 0;
padding: 4rpx 20rpx;
padding: 4rpx 0.5em;
font-size: 20rpx;
color: #fff;
line-height: 24rpx;
background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%);
border-radius: 28rpx 28rpx 28rpx 28rpx;
max-width: 4em;
max-width: 5em;
box-sizing: border-box;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@ -127,8 +128,10 @@ page { @@ -127,8 +128,10 @@ page {
}
.name {
margin: -20rpx auto 0;
padding: 4rpx 20rpx;
padding: 4rpx 0.5em;
width: 5em;
font-size: 20rpx;
box-sizing: border-box;
color: rgba(161, 164, 172, 1);
line-height: 24rpx;
}

10
src/patient/pages/index/index.ts

@ -20,7 +20,7 @@ Page({ @@ -20,7 +20,7 @@ Page({
},
onLoad() {
app.waitLogin().then(() => {
app.getUserInfo(2).then((userInfo) => {
app.getUserInfo(1).then((userInfo) => {
this.setData({
userInfo,
Days: userInfo.Days.replace(
@ -38,6 +38,11 @@ Page({ @@ -38,6 +38,11 @@ Page({
})
})
},
onShow() {
if (app.globalData.loginState) {
this.getBindDoctorList()
}
},
getBindDoctorList() {
wx.ajax({
method: 'GET',
@ -152,6 +157,9 @@ Page({ @@ -152,6 +157,9 @@ Page({
},
handlePopupCancel() {
const { popupType } = this.data
if (popupType === 'bindDoctor') {
this.getBindDoctorList()
}
if (popupType === 'conformBindDoctorQuestion') {
wx.ajax({
method: 'POST',

13
src/patient/pages/index/index.wxml

@ -7,10 +7,7 @@ @@ -7,10 +7,7 @@
>
<view class="user">
<view class="avatar">
<image
class="avatar-img"
src="https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567"
></image>
<image class="avatar-img" src="{{userInfo.Avatar}}"></image>
</view>
<view class="wrap">
<view class="name">Hi!{{userInfo.PatientName}}</view>
@ -24,7 +21,13 @@ @@ -24,7 +21,13 @@
<view class="container" wx:if="{{doctorList.length}}">
<view class="wrap">
<view class="bind-list">
<popupDoctor class="item" wx:for="{{doctorList}}" wx:key="index" did="{{item.doctorId}}" bind:update="getBindDoctorList">
<popupDoctor
class="item"
wx:for="{{doctorList}}"
wx:key="index"
did="{{item.doctorId}}"
bind:update="getBindDoctorList"
>
<image class="avatar-img" src="{{item.doctorAvatar}}"></image>
<view class="name">{{item.doctorName}}</view>
</popupDoctor>

4
src/patient/pages/login/index.json

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
{
"navigationStyle": "custom",
"usingComponents": {
"van-divider": "@vant/weapp/divider/index"
"van-divider": "@vant/weapp/divider/index",
"navbar": "/components/navbar/index",
"van-checkbox": "@vant/weapp/checkbox/index"
}
}

5
src/patient/pages/login/index.scss

@ -106,6 +106,11 @@ @@ -106,6 +106,11 @@
margin-top: -8rpx;
transform: scale(0.8);
}
.wx-checkbox-input.wx-checkbox-input-checked {
background: rgba(246, 74, 58, 1);
border-color: rgba(246, 74, 58, 1);
color: #ffffff;
}
}
.link {
color: rgba(246, 74, 58, 1);

17
src/patient/pages/login/index.ts

@ -12,8 +12,14 @@ Page({ @@ -12,8 +12,14 @@ Page({
check1: false,
check2: false,
check3: false,
backPage: false,
},
onLoad(options) {
this.setData({
backPage: options.back === '1',
})
},
onLoad() {},
getCode() {
if (timer) return
const mobile = this.data.mobile
@ -101,8 +107,10 @@ Page({ @@ -101,8 +107,10 @@ Page({
}
},
submitCallback() {
app.getUserInfo(2).then((res) => {
if (res.PatientId) {
app.getUserInfo(1).then((res) => {
if (this.data.backPage) {
wx.navigateBack()
} else if (res.PatientId) {
wx.reLaunch({
url: `/patient/pages/index/index`,
})
@ -118,6 +126,9 @@ Page({ @@ -118,6 +126,9 @@ Page({
showTel: !this.data.showTel,
})
},
handleBack() {
wx.navigateBack()
},
})
export {}

18
src/patient/pages/login/index.wxml

@ -1,10 +1,20 @@ @@ -1,10 +1,20 @@
<navbar fixed title="" custom-style="background:{{background}}" back>
<van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar>
<view
class="page"
style="padding-top: {{pageTop + 60}}px;background:url('{{imageUrl}}bg12.png?t={{Timestamp}}') no-repeat top center/100% 618rpx;"
>
<image class="logo" src="{{imageUrl}}logo1.png?t={{Timestamp}}"></image>
<view class="title">欢迎加入愈见守护</view>
<button wx:if="{{check1 && check2 && check3}}" class="phone" open-type="getPhoneNumber" bindgetphonenumber="handleWxSubmit">手机号一键登录</button>
<button
wx:if="{{check1 && check2 && check3}}"
class="phone"
open-type="getPhoneNumber"
bindgetphonenumber="handleWxSubmit"
>
手机号一键登录
</button>
<button wx:else class="phone" bind:tap="handleDocRule">手机号一键登录</button>
<view class="divider">
<van-divider class="van-divider" contentPosition="center">或者</van-divider>
@ -39,7 +49,7 @@ @@ -39,7 +49,7 @@
</view>
<view class="signature">
<view class="row">
<checkbox model:checked="{{check1}}" class="checkbox" color="#e73e37"></checkbox>
<checkbox model:checked="{{check1}}" class="checkbox" color="#fff"></checkbox>
<view class="r-content">
我特此同意
<text class="link">《个人信息及隐私协议政策》</text>
@ -47,7 +57,7 @@ @@ -47,7 +57,7 @@
</view>
</view>
<view class="row">
<checkbox model:checked="{{check2}}" class="checkbox" color="#e73e37"></checkbox>
<checkbox model:checked="{{check2}}" class="checkbox" color="#fff"></checkbox>
<view class="r-content">
我特此同意
<text class="link">《用户协议》</text>
@ -55,7 +65,7 @@ @@ -55,7 +65,7 @@
</view>
</view>
<view class="row">
<checkbox model:checked="{{check3}}" class="checkbox" color="#e73e37"></checkbox>
<checkbox model:checked="{{check3}}" class="checkbox" color="#fff"></checkbox>
<view class="r-content">
我特此同意
<text class="link">《个人信息共享知情同意书》</text>

2
src/patient/pages/my/index.ts

@ -11,7 +11,7 @@ Page({ @@ -11,7 +11,7 @@ Page({
},
onLoad() {
app.waitLogin().then(() => {
app.getUserInfo().then((userInfo) => {
app.getUserInfo(1).then((userInfo) => {
this.setData({
userInfo,
// 数字变红

12
src/patient/pages/my/index.wxml

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
</button>
<view class="wrap">
<view class="name">
<text class="nickname">你好</text>
<text class="nickname">{{userInfo.PatientName}}</text>
</view>
<view class="day">
今天是陪伴您的第
@ -27,6 +27,11 @@ @@ -27,6 +27,11 @@
<view class="content">个人信息</view>
<van-icon class="more" name="arrow" />
</view>
<view class="item" bind:tap="handleFamily">
<image class="icon" src="{{imageUrl}}icon69.png?t={{Timestamp}}"></image>
<view class="content">我的亲友</view>
<van-icon class="more" name="arrow" />
</view>
<view class="item" bind:tap="handleDoctor">
<image class="icon" src="{{imageUrl}}icon68.png?t={{Timestamp}}"></image>
<view class="content">
@ -35,11 +40,6 @@ @@ -35,11 +40,6 @@
</view>
<van-icon class="more" name="arrow" />
</view>
<view class="item" bind:tap="handleFamily">
<image class="icon" src="{{imageUrl}}icon69.png?t={{Timestamp}}"></image>
<view class="content">我的亲友</view>
<van-icon class="more" name="arrow" />
</view>
</view>
</view>
</view>

9
src/patient/pages/userInfo/index.ts

@ -16,7 +16,7 @@ Page({ @@ -16,7 +16,7 @@ Page({
},
onLoad() {
app.waitLogin().then(() => {
app.getUserInfo(2).then((userInfo) => {
app.getUserInfo(1).then((userInfo) => {
this.setData({
name: userInfo.PatientName,
birthMonth: userInfo.PatientBirth,
@ -51,8 +51,11 @@ Page({ @@ -51,8 +51,11 @@ Page({
provinceId,
cityId,
},
}).then((res) => {
console.log('res: ', res)
}).then(() => {
wx.showToast({
icon: 'none',
title: '保存成功',
})
})
},
handleTel() {

2
typings/index.d.ts vendored

@ -44,7 +44,7 @@ interface IAppOption { @@ -44,7 +44,7 @@ interface IAppOption {
[propName: string]: any
}
getUserInfo: (type?: 1 | 2 | 3) => Promise<any>
getUserInfo: (type?: 0 | 1 | 2) => Promise<any>
startLogin: (callback?: () => void) => void
waitLogin: (params?: { type?: 0 | 1 | 2 | 'any' }) => Promise<void>
checkLoginType: (type: 0 | 1 | 2) => boolean

Loading…
Cancel
Save