vip功能

This commit is contained in:
liuyuan
2025-02-19 12:01:58 +08:00
563 changed files with 228600 additions and 2650 deletions

View File

@@ -19,7 +19,7 @@
<view
class="main_content_box"
:style="`height:calc(100vh - ${(120 + statusBarHeight) * 2}rpx)`"
:style="`height:calc(100vh - ${(130 + statusBarHeight) * 2}rpx)`"
>
<view class="curriculum_box cate_box">
<view
@@ -79,7 +79,7 @@
<view class="book_content">
<view class="book_name">{{ v.productName }}</view>
<view class="bottom">
<!-- <view class="bottom">
<view class="book_price">
<view class="book_price_current">
<text class="price_icon"></text>
@@ -92,7 +92,7 @@
>
</view>
<view class="sumSales">已售{{ v.sumSales }}</view>
</view>
</view> -->
</view>
</view>
</scroll-view>
@@ -697,7 +697,7 @@ function calcTimer(timer) {
.book_name {
font-family: MicrosoftYaHei;
font-weight: 600;
font-size: 24rpx;
font-size: 26rpx;
line-height: 24rpx;
height: 50rpx;
color: #020001;

View File

@@ -1,7 +1,4 @@
<template><page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<template><page-meta :page-font-size="$baseFontSize() + 'px'" :root-font-size="$baseFontSize() + 'px'"></page-meta>
<view class="container commonPageBox commonDetailPage" style="background-color: #f2f2f2">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
@@ -100,7 +97,7 @@
</view> -->
<view class="btns flexbox">
<view class="booknameleft"> 充值 {{
slotProps.row.bookBuyConfigEntity.money
slotProps.row.bookBuyConfigEntity? slotProps.row.bookBuyConfigEntity.money:""
}}天医币</view>
<view style="
@@ -491,15 +488,18 @@
uni.stopPullDownRefresh();
this.newestpage = 1;
this.pagination.page = 1
// this.hotestpage = 1
// this.booksetpage = 1
this.newList = [];
// this.hotList = []
// this.bookList = []
this.getBookList(this.ordersListTab, false);
},
onReachBottom() {
this.newestpage++;
this.pagination.page++
// this.hotestpage++
// this.booksetpage++
this.getBookList(this.ordersListTab, false);
@@ -700,6 +700,8 @@
// limit: 10,
// page: this.newestpage,
};
console.log('1111111111111传参数', params)
this.$http
.request({
url: "common/buyOrder/commonBuyOrderList",
@@ -839,6 +841,7 @@
// });
this.newestpage = 1;
this.pagination.page = 1
this.newList = [];
this.getBookList(this.ordersListTab, false);
}
@@ -926,6 +929,7 @@
duration: 1000,
});
this.newestpage = 1;
this.pagination.page = 1
this.newList = [];
this.getBookList(this.ordersListTab, false);
}

View File

@@ -0,0 +1,249 @@
<template>
<view
class="container commonPageBox commonDetailPage"
style="height: auto !important; padding-bottom: 0 !important"
>
<u-popup :show="show" v-if="show" mode="center" class="popup_box">
<div class="product_image" scroll-y="true" style="position: relative">
<swiper
:style="{ height: fullHeight }"
class="swiper-tall"
:indicator-dots="indicatorDots"
:autoplay="autoplay"
:previous-margin="previousMargin"
:next-margin="nextMargin"
:circular="circular"
@change="change"
:current="swiperCurrentIndex"
>
<swiper-item
class="swiper-container"
v-for="(img, index) in list"
:key="index"
:item-id="index"
:data-year="index"
>
<view
@click="gotoDetail(img)"
class="swiper-item"
:style="{
background: img ? 'url(' + img.icon + ') center no-repeat' : '',
backgroundSize: '100% 100%',
}"
:animation="animationData[index]"
>
</view>
</swiper-item>
</swiper>
<view style="display: flex;align-items: center;justify-content: center;">
<view @click="close()" style="font-weight: bold;background-color: rgba(255, 255, 255, 0.8); color: #333;padding:20rpx 10rpx;width: 200rpx;font-size: 30rpx;border-radius: 40rpx;text-align: center;letter-spacing: 0.5rpx;">
关闭
</view>
</view>
</div>
</u-popup></view
>
</template>
<script>
const stopPenetrate = () => {
return;
};
import { mapState } from "vuex";
export default {
props: ["list"],
data() {
return {
screenHeight: 0,
animationData: {
0: {},
1: {},
2: {},
},
title: "0",
indicatorDots: false,
autoplay: false,
previousMargin: uni.upx2px(82) + "px",
nextMargin: uni.upx2px(82) + "px",
circular: true,
zoomParam: 1.1,
swiperCurrentIndex: 0,
data: [],
max: 0,
show: false,
};
},
onShow() {
this.show = false;
},
onLoad() {},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
computed: {
...mapState(["userInfo"]),
fullHeight() {
const res = uni.getSystemInfoSync();
return (
res.windowHeight - uni.upx2px(60) - (res.statusBarHeight + 44) + "px"
);
},
},
methods: {
gotoDetail(v) {
console.log("v at line 58:", v);
if (v.relationId) {
if (v.type == 0) {
if (v.shopProduct) {
uni.navigateTo({
url: `/pages/goods/index/index?navTitle=''&isMiaosha=0&title=''&id=${v.shopProduct.productId}`,
});
}
}
}
if (v.type == 1) {
uni.navigateTo({
url: `/pages/mine/wallet/recharge/index`,
});
}
if (v.type == 2) {
uni.navigateTo({
url: `/pages/mine/vip/index`,
});
}
this.show = false;
},
// 放大图片
previewImage(url) {
console.log(url);
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ["很抱歉,暂不支持保存图片到本地"],
success: function (res) {
// console.log(res,'+++++')
},
},
});
},
change(e) {
this.swiperCurrentIndex = e.detail.current;
this.title = e.detail.currentItemId;
for (let key in this.animationData) {
if (e.detail.currentItemId == key) {
this.animation.scale(this.zoomParam).step();
this.animationData[key] = this.animation.export();
} else {
this.animation.scale(1.0).step();
this.animationData[key] = this.animation.export();
}
}
},
close() {
this.show = false;
},
selectGoods(data) {
this.$emit("selectGoods", data);
},
open() {
this.animation = uni.createAnimation();
this.animation.scale(this.zoomParam).step();
this.animationData[0] = this.animation.export();
this.show = true;
},
onHandleClickBuy() {
this.$emit("selectGoodsData", this.selectGoodsData);
this.$emit("onHandleClickBuy");
},
},
onBackPress() {
// #ifdef APP-PLUS
plus.key.hideSoftKeybord();
// #endif
},
components: {},
};
</script>
<style lang="scss" scoped>
@import "@/style/mixin.scss";
.goods_image {
width: 70vw;
}
.popup_box {
padding-top: 30rpx;
background-color: transparent;
.popup_content {
padding-bottom: 140rpx;
}
/deep/.list_item {
// border-bottom: none;
border: none !important;
box-shadow: none !important;
}
.product_image {
width: 100vw;
max-height: 90vh;
}
}
/deep/.u-popup__content {
background-color: transparent !important;
}
/deep/.u-popup__content__close {
color: #fff !important;
}
.title_box {
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 0;
.title_price {
color: #ef1224;
font-size: 40rpx;
font-weight: 700;
}
}
.swiper-container {
display: flex;
align-items: center;
}
.swiper-item {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin-left: auto;
margin-right: auto;
height: 858upx;
width: 530upx;
line-height: 300upx;
text-align: center;
broder-radius: 6upx;
margin-bottom: 50upx;
}
.swiper-tall {
display: flex;
align-items: center;
}
.swiper-title {
width: 750upx;
text-align: center;
}
</style>

View File

