Commit 86510ef2 authored by Z's avatar Z

Z: Dot: Wx: OY: Info change done. Next: fix bug.

parent 934bb483
......@@ -7,10 +7,10 @@ const zlog = console.log.bind(console)
// Z-BasicInfo
let INFO = {
corpId: 'wwd1cdbca7b8b2b6c4',
agentId: '1000015',
// corpId: 'ww4df265003b43fa0d',
// agentId: '1000032',
// corpId: 'wwd1cdbca7b8b2b6c4',
// agentId: '1000015',
corpId: 'ww4df265003b43fa0d',
agentId: '1000032',
}
async function getXToken() {
......
......@@ -8,10 +8,10 @@ import envConfig from '@/config/env-config'
// const testEnv = require('../../config/dev.env')
// Z-BasicInfo
let INFO = {
corpId: 'wwd1cdbca7b8b2b6c4',
agentId: '1000015',
// corpId: 'ww4df265003b43fa0d',
// agentId: '1000032',
// corpId: 'wwd1cdbca7b8b2b6c4',
// agentId: '1000015',
corpId: 'ww4df265003b43fa0d',
agentId: '1000032',
// url: 'http://139.155.48.151:8085',
url: envConfig.appBaseUrlA,
}
......
......@@ -6,10 +6,10 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
// Z-BasicInfo
let INFO = {
corpId: 'wwd1cdbca7b8b2b6c4',
agentId: '1000015',
// corpId: 'ww4df265003b43fa0d',
// agentId: '1000032',
// corpId: 'wwd1cdbca7b8b2b6c4',
// agentId: '1000015',
corpId: 'ww4df265003b43fa0d',
agentId: '1000032',
// url: 'http://139.155.48.151:8085' + inUrl,
url: envConfig.appBaseUrlA + inUrl,
}
......
......@@ -6,7 +6,10 @@
<div class="main">
<!-- <div class="tops"></div> -->
<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 class="list" @click="listClick(item.redirect)">
<div>
......@@ -90,13 +93,13 @@ export default {
},
mounted() {
this.zReadyUserId();
// this.zTestGetNowUrlInfo();
this.zTestGetNowUrlInfo();
},
created() {
// alert(`--->home: created.`)
// this.zReadyUserId()
this.zReadyUserId();
this.zTestGetNowUrlInfo();
// this.zReadyUserId();
// this.zTestGetNowUrlInfo();
},
methods: {
zReadyUserId() {
......@@ -134,7 +137,8 @@ export default {
// alert(`--->home: zTestPreAuthCode: IN.`)
const basicInfo = {
head: "https://open.weixin.qq.com/connect/oauth2/authorize?",
appId: "wwd1cdbca7b8b2b6c4",
// appId: "wwd1cdbca7b8b2b6c4",
appId: "ww4df265003b43fa0d",
redirectUrI: encodeURIComponent("qywx2.100smartdata.com"),
responseType: "code",
scope: "snsapi_base",
......@@ -167,15 +171,28 @@ export default {
code: this.zcache.code
};
let headerData = {
agentId: "1000015",
corpId: "wwd1cdbca7b8b2b6c4"
// agentId: "1000032",
// corpId: "ww4df265003b43fa0d"
// agentId: "1000015",
// corpId: "wwd1cdbca7b8b2b6c4"
agentId: "1000032",
corpId: "ww4df265003b43fa0d"
};
// url: "http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo",
// 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);
axios({
url:
"http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code=" +
......@@ -185,12 +202,24 @@ export default {
data: postData
})
.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:" + res.data.data.userId;
sessionStorage.setItem("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.";
});
},
......
......@@ -156,7 +156,8 @@ export default {
zTestPreAuthCode() {
const basicInfo = {
head: "https://open.weixin.qq.com/connect/oauth2/authorize?",
appId: "wwd1cdbca7b8b2b6c4",
// appId: "wwd1cdbca7b8b2b6c4",
appId: "ww4df265003b43fa0d",
redirectUrI: encodeURIComponent("qywx2.100smartdata.com"),
responseType: "code",
scope: "snsapi_base",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment