完善页面

This commit is contained in:
wangxiaowei
2025-10-28 16:28:17 +08:00
parent 7963c28ceb
commit 331d6facdb
17 changed files with 1637 additions and 72 deletions

View File

@ -46,8 +46,8 @@
<view class="product-list pr" v-if="item.product.length > 1" @click="gotoOrder(item.order_id)">
<scroll-view scroll-x="true">
<view class="list d-s-c pr100">
<view class="cover mr10" v-for="(img, num) in item.product" :key="num">
<image :src="img.image.file_path" mode="aspectFit"></image>
<view class="cover mr10" v-for="(img, num) in item.product" :key="num" style="width: 200rpx; height: 200rxpx;">
<image :src="img.image.file_path" mode="aspectFill" style="width: 200rpx; height: 200rxpx;"></image>
</view>
</view>
</scroll-view>
@ -63,7 +63,7 @@
<!--一个商品显示-->
<view class="one-product d-s-c" v-else @click="gotoOrder(item.order_id)">
<view class="cover" v-for="(img, num) in item.product" :key="num" style="width: 200rpx; height: 200rxpx;">
<image :src="img.image.file_path" mode="aspectFit" style="width: 200rpx; height: 200rxpx;"></image>
<image :src="img.image.file_path" mode="aspectFill" style="width: 200rpx; height: 200rxpx;"></image>
</view>
<view class="flex-1">
<view class="pro-info cg-info1">这个是场馆的分场名称</view>
@ -165,7 +165,7 @@
<view class="order-bts" v-else>
<block v-if="item.order_status.value ==10">
<!-- 未支付取消订单 -->
<button @click="cancelOrder(item.order_id)" class="theme-borderbtn cancel-btn"
<button @click="showCancleOrderPopup(item.order_id)" class="theme-borderbtn cancel-btn"
v-if="item.pay_status.value == 10">取消订单</button>
<!-- 已支付取消订单 -->
<block v-if="item.pay_status.value == 20 && item.delivery_status.value == 10">
@ -185,7 +185,7 @@
<!-- todo 缺了一个删除订单的功能,需要跟后端确认 -->
<!-- <block v-if="item.pay_status.value == 10"><button class="theme-btn del-btn"
@click="onPayOrder(item.order_id)">删除订单</button></block> -->
@click="onDelOrder(item.order_id)">删除订单</button></block> -->
<!-- 确认收货 -->
@ -216,6 +216,35 @@
<image class="ww100" :src="codeImg" mode="widthFix"></image>
</view>
</Popup>
<!-- 取消订单 -->
<Popup :show="cancelOrderPopup" radius="16rpx">
<view class="notice-popup">
<view class="title">确定取消订单</view>
<view class="desc">
取消订单后无法恢复是否确认取消
</view>
<view class="btn">
<view class="btn1" @click="cancelOrderPopup = false">取消</view>
<view class="btn2" @click="cancelOrder">确定</view>
</view>
</view>
</Popup>
<!-- 删除订单 -->
<Popup :show="delOrderPopup" radius="16rpx">
<view class="notice-popup">
<view class="title">确定删除订单</view>
<view class="desc">
删除订单后无法恢复是否确认删除订单
</view>
<view class="btn">
<view class="btn1" @click="delOrderPopup = false">取消</view>
<view class="btn2" @click="delOrder">确定</view>
</view>
</view>
</Popup>
<tabBar></tabBar>
</view>
</template>
@ -265,7 +294,9 @@
loading: true,
/*是否显示核销二维码*/
isCodeImg: false,
codeImg: ''
codeImg: '',
cancelOrderPopup: false,
delOrderPopup: false,
};
},
computed: {
@ -417,7 +448,7 @@
/*跳转页面*/
gotoOrder(e) {
this.gotoPage('/pages/order/order-detail?order_id=' + e);
this.gotoPage('/pages/order/cg-order-detail?order_id=' + e);
},
/*隐藏支付方式*/
@ -518,36 +549,34 @@
}
});
},
// 取消订单弹窗
showCancleOrderPopup(order_id) {
this.cancelOrderPopup = true;
this.order_id = order_id;
},
/*取消订单*/
cancelOrder(e) {
let self = this;
let order_id = e;
uni.showModal({
title: '提示',
content: '您确定要取消吗?',
success: function(o) {
if (o.confirm) {
uni.showLoading({
title: '正在处理'
});
self._get(
'user.order/cancel', {
order_id: order_id
},
function(res) {
uni.hideLoading();
uni.showToast({
title: '操作成功',
duration: 2000,
icon: 'success'
});
self.listData = [];
self.getData();
}
);
}
}
uni.showLoading({
title: '正在处理'
});
self._get(
'user.order/cancel', {
order_id: self.order_id
},
function(res) {
uni.hideLoading();
uni.showToast({
title: '操作成功',
duration: 2000,
icon: 'success'
});
self.listData = [];
self.getData();
}
);
},
nowOverTime(t) {
@ -589,6 +618,15 @@
gotoAssembleShare(e) {
let url = '/pages/plus/assemble/fight-group-detail/fight-group-detail?assemble_bill_id=' + e;
this.gotoPage(url);
},
// 删除订单
onDelOrder() {
uni.showToast({
title: '该功能正在开发中,敬请期待',
duration: 2000,
icon: 'none'
});
}
}
};
@ -604,4 +642,54 @@
@import url("css/cg-order.css");
.notice-popup {
padding: 20rpx 0;
width: 100%;
.title {
font-size: 36rpx;
color: #303133;
line-height: 50rpx;
text-align: center;
}
.desc {
margin-top: 48rpx;
font-weight: 400;
font-size: 32rpx;
color: #303133;
line-height: 52rpx;
text-align: center;
}
.btn {
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 44rpx;
.btn1 {
width: 240rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #F6F7F8;
border-radius: 8rpx;
margin-right: 30rpx;
}
.btn2 {
width: 240rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #365A9A;
color: #FFFFFF;
border-radius: 8rpx;
}
}
}
</style>