123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- // pages/permisission/permission.js
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- phoneLoading: false,
- showCreateForm: true,
- createForm: null,
- pickerText: '请选择',
- logoImgSrc: '../../imaes/logo1@2x.png',
- sexList: [
- {
- id: 1,
- title: '男'
- },
- {
- id: 0,
- title: '女'
- }
- ],
- sexActive: 0
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- console.log('permission load');
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- },
- handleChooseMedia () {
- var itt = this
- wx.chooseMedia({
- count: 1,
- mediaType: ['image'],
- sourceType: ['album'],
- success(res) {
- itt.setData({
- logoImgSrc: res.tempFiles[0].tempFilePath
- })
- }
- })
- },
- /**
- * 获取用户手机号权限
- */
- 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({
- pickerText: e.detail.value
- })
- },
- handleSex (e) {
- this.setData({
- sexActive: e.currentTarget.dataset.index
- })
- },
- handleConfirmBind () {
- wx.showLoading({
- title: '绑定中...',
- mask: true
- })
- setTimeout(() => {
- wx.hideLoading({
- success: (res) => {
-
- }
- })
- }, 1000);
- }
- })
|