Files
ctms-client/apis/ctms/vcode.js

55 lines
1.4 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @Author: 嗨噜客(三亚)<fm453>
* @Date: 2023-07-19 16:03:07
* @FilePath: apis/ctms/vcode.js
* @Description:
* @Email: 393213759@qq.com
* Copyright (c) 2025 by www.hiluker.cn, All Rights Reserved.
*/
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;
}
})
},
}