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

75 lines
1.6KB

  1. // pages/component/service/index.js
  2. const app = getApp()
  3. Component({
  4. /**
  5. * 组件的属性列表
  6. */
  7. properties: {
  8. },
  9. /**
  10. * 组件的初始数据
  11. */
  12. data: {
  13. imgUrl: app.globalData.urlStatic,//图片路径
  14. maskState: false,//遮罩显示状态
  15. placing: false,
  16. buyState: false,
  17. nowPage: '0',
  18. yuyueShow: false,
  19. },
  20. attached:function(){
  21. this.setData({
  22. nowPage:app.globalData.nowPage,
  23. buyState: app.globalData.getBuyState?app.globalData.getBuyState.success:false
  24. })
  25. },
  26. /**
  27. * 组件的方法列表
  28. */
  29. methods: {
  30. maskShow:function(e){//打开遮罩
  31. this.setData({
  32. maskState: true,
  33. })
  34. },
  35. closeService: function (e) {//关闭遮罩
  36. this.setData({
  37. maskState: false,
  38. })
  39. },
  40. newCarConsultation:function(e){//新车咨询
  41. console.log("小程序跳转");
  42. wx.navigateToMiniProgram({
  43. appId:'wx1d585c8c2fffe589',
  44. path:"/pages/take/takeHome/takeHome",
  45. envVersion:"trial",
  46. success(res) {
  47. // 打开成功
  48. },
  49. complete(res){
  50. console.log(res);
  51. }
  52. })
  53. },
  54. placingControl: function () {
  55. if (app.globalData.getBuyState){
  56. if (app.globalData.getBuyState.success != this.data.buyState) {
  57. this.setData({
  58. buyState: app.globalData.getBuyState.success
  59. })
  60. }
  61. }
  62. this.setData({
  63. placing: !this.data.placing
  64. })
  65. },
  66. openYuyue: function () {//预约
  67. this.setData({
  68. yuyueShow: !this.data.yuyueShow
  69. })
  70. }
  71. }
  72. })