diff --git a/app/common/model/food/Table.php b/app/common/model/food/Table.php index 6cb40da..c07ad4f 100644 --- a/app/common/model/food/Table.php +++ b/app/common/model/food/Table.php @@ -1,167 +1,167 @@ - '', - 'weixin' => '', -// 'alipay' => '', -// 'qrcode' => '', - ]; - //生成存储路径 - if(!file_exists('./temp/food')){ - mkdir('./temp/food',0777,true); - } - //生成微信小程序码 - $wechat_path = '/temp/food/wechat-table-' . $data['table_id'] . '.png'; - - if(!is_file('.' . $wechat_path)){ - $wx = new Wechat; - if($wx->getUnlimitedQRCode($data['applet_id'],$wechat_path,'table-'.$data['shop_id'].'-'.$data['table_id'])){ - $qrcode['weixin'] = $wechat_path; - } - }else{ - $qrcode['weixin'] = $wechat_path; - } -// //如果已经发布H5端代码 -// if(is_file('./h5/food/index.html')){ -// $h5_path = '/temp/food/h5-table-' . $data['table_id'] . '.png'; -// if(!is_file('.' . $h5_path)){ -// $writer = new PngWriter(); -// $code = CodeMode::create(base_url() . 'h5/food/#/?applet_id=' . $data['applet_id'] . '&q=table-' . $data['shop_id'].'-'.$data['table_id'])->setSize(500); -// $result = $writer->write($code); -// $result->saveToFile('.' . $h5_path); -// } -// $qrcode['h5'] = $h5_path; -// } - //生成支付宝小程序码 -// $alipay_path = '/temp/food/alipay-table-' . $data['shop_id'] . '.png'; -// if(!is_file('.' . $alipay_path)){ -// $alipay = new Alipay($data['applet_id']); -// if($alipay->openAppQrcodeCreate('table-'.$data['shop_id'].'-'.$data['table_id'],$alipay_path)){ -// $qrcode['alipay'] = $alipay_path; -// } -// }else{ -// $qrcode['alipay'] = $alipay_path; -// } - //生成小程序聚合码 -// $qrcode_path = '/temp/food/qrcode-table-' . $data['shop_id'] . '.png'; -// if(!is_file('.' . $qrcode_path)){ -// $writer = new PngWriter(); -// $code = CodeMode::create(base_url() . 'food/' . $data['applet_id'] . '/table-'. $data['shop_id'].'-'.$data['table_id'])->setSize(500); -// $result = $writer->write($code); -// $result->saveToFile('.' . $qrcode_path); -// } -// $qrcode['qrcode'] = $qrcode_path; - return $qrcode; - } - - /** - * 关联门店表 - */ - public function shop() - { - return $this->belongsTo('app\\common\\model\\food\\Shop','shop_id'); - } - - /** - * 状态 - */ - public function getStatusAttr($value,$data) - { - $status = [10 => '空闲', 20 => '占用']; - $order_id = [];//订单编号 - $pay_price = 0;//待付款 - $time = '';//开单时间 - $order = Order::where(['table_id'=>$data['table_id'],'order_status'=>10])->order('create_time','asc')->select(); - if(sizeof($order)){ - foreach ($order as $item){ - $order_id[] = $item['order_id']; - if($item['pay_status']['value'] != 20){ - $pay_price = $pay_price + $item['pay_price']; - } - } - $value = 20; - $time = round((time() - strtotime($order[0]['create_time']))/60); - } - $start=mktime(0,0,0,date('m'),date('d'),date('Y')); - $end=mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1; - return [ - 'text' => $status[$value], - 'value' => $value, - 'order_id' => $order_id, - 'time' => $time, //占用时间 - 'pay_price' => Helper::number2($pay_price), //待收款 - ]; - } - /** - * 获取列表 - */ - public function getList($shop_id = 0, $status = 0, string $search = '') - { - //筛选条件 - $filter = []; - $shop_id > 0 && $filter['shop_id'] = $shop_id; - !empty($search) && $filter['table_name'] = $search; - // 执行查询 - $list = $this->with(['shop']) - ->where($filter) - ->order(['sort','table_id' => 'desc']) - ->select(); - if($status > 0){ - $tablelist = $list; - $list = []; - for($n=0;$nsave($data); - } - - - /** - * 编辑 - */ - public function edit(array $data) - { - return $this->save($data) !== false; - } - /** - * 删除 - */ - public function remove() - { - return $this->delete(); - } + '', + 'weixin' => '', +// 'alipay' => '', +// 'qrcode' => '', + ]; + //生成存储路径 + if(!file_exists('./temp/food')){ + mkdir('./temp/food',0777,true); + } + //生成微信小程序码 + $wechat_path = '/temp/food/wechat-table-' . $data['table_id'] . '.png'; + + if(!is_file('.' . $wechat_path)){ + $wx = new Wechat; + if($wx->getUnlimitedQRCode($data['applet_id'],$wechat_path,'table-'.$data['shop_id'].'-'.$data['table_id'])){ + $qrcode['weixin'] = $wechat_path; + } + }else{ + $qrcode['weixin'] = $wechat_path; + } +// //如果已经发布H5端代码 +// if(is_file('./h5/food/index.html')){ +// $h5_path = '/temp/food/h5-table-' . $data['table_id'] . '.png'; +// if(!is_file('.' . $h5_path)){ +// $writer = new PngWriter(); +// $code = CodeMode::create(base_url() . 'h5/food/#/?applet_id=' . $data['applet_id'] . '&q=table-' . $data['shop_id'].'-'.$data['table_id'])->setSize(500); +// $result = $writer->write($code); +// $result->saveToFile('.' . $h5_path); +// } +// $qrcode['h5'] = $h5_path; +// } + //生成支付宝小程序码 +// $alipay_path = '/temp/food/alipay-table-' . $data['shop_id'] . '.png'; +// if(!is_file('.' . $alipay_path)){ +// $alipay = new Alipay($data['applet_id']); +// if($alipay->openAppQrcodeCreate('table-'.$data['shop_id'].'-'.$data['table_id'],$alipay_path)){ +// $qrcode['alipay'] = $alipay_path; +// } +// }else{ +// $qrcode['alipay'] = $alipay_path; +// } + //生成小程序聚合码 +// $qrcode_path = '/temp/food/qrcode-table-' . $data['shop_id'] . '.png'; +// if(!is_file('.' . $qrcode_path)){ +// $writer = new PngWriter(); +// $code = CodeMode::create(base_url() . 'food/' . $data['applet_id'] . '/table-'. $data['shop_id'].'-'.$data['table_id'])->setSize(500); +// $result = $writer->write($code); +// $result->saveToFile('.' . $qrcode_path); +// } +// $qrcode['qrcode'] = $qrcode_path; + return $qrcode; + } + + /** + * 关联门店表 + */ + public function shop() + { + return $this->belongsTo('app\\common\\model\\food\\Shop','shop_id'); + } + + /** + * 状态 + */ + public function getStatusAttr($value,$data) + { + $status = [10 => '空闲', 20 => '占用']; + $order_id = [];//订单编号 + $pay_price = 0;//待付款 + $time = '';//开单时间 + $order = Order::where(['table_id'=>$data['table_id'],'order_status'=>10])->order('create_time','asc')->select(); + if(sizeof($order)){ + foreach ($order as $item){ + $order_id[] = $item['order_id']; + if($item['pay_status']['value'] != 20){ + $pay_price = $pay_price + $item['pay_price']; + } + } + $value = 20; + $time = round((time() - strtotime($order[0]['create_time']))/60); + } + $start=mktime(0,0,0,date('m'),date('d'),date('Y')); + $end=mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1; + return [ + 'text' => $status[$value], + 'value' => $value, + 'order_id' => $order_id, + 'time' => $time, //占用时间 + 'pay_price' => Helper::number2($pay_price), //待收款 + ]; + } + /** + * 获取列表 + */ + public function getList($shop_id = 0, $status = 0, string $search = '') + { + //筛选条件 + $filter = []; + $shop_id > 0 && $filter['shop_id'] = $shop_id; + !empty($search) && $filter['table_name'] = $search; + // 执行查询 + $list = $this->with(['shop']) + ->where($filter) + ->order(['sort','table_id' => 'desc']) + ->select(); + if($status > 0){ + $tablelist = $list; + $list = []; + for($n=0;$nsave($data); + } + + + /** + * 编辑 + */ + public function edit(array $data) + { + return $this->save($data) !== false; + } + /** + * 删除 + */ + public function remove() + { + return $this->delete(); + } } \ No newline at end of file diff --git a/app/store/controller/food/Index.php b/app/store/controller/food/Index.php index 01766ac..ba1fda1 100644 --- a/app/store/controller/food/Index.php +++ b/app/store/controller/food/Index.php @@ -1,37 +1 @@ -shop_mode == 10){ - $shop_id = $this->shop_id; - } - $model = new ShopModel; - $shop = $model->getList(); - $count = array(); - $count['order'] = OrderModel::getCount($shop_id); //订单和收入统计 - $count['comment'] = CommentModel::getCount($shop_id); //评价统计 - $count['record'] = RecordModel::getCount($shop_id); //充值统计 - $count['user'] = UserModel::getCount(); //用户统计 - $count['goods'] = GoodsModel::getCount($shop_id); //产品统计 - $count['pact'] = PactModel::getCount($shop_id); //预约统计 - return View::fetch('index', compact('count','shop','shop_id')); - } -} +shop_mode == 10){ $shop_id = $this->shop_id; } $model = new ShopModel; $shop = $model->getList(); $count = array(); $count['order'] = OrderModel::getCount($shop_id); //订单和收入统计 $count['comment'] = CommentModel::getCount($shop_id); //评价统计 $count['record'] = RecordModel::getCount($shop_id); //充值统计 $count['user'] = UserModel::getCount(); //用户统计 $count['goods'] = GoodsModel::getCount($shop_id); //产品统计 $count['pact'] = PactModel::getCount($shop_id); //预约统计 return View::fetch('index', compact('count','shop','shop_id')); } } \ No newline at end of file diff --git a/app/store/view/food/shop/index.html b/app/store/view/food/shop/index.html index 0a8ef27..e6ca470 100644 --- a/app/store/view/food/shop/index.html +++ b/app/store/view/food/shop/index.html @@ -1,170 +1,170 @@ -{layout name="layout/food" /} -
-
-
-
-
-
门店列表
-
-
- - {if $user['applet']['shop_mode']['value']==20} -
-
-
- -
-
-
- {/if} -
- - - - - - - - - - - - - - - - - - - {if $list} - {foreach $list as $index => $item} - - - - - - - - - - - - - - - {/foreach} - {else /} - - - - {/if} - -
门店ID门店LOGO门店名称营业时间联系人联系电话门店码买单码WIFI码门店状态创建时间操作
{$item['shop_id']} - 门店图片 - -

{$item['shop_name']}

