邃芒智像相册
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

70 line
1.0 KiB

  1. const app = getApp()
  2. import request from '../../utils/request'
  3. import Dialog from '@vant/weapp/dialog/dialog';
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. isUploaded: false,
  10. tempFilePath: ""
  11. },
  12. /**
  13. * 生命周期函数--监听页面加载
  14. */
  15. onLoad() {
  16. },
  17. /**
  18. * 生命周期函数--监听页面显示
  19. */
  20. onShow() {
  21. wx.hideHomeButton()
  22. app.tokenCallBack = res => {
  23. this.setData({
  24. isLogin: res
  25. })
  26. }
  27. },
  28. chooseImage(e) {
  29. const that = this
  30. wx.chooseMedia({
  31. mediaType: ['image'],
  32. sourceType: ['camera'],
  33. camera: 'back',
  34. success: res => {
  35. that.setData({
  36. tempFilePath: res.tempFiles[0].tempFilePath,
  37. isUploaded: true
  38. })
  39. }
  40. })
  41. },
  42. /**
  43. * 页面相关事件处理函数--监听用户下拉动作
  44. */
  45. onPullDownRefresh() {
  46. },
  47. /**
  48. * 页面上拉触底事件的处理函数
  49. */
  50. onReachBottom() {
  51. },
  52. /**
  53. * 用户点击右上角分享
  54. */
  55. onShareAppMessage() {
  56. }
  57. })