@@ -0,0 +1,287 @@
<template>
<view>
<view v-for="(item, index) in List" :key="index">
<view :class="`youhuiItem ${itemClass}`">
<view class="centerbg">
<view class="centerView" style="position: relative"
><text
v-if="source == 'mine'"
class="border_radius_10"
style="
position: absolute;
right: 10rpx;
top: 10rpx;
font-size: 25rpx;
/* background-color: #fad4bd; */
color: #ed2a2e;
"
>{{ item.couponEntity.couponRange | couponType }}</text
>
<view style="color: #fd4347; width: 200rpx">
<view
style="position: relative; border-right: 1px dashed #fa8277"
>
<text
style="
font-weight: 700;
font-size: 40rpx;
position: absolute;
top: 20rpx;
left: 0rpx;
"
></text
>
<text
style="
font-size: 64rpx;
letter-spacing: 0.1px;
font-weight: 700;
margin-left: 40rpx;
"
>{{ item.couponEntity.couponAmount }}</text
>
<text
v-if="source == 'mine'"
style="
display: block;
color: #333;
font-size: 25rpx;
margin-left: 0rpx;
margin-top: 0rpx;
"
>{{ item.couponEntity.useLevel }}元可用</text
>
</view>
</view>
<view style="width: calc(100% - 220rpx)">
<view>
<view
style="color: #fd4347; font-size: 44rpx; font-weight: bold;"
>{{
item.couponEntity.couponType == 0 ? "现金" : "折扣"
}}优惠券
<!-- <text v-if="source == 'mine'" style="box-sizing: border-box;padding:4rpx 20rpx;margin-left: 10rpx;font-size: 24rpx;background-color: #fff;border-radius: 24rpx;float: right;">去使用</text> -->
</view
>
<text
v-if="source != 'goodsDetail'"
style="
display: block;
font-size: 24rpx;
color: #333;
margin-top: 10rpx;
"
>有效期至{{
item.effectType == 0 ? "永久有效" : item.endTime
}}</text
>
</view>
</view>
</view>
</view>
<view class="bottombg">
<view
style="
width: 100%;
padding: 16rpx 20rpx;
box-sizing: border-box;
margin-right: 6rpx;
position: absolute;
bottom: 0rpx;
text-align: center;
"
>
<view
class="title"
style="
line-height: 34rpx;
margin-bottom: 10rpx;
color: #fff;
font-size: 34rpx;
font-weight: bold;
"
>
{{ item.couponEntity.couponName }}
</view>
<view
v-if="item.couponEntity.remark"
style="
position: absolute;
right: 10rpx;
bottom: 10rpx;
display: flex;
align-items: center;
font-size: 22rpx;
color: #fafafa;
"
>
<!-- 详细信息
<u-icon
size="20rpx"
color="#fafafa"
style="color: #fafafa; float: right;margin-left: 4rpx;"
name="arrow-down-fill"
></u-icon> -->
</view>
</view>
</view>
</view>
<u-collapse
v-if="source != 'goodsDetail'&&item.couponEntity.remark"
style="
margin-top: 0rpx;
z-index: 10 !important;
background-color: #fafafa;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
"
:border="false"
>
<u-collapse-item title="详细信息" name="Docs guide">
<view
style="
font-size: 22rpx;
width: 100%;
margin-right: 20rpx !important;
"
>使用说明{{ item.couponEntity.remark }}</view
>
</u-collapse-item>
</u-collapse>
</view>
</view>
</template>
<script>
import $http from "@/config/requestConfig.js";
import { mapState } from "vuex";
export default {
props: ["List", "source", "itemClass"],
data() {
return {};
},
filters: {
couponType(type) {
// 0无限制 1课程卷 2课程品类卷
var str = "";
switch (type) {
case 0:
str = "全场通用";
break;
case 1:
str = "指定课程可用";
break;
case 2:
str = "指定课程品类可用";
break;
}
return str;
},
},
computed: {
...mapState(["userInfo"]),
},
methods: {},
};
</script>
<style scoped lang="scss">
.youhuiItem {
min-height: 320rpx;
position: relative;
background: linear-gradient(to top right, #fd4c50, #fe393d);
border: 1px solid #d9d9d9;
border-radius: 10rpx;
width: 100%;
padding: 26rpx;
margin: 25rpx 0 0 0;
align-items: center;
background-color: #fff;
font-size: 30rpx;
}
.centerbg {
width: 100%;
background-image: linear-gradient(60deg, #ffefd3 0%, #f8be85 100%);
height: calc(100%);
border-radius: 10rpx;
padding-bottom: 86rpx;
box-sizing: border-box;
}
.centerView {
width: 100%;
height: 100%;
overflow: hidden;
padding: 30rpx 20rpx 0 40rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
}
.bottombg {
position: absolute;
bottom: 0;
width: 100%;
height: 100%;
left: 0;
right: 0;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("@/static/icon/coupon/bottom.png") !important;
}
.youhuiItem > view {
}
.youhuiItem.youItem_style {
border-color: #fd6004;
}
::v-deep .u-cell__body {
padding-top: 0 !important ;
padding-bottom: 0 !important ;
z-index: 10 !important ;
.u-cell__title-text {
color: #333 !important;
font-size: 24rpx !important;
}
}
::v-deep .u-collapse-item__content__text {
padding: 10rpx 20rpx !important;
box-sizing: border-box;
}
::v-deep.itemCouponClass {
min-height: 180rpx !important;
.bottombg {
.title {
font-size: 26rpx !important;
}
}
.centerbg {
padding-bottom: 60rpx !important;
}
}
</style>

View File

@@ -53,10 +53,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"
@@ -299,12 +299,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",
@@ -444,7 +444,7 @@ export default {
},
];
if (this.platform != "ios") {
// if (this.platform != "ios") {
var fullScreenButtonComponent = Aliplayer.Component({
init: function (status, toAddress) {
this.fullScreenStatus = status;
@@ -468,7 +468,7 @@ export default {
];
}
// }
//设置播放基本配置
var playerOptions = {
@@ -563,26 +563,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,7 +1,8 @@
<template><page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<template>
<page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<view
class="container playerBox"
id="playerBox"
@@ -50,7 +51,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;
@@ -1057,11 +1058,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
}
@@ -1069,12 +1071,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,620 +0,0 @@
<template>
<!--音频组件-->
<view
class="boxShadow"
style="
width: 100%;
border-radius: 40rpx;
height: 100%;
padding: 40rpx 0;
box-sizing: border-box;
background-image: linear-gradient(80deg, #959698 0%, #808183 100%);
"
>
<view class="bgfff">
<view>
<slot name="title"></slot>
<view class="audo-video">
<view class="slider-box">
<text class="mm">{{ timer }}</text>
<slider
style="width: 440rpx"
@change="sliderChange"
@changing="sliderChanging"
class="audio-slider"
block-size="16"
:min="0"
:max="duration"
:value="currentTime"
activeColor="#FF8849"
@touchstart="lock = true"
@touchend="lock = false"
/>
<text class="ss" v-if="overTimer != 'NaN:NaN'">{{
overTimer
}}</text>
<text class="ss" v-else>00.00</text>
</view>
<!--音频播放按钮处-->
<view class="audo-top">
<!--上一首-->
<!-- <image
src="./icon/xys.png"
style="width: 40rpx; height: 40rpx; transform: rotate(180deg)"
mode="aspectFill"
@click="upper(1)"
></image> -->
<!--上一首-->
<!--快退-->
<image
src="./icon/kt.png"
style="width: 40rpx; height: 40rpx"
mode="widthFix"
@click="jump('kt')"
></image>
<!--快退-->
<!--播放-->
<image
src="./icon/kt.png"
style="width: 100rpx; height: 100rpx"
mode="widthFix"
@click="plays()"
></image>
<!--播放-->
<!--快进-->
<image
src="./icon/kj.png"
style="width: 40rpx; height: 40rpx"
mode="widthFix"
@click="jump('kj')"
></image>
<!--快进-->
<!--下一首-->
<!-- <image
src="./icon/xys.png"
style="width: 40rpx; height: 40rpx"
mode="aspectFill"
@click="upper(2)"
></image> -->
<!--下一首-->
<view class="audo-a" style="">
<!--进度条-->
<!--进度条-->
<!--倍数-->
<view
class="beishu"
style="border: 1rpx solid #e1dbf2"
@click="beishu"
>{{ BsNav[bsindex].bs }} X
</view>
<view class="absolute" style="right: 0; top: 80rpx" v-if="shows">
<!-- <u-transition :show="show" mode="slide-right" duration="300"> -->
<view
class="beishu-a"
style="border: 1rpx solid #fff"
v-if="show"
>
<view
v-for="(item, index) in BsNav"
:key="index"
@click="setRate(index, item)"
class="title beishuItem"
:style="{ color: bsid == item.id ? '#9461EB' : '' }"
>
{{ item.bs }} X
</view>
</view>
<!-- </u-transition> -->
</view>
<!--倍数-->
</view>
</view>
<!--音频播放按钮处-->
<!--音频api处[视频代替音频-实现倍数功能]-->
<video
id="myVideo"
ref="myVideo"
:src="recorPath"
preload="metadata"
@timeupdate="timeupdate"
:autoplay="autoplays"
@loadedmetadata="loadedmetadata"
@ended="next"
controls
style="width: 400rpx; height: 80rpx"
></video>
<!--音频api处[视频代替音频-实现倍数功能]-->
</view>
</view>
</view>
<!--占位-->
</view>
<!--音频组件 wx:cxalq8-24 Author:chenxin-->
</template>
<script>
/*
list -- 音频数据: 数组格式/不传无法播放
Seconds -- 快进快退秒数: 默认15秒
autoNext -- 是否自动播放下一首
autoplays -- 进入页面是否自动播放 - 默认false
slideYes -- 滑动进度条时是否开启播放 - 默认false
switAud -- 切换上下音频是否开启播放 - 默认true
BsNav -- 倍数数据传入/数组形式
图片功能样式,如想改动请在组件内部修改,页面中已注释 -- 逻辑根据自己需求改
目前只测试 微信小程序和H5和APP -- 其他平台未知
[Author:chenxin 交流vx:cxalq8-24]
*/
export default {
name: "cx-audio-play",
props: {
list: {
//音频数据
Type: Array,
default: () => [],
},
Seconds: {
//快进快退 - 秒数
Type: Number,
default: 15,
},
firstTime: {
//快进快退 - 秒数
Type: Number,
default: 0,
},
autoNext: {
//是否自动播放下一首
Type: Boolean,
default: false,
},
autoplays: {
//是否开启自动播放
Type: Boolean,
default: false,
},
slideYes: {
//滑动进度条 - 是否开启播放
Type: Boolean,
default: false,
},
switAud: {
Type: Boolean, //切换上下音频 - 是否开启播放
default: true,
},
BsNav: {
//倍数-传入
Type: Array,
default: () => [
{
id: 1.0,
bs: "1.0",
},
{
id: 1.5,
bs: "1.5",
},
{
id: 2.0,
bs: "2.0",
},
],
},
},
data() {
return {
shows: false, //倍数弹框
show: true, //倍数弹框动画默认开启
succes: false, //播放按钮
bsid: "", //倍数默认显示第一个
bsindex: 0, //倍数默认显示第一个
num: 0,
current: 0, //当前选中的索引
recorPath: "", //音频播放地址
lock: false, // 锁
currentTime: 0, //当前进度
duration: 0, // 总进度
videoContext: null,
loading: true, //锁 加载
curTime: null, //锁 加载
};
},
onReady() {},
onShow() {},
mounted() {
//初始化音频api
},
updated() {},
onLoad() {},
onHide() {
//监听页面离开 - 销毁音频
this.stop_();
this.$emit("curTime", this.curTime);
},
onUnload() {
//监听页面卸载 - 销毁音频
this.stop_();
this.$emit("curTime", this.curTime);
},
destroyed() {
// this.innerAudioContext.stop();
},
computed: {
timer() {
this.curTime = this.currentTime.toFixed(0);
return calcTimer(this.currentTime);
},
overTimer() {
return calcTimer(this.duration);
},
},
methods: {
init() {
this.currentTime = this.firstTime;
this.videoContext = uni.createVideoContext("myVideo", this);
//默认播放第一个
if (this.list.length != 0) {
this.recorPath = this.list[0];
if (this.autoplays) {
this.succes = true;
}
} else {
this.duration = 0;
}
//倍数默认选择第一个
if (this.BsNav.length != 0) {
this.bsid = this.BsNav[0].id;
this.playbackRate(); //倍数
}
},
//没有音频数据
noUrl() {
if (this.list.length == 0) {
uni.showToast({
title: "请先传入音频数据哦~",
icon: "none",
});
return false;
}
return true;
},
//播放暂停
plays() {
if (!this.noUrl()) {
return;
}
this.playLoading();
this.succes = !this.succes;
this.succes ? this.play_() : this.pause_();
},
//上下首切换
upper(num) {
if (!this.noUrl()) {
return;
}
let that = this;
if (num == 1) {
//上一首
if (this.num == 0) {
this.upperToast(num); //提示
return;
}
this.num -= 1;
} else {
//下一首
if (this.num + 1 == this.list.length) {
this.upperToast(num); //提示
return;
}
this.num += 1;
}
this.recorPath = this.list[this.num];
if (this.switAud) {
// 切换时是否开启播放
this.succes = true;
this.play_();
} else {
this.succes = false;
}
this.playbackRate(); //倍数
console.log("当前音频:", this.recorPath);
},
//快进快退
jump(e) {
if (!this.noUrl()) {
return;
}
var num;
if (e == "kt") {
num = (this.currentTime - Math.floor(this.Seconds % 60)).toFixed(0); //当前时间-15秒
} else {
num = (this.currentTime + Math.floor(this.Seconds % 60)).toFixed(0); //当前时间+15秒
}
this.seek(num);
},
seek(num) {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.seek(num);
//#endif
//#ifndef H5
this.videoContext.seek(num);
//#endif
});
},
//倍速弹框
beishu() {
this.shows = !this.shows;
},
// 倍速
setRate(index, item) {
this.bsid = item.id;
this.bsindex = index;
this.shows = false;
this.playbackRate();
},
// 更新进度条
timeupdate(event) {
if (this.lock) return; // 锁
var currentTime, duration;
if (event.detail.detail) {
currentTime = event.detail.detail.currentTime;
duration = event.detail.detail.duration;
} else {
currentTime = event.detail.currentTime;
duration = event.detail.duration;
}
this.currentTime = currentTime;
console.log("this.currentTime at line 當前386:", this.currentTime);
this.duration = duration;
console.log("this.duration at line 總時長388:", this.duration);
},
// 拖动进度条
sliderChange(data) {
if (!this.noUrl()) {
return;
}
//此处滑动进度条--开始播放
if (this.slideYes && !this.succes) {
this.play_();
this.succes = true;
}
//#ifdef H5
this.$refs.myVideo.seek(data.detail.value); //获取秒数
//#endif
//#ifndef H5
this.videoContext.seek(data.detail.value); //获取秒数
//#endif
},
//拖动中
sliderChanging(data) {
if (data.detail.value == 0) {
this.succes = false;
this.pause_();
}
this.currentTime = data.detail.value;
},
// 视频加载完成
loadedmetadata(data) {
console.log("data at line zh:", data);
this.duration = data.detail.duration;
// this.seek(this.firstTime);
// this.curTime = this.currentTime
},
//音频结束触发
next(data) {
this.succes = false;
if (this.autoNext) {
//自动播放下一首
this.upper(2);
}
},
// 各平台播放_暂停
play_() {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.play();
//#endif
//#ifndef H5
this.videoContext.play();
//#endif
});
},
pause_() {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.pause();
//#endif
//#ifndef H5
this.videoContext.pause();
//#endif
});
},
//离开页面暂停播放
stop_() {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.stop();
//#endif
//#ifndef H5
this.videoContext.stop();
//#endif
});
},
//提示
upperToast(num) {
num == 1
? uni.showToast({
title: "到头了~",
icon: "none",
})
: uni.showToast({
title: "没有更多了~",
icon: "none",
});
},
//音频倍数
playbackRate() {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.playbackRate(this.bsid);
//#endif
//#ifndef H5
this.videoContext.playbackRate(this.bsid);
//#endif
});
},
//加载框--封
playLoading() {
if (this.loading && !this.succes) {
uni.showLoading({
title: "音频加载中...",
});
this.loading = false;
}
setTimeout(() => {
uni.hideLoading();
}, 1500);
},
},
watch: {
//播放器当前播放进度
curTime(val) {
if (this.curTime !== null) {
console.log("timer at line 495:", this.curTime);
this.$emit("curTime", this.curTime);
}
},
},
};
//时间换算
function calcTimer(timer) {
if (timer === 0 || typeof timer !== "number") {
return "00:00";
}
let mm = Math.floor(timer / 60);
let ss = Math.floor(timer % 60);
if (mm < 10) {
mm = "0" + mm;
}
if (ss < 10) {
ss = "0" + ss;
}
return mm + ":" + ss;
}
</script>
<style lang="scss" scoped>
page {
background-color: #f8f8f8;
}
/* #video {
width: 100%;
} */
.audo-video {
margin-top: 0rpx;
color: #fff;
.beishuItem {
color: #999;
}
}
.slider-box {
display: flex;
align-items: center;
justify-content: center;
font-size: 27rpx;
// color: #fff;
}
button {
display: inline-block;
width: 100rpx;
background-color: #fff;
font-size: 24rpx;
color: #000;
padding: 0;
}
.hidden {
position: fixed;
top: 0;
left: -10rpx;
z-index: -1;
width: 1rpx;
height: 1rpx;
}
.audo-top {
padding: 20rpx 0;
display: flex;
justify-content: space-around;
align-items: center;
image {
width: 45rpx;
height: 45rpx;
}
}
.audo-a {
display: flex;
justify-content: space-between;
align-items: center;
width: auto;
position: relative;
z-index: 9;
margin-right: -20rpx;
}
.beishu {
position: relative;
width: 100rpx;
padding-top: 5rpx;
padding-bottom: 5rpx;
text-align: center;
border-radius: 25rpx;
font-size: 28rpx;
}
.absolute {
position: absolute;
.beishu-a {
width: 200rpx;
border-radius: 20rpx;
text-align: center;
line-height: 90rpx;
background: #fff;
.title {
pdding-left: 30rpx;
}
}
}
</style>

