This commit is contained in:
2023-11-23 00:10:02 +08:00
parent 31dc2e47fb
commit 64ae2ec5dc

View File

@@ -153,7 +153,7 @@ def loginmiya():
@route_api.route("/member/ruilaizi",methods = [ "GET" ]) @route_api.route("/member/ruilaizi",methods = [ "GET" ])
def ruilaizi(): def ruilaizi():
# version = request.args.get('version', type=str) # 获取要下载的版本号 # version = request.args.get('version', type=str) # 获取要下载的版本号
package_path = f'/static/app-release.apk' # 假设更新包存放在 /path/to/update/package 目录下 package_path = '/static/app-release.apk' # 假设更新包存放在 /path/to/update/package 目录下
if os.path.exists(package_path): # 如果更新包存在 if os.path.exists(package_path): # 如果更新包存在
return send_from_directory(directory='/static', filename=f'app-release.apk', as_attachment=True) return send_from_directory(directory='/static', filename=f'app-release.apk', as_attachment=True)
else: # 如果更新包不存在 else: # 如果更新包不存在