浏览代码

update

tags/2.2.4
LengYingxin 7 年前
父节点
当前提交
d967e5b6f1
共有 4 个文件被更改,包括 20 次插入8 次删除
  1. +10
    -2
      pages/login/index.js
  2. +3
    -2
      pages/login/index.wxml
  3. +6
    -1
      pages/user/index.js
  4. +1
    -3
      pages/user/index.wxml

+ 10
- 2
pages/login/index.js 查看文件

@@ -4,10 +4,18 @@ let app = getApp()
Page({
data: {
},
getPhoneNumber: function (e) {
console.log(e.detail.errMsg)
console.log(e.detail.iv)
console.log(e.detail.encryptedData)
wx.navigateBack({
delta: 1
})
},
onLoad() {
},
onLogin: function() {
onLogin: function () {
console.log("登陆");
}
})

+ 3
- 2
pages/login/index.wxml 查看文件

@@ -2,7 +2,8 @@
<view class="login-logo">
<image src="../../assets/img/logo.png"></image>
</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>

+ 6
- 1
pages/user/index.js 查看文件

@@ -8,7 +8,12 @@ Page({
avatar:'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg'
}
},

navigateTo(){
console.log("object");
wx.navigateTo({
url: `../login/index`,
})
},
/**
* 生命周期函数--监听页面加载
*/


+ 1
- 3
pages/user/index.wxml 查看文件

@@ -50,7 +50,5 @@
</navigator>
</view>
<view class="margin"></view>
<button class="user-out-btn">
退出登陆
</button>
<button bindtap="navigateTo" class="user-out-btn">退出登陆</button>
</view>

正在加载...
取消
保存