mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-07-14 03:11:07 +08:00
Compare commits
3 Commits
ccd6d15bfb
...
593316a927
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
593316a927 | ||
|
|
02a1c421f4 | ||
|
|
8126c17197 |
@ -43,10 +43,10 @@ class Wxapp extends Controller
|
||||
*/
|
||||
protected function initialize()
|
||||
{
|
||||
$option = sysdata('wxapp');
|
||||
$wxapp = sysdata('wxapp');
|
||||
$this->config = [
|
||||
'appid' => $option['appid'] ?? '',
|
||||
'appsecret' => $option['appkey'] ?? '',
|
||||
'appid' => $wxapp['appid'] ?? '',
|
||||
'appsecret' => $wxapp['appkey'] ?? '',
|
||||
'cache_path' => with_path('runtime/wechat'),
|
||||
];
|
||||
if (empty(UserAdminService::TYPES[$this->type]['auth'])) {
|
||||
|
||||
@ -61,8 +61,12 @@ class UserAdminService extends Service
|
||||
*/
|
||||
public static function set($map, array $data, string $type, bool $force = false): array
|
||||
{
|
||||
unset($data['id'], $data['deleted'], $data['create_at']);
|
||||
$user = DataUser::mk()->where($map)->where(['deleted' => 0])->findOrEmpty();
|
||||
unset($data['id'], $data['deleted'], $data['create_at']);
|
||||
// 不更新无效的用户字段
|
||||
if (!empty($user['nickname']) && $data['nickname'] === '微信用户') {
|
||||
unset($data['nickname'], $data['headimg']);
|
||||
}
|
||||
if (!$user->save($data)) throw new Exception("更新用户资料失败!");
|
||||
// 刷新用户认证令牌
|
||||
if ($force) UserTokenService::token($user['id'], $type);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card shadow-none">
|
||||
|
||||
<div class="layui-card-header border-0">
|
||||
<div class="layui-bg-gray padding-col-20 border-radius-5 layui-elip">
|
||||
<div class="layui-bg-gray padding-left-20 padding-right-20 border-radius-5 layui-elip">
|
||||
使用微信公众平台直接模式时,需要在微信公众号平台配置授权IP及网页授权域名,将公众号平台获取到的参数填写到下面。
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card shadow-none">
|
||||
|
||||
<div class="layui-card-header border-0">
|
||||
<div class="layui-bg-gray padding-col-20 border-radius-5 layui-elip">
|
||||
<div class="layui-bg-gray padding-left-20 padding-right-20 border-radius-5 layui-elip">
|
||||
使用微信开放平台授权模式时,需要使用楚才开放平台的 <span>微信授权</span> 服务,接口需要使用 <span>Yar</span> 或 <span>JsonRpc</span> 通信。
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -93,7 +93,10 @@ public function index(){
|
||||
* 执行 `php think run` 启用本地开发环境,访问 `http://127.0.0.1:8000`
|
||||
* 执行 `php think xadmin:fansall` 同步微信粉丝数据(依赖于 `wechat` 模块)
|
||||
* 执行 `php think xadmin:sysmenu` 重写系统菜单并生成新编号并清理已禁用的菜单
|
||||
* 执行 `php think xadmin:package` 将现有`MySQL`数据库打包为`Phinx`数据库迁移脚本【新增】
|
||||
* 执行 `php think xadmin:replace` 可以批量替换数据库指定字符字段内容,通常用于文档地址替换
|
||||
* 执行 `php think xadmin:version` 查看当前版本号,显示 `ThinkPHP` 版本及 `ThinkLibrary` 版本
|
||||
* 执行 `php think xadmin:database` 对数据库的所有表`repair|optimize`操作,优化并整理数据库碎片
|
||||
|
||||
#### 1. 线上代码更新
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user