chatWEB
This commit is contained in:
@@ -30,8 +30,10 @@ text = '''0.1.0 DEMO制作完成
|
|||||||
1.1.1 更新chatGPT网站;修改update文本显示设置。新增bnu120聊天网站
|
1.1.1 更新chatGPT网站;修改update文本显示设置。新增bnu120聊天网站
|
||||||
移除lbbai网站入口
|
移除lbbai网站入口
|
||||||
1.2 增加lbbai网站;修复BUG;完全移除“关于”模块......
|
1.2 增加lbbai网站;修复BUG;完全移除“关于”模块......
|
||||||
|
1.3 删除lbbai网站;增加xjai网站,里面内涵AI画图功能!;加入WiFi功能
|
||||||
|
检测
|
||||||
|
|
||||||
当前版本:1.2 (Not beta or demo)'''
|
当前版本:1.3 (Not beta or demo)'''
|
||||||
|
|
||||||
text_box = ScrolledText(root)
|
text_box = ScrolledText(root)
|
||||||
text_box.pack(fill=BOTH, expand=1)
|
text_box.pack(fill=BOTH, expand=1)
|
||||||
|
|||||||
46
wifi_jc.py
Normal file
46
wifi_jc.py
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import urllib.request
|
||||||
|
import webbrowser
|
||||||
|
from time import sleep, strftime
|
||||||
|
|
||||||
|
|
||||||
|
ml = os.getcwd()
|
||||||
|
file_error = '文件丢失,请重新安装!!'
|
||||||
|
ERROR_MSG = '错误:'
|
||||||
|
|
||||||
|
|
||||||
|
def open_exe(exe_name):
|
||||||
|
if os.path.exists(os.path.join(ml, f"{exe_name}.exe")):
|
||||||
|
os.system(f"start {exe_name}.exe")
|
||||||
|
else:
|
||||||
|
print(file_error)
|
||||||
|
sleep(1)
|
||||||
|
|
||||||
|
|
||||||
|
def check_internet(url='http://www.baidu.com/', timeout=5):
|
||||||
|
try:
|
||||||
|
urllib.request.urlopen(url, timeout=timeout)
|
||||||
|
open_exe('client')
|
||||||
|
return True
|
||||||
|
except Exception as e:
|
||||||
|
print(f'{ERROR_MSG}{strftime("%Y-%m-%d %H:%M:%S")}: WIFI连接不正常,请检测wifi连接后再试吧')
|
||||||
|
sleep(5)
|
||||||
|
print('是否继续启动程序(Y.是,N.不是)?')
|
||||||
|
input_xz = str(input('>>>'))
|
||||||
|
if input_xz != None:
|
||||||
|
if input_xz.lower() == 'y':
|
||||||
|
open_exe('client')
|
||||||
|
elif input_xz.lower() == 'n':
|
||||||
|
sys.exit()
|
||||||
|
else:
|
||||||
|
print('请输入英文字母!!')
|
||||||
|
sleep(1.5)
|
||||||
|
else:
|
||||||
|
print('错误:没有输入文字')
|
||||||
|
sleep(1.5)
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
check_internet()
|
||||||
@@ -9,7 +9,7 @@ class Browser(QMainWindow):
|
|||||||
self.setWindowTitle('浏览器')
|
self.setWindowTitle('浏览器')
|
||||||
|
|
||||||
self.browser = QWebEngineView()
|
self.browser = QWebEngineView()
|
||||||
self.browser.setUrl(QUrl('https://link.lbbai.com'))
|
self.browser.setUrl(QUrl('https://home.xjai.cc'))
|
||||||
self.setCentralWidget(self.browser)
|
self.setCentralWidget(self.browser)
|
||||||
|
|
||||||
refresh_button = QAction('刷新', self)
|
refresh_button = QAction('刷新', self)
|
||||||
@@ -43,8 +43,8 @@ def qdymys():
|
|||||||
open_exe("qdymys")
|
open_exe("qdymys")
|
||||||
def bnu120():
|
def bnu120():
|
||||||
open_exe('bnu120')
|
open_exe('bnu120')
|
||||||
def lbbai():
|
def xjai():
|
||||||
open_exe('lbbai')
|
open_exe('xjai')
|
||||||
def fh():
|
def fh():
|
||||||
root.destroy()
|
root.destroy()
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ def fh():
|
|||||||
bt_wuguokai = Button(frame, text='wuguokai网站', command=wuguokai)
|
bt_wuguokai = Button(frame, text='wuguokai网站', command=wuguokai)
|
||||||
bt_extkj = Button(frame, text='extkj网站', command=extkj)
|
bt_extkj = Button(frame, text='extkj网站', command=extkj)
|
||||||
bt_qdymys = Button(frame, text='qdymys网站', command=qdymys)
|
bt_qdymys = Button(frame, text='qdymys网站', command=qdymys)
|
||||||
bt_lbbai = Button(frame, text='lbbai网站', command=lbbai)
|
bt_xjai = Button(frame, text='xjai网站', command=xjai)
|
||||||
bt_bnu120 = Button(frame, text='bnu120网站', command=bnu120)
|
bt_bnu120 = Button(frame, text='bnu120网站', command=bnu120)
|
||||||
bt_fh = Button(frame, text='返回', command=fh)
|
bt_fh = Button(frame, text='返回', command=fh)
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ bt_fh = Button(frame, text='返回', command=fh)
|
|||||||
Label(root, text='选择界面').pack()
|
Label(root, text='选择界面').pack()
|
||||||
bt_wuguokai.pack()
|
bt_wuguokai.pack()
|
||||||
bt_extkj.pack()
|
bt_extkj.pack()
|
||||||
bt_lbbai.pack()
|
bt_xjai.pack()
|
||||||
bt_qdymys.pack()
|
bt_qdymys.pack()
|
||||||
bt_bnu120.pack()
|
bt_bnu120.pack()
|
||||||
bt_fh.pack()
|
bt_fh.pack()
|
||||||
|
|||||||
Reference in New Issue
Block a user