no message
This commit is contained in:
parent
279384bddf
commit
0cda0a7427
@ -28,7 +28,7 @@ server {
|
||||
allow all;
|
||||
}
|
||||
|
||||
location =/ws {
|
||||
location =/api/ws {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-PORT $remote_port;
|
||||
|
51
electron/index.html
Normal file
51
electron/index.html
Normal file
@ -0,0 +1,51 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<title>Dootask</title>
|
||||
<link rel="stylesheet" type="text/css" href="./public/css/app.css">
|
||||
<link rel="stylesheet" type="text/css" href="./public/css/iview.css">
|
||||
<script src="./public/js/jquery.min.js"></script>
|
||||
<script src="./public/js/bootstrap.min.js"></script>
|
||||
<script src="./public/js/language.all.js"></script>
|
||||
<script src="./public/js/scroll-into-view.min.js"></script>
|
||||
<script>
|
||||
window.systemInformation = {
|
||||
version: "0.2.63",
|
||||
origin: window.location.origin + "/",
|
||||
apiUrl: null
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div id="app">
|
||||
<div class="app-view-loading">
|
||||
<div>
|
||||
<div>PAGE LOADING</div>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.writeln("<script src=\'./public/js/app.js?v=" + window.systemInformation.version + "\'><\/script>");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
2
electron/main.js
vendored
2
electron/main.js
vendored
@ -15,7 +15,7 @@ function createWindow () {
|
||||
})
|
||||
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadFile('../public/index_electron.html').then(r => {
|
||||
mainWindow.loadFile('./index.html').then(r => {
|
||||
|
||||
})
|
||||
|
||||
|
@ -114,7 +114,7 @@
|
||||
language = 'zh'
|
||||
break;
|
||||
}
|
||||
this.url = './js/grapheditor/' + (this.readOnly ? 'viewer' : 'index') + '.html?lang=' + language;
|
||||
this.url = $A.originUrl('js/grapheditor/' + (this.readOnly ? 'viewer' : 'index') + '.html?lang=' + language);
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('message', this.handleMessage)
|
||||
|
@ -51,13 +51,13 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
$A.loadScriptS([
|
||||
'./js/luckysheet/plugins/css/pluginsCss.css',
|
||||
'./js/luckysheet/plugins/plugins.css',
|
||||
'./js/luckysheet/css/luckysheet.css',
|
||||
'./js/luckysheet/assets/iconfont/iconfont.css',
|
||||
'js/luckysheet/plugins/css/pluginsCss.css',
|
||||
'js/js/luckysheet/plugins/plugins.css',
|
||||
'js/js/luckysheet/css/luckysheet.css',
|
||||
'js/js/luckysheet/assets/iconfont/iconfont.css',
|
||||
//
|
||||
'./js/luckysheet/plugins/js/plugin.js',
|
||||
'./js/luckysheet/luckysheet.umd.js',
|
||||
'js/js/luckysheet/plugins/js/plugin.js',
|
||||
'js/js/luckysheet/luckysheet.umd.js',
|
||||
], () => {
|
||||
this.loadIng = false;
|
||||
this.bakValue = JSON.stringify(this.value);
|
||||
|
@ -227,7 +227,7 @@
|
||||
}
|
||||
},
|
||||
htmlOk() {
|
||||
$A.loadScript(window.location.origin + '/js/html2md.js', () => {
|
||||
$A.loadScript('js/html2md.js', () => {
|
||||
if (typeof toMarkdown !== 'function') {
|
||||
$A.modalAlert("组件加载失败!");
|
||||
return;
|
||||
|
@ -212,7 +212,7 @@
|
||||
return {
|
||||
inline: isFull ? false : this.inline,
|
||||
selector: (isFull ? '#T_' : '#') + this.id,
|
||||
base_url: './js/tinymce',
|
||||
base_url: $A.originUrl('js/tinymce'),
|
||||
language: "zh_CN",
|
||||
toolbar: this.toolbar,
|
||||
plugins: this.plugin(isFull),
|
||||
|
14
resources/assets/js/functions/common.js
vendored
14
resources/assets/js/functions/common.js
vendored
@ -3,8 +3,6 @@
|
||||
*/
|
||||
(function (window, $, undefined) {
|
||||
|
||||
let serverUrl = window.location.origin + '/';
|
||||
|
||||
/**
|
||||
* =============================================================================
|
||||
* ************************** 基础函数类 **************************
|
||||
@ -209,7 +207,7 @@
|
||||
* @param str
|
||||
* @returns {string}
|
||||
*/
|
||||
serverUrl: function (str) {
|
||||
originUrl: function (str) {
|
||||
if (str.substring(0, 2) === "//" ||
|
||||
str.substring(0, 7) === "http://" ||
|
||||
str.substring(0, 8) === "https://" ||
|
||||
@ -217,7 +215,11 @@
|
||||
str.substring(0, 1) === "/") {
|
||||
return str;
|
||||
}
|
||||
return serverUrl + str;
|
||||
if (window.systemInformation && typeof window.systemInformation.origin === "string") {
|
||||
return window.systemInformation.origin + str;
|
||||
} else {
|
||||
return window.location.origin + "/" + str;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@ -878,6 +880,7 @@
|
||||
* @param callback
|
||||
*/
|
||||
loadScript(url, callback) {
|
||||
url = $A.originUrl(url);
|
||||
if (this.rightExists(url, '.css')) {
|
||||
this.loadCss(url, callback)
|
||||
return;
|
||||
@ -928,6 +931,7 @@
|
||||
* @param callback
|
||||
*/
|
||||
loadCss(url, callback) {
|
||||
url = $A.originUrl(url);
|
||||
if (this.rightExists(url, '.js')) {
|
||||
this.loadScript(url, callback)
|
||||
return;
|
||||
@ -936,7 +940,7 @@
|
||||
typeof callback === "function" && callback();
|
||||
return;
|
||||
}
|
||||
var script = document.createElement('link');
|
||||
let script = document.createElement('link');
|
||||
if (script.readyState) {
|
||||
script.onreadystatechange = () => {
|
||||
if (script.readyState == 'loaded' || script.readyState == 'complete') {
|
||||
|
@ -296,7 +296,7 @@ export default {
|
||||
}
|
||||
this._notificationId = id;
|
||||
this.notificationClass.replaceOptions({
|
||||
icon: './images/logo.png',
|
||||
icon: $A.originUrl('images/logo.png'),
|
||||
body: body,
|
||||
data: data,
|
||||
tag: "dialog",
|
||||
|
6
resources/assets/js/store/actions.js
vendored
6
resources/assets/js/store/actions.js
vendored
@ -1422,12 +1422,10 @@ export default {
|
||||
}
|
||||
return;
|
||||
}
|
||||
let url = window.webSocketConfig.URL;
|
||||
if (!url) {
|
||||
url = state.method.apiUrl('/ws');
|
||||
//
|
||||
let url = state.method.apiUrl('ws');
|
||||
url = url.replace("https://", "wss://");
|
||||
url = url.replace("http://", "ws://");
|
||||
}
|
||||
url += "?action=web&token=" + state.userToken;
|
||||
//
|
||||
state.ws = new WebSocket(url);
|
||||
|
13
resources/assets/js/store/state.js
vendored
13
resources/assets/js/store/state.js
vendored
@ -1,19 +1,16 @@
|
||||
const method = {
|
||||
apiUrl(str) {
|
||||
let origin;
|
||||
origin = window.location.origin;
|
||||
origin = 'http://127.0.0.1:2222';
|
||||
//
|
||||
if (str.substring(0, 2) === "//" ||
|
||||
str.substring(0, 7) === "http://" ||
|
||||
str.substring(0, 8) === "https://" ||
|
||||
str.substring(0, 6) === "ftp://") {
|
||||
str.substring(0, 6) === "ftp://" ||
|
||||
str.substring(0, 1) === "/") {
|
||||
return str;
|
||||
}
|
||||
if (str.substring(0, 1) == "/") {
|
||||
return origin + str;
|
||||
if (window.systemInformation && typeof window.systemInformation.apiUrl === "string") {
|
||||
return window.systemInformation.apiUrl + str;
|
||||
} else {
|
||||
return origin + "/api/" + str;
|
||||
return window.location.origin + "/api/" + str;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -19,8 +19,7 @@
|
||||
<script src="{{ asset_main('js/scroll-into-view.min.js') }}"></script>
|
||||
<script>
|
||||
window.csrfToken = { csrfToken : "{{ csrf_token() }}" };
|
||||
window.webSocketConfig = { URL: "{{ env('LARAVELS_PROXY_URL') }}", DEBUG: {{ env('APP_DEBUG') ? "true" : "false" }}, LISTENER: {} };
|
||||
window.systemInformation = { version : "{{ $version }}" };
|
||||
window.systemInformation = { version : "{{ $version }}", origin: window.location.origin + "/", apiUrl: null };
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
Loading…
x
Reference in New Issue
Block a user