diff --git a/src/App.vue b/src/App.vue index c7fe546..a9aefab 100644 --- a/src/App.vue +++ b/src/App.vue @@ -139,8 +139,6 @@ export default { async onLaunch() { if (isDevEnv()) return - uni.setNavigationBarTitle({ title: "" }) - // 环境判断 const appInfo = await getAppInfo() if (appInfo == "zzd") { @@ -155,6 +153,9 @@ export default { case "coopMerchant": uni.switchTab({ url: "/pages/tabbar/coopMerchant" }) break + case "thirdApp": + uni.navigateTo({ url: "/pages/thirdApp/thirdAppList" }) + break default: break } diff --git a/src/pages/thirdApp/thirdAppList.vue b/src/pages/thirdApp/thirdAppList.vue index dde27c6..3785c8c 100644 --- a/src/pages/thirdApp/thirdAppList.vue +++ b/src/pages/thirdApp/thirdAppList.vue @@ -16,14 +16,44 @@ > - + - - + + {{ v.name }} + + + + + + + + {{ v.phone }} + + + {{ v.deptName.length > 5 ? v.deptName.substring(0, 5) + "..." : v.deptName }} + + + + 地址: + {{ v.addressDes }} + - + + + 您即将离开智慧后勤应用并跳转到第三方应用,请注意账号财产安全 + @@ -35,7 +65,13 @@ import { hooks, router } from "@@/index" import { merchantApi } from "@@/api" import { filePath } from "@@/utils/file" -const state = reactive({}) +const params = reactive({ + type: "4", +}) + +const state = reactive({ + show: false, +}) onLoad(() => { const app = getApp() @@ -50,13 +86,30 @@ onShow(() => { const pageRef = ref(null) const pageHook = hooks.usePage(pageRef, merchantApi.page, null, "data.records") const query = (page: number, pagesize: number) => { - pageHook.startPage(page, pagesize, false, state.pa) + pageHook.startPage(page, pagesize, false, params) } const toDetail = async (v: any) => { const isLogin = await hooks.useCheckLogin() if (isLogin) { - router.jump("", { id: v.id }) + state.show = true + } +} + +// 确认或拒绝协议 +const thirdAppJump = async () => { + try { + uni.showLoading({ title: "跳转中", mask: true }) + const res: any = await merchantApi.lbLogin() + if (res.code == 0) { + state.show = false + if (!res.data) return uni.showToast({ title: "url错误", icon: "none" }) + window.location.href = res.data + } + } catch (error: any) { + uni.showToast({ title: error, icon: "none" }) + } finally { + uni.hideLoading() } } diff --git a/src/sheep/components/base/base-just-flot-nav/base-just-flot-nav.vue b/src/sheep/components/base/base-just-flot-nav/base-just-flot-nav.vue index 4bd72be..1e51c05 100644 --- a/src/sheep/components/base/base-just-flot-nav/base-just-flot-nav.vue +++ b/src/sheep/components/base/base-just-flot-nav/base-just-flot-nav.vue @@ -1,5 +1,5 @@ \ No newline at end of file + diff --git a/src/sheep/utils/getLaunchParam.ts b/src/sheep/utils/getLaunchParam.ts index b4c2642..ac5c39e 100644 --- a/src/sheep/utils/getLaunchParam.ts +++ b/src/sheep/utils/getLaunchParam.ts @@ -1,6 +1,6 @@ // 获取启动参数 -const getLaunchParam = (): "canteen" | "selfMerchant" | "coopMerchant" | null => { - return new URL(window.location.href).searchParams.get("launchParam") as "canteen" | "selfMerchant" | "coopMerchant" | null +const getLaunchParam = (): "canteen" | "selfMerchant" | "coopMerchant" | "thirdApp" | null => { + return new URL(window.location.href).searchParams.get("launchParam") as "canteen" | "selfMerchant" | "coopMerchant" | "thirdApp" | null } export default getLaunchParam