1/* eslint-disable no-sequences */ 2/* eslint-disable no-unused-expressions */ 3function fbLogin() { 4 FB.login(function (response) { 5 checkLoginState(); 6 }, { scope: 'email' }); 7} 8appid = '457266267379046'; 9function checkLoginState() { 10 FB.getLoginStatus(function (response) { 11 statusChangeCallback(response); 12 }); 13} 14function statusChangeCallback(response) { 15 // The response object is returned with a status field that lets the 16 // app know the current login status of the person. 17 // Full docs on the response object can be found in the documentation 18 // for FB.getLoginStatus(). 19 if (response.status === 'connected') { 20 // Logged into your app and Facebook. 21 doLOGINAPI(); 22 } else { 23 // The person is not logged into your app or we are unable to tell. 24 document.getElementById('status').innerHTML = 'Please log ' + 25 'into this app.'; 26 } 27} 28window.fbAsyncInit = function () { 29 // init the FB JS SDK 30 FB.init({ 31 appId: appid, 32 cookie: true, 33 xfbml: true, 34 version: 'v15.0' // Look for social plugins on the page 35 }); 36 FB.AppEvents.logPageView(); 37 // FB.getLoginStatus(function(response) { 38 // statusChangeCallback(response); 39 // }); 40}; 41// Load the SDK asynchronously 42// addEventListener('faceBookLoad', function () { 43// (function (d, s, id) { 44// var js; var fjs = d.getElementsByTagName(s)[0]; 45// if (d.getElementById(id)) return; 46// js = d.createElement(s); 47// // js.id = id; 48// js.src = 'https://connect.facebook.net/en_US/sdk.js'; 49// fjs.parentNode.insertBefore(js, fjs); 50// }(document, 'script', 'facebook-jssdk')); 51// }); 52// Here we run a very simple test of the Graph API after login is 53// successful. See statusChangeCallback() for when this call is made. 54function doLOGINAPI() { 55 console.log('Welcome! Fetching your information.... '); 56 FB.api('/me?fields=id,name,email,permissions,first_name,last_name', function (response) { 57 console.log('Successful login for: ' + response.name); 58 // document.getElementById('status').innerHTML ='Thanks for logging in, ' + response.name + '[' + response.email + ']' + '!'; 59 MemberApi.fbLogin(response.id, 'fb').then(function (res) { 60 let data = res.data; 61 if (data.Succeeded) { 62 // wsApi.controller.member.getId(); 63 fblogout(); 64 // storage.set('isLogin', '1'); 65 localStorage.setItem('isLogin', '1'); 66 window.location.href = '/account/memberInfo'; 67 } else { 68 var member = {}; 69 member.Email = response.email; 70 member.FirstName = response.first_name; 71 member.LastName = response.last_name; 72 member.ThirdPartyUserId = response.id; 73 member.ThirdPartyType = 'fb'; 74 MemberApi.register(member).then(function (lr) { 75 if (lr.Succeeded) { 76 MemberApi.fbLogin(response.id, 'fb').then(function (res) { 77 let data = res.data; 78 if (data.Succeeded) { 79 // wsApi.controller.member.getId(); 80 fblogout(); 81 localStorage.setItem('isLogin', '1'); 82 window.location.href = '/account/memberInfo'; 83 } 84 }); 85 } 86 }); 87 // $.cookie('name', response.name); 88 // storage.set('name', response.name ? response.name : ''); 89 // storage.set('email', response.email ? response.email : ''); 90 // storage.set('id', '"' + response.id + '"'); 91 // storage.set('type', 'fb'); 92 // storage.set('loginAction', 'register'); 93 // window.location.href = '/account/register'; 94 } 95 }); 96 }); 97} 98function fblogout() { 99 FB.getLoginStatus(function (response) { 100 if (response.status === 'connected') { 101 FB.logout(); 102 } 103 }); 104} 105// $(document).ready(function () { 106// var t = { 107// delay: 125, 108// overlay: $('.fb-overlay'), 109// widget: $('.fb-widget'), 110// button: $('.fb-button') 111// }; 112// $('.ctrlq').on('click', function (e) { 113// e.preventDefault(), 114// t.overlay.is(':visible') ? (t.overlay.fadeOut(t.delay), t.widget.stop().animate({ 115// bottom: 0, 116// opacity: 0 117// }, 118// 2 * t.delay, 119// function () { 120// $(this).hide('slow'), t.button.show();
121// })) 122// : t.button.fadeOut('medium', function () { 123// t.widget.stop().show().animate({ 124// bottom: '30px', 125// opacity: 1 126// }, 2 * t.delay), t.overlay.fadeIn(t.delay); 127// }); 128// }); 129// }); 130var isClicked = false; 131function confirm() { 132 // eslint-disable-next-line no-new-object 133 var obj = new Object(); 134 obj.FormId = $('#RpForm_Id').val(); 135 obj.TotalAmount = Number($('#total').html()); 136 obj.Signature = $('#img-signature').attr('src'); 137 obj.RnpSubmitDatas = getAnswers(); 138 if (!isClicked) { 139 isClicked = true; // æ 记为已ç¹å» 140 regAndPay.saveSubmit(obj).then(function (result) { 141 if (result.data.Succeeded) { 142 router.push({ 143 path: '/regnpay/result/' + result.data.ReturnValue 144 }); 145 } else { 146 alert(result.data.Message); 147 } 148 }); 149 // å设æä½å®æåï¼éç½®æé®ç¶æ 150 setTimeout(function () { 151 isClicked = false; // é置为æªç¹å» 152 }, 1000); // å设3ç§åå¯ä»¥å次ç¹å» 153 } else { 154 // å·²ç»ç¹å»è¿ï¼ä¸æ§è¡ä»»ä½æä½æè æç¤ºç¨æ·ä¸è½éå¤ç¹å» 155 alert('è«å¿éè¤é»æï¼'); 156 } 157 158}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.