Python-Tkinter+Logging+Sqlserver项目结合

news2025/2/24 2:50:45

参考文章:
https://www.jb51.net/article/283745.htm

目录:

  • common(文件夹)
    – base.py
    – config_reader.py
    – dosqlserver.py
    – log.py

  • txt(空文件夹,后面会自动生成txt文件在该文件夹下面)

  • 1.txt

  • 2.txt

  • env.info.cfg

  • main.py(执行文件)

common 文件夹下:

base.py文件

import os
import shutil
import time
from common.log import Log
from common.dosqlserver import ExceteSqlserver
import glob


single_ticket = {}

class base:
    def __init__(self):
        self.log = Log()


    def exe_cmd(self, cmd):
        result = os.popen(cmd).read()
        return result

    def execute_sql(self,db,metting_code):
        db_service = ExceteSqlserver(db)
        sql = "SELECT chrims_event_code,date_meeting,venue_code FROM meeting WHERE venue_code IN ('%s') ORDER by meeting_id desc" % (metting_code)
        value= db_service.exe_query(sql)
        db_service.close_db()
        code = None
        if value[0][0] == None:
            if value[0][2] == "S1":
                code = "HK1"
            elif value[0][2] == "S2":
                code = "HK2"
            elif value[0][2] == "S3":
                code = "HK3"
            elif value[0][2] == "S4":
                code = "HK4"
            elif value[0][2] == "S5":
                code = "HK5"
        else:
             code = value[0][0]
        datetime = str(value[0][1]).split(" ")[0].split("-")
        date = datetime[1]+datetime[2]+datetime[0]
        return code,date

    def remove_file(self,path):
        # 获取所有txt文件的路径
        self.txt_files = glob.glob(os.path.join(path, '*.txt'))
        self.dat_files = glob.glob(os.path.join(path, '*.dat'))

    def delete_txt(self,path):
        self.remove_file(path)
        # 删除文件
        for txt_file in self.txt_files:
            os.remove(txt_file)
        for dat_file in self.dat_files:
            os.remove(dat_file)

    def generate_dat(self,path):
        for txt_file in self.txt_files:
            time.sleep(1)
            self.exe_cmd(f"{path}TxlvTLogMkDat.exe {txt_file}")
        file = os.getcwd()
        dat = glob.glob(os.path.join(file, '*.dat'))
        for files in dat:
            shutil.copy(files, path)
            self.log.logMsg(4, f"{files} move {path} file completed ")
            # time.sleep(1)
            # os.remove(files)

    def py_remove(self,path):
        file = os.getcwd()
        dat = glob.glob(os.path.join(file, '*.dat'))
        for files in dat:
            shutil.copy(files,path)

        for remove in dat:
            os.remove(remove)


config_reader.py文件

import configparser
import os.path
import shutil


class ConfigReader:
    def __init__(self):
        self.cfg_file= "./env.info.cfg"

    def get_value(self,section, option):
        cp = configparser.ConfigParser()
        cp.read(self.cfg_file, encoding='utf-8')
        return cp.get(section, option)

    def get_sections(self):
        cp = configparser.ConfigParser()
        cp.read(self.cfg_file, encoding='utf-8')
        sections=cp.sections()
        return sections

    def write_value(self,section,option,value):
        cp = configparser.ConfigParser()
        cp.read(self.cfg_file, encoding='utf-8')
        cp.set(section,option,value)
        cp.write(open(self.cfg_file,"w"))


dosqlserver.py文件

import time
from common.config_reader import ConfigReader
from common.log import Log
import pymssql


