当前位置:网站首页>How to solve the problem that the ID is not displayed when easycvr edits the national standard channel?

How to solve the problem that the ID is not displayed when easycvr edits the national standard channel?

2022-06-23 20:40:00 Tsingsee green rhino video

Video fusion cloud service platform EasyCVR There is no need to adjust the existing monitoring architecture , Support CDN Push flow , Flexible to adapt to the original architecture ; And flexible expansion on demand 、 Shrinking resources , No plug-in installation 、 Browser restrictions, etc , No plug-ins are implemented 、 Multi platform free viewing playback . Besides , We will also pay attention to... From time to time EasyCVR Adjust and add the original functions of , To meet the needs of different users or projects .

In the new version EasyCVR When testing , Edit the national standard channel in equipment management , Find out id It doesn't show , View the data returned by the backend interface , Find the data returned from the interface , The channel is missing id Field of .

Add the following code , When the front end passes in the channel device number to the back end , Back end to judge , If it is a national standard type , Here will be the corresponding equipment id Return to the interface called by the front end .

for _, value := range *channels {
       if value.ChannelType == cvrdo.TypeGB() {
              gbschannels := make([]*models.Channel, 0)
              q := db.SQLite.Model(models.Channel{}).Where("`index`= ?", value.ChannelID)
              q.Find(&gbschannels)
              if len(gbschannels) != 1 {
                     continue
              }
              // Under the equipment channel [ name ][ Enable ][ On-line ][ videotape ][ Audio ][ On demand ] Field conversion 
              //[ On-line ]
              if gbschannels[0].Online() {
                     value.Online = 1
              } else {
                     value.Online = 0
              }

Look again , When editing a device channel , GB type channel id Everything is all right .

As TSINGSEE Green rhino video is a platform with a wide range of access protocols ,EasyCVR Has been expanding related functions such as intelligent analysis , Among them, face recognition function and traffic statistics function have been applied in some projects , Soon traffic statistics 、 License plate recognition and other functions will also be online .

原网站

版权声明
本文为[Tsingsee green rhino video]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/12/202112291744197757.html