Commit fdeea57d by liimin

Merge branch 'SAAS+V4.56.0-0908' of http://192.168.3.233:8090/saas/mini-program/…

…points-mall into SAAS+V4.56.0-0908
2 parents 93c92cdd a67118fd
...@@ -12,6 +12,7 @@ Component({ ...@@ -12,6 +12,7 @@ Component({
if (val && this.properties.address.length) { if (val && this.properties.address.length) {
console.log(this.properties.defaultAddress?.id) console.log(this.properties.defaultAddress?.id)
this.properties.address.forEach((item, index) => { this.properties.address.forEach((item, index) => {
item.active = false
if (item.id == this.properties.defaultAddress?.id) { if (item.id == this.properties.defaultAddress?.id) {
item.active = true item.active = true
} }
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<glsx-image src="{{pageParams.bannerImage}}"></glsx-image> <glsx-image src="{{pageParams.bannerImage}}"></glsx-image>
</view> </view>
<view class="goods-content"> <view class="goods-content">
<view class="goods-content-top"></view>
<view class="goods-box"> <view class="goods-box">
<goods list="{{pageParams.specialEventGoodsList}}" bindjoin="handleAddToCart"></goods> <goods list="{{pageParams.specialEventGoodsList}}" bindjoin="handleAddToCart"></goods>
</view> </view>
......
...@@ -69,7 +69,7 @@ page { ...@@ -69,7 +69,7 @@ page {
background: #FB8A32; background: #FB8A32;
border-radius: 20rpx; border-radius: 20rpx;
margin: 96rpx auto 40rpx; margin: 32rpx auto 92rpx;
font-weight: 600; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
color: #FFFFFF; color: #FFFFFF;
...@@ -94,7 +94,7 @@ page { ...@@ -94,7 +94,7 @@ page {
} }
.id-card-wrap { .id-card-wrap {
height: 276rpx;
margin-left: 32rpx; margin-left: 32rpx;
.label { .label {
...@@ -108,7 +108,7 @@ page { ...@@ -108,7 +108,7 @@ page {
} }
.upload-wrap { .upload-wrap {
height: 276rpx;
.upload { .upload {
width: 256rpx; width: 256rpx;
height: 192rpx; height: 192rpx;
......
...@@ -67,4 +67,4 @@ ...@@ -67,4 +67,4 @@
</Dialog> </Dialog>
<!-- <dialog show="{{showModal}}" confirmText="{{success?'去兑换':'我知道了'}}" cancelText="我知道了" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}"> --> <!-- <dialog show="{{showModal}}" confirmText="{{success?'去兑换':'我知道了'}}" cancelText="我知道了" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}"> -->
<!-- </dialog> --> <!-- </dialog> -->
<glsx-privacy appletName="积分会"></glsx-privacy>
\ No newline at end of file \ No newline at end of file
<glsx-privacy appletName="积分商城"></glsx-privacy>
\ No newline at end of file \ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<view class="popup-bg" bindtap="hidePopup"></view> <view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content"> <view class="popup-content">
<view class="modal_title">提示</view> <view class="modal_title">提示</view>
<view class="modal_tip">首次兑换需要您添加个人真实的银行账户!</view> <view class="modal_tip">首次提现需要您添加个人真实的银行账户!</view>
<button class="modal_btn" catchtap="toAddBankAccount">去添加</button> <button class="modal_btn" catchtap="toAddBankAccount">去添加</button>
</view> </view>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
} }
.content { .content {
height: 528rpx; min-height: 132rpx;
max-height: 528rpx ;
overflow-y: auto; overflow-y: auto;
.content-item { .content-item {
......
<!--packageIndex/pages/integral/withdrawal/components/PickerBankCard/PickerBankCard.wxml--> <!--packageIndex/pages/integral/withdrawal/components/PickerBankCard/PickerBankCard.wxml-->
<popup show="{{showBank}}" show-close-button="{{true}}" showFooter="{{false}}" headerColor="#F7F7F7" bodyColor="#F7F7F7" title="选择到账银行卡" bindconfirm="onConfirmPopup" height="800rpx;"> <popup show="{{showBank}}" show-close-button="{{true}}" showFooter="{{false}}" headerColor="#F7F7F7" bodyColor="#F7F7F7" title="选择到账银行卡" bindconfirm="onConfirmPopup" height="auto">
<view class='box'> <view class='box'>
<view class="content"> <view class="content">
<view class="content-item" wx:for="{{bankList}}" key="index" data-item="{{item}}" data-index="{{index}}" bind:tap="pickerBankCard"> <view class="content-item" wx:for="{{bankList}}" key="index" data-item="{{item}}" data-index="{{index}}" bind:tap="pickerBankCard">
......
// pages/chooseMerchant/index.js // pages/chooseMerchant/index.js
import commonApi from '~/api/module/common.js' import commonApi from '~/api/module/common.js'
import {
systemApi
} from '~/api/index'
Page({ Page({
/** /**
...@@ -22,6 +25,15 @@ Page({ ...@@ -22,6 +25,15 @@ Page({
}) })
}, },
// 跳转隐私政策页面
async handleAgree(e) {
const {
name
} = e.currentTarget.dataset
let v = await systemApi.getImageVersion()
wx.p.router.jumpH5(`https://img01.glsx.com.cn/weapp/resource/miniprogram/points-mall/html/${name}.html?v=${v}`, true)
},
chooseAccount(e) { chooseAccount(e) {
let { index } = e.currentTarget.dataset let { index } = e.currentTarget.dataset
this.setData({ this.setData({
......
...@@ -208,7 +208,7 @@ page { ...@@ -208,7 +208,7 @@ page {
// margin-bottom: 24rpx; // margin-bottom: 24rpx;
background-color: #F6F8FA; background-color: #F6F8FA;
width: 100%; width: 100%;
padding: 16rpx 0; padding: 16rpx 0 46rpx;
.a_class{ .a_class{
color: #4466F0; color: #4466F0;
} }
......
...@@ -39,32 +39,35 @@ Page({ ...@@ -39,32 +39,35 @@ Page({
navbarReady() { navbarReady() {
wx.nextTick(() => { wx.nextTick(() => {
this.clearAnimationTimer()
this.startAnimation() this.startAnimation()
}) })
}, },
// 顶部公告动画
startAnimation: function() { startAnimation: function() {
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('.text-container').boundingClientRect() query.select('.text-container').boundingClientRect()
query.select('.text').boundingClientRect() query.select('.text').boundingClientRect()
query.exec((res) => { query.exec((res) => {
const containerWidth = res[0]?.width if (!res[0] || !res[1]) return
const textWidth = res[1]?.width const containerWidth = res[0].width
// 只有文字宽度超过容器宽度时才滚动 const textWidth = res[1].width
if (textWidth > containerWidth) { if (textWidth > containerWidth) {
const animation = wx.createAnimation({ const animation = wx.createAnimation({
duration: (textWidth / 30) * 1000, // 根据文字长度调整滚动时间 duration: (textWidth / 30) * 1000,
timingFunction: 'linear', timingFunction: 'linear',
delay: 0 delay: 0
}) })
animation.translateX(-textWidth).step() animation.translateX(-textWidth).step()
this.setData({ this.setData({
animationData: animation.export() animationData: animation.export(),
shouldAnimate: true
}) })
// 设置循环 // 使用箭头函数保持this指向
setTimeout(() => { this.animationTimer = setTimeout(() => {
this.resetAnimation(); this.resetAnimation()
}, (textWidth / 30) * 1000) }, (textWidth / 30) * 1000)
} else {
this.setData({ shouldAnimate: false })
} }
}) })
}, },
...@@ -79,9 +82,35 @@ Page({ ...@@ -79,9 +82,35 @@ Page({
this.setData({ this.setData({
animationData: animation.export() animationData: animation.export()
}) })
setTimeout(() => { this.animationTimer = setTimeout(() => {
this.startAnimation() this.startAnimation()
}, 50) }, 300) // 增加延迟,让用户能看到起始位置
},
// 清理和恢复方法
clearAnimationTimer() {
if (this.animationTimer) {
clearTimeout(this.animationTimer)
this.animationTimer = null
}
},
restoreAnimation() {
if (this.data.shouldAnimate) {
this.clearAnimationTimer()
// 重新初始化动画
const animation = wx.createAnimation({
duration: 0,
timingFunction: 'linear'
})
animation.translateX(0).step()
this.setData({
animationData: animation.export()
})
// 短暂延迟后重新开始动画
setTimeout(() => {
this.startAnimation()
}, 50)
}
}, },
/** /**
...@@ -329,17 +358,24 @@ Page({ ...@@ -329,17 +358,24 @@ Page({
this.getGoodsList() this.getGoodsList()
this.getCategory() this.getCategory()
this.getHomeData() this.getHomeData()
if (this.data.shouldAnimate) { // 恢复公告动画
this.resetAnimation()
}
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () {}, onHide: function () {
this.clearAnimationTimer()
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () {}, onUnload: function () {
this.clearAnimationTimer()
},
refreshPage() { refreshPage() {
this.setData({ this.setData({
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<!-- 公告 --> <!-- 公告 -->
<view class="notic-box"> <view class="notic-box">
<view class="text-container"> <view class="text-container">
<view class="text" animation="{{animationData}}">郑重提醒:根据国家税务总局2025第16号公告,提现收入也将纳入个人累计收入计算税额,以上政策将于 10 月 1 日正式实施。</view> <view class="text" animation="{{shouldAnimate ? animationData : ''}}">郑重提醒:根据国家税务总局2025第16号公告,提现收入也将纳入个人累计收入计算税额,以上政策将于 10 月 1 日正式实施。</view>
</view> </view>
<view class="detail-btn" bindtap="policyDetail"> <view class="detail-btn" bindtap="policyDetail">
<text>详情</text> <text>详情</text>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!