##原始資料取用
- 競賽筆記與API對接說明書:https://hackmd.io/@yc97463/2020hackathontwjr
- 專案 Package:https://works.imych.one/hackathonjr/6th-Ensured-harmless-taxi-master.zip
- @yc97463
- @swchen1217
使用搭車APP之使用者
在疫情爆發初期,許多人會對共享經濟感到畏懼,畢竟不想因為與他人共享資源,而間接被病毒感染到。 此舉在要訂車的時候,會希望自己叫到的車會是已經消毒過的,而大多平台都有提供API資源,我們可以串接,並加入我們自己的消毒回報平台,讓使用者在使用我們的系統叫車時,在看到司機的消毒回報情形時,能多一份安心。
-
官方程序
- 55688APP > 叫車 > 點選地區 > 等車 > 上車 > 付款(多元付款) > 下車
-
我們ㄉ
- 確定有被消毒(?)
- 拍照
- @yc97463
- @swchen1217
累計已有技能
- React.js
- HTML
- CSS
- PHP
- Laravel
- 網站伺服器根目錄指向 public 目錄
- storage 和 bootstrap/cache 目錄中的目錄必須讓伺服器有寫入權限
- 建立mysql
- 使用資料夾內的 setup.sql
- 將 .env.example 複製為 .env
- 修改.env內的mysql連線資訊
- composer install
- php artisan key:generate
- php artisan migrate
- php artisan passport:install 並記住產出之
Client ID: 2
Client secret: ********
- 複製進前端 config.json
- 資料庫內users資料表執行
INSERT INTO `users` (`id`, `account`, `password`, `email`, `name`) VALUES
(1, '888888', '$2y$10$aijoxIHZPz9EhA8sEq992OsFcEB/znl21BS5ft35/0zXKjvUYxprS', 'swchen1217@gmail.com', 'SWC');
- success
- boolean
- working or not
-
password
- grant_type
- string
- type of the OAuth
- Use
password
in the FIOS Frontend
- client_id
- string
- id of the client
- client_secret
- string
- secret of the client
- username
- string
- account of the user
- When
grant_type
ispassword
- password
- string
- password of the user
- When
grant_type
ispassword
- grant_type
-
refresh_token
- grant_type
- string
- type of the OAuth
- Use
refresh_token
in the FIOS Frontend
- client_id
- string
- id of the client
- client_secret
- string
- secret of the client
- refresh_token
- string
- grant_type
- token_type
- expires_in
access_token
- access_token
- expires
3 Hours
- expires
- refresh_token
- expires
1 Day
- expires
- error
- Username or Password Error
- error
- invalid_client
- id
- string
- id of the user
- account
- string
- username of the user
- name
- string
- name of the user
- email
- string
- email of the user
- timestamp
- datetime
- roles
- array
- role name of the user
- rememberme (optional)
- boolean
- 預設為
false
,若為true
時,則refresh_token
將不被刪除
Column | Type | Modifier | Comment |
---|---|---|---|
id | INT | UNSIGNED, NOT NULL, AUTO_INCREMENT | |
account | VARCHAR(60) | NOT NULL | |
name | VARCHAR | NOT NULL | |
NOT NULL | |||
created_at | TIMESTAMP | NOT NULL, DEFAULT CURRENT_TIMESTAMP | |
updated_at | TIMESTAMP | NOT NULL, DEFAULT CURRENT_TIMESTAMP |
PRIMARY (id) UNIQUE (account) UNIQUE (email)
Column | Type | Modifier | Comment |
---|---|---|---|
id | INT | UNSIGNED, NOT NULL, AUTO_INCREMENT | |
license_plate | VARCHAR | NOT NULL | |
owner_user_id | INT | NOT NULL,UNSIGNED | |
status | VARCHAR | NOT NULL | |
company_id | NOT NULL | ||
created_at | TIMESTAMP | NOT NULL, DEFAULT CURRENT_TIMESTAMP | |
updated_at | TIMESTAMP | NOT NULL, DEFAULT CURRENT_TIMESTAMP |
PRIMARY (id) FOREIGN KEY (owner_user_id) REFERENCES users(id) ON DELETE CASCADE
Column | Type | Modifier | Comment |
---|---|---|---|
id | INT | UNSIGNED, NOT NULL, AUTO_INCREMENT | |
car_id | INT | NOT NULL,UNSIGNED | |
status | VARCHAR | NOT NULL | |
created_at | TIMESTAMP | NOT NULL, DEFAULT CURRENT_TIMESTAMP | |
updated_at | TIMESTAMP | NOT NULL, DEFAULT CURRENT_TIMESTAMP |
PRIMARY (id) FOREIGN KEY (car_id) REFERENCES cars(id) ON DELETE CASCADE
Column | Type | Modifier | Comment |
---|---|---|---|
id | INT | UNSIGNED, NOT NULL, AUTO_INCREMENT | |
name | VARCHAR | NOT NULL | |
created_at | TIMESTAMP | NOT NULL, DEFAULT CURRENT_TIMESTAMP | |
updated_at | TIMESTAMP | NOT NULL, DEFAULT CURRENT_TIMESTAMP |
- SuperAdmin
- OfficeManager
- Driver