//请求接口调试:获取开户入口
netrequest0: function () {
var that = this
wx.request({
//获取开户入口url地址:
url: 'xx(域名)-brac/ia/oase/entrance',
header: {
// 'content-type': 'application/x-www-form-urlencoded',
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
},
data:{
channel:'C0012'
},
method: 'POST',
success: function (res) {
console.log(res.data)
//请求成功,在请求银行卡查询api
//wx.setStorageSync('entrance', res.data)
// that.setData({
// oa_sessionid: res.header['Set-Cookie'] && res.header['Set-Cookie'][0] || '',
// });
// that.jsessionid();
// console.log(res.data)
// ``
var cookies = res.header['Set-Cookie'] && res.header['Set-Cookie'][0] || '';
var cookie = cookies.split(',')[0];
that.setData({
oa_sessionid:cookie
});
that.netrequestbandcard();
},
fail:function (){
console.log('网络请求失败')
}
})
//测试请求jSessoinId
// this.jSessoinId();
//在调试银行卡查询api
// this.netrequestbandcard();
},
// //请求获取sessoninID:
// jSessoinId: function(){
// wx.request({
// url: 'xx(域名)-/brac/ia/portal/register/jSessoinId?',
// data: {
// channel:'C0012'
// },
// method: 'GET',
// header: {
// 'Content-Type': 'application/x-www-form-urlencoded',
// 'Cookie': that.data.oa_sessionid
// },
// complete : function (res) {
// console.log('jsessionid complete');
// console.log(res, 'jsessionid-complete');
// },
// success: function(res){
// //success
// console.log(res.data,'jsessionid-success')
// that.setData({
// oa_sessionid: res.data.object
// })
// },
// })
// },