Browse Source

ask 接口联调 & 知识库bug处理

master
kola-web 3 days ago
parent
commit
6a4174d392
  1. 2
      project.private.config.json
  2. 30
      src/app.ts
  3. 4
      src/components/star/index.json
  4. 0
      src/components/star/index.scss
  5. 204
      src/components/star/index.ts
  6. 1
      src/components/star/index.wxml
  7. 4
      src/custom-tab-bar/index.ts
  8. BIN
      src/images/icon10.png
  9. BIN
      src/images/icon19.png
  10. BIN
      src/images/icon20.png
  11. BIN
      src/images/icon21.png
  12. BIN
      src/images/icon3.png
  13. BIN
      src/images/icon8.png
  14. BIN
      src/images/icon9.png
  15. BIN
      src/images/none.png
  16. BIN
      src/images/star/icon1.png
  17. BIN
      src/images/star/icon2.png
  18. BIN
      src/images/star/icon3.png
  19. BIN
      src/images/star/icon4.png
  20. BIN
      src/images/star/icon5.png
  21. BIN
      src/images/star/icon6.png
  22. BIN
      src/images/star/icon7.png
  23. BIN
      src/images/star/icon8.png
  24. 5
      src/pages/applyFrom/index.scss
  25. 10
      src/pages/applyFrom/index.ts
  26. 3
      src/pages/applyFrom/index.wxml
  27. 2
      src/pages/applyFromResult/index.scss
  28. 3
      src/pages/applyFromResult/index.ts
  29. 2
      src/pages/applyFromResult/index.wxml
  30. 60
      src/pages/ask/index.scss
  31. 323
      src/pages/ask/index.ts
  32. 106
      src/pages/ask/index.wxml
  33. 44
      src/pages/index/index.scss
  34. 25
      src/pages/index/index.ts
  35. 10
      src/pages/index/index.wxml
  36. 14
      src/pages/knowledge/index.scss
  37. 1
      src/pages/knowledge/index.ts
  38. 3
      src/pages/knowledgeDetail/index.json
  39. 19
      src/pages/knowledgeDetail/index.scss
  40. 25
      src/pages/knowledgeDetail/index.ts
  41. 11
      src/pages/knowledgeDetail/index.wxml
  42. 4
      src/pages/knowledgeDetailVideo/index.json
  43. 34
      src/pages/knowledgeDetailVideo/index.scss
  44. 152
      src/pages/knowledgeDetailVideo/index.ts
  45. 50
      src/pages/knowledgeDetailVideo/index.wxml
  46. 6
      src/pages/login/index.wxml
  47. 7
      src/pages/my/index.scss
  48. 11
      src/pages/my/index.ts
  49. 6
      src/pages/my/index.wxml
  50. 2
      src/patient/pages/home/index.wxml
  51. 2
      typings/index.d.ts

2
project.private.config.json

@ -25,7 +25,7 @@
{ {
"name": "知识夸详情-文章", "name": "知识夸详情-文章",
"pathName": "pages/knowledgeDetail/index", "pathName": "pages/knowledgeDetail/index",
"query": "id=9", "query": "id=15",
"scene": null, "scene": null,
"launchMode": "default" "launchMode": "default"
}, },

30
src/app.ts

