wkyy 3 سال پیش
والد
کامیت
df4bf582bf
1فایلهای تغییر یافته به همراه12 افزوده شده و 12 حذف شده
  1. 12 12
      pages/user/coupon/myCoupon.vue

+ 12 - 12
pages/user/coupon/myCoupon.vue

@@ -31,17 +31,11 @@
 				</view>
 				
 				<view class="limit">
-					<view class="limit-text" v-if="more==index&&readMoreStatus">
-							<view class="limit-text2">
+					<view class="limit-text">
+							<view :class="more==index&&readMoreStatus ? 'limit-text2' : 'limit-text1'">
 								<span>{{item.useScope}}</span>		
 							</view>
-							<text class="iconfont arrows" @click="readMore(index)">&#xe62c;</text>
-					</view>
-					<view class="limit-text" v-else>
-							<view class="limit-text1">
-								<span>{{item.useScope}}</span>
-							</view>
-							<text class="iconfont arrows" @click="readMore(index)">&#xe607;</text>
+							<text class="iconfont arrows" @click="readMore(index)">{{more==index&&readMoreStatus ? '&#xe607;' : '&#xe62c;'}}</text>
 					</view>
 					<view class="use-button" v-if="current == '0'" @click="toIndex">去使用</view>
 					<view class="have-used" v-if="current == '1'"><img src="../../../static/img/haveused.png" alt=""></view>
@@ -71,7 +65,8 @@
 				pageIndex: 1,
 				recordsTotal: 0,
 				readMoreStatus: false,
-				more: '',
+				more: -1,
+				moreShow: '',
 			}
 		},
 		onShow() {
@@ -94,8 +89,13 @@
 				})
 			},
 			readMore(index) {
-				this.more = index;
-				this.readMoreStatus = !this.readMoreStatus;
+				if(this.more != index && this.readMoreStatus) {
+					this.more = index;
+					this.readMoreStatus = true;
+				} else {
+					this.more = index;
+					this.readMoreStatus = !this.readMoreStatus;
+				}
 			},
 			getCouponList(bl) {
 				uni.showLoading({