-
{$item['shop_hours']}{$item['linkman']}{$item['phone']} - - - - - - - - - - - - - - {$item['status']['text']} - - {$item['create_time']} - -
暂无记录
-
-
-
{:$list->render()}
-
-
总记录:{:$list->total()}
-
-
-
-
-
-
-
-{include file="food/shop/qrcode" /} - - \ No newline at end of file diff --git a/app/store/view/food/shop/qrcode.html b/app/store/view/food/shop/qrcode.html index e4ab129..7e020cd 100644 --- a/app/store/view/food/shop/qrcode.html +++ b/app/store/view/food/shop/qrcode.html @@ -1,36 +1,13 @@ - \ No newline at end of file diff --git a/extend/hema/wechat/Driver.php b/extend/hema/wechat/Driver.php index 46d3def..dcb0649 100755 --- a/extend/hema/wechat/Driver.php +++ b/extend/hema/wechat/Driver.php @@ -1,1845 +1,1848 @@ -isp = $isp; - if($isp){ - $value = Setting::getItem('wxopen'); - $value['component_access_token'] = Cache::get('component_access_token',''); - $this->config = $value; - } - } - - /** - * 获取session_key - */ - public function getSessionKey(string $code, int $applet_id) - { - if(!$applet = Applet::get($applet_id)){ - $this->error = 'applet_id不存在!'; - return false; - } - if($this->isp){ - $url = 'https://api.weixin.qq.com/sns/component/jscode2session'; - $queryarr = [ - 'appid' => $applet['app_id'], - 'js_code' => $code, - 'grant_type' => 'authorization_code', - 'component_appid' => $this->config['app_id'], - 'component_access_token' => $this->config['component_access_token'] - ]; - }else{ - $url = 'https://api.weixin.qq.com/sns/jscode2session'; - $queryarr = [ - 'appid' => $applet['app_id'], - 'secret' => $applet['app_secret'], - 'grant_type' => 'authorization_code', - 'js_code' => $code - ]; - } - $result = json_decode(Http::get($url, $queryarr),true); - if (isset($result['errcode'])) { - $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; - return false; - } - return $result; - } - //* ************************即将废除 - 开始************************* - /** - * 获取session_key - 服务商版 - - */ - public function getComponentSessionKey(string $code, int $applet_id) - { - $applet = Applet::get($applet_id); - $url = 'https://api.weixin.qq.com/sns/component/jscode2session'; - $queryarr = [ - 'appid' => $applet['app_id'], - 'js_code' => $code, - 'grant_type' => 'authorization_code', - 'component_appid' => $this->config['app_id'], - 'component_access_token' => $this->config['component_access_token'] - ]; - $result = json_decode(Http::get($url, $queryarr),true); - if (isset($result['errcode'])) { - $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; - return false; - } - return $result; - } - - //* ************************即将废除 - 结束************************* - - - - /************ 小程序直播 (权限集 id 为:52)**************/ - /** - * 申请开通直播 - */ - public function applyLivelnfo($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/business/applyliveinfo?access_token='.$access_token; - $queryarr = [ - 'action' => 'apply' - ]; - return $this->result(Http::post($url, hema_json($queryarr))); - } - /************ 代商家注册小程序 **************/ - /** - * 快速注册企业小程序 - */ - public function registerMiniprogram($queryarr) - { - $url = 'https://api.weixin.qq.com/cgi-bin/component/fastregisterweapp?action=create&component_access_token=' . $this->config['component_access_token']; - return $this->result(Http::post($url,hema_json($queryarr))); - } - /************ 模板库管理 **************/ - /** - * 删除代码模板 - */ - public function deleteTemplate(int $template_id) - { - $config = $this->config; - $url = 'https://api.weixin.qq.com/wxa/deletetemplate?access_token='.$config['component_access_token']; - $queryarr = ['template_id' => $template_id]; - return $this->result(Http::post($url,hema_json($queryarr))); - } - - /** - * 获取模板列表 - * $template_type 模板类型 0=普通模板 1=标准模板,为空则全部 - */ - public function getTemplateList($template_type='') - { - $config = $this->config; - $url = 'https://api.weixin.qq.com/wxa/gettemplatelist?access_token='.$config['component_access_token']; - $queryarr = ['template_type' => $template_type]; - $result = json_decode(Http::get($url,$queryarr),true); - if($result['errcode']==0 AND sizeof($result['template_list']) > 0){ - return arr_sort($result['template_list'],'template_id'); - } - return []; - } - /** - * 将草稿添加到模板库 - * $template_type 模板类型 0=普通模板 1=标准模板 - */ - public function addToTemplate(int $draft_id, int $template_type = 0) - { - $config = $this->config; - $url = 'https://api.weixin.qq.com/wxa/addtotemplate?access_token='.$config['component_access_token']; - $queryarr = [ - 'draft_id' => $draft_id, - 'template_type' => $template_type - ]; - return $this->result(Http::post($url,hema_json($queryarr))); - } - /** - * 获取草稿箱列表 - */ - public function getTemplatedRaftList() - { - $config = $this->config; - $url = 'https://api.weixin.qq.com/wxa/gettemplatedraftlist?access_token='.$config['component_access_token']; - $result = json_decode(Http::get($url),true); - if($result['errcode']==0 OR isset($result['draft_list']) > 0){ - return arr_sort($result['draft_list'],'draft_id'); - } - return []; - } - - /************ 小程序代码管理 (权限集 id 为:18)**************/ - /** - * 上传代码并生成体验版 - */ - public function commit($applet, $code, $is_live = 0) - { - $access_token = $this->getAccessToken($applet['applet_id']); - $url = 'https://api.weixin.qq.com/wxa/commit?access_token='.$access_token; - $apiurl = $this->config['api_domain']; - $apiurl = explode(';',$apiurl); - $apiurl = 'https://'.$apiurl[0]; - $ext = [ - 'extEnable' => true, - 'extAppid' => $applet['app_id'], - 'directCommit' => false, - 'ext' => [ - 'applet_id' => $applet['applet_id'], - 'api_url' => $apiurl - ], - 'requiredPrivateInfos' => [ - 'getLocation', - 'chooseLocation' - ] - ]; - //如果小程序开通直播 - if($is_live == 1){ - /* - if($wxlive = get_addon_config('wxlive')){ - $ext['plugins']['live-player-plugin'] = [ - 'version' => $wxlive['user_version'], - 'provider' => $wxlive['plugin_appid'] - ]; - }*/ - } - $queryarr = [ - 'template_id' => $code['id'], - 'ext_json' => json_encode($ext), - 'user_version' => $code['user_version'], - 'user_desc' => $code['user_desc'] - ]; - return $this->result(Http::post($url, hema_json($queryarr))); - } - /** - * 获取体验版二维码 - */ - public function getTrialQRCode($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $path = urlencode('pages/index/index'); - $url = 'https://api.weixin.qq.com/wxa/get_qrcode?access_token='.$access_token.'&path='.$path; - $result = Http::get($url); - $path = 'temp'; - if(!file_exists('./'.$path)){ - mkdir($path,0777,true); - } - //获取的二维码数据存储到指定的文件 - file_put_contents('./'.$path . '/test_code_'. $applet_id .'.png',$result); - return '/'.$path.'/test_code_'.$applet_id.'.png'; - } - /** - * 提交代码审核 - */ - public function submitAudit($applet_id,$speedup=0) - { - $access_token = $this->getAccessToken($applet_id); - $queryarr = [ - 'privacy_api_not_use' => false - ]; - $url = 'https://api.weixin.qq.com/wxa/submit_audit?access_token='.$access_token; - $result = json_decode(Http::post($url,hema_json($queryarr)),true); - if($result['errcode'] != 0){ - $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; - return false; - } - //是否加急审核 - if($speedup == 1){ - if(!$this->speedupCodeAudit($applet_id,$result['auditid'])){ - return false; - } - } - return $result; - } - /** - * 查询审核单状态 - */ - public function getAuditStatus($applet_id,$auditid) - { - $access_token = getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/get_auditstatus?access_token='.$access_token; - $queryarr = [ - 'auditid' => $auditid - ]; - return $this->result(Http::post($url, json_encode($queryarr))); - } - /** - * 撤回代码审核 - * 单个帐号每天审核撤回次数最多不超过 5 次(每天的额度从0点开始生效),一个月不超过 10 次 - */ - public function undoAudit($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/undocodeaudit?access_token='.$access_token; - return $this->result(Http::get($url)); - } - /** - * 发布已通过审核的小程序 - */ - public function release($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/release?access_token='.$access_token; - return $this->result(Http::post($url,'{}')); - } - /** - * 小程序版本回退 - */ - public function revertCodeRelease($applet_id,$version='') - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/revertcoderelease?app_version='.$version.'&access_token='.$access_token; - return $this->result(Http::get($url)); - } - /** - * 获取可回退的小程序版本 - */ - public function getHistoryVersion($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/revertcoderelease?action=get_history_version&access_token='.$access_token; - return $this->result(Http::get($url)); - } - /** - * 设置小程序服务状态 - */ - public function setVisitStatus($applet_id,$action) - { - $access_token = $this->getAccessToken($applet_id); - $queryarr = [ - 'action' => $action - ]; - $url = 'https://api.weixin.qq.com/wxa/change_visitstatus?access_token='.$access_token; - return $this->result(Http::post($url,hema_json($queryarr))); - } - /** - * 查询小程序服务状态 - */ - public function getVisitStatus($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/getvisitstatus?access_token='.$access_token; - return $this->result(Http::post($url,'{}')); - } - /** - * 设置最低基础库版本 - */ - public function setSupportVersion($applet_id,$version) - { - $access_token = $this->getAccessToken($applet_id); - $queryarr = [ - 'version' => $version - ]; - $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/setweappsupportversion?access_token='.$access_token; - return $this->result(Http::post($url,hema_json($queryarr))); - } - /** - * 查询服务商审核额度 - */ - public function setCodeAuditQuota($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/queryquota?access_token='.$access_token; - return $this->result(Http::get($url)); - } - /** - * 加急代码审核 - */ - public function speedupCodeAudit($applet_id,$auditid) - { - $access_token = $this->getAccessToken($applet_id); - $queryarr = [ - 'auditid' => $auditid - ]; - $url = 'https://api.weixin.qq.com/wxa/speedupaudit?access_token='.$access_token; - return $this->result(Http::post($url,hema_json($queryarr))); - } - /** - * 查询小程序版本信息 - */ - public function getVersionInfo($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/getversioninfo?access_token='.$access_token; - return $this->result(Http::post($url,'{}')); - } - /** - * 查询最新一次审核单状态 - */ - public function getLatestAuditStatus($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/get_latest_auditstatus?access_token='.$access_token; - return $this->result(Http::get($url)); - } - /** - * 获取隐私接口检测结果 - */ - public function getCodePrivacyInfo($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/security/get_code_privacy_info?access_token='.$access_token; - $result = json_decode(Http::get($url),true); - if($result['errcode'] != 0){ - $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; - return false; - } - $res = true; - $error = ''; - if(sizeof($result['without_auth_list']) > 0){ - $error = '没权限的隐私接口:'; - foreach ($result['without_auth_list'] as $item){ - $error = $error . $item . ','; - } - $res = false; - } - if(sizeof($result['without_conf_list']) > 0){ - if(empty($error)){ - $error = '没配置的隐私接口:'; - }else{ - $error = $error . '没配置的隐私接口:'; - } - foreach ($result['without_auth_list'] as $item){ - $error = $error . $item . ','; - } - $res = false; - } - if(!empty($error)){ - $error = $error . '请完成配置'; - } - if($res){ - return $result; - } - $this->error = $error; - return false; - } - /************ 扫普通二维码打开小程序 (权限集 id 为:3、18)**************/ - /** - * 获取已设置的二维码规则 - */ - public function getJumpQRCode($applet_id,$appid='') - { - if(empty($appid)){ - $queryarr = '{}'; - $access_token = $this->getAccessToken($applet_id); - }else{ - $queryarr = [ - 'appid' => $appid - ]; - $queryarr = json_encode($queryarr,JSON_UNESCAPED_UNICODE); - $access_token = $this->getAccessToken($applet_id,2); - } - $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumpget?access_token='.$access_token; - $result = json_decode(Http::post($url,$queryarr),true); - return $result; - } - /** - * 增加或修改二维码规则 - */ - public function addJumpQRCode($applet_id,$queryarr) - { - if(isset($queryarr['appid'])){ - $access_token = $this->getAccessToken($applet_id,2); - }else{ - $access_token = $this->getAccessToken($applet_id); - } - //获取效验文件 - $path = str_replace(base_url(),'',$queryarr['prefix']); - $path = './' . $path; - if(!$this->downloadQRCodeText($applet_id,$access_token,$path)){ - return false;//获取效验文件失败 - } - $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumpadd?access_token='.$access_token; - $result = json_decode(Http::post($url,hema_json($queryarr)),true); - if($result['errcode'] != 0){ - $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; - return false; - } - rmdirs($path);//添加成功,删除效验文件 - return $result; - } - /** - * 发布已设置的二维码规则 - */ - public function publishJumpQRCode($applet_id,$prefix,$parameter='') - { - if(empty($parameter)){ - $access_token = $this->getAccessToken($applet_id); - }else{ - $prefix = $prefix . '/' . $parameter; - $access_token = $this->getAccessToken($applet_id,2); - } - $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumppublish?access_token='.$access_token; - $queryarr = [ - 'prefix' => $prefix - ]; - return $this->result(Http::post($url,hema_json($queryarr))); - } - /** - * 删除已设置的二维码规则 - */ - public function deleteJumpQRCode($applet_id,$prefix,$appid='') - { - $queryarr = [ - 'prefix' => $prefix - ]; - if(empty($appid)){ - $access_token = $this->getAccessToken($applet_id); - }else{ - $queryarr['appid'] = $appid; - $access_token = $this->getAccessToken($applet_id,2); - } - $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumpdelete?access_token='.$access_token; - return $this->result(Http::post($url,hema_json($queryarr))); - } - /** - * 获取校验文件名称及内容 - */ - public function downloadQRCodeText($applet_id,$access_token,$path) - { - $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumpdownload?access_token='.$access_token; - $result = json_decode(Http::post($url,'{}'),true); - if ($result['errcode'] != 0) { - $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; - return false; - } - if(!file_exists($path)){ - mkdir($path,0777,true); - } - $path = $path . $result['file_name']; - file_put_contents($path,$result['file_content']); - return true; - } - - /************ 地理位置接口申请 (权限集 id 为:18)**************/ - /** - * 获取地理位置接口列表 - */ - public function getPrivacyInterface($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/security/get_privacy_interface?access_token='.$access_token; - $result = json_decode(Http::get($url),true); - return $result; - } - /** - * 申请地理位置接口 - */ - public function applyPrivacyInterface($applet_id,$queryarr=[]) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/security/apply_privacy_interface?access_token='.$access_token; - return $this->result(Http::post($url,hema_json($queryarr))); - } - - - /** - * 启动ticket推送服务 - */ - function startTicket(string $component_appid, string $component_secret) - { - $url = 'https://api.weixin.qq.com/cgi-bin/component/api_start_push_ticket'; - $queryarr = [ - 'component_appid' => $component_appid, - 'component_secret' => $component_secret - ]; - Http::post($url, json_encode($queryarr)); - return true; - } - /** - * 获取不限制的小程序码 - */ - public function getUnlimitedQRCode(int $applet_id,$file_path, string $scene = '',$page = 'pages/index/index') - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token='.$access_token; - $queryarr = [ - 'scene' => $scene, - 'page' => $page - ]; - $result = Http::post($url,json_encode($queryarr)); - file_put_contents(public_path().$file_path,$result); - //获取的二维码数据存储到指定的文件 - return $file_path; - } - /** - * 公众号用户登录 - 获取用户资料 - */ - public function getTicket($applet_id) - { - if(!$ticket = Cache::get('jsapi_ticket_'.$applet_id)){ - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/cgi-bin/ticket/getticket'; - $queryarr = [ - 'access_token' => $access_token, - 'type' => 'jsapi' - ]; - $result = json_decode(Http::get($url, $queryarr),true); - if($result['errcode']!=0){ - return false; - } - $ticket = $result['ticket']; - Cache::set('jsapi_ticket_'.$applet_id, $ticket, 5000); - } - return $ticket; - } - /** - * 查询昵称设置状态 - */ - public function querynickname(){ - $audit_id='454738159'; - $access_token = getAccessToken(); - $url = 'https://api.weixin.qq.com/wxa/api_wxa_querynickname?access_token='.$access_token; - $data = ['audit_id' => $audit_id]; - $result = http_post($url,$data); - return $result; - } - - /** - * 获取审核时可填写的类目信息 - */ - public function getshowwxaitem() - { - $access_token = getAccessToken(); - $url = 'https://api.weixin.qq.com/wxa/getshowwxaitem?access_token='.$access_token; - return curl($url); - } - /** - * code换取token - 微信扫码登录 - */ - function getWebToken(string $code) - { - $values = Setting::getItem('wxweb',0); - $url = 'https://api.weixin.qq.com/sns/oauth2/access_token'; - $queryarr = [ - 'appid' => $values['app_id'], - 'secret' => $values['app_secret'], - 'grant_type' => 'authorization_code', - 'code' => $code - ]; - $result = json_decode(Http::get($url,$queryarr),true); - if(isset($result['errcode']) AND $result['errcode'] != 0){ - $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; - return false; - } - return $result; - } - - /** - * 用户登录 - 获取用户资料 (公众号,web应用) - */ - public function getUserinfo(string $openid, string $access_token) - { - $url = 'https://api.weixin.qq.com/sns/userinfo'; - $queryarr = [ - 'access_token' => $access_token, - 'openid' => $openid, - 'lang' => 'zh_CN' - ]; - $result = json_decode(Http::get($url, $queryarr),true); - if(isset($result['errcode']) AND $result['errcode'] != 0){ - $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; - return false; - } - return $result; - } - - /** - * 获取授权应用的帐号基本信息 - */ - public function getAppInfo(string $auth_appid) - { - $config = $this->config; - $url = 'https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_info?component_access_token='.$config['component_access_token']; - $queryarr = [ - 'component_appid' => $config['app_id'], - 'authorizer_appid' => $auth_appid - ]; - $result = json_decode(Http::post($url, json_encode($queryarr)),true); - if(isset($result['errcode']) AND $result['errcode'] != 0){ - $this->error = 'code:'.$result['errcode'].',msg:'.$result['errmsg'];//获取失败 - return false; - } - return $result; - } - - /** - * 修改小程序头像 - */ - public function modifyHeadImage(string $media_id,int $applet_id) - { - $access_token = $this->getAccessToken($applet_id); - //执行修改头像 - $url = 'https://api.weixin.qq.com/cgi-bin/account/modifyheadimage?access_token='.$access_token; - $queryarr = [ - 'head_img_media_id' => $media_id, - 'x1' => 0, - 'y1' => 0, - 'x2' => 1, - 'y2' => 1 - ]; - return $this->result(Http::post($url, hema_json($queryarr))); - } - - /** - * 上传临时素材 - */ - public function upTempMaterial(string $file_url, int $applet_id, string $type='image') - { - $access_token = $this->getAccessToken($applet_id); - $real_path = web_path() . 'temp/' . time() . '.jpg'; - $temp_file = file_get_contents($file_url); //获取网络图片 - file_put_contents($real_path,$temp_file); //存放临时图片 - $url = 'https://api.weixin.qq.com/cgi-bin/media/upload?access_token='.$access_token.'&type='.$type; - $queryarr['media'] = curl_file_create($real_path,'image/jpeg',$file_url);//获取要上传的二进制文件 - $result = json_decode(http_post($url,$queryarr),true); - unlink($real_path);//删除临时图片 - if(isset($result['media_id'])){ - return $result['media_id']; //返回的临时素材(media_id) - }else{ - $this->error = 'code:'.$result['errcode'].',msg:'.$result['errmsg'];//获取失败 - return false; - } - } - - /** - * 获取小程序设置信息 - */ - public function getInfor(int $applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/cgi-bin/account/getaccountbasicinfo?access_token='.$access_token; - return $this->result(Http::get($url)); - } - - /** - * 获取预授权码 - 生成授权页面 - * $type,1=授权公众号,2=授权小程序,3=两者都有 - */ - public function authUrl(int $applet_id = 0, int $type = 3) - { - $config = $this->config; //获取第三方配置 - $url = '#'; - $redirect_uri = 'https://'.$config['authorize_domain'].'/applet/auth/'; - if($type==1){ - $redirect_uri .= 'wechat/applet_id/'.$applet_id; - }else{ - $redirect_uri .= 'wxapp/applet_id/'.$applet_id; - } - $url = 'https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode?component_access_token='.$config['component_access_token']; - $queryarr = [ - 'component_appid' => $config['app_id'] - ]; - $result = json_decode(Http::post($url, json_encode($queryarr)),true);//返回"pre_auth_code": "预授权码","expires_in": 有效期(600秒) - if(isset($result['pre_auth_code'])){ - $url = 'https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid='.$config['app_id'].'&pre_auth_code='.$result['pre_auth_code'].'&redirect_uri='.$redirect_uri.'&auth_type='.$type; - } - return $url; - } - - - /** - * 设置服务器域名 - */ - public function setServeDomain(int $applet_id = 0, string $apiurl = '', string $access_token = '') - { - $config = $this->config; - if(empty($access_token)){ - $access_token = $this->getAccessToken($applet_id); - } - if(empty($apiurl)){ - $apiurl = $config['api_domain']; - } - $domain = explode(';',$apiurl); - $requestdomain = [];//request 合法域名 - $wsrequestdomain = [];//socket 合法域名 - for($n=0;$n 'set', - 'requestdomain' => $requestdomain, - 'wsrequestdomain' => $wsrequestdomain, - 'uploaddomain' => $requestdomain, - 'downloaddomain' => $requestdomain - ]; - $result = json_decode(Http::post($url, hema_json($queryarr)),true); - if($result['errcode'] != 0){ - $this->error = 'code:'.$result['errcode'].',msg:'.$result['errmsg']; - return false; - } - $result['apiurl'] = $apiurl; - return $result; - } - - /** - * 设置业务域名 - */ - public function setWebDomain(int $applet_id = 0, string $apiurl = '') - { - $config = $this->config; - if(empty($access_token)){ - $access_token = $this->getAccessToken($applet_id); - } - if(empty($apiurl)){ - $apiurl = $config['api_domain']; - } - $domain = explode(';',$apiurl); - $webviewdomain = []; - foreach ($domain as $vo){ - $webviewdomain[] = 'https://'.$vo; - } - $url = 'https://api.weixin.qq.com/wxa/setwebviewdomain?access_token='.$access_token; - $queryarr = [ - 'action' => 'set', - 'webviewdomain' => $webviewdomain - ]; - return $this->result(Http::post($url, hema_json($queryarr))); - } - /** - * 设置功能介绍 - */ - public function setSignature(int $applet_id = 0, string $signature = '', string $access_token = '') - { - if(empty($access_token)){ - $access_token = $this->getAccessToken($applet_id); - } - if(empty($signature)){ - $signature = '一个值得信赖的小程序'; - } - $url = 'https://api.weixin.qq.com/cgi-bin/account/modifysignature?access_token='.$access_token; - $queryarr = ['signature' => $signature]; - $result = json_decode(Http::post($url, hema_json($queryarr)),true); - if($result['errcode'] != 0){ - $this->error = 'code:'.$result['errcode'].',msg:'.$result['errmsg']; - return false; - } - $result['signature'] = $signature; - return $result; - } - - /** - * 微信认证名称检测 - */ - public function checkWxVerifyNickName(int $applet_id, string $nick_name) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/cgi-bin/wxverify/checkwxverifynickname?access_token='.$access_token; - $queryarr = ['nick_name' => $nick_name]; - return $this->result(Http::post($url, hema_json($queryarr))); - } - /** - * 设置小程序昵称 - */ - public function setNickName(int $applet_id, string $nick_name, string $license, string $other1) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/setnickname?access_token='.$access_token; - $queryarr = [ - 'nick_name' => $nick_name, - 'license' => $license, - 'naming_other_stuff_1' => $other1 - ]; - return $this->result(Http::post($url, hema_json($queryarr))); - } - - /** - * 删除类目 - */ - public function deleteCategory(int $applet_id, int $first, int $second) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/deletecategory?access_token='.$access_token; - $queryarr = [ - 'first' => $first, - 'second' => $second - ]; - return $this->result(Http::post($url, hema_json($queryarr))); - } - - /** - * 获取已设置的所有类目 - */ - public function getCategory(int $applet_id) - { - $access_token = $this->getAccessToken($applet_id); - if($this->isp){ - $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/getcategory?access_token='.$access_token; - }else{ - $url = 'https://api.weixin.qq.com/wxaapi/newtmpl/getcategory?access_token='.$access_token; - } - $result = json_decode(Http::get($url),true); - return $result; - } - - /** - * 获取可以设置的所有类目 - */ - public function getAllCategories($applet_id) - { - //同步微信端线下类目 - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/getallcategories?access_token='.$access_token; - $result = json_decode(Http::get($url),true); - if($result['errcode']==0){ - $category = $result['categories_list']['categories']; - $new = []; //筛选后的类目 - //遍历一级类目 - foreach($category[0]['children'] as $value){ - //查找一级类目 - for($n=1;$ngetAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/addcategory?access_token='.$access_token; - $queryarr = [ - 'categories' => [ - [ - 'first' => $first, - 'second' => $second, - 'certicates' => [ - 'key' => $ca_name, - 'value' => $media_id - ] - ] - ] - ]; - return $this->result(Http::post($url, hema_json($queryarr))); - } - - /** - * 附近小程序 - 查询地点类目信息 - */ - public function getStoreWxaAttr(int $applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/getstorewxaattr?access_token='.$access_token; - $result = json_decode(Http::get($url),true); - $list = []; - if($result['errcode'] == 0 AND $result['is_exist'] == 1){ - $category = $this->getMerchantCategory($applet_id);//拉取可设置类目 - if(isset($result['store_wxa_attr']['weapp_category'])){ - foreach ($result['store_wxa_attr']['weapp_category']['categories'] as $vo) { - $first_name = ''; - $second_name = ''; - //获取一级类目名称 - foreach ($category as $first) { - if($first['id'] == $vo['first']){ - $first_name = $first['name']; - //获取二级类目名称 - foreach ($first['children'] as $second) { - if($second['id'] == $vo['second']){ - $second_name = $second['name']; - break; - } - } - break; - } - } - $list[] = [ - 'first_id' => $vo['first'], - 'first_name' => $first_name, - 'second_id' => $vo['second'], - 'second_name' => $second_name, - 'audit_status' => $vo['audit_status'], - 'audit_id' => $vo['audit_id'] - ]; - } - } - } - return $list; - } - /** - * 附近小程序 - 申请附近地点类目 - */ - public function nearbyApplyCategory(array $queryarr, int $applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/nearbyapplycategory?access_token='.$access_token; - $this->result(Http::post($url,hema_json($queryarr))); - } - /** - * 附近小程序 - 拉取门店小程序类目 - */ - public function getMerchantCategory(int $applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/get_merchant_category?access_token='.$access_token; - $result = json_decode(Http::get($url),true); - if($result['errcode']==0){ - $category = $result['data']['all_category_info']['categories']; - $new = []; //筛选后的类目 - //遍历一级类目 - foreach($category[0]['children'] as $value){ - //查找一级类目 - for($n=1;$ngetAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/getnearbypoilist?page=1&page_rows=20&access_token='.$access_token; - $result = json_decode(Http::get($url),true); - return $result; - } - /** - * 附近小程序 - 添加附近门店 - */ - public function addNearbyPoi(array $queryarr, int $applet_id) - { - $queryarr['hour'] = str_replace(' ','',$queryarr['hour']); - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/addnearbypoi?access_token='.$access_token; - return $this->result(Http::post($url,hema_json($queryarr))); - } - /** - * 附近小程序 - 删除附近门店 - */ - public function delNearbyPoi(int $applet_id, string $poi_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/delnearbypoi?access_token='.$access_token; - $queryarr =[ - 'poi_id' => $poi_id //门店的 poi_id - ]; - return $this->result(Http::post($url,hema_json($queryarr))); - } - - /** - * 附近小程序 - 展示/取消展示附近门店(小程序) - */ - public function setNearbyPoiShowStatus(int $applet_id, $poi_id, $status) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/setnearbypoishowstatus?access_token='.$access_token; - $queryarr =[ - 'poi_id' => $poi_id, //门店的 poi_id - 'status' => $status //0:取消展示;1:展示 - ]; - return $this->result(Http::post($url,hema_json($queryarr))); - } - - /** - * 配置小程序用户隐私保护指引 - */ - public function setPrivacySetting($applet_id,$queryarr) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/cgi-bin/component/setprivacysetting?access_token=' . $access_token; - $queryarr['owner_setting']['notice_method'] = '小程序弹窗'; - return $this->result(Http::post($url,hema_json($queryarr))); - } - - /** - * 查询小程序用户隐私保护指引 - */ - public function getPrivacySetting($applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/cgi-bin/component/getprivacysetting?access_token=' . $access_token; - return $this->result(Http::post($url,"{}")); - } - - /** - * 获取体验用户列表 - */ - public function getTestUser(int $applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/memberauth?access_token='.$access_token; - $queryarr =[ - 'action' => 'get_experiencer' //固定值 - ]; - return json_decode(Http::post($url,hema_json($queryarr)),true); - } - /** - * 添加体验用户 - */ - public function addTestUser(int $applet_id, string $wechatid) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/bind_tester?access_token='.$access_token; - $queryarr =[ - 'wechatid' => $wechatid //微信号 - ]; - return $this->result(Http::post($url,hema_json($queryarr))); - } - /** - * 删除体验用户 - */ - public function delTestUser(int $applet_id, string $userstr) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxa/unbind_tester?access_token='.$access_token; - $queryarr =[ - 'userstr' => $userstr //唯一识别码 - ]; - return $this->result(Http::post($url,hema_json($queryarr))); - } - - /** - * 上传图文消息内的图片 - 到微信端(永久素材) - 小程序端 - * 图片仅支持jpg/png格式,大小必须在1MB以下 - */ - public function upMediaUrl(string $file_url, int $applet_id = 0) - { - $access_token = $this->getAccessToken($applet_id); - $real_path = web_path() . 'temp/' . time() . '.jpg'; - $temp_file = file_get_contents($file_url);//获取网络图片 - file_put_contents($real_path,$temp_file); //存放临时图片 - //上传到微信服务器 - $url = 'https://api.weixin.qq.com/cgi-bin/media/uploadimg?access_token='.$access_token; - $queryarr['media'] = curl_file_create($real_path,'image/jpeg',$file_url);//获取要上传的二进制文件 - $result = json_decode(Http::post($url,$queryarr),true); - unlink($real_path);//删除临时图片 - if(!isset($result['url'])){ - $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; - return false;//上传错误,一般是图片不符合要求 - } - return $result['url']; - } - /** - * 使用授权码获取授权信息 - */ - public function getAuth(string $auth_code) - { - $config = $this->config; - $url = 'https://api.weixin.qq.com/cgi-bin/component/api_query_auth?component_access_token='.$config['component_access_token']; - $queryarr = [ - 'component_appid' => $config['app_id'], - 'authorization_code' => $auth_code - ]; - $result = json_decode(Http::post($url, hema_json($queryarr)),true); - if(!isset($result['authorization_info'])){ - $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; - return false; - } - return $result['authorization_info']; - } - - /** - * 获取 component_access_token - */ - public function getComponentToken(string $ticket) - { - $config = $this->config; - $url = 'https://api.weixin.qq.com/cgi-bin/component/api_component_token'; - $queryarr = [ - 'component_appid' => $config['app_id'], - 'component_appsecret' => $config['app_secret'], - 'component_verify_ticket' => $ticket, - ]; - $result = json_decode(Http::post($url, hema_json($queryarr)),true); - if(isset($result['component_access_token'])){ - return $result; - } - $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; - return false; - } - /************ 公众号 - 生成二维码 (帐号管理-生成带参数的二维码)**************/ - - public function qrcodeCreate($applet_id=0,$action_name='QR_STR_SCENE',$scene='login',$expire_seconds=7200) - { - $access_token = $this->getAccessToken($applet_id,2); - - $url = 'https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=' . $access_token; - /** - * 二维码类型 - * QR_SCENE为临时的整型参数值,QR_STR_SCENE为临时的字符串参数值 - * QR_LIMIT_SCENE为永久的整型参数值,QR_LIMIT_STR_SCENE为永久的字符串参数值 - */ - $queryarr['action_name'] = $action_name; - //设置临时二维码过期时间 - if($action_name=='QR_STR_SCENE' or $action_name=='QR_SCENE'){ - $queryarr['expire_seconds'] = $expire_seconds; - } - if($action_name=='QR_STR_SCENE' or $action_name=='QR_LIMIT_STR_SCENE'){ - $queryarr['action_info']['scene']['scene_str'] = $scene; - }else{ - $queryarr['action_info']['scene']['scene_id'] = (int)$scene; - } - $result = json_decode(Http::post($url, hema_json($queryarr)),true); - - if(isset($result['ticket'])){ - $rs = Http::get('https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket='.urlencode($result['ticket'])); - $path = 'temp'; - if(!file_exists('./'.$path)){ - mkdir($path,0777,true); - } - //获取的二维码数据存储到指定的文件 - file_put_contents('./'.$path . '/hemaphp_login_qrcode.png',$rs); - return $result['ticket']; - } - $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; - return false; - } - - /** - * 公众号网页授权 - H5用户登录 code 换取 access_token - * $appid 公众号的APPID - */ - public function oauth2($code,$appid,$applet_id) - { - $access_token = $this->getAccessToken($applet_id,2); - //通过 code 换取 access_token - $url = 'https://api.weixin.qq.com/sns/oauth2/component/access_token'; - $queryarr = [ - 'appid' => $appid, - 'code' => $code, - 'grant_type' => 'authorization_code', - 'component_appid' => $this->config['app_id'], - 'component_access_token' => $this->config['component_access_token'] - ]; - $result = json_decode(Http::get($url, $queryarr),true); - if (isset($result['errcode'])) { - $this->error = 'code:'.$result['errcode'].',msg:' . $result['errmsg']; - return false; - }else{ - //拉取用户信息(需 scope 为 snsapi_userinfo) - $url = 'https://api.weixin.qq.com/sns/userinfo?access_token'; - $queryarr = [ - 'access_token' => $result['access_token'], - 'openid' => $result['openid'], - 'lang' => 'zh_CN' - ]; - $result = json_decode(Http::get($url, $queryarr),true); - if (isset($result['errcode'])) { - $this->error = 'code:'.$result['errcode'].',msg:' . $result['errmsg']; - return false; - } - } - return $result; - } - /** - * 公众号获取粉丝列表 - */ - public function getFans(int $applet_id) - { - $access_token = $this->getAccessToken($applet_id,2); - $url = 'https://api.weixin.qq.com/cgi-bin/user/get?access_token='.$access_token.'&next_openid='; - $result = json_decode(Http::get($url),true); - return $result; - } - /** - * 上传图文消息内的图片 - 到微信端(永久素材) - 公众号端 - * 图片仅支持jpg/png格式,大小必须在1MB以下 - */ - public function upWechatUrl(array $img, int $applet_id = 0) - { - $access_token = $this->getAccessToken($applet_id,2); - for($n=0;$ngetAccessToken($applet_id,2); - $real_path = web_path() . 'uploads/' . $file_path; - //上传到微信服务器 - $url = 'https://api.weixin.qq.com/cgi-bin/material/add_material?access_token='.$access_token.'&type='.$type; - $queryarr['media'] = curl_file_create($real_path,$mimetype,$file_path);//获取要上传的二进制文件 - $result = json_decode(http_post($url,$queryarr),true); - return $result; //$result['media_id']; - } - /** - * 删除素材文件 - 到微信端 - */ - public function delMaterial(string $media_id, int $applet_id = 0) - { - $access_token = $this->getAccessToken($applet_id,2); - $url = 'https://api.weixin.qq.com/cgi-bin/material/del_material?access_token='.$access_token; - $queryarr = [ - 'media_id' => $media_id - ]; - $result = json_decode(Http::post($url,json_encode($queryarr)),true); - return $result; - } - - /** - * 新增草稿 - 图文消息 - */ - public function addDraft(array $data, int $applet_id = 0) - { - $queryarr['articles'] = array(); - for($n=0;$n $data[$n]['title'], - 'author' => $data[$n]['author'], - 'digest' => $data[$n]['digest'], - 'content' => str_ireplace('"','\'',$data[$n]['wx_content']), - 'content_source_url' => base_url(), - 'thumb_media_id' => $data[$n]['media_id'] - ]); - } - $access_token = $this->getAccessToken($applet_id,2); - //上传到微信服务器 - $url = 'https://api.weixin.qq.com/cgi-bin/draft/add?access_token='.$access_token; - $result = json_decode(Http::post($url,hema_json($queryarr)),true); - return $result; - } - - /** - * 修改草稿 - 图文消息 - */ - public function editDraft(array $data, int $media_id, int $applet_id = 0) - { - $access_token = $this->getAccessToken($applet_id,2); - for($n=0;$n $media_id, - 'index' => $data[$n]['ids'], - 'articles' => [ - 'title' => $data[$n]['title'], - 'author' => $data[$n]['author'], - 'digest' => $data[$n]['digest'], - 'content' => str_ireplace('"','\'',$data[$n]['wx_content']), - 'content_source_url' => base_url(), - 'thumb_media_id' => $data[$n]['media_id'] - ] - ]; - //上传到微信服务器 - $url = 'https://api.weixin.qq.com/cgi-bin/draft/update?access_token='.$access_token; - $result = json_decode(Http::post($url,hema_json($queryarr)),true); - if($result['errcode']!=0){ - $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; - return false; - } - } - return true; - } - - /** - * 删除草稿 - 图文消息 - */ - public function delDraft(string $media_id, int $applet_id = 0) - { - $access_token = $this->getAccessToken($applet_id,2); - $url = 'https://api.weixin.qq.com/cgi-bin/draft/delete?access_token='.$access_token; - $queryarr = [ - 'media_id' => $media_id - ]; - return json_decode(Http::post($url,json_encode($queryarr)),true); - } - /** - * 根据OpenID列表群发公众号信息 - */ - public function sendMass($msg, $open_id, int $applet_id = 0) - { - //图文消息 - if($msg['msg_type']['value']=='news'){ - $queryarr = [ - 'mpnews' => [ - 'media_id' => $msg['content'] - ], - 'msgtype' => 'mpnews', - 'send_ignore_reprint' => $msg['send_ignore_reprint'] - ]; - } - //文本消息 - if($msg['msg_type']['value']=='text'){ - $queryarr = [ - 'msgtype' => 'text', - 'text' => [ - 'content' => $msg['content'] - ] - ]; - } - //语音消息 - if($msg['msg_type']['value']=='voice'){ - $queryarr = [ - 'voice' => [ - 'media_id' => $msg['content'] - ], - 'msgtype' => 'voice' - ]; - } - //图片消息 - if($msg['msg_type']['value']=='image'){ - $queryarr = [ - 'images' => [ - 'media_ids' => [ - 0 => $msg['content'] - ], - 'recommend' => $msg['recommend'], - 'need_open_comment' => $msg['need_open_comment'], - 'only_fans_can_comment' => $msg['only_fans_can_comment'] - ], - 'msgtype' => 'image' - ]; - } - //视频消息 - if($msg['msg_type']['value']=='video'){ - $queryarr = [ - 'mpvideo' => [ - 'media_id' => $msg['content'], - 'title' => $msg['title'], - 'description' => $msg['description'] - ], - 'msgtype' => 'mpvideo' - ]; - } - //卡券消息 - if($msg['msg_type']['value']=='wxcard'){ - $queryarr = [ - 'wxcard' => [ - 'card_id' => $msg['content'] - ], - 'msgtype' => 'wxcard' - ]; - } - $queryarr['touser'] = $open_id; - $access_token = $this->getAccessToken($applet_id,2); - $url = 'https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token='.$access_token; - $result = json_decode(Http::post($url,json_encode($queryarr)),true); - return $result; - } - /** - * 删除公众号群发记录 - */ - public function deleteMass(int $msg_id,int $applet_id = 0) - { - $access_token = $this->getAccessToken($applet_id,2); - $url = 'https://api.weixin.qq.com/cgi-bin/message/mass/delete?access_token='.$access_token; - $queryarr = ['msg_id' => $msg_id]; - $result = json_decode(Http::post($url,json_encode($queryarr)),true); - return $result; - } - /** - * 向公众号发布预览消息 - */ - public function previewMsg(array $data, string $open_id, int $applet_id = 0) - { - //图文消息 - if($data['msg_type']=='news'){ - $queryarr = [ - 'mpnews' => ['media_id' => $data['content']], - 'msgtype' => 'mpnews' - ]; - } - //文本消息 - if($data['msg_type']=='text'){ - $queryarr = [ - 'text' => ['content' => $data['content']], - 'msgtype' => 'text' - ]; - } - //语音消息 - if($data['msg_type']=='voice'){ - $queryarr = [ - 'voice' => ['media_id' => $data['content']], - 'msgtype' => 'voice' - ]; - } - //图片消息 - if($data['msg_type']=='image'){ - $queryarr = [ - 'image' => ['media_id' => $data['content']], - 'msgtype' => 'image' - ]; - } - //视频消息 - if($data['msg_type']=='video'){ - $queryarr = [ - 'mpvideo' => ['media_id' => $data['content']], - 'msgtype' => 'mpvideo' - ]; - } - //卡券消息 - if($data['msg_type']=='wxcard'){ - $queryarr = '{ - "wxcard":{ - "card_id":"'.$data['content'].'", - "card_ext": "{ - "code":"", - "openid":"", - "timestamp":"", - "signature":"" - } - "msgtype":"wxcard" - }'; - $queryarr = [ - 'wxcard' => [ - 'card_id' => $data['content'], - 'card_ext' => [ - 'code' => '', - 'openid' => '', - 'timestamp' => '', - 'signature' => '' - ] - ], - 'msgtype' => 'wxcard' - ]; - } - $queryarr['touser'] = $open_id; - $access_token = $this->getAccessToken($applet_id,2); - $url = 'https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token='.$access_token; - $result = json_decode(Http::post($url,json_encode($queryarr)),true); - return $result; - } - /** - * 公众号自定义菜单 - 同步到微信端 - */ - public function creatMenu(array $menu, int $applet_id = 0) - { - $access_token = $this->getAccessToken($applet_id,2); - $url = 'https://api.weixin.qq.com/cgi-bin/menu/create?access_token='.$access_token; - $queryarr = [ - 'button' => $menu - ]; - $result = json_decode(Http::post($url, hema_json($queryarr)),true); - return $result; - } - /** - * 发布模板消息 - 公众号 - */ - function sendWechatMsg(int $applet_id = 0, array $queryarr = []) - { - if(sizeof($queryarr) == 0){ - return true; - } - $access_token = $this->getAccessToken($applet_id,2); - $url = 'https://api.weixin.qq.com/cgi-bin/message/template/send?access_token='.$access_token; - $result = json_decode(Http::post($url,json_encode($queryarr)),true); - return true; - } - - /** - * 获取公众号粉丝用户基本信息(包括UnionID机制)- 公众号 - */ - public function getWechatUserInfo(string $openid, int $applet_id) - { - $access_token = $this->getAccessToken($applet_id,2); - $url = 'https://api.weixin.qq.com/cgi-bin/user/info'; - $queryarr = [ - 'access_token' => $access_token, - 'openid' => $openid, - 'lang' => 'zh_CN' - ]; - $result = json_decode(Http::get($url,$queryarr),true); - if(!isset($result['openid'])){ - $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; - return false; - } - $data['open_id'] = $result['openid']; - if(isset($result['unionid'])){ - $data['union_id'] = $result['unionid']; - } - return $data; - } - - /** - * 发送客服消息模板 - */ - public function sendServiceMsg(array $msg, string $touser, int $applet_id) - { - //文本消息 - if($msg['type']=='text'){ - $queryarr = [ - 'msgtype' => 'text', - 'text' => [ - 'content' => $msg['content'] - ] - ]; - } - //图片消息 - if($msg['type']=='image'){ - $queryarr = [ - 'msgtype' => 'image', - 'image' => [ - 'media_id' => $msg['media_id'] - ] - ]; - } - //图文消息(点击跳转到图文消息页面) 图文消息条数限制在1条以内 - if($msg['type']=='news'){ - $queryarr = [ - 'msgtype' => 'mpnews', - 'mpnews' => [ - 'media_id' => $msg['media_id'] - ] - ]; - } - //发送图文消息(点击跳转到外链) 图文消息条数限制在1条以内 - if($msg['type']=='news'){ - $queryarr = [ - 'msgtype' => 'news', - 'news' => [ - 'articles' => [ - 'picurl' => $msg['picurl'], - 'url' => $msg['url'], - 'title' => $msg['title'], - 'description' => $msg['description'] - ] - ] - ]; - } - //语音消息 - if($msg['type']=='voice'){ - $queryarr = [ - 'msgtype' => 'voice', - 'voice' => [ - 'media_id' => $msg['media_id'] - ] - ]; - } - //视频消息 - if($msg['type']=='video'){ - $queryarr = [ - 'msgtype' => 'video', - 'video' => [ - 'media_id' => $msg['media_id'], - 'thumb_media_id' => $msg['thumb_media_id'], - 'title' => $msg['title'], - 'description' => $msg['description'] - ] - ]; - } - //音乐消息 - if($msg['type']=='music'){ - $queryarr = [ - 'msgtype' => 'music', - 'video' => [ - 'musicurl' => $msg['musicurl'], - 'thumb_media_id' => $msg['thumb_media_id'], - 'title' => $msg['title'], - 'hqmusicurl' => $msg['hqmusicurl'], - 'description' => $msg['description'] - ] - ]; - } - //发送小程序卡片(要求小程序与公众号已关联) - if($msg['type']=='wxapp'){ - $queryarr = [ - 'msgtype' => 'miniprogrampage', - 'miniprogrampage' => [ - 'pagepath' => $msg['pagepath'], - 'thumb_media_id' => $msg['thumb_media_id'], - 'title' => $msg['title'], - 'appid' => $msg['appid'], - 'description' => $msg['description'] - ] - ]; - } - if(isset($queryarr)){ - $queryarr['touser'] = $touser; - $access_token = $this->getAccessToken($applet_id,2); - $url = 'https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token='.$access_token; - return $this->result(Http::post($url, hema_json($queryarr))); - } - $this->error = '参数错误'; - return false; - } - /** - * 获取令牌 - 开放平台 - * $type 请求类型 1小程序,2公众号 - */ - function getAccessToken(int $applet_id = 0, int $type = 1) - { - $config = $this->config; //获取第三方配置 - $access_token = ''; - if($type==1){ - if($applet = Applet::getApplet([ - 'applet_id' => $applet_id, - 'status' => 1 - ])){ - $access_token=$applet['access_token']; - if($applet['expires_in'] < time()){ - //重新获取 - $url = 'https://api.weixin.qq.com/cgi-bin/component/api_authorizer_token?component_access_token='.$config['component_access_token']; - $queryarr = [ - 'component_appid' => $config['app_id'], - 'authorizer_appid' => $applet['app_id'], - 'authorizer_refresh_token' => $applet['authorizer_refresh_token'] - ]; - $result = json_decode(Http::post($url, json_encode($queryarr)),true); - if(isset($result['authorizer_access_token'])){ - $access_token = $result['authorizer_access_token']; - $applet->access_token = $result['authorizer_access_token']; - $applet->expires_in = time()+3600;//2个小时候过期,这里设置1小时获取一次 - $applet->save();//保存最新的令牌access_token和过期时间 - } - } - } - }else{ - //公众号 - if($wechat = Wechat::getWechat([ - 'applet_id' => $applet_id, - 'status' => 1 - ])){ - $access_token=$wechat['access_token']; - if($wechat['expires_in'] < time()){ - //重新获取 - $url = 'https://api.weixin.qq.com/cgi-bin/component/api_authorizer_token?component_access_token='.$config['component_access_token']; - $queryarr = [ - 'component_appid' => $config['app_id'], - 'authorizer_appid' => $wechat['app_id'], - 'authorizer_refresh_token' => $wechat['authorizer_refresh_token'] - ]; - $result = json_decode(Http::post($url, json_encode($queryarr)),true); - if(isset($result['authorizer_access_token'])){ - $access_token = $result['authorizer_access_token']; - $wechat->access_token = $result['authorizer_access_token']; - $wechat->expires_in = time()+3600; //2个小时候过期,这里设置1小时获取一次 - $wechat->save();//保存最新的令牌access_token和过期时间 - } - } - } - } - return $access_token; - } - /** - * 请求数据验证 - **/ - private function result($result) - { - $result = json_decode($result,true); - if(isset($result['errcode']) and $result['errcode']!=0){ - $this->error = '错误代码:' . $result['errcode'] . ',错误信息:' . $result['errmsg']; - return false; - } - return $result; - } - public function getError() - { - return $this->error; - } - - //订阅消息接口 - //#################################################################### - /** - * 获取帐号下的模板列表 - */ - public function getMessageTemplateList(int $applet_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxaapi/newtmpl/gettemplate?access_token='.$access_token; - return $this->result(Http::get($url)); - } - /** - * 删除帐号下的模板 - */ - public function deleteMessageTemplate(int $applet_id, string $tpl_id) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxaapi/newtmpl/deltemplate?access_token='.$access_token; - $queryarr = [ - 'priTmplId' => $tpl_id - ]; - return $this->result(Http::post($url, hema_json($queryarr),[],['content-type: application/json'])); - } - /** - * 添加帐号下的模板 - */ - public function addMessageTemplate(int $applet_id, string $tid, array $kidlist, string $desc) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/wxaapi/newtmpl/addtemplate?access_token='.$access_token; - $queryarr = [ - 'tid' => $tid, - 'kidList' => $kidlist, - 'sceneDesc' => $desc - ]; - return $this->result(Http::post($url, hema_json($queryarr),[],['content-type: application/json'])); - } - /** - * 发送订阅消息 - */ - public function sendMessage(int $applet_id, array $queryarr) - { - $access_token = $this->getAccessToken($applet_id); - $url = 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token='.$access_token; - $result = json_decode(Http::post($url,json_encode($queryarr)),true); - write_log($result,__DIR__); - return true; - } - //#################################################################### +isp = $isp; + if($isp){ + $value = Setting::getItem('wxopen'); + $value['component_access_token'] = Cache::get('component_access_token',''); + $this->config = $value; + } + } + + /** + * 获取session_key + */ + public function getSessionKey(string $code, int $applet_id) + { + if(!$applet = Applet::get($applet_id)){ + $this->error = 'applet_id不存在!'; + return false; + } + if($this->isp){ + $url = 'https://api.weixin.qq.com/sns/component/jscode2session'; + $queryarr = [ + 'appid' => $applet['app_id'], + 'js_code' => $code, + 'grant_type' => 'authorization_code', + 'component_appid' => $this->config['app_id'], + 'component_access_token' => $this->config['component_access_token'] + ]; + }else{ + $url = 'https://api.weixin.qq.com/sns/jscode2session'; + $queryarr = [ + 'appid' => $applet['app_id'], + 'secret' => $applet['app_secret'], + 'grant_type' => 'authorization_code', + 'js_code' => $code + ]; + } + $result = json_decode(Http::get($url, $queryarr),true); + if (isset($result['errcode'])) { + $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; + return false; + } + return $result; + } + //* ************************即将废除 - 开始************************* + /** + * 获取session_key - 服务商版 + + */ + public function getComponentSessionKey(string $code, int $applet_id) + { + $applet = Applet::get($applet_id); + $url = 'https://api.weixin.qq.com/sns/component/jscode2session'; + $queryarr = [ + 'appid' => $applet['app_id'], + 'js_code' => $code, + 'grant_type' => 'authorization_code', + 'component_appid' => $this->config['app_id'], + 'component_access_token' => $this->config['component_access_token'] + ]; + $result = json_decode(Http::get($url, $queryarr),true); + if (isset($result['errcode'])) { + $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; + return false; + } + return $result; + } + + //* ************************即将废除 - 结束************************* + + + + /************ 小程序直播 (权限集 id 为:52)**************/ + /** + * 申请开通直播 + */ + public function applyLivelnfo($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/business/applyliveinfo?access_token='.$access_token; + $queryarr = [ + 'action' => 'apply' + ]; + return $this->result(Http::post($url, hema_json($queryarr))); + } + /************ 代商家注册小程序 **************/ + /** + * 快速注册企业小程序 + */ + public function registerMiniprogram($queryarr) + { + $url = 'https://api.weixin.qq.com/cgi-bin/component/fastregisterweapp?action=create&component_access_token=' . $this->config['component_access_token']; + return $this->result(Http::post($url,hema_json($queryarr))); + } + /************ 模板库管理 **************/ + /** + * 删除代码模板 + */ + public function deleteTemplate(int $template_id) + { + $config = $this->config; + $url = 'https://api.weixin.qq.com/wxa/deletetemplate?access_token='.$config['component_access_token']; + $queryarr = ['template_id' => $template_id]; + return $this->result(Http::post($url,hema_json($queryarr))); + } + + /** + * 获取模板列表 + * $template_type 模板类型 0=普通模板 1=标准模板,为空则全部 + */ + public function getTemplateList($template_type='') + { + $config = $this->config; + $url = 'https://api.weixin.qq.com/wxa/gettemplatelist?access_token='.$config['component_access_token']; + $queryarr = ['template_type' => $template_type]; + $result = json_decode(Http::get($url,$queryarr),true); + if($result['errcode']==0 AND sizeof($result['template_list']) > 0){ + return arr_sort($result['template_list'],'template_id'); + } + return []; + } + /** + * 将草稿添加到模板库 + * $template_type 模板类型 0=普通模板 1=标准模板 + */ + public function addToTemplate(int $draft_id, int $template_type = 0) + { + $config = $this->config; + $url = 'https://api.weixin.qq.com/wxa/addtotemplate?access_token='.$config['component_access_token']; + $queryarr = [ + 'draft_id' => $draft_id, + 'template_type' => $template_type + ]; + return $this->result(Http::post($url,hema_json($queryarr))); + } + /** + * 获取草稿箱列表 + */ + public function getTemplatedRaftList() + { + $config = $this->config; + $url = 'https://api.weixin.qq.com/wxa/gettemplatedraftlist?access_token='.$config['component_access_token']; + $result = json_decode(Http::get($url),true); + if($result['errcode']==0 OR isset($result['draft_list']) > 0){ + return arr_sort($result['draft_list'],'draft_id'); + } + return []; + } + + /************ 小程序代码管理 (权限集 id 为:18)**************/ + /** + * 上传代码并生成体验版 + */ + public function commit($applet, $code, $is_live = 0) + { + $access_token = $this->getAccessToken($applet['applet_id']); + $url = 'https://api.weixin.qq.com/wxa/commit?access_token='.$access_token; + $apiurl = $this->config['api_domain']; + $apiurl = explode(';',$apiurl); + $apiurl = 'https://'.$apiurl[0]; + $ext = [ + 'extEnable' => true, + 'extAppid' => $applet['app_id'], + 'directCommit' => false, + 'ext' => [ + 'applet_id' => $applet['applet_id'], + 'api_url' => $apiurl + ], + 'requiredPrivateInfos' => [ + 'getLocation', + 'chooseLocation' + ] + ]; + //如果小程序开通直播 + if($is_live == 1){ + /* + if($wxlive = get_addon_config('wxlive')){ + $ext['plugins']['live-player-plugin'] = [ + 'version' => $wxlive['user_version'], + 'provider' => $wxlive['plugin_appid'] + ]; + }*/ + } + $queryarr = [ + 'template_id' => $code['id'], + 'ext_json' => json_encode($ext), + 'user_version' => $code['user_version'], + 'user_desc' => $code['user_desc'] + ]; + return $this->result(Http::post($url, hema_json($queryarr))); + } + /** + * 获取体验版二维码 + */ + public function getTrialQRCode($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $path = urlencode('pages/index/index'); + $url = 'https://api.weixin.qq.com/wxa/get_qrcode?access_token='.$access_token.'&path='.$path; + $result = Http::get($url); + $path = 'temp'; + if(!file_exists('./'.$path)){ + mkdir($path,0777,true); + } + //获取的二维码数据存储到指定的文件 + file_put_contents('./'.$path . '/test_code_'. $applet_id .'.png',$result); + return '/'.$path.'/test_code_'.$applet_id.'.png'; + } + /** + * 提交代码审核 + */ + public function submitAudit($applet_id,$speedup=0) + { + $access_token = $this->getAccessToken($applet_id); + $queryarr = [ + 'privacy_api_not_use' => false + ]; + $url = 'https://api.weixin.qq.com/wxa/submit_audit?access_token='.$access_token; + $result = json_decode(Http::post($url,hema_json($queryarr)),true); + if($result['errcode'] != 0){ + $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; + return false; + } + //是否加急审核 + if($speedup == 1){ + if(!$this->speedupCodeAudit($applet_id,$result['auditid'])){ + return false; + } + } + return $result; + } + /** + * 查询审核单状态 + */ + public function getAuditStatus($applet_id,$auditid) + { + $access_token = getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/get_auditstatus?access_token='.$access_token; + $queryarr = [ + 'auditid' => $auditid + ]; + return $this->result(Http::post($url, json_encode($queryarr))); + } + /** + * 撤回代码审核 + * 单个帐号每天审核撤回次数最多不超过 5 次(每天的额度从0点开始生效),一个月不超过 10 次 + */ + public function undoAudit($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/undocodeaudit?access_token='.$access_token; + return $this->result(Http::get($url)); + } + /** + * 发布已通过审核的小程序 + */ + public function release($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/release?access_token='.$access_token; + return $this->result(Http::post($url,'{}')); + } + /** + * 小程序版本回退 + */ + public function revertCodeRelease($applet_id,$version='') + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/revertcoderelease?app_version='.$version.'&access_token='.$access_token; + return $this->result(Http::get($url)); + } + /** + * 获取可回退的小程序版本 + */ + public function getHistoryVersion($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/revertcoderelease?action=get_history_version&access_token='.$access_token; + return $this->result(Http::get($url)); + } + /** + * 设置小程序服务状态 + */ + public function setVisitStatus($applet_id,$action) + { + $access_token = $this->getAccessToken($applet_id); + $queryarr = [ + 'action' => $action + ]; + $url = 'https://api.weixin.qq.com/wxa/change_visitstatus?access_token='.$access_token; + return $this->result(Http::post($url,hema_json($queryarr))); + } + /** + * 查询小程序服务状态 + */ + public function getVisitStatus($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/getvisitstatus?access_token='.$access_token; + return $this->result(Http::post($url,'{}')); + } + /** + * 设置最低基础库版本 + */ + public function setSupportVersion($applet_id,$version) + { + $access_token = $this->getAccessToken($applet_id); + $queryarr = [ + 'version' => $version + ]; + $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/setweappsupportversion?access_token='.$access_token; + return $this->result(Http::post($url,hema_json($queryarr))); + } + /** + * 查询服务商审核额度 + */ + public function setCodeAuditQuota($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/queryquota?access_token='.$access_token; + return $this->result(Http::get($url)); + } + /** + * 加急代码审核 + */ + public function speedupCodeAudit($applet_id,$auditid) + { + $access_token = $this->getAccessToken($applet_id); + $queryarr = [ + 'auditid' => $auditid + ]; + $url = 'https://api.weixin.qq.com/wxa/speedupaudit?access_token='.$access_token; + return $this->result(Http::post($url,hema_json($queryarr))); + } + /** + * 查询小程序版本信息 + */ + public function getVersionInfo($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/getversioninfo?access_token='.$access_token; + return $this->result(Http::post($url,'{}')); + } + /** + * 查询最新一次审核单状态 + */ + public function getLatestAuditStatus($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/get_latest_auditstatus?access_token='.$access_token; + return $this->result(Http::get($url)); + } + /** + * 获取隐私接口检测结果 + */ + public function getCodePrivacyInfo($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/security/get_code_privacy_info?access_token='.$access_token; + $result = json_decode(Http::get($url),true); + if($result['errcode'] != 0){ + $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; + return false; + } + $res = true; + $error = ''; + if(sizeof($result['without_auth_list']) > 0){ + $error = '没权限的隐私接口:'; + foreach ($result['without_auth_list'] as $item){ + $error = $error . $item . ','; + } + $res = false; + } + if(sizeof($result['without_conf_list']) > 0){ + if(empty($error)){ + $error = '没配置的隐私接口:'; + }else{ + $error = $error . '没配置的隐私接口:'; + } + foreach ($result['without_auth_list'] as $item){ + $error = $error . $item . ','; + } + $res = false; + } + if(!empty($error)){ + $error = $error . '请完成配置'; + } + if($res){ + return $result; + } + $this->error = $error; + return false; + } + /************ 扫普通二维码打开小程序 (权限集 id 为:3、18)**************/ + /** + * 获取已设置的二维码规则 + */ + public function getJumpQRCode($applet_id,$appid='') + { + if(empty($appid)){ + $queryarr = '{}'; + $access_token = $this->getAccessToken($applet_id); + }else{ + $queryarr = [ + 'appid' => $appid + ]; + $queryarr = json_encode($queryarr,JSON_UNESCAPED_UNICODE); + $access_token = $this->getAccessToken($applet_id,2); + } + $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumpget?access_token='.$access_token; + $result = json_decode(Http::post($url,$queryarr),true); + return $result; + } + /** + * 增加或修改二维码规则 + */ + public function addJumpQRCode($applet_id,$queryarr) + { + if(isset($queryarr['appid'])){ + $access_token = $this->getAccessToken($applet_id,2); + }else{ + $access_token = $this->getAccessToken($applet_id); + } + //获取效验文件 + $path = str_replace(base_url(),'',$queryarr['prefix']); + $path = './' . $path; + if(!$this->downloadQRCodeText($applet_id,$access_token,$path)){ + return false;//获取效验文件失败 + } + $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumpadd?access_token='.$access_token; + $result = json_decode(Http::post($url,hema_json($queryarr)),true); + if($result['errcode'] != 0){ + $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; + return false; + } + rmdirs($path);//添加成功,删除效验文件 + return $result; + } + /** + * 发布已设置的二维码规则 + */ + public function publishJumpQRCode($applet_id,$prefix,$parameter='') + { + if(empty($parameter)){ + $access_token = $this->getAccessToken($applet_id); + }else{ + $prefix = $prefix . '/' . $parameter; + $access_token = $this->getAccessToken($applet_id,2); + } + $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumppublish?access_token='.$access_token; + $queryarr = [ + 'prefix' => $prefix + ]; + return $this->result(Http::post($url,hema_json($queryarr))); + } + /** + * 删除已设置的二维码规则 + */ + public function deleteJumpQRCode($applet_id,$prefix,$appid='') + { + $queryarr = [ + 'prefix' => $prefix + ]; + if(empty($appid)){ + $access_token = $this->getAccessToken($applet_id); + }else{ + $queryarr['appid'] = $appid; + $access_token = $this->getAccessToken($applet_id,2); + } + $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumpdelete?access_token='.$access_token; + return $this->result(Http::post($url,hema_json($queryarr))); + } + /** + * 获取校验文件名称及内容 + */ + public function downloadQRCodeText($applet_id,$access_token,$path) + { + $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumpdownload?access_token='.$access_token; + $result = json_decode(Http::post($url,'{}'),true); + if ($result['errcode'] != 0) { + $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; + return false; + } + if(!file_exists($path)){ + mkdir($path,0777,true); + } + $path = $path . $result['file_name']; + file_put_contents($path,$result['file_content']); + return true; + } + + /************ 地理位置接口申请 (权限集 id 为:18)**************/ + /** + * 获取地理位置接口列表 + */ + public function getPrivacyInterface($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/security/get_privacy_interface?access_token='.$access_token; + $result = json_decode(Http::get($url),true); + return $result; + } + /** + * 申请地理位置接口 + */ + public function applyPrivacyInterface($applet_id,$queryarr=[]) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/security/apply_privacy_interface?access_token='.$access_token; + return $this->result(Http::post($url,hema_json($queryarr))); + } + + + /** + * 启动ticket推送服务 + */ + function startTicket(string $component_appid, string $component_secret) + { + $url = 'https://api.weixin.qq.com/cgi-bin/component/api_start_push_ticket'; + $queryarr = [ + 'component_appid' => $component_appid, + 'component_secret' => $component_secret + ]; + Http::post($url, json_encode($queryarr)); + return true; + } + /** + * 获取不限制的小程序码 + */ + public function getUnlimitedQRCode(int $applet_id,$file_path, string $scene = '',$page = 'pages/index/index') + { + $access_token = $this->getAccessToken($applet_id); + + + $url = 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token='.$access_token; + $queryarr = [ + 'scene' => $scene, + 'page' => $page + ]; + $result = Http::post($url,json_encode($queryarr)); + + file_put_contents(public_path().$file_path,$result); + //获取的二维码数据存储到指定的文件 + return $file_path; + } + /** + * 公众号用户登录 - 获取用户资料 + */ + public function getTicket($applet_id) + { + if(!$ticket = Cache::get('jsapi_ticket_'.$applet_id)){ + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/cgi-bin/ticket/getticket'; + $queryarr = [ + 'access_token' => $access_token, + 'type' => 'jsapi' + ]; + $result = json_decode(Http::get($url, $queryarr),true); + if($result['errcode']!=0){ + return false; + } + $ticket = $result['ticket']; + Cache::set('jsapi_ticket_'.$applet_id, $ticket, 5000); + } + return $ticket; + } + /** + * 查询昵称设置状态 + */ + public function querynickname(){ + $audit_id='454738159'; + $access_token = getAccessToken(); + $url = 'https://api.weixin.qq.com/wxa/api_wxa_querynickname?access_token='.$access_token; + $data = ['audit_id' => $audit_id]; + $result = http_post($url,$data); + return $result; + } + + /** + * 获取审核时可填写的类目信息 + */ + public function getshowwxaitem() + { + $access_token = getAccessToken(); + $url = 'https://api.weixin.qq.com/wxa/getshowwxaitem?access_token='.$access_token; + return curl($url); + } + /** + * code换取token - 微信扫码登录 + */ + function getWebToken(string $code) + { + $values = Setting::getItem('wxweb',0); + $url = 'https://api.weixin.qq.com/sns/oauth2/access_token'; + $queryarr = [ + 'appid' => $values['app_id'], + 'secret' => $values['app_secret'], + 'grant_type' => 'authorization_code', + 'code' => $code + ]; + $result = json_decode(Http::get($url,$queryarr),true); + if(isset($result['errcode']) AND $result['errcode'] != 0){ + $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; + return false; + } + return $result; + } + + /** + * 用户登录 - 获取用户资料 (公众号,web应用) + */ + public function getUserinfo(string $openid, string $access_token) + { + $url = 'https://api.weixin.qq.com/sns/userinfo'; + $queryarr = [ + 'access_token' => $access_token, + 'openid' => $openid, + 'lang' => 'zh_CN' + ]; + $result = json_decode(Http::get($url, $queryarr),true); + if(isset($result['errcode']) AND $result['errcode'] != 0){ + $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; + return false; + } + return $result; + } + + /** + * 获取授权应用的帐号基本信息 + */ + public function getAppInfo(string $auth_appid) + { + $config = $this->config; + $url = 'https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_info?component_access_token='.$config['component_access_token']; + $queryarr = [ + 'component_appid' => $config['app_id'], + 'authorizer_appid' => $auth_appid + ]; + $result = json_decode(Http::post($url, json_encode($queryarr)),true); + if(isset($result['errcode']) AND $result['errcode'] != 0){ + $this->error = 'code:'.$result['errcode'].',msg:'.$result['errmsg'];//获取失败 + return false; + } + return $result; + } + + /** + * 修改小程序头像 + */ + public function modifyHeadImage(string $media_id,int $applet_id) + { + $access_token = $this->getAccessToken($applet_id); + //执行修改头像 + $url = 'https://api.weixin.qq.com/cgi-bin/account/modifyheadimage?access_token='.$access_token; + $queryarr = [ + 'head_img_media_id' => $media_id, + 'x1' => 0, + 'y1' => 0, + 'x2' => 1, + 'y2' => 1 + ]; + return $this->result(Http::post($url, hema_json($queryarr))); + } + + /** + * 上传临时素材 + */ + public function upTempMaterial(string $file_url, int $applet_id, string $type='image') + { + $access_token = $this->getAccessToken($applet_id); + $real_path = web_path() . 'temp/' . time() . '.jpg'; + $temp_file = file_get_contents($file_url); //获取网络图片 + file_put_contents($real_path,$temp_file); //存放临时图片 + $url = 'https://api.weixin.qq.com/cgi-bin/media/upload?access_token='.$access_token.'&type='.$type; + $queryarr['media'] = curl_file_create($real_path,'image/jpeg',$file_url);//获取要上传的二进制文件 + $result = json_decode(http_post($url,$queryarr),true); + unlink($real_path);//删除临时图片 + if(isset($result['media_id'])){ + return $result['media_id']; //返回的临时素材(media_id) + }else{ + $this->error = 'code:'.$result['errcode'].',msg:'.$result['errmsg'];//获取失败 + return false; + } + } + + /** + * 获取小程序设置信息 + */ + public function getInfor(int $applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/cgi-bin/account/getaccountbasicinfo?access_token='.$access_token; + return $this->result(Http::get($url)); + } + + /** + * 获取预授权码 - 生成授权页面 + * $type,1=授权公众号,2=授权小程序,3=两者都有 + */ + public function authUrl(int $applet_id = 0, int $type = 3) + { + $config = $this->config; //获取第三方配置 + $url = '#'; + $redirect_uri = 'https://'.$config['authorize_domain'].'/applet/auth/'; + if($type==1){ + $redirect_uri .= 'wechat/applet_id/'.$applet_id; + }else{ + $redirect_uri .= 'wxapp/applet_id/'.$applet_id; + } + $url = 'https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode?component_access_token='.$config['component_access_token']; + $queryarr = [ + 'component_appid' => $config['app_id'] + ]; + $result = json_decode(Http::post($url, json_encode($queryarr)),true);//返回"pre_auth_code": "预授权码","expires_in": 有效期(600秒) + if(isset($result['pre_auth_code'])){ + $url = 'https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid='.$config['app_id'].'&pre_auth_code='.$result['pre_auth_code'].'&redirect_uri='.$redirect_uri.'&auth_type='.$type; + } + return $url; + } + + + /** + * 设置服务器域名 + */ + public function setServeDomain(int $applet_id = 0, string $apiurl = '', string $access_token = '') + { + $config = $this->config; + if(empty($access_token)){ + $access_token = $this->getAccessToken($applet_id); + } + if(empty($apiurl)){ + $apiurl = $config['api_domain']; + } + $domain = explode(';',$apiurl); + $requestdomain = [];//request 合法域名 + $wsrequestdomain = [];//socket 合法域名 + for($n=0;$n 'set', + 'requestdomain' => $requestdomain, + 'wsrequestdomain' => $wsrequestdomain, + 'uploaddomain' => $requestdomain, + 'downloaddomain' => $requestdomain + ]; + $result = json_decode(Http::post($url, hema_json($queryarr)),true); + if($result['errcode'] != 0){ + $this->error = 'code:'.$result['errcode'].',msg:'.$result['errmsg']; + return false; + } + $result['apiurl'] = $apiurl; + return $result; + } + + /** + * 设置业务域名 + */ + public function setWebDomain(int $applet_id = 0, string $apiurl = '') + { + $config = $this->config; + if(empty($access_token)){ + $access_token = $this->getAccessToken($applet_id); + } + if(empty($apiurl)){ + $apiurl = $config['api_domain']; + } + $domain = explode(';',$apiurl); + $webviewdomain = []; + foreach ($domain as $vo){ + $webviewdomain[] = 'https://'.$vo; + } + $url = 'https://api.weixin.qq.com/wxa/setwebviewdomain?access_token='.$access_token; + $queryarr = [ + 'action' => 'set', + 'webviewdomain' => $webviewdomain + ]; + return $this->result(Http::post($url, hema_json($queryarr))); + } + /** + * 设置功能介绍 + */ + public function setSignature(int $applet_id = 0, string $signature = '', string $access_token = '') + { + if(empty($access_token)){ + $access_token = $this->getAccessToken($applet_id); + } + if(empty($signature)){ + $signature = '一个值得信赖的小程序'; + } + $url = 'https://api.weixin.qq.com/cgi-bin/account/modifysignature?access_token='.$access_token; + $queryarr = ['signature' => $signature]; + $result = json_decode(Http::post($url, hema_json($queryarr)),true); + if($result['errcode'] != 0){ + $this->error = 'code:'.$result['errcode'].',msg:'.$result['errmsg']; + return false; + } + $result['signature'] = $signature; + return $result; + } + + /** + * 微信认证名称检测 + */ + public function checkWxVerifyNickName(int $applet_id, string $nick_name) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/cgi-bin/wxverify/checkwxverifynickname?access_token='.$access_token; + $queryarr = ['nick_name' => $nick_name]; + return $this->result(Http::post($url, hema_json($queryarr))); + } + /** + * 设置小程序昵称 + */ + public function setNickName(int $applet_id, string $nick_name, string $license, string $other1) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/setnickname?access_token='.$access_token; + $queryarr = [ + 'nick_name' => $nick_name, + 'license' => $license, + 'naming_other_stuff_1' => $other1 + ]; + return $this->result(Http::post($url, hema_json($queryarr))); + } + + /** + * 删除类目 + */ + public function deleteCategory(int $applet_id, int $first, int $second) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/deletecategory?access_token='.$access_token; + $queryarr = [ + 'first' => $first, + 'second' => $second + ]; + return $this->result(Http::post($url, hema_json($queryarr))); + } + + /** + * 获取已设置的所有类目 + */ + public function getCategory(int $applet_id) + { + $access_token = $this->getAccessToken($applet_id); + if($this->isp){ + $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/getcategory?access_token='.$access_token; + }else{ + $url = 'https://api.weixin.qq.com/wxaapi/newtmpl/getcategory?access_token='.$access_token; + } + $result = json_decode(Http::get($url),true); + return $result; + } + + /** + * 获取可以设置的所有类目 + */ + public function getAllCategories($applet_id) + { + //同步微信端线下类目 + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/getallcategories?access_token='.$access_token; + $result = json_decode(Http::get($url),true); + if($result['errcode']==0){ + $category = $result['categories_list']['categories']; + $new = []; //筛选后的类目 + //遍历一级类目 + foreach($category[0]['children'] as $value){ + //查找一级类目 + for($n=1;$ngetAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/addcategory?access_token='.$access_token; + $queryarr = [ + 'categories' => [ + [ + 'first' => $first, + 'second' => $second, + 'certicates' => [ + 'key' => $ca_name, + 'value' => $media_id + ] + ] + ] + ]; + return $this->result(Http::post($url, hema_json($queryarr))); + } + + /** + * 附近小程序 - 查询地点类目信息 + */ + public function getStoreWxaAttr(int $applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/getstorewxaattr?access_token='.$access_token; + $result = json_decode(Http::get($url),true); + $list = []; + if($result['errcode'] == 0 AND $result['is_exist'] == 1){ + $category = $this->getMerchantCategory($applet_id);//拉取可设置类目 + if(isset($result['store_wxa_attr']['weapp_category'])){ + foreach ($result['store_wxa_attr']['weapp_category']['categories'] as $vo) { + $first_name = ''; + $second_name = ''; + //获取一级类目名称 + foreach ($category as $first) { + if($first['id'] == $vo['first']){ + $first_name = $first['name']; + //获取二级类目名称 + foreach ($first['children'] as $second) { + if($second['id'] == $vo['second']){ + $second_name = $second['name']; + break; + } + } + break; + } + } + $list[] = [ + 'first_id' => $vo['first'], + 'first_name' => $first_name, + 'second_id' => $vo['second'], + 'second_name' => $second_name, + 'audit_status' => $vo['audit_status'], + 'audit_id' => $vo['audit_id'] + ]; + } + } + } + return $list; + } + /** + * 附近小程序 - 申请附近地点类目 + */ + public function nearbyApplyCategory(array $queryarr, int $applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/nearbyapplycategory?access_token='.$access_token; + $this->result(Http::post($url,hema_json($queryarr))); + } + /** + * 附近小程序 - 拉取门店小程序类目 + */ + public function getMerchantCategory(int $applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/get_merchant_category?access_token='.$access_token; + $result = json_decode(Http::get($url),true); + if($result['errcode']==0){ + $category = $result['data']['all_category_info']['categories']; + $new = []; //筛选后的类目 + //遍历一级类目 + foreach($category[0]['children'] as $value){ + //查找一级类目 + for($n=1;$ngetAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/getnearbypoilist?page=1&page_rows=20&access_token='.$access_token; + $result = json_decode(Http::get($url),true); + return $result; + } + /** + * 附近小程序 - 添加附近门店 + */ + public function addNearbyPoi(array $queryarr, int $applet_id) + { + $queryarr['hour'] = str_replace(' ','',$queryarr['hour']); + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/addnearbypoi?access_token='.$access_token; + return $this->result(Http::post($url,hema_json($queryarr))); + } + /** + * 附近小程序 - 删除附近门店 + */ + public function delNearbyPoi(int $applet_id, string $poi_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/delnearbypoi?access_token='.$access_token; + $queryarr =[ + 'poi_id' => $poi_id //门店的 poi_id + ]; + return $this->result(Http::post($url,hema_json($queryarr))); + } + + /** + * 附近小程序 - 展示/取消展示附近门店(小程序) + */ + public function setNearbyPoiShowStatus(int $applet_id, $poi_id, $status) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/setnearbypoishowstatus?access_token='.$access_token; + $queryarr =[ + 'poi_id' => $poi_id, //门店的 poi_id + 'status' => $status //0:取消展示;1:展示 + ]; + return $this->result(Http::post($url,hema_json($queryarr))); + } + + /** + * 配置小程序用户隐私保护指引 + */ + public function setPrivacySetting($applet_id,$queryarr) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/cgi-bin/component/setprivacysetting?access_token=' . $access_token; + $queryarr['owner_setting']['notice_method'] = '小程序弹窗'; + return $this->result(Http::post($url,hema_json($queryarr))); + } + + /** + * 查询小程序用户隐私保护指引 + */ + public function getPrivacySetting($applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/cgi-bin/component/getprivacysetting?access_token=' . $access_token; + return $this->result(Http::post($url,"{}")); + } + + /** + * 获取体验用户列表 + */ + public function getTestUser(int $applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/memberauth?access_token='.$access_token; + $queryarr =[ + 'action' => 'get_experiencer' //固定值 + ]; + return json_decode(Http::post($url,hema_json($queryarr)),true); + } + /** + * 添加体验用户 + */ + public function addTestUser(int $applet_id, string $wechatid) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/bind_tester?access_token='.$access_token; + $queryarr =[ + 'wechatid' => $wechatid //微信号 + ]; + return $this->result(Http::post($url,hema_json($queryarr))); + } + /** + * 删除体验用户 + */ + public function delTestUser(int $applet_id, string $userstr) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxa/unbind_tester?access_token='.$access_token; + $queryarr =[ + 'userstr' => $userstr //唯一识别码 + ]; + return $this->result(Http::post($url,hema_json($queryarr))); + } + + /** + * 上传图文消息内的图片 - 到微信端(永久素材) - 小程序端 + * 图片仅支持jpg/png格式,大小必须在1MB以下 + */ + public function upMediaUrl(string $file_url, int $applet_id = 0) + { + $access_token = $this->getAccessToken($applet_id); + $real_path = web_path() . 'temp/' . time() . '.jpg'; + $temp_file = file_get_contents($file_url);//获取网络图片 + file_put_contents($real_path,$temp_file); //存放临时图片 + //上传到微信服务器 + $url = 'https://api.weixin.qq.com/cgi-bin/media/uploadimg?access_token='.$access_token; + $queryarr['media'] = curl_file_create($real_path,'image/jpeg',$file_url);//获取要上传的二进制文件 + $result = json_decode(Http::post($url,$queryarr),true); + unlink($real_path);//删除临时图片 + if(!isset($result['url'])){ + $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; + return false;//上传错误,一般是图片不符合要求 + } + return $result['url']; + } + /** + * 使用授权码获取授权信息 + */ + public function getAuth(string $auth_code) + { + $config = $this->config; + $url = 'https://api.weixin.qq.com/cgi-bin/component/api_query_auth?component_access_token='.$config['component_access_token']; + $queryarr = [ + 'component_appid' => $config['app_id'], + 'authorization_code' => $auth_code + ]; + $result = json_decode(Http::post($url, hema_json($queryarr)),true); + if(!isset($result['authorization_info'])){ + $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; + return false; + } + return $result['authorization_info']; + } + + /** + * 获取 component_access_token + */ + public function getComponentToken(string $ticket) + { + $config = $this->config; + $url = 'https://api.weixin.qq.com/cgi-bin/component/api_component_token'; + $queryarr = [ + 'component_appid' => $config['app_id'], + 'component_appsecret' => $config['app_secret'], + 'component_verify_ticket' => $ticket, + ]; + $result = json_decode(Http::post($url, hema_json($queryarr)),true); + if(isset($result['component_access_token'])){ + return $result; + } + $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; + return false; + } + /************ 公众号 - 生成二维码 (帐号管理-生成带参数的二维码)**************/ + + public function qrcodeCreate($applet_id=0,$action_name='QR_STR_SCENE',$scene='login',$expire_seconds=7200) + { + $access_token = $this->getAccessToken($applet_id,2); + + $url = 'https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=' . $access_token; + /** + * 二维码类型 + * QR_SCENE为临时的整型参数值,QR_STR_SCENE为临时的字符串参数值 + * QR_LIMIT_SCENE为永久的整型参数值,QR_LIMIT_STR_SCENE为永久的字符串参数值 + */ + $queryarr['action_name'] = $action_name; + //设置临时二维码过期时间 + if($action_name=='QR_STR_SCENE' or $action_name=='QR_SCENE'){ + $queryarr['expire_seconds'] = $expire_seconds; + } + if($action_name=='QR_STR_SCENE' or $action_name=='QR_LIMIT_STR_SCENE'){ + $queryarr['action_info']['scene']['scene_str'] = $scene; + }else{ + $queryarr['action_info']['scene']['scene_id'] = (int)$scene; + } + $result = json_decode(Http::post($url, hema_json($queryarr)),true); + + if(isset($result['ticket'])){ + $rs = Http::get('https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket='.urlencode($result['ticket'])); + $path = 'temp'; + if(!file_exists('./'.$path)){ + mkdir($path,0777,true); + } + //获取的二维码数据存储到指定的文件 + file_put_contents('./'.$path . '/hemaphp_login_qrcode.png',$rs); + return $result['ticket']; + } + $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; + return false; + } + + /** + * 公众号网页授权 - H5用户登录 code 换取 access_token + * $appid 公众号的APPID + */ + public function oauth2($code,$appid,$applet_id) + { + $access_token = $this->getAccessToken($applet_id,2); + //通过 code 换取 access_token + $url = 'https://api.weixin.qq.com/sns/oauth2/component/access_token'; + $queryarr = [ + 'appid' => $appid, + 'code' => $code, + 'grant_type' => 'authorization_code', + 'component_appid' => $this->config['app_id'], + 'component_access_token' => $this->config['component_access_token'] + ]; + $result = json_decode(Http::get($url, $queryarr),true); + if (isset($result['errcode'])) { + $this->error = 'code:'.$result['errcode'].',msg:' . $result['errmsg']; + return false; + }else{ + //拉取用户信息(需 scope 为 snsapi_userinfo) + $url = 'https://api.weixin.qq.com/sns/userinfo?access_token'; + $queryarr = [ + 'access_token' => $result['access_token'], + 'openid' => $result['openid'], + 'lang' => 'zh_CN' + ]; + $result = json_decode(Http::get($url, $queryarr),true); + if (isset($result['errcode'])) { + $this->error = 'code:'.$result['errcode'].',msg:' . $result['errmsg']; + return false; + } + } + return $result; + } + /** + * 公众号获取粉丝列表 + */ + public function getFans(int $applet_id) + { + $access_token = $this->getAccessToken($applet_id,2); + $url = 'https://api.weixin.qq.com/cgi-bin/user/get?access_token='.$access_token.'&next_openid='; + $result = json_decode(Http::get($url),true); + return $result; + } + /** + * 上传图文消息内的图片 - 到微信端(永久素材) - 公众号端 + * 图片仅支持jpg/png格式,大小必须在1MB以下 + */ + public function upWechatUrl(array $img, int $applet_id = 0) + { + $access_token = $this->getAccessToken($applet_id,2); + for($n=0;$ngetAccessToken($applet_id,2); + $real_path = web_path() . 'uploads/' . $file_path; + //上传到微信服务器 + $url = 'https://api.weixin.qq.com/cgi-bin/material/add_material?access_token='.$access_token.'&type='.$type; + $queryarr['media'] = curl_file_create($real_path,$mimetype,$file_path);//获取要上传的二进制文件 + $result = json_decode(http_post($url,$queryarr),true); + return $result; //$result['media_id']; + } + /** + * 删除素材文件 - 到微信端 + */ + public function delMaterial(string $media_id, int $applet_id = 0) + { + $access_token = $this->getAccessToken($applet_id,2); + $url = 'https://api.weixin.qq.com/cgi-bin/material/del_material?access_token='.$access_token; + $queryarr = [ + 'media_id' => $media_id + ]; + $result = json_decode(Http::post($url,json_encode($queryarr)),true); + return $result; + } + + /** + * 新增草稿 - 图文消息 + */ + public function addDraft(array $data, int $applet_id = 0) + { + $queryarr['articles'] = array(); + for($n=0;$n $data[$n]['title'], + 'author' => $data[$n]['author'], + 'digest' => $data[$n]['digest'], + 'content' => str_ireplace('"','\'',$data[$n]['wx_content']), + 'content_source_url' => base_url(), + 'thumb_media_id' => $data[$n]['media_id'] + ]); + } + $access_token = $this->getAccessToken($applet_id,2); + //上传到微信服务器 + $url = 'https://api.weixin.qq.com/cgi-bin/draft/add?access_token='.$access_token; + $result = json_decode(Http::post($url,hema_json($queryarr)),true); + return $result; + } + + /** + * 修改草稿 - 图文消息 + */ + public function editDraft(array $data, int $media_id, int $applet_id = 0) + { + $access_token = $this->getAccessToken($applet_id,2); + for($n=0;$n $media_id, + 'index' => $data[$n]['ids'], + 'articles' => [ + 'title' => $data[$n]['title'], + 'author' => $data[$n]['author'], + 'digest' => $data[$n]['digest'], + 'content' => str_ireplace('"','\'',$data[$n]['wx_content']), + 'content_source_url' => base_url(), + 'thumb_media_id' => $data[$n]['media_id'] + ] + ]; + //上传到微信服务器 + $url = 'https://api.weixin.qq.com/cgi-bin/draft/update?access_token='.$access_token; + $result = json_decode(Http::post($url,hema_json($queryarr)),true); + if($result['errcode']!=0){ + $this->error = 'code:' . $result['errcode'] . ',msg:' . $result['errmsg']; + return false; + } + } + return true; + } + + /** + * 删除草稿 - 图文消息 + */ + public function delDraft(string $media_id, int $applet_id = 0) + { + $access_token = $this->getAccessToken($applet_id,2); + $url = 'https://api.weixin.qq.com/cgi-bin/draft/delete?access_token='.$access_token; + $queryarr = [ + 'media_id' => $media_id + ]; + return json_decode(Http::post($url,json_encode($queryarr)),true); + } + /** + * 根据OpenID列表群发公众号信息 + */ + public function sendMass($msg, $open_id, int $applet_id = 0) + { + //图文消息 + if($msg['msg_type']['value']=='news'){ + $queryarr = [ + 'mpnews' => [ + 'media_id' => $msg['content'] + ], + 'msgtype' => 'mpnews', + 'send_ignore_reprint' => $msg['send_ignore_reprint'] + ]; + } + //文本消息 + if($msg['msg_type']['value']=='text'){ + $queryarr = [ + 'msgtype' => 'text', + 'text' => [ + 'content' => $msg['content'] + ] + ]; + } + //语音消息 + if($msg['msg_type']['value']=='voice'){ + $queryarr = [ + 'voice' => [ + 'media_id' => $msg['content'] + ], + 'msgtype' => 'voice' + ]; + } + //图片消息 + if($msg['msg_type']['value']=='image'){ + $queryarr = [ + 'images' => [ + 'media_ids' => [ + 0 => $msg['content'] + ], + 'recommend' => $msg['recommend'], + 'need_open_comment' => $msg['need_open_comment'], + 'only_fans_can_comment' => $msg['only_fans_can_comment'] + ], + 'msgtype' => 'image' + ]; + } + //视频消息 + if($msg['msg_type']['value']=='video'){ + $queryarr = [ + 'mpvideo' => [ + 'media_id' => $msg['content'], + 'title' => $msg['title'], + 'description' => $msg['description'] + ], + 'msgtype' => 'mpvideo' + ]; + } + //卡券消息 + if($msg['msg_type']['value']=='wxcard'){ + $queryarr = [ + 'wxcard' => [ + 'card_id' => $msg['content'] + ], + 'msgtype' => 'wxcard' + ]; + } + $queryarr['touser'] = $open_id; + $access_token = $this->getAccessToken($applet_id,2); + $url = 'https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token='.$access_token; + $result = json_decode(Http::post($url,json_encode($queryarr)),true); + return $result; + } + /** + * 删除公众号群发记录 + */ + public function deleteMass(int $msg_id,int $applet_id = 0) + { + $access_token = $this->getAccessToken($applet_id,2); + $url = 'https://api.weixin.qq.com/cgi-bin/message/mass/delete?access_token='.$access_token; + $queryarr = ['msg_id' => $msg_id]; + $result = json_decode(Http::post($url,json_encode($queryarr)),true); + return $result; + } + /** + * 向公众号发布预览消息 + */ + public function previewMsg(array $data, string $open_id, int $applet_id = 0) + { + //图文消息 + if($data['msg_type']=='news'){ + $queryarr = [ + 'mpnews' => ['media_id' => $data['content']], + 'msgtype' => 'mpnews' + ]; + } + //文本消息 + if($data['msg_type']=='text'){ + $queryarr = [ + 'text' => ['content' => $data['content']], + 'msgtype' => 'text' + ]; + } + //语音消息 + if($data['msg_type']=='voice'){ + $queryarr = [ + 'voice' => ['media_id' => $data['content']], + 'msgtype' => 'voice' + ]; + } + //图片消息 + if($data['msg_type']=='image'){ + $queryarr = [ + 'image' => ['media_id' => $data['content']], + 'msgtype' => 'image' + ]; + } + //视频消息 + if($data['msg_type']=='video'){ + $queryarr = [ + 'mpvideo' => ['media_id' => $data['content']], + 'msgtype' => 'mpvideo' + ]; + } + //卡券消息 + if($data['msg_type']=='wxcard'){ + $queryarr = '{ + "wxcard":{ + "card_id":"'.$data['content'].'", + "card_ext": "{ + "code":"", + "openid":"", + "timestamp":"", + "signature":"" + } + "msgtype":"wxcard" + }'; + $queryarr = [ + 'wxcard' => [ + 'card_id' => $data['content'], + 'card_ext' => [ + 'code' => '', + 'openid' => '', + 'timestamp' => '', + 'signature' => '' + ] + ], + 'msgtype' => 'wxcard' + ]; + } + $queryarr['touser'] = $open_id; + $access_token = $this->getAccessToken($applet_id,2); + $url = 'https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token='.$access_token; + $result = json_decode(Http::post($url,json_encode($queryarr)),true); + return $result; + } + /** + * 公众号自定义菜单 - 同步到微信端 + */ + public function creatMenu(array $menu, int $applet_id = 0) + { + $access_token = $this->getAccessToken($applet_id,2); + $url = 'https://api.weixin.qq.com/cgi-bin/menu/create?access_token='.$access_token; + $queryarr = [ + 'button' => $menu + ]; + $result = json_decode(Http::post($url, hema_json($queryarr)),true); + return $result; + } + /** + * 发布模板消息 - 公众号 + */ + function sendWechatMsg(int $applet_id = 0, array $queryarr = []) + { + if(sizeof($queryarr) == 0){ + return true; + } + $access_token = $this->getAccessToken($applet_id,2); + $url = 'https://api.weixin.qq.com/cgi-bin/message/template/send?access_token='.$access_token; + $result = json_decode(Http::post($url,json_encode($queryarr)),true); + return true; + } + + /** + * 获取公众号粉丝用户基本信息(包括UnionID机制)- 公众号 + */ + public function getWechatUserInfo(string $openid, int $applet_id) + { + $access_token = $this->getAccessToken($applet_id,2); + $url = 'https://api.weixin.qq.com/cgi-bin/user/info'; + $queryarr = [ + 'access_token' => $access_token, + 'openid' => $openid, + 'lang' => 'zh_CN' + ]; + $result = json_decode(Http::get($url,$queryarr),true); + if(!isset($result['openid'])){ + $this->error = 'code:' . $result['errcode'] . ' msg:' . $result['errmsg']; + return false; + } + $data['open_id'] = $result['openid']; + if(isset($result['unionid'])){ + $data['union_id'] = $result['unionid']; + } + return $data; + } + + /** + * 发送客服消息模板 + */ + public function sendServiceMsg(array $msg, string $touser, int $applet_id) + { + //文本消息 + if($msg['type']=='text'){ + $queryarr = [ + 'msgtype' => 'text', + 'text' => [ + 'content' => $msg['content'] + ] + ]; + } + //图片消息 + if($msg['type']=='image'){ + $queryarr = [ + 'msgtype' => 'image', + 'image' => [ + 'media_id' => $msg['media_id'] + ] + ]; + } + //图文消息(点击跳转到图文消息页面) 图文消息条数限制在1条以内 + if($msg['type']=='news'){ + $queryarr = [ + 'msgtype' => 'mpnews', + 'mpnews' => [ + 'media_id' => $msg['media_id'] + ] + ]; + } + //发送图文消息(点击跳转到外链) 图文消息条数限制在1条以内 + if($msg['type']=='news'){ + $queryarr = [ + 'msgtype' => 'news', + 'news' => [ + 'articles' => [ + 'picurl' => $msg['picurl'], + 'url' => $msg['url'], + 'title' => $msg['title'], + 'description' => $msg['description'] + ] + ] + ]; + } + //语音消息 + if($msg['type']=='voice'){ + $queryarr = [ + 'msgtype' => 'voice', + 'voice' => [ + 'media_id' => $msg['media_id'] + ] + ]; + } + //视频消息 + if($msg['type']=='video'){ + $queryarr = [ + 'msgtype' => 'video', + 'video' => [ + 'media_id' => $msg['media_id'], + 'thumb_media_id' => $msg['thumb_media_id'], + 'title' => $msg['title'], + 'description' => $msg['description'] + ] + ]; + } + //音乐消息 + if($msg['type']=='music'){ + $queryarr = [ + 'msgtype' => 'music', + 'video' => [ + 'musicurl' => $msg['musicurl'], + 'thumb_media_id' => $msg['thumb_media_id'], + 'title' => $msg['title'], + 'hqmusicurl' => $msg['hqmusicurl'], + 'description' => $msg['description'] + ] + ]; + } + //发送小程序卡片(要求小程序与公众号已关联) + if($msg['type']=='wxapp'){ + $queryarr = [ + 'msgtype' => 'miniprogrampage', + 'miniprogrampage' => [ + 'pagepath' => $msg['pagepath'], + 'thumb_media_id' => $msg['thumb_media_id'], + 'title' => $msg['title'], + 'appid' => $msg['appid'], + 'description' => $msg['description'] + ] + ]; + } + if(isset($queryarr)){ + $queryarr['touser'] = $touser; + $access_token = $this->getAccessToken($applet_id,2); + $url = 'https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token='.$access_token; + return $this->result(Http::post($url, hema_json($queryarr))); + } + $this->error = '参数错误'; + return false; + } + /** + * 获取令牌 - 开放平台 + * $type 请求类型 1小程序,2公众号 + */ + function getAccessToken(int $applet_id = 0, int $type = 1) + { + $config = $this->config; //获取第三方配置 + + + $access_token = ''; + + if($type==1){ + if($applet = Applet::getApplet([ 'applet_id' => $applet_id,'status' => 1 ])) + { + $access_token=$applet['access_token']; + + if(empty($access_token)){ + $url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx3668302906e3894f&secret=3ef948febd085fb89908f22b4a79c52f' ; + $result = json_decode(Http::get($url), true); + + if(isset($result['access_token'])){ + $access_token = $result['access_token']; + $applet->access_token = $result['access_token']; + $applet->expires_in = time()+3600;//2个小时候过期,这里设置1小时获取一次 + $applet->save();//保存最新的令牌access_token和过期时间 + } + } + + } + }else{ + //公众号 + if($wechat = Wechat::getWechat([ + 'applet_id' => $applet_id, + 'status' => 1 + ])){ + $access_token=$wechat['access_token']; + if($wechat['expires_in'] < time()){ + //重新获取 + $url = 'https://api.weixin.qq.com/cgi-bin/component/api_authorizer_token?component_access_token='.$config['component_access_token']; + $queryarr = [ + 'component_appid' => $config['app_id'], + 'authorizer_appid' => $wechat['app_id'], + 'authorizer_refresh_token' => $wechat['authorizer_refresh_token'] + ]; + $result = json_decode(Http::post($url, json_encode($queryarr)),true); + if(isset($result['authorizer_access_token'])){ + $access_token = $result['authorizer_access_token']; + $wechat->access_token = $result['authorizer_access_token']; + $wechat->expires_in = time()+3600; //2个小时候过期,这里设置1小时获取一次 + $wechat->save();//保存最新的令牌access_token和过期时间 + } + } + } + } + + + return $access_token; + } + /** + * 请求数据验证 + **/ + private function result($result) + { + $result = json_decode($result,true); + if(isset($result['errcode']) and $result['errcode']!=0){ + $this->error = '错误代码:' . $result['errcode'] . ',错误信息:' . $result['errmsg']; + return false; + } + return $result; + } + public function getError() + { + return $this->error; + } + + //订阅消息接口 + //#################################################################### + /** + * 获取帐号下的模板列表 + */ + public function getMessageTemplateList(int $applet_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxaapi/newtmpl/gettemplate?access_token='.$access_token; + return $this->result(Http::get($url)); + } + /** + * 删除帐号下的模板 + */ + public function deleteMessageTemplate(int $applet_id, string $tpl_id) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxaapi/newtmpl/deltemplate?access_token='.$access_token; + $queryarr = [ + 'priTmplId' => $tpl_id + ]; + return $this->result(Http::post($url, hema_json($queryarr),[],['content-type: application/json'])); + } + /** + * 添加帐号下的模板 + */ + public function addMessageTemplate(int $applet_id, string $tid, array $kidlist, string $desc) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/wxaapi/newtmpl/addtemplate?access_token='.$access_token; + $queryarr = [ + 'tid' => $tid, + 'kidList' => $kidlist, + 'sceneDesc' => $desc + ]; + return $this->result(Http::post($url, hema_json($queryarr),[],['content-type: application/json'])); + } + /** + * 发送订阅消息 + */ + public function sendMessage(int $applet_id, array $queryarr) + { + $access_token = $this->getAccessToken($applet_id); + $url = 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token='.$access_token; + $result = json_decode(Http::post($url,json_encode($queryarr)),true); + write_log($result,__DIR__); + return true; + } + //#################################################################### } \ No newline at end of file diff --git a/public/index.php b/public/index.php index a18f916..76f74e0 100755 --- a/public/index.php +++ b/public/index.php @@ -1,39 +1,39 @@ - -// +---------------------------------------------------------------------- - -// [ 应用入口文件 ] -namespace think; - -// 检测PHP环境 -//if (version_compare(PHP_VERSION, '7.4.0', '<')) die('require PHP > 7.1.0 !'); -// 检测php版本号 -if (phpversion() < '7.4') { - exit('很抱歉,由于您的PHP版本过低,部分功能无法运行,为了系统功能全面可用,请升级到PHP7.4或更高版本,谢谢!'); -} -define('INSTALL_URL', str_replace('\\', '/', dirname(__FILE__) . '/install/')); -// 判断是否安装 -if (!is_file(INSTALL_URL . 'install.lock')) { - header("location:/install"); - exit; -} - -// 加载核心文件 -require __DIR__ . '/../vendor/autoload.php'; - -// 执行HTTP应用并响应 -$http = (new App())->http; - -$response = $http->run(); - -$response->send(); - -$http->end($response); - + +// +---------------------------------------------------------------------- + +// [ 应用入口文件 ] +namespace think; + +// 检测PHP环境 +//if (version_compare(PHP_VERSION, '7.4.0', '<')) die('require PHP > 7.1.0 !'); +// 检测php版本号 +if (phpversion() < '7.4') { + exit('很抱歉,由于您的PHP版本过低,部分功能无法运行,为了系统功能全面可用,请升级到PHP7.4或更高版本,谢谢!'); +} +define('INSTALL_URL', str_replace('\\', '/', dirname(__FILE__) . '/install/')); +// 判断是否安装 +if (!is_file(INSTALL_URL . 'install.lock')) { + header("location:/install"); + exit; +} + +// 加载核心文件 +require __DIR__ . '/../vendor/autoload.php'; + +// 执行HTTP应用并响应 +$http = (new App())->http; + +$response = $http->run(); + +$response->send(); + +$http->end($response); + diff --git a/public/temp/alipay_auth_qrcode_10001.png b/public/temp/alipay_auth_qrcode_10001.png new file mode 100644 index 0000000..f1de746 Binary files /dev/null and b/public/temp/alipay_auth_qrcode_10001.png differ diff --git a/public/temp/food/qrcode-paybill-10001.png b/public/temp/food/qrcode-paybill-10001.png deleted file mode 100644 index adbac03..0000000 Binary files a/public/temp/food/qrcode-paybill-10001.png and /dev/null differ diff --git a/public/temp/food/qrcode-shop-10001.png b/public/temp/food/qrcode-shop-10001.png deleted file mode 100644 index 4dd0973..0000000 Binary files a/public/temp/food/qrcode-shop-10001.png and /dev/null differ diff --git a/public/temp/food/qrcode-table-10002.png b/public/temp/food/qrcode-table-10002.png deleted file mode 100644 index f7d13db..0000000 Binary files a/public/temp/food/qrcode-table-10002.png and /dev/null differ diff --git a/public/temp/food/qrcode-wifi-10001.png b/public/temp/food/qrcode-wifi-10001.png deleted file mode 100644 index ecc2aee..0000000 Binary files a/public/temp/food/qrcode-wifi-10001.png and /dev/null differ diff --git a/public/temp/food/wechat-paybill-10001.png b/public/temp/food/wechat-paybill-10001.png deleted file mode 100644 index 44482ad..0000000 --- a/public/temp/food/wechat-paybill-10001.png +++ /dev/null @@ -1 +0,0 @@ -{"errcode":41001,"errmsg":"access_token missing rid: 655efa56-5349d77f-1818512b"} \ No newline at end of file diff --git a/public/temp/food/wechat-paybill-10002.png b/public/temp/food/wechat-paybill-10002.png index d7921c5..620405a 100644 Binary files a/public/temp/food/wechat-paybill-10002.png and b/public/temp/food/wechat-paybill-10002.png differ diff --git a/public/temp/food/wechat-shop-10001.png b/public/temp/food/wechat-shop-10001.png deleted file mode 100644 index b19cddf..0000000 --- a/public/temp/food/wechat-shop-10001.png +++ /dev/null @@ -1 +0,0 @@ -{"errcode":41001,"errmsg":"access_token missing rid: 655efa55-7ffbd338-3aa9edd9"} \ No newline at end of file diff --git a/public/temp/food/wechat-shop-10002.png b/public/temp/food/wechat-shop-10002.png index 33a80df..9be5b03 100644 Binary files a/public/temp/food/wechat-shop-10002.png and b/public/temp/food/wechat-shop-10002.png differ diff --git a/public/temp/food/wechat-table-10001.png b/public/temp/food/wechat-table-10001.png index 97ecc19..c813b51 100644 Binary files a/public/temp/food/wechat-table-10001.png and b/public/temp/food/wechat-table-10001.png differ diff --git a/public/temp/food/wechat-wifi-10001.png b/public/temp/food/wechat-wifi-10001.png deleted file mode 100644 index 2c88eab..0000000 --- a/public/temp/food/wechat-wifi-10001.png +++ /dev/null @@ -1 +0,0 @@ -{"errcode":41001,"errmsg":"access_token missing rid: 655efa56-250c2fcf-66f8262a"} \ No newline at end of file diff --git a/public/temp/food/wechat-wifi-10002.png b/public/temp/food/wechat-wifi-10002.png index ee02963..61a4e53 100644 Binary files a/public/temp/food/wechat-wifi-10002.png and b/public/temp/food/wechat-wifi-10002.png differ diff --git a/runtime/.keep b/runtime/.keep deleted file mode 100755 index e69de29..0000000 diff --git a/runtime/admin/temp/1135d99398657c0ae566d459308e8327.php b/runtime/admin/temp/1135d99398657c0ae566d459308e8327.php deleted file mode 100755 index df55c93..0000000 --- a/runtime/admin/temp/1135d99398657c0ae566d459308e8327.php +++ /dev/null @@ -1,2 +0,0 @@ - - 管理后台 - <?php echo htmlentities($web['name']); ?>
站点统计
商户总量
当前商户总数量
代理总量
当前代理总数量
小程序总量
当前小程序总数量
公众号总量
当前公众号总数量
交易统计
今日成交金额
昨日:
本月成交金额
上月:
今日订单金额
昨日:
本月订单金额
上月:
今日充值金额
昨日:
本月充值金额
上月:
今日赠送金额
昨日:
本月赠送金额
上月:
今日退款金额
昨日:
本月退款金额
上月:
今日扣费金额
昨日:
本月扣费金额
上月:
近七日走势
  版权所有
