修复后台别名设置

This commit is contained in:
Anyon 2020-04-23 17:35:42 +08:00
parent 81a0b93b35
commit 83489a4628
11 changed files with 32 additions and 32 deletions

View File

@ -37,10 +37,10 @@ class Config extends Controller
public function options() public function options()
{ {
$this->_applyFormToken(); $this->_applyFormToken();
$this->thrNotify = url('@wechat/api.push', [], false, true)->build(); $this->thrNotify = sysuri('wechat/api.push/index', [], false, true);
if ($this->request->isGet()) { if ($this->request->isGet()) {
try { try {
$source = enbase64url(url('@admin', [], false, true) . '#' . $this->request->url()); $source = enbase64url(sysuri('admin/index/index', [], false, true) . '#' . $this->request->url());
$this->authurl = "http://open.cuci.cc/service/api.push/auth?source={$source}"; $this->authurl = "http://open.cuci.cc/service/api.push/auth?source={$source}";
if (input('?appid') && input('?appkey')) { if (input('?appid') && input('?appkey')) {
sysconf('wechat.type', 'thr'); sysconf('wechat.type', 'thr');
@ -70,8 +70,8 @@ class Config extends Controller
} }
} }
sysoplog('微信管理', '修改微信授权配置成功'); sysoplog('微信管理', '修改微信授权配置成功');
$location = url('@wechat/config/options') . '?uniqid=' . uniqid(); $location = url('wechat/config/options') . '?uniqid=' . uniqid();
$this->success('微信参数修改成功!', url('@admin') . "#{$location}"); $this->success('微信参数修改成功!', sysuri('admin/index/index') . "#{$location}");
} }
} }

View File

@ -76,7 +76,7 @@ class Keys extends Controller
protected function _index_page_filter(&$data) protected function _index_page_filter(&$data)
{ {
foreach ($data as &$vo) { foreach ($data as &$vo) {
$vo['qrc'] = url('@wechat/keys/index') . "?action=qrc&keys={$vo['keys']}"; $vo['qrc'] = url('wechat/keys/index') . "?action=qrc&keys={$vo['keys']}";
$vo['type'] = isset($this->types[$vo['type']]) ? $this->types[$vo['type']] : $vo['type']; $vo['type'] = isset($this->types[$vo['type']]) ? $this->types[$vo['type']] : $vo['type'];
} }
} }

View File

@ -48,7 +48,7 @@ class Login extends Controller
{ {
$mode = intval(input('mode', '0')); $mode = intval(input('mode', '0'));
$code = $this->prefix . md5(uniqid('t', true) . rand(10000, 99999)); $code = $this->prefix . md5(uniqid('t', true) . rand(10000, 99999));
$text = url('@wechat/api.login/oauth', [], false, true) . "?code={$code}&mode={$mode}"; $text = url('wechat/api.login/oauth', [], false, true) . "?code={$code}&mode={$mode}";
// 生成二维码并返回结果 // 生成二维码并返回结果
$qrcode = new \Endroid\QrCode\QrCode(); $qrcode = new \Endroid\QrCode\QrCode();
$qrcode->setText($text)->setSize(300)->setPadding(20); $qrcode->setText($text)->setSize(300)->setPadding(20);

View File

@ -36,7 +36,7 @@ class Test extends Controller
*/ */
public function jsapi_qrc() public function jsapi_qrc()
{ {
$this->url = url('@wechat/api.test/jsapi', [], false, true); $this->url = url('wechat/api.test/jsapi', [], false, true);
return $this->showQrc($this->url); return $this->showQrc($this->url);
} }
@ -49,7 +49,7 @@ class Test extends Controller
*/ */
public function oauth_qrc() public function oauth_qrc()
{ {
$this->url = url('@wechat/api.test/oauth', [], false, true); $this->url = url('wechat/api.test/oauth', [], false, true);
return $this->showQrc($this->url); return $this->showQrc($this->url);
} }
@ -62,7 +62,7 @@ class Test extends Controller
*/ */
public function jssdk_qrc() public function jssdk_qrc()
{ {
$this->url = url('@wechat/api.test/jssdk', [], false, true); $this->url = url('wechat/api.test/jssdk', [], false, true);
return $this->showQrc($this->url); return $this->showQrc($this->url);
} }
@ -96,7 +96,7 @@ class Test extends Controller
'body' => '测试商品', 'body' => '测试商品',
'total_fee' => '1', 'total_fee' => '1',
'trade_type' => 'NATIVE', 'trade_type' => 'NATIVE',
'notify_url' => url('@wechat/api.test/notify', [], false, true)->build(), 'notify_url' => url('wechat/api.test/notify', [], false, true)->build(),
'out_trade_no' => CodeExtend::uniqidNumber(18), 'out_trade_no' => CodeExtend::uniqidNumber(18),
'spbill_create_ip' => $this->request->ip(), 'spbill_create_ip' => $this->request->ip(),
]); ]);
@ -154,7 +154,7 @@ class Test extends Controller
'body' => "测试商品产品ID{$notify['product_id']}", 'body' => "测试商品产品ID{$notify['product_id']}",
'total_fee' => '1', 'total_fee' => '1',
'trade_type' => 'NATIVE', 'trade_type' => 'NATIVE',
'notify_url' => url('@wechat/api.test/notify', [], false, true)->build(), 'notify_url' => url('wechat/api.test/notify', [], false, true)->build(),
'out_trade_no' => CodeExtend::uniqidDate(18), 'out_trade_no' => CodeExtend::uniqidDate(18),
'spbill_create_ip' => $this->request->ip(), 'spbill_create_ip' => $this->request->ip(),
]; ];
@ -199,7 +199,7 @@ class Test extends Controller
'openid' => $user['openid'], 'openid' => $user['openid'],
'total_fee' => '1', 'total_fee' => '1',
'trade_type' => 'JSAPI', 'trade_type' => 'JSAPI',
'notify_url' => url('@wechat/api.test/notify', [], false, true), 'notify_url' => url('wechat/api.test/notify', [], false, true),
'out_trade_no' => CodeExtend::uniqidDate(18), 'out_trade_no' => CodeExtend::uniqidDate(18),
'spbill_create_ip' => $this->request->ip(), 'spbill_create_ip' => $this->request->ip(),
]); ]);

