Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhu_wap_bridge
Project
Project
Details
Activity
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
千变科技开源组件
zhu_wap_bridge
Commits
9035d93c
Commit
9035d93c
authored
Mar 19, 2021
by
westzmg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://gitlab.z023.cn:10022/open/zhu_wap_bridge
# Conflicts: # components/_Bridge.js # lib/_Bridge.js
parents
6b8bf725
9fbbb9c8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
7 deletions
+55
-7
.umirc.js
.umirc.js
+1
-0
addUser.js
pages/addUser.js
+45
-0
index.js
pages/index.js
+4
-0
yarn.lock
yarn.lock
+5
-7
No files found.
.umirc.js
View file @
9035d93c
...
...
@@ -33,5 +33,6 @@ export default {
{
path
:
'/dialog'
,
component
:
'../pages/dialog'
},
{
path
:
'/baiduAI'
,
component
:
'../pages/baiduAI'
},
{
path
:
'/openScreen'
,
component
:
'../pages/openScreen'
},
{
path
:
'/addUser'
,
component
:
'../pages/addUser'
},
]
}
pages/addUser.js
0 → 100644
View file @
9035d93c
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
_Bridge
}
from
'../components'
;
import
{
Button
,
Modal
,
Toast
}
from
"antd-mobile"
;
const
addUser
=
()
=>
{
const
[
result
,
setResult
]
=
useState
();
const
doFunc
=
async
()
=>
{
try
{
setResult
(
null
);
const
result
=
await
_Bridge
.
addAppUser
(
'b2c98c34-ad79-4f1c-b8ec-030f19635193'
);
setResult
(
result
);
}
catch
(
error
)
{
console
.
error
(
error
);
}
};
return
(
<
div
>
<
h1
style
=
{{
textAlign
:
"center"
}}
>
添加用户
<
/h1
>
<
div
style
=
{{
padding
:
20
}}
>
<
Button
style
=
{{
marginBottom
:
20
}}
onClick
=
{
async
()
=>
{
await
doFunc
();
}}
>
添加用户
<
/Button
>
{
result
?
(
<
React
.
Fragment
>
<
p
>
返回结果
<
/p
>
<
p
>
{
JSON
.
stringify
(
result
)}
<
/p
>
<
/React.Fragment
>
)
:
(
<
p
>
空
<
/p
>
)
}
<
/div
>
<
/div
>
);
};
export
default
addUser
;
\ No newline at end of file
pages/index.js
View file @
9035d93c
...
...
@@ -68,6 +68,10 @@ export default class extends React.Component {
<
Button
style
=
{{
marginBottom
:
20
}}
>
获取
Token
<
/Button
>
<
/Link
>
<
Link
to
=
{
`/addUser`
}
>
<
Button
style
=
{{
marginBottom
:
20
}}
>
新增用户
<
/Button
>
<
/Link
>
<
Button
style
=
{{
marginBottom
:
20
}}
onClick
=
{
async
()
=>
{
...
...
yarn.lock
View file @
9035d93c
...
...
@@ -4301,11 +4301,6 @@ core-js@2.6.9:
resolved "https://registry.npm.taobao.org/core-js/download/core-js-2.6.9.tgz?cache=0&sync_timestamp=1609681993371&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2"
integrity sha1-a0shRiDINBUuF5Mjcn/Bl0GwhPI=
core-js@3:
version "3.8.3"
resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.8.3.tgz?cache=0&sync_timestamp=1611038912958&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.8.3.tgz#c21906e1f14f3689f93abcc6e26883550dd92dd0"
integrity sha1-whkG4fFPNon5OrzG4miDVQ3ZLdA=
core-js@3.1.4:
version "3.1.4"
resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.1.4.tgz?cache=0&sync_timestamp=1609681993371&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.1.4.tgz#3a2837fc48e582e1ae25907afcd6cf03b0cc7a07"
...
...
@@ -4326,6 +4321,11 @@ core-js@^3.0.0, core-js@^3.6.5:
resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.8.2.tgz?cache=0&sync_timestamp=1609681993371&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.8.2.tgz#0a1fd6709246da9ca8eff5bb0cbd15fba9ac7044"
integrity sha1-Ch/WcJJG2pyo7/W7DL0V+6mscEQ=
core-js@^3.8.3:
version "3.9.1"
resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.9.1.tgz?cache=0&sync_timestamp=1614538798750&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.9.1.tgz#cec8de593db8eb2a85ffb0dbdeb312cb6e5460ae"
integrity sha1-zsjeWT246yqF/7Db3rMSy25UYK4=
core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
...
...
@@ -16695,10 +16695,8 @@ watchpack@^1.6.0:
resolved "https://registry.npm.taobao.org/watchpack/download/watchpack-1.7.5.tgz?cache=0&sync_timestamp=1607687507945&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwatchpack%2Fdownload%2Fwatchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453"
integrity sha1-EmfmxV4Lm1vkTCAjrtVDeiwmxFM=
dependencies:
chokidar "^3.4.1"
graceful-fs "^4.1.2"
neo-async "^2.5.0"
watchpack-chokidar2 "^2.0.1"
optionalDependencies:
chokidar "^3.4.1"
watchpack-chokidar2 "^2.0.1"
...
...
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