\ No newline at end of file diff --git a/runtime/admin/temp/165f30f93e40130c15d885f561996cb2.php b/runtime/admin/temp/165f30f93e40130c15d885f561996cb2.php deleted file mode 100755 index 01a66ea..0000000 --- a/runtime/admin/temp/165f30f93e40130c15d885f561996cb2.php +++ /dev/null @@ -1,186 +0,0 @@ - - 管理后台 - <?php echo htmlentities($web['name']); ?>
群发消息列表

每日可群发100次,但是用户每月只能接收4条。

isEmpty()): foreach($list as $item): ?>
消息编号 任务ID 消息标题 消息类型 群发状态 群发人数 成功人数 添加时间 操作

0 ? htmlentities($item['fans_count']) : '--'; ?> 0 ? htmlentities($item['send_count']) : '--'; ?>
暂无记录
render(); ?>
总记录:total(); ?>
未绑定授权公众号
- - - -
\ No newline at end of file diff --git a/runtime/admin/temp/29a1b1f477dc444c90efb32e05e28fcd.php b/runtime/admin/temp/29a1b1f477dc444c90efb32e05e28fcd.php deleted file mode 100755 index cdd2d4b..0000000 --- a/runtime/admin/temp/29a1b1f477dc444c90efb32e05e28fcd.php +++ /dev/null @@ -1,56 +0,0 @@ - - 管理后台 - <?php echo htmlentities($web['name']); ?>
列表
isEmpty()): foreach($list as $item): ?>
Applet_Id 小程序图标 小程序名称 行业模板 到期时间 创建时间 管理管理
小程序图片

