diff --git a/.env b/.env index 6200335..4b14a59 100644 --- a/.env +++ b/.env @@ -25,16 +25,16 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' # VITE_ZZD_CORP_ID= # --------------------------- 开发环境 api地址 ---------------------------------- -# VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 +VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 #VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 - VITE_APP_DEV_SERVICE = https://dzc-test-1.fy.takin.cc # 邓-本地 +# VITE_APP_DEV_SERVICE = https://dzc-test-1.fy.takin.cc # 邓-本地 # VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 # VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上 # --------------------------- 开发环境 图片访问基础地址 --------------------------- -# VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上 +VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上 #VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上 -VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地 +# VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地 # VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 # VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上 diff --git a/src/pages/tabbar/order.vue b/src/pages/tabbar/order.vue index f59d681..58511e8 100644 --- a/src/pages/tabbar/order.vue +++ b/src/pages/tabbar/order.vue @@ -8,6 +8,7 @@ import { orderApi } from "@@/api" import zTabs from "@@/components/other/z-tabs/z-tabs.vue" import OrderCar from "@/sheep/components/order/order-car.vue" import { getLaunchParam } from "@/sheep/utils/app" +import { hasRoleCode, MCH_USER } from "@@/utils/user-role" const data = { tabs: [ @@ -28,6 +29,8 @@ const state = reactive({ }, // 维护当前多选的售后状态,用于文字高亮和切换。 activeRefundStatusList: [] as string[], + currentUser: {}, + currentUserRole: "", }) const refundStatusList = computed(() => { @@ -48,8 +51,31 @@ onShow(async () => { if (pageRef.value) { pageRef.value.reload(false) } + getCurrentUserDetail() }) +const computedCardBtn = (v: any): any => { + if (state.currentUserRole && state.currentUserRole == "merchant") { + const orderUserId = v.userId + const currentUserId = state.currentUser?.sysUser?.userId + if (hasRoleCode(MCH_USER) || orderUserId != currentUserId) { + return ['qrCodeDetail'] + } + } + return ['refund', 'qrCodeDetail'] +} + +const getCurrentUserDetail = () => { + const userRole = uni.getStorageSync("userRole") ?? "" + state.currentUserRole = userRole + + const userInfo: any = uni.getStorageSync(constant.storageConstant.USERINFO) || {} + if (userInfo) { + state.currentUser = userInfo + } + +} + const doTab = (e: any) => { const target = data.tabs[e] state.pa = target.pa @@ -129,7 +155,7 @@ const isRefundStatusActive = (statusId: string) => { - +