class ExceteSqlserver:
    db_connect = None
    cursor = None



    def __init__(self,databasename):
        self.host = ConfigReader().get_value(databasename, "host")
        self.user = ConfigReader().get_value(databasename, "user")
        self.passwd = ConfigReader().get_value(databasename, "passwd")
        self.database = ConfigReader().get_value(databasename, "database")
        self.port = ConfigReader().get_value(databasename, "port")
        self.selection=ConfigReader().get_sections()  # 获取cfg的title
        self.log = Log()


    def get_db_connet(self):
        """ 输入地址 连接DB """
        try:
            db_connect = pymssql.connect(server=self.host, user=self.user, password=self.passwd, database=self.database, port=self.port)
        except Exception as e:
            self.log.logMsg(3, f"database {self.database} connect exception cause: {e}")
        else:
            if db_connect:
                pass
                # self.log.logMsg(4, f"database [{self.database}] connect success")
            cursor= db_connect.cursor()
            ExceteSqlserver.db_connect,ExceteSqlserver.cursor = db_connect,cursor
            return db_connect, cursor

    def exe_query(self,sql):
        db_connect, cursor = self.get_db_connet()
        cursor.execute(sql)
        result = cursor.fetchall() # fetchall()
        # self.close_db()
        return result

    def exe_execute(self,sql):
        db_connect, cursor = self.get_db_connet()
        cursor.execute(sql)
        db_connect.commit()
        self.close_db()

    def close_db(self):
        """ 关闭游标 关闭DB连接 """
        try:
            ExceteSqlserver.cursor.close()  # 关闭游标
            ExceteSqlserver.db_connect.close()  # 关闭DB连接
            # self.log.logMsg(4, f"close database success")
            time.sleep(3)
        except Exception as e:
            self.log.logMsg(4, f"close database exception cause: {e}")

log.py文件

import os
from common.config_reader import *

import time
import logging
import colorlog

class Log:
    def __init__(self):
        self.log_folder_path = ConfigReader().get_value("log", "log_folder_path")
        self.log_level = ConfigReader().get_value("log", "log_level")
        self.log_path = os.path.join("logs")
        if not os.path.exists(self.log_folder_path):
            os.mkdir(self.log_folder_path)
        self.logname= os.path.join(self.log_folder_path, '%s.log' % time.strftime('%Y-%m-%d'))
        self.logger = logging.getLogger()
        #输出到控制台
        self.console_handler = logging.StreamHandler()
        #输出到文件
        self.file_handler = logging.FileHandler(self.logname, mode='a', encoding='utf8')
        log_colors_config = {
            'DEBUG': 'white',
            'INFO': 'green',
            'WARNING': 'yellow',
            'ERROR': 'red',
            'CRITICAL': 'bold_red',
        }
        # 日志输出格式
        file_formatter = logging.Formatter(
            fmt='[%(asctime)s.%(msecs)03d] %(filename)s -> %(funcName)s line:%(lineno)d [%(levelname)s] : %(message)s',
            datefmt='%Y-%m-%d %H:%M:%S'
        )
        console_formatter = colorlog.ColoredFormatter(
            fmt='%(log_color)s[%(asctime)s.%(msecs)03d] %(filename)s -> %(funcName)s line:%(lineno)d [%(levelname)s] : %(message)s',
            datefmt='%Y-%m-%d  %H:%M:%S',
            log_colors=log_colors_config
        )
        self.console_handler.setFormatter(console_formatter)
        self.file_handler.setFormatter(file_formatter)

        if not self.logger.handlers:
            self.logger.addHandler(self.console_handler)
            self.logger.addHandler(self.file_handler)
        self.console_handler.close()
        self.file_handler.close()

    def logMsg(self,level,message):
        #控制台日志输出等级
        if int(self.log_level)==1:
            self.logger.setLevel(logging.CRITICAL)
            self.console_handler.setLevel(logging.CRITICAL)
            self.file_handler.setLevel(logging.CRITICAL)
        elif int(self.log_level)==2:
            self.logger.setLevel(logging.ERROR)
            self.console_handler.setLevel(logging.ERROR)
            self.file_handler.setLevel(logging.ERROR)
        elif int(self.log_level)==3:
            self.logger.setLevel(logging.WARNING)
            self.console_handler.setLevel(logging.WARNING)
            self.file_handler.setLevel(logging.WARNING)
        elif int(self.log_level)==4:
            self.logger.setLevel(logging.INFO)
            self.console_handler.setLevel(logging.INFO)
            self.file_handler.setLevel(logging.INFO)

        elif int(self.log_level)==5:
            self.logger.setLevel(logging.DEBUG)
            self.console_handler.setLevel(logging.DEBUG)
            self.file_handler.setLevel(logging.DEBUG)
        #控制台日志输出定义
        if level==5:
            self.logger.debug(message)
        elif level==4:
            self.logger.info(message)
        elif level==3:
            self.logger.warning(message)
        elif level==2:
            self.logger.error(message)
        elif level==1:
            self.logger.critical(message)

