升级laravel-admin

This commit is contained in:
2022-05-24 16:19:12 +08:00
parent c3461e1335
commit 955c0dda2a
10 changed files with 249 additions and 19 deletions

View File

@@ -7,6 +7,7 @@ use Illuminate\Http\Request;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use XuanChen\Petro; use XuanChen\Petro;
use XuanChen\PetroYsd;
class PetroController class PetroController
{ {
@@ -15,14 +16,50 @@ class PetroController
{ {
try { try {
//获取动态码 $res = PetroYsd::Invalid()
$res = Petro::Check()->setParams([ ->setParams([
'ticketNum' => '61578832475977235', 'requestId' => Str::random(32),
'random' => Str::random(6), 'couponId' => '2830025247791780434',
])->start(); 'couponType' => 0,
])->start();
dd($res); dd($res);
// $res = PetroYsd::Query()
// ->setParams([
// 'requestId' => Str::random(32),
// 'thirdOrderId' => 'B6Q1rzCITRretxUFkIlFUtEciW7kNnq5',
// ])->start();
//
// dd($res);
// $res = PetroYsd::Detail()
// ->setParams([
// 'requestId' => Str::random(32),
// 'couponId' => '2830025247791780426',
// 'couponType' => 0,
// ])->start();
//
// dd($res);
$res = PetroYsd::Grant()->setParams([
'requestId' => Str::random(32),
'productNo' => 'hljlt_hlj6yypcs',
'mobile' => '15663876870',
'num' => 1,
'thirdOrderId' => Str::random(32),
])->start();
dd($res);
dd('老板程序');
//获取动态码
// $res = Petro::Check()->setParams([
// 'ticketNum' => '61578832475977235',
// 'random' => Str::random(6),
// ])->start();
//
// dd($res);
// $res = Petro::Bill()->setParams([ // $res = Petro::Bill()->setParams([
// 'matchDate' => Carbon::now()->format('Ymd'), // 'matchDate' => Carbon::now()->format('Ymd'),
// 'pageNo' => 1, // 'pageNo' => 1,

View File

@@ -9,7 +9,7 @@
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^7.3|^8.0", "php": "^7.3|^8.0",
"encore/laravel-admin": "1.*", "encore/laravel-admin": "^1.8",
"fideloper/proxy": "^4.4", "fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0", "fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1", "guzzlehttp/guzzle": "^7.0.1",
@@ -19,6 +19,7 @@
"predis/predis": "^1.1", "predis/predis": "^1.1",
"xuanchen/coupon": "^1.0", "xuanchen/coupon": "^1.0",
"xuanchen/petro": "^1.0", "xuanchen/petro": "^1.0",
"xuanchen/petro-ysd": "dev-main",
"xuanchen/unionpay": "^3.0.0" "xuanchen/unionpay": "^3.0.0"
}, },
"require-dev": { "require-dev": {

105
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "8ae60394194187c6f32ba6dd833951bf", "content-hash": "1fde4d1d7b4ed4a586277a4f6a0f0d95",
"packages": [ "packages": [
{ {
"name": "asm89/stack-cors", "name": "asm89/stack-cors",
@@ -908,16 +908,16 @@
}, },
{ {
"name": "encore/laravel-admin", "name": "encore/laravel-admin",
"version": "v1.8.17", "version": "v1.8.19",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/z-song/laravel-admin.git", "url": "https://github.com/z-song/laravel-admin.git",
"reference": "45c58c656fcc6a8c57423d2256f3b7a73e783441" "reference": "6c292ebb5efa886fa4776d86e975180608505946"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/z-song/laravel-admin/zipball/45c58c656fcc6a8c57423d2256f3b7a73e783441", "url": "https://api.github.com/repos/z-song/laravel-admin/zipball/6c292ebb5efa886fa4776d86e975180608505946",
"reference": "45c58c656fcc6a8c57423d2256f3b7a73e783441", "reference": "6c292ebb5efa886fa4776d86e975180608505946",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@@ -982,9 +982,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/z-song/laravel-admin/issues", "issues": "https://github.com/z-song/laravel-admin/issues",
"source": "https://github.com/z-song/laravel-admin/tree/v1.8.17" "source": "https://github.com/z-song/laravel-admin/tree/v1.8.19"
}, },
"time": "2021-12-31T08:36:33+00:00" "time": "2022-05-24T03:49:38+00:00"
}, },
{ {
"name": "ezyang/htmlpurifier", "name": "ezyang/htmlpurifier",
@@ -3506,7 +3506,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed", "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
"reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed", "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
@@ -7221,7 +7227,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/xuanchen120/coupon/zipball/6d32a7e33509cc95ba2309cda5b34efbd9ddd9e6", "url": "https://api.github.com/repos/xuanchen120/coupon/zipball/6d32a7e33509cc95ba2309cda5b34efbd9ddd9e6",
"reference": "6d32a7e33509cc95ba2309cda5b34efbd9ddd9e6", "reference": "6d32a7e33509cc95ba2309cda5b34efbd9ddd9e6",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"laravel/framework": "*", "laravel/framework": "*",
@@ -7270,7 +7282,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/xuanchen120/petro/zipball/730e3dbe8194fea8cbee34839769071721fd9704", "url": "https://api.github.com/repos/xuanchen120/petro/zipball/730e3dbe8194fea8cbee34839769071721fd9704",
"reference": "730e3dbe8194fea8cbee34839769071721fd9704", "reference": "730e3dbe8194fea8cbee34839769071721fd9704",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"guzzlehttp/guzzle": "^7.0.0", "guzzlehttp/guzzle": "^7.0.0",
@@ -7312,6 +7330,67 @@
}, },
"time": "2022-03-04T07:06:08+00:00" "time": "2022-03-04T07:06:08+00:00"
}, },
{
"name": "xuanchen/petro-ysd",
"version": "dev-main",
"source": {
"type": "git",
"url": "https://github.com/xuanchen120/petroYsd.git",
"reference": "ac79759dc5b1e03a9d4d1fe09c2ea184aa3e3d7c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/xuanchen120/petroYsd/zipball/ac79759dc5b1e03a9d4d1fe09c2ea184aa3e3d7c",
"reference": "ac79759dc5b1e03a9d4d1fe09c2ea184aa3e3d7c",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"guzzlehttp/guzzle": "^7.0.0",
"illuminate/support": "^7.0|^8.0",
"laravel/framework": "*",
"php": ">=7.1.3",
"pimple/pimple": "^3.0"
},
"default-branch": true,
"type": "library",
"extra": {
"laravel": {
"providers": [
"XuanChen\\PetroYsd\\ServiceProvider"
],
"aliases": {
"Petro": "XuanChen\\PetroYsd"
}
}
},
"autoload": {
"psr-4": {
"XuanChen\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "玄尘",
"email": "122383162@qq.com"
}
],
"description": "优惠券",
"support": {
"issues": "https://github.com/xuanchen120/petroYsd/issues",
"source": "https://github.com/xuanchen120/petroYsd/tree/main"
},
"time": "2022-05-20T07:16:51+00:00"
},
{ {
"name": "xuanchen/unionpay", "name": "xuanchen/unionpay",
"version": "3.4.0", "version": "3.4.0",
@@ -10116,12 +10195,14 @@
], ],
"aliases": [], "aliases": [],
"minimum-stability": "dev", "minimum-stability": "dev",
"stability-flags": [], "stability-flags": {
"xuanchen/petro-ysd": 20
},
"prefer-stable": true, "prefer-stable": true,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": "^7.3|^8.0" "php": "^7.3|^8.0"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.2.0" "plugin-api-version": "2.0.0"
} }

26
config/petro.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
return [
/**
* 服务器地址
*/
'base_uri' => env('PETRO_BASE_URI', ''),
/**
* 字符集
*/
'characterSet' => '00',
/**
* 商户编号
*/
'strVendorCode' => env('PETRO_STR_VENDOR_CODE', ''),
/**
*商户秘钥
*/
'merchantKey' => env('PETRO_MERCHANT_KEY', ''),
/**
* 单个电子券秘钥
*/
'couponKey' => env('PETRO_COUPON_KEY', ''),
'ysd_notice_url' => 'https://lifetest.ysd-bs.com/api/store/callback',
];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,68 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.zh = {}));
}(this, (function (exports) { 'use strict';
var fp = typeof window !== "undefined" && window.flatpickr !== undefined
? window.flatpickr
: {
l10ns: {},
};
var Mandarin = {
weekdays: {
shorthand: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
longhand: [
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
],
},
months: {
shorthand: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
longhand: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
},
rangeSeparator: " 至 ",
weekAbbreviation: "周",
scrollTitle: "滚动切换",
toggleTitle: "点击切换 12/24 小时时制",
};
fp.l10ns.zh = Mandarin;
var zh = fp.l10ns;
exports.Mandarin = Mandarin;
exports.default = zh;
Object.defineProperty(exports, '__esModule', { value: true });
})));

