第一次提交

This commit is contained in:
dt_2916866708
2024-02-28 17:26:46 +08:00
commit f756390529
991 changed files with 126914 additions and 0 deletions

View File

@@ -0,0 +1,178 @@
.Order_body {
width: 100vw;
// height: 100vh;
overflow-y: auto;
padding-top: 80rpx;
// background-color: #f2f2f2;
box-sizing: border-box;
.order_item {
width: 100%;
height: 498rpx;
box-sizing: border-box;
background: #ffffff;
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
margin-top: 10rpx;
padding: 30rpx 0;
.order_item_footer {
width: 686rpx;
height: 88rpx;
background: #f7f7f7;
border-radius: 10rpx;
opacity: 1;
margin: auto;
color: #000000;
font-size: 32rpx;
font-weight: 600;
}
.order_item_center {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
.order_item_right {
margin-left: 20rpx;
}
image {
width: 220rpx;
height: 220rpx;
}
}
.order_item_title {
width: 100%;
box-sizing: border-box;
color: #000000;
padding: 0 30rpx;
padding-bottom: 30rpx;
border-bottom: solid 1rpx #d7d7d7;
.type {
color: #f83d3d;
font-size: 32rpx;
}
.siteName {
font-size: 32rpx;
font-weight: 600;
}
}
}
}
.navigation {
font-size: 28rpx;
color: #f83d3d;
padding: 5rpx 20rpx;
border: solid 1rpx #f83d3d;
border-radius: 50rpx;
}
.site-list-item {
margin: 20rpx auto !important;
}
.selectTriangle {
border-bottom: 4px solid $base-color !important;
}
.selectTriangle2 {
border-top: 4px solid $base-color !important;
}
.triangle {
width: 0;
height: 0;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-bottom: 4px solid #bbbbbb;
margin-bottom: 10rpx;
}
.triangle2 {
width: 0;
height: 0;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid #bbbbbb;
}
.navbar {
position: fixed;
left: 0;
top: 0;
display: flex;
width: 100%;
height: 80upx;
background: #fff;
box-shadow: 0 2upx 10upx rgba(0, 0, 0, 0.06);
z-index: 10;
.nav-item {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
font-size: 30upx;
color: $font-color-dark;
position: relative;
&.current {
color: $base-color;
&:after {
content: '';
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
width: 120upx;
height: 0;
border-bottom: 4upx solid $base-color;
}
}
}
.p-box {
margin-left: 10rpx;
display: flex;
flex-direction: column;
.yticon {
display: flex;
align-items: center;
justify-content: center;
width: 30upx;
height: 14upx;
line-height: 1;
margin-left: 4upx;
font-size: 26upx;
color: #888;
&.active {
color: $base-color;
}
}
.xia {
transform: scaleY(-1);
}
}
.cate-item {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 80upx;
position: relative;
font-size: 44upx;
&:after {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
border-left: 1px solid #ddd;
width: 0;
height: 36upx;
}
}
}

134
Order/pages/index/index.vue Normal file
View File

@@ -0,0 +1,134 @@
<template>
<view class="Order_body">
<view class="navbar">
<view class="nav-item" :class="{current: page.params.orderStatus == ''}" @click="tabClick('')">
全部
</view>
<view class="nav-item" :class="{current: page.params.orderStatus == 1}" @click="tabClick(1)">
待提货
</view>
<view class="nav-item" :class="{current: page.params.orderStatus == 2}" @click="tabClick(2)">
已完成
</view>
<view class="nav-item" :class="{current: page.params.orderStatus == 99}" @click="tabClick(99)">
退款/售后
</view>
</view>
<view @click="goDetails(item)" v-for="item in list" class="order_item">
<view class="order_item_title flex jw textov">
<text class="siteName textov">自提油站{{item.takeSiteName}}</text>
<text class="type">{{item.statusMerge}}</text>
</view>
<view class="order_item_center flex ac">
<image mode="aspectFit" :src="item.oderDetailImg">
</image>
<view class="order_item_right">
<view style=" font-size: 28rpx; color: #000000;">{{item.productName}}</view>
<view style=" font-size: 24rpx; color: #999999;">规格默认 <br /> {{item.integral}} X{{item.orderNum}}
</view>
<view style=" font-size: 26rpx;color: #333333;">共1件商品已支付积分{{item.payIntegral}}</view>
</view>
</view>
<view v-if="item.statusMerge=='待核销'" class="order_item_footer flex ac jc">
提货码{{item.takeCode}}
</view>
</view>
<uni-load-more :status="loadingType"></uni-load-more>
</view>
</template>
<script>
import orderApi from '@/api/order.js'
export default {
data() {
return {
list: [],
page: {
"currentPage": 1,
"pageSize": 10,
"params": {
"orderStatus": ""
}
},
loadingType: 'more', //加载更多状态
pageData: null
}
},
onLoad(e) {
if(e.orderStatus){
this.page.params.orderStatus = e.orderStatus;
}
this.getList()
},
onPullDownRefresh() {
this.page.currentPage = 1;
this.loadingType = 'more';
this.getList();
},
//加载更多
onReachBottom() {
this.page.currentPage += 1
this.getList();
},
filters: {
orderStatus(e) {
switch (Number(e)) {
case 1:
return '已支付'
case 2:
return '已核销'
case 3:
return '停止中'
case 0:
return '已下单'
case -1:
return '已取消'
default:
return '数据错误'
}
},
},
methods: {
goDetails(e){
uni.navigateTo({
url:`/Order/pages/details/index?id=${e.orderId}`
})
},
async getList() {
if (this.loadingType === 'nomore') {
return;
};
await orderApi.getByPageCustomer(this.page).then(res => {
if (res.code == 20000) {
this.list = this.page.currentPage != 1 ? this.list.concat(res.data.list) : res.data
.list;
this.loadingType = res.data.list.length < this.page.pageSize ? 'nomore' : 'more';
}
});
uni.stopPullDownRefresh()
},
search() {
this.page.currentPage = 1;
this.loadingType = 'more';
this.getList()
},
tabClick(index) {
this.page.params.orderStatus = index;
this.$nextTick(function(){
uni.pageScrollTo({
scrollTop: 0,
duration: 300
})
})
this.search()
},
getDetails(id) {
}
}
}
</script>
<style lang="scss" scoped>
@import 'index.scss';
</style>