ButtonHtml($params); } break; // 公共顶部小导航钩子-左侧 case 'plugins_view_header_navigation_top_left' : if(empty($user) && IsMobile()) { $ret = $this->NavTextHtml($params); } break; // 用户中心-个人资料 case 'plugins_service_users_personal_show_field_list_handle' : $ret = $this->UserPersonalHtml($params, $user); break; } } return $ret; } /** * 用户中心-个人资料 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @datetime 2019-02-06T16:16:34+0800 * @param [array] $params [输入参数] * @param [array] $user [用户登录信息] */ public function UserPersonalHtml($params = [], $user = []) { if(empty($user['weixin_web_openid'])) { $tips = ' 绑定'; } else { $tips = ' 解绑'; } $params['data']['weixin_web_openid'] = [ 'is_ext' => 1, 'name' => '微信绑定', 'value' => empty($user['weixin_web_openid']) ? '未绑定' : $user['weixin_web_openid'], 'tips' => $tips, ]; } /** * 登录登录html * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @date 2019-05-24 * @desc description * @param array $params [description] */ private function ButtonHtml($params = []) { $ret = PluginsService::PluginsData('weixinwebauthorization'); $this->assign('plugins_data', $ret['data']); return $this->fetch('../../../plugins/view/weixinwebauthorization/index/public/auth_button'); } /** * 文字登录html * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @date 2019-05-24 * @desc description * @param array $params [description] */ private function NavTextHtml($params = []) { $ret = PluginsService::PluginsData('weixinwebauthorization'); $this->assign('plugins_data', $ret['data']); return $this->fetch('../../../plugins/view/weixinwebauthorization/index/public/auth_text'); } } ?>