div.html attach html,attach.html

QQ绑定

const bindInfo = sessionStorage.getItem('bindInfo')

if (!bindInfo) {

location.href = './index.html'

}

// 如果用户已经登录,则直接跳转到首页

isLogin(function (response) {

// 拿到状态码,判断请求状态。

const code = response.code

// 这里如果code为200,证明用户已经登录, 所以需要跳转到首页

if (code === 200) {

location.href = './index.html'

}

}, function (error) {

console.log(error)

})

3245561bbcbae0f7bbaa12b04ce3d49c.png

 已有qq账号?输入账号信息登录立即绑定

记住我 

授权并登录

登录即代表你同意 用户协议

$('.dropdown').dropdown({

on: 'hover'

});

$('.menu.toggle').click(function () {

$('.m-item').toggleClass('m-mobile-hide');

});

$('.ui.form').form({

fields: {

phone: {

identifier: 'phoneNum',

rules: [{

type: 'empty',

prompt: '账号:请输入您的手机号码'

},

{

type: 'exactLength[11]',

prompt: "手机号码长度不正确"

}]

},

password: {

identifier: 'password',

rules: [{

type: 'empty',

prompt: '密码:请输入您的密码'

}, {

type: 'minLength[8]',

prompt: "密码长度最少8位"

}]

}

},

onSuccess(event, fields) {

event.preventDefault()

const bindInfo = JSON.parse(sessionStorage.getItem('bindInfo'))

const params = {

accessToken: encodeURIComponent(bindInfo.accessToken),

openId: encodeURIComponent((bindInfo.openId)),

account: $('#phone').val(),

password: $('#pass').val(),

rememberMe: $('#rememberMe').is(':checked')

}

$http({

url: 'auth/qqBinding?' + buildQueryString(params),

method: 'GET'

}).then(response => {

if (response.code !== 200) {

alert(response.message)

return false;

}

sessionStorage.removeItem('bindInfo')

location.href = './index.html'

}).catch(error => {

console.log(error)

})

}

});

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值