add apply by server mode
This commit is contained in:
parent
007a832032
commit
8460b7941c
1 changed files with 30 additions and 4 deletions
|
|
@ -922,17 +922,30 @@
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
; Debug
|
; Debug
|
||||||
Var XMLProfile = XMLProfile + "-EnableXMLProfile"
|
; Var XMLProfile = XMLProfile + "-EnableXMLProfile"
|
||||||
|
|
||||||
; Init read if XMLProfile contains this mode
|
; Init read if XMLProfile contains this mode
|
||||||
;
|
;
|
||||||
STRCONTAIN "EnableXMLProfile" XMLProfile EnableJsonProfileMode
|
; STRCONTAIN "EnableXMLProfile" XMLProfile EnableJsonProfileMode
|
||||||
|
|
||||||
If EnableJsonProfileMode = "true" Then
|
If EnableJsonProfileMode = "true" Then
|
||||||
|
|
||||||
|
Var IsServerProfileApplyMode = ""
|
||||||
|
|
||||||
|
; get local enabled profiles
|
||||||
ReadProfile "ROOT/xmlprofile/main.json" "XMLProfileFromJson"
|
ReadProfile "ROOT/xmlprofile/main.json" "XMLProfileFromJson"
|
||||||
DEBUGVAR XMLProfileFromJson
|
DEBUGVAR XMLProfileFromJson
|
||||||
|
|
||||||
|
; finalize applied profiles
|
||||||
|
; apply profiles by diff server profile to local
|
||||||
|
; insert "Ignore" if don't want to compare to server
|
||||||
|
CompareJsonProfileToServerProfile
|
||||||
|
; XMLProfile must contain at least 1 profile to make this `IsServerProfileApplyMode` to not be "Ignore"
|
||||||
|
DEBUGVAR IsServerProfileApplyMode
|
||||||
|
; If server does not has profile, this will apply all of the local enabled profiles.
|
||||||
|
ApplyServerProfile "XMLProfileFromJson" IsServerProfileApplyMode
|
||||||
|
|
||||||
|
; final profile
|
||||||
STRCONTAIN "y18IDCardLive" XMLProfileFromJson Y18IDCARDLIVE_ENABLE
|
STRCONTAIN "y18IDCardLive" XMLProfileFromJson Y18IDCARDLIVE_ENABLE
|
||||||
STRCONTAIN "y18IDCard" XMLProfileFromJson Y18IDCARD_ENABLE
|
STRCONTAIN "y18IDCard" XMLProfileFromJson Y18IDCARD_ENABLE
|
||||||
|
|
||||||
|
|
@ -1411,8 +1424,21 @@
|
||||||
|
|
||||||
Var web_app_prepar = "true"
|
Var web_app_prepar = "true"
|
||||||
|
|
||||||
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
|
; Handle penetrator
|
||||||
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_payment.xml"
|
|
||||||
|
If EnableJsonProfileMode = "true" Then
|
||||||
|
If Only18 = "true" Then
|
||||||
|
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
|
||||||
|
OpenInst 2 "ROOT/taobin_project/xml/page_identity18_verification.xml"
|
||||||
|
Else
|
||||||
|
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
|
||||||
|
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_payment.xml"
|
||||||
|
EndIf
|
||||||
|
Else
|
||||||
|
OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml"
|
||||||
|
OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_payment.xml"
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
|
||||||
TopView "show"
|
TopView "show"
|
||||||
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
|
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue