Browse Source

fix order

dev
刘嘉炜 1 week ago
parent
commit
accf24ad19
  1. 3
      src/subpackage/groupon/components/confirm_template.vue
  2. 2
      src/subpackage/groupon/pages/confirm_order/ticket.vue
  3. 2
      src/subpackage/groupon/pages/confirm_order/venue.vue
  4. 21
      src/subpackage/order/components/detail/goods.vue
  5. 23
      src/subpackage/order/components/detail/verify.vue
  6. 1
      src/subpackage/order/pages/detail.vue

3
src/subpackage/groupon/components/confirm_template.vue

@ -74,10 +74,11 @@ onLoad(() => {
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
z-index: 10;
width: 100%; width: 100%;
padding: 10upx 24upx; padding: 10upx 24upx;
@include isPd(10upx);
background-color: #fff; background-color: #fff;
@include isPd(10upx);
// @include ctf; // @include ctf;
// .cf-btn{ // .cf-btn{
// @include clearBtn; // @include clearBtn;

2
src/subpackage/groupon/pages/confirm_order/ticket.vue

@ -73,7 +73,7 @@ function confirmBtn(){
hideLoad(); hideLoad();
// console.warn('verifyCertificates success', res); // console.warn('verifyCertificates success', res);
// showModal({ content: '' }) // showModal({ content: '' })
routeTo(`/subpackage/groupon/pages/exchange_success?brand_id=${_sVal?.brand_id ?? ''}&verify_token=${verify_token.value ?? ''}`);
routeTo(`/subpackage/groupon/pages/exchange_success?brand_id=${_sVal?.brand_id ?? ''}&verify_token=${verify_token.value ?? ''}`, 'rL');
}, },
fail(err){ fail(err){
hideLoad(); hideLoad();

2
src/subpackage/groupon/pages/confirm_order/venue.vue

@ -156,7 +156,7 @@ function createServerOrder(){
.then(oRes=>{ .then(oRes=>{
console.warn('orderPayMini', oRes); console.warn('orderPayMini', oRes);
if(oRes?.code === 0){ if(oRes?.code === 0){
routeTo(`/subpackage/groupon/pages/exchange_success?brand_id=${_sVal?.brand_id ?? ''}&order_no=${cRes?.order_no ?? ''}`);
routeTo(`/subpackage/groupon/pages/exchange_success?brand_id=${_sVal?.brand_id ?? ''}&order_no=${cRes?.order_no ?? ''}`, 'rL');
} }
}) })
}) })

21
src/subpackage/order/components/detail/goods.vue

