customertool.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. const app=getApp();
  2. var utils=require("../../../utils/http");
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. weburl:'',
  9. },
  10. /**
  11. * 生命周期函数--监听页面加载
  12. */
  13. onLoad: function (options) {
  14. this.setData({
  15. weburl:app.globalData.webUrl+'applet.html#/'+options.type+'?token='+app.globalData.token+"&share_user_id="+app.globalData.shareuserid+'&type=2&client_type='+app.globalData.clientype,
  16. })
  17. },
  18. bindmessage(res){
  19. let arr=res.detail.data;
  20. console.log(arr)
  21. this.visitimefun(arr[arr.length-1])
  22. },
  23. visitimefun(res){
  24. const that=this;
  25. if(res.nid!=''){
  26. utils.$post({
  27. url: app.globalData.webUrl + 'client/index/visit_due_time',
  28. header: {
  29. 'Authorization':'bearer '+app.globalData.token
  30. },
  31. data:{
  32. id:res.nid,
  33. pipe_type:res.pipe_type,
  34. time:res.time,
  35. },
  36. success: function (res) {
  37. }
  38. })
  39. }
  40. },
  41. /**
  42. * 生命周期函数--监听页面初次渲染完成
  43. */
  44. onReady: function () {
  45. },
  46. /**
  47. * 生命周期函数--监听页面显示
  48. */
  49. onShow: function () {
  50. },
  51. /**
  52. * 生命周期函数--监听页面隐藏
  53. */
  54. onHide: function () {
  55. },
  56. /**
  57. * 生命周期函数--监听页面卸载
  58. */
  59. onUnload: function () {
  60. },
  61. /**
  62. * 页面相关事件处理函数--监听用户下拉动作
  63. */
  64. onPullDownRefresh: function () {
  65. },
  66. /**
  67. * 页面上拉触底事件的处理函数
  68. */
  69. onReachBottom: function () {
  70. },
  71. })