IsLogin(); } /** * [Index 首页] * @author Devil * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2017-02-22T16:50:32+0800 */ public function Index() { // 获取商品列表 $params = $this->data_post; $params['user'] = $this->user; $ret = BuyService::BuyTypeGoodsList($params); // 商品校验 if(isset($ret['code']) && $ret['code'] == 0) { // 基础信息 $buy_base = $ret['data']['base']; $buy_goods = $ret['data']['goods']; // 支付方式 $payment_list = PaymentService::BuyPaymentList(['is_enable'=>1, 'is_open_user'=>1]); // 数据返回组装 $result = [ 'goods_list' => $buy_goods, 'payment_list' => $payment_list, 'base' => $buy_base, 'common_site_type' => (int) $buy_base['common_site_type'], ]; $ret = SystemBaseService::DataReturn($result); } return ApiService::ApiDataReturn($ret); } /** * 订单添加 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @date 2018-09-25 * @desc description */ public function Add() { $params = $this->data_post; $params['user'] = $this->user; return ApiService::ApiDataReturn(BuyService::OrderInsert($params)); } } ?>