This commit is contained in:
SelfRidicule 2024-03-06 18:35:47 +08:00
parent bcfaf78e7c
commit f394ce42ad
3 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ Page({
*/
data: {
IMG_NAME: app.IMG_NAME,
couponId: '',
couponId: null,
dataList: [],
userDetail: {}
},

View File

@ -3,7 +3,7 @@
<!-- 优惠卷列表 -->
<view class="couponView">
<van-radio-group value="{{ couponId }}">
<view class="item" wx:for="{{dataList}}" wx:key="*this" data-id="{{item.id}}" data-isDisable="{{item.isDisable}}" bind:tap="couponSelect">
<view class="item" wx:for="{{dataList}}" wx:key="*this" data-id="{{item.ticketId}}" data-isDisable="{{item.isDisable}}" bind:tap="couponSelect">
<view class="imgView">
<image class="img" src="{{IMG_NAME + '/profile/static/meeting/coupon/couponBg.png'}}" mode="aspectFill"></image>
<view class="timeView">
@ -16,7 +16,7 @@
<view class="platform">适用平台: {{item.content}}</view>
<view class="validityTime">{{item.startTime}}~{{item.endDate}}</view>
</view>
<van-radio name="{{item.id}}" disabled="{{item.isDisable}}"></van-radio>
<van-radio name="{{item.ticketId}}" disabled="{{item.isDisable}}"></van-radio>
</view>
</van-radio-group>
</view>

View File

@ -206,7 +206,7 @@ Page({
let _this = this
// 更新选择的优惠卷
if (_this.data.couponId) {
let couponData = _this.data.couponList.find(item => item.id == _this.data.couponId)
let couponData = _this.data.couponList.find(item => item.ticketId == _this.data.couponId)
_this.setData({
couponData
})