@ -1,6 +1,6 @@
<script setup> <script setup>
import { onLoad } from '@dcloudio/uni-app'; import { onLoad } from '@dcloudio/uni-app';
import { reactive, ref } from "vue";
import { reactive, ref, computed } from "vue";
import textLine from "./text_line.vue"; import textLine from "./text_line.vue";
const props = defineProps({ const props = defineProps({
dyOrder: { dyOrder: {
@ -10,10 +10,19 @@ const props = defineProps({
imgUrl: { imgUrl: {
type: String, type: String,
default: '' default: ''
},
orderId: {
type: String,
default: ''
} }
}); });
const payAmountFormat = computed(() => {
let _amount = props.dyOrder?.amount?.pay_amount ?? 0;
return (Number(_amount) / 100).toFixed(2);
});
onLoad(() => { onLoad(() => {
console.warn('dyOrder', props.dyOrder);
}); });
</script> </script>
@ -23,17 +32,17 @@ onLoad(() => {
<view class="od-goods"> <view class="od-goods">
<view class="og-title">抖音商品信息</view> <view class="og-title">抖音商品信息</view>
<view class="og-info"> <view class="og-info">
<image v-if="imgUrl" class="oi-pic" mode="aspectFit" :src="imgUrl"></image>
<!-- <image v-if="imgUrl" class="oi-pic" mode="aspectFit" :src="imgUrl"></image> -->
<view class="oi-desc"> <view class="oi-desc">
<view class="od-name">{{ dyOrder?.sku_info?.title ?? '-' }}</view> <view class="od-name">{{ dyOrder?.sku_info?.title ?? '-' }}</view>
<view class="od-price">¥ {{ dyOrder?.amount?.pay_amount ?? '' }}</view>
<view class="od-price">¥ {{ payAmountFormat }}</view>
</view> </view>
<text class="oi-icon">&#xe695;</text>
<!-- <text class="oi-icon">&#xe695;</text> -->
</view> </view>
<view class="og-bottom"> <view class="og-bottom">
<view class="ob-lines"> <view class="ob-lines">
<view class="ol-item"> <view class="ol-item">
<text-line label="订单编号:">{{ dyOrder?.certificate_id ?? '' }}</text-line>
<text-line label="订单编号:">{{ orderId ?? '' }}</text-line>
</view> </view>
<!-- <view class="ol-item"> <!-- <view class="ol-item">
<text-line label="核销券码:">{{ dyOrder?.certificate_id ?? '' }}</text-line> <text-line label="核销券码:">{{ dyOrder?.certificate_id ?? '' }}</text-line>

23
src/subpackage/order/components/detail/verify.vue

@ -36,13 +36,24 @@ function toCode(e){
<view class="dv-tit">验证信息</view> <view class="dv-tit">验证信息</view>
<text-line label="使用日期:">{{ orderInfo?.date ?? '' }}</text-line> <text-line label="使用日期:">{{ orderInfo?.date ?? '' }}</text-line>
<view class="dv-codes"> <view class="dv-codes">
<view class="dc-item" :class="{ gray: !isCodeActive(e.status) }" v-for="(e, i) in (orderInfo?.sessions ?? [])" :key="i">
<view class="di-status">{{ zh_status(e.status) }}</view>
<view class="di-bottom">
<view class="db-code">验证码 {{ e?.verify_code ?? '-' }} </view>
<view class="db-txt-btn" v-if="isCodeActive(e.status)" @click="toCode(e)">查看二维码 &#xe695;</view>
<block v-if="orderInfo?.order_type === 0">
<view class="dc-item" :class="{ gray: !isCodeActive(orderInfo.pay_status) }">
<view class="di-status">{{ zh_status(orderInfo.pay_status) }}</view>
<view class="di-bottom">
<view class="db-code">验证码 {{ orderInfo?.verify_code ?? '-' }} </view>
<view class="db-txt-btn" v-if="isCodeActive(orderInfo.pay_status)" @click="toCode(orderInfo.sessions[0])">查看二维码 &#xe695;</view>
</view>
</view> </view>
</view>
</block>
<block v-else>
<view class="dc-item" :class="{ gray: !isCodeActive(e.status) }" v-for="(e, i) in (orderInfo?.sessions ?? [])" :key="i">
<view class="di-status">{{ zh_status(e.status) }}</view>
<view class="di-bottom">
<view class="db-code">验证码 {{ e?.verify_code ?? '-' }} </view>
<view class="db-txt-btn" v-if="isCodeActive(e.status)" @click="toCode(e)">查看二维码 &#xe695;</view>
</view>
</view>
</block>
</view> </view>
<view class="vci-share-bar" v-if="false"> <view class="vci-share-bar" v-if="false">
<text class="vsb-add-icon">&#xe60d;</text> <text class="vsb-add-icon">&#xe60d;</text>

1
src/subpackage/order/pages/detail.vue

@ -280,6 +280,7 @@ function imError(e){
<detail-goods <detail-goods
:dyOrder="orderInfo?.extension?.douyin_toolkit_info" :dyOrder="orderInfo?.extension?.douyin_toolkit_info"
:imgUrl="orderInfo?.image" :imgUrl="orderInfo?.image"
:orderId="orderInfo?.extension?.douyin_order_id ?? ''"
></detail-goods> ></detail-goods>
</view> </view>

Loading…
Cancel
Save