AUS: start adding v3
This commit is contained in:
parent
50a7c52321
commit
99323a36f7
89 changed files with 78514 additions and 3987 deletions
62
inter/aus/xml/multi/v3/event/dummy_layout_promotion.py
Normal file
62
inter/aus/xml/multi/v3/event/dummy_layout_promotion.py
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
if "v3" in param and "promotion" in param and "other_catalog" in param:
|
||||
file_template = open(directory_to_process + "/page_catalog_group_other_other.lxml", 'r')
|
||||
template_content = file_template.read()
|
||||
file_template.close()
|
||||
|
||||
pro_template = open(directory_to_process + "/event/event_v3/promotion_template.inc")
|
||||
pro_template_content = pro_template.read()
|
||||
pro_template.close()
|
||||
|
||||
all_active_pro = ""
|
||||
|
||||
files = os.listdir(directory_to_process + "/event/event_v3/catalog_other")
|
||||
files = [f for f in files if f.endswith(".json")]
|
||||
for filename in files:
|
||||
pro_json_file = open(directory_to_process + "/event/event_v3/catalog_other/"+ filename)
|
||||
pro_json = json.load(pro_json_file)
|
||||
start_time = datetime.datetime.strptime(pro_json["start"], "%Y-%m-%dT%H:%M:%S")
|
||||
end_time = datetime.datetime.strptime(pro_json["end"], "%Y-%m-%dT%H:%M:%S")
|
||||
if start_time > datetime.datetime.now() or datetime.datetime.now() < end_time:
|
||||
pro_content = str(pro_template_content)
|
||||
pro_content = pro_content.replace("#State", pro_json["state"])
|
||||
pro_content = pro_content.replace("#Type", pro_json["type"])
|
||||
pro_content = pro_content.replace("#MediaThai", pro_json["media_thai"])
|
||||
pro_content = pro_content.replace("#MediaEng", pro_json["media_eng"])
|
||||
pro_content = pro_content.replace("#EventClick", pro_json["event_click"])
|
||||
all_active_pro += pro_content + "\n\t"
|
||||
|
||||
pro_output_file = open(directory_to_process + "/event/event_v3/catalog_other/active_promotions.lxml", 'w')
|
||||
pro_output_file.write(template_content.replace(";banners", all_active_pro))
|
||||
pro_output_file.close()
|
||||
|
||||
if "v3" in param and "promotion" in param:
|
||||
file_template = open(directory_to_process + "/page_catalog_group_recommend.lxml", 'r')
|
||||
template_content = file_template.read()
|
||||
file_template.close()
|
||||
|
||||
pro_template = open(directory_to_process + "/event/event_v3/promotion_template.inc")
|
||||
pro_template_content = pro_template.read()
|
||||
pro_template.close()
|
||||
|
||||
all_active_pro = ""
|
||||
|
||||
files = os.listdir(directory_to_process + "/event/event_v3")
|
||||
files = [f for f in files if f.endswith(".json")]
|
||||
files.sort()
|
||||
for filename in files:
|
||||
pro_json_file = open(directory_to_process + "/event/event_v3/"+ filename)
|
||||
pro_json = json.load(pro_json_file)
|
||||
start_time = datetime.datetime.strptime(pro_json["start"], "%Y-%m-%dT%H:%M:%S")
|
||||
end_time = datetime.datetime.strptime(pro_json["end"], "%Y-%m-%dT%H:%M:%S")
|
||||
if start_time > datetime.datetime.now() or datetime.datetime.now() < end_time:
|
||||
pro_content = str(pro_template_content)
|
||||
pro_content = pro_content.replace("#State", pro_json["state"])
|
||||
pro_content = pro_content.replace("#Type", pro_json["type"])
|
||||
pro_content = pro_content.replace("#MediaThai", pro_json["media_thai"])
|
||||
pro_content = pro_content.replace("#MediaEng", pro_json["media_eng"])
|
||||
pro_content = pro_content.replace("#EventClick", pro_json["event_click"])
|
||||
all_active_pro += pro_content + "\n"
|
||||
|
||||
pro_output_file = open(directory_to_process + "/event/event_v3/active_promotions.lxml", 'w')
|
||||
pro_output_file.write(template_content.replace(";banners", all_active_pro))
|
||||
pro_output_file.close()
|
||||
3071
inter/aus/xml/multi/v3/event/event_v3/active_promotions.lxml
Normal file
3071
inter/aus/xml/multi/v3/event/event_v3/active_promotions.lxml
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
16
inter/aus/xml/multi/v3/event/event_v3/promotion_template.inc
Normal file
16
inter/aus/xml/multi/v3/event/event_v3/promotion_template.inc
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<Banner>
|
||||
<State> #State </State>
|
||||
<Type> #Type </Type>
|
||||
<Media>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = "#MediaEng"
|
||||
Else
|
||||
Var return = "#MediaThai"
|
||||
EndIf
|
||||
)
|
||||
</Media>
|
||||
<EventOnClick>
|
||||
#EventClick
|
||||
</EventOnClick>
|
||||
</Banner>
|
||||
22
inter/aus/xml/multi/v3/event/script_open_promotion_v3.ev
Normal file
22
inter/aus/xml/multi/v3/event/script_open_promotion_v3.ev
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
Var InstanceTabOpenFile10 = "ROOT/taobin_project/inter/aus/xml/multi/v3/event/event_v3/active_promotions.lxml"
|
||||
|
||||
Var ButtonLanguageCurrentXPosition = 1015
|
||||
Var ButtonLanguageCurrentYPosition = 458 - 38
|
||||
Var ButtonLanguageListXPosition = 990
|
||||
Var ButtonLanguageListYPosition = 450 - 38
|
||||
Var LanguageButtonEnable = "Enable"
|
||||
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
|
||||
|
||||
|
||||
OpenInst 15 "ROOT/taobin_project/inter/aus/xml/multi/tab_menu.lxml"
|
||||
|
||||
TabMenuVisibleInst 10
|
||||
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/inter/aus/xml/multi/page_instance2.xml"
|
||||
|
||||
Var Menu1Selected = "PressForever"
|
||||
|
||||
RootLayoutVisible 15 "show"
|
||||
|
||||
;Var FileRecommendToOpen = "ROOT/taobin_project/inter/aus/xml/multi/v3/event/event_v3/active_promotions.lxml"
|
||||
SAVELOG "======================================== taobin_project/inter/aus/xml/multi/v3/event/script_open_promotion_v3.ev"
|
||||
Loading…
Add table
Add a link
Reference in a new issue