[Daily News] internship in June 2019 first half front-end development internship Daily Summary

The following is a record of June 1 this year - the daily work content June 15 author web front-end work in the company, which omitted the specific name of the project, personal, company and so on.

2019.6.3

Today tasks: a bison released a new version futures PC client, the new shortcut key setting function, the code has been submitted to a personal repository, yet pull request to initiate the request.

Known bug: When you set the shortcut keys, shortcut keys if you set a global hotkey: That is a screen shot when the boss key, open / hide the main window, if only type a key, it will produce the main process js being given, the shortcut key combination is added (two or more) function normally. Currently this problem has not been considered in the investigation

Challenges: The main problems encountered today from bug problems mentioned before global hotkey produced, is still Settlement. Also on the recent framework is the author of the study React, though React with Vue belong JS framework, some places have sex, but I still feel React with Vue are very different, it seems to be learning efficiency is not high, or want more React to see related books to learn the knowledge, but the Chinese version of the book describes React seems to have few

Tomorrow's plan: Learn React basis by several elementary Demo

 

 

 

2019.6.4

Tasks completed today: Today React Continue reading the relevant books, learn JSX grammar, but also learned knowledge by reading books HTML5 and CSS3, another indicator pop start thinking of writing

Problems encountered: a start I think stockcharts plug-in package is a pop event, but also looking for a long time in the documentation and source code inside, the results did not join the original stockcharts pop event, that is to say to myself to write pop, the main event is a trigger pop is a more troublesome problem, I found the source by reference stockcharts except for some use knowledge React outside the framework do not understand, in fact, found a large number of operations when such events to display its source code in solving click the dom node, using the native method to get the document document dom node series of operations, I think although doing so for vue projects not so elegant but considering stockcharts originally such a deal, the code has already been well encapsulates all not a bad idea to do so. So now the idea is to get the dom node associated button and listen for the click event to control displays popups. Dom in access nodes particular: due to the specific aspects of the buttons and labels do not provide class id, the name of the parent node and the presence of a unique class attribute, and therefore considered by acquiring dom parent node, and then using the child node array function takes dom listening operations to obtain a corresponding manner at the subject node dom

Tomorrow's plan: the completion of the preliminary design pop indicators

 

 

 

2019.6.5

Today tasks: basically completed index futures pop function bison clients, while access to dom node API has some new understanding

Challenges: After the major problems encountered today is changing the size of the window (minimize this except) the original function monitor indicators disappear, and then click the metric that is no more popups appeared. After re-code Observation I found that the reason is because the corresponding K-line graph will redraw operation after changing the size of the window, the redraw operation which means that the dom node is initialized, which leads to the indicators monitor function will fail, so I redraw after the K-line diagram increased $ emit function to redraw signal is sent to the parent component, to rejoin the event after listening to the signal received by the parent component, this will solve the problem

Tomorrow's plan: improving indicators pop design

 

 

 

2019.6.6

Today tasks: basically completed index futures bison pop function client

Problems encountered: the current client index futures bison pop function there are two problems: one is after switching the symbol, if you switch to the chart does not show K (where K-line does not show clearly exist for why some symbol data Figure doubt exists), then after switching to place K line graph, originally added to the index click binding disappear;? Another problem is the more strange store index data as chart-panel established to function data the data vuex after restarting the program would become an empty array of

Measures to address: the first question is that the current need to figure out why some have a symbol data K line chart does not show, so as to solve this problem, the second question is the issue needs further investigation

Tomorrow's plan: improving indicators pop design

 

 

2019.6.10

Today tasks: the completion of the persistence and index data in different parameters Symbol of bison index futures client independent display

Challenges: Today, when modifying the function bison index futures, because to achieve lasting set of indicators of users, and also makes the indicators under different symbol display independence, so I consider before setting function inside the reference in vuex data written to persistent ideas set persistence indicator, i.e., arranged in two arrays vuex, the storage element object type, the object has two properties, a symbol is used to identify different data, the other one is a EMA, the SMA parameter settings; a further similar array and the first array, only elements attributes can be replaced by the parameters such as EMA RSI, MACD and other indicators FIG. Originally the idea is quite simple and can be solved, but as the author when writing vuex is a direct copy persistence wording setting file, so when rewriting vuex's made a huge mistake: the following figure, the author in the initialization state in when these two arrays with a first writing error is written in the masLists dividerIndicators {} and the object type, it is equivalent to writing after forcibly converted into object types from the array type, resulting in a large number of code determination logic problem ---- also difficult to debug the root cause is here.

Measures to solve: So the coding is still to be especially careful, especially for JS this type of dynamic language, itself, there are implicit automatic data type conversion, and sometimes even if you assign the wrong type of data system did not any tips, but in the actual operation of the properties and methods inconsistent with the expected data type would be an error, this time from the investigation questions need to look at before is not because of the type of data have been caused by conversion, so you can faster troubleshooting

Tomorrow's plan: Write new project page

 

 

 

2019.6.11

Today task: fix the problem after then switch back after switching to Symbol None K-line diagram of the K-line diagram there have indicators Click indicators of failure, modify the bison futures clients among some of the fonts, color display to make it more in line with the relevant theme color