0): ?> 0): ?> --
暂无记录
render(); ?>
总记录:total(); ?>
-
\ No newline at end of file diff --git a/runtime/admin/temp/352d937338d3cbeaa5a6b2aef6a0495e.php b/runtime/admin/temp/352d937338d3cbeaa5a6b2aef6a0495e.php deleted file mode 100755 index b7b3246..0000000 --- a/runtime/admin/temp/352d937338d3cbeaa5a6b2aef6a0495e.php +++ /dev/null @@ -1,93 +0,0 @@ - - 管理后台 - <?php echo htmlentities($web['name']); ?>
-
-
-
-
-
列表
-
-
-
- - - - - - - - - - - - - - - - - - - isEmpty()): foreach($list as $item): ?> - - - - - - - - - - - - - - - - - - - - -
编号头像昵称性别钱包积分电话省份城市代理注册管理
- - - - - - - - -
- 10): ?> - - 登录 - - -
-
暂无记录
-
-
-
render(); ?>
-
-
总记录:total(); ?>
-
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/runtime/admin/temp/3a0f7010e1e6219083ad8c5646d41a40.php b/runtime/admin/temp/3a0f7010e1e6219083ad8c5646d41a40.php deleted file mode 100755 index 4e538ce..0000000 --- a/runtime/admin/temp/3a0f7010e1e6219083ad8c5646d41a40.php +++ /dev/null @@ -1,156 +0,0 @@ - - 管理后台 - <?php echo htmlentities($web['name']); ?>
插件列表
图标 名称 标识 介绍 作者 价格 下载 版本 状态 操作