@ -93,21 +93,21 @@ App<IAppOption>({
}, 500) }, 500)
}) })
}, },
mpBehavior(data: { PageName: string; doctor?: boolean }) { mpBehavior(data: { PageName: string }) {
let url = '?r=zd/mp-behavior/add' // let url = '?r=zd/mp-behavior/add'
if (data.doctor) { // if (data.doctor) {
url = '?r=zd/doctor/mp-behavior/add' // url = '?r=zd/doctor/mp-behavior/add'
} // }
delete data.doctor // delete data.doctor
wx.ajax({ // wx.ajax({
method: 'POST', // method: 'POST',
url, // url,
data: data, // data: data,
loading: false, // loading: false,
showMsg: false, // showMsg: false,
}).then((res) => { // }).then((res) => {
console.log('res: ', res) // console.log('res: ', res)
}) // })
}, },
getUserInfo() { getUserInfo() {

4
src/components/star/index.json

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

0
src/components/star/index.scss

204
src/components/star/index.ts

@ -0,0 +1,204 @@
const app = getApp();
/**
* >=min && <=max
* @param min
* @param max
*/
function getRandom(min, max) {
return min + Math.floor(Math.random() * (max - min + 1));
}
Component({
options: {},
lifetimes: {
attached() {
const query = wx.createSelectorQuery().in(this);
query
.select("#thumsCanvas")
.fields({ node: true, size: true })
.exec((res) => {
const canvas = res[0].node;
const context = canvas.getContext("2d");
this.setData({
context: context,
});
const dpr = wx.getSystemInfoSync().pixelRatio;
canvas.width = res[0].width * dpr;
canvas.height = res[0].height * dpr;
this.data.width = res[0].width * dpr;
this.data.height = res[0].height * dpr;
// context.fillStyle = "rgba(255, 255, 255, 0)";
const images = [
"star/icon1.png",
"star/icon2.png",
"star/icon3.png",
"star/icon4.png",
"star/icon5.png",
"star/icon6.png",
"star/icon7.png",
"star/icon8.png",
];
const promiseAll = [] as Array<Promise<any>>;
images.forEach((src) => {
const p = new Promise(function (resolve) {
const img = canvas.createImage();
img.onerror = img.onload = resolve.bind(null, img);
img.src = app.globalData.imageUrl + src;
});
promiseAll.push(p);
});
Promise.all(promiseAll).then((imgsList) => {
const imgsLists = imgsList.filter((d) => {
if (d && d.width > 0) return true;
return false;
});
this.setData({
imgsList: imgsLists,
});
if (this.data.imgsList.length == 0) {
// logger.error("imgsList load all error");
wx.showToast({
icon: "none",
title: "imgsList load all error",
});
return;
}
});
});
},
},
properties: {},
data: {
imgsList: [] as WechatMiniprogram.ImageData[],
width: 0,
height: 0,
context: null as any,
scanning: false,
renderList: [],
scaleTime: 0.1, // 百分比
},
methods: {
handleTap() {
this.start();
},
createRender() {
if (this.data.imgsList.length == 0) return null;
const basicScale = [0.6, 0.9, 1.2][getRandom(0, 2)];
const getScale = (diffTime) => {
if (diffTime < this.data.scaleTime) {
return +(diffTime / this.data.scaleTime).toFixed(2) * basicScale;
} else {
return basicScale;
}
};
const context = this.data.context;
// 随机读取一个图片来渲染
const image: any = this.data.imgsList[getRandom(0, this.data.imgsList.length - 1)];
const offset = 20;
const basicX = this.data.width / 2 + getRandom(-offset, offset);
const angle = getRandom(2, 10);
let ratio = getRandom(10, 30) * (getRandom(0, 1) ? 1 : -1);
const getTranslateX = (diffTime) => {
if (diffTime < this.data.scaleTime) {
// 放大期间,不进行摇摆位移
return basicX;
} else {
return basicX + ratio * Math.sin(angle * (diffTime - this.data.scaleTime));
}
};
const getTranslateY = (diffTime) => {
return image.height / 2 + (this.data.height - image.height / 2) * (1 - diffTime);
};
const fadeOutStage = getRandom(14, 18) / 100;
const getAlpha = (diffTime) => {
let left = 1 - +diffTime;
if (left > fadeOutStage) {
return 1;
} else {
return 1 - +((fadeOutStage - left) / fadeOutStage).toFixed(2);
}
};
return (diffTime) => {
// 差值满了,即结束了 0 ---》 1
if (diffTime >= 1) return true;
context.save();
const scale = getScale(diffTime);
// const rotate = getRotate();
const translateX = getTranslateX(diffTime);
const translateY = getTranslateY(diffTime);
context.translate(translateX, translateY);
context.scale(scale, scale);
// context.rotate(rotate * Math.PI / 180);
context.globalAlpha = getAlpha(diffTime);
context.drawImage(image, -image.width / 2, -image.height / 2, image.width, image.height);
context.restore();
};
},
scan() {
this.data.context.clearRect(0, 0, this.data.width, this.data.height);
this.data.context.fillStyle = "rgba(255, 255, 255, 0)";
this.data.context.fillRect(0, 0, 200, 400);
let index = 0;
let length = this.data.renderList.length;
if (length > 0) {
this.requestFrame(this.scan.bind(this));
this.setData({
scanning: true,
});
} else {
this.setData({
scanning: false,
});
}
while (index < length) {
const child = this.data.renderList[index];
if (!child || !child.render || child.render.call(null, (Date.now() - child.timestamp) / child.duration)) {
// 结束了,删除该动画
this.setData({
renderList: [...this.data.renderList].filter((_item, fIndex) => fIndex != index),
});
length--;
} else {
// continue
index++;
}
}
},
start() {
const render = this.createRender();
const duration = getRandom(1500, 3000);
this.setData({
renderList: [
...this.data.renderList,
{
render,
duration,
timestamp: Date.now(),
},
],
});
if (!this.data.scanning) {
this.setData({
scanning: true,
});
this.requestFrame(this.scan.bind(this));
// this.scan.bind(this)();
}
return this;
},
requestFrame(cb) {
return (
this.data.context.requestAnimationFrame ||
(function (callback) {
setTimeout(callback, 1000 / 60);
})(cb)
);
},
},
});

1
src/components/star/index.wxml

@ -0,0 +1 @@
<canvas id="thumsCanvas" type="2d" width="200" height="400" style="width: 100px; height: 200px"></canvas>

4
src/custom-tab-bar/index.ts

@ -5,7 +5,7 @@ Component({
properties: {}, properties: {},
data: { data: {
imageUrl: app.globalData.imageUrl, imageUrl: app.globalData.imageUrl,
Timestamp:app.globalData.Timestamp, Timestamp: app.globalData.Timestamp,
isChild: 0, isChild: 0,
active: 0, active: 0,
@ -25,7 +25,7 @@ Component({
{ {
pagePath: '/pages/my/index', pagePath: '/pages/my/index',
text: '我的', text: '我的',
icon: 'tabbar1-2', icon: 'tabbar1-3',
iconActive: 'tabbar1-3-active', iconActive: 'tabbar1-3-active',
}, },
], ],

BIN
src/images/icon10.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

After

Width:  |  Height:  |  Size: 741 B

BIN
src/images/icon19.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/icon20.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

BIN
src/images/icon21.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

BIN
src/images/icon3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 962 B

After

Width:  |  Height:  |  Size: 955 B

BIN
src/images/icon8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 955 B

After

Width:  |  Height:  |  Size: 874 B

BIN
src/images/icon9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 B

After

Width:  |  Height:  |  Size: 507 B

BIN
src/images/none.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
src/images/star/icon1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
src/images/star/icon2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
src/images/star/icon3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
src/images/star/icon4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
src/images/star/icon5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
src/images/star/icon6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
src/images/star/icon7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
src/images/star/icon8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

5
src/pages/applyFrom/index.scss

@ -13,7 +13,7 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px solid #ededf7; border-bottom: 1px solid #ededf7;
&.no-center{ &.no-center {
align-items: start; align-items: start;
} }
&:last-of-type { &:last-of-type {
@ -22,6 +22,7 @@ page {
.label { .label {
flex-shrink: 0; flex-shrink: 0;
font-size: 32rpx; font-size: 32rpx;
line-height: 1.2;
color: #010105; color: #010105;
width: 7em; width: 7em;
&.required::before { &.required::before {
@ -32,6 +33,7 @@ page {
} }
.content { .content {
flex: 1; flex: 1;
line-height: 1.2;
.select { .select {
display: flex; display: flex;
gap: 24rpx; gap: 24rpx;
@ -72,6 +74,7 @@ page {
} }
} }
.textarea { .textarea {
padding: 0;
width: 100%; width: 100%;
font-size: 32rpx; font-size: 32rpx;
height: 100rpx; height: 100rpx;

10
src/pages/applyFrom/index.ts

@ -21,6 +21,7 @@ Page({
}, },
onLoad() { onLoad() {
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.mpBehavior({ PageName: 'PG_PREAPPLY' })
app.getUserInfo().then((userInfo) => { app.getUserInfo().then((userInfo) => {
if (userInfo.ApplyIntentionId) { if (userInfo.ApplyIntentionId) {
this.getDetail(userInfo.ApplyIntentionId) this.getDetail(userInfo.ApplyIntentionId)
@ -70,6 +71,9 @@ Page({
}) })
}, },
handlePhoneNumber(e) { handlePhoneNumber(e) {
if (!e.detail.encryptedData) {
return
}
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=wtx/user/wx-telephone', url: '?r=wtx/user/wx-telephone',
@ -79,11 +83,12 @@ Page({
}, },
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
Telephone: res.Telehpone, Telephone: res.Telephone,
}) })
}) })
}, },
handleSubmit() { handleSubmit() {
app.mpBehavior({ PageName: 'BTN_PREAPPLY_SUBMIT' })
const { Id, UserName, Relation, BirthMonth, ProvinceId, CityId, Telephone, Remark, Argument } = this.data const { Id, UserName, Relation, BirthMonth, ProvinceId, CityId, Telephone, Remark, Argument } = this.data
let toast = '' let toast = ''
if (!Telephone) { if (!Telephone) {
@ -132,6 +137,9 @@ Page({
}) })
}) })
}, },
handleBack() {
wx.navigateBack()
},
}) })
export {} export {}

3
src/pages/applyFrom/index.wxml

@ -1,5 +1,5 @@
<navbar title="基因疗法筛查申请" fixed custom-style="background:{{background}}"> <navbar title="基因疗法筛查申请" fixed custom-style="background:{{background}}">
<van-icon name="arrow-left" slot="left" size="18px" color="#000" /> <van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar> </navbar>
<view <view
@ -70,6 +70,7 @@
class="textarea" class="textarea"
placeholder-class="place-textarea" placeholder-class="place-textarea"
placeholder="输入说明" placeholder="输入说明"
disable-default-padding
></textarea> ></textarea>
</view> </view>
</view> </view>

2
src/pages/applyFromResult/index.scss

@ -1,5 +1,5 @@
page { page {
color: #fafafa; background-color: rgba(246, 246, 249, 1);
} }
.page { .page {
background: linear-gradient(172deg, #ffa340 0%, #ffdcdd 56%, #fafafa 100%) no-repeat top center/100% 726rpx; background: linear-gradient(172deg, #ffa340 0%, #ffdcdd 56%, #fafafa 100%) no-repeat top center/100% 726rpx;

3
src/pages/applyFromResult/index.ts

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

2
src/pages/applyFromResult/index.wxml

@ -1,5 +1,5 @@
<navbar fixed custom-style="background:{{background}}"> <navbar fixed custom-style="background:{{background}}">
<van-icon name="arrow-left" slot="left" size="18px" color="#000" /> <van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar> </navbar>
<view class="page" style="padding-top:{{pageTop}}px"> <view class="page" style="padding-top:{{pageTop}}px">
<view class="container"> <view class="container">

60
src/pages/ask/index.scss

@ -145,11 +145,39 @@ page {
.message { .message {
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 26rpx 32rpx; padding: 26rpx 32rpx;
background: linear-gradient(13deg, #ffffff 0%, #ffcdca 100%); background: #fff linear-gradient(to top, #ffffff 0%, #ffcdca 100%) no-repeat top center/ 100% 200rpx;
border-radius: 32rpx; border-radius: 32rpx;
font-size: 32rpx; font-size: 32rpx;
color: rgba(40, 48, 49, 1); color: rgba(1, 1, 5, 1);
line-height: 48rpx;
white-space: pre-line; white-space: pre-line;
.reference {
margin-top: 24rpx;
font-size: 24rpx;
color: rgba(1, 1, 5, 0.5);
line-height: 32rpx;
}
.m-footer {
border-top: 1px solid rgba(0, 0, 0, 0.04);
margin-top: 32rpx;
padding-top: 24rpx;
display: flex;
align-items: center;
justify-content: flex-end;
.icon {
width: 36rpx;
height: 36rpx;
}
.num {
margin-left: 12rpx;
font-size: 32rpx;
color: rgba(1, 1, 5, 0.4);
line-height: 1px;
&.active {
color: rgba(242, 58, 47, 1);
}
}
}
} }
.week { .week {
margin-bottom: 32rpx; margin-bottom: 32rpx;
@ -417,10 +445,11 @@ page {
flex-shrink: 0; flex-shrink: 0;
padding: 18rpx 30rpx calc(env(safe-area-inset-bottom) + 30rpx); padding: 18rpx 30rpx calc(env(safe-area-inset-bottom) + 30rpx);
border-radius: 24rpx 24rpx 0 0; border-radius: 24rpx 24rpx 0 0;
background-color: #fff; background-color: rgba(255, 255, 255, 1);
transition: all 0.3s; transition: all 0.3s;
height: calc(124rpx + env(safe-area-inset-bottom)); height: calc(124rpx + env(safe-area-inset-bottom));
box-sizing: border-box; box-sizing: border-box;
box-shadow: 0rpx 2rpx 28rpx 0rpx rgba(0, 0, 0, 0.08);
.unread { .unread {
position: absolute; position: absolute;
top: -80rpx; top: -80rpx;
@ -435,13 +464,6 @@ page {
&.expend { &.expend {
height: 50vh; height: 50vh;
} }
.line {
margin: 0 auto;
width: 52rpx;
height: 6rpx;
background: #f2f4f5;
border-radius: 48rpx 48rpx 48rpx 48rpx;
}
.title { .title {
margin-top: 26rpx; margin-top: 26rpx;
font-size: 32rpx; font-size: 32rpx;
@ -465,11 +487,11 @@ page {
} }
.tab { .tab {
flex-shrink: 0; flex-shrink: 0;
padding: 13rpx 22rpx; padding: 14rpx 32rpx;
font-size: 32rpx; font-size: 28rpx;
color: rgba(40, 48, 49, 1); color: rgba(1, 1, 5, 0.6);
border-radius: 129rpx; border-radius: 129rpx;
background-color: rgba(242, 244, 245, 1); background-color: rgba(247, 247, 250, 1);
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8rpx; gap: 8rpx;
@ -485,7 +507,7 @@ page {
} }
&.active { &.active {
color: #fff; color: #fff;
background: linear-gradient( 180deg, #FC684F 0%, #F33D31 100%); background: linear-gradient(180deg, #fc684f 0%, #f33d31 100%);
.icon { .icon {
display: none; display: none;
} }
@ -512,7 +534,7 @@ page {
justify-content: center; justify-content: center;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
border-radius: 6rpx; border-radius: 6rpx;
background: linear-gradient( 180deg, #FC684F 0%, #F33D31 100%); background: linear-gradient(180deg, #fc684f 0%, #f33d31 100%);
} }
.content { .content {
padding: 0 16rpx; padding: 0 16rpx;
@ -524,6 +546,12 @@ page {
color: rgba(40, 48, 49, 1); color: rgba(40, 48, 49, 1);
} }
} }
.none {
display: block;
margin: 30rpx auto;
width: 344rpx;
max-height: 302rpx;
}
} }
} }
} }

323
src/pages/ask/index.ts

@ -1,26 +1,20 @@
import dayjs from 'dayjs' import dayjs from 'dayjs'
const licia = require('miniprogram-licia')
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
interface IMessageItem { interface IMessageItem {
msgId: string msgId: string
msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息 msgContentType: '1' // 1: 文本
msgContent: any msgContent: any
msgVisitTime: string msgVisitTime: string
msgFromType: '1' | '2' // 1: 患者 2: 医生 msgFromType: '1' | '2' // 1: 患者 2: 医生
isPlay?: boolean
welcomeMsg?: {
hotQuestion: Item[]
}
msgCreateTime: string // 消息创建时间 msgCreateTime: string // 消息创建时间
msgCreateTimeName?: string // 消息创建时间 msgCreateTimeName?: string // 消息创建时间
showTime?: boolean showTime?: boolean
ReVisitInfo?: any questionId?: string // 问题ID
} Reference?: string // 参考资料
LikeTimes?: number // 点赞次数
interface Item {
questionId: string
question: string
} }
Page({ Page({
@ -32,213 +26,167 @@ Page({
questionActive: 0, questionActive: 0,
questionList: [] as any, questionList: [] as any,
questionActiveList: [] as Item[], questionActiveList: [] as any[],
headerQuestionList: [] as any,
isLoad: false, isLoad: false,
isFinish: false, isFinish: false,
messageList: [ messageList: [] as IMessageItem[],
{
msgId: '1668',
msgContentType: '1',
msgContent: '您最近一次复诊时间是2025年4月23日;我的方案是:血浆置换',
welcomeMsg: '',
msgVisitTimeType: '0',
msgVisitTime: '',
msgFromType: '1',
ReVisitInfo:
'{"loginState":"lszdadaa0ca7fecc7d2ff8dee1091de8c214","visitDate":"2025-04-23","recordId":33,"hormone":2,"traditionalInhibitor":2,"gammaGlobulin":2,"plasmaExchange":1,"bCellInhibitor":2,"fcRnAntagonists":2,"c5ComplementInhibitor":2,"chineseMedicine":2,"other":2,"reVisitSolution":["血浆置换"]}',
msgCreateTime: '2025-05-23 11:58:23',
},
{
msgId: '1668',
msgContentType: '1',
msgContent: '您最近一次复诊时间是2025年4月23日;我的方案是:血浆置换',
welcomeMsg: '',
msgVisitTimeType: '0',
msgVisitTime: '',
msgFromType: '2',
ReVisitInfo:
'{"loginState":"lszdadaa0ca7fecc7d2ff8dee1091de8c214","visitDate":"2025-04-23","recordId":33,"hormone":2,"traditionalInhibitor":2,"gammaGlobulin":2,"plasmaExchange":1,"bCellInhibitor":2,"fcRnAntagonists":2,"c5ComplementInhibitor":2,"chineseMedicine":2,"other":2,"reVisitSolution":["血浆置换"]}',
msgCreateTime: '2025-05-23 11:58:23',
},
] as IMessageItem[],
nextMsgId: '', nextMsgId: '',
unReadCount: 0, unReadCount: 0,
firstNotReadMsgId: 0, firstNotReadMsgId: 0,
isVisitAdl: 2, isVisitAdl: 2,
adlMsgId: 0, adlMsgId: 0,
week: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], LikeTimes: 0,
timeDay: { 1: '上午', 2: '下午' },
userInfo: {}, userInfo: {},
}, },
innerAudioContext: null as WechatMiniprogram.InnerAudioContext | null, onLoad(options) {
onLoad() { app.waitLogin().then(() => {
this.innerAudioContext = wx.createInnerAudioContext({ app.mpBehavior({ PageName: 'PG_FAQ' })
useWebAudioImplement: true, app.getUserInfo().then((userInfo) => {
})
app.waitLogin({}).then(() => {
this.getQuestionList()
this.getMessageList()
app.getUserInfo(this, true, (userInfo) => {
this.setData({ this.setData({
userInfo, userInfo,
}) })
}) })
this.getQuestionList()
this.getHeaderQuestionList()
if (options.id) {
this.getDetail(options.id)
}
}) })
}, },
onUnload() {
if (this.innerAudioContext) {
this.innerAudioContext.stop()
}
},
handleView(index = -1) { handleView(index = -1) {
this.setData({ this.setData({
scrollIntoView: index > -1 ? `view${index}` : `place`, scrollIntoView: index > -1 ? `view${index}` : `place`,
}) })
}, },
getDoctorDetail() { getHeaderQuestionList() {
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/message-interact/get-bind-doctor-info', url: '?r=wtx/common-question/concerned-list',
data: {}, data: {},
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
doctorDetail: { headerQuestionList: res.list,
...res,
},
}) })
}) })
}, },
getDetail(Id: string) {
wx.ajax({
method: 'GET',
url: '?r=wtx/common-question/detail',
data: { Id },
}).then((res) => {
this.handleSendQuestion(res)
})
},
getQuestionList() { getQuestionList() {
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/message-interact/get-question-list', url: '?r=wtx/common-question/type-list',
data: {}, data: {},
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
questionList: res, questionList: res.list,
questionActiveList: res[0].questionList,
}) })
this.getQuestionCommonList(this.data.questionActive)
}) })
}, },
getMessageList() { getQuestionCommonList(questionActive: number) {
if (this.data.isLoad || this.data.isFinish) return const QuestionTypeId = this.data.questionList[questionActive].Id
this.setData({
isLoad: true,
})
const nextMsgId = this.data.nextMsgId
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/message-interact/patient-get-message-list', url: '?r=wtx/common-question/list',
data: { data: {
nextMsgId, QuestionTypeId,
count: 0,
}, },
}).then((res) => { }).then((res) => {
res.messageList.map((item) => { if (this.data.questionActive === questionActive) {
if (item.msgContentType === '4') { this.setData({
item.msgContent = JSON.parse(item.msgContent) questionActiveList: res.list,
} })
if (item.msgContentType === '2') {
item.msgVisitTime = item.msgVisitTimeType == 2 ? item.msgVisitTime : JSON.parse(item.msgVisitTime)
}
if (item.msgContentType === '5') {
item.welcomeMsg = JSON.parse(item.welcomeMsg)
}
if (item.msgContentType === '9') {
item.ReVisitInfo = JSON.parse(item.ReVisitInfo)
item.ReVisitInfo.visitDateName = dayjs(item.ReVisitInfo.visitDate).format('YYYY年M月DD日')
}
return item
})
this.setData({
messageList: [...res.messageList.reverse(), ...this.data.messageList],
nextMsgId: res.nextMsgId,
unReadCount: res.unReadCount,
firstNotReadMsgId: res.firstNotReadMsgId,
isVisitAdl: res.isVisitAdl,
adlMsgId: res.adlMsgId,
isLoad: false,
isFinish: nextMsgId === res.nextMsgId,
})
this.filterCreateTime()
if (!nextMsgId) {
this.handleView()
} }
}) })
}, },
scrolltoupper(e) { handleHeaderQuestion(e: any) {
if (e.detail.direction === 'top') { const { index } = e.currentTarget.dataset
this.getMessageList() const { headerQuestionList } = this.data
} const question = headerQuestionList[index]
this.handleQuestionClick(question.Id)
this.handleSendQuestion(question)
},
handleQuestion(e: any) {
const { index } = e.currentTarget.dataset
const { questionActiveList } = this.data
const question = questionActiveList[index]
this.handleQuestionClick(question.Id)
this.handleSendQuestion(question)
}, },
handleHot(e) { handleSendQuestion(questionItem: any) {
const { index, mindex } = e.currentTarget.dataset
const { messageList } = this.data const { messageList } = this.data
const hotList = messageList[mindex].welcomeMsg?.hotQuestion
const hot = hotList?.[index]
this.setData({ this.setData({
messageList: [ messageList: [
...messageList, ...messageList,
{ {
msgId: '', msgId: new Date().getTime().toString(),
msgContentType: '1', msgContentType: '1',
msgContent: hot?.question, msgContent: questionItem.Question,
msgVisitTime: '', msgVisitTime: '',
msgFromType: '1', msgFromType: '1',
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
}, },
],
})
this.handleView()
this.sendQuestion(hot?.questionId)
},
handleQuestion(e) {
const { index } = e.currentTarget.dataset
const { questionActiveList, messageList } = this.data
const question = questionActiveList[index]
this.setData({
messageList: [
...messageList,
{ {
msgId: '', msgId: new Date().getTime().toString(),
msgContentType: '1', msgContentType: '1',
msgContent: question.question, msgContent: questionItem.Answer,
questionId: questionItem.Id,
Reference: questionItem.Reference,
LikeTimes: questionItem.LikeTimes,
msgVisitTime: '', msgVisitTime: '',
msgFromType: '1', msgFromType: '2',
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
}, },
], ],
}) })
this.sendQuestion(question.questionId) this.handleView()
},
handleQuestionClick(Id) {
wx.ajax({
method: 'POST',
url: '?r=wtx/common-question/click',
data: { Id },
})
},
handleLike(e) {
const { index } = e.currentTarget.dataset
const { messageList, LikeTimes } = this.data
const item = messageList[index]
const LikeTimesKey = `messageList[${index}].LikeTimes`
const IsLikeKey = `messageList[${index}].IsLike`
this.setData({
[LikeTimesKey]: Number(item.LikeTimes) + 1,
[IsLikeKey]: true,
LikeTimes: LikeTimes + 1,
})
this.likePost(item.questionId)
}, },
sendQuestion(questionId) { likePost: licia.debounce(function (this: any, Id) {
const { LikeTimes } = this.data
this.setData({
LikeTimes: 0,
})
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/message-interact/send-question-message', url: '?r=wtx/common-question/like',
data: { data: {
questionId, Id,
LikeTimes,
}, },
}).then((res) => {
this.setData({
messageList: [
...this.data.messageList,
{
msgId: '',
msgContentType: '1',
msgContent: res,
msgVisitTime: '',
msgFromType: '2',
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
},
],
})
this.filterCreateTime()
this.handleView()
}) })
}, }, 1000),
formatTime(date: string) { formatTime(date: string) {
let msgCreateTimeName = '' let msgCreateTimeName = ''
if (dayjs().format('YYYY-MM-DD') === dayjs(date).format('YYYY-MM-DD')) { if (dayjs().format('YYYY-MM-DD') === dayjs(date).format('YYYY-MM-DD')) {
@ -279,96 +227,21 @@ Page({
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
this.setData({ this.setData({
questionActive: index, questionActive: index,
questionActiveList: this.data.questionList[index].questionList,
})
},
handleDoctorDetail() {
const { doctorId } = this.data.doctorDetail
wx.navigateTo({
url: `/pages/doctorDetail/index?id=${doctorId}`,
})
},
handleRead() {
const { firstNotReadMsgId, messageList } = this.data
const index = messageList.findIndex((item) => `${item.msgId}` === `${firstNotReadMsgId}`)
this.handleView(index)
this.setData({
unReadCount: 0,
}) })
this.getQuestionCommonList(index)
}, },
handleFooter() { handleFooter() {
app.mpBehavior({ PageName: 'BTN_PATIENTINTERACTIONCHOOSEQUESTION' })
this.setData({ this.setData({
expend: !this.data.expend, expend: !this.data.expend,
}) })
if (this.data.expend) { if (this.data.expend) {
// this.getQuestionList()
setTimeout(() => { setTimeout(() => {
this.handleView() this.handleView()
}, 300) }, 300)
} }
}, },
handleAdl() { handleBack() {
wx.navigateTo({ wx.navigateBack()
url: '/pages/adl/index',
})
},
handleAudio(e) {
const { index } = e.currentTarget.dataset
const { messageList } = this.data
const messageItem = messageList[index]
const { url } = messageItem.msgContent[0]
if (this.innerAudioContext) {
if (messageItem.isPlay) {
this.innerAudioContext.stop()
messageItem.isPlay = false
this.setData({
messageList,
})
return
}
this.innerAudioContext.stop()
this.innerAudioContext.src = url
this.innerAudioContext.play()
messageItem.isPlay = true
this.innerAudioContext.onEnded(() => {
messageItem.isPlay = false
this.setData({
messageList,
})
})
this.setData({
messageList,
})
}
},
handleFillUserInfo() {
wx.navigateTo({
url: '/pages/personalInformation/index',
})
},
handleReferral() {
this.setData({
referralFromShow: true,
})
},
handleReferralReplay(e) {
const params = e.detail
this.setData({
messageList: [
...this.data.messageList,
{
msgId: '',
msgContentType: '9',
msgVisitTime: '',
msgContent: '',
msgFromType: '1',
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
ReVisitInfo: {
...params,
visitDateName: dayjs(params.visitDate).format('YYYY年M月DD日'),
},
},
],
})
}, },
}) })

