|
@@ -68,14 +68,15 @@
|
|
import asyncRequest from "@/api/report";
|
|
import asyncRequest from "@/api/report";
|
|
import userRequest from "@/api/index"
|
|
import userRequest from "@/api/index"
|
|
import setHeight from "@/mixins/index";
|
|
import setHeight from "@/mixins/index";
|
|
|
|
+import { getParameterByName } from "../utils/auth";
|
|
|
|
+import UnusualState from "@/components/unusual/index.vue"
|
|
|
|
+
|
|
import {
|
|
import {
|
|
mapResponseCompletionCompanyName,
|
|
mapResponseCompletionCompanyName,
|
|
unit2TenThousand,
|
|
unit2TenThousand,
|
|
getCompanyLabel,
|
|
getCompanyLabel,
|
|
addition
|
|
addition
|
|
} from "@/components/reports/src/_utils";
|
|
} from "@/components/reports/src/_utils";
|
|
-import { getParameterByName } from "../utils/auth";
|
|
|
|
-import UnusualState from "@/components/unusual/index.vue"
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "WanyuTypeReport",
|
|
name: "WanyuTypeReport",
|
|
@@ -117,7 +118,10 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.requestUserinfo()
|
|
|
|
|
|
+ if(!getParameterByName('code')){
|
|
|
|
+ this.login()
|
|
|
|
+ }else{
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
async requestUserinfo(){
|
|
async requestUserinfo(){
|
|
@@ -202,6 +206,13 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ login(){
|
|
|
|
+ const redirect_url = encodeURIComponent('http://stat.caixiao365.com/accountsReceivable')
|
|
|
|
+ var state = 'wx_' + Math.random().toString(36).substr(2, 15)
|
|
|
|
+ const scope = 'snsapi_userinfo'
|
|
|
|
+ const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.appId}&redirect_uri=${redirect_url}&response_type=code&scope=${scope}&state=${state}#wechat_redirect`
|
|
|
|
+ window.location.href = url
|
|
|
|
+ },
|
|
async searchList() {
|
|
async searchList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
this.tableData = [];
|
|
this.tableData = [];
|