customer.js 1.9 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. wx.clearStorage()
  15. if(!options.type){
  16. this.setData({
  17. weburl:app.globalData.webUrl + 'applet.html#/mycustomer?orgid='+(!!app.globalData.personMsg.binded.org_id?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
  18. })
  19. }else{
  20. this.setData({
  21. weburl:app.globalData.webUrl + 'applet.html#/mycustomer?orgid='+(!!app.globalData.personMsg.binded.org_id?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
  22. })
  23. }
  24. },
  25. /**
  26. * 生命周期函数--监听页面初次渲染完成
  27. */
  28. onReady() {
  29. },
  30. binderror(){
  31. wx.switchTab({
  32. url: '/pages/customer/customer'
  33. })
  34. },
  35. /**
  36. * 生命周期函数--监听页面显示
  37. */
  38. onShow() {
  39. // this.getTabBar().setData({
  40. // tabflag: true
  41. // })
  42. // if (typeof this.getTabBar === 'function' && this.getTabBar()) {
  43. // this.getTabBar().setData({
  44. // selected: 1
  45. // })
  46. // }
  47. },
  48. /**
  49. * 生命周期函数--监听页面隐藏
  50. */
  51. onHide() {
  52. },
  53. /**
  54. * 生命周期函数--监听页面卸载
  55. */
  56. onUnload() {
  57. },
  58. /**
  59. * 页面相关事件处理函数--监听用户下拉动作
  60. */
  61. onPullDownRefresh() {
  62. },
  63. /**
  64. * 页面上拉触底事件的处理函数
  65. */
  66. onReachBottom() {
  67. }
  68. })