106
src/pages/ask/index.wxml

@ -1,7 +1,10 @@
<navbar fixed title="大家都在问" custom-style="background:{{background}}" back> <navbar fixed title="大家都在问" custom-style="background:{{background}}" back>
<van-icon name="arrow-left" slot="left" size="18px" color="#000" /> <van-icon name="arrow-left" slot="left" size="18px" color="#000" bind:tap="handleBack" />
</navbar> </navbar>
<view class="page" style="background: url('{{imageUrl}}bg1.png?t={{Timestamp}}') no-repeat top center/100% 602rpx;padding-top:{{pageTop+21}}px;"> <view
class="page"
style="background: url('{{imageUrl}}bg1.png?t={{Timestamp}}') no-repeat top center/100% 602rpx;padding-top:{{pageTop+21}}px;"
>
<view class="page-container" id="page-container"> <view class="page-container" id="page-container">
<scroll-view <scroll-view
class="scroll-view" class="scroll-view"
@ -11,7 +14,6 @@
scroll-with-animation scroll-with-animation
bindscrolltoupper="scrolltoupper" bindscrolltoupper="scrolltoupper"
> >
<van-loading wx:if="{{isLoad && !isFinish}}" />
<view class="first-ask"> <view class="first-ask">
<view class="f-header"> <view class="f-header">
<image class="avatar" src="{{imageUrl}}avatar1.png?t={{Timestamp}}"></image> <image class="avatar" src="{{imageUrl}}avatar1.png?t={{Timestamp}}"></image>
@ -19,9 +21,7 @@
</view> </view>
<view class="f-list"> <view class="f-list">
<view class="content">关于血友病B 的基因治疗相关的问题,您关心哪些?我可以为您解答哦~</view> <view class="content">关于血友病B 的基因治疗相关的问题,您关心哪些?我可以为您解答哦~</view>
<view class="l-item">1.基因疗法适合多大年龄?</view> <view class="l-item" wx:for="{{headerQuestionList}}" wx:key="Id" bind:tap="handleHeaderQuestion" data-index="{{index}}">{{item.Question}}</view>
<view class="l-item">1.基因疗法适合多大年龄?</view>
<view class="l-item">1.基因疗法适合多大年龄?</view>
</view> </view>
</view> </view>
<view wx:for="{{messageList}}" wx:key="msgId" wx:for-item="message" wx:for-index="mIndex" id="view{{mIndex}}"> <view wx:for="{{messageList}}" wx:key="msgId" wx:for-item="message" wx:for-index="mIndex" id="view{{mIndex}}">
@ -52,68 +52,15 @@
<image class="icon" src="{{imageUrl}}/doctor/icon-down1.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}/doctor/icon-down1.png?t={{Timestamp}}"></image>
</view> </view>
</view> </view>
<view class="message" wx:elif="{{message.msgContentType==='1'}}">{{message.msgContent}}</view> <view class="message" wx:elif="{{message.msgContentType==='1'}}">
<view class="week" wx:elif="{{message.msgContentType==='2'}}"> <view>{{message.msgContent || '您的问题我收到啦!我会继续努力,尽快帮您找到答案的~'}}</view>
<view class="w-title">以下是我的出诊时间</view> <view class="reference" wx:if="{{message.Reference}}">{{message.Reference}}</view>
<view class="w-container"> <view class="m-footer" bind:tap="handleLike" data-index="{{mIndex}}">
<view wx:if="{{message.msgVisitTimeType==2}}" class="w-content pre-line">{{message.msgVisitTime}}</view> <image wx:if="{{message.IsLike}}" class="icon" src="{{imageUrl}}icon8.png?t={{Timestamp}}"></image>
<block wx:else> <image wx:else class="icon" src="{{imageUrl}}icon10.png?t={{Timestamp}}"></image>
<view class="row" wx:for="{{message.msgVisitTime}}" wx:key="index"> <view class="num {{detail.IsLike && 'active'}}" wx:if="{{message.LikeTimes>0}}">
<view class="label">{{week[item.weekday-1]}}</view> {{message.LikeTimes}}
<view class="content">{{timeDay[item.timeType]}}</view> </view>
</view>
</block>
</view>
</view>
<view
class="adl"
wx:elif="{{message.msgContentType==='3'}}"
style="padding-top: {{top+25}}px;background: url({{imageUrl}}/doctor/d_interactive-adl-bg.png?t={{Timestamp}}) no-repeat bottom right / 268rpx 222rpx,#D74D75;"
>
<image
class="title"
src="{{imageUrl}}/doctor/d_interactiveTitle1.png?t={{Timestamp}}"
mode="aspectFit"
></image>
<view class="sub-title">ADL+激素双达标</view>
<view class="btn" bind:tap="handleAdl">点击进入ADL</view>
<view class="tip">建议您定期做ADL测评</view>
</view>
<view
class="audio"
wx:elif="{{message.msgContentType==='4'}}"
bind:tap="handleAudio"
data-index="{{mIndex}}"
>
<image
wx:if="{{message.isPlay}}"
class="icon"
src="{{imageUrl}}/doctor/audio-right.gif?t={{Timestamp}}"
mode="aspectFit"
></image>
<image
wx:else
class="icon"
src="{{imageUrl}}/doctor/audio-right.png?t={{Timestamp}}"
mode="aspectFit"
></image>
{{message.msgContent[0].duration}}''
</view>
<view class="info" wx:elif="{{message.msgContentType==='6'}}">
<view class="content">{{message.msgContent}}</view>
<view class="btn" bind:tap="handleFillUserInfo">提交您的真实姓名</view>
</view>
<view class="info" wx:elif="{{message.msgContentType==='7'}}">
<view class="content">{{message.msgContent}}</view>
<view class="btn" bind:tap="handleFillUserInfo">完善个人信息</view>
</view>
<view class="referral" bind:tap="handleReferral" wx:elif="{{message.msgContentType==='8'}}">
<view class="r-header">
<view class="title">您最近有按照医生的 提醒,定期复诊吗?</view>
<image class="icon" src="{{imageUrl}}5/hostipal.png?t={{Timestamp}}"></image>
</view>
<view class="r-footer">
<view class="btn">已复诊</view>
</view> </view>
</view> </view>
</view> </view>
@ -123,7 +70,7 @@
<view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent}}</view> <view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
</view> </view>
<view class="avatar"> <view class="avatar">
<image class="a-img" mode="aspectFill" src="{{userInfo.UserImg}}"></image> <image class="a-img" mode="aspectFill" src="{{userInfo.Avatar}}"></image>
</view> </view>
</view> </view>
</view> </view>
@ -131,14 +78,9 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="page-footer {{expend && 'expend'}}" catch:tap="handleFooter"> <view class="page-footer {{expend && 'expend'}}" catch:tap="handleFooter">
<view class="unread" catch:tap="handleRead" wx:if="{{unReadCount}}"> <view class="title">
您有{{unReadCount}}条新消息
<van-icon name="arrow-down" />
</view>
<view class="line"></view>
<view class="title" wx:if="{{!expend}}">
<image class="icon" src="{{imageUrl}}icon11.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon11.png?t={{Timestamp}}"></image>
请选择您要咨询的问题 我要提问
</view> </view>
<view class="tabs" wx:if="{{expend}}"> <view class="tabs" wx:if="{{expend}}">
<view <view
@ -148,12 +90,7 @@
catch:tap="handleQuestionTab" catch:tap="handleQuestionTab"
data-index="{{index}}" data-index="{{index}}"
> >
<image class="icon" src="{{imageUrl}}/doctor/d_interactivePatient-tab{{index%4+1}}.png?t={{Timestamp}}"></image> {{item.Name}}
<image
class="icon-active"
src="{{imageUrl}}/doctor/d_interactivePatient-tab-active{{index%4+1}}.png?t={{Timestamp}}"
></image>
{{item.typeName}}
</view> </view>
</view> </view>
<view class="list" wx:if="{{expend}}"> <view class="list" wx:if="{{expend}}">
@ -165,11 +102,10 @@
data-index="{{index}}" data-index="{{index}}"
> >
<view class="order">{{index+1}}</view> <view class="order">{{index+1}}</view>
<view class="content">{{item.question}}</view> <view class="content">{{item.Question}}</view>
<van-icon color="#ADB3B4" name="arrow" /> <van-icon color="#ADB3B4" name="arrow" />
</view> </view>
<image class="none" src="{{imageUrl}}none.png" mode="widthFix" wx:if="{{!questionActiveList.length}}"></image>
</view> </view>
</view> </view>
</view> </view>
<referralFrom model:show="{{referralFromShow}}" bind:refresh="handleReferralReplay"></referralFrom>

