1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-21 11:18:10 +08:00

优化代码

This commit is contained in:
xiaochong0302 2020-08-13 21:28:08 +08:00
parent 1e2398388a
commit aa58ba4243
26 changed files with 434 additions and 354 deletions

View File

@ -54,7 +54,8 @@ class CloseTradeTask extends Task
$allowClosed = false;
} elseif ($alipayTrade->trade_status == 'WAIT_BUYER_PAY') {
$alipay->close($trade->sn);
$allowClosed = $alipay->close($trade->sn);
}
}
@ -90,7 +91,8 @@ class CloseTradeTask extends Task
$allowClosed = false;
} elseif ($wxpayTrade->trade_state == 'NOTPAY') {
$wxpay->close($trade->sn);
$allowClosed = $wxpay->close($trade->sn);
}
}
@ -107,7 +109,7 @@ class CloseTradeTask extends Task
* @param int $limit
* @return ResultsetInterface|Resultset|TradeModel[]
*/
protected function findTrades($limit = 5)
protected function findTrades($limit = 15)
{
$status = TradeModel::STATUS_PENDING;

View File

@ -4,7 +4,7 @@ namespace App\Console\Tasks;
use App\Models\Chapter as ChapterModel;
use App\Repos\Chapter as ChapterRepo;
use App\Services\CourseStats as CourseStatsService;
use App\Services\CourseStat as CourseStatService;
use App\Services\Vod as VodService;
use Phalcon\Cli\Task;
@ -146,7 +146,7 @@ class VodEventTask extends Task
protected function updateVodAttrs($courseId)
{
$courseStats = new CourseStatsService();
$courseStats = new CourseStatService();
$courseStats->updateVodAttrs($courseId);
}

View File

@ -158,8 +158,13 @@ class SettingController extends Controller
} else {
$alipay = $settingService->getSectionSettings('pay.alipay');
$alipay->notify_url = $alipay->notify_url ?: kg_full_url(['for' => 'web.alipay_notify']);
$wxpay = $settingService->getSectionSettings('pay.wxpay');
$wxpay->notify_url = $wxpay->notify_url ?: kg_full_url(['for' => 'web.wxpay_notify']);
$this->view->setVar('alipay', $alipay);
$this->view->setVar('wxpay', $wxpay);
}

View File

