From 7219247efabe1b1cea921439a637bfd237d80b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E5=B9=B3=E8=89=BA?= <52643018@qq.com> Date: Wed, 25 Aug 2021 14:22:28 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E6=88=90]=20=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E9=A1=B5=E9=9D=A2UI=20[=E4=BC=98?= =?UTF-8?q?=E5=8C=96]=20=E5=85=A8=E5=B1=80$msg=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0promise=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/mixin.js | 24 +++++-- pages.json | 8 +++ pages/my/bindPhone.vue | 160 +++++++++++++++++++++++++++++++++++++++++ pages/my/index.vue | 2 +- 4 files changed, 186 insertions(+), 8 deletions(-) create mode 100644 pages/my/bindPhone.vue 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/pages.json b/pages.json index 75b6102..8ae3c07 100644 --- a/pages.json +++ b/pages.json @@ -276,6 +276,14 @@ "style": { "navigationBarTitleText": "获取红线" } + }, + { + "path": "pages/my/bindPhone", + "style": { + "navigationBarTitleText": "绑定手机号", + "navigationBarBackgroundColor": "#FE3EA5", + "navigationBarTextStyle": "white" + } } ], "globalStyle": { diff --git a/pages/my/bindPhone.vue b/pages/my/bindPhone.vue new file mode 100644 index 0000000..f872bfd --- /dev/null +++ b/pages/my/bindPhone.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/pages/my/index.vue b/pages/my/index.vue index 369d741..d8c08d2 100644 --- a/pages/my/index.vue +++ b/pages/my/index.vue @@ -12,7 +12,7 @@ 资料审核中 - + 绑定手机号