buy.js 495 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // pages/buy/buy.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. payType: 1
  8. },
  9. /**
  10. * 生命周期函数--监听页面加载
  11. */
  12. onLoad(options) {
  13. },
  14. /**
  15. * 生命周期函数--监听页面初次渲染完成
  16. */
  17. onReady() {
  18. },
  19. /**
  20. * 生命周期函数--监听页面显示
  21. */
  22. onShow() {
  23. },
  24. handlePayType (e) {
  25. var type = Number(e.currentTarget.dataset.type)
  26. console.log(type);
  27. this.setData({
  28. payType: type
  29. })
  30. }
  31. })