Authored by htoo

format: format code

... ... @@ -13,7 +13,9 @@ function queryString() {
const getAppPath = () => {
let params = queryString();
let openbyYohobuy = params['openby:yohobuy'] || '';
let appPath = '';
if (openbyYohobuy) {
... ...
... ... @@ -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) {
... ...
... ... @@ -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) => {
... ...
... ... @@ -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 */
... ...
... ... @@ -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') {
... ...
... ... @@ -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) {
... ...
... ... @@ -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)
};
... ...