优化代码
This commit is contained in:
parent
22e73abe34
commit
b03827da53
@ -181,7 +181,7 @@
|
|||||||
title: '購買1G以上算力才可交易',
|
title: '購買1G以上算力才可交易',
|
||||||
icon:"none"
|
icon:"none"
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let cobj = this.checkTypeAndValue(this.detail.investCoin,this.value)
|
let cobj = this.checkTypeAndValue(this.detail.investCoin,this.value)
|
||||||
@ -190,7 +190,7 @@
|
|||||||
title: cobj.message,
|
title: cobj.message,
|
||||||
icon:"none"
|
icon:"none"
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@ -202,13 +202,16 @@
|
|||||||
type: this.detail.optionType,
|
type: this.detail.optionType,
|
||||||
name: this.userInfo.email,
|
name: this.userInfo.email,
|
||||||
money: this.value,
|
money: this.value,
|
||||||
money_wallet: this.userInfo.wallet.address
|
money_wallet: this.userInfo.wallet.address,
|
||||||
|
createTimes: this.$moment().valueOf()
|
||||||
}
|
}
|
||||||
_pushBuyInfo({
|
_pushBuyInfo({
|
||||||
'buyinfo': data,
|
'buyinfo': data,
|
||||||
money: this.value,
|
...this.detail,
|
||||||
...this.detail
|
money: this.value,
|
||||||
}).then((res) => {
|
createTimes:data.createTimes,
|
||||||
|
}).then((res) => {
|
||||||
|
uni.hideLoading()
|
||||||
let toast = {
|
let toast = {
|
||||||
type: "success",
|
type: "success",
|
||||||
position: 'bottom',
|
position: 'bottom',
|
||||||
@ -223,8 +226,6 @@
|
|||||||
...toast,
|
...toast,
|
||||||
complete: () => {
|
complete: () => {
|
||||||
uni.$emit('updateView', {})
|
uni.$emit('updateView', {})
|
||||||
uni.hideLoading()
|
|
||||||
this.loading = false
|
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
coins: ['USDT','BNB', 'ETH', 'BTC'],
|
coins: ['USDT','BNB', 'ETH', 'BTC'],
|
||||||
scrollHeight: 0,
|
scrollHeight: 0,
|
||||||
search: {
|
search: {
|
||||||
size: 10,
|
page: 1,
|
||||||
listrow: 1,
|
listrow: 10,
|
||||||
totalPage: 0,
|
totalPage: 0,
|
||||||
},
|
},
|
||||||
optionsType: ['CALL', 'PUT'],
|
optionsType: ['CALL', 'PUT'],
|
||||||
@ -97,6 +97,7 @@
|
|||||||
})
|
})
|
||||||
this.loading = true
|
this.loading = true
|
||||||
let search = {
|
let search = {
|
||||||
|
'type':this.coins[this.coinIndex],
|
||||||
...this.search
|
...this.search
|
||||||
}
|
}
|
||||||
delete search.totalPage
|
delete search.totalPage
|
||||||
@ -113,7 +114,7 @@
|
|||||||
this.incomes = this.incomes.concat(res.data.data)
|
this.incomes = this.incomes.concat(res.data.data)
|
||||||
}
|
}
|
||||||
this.list = this.incomes.map(item => {
|
this.list = this.incomes.map(item => {
|
||||||
return item.info
|
return {...item.info,'money':item.money}
|
||||||
})
|
})
|
||||||
this.search.totalPage = Math.ceil(res.data.total / this.search.page)
|
this.search.totalPage = Math.ceil(res.data.total / this.search.page)
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
@ -340,7 +340,7 @@ export function _getaccountorder(data){
|
|||||||
|
|
||||||
export function _myIncome(data){
|
export function _myIncome(data){
|
||||||
return jyRequest.get({
|
return jyRequest.get({
|
||||||
url:`/api/quantify/getlist` // 获取收益列表
|
url:`/api/quantify/getlist?${data}` // 获取收益列表
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user