Commit d4a945f7 authored by hewenhao's avatar hewenhao

feat: 优化导入

parent a12146df
......@@ -24,12 +24,11 @@ window.$geek_excuteJS = function (args) {
const params = JSON.parse(args);
eventBus.emit<NativeInvokeFuncParams>(GEEK_NATIVE_NAME, params);
} catch (error) {
eventBus.emit<NativeInvokeFuncParams>(GEEK_NATIVE_NAME, args);
}
};
const sendNativeMessage = (data: { type: string; data?: any; __callback__?: string }) => {
export const sendNativeMessage = (data: { type: string; data?: any; __callback__?: string }) => {
if (isAndroid()) {
window.ReactNativeWebView &&
window.ReactNativeWebView.onMessage &&
......
......@@ -94,7 +94,7 @@ import { NavBar, Tab, Tabs, Cell, Empty, List, PullRefresh } from "vant";
import { computed, defineComponent, onMounted, reactive, toRefs } from "vue";
import { getBonusList } from "@/server/api/bonus";
import { useStore } from "vuex";
import { useNativeBridge } from "@/util/use-native-bridge";
import { sendNativeMessage } from "@/util/use-native-bridge";
import { useRoute } from "vue-router";
interface BonusList {
......@@ -127,7 +127,6 @@ const BonusDetail = defineComponent({
addList: [],
reduceList: []
});
const [sendNativeMessage] = useNativeBridge("test", arg => console.log(arg));
const onLoad = async () => {
state.loading = true;
if (state.refreshing) {
......
......@@ -133,7 +133,7 @@ import { computed, defineComponent, onMounted, reactive, toRefs } from "vue";
import { Button, Cell, Dialog, Field, Toast } from "vant";
import { useRoute } from "vue-router";
import { useStore } from "vuex";
import { useNativeBridge } from "@/util/use-native-bridge";
import { sendNativeMessage } from "@/util/use-native-bridge";
import { countDown } from "@/util/timer";
import { checkCaptcha, withdraw, getWithdrawRisk } from "@/server/api/bonus";
import { WithdrawResponse } from "@/model/bonus";
......@@ -161,9 +161,6 @@ const Withdraw = defineComponent({
[Dialog.Component.name]: Dialog.Component
},
setup() {
const [sendNativeMessage] = useNativeBridge("title", function(arg) {
console.log(this, arg);
});
const route = useRoute();
const store = useStore();
const bonusStoreState = computed(() => store.state.bonus);
......
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