View File

@@ -0,0 +1,2 @@
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ShortcutButtonsPlugin=e():t.ShortcutButtonsPlugin=e()}(window,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const o={theme:"light"};e.ShortcutButtonsPlugin=function(t){const e=Object.assign({},o,t);return t=>{let n;function o(n){n.stopPropagation(),n.preventDefault();const o=n.target;if("button"!==o.tagName.toLowerCase()||void 0===e.onClick)return;const r=parseInt(o.dataset.index,10),c=Array.isArray(e.onClick)?e.onClick:[e.onClick];for(const e of c)"function"==typeof e&&e(r,t)}return{onReady:()=>{if((n=document.createElement("div")).classList.add("shortcut-buttons-flatpickr-wrapper",e.theme),void 0!==e.label&&e.label.length){const t=document.createElement("div");t.classList.add("shortcut-buttons-flatpickr-label"),t.textContent=e.label,n.appendChild(t)}const r=document.createElement("div");r.classList.add("shortcut-buttons-flatpickr-buttons"),(Array.isArray(e.button)?e.button:[e.button]).forEach((t,e)=>{const n=document.createElement("button");n.classList.add("shortcut-buttons-flatpickr-button"),n.textContent=t.label,n.dataset.index=String(e),r.appendChild(n)}),n.appendChild(r),t.calendarContainer.appendChild(n),n.addEventListener("click",o)},onDestroy:()=>{n.removeEventListener("click",o),n=void 0}}}}}]).ShortcutButtonsPlugin});
//# sourceMappingURL=shortcut-buttons-flatpickr.min.js.map

View File

@@ -0,0 +1 @@
.shortcut-buttons-flatpickr-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:5px}.shortcut-buttons-flatpickr-wrapper>.shortcut-buttons-flatpickr-label{-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:0 5px}.shortcut-buttons-flatpickr-wrapper>.shortcut-buttons-flatpickr-buttons{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}.shortcut-buttons-flatpickr-buttons>.shortcut-buttons-flatpickr-button{margin:2px}.light.shortcut-buttons-flatpickr-wrapper{background-color:#eceef1;color:#5a6171}

File diff suppressed because one or more lines are too long