Skip to content

Commit 01a2279

Browse files
committed
ui
1 parent 75a573a commit 01a2279

17 files changed

+571
-71
lines changed

.DS_Store

0 Bytes
Binary file not shown.

Docs/.DS_Store

0 Bytes
Binary file not shown.

ProjectConfig/Script/AppStore/AppStoreApple.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def FillAppPrice(self, isHD):
448448
webcmd.Run(True)
449449

450450

451-
key = "//option[contains(text(),'CNY 0.00')]"
451+
key = "//option[contains(text(),'CNY 0.0')]"
452452
webcmd.AddCmdWait(CmdType.CLICK, key)
453453
webcmd.Run(True)
454454

@@ -460,25 +460,7 @@ def FillAppPrice(self, isHD):
460460

461461
def FillAppInfo(self, isHD):
462462
appid = mainAppInfo.GetAppId(isHD, Source.APPSTORE)
463-
webcmd = WebDriverCmd(self.driver)
464-
465-
# App 隐私
466-
try:
467-
self.FillAppPrivacy(isHD)
468-
except Exception as e:
469-
print("FillAppPrivacy eror=",e)
470-
471-
try:
472-
self.FillAppPrice(isHD)
473-
except Exception as e:
474-
print("FillAppPrice eror=",e)
475-
476-
try:
477-
self.FillAppInfo2(isHD)
478-
except Exception as e:
479-
print("FillAppInfo2 eror=",e)
480-
481-
463+
webcmd = WebDriverCmd(self.driver)
482464
# base appinfo
483465

484466
url = "https://appstoreconnect.apple.com/apps/"+appid+"/appstore/ios/version/inflight"
@@ -525,6 +507,24 @@ def FillAppInfo(self, isHD):
525507
webcmd.Run(True)
526508

527509

510+
511+
# App 隐私
512+
try:
513+
self.FillAppPrivacy(isHD)
514+
except Exception as e:
515+
print("FillAppPrivacy eror=",e)
516+
517+
518+
try:
519+
self.FillAppInfo2(isHD)
520+
except Exception as e:
521+
print("FillAppInfo2 eror=",e)
522+
523+
try:
524+
self.FillAppPrice(isHD)
525+
except Exception as e:
526+
print("FillAppPrice eror=",e)
527+
528528

529529
# try:
530530
# App 信息

ProjectConfig/Script/AppStore/AppStoreTaptap.py

Lines changed: 175 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,59 @@ def GoHome(self, isHD, login):
8181
def Login(self, user, password):
8282
self.urlold = self.driver.current_url
8383
print("Login urlold=", self.urlold)
84-
self.LoginQQ(user, password)
85-
# self.SaveCookie(self.fileCookie)
84+
webcmd = WebDriverCmd(self.driver)
85+
86+
# <span data-v-5bf2336f="">创建游戏</span>
87+
# key = "//span[contains(text(),上传APK)]"
88+
# <input class="checkbox phone-login__check" type="checkbox" name="read" id="is-agree-login-or-register">
89+
# key = "//input[@id='is-agree-login-or-register']"
90+
key = "//label[@for='is-agree-login-or-register']"
91+
# item = webcmd.Find(key,True)
92+
# if item is not None:
93+
# print("find agree-login-or-register")
94+
# webcmd.DoCmd(item,CmdType.CLICK_SCRIPT)
95+
96+
97+
98+
# 等待选择qq
99+
while True:
100+
time.sleep(1)
101+
self.urlnew = self.driver.current_url
102+
print("select qq urlnew=", self.urlnew)
103+
if self.urlnew != self.urlold:
104+
print("select qq Finish =", self.urlnew)
105+
break
106+
107+
# webcmd.WaitKeyBoard("q")
108+
109+
110+
# # 选择 qq登陆
111+
# key = "//a[@data-social-provider='qq']"
112+
# webcmd.AddCmd(CmdType.CLICK_SCRIPT,key)
113+
# webcmd.Run(True)
114+
115+
116+
# # global-tip-modal-1791e1fb5e2
117+
# key = "//section[contains(@id,'global-tip-modal-')]"
118+
# section = webcmd.Find(key,True)
119+
120+
# key = ".//button[@class='btn btn-primary' and @data-default-text='确定']"
121+
# item = webcmd.FindChild(section,key,False)
122+
# if item is not None:
123+
# print("find button 确定")
124+
# webcmd.DoCmd(item,CmdType.CLICK)
125+
# # <button class="btn btn-primary" data-default-text="确定">确定</button>
126+
127+
# # 等待勾选
128+
# webcmd.WaitKeyBoard("q")
129+
130+
# time.sleep(2)
131+
132+
133+
134+
135+
self.urlold = self.driver.current_url
136+
self.LoginQQ(user, password)
86137

87138
# 等待登录成功
88139
while True:
@@ -352,35 +403,138 @@ def UploadScreenShot(self, webcmd,isHD,lan,applan):
352403
item = webcmd.FindChild(item_root,key,True)
353404

