userVipOrderOrderPaySuccess.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. "use strict";
  2. var common_vendor = require("../common/vendor.js");
  3. var api_userVipOrder = require("../api/userVipOrder.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. this.orderId = option.orderId;
  16. this.getVipOrderById();
  17. },
  18. methods: {
  19. back() {
  20. common_vendor.index.switchTab({
  21. url: "/pages/index/index"
  22. });
  23. },
  24. getVipOrderById() {
  25. var data = { orderId: this.orderId };
  26. var that = this;
  27. common_vendor.index.showLoading();
  28. api_userVipOrder.getVipOrderById(data).then((res) => {
  29. common_vendor.index.hideLoading();
  30. if (res.code == 200) {
  31. that.order = res.data;
  32. } else {
  33. common_vendor.index.showToast({
  34. icon: "none",
  35. title: res.msg
  36. });
  37. }
  38. }, (rej) => {
  39. });
  40. },
  41. copyTest(text) {
  42. common_vendor.index.setClipboardData({
  43. data: text,
  44. success: () => {
  45. common_vendor.index.showToast({
  46. title: "\u5185\u5BB9\u5DF2\u6210\u529F\u590D\u5236\u5230\u526A\u5207\u677F",
  47. icon: "none"
  48. });
  49. }
  50. });
  51. }
  52. }
  53. };
  54. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  55. return {
  56. a: common_vendor.o(($event) => $options.back()),
  57. b: common_vendor.t($data.order.orderCode),
  58. c: common_vendor.o(($event) => $options.copyTest($data.order.orderCode)),
  59. d: common_vendor.t($data.order.payMoney.toFixed(2)),
  60. e: common_vendor.t($data.order.createTime)
  61. };
  62. }
  63. var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_order/userVipOrderOrderPaySuccess.vue"]]);
  64. wx.createPage(MiniProgramPage);