【订单】 优化# 退款原因样式
parent
73ed247bec
commit
338c08442a
|
@ -69,14 +69,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { shallowRef, ref, watch } from 'vue'
|
|
||||||
import { onLoad, onShow, onUnload } from '@dcloudio/uni-app'
|
|
||||||
import { getGeocoder } from '@/api/app'
|
import { getGeocoder } from '@/api/app'
|
||||||
import { apiAddressLists, apiAddressEdit } from '@/api/user'
|
import { apiAddressEdit, apiAddressLists } from '@/api/user'
|
||||||
import { wxOaAddress } from '@/hooks/wechat'
|
import { wxOaAddress } from '@/hooks/wechat'
|
||||||
import { isWeixinClient } from '@/utils/client'
|
|
||||||
import { useUserStore } from '@/stores/user'
|
import { useUserStore } from '@/stores/user'
|
||||||
|
import { isWeixinClient } from '@/utils/client'
|
||||||
|
import { onLoad, onShow, onUnload } from '@dcloudio/uni-app'
|
||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
|
import { ref, shallowRef } from 'vue'
|
||||||
|
|
||||||
const paging = shallowRef<any>(null)
|
const paging = shallowRef<any>(null)
|
||||||
const type = ref(false)
|
const type = ref(false)
|
||||||
|
@ -90,6 +90,9 @@ const queryList = async (pageNo, pageSize) => {
|
||||||
try {
|
try {
|
||||||
const { lists } = await apiAddressLists({ pageNo, pageSize })
|
const { lists } = await apiAddressLists({ pageNo, pageSize })
|
||||||
paging.value.setLocalPaging(lists)
|
paging.value.setLocalPaging(lists)
|
||||||
|
if (lists.length > 0) {
|
||||||
|
uni.$emit('address', lists[0])
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('报错=>', e)
|
console.log('报错=>', e)
|
||||||
//TODO handle the exception
|
//TODO handle the exception
|
||||||
|
|
|
@ -186,10 +186,11 @@
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="flex justify-between"
|
class="flex justify-between"
|
||||||
|
:class="setRefuseReasonStyle()?.container"
|
||||||
v-if="orderData.orderStatus === 4 || orderData.orderStatus === 5"
|
v-if="orderData.orderStatus === 4 || orderData.orderStatus === 5"
|
||||||
>
|
>
|
||||||
<view>退款原因</view>
|
<view>退款原因</view>
|
||||||
<view class="flex-1 ml-2 text-right">
|
<view class="flex-1" :class="setRefuseReasonStyle()?.content">
|
||||||
{{ orderData.orderRefundDetailVo?.refundReason }}
|
{{ orderData.orderRefundDetailVo?.refundReason }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -261,6 +262,20 @@ const payState = reactive({
|
||||||
const orderId = ref<number | string>('')
|
const orderId = ref<number | string>('')
|
||||||
|
|
||||||
const isUseCoupon = computed(() => unref(orderData.value.couponDetailVo))
|
const isUseCoupon = computed(() => unref(orderData.value.couponDetailVo))
|
||||||
|
const setRefuseReasonStyle = computed(() => () => {
|
||||||
|
const reason = orderData.value.orderRefundDetailVo?.refundReason as string
|
||||||
|
const classNameMap = {
|
||||||
|
container: '',
|
||||||
|
content: ''
|
||||||
|
}
|
||||||
|
if (reason.length <= 30) {
|
||||||
|
classNameMap.content = 'text-right'
|
||||||
|
} else {
|
||||||
|
classNameMap.container = 'flex-col gap-2'
|
||||||
|
classNameMap.content = 'text-left indent-3'
|
||||||
|
}
|
||||||
|
return classNameMap
|
||||||
|
})
|
||||||
|
|
||||||
// 初始化订单详情
|
// 初始化订单详情
|
||||||
const initOrderDetail = async (): Promise<void> => {
|
const initOrderDetail = async (): Promise<void> => {
|
||||||
|
|
Loading…
Reference in New Issue