This commit is contained in:
liuyuan
2025-06-10 17:49:45 +08:00
parent d3ede507f3
commit b465c476b8
21 changed files with 569 additions and 365 deletions

16
App.vue
View File

@@ -33,22 +33,6 @@ export default {
},
});
if (
uni.getStorageSync("guidePages") != 2 ||
!uni.getStorageSync("guidePages")
) {
plus.navigator.closeSplashscreen();
} else {
uni.switchTab({
url: "/pages/home/index",
success: function () {
plus.navigator.closeSplashscreen();
let page = getCurrentPages()[0];
page.$vm.requestAll();
},
});
}
//取出缓存数据
store.commit("setCacheData");
// #ifdef MP-WEIXIN

View File

@@ -167,6 +167,7 @@ $http.dataFactory = async function (res) {
});
uni.setStorageSync('userInfo', {})
uni.setStorageSync('token', null)
console.log('我进来了')
setTimeout(() => {
uni.redirectTo({
url: "/pages/user/login",

View File

@@ -2,8 +2,8 @@
"name" : "心灵空间",
"appid" : "__UNI__BBBDFD2",
"description" : "心灵空间",
"versionName" : "1.0.23",
"versionCode" : 1023,
"versionName" : "1.0.27",
"versionCode" : 1027,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@@ -1,16 +1,5 @@
{
"pages": [
{
"path": "pages/visitor/index",
"style": {
"navigationBarTitleText": "游客登录",
"app-plus": {
"bounce": "none",
"titleNView": false,
"popGesture": "none"
}
}
},
{
"path": "pages/home/index",
"style": {
@@ -44,6 +33,17 @@
}
}
},
{
"path": "pages/visitor/index",
"style": {
"navigationBarTitleText": "游客登录",
"app-plus": {
"bounce": "none",
"titleNView": false,
"popGesture": "none"
}
}
},
{
"path": "pages/visitor/mine",
"style": {

View File

@@ -1,129 +1,159 @@
<template>
<view style="width: 100%; height: 100%;">
<view v-if="axiosStatus!=''">
<scroll-view @scrolltolower="lower" scroll-y="true" class="scroll-Y" v-if="dataList&&dataList.length > 0"
style="height: 100%">
<view @click="gotoDetail(item, index)" class="scroll-view-item list_item"
v-for="(item, index) in dataList" :key="indexKey ? item[indexKey] : item.id"
:index="indexKey ? item[indexKey] : index">
<view :class="['titleItem', '']" :style="`width:${isNoIcon ? '100%' : 'calc(100% - 30rpx)'}`">
<slot name="leftSlot" :row="item" :item="item" :index="index"> </slot>
<view style="width: 100%; height: 100%">
<view v-if="axiosStatus != ''">
<scroll-view
@scrolltolower="lower"
scroll-y="true"
class="scroll-Y"
v-if="dataList && dataList.length > 0"
style="height: 100%"
>
<view
@click="gotoDetail(item, index)"
class="scroll-view-item list_item"
v-for="(item, index) in dataList"
:key="indexKey ? item[indexKey] : item.id"
:index="indexKey ? item[indexKey] : index"
>
<view :class="['titleItem', '']">
<slot name="leftSlot" :row="item" :item="item" :index="index">
</slot>
<template v-if="isCondition">
<slot name="labelSlot" :row="item" :rowIndex="index"></slot>
</template>
<template v-else>
{{ item[label] }}
</template>
<template v-if="isCondition">
<slot name="labelSlot" :row="item" :rowIndex="index"></slot>
</template>
<template v-else>
{{ item[label] }}
</template>
<slot name="rightSlot" :row="item" :rowIndex="index"></slot>
</view>
<image v-if="!isNoIcon" src="@/static/icon/icon_right.png" class="rightArrow" style=""></image>
</view>
</scroll-view>
<u-empty v-else-if="noDataIcon && isLoadingHide" :mode="noDataIcon"
:icon="`http://cdn.uviewui.com/uview/empty/${noDataIcon}.png`">
</u-empty>
<u-divider style="width: 100%;" v-else-if="!isOrderList" text="暂无数据"></u-divider>
</view>
</view>
<slot name="rightSlot" :row="item" :rowIndex="index"></slot>
</view>
<image
v-if="!isNoIcon"
src="@/static/icon/icon_right.png"
class="rightArrow"
style=""
></image>
</view>
</scroll-view>
<u-empty
v-else-if="noDataIcon && isLoadingHide"
:mode="noDataIcon"
:icon="`http://cdn.uviewui.com/uview/empty/${noDataIcon}.png`"
>
</u-empty>
<u-divider style="width: 100%" v-else text="暂无数据哦~"></u-divider>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
props: [
"indexKey",
"dataList",
"label",
"isCondition",
"isNoIcon",
"pagination",
"noDataIcon",
"isLoadingHide",
"axiosStatus",
"isOrderList"
],
data() {
return {
status: '',
};
},
onLoad() {},
onShow() {
this.status = '';
},
computed: {
...mapState(["userInfo"]),
},
methods: {
lower() {
this.$emit("lower");
},
gotoDetail(data, index) {
this.$emit("hancleClick", data, index);
},
},
onBackPress() {
// #ifdef APP-PLUS
plus.key.hideSoftKeybord();
// #endif
},
components: {},
};
import { mapState } from "vuex";
export default {
props: [
"indexKey",
"dataList",
"label",
"isCondition",
"isNoIcon",
"pagination",
"noDataIcon",
"isLoadingHide",
"axiosStatus",
],
data() {
return {
status: "",
};
},
onLoad() {},
onShow() {
this.status = "";
},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
computed: {
...mapState(["userInfo"]),
},
methods: {
lower() {
this.$emit("lower");
},
gotoDetail(data, index) {
this.$emit("hancleClick", data, index);
},
},
onBackPress() {
// #ifdef APP-PLUS
plus.key.hideSoftKeybord();
// #endif
},
components: {},
};
</script>
<style lang="scss" scoped>
.list_item {
width: 100%;
padding: 20rpx 20rpx;
font-size: 30rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #e0e0e0;
display: flex;
align-items: center;
justify-content: space-between;
}
.list_item {
width: 100%;
padding: 20rpx;
font-size: 30rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #e0e0e0;
display: flex;
align-items: center;
justify-content: space-between;
}
.list_item :last-child(1) {
border-bottom: none;
}
.list_item :last-child(1) {
border-bottom: none;
}
.scroll-view-item:nth-child(2n-1) {
background-color: #f5f5f5 !important;
}
.scroll-view-item:nth-child(2n-1) {
background-color: #f5f5f5 !important;
}
.rightArrow {
width: 40rpx;
height: 40rpx;
}
.rightArrow {
width: 40rpx;
height: 40rpx;
}
.scroll-Y {
height: 100%;
}
.scroll-Y {
height: 100%;
}
.scroll-view_H {
white-space: nowrap;
width: 100%;
}
.scroll-view_H {
white-space: nowrap;
width: 100%;
}
.scroll-view-item_H {
display: inline-block;
width: 100%;
}
.scroll-view-item {
// height: 300rpx;
// line-height: 300rpx;
// text-align: center;
// font-size: 36rpx;
}
.titleItem {
width: calc(100% - 30rpx);
}
.scroll-view-item_H {
display: inline-block;
width: 100%;
// height: 300rpx;
// line-height: 300rpx;
// text-align: center;
// font-size: 36rpx;
}
/deep/.scroll-view-item:nth-child(2n-1) {
background-color: transparent !important;
}
.titleItem {
width: calc(100%) !important;
}
.list_item:last-child {
border-bottom: none !important;
}
</style>
/deep/.scroll-view-item:nth-child(2n-1) {
background-color: transparent !important;
}
.list_item:last-child {
border-bottom: none !important;
}
</style>

View File

@@ -1,4 +1,5 @@
<template>
<view
class="container playerBox"
id="playerBox"
@@ -50,10 +51,10 @@
<div @tap="renderScript.emitDispose" ref="videoContent6" v-show="false">
监听第一次初始播放时长,开始进行接口存储时间
</div>
<!-- v-if="platform != 'ios'" -->
<!-- 全屏按钮 start -->
<!-- 注意主要用于安卓端因为ios手机会被劫持 -->
<div class="fullScreenButton-container" v-if="platform != 'ios'">
<div class="fullScreenButton-container">
<div
:class="`prism-fullscreen-btn ${isFullScreen ? 'fullscreen' : ''}`"
@tap="renderScript.changeVideoScreen"
@@ -296,12 +297,12 @@ export default {
x: 10,
y: 7,
},
{
name: "fullScreenButton",
align: "tr",
x: 10,
y: 12,
},
// {
// name: "fullScreenButton",
// align: "tr",
// x: 5,
// y: 12,
// },
{
name: "prism-speed-selector",
align: "tr",
@@ -439,9 +440,9 @@ export default {
name: "RateComponent", //倍速组件
type: AliPlayerComponent.RateComponent,
},
];
if (this.platform != "ios") {
// if (this.platform != "ios") {
var fullScreenButtonComponent = Aliplayer.Component({
init: function (status, toAddress) {
this.fullScreenStatus = status;
@@ -465,7 +466,7 @@ export default {
];
}
// }
//设置播放基本配置
var playerOptions = {
@@ -560,26 +561,37 @@ export default {
ownerInstance.callMethod("handleEnd");
},
//调用 screenChange + 设置全屏
changeVideoScreen(event, ownerInstance) {
var status = this.player.fullscreenService.getIsFullScreen();
ownerInstance.callMethod("screenChange", {
status: status,
primary: status ? "portrait" : "landscape",
});
var that = this;
// this.$emit('changeScreenLoading',true)
var status = this.player.fullscreenService.getIsFullScreen();
console.log('this.$platform--------', this.platform);
if (this.platform != 'ios') { // 改变按钮形态
ownerInstance.callMethod('screenChange', {
status: status,
primary: status ? 'portrait' : 'landscape'
})
}
if (status) {
if (this.platform != 'ios') {
console.log('恢复竖版');
setTimeout(() => {
plus.screen.lockOrientation("portrait-primary"); //锁死屏幕方向为竖屏
this.player.fullscreenService.cancelFullScreen();
}, 100);
}
} else {
this.player.fullscreenService.requestFullScreen();
if (this.platform != 'ios') {
setTimeout(() => {
plus.screen.lockOrientation("landscape-primary");
}, 100);
} else {
console.log('不要旋转, 使用原生全屏');
}
if (status) {
setTimeout(() => {
plus.screen.lockOrientation("portrait-primary"); //锁死屏幕方向为竖屏
this.player.fullscreenService.cancelFullScreen();
}, 100);
} else {
this.player.fullscreenService.requestFullScreen();
setTimeout(() => {
plus.screen.lockOrientation("landscape-primary");
}, 100);
}
},
}
},
//调用 changeVideoData 切换播放源
changeVideoData(event, ownerInstance) {

View File

@@ -1,4 +1,5 @@
<template>
<view
class="container playerBox"
id="playerBox"
@@ -47,7 +48,7 @@
right: 0;
bottom: 0;
border-radius: 40rpx;
border: 15rpx solid #000;
border: 15rpx solid #000;
padding: 40rpx 0 20rpx;
box-sizing: border-box;
background-size: cover;
@@ -1054,11 +1055,12 @@ export default {
console.log('vm at line 926:', newValue, oldValue, ownerVm, vm)
if (newValue != null) {
if (this.platform == "ios") {
this.player.one("canplay", () => {
this.player.seek(newValue);
});
player.seek(newValue);
} else {
this.player.seek(newValue);
player.seek(newValue);
}
this.curTime = newValue
}
@@ -1066,12 +1068,11 @@ export default {
receiveMsgjumpNumber(newValue, oldValue, ownerVm, vm) {
console.log('vm at line 926:', newValue, oldValue, ownerVm, vm)
if (newValue != 0) {
if (this.platform == "ios") {
this.player.one("canplay", () => {
this.player.seek(newValue);
});
player.seek(newValue);
} else {
this.player.seek(newValue);
player.seek(newValue);
}
this.curTime = newValue
}

View File

@@ -1,4 +1,5 @@
<template>
<view
class="container"
id="Aliyun"
@@ -218,12 +219,12 @@ export default {
},
})
.then(async (res) => {
console.log("res at line 204:", res.video);
var that = this;
this.videoInfo=res.video
this.videoInfo = res.video;
that.videoData = {
id: that.currentVideoId,
vid: res.video.video,
};
if (res.video.type == 1) {

View File

@@ -1,7 +1,19 @@
<template>
<view class="container" style="background-color: #000; position: relative">
<video src="https://video.taihumed.com/d0c8e6d23e5f71ef81714531858c0102/c27e8334925a485bb7d57b46463f24ab-75b0e05b7a76efaff190b6417b2168a7-sd-nbv1-encrypt-stream.m3u8"></video>
<view class="container" style="background-color: #000; position: relative">
<!-- <u-icon
@click="goBack"
name="arrow-left"
color="#3ab3ae"
size="20"
:style="`display: inline-block; position: absolute; top: ${
statusBarHeight + 2
}px; left: ${10}px;z-index: 999;`"
></u-icon>-->
<video
src="https://video.taihumed.com/d0c8e6d23e5f71ef81714531858c0102/c27e8334925a485bb7d57b46463f24ab-75b0e05b7a76efaff190b6417b2168a7-sd-nbv1-encrypt-stream.m3u8"
></video>
<view style="width: 100%; height: 200px">
<div
class=""
@@ -129,7 +141,7 @@ export default {
},
async onUnload() {
uni.navigateTo({
url: "/pages/curriculum/order/back",
url: "/pages/curriculum/order/curriculum/back",
});
// #ifdef APP-PLUS
plus.screen.lockOrientation("portrait-primary"); //锁死屏幕方向为竖屏
@@ -186,7 +198,7 @@ export default {
console.log(
"status at line 这是当前的状态158:",
data.status,
data.primary
data.primary,
);
this.isFullScreen = !data.status;
this.$emit("changeScreen", this.isFullScreen);
@@ -359,13 +371,12 @@ export default {
this.currentTime = data.time;
console.log(
"this.currentTime at line 这是结束的时候掉的存储视频:",
this.currentTime
this.currentTime,
);
clearInterval(this.$store.state.videoTimer);
this.timer = null;
await this.setVideoTime();
},
setVideoTime(time) {
var data = {};
@@ -417,7 +428,7 @@ export default {
// if (this.currentTime) {
await this.setVideoTime();
// }
}, 60000)
}, 60000),
);
// }, 5000);
},
@@ -674,20 +685,36 @@ export default {
* 显示广告
*/
ended: function(player, e) {
// this.$html.show();
}
});
console.log('this.currentVideoList at line 456111111111111111111111:', this.videoList)
var playerOptions = {
id: "url-player-test",
"vid": this.videoData
.videoId, // 必选参数,可以通过点播控制台(路径:媒资库>音/视频查询。示例1e067a2831b641db90d570b6480f****。
width: '100%', //容器的大小
// videoWidth: '100vw', //容器的大小
// videoHeight: '100vh', //容器的大小
height: '100%', //容器的大小
playsinline: true,
controlBarVisibility: "click",
cover: "",
components: [
// {
// name: 'BulletScreenComponent',
// type: AliPlayerComponent.BulletScreenComponent,
// /** Descriptions of the scrolling text component parameters: text, style, bulletPosition
// * text: The scrolling text
// * style: The style of the scrolling text
// * bulletPosition: The position of the scrolling text. Valid values: 'top', 'bottom', and 'random'. The default is 'random'.
// */
// args: ['http://101.201.146.165:8088/Pf-EH/statics/uploadFile/2024-05-10/b0f420c7-9178-41ad-9dd6-f59a64a6e190.png']
// },
{
name: 'adComponent',
type: fullScreenButtonComponent,
@@ -699,6 +726,14 @@ export default {
name: 'RateComponent',
type: AliPlayerComponent.RateComponent
},
// {
// name: 'RotateMirrorComponent',
// type: AliPlayerComponent.RotateMirrorComponent
// },
],
skinLayout: [{
@@ -752,6 +787,14 @@ export default {
x: 10,
y: 7
},
// {name: "fullScreenButton", align: "tr", x: 10, y: 12},
// {name:"subtitle", align:"tr",x:15, y:12},
// {
// name: "setting",
// align: "tr",
// x: 15,
// y: 12
// },
{
name: "prism-speed-selector",
align: "tr",
@@ -774,12 +817,12 @@ export default {
if (this.videoData.type == 1) {
playerOptions = {
...playerOptions,
"playauth": this.videoData.playAuth, // 必选参数参数值可通过调用GetVideoPlayAuth接口获取。
"playauth": this.videoData.playAuth, // 必选参数参数值可通过调用GetVideoPlayAuth接口获取。
"encryptType": 1, // 必选参数当播放私有加密流时需要设置本参数值为1。其它情况无需设置。
"playConfig": {
"EncryptType": 'AliyunVoDEncryption'
},
}
} else {
@@ -789,16 +832,48 @@ export default {
}
}
var player = new Aliplayer(playerOptions, function(player) { });
this.player = player;
this.player = player;
console.log('是否拿到第一次初始值呢',this.platform, typeof this.firstTime, this.firstTime)
if(this.platform == 'ios'){
player.on('canplay',function(){
console.log('这是ios数据缓冲初次设置播放位置判断')
this.player.seek(20);
})
}else{
this.player.seek(this.firstTime)
}
if(this.platform == 'ios'){
player.on('canplay',function(){
console.log('这是ios数据缓冲初次设置播放位置判断')
this.player.seek(20);
})
// var seeked = false;
// player.on('loadedmetadata',function (e) {
// if(!seeked)
// {
// seeked = true;
// this.player.seek(20);
// }
// });
// player.on('waiting',function(){
// console.log('这是ios数据缓冲初次设置播放位置判断')
// setTimeout(()=>{
// player.seek(this.firstTime)
// },500)
// })
}else{
this.player.seek(this.firstTime)
}
// var seeked = false;
// this.player.on('loadedmetadata',function (e) {
// if(!seeked)
// {
// seeked = true;
// player.seek(this.firstTime);
// }
// });
clearInterval(this.videoTimer);
this.videoTimer = null;
@@ -811,25 +886,160 @@ export default {
}, 1000);
this.$refs.videoContent4.click()
player.on('ready', function() {
// player.fullscreenService.requestFullScreen()
})
// this.
// this.$refs.videoContent.click()
this.player.on('ended', function() {
// console.log('that.curTime at line 242:', this.curTime)
// console.log('that.curStatus at line 210:', this.curStatus)
this.$refs.videoContent2.click()
})
// player.setRotate(90)
//全屏播放
// player.one('canplay', function() {
// // console.log('canplay', this.player.tag);
// player.tag.play();
// });
},
showPreview(e) {
// console.log('e at line 56:', e)
let conimg = e.target.dataset.nodes;
let imgs = conimg.match(/<img[^>]+>/g); //选择节点中的img
console.log('imgs at line 59:', imgs)
let imgList = [];
//遍历img标签的src里面的内容放在定义的数组imgList中
for (var j = 0; j < imgs.length; j++) {
imgs[j].replace(/<img[^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
imgList.push(capture)
})
}
console.log('imgList.push at line 64:', imgList)
//最后一步就是所有图片放在预览的方法previewImage中就可以了
// uni.previewImage({
// current: imgList,
// urls: imgList,
// })
uni.previewImage({
urls: imgList,
longPressActions: {
itemList: ['很抱歉,暂不支持保存图片到本地'],
success: function(res) {
// console.log(res,'+++++')
}
}
});
},
receiveScreenType(newValue) {
// console.log('newValue at line 427屏幕方向111111111111:', newValue)
},
async receiveIsfresh(newValue) {
console.log('是否走了刷新销毁方法:', this.player)
if (this.player) {
clearInterval(this.$store.state.videoTimer)
// await this.setVideoTime();
this.player.dispose();
// $('#url-player-test').empty()
// this.player.seek(newValue);
}
},
async receiveplatform(newValue) {
},
async receiveIsChange(newValue) {
// this.timer=null
if (this.isChange) {
this.checkValue()
// if (this.videoData.type == 1) {
// console.log('是否走了切换加密视频方法:', this.isChange, this.videoData)
// await this.player.replayByVidAndPlayAuth(this.videoData.video, this.videoData.playAuth)
// this.$refs.videoContent.click()
// } else {
// console.log('是否走了切换老视频/音频方法:', this.isChange, this.videoData)
// await this.player.loadByUrl(this.videoData.videoUrl)
// this.$refs.videoContent.click()
// }
}
// this.$refs.videoContent3.click()
},
receiveVideoList(newValue, oldValue, ownerVm, vm) {
// //数据变化
console.log('currentVideoListcurrentVideoListcurrentVideoList', newValue)
},
receiveMsg(newValue, oldValue, ownerVm, vm) {
//数据变化
// console.log('newValue', newValue)
// console.log('oldValue', oldValue)
// console.log('ownerVm', ownerVm)
// console.log('vm', vm)
},
receiveWinWidth(newValue, oldValue, ownerVm, vm) {
//数据变化
console.log('newValue', newValue)
// console.log('oldValue', oldValue)
// console.log('ownerVm', ownerVm)
// console.log('vm', vm)
},
receiveWinHeight(newValue, oldValue, ownerVm, vm) {
//数据变化
console.log('newValue', newValue)
// console.log('oldValue', oldValue)
// console.log('ownerVm', ownerVm)
// console.log('vm', vm)
},
checkValue() {
console.log(this.videoId, this.authId, this.videoData, "1111888888")
if ((!this.videoData.playAuth || !this.currentVideoList)) {
setTimeout(() => {
this.checkValue();
@@ -842,6 +1052,9 @@ export default {
},
loadWebPlayerSDK() {
return new Promise((resolve, reject) => {
const s_tag = document.createElement('script'); // 引入播放器js
s_tag.type = 'text/javascript';
// s_tag.src = 'https://g.alicdn.com/apsara-media-box/imp-web-player/2.20.3/aliplayer-min.js';
@@ -875,6 +1088,20 @@ export default {
document.body.appendChild(l_tag);
});
},
loadComponent() {
// return new Promise((resolve, reject) => {
// const s_tag = document.createElement('script');
// s_tag.type = 'text/javascript';
// // 需要先下载组件 js 文件,放到项目 /static/ 目录下
// // 下载地址https://github.com/aliyunvideo/AliyunPlayer_Web/blob/master/customComponents/dist/aliplayer-components/aliplayercomponents-1.0.9.min.js
// s_tag.src = '@/static/aliplayercomponents.js';
// s_tag.charset = 'utf-8';
// s_tag.onload = () => {
// resolve();
// }
// document.body.appendChild(s_tag);
// });
}
}
}
</script>

View File

@@ -35,11 +35,11 @@
<view class="list_item_title">{{item.title}}</view>
<view class="list_item_content" v-html="item.content"></view>
<view class="list_item_bt">
<view class="list_item_price" v-if="item.courseCatalogueEntityList.length==1&&$platform!='ios'">
<view class="list_item_price" v-if="item.courseCatalogueEntityList.length==1">
<text v-if="item.courseCatalogueEntityList[0].halfFee==0">免费</text>
<text v-else>¥{{item.courseCatalogueEntityList[0].halfFee}}/{{item.courseCatalogueEntityList[0].fee}}</text>
</view>
<view class="list_item_price" v-if="item.courseCatalogueEntityList.length>1&&$platform!='ios'">
<view class="list_item_price" v-if="item.courseCatalogueEntityList.length>1">
<text v-for="(v,i) in item.courseCatalogueEntityList" :key="i">
{{formatContent(v.title)}}<text v-if="i !== item.courseCatalogueEntityList.length - 1">/</text>
</text>
@@ -124,12 +124,7 @@ export default {
onLoad(options) {
//清除缓存
uni.removeStorageSync('fixed');
//针对身心医学的判断
if(options.title=='心身医学'&&this.$platform!='android'){
this.title = '心身健康科学'
}else{
this.title = options.title;
}
this.title = options.title;
this.id = options.id;
//如果是心理评测
@@ -293,11 +288,7 @@ export default {
})
.then(res => {
if (res.code == 0) {
if(this.$platform=='android'){
this.formList = res.formList;
}else{
this.formList = res.formList.slice(0,2);
}
this.formList = res.formList;
}
}).catch(e => {

View File

@@ -194,9 +194,12 @@ export default {
watch: {
currentVideoId() {
this.currentVideoIndex = this.videoArray.findIndex(
(e) => e.id == this.currentVideoId
)
(e) => e.id == this.currentVideoId,
);
console.log(
"that.currentVideoIndex at line 3401111111111111:",
this.currentVideoIndex,
);
},
},
methods: {

View File

@@ -4,7 +4,7 @@
<common-anchor-link style="width: 100%" baseHeight="200" ref="commonAnchorLink" :allDataList="allDataList"
titleKey="title" dataListKey="courseList" :titleStyle="{}" :tabStyle="{background: '#fff'}">
<template slot="otherContent" slot-scope="slotProps">
<view v-if="$platform=='android'&&goBuyTitle" class="describe_block">
<view v-if="goBuyTitle" class="describe_block">
<view style=" display: flex; align-items: center;">
<uni-icons type="info" size="20" color="#fff"></uni-icons>
<text>{{goBuyTitle}}</text>
@@ -14,7 +14,7 @@
</button>
</view>
<view :style="$platform=='android'?'padding-top:80rpx;':''">
<view style="padding-top:80rpx;">
<image style="width: 100%" :src="curriculumData.image" mode="widthFix"></image>
</view>
@@ -95,7 +95,7 @@
<view class="catalogueList">
<view class="chapter_content">
<courseDescription :isCondition="true" :dataList="slotProps.dataList"
@hancleClick="gotoDetail" label="title">
@hancleClick="(data, index) => gotoDetail(data, index, slotProps)" label="title">
<template slot="labelSlot" slot-scope="slotProps">
<view :style="`${
slotProps.row.isAudition==1
@@ -485,16 +485,12 @@
})
},
//课程详情
async gotoDetail(v, index) {
async gotoDetail(data, index, slotProps) {
if(this.userVip){
uni.navigateTo({
url: `/pages/curriculum/order/detail?navTitle=${this.options.navTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&detailOid=${v.detailOid}&curriculumImgUrl=${this.curriculumData.image}`,
});
this.goVideo(data);
}else{
if(v.isAudition == 1||this.cateList[this.currentCateIndex].isBuy == 1){
uni.navigateTo({
url: `/pages/curriculum/order/detail?navTitle=${this.options.navTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&detailOid=${v.detailOid}&curriculumImgUrl=${this.curriculumData.image}`,
});
if(data.isAudition == 1||this.cateList[this.currentCateIndex].isBuy == 1){
this.goVideo(data);
}else{
if(this.cateList[this.currentCateIndex].type != 0){
this.$commonJS.showToast("请先购买课程");
@@ -504,6 +500,11 @@
}
}
},
goVideo(v) {
uni.navigateTo({
url: `/pages/curriculum/order/detail?navTitle=${this.options.navTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&detailOid=${v.detailOid}&curriculumImgUrl=${this.curriculumData.image}`,
});
},
//获取章节
async getChapterList(v) {
var list = [];

View File

@@ -88,7 +88,7 @@
</image>
<u-icon v-if="v.icon" name="map-fill" color="#018F89" size="20"
style="display: inline-block"></u-icon>
<template v-if="v.type == 3&&$platform=='android'">
<template v-if="v.type == 3">
<text style="color: #aaa; margin-left: 10rpx">
(全部积分{{ initData.user.jf }})</text>
</template>
@@ -107,7 +107,7 @@
<text>
{{ isShowAddress ? freightNum.toFixed(2) : Number(0).toFixed(2) }}</text>
</template>
<template v-if="v.type == 3&&$platform=='android'">
<template v-if="v.type == 3">
<text style="color: #fe6035"> -{{ jfNumberShow }}</text>
</template>
<template v-if="v.type == 5">
@@ -119,7 +119,7 @@
</view>
</view>
<view class="bottom jf_box" v-if="v.type == 3&&$platform=='android'">
<view class="bottom jf_box" v-if="v.type == 3">
<view class="jf_box">
<text style="color: #7dc1f0; font-weight: 600">可用积分({{ jfNumberMax }})</text>
<view class="jf_input">

View File

@@ -9,7 +9,7 @@
</view>
</view>
<!-- 应对华为审核去掉app跳转 -->
<view class="appJump" v-if="$platform=='android'">
<view class="appJump">
<view class="app_item wumen" @click="appjumpfun('wumen')">
<view class="img">
<image src="@/static/logo_wumen.png"></image>
@@ -37,17 +37,7 @@
</view>
<view class="cate_box">
<scroll-view scroll-x="true">
<view class="cate_list" v-if="$platform!='android'&&cateList.length>0">
<view class="cate_item_box" v-if="item.id!=75" v-for="(item, index) in cateList" @click="handleClickCate(item)">
<view class="cate_item_border">
<image :src="item.icon"></image>
</view>
<view class="cate_item_name" v-if="index==2">心身健康科学</view>
<view class="cate_item_name" v-else>{{ item.title }}</view>
</view>
</view>
<view class="cate_list" v-if="$platform=='android'&&cateList.length>0">
<view class="cate_list" v-if="cateList.length>0">
<view class="cate_item_box" v-for="(item, index) in cateList" @click="handleClickCate(item)">
<view class="cate_item_border">
<image :src="item.icon"></image>
@@ -128,35 +118,7 @@ export default {
data() {
return {
curriculumList: [],
// curriculumList: [
// {
// name: "我的课程",
// url: "/pages/curriculum/index/index",
// imgUrl: require("@/static/icon/home_bg1.png")
// },
// {
// name: "免费课程",
// url: "/pages/curriculum/index/free",
// imgUrl: require("@/static/icon/home_bg2.png")
// },
// {
// name: "VIP办理",
// url: "/pages/vip/index",
// imgUrl: require("@/static/icon/home_bg3.png")
// },
// ],
cateList: [],
noticeList: [], //通知消息
seckillLst: [], //秒杀列表
studyList: [], //正在学习
flashSaleList: [], //欢迎试听
subList: [],
cateIndex: 0 //分类默认选中第一个
}
},
onLoad() {
if(this.$platform=='android'){
this.curriculumList = [
curriculumList: [
{
name: "我的课程",
url: "/pages/curriculum/index/index",
@@ -172,27 +134,23 @@ export default {
url: "/pages/vip/index",
imgUrl: require("@/static/icon/home_bg3.png")
},
]
}else{
this.curriculumList = [
{
name: "我的课程",
url: "/pages/curriculum/index/index",
imgUrl: require("@/static/icon/home_bg1.png")
},
{
name: "免费课程",
url: "/pages/curriculum/index/free",
imgUrl: require("@/static/icon/home_bg2.png")
}
]
],
cateList: [],
noticeList: [], //通知消息
seckillLst: [], //秒杀列表
studyList: [], //正在学习
flashSaleList: [], //欢迎试听
subList: [],
cateIndex: 0 //分类默认选中第一个
}
},
onLoad() {
this.getCateList();
},
onShow() {
let cateIndex = uni.getStorageSync('cateIndex');
this.cateIndex = cateIndex;
this.getCourseList();
this.getCateList();
this.getNotice();
this.getMarketProductList();
this.getMarketCourseList();
@@ -200,6 +158,9 @@ export default {
methods: {
//获取列表数据
getCateList(){
uni.showLoading({
title: '加载中'
})
this.$http.request({
url: 'psyche/home/getPsycheLabels',
method: "POST",
@@ -211,6 +172,7 @@ export default {
},
})
.then(res=> {
uni.hideLoading();
if (res.labels&&res.labels.length>0) {
this.cateList = res.labels;
//默认获取第一个id 请求二级列表
@@ -218,6 +180,7 @@ export default {
}
})
.catch(e=>{
uni.hideLoading();
uni.setStorageSync("guidePages", 2);
});
},
@@ -238,12 +201,6 @@ export default {
this.subList = res.labels;
}
})
.catch(e=>{
uni.setStorageSync("guidePages", 2);
uni.redirectTo({
url: "/pages/user/login",
});
});
},
//获取通知数据
getNotice() {

View File

@@ -14,7 +14,7 @@
<image src="../../static/logo.png" v-if="userMes.avatar == null||userMes.avatar == ''"
class="per_mes_img color_shandow"></image>
</view>
<view class="user_vip_box" v-if="$platform=='android'&&hasVipType1 || $platform=='android'&&hasVipType2">
<view class="user_vip_box" v-if="hasVipType1 || hasVipType2">
<view class="user_vip super" :style="hasVipType2?'width: 170rpx;':''">
<view class="user_vip_item" v-if="hasVipType1"><text>医学</text><image src="@/static/icon/chao_svip.png"></image></view>
<view class="user_vip_item" v-if="hasVipType2"><text>国学心理学</text><image src="@/static/icon/chao_svip.png"></image></view>
@@ -23,8 +23,8 @@
</view>
<view class="userInfoBox">
<view class="name">{{ userMes.nickname ? userMes.nickname : "未设置" }}</view>
<view class="phone" v-if="userMes.tel&&$platform=='android'">手机号({{ userMes.tel }})</view>
<view class="vip_type" v-if="$platform=='android'&&textList.length>0">
<view class="phone" v-if="userMes.tel">手机号({{ userMes.tel }})</view>
<view class="vip_type" v-if="textList.length>0">
<view class="vip_type_item" v-for="(item,index) in textList" :key="index">
{{item}}<image src="@/static/icon/chao_vip.png"></image>
</view>
@@ -32,7 +32,7 @@
</view>
<br clear="both" />
</view>
<view class="modal_vip" v-if="$platform=='android'">
<view class="modal_vip">
<template>
<view class="chong_zhi boxShadow box_fillet vip_box">
<view class="noVip">
@@ -93,7 +93,7 @@
<view class="text" style="line-height: 40rpx">{{userMes.jf ? userMes.jf : 0}}</view>
</view>
<view class="chong_list_item" v-if="$platform=='android'" style="
<view class="chong_list_item" style="
display: flex;
align-items: center;
flex-direction: column;

View File

@@ -89,7 +89,7 @@
</view>
</view>
<view class="youKeL" v-if="$platform=='ios'">
<view @click="onPageJump('/pages/visitor/index')">免登录体验</view>
<view @click="onPageJump('/pages/visitor/index')">游客模式</view>
</view>
<u-popup :show="yhxyShow" title="用户协议" :round="10" @close="yhxyShow = false">
@@ -1083,12 +1083,12 @@ export default {
justify-content: center;
margin: 60rpx 0 0 0;
font-size: 28rpx;
color: $themeColor;
view {
border: 1px solid $themeColor;
border: 1rpx solid $themeColor;
border-radius: 10rpx;
padding: 5rpx 15rpx;
padding: 15rpx 30rpx;
color: $themeColor;
}
}

View File

@@ -21,8 +21,8 @@
<view class="vip_qx_v">一年<text class="vip_fee line">{{item.originalPrice||0}}</text></view>
</view>
<text class="vip_item_btn" v-if="item.state==null" @click="openorderModal(item,0)">去办理</text>
<text class="vip_item_btn" v-else @click="openorderModal(item,0)">去续费</text>
<text class="vip_item_btn" v-if="item.state==null&&$platform != 'ios'" @click="openorderModal(item,0)">去办理</text>
<text class="vip_item_btn" v-else-if="$platform != 'ios'" @click="openorderModal(item,0)">去续费</text>
<view class="vip_price" v-if="item.vcbList&&item.vcbList.length>0">
<text class="font_bold" v-if="item.type==1||item.type==2">超级VIP价格</text>

View File

@@ -9,8 +9,7 @@
<view class="cate_item_border">
<image :src="item.icon"></image>
</view>
<view class="cate_item_name" v-if="$platform!='android'&&index==2">心身健康科学</view>
<view class="cate_item_name" v-else>{{ item.title }}</view>
<view class="cate_item_name">{{ item.title }}</view>
</view>
</view>
</scroll-view>

View File

@@ -124,31 +124,35 @@ export default {
});
}
},
// 获取
//获取数据
getData() {
var data = {
userId: this.userInfo.id,
};
if (!this.iosHide) {
this.tab_muJian = 1;
}
// 用户详情
if (this.userInfo.id != undefined) {
this.$http.post("book/user/info/" + this.userInfo.id).then((res) => {
this.userMes = res.user;
});
}
$http.request({
url: this.urlList.list,
method: "POST",
data,
header: {
"Content-Type": "application/json",
},
})
.then((res) => {
this.MoneyRecord = res.transactionDetailsList;
});
var data = {
userId: this.userInfo.id,
};
if (!this.iosHide) {
this.tab_muJian = 1;
}
//用户详情
if (this.userInfo.id != undefined) {
this.$http.post("book/user/info/" + this.userInfo.id).then((res) => {
this.userMes = res.user;
});
}
uni.showLoading({
title: '加载中'
})
$http.request({
url: this.urlList.list,
method: "POST",
data,
header: {
"Content-Type": "application/json",
},
})
.then((res) => {
uni.hideLoading();
this.MoneyRecord = res.transactionDetailsList;
});
},
// 跳转
onPageJump(url) {

View File

@@ -98,31 +98,35 @@ export default {
url: "/pages/detail/orderLCont?orderId=" + id
});
},
// 获取
//获取数据
getData() {
var data = {
userId: this.userInfo.id,
};
if (!this.iosHide) {
this.tab_muJian = 1;
}
// 用户详情
if (this.userInfo.id != undefined) {
this.$http.post("book/user/info/" + this.userInfo.id).then((res) => {
this.userMes = res.user;
});
}
$http.request({
url: this.urlList.list,
method: "POST",
data,
header: {
"Content-Type": "application/json",
},
})
.then((res) => {
this.MoneyRecord = res.transactionDetailsList;
});
var data = {
userId: this.userInfo.id,
};
if (!this.iosHide) {
this.tab_muJian = 1;
}
//用户详情
if (this.userInfo.id != undefined) {
this.$http.post("book/user/info/" + this.userInfo.id).then((res) => {
this.userMes = res.user;
});
}
uni.showLoading({
title: '加载中'
})
$http.request({
url: this.urlList.list,
method: "POST",
data,
header: {
"Content-Type": "application/json",
},
})
.then((res) => {
uni.hideLoading();
this.MoneyRecord = res.transactionDetailsList;
});
},
},
};

View File

@@ -32,17 +32,6 @@
style="float: right; margin-top: 5rpx"></u-radio>
</view>
</view>
<!-- <view style="width: 100%" v-else>
<view v-for="(item, index) in iosPaylist" @click="choseType(item.id)"
:class="payType == item.id ? 'Tab_xf cf_xuanx' : 'cf_xuanx'">
<image class="pay_item_img" :src="item.imgUrl" mode="aspectFil">
</image>
{{ item.title }}
<u-radio :key="index" activeColor="#7dc1f0" :name="item.id"
style="float: right; margin-top: 5rpx"></u-radio>
</view>
</view> -->
</u-radio-group>
</view>
</view>