|
@@ -15,6 +15,7 @@ modal = new Vue({
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+Vue.component('vue-easymde', VueEasyMDE.VueEasyMDE)
|
|
|
|
|
|
|
|
app = new Vue({
|
|
app = new Vue({
|
|
|
el: '#app',
|
|
el: '#app',
|
|
@@ -36,7 +37,7 @@ app = new Vue({
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
getTempURL: function() {
|
|
getTempURL: function() {
|
|
|
- $("#enurl").loading({
|
|
|
|
|
|
|
+ $('#enurl').loading({
|
|
|
message: '加载中...',
|
|
message: '加载中...',
|
|
|
onStop: function(loading) {
|
|
onStop: function(loading) {
|
|
|
loading.overlay.fadeOut(650)
|
|
loading.overlay.fadeOut(650)
|
|
@@ -45,21 +46,21 @@ app = new Vue({
|
|
|
axios.post('/api/get-temp', {
|
|
axios.post('/api/get-temp', {
|
|
|
text: app.text
|
|
text: app.text
|
|
|
}).then(function(response) {
|
|
}).then(function(response) {
|
|
|
- $("#enurl").loading('stop');
|
|
|
|
|
|
|
+ $('#enurl').loading('stop');
|
|
|
var data = response.data;
|
|
var data = response.data;
|
|
|
if (data.status == 1) {
|
|
if (data.status == 1) {
|
|
|
- var newURL = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
|
|
|
|
|
|
+ var newURL = window.location.protocol + '//' + window.location.host + window.location.pathname;
|
|
|
app.enurl = newURL + data.guid;
|
|
app.enurl = newURL + data.guid;
|
|
|
} else {
|
|
} else {
|
|
|
throw 'failure to get the tmp url!';
|
|
throw 'failure to get the tmp url!';
|
|
|
- modal.show("操作失败!<br>", '错误')
|
|
|
|
|
|
|
+ modal.show('操作失败!<br>', '错误')
|
|
|
}
|
|
}
|
|
|
console.log(response);
|
|
console.log(response);
|
|
|
}).catch(function(error) {
|
|
}).catch(function(error) {
|
|
|
console.warn(error.response);
|
|
console.warn(error.response);
|
|
|
- $("#enurl").loading('stop');
|
|
|
|
|
- modal.show("操作失败!<br>" + error.response.data.message, '错误')
|
|
|
|
|
|
|
+ $('#enurl').loading('stop');
|
|
|
|
|
+ modal.show('操作失败!<br>' + error.response.data.message, '错误')
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-})
|
|
|
|
|
|
|
+})
|