Commit 42ec638e authored by wanli's avatar wanli

🐞 fix(): 修复获取url参数错误bug

parent baeb2548
''' '''
Author: your name Author: your name
Date: 2021-07-12 11:14:48 Date: 2021-07-12 11:14:48
LastEditTime: 2021-07-22 17:54:40 LastEditTime: 2021-07-22 18:00:06
LastEditors: Please set LastEditors LastEditors: Please set LastEditors
Description: In User Settings Edit Description: In User Settings Edit
FilePath: \evm-store\tools\build_out\controllers\appi.py FilePath: \evm-store\tools\build_out\controllers\appi.py
...@@ -66,7 +66,9 @@ class BuildAppResource(object): ...@@ -66,7 +66,9 @@ class BuildAppResource(object):
if not user: if not user:
return False, ResponseCode.USER_NOT_EXISTS return False, ResponseCode.USER_NOT_EXISTS
print(user) host_url = params.get("host_url")
if not host_url:
return False, ResponseCode.HTTP_INVAILD_REQUEST
params.update({ params.update({
'app_icon': params.get('app_icon', ''), 'app_icon': params.get('app_icon', ''),
...@@ -134,7 +136,7 @@ class BuildAppResource(object): ...@@ -134,7 +136,7 @@ class BuildAppResource(object):
# with open(os.sep.join([target_dir, "epk.json"]), "w") as f: # with open(os.sep.join([target_dir, "epk.json"]), "w") as f:
# json.dump(app.to_dict(), f) # json.dump(app.to_dict(), f)
return { 'app_name': app.app_name, 'app_file': "{}.epk".format(app.app_name), 'app_url': urljoin(params.get("host_url"), epk_path) }, ResponseCode.HTTP_SUCCESS return { 'app_name': app.app_name, 'app_file': "{}.epk".format(app.app_name), 'app_url': urljoin(host_url, epk_path) }, ResponseCode.HTTP_SUCCESS
buildAppResource = BuildAppResource() buildAppResource = BuildAppResource()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment