message-verify 1.0.1-beta.47 → 1.0.1-beta.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modal/verify-modal.js +14 -10
- package/package.json +1 -1
- package/src/modal/verify-modal.tsx +14 -10
@@ -77,7 +77,6 @@ const CreateMessageVerifyModal = ({ props }) => {
|
|
77
77
|
// }, 1000);
|
78
78
|
// }),
|
79
79
|
// new Promise((resolve, reject) => {
|
80
|
-
// setTimeout(() => {
|
81
80
|
// http({
|
82
81
|
// ...config,
|
83
82
|
// headers: {
|
@@ -90,7 +89,6 @@ const CreateMessageVerifyModal = ({ props }) => {
|
|
90
89
|
// resolve(res);
|
91
90
|
// }).catch(err => {
|
92
91
|
// reject(err);
|
93
|
-
// })}, 6000);
|
94
92
|
// })
|
95
93
|
// ]) as any;
|
96
94
|
// if (res?.data?.status?.code === 0) {
|
@@ -106,14 +104,20 @@ const CreateMessageVerifyModal = ({ props }) => {
|
|
106
104
|
// setOtp('');
|
107
105
|
// }
|
108
106
|
try {
|
109
|
-
const res = await
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
107
|
+
const res = await new Promise((resolve, reject) => {
|
108
|
+
http({
|
109
|
+
...config,
|
110
|
+
headers: {
|
111
|
+
...http.defaults.headers.common,
|
112
|
+
'sms-code': val,
|
113
|
+
'sms-code-key': verifyCodeKey,
|
114
|
+
'Content-Type': config.headers['Content-Type'],
|
115
|
+
}
|
116
|
+
}).then(res => {
|
117
|
+
resolve(res);
|
118
|
+
}).catch(err => {
|
119
|
+
reject(err);
|
120
|
+
});
|
117
121
|
});
|
118
122
|
console.log('res', res);
|
119
123
|
if (res?.data?.status?.code === 0) {
|
package/package.json
CHANGED
@@ -93,7 +93,6 @@ const CreateMessageVerifyModal = ({ props }: { props: VerifyModalConfig }) => {
|
|
93
93
|
// }, 1000);
|
94
94
|
// }),
|
95
95
|
// new Promise((resolve, reject) => {
|
96
|
-
// setTimeout(() => {
|
97
96
|
// http({
|
98
97
|
// ...config,
|
99
98
|
// headers: {
|
@@ -106,7 +105,6 @@ const CreateMessageVerifyModal = ({ props }: { props: VerifyModalConfig }) => {
|
|
106
105
|
// resolve(res);
|
107
106
|
// }).catch(err => {
|
108
107
|
// reject(err);
|
109
|
-
// })}, 6000);
|
110
108
|
// })
|
111
109
|
// ]) as any;
|
112
110
|
// if (res?.data?.status?.code === 0) {
|
@@ -122,14 +120,20 @@ const CreateMessageVerifyModal = ({ props }: { props: VerifyModalConfig }) => {
|
|
122
120
|
// setOtp('');
|
123
121
|
// }
|
124
122
|
try {
|
125
|
-
const res = await
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
123
|
+
const res = await new Promise((resolve, reject) => {
|
124
|
+
http({
|
125
|
+
...config,
|
126
|
+
headers: {
|
127
|
+
...http.defaults.headers.common,
|
128
|
+
'sms-code': val,
|
129
|
+
'sms-code-key': verifyCodeKey,
|
130
|
+
'Content-Type': config.headers['Content-Type'],
|
131
|
+
}
|
132
|
+
}).then(res => {
|
133
|
+
resolve(res);
|
134
|
+
}).catch(err => {
|
135
|
+
reject(err);
|
136
|
+
})
|
133
137
|
}) as any;
|
134
138
|
console.log('res', res);
|
135
139
|
if (res?.data?.status?.code === 0) {
|