SyuanYu hace 1 año
padre
commit
c1b4c4ce14

+ 21 - 0
layouts/shortcodes/form.html

@@ -151,6 +151,27 @@
 
 <script src="//code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
   crossorigin="anonymous"></script>
+<!-- <script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
+<script type="module">
+  import { createClient } from 'https://esm.sh/@supabase/supabase-js@2'
+
+  const supabase = createClient('http://172.105.241.163:8000', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q');
+
+  let { data: ai_news, error } = await supabase
+    .from('ai_news')
+    .select('*')
+
+  console.log('ai_news', ai_news);
+
+  const newData = {
+    name: 'New AI News',
+    data: "",
+  };
+
+  let { data: insertedData, error: insertError } = await supabase
+    .from('ai_news')
+    .insert([newData]);
+</script> -->
 <script>
   // 電話國碼
   const countryCodes = [

+ 276 - 0
layouts/shortcodes/form2.html

@@ -0,0 +1,276 @@
+<div class="news-form">
+  <div class="text-center title">
+    <h4>線上諮詢</h4>
+    <p>與我們合作,馬上展開全新的創作里程碑</p>
+  </div>
+  <form>
+    <div class="row mb-4">
+      <label for="nameValue" class="col-md-2 col-lg-3 col-xl-2 col-form-label">
+        <div class="d-flex flex-nowrap">
+          聯絡人 <span class="text-danger">*</span>
+        </div>
+      </label>
+      <div class="col-md-10 col-lg-9 col-xl-10">
+        <input type="text" class="form-control" id="nameValue" placeholder="請留下聯絡人姓名" required>
+      </div>
+    </div>
+
+    <div class="row mb-4">
+      <label for="phoneValue" class="col-md-2 col-lg-3 col-xl-2 col-form-label">
+        <div class="d-flex flex-nowrap">
+          聯絡電話 <span class="text-danger">*</span>
+        </div>
+      </label>
+      <div class="col-sm-4 col-md-3 col-lg-4 col-xl-3">
+        <select id="countryCode" class="form-select">
+          <option selected>選擇國碼</option>
+        </select>
+      </div>
+      <div class="col-sm-8 col-md-7 col-lg-5 col-xl-7 mt-3 mt-sm-0">
+        <input type="tel" class="form-control" id="phoneCode" placeholder="e.g., 988 888 888" required>
+      </div>
+    </div>
+
+    <div class="row mb-4">
+      <label for="companyValue" class="col-md-2 col-lg-3 col-xl-2 col-form-label">
+        <div class="d-flex flex-nowrap">
+          公司名稱 <span class="text-danger">*</span>
+        </div>
+      </label>
+      <div class="col-md-10 col-lg-9 col-xl-10">
+        <input type="text" class="form-control" id="companyValue" placeholder="請留下公司名稱" required>
+      </div>
+    </div>
+
+    <div class="row mb-4">
+      <label for="companyValue" class="col-md-2 col-lg-3 col-xl-2 col-form-label">
+        <div class="d-flex flex-nowrap">
+          LINE ID <span class="text-danger">*</span>
+        </div>
+      </label>
+      <div class="col-md-10 col-lg-9 col-xl-10">
+        <input type="text" class="form-control" id="lineidValue" placeholder="請留下 LINE ID" required>
+      </div>
+    </div>
+
+    <div class="row mb-3">
+      <label for="emailValue" class="col-md-2 col-lg-3 col-xl-2 col-form-label">
+        <div class="d-flex flex-nowrap">
+          電子信箱 <span class="text-danger">*</span>
+        </div>
+      </label>
+      <div class="col-md-10 col-lg-9 col-xl-10">
+        <input type="email" class="form-control" id="emailValue" placeholder="請留下 E-mail" required>
+      </div>
+
+      <div class="invalid-feedback">
+        Please choose a username.
+      </div>
+    </div>
+
+    <div class="row mb-3">
+      <label for="dateValue" class="col-md-2 col-lg-3 col-xl-2 col-form-label">
+        <div class="d-flex flex-nowrap">
+          預計活動需求日 <span class="text-danger">*</span>
+        </div>
+      </label>
+      <div class="col-md-10 col-lg-9 col-xl-10 d-flex align-items-center">
+        <input type="date" id="dateValue" name="dateValue" class="px-2"
+          style="border:1px solid #ced4da; border-radius: 3px;" required />
+      </div>
+    </div>
+
+
+    <div class="row mb-4">
+      <label for="captionValue" class="col-md-2 col-lg-3 col-xl-2 col-form-label">
+        <div class="d-flex flex-nowrap">
+          需求說明 <span class="text-danger">*</span>
+        </div>
+      </label>
+      <div class="col-md-10 col-lg-9 col-xl-10">
+        <textarea class="form-control" id="captionValue" rows="3" placeholder="請簡述說明" required></textarea>
+      </div>
+    </div>
+
+    <div class="row">
+      <div class="col-md-10 col-lg-9 col-xl-10 offset-sm-2">
+        <div class="form-check">
+          <input class="form-check-input mt-2" type="checkbox" id="agreeValue">
+          <label class="form-check-label w-100" for="agreeValue">
+            本人同意集仕多搜集資料
+          </label>
+        </div>
+      </div>
+    </div>
+
+    <div style="height: 15px;">
+      <span class="errorText text-danger">尚有欄位未填寫</span>
+    </div>
+
+    <div class="d-flex justify-content-center mt-5">
+
+      <button type="submit" class="submit-btn" id="submitBtn">
+        <span class="spinner-border spinner-border-sm me-2 loading-btn" role="status" aria-hidden="true"></span>
+        提交
+      </button>
+    </div>
+  </form>
+</div>
+
+<script src="//code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
+  crossorigin="anonymous"></script>
+
+<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
+
+<script type="module">
+  import { createClient } from 'https://esm.sh/@supabase/supabase-js@2'
+
+  const supabase = createClient('http://172.105.241.163:8000', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q');
+
+  // 電話國碼
+  const countryCodes = [
+    '+1',   // 美國
+    '+7',   // 俄羅斯
+    '+33',  // 法國
+    '+39',  // 義大利
+    '+44',  // 英國
+    '+46',  // 瑞典
+    '+47',  // 挪威
+    '+49',  // 德國
+    '+52',  // 墨西哥
+    '+60',  // 馬來西亞
+    '+61',  // 澳大利亞
+    '+62',  // 印尼
+    '+64',  // 紐西蘭
+    '+65',  // 新加坡
+    '+66',  // 泰國
+    '+81',  // 日本
+    '+82',  // 南韓
+    '+86',  // 中國大陸
+    '+91',  // 印度
+    '+353', // 愛爾蘭
+    '+852', // 香港
+    '+853', // 澳門
+    '+886', // 台灣
+  ];
+
+  console.log(countryCodes);
+  const countryCode = document.getElementById('countryCode');
+  countryCodes.forEach(code => {
+    const option = document.createElement('option');
+    option.value = code;
+    option.text = code;
+    countryCode.appendChild(option);
+  });
+
+
+  $('.errorText').hide();
+  $('.loading-btn').hide();
+
+
+  async function send() {
+    console.log('addEventListener');
+    let name = document.querySelector('#nameValue').value; // 聯絡人
+    let phone; // 聯絡電話
+    let company = document.querySelector('#companyValue').value; // 公司名稱
+    let email = document.querySelector('#emailValue').value; // 電子信箱
+    // let demand; // 需求目的
+    let caption = document.querySelector('#captionValue').value; // 需求說明
+
+    let lineid = document.querySelector('#lineidValue').value; // 需求說明
+
+
+    let date = document.querySelector('#dateValue').value; // 預計活動需求日
+    let agree; // 搜集資料
+    let time; // 填單時間
+
+    // 取得當下時間
+    const now = new Date();
+    const options = { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' };
+    time = now.toLocaleString('zh-TW', options);
+    console.log('time', time);
+
+    if (document.querySelector('input[id="agreeValue"]:checked')) {
+      agree = "同意";
+    } else {
+      agree = "不同意";
+    }
+
+    // if (document.querySelector('input[name="demandValue"]:checked')) {
+    //   demand = document.querySelector('input[name="demandValue"]:checked').value;
+    // }
+
+    // if (demand === "其他") {
+    //   demand = document.querySelector('#otherText').value;
+    // }
+
+    let countryCode = document.querySelector('#countryCode').value; // 國碼
+    let phoneCode = document.querySelector('#phoneCode').value; // 電話號碼
+
+    phone = `${countryCode} ${phoneCode}`;
+
+    const insertdata = {
+      name: name,
+      email: email,
+      lineid: lineid,
+      agreeValue: agree,
+      dateValue: date,
+      phone: phone,
+      caption: caption,
+      companyValue: company
+    }
+
+    const { data, error } = await supabase
+      .from('ai_news')
+      .insert([insertdata])
+      .then(({ data, error }) => {
+        if (error) {
+          console.error('插入数据时发生错误:', error);
+        } else {
+          $('.loading-btn').hide();
+          alert("成功提交!");
+
+        }
+      })
+      .catch(e => {
+
+      });
+    // .select()
+  };
+
+
+
+  $('button').on('click', function (e) {
+    e.preventDefault();
+
+    let countryCode = document.querySelector('#countryCode').value;
+
+
+    // let demand = ""; // 需求目的
+    // if (document.querySelector('input[name="demandValue"]:checked')) {
+    //   demand = document.querySelector('input[name="demandValue"]:checked').value;
+    // }
+
+    // if (demand === "其他") {
+    //   demand = document.querySelector('#otherText').value;
+    // }
+
+    // 手動觸發表單提交
+    let form = $(this).closest('form');
+    form[0].reportValidity(); // 顯示瀏覽器內建錯誤提示
+
+    if (countryCode === "選擇國碼") {
+      console.log('表單未通過驗證');
+      $('.errorText').show();
+      return;
+    }
+
+    if (form[0].reportValidity()) {
+      $('.loading-btn').show();
+      $('.errorText').hide();
+      send();
+    }
+
+
+  });
+</script>

BIN
webSite/content/main-news/ai_news/ai_news.png


BIN
webSite/content/main-news/ai_news/ainews2.png


+ 43 - 0
webSite/content/main-news/ai_news/index.md

@@ -0,0 +1,43 @@
++++
+title = "ChoozMo獨家投放全球熱門新聞!最新海內外新聞服務引領媒體革新浪潮!"
+date = "2023-12-26T00:16:00+08:00"
+tags = ["企業級AI主播","AI主播","虛擬主播","集仕多","三立AI主播","華視AI主播","警廣AI主播"]
+categories = "焦點訊息"
+banner = ""
+url = "/overseas-news-exposure"
+keywords="ChoozMoAIGV" 
++++
+
+## ChoozMo獨家投放全球熱門新聞!最新海內外新聞服務引領媒體革新浪潮!
+
+引言:解放您的品牌力!ChoozMo助您打通全球市場。在這個數位轉型的時代,新聞媒體的生態正在經歷巨變,而ChoozMo以其獨特的優勢正引領著新聞傳播的未來。根據皮尤研究中心的最新調查報告,全球有44%的人口傾向使用電子設備閱讀新聞,而這一數字在美國更高達86%。ChoozMo充分理解這一趨勢,提供全方位的新聞解決方案,協助那些渴望在全球舞台上嶄露頭角的中小企業和新創公司提高新聞曝光!
+
+## 數位化時代,為何要選擇ChoozMo獨家海內外新聞投放?
+
+
+
+* **精準發放至多家海內外媒體平台:** ChoozMo透過其強大的發佈系統,能夠根據您新聞的屬性,將信息精準地發送到多家海內外知名媒體平台。這不僅擴大了新聞的曝光度,還確保了信息在不同領域的全面覆蓋,讓您的品牌、產品或事件將在眾多媒體頻道中獲得機會,無縫銜接各種受眾。
+* **國內保證上YAHOO新聞,國外保證上Google News:** ChoozMo不僅在國內擁有龐大的媒體網絡,確保您的新聞在本土市場引起廣泛關注,更是國際舞台上的獨門通行證。將您想提高曝光度的新聞稿交給ChoozMo,我們幫助您登上國內外知名媒體平台,其中包括Yahoo新聞、新浪網、PChome新聞等台灣媒體,國際新聞方面,我們保證您的消息登上Google News的熱門頭條!讓ChoozMo成為您品牌崛起的加速器,讓全球矚目您卓越的產品與價值。
+* **全自動化監控及定期成效報告:** ChoozMo為您提供全自動化的監控系統,實時追蹤新聞的傳播效果。無論是在國內還是國際,我們都能夠即時獲取數據,讓您隨時掌握最新的新聞趨勢。定期成效報告更是保證您能夠清晰地了解您的新聞在不同平台上的受眾反饋和曝光效果,助您更有針對性地調整新聞策略。
+
+    
+
+![ainews](images/../ai_news.png "ainews")
+
+
+
+## ChoozMo獨有價格優勢:
+
+
+
+* 最令人振奮的是,ChoozMo為您提供的這一切僅需**三萬元**,即可將客戶的新聞投放到知名海內外新聞平台,並且已含稅。這樣的價格優勢在台灣目前僅有ChoozMo獨有,讓中小企業和新創公司能夠以極具競爭力的成本,享受到全球媒體曝光的龐大福利。
+
+
+![ainews](images/../ainews2.png "ainews")
+
+
+## 您需要準備甚麼:
+
+ChoozMo為客戶提供極簡的操作流程,只需提供您的新聞稿和三張相關圖片,即可開啟全球媒體曝光之旅。我們將以專業的翻譯服務將新聞稿翻譯成英文,隨後利用最先進的新聞發布系統,將您的消息傳播到50間以上的海內外新聞媒體網路平台,確保新聞的廣泛曝光。這樣的一站式服務,不僅節省您的時間,更確保您的新聞以最佳狀態呈現在全球觀眾面前。
+
+{{< form2 >}}