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
htoo
5 years ago
Commit
ab097fc29e34b245ff47a59cd8a0c21a5fdaf796
1 parent
c3a91ea7
format: format code
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
0 deletions
apps/common/open-app.js
apps/components/comments/comment-placeholder-actionsheet.vue
apps/pages/article/article-detail.vue
apps/pages/article/components/article/article-item2.vue
apps/pages/userpage/components/author.vue
apps/utils/share-handler.js
doraemon/middleware/ssr.js
apps/common/open-app.js
View file @
ab097fc
...
...
@@ -13,7 +13,9 @@ function queryString() {
const
getAppPath
=
()
=>
{
let
params
=
queryString
();
let
openbyYohobuy
=
params
[
'openby:yohobuy'
]
||
''
;
let
appPath
=
''
;
if
(
openbyYohobuy
)
{
...
...
apps/components/comments/comment-placeholder-actionsheet.vue
View file @
ab097fc
...
...
@@ -35,6 +35,7 @@ export default {
const commentId = this.$attrs['dest-id'];
const articleId = this.$attrs['article-id'];
const commentType = this.$attrs.commentType;
let menu = [];
if (authorUid === uid || commentUid === uid) {
...
...
apps/pages/article/article-detail.vue
View file @
ab097fc
...
...
@@ -402,6 +402,7 @@ export default {
*/
article = JSON.parse(JSON.stringify(article)); // 防止直接修改vuex数据,拷贝一份数据副本
let text = article.blockList[1].contentData, str = '';
let atUserInfo = article.atUserInfo;
Object.keys(atUserInfo).forEach((key) => {
...
...
apps/pages/article/components/article/article-item2.vue
View file @
ab097fc
...
...
@@ -145,6 +145,7 @@ export default {
toArticlePage() {
if (this.isMiniapp()) {
let url = `http://m.yohobuy.com/grass/article/${this.data.articleId}`;
let h5url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.h5","params":{"h5back":"${encodeURIComponent(url)}"}}`;
/* eslint-disable-next-line */
...
...
apps/pages/userpage/components/author.vue
View file @
ab097fc
...
...
@@ -380,6 +380,7 @@ export default {
let destIndex = numString.length - 4;
let destString = numString.substring(0, destIndex);
let subString = numString.substring(destIndex, destIndex + 1);
if (subString !== '0') {
...
...
apps/utils/share-handler.js
View file @
ab097fc
...
...
@@ -15,6 +15,7 @@ function _version2num(version) {
// eslint-disable-next-line no-unused-vars
function
versionCompare
(
left
,
right
)
{
let
leftNum
=
_version2num
(
left
);
let
rightNum
=
_version2num
(
right
);
if
(
leftNum
===
rightNum
)
{
...
...
@@ -50,6 +51,7 @@ const filterEmoji = text => {
// eslint-disable-next-line no-unused-vars
const
getDetailShareData
=
(
article
,
app_version
=
'6.9.11'
)
=>
{
let
shareImage
=
''
;
let
desc
=
''
;
if
(
article
.
sort
===
2
)
{
...
...
@@ -81,6 +83,7 @@ const getDetailShareData = (article, app_version = '6.9.11') => {
// eslint-disable-next-line no-unused-vars
const
requiredVersion
=
'6.9.11'
;
let
hideType
=
[
'7'
,
'8'
,
'9'
];
if
(
versionCompare
(
app_version
,
requiredVersion
)
>=
0
)
{
...
...
doraemon/middleware/ssr.js
View file @
ab097fc
...
...
@@ -16,7 +16,9 @@ const config = global.yoho.config;
const
isDev
=
process
.
env
.
NODE_ENV
===
'development'
||
!
process
.
env
.
NODE_ENV
;
let
renderer
;
let
serverBundle
;
let
degradeHtml
;
const
hbs
=
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'../views/index.hbs'
),
'utf-8'
);
...
...
@@ -123,6 +125,7 @@ const getChannel = (yoho) => {
const
getCacheKey
=
(
req
,
route
)
=>
{
const
urlObj
=
url
.
parse
(
req
.
url
);
let
ck
=
urlObj
.
pathname
;
if
(
route
.
query
)
{
...
...
@@ -177,10 +180,14 @@ const render = (route) => {
return
handlerError
(
err
,
req
,
res
,
next
);
}
let
styles
=
context
.
renderStyles
();
let
scripts
=
context
.
renderScripts
();
let
resources
=
context
.
renderResourceHints
();
const
states
=
context
.
renderState
();
let
asyncScripts
;
let
zk
=
{
asyncJs
:
_
.
get
(
req
.
app
.
locals
.
wap
,
'webapp.ios-async-js'
,
true
)
};
...
...
Please
register
or
login
to post a comment