diff --git a/README.md b/README.md
index 22a6034c..abfadbd8 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@
#### 使用协议
-虽然尝试了解过开源协议,但是理解的模棱两可,干脆用自己的协议吧,算不算开源我也不很清楚。
+虽然尝试了解过开源协议,但是理解的模棱两可,干脆用自己的协议吧。
1. 本系统属于强业务类型,非通用类库框架,不适合再次衍生发布。
2. 在保留我们版权标识的前提下,用户可以修改以满足自己的需求,可以用于商业用途。
@@ -74,7 +74,7 @@
#### 有商业服务吗?
-生存是一个问题,生存才能发展,我们为用户提供的服务包括:
+生存才能发展,我们目前提供的服务包括:
- 系统安装
- 系统定制
diff --git a/app/Console/Tasks/SyncCourseIndexTask.php b/app/Console/Tasks/SyncCourseIndexTask.php
index 1578f036..ae1f7076 100644
--- a/app/Console/Tasks/SyncCourseIndexTask.php
+++ b/app/Console/Tasks/SyncCourseIndexTask.php
@@ -12,8 +12,6 @@ class SyncCourseIndexTask extends Task
public function mainAction()
{
- $cache = $this->getCache();
-
$redis = $this->getRedis();
$key = $this->getSyncKey();
diff --git a/app/Console/Tasks/SyncGroupIndexTask.php b/app/Console/Tasks/SyncGroupIndexTask.php
index d48223de..a233c1a5 100644
--- a/app/Console/Tasks/SyncGroupIndexTask.php
+++ b/app/Console/Tasks/SyncGroupIndexTask.php
@@ -12,8 +12,6 @@ class SyncGroupIndexTask extends Task
public function mainAction()
{
- $cache = $this->getCache();
-
$redis = $this->getRedis();
$key = $this->getSyncKey();
diff --git a/app/Console/Tasks/SyncLearningTask.php b/app/Console/Tasks/SyncLearningTask.php
index 8adbc36e..af1f41aa 100644
--- a/app/Console/Tasks/SyncLearningTask.php
+++ b/app/Console/Tasks/SyncLearningTask.php
@@ -16,8 +16,6 @@ class SyncLearningTask extends Task
public function mainAction()
{
- $cache = $this->getCache();
-
$redis = $this->getRedis();
$sync = new LearningSync();
diff --git a/app/Console/Tasks/SyncUserIndexTask.php b/app/Console/Tasks/SyncUserIndexTask.php
index 7e55f3da..f792a465 100644
--- a/app/Console/Tasks/SyncUserIndexTask.php
+++ b/app/Console/Tasks/SyncUserIndexTask.php
@@ -12,8 +12,6 @@ class SyncUserIndexTask extends Task
public function mainAction()
{
- $cache = $this->getCache();
-
$redis = $this->getRedis();
$key = $this->getSyncKey();
diff --git a/app/Console/Tasks/UpgradeTask.php b/app/Console/Tasks/UpgradeTask.php
index a8600332..13bb53fb 100644
--- a/app/Console/Tasks/UpgradeTask.php
+++ b/app/Console/Tasks/UpgradeTask.php
@@ -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');
diff --git a/app/Http/Admin/Services/WxpayTest.php b/app/Http/Admin/Services/WxpayTest.php
index b6094d6e..053d3e1f 100644
--- a/app/Http/Admin/Services/WxpayTest.php
+++ b/app/Http/Admin/Services/WxpayTest.php
@@ -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)
diff --git a/app/Http/Home/Controllers/OrderController.php b/app/Http/Home/Controllers/OrderController.php
index 9f4550cb..591c8187 100644
--- a/app/Http/Home/Controllers/OrderController.php
+++ b/app/Http/Home/Controllers/OrderController.php
@@ -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]);
}
diff --git a/app/Http/Home/Services/Trade.php b/app/Http/Home/Services/Trade.php
index 50e176dd..629fc986 100644
--- a/app/Http/Home/Services/Trade.php
+++ b/app/Http/Home/Services/Trade.php
@@ -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;
}
}
diff --git a/app/Http/Home/Views/order/info.volt b/app/Http/Home/Views/order/info.volt
index 33b78cd5..c4472b16 100644
--- a/app/Http/Home/Views/order/info.volt
+++ b/app/Http/Home/Views/order/info.volt
@@ -21,10 +21,10 @@