增加:

抽奖次数不足时不跳转
增加配速播放
This commit is contained in:
2024-12-12 18:20:00 +08:00
parent fbdeaee553
commit 44a9d8669e
6 changed files with 137 additions and 101 deletions

View File

@@ -2,8 +2,8 @@
"name" : "斯耀短剧", "name" : "斯耀短剧",
"appid" : "__UNI__E0B05B1", "appid" : "__UNI__E0B05B1",
"description" : "", "description" : "",
"versionName" : "1.0.2", "versionName" : "1.0.4",
"versionCode" : 102, "versionCode" : 103,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@@ -3,14 +3,13 @@
<list :bounce="false" :loadmoreoffset="wHeight*3" :show-scrollbar="false" ref="listBox" :pagingEnabled="true" <list :bounce="false" :loadmoreoffset="wHeight*3" :show-scrollbar="false" ref="listBox" :pagingEnabled="true"
:scrollable="true"> :scrollable="true">
<cell v-for="(item,i) in videoList" :key="i" :ref="'list'+item.courseDetailsId"> <cell v-for="(item,i) in videoList" :key="i" :ref="'list'+item.courseDetailsId">
<view class="swipers-items" @longpress="openBs()" @disappear="disappear(item.courseDetailsId,i)" @appear="appear(item.courseDetailsId,i)" <view class="swipers-items" @longpress="openBs()" @disappear="disappear(item.courseDetailsId,i)"
:style="boxStyle"> @appear="appear(item.courseDetailsId,i)" :style="boxStyle">
<!-- 视频 --> <!-- 视频 -->
<video :show-fullscreen-btn="false" @controlstoggle="controlstoggles" object-fit="contain" <video :show-fullscreen-btn="false" @controlstoggle="controlstoggles" object-fit="contain"
v-if="isShowVideo == item.courseDetailsId && item.videoUrl" :play-strategy="2" v-if="isShowVideo == item.courseDetailsId && item.videoUrl" :play-strategy="2"
:show-loading="true" codec="software" :muted="false" :show-center-play-btn="true" :loop="true" :show-loading="true" codec="software" :muted="false" :show-center-play-btn="true" :loop="true"
@timeupdate="timeupdate" @timeupdate="timeupdate" @play="videoPlay('myVideo'+item.courseDetailsId, item.courseDetailsId)"
@play="videoPlay('myVideo'+item.courseDetailsId, item.courseDetailsId)"
@ended="ended" :enable-progress-gesture="false" :poster="item.titleImg" @ended="ended" :enable-progress-gesture="false" :poster="item.titleImg"
:ref="'myVideo'+item.courseDetailsId" :id="'myVideo'+item.courseDetailsId" :src="item.videoUrl" :ref="'myVideo'+item.courseDetailsId" :id="'myVideo'+item.courseDetailsId" :src="item.videoUrl"
:autoplay="item.autoPlay" class="swipers-items-video"></video> :autoplay="item.autoPlay" class="swipers-items-video"></video>
@@ -18,7 +17,8 @@
mode="aspectFill"> mode="aspectFill">
</image> </image>
<!-- 返回图标 --> <!-- 返回图标 -->
<image v-if="showBack" src="../static/nvueIcon/backs.png" @click="goBack()" class="swipers-items-back" mode=""> <image v-if="showBack" src="../static/nvueIcon/backs.png" @click="goBack()"
class="swipers-items-back" mode="">
</image> </image>
<!-- 右边操作 --> <!-- 右边操作 -->
<view class="swipers-items-right" :style="rightTop" v-if="showControls"> <view class="swipers-items-right" :style="rightTop" v-if="showControls">
@@ -145,7 +145,8 @@
<image class="list-title-rs" src="../../static/images/me/closeIconss.png" mode=""></image> <image class="list-title-rs" src="../../static/images/me/closeIconss.png" mode=""></image>
</view> </view>
</view> </view>
<text class="" style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin: 20rpx 0; auto;text-align: left;width: 100%;"> <text class=""
style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin: 20rpx 0; auto;text-align: left;width: 100%;">
{{getRedEnvelopeTips}} {{getRedEnvelopeTips}}
</text> </text>
<view class="pay-content"> <view class="pay-content">
@@ -406,6 +407,10 @@
if (this.videoContext) { if (this.videoContext) {
this.videoContext.play() this.videoContext.play()
} }
const noBuyVideoIndex= uni.getStorageSync('noBuyVideoIndex')
if(noBuyVideoIndex!==null&&noBuyVideoIndex!==undefined){
this.noBuyVideoIndex=noBuyVideoIndex
}
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否' this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
let that = this let that = this
uni.$on('back', (data) => { uni.$on('back', (data) => {
@@ -1062,6 +1067,7 @@
this.countPrice = this.videoList[this.current].price this.countPrice = this.videoList[this.current].price
this.$refs.popupPya.open('bottom') this.$refs.popupPya.open('bottom')
this.noBuyVideoIndex = this.current this.noBuyVideoIndex = this.current
uni.setStorageSync('noBuyVideoIndex',this.current)
}, },
//关闭购买弹窗 //关闭购买弹窗
closePay() { closePay() {
@@ -1171,6 +1177,7 @@
this.$nextTick(() => { this.$nextTick(() => {
//播放当前的 //播放当前的
this.videoContext.play(); this.videoContext.play();
this.videoContext.playbackRate(this.subList[this.nowBs].num)
}) })
} else { //没有视频链接则表示没有权限,需要购买 弹出购买弹窗 } else { //没有视频链接则表示没有权限,需要购买 弹出购买弹窗
this.openPay() this.openPay()
@@ -1197,10 +1204,12 @@
}) })
}, },
async getCount() { async getCount() {
console.log('getCount')
const res = await this.$Request.getT('app/discSpinning/drawCount') const res = await this.$Request.getT('app/discSpinning/drawCount')
if (res.code == 0) { if (res.code == 0) {
this.freeNum = res.count || 0 this.freeNum = res.count || 0
} }
console.log(res);
return res return res
}, },
/** /**
@@ -1254,13 +1263,23 @@
} }
}) })
}) })
getCount
if(this.noBuyVideoIndex!==null){ if (this.noBuyVideoIndex !== null&& this.videoList[this
.noBuyVideoIndex].videoUrl) {
this.noBuyVideoIndex = null this.noBuyVideoIndex = null
uni.removeStorageSync('noBuyVideoIndex')
this.videoContext.stop() this.videoContext.stop()
httpsRequest.getT('app/discSpinning/drawCount').then(res => {
console.log('转盘抽奖次数')
console.log(res)
if (res.count >= 1) {
uni.navigateTo({ uni.navigateTo({
url: '/me/choujiang/choujiang' url: '/me/choujiang/choujiang'
}) })
}else{
this.videoContext.play();
}
})
} }
console.log('this.noBuyVideoIndex', this.noBuyVideoIndex) console.log('this.noBuyVideoIndex', this.noBuyVideoIndex)
@@ -1276,21 +1295,26 @@
console.log('this.noBuyVideoIndex', this.noBuyVideoIndex) console.log('this.noBuyVideoIndex', this.noBuyVideoIndex)
if (this.videoList[indexss].videoUrl) { //有播放权限 if (this.videoList[indexss].videoUrl) { //有播放权限
console.log('有播放权限进入是否抽取转盘判断')
let numIdCurr = this.videoList[indexss].courseDetailsId; let numIdCurr = this.videoList[indexss].courseDetailsId;
this.videoContextId = 'myVideo' + numIdCurr; this.videoContextId = 'myVideo' + numIdCurr;
this.videoContext = uni.createVideoContext(this this.videoContext = uni.createVideoContext(this
.videoContextId, .videoContextId,
this); this);
if(this.noBuyVideoIndex!=null&&this.videoList[this.noBuyVideoIndex].videoUrl){ if (this.noBuyVideoIndex != null && this.videoList[this
.noBuyVideoIndex].videoUrl) {
this.videoContext.stop(); this.videoContext.stop();
this.getCount(res).then(res=>{ httpsRequest.getT('app/discSpinning/drawCount').then(res => {
console.log('转盘抽奖次数')
if (res.count >= 1) { if (res.count >= 1) {
uni.navigateTo({ uni.navigateTo({
url: '/me/choujiang/choujiang' url: '/me/choujiang/choujiang'
}) })
}else{
this.videoContext.play();
} }
}) })
uni.removeStorageSync('noBuyVideoIndex')
this.noBuyVideoIndex = null this.noBuyVideoIndex = null
} else { } else {
this.videoContext.play(); this.videoContext.play();

View File

@@ -9,12 +9,15 @@
<view class="u-flex u-row-center"> <view class="u-flex u-row-center">
<u-image src="/me/static/invite/title.png" alt="" width="544rpx" mode="widthFix"></u-image> <u-image src="/me/static/invite/title.png" alt="" width="544rpx" mode="widthFix"></u-image>
</view> </view>
<view class="u-m-t-24 color-fff u-font-28 u-text-left " <view class="u-flex u-row-right" style="padding-right:70rpx;">
<u-image src="/me/static/invite/rule.png" alt="" width="400rpx" mode="widthFix"></u-image>
</view>
<!-- <view class="u-m-t-24 color-fff u-font-28 u-text-left "
style=" padding-left: 248rpx;text-shadow: 0 0 10px #000;"> style=" padding-left: 248rpx;text-shadow: 0 0 10px #000;">
<view>好友首次签到成功送1元现金红包</view> <view>好友首次签到成功送1元现金红包</view>
<view>满15人签到额外送9.9元红包</view> <view>满15人签到额外送9.9元红包</view>
<view>满99人签到额外送100元红包</view> <view>满99人签到额外送100元红包</view>
</view> </view> -->
</view> </view>
</view> </view>
@@ -71,11 +74,11 @@
<view class="">签到</view> <view class="">签到</view>
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{inviteSignCount}}</text></view> <view class="text-red u-m-t-16 "><text class=" u-font-40">{{inviteSignCount}}</text></view>
</view> </view>
<view> <view @click="toGold">
<view class="">金币收益</view> <view class="">金币收益</view>
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{earning.inviteGoldMoney}}</text></view> <view class="text-red u-m-t-16 "><text class=" u-font-40">{{earning.inviteGoldMoney}}</text></view>
</view> </view>
<view> <view @click="toPack">
<view class="">红包收益</view> <view class="">红包收益</view>
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{earning.inviteMoney}}</text></view> <view class="text-red u-m-t-16 "><text class=" u-font-40">{{earning.inviteMoney}}</text></view>
</view> </view>
@@ -258,6 +261,16 @@
// #endif // #endif
}, },
methods: { methods: {
toGold(){
uni.navigateTo({
url:'/me/invite/moneyList?moneyType=2'
})
},
toPack(){
uni.navigateTo({
url:'/me/invite/moneyList?moneyType=1'
})
},
//获取用户分销比例 //获取用户分销比例
getUserInfoBl() { getUserInfoBl() {
this.$Request.getT('/app/user/selectUserById').then(res => { this.$Request.getT('/app/user/selectUserById').then(res => {
@@ -793,7 +806,7 @@
.invite-box { .invite-box {
position: relative; position: relative;
margin-top: -280rpx; margin-top: -240rpx;
background-color: #fff; background-color: #fff;
border-radius: 16rpx 16rpx 16rpx 16rpx; border-radius: 16rpx 16rpx 16rpx 16rpx;
margin-left: 28rpx; margin-left: 28rpx;

BIN
me/static/invite/rule.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 KiB

After

Width:  |  Height:  |  Size: 385 KiB

View File

@@ -5,7 +5,7 @@
<u-navbar :background="background" height="60" :is-back="false" :title="title" :border-bottom="false"> <u-navbar :background="background" height="60" :is-back="false" :title="title" :border-bottom="false">
<!-- #endif --> <!-- #endif -->
<!-- #ifndef H5 --> <!-- #ifndef H5 -->
<u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"> <u-navbar height="60" :background="background" :is-back="false" :title="title" :border-bottom="false">
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-TOUTIAO --> <!-- #ifdef MP-TOUTIAO -->
<view :style="{marginTop:barHeight/2+'px'}" class="nvavBar flex" style="padding-left: 80rpx;"> <view :style="{marginTop:barHeight/2+'px'}" class="nvavBar flex" style="padding-left: 80rpx;">
@@ -32,7 +32,7 @@
</view> </view>
</u-navbar> </u-navbar>
<view class="bgColorTop"> <view class="bgColorTop">
<view v-if="homeTypeSel != '否'" class="topTabs flex align-center justify-center"> <!-- <view v-if="homeTypeSel != '否'" class="topTabs flex align-center justify-center">
<view class="topTabs-box"> <view class="topTabs-box">
<scroll-view class="topTabs-box-H" scroll-x="true"> <scroll-view class="topTabs-box-H" scroll-x="true">
<view class="topTabs-box-H-item" @tap="typeSel(index)" <view class="topTabs-box-H-item" @tap="typeSel(index)"
@@ -41,7 +41,7 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view> -->
<!-- 轮播图 --> <!-- 轮播图 -->
<view v-if="TabCur == 0" class="swipers flex align-center justify-center"> <view v-if="TabCur == 0" class="swipers flex align-center justify-center">
<view class="swipers-box"> <view class="swipers-box">
@@ -176,8 +176,7 @@
<!-- <drag-button v-if="shodrag && shodrags" @clickClose="clickClose" :videoInfo="videoInfo" :isDock="true" <!-- <drag-button v-if="shodrag && shodrags" @clickClose="clickClose" :videoInfo="videoInfo" :isDock="true"
:existTabBar="true" @btnClick="btnClick" /> --> :existTabBar="true" @btnClick="btnClick" /> -->
<u-image @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/images/draw/draw.gif`" <u-image @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/images/draw/draw.gif`"
style="width: 150rpx;height: 150rpx;position: fixed;right: 30rpx;bottom: 180rpx;" style="width: 150rpx;height: 150rpx;position: fixed;right: 30rpx;bottom: 180rpx;"></u-image>
></u-image>
</view> </view>
</template> </template>
@@ -226,7 +225,7 @@
xxJDNum: 0, xxJDNum: 0,
typeList: [], typeList: [],
TabCur: 0, TabCur: 0,
homeTypeSel: '否', homeTypeSel: '否', //否
barWidth: 0, //胶囊宽度 barWidth: 0, //胶囊宽度
barHeight: 0, //胶囊高度 barHeight: 0, //胶囊高度
rmVideList: [], //热门视频 rmVideList: [], //热门视频