Commit 08a4fabf by 陈羽

update: 添加授权短信校验限制

parent 6ffbb058
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getRequest, postRequest } from '@/api/api'; import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error'; import errMsg from '@/common/js/error';
import showMsg from '@/common/js/showmsg'; import showMsg from '@/common/js/showmsg';
import { _debounce } from '@/common/js/public'; import { _debounce } from '@/common/js/public';
...@@ -169,38 +169,14 @@ export default { ...@@ -169,38 +169,14 @@ export default {
} }
that.$refs[form].validate(async valid => { that.$refs[form].validate(async valid => {
if (valid) { if (valid) {
that.$emit('refreshData', 'success'); const flag = await that.checkCode();
// const flag = await that.checkCode(); if (!flag) {
// if (!flag) {
// return false;
// }
// that.toAddPost();
} else {
return false; return false;
} }
}); that.$emit('refreshData', 'success');
}, } else {
toAddPost() {
const that = this;
let params = {
enterpriseId: that.partForm.enterpriseId,
wxEnterpriseId: that.wxEnterpriseId,
version: that.partForm.version
};
postRequest('/haoban-manage3-web/wx-enterprise-bind', params)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.$emit('refreshData');
return false; return false;
} }
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
}); });
}, },
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment