第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

vue做的公眾號

vue做的公眾號

開心每一天1111 2019-03-11 17:19:23
在本地可以訪問到接口,但是我要拿code去登錄,必須去微信調(diào)試工具中登錄微信入口拿到code去登錄,但是到工具中this.getData(),console.log(12345677)都不出來,cookie是可以寫進(jìn)去的,這是為啥呀。求助,控制臺也不報(bào)錯 什么信息都沒有,一片空白,這是我的首頁,重定向是到這個頁面的created() {        this.getData();        console.log(12345677);        cookies.set('CXC_state','0');//0是認(rèn)證用戶           },    methods: {        getData(){            let json = {}            let _this = this;            base.axios_type("get",json,'/user',function(res){                if(res.code==1){                    console.log(res);                }else if(res.code==-1){                     console.log(11111111111);                    base.wx_logo();                }                            });        },    }base文件function wx_logo(){  let url = location.hostname;  let _this = this;  if(url.indexOf('localhost')!=-1){    location.href = window.location.href;  }else{      location.href =        "https://open.weixin.qq.com/connect/oauth2/authorize?appid=***********8&redirect_uri=https%3a%2f%2&&&&&&&&&&&&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";      let code = ssQueryValueByKey("code");      logo(code);   }};function logo(_code){  let json = {code:_code}  axios_type("get",json,"/getUserInfo",function(res){  console.log(res.msg);  res = JSON.parse(res);  if (res.code == 1) {      //登陸成功      console.log(res.data);  } else if(res.code==-1){  }else {      console.log(res.message);  }  })};function axios_type(requestType,json, url, completion) {  console.log(json);  axios({      method: requestType,      url: 'https://****.******8.com/api'+url,      dataType: "jsonp",      data: JSON.stringify(json),      header:{        "Content-Type":'application/json',      }    }).then(function (res) {        console.log(res.data);        completion(res.data);    }).catch(function (error) {        console.log(error);    });}
查看完整描述

2 回答

?
犯罪嫌疑人X

TA貢獻(xiàn)2080條經(jīng)驗(yàn) 獲得超4個贊

訪問錯服務(wù)器地址了,,,,,


查看完整回答
反對 回復(fù) 2019-03-29
?
弒天下

TA貢獻(xiàn)1818條經(jīng)驗(yàn) 獲得超8個贊

chrome調(diào)試工具的console標(biāo)簽,把preserve log選項(xiàng)打開


查看完整回答
反對 回復(fù) 2019-03-29
  • 2 回答
  • 0 關(guān)注
  • 808 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號