Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-community-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
TaoHuang
6 years ago
Commit
f32c9364eb1d738d2f5c660d128cc3e7f4e09401
1 parent
d1514202
fix
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
9 deletions
apps/common/open-app.js
apps/pages/article/components/download-bottom.vue
apps/pages/article/components/download-top.vue
doraemon/middleware/ssr.js
doraemon/views/index.hbs
apps/common/open-app.js
View file @
f32c936
const
getAppPath
=
()
=>
{
let
appPath
=
d
ocument
.
getElementById
(
'main-wrap'
).
dataset
.
apppath
||
'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.home","params":{"gender":"1","channel":"2"}}'
;
let
appPath
=
d
ecodeURI
(
document
.
getElementById
(
'main-wrap'
).
dataset
.
apppath
)
||
'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.home","params":{"gender":"1","channel":"2"}}'
;
return
appPath
;
};
...
...
apps/pages/article/components/download-bottom.vue
View file @
f32c936
...
...
@@ -3,7 +3,7 @@
<span class="avatar-block">
<div class="avatar"></div>
</span>
打开有货App
在App中查看
<i class="iconfont mg"></i>
</a>
</template>
...
...
apps/pages/article/components/download-top.vue
View file @
f32c936
...
...
@@ -42,7 +42,7 @@ export default {
elem.removeChild(miniElem);
}
elem.addEventListener('click',
async
function(e) {
elem.addEventListener('click', function(e) {
let target = e.target;
switch (target.className.toLowerCase()) {
...
...
doraemon/middleware/ssr.js
View file @
f32c936
...
...
@@ -83,7 +83,7 @@ function getAppPath(req) {
'"params":{"url":"http://m.yohobuy.com'
+
appPathUrl
+
'","param":'
+
JSON
.
stringify
(
req
.
query
)
+
'}}'
;
return
appPath
;
return
encodeURI
(
appPath
)
;
}
const
handlerError
=
(
err
=
{},
req
,
res
,
next
)
=>
{
...
...
doraemon/views/index.hbs
View file @
f32c936
...
...
@@ -28,13 +28,14 @@
(function (d) {function vtn(e){var t,a=0,n=e.split(".").map(e=>Number(e));for(t=0;t<3;t++)a+=(n[t]||0)*Math.pow(100,2-t);return a}function gav(e,t){var a=e.match(new RegExp("(^|)app_version=([^"+t+"]*)("+t+"|$)"));return a&&a.length?a[2]:""}var appv=gav(d.cookie,";")||gav(location.href,"&");if(/YohoBuy/i.test(navigator.userAgent||"")&&/\
(
i
[
^
;]
+
;(
U
;)?
CPU
.
+
Mac
OS
X
/
i
.
test
(
navigator
.
userAgent
||
""
)
&&
appv
&&
vtn
(
appv
)
>=
vtn
(
"6.9.2"
)){
var
e
=
d
.
documentElement
,
n
=
e
.
clientHeight
/
e
.
clientWidth
>
2.1
?
"-high"
:
""
;
d
.
getElementsByTagName
(
"body"
)[
0
].
className
=
"immerse-body"
+
n
}})(
document
);
</script>
{{{
html
}}}
<div
id=
"degrade-app"
></div>
<div
id=
"main-wrap"
data-apppath=
"
{{{
appPath
}}}
"
>
{{#
unless
download
}}
<div
id=
"no-download"
></div>
{{/
unless
}}
</div>
<div
id=
"main-wrap"
data-apppath=
'
{{{
appPath
}}}
'
>
{{#
unless
download
}}
<div
id=
"no-download"
></div>
{{/
unless
}}
</div>
{{{
states
}}}
...
...
Please
register
or
login
to post a comment