44
src/pages/index/index.scss

@ -80,16 +80,27 @@
.module-item { .module-item {
border-radius: 24rpx; border-radius: 24rpx;
background: #ffffff; background: #ffffff;
position: relative;
.item-img { .item-img {
border-radius: 24rpx 24rpx 0 0; border-radius: 24rpx;
width: 424rpx; width: 424rpx;
height: 220rpx; height: 317rpx;
} }
.item-title { .item-title {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
padding: 20rpx; padding: 20rpx;
font-size: 28rpx; font-size: 28rpx;
color: #010105; color: #010105;
line-height: 32rpx; line-height: 32rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
background-color: #fff;
border-radius: 0 0 24rpx 24rpx;
} }
} }
} }
@ -128,13 +139,18 @@
display: none; display: none;
} }
.module-item { .module-item {
flex-shrink: 0;
padding: 24rpx 32rpx; padding: 24rpx 32rpx;
width: 424rpx; width: 424rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 24rpx; border-radius: 24rpx;
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
background: linear-gradient(12deg, #ffffff 0%, #ffe8e6 100%); background: linear-gradient(12deg, #ffffff 0%, #ffe8e6 100%);
display: flex;
flex-direction: column;
justify-content: space-between;
.item-header { .item-header {
flex-shrink: 0;
padding-bottom: 24rpx; padding-bottom: 24rpx;
display: flex; display: flex;
align-items: center; align-items: center;
@ -152,20 +168,32 @@
} }
} }
.content { .content {
padding: 16rpx 0;
font-size: 28rpx; font-size: 28rpx;
color: #010105; color: #010105;
line-height: 48rpx; line-height: 48rpx;
height: 96rpx;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
} }
.item-footer { .item-footer {
flex-shrink: 0;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
margin-top: 24rpx; margin-top: 24rpx;
font-size: 24rpx; .star {
color: #f23a2f; font-size: 24rpx;
.icon { color: #f23a2f;
width: 24rpx; display: flex;
height: 28rpx; align-items: center;
.icon {
flex-shrink: 0;
width: 28rpx;
height: 28rpx;
}
} }
} }
} }

