1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-24 20:06:09 +08:00

测试前台支付,增加若干命令行快捷方法

This commit is contained in:
xiaochong0302 2020-09-25 17:29:32 +08:00
parent 5e5fbedea9
commit 98a302e796
12 changed files with 37 additions and 21 deletions

View File

@ -29,7 +29,7 @@
#### 使用协议
虽然尝试了解过开源协议,但是理解的模棱两可,干脆用自己的协议吧,算不算开源我也不很清楚
虽然尝试了解过开源协议,但是理解的模棱两可,干脆用自己的协议吧。
1. 本系统属于强业务类型,非通用类库框架,不适合再次衍生发布。
2. 在保留我们版权标识的前提下,用户可以修改以满足自己的需求,可以用于商业用途。
@ -74,7 +74,7 @@
#### 有商业服务吗?
生存是一个问题,生存才能发展,我们为用户提供的服务包括:
生存才能发展,我们目前提供的服务包括:
- 系统安装
- 系统定制

View File

@ -12,8 +12,6 @@ class SyncCourseIndexTask extends Task
public function mainAction()
{
$cache = $this->getCache();
$redis = $this->getRedis();
$key = $this->getSyncKey();

View File

@ -12,8 +12,6 @@ class SyncGroupIndexTask extends Task
public function mainAction()
{
$cache = $this->getCache();
$redis = $this->getRedis();
$key = $this->getSyncKey();

View File

@ -16,8 +16,6 @@ class SyncLearningTask extends Task
public function mainAction()
{
$cache = $this->getCache();
$redis = $this->getRedis();
$sync = new LearningSync();

View File

@ -12,8 +12,6 @@ class SyncUserIndexTask extends Task
public function mainAction()
{
$cache = $this->getCache();
$redis = $this->getRedis();
$key = $this->getSyncKey();

View File

@ -43,7 +43,7 @@ class UpgradeTask extends Task
public function resetAnnotationAction()
{
$config = $this->getConfig();
$cache = $this->getCache();
$redis = $this->getRedis();
$dbIndex = $config->path('annotation.db');
@ -74,7 +74,7 @@ class UpgradeTask extends Task
public function resetMetadataAction()
{
$config = $this->getConfig();
$cache = $this->getCache();
$redis = $this->getRedis();
$dbIndex = $config->path('metadata.db');

View File

@ -14,9 +14,18 @@ class WxpayTest extends PayTest
{
$wxpayService = new WxpayService();
$qrcode = $wxpayService->scan($trade);
$code = $wxpayService->scan($trade);
return $qrcode ?: false;
$codeUrl = null;
if ($code) {
$codeUrl = $this->url->get(
['for' => 'home.qrcode'],
['text' => urlencode($code)]
);
}
return $codeUrl ?: false;
}
public function status($tradeNo)

View File

@ -67,7 +67,10 @@ class OrderController extends Controller
$order = $service->handle();
$location = $this->url->get(['for' => 'home.order.pay'], ['sn' => $order->sn]);
$location = $this->url->get(
['for' => 'home.order.pay'],
['sn' => $order->sn]
);
return $this->jsonSuccess(['location' => $location]);
}

View File

@ -72,9 +72,20 @@ class Trade extends Service
protected function getWxpayQrCode(TradeModel $trade)
{
$qrCode = null;
$service = new WxpayService();
return $service->scan($trade);
$text = $service->scan($trade);
if ($text) {
$qrCode = $this->url->get(
['for' => 'home.qrcode'],
['text' => urlencode($text)]
);
}
return $qrCode;
}
}

View File

@ -21,10 +21,10 @@
</table>
<br>
<div class="center">
{% if order.status == 'pending' %}
{% if order.status == 1 %}
<a class="layui-btn layui-bg-blue" href="{{ order_pay_url }}" target="_top">立即支付</a>
{% endif %}
{% if (order.item_type in ['course','package']) and (order.status == 'finished') %}
{% if (order.item_type in [1,2]) and (order.status == 3) %}
<a class="layui-btn layui-bg-blue" href="{{ refund_confirm_url }}">申请退款</a>
{% endif %}
</div>

View File

@ -2,6 +2,9 @@
{% block content %}
{% set create_url = url({'for':'home.trade.create'}) %}
{% set status_url = url({'for':'home.trade.status'}) %}
<div class="layui-breadcrumb breadcrumb">
<a href="/">首页</a>
<a><cite>支付订单</cite></a>
@ -14,8 +17,6 @@
支付金额:<span class="amount">{{ '¥%0.2f'|format(order.amount) }}</span>
</div>
<div class="channel">
{% set create_url = url({'for':'home.trade.create'}) %}
{% set status_url = url({'for':'home.trade.status'}) %}
<a class="alipay btn-pay" href="javascript:" data-channel="1"></a>
<a class="wxpay btn-pay" href="javascript:" data-channel="2"></a>
</div>

View File

@ -27,7 +27,7 @@
<a href="javascript:" class="nav-search" data-type="{{ s_type }}" data-query="{{ s_query }}" data-url="{{ s_url }}"><i class="layui-icon layui-icon-search"></i> 搜索</a>
</li>
<li class="layui-nav-item">
<a href="{{ url({'for':'home.vip.index'}) }}" class="nav-vip" target="vip"><i class="layui-icon layui-icon-diamond"></i> 会员</a>
<a href="{{ url({'for':'home.vip.index'}) }}" class="nav-vip"><i class="layui-icon layui-icon-diamond"></i> 会员</a>
</li>
<li class="layui-nav-item">
<a href="{{ url({'for':'home.im.index'}) }}" class="nav-im" target="im"><i class="layui-icon layui-icon-chat"></i> 微聊</a>