Skip to content

Commit 79ec52a

Browse files
committed
fix: add landing page host
1 parent 425e44d commit 79ec52a

File tree

6 files changed

+20
-12
lines changed

6 files changed

+20
-12
lines changed

front-end/landing-page/.umirc.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
var path = require('path')
2+
13
export default {
24
publicPath: "/luban-h5/",
35
history: 'hash',
@@ -9,5 +11,8 @@ export default {
911
antd: true,
1012
}
1113
],
12-
]
14+
],
15+
chainWebpack(config) {
16+
config.resolve.alias.set('@', path.resolve(__dirname, 'src'));
17+
},
1318
}

front-end/landing-page/src/Index-En/Page2.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function Page2() {
1616
<div className="image" style={{ backgroundImage: `url(${d.image})` }} />
1717
<div className="code-wrapper">
1818
<h4>Scan Qr code to preview</h4>
19-
<QRCode value={window.location.origin + d.url} size={160} />
19+
<QRCode value={d.url} size={160} />
2020
</div>
2121
</div>
2222
</Col>);

front-end/landing-page/src/Index-En/data.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import { H5_HOST } from '@/constants/config';
23

34
export const page1 = [
45
{
@@ -21,17 +22,17 @@ export const page1 = [
2122
export const page2 = [
2223
{
2324
title: 'Invitation',
24-
url: '/works/preview/1552',
25+
url: `${H5_HOST}/works/preview/1552`,
2526
image: 'https://i.loli.net/2019/12/04/haEim2C6QnzVPOY.png',
2627
},
2728
{
2829
title: 'Good Morning',
29-
url: '/works/preview/1551',
30+
url: `${H5_HOST}/works/preview/1551`,
3031
image: 'https://i.loli.net/2019/12/04/qBCmSl4Du8jn2XZ.png',
3132
},
3233
{
3334
title: 'Day of the Programmer',
34-
url: '/works/preview/833',
35+
url: `${H5_HOST}/works/preview/833`,
3536
image: 'https://i.loli.net/2019/12/04/s7S1no4YcuJe8Qb.png',
3637
},
3738
];

front-end/landing-page/src/Index/Page2.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function Page2() {
1616
<div className="image" style={{ backgroundImage: `url(${d.image})` }} />
1717
<div className="code-wrapper">
1818
<h4>扫码预览</h4>
19-
<QRCode value={window.location.origin + d.url} size={160} />
19+
<QRCode value={d.url} size={160} />
2020
</div>
2121
</div>
2222
</Col>);

front-end/landing-page/src/Index/data.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import { H5_HOST } from '@/constants/config';
23

34
export const page1 = [
45
{
@@ -20,18 +21,18 @@ export const page1 = [
2021

2122
export const page2 = [
2223
{
23-
title: '邀请函',
24-
url: '/works/preview/1552',
24+
title: 'Invitation',
25+
url: `${H5_HOST}/works/preview/1552`,
2526
image: 'https://i.loli.net/2019/12/04/haEim2C6QnzVPOY.png',
2627
},
2728
{
28-
title: '早安',
29-
url: '/works/preview/1551',
29+
title: 'Good Morning',
30+
url: `${H5_HOST}/works/preview/1551`,
3031
image: 'https://i.loli.net/2019/12/04/qBCmSl4Du8jn2XZ.png',
3132
},
3233
{
33-
title: '程序员节',
34-
url: '/works/preview/833',
34+
title: 'Day of the Programmer',
35+
url: `${H5_HOST}/works/preview/833`,
3536
image: 'https://i.loli.net/2019/12/04/s7S1no4YcuJe8Qb.png',
3637
},
3738
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const H5_HOST = 'https://h5.luban-h5.com'

0 commit comments

Comments
 (0)