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

80 lines
2.2 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;
2025-09-23 13:22:38 +00:00
use app\index\controller\Common;
2019-05-16 10:42:22 +00:00
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()
{
// 是否仅展示内容
$is_content = (isset($this->data_request['is_content']) && $this->data_request['is_content'] == 1) ? 0 : 1;
// 模板数据
$assign = [
'is_header' => $is_content,
'is_footer' => $is_content,
2024-01-19 06:49:32 +00:00
'data' => null,
];
2019-05-16 10:42:22 +00:00
// 获取协议内容
if(!empty($this->data_request['document']))
2019-05-16 10:42:22 +00:00
{
2021-07-25 02:52:27 +00:00
// 获取协议内容
$ret = AgreementService::AgreementData($this->data_request);
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']))
{
$assign['home_seo_site_title'] = SeoService::BrowserSeoTitle($ret['data']['name']);
2021-07-25 02:52:27 +00:00
}
$assign['data'] = $ret['data'];
2019-05-16 10:42:22 +00:00
}
}
// 数据赋值
MyViewAssign($assign);
2021-07-18 15:42:10 +00:00
return MyView();
2019-05-16 10:42:22 +00:00
}
}
?>