25
src/pages/index/index.ts

@ -11,6 +11,7 @@ Page({
userInfo: {}, userInfo: {},
bannerList: [], bannerList: [],
knowledgeList: [] as any, knowledgeList: [] as any,
questionList: [] as any,
pageTop: '', pageTop: '',
background: 'transparent', background: 'transparent',
@ -26,6 +27,7 @@ Page({
}) })
this.getBanner() this.getBanner()
this.getKnowledgeList() this.getKnowledgeList()
this.getQuestionList()
}) })
}, },
getBanner() { getBanner() {
@ -50,18 +52,32 @@ Page({
}) })
}) })
}, },
getQuestionList() {
wx.ajax({
method: 'GET',
url: '?r=wtx/common-question/index-list',
data: {},
}).then((res) => {
this.setData({
questionList: res.list,
})
})
},
onBannerItemTap(e: any) { onBannerItemTap(e: any) {
app.mpBehavior({ PageName: 'BTN_HOMEBANNER' })
const { path } = e.currentTarget.dataset const { path } = e.currentTarget.dataset
wx.navigateTo({ wx.navigateTo({
url: path, url: path,
}) })
}, },
handleKnowledge() { handleKnowledge() {
app.mpBehavior({ PageName: 'BTN_HOMEEDUCATIONALL' })
wx.switchTab({ wx.switchTab({
url: '/pages/knowledge/index', url: '/pages/knowledge/index',
}) })
}, },
handleKnowledgeDetail(e: any) { handleKnowledgeDetail(e: any) {
app.mpBehavior({ PageName: 'BTN_HOMEEDUCATIONCARD' })
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
const params = this.data.knowledgeList[index] const params = this.data.knowledgeList[index]
if (params.Type == 1) { if (params.Type == 1) {
@ -76,6 +92,15 @@ Page({
}, },
routerTo(e) { routerTo(e) {
const { url } = e.currentTarget.dataset const { url } = e.currentTarget.dataset
let PageName = {
'/pages/applyFrom/index': 'BTN_HOMEPREAPPLYCARD',
}[url]
if (url.includes('/pages/ask/index')) {
PageName = 'BTN_HOMEFAQENTRY'
}
if (PageName) {
app.mpBehavior({ PageName })
}
wx.navigateTo({ wx.navigateTo({
url, url,
}) })

10
src/pages/index/index.wxml

@ -43,7 +43,7 @@
bindtap="handleKnowledgeDetail" bindtap="handleKnowledgeDetail"
data-index="{{index}}" data-index="{{index}}"
> >
<image class="item-img" src="{{item.CoverImg}}"></image> <image class="item-img" mode="aspectFill" src="{{item.CoverImg}}"></image>
<view class="item-title">{{item.Title}}</view> <view class="item-title">{{item.Title}}</view>
</view> </view>
</view> </view>
@ -57,16 +57,16 @@
</view> </view>
</view> </view>
<view class="module-list"> <view class="module-list">
<view class="module-item" bindtap="onModuleItemTap" data-id="1"> <view class="module-item" wx:for="{{questionList}}" wx:key="Id" bindtap="routerTo" data-url="/pages/ask/index?id={{item.Id}}">
<view class="item-header"> <view class="item-header">
<image class="icon" src="{{imageUrl}}icon2.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon2.png?t={{Timestamp}}"></image>
<view class="title">基因疗法适合多大年龄?</view> <view class="title">{{item.Question}}</view>
</view> </view>
<view class="content">目前的治疗方案适合 18 岁以上成人,暂不支持儿童及...</view> <view class="content">{{item.Answer}}</view>
<view class="item-footer"> <view class="item-footer">
<view class="star"> <view class="star">
<image class="icon" src="{{imageUrl}}icon3.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon3.png?t={{Timestamp}}"></image>
123 {{item.LikeTimes}}
</view> </view>
</view> </view>
</view> </view>

14
src/pages/knowledge/index.scss

@ -7,11 +7,14 @@ page {
.list { .list {
.list-item { .list-item {
margin-bottom: 24rpx; margin-bottom: 24rpx;
padding: 30rpx;
border-radius: 24rpx;
display: flex; display: flex;
background-color: #fff;
.photo { .photo {
flex-shrink: 0; flex-shrink: 0;
width: 208rpx; width: 208rpx;
height: 140rpx; height: 156rpx;
.photo-img { .photo-img {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -21,10 +24,19 @@ page {
.wrap { .wrap {
flex: 1; flex: 1;
padding-left: 24rpx; padding-left: 24rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title { .title {
font-size: 32rpx; font-size: 32rpx;
color: rgba(1, 1, 5, 1); color: rgba(1, 1, 5, 1);
line-height: 44rpx; line-height: 44rpx;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
} }
.w-footer { .w-footer {
margin-top: 20rpx; margin-top: 20rpx;

1
src/pages/knowledge/index.ts

@ -13,6 +13,7 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.mpBehavior({ PageName: 'PG_EDUCATION' })
this.getList() this.getList()
}) })
}, },

3
src/pages/knowledgeDetail/index.json

@ -1,6 +1,7 @@
{ {
"navigationBarTitleText": "知识库详情", "navigationBarTitleText": "知识库详情",
"usingComponents": { "usingComponents": {
"mp-html": "mp-html" "mp-html": "mp-html",
"star": "/components/star/index"
} }
} }

19
src/pages/knowledgeDetail/index.scss

@ -1,5 +1,5 @@
.page { .page {
padding: 60rpx 30rpx; padding: 60rpx 30rpx calc(120rpx + env(safe-area-inset-bottom));
.title { .title {
font-size: 40rpx; font-size: 40rpx;
color: rgba(1, 1, 5, 1); color: rgba(1, 1, 5, 1);
@ -30,6 +30,18 @@
} }
} }
} }
.animate {
position: fixed;
z-index: 1;
left: 1000000px;
bottom: calc(env(safe-area-inset-bottom) + 80rpx);
transform: translateX(-50%);
width: 200rpx;
height: 400rpx;
&.active {
left: 75%;
}
}
.footer { .footer {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
@ -59,7 +71,10 @@
.num { .num {
margin-left: 12rpx; margin-left: 12rpx;
font-size: 32rpx; font-size: 32rpx;
color: rgba(242, 58, 47, 1); color: rgba(1, 1, 5, 0.4);
&.active {
color: rgba(242, 58, 47, 1);
}
} }
} }
.line { .line {

25
src/pages/knowledgeDetail/index.ts

@ -1,3 +1,4 @@
const dayjs = require('dayjs')
const licia = require('miniprogram-licia') const licia = require('miniprogram-licia')
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
@ -6,6 +7,8 @@ Page({
id: '', id: '',
detail: {} as any, detail: {} as any,
LikeTimes: 0, LikeTimes: 0,
starShow: false,
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
@ -34,16 +37,30 @@ Page({
Id: this.data.id, Id: this.data.id,
}, },
}).then((res) => { }).then((res) => {
res.UpdateTime = dayjs(res.UpdateTime).format('YYYY-MM-DD')
this.setData({ this.setData({
detail: res, detail: res,
}) })
}) })
}, },
_timer: null as any,
handleLike() { handleLike() {
this.setData({ this.setData({
'detail.LikeTimes': Number(this.data.detail.LikeTimes) + 1, 'detail.LikeTimes': Number(this.data.detail.LikeTimes) + 1,
'detail.IsLike': true,
LikeTimes: this.data.LikeTimes + 1, LikeTimes: this.data.LikeTimes + 1,
starShow: true,
}) })
const header = this.selectComponent('#animate')
header.start()
if (this._timer) {
clearInterval(this._timer)
}
this._timer = setTimeout(() => {
this.setData({
starShow: false,
})
}, 2000)
this.likePost() this.likePost()
}, },
likePost: licia.debounce(function (this: any) { likePost: licia.debounce(function (this: any) {
@ -58,17 +75,17 @@ Page({
Id: id, Id: id,
LikeTimes, LikeTimes,
}, },
}).then(() => {
this.getDetail()
}) })
}, 1000), }, 1000),
onShareAppMessage() { onShareAppMessage() {
this.setData({
'detail.ShareTimes': Number(this.data.detail.ShareTimes) + 1,
'detail.IsShare': true,
})
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=wtx/knowledge/share', url: '?r=wtx/knowledge/share',
data: { Id: this.data.id }, data: { Id: this.data.id },
}).then(() => {
this.getDetail()
}) })
}, },
}) })