View File

@@ -348,12 +348,9 @@ export default {
},
seek(num) {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.seek(num);
//#endif
//#ifndef H5
this.videoContext.seek(num);
//#endif
});
},
@@ -396,12 +393,12 @@ export default {
this.play_();
this.succes = true;
}
//#ifdef H5
this.$refs.myVideo.seek(data.detail.value); //获取秒数
//#endif
//#ifndef H5
this.videoContext.seek(data.detail.value); //获取秒数
//#endif
this.$nextTick(()=>{
this.$refs.myVideo.seek(data.detail.value); //获取秒数
})
},
//拖动中

View File

@@ -59,6 +59,7 @@
</template>
<view v-else style="height: 200px"> </view>
</view>
</view>
</template>

View File

@@ -24,7 +24,7 @@
left: 0;
width: 100%;
z-index: 10; */
" type="warning" @click="handleClickGetVip" :title="goBuyTitle" :show-icon="true">
" type="warning" @click="$platform == 'android'?handleClickGetVip:''" :title="goBuyTitle" :show-icon="true">
<template slot="rightSlot" slot-scope="slotProps" v-if="$platform == 'android'">
<text class="saveBtn vipBtn flexbox buyBtn" v-if="goBuyType == 0">
立即购买

File diff suppressed because it is too large Load Diff

