這周就開始實戰(zhàn)做前端
主要就是angularjs制作前端頁面以及調(diào)用后臺接口實現(xiàn)登錄登出蟆湖,圖標(biāo)顯示三痰,列表顯示威蕉,excel導(dǎo)出等功能。
1.js擺放位置
2.跨域問題相關(guān),最后選擇修改nginx配置實現(xiàn)跨域
了解各種跨域解決方案橄仍,jsonp只能get請求韧涨,fetch,jquery侮繁,還有postMessage虑粥,還有服務(wù)端配置。(postMessage主要是通過iframe訪問與請求Api同域的可訪問頁面宪哩,然后通過那個頁面來進(jìn)行ajax請求)
1)服務(wù)端nginx解決跨域
https://enable-cors.org/
https://enable-cors.org/server_nginx.html
2)跨域相關(guān)知識
3.localstorage.setItem("鍵",”值");

前端使用localstorage實現(xiàn)賬戶的記錄以及token的記錄娩贷,用于后面頁面的判斷顯示,以及退出操作锁孟。
4. git修改之前的commit內(nèi)容(沒push)
git commit --amend 可以對上一次的提交做修改
push -f 如果上一次的提交已經(jīng)push了彬祖,那么需要加f參數(shù)覆蓋服務(wù)端,不過不建議這么搞
5.CSS的:nth-child(an+b) 選擇器使用
:nth-child(an+b) 這個 CSS 偽類匹配文檔樹中在其之前具有 an+b-1 個兄弟節(jié)點的元素品抽,其中 n 為正值或零值储笑。簡單點說就是,這個選擇器匹配那些在同系列兄弟節(jié)點中的位置與模式 an+b 匹配的元素圆恤。
.personManage-search-div input:nth-child(1) {width: 338px;height: 28px;}
.personManage-search-div input:nth-child(2) {width: 164px;height: 28px;}
.personManage-search-div select:nth-child(3) { width: 115px;height: 28px;}
.personManage-search-div select:nth-child(4) {width: 115px;height: 28px;}
.personManage-search-div select:nth-child(5) {width: 115px;height: 28px;

6.Angularjs根據(jù)表格導(dǎo)出EXCEL
7.springboot
http://412887952-qq-com.iteye.com/?page=11
websocket:
- spring官網(wǎng)文檔:websocket部分
http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html - 博客園里的一個帖子
http://www.cnblogs.com/bianzy/p/5822426.html - github里一個代碼實現(xiàn)的例程
https://github.com/lenve/JavaEETest/tree/master/Test20-WebSocket
8.Angular1路由替代品ui-router
由于要使用路由嵌套突倍,所以內(nèi)置的路由無法滿足要求。使用ui-router可以解決
github:https://github.com/angular-ui/ui-router
官方文檔(angular1 ui-router):https://ui-router.github.io/ng1/
路由嵌套:https://yq.aliyun.com/articles/59333
9.域名解析相關(guān)
不要隨便改解析,尤其是A記錄
https://www.aliyun.com/zixun/content/6_18_205902.html