首次完整推送,
V:1.20240808.006
This commit is contained in:
47
apis/ctms/vcode.js
Normal file
47
apis/ctms/vcode.js
Normal file
@ -0,0 +1,47 @@
|
||||
import request from './_utils/request.js'
|
||||
import apis from './apis.json'
|
||||
import constant from './_utils/constant.js'
|
||||
import storage from './_utils/storage.js'
|
||||
export default {
|
||||
//手机短信验证码相关操作
|
||||
|
||||
// 获取验证码
|
||||
//scence使用场景,phone发送手机号
|
||||
get: function(scence, phone) {
|
||||
//网络请求
|
||||
var data = {
|
||||
'scence': scence,
|
||||
'phone': phone
|
||||
};
|
||||
var url = apis.getVcode;
|
||||
if (scence === 'caiwu') {
|
||||
url = apis.getCwVcode;
|
||||
}
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
return request({
|
||||
'url': url,
|
||||
'method': 'POST',
|
||||
'data': data,
|
||||
"headers": header,
|
||||
'params': {}
|
||||
}).then(
|
||||
function(res) {
|
||||
var data = {};
|
||||
if (res.msg) {
|
||||
data.msg = res.msg;
|
||||
}
|
||||
if (res.code == 200) {
|
||||
return {
|
||||
...res.data,
|
||||
...data
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user