354405
def CreateApp(self, isHD):
355-
url = "https://www.taptap.com/developer/app-create/14628"
406+
appid = mainAppInfo.GetAppId(isHD, Source.TAPTAP)
407+
if len(appid)>1:
408+
self.FillAppInfo(isHD,appid)
409+
return
410+
411+
# url = "https://www.taptap.com/developer/app-create/14628"
412+
url = "https://developer.taptap.com/14628/create-app"
356413
self.driver.get(url)
357414
time.sleep(1)
358-
self.UpLoadApk(isHD)
415+
webcmd = WebDriverCmd(self.driver)
416+
417+
# <span data-v-5bf2336f="">创建游戏</span>
418+
# key = "//span[contains(text(),上传APK)]"
419+
# key = "//span[text()='创建游戏']"
420+
# item = webcmd.Find(key,True)
421+
422+
423+
# name
424+
# <input data-v-194bf4a0="" type="text" maxlength="50" class="ant-input ant-input-lg">
425+
name = self.GetAppName(isHD, Source.LANGUAGE_CN,Source.TAPTAP)
426+
print(name)
427+
428+
print("\r\n")
429+
print("\r\n")
430+
431+
432+
detail = self.GetAppDetail(isHD, Source.LANGUAGE_CN)
433+
print(detail)
434+
435+
key = "//input[@class='ant-input ant-input-lg']"
436+
# 等待网页加载完成
437+
item = webcmd.Find(key,True)
438+
439+
webcmd.AddCmd(CmdType.INPUT,key,name)
440+
441+
webcmd.Run(True)
442+
443+
444+
# 上传icon
445+
key = "//div[@class='tds-upload-item__operations']"
446+
webcmd.AddCmd(CmdType.CLICK,key)
447+
webcmd.Run(True)
448+
449+
# key = "//svg[@id='iconshanchu_Delete']"
450+
# # 等待
451+
# item = webcmd.Find(key,True)
452+
# webcmd.AddCmd(CmdType.CLICK,key)
453+
# webcmd.Run(True)
454+
455+
# iconyanjingzhengkai_EyeOpen1
456+
key = "//div[@class='tds-upload__icon']"
457+
# 等待
458+
item = webcmd.Find(key,True)
459+
webcmd.DoCmd(item,CmdType.CLICK)
460+
461+
# icon end
462+
463+
icon = mainResource.GetOutPutIconPathWin32( mainResource.GetProjectOutPut(), Source.TAPTAP, isHD)+"\\icon_android_512.png"
464+
print(icon)
465+
if Platform.isMacSystem():
466+
icon = icon.replace("\\","/")
467+
icon = FileUtil.GetLastDirofDir(icon)
468+
test = 0
469+
470+
# webcmd.Run(True)
471+
self.OpenFileBrowser(icon, True)
472+
time.sleep(1)
473+
474+
# self.UpLoadApk(isHD)
475+
476+
# wait save
477+
self.urlold = self.driver.current_url
478+
while True:
479+
time.sleep(1)
480+
self.urlnew = self.driver.current_url
481+
print("wait save urlnew=", self.urlnew)
482+
if self.urlnew != self.urlold:
483+
print("wait save Finish =", self.urlnew)
484+
break
485+
486+
# https://developer.taptap.com/14628/app/214597/submit-records?panel=update
487+
url = self.driver.current_url
488+
489+
490+
strfind = "app/"
491+
idx = url.find(strfind)+len(strfind)
492+
appid = url[idx:]
493+
strend = "/"
494+
idx = appid.find(strend)
495+
appid = appid[0:idx]
496+
print(appid)
497+
mainAppInfo.SetAppId(isHD, Source.ANDROID, Source.TAPTAP, appid)
359498

360499
# url = "https://www.taptap.com/developer/fill-form/14628"
361500
# self.driver.get(url)
362501
# time.sleep(1)
363502

364-
self.FillAppInfo(isHD)
503+
self.FillAppInfo(isHD,appid)
504+
505+
def FillAppInfo(self, isHD,appid):
506+
# url = "https://developer.taptap.com/14628/app/214597/update-app?panel=appInfo"
507+
url = "https://developer.taptap.com/14628/app/"+str(appid)+"/update-app?panel=appInfo"
508+
self.driver.get(url)
509+
time.sleep(1)
365510

366-
def FillAppInfo(self, isHD):
367-
368511
webcmd = WebDriverCmd(self.driver)
369512

370513
# 等待文件長傳結束
371-
key = "//a[@title='基础信息']"
514+
key = "//span[text()='游戏资料']"
372515
item = webcmd.Find(key,True)
373516

374-
# default zh_CN en_US
375-
# self.lanKeys =(self.LAN_KEY_default,self.LAN_KEY_CN, self.LAN_KEY_EN)
376-
# applans = (Source.LANGUAGE_CN,Source.LANGUAGE_CN, Source.LANGUAGE_EN)
377-
378-
# default zh_CN
379-
# self.lanKeys =(self.LAN_KEY_default,self.LAN_KEY_CN)
380-
# applans = (Source.LANGUAGE_EN,Source.LANGUAGE_CN)
517+
381518
self.lanKeys =[self.LAN_KEY_CN,self.LAN_KEY_EN]
382519
applans = [Source.LANGUAGE_CN,Source.LANGUAGE_EN]
383520

