diff --git a/App.vue b/App.vue index 9943dca..e322074 100644 --- a/App.vue +++ b/App.vue @@ -1,13 +1,99 @@ diff --git a/pages.json b/pages.json index b088f57..ebcdee7 100644 --- a/pages.json +++ b/pages.json @@ -76,6 +76,12 @@ "style": { "navigationBarTitleText": "登录" } + }, + { + "path": "pages/login/accountLogin", + "style": { + "navigationBarTitleText": "绑定" + } } ], "globalStyle": { diff --git a/pages/center/index.vue b/pages/center/index.vue index 6567d0f..46b25ad 100644 --- a/pages/center/index.vue +++ b/pages/center/index.vue @@ -149,7 +149,8 @@ position: absolute; width: 100%; height: 100%; - z-index: -1; + z-index: 1; + background: transparent; } &:last-child{ border-bottom: none; diff --git a/pages/login/accountLogin.vue b/pages/login/accountLogin.vue new file mode 100644 index 0000000..f716eae --- /dev/null +++ b/pages/login/accountLogin.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/pages/login/index.vue b/pages/login/index.vue index 5908010..c153ccc 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -2,16 +2,28 @@ - 游客jdsfbuskdnko - - 暂不绑定继续操作 + 游客jdsfbuskdnko + + + 暂不绑定继续操作 + + + + 使用手机号登录 + + - - + + + + 请认真阅读并同意 《时空网协议》 @@ -27,14 +39,51 @@ export default { data(){ return { - checked: true + checked: false, // 是否勾选协议 + isLogin: false, // 是否已登录 + userInfo: {} } }, onLoad(){ }, methods: { - + // 进入查看协议 + enterAgree(){ + console.log("查看协议"); + }, + // 勾选协议发生变化 + checkboxChange(event){ + console.log(event) + this.checked = event.detail.value.length > 0; + }, + // 微信快捷登录获取手机号 + getPhoneNumber(event){ + console.log(event); + if(event.detail.errMsg == 'getPhoneNumber:ok'){ + let encryptedData = event.detail.encryptedData; + let iv = event.detail.iv; + this.isLogin = true; // TODO 接口请求回来再赋值 + } + }, + // 获取用户信息 + getUserProfile(){ + uni.getUserProfile({ + desc: '您的信息将用于时空网显示', + lang: 'zh_CN', + complete: result => { + console.log(result) + if(result.errMsg == 'getUserProfile:ok'){ + let encryptedData = result.encryptedData; + let iv = result.iv; + let signature = result.signature; + let userInfo = result.userInfo; + // 获取成功,请求接口完毕后返回页面 + this.$toBack(); + } + } + }); + } } } @@ -50,6 +99,7 @@ width: 750rpx; height: auto; box-sizing: border-box; + position: relative; .img{ width: 180rpx; height: 180rpx; @@ -76,4 +126,12 @@ color: #1e90ff; } } + + .mask{ + position: absolute; + bottom: 46rpx; + left: 0; + width: 100%; + height: 190rpx; + }