env.info.cfg文件

[file]
txt_file_path = ./txt/
take_txt_path = E:\\002TXLV\\TOTE\\PMC\\
dat_path = E:\002TXLV\TOTE\PMC\
[log]
log_folder_path = .\logs
log_level = 4
[version]
versionid = v0.1

[xxx]
host=xx.xx.xx.xx
user=xxx
passwd=xxx
database=xx
port=40000

[xxx]
host=xx.xx.xx.158
user=xx
passwd=xxx
database=xxx
port=40000

main.py文件

import datetime
import logging
import os
from glob import glob
import shutil
from common.config_reader import ConfigReader
from common.base import base
from common.log import Log
import tkinter as tk


root = tk.Tk()
root.geometry("1000x500")
root.title("Dat file tools")
root.configure(bg='#F5F5F5')

class TextboxHandler(logging.Handler):

    def __init__(self,textbox):
        logging.Handler.__init__(self)
        self.textbox = textbox

    def emit(self, record):
        msg = self.format(record)
        self.textbox.insert("end",msg + "\n")
        
class basemethod:

    def __init__(self):
        self.tote_dict = dict()
        self.txt_file_path = ConfigReader().get_value("file", "txt_file_path")
        self.take_txt_path = ConfigReader().get_value("file", "take_txt_path")
        self.log = Log()
        self.bs = base()
        self.bs.delete_txt(self.take_txt_path)

    def dump_tote(self,venue):
        self.EventCode, self.BusDay = self.bs.execute_sql("sit_cmgc", venue)
        folder_path = self.txt_file_path
        shutil.rmtree(folder_path)
        os.mkdir(folder_path)

        input_file = "1.txt"
        tote_file = "2.txt"
        with open(tote_file, "r") as f:
            list0 = f.readlines()
        for tickets in list0:
            ts = [x.strip() for x in tickets.split("\t") if x.strip() != ""] # 清除Excel中copy出来的值 清除空格
            if ts[0] in '1':
                self.tote_dict[ts[1]] = ts[2]
                file_txt = f"{self.txt_file_path}{ts[2]}{self.EventCode}{self.BusDay}.txt"
                with open(file_txt, "w") as file:
                    file.write(f"VAR!{ts[2]}!{self.EventCode}!{self.BusDay}!USD!7.78\n")

        txt_files = glob(os.path.join(self.txt_file_path, "*.txt"))
        with open(input_file, "r") as f:
            content = f.readlines()[1:]
            tic = ''.join(content)
            for file in txt_files:
                with open(file, 'a+') as f:
                    f.write(tic)
                    # self.log.logMsg(4, f"{file}: add txt file completed ")
                    f.close()
                    # shutil.copy(file, self.take_txt_path)this an Operate could take file place to take_txt_path below
                    self.bs.exe_cmd(f"{self.take_txt_path}TxlvTLogMkDat.exe {file}")
        self.bs.py_remove(self.take_txt_path)

