(self)
| 107 | tk.Button(Useroption, text="删除账号", command=self.delete_use).grid(column=1, row=1, padx=35, pady=5) |
| 108 | |
| 109 | def config(self): # 配置 |
| 110 | Config = tk.LabelFrame(self.window, text="配置", padx=10, pady=5) # 水平,垂直方向上的边距均为 10 |
| 111 | Config.place(x=30, y=330) |
| 112 | tk.Label(Config, text="线程:").grid(column=0, row=0, sticky='w', pady=5) # |
| 113 | tk.Label(Config, text="最低销售量:").grid(column=0, row=1, sticky='w', pady=5) # 添加波特率标签 |
| 114 | try: |
| 115 | configs = configdb.select({}) |
| 116 | self.threadnum = configs.get('threadnum') |
| 117 | self.salenum = configs.get('salenum') |
| 118 | |
| 119 | except Exception as e: |
| 120 | configdb.insert({"flag":1,"threadnum":0,"salenum":0}) |
| 121 | self.threadnum = 0 |
| 122 | self.salenum = 0 |
| 123 | self.threadnumVar.set(self.threadnum) |
| 124 | self.salenumVar.set(self.salenum) |
| 125 | self.threadEntry = tk.Entry(Config, textvariable=self.threadnumVar, width=28) |
| 126 | self.threadEntry.grid(column=1, row=0, pady=5) |
| 127 | |
| 128 | self.saleEntry = tk.Entry(Config, textvariable=self.salenumVar, width=28) |
| 129 | self.saleEntry.grid(column=1, row=1, pady=5) |
| 130 | Config_start = tk.LabelFrame(self.window, text="", padx=10, pady=5) # 水平,垂直方向上的边距均为 10 |
| 131 | Config_start.place(x=30, y=450) |
| 132 | tk.Button(Config_start, text="更新配置", command=self.updata_config).grid(column=0, row=0, pady=5, ipadx=15) |
| 133 | self.clearDbBtn = tk.Button(Config_start, text="清空数据", command=self.clearDB) |
| 134 | self.clearDbBtn.config(bg='red') |
| 135 | self.clearDbBtn.grid(column=1, row=0, pady=5, ipadx=15) |
| 136 | self.exportDbBtn = tk.Button(Config_start, text="导出数据", command='') |
| 137 | self.exportDbBtn.config(state=tk.DISABLED) |
| 138 | self.exportDbBtn.grid(column=2, row=0, pady=5, ipadx=15) |
| 139 | self.testloginBtn = tk.Button(Config_start, text="测试登录", command=self.testLogin) |
| 140 | self.testloginBtn.grid(column=0, row=1, pady=5, ipadx=15) |
| 141 | self.loginBtn = tk.Button(Config_start, text="账户登录", command=self.login) |
| 142 | self.loginBtn.grid(column=1, row=1, pady=5, ipadx=15) |
| 143 | self.logoutBtn = tk.Button(Config_start, text="清除登录", command=self.clear_CookieDb) |
| 144 | self.logoutBtn.grid(column=2, row=1, pady=5, ipadx=15) |
| 145 | self.listenBtn = tk.Button(Config_start, text="开启监听", command=self.listen_spider) |
| 146 | self.listenBtn.grid(column=0, row=2, pady=5, ipadx=15) |
| 147 | self.startBtn = tk.Button(Config_start, text="开始采集", command=self.start_spider) |
| 148 | self.startBtn.grid(column=1, row=2, pady=5, ipadx=15) |
| 149 | self.stopBtn = tk.Button(Config_start, text="停止采集", command=self.stop_spider) |
| 150 | self.stopBtn.grid(column=2, row=2, pady=5, ipadx=15) |
| 151 | |
| 152 | def loading(self): |
| 153 | # 进度条 |
no test coverage detected