|
@@ -27,32 +27,32 @@ export default {
|
|
},
|
|
},
|
|
watch: {},
|
|
watch: {},
|
|
created() {
|
|
created() {
|
|
- // this.getTKByUnionid()
|
|
|
|
|
|
+ this.getTKByUnionid()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- WxLoginCtl() {
|
|
|
|
- // this.$util.messageMethod("success", "前去微信登陆扫码授权");
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/aikmt/Redirect_uri",
|
|
|
|
- query: {
|
|
|
|
- unionid: "oPHg8wXraekgH5YKVHvD3H7Ujynw",
|
|
|
|
- prince: "6666666666666"
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- // async getTKByUnionid() {
|
|
|
|
- // if (window.location.href.indexOf("unionid") >= 0) {
|
|
|
|
- // // 如果url中包含code,则保存到store中
|
|
|
|
- // let unionid = window.location.href.split("?")[1];
|
|
|
|
- // unionid = unionid.substring(8, code.indexOf("&"));
|
|
|
|
- // let WxCode = unionid;
|
|
|
|
- // this.WxCode = WxCode;
|
|
|
|
- // this.$store.dispatch("UnionidLogin", {
|
|
|
|
- // unionid: this.WxCode
|
|
|
|
|
|
+ // WxLoginCtl() {
|
|
|
|
+ // // this.$util.messageMethod("success", "前去微信登陆扫码授权");
|
|
|
|
+ // this.$router.push({
|
|
|
|
+ // path: "/aikmt/Redirect_uri",
|
|
|
|
+ // query: {
|
|
|
|
+ // unionid: "oPHg8wXraekgH5YKVHvD3H7Ujynw",
|
|
|
|
+ // prince: "6666666666666"
|
|
|
|
+ // }
|
|
// });
|
|
// });
|
|
- // }
|
|
|
|
- // return
|
|
|
|
- // }
|
|
|
|
|
|
+ // },
|
|
|
|
+ async getTKByUnionid() {
|
|
|
|
+ if (window.location.href.indexOf("unionid") >= 0) {
|
|
|
|
+ // 如果url中包含code,则保存到store中
|
|
|
|
+ let unionid = window.location.href.split("?")[1];
|
|
|
|
+ unionid = unionid.substring(8);
|
|
|
|
+ let WxCode = unionid;
|
|
|
|
+ this.WxCode = WxCode;
|
|
|
|
+ this.$store.dispatch("UnionidLogin", {
|
|
|
|
+ unionid: this.WxCode
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
var obj = new WxLogin({
|
|
var obj = new WxLogin({
|