From 1caae06d1ea2155bfdd2fa0465dba9b4b5d159bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87?= Date: Wed, 12 Mar 2025 19:55:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=A0=B7=E5=BC=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modalView/index.wxml | 4 ++-- components/modalView/index.wxss | 6 +++--- pages/help/package/index.js | 26 ++++++++++++++++++++---- pages/help/package/index.wxml | 8 +++++--- pages/help/package/index.wxss | 9 ++++++++ pages/my/coupon/index.js | 4 ---- pages/my/promation/activities/index.js | 19 ++++++++--------- pages/my/promation/activities/index.wxml | 4 ++-- pages/my/promation/activities/index.wxss | 2 +- 9 files changed, 53 insertions(+), 29 deletions(-) diff --git a/components/modalView/index.wxml b/components/modalView/index.wxml index 4fa37d6..7997541 100644 --- a/components/modalView/index.wxml +++ b/components/modalView/index.wxml @@ -20,8 +20,8 @@ - - + + \ No newline at end of file diff --git a/components/modalView/index.wxss b/components/modalView/index.wxss index 2a54b58..ef9b192 100644 --- a/components/modalView/index.wxss +++ b/components/modalView/index.wxss @@ -84,7 +84,7 @@ display: flex; gap: 18rpx; } -.modal-view-main .btns .button{ +.modal-view-main .btns .cmv-button{ flex:1; font-size: 16px; padding:16px; @@ -93,12 +93,12 @@ border-width: 2rpx;/* 边框显示不完整 bug */ } -.modal-view-main .btns .button.cancel{ +.modal-view-main .btns .cmv-button.cancel{ border-color:rgba(153, 153, 153, 0.5); background-color: rgba(153, 153, 153, 0.1); color:var(--main-font-color); } -.modal-view-main .btns .button.confirm{ +.modal-view-main .btns .cmv-button.confirm{ font-weight: bold; } \ No newline at end of file diff --git a/pages/help/package/index.js b/pages/help/package/index.js index 3c9277b..5958e44 100644 --- a/pages/help/package/index.js +++ b/pages/help/package/index.js @@ -33,12 +33,10 @@ Page({ if(item.pickup_codes.length>0&&item.pickup_codes[0]!=''){ //倒着找相同的索引 因为需要从后往前找 const codes = item.pickup_codes.join(',').split(',').reverse(); - let sameValue = ''; let findIndex = codes.findIndex((_item)=>{ let sames = codes.filter((__item)=>_item==__item); //找到了相同的 if(sames.length>1){ - sameValue = _item; hasSame = true; return true; } @@ -48,7 +46,6 @@ Page({ findIndex = item.pickup_codes.length - findIndex - 1; this.data.choosedStationList[index].focus = true; this.data.choosedStationList[index].focusIndex = findIndex; - console.log(findIndex,sameValue); wx.showToast({ icon:'none', title: '取件码重复', @@ -68,7 +65,6 @@ Page({ }); } }) - console.log(hasSame,'----'); if(hasSame)return; //录入了有效取件码 或者 上传了取件图片||this.data.tempImgs.length>0 if(data.length>0){ @@ -243,10 +239,32 @@ Page({ this.setData({ choosedStationList:this.data.choosedStationList }) + // this.addAnimation(0); } } }) }, + addAnimation(index){ + const duration = 2000; + // + let animation = wx.createAnimation({ + duration:duration + }); + animation.opacity(1).height('390rpx').step(); + + wx.nextTick(()=>{ + console.log(this.data.choosedStationList[index]); + this.setData({ + [`choosedStationList[${index}].animation`]:animation.export() + }) + setTimeout(() => { + this.setData({ + [`choosedStationList[${index}].animationOver`]:true, + [`choosedStationList[${index}].animation`]:null + }) + }, duration); + }) + }, chooseImage(){ if(this.data.imgUploading||this.data.recogniting)return; wx.chooseMedia({ diff --git a/pages/help/package/index.wxml b/pages/help/package/index.wxml index 3b48e7a..ec5d02e 100644 --- a/pages/help/package/index.wxml +++ b/pages/help/package/index.wxml @@ -21,7 +21,9 @@ 手动录入取件码 - + AI识别 @@ -30,8 +32,8 @@ - + diff --git a/pages/help/package/index.wxss b/pages/help/package/index.wxss index 33ddd6f..4ee9438 100644 --- a/pages/help/package/index.wxss +++ b/pages/help/package/index.wxss @@ -1,5 +1,13 @@ .station{ padding-top:16rpx; + /* opacity: 0; + height:0; + overflow: hidden; + box-sizing: border-box; */ +} +.station.animation-over{ + opacity: 1; + height: auto; } .station .head{ white-space: nowrap; @@ -43,6 +51,7 @@ .station .head .title .name{ overflow: hidden; text-overflow: ellipsis; + line-height: 68rpx; } .station .head .sub-title{ font-size:26rpx; diff --git a/pages/my/coupon/index.js b/pages/my/coupon/index.js index 10c2bfc..ee3821d 100644 --- a/pages/my/coupon/index.js +++ b/pages/my/coupon/index.js @@ -66,10 +66,6 @@ Page({ skip:this.data.pager[tabName].limit*this.data.pager[tabName].pageIndex, limit:this.data.pager[tabName].limit }).then((data)=>{ - data.map((item)=>{ - item.expire_time = item.expire_time.substr(0,10).replaceAll('-','.'); - }) - console.log('tabname',tabName); if(this.data.pager[tabName].pageIndex==0){ this.data[tabName+'List'] = data; }else{ diff --git a/pages/my/promation/activities/index.js b/pages/my/promation/activities/index.js index 3708509..f082bd8 100644 --- a/pages/my/promation/activities/index.js +++ b/pages/my/promation/activities/index.js @@ -23,15 +23,6 @@ Page({ this.setData({ activityId:options.id||2 }); - this.getActivityDetail(); - userApi.coupon.check(options.id||2).then((data)=>{ - if(!data.can_receive){ - this.setData({ - isShowModal:true, - errorMsg:data.message - }) - } - }) }, getActivityDetail(){ this.setData({ @@ -89,7 +80,15 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { - + this.getActivityDetail(); + userApi.coupon.check(this.data.activityId).then((data)=>{ + if(!data.can_receive){ + this.setData({ + isShowModal:true, + errorMsg:data.message + }) + } + }) }, /** diff --git a/pages/my/promation/activities/index.wxml b/pages/my/promation/activities/index.wxml index 8bcab27..e5c6489 100644 --- a/pages/my/promation/activities/index.wxml +++ b/pages/my/promation/activities/index.wxml @@ -12,7 +12,7 @@ {{item.name}} x {{item.count}} {{item.amount}} - 先领券,再下单,免费配送 + 使用有效期:{{item.available_days}} 天 + class="button get" bind:tap="getActivity">一键领取 diff --git a/pages/my/promation/activities/index.wxss b/pages/my/promation/activities/index.wxss index 031ce05..887e534 100644 --- a/pages/my/promation/activities/index.wxss +++ b/pages/my/promation/activities/index.wxss @@ -49,7 +49,7 @@ page{ color: #999999; margin-top:44rpx; } -.button{ +.button.get{ position: relative; z-index: 1; margin-top:60rpx;