Authored by 陈峰

commit

... ... @@ -157,6 +157,7 @@ export default {
},
getItems(reload) {
if (reload) {
this.noMore = false;
this.list = [];
this.items = [];
}
... ...
... ... @@ -10,7 +10,7 @@
<WidgetFollow class="widget-follow" :author-uid="currentAuthor.authorUid" :follow="currentAuthor.hasAttention === 'Y'" @on-follow="follow => onFollow(currentAuthor, follow)"></WidgetFollow>
</template>
</LayoutHeader>
<LayoutRecycleList v-if="isMounted" ref="scroll" @scroll="onScroll" :offset="1000" :on-fetch="onFetch">
<LayoutRecycleList v-if="isMounted" :size="50" ref="scroll" @scroll="onScroll" :offset="1000" :on-fetch="onFetch">
<template class="article-item" v-slot:item="{ data }">
<ArticleItem
:id="`item${data.index}`"
... ...
... ... @@ -613,11 +613,6 @@ ul {
white-space: nowrap;
}
img[lazy] {
-webkit-transition: all 100ms;
transition: all 100ms;
}
img[lazy=loading] {
opacity: 0.2;
}
... ...
... ... @@ -39,15 +39,6 @@ exports.createApp = async(app) => {
res.status(200).end();
});
if (!app.locals.proEnv) {
app.use((req, res, next) => {
if (/cordova/.test(req.url)) {
return res.status(404).end();
}
return next();
});
}
app.use(require('./doraemon/middleware/backlist'));
const logger = global.yoho.logger;
... ... @@ -94,6 +85,29 @@ exports.createApp = async(app) => {
// YOHO 前置中间件
app.use(setYohoDataMiddleware);
app.use(userMiddleware);
if (!app.locals.proEnv) {
app.use((req, res, next) => {
if (/cordova/.test(req.url)) {
return res.status(404).end();
}
return next();
});
app.use('/passport/login/user', (req, res) => {
let result = {
code: 403,
message: '未登录',
data: ''
};
if (req.user.uid) {
result.code = 200;
result.message = '已登录';
result.data = req.user.uid.toString();
}
res.jsonp(result);
});
}
app.get('/grass/getToken', qiniuMiddleware.getToken);
app.use('/grass', ssrApiMiddleware);
... ...