@@ -4,10 +4,18 @@ let app = getApp() | |||||
Page({ | Page({ | ||||
data: { | data: { | ||||
}, | }, | ||||
getPhoneNumber: function (e) { | |||||
console.log(e.detail.errMsg) | |||||
console.log(e.detail.iv) | |||||
console.log(e.detail.encryptedData) | |||||
wx.navigateBack({ | |||||
delta: 1 | |||||
}) | |||||
}, | |||||
onLoad() { | onLoad() { | ||||
}, | }, | ||||
onLogin: function() { | |||||
onLogin: function () { | |||||
console.log("登陆"); | console.log("登陆"); | ||||
} | } | ||||
}) | }) |
@@ -2,7 +2,8 @@ | |||||
<view class="login-logo"> | <view class="login-logo"> | ||||
<image src="../../assets/img/logo.png"></image> | <image src="../../assets/img/logo.png"></image> | ||||
</view> | </view> | ||||
<view class="login-btn"> | |||||
<i-button i-class="login-btn-login" bind:click="onLogin">微信登陆</i-button> | |||||
<view class="login-btn"> | |||||
<!-- <i-button i-class="login-btn-login" bind:click="getPhoneNumber">微信登陆</i-button> --> | |||||
<button open-type="getPhoneNumber" class="login-btn-login" bindgetphonenumber="getPhoneNumber">微信登陆</button> | |||||
</view> | </view> | ||||
</view> | </view> |
@@ -8,7 +8,12 @@ Page({ | |||||
avatar:'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg' | avatar:'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg' | ||||
} | } | ||||
}, | }, | ||||
navigateTo(){ | |||||
console.log("object"); | |||||
wx.navigateTo({ | |||||
url: `../login/index`, | |||||
}) | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
@@ -50,7 +50,5 @@ | |||||
</navigator> | </navigator> | ||||
</view> | </view> | ||||
<view class="margin"></view> | <view class="margin"></view> | ||||
<button class="user-out-btn"> | |||||
退出登陆 | |||||
</button> | |||||
<button bindtap="navigateTo" class="user-out-btn">退出登陆</button> | |||||
</view> | </view> |