2662043119@qq.com 1 éve
szülő
commit
3630d75959
1 módosított fájl, 21 hozzáadás és 18 törlés
  1. 21 18
      src/utils/myfun.js

+ 21 - 18
src/utils/myfun.js

@@ -49,6 +49,9 @@ export function phoneNumA(value) {
 
 // goto
 export function goto(url, json) {
+    if (!url) {
+        return this.$toast('该功能暂未开放,敬请期待!');
+    }
     let params = "";
     if (json) {
         params = [];
@@ -168,25 +171,25 @@ export function toast(msg, duration) {
 }
 
 export const showModal = ({ content, showCancel = true, confirmText = '确定' }) => {
-	return new Promise((resolve, reject) => {
-		uni.showModal({
-			title: '提示',
-			content: content,
-			showCancel,
-			confirmText,
-			success: (res) => {
-				resolve(res)
-			},
-			fail: (err) => {
-				reject(err)
-			}
-		})
-	})
+    return new Promise((resolve, reject) => {
+        uni.showModal({
+            title: '提示',
+            content: content,
+            showCancel,
+            confirmText,
+            success: (res) => {
+                resolve(res)
+            },
+            fail: (err) => {
+                reject(err)
+            }
+        })
+    })
 }
 
 export const showLoading = ({ title }) => {
-	return uni.showLoading({
-		title,
-		mask: true
-	})
+    return uni.showLoading({
+        title,
+        mask: true
+    })
 }