help.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. const util = require('../../../utils/utils.js')
  2. Page({
  3. data: {
  4. phone: [],
  5. time: wx.getStorageSync('home').customer_service_time,
  6. kefu:false,
  7. showOnlinePhone: wx.getStorageSync('home').setting,
  8. },
  9. onLoad: function (options) {
  10. var phones = wx.getStorageSync('home').customer_service_phone
  11. this.setData({
  12. phone: this.data.phone.concat(phones)
  13. })
  14. },
  15. contact(){
  16. this.setData({kefu:true})
  17. },
  18. hidden(){
  19. this.setData({kefu:false})
  20. },
  21. skip(e) {
  22. console.log(e.currentTarget.dataset.show);
  23. let idx = e.currentTarget.dataset.show
  24. if (idx == 2) { //日租车与分时租赁区别
  25. wx.navigateTo({
  26. url: '/pages/accounting_rules/accounting_rules'
  27. })
  28. } else if (idx == 10) {
  29. wx.navigateTo({
  30. url: '/pages/personal/privacy/privacy'
  31. })
  32. } else {
  33. wx.navigateTo({
  34. url: '/pages/personal/helpDetail/helpDetail?show=' + idx
  35. })
  36. }
  37. },
  38. phone1: util.throttle(function (e) {
  39. var phone = this.data.phone[0];
  40. if(phone!==''&&phone!==undefined){
  41. wx.makePhoneCall({
  42. phoneNumber: phone,
  43. })
  44. }else{
  45. wx.makePhoneCall({
  46. phoneNumber:"037163211915",
  47. })
  48. }
  49. }, 1000),
  50. onReady: function () {
  51. },
  52. onShow: function () {
  53. this.setData({
  54. time: wx.getStorageSync('home').customer_service_time
  55. })
  56. },
  57. onHide: function () {
  58. },
  59. onUnload: function () {
  60. },
  61. onPullDownRefresh: function () {
  62. },
  63. onReachBottom: function () {
  64. }
  65. })