hh-doctor-sdk 0.0.8 → 0.1.0

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.
@@ -36,16 +36,19 @@ module.exports = Behavior({
36
36
 
37
37
  methods: {
38
38
  loadList() {
39
- wx.showLoading({
40
- title: '加载订单数据',
39
+ this.setData({
40
+ triggered: true
41
41
  })
42
42
  api.orderList().then((res) => {
43
- wx.hideLoading()
43
+ this.setData({
44
+ triggered: false
45
+ })
44
46
  this._buildOrderGroupInfo(res.data)
45
47
  })
46
48
  },
47
49
 
48
50
  _buildOrderGroupInfo(orderModel) {
51
+ // console.error(JSON.stringify(orderModel))
49
52
  if (orderModel) {
50
53
  var orderGroups = []
51
54
  // if (orderModel.requestOrderList) {
@@ -2,6 +2,7 @@ const doctorLoader = require('../../public/doctor-loader')
2
2
  const {
3
3
  judgeLogin
4
4
  } = require('../../utils/uiUtil')
5
+
5
6
  Page({
6
7
 
7
8
 
@@ -12,6 +13,7 @@ Page({
12
13
  */
13
14
  data: {
14
15
  needRefresh: false,
16
+ triggered: false,
15
17
  },
16
18
 
17
19
  /**
@@ -85,7 +87,7 @@ Page({
85
87
  * 页面相关事件处理函数--监听用户下拉动作
86
88
  */
87
89
  onPullDownRefresh() {
88
-
90
+ this.loadList()
89
91
  },
90
92
 
91
93
  /**
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "usingComponents": {},
3
3
  "navigationBarTitleText": "咨询单",
4
- "backgroundColor": "#000000"
4
+ "backgroundColor": "#000000",
5
+ "enablePullDownRefresh": true
5
6
  }
@@ -1,5 +1,12 @@
1
1
  <view class="match-parent">
2
- <scroll-view class="scroll-view" scroll-y scroll-into-view="{{scrollTo}}">
2
+ <scroll-view
3
+ class="scroll-view"
4
+ scroll-y
5
+ scroll-into-view="{{scrollTo}}"
6
+ refresher-enabled="true"
7
+ bindrefresherrefresh="onPullDownRefresh"
8
+ refresher-triggered="{{triggered}}"
9
+ >
3
10
  <view class="chatting-body">
4
11
  <block
5
12
  wx:for="{{orderGroup}}"
@@ -32,10 +32,10 @@ function navigateTo(path, params) {
32
32
  })
33
33
  }
34
34
 
35
- function orderList(doctorId, isTest) {
35
+ function orderList() {
36
36
  navigateTo(pages.orderList, {
37
- 'doctorId': doctorId,
38
- 'isTest': isTest
37
+ // 'doctorId': doctorId,
38
+ // 'isTest': isTest
39
39
  })
40
40
  }
41
41
 
@@ -96,10 +96,10 @@ function _request(request, method, params, data) {
96
96
  setCookie(res.header['Set-Cookie']);
97
97
  }
98
98
  if (success(res)) {
99
- console.error(`success => ${JSON.stringify(res.data)}`)
99
+ // console.error(`success => ${JSON.stringify(res.data)}`)
100
100
  resolve(res.data);
101
101
  } else {
102
- console.error(`failed => ${JSON.stringify(res.data)}`)
102
+ // console.error(`failed => ${JSON.stringify(res.data)}`)
103
103
  reject(res.data);
104
104
  }
105
105
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-doctor-sdk",
3
- "version": "0.0.8",
3
+ "version": "0.1.0",
4
4
  "description": "和缓名医小程序SDK",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"