integralOrderPaySuccess.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. "use strict";
  2. var common_vendor = require("../common/vendor.js");
  3. var api_integral = require("../api/integral.js");
  4. require("../common/request.js");
  5. const _sfc_main = {
  6. data() {
  7. return {
  8. order: null
  9. };
  10. },
  11. onLoad(option) {
  12. common_vendor.index.setNavigationBarTitle({
  13. title: "\u652F\u4ED8\u7ED3\u679C"
  14. });
  15. common_vendor.index.$emit("refreshStoreOrder");
  16. this.orderId = option.orderId;
  17. this.getIntegralOrderById();
  18. },
  19. methods: {
  20. getIntegralOrderById() {
  21. var data = { orderId: this.orderId };
  22. var that = this;
  23. common_vendor.index.showLoading();
  24. api_integral.getIntegralOrderById(data).then((res) => {
  25. common_vendor.index.hideLoading();
  26. if (res.code == 200) {
  27. that.order = res.data;
  28. } else {
  29. common_vendor.index.showToast({
  30. icon: "none",
  31. title: res.msg
  32. });
  33. }
  34. }, (rej) => {
  35. });
  36. },
  37. copyTest(text) {
  38. common_vendor.index.setClipboardData({
  39. data: text,
  40. success: () => {
  41. common_vendor.index.showToast({
  42. title: "\u5185\u5BB9\u5DF2\u6210\u529F\u590D\u5236\u5230\u526A\u5207\u677F",
  43. icon: "none"
  44. });
  45. }
  46. });
  47. },
  48. showOrderDetails(orderId) {
  49. console.log(orderId);
  50. common_vendor.index.redirectTo({
  51. url: "./integralOrderDetails?orderId=" + orderId
  52. });
  53. }
  54. }
  55. };
  56. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  57. return {
  58. a: common_vendor.o(($event) => $options.showOrderDetails($data.order.orderId)),
  59. b: common_vendor.t($data.order.orderCode),
  60. c: common_vendor.o(($event) => $options.copyTest($data.order.orderCode)),
  61. d: common_vendor.t($data.order.integral),
  62. e: common_vendor.t($data.order.createTime)
  63. };
  64. }
  65. var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_user/integralOrderPaySuccess.vue"]]);
  66. wx.createPage(MiniProgramPage);