@ -471,12 +471,6 @@ class AuthNode extends Service
'type' => 'button',
'route' => 'admin.order.show',
],
[
'id' => '3-1-4',
'title' => '关闭订单',
'type' => 'button',
'route' => 'admin.order.close',
],
],
],
[
@ -486,7 +480,7 @@ class AuthNode extends Service
'children' => [
[
'id' => '3-2-1',
'title' => '交易记录',
'title' => '交易列表',
'type' => 'menu',
'route' => 'admin.trade.list',
],
@ -498,12 +492,6 @@ class AuthNode extends Service
],
[
'id' => '3-2-3',
'title' => '关闭交易',
'type' => 'button',
'route' => 'admin.trade.close',
],
[
'id' => '3-2-4',
'title' => '交易退款',
'type' => 'button',
'route' => 'admin.trade.refund',

View File

@ -11,7 +11,7 @@ use App\Models\ChapterVod as ChapterVodModel;
use App\Models\Course as CourseModel;
use App\Repos\Chapter as ChapterRepo;
use App\Repos\Course as CourseRepo;
use App\Services\CourseStats as CourseStatsService;
use App\Services\CourseStat as CourseStatService;
use App\Validators\Chapter as ChapterValidator;
class Chapter extends Service
@ -107,7 +107,7 @@ class Chapter extends Service
$this->updateChapterStats($chapter);
$this->updateCourseStats($chapter);
$this->updateCourseStat($chapter);
return $chapter;
@ -164,7 +164,7 @@ class Chapter extends Service
$this->updateChapterStats($chapter);
$this->updateCourseStats($chapter);
$this->updateCourseStat($chapter);
$this->rebuildCatalogCache($chapter);
@ -185,7 +185,7 @@ class Chapter extends Service
$this->updateChapterStats($chapter);
$this->updateCourseStats($chapter);
$this->updateCourseStat($chapter);
$this->rebuildCatalogCache($chapter);
@ -202,7 +202,7 @@ class Chapter extends Service
$this->updateChapterStats($chapter);
$this->updateCourseStats($chapter);
$this->updateCourseStat($chapter);
$this->rebuildCatalogCache($chapter);
@ -222,13 +222,13 @@ class Chapter extends Service
$chapter->update();
}
protected function updateCourseStats(ChapterModel $chapter)
protected function updateCourseStat(ChapterModel $chapter)
{
$courseRepo = new CourseRepo();
$course = $courseRepo->findById($chapter->course_id);
$courseStats = new CourseStatsService();
$courseStats = new CourseStatService();
$courseStats->updateLessonCount($course->id);

View File

@ -8,7 +8,7 @@ use App\Models\Course as CourseModel;
use App\Repos\Chapter as ChapterRepo;
use App\Repos\Course as CourseRepo;
use App\Services\ChapterVod as ChapterVodService;
use App\Services\CourseStats as CourseStatsService;
use App\Services\CourseStat as CourseStatService;
use App\Validators\ChapterLive as ChapterLiveValidator;
use App\Validators\ChapterRead as ChapterReadValidator;
use App\Validators\ChapterVod as ChapterVodValidator;
@ -97,7 +97,7 @@ class ChapterContent extends Service
$chapter->update(['attrs' => $attrs]);
$courseStats = new CourseStatsService();
$courseStats = new CourseStatService();
$courseStats->updateVodAttrs($chapter->course_id);
}
@ -132,7 +132,7 @@ class ChapterContent extends Service
$chapter->update(['attrs' => $attrs]);
$courseStats = new CourseStatsService();
$courseStats = new CourseStatService();
$courseStats->updateLiveAttrs($chapter->course_id);
}
@ -161,7 +161,7 @@ class ChapterContent extends Service
$chapter->update(['attrs' => $attrs]);
$courseStats = new CourseStatsService();
$courseStats = new CourseStatService();
$courseStats->updateReadAttrs($chapter->course_id);
}

View File

