抖音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.

50 lines
1.1 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. }
  18. }).then(res=>{
  19. let temp = res.data
  20. temp.createTime = util.formatTime(temp.createTime, "yyyy-MM-dd hh:mm:ss");
  21. this.setData({
  22. obj:temp
  23. })
  24. }).catch(err=>{
  25. tt.showToast({
  26. title: err.message ? err.message : err.data, // 内容
  27. icon: "none"
  28. });
  29. })
  30. },
  31. copyId(){
  32. let id = this.data.obj.id
  33. tt.setClipboardData({
  34. data: id,
  35. success: function () {
  36. tt.showToast({
  37. title: '复制成功',
  38. icon: "none"
  39. })
  40. }
  41. })
  42. },
  43. onLoad: function (options) {
  44. console.log(options.id);
  45. this.setData({
  46. id:options.id
  47. })
  48. this.getRefunData()
  49. }
  50. })