index.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // pages/store_Management/index.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. imagePath:''
  8. },
  9. handleChooseAlbum() {
  10. // console.log(111);
  11. wx.chooseImage({
  12. count: 1,
  13. sourceType: ['album', 'camera'],
  14. success: (res) => {
  15. // console.log(res.tempFilePaths[0]);
  16. this.setData({
  17. imagePath:res.tempFilePaths[0]
  18. })
  19. }
  20. })
  21. },
  22. /**
  23. * 生命周期函数--监听页面加载
  24. */
  25. onLoad(options) {
  26. },
  27. /**
  28. * 生命周期函数--监听页面初次渲染完成
  29. */
  30. onReady() {
  31. },
  32. /**
  33. * 生命周期函数--监听页面显示
  34. */
  35. onShow() {
  36. },
  37. /**
  38. * 生命周期函数--监听页面隐藏
  39. */
  40. onHide() {
  41. },
  42. /**
  43. * 生命周期函数--监听页面卸载
  44. */
  45. onUnload() {
  46. },
  47. /**
  48. * 页面相关事件处理函数--监听用户下拉动作
  49. */
  50. onPullDownRefresh() {
  51. },
  52. /**
  53. * 页面上拉触底事件的处理函数
  54. */
  55. onReachBottom() {
  56. },
  57. /**
  58. * 用户点击右上角分享
  59. */
  60. onShareAppMessage() {
  61. }
  62. })