mplink: Always use redirect

This commit is contained in:
Fam Zheng 2025-03-01 21:47:16 +00:00
parent 16c3547055
commit 1b5245bbd7

View File

@ -1249,7 +1249,9 @@ def mini_prog_entry_redirect(code, tid):
# the mplink path setting may not work for some reason, so we use # the mplink path setting may not work for some reason, so we use
# redirect param of the index page as a fallback # redirect param of the index page as a fallback
query += '&redirect=' + path query += '&redirect=' + path
url = cache.get_or_set(key, lambda: mplink(query, path, env_version), 300) # passing path other than /pages/index/index to mplink may get an error, use
# the redirect param of the index page as a fallback for now
url = cache.get_or_set(key, lambda: mplink(query, "/pages/index/index", env_version), 300)
return redirect(url) return redirect(url)
class MiniProgEntryView(BaseView): class MiniProgEntryView(BaseView):