فهرست منبع

增加前后端版本检测对比

mxd 3 سال پیش
والد
کامیت
a55b485e0e
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      magic-editor/src/console/src/components/magic-editor.vue

+ 6 - 0
magic-editor/src/console/src/components/magic-editor.vue

@@ -239,6 +239,12 @@ export default {
               let host = location.href.substring(0, location.href.indexOf(res.data.web))
               contants.SERVER_URL = replaceURL(host + '/' + (res.data.prefix || ''))
             }
+            if(contants.config.version && contants.config.version !== contants.MAGIC_API_VERSION_TEXT){
+              this.$magicAlert({
+                title: '版本检测',
+                content: `检测到前后端版本不一致(前端:${contants.MAGIC_API_VERSION_TEXT} 后端:${contants.config.version}),请检查`
+              })
+            }
           })
           .catch(e => {
             this.$magicAlert({