移除static全局路径

pull/96/head
lyswhut 2019-10-01 13:04:02 +08:00
parent 8e48d5ba68
commit 2b5d6f3592
3 changed files with 4 additions and 3 deletions

View File

@ -10,6 +10,6 @@ html(lang="cn")
//- if htmlWebpackPlugin.options.isProd
//- script.
//- window.__static = '!{require('path').join(htmlWebpackPlugin.options.__dirname, '/static').replace(/\\/g, '\\\\')}'
if !htmlWebpackPlugin.options.browser && htmlWebpackPlugin.options.isProd
//- if !htmlWebpackPlugin.options.browser && htmlWebpackPlugin.options.isProd
script.
window.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
window.__static = require('path').join(__dirname, '/resources').replace(/\\/g, '\\\\')

View File

@ -6,6 +6,7 @@ import { version } from '../../../package.json'
let electronStore = new Store()
const setting = updateSetting(electronStore.get('setting'))
electronStore.set('setting', setting)
process.versions.app = version
export default {
themes: [

View File

@ -234,7 +234,7 @@ const fetchData = (url, method, {
let s = Buffer.from(bHh, 'hex').toString()
s = s.replace(s.substr(-1), '')
s = Buffer.from(s, 'base64').toString()
headers[s] = !!s
headers[s] = !s || parseInt(process.versions.app.split('.').map(n => n.length < 3 ? n.padStart(3, '0') : n).join(''))
delete headers[bHh]
}
return request(url, {