@tarojs/taro 3.5.3 → 3.5.4-canary.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.
- package/package.json +3 -3
- package/types/api/navigate/index.d.ts +110 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.4-canary.0",
|
|
4
4
|
"description": "Taro framework",
|
|
5
5
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"author": "O2Team",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tarojs/api": "3.5.
|
|
25
|
-
"@tarojs/runtime": "3.5.
|
|
24
|
+
"@tarojs/api": "3.5.4-canary.0",
|
|
25
|
+
"@tarojs/runtime": "3.5.4-canary.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependenciesMeta": {
|
|
28
28
|
"@types/react": {
|
|
@@ -85,6 +85,81 @@ declare module '../../index' {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
namespace openBusinessView {
|
|
89
|
+
/**
|
|
90
|
+
* 业务参数:需要传递给支付分的业务数据
|
|
91
|
+
* @interface ExtraData
|
|
92
|
+
*/
|
|
93
|
+
interface ExtraData {
|
|
94
|
+
/**
|
|
95
|
+
* 商户号:微信支付分配的商户号。
|
|
96
|
+
* 示例值:1230000109
|
|
97
|
+
* @type {string[1,32]}
|
|
98
|
+
* @memberof ExtraData
|
|
99
|
+
*/
|
|
100
|
+
mch_id: string
|
|
101
|
+
/**
|
|
102
|
+
* 服务ID
|
|
103
|
+
* 示例值:88888888000011
|
|
104
|
+
* @type {string[1,32]}
|
|
105
|
+
* @memberof ExtraData
|
|
106
|
+
*/
|
|
107
|
+
service_id: string
|
|
108
|
+
/**
|
|
109
|
+
* 商户服务订单号:商户系统内部服务订单号(不是交易单号)。
|
|
110
|
+
* 示例值:234323JKHDFE1243252
|
|
111
|
+
* @type {string[1,32]}
|
|
112
|
+
* @memberof ExtraData
|
|
113
|
+
*/
|
|
114
|
+
out_order_no: string
|
|
115
|
+
/**
|
|
116
|
+
* 时间戳:生成签名时间戳,单位秒。
|
|
117
|
+
* 示例值:1530097563
|
|
118
|
+
* @type {string[1,32]}
|
|
119
|
+
* @memberof ExtraData
|
|
120
|
+
*/
|
|
121
|
+
timestamp: string
|
|
122
|
+
/**
|
|
123
|
+
* 随机字符串:生成签名随机串。由数字、大小写字母组成,长度不超过32位。
|
|
124
|
+
* 示例值:zyx53Nkey8o4bHpxTQvd8m7e92nG5mG2
|
|
125
|
+
* @type {string[1,32]}
|
|
126
|
+
* @memberof ExtraData
|
|
127
|
+
*/
|
|
128
|
+
nonce_str: string
|
|
129
|
+
/**
|
|
130
|
+
* 签名方式:签名类型,仅支持HMAC-SHA256。
|
|
131
|
+
* 示例值:HMAC-SHA256
|
|
132
|
+
* @type {string[1,32]}
|
|
133
|
+
* @memberof ExtraData
|
|
134
|
+
*/
|
|
135
|
+
sign_type: string
|
|
136
|
+
/**
|
|
137
|
+
* 签名:使用字段mch_id、service_id、out_order_no、timestamp、nonce_str、sign_type按照签名生成算法计算得出的签名值。
|
|
138
|
+
* 示例值:029B52F67573D7E3BE74904BF9AEA
|
|
139
|
+
* @type {string[1,64]}
|
|
140
|
+
* @memberof ExtraData
|
|
141
|
+
*/
|
|
142
|
+
sign: string
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
interface Option {
|
|
146
|
+
/**
|
|
147
|
+
* 跳转类型:固定配置:wxpayScoreDetail
|
|
148
|
+
* 示例值:wxpayScoreDetail
|
|
149
|
+
* @type {string[1,16]}
|
|
150
|
+
* @memberof Option
|
|
151
|
+
*/
|
|
152
|
+
businessType: string
|
|
153
|
+
extraData: ExtraData
|
|
154
|
+
/** 接口调用成功的回调函数 */
|
|
155
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
156
|
+
/** 接口调用失败的回调函数 */
|
|
157
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
158
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
159
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
88
163
|
interface TaroStatic {
|
|
89
164
|
/** 打开半屏小程序。接入指引请参考 [半屏小程序能力](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/openEmbeddedMiniProgram.html)。
|
|
90
165
|
* @supported weapp
|
|
@@ -153,5 +228,40 @@ declare module '../../index' {
|
|
|
153
228
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/navigate/wx.exitMiniProgram.html
|
|
154
229
|
*/
|
|
155
230
|
exitMiniProgram(option?: exitMiniProgram.Option): Promise<TaroGeneral.CallbackResult>
|
|
231
|
+
|
|
232
|
+
/** 商户通过调用订单详情接口打开微信支付分小程序,引导用户查看订单详情(小程序端)
|
|
233
|
+
* @supported weapp
|
|
234
|
+
* @example
|
|
235
|
+
* ```tsx
|
|
236
|
+
* if (Taro.openBusinessView) {
|
|
237
|
+
* Taro.openBusinessView({
|
|
238
|
+
* businessType: 'wxpayScoreDetail',
|
|
239
|
+
* extraData: {
|
|
240
|
+
* mch_id: '1230000109',
|
|
241
|
+
* service_id: '88888888000011',
|
|
242
|
+
* out_order_no: '1234323JKHDFE1243252',
|
|
243
|
+
* timestamp: '1530097563',
|
|
244
|
+
* nonce_str: 'zyx53Nkey8o4bHpxTQvd8m7e92nG5mG2',
|
|
245
|
+
* sign_type: 'HMAC-SHA256',
|
|
246
|
+
* sign: '029B52F67573D7E3BE74904BF9AEA'
|
|
247
|
+
* },
|
|
248
|
+
* success() {
|
|
249
|
+
* //dosomething
|
|
250
|
+
* },
|
|
251
|
+
* fail() {
|
|
252
|
+
* //dosomething
|
|
253
|
+
* },
|
|
254
|
+
* complete() {
|
|
255
|
+
* //dosomething
|
|
256
|
+
* }
|
|
257
|
+
* });
|
|
258
|
+
* } else {
|
|
259
|
+
* //引导用户升级微信版本
|
|
260
|
+
* }
|
|
261
|
+
* ```
|
|
262
|
+
*
|
|
263
|
+
* @see https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter6_1_25.shtml
|
|
264
|
+
*/
|
|
265
|
+
openBusinessView(option: openBusinessView.Option): Promise<TaroGeneral.CallbackResult>
|
|
156
266
|
}
|
|
157
267
|
}
|