Authored by 陈峰

commit

... ... @@ -3,12 +3,12 @@
<transition
:name="`route-view-${yoho.direction}`">
<keep-alive>
<router-view v-if="$route.meta.keepAlive"></router-view>
<router-view :key="$route.path" v-if="$route.meta.keepAlive"></router-view>
</keep-alive>
</transition>
<transition
:name="`route-view-${yoho.direction}`">
<router-view v-if="!$route.meta.keepAlive"></router-view>
<router-view :key="$route.path" v-if="!$route.meta.keepAlive"></router-view>
</transition>
<div id="fps" class="fps" v-if="showFps"></div>
</div>
... ...
... ... @@ -34,7 +34,7 @@ const getUser = async(store) => {
if (!appUid || !appSessionKey || !appVersion || !appClientType) {
const {uid, session_key, app_version, client_type} = qs;
if (+uid && session_key && app_version && client_type) {
if (uid && session_key && app_version && client_type) {
appUid = +uid;
appSessionKey = session_key;
appVersion = app_version;
... ...
... ... @@ -10,16 +10,19 @@
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<script type="text/javascript">
(function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=750){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/750)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
</script>
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<link rel="dns-prefetch" href="//img10.static.yhbimg.com">
<link rel="dns-prefetch" href="//img11.static.yhbimg.com">
<link rel="dns-prefetch" href="//img12.static.yhbimg.com">
<link rel="dns-prefetch" href="//img13.static.yhbimg.com">
<script type="text/javascript">
(function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=750){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/750)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
</script>
</head>
<body>
<script type="text/javascript">
(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>
<!--vue-ssr-outlet-->
<div id="degrade-app"></div>
<div id="main-wrap">
... ...
<html lang="en" style="font-size: 22.08px;">
<head>
<meta charset="utf-8">
<title></title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta http-equiv="Content-Security-Policy" content="style-src 'self' 'unsafe-inline' http: https: yoho-protocol:">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<style>
html, body {
font-size: 0.6rem;
font-family: "PingFang SC", "HiraginoSansGB-W3", "SanFranciscoText-Regular", Helvetica, Roboto, "Heiti SC", "黑体", Arial;
line-height: 1.4;
scroll-behavior: smooth;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
color: #222;
margin: 0;
}
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, menu, nav, output, ruby, section, summary, time, mark, audio, video, input {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font-weight: normal;
vertical-align: baseline;
}
.immerse-body .layout-header-wrap {
padding-top: 22px;
}
.immerse-body-high .layout-header-wrap {
padding-top: 44px;
}
.layout-header-wrap {
width: 100%;
background-color: #444;
color: #fff;
}
.layout-header-wrap.theme-white {
background-color: #fff;
color: #222;
}
.layout-header-wrap.theme-white .layout-header {
border-bottom: solid 1px #efefef;
}
.layout-header-wrap.theme-transparent {
background-color: initial;
color: #fff;
}
.layout-header {
width: 100%;
height: 44px;
overflow: hidden;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: stretch;
-webkit-align-items: stretch;
align-items: stretch;
box-sizing: border-box;
}
.layout-header > * {
position: relative;
}
.layout-header .flex {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
}
.layout-header .iconfont {
height: 100%;
font-size: 20px;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
padding-left: 10px;
padding-right: 10px;
}
.layout-header .back {
width: 4rem;
padding-left: 0.125rem;
}
.layout-header .title {
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
font-size: 18px;
letter-spacing: 0.09px;
overflow: hidden;
z-index: 1;
}
.layout-header .title .title-inner {
max-width: 90%;
line-height: 1.4;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
}
.layout-header .opts {
width: 4rem;
height: inherit;
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
padding-right: 0.125rem;
}
.layout-header .opts .iconfont {
font-size: 23px;
}
.article-title {
font-size: 0.85rem;
font-weight: 500;
}
</style>
</head>
<body>
<script type="text/javascript">
(function (d, c) { var e = d.documentElement, a = "orientationchange" in window ? "orientationchange" : "resize", b = function () { var f = e.clientWidth; if (!f) { return } if (f >= 750) { e.style.fontSize = "40px" } else { e.style.fontSize = 40 * (f / 750) + "px" } }; if (!d.addEventListener) { return } b(); c.addEventListener(a, b, false); d.addEventListener("DOMContentLoaded", b, false) })(document, window);
(function (d) { var e = d.documentElement, n = e.clientHeight / e.clientWidth > 2.1 ? "-high" : ""; d.getElementsByTagName("body")[0].className = "immerse-body" + n })(document);
</script>
<div class="layout-header-wrap theme-white">
<div class="layout-header">
<div class="back flex hover-opacity"><i class="iconfont icon-left"></i>
</div>
<div class="title flex" style="opacity:1;">
<div class="article-title">有货社区</div>
</div>
<div class="opts flex" style="opacity:1;"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -67,7 +67,7 @@ export default {
},
computed: {
invisible() {
return this.thumb || (this.data.commentCount <= 2);
return this.data.commentCount <= 2;
}
},
mounted() {
... ...
... ... @@ -4,6 +4,7 @@ export default [
...ErrorPages,
{
path: '/default',
alias: '/',
name: 'default',
component: () => import(/* webpackChunkName: "error" */ './default')
}
... ...
... ... @@ -19,7 +19,7 @@ const zipFile = `${pkg.version}.zip`;
shelljs.exec(`zip -j -q ${path.join(dir, zipFile)} ${files}`);
vender.default = 'yoho-protocol://m.yohobuy.com/grass/default';
vender.default = `https://cdn.yoho.cn/${pkg.name}/loading-${pkg.version}.html`;
allFiles.forEach(file => {
const paths = file.split('/');
... ...
... ... @@ -8,6 +8,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
let baseConfig = require('./webpack.base.conf');
const isProd = process.env.NODE_ENV === 'production';
... ... @@ -141,7 +142,10 @@ const webpackConfig = merge(baseConfig, {
filename: isProd ? `degrade-${pkg.version}.html` : 'degrade.html',
template: 'apps/index.html',
inject: true
})
}),
new CopyPlugin([
{ from: path.join(__dirname, '../apps/loading.html'), to: `loading-${pkg.version}.html` },
]),
]
});
... ...
... ... @@ -11,9 +11,9 @@ const isTest = process.env.NODE_ENV === 'test3';
const domains = {
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// ufo: 'http://2.yohobuy.cn/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
ufo: 'http://2.yohobuy.cn/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/',
... ... @@ -24,9 +24,9 @@ const domains = {
// platformApi: 'http://172.16.6.210:8088/',
api: 'http://api-test3.dev.yohocorp.com/',
service: 'http://api-test3.dev.yohocorp.com/',
ufo: 'http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/',
// api: 'http://api-test3.dev.yohocorp.com/',
// service: 'http://api-test3.dev.yohocorp.com/',
// ufo: 'http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/',
};
module.exports = {
... ...
... ... @@ -57,9 +57,5 @@ module.exports = [
route: /grass\/mine\/fans/,
cacheTime: 900,
cache: true
},
{
route: /grass\/default/,
protocol: true
},
}
];
... ...
{
"name": "yoho-community-web",
"version": "1.0.1-4",
"version": "1.0.1-12",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ... @@ -92,6 +92,7 @@
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-imports": "^1.5.1",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"copy-webpack-plugin": "^5.0.3",
"css-loader": "^2.0.0",
"eslint": "^5.10.0",
"eslint-config-yoho": "^1.1.0",
... ...
... ... @@ -1366,7 +1366,7 @@ cacache@^10.0.4:
unique-filename "^1.1.0"
y18n "^4.0.0"
cacache@^11.2.0:
cacache@^11.2.0, cacache@^11.3.2:
version "11.3.2"
resolved "http://npm.yohops.com/cacache/-/cacache-11.3.2.tgz#2d81e308e3d258ca38125b676b98b2ac9ce69bfa"
dependencies:
... ... @@ -1897,6 +1897,23 @@ copy-descriptor@^0.1.0:
version "0.1.1"
resolved "http://npm.yohops.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
copy-webpack-plugin@^5.0.3:
version "5.0.3"
resolved "http://npm.yohops.com/copy-webpack-plugin/-/copy-webpack-plugin-5.0.3.tgz#2179e3c8fd69f13afe74da338896f1f01a875b5c"
dependencies:
cacache "^11.3.2"
find-cache-dir "^2.1.0"
glob-parent "^3.1.0"
globby "^7.1.1"
is-glob "^4.0.1"
loader-utils "^1.2.3"
minimatch "^3.0.4"
normalize-path "^3.0.0"
p-limit "^2.2.0"
schema-utils "^1.0.0"
serialize-javascript "^1.7.0"
webpack-log "^2.0.0"
core-js@^2.4.0, core-js@^2.5.7:
version "2.6.3"
resolved "http://npm.yohops.com/core-js/-/core-js-2.6.3.tgz#4b70938bdffdaf64931e66e2db158f0892289c49"
... ... @@ -2399,7 +2416,7 @@ digest-header@^0.0.1:
dependencies:
utility "0.1.11"
dir-glob@^2.2.1:
dir-glob@^2.0.0, dir-glob@^2.2.1:
version "2.2.2"
resolved "http://npm.yohops.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4"
dependencies:
... ... @@ -3077,6 +3094,14 @@ find-cache-dir@^2.0.0:
make-dir "^1.0.0"
pkg-dir "^3.0.0"
find-cache-dir@^2.1.0:
version "2.1.0"
resolved "http://npm.yohops.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7"
dependencies:
commondir "^1.0.1"
make-dir "^2.0.0"
pkg-dir "^3.0.0"
find-up@^1.0.0:
version "1.1.2"
resolved "http://npm.yohops.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
... ... @@ -3389,6 +3414,17 @@ globby@^6.1.0:
pify "^2.0.0"
pinkie-promise "^2.0.0"
globby@^7.1.1:
version "7.1.1"
resolved "http://npm.yohops.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680"
dependencies:
array-union "^1.0.1"
dir-glob "^2.0.0"
glob "^7.1.2"
ignore "^3.3.5"
pify "^3.0.0"
slash "^1.0.0"
globby@^9.0.0:
version "9.0.0"
resolved "http://npm.yohops.com/globby/-/globby-9.0.0.tgz#3800df736dc711266df39b4ce33fe0d481f94c23"
... ... @@ -3776,6 +3812,10 @@ ignore-walk@^3.0.1:
dependencies:
minimatch "^3.0.4"
ignore@^3.3.5:
version "3.3.10"
resolved "http://npm.yohops.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
ignore@^4.0.3, ignore@^4.0.6:
version "4.0.6"
resolved "http://npm.yohops.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
... ... @@ -4119,6 +4159,12 @@ is-glob@^4.0.0:
dependencies:
is-extglob "^2.1.1"
is-glob@^4.0.1:
version "4.0.1"
resolved "http://npm.yohops.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
dependencies:
is-extglob "^2.1.1"
is-hexadecimal@^1.0.0:
version "1.0.2"
resolved "http://npm.yohops.com/is-hexadecimal/-/is-hexadecimal-1.0.2.tgz#b6e710d7d07bb66b98cb8cece5c9b4921deeb835"
... ... @@ -4474,7 +4520,7 @@ loader-utils@^0.2.16:
json5 "^0.5.0"
object-assign "^4.0.1"
loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.1:
loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.1, loader-utils@^1.2.3:
version "1.2.3"
resolved "http://npm.yohops.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7"
dependencies:
... ... @@ -4647,6 +4693,13 @@ make-dir@^1.0.0:
dependencies:
pify "^3.0.0"
make-dir@^2.0.0:
version "2.1.0"
resolved "http://npm.yohops.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
dependencies:
pify "^4.0.1"
semver "^5.6.0"
mamacro@^0.0.3:
version "0.0.3"
resolved "http://npm.yohops.com/mamacro/-/mamacro-0.0.3.tgz#ad2c9576197c9f1abf308d0787865bd975a3f3e4"
... ... @@ -5209,6 +5262,10 @@ normalize-path@^2.1.1:
dependencies:
remove-trailing-separator "^1.0.1"
normalize-path@^3.0.0:
version "3.0.0"
resolved "http://npm.yohops.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
normalize-range@^0.1.2:
version "0.1.2"
resolved "http://npm.yohops.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
... ... @@ -5458,6 +5515,12 @@ p-limit@^2.0.0:
dependencies:
p-try "^2.0.0"
p-limit@^2.2.0:
version "2.2.0"
resolved "http://npm.yohops.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2"
dependencies:
p-try "^2.0.0"
p-locate@^2.0.0:
version "2.0.0"
resolved "http://npm.yohops.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
... ... @@ -6822,6 +6885,10 @@ serialize-javascript@^1.3.0, serialize-javascript@^1.4.0:
version "1.6.1"
resolved "http://npm.yohops.com/serialize-javascript/-/serialize-javascript-1.6.1.tgz#4d1f697ec49429a847ca6f442a2a755126c4d879"
serialize-javascript@^1.7.0:
version "1.7.0"
resolved "http://npm.yohops.com/serialize-javascript/-/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65"
serve-favicon@^2.5.0:
version "2.5.0"
resolved "http://npm.yohops.com/serve-favicon/-/serve-favicon-2.5.0.tgz#935d240cdfe0f5805307fdfe967d88942a2cbcf0"
... ... @@ -6926,6 +6993,10 @@ simple-swizzle@^0.2.2:
dependencies:
is-arrayish "^0.3.1"
slash@^1.0.0:
version "1.0.0"
resolved "http://npm.yohops.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
slash@^2.0.0:
version "2.0.0"
resolved "http://npm.yohops.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44"
... ...