orderDetail.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. // pages/orderDetail/orderDetail.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. urls: [
  8. "https://img1.baidu.com/it/u=202543353,3627416815&fm=26&fmt=auto",
  9. "https://img0.baidu.com/it/u=745609344,230882238&fm=26&fmt=auto",
  10. "https://img0.baidu.com/it/u=286636366,3227707112&fm=26&fmt=auto",
  11. "https://img1.baidu.com/it/u=2450865760,444795162&fm=26&fmt=auto",
  12. "https://img0.baidu.com/it/u=4226275504,4103997964&fm=26&fmt=auto",
  13. "https://img0.baidu.com/it/u=2247422843,411257408&fm=26&fmt=auto",
  14. "https://img0.baidu.com/it/u=3098615520,360170704&fm=26&fmt=auto",
  15. "https://img1.baidu.com/it/u=510862345,2249984174&fm=26&fmt=auto",
  16. "https://img2.baidu.com/it/u=2222750380,2392750381&fm=26&fmt=auto",
  17. ],
  18. index: 0,
  19. visible: false,
  20. array: ['美国', '中国', '巴西', '日本'],
  21. },
  22. /**
  23. * 生命周期函数--监听页面加载
  24. */
  25. onLoad: function (options) {
  26. },
  27. /**
  28. * 生命周期函数--监听页面初次渲染完成
  29. */
  30. onReady: function () {
  31. },
  32. /**
  33. * 生命周期函数--监听页面显示
  34. */
  35. onShow: function () {
  36. },
  37. /**
  38. * 生命周期函数--监听页面隐藏
  39. */
  40. onHide: function () {
  41. },
  42. /**
  43. * 生命周期函数--监听页面卸载
  44. */
  45. onUnload: function () {
  46. },
  47. /**
  48. * 页面相关事件处理函数--监听用户下拉动作
  49. */
  50. onPullDownRefresh: function () {
  51. },
  52. /**
  53. * 页面上拉触底事件的处理函数
  54. */
  55. onReachBottom: function () {
  56. },
  57. /**
  58. * 用户点击右上角分享
  59. */
  60. onShareAppMessage: function () {
  61. },
  62. /**
  63. * 复制订单号
  64. */
  65. onCopyOrderNum(e) {
  66. wx.setClipboardData({
  67. data: e.currentTarget.dataset.num || '',
  68. success(res) {
  69. console.log(res)
  70. }
  71. })
  72. },
  73. /**
  74. * 打开弹框
  75. */
  76. onEditItem() {
  77. this.setData({
  78. visible: true
  79. })
  80. },
  81. /**
  82. * 关闭弹框
  83. */
  84. onPopupState() {
  85. this.setData({
  86. visible: false
  87. })
  88. },
  89. /**
  90. * 图片预览
  91. */
  92. previewImage(e) {
  93. wx.previewImage({
  94. current: e.currentTarget.dataset.index,
  95. urls: this.data.urls
  96. })
  97. }
  98. })