init
This commit is contained in:
30
wx214944c362629fc7/pages/phone/phone.js
Normal file
30
wx214944c362629fc7/pages/phone/phone.js
Normal file
@@ -0,0 +1,30 @@
|
||||
var n = getApp();
|
||||
|
||||
Page({
|
||||
data: {},
|
||||
onLoad: function(n) {},
|
||||
getPhoneNumber: function(o) {
|
||||
console.log(o.detail.code);
|
||||
var e = this, t = o.detail.code;
|
||||
n._post_form("user/getphone", {
|
||||
code: t
|
||||
}, function(n) {
|
||||
console.log(n), wx.setStorageSync("phone", n.phone), e.onNavigateBack(1);
|
||||
}, !1, function() {});
|
||||
},
|
||||
onNavigateBack: function() {
|
||||
wx.navigateBack();
|
||||
},
|
||||
onNotLogin: function() {
|
||||
wx.redirectTo({
|
||||
url: "/pages/index/index"
|
||||
});
|
||||
},
|
||||
onReady: function() {},
|
||||
onShow: function() {},
|
||||
onHide: function() {},
|
||||
onUnload: function() {},
|
||||
onPullDownRefresh: function() {},
|
||||
onReachBottom: function() {},
|
||||
onShareAppMessage: function() {}
|
||||
});
|
||||
3
wx214944c362629fc7/pages/phone/phone.json
Normal file
3
wx214944c362629fc7/pages/phone/phone.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
11
wx214944c362629fc7/pages/phone/phone.wxml
Normal file
11
wx214944c362629fc7/pages/phone/phone.wxml
Normal file
@@ -0,0 +1,11 @@
|
||||
<view class="container">
|
||||
<view class="wechatapp"></view>
|
||||
<view class="auth-title">申请获取以下权限</view>
|
||||
<view class="auth-subtitle">授权获取微信手机号</view>
|
||||
<view class="login-btn">
|
||||
<button bindgetphonenumber="getPhoneNumber" openType="getPhoneNumber">授权手机号</button>
|
||||
</view>
|
||||
<view class="no-login-btn">
|
||||
<button catchtap="onNotLogin" class="btn-normal">暂不授权</button>
|
||||
</view>
|
||||
</view>
|
||||
66
wx214944c362629fc7/pages/phone/phone.wxss
Normal file
66
wx214944c362629fc7/pages/phone/phone.wxss
Normal file
@@ -0,0 +1,66 @@
|
||||
page {
|
||||
background: #fff;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 0 60rpx;
|
||||
}
|
||||
|
||||
.wechatapp {
|
||||
border-bottom: 1rpx solid #e3e3e3;
|
||||
margin-bottom: 72rpx;
|
||||
padding: 80rpx 0 48rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wechatapp .header {
|
||||
border: 2px solid #fff;
|
||||
border-radius: 50%;
|
||||
box-shadow: 1px 0 5px rgba(50,50,50,.3);
|
||||
height: 190rpx;
|
||||
margin: 0rpx auto 0;
|
||||
overflow: hidden;
|
||||
width: 190rpx;
|
||||
}
|
||||
|
||||
.auth-title {
|
||||
color: #585858;
|
||||
font-size: 34rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.auth-subtitle {
|
||||
color: #888;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 88rpx;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.login-btn button {
|
||||
background: #04be01;
|
||||
border-radius: 999rpx;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.no-login-btn {
|
||||
margin-top: 20rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.no-login-btn button {
|
||||
background: #dfdfdf;
|
||||
border-radius: 999rpx;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
text-align: center;
|
||||
}
|
||||
Reference in New Issue
Block a user