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
6c39e25a
Commit
6c39e25a
authored
Mar 05, 2021
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
授权相关去#试一下
parent
8b6b097a
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
27 additions
and
35 deletions
+27
-35
notFind.html
public/notFind.html
+1
-1
notServer.html
public/notServer.html
+1
-1
applyLogin.vue
src/components/mobile/applyLogin.vue
+1
-1
shareActCmpt.vue
src/components/shareActCmpt.vue
+1
-1
list.vue
src/views/mobile/industryReport/list.vue
+5
-5
authPage.vue
src/views/mobile/loginregister/authPage.vue
+8
-8
exchangeAuthPage.vue
src/views/mobile/loginregister/exchangeAuthPage.vue
+4
-4
loginByEmail.vue
src/views/mobile/loginregister/loginByEmail.vue
+1
-1
newPage.vue
src/views/mobile/loginregister/newPage.vue
+0
-8
secondStage.vue
src/views/mobile/proFeedback/secondStage.vue
+2
-2
detail.vue
src/views/mobile/topic/detail.vue
+2
-2
list.vue
src/views/mobile/topic/list.vue
+1
-1
No files found.
public/notFind.html
View file @
6c39e25a
...
...
@@ -104,7 +104,7 @@
};
function
handleToHome
()
{
self
.
location
=
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#/"
;
self
.
location
=
document
.
location
.
origin
;
}
...
...
public/notServer.html
View file @
6c39e25a
...
...
@@ -99,7 +99,7 @@
};
function
handleToHome
()
{
self
.
location
=
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#/"
;
self
.
location
=
document
.
location
.
origin
;
}
...
...
src/components/mobile/applyLogin.vue
View file @
6c39e25a
...
...
@@ -337,7 +337,7 @@
},
handleWechatLogin
()
{
var
url
=
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/newPage"
;
var
url
=
document
.
location
.
origin
+
"
/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"
;
},
},
...
...
src/components/shareActCmpt.vue
View file @
6c39e25a
...
...
@@ -119,7 +119,7 @@
let
query
=
this
.
$route
.
query
;
switch
(
this
.
pageType
)
{
case
1
:
successVal
=
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/activitydetail?page="
+
this
.
$route
.
query
.
page
+
"&id="
+
this
.
$route
.
query
.
id
+
"&isDetail=true"
+
"&isApply="
+
this
.
$route
.
query
.
isApply
+
"&type="
+
this
.
$route
.
query
.
type
+
"&lang="
+
this
.
lang
;
successVal
=
document
.
location
.
origin
+
"
/activitydetail?page="
+
this
.
$route
.
query
.
page
+
"&id="
+
this
.
$route
.
query
.
id
+
"&isDetail=true"
+
"&isApply="
+
this
.
$route
.
query
.
isApply
+
"&type="
+
this
.
$route
.
query
.
type
+
"&lang="
+
this
.
lang
;
urlData
=
this
.
$route
.
name
==
'activitydetail'
?
document
.
location
.
href
+
"&lang="
+
this
.
lang
:
successVal
;
break
;
case
2
:
...
...
src/views/mobile/industryReport/list.vue
View file @
6c39e25a
...
...
@@ -184,7 +184,7 @@
//
var
userAgent
=
navigator
.
userAgent
,
shareUrl
;
var
isMini
=
/miniProgram/i
.
test
(
userAgent
);
var
urlData
=
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"?lang="
+
this
.
lang
;
var
urlData
=
(
document
.
location
.
origin
+
"
/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"?lang="
+
this
.
lang
;
if
(
isMini
)
{
if
(
data
==
2
)
{
shareUrl
=
'/pages/industryReport/industryReport?isShareIndustryReport=true&url='
+
JSON
.
stringify
(
query
);
...
...
@@ -229,7 +229,7 @@
call
(
data
,
command
)
{
this
.
currentData
=
data
;
let
query
=
this
.
$route
.
query
,
hrefUrl
=
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"&lang="
+
this
.
lang
;
let
query
=
this
.
$route
.
query
,
hrefUrl
=
(
document
.
location
.
origin
+
"
/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"&lang="
+
this
.
lang
;
query
.
title
=
data
.
reportTitle
;
query
.
lang
=
this
.
lang
;
query
.
rDeviceId
=
this
.
publicFun
.
getCookie
(
"getGuid32"
);
...
...
@@ -384,7 +384,7 @@
title
:
data
.
reportTitle
,
desc
:
this
.
$t
(
"shareInfo.industryReportZy"
),
img
:
this
.
lang
==
1
?
(
this
.
frontImgUrl
+
"/public/industryReportShareZh.jpg"
)
:
(
this
.
frontImgUrl
+
"/public/industryReportShareEn.jpg"
),
link
:
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"&rDeviceId="
+
this
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
this
.
userInfo
?
this
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType="
link
:
(
document
.
location
.
origin
+
"
/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"&rDeviceId="
+
this
.
publicFun
.
getCookie
(
"getGuid32"
)
+
"&rEmpId="
+
(
this
.
userInfo
?
this
.
userInfo
.
empId
:
undefined
)
+
"&rTargetType="
}
if
(
Object
.
keys
(
this
.
configVal
).
length
!=
0
)
{
this
.
isShare
=
true
;
...
...
@@ -393,7 +393,7 @@
}
var
that
=
this
;
if
(
this
.
currentData
)
{
var
url
=
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
;
var
url
=
(
document
.
location
.
origin
+
"
/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
;
let
dataValObj
=
{
title
:
this
.
currentData
.
reportTitle
,
// 分享标题 that.detailInfo.projectName
...
...
@@ -581,7 +581,7 @@
});
if
(
this
.
currentData
)
{
var
hrefUrl
=
(
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"&lang="
+
this
.
lang
;
var
hrefUrl
=
(
document
.
location
.
origin
+
"
/industryReportDetail"
)
+
"?id="
+
this
.
currentData
.
reportId
+
"&lang="
+
this
.
lang
;
let
dataVal
=
{
title
:
that
.
currentData
.
reportTitle
,
// 分享标题
...
...
src/views/mobile/loginregister/authPage.vue
View file @
6c39e25a
...
...
@@ -22,11 +22,11 @@
val
.
forEach
((
item
)
=>
{
arr
.
push
(
item
.
split
(
"="
)[
1
]);
})
if
(
document
.
location
.
href
.
split
(
"#"
)[
0
].
indexOf
(
"index.html"
)
>-
1
){
window
.
location
.
href
=
document
.
location
.
href
.
split
(
"#"
)[
0
].
split
(
"?"
)[
0
]
+
"#
/authPage?code="
+
arr
[
0
]
+
"&state="
+
arr
[
1
];
}
else
{
window
.
location
.
href
=
document
.
location
.
href
.
split
(
"/#"
)[
0
].
split
(
"?"
)[
0
]
+
"/#/authPage?code="
+
arr
[
0
]
+
"&state="
+
arr
[
1
];
}
//
if(document.location.href.split("#")[0].indexOf("index.html")>-1){
// window.location.href = document.location.origin+"
/authPage?code="+arr[0]+"&state="+arr[1];
//
}else{
//
window.location.href = document.location.href.split("/#")[0].split("?")[0]+"/#/authPage?code="+arr[0]+"&state="+arr[1];
//
}
var
_this
=
this
;
setTimeout
(
function
(){
if
(
arr
[
0
]
!=
null
||
arr
[
0
]
!=
undefined
){
...
...
@@ -44,16 +44,16 @@
_this
.
publicFun
.
setUserInfoCookieType
(
that
.
Base64
.
encode
(
JSON
.
stringify
(
res
.
result
)));
globalMsg
.
$emit
(
"getUserInfo"
);
_this
.
publicFun
.
setUserInfoCookie
(
"openId"
,
res
.
result
.
openId
);
window
.
location
.
href
=
document
.
location
.
href
.
split
(
"#"
)[
0
].
split
(
"?"
)[
0
]
+
"#
/redEnvelopeActJoin?id="
+
_this
.
publicFun
.
getCookie
(
"currentChannelId"
)
+
"&flag=6"
;
window
.
location
.
href
=
document
.
location
.
origin
+
"
/redEnvelopeActJoin?id="
+
_this
.
publicFun
.
getCookie
(
"currentChannelId"
)
+
"&flag=6"
;
globalMsg
.
$emit
(
"postFlagIsReturn"
,
true
);
}
else
{
if
(
res
.
msg
!=
null
){
that
.
publicFun
.
setUserInfoCookie
(
"openId"
,
res
.
msg
);
window
.
location
.
href
=
document
.
location
.
href
.
split
(
"#"
)[
0
].
split
(
"?"
)[
0
]
+
"#
/redEnvelopeActDetail?id="
+
_this
.
publicFun
.
getCookie
(
"currentChannelId"
);
window
.
location
.
href
=
document
.
location
.
origin
+
"
/redEnvelopeActDetail?id="
+
_this
.
publicFun
.
getCookie
(
"currentChannelId"
);
// _this.$router.push({path:"/redEnvelopeActDetail",query:{id:this.publicFun.getCookie("currentChannelId")}});
}
else
{
window
.
history
.
go
(
-
1
);
// window.location.href = document.location.
href.split("#")[0].split("?")[0]+"#
/activitylist";
// window.location.href = document.location.
origin+"
/activitylist";
}
}
}
else
{
...
...
src/views/mobile/loginregister/exchangeAuthPage.vue
View file @
6c39e25a
...
...
@@ -23,7 +23,7 @@
arr
.
push
(
item
.
split
(
"="
)[
1
]);
})
if
(
document
.
location
.
href
.
split
(
"#"
)[
0
].
indexOf
(
"index.html"
)
>-
1
){
window
.
location
.
href
=
document
.
location
.
href
.
split
(
"#"
)[
0
].
split
(
"?"
)[
0
]
+
"#
/exchangeAuthPage?code="
+
arr
[
0
]
+
"&state="
+
arr
[
1
];
window
.
location
.
href
=
document
.
location
.
origin
+
"
/exchangeAuthPage?code="
+
arr
[
0
]
+
"&state="
+
arr
[
1
];
}
else
{
window
.
location
.
href
=
document
.
location
.
href
.
split
(
"/#"
)[
0
].
split
(
"?"
)[
0
]
+
"/#/exchangeAuthPage?code="
+
arr
[
0
]
+
"&state="
+
arr
[
1
];
}
...
...
@@ -44,16 +44,16 @@
_this
.
publicFun
.
setUserInfoCookieType
(
that
.
Base64
.
encode
(
JSON
.
stringify
(
res
.
result
)));
globalMsg
.
$emit
(
"getUserInfo"
);
_this
.
publicFun
.
setUserInfoCookie
(
"openId"
,
res
.
result
.
openId
);
window
.
location
.
href
=
document
.
location
.
href
.
split
(
"#"
)[
0
].
split
(
"?"
)[
0
]
+
"#
/integralExchange"
;
window
.
location
.
href
=
document
.
location
.
origin
+
"
/integralExchange"
;
globalMsg
.
$emit
(
"postFlagIsReturn"
,
true
);
}
else
{
if
(
res
.
msg
!=
null
){
that
.
publicFun
.
setUserInfoCookie
(
"openId"
,
res
.
msg
);
window
.
location
.
href
=
document
.
location
.
href
.
split
(
"#"
)[
0
].
split
(
"?"
)[
0
]
+
"#
/integralExchange"
;
window
.
location
.
href
=
document
.
location
.
origin
+
"
/integralExchange"
;
// _this.$router.push({path:"/redEnvelopeActDetail",query:{id:this.publicFun.getCookie("currentChannelId")}});
}
else
{
window
.
history
.
go
(
-
1
);
// window.location.href = document.location.
href.split("#")[0].split("?")[0]+"#
/activitylist";
// window.location.href = document.location.
origin+"
/activitylist";
}
}
}
else
{
...
...
src/views/mobile/loginregister/loginByEmail.vue
View file @
6c39e25a
...
...
@@ -53,7 +53,7 @@
},
handleWechatLogin
(){
var
url
=
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/newPage"
;
var
url
=
document
.
location
.
origin
+
"
/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"
;
},
...
...
src/views/mobile/loginregister/newPage.vue
View file @
6c39e25a
...
...
@@ -17,11 +17,7 @@
val
.
forEach
((
item
)
=>
{
arr
.
push
(
item
.
split
(
"="
)[
1
]);
})
console
.
log
(
val
)
console
.
log
(
arr
)
// window.location.href = document.location.origin+"/newPage?code="+arr[0]+"&state="+arr[1];
console
.
log
(
document
.
location
.
origin
)
console
.
log
(
document
.
location
.
origin
+
"/newPage?code="
+
arr
[
0
]
+
"&state="
+
arr
[
1
])
// if(document.location.href.split("#")[0].indexOf("index.html")>-1){
// window.location.href = document.location.href.split("#")[0].split("?")[0]+"#/newPage?code="+arr[0]+"&state="+arr[1];
// }else{
...
...
@@ -36,9 +32,7 @@
}
api
.
wechatLoginAxios
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
console
.
log
(
"调借口了"
)
if
(
res
.
result
!=
null
){
console
.
log
(
"进来1"
)
if
(
_this
.
publicFun
.
getUserInfoCookieType
()){
_this
.
publicFun
.
removeCookieType
();
}
...
...
@@ -48,9 +42,7 @@
_this
.
publicFun
.
setUserInfoCookie
(
"selected"
,
"index"
);
globalMsg
.
$emit
(
"sendSelected"
,
"index"
);
}
else
{
console
.
log
(
"进来2"
)
if
(
res
.
msg
!=
null
){
console
.
log
(
"进来3"
)
that
.
$router
.
push
({
path
:
"/bindAccount"
,
query
:{
id
:
res
.
msg
}});
}
else
{
window
.
location
.
href
=
document
.
location
.
origin
+
"/loginByPhone"
;
...
...
src/views/mobile/proFeedback/secondStage.vue
View file @
6c39e25a
...
...
@@ -292,7 +292,7 @@
//
var
userAgent
=
navigator
.
userAgent
,
shareUrl
;
var
isMini
=
/miniProgram/i
.
test
(
userAgent
);
var
urlData
=
this
.
isActivityList
?
document
.
location
.
href
:
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/secondStageDetail?subId="
+
that
.
currentData
.
id
+
"&proId="
+
that
.
currentData
.
projectId
+
"&activityId="
+
that
.
$route
.
query
.
id
+
"&stage="
+
this
.
$route
.
query
.
stage
;
var
urlData
=
this
.
isActivityList
?
document
.
location
.
href
:
document
.
location
.
origin
+
"
/secondStageDetail?subId="
+
that
.
currentData
.
id
+
"&proId="
+
that
.
currentData
.
projectId
+
"&activityId="
+
that
.
$route
.
query
.
id
+
"&stage="
+
this
.
$route
.
query
.
stage
;
query
.
isList
=
this
.
isActivityList
;
query
.
proId
=
that
.
currentData
.
projectId
;
query
.
activityId
=
that
.
$route
.
query
.
id
;
...
...
@@ -551,7 +551,7 @@
this
.
isActivityList
=
false
;
this
.
currentData
=
item
;
if
(
this
.
currentData
){
var
url
=
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/secondStageDetail?subId="
+
that
.
currentData
.
id
+
"&proId="
+
that
.
currentData
.
projectId
+
"&activityId="
+
that
.
$route
.
query
.
id
+
"&stage="
+
this
.
$route
.
query
.
stage
;
var
url
=
document
.
location
.
origin
+
"
/secondStageDetail?subId="
+
that
.
currentData
.
id
+
"&proId="
+
that
.
currentData
.
projectId
+
"&activityId="
+
that
.
$route
.
query
.
id
+
"&stage="
+
this
.
$route
.
query
.
stage
;
let
dataValObj
=
{
title
:
"我正在TechBook参与项目评选活动,快来给我打分吧,让我的项目成为明日之星!"
,
// 分享标题 that.detailInfo.projectName
...
...
src/views/mobile/topic/detail.vue
View file @
6c39e25a
...
...
@@ -1225,7 +1225,7 @@
//
var
userAgent
=
navigator
.
userAgent
,
shareUrl
;
var
isMini
=
/miniProgram/i
.
test
(
userAgent
);
var
urlData
=
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/topicDetails?id="
+
that
.
topicInfo
.
topicId
;
var
urlData
=
document
.
location
.
origin
+
"
/topicDetails?id="
+
that
.
topicInfo
.
topicId
;
if
(
isMini
)
{
that
.
dialogVisible
=
true
;
let
dataVal
=
{
...
...
@@ -1300,7 +1300,7 @@
this
.
currentData
=
data
;
this
.
isShareAll
=
false
;
let
query
=
this
.
$route
.
query
,
resultTitle
;
var
urlData
=
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/topicDetails?id="
+
this
.
topicInfo
.
topicId
;
var
urlData
=
document
.
location
.
origin
+
"
/topicDetails?id="
+
this
.
topicInfo
.
topicId
;
var
str
=
this
.
publicFun
.
isHasTopicTitle
(
"#"
,
data
.
discussContent
);
var
simpleContent
=
data
.
pcState
==
0
?
this
.
publicFun
.
getTitlewith
(
data
.
discussContent
,
data
.
projectList
):
this
.
publicFun
.
getTitlewith
(
data
.
simpleContent
,
data
.
projectList
);
...
...
src/views/mobile/topic/list.vue
View file @
6c39e25a
...
...
@@ -375,7 +375,7 @@
//
var
userAgent
=
navigator
.
userAgent
,
shareUrl
;
var
isMini
=
/miniProgram/i
.
test
(
userAgent
);
var
urlData
=
document
.
location
.
href
.
split
(
"#/"
)[
0
]
+
"#
/topicList"
;
var
urlData
=
document
.
location
.
origin
+
"
/topicList"
;
if
(
isMini
)
{
that
.
dialogVisible
=
true
;
let
dataVal
=
{
...
...
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