|
|
@@ -3,6 +3,12 @@
|
|
|
<image class="logo-img" src="../../static/img/img01.png"></image>
|
|
|
<view class="list-box">
|
|
|
<scroll-view scroll-x class="list-title">
|
|
|
+ <view class="title"
|
|
|
+ :class="{ blue: tabCurrent == '全部' }"
|
|
|
+ @click="tabClick('全部', 1)"
|
|
|
+ >
|
|
|
+ 全部
|
|
|
+ </view>
|
|
|
<view
|
|
|
class="title"
|
|
|
v-for="(ls, index) in moneyTypeList"
|
|
|
@@ -14,13 +20,14 @@
|
|
|
{{ ls.name }}
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
- <view class="flex_item list-name">
|
|
|
+ <view class="flex_item list-name" v-if="tabCurrent!== '全部'">
|
|
|
<view class="name" :class="{ black: tabType == 1 }" @click="tabTypeClick(1)">算力包</view>
|
|
|
<view class="name" :class="{ black: tabType == 2 }" @click="tabTypeClick(2)">独享矿机</view>
|
|
|
- <!-- <view class='name' :class="{'black':tabType==3}" @click="tabTypeClick(3)">联合挖矿</view> -->
|
|
|
+ <view class='name' :class="{'black':tabType==3}" @click="tabTypeClick(3)">联合挖矿</view>
|
|
|
<!-- <view class='name' :class="{'black':tabCurrent==4}">分类名称</view> -->
|
|
|
</view>
|
|
|
- <view class="list-cell" v-if="list.length > 0" v-for="(ls, index) in list" :key="index">
|
|
|
+ <view class="jg" v-else></view>
|
|
|
+ <view class="list-cell" v-if="list.length > 0" v-for="(ls, index) in list" :key="index" :class="{'mini-list-cell': tabCurrent === '全部'}">
|
|
|
<view class="flex">
|
|
|
<view>
|
|
|
<view class="cell-title flex">
|
|
|
@@ -50,7 +57,7 @@
|
|
|
</view>
|
|
|
<view class="tpl">
|
|
|
<view class="">合约周期</view>
|
|
|
- <view class="">{{ ls.first_step_time + ls.second_step_time + ls.third_step_time }}天</view>
|
|
|
+ <view class="">{{ ls.first_step_time + ls.second_step_time }}天 + {{ls.third_step_time}}天</view>
|
|
|
</view>
|
|
|
<!-- <view class="tpl">
|
|
|
<view class="">上架期</view>
|
|
|
@@ -105,7 +112,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- tabCurrent: 'XCH',
|
|
|
+ tabCurrent: '全部',
|
|
|
tabType: 1,
|
|
|
moneyTypeList: [
|
|
|
{
|
|
|
@@ -153,10 +160,11 @@ export default {
|
|
|
// 所有币种
|
|
|
async moneyType() {
|
|
|
let obj = this;
|
|
|
- console.log(obj.moneyTypeList);
|
|
|
+ // console.log(obj.moneyTypeList);
|
|
|
moneyType({}).then(({ data }) => {
|
|
|
// console.log(data,"+++++++moneyTypeList++++++++++")
|
|
|
obj.moneyTypeList = data;
|
|
|
+ console.log(obj.moneyTypeList,"+++++++moneyTypeList++++++++++")
|
|
|
// console.log(obj.moneyTypeList,'moneyTypeList----------')
|
|
|
// if(obj.moneyTypeList.length > 0){
|
|
|
// obj.tabCurrent = obj.moneyTypeList[0].code
|
|
|
@@ -169,35 +177,89 @@ export default {
|
|
|
uni.showLoading({
|
|
|
title: '加载中...'
|
|
|
});
|
|
|
- mining({
|
|
|
- page: 1,
|
|
|
- limit: 1000,
|
|
|
- type: obj.tabType,
|
|
|
- get_money_type: obj.tabCurrent
|
|
|
- }).then(({ data }) => {
|
|
|
- console.log(data, '1111');
|
|
|
- obj.list = data.data.map(e => {
|
|
|
- e.step = +e.step;
|
|
|
- e._cost_money = +e._cost_money.replace(e.cost_money_type, '') + e.cost_money_type;
|
|
|
- return e;
|
|
|
- });
|
|
|
- console.log(obj.list, 'obj.list++++++++++++');
|
|
|
- let len = obj.list.length;
|
|
|
-
|
|
|
- for (let i = 0; i < len; i++) {
|
|
|
- // obj.list[i].tags = obj.list[i].tags.splice(',')
|
|
|
- for (let j = 0; j < len; j++) {
|
|
|
- if (obj.list[i].step > obj.list[j].step) {
|
|
|
- let z = obj.list[i];
|
|
|
- obj.list[i] = obj.list[j];
|
|
|
- obj.list[j] = z;
|
|
|
+ if(obj.tabCurrent === '全部'){
|
|
|
+ obj.list = []
|
|
|
+ mining({
|
|
|
+ page: 1,
|
|
|
+ limit: 1000
|
|
|
+ }).then( ({data}) => {
|
|
|
+ uni.hideLoading();
|
|
|
+ console.log(data.data,'9999999999999999999999999999999999')
|
|
|
+ obj.list = data.data.map(e => {
|
|
|
+ e.step = +e.step;
|
|
|
+ e._cost_money = +e._cost_money.replace(e.cost_money_type, '') + e.cost_money_type;
|
|
|
+ return e;
|
|
|
+ });
|
|
|
+ console.log(obj.list, 'obj.list++++++++++++');
|
|
|
+ })
|
|
|
+ // for(let i = 0 ; i<obj.moneyTypeList.length;i++){
|
|
|
+ // if(obj.moneyTypeList[i].has_mining !==0){
|
|
|
+ // mining({
|
|
|
+ // page:1,
|
|
|
+ // limit:1000,
|
|
|
+ // type: obj.tabType,
|
|
|
+ // get_money_type: obj.moneyTypeList[i].code
|
|
|
+ // }).then(({ data }) => {
|
|
|
+ // console.log(data)
|
|
|
+ // let arr = data.data.map(e => {
|
|
|
+ // e.step = +e.step;
|
|
|
+ // e._cost_money = +e._cost_money.replace(e.cost_money_type, '') + e.cost_money_type;
|
|
|
+ // return e;
|
|
|
+ // });
|
|
|
+ // obj.list = obj.list.concat(arr)
|
|
|
+ // // console.log( obj.list.length)
|
|
|
+ // let len = obj.list.length
|
|
|
+ // for (let i = 0; i < len; i++) {
|
|
|
+ // // obj.list[i].tags = obj.list[i].tags.splice(',')
|
|
|
+ // for (let j = 0; j < len; j++) {
|
|
|
+ // if (obj.list[i].step > obj.list[j].step) {
|
|
|
+ // let z = obj.list[i];
|
|
|
+ // obj.list[i] = obj.list[j];
|
|
|
+ // obj.list[j] = z;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // // console.log(obj.list, 'new obj.list-------------')
|
|
|
+ // uni.hideLoading();
|
|
|
+
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
+ // let len = obj.list.length;
|
|
|
+
|
|
|
+ }else {
|
|
|
+ mining({
|
|
|
+ page: 1,
|
|
|
+ limit: 1000,
|
|
|
+ type: obj.tabType,
|
|
|
+ get_money_type: obj.tabCurrent
|
|
|
+ }).then(({ data }) => {
|
|
|
+ console.log(data, '1111');
|
|
|
+ obj.list = data.data.map(e => {
|
|
|
+ e.step = +e.step;
|
|
|
+ e._cost_money = +e._cost_money.replace(e.cost_money_type, '') + e.cost_money_type;
|
|
|
+ return e;
|
|
|
+ });
|
|
|
+ console.log(obj.list, 'obj.list++++++++++++');
|
|
|
+ let len = obj.list.length;
|
|
|
+
|
|
|
+ for (let i = 0; i < len; i++) {
|
|
|
+ // obj.list[i].tags = obj.list[i].tags.splice(',')
|
|
|
+ for (let j = 0; j < len; j++) {
|
|
|
+ if (obj.list[i].step > obj.list[j].step) {
|
|
|
+ let z = obj.list[i];
|
|
|
+ obj.list[i] = obj.list[j];
|
|
|
+ obj.list[j] = z;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- console.log(obj.list, 'new obj.list-------------');
|
|
|
- uni.hideLoading();
|
|
|
- });
|
|
|
+
|
|
|
+ console.log(obj.list, 'new obj.list-------------');
|
|
|
+ uni.hideLoading();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
ToBuy(ls) {
|
|
|
// let obj = this;
|
|
|
@@ -234,6 +296,9 @@ export default {
|
|
|
this.$refs.popup.close();
|
|
|
},
|
|
|
tabClick(index, has_mining) {
|
|
|
+ if(index === '全部') {
|
|
|
+ console.log('ddddddddd')
|
|
|
+ }
|
|
|
if (has_mining == 0) {
|
|
|
this.$api.msg('敬请期待!');
|
|
|
} else {
|
|
|
@@ -288,7 +353,7 @@ page {
|
|
|
padding: 24rpx 50rpx;
|
|
|
.name {
|
|
|
font-size: 28rpx;
|
|
|
- margin-right: 20%;
|
|
|
+ margin-right: 15%;
|
|
|
font-weight: 500;
|
|
|
color: #666666;
|
|
|
}
|
|
|
@@ -297,6 +362,7 @@ page {
|
|
|
border-bottom: 2rpx solid #5771df;
|
|
|
padding-bottom: 10rpx;
|
|
|
font-size: 30rpx;
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -309,6 +375,9 @@ page {
|
|
|
.all-list {
|
|
|
width: 180rpx;
|
|
|
height: 180rpx;
|
|
|
+ position: absolute;
|
|
|
+ top: 10rpx;
|
|
|
+ right: 10rpx;
|
|
|
}
|
|
|
.list-cell {
|
|
|
box-sizing: border-box;
|
|
|
@@ -318,6 +387,7 @@ page {
|
|
|
border-radius: 30rpx 30rpx;
|
|
|
background-color: #f7f6fb;
|
|
|
margin-bottom: 20rpx;
|
|
|
+ position: relative;
|
|
|
.cell-title {
|
|
|
padding: 29rpx 38rpx 29rpx 15rpx;
|
|
|
font-size: 38rpx;
|
|
|
@@ -339,6 +409,7 @@ page {
|
|
|
background-color: #e3f6fa;
|
|
|
border-radius: 24rpx 24rpx;
|
|
|
margin-right: 20rpx;
|
|
|
+ margin-top: 15rpx;
|
|
|
}
|
|
|
.cell-tag {
|
|
|
display: inline-block;
|
|
|
@@ -443,4 +514,34 @@ page {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.jg {
|
|
|
+ height: 20rpx;
|
|
|
+}
|
|
|
+.mini-list-cell {
|
|
|
+ padding: 0rpx 40rpx 10rpx;
|
|
|
+ .cell-tpl {
|
|
|
+ padding: 10rpx 0 8rpx;
|
|
|
+ }
|
|
|
+ .cell-info {
|
|
|
+ .tip {
|
|
|
+ font-size: 34rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #5771df;
|
|
|
+ opacity: 0;
|
|
|
+ line-height: 40px;
|
|
|
+ }
|
|
|
+ .zhiya-btn {
|
|
|
+ background-color: #5771df;
|
|
|
+ width: 150rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 60rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ border-radius: 50rpx;
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ .grey {
|
|
|
+ background-color: #999999;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|