Skip to content

Commit f5c0908

Browse files
committed
ui
1 parent 2fa3ec7 commit f5c0908

File tree

4 files changed

+35
-6
lines changed

4 files changed

+35
-6
lines changed

ProjectConfig/Script/AppInfo/AppInfo.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,9 @@ def CopyAppInfo(self,isHd,chanel=""):
869869

870870
def updateName(self,isHd,isAuto,chanel=""):
871871
data = self.loadJson(isHd,True)
872+
873+
self.AddChannelInfo(isHd,chanel)
874+
872875
name = mainAppInfo.GetAppStoreAcount(isHd,Source.HUAWEI)
873876
mainHuaweiAppGalleryApi.ClientId = mainAppStoreAcount.GetClientId(Source.HUAWEI,name)
874877
mainHuaweiAppGalleryApi.ClientSecret = mainAppStoreAcount.GetClientSecret(Source.HUAWEI,name)
@@ -1050,6 +1053,31 @@ def Copy(self,isHd,channel=""):
10501053
# self.CopyAppInfo(False,channel)
10511054
self.CopyAppInfo(isHd,channel)
10521055

1056+
1057+
def AddChannelInfo(self,isHd,channel):
1058+
if len(channel)==0:
1059+
return
1060+
jsonfile = self.GetJsonFile(isHd)
1061+
data = self.loadJson(isHd,False)
1062+
appversion = data["appversion"]
1063+
print("AddChannelInfo channel=",channel)
1064+
if channel in appversion:
1065+
return
1066+
1067+
# do add
1068+
# "ios": {
1069+
# "code": "103",
1070+
# "value": "1.0.3"
1071+
# }
1072+
item= json.loads("{}")
1073+
item["code"]="100"
1074+
item["value"]="1.0.0"
1075+
appversion[channel] =item
1076+
1077+
JsonUtil.SaveJson(jsonfile,data)
1078+
data = self.loadJson(isHd,True)
1079+
1080+
10531081
# 主函数的实现
10541082
def Run(self,is_auto_plus_version,channel=""):
10551083

@@ -1080,7 +1108,7 @@ def Run(self,is_auto_plus_version,channel=""):
10801108
if flag:
10811109
os.rename(src,dst)
10821110

1083-
1111+
10841112

10851113
# channel = ""
10861114
# channel = Source.HUAWEI
432 Bytes
Binary file not shown.

ProjectConfig/Script/AppStore/AppVersionTapTap.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def ParseVersion(self,appid):
5656
html = self.GetHtml(appid)
5757
# print(("taptap html=",html))
5858
webcmd = WebDriverCmd(self.driver)
59-
59+
version = "1.0.0"
6060
# Current Version:
6161
# 当前版本
6262
key = "//span[contains(text(),'当前版本')]"
@@ -65,12 +65,13 @@ def ParseVersion(self,appid):
6565
if not webcmd.IsElementExist(key):
6666
key = "//span[contains(text(),'Current Version')]"
6767

68-
item = webcmd.Find(key)
68+
if webcmd.IsElementExist(key):
69+
item = webcmd.Find(key)
6970
# print(("taptap item=",item.text))
7071

71-
key = "span[@class = 'info-item-content']"
72-
brother = webcmd.FindBrother(item,key)
73-
version = brother.text
72+
key = "span[@class = 'info-item-content']"
73+
brother = webcmd.FindBrother(item,key)
74+
version = brother.text
7475
print("taptap version=",version)
7576
# 关闭浏览器
7677
self.driver.quit()
25 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)