1
0

customer.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. const app=getApp();
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. weburl:"",
  8. },
  9. /**
  10. * 生命周期函数--监听页面加载
  11. */
  12. onLoad(options) {
  13. var that=this
  14. if(!options.type){
  15. this.setData({
  16. weburl:app.globalData.webUrl + 'applet.html#/mycustomer?orgid='+app.globalData.personMsg.binded.org_id+'&empid='+app.globalData.personMsg.binded.id+'&token=' + app.globalData.token + '&client_type=' + app.globalData.clientype+"&platform="+app.globalData.platform
  17. })
  18. }else{
  19. this.setData({
  20. weburl:app.globalData.webUrl + 'applet.html#/mycustomer?orgid='+app.globalData.personMsg.binded.org_id+'&empid='+app.globalData.personMsg.binded.id+'&type='+options.type+'&token=' + app.globalData.token + '&client_type=' + app.globalData.clientype+"&platform="+app.globalData.platform
  21. })
  22. }
  23. },
  24. /**
  25. * 生命周期函数--监听页面初次渲染完成
  26. */
  27. onReady() {
  28. },
  29. binderror(){
  30. wx.switchTab({
  31. url: '/pages/customer/customer'
  32. })
  33. },
  34. /**
  35. * 生命周期函数--监听页面显示
  36. */
  37. onShow() {
  38. // this.getTabBar().setData({
  39. // tabflag: true
  40. // })
  41. // if (typeof this.getTabBar === 'function' && this.getTabBar()) {
  42. // this.getTabBar().setData({
  43. // selected: 1
  44. // })
  45. // }
  46. },
  47. /**
  48. * 生命周期函数--监听页面隐藏
  49. */
  50. onHide() {
  51. },
  52. /**
  53. * 生命周期函数--监听页面卸载
  54. */
  55. onUnload() {
  56. },
  57. /**
  58. * 页面相关事件处理函数--监听用户下拉动作
  59. */
  60. onPullDownRefresh() {
  61. },
  62. /**
  63. * 页面上拉触底事件的处理函数
  64. */
  65. onReachBottom() {
  66. }
  67. })