diff --git a/common/mixin.js b/common/mixin.js index e48c468..167e151 100644 --- a/common/mixin.js +++ b/common/mixin.js @@ -57,13 +57,23 @@ export default{ } }, $msg(title = '', param = {}) { - if(!title) return; - uni.showToast({ - title, - duration: param.duration || 1500, - mask: param.mask || true, // 默认应该加mask 禁止提示时操作 - icon: param.icon || 'none' - }); + return new Promise((resolve, reject) => { + if(!title){ + reject(); + return; + } + uni.showToast({ + title, + duration: param.duration || 1500, + mask: param.mask || true, // 默认应该加mask 禁止提示时操作 + icon: param.icon || 'none', + complete: result => { + setTimeout(() => { + resolve(); + }, param.duration || 1500); + } + }); + }) }, $url(url, options = {}){ this.$u.throttle(() => { diff --git a/components/lf-price/lf-price.vue b/components/lf-price/lf-price.vue index 49ca23a..d86c445 100644 --- a/components/lf-price/lf-price.vue +++ b/components/lf-price/lf-price.vue @@ -1,5 +1,5 @@