| | |
| | | error.data?.error_description !== "Bad credentials" |
| | | ? error.data?.error_description |
| | | : "登录失败,请重试"; |
| | | uni.showToast({ |
| | | title: errorMsg, |
| | | icon: "none", |
| | | duration: 2000, |
| | | }); |
| | | // uni.showToast({ |
| | | // title: errorMsg, |
| | | // icon: "none", |
| | | // duration: 2000, |
| | | // }); |
| | | } |
| | | } |
| | | |
| | |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: '网络错误,请稍后重试', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | // uni.showToast({ |
| | | // title: '网络错误,请稍后重试', |
| | | // icon: 'none', |
| | | // duration: 2000 |
| | | // }); |
| | | }); |
| | | }; |
| | | function register() { |
| | |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: '网络错误,请稍后重试', |
| | | icon: 'none', |
| | | }); |
| | | // uni.showToast({ |
| | | // title: '网络错误,请稍后重试', |
| | | // icon: 'none', |
| | | // }); |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: '网络错误,请稍后重试', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | // uni.showToast({ |
| | | // title: '网络错误,请稍后重试', |
| | | // icon: 'none', |
| | | // duration: 2000 |
| | | // }); |
| | | }); |
| | | }; |
| | | const reset = () => { |
| | |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: '网络错误,请稍后重试', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | console.log(err); |
| | | // uni.showToast({ |
| | | // title: '网络错误,请稍后重试', |
| | | // icon: 'none', |
| | | // duration: 2000 |
| | | // }); |
| | | }); |
| | | }; |
| | | onShow(async () => { |