V
暂无记录
总记录:
- - - -
\ No newline at end of file diff --git a/runtime/admin/temp/5c32e7932a0700ecea140e20f7bc660c.php b/runtime/admin/temp/5c32e7932a0700ecea140e20f7bc660c.php deleted file mode 100755 index a24afc5..0000000 --- a/runtime/admin/temp/5c32e7932a0700ecea140e20f7bc660c.php +++ /dev/null @@ -1,2 +0,0 @@ - - 管理登录 - <?php echo htmlentities($web['name']); ?>
\ No newline at end of file diff --git a/runtime/admin/temp/77873608a3a896bd3d43bafe9fe9a27f.php b/runtime/admin/temp/77873608a3a896bd3d43bafe9fe9a27f.php deleted file mode 100755 index 6b1753f..0000000 --- a/runtime/admin/temp/77873608a3a896bd3d43bafe9fe9a27f.php +++ /dev/null @@ -1,69 +0,0 @@ - - 管理后台 - <?php echo htmlentities($web['name']); ?>
-
-
-
-
-
交易记录
-
-
-
- - - - - - - - - - - - - - - isEmpty()): foreach($list as $item): ?> - - - - - - - - - - - - - - - - -
编号用户单号模式类型数值备注时间
-

-
-
-
- -
-
-

