Commit f831908c authored by mengcuiguang's avatar mengcuiguang

代码优化

parent b50c43c8
...@@ -125,11 +125,16 @@ ...@@ -125,11 +125,16 @@
success: ({ success: ({
data data
}) => { }) => {
that.isFirstPayFlag = data.forFirst;
if (data.list != null && data.list.length > 0) { if (data.list != null && data.list.length > 0) {
if (that.point > 0) {
that.isFirstPayFlag = data.forFirst;
} else {
that.isFirstPayFlag = false;
}
that.vipList = []; that.vipList = [];
that.firstPayList = []; that.firstPayList = [];
if (that.isFirstPayFlag != null && that.isFirstPayFlag) { if (that.isFirstPayFlag != null && that.isFirstPayFlag && that.point > 0) {
// 符合首充 // 符合首充
var tempFirstPayFlag = false; var tempFirstPayFlag = false;
for (let i = 0; i < data.list.length; i++) { for (let i = 0; i < data.list.length; i++) {
...@@ -138,18 +143,22 @@ ...@@ -138,18 +143,22 @@
tempFirstPayFlag = true; tempFirstPayFlag = true;
that.firstPayList.push(data.list[i]); that.firstPayList.push(data.list[i]);
that.firstCash = data.list[i].firstPayPrice; that.firstCash = data.list[i].firstPayPrice;
that.title = that.firstCash + ' 元自动解锁后续剧集'; that.title = that.firstCash + ' 元继续观看精彩剧集';
} else { } else {
that.vipList.push(data.list[i]); that.vipList.push(data.list[i]);
} }
} }
this.showAnim = false that.showAnim = false
that.showPop('top') that.showPop('top')
that.handlePay() that.handlePay()
} else { } else {
this.showAnim = true that.showAnim = true
that.showPop('bottom') that.showPop('bottom')
that.vipList = data.list; for (let i = 0; i < data.list.length; i++) {
if (data.list[i].forFirst != 1) {
that.vipList.push(data.list[i]);
}
}
that.title = '超多精彩好剧一键解锁'; that.title = '超多精彩好剧一键解锁';
for (let i = 0; i < data.list.length; i++) { for (let i = 0; i < data.list.length; i++) {
if (data.list[i].activityType == 1) { if (data.list[i].activityType == 1) {
...@@ -231,7 +240,7 @@ ...@@ -231,7 +240,7 @@
setTimeout(() => { setTimeout(() => {
that.title = '超多精彩好剧一键解锁'; that.title = '超多精彩好剧一键解锁';
that.isFirstPayFlag = false that.isFirstPayFlag = false
that.showPop('bottom') that.showPop('bottomPay')
}, 100); }, 100);
} else { } else {
// message.notify(errMsg); // message.notify(errMsg);
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<template> <template>
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear"> <view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear">
<uni-transition :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans" @click="onTap" /> <uni-transition :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans"
@click="onTap" />
<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap"> <uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
<view class="uni-popup__wrapper-box" @click.stop="clear"> <view class="uni-popup__wrapper-box" @click.stop="clear">
<slot /> <slot />
...@@ -79,6 +80,7 @@ ...@@ -79,6 +80,7 @@
'left': 0, 'left': 0,
'right': 0, 'right': 0,
} }
this.duration = 0
break break
case 'bottom': case 'bottom':
this.ani = ['slide-bottom'] this.ani = ['slide-bottom']
...@@ -88,6 +90,17 @@ ...@@ -88,6 +90,17 @@
'right': 0, 'right': 0,
'bottom': 0 'bottom': 0
} }
this.duration = 300
break
case 'bottomPay':
this.ani = ['slide-bottom']
this.transClass = {
'position': 'fixed',
'left': 0,
'right': 0,
'bottom': 0
}
this.duration = 0
break break
case 'center': case 'center':
this.ani = ['zoom-out', 'fade'] this.ani = ['zoom-out', 'fade']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment