功能说明: 微擎用户一登录就可以跳转到指定的应用页面,甚至于任意页面。
微擎2.5版本用户登录跳转到指定应用修改记录:
数据库修改:
1、ims_users_operate_history 查看数据库表找到对应的用户 uid 是用户ID 将该用户的 type改为2 module_name 改为你要跳转的应用的名称
2、改变php文件 文件地址:framework/model/user.mod.php
找到user_after_login_link 函数 修改如下
function user_after_login_link() {
global $_W;
$url = '';
//--飘叶添就爱 type =2
$last_operate = table('users_operate_history')->where('uid', $_W['uid'])->orderby('createtime', 'DESC')->get();
if (USERS_OPERATE_TYPE_ACCOUNT == $last_operate['type']) {
$url = url('account/display/platform');
} elseif (USERS_OPERATE_TYPE_MODULE == $last_operate['type']) {
//https://cs.com/index.php?c=module&a=welcome&do=welcome_display&module_name=longbing_card&uniacid=4&switch_uniacid=1
飘叶修改跳转到指定应用
// 说明 c= module a = welcome do = welcome_display m= 应用名称-》调用的刚刚的数据字段
$url = url('module/welcome/welcome_display', array('m' => $last_operate['module_name'], 'uniacid' => $last_operate['uniacid'], 'switch_uniacid' => 1));
}
if (empty($url)) {
$url = './home.php';
}
return $url;
}
湖北红点原创:转载请注明出处