|
@@ -1,11 +1,11 @@
|
|
<template>
|
|
<template>
|
|
<view class="all">
|
|
<view class="all">
|
|
<view class="fixedBox">
|
|
<view class="fixedBox">
|
|
- <view class="navList flex">
|
|
|
|
|
|
+ <!-- <view class="navList flex">
|
|
<view v-for="(item, index) in navItem" :key="index" class="navItem"
|
|
<view v-for="(item, index) in navItem" :key="index" class="navItem"
|
|
:class="{ activeItem: tabIndex === index,tip:index == 0 }" @click="tabClick(index,1)">{{ item }}
|
|
:class="{ activeItem: tabIndex === index,tip:index == 0 }" @click="tabClick(index,1)">{{ item }}
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
|
|
+ </view> -->
|
|
<view class="navList flex navList2">
|
|
<view class="navList flex navList2">
|
|
<view v-for="(item, index) in navList[tabIndex]" :key="index" class="navItem"
|
|
<view v-for="(item, index) in navList[tabIndex]" :key="index" class="navItem"
|
|
:class="{ activeItem: tabCurr === index}" @click="tabClick(index,2)">{{ item.name }}
|
|
:class="{ activeItem: tabCurr === index}" @click="tabClick(index,2)">{{ item.name }}
|
|
@@ -37,31 +37,20 @@
|
|
<view class="" style="text-align: right;">
|
|
<view class="" style="text-align: right;">
|
|
<image src="/static/image/img21.png" style="width: 40rpx;height: 31rpx;margin-bottom: 25rpx;" mode="widthFix">
|
|
<image src="/static/image/img21.png" style="width: 40rpx;height: 31rpx;margin-bottom: 25rpx;" mode="widthFix">
|
|
</image>
|
|
</image>
|
|
- <view class="tipBtn" v-if="status==5 && item.voucher" @click.stop="comfirOrder(item.id,item.voucher)">查看凭证</view>
|
|
|
|
|
|
+ <view class="tipBtn" v-if="item.voucher">查看凭证</view>
|
|
<view class="tipBtn" v-if="status==3">上传凭证</view>
|
|
<view class="tipBtn" v-if="status==3">上传凭证</view>
|
|
- <view class="tipBtn" v-if="status==1" @click.stop="cancel(item.id)">取消</view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<uni-load-more :status="loadingType"></uni-load-more>
|
|
<uni-load-more :status="loadingType"></uni-load-more>
|
|
- <!-- 查看凭证弹窗 -->
|
|
|
|
- <u-popup :show="popShow" @close="popShow = false" :round="10" @open="popShow = true" mode="center">
|
|
|
|
- <view class="popBox">
|
|
|
|
- <image :src="popShowImg" mode="aspectFit"></image>
|
|
|
|
- <view class="popBtn" v-if="tabIndex == 0" @click="comirOrder">确认订单</view>
|
|
|
|
- <view class="popBtn" v-if="tabIndex == 1" @click="popShow = false">关闭查看</view>
|
|
|
|
- </view>
|
|
|
|
- </u-popup>
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
sellMy,
|
|
sellMy,
|
|
- sellBuyMy,
|
|
|
|
- cancelLog,
|
|
|
|
- comfirLog
|
|
|
|
|
|
+ sellBuyMy
|
|
} from '@/api/game.js';
|
|
} from '@/api/game.js';
|
|
import {
|
|
import {
|
|
mapState
|
|
mapState
|
|
@@ -81,22 +70,22 @@
|
|
tabIndex: 0, //当前选中的一级分类
|
|
tabIndex: 0, //当前选中的一级分类
|
|
navItem: ['卖币订单', '买币订单'],
|
|
navItem: ['卖币订单', '买币订单'],
|
|
tabCurr: 0, //当前选中的二级分类
|
|
tabCurr: 0, //当前选中的二级分类
|
|
- status: 1, //当前选中状态
|
|
|
|
|
|
+ status: 0, //当前选中状态
|
|
navList: [
|
|
navList: [
|
|
[ {
|
|
[ {
|
|
name: '挂出',
|
|
name: '挂出',
|
|
status: 1
|
|
status: 1
|
|
- },{
|
|
|
|
- name: '待确认',
|
|
|
|
- status: 5
|
|
|
|
- },{
|
|
|
|
|
|
+ }, {
|
|
|
|
+ name: '待上传',
|
|
|
|
+ status: 3
|
|
|
|
+ }, {
|
|
name: '完成',
|
|
name: '完成',
|
|
status: 2
|
|
status: 2
|
|
},{
|
|
},{
|
|
name: '结束',
|
|
name: '结束',
|
|
status: 0
|
|
status: 0
|
|
- }],
|
|
|
|
- [{
|
|
|
|
|
|
+ },],
|
|
|
|
+ [ {
|
|
name: '待上传',
|
|
name: '待上传',
|
|
status: 3
|
|
status: 3
|
|
}, {
|
|
}, {
|
|
@@ -110,16 +99,10 @@
|
|
page: 1,
|
|
page: 1,
|
|
limit: 10,
|
|
limit: 10,
|
|
loadingType: "more",
|
|
loadingType: "more",
|
|
- list: [],
|
|
|
|
- popShow:false,
|
|
|
|
- popShowImg:'',
|
|
|
|
- popId:''
|
|
|
|
|
|
+ list: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onShow() {
|
|
|
|
- this.page = 1;
|
|
|
|
- this.loadingType = "more";
|
|
|
|
- this.list = []
|
|
|
|
|
|
+ onLoad() {
|
|
this.loadData()
|
|
this.loadData()
|
|
},
|
|
},
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
@@ -128,7 +111,7 @@
|
|
methods: {
|
|
methods: {
|
|
navItemTo(item){
|
|
navItemTo(item){
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:`/pages/index/orderDetail?id=${item.id}&tab=${this.tabIndex}`
|
|
|
|
|
|
+ url:`/pages/index/orderDetail?id=${item.id}`
|
|
})
|
|
})
|
|
},
|
|
},
|
|
loadData() {
|
|
loadData() {
|
|
@@ -138,22 +121,14 @@
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
obj.loadingType = "loading";
|
|
obj.loadingType = "loading";
|
|
- console.log(obj.status,'obj.status');
|
|
|
|
- console.log(obj.tabIndex,'obj.tabIndex');
|
|
|
|
- console.log(obj.list,'obj.list');
|
|
|
|
|
|
+ console.log(obj.status);
|
|
if (this.tabIndex == 0) {
|
|
if (this.tabIndex == 0) {
|
|
sellMy({
|
|
sellMy({
|
|
page: obj.page,
|
|
page: obj.page,
|
|
limit: obj.limit,
|
|
limit: obj.limit,
|
|
status:obj.status
|
|
status:obj.status
|
|
}, obj.status).then(res => {
|
|
}, obj.status).then(res => {
|
|
- let ar = res.data.list.map((re)=>{
|
|
|
|
- re.num = +re.num;
|
|
|
|
- re.price = +re.price;
|
|
|
|
- re.money = +(re.num*re.price).toFixed(8);
|
|
|
|
- return re
|
|
|
|
- })
|
|
|
|
- obj.dataList(ar)
|
|
|
|
|
|
+ obj.dataList(res.data.list)
|
|
});
|
|
});
|
|
} else if (this.tabIndex == 1) {
|
|
} else if (this.tabIndex == 1) {
|
|
sellBuyMy({
|
|
sellBuyMy({
|
|
@@ -162,6 +137,7 @@
|
|
status:obj.status
|
|
status:obj.status
|
|
}, obj.status).then(res => {
|
|
}, obj.status).then(res => {
|
|
let ar = res.data.list.map((re)=>{
|
|
let ar = res.data.list.map((re)=>{
|
|
|
|
+ console.log(re,'re');
|
|
re.num = +re.num;
|
|
re.num = +re.num;
|
|
re.price = +re.price;
|
|
re.price = +re.price;
|
|
re.money = +(re.num*re.price).toFixed(8);
|
|
re.money = +(re.num*re.price).toFixed(8);
|
|
@@ -171,62 +147,6 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- //取消挂出
|
|
|
|
- cancel(id){
|
|
|
|
- let obj = this;
|
|
|
|
- cancelLog({
|
|
|
|
- id:id
|
|
|
|
- }).then(res => {
|
|
|
|
- if(res.status == 200){
|
|
|
|
- uni.showToast({
|
|
|
|
- title: res.msg,
|
|
|
|
- icon: 'none',
|
|
|
|
- })
|
|
|
|
- setTimeout(function () {
|
|
|
|
- obj.page = 1;
|
|
|
|
- obj.loadingType = "more";
|
|
|
|
- obj.list = []
|
|
|
|
- obj.loadData()
|
|
|
|
- }, 1000);
|
|
|
|
- }else{
|
|
|
|
- uni.showToast({
|
|
|
|
- title: res.msg,
|
|
|
|
- icon: 'none',
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- //确认订单
|
|
|
|
- comirOrder(){
|
|
|
|
- const that = this;
|
|
|
|
- comfirLog({
|
|
|
|
- id:that.id,
|
|
|
|
- }).then(res => {
|
|
|
|
- if(res.status == 200){
|
|
|
|
- uni.showToast({
|
|
|
|
- title: res.msg,
|
|
|
|
- icon: 'none',
|
|
|
|
- })
|
|
|
|
- setTimeout(()=>{
|
|
|
|
- obj.page = 1;
|
|
|
|
- obj.loadingType = "more";
|
|
|
|
- obj.list = []
|
|
|
|
- obj.loadData()
|
|
|
|
- },1000)
|
|
|
|
- }else{
|
|
|
|
- uni.showToast({
|
|
|
|
- title: res.msg,
|
|
|
|
- icon: 'none',
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- //点击查看凭证
|
|
|
|
- comfirOrder(id,img){
|
|
|
|
- this.popShowImg = img
|
|
|
|
- this.popId = id
|
|
|
|
- this.popShow = true
|
|
|
|
- },
|
|
|
|
dataList(ar) {
|
|
dataList(ar) {
|
|
const obj = this;
|
|
const obj = this;
|
|
if (ar.length > 0) {
|
|
if (ar.length > 0) {
|
|
@@ -238,6 +158,7 @@
|
|
} else {
|
|
} else {
|
|
obj.loadingType = "nomore";
|
|
obj.loadingType = "nomore";
|
|
}
|
|
}
|
|
|
|
+ console.log(obj.list,"list");
|
|
},
|
|
},
|
|
tabClick(index,type) {
|
|
tabClick(index,type) {
|
|
if (type == 1) {
|
|
if (type == 1) {
|
|
@@ -361,20 +282,4 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .popBox{
|
|
|
|
- max-height: 70vh;
|
|
|
|
- padding: 35rpx 35rpx;
|
|
|
|
- image{
|
|
|
|
- max-height: 60vh;
|
|
|
|
- }
|
|
|
|
- .popBtn{
|
|
|
|
- background: linear-gradient(90deg, #0C5AFA, #1356FF);
|
|
|
|
- border-radius: 7rpx;
|
|
|
|
- padding: 15rpx 35rpx;
|
|
|
|
- width: 60%;
|
|
|
|
- margin: 35rpx auto;
|
|
|
|
- text-align: center;
|
|
|
|
- color: #fff;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
</style>
|
|
</style>
|