├── .env.example ├── .gitattributes ├── .gitignore ├── .gitmodules ├── .travis.yml ├── .version ├── LICENSE ├── README.md ├── app ├── Card.php ├── CardOrder.php ├── Category.php ├── Console │ ├── Commands │ │ ├── ResetPassword.php │ │ └── Update.php │ └── Kernel.php ├── Coupon.php ├── Exceptions │ └── Handler.php ├── File.php ├── FundRecord.php ├── Http │ ├── Controllers │ │ ├── Admin │ │ │ ├── Dashboard.php │ │ │ ├── Order.php │ │ │ ├── Pay.php │ │ │ ├── PayWay.php │ │ │ └── System.php │ │ ├── Auth │ │ │ ├── LoginController.php │ │ │ └── ResetPasswordController.php │ │ ├── Controller.php │ │ ├── DevController.php │ │ ├── HomeController.php │ │ ├── IndexController.php │ │ ├── Merchant │ │ │ ├── Card.php │ │ │ ├── Category.php │ │ │ ├── Coupon.php │ │ │ ├── File.php │ │ │ ├── Log.php │ │ │ ├── Order.php │ │ │ └── Product.php │ │ └── Shop │ │ │ ├── Coupon.php │ │ │ ├── Order.php │ │ │ ├── Pay.php │ │ │ └── Product.php │ ├── Kernel.php │ └── Middleware │ │ ├── AuthenticateToken.php │ │ ├── CORS.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php ├── Jobs │ └── OrderSms.php ├── Library │ ├── CurlRequest.php │ ├── FundHelper.php │ ├── Geetest │ │ ├── API.php │ │ └── Lib.php │ ├── Helper.php │ ├── LogHelper.php │ ├── QQWry │ │ └── QQWry.php │ ├── Response.php │ └── UrlShorten.php ├── Log.php ├── Mail │ ├── OrderShipped.php │ ├── ProductCountWarn.php │ └── Test.php ├── Model_.php ├── Order.php ├── Pay.php ├── PayWay.php ├── Policies │ └── UserPolicy.php ├── Product.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── ConfigServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── ShopTheme.php ├── System.php └── User.php ├── artisan ├── bootstrap ├── app.php └── cache │ ├── packages.php │ ├── routes.php │ ├── services.php │ └── test.txt ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── captcha.php ├── database.php ├── filesystems.php ├── jwt.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── OrderFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2017_12_23_223031_create_categories_table.php │ ├── 2017_12_23_223124_create_products_table.php │ ├── 2017_12_23_223252_create_cards_table.php │ ├── 2017_12_23_223508_create_orders_table.php │ ├── 2017_12_23_223755_create_pays_table.php │ ├── 2018_01_02_142012_create_card_order_table.php │ ├── 2018_01_28_183143_create_coupons_table.php │ ├── 2018_01_29_195459_create_logs_table.php │ ├── 2018_01_29_205026_create_systems_table.php │ ├── 2018_02_01_174100_create_fund_records_table.php │ ├── 2018_02_01_202439_create_jobs_table.php │ ├── 2018_02_01_234941_create_files_table.php │ ├── 2018_05_17_112228_create_shop_themes_table.php │ ├── 2019_02_07_195259_add_count_to_products.php │ ├── 2019_02_14_203213_add_name_to_orders.php │ ├── 2019_04_28_230220_add_inventory_to_products.php │ ├── 2019_05_18_131719_add_all_to_fund_records.php │ ├── 2019_06_17_185712_add_options_to_shop_theme.php │ ├── 2019_06_18_112211_add_manual_products.php │ ├── 2019_07_03_213426_add_sms_price_to_orders.php │ ├── 2019_12_27_175550_create_pay_ways_table.php │ ├── 2019_12_30_210448_add_address_to_logs.php │ └── 2021_02_25_152603_add_query_password_to_orders.php └── seeds │ ├── CardsSeeder.php │ ├── CouponsSeeder.php │ ├── DatabaseSeeder.php │ ├── OrdersSeeder.php │ ├── PayTableSeeder.php │ ├── ProductsSeeder.php │ ├── SystemSeeder.php │ └── UsersSeeder.php ├── phpunit.xml ├── public ├── .htaccess.example ├── assets │ ├── css │ │ ├── index.css │ │ └── index_mobile.css │ ├── demo │ │ └── api_demo_php.zip │ └── images │ │ ├── btn-arrow-green.svg │ │ ├── btn-arrow-purple.svg │ │ ├── btn-arrow-white.svg │ │ ├── btn-arrow.svg │ │ └── index │ │ ├── alipay.png │ │ ├── area_chart.png │ │ ├── bg-mask1_47d5d.png │ │ ├── bg-mask2_b8afa.png │ │ ├── bg-mask3_af41b.png │ │ ├── head-bg-circle1_a5b8c.svg │ │ ├── head-bg-circle2_e1996.svg │ │ ├── head-bg-circle3_8db76.svg │ │ ├── ills-1_02237.svg │ │ ├── ills-2_6c2eb.svg │ │ ├── ills-3_bd288.svg │ │ └── ills_69b23.png ├── dist │ ├── css │ │ ├── app.78053bdd.css │ │ ├── app.da29588b.css │ │ ├── chunk-14e8015a.8b51af0b.css │ │ ├── chunk-3544a150.751dc3c4.css │ │ ├── chunk-419fe948.3c69e8a0.css │ │ ├── chunk-4db37efc.10bd47dc.css │ │ ├── chunk-d2bd86ee.6b25ac1d.css │ │ ├── chunk-vendors.56035cb7.css │ │ └── chunk-vendors.f0a2a348.css │ ├── fonts │ │ ├── MaterialIcons-Regular.012cf6a1.woff │ │ ├── MaterialIcons-Regular.570eb838.woff2 │ │ ├── MaterialIcons-Regular.a37b0c01.ttf │ │ ├── MaterialIcons-Regular.e79bfd88.eot │ │ ├── element-icons.535877f5.woff │ │ └── element-icons.732389de.ttf │ ├── img │ │ ├── 404.a57b6f31.png │ │ ├── 404_cloud.0f4bc32b.png │ │ ├── iconfont.2a942a8e.svg │ │ └── qq-group.ef24d8c8.png │ ├── index_dev.html │ └── js │ │ ├── app.152d10e1.js │ │ ├── app.cc3c669d.js │ │ ├── chunk-14e8015a.12c0283c.js │ │ ├── chunk-1cbcdea1.cfe3b971.js │ │ ├── chunk-2d0da573.681c6091.js │ │ ├── chunk-2d0e5357.931184f0.js │ │ ├── chunk-3544a150.47b788be.js │ │ ├── chunk-3821d039.743a76f0.js │ │ ├── chunk-419fe948.f62af62d.js │ │ ├── chunk-4db37efc.b952fff0.js │ │ ├── chunk-520bbfda.17ec0ae9.js │ │ ├── chunk-775f0977.84566a82.js │ │ ├── chunk-cfda387e.93504594.js │ │ ├── chunk-d2bd86ee.35f9bb8f.js │ │ ├── chunk-fd8ae5d8.050a7356.js │ │ ├── chunk-vendors.417713c2.js │ │ └── chunk-vendors.bd699b62.js ├── favicon.ico ├── images │ ├── illegal.jpg │ ├── logo.png │ ├── logo.psd │ └── qrcode_fail.png ├── index.php ├── nginx.conf.example ├── plugins │ ├── css │ │ ├── ali_qr.css │ │ ├── btc_qr.css │ │ ├── jd_qr.css │ │ ├── qq_qr.css │ │ ├── quill.snow.css │ │ ├── unionpay_qr.css │ │ ├── wx_qr.css │ │ └── youzan_qr.css │ ├── images │ │ ├── ali.png │ │ ├── ali_qr.png │ │ ├── btc.png │ │ ├── btc.psd │ │ ├── btc_qr.png │ │ ├── btc_qr.psd │ │ ├── jd.png │ │ ├── jd.psd │ │ ├── jd_qr.png │ │ ├── jd_qr.psd │ │ ├── paypal.png │ │ ├── qq.png │ │ ├── qq_qr.png │ │ ├── unionpay.png │ │ ├── unionpay_qr.png │ │ ├── unionpay_qr.psd │ │ ├── usdt-erc20.png │ │ ├── usdt-okc.png │ │ ├── usdt-trc20.png │ │ ├── usdt.png │ │ ├── wave.png │ │ ├── wx.png │ │ ├── wx_qr.png │ │ ├── youzan.png │ │ ├── youzan_qr.png │ │ └── youzan_qr.psd │ └── js │ │ ├── clipboard.min.js │ │ ├── gt.js │ │ ├── qrcode.min.js │ │ ├── quill.min.js │ │ └── steal_alipay.js ├── robots.txt ├── shop_theme │ ├── classic │ │ ├── common.js │ │ ├── common.min.js │ │ ├── iconfont.css │ │ ├── images │ │ │ ├── ali.png │ │ │ ├── choose_bg.png │ │ │ ├── open_other.png │ │ │ ├── pay_group_qrcode.png │ │ │ ├── qq.png │ │ │ ├── section1_right_bg.jpg │ │ │ └── wx.png │ │ ├── jquery-1.8.3.min.js │ │ ├── layui │ │ │ ├── layer.js │ │ │ └── skin │ │ │ │ └── default │ │ │ │ ├── icon.png │ │ │ │ └── layer.css │ │ ├── mobile.js │ │ ├── mobile.min.css │ │ ├── mobile.min.js │ │ ├── pc.js │ │ ├── pc.min.css │ │ ├── pc.min.js │ │ ├── sweetalert2 │ │ │ ├── sweetalert2.min.css │ │ │ └── sweetalert2.min.js │ │ └── tips.js │ ├── ms │ │ ├── app.css │ │ ├── app.css.map │ │ ├── app.js │ │ ├── app.min.js │ │ ├── app.scss │ │ ├── jquery-1.8.3.min.js │ │ └── scss │ │ │ ├── global.scss │ │ │ ├── modal.scss │ │ │ ├── page-checkout.scss │ │ │ ├── page-shop.scss │ │ │ └── select-outline.scss │ └── test │ │ ├── app.scss │ │ ├── common.js │ │ ├── common.min.js │ │ ├── iconfont.css │ │ ├── mobile.js │ │ ├── mobile.min.css │ │ ├── pc.js │ │ └── pc.min.css └── web.config.example ├── resources ├── assets │ ├── js │ │ ├── app.js │ │ ├── bootstrap.js │ │ └── components │ │ │ └── ExampleComponent.vue │ └── sass │ │ ├── _variables.scss │ │ └── app.scss ├── lang │ ├── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ ├── shop.php │ │ └── validation.php │ ├── zh_CN │ │ ├── auth.php │ │ ├── exception.php │ │ ├── passwords.php │ │ ├── shop.php │ │ └── validation.php │ └── zh_TW │ │ ├── auth.php │ │ ├── exception.php │ │ ├── passwords.php │ │ ├── shop.php │ │ └── validation.php └── views │ ├── admin.blade.php │ ├── emails │ ├── message.blade.php │ ├── order.blade.php │ ├── product_count_warn.blade.php │ └── test.blade.php │ ├── errors │ └── _.blade.php │ ├── index.blade.php │ ├── install.blade.php │ ├── message.blade.php │ ├── pay │ ├── alidirect_alipay.blade.php │ ├── alidirect_weixin.blade.php │ ├── aliqr.blade.php │ ├── btc.blade.php │ ├── jd.blade.php │ ├── payjs.blade.php │ ├── qf_qq.blade.php │ ├── qq.blade.php │ ├── query.blade.php │ ├── result.blade.php │ ├── unionpay.blade.php │ ├── vpay_alipay.blade.php │ ├── vpay_wechat.blade.php │ ├── wechat.blade.php │ ├── youzan_alipay.blade.php │ ├── youzan_qq.blade.php │ ├── youzan_wechat.blade.php │ └── youzan_youzan.blade.php │ ├── shop_close.blade.php │ ├── shop_theme │ ├── Classic │ │ ├── config.php │ │ ├── index.blade.php │ │ ├── mobile.blade.php │ │ └── pc.blade.php │ ├── Demo │ │ └── config.php.bak │ ├── MS │ │ ├── config.php │ │ └── index.blade.php │ ├── Material │ │ ├── config.php │ │ └── index.blade.php │ └── Test │ │ ├── config (2).php │ │ ├── config.php │ │ ├── index.blade.php │ │ ├── index_ms.blade.php │ │ ├── mobile.blade.php │ │ └── pc.blade.php │ ├── utils │ └── redirect.blade.php │ └── vendor │ └── laravel-log-viewer │ ├── .gitkeep │ └── log.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── storage ├── app │ ├── card_export │ │ └── .gitignore │ ├── images │ │ ├── complaint │ │ │ └── .gitignore │ │ ├── message │ │ │ └── .gitignore │ │ ├── product │ │ │ └── .gitignore │ │ ├── qrcode │ │ │ └── .gitignore │ │ └── verify │ │ │ └── .gitignore │ ├── public │ │ └── .gitignore │ ├── withdraw_auto │ │ └── .gitignore │ └── withdraw_export │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore └── tests ├── CreatesApplication.php ├── Feature ├── AdminTest.php └── BasicTest.php ├── TestCase.php └── Unit └── ExampleTest.php /.env.example: -------------------------------------------------------------------------------- 1 | 2 | DB_CONNECTION=mysql 3 | DB_HOST=127.0.0.1 4 | DB_PORT=3306 5 | DB_DATABASE=your_db_name 6 | DB_USERNAME=your_db_username 7 | DB_PASSWORD=your_db_password 8 | 9 | 10 | # 下面配置无需修改 11 | APP_ENV=local 12 | APP_KEY= 13 | APP_DEBUG=false 14 | APP_LOG_LEVEL=error 15 | APP_LOG=daily 16 | 17 | BROADCAST_DRIVER=log 18 | CACHE_DRIVER=file 19 | SESSION_DRIVER=array 20 | SESSION_LIFETIME=120 21 | QUEUE_DRIVER=sync 22 | 23 | REDIS_HOST=127.0.0.1 24 | REDIS_PASSWORD=null 25 | REDIS_PORT=6379 26 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | /.idea 7 | /.vagrant 8 | Homestead.json 9 | Homestead.yaml 10 | npm-debug.log 11 | yarn-error.log 12 | /.env 13 | /database/seeds/MyPayTableSeeder.php 14 | /public/.htaccess 15 | /public/web.config -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "app/Library/Gateway"] 2 | path = app/Library/Gateway 3 | url = git@github.com:Tai7sy/card-gateway.git 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - '7.0' 5 | - '7.1' 6 | - '7.2' 7 | - '7.3' 8 | 9 | services: 10 | - mysql 11 | 12 | before_install: 13 | - mysql -e 'CREATE DATABASE `card_test` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;' 14 | 15 | before_script: 16 | - curl -s http://getcomposer.org/installer | php 17 | - composer create-project 18 | - php -r "file_put_contents('.env', str_replace('your_db_name', 'card_test', str_replace('your_db_username', 'root', str_replace('your_db_password', '', file_get_contents('.env')))));" 19 | - php artisan migrate:fresh --seed -------------------------------------------------------------------------------- /.version: -------------------------------------------------------------------------------- 1 | {"version":"3.15","md5":"214ff9b7b87323b169bc4e4cf09f4c7c","url":"https:\/\/ghproxy.com\/https:\/\/github.com\/Tai7sy\/card-system\/releases\/download\/3.15\/card_release.tar.gz","description":"","data":{"version":"3.15","description":""}} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 card-system 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | <h1 align="center">CardSystem</h1> 2 | <p align="center"> 3 | <a href="https://github.com/Tai7sy/card-system/releases"><img src="https://img.shields.io/badge/version-3.15-blue.svg?style=flat-square" alt="License"></a> 4 | <img alt="PHP from Packagist badge" src="https://img.shields.io/badge/php-%3E%3D7.0.0-brightgreen.svg?style=flat-square"> 5 | <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat-square" alt="License"></a> 6 | <a href="https://app.travis-ci.com/github/Tai7sy/card-system"><img src="https://img.shields.io/travis/Tai7sy/card-system.svg?style=flat-square" alt="Travis"></a> 7 | <br><br> 8 | <a href="https://github.com/Tai7sy/card-system/wiki/1.-%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B%EF%BC%88%E5%AE%9D%E5%A1%94%E9%9D%A2%E6%9D%BF%EF%BC%89">安装文档</a> 9 | <a href="https://github.com/Tai7sy/card-system/wiki/2.-%E6%9B%B4%E6%96%B0%E6%95%99%E7%A8%8B">更新文档</a> 10 | </p> 11 | 12 | ## 介绍 13 | 14 | 一款高效安全的发卡平台。 15 | 16 | 支持的支付渠道: 17 | * 支付宝(电脑支付/手机支付/当面付/V2版即时到账/V4版高级手机网站支付) 18 | * 微信支付(扫码支付/H5支付/JSAPI支付) 19 | * QQ钱包 20 | * [商业版接口](https://www.anfaka.com/docs/api) 21 | * [CoinPayments](https://www.coinpayments.net/index.php?ref=f818644d99b71d425b556573a5a44313)(支持上千种数字货币) 22 | * Blockchain.com(BTC) 23 | * [MugglePay](https://github.com/Tai7sy/card-gateway/tree/master/Pay/MugglePay) 24 | * PayPal 25 | * 付呗 26 | * 有赞支付 27 | * 恒隆支付 28 | * PayJS 29 | * 黔贵金服 30 | * 云创支付 31 | * [码支付](http://api3.xiuxiu888.com/i/29417) 32 | * 即充宝/JCBPay 33 | * 吉易支付/JIPAYS 34 | * 思狐云支付/UigPay 35 | * 幻兮支付 36 | * [ZFBJK支付宝免签约辅助](http://www.zfbjk.com/show.asp?g=2&id=37214) 37 | * ... 38 | 39 | 更多请参考 [card-gateway](https://github.com/Tai7sy/card-gateway) 40 | 41 | 42 | ## 常见问题 43 | 44 | 请移步:[完整常见问题列表](https://github.com/Tai7sy/card-system/wiki/5.-%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98) 45 | -------------------------------------------------------------------------------- /app/Card.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Facades\DB; class Card extends Model { protected $guarded = array(); use SoftDeletes; protected $dates = array('deleted_at'); const STATUS_NORMAL = 0; const STATUS_SOLD = 1; const STATUS_USED = 2; const TYPE_ONETIME = 0; const TYPE_REPEAT = 1; function orders() { return $this->hasMany(Order::class); } function product() { return $this->belongsTo(Product::class); } function getCountAttribute() { return $this->count_all - $this->count_sold; } public static function add_cards($spe0b9a0, $sp5eed44, $spa8b0dd, $sp7acd11, $spbd612e, $sp51bf52) { DB::statement('call add_cards(?,?,?,?,?,?)', array($spe0b9a0, $sp5eed44, $spa8b0dd, $sp7acd11, $spbd612e, (int) $sp51bf52)); } public static function _trash($sp4210ad) { DB::transaction(function () use($sp4210ad) { $sp7c86af = clone $sp4210ad; $sp7c86af->selectRaw('`product_id`,SUM(`count_all`-`count_sold`) as `count_left`')->groupBy('product_id')->orderByRaw('`product_id`')->chunk(100, function ($sp880564) { foreach ($sp880564 as $spf67141) { $spfd49bd = \App\Product::where('id', $spf67141->product_id)->lockForUpdate()->first(); if ($spfd49bd) { $spfd49bd->count_all -= $spf67141->count_left; $spfd49bd->saveOrFail(); } } }); $sp4210ad->delete(); return true; }); } public static function _restore($sp4210ad) { DB::transaction(function () use($sp4210ad) { $sp7c86af = clone $sp4210ad; $sp7c86af->selectRaw('`product_id`,SUM(`count_all`-`count_sold`) as `count_left`')->groupBy('product_id')->orderByRaw('`product_id`')->chunk(100, function ($sp880564) { foreach ($sp880564 as $spf67141) { $spfd49bd = \App\Product::where('id', $spf67141->product_id)->lockForUpdate()->first(); if ($spfd49bd) { $spfd49bd->count_all += $spf67141->count_left; $spfd49bd->saveOrFail(); } } }); $sp4210ad->restore(); return true; }); } } -------------------------------------------------------------------------------- /app/CardOrder.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use Illuminate\Database\Eloquent\Model; class CardOrder extends Model { protected $table = 'card_order'; public $timestamps = false; function order() { return $this->belongsTo(Order::class); } function card() { return $this->belongsTo(Card::class)->withTrashed(); } } -------------------------------------------------------------------------------- /app/Category.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use App\Library\Helper; use Illuminate\Database\Eloquent\Model; class Category extends Model { protected $guarded = array(); function getUrlAttribute() { return config('app.url') . '/c/' . Helper::id_encode($this->id, Helper::ID_TYPE_CATEGORY); } function products() { return $this->hasMany(Product::class); } function user() { return $this->belongsTo(User::class); } function getTmpPassword() { return md5('$wGgMd45Jgi@dBDR' . $this->password . '1#DS2%!VLqJolmMD'); } function getProductsForShop() { $sp51e802 = Product::where('category_id', $this->id)->where('enabled', 1)->orderBy('sort')->get(); foreach ($sp51e802 as $spfd49bd) { $spfd49bd->setForShop($this->user); } $this->addVisible(array('products')); $this->setAttribute('products', $sp51e802); return $sp51e802; } } -------------------------------------------------------------------------------- /app/Console/Commands/ResetPassword.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Console\Commands; use Illuminate\Console\Command; class ResetPassword extends Command { protected $signature = 'reset:password {email} {password}'; protected $description = 'Reset the password of user 3 | Usage: php artisan reset:password user@email.com'; public function __construct() { parent::__construct(); } public function handle() { $sp625552 = $this->argument('email'); if (!$sp625552) { $this->warn('please input the user\'s email 4 | '); return false; } $spbfa519 = \App\User::where('email', $sp625552)->first(); if (!$spbfa519) { $this->warn("can't find the user: {$sp625552} \nplease input the user's email\n"); return false; } $sp02bf0b = $this->argument('password'); $spbfa519->password = bcrypt($sp02bf0b); $spbfa519->save(); $this->info("the password of '{$sp625552}' has been set to {$sp02bf0b}\n"); return true; } } -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Console; use App\System; use Carbon\Carbon; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Schema; class Kernel extends ConsoleKernel { protected $commands = array(); protected function schedule(Schedule $spad4e18) { if (!app()->runningInConsole()) { return; } try { System::_init(); } catch (\Throwable $spc22b6c) { return; } if (System::_getInt('order_clean_unpay_open') === 1) { $sp0d78d7 = System::_getInt('order_clean_unpay_day', 7); $spad4e18->call(function () use($sp0d78d7) { echo '[' . date('Y-m-d H:i:s') . "] cleaning unpaid orders({$sp0d78d7} days ago)...\n"; \App\Order::where('status', \App\Order::STATUS_UNPAY)->where('created_at', '<', (new Carbon())->addDays(-$sp0d78d7))->delete(); $spf12c49 = '[' . date('Y-m-d H:i:s') . '] unpaid-orders cleaned 3 | '; echo $spf12c49; })->dailyAt('01:00'); } $spad4e18->call(function () { $sp0d78d7 = 7; echo '[' . date('Y-m-d H:i:s') . "] cleaning deleted cards({$sp0d78d7} days ago)...\n"; \App\Card::onlyTrashed()->where('deleted_at', '<', (new Carbon())->addDays(-$sp0d78d7))->forceDelete(); $spf12c49 = '[' . date('Y-m-d H:i:s') . '] deleted-cards cleaned 4 | '; echo $spf12c49; })->dailyAt('02:00'); } protected function commands() { $this->load(__DIR__ . '/Commands'); require base_path('routes/console.php'); } } -------------------------------------------------------------------------------- /app/Coupon.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use Illuminate\Database\Eloquent\Model; class Coupon extends Model { protected $guarded = array(); const STATUS_NORMAL = 0; const STATUS_USED = 2; const TYPE_ONETIME = 0; const TYPE_REPEAT = 1; const DISCOUNT_TYPE_AMOUNT = 0; const DISCOUNT_TYPE_PERCENT = 1; function product() { return $this->belongsTo(Product::class); } function category() { return $this->belongsTo(Category::class); } } -------------------------------------------------------------------------------- /app/File.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use Illuminate\Database\Eloquent\Model; class File extends Model { protected $guarded = array(); public $timestamps = false; function deleteFile() { try { Storage::disk($this->driver)->delete($this->path); } catch (\Exception $spc22b6c) { \Log::error('File.deleteFile Error: ' . $spc22b6c->getMessage(), array('exception' => $spc22b6c)); } } public static function getProductFolder() { return 'images/product'; } } -------------------------------------------------------------------------------- /app/FundRecord.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use Illuminate\Database\Eloquent\Model; class FundRecord extends Model { protected $guarded = array(); const TYPE_IN = 1; const TYPE_OUT = 2; function order() { return $this->belongsTo(Order::class); } } -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/PayWay.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Controllers\Admin; use App\Library\Response; use Illuminate\Http\Request; use App\Http\Controllers\Controller; class PayWay extends Controller { function get(Request $sp62e4cd) { $sp295466 = (int) $sp62e4cd->input('current_page', 1); $spe5b040 = (int) $sp62e4cd->input('per_page', 20); $sp4210ad = \App\PayWay::orderBy('sort')->where('type', $sp62e4cd->input('type')); $spe0aaed = $sp62e4cd->input('search', false); $sp75c4d8 = $sp62e4cd->input('val', false); if ($spe0aaed && $sp75c4d8) { if ($spe0aaed == 'simple') { return Response::success($sp4210ad->get(array('id', 'name'))); } elseif ($spe0aaed == 'id') { $sp4210ad->where('id', $sp75c4d8); } else { $sp4210ad->where($spe0aaed, 'like', '%' . $sp75c4d8 . '%'); } } $sp3022f1 = $sp62e4cd->input('enabled'); if (strlen($sp3022f1)) { $sp4210ad->whereIn('enabled', explode(',', $sp3022f1)); } $sp6492f8 = $sp4210ad->paginate($spe5b040, array('*'), 'page', $sp295466); return Response::success($sp6492f8); } function edit(Request $sp62e4cd) { $this->validate($sp62e4cd, array('id' => 'required|integer', 'type' => 'required|integer|between:1,2', 'name' => 'required|string', 'sort' => 'required|integer', 'channels' => 'required|string', 'enabled' => 'required|integer|between:0,3')); $spdc31ea = (int) $sp62e4cd->post('id'); $sp6f0d0b = \App\PayWay::find($spdc31ea); if (!$sp6f0d0b) { if (\App\PayWay::where('name', $sp62e4cd->post('name'))->exists()) { return Response::fail('名称已经存在'); } $sp6f0d0b = new \App\PayWay(); } else { if (\App\PayWay::where('name', $sp62e4cd->post('name'))->where('id', '!=', $sp6f0d0b->id)->exists()) { return Response::fail('名称已经存在'); } } $sp6f0d0b->type = (int) $sp62e4cd->post('type'); $sp6f0d0b->name = $sp62e4cd->post('name'); $sp6f0d0b->sort = (int) $sp62e4cd->post('sort'); $sp6f0d0b->img = $sp62e4cd->post('img'); $sp6f0d0b->channels = @json_decode($sp62e4cd->post('channels')) ?? array(); $sp6f0d0b->comment = $sp62e4cd->post('comment'); $sp6f0d0b->enabled = (int) $sp62e4cd->post('enabled'); $sp6f0d0b->saveOrFail(); return Response::success(); } function enable(Request $sp62e4cd) { $this->validate($sp62e4cd, array('ids' => 'required|string', 'enabled' => 'required|integer|between:0,3')); $spb0cc9a = $sp62e4cd->post('ids'); $sp3022f1 = (int) $sp62e4cd->post('enabled'); \App\PayWay::whereIn('id', explode(',', $spb0cc9a))->update(array('enabled' => $sp3022f1)); return Response::success(); } function sort(Request $sp62e4cd) { $this->validate($sp62e4cd, array('id' => 'required|integer')); $spdc31ea = (int) $sp62e4cd->post('id'); $sp6f0d0b = \App\PayWay::findOrFail($spdc31ea); $sp6f0d0b->sort = (int) $sp62e4cd->post('sort'); $sp6f0d0b->save(); return Response::success(); } function delete(Request $sp62e4cd) { $this->validate($sp62e4cd, array('ids' => 'required|string')); $spb0cc9a = $sp62e4cd->post('ids'); \App\PayWay::whereIn('id', explode(',', $spb0cc9a))->delete(); return Response::success(); } } -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use App\Library\Helper; use App\Library\QQWry\QQWry; use App\Library\WeChat; use App\System; use Illuminate\Http\Request; use Illuminate\Foundation\Auth\ThrottlesLogins; use Illuminate\Http\Response; use Illuminate\Support\Facades\Auth; class LoginController extends Controller { use ThrottlesLogins; protected function username() { return 'email'; } public function login(Request $sp62e4cd) { $this->validate($sp62e4cd, array('email' => 'required|email', 'password' => 'required|string')); if (System::_getInt('vcode_login_admin') === 1) { $this->validateCaptcha($sp62e4cd); } if ($this->hasTooManyLoginAttempts($sp62e4cd)) { $this->fireLockoutEvent($sp62e4cd); $spba1daf = $this->limiter()->availableIn($this->throttleKey($sp62e4cd)); return response(array('message' => trans('auth.throttle', array('seconds' => $spba1daf))), Response::HTTP_BAD_REQUEST); } if ($sp97507d = Auth::attempt($sp62e4cd->only('email', 'password'))) { $spbfa519 = Auth::getUser(); $sp211d0e = Helper::getIP() ?? $sp62e4cd->ip(); $spbfa519->logs()->create(array('action' => \App\Log::ACTION_LOGIN, 'ip' => $sp211d0e, 'address' => (new QQWry())->getLocation($sp211d0e))); return response($this->getUserInfo()->getContent(), Response::HTTP_CREATED, array('Authorization' => 'Bearer ' . $sp97507d)); } LOGIN_FAILED: $this->incrementLoginAttempts($sp62e4cd); return response(array('message' => trans('auth.failed')), Response::HTTP_BAD_REQUEST); } public function getUserInfo() { $spbfa519 = Auth::getUser(); $spbfa519->addHidden(array('created_at', 'updated_at')); $spbfa519->append(array('last_login_at')); $spbfa519->setAttribute('shop_name', config('app.name')); $sp3e8d87 = array(); $sp3e8d87['user'] = $spbfa519; return response($sp3e8d87); } public function logout() { try { @Auth::logout(); } catch (\Throwable $spc22b6c) { } return response(array()); } } -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use Illuminate\Auth\Events\PasswordReset; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Password; class ResetPasswordController extends Controller { public function reset(Request $sp62e4cd) { $this->validate($sp62e4cd, array('token' => 'required', 'email' => 'required|email', 'password' => 'required|confirmed|min:6')); $sp3e8d87 = Password::broker()->reset($sp62e4cd->only('email', 'password', 'password_confirmation', 'token'), function ($spbfa519, $sp02bf0b) { $this->resetPassword($spbfa519, $sp02bf0b); }); return $sp3e8d87 == Password::PASSWORD_RESET ? response(array()) : response(array('message' => trans($sp3e8d87)), 400); } public function change(Request $sp62e4cd) { $this->validate($sp62e4cd, array('old' => 'required|string', 'password' => 'required|string|min:6|max:32|confirmed')); $spbfa519 = Auth::user(); if (!Hash::check($sp62e4cd->post('old'), $spbfa519->password)) { return response(array('message' => '旧密码错误,请检查'), Response::HTTP_BAD_REQUEST); } $sp97507d = $this->resetPassword($spbfa519, $sp62e4cd->post('password')); return response(array(), 200, array('Authorization' => 'Bearer ' . $sp97507d)); } public static function resetPassword($spbfa519, $sp02bf0b, $sp5fe632 = true) { $spbfa519->password = Hash::make($sp02bf0b); $spbfa519->setRememberToken(time()); $spbfa519->saveOrFail(); event(new PasswordReset($spbfa519)); if ($sp5fe632) { return Auth::login($spbfa519); } else { return true; } } } -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Controllers; use App\System; use App\Library\Geetest; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Http\Response; use Illuminate\Routing\Controller as BaseController; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; class Controller extends BaseController { use AuthorizesRequests, DispatchesJobs, ValidatesRequests; public function getCaptcha() { $spa5025d = System::_get('vcode_driver'); if ($spa5025d === 'code') { return response(array()); } elseif ($spa5025d === 'geetest') { return response(Geetest\API::get()); } elseif ($spa5025d === 'recaptcha') { } return response(array(), Response::HTTP_NOT_IMPLEMENTED); } function validateCaptcha(Request $sp62e4cd) { $spa5025d = System::_get('vcode_driver'); if ($spa5025d === 'code') { $this->validate($sp62e4cd, array('captcha.key' => 'required|string', 'captcha.code' => 'required|captcha_api:' . $sp62e4cd->input('captcha.key'))); } elseif ($spa5025d === 'geetest') { $this->validate($sp62e4cd, array('captcha.a' => 'required|string', 'captcha.b' => 'required|string', 'captcha.c' => 'required|string', 'captcha.d' => 'required|string')); if (!Geetest\API::verify($sp62e4cd->input('captcha.a'), $sp62e4cd->input('captcha.b'), $sp62e4cd->input('captcha.c'), $sp62e4cd->input('captcha.d'))) { throw \Illuminate\Validation\ValidationException::withMessages(array('captcha' => array(trans('validation.captcha')))); } } elseif ($spa5025d === 'recaptcha') { $this->validate($sp62e4cd, array('captcha.t' => 'required|string')); } } function authQuery(Request $sp62e4cd, $sp735a07, $sp9ba38c = 'user_id', $sp222510 = 'user_id') { return $sp735a07::where($sp9ba38c, \Auth::id()); } protected function getUserId(Request $sp62e4cd, $sp222510 = 'user_id') { return \Auth::id(); } protected function getUserIdOrFail(Request $sp62e4cd, $sp222510 = 'user_id') { $spe0b9a0 = self::getUserId($sp62e4cd, $sp222510); if ($spe0b9a0) { return $spe0b9a0; } else { throw new \Exception('参数缺少 ' . $sp222510); } } protected function getUser(Request $sp62e4cd) { return \Auth::getUser(); } protected function checkIsInMaintain() { if (System::_getInt('maintain') === 1) { $sp7f583f = System::_get('maintain_info'); echo view('message', array('title' => '维护中', 'message' => $sp7f583f)); die; } } protected function msg($spf12c49, $sp83454e = null, $sp9cf6e9 = null) { return view('message', array('message' => $spf12c49, 'title' => $sp83454e, 'exception' => $sp9cf6e9)); } } -------------------------------------------------------------------------------- /app/Http/Controllers/DevController.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Controllers; use App\System; use Illuminate\Http\Request; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Mail; class DevController extends Controller { private function check_readable_r($sp3ba2cd) { if (is_dir($sp3ba2cd)) { if (is_readable($sp3ba2cd)) { $spb2033b = scandir($sp3ba2cd); foreach ($spb2033b as $sp02ba10) { if ($sp02ba10 != '.' && $sp02ba10 != '..') { if (!self::check_readable_r($sp3ba2cd . '/' . $sp02ba10)) { return false; } else { continue; } } } echo $sp3ba2cd . ' ...... <span style="color: green">R</span><br>'; return true; } else { echo $sp3ba2cd . ' ...... <span style="color: red">R</span><br>'; return false; } } else { if (file_exists($sp3ba2cd)) { return is_readable($sp3ba2cd); } } echo $sp3ba2cd . ' ...... 文件不存在<br>'; return false; } private function check_writable_r($sp3ba2cd) { if (is_dir($sp3ba2cd)) { if (is_writable($sp3ba2cd)) { $spb2033b = scandir($sp3ba2cd); foreach ($spb2033b as $sp02ba10) { if ($sp02ba10 != '.' && $sp02ba10 != '..') { if (!self::check_writable_r($sp3ba2cd . '/' . $sp02ba10)) { return false; } else { continue; } } } echo $sp3ba2cd . ' ...... <span style="color: green">W</span><br>'; return true; } else { echo $sp3ba2cd . ' ...... <span style="color: red">W</span><br>'; return false; } } else { if (file_exists($sp3ba2cd)) { return is_writable($sp3ba2cd); } } echo $sp3ba2cd . ' ...... 文件不存在<br>'; return false; } private function checkPathPermission($spab6f31) { self::check_readable_r($spab6f31); self::check_writable_r($spab6f31); } public function install() { $sp8b277c = array(); @ob_start(); self::checkPathPermission(base_path('storage')); self::checkPathPermission(base_path('bootstrap/cache')); $sp8b277c['permission'] = @ob_get_clean(); return view('install', array('var' => $sp8b277c)); } public function test(Request $sp62e4cd) { } } -------------------------------------------------------------------------------- /app/Http/Controllers/IndexController.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Controllers; use App\System; use App\UserDomain; use Illuminate\Http\Request; class IndexController extends Controller { private $config = array(); function __construct() { $this->checkIsInMaintain(); $this->config = array('logo' => config('app.logo'), 'name' => config('app.name'), 'title' => config('app.title'), 'description' => config('app.description'), 'keywords' => config('app.keywords'), 'company' => config('app.company'), 'icp' => config('app.icp'), 'home_links' => System::_get('home_links'), 'js_tj' => System::_get('js_tj'), 'js_kf' => System::_get('js_kf')); } function docs() { return view('index.docs', array_merge($this->config, array())); } function docs_api() { return view('index.docs_api', array_merge($this->config, array())); } function help() { return view('index.help', array_merge($this->config, array())); } function about() { return view('index.about', array_merge($this->config, array())); } function legal_notice() { return view('index.legal_notice', array_merge($this->config, array())); } function forbid_product() { return view('index.forbid_product', array_merge($this->config, array())); } function tos() { return view('index.tos', array_merge($this->config, array())); } function privateAction() { return view('index.private', array_merge($this->config, array())); } } -------------------------------------------------------------------------------- /app/Http/Controllers/Merchant/Log.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Controllers\Merchant; use App\Library\Response; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Auth; class Log extends Controller { function get(Request $sp62e4cd) { $spe0b9a0 = $sp62e4cd->input('user_id'); $sp951406 = $sp62e4cd->input('action', \App\Log::ACTION_LOGIN); $sp4210ad = \App\Log::where('action', $sp951406); $sp4210ad->where('user_id', Auth::id()); $sp20bce8 = $sp62e4cd->input('start_at'); if (strlen($sp20bce8)) { $sp4210ad->where('created_at', '>=', $sp20bce8 . ' 00:00:00'); } $sp761637 = $sp62e4cd->input('end_at'); if (strlen($sp761637)) { $sp4210ad->where('created_at', '<=', $sp761637 . ' 23:59:59'); } $sp295466 = (int) $sp62e4cd->input('current_page', 1); $spe5b040 = (int) $sp62e4cd->input('per_page', 20); $sp6492f8 = $sp4210ad->orderBy('created_at', 'DESC')->paginate($spe5b040, array('*'), 'page', $sp295466); return Response::success($sp6492f8); } } -------------------------------------------------------------------------------- /app/Http/Controllers/Shop/Coupon.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Controllers\Shop; use App\Category; use App\Product; use App\Library\Response; use Carbon\Carbon; use Illuminate\Http\Request; use App\Http\Controllers\Controller; class Coupon extends Controller { function info(Request $sp62e4cd) { $sp93712d = (int) $sp62e4cd->post('category_id', -1); $sp5eed44 = (int) $sp62e4cd->post('product_id', -1); $sp0c6f4c = $sp62e4cd->post('coupon'); if (!$sp0c6f4c) { return Response::fail(trans('shop.coupon.required')); } if ($sp93712d > 0) { $sp1b7790 = Category::findOrFail($sp93712d); $spe0b9a0 = $sp1b7790->user_id; } elseif ($sp5eed44 > 0) { $spfd49bd = Product::findOrFail($sp5eed44); $spe0b9a0 = $spfd49bd->user_id; } else { return Response::fail(trans('shop.please_select_category_or_product')); } $sp6e252b = \App\Coupon::where('user_id', $spe0b9a0)->where('coupon', $sp0c6f4c)->where('expire_at', '>', Carbon::now())->whereRaw('`count_used`<`count_all`')->get(); foreach ($sp6e252b as $sp0c6f4c) { if ($sp0c6f4c->category_id === -1 || $sp0c6f4c->category_id === $sp93712d && ($sp0c6f4c->product_id === -1 || $sp0c6f4c->product_id === $sp5eed44)) { $sp0c6f4c->setVisible(array('discount_type', 'discount_val')); return Response::success($sp0c6f4c); } } return Response::fail(trans('shop.coupon.invalid')); } } -------------------------------------------------------------------------------- /app/Http/Controllers/Shop/Order.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Controllers\Shop; use App\System; use Carbon\Carbon; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Library\Response; use App\Library\Geetest; use Illuminate\Support\Facades\Cookie; class Order extends Controller { function get(Request $sp62e4cd) { if (\App\System::_getInt('vcode_shop_search') === 1) { $this->validateCaptcha($sp62e4cd); } $sp4210ad = \App\Order::where('created_at', '>=', (new Carbon())->addDay(-\App\System::_getInt('order_query_day', 30))); $spa8b0dd = $sp62e4cd->post('type', ''); if ($spa8b0dd === 'cookie') { $sp02ae43 = Cookie::get('customer'); if (strlen($sp02ae43) !== 32) { return Response::success(); } $sp4210ad->where('customer', $sp02ae43); } elseif ($spa8b0dd === 'order_no') { $sp592eb0 = $sp62e4cd->post('order_no', ''); if (strlen($sp592eb0) !== 19) { return Response::success(); } $sp4210ad->where('order_no', $sp592eb0); } elseif ($spa8b0dd === 'contact') { $sp0e200d = $sp62e4cd->post('contact', ''); if (strlen($sp0e200d) < 6) { return Response::success(); } $sp4210ad->where('contact', $sp0e200d); if (System::_getInt('order_query_password_open')) { $sp0f0e2a = $sp62e4cd->post('query_password', ''); if (strlen($sp0f0e2a) < 6) { return Response::success(); } $sp4210ad->where('query_password', $sp0f0e2a); } } else { return Response::fail(trans('shop.search_type.required')); } $sp33e83b = array('id', 'created_at', 'order_no', 'contact', 'status', 'send_status', 'count', 'paid'); if (1) { $sp33e83b[] = 'product_name'; $sp33e83b[] = 'contact'; $sp33e83b[] = 'contact_ext'; } $sp6492f8 = $sp4210ad->orderBy('id', 'DESC')->get($sp33e83b); $sp6755e6 = ''; return Response::success(array('list' => $sp6492f8, 'msg' => count($sp6492f8) ? $sp6755e6 : '')); } } -------------------------------------------------------------------------------- /app/Http/Controllers/Shop/Product.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Controllers\Shop; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Library\Response; class Product extends Controller { function get(Request $sp62e4cd) { $sp93712d = (int) $sp62e4cd->post('category_id'); if (!$sp93712d) { return Response::forbidden(trans('shop.category.required')); } $sp1b7790 = \App\Category::where('id', $sp93712d)->first(); if (!$sp1b7790) { return Response::forbidden(trans('shop.category.not_found')); } if ($sp1b7790->password_open && $sp62e4cd->post('password') !== $sp1b7790->password) { return Response::fail(trans('shop.category.password_error')); } $sp51e802 = \App\Product::where('category_id', $sp93712d)->where('enabled', 1)->orderBy('sort')->get(); foreach ($sp51e802 as $spfd49bd) { $spfd49bd->setForShop(); } return Response::success($sp51e802); } function verifyPassword(Request $sp62e4cd) { $sp5eed44 = (int) $sp62e4cd->post('product_id'); if (!$sp5eed44) { return Response::forbidden(trans('shop.product.required')); } $spfd49bd = \App\Product::where('id', $sp5eed44)->first(); if (!$spfd49bd) { return Response::forbidden(trans('shop.product.not_found')); } if ($spfd49bd->password_open && $sp62e4cd->post('password') !== $spfd49bd->password) { return Response::fail(trans('shop.product.password_error')); } return Response::success(); } } -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http; use Illuminate\Foundation\Http\Kernel as HttpKernel; class Kernel extends HttpKernel { protected $middleware = array(\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, \App\Http\Middleware\TrustProxies::class, \App\Http\Middleware\CORS::class); protected $middlewareGroups = array('web' => array(\Ken\BladeMinify\Middleware\Minify::class), 'api' => array('bindings')); protected $routeMiddleware = array('auth' => \Illuminate\Auth\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'auth.token' => \App\Http\Middleware\AuthenticateToken::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class); } -------------------------------------------------------------------------------- /app/Http/Middleware/AuthenticateToken.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Middleware; use Closure; use Illuminate\Auth\AuthenticationException; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Log; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; use Tymon\JWTAuth\Exceptions\JWTException; use Tymon\JWTAuth\Http\Middleware\BaseMiddleware; use Tymon\JWTAuth\Exceptions\TokenExpiredException; class AuthenticateToken extends BaseMiddleware { private function checkTokenTime() { $spbfa519 = $this->auth->user(); $sp6d6c78 = $this->auth->manager()->getPayloadFactory()->buildClaimsCollection()->get('iat')->getValue(); if ($sp6d6c78 < $spbfa519->remember_token) { return false; } return true; } public function handle($sp62e4cd, Closure $sp530731) { if (is_string($sp62e4cd->query('token'))) { $sp62e4cd->headers->set('Authorization', $sp62e4cd->query('token')); } $this->checkForToken($sp62e4cd); try { if ($this->auth->parseToken()->authenticate()) { if ($this->checkTokenTime()) { return $sp530731($sp62e4cd); } else { throw new UnauthorizedHttpException('jwt-auth', 'Token invalid'); } } else { throw new UnauthorizedHttpException('jwt-auth', 'User not found'); } } catch (TokenExpiredException $sp9cf6e9) { try { $sp97507d = $this->auth->refresh(); Auth::onceUsingId($this->auth->manager()->getPayloadFactory()->buildClaimsCollection()->get('sub')->getValue()); if ($this->checkTokenTime()) { return $this->setAuthenticationHeader($sp530731($sp62e4cd), $sp97507d); } else { throw new UnauthorizedHttpException('jwt-auth', 'Token invalid'); } } catch (JWTException $sp9cf6e9) { throw new UnauthorizedHttpException('jwt-auth', $sp9cf6e9->getMessage()); } } catch (JWTException $sp9cf6e9) { throw new UnauthorizedHttpException('jwt-auth', $sp9cf6e9->getMessage()); } } } -------------------------------------------------------------------------------- /app/Http/Middleware/CORS.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Middleware; use Closure; class CORS { public function handle($sp62e4cd, Closure $sp530731) { if (config('app.debug')) { $spcb575a = array('Access-Control-Allow-Origin' => $sp62e4cd->header('Origin'), 'Access-Control-Allow-Methods' => 'POST, GET, OPTIONS, PUT, DELETE', 'Access-Control-Allow-Headers' => 'Content-Type, Accept, Authorization, Cookie, X-Requested-With, X-XSRF-TOKEN', 'Access-Control-Allow-Credentials' => 'true'); if ($sp62e4cd->isMethod('OPTIONS')) { return response()->make('', 200, $spcb575a); } $sp3e8d87 = $sp530731($sp62e4cd); foreach ($spcb575a as $sp308327 => $spa60c0f) { $sp3e8d87->headers->set($sp308327, $spa60c0f); } return $sp3e8d87; } return $sp530731($sp62e4cd); } } -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Middleware; use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; class EncryptCookies extends Middleware { protected $except = array('customer'); } -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Middleware; use Closure; use Illuminate\Support\Facades\Auth; class RedirectIfAuthenticated { public function handle($sp62e4cd, Closure $sp530731, $sp92e029 = null) { if (Auth::guard($sp92e029)->check()) { return redirect('/home'); } return $sp530731($sp62e4cd); } } -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware; class TrimStrings extends Middleware { protected $except = array('password', 'password_confirmation'); } -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Middleware; use Illuminate\Http\Request; use Fideloper\Proxy\TrustProxies as Middleware; class TrustProxies extends Middleware { protected $proxies = array(); protected $headers = array(Request::HEADER_FORWARDED => 'FORWARDED', Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO'); } -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; class VerifyCsrfToken extends Middleware { protected $except = array('/wechat/callback'); } -------------------------------------------------------------------------------- /app/Jobs/OrderSms.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Jobs; use App\Library\CurlRequest; use App\System; use Illuminate\Bus\Queueable; use Illuminate\Queue\SerializesModels; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; class OrderSms implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; private $mobile = null; private $order = null; public function __construct($sp75a7e2, $sp63ddab) { $this->mobile = $sp75a7e2; $this->order = $sp63ddab; } public function handle() { CurlRequest::post('https://api.his.cat/api/sms/send', http_build_query(array('id' => System::_get('sms_api_id'), 'key' => System::_get('sms_api_key'), 'to' => $this->mobile, 'msg' => config('app.url') . '/pay/result/' . $this->order->order_no))); } } -------------------------------------------------------------------------------- /app/Library/Geetest/API.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Library\Geetest; use App\Library\Helper; use Hashids\Hashids; use Illuminate\Support\Facades\Session; class API { private $geetest_conf = null; public function __construct($spc03b6e) { $this->geetest_conf = $spc03b6e; } public static function get() { $spdc31ea = config('services.geetest.id'); $sp308327 = config('services.geetest.key'); if (!strlen($spdc31ea) || !strlen($sp308327)) { return array('message' => 'geetest error: no config'); } $spe53c83 = new Lib($spdc31ea, $sp308327); $spe0b9a0 = time() . rand(1, 10000); $sp04ef3f = $spe53c83->pre_process($spe0b9a0); $spa59707 = json_decode($spe53c83->get_response_str(), true); $spa59707['key'] = Helper::id_encode($spe0b9a0, 3566, $sp04ef3f); return $spa59707; } public static function verify($spb2ad6a, $sp8ad0c0, $sp6fc388, $sp3e18de) { $spe53c83 = new Lib(config('services.geetest.id'), config('services.geetest.key')); Helper::id_decode($spb2ad6a, 3566, $sp12894d); $spe0b9a0 = $sp12894d[1]; $sp04ef3f = $sp12894d[4]; if ($sp04ef3f === 1) { $spae8ac8 = $spe53c83->success_validate($sp8ad0c0, $sp6fc388, $sp3e18de, $spe0b9a0); if ($spae8ac8) { return true; } else { return false; } } else { if ($spe53c83->fail_validate($sp8ad0c0, $sp6fc388, $sp3e18de)) { return true; } else { return false; } } } } -------------------------------------------------------------------------------- /app/Library/LogHelper.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Library; use Illuminate\Support\Facades\Log; class LogHelper { public static function setLogFile($spbef6b3) { Log::getMonolog()->setHandlers(array()); Log::useDailyFiles(storage_path(DIRECTORY_SEPARATOR . 'logs' . DIRECTORY_SEPARATOR . $spbef6b3 . '_' . php_sapi_name() . '.log'), 0, config('app.log_level')); } } -------------------------------------------------------------------------------- /app/Library/Response.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Library; class Response { public static function json($spfe8869 = array(), $sp7acd11 = 200, array $spcb575a = array(), $spb6ee65 = 0) { return response()->json($spfe8869, $sp7acd11, $spcb575a, $spb6ee65); } public static function success($spfe8869 = array()) { return self::json(array('message' => 'success', 'data' => $spfe8869)); } public static function fail($spfb9499 = 'fail', $spfe8869 = array()) { return self::json(array('message' => $spfb9499, 'data' => $spfe8869), 500); } public static function forbidden($spfb9499 = 'forbidden', $spfe8869 = array()) { return self::json(array('message' => $spfb9499, 'data' => $spfe8869), 403); } } -------------------------------------------------------------------------------- /app/Log.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use Illuminate\Database\Eloquent\Model; class Log extends Model { protected $guarded = array(); const ACTION_LOGIN = 0; public $timestamps = false; } -------------------------------------------------------------------------------- /app/Mail/OrderShipped.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Mail; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; use Illuminate\Contracts\Queue\ShouldQueue; class OrderShipped extends Mailable { use Queueable, SerializesModels; public $tries = 3; public $timeout = 20; public $order_no; public $order_url; public $card_msg; public $cards_txt; public function __construct($sp63ddab, $sp62536c, $sp148704) { $this->order_no = $sp63ddab->order_no; $this->order_url = config('app.url') . route('pay.result', array($sp63ddab->order_no), false); $this->card_msg = $sp62536c; $this->cards_txt = $sp148704; } public function build() { return $this->subject('订单提醒(#' . $this->order_no . ')-' . config('app.name'))->view('emails.order'); } } -------------------------------------------------------------------------------- /app/Mail/ProductCountWarn.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Mail; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; use Illuminate\Contracts\Queue\ShouldQueue; class ProductCountWarn extends Mailable { use Queueable, SerializesModels; public $tries = 3; public $timeout = 20; public $product = null; public $product_count = null; public function __construct($spfd49bd, $spf0b848) { $this->product = $spfd49bd; $this->product_count = $spf0b848; } public function build() { return $this->subject('您的商品库存不足-' . config('app.name'))->view('emails.product_count_warn'); } } -------------------------------------------------------------------------------- /app/Mail/Test.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Mail; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; use Illuminate\Contracts\Queue\ShouldQueue; class Test extends Mailable { use Queueable, SerializesModels; public $tries = 3; public $timeout = 20; public function __construct() { } public function build() { return $this->subject(config('app.name') . '-测试邮件')->view('emails.test'); } } -------------------------------------------------------------------------------- /app/Model_.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use Illuminate\Database\Eloquent\Model; class Model_ extends Model { } -------------------------------------------------------------------------------- /app/Pay.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Cache; class Pay extends Model { protected $guarded = array(); public static function gets() { return Cache::remember('model.pays', 10, function () { return self::query()->get(); }); } public static function flushCache() { Cache::forget('model.pays'); } protected static function boot() { parent::boot(); static::updated(function () { self::flushCache(); }); static::created(function () { self::flushCache(); }); static::deleted(function () { self::flushCache(); }); } } -------------------------------------------------------------------------------- /app/PayWay.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use App\Library\Helper; use Illuminate\Database\Eloquent\Model; class PayWay extends Model { protected $guarded = array(); protected $casts = array('channels' => 'array'); const ENABLED_DISABLED = 0; const ENABLED_PC = 1; const ENABLED_MOBILE = 2; const ENABLED_ALL = 3; const TYPE_SHOP = 1; const TYPE_API = 2; public function getPayByWeight() { $sp951cdc = $sp2a5b17 = 0; $sp03525f = array(); $spb0cc9a = array(); foreach ($this->channels as $spf1bfa9) { $spb0cc9a[] = intval($spf1bfa9[0]); } $spc35bd5 = \App\Pay::gets()->filter(function ($sp9a29e9) use($spb0cc9a) { return in_array($sp9a29e9->id, $spb0cc9a); }); $spffafb1 = array(); foreach ($spc35bd5 as $spb3a6bf) { $spffafb1[$spb3a6bf->id] = $spb3a6bf; } foreach ($this->channels as $spf1bfa9) { $sp9208ec = intval($spf1bfa9[0]); $sp339be4 = intval($spf1bfa9[1]); if ($sp339be4 && isset($spffafb1[$sp9208ec]) && $spffafb1[$sp9208ec]->enabled > 0) { $sp951cdc += $sp339be4; $spf52f26 = $sp2a5b17 + $sp339be4; $sp03525f[] = array('min' => $sp2a5b17, 'max' => $spf52f26, 'pay_id' => $sp9208ec); $sp2a5b17 = $spf52f26; } } if ($sp951cdc <= 0) { return null; } $spb3ada3 = mt_rand(0, $sp951cdc - 1); foreach ($sp03525f as $spf366de) { if ($spf366de['min'] <= $spb3ada3 && $spb3ada3 < $spf366de['max']) { return $spffafb1[$spf366de['pay_id']]; } } return null; } public static function gets($spbfa519, $sp5b92ec = null) { $sp4210ad = self::query(); if ($sp5b92ec !== null) { $sp4210ad->where($sp5b92ec); } $sp1db360 = $sp4210ad->orderBy('sort')->get(array('name', 'img', 'channels')); $spbadaff = array(); foreach ($sp1db360 as $spcc50ed) { $sp9a29e9 = $spcc50ed->getPayByWeight(); if ($sp9a29e9) { $sp9a29e9->setAttribute('name', $spcc50ed->name); $sp9a29e9->setAttribute('img', $spcc50ed->img); $sp9a29e9->setVisible(array('id', 'name', 'img', 'fee')); $spbadaff[] = $sp9a29e9; } } return $spbadaff; } } -------------------------------------------------------------------------------- /app/Policies/UserPolicy.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Policies; use App\User; use Illuminate\Auth\Access\HandlesAuthorization; class UserPolicy { use HandlesAuthorization; public function __construct() { } public function admin($spbfa519) { } public function merchant($spbfa519) { } public function before($spbfa519, $sp50698b) { return true; } } -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Providers; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { public function boot() { \App\Library\LogHelper::setLogFile('card'); } public function register() { } } -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Providers; use Illuminate\Support\Facades\Gate; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; class AuthServiceProvider extends ServiceProvider { protected $policies = array('App\\Model' => 'App\\Policies\\ModelPolicy', 'App\\User' => 'App\\Policies\\UserPolicy'); public function boot() { $this->registerPolicies(); } } -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Providers; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\Broadcast; class BroadcastServiceProvider extends ServiceProvider { public function boot() { Broadcast::routes(); require base_path('routes/channels.php'); } } -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Providers; use Illuminate\Support\Facades\Event; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; class EventServiceProvider extends ServiceProvider { protected $listen = array('App\\Events\\Event' => array('App\\Listeners\\EventListener')); public function boot() { parent::boot(); } } -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App\Providers; use Illuminate\Support\Facades\Route; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; class RouteServiceProvider extends ServiceProvider { protected $namespace = 'App\\Http\\Controllers'; public function boot() { parent::boot(); } public function map() { $this->mapApiRoutes(); $this->mapWebRoutes(); } protected function mapWebRoutes() { Route::middleware('web')->namespace($this->namespace)->group(base_path('routes/web.php')); } protected function mapApiRoutes() { Route::prefix('api')->middleware('api')->namespace($this->namespace)->group(base_path('routes/api.php')); } } -------------------------------------------------------------------------------- /app/ShopTheme.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use Illuminate\Database\Eloquent\Model; class ShopTheme extends Model { protected $guarded = array(); public $timestamps = false; protected $casts = array('options' => 'array', 'config' => 'array'); private static $default_theme; public static function defaultTheme() { if (!static::$default_theme) { static::$default_theme = ShopTheme::query()->where('name', \App\System::_get('shop_theme_default', 'Material'))->first(); if (!static::$default_theme) { static::$default_theme = ShopTheme::query()->firstOrFail(); } } return static::$default_theme; } public static function freshList() { $spab6f31 = realpath(app_path('..' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'shop_theme')); \App\ShopTheme::query()->get()->each(function ($sp2307ff) use($spab6f31) { if (!file_exists($spab6f31 . DIRECTORY_SEPARATOR . $sp2307ff->name . DIRECTORY_SEPARATOR . 'config.php')) { $sp2307ff->delete(); } }); foreach (scandir($spab6f31) as $sp13204e) { if ($sp13204e === '.' || $sp13204e === '..') { continue; } try { @($sp2307ff = (include $spab6f31 . DIRECTORY_SEPARATOR . $sp13204e . DIRECTORY_SEPARATOR . 'config.php')); } catch (\Exception $spc22b6c) { continue; } $sp2307ff['config'] = array_map(function ($spf1bfa9) { return $spf1bfa9['value']; }, @$sp2307ff['options'] ?? array()); $spdbdd55 = \App\ShopTheme::query()->where('name', $sp13204e)->first(); if ($spdbdd55) { $spdbdd55->description = $sp2307ff['description']; $spdbdd55->options = @$sp2307ff['options'] ?? array(); $spdbdd55->config = ($spdbdd55->config ?? array()) + $sp2307ff['config']; $spdbdd55->saveOrFail(); } else { if ($sp2307ff && isset($sp2307ff['description'])) { \App\ShopTheme::query()->create(array('name' => $sp13204e, 'description' => $sp2307ff['description'], 'options' => @$sp2307ff['options'] ?? array(), 'config' => $sp2307ff['config'])); } } } } } -------------------------------------------------------------------------------- /app/System.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Log; class System extends Model { protected $guarded = array(); private static $systems = array(); public static function _init() { static::$systems = Cache::remember('settings.all', 10, function () { $sped3522 = self::query()->get()->toArray(); foreach ($sped3522 as $sp0e8834) { static::$systems[$sp0e8834['name']] = $sp0e8834['value']; } return static::$systems; }); static::$systems['_initialized'] = true; } public static function _get($spb54a76, $sp70cfab = NULL) { if (!isset(static::$systems['_initialized'])) { static::_init(); } if (isset(static::$systems[$spb54a76])) { return static::$systems[$spb54a76]; } return $sp70cfab; } public static function _getInt($spb54a76, $sp70cfab = NULL) { return (int) static::_get($spb54a76, $sp70cfab); } public static function _set($spb54a76, $spa60c0f) { static::$systems[$spb54a76] = $spa60c0f; $spb83345 = System::query()->where('name', $spb54a76)->first(); if ($spb83345) { $spb83345->value = $spa60c0f; $spb83345->save(); } else { try { System::query()->create(array('name' => $spb54a76, 'value' => $spa60c0f)); } catch (\Exception $spc22b6c) { } } self::flushCache(); } public static function flushCache() { Cache::forget('settings.all'); } protected static function boot() { parent::boot(); static::updated(function () { self::flushCache(); }); static::created(function () { self::flushCache(); }); static::deleted(function () { self::flushCache(); }); } } -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | <?php 2 | namespace App; use Carbon\Carbon; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; use Tymon\JWTAuth\Contracts\JWTSubject; class User extends Authenticatable implements JWTSubject { use Notifiable; protected $guarded = array(); protected $hidden = array('password', 'remember_token'); protected $appends = array('m_balance', 'role'); protected $casts = array('theme_config' => 'array'); const ID_CUSTOMER = -1; const INVENTORY_RANGE = 0; const INVENTORY_REAL = 1; const INVENTORY_AUTO = 2; const FEE_TYPE_MERCHANT = 0; const FEE_TYPE_CUSTOMER = 1; const FEE_TYPE_AUTO = 2; const STATUS_OK = 0; const STATUS_FROZEN = 1; public function getJWTIdentifier() { return $this->getKey(); } public function getJWTCustomClaims() { return array(); } public function sendPasswordResetNotification($sp97507d) { throw new \Exception('unimplemented in free version'); } function getMBalanceAttribute() { return $this->m_all - $this->m_paid - $this->m_frozen; } function getRoleAttribute() { return 'admin'; } function getMBalanceWithoutTodayAttribute() { $spe4e277 = (int) \App\Order::where('user_id', $this->user_id)->where('status', \App\Order::STATUS_SUCCESS)->whereDate('paid_at', Carbon::today())->sum('income'); return $this->m_all - $this->m_paid - $this->m_frozen - $spe4e277; } function getShopThemeAttribute() { if ($this->theme_config && isset($this->theme_config['theme'])) { $spa59707 = \App\ShopTheme::whereName($this->theme_config['theme'])->first(); if ($spa59707) { return $spa59707; } } return \App\ShopTheme::defaultTheme(); } function getLastLoginAtAttribute() { $spf008a0 = $this->logs()->where('action', \App\Log::ACTION_LOGIN)->orderBy('id', 'DESC')->first(); return $spf008a0 ? $spf008a0->address ?? $spf008a0->ip : null; } function categories() { return $this->hasMany(Category::class); } function products() { return $this->hasMany(Product::class); } function cards() { return $this->hasMany(Card::class); } function orders() { return $this->hasMany(Order::class); } function coupons() { return $this->hasMany(Coupon::class); } function logs() { return $this->hasMany(Log::class); } function shop_theme() { return $this->belongsTo(ShopTheme::class); } } -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | <?php 3 | 4 | define('LARAVEL_START', microtime(true)); 5 | 6 | /* 7 | |-------------------------------------------------------------------------- 8 | | Register The Auto Loader 9 | |-------------------------------------------------------------------------- 10 | | 11 | | Composer provides a convenient, automatically generated class loader 12 | | for our application. We just need to utilize it! We'll require it 13 | | into the script here so that we do not have to worry about the 14 | | loading of any our classes "manually". Feels great to relax. 15 | | 16 | */ 17 | 18 | require __DIR__.'/vendor/autoload.php'; 19 | 20 | $app = require_once __DIR__.'/bootstrap/app.php'; 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Run The Artisan Application 25 | |-------------------------------------------------------------------------- 26 | | 27 | | When we run the console application, the current CLI command will be 28 | | executed in this console and the response sent back to a terminal 29 | | or another output device for the developers. Here goes nothing! 30 | | 31 | */ 32 | 33 | $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Create The Application 6 | |-------------------------------------------------------------------------- 7 | | 8 | | The first thing we will do is create a new Laravel application instance 9 | | which serves as the "glue" for all the components of Laravel, and is 10 | | the IoC container for the system binding all of the various parts. 11 | | 12 | */ 13 | 14 | $app = new Illuminate\Foundation\Application( 15 | realpath(__DIR__.'/../') 16 | ); 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Bind Important Interfaces 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Next, we need to bind some important interfaces into the container so 24 | | we will be able to resolve them when needed. The kernels serve the 25 | | incoming requests to this application from both the web and CLI. 26 | | 27 | */ 28 | 29 | $app->singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/packages.php: -------------------------------------------------------------------------------- 1 | <?php return array ( 2 | 'barryvdh/laravel-ide-helper' => 3 | array ( 4 | 'providers' => 5 | array ( 6 | 0 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', 7 | ), 8 | ), 9 | 'fideloper/proxy' => 10 | array ( 11 | 'providers' => 12 | array ( 13 | 0 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider', 14 | ), 15 | ), 16 | 'jacobcyl/ali-oss-storage' => 17 | array ( 18 | 'providers' => 19 | array ( 20 | 0 => 'Jacobcyl\\AliOSS\\AliOssServiceProvider', 21 | ), 22 | ), 23 | 'ken/blade-minify' => 24 | array ( 25 | 'providers' => 26 | array ( 27 | 0 => 'Ken\\BladeMinify\\ServiceProvider', 28 | ), 29 | ), 30 | 'laravel/tinker' => 31 | array ( 32 | 'providers' => 33 | array ( 34 | 0 => 'Laravel\\Tinker\\TinkerServiceProvider', 35 | ), 36 | ), 37 | 'mews/captcha' => 38 | array ( 39 | 'providers' => 40 | array ( 41 | 0 => 'Mews\\Captcha\\CaptchaServiceProvider', 42 | ), 43 | 'aliases' => 44 | array ( 45 | 'Captcha' => 'Mews\\Captcha\\Facades\\Captcha', 46 | ), 47 | ), 48 | 'naux/sendcloud' => 49 | array ( 50 | 'providers' => 51 | array ( 52 | 0 => 'Naux\\Mail\\SendCloudServiceProvider', 53 | ), 54 | ), 55 | 'nesbot/carbon' => 56 | array ( 57 | 'providers' => 58 | array ( 59 | 0 => 'Carbon\\Laravel\\ServiceProvider', 60 | ), 61 | ), 62 | 'rap2hpoutre/laravel-log-viewer' => 63 | array ( 64 | 'providers' => 65 | array ( 66 | 0 => 'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider', 67 | ), 68 | ), 69 | 'tymon/jwt-auth' => 70 | array ( 71 | 'aliases' => 72 | array ( 73 | 'JWTAuth' => 'Tymon\\JWTAuth\\Facades\\JWTAuth', 74 | 'JWTFactory' => 'Tymon\\JWTAuth\\Facades\\JWTFactory', 75 | ), 76 | 'providers' => 77 | array ( 78 | 0 => 'Tymon\\JWTAuth\\Providers\\LaravelServiceProvider', 79 | ), 80 | ), 81 | 'zgldh/qiniu-laravel-storage' => 82 | array ( 83 | 'providers' => 84 | array ( 85 | 0 => 'zgldh\\QiniuStorage\\QiniuFilesystemServiceProvider', 86 | ), 87 | ), 88 | 'intervention/image' => 89 | array ( 90 | 'providers' => 91 | array ( 92 | 0 => 'Intervention\\Image\\ImageServiceProvider', 93 | ), 94 | 'aliases' => 95 | array ( 96 | 'Image' => 'Intervention\\Image\\Facades\\Image', 97 | ), 98 | ), 99 | ); -------------------------------------------------------------------------------- /bootstrap/cache/test.txt: -------------------------------------------------------------------------------- 1 | ignore me -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tai7sy/card-system", 3 | "description": "card system free", 4 | "keywords": [ 5 | "card system free" 6 | ], 7 | "license": "MIT", 8 | "type": "project", 9 | "require": { 10 | "php": ">=7.0.0", 11 | "ext-curl": "*", 12 | "ext-dom": "*", 13 | "ext-json": "*", 14 | "ext-libxml": "*", 15 | "ext-simplexml": "*", 16 | "barryvdh/laravel-ide-helper": "^2.4", 17 | "doctrine/dbal": "~2.3", 18 | "fideloper/proxy": "~3.3", 19 | "hashids/hashids": "2.0.4", 20 | "jacobcyl/ali-oss-storage": "dev-master", 21 | "ken/blade-minify": "^1.0", 22 | "laravel/framework": "5.5.*", 23 | "laravel/tinker": "~1.0", 24 | "lcobucci/jwt": "3.3.3", 25 | "mews/captcha": "^2.3", 26 | "naux/sendcloud": "^1.1", 27 | "predis/predis": "^1.0", 28 | "rap2hpoutre/laravel-log-viewer": "^0.13.0", 29 | "tymon/jwt-auth": "1.0.0-rc.5", 30 | "voku/anti-xss": "4.0.1", 31 | "wi1dcard/alipay-sdk": "^1.3", 32 | "zgldh/qiniu-laravel-storage": "^0.9.2" 33 | }, 34 | "require-dev": { 35 | "fzaninotto/faker": "~1.4", 36 | "filp/whoops": "~2.0", 37 | "mockery/mockery": "~1.0", 38 | "phpunit/phpunit": "~6.0" 39 | }, 40 | "autoload": { 41 | "classmap": [ 42 | "database/seeds", 43 | "database/factories" 44 | ], 45 | "psr-4": { 46 | "App\\": "app/", 47 | "Gateway\\": "app/Library/Gateway/" 48 | } 49 | }, 50 | "autoload-dev": { 51 | "psr-4": { 52 | "Tests\\": "tests/" 53 | } 54 | }, 55 | "extra": { 56 | "laravel": { 57 | "dont-discover": [ 58 | ] 59 | } 60 | }, 61 | "scripts": { 62 | "post-root-package-install": [ 63 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 64 | ], 65 | "post-create-project-cmd": [ 66 | "@php artisan key:generate" 67 | ], 68 | "post-autoload-dump": [ 69 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 70 | "@php artisan package:discover" 71 | ], 72 | "post-update-cmd": [ 73 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", 74 | "php artisan optimize" 75 | ] 76 | }, 77 | "config": { 78 | "preferred-install": "dist", 79 | "sort-packages": true, 80 | "optimize-autoloader": true 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Default Broadcaster 8 | |-------------------------------------------------------------------------- 9 | | 10 | | This option controls the default broadcaster that will be used by the 11 | | framework when an event needs to be broadcast. You may set this to 12 | | any of the connections defined in the "connections" array below. 13 | | 14 | | Supported: "pusher", "redis", "log", "null" 15 | | 16 | */ 17 | 18 | 'default' => env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | // 40 | ], 41 | ], 42 | 43 | 'redis' => [ 44 | 'driver' => 'redis', 45 | 'connection' => 'default', 46 | ], 47 | 48 | 'log' => [ 49 | 'driver' => 'log', 50 | ], 51 | 52 | 'null' => [ 53 | 'driver' => 'null', 54 | ], 55 | 56 | ], 57 | 58 | ]; 59 | -------------------------------------------------------------------------------- /config/captcha.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 'characters' => ['2', '3', '4', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'm', 'n', 'p', 'q', 'r', 't', 'u', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'M', 'N', 'P', 'Q', 'R', 'T', 'U', 'X', 'Y', 'Z'], 5 | 'default' => [ 6 | 'length' => 5, 7 | 'width' => 120, 8 | 'height' => 36, 9 | 'quality' => 90, 10 | 'math' => false, 11 | ], 12 | 13 | /* 14 | 'math' => [ 15 | 'length' => 9, 16 | 'width' => 120, 17 | 'height' => 36, 18 | 'quality' => 90, 19 | 'math' => true, 20 | ], 21 | 22 | 'flat' => [ 23 | 'length' => 6, 24 | 'width' => 160, 25 | 'height' => 46, 26 | 'quality' => 90, 27 | 'lines' => 6, 28 | 'bgImage' => false, 29 | 'bgColor' => '#ecf2f4', 30 | 'fontColors' => ['#2c3e50', '#c0392b', '#16a085', '#c0392b', '#8e44ad', '#303f9f', '#f57c00', '#795548'], 31 | 'contrast' => -5, 32 | ], 33 | 'mini' => [ 34 | 'length' => 3, 35 | 'width' => 60, 36 | 'height' => 32, 37 | ], 38 | 'inverse' => [ 39 | 'length' => 5, 40 | 'width' => 120, 41 | 'height' => 36, 42 | 'quality' => 90, 43 | 'sensitive' => true, 44 | 'angle' => 12, 45 | 'sharpen' => 10, 46 | 'blur' => 2, 47 | 'invert' => true, 48 | 'contrast' => -5, 49 | ] 50 | */ 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Default Queue Driver 8 | |-------------------------------------------------------------------------- 9 | | 10 | | Laravel's queue API supports an assortment of back-ends via a single 11 | | API, giving you convenient access to each back-end using the same 12 | | syntax for each one. Here you may set the default queue driver. 13 | | 14 | | Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null" 15 | | 16 | */ 17 | 18 | 'default' => env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => env('SQS_KEY', 'your-public-key'), 54 | 'secret' => env('SQS_SECRET', 'your-secret-key'), 55 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 56 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 57 | 'region' => env('SQS_REGION', 'us-east-1'), 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 90, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Third Party Services 8 | |-------------------------------------------------------------------------- 9 | | 10 | | This file is for storing the credentials for third party services such 11 | | as Stripe, Mailgun, SparkPost and others. This file provides a sane 12 | | default location for this type of information, allowing packages 13 | | to have a conventional place to find your various credentials. 14 | | 15 | */ 16 | 17 | 'mailgun' => [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | 'geetest' => [ 39 | 'id' => env('GEETEST_ID'), 40 | 'key' => env('GEETEST_KEY'), 41 | ], 42 | 43 | ]; 44 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | View Storage Paths 8 | |-------------------------------------------------------------------------- 9 | | 10 | | Most templating systems load templates from disk. Here you may specify 11 | | an array of paths that should be checked for your views. Of course 12 | | the usual Laravel view path has already been registered for you. 13 | | 14 | */ 15 | 16 | 'paths' => [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/OrderFactory.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Faker\Generator as Faker; 4 | 5 | $factory->define(App\Order::class, function (Faker $faker) { 6 | $order_no = date('YmdHis') . mt_rand(10000, 99999); 7 | while (\App\Order::whereOrderNo($order_no)->exists()) { 8 | $order_no = date('YmdHis') . mt_rand(10000, 99999); 9 | } 10 | 11 | $email = random_int(0,1) ? $faker->email : 'user01@qq.com'; 12 | 13 | $price = 1000; 14 | $discount = random_int(0,1) * 100; 15 | $paid = $price - $discount; 16 | return [ 17 | 'user_id' => 2, 18 | 'order_no' => $order_no, 19 | 'product_id' => 1, 20 | 'count' => 1 21 | ]; 22 | }); -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreateUsersTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('users', function (Blueprint $table) { 17 | $table->increments('id'); 18 | $table->string('email', 100)->unique(); 19 | $table->string('mobile')->nullable(); 20 | $table->string('password', 100); 21 | 22 | $table->integer('m_paid')->default(0); 23 | $table->integer('m_frozen')->default(0); 24 | $table->integer('m_all')->default(0); 25 | 26 | $table->rememberToken(); 27 | $table->timestamps(); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::dropIfExists('users'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreatePasswordResetsTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('password_resets', function (Blueprint $table) { 17 | $table->string('email', 128)->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2017_12_23_223031_create_categories_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreateCategoriesTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('categories', function (Blueprint $table) { 17 | $table->increments('id'); 18 | $table->integer('user_id')->index(); 19 | $table->text('name'); 20 | $table->integer('sort')->default(1000); 21 | $table->string('password')->nullable(); 22 | $table->boolean('password_open')->default(false); 23 | $table->boolean('enabled'); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('categories'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2017_12_23_223124_create_products_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | use Illuminate\Support\Facades\DB; 7 | 8 | class CreateProductsTable extends Migration 9 | { 10 | /** 11 | * Run the migrations. 12 | * 13 | * @return void 14 | */ 15 | public function up() 16 | { 17 | Schema::create('products', function (Blueprint $table) { 18 | $table->increments('id'); 19 | $table->integer('user_id')->index(); 20 | $table->integer('category_id')->index(); 21 | $table->string('name'); 22 | $table->longText('description'); 23 | $table->integer('sort')->default(1000); 24 | 25 | $table->integer('buy_min')->default(1); //限购 26 | $table->integer('buy_max')->default(10); 27 | 28 | $table->integer('count_sold')->default(0); 29 | $table->integer('count_all')->default(0); // 库存数量, 用后面的 add_count_to_products 计算一下 30 | $table->integer('count_warn')->default(0); //库存预警 31 | 32 | $table->boolean('support_coupon')->default(false); 33 | $table->string('password')->nullable(); 34 | $table->boolean('password_open')->default(false); 35 | 36 | $table->integer('cost')->default(0); //成本 37 | $table->integer('price'); //售价 38 | $table->text('price_whole')->nullable(); //批发价 39 | 40 | $table->text('instructions')->nullable(); // 使用说明 41 | 42 | $table->text('fields')->nullable(); // 自定义联系方式字段 43 | 44 | $table->boolean('enabled'); 45 | 46 | $table->tinyInteger('inventory')->default(\App\User::INVENTORY_AUTO); // 商品库存状态 默认跟随店铺 47 | $table->tinyInteger('fee_type')->default(\App\User::FEE_TYPE_AUTO);// 商品手续费状态 默认跟随店铺 48 | $table->tinyInteger('delivery')->default(\App\Product::DELIVERY_AUTO); // 商品发货模式, 默认自动发货 49 | 50 | $table->timestamps(); 51 | }); 52 | 53 | } 54 | 55 | /** 56 | * Reverse the migrations. 57 | * 58 | * @return void 59 | */ 60 | public function down() 61 | { 62 | Schema::dropIfExists('goods'); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /database/migrations/2017_12_23_223252_create_cards_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreateCardsTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('cards', function (Blueprint $table) { 17 | $table->increments('id'); 18 | $table->integer('user_id')->index(); 19 | $table->integer('product_id')->index(); 20 | $table->text('card'); 21 | $table->integer('type'); 22 | $table->integer('status')->default(\App\Card::STATUS_NORMAL); 23 | $table->integer('count_sold')->default(0); // type 为 TYPE_REPEAT 时, 表示已卖出次数 24 | $table->integer('count_all')->default(1); // type 为 TYPE_REPEAT 时, 表示可卖总次数 25 | $table->timestamp('created_at')->useCurrent(); 26 | $table->timestamp('updated_at')->nullable(); 27 | $table->softDeletes(); 28 | }); 29 | 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('cards'); 40 | try{ 41 | DB::unprepared('DROP PROCEDURE `add_cards`;'); 42 | }catch (\Exception $e){} 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /database/migrations/2017_12_23_223508_create_orders_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreateOrdersTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('orders', function (Blueprint $table) { 17 | $table->increments('id'); 18 | $table->integer('user_id')->index(); 19 | $table->string('order_no', 128)->index(); // 订单序列号 带有时间的很长的那种 20 | $table->integer('product_id'); 21 | $table->string('product_name')->nullable(); // 商品名称备份, 防止商户修改商品 22 | $table->integer('count'); // 购买数量 23 | $table->string('ip')->nullable(); // 购买者IP 24 | $table->string('customer', 32)->nullable(); // 购买者ID, 下单时随机生成, 用于浏览器缓存查订单 25 | $table->string('contact')->nullable(); // 购买者邮箱 or 联系方式 26 | $table->text('contact_ext')->nullable(); // 购买者附加信息 27 | $table->string('query_password', 128)->nullable(); // 訂單查詢密碼 28 | $table->tinyInteger('send_status')->default(App\Order::SEND_STATUS_UN); // 邮件/短信 发送状态 29 | 30 | $table->text('remark')->nullable(); 31 | 32 | $table->integer('cost')->default(0); //商户成本 33 | $table->integer('price')->default(0); //商品价格 34 | $table->integer('discount')->default(0); //折扣金额 35 | $table->integer('paid')->default(0); //支付 36 | $table->integer('fee')->default(0); //手续费 37 | $table->integer('system_fee')->default(0); //系统通道手续费 38 | $table->integer('income')->default(0); //获得 (支付-手续费) 39 | 40 | $table->integer('pay_id'); //支付通道 41 | $table->string('pay_trade_no')->nullable(); //支付通道订单号 42 | $table->integer('status')->default(\App\Order::STATUS_UNPAY); 43 | $table->string('frozen_reason')->nullable(); 44 | 45 | $table->string('api_out_no', 128)->nullable(); 46 | $table->text('api_info')->nullable(); 47 | 48 | $table->dateTime('paid_at')->nullable(); //支付时间 49 | $table->timestamps(); 50 | }); 51 | 52 | 53 | } 54 | 55 | /** 56 | * Reverse the migrations. 57 | * 58 | * @return void 59 | */ 60 | public function down() 61 | { 62 | Schema::dropIfExists('orders'); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /database/migrations/2017_12_23_223755_create_pays_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreatePaysTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('pays', function (Blueprint $table) { 17 | $table->increments('id'); 18 | $table->string('name'); 19 | $table->string('driver'); 20 | $table->string('way'); 21 | $table->text('config'); 22 | $table->text('comment')->nullable(); 23 | $table->float('fee_system',8,4)->default(0.01); // 通道手续费 默认 1% 24 | $table->boolean('enabled'); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('pays'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2018_01_02_142012_create_card_order_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreateCardOrderTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('card_order', function (Blueprint $table) { 17 | $table->increments('id'); 18 | $table->integer('order_id')->index(); 19 | $table->integer('card_id'); 20 | // $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('card_order'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2018_01_28_183143_create_coupons_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreateCouponsTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('coupons', function (Blueprint $table) { 17 | $table->increments('id'); 18 | $table->integer('user_id')->index(); 19 | $table->integer('category_id')->default(-1); 20 | $table->integer('product_id')->default(-1); 21 | $table->integer('type')->default(\App\Coupon::TYPE_REPEAT); 22 | $table->integer('status')->default(\App\Coupon::STATUS_NORMAL); 23 | $table->string('coupon', 100)->index(); 24 | $table->integer('discount_type'); 25 | $table->integer('discount_val'); 26 | $table->integer('count_used')->default(0); // type 为 TYPE_REPEAT 时, 表示已用次数 27 | $table->integer('count_all')->default(1); // type 为 TYPE_REPEAT 时, 表示可用总次数 28 | $table->string('remark')->nullable(); 29 | $table->dateTime('expire_at')->nullable(); 30 | $table->timestamps(); 31 | }); 32 | } 33 | 34 | /** 35 | * Reverse the migrations. 36 | * 37 | * @return void 38 | */ 39 | public function down() 40 | { 41 | Schema::dropIfExists('coupons'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /database/migrations/2018_01_29_195459_create_logs_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | use Illuminate\Support\Facades\DB; 7 | 8 | class CreateLogsTable extends Migration 9 | { 10 | /** 11 | * Run the migrations. 12 | * 13 | * @return void 14 | */ 15 | public function up() 16 | { 17 | Schema::create('logs', function (Blueprint $table) { 18 | $table->increments('id'); 19 | $table->integer('user_id')->index(); 20 | $table->string('ip'); 21 | $table->string('address')->nullable(); 22 | $table->integer('action')->default(\App\Log::ACTION_LOGIN); 23 | $table->timestamp('created_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('logs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2018_01_29_205026_create_systems_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreateSystemsTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('systems', function (Blueprint $table) { 17 | $table->increments('id'); 18 | $table->string('name', 100)->unique(); 19 | $table->longText('value')->nullable(); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('systems'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2018_02_01_174100_create_fund_records_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreateFundRecordsTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('fund_records', function (Blueprint $table) { 17 | $table->increments('id'); 18 | $table->integer('user_id')->index(); 19 | $table->integer('type')->default(\App\FundRecord::TYPE_OUT); 20 | $table->integer('amount'); 21 | $table->integer('balance')->default(0); //操作后余额 22 | $table->integer('order_id')->nullable(); //关联订单 23 | $table->string('withdraw_id')->nullable(); //关联订单 24 | $table->string('remark')->nullable(); 25 | $table->timestamp('created_at')->useCurrent(); 26 | $table->timestamp('updated_at')->nullable(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('fund_records'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2018_02_01_202439_create_jobs_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreateJobsTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('jobs', function (Blueprint $table) { 17 | $table->bigIncrements('id'); 18 | $table->string('queue',128)->index(); 19 | $table->longText('payload'); 20 | $table->unsignedTinyInteger('attempts'); 21 | $table->unsignedInteger('reserved_at')->nullable(); 22 | $table->unsignedInteger('available_at'); 23 | $table->unsignedInteger('created_at'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('jobs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2018_02_01_234941_create_files_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | use Illuminate\Support\Facades\DB; 7 | 8 | class CreateFilesTable extends Migration 9 | { 10 | /** 11 | * Run the migrations. 12 | * 13 | * @return void 14 | */ 15 | public function up() 16 | { 17 | Schema::create('files', function (Blueprint $table) { 18 | $table->increments('id'); 19 | $table->integer('user_id'); 20 | $table->string('driver'); 21 | $table->string('path'); 22 | $table->string('url'); 23 | $table->timestamp('created_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('files'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2018_05_17_112228_create_shop_themes_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreateShopThemesTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('shop_themes', function (Blueprint $table) { 17 | $table->increments('id'); 18 | $table->string('name', 128)->unique(); 19 | $table->string('description')->nullable(); 20 | $table->text('options')->nullable(); 21 | $table->text('config')->nullable(); 22 | $table->boolean('enabled')->default(true); 23 | }); 24 | 25 | \App\ShopTheme::freshList(); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('shop_themes'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2019_02_07_195259_add_count_to_products.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class AddCountToProducts extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | if (!Schema::hasColumn('products', 'count_all')) { 17 | Schema::table('products', function (Blueprint $table) { 18 | $table->integer('count_all')->default(0)->after('count_sold'); 19 | }); 20 | 21 | App\Product::whereRaw('1')->update([ 22 | 'count_sold' => 0, 23 | 'count_all' => 0, 24 | ]); 25 | 26 | \App\Card::selectRaw('`product_id`,SUM(`count_sold`) as `count_sold`,SUM(`count_all`) as `count_all`') 27 | ->groupBy('product_id')->orderByRaw('`product_id`') 28 | ->chunk(100, function ($card_groups) { 29 | foreach ($card_groups as $card_group) { 30 | \App\Product::where('id', $card_group->product_id)->update([ 31 | 'count_sold' => $card_group->count_sold, 32 | 'count_all' => $card_group->count_all, 33 | ]); 34 | } 35 | }); 36 | } 37 | } 38 | 39 | /** 40 | * Reverse the migrations. 41 | * 42 | * @return void 43 | */ 44 | public function down() 45 | { 46 | if (Schema::hasColumn('products', 'count_all')) { 47 | Schema::table('products', function (Blueprint $table) { 48 | $table->dropColumn(['count_all']); 49 | }); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /database/migrations/2019_02_14_203213_add_name_to_orders.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class AddNameToOrders extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | if (!Schema::hasColumn('orders', 'product_name')) { 17 | Schema::table('orders', function (Blueprint $table) { 18 | $table->string('product_name')->nullable()->after('product_id'); 19 | }); 20 | } 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_04_28_230220_add_inventory_to_products.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class AddInventoryToProducts extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | if (!Schema::hasColumn('products', 'inventory')) { 17 | 18 | Schema::table('products', function (Blueprint $table) { 19 | $table->tinyInteger('inventory')->default(\App\User::INVENTORY_AUTO)->after('enabled'); // 商品库存状态 默认跟随店铺 20 | $table->tinyInteger('fee_type')->default(\App\User::FEE_TYPE_AUTO)->after('inventory');// 商品手续费状态 默认跟随店铺 21 | 22 | }); 23 | } 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | foreach ([ 34 | 'inventory', 35 | 'fee_type' 36 | ] as $column) { 37 | try { 38 | Schema::table('products', function (Blueprint $table) use ($column) { 39 | $table->dropColumn($column); 40 | }); 41 | } catch (\Throwable $e) { 42 | } 43 | } 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /database/migrations/2019_05_18_131719_add_all_to_fund_records.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class AddAllToFundRecords extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | if (!Schema::hasColumn('fund_records', 'all')) { 17 | 18 | Schema::table('fund_records', function (Blueprint $table) { 19 | $table->integer('all')->nullable()->after('amount'); 20 | $table->integer('frozen')->nullable()->after('all'); 21 | $table->integer('paid')->nullable()->after('frozen'); 22 | }); 23 | } 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | foreach ([ 34 | 'all', 35 | 'frozen', 36 | 'paid' 37 | ] as $column) { 38 | try { 39 | Schema::table('fund_records', function (Blueprint $table) use ($column) { 40 | $table->dropColumn($column); 41 | }); 42 | } catch (\Throwable $e) { 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /database/migrations/2019_06_17_185712_add_options_to_shop_theme.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class AddOptionsToShopTheme extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | if (!Schema::hasColumn('shop_themes', 'options')) { 17 | Schema::table('shop_themes', function (Blueprint $table) { 18 | $table->text('options')->nullable()->after('description'); 19 | }); 20 | } 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_06_18_112211_add_manual_products.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class AddManualProducts extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | if (!Schema::hasColumn('products', 'fields')) { 17 | 18 | Schema::table('products', function (Blueprint $table) { 19 | $table->text('fields')->nullable()->after('instructions'); 20 | $table->tinyInteger('delivery')->default(\App\Product::DELIVERY_AUTO)->after('fee_type'); 21 | }); 22 | 23 | } 24 | 25 | if (!Schema::hasColumn('orders', 'contact_ext')) { 26 | DB::unprepared(' 27 | ALTER TABLE `orders` 28 | CHANGE COLUMN `email` `contact` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `customer`, 29 | CHANGE COLUMN `email_sent` `send_status` tinyint(4) NOT NULL DEFAULT 0 AFTER `contact`; 30 | '); 31 | Schema::table('orders', function (Blueprint $table) { 32 | $table->text('contact_ext')->nullable()->after('contact'); // 购买者附加信息 33 | }); 34 | } 35 | } 36 | 37 | /** 38 | * Reverse the migrations. 39 | * 40 | * @return void 41 | */ 42 | public function down() 43 | { 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /database/migrations/2019_07_03_213426_add_sms_price_to_orders.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class AddSmsPriceToOrders extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | if (!Schema::hasColumn('orders', 'sms_price')) { 17 | Schema::table('orders', function (Blueprint $table) { 18 | $table->integer('sms_price')->default(0)->after('discount'); 19 | }); 20 | } 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_12_27_175550_create_pay_ways_table.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class CreatePayWaysTable extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | Schema::create('pay_ways', function (Blueprint $table) { 17 | $table->increments('id'); 18 | $table->string('name', 32)->unique(); 19 | $table->integer('sort')->default(1000); 20 | $table->string('img')->nullable(); 21 | $table->tinyInteger('type')->default(\App\PayWay::TYPE_SHOP); 22 | $table->text('channels')->comment('子渠道信息'); 23 | $table->text('comment')->nullable(); 24 | $table->boolean('enabled')->default(true); 25 | $table->timestamps(); 26 | }); 27 | 28 | if (Schema::hasColumn('pays', 'img')) { 29 | // 商店的支付方式 30 | \App\Pay::each(function (\App\Pay $pay) { 31 | while (\App\PayWay::where('name', $pay->name)->exists()) { 32 | $pay->name .= '_' . str_random(2); 33 | } 34 | \App\PayWay::create([ 35 | 'name' => $pay->name, 36 | 'img' => $pay->img, 37 | 'type' => \App\PayWay::TYPE_SHOP, 38 | 'sort' => $pay->sort, 39 | 'enabled' => $pay->enabled, 40 | 'channels' => [[$pay->id, 1]] 41 | ]); 42 | 43 | if($pay->enabled > 0){ 44 | $pay->enabled = true; 45 | $pay->saveOrFail(); 46 | } 47 | }); 48 | 49 | Schema::table('pays', function (Blueprint $table) { 50 | $table->dropColumn(['img', 'sort']); 51 | }); 52 | } 53 | } 54 | 55 | /** 56 | * Reverse the migrations. 57 | * 58 | * @return void 59 | */ 60 | public function down() 61 | { 62 | Schema::dropIfExists('pay_ways'); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /database/migrations/2019_12_30_210448_add_address_to_logs.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class AddAddressToLogs extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | if (!Schema::hasColumn('logs', 'address')) { 17 | Schema::table('logs', function (Blueprint $table) { 18 | $table->string('address')->nullable()->after('ip'); 19 | }); 20 | } 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2021_02_25_152603_add_query_password_to_orders.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Support\Facades\Schema; 4 | use Illuminate\Database\Schema\Blueprint; 5 | use Illuminate\Database\Migrations\Migration; 6 | 7 | class AddQueryPasswordToOrders extends Migration 8 | { 9 | /** 10 | * Run the migrations. 11 | * 12 | * @return void 13 | */ 14 | public function up() 15 | { 16 | if (!Schema::hasColumn('orders', 'query_password')) { 17 | Schema::table('orders', function (Blueprint $table) { 18 | $table->string('query_password', 128)->nullable()->after('contact_ext'); // 訂單查詢密碼 19 | }); 20 | } 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::table('orders', function (Blueprint $table) { 31 | $table->dropColumn(['query_password']); 32 | }); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/seeds/CardsSeeder.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Database\Seeder; 4 | 5 | class CardsSeeder extends Seeder 6 | { 7 | /** 8 | * Run the database seeds. 9 | * 10 | * @return void 11 | */ 12 | public function run() 13 | { 14 | $user_id = \App\User::first()->id; 15 | \App\Card::insert([ 16 | [ 17 | 'user_id' => $user_id, 18 | 'product_id' => 1, 19 | 'card' => '11111', 20 | 'type' => \App\Card::TYPE_ONETIME, 21 | 'status' => \App\Card::STATUS_NORMAL, 22 | 'count_sold' => 0, 23 | 'count_all' => 1 24 | ], 25 | [ 26 | 'user_id' => $user_id, 27 | 'product_id' => 1, 28 | 'card' => '11112', 29 | 'type' => \App\Card::TYPE_ONETIME, 30 | 'status' => \App\Card::STATUS_SOLD, 31 | 'count_sold' => 1, 32 | 'count_all' => 1 33 | ], 34 | [ 35 | 'user_id' => $user_id, 36 | 'product_id' => 1, 37 | 'card' => '11113', 38 | 'type' => \App\Card::TYPE_ONETIME, 39 | 'status' => \App\Card::STATUS_NORMAL, 40 | 'count_sold' => 0, 41 | 'count_all' => 1 42 | ], 43 | 44 | [ 45 | 'user_id' => $user_id, 46 | 'product_id' => 2, 47 | 'card' => '123456', 48 | 'type' => \App\Card::TYPE_REPEAT, 49 | 'status' => \App\Card::STATUS_SOLD, 50 | 'count_sold' => 2, 51 | 'count_all' => 100 52 | ] 53 | ]); 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /database/seeds/CouponsSeeder.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Database\Seeder; 4 | 5 | class CouponsSeeder extends Seeder 6 | { 7 | /** 8 | * Run the database seeds. 9 | * 10 | * @return void 11 | */ 12 | public function run() 13 | { 14 | \App\Coupon::insert([ 15 | [ 16 | 'user_id' => 2, 17 | 'category_id' => -1, 18 | 'product_id' => -1, 19 | 'type' => \App\Coupon::TYPE_REPEAT, 20 | 'status' => \App\Coupon::STATUS_NORMAL, 21 | 'coupon' => 'happy-new-year', 22 | 'discount_type' => \App\Coupon::DISCOUNT_TYPE_PERCENT, 23 | 'discount_val' => 10, 24 | 'count_used' => 0, 25 | 'count_all' => 10, 26 | 'remark' => '系统生成', 27 | 'expire_at' => (new \Carbon\Carbon)->addDays(-30) 28 | ] 29 | ]); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Database\Seeder; 4 | 5 | class DatabaseSeeder extends Seeder 6 | { 7 | /** 8 | * Run the database seeds. 9 | * 10 | * @return void 11 | */ 12 | public function run() 13 | { 14 | $this->call([ 15 | SystemSeeder::class, 16 | UsersSeeder::class, 17 | ProductsSeeder::class, 18 | CardsSeeder::class, 19 | CouponsSeeder::class, 20 | OrdersSeeder::class, 21 | ]); 22 | //if (config('app.debug')) 23 | // $this->call(MyPayTableSeeder::class); 24 | //else 25 | $this->call(PayTableSeeder::class); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/seeds/OrdersSeeder.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Database\Seeder; 4 | 5 | class OrdersSeeder extends Seeder 6 | { 7 | private function increaseId() 8 | { 9 | // set increase to 1000 10 | \App\Order::insert([ 11 | 'id' => 1000, 12 | 'user_id' => 0, 13 | 'order_no' => '123456', 14 | 'product_id' => \App\Product::first()->id, 15 | 'count' => 0, 16 | 'contact' => '', 17 | 'pay_id' => 0, 18 | 'status' => \App\Order::STATUS_UNPAY 19 | ]); 20 | try { 21 | \App\Order::where('id', 1000)->delete(); 22 | } catch (Exception $e) { 23 | } 24 | } 25 | 26 | /** 27 | * Run the database seeds. 28 | * 29 | * @return void 30 | */ 31 | public function run() 32 | { 33 | self::increaseId(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/seeds/SystemSeeder.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Database\Seeder; 4 | 5 | class SystemSeeder extends Seeder 6 | { 7 | /** 8 | * Run the database seeds. 9 | * 10 | * @return void 11 | */ 12 | public function run() 13 | { 14 | $sets = [ 15 | 'app_name' => 'XX小店', 16 | 'app_title' => '自动发卡, 自动发货', 17 | 'app_url' => 'http://www.example.com', 18 | 'app_url_api' => 'http://www.example.com', 19 | 20 | 'company' => '©2019 Windy', 21 | 22 | 'keywords' => '在线发卡系统', 23 | 'description' => '我是一个发卡系统, 这里填写描述', 24 | 'shop_bkg' => 'http://api.izhao.me/img', 25 | 'shop_ann' => '欢迎来到XXX小店', 26 | 'shop_ann_pop' => '', 27 | 'shop_inventory' => 1, 28 | 29 | 30 | 31 | 'js_tj' => '<div style="display: none"><script src="https://s22.cnzz.com/z_stat.php?id=1272914459&web_id=1272914459" language="JavaScript"></script></div>', 32 | 'js_kf' => '', 33 | 34 | 35 | 'vcode_driver' => 'geetest', 36 | 'vcode_login' => '0', // 登录验证码 37 | 'vcode_shop_buy' => '0', // 下单 38 | 'vcode_shop_search' => '0',// 查询订单 39 | 40 | 'storage_driver' => 'local', 41 | 42 | 'order_query_day' => '30', 43 | 'order_clean_unpay_open' => '0', 44 | 'order_clean_unpay_day' => '7', 45 | 46 | 'mail_driver' => 'smtp', 47 | 'mail_smtp_host' => 'smtp.mailtrap.io', 48 | 'mail_smtp_port' => '25', 49 | 'mail_smtp_username' => 'xxx', 50 | 'mail_smtp_password' => 'xxx', 51 | 'mail_smtp_from_address' => 'hello@example.com', 52 | 'mail_smtp_from_name' => 'test', 53 | 'mail_smtp_encryption' => 'null' 54 | 55 | ]; 56 | $systems = []; 57 | foreach ($sets as $k => $v) { 58 | $systems[] = [ 59 | 'name' => $k, 60 | 'value' => $v 61 | ]; 62 | } 63 | DB::table('systems')->insert($systems); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /database/seeds/UsersSeeder.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | use Illuminate\Database\Seeder; 4 | 5 | class UsersSeeder extends Seeder 6 | { 7 | /** 8 | * Run the database seeds. 9 | * 10 | * @return void 11 | */ 12 | public function run() 13 | { 14 | DB::table('users')->insert([ 15 | 'email' => 'admin@qq.com', 16 | 'password' => bcrypt('123456'), 17 | 'created_at' => \Carbon\Carbon::now(), 18 | ]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <phpunit backupGlobals="false" 3 | backupStaticAttributes="false" 4 | bootstrap="vendor/autoload.php" 5 | colors="true" 6 | convertErrorsToExceptions="true" 7 | convertNoticesToExceptions="true" 8 | convertWarningsToExceptions="true" 9 | processIsolation="false" 10 | stopOnFailure="false"> 11 | <testsuites> 12 | <testsuite name="Feature"> 13 | <directory suffix="Test.php">./tests/Feature</directory> 14 | </testsuite> 15 | 16 | <testsuite name="Unit"> 17 | <directory suffix="Test.php">./tests/Unit</directory> 18 | </testsuite> 19 | </testsuites> 20 | <filter> 21 | <whitelist processUncoveredFilesFromWhitelist="true"> 22 | <directory suffix=".php">./app</directory> 23 | </whitelist> 24 | </filter> 25 | <php> 26 | <env name="APP_ENV" value="testing"/> 27 | <env name="CACHE_DRIVER" value="array"/> 28 | <env name="SESSION_DRIVER" value="array"/> 29 | <env name="QUEUE_DRIVER" value="sync"/> 30 | </php> 31 | </phpunit> 32 | -------------------------------------------------------------------------------- /public/.htaccess.example: -------------------------------------------------------------------------------- 1 | <IfModule mod_rewrite.c> 2 | <IfModule mod_negotiation.c> 3 | Options -MultiViews -Indexes 4 | </IfModule> 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | </IfModule> 22 | -------------------------------------------------------------------------------- /public/assets/css/index_mobile.css: -------------------------------------------------------------------------------- 1 | @media only screen and (max-width: 660px) { 2 | .rootLink { 3 | margin: 0 16px 0 0 4 | } 5 | 6 | .banner, .banner .header-container { 7 | display: block; 8 | } 9 | 10 | .banner .header-container .left { 11 | padding-top: 48px; 12 | } 13 | 14 | .banner .header-container .right { 15 | display: none; 16 | } 17 | 18 | .banner .header-container { 19 | height: 440px; 20 | } 21 | } 22 | 23 | @media only screen and (max-width: 600px) { 24 | .navRoot { 25 | display: none; 26 | } 27 | 28 | .navRoot-Mobile { 29 | display: flex; 30 | } 31 | 32 | 33 | .root-link { 34 | display: none; 35 | } 36 | } 37 | 38 | @media only screen and (max-width: 480px) { 39 | .header { 40 | height: 64px; 41 | } 42 | 43 | #banner-area { 44 | margin-top: 64px; 45 | } 46 | 47 | header .mask { 48 | top: 65px; 49 | } 50 | 51 | .product { 52 | padding-bottom: 48px; 53 | padding-top: 24px 54 | } 55 | 56 | .footer .link-box { 57 | padding-top: 24px; 58 | } 59 | 60 | 61 | .ship-link .left { 62 | min-width: 72px; 63 | } 64 | 65 | } 66 | 67 | /* 开始缩减 */ 68 | @media only screen and (max-width: 468px) { 69 | .product .pro-box { 70 | height: auto; 71 | padding-bottom: 92px; 72 | } 73 | } -------------------------------------------------------------------------------- /public/assets/demo/api_demo_php.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/assets/demo/api_demo_php.zip -------------------------------------------------------------------------------- /public/assets/images/btn-arrow-green.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <svg width="16px" height="13px" viewBox="0 0 16 13" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 3 | <title>Group 88</title> 4 | <g id="Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 5 | <g id="首页-copy-3" transform="translate(-440.000000, -412.000000)" fill="#00CCA7"> 6 | <g id="Group-36" transform="translate(410.000000, 198.000000)"> 7 | <g id="Group-8" transform="translate(0.000000, 196.000000)"> 8 | <g id="Group-7" transform="translate(30.000000, 12.000000)"> 9 | <g id="Group-5" transform="translate(0.000000, 6.000000)"> 10 | <g id="Group-88"> 11 | <path d="M7.64503533,5.44708 C8.08350306,5.78480446 8.0763402,6.3378811 7.64503533,6.67008844 L0.793916059,11.94708 C0.355448327,12.2848045 0,12.1110948 0,11.5600819 L0,0.557086553 C0,0.00562894415 0.362611192,-0.162118901 0.793916059,0.170088444 L7.64503533,5.44708 Z" id="Triangle"></path> 12 | <path d="M14.788145,5.44897361 C15.2252549,5.78565225 15.2254966,6.33133008 14.788145,6.66819484 L9.23040898,10.9489736 C8.79329902,11.2856523 8.43895139,11.1137472 8.43895139,10.5630067 L8.43895139,1.55416172 C8.43895139,1.00431945 8.79305739,0.831330079 9.23040898,1.16819484 L14.788145,5.44897361 Z" id="Triangle-Copy" opacity="0.5"></path> 13 | </g> 14 | </g> 15 | </g> 16 | </g> 17 | </g> 18 | </g> 19 | </g> 20 | </svg> -------------------------------------------------------------------------------- /public/assets/images/btn-arrow-purple.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <svg width="16px" height="13px" viewBox="0 0 16 13" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 3 | <title>Group 88</title> 4 | <g id="Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 5 | <g id="首页-copy-3" transform="translate(-440.000000, -412.000000)" fill="#644CE9"> 6 | <g id="Group-36" transform="translate(410.000000, 198.000000)"> 7 | <g id="Group-8" transform="translate(0.000000, 196.000000)"> 8 | <g id="Group-7" transform="translate(30.000000, 12.000000)"> 9 | <g id="Group-5" transform="translate(0.000000, 6.000000)"> 10 | <g id="Group-88"> 11 | <path d="M7.64503533,5.44708 C8.08350306,5.78480446 8.0763402,6.3378811 7.64503533,6.67008844 L0.793916059,11.94708 C0.355448327,12.2848045 0,12.1110948 0,11.5600819 L0,0.557086553 C0,0.00562894415 0.362611192,-0.162118901 0.793916059,0.170088444 L7.64503533,5.44708 Z" id="Triangle"></path> 12 | <path d="M14.788145,5.44897361 C15.2252549,5.78565225 15.2254966,6.33133008 14.788145,6.66819484 L9.23040898,10.9489736 C8.79329902,11.2856523 8.43895139,11.1137472 8.43895139,10.5630067 L8.43895139,1.55416172 C8.43895139,1.00431945 8.79305739,0.831330079 9.23040898,1.16819484 L14.788145,5.44897361 Z" id="Triangle-Copy" opacity="0.5"></path> 13 | </g> 14 | </g> 15 | </g> 16 | </g> 17 | </g> 18 | </g> 19 | </g> 20 | </svg> -------------------------------------------------------------------------------- /public/assets/images/btn-arrow-white.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <svg width="16px" height="13px" viewBox="0 0 16 13" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 3 | <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> 4 | <title>Group 88</title> 5 | <desc>Created with Sketch.</desc> 6 | <defs></defs> 7 | <g id="Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 8 | <g id="首页-copy-3" transform="translate(-440.000000, -412.000000)" fill="#fff"> 9 | <g id="Group-36" transform="translate(410.000000, 198.000000)"> 10 | <g id="Group-8" transform="translate(0.000000, 196.000000)"> 11 | <g id="Group-7" transform="translate(30.000000, 12.000000)"> 12 | <g id="Group-5" transform="translate(0.000000, 6.000000)"> 13 | <g id="Group-88"> 14 | <path d="M7.64503533,5.44708 C8.08350306,5.78480446 8.0763402,6.3378811 7.64503533,6.67008844 L0.793916059,11.94708 C0.355448327,12.2848045 0,12.1110948 0,11.5600819 L0,0.557086553 C0,0.00562894415 0.362611192,-0.162118901 0.793916059,0.170088444 L7.64503533,5.44708 Z" id="Triangle"></path> 15 | <path d="M14.788145,5.44897361 C15.2252549,5.78565225 15.2254966,6.33133008 14.788145,6.66819484 L9.23040898,10.9489736 C8.79329902,11.2856523 8.43895139,11.1137472 8.43895139,10.5630067 L8.43895139,1.55416172 C8.43895139,1.00431945 8.79305739,0.831330079 9.23040898,1.16819484 L14.788145,5.44897361 Z" id="Triangle-Copy" opacity="0.5"></path> 16 | </g> 17 | </g> 18 | </g> 19 | </g> 20 | </g> 21 | </g> 22 | </g> 23 | </svg> -------------------------------------------------------------------------------- /public/assets/images/btn-arrow.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <svg width="16px" height="13px" viewBox="0 0 16 13" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 3 | <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> 4 | <title>Group 88</title> 5 | <desc>Created with Sketch.</desc> 6 | <defs></defs> 7 | <g id="Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 8 | <g id="首页-copy-3" transform="translate(-440.000000, -412.000000)" fill="#005EFF"> 9 | <g id="Group-36" transform="translate(410.000000, 198.000000)"> 10 | <g id="Group-8" transform="translate(0.000000, 196.000000)"> 11 | <g id="Group-7" transform="translate(30.000000, 12.000000)"> 12 | <g id="Group-5" transform="translate(0.000000, 6.000000)"> 13 | <g id="Group-88"> 14 | <path d="M7.64503533,5.44708 C8.08350306,5.78480446 8.0763402,6.3378811 7.64503533,6.67008844 L0.793916059,11.94708 C0.355448327,12.2848045 0,12.1110948 0,11.5600819 L0,0.557086553 C0,0.00562894415 0.362611192,-0.162118901 0.793916059,0.170088444 L7.64503533,5.44708 Z" id="Triangle"></path> 15 | <path d="M14.788145,5.44897361 C15.2252549,5.78565225 15.2254966,6.33133008 14.788145,6.66819484 L9.23040898,10.9489736 C8.79329902,11.2856523 8.43895139,11.1137472 8.43895139,10.5630067 L8.43895139,1.55416172 C8.43895139,1.00431945 8.79305739,0.831330079 9.23040898,1.16819484 L14.788145,5.44897361 Z" id="Triangle-Copy" opacity="0.5"></path> 16 | </g> 17 | </g> 18 | </g> 19 | </g> 20 | </g> 21 | </g> 22 | </g> 23 | </svg> -------------------------------------------------------------------------------- /public/assets/images/index/alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/assets/images/index/alipay.png -------------------------------------------------------------------------------- /public/assets/images/index/area_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/assets/images/index/area_chart.png -------------------------------------------------------------------------------- /public/assets/images/index/bg-mask1_47d5d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/assets/images/index/bg-mask1_47d5d.png -------------------------------------------------------------------------------- /public/assets/images/index/bg-mask2_b8afa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/assets/images/index/bg-mask2_b8afa.png -------------------------------------------------------------------------------- /public/assets/images/index/bg-mask3_af41b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/assets/images/index/bg-mask3_af41b.png -------------------------------------------------------------------------------- /public/assets/images/index/head-bg-circle1_a5b8c.svg: -------------------------------------------------------------------------------- 1 | <svg width="520px" height="520px" viewBox="0 0 520 520" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 2 | <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> 3 | <title>head-bg-circle3</title> 4 | <desc>Created with Sketch.</desc> 5 | <defs> 6 | <ellipse id="path-1" cx="42.4395209" cy="42.5257732" rx="42.4395209" ry="42.5257732"></ellipse> 7 | </defs> 8 | <g> 9 | <circle cx="260" cy="260" r="250" style="stroke: rgba(229, 238, 255, 0.44);fill:none;" stroke-width="1"></circle> 10 | </g> 11 | </svg> -------------------------------------------------------------------------------- /public/assets/images/index/head-bg-circle2_e1996.svg: -------------------------------------------------------------------------------- 1 | <svg width="460px" height="460px" viewBox="0 0 460 460" version="1.1" xmlns="http://www.w3.org/2000/svg" 2 | xmlns:xlink="http://www.w3.org/1999/xlink"> 3 | <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> 4 | <title>head-bg-circle3</title> 5 | <desc>Created with Sketch.</desc> 6 | <defs> 7 | <ellipse id="path-1" cx="42.4395209" cy="42.5257732" rx="42.4395209" ry="42.5257732"></ellipse> 8 | </defs> 9 | <g> 10 | <circle cx="230" cy="230" r="220" style="stroke: rgba(229, 238, 255, 0.44);fill:none;" 11 | stroke-width="1"></circle> 12 | </g> 13 | <g> 14 | <circle cx="450" cy="230" r="5" style="fill: rgba(229, 238, 255, 0.44);" transform="rotate(-202.408 150 150)"> 15 | 16 | <animateTransform attributeName="transform" dur="14s" type="rotate" from="0 230 230" to="-360 230 230" 17 | repeatCount="indefinite"></animateTransform> 18 | </circle> 19 | <circle cx="450" cy="230" r="7" style="fill: rgba(229, 238, 255, 0.44);" transform="rotate(-202.408 150 150)"> 20 | 21 | <animateTransform attributeName="transform" dur="18s" type="rotate" from="135 230 230" to="-225 230 230" 22 | repeatCount="indefinite"></animateTransform> 23 | </circle> 24 | </g> 25 | </svg> -------------------------------------------------------------------------------- /public/assets/images/index/head-bg-circle3_8db76.svg: -------------------------------------------------------------------------------- 1 | <svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" 2 | xmlns:xlink="http://www.w3.org/1999/xlink"> 3 | <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> 4 | <title>head-bg-circle3</title> 5 | <desc>Created with Sketch.</desc> 6 | <defs> 7 | <ellipse id="path-1" cx="42.4395209" cy="42.5257732" rx="42.4395209" ry="42.5257732"></ellipse> 8 | </defs> 9 | <g> 10 | <circle cx="200" cy="200" r="190" style="stroke: rgba(229, 238, 255, 0.44);fill:none;" 11 | stroke-width="1"></circle> 12 | </g> 13 | <g> 14 | <circle cx="390" cy="200" r="5" style="fill: rgba(229, 238, 255, 0.44);" transform="rotate(-202.408 150 150)"> 15 | <animateTransform attributeName="transform" dur="16s" type="rotate" from="90 200 200" to="-270 200 200" 16 | repeatCount="indefinite"></animateTransform> 17 | </circle> 18 | </g> 19 | </svg> -------------------------------------------------------------------------------- /public/assets/images/index/ills-2_6c2eb.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <svg width="93px" height="94px" viewBox="0 0 93 94" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 3 | <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> 4 | <title>Group 48</title> 5 | <desc>Created with Sketch.</desc> 6 | <defs> 7 | <ellipse id="path-1" cx="42.4395209" cy="42.5257732" rx="42.4395209" ry="42.5257732"></ellipse> 8 | </defs> 9 | <g id="Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 10 | <g id="首页-copy-3" transform="translate(-1047.000000, -273.000000)"> 11 | <g id="versatile_05" transform="translate(-10.000000, -500.000000)"> 12 | <g id="Group-67"> 13 | <g id="Group-67-Copy" transform="translate(0.000000, 518.000000)"> 14 | <g id="Group-51" transform="translate(1061.000000, 0.000000)"> 15 | <g id="Group-50" transform="translate(0.000000, 0.015018)"> 16 | <g id="Group-61" transform="translate(0.000000, -0.000000)"> 17 | <g id="Group-48" transform="translate(0.000000, 259.000000)"> 18 | <g id="Oval-2"> 19 | <use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-1"></use> 20 | <ellipse stroke-opacity="0.250566123" stroke="#FFFFFF" stroke-width="4" cx="42.4395209" cy="42.5257732" rx="44.4395209" ry="44.5257732"></ellipse> 21 | </g> 22 | <g id="Group-49" transform="translate(17.896074, 21.247868)"> 23 | <polygon id="Rectangle-36-Copy-2" fill="#005EFF" opacity="0.300000012" points="24.2464521 20.3384133 48.4567822 31.2364667 24.2464521 42.1345202 0.0361221168 31.2364667"></polygon> 24 | <polygon id="Rectangle-36-Copy" fill="#005EFF" opacity="0.300000012" points="24.2464521 10.1692066 48.4567822 21.0672601 24.2464521 31.9653136 0.0361221168 21.0672601"></polygon> 25 | <polygon id="Rectangle-36" fill="#00CCA7" points="24.2464521 -5.32907052e-14 48.4567822 10.8980535 24.2464521 21.7961069 0.0361221168 10.8980535"></polygon> 26 | </g> 27 | </g> 28 | </g> 29 | </g> 30 | </g> 31 | </g> 32 | </g> 33 | </g> 34 | </g> 35 | </g> 36 | </svg> -------------------------------------------------------------------------------- /public/assets/images/index/ills-3_bd288.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 3 | <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> 4 | <title>Group 46</title> 5 | <desc>Created with Sketch.</desc> 6 | <defs> 7 | <circle id="path-1" cx="42.5" cy="42.5" r="42.5"></circle> 8 | </defs> 9 | <g id="Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 10 | <g id="首页-copy-3" transform="translate(-1105.000000, -426.000000)"> 11 | <g id="versatile_05" transform="translate(-10.000000, -500.000000)"> 12 | <g id="Group-67"> 13 | <g id="Group-67-Copy" transform="translate(0.000000, 518.000000)"> 14 | <g id="Group-46" transform="translate(1119.000000, 412.000000)"> 15 | <g id="Oval-2"> 16 | <use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-1"></use> 17 | <circle stroke-opacity="0.250566123" stroke="#FFFFFF" stroke-width="4" cx="42.5" cy="42.5" r="44.5"></circle> 18 | </g> 19 | <g id="Group-60" transform="translate(25.500000, 17.850000)"> 20 | <g id="Group-45"> 21 | <rect id="Rectangle-32" fill="#005EFF" x="1.72002805" y="31.74659" width="30.4426367" height="2.99679487"></rect> 22 | <rect id="Rectangle-32-Copy" fill="#005EFF" x="1.72002805" y="39.4183849" width="15.7019916" height="2.99679487"></rect> 23 | <rect id="Rectangle-32-Copy-2" fill="#00CCA7" x="1.72002805" y="47.0901798" width="10.9639271" height="2.99679487"></rect> 24 | <path d="M3.52429197e-12,18.7 C6.11140455,16.0732303 8.70248373,8.47759434 11.8595246,8.47759434 C15.0165655,8.47759434 17.920136,15.0330161 21.1612935,15.0330161 C24.402451,15.0330161 34,0 34,0" id="Path-49" stroke="#00CCA7" stroke-width="2"></path> 25 | </g> 26 | </g> 27 | </g> 28 | </g> 29 | </g> 30 | </g> 31 | </g> 32 | </g> 33 | </svg> -------------------------------------------------------------------------------- /public/assets/images/index/ills_69b23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/assets/images/index/ills_69b23.png -------------------------------------------------------------------------------- /public/dist/css/chunk-14e8015a.8b51af0b.css: -------------------------------------------------------------------------------- 1 | .theme-select[data-v-3e636e4e]{display:block}.child-option[data-v-3e636e4e]{-webkit-box-shadow:none!important;box-shadow:none!important;margin-bottom:16px}.child-option .child-option-title[data-v-3e636e4e]{margin:0 0 4px 0}.el-form-item-title-btn[data-v-6e61ef4e]{display:inline-block;margin-left:4px}.title{font-weight:400;margin:0 0 12px 0}.item-container{margin-bottom:8px!important}.item-container .tip{font-size:12px}.item-container .el-checkbox{display:block}.item-container .el-checkbox+.el-checkbox{margin-left:0}.item-container .el-switch span{color:#606266!important;font-weight:500!important}.item-container .el-radio-group{display:block!important} -------------------------------------------------------------------------------- /public/dist/css/chunk-3544a150.751dc3c4.css: -------------------------------------------------------------------------------- 1 | .home-link-card .el-card__body{-webkit-box-sizing:border-box;box-sizing:border-box;max-height:100%;overflow-x:hidden;overflow-y:auto}.home-link[data-v-2e72c4c4]{margin:10px}.home-link>.header[data-v-2e72c4c4]{font-weight:700}.home-link>.header>.header-title[data-v-2e72c4c4]{font-size:17px;color:#333;line-height:25px}.home-link>.functions[data-v-2e72c4c4]{display:block;margin:12px -6px 0}.home-link>.functions>.function[data-v-2e72c4c4]{margin:12px 6px 0;display:inline-block;width:120px;height:36px;background:#f5f6fa;border-radius:4px;font-size:14px;color:#333;text-align:center;line-height:36px;-webkit-transition:color .3s ease;transition:color .3s ease}.home-link>.functions>.function[data-v-2e72c4c4]:hover{color:#409eff} -------------------------------------------------------------------------------- /public/dist/css/chunk-419fe948.3c69e8a0.css: -------------------------------------------------------------------------------- 1 | .theme-select[data-v-3e636e4e]{display:block}.child-option[data-v-3e636e4e]{-webkit-box-shadow:none!important;box-shadow:none!important;margin-bottom:16px}.child-option .child-option-title[data-v-3e636e4e]{margin:0 0 4px 0} -------------------------------------------------------------------------------- /public/dist/css/chunk-4db37efc.10bd47dc.css: -------------------------------------------------------------------------------- 1 | .el-form-item-title-btn[data-v-6e61ef4e]{display:inline-block;margin-left:4px} -------------------------------------------------------------------------------- /public/dist/fonts/MaterialIcons-Regular.012cf6a1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/dist/fonts/MaterialIcons-Regular.012cf6a1.woff -------------------------------------------------------------------------------- /public/dist/fonts/MaterialIcons-Regular.570eb838.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/dist/fonts/MaterialIcons-Regular.570eb838.woff2 -------------------------------------------------------------------------------- /public/dist/fonts/MaterialIcons-Regular.a37b0c01.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/dist/fonts/MaterialIcons-Regular.a37b0c01.ttf -------------------------------------------------------------------------------- /public/dist/fonts/MaterialIcons-Regular.e79bfd88.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/dist/fonts/MaterialIcons-Regular.e79bfd88.eot -------------------------------------------------------------------------------- /public/dist/fonts/element-icons.535877f5.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/dist/fonts/element-icons.535877f5.woff -------------------------------------------------------------------------------- /public/dist/fonts/element-icons.732389de.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/dist/fonts/element-icons.732389de.ttf -------------------------------------------------------------------------------- /public/dist/img/404.a57b6f31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/dist/img/404.a57b6f31.png -------------------------------------------------------------------------------- /public/dist/img/404_cloud.0f4bc32b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/dist/img/404_cloud.0f4bc32b.png -------------------------------------------------------------------------------- /public/dist/img/qq-group.ef24d8c8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/dist/img/qq-group.ef24d8c8.png -------------------------------------------------------------------------------- /public/dist/index_dev.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="zh-CN"> 3 | <head> 4 | <meta charset="utf-8"> 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/> 6 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> 7 | <title>管理后台</title> 8 | </head> 9 | <body> 10 | <noscript> 11 | <strong>We're sorry but this page doesn't work properly without JavaScript enabled. 12 | Please enable it to continue.</strong> 13 | </noscript> 14 | <div id="app"></div> 15 | <script type="text/javascript"> 16 | var config = { 17 | url: 'http://127.0.0.4', 18 | functions: ['product_manual'], // 实验性功能, 手动发货 19 | captcha: { 20 | // 验证码驱动 21 | driver: 'geetest', 22 | // 验证码配置 23 | config: { 24 | success: 1, 25 | gt: false, 26 | challenge: 'f49f60a11a4aa1f46274808a81ecba9d' 27 | }, 28 | scene: { 29 | auth: { 30 | // 开启登录验证码 31 | login: 0, 32 | }, 33 | } 34 | }, 35 | }; 36 | </script> 37 | <!-- built files will be auto injected --> 38 | </body> 39 | </html> 40 | -------------------------------------------------------------------------------- /public/dist/js/chunk-2d0da573.681c6091.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0da573"],{"6ad6":function(r,o,a){"use strict";a.r(o);var e=a("323e"),t=a.n(e),s=a("604c"),i={data:function(){var r=this;return{loading:!1,form:{old:"",password:"",password_confirmation:""},formRules:{old:[{required:!0,message:"请输入旧密码",trigger:"blur"}],password:[{required:!0,validator:function(o,a,e){""===a?e(new Error("请输入密码")):(""!==r.form.password_confirmation&&r.$refs.form.validateField("password_confirmation"),e())},trigger:"blur"},{min:6,max:16,message:"长度在 6 到 16 个字符",trigger:"blur"}],password_confirmation:[{required:!0,validator:function(o,a,e){""===a?e(new Error("请再次输入密码")):a!==r.form.password?e(new Error("两次输入密码不一致!")):e()},trigger:"blur"},{min:6,max:16,message:"长度在 6 到 16 个字符",trigger:"blur"}]}}},watch:{loading:function(r,o){r?o||t.a.isStarted()||t.a.start():t.a.done()}},methods:{onSubmit:function(){var r=this;this.$refs.form.validate((function(o){if(o){r.loading=!0;var a=Object.assign({},r.form);Object(s.a)(a).then((function(){r.loading=!1,r.$notify({title:"提示",message:"修改密码成功",type:"success",duration:3e3})})).catch((function(){r.loading=!1}))}}))}}},n=a("2877"),l=Object(n.a)(i,(function(){var r=this,o=r.$createElement,a=r._self._c||o;return a("div",{staticClass:"app-container"},[a("h3",{staticStyle:{margin:"4px 0 28px 0"}},[r._v("修改密码")]),a("el-form",{ref:"form",attrs:{model:r.form,"label-width":"80px",rules:r.formRules}},[a("el-form-item",{attrs:{label:"旧密码",prop:"old"}},[a("el-input",{attrs:{type:"password",placeholder:"请输入旧密码"},model:{value:r.form.old,callback:function(o){r.$set(r.form,"old",o)},expression:"form.old"}})],1),a("el-form-item",{attrs:{label:"新密码",prop:"password"}},[a("el-input",{attrs:{type:"password",placeholder:"请输入新密码"},model:{value:r.form.password,callback:function(o){r.$set(r.form,"password",o)},expression:"form.password"}})],1),a("el-form-item",{attrs:{label:"新密码",prop:"password_confirmation"}},[a("el-input",{attrs:{type:"password",placeholder:"请再次输入新密码"},model:{value:r.form.password_confirmation,callback:function(o){r.$set(r.form,"password_confirmation",o)},expression:"form.password_confirmation"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",loading:r.loading},on:{click:r.onSubmit}},[r._v("确认修改")])],1)],1)],1)}),[],!1,null,null,null);o.default=l.exports}}]); -------------------------------------------------------------------------------- /public/dist/js/chunk-2d0e5357.931184f0.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0e5357"],{9406:function(a,n,e){"use strict";e.r(n);var s={name:"dashboard",components:{AdminDashboard:e("3f2c").default}},t=e("2877"),d=Object(t.a)(s,(function(){var a=this.$createElement,n=this._self._c||a;return n("div",{staticClass:"dashboard-container"},[n("admin-dashboard")],1)}),[],!1,null,null,null);n.default=d.exports}}]); -------------------------------------------------------------------------------- /public/dist/js/chunk-3544a150.47b788be.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3544a150"],{"3fd8":function(t,s,a){"use strict";var n=a("60c4");a.n(n).a},"510f":function(t,s,a){},"5ee5":function(t,s,a){"use strict";a.r(s);var n={name:"HomeLink",props:{userInfo:{}},data:function(){return{}}},i=(a("3fd8"),a("e148"),a("2877")),r=Object(i.a)(n,(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("el-card",{staticClass:"my-card home-link-card"},[a("div",{staticClass:"home-link"},[a("div",{staticClass:"header"},[a("span",{staticClass:"header-title"},[t._v("常用功能")])]),a("div",{staticClass:"functions"},[a("router-link",{staticClass:"function",attrs:{to:"/admin/system/set?tab=info"}},[t._v("店铺信息")]),a("router-link",{staticClass:"function",attrs:{to:"/admin/product/category"}},[t._v("商品分类")]),a("router-link",{staticClass:"function",attrs:{to:"/admin/product/list"}},[t._v("商品列表")]),a("router-link",{staticClass:"function",attrs:{to:"/admin/order/list"}},[t._v("订单记录")]),a("router-link",{staticClass:"function",attrs:{to:"/admin/order/analysis"}},[t._v("收益统计")]),a("router-link",{staticClass:"function",attrs:{to:"/admin/system/pay"}},[t._v("支付渠道")])],1)])])}),[],!1,null,"2e72c4c4",null);s.default=r.exports},"60c4":function(t,s,a){},e148:function(t,s,a){"use strict";var n=a("510f");a.n(n).a}}]); -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/favicon.ico -------------------------------------------------------------------------------- /public/images/illegal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/images/illegal.jpg -------------------------------------------------------------------------------- /public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/images/logo.png -------------------------------------------------------------------------------- /public/images/logo.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/images/logo.psd -------------------------------------------------------------------------------- /public/images/qrcode_fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/images/qrcode_fail.png -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | // hack for aliyun cdn 4 | if (isset($_SERVER['HTTP_ALI_SWIFT_LOG_HOST'])) { 5 | $_SERVER['SERVER_NAME'] = $_SERVER['HTTP_ALI_SWIFT_LOG_HOST']; 6 | $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_ALI_SWIFT_LOG_HOST']; 7 | } 8 | 9 | 10 | /** 11 | * Laravel - A PHP Framework For Web Artisans 12 | * 13 | * @package Laravel 14 | * @author Taylor Otwell <taylor@laravel.com> 15 | */ 16 | 17 | define('LARAVEL_START', microtime(true)); 18 | 19 | /* 20 | |-------------------------------------------------------------------------- 21 | | Register The Auto Loader 22 | |-------------------------------------------------------------------------- 23 | | 24 | | Composer provides a convenient, automatically generated class loader for 25 | | our application. We just need to utilize it! We'll simply require it 26 | | into the script here so that we don't have to worry about manual 27 | | loading any of our classes later on. It feels great to relax. 28 | | 29 | */ 30 | 31 | require __DIR__ . '/../vendor/autoload.php'; 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Turn On The Lights 36 | |-------------------------------------------------------------------------- 37 | | 38 | | We need to illuminate PHP development, so let us turn on the lights. 39 | | This bootstraps the framework and gets it ready for use, then it 40 | | will load up this application so that we can run it and send 41 | | the responses back to the browser and delight our users. 42 | | 43 | */ 44 | 45 | $app = require_once __DIR__ . '/../bootstrap/app.php'; 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Run The Application 50 | |-------------------------------------------------------------------------- 51 | | 52 | | Once we have the application, we can handle the incoming request 53 | | through the kernel, and send the associated response back to 54 | | the client's browser allowing them to enjoy the creative 55 | | and wonderful application we have prepared for them. 56 | | 57 | */ 58 | 59 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 60 | 61 | $response = $kernel->handle( 62 | $request = Illuminate\Http\Request::capture() 63 | ); 64 | 65 | $response->send(); 66 | 67 | $kernel->terminate($request, $response); 68 | -------------------------------------------------------------------------------- /public/nginx.conf.example: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name example.com; 4 | root /example.com/public; 5 | 6 | add_header X-Frame-Options "SAMEORIGIN"; 7 | add_header X-XSS-Protection "1; mode=block"; 8 | add_header X-Content-Type-Options "nosniff"; 9 | 10 | index index.html index.htm index.php; 11 | 12 | charset utf-8; 13 | location = /favicon.ico { access_log off; log_not_found off; } 14 | location = /robots.txt { access_log off; log_not_found off; } 15 | 16 | if (!-e $request_filename) 17 | { 18 | rewrite ^/(.*)$ /index.php?/$1 last; 19 | break; 20 | } 21 | 22 | location ~ /\.(?!well-known).* { 23 | deny all; 24 | } 25 | } -------------------------------------------------------------------------------- /public/plugins/images/ali.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/ali.png -------------------------------------------------------------------------------- /public/plugins/images/ali_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/ali_qr.png -------------------------------------------------------------------------------- /public/plugins/images/btc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/btc.png -------------------------------------------------------------------------------- /public/plugins/images/btc.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/btc.psd -------------------------------------------------------------------------------- /public/plugins/images/btc_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/btc_qr.png -------------------------------------------------------------------------------- /public/plugins/images/btc_qr.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/btc_qr.psd -------------------------------------------------------------------------------- /public/plugins/images/jd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/jd.png -------------------------------------------------------------------------------- /public/plugins/images/jd.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/jd.psd -------------------------------------------------------------------------------- /public/plugins/images/jd_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/jd_qr.png -------------------------------------------------------------------------------- /public/plugins/images/jd_qr.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/jd_qr.psd -------------------------------------------------------------------------------- /public/plugins/images/paypal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/paypal.png -------------------------------------------------------------------------------- /public/plugins/images/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/qq.png -------------------------------------------------------------------------------- /public/plugins/images/qq_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/qq_qr.png -------------------------------------------------------------------------------- /public/plugins/images/unionpay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/unionpay.png -------------------------------------------------------------------------------- /public/plugins/images/unionpay_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/unionpay_qr.png -------------------------------------------------------------------------------- /public/plugins/images/unionpay_qr.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/unionpay_qr.psd -------------------------------------------------------------------------------- /public/plugins/images/usdt-erc20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/usdt-erc20.png -------------------------------------------------------------------------------- /public/plugins/images/usdt-okc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/usdt-okc.png -------------------------------------------------------------------------------- /public/plugins/images/usdt-trc20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/usdt-trc20.png -------------------------------------------------------------------------------- /public/plugins/images/usdt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/usdt.png -------------------------------------------------------------------------------- /public/plugins/images/wave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/wave.png -------------------------------------------------------------------------------- /public/plugins/images/wx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/wx.png -------------------------------------------------------------------------------- /public/plugins/images/wx_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/wx_qr.png -------------------------------------------------------------------------------- /public/plugins/images/youzan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/youzan.png -------------------------------------------------------------------------------- /public/plugins/images/youzan_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/youzan_qr.png -------------------------------------------------------------------------------- /public/plugins/images/youzan_qr.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/plugins/images/youzan_qr.psd -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/shop_theme/classic/images/ali.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/shop_theme/classic/images/ali.png -------------------------------------------------------------------------------- /public/shop_theme/classic/images/choose_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/shop_theme/classic/images/choose_bg.png -------------------------------------------------------------------------------- /public/shop_theme/classic/images/open_other.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/shop_theme/classic/images/open_other.png -------------------------------------------------------------------------------- /public/shop_theme/classic/images/pay_group_qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/shop_theme/classic/images/pay_group_qrcode.png -------------------------------------------------------------------------------- /public/shop_theme/classic/images/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/shop_theme/classic/images/qq.png -------------------------------------------------------------------------------- /public/shop_theme/classic/images/section1_right_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/shop_theme/classic/images/section1_right_bg.jpg -------------------------------------------------------------------------------- /public/shop_theme/classic/images/wx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/shop_theme/classic/images/wx.png -------------------------------------------------------------------------------- /public/shop_theme/classic/layui/skin/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/public/shop_theme/classic/layui/skin/default/icon.png -------------------------------------------------------------------------------- /public/shop_theme/classic/mobile.min.js: -------------------------------------------------------------------------------- 1 | function msg(options){if(!options.btn){options.btn=['确定','取消']}swal({type:options.type,title:options.title,html:options.content,confirmButtonText:options.btn[0],cancelButtonText:options.btn[1]}).then(options.then)}function showToast(type,content){switch(type){case'success':YsToast.ok(content);break;case'error':YsToast.error(content);break;case'warn':YsToast.warn(content);break;default:YsToast.info(content)}}function showShopInfo(){swal({title:'店铺信息',html:$('#shop_html').html(),confirmButtonText:'关闭'})}function showAnn(){swal({title:'商家公告',html:$('#ann').html(),confirmButtonText:'关闭'})}function showPfyh(){swal({title:'批发优惠',html:$('#discount-tip').html(),confirmButtonText:'关闭'})}function showOrderTip(tip,then){swal({html:tip,confirmButtonText:'我已付款',cancelButtonText:'返回',showConfirmButton:true,showCancelButton:true,allowOutsideClick:false,allowEscapeKey:false,allowEnterKey:false}).then(function(event){if(event.value)then()})}function inputDialog(title,then){swal({type:'info',title:typeof title==='object'?title.title:title,text:typeof title==='object'?title.content:'',input:'text',inputAttributes:{autocapitalize:'off',autocorrect:'off'},confirmButtonText:'确定',showCancelButton:true,cancelButtonText:'取消',allowOutsideClick:false,allowEscapeKey:false,allowEnterKey:false,animation:false}).then(function(a){then(a?a.value:'')}).catch(function(){then()})}$(function(){if(!config.shop){$('.top_bg>.top').hide();$('.top_bg ~ div').hide()}$('.payments li').click(function(){if(!detectBrowser($(this))){}$(this).children('span').addClass('pay_choose');$(this).siblings('li').find('span').removeClass('pay_choose');$(this).children('input').attr('checked',true);$(this).siblings('li').find('input').attr('checked',false)});$('#browser_shadow').click(function(){$(this).hide()});if(device.isQQ()){if($('li.qq').length>0){$('li.qq:first').trigger('click')}else{}}else if(device.isWeChat()){if($('li.wx').length>0){$('li.wx:first').trigger('click');$('li[class!=wx]>span').addClass('disabled')}else{$('#browser_shadow').show()}}else if(device.isAlipay()){if($('li.ali').length>0){$('li.ali:first').trigger('click');$('li[class!=ali]>span').addClass('disabled')}else{$('#browser_shadow').show()}}else{$('.payments li:first-child').trigger('click')}});function detectBrowser($that){var li_id=$that.attr('class');if(device.isQQ()){if(li_id==='qq'){return true}else{$('#browser_shadow').show();return false}}else if(device.isWeChat()){if(li_id==='wx'){return true}else{$('#browser_shadow').show();return false}}else if(device.isAlipay()){if(li_id==='ali'){return true}else{$('#browser_shadow').show();return false}}return true} -------------------------------------------------------------------------------- /public/shop_theme/classic/pc.min.js: -------------------------------------------------------------------------------- 1 | function msg(a){var b=void 0;"warning"===a.type?b=0:"success"===a.type?b=1:"error"===a.type&&(b=2),a.btn||(a.btn=["确定"]),layer.open({title:a.title,content:a.content,btn:a.btn,icon:b,yes:function(b){a.then&&a.then(),layer.close(b)}})}function showToast(a,b){var c=void 0;switch(a){case"success":c=1;break;case"error":c=2;break;case"warn":c=0}layer.open({content:b,btn:["确定"],icon:c})}function showAnn(){layer.open({title:"商家公告",content:$("#ann").html(),shadeClose:!0})}function showOrderTip(a,b){layer.open({title:"提示",content:a,btn:["已付款, 查询订单","返回"],yes:function(a){b&&b(),layer.close(a)}})}function inputDialog(a,b){var c={formType:0,value:"",title:"object"==typeof a?a.title:a,btn2:function(){console.log("cancel ?"),b()}};"object"==typeof a&&(c.content=a.content),layer.prompt(c,function(a,c){b(a),layer.close(c)})}$(function(){config.shop||$(".nyroModal").hide(),$(".right_form li input,.right_form li select").focus(function(){}),$(".right_form li input").blur(function(){""==$(this).val()}),$(".right_form li select").blur(function(){var a=$(this).find("option:selected").text();""==a&&$(this).siblings("span").removeClass("span_up")}),$(".fz_lab").click(function(){$(this).children("input").attr("checked")?$(this).addClass("lab_on"):$(this).removeClass("lab_on")}),$(".pay").click(function(){$(this).siblings(".pay").removeClass("checked1"),$(this).addClass("checked1")}),$(".lab3").click(function(){$(this).children("input").attr("checked",!0),$(this).siblings("label").children("input").attr("checked",!1),$(this).siblings("label").removeClass("checked2"),$(this).addClass("checked2"),calcTotalPrice()}),$("#discount-btn").hover(function(){var a=layer.tips($("#discount-tip").html(),$("#discount-btn"),{tips:[2,"#4B4B4B"],time:0});$(this).attr("data-index",a)},function(){layer.close($(this).attr("data-index"))})}); -------------------------------------------------------------------------------- /public/shop_theme/classic/tips.js: -------------------------------------------------------------------------------- 1 | /* 2 | *text:内容 3 | *delay:延迟时间 4 | */ 5 | ;(function ($) { 6 | function Tip(config) { 7 | this.config = { 8 | text: '出错了', 9 | delay: 3000, 10 | bgColor: '#fff0f0'//background:#fff0f0; 11 | }; 12 | //默认参数扩展 13 | if (config && $.isPlainObject(config)) { 14 | $.extend(this.config, config); 15 | } 16 | ; 17 | this.wrap = $('<div id="tips_div" style="z-index:99999999999;position:fixed;left:0;top:0;width:100%;text-align:center;line-height: 3em;font-size: 1.3em;background:' + this.config.bgColor + ';-webkit-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%);-webkit-transition:all .2s ease 0s;transition:all .2s ease 0s"></div>'); 18 | this.init(); 19 | }; 20 | Tip.prototype.init = function () { 21 | var _this = this; 22 | try { 23 | $('#tips_div').remove(); 24 | } catch (e) { 25 | } 26 | $('body').append(_this.wrap.html(_this.config.text)); 27 | _this.show(); 28 | 29 | }; 30 | Tip.prototype.show = function () { 31 | var _this = this; 32 | setTimeout(function () { 33 | _this.wrap.css({ 34 | '-webkit-transform': 'translateY(0)', 35 | 'transform': 'translateY(0)' 36 | }); 37 | }, 100); 38 | _this.hide(); 39 | }; 40 | Tip.prototype.hide = function () { 41 | var _this = this; 42 | setTimeout(function () { 43 | _this.wrap.css({ 44 | '-webkit-transform': 'translateY(-100%)', 45 | 'transform': 'translateY(-100%)' 46 | }); 47 | }, _this.config.delay); 48 | setTimeout(function () { 49 | _this.wrap.remove(); 50 | }, _this.config.delay + 250); 51 | }; 52 | window.Tip = Tip; 53 | $.tip = function (config) { 54 | return new Tip(config); 55 | } 56 | })(window.jQuery || $); 57 | 58 | 59 | /** 60 | * 消息通知 61 | * @constructor 62 | */ 63 | function YsToast() {} 64 | YsToast.ok = function(text) { 65 | $.tip({ 66 | text: text, 67 | delay: 2500, 68 | bgColor: '#c9e2b3' 69 | }); 70 | }; 71 | YsToast.error = function(text) { 72 | $.tip({ 73 | text: text, 74 | delay: 3500, 75 | bgColor: '#e4b9c0' 76 | }); 77 | }; 78 | YsToast.warn = function(text) { 79 | $.tip({ 80 | text: text, 81 | delay: 3000, 82 | bgColor: '#f7e1b5' 83 | }); 84 | }; 85 | YsToast.info = function(text) { 86 | $.tip({ 87 | text: text, 88 | delay: 3000, 89 | bgColor: '#a6e1ec' 90 | }); 91 | }; -------------------------------------------------------------------------------- /public/shop_theme/ms/scss/global.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | html, body { 4 | margin: 0; 5 | padding: 0; 6 | outline: none; 7 | } 8 | 9 | 10 | a { 11 | color: #0067b8; 12 | text-decoration: none; 13 | 14 | &:hover { 15 | text-decoration: underline; 16 | } 17 | } 18 | 19 | 20 | .gt_popup { 21 | z-index: 10 22 | } 23 | 24 | 25 | .quill-html { 26 | img { 27 | max-width: 100% 28 | } 29 | 30 | p { 31 | margin: 0 !important 32 | } 33 | } 34 | 35 | .vector { 36 | vertical-align: middle; 37 | display: inline-block; 38 | } 39 | 40 | .vector svg { 41 | vertical-align: top; 42 | display: inline-block; 43 | } 44 | 45 | 46 | * { 47 | margin: 0; 48 | padding: 0; 49 | -webkit-box-sizing: border-box; 50 | box-sizing: border-box; 51 | } 52 | 53 | *:not(input) { 54 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 55 | -webkit-touch-callout: none; 56 | -webkit-text-size-adjust: none; 57 | } 58 | 59 | sup { 60 | line-height: 0; 61 | } 62 | 63 | sup.indent { 64 | margin-left: -0.5em; 65 | } 66 | 67 | body { 68 | color: #333; 69 | font-family: "Microsoft YaHei", "Hiragino Sans GB", serif; 70 | } 71 | 72 | a img { 73 | border: 0px; 74 | } 75 | 76 | li { 77 | list-style: none; 78 | } 79 | 80 | input,button{ 81 | font-family: inherit; 82 | } -------------------------------------------------------------------------------- /public/shop_theme/ms/scss/modal.scss: -------------------------------------------------------------------------------- 1 | 2 | .modal-background { 3 | position: fixed; 4 | width: 100%; 5 | height: 100%; 6 | background-color: rgba(0, 0, 0, 0.5); 7 | top: 0; 8 | left: 0; 9 | z-index: 100000; 10 | } 11 | 12 | .modal-content { 13 | width: 100%; 14 | max-width: 920px; 15 | display: flex; 16 | justify-content: center; 17 | align-items: center; 18 | margin: 0 auto; 19 | height: 100vh; 20 | 21 | .modal-msg { 22 | background-color: #fff; 23 | padding: 30px 40px; 24 | margin: 0 24px; 25 | position: relative; 26 | max-height: 50vh; 27 | min-width: 50%; 28 | overflow: auto; 29 | 30 | @media only screen and (max-width: 767px) { 31 | & { 32 | width: 90%; 33 | padding: 30px 12px; 34 | } 35 | } 36 | } 37 | 38 | h3 { 39 | font-size: 18px; 40 | font-weight: normal; 41 | text-align: center; 42 | color: #333; 43 | } 44 | 45 | .close { 46 | width: 16px; 47 | height: 16px; 48 | position: absolute; 49 | right: 20px; 50 | top: 20px; 51 | cursor: pointer; 52 | border: none; 53 | background: initial; 54 | 55 | .icon { 56 | line-height: 0; 57 | vertical-align: middle; 58 | overflow: hidden; 59 | } 60 | } 61 | 62 | .modal-btns { 63 | text-align: right; 64 | margin-top: 8px; 65 | 66 | a { 67 | cursor: pointer; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /public/web.config.example: -------------------------------------------------------------------------------- 1 | <configuration> 2 | <system.webServer> 3 | <!--start-php--> 4 | <!--此处为宝塔配置, 其他IIS配置请自行设置--> 5 | <handlers> 6 | <remove name="php_5.2" /> 7 | <remove name="php_5.3" /> 8 | <remove name="php_5.4" /> 9 | <remove name="php_5.5" /> 10 | <remove name="php_5.6" /> 11 | <remove name="php_7.0" /> 12 | <remove name="php_7.1" /> 13 | <add name="php_7.1" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\BtSoft\WebSoft\php\7.1\php-cgi.exe" resourceType="Unspecified" requireAccess="Script" /> 14 | </handlers> 15 | <!--end-php--> 16 | <rewrite> 17 | <rules> 18 | <rule name="Redirect Trailing Slashes If Not A Folder" enabled="false" stopProcessing="true"> 19 | <match url="^(.*)/quot; ignoreCase="false" /> 20 | <conditions> 21 | <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> 22 | </conditions> 23 | <action type="Redirect" redirectType="Permanent" url="/{R:1}" /> 24 | </rule> 25 | <rule name="Handle Front Controller" stopProcessing="true"> 26 | <match url="^" ignoreCase="false" /> 27 | <conditions> 28 | <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> 29 | <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> 30 | </conditions> 31 | <action type="Rewrite" url="index.php" /> 32 | </rule> 33 | </rules> 34 | </rewrite> 35 | </system.webServer> 36 | </configuration> -------------------------------------------------------------------------------- /resources/assets/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * includes Vue and other libraries. It is a great starting point when 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | 10 | window.Vue = require('vue'); 11 | 12 | /** 13 | * Next, we will create a fresh Vue application instance and attach it to 14 | * the page. Then, you may begin adding components to this application 15 | * or customize the JavaScript scaffolding to fit your unique needs. 16 | */ 17 | 18 | Vue.component('example-component', require('./components/ExampleComponent.vue')); 19 | 20 | const app = new Vue({ 21 | el: '#app' 22 | }); 23 | -------------------------------------------------------------------------------- /resources/assets/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 6 | * for JavaScript based Bootstrap features such as modals and tabs. This 7 | * code may be modified to fit the specific needs of your application. 8 | */ 9 | 10 | try { 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap-sass'); 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | 26 | /** 27 | * Next we will register the CSRF Token as a common header with Axios so that 28 | * all outgoing HTTP requests automatically have it attached. This is just 29 | * a simple convenience so we don't have to attach every token manually. 30 | */ 31 | 32 | let token = document.head.querySelector('meta[name="csrf-token"]'); 33 | 34 | if (token) { 35 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; 36 | } else { 37 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); 38 | } 39 | 40 | /** 41 | * Echo exposes an expressive API for subscribing to channels and listening 42 | * for events that are broadcast by Laravel. Echo and event broadcasting 43 | * allows your team to easily build robust real-time web applications. 44 | */ 45 | 46 | // import Echo from 'laravel-echo' 47 | 48 | // window.Pusher = require('pusher-js'); 49 | 50 | // window.Echo = new Echo({ 51 | // broadcaster: 'pusher', 52 | // key: 'your-pusher-key' 53 | // }); 54 | -------------------------------------------------------------------------------- /resources/assets/js/components/ExampleComponent.vue: -------------------------------------------------------------------------------- 1 | <template> 2 | <div class="container"> 3 | <div class="row"> 4 | <div class="col-md-8 col-md-offset-2"> 5 | <div class="panel panel-default"> 6 | <div class="panel-heading">Example Component</div> 7 | 8 | <div class="panel-body"> 9 | I'm an example component! 10 | </div> 11 | </div> 12 | </div> 13 | </div> 14 | </div> 15 | </template> 16 | 17 | <script> 18 | export default { 19 | mounted() { 20 | console.log('Component mounted.') 21 | } 22 | } 23 | </script> 24 | -------------------------------------------------------------------------------- /resources/assets/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | // Body 3 | $body-bg: #f5f8fa; 4 | 5 | // Borders 6 | $laravel-border-color: darken($body-bg, 10%); 7 | $list-group-border: $laravel-border-color; 8 | $navbar-default-border: $laravel-border-color; 9 | $panel-default-border: $laravel-border-color; 10 | $panel-inner-border: $laravel-border-color; 11 | 12 | // Brands 13 | $brand-primary: #3097D1; 14 | $brand-info: #8eb4cb; 15 | $brand-success: #2ab27b; 16 | $brand-warning: #cbb956; 17 | $brand-danger: #bf5329; 18 | 19 | // Typography 20 | $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/"; 21 | $font-family-sans-serif: "Raleway", sans-serif; 22 | $font-size-base: 14px; 23 | $line-height-base: 1.6; 24 | $text-color: #636b6f; 25 | 26 | // Navbar 27 | $navbar-default-bg: #fff; 28 | 29 | // Buttons 30 | $btn-default-color: $text-color; 31 | 32 | // Inputs 33 | $input-border: lighten($text-color, 40%); 34 | $input-border-focus: lighten($brand-primary, 25%); 35 | $input-color-placeholder: lighten($text-color, 30%); 36 | 37 | // Panels 38 | $panel-default-heading-bg: #fff; 39 | -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600"); 4 | 5 | // Variables 6 | @import "variables"; 7 | 8 | // Bootstrap 9 | @import "~bootstrap-sass/assets/stylesheets/bootstrap"; 10 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Authentication Language Lines 8 | |-------------------------------------------------------------------------- 9 | | 10 | | The following language lines are used during authentication for various 11 | | messages that we need to display to the user. You are free to modify 12 | | these language lines according to your application's requirements. 13 | | 14 | */ 15 | 16 | 'failed' => 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Pagination Language Lines 8 | |-------------------------------------------------------------------------- 9 | | 10 | | The following language lines are used by the paginator library to build 11 | | the simple pagination links. You are free to change them to anything 12 | | you want to customize your views to better match your application. 13 | | 14 | */ 15 | 16 | 'previous' => '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Password Reset Language Lines 8 | |-------------------------------------------------------------------------- 9 | | 10 | | The following language lines are the default lines which match reasons 11 | | that are given by the password broker for a password update attempt 12 | | has failed, such as for an invalid token or invalid new password. 13 | | 14 | */ 15 | 16 | 'password' => 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/zh_CN/auth.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Authentication Language Lines 8 | |-------------------------------------------------------------------------- 9 | | 10 | | The following language lines are used during authentication for various 11 | | messages that we need to display to the user. You are free to modify 12 | | these language lines according to your application's requirements. 13 | | 14 | */ 15 | 16 | 'failed' => '账号或密码不正确。', 17 | 'throttle' => '错误次数过多,请在 :seconds 秒后重试。', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/zh_CN/exception.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Exception Language Lines 8 | |-------------------------------------------------------------------------- 9 | | 10 | | The following language lines are used during authentication for various 11 | | messages that we need to display to the user. You are free to modify 12 | | these language lines according to your application's requirements. 13 | | 14 | */ 15 | 16 | 'resource_not_found' => '记录未找到', 17 | 'please_login' => '您需要登录您的账户再进行此操作', 18 | 'un_authenticated' => '未授权的操作', 19 | 'csrf_token_invalid' => '请刷新页面后重试', 20 | 'not_found' => '页面未找到', 21 | 'method_not_allowed' => '请求方法不允许', 22 | 'service_unavailable' => '当前服务不可用,请稍后重试', 23 | 'too_many_requests' => '您的请求过于频繁,请稍后重试', 24 | 'unknown_error' => '未知错误,请检查日志' 25 | ]; 26 | -------------------------------------------------------------------------------- /resources/lang/zh_CN/passwords.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Password Reset Language Lines 8 | |-------------------------------------------------------------------------- 9 | | 10 | | The following language lines are the default lines which match reasons 11 | | that are given by the password broker for a password update attempt 12 | | has failed, such as for an invalid token or invalid new password. 13 | | 14 | */ 15 | 16 | 'password' => '密码长度至少包含6个字符并且两次输入密码要一致', 17 | 'reset' => '密码已经被重置!', 18 | 'sent' => '我们已经发送密码重置链接到您的邮箱', 19 | 'token' => '密码重置令牌无效', 20 | 'user' => "该邮箱对应的用户不存在!", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/zh_CN/shop.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | | Lang for this project 7 | */ 8 | 9 | 'coupon' => [ 10 | 'required' => '请输入优惠券', 11 | 'invalid' => '您输入的优惠券信息无效<br>如果没有优惠券请不要填写' 12 | ], 13 | 14 | 'category' => [ 15 | 'required' => '请选择商品分类', 16 | 'not_found' => '商品分类未找到,请重新选择', 17 | 'password_error' => '分类密码输入错误', 18 | ], 19 | 20 | 'product' => [ 21 | 'required' => '请选择商品', 22 | 'not_found' => '商品未找到,请重新选择', 23 | 'password_error' => '商品密码输入错误', 24 | 'not_on_sell' => '该商品已下架', 25 | 'buy_min' => '该商品最少购买 :num 件,请重新选择', 26 | 'buy_max' => '该商品限购 :num 件,请重新选择', 27 | 'out_of_stock' => '该商品库存不足', 28 | ], 29 | 30 | 'contact' => [ 31 | 'required' => '请输入联系方式', 32 | ], 33 | 34 | 'query_password' => [ 35 | 'required' => '请输入查询密码', 36 | 'weak' => '您输入的查询密码过于简单,请重新输入', 37 | ], 38 | 39 | 'pay' => [ 40 | 'not_found' => '支付方式未找到,请重新选择', 41 | 'driver_not_found' => '支付驱动未找到,请联系客服', 42 | 'internal_error' => '发生错误,下单失败,请稍后重试', 43 | 'verify_failed' => '支付验证失败,您可以稍后查看支付状态。' 44 | ], 45 | 46 | 'order' => [ 47 | 'not_found' => '订单未找到', 48 | 'expired' => '当前订单长时间未支付已作废, 请重新下单', 49 | 'msg_product_manual_please_wait' => '您购买的为手动充值商品,请耐心等待处理', 50 | 'msg_product_out_of_stock_not_send' => '商家库存不足,因此没有自动发货,请联系商家客服发货', 51 | 'msg_product_deleted' => '卖家已删除此商品,请联系客服退款', 52 | ], 53 | 54 | 'search_type' => [ 55 | 'required' => '请选择查询类型' 56 | ], 57 | 58 | 'please_select_category_or_product' => '请先选择分类或商品', 59 | 60 | 'please_wait' => '请稍后', 61 | 'please_wait_for_pay' => '支付方式加载中,请稍后', 62 | 63 | 'order_is_paid' => '订单已支付', 64 | 'order_process_failed_because' => '失败原因:<br>:reason', 65 | 'order_process_failed_default' => '订单未支付成功<br>如果您已经支付请耐心等待或联系客服解决', 66 | 67 | 'you_are_sb' => '你玩你妈呢?' 68 | 69 | ]; 70 | -------------------------------------------------------------------------------- /resources/lang/zh_TW/auth.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Authentication Language Lines 8 | |-------------------------------------------------------------------------- 9 | | 10 | | The following language lines are used during authentication for various 11 | | messages that we need to display to the user. You are free to modify 12 | | these language lines according to your application's requirements. 13 | | 14 | */ 15 | 16 | 'failed' => '賬號或密碼不正確。', 17 | 'throttle' => '錯誤次數過多,請在 :seconds 秒后重試。', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/zh_TW/exception.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Exception Language Lines 8 | |-------------------------------------------------------------------------- 9 | | 10 | | The following language lines are used during authentication for various 11 | | messages that we need to display to the user. You are free to modify 12 | | these language lines according to your application's requirements. 13 | | 14 | */ 15 | 16 | 'resource_not_found' => '記錄未找到', 17 | 'please_login' => '您需要登錄您的賬戶再進行此操作', 18 | 'un_authenticated' => '未授權的操作', 19 | 'csrf_token_invalid' => '請刷新頁面后重試', 20 | 'not_found' => '頁面未找到', 21 | 'method_not_allowed' => '請求方法不允許', 22 | 'service_unavailable' => '當前服務不可用,請稍后重試', 23 | 'too_many_requests' => '您的請求過于頻繁,請稍后重試', 24 | 'unknown_error' => '未知錯誤,請檢查日志' 25 | ]; 26 | -------------------------------------------------------------------------------- /resources/lang/zh_TW/passwords.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Password Reset Language Lines 8 | |-------------------------------------------------------------------------- 9 | | 10 | | The following language lines are the default lines which match reasons 11 | | that are given by the password broker for a password update attempt 12 | | has failed, such as for an invalid token or invalid new password. 13 | | 14 | */ 15 | 16 | 'password' => '密碼長度至少包含6個字符并且兩次輸入密碼要一致', 17 | 'reset' => '密碼已經被重置!', 18 | 'sent' => '我們已經發送密碼重置鏈接到您的郵箱', 19 | 'token' => '密碼重置令牌無效', 20 | 'user' => "該郵箱對應的用戶不存在!", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/zh_TW/shop.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 5 | /* 6 | | Lang for this project 7 | */ 8 | 9 | 'coupon' => [ 10 | 'required' => '請輸入優惠券', 11 | 'invalid' => '您輸入的優惠券信息無效<br>如果沒有優惠券請不要填寫' 12 | ], 13 | 14 | 'category' => [ 15 | 'required' => '請選擇商品分類', 16 | 'not_found' => '商品分類未找到,請重新選擇', 17 | 'password_error' => '分類密碼輸入錯誤', 18 | ], 19 | 20 | 'product' => [ 21 | 'required' => '請選擇商品', 22 | 'not_found' => '商品未找到,請重新選擇', 23 | 'password_error' => '商品密碼輸入錯誤', 24 | 'not_on_sell' => '該商品已下架', 25 | 'buy_min' => '該商品最少購買 :num 件,請重新選擇', 26 | 'buy_max' => '該商品限購 :num 件,請重新選擇', 27 | 'out_of_stock' => '該商品庫存不足', 28 | ], 29 | 30 | 'contact' => [ 31 | 'required' => '請輸入聯系方式', 32 | ], 33 | 34 | 'query_password' => [ 35 | 'required' => '請輸入查詢密碼', 36 | 'weak' => '您輸入的查詢密碼過於簡單,請重新輸入', 37 | ], 38 | 39 | 'pay' => [ 40 | 'not_found' => '支付方式未找到,請重新選擇', 41 | 'driver_not_found' => '支付驅動未找到,請聯系客服', 42 | 'internal_error' => '發生錯誤,下單失敗,請稍后重試', 43 | 'verify_failed' => '支付驗證失敗,您可以稍后查看支付狀態。' 44 | ], 45 | 46 | 'order' => [ 47 | 'not_found' => '訂單未找到', 48 | 'expired' => '當前訂單長時間未支付已作廢, 請重新下單', 49 | 'msg_product_manual_please_wait' => '您購買的為手動充值商品,請耐心等待處理', 50 | 'msg_product_out_of_stock_not_send' => '商家庫存不足,因此沒有自動發貨,請聯系商家客服發貨', 51 | 'msg_product_deleted' => '賣家已刪除此商品,請聯系客服退款', 52 | ], 53 | 54 | 'search_type' => [ 55 | 'required' => '請選擇查詢類型' 56 | ], 57 | 58 | 'please_select_category_or_product' => '請先選擇分類或商品', 59 | 60 | 'please_wait' => '請稍后', 61 | 'please_wait_for_pay' => '支付方式加載中,請稍后', 62 | 63 | 'order_is_paid' => '訂單已支付', 64 | 'order_process_failed_because' => '失敗原因:<br>:reason', 65 | 'order_process_failed_default' => '訂單未支付成功<br>如果您已經支付請耐心等待或聯系客服解決', 66 | 67 | 'you_are_sb' => '你玩你媽呢?' 68 | 69 | ]; 70 | -------------------------------------------------------------------------------- /resources/views/emails/message.blade.php: -------------------------------------------------------------------------------- 1 | <div class="email-paged" style="background-image: url();-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;background-position: center center;background-repeat: no-repeat;"> 2 | <div class="email-content" style="opacity:0.8;width:100%;max-width:720px;text-align: left;margin: 0 auto;padding-top: 80px;padding-bottom: 60px"> 3 | <div class="email-title" style="-webkit-box-shadow: 10px 10px 10px rgba(0,0,0,.13);box-shadow: 10px 10px 10px rgba(0,0,0,.13);"> 4 | <h1 style="color:#fff;background: #51a0e3;line-height:70px;font-size:24px;font-weight:normal;padding-left:40px;margin:0"><?php echo $m_title; ?></h1> 5 | <div class="email-text" style="background:#fff;padding:20px 32px 0;"> 6 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;margin-top: 4px;"><?php echo $m_message; ?></p> 7 | <br> 8 | </div> 9 | <p style="color: #999999;font-size:13px;line-height:24px;text-align:right;padding:0 32px 16px">此邮件为系统自动发送。</p> 10 | </div> 11 | </div> 12 | </div> -------------------------------------------------------------------------------- /resources/views/emails/order.blade.php: -------------------------------------------------------------------------------- 1 | <div class="email-paged" 2 | style="background-image: url();-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;background-position: center center;background-repeat: no-repeat;"> 3 | <div class="email-content" 4 | style="opacity:0.8;width:100%;max-width:720px;text-align: left;margin: 0 auto;padding-top: 80px;padding-bottom: 60px"> 5 | <div class="email-title" 6 | style="-webkit-box-shadow: 10px 10px 10px rgba(0,0,0,.13);box-shadow: 10px 10px 10px rgba(0,0,0,.13);"> 7 | <h1 style="color:#fff;background: #51a0e3;line-height:70px;font-size:24px;font-weight:normal;padding-left:40px;margin:0"> 8 | 订单提醒</h1> 9 | <div class="email-text" style="background:#fff;padding:20px 32px 0;"> 10 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;margin-top: 4px;">尊敬的用户:</p> 11 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;"> 12 | {!! $card_msg !!}<br> 13 | <code>{!! $cards_txt !!}</code><br> 14 | <a href="{!! $order_url !!}" target="_blank">查看订单详情</a> 15 | </p> 16 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;">感谢您的访问,祝您使用愉快!<br>此致</p> 17 | </div> 18 | <p style="color: #999999;font-size:13px;line-height:24px;text-align:right;padding:0 32px 16px"> 19 | 此邮件为系统自动发送,请勿回复。</p> 20 | </div> 21 | </div> 22 | </div> -------------------------------------------------------------------------------- /resources/views/emails/product_count_warn.blade.php: -------------------------------------------------------------------------------- 1 | <div class="email-paged" 2 | style="background-image: url();-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;background-position: center center;background-repeat: no-repeat;"> 3 | <div class="email-content" 4 | style="opacity:0.8;width:100%;max-width:720px;text-align: left;margin: 0 auto;padding-top: 80px;padding-bottom: 60px"> 5 | <div class="email-title" 6 | style="-webkit-box-shadow: 10px 10px 10px rgba(0,0,0,.13);box-shadow: 10px 10px 10px rgba(0,0,0,.13);"> 7 | <h1 style="color:#fff;background: #51a0e3;line-height:70px;font-size:24px;font-weight:normal;padding-left:40px;margin:0"> 8 | 库存预警</h1> 9 | <div class="email-text" style="background:#fff;padding:20px 32px 0;"> 10 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;margin-top: 4px;">尊敬的用户:</p> 11 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;"> 12 | 商品#{{ $product['name'] }} 库存仅剩余 {{ $product_count }} 件,请及时补货<br> 13 | 您可以将商品的库存预警设置为0来禁用本通知</p> 14 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;">感谢您的访问,祝您使用愉快!<br>此致</p> 15 | </div> 16 | <p style="color: #999999;font-size:13px;line-height:24px;text-align:right;padding:0 32px 16px"> 17 | 此邮件为系统自动发送,请勿回复。</p> 18 | </div> 19 | </div> 20 | </div> -------------------------------------------------------------------------------- /resources/views/emails/test.blade.php: -------------------------------------------------------------------------------- 1 | <div class="email-paged" 2 | style="background-image: url();-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;background-position: center center;background-repeat: no-repeat;"> 3 | <div class="email-content" 4 | style="opacity:0.8;width:100%;max-width:720px;text-align: left;margin: 0 auto;padding-top: 80px;padding-bottom: 60px"> 5 | <div class="email-title" 6 | style="-webkit-box-shadow: 10px 10px 10px rgba(0,0,0,.13);box-shadow: 10px 10px 10px rgba(0,0,0,.13);"> 7 | <h1 style="color:#fff;background: #51a0e3;line-height:70px;font-size:24px;font-weight:normal;padding-left:40px;margin:0"> 8 | 测试邮件</h1> 9 | <div class="email-text" style="background:#fff;padding:20px 32px 0;"> 10 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;margin-top: 4px;">管理员:</p> 11 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;"> 12 | 如果您收到了此邮件,代表您的邮件发送测试成功。</p> 13 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;">感谢您的访问,祝您使用愉快!<br>此致</p> 14 | </div> 15 | <p style="color: #999999;font-size:13px;line-height:24px;text-align:right;padding:0 32px 16px"> 16 | 此邮件为系统自动发送,请勿回复。</p> 17 | </div> 18 | </div> 19 | </div> -------------------------------------------------------------------------------- /resources/views/errors/_.blade.php: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <meta charset="utf-8"> 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 | <meta name="viewport" content="width=device-width, initial-scale=1"> 7 | <title>{!! isset($code)?(string)$code:'error' !!}</title> 8 | 9 | <!-- Fonts --> 10 | <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css"> 11 | 12 | <!-- Styles --> 13 | <style type="text/css"> 14 | html,body{background-color:#fff;color:#636b6f;font-family:'Raleway',sans-serif;font-weight:100;height:100vh;margin:0}.full-height{height:100vh}.flex-center{display:flex;justify-content:center}.position-ref{position:relative}.content{text-align:center;padding-top:30vh}.title{font-size:36px;padding:20px} 15 | </style> 16 | </head> 17 | <body> 18 | <div class="flex-center position-ref full-height"> 19 | <div class="content"> 20 | <div class="title"> 21 | {!! isset($message)?$message:'喵~' !!} 22 | </div> 23 | </div> 24 | <div style="display: none"> 25 | {!! isset($exception) ? str_replace(base_path(), '/tmp/www/', $exception) : '' !!} 26 | </div> 27 | </div> 28 | </body> 29 | </html> 30 | -------------------------------------------------------------------------------- /resources/views/index.blade.php: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <meta charset="utf-8"> 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 | <meta name="viewport" content="width=device-width, initial-scale=1"> 7 | 8 | <title>Hello World!</title> 9 | 10 | <!-- Fonts --> 11 | <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css"> 12 | 13 | <!-- Styles --> 14 | <style> 15 | html, body { 16 | background-color: #fff; 17 | color: #636b6f; 18 | font-family: 'Raleway', sans-serif; 19 | font-weight: 100; 20 | height: 100vh; 21 | margin: 0; 22 | } 23 | 24 | .full-height { 25 | height: 100vh; 26 | } 27 | 28 | .flex-center { 29 | display: flex; 30 | justify-content: center; 31 | } 32 | 33 | .position-ref { 34 | position: relative; 35 | } 36 | 37 | .content { 38 | text-align: center; 39 | padding-top: 30vh; 40 | } 41 | 42 | .title { 43 | font-size: 36px; 44 | padding: 20px; 45 | } 46 | 47 | .message { 48 | font-size: 14px; 49 | padding: 20px; 50 | } 51 | </style> 52 | </head> 53 | <body> 54 | <div class="flex-center position-ref full-height"> 55 | <div class="content"> 56 | <div class="title"> 57 | This is<br> 58 | An Awesome Project 59 | </div> 60 | <div class="message"> 61 | Mail: 19060@qq.com 62 | </div> 63 | </div> 64 | </div> 65 | </body> 66 | </html> 67 | 68 | -------------------------------------------------------------------------------- /resources/views/install.blade.php: -------------------------------------------------------------------------------- 1 | <?php 2 | if (!isset($var)) die('error'); 3 | 4 | ?> 5 | 6 | <!DOCTYPE html> 7 | <html> 8 | <head> 9 | <meta charset=utf-8> 10 | <meta name=viewport content="width=device-width,initial-scale=1"> 11 | <title>card</title> 12 | </head> 13 | <body> 14 | <div class="email-paged" 15 | style="background-image: url();-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;background-position: center center;background-repeat: no-repeat;"> 16 | <div class="email-content" 17 | style="opacity:0.8;width:100%;max-width:720px;text-align: left;margin: 0 auto;padding-top: 80px;padding-bottom: 40px"> 18 | <div class="email-title" 19 | style="-webkit-box-shadow: 10px 10px 10px rgba(0,0,0,.13);box-shadow: 10px 10px 10px rgba(0,0,0,.13);"> 20 | <h1 style="color:#fff;background: #51a0e3;line-height:70px;font-size:24px;font-weight:normal;padding-left:40px;margin:0"> 21 | 安装检测</h1> 22 | <div class="email-text" style="background:#fff;padding:20px 32px 0;"> 23 | 24 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;">正在初始化...</p> 25 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;margin-top: 4px;"><?php echo $var['db']?></p> 26 | 27 | <?php if(isset($var['permission'])){ ?> 28 | <br/> 29 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;">进行目录检测... 30 | <span style="color: green">W</span>:可写, 31 | <span style="color: green">R</span>:可读 32 | </p> 33 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;margin-top: 4px;"><?php echo $var['permission']?></p> 34 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;"></p> 35 | <?php }?> 36 | <p style="color: #6e6e6e;font-size:13px;line-height:24px;">祝您使用愉快!</p> 37 | <br/> 38 | </div> 39 | </div> 40 | </div> 41 | </div> 42 | </body> 43 | </html> -------------------------------------------------------------------------------- /resources/views/message.blade.php: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <meta charset="utf-8"> 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 | <meta name="viewport" content="width=device-width, initial-scale=1"> 7 | 8 | <title>{{ isset($title) && $title ? $title : '提示' }}</title> 9 | 10 | <!-- Fonts --> 11 | <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css"> 12 | 13 | <!-- Styles --> 14 | <style> 15 | html, body { 16 | background-color: #fff; 17 | color: #636b6f; 18 | font-family: 'Raleway', sans-serif; 19 | font-weight: 100; 20 | height: 100vh; 21 | margin: 0; 22 | } 23 | 24 | .full-height { 25 | height: 100vh; 26 | } 27 | 28 | .flex-center { 29 | display: flex; 30 | justify-content: center; 31 | } 32 | 33 | .position-ref { 34 | position: relative; 35 | } 36 | 37 | .content { 38 | text-align: center; 39 | padding-top: 30vh; 40 | } 41 | 42 | .title { 43 | font-size: 36px; 44 | padding: 20px; 45 | } 46 | </style> 47 | </head> 48 | <body> 49 | <div class="flex-center position-ref full-height"> 50 | <div class="content"> 51 | <div class="title"> 52 | {!! $message !!} 53 | </div> 54 | </div> 55 | </div> 56 | </body> 57 | </html> 58 | <!-- 59 | {{ isset($exception) && $exception ? $exception : '' }} 60 | 61 | -------------------------------------------------------------------------------- /resources/views/pay/query.blade.php: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 5 | <meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport"> 6 | <title>支付结果</title> 7 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> 8 | <meta name="renderer" content="webkit"> 9 | <link type="text/css" href="/plugins/css/wx_qr.css" rel="stylesheet"> 10 | <script type="text/javascript" src="//ossweb-img.qq.com/images/js/jquery/jquery-1.9.1.min.js"></script> 11 | </head> 12 | <body> 13 | <div class="body"> 14 | <h1 class="mod-title"> 15 | <span class="text">支付处理中</span> 16 | </h1> 17 | <div class="mod-ct"> 18 | <div class="order"></div> 19 | <div class="amount">¥{{ sprintf('%0.2f',$amount/100) }}</div> 20 | <div class="tip"> 21 | <span class="dec dec-left"></span> 22 | <span class="dec dec-right"></span> 23 | <div class="tip-text"> 24 | <p>订单已支付, 正在处理...</p> 25 | </div> 26 | </div> 27 | </div> 28 | <div class="foot"> 29 | <div class="inner"> 30 | <p><?php echo SYS_NAME ?>, 有疑问请联系客服</p> 31 | </div> 32 | </div> 33 | </div> 34 | 35 | <script> 36 | 37 | $(document).ready(function () { 38 | var time = 4000, interval; 39 | 40 | function getData() { 41 | $.post('/api/qrcode/query/{!! $pay_id !!}', { 42 | id: '{!! $id !!}', 43 | t: Math.random() 44 | }, 45 | function (r) { 46 | clearInterval(interval); 47 | window.location = r.data; 48 | }, 'json'); 49 | } 50 | 51 | (function run() { 52 | interval = setInterval(getData, time); 53 | })(); 54 | }); 55 | </script> 56 | </body> 57 | </html> -------------------------------------------------------------------------------- /resources/views/shop_close.blade.php: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <meta charset="utf-8"> 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 | <meta name="viewport" content="width=device-width, initial-scale=1"> 7 | 8 | <title>店铺已被冻结</title> 9 | 10 | <!-- Fonts --> 11 | <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css"> 12 | 13 | <!-- Styles --> 14 | <style> 15 | html, body { 16 | background-color: #fff; 17 | color: #636b6f; 18 | font-family: 'Raleway', sans-serif; 19 | font-weight: 100; 20 | height: 100vh; 21 | margin: 0; 22 | } 23 | 24 | .full-height { 25 | height: 100vh; 26 | } 27 | 28 | .flex-center { 29 | display: flex; 30 | justify-content: center; 31 | } 32 | 33 | .position-ref { 34 | position: relative; 35 | } 36 | 37 | .content { 38 | text-align: center; 39 | padding-top: 30vh; 40 | } 41 | 42 | .title { 43 | font-size: 36px; 44 | padding: 20px; 45 | } 46 | 47 | .message { 48 | font-size: 16px; 49 | padding: 20px; 50 | } 51 | </style> 52 | </head> 53 | <body> 54 | <div class="flex-center position-ref full-height"> 55 | <div class="content"> 56 | <div class="title"> 57 | {{ $message }}} 58 | </div> 59 | <div class="message"> 60 | 如果您有订单需要投诉,<a href="{{ $complaint_link }}">点这里投诉订单</a> 61 | </div> 62 | </div> 63 | </div> 64 | </body> 65 | </html> 66 | 67 | -------------------------------------------------------------------------------- /resources/views/shop_theme/Classic/config.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 'description' => '经典主题', 5 | 'options' => [ 6 | 'list_type' => [ 7 | 'label' => '商品显示方式', 8 | 'type' => 'select', 9 | 'values' => [ 10 | 'dropdown' => [ 11 | 'label' => '下拉式' 12 | ], 13 | 'button' => [ 14 | 'label' => '按钮式' 15 | ] 16 | ], 17 | 'value' => 'dropdown' 18 | ] 19 | ] 20 | ]; -------------------------------------------------------------------------------- /resources/views/shop_theme/Classic/index.blade.php: -------------------------------------------------------------------------------- 1 | <?php 2 | $version = '2.3'; 3 | ?> 4 | @if(@preg_match('/(iPhone|iPod|Android|ios|SymbianOS|Windows Phone)/i', $_SERVER['HTTP_USER_AGENT'])) 5 | @include('shop_theme.Classic.mobile') 6 | @else 7 | @include('shop_theme.Classic.pc') 8 | @endif 9 | -------------------------------------------------------------------------------- /resources/views/shop_theme/Demo/config.php.bak: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 'description' => '测试模板', 5 | 'options' => [ 6 | 'theme' => [ 7 | 'label' => '风格', 8 | 'type' => 'radio', 9 | 'values' => [ 10 | 'light' => [ 11 | 'label' => '浅色主题' 12 | ], 13 | 'dark' => [ 14 | 'label' => '深色主题' 15 | ] 16 | ], 17 | 'value' => 'light' 18 | ], 19 | 'list_type' => [ 20 | 'label' => '商品显示方式', 21 | 'type' => 'select', 22 | 'hidden' => true, 23 | 'values' => [ 24 | 'list' => [ 25 | 'label' => '列表式' 26 | ] 27 | ], 28 | 'value' => 'list' 29 | ], 30 | 'test' => [ 31 | 'label' => '测试text', 32 | 'type' => 'text', 33 | 'inputType' => 'text', 34 | 'size' => 16, 35 | 'value' => '默认值' 36 | ], 37 | 'test_textarea' => [ 38 | 'label' => '测试textarea', 39 | 'type' => 'textarea', 40 | 'rows' => 5, 41 | 'value' => '默认值' 42 | ], 43 | 'test_checkbox' => [ 44 | 'label' => '测试checkbox', 45 | 'type' => 'checkbox', 46 | 'value' => 1 47 | ] 48 | ] 49 | ]; -------------------------------------------------------------------------------- /resources/views/shop_theme/MS/config.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | // 模板来源: 4 | // https://www.microsoftstore.com.cn/surface/surface-pro/p/mic2539 5 | return [ 6 | 'description' => 'Microsoft Shop', 7 | 'options' => [] 8 | ]; -------------------------------------------------------------------------------- /resources/views/shop_theme/Material/config.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 'description' => 'Material Design 简洁风格', 5 | 'options' => [ 6 | 'list_type' => [ 7 | 'label' => '商品列表显示方式', 8 | 'type' => 'select', 9 | 'values' => [ 10 | 'dropdown' => [ 11 | 'label' => '下拉式' 12 | ], 13 | 'button' => [ 14 | 'label' => '按钮式' 15 | ], 16 | 'list' => [ 17 | 'label' => '列表式' 18 | ] 19 | ], 20 | 'value' => 'button' 21 | ], 22 | 'single_mode' => [ 23 | 'label' => '单商品显示方式', 24 | 'type' => 'select', 25 | 'values' => [ 26 | 'flow' => [ 27 | 'label' => '上下平铺' 28 | ], 29 | 'flex' => [ 30 | 'label' => '左右并排' 31 | ], 32 | ], 33 | 'value' => 'flow' 34 | ], 35 | 'background' => [ 36 | 'label' => '背景图片', 37 | 'type' => 'text', 38 | 'inputType' => 'text', 39 | 'placeholder' => '请填写背景图片URL', 40 | 'value' => 'https://open.saintic.com/api/bingPic/' 41 | ], 42 | 'show_background' => [ 43 | 'label' => '显示背景图片', 44 | 'type' => 'checkbox', 45 | 'value' => 1 46 | ], 47 | 'music' => [ 48 | 'label' => '背景音乐', 49 | 'type' => 'text', 50 | 'inputType' => 'text', 51 | 'placeholder' => '请填写背景音乐URL, 如 https://link.hhtjim.com/qq/001DEjRI0ihriN.mp3', 52 | 'value' => '' 53 | ], 54 | ] 55 | ]; -------------------------------------------------------------------------------- /resources/views/shop_theme/Material/index.blade.php: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=mobile-web-app-capable content=yes><title>{{ $name }}</title><meta name=description content="{{ $description }}"><meta name=keywords content="{{ $keywords }}"><link href=/dist/css/app.da29588b.css rel=preload as=style><link href=/dist/css/chunk-vendors.56035cb7.css rel=preload as=style><link href=/dist/js/app.cc3c669d.js rel=preload as=script><link href=/dist/js/chunk-vendors.417713c2.js rel=preload as=script><link href=/dist/css/chunk-vendors.56035cb7.css rel=stylesheet><link href=/dist/css/app.da29588b.css rel=stylesheet></head><body><noscript><strong>We're sorry but web_shop doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=progress><div id=progress-timeout style="display: none; position:fixed;margin-top: 10vh;width:100%"><p>如果您长时间停留在此页面,请确认使用的是最新版浏览器</p><p>推荐浏览器:<a href=https://www.google.cn/intl/zh-CN_ALL/chrome/ target=_blank>Chrome</a> <a href=https://www.mozilla.org/zh-CN/firefox/ target=_blank>FireFox</a> <a href=http://browser.qq.com/ target=_blank><del>QQ浏览器</del></a></p></div><script>setTimeout(function(){var element=document.getElementById("progress-timeout");if(element){element.style.display="block"}},10000);</script></div><div id=app></div><div id=bkg></div><script>var config = @json($config);</script>{!! $js_tj !!} {!! $js_kf !!}<script src=/dist/js/chunk-vendors.417713c2.js></script><script src=/dist/js/app.cc3c669d.js></script></body></html> -------------------------------------------------------------------------------- /resources/views/shop_theme/Test/config (2).php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 'description' => '经典主题', 5 | 'options' => [ 6 | 'list_type' => [ 7 | 'label' => '商品显示方式', 8 | 'type' => 'select', 9 | 'values' => [ 10 | 'dropdown' => [ 11 | 'label' => '下拉式' 12 | ], 13 | 'button' => [ 14 | 'label' => '按钮式' 15 | ] 16 | ], 17 | 'value' => 'dropdown' 18 | ] 19 | ] 20 | ]; -------------------------------------------------------------------------------- /resources/views/shop_theme/Test/config.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | return [ 4 | 'description' => '测试模板', 5 | 'options' => [ 6 | 'theme' => [ 7 | 'label' => '风格', 8 | 'type' => 'radio', 9 | 'values' => [ 10 | 'light' => [ 11 | 'label' => '浅色主题' 12 | ], 13 | 'dark' => [ 14 | 'label' => '深色主题' 15 | ] 16 | ], 17 | 'value' => 'light' 18 | ], 19 | 'list_type' => [ 20 | 'label' => '商品显示方式', 21 | 'type' => 'select', 22 | 'hidden' => true, 23 | 'values' => [ 24 | 'list' => [ 25 | 'label' => '列表式' 26 | ] 27 | ], 28 | 'value' => 'list' 29 | ], 30 | 'test' => [ 31 | 'label' => '测试text', 32 | 'type' => 'text', 33 | 'inputType' => 'text', 34 | 'size' => 16, 35 | 'value' => '默认值' 36 | ], 37 | 'test_textarea' => [ 38 | 'label' => '测试textarea', 39 | 'type' => 'textarea', 40 | 'rows' => 5, 41 | 'value' => '默认值' 42 | ], 43 | 'test_checkbox' => [ 44 | 'label' => '测试checkbox', 45 | 'type' => 'checkbox', 46 | 'value' => 1 47 | ] 48 | ] 49 | ]; -------------------------------------------------------------------------------- /resources/views/shop_theme/Test/index.blade.php: -------------------------------------------------------------------------------- 1 | <?php 2 | $version = '1.0'; 3 | ?> 4 | @if(@preg_match('/(iPhone|iPod|Android|ios|SymbianOS|Windows Phone)/i', $_SERVER['HTTP_USER_AGENT'])) 5 | @include('shop_theme.Test.mobile') 6 | @else 7 | @include('shop_theme.Test.pc') 8 | @endif 9 | -------------------------------------------------------------------------------- /resources/views/utils/redirect.blade.php: -------------------------------------------------------------------------------- 1 | <html> 2 | <head><title>Loading</title></head> 3 | <body> 4 | <script language="javascript">window.location.href='{!! $url !!}'</script> 5 | <noscript><meta http-equiv="refresh" content="0;url={!! $url !!}"></noscript> 6 | </body> 7 | </html> 8 | <!-- a padding to disable MSIE and Chrome friendly error page --> 9 | <!-- a padding to disable MSIE and Chrome friendly error page --> 10 | <!-- a padding to disable MSIE and Chrome friendly error page --> 11 | <!-- a padding to disable MSIE and Chrome friendly error page --> 12 | <!-- a padding to disable MSIE and Chrome friendly error page --> 13 | <!-- a padding to disable MSIE and Chrome friendly error page --> 14 | -------------------------------------------------------------------------------- /resources/views/vendor/laravel-log-viewer/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tai7sy/card-system/915981e7ac55ed332b071483d7dce74f0edded0f/resources/views/vendor/laravel-log-viewer/.gitkeep -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | <?php 2 | Broadcast::channel('App.User.{id}', function ($spbfa519, $spdc31ea) { return (int) $spbfa519->id === (int) $spdc31ea; }); -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | <?php 2 | use Illuminate\Foundation\Inspiring; Artisan::command('inspire', function () { $this->comment(Inspiring::quote()); })->describe('Display an inspiring quote'); -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | <?php 2 | Route::get('/', 'HomeController@shop'); if (config('app.debug')) { Route::get('/install', 'DevController@install'); Route::get('/test', 'DevController@test'); } Route::get('/storage/{file_path}', 'Merchant\\File@renderImage')->where('file_path', '.+'); Route::get('/pay/{order_no}', 'Shop\\Pay@pay'); Route::any('/pay/return/{pay_id}/{out_trade_no}', 'Shop\\Pay@payReturn'); Route::any('/pay/return/{pay_id}', 'Shop\\Pay@payReturn'); Route::any('/pay/notify/{pay_id}', 'Shop\\Pay@payNotify'); Route::get('/qrcode/pay/{order_no}/{pay_file}', 'Shop\\Pay@qrcode'); Route::get('/pay/result/{order_no}', 'Shop\\Pay@result')->name('pay.result'); Route::get('/admin', 'HomeController@admin'); Route::get('/admin/{all}', 'HomeController@admin')->where('all', '.*'); Route::get('/c/{en_category_id}', 'HomeController@shop_category'); Route::get('/p/{en_product_id}', 'HomeController@shop_product'); Route::get('/s', 'HomeController@shop_default'); -------------------------------------------------------------------------------- /storage/app/card_export/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/images/complaint/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/images/message/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/images/product/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/images/qrcode/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/images/verify/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/withdraw_auto/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/withdraw_export/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | namespace Tests; 4 | 5 | use Illuminate\Support\Facades\Hash; 6 | use Illuminate\Contracts\Console\Kernel; 7 | 8 | trait CreatesApplication 9 | { 10 | /** 11 | * Creates the application. 12 | * 13 | * @return \Illuminate\Foundation\Application 14 | */ 15 | public function createApplication() 16 | { 17 | $app = require __DIR__.'/../bootstrap/app.php'; 18 | 19 | $app->make(Kernel::class)->bootstrap(); 20 | 21 | Hash::setRounds(4); 22 | 23 | return $app; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/Feature/AdminTest.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | namespace Tests\Feature; 4 | 5 | use Tests\TestCase; 6 | use Illuminate\Foundation\Testing\WithFaker; 7 | use Illuminate\Foundation\Testing\RefreshDatabase; 8 | 9 | class AdminTest extends TestCase 10 | { 11 | /** 12 | * A basic test example. 13 | * 14 | * @return void 15 | */ 16 | 17 | function testAction() 18 | { 19 | $this->assertTrue(true); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/Feature/BasicTest.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | namespace Tests\Feature; 4 | 5 | use Tests\TestCase; 6 | use Illuminate\Foundation\Testing\WithFaker; 7 | use Illuminate\Foundation\Testing\RefreshDatabase; 8 | 9 | class BasicTest extends TestCase 10 | { 11 | /** 12 | * A basic test example. 13 | * 14 | * @return void 15 | */ 16 | 17 | function testHomePage() 18 | { 19 | $response = $this->get('/'); 20 | $response->assertStatus(200); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | namespace Tests; 4 | 5 | use Illuminate\Foundation\Testing\TestCase as BaseTestCase; 6 | 7 | abstract class TestCase extends BaseTestCase 8 | { 9 | use CreatesApplication; 10 | } 11 | -------------------------------------------------------------------------------- /tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | namespace Tests\Unit; 4 | 5 | use Tests\TestCase; 6 | use Illuminate\Foundation\Testing\RefreshDatabase; 7 | 8 | class ExampleTest extends TestCase 9 | { 10 | /** 11 | * A basic test example. 12 | * 13 | * @return void 14 | */ 15 | public function testBasicTest() 16 | { 17 | $this->assertTrue(true); 18 | } 19 | } 20 | --------------------------------------------------------------------------------