东风启辰小程序端
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.

106 line
1.9KB

  1. // pages/configure/configure.js
  2. const app = getApp()
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. imgUrl: app.globalData.urlStatic,//图片路径
  9. paramesSwitchNum:0,
  10. carTypeShow:false,
  11. carTypeData:[
  12. { name: "260T 手动", edition: "星悦版" },
  13. { name: "260T 自动", edition: "星尚版" },
  14. { name: "260T 48V轻混增压", edition: "星享版" },
  15. { name: "260T 48V轻混增压", edition: "星睿版" },
  16. { name: "260T 48V轻混增压", edition: "星曜版" }
  17. ],
  18. chooseType:0
  19. },
  20. /**
  21. * 生命周期函数--监听页面加载
  22. */
  23. onLoad: function (options) {
  24. },
  25. /**
  26. * 生命周期函数--监听页面初次渲染完成
  27. */
  28. onReady: function () {
  29. },
  30. /**
  31. * 生命周期函数--监听页面显示
  32. */
  33. onShow: function () {
  34. },
  35. /**
  36. * 生命周期函数--监听页面隐藏
  37. */
  38. onHide: function () {
  39. },
  40. /**
  41. * 生命周期函数--监听页面卸载
  42. */
  43. onUnload: function () {
  44. },
  45. /**
  46. * 页面相关事件处理函数--监听用户下拉动作
  47. */
  48. onPullDownRefresh: function () {
  49. },
  50. /**
  51. * 页面上拉触底事件的处理函数
  52. */
  53. onReachBottom: function () {
  54. },
  55. /**
  56. * 用户点击右上角分享
  57. */
  58. onShareAppMessage: function () {
  59. },
  60. chooseType:function(e){
  61. if (this.data.paramesSwitchNum == e.currentTarget.dataset.type) {
  62. this.setData({
  63. paramesSwitchNum: 0
  64. })
  65. } else {
  66. this.setData({
  67. paramesSwitchNum: e.currentTarget.dataset.type
  68. })
  69. }
  70. },
  71. backPage:function(){
  72. wx.navigateBack({
  73. delta:1
  74. })
  75. },
  76. carTypeControl:function(){
  77. this.setData({
  78. carTypeShow: !this.data.carTypeShow
  79. })
  80. },
  81. selectCarType:function(e){
  82. if (this.data.chooseType != e.currentTarget.dataset.num) {
  83. this.setData({
  84. chooseType: e.currentTarget.dataset.num
  85. })
  86. }
  87. this.carTypeControl();
  88. }
  89. })