This commit is contained in:
GaoHao
2024-12-30 19:31:42 +08:00
7 changed files with 40 additions and 40 deletions

View File

@@ -16,9 +16,9 @@ const ROOTPATH1 = "https://web-api.hnsiyao.cn/czg/"; //
const ROOTPATH = "https://web-api.hnsiyao.cn/czg/"; //后台服务域名 const ROOTPATH = "https://web-api.hnsiyao.cn/czg/"; //后台服务域名
const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名 const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = "http://192.168.1.5:8100/czg/"; // // const ROOTPATH1 = "http://192.168.1.41:8100/czg/"; //
// const ROOTPATH = "http://192.168.1.5:8100/czg/"; //后台服务域名 // const ROOTPATH = "http://192.168.1.41:8100/czg/"; //后台服务域名
// const ROOTPATH2 = "http://192.168.1.5:8100"; //后台服务域名 // const ROOTPATH2 = "http://192.168.1.41:8100"; //后台服务域名
module.exports = { module.exports = {
APIHOST: ROOTPATH, APIHOST: ROOTPATH,

View File

@@ -39,7 +39,6 @@ const install = (Vue, vm) => {
// 响应拦截,判断状态码是否通过 // 响应拦截,判断状态码是否通过
Vue.prototype.$u.http.interceptor.response = (res) => { Vue.prototype.$u.http.interceptor.response = (res) => {
console.log(res);
if (res.code == 0) { if (res.code == 0) {
// res为服务端返回值可能有coderesult等字段 // res为服务端返回值可能有coderesult等字段
// 这里对res.result进行返回将会在this.$u.post(url).then(res => {})的then回调中的res的到 // 这里对res.result进行返回将会在this.$u.post(url).then(res => {})的then回调中的res的到

View File

@@ -371,7 +371,7 @@
num: 1, //当前播放的集数 num: 1, //当前播放的集数
showPay: false, //购买视频的弹窗 showPay: false, //购买视频的弹窗
info: {}, //整部的信息 info: {}, //整部的信息
courseDetailsId: '', //详情id courseDetailsId: null, //详情id
scrollIntoView: '', //当前播放视频的位置 scrollIntoView: '', //当前播放视频的位置
scrollIntoViews: 'video0', //当前播放视频的位置 scrollIntoViews: 'video0', //当前播放视频的位置
isVips: '否', //是否显示会员 isVips: '否', //是否显示会员
@@ -536,10 +536,7 @@
// 记录跳转过来的视频总id跟单集id // 记录跳转过来的视频总id跟单集id
if (e.id) { if (e.id) {
this.courseId = e.id; this.courseId = e.id;
if (e.courseDetailsId && e.courseDetailsId != 'null') {
this.courseDetailsId = e.courseDetailsId
}
console.log(this.courseDetailsId)
// this.getMyLoveStatus() // this.getMyLoveStatus()
this.getMoneyList() this.getMoneyList()
this.getMyMoney() this.getMyMoney()
@@ -548,9 +545,7 @@
if (e.allId) { if (e.allId) {
const arr = e.allId.split('-') const arr = e.allId.split('-')
this.courseId = arr[0]; this.courseId = arr[0];
if (arr[1] && arr[1] != 'null') {
this.courseDetailsId = arr[1]
}
// this.getMyLoveStatus() // this.getMyLoveStatus()
this.getMoneyList() this.getMoneyList()
this.getMyMoney() this.getMyMoney()
@@ -1075,15 +1070,12 @@
//单集解锁 //单集解锁
data.courseDetailsId = this.videoList[this.current].courseDetailsId data.courseDetailsId = this.videoList[this.current].courseDetailsId
} }
console.log(this.videoList[this.current].courseDetailsId)
console.log((num && num == 10) ? '/app/order/insertCourseOrders/limit10' :
'/app/order/insertCourseOrders')
httpsRequest.getT((num && num == 10) ? '/app/order/insertCourseOrders/limit10' : httpsRequest.getT((num && num == 10) ? '/app/order/insertCourseOrders/limit10' :
'/app/order/insertCourseOrders', data).then(res => { '/app/order/insertCourseOrders', data).then(res => {
console.log(res) console.log(res)
if (res.code == 0) { if (res.code == 0) {
console.log(res.status && res.status == 1)
if (res.status && res.status == 1) { if (res.status && res.status == 1) {
this.showPay = false //关闭购买选择弹窗 this.showPay = false //关闭购买选择弹窗
this.isOrder = true this.isOrder = true
@@ -1321,6 +1313,7 @@
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : '' token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
}; };
console.log("getDataList==="+courseDetailsId) console.log("getDataList==="+courseDetailsId)
console.log("getDataList===",data)
httpsRequest.getT('/app/course/selectCourseDetailsById', data).then(res => { httpsRequest.getT('/app/course/selectCourseDetailsById', data).then(res => {
if (res.code == 0) { if (res.code == 0) {
@@ -1330,6 +1323,11 @@
} else { } else {
this.isCollect = false this.isCollect = false
} }
if( res.data && res.data.courseDetailsId && !this.courseDetailsId && !courseDetailsId) {
this.courseDetailsId = res.data.courseDetailsId
courseDetailsId = res.data.courseDetailsId
}
if (res.data.listsDetail) { if (res.data.listsDetail) {
this.info = res.data; this.info = res.data;
this.title = this.info.title; this.title = this.info.title;

View File

@@ -419,7 +419,7 @@
num: 1, //当前播放的集数 num: 1, //当前播放的集数
showPay: false, //购买视频的弹窗 showPay: false, //购买视频的弹窗
info: {}, //整部的信息 info: {}, //整部的信息
courseDetailsId: '', //详情id courseDetailsId: null, //详情id
scrollIntoView: '', //当前播放视频的位置 scrollIntoView: '', //当前播放视频的位置
scrollIntoViews: 'video0', //当前播放视频的位置 scrollIntoViews: 'video0', //当前播放视频的位置
isVips: '否', //是否显示会员 isVips: '否', //是否显示会员
@@ -600,10 +600,6 @@
} }
if (e.id) { if (e.id) {
this.courseId = e.id this.courseId = e.id
if (e.courseDetailsId && e.courseDetailsId != 'null') {
this.courseDetailsId = e.courseDetailsId
}
console.log(this.courseDetailsId, '跳转进来的id')
// this.getMyLoveStatus() // this.getMyLoveStatus()
} }
if (e.tt_album_id) { if (e.tt_album_id) {
@@ -1334,27 +1330,32 @@
this.$Request.getT((num && num == 10) ? '/app/order/insertCourseOrders/limit10' : this.$Request.getT((num && num == 10) ? '/app/order/insertCourseOrders/limit10' :
'/app/order/insertCourseOrders', data).then(res => { '/app/order/insertCourseOrders', data).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
if (type == 1) { //金币
// this.showPay = false
// this.showMoney = false
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney);
} else if (type == 2) { //支付宝
this.showPay = false //关闭购买选择弹窗
this.isOrder = true
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.showMoney = true //显示充值弹窗
}
} else {
this.isOrder = true
if ( res.status && res.status == 1) { if ( res.status && res.status == 1) {
this.showPay = false //关闭购买选择弹窗 this.showPay = false //关闭购买选择弹窗
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId, this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,
true); true);
return; return;
} else {
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
if (type == 1) { //金币
// this.showPay = false
// this.showMoney = false
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney);
} else if (type == 2) { //支付宝
this.showPay = false //关闭购买选择弹窗
this.isOrder = true
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.showMoney = true //显示充值弹窗
}
} }
} else {
this.isOrder = true
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'
@@ -1552,6 +1553,10 @@
this.dyCourseId = "" + res.data.dyCourseId; this.dyCourseId = "" + res.data.dyCourseId;
console.log("dyCourseId__" + this.dyCourseId) console.log("dyCourseId__" + this.dyCourseId)
} }
if( res.data && res.data.courseDetailsId && !this.courseDetailsId && !courseDetailsId) {
this.courseDetailsId = res.data.courseDetailsId
courseDetailsId = res.data.courseDetailsId
}
if (res.data && res.data.isCollect && res.data.isCollect > 0) { if (res.data && res.data.isCollect && res.data.isCollect > 0) {
this.isCollect = true this.isCollect = true
} else { } else {

View File

@@ -111,7 +111,7 @@
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '加载中...'
}) })
this.$u.post('/app/message/insertMessage', { this.$u.post('app/message/sendMessage', {
title: this.sendDate.contact, title: this.sendDate.contact,
content: JSON.stringify(this.sendDate), content: JSON.stringify(this.sendDate),
state: 2 state: 2

View File

@@ -983,7 +983,6 @@
state: 1 state: 1
} }
this.$u.api.msg(data).then(res => { this.$u.api.msg(data).then(res => {
console.log(res)
if (res.code == 0) { if (res.code == 0) {
this.notice = res.data.list this.notice = res.data.list
res.data.list.forEach(res => { res.data.list.forEach(res => {

View File

@@ -25,7 +25,6 @@ class Request {
options.params = options.params || {}; options.params = options.params || {};
options.header = Object.assign({}, this.config.header, options.header); options.header = Object.assign({}, this.config.header, options.header);
options.method = options.method || this.config.method; options.method = options.method || this.config.method;
console.log(options);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
options.complete = (response) => { options.complete = (response) => {
// 请求返回后隐藏loading(如果请求返回快的话可能会没有loading) // 请求返回后隐藏loading(如果请求返回快的话可能会没有loading)