@@ -254,6 +254,7 @@ def get_embed(self, with_valid=True, params=None):
254254 # 获取接入的query参数
255255 query = self .get_query_api_input (application_access_token .application , params )
256256 float_location = {"x" : {"type" : "right" , "value" : 0 }, "y" : {"type" : "bottom" , "value" : 30 }}
257+ header_font_color = "rgb(100, 106, 115)"
257258 application_setting_model = DBModelManage .get_model ('application_setting' )
258259 if application_setting_model is not None and X_PACK_LICENSE_IS_VALID :
259260 application_setting = QuerySet (application_setting_model ).filter (
@@ -265,6 +266,9 @@ def get_embed(self, with_valid=True, params=None):
265266 show_guide = 'true' if application_setting .show_guide else 'false'
266267 if application_setting .float_location is not None :
267268 float_location = application_setting .float_location
269+ if application_setting .custom_theme is not None and len (
270+ application_setting .custom_theme .get ('header_font_color' , 'rgb(100, 106, 115)' )) > 0 :
271+ header_font_color = application_setting .custom_theme .get ('header_font_color' , 'rgb(100, 106, 115)' )
268272
269273 is_auth = 'true' if application_access_token is not None and application_access_token .is_active else 'false'
270274 t = Template (content )
@@ -283,7 +287,8 @@ def get_embed(self, with_valid=True, params=None):
283287 'x_value' : float_location .get ('x' , {}).get ('value' , 0 ),
284288 'y_type' : float_location .get ('y' , {}).get ('type' , 'bottom' ),
285289 'y_value' : float_location .get ('y' , {}).get ('value' , 30 ),
286- 'max_kb_id' : str (uuid .uuid1 ()).replace ('-' , '' )}))
290+ 'max_kb_id' : str (uuid .uuid1 ()).replace ('-' , '' ),
291+ 'header_font_color' : header_font_color }))
287292 response = HttpResponse (s , status = 200 , headers = {'Content-Type' : 'text/javascript' })
288293 return response
289294
0 commit comments