const CreateMsgRouter = {
template: `
`,
data: function () {
return {
select: ['Design', 'jj'],
items: [
'Programming',
'Design',
'Vue',
'Vuetify'
]
};
},
methods: {
createMsg: function () {
var subject = $("#subject").val();
var message = $("#message").val();
var tag = $("#tag").val();
var user = $("#user").val();
console.log("Message Created: " + tag + " " + message + " " + user);
$.ajax({
url: "api/createMsg",
data: {
sub: subject,
mess: message,
use: user,
ta: tag
},
method: "POST"
}).done(have_result).fail(have_error);
function have_result(res) {
console.log(res);
}
function have_error(err) {
console.log("error: " + err.responseText);
console.log(err);
}
},
},
mounted: function () {
if ($(this).bootstrapMaterialDesign)
$(this).bootstrapMaterialDesign();
},
};