Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
XiTianSenMall
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
leiqingsong
XiTianSenMall
Commits
65eb89b7
Commit
65eb89b7
authored
Mar 31, 2021
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口执行顺序
parent
526414ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
bridgeToAppFun.js
H5/src/utils/bridgeToAppFun.js
+10
-6
settings.vue
H5/src/views/settings.vue
+7
-1
No files found.
H5/src/utils/bridgeToAppFun.js
View file @
65eb89b7
...
@@ -112,16 +112,20 @@ class bridgeToAppFun {
...
@@ -112,16 +112,20 @@ class bridgeToAppFun {
if
(
this
.
userAgent
===
"android"
)
{
if
(
this
.
userAgent
===
"android"
)
{
console
.
log
(
"an"
);
console
.
log
(
"an"
);
version
=
window
.
android
.
getAppVersion
();
version
=
window
.
android
.
getAppVersion
();
return
version
;
}
else
{
}
else
{
console
.
log
(
"ios获取版本号"
);
console
.
log
(
"ios获取版本号"
);
return
new
Promise
((
resolve
,
reject
)
=>
{
jsBridge
.
callhandler
(
"getAppVersion"
,
null
,
response
=>
{
jsBridge
.
callhandler
(
"getAppVersion"
,
null
,
response
=>
{
if
(
response
)
{
if
(
response
)
{
console
.
log
(
"版本号,获取到的数据"
,
response
);
console
.
log
(
"版本号,获取到的数据"
,
response
);
version
=
response
;
resolve
(
response
);
}
else
{
reject
(
"ios获取版本号失败"
);
}
}
});
});
});
}
}
return
version
;
}
}
}
}
...
...
H5/src/views/settings.vue
View file @
65eb89b7
...
@@ -123,7 +123,13 @@ export default {
...
@@ -123,7 +123,13 @@ export default {
},
},
async
getAppVersion
()
{
async
getAppVersion
()
{
console
.
log
(
"设置里获取到的版本号"
,
this
.
$bridgeToAppFun
.
getAppVersion
());
console
.
log
(
"设置里获取到的版本号"
,
this
.
$bridgeToAppFun
.
getAppVersion
());
this
.
version
=
"版本"
+
(
await
this
.
$bridgeToAppFun
.
getAppVersion
());
if
(
this
.
$bridgeToAppFun
.
userAgent
===
"ios"
)
{
this
.
$bridgeToAppFun
.
getAppVersion
().
then
(
res
=>
{
this
.
version
=
"版本"
+
res
;
});
}
else
{
this
.
version
=
"版本"
+
this
.
$bridgeToAppFun
.
getAppVersion
();
}
},
},
getUser
()
{
getUser
()
{
const
params
=
{
const
params
=
{
...
...
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