Challenges: Although the author of the above fixes bug, but the solution is still not ideal, as follows: I joined the $ emit function in stockchart assembly redraw function, when the K-line diagram will be rendered issued emit signals emitted rendered to the parent component ChartPanel, click ChartPanel indicator of listening event will be triggered after receiving the notice, so that we can make a click event because the index does not redraw the map of the K line and lost, but this do a larger increase in the program run alternation performance overhead because renderChart function almost have to run several times every second (K line chart plotting the data has been refreshed), which was the case after the throttling process, which the click means CHartPanel listening function needs to continue operating, but its operation is performed by operating dom node, so this solves the problem but the performance of excessive consumption, which in this case again for $ emit function perform throttled operation has little significance (mainly because triggers the click function is to re-applied to index symbol after handover cl ick event exists, is likely to cause the throttle again click event listener is not timely)

Measures to address: the currently exploring better ways to add a click event indicators

Tomorrow's plan: ready to write a new project

 

 

 

2019.6.12

Today task: to join the opening five-speed five-speed price information coming from the background of the interface display, modify their style in different themes display

遇到的问题:今天在看了家维写的一篇博客之后感触颇深:http://blog.bbnwork.top/2019/03/08/%E5%88%B0%E5%BA%95%E4%BB%80%E4%B9%88%E6%98%AF%E8%AF%AD%E5%8F%A5%E5%92%8C%E8%A1%A8%E8%BE%BE%E5%BC%8F/ 题目是 “到底什么是语句和表达式?” 文章对语句和表达式的联系和区别作了很深入的阐述和研究,令人深思,但是令笔者更加感慨的是最后这个设想:如果用“->”“<-”来代替程序设计中的赋值符号“=”的话,其实更加贴近“赋值”的意思,而由于我们长期受到数学当中的“=”的影响,实际上一开始接触程序设计语言中的赋值符号“=”是需要时间接受的(好在高中数学书就有讲区别于一般算式运算符的等于号的赋值符号“=”)。而且使用“->”“<-”来进行语句的赋值操作的话还可以使被赋值的变量不仅仅可以存在于“=”的左边,还可以存在于“=”的右边。但是如果是在解放了“=”符号之后,把“=”当作现在的“==”来使用可能并不合适,因为“==”本来就和数学中的“=”有一定区别,数学中的“=”其实是一种关系,代表的是等式的两边是等价的,而程序中的“==”是一种判断的关系,它是用来判断其两边的数据是否相等的,所以笔者认为“==”还是维持现状更好。

但是如果是这样的话那么“=”就无用武之地了,而且“->”“<-”已经被C/C++拿来作为指针操作符号而存在了,这或许也是“=”作为赋值符号的原因之一吧。

明天的规划:准备编写新的项目

 

 

 

2019.6.13

今天完成的任务:优化了五档行情的推送(使用节流的方法)

遇到的问题:今天遇到的主要问题是关于不同的合约(symbol)下应该订阅相应的五档行情的问题,按照正常处理来说,在打开一个新的合约之后,应该吧旧合约(如果有的话)的五档行情订阅取消,再进行新的合约的五档行情订阅,在之前由于后台没有对取消订阅进行具体处理,所以这边一旦订阅了某个合约的五档数据(如果有的话)就会一直持续不断的推送的前端来,在后台还没有解决此问题之前,笔者也觉得前端可以自行判断不同合约下的不同五档行情数据显示,但实际却无法很好的解决此问题,如下图,在加入了对data的symbol判断之后还是无法限制不同的symbol显示不同的五档行情问题,这是一个比较奇怪的问题。另外是关于五档行情的显示的问题,五档行情推送到前端的频率非常高,一秒钟可以达到几十次,如果正常的显示在前端会有抖动的情况产生,这里利用节流的办法可以较好的解决该问题,解决之后可以使得买盘五档的行情1s刷新一次。 关于防抖和节流的例子,这篇博客写的很好: https://www.cnblogs.com/walls/p/6399837.html

明天的规划:准备编写新的项目

 

 

 

2019.6.14 今天完成的任务:开始编写经纪商管理系统的前端静态页面,完成了部分页面的显示

遇到的问题:1 由于对git的工作流程的不熟悉导致的问题:在笔者之前切换到demo分支之后,在demo分支上进行了代码的修改,实际上是不应该的,因为在demo分支上修改了代码是不方便合并到develop分支上面的————develop分支的图标和demo分支不同,而在develop分支中合并demo分支的代码会导致develop中的标题和图标等信息合并。正确的做法应该是只在develop中进行代码修改,再将改动合并到demo中。 当然,如果在进行了错误的代码合并之后,我们也可以利用git reset命令回滚到之前已经commit过的版本

2 最新的野牛期货客户端出现一个奇怪的问题:在部分电脑上运行程序会直接黑屏——而在其前几个版本中并没有出现这样的问题,最迟到快捷键模块发布之前都没有出现此类问题。而按照一般理解来说,只有对快捷键的开发时才对main进程中的代码有所改动才可能导致黑屏的问题,但是在之前的快捷键设置以及开发好的版本中是没有黑屏的问题的,因此这个问题还需要慢慢排查

明天的规划:继续经纪商管理系统的开发

 

发布了24 篇原创文章 · 获赞 20 · 访问量 3万+

Guess you like

Origin blog.csdn.net/a715167986/article/details/99421957
Recommended