|
|
@@ -17,12 +17,6 @@
|
|
|
<view class="money">
|
|
|
<text>{{item.faceValue}}</text>
|
|
|
</view>
|
|
|
- <!-- <view class="desc">-->
|
|
|
- <!-- <text>{{item.title}}</text>-->
|
|
|
- <!-- </view>-->
|
|
|
- <view class="flex-row justify-center" v-if="item.isShow">
|
|
|
- <text style="font-size: 28rpx;font-weight: bold;color: red;" @click.stop="navigateTo(item)">点击续费</text>
|
|
|
- </view>
|
|
|
</view>
|
|
|
|
|
|
<view class="h-center-content flex-col justify-around ">
|
|
|
@@ -48,6 +42,11 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <view class="actionBar flex-row justify-end" >
|
|
|
+ <view class="actionBtn renewBtn" v-if="item.isShow" @click.stop="navigateTo(item)">续费</view>
|
|
|
+ <view class="actionBtn upgradeBtn" @click.stop="upgrade(item)">升级</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view v-if="showRemarkId == item.id" class="remark" style="text-indent:unset">
|
|
|
<view v-if="item.unavailableWeeklyTimes || item.unavailableTimeRanges">
|
|
|
不可用日期:
|
|
|
@@ -71,6 +70,19 @@
|
|
|
<image :src="magnifyUrl" mode="widthFix"></image>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
+
|
|
|
+ <uni-popup ref="upgradePopup" type="center">
|
|
|
+ <view class="upgradePopupView">
|
|
|
+ <view class="upgradeTitle">请选择升级活动</view>
|
|
|
+ <scroll-view class="upgradeScroll" scroll-y>
|
|
|
+ <view class="upgradeItem" v-for="(act,idx) in upgradeActivityList" :key="idx" @click="selectUpgradeActivity(idx)">
|
|
|
+ <view class="upgradeItemTitle">{{act.title}}</view>
|
|
|
+ <view class="upgradeItemPrice">活动价格:<text class="upgradePrice">{{act.salePrice}}元</text></view>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+ <view class="upgradeCloseBtn" @click="closeUpgradePopup">取消</view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -84,6 +96,8 @@
|
|
|
windowHeight:'',
|
|
|
userInfo:{},
|
|
|
equityList:[],
|
|
|
+ upgradeActivityList:[],
|
|
|
+ currentUpgradeItem:null,
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -165,6 +179,60 @@
|
|
|
|
|
|
},
|
|
|
|
|
|
+ upgrade(item){
|
|
|
+ if (!item.equityCardId){
|
|
|
+ uni.showToast({
|
|
|
+ title: '当前权益卡暂无可升级活动',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ uni.showLoading({title: '加载中'})
|
|
|
+ this.$api.upgradeList(item.equityCardId).then(res=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ const list = (res && res.data && (res.data.data || res.data.rows)) || []
|
|
|
+ if (!list || list.length === 0){
|
|
|
+ uni.showToast({
|
|
|
+ title: '当前权益卡暂无可升级活动',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.currentUpgradeItem = item
|
|
|
+ if (list.length === 1){
|
|
|
+ this.goUpgradeDetail(list[0], item)
|
|
|
+ }else {
|
|
|
+ this.upgradeActivityList = list
|
|
|
+ this.$refs.upgradePopup.open()
|
|
|
+ }
|
|
|
+ }).catch(()=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ selectUpgradeActivity(idx){
|
|
|
+ const activity = this.upgradeActivityList[idx]
|
|
|
+ console.log(activity, 'activity')
|
|
|
+ this.goUpgradeDetail(activity, this.currentUpgradeItem)
|
|
|
+ this.closeUpgradePopup()
|
|
|
+ },
|
|
|
+
|
|
|
+ goUpgradeDetail(activity, item){
|
|
|
+ console.log(activity, item,'activity, item')
|
|
|
+ if (!activity || !activity.id){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let url = '/orderPages/activityDetail/activityDetail?id=' + activity.id + '&upgradeEquityCardId=' + item.id
|
|
|
+ if (item.serviceObjectId){
|
|
|
+ url += '&renewServiceObjectId=' + item.serviceObjectId
|
|
|
+ }
|
|
|
+ uni.navigateTo({url})
|
|
|
+ },
|
|
|
+
|
|
|
+ closeUpgradePopup(){
|
|
|
+ this.$refs.upgradePopup.close()
|
|
|
+ },
|
|
|
+
|
|
|
showRemark(item) {
|
|
|
if (this.showRemarkId == item.id) {
|
|
|
this.showRemarkId = ''
|