1, send post server report
[org.springframework.web.servlet.PageNotFound]-Request method "POST" not supported
2Jing html code
<form id="user_login">
<div class="layui-form-item"><label class="layui-form-label"></label>
<div class="layui-input-inline"><input type="text" id="user_name" v-model="user_name" name="user_name"
required="" lay-verify="required"
autocomplete="off" class="layui-input"></div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item"><label class="layui-form-label"></label>
<div class="layui-input-inline"><input type="password" id="user_password" v-model="user_password" name="user_password"
required="" lay-verify="required"
autocomplete="off" class="layui-input"></div>
</div>
<div class="layui-form-item">
<button class="layui-btn" lay-filter="*" lay-submit="" v-on:click="user_login" data-method="offset" data-type="auto"></button>
<span style="padding-left:20px;"> <a href="/user/forget"></a> </span></div>
<div class="layui-form-item fly-form-app"><span></span> <a href="/app/qq"
onclick="layer.msg("QQ", {icon:16, shade: 0.1, time:0})"
class="iconfont icon-qq"
title="QQ"></a> <a
href="/app/weibo/" onclick="layer.msg("", {icon:16, shade: 0.1, time:0})"
class="iconfont icon-weibo" title=""></a></div>
</form>
javascript:
var userLogin = new Vue({
el: "-sharpuser_login",
data: {
user_name: "",
user_phone_mumber:"",
user_email:"",
user_password:"",
account_type:"user_name"
},
// `methods`
methods: {
user_login: function () {
if ( userLogin.$data.user_name.length() == 11 && isNaN(userLogin.$data.user_name) )
{
userLogin.$data.account_type = "user_phone_mumber";
}
if ( isEmail(userLogin.$data.user_name) )
{
userLogin.$data.account_type = "user_email";
}
axios.post("/SystemManager/userLogin", userLogin.$data)
.then(function (response) {
if ( response.code == 0 )
{
console.log(response);
}
else
{
var othis = $(this);
othis.errorMessage = resultData.message;
active[method].call(this, othis);
}
})
.catch(function (error) {
console.log(error);
})
}
}
})