diff --git a/app.wxss b/app.wxss index 7ca9f12..678dce0 100644 --- a/app.wxss +++ b/app.wxss @@ -68,8 +68,7 @@ page { /* 占位置 */ .empty-view { margin-top: 200rpx; - height: 1000rpx; - margin-bottom: 1000rpx; + margin-bottom: 800rpx; } .placeholder { height: 168rpx; diff --git a/miniprogram_npm/tdesign-miniprogram/textarea/textarea.wxss b/miniprogram_npm/tdesign-miniprogram/textarea/textarea.wxss index 08eea9a..f01920e 100644 --- a/miniprogram_npm/tdesign-miniprogram/textarea/textarea.wxss +++ b/miniprogram_npm/tdesign-miniprogram/textarea/textarea.wxss @@ -54,7 +54,7 @@ box-sizing: border-box; width: inherit; min-width: 0; - height: 100%; + height: 144rpx; min-height: 20px; margin: 0; padding: 0; diff --git a/pages/account/index.js b/pages/account/index.js index aa6a9c6..2d3c034 100644 --- a/pages/account/index.js +++ b/pages/account/index.js @@ -24,7 +24,6 @@ Page({ cashAccountList.forEach(item => { if (item.balance){ cashBalance = cashBalance + item.balance - sumBalance = sumBalance + item.balance } }) let oweAccountList = setting.data.OWE_SETTING @@ -32,9 +31,11 @@ Page({ oweAccountList.forEach(item => { if (item.balance){ oweBalance = oweBalance + item.balance - sumBalance = sumBalance + item.balance } }) + cashBalance = Math.floor(cashBalance * 100) / 100 + oweBalance = Math.floor(cashBalance * 100) / 100 + sumBalance = Math.floor((cashBalance - oweBalance) * 100) / 100 this.setData({cashAccountList,oweAccountList,cashBalance,oweBalance,sumBalance}) } }) diff --git a/utils/api.js b/utils/api.js index 7f4b6a8..2b098f2 100644 --- a/utils/api.js +++ b/utils/api.js @@ -13,6 +13,7 @@ function buildURL(url, needToken) { }) wx.showToast({ title: '请先登录', + icon: 'none', mask: true, duration: 2000 }) @@ -51,10 +52,8 @@ export function fetchPost(url, params, needToken, multiple) { console.log(res); if (response.statusCode == 200) { if (res.err_code == 0) { - wx.hideLoading(); resolve(res); } else { - wx.hideLoading(); wx.showToast({ title: res.data.err_msg, icon: 'none', @@ -63,7 +62,6 @@ export function fetchPost(url, params, needToken, multiple) { reject(res); } } else { - wx.hideLoading(); wx.showToast({ title: '服务器异常', icon: 'none', @@ -74,7 +72,6 @@ export function fetchPost(url, params, needToken, multiple) { }, fail: function(err) { console.log(err); - wx.hideLoading(); wx.showToast({ title: '网络错误', icon: 'none', @@ -98,10 +95,8 @@ export function fetchPost(url, params, needToken, multiple) { success: function(res) { console.log("POST返回数据", url,res); if (res.data.err_code == 0) { - wx.hideLoading(); resolve(res.data); } else { - wx.hideLoading(); wx.showToast({ title: res.data.err_msg, icon: 'none', @@ -111,7 +106,6 @@ export function fetchPost(url, params, needToken, multiple) { } }, fail: function(res) { - wx.hideLoading(); wx.showToast({ title: '网络错误', icon: 'none', @@ -144,13 +138,11 @@ export function fetchGet(url, params, needToken) { console.log("GET返回数据", url, res); if (res.statusCode == 200) { if (res.data.err_code == 0) { - wx.hideLoading(); resolve(res.data); } else { reject(res); } } else { - wx.hideLoading(); reject(res) wx.showToast({ title: '服务器异常', @@ -160,7 +152,6 @@ export function fetchGet(url, params, needToken) { } }, fail: function(res) { - wx.hideLoading(); reject(res) wx.showToast({ title: '网络错误',