Skip to content

Commit

Permalink
luci-app-jd-dailybonus: sync upstream (coolsnowwolf#7871)
Browse files Browse the repository at this point in the history
Signed-off-by: Beginner-Go <[email protected]>
  • Loading branch information
Beginner-Go authored Sep 17, 2021
1 parent 09bfdd0 commit a3f095d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
8 changes: 5 additions & 3 deletions package/lean/luci-app-jd-dailybonus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ PKG_NAME:=luci-app-jd-dailybonus
PKG_VERSION:=1.0.5
PKG_RELEASE:=20210316

define Package/$(PKG_NAME)/conffiles
/etc/config/jd-dailybonus
endef
PKG_MAINTAINER:=jerrykuku <[email protected]>

LUCI_TITLE:=Luci for JD dailybonus Script
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+node +uclient-fetch +lua +libuci-lua

define Package/$(PKG_NAME)/conffiles
/etc/config/jd-dailybonus
endef

include $(TOPDIR)/feeds/luci/luci.mk

# call BuildPackage - OpenWrt buildroot signature
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ o = s:option(DummyValue, '', '')
o.rawhtml = true
o.template = 'jd-dailybonus/cookie_tools'

o = s:option(DynamicList, "jrBody", translate('金融 POST Body'))
o.rmempty = false
o.default = ''
o.description = translate('京东金融签到 POST Body(以reqData=开头),与上方的Cookies列表一一对应,没有可不填(可能导致京东金融签到失败)')

o = s:option(Value, 'stop', translate('延迟签到'))
o.rmempty = false
o.default = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ for i, v in pairs( uci:get('jd-dailybonus', '@global[0]', 'Cookies') or {} ) do
table.insert(data.CookiesJD, {["cookie"]=v})
end

for i, v in pairs( uci:get('jd-dailybonus', '@global[0]', 'jrBody') or {} ) do
data.CookiesJD[i]["jrBody"]=v
end

data.CookiesJD = json.stringify( data.CookiesJD )

write_json('/usr/share/jd-dailybonus/CookieSet.json', data)

0 comments on commit a3f095d

Please sign in to comment.