From 3227cdd191ce0e5a5934251730117fed921b507c Mon Sep 17 00:00:00 2001 From: ztino <> Date: Tue, 5 Jan 2021 21:33:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E7=BB=86=E8=8A=82=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/lib.go | 4 ---- common/var.go | 12 +++++++----- conf.ini | 9 +++------ 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/common/lib.go b/common/lib.go index 58aa2fe..86540f9 100644 --- a/common/lib.go +++ b/common/lib.go @@ -109,7 +109,3 @@ func OpenImage(file string) { } } } - -func Hour2Unix(hour string) (time.Time, error) { - return time.ParseInLocation(DateTimeFormatStr, time.Now().Format(DateFormatStr) + " " + hour, time.Local) -} diff --git a/common/var.go b/common/var.go index 69a776f..42b57c5 100644 --- a/common/var.go +++ b/common/var.go @@ -7,15 +7,17 @@ import ( const ( SoftName = "jd_seckill" - Version = "0.1.7" + Version = "0.2.0" DateTimeFormatStr = "2006-01-02 15:04:05" DateFormatStr = "2006-01-02" ) -var Client *httpc.HttpClient +var ( + Client *httpc.HttpClient -var CookieJar *httpc.CookieJar + CookieJar *httpc.CookieJar -var Config *goconfig.ConfigFile + Config *goconfig.ConfigFile -var SeckillStatus chan bool + SeckillStatus chan bool +) diff --git a/conf.ini b/conf.ini index f9e2541..146b408 100644 --- a/conf.ini +++ b/conf.ini @@ -4,16 +4,13 @@ # 随意填写可能导致订单无法提交等问题 eid = fp = -# 自动获取eid, fp的重试次数,测试商品sku_id -retry_times = 5 -test_sku_id = 100016034372 # 商品id # 已经是茅台的sku_id了 sku_id = 100012043978 # 抢购数量 seckill_num = 2 -# 抢购开始时间设定,格式:09:59:59,如果小于当前时间,则表示明天这个时间点开始;大于当前时间,则为今天。 -buy_time = 09:59:59 +# 抢购开始时间设定 2021-01-01 09:59:59 +buy_time = 2021-01-01 09:59:59 # 抢购总时间,单位:分钟,默认两分钟 seckill_time = # 抢购任务数量,默认5个 @@ -36,7 +33,7 @@ payment_pwd = [messenger] # 开启推送服务 enable = false -# 目前支持smtp邮箱推送和Server酱推送服务,选值smtp,wechat +# 目前支持smtp邮箱推送和Server酱推送服务,选值smtp,wechat,dingtalk type = none # 邮箱推送消息接收人 email =