Commit 8ca068bd authored by 俞嘉婷's avatar 俞嘉婷

fix: 任务跳转

parent 816c432b
...@@ -43,11 +43,14 @@ export function isLogin() { ...@@ -43,11 +43,14 @@ export function isLogin() {
} }
export function appJump(url) { export function appJump(url) {
console.info('22222')
sendWebNet("/autoLogin/tempSaveCookie", null, null, true) sendWebNet("/autoLogin/tempSaveCookie", null, null, true)
.then((res) => { .then((res) => {
console.info('3333')
res?.data && localStorage.setItem("db_zheshang_cookie", res.data); res?.data && localStorage.setItem("db_zheshang_cookie", res.data);
}) })
.finally(() => { .finally(() => {
console.info('44444')
window["MarsJSBridge"].invoke("pushPage", { window["MarsJSBridge"].invoke("pushPage", {
uri: url, uri: url,
}); });
......
...@@ -35,9 +35,7 @@ export default class TaskCenter { ...@@ -35,9 +35,7 @@ export default class TaskCenter {
/** 任务处理中心 */ /** 任务处理中心 */
static async handleClickTask(item: any = {}) { static async handleClickTask(item: any = {}) {
const {code, jumpUrl: url = "", id} = item; const {code, jumpUrl, id} = item;
const jumpUrl = url?.split("$$$")?.[1];
/** 邀请任务 */ /** 邀请任务 */
if (code?.startsWith("it")) { if (code?.startsWith("it")) {
...@@ -86,6 +84,7 @@ export default class TaskCenter { ...@@ -86,6 +84,7 @@ export default class TaskCenter {
} }
/** 行方任务 */ /** 行方任务 */
else if (code?.startsWith("bank_")) { else if (code?.startsWith("bank_")) {
console.info('11111')
beforeDoComplete(item, async () => { beforeDoComplete(item, async () => {
// if (!item?.extra || item?.extra == 0) { // 未领取任务 调领取行方任务接口 // if (!item?.extra || item?.extra == 0) { // 未领取任务 调领取行方任务接口
// await sendWebNetWithToken( // await sendWebNetWithToken(
...@@ -100,6 +99,7 @@ export default class TaskCenter { ...@@ -100,6 +99,7 @@ export default class TaskCenter {
// appJump(ju mpUrl) // appJump(ju mpUrl)
// } // }
// location.href = jumpUrl; // location.href = jumpUrl;
console.info('jumpUrl', jumpUrl)
jumpUrl && appJump(jumpUrl); jumpUrl && appJump(jumpUrl);
}) })
} }
......
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