1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- // pages/permisission/permission.js
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- phoneLoading: false,
- showCreateForm: false,
- createForm: null,
- date: '',
- sexList: [
- {
- id: 1,
- title: '男'
- },
- {
- id: 0,
- title: '女'
- }
- ],
- sexActive: 0
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- console.log('permission load');
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- },
- /**
- * 获取用户手机号权限
- */
- getPhoneNumber (e) {
- var that = this
- console.log(e.detail.code)
- setTimeout(() => {
- that.getUser()
- }, 1000);
- },
- getUser () {
- console.log('get user');
- wx.getUserProfile({
- desc: '获取您的微信头像和昵称用于登录',
- success: (res) => {
- console.log(res);
- }
- })
- },
- fillInfo () {
- console.log('filinfo');
- wx.reLaunch({
- url: "/pages/createInfo/createInfo"
- })
- },
- bindDateChange (e) {
- console.log(e);
- this.setData({
- date: e.detail.value
- })
- },
- handleSex (e) {
- console.log(e.currentTarget.dataset.index)
- this.setData({
- sexActive: e.currentTarget.dataset.index
- })
- }
- })
|