feat:退款优化
This commit is contained in:
1 parent
feb4776d85
commit
352df06fab
2 files changed
+31
-5
No files matched your search
@@ -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 # 测试线上
|
||||
|
||||
|
||||
@@ -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<any>({
|
||||
},
|
||||
// 维护当前多选的售后状态,用于文字高亮和切换。
|
||||
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) => {
|
||||
</template>
|
||||
<view class="card rounded-24rpx bg-white p-20rpx pb-0rpx mb-20rpx" v-for="(v, index) in pageHook.list"
|
||||
:key="v.id">
|
||||
<order-car :cardetail="v" :footerOperate="['refund', 'qrCodeDetail']" />
|
||||
<order-car :cardetail="v" :footerOperate="computedCardBtn(v)" />
|
||||
</view>
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
|
||||
Reference in new issue
Block a user