新增资产权证转让管理部分页面增加分页
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<view style="position: relative;z-index: 3;">
|
||||
<!-- 搜索... -->
|
||||
<view class="mine-top-contant">
|
||||
<u-navbar :is-back="false" :background="background" title="企业优惠券中心" title-color="#fff"
|
||||
<u-navbar :is-back="true" :background="background" title="企业优惠券中心" title-color="#fff"
|
||||
:border-bottom='false'>
|
||||
</u-navbar>
|
||||
<!--banner-->
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
<view class="title">
|
||||
限时抢购<text>海量商家优惠券</text>
|
||||
</view>
|
||||
<navigator class="more" url="/pages/coupons/couponList">查看更多</navigator>
|
||||
<navigator class="more" open-type="navigate" url="/pages/coupons/couponList">查看更多</navigator>
|
||||
</view>
|
||||
<view class="coupons" v-if="coupons.length > 0">
|
||||
<view class="coupons-item" v-for="(item, index) in coupons" :key="index">
|
||||
@@ -168,6 +168,8 @@
|
||||
</view>
|
||||
<!-- 优选商品 -->
|
||||
<goods-list :list="goods" priceType="CNY" @on-goods="onGoods" />
|
||||
<!-- 分页 -->
|
||||
<uni-load-more :status="pageStatus" :iconSize="16"></uni-load-more>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
@@ -205,14 +207,16 @@
|
||||
coupons : [],
|
||||
position : {},
|
||||
goods : [],
|
||||
pages : {},
|
||||
// 广场部分
|
||||
industryIndex: 0,
|
||||
recommendBus : [],
|
||||
hotBus : [],
|
||||
industryBus : [],
|
||||
busList : [],
|
||||
busPages : {}
|
||||
busPages : {},
|
||||
// 分页
|
||||
pageStatus : '',
|
||||
page : 1
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -267,8 +271,7 @@
|
||||
},
|
||||
// 易货首页
|
||||
getMall(){
|
||||
mall().then(res => {
|
||||
console.log(res.coupons)
|
||||
mall().then(res => {
|
||||
this.classify = res.categories.slice(0, 9)
|
||||
this.banners = res.banners
|
||||
this.coupons = res.coupons
|
||||
@@ -283,9 +286,15 @@
|
||||
},
|
||||
// 商品列表
|
||||
getGoods(){
|
||||
list().then(res => {
|
||||
this.goods = res.data
|
||||
this.pages = res.page
|
||||
list({
|
||||
page: this.goodsPage
|
||||
}).then(res => {
|
||||
if(res.page.current === 1){
|
||||
this.goods = []
|
||||
}
|
||||
this.goods = this.goods.concat(res.data)
|
||||
this.goodsPage = res.page.current
|
||||
this.pageStatus = res.page.has_more ? 'more': 'noMore'
|
||||
})
|
||||
},
|
||||
// 商品详情
|
||||
@@ -324,6 +333,16 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 下拉加载
|
||||
onReachBottom() {
|
||||
if(this.pageStatus == 'more'){
|
||||
this.pageStatus = 'loading'
|
||||
if(this.tabIndex === 0) {
|
||||
this.goodsPage += 1
|
||||
this.getGoods()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
价格
|
||||
<image
|
||||
class="icon"
|
||||
mode="widthFix" :src="require(marketType == 'low' ? '@/static/icons/market_icon_low.png': '@/static/icons/market_icon_high.png')"
|
||||
mode="widthFix" :src="require(marketType == 'asc' ? '@/static/icons/market_icon_low.png': '@/static/icons/market_icon_high.png')"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -23,27 +23,33 @@
|
||||
data() {
|
||||
return {
|
||||
tabIndex : 0,
|
||||
marketType : 'low',
|
||||
marketType : 'asc',
|
||||
goods : []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
list().then(res=>{
|
||||
console.log(res.data)
|
||||
this.goods = res.data
|
||||
this.pages = res.page
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
onTabs(e){
|
||||
let index = e.target.dataset.index
|
||||
if(index == 0 && index == this.tabIndex) return
|
||||
if(index == 1 && index == this.tabIndex) this.marketType = this.marketType == 'low' ? 'high': 'low'
|
||||
if(index == 1 && index == this.tabIndex) this.marketType = this.marketType == 'asc' ? 'desc': 'asc'
|
||||
this.tabIndex = index
|
||||
this.getList()
|
||||
},
|
||||
|
||||
onGoods(e){
|
||||
this.$Router.push({name: 'goodsDetails', params: {id: e.goods_id}})
|
||||
},
|
||||
|
||||
getList(){
|
||||
list({
|
||||
order_by: this.tabIndex == 1 ? this.marketType: ''
|
||||
}).then(res=>{
|
||||
this.goods = res.data
|
||||
this.pages = res.page
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,61 +1,121 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="tabs" v-if="$Route.query.type === 'my'">
|
||||
<view class="item" :class="{ 'show' : tab == 'sell'}" @click="onTasb('sell')">我转让的</view>
|
||||
<view class="item" :class="{ 'show' : tab == 'buys' }" @click="onTasb('buys')">我买到的</view>
|
||||
</view>
|
||||
<block v-if="logs.length > 0">
|
||||
<view class="logs" v-for="(item, index) in logs" :key="index">
|
||||
<view class="logs-item">
|
||||
<label>交易权证</label>
|
||||
{{item.goods.goods_name}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>交易单价</label>
|
||||
¥{{item.price}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>交易数量</label>
|
||||
{{item.qty}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>转让用户</label>
|
||||
{{item.sellUser.nickname}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>购买用户</label>
|
||||
{{item.buyUser.nickname}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>交易时间</label>
|
||||
{{item.created_at}}
|
||||
<view :class="{'paddingTop': $Route.query.type === 'my'}">
|
||||
<view class="logs" v-for="(item, index) in logs" :key="index">
|
||||
<view class="logs-item">
|
||||
<label>交易权证</label>
|
||||
{{item.goods.goods_name}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>交易单价</label>
|
||||
¥{{item.price}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>交易数量</label>
|
||||
{{item.qty}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>转让用户</label>
|
||||
{{item.sellUser.nickname}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>购买用户</label>
|
||||
{{item.buyUser.nickname}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>交易时间</label>
|
||||
{{item.created_at}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="list-null">
|
||||
<image class="icon" src="@/static/icons/listnull-icon.png" mode="widthFix" />
|
||||
<view class="sub-title">暂无数据</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { marketsLogs } from '@/apis/interfaces/market'
|
||||
import { marketsLogs, marketsOrdersLogs } from '@/apis/interfaces/market'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
logs: [],
|
||||
page: {}
|
||||
page: {},
|
||||
tab : 'sell'
|
||||
};
|
||||
},
|
||||
created(){
|
||||
marketsLogs().then(res => {
|
||||
console.log(res.data)
|
||||
this.logs = res.data
|
||||
this.page = res.page
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
onTasb(e){
|
||||
this.tab = e
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList(){
|
||||
if(this.$Route.query.type === 'my'){
|
||||
marketsOrdersLogs({}, this.tab).then(res =>{
|
||||
console.log(res)
|
||||
this.logs = res.data
|
||||
this.page = res.page
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
marketsLogs().then(res => {
|
||||
this.logs = res.data
|
||||
this.page = res.page
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tabs{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 99;
|
||||
background-color: white;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
.item{
|
||||
border-bottom: solid 2rpx white;
|
||||
box-sizing: border-box;
|
||||
&.show{
|
||||
border-color: $text-price;
|
||||
color: $text-price;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.paddingTop{
|
||||
padding-top: 90rpx;
|
||||
}
|
||||
|
||||
.logs{
|
||||
background: white;
|
||||
margin-top: $margin;
|
||||
@@ -78,4 +138,29 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 空提示
|
||||
.list-null{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
background: white;
|
||||
padding-bottom: 20vh;
|
||||
@extend .vertical;
|
||||
.sub-title{
|
||||
color: $text-gray;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
.icon{
|
||||
width: 288rpx;
|
||||
}
|
||||
}
|
||||
.employees-null{
|
||||
text-align: center;
|
||||
line-height: 10vh;
|
||||
padding-bottom: $padding;
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
}
|
||||
</style>
|
||||
|
||||
169
pages/market/management.vue
Normal file
169
pages/market/management.vue
Normal file
@@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<view class="NumberWeight">
|
||||
<!-- 有订单列表 -->
|
||||
<view v-if="lists.length > 0">
|
||||
<block v-for="(item, index) in lists" :key="index">
|
||||
<view class="order-item">
|
||||
<view class="order-info">
|
||||
<image class="order-cover" :src="item.goods.cover" mode="aspectFill"></image>
|
||||
<view class="title">数字权证<text>{{item.surplus}}/{{item.stock}}</text></view>
|
||||
<view class="text">锚定商品:{{item.goods.goods_name}}</view>
|
||||
<view class="text">交易哈希:{{item.hash}}</view>
|
||||
<view class="text">发布时间:{{item.created_at}}</view>
|
||||
</view>
|
||||
<view class="order-tool">
|
||||
<view class="price">{{item.price}}/个</view>
|
||||
<view class="order-btn" v-if="item.status.value === 1" @click="removeGoods(item.market_id, index)">取消转让</view>
|
||||
<view class="order-status" v-if="item.status.value === 2">{{item.status.text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 没有订单列表 -->
|
||||
<no-list v-if="lists.length === 0" name="no-order" txt="暂无数据~" />
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { marketsMag, marketsCancel } from '@/apis/interfaces/market';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lists: [],
|
||||
page: 1,
|
||||
total: 0
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getList();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.total > this.lists.length) {
|
||||
this.page = this.page + 1;
|
||||
this.getList();
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '吼吼吼~我是有底的~',
|
||||
type: 'error',
|
||||
icon: false,
|
||||
duration: 3000
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
let data = {
|
||||
perPage: 10,
|
||||
page: this.page
|
||||
};
|
||||
marketsMag(data)
|
||||
.then(res => {
|
||||
console.log(res.markets.data);
|
||||
this.lists = this.lists.concat(res.markets.data);
|
||||
this.total = res.markets.page.total;
|
||||
})
|
||||
.catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',
|
||||
icon: false,
|
||||
duration: 3000
|
||||
});
|
||||
});
|
||||
},
|
||||
// 取消转让
|
||||
removeGoods(id, index) {
|
||||
marketsCancel(id).then(res => {
|
||||
uni.showToast({
|
||||
icon : 'none',
|
||||
title: res
|
||||
})
|
||||
let statusObj = this.lists[index]
|
||||
statusObj.status = {
|
||||
value: 2,
|
||||
text : '已取消',
|
||||
}
|
||||
this.$set(this.lists, index, statusObj)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
icon : 'none',
|
||||
title: err.message
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onNavigationBarButtonTap(){
|
||||
this.$Router.push({name: "marketLogs", params: {type: 'my'}})
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.NumberWeight {
|
||||
box-sizing: border-box;
|
||||
// 订单列表
|
||||
.order-item {
|
||||
background-color: white;
|
||||
margin: $margin;
|
||||
border-radius: $radius;
|
||||
padding: $padding;
|
||||
.order-info{
|
||||
position: relative;
|
||||
padding-left: 188rpx;
|
||||
min-height: 168rpx;
|
||||
.order-cover{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 168rpx;
|
||||
width: 168rpx;
|
||||
}
|
||||
.title{
|
||||
font-weight: bold;
|
||||
font-size: $title-size-lg;
|
||||
color: $text-color;
|
||||
line-height: 48rpx;
|
||||
height: 48rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
text{
|
||||
font-size: 80%;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
.text{
|
||||
line-height: 40rpx;
|
||||
height: 40rpx;
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
@extend .nowrap;
|
||||
}
|
||||
}
|
||||
.order-tool{
|
||||
margin-top: $margin - 10;
|
||||
padding-top: $padding - 10;
|
||||
border-top: solid 1rpx $border-color;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.price{
|
||||
color: $text-price;
|
||||
font-weight: bold;
|
||||
font-size: $title-size-m;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.order-btn{
|
||||
background: $text-price;
|
||||
color: white;
|
||||
padding: 0 $padding;
|
||||
line-height: 50rpx;
|
||||
border-radius: 25rpx;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
.order-status{
|
||||
color: $text-gray-m;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -63,7 +63,7 @@
|
||||
<view class="item-num">{{count.warrnats}}</view>
|
||||
<view class="item-title">权证持有</view>
|
||||
</view>
|
||||
<view class="item" @click="showToast">
|
||||
<view class="item" @click="$Router.push({name: 'marketManag'})">
|
||||
<view class="item-num">{{count.warrnat_transfer}}</view>
|
||||
<view class="item-title">权证转让</view>
|
||||
</view>
|
||||
|
||||
@@ -8,14 +8,19 @@
|
||||
</view>
|
||||
<!-- 统计信息 -->
|
||||
<view class="statistics">
|
||||
<picker mode="date" :fields="tabsIndex" :value="dateValue" :end="endDate" @change="pickerDate">
|
||||
<view class="statistics-date">
|
||||
{{dateValue}}<uni-icons class="arrowdown" type="arrowdown" color="#555"></uni-icons>
|
||||
<view class="statistics-flex">
|
||||
<picker mode="date" :fields="tabsIndex" :value="dateValue" :end="endDate" @change="pickerDate">
|
||||
<view class="statistics-date">
|
||||
{{dateValue}}<uni-icons class="arrowdown" type="arrowdown" color="#555"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
<view class="statistics-lay" :class="{ 'show' : sort != '' || payType != '' || channel != ''}" @click="onScreening">
|
||||
筛选 <uni-icons class="arrowdown" type="settings" color="gray"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="statistics-text">
|
||||
<text>成交客户量 {{visitor.day}} 人</text>
|
||||
<text>累计访客量 {{visitor.all}} 人</text>
|
||||
<text>成交产品数量 {{visitor.goods_count}} 人</text>
|
||||
<text>成交产品金额 {{visitor.total}} 元</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 数据列表 -->
|
||||
@@ -24,12 +29,18 @@
|
||||
<view class="item" v-for="(item, index) in orders" :key="index">
|
||||
<image class="cover" :src="item.user.avatar" mode="aspectFill"></image>
|
||||
<view class="title nowrap">
|
||||
{{item.user.username}}
|
||||
<view class="type">{{item.state}}</view>
|
||||
{{item.user.nickname}}
|
||||
<view class="type">{{item.amount}}</view>
|
||||
</view>
|
||||
<view class="sub-title nowrap">订单号码: {{item.order_no}}</view>
|
||||
<view class="sub-title nowrap">订单时间: {{item.created_at}}</view>
|
||||
<view class="sub-tabs">
|
||||
<text>{{item.driver}}</text>
|
||||
<text>{{item.channel}}</text>
|
||||
</view>
|
||||
<view class="sub-title nowrap">订单号: {{item.order_no}}</view>
|
||||
<view class="sub-title nowrap">{{item.created_at}}</view>
|
||||
</view>
|
||||
<!-- 分页 -->
|
||||
<uni-load-more :status="pageStatus" :iconSize="16"></uni-load-more>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="list-null">
|
||||
@@ -38,24 +49,57 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 列表筛选 -->
|
||||
<uni-popup ref="settingsPopup" background-color="#FFFFFF" @maskClick="onReset">
|
||||
<view class="popup-content">
|
||||
<view class="title">排序方式</view>
|
||||
<view class="popup-choose-flex">
|
||||
<view class="item" :class="{'show' : sort == 'money_asc'}" @click="sort = 'money_asc'">金额从低到高</view>
|
||||
<view class="item" :class="{'show' : sort == 'money_desc'}" @click="sort = 'money_desc'">金额从高到低</view>
|
||||
<view class="item" :class="{'show' : sort == 'sold_asc'}" @click="sort = 'sold_asc'">销量从低到高</view>
|
||||
<view class="item" :class="{'show' : sort == 'sold_desc'}" @click="sort = 'sold_desc'">销量从高到低</view>
|
||||
</view>
|
||||
<view class="title">支付方式</view>
|
||||
<view class="popup-choose-flex">
|
||||
<view class="item" :class="{'show' : payType == 'eb'}" @click="payType = 'eb'">易币交易</view>
|
||||
<view class="item" :class="{'show' : payType == 'money'}" @click="payType = 'money'">现金交易</view>
|
||||
</view>
|
||||
<view class="title">成交渠道</view>
|
||||
<view class="popup-choose-flex">
|
||||
<view class="item" :class="{'show' : channel == 'app'}" @click="channel = 'app'">APP</view>
|
||||
<view class="item" :class="{'show' : channel == 'mini'}" @click="channel = 'mini'">自媒体</view>
|
||||
</view>
|
||||
<view class="popup-btns">
|
||||
<view class="item" @click="onReset">重置</view>
|
||||
<view class="item" @click="onSettings">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ios-bottom"></view>
|
||||
</uni-popup>
|
||||
<!-- :status="more" -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import getDate from '@/public/date'
|
||||
import { customer } from '@/apis/interfaces/store'
|
||||
import { orderUsers } from '@/apis/interfaces/store'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabsIndex: 'day',
|
||||
dateValue: '',
|
||||
endDate : '',
|
||||
visitor : {
|
||||
tabsIndex : 'day',
|
||||
dateValue : '',
|
||||
endDate : '',
|
||||
visitor : {
|
||||
day: 0,
|
||||
all: 0
|
||||
},
|
||||
orders : [],
|
||||
pages : {}
|
||||
orders : [],
|
||||
sort : '',
|
||||
payType : '',
|
||||
channel : '',
|
||||
// 分页
|
||||
pageStatus : '',
|
||||
page : 1
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -68,28 +112,49 @@
|
||||
methods:{
|
||||
// tabs筛选
|
||||
onTbas(type){
|
||||
console.log(type)
|
||||
getDate(type).then(res => {
|
||||
this.tabsIndex = type
|
||||
this.dateValue = res
|
||||
this.page = 1
|
||||
this.getLists()
|
||||
})
|
||||
},
|
||||
onReset(){
|
||||
this.sort = ''
|
||||
this.payType = ''
|
||||
this.channel = ''
|
||||
},
|
||||
onSettings(){
|
||||
this.getLists()
|
||||
this.$refs.settingsPopup.close()
|
||||
},
|
||||
// 日期筛选
|
||||
pickerDate(e){
|
||||
let dateValue = e.detail.value
|
||||
this.dateValue = dateValue
|
||||
this.getLists()
|
||||
},
|
||||
// 列表筛选
|
||||
onScreening(){
|
||||
this.$refs.settingsPopup.open('bottom')
|
||||
},
|
||||
// 获取列表
|
||||
getLists(){
|
||||
customer({
|
||||
type: this.tabsIndex,
|
||||
date: this.dateValue
|
||||
orderUsers({
|
||||
type : this.tabsIndex,
|
||||
date : this.dateValue,
|
||||
sort : this.sort,
|
||||
pay_type : this.payType,
|
||||
channel : this.channel,
|
||||
page : this.page
|
||||
}).then(res => {
|
||||
this.visitor = res.visitor
|
||||
this.orders = res.orders.data
|
||||
this.pages = res.orders.page
|
||||
if(res.orders.page.current === 1){
|
||||
this.orders = []
|
||||
}
|
||||
this.visitor = res.visitor
|
||||
this.orders = this.orders.concat(res.orders.data)
|
||||
this.page = res.orders.page.current
|
||||
this.pageStatus = res.orders.page.has_more ? 'more': 'noMore'
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
@@ -97,11 +162,68 @@
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if(this.pageStatus == 'more'){
|
||||
this.pageStatus = 'loading'
|
||||
this.page += 1
|
||||
this.getLists()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// 筛选层
|
||||
.popup-content{
|
||||
padding: $padding * 2;
|
||||
.title{
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
color: $text-color;
|
||||
margin-top: $margin;
|
||||
}
|
||||
.popup-choose-flex{
|
||||
padding: $padding /2 0;
|
||||
margin: 0 -($margin - 20rpx);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.item{
|
||||
width: calc(33.33% - #{$margin - 10});
|
||||
font-size: $title-size-sm;
|
||||
text-align: center;
|
||||
background: $border-color-lg;
|
||||
line-height: 68rpx;
|
||||
margin: $margin - 20;
|
||||
color: $text-gray;
|
||||
border:solid 1rpx $border-color-lg;
|
||||
box-sizing: border-box;
|
||||
&.show{
|
||||
border:solid 1rpx $text-price;
|
||||
color: $text-price;
|
||||
}
|
||||
}
|
||||
}
|
||||
.popup-btns{
|
||||
padding-top: $padding*2;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 0 -$margin/2;
|
||||
.item{
|
||||
margin: $margin/2;
|
||||
color: $text-price;
|
||||
background: rgba($color: $text-price, $alpha: .1);
|
||||
width: calc(50% - #{$margin});
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
&:last-child{
|
||||
background-color: $text-price;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 空提示
|
||||
.list-null{
|
||||
width: 100vw;
|
||||
@@ -145,14 +267,30 @@
|
||||
background-color: white;
|
||||
border-bottom: solid 1rpx $border-color;
|
||||
padding: $padding;
|
||||
.statistics-date{
|
||||
font-size: $title-size + 4;
|
||||
font-weight: bold;
|
||||
line-height: 60rpx;
|
||||
.arrowdown{
|
||||
margin-left: $margin/2;
|
||||
.statistics-flex{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.statistics-date{
|
||||
font-size: $title-size + 4;
|
||||
font-weight: bold;
|
||||
line-height: 60rpx;
|
||||
.arrowdown{
|
||||
margin-left: $margin/2;
|
||||
}
|
||||
}
|
||||
.statistics-lay{
|
||||
font-size: $title-size-sm;;
|
||||
color: gray;
|
||||
line-height: 50rpx;
|
||||
&.show{
|
||||
color: $text-price;
|
||||
}
|
||||
.arrowdown{
|
||||
margin-left: $margin/2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.statistics-text{
|
||||
font-size: $title-size-sm;
|
||||
color: gray;
|
||||
@@ -212,6 +350,16 @@
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
}
|
||||
.sub-tabs{
|
||||
padding-top: $padding/2;
|
||||
font-size: $title-size-sm;
|
||||
text{
|
||||
margin-right: $margin - 10;
|
||||
background: $border-color-lg;
|
||||
color: $text-gray;
|
||||
padding: 0 ($padding/2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user