Skip to content

Commit 6d46708

Browse files
committed
fix(demo): fix demo resource links
1 parent 1e3fd6f commit 6d46708

File tree

2 files changed

+40
-37
lines changed

2 files changed

+40
-37
lines changed

src/demo/App.vue

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
:music="{
2525
title: 'secret base~君がくれたもの~',
2626
artist: 'Silent Siren',
27-
src: 'http://0.0.0.0:3000/aplayer/secretbase.mp3',
28-
pic: 'http://0.0.0.0:3000/aplayer/secretbase.jpg'
27+
src: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/secretbase.mp3',
28+
pic: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/secretbase.jpg'
2929
}"
3030
/>
3131

@@ -63,8 +63,8 @@
6363
:music="{
6464
title: 'トリカゴ',
6565
artist: 'XX:me',
66-
src: 'http://0.0.0.0:3000/aplayer/darling.mp3',
67-
pic: 'http://0.0.0.0:3000/aplayer/darling.jpg',
66+
src: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/darling.mp3',
67+
pic: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/darling.jpg',
6868
}"
6969
/>
7070
<footer align="center">
@@ -92,30 +92,30 @@
9292
{
9393
title: '前前前世',
9494
artist: 'RADWIMPS',
95-
src: 'http://0.0.0.0:3000/aplayer/yourname.mp3',
96-
pic: 'http://0.0.0.0:3000/aplayer/yourname.jpg',
97-
lrc: 'http://0.0.0.0:3000/aplayer/yourname.lrc',
95+
src: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/yourname.mp3',
96+
pic: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/yourname.jpg',
97+
lrc: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/yourname.lrc',
9898
},
9999
{
100100
title: '光るなら.m3u8',
101101
artist: 'Goose house',
102-
src: 'http://0.0.0.0:3000/aplayer/hls/hikarunara.m3u8',
103-
pic: 'http://0.0.0.0:3000/aplayer/hikarunara.jpg',
104-
lrc: 'http://0.0.0.0:3000/aplayer/hikarunara.lrc',
102+
src: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/hls/hikarunara.m3u8',
103+
pic: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/hikarunara.jpg',
104+
lrc: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/hikarunara.lrc',
105105
},
106106
{
107107
title: '回レ!雪月花',
108108
artist: '小倉唯',
109-
src: 'http://0.0.0.0:3000/aplayer/snowmoonflowers.mp3',
110-
pic: 'http://0.0.0.0:3000/aplayer/snowmoonflowers.jpg',
111-
lrc: 'http://0.0.0.0:3000/aplayer/snowmoonflowers.lrc',
109+
src: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/snowmoonflowers.mp3',
110+
pic: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/snowmoonflowers.jpg',
111+
lrc: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/snowmoonflowers.lrc',
112112
},
113113
{
114114
title: 'あっちゅ~ま青春!',
115115
artist: '七森中☆ごらく部',
116-
src: 'http://0.0.0.0:3000/aplayer/yuruyuri.mp3',
117-
pic: 'http://0.0.0.0:3000/aplayer/yuruyuri.jpg',
118-
lrc: 'http://0.0.0.0:3000/aplayer/yuruyuri.lrc',
116+
src: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/yuruyuri.mp3',
117+
pic: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/yuruyuri.jpg',
118+
lrc: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/yuruyuri.lrc',
119119
},
120120
],
121121
}

webpack.demo.config.js

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ module.exports = {
1818
include: [path.resolve(__dirname, 'src')],
1919
options: {
2020
formatter: require('eslint-friendly-formatter'),
21-
emitWarning: true
22-
}
21+
emitWarning: true,
22+
},
2323
},
2424
{
2525
test: /\.vue$/,
2626
loader: 'vue-loader',
2727
options: {
2828
loaders: {
2929
js: 'babel-loader?babelrc',
30-
scss: 'style-loader!css-loader!postcss-loader!sass-loader'
31-
}
32-
}
30+
scss: 'style-loader!css-loader!postcss-loader!sass-loader',
31+
},
32+
},
3333
},
3434
{
3535
test: /\.js$/,
@@ -38,17 +38,17 @@ module.exports = {
3838
},
3939
{
4040
test: /\.(png|jpg)$/,
41-
loader: 'url-loader?limit=40000'
41+
loader: 'url-loader?limit=40000',
4242
},
4343
{
4444
test: /\.svg$/,
45-
loader: 'svg-inline-loader'
45+
loader: 'svg-inline-loader',
4646
},
4747
{
4848
test: /\.html$/,
49-
loader: 'vue-html-loader'
50-
}
51-
]
49+
loader: 'vue-html-loader',
50+
},
51+
],
5252
},
5353
devtool: '#eval-source-map',
5454
devServer: {
@@ -58,29 +58,32 @@ module.exports = {
5858
disableHostCheck: true,
5959
proxy: {
6060
'/aplayer': {
61-
target: 'https://moeplayer.b0.upaiyun.com',
61+
target: 'https://cn-east-17-aplayer-35525609.oss.dogecdn.com/',
6262
secure: false,
6363
changeOrigin: true,
6464
headers: {
6565
host: 'vue-aplayer.js.org',
66-
Referer: 'https://vue-aplayer.js.org/'
67-
}
68-
}
69-
}
66+
Referer: 'https://vue-aplayer.js.org/',
67+
},
68+
pathRewrite (path) {
69+
return path.replace(/^\/aplayer/, '')
70+
},
71+
},
72+
},
7073
},
7174
plugins: [
7275
new HtmlWebpackPlugin({
7376
filename: 'index.html',
7477
template: 'src/demo/index.html',
75-
favicon: 'src/demo/favicon.ico'
78+
favicon: 'src/demo/favicon.ico',
7679
}),
7780
new webpack.DefinePlugin({
7881
'process.env': {
79-
NODE_ENV: `"${process.env.NODE_ENV}"`
82+
NODE_ENV: `"${process.env.NODE_ENV}"`,
8083
},
81-
VERSION: JSON.stringify(require("./package.json").version)
84+
VERSION: JSON.stringify(require("./package.json").version),
8285
}),
83-
]
86+
],
8487
}
8588

8689
if (process.env.NODE_ENV === 'production') {
@@ -90,8 +93,8 @@ if (process.env.NODE_ENV === 'production') {
9093
module.exports.plugins.push(
9194
new webpack.optimize.UglifyJsPlugin({
9295
compress: {
93-
warnings: false
96+
warnings: false,
9497
},
95-
})
98+
}),
9699
)
97100
}

0 commit comments

Comments
 (0)