@ -6,6 +6,7 @@ use App\Builders\ReviewList as ReviewListBuilder;
use App\Library\Paginator\Query as PagerQuery;
use App\Repos\Course as CourseRepo;
use App\Repos\Review as ReviewRepo;
use App\Services\CourseStat as CourseStatService;
use App\Validators\Review as ReviewValidator;
class Review extends Service
@ -56,8 +57,16 @@ class Review extends Service
$data['content'] = $validator->checkContent($post['content']);
}
if (isset($post['rating'])) {
$data['rating'] = $validator->checkRating($post['rating']);
if (isset($post['rating1'])) {
$data['rating1'] = $validator->checkRating($post['rating1']);
}
if (isset($post['rating2'])) {
$data['rating2'] = $validator->checkRating($post['rating2']);
}
if (isset($post['rating3'])) {
$data['rating3'] = $validator->checkRating($post['rating3']);
}
if (isset($post['published'])) {
@ -66,6 +75,8 @@ class Review extends Service
$review->update($data);
$this->updateCourseRating($review->course_id);
return $review;
}
@ -77,13 +88,7 @@ class Review extends Service
$review->update();
$courseRepo = new CourseRepo();
$course = $courseRepo->findById($review->course_id);
$course->review_count -= 1;
$course->update();
$this->decrCourseReviewCount($review->course_id);
}
public function restoreReview($id)
@ -94,13 +99,7 @@ class Review extends Service
$review->update();
$courseRepo = new CourseRepo();
$course = $courseRepo->findById($review->course_id);
$course->review_count += 1;
$course->update();
$this->incrCourseReviewCount($review->course_id);
}
protected function findOrFail($id)
@ -110,6 +109,35 @@ class Review extends Service
return $validator->checkReview($id);
}
protected function incrCourseReviewCount($courseId)
{
$courseRepo = new CourseRepo();
$course = $courseRepo->findById($courseId);
$course->review_count -= 1;
$course->update();
}
protected function decrCourseReviewCount($courseId)
{
$courseRepo = new CourseRepo();
$course = $courseRepo->findById($courseId);
$course->review_count += 1;
$course->update();
}
protected function updateCourseRating($courseId)
{
$service = new CourseStatService();
$service->updateRating($courseId);
}
protected function handleReviews($pager)
{
if ($pager->total_items > 0) {

View File

@ -4,7 +4,7 @@
{%- macro private_info(value) %}
{% if value == 1 %}
<span class="layui-badge layui-bg-red">密</span>
<span class="layui-badge">密</span>
{% endif %}
{%- endmacro %}
@ -39,29 +39,28 @@
</thead>
<tbody>
{% for item in pager.items %}
{% set list_url = url({'for':'admin.consult.list'},{'course_id':item.course.id}) %}
{% set item.answer = item.answer ? item.answer : '等待回复ING...' %}
{% set list_by_course_url = url({'for':'admin.consult.list'},{'course_id':item.course.id}) %}
{% set list_by_user_url = url({'for':'admin.consult.list'},{'owner_id':item.owner.id}) %}
{% set edit_url = url({'for':'admin.consult.edit','id':item.id}) %}
{% set update_url = url({'for':'admin.consult.update','id':item.id}) %}
{% set delete_url = url({'for':'admin.consult.delete','id':item.id}) %}
{% set restore_url = url({'for':'admin.consult.restore','id':item.id}) %}
<tr>
<td>
<p>课程:<a href="{{ list_url }}">{{ item.course.title }}</a>{{ private_info(item.private) }}</p>
<p>提问:<a href="javascript:" title="{{ item.question }}">{{ substr(item.question,0,30) }}</a></p>
{% if item.answer %}
<p>回复:<a href="javascript:" title="{{ item.answer }}">{{ substr(item.answer,0,30) }}</a></p>
{% endif %}
<p>课程:<a href="{{ list_by_course_url }}">{{ item.course.title }}</a>{{ private_info(item.private) }}</p>
<p class="layui-elip kg-item-elip" title="{{ item.question }}">提问:{{ item.question }}</p>
<p class="layui-elip kg-item-elip" title="{{ item.answer }}">回复:{{ item.answer }}</p>
</td>
<td>
<p>昵称:{{ item.owner.name }}</p>
<p>昵称:<a href="{{ list_by_user_url }}">{{ item.owner.name }}</a></p>
<p>编号:{{ item.owner.id }}</p>
</td>
<td>{{ date('Y-m-d H:i:s',item.create_time) }}</td>
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否" lay-filter="published" data-url="{{ update_url }}" {% if item.published == 1 %}checked{% endif %}></td>
<td class="center">
<div class="layui-dropdown">
<button class="layui-btn layui-btn-sm">操作 <i class="layui-icon layui-icon-triangle-d"></i>
</button>
<button class="layui-btn layui-btn-sm">操作 <i class="layui-icon layui-icon-triangle-d"></i></button>
<ul>
<li><a href="{{ edit_url }}">编辑</a></li>
{% if item.deleted == 0 %}

View File

@ -7,16 +7,30 @@
<legend>编辑评价</legend>
</fieldset>
<div class="layui-form-item">
<label class="layui-form-label">评分</label>
<label class="layui-form-label">内容实用</label>
<div class="layui-input-block">
<div id="rating">{{ review.rating }}</div>
<input type="hidden" name="rating" value="{{ review.rating }}"/>
<div id="rating1" class="kg-rating"></div>
<input type="hidden" name="rating1" value="{{ review.rating1 }}"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">评价</label>
<label class="layui-form-label">通俗易懂</label>
<div class="layui-input-block">
<textarea name="content" class="layui-textarea" lay-verify="required">{{ review.content }}</textarea>
<div id="rating2" class="kg-rating"></div>
<input type="hidden" name="rating2" value="{{ review.rating2 }}"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">逻辑清晰</label>
<div class="layui-input-block">
<div id="rating3" class="kg-rating"></div>
<input type="hidden" name="rating3" value="{{ review.rating3 }}"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label" for="content">评价</label>
<div class="layui-input-block">
<textarea name="content" id="content" class="layui-textarea" lay-verify="required">{{ review.content }}</textarea>
</div>
</div>
<div class="layui-form-item">
@ -46,11 +60,31 @@
var $ = layui.jquery;
var rate = layui.rate;
var $rating1 = $('input[name=rating1]');
var $rating2 = $('input[name=rating2]');
var $rating3 = $('input[name=rating3]');
rate.render({
elem: '#rating',
value: $('#rating').text(),
elem: '#rating1',
value: $rating1.val(),
choose: function (value) {
$('input[name=rating]').val(value);
$rating1.val(value);
}
});
rate.render({
elem: '#rating2',
value: $rating2.val(),
choose: function (value) {
$rating2.val(value);
}
});
rate.render({
elem: '#rating3',
value: $rating3.val(),
choose: function (value) {
$rating3.val(value);
}
});

View File

@ -42,7 +42,7 @@
<tr>
<td>
<p>课程:<a href="{{ list_by_course_url }}">{{ item.course.title }}</a></p>
<p>评价:<a href="javascript:" title="{{ item.content }}">{{ substr(item.content,0,30) }}</a></p>
<p class="layui-elip kg-item-elip" title="{{ item.content }}">评价:{{ item.content }}</p>
<p>时间:{{ date('Y-m-d H:i:s',item.create_time) }}</p>
</td>
<td>

View File

@ -88,8 +88,6 @@
layer.msg(json.msg, {icon: 2});
}
});
}, function () {
});
});

