mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修改服务接口
This commit is contained in:
parent
de52938bde
commit
ebbfd75e11
@ -44,15 +44,14 @@ class Config extends BasicAdmin
|
|||||||
{
|
{
|
||||||
if ($this->request->isGet()) {
|
if ($this->request->isGet()) {
|
||||||
$code = encode(url('@admin', '', true, true) . '#' . $this->request->url());
|
$code = encode(url('@admin', '', true, true) . '#' . $this->request->url());
|
||||||
$assign = [
|
return $this->fetch('', [
|
||||||
'title' => '微信接口配置',
|
'title' => '微信接口配置',
|
||||||
'appuri' => url("@wechat/api.push", '', true, true),
|
'appuri' => url("@wechat/api.push", '', true, true),
|
||||||
'appid' => $this->request->get('appid', sysconf('wechat_appid')),
|
'appid' => $this->request->get('appid', sysconf('wechat_appid')),
|
||||||
'appkey' => $this->request->get('appkey', sysconf('wechat_appkey')),
|
'appkey' => $this->request->get('appkey', sysconf('wechat_appkey')),
|
||||||
'authurl' => "http://wm.cuci.cc/wechat/api.push/auth/{$code}.html",
|
'authurl' => config('wechat.service_url') . "/wechat/api.push/auth/redirect/{$code}.html",
|
||||||
'wechat' => WechatService::instance('config')->getConfig(),
|
'wechat' => WechatService::instance('config')->getConfig(),
|
||||||
];
|
]);
|
||||||
return $this->fetch('', $assign);
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
sysconf('wechat_appid', $this->request->post('wechat_appid'));
|
sysconf('wechat_appid', $this->request->post('wechat_appid'));
|
||||||
|
5
config/wechat.php
Normal file
5
config/wechat.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'service_url' => 'http://service.thinkadmin.top',
|
||||||
|
];
|
@ -57,7 +57,7 @@ class WechatService
|
|||||||
{
|
{
|
||||||
list($appid, $appkey) = [sysconf('wechat_appid'), sysconf('wechat_appkey')];
|
list($appid, $appkey) = [sysconf('wechat_appid'), sysconf('wechat_appkey')];
|
||||||
$token = strtolower("{$name}-{$appid}-{$appkey}");
|
$token = strtolower("{$name}-{$appid}-{$appkey}");
|
||||||
$location = "http://service.thinkadmin.top/wechat/api.client/soap/{$token}.html";
|
$location = config('wechat.service_url') . "/wechat/api.client/soap/{$token}.html";
|
||||||
$params = ['uri' => strtolower($name), 'location' => $location, 'trace' => true];
|
$params = ['uri' => strtolower($name), 'location' => $location, 'trace' => true];
|
||||||
return new SoapService(null, $params);
|
return new SoapService(null, $params);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user