Skip to content

Commit 2d8104c

Browse files
committed
ui
1 parent b176177 commit 2d8104c

File tree

12 files changed

+98
-199
lines changed

12 files changed

+98
-199
lines changed

.DS_Store

0 Bytes
Binary file not shown.

ProjectConfig/.DS_Store

0 Bytes
Binary file not shown.

ProjectConfig/CmdDefault/.DS_Store

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
#! /bin/sh
3+
# 脚本文件的绝对路径存在了环境变量filepath中,可以用
4+
filepath=$(cd "$(dirname "$0")"; pwd)
5+
6+
# VMware 虚拟机共享目录里路径带空格 需要转换处理
7+
str1=$filepath
8+
str2="VMware"
9+
if [[ $str1 =~ $str2 ]]
10+
then
11+
echo "包含"
12+
#去除带空格的路径
13+
#filepath=${filepath// /\\ }
14+
filepath=${filepath#/Volumes/VMware Shared Folders/}
15+
cd /Volumes/VMware\ Shared\ Folders
16+
else
17+
echo "不包含"
18+
fi
19+
20+
21+
echo $filepath
22+
cd $filepath
23+
cd ../../../../../../../Common/PythonUnity/ProjectConfig/Script
24+
python3 ProjectManager.py $filepath CopyConfig
25+
26+
if [[ $str1 =~ $str2 ]]
27+
then
28+
cd /Volumes/VMware\ Shared\ Folders
29+
else
30+
echo "不包含"
31+
fi
32+
33+
cd $filepath
34+
cd ../../../../../../../Common/PythonUnity/ProjectConfig/Script
35+
python3 AdManager.py $filepath createplaceid android gdt hd
36+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
#! /bin/sh
3+
# 脚本文件的绝对路径存在了环境变量filepath中,可以用
4+
filepath=$(cd "$(dirname "$0")"; pwd)
5+
6+
# VMware 虚拟机共享目录里路径带空格 需要转换处理
7+
str1=$filepath
8+
str2="VMware"
9+
if [[ $str1 =~ $str2 ]]
10+
then
11+
echo "包含"
12+
#去除带空格的路径
13+
#filepath=${filepath// /\\ }
14+
filepath=${filepath#/Volumes/VMware Shared Folders/}
15+
cd /Volumes/VMware\ Shared\ Folders
16+
else
17+
echo "不包含"
18+
fi
19+
20+
21+
echo $filepath
22+
cd $filepath
23+
cd ../../../../../../../Common/PythonUnity/ProjectConfig/Script
24+
python3 ProjectManager.py $filepath CopyConfig
25+
26+
if [[ $str1 =~ $str2 ]]
27+
then
28+
cd /Volumes/VMware\ Shared\ Folders
29+
else
30+
echo "不包含"
31+
fi
32+
33+
cd $filepath
34+
cd ../../../../../../../Common/PythonUnity/ProjectConfig/Script
35+
python3 AdManager.py $filepath adinfo android gdt hd
36+

ProjectConfig/Script/Ad/AdGdt.py

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,12 @@ def ParseAdInfo(self,ishd):
454454
for tr in list:
455455
# 横幅
456456
if self.adIdBanner == "0":
457-
self.adIdBanner = self.GetAdId(tr, "Banner2.0")
457+
self.adIdBanner = self.GetAdId(tr, "Banner")
458458
# print("Banner 0:", self.adIdBanner)
459459

460460
# 插屏
461461
if self.adIdInsert == "0":
462-
self.adIdInsert = self.GetAdId(tr, "插屏2.0")
462+
self.adIdInsert = self.GetAdId(tr, "插屏")
463463

464464
# 激励视频
465465
if self.adIdVideo == "0":
@@ -694,6 +694,17 @@ def CreateAdVideo(self, isHD):
694694
webcmd.AddCmdList(CmdType.CLICK_Action, key,2,2)
695695
webcmd.Run(True)
696696

697+
# 广告样式
698+
# <p class="title">竖屏: 9:16 / 16:9 视频</p>
699+
if isHD:
700+
key = "//p[@class='title' and contains(text(),'横屏')]"
701+
else:
702+
key = "//p[@class='title' and contains(text(),'竖屏')]"
703+
item = webcmd.Find(key,False)
704+
item_div = webcmd.GetParent(item)
705+
webcmd.DoCmd(item_div,CmdType.CLICK)
706+
707+
697708
# item = self.driver.find_element(By.XPATH, "//input[@class='spaui-input has-normal spaui-component']")
698709
list = self.driver.find_elements(By.XPATH, "//input[@type='text']")
699710
# self.driver.execute_script("arguments[0].scrollIntoView();", item)
@@ -735,14 +746,21 @@ def Run(self,type, os,isHD):
735746
self.CreateApp(True)
736747

737748
if type == "createplaceid":
738-
self.CreatePlaceId(False)
739-
time.sleep(3)
740-
self.CreatePlaceId(True)
749+
if isHD:
750+
self.CreatePlaceId(True)
751+
else:
752+
self.CreatePlaceId(False)
753+
time.sleep(3)
754+
self.CreatePlaceId(True)
741755

742756
if type == "adinfo":
743-
self.GetAdInfo(False)
744-
time.sleep(3)
745-
self.GetAdInfo(True)
757+
if isHD:
758+
self.GetAdInfo(True)
759+
else:
760+
self.GetAdInfo(False)
761+
time.sleep(3)
762+
self.GetAdInfo(True)
763+
746764

747765
print("AdGdt sucess")
748766

ProjectConfig/Script/Ad/ParseAdGdt.py

Lines changed: 0 additions & 191 deletions
This file was deleted.

0 commit comments

Comments
 (0)