OfficeApp/pages/oaHome/FirstOrderLog.vue
2024-01-22 19:25:40 +08:00

215 lines
4.3 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<!-- <view class="card">
<view class="li" v-for="item,index in orderList.lists" :key='index'>
<view class="">
订单编号: {{item.order_no}}
</view>
<view class="">
订单金额: <text style="color: #FF4141;">{{item.order_money}}</text>
</view>
</view>
</view> -->
<view class="">
<view class="head">
<view class="money">
总资产
<view class="" style="margin-top: 35rpx;font-size: 35rpx;">
{{money.toLocaleString('zh-CN')}}
</view>
</view>
</view>
<view class="cont" v-if='show'>
<view class="tit">
订单明细
</view>
<view class="card" v-for="(item,index) in orderList" :key='index'>
<view class="card-top">
<view class="">
{{item.create_time}}
</view>
<view class="" style="color: #6A92EB;">
交易成功
</view>
</view>
<view class="card-bottom" style="margin-top: 30rpx;">
<view class="order_detail">
<view class="content" style="display: flex;justify-content: space-between;">
<view class="" v-if="item.order_info" style="display: flex;align-items: center;">
<u--image :showLoading="true" width="70rpx" height="70rpx"
:src="item.order_info.image"></u--image>
<view class="" style="margin-left: 20rpx;">
{{item.order_info.store_name}}
</view>
</view>
<view class="">
{{item.order_money}}
</view>
</view>
</view>
<view class="">
订单编号:{{item.order_no}}
</view>
<!-- <view class="tit" style="font-size: 28rpx;">
{{item.order_no}}
</view>
<view class="">
{{item.order_money}}
</view> -->
</view>
</view>
</view>
</view>
</template>
<script>
import {
getFirstOrderLog,
} from "@/api/newTask.js"
export default {
data() {
return {
orderList: [],
flag: false,
status: "",
page_no: 0,
page_size: 20,
money: "",
show: true,
list: [],
}
},
methods: {
async getFirstOrderLogList() {
let res = await getFirstOrderLog()
// for (let key in res.data.lists) {
// this.orderList.push(res.data.lists[key])
// }
this.orderList = res.data.lists
console.log(this.orderList)
// res.data.lists.forEach(item => {
// console.log(item)
// })
}
},
onLoad(option) {
this.getFirstOrderLogList()
this.money = Number(option.money)
// setTimeout(() => {
// this.show = true
// }, 3000)
}
// onReachBottom() {
// if (this.flag) return
// let {
// page_no,
// page_size
// } = this
// let that = this
// this.status = "loading"
// page_no += 1
// this.flag = true
// getFirstOrderLog({
// page_no,
// page_size
// }).then(res => {
// that.orderList = that.orderList.concat(res.data)
// this.flag = false
// if (!res.data.data.length) {
// this.status = "nomore"
// this.flag = true
// }
// })
// },
}
</script>
<style lang="scss" scoped>
page {
background-color: #F9FBFF;
}
.head {
width: 750rpx;
background-color: #2B63E3;
height: 200rpx;
position: relative;
.money {
width: 670rpx;
background-color: rgba(255, 255, 255, .2);
box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);
height: 220rpx;
margin: 0 auto;
border-radius: 20rpx;
position: absolute;
left: 50%;
top: 100%;
transform: translate(-50%, -50%);
backdrop-filter: blur(50rpx);
color: white;
padding: 20rpx;
}
}
.cont {
// width: 690rpx;
margin: 120rpx auto;
padding: 20rpx;
.tit {
position: relative;
padding-left: 20rpx;
font-size: 30rpx;
color: #1A1A1A;
font-weight: bold;
}
.tit::before {
content: "";
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 0;
width: 6rpx;
/* 左边框的宽度 */
height: 25rpx;
border-radius: 20rpx;
background-color: #2B63E3;
}
.card {
background-color: #fff;
padding: 20rpx;
border-radius: 20rpx;
margin-top: 20rpx;
box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);
.card-top {
display: flex;
justify-content: space-between;
}
}
}
.content {
width: 100%;
padding: 20rpx;
background-color: #F5F5F5;
height: 80rpx;
align-items: center;
margin: 10rpx 0;
}
</style>