├── tbk
├── core
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── tests.py
│ ├── api
│ │ ├── __init__.py
│ │ ├── models
│ │ │ └── __init__.py
│ │ ├── api
│ │ │ ├── sys_api
│ │ │ │ └── __init__.py
│ │ │ ├── taobao_api
│ │ │ │ └── __init__.py
│ │ │ ├── order_api
│ │ │ │ └── __init__.py
│ │ │ ├── share_api
│ │ │ │ └── __init__.py
│ │ │ ├── tbk_api
│ │ │ │ └── __init__.py
│ │ │ ├── user_api
│ │ │ │ └── __init__.py
│ │ │ ├── __init__.py
│ │ │ └── app.py
│ │ └── main.py
│ ├── vendor
│ │ ├── __init__.py
│ │ ├── dtk
│ │ │ └── __init__.py
│ │ └── ztk
│ │ │ ├── __init__.py
│ │ │ ├── ztk_async.py
│ │ │ ├── ztk_sync_v2.py
│ │ │ └── ztk_v2.py
│ ├── cron
│ │ ├── __init__.py
│ │ ├── dtk_cron
│ │ │ └── __init__.py
│ │ └── ztk_cron
│ │ │ └── __init__.py
│ ├── views
│ │ ├── taobao
│ │ │ └── __init__.py
│ │ ├── __init__.py
│ │ └── index.py
│ ├── logic
│ │ ├── tao_bao_logic
│ │ │ ├── __init__.py
│ │ │ └── my_utils.py
│ │ ├── __init__.py
│ │ └── sys_logic.py
│ ├── test_utils
│ │ └── __init__.py
│ ├── forms
│ │ ├── __init__.py
│ │ ├── share
│ │ │ ├── __init__.py
│ │ │ └── tkl_share_form.py
│ │ ├── tbk
│ │ │ ├── __init__.py
│ │ │ ├── item_detail.py
│ │ │ └── brand_list.py
│ │ └── user
│ │ │ ├── __init__.py
│ │ │ ├── user_token_form.py
│ │ │ ├── native_auth.py
│ │ │ └── bind_wx.py
│ ├── resp
│ │ ├── __init__.py
│ │ ├── share
│ │ │ ├── __init__.py
│ │ │ └── item_tkl_resp.py
│ │ └── tbk
│ │ │ └── __init__.py
│ ├── admin
│ │ ├── admin_filters
│ │ │ └── __init__.py
│ │ ├── __init__.py
│ │ ├── log_entry_admin.py
│ │ └── tb_channel_id.py
│ ├── shared
│ │ ├── __init__.py
│ │ └── order.py
│ ├── dm
│ │ ├── __init__.py
│ │ └── user
│ │ │ ├── __init__.py
│ │ │ ├── user_native.py
│ │ │ ├── fields.py
│ │ │ └── user_profile.py
│ ├── misc
│ │ ├── __init__.py
│ │ └── app_fields.py
│ ├── models
│ │ ├── signal_and_recv
│ │ │ ├── __init__.py
│ │ │ └── user_user_token_handler.py
│ │ ├── model_utils.py
│ │ └── __init__.py
│ ├── apps.py
│ └── management
│ │ └── commands
│ │ └── top_test.py
├── tbk
│ ├── __init__.py
│ └── app_config
│ │ └── __init__.py
├── web
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ ├── models.py
│ ├── templates
│ │ └── tbk
│ │ │ ├── html
│ │ │ ├── ping.html
│ │ │ └── index.html
│ │ │ ├── taobao
│ │ │ └── cb.pyi
│ │ │ └── web
│ │ │ ├── detail.pyi
│ │ │ └── index.pyi
│ ├── tests.py
│ ├── admin.py
│ ├── locale
│ │ ├── en
│ │ │ └── LC_MESSAGES
│ │ │ │ └── django.mo
│ │ └── zh_Hans
│ │ │ └── LC_MESSAGES
│ │ │ └── django.mo
│ └── views
│ │ └── __init__.py
└── pytest.ini
├── code_gen
├── ts
│ ├── dt
│ │ ├── postfix.txt
│ │ └── prefix.txt
│ ├── stub
│ │ ├── postfix.txt
│ │ └── prefix.txt
│ └── path
│ │ ├── postfix.txt
│ │ └── prefix.txt
├── swift
│ ├── dt
│ │ ├── postfix.txt
│ │ └── prefix.txt
│ ├── path
│ │ ├── postfix.txt
│ │ └── prefix.txt
│ └── stub
│ │ ├── postfix.txt
│ │ └── prefix.txt
├── kotlin
│ ├── dt
│ │ ├── postfix.txt
│ │ └── prefix.txt
│ ├── path
│ │ ├── postfix.txt
│ │ └── prefix.txt
│ └── stub
│ │ ├── postfix.txt
│ │ └── prefix.txt
└── json_code_gen_resp.py
├── logs
└── .gitignore
├── run
└── .gitignore
├── templates
└── .gitignore
├── sqlite
└── .gitignore
├── pylama.ini
├── comby
├── async_def.toml
└── get_ztk_api_v2.toml
├── entrypoints
├── cron.sh
├── admin.sh
└── dev_admin.sh
├── static
├── dj_qiyu_tpl
│ ├── img
│ │ └── gongan.png
│ └── vendor
│ │ ├── remixicon
│ │ ├── remixicon.eot
│ │ ├── remixicon.ttf
│ │ ├── remixicon.woff
│ │ └── remixicon.woff2
│ │ ├── fa
│ │ └── fonts
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ └── fontawesome-webfont.woff2
│ │ └── fa5
│ │ ├── webfonts
│ │ ├── fa-brands-400.eot
│ │ ├── fa-brands-400.ttf
│ │ ├── fa-solid-900.eot
│ │ ├── fa-solid-900.ttf
│ │ ├── fa-solid-900.woff
│ │ ├── fa-brands-400.woff
│ │ ├── fa-brands-400.woff2
│ │ ├── fa-regular-400.eot
│ │ ├── fa-regular-400.ttf
│ │ ├── fa-regular-400.woff
│ │ ├── fa-regular-400.woff2
│ │ └── fa-solid-900.woff2
│ │ └── svgs
│ │ ├── solid
│ │ ├── square-full.svg
│ │ ├── egg.svg
│ │ ├── circle.svg
│ │ ├── bookmark.svg
│ │ ├── sort-down.svg
│ │ ├── sort-up.svg
│ │ ├── square.svg
│ │ ├── stop.svg
│ │ ├── play.svg
│ │ ├── minus.svg
│ │ ├── window-minimize.svg
│ │ ├── volume-off.svg
│ │ ├── caret-down.svg
│ │ ├── cheese.svg
│ │ ├── folder.svg
│ │ ├── ice-cream.svg
│ │ ├── mouse.svg
│ │ ├── comment-alt.svg
│ │ ├── star-half.svg
│ │ ├── sd-card.svg
│ │ ├── caret-right.svg
│ │ ├── genderless.svg
│ │ ├── hockey-puck.svg
│ │ ├── adjust.svg
│ │ ├── caret-up.svg
│ │ ├── columns.svg
│ │ ├── bread-slice.svg
│ │ ├── caret-left.svg
│ │ ├── location-arrow.svg
│ │ ├── map-marker.svg
│ │ ├── border-all.svg
│ │ ├── dot-circle.svg
│ │ ├── minus-circle.svg
│ │ ├── mobile.svg
│ │ ├── stop-circle.svg
│ │ ├── tablet.svg
│ │ ├── window-maximize.svg
│ │ ├── paragraph.svg
│ │ ├── play-circle.svg
│ │ ├── voicemail.svg
│ │ ├── file.svg
│ │ ├── glass-whiskey.svg
│ │ ├── angle-left.svg
│ │ ├── angle-up.svg
│ │ ├── slash.svg
│ │ ├── step-backward.svg
│ │ ├── step-forward.svg
│ │ ├── sticky-note.svg
│ │ ├── toggle-on.svg
│ │ ├── angle-down.svg
│ │ ├── angle-right.svg
│ │ ├── dice-one.svg
│ │ ├── sort.svg
│ │ ├── grip-lines.svg
│ │ ├── table.svg
│ │ ├── bolt.svg
│ │ ├── burn.svg
│ │ ├── chalkboard.svg
│ │ ├── filter.svg
│ │ ├── heart.svg
│ │ ├── glass-martini.svg
│ │ ├── grip-lines-vertical.svg
│ │ ├── italic.svg
│ │ ├── lock.svg
│ │ ├── minus-square.svg
│ │ ├── seedling.svg
│ │ ├── tv.svg
│ │ ├── ellipsis-v.svg
│ │ ├── meh-blank.svg
│ │ ├── pause.svg
│ │ ├── battery-empty.svg
│ │ ├── clock.svg
│ │ ├── comment.svg
│ │ ├── ellipsis-h.svg
│ │ ├── forward.svg
│ │ ├── paper-plane.svg
│ │ ├── qrcode.svg
│ │ ├── record-vinyl.svg
│ │ ├── suitcase.svg
│ │ ├── box.svg
│ │ ├── caret-square-down.svg
│ │ ├── neuter.svg
│ │ ├── sign.svg
│ │ ├── utensil-spoon.svg
│ │ ├── backward.svg
│ │ ├── desktop.svg
│ │ ├── equals.svg
│ │ ├── coffee.svg
│ │ ├── cross.svg
│ │ ├── long-arrow-alt-up.svg
│ │ ├── map.svg
│ │ ├── plug.svg
│ │ ├── plus.svg
│ │ ├── trash.svg
│ │ ├── video.svg
│ │ ├── battery-full.svg
│ │ ├── chart-area.svg
│ │ ├── clone.svg
│ │ ├── folder-minus.svg
│ │ ├── long-arrow-alt-down.svg
│ │ ├── long-arrow-alt-left.svg
│ │ ├── long-arrow-alt-right.svg
│ │ ├── pen.svg
│ │ ├── battery-half.svg
│ │ ├── battery-quarter.svg
│ │ ├── chevron-left.svg
│ │ ├── hard-hat.svg
│ │ ├── heart-broken.svg
│ │ ├── icicles.svg
│ │ ├── industry.svg
│ │ ├── music.svg
│ │ ├── user-alt.svg
│ │ ├── arrow-alt-circle-right.svg
│ │ ├── arrow-alt-circle-up.svg
│ │ ├── arrow-down.svg
│ │ ├── arrow-left.svg
│ │ ├── map-marker-alt.svg
│ │ ├── tenge.svg
│ │ ├── arrow-alt-circle-down.svg
│ │ ├── arrow-alt-circle-left.svg
│ │ ├── arrow-up.svg
│ │ ├── battery-three-quarters.svg
│ │ ├── cloud.svg
│ │ ├── glass-martini-alt.svg
│ │ ├── star.svg
│ │ ├── user-tie.svg
│ │ ├── user.svg
│ │ ├── wave-square.svg
│ │ ├── arrow-right.svg
│ │ ├── archive.svg
│ │ ├── chevron-circle-up.svg
│ │ ├── ethernet.svg
│ │ ├── laptop.svg
│ │ ├── mitten.svg
│ │ ├── mountain.svg
│ │ ├── phone-alt.svg
│ │ ├── shield-alt.svg
│ │ ├── briefcase.svg
│ │ ├── brush.svg
│ │ ├── chevron-circle-right.svg
│ │ ├── compact-disc.svg
│ │ ├── dice-two.svg
│ │ ├── divide.svg
│ │ ├── exclamation.svg
│ │ ├── fire.svg
│ │ ├── gem.svg
│ │ ├── hospital-symbol.svg
│ │ ├── meh.svg
│ │ ├── check.svg
│ │ ├── chevron-circle-down.svg
│ │ ├── chevron-circle-left.svg
│ │ ├── door-closed.svg
│ │ ├── fast-backward.svg
│ │ ├── fast-forward.svg
│ │ ├── pause-circle.svg
│ │ ├── unlock.svg
│ │ ├── lock-open.svg
│ │ ├── mobile-alt.svg
│ │ ├── parking.svg
│ │ ├── phone.svg
│ │ ├── plus-circle.svg
│ │ ├── tablet-alt.svg
│ │ ├── tape.svg
│ │ ├── wine-glass.svg
│ │ ├── caret-square-up.svg
│ │ ├── chevron-down.svg
│ │ ├── eject.svg
│ │ ├── tag.svg
│ │ ├── bowling-ball.svg
│ │ ├── caret-square-right.svg
│ │ ├── chevron-right.svg
│ │ ├── chevron-up.svg
│ │ ├── cube.svg
│ │ ├── less-than.svg
│ │ ├── level-down-alt.svg
│ │ └── shapes.svg
│ │ ├── brands
│ │ ├── houzz.svg
│ │ ├── flipboard.svg
│ │ ├── unsplash.svg
│ │ ├── yandex-international.svg
│ │ ├── black-tie.svg
│ │ ├── ethereum.svg
│ │ ├── bandcamp.svg
│ │ ├── strava.svg
│ │ ├── microsoft.svg
│ │ ├── gitter.svg
│ │ ├── vuejs.svg
│ │ ├── css3.svg
│ │ ├── think-peaks.svg
│ │ ├── windows.svg
│ │ ├── y-combinator.svg
│ │ ├── mix.svg
│ │ ├── google-drive.svg
│ │ ├── uikit.svg
│ │ ├── angular.svg
│ │ ├── patreon.svg
│ │ ├── viacoin.svg
│ │ ├── modx.svg
│ │ ├── npm.svg
│ │ ├── deviantart.svg
│ │ ├── facebook-f.svg
│ │ ├── servicestack.svg
│ │ ├── dyalog.svg
│ │ ├── adn.svg
│ │ ├── hacker-news.svg
│ │ ├── instalod.svg
│ │ ├── dochub.svg
│ │ ├── firstdraft.svg
│ │ ├── artstation.svg
│ │ ├── html5.svg
│ │ ├── magento.svg
│ │ ├── twitch.svg
│ │ ├── yahoo.svg
│ │ ├── autoprefixer.svg
│ │ ├── yandex.svg
│ │ ├── monero.svg
│ │ ├── buysellads.svg
│ │ ├── cloudsmith.svg
│ │ ├── jira.svg
│ │ ├── maxcdn.svg
│ │ ├── tiktok.svg
│ │ ├── bitbucket.svg
│ │ ├── dropbox.svg
│ │ ├── stack-exchange.svg
│ │ ├── stack-overflow.svg
│ │ ├── css3-alt.svg
│ │ ├── kaggle.svg
│ │ ├── dashcube.svg
│ │ ├── elementor.svg
│ │ ├── google-play.svg
│ │ ├── google.svg
│ │ ├── korvue.svg
│ │ ├── telegram-plane.svg
│ │ ├── cuttlefish.svg
│ │ ├── gratipay.svg
│ │ ├── openid.svg
│ │ ├── product-hunt.svg
│ │ ├── fulcrum.svg
│ │ ├── gg.svg
│ │ ├── sourcetree.svg
│ │ ├── discourse.svg
│ │ ├── facebook.svg
│ │ ├── rockrms.svg
│ │ ├── unity.svg
│ │ ├── facebook-square.svg
│ │ ├── hotjar.svg
│ │ ├── deezer.svg
│ │ ├── gitlab.svg
│ │ ├── hacker-news-square.svg
│ │ ├── markdown.svg
│ │ ├── sistrix.svg
│ │ ├── envira.svg
│ │ └── atlassian.svg
│ │ └── regular
│ │ ├── window-minimize.svg
│ │ ├── circle.svg
│ │ ├── bookmark.svg
│ │ ├── window-maximize.svg
│ │ ├── square.svg
│ │ ├── star-half.svg
│ │ ├── file.svg
│ │ ├── folder.svg
│ │ ├── window-restore.svg
│ │ ├── stop-circle.svg
│ │ ├── play-circle.svg
│ │ ├── sticky-note.svg
│ │ ├── calendar.svg
│ │ └── comment-alt.svg
└── admin
│ ├── fonts
│ ├── Roboto-Bold-webfont.woff
│ ├── Roboto-Light-webfont.woff
│ ├── Roboto-Regular-webfont.woff
│ └── README.txt
│ ├── img
│ ├── tooltag-arrowright.svg
│ ├── README.txt
│ ├── icon-addlink.svg
│ ├── tooltag-add.svg
│ ├── icon-changelink.svg
│ ├── icon-deletelink.svg
│ ├── icon-yes.svg
│ ├── search.svg
│ ├── icon-alert.svg
│ └── icon-no.svg
│ ├── js
│ └── jquery.init.js
│ └── css
│ ├── dashboard.css
│ └── fonts.css
├── .gitignore
├── .devcontainer.json
├── caddy
└── config.caddy
├── docker
└── Dockerfile
├── mk
├── local.mk
└── i18n.mk
├── .dockerignore
└── .editorconfig
/tbk/core/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/tbk/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/web/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code_gen/ts/dt/postfix.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code_gen/ts/stub/postfix.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code_gen/swift/dt/postfix.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/web/migrations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code_gen/kotlin/dt/postfix.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/code_gen/kotlin/path/postfix.txt:
--------------------------------------------------------------------------------
1 | }
2 |
--------------------------------------------------------------------------------
/code_gen/kotlin/stub/postfix.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/code_gen/swift/path/postfix.txt:
--------------------------------------------------------------------------------
1 | }
2 |
--------------------------------------------------------------------------------
/code_gen/swift/stub/postfix.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/code_gen/ts/path/postfix.txt:
--------------------------------------------------------------------------------
1 | }
2 |
--------------------------------------------------------------------------------
/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/run/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/templates/.gitignore:
--------------------------------------------------------------------------------
1 | !.gitignore
2 |
--------------------------------------------------------------------------------
/sqlite/.gitignore:
--------------------------------------------------------------------------------
1 | !.gitignore
2 | db.sqlite3
3 |
--------------------------------------------------------------------------------
/tbk/core/tests.py:
--------------------------------------------------------------------------------
1 | # Create your tests here.
2 |
--------------------------------------------------------------------------------
/tbk/web/models.py:
--------------------------------------------------------------------------------
1 | # Create your models here.
2 |
--------------------------------------------------------------------------------
/tbk/web/templates/tbk/html/ping.html:
--------------------------------------------------------------------------------
1 | pong
2 |
--------------------------------------------------------------------------------
/tbk/web/tests.py:
--------------------------------------------------------------------------------
1 | # Create your tests here.
2 |
--------------------------------------------------------------------------------
/tbk/web/admin.py:
--------------------------------------------------------------------------------
1 | # Register your models here.
2 |
--------------------------------------------------------------------------------
/tbk/core/api/__init__.py:
--------------------------------------------------------------------------------
1 | from .main import app # noqa
2 |
--------------------------------------------------------------------------------
/tbk/core/vendor/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | vendor src
3 | """
4 |
--------------------------------------------------------------------------------
/pylama.ini:
--------------------------------------------------------------------------------
1 | [pylama:pycodestyle]
2 | max_line_length = 160
3 |
--------------------------------------------------------------------------------
/tbk/core/cron/__init__.py:
--------------------------------------------------------------------------------
1 | from .ztk_cron import * # noqa
2 |
--------------------------------------------------------------------------------
/tbk/web/templates/tbk/taobao/cb.pyi:
--------------------------------------------------------------------------------
1 | success: bool # 绑定是否成功
2 |
--------------------------------------------------------------------------------
/tbk/core/api/models/__init__.py:
--------------------------------------------------------------------------------
1 | # 移除所有的代码 合并进入 django core.model
2 |
--------------------------------------------------------------------------------
/tbk/core/views/taobao/__init__.py:
--------------------------------------------------------------------------------
1 | from .cb import TaoBaoCB # noqa
2 |
--------------------------------------------------------------------------------
/code_gen/swift/stub/prefix.txt:
--------------------------------------------------------------------------------
1 | // 这个文件由于 openapi.json 自动生成
2 | // 请不要手动编辑
3 |
--------------------------------------------------------------------------------
/code_gen/ts/stub/prefix.txt:
--------------------------------------------------------------------------------
1 | // 这个文件由于 openapi.json 自动生成
2 | // 请不要手动编辑
3 |
--------------------------------------------------------------------------------
/code_gen/ts/dt/prefix.txt:
--------------------------------------------------------------------------------
1 | type AppErrno = number
2 | type OrderType = number
3 |
--------------------------------------------------------------------------------
/tbk/core/api/api/sys_api/__init__.py:
--------------------------------------------------------------------------------
1 | from .sys_config import sys_auth # noqa
2 |
--------------------------------------------------------------------------------
/tbk/core/api/api/taobao_api/__init__.py:
--------------------------------------------------------------------------------
1 | from .auth_url import auth_url # noqa
2 |
--------------------------------------------------------------------------------
/tbk/core/logic/tao_bao_logic/__init__.py:
--------------------------------------------------------------------------------
1 | from .logic import TaoBaoLogic # noqa
2 |
--------------------------------------------------------------------------------
/tbk/core/test_utils/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | 测试相关的操作
3 |
4 | 比如: 执行添加虚假用户
5 | """
6 |
--------------------------------------------------------------------------------
/tbk/core/views/__init__.py:
--------------------------------------------------------------------------------
1 | from .index import PrivacyView, PingView # noqa
2 |
--------------------------------------------------------------------------------
/tbk/core/vendor/dtk/__init__.py:
--------------------------------------------------------------------------------
1 | from .dtk import get_dtk_async, get_dtk_std # noqa
2 |
--------------------------------------------------------------------------------
/tbk/core/forms/__init__.py:
--------------------------------------------------------------------------------
1 | from .share import * # noqa
2 | from .user import * # noqa
3 |
--------------------------------------------------------------------------------
/tbk/core/forms/share/__init__.py:
--------------------------------------------------------------------------------
1 | from .tkl_share_form import ShareItemTklForm # noqa
2 |
--------------------------------------------------------------------------------
/tbk/core/resp/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | API 返回数据的类型
3 | """
4 | from .share import * # noqa
5 |
--------------------------------------------------------------------------------
/code_gen/swift/dt/prefix.txt:
--------------------------------------------------------------------------------
1 | typealias ApiDtAppErrno = Int
2 | typealias ApiDtOrderType = Int
3 |
--------------------------------------------------------------------------------
/tbk/core/admin/admin_filters/__init__.py:
--------------------------------------------------------------------------------
1 | from .user_name_filter import UsernameFilter # noqa
2 |
--------------------------------------------------------------------------------
/tbk/core/api/api/order_api/__init__.py:
--------------------------------------------------------------------------------
1 | # 订单接口
2 | from .order_list import order_list # noqa
3 |
--------------------------------------------------------------------------------
/tbk/core/resp/share/__init__.py:
--------------------------------------------------------------------------------
1 | from .item_tkl_resp import ShareItemTklResponseModel # noqa
2 |
--------------------------------------------------------------------------------
/tbk/pytest.ini:
--------------------------------------------------------------------------------
1 | [pytest]
2 | DJANGO_SETTINGS_MODULE = tbk.settings
3 | addopts = --reuse-db
4 |
--------------------------------------------------------------------------------
/code_gen/ts/path/prefix.txt:
--------------------------------------------------------------------------------
1 | // 这个文件是由于 openapi.json 自动生成的
2 | // 请不要使用手工编辑
3 |
4 | class ApiUrls {
5 |
--------------------------------------------------------------------------------
/tbk/core/cron/dtk_cron/__init__.py:
--------------------------------------------------------------------------------
1 | from .grab_order_dtk_hour import GrabOrderDtkCronHour # noqa
2 |
--------------------------------------------------------------------------------
/comby/async_def.toml:
--------------------------------------------------------------------------------
1 | [async_def]
2 |
3 | match = "@app"
4 |
5 | rewrite = """@async_to_sync
6 | @app"""
7 |
--------------------------------------------------------------------------------
/tbk/core/shared/__init__.py:
--------------------------------------------------------------------------------
1 | from .app_errno import AppErrno # noqa
2 | from .order import OrderType # noqa
3 |
--------------------------------------------------------------------------------
/tbk/tbk/app_config/__init__.py:
--------------------------------------------------------------------------------
1 | from .app_constance import * # noqa
2 | from .app_database import * # noqa
3 |
--------------------------------------------------------------------------------
/entrypoints/cron.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 |
5 | exec /usr/local/bin/python manage.py grab_order
6 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/img/gongan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/img/gongan.png
--------------------------------------------------------------------------------
/tbk/core/dm/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | API resp data model definition
3 |
4 | 主要是为了共享一些数据模型
5 | """
6 | from .user import * # noqa
7 |
--------------------------------------------------------------------------------
/tbk/web/locale/en/LC_MESSAGES/django.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/tbk/web/locale/en/LC_MESSAGES/django.mo
--------------------------------------------------------------------------------
/comby/get_ztk_api_v2.toml:
--------------------------------------------------------------------------------
1 | [get_ztk_api_v2]
2 |
3 | match = "= get_ztk_api_v2(logger)"
4 |
5 | rewrite = """= await get_ztk_api_v2(logger)"""
6 |
--------------------------------------------------------------------------------
/static/admin/fonts/Roboto-Bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/admin/fonts/Roboto-Bold-webfont.woff
--------------------------------------------------------------------------------
/static/admin/fonts/Roboto-Light-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/admin/fonts/Roboto-Light-webfont.woff
--------------------------------------------------------------------------------
/tbk/core/dm/user/__init__.py:
--------------------------------------------------------------------------------
1 | from .user_native import UserNativeAuthDataModel # noqa
2 | from .user_profile import UserProfileDataModel # noqa
3 |
--------------------------------------------------------------------------------
/tbk/core/misc/__init__.py:
--------------------------------------------------------------------------------
1 | from .app_fields import AppFields # noqa
2 | from .model_util import core_to_admin_url, user_to_admin_url # noqa
3 |
--------------------------------------------------------------------------------
/tbk/web/locale/zh_Hans/LC_MESSAGES/django.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/tbk/web/locale/zh_Hans/LC_MESSAGES/django.mo
--------------------------------------------------------------------------------
/static/admin/fonts/Roboto-Regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/admin/fonts/Roboto-Regular-webfont.woff
--------------------------------------------------------------------------------
/code_gen/swift/path/prefix.txt:
--------------------------------------------------------------------------------
1 | // 这个文件是由于 openapi 自动生成的
2 | // 请不要使用手工编辑
3 |
4 | let gAppUrls = "http://api.tbk.qiyutech.tech"
5 |
6 | struct AppUrls {
7 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/remixicon/remixicon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/remixicon/remixicon.eot
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/remixicon/remixicon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/remixicon/remixicon.ttf
--------------------------------------------------------------------------------
/tbk/core/forms/tbk/__init__.py:
--------------------------------------------------------------------------------
1 | from .brand_list import TbkBrandListForm, TbkBrandGoodsForm # noqa
2 | from .item_detail import TbkItemDetailForm # noqa
3 |
--------------------------------------------------------------------------------
/tbk/web/templates/tbk/web/detail.pyi:
--------------------------------------------------------------------------------
1 | from qiyu_api.tbk_api import TbkItemInfo
2 |
3 | detail: TbkItemInfo # 商品详情
4 |
5 | show_coupon: bool # 是否显示优惠信息
6 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/remixicon/remixicon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/remixicon/remixicon.woff
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/remixicon/remixicon.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/remixicon/remixicon.woff2
--------------------------------------------------------------------------------
/tbk/web/views/__init__.py:
--------------------------------------------------------------------------------
1 | from .detail_view import DetailView # noqa
2 | from .index_view import IndexView # noqa
3 | from .search_view import SearchView # noqa
4 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-brands-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-brands-400.eot
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-brands-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-brands-400.ttf
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-solid-900.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-solid-900.eot
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-solid-900.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-solid-900.woff
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-brands-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-brands-400.woff
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-brands-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-brands-400.woff2
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-regular-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-regular-400.eot
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-regular-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-regular-400.woff
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa5/webfonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QiYuTechOrg/QiYuTkServer/HEAD/static/dj_qiyu_tpl/vendor/fa/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/tbk/core/vendor/ztk/__init__.py:
--------------------------------------------------------------------------------
1 | from .ztk_async import get_ztk_api # noqa
2 | from .ztk_sync_v2 import get_ztk_sync_api_v2 # noqa
3 | from .ztk_v2 import get_ztk_std_api # noqa
4 |
--------------------------------------------------------------------------------
/tbk/core/api/api/share_api/__init__.py:
--------------------------------------------------------------------------------
1 | from .android_tkl import share_android_relation_tkl # noqa
2 | from .ios_tkl import share_ios_no_relation_tkl, share_ios_relation_tkl # noqa
3 |
--------------------------------------------------------------------------------
/tbk/core/models/signal_and_recv/__init__.py:
--------------------------------------------------------------------------------
1 | from .user_model_profile_handler import user_model_handler # noqa
2 | from .user_user_token_handler import user_user_token_handler # noqa
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .venv
3 | openapi.json
4 | node_modules
5 | __pycache__
6 | dump_data.json
7 | demo.json
8 | demo.xml
9 | poetry.lock
10 | # 开发环境配置
11 | dev.env
12 | .vscode
13 |
--------------------------------------------------------------------------------
/code_gen/kotlin/path/prefix.txt:
--------------------------------------------------------------------------------
1 | // 这个文件是由于 openapi.json 自动生成的
2 | // 请不要使用手工编辑
3 |
4 | package com.qiyutech.tbk.values
5 |
6 | import com.qiyutech.tbk.BuildConfig
7 |
8 | object TbkAPIUrls {
9 |
10 |
--------------------------------------------------------------------------------
/tbk/core/api/api/tbk_api/__init__.py:
--------------------------------------------------------------------------------
1 | from .dtk_brand_goods import tbk_dtk_brand_goods # noqa
2 | from .dtk_brand_list import tbk_dtk_brand_list # noqa
3 | from .item_detail import tbk_item_detail # noqa
4 |
--------------------------------------------------------------------------------
/tbk/core/forms/user/__init__.py:
--------------------------------------------------------------------------------
1 | from .bind_wx import UserBindWxForm, UserBindAliPayForm # noqa
2 | from .native_auth import UserNativeAuthForm # noqa
3 | from .user_token_form import UserTokenForm # noqa
4 |
--------------------------------------------------------------------------------
/tbk/core/shared/order.py:
--------------------------------------------------------------------------------
1 | from enum import IntEnum
2 |
3 | __all__ = ["OrderType"]
4 |
5 |
6 | class OrderType(IntEnum):
7 | all = 1 # 全部订单
8 | done = 2 # 已完成
9 | doing = 3 # 未完成
10 |
--------------------------------------------------------------------------------
/tbk/core/forms/tbk/item_detail.py:
--------------------------------------------------------------------------------
1 | from pydantic import BaseModel, Field
2 |
3 | __all__ = ["TbkItemDetailForm"]
4 |
5 |
6 | class TbkItemDetailForm(BaseModel):
7 | tao_id: str = Field(..., title="淘宝商品ID")
8 |
--------------------------------------------------------------------------------
/tbk/core/admin/__init__.py:
--------------------------------------------------------------------------------
1 | from .log_entry_admin import LogEntryAdmin # noqa
2 | from .order import OrderAdmin # noqa
3 | from .profile import UserAdmin # noqa
4 | from .tb_channel_id import TbChannelIdAdmin # noqa
5 |
--------------------------------------------------------------------------------
/tbk/core/api/main.py:
--------------------------------------------------------------------------------
1 | from .api import app
2 |
3 | __all__ = ["app"]
4 |
5 | if __name__ == "__main__":
6 | import sys
7 |
8 | print("不允许直接运行, 请使用 fastApi/uvicorn 启动", file=sys.stderr)
9 | sys.exit(1)
10 |
--------------------------------------------------------------------------------
/static/admin/fonts/README.txt:
--------------------------------------------------------------------------------
1 | Roboto webfont source: https://www.google.com/fonts/specimen/Roboto
2 | WOFF files extracted using https://github.com/majodev/google-webfonts-helper
3 | Weights used in this project: Light (300), Regular (400), Bold (700)
4 |
--------------------------------------------------------------------------------
/tbk/core/api/api/user_api/__init__.py:
--------------------------------------------------------------------------------
1 | from .auth import user_auth # noqa
2 | from .cancel import user_cancel # noqa
3 | from .ios_bind_tb import user_ios_bind_tb # noqa
4 | from .profile import user_profile # noqa
5 | from .tb import user_tb # noqa
6 |
--------------------------------------------------------------------------------
/.devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "extensions": [
3 | "ms-python.python",
4 | "bungcip.better-toml",
5 | "EditorConfig.EditorConfig",
6 | "ms-vscode.makefile-tools"
7 | ],
8 | "postStartCommand": "pip install poetry --user && poetry update"
9 | }
10 |
--------------------------------------------------------------------------------
/tbk/core/forms/user/user_token_form.py:
--------------------------------------------------------------------------------
1 | from pydantic import BaseModel
2 |
3 | from core.misc import AppFields
4 |
5 | __all__ = ["UserTokenForm"]
6 |
7 |
8 | class UserTokenForm(BaseModel):
9 | """
10 | 用户 token 表单
11 | """
12 |
13 | token: str = AppFields.token
14 |
--------------------------------------------------------------------------------
/caddy/config.caddy:
--------------------------------------------------------------------------------
1 | admin.tbk.qiyutech.tech {
2 | route {
3 | file_server /static/* {
4 | root /var/www/tbk
5 | }
6 |
7 | file_server /media/* {
8 | root /var/www/tbk
9 | }
10 | }
11 | reverse_proxy 127.0.0.1:8001
12 | }
13 |
--------------------------------------------------------------------------------
/tbk/core/dm/user/user_native.py:
--------------------------------------------------------------------------------
1 | from pydantic.main import BaseModel
2 |
3 | from . import fields
4 |
5 | __all__ = ["UserNativeAuthDataModel"]
6 |
7 |
8 | class UserNativeAuthDataModel(BaseModel):
9 | """
10 | 原生认证返回的数据
11 | """
12 |
13 | token: str = fields.token
14 |
--------------------------------------------------------------------------------
/tbk/core/logic/tao_bao_logic/my_utils.py:
--------------------------------------------------------------------------------
1 | from django_qiyu_utils import EnvHelper
2 |
3 | __all__ = ["get_cb_url"]
4 |
5 |
6 | def get_cb_url() -> str:
7 | """
8 | 获取淘宝重新重定向的 地址
9 | :return:
10 | """
11 | return EnvHelper.get_from_env("ADMIN_HOST") + "/taobao/cb"
12 |
--------------------------------------------------------------------------------
/tbk/core/views/index.py:
--------------------------------------------------------------------------------
1 | from django.views.generic import TemplateView
2 |
3 | __all__ = ["PrivacyView", "PingView"]
4 |
5 |
6 | class PrivacyView(TemplateView):
7 | template_name = "tbk/html/privacy.html"
8 |
9 |
10 | class PingView(TemplateView):
11 | template_name = "tbk/html/ping.html"
12 |
--------------------------------------------------------------------------------
/code_gen/kotlin/stub/prefix.txt:
--------------------------------------------------------------------------------
1 | // 这个文件由 openapi.json 自动生成
2 | // 请不要手工编辑
3 |
4 | package com.qiyutech.tbk.dt
5 |
6 | import android.content.Context
7 | import android.net.Uri
8 | import com.android.volley.VolleyError
9 | import com.qiyutech.tbk.utils.MyHttpUtils
10 | import com.qiyutech.tbk.values.TbkAPIUrls
11 |
--------------------------------------------------------------------------------
/tbk/core/dm/user/fields.py:
--------------------------------------------------------------------------------
1 | from pydantic import Field
2 |
3 | nickname = Field(..., title="昵称", description="用户的昵称,展示在用户的主界面")
4 | mobile = Field(None, title="手机号码", description="用户认证使用的手机号码")
5 | token = Field(..., title="认证令牌(TOKEN)", description="其他请求可能需要附带这个认证令牌,保证用户已经登陆")
6 | tao_id = Field(None, title="用户绑定的淘宝ID")
7 |
--------------------------------------------------------------------------------
/tbk/core/models/model_utils.py:
--------------------------------------------------------------------------------
1 | from django.core.serializers.json import DjangoJSONEncoder
2 |
3 | __all__ = ["MyJsonEncoder"]
4 |
5 |
6 | class MyJsonEncoder(DjangoJSONEncoder):
7 | def __init__(self, *args, **kwargs):
8 | kwargs["ensure_ascii"] = False
9 | super().__init__(*args, **kwargs)
10 |
--------------------------------------------------------------------------------
/docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.10
2 |
3 | RUN mkdir /app
4 | COPY requirements.txt /app/requirements.txt
5 |
6 | WORKDIR /app
7 | RUN pip install --no-cache-dir -r requirements.txt
8 |
9 | COPY . /app/
10 |
11 | RUN chmod a+x /app/entrypoints/*
12 |
13 | EXPOSE 8001
14 |
15 | VOLUME ["/app/logs", "/app/media"]
16 |
--------------------------------------------------------------------------------
/mk/local.mk:
--------------------------------------------------------------------------------
1 | poetry-django-run:=cd tbk && poetry run python manage.py
2 |
3 |
4 | local-clean-log:
5 | rm logs/*.log* || true
6 | rm logs/api/*.log* || true
7 |
8 |
9 | local-run-grab-order:
10 | $(poetry-django-run) grab_order
11 |
12 |
13 | local-clean-test-user:
14 | $(poetry-django-run) clean_test_user
15 |
--------------------------------------------------------------------------------
/static/admin/img/tooltag-arrowright.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/code_gen/kotlin/dt/prefix.txt:
--------------------------------------------------------------------------------
1 | // 这个文件由 openapi.json 自动生成
2 | // 请不要手工编辑
3 |
4 | package com.qiyutech.tbk.dt
5 |
6 | import org.json.JSONObject
7 |
8 | typealias DtAppErrno = Int
9 | typealias DtString = String
10 | typealias DtOrderType = Int
11 | typealias DtInteger = Int
12 | typealias DtItemInfo = DtTbkItemInfo
13 |
14 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/square-full.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/misc/app_fields.py:
--------------------------------------------------------------------------------
1 | from pydantic import Field
2 |
3 | __all__ = ["AppFields"]
4 |
5 |
6 | class AppFields(object):
7 | token = Field(..., title="认证令牌", description="用户登陆时获取的认证令牌 (aka: token)")
8 | test = Field(False, title="测试", description="内部使用")
9 | page = Field(1, title="第几页", description="")
10 |
--------------------------------------------------------------------------------
/tbk/web/templates/tbk/html/index.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 |
3 | {% get_current_language as lang %}
4 |
5 |
6 |
7 |
8 | {% trans "奇遇淘客" %}
9 |
10 |
11 | {% trans "请使用奇遇淘客APP访问" %}
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tbk/core/api/api/__init__.py:
--------------------------------------------------------------------------------
1 | from .app import app # noqa
2 | from .dtk_api import * # noqa
3 | from .order_api import * # noqa
4 | from .share_api import * # noqa
5 | from .sys_api import * # noqa
6 | from .taobao_api import * # noqa
7 | from .tbk_api import * # noqa
8 | from .user_api import * # noqa
9 | from .ztk_api import * # noqa
10 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/houzz.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 | __all__ = ["CoreConfig"]
4 |
5 |
6 | class CoreConfig(AppConfig):
7 | name = "core"
8 | default_auto_field = "django.db.models.BigAutoField"
9 |
10 | def __init__(self, app_name, app_module):
11 | super().__init__(app_name, app_module)
12 | self.verbose_name = "核心模块"
13 |
--------------------------------------------------------------------------------
/static/admin/img/README.txt:
--------------------------------------------------------------------------------
1 | All icons are taken from Font Awesome (http://fontawesome.io/) project.
2 | The Font Awesome font is licensed under the SIL OFL 1.1:
3 | - https://scripts.sil.org/OFL
4 |
5 | SVG icons source: https://github.com/encharm/Font-Awesome-SVG-PNG
6 | Font-Awesome-SVG-PNG is licensed under the MIT license (see file license
7 | in current folder).
8 |
--------------------------------------------------------------------------------
/static/admin/img/icon-addlink.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/static/admin/img/tooltag-add.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/egg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/forms/user/native_auth.py:
--------------------------------------------------------------------------------
1 | from pydantic import Field, BaseModel
2 |
3 | __all__ = ["UserNativeAuthForm"]
4 |
5 |
6 | class UserNativeAuthForm(BaseModel):
7 | """
8 | 原生 账号/密码 认证
9 | """
10 |
11 | username: str = Field(..., title="账号", description="用户的奇遇淘客账号")
12 | password: str = Field(..., title="密码", description="用户的奇遇淘客密码")
13 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | .github
2 | caddy
3 | code_gen
4 | comby
5 | docker
6 | # entrypoints
7 | logs
8 | media
9 | mk
10 | run
11 | # static
12 | # tbk
13 | # templates
14 | .dockerignore
15 | .editorconfig
16 | .env
17 | .gitignore
18 | docker-compose.yaml
19 | LICENSE
20 | Makefile
21 | poetry.lock
22 | pylama.ini
23 | pyproject.toml
24 | README.md
25 | # requirements.txt
26 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/cron/ztk_cron/__init__.py:
--------------------------------------------------------------------------------
1 | from .grab_order_ztk_day import GrabOrderZtkCronDay # noqa
2 | from .grab_order_ztk_hour import GrabOrderZtkCronHour # noqa
3 | from .grab_order_ztk_month import GrabOrderZtkCronMonth # noqa
4 | from .grab_order_ztk_real_done import GrabOrderZtkCronRealDone # noqa
5 | from .grab_order_ztk_real_pay import GrabOrderZtkCronRealPay # noqa
6 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/flipboard.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/bookmark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/forms/tbk/brand_list.py:
--------------------------------------------------------------------------------
1 | from pydantic import BaseModel, Field
2 |
3 | __all__ = ["TbkBrandListForm", "TbkBrandGoodsForm"]
4 |
5 |
6 | class TbkBrandListForm(BaseModel):
7 | page_id: int = Field(1, title="获取第几页数据")
8 |
9 |
10 | class TbkBrandGoodsForm(BaseModel):
11 | brand_id: str = Field(..., title="品牌ID")
12 | page_id: int = Field(1, title="获取第几页数据")
13 |
--------------------------------------------------------------------------------
/code_gen/json_code_gen_resp.py:
--------------------------------------------------------------------------------
1 | import click
2 |
3 |
4 | @click.command('json_code_gen')
5 | @click.argument('d')
6 | def main(d):
7 | """
8 | 把 json 转换成 python 的 dataclass
9 |
10 | d 要转换的目录
11 |
12 | 会把所有的 *.json 转换成 *.py 文件
13 | """
14 | print('nothing, use django management command gen the code')
15 |
16 |
17 | if __name__ == '__main__':
18 | main()
19 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/unsplash.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/yandex-international.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/entrypoints/admin.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 |
5 | if [[ -z "${DJANGO_PROD}" ]]
6 | then
7 | /usr/local/bin/python manage.py makemigrations
8 | else
9 | echo "in production env, there is no need to make migrations"
10 | fi
11 |
12 | /usr/local/bin/python manage.py migrate
13 | exec /usr/local/bin/gunicorn -b 0.0.0.0:8001 --worker-class gthread --threads 200 tbk.wsgi
14 |
--------------------------------------------------------------------------------
/static/admin/js/jquery.init.js:
--------------------------------------------------------------------------------
1 | /*global jQuery:false*/
2 | 'use strict';
3 | /* Puts the included jQuery into our own namespace using noConflict and passing
4 | * it 'true'. This ensures that the included jQuery doesn't pollute the global
5 | * namespace (i.e. this preserves pre-existing values for both window.$ and
6 | * window.jQuery).
7 | */
8 | window.django = {jQuery: jQuery.noConflict(true)};
9 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/black-tie.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/ethereum.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/window-minimize.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/sort-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/sort-up.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/api/api/app.py:
--------------------------------------------------------------------------------
1 | from django.http import HttpRequest
2 | from ninja import NinjaAPI
3 |
4 | __all__ = ["app"]
5 |
6 | app = NinjaAPI(
7 | title="奇遇淘客API",
8 | description="奇遇淘客内部接口",
9 | version="v1.0.0",
10 | )
11 |
12 |
13 | @app.get("/ping", tags=["Ping"], summary="Ping测试", description="测试服务是否正常")
14 | async def ping_view(request: HttpRequest):
15 | return "pong"
16 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/bandcamp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/strava.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/square.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/stop.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/microsoft.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/play.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/admin/img/icon-changelink.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/gitter.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/minus.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/window-minimize.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/vuejs.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/volume-off.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/entrypoints/dev_admin.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # 开发环境的 运行脚本
4 |
5 | set -e
6 |
7 | export DJANGO_DEV=1
8 |
9 | if [[ -z "${DJANGO_PROD}" ]]
10 | then
11 | /usr/local/bin/python manage.py makemigrations
12 | else
13 | echo "in production env, there is no need to make migrations"
14 | fi
15 |
16 | /usr/local/bin/python manage.py migrate
17 | exec /usr/local/bin/python manage.py runserver 0.0.0.0:8001
18 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/css3.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/caret-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/cheese.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/folder.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/forms/share/tkl_share_form.py:
--------------------------------------------------------------------------------
1 | from pydantic import BaseModel, Field
2 |
3 | from core.misc import AppFields
4 |
5 | __all__ = ["ShareItemTklForm"]
6 |
7 |
8 | class ShareItemTklForm(BaseModel):
9 | """
10 | 使用淘口令分享商品的参数
11 | """
12 |
13 | item_id: str = Field(
14 | ..., title="淘宝的商品 id", description="都是同一个意思: item_id/num_iid/tao_id"
15 | )
16 | token: str = AppFields.token
17 |
--------------------------------------------------------------------------------
/static/admin/img/icon-deletelink.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/think-peaks.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/windows.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/y-combinator.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/ice-cream.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/resp/tbk/__init__.py:
--------------------------------------------------------------------------------
1 | from typing import Optional, List
2 |
3 | from pydantic import Field
4 | from qiyu_api.tbk_api import TbkItemInfo
5 |
6 | from core.resp.base import ResponseModel
7 |
8 | __all__ = ["GenericItemListResponseModel"]
9 |
10 |
11 | class GenericItemListResponseModel(ResponseModel):
12 | """
13 | 通用商品列表返回
14 | """
15 |
16 | data: Optional[List[TbkItemInfo]] = Field(None, title="详细数据")
17 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | end_of_line = lf
5 | insert_final_newline = true
6 | trim_trailing_whitespace = true
7 | charset = utf-8
8 | indent_size = 4
9 | indent_style = space
10 |
11 | [*.py]
12 | max_line_length = 120
13 |
14 | [{Makefile, *.mk}]
15 | indent_style = tab
16 | indent_size = 8
17 |
18 | [*.json]
19 | indent_size = 2
20 |
21 | [*.md]
22 | max_line_length = off
23 |
24 | [*.yaml]
25 | indent_size = 2
26 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/mix.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/mouse.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/resp/share/item_tkl_resp.py:
--------------------------------------------------------------------------------
1 | from typing import Optional
2 |
3 | from pydantic import Field
4 |
5 | from core.resp.base import ResponseModel
6 |
7 | __all__ = ["ShareItemTklResponseModel"]
8 |
9 |
10 | class ShareItemTklResponseModel(ResponseModel):
11 | """
12 | 淘口令分享商品的 URL
13 | """
14 |
15 | data: Optional[str] = Field(
16 | None, title="淘口令", description="包含淘口令的字符串,可能会包含一些奇奇怪怪的信息"
17 | )
18 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/google-drive.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/comment-alt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/star-half.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/sd-card.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/web/templates/tbk/web/index.pyi:
--------------------------------------------------------------------------------
1 | from typing import List, Optional
2 |
3 | from django.http import HttpRequest
4 | from qiyu_api.tbk_api import TbkItemInfo
5 | from qiyu_api.ztk_api import GuessYouLikeArgs
6 |
7 | args: GuessYouLikeArgs
8 |
9 | data_list: List[TbkItemInfo]
10 |
11 | show_coupon: bool # 是否显示优惠信息
12 |
13 | page: int # 页数
14 |
15 | name: Optional[str] # 搜索名称
16 |
17 | tkl: bool # 是否为淘口令
18 |
19 | request: HttpRequest
20 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/uikit.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/caret-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/genderless.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/hockey-puck.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/angular.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/patreon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/viacoin.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/bookmark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/adjust.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/caret-up.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/columns.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mk/i18n.mk:
--------------------------------------------------------------------------------
1 | djangoRun:=cd tbk && poetry run python manage.py
2 |
3 | # i18n 提取出翻译的字符串
4 | i18n-extract:
5 | $(djangoRun) makemessages --locale en
6 | $(djangoRun) makemessages --locale zh_Hans
7 | $(djangoRun) makemessages --domain djangojs --extension=js,jsx,ts,tsx --locale en
8 | $(djangoRun) makemessages --domain djangojs --extension=js,jsx,ts,tsx --locale zh_Hans
9 |
10 |
11 | # i18n 编译翻译后的字符串
12 | i18n-compile:
13 | $(djangoRun) compilemessages
14 |
--------------------------------------------------------------------------------
/static/admin/img/icon-yes.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/modx.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/bread-slice.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/caret-left.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/location-arrow.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/map-marker.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/npm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/window-maximize.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/deviantart.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/facebook-f.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/servicestack.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/border-all.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/dot-circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/minus-circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/mobile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/stop-circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/tablet.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/window-maximize.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/dyalog.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/paragraph.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/play-circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/voicemail.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/admin/img/search.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/adn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/hacker-news.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/instalod.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/file.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/glass-whiskey.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/vendor/ztk/ztk_async.py:
--------------------------------------------------------------------------------
1 | """
2 | 折淘客 开放品台 API
3 |
4 | """
5 | from typing import Optional
6 |
7 | import structlog
8 | from qiyu_api.ztk_api import ZTK
9 |
10 | from tbk.s_config import SConfig
11 | from ...logger import get_logger
12 |
13 | __all__ = ["get_ztk_api"]
14 |
15 |
16 | def get_ztk_api(logger: Optional[structlog.stdlib.BoundLogger] = None) -> ZTK:
17 | if logger is None:
18 | logger = get_logger()
19 | return ZTK(SConfig.ZTKSid, logger)
20 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/dochub.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/firstdraft.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/angle-left.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/angle-up.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/slash.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/step-backward.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/step-forward.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/sticky-note.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/toggle-on.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/square.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/angle-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/angle-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/dice-one.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/sort.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/artstation.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/html5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/magento.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/twitch.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/yahoo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/grip-lines.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/autoprefixer.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/yandex.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/star-half.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/bolt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/burn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/chalkboard.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/filter.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/heart.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/vendor/ztk/ztk_sync_v2.py:
--------------------------------------------------------------------------------
1 | """
2 | 折淘客 开放品台 API
3 |
4 | """
5 | from typing import Optional
6 |
7 | import structlog
8 | from qiyu_api.ztk_api import ZTKSync
9 |
10 | from tbk.s_config import SConfig
11 | from ...logger import get_logger
12 |
13 | __all__ = ["get_ztk_sync_api_v2"]
14 |
15 |
16 | def get_ztk_sync_api_v2(logger: Optional[structlog.stdlib.BoundLogger] = None):
17 | if logger is None:
18 | logger = get_logger()
19 | return ZTKSync(SConfig.ZTKSid, logger)
20 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/glass-martini.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/grip-lines-vertical.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/italic.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/lock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/minus-square.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/seedling.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/tv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/logic/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | 注意:
3 | logic 里面的代码 所有的地方都可以抛出异常
4 | 但是抛出的异常 必须在 core.exceptions 里面
5 |
6 | 这样做主要是为了简化代码
7 | [如果需要特殊的函数,可以捕获异常自行处理]
8 | """
9 | from .order_logic import OrderLogic # noqa
10 | from .share_logic import ShareLogic # noqa
11 | from .sys_logic import SysLogic # noqa
12 | from .tao_bao_logic import TaoBaoLogic # noqa
13 | from .user_logic import UserLogic # noqa
14 | from .user_v2 import UserV2Logic # noqa
15 | from .ztk_logic import ZTKLogic # noqa
16 |
--------------------------------------------------------------------------------
/tbk/core/models/__init__.py:
--------------------------------------------------------------------------------
1 | from .order import OrderModel, OrderStatusEnum # noqa
2 | from .profile import Profile # noqa
3 | from .tb_channel_bind import TBChannelBindModel # noqa
4 | from .tb_channel_id import TBChannelIdModel # noqa
5 | from .user_token import UserTokenModel # noqa
6 |
7 | try:
8 | from . import signal_and_recv # noqa
9 | except ImportError as e:
10 | import sys
11 |
12 | print(f"import signal and recv failed: {str(e)}", file=sys.stderr)
13 |
14 | sys.exit(2)
15 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/monero.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/ellipsis-v.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/meh-blank.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/pause.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/buysellads.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/cloudsmith.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/jira.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/maxcdn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/tiktok.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/battery-empty.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/clock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/comment.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/ellipsis-h.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/forward.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/paper-plane.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/qrcode.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/record-vinyl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/suitcase.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/file.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/box.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/caret-square-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/neuter.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/sign.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/utensil-spoon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/admin/log_entry_admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from django.contrib.admin import ModelAdmin
3 | from django.contrib.admin.models import LogEntry
4 |
5 | __all__ = ["LogEntryAdmin"]
6 |
7 |
8 | @admin.register(LogEntry)
9 | class LogEntryAdmin(ModelAdmin):
10 | date_hierarchy = "action_time"
11 | search_fields = ("object_repr", "change_message")
12 | list_display = (
13 | "action_time",
14 | "user",
15 | "content_type",
16 | "action_flag",
17 | )
18 |
--------------------------------------------------------------------------------
/static/admin/css/dashboard.css:
--------------------------------------------------------------------------------
1 | /* DASHBOARD */
2 |
3 | .dashboard .module table th {
4 | width: 100%;
5 | }
6 |
7 | .dashboard .module table td {
8 | white-space: nowrap;
9 | }
10 |
11 | .dashboard .module table td a {
12 | display: block;
13 | padding-right: .6em;
14 | }
15 |
16 | /* RECENT ACTIONS MODULE */
17 |
18 | .module ul.actionlist {
19 | margin-left: 0;
20 | }
21 |
22 | ul.actionlist li {
23 | list-style-type: none;
24 | overflow: hidden;
25 | text-overflow: ellipsis;
26 | }
27 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/bitbucket.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/dropbox.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/stack-exchange.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/stack-overflow.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/folder.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/backward.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/desktop.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/equals.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/admin/img/icon-alert.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/coffee.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/cross.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/long-arrow-alt-up.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/map.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/plug.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/plus.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/trash.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/video.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/admin/css/fonts.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Roboto';
3 | src: url('../fonts/Roboto-Bold-webfont.woff');
4 | font-weight: 700;
5 | font-style: normal;
6 | }
7 |
8 | @font-face {
9 | font-family: 'Roboto';
10 | src: url('../fonts/Roboto-Regular-webfont.woff');
11 | font-weight: 400;
12 | font-style: normal;
13 | }
14 |
15 | @font-face {
16 | font-family: 'Roboto';
17 | src: url('../fonts/Roboto-Light-webfont.woff');
18 | font-weight: 300;
19 | font-style: normal;
20 | }
21 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/css3-alt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/kaggle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/battery-full.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/chart-area.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/clone.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/folder-minus.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/long-arrow-alt-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/long-arrow-alt-left.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/long-arrow-alt-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/pen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/management/commands/top_test.py:
--------------------------------------------------------------------------------
1 | from django.core.management.base import BaseCommand, CommandParser
2 | from qiyu_api.ali_top import TopApi
3 |
4 | from tbk.s_config import SConfig
5 |
6 |
7 | class Command(BaseCommand):
8 | help = "阿里开放平台 Top测试"
9 |
10 | def add_arguments(self, parser: CommandParser):
11 | super().add_arguments(parser)
12 |
13 | def handle(self, *args, **options):
14 | top = TopApi(SConfig.AliAppKey, SConfig.AliAppSecret)
15 | d = top.time_get()
16 | print(d)
17 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/dashcube.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/battery-half.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/battery-quarter.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/chevron-left.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/hard-hat.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/heart-broken.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/icicles.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/industry.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/music.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/user-alt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/forms/user/bind_wx.py:
--------------------------------------------------------------------------------
1 | from pydantic import BaseModel, Field
2 |
3 | from core.misc import AppFields
4 |
5 | __all__ = ["UserBindWxForm", "UserBindAliPayForm"]
6 |
7 |
8 | class UserBindWxForm(BaseModel):
9 | """
10 | 用户绑定微信表单
11 | """
12 |
13 | token: str = AppFields.token
14 | wx: str = Field(..., title="微信号码")
15 |
16 |
17 | class UserBindAliPayForm(BaseModel):
18 | token: str = AppFields.token
19 | ali_name: str = Field(..., title="支付宝姓名")
20 | ali_account: str = Field(..., title="支付宝账号")
21 |
--------------------------------------------------------------------------------
/tbk/core/vendor/ztk/ztk_v2.py:
--------------------------------------------------------------------------------
1 | """
2 | 折淘客 开放品台 API
3 | """
4 | from typing import Optional
5 |
6 | import structlog
7 | from qiyu_api.ztk_api import ZTKStd
8 |
9 | from tbk.s_config import SConfig
10 | from ...logger import get_logger
11 |
12 | __all__ = ["get_ztk_std_api"]
13 |
14 |
15 | async def get_ztk_std_api(logger: Optional[structlog.stdlib.BoundLogger] = None):
16 | if logger is None:
17 | logger = get_logger()
18 |
19 | sid = await SConfig.async_ztk_sid()
20 | return ZTKStd(ztk_sid=sid, logger=logger)
21 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/elementor.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/google-play.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/google.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/korvue.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/telegram-plane.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/window-restore.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/arrow-alt-circle-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/arrow-alt-circle-up.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/arrow-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/arrow-left.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/map-marker-alt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/tenge.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/admin/tb_channel_id.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from django.contrib.admin import ModelAdmin
3 |
4 | from core.models import TBChannelIdModel
5 |
6 | __all__ = ["TbChannelIdAdmin"]
7 |
8 |
9 | @admin.register(TBChannelIdModel)
10 | class TbChannelIdAdmin(ModelAdmin):
11 | """
12 | 淘宝渠道 ID 绑定
13 | 允许管理员进行 删除 操作
14 | 方便对用户进行 `解绑` 操作
15 | """
16 |
17 | list_display = ("user", "relation_id", "special_id", "ctime")
18 | search_fields = ("user", "relation_id")
19 | raw_id_fields = ("user",)
20 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/cuttlefish.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/gratipay.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/openid.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/product-hunt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/arrow-alt-circle-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/arrow-alt-circle-left.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/arrow-up.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/battery-three-quarters.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/cloud.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/glass-martini-alt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/star.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/user-tie.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/wave-square.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/fulcrum.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/gg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/sourcetree.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/arrow-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/discourse.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/facebook.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/rockrms.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/unity.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/stop-circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/archive.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/chevron-circle-up.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/ethernet.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/laptop.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/mitten.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/mountain.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/phone-alt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/shield-alt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/facebook-square.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/hotjar.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/play-circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/sticky-note.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/briefcase.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/brush.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/chevron-circle-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/compact-disc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/dice-two.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/divide.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/exclamation.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/fire.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/gem.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/hospital-symbol.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/meh.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/dm/user/user_profile.py:
--------------------------------------------------------------------------------
1 | from typing import Optional
2 |
3 | from pydantic import BaseModel, Field
4 |
5 | from . import fields
6 |
7 | __all__ = ["UserProfileDataModel"]
8 |
9 |
10 | class UserProfileDataModel(BaseModel):
11 | mobile: str = fields.mobile
12 | tao_id: Optional[str] = fields.tao_id
13 | wx: Optional[str] = Field(None, title="微信")
14 | relation_id: Optional[str] = Field(None, title="淘宝渠道ID")
15 | ali_name: Optional[str] = Field(None, title="支付宝姓名")
16 | ali_account: Optional[str] = Field(None, title="支付宝账号")
17 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/deezer.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/gitlab.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/calendar.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/check.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/chevron-circle-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/chevron-circle-left.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/door-closed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/fast-backward.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/fast-forward.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/pause-circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/unlock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/models/signal_and_recv/user_user_token_handler.py:
--------------------------------------------------------------------------------
1 | from django.contrib.auth.models import User
2 | from django.db.models.signals import post_save
3 | from django.dispatch import receiver
4 |
5 | from .. import UserTokenModel
6 |
7 |
8 | # noinspection PyUnusedLocal
9 | @receiver(post_save, sender=User)
10 | def user_user_token_handler(sender, instance: User, created: bool, **kwargs):
11 | """
12 | 禁止用户登陆之后 需要自动删除 token 代码
13 | """
14 | if not instance.is_active: # 禁止用户登陆
15 | UserTokenModel.objects.filter(user=instance).delete()
16 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/hacker-news-square.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/markdown.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/sistrix.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/lock-open.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/mobile-alt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/parking.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/phone.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/plus-circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/tablet-alt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/tape.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/wine-glass.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tbk/core/logic/sys_logic.py:
--------------------------------------------------------------------------------
1 | from structlog.stdlib import BoundLogger
2 |
3 | from tbk.s_config import SConfig
4 |
5 | __all__ = ["SysLogic"]
6 |
7 |
8 | class SysLogic(object):
9 | """
10 | 系统[配置]逻辑
11 | """
12 |
13 | def __init__(self, logger: BoundLogger):
14 | self._log = logger
15 |
16 | async def get_sys_config(self) -> dict:
17 | """
18 | 获取系统配置
19 | :return:
20 | """
21 | pid = await SConfig.async_ali_pid()
22 | self._log.bind(pid=pid).info("get pid")
23 | return {"pid": pid}
24 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/envira.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/caret-square-up.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/chevron-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/eject.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/tag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/admin/img/icon-no.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/brands/atlassian.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/regular/comment-alt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/bowling-ball.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/caret-square-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/chevron-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/chevron-up.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/cube.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/less-than.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/level-down-alt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/dj_qiyu_tpl/vendor/fa5/svgs/solid/shapes.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------