11
src/pages/knowledgeDetail/index.wxml

@ -8,15 +8,18 @@
</view> </view>
</view> </view>
<mp-html class="mp-html" content="{{detail.Content}}"></mp-html> <mp-html class="mp-html" content="{{detail.Content}}"></mp-html>
<star id="animate" class="animate {{starShow&&'active'}}"></star>
<view class="footer"> <view class="footer">
<button class="btn" open-type="share"> <button class="btn" open-type="share">
<image class="icon" src="{{imageUrl}}icon7.png?t={{Timestamp}}"></image> <image wx:if="{{detail.IsShare}}" class="icon" src="{{imageUrl}}icon7.png?t={{Timestamp}}"></image>
<view class="num" wx:if="{{detail.ShareTimes>0}}">{{detail.ShareTimes}}</view> <image wx:else class="icon" src="{{imageUrl}}icon9.png?t={{Timestamp}}"></image>
<view class="num {{detail.IsShare && 'active'}}" wx:if="{{detail.ShareTimes>0}}">{{detail.ShareTimes}}</view>
</button> </button>
<view class="line"></view> <view class="line"></view>
<view class="btn" bindtap="handleLike"> <view class="btn" bindtap="handleLike">
<image class="icon" src="{{imageUrl}}icon8.png?t={{Timestamp}}"></image> <image wx:if="{{detail.IsLike}}" class="icon" src="{{imageUrl}}icon8.png?t={{Timestamp}}"></image>
<view class="num" wx:if="{{detail.LikeTimes>0}}">{{detail.LikeTimes}}</view> <image wx:else class="icon" src="{{imageUrl}}icon10.png?t={{Timestamp}}"></image>
<view class="num {{detail.IsLike && 'active'}}" wx:if="{{detail.LikeTimes>0}}">{{detail.LikeTimes}}</view>
</view> </view>
</view> </view>
</view> </view>

