feat:微信支付宝一键登录
This commit is contained in:
+4
-3
@@ -48,7 +48,7 @@ function request(options) {
|
||||
success: (res) => {
|
||||
if (isShowLoading) {
|
||||
// 请求之前做一些事
|
||||
uni.hideToast();
|
||||
uni.hideToast();
|
||||
}
|
||||
|
||||
let data = res.data;
|
||||
@@ -64,7 +64,8 @@ function request(options) {
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (data.bizcode === 100) {
|
||||
// 601 微信登录没注册
|
||||
if (data.bizcode === 100 || data.bizcode === 601) {
|
||||
resolve(data); // 成功时返回数据
|
||||
} else if (data.bizcode === 201) {
|
||||
if ([201, 200].includes(data.errcode)) {
|
||||
@@ -107,7 +108,7 @@ function request(options) {
|
||||
fail: (error) => {
|
||||
if (isShowLoading) {
|
||||
// 请求之前做一些事
|
||||
uni.hideToast();
|
||||
uni.hideToast();
|
||||
}
|
||||
uni.showToast({
|
||||
title: "服务器异常,稍后再试",
|
||||
|
||||
Reference in New Issue
Block a user