12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- /**
- * 查看我发起的拼团,用户查看参团以及开团的信息,以及分享
- */
- namespace app\api\controller;
- use think\facade\Lang;
- /**
- * ============================================================================
- *
- * ============================================================================
- * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
- * 网站地址: https://www.valimart.net/
- * ----------------------------------------------------------------------------
- *
- * ============================================================================
- * 拼团控制器
- */
- class Memberpintuan extends MobileMember {
- public function initialize() {
- parent::initialize();
- Lang::load(base_path() . 'home/lang/'.config('lang.default_lang').'/memberpintuan.lang.php');
- }
-
- /*
- * 查看我发起的拼团
- */
- public function pintuangroup()
- {
- $condition = array();
- $condition[] = array('pintuangroup_headid','=',$this->member_info['member_id']);
- $ppintuangroup_model = model('ppintuangroup');
- $ppintuanorder_model = model('ppintuanorder');
- $ppintuangroup_list = $ppintuangroup_model->getPpintuangroupList($condition, 10); #获取开团信息
- foreach ($ppintuangroup_list as $key => $ppintuangroup) {
- //获取开团订单下的参团订单
- $condition = array();
- $condition[] = array('pintuangroup_id','=',$ppintuangroup['pintuangroup_id']);
- $ppintuangroup_list[$key]['pintuangroup_starttime_text'] = date('Y-m-d H:i',$ppintuangroup['pintuangroup_starttime']);
- $ppintuangroup_list[$key]['pintuangroup_endtime_text'] = date('Y-m-d H:i',$ppintuangroup['pintuangroup_endtime']);
- if($ppintuangroup['pintuangroup_is_virtual']){
- $ppintuangroup_list[$key]['order_list'] = $ppintuanorder_model->getPpintuanvrorderList($condition);
- }else{
- $ppintuangroup_list[$key]['order_list'] = $ppintuanorder_model->getPpintuanorderList($condition);
- }
- }
- $pintuangroup_state_array = $ppintuangroup_model->getPintuangroupStateArray();
-
- $result = array_merge(array('list' => $ppintuangroup_list), mobile_page($ppintuangroup_model->page_info));
- ds_json_encode(10000, '',$result);
- }
-
- }
|