Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import axios from 'axios';
export default {
send: (options) => {
axios
.post(options.url, options.data)
.post(options.url, options.data, { timeout: 10000 })
.then((response) => {
const data = response.data;
if (!data || data.code !== 0) {
Expand All @@ -20,7 +20,7 @@ export default {

read: (options) => {
axios
.get(options.url)
.get(options.url, { timeout: 10000 })
.then((response) => {
const data = response.data;
if (!data || data.code !== 0) {
Expand Down
6 changes: 5 additions & 1 deletion webpack/prod.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require('path');
const webpack = require('webpack');
const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const gitRevisionPlugin = new GitRevisionPlugin();

module.exports = {
Expand Down Expand Up @@ -54,7 +55,7 @@ module.exports = {
{
test: /\.less$/,
use: [
'style-loader',
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
Expand Down Expand Up @@ -91,6 +92,9 @@ module.exports = {
},

plugins: [
new MiniCssExtractPlugin({
filename: '[name].min.css',
}),
new webpack.DefinePlugin({
DPLAYER_VERSION: `"${require('../package.json').version}"`,
GIT_HASH: JSON.stringify(gitRevisionPlugin.version()),
Expand Down