I D :

-

昵称:

-

电话:

-
-
-
暂无记录
-
-
-
render(); ?>
-
-
总记录:total(); ?>
-
-
-
-
-
-
-
- -
\ No newline at end of file diff --git a/runtime/admin/temp/77d3402cf97c0a269213cffcfac5cd3c.php b/runtime/admin/temp/77d3402cf97c0a269213cffcfac5cd3c.php deleted file mode 100755 index 42c7cf7..0000000 --- a/runtime/admin/temp/77d3402cf97c0a269213cffcfac5cd3c.php +++ /dev/null @@ -1,93 +0,0 @@ - - 管理后台 - <?php echo htmlentities($web['name']); ?>
-
-
-
-
-
-
-
-
微信开放平台 - 第三方平台对接
-
-
- -
-
- - - - 每10分钟更新一次 -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - - 建议设置多个,多个以为“;”号隔开。
- 第一个为主域名请确保SSL证书配置正常,其它为备用。
- 第一个域名SSL证书过期后请删除,启用第二个(做好配置),以此类推。
- 域名前请勿输入http等协议头。 -
-
-
-
- -
- - 域名格式例如:www.baidu.com -
-
-
-
- -
-
-
-
-
-
-
-
-
- - -
\ No newline at end of file diff --git a/runtime/admin/temp/871d8f9ac37b49ddb1f8892d42b0b432.php b/runtime/admin/temp/871d8f9ac37b49ddb1f8892d42b0b432.php deleted file mode 100755 index a718f70..0000000 --- a/runtime/admin/temp/871d8f9ac37b49ddb1f8892d42b0b432.php +++ /dev/null @@ -1,156 +0,0 @@ - - 管理后台 - <?php echo htmlentities($web['name']); ?>
我的插件
图标 名称 标识 介绍 作者 版本 状态 操作

V
暂无记录
- - - -
\ No newline at end of file diff --git a/runtime/admin/temp/ce62fa7229051749de6651961ed8a08c.php b/runtime/admin/temp/ce62fa7229051749de6651961ed8a08c.php deleted file mode 100755 index 6d95d4e..0000000 --- a/runtime/admin/temp/ce62fa7229051749de6651961ed8a08c.php +++ /dev/null @@ -1,2 +0,0 @@ - - 管理后台 - <?php echo htmlentities($web['name']); ?>
公众号信息
您还没有绑定公众号
我已有微信公众号
我还没有微信公众号
\ No newline at end of file diff --git a/runtime/admin/temp/d0998e50cb4b95fe491115d630adb4d8.php b/runtime/admin/temp/d0998e50cb4b95fe491115d630adb4d8.php deleted file mode 100755 index 0906149..0000000 --- a/runtime/admin/temp/d0998e50cb4b95fe491115d630adb4d8.php +++ /dev/null @@ -1,357 +0,0 @@ - - 管理后台 - <?php echo htmlentities($web['name']); ?>
-
-
-
-
-
列表
-
-
-
- - - - - - - - - - - - - - - isEmpty()): foreach($list as $item): ?> - - - - - - - - - - - - - - - - -
申请编号用户头像用户昵称联系电话支付状态申请状态申请时间管理操作
-
-
- -
-
-
- -
暂无记录
-
-
-
render(); ?>
-
-
总记录:total(); ?>
-
-
-
-
-
-
-
- - - - -
\ No newline at end of file diff --git a/runtime/admin/temp/db3fc3ab033eae396bc223a1db61ffa3.php b/runtime/admin/temp/db3fc3ab033eae396bc223a1db61ffa3.php deleted file mode 100755 index 33c8507..0000000 --- a/runtime/admin/temp/db3fc3ab033eae396bc223a1db61ffa3.php +++ /dev/null @@ -1,2 +0,0 @@ - - 管理后台 - <?php echo htmlentities($web['name']); ?>
微信公众号菜单设置
公众号
9:36
菜单设置 删除
字数不超过13个汉字或40个字母
根据关键字可返回事先设置的回复内容
链接格式:http://baidu.com/xxx/abc.html
必须是公众号所绑定的小程序
小程序不能正常打开时,可转向此链接。
链接格式:http://baidu.com/xxx/abc.html
例如:pages/index/index

回复内容

*/ ?>
*/ ?>
未绑定授权公众号
\ No newline at end of file diff --git a/runtime/applet/log/202311/21_error.log b/runtime/applet/log/202311/21_error.log deleted file mode 100755 index 5d5a96d..0000000 --- a/runtime/applet/log/202311/21_error.log +++ /dev/null @@ -1,2 +0,0 @@ -[2023-11-21T18:41:05+08:00][error] [0]Argument 1 passed to hema\wechat\Driver::authUrl() must be of the type int, null given, called in /www/wwwroot/app.cxhxy.dev.1nww.com/app/applet/controller/Wxapp.php on line 43 -[2023-11-21T18:45:54+08:00][error] [0]Argument 1 passed to hema\wechat\Driver::getCategory() must be of the type int, null given, called in /www/wwwroot/app.cxhxy.dev.1nww.com/app/applet/controller/wxapp/Category.php on line 37 diff --git a/runtime/applet/temp/0401244b90b33ea4345ab01331660c33.php b/runtime/applet/temp/0401244b90b33ea4345ab01331660c33.php deleted file mode 100755 index 16011b0..0000000 --- a/runtime/applet/temp/0401244b90b33ea4345ab01331660c33.php +++ /dev/null @@ -1,135 +0,0 @@ - - 小程序管理中心 - <?php echo htmlentities($web['name']); ?>
注册微信小程序

提示:资料审核中,有问题会给您电话联系

提示:资料验证中,请在您微信中完成实名验证

提示:申请已通过,您已注册成功

提示:申请被驳回,请按要求修改后提交

驳回原因:

营业执照信息
大小2M以下
个体营业执照名称如为空或为“无”,请填写"个体户+经营者姓名",如“个体户张三”
经营者/法人信息
身份证所有人必须跟营业执照法人(所有人)姓名一致。大小2M以下
身份证所有人必须跟营业执照法人(所有人)姓名一致。大小2M以下
身份证上面的姓名
身份证上面的居住地址
示例值:2026-06-06
示例值:2036-06-06
请填写手机号,请确保电话畅通以便平台回拨确认
不是绑定的手机号!请打开微信->我的->点击头像->查看微信号
微信必须实名认证,并与上面身份证姓名一致。
- - - - - - - - - - -
\ No newline at end of file diff --git a/runtime/applet/temp/4d1c52033742f01e5be6650c8d5d5c31.php b/runtime/applet/temp/4d1c52033742f01e5be6650c8d5d5c31.php deleted file mode 100755 index 1b0583c..0000000 --- a/runtime/applet/temp/4d1c52033742f01e5be6650c8d5d5c31.php +++ /dev/null @@ -1,2 +0,0 @@ - - 小程序管理中心 - <?php echo htmlentities($web['name']); ?>
公众号信息
您还没有绑定公众号
我已有微信公众号
我还没有微信公众号
\ No newline at end of file diff --git a/runtime/applet/temp/6d4c9daa5662bf5b4314aa7ff4421e3e.php b/runtime/applet/temp/6d4c9daa5662bf5b4314aa7ff4421e3e.php deleted file mode 100755 index 942356b..0000000 --- a/runtime/applet/temp/6d4c9daa5662bf5b4314aa7ff4421e3e.php +++ /dev/null @@ -1,14 +0,0 @@ - - 小程序管理中心 - <?php echo htmlentities($web['name']); ?>
-
-
-
-
-
Welcome To HemaPHP System
-
-

小程序管理中心

