Commit f831908c authored by mengcuiguang's avatar mengcuiguang

代码优化

parent b50c43c8
......@@ -125,11 +125,16 @@
success: ({
data
}) => {
that.isFirstPayFlag = data.forFirst;
if (data.list != null && data.list.length > 0) {
if (that.point > 0) {
that.isFirstPayFlag = data.forFirst;
} else {
that.isFirstPayFlag = false;
}
that.vipList = [];
that.firstPayList = [];
if (that.isFirstPayFlag != null && that.isFirstPayFlag) {
if (that.isFirstPayFlag != null && that.isFirstPayFlag && that.point > 0) {
// 符合首充
var tempFirstPayFlag = false;
for (let i = 0; i < data.list.length; i++) {
......@@ -138,18 +143,22 @@
tempFirstPayFlag = true;
that.firstPayList.push(data.list[i]);
that.firstCash = data.list[i].firstPayPrice;
that.title = that.firstCash + ' 元自动解锁后续剧集';
that.title = that.firstCash + ' 元继续观看精彩剧集';
} else {
that.vipList.push(data.list[i]);
}
}
this.showAnim = false
that.showAnim = false
that.showPop('top')
that.handlePay()
} else {
this.showAnim = true
that.showAnim = true
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 = '超多精彩好剧一键解锁';
for (let i = 0; i < data.list.length; i++) {
if (data.list[i].activityType == 1) {
......@@ -231,7 +240,7 @@
setTimeout(() => {
that.title = '超多精彩好剧一键解锁';
that.isFirstPayFlag = false
that.showPop('bottom')
that.showPop('bottomPay')
}, 100);
} else {
// message.notify(errMsg);
......
......@@ -2,7 +2,8 @@
<template>
<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">
<view class="uni-popup__wrapper-box" @click.stop="clear">
<slot />
......@@ -79,6 +80,7 @@
'left': 0,
'right': 0,
}
this.duration = 0
break
case 'bottom':
this.ani = ['slide-bottom']
......@@ -88,6 +90,17 @@
'right': 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
case 'center':
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