View File

@ -6,12 +6,12 @@
{notempty name='news.articles'} {notempty name='news.articles'}
{foreach $news.articles as $k => $v} {foreach $news.articles as $k => $v}
{if $k < 1} {if $k < 1}
<a href="{:url('@wechat/api.review/view')}?id={$v.id}" style='background-image:url("{$v.local_url}")'> <a href="{:url('wechat/api.review/view')}?id={$v.id}" style='background-image:url("{$v.local_url}")'>
{if $v.title}<span>{$v.title}</span>{/if} {if $v.title}<span>{$v.title}</span>{/if}
</a> </a>
<div class="hr-line-dashed"></div> <div class="hr-line-dashed"></div>
{else} {else}
<a href="{:url('@wechat/api.review/view')}?id={$v.id}" class='other'> <a href="{:url('wechat/api.review/view')}?id={$v.id}" class='other'>
<span>{$v.title}</span> <span>{$v.title}</span>
<span style='background-image:url("{$v.local_url}");'></span> <span style='background-image:url("{$v.local_url}");'></span>
</a> </a>

View File

@ -16,29 +16,29 @@
</div> </div>
<div> <div>
<p class="font-w7">支付测试配置</p> <p class="font-w7">支付测试配置</p>
JSAPI 支付测试需要在微信商户平台配置支付目录:<a data-copy="{:url('@wechat/api.test/',[],'',true)}">{:url('@wechat/api.test/',[],'',true)}</a><br> JSAPI 支付测试需要在微信商户平台配置支付目录:<a data-copy="{:url('wechat/api.test/',[],'',true)}">{:sysuri('wechat/api.test/index',[],'',true)}</a><br>
扫码支付①需要在微信商户平台配置支付通知地址:<a data-copy="{:url('@wechat/api.test/scan_one_notify',[],'',true)}">{:url('@wechat/api.test/scan_one_notify',[],'',true)}</a> 扫码支付①需要在微信商户平台配置支付通知地址:<a data-copy="{:url('wechat/api.test/scan_one_notify',[],'',true)}">{:url('wechat/api.test/scan_one_notify',[],'',true)}</a>
</div> </div>
</div> </div>
<div class="layui-clear"> <div class="layui-clear">
<div class="pull-left padding-right-15 notselect"> <div class="pull-left padding-right-15 notselect">
<img alt="" class="notselect" data-tips-image src="{:url('@wechat/api.test/oauth_qrc')}" style="width:120px"> <img alt="" class="notselect" data-tips-image src="{:url('wechat/api.test/oauth_qrc')}" style="width:120px">
<p class="text-center">网页授权</p> <p class="text-center">网页授权</p>
</div> </div>
<div class="pull-left padding-left-0 padding-right-15"> <div class="pull-left padding-left-0 padding-right-15">
<img alt="img" class="notselect" data-tips-image src="{:url('@wechat/api.test/jssdk_qrc')}" style="width:120px;"> <img alt="img" class="notselect" data-tips-image src="{:url('wechat/api.test/jssdk_qrc')}" style="width:120px;">
<p class="text-center">JSSDK签名</p> <p class="text-center">JSSDK签名</p>
</div> </div>
<div class="pull-left padding-left-0 padding-right-15"> <div class="pull-left padding-left-0 padding-right-15">
<img alt="img" onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('@wechat/api.test/jsapi_qrc')}" style="width:120px;"> <img alt="img" onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('wechat/api.test/jsapi_qrc')}" style="width:120px;">
<p class="text-center">JSAPI支付</p> <p class="text-center">JSAPI支付</p>
</div> </div>
<div class="pull-left padding-left-0 padding-right-15"> <div class="pull-left padding-left-0 padding-right-15">
<img alt="img" onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('@wechat/api.test/scan_one_qrc')}" style="width:120px;"> <img alt="img" onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('wechat/api.test/scan_one_qrc')}" style="width:120px;">
<p class="text-center">扫码支付①</p> <p class="text-center">扫码支付①</p>
</div> </div>
<div class="pull-left padding-left-0"> <div class="pull-left padding-left-0">
<img alt="img" onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('@wechat/api.test/scan_two_qrc')}" style="width:120px;"> <img alt="img" onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('wechat/api.test/scan_two_qrc')}" style="width:120px;">
<p class="text-center">扫码支付②</p> <p class="text-center">扫码支付②</p>
</div> </div>
</div> </div>