View File

@@ -87,7 +87,24 @@
<view class="price_box"> </view>
</view>
</view>
<template v-if="canGetCouponList.length > 0">
<u-divider
text="购买本商品赠送如下优惠券"
:hairline="true"
textColor="#333"
lineColor="#b0b0b0"
></u-divider>
<view class="tanchu">
<view class="listBox">
<common-coupon
:List="canGetCouponList"
:source="'goodsDetail'"
itemClass="itemCouponClass"
>
</common-coupon>
</view>
</view>
</template>
<template>
<common-sticky label="title" :itemStyle="`width:${
cateList.length == 2 ? '50' : '33'
@@ -222,7 +239,7 @@
<!-- isSelectGoods -->
<view class="related_courses_name" :class="`goods_item `">
<view class="image_box" style="margin-right: 10rpx">
<image :src="slotProps.row.images" mode="aspectFit" class="goods_image"></image>
<image :src="slotProps.row.images||slotProps.row.image" mode="aspectFit" class="goods_image"></image>
</view>
<view :class="`goods_info `">
<view class="name">
@@ -372,6 +389,7 @@
</view>
</view>
</view>
<!-- &&this.options.type != 'visitor' -->
<view class="goods_nav_box" v-if="!this.$store.state.loadingShow">
<uni-goods-nav :fill="true" :options="buyOptions" :button-group="customButtonGroup1"
@click="onHandleClickBuy" @buttonClick="onHandleClickBuy1" />
@@ -479,7 +497,7 @@
// info: 2
// }
],
canGetCouponList: [], // 可获得优惠券列表
swiperList: [],
goodsList: [],
options: {},
@@ -637,6 +655,31 @@
...mapState(["userInfo"]),
},
methods: {
async getCanGetCouponList() {
await this.$http
.request({
url: "common/coupon/couponToProductList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
page: 1,
limit: 100,
productId: this.curriculumData.productId,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
if (res.code != 0) return this.$commonJS.showToast(res.errMsg);
console.log("res优惠券", res);
this.canGetCouponList = res.couponToShopproductPage.records;
})
.catch((e) => {
console.log(e);
this.$commonJS.showToast(e.errMsg);
});
},
closeShowInfo() {
this.showInfo = false;
},
@@ -696,10 +739,10 @@
if (this.options.type == "visitor") {
console.log("this.options.type at line 1090:", this.options.type);
uni.showModal({
content: "登陆后可购买本商品",
confirmText: "去登录",
cancelText: "再逛逛",
confirmColor: '#018f89', //确定按钮颜色
content: "客官请先登录哦~",
confirmText: "去登录",
cancelText: "再逛逛",
confirmColor: "#018f89", //确定按钮颜色
success(res) {
if (res.confirm) {
uni.navigateTo({
@@ -852,6 +895,7 @@
.then(async (res) => {
that.selectGoodsData = res.data.GLProducts[0];
that.curriculumData = res.data.detail;
// await this.getCanGetCouponList();
that.booksList = res.data.books ? res.data.books : [];
that.coursesList = res.data.courses ? res.data.courses : [];
that.goodsList = res.data.GLProducts;
@@ -1747,7 +1791,7 @@
}
.price_left {
width: calc(100% - 300rpx);
width: calc(100% - 340rpx);
float: left;
}
@@ -1789,7 +1833,7 @@
}
.xianshimaiosha_box {
width: 300rpx;
width: 340rpx;
height: 100%;
float: right;
}

View File

@@ -351,15 +351,15 @@
handler(newRoute) {
if (this.isDefaultCurrency) {
if (platform == "ios") {
this.selectPayIndex = 2;
this.selectPayIndex = 0;
} else {
this.selectPayIndex = 2;
this.selectPayIndex = 0;
}
} else {
if (platform == "ios") {
this.selectPayIndex = 1;
this.selectPayIndex = 0;
} else {
this.selectPayIndex = 1;
this.selectPayIndex = 0;
}
}
this.payType = this.payList[this.selectPayIndex].type;
@@ -388,25 +388,7 @@
},
selectPayIndex: 1,
farePrice: 0,
payList: [{
text: "支付宝",
imgUrl: require("@/static/icon/pay_1.png"),
type: 2,
value: "0",
},
{
text: "微信",
imgUrl: require("@/static/icon/pay_2.png"),
type: 1,
value: "1",
},
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
],
payList: [],
priceBreakdownList: [],
orderInfoList: [{
text: "订单备注",
@@ -492,7 +474,7 @@
freightNum: "book/buyOrder/calculateTransportPrice", //运费
},
customButton: [{
width: "340rpx",
width: "300rpx",
text: "立即支付",
backgroundColor: "linear-gradient(90deg, #3AB3AE 0%, #117e4c 100%)",
color: "#fff",
@@ -541,6 +523,46 @@
async onShow() {
console.log("调用了onShow方法");
var that = this;
if(this.$platform=='ios'){
this.payList= [
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
]
this.selectPayIndex = 0;
this.payType=4
}else{
this.payList= [{
text: "支付宝",
imgUrl: require("@/static/icon/pay_1.png"),
type: 2,
value: "0",
},
{
text: "微信",
imgUrl: require("@/static/icon/pay_2.png"),
type: 1,
value: "1",
},
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
]
this.selectPayIndex = 1;
this.payType=2
}
await uni.$on("returnData", function(data) {
console.log("data at line 415:", data);
if (data) {

View File

@@ -4,35 +4,32 @@
<public-module></public-module>
<view class="header_box"></view>
<!-- <view class="appJump">
<view class="everhealth item flexbox" @click="appjumpfun('everhealth')">
<view class="img">
<image
src="@/static/icon/ic_login_health.png"
mode="widthFix"
></image>
</view>
<view class="text">
<text>一路健康</text>
</view>
</view>
<view class="zmzm item flexbox" @click="appjumpfun('nuttyreading')">
<view class="img">
<image src="@/static/icon/home_icon_3.png" mode="widthFix"></image>
</view>
<view class="text">
<text>疯子读书</text>
</view>
</view>
<view class="zmzm item flexbox" @click="appjumpfun('medicine')">
<view class="img">
<image src="@/static/icon/wmysicon.png" mode="widthFix"></image>
</view>
<view class="text">
<text>吴门医述</text>
</view>
</view>
</view> -->
<!-- <view class="appJump">
<view class="everhealth item flexbox" @click="appjumpfun('everhealth')">
<view class="img">
<image src="@/static/icon/ic_login_health.png" mode="widthFix"></image>
</view>
<view class="text">
<text>一路健康</text>
</view>
</view>
<view class="zmzm item flexbox" @click="appjumpfun('nuttyreading')">
<view class="img">
<image src="@/static/icon/home_icon_3.png" mode="widthFix"></image>
</view>
<view class="text">
<text>疯子读书</text>
</view>
</view>
<view class="zmzm item flexbox" @click="appjumpfun('medicine')">
<view class="img">
<image src="@/static/icon/wmysicon.png" mode="widthFix"></image>
</view>
<view class="text">
<text>吴门医述</text>
</view>
</view>
</view> -->
<view class="main_content_box">
<view class="curriculum_box">
<view class="curriculum_item_box" v-for="(v, i) in curriculumList" @click="handleClickCurriculum(v)">
@@ -66,7 +63,7 @@
</view>
</view>
<view class="flash_sale_box">
<view class="flash_sale_box" v-if="$platform!='ios'">
<view class="flash_sale_top">
<image class="miaoShaIcon" src="@/static/icon/homePage/miaosha.png" mode="aspectFill"
style="width: 36rpx; height: 44rpx"></image>
@@ -150,6 +147,12 @@
</view> -->
</view>
<common-advertisement
ref="commonAdvertisement"
:list="advertisementList"
></common-advertisement>
</view>
</template>
<script>
@@ -162,6 +165,7 @@
props: {},
data() {
return {
advertisementList: [],
noticeList: [], //秒杀列表
seckillLst: [], //秒杀列表
@@ -201,7 +205,9 @@
};
},
onReady() {},
onLoad() {},
onLoad() { this.$nextTick(() => {
this.getAdvertisement();
});},
async onShow() {
console.log("at line 287:", this.userInfo);
this.requestAll();
@@ -220,6 +226,33 @@
},
methods: {
...mapMutations(["setUserInfo"]),
async getAdvertisement() {
console.log('11111111111111111111 at line 233:', 11111111111111111111)
await this.$http
.request({
url: "common/mainAd/getMainAd",
method: "POST",
data: {
type: 2,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
console.log("res at line 615:", res);
if (res.code == 0 && res.list && res.list.length > 0) {
this.advertisementList = res.list;
this.$refs.commonAdvertisement.open();
}
});
},
goVideo() {
uni.navigateTo({
url: "/pages/index/index",
@@ -969,7 +1002,7 @@
}
.appJump {
width: 190rpx;
width: auto;
position: fixed;
right: 0;

View File

@@ -69,7 +69,7 @@ export default {
},
{
title: "客服邮箱",
content: "appyilujiankang@sina.com",
content: "fengzidushu@163.com",
type: "email",
},
{

View File

@@ -1,7 +1,4 @@
<template><page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<template><page-meta :page-font-size="$baseFontSize() + 'px'" :root-font-size="$baseFontSize() + 'px'"></page-meta>
<view style="
height: 100vh;
padding: 0 0;
@@ -118,7 +115,25 @@
<view class="text" style="line-height: 40rpx">{{
userMes.jf ? userMes.jf : 0
}}</view>
</view>
<view
class="chong_list_item"
style="
display: flex;
align-items: center;
flex-direction: column;
justify-content: space-between;
"
@click="onPageJump('/pages/mine/wallet/couponList')"
>
<view class="pay_item_img"> 优惠券 </view>
<view class="text" style="line-height: 40rpx">{{
userCouponNum
}}</view>
</view>
</view>
<view class="chong_list_item" style="
display: flex;
@@ -126,7 +141,7 @@
margin-right: 0;
justify-content: center;
">
<view class="chong_btn" v-if="iosHide"
<view class="chong_btn"
@click="onPageJump('/pages/mine/wallet/recharge/index')"> </view>
</view>
</view>
@@ -194,6 +209,7 @@
export default {
data() {
return {
userCouponNum: 0,
come: "1",
orderList: [{
title: "全部",
@@ -254,12 +270,11 @@
isAndorid: true,
platform: null, // 设备系统
pageList: [
{
name: "我的订单",
url: "/pages/bookShop/orderList?type=mine",
pageList: [{
name: "我的订单",
url: "/pages/bookShop/orderList?type=mine",
type: "switchTab",
type: "switchTab",
},
{
name: "个人资料",
@@ -323,6 +338,33 @@
//方法
methods: {
...mapMutations(["setUserInfo"]),
async getUserCouponList() {
await this.$http
.request({
url: "common/coupon/getCouponHistoryList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
page: 1,
limit: 10,
getType: "", //获取类型 0 后台赠送 1 主动获取
status: "0", //使用状态 0 未使用 1 已使用 2 已过期
userInfo: "", //用户信息
userId: this.userInfo.id,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
if (res.code != 0) return this.$commonJS.showToast(res.errMsg);
this.userCouponNum = res.couponList.total;
})
.catch((e) => {
console.log(e);
this.$commonJS.showToast(e.errMsg);
});
},
getBookList(flag, refreshflag) {
this.isLoadingHide = false;
var that = this;

View File

@@ -31,7 +31,7 @@
activeColor="cadetblue"
style="float: left;"
v-model="fontSizeBlod"
size="14"
size="16"
@change="asyncChange"
></u-switch>
<text style="margin-left: 5px;font-size: 14px !important;float: left;color: cadetblue;font-weight: bold;">最大</text>
@@ -40,7 +40,8 @@
</template>
</list>
</view>
<view class="button_box">
<!-- v-if="iosHide" -->
<view class="button_box" >
<u-button
shape="square"
type=""
@@ -143,7 +144,7 @@ export default {
},
{
title: "客服邮箱",
content: "appyilujiankang@sina.com",
content: "fengzidushu@163.com",
type: "email",
},
{
@@ -185,7 +186,7 @@ export default {
onShow() {
//改变字体大小
var status = this.$baseFontSize();
if (status == 5) {
if (status == 4) {
this.fontSizeBlod = true;
} else {
this.fontSizeBlod = false;
@@ -205,7 +206,7 @@ export default {
//改变字体大小
console.log("this.fontSizeBlod at line 196:", this.fontSizeBlod);
if (this.fontSizeBlod) {
uni.setStorageSync("fontSize", 5);
uni.setStorageSync("fontSize", 4);
} else {
uni.setStorageSync("fontSize", 3.5);
}

View File

@@ -1,8 +1,4 @@
<template>
<page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<view class="commonPageBox">
<z-nav-bar title="VIP"></z-nav-bar>
<view class="vip_block">

View File

@@ -0,0 +1,290 @@
<template>
<view>
<public-module></public-module>
<z-nav-bar title="我的优惠券"></z-nav-bar>
<view class="">
<view class="">
<u-tabs
v-if="tabList.length > 0"
:class="['tabList']"
@click="tabClick"
:current="curTagIndex"
:activeStyle="activeStyle"
:scrollable="false"
:list="tabList"
itemStyle="padding-left:10rpx; background-color:#fff; padding-right: 10rpx; height: 50px; font-size:26rpx"
></u-tabs>
</view>
<!-- -->
<view class="tanchu" style="position: relative">
<view
v-if="status!=0"
style="
min-height: 80vh;
z-index: 100;
background-color: #f0f0f0;
opacity: 0.55;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
"
></view>
<view class="listBox" v-if="list.length > 0">
<view style="min-height: 40vh; overflow-y: scroll">
<common-coupon :List="list" :source="'mine'"> </common-coupon>
</view>
<!-- <view style="font-size: 20rpx;color: #aaa;margin-top: 30rpx;">* 每笔订单只能使用一张优惠价</view> -->
</view>
<view class="" v-else>
<u-divider v-show="listStatus == 2" text="已加载全部"></u-divider>
<u-divider v-show="listStatus == 3" text="暂无数据"></u-divider>
<u-divider v-show="listStatus == 1" text="加载中..."></u-divider>
</view>
</view>
</view>
<z-navigation></z-navigation>
</view>
</template>
<script>
import $http from "@/config/requestConfig.js";
import { mapState } from "vuex";
export default {
data() {
return {
list: [], // 优惠券列表
listStatus: 88,
curTagIndex: 0, // 当前索引
tabList: [
{
name: "未使用",
id: "0",
},
{
name: "已使用",
id: "1",
},
{
name: "已过期",
id: "2",
},
],
activeStyle: {
background: "#fff",
color: "#666",
padding: "10rpx",
borderRadius: "10rpx",
},
page: 0,
limit: 15,
status: 0,
flag: false, // 请求标记
};
},
onLoad() {
this.page = 1;
this.getUserCouponList();
},
async onReachBottom() {
console.log("触底", this.listStatus, this.flag);
if (this.listStatus != 1 && this.listStatus != 2) {
if (!this.flag) {
this.page++;
await this.getUserCouponList();
}
}
},
filters: {
couponType(type) {
// 0无限制 1课程卷 2课程品类卷
var str = "";
switch (type) {
case 0:
str = "全场通用";
break;
case 1:
str = "指定课程可用";
break;
case 2:
str = "指定课程品类可用";
break;
}
return str;
},
},
computed: {
...mapState(["userInfo"]),
},
methods: {
async tabClick(e) {
console.log("e", e);
this.status = e.id;
// this.curTagIndex = e.index
this.page = 0;
this.page += 1;
this.list = [];
await this.getUserCouponList();
},
async getUserCouponList() {
console.log("进入函数了妈");
this.listStatus = 1;
this.flag = true;
uni.showLoading({
title: "加载中",
});
console.log(
{
page: this.page,
limit: this.limit,
getType: "", //获取类型 0 后台赠送 1 主动获取
status: this.status, //使用状态 0 未使用 1 已使用 2 已过期
userInfo: "", //用户信息
userId: this.userInfo.id,
},
111111111111111111111111111
);
await this.$http
.request({
url: "common/coupon/getCouponHistoryList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
page: this.page,
limit: this.limit,
getType: "", //获取类型 0 后台赠送 1 主动获取
status: this.status, //使用状态 0 未使用 1 已使用 2 已过期
userInfo: "", //用户信息
userId: this.userInfo.id,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
console.log(res, "1111111111111");
uni.hideLoading();
if (res.code != 0) return this.$commonJS.showToast(res.errMsg);
if (res.couponList.records.length > 0) {
this.list = this.list.concat(res.couponList.records);
if (res.couponList.pages > this.page) {
this.listStatus = 0;
} else {
this.listStatus = 2;
}
} else {
this.listStatus = 3; // 暂无数据
}
this.flag = false;
})
.catch((e) => {
uni.hideLoading();
console.log(e);
this.flag = false;
this.listStatus = 3;
console.log(e, "数据报错");
this.$commonJS.showToast(e.errMsg);
});
},
},
};
</script>
<style lang="scss" scoped>
.btnBox {
margin-top: 20rpx;
}
.tanchu {
padding: 0 30rpx 40rpx 30rpx;
position: relative;
// max-height: 60vh;
// overflow-y: scroll;
.dp_title {
font-size: 32rpx;
margin-bottom: 50rpx;
color: #555;
text-align: center;
font-weight: bold;
}
.dp_add {
position: absolute;
top: 40rpx;
right: 30rpx;
font-size: 22rpx;
background-color: #fd6004;
color: #fff;
border-radius: 10rpx;
padding: 5rpx 10rpx;
.u-icon {
display: inline-block;
margin-right: 5rpx;
}
}
.addressItem {
border: 2px dashed #d9d9d9;
border-radius: 10rpx;
width: 100%;
display: flex;
padding: 20rpx 10rpx;
margin: 25rpx 0 0 0;
align-items: center;
background-color: #fff;
.addrContent {
margin-left: 40rpx;
flex: 1;
.addrContentTop {
display: flex;
align-items: flex-end;
margin: 0 0 15rpx 0;
position: relative;
.userName {
font-size: 35rpx;
font-weight: bold;
margin-right: 30rpx;
}
.userTel {
font-size: 25rpx;
color: #888;
}
.userMoren {
border: 1px solid #fd6004;
color: #fd6004;
padding: 3rpx 10rpx;
font-size: 22rpx;
border-radius: 10rpx;
margin: 0 0 0 20rpx;
}
.chooseCheck {
position: absolute;
top: 3rpx;
right: 6rpx;
}
}
.addrContentBottom {
font-size: 32rpx;
}
}
}
.addressItem.addItem_style {
border-color: #fd6004;
}
}
</style>

View File

@@ -3,6 +3,7 @@
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<view>
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar

View File

@@ -1,7 +1,4 @@
<template><page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<template><page-meta :page-font-size="$baseFontSize() + 'px'" :root-font-size="$baseFontSize() + 'px'"></page-meta>
<view class="container commonPageBox">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
@@ -170,6 +167,7 @@
},
//页面显示
onShow() {
// 隐藏原生的tabbar
// this.iphonepay()
// setTimeout(()=>{
@@ -253,10 +251,12 @@
provider: 'appleiap',
orderInfo: orderInfo,
success: (res) => {
console.log('uni.requestPayment成功提示', res)
that.iapCheck(res);
resolve(res);
},
fail: (err) => {
console.log('uni.requestPayment失败提示', err)
uni.hideLoading()
// console.log('其他支付错误', err);
that.restoreComplateRequest()
@@ -281,28 +281,28 @@
async restoreComplateRequest() {
let that = this
console.log('检测未完成订单')
// if (!that.checking) {
// that.checking = true
// console.log(this.iapChannel, 'this.iapChannel1')
await this.iapChannel.restoreCompletedTransactions({
manualFinishTransaction: true
}, function(results) {
// console.log(that.checking)
// results 格式为数组存放恢复的IAP商品交易信息对象 IAPTransaction通用需将返回的支付凭证传给后端进行二次认证
that.ComplateRequestArr = results
console.log('未完成订单数组共有:=》', that.ComplateRequestArr.length)
if (results && results.length > 0) {
console.log('未完成订单数组共有resultsresultsresults=》', results)
results.map((item, index) => {
// "0"为正在支付;"1"为支付成功;"2"为支付失败;"3"为支付已恢复。
if (item.transactionState == '1') {
// 已经支付,但是没有走逻辑的内购订单 就发给后台做验证
that.iapCheck('未完成订单的验证', item, index)
// that.finishTransaction(item)
} else if (item.transactionState != '1' || item.transactionState != '0') {
// 不是正在支付订单,也不是已经支付订单就关闭掉
// 其他状态的内购订单
that.finishTransaction(item)
}
// if (item.transactionState == '1') {
// // 已经支付,但是没有走逻辑的内购订单 就发给后台做验证
// that.iapCheck('未完成订单的验证', item, index)
// // that.finishTransaction(item)
// } else if (item.transactionState != '1' || item.transactionState != '0') {
// // 不是正在支付订单,也不是已经支付订单就关闭掉
// // 其他状态的内购订单
console.log('未完成订单数组共有resultsresultsresults15=》', results)
that.finishTransaction(item)
// }
})
}
@@ -311,40 +311,34 @@
},
async iphonepay() {
//获取iap通道是判断当前设备是否支持苹果内购支付的必要条件
const that = this;
uni.showLoading({
title: "检测支付环境"
title: "购买中"
})
console.log("检测支付环境...");
this.iapChannel = await this.getProvider()
console.log('that.iapChannel', this.iapChannel);
if (this.iapChannel) {
this.requestOrder();
await this.restoreComplateRequest()
await this.requestOrder();
} else {
uni.hideLoading()
uni.showToast({
title: '不支持内购支付',
icon: 'none'
})
console.log("获取iap支付通道失败" + e.message, that.iapChannel);
}
},
requestOrder() {
uni.showLoading({
title: "获取商品信息",
mask: true,
});
const that = this;
console.log(that.stepsCj.priceTypeId, 88888888);
// ['xxxxx'] 是平台申请拿到的内购商品的id
let IAPOrders = [];
IAPOrders.push('Z' + that.stepsCj.priceTypeId);
// console.log(IAPOrders, "IAPOrders");
console.log(IAPOrders, "IAPOrders");
// 新建订单
uni.showLoading({
title: "正在创建订单",
mask: true,
});
// uni.showLoading({
// title: "正在创建订单",
// mask: true,
// });
that.iapChannel.requestProduct(
IAPOrders,
function(event) {
@@ -367,16 +361,14 @@
},
async topay(id) {
const that = this;
uni.showLoading({
title: "正在支付",
mask: true,
});
let orderInfo = {
productid: id,
username: that.orderSn, // 用户标识/订单标识
quantity: 1,
manualFinishTransaction: true, // 3.5.1+ 支持,设置此参数后需要开发者主动关闭订单,参见下面的关闭订单方法 finishTransaction()
}
console.log('支付后的订单信息', orderInfo);
this.transaction = await this.requestPayment(orderInfo)
console.log('支付后的that.transaction', this.transaction);
},
@@ -389,12 +381,13 @@
productId: result.payment.productid.slice(1), // 产品id
orderId: result.payment.username, // 系统订单号
receiptData: result.transactionReceipt, // 苹果返回收据
// sandBox: true, //测试数据
// body: that.stepsCj.priceTypeId // 充值类型id
};
console.log("提交给后台的数据", data);
$http
.request({
url: "/Ipa/veri",
url: "Ipa/veri",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: {
@@ -404,22 +397,25 @@
})
.then((res) => {
// console.log('res',res);
console.log(JSON.stringify(res));
if (res.code == 0) {
this.transaction = null
uni.hideLoading()
console.log(JSON.stringify(res), '返回信息');
uni.showToast({
title: '充值成功!',
icon: 'success'
})
console.log("充值订单已处理,请留意账户金额变动....");
uni.hideLoading()
// console.log("充值订单已处理,请留意账户金额变动....");
// 服务器验证票据有效后在客户端关闭订单 (iapChannel.finishTransaction)
that.finishTransaction(result);
// that.finishTransaction(result);
}
})
.catch((e) => {
uni.hideLoading()
console.log('后台验证失败=>', e);
this.transaction = null
uni.showModal({
title: "提示",
showCancel: false,
@@ -512,10 +508,7 @@
let that = this;
that.payType = e;
},
//ios充值
iosPay() {
this.iphonepay();
},
// 充值
goToPay() {
this.kaiChar();
@@ -562,6 +555,8 @@
})
.then((res) => {
that.orderSn = res.orderSn;
console.log(res.orderSn, 'dingdanhao111111111111')
uni.hideLoading();
if (res.code == 0) {
if (that.payType == 2) {
@@ -636,7 +631,7 @@
// })
} else if (that.payType == 3) {
console.log("苹果支付");
that.iosPay();
that.iphonepay();
}
}
});

783
pages/user/cateList.vue Normal file
View File

@@ -0,0 +1,783 @@
<template><page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<view class="container commonPageBox" style="background-color: #fbf9f7">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar :title="options.navTitle" bgColor="#5F8F7F" fontColor="#fff"></z-nav-bar>
<view class="contentBox commonPageContentBox" :style="`height: calc(100vh - ${
(50 + statusBarHeight)
}px) !important;`">
<common-list :isNoIcon="true" noDataIcon="data" :isCondition="true" :isLoadingHide="isLoadingHide"
@lower="onReachBottom1" :pagination="pagination" :dataList="dataList" @hancleClick="gotoDetail"
label="title">
<template slot="labelSlot" slot-scope="slotProps">
<view class="feng">
<image v-if="slotProps.row.image" :src="slotProps.row.image" mode="aspectFit"
class="book_image"></image>
<view v-else style="
color: #c0c4cc;
font-size: 22rpx;
line-height: 160rpx;
text-align: center;
">暂无封面图</view>
</view>
<view class="cate_right">
<view class="related_courses_name hidden1"
:style="`${slotProps.row.buy ? 'color:#43A181' : ''}`">{{ slotProps.row.title }}</view>
</view>
<!-- <text v-if="slotProps.row.conditions!='03'">试听</text> -->
</template>
</common-list>
</view>
</view>
</template>
<script>
import list from "@/pages/component/commonComponents/list";
import $http from "@/config/requestConfig.js";
import {
mapState
} from "vuex";
export default {
components: {
list,
},
data() {
return {
isLoadingHide: false,
playData: {},
options: {},
searchValue: "",
pagination: {
// 请求参数
page: 1, //页码
limit: 20, //每页显示
total: 0, //总条数
},
twoCateList: [], // 二级分类标题
titleList: [], // 方剂标题
curOneCateIndex: 0, // 当前选中的一级分类
curTwoCateIndex: 0, // 当前选中的二级分类
searchList: [], // 搜索结果数组
showSearchList: false,
userMes: {}, // 用户信息
searchDisable: false, // 搜索不可用
limitShow: false,
limitTitle: "提示",
limitContent: "",
scrollViewHeight: 0,
dataList: [],
urlList: {
list: "/visitor/getCourseBySociologyId",
},
};
},
async onPullDownRefresh() {
console.log('下拉刷新')
this.pagination.page = 1;
this.dataList = []
await this.getData();
setTimeout(() => {
uni.stopPullDownRefresh();
console.log('下拉刷新已停止');
}, 50);
},
onLoad(options) {
console.log(options, "989");
this.options = options;
this.getUserInfo();
this.getData();
},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
computed: {
...mapState(["userInfo"]),
},
methods: {
onReachBottom1() {
// 上拉加载
// 当列表数量不大于或等于总数量,则再次调用接口请求数据
if (this.dataList.length >= this.pagination.total) return;
this.pagination.page++;
this.getData();
},
// 检查是有权限使用搜索功能
checkDisable() {
console.log("点击了");
},
// 显示无权限弹窗
// showNoRights() {
// let that = this
// uni.showModal({
// content: "",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// that.clear()
// }
// }
// })
// },
// 获取用户详情
getUserInfo() {
// 用户详情
if (this.userInfo.id != undefined) {
this.$http.post("book/user/info/" + this.userInfo.id).then((res) => {
this.userMes = res.user;
this.getCateList();
console.log(this.userMes, "呼呼");
});
}
},
// 详情
gotoDetail(v) {
console.log(v);
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/user/curriculumDetail?navTitle=${v.title}&title=${v.title}&id=${v.id}`,
});
},
getData() {
this.isLoadingHide = false;
this.$http
.request({
url: this.urlList.list,
method: "POST",
data: {
sociologyId: Number(this.options.id), //分类id
// ...this.pagination,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
console.log("res at line 289:", res);
// this.pagination.total = res.courses.total;
// if (res.courses.total == 0) {
this.isLoadingHide = true;
// }
this.dataList = [...this.dataList, ...res.courseList];
});
},
// 获取名称
getTitles(dictType) {
console.log("dictType", dictType);
if (this.curOneCateIndex == 0) {
if (dictType == 2) {
uni.navigateTo({
url: "./zhuanzhuchuban",
});
return;
}
$http
.request({
url: "book/generalArticle/articleByPage",
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
type: dictType == 1 ? "1" : "2",
limit: 1000,
current: 1,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
console.log(res, "内容获取成功");
if (res.code == 0 && res.result && res.result.records.length > 0) {
this.titleList = res.result.records;
} else {
this.titleList = [];
}
})
.catch((e) => {
this.titleList = [];
console.log(e);
});
}
if (this.curOneCateIndex == 1) {
$http
.request({
url: "book/medicaldes/inheritListByPage",
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
dictType: dictType,
limit: 1000,
current: 1,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
console.log(res, "内容获取成功");
if (res.code == 0 && res.result.records.length > 0) {
this.titleList = res.result.records;
for (let i = 0; i < this.titleList.length; i++) {
this.titleList[i].imageslist = [];
this.titleList[i].imageslist = this.titleList[i].img.split(";");
}
} else {
this.titleList = [];
}
})
.catch((e) => {
this.titleList = [];
console.log(e);
});
}
if (this.curOneCateIndex == 2) {
$http
.request({
url: "book/medicaldes/lightListByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
limit: 1000,
page: 1,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
console.log(res, "内容获取成功");
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result;
} else {
this.titleList = [];
}
})
.catch((e) => {
this.titleList = [];
console.log(e);
});
}
if (this.curOneCateIndex == 3) {
$http
.request({
url: "book/medicaldes/recordByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
limit: 1000,
page: 1,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
console.log(res, "内容获取成功");
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result;
} else {
this.titleList = [];
}
})
.catch((e) => {
this.titleList = [];
console.log(e);
});
}
},
setTwoCateIndex(item, index) {
let dictType = item.dictType;
this.curTwoCateIndex = index;
this.getTitles(dictType);
},
async setOneCateIndex(item, index) {
console.log(index, 99999);
var that = this;
// if(this.userMes.tgdzPower == 0){
// let that = this
// uni.showModal({
// content: "购买 针灸六经法要上册和下册 后方可使用此功能",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// }
// }
// })
// return
// }
// if(item.title == "时辰取穴"){
// uni.navigateTo({
// url: "../timeAcupoint/timeAcupoint"
// })
// return
// }
let type = item.type;
this.curOneCateIndex = index;
this.curTwoCateIndex = 0;
this.searchValue = "";
this.searchList = [];
this.showSearchList = false;
// if (index != 2) {
// await this.getTowCateList(type);
// uni.createSelectorQuery().select('.oneCateList').boundingClientRect(function (rect) {
// var height = rect.height
// console.log('元素高度:',);
// }).exec();
// } else {
// this.getJFList(dictType)
// }
},
async getTowCateList(type) {
var that = this;
$http
.request({
url: "book/medicaldes/typeList?label=" + type,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
loadAnimate: "none", // 请求加载动画
// 'categoryId': id
},
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
})
.then((res) => {
console.log(res, "二级分类获取成功");
if (res.code == 0 && res.result.length >= 0) {
this.twoCateList = res.result;
if (this.curOneCateIndex == 0) {
this.twoCateList = [{
dictType: "1",
dictValue: "学术思想",
},
{
dictType: "2",
dictValue: "出版专著",
},
{
dictType: "3",
dictValue: "学术平台",
},
];
}
if (this.curOneCateIndex == 2) {
this.twoCateList = [{
dictType: "1",
dictValue: "吴门之歌",
},
{
dictType: "2",
dictValue: "巴山夜语",
},
{
dictType: "3",
dictValue: "吴门之徽",
},
];
}
if (this.curOneCateIndex == 3) {
this.twoCateList = [{
dictType: "1",
dictValue: "学术贡献",
},
{
dictType: "2",
dictValue: "抗疫纪实",
},
{
dictType: "3",
dictValue: "吴门公益",
},
];
}
this.getTitles(this.twoCateList[0].dictType);
this.$nextTick(async () => {
// await uni.createSelectorQuery().select('.uni-tabbar').boundingClientRect(function (rect) {
// console.log(rect.height, '3333')
// // var height = 42 + rect.height + 10;
// // that.scrollViewHeight = height;
// // console.log(that.scrollViewHeight, '111111')
// // that.$forceUpdate()
// // console.log('元素高度2', height);
// }).exec();
await uni
.createSelectorQuery()
.select(".cateList")
.boundingClientRect(function(rect) {
console.log(rect.height, "22222");
var height = 42 + rect.height + 20;
that.scrollViewHeight = height;
console.log(that.scrollViewHeight, "111111");
that.$forceUpdate();
console.log("元素高度2", height);
})
.exec();
});
} else {
this.twoCateList = [];
this.titleList = [];
}
})
.catch((e) => {
this.twoCateList = [];
this.titleList = [];
console.log(e);
});
},
transformData(inputData) {
const result = {};
inputData.forEach((item) => {
const {
letter
} = item;
if (!result[letter]) {
result[letter] = [];
}
result[letter].push(item);
});
// const finalResult = Object.keys(result).map(key => ({ [key]: result[key] }));
return result;
},
// getJFList(id) {
// $http.request({
// url: "book/prescript/prescriptListForJF",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// if (res.code == 0 && res.list.length > 0) {
// this.twoCateList = []
// this.titleList = this.transformData(res.list)
// console.log('JF经方', this.titleList)
// } else {
// this.twoCateList = []
// this.titleList = []
// }
// }).catch(e => {
// this.twoCateList = []
// this.titleList = []
// console.log(e)
// })
// },
getCateList(id) {
id ? "" : (id = 0);
this.twoCateList = [];
this.curTwoCateIndex = 0;
// 0为获取顶级分类其他为搜索下级分类目前的逻辑顶级是写死的所以可能只会涉及到搜索第二级
// $http.request({
// url: "book/prescript/prescriptCategoryList",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// console.log(res, '脉穴分类获取成功')
// if (res.code == 0 && res.list.length > 0) {
// this.oneCateList = res.list
// this.getTowCateList(this.oneCateList[0].type);
// } else {
// this.oneCateList = []
// }
// }).catch(e => {
// this.oneCateList = []
// console.log(e)
// })
},
// 放大图片
previewImage(url) {
console.log(url);
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ["很抱歉,暂不支持保存图片到本地"],
success: function(res) {
// console.log(res,'+++++')
},
},
});
},
// getSearch() {
// $http.request({
// url: "book/prescript/searchPrescript",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'keywords': this.searchValue,
// type: this.curOneCateIndex + 1
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// console.log(res, '搜索结果')
// if (res.code == 0 && res.list.length >= 0) {
// this.showSearchList = true
// this.searchList = res.list
// } else {
// this.searchList = []
// }
// }).catch(e => {
// // this.titleList = []
// this.searchList = []
// console.log(e)
// })
// },
// search(res) {
// console.log(res, 'res')
// // uni.showToast({
// // title: '搜索:' + res,
// // icon: 'none'
// // })
// if (res == '') {
// this.showSearchList = false
// this.searchList = []
// } else {
// this.getSearch()
// }
// },
// input(res) {
// console.log('----input:', res)
// if (res == '') {
// this.searchList = []
// } else {
// this.getSearch()
// }
// },
// clear(res) {
// console.log('----clear:', res)
// // uni.showToast({
// // title: 'clear事件清除值为',
// // icon: 'none'
// // })
// this.searchValue = ''
// this.showSearchList = false
// },
// blur(res) {
// // console.log('----blur:', res)
// // if (res == '') {
// // this.showSearchList = false
// // this.searchList = []
// // } else {
// // this.getSearch()
// // }
// },
// focus(e) {
// console.log('----focus:')
// // uni.showToast({
// // title: 'focus事件输出值为' + e.value,
// // icon: 'none'
// // })
// // 等于1 就是有权限
// // this.showSearchList = true
// },
// cancel(res) {
// uni.showToast({
// title: '点击取消,输入值为:' + res.value,
// icon: 'none'
// })
// }
},
onBackPress() {
// #ifdef APP-PLUS
plus.key.hideSoftKeybord();
// #endif
},
};
</script>
<style lang="scss" scoped>
.u-grid-list {
// height: 40rpx;
}
.searchList {
.item {
font-size: 28rpx;
padding: 20rpx;
border-bottom: 1px solid #dadbde;
}
}
.scroll-view_H {
background-color: #fff;
white-space: nowrap;
padding: 10rpx;
}
.scroll-Y {
height: 100%;
}
.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;
}
.titleList {
height: 100%;
}
.titleList2 {
height: calc(100% - 170rpx);
}
.commonPageContentBox {
// min-height: 100% !important;
}
.related_courses_name {
width: 100%;
// display: inline-block;
// float: left;
line-height: 60rpx;
// width: calc(100% - 90rpx) !important;
// padding-left: 20rpx;
font-weight: 700;
.aui-text-danger {
display: inline-block;
float: right;
}
}
.book_image {
width: 100%;
height: 100%;
float: left;
}
/deep/.list_item {
border-radius: 20rpx;
margin-bottom: 40rpx;
background: rgba(255, 255, 255, 0.85) !important;
box-shadow: 0px 0px 3px 0px rgba(0, 82, 79, 0.2) !important;
.rightArrow {
margin-top: 0rpx !important;
}
.titleItem {
display: flex;
align-items: center;
}
}
// /deep/.list_item :nth-child(2n-1) {
// background: rgba(255, 255, 255, 0.85) !important;
// }
.feng {
background-color: #f5f5f5;
margin: 0rpx 22rpx 0 0;
height: 160rpx !important;
width: 240rpx !important;
float: left;
border-radius: 14rpx;
// border: 1rpx solid #e9e9e9;
}
.cate_right {
width: calc(100% - 260rpx);
float: right;
}
.commonPageBox {
background-image: #edf6f5ad !important;
}
/deep/.uni-scroll-view-content {
box-sizing: border-box !important;
padding: 20rpx !important;
}
.curriculum_tag {
width: auto !important;
padding: 0 20rpx;
font-size: 24rpx;
// height: 40rpx;
text-align: center;
display: inline-block;
background-color: #43a181;
border: 1rpx solid #43a181;
border-radius: 4rpx;
color: #fff;
}
.curriculum_tag_info_box {
width: 100%;
margin-top: 1cqi;
display: flex;
align-items: center;
// justify-content: space-between;
}
.price_box {
display: flex;
align-items: center;
margin-top: 0rpx;
// justify-content: space-between;
}
/deep/.scroll-view-item:nth-child(2n-1) {
background-color: rgba(255, 255, 255, 0.85) !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -99,7 +99,7 @@
<text v-if="type == 1000" @click="onPageJump('/pages/user/login/forget')">忘记密码</text>
</view>
</view>
<view class="youKeL" style="margin-bottom: 40rpx" v-if="!isAndorid">
<view class="youKeL" style="margin-bottom: 40rpx" v-if="$platform=='ios'">
<view @click="onPageJump('/pages/user/visitor')">免登陆体验</view>
</view>

View File

@@ -8,8 +8,16 @@
<view v-if="selected == 1">
<view class="header_box"></view>
<view class="main_content_box">
<view class="cate_box" v-if="cateList.length>0">
<view class="cate_item_box" v-for="(v, i) in cateList" @click="handleClickCate(v)">
<view class="cate_item_border">
<image :src="v.icon" mode="aspectFill" style="width: 49rpx; height: 49rpx"></image>
</view>
<view class="cate_item_name">{{ v.title }}</view>
</view>
</view>
<view class="flash_sale_box notice_box">
<view class="flash_sale_top">
<image
@@ -35,7 +43,7 @@
</view> -->
</view>
</view>
<view class="flash_sale_box">
<view class="flash_sale_top">
<image
@@ -77,31 +85,7 @@
</view>
</view>
<view class="greenCardBox1 learning_box listening_box">
<view class="learning_box_top">
<view class="learning_top greenCardBoxTop PM_font">
<view class="titlebg">会员课程</view>
</view>
</view>
<view class="flash_sale_content greenCardBoxContent">
<scroll-view scroll-x="true" class="scroll-X" style="">
<common-curriculum-list
imgUrl="image"
:isCondition="true"
:dataList="flashSaleList"
@hancleClick="goCourseDescription"
label="title"
>
<template slot="labelSlot" slot-scope="slotProps">
<view class="related_courses_name hidden1">{{
slotProps.row.title
}}</view>
</template>
</common-curriculum-list>
</scroll-view>
</view>
</view>
<!-- <view class="learning_box listening_box bottomBox">
<view class="item_img" @click="handleGoApp">
<image src="@/static/tab/bottom1.png" mode="aspectFill"></image>
@@ -114,13 +98,17 @@
v-if="selected == 4"
class="mine_bg_box"
style="
height: 100%;
height: 100vh;
background-color: #39b4a84d !important;
padding: 20rpx;
font-size: 28rpx;
"
>
<view class="bg_top">
<u-icon @click="goSetting" class="setIcon" labelColor="#fff" labelPos="bottom" label="设置" name="setting"
:style="`top:${(10 + statusBarHeight) * 2}rpx`" color="#fff" size="28"></u-icon>
</view>
<view style="height: 50rpx"></view>
<view class="per_mes" style="display: flex; align-items: center">
<image src="@/static/icon/fengziIcon.png" class="per_mes_img"></image>
@@ -256,17 +244,17 @@ export default {
// url: "",
imgUrl: require("@/static/icon/homePage/kcjg.png"),
},
{
name: "我的课程",
url: "/pages/curriculum/order/index/index",
// url: "",
imgUrl: require("@/static/icon/homePage/wdkc.png"),
},
{
name: "吴门之光",
url: "/pages/medicaldes/medicaldes",
imgUrl: require("@/static/icon/homePage/wmzg.png"),
},
// {
// name: "我的课程",
// url: "/pages/curriculum/order/index/index",
// // url: "",
// imgUrl: require("@/static/icon/homePage/wdkc.png"),
// },
// {
// name: "吴门之光",
// url: "/pages/medicaldes/medicaldes",
// imgUrl: require("@/static/icon/homePage/wmzg.png"),
// },
],
urlList: {
@@ -468,6 +456,7 @@ export default {
isBook: 0, //是否是疯子读书
isMedical: 0, //是否是吴门医述
isSociology: 1, //是否是众妙之门
isPsyche:0,
};
this.$http
.request({
@@ -675,7 +664,12 @@ export default {
);
// }
}
},
},goSetting() {
uni.navigateTo({
url: "/pages/mine/set/index",
});
// this.onPageJump("/pages/mine/set/index");
},
goGoodsDetail(v) {
console.log(v);
uni.navigateTo({
@@ -685,20 +679,7 @@ export default {
},
handleClickCurriculum(v) {
uni.showModal({
content: "客官请先登录哦~",
confirmText: "去登录",
cancelText: "再逛逛",
confirmColor: "#018f89", //确定按钮颜色
success(res) {
if (res.confirm) {
uni.navigateTo({
url: "/pages/user/login/login",
});
}
},
});
return;
console.log(v);
if (v.url) {
uni.navigateTo({
@@ -710,22 +691,9 @@ export default {
},
handleClickCate(v) {
console.log(v);
uni.showModal({
content: "客官请先登录哦~",
confirmText: "去登录",
cancelText: "再逛逛",
confirmColor: "#018f89", //确定按钮颜色
success(res) {
if (res.confirm) {
uni.navigateTo({
url: "/pages/user/login/login",
});
}
},
});
return;
uni.navigateTo({
url: `/pages/curriculum/cate/index?navTitle=${v.title}&title=${v.title}&id=${v.id}`,
url: `/pages/user/cateList?navTitle=${v.title}&title=${v.title}&id=${v.id}`,
});
},
@@ -937,19 +905,19 @@ function calcTimer(timer) {
width: 100%;
display: flex;
overflow: hidden;
height: 254rpx;
height: 314rpx;
.flash_sale_content_item {
display: inline-block;
width: 165rpx;
width: 48%;
margin-right: 12rpx;
overflow: hidden;
}
.book_image {
width: 165rpx;
height: 192rpx;
width: 100%;
height: 252rpx;
border-radius: 10rpx;
background-color: #f5f5f5;
}
@@ -1417,4 +1385,18 @@ function calcTimer(timer) {
// background: #fff;
}
.bg_top {
// background-position: center center;
padding: 0 30rpx;
height: 40rpx;
position: relative;
.setIcon {
position: absolute;
right: 30rpx;
// top: 30rpx;
}
}
</style>