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) ...@@ -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() {
......
...@@ -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,
} }
......
...@@ -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,
} }
......
...@@ -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.";
}); });
}, },
......
...@@ -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",
......
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