From d302301967a254909615964be1ed6160b7d12728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Thu, 31 Mar 2022 16:24:33 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1=E8=81=8A=E5=A4=A9=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- echarts/config/autoload.php | 2 +- echarts/controllers/weixinchat.php | 31 +++ echarts/controllers/welcome.php | 45 +--- echarts/helpers/info_helper.php | 38 +++ echarts/views/echarts/dashboard.php | 1 + echarts/views/echarts/inchina_customers.php | 35 ++- echarts/views/echarts/mobile_deal.php | 8 +- echarts/views/echarts/potential_customers.php | 43 ++-- echarts/views/echarts/regular_customers.php | 34 ++- echarts/views/weixinchat/welcome.php | 231 ++++++++++++++++++ echarts/views/welcome_message.php | 35 ++- 11 files changed, 412 insertions(+), 91 deletions(-) create mode 100644 echarts/controllers/weixinchat.php create mode 100644 echarts/helpers/info_helper.php create mode 100644 echarts/views/weixinchat/welcome.php diff --git a/echarts/config/autoload.php b/echarts/config/autoload.php index 4e45f057..3dbc00fb 100644 --- a/echarts/config/autoload.php +++ b/echarts/config/autoload.php @@ -64,7 +64,7 @@ $autoload['libraries'] = array(); | $autoload['helper'] = array('url', 'file'); */ -$autoload['helper'] = array('url'); +$autoload['helper'] = array('url','info'); /* diff --git a/echarts/controllers/weixinchat.php b/echarts/controllers/weixinchat.php new file mode 100644 index 00000000..2f149c74 --- /dev/null +++ b/echarts/controllers/weixinchat.php @@ -0,0 +1,31 @@ +load->view('weixinchat/welcome'); + + } + + public function userchat($userid) + { + $data = array(); + $data['userid'] = $userid;//只显示用户聊天窗口,HT调用 + $this->load->view('weixinchat/welcome', $data); + } + + public function show_me_the_data() + { + //转发到后端的HT2.0服务器,解决js跨域问题和隐藏后端服务器 + $url = $this->input->post('url'); + echo GET_HTTP(HT2SERVER . $url); + } + + +} + + +/* End of file welcome.php */ +/* Location: ./application/controllers/welcome.php */ \ No newline at end of file diff --git a/echarts/controllers/welcome.php b/echarts/controllers/welcome.php index 00c0c2bb..68f0e2ca 100644 --- a/echarts/controllers/welcome.php +++ b/echarts/controllers/welcome.php @@ -21,6 +21,12 @@ class Welcome extends CI_Controller public function index() { $this->load->view('welcome_message'); + /* 钉钉的免登流程 + 1.获取免登授权码,用js获取 + 2.获取AccessToken,用PHP调用,因为要传送appkey和appsecret,安全起见不能直接用js + 3.获取userid + 4.获取用户详情 + */ } public function dashboard() @@ -39,45 +45,10 @@ class Welcome extends CI_Controller { //转发到后端的HT2.0服务器,解决js跨域问题和隐藏后端服务器 $url = $this->input->post('url'); - echo $this->GET_HTTP('https://p9axztuwd7x8a7.mycht.cn' . $url); + echo GET_HTTP('https://p9axztuwd7x8a7.mycht.cn' .$url); } - function GET_HTTP($url, $data = '', $method = 'GET') - { - $curl = curl_init(); // 启动一个CURL会话 - curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址 - curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查 - curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); // 从证书中检查SSL加密算法是否存在 - if (isset($_SERVER['HTTP_USER_AGENT'])) { - $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT']; - } else { - $HTTP_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'; - } - curl_setopt($curl, CURLOPT_USERAGENT, $HTTP_USER_AGENT); // 模拟用户使用的浏览器 - curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转 - curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer - if ($method == 'POST' && !empty($data)) { - curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求 - curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包 - } - curl_setopt($curl, CURLOPT_TIMEOUT, 45); // 设置超时限制防止死循环 - curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容 - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回 - $tmpInfo = curl_exec($curl); // 执行操作 - $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); - if ($httpCode >= 400) {//页面状态,如果大于400说明页面打不开 - log_message('error', " curl {$httpCode} {$url} "); - return false; - } - $errno = curl_errno($curl); - if ($errno !== 0) { - return false; - $error_message = $errno . ' ' . curl_error($curl); //记录错误日志 - log_message('error', "train/get_http curl {$error_message}"); - } - curl_close($curl); //关闭CURL会话 - return $tmpInfo; //返回数据 - } + } diff --git a/echarts/helpers/info_helper.php b/echarts/helpers/info_helper.php new file mode 100644 index 00000000..0c830473 --- /dev/null +++ b/echarts/helpers/info_helper.php @@ -0,0 +1,38 @@ += 400) {//页面状态,如果大于400说明页面打不开 + log_message('error', " curl {$httpCode} {$url} "); + return false; + } + $errno = curl_errno($curl); + if ($errno !== 0) { + return false; + $error_message = $errno . ' ' . curl_error($curl); //记录错误日志 + log_message('error', "train/get_http curl {$error_message}"); + } + curl_close($curl); //关闭CURL会话 + return $tmpInfo; //返回数据 +} \ No newline at end of file diff --git a/echarts/views/echarts/dashboard.php b/echarts/views/echarts/dashboard.php index 18872bd1..f0d949a2 100644 --- a/echarts/views/echarts/dashboard.php +++ b/echarts/views/echarts/dashboard.php @@ -6,6 +6,7 @@ + diff --git a/echarts/views/echarts/inchina_customers.php b/echarts/views/echarts/inchina_customers.php index 63eeca5b..c3104c6b 100644 --- a/echarts/views/echarts/inchina_customers.php +++ b/echarts/views/echarts/inchina_customers.php @@ -83,7 +83,12 @@
  • +
  • +
  • +
  • @@ -152,15 +157,17 @@
    + class="form-control ShowMeTheDatePicker_cn" + value="">
    + class="form-control ShowMeTheDatePicker_cn" + value="">
    - +

    @@ -183,7 +190,7 @@
    @@ -210,7 +217,13 @@ -

    订单列表 显示|隐藏

    + + + | + + +
    -
    +

    Date: Mon, 9 May 2022 15:52:56 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20GH=20INQUIRY=20?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/mobile_first/gh.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/mobile_first/gh.php b/application/views/mobile_first/gh.php index 797823ad..c6c19153 100644 --- a/application/views/mobile_first/gh.php +++ b/application/views/mobile_first/gh.php @@ -175,7 +175,7 @@ aria-label="festival">

    Or send an inquiry below

    - +

    Date: Mon, 9 May 2022 16:01:22 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E4=BF=AE=20GH=20=E6=A1=8C=E9=9D=A2?= =?UTF-8?q?=E7=AB=AF=20INQUIRY=20=E8=A1=A8=E5=8D=95=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/mobile_first/gh-pc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/mobile_first/gh-pc.php b/application/views/mobile_first/gh-pc.php index 861d22c6..3bbed344 100644 --- a/application/views/mobile_first/gh-pc.php +++ b/application/views/mobile_first/gh-pc.php @@ -209,7 +209,7 @@ height="0" width="0" style="display:none;visibility:hidden">

    Or send an inquiry below

    - +

    Date: Thu, 12 May 2022 14:24:30 +0800 Subject: [PATCH 08/10] f --- application/views/bootstrap/welcome.php | 122 +++++++++++++----------- 1 file changed, 64 insertions(+), 58 deletions(-) diff --git a/application/views/bootstrap/welcome.php b/application/views/bootstrap/welcome.php index 61fe770d..bd69b2c6 100644 --- a/application/views/bootstrap/welcome.php +++ b/application/views/bootstrap/welcome.php @@ -1,9 +1,9 @@

    -
    +
    @@ -65,35 +66,35 @@ $item) { - ?> + ?> - ic_url_title; ?> + ic_url_title; ?> ic_author); ?> ic_datetime)); ?> - + 国家: 直辖市和特区 - +
  • CII2_Name ?>
  • 省份 - -
  • PRI2_Name ?>
  • + +
  • PRI2_Name ?>
  • @@ -119,8 +120,8 @@ + $i += 1; + ?> username ?> @@ -131,10 +132,12 @@ addtime)) ?> invalid_date)) ?> - + - - + + @@ -151,31 +154,34 @@ $item) { - $is_ids.=$item->is_id.','; - ?> - + $is_ids .= $item->is_id . ','; + ?> + - ic_url_title)) $item->ic_url_title = '编辑信息'; - echo $item->ic_url_title; ?> + ic_url_title)) $item->ic_url_title = '编辑信息'; + echo $item->ic_url_title; ?> ic_author); ?> ic_datetime)); ?> - + - -

    批量更新搜索页面

    - - + +

    批量更新搜索页面

    + + - + 省份城市列表 - + @@ -184,7 +190,7 @@ - + - + -
    PRI2_Name ?>PRI2_Name ?>
    字母
    @@ -192,18 +198,18 @@ CII_Code, 0, 1) == chr($i)) { - ?> - CII2_Name; ?> , - + CII2_Name; ?> , +
    + -
    - -
    - - 最新编辑城市 -
    - -
    - -
    +
    + +
    + + 最新编辑城市 +
    + +
    + +
    \ No newline at end of file From ec93af2bf590da9f0d738165041e97b8f76f1bb7 Mon Sep 17 00:00:00 2001 From: LMR <59361885@qq.com> Date: Thu, 12 May 2022 14:29:58 +0800 Subject: [PATCH 09/10] f --- application/controllers/overseas.php | 58 +++++++++++++++++++++++++ application/views/bootstrap/welcome.php | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 application/controllers/overseas.php diff --git a/application/controllers/overseas.php b/application/controllers/overseas.php new file mode 100644 index 00000000..f02df736 --- /dev/null +++ b/application/controllers/overseas.php @@ -0,0 +1,58 @@ +permission->is_admin(); + //$this->output->enable_profiler(TRUE); + $this->load->model('Area_model'); + $this->load->model('Information_model'); + $this->load->model('InfoContents_model'); + $this->load->model('InfoStructures_model'); + } + + //团购信息 + public function index() + { + $overseas_id = 1; + //查询结构根节点,当为空则建立 + $rootStructure = $this->Information_model->GetRoot('g', $overseas_id); + if ($rootStructure == FALSE) { + $this->InfoContents_model->Add( + '', + 'Overseas', + 'root', + '', + '', + '', + '', + '', + '', + 0, + 0, + '', + '', + 0, + 0, + '', + '', + $overseas_id, + 'g', + 0, + '', + '' + ); + $this->InfoStructures_model->Add(0, $this->InfoContents_model->insert_id); + $is_id = $this->InfoStructures_model->insert_id; + } else { + $is_id = $rootStructure->is_id; + } + redirect(site_url('information/edit/' . $is_id)); + } +} diff --git a/application/views/bootstrap/welcome.php b/application/views/bootstrap/welcome.php index bd69b2c6..7c1634f6 100644 --- a/application/views/bootstrap/welcome.php +++ b/application/views/bootstrap/welcome.php @@ -21,7 +21,7 @@
  • 火车站信息
  • 团购信息
  • FAQ
  • -
  • 海外目的地
  • +
  • 海外目的地
  • config->item('site_code') != 'cht') { ?>
  • 静态化更新链接
  • From c2b345f15bf2e6f42703469783b25fd806d54fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Mon, 16 May 2022 09:48:25 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=84=E7=AB=99?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/wwwlog/controllers/index.php | 6 ++++++ echarts/views/weixinchat/welcome.php | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/application/third_party/wwwlog/controllers/index.php b/application/third_party/wwwlog/controllers/index.php index 46ba22fc..bfeae234 100644 --- a/application/third_party/wwwlog/controllers/index.php +++ b/application/third_party/wwwlog/controllers/index.php @@ -15,11 +15,17 @@ class Index extends CI_Controller private $Log_Client; private $logstore=array('cht'=>'globalhoghlights' ,'ah'=>'asiahighlights' + ,'gh'=>'globalhighlights' ,'ct'=>'chinatravel' ,'yz'=>'yangtzeriver' ,'gl'=>'guilinchina' ,'sht'=>'shanghaihighlights' ,'gm'=>'chinarundreisen' + ,'jp'=>'arachina' + ,'ru'=>'chinahighlights_ru' + ,'it'=>'viaggio-in-cina' + ,'vac'=>'viaje-a-china' + ,'vc'=>'voyageschine' );//站点日志存储库,每个网站对应一个 diff --git a/echarts/views/weixinchat/welcome.php b/echarts/views/weixinchat/welcome.php index 1de5f095..84581af4 100644 --- a/echarts/views/weixinchat/welcome.php +++ b/echarts/views/weixinchat/welcome.php @@ -193,6 +193,18 @@ case 'text': content = item.content.text; break; + case 'link': + content = `${item.content.title}`; + break; + case 'revoke': + content = `撤回了一条消息`; + break; + case 'file': + content = `${item.content.filename}`; + break; + case 'emotion': + content = ``; + break; default://未识别的内容,提示识别 content = '未识别的消息类型:' + item.msgtype; } @@ -214,6 +226,9 @@ }) document.getElementById('chat_msg_list').innerHTML = chat_msg_list; + //滚动条到最底部 + document.getElementById('chat_msg_list').scrollTop = document.getElementById('chat_msg_list').scrollHeight; + //分页导航 let chat_msg_list_page_nav = ''; document.getElementById('chat_msg_list_page_nav').innerHTML = '';