hh-doctor-sdk 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/consultation/detail/behaviors/consultation-header-media-behaviors.js +2 -1
- package/components/consultation/detail/consultation-detail-page.js +2 -1
- package/components/copy-url-page/copy-url-page.js +101 -0
- package/components/copy-url-page/copy-url-page.json +4 -0
- package/components/copy-url-page/copy-url-page.wxml +45 -0
- package/components/copy-url-page/copy-url-page.wxss +118 -0
- package/components/hh-navigation.js +10 -1
- package/components/video-chat-page/video-chat-page.js +2 -1
- package/package.json +1 -1
|
@@ -134,7 +134,8 @@ module.exports = Behavior({
|
|
|
134
134
|
} else if (media.type == 5) {
|
|
135
135
|
if (media.files && media.files.length > 0) {
|
|
136
136
|
const url = media.files[0].url
|
|
137
|
-
hhNavigation.webPage(url)
|
|
137
|
+
// hhNavigation.webPage(url)
|
|
138
|
+
hhNavigation.copyUrl(url)
|
|
138
139
|
}
|
|
139
140
|
} else if (media.type == 6) { // 病理
|
|
140
141
|
let hospitalId = this.data.order.doctor.hospitalid
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// components/copy-url-page/copy-url-page.js
|
|
2
|
+
Page({
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 页面的初始数据
|
|
6
|
+
*/
|
|
7
|
+
data: {
|
|
8
|
+
top: 0,
|
|
9
|
+
height: 0,
|
|
10
|
+
url: null,
|
|
11
|
+
platform: null,
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 生命周期函数--监听页面加载
|
|
16
|
+
*/
|
|
17
|
+
onLoad(options) {
|
|
18
|
+
const url = decodeURIComponent(options.url || '')
|
|
19
|
+
this.setData({
|
|
20
|
+
url: url
|
|
21
|
+
})
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 生命周期函数--监听页面初次渲染完成
|
|
26
|
+
*/
|
|
27
|
+
onReady() {
|
|
28
|
+
const {
|
|
29
|
+
top,
|
|
30
|
+
height
|
|
31
|
+
} = wx.getMenuButtonBoundingClientRect()
|
|
32
|
+
const systemInfo = wx.getDeviceInfo()
|
|
33
|
+
const platform = systemInfo.platform
|
|
34
|
+
this.setData({
|
|
35
|
+
top: top,
|
|
36
|
+
height: height,
|
|
37
|
+
platform: platform
|
|
38
|
+
})
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 生命周期函数--监听页面显示
|
|
43
|
+
*/
|
|
44
|
+
onShow() {
|
|
45
|
+
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 生命周期函数--监听页面隐藏
|
|
50
|
+
*/
|
|
51
|
+
onHide() {
|
|
52
|
+
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 生命周期函数--监听页面卸载
|
|
57
|
+
*/
|
|
58
|
+
onUnload() {
|
|
59
|
+
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 页面相关事件处理函数--监听用户下拉动作
|
|
64
|
+
*/
|
|
65
|
+
onPullDownRefresh() {
|
|
66
|
+
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 页面上拉触底事件的处理函数
|
|
71
|
+
*/
|
|
72
|
+
onReachBottom() {
|
|
73
|
+
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 用户点击右上角分享
|
|
78
|
+
*/
|
|
79
|
+
onShareAppMessage() {
|
|
80
|
+
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
backtap() {
|
|
84
|
+
wx.navigateBack()
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
copyUrl() {
|
|
88
|
+
const url = this.data.url
|
|
89
|
+
wx.setClipboardData({
|
|
90
|
+
data: url,
|
|
91
|
+
success(res) {
|
|
92
|
+
// setTimeout(() => {
|
|
93
|
+
// wx.navigateBack()
|
|
94
|
+
// }, 1500);
|
|
95
|
+
},
|
|
96
|
+
fail(err) {
|
|
97
|
+
// console.error(`copy failed ${JSON.stringify(err)}`)
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
})
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<view class="page">
|
|
2
|
+
<view class="header-background">
|
|
3
|
+
<image
|
|
4
|
+
class="hh-logo"
|
|
5
|
+
src="https://image.hh-medic.com/icon/pacs/icon_hh_logo.png"
|
|
6
|
+
>
|
|
7
|
+
</image>
|
|
8
|
+
</view>
|
|
9
|
+
<view class="display-box">
|
|
10
|
+
<view class="display-title">
|
|
11
|
+
小程序限制无法打开医院云阅片功能。 解决方法如下:
|
|
12
|
+
<image
|
|
13
|
+
class="daniu"
|
|
14
|
+
src="https://image.hh-medic.com/icon/pacs/icon_daniu.png"
|
|
15
|
+
>
|
|
16
|
+
</image>
|
|
17
|
+
</view>
|
|
18
|
+
<view class="control-box">
|
|
19
|
+
<view class="control-box-inner">
|
|
20
|
+
<view class="copy-line">
|
|
21
|
+
1、点击复制地址后去{{platform == 'ios' ? 'Safari' :
|
|
22
|
+
''}}浏览器打开
|
|
23
|
+
<view class="copy-button-box">
|
|
24
|
+
<button class="copy-button" bind:tap="copyUrl">
|
|
25
|
+
复制
|
|
26
|
+
</button>
|
|
27
|
+
</view>
|
|
28
|
+
</view>
|
|
29
|
+
<view>2、用和缓名医app打开后查看</view>
|
|
30
|
+
</view>
|
|
31
|
+
</view>
|
|
32
|
+
</view>
|
|
33
|
+
|
|
34
|
+
<view
|
|
35
|
+
class="nav-container"
|
|
36
|
+
style="top:{{top}}px; height: {{height}}px;"
|
|
37
|
+
bind:tap="backtap"
|
|
38
|
+
>
|
|
39
|
+
<image
|
|
40
|
+
class="back-button"
|
|
41
|
+
src="https://image.hh-medic.com/icon/pacs/icon_back_button.png"
|
|
42
|
+
>
|
|
43
|
+
</image>
|
|
44
|
+
</view>
|
|
45
|
+
</view>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
.page {
|
|
2
|
+
background-color: rgba(255, 255, 255, 1);
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.header-background {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 524rpx;
|
|
12
|
+
background: linear-gradient(166deg, #b4cff9 0%, #ffffff 100%);
|
|
13
|
+
border-radius: 1rpx;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.hh-logo {
|
|
21
|
+
position: absolute;
|
|
22
|
+
width: 151rpx;
|
|
23
|
+
height: 169rpx;
|
|
24
|
+
margin-top: 100rpx;
|
|
25
|
+
bottom: 141rpx;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.nav-container {
|
|
29
|
+
width: 60rpx;
|
|
30
|
+
position: absolute;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
left: 0;
|
|
35
|
+
top: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.back-button {
|
|
39
|
+
width: 20rpx;
|
|
40
|
+
height: 35rpx;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.display-box {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.display-title {
|
|
50
|
+
position: relative;
|
|
51
|
+
display: flex;
|
|
52
|
+
height: 159rpx;
|
|
53
|
+
margin: -20rpx 80rpx 0 80rpx;
|
|
54
|
+
background-color: #0066ff;
|
|
55
|
+
border-radius: 20rpx;
|
|
56
|
+
color: white;
|
|
57
|
+
font-size: 32rpx;
|
|
58
|
+
font-weight: bold;
|
|
59
|
+
word-wrap: break-word;
|
|
60
|
+
line-height: 2;
|
|
61
|
+
z-index: 1;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
padding: 0 30rpx;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.daniu {
|
|
68
|
+
width: 164rpx;
|
|
69
|
+
height: 215rpx;
|
|
70
|
+
position: absolute;
|
|
71
|
+
z-index: 3;
|
|
72
|
+
right: 100rpx;
|
|
73
|
+
top: 70rpx;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.control-box {
|
|
77
|
+
background-color: white;
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: row;
|
|
80
|
+
width: calc(100% - 64rpx);
|
|
81
|
+
border-radius: 20rpx;
|
|
82
|
+
margin-top: 54rpx;
|
|
83
|
+
border: #0066ff 2rpx solid;
|
|
84
|
+
z-index: 3;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.control-box-inner {
|
|
88
|
+
margin: 30rpx 20rpx 30rpx 30rpx;
|
|
89
|
+
line-height: 2;
|
|
90
|
+
font-size: 32rpx;
|
|
91
|
+
color: #646464;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.copy-line {
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: row;
|
|
97
|
+
align-items: center;
|
|
98
|
+
margin-top: -10rpx;
|
|
99
|
+
align-items: flex-start;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.copy-button-box {
|
|
104
|
+
width: 150rpx;
|
|
105
|
+
margin-left: 20rpx;
|
|
106
|
+
margin-right: 20rpx;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.copy-button {
|
|
110
|
+
width: 150rpx;
|
|
111
|
+
line-height: 2;
|
|
112
|
+
font-weight: bold;
|
|
113
|
+
border-radius: 12rpx;
|
|
114
|
+
border: 2rpx #f0f0f0 solid;
|
|
115
|
+
background: #0066ff;
|
|
116
|
+
color: white;
|
|
117
|
+
font-size: 28rpx;
|
|
118
|
+
}
|
|
@@ -5,7 +5,8 @@ const pages = {
|
|
|
5
5
|
webPage: 'uikit/web-view-page/web-view-page',
|
|
6
6
|
evaluate: 'consultation/evaluate/evaluate-page',
|
|
7
7
|
videoChat: 'video-chat-page/video-chat-page',
|
|
8
|
-
pathology: 'pathology/pathology-page'
|
|
8
|
+
pathology: 'pathology/pathology-page',
|
|
9
|
+
copyUrl: 'copy-url-page/copy-url-page'
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
|
|
@@ -92,6 +93,13 @@ function pathology(orderId, hospitalId, path, forDicom) {
|
|
|
92
93
|
)
|
|
93
94
|
}
|
|
94
95
|
|
|
96
|
+
function copyUrl(url) {
|
|
97
|
+
let params = {
|
|
98
|
+
'url': url
|
|
99
|
+
}
|
|
100
|
+
navigateTo(pages.copyUrl, params)
|
|
101
|
+
}
|
|
102
|
+
|
|
95
103
|
module.exports = {
|
|
96
104
|
navigateTo,
|
|
97
105
|
orderList,
|
|
@@ -101,4 +109,5 @@ module.exports = {
|
|
|
101
109
|
evaluate,
|
|
102
110
|
videoChat,
|
|
103
111
|
pathology,
|
|
112
|
+
copyUrl
|
|
104
113
|
}
|
|
@@ -214,7 +214,8 @@ Page({
|
|
|
214
214
|
} else if (type === 'pdf') {
|
|
215
215
|
pdfViewer.viewPdf(url)
|
|
216
216
|
} else if (type === 'url') {
|
|
217
|
-
hhNavigation.webPage(url)
|
|
217
|
+
// hhNavigation.webPage(url)
|
|
218
|
+
hhNavigation.copyUrl(url)
|
|
218
219
|
} else if (type === 'dicom') {
|
|
219
220
|
hhNavigation.pathology(this.data.orderId, null, null, true)
|
|
220
221
|
} else if (type === 'bingli') {
|