修复打包后退款申请图片上传失败
This commit is contained in:
1 parent
d237d51984
commit
759a55b432
2 files changed
+7
-13
No files matched your search
@@ -20,17 +20,11 @@ const state = reactive<any>({
|
||||
shopCarList: [],
|
||||
setting: {},
|
||||
selectList: [],
|
||||
header: "",
|
||||
})
|
||||
const uploadApplyPicUrls = ref<Array<Record<string, any> | string>>([]) // 补充凭证图片
|
||||
const applyPicUrls = computed(() => uploadApplyPicUrls.value.map((item: any) => JSON.parse(item.response).data.url).join(","))
|
||||
|
||||
// watch(
|
||||
// () => uploadApplyPicUrls.value,
|
||||
// (val) => {
|
||||
// console.log(JSON.stringify(val))
|
||||
// },
|
||||
// )
|
||||
|
||||
const applyForm = reactive<any>({
|
||||
way: data.payType[0].type,
|
||||
remark: "",
|
||||
@@ -42,12 +36,12 @@ onLoad((options: any) => {
|
||||
if (!isEmpty(options.id)) {
|
||||
state.detailId = options.id
|
||||
}
|
||||
state.header = hooks.useDefaultHeader()
|
||||
})
|
||||
onShow(() => {
|
||||
getDetail()
|
||||
getSetting()
|
||||
getShopCarList()
|
||||
state.header = hooks.useDefaultHeader()
|
||||
})
|
||||
|
||||
const getSetting = async () => {
|
||||
@@ -204,9 +198,6 @@ const doSubmit = async () => {
|
||||
</view>
|
||||
</view>
|
||||
<view class="h-30rpx" />
|
||||
|
||||
<view>{{ JSON.stringify(uploadApplyPicUrls) }}</view>
|
||||
|
||||
<template #main-bottom>
|
||||
<view
|
||||
v-if="state.detailType != 'view'"
|
||||
|
||||
@@ -5,8 +5,11 @@ import isDevEnv from "../utils/isDevEnv"
|
||||
export const useToken = () => {
|
||||
const tokenKey = storageConstant.TOKEN
|
||||
const tokenStorage = uni.getStorageSync(tokenKey)
|
||||
if (!tokenStorage.access_token) return ""
|
||||
return `Bearer ${tokenStorage.access_token}`
|
||||
|
||||
if (isDevEnv()) {
|
||||
return tokenStorage?.access_token ? `Bearer ${tokenStorage.access_token}` : ""
|
||||
}
|
||||
return tokenStorage?.accessToken?.tokenValue ? `Bearer ${tokenStorage.accessToken.tokenValue}` : ""
|
||||
}
|
||||
|
||||
export const useDefaultHeader = () => {
|
||||
|
||||
Reference in new issue
Block a user