class TK:
    dat_path = ConfigReader().get_value("file", "dat_path")
    def clearBox(self):
        self.te.delete("1.0","end")

    def selection_text(self):
        value = self.lb.get(self.lb.curselection())  # 获取当前选中的文本
        basemethod().dump_tote(value)
        file = os.getcwd() + r"\txt"
        dat = glob(os.path.join(file, '*.txt'))
        self.log2.info("*****************************************************************************")
        for files in dat:
            s = files.replace(".txt", '.dat').split('\\')[-1]
            self.log2.info(f"TextboxHandler:{TK.dat_path}{s} Upload finishied")

    def exe(self):
        # chear bottom
        tk.Button(root,text="Chear",width=22, height=1,command=self.clearBox).place(x=350, y=450)
        tk.Button(root, text="Quit",width=22, height=1, command=root.quit).place(x=650, y=450)
        # title
        labels = tk.Label(root, text="Generate dat file tools", background='#FF8C00', width=500, font=('Arial', 30), anchor="n")
        labels.pack(side='top', expand="no", fill="x")

        # Label Venue
        Venue = tk.Label(root,text='Venue',bg='yellow',font=('黑体', 10), height=2,width=22).place(x=0,y=110)

        # 列表选择
        self.lb = tk.Listbox(root, width=26,font=('黑体', 10))
        list_items=["S1","S2","S3","S4","S5"]
        for item in list_items:
            self.lb.insert('end',item)
        self.lb.place(x=0, y=150)

        # Upload 按钮
        Upload = tk.Button(root, text="Upload",font=('Arial', 10), width=22, height=2,command=self.selection_text)
        Upload.place(x=0, y=360)  # anchor = n, ne, e, se, s, sw, w, nw

        # text
        self.te = tk.Text(root,width=80, height=20)
        self.te.place(x=250,y=110)
        self.log2 = logging.getLogger('log2')
        self.log2.setLevel(logging.INFO)
        handler = TextboxHandler(self.te)
        self.log2.addHandler(handler)

        # text.pack(side=tk.RIGHT)
        yscrollbar = tk.Scrollbar(root,orient=tk.VERTICAL)
        yscrollbar.pack(side=tk.RIGHT,fill=tk.Y)
        # 滚动条与Text联动
        yscrollbar.config(command=self.te.yview)
        # Text与滚动条联动
        self.te.config(yscrollcommand=yscrollbar.set)
        # self.te.insert(tk.END,f"{basemethod().take_txt_path} TxlvTLogMkDat.exe")


if __name__ == '__main__':
    TK().exe()
    root.mainloop()

1.txt

VAR!NTT!HK1!02042023!USD!7.78
BET!3!8UP!R28982 A2098 001BA10AB!1000!1000!5/11/6/5/12/5
BET!3!8UP!R28122 A2078 001BB10AB!1000!1000!5/11/6/5/12/1
BET!3!8UP!RA092A 08A38 089B29021!1000!1000!9/3/8/7/7/8
BET!3!8UP!RA0380 28A90 081B210B3!1000!1000!9/3/6/7/12/8
BET!3!8UP!R029A8 28000 878B3A002!10000000!10000000!1/1/1/1/2/2
PCL!3!8UP

2.txt

genFlg	ToteName	ShortName
1	PMU	PMC
1	4Racing	TVA
1	TabVIC	TBA
1	TabNSW	TBB
1	TabUBET	TBC
1	SPPL	SSS
1	PATG	PGG
1	DANSKE	DTA
1	AmGWG	HHA
1	TVGSP	ODA
0	TVGUT	POG
0	AmTote	OGE
1	AmtoteMD	MDA
0	UT	POT
1	PGI	PGA
0	AmWB	Q9A
0	Macau	MU1
0	TPOOL	UKT
0	SPTPOOL	UKB
0	NETX	LIV
0	SPTK	ODB
0	SPGTOTE	GLA
0	SPGerman	ODG
0	SPHLaneB	GLB
0	SPHLaneC	GLC
0	PBETLTD	PGE
0	PDATAP	PGF
0	AmPBET	HHC
0	WBUT	ONB
0	AmHLANE	HHH
0	NewTtAA	NTA
0	NewTtAB	NAB
0	NewTtAC	NAC
0	NewTtAD	NAD
0	NewTtAE	NAE
0	NewTtF	NTF
0	NewTtG	NTG
0	NewTtH	NTH
0	NewTtI	NTI
0	NewTtJ	NTJ
0	NewTtK	NTK
0	NewTtL	NTL
0	NewTtM	NTM
0	NewTtN	NTN
0	NewTtO	NTO
0	NewTtP	NTP
0	NewTtQ	NTQ
0	NewTtR	NTR
0	NewTtS	NTS
0	NewTtT	NTT

生成文件的运行日志:

