build(deps): update deps
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import {ref} from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
import { getActiveOrderList, deleteActiveOrder } from '@/api/goods';
|
||||
import { getOrderStatistics } from '@/api/order';
|
||||
import {getActiveOrderList, deleteActiveOrder} from '@/api/goods';
|
||||
import {getOrderStatistics} from '@/api/order';
|
||||
import UQRCode from 'uqrcodejs';
|
||||
|
||||
const tabValue = ref(0);
|
||||
@@ -162,7 +162,7 @@ const toDetail = (item: any) => {
|
||||
|
||||
const delOrder = async (oid: string) => {
|
||||
try {
|
||||
await deleteActiveOrder({ oid });
|
||||
await deleteActiveOrder({oid});
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
title: error.msg,
|
||||
@@ -237,37 +237,49 @@ const closed = () => {
|
||||
<image src="../static/user/order_list_top.png" />
|
||||
</view> -->
|
||||
<view class="tabs-box">
|
||||
<view v-for="item in tabsList" :key="item.value" @click="tabChange(item.value)">
|
||||
<view class="text" :style="{
|
||||
color: tabValue === item.value ? '#000' : '#9C9C9C',
|
||||
}">{{ item.title }}
|
||||
<view
|
||||
v-for="item in tabsList"
|
||||
:key="item.value"
|
||||
@click="tabChange(item.value)">
|
||||
<view
|
||||
class="text"
|
||||
:style="{
|
||||
color: tabValue === item.value ? '#000' : '#9C9C9C',
|
||||
}"
|
||||
>{{ item.title }}
|
||||
</view>
|
||||
<!-- <view>{{ item.num }}</view> -->
|
||||
<view class="line" :class="{ lineColor: item.value === tabValue }"></view>
|
||||
<view class="line" :class="{lineColor: item.value === tabValue}"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderList.length > 0">
|
||||
<view class="order-card" v-for="(item, index) in orderList" :key="index" @click="toDetail(item)">
|
||||
<view
|
||||
class="order-card"
|
||||
v-for="(item, index) in orderList"
|
||||
:key="index"
|
||||
@click="toDetail(item)">
|
||||
<view class="top">
|
||||
<view class="text-[#9C9C9C] text-[28px]">订单号:{{ item.oid }}</view>
|
||||
<view :style="{
|
||||
color:
|
||||
item.status === 0
|
||||
? '#FF850A'
|
||||
: item.status === 1
|
||||
<view
|
||||
:style="{
|
||||
color:
|
||||
item.status === 0
|
||||
? '#FF850A'
|
||||
: item.status === 1
|
||||
? '#F83D3D'
|
||||
: item.status === 2
|
||||
? '#333333'
|
||||
: '#9C9C9C',
|
||||
}">{{
|
||||
item.status === 0
|
||||
? '待付款'
|
||||
: item.status === 1
|
||||
? '#333333'
|
||||
: '#9C9C9C',
|
||||
}"
|
||||
>{{
|
||||
item.status === 0
|
||||
? '待付款'
|
||||
: item.status === 1
|
||||
? '待使用'
|
||||
: item.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
}}
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
@@ -277,8 +289,11 @@ const closed = () => {
|
||||
<view class="flex flex-col justify-between flex-1">
|
||||
<view class="title">{{ itm.Goods?.name }}</view>
|
||||
<view class="text-[#F83D3D] mt-5">
|
||||
<view>{{ itm.Goods.discount_price }}元
|
||||
<text v-if="itm.Goods.exchange > 0">+{{ itm.Goods.exchange }}积分</text>
|
||||
<view
|
||||
>{{ itm.Goods.discount_price }}元
|
||||
<text v-if="itm.Goods.exchange > 0"
|
||||
>+{{ itm.Goods.exchange }}积分</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -288,18 +303,28 @@ const closed = () => {
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="line"></view> -->
|
||||
<view class="flex justify-between items-center mt-2 mb-2 text-[25px]" v-if="item.status !== 0"
|
||||
<view
|
||||
class="flex justify-between items-center mt-2 mb-2 text-[25px]"
|
||||
v-if="item.status !== 0"
|
||||
style="text-align: right">
|
||||
<text class="text-[#9C9C9C] text-[28px]">共{{ item.count }}件商品
|
||||
<text class="text-[#9C9C9C] text-[28px]"
|
||||
>共{{ item.count }}件商品
|
||||
</text>
|
||||
<text class="text-[26px]">{{ item.status !== 0 ? '实' : '应' }}付款:
|
||||
<text class="text-[26px]"
|
||||
>{{ item.status !== 0 ? '实' : '应' }}付款:
|
||||
{{ item.discount_price }} (元)
|
||||
<text v-if="item.exchange > 0">积分抵扣: {{ item.exchange }}</text>
|
||||
</text>
|
||||
<!-- <view class="line"></view> -->
|
||||
</view>
|
||||
<view class="btn">
|
||||
<nut-button v-if="item.status === 0" plain size="mini" type="primary" @click.stop="delOrder(item.oid)">取消订单
|
||||
<nut-button
|
||||
v-if="item.status === 0"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click.stop="delOrder(item.oid)"
|
||||
>取消订单
|
||||
</nut-button>
|
||||
<!-- <nut-button
|
||||
style="margin-left: 5px"
|
||||
@@ -308,29 +333,55 @@ const closed = () => {
|
||||
@click="toDetail(item)"
|
||||
>查看详情
|
||||
</nut-button> -->
|
||||
<nut-button style="margin-left: 5px" size="mini" type="primary" v-if="item.status === 0"
|
||||
@click.stop="openPay(item)">立即付款
|
||||
<nut-button
|
||||
style="margin-left: 5px"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="item.status === 0"
|
||||
@click.stop="openPay(item)"
|
||||
>立即付款
|
||||
</nut-button>
|
||||
<nut-button style="margin-left: 5px" size="mini" type="primary" v-if="item.status === 1"
|
||||
@click.stop="openCode(item)">出示核销码
|
||||
<nut-button
|
||||
style="margin-left: 5px"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="item.status === 1"
|
||||
@click.stop="openCode(item)"
|
||||
>出示核销码
|
||||
</nut-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<nut-empty v-else description="暂无订单"></nut-empty>
|
||||
<!-- 核销码弹窗 -->
|
||||
<nut-popup v-model:visible="isShowCode" position="center" style="padding: 20px; border-radius: 15px"
|
||||
:maskClosable="true" safe-area-inset-bottom @click-overlay="closed" @closed="closed">
|
||||
<nut-popup
|
||||
v-model:visible="isShowCode"
|
||||
position="center"
|
||||
style="padding: 20px; border-radius: 15px"
|
||||
:maskClosable="true"
|
||||
safe-area-inset-bottom
|
||||
@click-overlay="closed"
|
||||
@closed="closed">
|
||||
<view class="code-box">
|
||||
<view>核销码</view>
|
||||
<!-- <image class="qrcode" :src="url"></image> -->
|
||||
<!-- <view class="qrcode"> -->
|
||||
<canvas ref="qrcode" id="qrcode" style="width: 200px; height: 200px" canvas-id="qrcode"></canvas>
|
||||
<canvas
|
||||
ref="qrcode"
|
||||
id="qrcode"
|
||||
style="width: 200px; height: 200px"
|
||||
canvas-id="qrcode"></canvas>
|
||||
<!-- </view> -->
|
||||
</view>
|
||||
</nut-popup>
|
||||
<pay :isShowPay="isShowPay" :interval="false" :jfInfo="jfInfo" :OrderType="2" @errPay="errPay"
|
||||
@successPay="successPay" @closePay="closePay" />
|
||||
<pay
|
||||
:isShowPay="isShowPay"
|
||||
:interval="false"
|
||||
:jfInfo="jfInfo"
|
||||
:OrderType="2"
|
||||
@errPay="errPay"
|
||||
@successPay="successPay"
|
||||
@closePay="closePay" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
<view class="font-bold">订单待使用</view>
|
||||
<IconFont name="rect-right" size="15" color="#333333"></IconFont>
|
||||
</view>
|
||||
<view class="text-[#9C9C9C] text-[20px]">订单剩余
|
||||
<view class="text-[#9C9C9C] text-[20px]"
|
||||
>订单剩余
|
||||
<text class="text-[#FF0000]">{{ timeStr }} </text>
|
||||
过期,请尽快核销!
|
||||
</view>
|
||||
@@ -49,27 +50,37 @@
|
||||
</view>
|
||||
<!-- 商家信息 -->
|
||||
<view class="mer-info">
|
||||
<image class="w-[150px] h-[150px] rounded-lg mr-2" :src="goodInfo.Store?.head_photo" />
|
||||
<image
|
||||
class="w-[150px] h-[150px] rounded-lg mr-2"
|
||||
:src="goodInfo.Store?.head_photo" />
|
||||
<view class="right">
|
||||
<view class="text-[#333333]">{{ goodInfo.Store?.name }}</view>
|
||||
<view class="flex mt-2 items-center text-[#999999] text-[23px] text-ellipsis line-clamp-3">
|
||||
<view style="font-size: 15px" class="iconfont icon-dizhi text-[#C4C4C4]"></view>
|
||||
<view
|
||||
class="flex mt-2 items-center text-[#999999] text-[23px] text-ellipsis line-clamp-3">
|
||||
<view
|
||||
style="font-size: 15px"
|
||||
class="iconfont icon-dizhi text-[#C4C4C4]"></view>
|
||||
<view>{{ goodInfo.Store?.address }}</view>
|
||||
</view>
|
||||
<view class="w-full flex items-center justify-between mt-1">
|
||||
<view class="ml-3 text-[23px] text-[#999999]">距离您{{
|
||||
calculateDistance(
|
||||
userLocalNum.t,
|
||||
userLocalNum.l,
|
||||
Number(goodInfo.Store?.lat),
|
||||
Number(goodInfo.Store?.lon),
|
||||
)
|
||||
}}
|
||||
<view class="ml-3 text-[23px] text-[#999999]"
|
||||
>距离您{{
|
||||
calculateDistance(
|
||||
userLocalNum.t,
|
||||
userLocalNum.l,
|
||||
Number(goodInfo.Store?.lat),
|
||||
Number(goodInfo.Store?.lon),
|
||||
)
|
||||
}}
|
||||
</view>
|
||||
<view class="flex items-center">
|
||||
<image @tap="toPhone()" class="w-[50px] h-[50px]"
|
||||
<image
|
||||
@tap="toPhone()"
|
||||
class="w-[50px] h-[50px]"
|
||||
src="http://p0.meituan.net/csc/ab0493b124a6bb858bf82a2340767c0d919.png" />
|
||||
<image @tap="toAdder()" class="w-[50px] h-[50px] ml-2"
|
||||
<image
|
||||
@tap="toAdder()"
|
||||
class="w-[50px] h-[50px] ml-2"
|
||||
src="http://p1.meituan.net/csc/92ee8512c90527169b44e07fd11d250d924.png" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -81,13 +92,19 @@
|
||||
<nut-cell>
|
||||
<template #default>
|
||||
<view class="center-box">
|
||||
<view class="top" v-for="(item, index) in goodInfo.OrderGoods" :key="index">
|
||||
<view
|
||||
class="top"
|
||||
v-for="(item, index) in goodInfo.OrderGoods"
|
||||
:key="index">
|
||||
<image :src="item.Goods?.cover" />
|
||||
<view class="flex flex-col justify-between flex-1">
|
||||
<view class="title">{{ item.Goods?.name }}</view>
|
||||
<view class="text-[#F83D3D] mt-5">
|
||||
<view>{{ item.Goods.discount_price }}元
|
||||
<text v-if="item.Goods.exchange > 0">+{{ item.Goods.exchange }}积分</text>
|
||||
<view
|
||||
>{{ item.Goods.discount_price }}元
|
||||
<text v-if="item.Goods.exchange > 0"
|
||||
>+{{ item.Goods.exchange }}积分</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -95,12 +112,17 @@
|
||||
<view>x{{ item.number }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-between items-center mt-2 mb-2 text-[25px]">
|
||||
<view class="text-[#9C9C9C]">{{ `共${goodInfo.count}件商品` }}
|
||||
<view
|
||||
class="flex justify-between items-center mt-2 mb-2 text-[25px]">
|
||||
<view class="text-[#9C9C9C]"
|
||||
>{{ `共${goodInfo.count}件商品` }}
|
||||
</view>
|
||||
<text class="text-[26px]">{{ goodInfo.status !== 0 ? '实' : '应' }}付款:
|
||||
<text class="text-[26px]"
|
||||
>{{ goodInfo.status !== 0 ? '实' : '应' }}付款:
|
||||
{{ goodInfo.discount_price }} (元)
|
||||
<text v-if="goodInfo.exchange > 0">积分抵扣: {{ goodInfo.exchange }}</text>
|
||||
<text v-if="goodInfo.exchange > 0"
|
||||
>积分抵扣: {{ goodInfo.exchange }}</text
|
||||
>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -109,27 +131,44 @@
|
||||
</nut-cell-group>
|
||||
<nut-cell-group>
|
||||
<nut-cell title="订单号:" :desc="goodInfo.oid"></nut-cell>
|
||||
<nut-cell title="下单时间:" :desc="goodInfo.add_time?.slice(0, 19)"></nut-cell>
|
||||
<nut-cell
|
||||
title="下单时间:"
|
||||
:desc="goodInfo.add_time?.slice(0, 19)"></nut-cell>
|
||||
<!-- <nut-cell
|
||||
v-if="goodInfo.expires !== 0"
|
||||
title="订单过期时间:"
|
||||
:desc="
|
||||
dayjs.unix(goodInfo.expires).format('YYYY-MM-DD HH:mm:ss')
|
||||
"></nut-cell> -->
|
||||
<nut-cell title="订单状态:" :desc="goodInfo.status === 0
|
||||
? '待付款'
|
||||
: goodInfo.status === 1
|
||||
? '待使用'
|
||||
: goodInfo.status === 2
|
||||
<nut-cell
|
||||
title="订单状态:"
|
||||
:desc="
|
||||
goodInfo.status === 0
|
||||
? '待付款'
|
||||
: goodInfo.status === 1
|
||||
? '待使用'
|
||||
: goodInfo.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
"></nut-cell>
|
||||
</nut-cell-group>
|
||||
|
||||
<view class="mt-[30px] m-auto">
|
||||
<nut-button v-if="goodInfo.status === 0" shape="square" type="primary" block @click="openPay()">继续付款
|
||||
<nut-button
|
||||
v-if="goodInfo.status === 0"
|
||||
shape="square"
|
||||
type="primary"
|
||||
block
|
||||
@click="openPay()"
|
||||
>继续付款
|
||||
</nut-button>
|
||||
<nut-button v-if="goodInfo.status === 1" shape="square" type="primary" block @click="openCode()">出示核销码
|
||||
<nut-button
|
||||
v-if="goodInfo.status === 1"
|
||||
shape="square"
|
||||
type="primary"
|
||||
block
|
||||
@click="openCode()"
|
||||
>出示核销码
|
||||
</nut-button>
|
||||
</view>
|
||||
|
||||
@@ -160,30 +199,46 @@
|
||||
</view> -->
|
||||
|
||||
<!-- 核销码弹窗 -->
|
||||
<nut-popup v-model:visible="isShowCode" position="center" style="padding: 20px; border-radius: 15px"
|
||||
:maskClosable="true" safe-area-inset-bottom @click-overlay="closed" @closed="closed">
|
||||
<nut-popup
|
||||
v-model:visible="isShowCode"
|
||||
position="center"
|
||||
style="padding: 20px; border-radius: 15px"
|
||||
:maskClosable="true"
|
||||
safe-area-inset-bottom
|
||||
@click-overlay="closed"
|
||||
@closed="closed">
|
||||
<view class="code-box">
|
||||
<view>核销码</view>
|
||||
<!-- <image class="qrcode" :src="url"></image> -->
|
||||
<!-- <view class="qrcode"> -->
|
||||
<canvas ref="qrcode" id="qrcode" style="width: 200px; height: 200px" canvas-id="qrcode"></canvas>
|
||||
<canvas
|
||||
ref="qrcode"
|
||||
id="qrcode"
|
||||
style="width: 200px; height: 200px"
|
||||
canvas-id="qrcode"></canvas>
|
||||
<!-- </view> -->
|
||||
</view>
|
||||
</nut-popup>
|
||||
<pay :isShowPay="isShowPay" :interval="false" :jfInfo="jfInfo" :OrderType="2" @errPay="errPay"
|
||||
@successPay="successPay" @closePay="closePay" />
|
||||
<pay
|
||||
:isShowPay="isShowPay"
|
||||
:interval="false"
|
||||
:jfInfo="jfInfo"
|
||||
:OrderType="2"
|
||||
@errPay="errPay"
|
||||
@successPay="successPay"
|
||||
@closePay="closePay" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import { onUnmounted, ref } from 'vue';
|
||||
import {onUnmounted, ref} from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
import { calculateDistance } from '@/utils';
|
||||
import { IconFont } from '@nutui/icons-vue-taro';
|
||||
import { getActiveOrderDetail } from '@/api/goods';
|
||||
import {calculateDistance} from '@/utils';
|
||||
import {IconFont} from '@nutui/icons-vue-taro';
|
||||
import {getActiveOrderDetail} from '@/api/goods';
|
||||
import UQRCode from 'uqrcodejs';
|
||||
|
||||
dayjs.extend(duration);
|
||||
|
||||
Reference in New Issue
Block a user