抖音c端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 rivejä
1.2 KiB

  1. const Http = require("../../utils/HttpBasics");
  2. var config = require("../../config/config.js");
  3. const util = require("../../utils/util.js");
  4. var app = getApp();
  5. const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px'
  6. Page({
  7. data: {
  8. navigationBarHeight,
  9. id: "",
  10. obj: null
  11. },
  12. getRefunData() {
  13. Http.get({
  14. url: config.api.getRefund,
  15. data: {
  16. orderId: this.data.id,
  17. mallTenantId: this.data.mallTenantId || ''
  18. }
  19. }).then(res => {
  20. let temp = res.data
  21. temp.createTime = util.formatTime(temp.createTime, "yyyy-MM-dd hh:mm:ss");
  22. this.setData({
  23. obj: temp
  24. })
  25. }).catch(err => {
  26. tt.showToast({
  27. title: err.message ? err.message : err.data, // 内容
  28. icon: "none"
  29. });
  30. })
  31. },
  32. copyId() {
  33. let id = this.data.obj.id
  34. tt.setClipboardData({
  35. data: id,
  36. success: function () {
  37. tt.showToast({
  38. title: '复制成功',
  39. icon: "none"
  40. })
  41. }
  42. })
  43. },
  44. onLoad: function (options) {
  45. console.log(options.id);
  46. this.setData({
  47. id: options.id,
  48. mallTenantId: options.mallTenantId,
  49. })
  50. this.getRefunData()
  51. }
  52. })