Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hello_taobao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
hello_taobao
Commits
d664f868
Commit
d664f868
authored
Sep 07, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
219b0616
Changes
30
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
1 addition
and
524 deletions
+1
-524
index.axml
dist/pages/index/index.axml
+1
-1
index.js
taobao1/node_modules/@tbmp/mp-cloud-sdk/index.js
+0
-1
package.json
taobao1/node_modules/@tbmp/mp-cloud-sdk/package.json
+0
-45
collection.d.ts
..._modules/@tbmp/mp-cloud-sdk/types/core/db/collection.d.ts
+0
-80
db.d.ts
...ao1/node_modules/@tbmp/mp-cloud-sdk/types/core/db/db.d.ts
+0
-18
index.d.ts
.../node_modules/@tbmp/mp-cloud-sdk/types/core/db/index.d.ts
+0
-2
util.d.ts
...1/node_modules/@tbmp/mp-cloud-sdk/types/core/db/util.d.ts
+0
-0
index.d.ts
...odules/@tbmp/mp-cloud-sdk/types/core/functions/index.d.ts
+0
-13
cloudService.d.ts
...@tbmp/mp-cloud-sdk/types/core/interface/cloudService.d.ts
+0
-10
client.d.ts
...modules/@tbmp/mp-cloud-sdk/types/core/message/client.d.ts
+0
-14
index.d.ts
..._modules/@tbmp/mp-cloud-sdk/types/core/message/index.d.ts
+0
-8
server.d.ts
...modules/@tbmp/mp-cloud-sdk/types/core/message/server.d.ts
+0
-15
process.d.ts
...@tbmp/mp-cloud-sdk/types/core/openApi/client/process.d.ts
+0
-7
qimen.d.ts
...s/@tbmp/mp-cloud-sdk/types/core/openApi/client/qimen.d.ts
+0
-7
top.d.ts
...les/@tbmp/mp-cloud-sdk/types/core/openApi/client/top.d.ts
+0
-7
process.d.ts
...@tbmp/mp-cloud-sdk/types/core/openApi/server/process.d.ts
+0
-0
qimen.d.ts
...s/@tbmp/mp-cloud-sdk/types/core/openApi/server/qimen.d.ts
+0
-0
top.d.ts
...les/@tbmp/mp-cloud-sdk/types/core/openApi/server/top.d.ts
+0
-7
index.d.ts
..._modules/@tbmp/mp-cloud-sdk/types/core/storage/index.d.ts
+0
-70
index.d.ts
...les/@tbmp/mp-cloud-sdk/types/platforms/mp-accs/index.d.ts
+0
-3
index.d.ts
...s/@tbmp/mp-cloud-sdk/types/platforms/mp-socket/index.d.ts
+0
-12
index.d.ts
..._modules/@tbmp/mp-cloud-sdk/types/platforms/mp/index.d.ts
+0
-22
index.d.ts
...odules/@tbmp/mp-cloud-sdk/types/platforms/node/index.d.ts
+0
-19
constants.d.ts
...de_modules/@tbmp/mp-cloud-sdk/types/shared/constants.d.ts
+0
-15
helper.d.ts
.../node_modules/@tbmp/mp-cloud-sdk/types/shared/helper.d.ts
+0
-4
index.d.ts
...1/node_modules/@tbmp/mp-cloud-sdk/types/shared/index.d.ts
+0
-3
localstorage.d.ts
...modules/@tbmp/mp-cloud-sdk/types/shared/localstorage.d.ts
+0
-2
request.d.ts
...node_modules/@tbmp/mp-cloud-sdk/types/shared/request.d.ts
+0
-89
types.d.ts
...1/node_modules/@tbmp/mp-cloud-sdk/types/shared/types.d.ts
+0
-42
util.d.ts
...o1/node_modules/@tbmp/mp-cloud-sdk/types/shared/util.d.ts
+0
-8
No files found.
dist/pages/index/index.axml
View file @
d664f868
<view class="index-page">
<view class="index-page">
<view>
正在加载...
</view>
<view></view>
</view>
</view>
\ No newline at end of file
taobao1/node_modules/@tbmp/mp-cloud-sdk/index.js
deleted
100644 → 0
View file @
219b0616
This diff is collapsed.
Click to expand it.
taobao1/node_modules/@tbmp/mp-cloud-sdk/package.json
deleted
100644 → 0
View file @
219b0616
{
"_args"
:
[
[
"@tbmp/mp-cloud-sdk@1.3.4"
,
"d:
\\
develop
\\
nodejs
\\
sparkProject
\\
filaFloor
\\
project
\\
hello_taobao
\\
taobao1"
]
],
"_from"
:
"@tbmp/mp-cloud-sdk@1.3.4"
,
"_id"
:
"@tbmp/mp-cloud-sdk@1.3.4"
,
"_inBundle"
:
false
,
"_integrity"
:
"sha1-+1HCYryYfVc0kze0SOWv1oL6xgk="
,
"_location"
:
"/@tbmp/mp-cloud-sdk"
,
"_phantomChildren"
:
{},
"_requested"
:
{
"type"
:
"version"
,
"registry"
:
true
,
"raw"
:
"@tbmp/mp-cloud-sdk@1.3.4"
,
"name"
:
"@tbmp/mp-cloud-sdk"
,
"escapedName"
:
"@tbmp%2fmp-cloud-sdk"
,
"scope"
:
"@tbmp"
,
"rawSpec"
:
"1.3.4"
,
"saveSpec"
:
null
,
"fetchSpec"
:
"1.3.4"
},
"_requiredBy"
:
[
"/"
],
"_resolved"
:
"https://registry.npm.taobao.org/@tbmp/mp-cloud-sdk/download/@tbmp/mp-cloud-sdk-1.3.4.tgz"
,
"_spec"
:
"1.3.4"
,
"_where"
:
"d:
\\
develop
\\
nodejs
\\
sparkProject
\\
filaFloor
\\
project
\\
hello_taobao
\\
taobao1"
,
"author"
:
""
,
"description"
:
""
,
"gitHead"
:
"1dff694baa0d0714e10794820a1df4806c19eebb"
,
"license"
:
"ISC"
,
"main"
:
"index.js"
,
"name"
:
"@tbmp/mp-cloud-sdk"
,
"publishConfig"
:
{
"access"
:
"public"
},
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
"types"
:
"./types/platforms/mp/index.d.ts"
,
"version"
:
"1.3.4"
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/db/collection.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
Db
}
from
"./db"
;
export
interface
IFindOptions
{
/**
* 查询的文档数量限制
*/
limit
?:
number
;
/**
* 跳过的文档数量
*/
skip
?:
number
;
/**
* 排序规则
*/
sort
?:
object
;
/**
* 查询后过滤的字段
*/
projection
?:
object
;
}
export
declare
class
CollectionReference
{
/**
* 初始化
*
* @internal
*
* @param db - 数据库的引用
* @param coll - 集合名称
*/
private
_db
;
private
_coll
;
constructor
(
db
:
Db
,
coll
:
string
);
/**
* 读取集合名字
*/
readonly
name
:
string
;
/**
* 对集合执行聚合查询
* @param pipeline 聚合查询对象
*/
aggregate
(
pipeline
:
object
|
object
[]):
Promise
<
any
>
;
/**
* 获取集合中复合条件的记录数量
* @param filter 过滤条件
*/
count
(
filter
:
object
):
Promise
<
any
>
;
/**
* 删除集合中的一批记录
* @param filter 过滤条件
*/
deleteMany
(
filter
:
object
):
Promise
<
any
>
;
/**
* 查找集合中符合条件的所有记录
* @param filter 过滤条件
* @param options 查询配置项
*/
find
(
filter
:
any
,
options
?:
IFindOptions
):
Promise
<
any
>
;
/**
* 替换一条数据
* @param filter 过滤条件
* @param data 新数据
*/
replaceOne
(
filter
:
object
,
data
:
object
):
Promise
<
any
>
;
/**
* 在集合中添加一条记录
* @param data 带插入的数据
*/
insertOne
(
data
:
object
):
Promise
<
any
>
;
/**
* 在集合中添加一批记录
* @param data 待插入的数据,只能为数组
*/
insertMany
(
data
:
object
[]):
Promise
<
any
>
;
/**
*
* @param filter 过滤条件
* @param data 更新规则
*
*/
updateMany
(
filter
:
object
,
data
:
object
):
Promise
<
any
>
;
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/db/db.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
CollectionReference
}
from
"./collection"
;
import
{
IAsyncInvokeOptions
}
from
"../../shared/types"
;
import
{
ICloudService
}
from
"../interface/cloudService"
;
export
declare
class
Db
extends
ICloudService
{
/**
* 获取集合的引用
*
* @param collName - 集合名称
*/
collection
(
collName
:
string
):
CollectionReference
;
/**
* 创建集合
*/
createCollection
(
name
:
string
,
options
:
{
collName
:
string
;
}
&
IAsyncInvokeOptions
):
Promise
<
any
>
;
dbRequest
(
action
?:
string
,
params
?:
any
):
Promise
<
any
>
;
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/db/index.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
Db
}
from
"./db"
;
export
default
Db
;
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/db/util.d.ts
deleted
100644 → 0
View file @
219b0616
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/functions/index.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
IAsyncInvokeOptions
}
from
'../../shared/types'
;
import
{
ICloudService
}
from
'../interface/cloudService'
;
export
interface
ICallFunctionOptions
extends
IAsyncInvokeOptions
{
name
:
string
;
data
:
any
;
}
export
interface
IInvokeMethod
{
(
IAsyncInvokeOptions
:
any
):
void
;
}
export
default
class
CloudFunction
extends
ICloudService
{
invoke
(
name
:
string
,
data
?:
object
,
handler
?:
string
):
Promise
<
any
>
;
private
fcRequest
;
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/interface/cloudService.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
Request
}
from
"../../shared/request"
;
export
interface
ICloudServiceOptions
{
env
?:
'test'
|
'online'
|
'pre'
;
}
export
declare
abstract
class
ICloudService
{
options
:
ICloudServiceOptions
;
request
:
Request
;
constructor
(
options
:
ICloudServiceOptions
,
request
:
Request
);
init
?():
void
;
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/message/client.d.ts
deleted
100644 → 0
View file @
219b0616
import
Powermsg
from
'@ali/lib-powermsg-sdk'
;
import
{
Env
}
from
'../../shared/types'
;
export
default
class
Client
{
env
:
Env
;
pmg
:
Powermsg
;
deviceId
:
string
;
initing
:
boolean
;
queue
:
(()
=>
void
)[];
config
:
any
;
constructor
(
env
:
Env
);
init
:
()
=>
Promise
<
any
>
;
onMessage
:
(
callback
:
any
)
=>
Promise
<
()
=>
void
>
;
private
createPwgInstance
;
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/message/index.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
ICloudService
,
ICloudServiceOptions
}
from
"../interface/cloudService"
;
import
Client
from
'./client'
;
import
Server
from
'./server'
;
export
default
class
Message
extends
ICloudService
{
server
:
Server
;
client
:
Client
;
constructor
(
options
:
ICloudServiceOptions
);
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/message/server.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
Request
}
from
'../../shared/request'
;
import
{
Env
}
from
"../../../packages/mp-cloud-node-sdk/types/shared/types"
;
interface
IPushOptions
{
subType
:
number
;
deviceId
?:
string
;
data
:
object
;
pushType
:
string
;
}
export
default
class
Server
{
env
:
Env
;
request
:
Request
;
constructor
(
env
:
Env
,
request
:
Request
);
push
(
options
:
IPushOptions
):
Promise
<
any
>
;
}
export
{};
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/process.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
ICloudService
}
from
"../../interface/cloudService"
;
export
default
class
Process
extends
ICloudService
{
invoke
(
options
:
{
api
:
string
,
data
?:
any
,
headers
?:
any
}):
Promise
<
any
>
;
private
topRequest
;
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/qimen.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
ICloudService
}
from
"../../interface/cloudService"
;
export
default
class
Qimen
extends
ICloudService
{
invoke
(
options
:
{
api
:
string
,
data
?:
any
,
targetAppKey
?:
any
,
headers
?:
any
}):
Promise
<
any
>
;
private
topRequest
;
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/top.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
ICloudService
}
from
"../../interface/cloudService"
;
export
default
class
Top
extends
ICloudService
{
invoke
(
options
:
{
api
:
string
,
data
?:
any
,
headers
?:
any
,
authScope
?:
string
}):
Promise
<
any
>
;
private
topRequest
;
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/server/process.d.ts
deleted
100644 → 0
View file @
219b0616
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/server/qimen.d.ts
deleted
100644 → 0
View file @
219b0616
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/server/top.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
IRequestOptions
}
from
"../../../shared/request"
;
export
default
class
Top
{
client
:
any
;
context
:
IRequestOptions
;
constructor
(
context
:
IRequestOptions
);
invoke
(
apiName
:
string
,
data
?:
any
,
httpHeaders
?:
any
):
Promise
<
any
>
;
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/core/storage/index.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
IAsyncInvokeOptions
}
from
"../../shared/types"
;
import
{
ICloudService
}
from
"../interface/cloudService"
;
export
interface
IUploadFileOptions
extends
IAsyncInvokeOptions
{
/**
* 选择到的本地文件路径
*/
filePath
:
string
;
/**
* 文件类型, image/audio/video
*/
fileType
:
FileTypes
;
/**
* 云存储文件名可带路径, 如a/xxx.jpg
*/
fileName
?:
string
;
/**
* web环境上传 file对象
*/
file
?:
any
;
}
export
interface
IDownloadFileOptions
extends
IAsyncInvokeOptions
{
fileType
?:
FileTypes
;
fileId
:
string
;
}
export
interface
ITempFileURLOptions
extends
IAsyncInvokeOptions
{
fileList
:
string
[];
}
export
declare
type
IDeleteFileOptions
=
IDownloadFileOptions
;
export
declare
type
FileTypes
=
"image"
|
"video"
|
"audio"
;
export
default
class
CloudStorage
extends
ICloudService
{
private
parseUploadResult
;
private
parsePostUploadResult
;
private
parseAusUploadResult
;
/**
* 文件上传
* 1.获取上传配置
* 2.调用my.api上传
* 3.建立存储关系
* @param options
*/
uploadFile
(
options
:
IUploadFileOptions
):
Promise
<
any
>
;
/**
* 删除文件
* @param options
*/
deleteFile
(
options
:
IDeleteFileOptions
):
Promise
<
boolean
>
;
/**
* 根据文件id(cloud://)获取授权的url
* @param options
*/
getTempFileURL
(
options
:
IAsyncInvokeOptions
&
{
fileType
:
string
;
fileId
:
string
|
string
[];
}):
Promise
<
any
>
;
/**
* 从服务端获取文件并在本地读取
* @param options
*/
readRemoteFile
(
options
:
IAsyncInvokeOptions
&
{
url
:
string
;
}):
Promise
<
ArrayBuffer
>
;
/**
* 存储的请求代理, 统一sdk环境和存储环境
* @param action
* @param data
* @param requestType
*/
private
storageRequest
;
}
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp-accs/index.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
Cloud
}
from
'../mp'
;
declare
const
cloudInstance
:
Cloud
;
export
default
cloudInstance
;
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp-socket/index.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
Cloud
as
MpCloud
}
from
'../mp'
;
import
{
ICloudOptions
}
from
'../../shared/types'
;
import
Client
from
'../../core/message/client'
;
import
{
IProxy
}
from
'../../shared/request'
;
export
declare
class
Cloud
extends
MpCloud
{
message
:
{
client
:
Client
;
};
init
(
options
:
ICloudOptions
,
proxy
:
IProxy
):
Promise
<
boolean
>
;
}
declare
const
_default
:
Cloud
;
export
default
_default
;
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp/index.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
IProxy
}
from
'../../shared/request'
;
import
{
ICloudOptions
}
from
'../../shared/types'
;
import
CloudFunction
from
'../../core/functions'
;
import
CloudStorage
from
'../../core/storage'
;
import
Db
from
'../../core/db'
;
import
Top
from
'../../core/openApi/client/top'
;
import
Qimen
from
'../../core/openApi/client/qimen'
;
import
Process
from
'../../core/openApi/client/process'
;
export
declare
class
Cloud
{
function
:
CloudFunction
;
file
:
CloudStorage
;
db
:
Db
;
topApi
:
Top
;
qimenApi
:
Qimen
;
processApi
:
Process
;
init
(
options
:
ICloudOptions
,
proxy
?:
IProxy
):
Promise
<
boolean
>
;
}
declare
const
_default
:
Cloud
;
export
default
_default
;
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/platforms/node/index.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
IProxy
,
IRequestOptions
}
from
'../../shared/request'
;
import
{
ICloudOptions
}
from
'../../shared/types'
;
import
CloudFunction
from
'../../core/functions'
;
import
Database
from
'../../core/db'
;
import
Server
from
'../../core/message/server'
;
import
Top
from
'../../core/openApi/server/top'
;
export
declare
class
Cloud
{
private
_options
;
db
:
Database
;
function
:
CloudFunction
;
message
:
{
server
:
Server
;
};
private
request
;
topApi
:
Top
;
setEnv
(
env
:
any
):
void
;
init
(
options
:
ICloudOptions
&
IRequestOptions
,
proxy
:
IProxy
):
void
;
}
export
declare
function
cloud
(
context
:
any
,
options
:
ICloudOptions
):
Cloud
;
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/shared/constants.d.ts
deleted
100644 → 0
View file @
219b0616
export
declare
const
BASE_APIS
:
{
GET_SESSION
:
string
;
GET_SECRET
:
string
;
};
export
declare
const
STORAGE_KEYS
:
{
SECRET
:
string
;
};
export
declare
const
ENV_CONFIG
:
{
pre
:
{
gw
:
string
;
};
online
:
{
gw
:
string
;
};
};
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/shared/helper.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
IAsyncInvokeOptions
}
from
"./types"
;
export
declare
function
invokeCallback
(
options
:
IAsyncInvokeOptions
,
asyncTask
:
Promise
<
any
>
):
Promise
<
void
>
;
export
declare
function
myApiPromisify
(
method
:
(
options
:
any
)
=>
void
,
options
?:
any
):
Promise
<
any
>
;
export
declare
function
getUserId
():
Promise
<
string
>
;
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/shared/index.d.ts
deleted
100644 → 0
View file @
219b0616
export
declare
function
noop
():
void
;
export
declare
function
invokeTaskCallback
():
(
target
:
any
,
propertyKey
:
string
,
descriptor
:
PropertyDescriptor
)
=>
void
;
export
declare
function
safeAccess
(
props
:
any
,
keys
:
string
[]
|
string
,
def
?:
any
):
any
;
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/shared/localstorage.d.ts
deleted
100644 → 0
View file @
219b0616
export
declare
function
getValue
(
key
:
string
):
Promise
<
any
>
;
export
declare
function
setValue
(
key
:
string
,
data
:
any
):
Promise
<
any
>
;
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/shared/request.d.ts
deleted
100644 → 0
View file @
219b0616
export
interface
IRequestOptions
{
appKey
?:
string
,
sourceAppKey
?:
string
,
requestAppKey
?:
string
,
miniappId
?:
string
,
sourceMiniAppId
?:
string
,
appOwnerOpenId
?:
string
,
signSecret
?:
string
;
sessionKey
?:
string
;
requestId
?:
string
;
cloudId
?:
string
;
openId
?:
string
;
unionId
?:
string
;
userNick
?:
string
,
mixNick
?:
string
,
session
?:
string
;
accessToken
?:
string
;
env
?:
string
;
}
export
declare
enum
RequestTypes
{
MTOP
=
1
,
MY
=
2
,
GATEWAY
=
3
}
export
interface
IGatewayResponse
{
error_response
:
{
code
:
string
;
};
}
export
interface
IRequestDetail
{
url
:
string
;
data
?:
any
;
rawData
?:
any
;
method
?:
string
;
headers
?:
any
;
dataType
?:
string
;
v
?:
string
;
__is_retry_task__
?:
boolean
;
env
?:
string
;
mtopOptions
?:
any
;
}
export
interface
IProxyOptions
{
gatewayUrl
?:
string
;
dataProxyGatewayUrl
?:
string
;
}
export
declare
abstract
class
IProxy
{
options
:
IProxyOptions
;
abstract
apply
(
task
:
IRequestDetail
,
requestType
?:
RequestTypes
):
Promise
<
any
>
;
constructor
(
options
?:
IProxyOptions
);
}
export
declare
class
Request
{
networkType
?:
string
;
options
:
IRequestOptions
;
tasks
:
{
detail
:
IRequestDetail
;
success
?:
(
res
:
any
)
=>
void
;
fail
?:
(
res
:
any
)
=>
void
;
}[];
proxy
:
IProxy
;
inited
:
boolean
;
pauseExecTask
:
boolean
;
init
(
options
:
IRequestOptions
,
proxy
:
IProxy
):
Promise
<
void
>
;
listenNetworkChange
():
Promise
<
void
>
;
static
getRequestType
(
url
:
string
):
RequestTypes
;
/**
* 验证响应结果, 特定情况下重试请求
* @param res
*/
private
verifyResponse
;
private
tryThrowError
;
private
sendGatewayRequest
;
flushGatewayRequestQueue
(
reject
?:
boolean
):
void
;
exec
(
detail
:
IRequestDetail
,
requestType
?:
RequestTypes
):
Promise
<
any
>
;
/**
*
* @param url 网关请求
* @param method 请求方法
* @param queryString
* @param headers mc_开头的http header
* @param content json body
*/
private
getHttpRequestSign
;
/**
* 对网关请求签名
* @param detail
*/
private
createGatewayRequest
;
}
export
declare
const
request
:
Request
;
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/shared/types.d.ts
deleted
100644 → 0
View file @
219b0616
export
interface
ICallback
{
(
res
:
any
):
void
;
}
export
interface
IHttpRequestOptions
extends
IAsyncInvokeOptions
{
url
:
string
;
method
?:
string
;
headers
?:
any
;
data
?:
any
;
dataType
?:
string
;
}
export
declare
type
Env
=
'test'
|
'pre'
|
'online'
;
export
declare
type
Envs
=
{
database
:
Env
;
file
:
Env
;
function
:
Env
;
message
:
Env
;
};
export
interface
ICloudOptions
{
env
?:
Env
|
Envs
;
appKey
?:
string
;
}
declare
global
{
interface
Window
{
}
var
my
:
{
httpRequest
:
(
options
:
IHttpRequestOptions
)
=>
void
;
sendMtop
:
(
options
:
any
)
=>
void
;
alert
:
(
options
:
{
title
?:
string
;
content
?:
string
;
})
=>
void
;
};
var
NODE_PLATFORM
:
boolean
;
var
SDK_VERSION
:
string
;
}
export
interface
IAsyncInvokeOptions
{
success
?:
ICallback
;
fail
?:
ICallback
;
complete
?:
ICallback
;
}
export
declare
type
AsyncInvokeResult
=
Promise
<
any
>
|
void
;
export
declare
type
Constructor
<
T
=
{}
>
=
new
(...
args
:
any
[])
=>
T
;
taobao1/node_modules/@tbmp/mp-cloud-sdk/types/shared/util.d.ts
deleted
100644 → 0
View file @
219b0616
import
{
IAsyncInvokeOptions
,
Env
,
Envs
}
from
"./types"
;
export
declare
function
noop
():
void
;
export
declare
function
invokeTaskCallback
():
(
target
:
any
,
propertyKey
:
string
,
descriptor
:
PropertyDescriptor
)
=>
void
;
export
declare
function
safeAccess
(
props
:
any
,
keys
:
string
[]
|
string
,
def
?:
any
):
any
;
export
declare
function
invokeCallback
(
options
:
IAsyncInvokeOptions
,
asyncTask
:
Promise
<
any
>
):
Promise
<
void
>
;
export
declare
function
myApiPromisify
(
method
:
(
options
:
any
)
=>
void
,
options
?:
any
):
Promise
<
any
>
;
export
declare
function
getUserId
():
Promise
<
string
>
;
export
declare
function
getEnvs
(
env
:
Env
|
Envs
):
Envs
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment