123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace app\api\controller;
- /**
-
- *
-
- *
- * ----------------------------------------------------------------------------
- *
-
- * 平台协议控制器
- */
- class Document extends MobileMall
- {
- public function initialize()
- {
- parent::initialize();
- }
- /**
- * @api {POST} api/Document/agreement 用户协议
- * @apiVersion 1.0.0
- * @apiGroup Document
- *
- * @apiParam {String} type 协议类型 agreement 用户协议
- *
- * @apiSuccess {String} code 返回码,10000为成功
- * @apiSuccess {String} message 返回消息
- * @apiSuccess {Object} result 返回数据
- * @apiSuccess {Int} result.document_id 协议ID
- * @apiSuccess {Object} result.document_code 协议代码
- * @apiSuccess {Object} result.document_title 协议标题
- * @apiSuccess {Object} result.document_content 协议内容
- * @apiSuccess {Int} result.document_time 添加时间
- */
- public function agreement()
- {
- $type = input('param.type');
- if (!$type) {
- $type = 'agreement';
- }
- $doc = model('document')->getOneDocumentByCode($type);
- $doc['document_content'] = htmlspecialchars_decode($doc['document_content']);
- ds_json_encode(10000, '', $doc);
- }
- }
|