This commit is contained in:
dengrb1
2023-04-28 20:59:50 +08:00
committed by GitHub
parent 862c363dfa
commit 7a8cd04b90
5 changed files with 192 additions and 0 deletions

27
chatGPT_web/extkj.pyw Normal file
View File

@@ -0,0 +1,27 @@
from PyQt5.QtCore import QUrl
from PyQt5.QtWidgets import QApplication, QMainWindow, QToolBar, QAction
from PyQt5.QtWebEngineWidgets import QWebEngineView
class BrowserWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Chat Browser")
self.setGeometry(100, 100, 800, 600)
# Create the QWebEngineView widget and set the URL to "https://chat.extkj.cn"
self.web_view = QWebEngineView(self)
self.web_view.load(QUrl("https://chat.extkj.cn"))
self.setCentralWidget(self.web_view)
# Create the QToolBar widget and add a QAction for the refresh button
toolbar = QToolBar(self)
self.addToolBar(toolbar)
refresh_action = QAction("Refresh", self)
refresh_action.triggered.connect(self.web_view.reload)
toolbar.addAction(refresh_action)
if __name__ == "__main__":
app = QApplication([])
window = BrowserWindow()
window.show()
app.exec_()

27
chatGPT_web/f1.pyw Normal file
View File

@@ -0,0 +1,27 @@
from PyQt5.QtCore import QUrl
from PyQt5.QtWidgets import QApplication, QMainWindow, QToolBar, QAction
from PyQt5.QtWebEngineWidgets import QWebEngineView
class BrowserWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("AI Browser")
self.setGeometry(100, 100, 800, 600)
# Create the QWebEngineView widget and set the URL to "https://f1.nbai.live"
self.web_view = QWebEngineView(self)
self.web_view.load(QUrl("https://f1.nbai.live"))
self.setCentralWidget(self.web_view)
# Create the QToolBar widget and add a QAction for the refresh button
toolbar = QToolBar(self)
self.addToolBar(toolbar)
refresh_action = QAction("Refresh", self)
refresh_action.triggered.connect(self.web_view.reload)
toolbar.addAction(refresh_action)
if __name__ == "__main__":
app = QApplication([])
window = BrowserWindow()
window.show()
app.exec_()

27
chatGPT_web/wuguokai.pyw Normal file
View File

@@ -0,0 +1,27 @@
from PyQt5.QtCore import QUrl
from PyQt5.QtWidgets import QApplication, QMainWindow, QToolBar, QAction
from PyQt5.QtWebEngineWidgets import QWebEngineView
class BrowserWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("AI Browser")
self.setGeometry(100, 100, 800, 600)
# Create the QWebEngineView widget and set the URL to "https://ai.wuguokai.cn"
self.web_view = QWebEngineView(self)
self.web_view.load(QUrl("https://ai.wuguokai.cn"))
self.setCentralWidget(self.web_view)
# Create the QToolBar widget and add a QAction for the refresh button
toolbar = QToolBar(self)
self.addToolBar(toolbar)
refresh_action = QAction("Refresh", self)
refresh_action.triggered.connect(self.web_view.reload)
toolbar.addAction(refresh_action)
if __name__ == "__main__":
app = QApplication([])
window = BrowserWindow()
window.show()
app.exec_()

30
lbb.pyw Normal file
View File

@@ -0,0 +1,30 @@
from PyQt5.QtCore import QUrl
from PyQt5.QtWidgets import QApplication, QMainWindow, QAction
from PyQt5.QtWebEngineWidgets import QWebEngineView
class Browser(QMainWindow):
def __init__(self):
super().__init__()
# Create QWebEngineView widget
self.browser = QWebEngineView()
self.setCentralWidget(self.browser)
# Create QAction widget for refresh button
refresh_action = QAction('Refresh', self)
refresh_action.triggered.connect(self.browser.reload)
self.toolbar = self.addToolBar('Refresh')
self.toolbar.addAction(refresh_action)
# Load website
self.browser.setUrl(QUrl('https://link.lbbai.com'))
# Set window properties
self.setWindowTitle('LBBai Browser')
self.setGeometry(0, 0, 800, 600)
self.show()
if __name__ == '__main__':
app = QApplication([])
window = Browser()
app.exec_()

81
main.pyw Normal file
View File

@@ -0,0 +1,81 @@
import os
from tkinter import *
from tkinter import ttk, messagebox
import platform
root = Tk()
ml = os.getcwd()
system = platform.system()
flie_error = '文件丢失,请检查文件内容并重新安装'
def extkj():
if os.path.exists("{ml}\chatGPT_web\extkj.exe"):
os.system('start {ml}\chatGPT_web\extkj.exe')
else:
messagebox.showerror('system', flie_error)
pass
pass
def wuguokai():
if os.path.exists("{ml}\chatGPT_web\wuguokai.exe"):
os.system("start {ml}\chatGPT_web\wuguokai.exe")
else:
messagebox.showerror('system', flie_error)
pass
pass
def f1():
if os.path.exists("{ml}\chatGPT_web\\f1.exe"):
os.system("start {ml}\chatGPT_web\\f1.exe")
else:
messagebox.showerror('system', flie_error)
pass
pass
def lbb():
if os.path.exists("{ml}\chatGPT_web\lbb.exe"):
os.system("start {ml}\chatGPT_web\lbb.exe")
else:
messagebox.showerror('system', flie_error)
pass
pass
def update():
if os.path.exists("{ml}\system\\update.exe"):
os.system("start {ml}\system\\update.exe")
else:
messagebox.showerror('update', '更新日志文件丢失,请检查文件并重新安装')
pass
pass
def quit_exe():
root.destroy()
pass
# button
bt_e = Button(root ,text='extkj网站', command=extkj)
bt_w = Button(root ,text='wuguokai网站', command=wuguokai)
bt_f1 = Button(root, text='f1网站', command=f1)
bt_update = Button(root, text='更新日志', command=update)
quit_bt = Button(root, text='退出', command=quit_exe)
# Label
Label(root, text='chatGPT').pack()
# pack_2
bt_w.pack()
bt_e.pack()
bt_f1.pack()
bt_update.pack()
quit_bt.pack()
# mainloop
root.title('chatGPT')
root.geometry('200x200+400+400')
root.mainloop()