hh-doctor-sdk 0.2.8 → 0.2.9

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.
@@ -5,6 +5,7 @@ var audioAnimationInterval
5
5
 
6
6
  const hhNavigation = require('../../hh-navigation')
7
7
  const doctorLoader = require('../../public/doctor-loader')
8
+ const permission = require('../../utils/permission-utils')
8
9
 
9
10
  Page({
10
11
 
@@ -204,20 +205,11 @@ Page({
204
205
 
205
206
  },
206
207
 
208
+ tapSetDate() {
209
+ permission.subscriptionVideoTime()
210
+ },
211
+
207
212
  changeDateTime(e) {
208
- wx.requestSubscribeMessage({
209
- tmplIds: ['wsBcrNpvBt8a8pneIRNY8JdHKXYxhHxjONrelT8K5zQ'],
210
- success: (res) => {
211
- wx.showToast({
212
- title: '订阅成功',
213
- })
214
- },
215
- fail: (error) => {
216
- wx.showToast({
217
- title: error,
218
- })
219
- }
220
- })
221
213
  this._changeDateTime(e)
222
214
  },
223
215
 
@@ -1,7 +1,7 @@
1
1
  const menuBuilder = require('./chat-menu-builder')
2
2
  const cache = require('../../../../public/cache-data')
3
- const base = require('../../../../hh-doctor')
4
3
  const hhNavigation = require('../../../../hh-navigation')
4
+ const permission = require('../../../../utils/permission-utils')
5
5
 
6
6
  Component({
7
7
 
@@ -86,19 +86,6 @@ Component({
86
86
  * @param {*} e 事件回调参数
87
87
  */
88
88
  changeDateTime(e) {
89
- wx.requestSubscribeMessage({
90
- tmplIds: ['wsBcrNpvBt8a8pneIRNY8JdHKXYxhHxjONrelT8K5zQ'],
91
- success: (res) => {
92
- wx.showToast({
93
- title: '订阅成功',
94
- })
95
- },
96
- fail: (error) => {
97
- wx.showToast({
98
- title: error,
99
- })
100
- }
101
- })
102
89
  this.triggerEvent('changeDateTime', e)
103
90
  },
104
91
 
@@ -108,6 +95,10 @@ Component({
108
95
  */
109
96
  changeDateTimeColumn(e) {
110
97
  this.triggerEvent('changeDateTimeColumn', e)
98
+ },
99
+
100
+ tapSetDate() {
101
+ permission.subscriptionVideoTime()
111
102
  }
112
103
  }
113
104
  })
@@ -11,6 +11,7 @@
11
11
  mode="multiSelector"
12
12
  value="{{dateTime}}"
13
13
  bindchange="changeDateTime"
14
+ bind:tap="tapSetDate"
14
15
  bindcolumnchange="changeDateTimeColumn"
15
16
  range="{{dateTimeArray}}"
16
17
  >
@@ -153,6 +153,7 @@
153
153
  mode="multiSelector"
154
154
  value="{{dateTime}}"
155
155
  bindchange="changeDateTime"
156
+ bind:tap="tapSetDate"
156
157
  bindcolumnchange="changeDateTimeColumn"
157
158
  range="{{dateTimeArray}}"
158
159
  >
@@ -157,8 +157,25 @@ function showPermissionTip(error, ...scopes) {
157
157
  })
158
158
  }
159
159
 
160
+ function subscriptionVideoTime() {
161
+ wx.requestSubscribeMessage({
162
+ tmplIds: ['wsBcrNpvBt8a8pneIRNY8JdHKXYxhHxjONrelT8K5zQ'],
163
+ success: (res) => {
164
+ wx.showToast({
165
+ title: '订阅成功',
166
+ })
167
+ },
168
+ fail: (error) => {
169
+ wx.showToast({
170
+ title: error,
171
+ })
172
+ }
173
+ })
174
+ }
175
+
160
176
  module.exports = {
161
177
  checkMediaPermission: checkMediaPermission,
162
178
  checkScopeRecord: checkScopeRecord,
163
- checkScopeCamera: checkScopeCamera
179
+ checkScopeCamera: checkScopeCamera,
180
+ subscriptionVideoTime: subscriptionVideoTime,
164
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-doctor-sdk",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "和缓名医小程序SDK",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"