# 第八週小組任務 - 19組 ###### tags: `第19組小組討論` `2022` `JS直播班` `秋季班` `六角學院` :::success **小組討論時間:11/27 週日 13:30** ::: ## 參與組員 | 組員名單 | 報到 | | --------------------- | ------------------ | | 你看我像是會玩嗎#1866 | | | KC_8685#9343 | :heavy_check_mark: | | Rr#2215 | :heavy_check_mark: | | YI#0863 | :heavy_check_mark: | | 阿彬#2789 | | | Aritan#1931 | | | hsiung阿熊#4079 | | | Jill#5577 | :heavy_check_mark: | | ztion#8403 | | | 阿修#9176 | | # 問題集 ## 第一題 最終關卡討論 請討論 API 該如何與整合前端 [XD 設計稿](https://xd.adobe.com/view/a48b8617-4588-4817-9062-b62130dce916-f1d8/) ### 問題一:初始化,取得產品與購物車列表 * [取得產品列表(Get):/api/livejs/v1/customer/{api_path}/products](https://hexschool.github.io/hexschoolliveswagger/#/%E7%94%A2%E5%93%81%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/get_api_livejs_v1_customer__api_path__products) * [取得購物車列表(Get)::/api/livejs/v1/customer/{api_path}/carts](https://hexschool.github.io/hexschoolliveswagger/#/%E8%B3%BC%E7%89%A9%E8%BB%8A%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/get_api_livejs_v1_customer__api_path__carts) ``` //取得產品列表(Get):/api/livejs/v1/customer/{api_path}/products { "status": true, "products": [ { "category": "產品分類 (String)", "image": "產品圖片 (String)", "id": "產品ID (String)", "title": "產品名稱 (String)", "origin_price": "產品原始價錢 (Number)", "price": "產品銷售價錢 (Number)" } ] } ``` >新帳號預設購物車會有一筆資料 ### 問題二:新增購物車品項,並再次初始化購物車列表 * [加入購物車(POST):/api/livejs/v1/customer/{api_path}/carts](https://hexschool.github.io/hexschoolliveswagger/#/%E8%B3%BC%E7%89%A9%E8%BB%8A%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/post_api_livejs_v1_customer__api_path__carts) ### 問題三:修改購物車狀態(刪除全部、刪除單筆),並再次初始化購物車列表 * [清除購物車內全部產品(DELETE):/api/livejs/v1/customer/{api_path}/carts](https://hexschool.github.io/hexschoolliveswagger/#/%E8%B3%BC%E7%89%A9%E8%BB%8A%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/delete_api_livejs_v1_customer__api_path__carts) * [刪除購物車內特定產品(DELETE):/api/livejs/v1/customer/{api_path}/carts/{id}](https://hexschool.github.io/hexschoolliveswagger/#/%E8%B3%BC%E7%89%A9%E8%BB%8A%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/delete_api_livejs_v1_customer__api_path__carts__id_) ### 問題四:送出購買訂單,並再次初始化購物車列表 * [送出購買訂單(POST):/api/livejs/v1/customer/{api_path}/orders](https://hexschool.github.io/hexschoolliveswagger/#/%E8%A8%82%E5%96%AE%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/post_api_livejs_v1_customer__api_path__orders) ### 問題五:觀看後台訂單 * [取得訂單列表(GET):/api/livejs/v1/admin/{api_path}/orders](https://hexschool.github.io/hexschoolliveswagger/#/%E8%A8%82%E5%96%AE%E7%9B%B8%E9%97%9C(%E7%AE%A1%E7%90%86%E8%80%85)/get_api_livejs_v1_admin__api_path__orders) * [Codepen 範例](https://codepen.io/hexschool/pen/yLgaBWV?editors=1010) --- ## 組員回答 >[點我觀看 CodePen](https://codepen.io/Jillkate/pen/YzvYaaK) >[name=Jill#5577] ## 討論整理 :::info - [關於時間格式](https://blog.csdn.net/qq_15957557/article/details/112715089) - [陣列排序](https://www.fooish.com/javascript/array/sort.html) - [Git & GitHub 教學手冊](https://w3c.hexschool.com/git/cfdbd310) - 分享彼此的學習心法 ::: ## 討論截圖   
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up