From 42e5ea86f7edc9361227edd979a8ae1952713161 Mon Sep 17 00:00:00 2001 From: Liuyi <candymxq888@outlook.com> Date: 星期六, 19 十月 2024 16:19:16 +0800 Subject: [PATCH] 添加共享列表,修改共享功能相关代码 --- pages/addCard/index.vue | 43 +++++++++++++++++++------------------------ 1 files changed, 19 insertions(+), 24 deletions(-) diff --git a/pages/addCard/index.vue b/pages/addCard/index.vue index d6d6f97..8e0ef25 100644 --- a/pages/addCard/index.vue +++ b/pages/addCard/index.vue @@ -3,6 +3,7 @@ import{ creatUserArchive } from '../../api/index.js' const form = ref({ + id:JSON.parse(uni.getStorageSync('userInfo')).id, waterCardNumber:'', userName:'', userPhone:'', @@ -14,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) } }); } @@ -24,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' + }) } }) } @@ -75,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