Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test
This commit is contained in:
commit
da79e53e70
|
|
@ -1,10 +1,10 @@
|
|||
const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; //
|
||||
const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
||||
// const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; //
|
||||
// const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
||||
|
||||
// const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
||||
// const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
// const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
|
||||
const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
||||
const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
|
||||
|
||||
module.exports = {
|
||||
APIHOST: ROOTPATH,
|
||||
|
|
|
|||
|
|
@ -146,13 +146,13 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="pay-content">
|
||||
<!-- <view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'">
|
||||
<view class="pay-content-item" @click="payVideo(1)">
|
||||
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||
<text class="pay-content-items">
|
||||
{{zongPrice}}金币解锁整部视频
|
||||
{{countPrice*scale}}金币解锁整部视频
|
||||
</text>
|
||||
</view> -->
|
||||
<view class="pay-content-item" @click="payVideo(2)" v-if="danbu === '是'">
|
||||
</view>
|
||||
<view class="pay-content-item" @click="payVideo(2)">
|
||||
<text class="pay-content-items">
|
||||
{{countPrice}}元解锁单集视频
|
||||
</text>
|
||||
|
|
@ -384,7 +384,9 @@
|
|||
},
|
||||
isShowVideo: '',
|
||||
noBuyVideoIndex:null,
|
||||
playFlag: false
|
||||
playFlag: false,
|
||||
getRedEnvelopeTips: '',
|
||||
scale: 1,
|
||||
};
|
||||
},
|
||||
onUnload() {
|
||||
|
|
@ -476,6 +478,13 @@
|
|||
if(this.courseId){
|
||||
this.getDataList(this.courseId, this.courseDetailsId);
|
||||
}
|
||||
httpsRequest.getT('app/course/getRedEnvelopeTips').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 0) {
|
||||
this.getRedEnvelopeTips= res.data
|
||||
}
|
||||
})
|
||||
this.getScale()
|
||||
},
|
||||
onLoad(e) {
|
||||
//是开启整部购买
|
||||
|
|
@ -499,6 +508,7 @@
|
|||
this.boxStyle.height = this.wHeight + 5;
|
||||
// 记录跳转过来的视频总id跟单集id
|
||||
if (e.id) {
|
||||
console.log(e)
|
||||
this.courseId = e.id;
|
||||
if (e.courseDetailsId && e.courseDetailsId != 'null') {
|
||||
this.courseDetailsId = e.courseDetailsId
|
||||
|
|
@ -507,8 +517,19 @@
|
|||
this.getMoneyList()
|
||||
this.getMyMoney()
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取金币比例
|
||||
*/
|
||||
getScale () {
|
||||
httpsRequest.getT("app/common/type/914", {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.scale = Number(res.data.value)
|
||||
}
|
||||
});
|
||||
},
|
||||
//播放时的回掉
|
||||
videoPlay(videoId,courseDetailsId) {
|
||||
this.courseDetailsId = courseDetailsId
|
||||
|
|
@ -917,17 +938,23 @@
|
|||
let data = {
|
||||
courseId: this.courseId
|
||||
}
|
||||
if (type != 1) { //购买单集
|
||||
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||
}
|
||||
|
||||
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||
httpsRequest.getT('/app/order/insertCourseOrders', data).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.ordersId = res.data.orders.ordersId //记录订单id
|
||||
this.payMoney = res.data.orders.payMoney //记录订单价格
|
||||
|
||||
this.closePay() //关闭购买选择弹窗
|
||||
this.payPrice = res.data.orders.payMoney //需要支付的价格
|
||||
this.openPopusPay() //显示充值弹窗
|
||||
if (type == 1) { //金币
|
||||
this.showPay = false
|
||||
this.showMoney = false
|
||||
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
|
||||
} else if(type == 2){ //支付宝
|
||||
this.closePay() //关闭购买选择弹窗
|
||||
this.payPrice = res.data.orders.payMoney //需要支付的价格
|
||||
this.openPopusPay() //显示充值弹窗
|
||||
}
|
||||
|
||||
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
|
@ -952,6 +979,7 @@
|
|||
this.closePay()
|
||||
that.showPay = false
|
||||
that.showMoney = false
|
||||
that.noBuyVideoIndex = null
|
||||
setTimeout(() => {
|
||||
that.getDataList(that.courseId, that.videoList[that.current].courseDetailsId,
|
||||
true);
|
||||
|
|
@ -966,12 +994,11 @@
|
|||
},
|
||||
//打开购买弹窗
|
||||
openPay() {
|
||||
//获取总价跟单集价格
|
||||
|
||||
this.zongPrice = this.info.price
|
||||
this.countPrice = this.videoList[this.current].price
|
||||
this.$refs.popupPya.open('bottom')
|
||||
this.noBuyVideoIndex=this.current
|
||||
console.log(this.noBuyVideoIndex)
|
||||
},
|
||||
//关闭购买弹窗
|
||||
closePay() {
|
||||
|
|
@ -1100,14 +1127,15 @@
|
|||
},
|
||||
//滚动到指定位置
|
||||
goListPosition(courseDetailsId) {
|
||||
let _this = this;
|
||||
this.$nextTick(() => {
|
||||
console.log(courseDetailsId, '开始移动了')
|
||||
const el = this.$refs['list' + courseDetailsId][0]
|
||||
const el = _this.$refs['list' + courseDetailsId][0]
|
||||
listDom.scrollToElement(el, {
|
||||
animated: false
|
||||
})
|
||||
this.$forceUpdate()
|
||||
console.log(el, '移动结束')
|
||||
_this.$forceUpdate()
|
||||
console.log('移动结束',el)
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
|
@ -1129,6 +1157,7 @@
|
|||
const indexs = arr.findIndex(menu => menu.courseDetailsId ===
|
||||
Number(courseDetailsId));
|
||||
this.current = indexs
|
||||
console.log(this.current)
|
||||
this.scrollIntoView = 'video' + indexs
|
||||
arr.map((item, index) => {
|
||||
item.num = index + 1;
|
||||
|
|
@ -1141,6 +1170,7 @@
|
|||
});
|
||||
//菜单数组
|
||||
this.meunList = arr;
|
||||
console.log(type)
|
||||
if (type == true) { //购买视频后返回的
|
||||
console.log('购买视频后返回的')
|
||||
let courseDetailsIds = this.videoList[this.current].courseDetailsId;
|
||||
|
|
@ -1158,7 +1188,7 @@
|
|||
}
|
||||
})
|
||||
})
|
||||
if(this.noBuyVideoIndex!==null&&this.noBuyVideoIndex==indexss){
|
||||
if(this.noBuyVideoIndex!==null&&this.noBuyVideoIndex==indexs){
|
||||
this.noBuyVideoIndex=null
|
||||
return uni.navigateTo({
|
||||
url:'/me/choujiang/choujiang?orderId'+2144
|
||||
|
|
|
|||
|
|
@ -196,21 +196,15 @@
|
|||
</view>
|
||||
<view class="" style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin-bottom: 20rpx;">{{getRedEnvelopeTips}}</view>
|
||||
|
||||
<!-- <view class="list-item" v-if="zhengbu === '是' && isWxIosPay == true">
|
||||
<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>
|
||||
{{zongPrice}}金豆解锁整部视频
|
||||
#ifdef MP-TOUTIAO || MP-WEIXIN-->
|
||||
<!-- (解锁后永久有效) -->
|
||||
<!-- #endif
|
||||
{{countPrice*scale}}金币解锁单集视频
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="list-item" v-if="danbu === '是' && isWxIosPay == true">
|
||||
<view class="list-item-box" @click="payVideo(2)">
|
||||
{{countPrice}}元解锁单集视频
|
||||
<!-- #ifdef MP-TOUTIAO || MP-WEIXIN-->
|
||||
(解锁后永久有效)
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="list-item" v-if="isVips == '是' && isWxIosPay == true">
|
||||
|
|
@ -429,7 +423,8 @@
|
|||
countPrice: 0, //单集价格
|
||||
isWxIosPay: true,
|
||||
playFlag: false,
|
||||
getRedEnvelopeTips: ''
|
||||
getRedEnvelopeTips: '',
|
||||
scale: 1,
|
||||
};
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
|
|
@ -693,6 +688,7 @@
|
|||
// that.getDataList(that.courseId, that.courseDetailsId, true);
|
||||
// }
|
||||
// })
|
||||
this.getScale()
|
||||
},
|
||||
onReady() {
|
||||
// #ifdef MP-WEIXIN || MP-KUAISHOU
|
||||
|
|
@ -740,6 +736,16 @@
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取金币比例
|
||||
*/
|
||||
getScale () {
|
||||
this.$Request.getT("app/common/type/914", {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.scale = Number(res.data.value)
|
||||
}
|
||||
});
|
||||
},
|
||||
onDone(index) {
|
||||
const prize = this.prizeList[index]
|
||||
uni.showModal({
|
||||
|
|
@ -1209,18 +1215,23 @@
|
|||
let data = {
|
||||
courseId: this.courseId
|
||||
}
|
||||
if (type != 1) { //购买单集
|
||||
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||
}
|
||||
|
||||
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||
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 //记录订单价格
|
||||
|
||||
this.showPay = false //关闭购买选择弹窗
|
||||
this.payPrice = res.data.orders.payMoney //需要支付的价格
|
||||
this.showMoney = true //显示充值弹窗
|
||||
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
|
||||
console.log(type)
|
||||
if (type == 1) { //金币
|
||||
this.showPay = false
|
||||
this.showMoney = false
|
||||
this.payOrder(this.courseId, this.videoList[this.current].courseDetailsId);
|
||||
} else if(type == 2){ //支付宝
|
||||
this.showPay = false //关闭购买选择弹窗
|
||||
this.payPrice = res.data.orders.payMoney //需要支付的价格
|
||||
this.showMoney = true //显示充值弹窗
|
||||
}
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
|
|
@ -1237,11 +1248,12 @@
|
|||
if (res.code == 0) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '已解锁,支付' + payMoney + '金豆',
|
||||
title: '已解锁,支付' + payMoney + '金币',
|
||||
icon: 'none'
|
||||
})
|
||||
that.showPay = false
|
||||
that.showMoney = false
|
||||
that.noBuyVideoIndex = null
|
||||
setTimeout(() => {
|
||||
that.getDataList(that.courseId, that.videoList[that.current].courseDetailsId,
|
||||
true);
|
||||
|
|
|
|||
|
|
@ -147,13 +147,13 @@
|
|||
{{getRedEnvelopeTips}}
|
||||
</text>
|
||||
<view class="pay-content">
|
||||
<!-- <view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'">
|
||||
<view class="pay-content-item" @click="payVideo(1)">
|
||||
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||
<text class="pay-content-items">
|
||||
{{zongPrice}}金豆解锁整部视频
|
||||
{{countPrice*scale}}金币解锁整部视频
|
||||
</text>
|
||||
</view> -->
|
||||
<view class="pay-content-item" @click="payVideo(2)" v-if="danbu === '是'">
|
||||
</view>
|
||||
<view class="pay-content-item" @click="payVideo(2)">
|
||||
<text class="pay-content-items">
|
||||
{{countPrice}}元解锁单集视频
|
||||
</text>
|
||||
|
|
@ -365,6 +365,7 @@
|
|||
isCollect: false,
|
||||
playFlag: false,
|
||||
getRedEnvelopeTips: ''
|
||||
scale: 1,
|
||||
|
||||
};
|
||||
},
|
||||
|
|
@ -474,6 +475,8 @@
|
|||
this.getRedEnvelopeTips= res.data
|
||||
}
|
||||
})
|
||||
this.getScale()
|
||||
|
||||
},
|
||||
onLoad(e) {
|
||||
let that = this
|
||||
|
|
@ -504,6 +507,16 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取金币比例
|
||||
*/
|
||||
getScale () {
|
||||
httpsRequest.getT("app/common/type/914", {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.scale = Number(res.data.value)
|
||||
}
|
||||
});
|
||||
},
|
||||
//播放时的回掉
|
||||
videoPlay(videoId,courseDetailsId) {
|
||||
this.courseDetailsId = courseDetailsId
|
||||
|
|
@ -915,17 +928,23 @@
|
|||
let data = {
|
||||
courseId: this.courseId
|
||||
}
|
||||
if (type != 1) { //购买单集
|
||||
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||
}
|
||||
|
||||
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||
httpsRequest.getT('/app/order/insertCourseOrders', data).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.ordersId = res.data.orders.ordersId //记录订单id
|
||||
this.payMoney = res.data.orders.payMoney //记录订单价格
|
||||
|
||||
this.closePay() //关闭购买选择弹窗
|
||||
this.payPrice = res.data.orders.payMoney //需要支付的价格
|
||||
this.openPopusPay() //显示充值弹窗
|
||||
if (type == 1) { //金币
|
||||
this.showPay = false
|
||||
this.showMoney = false
|
||||
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
|
||||
} else if(type == 2){ //支付宝
|
||||
this.closePay() //关闭购买选择弹窗
|
||||
this.payPrice = res.data.orders.payMoney //需要支付的价格
|
||||
this.openPopusPay() //显示充值弹窗
|
||||
}
|
||||
|
||||
|
||||
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
|
||||
} else {
|
||||
|
|
@ -944,13 +963,15 @@
|
|||
if (res.code == 0) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '已解锁,支付' + payMoney + '金豆',
|
||||
title: '已解锁,支付' + payMoney + '金币',
|
||||
icon: 'none'
|
||||
})
|
||||
this.closePopusPay()
|
||||
this.closePay()
|
||||
that.showPay = false
|
||||
that.showMoney = false
|
||||
that.noBuyVideoIndex = null
|
||||
|
||||
setTimeout(() => {
|
||||
that.getDataList(that.courseId, that.videoList[that.current].courseDetailsId,
|
||||
true);
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@
|
|||
<drag-button v-if="shodrag && shodrags" @clickClose="clickClose" :videoInfo="videoInfo" :isDock="true"
|
||||
:existTabBar="true" @btnClick="btnClick" />
|
||||
<u-image @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/images/draw/draw.gif`"
|
||||
style="width: 110rpx;height: 110rpx;position: fixed;right: 30rpx;bottom: 180rpx;"
|
||||
style="width: 150rpx;height: 150rpx;position: fixed;right: 30rpx;bottom: 180rpx;"
|
||||
></u-image>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue