|
|
@@ -118,8 +118,9 @@
|
|
|
});
|
|
|
},
|
|
|
sendCodeRequest(){
|
|
|
- let that = this;
|
|
|
+ let that = this , jsUrl = location.href.split('#')[0];
|
|
|
that.weChatCode = that.subStrUrlCode();
|
|
|
+
|
|
|
axios({
|
|
|
method: 'post', //请求方式 有常用的有get post等
|
|
|
url: apiUrl, //请求地址
|
|
|
@@ -127,7 +128,7 @@
|
|
|
method: 'wxinfo',
|
|
|
timestamp: 11111111,
|
|
|
code:that.weChatCode,
|
|
|
- jsUrl:(location.href.split('#')[0]),
|
|
|
+ jsUrl:jsUrl,
|
|
|
sign:md5('wxinfo'+'11111111')
|
|
|
}, //代表传过去的参数对象,
|
|
|
transformRequest: [function(data) {
|
|
|
@@ -144,6 +145,8 @@
|
|
|
that.headSrc = rs.data.msg.headimgurl;
|
|
|
that.isFollow = rs.data.msg.subscribe;
|
|
|
that.openId = rs.data.msg.openid;
|
|
|
+ }else {
|
|
|
+ alert(rs.data.msg)
|
|
|
}
|
|
|
}).catch(function(e) {
|
|
|
console.log(e);
|