userDetail.js 651 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. var app = getApp()
  2. Page({
  3. data: {
  4. user:[],
  5. userId:''
  6. },
  7. onLoad: function (options) {
  8. this.setData({userId:options.id})
  9. app.request('user/detail?user_id='+options.id, '', 'GET').then(res => {
  10. console.log(res)
  11. this.setData({user:res.data})
  12. })
  13. },
  14. tap:function(){
  15. wx.navigateTo({
  16. url: '/pages/historicalOrder/historicalOrder?id='+this.data.userId,
  17. })
  18. },
  19. onReady: function () {
  20. },
  21. onShow: function () {
  22. },
  23. onHide: function () {
  24. },
  25. onUnload: function () {
  26. },
  27. onPullDownRefresh: function () {
  28. },
  29. onReachBottom: function () {
  30. },
  31. onShareAppMessage: function () {
  32. }
  33. })