| | |
| | | header("Access-Control-Allow-Origin:*"); |
| | | class Activity extends Api |
| | | { |
| | | protected $noNeedLogin = ['UpWxImg','recordItemClick','fqb_plat_cate','run_countRecruitAct','test']; |
| | | protected $noNeedLogin = ['recordItemClick','fqb_plat_cate','run_countRecruitAct','test']; |
| | | protected $noNeedRight = '*'; |
| | | /** |
| | | * è·åç¯æ¢æ¦ |
| | |
| | | $actInfo=new ActInfo(); |
| | | $actInfo->recordItemClick($goodsid,$plat,$title,$act_price); |
| | | $this->success('æå',['success'=>true]); |
| | | } |
| | | |
| | | public function UpWxImg() |
| | | { |
| | | $token=request()->param('token'); |
| | | $picPath=request()->param('picPath'); |
| | | //ä¸ä¼ æ°¸ä¹
ç´ æ |
| | | $url="https://api.weixin.qq.com/cgi-bin/material/add_material?access_token=".$token."&type=image"; |
| | | //2ã忥å°å¾®ä¿¡æå¡å¨ |
| | | if(class_exists('\CURLFile')){ //7.0 |
| | | $data = ['media' => new \CURLFile($picPath)]; |
| | | }else{ //5.6以å5.6ä»¥ä¸ |
| | | $data = array('media' => '@'.$picPath); |
| | | } |
| | | |
| | | $ch = curl_init(); |
| | | curl_setopt($ch, CURLOPT_URL, $url); |
| | | curl_setopt($ch, CURLOPT_RETURNTRANSFER , true); |
| | | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , false); |
| | | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST , false); |
| | | curl_setopt($ch, CURLOPT_POST, 1); |
| | | curl_setopt($ch, CURLOPT_POSTFIELDS, $data); |
| | | $res = curl_exec($ch); |
| | | curl_close($ch); |
| | | $wxrs_id_card=json_decode($res,true); |
| | | $id_card =$wxrs_id_card['media_id']; //å¾å°media_id |
| | | } |
| | | |
| | | |
| | |
| | | * @param mixed 大æ·å®¢çäºçº§ç±»ç®idï¼éè¿è¶
级åç±»APIè·åãä»
å
è®¸ä¼ ä¸ä¸ªäºçº§idï¼å½ä¸çº§ç±»ç®idåäºçº§ç±»ç®idåæ¶ä¼ å
¥æ¶ï¼ä¼èªå¨å¿½ç¥äºçº§ç±»ç®id |
| | | * @return void |
| | | */ |
| | | public function getGoodsList($cids,$subcid,$sort=0,$page = 1,$page_size,$tchaoshi=0,$secrend_search=0,$couponPriceLowerLimit) |
| | | public function getGoodsList($cids,$subcid,$sort=0,$page = 1,$page_size,$tchaoshi=0,$secrend_search=0,$couponPriceLowerLimit="") |
| | | { |
| | | $params = $this->setParams(['cids'=>$cids,'tchaoshi'=>$tchaoshi,'subcid'=>$subcid,'sort'=>$sort,'pageId'=>$page,'pageSize'=>$page_size]); |
| | | if($secrend_search>0) |
| | |
| | | } |
| | | foreach ($params as $key => $value) { |
| | | $enstrs=$enstrs.$key; |
| | | // $pvalue=preg_replace('/^\"|\"$/','',json_encode($value,JSON_UNESCAPED_UNICODE)); |
| | | //$pvalue=preg_replace('/^\"|\"$/','',json_encode($value,JSON_UNESCAPED_UNICODE)); |
| | | $pvalue=preg_replace('/^\"|\"$/','',json_encode($value,JSON_UNESCAPED_UNICODE+JSON_UNESCAPED_SLASHES)); |
| | | $enstrs=$enstrs.$pvalue; |
| | | } |
| | |
| | | class User extends Frontend |
| | | { |
| | | protected $layout = ''; |
| | | protected $noNeedLogin = ['login','targetapp','registersms','register','register1', 'getInvitationInfo','phoneIsRegister']; |
| | | protected $noNeedLogin = ['login', 'registersms','register','register1', 'getInvitationInfo','phoneIsRegister']; |
| | | protected $noNeedRight = ['*']; |
| | | |
| | | public function _initialize() |
| | |
| | | * 注åä¼å |
| | | */ |
| | | public function register() |
| | | { |
| | | |
| | | $this->assign('appName',config('site.name')); |
| | | return $this->view->fetch(); |
| | | } |
| | | |
| | | /** |
| | | * 跳转app |
| | | */ |
| | | public function targetapp() |
| | | { |
| | | |
| | | $this->assign('appName',config('site.name')); |