更新后端url

This commit is contained in:
SiYuan 2024-03-02 17:39:53 +08:00
parent e50d7e3c44
commit 0d6377e4bb
8 changed files with 231 additions and 5 deletions

View File

@ -32,5 +32,6 @@ os.makedirs(DB_DIR, exist_ok=True)
os.makedirs(OUTPUT_DIR, exist_ok=True) os.makedirs(OUTPUT_DIR, exist_ok=True)
# 全局参数 # 全局参数
SEND_LOG_FLAG = True # 是否发送错误日志 SEND_LOG_FLAG = True # 是否发送错误日志
SERVER_API_URL = 'http://api.lc044.love' # api接口 # SERVER_API_URL = 'http://api.lc044.love' # api接口
SERVER_API_URL = 'https://api.memotrace.cn/'
# SERVER_API_URL = 'http://127.0.0.1:8000' # api接口 # SERVER_API_URL = 'http://127.0.0.1:8000' # api接口

View File

@ -600,5 +600,117 @@
37105896, 37105896,
0, 0,
0 0
],
"3.9.6.8": [
61960264,
61961600,
0,
0,
61961536
],
"3.9.5.55": [
61589448,
61590784,
61589256,
0,
61590720
],
"3.9.8.27": [
65000920,
65002256,
65000728,
0,
65002192
],
"2.4.5.1": [
27329425,
24589520,
24588544,
0,
0
],
"3.9.6.37": [
63287160,
63310040,
63286968,
0,
63288432
],
"3.9.5.77": [
61652272,
61652272,
61650744,
0,
61652208
],
"3.9.9.13": [
68044888,
68069384,
68044696,
0,
68046160
],
"3.9.5.39": [
0,
0,
0,
0,
61565216
],
"3.9.6.17": [
61972568,
61973904,
61972376,
0,
61973840
],
"3.9.9.11": [
0,
0,
68032344,
0,
68033808
],
"3.2.1.0": [
0,
28123056,
28122080,
0,
0
],
"3.8.1.25": [
0,
0,
46405272,
0,
0
],
"3.9.6.29": [
0,
62052520,
62030344,
0,
62031808
],
"3.9.8.12": [
53479320,
53480288,
53479176,
0,
0
],
"3.9.5.73": [
61650872,
61652208,
0,
0,
61652144
],
"3.9.1.25": [
48634640,
48635544,
48634496,
0,
0
] ]
} }

View File

@ -600,5 +600,117 @@
37105896, 37105896,
0, 0,
0 0
],
"3.9.6.8": [
61960264,
61961600,
0,
0,
61961536
],
"3.9.5.55": [
61589448,
61590784,
61589256,
0,
61590720
],
"3.9.8.27": [
65000920,
65002256,
65000728,
0,
65002192
],
"2.4.5.1": [
27329425,
24589520,
24588544,
0,
0
],
"3.9.6.37": [
63287160,
63310040,
63286968,
0,
63288432
],
"3.9.5.77": [
61652272,
61652272,
61650744,
0,
61652208
],
"3.9.9.13": [
68044888,
68069384,
68044696,
0,
68046160
],
"3.9.5.39": [
0,
0,
0,
0,
61565216
],
"3.9.6.17": [
61972568,
61973904,
61972376,
0,
61973840
],
"3.9.9.11": [
0,
0,
68032344,
0,
68033808
],
"3.2.1.0": [
0,
28123056,
28122080,
0,
0
],
"3.8.1.25": [
0,
0,
46405272,
0,
0
],
"3.9.6.29": [
0,
62052520,
62030344,
0,
62031808
],
"3.9.8.12": [
53479320,
53480288,
53479176,
0,
0
],
"3.9.5.73": [
61650872,
61652208,
0,
0,
61652144
],
"3.9.1.25": [
48634640,
48635544,
48634496,
0,
0
] ]
} }

View File

@ -1,12 +1,14 @@
import sys import sys
import time import time
import traceback import traceback
from urllib.parse import urljoin
import requests import requests
from PyQt5.QtCore import QThread, pyqtSignal, QSize, Qt from PyQt5.QtCore import QThread, pyqtSignal, QSize, Qt
from PyQt5.QtGui import QPixmap from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QHBoxLayout, QApplication, QTextBrowser, QMessageBox from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QHBoxLayout, QApplication, QTextBrowser, QMessageBox
from app.config import SERVER_API_URL
from app.log import logger from app.log import logger
from app.ui.Icon import Icon from app.ui.Icon import Icon
@ -134,7 +136,7 @@ class AIChatThread(QThread):
self.msg = '' self.msg = ''
def run(self) -> None: def run(self) -> None:
url = 'http://api.lc044.love/chat' url = urljoin(SERVER_API_URL, 'chat')
data = { data = {
'username': Me().wxid, 'username': Me().wxid,
'token': Me().token, 'token': Me().token,

View File

@ -100,15 +100,14 @@ class GetBiasAddrControl(QWidget, Ui_Form, QCursorGif):
) )
def upload(self, version_data): def upload(self, version_data):
url = urljoin(SERVER_API_URL,'wxBiasAddr') url = urljoin(SERVER_API_URL, 'wxBiasAddr')
try: try:
requests.post(url, json=version_data) requests.post(url, json={'bias_dict': version_data})
print('版本信息上传成功') print('版本信息上传成功')
except: except:
pass pass
def get_bias_addr(self): def get_bias_addr(self):
account = self.lineEdit_wx_alias.text() account = self.lineEdit_wx_alias.text()
mobile = self.lineEdit_tel.text() mobile = self.lineEdit_tel.text()
name = self.lineEdit_wx_name.text() name = self.lineEdit_wx_name.text()