From b03827da53a1e73730fa3380cc157b2523638b75 Mon Sep 17 00:00:00 2001 From: zhongshilong Date: Wed, 30 Apr 2025 10:20:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/smarttrading/buy.vue | 17 +++++++++-------- pages/smarttrading/incomes.vue | 7 ++++--- request/api.js | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/pages/smarttrading/buy.vue b/pages/smarttrading/buy.vue index 0ca34b5..a52c844 100644 --- a/pages/smarttrading/buy.vue +++ b/pages/smarttrading/buy.vue @@ -181,7 +181,7 @@ title: '購買1G以上算力才可交易', icon:"none" }) - this.loading = false + this.loading = false return } let cobj = this.checkTypeAndValue(this.detail.investCoin,this.value) @@ -190,7 +190,7 @@ title: cobj.message, icon:"none" }) - this.loading = false + this.loading = false return } uni.showLoading({ @@ -202,13 +202,16 @@ type: this.detail.optionType, name: this.userInfo.email, money: this.value, - money_wallet: this.userInfo.wallet.address + money_wallet: this.userInfo.wallet.address, + createTimes: this.$moment().valueOf() } _pushBuyInfo({ 'buyinfo': data, - money: this.value, - ...this.detail - }).then((res) => { + ...this.detail, + money: this.value, + createTimes:data.createTimes, + }).then((res) => { + uni.hideLoading() let toast = { type: "success", position: 'bottom', @@ -223,8 +226,6 @@ ...toast, complete: () => { uni.$emit('updateView', {}) - uni.hideLoading() - this.loading = false uni.navigateBack() } }); diff --git a/pages/smarttrading/incomes.vue b/pages/smarttrading/incomes.vue index 4844078..78a6626 100644 --- a/pages/smarttrading/incomes.vue +++ b/pages/smarttrading/incomes.vue @@ -53,8 +53,8 @@ coins: ['USDT','BNB', 'ETH', 'BTC'], scrollHeight: 0, search: { - size: 10, - listrow: 1, + page: 1, + listrow: 10, totalPage: 0, }, optionsType: ['CALL', 'PUT'], @@ -97,6 +97,7 @@ }) this.loading = true let search = { + 'type':this.coins[this.coinIndex], ...this.search } delete search.totalPage @@ -113,7 +114,7 @@ this.incomes = this.incomes.concat(res.data.data) } 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) uni.hideLoading() diff --git a/request/api.js b/request/api.js index e650565..ebc12db 100644 --- a/request/api.js +++ b/request/api.js @@ -340,7 +340,7 @@ export function _getaccountorder(data){ export function _myIncome(data){ return jyRequest.get({ - url:`/api/quantify/getlist` // 获取收益列表 + url:`/api/quantify/getlist?${data}` // 获取收益列表 }) }