From 145ca0bf62dd9517f732e47705557f4cdebda349 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 18 Jun 2025 17:37:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=BC=95=E5=AF=BC?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../introduction-popup.less | 50 +++++++++++++------ .../introduction-popup/introduction-popup.ts | 16 +++++- .../introduction-popup.wxml | 17 ++++--- 3 files changed, 59 insertions(+), 24 deletions(-) diff --git a/miniprogram/components/introduction-popup/introduction-popup.less b/miniprogram/components/introduction-popup/introduction-popup.less index 28b7c41..77425e0 100644 --- a/miniprogram/components/introduction-popup/introduction-popup.less +++ b/miniprogram/components/introduction-popup/introduction-popup.less @@ -13,7 +13,8 @@ left: 50%; transform: translateX(-50%); text-align: center; - color: rgba(255, 235, 59, 0.95); + // color: rgba(255, 235, 59, 0.95); + color: rgb(255, 255, 255, 0.9); font-size: 40rpx; font-weight: bold; width: 100%; @@ -21,12 +22,31 @@ } .tip-box { + height: 48px; + border-radius: 24px; + background: rgba(255, 255, 255, 0.2); border: 4rpx solid rgba(147, 211, 51, 1); + transition: all 0.4s; + + &--first { + position: absolute; + top: 66px; + left: 50%; + transform: translateX(-50%); + width: 340px; + } + + &--second { + position: absolute; + top: 127px; + left: 28px; + width: 48px; + } } .tip-text { - color: rgba(255, 235, 59, 0.95); - // color: #fff; + // color: rgba(255, 235, 59, 0.95); + color: rgb(255, 255, 255, 0.9); font-size: 32rpx; } @@ -36,16 +56,16 @@ left: 0; width: 100%; - .tip-box { - position: absolute; - top: 0; - left: 50%; - transform: translateX(-50%); - width: 342px; - height: 46px; - border-radius: 21px; - background: rgba(255, 255, 255, 0.2); - } + // .tip-box { + // position: absolute; + // top: 0; + // left: 50%; + // transform: translateX(-50%); + // width: 342px; + // height: 46px; + // border-radius: 21px; + // background: rgba(255, 255, 255, 0.2); + // } .guide-icon { position: absolute; @@ -70,8 +90,8 @@ color: rgba(255, 235, 59, 0.95); border-radius: 28rpx; position: absolute; - top: 260rpx; + top: 50%; left: 50%; - transform: translateX(-50%); + transform: translate(-50%, -50%); } } \ No newline at end of file diff --git a/miniprogram/components/introduction-popup/introduction-popup.ts b/miniprogram/components/introduction-popup/introduction-popup.ts index a488a27..56f8847 100644 --- a/miniprogram/components/introduction-popup/introduction-popup.ts +++ b/miniprogram/components/introduction-popup/introduction-popup.ts @@ -12,7 +12,9 @@ Component({ /** * 组件的初始数据 */ - data: {}, + data: { + currentStep: 'first', + }, lifetimes: { attached() {}, }, @@ -23,5 +25,17 @@ Component({ onClose() { this.triggerEvent('onClose'); }, + + toNextStep() { + const stepArr = ['first', 'second', 'third', 'fourth', 'fifth']; + const { currentStep } = this.data; + const currentStepIndex = currentStep + ? stepArr.indexOf(currentStep) + : 0; + console.log('next', stepArr[currentStepIndex + 1]); + this.setData({ + currentStep: stepArr[currentStepIndex + 1], + }); + }, }, }); diff --git a/miniprogram/components/introduction-popup/introduction-popup.wxml b/miniprogram/components/introduction-popup/introduction-popup.wxml index d38152e..80688ec 100644 --- a/miniprogram/components/introduction-popup/introduction-popup.wxml +++ b/miniprogram/components/introduction-popup/introduction-popup.wxml @@ -1,7 +1,14 @@ 跟我一起来涂色、识字吧! + + + 下一步 + - 这里请输入你想让小朋友熟悉的汉字、字母、数字等,点击“确定” - - 下一步 - +