123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace app\api\controller;
- use think\facade\Lang;
- /**
-
- *
-
- *
- * ----------------------------------------------------------------------------
- *
-
- * 代金券控制器
- */
- class Membermallvoucher extends MobileMember
- {
- public function initialize()
- {
- parent::initialize(); // TODO: Change the autogenerated stub
- Lang::load(base_path() . 'home/lang/' . config('lang.default_lang') . '/voucher.lang.php');
- }
- /**
- * @api {POST} api/Membermallvoucher/mallvoucher_list 平台代金卷列表
- * @apiVersion 1.0.0
- * @apiGroup MemberVoucher
- *
- * @apiHeader {String} X-DS-KEY 用户授权token
- *
- * @apiSuccess {String} code 返回码,10000为成功
- * @apiSuccess {String} message 返回消息
- * @apiSuccess {Object} result 返回数据
- * @apiSuccess {Object[]} result.voucher_list 代金卷列表 (返回字段参考voucher表、store表、vouchertemplate表)
- * @apiSuccess {Int} result.page_total 总页数
- * @apiSuccess {Boolean} result.hasmore 是否有更多 true是false否
- */
- public function mallvoucher_list()
- {
- $mallvoucher_model = model('mallvouchertemplate');
- $mallvoucher_state = !empty(input('post.mallvoucher_state')) ? input('post.mallvoucher_state') : '';
- $mallvoucher_list = $mallvoucher_model->getMemberMallvoucherList(session('member_id'), $mallvoucher_state, $this->pagesize);
- $result = array_merge(array('mallvoucher_list' => $mallvoucher_list), mobile_page($mallvoucher_model->page_info));
- ds_json_encode(10000, '', $result);
- }
- }
|