html($params); break; default : $ret = ''; } return $ret; } else { return ''; } } } /** * 视图 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @datetime 2019-02-06T16:16:34+0800 * @param [array] $params [输入参数] */ public function html($params = []) { // 当前模块/控制器/方法 $module_name = strtolower(request()->module()); $controller_name = strtolower(request()->controller()); $action_name = strtolower(request()->action()); // 获取应用数据 $ret = PluginsService::PluginsData('commonrightnavigation', ['alipay_mini_qrcode_images', 'alipay_fuwu_qrcode_images', 'weixin_mini_qrcode_images', 'weixin_fuwu_qrcode_images']); // html拼接 $html = '
'; $content = ''; if($ret['code'] == 0) { // 非全局 if($ret['data']['is_overall'] != 1) { // 非首页则空 if($module_name.$controller_name.$action_name != 'indexindexindex') { return ''; } } // 是否新窗口打开 $is_new_window_open = (isset($ret['data']['is_new_window_open']) && $ret['data']['is_new_window_open'] == 1) ? 'target="_blank"' : ''; // 购物车总数 $cart_total = BuyService::UserCartTotal(['user'=>$params['user']]); // 是否需要登录 $login_event = empty($params['user']) ? 'login-event' : ''; // 内容 $content .= '
用户中心
我的足迹
我的收藏
购物车
'.$cart_total.'
'; $qrcode = ''; if(!empty($ret['data']['alipay_mini_qrcode_images'])) { $qrcode .= '
  • 支付宝小程序

    支付宝小程序
  • '; } if(!empty($ret['data']['alipay_fuwu_qrcode_images'])) { $qrcode .= '
  • 支付宝生活号

    支付宝生活号
  • '; } if(!empty($ret['data']['weixin_mini_qrcode_images'])) { $qrcode .= '
  • 微信小程序

    微信小程序
  • '; } if(!empty($ret['data']['weixin_fuwu_qrcode_images'])) { $qrcode .= '
  • 微信公众号

    微信公众号
  • '; } if(!empty($qrcode)) { $content .= '
      '.$qrcode.'
    '; } $content .= '
    返回顶部
    '; } else { $content = $ret['msg']; } $html .= $content; $html .= '
    '; return $html; } } ?>