[2024-07-02  11:10:53.586] main.py -> selection_text line:80 [INFO] : *****************************************************************************
[2024-07-02  11:10:53.587] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\DTAHK102102023.dat Upload finishied
[2024-07-02  11:10:53.587] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\HHAHK102102023.dat Upload finishied
[2024-07-02  11:10:53.587] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\MDAHK102102023.dat Upload finishied
[2024-07-02  11:10:53.587] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\ODAHK102102023.dat Upload finishied
[2024-07-02  11:10:53.588] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\PGAHK102102023.dat Upload finishied
[2024-07-02  11:10:53.588] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\PGGHK102102023.dat Upload finishied
[2024-07-02  11:10:53.588] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\PMCHK102102023.dat Upload finishied
[2024-07-02  11:10:53.588] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\SSSHK102102023.dat Upload finishied
[2024-07-02  11:10:53.588] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\TBAHK102102023.dat Upload finishied
[2024-07-02  11:10:53.589] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\TBBHK102102023.dat Upload finishied
[2024-07-02  11:10:53.589] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\TBCHK102102023.dat Upload finishied
[2024-07-02  11:10:53.589] main.py -> selection_text line:83 [INFO] : TextboxHandler:E:\002TXLV\TOTE\PMC\TVAHK102102023.dat Upload finishied

功能介绍:
Upload 是加载出来Dat文件日志在Text文本框:
chear:是清除Text文本框日志
Quit:是退出
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1889868.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

html+js+css美观好看的动态404界面

中间的那一段话(root开头的那一句)是逐字输出的 那段话显示完后,自动显示超大号字体404 来都来了点个赞,关注一下呗😄,本人发誓:你关注我,马上关注你 界面 源码在图片下面…

【ONE·Linux || 高级IO(一)】

总言 主要内容:介绍五种IO模型的基本概念、学习IO多路转接(select、poll编程模型)。       文章目录 总言1、问题引入1.1、网络通信与IO1.2、五种IO模型1.2.1、举例引入1.2.2、IO模型具体含义介绍1.2.2.1、阻塞式IO1.2.2.2、非阻塞轮询检…

什么是带有 API 网关的代理?

带有 API 网关的代理服务显著提升了用户体验和性能。特别是对于那些使用需要频繁创建和轮换代理的工具的用户来说,使用 API 可以节省大量时间并提高效率。 了解 API API,即应用程序编程接口,是服务提供商和用户之间的连接网关。通过 API 连接…

智能数字人系统的技术难点

数字人系统,也称为智能数字人系统或虚拟数字人系统,是指利用人工智能技术构建的虚拟人物形象,能够与人进行自然交互的系统。数字人系统涉及多项技术,其开发和应用存在以下技术难点。北京木奇移动技术有限公司,专业的软…

KES数据库实践指南:探索KES数据库的事务隔离级别

并发控制 并发控制的重要性 并发控制是数据库管理系统中的一个核心概念,它确保在多用户环境中,对数据库的并发访问不会破坏数据的完整性和一致性。 当多个用户同时对数据库进行读写操作时,如果缺乏有效的并发控制机制,可能会导致数…

HexPlane: A Fast Representation for Dynamic Scenes(总结图)

