Commit 7fe40c65 7fe40c6583de1324db275e98e1a8cf030b83f8f8 by 牛先锋

更改设置验证码工具调用运营平台接口

1 parent 1c88dc71
...@@ -12,7 +12,14 @@ ...@@ -12,7 +12,14 @@
12 <el-input placeholder="请输入手机号" v-model="smsCode.phone" clearable></el-input> 12 <el-input placeholder="请输入手机号" v-model="smsCode.phone" clearable></el-input>
13 </el-form-item> 13 </el-form-item>
14 <el-form-item> 14 <el-form-item>
15 <el-input placeholder="请输入验证码" v-model="smsCode.code" clearable></el-input> 15 <el-select v-model="setPhoneCode.huanjing" placeholder="请选择系统">
16 <el-option
17 v-for="item in setPhoneCodeOptions"
18 :key="item.value"
19 :label="item.label"
20 :value="item.value">
21 </el-option>
22 </el-select>
16 </el-form-item> 23 </el-form-item>
17 <div style="margin: 15px 0;"></div> 24 <div style="margin: 15px 0;"></div>
18 <el-form-item> 25 <el-form-item>
...@@ -1217,6 +1224,24 @@ ...@@ -1217,6 +1224,24 @@
1217 value: '1', 1224 value: '1',
1218 label: '线上环境' 1225 label: '线上环境'
1219 }], 1226 }],
1227 setPhoneCode: {
1228 phone: '',
1229 huanjing: []
1230 },
1231 setPhoneCodeOptions: [{
1232 value: '1',
1233 label: '小佗APP'
1234 }, {
1235 value: '3',
1236 label: '活动报名'
1237 }, {
1238 value: '6',
1239 label: '小程序登录'
1240 }, {
1241 value: '5',
1242 label: '云激活'
1243 }],
1244
1220 dialogQueryPhoneCode: false, 1245 dialogQueryPhoneCode: false,
1221 myQueryPhoneCode: '', 1246 myQueryPhoneCode: '',
1222 createAPI: { 1247 createAPI: {
...@@ -1890,13 +1915,13 @@ ...@@ -1890,13 +1915,13 @@
1890 }); 1915 });
1891 }) 1916 })
1892 }, 1917 },
1893 smsCodeSubmit() { 1918 smsCodeSubmit1() {
1894 let config = { 1919 let config = {
1895 headers: { 1920 headers: {
1896 'Content-Type': 'application/x-www-form-urlencoded' 1921 'Content-Type': 'application/x-www-form-urlencoded'
1897 } 1922 }
1898 } 1923 }
1899 this.$http.get('/tool/smsCode?'+this.$qs.stringify({ 1924 this.$http.get('/tool/smsCodeNew?'+this.$qs.stringify({
1900 phone: this.smsCode.phone, 1925 phone: this.smsCode.phone,
1901 code: this.smsCode.code 1926 code: this.smsCode.code
1902 }),config).then((res)=>{ 1927 }),config).then((res)=>{
...@@ -1929,6 +1954,45 @@ ...@@ -1929,6 +1954,45 @@
1929 }); 1954 });
1930 }) 1955 })
1931 }, 1956 },
1957
1958 smsCodeSubmit() {
1959 const loading = this.$loading({
1960 lock: true,
1961 text: '加载中...',
1962 spinner: 'el-icon-loading',
1963 background: 'rgba(0, 0, 0, 0.7)'
1964 });
1965 let config = {
1966 headers: {
1967 'Content-Type': 'application/x-www-form-urlencoded'
1968 }
1969 }
1970 this.$http.get('/tool/smsCodeNew?'+this.$qs.stringify({
1971 phone: this.smsCode.phone,
1972 businessType: this.setPhoneCode.huanjing.toString()
1973 }),config).then((res)=>{
1974 console.log(res);
1975 if(res.data=='') {
1976 this.$message({
1977 showClose: true,
1978 message: '运营平台异常',
1979 type: 'error'
1980 });
1981 } else {
1982 this.myQueryPhoneCode = res.data
1983 this.dialogQueryPhoneCode = true
1984 }
1985 loading.close();
1986 }).catch(error=>{
1987 console.log(error);
1988 loading.close();
1989 this.$message({
1990 showClose: true,
1991 message: '处理失败,请确认运营平台是否异常!',
1992 type: 'error'
1993 });
1994 })
1995 },
1932 activityConfigSubmit() { 1996 activityConfigSubmit() {
1933 // this.$refs['activityConfig'].validate((valid) => { 1997 // this.$refs['activityConfig'].validate((valid) => {
1934 // if(valid) { 1998 // if(valid) {
......