4
src/pages/knowledgeDetailVideo/index.json

@ -2,6 +2,8 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"mp-video-swiper": "@miniprogram-component-plus/video-swiper", "mp-video-swiper": "@miniprogram-component-plus/video-swiper",
"navbar": "/components/navbar/index" "navbar": "/components/navbar/index",
"van-slider": "@vant/weapp/slider/index",
"star": "/components/star/index"
} }
} }

34
src/pages/knowledgeDetailVideo/index.scss

@ -7,10 +7,18 @@
position: relative; position: relative;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
.video{ .video {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.play {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90rpx;
height: 104rpx;
}
.swiper-item-footer { .swiper-item-footer {
padding: 80rpx 30rpx calc(34rpx + env(safe-area-inset-bottom)); padding: 80rpx 30rpx calc(34rpx + env(safe-area-inset-bottom));
width: 100%; width: 100%;
@ -23,8 +31,15 @@
font-size: 32rpx; font-size: 32rpx;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
} }
.progress {
margin-top: 24rpx;
.slider-btn {
width: 200vw;
height: 80rpx;
}
}
.container { .container {
margin-top: 32rpx; margin-top: 24rpx;
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
@ -69,6 +84,9 @@
margin-top: 6rpx; margin-top: 6rpx;
font-size: 32rpx; font-size: 32rpx;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
&.active {
color: rgba(246, 74, 58, 1);
}
} }
} }
} }
@ -77,3 +95,15 @@
} }
} }
} }
.animate {
position: fixed;
z-index: 10000000;
right: 1000000px;
bottom: calc(env(safe-area-inset-bottom) + 110rpx);
width: 200rpx;
height: 400rpx;
&.active {
right: -20rpx;
}
}

152
src/pages/knowledgeDetailVideo/index.ts

