fanpei0121
2020-08-10 18:07:39 +08:00
<div id="ins"></div>
<script>
window.onload = function () {
new Vue({
el: "#ins",
data: function () {
return {
form: {
requestUrl: ""
},
dialogFormVisible: false
}
},
methods: {
get_ins: function () {
this.dialogFormVisible = false;
var _this = this;
$.ajax({
url: "http://{$go_api}/addIns",
dataType:"json",
async: false,
data: _this.form,
type:"POST",
success:function(req){
if(req.code == 1) {
_this.$message({
message: req.msg,
type: 'success'
});
}
},
})
},
add : function () {
this.dialogFormVisible = true;
this.form.requestUrl = ""
}
}
})
}
</script>
提供一个思路,页面引入 vue.js