-
-
-
-
-
\ No newline at end of file diff --git a/runtime/applet/temp/6e46255bb576ddd9bc889b5af5c6af2a.php b/runtime/applet/temp/6e46255bb576ddd9bc889b5af5c6af2a.php deleted file mode 100755 index 2881ab5..0000000 --- a/runtime/applet/temp/6e46255bb576ddd9bc889b5af5c6af2a.php +++ /dev/null @@ -1,25 +0,0 @@ - - 小程序管理中心 - <?php echo htmlentities($web['name']); ?>
地理位置接口列表
0): foreach($list['interface_list'] as $item): ?>
接口名称 接口标识 审核状态 失败原因 操作
-
\ No newline at end of file diff --git a/runtime/applet/temp/77dea72f140119eec7bc249b88fb2458.php b/runtime/applet/temp/77dea72f140119eec7bc249b88fb2458.php deleted file mode 100755 index 2e2d03b..0000000 --- a/runtime/applet/temp/77dea72f140119eec7bc249b88fb2458.php +++ /dev/null @@ -1,2 +0,0 @@ - - 小程序管理中心 - <?php echo htmlentities($web['name']); ?>
已生效的《获取用户隐私权限》接口
不要重复提交申请,申请后需重新提申上线小程序后才能生效。
0): ?>
暂无记录
申请获取用户隐私权限接口
开启:
配置小程序用户隐私保护指引
\ No newline at end of file diff --git a/runtime/applet/temp/856c52ff20046a0878ce6c7c3f189901.php b/runtime/applet/temp/856c52ff20046a0878ce6c7c3f189901.php deleted file mode 100755 index fe6a437..0000000 --- a/runtime/applet/temp/856c52ff20046a0878ce6c7c3f189901.php +++ /dev/null @@ -1,2 +0,0 @@ - - 小程序管理中心 - <?php echo htmlentities($web['name']); ?>
小程序类目列表
0): foreach($list['categories'] as $item): ?>
一级类目ID 一级类目名称 二级类目ID 二级类目名称 审核状态 审核不通过的原因 操作
\ No newline at end of file diff --git a/runtime/applet/temp/8f1b83cd3dd31541f148aeee4301fb03.php b/runtime/applet/temp/8f1b83cd3dd31541f148aeee4301fb03.php deleted file mode 100755 index 81ca5b4..0000000 --- a/runtime/applet/temp/8f1b83cd3dd31541f148aeee4301fb03.php +++ /dev/null @@ -1,15 +0,0 @@ - - 小程序管理中心 - <?php echo htmlentities($web['name']); ?>
体验用户列表
0): $n=10000;foreach($list['members'] as $item): $n++;?>
编号 唯一识别码 操作
-
\ No newline at end of file diff --git a/runtime/applet/temp/9fe3befe3ea695f4e50a001bee83c480.php b/runtime/applet/temp/9fe3befe3ea695f4e50a001bee83c480.php deleted file mode 100755 index f7959a2..0000000 --- a/runtime/applet/temp/9fe3befe3ea695f4e50a001bee83c480.php +++ /dev/null @@ -1,439 +0,0 @@ - - 小程序管理中心 - <?php echo htmlentities($web['name']); ?>
-
-
-
- -
-
绑定微信小程序
-
-
-
-
我已有微信小程序
- -
- - - -
-
- -
-
我已有微信小程序
-
- - 手动设置 - -
-
- 手动配置小程序参数 -
-
- -
-
- - 我还没有微信小程序 - - 现在状态:待付审核费 - - 现在状态: - - -
-
- - - -
-
- 快速注册并认证小程序 -
-
-
-
- -
-
-
微信小程序设置
-
- - -
- -
自定义模板为线下发布小程序,授权项必须取消“小程序开发与数据分析”权限,否则无法进行线下发布小程序 -
- -
-
-
-
- - -
-
- -
- 微信小程序头像 -
- - - 每月可修改次, - 本月还可修改次。 - - 修改 - -
-
-
-
- -
- - 友情提醒:名称设置后不可修改设置 -
-
-
- -
- -
-
-
- -
- - - - 每月可修改次, - 本月还可修改次。 - - -
-
-
- -
- - - 请确保上面域名列表至少有一个在下方域名列表中,多个以“;”隔开,否则无法正常使用小程序。
- 最新域名列表: -
-
-
-
- -
- - - 非必须设置项,多个以“;”分号隔开,设置格式如:www.baidu.com。
- 域名前面不要加“https://”协议头,后面不要加“/”斜杠 -
-
-
-
-
- -
-
-
- -
-
- -
-
- - - - -
-
-
-
- 建议尺寸200*200px,大小2M以下 -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
-
-
- -
-
-
-
- -
- -
- -
- -
- - - - - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/runtime/applet/temp/d406f6394afc907afff31febc70c8935.php b/runtime/applet/temp/d406f6394afc907afff31febc70c8935.php deleted file mode 100755 index ec2df06..0000000 --- a/runtime/applet/temp/d406f6394afc907afff31febc70c8935.php +++ /dev/null @@ -1,83 +0,0 @@ - - 小程序管理中心 - <?php echo htmlentities($web['name']); ?>
在线发布小程序前必须完成初始化配置
配置项目: 1.小程序头像 2.小程序名称 3.功能介绍 4.服务器域名 5.服务类目 6.隐私设置(按需)
线上版本
版本号
发布时间
项目备注
暂无发布上线的版本
审核版本
版本号
提审时间
项目备注
暂无提交审核的版本
体验版本
版本号
提交时间
项目备注
$wxapp['code_release']['template_code_id'])): ?> 提交审核 体验二维码
暂未发布体验版本
待发布版本
$wxapp['code_exp']['template_code_id'])): ?>
版本号
推送时间
项目备注
当前体验版本已是最新版本
平台未推送模板,请联系平台管理员
小程序版本管理

小程序行业模板为自定义,无法在线管理,请自行通过开发者工具进行发布上线

小程序版本管理
\ No newline at end of file diff --git a/runtime/applet/temp/f23a297c97a3d0d4d3ea56de0ee9794f.php b/runtime/applet/temp/f23a297c97a3d0d4d3ea56de0ee9794f.php deleted file mode 100755 index cd19219..0000000 --- a/runtime/applet/temp/f23a297c97a3d0d4d3ea56de0ee9794f.php +++ /dev/null @@ -1,86 +0,0 @@ - - 小程序管理中心 - <?php echo htmlentities($web['name']); ?>
二维码规则列表

规则数量:,本月还可发布

0): foreach($list['rule_list'] as $item): ?>
二维码规则 跳转页面 使用范围 发布状态 操作
- -
\ No newline at end of file diff --git a/runtime/cache/13/0fd29bc1e1c9570496921b09ae2849.php b/runtime/cache/13/0fd29bc1e1c9570496921b09ae2849.php old mode 100755 new mode 100644 index 461dc70..712f07b Binary files a/runtime/cache/13/0fd29bc1e1c9570496921b09ae2849.php and b/runtime/cache/13/0fd29bc1e1c9570496921b09ae2849.php differ diff --git a/runtime/cache/21/413a1afbfae837472e4844bda5ddbc.php b/runtime/cache/21/413a1afbfae837472e4844bda5ddbc.php old mode 100755 new mode 100644 diff --git a/runtime/cache/30/4fce12426ae0229ae22216efc4ea5b.php b/runtime/cache/30/4fce12426ae0229ae22216efc4ea5b.php old mode 100755 new mode 100644 index 5a66d48..9d56dfb --- a/runtime/cache/30/4fce12426ae0229ae22216efc4ea5b.php +++ b/runtime/cache/30/4fce12426ae0229ae22216efc4ea5b.php @@ -1,4 +1,4 @@ -a:1:{s:5:"other";a:5:{s:3:"key";s:5:"other";s:8:"describe";s:12:"其它设置";s:6:"values";a:8:{s:8:"postpaid";a:3:{i:10;s:1:"0";i:20;s:1:"0";i:30;s:1:"0";}s:8:"is_stock";s:1:"0";s:5:"goods";a:2:{s:8:"sell_out";s:1:"1";s:9:"delisting";s:1:"0";}s:9:"open_shop";s:1:"1";s:10:"is_calling";s:1:"1";s:10:"bind_phone";s:1:"1";s:11:"balance_pay";s:1:"0";s:12:"order_export";s:3:"col";}s:9:"applet_id";i:10001;s:11:"update_time";i:0;}} \ No newline at end of file +a:2:{s:6:"center";a:5:{s:3:"key";s:6:"center";s:8:"describe";s:18:"用户中心设置";s:6:"values";a:5:{s:3:"vip";s:1:"1";s:7:"setting";s:1:"0";s:6:"helper";s:1:"0";s:7:"contact";a:2:{s:7:"is_open";s:1:"1";s:4:"type";s:6:"wechat";}s:4:"menu";a:5:{i:0;a:4:{s:4:"logo";s:62:"https://app.cxhxy.dev.1nww.com/addons/food/img/applet/pact.png";s:5:"title";s:12:"预约订桌";s:4:"path";s:15:"user/pact/index";s:4:"sort";i:10;}i:1;a:4:{s:4:"logo";s:64:"https://app.cxhxy.dev.1nww.com/addons/food/img/applet/coupon.png";s:5:"title";s:12:"我的卡券";s:4:"path";s:17:"user/coupon/index";s:4:"sort";i:20;}i:2;a:4:{s:4:"logo";s:65:"https://app.cxhxy.dev.1nww.com/addons/food/img/applet/address.png";s:5:"title";s:12:"我的地址";s:4:"path";s:18:"user/address/index";s:4:"sort";i:30;}i:3;a:4:{s:4:"logo";s:68:"https://app.cxhxy.dev.1nww.com/addons/food/img/applet/collection.png";s:5:"title";s:12:"签到中心";s:4:"path";s:15:"user/sign/index";s:4:"sort";i:40;}i:4;a:4:{s:4:"logo";s:65:"https://app.cxhxy.dev.1nww.com/addons/food/img/applet/comment.png";s:5:"title";s:12:"评价记录";s:4:"path";s:18:"user/comment/index";s:4:"sort";i:50;}}}s:9:"applet_id";i:10001;s:11:"update_time";i:0;}s:5:"other";a:5:{s:3:"key";s:5:"other";s:8:"describe";s:12:"其它设置";s:6:"values";a:8:{s:8:"postpaid";a:3:{i:10;s:1:"0";i:20;s:1:"0";i:30;s:1:"0";}s:8:"is_stock";s:1:"0";s:5:"goods";a:2:{s:8:"sell_out";s:1:"1";s:9:"delisting";s:1:"0";}s:9:"open_shop";s:1:"1";s:10:"is_calling";s:1:"1";s:10:"bind_phone";s:1:"1";s:11:"balance_pay";s:1:"0";s:12:"order_export";s:3:"col";}s:9:"applet_id";i:10001;s:11:"update_time";i:0;}} \ No newline at end of file diff --git a/runtime/cache/4e/819c837d54a6ed09abc77a8560a66f.php b/runtime/cache/4e/819c837d54a6ed09abc77a8560a66f.php old mode 100755 new mode 100644 diff --git a/runtime/cache/eb/300fe116b3568a7e80a6c2812b1a38.php b/runtime/cache/eb/300fe116b3568a7e80a6c2812b1a38.php index 217a7e6..e63c99f 100644 --- a/runtime/cache/eb/300fe116b3568a7e80a6c2812b1a38.php +++ b/runtime/cache/eb/300fe116b3568a7e80a6c2812b1a38.php @@ -1,4 +1,4 @@ -1701764602 \ No newline at end of file +1701848041 \ No newline at end of file diff --git a/runtime/index/temp/60a64cd47b22d798d9e777f4f707b2cd.php b/runtime/index/temp/60a64cd47b22d798d9e777f4f707b2cd.php deleted file mode 100755 index ba8b27d..0000000 --- a/runtime/index/temp/60a64cd47b22d798d9e777f4f707b2cd.php +++ /dev/null @@ -1,495 +0,0 @@ - - - - - - - - - - - - <?php echo htmlentities($web['name']); ?> - <?php echo htmlentities($title); ?> - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - - - -
- -
- -
- - - -
- -
- -
- - - -
- -
- -
- -
- -
-
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
-
-
-
-
-

六步开店 一站完成

-

特有接口,一路无阻,快速上线

-
-
-
    -
  • -
    - -

    商家注册

    -

    微信扫码注册登录一步完成

    -
    -
    - -
    -
  • -
  • -
    - -

    授权小程序

    -

    扫码授权或免费快速注册

    -
    -
    - -
    -
  • -
  • -
    - -

    对接支付

    -

    在线开通收款账户或对接已有账户

    -
    -
    - -
    -
  • -
  • -
    - -

    发布商品

    -

    商品分类设置,上传单双规格商品

    -
    -
    - -
    -
  • -
  • -
    - -

    装修店铺

    -

    DIY小程序店铺页面,配置店铺

    -
    -
    - -
    -
  • -
  • -
    - -

    发布上线

    -

    一键发布与升级小程序

    -
    -
  • -
-
- -
-
-
-
-
-

一套模板同步十大平台

-

提供uni-app版本模板源代码,实现多平台发布

-
-
-
- -
-
-
    -
  • - -

    Android

    -
  • -
  • - -

    IOS

    -
  • -
  • - -

    H5

    -
  • -
  • - -

    微信小程序

    -
  • -
  • - -

    支付宝小程序

    -
  • -
  • - -

    百度小程序

    -
  • -
  • - -

    字节跳动小程序

    -
  • -
  • - -

    QQ小程序

    -
  • -
  • - -

    快应用

    -
  • -
  • - -

    360小程序

    -
  • -
-
-
-
-
- -
-
-
-

功能模块

-

实时监控订单情况,灵活手动调度订单,高效完成配送

-
-
-
    -
  • - -

    实时接单

    -

    商家实时接单,通过订单调度中心,实时监控配送情况,灵活手动调度订单,高效完成配送

    -
  • -
  • - -

    支付方式

    -

    用户可通过线上微信、余额支付,线下货到付款的方式,轻松完成小程序外卖下单,不一样的下单体验

    -
  • -
  • - -

    会员管理

    -

    会员信息触手可得,方便查找,高效会员营销推广,各种营销方案尽在手中

    -
  • -
  • - -

    数据统计

    -

    会员统计、订单统计、销售统计、详细的订单数据统计,一目了然

    -
  • -
  • - -

    订单管理

    -

    后台轻松管理订单,方便查看订单号、总额、支付状态等信息

    -
  • -
  • - -

    客户维系

    -

    轻松管理公众号粉丝,可积累的客户数据,客户通过关注注册,后台即可生成用户管理数据

    -
  • -
  • - -

    营销工具

    -

    优惠券、满减活动、限时秒杀、拼图、砍价、充值送优惠等可随意组合,在吸粉引流的同时刺激客户直接消费

    -
  • -
  • - -

    多样配送

    -

    可选择商家自主配送,上门自提,第三方配送,提高配送效率,降低配送成本

    -
  • -
-
-
-
-
-
-
-

丰富营销模块 增强用户黏合性

-

丰富新颖的营销手法,让您的商城促销玩出新花样。拉新、转化、促活、复购、留存、推广,店铺经营面面俱到。

-
-
-
    -
  • 拼团
  • -
  • 秒杀
  • -
  • 砍价
  • -
  • 优惠券
  • -
-
-
- - - - - -
-
-
-
-
-
-

五大管理模块

-

打造全方位运营模式让运维简单,高效,智能,助力快速开展小程序业务。

-
-
-
    -
  • - -

    超管端

    -

    对商户集中管理,统一发布小程序模板,等级收费,打印机授权,消息推送等

    -
  • -
  • - -

    代理端

    -

    多级分销,区域保护,代理自由定价,对自己的客户全方位服务管理

    -
  • -
  • - -

    商户端

    -

    扫码点餐端和商城端,上传商品,营销活动,订单管理,会员管理,DIY生成小程序,多门店等

    -
  • -
  • - -

    助手端

    -

    手机移动管理,让商家随时随地关注门店经营状态,帮助店长店员更方便的维护订单状态和服务顾客。

    -
  • -
  • - -

    店长端

    -

    门店管理一步到位,解锁店长管理权限

    -
  • -
-
-
-
-
- -
- -
- -
- -
- - -
- -

关注我们

-
-
- Copyright© All rights reserved.闽ICP备19004629号-1
- - -
- -
- -
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/runtime/index/temp/b430673016f1b8d1351a534a69510985.php b/runtime/index/temp/b430673016f1b8d1351a534a69510985.php deleted file mode 100755 index cca7959..0000000 --- a/runtime/index/temp/b430673016f1b8d1351a534a69510985.php +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - - - - - - - <?php echo htmlentities($web['name']); ?> - <?php echo htmlentities($title); ?> - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - - - -
- -
- -
- - - -
- -
- -
- - - -
- -
- -
- -
- -
-
-
-
-

为什么选择

-

保姆式跟踪培养,为合作伙伴提供一流的发展空间

-
-
-
    -
  • - - -

    企业

    -

    中国银联挂牌服务商,江苏省科创企业,纳税A级企业

    -
  • -
  • - - -

    品牌

    -

    公司自身拥有千万级用户,具备先天的传播优势!

    -
  • -
  • - - -

    产品

    -

    完整的产品线,构建各个行业生态系统

    -
  • -
  • - - -

    技术

    -

    十二年技术研发团队,全部出自科班,部份来源于BAT

    -
  • -
  • - - -

    服务

    -

    “一对一”顾问式服务,节假日等全年无休

    -
  • -
  • - - -

    回报率

    -

    全新的行业产业链模式,回报率超乎你想象

    -
  • -
-
-
-
-
-
-
-

八大支持

-

我们将为合作伙伴营造一流的发展环境

-
-
- -

产品销售支持

-

产品经理实时对接销售,团队提供培训支持

-
- -

区域保护支持

-

区域保护系统和价格保护政策避免订单冲突

-
- -

售后运营支持

-

专业运营团队保障用户产品只用

-
- -

技术保障支持

-

金融级别系统建设,保障业务安全稳定

-
- -

品牌宣传支持

-

全国范围线上线下,多渠道全方位宣传

-
- -

产品升级支持

-

研发团队专注产品研发持续优化产品

-
- -

高效甩单支持

-

总部将客户信息按区域分配,提供甩单支持

-
- -

远程服务支持

-

全天候贴心客服服务7*24小时跟踪

-
-
- -
-
-
-
-
-

加盟流程

-

只需4步 即可快速开店

-
-
-
    -
  • - -

    填写信息

    -

    填写申请表格,提交合作

    -
  • -
  • - -

    对接经理

    -

    一个工作日内渠道经理和您对接

    -
  • -
  • - -

    确认合作

    -

    与码点餐签署合作协议

    -
  • -
  • - -

    开展业务

    -

    开通帐号,发展市场

    -
  • -
-
-
-
- - - -
- -
- -
- -
- -
- - -
- -

关注我们

-
-
- Copyright© All rights reserved.闽ICP备19004629号-1
- - -
- -
- -
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/runtime/index/temp/b84ab2a86a49fb8098a55f114226b794.php b/runtime/index/temp/b84ab2a86a49fb8098a55f114226b794.php deleted file mode 100755 index 2b9e9c4..0000000 --- a/runtime/index/temp/b84ab2a86a49fb8098a55f114226b794.php +++ /dev/null @@ -1,2 +0,0 @@ - - <?php echo htmlentities($web['name']); ?> - <?php echo htmlentities($title); ?>
\ No newline at end of file diff --git a/runtime/index/temp/c17836b361a86127d4c136cc0bb98e5b.php b/runtime/index/temp/c17836b361a86127d4c136cc0bb98e5b.php deleted file mode 100755 index 017546e..0000000 --- a/runtime/index/temp/c17836b361a86127d4c136cc0bb98e5b.php +++ /dev/null @@ -1,2 +0,0 @@ - - <?php echo htmlentities($web['name']); ?> - <?php echo htmlentities($title); ?>
\ No newline at end of file diff --git a/runtime/store/log/202311/21_error.log b/runtime/store/log/202311/21_error.log deleted file mode 100755 index a05052d..0000000 --- a/runtime/store/log/202311/21_error.log +++ /dev/null @@ -1,74 +0,0 @@ -[2023-11-21T15:57:38+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T15:57:46+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T15:57:50+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:08+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:08+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:08+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:09+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:09+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:09+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:09+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:09+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:45+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:46+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:46+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:47+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:47+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:47+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:58:47+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:33+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:34+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:37+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:53+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:54+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:54+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:55+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:55+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:55+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:55+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:55+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:56+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:56+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:56+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:56+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:56+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:56+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:57+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:57+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T15:59:57+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:00:43+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:01:22+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:13+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:14+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:14+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:14+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:15+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:15+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:15+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:15+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:16+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:16+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:16+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:17+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:23+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:03:55+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:22:16+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:22:38+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:22:42+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:29+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:29+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:30+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:30+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:30+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:31+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:31+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:31+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:32+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:32+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:32+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:33+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:23:33+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:52:56+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:53:41+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10001.png.png): failed to open stream: No such file or directory -[2023-11-21T16:54:12+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory -[2023-11-21T16:54:18+08:00][error] [2]file_put_contents(./temp//temp/food/wechat-shop-10002.png.png): failed to open stream: No such file or directory diff --git a/runtime/store/temp/0c8787a77f02614aefcaa341d7335ca2.php b/runtime/store/temp/0c8787a77f02614aefcaa341d7335ca2.php deleted file mode 100755 index b1c311f..0000000 --- a/runtime/store/temp/0c8787a77f02614aefcaa341d7335ca2.php +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
-
智能设备列表
0): foreach($list as $item): ?>
编号 门店 设备 名称 设备ID 设备KEY 联网 状态 时间 操作

暂无记录
-
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/10eaa1c936787f73e9ca337f946da334.php b/runtime/store/temp/10eaa1c936787f73e9ca337f946da334.php deleted file mode 100755 index b0e5131..0000000 --- a/runtime/store/temp/10eaa1c936787f73e9ca337f946da334.php +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
页面列表
-
-
-
-
-
- -
-
-
-
- - - - - - - - - - - - - isEmpty()): foreach($list as $item): ?> - - - - - - - - - - - - - - -
页面ID页面名称页面类型添加时间更新时间操作
-

-
- - - - - -
暂无记录
-
-
-
render(); ?>
-
-
总记录:total(); ?>
-
-
-
-
-
-
-
- - - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/233e0da4a493f66c5eda33831df6debb.php b/runtime/store/temp/233e0da4a493f66c5eda33831df6debb.php deleted file mode 100755 index 0ea11e2..0000000 --- a/runtime/store/temp/233e0da4a493f66c5eda33831df6debb.php +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
餐桌列表
-
-
- -
-
-
-
- -
-
-
-
- -
- -
- -
-
- -
- -
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - 0): foreach($list as $index => $item): ?> - - - - - - - - - - - - - - - - -
编号ID餐桌名称餐桌状态餐桌码所属门店显示排序添加时间管理操作
-

-
- - - - - - - - - -
暂无记录
-
-
-
-
-
-
- - - - - - - - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/32927b1e6f229976b3bfb1d748722e68.php b/runtime/store/temp/32927b1e6f229976b3bfb1d748722e68.php deleted file mode 100755 index 8ad1dc1..0000000 --- a/runtime/store/temp/32927b1e6f229976b3bfb1d748722e68.php +++ /dev/null @@ -1,809 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- - - - -
-
-
- -
- -
- - -
- -
-
- -
- -
-

{{ diyData.page.params.title }}

-
- -
- - - -
- -
-
-
- -
-
- {{item.text}} -
-
-
-
- -
{{ diyData.page.name }}
页面名称仅用于后台查找
小程序端顶部显示的标题
小程序端转发时显示的标题
建议尺寸:500×400
{{ diyData.tabbar.name }}
{{item.text}}
建议尺寸:50*50,单位PX
建议尺寸:50*50,单位PX
- -
- -
-
-