521+
detail = self.GetAppDetail(isHD, Source.LANGUAGE_CN)
522+
print(detail)
523+
524+
# <textarea data-v-b0e9536c="" class="ant-input"></textarea>
525+
key = "//textarea[@class='ant-input']"
526+
webcmd.AddCmd(CmdType.INPUT,key,detail)
527+
528+
webcmd.Run(True)
529+
530+
531+
# screenshot
532+
# key = "//div[@class='tds-upload__icon']"
533+
# # 等待
534+
# item = webcmd.Find(key,True)
535+
# webcmd.DoCmd(item,CmdType.CLICK)
536+
537+
return
384538
# addlans = ("chs","en")
385539
# addlans = ("default","chs")
386540
addlans = ["chs"]
@@ -437,40 +591,7 @@ def FillAppInfo(self, isHD):
437591
key = "//div[@id='AnchorGameData']"
438592
item_div = webcmd.Find(key)
439593

440-
# 管理多语言
441-
# key = ".//button[@class='float-r btn--edit ant-btn ant-btn-primary ant-btn-background-ghost']"
442-
# subitem = webcmd.FindChild(item_div,key)
443-
# webcmd.DoCmd(subitem,CmdType.CLICK)
444-
445-
446-
447-
# webcmd.AddCmd(CmdType.CLICK, "//a[@id='manage-trans-btn']", "", 1)
448-
# # trans-select-chs
449-
# for lan in range(0, len(addlans)):
450-
# key = "//input[@id='trans-select-"+addlans[lan]+"']"
451-
# print(key)
452-
# webcmd.AddCmd2(CmdType.CLICK, key)
453-
454-
# webcmd.AddCmd(CmdType.CLICK, "//button[@id='manage-trans-submit']", "", 1)
455-
456-
# webcmd.Run(True)
457-
458-
459-
# webcmd.AddCmd( CmdType.CLICK, "//a[@aria-controls='chs']", "", 1)
460-
# webcmd.Run(True)
461-
# key = "//input[@type='file' and @data-target='#banner_1_android-"+"cn"+"']"
462-
# key = "//input[@data-target='#banner_1_android']"
463-
# key = "//input[@data-target='#icon']"
464-
# key = "//input[@type='file' and @data-target='#icon']"
465-
# key = "//input[@type='file' and @data-target='#icon-zh_CN']"
466-
467-
# #icon
468-
# # key ="//input[@id='banner_1_android-input']"
469-
# # key ="//span[@class='fileinput-button fixed-size banner']"
470-
471-
472-
473-
594+
474595

475596

476597
for lan in range(0, len(self.lanKeys)):
@@ -693,7 +814,7 @@ def SearchApp(self, ishd):
693814
webcmd = WebDriverCmd(self.driver)
694815

695816
self.driver.get(
696-
"https://www.taptap.com/developer/dashboard/14628/apps")
817+
"https://developer.taptap.com/14628/all-app")
697818
time.sleep(2)
698819

699820
key = "//input[@class='ant-select-search__field']"
@@ -730,8 +851,12 @@ def SearchApp(self, ishd):
730851
def Run(self,type, isHD):
731852
self.Init()
732853
print("AppStoreTaptap Run isHD=",str(isHD))
854+
# try:
733855
self.GoHome(isHD, True)
734856
self.Login("651577315", "qq31415926")
857+
# except Exception as e:
858+
# print("Login eror=",e)
859+
735860

736861
if type == "createapp":
737862
self.CreateApp(isHD)
5 Bytes
Binary file not shown.
1.05 KB
Binary file not shown.

ProjectConfig/Script/CopyRight/CopyRight.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ class CopyRight():
3232

3333
# 每页不少于50行
3434
def MakeCodeDoc(self,isHd):
35+
mainAppInfo.loadJson(isHd,True)
3536
title = mainAppInfo.GetAppName(Source.ANDROID,isHd,Source.LANGUAGE_CN)+"V1.0.0"
36-
codedir = "/Users/moon/sourcecode/LearnWord"
37+
# codedir = "/Users/moon/sourcecode/LearnWord"
3738
codedir = mainResource.GetRootUnityAssets()+"/Script/Apps/"+mainResource.getGameType()
3839
# codedir = mainResource.GetRootUnityAssets()+"/Script/Apps/"+mainResource.getGameType()+"/Base"
3940
outputdir = mainResource.GetProjectOutPutApp()
@@ -50,6 +51,7 @@ def MakeCodeDoc(self,isHd):
5051

5152
# 每页不少于30行
5253
def MakeGuideDoc(self,isHd):
54+
mainAppInfo.loadJson(isHd,True)
5355
title = mainAppInfo.GetAppName(Source.ANDROID,isHd,Source.LANGUAGE_CN)+"V1.0.0"
5456
detail = mainAppInfo.GetAppDetail(isHd,Source.LANGUAGE_CN)
5557
# detail +="/n"
227 KB
Loading

ServerApp/.DS_Store

2 KB
Binary file not shown.

0 commit comments

Comments
 (0)