From 9c017f6c159bc08d41075683345ce15dc44a90c9 Mon Sep 17 00:00:00 2001 From: From-wh Date: Sun, 25 Jun 2023 16:00:54 +0800 Subject: [PATCH] =?UTF-8?q?improve:=20=E7=89=A9=E6=B5=81=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/api/order.js | 7 +++++++ template/uni-app/pages/admin/orderDetail/index.vue | 2 +- template/uni-app/pages/goods/goods_logistics/index.vue | 10 +++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/template/uni-app/api/order.js b/template/uni-app/api/order.js index 212a6f3bf..738f75ab3 100644 --- a/template/uni-app/api/order.js +++ b/template/uni-app/api/order.js @@ -174,6 +174,13 @@ export function orderTake(uni) { export function express(uni, type) { return request.get("order/express/" + uni + `${type?'/refund':''}`); } +/** + * 订单查询物流信息 + * @returns {*} + */ +export function adminExpress(uni, type) { + return request.get("admin/order/express/" + uni + `${type?'/refund':''}`); +} /** * 获取退款理由 diff --git a/template/uni-app/pages/admin/orderDetail/index.vue b/template/uni-app/pages/admin/orderDetail/index.vue index cac405056..79c8bebf2 100644 --- a/template/uni-app/pages/admin/orderDetail/index.vue +++ b/template/uni-app/pages/admin/orderDetail/index.vue @@ -190,7 +190,7 @@ + hover-class='none' :url="'/pages/goods/goods_logistics/index?is_admin=1&orderId='+ orderInfo.order_id"> {{$t(`查看物流`)}} import { - express + express, + adminExpress } from '@/api/order.js'; import { getProductHot @@ -82,7 +83,8 @@ product: [], orderInfo: {}, expressList: [], - hostProduct: [] + hostProduct: [], + is_admin: 0 }; }, computed: mapGetters(['isLogin']), @@ -103,6 +105,7 @@ }); this.orderId = options.orderId; this.type = options.type; + this.is_admin = options.is_admin || 0; if (this.isLogin) { this.getExpress(); this.get_host_product(); @@ -142,7 +145,8 @@ }, getExpress: function() { let that = this; - express(that.orderId, that.type).then(function(res) { + let met = this.is_admin ? adminExpress : express + met(that.orderId, that.type).then(function(res) { let result = res.data.express.result || {}; that.$set(that, 'product', res.data.order.cartInfo || []); that.$set(that, 'orderInfo', res.data.order);