# 舊規格C-7 EC公司資料頁 > [name=JasonWu] ###### tags: `公司資料頁` ## 網址 - https://{domain}/company/{companyId} - ex: https://www.taiwantrade.com/company/113784 ## 原版程式 ## 頁面功能說明 - 透過 api 取得頁面所需資料 - 頁首部分共用![](https://i.imgur.com/zLb5CzO.jpg) - 公司基本資料顯示 ![](https://i.imgur.com/HKP4Gv9.jpg) - 上方需顯示麵包屑 - 公司可以加入 favorite,已經加入後顯示的圖片與未加入前不同 --- - 公司型錄圖片 ![](https://i.imgur.com/AePY1Zf.jpg) - 顯示 api 回傳的資料 --- - 公司工廠資料 - 顯示 api 回傳的資料 - 當工廠資訊較多時,一開始不顯示全部的資料,下方提供 more 按鈕![](https://i.imgur.com/HYn4BEj.jpg) - 點選下面的 more,呈現完整的內容 ![](https://i.imgur.com/rwopMEq.jpg) --- - 公司認證與產品認證 ![](https://i.imgur.com/zUJdGQm.jpg) - 顯示 api 回傳的資料 - 點選認證圖片的燈箱效果參考 C-CP-COMS-2 認證燈箱 - <font color="red">目前未設計新板認證條列頁,之後應不會提供 All Certifications 相關的顯示</font> --- - 公司得獎紀錄、大事記 ![](https://i.imgur.com/5k2hh6d.jpg) - 顯示 api 回傳的資料 --- - 公司聯絡資訊 - 需要判斷使用者是否登入,如果尚未登入,顯示的畫面會是 ![](https://i.imgur.com/5JhiZMQ.jpg) - 如果沒有登入,點選 Log in to view detail 時,需要 direct 到登入頁面,登入成功後會回到原本的 product cp 頁面 - <font color="red">使用者提到要用燈箱來處理登入相關資訊,需要確認需求</font> - 如果使用者已登入,可以看到 Owner, Contact Person, Business Phone Number 等資料 ![](https://i.imgur.com/zCuJJIt.jpg) - 點選 Contact Supplier,跳轉至頁面下方的聯絡區塊 - 如果 api 有回傳地址,需要顯示 google map 燈箱 --- - 聯絡人區塊 ![](https://i.imgur.com/4gVOp4C.jpg) - 參考 Inquiry Company 商機頁 (步驟一) 與 Inquiry Company 商機頁 (步驟二) --- ## 相關 api 分析 - 目前 ec 公司有一頁式的網站,例如 https://www.taiwantrade.com/company/113784 - 如果沒有購買一頁式,會使用舊版頁面來顯示,例如 https://www.taiwantrade.com/company/old/113784 - 程式的進入點需要調整,目前的程式會判斷該公司是否有買一頁式,再決定用哪一種版型顯示 - **<font color="#f00">需要跟 IBM 討論,一頁式的顯示是否要重新製作,如果不要重新製作,現行舊版的樣式要如何放入新版頁面系統中</font>** - 一頁式或者是舊版,顯示的內容基本沒有差異,差別只在於套版的樣式,所以可以套用原本的 ep-api 來取得顯示的資料 - 參考舊版功能,一頁式可以套用的相關 api 列表如下: - header logo > 取得公司名稱、年資等資料 - about us cert > 公司認證,還可以細分為一般認證、第三方認證 - about us basic info > 公司基本資料 - about us factory info > 公司工廠資料 - about us award > 公司獲獎紀錄 - about us official record > 公司大事記 - about us tw magazine > 雜誌紀錄 - about us contact info > about us 聯絡資訊 - onepage products > 公司型錄清單 - message template > 留言的訊息模板 - 預計與本功能有關的 api,可以分為下面幾類 - companyInfo API > 結合 header logo, 以及 about us 的基本資料、工廠資料等 - companyProducts API > 公司相關型錄資料 - companyCertification API > 公司相關認證 - companyContact API > 依照傳入參數決定是否有登入,有登入才能回傳聯絡人資訊 - Inquiry Company 新增商機 api > 將相關聯絡資訊傳送給 server ## companyInfo api ### 規格 - path : ${TT-API網址}/company/info/{did}/{companyId}/{langId} - method : GET ### API 邏輯 - 公司基本資料 ### Input Column | Type | Require | Desc -----------|----------|---------|--------- did | number | Y | domain id companyId | number | Y | 公司id langId | number | Y | 語系id ### Output - json 內容如下: ```=json ``` ### 取值方式 - 透過 sql 取值 ``` ``` ## companyProducts api ### 規格 - path : ${TT-API網址}/company/products/{did}/{companyId}/{langId} - method : GET ### API 邏輯 - 公司產品 ### Input Column | Type | Require | Desc -----------|----------|---------|--------- did | number | Y | domain id companyId | number | Y | 公司id langId | number | Y | 語系id ### Output - json 內容如下: ```=json ``` ### 取值方式 - 透過 sql 取值 ``` ``` ## companyCertification api ### 規格 - path : ${TT-API網址}/company/certs/{did}/{companyId}/{langId} - method : GET ### API 邏輯 - 公司認證,分公司認證、產品認證、第三方認證等 ### Input Column | Type | Require | Desc -----------|----------|---------|--------- did | number | Y | domain id companyId | number | Y | 公司id langId | number | Y | 語系id ### Output - json 內容如下: ```=json ``` ### 取值方式 - 透過 sql 取值 ``` ``` ## companyContact api ### 規格 - path : ${TT-API網址}/company/contact/{did}/{companyId}/{langId} - method : GET - query : ?loginCheck={loginCheck} ### API 邏輯 - 公司聯絡人資訊 - 依照傳入參數決定是否有登入,有登入才能回傳聯絡人資訊 ### Input Column | Type | Require | Desc -----------|----------|---------|--------- did | number | Y | domain id companyId | number | Y | 公司id langId | number | Y | 語系id logincheck | string | Y | 是否登入,需要討論傳遞加密的方式 ### Output - json 內容如下: ```=json ``` ### 取值方式 - 透過 sql 取值 ``` ``` ### Inquiry Company 新增商機 api - 參考 https://hackmd.io/FDa_t2QwRxKoBimH6mW4qQ