From 93e94b5a83f194b5bded3897fedb880451e969c7 Mon Sep 17 00:00:00 2001 From: huyuanxiang <273637057@qq.com> Date: Tue, 20 Jun 2023 09:52:29 +0800 Subject: [PATCH] =?UTF-8?q?[fix]code=E4=B8=BA0=EF=BC=8C=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/commponent/user/my-server.vue | 1 - pages/login/index1.vue | 15 ++++++++------- pages/views/tabBar/cart.vue | 27 +++++++++++++++++++-------- pages/views/tabBar/user.vue | 1 - utils/request.js | 3 +-- 5 files changed, 28 insertions(+), 19 deletions(-) diff --git a/pages/commponent/user/my-server.vue b/pages/commponent/user/my-server.vue index 7960541..fc87e2b 100644 --- a/pages/commponent/user/my-server.vue +++ b/pages/commponent/user/my-server.vue @@ -42,7 +42,6 @@ export default { }, methods: { jumpLink(row) { - console.log(row) const whiteUrls = [ 'pages/views/user/myaddress', 'pages/views/setting/index', diff --git a/pages/login/index1.vue b/pages/login/index1.vue index 9de1572..26125d8 100644 --- a/pages/login/index1.vue +++ b/pages/login/index1.vue @@ -80,7 +80,7 @@ export default { }) return } - this.setbImg(); //动态切换背景 + // this.setbImg(); //动态切换背景 this.getImgCode() }, @@ -138,7 +138,7 @@ export default { setbImg() { clearInterval(this.imgTime); let that = this; - console.log('执行了'); + let imgTime = setInterval(() => { let imgIndex = that.imgIndex + 1; if (imgIndex >= that.bgImg.length) { @@ -188,11 +188,12 @@ export default { // } // uni.navigateBack(-1) } else { - uni.hideLoading() - uni.showToast({ - title:res.message, - icon: 'none' - }) + this.getImgCode() + uni.hideLoading() + uni.showToast({ + title:res.message, + icon: 'none' + }) } }).catch((e) => { diff --git a/pages/views/tabBar/cart.vue b/pages/views/tabBar/cart.vue index bd8f04d..196b6d8 100644 --- a/pages/views/tabBar/cart.vue +++ b/pages/views/tabBar/cart.vue @@ -88,7 +88,7 @@ 结算({{sum}}) - 合计:¥{{sumPrice || 0}} + 合计:¥{{sumPrice || 0}} @@ -683,6 +683,7 @@ height: 100rpx; width: 100%; padding: 0 2%; + display: flex; align-items: center; justify-content: center; position: fixed; @@ -694,7 +695,7 @@ } .bottom_all .left { - float: left; + // float: left; width: 40vw; font-size: 24rpx; position: relative; @@ -752,19 +753,24 @@ } .bottom_all .rights { - float: right; + // float: right; width: 56vw; - line-height: 100rpx; + // line-height: 100rpx; font-size: 24rpx; + display: flex; + flex-direction: column; + align-items: flex-end; + } .bottom_all .rights view { - float: right; + // float: right; } .bottom_all .rights .sum { font-weight: bold; - margin-right: 20rpx; + // margin-right: 20rpx; + font-size: 20upx; } .bottom_all .rights .jiesuan { @@ -775,8 +781,13 @@ line-height: 50rpx; color: #ffffff; font-size: 24rpx; - margin-top: 28rpx; - margin-left: 40rpx; + display: flex; + align-items: center; + justify-content: center; + width: 150upx; + + // margin-top: 28rpx; + // margin-left: 40rpx; } diff --git a/pages/views/tabBar/user.vue b/pages/views/tabBar/user.vue index c3b41e6..dcabbd5 100644 --- a/pages/views/tabBar/user.vue +++ b/pages/views/tabBar/user.vue @@ -173,7 +173,6 @@ export default { let oldcolor = this.colors; let userdata = getUserInfo() || {}; this.userdata = userdata - console.log(this.userdata) this.getOrderStatus() diff --git a/utils/request.js b/utils/request.js index 2387899..a73f925 100644 --- a/utils/request.js +++ b/utils/request.js @@ -34,7 +34,6 @@ async function request(method, params, type = 'GET') { return new Promise((resolve, reject) => { uni.request(http).then(res => { uni.hideLoading() - console.log(res) let newData = res[1].data; // if (newdata.code == 403) { if (newData == -1) { //如果错误码为 -1 提示 @@ -43,7 +42,7 @@ async function request(method, params, type = 'GET') { icon: 'none' }); } - if (newData.code !== 200) { + if (![200, 0].includes(newData.code)) { if (newData.code === 401) { uni.showToast({ title: newData.message,