This commit is contained in:
GaoHao 2024-12-24 17:47:16 +08:00
commit 70594ec8cb
4 changed files with 60 additions and 72 deletions

View File

@ -41,8 +41,8 @@
<!-- #endif -->
<!-- :autoplay="item.autoPlay" -->
<!-- 没有视频权限则显示封面图 -->
<image v-else @click="openShowPay(current,index,item.videoUrl);showControls = true"
:src="item.titleImg" class="swipers-items-imgsbg" mode="aspectFill"></image>
<image v-else @click="openShowPay(current,index,item.videoUrl);showControls = true" :src="item.titleImg"
class="swipers-items-imgsbg" mode="aspectFill"></image>
<!-- 返回图标 -->
<!-- #ifndef MP-TOUTIAO -->
<view @click.stop="goBack()" style="color: #ffffff;">
@ -199,18 +199,6 @@
{{getRedEnvelopeTips}}
</view>
<view class="list-item" v-if="info&&info.price">
<view class="list-item-box flex align-center justify-center" @click="payVideo(2,'all')">
<image src="../../static/images/me/rmIcon.png" mode=""></image>
{{info.price}}元解锁全剧
</view>
</view>
<view class="list-item" v-if="info&&info.wholesalePrice">
<view class="list-item-box flex align-center justify-center" @click="payVideo(2,10)">
<image src="../../static/images/me/rmIcon.png" mode=""></image>
{{info.wholesalePrice}}元解锁10集视频
</view>
</view>
<view class="list-item" v-if="zhengbu === '是' && isWxIosPay == true">
<view class="list-item-box flex align-center justify-center" @click="payVideo(1)">
<image src="../../static/images/me/rmIcon.png" mode=""></image>
@ -1268,11 +1256,10 @@
},
/**
* @param {Object} type 类型
* @param {Object} num 集数
* 1:购买整部视频
* 2:购买单集视频
*/
payVideo(type, num) {
payVideo(type) {
if (uni.getStorageSync('token')) {
// #ifdef MP-TOUTIAO
if (!this.checked) {
@ -1283,7 +1270,7 @@
return
}
// #endif
this.submitPay(type, num)
this.submitPay(type)
} else {
uni.navigateTo({
url: "/pages/login/login"
@ -1313,15 +1300,13 @@
this.showMoney = data
},
//使
submitPay(type, num) {
submitPay(type) {
let data = {
courseId: this.courseId
}
if(!num){
//
data.courseDetailsId = this.videoList[this.current].courseDetailsId
}
this.$Request.getT((num && num == 10)?'/app/order/insertCourseOrders/limit10': '/app/order/insertCourseOrders', data).then(res => {
this.$Request.getT('/app/order/insertCourseOrders', data).then(res => {
if (res.code == 0) {
this.ordersId = res.data.orders.ordersId //id
this.payMoney = res.data.orders.payMoney //
@ -1921,15 +1906,21 @@
},
//
videoPlay(videoId) {
this.$Request.getT('app/course/viewCourse', {
console.log(courseDetailsId)
console.log(this.playFlag)
// this.courseDetailsId = courseDetailsId
if (!this.playFlag) {
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,true);
this.playFlag = true
httpsRequest.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: this.courseDetailsId,
courseDetailsId: courseDetailsId,
type: 'start'
}).then(res => {
this.playFlag = true
console.log('播放开始')
})
}
},
//
ended() {

View File

@ -35,7 +35,6 @@
return {
query: {
discSpinningRecordId: null,
source: 1,
phone: "",
address: "",
remark: "",
@ -47,9 +46,7 @@
if ( options.id ) {
this.query.discSpinningRecordId = options.id
}
if ( options.source ) {
this.query.source = options.source
}
},
methods: {

View File

@ -12,16 +12,17 @@
>{{item.label}}</view>
</view>
<view class="item" v-for="(item,index) in list" :key="index">
<view class="color-666 u-font-24">中奖时间 2024-09-11 10:20:11</view>
<view class="color-666 u-font-24">{{tabIndex==1?'中奖时间':'兑换时间'}} {{item.createTime}}</view>
<view class="u-m-t-24 u-flex u-row-between">
<view class="u-flex-1 u-flex u-col-top">
<u-image width="128rpx" height="128rpx" src="/static/red-pack.png"></u-image>
<!-- <u-image width="128rpx" height="128rpx" src="/static/red-pack.png"></u-image> -->
<view class="u-m-l-16">
<view>大额红包</view>
<view class="color-999 u-font-24 u-m-t-16">×1</view>
<view v-if="tabIndex == 1">{{item.name}}</view>
<view v-else>{{item.prizeName}}</view>
<view v-if="tabIndex == 1" class="color-999 u-font-24 u-m-t-16">×{{item.number}}</view>
</view>
</view>
<view class="">
<view class="" v-if="tabIndex==1&&item.targetId&&item.type==3">
<view class="btn-circle duihuan" @click="toDuiHuan(item)">立即兑换</view>
<!-- <view class="btn-circle duihuan finish">已完成</view> -->
</view>
@ -47,9 +48,8 @@
tab: [{label: '抽奖记录', type: 1},{label: '兑换记录', type: 2}],
tabIndex: 1,
query: {
page: 10,
limit: 1,
source: 1,
page: 1,
limit: 10,
},
total: 0,
status: 'nomore',
@ -58,17 +58,16 @@
}
},
onLoad(options) {
if ( options.source ) {
this.query.source = options.source
}
},
onShow() {
this.list = [];
this.getList()
},
methods: {
toDuiHuan(item){
uni.navigateTo({
url:`/me/gift/duihuan?source=${this.query.source}&id=${item.id}`
url:`/me/gift/duihuan?id=${item.id}`
})
},
tabClick(item){
@ -86,18 +85,20 @@
this.$Request.getT(url, this.query).then(res => {
if (res.code == 0 ) {
if ( this.tabIndex == 1) {
this.list = res.data.records
this.list = [...this.list,...res.data.records]
this.total = res.data.total
} else {
this.list = res.page.list
this.list = [...this.list,...res.page.list]
this.total = res.page.totalCount
}
}
})
},
onReachBottom: function () {
if (this.page * this.limit < this.total) {
this.page = this.page + 1;
console.log(this.query.page)
console.log(this.query.limit)
if (this.query.page * this.query.limit < this.total) {
this.query.page = this.query.page + 1;
this.getList();
}
},

View File

@ -229,8 +229,7 @@
if (item.jumpType == 0) {
if (item.buttonTitle.indexOf("领取") != -1) {
this.taskReceive(item.id)
}
if (item.buttonTitle.indexOf("观看视频") != -1) {
} else if (item.buttonTitle.indexOf("观看视频") != -1) {
// 广
this.urlCallback = {
userId: uni.getStorageSync('userId'),