<span>用戶登陸</span>
</div>
<form action="https://api.it120.cc/small4/user/m/login?deviceId=007&deviceName=monkey" method="post">
賬戶: <input type="text" name="mobile">
密碼: <input type="password" name="pwd">
<!-- <input type="submit" @click="logo()"> -->
<router-link @click.native="logo" to="">提交</router-link>
</form>
</template>
記住router-link點擊觸發事件必須寫 native否則觸發不了
然后在methods:{ 添加
logo(){
console.log(123456)
axios({
methods:"post",
url: 'https://api.it120.cc/small4/user/m/login?deviceId=007&deviceName=monkey',
params:{
mobile:13500000000,
pwd:12345
}
}).then(res=>console.log(res))
}
接着觸發 就會獲取到相對應的參數了
僅供參考。謝謝。
