diff --git a/themes/yilia/source-src/js/slider.js b/themes/yilia/source-src/js/slider.js index 41b99d4..45c4d73 100644 --- a/themes/yilia/source-src/js/slider.js +++ b/themes/yilia/source-src/js/slider.js @@ -174,9 +174,10 @@ const vm = new Vue({ }).catch(err => { console.warn('加载文章列表失败') }) - welcomeMessage().then((function(msg) { - this.showMessage(msg, 6000) - }).bind(this)) + let _this = this + welcomeMessage().then(msg => { + _this.showMessage(msg, 6000) + }) document.addEventListener('copy', () => { this.showMessage('你都复制了些什么呀,转载要记得加上出处哦') })