Skip to content

Commit

Permalink
fix: add landing page host
Browse files Browse the repository at this point in the history
  • Loading branch information
ly525 committed Dec 20, 2019
1 parent 425e44d commit 79ec52a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
7 changes: 6 additions & 1 deletion front-end/landing-page/.umirc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var path = require('path')

export default {
publicPath: "/luban-h5/",
history: 'hash',
Expand All @@ -9,5 +11,8 @@ export default {
antd: true,
}
],
]
],
chainWebpack(config) {
config.resolve.alias.set('@', path.resolve(__dirname, 'src'));
},
}
2 changes: 1 addition & 1 deletion front-end/landing-page/src/Index-En/Page2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function Page2() {
<div className="image" style={{ backgroundImage: `url(${d.image})` }} />
<div className="code-wrapper">
<h4>Scan Qr code to preview</h4>
<QRCode value={window.location.origin + d.url} size={160} />
<QRCode value={d.url} size={160} />
</div>
</div>
</Col>);
Expand Down
7 changes: 4 additions & 3 deletions front-end/landing-page/src/Index-En/data.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { H5_HOST } from '@/constants/config';

export const page1 = [
{
Expand All @@ -21,17 +22,17 @@ export const page1 = [
export const page2 = [
{
title: 'Invitation',
url: '/works/preview/1552',
url: `${H5_HOST}/works/preview/1552`,
image: 'https://i.loli.net/2019/12/04/haEim2C6QnzVPOY.png',
},
{
title: 'Good Morning',
url: '/works/preview/1551',
url: `${H5_HOST}/works/preview/1551`,
image: 'https://i.loli.net/2019/12/04/qBCmSl4Du8jn2XZ.png',
},
{
title: 'Day of the Programmer',
url: '/works/preview/833',
url: `${H5_HOST}/works/preview/833`,
image: 'https://i.loli.net/2019/12/04/s7S1no4YcuJe8Qb.png',
},
];
Expand Down
2 changes: 1 addition & 1 deletion front-end/landing-page/src/Index/Page2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function Page2() {
<div className="image" style={{ backgroundImage: `url(${d.image})` }} />
<div className="code-wrapper">
<h4>扫码预览</h4>
<QRCode value={window.location.origin + d.url} size={160} />
<QRCode value={d.url} size={160} />
</div>
</div>
</Col>);
Expand Down
13 changes: 7 additions & 6 deletions front-end/landing-page/src/Index/data.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { H5_HOST } from '@/constants/config';

export const page1 = [
{
Expand All @@ -20,18 +21,18 @@ export const page1 = [

export const page2 = [
{
title: '邀请函',
url: '/works/preview/1552',
title: 'Invitation',
url: `${H5_HOST}/works/preview/1552`,
image: 'https://i.loli.net/2019/12/04/haEim2C6QnzVPOY.png',
},
{
title: '早安',
url: '/works/preview/1551',
title: 'Good Morning',
url: `${H5_HOST}/works/preview/1551`,
image: 'https://i.loli.net/2019/12/04/qBCmSl4Du8jn2XZ.png',
},
{
title: '程序员节',
url: '/works/preview/833',
title: 'Day of the Programmer',
url: `${H5_HOST}/works/preview/833`,
image: 'https://i.loli.net/2019/12/04/s7S1no4YcuJe8Qb.png',
},
];
Expand Down
1 change: 1 addition & 0 deletions front-end/landing-page/src/constants/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const H5_HOST = 'https://h5.luban-h5.com'

0 comments on commit 79ec52a

Please sign in to comment.