@ -15,6 +15,8 @@ Page({
beforeEnd: false, beforeEnd: false,
afterLoading: false, afterLoading: false,
afterEnd: false, afterEnd: false,
starShow: false,
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
@ -43,50 +45,55 @@ Page({
data: { data: {
Id: this.data.id, Id: this.data.id,
}, },
}).then((res) => { }).then(async (res) => {
this.setData({ this.setData({
videoList: [res], videoList: [res],
afterLoading: true, afterLoading: true,
beforeLoading: true, beforeLoading: true,
}) })
this.playCurrentVideo() this.playCurrentVideo()
this.getList('before') await this.getList('after')
this.getList('after') await this.getList('before')
}) })
}, },
getList(sort: 'before' | 'after') { getList(sort: 'before' | 'after') {
const { videoList, id, current } = this.data const { id } = this.data
wx.ajax({ return wx
method: 'GET', .ajax({
url: '?r=wtx/knowledge/video-sort-list', method: 'GET',
data: { url: '?r=wtx/knowledge/video-sort-list',
Id: id, data: {
sort, Id: id,
}, sort,
}).then((res) => { },
if (sort === 'before') { })
const newVideoList = [...res.list, ...videoList] .then((res) => {
this.setData({ const { videoList, current } = this.data
videoList: newVideoList, if (sort === 'before') {
beforeLoading: false, const newVideoList = [...res.list, ...videoList]
current: newVideoList.length - 1 + current, this.setData({
beforeEnd: res.length === 0, videoList: newVideoList,
}) beforeLoading: false,
} current: res.list.length + current,
if (sort === 'after') { beforeEnd: res.length === 0,
this.setData({ })
videoList: videoList.concat(res.list), }
afterLoading: false, if (sort === 'after') {
afterEnd: res.length === 0, const newVideoList = [...videoList, ...res.list]
}) this.setData({
} videoList: newVideoList,
}) afterLoading: false,
afterEnd: res.length === 0,
})
}
})
}, },
handleChange(e: any) { handleChange(e: any) {
const { beforeLoading, afterLoading, beforeEnd, afterEnd, videoList } = this.data const { beforeLoading, afterLoading, beforeEnd, afterEnd, videoList } = this.data
const { current } = e.detail const { current } = e.detail
this.setData({ this.setData({
current, current,
starShow: false,
}) })
if (current === 0 && !beforeLoading && beforeEnd) { if (current === 0 && !beforeLoading && beforeEnd) {
this.setData({ this.setData({
@ -108,6 +115,7 @@ Page({
if (!item.ctx) { if (!item.ctx) {
item.ctx = wx.createVideoContext(`video-${item.Id}`) item.ctx = wx.createVideoContext(`video-${item.Id}`)
} }
item.drag = false
if (index === current) { if (index === current) {
item.ctx.play() item.ctx.play()
} else { } else {
@ -115,15 +123,85 @@ Page({
} }
}) })
}, },
handleLike() { handlePlay(e: any) {
const { current, videoList } = this.data const { index } = e.currentTarget.dataset
const currentVideo = videoList[current] const key = `videoList[${index}].play`
this.setData({
[key]: true,
})
},
handlePause(e: any) {
const { index } = e.currentTarget.dataset
const key = `videoList[${index}].play`
this.setData({
[key]: false,
})
},
handleTimeUpdate(e: any) {
const { index } = e.currentTarget.dataset
const { videoList } = this.data
if (videoList[index].drag) return
const { currentTime, duration } = e.detail
const progress = (currentTime / duration) * 100
const progressKey = `videoList[${index}].progress`
const durationKey = `videoList[${index}].duration`
this.setData({
[progressKey]: progress,
[durationKey]: duration,
})
},
handleCustomPasue(e) {
const { index } = e.currentTarget.dataset
const { videoList } = this.data
videoList[index].ctx.pause()
},
handleCustomPlay(e: any) {
const { index } = e.currentTarget.dataset
const { videoList } = this.data
videoList[index].ctx.play()
},
handleDragStart(e: any) {
const { index } = e.currentTarget.dataset
const key = `videoList[${index}].drag`
this.setData({
[key]: true,
})
},
handleDragEnd(e: any) {
const { index } = e.currentTarget.dataset
const { videoList } = this.data
const duration = videoList[index].duration
const drapProgress = e.detail
const currentTime = (drapProgress / 100) * duration
videoList[index].ctx.seek(currentTime)
const dragKey = `videoList[${index}].drag`
this.setData({
[dragKey]: false,
})
},
_timer: null as any,
handleLike(e: any) {
const { index } = e.currentTarget.dataset
const { videoList } = this.data
const currentVideo = videoList[index]
const LikeTimes = Number(currentVideo.LikeTimes) + 1 const LikeTimes = Number(currentVideo.LikeTimes) + 1
const key = `videoList[${current}].LikeTimes` const key = `videoList[${index}].LikeTimes`
this.setData({ this.setData({
LikeTimes: this.data.LikeTimes + 1, LikeTimes: this.data.LikeTimes + 1,
[key]: LikeTimes, [key]: LikeTimes,
[`videoList[${index}].IsLike`]: true,
starShow: true,
}) })
const header = this.selectComponent('#animate')
header.start()
if (this._timer) {
clearInterval(this._timer)
}
this._timer = setTimeout(() => {
this.setData({
starShow: false,
})
}, 2000)
this.likePost() this.likePost()
}, },
likePost: licia.debounce(function (this: any) { likePost: licia.debounce(function (this: any) {
@ -141,12 +219,16 @@ Page({
}) })
}, 1000), }, 1000),
onShareAppMessage() { onShareAppMessage() {
const { current, videoList } = this.data
const currentVideo = videoList[current]
this.setData({
[`videoList[${current}].ShareTimes`]: Number(currentVideo.ShareTimes) + 1,
[`videoList[${current}].IsShare`]: true,
})
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=wtx/knowledge/share', url: '?r=wtx/knowledge/share',
data: { Id: this.data.activeId }, data: { Id: this.data.activeId },
}).then(() => {
this.getDetail()
}) })
}, },
handleBack() { handleBack() {

50
src/pages/knowledgeDetailVideo/index.wxml

@ -1,5 +1,5 @@
<navbar fixed custom-style="background:{{background}};color:#fff"> <navbar fixed custom-style="background:{{background}};color:#fff">
<van-icon name="arrow-left" slot="left" size="18px" color="#fff" bind:tap="handleBack"/> <van-icon name="arrow-left" slot="left" size="18px" color="#fff" bind:tap="handleBack" />
<view slot="title" style="color: #fff">视频</view> <view slot="title" style="color: #fff">视频</view>
</navbar> </navbar>
<view class="page"> <view class="page">
@ -9,29 +9,59 @@
id="video-{{item.Id}}" id="video-{{item.Id}}"
class="video" class="video"
src="{{item.VideoSrc}}" src="{{item.VideoSrc}}"
poster="{{item.CoverImg}}"
loop loop
object-fit="cover" object-fit="cover"
enable-play-gesture enable-play-gesture
enable-progress-gesture enable-progress-gesture
show-center-play-btn="{{false}}" show-center-play-btn="{{false}}"
play-btn-position="center"
controls="{{false}}" controls="{{false}}"
bindprogress="handleProgress"
bindplay="handlePlay"
bindpause="handlePause"
bindtimeupdate="handleTimeUpdate"
data-index="{{index}}"
bind:tap="handleCustomPasue"
></video> ></video>
<image
wx:if="{{!item.play}}"
class="play"
class="play"
src="{{imageUrl}}icon19.png?t={{Timestamp}}"
catch:tap="handleCustomPlay"
data-index="{{index}}"
></image>
<view class="swiper-item-footer"> <view class="swiper-item-footer">
<view class="title">{{item.Title}}{{item.Id}}</view> <view class="title">{{item.Title}}</view>
<view class="progress">
<van-slider
value="{{item.progress}}"
active-color="#fff"
bar-height="4"
inactive-color="rgba(255, 255, 255, 0.29)"
bind:drag-start="handleDragStart"
bind:change="handleDragEnd"
use-button-slot
data-index="{{index}}"
>
<view class="slider-btn" slot="button"></view>
</van-slider>
</view>
<view class="container"> <view class="container">
<view class="user"> <view class="user">
<image class="avatar" src="/images/logo1.png"></image> <image class="avatar" src="{{imageUrl}}logo1.png?t={{Timestamp}}"></image>
<view class="name">基因知识库</view> <view class="name">基因知识库</view>
</view> </view>
<view class="options"> <view class="options">
<button class="o-item" open-type="share"> <button class="o-item" open-type="share">
<image class="icon" src="{{imageUrl}}icon9.png?t={{Timestamp}}"></image> <image wx:if="{{item.IsShare}}" class="icon" src="{{imageUrl}}icon7.png?t={{Timestamp}}"></image>
<view class="num">{{item.ShareTimes}}</view> <image wx:else class="icon" src="{{imageUrl}}icon20.png?t={{Timestamp}}"></image>
<view class="num {{item.IsShare && 'active'}}">{{item.ShareTimes}}</view>
</button> </button>
<view class="o-item" bind:tap="handleLike"> <view class="o-item" bind:tap="handleLike" data-index="{{index}}">
<image class="icon" src="{{imageUrl}}icon10.png?t={{Timestamp}}"></image> <image wx:if="{{item.IsLike}}" class="icon" src="{{imageUrl}}icon8.png?t={{Timestamp}}"></image>
<view class="num">{{item.LikeTimes}}</view> <image wx:else class="icon" src="{{imageUrl}}icon21.png?t={{Timestamp}}"></image>
<view class="num {{item.IsLike && 'active'}}">{{item.LikeTimes}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -39,3 +69,5 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<star id="animate" class="animate {{starShow&&'active'}}"></star>

6
src/pages/login/index.wxml

@ -1,7 +1,7 @@
<view class="page" style="background: url('/images/bg5.png') no-repeat top center/cover;"> <view class="page" style="background: url('{{imageUrl}}bg5.png?t={{Timestamp}}') no-repeat top center/cover;">
<view class="container"> <view class="container">
<image class="logo" src="/images/logo1.png"></image> <image class="logo" src="{{imageUrl}}logo1.png?t={{Timestamp}}"></image>
<image class="title" src="/images/login-title1.png"></image> <image class="title" src="{{imageUrl}}login-title1.png?t={{Timestamp}}"></image>
<button class="btn" open-type="getPhoneNumber" bindgetphonenumber="handlePhone">手机号快速授权</button> <button class="btn" open-type="getPhoneNumber" bindgetphonenumber="handlePhone">手机号快速授权</button>
</view> </view>
</view> </view>

7
src/pages/my/index.scss

@ -43,10 +43,9 @@ page {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 28rpx; font-size: 28rpx;
color: rgba(1, 1, 5, 0.4); color: rgba(1, 1, 5, 0.4);
.num { line-height: 36rpx;
font-size: 36rpx; display: flex;
color: rgba(242, 58, 47, 1); align-items: baseline;
}
} }
} }
.apply { .apply {

11
src/pages/my/index.ts

@ -8,9 +8,12 @@ Page({
}, },
onLoad() { onLoad() {
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.mpBehavior({ PageName: 'PG_MY' })
app.getUserInfo().then((userInfo) => { app.getUserInfo().then((userInfo) => {
this.setData({ this.setData({
userInfo, userInfo,
// 数字变红
Days: userInfo.Days.replace(/(\d+)/g, '<span style="font-size: 20px;color: rgba(242, 58, 47, 1);">$1</span>'),
}) })
}) })
}) })
@ -65,7 +68,13 @@ Page({
url, url,
}) })
}, },
handleNone() { handleNone(e: any) {
const { index } = e.currentTarget.dataset
const PageName = {
1: 'BTN_MY_SWITCHPATIENT',
2: 'BTN_MY_SWITCH_DOCTOR',
}[index]
app.mpBehavior({ PageName })
this.setData({ this.setData({
popupShow: true, popupShow: true,
popupType: 'stayTuned', popupType: 'stayTuned',

6
src/pages/my/index.wxml

@ -12,7 +12,7 @@
</view> </view>
<view class="day"> <view class="day">
今天是陪伴您的第 今天是陪伴您的第
<text class="num">{{userInfo.Days}}</text> <rich-text class="rich" nodes="{{Days}}"></rich-text>
</view> </view>
</view> </view>
</view> </view>
@ -34,7 +34,7 @@
<view class="name">切换身份</view> <view class="name">切换身份</view>
</view> </view>
<!-- <view class="item" bind:tap="routerTo" data-url="/patient/pages/protocol/index"> --> <!-- <view class="item" bind:tap="routerTo" data-url="/patient/pages/protocol/index"> -->
<view class="item" bind:tap="handleNone"> <view class="item" bind:tap="handleNone" data-index="1">
<image class="icon" src="{{imageUrl}}icon13.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon13.png?t={{Timestamp}}"></image>
<view class="wrap"> <view class="wrap">
<view class="name">我已开启基因治疗</view> <view class="name">我已开启基因治疗</view>
@ -42,7 +42,7 @@
</view> </view>
<image class="icon2" src="{{imageUrl}}icon12.png?t={{Timestamp}}"></image> <image class="icon2" src="{{imageUrl}}icon12.png?t={{Timestamp}}"></image>
</view> </view>
<view class="item" bind:tap="handleNone"> <view class="item" bind:tap="handleNone" data-index="2">
<image class="icon" src="{{imageUrl}}icon14.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon14.png?t={{Timestamp}}"></image>
<view class="wrap"> <view class="wrap">
<view class="name">我是医生</view> <view class="name">我是医生</view>

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

@ -75,7 +75,7 @@
<van-icon name="arrow" /> <van-icon name="arrow" />
</view> </view>
</view> </view>
<image class="m-card" src="/images/banner1.png"></image> <image class="m-card" src="{{imageUrl}}banner1.png?t={{Timestamp}}"></image>
</view> </view>
<view class="module2"> <view class="module2">
<view class="m-header"> <view class="m-header">

2
typings/index.d.ts vendored

@ -44,7 +44,7 @@ interface IAppOption {
getUserInfo: () => Promise<any> getUserInfo: () => Promise<any>
startLogin: () => void startLogin: () => void
waitLogin: () => Promise<void> waitLogin: () => Promise<void>
mpBehavior: (data: { PageName: string; doctor?: boolean }) => void mpBehavior: (data: { PageName: string; type?: 0 | 1 | 2 | 3 }) => void
globalSystemInfo?: globalSystemInfo globalSystemInfo?: globalSystemInfo
[propName: string]: any [propName: string]: any
} }

Loading…
Cancel
Save