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
8204ab2f
Commit
8204ab2f
authored
May 21, 2020
by
anxixi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
5261b8b1
2f2b8630
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
121 additions
and
17 deletions
+121
-17
.env
.env
+1
-1
.env.dev
.env.dev
+1
-1
phone.scss
public/css/phone.scss
+2
-0
version.js
public/js/version.js
+6
-0
App.vue
src/App.vue
+8
-0
api.js
src/api/api.js
+0
-0
public.js
src/assets/js/public.js
+14
-7
main.js
src/main.js
+11
-0
emailLoginCmpt.vue
src/views/loginregister/pages/emailLoginCmpt.vue
+19
-0
mobileLoginCmpt.vue
src/views/loginregister/pages/mobileLoginCmpt.vue
+21
-1
detail.vue
src/views/mobile/article/detail.vue
+2
-2
list.vue
src/views/mobile/article/list.vue
+1
-0
index.vue
src/views/mobile/index/index.vue
+1
-1
loginByEmail.vue
src/views/mobile/loginregister/loginByEmail.vue
+13
-0
loginByPhone.vue
src/views/mobile/loginregister/loginByPhone.vue
+14
-0
search.vue
src/views/mobile/search/search.vue
+6
-3
vue.config.js
vue.config.js
+1
-1
No files found.
.env
View file @
8204ab2f
NODE_ENV="production"
VUE_APP_URL="prod"
API_ROOT="/"
VUE_APP_UPDATED="
2.1.01
"
VUE_APP_UPDATED="
3.0.02
"
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 @
8204ab2f
NODE_ENV="production"
VUE_APP_URL="dev"
API_ROOT="/"
VUE_APP_UPDATED="
2.1.01
"
VUE_APP_UPDATED="
3.0.02
"
VUE_APP_UPLOAD_IMG="/base/upload/uploadPicture"
VUE_APP_UPLOAD_FILE="/base/upload/uploadFile"
VUE_APP_UPLOAD_LOGO="/base/upload/uploadLogo"
public/css/phone.scss
View file @
8204ab2f
...
...
@@ -710,6 +710,7 @@ i, em {
height
:
1
.54rem
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
backgroung-position
:
50%
center
;
}
.leftInfo
{
width
:calc
(
100
%
-
2
.32rem
)
;
...
...
@@ -755,6 +756,7 @@ i, em {
height
:
1
.54rem
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
backgroung-position
:
50%
center
;
}
}
}
...
...
public/js/version.js
0 → 100644
View file @
8204ab2f
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 @
8204ab2f
...
...
@@ -64,6 +64,14 @@
}
});
var
version
=
this
.
version
;
//版本号(每次上线前需要更新下版本号)
console
.
log
(
'当前版本号common.js:'
,
version
)
var
vvv
=
'3.0.02'
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/api/api.js
View file @
8204ab2f
This diff is collapsed.
Click to expand it.
src/assets/js/public.js
View file @
8204ab2f
...
...
@@ -417,13 +417,20 @@ export default {
//判断是否在微信
if
(
ua
.
match
(
/MicroMessenger/i
)
==
"micromessenger"
)
{
//判断是否在小程序
wx
.
miniProgram
.
getEnv
((
res
)
=>
{
if
(
res
.
miniprogram
)
{
flag
=
'cc276b08'
;
}
else
{
flag
=
'bbc5d0ee'
;
}
})
var
isMini
=
/miniProgram/i
.
test
(
userAgentInfo
);
if
(
isMini
){
flag
=
'cc276b08'
;
}
else
{
flag
=
'bbc5d0ee'
;
}
// wx.miniProgram.getEnv((res)=>{
// if (res.miniprogram) {
// flag = 'cc276b08';
// } else {
// flag = 'bbc5d0ee';
// }
// })
}
else
{
flag
=
'bbc5d0ee'
;
}
...
...
src/main.js
View file @
8204ab2f
...
...
@@ -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
...
...
@@ -236,6 +238,15 @@ router.beforeEach((to, from, next) => {
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
});
router
.
onError
((
error
)
=>
{
const
pattern
=
/Loading chunk
(\d)
+ failed/g
;
const
isChunkLoadFailed
=
error
.
message
.
match
(
pattern
);
const
targetPath
=
router
.
history
.
pending
.
fullPath
;
if
(
isChunkLoadFailed
)
{
router
.
replace
(
targetPath
);
}
});
// 为了实现Class的私有属性
const
showMessage
=
Symbol
(
'showMessage'
)
...
...
src/views/loginregister/pages/emailLoginCmpt.vue
View file @
8204ab2f
...
...
@@ -36,8 +36,27 @@
this
.
showMessageInfo
=
false
;
}
// else this.$refs["emailForm"].resetFields();
},
isNeedMessage
(){
var
data
=
window
.
sessionStorage
.
getItem
(
"errorMsg"
);
if
(
data
){
this
.
$alert
(
data
,
{
confirmButtonText
:
this
.
$t
(
"commonTips.confirm"
),
center
:
true
,
customClass
:
'alertDialog'
,
callback
:
action
=>
{
window
.
localStorage
.
clear
();
window
.
sessionStorage
.
clear
();
this
.
publicFun
.
delCookie
();
}
});
}
}
},
created
(){
this
.
isNeedMessage
();
}
}
</
script
>
...
...
src/views/loginregister/pages/mobileLoginCmpt.vue
View file @
8204ab2f
...
...
@@ -26,7 +26,27 @@
activeName
:
"first"
,
}
},
methods
:
{}
methods
:
{
isNeedMessage
(){
var
data
=
window
.
sessionStorage
.
getItem
(
"errorMsg"
);
if
(
data
){
this
.
$alert
(
data
,
{
confirmButtonText
:
this
.
$t
(
"commonTips.confirm"
),
center
:
true
,
customClass
:
'alertDialog'
,
callback
:
action
=>
{
window
.
localStorage
.
clear
();
window
.
sessionStorage
.
clear
();
this
.
publicFun
.
delCookie
();
}
});
}
}
},
created
(){
this
.
isNeedMessage
();
}
}
</
script
>
...
...
src/views/mobile/article/detail.vue
View file @
8204ab2f
...
...
@@ -143,10 +143,10 @@
<div
class=
"commentInput"
v-if=
"articleInfo&&!$route.query.isShow"
>
<div>
<p
@
click=
"handleScore()"
v-if=
"isCanComment"
>
<i
class=
"iconfont icon-weibiaoti--"
></i><span>
点评有礼
</span>
<i
class=
"iconfont icon-weibiaoti--"
></i><span>
写评论
</span>
</p>
<p
@
click=
"handleTips()"
v-if=
"!isCanComment"
>
<i
class=
"iconfont icon-weibiaoti--"
></i><span>
点评有礼
</span>
<i
class=
"iconfont icon-weibiaoti--"
></i><span>
写评论
</span>
</p>
</div>
...
...
src/views/mobile/article/list.vue
View file @
8204ab2f
...
...
@@ -488,6 +488,7 @@
margin
:
0
.035rem
;
background-repeat
:
no-repeat
;
background-size
:
cover
;
backgroung-position
:
50%
center
;
}
}
}
...
...
src/views/mobile/index/index.vue
View file @
8204ab2f
...
...
@@ -529,7 +529,7 @@
getArticleInfoData
(){
let
params
=
{
count
:
5
count
:
6
};
api
.
getArticleListAxios
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
...
...
src/views/mobile/loginregister/loginByEmail.vue
View file @
8204ab2f
...
...
@@ -55,6 +55,16 @@
handleWechatLogin
(){
var
url
=
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#/newPage"
;
window
.
location
.
href
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx725d0e129f703106&redirect_uri="
+
encodeURIComponent
(
url
)
+
"&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect"
;
},
isNeedMessage
(){
var
data
=
window
.
sessionStorage
.
getItem
(
"errorMsg"
);
if
(
data
){
Toast
(
data
);
window
.
localStorage
.
clear
();
window
.
sessionStorage
.
clear
();
this
.
publicFun
.
delCookie
();
}
}
},
...
...
@@ -63,6 +73,9 @@
vm
.
pathfrom
=
vm
.
publicFun
.
getCookie
(
"selected"
)
==
"mine"
?
'/mine'
:
from
.
fullPath
;
})
},
created
(){
this
.
isNeedMessage
();
}
}
</
script
>
...
...
src/views/mobile/loginregister/loginByPhone.vue
View file @
8204ab2f
...
...
@@ -22,6 +22,7 @@
import
mbByPwdCmpt
from
'./phonePwdCmpt'
import
mbByCodeCmpt
from
'./phoneCodeCmpt'
;
import
breadBottom
from
'../../../components/mobile/breadBottom'
;
import
{
Toast
,
MessageBox
}
from
'mint-ui'
;
export
default
{
name
:
"loginByPhone"
,
components
:{
...
...
@@ -45,6 +46,16 @@
handleWechatLogin
(){
var
url
=
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#/newPage"
;
window
.
location
.
href
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx725d0e129f703106&redirect_uri="
+
encodeURIComponent
(
url
)
+
"&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect"
;
},
isNeedMessage
(){
var
data
=
window
.
sessionStorage
.
getItem
(
"errorMsg"
);
if
(
data
){
Toast
(
data
);
window
.
localStorage
.
clear
();
window
.
sessionStorage
.
clear
();
this
.
publicFun
.
delCookie
();
}
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
...
...
@@ -52,6 +63,9 @@
vm
.
pathfrom
=
vm
.
publicFun
.
getCookie
(
"selected"
)
==
"mine"
?
'/mine'
:
from
.
fullPath
;
})
},
created
(){
this
.
isNeedMessage
();
}
}
</
script
>
...
...
src/views/mobile/search/search.vue
View file @
8204ab2f
...
...
@@ -47,11 +47,11 @@
</div>
</div>
</div>
<div
class=
"searchContentHasDataWrap"
v-if=
"canSearch"
:style=
"
{overflow:hasData?'auto':'hidden'}">
<div
class=
"searchContentHasDataWrap"
v-if=
"canSearch"
:style=
"
{overflow:hasData?'auto':
currentIndex==3
&&
totalArticleData==0||totalPage==page?'auto':
'hidden'}">
<div
:class=
"currentIndex==3?'noPositionList':'newcontentList'"
ref=
"newcontentList"
<div
:class=
"currentIndex==3?'noPositionList':'newcontentList'"
ref=
"newcontentList"
:style=
"
{paddingBottom:currentIndex==3
&&
totalArticleData==0||totalPage==page?'.5rem':'2.2rem'}"
v-if="tableData"
:style=
"
{height:currentIndex==3?(totalPage==1||totalPage==page?'unset':'100vh'):'100%'}"
>
>
<div
class=
"searchResultCount"
v-if=
"!hasData"
>
<span
v-if=
"lang==1&¤tIndex==0"
>
共搜到
<span
class=
"count"
>
{{
totalProjectData
}}
</span>
个项目
</span>
...
...
@@ -964,6 +964,7 @@
.newcontentList
{
top
:
0
;
left
:
0
;
padding-bottom
:
2
.2rem
;
}
}
...
...
@@ -1225,6 +1226,8 @@
.noPositionList
{
width
:
100%
;
height
:
100%
;
padding-bottom
:
2
.2rem
;
overflow
:
auto
;
-webkit-overflow-scrolling
:
touch
;
margin-top
:
1rem
;
...
...
vue.config.js
View file @
8204ab2f
...
...
@@ -64,7 +64,7 @@ module.exports = {
new
CompressionWebpackPlugin
({
filename
:
'[path].gz[query]'
,
algorithm
:
'gzip'
,
deleteOriginalAssets
:
tru
e
,
// 删除原文件
deleteOriginalAssets
:
fals
e
,
// 删除原文件
test
:
new
RegExp
(
'
\\
.('
+
productionGzipExtensions
.
join
(
'|'
)
+
')$'
),
threshold
:
10240
,
minRatio
:
0.8
...
...
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