View File

@ -27,14 +27,14 @@
</thead>
<tbody>
{% for item in pager.items %}
{% set answer = item.answer ? item.answer : '请耐心等待回复吧' %}
{% set item.answer = item.answer ? item.answer : '请耐心等待回复吧' %}
{% set show_url = url({'for':'web.consult.show','id':item.id}) %}
{% set edit_url = url({'for':'web.consult.edit','id':item.id}) %}
{% set delete_url = url({'for':'web.consult.delete','id':item.id}) %}
<tr>
<td>
<p class="question layui-elip" title="{{ item.question }}">提问:{{ item.question }}</p>
<p class="answer layui-elip" title="{{ item.answer }}">回复:{{ answer }}</p>
<p class="layui-elip item-elip" title="{{ item.question }}">提问:{{ item.question }}</p>
<p class="layui-elip item-elip" title="{{ item.answer }}">回复:{{ item.answer }}</p>
</td>
<td>{{ date('Y-m-d',item.create_time) }}</td>
<td>

View File

@ -32,7 +32,7 @@
<div class="column price">{{ '¥%0.2f'|format(item.amount) }}</div>
<div class="column status">{{ order_status(item.status) }}</div>
<div class="column action">
<button class="layui-btn layui-btn-xs btn-order-info" data-url="{{ order_info_url }}">详情</button>
<button class="layui-btn layui-btn-sm btn-order-info" data-url="{{ order_info_url }}">详情</button>
</div>
</div>
</div>

View File

@ -32,7 +32,7 @@
<div class="column price">{{ '¥%0.2f'|format(item.amount) }}</div>
<div class="column status">{{ refund_status(item.status) }}</div>
<div class="column action">
<button class="layui-btn layui-btn-xs btn-refund-info" data-url="{{ refund_info_url }}">详情</button>
<button class="layui-btn layui-btn-sm btn-refund-info" data-url="{{ refund_info_url }}">详情</button>
</div>
</div>
</div>

View File

