Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
front-end-dev
techbook
Commits
d192af1c
Commit
d192af1c
authored
May 21, 2020
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
试一下自动刷新
parent
b24df49e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
2 deletions
+18
-2
.env
.env
+1
-1
.env.dev
.env.dev
+1
-1
version.js
public/js/version.js
+6
-0
App.vue
src/App.vue
+8
-0
main.js
src/main.js
+2
-0
No files found.
.env
View file @
d192af1c
NODE_ENV="production"
VUE_APP_URL="prod"
API_ROOT="/"
VUE_APP_UPDATED="
2.1
.01"
VUE_APP_UPDATED="
3.0
.01"
VUE_APP_UPLOAD_IMG="/base/upload/uploadPicture"
VUE_APP_UPLOAD_FILE="/base/upload/uploadFile"
VUE_APP_UPLOAD_LOGO="/base/upload/uploadLogo"
.env.dev
View file @
d192af1c
NODE_ENV="production"
VUE_APP_URL="dev"
API_ROOT="/"
VUE_APP_UPDATED="
2.1
.01"
VUE_APP_UPDATED="
3.0
.01"
VUE_APP_UPLOAD_IMG="/base/upload/uploadPicture"
VUE_APP_UPLOAD_FILE="/base/upload/uploadFile"
VUE_APP_UPLOAD_LOGO="/base/upload/uploadLogo"
public/js/version.js
0 → 100644
View file @
d192af1c
export
default
{
// 公共的js
install
(
_this
,
options
)
{
_this
.
prototype
.
version
=
process
.
env
.
VUE_APP_UPDATED
;
}
}
\ No newline at end of file
src/App.vue
View file @
d192af1c
...
...
@@ -64,6 +64,14 @@
}
});
var
version
=
this
.
version
;
//版本号(每次上线前需要更新下版本号)
console
.
log
(
'当前版本号common.js:'
,
version
)
var
vvv
=
'3.0.01'
console
.
log
(
'当前版本号app.vue:'
,
vvv
)
if
(
vvv
!=
version
){
this
.
version
=
vvv
;
location
.
reload
();
}
// var bodyTag;
// if(document.documentElement.scrollHeight
<=
document
.
documentElement
.
clientHeight
)
{
// bodyTag = document.getElementsByTagName('body')[0];
...
...
src/main.js
View file @
d192af1c
...
...
@@ -41,8 +41,10 @@ import VideoPlayer from 'vue-video-player'
import
'video.js/dist/video-js.css'
import
'vue-video-player/src/custom-theme.css'
import
cancelRequest
from
'./api/api'
import
versionJs
from
'../public/js/version'
;
Vue
.
use
(
VideoPlayer
)
Vue
.
use
(
VueCropper
)
Vue
.
use
(
versionJs
);
promise
.
polyfill
();
Vue
.
prototype
.
$md5
=
md5
Vue
.
prototype
.
wx
=
wx
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment