From 17efddc6a667670dca682bf36b51a43e99615e6d Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 16 十月 2024 15:59:38 +0800
Subject: [PATCH] 代码初始化
---
h5/main.js | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/h5/main.js b/h5/main.js
index a3374c9..8a3b147 100644
--- a/h5/main.js
+++ b/h5/main.js
@@ -4,20 +4,29 @@
import './uni.promisify.adaptor'
import uView from "uview-ui"
import store from './store/index.js'
-
import Tabbar from '@/components/tarbar.vue'
import navigation from '@/components/Header.vue'
Vue.config.productionTip = false
+// 寮傛hook
-// Vue.prototype.$baseUrl = 'https://dmtest.ahapp.net/h5_api/';
-// Vue.prototype.$baseUrl = 'http://facepay.huasunsolar.com/web_interface/';
-// Vue.prototype.$baseUrl = 'http://218.23.218.228:8018/web_interface/'
Vue.use(uView)
Vue.component('Tabbar', Tabbar)
Vue.component('navigation', navigation)
Vue.prototype.$store = store
+Vue.prototype.$jump = (url) => {uni.navigateTo({url})}
+Vue.prototype.$goBack = () => { setTimeout(() => {uni.navigateBack()},300) }
+Vue.prototype.showToast = (str) => {
+ setTimeout(() => {
+ uni.showToast({
+ title: str,
+ icon: 'none',
+ duration: 2000
+ })
+ })
+}
+Vue.prototype.$eventBus = new Vue()
Vue.prototype.$onWait = new Promise((resolve) => {
Vue.prototype.$reslove = resolve
})
--
Gitblit v1.9.3