Skip to content

Commit b965dec

Browse files
committed
ui
1 parent 6ed7607 commit b965dec

File tree

8 files changed

+64
-19
lines changed

8 files changed

+64
-19
lines changed

.DS_Store

0 Bytes
Binary file not shown.

Common/File/FileUtil.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import time
99
import datetime
1010
import json
11-
11+
import requests
1212

1313
from xml.dom.minidom import parse
1414
sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
@@ -277,4 +277,9 @@ def RemoveFile(filePath):
277277
if os.path.exists(filePath)==True:
278278
os.remove(filePath)
279279

280+
@staticmethod
281+
def GetUrl(url):
282+
r = requests.get(url)
283+
return r.content.decode('utf-8',"ignore")
284+
280285

Docs/Unity VScode 无法索引提示问题.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ https://blog.csdn.net/qq_39500817/article/details/116646471
1010
然后重新打开,或者直接右下角提示的确认
1111
————————————————
1212
版权声明:本文为CSDN博主「qq_39500817」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
13-
原文链接:https://blog.csdn.net/qq_39500817/article/details/116646471
13+
原文链接:https://blog.csdn.net/qq_39500817/article/details/116646471
14+
15+
16+
17+
最后 需要用unity 打开工程 生成 Assembly-CSharp.csproj文件

ProjectConfig/Script/AppStore/AppStoreTaptap.py

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ def UpLoadVesionDB(self):
671671
# FTP upload
672672
# ftp = mainFTPUtil.ftpconnect("47.242.56.146", 21,"root", "Qianlizhiwai1")
673673
# mainFTPUtil.uploadfile(ftp, dbfileOnServer, dbfile)
674-
self.UploadSFTPByGo(dbfile,dbfileOnServer)
674+
# self.UploadSFTPByGo(dbfile,dbfileOnServer)
675675

676676

677677
def UploadSFTPByGo(self,localfile,serverfile):
@@ -690,24 +690,33 @@ def UpdateVesionDBInfo(self,isHD):
690690
print("UpdateVesionDBInfo version="+version+ " isHD="+str(isHD))
691691
# return
692692
package = mainAppInfo.GetAppPackage(Source.ANDROID,isHD,Source.TAPTAP)
693-
db = DBApp()
694-
dbfile = self.GetDbFile()
693+
694+
695+
# 本地保存
696+
# db = DBApp()
697+
# dbfile = self.GetDbFile()
695698

696-
dbfileOnServer = self.GetDbFileOnServer()
697-
db.OpenDB(dbfile)
699+
# dbfileOnServer = self.GetDbFileOnServer()
700+
# db.OpenDB(dbfile)
698701

699-
appinfo = AppItemInfo()
700-
appinfo.appid= appid
701-
appinfo.package= package
702-
appinfo.version= version
702+
# appinfo = AppItemInfo()
703+
# appinfo.appid= appid
704+
# appinfo.package= package
705+
# appinfo.version= version
703706

704-
if db.IsItemExist(appinfo.package)==True:
705-
db.UpdateItem(appinfo)
706-
else:
707-
# AddItem
708-
db.AddItem(appinfo)
707+
# if db.IsItemExist(appinfo.package)==True:
708+
# db.UpdateItem(appinfo)
709+
# else:
710+
# # AddItem
711+
# db.AddItem(appinfo)
709712

710-
713+
# 网络更新
714+
url = "http://mooncore.cn:8182/SetAppVersion_taptap?version="+version+"&package="+package+"&appid="+appid
715+
print("UpdateVesionDBInfo url="+url)
716+
FileUtil.GetUrl(url)
717+
718+
719+
711720

712721
def UpLoadApk(self, isHD):
713722
webcmd = WebDriverCmd(self.driver)

ServerApp/AppVersion/AppVersion.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@ def GetAppVersionTapTap():
5656
# return "2.0.0"
5757
return mainServerAppVersionTapTap.GetVersion(cur_version,package,appid)
5858

59+
# http://127.0.0.1:8182/SetAppVersion_taptap?version=1.2.0&package=com.moonma.ladderclimb&appid=216810
60+
# http://mooncore.cn:8182/SetAppVersion_taptap?version=1.2.0&package=com.moonma.ladderclimb&appid=216810
61+
@app.route('/SetAppVersion_taptap')
62+
def SetAppVersionTapTap():
63+
print(request.url)
64+
package = request.args["package"]
65+
appid = request.args["appid"]
66+
version = request.args["version"]
67+
return mainServerAppVersionTapTap.SetVersion(version,package,appid)
68+
69+
70+
5971
# http://mooncore.cn:8080/AppVersion?package=com.moonma.caicaile
6072
@app.route('/AppVersion')
6173
def GetAppVersion():
0 Bytes
Binary file not shown.

ServerApp/AppVersion/ServerAppVersionTapTap.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from WebDriver.WebDriverCmd import CmdInfo
1515

1616

17-
# from AppItemInfo import AppItemInfo
17+
from AppItemInfo import AppItemInfo
1818
from DBApp import DBApp
1919
from DBApp import mainDBApp
2020

@@ -176,7 +176,22 @@ def GetVersion(self,cur_version,package,appid,isDebug=False):
176176

177177

178178
return version
179-
179+
180+
def SetVersion(self,version,package,appid):
181+
db = DBApp()
182+
db.OpenDB("DBAppTaptap.db")
183+
appinfo = AppItemInfo()
184+
appinfo.appid= appid
185+
appinfo.package= package
186+
appinfo.version= version
187+
188+
if db.IsItemExist(appinfo.package)==True:
189+
db.UpdateItem(appinfo)
190+
else:
191+
# AddItem
192+
db.AddItem(appinfo)
193+
return "SetVersion"
194+
180195

181196

182197
mainServerAppVersionTapTap = ServerAppVersionTapTap()
368 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)