东风启辰小程序端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. setTimeout(()=>{
  22. this.setData({
  23. nowPage:app.globalData.nowPage,
  24. buyState: app.globalData.getBuyState?app.globalData.getBuyState.success:false
  25. })
  26. },50)
  27. },
  28. /**
  29. * 组件的方法列表
  30. */
  31. methods: {
  32. maskShow:function(e){//打开遮罩
  33. this.setData({
  34. maskState: true,
  35. })
  36. },
  37. closeService: function (e) {//关闭遮罩
  38. this.setData({
  39. maskState: false,
  40. })
  41. },
  42. newCarConsultation:function(e){//新车咨询
  43. console.log("小程序跳转");
  44. wx.navigateToMiniProgram({
  45. appId:'wx1d585c8c2fffe589',
  46. path:"/pages/take/takeHome/takeHome",
  47. success(res) {
  48. // 打开成功
  49. },
  50. complete(res){
  51. console.log(res);
  52. }
  53. })
  54. },
  55. placingControl: function () {
  56. if (app.globalData.getBuyState){
  57. if (app.globalData.getBuyState.success != this.data.buyState) {
  58. this.setData({
  59. buyState: app.globalData.getBuyState.success
  60. })
  61. }
  62. }
  63. this.setData({
  64. placing: !this.data.placing
  65. })
  66. },
  67. openYuyue: function () {//预约
  68. this.setData({
  69. yuyueShow: !this.data.yuyueShow
  70. })
  71. },
  72. lookOrder:function(){//跳转到智趣启辰小程序的订单页面
  73. wx.navigateToMiniProgram({
  74. appId:'wx1d585c8c2fffe589',
  75. path:"/activity_module/pages/carorder_info/carorder_info",
  76. success(res) {
  77. // 打开成功
  78. },
  79. complete(res){
  80. console.log(res);
  81. }
  82. })
  83. }
  84. }
  85. })