1. 设计完成后点击"保存页面",在小程序端页面下拉刷新即可看到效果。

-

2. 如需填写链接地址请参考页面链接

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/39bcbcc718db9ee53e923309aaeb92b9.php b/runtime/store/temp/39bcbcc718db9ee53e923309aaeb92b9.php deleted file mode 100755 index cab1ecf..0000000 --- a/runtime/store/temp/39bcbcc718db9ee53e923309aaeb92b9.php +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
-
交易设置
-
-
-
-
- -
-
- -
- -
- 最小设置1。如该设置10后,下列参数即使设置1,最长也要等待10分钟才能执行(刷新)一次 -
-
-
-
- -
-
- -
- -
- 设置0不自动操作 -
-
-
-
- -
-
- -
- -
- 设置0不自动操作 -
-
-
-
- -
-
- -
- -
- (后付费无效)设置0不自动操作 -
-
-
-
- -
-
- -
- -
- 设置0不自动操作 -
-
-
-
- -
-
- -
- -
- 设置0不自动操作 -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/409e4e4a205ca0731d204c8584cbd9de.php b/runtime/store/temp/409e4e4a205ca0731d204c8584cbd9de.php deleted file mode 100755 index 0894bba..0000000 --- a/runtime/store/temp/409e4e4a205ca0731d204c8584cbd9de.php +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
店员列表
-
-
-
-
-

注:店长可以登录门店管理端,店员账号密码为手机号,如修改店长手机号则密码初始为新手机号

-
-
- -
-
-
-
- -
-
-
-
- -
- -
- -
-
- -
- -
-
-
-
-
-
-
-
- - - - - - - - - - - - - - isEmpty()): foreach($list as $item): ?> - - - - - - - - - - - - - - - -
店员ID所属门店店员姓名店员手机号店员身份添加时间操作
-

-
- - - - - -
暂无记录
-
-
-
render(); ?>
-
-
总记录:total(); ?>
-
-
-
-
-
-
-
- - - - - - - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/5ba392d1c9e1e74ec22aae78b0af9092.php b/runtime/store/temp/5ba392d1c9e1e74ec22aae78b0af9092.php deleted file mode 100755 index 5ba30cf..0000000 --- a/runtime/store/temp/5ba392d1c9e1e74ec22aae78b0af9092.php +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
-
微信小程序订阅消息设置
小程序添加“商业服务-软件/建站/技术开发”服务类目后,直接点击下列按钮同步即可
-
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/5eecfbdd931a94d55dafc8f38d15c9ab.php b/runtime/store/temp/5eecfbdd931a94d55dafc8f38d15c9ab.php deleted file mode 100755 index 2cd1f12..0000000 --- a/runtime/store/temp/5eecfbdd931a94d55dafc8f38d15c9ab.php +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
门店列表
-
-
- - -
-
-
- -
-
-
- -
- - - - - - - - - - - - - - - - - - - $item): ?> - - - - - - - - - - - - - - - - - - - - -
门店ID门店LOGO门店名称营业时间联系人联系电话门店码买单码WIFI码门店状态创建时间操作
- 门店图片 - -

-
- - - - - - - - - - - - - - - - - -
暂无记录
-
-
-
render(); ?>
-
-
总记录:total(); ?>
-
-
-
-
-
-
-
- - - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/6da5e1cd8c29396c8903d1413abd1e55.php b/runtime/store/temp/6da5e1cd8c29396c8903d1413abd1e55.php deleted file mode 100755 index e386406..0000000 --- a/runtime/store/temp/6da5e1cd8c29396c8903d1413abd1e55.php +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
-
微信公众号模板消息配置
-
-
-
-

模板消息类目设置为“餐饮/餐饮”和“IT科技/互联网|电子商务”,去设置获取模板ID

-
-
-
-
-
- -
- - 模板编号:OPENTM417875155 -
-
-
- -
- - 模板编号:OPENTM414769250 -
-
-
- -
- - 模板编号:OPENTM415437052 -
-
-
- -
- - 模板编号:OPENTM416620550 -
-
-
- -
- - 模板编号:OPENTM414769357 -
-
-
- -
- - 模板编号:OPENTM406071616 -
-
- -
-
-
- -
-
-
-
-
-
-
-
-
- - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/8e50fcdf9dfa90740feb9f2ee72e8a28.php b/runtime/store/temp/8e50fcdf9dfa90740feb9f2ee72e8a28.php deleted file mode 100755 index 1967679..0000000 --- a/runtime/store/temp/8e50fcdf9dfa90740feb9f2ee72e8a28.php +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
帮助中心
-
-
-
-
-
- -
-
-
-
- - - - - - - - - - - - isEmpty()): foreach($list as $item): ?> - - - - - - - - - - - - - -
标题内容排序添加时间操作
-

-
-

-
- -
暂无记录
-
-
-
-
-
-
- - - - - - - - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/988feca942d491d8bbd9f5550fca01cf.php b/runtime/store/temp/988feca942d491d8bbd9f5550fca01cf.php deleted file mode 100755 index 8f21c35..0000000 --- a/runtime/store/temp/988feca942d491d8bbd9f5550fca01cf.php +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
-
-
-
门店经营数据统计
-
- -
- -
- -
-
- -
- -
- -
-
-
- -
- -
-
-
-
- -
-
-
-
-
-
-
-
-
-
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/acbc153a7dd97ab50d0d10d18165b7bc.php b/runtime/store/temp/acbc153a7dd97ab50d0d10d18165b7bc.php deleted file mode 100755 index df264fa..0000000 --- a/runtime/store/temp/acbc153a7dd97ab50d0d10d18165b7bc.php +++ /dev/null @@ -1,380 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
-
-
后付费设置
-
-
-
- -
- - -
- 是否可以餐后付款 -
-
-
-
- -
- - -
- 是否可以骑手代收款 -
-
-
-
- -
- - -
- 是否可以取餐时付款 -
-
-
-
-
-
商品设置
-
-
-
- -
- - -
- 开启后对库存数量进行检测,库存为零时无法销售 -
-
-
-
- -
- - -
- 用户下单是否显示售罄商品。(库存开启有效) -
-
-
-
- -
- - -
- 用户下单是否显示下架商品。 -
-
-
-
-
-
其它设置
-
-
-
- -
- - -
- 首次打开小程序点单页,是否弹出门店选择列表,关闭后默认选择最近的门店 -
-
-
-
- -
- - -
- 是否开启叫号服务,需对接叫号器,堂食扫码有效 -
-
-
-
- -
- - -
- 用户在小程序进行登录操作时是否强制绑定手机号 -
-
-
-
- -
- - -
- 扫买单码是否支持余额付款 -
-
-
-
- -
- - -
-
-
-
-
- -
-
-
-
-
-
-
-
- -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/ae9927b8c2651c650d93812e8343c6e9.php b/runtime/store/temp/ae9927b8c2651c650d93812e8343c6e9.php deleted file mode 100755 index 716129e..0000000 --- a/runtime/store/temp/ae9927b8c2651c650d93812e8343c6e9.php +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
-
用户列表
isEmpty()): foreach($list as $item): ?>
编号 头像 昵称 性别 手机 消费 余额 积分 省份 城市 平台 操作
暂无记录
render(); ?>
总记录:total(); ?>
- -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/b309110cddd7c2715b4a38353ff0bb36.php b/runtime/store/temp/b309110cddd7c2715b4a38353ff0bb36.php deleted file mode 100755 index 8307d5a..0000000 --- a/runtime/store/temp/b309110cddd7c2715b4a38353ff0bb36.php +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
-
页面链接
-
- -
-
-
-
-
- - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/b7355a86bf291b1b080d4bff48d89329.php b/runtime/store/temp/b7355a86bf291b1b080d4bff48d89329.php deleted file mode 100755 index b4b6c24..0000000 --- a/runtime/store/temp/b7355a86bf291b1b080d4bff48d89329.php +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - 腾讯地图开放API - 轻快小巧,简单易用! - - - - - - - - - -
-
-
-
当前坐标:
- -
当前地址:
- -
-
-
-
-
- - 当前缩放等级:15 -
-
-
-
-
-
-
- - - diff --git a/runtime/store/temp/c496503fb310b9f0807d3690b9becaa7.php b/runtime/store/temp/c496503fb310b9f0807d3690b9becaa7.php deleted file mode 100755 index dcb2b18..0000000 --- a/runtime/store/temp/c496503fb310b9f0807d3690b9becaa7.php +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
-
商品列表 -
isEmpty()): foreach($list as $item): ?>
编号 图片 名称 分类 销量 库存 规格 状态 排序 时间 操作
商品图片

暂无记录
render(); ?>
总记录:total(); ?>
-
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/c778416e005d01626bafe09f7eec06d2.php b/runtime/store/temp/c778416e005d01626bafe09f7eec06d2.php deleted file mode 100755 index e52f438..0000000 --- a/runtime/store/temp/c778416e005d01626bafe09f7eec06d2.php +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
-
会员卡设置
开通会员卡是否要购买,单位元,设置0则不需要支付费用。
{{model.vip[index].name}}设置
尺寸650x300像素以上,大小2M以下
设置该等级所需要的成长值,消费1元=1积分
取值10-100,设置100无折扣,设置85为85折
{{item.name}}
- - - - - - - - - - - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/ca970d4ab4bd1237b6f93eb72cba4306.php b/runtime/store/temp/ca970d4ab4bd1237b6f93eb72cba4306.php deleted file mode 100755 index b9ed009..0000000 --- a/runtime/store/temp/ca970d4ab4bd1237b6f93eb72cba4306.php +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
商品分类 -
-
-
-
-
-
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
分类ID分类名称分类排序添加时间操作
- -
暂无记录
-
-
-
-
-
-
- - - - - - - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/d6e8468d5e2899d8e0a2a06666a55b1e.php b/runtime/store/temp/d6e8468d5e2899d8e0a2a06666a55b1e.php deleted file mode 100755 index ecf8927..0000000 --- a/runtime/store/temp/d6e8468d5e2899d8e0a2a06666a55b1e.php +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
-
-
- -
-
-
-
- -
- -
- -
- -
-
- -
-
-
-
- -
-
-
-
-
-
-
-
-
- -
- -
- -
-
- -
- -
-
-
-
-
-
-
-
- - - - - - - - - - - - - isEmpty()): foreach($list as $order): ?> - - - - - - - - - - - - - - - - - - - - - - - - -
商品信息单价/数量实付款买家交易状态操作
- - # 堂食 # - - 取餐号: - - 餐桌: - - 起菜时间: - - # 外卖 # - 取餐号: - 外送时间: - - # 外带 # - 取餐号: - 取餐时间: - - # 外带 # - 取餐号: - 外带时间: - - 门店: - 来源: - 订单号: - 下单时间: -
-
- -
-
-

- -
-
-

×

- -

退 ×

- -
-

- - 0): ?> - - 0): ?> - - -

退款:-¥

- -
-

- -
-

付款状态: - - -

-

接单状态: - - -

-

配送状态: - - -

-

收货状态: - - -

-

订单状态: - - - -

-
-
- - 重打订单 - - 订单详情 - 10 AND $order['shop_status']['value'] == 10 AND $order['order_status']['value'] == 10): ?> - - 确认接单 - - - - - - 指派骑手 - - - 骑手到店 - - - 外卖配送 - - - 外卖送达 - - - 确认收款 - - - 确认退款 - -
-
暂无记录
-
-
-
render(); ?>
-
-
总记录:total(); ?>
-
-
-
-
-
-
-
- -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/d7390d1714e1d942ac842975d838ebd7.php b/runtime/store/temp/d7390d1714e1d942ac842975d838ebd7.php deleted file mode 100755 index c61fa7d..0000000 --- a/runtime/store/temp/d7390d1714e1d942ac842975d838ebd7.php +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
-
-
-
-
-
-
订桌设置
-
-
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - 单位天,设置0只可当天,设置5,则5天内都可预约。 -
-
-
-
- -
-
-
-
-
-
-
-
-
- - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/f2a615aee8ef64e5e71245bee61efdcc.php b/runtime/store/temp/f2a615aee8ef64e5e71245bee61efdcc.php deleted file mode 100755 index f0980f7..0000000 --- a/runtime/store/temp/f2a615aee8ef64e5e71245bee61efdcc.php +++ /dev/null @@ -1,618 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- - -
-
-
-
-
-
编辑门店
-
-
-
-
-
- -
-
-
- -
- -
-
-
- -
-
-
- -
-
- - - -
-
-
-
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - 不用填写省、市、区/县 -
-
-
- -
-
- -
-
- -
-
-
-
-
-
- -
- -
-
-
- -
- -
-
-
-
-
- -
- - - -
-
-
- -
- - - -
- 自动适配:根据用户是否扫桌码确定是否为扫码下单或排号下单 -
-
-
-
- -
- - -
-
-
- -
- - -
- 作用于堂食扫码点单 -
-
-
-
- -
- - 就餐人数开启有效,单位元。按照每一人收取费用,0=不收取 -
-
-
- -
- - -
- 用户下单后是否自动接受订单 -
-
-
-
- -
- - -
-
-
- -
- - - - -
- 选择外卖配送第三方服务商,外卖订单有效 -
-
-
-
- -
- - 使用顺丰配送必须配置该项 -
-
-
- -
- - 使用达达配送必须配置该项 -
-
-
- -
- - 使用码科配送必须配置该项 -
-
-
-
-
- -
- - -
-
-
- -
- - 数字越小越靠前 -
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/f2d764740df911d8d11f8c0d29ea314f.php b/runtime/store/temp/f2d764740df911d8d11f8c0d29ea314f.php deleted file mode 100755 index 3f4a178..0000000 --- a/runtime/store/temp/f2d764740df911d8d11f8c0d29ea314f.php +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
-
用户中心设置
编号 图标 标题 链接 排序 操作
{{index+1}} 菜单图标 {{item.title}} {{item.path}} {{item.sort}}
- - - - - - - - - - - -
- - -
- - - - - - - - - - diff --git a/runtime/store/temp/f5a702ff70f080324a5f05ce3e1cc418.php b/runtime/store/temp/f5a702ff70f080324a5f05ce3e1cc418.php deleted file mode 100755 index c07a6de..0000000 --- a/runtime/store/temp/f5a702ff70f080324a5f05ce3e1cc418.php +++ /dev/null @@ -1,470 +0,0 @@ - - - - - - - <?php echo htmlentities($app_name); ?>管理后台 - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - -
- -
- -
-
-
-
-
门店统计
- -
- -
-
- -
-
-
- -
-
-
-
-
商品总量
-
-
-
当前商品总数量
- -
-
-
-
-
-
用户总量
-
-
-
当前用户总数量
- -
-
-
-
-
-
订单总量
-
-
-
付款订单总数量
- -
-
-
-
-
-
评价总量
-
-
-
订单评价总数量
- -
-
-
-
-
-
-
- -
-
-
-
-
待处理统计
-
-
-
-
-
-
待退款数量
-
-
-
-
-
-
-
-
- -
-
-
-
-
订单统计
-
-
-
-
-
-
今日堂食订单数量
-
-
- 昨日:
-
本月堂食订单数量
-
-
- 上月:
-
-
-
-
-
-
-
今日自取订单数量
-
-
- 昨日:
-
本月自取订单数量
-
-
- 上月:
-
-
-
-
-
-
-
今日外卖订单数量
-
-
- 昨日:
-
本月外卖订单数量
-
-
- 上月:
-
-
-
-
-
-
-
今日退单数量
-
-
- 昨日:
-
本月退单数量
-
-
- 上月:
-
-
-
-
-
-
-
今日预约订桌数量
-
-
- 昨日:
-
本月预约订桌数量
-
-
- 上月:
-
-
-
-
-
-
交易统计
-
-
-
-
-
-
今日订单金额
-
-
- 昨日:
-
本月订单金额
-
-
- 上月:
-
-
-
-
-
-
-
今日退款金额
-
-
- 昨日:
-
本月退款金额
-
-
- 上月:
-
-
-
-
-
-
-
今日优惠金额
-
-
- 昨日:
-
本月优惠金额
-
-
- 上月:
-
-
-
-
-
-
-
今日充值金额
-
-
- 昨日:
-
本月充值金额
-
-
- 上月:
-
-
-
-
-
-
-
今日赠送金额
-
-
- 昨日:
-
本月赠送金额
-
-
- 上月:
-
-
-
-
-
-
-
- -
-
-
-
-
近七日走势
-
-
-
-
-
-
-
-
-
-
-   版权所有 -
-
-
-
- - - -
- - -
- - - - - - - - - - diff --git a/runtime/user/log/202311/21_error.log b/runtime/user/log/202311/21_error.log deleted file mode 100755 index 6e759b1..0000000 --- a/runtime/user/log/202311/21_error.log +++ /dev/null @@ -1,2 +0,0 @@ -[2023-11-21T18:41:05+08:00][error] [8]Trying to access array offset on value of type null -[2023-11-21T18:45:54+08:00][error] [8]Trying to access array offset on value of type null diff --git a/runtime/user/temp/2d3218e5f4e26e3b8b658949082baf1f.php b/runtime/user/temp/2d3218e5f4e26e3b8b658949082baf1f.php deleted file mode 100755 index be8ae55..0000000 --- a/runtime/user/temp/2d3218e5f4e26e3b8b658949082baf1f.php +++ /dev/null @@ -1,14 +0,0 @@ - - 用户中心 - <?php echo htmlentities($web['name']); ?>
-
-
-
-
-
Welcome To HemaPHP System
-
-

用户中心

-
-
-
-
-
\ No newline at end of file diff --git a/runtime/user/temp/7ed378d2e688fc3af98e70c4fc2797ba.php b/runtime/user/temp/7ed378d2e688fc3af98e70c4fc2797ba.php deleted file mode 100755 index 94d5e23..0000000 --- a/runtime/user/temp/7ed378d2e688fc3af98e70c4fc2797ba.php +++ /dev/null @@ -1,67 +0,0 @@ - - 用户中心 - <?php echo htmlentities($web['name']); ?>
-
-
-
-
-
认证申请列表
-
-
-
- - - - - - - - - - - - - isEmpty()): foreach($list as $item): ?> - - - - - - - - - - - - - - -
申请编号认证类型认证费用审核状态创建时间操作
-

-
- - - - - - - - - -
暂无记录
-
-
-
render(); ?>
-
-
总记录:total(); ?>
-
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/runtime/user/temp/7eddf9dad1c49a6d7f1c63d22923ff77.php b/runtime/user/temp/7eddf9dad1c49a6d7f1c63d22923ff77.php deleted file mode 100755 index aedea84..0000000 --- a/runtime/user/temp/7eddf9dad1c49a6d7f1c63d22923ff77.php +++ /dev/null @@ -1,268 +0,0 @@ - - 用户中心 - <?php echo htmlentities($web['name']); ?>
-
-
-
-
-
账号信息
-
-
-
-
- -
-
- - 修改 -
-
-
-
-
-
- -
-
- 未认证 -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
登录方式
-
-
-
-
- -
- -
-
-
-
- -
- -
-
- - 未关联 - - - - -
-
-
- -
-
- -
- -
-
- - 未关联 - - - - -
-
-
- -
-
-
-
-
-
- - - - -
\ No newline at end of file diff --git a/runtime/user/temp/874e2d7a5be2959b9dc4ef7ce6faa47b.php b/runtime/user/temp/874e2d7a5be2959b9dc4ef7ce6faa47b.php deleted file mode 100755 index 813b5df..0000000 --- a/runtime/user/temp/874e2d7a5be2959b9dc4ef7ce6faa47b.php +++ /dev/null @@ -1,179 +0,0 @@ - - 用户中心 - <?php echo htmlentities($web['name']); ?>
-
-
-
-
-
小程序管理
-
-
-
-
-
- -
-
-
-
- - - - - - - - - - - - - - - - isEmpty()): foreach($list as $index => $item): ?> - - - - - - - - - - - - - - - - - -
Applet_Id图标名称模板上线平台小程序码到期时间创建时间管理操作
- 小程序图片 - -

-
- 0): ?> - - - - - - - - - - - - - - - - - - - - - - - 0): ?> - - -- - - - -
暂无记录
-
-
-
render(); ?>
-
-
总记录:total(); ?>
-
-
-
-
-
-
-
- -
\ No newline at end of file diff --git a/runtime/user/temp/93ed04fe573c38439d4a42fb7d368b2f.php b/runtime/user/temp/93ed04fe573c38439d4a42fb7d368b2f.php deleted file mode 100755 index f5e14ab..0000000 --- a/runtime/user/temp/93ed04fe573c38439d4a42fb7d368b2f.php +++ /dev/null @@ -1,155 +0,0 @@ - - 用户中心 - <?php echo htmlentities($web['name']); ?>
-
-
-
-
-
-
-
-
创建小程序管理端
-
-
- -
- -
-
-
- -
- -
- - -
- - 单门店:1个小程序小程序仅可1个店面使用
- 多门店:(连锁经营)1个小程序小程序可配置N个店面使用 -
-
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - - - - - -
-
-
- -
- ¥{{list[selected-1].buy_single[year]}}元 - ¥{{list[selected-1].buy_many[year]}}元 -
-
- -
-
- - -
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- - -
\ No newline at end of file diff --git a/runtime/user/temp/afec97ae6c4cbf0aeb5fe21866576881.php b/runtime/user/temp/afec97ae6c4cbf0aeb5fe21866576881.php deleted file mode 100755 index 6075fee..0000000 --- a/runtime/user/temp/afec97ae6c4cbf0aeb5fe21866576881.php +++ /dev/null @@ -1,90 +0,0 @@ - - 用户中心 - <?php echo htmlentities($web['name']); ?>
-
-
-
-
-
-
我的钱包
-
-
-
- -
-
-
- -
- -
-
-
-
- -
-
-
-
-
-
-
- - - -
\ No newline at end of file