修改未登录可以看两级的功能
This commit is contained in:
parent
6284515bad
commit
9fb3e0e16c
|
|
@ -1,6 +1,6 @@
|
||||||
// const ROOTPATH1 = "https://dj-api.hnsiyao.cn/czg"; //
|
const ROOTPATH1 = "https://dj-api.hnsiyao.cn/czg"; //
|
||||||
// const ROOTPATH = "https://dj-api.hnsiyao.cn/czg"; //后台服务域名
|
const ROOTPATH = "https://dj-api.hnsiyao.cn/czg"; //后台服务域名
|
||||||
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
||||||
|
|
||||||
// const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
// const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
||||||
// const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
// const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||||
|
|
@ -13,9 +13,9 @@
|
||||||
// const ROOTPATH1 = "http://192.168.1.41:8100/czg"; //
|
// const ROOTPATH1 = "http://192.168.1.41:8100/czg"; //
|
||||||
// const ROOTPATH = "http://192.168.1.41:8100/czg"; //后台服务域名
|
// const ROOTPATH = "http://192.168.1.41:8100/czg"; //后台服务域名
|
||||||
// 测试
|
// 测试
|
||||||
const ROOTPATH1 = "https://web-api.hnsiyao.cn/czg"; //
|
// 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"; //后台服务域名
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
||||||
|
|
@ -61,9 +61,20 @@ const install = (Vue, vm) => {
|
||||||
|
|
||||||
let help = (params = {}) => vm.$u.get('app/helpWord/selectHelpList', params); //帮助中心
|
let help = (params = {}) => vm.$u.get('app/helpWord/selectHelpList', params); //帮助中心
|
||||||
let helpDet = (params = {}) => vm.$u.get('app/helpWord/selectHelpWordDetails', params); //帮助中心 详情
|
let helpDet = (params = {}) => vm.$u.get('app/helpWord/selectHelpWordDetails', params); //帮助中心 详情
|
||||||
|
|
||||||
//获取视频
|
//获取视频
|
||||||
let selectCourseDetailsById = (params = {}) => vm.$u.get('app/course/selectCourseDetailsById', params);
|
let selectCourseDetailsById = (params = {}) => {
|
||||||
|
let obj = {}
|
||||||
|
if (params.token) {
|
||||||
|
obj = params
|
||||||
|
} else {
|
||||||
|
obj = {
|
||||||
|
id:params.id,
|
||||||
|
token:'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxNDI5NSIsImlhdCI6MTczNjMwNDUzMCwiZXhwIjoxNzM2OTA5MzMwfQ.kCnqu3S23kOog8OBA2GUwRWhC-dmBsYmPz5mHdaCIvaoJstm0KmYnZFxssHjx562ziFOfENXDg_OQWyzBIC5xg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return vm.$u.get('app/course/selectCourseDetailsById', obj)
|
||||||
|
};
|
||||||
|
|
||||||
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
|
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
|
||||||
vm.$u.api = {
|
vm.$u.api = {
|
||||||
|
|
@ -124,4 +135,4 @@ const install = (Vue, vm) => {
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
install
|
install
|
||||||
}
|
}
|
||||||
|
|
@ -852,11 +852,17 @@ export default {
|
||||||
console.log('has this.courseId getDataList()');
|
console.log('has this.courseId getDataList()');
|
||||||
this.getDataList(this.courseId, this.courseDetailsId);
|
this.getDataList(this.courseId, this.courseDetailsId);
|
||||||
}
|
}
|
||||||
this.$Request.getT('/app/course/getRedEnvelopeTips').then((res) => {
|
|
||||||
if (res.code == 0) {
|
if( uni.getStorageSync('token')){
|
||||||
this.getRedEnvelopeTips = res.data;
|
this.$Request.getT('/app/course/getRedEnvelopeTips').then((res) => {
|
||||||
}
|
if (res.code == 0) {
|
||||||
});
|
this.getRedEnvelopeTips = res.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// uni.$on('back', (data) => {
|
// uni.$on('back', (data) => {
|
||||||
// if (data.flag == true) {
|
// if (data.flag == true) {
|
||||||
|
|
@ -971,14 +977,19 @@ export default {
|
||||||
},
|
},
|
||||||
//点击封面打开弹窗
|
//点击封面打开弹窗
|
||||||
openShowPay(val, inx, url) {
|
openShowPay(val, inx, url) {
|
||||||
console.log(val);
|
if( uni.getStorageSync('token')){
|
||||||
console.log(inx);
|
|
||||||
console.log(url);
|
|
||||||
console.log(this.videoList[this.current]);
|
|
||||||
this.zongPrice = this.info.price;
|
this.zongPrice = this.info.price;
|
||||||
this.countPrice = this.videoList[this.current].price;
|
this.countPrice = this.videoList[this.current].price;
|
||||||
this.showPay = true;
|
this.showPay = true;
|
||||||
this.noBuyVideoIndex = this.current;
|
this.noBuyVideoIndex = this.current;
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/login/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 获取收藏状态
|
// 获取收藏状态
|
||||||
getMyLoveStatus() {
|
getMyLoveStatus() {
|
||||||
|
|
@ -986,7 +997,18 @@ export default {
|
||||||
id: this.courseId,
|
id: this.courseId,
|
||||||
token: uni.getStorageSync('token')
|
token: uni.getStorageSync('token')
|
||||||
};
|
};
|
||||||
this.$Request.getT('/app/course/selectCourseDetailsById', data).then((res) => {
|
let obj ={}
|
||||||
|
if ( uni.getStorageSync('token')) {
|
||||||
|
obj = data
|
||||||
|
} else {
|
||||||
|
obj = {
|
||||||
|
id: this.courseId,
|
||||||
|
token:'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxNDI5NSIsImlhdCI6MTczNjMwNDUzMCwiZXhwIjoxNzM2OTA5MzMwfQ.kCnqu3S23kOog8OBA2GUwRWhC-dmBsYmPz5mHdaCIvaoJstm0KmYnZFxssHjx562ziFOfENXDg_OQWyzBIC5xg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.$Request.getT('/app/course/selectCourseDetailsById', obj).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
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;
|
||||||
|
|
@ -1995,11 +2017,21 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//没有视频链接则表示没有权限,需要购买 弹出购买弹窗
|
|
||||||
this.zongPrice = this.info.price;
|
if( uni.getStorageSync('token')){
|
||||||
this.countPrice = this.videoList[this.current].price;
|
//没有视频链接则表示没有权限,需要购买 弹出购买弹窗
|
||||||
this.showPay = true;
|
this.zongPrice = this.info.price;
|
||||||
this.noBuyVideoIndex = this.current;
|
this.countPrice = this.videoList[this.current].price;
|
||||||
|
this.showPay = true;
|
||||||
|
this.noBuyVideoIndex = this.current;
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/login/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//播放时的回掉
|
//播放时的回掉
|
||||||
|
|
|
||||||
|
|
@ -473,6 +473,7 @@
|
||||||
this.getDataList(this.courseId, this.courseDetailsId);
|
this.getDataList(this.courseId, this.courseDetailsId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
console.log(11111)
|
||||||
httpsRequest.getT('/app/course/getRedEnvelopeTips').then(res => {
|
httpsRequest.getT('/app/course/getRedEnvelopeTips').then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.getRedEnvelopeTips = res.data
|
this.getRedEnvelopeTips = res.data
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
//查看视频
|
//查看视频
|
||||||
seVideo(item) {
|
seVideo(item) {
|
||||||
console.log(uni.getStorageSync('token'))
|
console.log(uni.getStorageSync('token'))
|
||||||
if(uni.getStorageSync('token')){
|
// if(uni.getStorageSync('token')){
|
||||||
const time = 100;
|
const time = 100;
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
if (returnIsSafari()) {
|
if (returnIsSafari()) {
|
||||||
|
|
@ -75,11 +75,11 @@
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
}else{
|
// }else{
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url:'/pages/login/login'
|
// url:'/pages/login/login'
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue