From 958031e674b3d2b4ed0890aa2a93b4569ac57317 Mon Sep 17 00:00:00 2001 From: ycc Date: Tue, 17 Nov 2020 15:35:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E4=BC=98=E5=85=88=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/config/config.php | 3 +- application/controllers/information.php | 26 + .../views/bootstrap3/information_edit.php | 3 +- application/views/mobile_first/ch-simple.php | 1810 ++++++++++++++++ application/views/mobile_first/ch.php | 1886 ++--------------- 5 files changed, 1962 insertions(+), 1766 deletions(-) create mode 100644 application/views/mobile_first/ch-simple.php diff --git a/application/config/config.php b/application/config/config.php index f702ddf0..8033c70f 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -388,7 +388,7 @@ $config['proxy_ips'] = ''; //各站信息组和人员权限分配 $config['site'] = array( 'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => '//images.chinahighlights.com', 'site_authors' => array('zzy', 'spt', 'yl', 'gavin', 'sw', 'zl', 'wbl', 'yqw', 'lf', 'zhm', 'pkl'), 'site_user' => ',ycc,lmr, zyh,J,shw,B,zzy,WJJ,Tony,pcf,zxy,wst,wz,v,S,yyg,yxd,wj,sw,yl,hx,spt,wmr,zl,syt,gavin,zm,htc,yqw,bhn,lmj,wbl,yqw,LYY,zhm,si'), - 'ch' => array('site_code' => 'ch', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => '//images.chinahighlights.com', 'site_authors' => array('TDJ'), 'site_user' => ',ycc,'), + 'ch' => array('site_code' => 'ch', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => '//images.chinahighlights.com', 'site_authors' => array('TDJ','ycc'), 'site_user' => ',ycc,'), 'gm' => array('site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'https://www.chinarundreisen.com', 'site_image_url' => '//bilder.chinarundreisen.com', 'site_authors' => array('DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'), 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'), 'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'https://www.voyageschine.com', 'site_image_url' => '//images.voyageschine.com', 'site_authors' => array('JE', 'kq', 'lya', 'lyz', 'zyh'), 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'), 'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'https://www.arachina.com', 'site_image_url' => '//images.arachina.com', 'site_authors' => array('hql', 'LLM', 'SHX', 'lmr', 'zyh', 'zb'), 'site_user' => ',ycc,lmr, zyh,hql,LLM,SHX,htc,zpl,Tony,zyh,J,B,zb,LYY,'), @@ -714,6 +714,7 @@ $config['cache']['vc']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\voyageschine.com $config['cache']['vac']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\viaje-a-china.com'; $config['cache']['ru']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\chinahighlights.ru'; $config['cache']['it']['cache_path'] = 'C:\VHD\Dropbox\wwwcache\viaggio-in-cina.it'; +$config['cache']['ch']['cache_path'] = 'D:\wwwcache\chinahighlights.com'; //静态文件更新接口 $config['cache']['jp']['cache_api'] = '/info.php/information/update_cache/'; diff --git a/application/controllers/information.php b/application/controllers/information.php index b852ef0d..b982bdf9 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -481,6 +481,9 @@ class Information extends CI_Controller if (strcasecmp($site_code, "gm") == 0 && !empty($auto_update_cache)) { $update_info_log = $this->update_cache($ic_url, true); + }else if (strcasecmp($site_code, "ch") == 0 && !empty($auto_update_cache)) { + //读取模板生成PC和移动优先文件 + $this->make_mobile_html(); } else if (strcasecmp($site_code, "cht") == 0 && !empty($auto_update_cache)) { $update_info_log = $this->update_cache($ic_url); } else if (strcasecmp($site_code, "ah") == 0 && !empty($auto_update_cache)) { @@ -551,6 +554,29 @@ class Information extends CI_Controller } return true; } + + function make_mobile_html(){ + //获取移动优先的模板,如果有的话 + $mobile_first_template_path='mobile_first/'.$this->config->item('site_code'); + if(is_file(APPPATH.'views/'.$mobile_first_template_path.EXT)){ + $mobile_template=$this->load->view($mobile_first_template_path, '', TRUE); + }else{ + return false; + } + $mobile_template=str_replace('', $this->input->post('ic_seo_title'), $mobile_template); + $mobile_template=str_replace('', $this->input->post('ic_seo_description'), $mobile_template); + $mobile_template=str_replace('', $this->input->post('ic_seo_keywords'), $mobile_template); + $mobile_template=str_replace('', $this->input->post('ic_url'), $mobile_template); + $mobile_template=str_replace('', $this->input->post('ic_content'), $mobile_template); + // /travelguide/chinese-zodiac/monthly-fortune-for-dog.htm + $mobile_html=$this->config->item('cache')[$this->config->item('site_code')]['cache_path'].$this->input->post('ic_url'); + $mobile_html=str_replace("\\", "/", $mobile_html); + if(substr($mobile_html, -1, 1)== '/'){ + $mobile_html=$mobile_html.'index.htm'; + } + create_folder_by_path(dirname($mobile_html)); + file_put_contents($mobile_html, $mobile_template, LOCK_EX); + } //更新静态文件 //不用参数提交的原因是可能url带有特殊字符,CI会报错 diff --git a/application/views/bootstrap3/information_edit.php b/application/views/bootstrap3/information_edit.php index c7c95b49..8f941797 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -1543,7 +1543,7 @@ foreach ($author_list as $author_item) { 忽略URL重复
- config->item('site_code'), array('cht', 'gm','ah','ct'))) {?> + config->item('site_code'), array('ch','cht', 'gm','ah','ct'))) {?> @@ -1557,6 +1557,7 @@ foreach ($author_list as $author_item) { echo ''; }?> +
diff --git a/application/views/mobile_first/ch-simple.php b/application/views/mobile_first/ch-simple.php new file mode 100644 index 00000000..6fc1f453 --- /dev/null +++ b/application/views/mobile_first/ch-simple.php @@ -0,0 +1,1810 @@ + + + + + + 6 Recommended Destinations for Your China Tours 2020 + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

信息更新提醒

+ + + +

页面头部大图

+
+ xxx +
+ + +

信息头部分类,H1,副标题

+
+
Chinese Food
+

Spicy - Central China, Especially Sichuan and Hunan

+

Spiciness is also called the "pungent flavor" + among the five flavors. It can not only whet + the appetite.

+ + +

社媒分享按钮

+
+ Follow Us +
    +
  • xxx
  • +
  • xxx
  • +
  • xxx
  • +
+
+ + +

信息页面作者,更新时间

+
By Candice SongUpdate 20.08.2020
+ +
+
+ +

段落文字

+

Discover China through our unique tours with award-winning guides and with 1:1 help from a dedicated China expert, every step of the way. China Highlights have specialized in private China tours for over 20 years; it's all we do. "Nihao and welcome to China!"

+

Discover China through our unique tours with award-winning guides and with 1:1 help from a dedicated China expert, every step of the way. China Highlights have specialized in private China tours for over 20 years; it's all we do. "Nihao and welcome to China!"

+ + +

视频

+
+
+ + +

信息页面插图

+
+ xxx + Fish is a must for the Chinese New Year reunion dinner. +
+ + +

统一H2标题

+

Chinese New Year Foods — Most Have Lucky Meanings

+ + +

信息页面表格

+
+
+ Solar Date (2020) + + Lunar Date + + Title +
+ January 17th + + December 23rd + + Little Year +
+ January 24th + + December 30th + + Chinese New Year's Eve +
+ January 25th + + January 1st + + Spring Festival +
+ February 8th + + January 15th + + Lantern Festival +
+
+ + +

统一H3标题

+

Chinese New Year Foods — Most Have Lucky Meanings

+ + +

列表

+ + + +

信息页面中广告图

+
+ xxx +
+ + +

信息页面加载更多内容按钮

+ + +
+ +

信息页面文章推荐

+
+
+

New Update

+
+ + + +
+
+
+

Read Next

+
+ + + + +
+ + +

信息页面TM引导

+
+ We are here to help you...
start planning your tailor-made China tour with 1-1 help from our travel advisors. + + Create Your Trip +
+ +
+ + +

产品页面内导航

+ + + + +

产品页面亮点内容

+
+

Tour 'Wow' Points

+ +

Discover a Little-Known Pristine Land on the Border between Qinghai and Sichuan

+

This is the ancient battlefield of King Gesar as told in the Tibetan legend. It is a forgotten wonderland blessed by the Tibetan gods.

+ the people standing on the bank of the lake + painting on the rock + +

Enjoythe Sunset at the First Bend of the Yellow River

+

Drive through the paradise of the local nomadic people in the Nuoergai Wetland Nature Reserve. Enjoy the ribbon-like bends of the Yellow River at sunset.

+ sunset at the first bend of the Yellow River + Gers on the grassland + +

Uncover the Small Sects of the Tibetan Buddhism at the Less Touristy Monasteries.

+

The magnificent golden roof, the white pagodas, the colorful butter sculptures and thousands of prayer wheels of the monasteries will bring you to the spirit world of the Tibetan Buddhism.

+ the white pagoda of Langyi Monastery + the colorful building of Saige lamasery + +
+ + +

产品页面whyus内容

+
+ Longji Terraced Fields +
+

We Fix the Uncertainty & Concern:

+
    +
  • Confirm where you can go.
  • +
  • Help guide you to get the required travel documents.
  • +
  • Offer the best options when last minute changes occur.
  • +
  • Promise full refund for any reason when canceling before your arrival day.
  • +
+ +

Tourist Trap? Never Happens with Us:

+
    +
  • You control the pace of the trip and won't be pushed.
  • +
  • No time or money wasted in commission shops.
  • +
  • No no-shows or risky bookings with one-man companies.
  • + + +
+
+
+ + + +

产品页面预定流程和用户反馈

+
+ +

Finish Your Booking in as Quick as 1 Day

+ +
+
+ + Tell us your dream travel idea +
+
+ + Work out your unique plan with 1 to 1 expert advice +
+
+ + + +

10000+ Travelers Say

+ + the certificate of TA excellent 2020 + + 10000+ excellent reviews +
+ + +

产品页面用户反馈

+
+

Best experience ever!

+

Our tour guide Mervyn was extremely knowledgeable. We had to change our plans due to a virus closure and she found other activities that we loved! By the end of the trip we felt like we had made a close friend and would enjoy spending time together again.

+

Angela T from US, July, 2020

+
+ + +
+
+ +

Tour Map

+ + + Discover the Mysterious Tibetan Area of Northern Sichuan tour map + +
+

Itinerary Quick Look

+
+ +

产品页面具体行程

+
+
+ DAY 1 + Chengdu to Songpan (322 km, 6 hrs) +

Drive from Chengdu to Songpan and enjoy the mountain scenery along the way. Explore the Songpan ancient town in the late afternoon.

+
+
+ DAY 2 + Songpan to Ruoergai to Tangke (200 km, 3½ hrs) +

Ruoergai Huahu (Flower Lake) , the Roergai grasslands, and the sunset at the first bend of the Yellow River.

+
+
+ DAY 3 + Tangke to A'ba (140 km, 3 hrs) +

Saige Lamasery and Langyi Monastery

+
+
+ DAY 4 + A'ba +

The Lianbaoyeze Scenic Area. This is a secret place hidden away in the mountains and includes a beautiful lake surrounded by peaks.

+
+
+ DAY 5 + 5 A'ba to Chengdu (477 km, 8 hrs) +

Drive from A'ba back to Chengdu. Visit the Ganbao Tibetan village on the way.

+
+ +
+ + +

产品页面酒店

+ +

Hotel Selection

+ + + —the Icing on the Cake + +

Boutique hotels are recommended to enrich your travel experience.

+ the decorations of Duomei Linka Hotel +
+ the lobby of the Duomei Linka Hotel + the bedroom of Duomei Linka Hotel +
+ + +
+ + + +

产品页面价格

+
+ FromCNY 8340p/p + Based on a private tour for 2 people. price varies depending on program, travel date, number of people and chosen hotel +

Price includes:

+
    +
  • Private air-conditioned business car with big windows and ample space
  • +
  • English speaking local guide
  • +
  • Activities, hotels, and meals listed in the itinerary
  • +
  • 24/7 helpline for while you are traveling
  • +
+ + + +

产品页面微信

+

Contact us via WeChat or click the red button to start planning.

+ chinahighlightstour + + + +
+

产品页面预定按钮

+ + + + + +

底部

+
+
+

xxx

+ Contact us via WeChat +
+ +
+ Follow Us + + + +
+ + + + +
+ Featured on + xxx +
+
+ +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/mobile_first/ch.php b/application/views/mobile_first/ch.php index 6fc1f453..0a85d866 100644 --- a/application/views/mobile_first/ch.php +++ b/application/views/mobile_first/ch.php @@ -1,1047 +1,18 @@ - - - - - - 6 Recommended Destinations for Your China Tours 2020 + @@ -1064,747 +35,134 @@ + + + + + + + + + + + + + + + + - -
- - - - - - - - - - - - - - - - +
+Follow Us + - + +
+Featured on +xxx +
+
+ + + \ No newline at end of file