vr-shopxo-source/app/index/controller/Agreement.php

77 lines
2.1 KiB
PHP
Raw Normal View History

2019-05-16 10:42:22 +00:00
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
2021-03-16 02:34:52 +00:00
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
2019-05-16 10:42:22 +00:00
// +----------------------------------------------------------------------
2021-03-16 02:34:52 +00:00
// | Licensed ( https://opensource.org/licenses/mit-license.php )
2019-05-16 10:42:22 +00:00
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\index\controller;
use app\service\SeoService;
2021-07-25 02:52:27 +00:00
use app\service\AgreementService;
2019-05-16 10:42:22 +00:00
/**
* 协议
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Agreement extends Common
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
*/
public function __construct()
{
parent::__construct();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-05-16
* @desc description
*/
public function Index()
{
// 参数
2020-09-14 10:53:42 +00:00
$params = $this->data_request;
2019-05-16 10:42:22 +00:00
// 获取协议内容
$data = [];
if(!empty($params['document']))
{
2021-07-25 02:52:27 +00:00
// 获取协议内容
$ret = AgreementService::AgreementData($params);
2019-05-16 10:42:22 +00:00
// 浏览器标题
2021-07-25 02:52:27 +00:00
if(!empty($ret['data']))
2019-05-16 10:42:22 +00:00
{
2021-07-25 02:52:27 +00:00
if(!empty($ret['data']['name']))
{
MyViewAssign('home_seo_site_title', SeoService::BrowserSeoTitle($ret['data']['name']));
}
$data = $ret['data'];
2019-05-16 10:42:22 +00:00
}
}
2021-05-26 11:53:18 +00:00
// 是否仅展示内容
$is_content = (isset($params['is_content']) && $params['is_content'] == 1) ? 0 : 1;
2021-07-18 15:42:10 +00:00
MyViewAssign('is_header', $is_content);
MyViewAssign('is_footer', $is_content);
MyViewAssign('data', $data);
return MyView();
2019-05-16 10:42:22 +00:00
}
}
?>