123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- "use strict";
- const common_vendor = require("../common/vendor.js");
- const common_assets = require("../common/assets.js");
- const _sfc_main = {
- data() {
- return {
- order: null,
- orderCode: "",
- ids: []
- };
- },
- onLoad(option) {
- this.order = JSON.parse(decodeURIComponent(option.order));
- this.orderCode = this.order && this.order.orderCodes ? this.order.orderCodes.join(",") : this.order.orderCode || "";
- this.ids = this.order && this.order.ids ? this.order.ids : this.order.id ? [this.order.id] : [];
- },
- methods: {
- copyOrderSn(text) {
- common_vendor.index.setClipboardData({
- data: text,
- success: () => {
- common_vendor.index.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- goOrderDetails(id) {
- if (this.ids && this.ids.length > 1) {
- common_vendor.index.navigateTo({
- url: "/pages_user/user/storeOrder?status="
- });
- } else {
- common_vendor.index.redirectTo({
- url: "/pages_user/user/storeOrderDetail?id=" + this.ids[0]
- });
- }
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return {
- a: common_assets._imports_0$13,
- b: common_vendor.o(($event) => $options.goOrderDetails($data.order.id)),
- c: common_vendor.f($data.order.orderCodes, (item, k0, i0) => {
- return {
- a: common_vendor.t(item),
- b: item
- };
- }),
- d: common_vendor.o(($event) => $options.copyOrderSn($data.orderCode)),
- e: common_vendor.t($data.order.createTime)
- };
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
- wx.createPage(MiniProgramPage);
|