Commit 22830e42 authored by jyx's avatar jyx

代码优化

parent 92fa688d
......@@ -74,7 +74,7 @@
mounted() {
uni.getSystemInfo({
success: (res => {
this.clientHeight = res.windowHeight - 42;
this.clientHeight = res.windowHeight - 50;
})
});
},
......
......@@ -182,8 +182,7 @@
style="width: 30rpx;height: 30rpx;display: flex;align-items: right;margin: 10rpx;"
src="../../static/index/ic_quit_white.png" mode="aspectFill"></image>
<view @click="handleBottomPlay(newRecordBean)"
style="width: 160rpx;height: 50rpx;line-height: 50rpx;text-align: center;background-color: red;border-radius:30rpx;color: white;font-size: 24rpx;margin-right: 20rpx;">
继续观看
style="width: 160rpx;height: 50rpx;line-height: 50rpx;text-align: center;background-color: red;border-radius:30rpx;color: white;font-size: 24rpx;margin-right: 20rpx;"> 继续观看
</view>
</view>
......@@ -242,7 +241,7 @@
mounted() {
uni.getSystemInfo({
success: (res => {
this.clientHeight = res.windowHeight - 42;
this.clientHeight = res.windowHeight - 50;
})
});
// 匹配视频
......
......@@ -162,7 +162,7 @@
mounted() {
uni.getSystemInfo({
success: (res => {
this.clientHeight = res.windowHeight - 42;
this.clientHeight = res.windowHeight - 50;
})
});
},
......
......@@ -262,13 +262,13 @@
// 监听视频播放完成
this.ad.onClose((data) => {
uni.hideLoading();
if (data.isEnded) {
if (data.isEnded) {
if (that.showRewardAdMorePop) {
that.showRewardAdMorePop = false
that.pm.setCurrentUnlock()
that.addRewardPoint()
that.commitVideo()
that.commitVideo()
message.notify("正在为您解锁剧集")
} else if (that.showRewardAdPop) {
that.adUnlock()
......@@ -295,6 +295,10 @@
var countDownSeconds = 3
that.countDown = countDownSeconds
const timer = setInterval(() => {
if (!that.showRewardAdPop) {
clearInterval(timer)
}
if (countDownSeconds > 0) {
that.countDown = countDownSeconds
countDownSeconds--
......@@ -315,6 +319,7 @@
},
closeAdPop() {
this.showRewardAdPop = false
this.pm.toggleCustomDialog()
},
closeAdMorePop() {
this.showRewardAdMorePop = false
......
......@@ -37,8 +37,10 @@
"root": "pagesC",
"pages": [{
"path": "ttvideo/ttVideoDetail",
"usingComponents": {
"tt-video-player": "ext://industry/video-player"
"style": {
"backgroundColor": "#000000",
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff"
}
}, {
"path": "playlet/index",
......@@ -99,9 +101,13 @@
"backgroundColor": "#f5f5f5",
"navigationStyle": "default",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#ffffff",
"app-plus": {
"bounce": "none",
"scrollIndicator": "none"
},
"usingComponents": {
"tt-video-player": "ext://industry/video-player"
}
},
"condition": { //模式配置,仅开发期间生效
......
......@@ -43,8 +43,7 @@
</view>
</view>
<view v-if="showEditBar" class="editBar"
:style="'padding-top:35rpx;padding-bottom:' + bottomSafePadding + 'px;'">
<view v-if="showEditBar" class="editBar">
<view class="editItem" @click="!isFullChoice?fullChoice():noChoice()">
{{!isFullChoice?'全选':'全不选'}}
</view>
......@@ -194,13 +193,13 @@
position: absolute;
bottom: 0;
width: 100%;
height: 60rpx;
height: 60px;
background: white;
display: flex;
.editItem {
height: 60rpx;
line-height: 60rpx;
height: 60px;
line-height: 60px;
text-align: center;
width: 50%;
}
......@@ -210,12 +209,12 @@
display: flex;
align-items: center;
background-color: white;
height: 42px;
height: 50px;
.tab {
flex: 1;
text-align: center;
font-size: 12px;
font-size: 14px;
font-weight: bold;
color: black;
......
......@@ -62,17 +62,17 @@
<view v-else style="display: flex;align-items: center;font-size: 40rpx;
color: #f2b068;
font-weight: 700;">
{{multiply(item.firstPayPrice)}}
<image style="width: 50rpx;height: 50rpx;display: flex;margin-right: 10rpx;"
src="@/static/ic_zuan.png">
</image>
+{{multiply(item.firstPayPrice)}}
</view>
<view class="name row" v-if="item.title!=null&&item.title!=''">
{{item.title}}
</view>
<view class="origin row" v-if="item.remarks!=null&&item.remarks!=''">
<view class="origin row" v-if="item.remarks!=null&&item.remarks!=''&&os=='android'">
{{item.remarks}}
</view>
</view>
......@@ -114,12 +114,12 @@
<text>客服时间</text>
<text>工作日9:00-18:00</text>
</view>
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
<uni-popup type="center" ref="select">
<view class="text-box">
{{slotParam}}
</view>
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
<uni-popup type="center" ref="select">
<view class="text-box">
{{slotParam}}
</view>
</uni-popup>
</view>
</template>
......@@ -147,15 +147,15 @@
pointList: [],
selectedIndex: 0,
selectedVipIndex: -1,
btnText: '',
slotParam: '',
btnText: '',
slotParam: '',
vedioId: '',
userBean: {},
os: 'android',
showKefuPop: false
}
},
onLoad(options) {
onLoad(options) {
this.vedioId = options.vedioId
let that = this;
if (tt.getSystemInfoSync().platform === 'ios') {
......@@ -207,7 +207,7 @@
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(that.pointList[i]
.yhqRateBalance) + "钻石,已优惠" +
.yhqRateBalance) + "钻石,已优惠" +
that.multiply(tempYhq) + "钻石"
} else {
that.btnText = "立即支付" + that.pointList[i].yhqRateBalance + "元,已优惠" +
......@@ -236,16 +236,16 @@
}
if (that.pointList[0].yhqRateBalance != null) {
let tempYhq = new Decimal(cashStr).sub(new Decimal(that.pointList[0]
.yhqRateBalance)).toNumber()
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(that.pointList[i]
.yhqRateBalance) + "钻石,已优惠" +
that.multiply(tempYhq) + "钻石"
} else {
that.btnText = "立即支付" + that.pointList[i].yhqRateBalance + "元,已优惠" +
tempYhq + "元"
}
.yhqRateBalance)).toNumber()
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(that.pointList[i]
.yhqRateBalance) + "钻石,已优惠" +
that.multiply(tempYhq) + "钻石"
} else {
that.btnText = "立即支付" + that.pointList[i].yhqRateBalance + "元,已优惠" +
tempYhq + "元"
}
}
if (that.pointList[0].weixin) {
that.wxShowFlag = true
......@@ -275,41 +275,44 @@
// this.handlePay();
if (this.selectedIndex == -1) {
// vip充值
let cashStr = this.vipList[this.selectedVipIndex].firstPayPrice
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(cashStr) + "钻石"
} else {
that.btnText = "立即支付" + cashStr + "元"
let cashStr = this.vipList[this.selectedVipIndex].firstPayPrice
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(cashStr) + "钻石"
} else {
that.btnText = "立即支付" + cashStr + "元"
}
if (that.vipList[this.selectedVipIndex].yhqRateBalance != null) {
let tempYhq = new Decimal(cashStr).sub(new Decimal(that.vipList[this.selectedVipIndex]
.yhqRateBalance)).toNumber()
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(that.vipList[selectedVipIndex]
.yhqRateBalance) + "钻石,已优惠" +
that.multiply(tempYhq) + "钻石"
} else {
that.btnText = "立即支付" + that.vipList[this.selectedVipIndex].yhqRateBalance + "元,已优惠" + tempYhq +
"元"
.yhqRateBalance)).toNumber()
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(that.vipList[selectedVipIndex]
.yhqRateBalance) + "钻石,已优惠" +
that.multiply(tempYhq) + "钻石"
} else {
that.btnText = "立即支付" + that.vipList[this.selectedVipIndex].yhqRateBalance + "元,已优惠" +
tempYhq +
"元"
}
}
} else {
let cashStr = this.pointList[this.selectedIndex].firstPayPrice
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(cashStr) + "钻石"
} else {
that.btnText = "立即支付" + cashStr + "元"
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(cashStr) + "钻石"
} else {
that.btnText = "立即支付" + cashStr + "元"
}
if (that.pointList[this.selectedIndex].yhqRateBalance != null) {
let tempYhq = new Decimal(cashStr).sub(new Decimal(that.pointList[this.selectedIndex]
.yhqRateBalance)).toNumber()
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(that.pointList[this.selectedIndex].yhqRateBalance) + "钻石,已优惠" +
that.multiply(tempYhq) + "钻石"
} else {
that.btnText = "立即支付" + that.pointList[this.selectedIndex].yhqRateBalance + "元,已优惠" + tempYhq + "元"
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(that.pointList[this.selectedIndex].yhqRateBalance) +
"钻石,已优惠" +
that.multiply(tempYhq) + "钻石"
} else {
that.btnText = "立即支付" + that.pointList[this.selectedIndex].yhqRateBalance + "元,已优惠" + tempYhq +
"元"
}
}
}
......@@ -322,39 +325,42 @@
if (this.selectedIndex == -1) {
// vip充值
let cashStr = this.vipList[this.selectedVipIndex].firstPayPrice
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(cashStr) + "钻石"
} else {
that.btnText = "立即支付" + cashStr + "元"
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(cashStr) + "钻石"
} else {
that.btnText = "立即支付" + cashStr + "元"
}
if (that.vipList[this.selectedVipIndex].yhqRateBalance != null) {
let tempYhq = new Decimal(cashStr).sub(new Decimal(that.vipList[this.selectedVipIndex]
.yhqRateBalance)).toNumber()
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(that.vipList[selectedVipIndex]
.yhqRateBalance) + "钻石,已优惠" +
that.multiply(tempYhq) + "钻石"
} else {
that.btnText = "立即支付" + that.vipList[this.selectedVipIndex].yhqRateBalance + "元,已优惠" + tempYhq +
"元"
}
.yhqRateBalance)).toNumber()
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(that.vipList[selectedVipIndex]
.yhqRateBalance) + "钻石,已优惠" +
that.multiply(tempYhq) + "钻石"
} else {
that.btnText = "立即支付" + that.vipList[this.selectedVipIndex].yhqRateBalance + "元,已优惠" +
tempYhq +
"元"
}
}
} else {
let cashStr = this.pointList[this.selectedIndex].firstPayPrice
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(cashStr) + "钻石"
} else {
that.btnText = "立即支付" + cashStr + "元"
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(cashStr) + "钻石"
} else {
that.btnText = "立即支付" + cashStr + "元"
}
if (that.pointList[this.selectedIndex].yhqRateBalance != null) {
let tempYhq = new Decimal(cashStr).sub(new Decimal(that.pointList[this.selectedIndex]
.yhqRateBalance)).toNumber()
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(that.pointList[this.selectedIndex].yhqRateBalance) + "钻石,已优惠" +
that.multiply(tempYhq) + "钻石"
} else {
that.btnText = "立即支付" + that.pointList[this.selectedIndex].yhqRateBalance + "元,已优惠" + tempYhq + "元"
if (that.os == 'ios') {
that.btnText = "立即支付" + that.multiply(that.pointList[this.selectedIndex].yhqRateBalance) +
"钻石,已优惠" +
that.multiply(tempYhq) + "钻石"
} else {
that.btnText = "立即支付" + that.pointList[this.selectedIndex].yhqRateBalance + "元,已优惠" + tempYhq +
"元"
}
}
}
......@@ -405,9 +411,9 @@
that.ttPay(largeType, res.orderId, ttData);
},
fail(res) {
// message.notify(res.errMsg);
// message.notify(res.errMsg);
that.slotParam = JSON.stringify(res.errMsg);
console.log('requestOrder res.errMsg', res)
console.log('requestOrder res.errMsg', res)
that.$refs.select.open('center');
},
});
......@@ -572,12 +578,13 @@
text {
color: #2c2c2c;
}
}
.text-box {
word-break: break-all;
margin: 10rpx;
padding: 10rpx;
background-color: white;
color: black;
}
.text-box {
word-break: break-all;
margin: 10rpx;
padding: 10rpx;
background-color: white;
color: black;
}
</style>
\ No newline at end of file
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