Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
ybf
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
xulili
ybf
Commits
86510ef2
Commit
86510ef2
authored
Mar 19, 2020
by
Z
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Z: Dot: Wx: OY: Info change done. Next: fix bug.
parent
934bb483
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
23 deletions
+53
-23
aCommon.js
ybf_wx/src/utils/aCommon.js
+4
-4
aRequest.js
ybf_wx/src/utils/aRequest.js
+4
-4
aWxRequest.js
ybf_wx/src/utils/aWxRequest.js
+4
-4
home.vue
ybf_wx/src/views/home.vue
+39
-10
index.vue
ybf_wx/src/views/sideNav/discount/index.vue
+2
-1
No files found.
ybf_wx/src/utils/aCommon.js
View file @
86510ef2
...
@@ -7,10 +7,10 @@ const zlog = console.log.bind(console)
...
@@ -7,10 +7,10 @@ const zlog = console.log.bind(console)
// Z-BasicInfo
// Z-BasicInfo
let
INFO
=
{
let
INFO
=
{
corpId
:
'wwd1cdbca7b8b2b6c4'
,
//
corpId: 'wwd1cdbca7b8b2b6c4',
agentId
:
'1000015'
,
//
agentId: '1000015',
//
corpId: 'ww4df265003b43fa0d',
corpId
:
'ww4df265003b43fa0d'
,
//
agentId: '1000032',
agentId
:
'1000032'
,
}
}
async
function
getXToken
()
{
async
function
getXToken
()
{
...
...
ybf_wx/src/utils/aRequest.js
View file @
86510ef2
...
@@ -8,10 +8,10 @@ import envConfig from '@/config/env-config'
...
@@ -8,10 +8,10 @@ import envConfig from '@/config/env-config'
// const testEnv = require('../../config/dev.env')
// const testEnv = require('../../config/dev.env')
// Z-BasicInfo
// Z-BasicInfo
let
INFO
=
{
let
INFO
=
{
corpId
:
'wwd1cdbca7b8b2b6c4'
,
//
corpId: 'wwd1cdbca7b8b2b6c4',
agentId
:
'1000015'
,
//
agentId: '1000015',
//
corpId: 'ww4df265003b43fa0d',
corpId
:
'ww4df265003b43fa0d'
,
//
agentId: '1000032',
agentId
:
'1000032'
,
// url: 'http://139.155.48.151:8085',
// url: 'http://139.155.48.151:8085',
url
:
envConfig
.
appBaseUrlA
,
url
:
envConfig
.
appBaseUrlA
,
}
}
...
...
ybf_wx/src/utils/aWxRequest.js
View file @
86510ef2
...
@@ -6,10 +6,10 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
...
@@ -6,10 +6,10 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
// Z-BasicInfo
// Z-BasicInfo
let
INFO
=
{
let
INFO
=
{
corpId
:
'wwd1cdbca7b8b2b6c4'
,
//
corpId: 'wwd1cdbca7b8b2b6c4',
agentId
:
'1000015'
,
//
agentId: '1000015',
//
corpId: 'ww4df265003b43fa0d',
corpId
:
'ww4df265003b43fa0d'
,
//
agentId: '1000032',
agentId
:
'1000032'
,
// url: 'http://139.155.48.151:8085' + inUrl,
// url: 'http://139.155.48.151:8085' + inUrl,
url
:
envConfig
.
appBaseUrlA
+
inUrl
,
url
:
envConfig
.
appBaseUrlA
+
inUrl
,
}
}
...
...
ybf_wx/src/views/home.vue
View file @
86510ef2
...
@@ -6,7 +6,10 @@
...
@@ -6,7 +6,10 @@
<div
class=
"main"
>
<div
class=
"main"
>
<!--
<div
class=
"tops"
></div>
-->
<!--
<div
class=
"tops"
></div>
-->
<div
class=
"lists"
>
<div
class=
"lists"
>
<div
v-if=
"this.$route.query.code !== undefined"
style=
"font-size: 14px;"
>
Code:
{{
this
.
$route
.
query
.
code
}}
</div>
<div
v-if=
"this.$route.query.code !== undefined"
style=
"font-size: 14px;"
>
Code:
{{
this
.
$route
.
query
.
code
}}
</div>
<div
v-for=
"(item, index) of list.main"
:key=
"index"
>
<div
v-for=
"(item, index) of list.main"
:key=
"index"
>
<div
class=
"list"
@
click=
"listClick(item.redirect)"
>
<div
class=
"list"
@
click=
"listClick(item.redirect)"
>
<div>
<div>
...
@@ -90,13 +93,13 @@ export default {
...
@@ -90,13 +93,13 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
zReadyUserId
();
this
.
zReadyUserId
();
//
this.zTestGetNowUrlInfo();
this
.
zTestGetNowUrlInfo
();
},
},
created
()
{
created
()
{
// alert(`--->home: created.`)
// alert(`--->home: created.`)
// this.zReadyUserId()
// this.zReadyUserId()
this
.
zReadyUserId
();
//
this.zReadyUserId();
this
.
zTestGetNowUrlInfo
();
//
this.zTestGetNowUrlInfo();
},
},
methods
:
{
methods
:
{
zReadyUserId
()
{
zReadyUserId
()
{
...
@@ -134,7 +137,8 @@ export default {
...
@@ -134,7 +137,8 @@ export default {
// alert(`--->home: zTestPreAuthCode: IN.`)
// alert(`--->home: zTestPreAuthCode: IN.`)
const
basicInfo
=
{
const
basicInfo
=
{
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
appId
:
"wwd1cdbca7b8b2b6c4"
,
// appId: "wwd1cdbca7b8b2b6c4",
appId
:
"ww4df265003b43fa0d"
,
redirectUrI
:
encodeURIComponent
(
"qywx2.100smartdata.com"
),
redirectUrI
:
encodeURIComponent
(
"qywx2.100smartdata.com"
),
responseType
:
"code"
,
responseType
:
"code"
,
scope
:
"snsapi_base"
,
scope
:
"snsapi_base"
,
...
@@ -167,15 +171,28 @@ export default {
...
@@ -167,15 +171,28 @@ export default {
code
:
this
.
zcache
.
code
code
:
this
.
zcache
.
code
};
};
let
headerData
=
{
let
headerData
=
{
agentId
:
"1000015"
,
//
agentId: "1000015",
corpId
:
"wwd1cdbca7b8b2b6c4"
//
corpId: "wwd1cdbca7b8b2b6c4"
//
agentId: "1000032",
agentId
:
"1000032"
,
//
corpId: "ww4df265003b43fa0d"
corpId
:
"ww4df265003b43fa0d"
};
};
// url: "http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo",
// url: "http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo",
// headers: header,
// headers: header,
alert
(
`--->home.vue: zTestGetUserInfoByOldToken: postData =
${
JSON
.
stringify
(
postData
)}
`
);
alert
(
`--->home.vue: zTestGetUserInfoByOldToken: headerData =
${
JSON
.
stringify
(
headerData
)}
`
);
this
.
zcache
.
userInfoResOld
=
"PostData:"
+
JSON
.
stringify
(
postData
);
this
.
zcache
.
userInfoResOld
=
"PostData:"
+
JSON
.
stringify
(
postData
);
axios
({
axios
({
url
:
url
:
"http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code="
+
"http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code="
+
...
@@ -185,12 +202,24 @@ export default {
...
@@ -185,12 +202,24 @@ export default {
data
:
postData
data
:
postData
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
alert
(
`--->home.vue: zTestGetUserInfoByOldToken: axios: res.`
);
alert
(
`--->home.vue: zTestGetUserInfoByOldToken: axios: res =
${
JSON
.
stringify
(
res
)}
`
);
// this.zcache.userInfoResNew = "RESOK:" + JSON.stringify(res.data);
// this.zcache.userInfoResNew = "RESOK:" + JSON.stringify(res.data);
this
.
zcache
.
userInfoResNew
=
"RESOK:"
+
res
.
data
.
data
.
userId
;
this
.
zcache
.
userInfoResNew
=
"RESOK:"
+
res
.
data
.
data
.
userId
;
sessionStorage
.
setItem
(
"userId"
,
String
(
res
.
data
.
data
.
userId
));
sessionStorage
.
setItem
(
"userId"
,
String
(
res
.
data
.
data
.
userId
));
this
.
zcache
.
userId
=
String
(
res
.
data
.
data
.
userId
);
this
.
zcache
.
userId
=
String
(
res
.
data
.
data
.
userId
);
})
})
.
catch
(
res
=>
{
.
catch
(
err
=>
{
alert
(
`--->home.vue: zTestGetUserInfoByOldToken: axios: err.`
);
alert
(
`--->home.vue: zTestGetUserInfoByOldToken: axios: res =
${
JSON
.
stringify
(
err
)}
`
);
this
.
zcache
.
userInfoResNew
=
"RESERR."
;
this
.
zcache
.
userInfoResNew
=
"RESERR."
;
});
});
},
},
...
...
ybf_wx/src/views/sideNav/discount/index.vue
View file @
86510ef2
...
@@ -156,7 +156,8 @@ export default {
...
@@ -156,7 +156,8 @@ export default {
zTestPreAuthCode
()
{
zTestPreAuthCode
()
{
const
basicInfo
=
{
const
basicInfo
=
{
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
appId
:
"wwd1cdbca7b8b2b6c4"
,
// appId: "wwd1cdbca7b8b2b6c4",
appId
:
"ww4df265003b43fa0d"
,
redirectUrI
:
encodeURIComponent
(
"qywx2.100smartdata.com"
),
redirectUrI
:
encodeURIComponent
(
"qywx2.100smartdata.com"
),
responseType
:
"code"
,
responseType
:
"code"
,
scope
:
"snsapi_base"
,
scope
:
"snsapi_base"
,
...
...
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