├── .nvmrc ├── .gitignore ├── static ├── image │ ├── m.png │ ├── bean.png │ ├── coin.png │ ├── coupon.png │ ├── github.png │ ├── money.png │ ├── notice.png │ ├── rebate.png │ ├── samedi.png │ ├── update.png │ ├── zaoshu.png │ ├── icon │ │ ├── 128.png │ │ ├── 16.png │ │ ├── 48.png │ │ ├── jjb.png │ │ ├── jjb19x.png │ │ ├── jjb38x.png │ │ ├── offline19x.png │ │ ├── offline38x.png │ │ ├── partial-offline19x.png │ │ └── partial-offline38x.png │ ├── alipay_pay.png │ ├── weixin_pay.png │ ├── notice.svg │ ├── stop.svg │ ├── play.svg │ ├── show.svg │ ├── checkin.svg │ ├── m.svg │ ├── pc.svg │ ├── hide.svg │ ├── setting.svg │ ├── coupon.svg │ ├── reload.svg │ ├── empty.svg │ ├── avatar.svg │ ├── online.svg │ └── offline.svg ├── style │ ├── start.css │ ├── content.css │ └── popup.css └── audio │ ├── beans.ogg │ ├── rebate.ogg │ ├── coin_drop.ogg │ └── price_protection.ogg ├── .github ├── ISSUE_TEMPLATE │ ├── ----.md │ ├── feature_request.md │ └── bug_report.md └── FUNDING.yml ├── public ├── background.html ├── start.html ├── manifest.json └── popup.html ├── LICENSE ├── src ├── start.js ├── page_script.js ├── account.js ├── components │ ├── messageBox │ │ ├── messageBox.js │ │ └── messageBox.vue │ ├── we-dialog.vue │ ├── events.vue │ ├── toast │ │ ├── toast.js │ │ └── toast.vue │ ├── links.vue │ ├── popup.vue │ ├── loading.vue │ ├── guide.vue │ ├── report.vue │ ├── login-notice.vue │ ├── support.vue │ ├── task-setting.vue │ ├── discounts.vue │ └── App.vue ├── variables.js ├── utils.js ├── mobile_script.js ├── popup.js ├── db.js ├── priceChart.js └── tasks.js ├── package.json ├── webpack.config.js └── readme.md /.nvmrc: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | yarn-error.log 3 | .vscode 4 | build 5 | -------------------------------------------------------------------------------- /static/image/m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/m.png -------------------------------------------------------------------------------- /static/style/start.css: -------------------------------------------------------------------------------- 1 | .start{ 2 | width: 640px; 3 | margin: 0 auto; 4 | } -------------------------------------------------------------------------------- /static/image/bean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/bean.png -------------------------------------------------------------------------------- /static/image/coin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/coin.png -------------------------------------------------------------------------------- /static/audio/beans.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/audio/beans.ogg -------------------------------------------------------------------------------- /static/audio/rebate.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/audio/rebate.ogg -------------------------------------------------------------------------------- /static/image/coupon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/coupon.png -------------------------------------------------------------------------------- /static/image/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/github.png -------------------------------------------------------------------------------- /static/image/money.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/money.png -------------------------------------------------------------------------------- /static/image/notice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/notice.png -------------------------------------------------------------------------------- /static/image/rebate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/rebate.png -------------------------------------------------------------------------------- /static/image/samedi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/samedi.png -------------------------------------------------------------------------------- /static/image/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/update.png -------------------------------------------------------------------------------- /static/image/zaoshu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/zaoshu.png -------------------------------------------------------------------------------- /static/audio/coin_drop.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/audio/coin_drop.ogg -------------------------------------------------------------------------------- /static/image/icon/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/icon/128.png -------------------------------------------------------------------------------- /static/image/icon/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/icon/16.png -------------------------------------------------------------------------------- /static/image/icon/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/icon/48.png -------------------------------------------------------------------------------- /static/image/icon/jjb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/icon/jjb.png -------------------------------------------------------------------------------- /static/image/alipay_pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/alipay_pay.png -------------------------------------------------------------------------------- /static/image/icon/jjb19x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/icon/jjb19x.png -------------------------------------------------------------------------------- /static/image/icon/jjb38x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/icon/jjb38x.png -------------------------------------------------------------------------------- /static/image/weixin_pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/weixin_pay.png -------------------------------------------------------------------------------- /static/audio/price_protection.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/audio/price_protection.ogg -------------------------------------------------------------------------------- /static/image/icon/offline19x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/icon/offline19x.png -------------------------------------------------------------------------------- /static/image/icon/offline38x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/icon/offline38x.png -------------------------------------------------------------------------------- /static/image/icon/partial-offline19x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/icon/partial-offline19x.png -------------------------------------------------------------------------------- /static/image/icon/partial-offline38x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icai/jjb/master/static/image/icon/partial-offline38x.png -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/----.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 问题咨询 3 | about: 使用问题/安全问题/其他问题 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 请发送邮件至:ming@tiny.group 11 | 或在应用内“高级设置” - “建议反馈” 填写表单 12 | 13 | 京价保不设客服人员,可能不会回复你的咨询。 14 | -------------------------------------------------------------------------------- /static/image/notice.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/background.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Ming Sun. All Rights Reserved. 2 | 3 | 京价保并非一个开源软件,作者保留全部的权利。 公开源代码的目的是为了让使用者能够审计代码,但是你仍然可以就以下方式合法的使用本项目的全部代码和资源: 4 | 5 | * 个人使用 6 | * 以学习目的使用全部或部分代码 7 | 8 | 但你不可以: 9 | 10 | * 将本项目的部分或全部代码和资源进行任何形式的再发行(尤其是上传到 Chrome 商店) 11 | * 利用本项目的部分或全部代码和资源进行任何商业行为 -------------------------------------------------------------------------------- /src/start.js: -------------------------------------------------------------------------------- 1 | import 'weui' 2 | import '../static/style/start.css' 3 | 4 | document.getElementById("login").onclick = function () { 5 | chrome.runtime.sendMessage({ 6 | text: "openLogin", 7 | }, function(response) { 8 | console.log("Response: ", response); 9 | }); 10 | } 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project / 功能请求 4 | title: '' 5 | labels: 功能请求 6 | assignees: '' 7 | 8 | --- 9 | 10 | 请详细填写以下四项关键元素 11 | 12 | ## 期待增加的功能描述: 13 | 14 | ## 实现此功能带来的增益: 15 | 16 | ## 缺少此功能的影响: 17 | 18 | ## 实现的思路: 19 | -------------------------------------------------------------------------------- /src/page_script.js: -------------------------------------------------------------------------------- 1 | window.addSelfOperated = function (a) { 2 | var e = document.getElementById(a); 3 | var f = e.value; 4 | if (f = f.replace(/^\s*(.*?)\s*$/, "$1"), f.length > 100 && (f = f.substring(0, 100)), "" == f) return void(window.location.href = window.location.href); 5 | $("#key").val(f + ' 自营'); 6 | document.getElementById(a).value = f + ' 自营'; 7 | } -------------------------------------------------------------------------------- /static/image/stop.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/image/play.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/image/show.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: tinyming 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ["https://paypal.me/tinyming?locale.x=zh_XC"] 13 | -------------------------------------------------------------------------------- /static/image/checkin.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/account.js: -------------------------------------------------------------------------------- 1 | import { getSetting } from './utils' 2 | 3 | export const getLoginState = function () { 4 | let loginState = { 5 | pc: getSetting('jjb_login-state_pc', { 6 | state: "unknown" 7 | }), 8 | m: getSetting('jjb_login-state_m', { 9 | state: "unknown" 10 | }), 11 | class: "unknown" 12 | } 13 | // 处理登录状态 14 | if (loginState.pc.state == 'alive' && loginState.m.state == 'alive') { 15 | loginState.class = "alive" 16 | } else if (loginState.pc.state == 'failed' && loginState.m.state == 'failed') { 17 | loginState.class = "failed" 18 | } else if (loginState.pc.state == 'failed' || loginState.m.state == 'failed' || loginState.m.state == 'alive' || loginState.pc.state == 'alive') { 19 | loginState.class = "warning" 20 | } 21 | return loginState 22 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report of bug / 如果你认为你发现了一项代码问题 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | 12 | A clear and concise description of what the bug is. 13 | 14 | 请详细的描述这个bug的细节 15 | 16 | **To Reproduce** 17 | 18 | Steps to reproduce the behavior 19 | 20 | 请详细描述重现这个bug的步骤 21 | 22 | 23 | **Expected behavior** 24 | 25 | A clear and concise description of what you expected to happen. 26 | 27 | 你认为这个功能本应如何工作 28 | 29 | **Screenshots** 30 | 31 | If applicable, add screenshots to help explain your problem. 32 | 33 | 如果有可能,请提供截图 34 | 35 | **Desktop (please complete the following information):** 36 | - OS: [e.g. iOS] 37 | - Browser [e.g. chrome, safari] 38 | - Version [e.g. 22] 39 | 40 | 你的操作系统、浏览器版本、京价保版本 41 | 42 | 43 | **Additional context** 44 | 45 | Add any other context about the problem here. 46 | 47 | 额外的描述 48 | -------------------------------------------------------------------------------- /static/image/m.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/image/pc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/image/hide.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/messageBox/messageBox.js: -------------------------------------------------------------------------------- 1 | import msgboxVue from './messageBox.vue'; 2 | // 定义插件对象 3 | const MessageBox = {}; 4 | // vue的install方法,用于定义vue插件 5 | MessageBox.install = function (Vue, options) { 6 | const MessageBoxInstance = Vue.extend(msgboxVue); 7 | let currentMsg; 8 | const initInstance = () => { 9 | // 实例化vue实例 10 | currentMsg = new MessageBoxInstance(); 11 | let msgBoxEl = currentMsg.$mount().$el; 12 | document.body.appendChild(msgBoxEl); 13 | }; 14 | // 在Vue的原型上添加实例方法,以全局调用 15 | Vue.prototype.$msgBox = { 16 | showMsgBox (options) { 17 | if (!currentMsg) { 18 | initInstance(); 19 | } 20 | if (typeof options === 'string') { 21 | currentMsg.content = options; 22 | } else if (typeof options === 'object') { 23 | Object.assign(currentMsg, options); 24 | } 25 | // Object.assign方法只会拷贝源对象自身的并且可枚举的属性到目标对象 26 | return currentMsg.showMsgBox() 27 | .then(val => { 28 | currentMsg = null; 29 | return Promise.resolve(val); 30 | }) 31 | .catch(err => { 32 | currentMsg = null; 33 | return Promise.reject(err); 34 | }); 35 | } 36 | }; 37 | }; 38 | export default MessageBox; -------------------------------------------------------------------------------- /public/start.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |我可以自动为你领取优惠券、自动签到领京豆、自动申请价格保护
15 |18 | 立即登录京东 19 |
20 |强烈建议登录时勾选“记住密码,并为我自动登录”选项,以便京价保自动完成工作
21 |{{event.title}}
7 | 8 |数据加载中
25 |数据加载中
43 |{{text}}
8 |{{message}}
9 |
10 |
11 |
12 | 同时提供
13 |
14 | Firefox 版本:
15 |
16 |
17 |
18 |
19 |
20 |
21 | Microsoft Edge 版本:
22 |
23 |
24 | 感谢你使用京价保!以下是一些简单的介绍:
13 |京价保是一个公开源代码的浏览器插件。它能自动监控已购商品的价格变化,在降价时自动申请价格保护。还内置一系列替你进行签到、领券、抽奖等小任务。
14 |由于京东网页经常更新,京价保受其影响可能部分功能有时变得不可用,因此京价保会经常更新以保持功能正常。如果你使用的不是 15 | Chrome 拓展商店 16 | Firefox 官方商店 17 | Microsoft Edge 扩展中心 18 | 安装,强烈建议您使用上述渠道安装,只有这样你才能获得官方的自动更新。
19 |本插件的所有功能均为京东官方网页提供,未利用任何私有 API。
20 |如你所知,京价保是一个浏览器插件。在你的授权下,京价保代替你自动访问京东的网页来执行一系列操作。
32 |很显然, 33 | 京价保需要您登录京东才能完成你指定的工作。而京东的登录有效期很短,如果您使用扫码登录等方式登录京东,京价保只能在短时间内保持有效。 34 |
35 |强烈建议您在登录时选择 36 | “让京价保记住密码并自动登录”,以便京价保自动完成工作。 37 |
38 |京价保确保 39 | 绝不会将您的密码上传和分享给任何人,您可以通过 40 | 审查代码来确认这一点,同时建议您 41 | 为京东配置一个唯一的登录密码,开启所有的安全措施。 42 |
43 |当登录失效或者需要验证码时,京价保将会提醒你。除非你重新登录,否则京价保将无法继续完成任何工作。
44 |京价保从第一个版本开始就开放所有的源代码,有超过 1000 位程序员/工程师在 Github 关注了京价保的代码,如果你对京价保的代码感兴趣,或者发现什么代码中的问题,亦或是怀疑京价保有什么泄露隐私的小动作,都可以在代码中找到答案。
57 |京价保还创建了一个公众号,会不定期推送一些功能更新或者相关文章,你还可以通过公众号来提交一些反馈建议。
58 |
59 |
60 |
如果你使用 Telegram,那么你还可以 Telegram 上关注京价保:https://t.me/jingjiabao
63 |了解更多关于京价保如何使用账号
70 |如你所知,京价保是一个浏览器插件。在你的授权下,京价保代替你自动访问京东的网页来执行一系列操作。京价保的 73 | 所有功能均为京东官方网页所提供的功能。它所做的一切就是免于你逐一打开页面点击按钮,只不过它不知疲倦,日复一日的执行这些行为。 74 |
75 |很显然, 76 | 京价保需要您登录京东才能完成你指定的工作。而京东的登录有效期很短,如果您使用扫码登录等方式登录京东,京价保只能在短时间内保持有效。 77 |
78 |强烈建议您在登录时选择 79 | “让京价保记住密码并自动登录”,以便京价保自动完成工作。 80 |
81 |京价保确保 82 | 绝不会将您的密码上传和分享给任何人,您可以通过 83 | 审查代码来确认这一点,同时建议您 84 | 为京东配置一个唯一的登录密码,开启所有的安全措施。 85 |
86 |当登录失效或者需要验证码时,京价保将会提醒你。除非你重新登录,否则京价保将无法继续完成任何工作。
87 |
29 | 切换打赏 小明(作者)
30 |
36 | 切换打赏 Samedi(声优)
37 |45 | 62 | 继续打赏 63 |
64 |
69 | 70 | 87 | 我先领个红包 88 |
89 |因为你的支持,京价保才能一直保持更新,适配京东的页面修改,增加更多自动功能。
94 |76 | {{actionText(result.action)}} 77 | {{readableTime(result.timestamp)}} 78 |
79 |{{discount.description}}
69 |商家自荐/优惠爆料可联系微信:cindywchat
106 |145 | {{good.name}} 150 | {{good.name}} 151 | × {{good.quantity}} 152 |
153 |{{log.message}}
175 |178 | 只显示在价保有效期内且下单金额大于0的订单 184 |
185 |只显示尚在价保有效期的订单
193 |