@ -21,7 +21,6 @@
</table>
<br>
<div class="text-center">
<button class="layui-btn layui-bg-gray btn-close">关闭窗口</button>
{% if refund.status == 'approved' %}
<button class="kg-refund layui-btn" data-sn="{{ refund.sn }}" data-url="{{ cancel_url }}">取消退款</button>
{% endif %}
@ -53,8 +52,6 @@
}, 1500);
}
});
}, function () {
});
});
});

View File

@ -3,8 +3,9 @@
namespace App\Services;
use App\Repos\Course as CourseRepo;
use App\Repos\CourseRating as CourseRatingRepo;
class CourseStats extends Service
class CourseStat extends Service
{
public function updateLessonCount($courseId)
@ -39,9 +40,18 @@ class CourseStats extends Service
$course = $courseRepo->findById($courseId);
$rating = $courseRepo->averageRating($courseId);
$courseRatingRepo = new CourseRatingRepo();
$course->rating = $rating;
$courseRating = $courseRatingRepo->findByCourseId($course->id);
$courseRating->rating = $courseRatingRepo->averageRating($course->id);
$courseRating->rating1 = $courseRatingRepo->averageRating1($course->id);
$courseRating->rating2 = $courseRatingRepo->averageRating2($course->id);
$courseRating->rating3 = $courseRatingRepo->averageRating3($course->id);
$courseRating->update();
$course->rating = $courseRating->rating;
$course->update();
}

View File

@ -79,12 +79,14 @@ class ConsultCreate extends FrontendService
protected function incrCourseConsultCount(CourseModel $course)
{
$course->consult_count += 1;
$course->update();
}
protected function incrChapterConsultCount(ChapterModel $chapter)
{
$chapter->consult_count += 1;
$chapter->update();
}

View File

@ -4,6 +4,7 @@ namespace App\Services\Frontend\Review;
use App\Models\Course as CourseModel;
use App\Models\Review as ReviewModel;
use App\Services\CourseStat as CourseStatService;
use App\Services\Frontend\CourseTrait;
use App\Services\Frontend\ReviewTrait;
use App\Services\Frontend\Service as FrontendService;
@ -45,17 +46,25 @@ class ReviewCreate extends FrontendService
$review->create($data);
$this->updateCourseRating($course);
$this->incrCourseReviewCount($course);
$this->updateCourseRating($course->id);
return $review;
}
protected function incrCourseReviewCount(CourseModel $course)
{
$course->review_count += 1;
$course->update();
}
public function updateCourseRating($courseId)
{
$service = new CourseStatService();
$service->updateRating($courseId);
}
}

View File

@ -3,6 +3,7 @@
namespace App\Services\Frontend\Review;
use App\Models\Course as CourseModel;
use App\Services\CourseStat as CourseStatService;
use App\Services\Frontend\CourseTrait;
use App\Services\Frontend\ReviewTrait;
use App\Services\Frontend\Service as FrontendService;
@ -30,7 +31,7 @@ class ReviewDelete extends FrontendService
$this->decrCourseReviewCount($course);
$this->updateCourseRating($course);
$this->updateCourseRating($course->id);
}
protected function decrCourseReviewCount(CourseModel $course)
@ -41,4 +42,11 @@ class ReviewDelete extends FrontendService
}
}
protected function updateCourseRating($courseId)
{
$service = new CourseStatService();
$service->updateRating($courseId);
}
}

View File

@ -2,6 +2,7 @@
namespace App\Services\Frontend\Review;
use App\Services\CourseStat as CourseStatService;
use App\Services\Frontend\CourseTrait;
use App\Services\Frontend\ReviewTrait;
use App\Services\Frontend\Service as FrontendService;
@ -38,7 +39,14 @@ class ReviewUpdate extends FrontendService
$review->update($data);
$this->updateCourseRating($course);
$this->updateCourseRating($course->id);
}
protected function updateCourseRating($courseId)
{
$service = new CourseStatService();
$service->updateRating($courseId);
}
}

View File

