feat(custom): 新增消息订阅
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-08-27 17:06:59 +08:00
parent f199320de0
commit 1d8532eccf
104 changed files with 2350 additions and 2477 deletions

View File

@@ -1,15 +1,15 @@
<script lang="ts" setup>
import { ref } from "vue";
import {ref} from 'vue';
import {
useLoad,
useReachBottom,
showToast,
navigateTo,
setStorageSync,
} from "@tarojs/taro";
import Pay from "@/components/Pay.vue";
import { getActiveOrderList, deleteActiveOrder } from "@/api/goods";
import { getOrderStatistics } from "@/api/order";
} from '@tarojs/taro';
import Pay from '@/components/Pay.vue';
import {getActiveOrderList, deleteActiveOrder} from '@/api/goods';
import {getOrderStatistics} from '@/api/order';
const tabValue = ref(0);
@@ -17,27 +17,27 @@ const isShowPay = ref(false);
const tabsList = ref([
{
title: "全部",
title: '全部',
value: 0,
num: 0,
},
{
title: "待付款",
title: '待付款',
value: 1,
num: 0,
},
{
title: "待使用",
title: '待使用',
value: 2,
num: 0,
},
{
title: "已使用",
title: '已使用',
value: 3,
num: 0,
},
{
title: "已失效",
title: '已失效',
value: 4,
num: 0,
},
@@ -60,7 +60,7 @@ interface OrderList {
const orderList = ref<OrderList[]>([]);
useLoad((options) => {
useLoad(options => {
console.log(options);
// tabValue.value = Number(options.type);
getList();
@@ -83,7 +83,7 @@ const getTj = async () => {
} catch (error) {
showToast({
title: error.msg,
icon: "none",
icon: 'none',
});
}
};
@@ -98,7 +98,7 @@ const getList = async () => {
} catch (error) {
showToast({
title: error.msg,
icon: "none",
icon: 'none',
});
}
getTj();
@@ -110,7 +110,7 @@ const tabChange = (index: number) => {
};
useReachBottom(() => {
console.log("useReachBottom");
console.log('useReachBottom');
});
const openPay = (item: OrderList) => {
@@ -121,8 +121,8 @@ const openPay = (item: OrderList) => {
const errPay = () => {
isShowPay.value = false;
showToast({
title: "支付失败",
icon: "none",
title: '支付失败',
icon: 'none',
});
jfInfo.value = {};
getList();
@@ -141,15 +141,15 @@ const errPay = () => {
const closePay = () => {
isShowPay.value = false;
showToast({
title: "支付取消",
icon: "none",
title: '支付取消',
icon: 'none',
});
jfInfo.value = {};
getList();
};
const toDetail = (item: any) => {
setStorageSync("item", item);
setStorageSync('item', item);
navigateTo({
url: `/pages/users/order_list_detail/index?Id=${item.oid}&type=1`,
});
@@ -165,7 +165,7 @@ const delOrder = async (oid: string) => {
} catch (error) {
showToast({
title: error.msg,
icon: "none",
icon: 'none',
});
}
};
@@ -186,29 +186,25 @@ const delOrder = async (oid: string) => {
<view
v-for="item in tabsList"
:key="item.value"
@click="tabChange(item.value)"
>
@click="tabChange(item.value)">
<view class="text">{{ 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">
<view class="top">
<view>{{ item.add_time.slice(0, 19).replace("T", " ") }}</view>
<view>{{ item.add_time.slice(0, 19).replace('T', ' ') }}</view>
<view style="color: red"
>{{
item.status === 0
? "待付款"
? '待付款'
: item.status === 1
? "待使用"
? '待使用'
: item.status === 2
? "已使用"
: "已失效"
? '已使用'
: '已失效'
}}
</view>
</view>
@@ -264,8 +260,7 @@ const delOrder = async (oid: string) => {
payType="wx"
@errPay="errPay"
@closePay="closePay"
:jfInfo="jfInfo"
/>
:jfInfo="jfInfo" />
</view>
</template>