|
|
@@ -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
|
|
|
+ })
|
|
|
}
|