123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <template>
- <view class="share-order">
- <view
- v-for="(item, index) in order"
- :key="index"
- class="order-box"
- >
- <view class="order-num">
- 订单号: {{ item.order_id }}
- </view>
- <view class="child-info main-between cross-center">
- <view class="base main-left cross-center">
- <view class="head-img">
- <image :src="item.order.user.avatar" />
- </view>
- <view class="nickname main-left cross-center">
- <view class="nickname">
- <u-text :text="item.order.user.nickname" :lines="1" color="#ffffff" size="28rpx" />
- </view>
- <view class="level">1级</view>
- </view>
- </view>
- <view class="income-info main-left cross-center">
- <text>已得佣金:{{ item.income }}元</text>
- <u-icon :name="item.showDetail?'arrow-up':'arrow-down'" top="1" @click="handleShow(item)" />
- </view>
- </view>
- <view v-show="item.showDetail" class="detail main-between cross-center">
- <view class="goods-info main-left cross-center">
- <view class="cover-img">
- <image />
- </view>
- <view class="combo dir-top-wrap main-center">
- <text class="type">{{ item.type_name }}</text>
- <text>{{ item.order.combo.name }}</text>
- </view>
- </view>
- <view class="income dir-top-wrap">
- <view class="num">x1</view>
- <view class="price">¥{{ item.order.combo.price }}</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: 'ShareOrder',
- components: {},
- data() {
- return {
- limit: 10,
- page: 1,
- isMore: true,
- order: []
- }
- },
- computed: {},
- methods: {
- handleShow(item) {
- item.showDetail = !item.showDetail
- },
- getOrder() {
- this.$loading()
- this.$api.share.order.lists({ limit: this.limit, page: this.page }).then(res => {
- this.$hideLoading()
- if (res.data.length) {
- res.data.forEach(obj => {
- obj.showDetail = false
- })
- this.order = this.order.concat(res.data)
- } else {
- this.isMore = false
- }
- })
- }
- },
- onLoad() {
- this.getOrder()
- },
- onReachBottom(e) {
- if (!this.isMore) return
- this.page += 1
- this.getOrder()
- }
- }
- </script>
- <style lang="scss" scoped>
- .share-order {
- padding: 40rpx 30rpx;
- font-size: 28rpx;
- .order-box{
- background: $bg-op-color;
- color: #ffffff;
- padding: 30rpx 0;
- border-radius: 20rpx;
- margin-bottom: 30px;
- .order-num{
- padding: 0 30rpx 30rpx;
- border-bottom: 1rpx $border-op-color solid;
- }
- .child-info{
- padding: 30rpx 30rpx;
- .base{
- .head-img{
- width: 70rpx;
- height: 70rpx;
- border-radius: 50%;
- overflow: hidden;
- background: #ccc;
- image{
- width: 100%;
- height: 100%;
- }
- }
- .nickname{
- margin-left: 10rpx;
- flex: 1;
- .level{
- color: #6eebe8;
- }
- }
- }
- .income-info{
- text{
- margin-right: 18rpx;
- }
- }
- }
- .detail{
- padding: 30rpx 30rpx 0;
- border-top: 1rpx $border-op-color solid;
- .goods-info{
- .cover-img{
- width: 80rpx;
- height: 80rpx;
- border-radius: 8rpx;
- overflow: hidden;
- background: #ccc;
- image{
- width: 100%;
- height: 100%;
- }
- }
- .combo{
- margin-left: 20rpx;
- .type{
- margin-bottom: 6rpx;
- }
- }
- }
- .income{
- color: #6eebe8;
- text-align: right;
- .num{
- font-size: 24rpx;
- margin-bottom: 6rpx;
- }
- }
- }
- }
- }
- </style>
|