View File

@ -14,7 +14,7 @@
{foreach $list as $vo} {foreach $list as $vo}
<div class="news-item"> <div class="news-item">
<div class='news-tools layui-hide'> <div class='news-tools layui-hide'>
<a data-phone-view="{:url('@wechat/api.review/news')}?id={$vo.id}" href='javascript:void(0)'>预览</a> <a data-phone-view="{:url('wechat/api.review/news')}?id={$vo.id}" href='javascript:void(0)'>预览</a>
<a data-open='{:url("edit")}?id={$vo.id}' href='javascript:void(0)'>编辑</a> <a data-open='{:url("edit")}?id={$vo.id}' href='javascript:void(0)'>编辑</a>
<a data-news-del="{$vo.id}" href='javascript:void(0)'>删除</a> <a data-news-del="{$vo.id}" href='javascript:void(0)'>删除</a>
</div> </div>

8
composer.lock generated
View File

@ -909,12 +909,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "2858d5d77526e064d7dd89f793ae9269310a6cba" "reference": "ecc7e82523daebbd8e57d7e19b216e795d3d229e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/2858d5d77526e064d7dd89f793ae9269310a6cba", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/ecc7e82523daebbd8e57d7e19b216e795d3d229e",
"reference": "2858d5d77526e064d7dd89f793ae9269310a6cba", "reference": "ecc7e82523daebbd8e57d7e19b216e795d3d229e",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -958,7 +958,7 @@
], ],
"description": "ThinkPHP v6.0 Development Library", "description": "ThinkPHP v6.0 Development Library",
"homepage": "http://framework.thinkadmin.top", "homepage": "http://framework.thinkadmin.top",
"time": "2020-04-23T09:13:17+00:00" "time": "2020-04-23T09:32:46+00:00"
}, },
{ {
"name": "zoujingli/wechat-developer", "name": "zoujingli/wechat-developer",

View File

@ -935,12 +935,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "2858d5d77526e064d7dd89f793ae9269310a6cba" "reference": "ecc7e82523daebbd8e57d7e19b216e795d3d229e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/2858d5d77526e064d7dd89f793ae9269310a6cba", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/ecc7e82523daebbd8e57d7e19b216e795d3d229e",
"reference": "2858d5d77526e064d7dd89f793ae9269310a6cba", "reference": "ecc7e82523daebbd8e57d7e19b216e795d3d229e",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -956,7 +956,7 @@
"ext-json": "*", "ext-json": "*",
"topthink/framework": "^6.0" "topthink/framework": "^6.0"
}, },
"time": "2020-04-23T09:13:17+00:00", "time": "2020-04-23T09:32:46+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"think": { "think": {

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php <?php
// This file is automatically generated at:2020-04-23 17:17:37 // This file is automatically generated at:2020-04-23 17:35:28
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'think\\app\\Service', 0 => 'think\\app\\Service',

View File

@ -90,7 +90,7 @@ class PageHelper extends Helper
foreach ([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200] as $num) { foreach ([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200] as $num) {
[$query['limit'], $query['page'], $selects] = [$num, 1, $limit === $num ? 'selected' : '']; [$query['limit'], $query['page'], $selects] = [$num, 1, $limit === $num ? 'selected' : ''];
if (stripos($this->app->request->get('spm', '-'), 'm-') === 0) { if (stripos($this->app->request->get('spm', '-'), 'm-') === 0) {
$url = url('@admin') . '#' . $this->app->request->baseUrl() . '?' . urldecode(http_build_query($query)); $url = sysuri('admin/index/index') . '#' . $this->app->request->baseUrl() . '?' . urldecode(http_build_query($query));
} else { } else {
$url = $this->app->request->baseUrl() . '?' . urldecode(http_build_query($query)); $url = $this->app->request->baseUrl() . '?' . urldecode(http_build_query($query));
} }