图1。用于动态三维场景的 Hex刨面。我们没有从深度 MLP 中回归颜色和不透明度,而是通过 HexPlann 显式地计算时空点的特征。配对一个微小的 MLP,它允许以上100倍加速匹配的质量。 图2。方法概述。Hex刨包含六个特征平面,跨越每对坐标轴(例如…

ctfshow web sql注入 web242--web249

web242 into outfile 的使用 SELECT ... INTO OUTFILE file_name[CHARACTER SET charset_name][export_options]export_options:[{FIELDS | COLUMNS}[TERMINATED BY string]//分隔符[[OPTIONALLY] ENCLOSED BY char][ESCAPED BY char]][LINES[STARTING BY string][TERMINATED…

Python 生成Md文件带超链 和 PDF文件 带分页显示内容

software.md # -*- coding: utf-8 -*- import os f open("software.md", "w", encoding"utf-8") f.write(内部测试版2024 MD版\n) for root, dirs, files in os.walk(path): dax os.path.basename(root)if dax "":print("空白…

UNIAPP_顶部导航栏右侧添加uni-icons图标,并绑定点击事件,自定义导航栏右侧图标

效果 1、导入插件 uni-icons插件:https://ext.dcloud.net.cn/plugin?nameuni-icons 复制 uniicons.ttf 文件到 static/fonts/ 下 仅需要那个uniicons.ttf文件,不引入插件、单独把那个文件下载到本地也是可以的 2、配置页面 "app-plus":…

Hi3861 OpenHarmony嵌入式应用入门--TCP Server

本篇使用的是lwip编写tcp服务端。需要提前准备好一个PARAM_HOTSPOT_SSID宏定义的热点,并且密码为PARAM_HOTSPOT_PSK LwIP简介 LwIP是什么? A Lightweight TCP/IP stack 一个轻量级的TCP/IP协议栈 详细介绍请参考LwIP项目官网:lwIP - A Li…

Ollama+OpenWeb UI搭建最简单的大模型交互界面

Open WebUI是一个专为大型语言模型(LLMs)设计的Web用户界面。这个界面提供了一个直观、响应迅速且易于使用的平台,使用户能够与本地运行的语言模型进行交互,就像与云服务中的模型交互一样。可以非常方便的调试、调用本地模型。你能…

Linux运维之管道符、重定向与环境变量

前言:本博客仅作记录学习使用,部分图片出自网络,如有侵犯您的权益,请联系删除 目录 一、输入输出重定向 二、管道命令符 三、命令行的通配符 四、常用的转义字符 五、重要的环境变量 致谢 一、输入输出重定向 输入重定向是…

快速下载!Windows 7旗舰版系统:集成所有补丁!

微软对Windows7系统停止支持后,Windows7设备不再收到安全补丁程序、修补程序。尽管如此,许多用户仍然认为Windows7是最好用、最经典的系统。有用户就特别喜欢Windows7旗舰版系统,那么接下来系统之家小编为大家带来的全补丁版本的Windows7系统…

C++精解【10】

文章目录 读写文件概述example csv读文件读取每个字段读取机器学习数据库iris constexpr函数GMP大整数codeblock环境配置数据类型函数类 EigenminCoeff 和maxCoeffArray类 读写文件 概述 fstream typedef basic_fstream<char, char_traits<char>> fstream;此类型…

STM32基本定时器、通用定时器、高级定时器区别

一.STM32基本定时器、通用定时器、高级定时器区别 STM32系列微控制器中的定时器资源分为基本定时器&#xff08;Basic Timer&#xff09;、通用定时器&#xff08;General Purpose Timer&#xff09;和高级定时器&#xff08;Advanced Timer&#xff09;三类&#xff0c;它们在…

类似Jira的在线项目管理软件有哪些?10 个主流的Jira替代方案

10 个 Jira 替代方案&#xff1a;PingCode、Worktile、Teambition、Redmine、Asana、monday.com、Zoho Projects、思码逸、Notion、Airtable。 Jira 是一款流行的项目管理工具&#xff0c;专为产品开发团队而设计。虽然它是一种多功能解决方案&#xff0c;几乎适用于任何类型的…

四、(1)网络爬虫入门及准备工作(爬虫及数据可视化)

四、&#xff08;1&#xff09;网络爬虫入门及准备工作&#xff08;爬虫及数据可视化&#xff09; 1&#xff0c;网络爬虫入门1.1 百度指数1.2 天眼查1.3 爬虫原理1.4 搜索引擎原理 2&#xff0c;准备工作2.1 分析爬取页面2.2 爬虫拿到的不仅是网页还是网页的源代码2.3 爬虫就是…

html+js+css登录注册界面

拥有向服务器发送登录或注册数据并接收返回数据的功能 点赞关注 界面 源代码 <!DOCTYPE html> <html lang"en"> <head> <meta charset"UTF-8"> <title>Login and Registration Form</title> <style> * …

2024“国培“来也UiBot6.0 RPA数字机器人开发综合应用

前言 (本博客中会有部分课程ppt截屏,如有侵权请及请及时与小北我取得联系~) 国培笔记: 依次读取数组中每个元素 输出调试信息 [ value=[ "vivian", value[0] "老师", "上午好,O(∩_∩)O哈哈~" ], v…

Nuxt3 的生命周期和钩子函数(九)

title: Nuxt3 的生命周期和钩子函数&#xff08;九&#xff09; date: 2024/7/3 updated: 2024/7/3 author: cmdragon excerpt: 摘要&#xff1a;本文介绍了Nuxt3中与Vite相关的五个生命周期钩子&#xff0c;包括vite:extend、vite:extendConfig、vite:configResolved、vite…