This commit is contained in:
doudou201703
2026-08-10 19:33:59 +08:00
parent 3ff0faebb9
commit 945b120733
28 changed files with 330 additions and 786 deletions
@@ -19,10 +19,9 @@ class Scheme接口ViewSets(ViewSet):
""""""
self_mini_openid = request.data.get("self_mini_openid", None)
self_mini_unionid = request.data.get("self_mini_unionid", None)
httpResData = BaseResponse(resData=ResData(listData=[""], dictData={"demo": "xiaozizi"}), ).model_dump()
return Response(data=httpResData, status=status.HTTP_200_OK)
@action(detail=False, methods=["get", "post", "put", "delete"], url_path="generatescheme")
def 获取加密scheme码(self, request: Request):
"""该接口用于获取小程序 scheme 码,适用于短信、邮件、外部网页、微信内等拉起小程序的业务场景。"""
@@ -36,12 +35,12 @@ class Scheme接口ViewSets(ViewSet):
"jump_wxa": {
"path": "/pageTabBar/Home/Home",
"query": f"superior_unionid={self_mini_unionid}",
},
},
"is_expire": True, # 这里好像是必须要填的
"expire_interval": 30, # 有效天数,1-30天
"expire_type": 1
}
)
}
)
print(schemeData.json())
openlink = pydash.get(obj=schemeData.json(), path="openlink")
print("生成的小程序 scheme 码", openlink)