Browse Source

直播增加级别限制

abiao 4 years ago
parent
commit
c18c5009c2
1 changed files with 7 additions and 4 deletions
  1. 7 4
      app/models/live_broad.rb

+ 7 - 4
app/models/live_broad.rb

@@ -49,11 +49,14 @@ class LiveBroad < ActiveRecord::Base
           if item.length<=0
             next
           end
-          if i==0
-            str=RANK_HASH[item.to_s]
-          else
-            str=str+","+RANK_HASH[item.to_s]
+          if !RANK_HASH[item.to_s].blank?
+            if i==0
+              str=RANK_HASH[item.to_s]
+            else
+              str=str+","+RANK_HASH[item.to_s]
+            end
           end
+
           i=i+1
         end
       else