hh-doctor-sdk 0.3.4 → 0.3.5

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.
@@ -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
@@ -113,7 +113,8 @@ Page({
113
113
 
114
114
  _tapLink(event) {
115
115
  const url = event.currentTarget.dataset.link
116
- hhNavigation.webPage(url)
116
+ // hhNavigation.webPage(url)
117
+ hhNavigation.copyUrl(url)
117
118
  },
118
119
 
119
120
  _playAudio(event) {
@@ -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,4 @@
1
+ {
2
+ "usingComponents": {},
3
+ "navigationStyle": "custom"
4
+ }
@@ -0,0 +1,41 @@
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
+ <button class="copy-button" bind:tap="copyUrl">复制</button>
24
+ </view>
25
+ <view>2、用和缓名医app打开后查看</view>
26
+ </view>
27
+ </view>
28
+ </view>
29
+
30
+ <view
31
+ class="nav-container"
32
+ style="top:{{top}}px; height: {{height}}px;"
33
+ bind:tap="backtap"
34
+ >
35
+ <image
36
+ class="back-button"
37
+ src="https://image.hh-medic.com/icon/pacs/icon_back_button.png"
38
+ >
39
+ </image>
40
+ </view>
41
+ </view>
@@ -0,0 +1,114 @@
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: column;
80
+ width: calc(100% - 64rpx);
81
+ border-radius: 20rpx;
82
+ margin-top: 54rpx;
83
+ border: #0066ff 2rpx solid;
84
+ align-items: center;
85
+ z-index: 3;
86
+ }
87
+
88
+ .control-box-inner {
89
+ margin: 30rpx;
90
+ line-height: 2;
91
+ font-size: 28rpx;
92
+ color: #646464;
93
+ }
94
+
95
+ .copy-line {
96
+ display: flex;
97
+ flex-direction: row;
98
+ align-items: center;
99
+ margin-top: -10rpx;
100
+ align-items: center;
101
+ justify-content: center;
102
+ }
103
+
104
+ .copy-button {
105
+ margin: 0 0 0 30rpx;
106
+ padding: 0 30rpx;
107
+ line-height: 56rpx;
108
+ font-weight: bold;
109
+ border-radius: 12rpx;
110
+ border: 2rpx #f0f0f0 solid;
111
+ background: #0066ff;
112
+ color: white;
113
+ font-size: 28rpx;
114
+ }
@@ -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') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-doctor-sdk",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "和缓名医小程序SDK",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"