feat: 优化代码

This commit is contained in:
2025-08-06 20:25:41 +08:00
parent 5f7d0ceb79
commit 73823c50fd
1179 changed files with 42944 additions and 189654 deletions
+7 -7
View File
@@ -7,8 +7,8 @@
<view style="margin-left: 20rpx;">
<view class="title_">{{item.prizeName}}</view>
<view class="time_">{{formatDate(item.ctdate)}}</view>
<view
class="delivery_"
<view
class="delivery_"
v-if="[DELIVER_STATUS.AWAIT_DELIVERY_REQUIRED,DELIVER_STATUS.YES_DELIVERY_REQUIRED,DELIVER_STATUS.RECEIVED].includes(item.deliveryStatus)"
>
<view class="delivery_status">{{getValue(DELIVER_STATUS_,item.deliveryStatus)}}</view>
@@ -29,14 +29,14 @@
</view>
<view v-if="loading" style="text-align: center;">加载中...</view>
</scroll-view>
</template>
<script>
import { getWinningList } from '@/api/raffle.js';
import { formatDate,copyData } from '@/utils/index.js';
import { DELIVER_STATUS,DELIVER_STATUS_,getValue } from '@/utils/enumUtils.js'
export default {
name:"winning_record",
props: {
@@ -48,7 +48,7 @@
computed: {
DELIVER_STATUS() {
return DELIVER_STATUS;
},
},
DELIVER_STATUS_(){
return DELIVER_STATUS_;
}
@@ -74,10 +74,10 @@
getValue,
jumpGetFun(item){
uni.navigateTo({
url:'/pages/get_prize/get_prize?id='+item.id,
url:'/pages/other_package/get_prize/get_prize?id='+item.id,
})
},
// 加载数据的方法
async loadData() {
if (this.loading) return; // 如果正在加载,则不重复加载