Edit Message function.

1. Change vue to vue.min.js
2. Show error if Vue.js is not loaded
This commit is contained in:
Harry Zhou
2017-06-21 23:23:02 +08:00
parent 80f922e635
commit c5135249d0
4 changed files with 25 additions and 3 deletions
+6
View File
@@ -94,6 +94,12 @@
opacity: 0; opacity: 0;
} }
.center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
.err-msg { .err-msg {
color: red; color: red;
font-weight: bold; font-weight: bold;
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

+1
View File
@@ -299,6 +299,7 @@ var Message = new Vue({
}, },
methods: { methods: {
startLoop: function () { startLoop: function () {
$("#vue-error-msg").remove();
var vm = this; var vm = this;
vm.loadContact(); vm.loadContact();
vm.timer = window.setInterval(function() { vm.timer = window.setInterval(function() {
+18 -3
View File
@@ -4,8 +4,18 @@
@section('content') @section('content')
<div id="message"> <div id="vue-error-msg" class="container hide">
{{--<a v-on:click="refreshContact">???</a>--}} <div class="row col-xl-12 alert alert-danger" role="alert">
<span class="fa fa-exclamation-circle" aria-hidden="true"></span>
<p>
如果您看到了这条消息,说明您使用的浏览器不兼容消息页面。建议您更换<strong>最新版Chrome浏览器</strong>
以获得最佳浏览体验,给您带来的不便敬请谅解。
</p>
<img src="/img/sorry.png" class="img-responsive center-block"/>
</div>
</div>
<div id="message" class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-12"> <div class="col-lg-8 col-12">
<message-dialog ref="messageDialog" v-on:top-contact="topContactCallback" v-on:network-error="stopTimerCallback"></message-dialog> <message-dialog ref="messageDialog" v-on:top-contact="topContactCallback" v-on:network-error="stopTimerCallback"></message-dialog>
@@ -85,9 +95,14 @@
</div> </div>
</script> </script>
<script src="https://unpkg.com/vue@2.3.4/dist/vue.js"></script> <script src="https://unpkg.com/vue@2.3.4/dist/vue.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script> <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="/js/message.js"></script> <script src="/js/message.js"></script>
<script>
window.onload = function () {
setTimeout("$('#vue-error-msg').removeClass('hide')", 3000);
}
</script>
<link rel="stylesheet" href="/css/message.css"> <link rel="stylesheet" href="/css/message.css">
@endsection @endsection