no message

This commit is contained in:
aipaw 2021-07-08 08:37:54 +08:00
parent 9e9f99a241
commit 279384bddf
16 changed files with 32 additions and 76 deletions

View File

@ -1,21 +0,0 @@
<!--index.html-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
We are using Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.
<!-- You can also require other files to run in this process -->
<script src="./renderer.js"></script>
</body>
</html>

8
electron/main.js vendored
View File

@ -7,15 +7,17 @@ const path = require('path')
function createWindow () {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
width: 1280,
height: 800,
webPreferences: {
preload: path.join(__dirname, 'preload.js')
}
})
// and load the index.html of the app.
mainWindow.loadFile('index.html')
mainWindow.loadFile('../public/index_electron.html').then(r => {
})
// Open the DevTools.
// mainWindow.webContents.openDevTools()

View File

@ -51,7 +51,7 @@ VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
const router = new VueRouter({
mode: 'history',
mode: 'hash',
routes
});
@ -64,7 +64,7 @@ router.beforeEach((to, from, next) => {
ViewUI.LoadingBar.start();
next();
});
router.afterEach((to, from, next) => {
router.afterEach(() => {
ViewUI.LoadingBar.finish();
});

View File

@ -114,7 +114,7 @@
language = 'zh'
break;
}
this.url = window.location.origin + '/js/grapheditor/' + (this.readOnly ? 'viewer' : 'index') + '.html?lang=' + language;
this.url = './js/grapheditor/' + (this.readOnly ? 'viewer' : 'index') + '.html?lang=' + language;
},
mounted() {
window.addEventListener('message', this.handleMessage)

View File

@ -51,13 +51,13 @@ export default {
},
mounted() {
$A.loadScriptS([
window.location.origin + '/js/luckysheet/plugins/css/pluginsCss.css',
window.location.origin + '/js/luckysheet/plugins/plugins.css',
window.location.origin + '/js/luckysheet/css/luckysheet.css',
window.location.origin + '/js/luckysheet/assets/iconfont/iconfont.css',
'./js/luckysheet/plugins/css/pluginsCss.css',
'./js/luckysheet/plugins/plugins.css',
'./js/luckysheet/css/luckysheet.css',
'./js/luckysheet/assets/iconfont/iconfont.css',
//
window.location.origin + '/js/luckysheet/plugins/js/plugin.js',
window.location.origin + '/js/luckysheet/luckysheet.umd.js',
'./js/luckysheet/plugins/js/plugin.js',
'./js/luckysheet/luckysheet.umd.js',
], () => {
this.loadIng = false;
this.bakValue = JSON.stringify(this.value);
@ -99,7 +99,7 @@ export default {
],
lang: lang,
loading: {
image: 'image://' + window.location.origin + '/js/luckysheet/css/loading.gif'
image: 'image://.js/luckysheet/css/loading.gif'
},
data: value ? $A.cloneJSON(value) : [
{

View File

@ -212,7 +212,7 @@
return {
inline: isFull ? false : this.inline,
selector: (isFull ? '#T_' : '#') + this.id,
base_url: $A.serverUrl('js/tinymce'),
base_url: './js/tinymce',
language: "zh_CN",
toolbar: this.toolbar,
plugins: this.plugin(isFull),

View File

@ -220,37 +220,6 @@
return serverUrl + str;
},
/**
* 获取IP地址详情
* @param ip
* @param callback
*/
getIpInfo: function(ip, callback) {
if (!this.strExists(ip, ".")) {
return;
}
let keyName = '__ip' + ip.substring(0, 1) + '__';
let key = this.getMiddle(ip, '', '.');
let res = this.loadFromlLocal(key, ip, '', keyName);
if (typeof res == "object") {
if (typeof callback == "function") {
callback(res);
}
return;
}
$A.ajaxc({
url: $A.serverUrl('api/system/get/ipinfo'),
data: { ip: ip },
timeout: 8000,
success: (res) => {
this.savaToLocal(key, ip, res, keyName);
if (typeof callback == "function") {
callback(res);
}
}
});
},
/**
* 新增&&获取缓存数据
* @param key

View File

@ -296,7 +296,7 @@ export default {
}
this._notificationId = id;
this.notificationClass.replaceOptions({
icon: $A.serverUrl('images/logo.png'),
icon: './images/logo.png',
body: body,
data: data,
tag: "dialog",

View File

@ -1424,10 +1424,9 @@ export default {
}
let url = window.webSocketConfig.URL;
if (!url) {
url = window.location.origin;
url = state.method.apiUrl('/ws');
url = url.replace("https://", "wss://");
url = url.replace("http://", "ws://");
url += "/ws";
}
url += "?action=web&token=" + state.userToken;
//

View File

@ -1,13 +1,20 @@
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, 1) === "/") {
str.substring(0, 6) === "ftp://") {
return str;
}
return window.location.origin + '/api/' + str;
if (str.substring(0, 1) == "/") {
return origin + str;
} else {
return origin + "/api/" + str;
}
},
date2string(params, format) {

View File

@ -15,7 +15,6 @@
align-items: center;
width: 100%;
height: 42px;
min-width: 900px;
background-color: #ffffff;
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.05);
position: relative;

View File

@ -1,8 +1,8 @@
@font-face {
font-family: 'taskfont'; /* Project id 2583385 */
src: url('//at.alicdn.com/t/font_2583385_vbi15jduv0n.woff2?t=1625644968453') format('woff2'),
url('//at.alicdn.com/t/font_2583385_vbi15jduv0n.woff?t=1625644968453') format('woff'),
url('//at.alicdn.com/t/font_2583385_vbi15jduv0n.ttf?t=1625644968453') format('truetype');
src: url('../css/fonts/taskfont.woff2') format('woff2'),
url('../css/fonts/taskfont.woff') format('woff'),
url('../css/fonts/taskfont.ttf') format('truetype');
}
.taskfont {

Binary file not shown.

1
webpack.mix.js vendored
View File

@ -28,6 +28,7 @@ mix
.sass('resources/assets/sass/app.scss', 'public/css')
.webpackConfig({
output: {
publicPath: './',
chunkFilename: function ({chunk}) {
return `js/build/${mixBuildName(chunk.id)}.js`
}