mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:19:26 +08:00
up
This commit is contained in:
@@ -228,11 +228,11 @@ label.checkbox_label span {
|
||||
</div>
|
||||
<div class="mtb20">
|
||||
<span class="panel_setp_span">接收数据的面板地址</span>
|
||||
<input type="text" class="bt-input-text" name="psync_url" value="" placeholder="接收数据面板地址,如: http://127.0.0.1:8888">
|
||||
<input type="text" class="bt-input-text" name="sync_url" value="" placeholder="接收数据面板地址,如: http://127.0.0.1:8888">
|
||||
</div>
|
||||
<div class="mtb20">
|
||||
<span class="panel_setp_span">接收数据的面板API</span>
|
||||
<input type="text" class="bt-input-text" name="psync_token" value="" placeholder="接收数据面板API密钥" />
|
||||
<input type="text" class="bt-input-text" name="sync_token" value="" placeholder="接收数据面板API密钥" />
|
||||
<a href="#" target="_blank" class="btlink ml5">获取API秘钥</a>
|
||||
</div>
|
||||
<div class="mtb20">
|
||||
|
||||
@@ -5,6 +5,7 @@ import io
|
||||
import os
|
||||
import time
|
||||
import re
|
||||
import json
|
||||
|
||||
sys.path.append(os.getcwd() + "/class/core")
|
||||
import mw
|
||||
@@ -42,7 +43,7 @@ def getCfgData():
|
||||
if not os.path.exists(path):
|
||||
mw.writeFile(path, '{}')
|
||||
|
||||
t = mw.returnJson(path)
|
||||
t = mw.readFile(path)
|
||||
return json.loads(t)
|
||||
|
||||
|
||||
@@ -82,6 +83,11 @@ def initDreplace():
|
||||
|
||||
|
||||
def stepOne():
|
||||
args = getArgs()
|
||||
data = checkArgs(args, ['url', 'token'])
|
||||
if not data[0]:
|
||||
return data[1]
|
||||
|
||||
data = getCfgData()
|
||||
print(data)
|
||||
|
||||
@@ -97,6 +103,6 @@ if __name__ == "__main__":
|
||||
elif func == 'stop':
|
||||
print(stop())
|
||||
elif func == 'step_one':
|
||||
print(saveConf())
|
||||
print(stepOne())
|
||||
else:
|
||||
print('error')
|
||||
|
||||
@@ -59,7 +59,9 @@ function maPostCallbak(method, args, callback){
|
||||
|
||||
|
||||
function initStep1(){
|
||||
maPost('step_one',{}, function(rdata){
|
||||
var url = $('input[name="sync_url"]').val();
|
||||
var token = $('input[name="sync_token"]').val();
|
||||
maPost('step_one',{url:url,token:token}, function(rdata){
|
||||
console.log(rdata);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user