From 30d0ce01b1520315e05b8bd3d3ead0aeb03961eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A6=86=E9=92=B1=E8=90=BD=E5=B0=BD=E6=A7=BF=E8=8A=B1?= =?UTF-8?q?=E7=A8=80?= <2675540038@qq.com> Date: Wed, 4 Jun 2025 11:13:29 +0800 Subject: [PATCH] =?UTF-8?q?=EF=BC=881=EF=BC=89=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=92=8C=E9=9D=92=E5=B9=B4=E6=88=B7=E5=A4=96?= =?UTF-8?q?=E5=8D=8F=E4=BC=9A=E5=85=B3=E8=81=94=EF=BC=8C=E5=81=9A=E4=B8=80?= =?UTF-8?q?=E4=B8=AAbanner=E6=94=BE=E5=9C=A8=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E4=B8=AA=E3=80=82banner=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E6=98=AF=E9=82=80=E8=AF=B7/=E6=8E=A8=E5=B9=BF=E7=9A=84?= =?UTF-8?q?=E3=80=82=20=EF=BC=882=EF=BC=89=E7=82=B9=E5=87=BBbanner?= =?UTF-8?q?=EF=BC=8C=E8=B7=B3=E5=87=BA=E5=8D=8F=E4=BC=9A=E5=85=A5=E4=BC=9A?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 254 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 242 insertions(+), 12 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 4b1f63d..f6b9c35 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -24,9 +24,8 @@ - + @@ -191,6 +190,74 @@ + + + + + + + + 会员招募信息 + + + 关闭 + + + + + + + 联系人 + + + + + + + + + 联系电话 + + + + + + + + + 企业名称 + + + + + + + + + 企业地址 + + + + + + + + + 经营/热爱的户外运动 + + + + + + 确认提交 + + @@ -237,7 +304,15 @@ ], limit: 6, page: 1, - show: false + show: false, + formShow: false, + formData: { + name: '', + mobile: '', + enterprise_name: '', + enterprise_addr: '', + outdoor_sport: '', + } }; }, onLoad() { @@ -253,7 +328,7 @@ this.videoContext = uni.createVideoContext("myVideo"); //创建视频实例指向video }, onShow() { - + }, beforeDestroy() { this.autoplay = false; @@ -264,16 +339,124 @@ // } }, methods: { - openSwiper(item){ - console.log(item); - if(item.url=='xxx'){ + + + submitDo() { + const token = uni.getStorageSync('token'); + if (!token) { uni.showToast({ - title: '入会申请表单', + title: '请登录', icon: 'none', + duration: 2000, + complete: function() { + setTimeout(function() { + uni.switchTab({ + url: '/pages/my/index', + }); + }, 2000); + } }); - }else{ + return; + } + + if (this.formData.name == '') { + uni.showToast({ + title: '请填写联系人!', + icon: "none", + duration: 2000, + }); + return; + } + if (this.formData.mobile == '') { + uni.showToast({ + title: '请填写联系电话!', + icon: "none", + duration: 2000, + }); + return; + } + if (this.formData.enterprise_name == '') { + uni.showToast({ + title: '请填写企业名称!', + icon: "none", + duration: 2000, + }); + return; + } + if (this.formData.enterprise_addr == '') { + uni.showToast({ + title: '请填写企业地址!', + icon: "none", + duration: 2000, + }); + return; + } + if (this.formData.outdoor_sport == '') { + uni.showToast({ + title: '请填写经营/热爱的户外运动!', + icon: "none", + duration: 2000, + }); + return; + } + uni.$u.http + .post("/api/school.spor_apply/add", this.formData) + .then((res) => { + console.log(res); + if (res.code == 1) { + uni.showToast({ + title: '提交成功!', + icon: "none", + duration: 2000, + }); + this.formShow = false; + this.formData = { + name: '', + mobile: '', + enterprise_name: '', + enterprise_addr: '', + outdoor_sport: '', + }; + } else { + uni.showToast({ + title: res.msg, + icon: "none", + duration: 2000, + }); + } + }) + .catch((error) => { + uni.showToast({ + title: "请求失败,请稍后再试", + icon: "none", + duration: 2000, + }); + }); + }, + openSwiper(item) { + console.log(item); + if (item.url == 'outdoor_sport_apply') { + const token = uni.getStorageSync('token'); + if (!token) { + uni.showToast({ + title: '请登录', + icon: 'none', + duration: 2000, + complete: function() { + setTimeout(function() { + uni.switchTab({ + url: '/pages/my/index', + }); + }, 2000); + } + }); + return; + } else { + this.formShow = true; + } + } else { uni.navigateTo({ - url:item.url + url: item.url }) } }, @@ -1244,7 +1427,7 @@ text-align: center; width: 100%; bottom: 70rpx; - transform: translateZ(0); + transform: translateZ(0); } .fnon_tit { @@ -1296,4 +1479,51 @@ } } } + + .line-row { + margin: 40rpx 0rpx; + height: 1rpx; + width: 100%; + background: #F0F0F0; + } + + .input { + text-align: right; + font-family: PingFang SC, PingFang SC; + font-size: 26rpx; + color: #343434; + line-height: 32rpx; + } + + .plasty { + color: #999999; + font-weight: 300; + font-size: 28rpx; + } + + .textarea_mph { + ::v-deep .u-textarea { + height: 237rpx; + padding: 20rpx; + border: none; + font-size: 26rpx; + color: #9C9C9C; + background-color: #F8F8F8 !important; + border-radius: 18rpx; + } + } + + .btn_1 { + width: 100%; + height: 90rpx; + background: #323232; + border-radius: 198rpx 198rpx 198rpx 198rpx; + font-family: YouSheBiaoTiHei, YouSheBiaoTiHei; + font-weight: 400; + font-size: 32rpx; + color: #BBFC5B; + line-height: 90rpx; + text-align: center; + margin-top: 50rpx; + } \ No newline at end of file