| @@ -1,8 +1,8 @@ | |||||
| { | { | ||||
| "pages": [ | "pages": [ | ||||
| "pages/open/index", | |||||
| "pages/login/index", | "pages/login/index", | ||||
| "pages/rank/index", | "pages/rank/index", | ||||
| "pages/open/index", | |||||
| "pages/index/index" | "pages/index/index" | ||||
| ], | ], | ||||
| "window": { | "window": { | ||||
| @@ -14,7 +14,20 @@ Page({ | |||||
| url: '' | url: '' | ||||
| }) | }) | ||||
| }, | }, | ||||
| checkFun(){ | |||||
| this.setData({ | |||||
| ischecked: !this.data.ischecked | |||||
| }) | |||||
| }, | |||||
| login(){ | login(){ | ||||
| if(!this.data.ischecked){ | |||||
| wx.showToast({ | |||||
| title: '请勾选协议', | |||||
| icon: 'none', | |||||
| duration: 2000 | |||||
| }) | |||||
| return; | |||||
| } | |||||
| wx.login({ | wx.login({ | ||||
| success (res) { | success (res) { | ||||
| console.log(res) | console.log(res) | ||||
| @@ -31,5 +44,33 @@ Page({ | |||||
| } | } | ||||
| } | } | ||||
| }) | }) | ||||
| }, | |||||
| // 授权手机号 | |||||
| getPhoneNumber(e) { | |||||
| console.log(e); | |||||
| let that = this | |||||
| if (e.detail.errMsg == "getPhoneNumber:ok") { | |||||
| // console.log(e) | |||||
| const { | |||||
| iv, | |||||
| encryptedData | |||||
| } = e.detail; | |||||
| // that.$u.api.bindMini({ | |||||
| // encrypted: encryptedData, | |||||
| // iv | |||||
| // }).then((res) => { // 绑定手机号 | |||||
| // console.log(res); | |||||
| // let userinfo = that.vuex_userInfo | |||||
| // userinfo.phone = res.data | |||||
| // that.$u.vuex("vuex_userInfo", userinfo); | |||||
| // uni.setStorageSync('userInfo', userinfo) | |||||
| // that.islogin = true | |||||
| // }) | |||||
| } else { | |||||
| uni.showToast({ | |||||
| icon: "none", | |||||
| title: "请授权手机号" | |||||
| }) | |||||
| } | |||||
| } | } | ||||
| }) | }) | ||||
| @@ -6,11 +6,13 @@ | |||||
| <image class="search" src="https://static.quhouse.com/2d4207f23033420da62154bbdab565fb.png"></image> | <image class="search" src="https://static.quhouse.com/2d4207f23033420da62154bbdab565fb.png"></image> | ||||
| <image class="logo" src="https://static.quhouse.com/36be11c7991c484cbf4853d108772137.png"></image> | <image class="logo" src="https://static.quhouse.com/36be11c7991c484cbf4853d108772137.png"></image> | ||||
| <view class="agreement"> | <view class="agreement"> | ||||
| <image class="checked" wx:if="{{ischecked}}"src="https://static.quhouse.com/73be27af311b4a97b17e75dd5b984100.png"></image> | |||||
| <view class="nocheck" wx:else></view> | |||||
| <image class="checked" bindtap="checkFun" | |||||
| wx:if="{{ischecked}}" src="https://static.quhouse.com/73be27af311b4a97b17e75dd5b984100.png"></image> | |||||
| <view class="nocheck" bindtap="checkFun" wx:else></view> | |||||
| <view class="text">勾选表示您已阅读并同意</view> | <view class="text">勾选表示您已阅读并同意</view> | ||||
| <view class="text text1">《隐私协议》</view> | <view class="text text1">《隐私协议》</view> | ||||
| </view> | </view> | ||||
| <!-- <button class="btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">绑定手机</button> --> | |||||
| <view class="btn" bindtap="login">微信一键登录</view> | <view class="btn" bindtap="login">微信一键登录</view> | ||||
| <view class="btn btn1" bindtap="backGame">返回游戏</view> | <view class="btn btn1" bindtap="backGame">返回游戏</view> | ||||
| </view> | </view> | ||||
| @@ -8,5 +8,6 @@ | |||||
| <image class="white" src="https://static.quhouse.com/783169705fe74e8190b144eb2f132591.png"></image> | <image class="white" src="https://static.quhouse.com/783169705fe74e8190b144eb2f132591.png"></image> | ||||
| <view class="btn btn2">扫码参与 | <view class="btn btn2">扫码参与 | ||||
| <image class="row" src="https://static.quhouse.com/4066235dc1404b928a5e247f7b56274e.png"></image></view> | <image class="row" src="https://static.quhouse.com/4066235dc1404b928a5e247f7b56274e.png"></image></view> | ||||
| <image class="dot" src="https://static.quhouse.com/0452d5bbf636490f8476f08e2d8aa96b.png"></image> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -35,14 +35,14 @@ | |||||
| .btn1{ | .btn1{ | ||||
| color: #000000; | color: #000000; | ||||
| background: #FFC700; | background: #FFC700; | ||||
| top: 0; | |||||
| top: -12rpx; | |||||
| left: 0; | left: 0; | ||||
| } | } | ||||
| .btn2{ | .btn2{ | ||||
| background: #2845E0; | background: #2845E0; | ||||
| color: #FFFFFF; | color: #FFFFFF; | ||||
| right: 0; | right: 0; | ||||
| top: 12rpx; | |||||
| top: 0; | |||||
| } | } | ||||
| .btn .row{ | .btn .row{ | ||||
| width: 44rpx; | width: 44rpx; | ||||
| @@ -54,6 +54,13 @@ | |||||
| width: 40rpx; | width: 40rpx; | ||||
| height: 116rpx; | height: 116rpx; | ||||
| position: absolute; | position: absolute; | ||||
| top: 1rpx; | |||||
| top: -9rpx; | |||||
| left: 322rpx; | left: 322rpx; | ||||
| } | |||||
| .dot{ | |||||
| width: 182rpx; | |||||
| height: 6rpx; | |||||
| top: 140rpx; | |||||
| right: 0; | |||||
| position: absolute; | |||||
| } | } | ||||
| @@ -63,8 +63,16 @@ | |||||
| "list": [] | "list": [] | ||||
| }, | }, | ||||
| "miniprogram": { | "miniprogram": { | ||||
| "current": -1, | |||||
| "list": [] | |||||
| "current": 0, | |||||
| "list": [ | |||||
| { | |||||
| "id": -1, | |||||
| "name": "pages/open/index", | |||||
| "pathName": "pages/open/index", | |||||
| "query": "", | |||||
| "scene": null | |||||
| } | |||||
| ] | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||