feat(aigc): pass wechat login code to generator task requests
Refactor the shared wechat login code utility by moving it from the recharge service to a standalone module. Add the sensitive request flag to the createAigcGeneratorTask POST API call. Update the aigc detail and template use pages to fetch and pass the wechat login code when creating generation tasks. Remove the redundant login code implementation from the recharge payment service.
This commit is contained in:
@@ -46,6 +46,7 @@ import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import Privacy from "@/components/Privacy/index.vue";
|
||||
import AigcTopBar from "@/pages-aigc/components/AigcTopBar/index.vue";
|
||||
import { useCurrentCredit } from "@/pages-aigc/hooks/useCurrentCredit.js";
|
||||
import { getWechatLoginCode } from "@/pages-aigc/services/wechatLogin.js";
|
||||
import {
|
||||
createAigcGeneratorTask,
|
||||
getAigcTemplateItemList,
|
||||
@@ -356,9 +357,11 @@ const handleGenerate = async () => {
|
||||
});
|
||||
|
||||
try {
|
||||
const wxLoginCode = await getWechatLoginCode();
|
||||
const res = await createAigcGeneratorTask({
|
||||
templateItemId,
|
||||
imageUrlList: [uploadedImageUrl.value],
|
||||
wxLoginCode,
|
||||
});
|
||||
|
||||
const taskId = String(res?.data || "").trim();
|
||||
|
||||
Reference in New Issue
Block a user