This commit is contained in:
2024-07-13 10:45:20 +08:00
parent 41d03fb4ce
commit 772624ba9b
89 changed files with 9184 additions and 8147 deletions

View File

@@ -20,7 +20,7 @@
<view v-for="(item, index) in argee" :key="index">
<radio class="agreeRadio" :value="item.id" :checked="item.id == radioValue"
color="#3AB3AE" @click="radioCheck(index)"></radio>
默认收地址
默认收地址
</view>
</radio-group>
</view>

View File

@@ -128,7 +128,7 @@ import { mapState } from "vuex";
export default {
components: {
courseDescription, //课程说明
editAddress, //编辑收地址
editAddress, //编辑收地址
},
props: ["backState", "type"],
data() {

File diff suppressed because it is too large Load Diff

View File

@@ -1,160 +1,141 @@
<template>
<view style="width: 100%; height: 100%;">
<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"
style="align-items: flex-start"
>
<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%;">
<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"
style="align-items: flex-start">
<view :class="['titleItem', '']" :style="`width:${isNoIcon ? '100%' : 'calc(100% - 30rpx)'}`">
<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="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>
<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 text="暂无数据哦~"></u-divider>
</view>
</template>
<script>
import { mapState } from "vuex";
export default {
props: [
"indexKey",
"dataList",
"label",
"isCondition",
"isNoIcon",
"pagination",
"noDataIcon",
"isLoadingHide",
],
data() {
return {};
},
onLoad() {},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
computed: {
...mapState(["userInfo"]),
},
methods: {
lower() {
this.$emit("lower");
},
gotoDetail(data, index) {
console.log("index at line 53:", data);
import {
mapState
} from "vuex";
export default {
props: [
"indexKey",
"dataList",
"label",
"isCondition",
"isNoIcon",
"pagination",
"noDataIcon",
"isLoadingHide",
],
data() {
return {};
},
onLoad() {},
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: {},
};
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 30rpx;
font-size: 30rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #e0e0e0;
display: flex;
align-items: center;
justify-content: space-between;
// position: relative;
}
.list_item :last-child(1) {
border-bottom: none;
}
.scroll-view-item:nth-child(2n-1) {
background-color: #f5f5f5 !important;
}
.list_item {
width: 100%;
padding: 20rpx 30rpx;
font-size: 30rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #e0e0e0;
display: flex;
align-items: center;
justify-content: space-between;
// position: relative;
}
.rightArrow {
width: 40rpx;
height: 40rpx;
// position: absolute;
// right: 30rpx;
// top: 20rpx;
}
.list_item :last-child(1) {
border-bottom: none;
}
.scroll-Y {
height: 100%;
}
.scroll-view-item:nth-child(2n-1) {
background-color: #f5f5f5 !important;
}
.scroll-view_H {
white-space: nowrap;
width: 100%;
}
.rightArrow {
width: 40rpx;
height: 40rpx;
// position: absolute;
// right: 30rpx;
// top: 20rpx;
}
.scroll-view-item {
// height: 300rpx;
// line-height: 300rpx;
// text-align: center;
// font-size: 36rpx;
}
.scroll-Y {
height: 100%;
}
.scroll-view-item_H {
display: inline-block;
width: 100%;
// height: 300rpx;
// line-height: 300rpx;
// text-align: center;
// font-size: 36rpx;
}
.titleItem {
width: calc(100% - 30rpx);
}
/deep/.scroll-view-item:nth-child(2n-1) {
background-color: transparent !important;
}
.list_item:last-child {
border-bottom: none !important;
}
</style>
.scroll-view_H {
white-space: nowrap;
width: 100%;
}
.scroll-view-item {
// height: 300rpx;
// line-height: 300rpx;
// text-align: center;
// font-size: 36rpx;
}
.scroll-view-item_H {
display: inline-block;
width: 100%;
// height: 300rpx;
// line-height: 300rpx;
// text-align: center;
// font-size: 36rpx;
}
.titleItem {
width: calc(100% - 30rpx);
}
/deep/.scroll-view-item:nth-child(2n-1) {
background-color: transparent !important;
}
.list_item:last-child {
border-bottom: none !important;
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,84 +1,41 @@
<template>
<view class="container" style="background-color: #000; position: relative">
<view class="container" style="background-color: #fff; 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>-->
<view style="width: 100%; height: 200px" v-if="currentVideo.type == 1">
<div
class=""
style="background-color: #000"
ref="videoContent"
@tap="renderScript.handleClick"
id="url-player-test"
:videoData="videoData"
:winWidth="winWidth"
:winHeight="winHeight"
:currentVideoList="currentVideoList"
:firstTime="firstTime"
:change:videoData="renderScript.receiveMsg"
:change:winWidth="renderScript.receiveWinWidth"
:change:winHeight="renderScript.receiveWinHeight"
:change:firstTime="renderScript.receiveFirstTime"
:change:currentVideoList="renderScript.receiveVideoList"
></div>
<div @tap="renderScript.emitData" ref="videoContent1" v-show="false">
直接调用renderjs中的emitData的方法,传递当前播放时长
</div>
<div @tap="renderScript.endEmitData" ref="videoContent2" v-show="false">
监听结束方法记录播放时长
</div>
<div class="fullScreenButton-container">
<div
:class="`prism-fullscreen-btn ${isFullScreen ? 'fullscreen' : ''}`"
@tap="renderScript.changeVideoScreen"
></div>
<!-- <img class=" iconfont icon-list" src="../../../../static/icon/cate_bg.png" style="width: 60px;height: 10px;"></img> -->
</div>
</view>
<view style="width: 100%; height: 200px; position: relative" v-else>
<video
@timeupdate="videoTimeUpdateEvent($event)"
ref="videos"
style="width: 100%; height: 100%"
autoplay
id="videoId"
object-fit="contain"
class="video-box"
:src="videoUrl"
:poster="`${videoUrl}?x-oss-process=video/snapshot,t_${1},f_jpg`"
@play="playVideo"
@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>-->
<view style="width: 100%">
<common-list-aliyun
v-if="isSetFirstTime && videoData.playAuth"
:encryptType="1"
:vid="videoData.video"
:playauth="videoData.playAuth"
ref="player"
:useFlashPrism="false"
:autoplay="true"
:isLive="false"
:showBuffer="true"
:cover="cover"
:showBarTime="true"
:disableSeek="true"
showBarTime="500"
width="300px"
controlBarVisibility="always"
>
<cover-view style="position: absolute; top: 10px; z-index: 80">
<cover-view class="returnBack" @click="goBack">
<uni-icons type="back" size="26" color="#fff"></uni-icons>
<text class="txt">返回</text>
</cover-view>
</cover-view>
<!-- <cover-view v-if="isFullScreen && isControl">
<view class="right_title">
<view class="returnBack" @click="quitScreen">
<uni-icons type="back" size="26" color="#fff"></uni-icons>
<text class="txt">返回</text>
</view>
<view class="right_handle">
<uni-icons type="star" size="30" color="#fff"></uni-icons>
<uni-icons type="redo-filled" size="30" color="#fff"></uni-icons>
</view>
</view>
</cover-view> -->
</video>
</common-list-aliyun>
</view>
</view>
</template>
<script>
import store from "@/store/index.js";
import $http from "@/config/requestConfig.js";
import { mapState, mapMutations } from "vuex";
@@ -87,8 +44,11 @@ export default {
props: ["currentVideo", "currentVideoList"],
data() {
return {
platform: null,
//当前是否是全屏模式
isFullScreen: false,
isfresh: false,
isChange: false,
isControl: true,
timer: null,
videoTitle: "",
@@ -107,14 +67,29 @@ export default {
computed: {
...mapState(["videoOssList"]),
},
watch: {
currentVideo: {
immediate: true,
handler(newRoute) {},
},
timer(newValue) {
this.$emit("child-event", newValue);
},
},
// //页面显示
mounted() {},
beforeDestroy() {
this.handleEnd();
console.log("是否走啦习销毁");
clearInterval(this.$store.state.videoTimer);
// this.timer = null;
// store.commit("setLoadingShow", null);
plus.screen.lockOrientation("portrait-primary");
console.log("是否走啦习销毁定时器", this.timer);
},
async onUnload() {
uni.navigateTo({
url: "/pages/curriculum/order/curriculum/back",
@@ -124,45 +99,25 @@ export default {
// plus.screen.lockOrientation("portrait-primary");
// #endif
this.timer = null;
await this.setVideoTime();
this.player.dispose();
// this.player.dispose();
},
//第一次加载
onLoad(options) {
console.log(options, "这是传参");
// #ifdef APP-PLUS
setTimeout(() => {
plus.screen.unlockOrientation();
plus.screen.lockOrientation("landscape-primary");
}, 10);
// #endif
// #ifdef APP-PLUS
// plus.screen.lockOrientation("portrait-primary");
// #endif
if (uni.getStorageSync("videoOssList")) {
this.videoList = JSON.parse(uni.getStorageSync("videoOssList"));
}
console.log("this.videoList at line 53:", this.videoList);
this.options = JSON.parse(options.data);
this.videoId = this.options.video;
this.timer = setInterval(() => {
var that = this;
if (this.currentTime) {
that.setVideoTime();
}
}, 60000 * 10);
},
onLoad(options) {},
methods: {
changeVideoData() {
this.isChange = false;
},
async changeVideo(data) {
this.currentTime = "";
this.firstTime = 0;
this.isSetFirstTime = false;
this.isChange = false;
await this.init(data, true);
},
screenChange(data) {
console.log(
"status at line 这是当前的状态158:",
@@ -190,93 +145,88 @@ export default {
},
// 播放进度改变
videoTimeUpdateEvent(e) {
console.log("e at line 78:", e);
this.playTime = parseInt(e.detail.currentTime);
this.currentTime = parseInt(e.detail.currentTime);
this.allTime = parseInt(e.detail.duration);
console.log("视频播放时长", this.playTime, "视频总时长", this.allTime);
this.recordTime({
time: this.playTime,
});
},
async init(data) {
// uni.getSystemInfo({
// success(res) {
// var winWidth = res.screenWidth;
// var winHeight = res.screenHeight;
// var statusBarHeight = res.statusBarHeight;
console.log("at line 59:", "是否先走这里");
async init(data, isChange) {
this.platform = this.$platform;
this.isfresh = true;
console.log("at line 59:", "是否先走init这里", this.platform);
if (uni.getStorageSync("videoOssList")) {
this.videoList = JSON.parse(uni.getStorageSync("videoOssList"));
}
this.options = data.currentVideo;
console.log("this.options at line 64:", this.options);
this.videoId = this.options.video;
this.timer = setInterval(async () => {
var that = this;
if (this.currentTime) {
await that.setVideoTime();
}
}, 60000 * 10);
await this.getLive();
},
getData(data) {
console.log(
"data at line 这是接口拿回来的时长11111111111111111111:",
this.videoData.userCourseVideoPositionEntity
);
if (!this.isSetFirstTime) {
var netWork = this.videoData.userCourseVideoPositionEntity
? this.videoData.userCourseVideoPositionEntity.position
: 0;
var list = JSON.parse(uni.getStorageSync("videoOssList"));
console.log("这是获取接口 设置的起始时长", netWork);
var index = list.findIndex((e) => e.id == this.videoData.id);
if (netWork) {
if (index >= 0) {
this.firstTime =
list[index].time > netWork ? list[index].time : netWork;
this.videoId = this.options.video;
console.log("这是苹果视屏id", this.videoId);
await this.getLive(isChange);
// this.$emit("child-event", this.timer);
},
async getData(data, isChange) {
if (!this.isSetFirstTime) {
var netWork = data.userCourseVideoPositionEntity
? data.userCourseVideoPositionEntity.position
: 0;
var list = [];
if (uni.getStorageSync("videoOssList")) {
list = JSON.parse(uni.getStorageSync("videoOssList"));
var index = list.findIndex((e) => e.id == data.id);
if (netWork) {
if (index >= 0) {
this.firstTime =
list[index].time > netWork ? list[index].time : netWork;
} else {
this.firstTime = netWork ? netWork : 0;
}
} else {
this.firstTime = netWork ? netWork : 0;
if (index >= 0) {
this.firstTime = list[index].time ? list[index].time : 0;
} else {
this.firstTime = 0;
}
}
} else {
if (index >= 0) {
this.firstTime = list[index].time ? list[index].time : 0;
} else {
this.firstTime = 0;
}
this.firstTime = 0;
}
this.videoData = {
...data,
};
this.isChange = isChange ? isChange : false;
// this.currentTime = this.firstTime;
console.log(this.firstTime, "这是第一次播放时长222");
// await this.setVideoTime();
uni.setStorageSync("videoOssList", JSON.stringify(list));
console.log(
"list at line 这是设置完第一次初始值9777777777777777777770:",
list
);
if (this.currentVideo.type == 0 || this.currentVideo.type == 2) {
this.playVideo();
}
console.log(this.firstTime, "1111111111111111111111");
// if (this.currentVideo.type == 0 || this.currentVideo.type == 2) {
// await this.playVideo();
// }
console.log(this.firstTime, "这是第一次播放时长");
this.isSetFirstTime = true;
}
},
playVideo(e) {
async playVideo(e) {
this.videoContext = uni.createVideoContext("videoId", this);
this.videoContext.seek(this.firstTime);
// this.videoContext.requestFullScreen();
},
recordTime(data) {
this.currentTime = data.time;
console.log("data at line 54:", data);
var list = [];
if (uni.getStorageSync("videoOssList")) {
list = JSON.parse(uni.getStorageSync("videoOssList"));
}
console.log("list at line 56:", list);
console.log("点击后设置播放时长的方法list at line 65:", list);
var index = list.findIndex((e) => e.id == this.videoData.id);
if (list.length > 0 && index >= 0) {
list[index] = {
@@ -292,16 +242,16 @@ export default {
}
uni.setStorageSync("videoOssList", JSON.stringify(list));
console.log(list, "走接口的方法参数");
},
// 获取数据
getLive() {
async getLive(isChange) {
var that = this;
this.isfresh = false;
var data = {
...this.options,
};
$http
await $http
.request({
url: `sociology/course/checkVideo`,
method: "Post", // POST、GET、PUT、DELETE具体说明查看官方文档
@@ -311,41 +261,59 @@ export default {
"Content-Type": "application/json",
},
})
.then((res) => {
.then(async (res) => {
var data = {
...res.video,
};
if (this.currentVideo.type == 1) {
var playAuth = res.video.playAuth.replace(/=/g, "");
this.videoData = {
...res.video,
console.log("这是接口获取的视屏凭证111", playAuth);
data = {
...data,
videoId: res.video.video,
playAuth: playAuth,
};
this.playAuth = playAuth;
} else {
this.videoData = res.video;
this.videoUrl =
// "https://ehh-private-01.oss-cn-beijing.aliyuncs.com/video/taiHuClass/" +
res.video.videoUrl;
this.$nextTick(async () => {
await this.getData();
});
}
this.$forceUpdate();
await that.getData(data, isChange);
} else {
console.log("这是接口获取的视屏凭证222", res.video, data);
data = {
...data,
playAuth: new Date().getTime(),
};
await that.getData(data, isChange);
}
console.log("是否获取到初始播放值", data);
that.$forceUpdate();
});
},
async handleEnd() {
var list = JSON.parse(JSON.stringify(uni.getStorageSync("videoOssList")));
var data = list.find((e) => e.id == this.videoData.id);
this.currentTime = data.time;
await this.setVideoTime();
console.log(
"this.currentTime at line 这是结束的时候掉的存储视频:",
this.currentTime
);
clearInterval(this.$store.state.videoTimer);
this.timer = null;
await this.setVideoTime();
},
setVideoTime(time) {
var data = {};
// var list = uni.getStorageSync("videoOssList");
// data = list.find((e) => e.id == this.videoData.id);
// console.log("这是再走生命周期哦", this.currentTime);
console.log("是否走了存储视屏," + this.videoData.id, this.currentTime);
var data = {
videoId: this.videoData.id,
position: this.currentTime, //秒数
};
console.log("data at line =存储视频时长接口:", data);
$http
.request({
url: `sociology/course/saveCoursePosition`,
@@ -357,8 +325,7 @@ export default {
},
})
.then((res) => {
console.log("res at line 185:", res);
// console.log("data at line 5911111:", this.videoData);
console.log("存储视屏时长接口返回信息", res);
this.$forceUpdate();
});
},
@@ -371,483 +338,30 @@ export default {
delta: 1,
});
},
async setVideoFirtsetTime(time) {
this.currentTime = this.firstTime;
console.log("这里准备开始设置播放时间:", this.currentTime);
// await this.setVideoTime();
// setTimeout(() => {
// clearInterval(this.$store.state.videoTimer);
store.commit(
"setVideoTimer",
setInterval(async () => {
// if (this.currentTime) {
await this.setVideoTime();
// }
}, 60000)
);
// }, 5000);
},
},
created() {},
};
</script>
<script module="renderScript" lang="renderjs">
import $ from 'jquery'
// import StaticADComponent from './staticadcomponent/index.js';
/**
* 静态广告组件
*/
export default {
/**
* 静态广告组件
*/
components: {
// MyComponent
},
mounted() {
// 在适合的生命周期通过script和link标签引入播放器sdk、css
console.log(this.options, '这是monted')
this.loadWebPlayerSDK()
this.loadComponent()
},
data() {
return {
player: null,
curTime: null,
curStatus: null,
// currentTime:null,
}
},
watch: {
curTime(val) {
if (this.curTime !== null && this.curStatus !== null) {
this.$refs.videoContent1.click()
}
}
},
methods: {
handleClick(event, ownerInstance) {
console.log('event at line 165:', event)
// this.player.on('ready',function(){
// var status= this.player.fullscreenService.getIsFullScreen()
// console.log('status at line 403:', status)
// console.log('触发点击事件',status))
// })
ownerInstance.callMethod('getData')
},
emitData(event, ownerInstance) {
var that = this;
ownerInstance.callMethod('recordTime', {
time: that.curTime,
status: that.curStatus
})
},
changeVideoScreen(event, ownerInstance) {
var that = this;
// this.$emit('changeScreenLoading',true)
var status = this.player.fullscreenService.getIsFullScreen();
ownerInstance.callMethod('screenChange', {
status: status,
primary: status ? 'portrait' : 'landscape'
})
if (status) {
setTimeout(() => {
plus.screen.lockOrientation("portrait-primary"); //锁死屏幕方向为竖屏
this.player.fullscreenService.cancelFullScreen();
// this.$emit('changeScreenLoading',false);
}, 100);
// this.player.setPlayerSize('100%','200px');
} else {
// this.player.setPlayerSize({
// w:"400px",
// height:'60%'
// });
// plus.screen.unlockOrientation();
this.player.fullscreenService.requestFullScreen();
setTimeout(() => {
// this.$emit('changeScreenLoading',false);
plus.screen.lockOrientation("landscape-primary");
}, 100);
}
},
endEmitData(event, ownerInstance) {
var that = this;
ownerInstance.callMethod('handleEnd', )
},
getLive() {
if (this.videoData.type == 1) {
var fullScreenButtonComponent = Aliplayer.Component({
/**
* 初始函数在new对象时调用
*
* @param {string} adAddress - 广告视频地址
* @param {string} toAddress - 广告链接地址
*/
init: function(status, toAddress) {
this.fullScreenStatus = status
// this.adAddress = adAddress;
// this.toAddress = toAddress;
this.$html = $('.fullScreenButton-container');
// this.$html.hide();
},
/**
* 创建广告Dom元素
*/
createEl: function(el) {
this.$html.find('.ad').attr('src', this.adAddress);
var $adWrapper = this.$html.find('.ad-wrapper');
$adWrapper.attr('href', this.toAddress);
$adWrapper.click(function() {
// Aliplayer.util.stopPropagation();
});
// this.$html.find('.close').click(function () {
// this.$html.hide();
// });
// $(el).find('.prism-controlbar').append(this.$html);
$(el).find('.prism-time-display').after(this.$html);
},
ready: function(player, e) {
// this.$html.hide()
},
/**
* 隐藏广告
*/
play: function(player, e) {
// this.$html.show();
},
/**
* 显示广告
*/
pause: function(player, e) {
// this.$html.show();
},
/**
* 隐藏广告
*/
playing: function(player, e) {
this.$html.show();
// this.$html.hide();
},
waiting: function(player, e) {
// this.$html.hide()
},
timeupdate: function(player, e) {},
error: function(player, e) {},
/**
* 显示广告
*/
ended: function(player, e) {
// this.$html.show();
}
});
console.log('this.currentVideoList at line 456111111111111111111111:', this.videoList)
var player = new Aliplayer({
id: "url-player-test",
"vid": this.videoData
.videoId, // 必选参数,可以通过点播控制台(路径:媒资库>音/视频查询。示例1e067a2831b641db90d570b6480f****。
"playauth": this.videoData.playAuth, // 必选参数参数值可通过调用GetVideoPlayAuth接口获取。
"encryptType": 1, // 必选参数当播放私有加密流时需要设置本参数值为1。其它情况无需设置。
"playConfig": {
"EncryptType": 'AliyunVoDEncryption'
},
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: ['本课程版权归天津众妙之门科技有限公司所有,翻版必究!', {fontSize: '16px', color: 'red',}, 'random']
// },
{
name: 'adComponent',
type: fullScreenButtonComponent,
args: [
'http://101.201.146.165:8088/Pf-EH/statics/uploadFile/2024-05-10/b0f420c7-9178-41ad-9dd6-f59a64a6e190.png'
]
},
// {
// name: 'RotateMirrorComponent',
// type: AliPlayerComponent.RotateMirrorComponent
// },
],
skinLayout: [{
name: "bigPlayButton",
align: "blabs",
x: 30,
y: 80
},
{
name: "H5Loading",
align: "cc"
},
{
name: "errorDisplay",
align: "tlabs",
x: 0,
y: 0
},
{
name: "infoDisplay"
},
{
name: "tooltip",
align: "blabs",
x: 0,
y: 56
},
{
name: "thumbnail"
},
{
name: "controlBar",
align: "blabs",
x: 0,
y: 0,
children: [{
name: "progress",
align: "blabs",
x: 0,
y: 44
},
{
name: "playButton",
align: "tl",
x: 15,
y: 12
},
{
name: "timeDisplay",
align: "tl",
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",
x: 15,
y: 12
},
{
name: "volume",
align: "tr",
x: 5,
y: 10
}
]
}
]
}, function(player) {
});
this.player = player;
this.$refs.videoContent.click()
var timer = setInterval(() => {
var that = this;
that.curTime = parseInt(this.player.getCurrentTime());
that.curStatus = this.player.getStatus()
}, 1000);
// player.on('ready',function(){
// player.fullscreenService.requestFullScreen()
// })
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();
// });
},
receiveScreenType(newValue) {
console.log('newValue at line 427屏幕方向111111111111:', newValue)
},
receiveFirstTime(newValue, oldValue, ownerVm, vm) {
// //数据变化
console.log('newValue111', newValue)
console.log('vm4444', vm)
console.log('this.firstTime at line 215:', newValue)
if (this.player) {
this.player.seek(newValue);
}
},
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, "1111888888")
if (!this.videoData.playAuth || !this.currentVideoList) {
setTimeout(() => {
this.checkValue();
}, 1000);
} else {
console.log('this.videoList at line 这是这只只是594:', this.currentVideoList)
this.getLive();
}
},
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';
s_tag.charset = 'utf-8';
s_tag.onload = () => {
const s_tag1 = document.createElement('script'); // 引入播放器js
s_tag1.type = 'text/javascript';
s_tag1.src =
'https://player.alicdn.com/aliplayer/presentation/js/aliplayercomponents.min.js';
s_tag1.charset = 'utf-8';
s_tag1.onload = () => {
this.checkValue();
resolve();
}
document.body.appendChild(s_tag1);
}
document.body.appendChild(s_tag);
const l_tag = document.createElement('link'); // 引入播放器css
l_tag.rel = 'stylesheet';
l_tag.href =
'https://g.alicdn.com/apsara-media-box/imp-web-player/2.20.3/skins/default/aliplayer-min.css';
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>
<style>
.container {
width: 100vw;

View File

@@ -22,7 +22,6 @@
}"
>
<template slot="tabs" slot-scope="slotProps">
<common-sticky
label="title"
itemStyle="width:50%;padding-left: 15px; padding-right: 15px; height: 68rpx;"
@@ -32,10 +31,18 @@
></common-sticky>
</template>
<template slot="label" slot-scope="slotProps">
<view class="content_title " style="margin-top: 40px; margin-bottom: 60px;">{{ slotProps.title }}</view>
<view
class="content_title"
:style="`margin-top: ${
slotProps.dataIndex == 0 ? 10 : 30
}px; margin-bottom: 20px;`"
>{{ slotProps.title }}</view
>
</template>
<template slot="contentList" slot-scope="slotProps">
<common-list style="margin-bottom: 120px;"
<common-list
style="margin-bottom: 40px"
v-if="currentCateIndex == 0"
noDataIcon="data"
:isCondition="true"
@@ -90,23 +97,39 @@
</common-list>
</template>
<template slot="detail_buyRecord" slot-scope="slotProps">
<view style="padding: 20px 20rpx 40px">
<view v-html="slotProps.dataList"></view>
<view style="padding: 20rpx">
<rich-text
:nodes="slotProps.dataList | formatRichText"
@click.stop="showPreview"
:data-nodes="slotProps.dataList"
></rich-text>
</view>
</template>
<template slot="detail_useRecord" slot-scope="slotProps">
<view style="padding: 20px 20rpx 40px">
<view v-html="slotProps.dataList"></view>
<view style="padding: 20rpx">
<rich-text
:nodes="slotProps.dataList | formatRichText"
@click.stop="showPreview"
:data-nodes="slotProps.dataList"
></rich-text>
</view>
</template>
<template slot="detail_studyRecord" slot-scope="slotProps">
<view style="padding: 20px 20rpx 40px">
<view v-html="slotProps.dataList"></view>
<view style="padding: 20rpx">
<rich-text
:nodes="slotProps.dataList | formatRichText"
@click.stop="showPreview"
:data-nodes="slotProps.dataList"
></rich-text>
</view>
</template>
<template slot="detail_vipRecord" slot-scope="slotProps">
<view style="padding: 20px 20rpx 40px">
<view v-html="slotProps.dataList"></view>
<view style="padding: 20rpx">
<rich-text
:nodes="slotProps.dataList | formatRichText"
@click.stop="showPreview"
:data-nodes="slotProps.dataList"
></rich-text>
</view>
</template>
</common-anchor-link>
@@ -195,6 +218,36 @@ export default {
...mapState(["userInfo"]),
},
methods: {
formatRichText(html) {
//控制小程序中图片大小
let newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
match = match
.replace(/style="[^"]+"/gi, "")
.replace(/style='[^']+'/gi, "");
match = match
.replace(/width="[^"]+"/gi, "")
.replace(/width='[^']+'/gi, "");
match = match
.replace(/height="[^"]+"/gi, "")
.replace(/height='[^']+'/gi, "");
return match;
});
newContent = newContent.replace(
/style="[^"]+"/gi,
function (match, capture) {
match = match
.replace(/width:[^;]+;/gi, "max-width:100%;")
.replace(/width:[^;]+;/gi, "max-width:100%;");
return match;
}
);
newContent = newContent.replace(/<br[^>]*\/>/gi, "");
newContent = newContent.replace(
/\<img/gi,
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"'
);
return newContent;
},
gotoDetail(v) {
console.log(v);
uni.navigateTo({

View File

@@ -3,11 +3,7 @@
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<template v-show="!screenLoading">
<z-nav-bar
bgColor="#333"
fontColor="#fff"
:title="options.navTitle"
></z-nav-bar>
<z-nav-bar bgColor="#333" fontColor="#fff" title="教学内容"></z-nav-bar>
<view
class="contentBox curriculum_box"
@@ -19,13 +15,12 @@
<common-video
@changeScreen="changeScreen"
@changeScreenLoading="changeScreenLoading"
v-if="isfresh"
ref="commonVideo"
:currentVideo="currentVideo"
:currentVideoList="videoArray"
>
</common-video>
<view style="height: 200px" v-else></view>
<!-- <view style="height: 200px" v-else></view> -->
</view>
<!-- <common-sticky
@@ -43,15 +38,18 @@
class="scroll-Y"
style="background-color: #fff"
>
<view class="" style="padding: 20rpx; font-size: 34rpx; color: #333"
>课程{{ options.navTitle }}
</view>
<view style="padding: 20rpx; margin-bottom: 40rpx">
章节 {{ curriculumData.title }}
</view>
<view
class="PM_font"
style="padding: 20rpx; font-size: 40rpx; color: #3ab3ae"
>视频教学</view
>
<view class="scroll-view-item">
<view style="padding: 20rpx; margin-bottom: 40rpx">
{{ curriculumData.title }}
</view>
<common-curriculum-video
v-if="videoArray.length > 0"
:detailInfo="curriculumData"
@@ -69,15 +67,13 @@
>
<view class="scroll-view-item">
<common-rich-detail :detailInfo="{ ...curriculumData, title: '' }">
<template #richHeadImg>
<image
:src="curriculumData.imgUrl"
mode="widthFix"
class="headImage"
></image>
<!-- <image :src="detailInfo.imgUrl" v-if="detailInfo.imgUrl" mode="widthFix" class="headImage"></image> -->
</template>
<image
v-if="curriculumData.imgUrl"
@click="previewImage(curriculumData.imgUrl)"
:src="curriculumData.imgUrl"
mode="widthFix"
class="headImage"
></image>
</common-rich-detail>
</view>
</scroll-view>
@@ -222,7 +218,18 @@
</view>
</template>
<view style="background-color: red;position: fixed;top: 0;left: 0;right: 0;bottom: 0;" v-show="screenLoading" > </view>
<view
style="
background-color: red;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
"
v-show="screenLoading"
>
</view>
<!-- <u-modal
:show="show"
:title="modalInfo.title"
@@ -232,7 +239,7 @@
@cancel="hancleModalCancel"
></u-modal> -->
<z-navigation></z-navigation>
</view>
</template>
@@ -320,10 +327,16 @@ export default {
};
},
onLoad(options) {
plus.screen.lockOrientation("default");
this.options = options;
this.options = options;
this.getCourseDescriptionData();
// plus.screen.lockOrientation("default");
this.screenLoading = false;
this.currentCateIndex = 0;
// #ifdef APP-PLUS
// plus.screen.unlockOrientation(); //解除锁定屏幕方向
// plus.screen.lockOrientation("portrait-primary");
// this.getUserInfo()
// this.getCateList()
},
@@ -332,11 +345,6 @@ export default {
// this.searchList = []
},
onShow() {
this.screenLoading=false
this.currentCateIndex = 0;
// #ifdef APP-PLUS
plus.screen.unlockOrientation(); //解除锁定屏幕方向
plus.screen.lockOrientation("portrait-primary");
// #endif
},
computed: {
@@ -355,7 +363,7 @@ export default {
this.$forceUpdate();
},
initVideo() {
this.screenLoading=false;
this.screenLoading = false;
this.isfresh = false;
this.$nextTick(() => {
this.isfresh = true;
@@ -368,16 +376,35 @@ export default {
});
},
changeVideo(data) {
console.log('data at line 370:', data)
this.currentVideo = data;
this.initVideo();
this.isOpenMp3 = false;
if (data.id != this.currentVideo.id) {
clearInterval(this.$store.state.videoTimer);
console.log(
"父页面是否触发了切换视屏呀:",
data.id,
this.currentVideo.id
);
this.currentVideo = data;
// setTimeout(() => {
this.$refs.commonVideo.changeVideo({
currentVideo: data,
currentVideoList: this.videoArray,
});
// }, 200);
// // handleEnd
// this.$refs.commonVideo.handleEnd();
// this.currentVideo = data;
// this.initVideo();
// this.isOpenMp3 = false;
}
console.log("data at line 380111111111111111111:", data.type);
// var mynavData = JSON.stringify(data); // 这里转换成 字符串
// if (data.type == 0 || data.type == 2) {
// //1 mp4 2 mp3
// //0 mp4 2 mp3
// uni.navigateTo({
// url: `/pages/curriculum/order/curriculum/videoDetail?data=${mynavData}`,
// });
@@ -449,12 +476,12 @@ export default {
// id: "16457",
};
var that = this;
console.log(this.$store.state, "11111111111");
$http
.request({
// url: "book/buyOrder/buySave",
url: `${this.urlList.detail}`,
url:'sociology/course/getCourseCatalogueChapterDetail',
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: {
@@ -462,7 +489,9 @@ export default {
"Content-Type": "application/json",
},
})
.then(async (res) => {
.then(async (res) => {
console.log(this.$store.state, "11111111111");
console.log('res at line 491:', res)
that.curriculumData = res.data.detail;
that.videoArray = res.data.videos;
if (that.videoArray.length > 0) {
@@ -902,6 +931,7 @@ export default {
<style lang="scss" scoped>
@import "@/style/mixin.scss";
.u-grid-list {
// height: 40rpx;
}

File diff suppressed because it is too large Load Diff

View File

@@ -5,18 +5,13 @@
>
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar
:title="options.navTitle"
bgColor="#5F8F7F"
fontColor="#fff"
></z-nav-bar>
<z-nav-bar title="课程详情" bgColor="#5F8F7F" fontColor="#fff"></z-nav-bar>
<common-anchor-link
style="width: 100%"
baseHeight="200"
ref="commonAnchorLink"
:allDataList="allDataList"
titleKey="title"
dataListKey="courseList"
:titleStyle="{}"
@@ -24,25 +19,16 @@
background: '#fff',
}"
>
<template slot="tabs" slot-scope="slotProps">
</template>
<template slot="labelSlot" slot-scope="slotProps">
<u-icon
v-if="
slotProps.data.isBuy != 1 &&
(vip.type == 0 || vip.type == 3)
"
class="editIcon"
name="lock-fill"
color="#aaa"
size="26"
style="display: inline-block; margin-left: 5rpx"
></u-icon>
<template slot="tabs" slot-scope="slotProps"> </template>
<template slot="labelSlot" slot-scope="slotProps">
<u-icon
v-if="slotProps.data.isBuy != 1 && (vip.type == 0 || vip.type == 3)"
class="editIcon"
name="lock-fill"
color="#aaa"
size="26"
style="display: inline-block; margin-left: 5rpx"
></u-icon>
</template>
<template slot="otherContent" slot-scope="slotProps">
@@ -60,7 +46,11 @@
:title="goBuyTitle"
:show-icon="true"
>
<template slot="rightSlot" slot-scope="slotProps">
<template
slot="rightSlot"
slot-scope="slotProps"
v-if="$platform == 'android'"
>
<text class="saveBtn vipBtn flexbox buyBtn" v-if="goBuyType == 0">
立即购买
</text>
@@ -111,7 +101,13 @@
<!-- <view class="start_learn_btn PM_font">进入学习</view> -->
</view>
<view style="color: #b0b0b0;padding: 0 20rpx;">{{ cateList&&cateList.length>0?`共${cateList.length}个目录`:'' }}</view>
<view style="color: #b0b0b0; padding: 0 20rpx">
{{
cateList && cateList.length > 0
? `${cateList.length}个目录`
: ""
}}
</view>
<view
class="containerBg"
v-if="curriculumData.content && curriculumData.content != ''"
@@ -277,8 +273,8 @@
src="@/static/icon/course_07.png"
mode="aspectFil"
class="icon1"
>学习进度</image
>
>学习进度
</image>
</view>
<view class="progress_box">
<view class="progress_icon" style=""
@@ -303,8 +299,8 @@
</view>
</view>
</view>
</view></view
>
</view>
</view>
</view>
</template>
</common-anchor-link>
@@ -334,8 +330,8 @@
<view class="popup_box">
<view class="title">温馨提示</view>
<view class="content">
<view class="center"
>用户您好,本软件对于一个用户名及密码仅允许一部电子设备登陆,多部设备使用同一用户名操作软件的行为属于违规操作,发现违规一次将提出警告,再次违规您的用户名将被封号,无法正常登陆,如因此对您使用带来不便,敬请谅解。<br />
<view class="center">
用户您好,本软件对于一个用户名及密码仅允许一部电子设备登陆,多部设备使用同一用户名操作软件的行为属于违规操作,发现违规一次将提出警告,再次违规您的用户名将被封号,无法正常登陆,如因此对您使用带来不便,敬请谅解。<br />
课程购买之后一年内不打开,此一年内不会计算有效学习时间,一年后会自动开始计算有效学习时间。<br />
本课程一经购买,暂不支持退款,敬请谅解。<br />
@@ -534,11 +530,12 @@ export default {
},
getUserInfo() {
this.$http.post("common/user/getUserInfo").then((res) => {
console.log("res at line 505:", res);
if (res.result.userVip) {
this.vip = res.result.userVip;
} else {
this.vip = { type: 0 };
this.vip = {
type: 0,
};
}
switch (this.vip.type) {
@@ -803,11 +800,10 @@ export default {
} else {
list = [];
}
console.log("at line 1333:", list);
this.$forceUpdate();
});
console.log("list at line 1375:", list);
return list;
},
getCourseDescriptionData() {
@@ -1036,6 +1032,7 @@ export default {
<style lang="scss" scoped>
@import "@/style/mixin.scss";
.u-grid-list {
// height: 40rpx;
}
@@ -1468,12 +1465,14 @@ export default {
border-radius: 10rpx;
}
}
.popup_box {
padding-bottom: 20rpx;
width: 85vw;
overflow: hidden;
position: relative;
height: auto;
.title {
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
font-weight: normal;
@@ -1511,6 +1510,7 @@ export default {
color: #b0b0b0;
}
}
.button_box {
display: flex;
align-items: center;
@@ -1541,6 +1541,7 @@ export default {
font-size: 28rpx;
}
}
.vipBtn {
@include theme("vipbtnbg");
border-radius: 100rpx;
@@ -1550,6 +1551,7 @@ export default {
color: #fff;
margin: 10rpx auto;
}
.buyBtn {
background: #f42c32 !important;
// background:
@@ -1558,22 +1560,28 @@ export default {
/deep/.u-alert--warning--light {
background-color: none !important;
}
/deep/.u-alert__text--warning--light {
color: #fff !important;
}
/deep/.u-alert {
background: none !important;
}
/deep/.u-icon__icon--warning {
color: #fff !important;
}
/deep/.uni-section {
background: transparent !important;
}
/deep/.uni-section .uni-section-header {
padding-top: 10rpx !important;
padding-bottom: 10rpx !important;
}
/deep/.uni-section .uni-section-header {
padding-left: 0rpx !important;
// padding-bottom: 10rpx !important;
@@ -1607,6 +1615,7 @@ export default {
// display:inline-block;
// padding:10rpx 20rpx;
}
.chapter_content {
// padding: 20rpx;
// padding-top:60rpx;
@@ -1619,10 +1628,12 @@ export default {
box-shadow: 0px 0px 4px 0px rgba(46, 114, 123, 0.6) !important;
border-top-right-radius: 40rpx;
border-bottom-left-radius: 40rpx;
.videoList {
// padding:0 20rpx;
display: flex;
align-items: center;
// justify-content: space-between;
.video_item {
width: 24%;
@@ -1672,10 +1683,12 @@ export default {
font-size: 72rpx;
text-align: center;
}
.shiting_content {
// padding: 20rpx 0 0;
}
}
.chapter_title {
width: 100%;
font-size: 28rpx;
@@ -1688,18 +1701,22 @@ export default {
width: 100%;
display: flex;
align-items: center;
.left {
display: flex;
align-items: center;
}
.right {
// float: right;
position: absolute;
right: 0;
}
}
.not_purchased {
position: relative;
.spot {
width: 8rpx;
height: 8rpx;
@@ -1709,22 +1726,26 @@ export default {
background-color: #33435d;
bottom: -4rpx;
}
color: #33435d;
margin-left: 20rpx;
font-size: 24rpx;
padding: 0 20rpx;
border-bottom: 2rpx dotted #33435d;
text {
margin: 0 10rpx;
letter-spacing: 1rpx;
}
}
}
.course_title {
align-items: center;
justify-content: space-between;
background: #fff;
}
.catalogueTitle {
justify-content: space-between;
overflow: hidden;
@@ -1782,6 +1803,7 @@ export default {
}
}
}
.prof {
font-size: 26rpx;
line-height: 50rpx;
@@ -1803,6 +1825,7 @@ export default {
// background-color: #fff;
// overflow: hidden;
}
.courseTitle {
width: calc(100% - 220rpx);
padding: 20rpx;
@@ -1812,6 +1835,7 @@ export default {
background-size: cover;
background-repeat: no-repeat;
}
.catalogueList {
// background: linear-gradient(108deg, #F0FBF4 0%, #d1e8da 100%) !important;
padding-bottom: 40rpx;
@@ -1823,9 +1847,10 @@ export default {
}
/deep/.section {
padding-top: 0 !important;
padding-top: 0 !important;
background: linear-gradient(108deg, #f0fbf4 0%, #d1e8da 100%) !important;
}
/deep/.section_box {
padding-top: 0 !important;
}

View File

@@ -40,7 +40,7 @@
</view>
<view class="normal_box" v-else>
<view class="normal_box_top">
<view class="curriulum_title">请添加收地址 </view>
<view class="curriulum_title">请添加收地址 </view>
</view>
</view>
<view class="right">

File diff suppressed because it is too large Load Diff

View File

@@ -25,20 +25,16 @@
<view class="mine_box" :style="`top:${(45 + statusBarHeight) * 2}rpx`">
<view class="per_mes">
<view style="display: flex;align-items: center;flex-direction: column;">
<image
@click="goUserInfo"
:src="userMes.avatar"
v-if="userMes.avatar != null"
class="per_mes_img color_shandow"
></image>
<view class="user_vip_box">
<view v-if="userMes.vip == 1" class="user_vip super">超级VIP</view>
<view v-if="userMes.vip == 3" class="user_vip">众妙之门VIP</view>
<view v-if="userMes.vip == 2" class="user_vip">吴门医述VIP</view>
<view
style="display: flex; align-items: center; flex-direction: column"
>
<image
@click="goUserInfo"
:src="userMes.avatar"
v-if="userMes.avatar != null"
class="per_mes_img color_shandow"
></image>
</view>
</view>
<image
src="@/static/icon/home_icon_logo.png"
@@ -46,20 +42,47 @@
class="per_mes_img color_shandow"
></image>
<view class="userInfoBox" style="width: calc(100% - 220rpx);">
<template>
<view class="name"
>昵称{{ userMes.nickname ? userMes.nickname : "未设置" }}</view
>
</template>
<view class="userInfoBox" style="width: calc(100% - 120rpx)">
<view class="name"
>昵称{{ userMes.nickname ? userMes.nickname : "未设置" }}</view
>
<view
class="name"
v-if="!userMes.userVip"
style="
font-size: 28rpx;
font-weight: 500;
color: #606266 !important;
"
>普通用户</view
>
<template v-if="userMes.tel">
<view class="phone">手机号({{ userMes.tel }})</view>
</template>
<template v-if="userMes.email">
<view class="phone email">邮箱({{ userMes.email }})</view>
</template>
<view style="display: flex; align-items: center" v-else-if="userMes.userVip&&$platform=='ios'">
<view class="user_vip_box1">
<view v-if="userMes.vip == 1" class="user_vip super user_vip_super"
>超级VIP</view
>
<view v-if="userMes.vip == 3" class="user_vip user_vip_zmzm">众妙之门VIP</view>
<view v-if="userMes.vip == 2" class="user_vip user_vip_wumen">吴门医述VIP</view>
</view>
<view class="viptime" v-if="userMes.vip != 0"
>会员时长{{
userMes.userVip.endTime.split(" ")[0]
}}&nbsp;到期</view
>
</view>
<!-- -->
<!-- <view class="phone" v-if="userMes.tel">手机号({{ userMes.tel }})</view>
<view class="phone email" v-if="userMes.email">邮箱({{ userMes.email }})</view>
-->
<!-- <text class="tong">累计读书5本
<span style="margin: 0 20upx;">|</span> 今日读50分钟
</text> -->
@@ -82,11 +105,154 @@
</text>
<b class="kt_btn" @click="onPageJump('./opeVip')">立即续费</b>
</view> -->
<view
v-if="$platform=='android'"
style="
padding: 20rpx 20rpx 0;
height: auto;
display: flex;
align-items: center;
justify-content: space-between;
"
>
<template >
<view
v-if="!userMes.userVip"
:class="`chong_zhi boxShadow box_fillet vip_box`"
@click="onPageJump('/pages/mine/vip/index')"
>
<view class="noVip">
<view class="zhanghu PM_font" style="text-align: center">
<image
class="vip_image"
src="@/static/icon/mine_p.png"
mode="aspectFit"
>
</image>
<text style="color: #452808; letter-spacing: 2rpx">超级VIP</text>
</view>
<view style="margin-left: 20rpx">加入会员畅享更多专属权益</view>
<view class="right_arrow" style="color: #fff">
<!-- <image src="@/static/icon/mine_p.png" mode="aspectFit"> </image> -->
>
</view>
<!-- <swiper
:autoplay="true"
:interval="3000"
:duration="1000"
style="width: 100%; height: 60rpx"
>
<swiper-item
v-for="(item, index) in swiperList"
style="width: 100%; height: 100%"
>
<view
style="
background: linear-gradient(
130deg,
rgb(46, 103, 106) 0%,
rgb(114, 173, 146) 100%
)
text;
text-align: center;
"
:style="item.style"
v-html="item.name"
></view>
</swiper-item>
</swiper> -->
</view>
</view>
<view
v-else
:class="`chong_zhi boxShadow box_fillet vip_box hasVipBox ${
userMes.vip == 1
? 'hasVipSuper'
: userMes.vip == 2
? 'hasVipWumen'
: userMes.vip == 3
? 'hasVipZmZm'
: ''
}`"
@click="onPageJump('/pages/mine/vip/index')"
>
<view class="current_identity">当前身份</view>
<view class="hasVip" style="position: relative">
<view class="zhanghu" style="text-align: center">
<view class="vbg" v-if="userMes.vip == 2 || userMes.vip == 3"
>V</view
>
<image
v-if="userMes.vip == 1"
class="vip_image"
src="@/static/icon/quanyi.png"
mode="aspectFit"
>
</image>
<!-- <image
v-if="userMes.vip == 3"
class="vip_image"
src="@/static/icon/quanyiZM.png"
mode="aspectFit"
>
</image>
<image
v-if="userMes.vip == 2"
class="vip_image"
src="@/static/icon/quanyi.png"
mode="aspectFit"
>
</image> -->
<view v-if="userMes.vip == 1" class="vip_info">
<view class="PM_font vip_name">超级VIP</view>
</view>
<view v-if="userMes.vip == 3" class="vip_info">
<view class="PM_font vip_name">众妙之门VIP</view>
</view>
<view v-if="userMes.vip == 2" class="vip_info">
<view class="PM_font vip_name">吴门医述VIP</view>
</view>
<view class="viptime"
>会员时长{{
userMes.userVip.endTime.split(" ")[0]
}}&nbsp;到期</view
>
</view>
<view class="zhanghu quanyi" style="text-align: center">
<!-- <image
class="vip_image"
src="@/static/icon/quanyi.png"
mode="aspectFit"
>
</image> -->
<view v-if="userMes.vip == 1" class="vip_info vip_info_bottom">
<view style="color: #d33b1b">尊享 5 项专属特权</view>
<view class="xufei">立即续费</view>
</view>
<view v-if="userMes.vip == 2" class="vip_info vip_info_bottom">
<view style="">尊享 4 项专属特权,</view>
<view class="xufei">立即续费</view>
</view>
<view v-if="userMes.vip == 3" class="vip_info vip_info_bottom">
<view style="">尊享 4 项专属特权</view>
<view class="xufei">立即续费</view>
</view>
</view>
</view>
</view>
</template>
</view>
<view
style="
padding: 20rpx;
height: 220rpx;
height: auto;
display: flex;
align-items: center;
justify-content: space-between;
@@ -181,68 +347,8 @@
>
</view>
</view>
<view
class="chong_zhi boxShadow box_fillet vip_box"
@click="onPageJump('/pages/mine/vip/index')"
>
<view v-if="!userMes.userVip" class="noVip">
<view class="zhanghu PM_font" style="text-align: center">
<image
class="vip_image"
src="@/static/icon/noquanyi.png"
mode="aspectFit"
>
</image>
<text style="color: #c4d3d4">VIP</text>
</view>
<swiper
:autoplay="true"
:interval="3000"
:duration="1000"
style="width: 100%; height: 60rpx"
>
<swiper-item
v-for="(item, index) in swiperList"
style="width: 100%; height: 100%"
>
<view
style="
background: linear-gradient(
130deg,
rgb(46, 103, 106) 0%,
rgb(114, 173, 146) 100%
)
text;
text-align: center;
"
:style="item.style"
v-html="item.name"
></view>
<!-- <image :src="curriculumData.explainsImg" mode="widthFix" class="headImage"></image> -->
</swiper-item>
</swiper>
</view>
<view v-else class="noVip hasVip" style="position: relative;">
<view class="zhanghu " style="padding-top: 20rpx;text-align: center">
<image
class="vip_image"
src="@/static/icon/quanyi.png"
mode="aspectFit"
>
</image>
<text class="PM_font">VIP</text>
<view class="viptime" v-if="userMes.vip!=0"
>{{ userMes.userVip.endTime.split(" ")[0] }}&nbsp;到期</view
>
</view>
<view class="PM_font xufei"
>立即续费</view
>
</view>
</view>
</view>
<view class="list_box order_box">
<view class="xiugai boxShadow box_fillet">
<view class="title">我的订单</view>
@@ -257,7 +363,7 @@
<image
:src="v.imgUrl"
mode="aspectFill"
style="width: 59rpx; height: 59rpx"
style="width: 58rpx; height: 58rpx"
></image
><u-badge
type="error"
@@ -646,13 +752,12 @@ export default {
});
}
},
goOrderList(url, type, index) { uni.setStorageSync("orderStatus", index);
goOrderList(url, type, index) {
uni.setStorageSync("orderStatus", index);
console.log("url at line 644:", url);
uni.switchTab({
url: url,
success: function (res) {
},
success: function (res) {},
});
},
switchTab(url) {
@@ -742,7 +847,7 @@ export default {
.per_mes {
// height: 200rpx;
position: relative;
margin: 0rpx 40rpx 60rpx 40rpx;
margin: 0rpx 20rpx 0rpx 20rpx;
align-items: center;
display: flex;
align-items: center;
@@ -750,10 +855,10 @@ export default {
.per_mes_img {
// @include themeBorder(10rpx,10rpx,#4E79A3, #A6D8DC);
width: 140rpx;
height: 140rpx;
width: 90rpx;
height: 90rpx;
// background-color: #fff;
border-radius: 140rpx;
border-radius: 90rpx;
margin: 0 0 0 0;
float: left;
}
@@ -766,12 +871,13 @@ export default {
width: 100%;
// display: inline-block;
font-weight: bold;
font-size: 38upx;
font-size: 30rpx;
margin-bottom: 10rpx;
color: #333 !important;
}
.phone { font-weight: bold;
.phone {
font-weight: bold;
font-size: 28rpx;
color: #333;
}
@@ -843,7 +949,7 @@ export default {
.zhanghu {
width: 100%;
margin-bottom: 10rpx;
font-size: 44rpx;
// line-height: 80rpx;
font-weight: bold;
display: flex;
@@ -857,12 +963,14 @@ export default {
height: 100%;
display: flex;
align-items: center;
justify-content: space-around;
flex-direction: column;
padding: 0 20rpx;
// justify-content: space-between;
// flex-direction: column;
.zhanghu {
font-size: 40rpx;
width: 120rpx;
margin-top: 20rpx;
font-size: 42rpx;
width: auto;
display: inline-block;
// margin-top: 20rpx;
margin-bottom: 0rpx;
text-align: center;
display: flex;
@@ -871,19 +979,18 @@ export default {
image {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}
}
}
.hasVip {
}
.chong_list {
display: flex;
align-items: center;
font-size: 30rpx;
justify-content: space-between;
margin-bottom: 40rpx;
// margin-bottom: 40rpx;
.left {
display: flex;
align-items: center;
@@ -897,7 +1004,7 @@ export default {
color: $themeColor;
.text {
font-size: 28rpx;
font-size: 30rpx;
display: block;
font-weight: 700;
// margin: 0 0 10rpx 0;
@@ -910,8 +1017,8 @@ export default {
position: absolute;
font-size: 26rpx;
display: block;
top: 0px;
right: 0px;
// top: 0px;
right: 20rpx;
float: right;
border-radius: 50rpx;
color: #fffbf6;
@@ -978,34 +1085,39 @@ export default {
.chongzhi_box {
position: relative;
width: calc(100% - 320rpx);
width: calc(100%);
height: 100%;
float: left;
padding: 30rpx 20rpx 10rpx;
padding: 20rpx 20rpx;
background-color: #edf6f5ad;
border-radius: 20rpx;
}
.vip_box {
padding: 0;
padding: 20rpx 0;
float: right;
position: relative;
width: 300rpx;
height: 100%;
border-radius: 20rx;
width: 100%;
height: auto;
border-radius: 10rx !important;
// background: rgba(255, 255, 255, 0.85);
// padding: 30rpx 20rpx 10rpx;
// background-color: $themeBgColor;
// @include themeBorder(6rpx, 20rpx, #3ab3ae, #a6d8dc);
@include themeBorder(
10rpx,
20rpx,
(
linear-gradient(#edf6f5ad, #edf6f5ad),
linear-gradient(to bottom left, #bed1b1, #a6d8dc)
)
);
// #FFE9BB
background-image: linear-gradient(80deg, #eaeff2 0%, #c2d0db 100%);
.PM_font {
color: #476379;
}
// @include themeBorder(
// 10rpx,
// 20rpx,
// (
// linear-gradient(#edf6f5ad, #edf6f5ad),
// linear-gradient(to bottom left, #bed1b1, #a6d8dc)
// )
// );
.zhanghu {
font-size: 80rpx;
@@ -1057,7 +1169,7 @@ uni-page-body {
align-items: center;
// width: 80rpx;
// height: 80rpx;
padding: 8rpx;
padding: 0;
box-sizing: border-box;
font-weight: bold;
// float: left;
@@ -1127,9 +1239,9 @@ uni-page-body {
.user_vip_box {
z-index: 10;
// min-width: 130rpx;
margin-top:-20rpx ;
// margin-top: -20rpx;
// position: absolute;
bottom: -20rpx;
// bottom: -20rpx;
display: flex;
align-items: center;
justify-content: center;
@@ -1137,18 +1249,38 @@ margin-top:-20rpx ;
.user_vip {
font-size: 24rpx;
width: auto;
padding: 4rpx 10rpx;
padding: 1rpx 20rpx;
font-weight: 800;
border-radius: 20rpx;
background: linear-gradient(
to right,
rgb(204, 229, 244) 0%,
rgb(197, 227, 215) 100%
);
border-radius: 40rpx;
// background: linear-gradient(
// to right,
// rgb(204, 229, 244) 0%,
// rgb(197, 227, 215) 100%
// );
}
.user_vip_box1{
.user_vip{
// padding: 0;
font-size: 20rpx;
margin-right: 10rpx;
}
.user_vip_super{
background-image: linear-gradient(90deg, #fff0dc 0%, #f8e483 100%);
}
.user_vip_wumen{
background-image: linear-gradient(90deg, #c4e8fe 0%, #60bcff 100%);
}
.user_vip_zmzm{
background-image: linear-gradient(90deg, #aff7d6 0%, #edf5f1 100%);
}
}
.super {
background: linear-gradient(to right, #5bc9c1 0%, #268798 100%);
color: #f4f2e4;
// background: linear-gradient(to right, #fff0dc 0%, #f8e483 100%);
color: #f4a04c;
}
.cate_box {
width: 100%;
@@ -1165,7 +1297,7 @@ margin-top:-20rpx ;
display: flex;
align-items: center;
justify-content: space-around;
padding: 20rpx 0rpx 40rpx;
padding: 5rpx 0rpx 20rpx;
box-sizing: border-box;
.cate_item_box {
@@ -1212,24 +1344,201 @@ margin-top:-20rpx ;
}
}
.viptime {
// padding: 15rpx 20rpx;
font-size: 24rpx;
margin-top: 4rpx;
border-radius: 50rpx;
// background: rgba(255, 255, 255, 0.65);
// color: #6d6d6d !important;
color: rgb(211, 59, 27) !important;
// margin-top: 10rpx;
line-height: 20rpx;
}
.right_arrow {
background: #4b6579;
width: 40rpx;
height: 40rpx;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 10rpx;
position: absolute;
left: 10rpx;
top: 10rpx;
// padding: 15rpx 20rpx;
font-size: 20rpx;
border-radius: 50rpx;
// background: rgba(255, 255, 255, 0.65);
color: #6D6D6D !important;
// margin-top: 10rpx;
line-height: 20rpx;
}
.xufei{
color: rgba(244, 43, 51,0.85);
font-size: 38rpz;
border-radius: 50rpx;
padding: 0rpx 20rpx;
background: rgba(255, 255, 255, 1);
}
right: 20rpx;
image {
width: 100%;
height: 100%;
}
}
.current_identity {
top: 0;
line-height: 32rpx;
position: absolute;
padding: 2rpx 10rpx;
border: 4rpx solid #fff;
border-bottom-right-radius: 20rpx;
border-top-left-radius: 20rpx;
font-size: 20rpx;
font-weight: bold;
}
.hasVipBox {
padding-top: 45rpx;
padding-bottom: 0rpx;
box-shadow: 0px 0px 5px 1px rgba(255, 255, 255, 0.45);
border-radius: 20rpx;
.vip_name {
font-size: 60rpx;
}
.vip_info {
display: flex;
align-items: center;
font-size: 24rpx;
padding: 0 30rpx;
}
.viptime {
text-align: left;
padding: 0 30rpx;
font-size: 24rpx;
color: #333 !important;
// margin-top: 10rpx;
font-weight: 500;
margin-bottom: 20rpx;
}
}
.vbg {
font-size: 300px;
font-weight: 800;
position: absolute;
color: #3e9d78bd !important;
right: -40rpx;
top: -10px;
}
.xufei {
position: absolute;
height: 46rpx;
right: 20rpx;
color: rgba(244, 43, 51, 0.85) !important;
font-size: 24rpx;
border-radius: 50rpx;
line-height: 46rpx;
padding: 0rpx 20rpx;
background: rgba(255, 255, 255, 1);
}
.hasVipSuper {
border: 2rpx solid #fff1ca;
background-image: linear-gradient(90deg, #fff0dc 0%, #f8e483 100%);
.current_identity {
background-color: #fdefb5;
color: #c47029;
}
.PM_font {
color: #f4a04c;
}
}
.hasVipZmZm {
// border: 2rpx solid rgb(112, 179, 177);
box-shadow: 0px 0px 5px 1px RGBA(235, 247, 243, 0.45);
background-image: linear-gradient(90deg, #aff7d6 0%, #edf5f1 100%);
// color: #38710A;
.viptime {
color: #486a65;
}
.vip_name {
letter-spacing: 1px;
}
.current_identity {
background-color: #a9ddc4;
color: #20575c;
}
.PM_font {
color: #3e9d78;
}
.viptime {
color: #9acbce;
}
.hasVip .quanyi {
border-color: #b7f6ed;
color: #ffd598;
}
.xufei {
background-image: linear-gradient(90deg, #f6dc95 0%, #ffc45e 100%);
color: #3d2700 !important;
}
.vip_info_bottom {
color: #486a65;
}
}
.hasVipWumen {
background-image: linear-gradient(90deg, #c4e8fe 0%, #60bcff 100%);
// border: 2rpx solid rgb(112, 179, 177);
box-shadow: 0px 0px 5px 1px RGBA(235, 247, 243, 0.45);
// color: #38710A;
.viptime {
color: #486a65;
}
.vip_name {
letter-spacing: 1px;
}
.current_identity {
background-color: #e8f9ff;
color: #243a61;
}
.PM_font {
color: #127dff;
}
.viptime {
color: #1d3a65;
}
.hasVip .quanyi {
border-color: #e3f7fe;
color: #ffd598;
}
.xufei {
background-image: linear-gradient(90deg, #f6dc95 0%, #ffc45e 100%);
color: #3d2700 !important;
}
.vip_info_bottom {
color: #3583C3;
}
.vbg {
color: #d1effc !important;
}
}
.hasVip {
position: relative;
display: block !important;
.zhanghu {
display: block;
}
.vip_image {
position: absolute;
right: 20rpx;
top: -20rpx;
width: 120rpx;
height: 120rpx;
// margin-right: 10rpx;
}
.zhanghu {
}
.quanyi {
border-top: 1rpx solid #f2d494;
width: 100% !important;
width: 100% !important;
}
}
.vip_info_bottom {
height: 64rpx;
}
</style>

File diff suppressed because it is too large Load Diff