From 15a55f79a84e5dab670d54a9dc0c6b9133a18441 Mon Sep 17 00:00:00 2001 From: Liuyi <candymxq888@outlook.com> Date: 星期一, 21 十月 2024 17:29:37 +0800 Subject: [PATCH] 添加更改用户头像,添加故障上报校验 --- pages/addCard/index.vue | 44 +++++++++++++++++++------------------------- 1 files changed, 19 insertions(+), 25 deletions(-) diff --git a/pages/addCard/index.vue b/pages/addCard/index.vue index 9006518..8e0ef25 100644 --- a/pages/addCard/index.vue +++ b/pages/addCard/index.vue @@ -4,7 +4,7 @@ const form = ref({ id:JSON.parse(uni.getStorageSync('userInfo')).id, - waterCardNumber:'023B7C45', + waterCardNumber:'', userName:'', userPhone:'', remark:'', @@ -15,7 +15,9 @@ scanType: ['qrCode'], success: function (res) { console.log('条码内容:' + res.result); - form.value.waterCardNumber = res.result + let data = res.result.split('&id=') + form.value.waterCardNumber = data[1] + console.log('form.value.waterCardNumber',form.value.waterCardNumber) } }); } @@ -25,9 +27,22 @@ uni.showToast({ title: '添加成功!', image: '../../static/images/other/success.svg', - duration:500 + duration:2000 + }).then(() =>{ + uni.navigateBack() }) - uni.navigateBack() + }else if(res.code == 300){ + uni.showToast({ + title: res.msg, + duration:2000, + icon:'none' + }) + }else{ + uni.showToast({ + title:'绑卡失败', + duration:2000, + icon:'none' + }) } }) } @@ -76,27 +91,6 @@ .content{ width:100%; height:100vh; - .navbar{ - width:100%; - height:176rpx; - background: linear-gradient(to bottom,#5EA1FA,#8BC1FC); - display: flex; - align-items: flex-end; - padding-bottom:24rpx; - box-sizing: border-box; - image{ - width:20rpx; - height:40rpx; - margin-left:32rpx; - } - text{ - font-weight: 400; - font-size: 36rpx; - color: #000000; - margin-left: 234rpx; - - } - } .main{ width:100%; height: calc(100vh - 176rpx); -- Gitblit v1.9.3