@ -2,8 +2,6 @@
namespace App\Services\Frontend;
use App\Models\Course as CourseModel;
use App\Repos\CourseRating as CourseRatingRepo;
use App\Validators\Review as ReviewValidator;
trait ReviewTrait
@ -16,22 +14,4 @@ trait ReviewTrait
return $validator->checkReview($id);
}
public function updateCourseRating(CourseModel $course)
{
$repo = new CourseRatingRepo();
$courseRating = $repo->findByCourseId($course->id);
$courseRating->rating = $repo->averageRating($course->id);
$courseRating->rating1 = $repo->averageRating1($course->id);
$courseRating->rating2 = $repo->averageRating2($course->id);
$courseRating->rating3 = $repo->averageRating3($course->id);
$courseRating->update();
$course->rating = $courseRating->rating;
$course->update();
}
}

View File

@ -20,7 +20,7 @@
"hightman/xunsearch": "^1.4.14",
"aferrandini/phpqrcode": "1.0.1",
"xiaochong0302/ip2region": "^1.0",
"joyqi/hyper-down": "dev-master"
"samdark/sitemap": "^2.2"
},
"require-dev": {
"odan/phinx-migrations-generator": "^4.6",

441
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "d95c023895ee3acc72bcd13024da3eb3",
"content-hash": "c572e75b0438b57f01c4b4a6ff65f174",
"packages": [
{
"name": "aferrandini/phpqrcode",
@ -87,16 +87,16 @@
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
}
},
"notification-url": "https://packagist.org/downloads/",
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@ -564,16 +564,16 @@
},
"notification-url": "https://packagist.jp/downloads/",
"license": [
"GPL-2.0+"
"GPL-2.0+"
],
"authors": [
{
"name": "hightman",
"email": "hightman@twomice.net",
"role": "Founder and project leader"
}
],
"description": "xunsearch php sdk, include yii, yii2 supports",
"authors": [
{
"name": "hightman",
"email": "hightman@twomice.net",
"role": "Founder and project leader"
}
],
"description": "xunsearch php sdk, include yii, yii2 supports",
"homepage": "http://www.xunsearch.com/",
"keywords": [
"search engine",
@ -583,48 +583,6 @@
],
"time": "2019-11-01T02:17:32+00:00"
},
{
"name": "joyqi/hyper-down",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/SegmentFault/HyperDown.git",
"reference": "e9bf808ff8cc1736b15a669e46f1d81f77ce026b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/SegmentFault/HyperDown/zipball/e9bf808ff8cc1736b15a669e46f1d81f77ce026b",
"reference": "e9bf808ff8cc1736b15a669e46f1d81f77ce026b",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.4.0"
},
"type": "library",
"autoload": {
"psr-4": {
"HyperDown\\": "./"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD"
],
"authors": [
{
"name": "joyqi",
"email": "joyqi@segmentfault.com"
}
],
"description": "A light weight markdown parser library",
"time": "2019-11-18T09:50:06+00:00"
},
{
"name": "monolog/monolog",
"version": "2.0.0",
@ -645,16 +603,16 @@
}
]
},
"require": {
"php": "^7.2",
"psr/log": "^1.0.1"
},
"provide": {
"psr/log-implementation": "1.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"require": {
"php": "^7.2",
"psr/log": "^1.0.1"
},
"provide": {
"psr/log-implementation": "1.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"elasticsearch/elasticsearch": "^6.0",
"graylog2/gelf-php": "^1.4.2",
"jakub-onderka/php-parallel-lint": "^0.9",
@ -732,9 +690,9 @@
}
]
},
"require": {
"php": ">=5.3.2"
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"phpunit/phpunit": "~4.0|~5.0"
},
@ -1192,35 +1150,86 @@
"license": [
"MIT"
],
"authors": [
{
"name": "Ralph Khattar",
"email": "ralph.khattar@gmail.com"
}
],
"description": "A polyfill for getallheaders.",
"time": "2019-03-08T08:55:37+00:00"
"authors": [
{
"name": "Ralph Khattar",
"email": "ralph.khattar@gmail.com"
}
],
"description": "A polyfill for getallheaders.",
"time": "2019-03-08T08:55:37+00:00"
},
{
"name": "samdark/sitemap",
"version": "2.2.1",
"source": {
"type": "git",
"url": "https://github.com/samdark/sitemap.git",
"reference": "dcfef471e79abca9d3c4d83dd6a7861cec1a596a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/samdark/sitemap/zipball/dcfef471e79abca9d3c4d83dd6a7861cec1a596a",
"reference": "dcfef471e79abca9d3c4d83dd6a7861cec1a596a",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-xmlwriter": "*",
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
},
"type": "library",
"autoload": {
"psr-4": {
"samdark\\sitemap\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "swiftmailer/swiftmailer",
"version": "v6.2.1",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a",
"reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"name": "Alexander Makarov",
"email": "sam@rmcreative.ru",
"homepage": "http://rmcreative.ru/"
}
],
"description": "Sitemap and sitemap index builder",
"homepage": "https://github.com/samdark/sitemap",
"keywords": [
"Sitemap"
],
"time": "2019-03-27T09:31:20+00:00"
},
{
"name": "swiftmailer/swiftmailer",
"version": "v6.2.1",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a",
"reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"egulias/email-validator": "~2.0",
"php": ">=7.0.0",
@ -1929,9 +1938,9 @@
}
]
},
"require": {
"workerman/workerman": ">=3.1.8"
},
"require": {
"workerman/workerman": ">=3.1.8"
},
"type": "library",
"autoload": {
"psr-4": {
@ -2012,12 +2021,12 @@
"autoload": {
"psr-4": {
"Workerman\\": "./"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "walkor",
@ -2074,16 +2083,16 @@
}
],
"description": "ip2region扩展包",
"keywords": [
"Ip2Region"
],
"time": "2019-08-18T14:57:02+00:00"
},
{
"name": "yansongda/pay",
"version": "v2.8.6",
"source": {
"type": "git",
"keywords": [
"Ip2Region"
],
"time": "2019-08-18T14:57:02+00:00"
},
{
"name": "yansongda/pay",
"version": "v2.8.6",
"source": {
"type": "git",
"url": "https://github.com/yansongda/pay.git",
"reference": "841999b65f97466ed1b405c52400c0c73aeaa3b5"
},
@ -2109,34 +2118,34 @@
"symfony/http-foundation": "^4.0",
"yansongda/supports": "^2.0"
},
"require-dev": {
"mockery/mockery": "^1.2",
"phpunit/phpunit": "^7.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Yansongda\\Pay\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "yansongda",
"email": "me@yansongda.cn"
}
],
"description": "专注 Alipay 和 WeChat 的支付扩展包",
"keywords": [
"alipay",
"pay",
"wechat"
],
"time": "2019-09-21T15:05:57+00:00"
},
"require-dev": {
"mockery/mockery": "^1.2",
"phpunit/phpunit": "^7.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Yansongda\\Pay\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "yansongda",
"email": "me@yansongda.cn"
}
],
"description": "专注 Alipay 和 WeChat 的支付扩展包",
"keywords": [
"alipay",
"pay",
"wechat"
],
"time": "2019-09-21T15:05:57+00:00"
},
{
"name": "yansongda/supports",
"version": "v2.1.3",
@ -2177,16 +2186,16 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "yansongda",
"email": "me@yansongda.cn"
}
],
"description": "common components",
"license": [
"MIT"
],
"authors": [
{
"name": "yansongda",
"email": "me@yansongda.cn"
}
],
"description": "common components",
"keywords": [
"Guzzle",
"array",
@ -2442,16 +2451,16 @@
"name": "CakePHP Community",
"homepage": "https://github.com/cakephp/cache/graphs/contributors"
}
],
"description": "Easy to use Caching library with support for multiple caching backends",
"homepage": "https://cakephp.org",
"keywords": [
"cache",
"caching",
"cakephp"
],
"time": "2019-11-20T00:00:46+00:00"
},
],
"description": "Easy to use Caching library with support for multiple caching backends",
"homepage": "https://cakephp.org",
"keywords": [
"cache",
"caching",
"cakephp"
],
"time": "2019-11-20T00:00:46+00:00"
},
{
"name": "cakephp/collection",
"version": "3.8.7",
@ -2752,16 +2761,16 @@
"type": "library",
"autoload": {
"psr-4": {
"Cake\\Utility\\": "."
"Cake\\Utility\\": "."
},
"files": [
"bootstrap.php"
]
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.jp/downloads/",
"license": [
"MIT"
],
"notification-url": "https://packagist.jp/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "CakePHP Community",
@ -3158,16 +3167,16 @@
}
},
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
}
},
"notification-url": "https://packagist.jp/downloads/",
"license": [
"MIT"
],
"authors": [
{
"psr-4": {
"Psr\\Container\\": "src/"
}
},
"notification-url": "https://packagist.jp/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
@ -3755,16 +3764,16 @@
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to writing services",
"homepage": "https://symfony.com",
"keywords": [
@ -3889,23 +3898,23 @@
"require-dev": {
"symfony/console": "^4.4|^5.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.jp/downloads/",
"license": [
"MIT"
@ -3983,9 +3992,7 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"joyqi/hyper-down": 20
},
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {

View File

@ -116,6 +116,18 @@
text-align: center;
}
.kg-item-elip {
width: 400px;
}
.layui-form .kg-rating {
margin-bottom: 0;
}
.kg-rating .layui-rate {
padding: 5px 0 0 0;
}
input.kg-priority {
width: 60px;
}

View File

@ -182,6 +182,31 @@ body {
margin-bottom: 15px;
}
.topic-title {
margin-bottom: 30px;
padding-bottom: 15px;
border-bottom: 2px solid #e6e6e6;
text-align: center;
font-size: 18px;
}
.page-info {
padding: 20px 50px;
min-height: 500px;
}
.page-title {
margin-bottom: 30px;
padding-bottom: 15px;
border-bottom: 1px solid #e6e6e6;
text-align: center;
font-size: 18px;
}
.help-list li {
line-height: 30px;
}
.index-wrap .layui-tab {
margin-bottom: 0;
}
@ -307,31 +332,6 @@ body {
margin-bottom: 5px;
}
.topic-title {
margin-bottom: 30px;
padding-bottom: 15px;
border-bottom: 2px solid #e6e6e6;
text-align: center;
font-size: 18px;
}
.page-info {
padding: 20px 50px;
min-height: 500px;
}
.page-title {
margin-bottom: 30px;
padding-bottom: 15px;
border-bottom: 1px solid #e6e6e6;
text-align: center;
font-size: 18px;
}
.help-list li {
line-height: 30px;
}
.course-list {
margin-bottom: 20px;
}
@ -1426,11 +1426,7 @@ body {
text-align: center;
}
.consult-table .question {
width: 450px;
}
.consult-table .answer {
.consult-table .item-elip {
width: 450px;
}

View File

@ -43,13 +43,10 @@ $scheduler->php($script, $bin, ['--task' => 'unlock_user', '--action' => 'main']
$scheduler->php($script, $bin, ['--task' => 'revoke_vip', '--action' => 'main'])
->daily(3, 11);
$scheduler->php($script, $bin, ['--task' => 'count_course', '--action' => 'main'])
$scheduler->php($script, $bin, ['--task' => 'live_notice_provider', '--action' => 'main'])
->daily(3, 17);
$scheduler->php($script, $bin, ['--task' => 'live_notice_provider', '--action' => 'main'])
$scheduler->php($script, $bin, ['--task' => 'clean_token', '--action' => 'main'])
->daily(3, 23);
$scheduler->php($script, $bin, ['--task' => 'clean_token', '--action' => 'main'])
->daily(3, 31);
$scheduler->run();