vip功能

This commit is contained in:
liuyuan
2025-02-17 15:53:12 +08:00
parent c142228b59
commit 6d86076b90
13 changed files with 1454 additions and 3017 deletions

View File

@@ -13,36 +13,32 @@
<view class="bg_top flex_box flex_between">
<view class="per_mes">
<view class="per_mes_user">
<view class="" style="width: 100rpx; height: 100rpx; display: inline-block;">
<image @click="goUserInfo" :src="userMes.avatar" v-if="userMes.avatar != null"
<view class="per_mes_user" :style="hasVipType2?'width: 170rpx;':''">
<view style="width: 120rpx; height: 120rpx; display: inline-block;">
<image @click="goUserInfo" :src="userMes.avatar" v-if="userMes.avatar"
class="per_mes_img color_shandow"></image>
<image src="@/static/icon/home_icon_logo.png" v-if="userMes.avatar == null"
<image src="@/static/icon/home_icon_logo.png" v-else="userMes.avatar"
class="per_mes_img color_shandow"></image>
</view>
<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 class="user_vip_box" v-if="hasVipType1 || hasVipType2">
<view class="user_vip super" :style="hasVipType2?'width: 170rpx;':''">
<view class="user_vip_item" v-if="hasVipType1"><text>医学</text><image src="@/static/icon/chao_svip.png"></image></view>
<view class="user_vip_item" v-if="hasVipType2"><text>国学心理学</text><image src="@/static/icon/chao_svip.png"></image></view>
</view>
</view>
</view>
<view class="userInfoBox" style="width: calc(100% - 220rpx)">
<view class="userInfoBox" style="width: calc(100% - 180rpx)" :style="hasVipType2?'margin-left: 30rpx;':''">
<template>
<view class="name">昵称{{ userMes.nickname ? userMes.nickname : "未设置" }}</view>
<view class="name">{{ userMes.nickname ? userMes.nickname : "未设置" }}</view>
</template>
<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 v-if="textList.length>0">
<view class="vip_type">
<view class="vip_type_item" v-for="(item,index) in textList" :key="index">{{item}}<image src="@/static/icon/chao_vip.png"></image></view>
</view>
</template>
<template v-if="userMes.userVip && userMes.vip != 0 && !isAndorid">
<view class="phone email">VIP{{userMes.userVip.endTime.split(" ")[0]}}到期</view>
</template>
<!-- <text class="tong">累计读书5本
<span style="margin: 0 20upx;">|</span> 今日读50分钟
</text> -->
</view>
<br clear="both" />
</view>
@@ -50,57 +46,36 @@
</view>
<view class="mine_box" :style="`top:${(45 + statusBarHeight) * 2}rpx`">
<view style="
padding: 20rpx; overflow: hidden;
">
<!-- vip 只有安卓才显示-->
<view v-if="isAndorid" class="chong_zhi boxShadow box_fillet vip_box"
@click="onPageJump('/pages/mine/vip/index')">
<view v-if="!userMes.userVip" class="noVip">
<view class="noVip">
<view class="zhanghu PM_font" style="text-align: left">
<image class="vip_image" src="@/static/vip.png" mode="aspectFit">
<image class="vip_image" style="margin-left: 10rpx;" src="@/static/vip.png" mode="aspectFit">
</image>
<text style="color: #fff; font-size: 60rpx;">VIP</text>
<text style="color: #fff; font-size: 60rpx;" v-if="vipList.length==0">VIP</text>
</view>
<view class="" style="width:calc(100% - 200rpx);">
<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 class="vip_infor" style="width:calc(100% - 200rpx);" v-if="vipList&&vipList.length>0">
<!-- <text class="vip_infor_item" v-if="vipList.includes(1)">医学SVIP</text>
<text class="vip_infor_item" v-if="vipList.includes(2)">国学心理学SVIP</text>
<view class="vip_infor_item" v-for="(item, index) in textList" :key="index">
<text>{{item}}VIP</text>{{vipList[index].endTime.split(' ')[0]}} 到期
</view> -->
<view class="vip_infor_item" v-for="(item, index) in vipList" :key="index">
<text>{{item.text}}VIP</text>{{item.endTime.split(' ')[0]}} 到期
</view>
</view>
</view>
<view v-else class="noVip hasVip">
<view class="zhanghu PM_font" style="text-align: center">
<image class="vip_image" src="@/static/vip.png" mode="aspectFit">
</image>
<text style="color: #fff; font-size: 60rpx;">VIP</text>
</view>
<view class="time">{{ userMes.userVip.endTime.split(" ")[0] }}到期</view>
<view v-else class="vip_null">定制VIP畅享更多专属权益</view>
<view class="vip_btn"><button>定制</button></view>
</view>
</view>
<!-- end -->
<view class="chong_zhi boxShadow box_fillet chongzhi_box">
<!-- <view
class="zhanghu"
@click="onPageJump('/pages/mine/wallet/index/index')"
>
我的账户
<image src="@/static/icon/icon_right.png" class="rightArrow"></image>
</view> -->
<view class="chong_list">
<view class="left">
<view class="chong_list_item" style="
@@ -112,12 +87,6 @@
<view class="pay_item_img">
天医币<u-icon @click.native.stop="openInfo()" name="question-circle"
style="float: right; margin: 0 6rpx"></u-icon>
<!-- <image
style="width: 100%; height: 100%"
src="@/static/icon/pay_3.png"
mode="aspectFil"
>
</image> -->
</view>
<view class="text" style="line-height: 40rpx; display: flex">{{
@@ -133,12 +102,6 @@
" @click="onPageJump('/pages/mine/wallet/jf/index')">
<view class="pay_item_img">
积分
<!-- <image
style="width: 100%; height: 100%"
src="@/static/icon/jifen2.png"
mode="aspectFil"
>
</image> -->
</view>
<view class="text" style="line-height: 40rpx">{{
@@ -160,13 +123,6 @@
}}</view>
</view>
</view>
<!-- v-if="iosHide" -->
<!-- <view v-if="iosHide" class="chong_list_item">
<b>{{ userMes.conponsCount }}</b>
优惠券
</view> -->
<!-- <b class="chong_btn" @click="onPageJump('../sdkDemo/pay')"> </b> -->
<view class="chong_list_item" style="
display: flex;
align-items: center;
@@ -216,14 +172,8 @@
<view class="bottom">
<view class="button_box" style="
align-items: center;
justify-content: center;
">
<!-- <u-button
size="small"
text="不同意"
@click="protocolShow=false"
></u-button> -->
<u-button style="width: 200rpx; float: center" :plain="true" text="知道啦" color="#9b9b9b"
size="small" @click="infoShow = false"></u-button>
</view>
@@ -231,8 +181,6 @@
</view>
</view>
</u-popup>
<!-- <u-modal :show="infoShow" title="提示信息" :content=""></u-modal> -->
<music-play :playData="playData"></music-play>
<z-navigation></z-navigation>
@@ -242,7 +190,6 @@
<script>
import musicPlay from "@/components/music.vue";
import $http from "@/config/requestConfig.js";
// import appShare, { closeShare } from '@/uni_modules/zhouWei-APPshare/js_sdk/appShare';
import {
mapState,
mapMutations
@@ -250,31 +197,6 @@
export default {
data() {
return {
swiperList: [{
name: "开通会员畅享更多活动",
style: "color:#fff;font-size:28rpx"
},
{
name: "众妙之门视频",
style: "color:#fff;font-size:28rpx"
},
{
name: "吴门医述视频",
style: "color:#fff;font-size:28rpx"
},
{
name: "专属视频视听",
style: "color:#fff;font-size:28rpx"
},
{
name: "读书相关权益",
style: "color:#fff;font-size:28rpx"
},
{
name: "活动报名<text style='color:#ffaa7f'>(折扣价)</text>",
style: "color:#fff;font-size:28rpx"
},
],
roleObj: {},
infoShow: false, // 显示电子书相关
showEbook: false, // 显示电子书相关
@@ -290,24 +212,16 @@
pageList: [{
name: "我的订单",
url: "/pages/bookShop/orderList?type=mine",
type: "switchTab",
// type: "pageJump",
type: "switchTab"
},
{
name: "我的证书",
url: "/pages/certificate/certificate",
type: "pageJump",
},
// {
// name: "购物车",
// url: "../peanut/shopping",
// type: "pageJump",
// },
{
name: "个人资料",
url: "/pages/mine/userInfo/persData",
type: "pageJump",
},
{
@@ -315,11 +229,6 @@
url: "/pages/component/commonComponents/address/index?type=mine",
type: "pageJump",
},
// {
// name: "分享APP",
// type: "share",
// },
{
name: "关于我们",
url: "/pages/mine/aboutUs/index",
@@ -329,10 +238,13 @@
name: "问题反馈/申诉",
url: "/pages/user/workOrder",
type: "workOrder"
},
// { name: "退出登录", type: "quitLogin" },
// { name: "注销帐号", type: "loginOut" },
}
],
//vip
vipList: [],
textList: [], //普通vip文字
hasVipType1: false,
hasVipType2: false
};
},
//第一次加载
@@ -342,21 +254,19 @@
// #ifdef APP-PLUS
this.getOS();
this.platform = uni.getSystemInfoSync().platform;
// console.log('操纵系统',this.platform)
// #endif
},
computed: {
...mapState(["userInfo"]),
},
//页面显示
async onShow() {
// console.log(this.userInfo, "11111111111111");
this.getData();
this.getUserRole()
await this.getUserCouponList()
// 隐藏原生的tabbar
// uni.hideTabBar();
//获取vip身份
this.textList = [];
this.getUserVipType();
},
components: {
musicPlay,
@@ -369,7 +279,7 @@
await this.$http
.request({
url: "common/coupon/getCouponHistoryList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
method: "POST",
data: {
"page":1,
"limit":10,
@@ -379,7 +289,6 @@
"userId":this.userInfo.id
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
@@ -388,7 +297,6 @@
this.userCouponNum = res.couponList.total
}).catch(e => {
console.log(e);
this.$commonJS.showToast(e.errMsg);
})
},
@@ -396,14 +304,12 @@
this.infoShow = true;
},
goSetting() {
console.log('点击了');
this.onPageJump("/pages/mine/set/index");
},
goUserInfo() {
this.onPageJump("/pages/mine/userInfo/persData");
},
handleClickTab(v) {
console.log("v at line 259:", v);
switch (v.type) {
case "pageJump":
this.onPageJump(v.url);
@@ -427,7 +333,6 @@
uni.navigateTo({
url: `${v.url}?name=userPage`
})
// this.onPageJump(v.url);
break;
}
},
@@ -435,7 +340,6 @@
getOS() {
let oprateOs = "";
oprateOs = uni.getSystemInfoSync().platform;
// console.log(oprateOs)
if (oprateOs == "android") {
this.isAndorid = true;
} else {
@@ -443,7 +347,6 @@
}
},
haveSelected(data) {
console.log(data, " 选择的是");
if (data.index == 0) {
// 分享到好友
uni.share({
@@ -488,7 +391,6 @@
// 获取用户的角色信息
getUserRole() {
this.$http.post("common/class/getRoleType").then((res) => {
console.log('用户角色信息', res);
this.roleObj = res.result
var zhurenIndex = this.pageList.findIndex(item => {
return item.name == '主任教学'
@@ -512,15 +414,11 @@
var n = this.pageList.find(item => {
return item.name == '主任教学'
})
console.log('主任找到了么', n);
if (!n) {
// this.directorShow = true : this.directorShow = false
var item = {
// { // 主任之外的人显示班级管理
name: "主任教学",
url: "/pages/miniClass/DirectorModalList?type=mine",
type: "pageJump",
// },
type: "pageJump"
}
this.pageList.splice(3, 0, item);
}
@@ -530,14 +428,11 @@
var n = this.pageList.find(item => {
return item.name == '班级管理'
})
console.log('班长n找到了么', n);
if (!n) {
var item = {
name: "班级管理",
url: "/pages/miniClass/MonitorClassList?type=mine",
type: "pageJump",
type: "pageJump"
}
this.pageList.splice(3, 0, item);
}
@@ -547,21 +442,18 @@
var n = this.pageList.find(item => {
return item.name == '我的班级'
})
console.log('我的班级找到了么', n);
if (!n) {
var item = {
name: "我的班级",
url: "/pages/miniClass/myClassList?type=mine",
type: "pageJump",
type: "pageJump"
}
this.pageList.splice(3, 0, item);
}
}
}).catch(e => {
console.log('获取角色信息失败');
})
},
getData() {
@@ -569,7 +461,6 @@
if (this.userInfo.id != undefined) {
this.$http.post("common/user/getUserInfo").then((res) => {
this.userMes = res.result;
});
}
},
@@ -611,7 +502,6 @@
});
},
onPageJump(url) {
console.log(url, "url");
uni.navigateTo({
url: url,
});
@@ -627,6 +517,50 @@
url: "/pages/user/login/login",
});
},
//获取vip身份
getUserVipType() {
this.$http.request({
url: "common/userVip/getUserVipType",
method: "POST",
data: {},
header: {
"Content-Type": "application/json",
},
})
.then((res) => {
if (res.code == 0) {
this.vipList = res.list;
this.hasVipType1 = this.vipList.some(item => item.type === 1);
this.hasVipType2 = this.vipList.some(item => item.type === 2);
//普通 vip 角色展示逻辑
let text = '';
if(this.vipList.length>0){
this.vipList.forEach((item, index) => {
if(item.type=='4'){
item.text = '中医学';
this.textList.push(item.text);
}else if(item.type=='5'){
item.text = '针灸学';
this.textList.push(item.text);
}else if(item.type=='6'){
item.text = '肿瘤学';
this.textList.push(item.text);
}else if(item.type=='7'){
item.text = '国学';
this.textList.push(item.text);
}else if(item.type=='8'){
item.text = '心理学';
this.textList.push(item.text);
}else if(item.type=='1'){
item.text = '医学S';
}else if(item.type=='2'){
item.text = '国学心理学S';
}
});
}
}
});
},
},
};
</script>
@@ -634,52 +568,40 @@
@import "@/style/mixin.scss";
.per_mes_user {
display: block !important;
width: 125rpx;
text-align: center;
}
.per_mes {
width: 100%;
position: relative;
margin: 20rpx 0;
margin-top: 20rpx;
margin-top: 50rpx;
align-items: center;
display: flex;
align-items: center;
justify-content: space-between;
.per_mes_img {
// @include themeBorder(10rpx,10rpx,#4E79A3, #A6D8DC);
width: 100rpx;
height: 100rpx;
// background-color: #fff;
width: 120rpx;
height: 120rpx;
border-radius: 100rpx;
margin: 0 0 0 0;
float: left;
}
view {
// float: left;
// margin-top: 20rpx;
.name {
width: 100%;
// display: inline-block;
font-weight: bold;
font-size: 38upx;
margin-bottom: 10rpx;
font-size: 32rpx;
color: #6990c7 !important;
}
.phone {
font-size: 28rpx;
font-size: 26rpx;
color: #6990c7 !important;
}
.tong {
color: #6990c7 !important;
font-size: 25upx;
}
.per_user_img {
display: inline-block;
width: 40upx;
@@ -735,18 +657,11 @@
.chong_zhi {
box-shadow: none;
// border-bottom-left-radius: 0rpx !important;
// border-bottom-right-radius: 0rpx !important;
// background-color: #d8f8e4;
// margin: 0 0 30upx 0;
padding: 0 30upx;
height: auto;
.zhanghu {
width: 100%;
margin-bottom: 10rpx;
// line-height: 80rpx;
font-weight: bold;
display: flex;
align-items: center;
@@ -760,19 +675,14 @@
height: 100%;
display: flex;
align-items: center;
justify-content: space-around;
// flex-direction: column;
justify-content: space-between;
.zhanghu {
font-size: 40rpx;
width: 200rpx;
// margin-top: 20rpx;
margin-bottom: 0rpx;
text-align: center;
display: flex;
align-items: center;
// justify-content: space-around;
image {
width: 100rpx;
height: 100rpx;
@@ -888,40 +798,27 @@
.box_fillet {
border-radius: 20rpx;
overflow: hidden;
// background: #fff;
}
.chongzhi_box {
position: relative;
width: 100%;
height: 100%;
// float: left;
padding: 30rpx 20rpx 10rpx;
background-color: #f0f9fb;
border-radius: 20rpx;
}
.vip_box {
padding: 22rpx 0 !important;
margin-bottom: 32rpx;
padding: 0;
position: relative;
width: 100%;
height: 100%;
border-radius: 20rx;
background-image: linear-gradient(60deg, #8265f9 30%, #016dea 100%);
// @include themeBorder(6rpx, 20rpx, #258feb, #a6d8dc);
// @include themeBorder(
// 10rpx,
// 20rpx,
// (
// linear-gradient(#DDF2FC, #BFDDF2),
// linear-gradient(to bottom left, #D5EDF8, #a6d8dc)
// )
// );
.zhanghu {
font-size: 80rpx;
text-align: center;
@@ -933,25 +830,16 @@
/deep/.scroll-view-item:nth-child(2n-1) {
background-color: transparent !important;
}
uni-page-body {
// background: #d8f8e4 !important;
}
.bg_top {
padding: 0 30rpx;
padding-top: 80rpx;
margin-bottom: 60rpx;
overflow: hidden;
// position: relative;
}
.setIcon {
position: absolute;
right: 30rpx;
top: 70rpx;
top: 60rpx;
z-index: 2;
}
@@ -962,7 +850,6 @@
}
.list_box {
// background: #d8f8e4 !important;
padding: 20rpx 0;
margin-top: -10rpx;
}
@@ -977,8 +864,6 @@
padding: 8rpx;
box-sizing: border-box;
font-weight: bold;
// float: left;
// margin-right: 20rpx;
margin: 0 auto;
margin-bottom: 10rpx;
//margin-top:-10rpx;
@@ -997,7 +882,6 @@
font-size: 46rpx;
color: $themeColor;
background-color: #f5f5f5;
// line-height: 46rpx;
padding: 20rpx;
// border-leradius: 6px;
border-top-left-radius: 6px;
@@ -1016,13 +900,11 @@
.center {
line-height: 40rpx;
// padding:0 10rpx;
}
.bottom {
width: 100%;
margin-top: 60rpx;
font-size: 24rpx;
line-height: 26rpx;
color: #b0b0b0;
@@ -1044,36 +926,86 @@
}
}
}
.user_vip_box {
display: block;
// min-width: 100rpx;
// position: absolute;
// bottom: -20rpx;
// display: flex;
.user_vip_box{
width: 125rpx;
position: absolute;
margin-top: - 40rpx;
z-index: 99;
}
.user_vip_item{
display: flex;
align-items: center;
justify-content: center;
view {
font-size: 22rpx;
font-weight: normal;
}
}
.user_vip {
z-index: 1;
color: #fff;
font-size: 24rpx;
width: auto;
padding: 4rpx 10rpx;
font-weight: 800;
.user_vip_item {
border-radius: 20rpx;
background: linear-gradient(60deg, #8265f9 30%, #016dea 100%);
background: linear-gradient(90deg, #ff1f00 0%, #fa9f93 100%);
color: #fff;
font-size: 20rpx;
line-height: 40rpx;
height: 40rpx;
font-weight: bold;
margin-bottom: 5rpx;
}
.super {
background: linear-gradient(to right, #5bc9c1 0%, #258feb 100%);
color: #f4f2e4;
.user_vip_item image{
width: 49rpx;
height: 16rpx;
}
.vip_type{
display: flex;
align-items: center;
}
.vip_type_item{
display: flex;
align-items: center;
justify-content: center;
padding: 0 12rpx;
background: linear-gradient(90deg, #258feb 0%, #00e1ec 100%);
border-radius: 20rpx;
font-size: 20rpx;
line-height: 40rpx;
height: 40rpx;
font-weight: bold;
color: #fff;
margin-right: 10rpx;
}
.vip_type_item image{
width: 34rpx;
height: 24rpx;
}
.vip_infor{
padding-left: 22rpx;
}
.vip_infor_item{
display: block;
color: #fff;
font-size: 27rpx;
line-height: 36rpx;
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
font-weight: normal;
}
.vip_infor_item text{
color: #fff;
}
.vip_btn{
margin-right: 20rpx;
height: 50rpx;
}
.vip_btn button{
background: none;
border: 2rpx solid #f9ae3d;
border-radius: 40rpx;
font-size: 26rpx;
width: 90rpx;
height: 45rpx;
line-height: 45rpx;
color: #f9ae3d;
font-weight: bold;
}
.vip_null{
color: #fff;
font-size: 26rpx;
line-height: 34rpx;
}
</style>

File diff suppressed because it is too large Load Diff

926
pages/mine/vip/index123.vue Normal file
View File

@@ -0,0 +1,926 @@
<template>
<view class="container commonPageBox vipBox" style="height: 100vh !important">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar title="" bgColor="" fontColor="#2d38f4">
</z-nav-bar>
<view class="contentBox commonPageContentBox">
<view class="flash_sale_content">
<scroll-view scroll-y="true" class="scroll-Y" style="">
<view class="scroll-view-item flash_sale_content_item color_shandow" v-for="(v, i) in dataList"
:style="`background:${v.background ? v.background : '#f6f6f6'};`">
<view class="book_name PM_font" v-html="v.title" :style="`background: ${v.color};
;-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
`"></view>
<view class="vip_content">
<view class="vip_image_box">
<image class="vip_image" src="@/static/icon/quanyi.png" mode="aspectFit">
</image>
</view>
<view class="qunyi_box">
<view style="height: auto">
<view v-for="(item, index1) in v.quanyi" :style="item.style" v-html="item.name">
</view>
</view>
</view>
<!-- buttonbg -->
</view>
<view class="vip_list vip_button_list">
<view @click="openorderModal(item)" v-for="(item, index) in v.list" class="vip_button"
:style="`background:${v.buttonbg ? v.buttonbg : '#f6f6f6'};height:${v.list.length>2?`calc(100% / ${v.list.length}) !important`:'80rpx !important'}`">
<view style="max-width: 200rpx">{{ item.title }}</view>
<view style="margin: 0 5rpx">{{ item.lastFee }}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<u-popup :show="orderModalShow" mode="bottom" :round="20">
<view class="orderModalShow popup_box">
<u-icon name="close" color="#333" size="18" @click="closeOrderModalShow" style="
display: inline-block;
position: absolute;
right: 20rpx;
top: 20rpx;
"></u-icon>
<orderPay ref="orderPay" :dataInfo="selectVipData"></orderPay>
</view>
</u-popup>
<z-navigation></z-navigation>
</view>
</template>
<script>
import list from "@/pages/component/commonComponents/list";
import orderPay from "./order.vue";
import $http from "@/config/requestConfig.js";
import {
mapState
} from "vuex";
export default {
components: {
list,
orderPay,
},
data() {
return {
selectVipData: {},
orderModalShow: false,
superQuanyi: [{
name: "众妙之门视频",
style: {
color: "#2D38F4",
},
},
{
name: "吴门医述视频",
},
{
name: "专属视频视听"
},
{
name: "读书相关权益",
style: {
color: "#2D38F4",
},
},
{
name: "活动报名折扣价<text style='color:red'>(更优惠)</text>"
},
],
sociologyQuanyi: [{
name: "-",
style: {
color: "#fafafa",
},
},
{
name: "吴门医述视频"
},
{
name: "专属视频视听"
},
{
name: "-",
style: {
color: "#fafafa",
},
},
{
name: "活动报名折扣价"
},
],
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: "medical/user/getVipProductForUser",
},
};
},
onLoad(options) {
console.log(options, "989");
this.options = options;
this.getUserInfo();
this.getData();
},
computed: {
...mapState(["userInfo"]),
},
methods: {
closeOrderModalShow() {
this.orderModalShow = false;
this.selectVipData = {};
},
openorderModal(data) {
this.selectVipData = data;
this.orderModalShow = true;
this.$nextTick(() => {
this.$refs.orderPay.initPrepareOrder();
});
},
onReachBottom1() {
// 上拉加载
// 当列表数量不大于或等于总数量,则再次调用接口请求数据
if (this.dataList.length >= this.pagination.total) return;
this.pagination.page++;
this.getData();
},
// 检查是有权限使用搜索功能
checkDisable() {
console.log("点击了");
},
// 获取用户详情
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: `/pages/curriculum/order/curriculum/index?navTitle=${v.title}&title=${v.title}&id=${v.id}`,
});
},
getData() {
this.isLoadingHide = false;
this.$http
.request({
url: this.urlList.list,
method: "POST",
data: {},
header: {
"Content-Type": "application/json",
},
})
.then((res) => {
console.log("res at line 144:", res.list);
if (res.code == 0) {
for (let i in res.list) {
if (res.list[i].length > 0) {
var type =
i == "super_hd" || i == "sociology_hd" ? "hd" : "normal";
if (i == "super" || i == "super_hd") {
this.dataList.push({
title: "超级VIP",
key: "super",
type: type,
titleStyle: {
width: "120rpx",
},
background: "rgb(255 255 255 / 85%)",
buttonbg: "linear-gradient(to right, #3F7FC9 0%,#D3EEFC 100%) ",
color: "linear-gradient(130deg,rgb(45, 56, 244) 0%, #72AD92 100%)",
list: res.list[i],
quanyi: this.superQuanyi,
});
} else if (i == "sociology" || i == "sociology_hd") {
console.log('i+++++++++++++++++', i)
this.dataList.push({
title: "吴门医述VIP",
key: "sociology",
type: type,
list: res.list[i],
background: "#c3e7f7c7",
buttonbg: "rgba(255, 255, 255, 0.85)",
color: "linear-gradient(130deg,#1ECEDE 0%, #72AD92 100%)",
quanyi: this.sociologyQuanyi,
});
}
}
}
console.log(' this.dataList++++++++', this.dataList)
}
});
},
// 获取名称
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: {
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: {
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>
@import "@/style/mixin.scss";
.commonPageBox {
height: 100vh !important;
}
.vipBox {
font-size: 28rpx !important;
background-repeat: no-repeat;
display: flex;
justify-content: center;
overflow: hidden;
background-size: 100% 100%;
background-image: url("@/static/icon/vipbg.png");
}
.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 {
display: inline-block;
// 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 {
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;
}
}
.vip_image_box {
@include themFlex(center, center);
margin-bottom: 20rpx;
}
.vip_image {
width: 60rpx;
height: 60rpx;
// float: left;
}
/deep/.list_item {
.rightArrow {
margin-top: 10rpx !important;
}
}
.flash_sale_content {
width: 100%;
display: flex;
overflow: hidden;
height: 100%;
align-items: center;
justify-content: space-between;
.flash_sale_content_item {
width: auto;
min-width: 47%;
min-height: 48%;
margin: 10rpx !important;
border-radius: 20rpx;
overflow: hidden;
position: relative;
.vip_content {
width: 100%;
height: calc(100% - 80rpx);
// padding: 20rpx;
padding-top: 0;
// display: flex;
// align-items: center;
// justify-content: center;
// flex-direction: column;
position: relative;
}
}
.book_image {
width: 165rpx;
height: 192rpx;
border-radius: 10rpx;
background-color: #f5f5f5;
}
.book_name {
border-radius: 20rpx;
padding: 10rpx 20rpx;
padding-top: 20rpx;
// height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 46rpx;
line-height: 48rpx;
color: #64bec5;
text-align: center;
// margin-bottom: 10rpx;
overflow: hidden;
// text-overflow: ellipsis;
white-space: wrap;
}
}
.vip_button_list {
width: 100%;
max-height: 450rpx;
// @include themFlex(center, space-between);
// flex-direction: column;
padding-top: 0;
// display: flex;
padding: 20rpx 10rpx;
text-align: center;
position: absolute;
bottom: 20rpx;
left: 0;
width: 100%;
// justify-content: center;
// flex-direction: column;
.vip_button {
color: #265354;
width: 100%;
height: 80rpx !important;
// line-height: 80rpx;
display: flex;
// align-items: center;
justify-content: space-around;
padding: 0 0rpx;
font-size: 26rpx;
font-weight: bold;
width: 100%;
border-radius: 40rpx;
// line-height: 80rpx;
margin-top: 20rpx;
white-space: wrap;
view {
display: flex;
line-height: 30rpx;
align-items: center;
justify-content: center;
}
}
.vip_button:first-child {
margin-top: 0 !important;
}
}
.qunyi_box {
height: calc(100% - 280rpx);
color: #333;
font-weight: bold;
padding-left: 10rpx;
display: flex;
align-items: center;
justify-content: center;
.item {
line-height: 60rpx;
text-align: center;
padding: 0 10rpx;
border: 1px solid #64bec5;
border-radius: 50rpx;
margin-bottom: 20rpx;
}
}
.popup_box {
max-height: 95vh;
overflow: auto;
}
</style>

View File

@@ -60,14 +60,6 @@
<span style="font-size: 15px"><u @click="gotoPhone">022-24142321</u></span>
</view>
<view class="explain">
<!-- 3.非中国大陆用户可通过paypal账户支付
<br> &nbsp;&nbsp;&nbsp;&nbsp;
<account class="aui-text-success" style="text-decoration: underline;" tapmode onclick="fnCopyAccount()">
户名tmrpublishgroup@sina.com
</account>
点击复制
<br> &nbsp;&nbsp;&nbsp;&nbsp;请务必备注本软件的用户姓名及电话以便核对信息我们将于24小时内为您完成充值及升级 -->
3.非中国大陆用户可以信用卡支付简单快捷推荐使用
支付时使用的信用卡需要带有Visa或MasterCard的标识请向邮箱
<text @click="fnCopy('publisher@tmrjournals.com', '邮箱')" class="aui-text-success"
@@ -98,20 +90,12 @@
<template slot="leftSlot" slot-scope="slotProps">
<view class="price_box order_bottom_box">
<text class="price">合计
<text class="total">{{ dataInfo.lastFee }}</text>
</text>
<!-- <text style="color: #333; margin-left: 10rpx"
>原价{{ dataInfo.fee }}</text
> -->
</view>
</template>
</common-goods-nav>
</view>
<!-- @close="closeOrderModalShow" -->
<!-- <z-navigation></z-navigation> -->
</view>
</template>
@@ -197,14 +181,6 @@
},
],
priceBreakdownList: [],
// orderInfoList: [
// {
// text: "订单备注",
// placeholder: "点击填写订单备注",
// imgUrl: "",
// type: "remark",
// },
// ],
number: 1,
detailInfo: {},
content: "",
@@ -253,7 +229,6 @@
urlList: {
list: "app/phone.do?getCourseDetail_new",
initPrepareOrder: "/common/buyOrder/initPrepareOrder",
// buyOrder: "book/buyOrder/placeOrder",
buyOrder: "common/userVip/placeVipOrder",
curriculumInfo: "app/phone.do?getCourseInfo",
detailInfo: "app/phoneDoctor.do?getTaiHuClassInfo_new",
@@ -275,43 +250,17 @@
};
},
async onLoad(options) {
console.log("调用了onLoad方法");
var that = this;
console.log("options at line 387:", options);
this.options = JSON.parse(options.data);
// if (this.options.goods.findIndex((e) => e.goodsType == "05") >= 0) {
// this.isShowAddress = false;
// } else {
// this.isShowAddress = true;
// }
this.goodsDataList = this.options.goods;
// if (this.options.sourceType == "curriculum") {
// this.goToInfo = {
// url: "/pages/curriculum/order/index/index",
// type: 2,
// };
// } else {
this.goToInfo = {
url: "/pages/bookShop/orderList",
type: 1,
};
// }
// that.initPrepareOrder();
console.log("this.options at line 375:", this.options, this.goToInfo);
// this.getUserInfo()
// this.getCateList()
},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
async onShow() {
console.log("调用了onShow方法");
var that = this;
await uni.$on("returnData", function(data) {
console.log("data at line 415:", data);
if (data) {
that.addressData = {
...data,
@@ -326,9 +275,6 @@
console.log("没有接受到数据");
}
});
// this.selectPayIndex = 0;
console.log("this.addressData at line 416:", this.addressData);
},
computed: {
...mapState(["userInfo"]),
@@ -345,8 +291,6 @@
this.orderModalShow = false;
},
onPageJump(url) {
console.log(url, "url");
uni.navigateTo({
url: url,
});
@@ -364,9 +308,6 @@
type: 2,
},
];
// this.goodsDataList
console.log("this.goodsDataList at line 595:", this.goodsDataList);
var data = {
uid: this.userInfo.id,
productList: [],
@@ -376,12 +317,10 @@
this.$http
.request({
// url: "book/buyOrder/buySave",
url: `${this.urlList.initPrepareOrder}`,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
method: "POST",
data,
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
@@ -390,12 +329,9 @@
console.log("res at line 374:", res);
if (res.code == 0) {
this.initData = res.data;
// this.$emit('user')
}
this.$forceUpdate();
// await that.getDetailInfo();
});
},
// 获取订单初始话
@@ -445,10 +381,6 @@
uni.navigateTo({
url: "/pages/component/commonComponents/address/index?type=order",
});
// this.show = true;
// this.$nextTick(() => {
// this.$refs.commonAddress.open();
// });
},
fnCopy(value, title) {
this.$commonJS.handleMakingPhoneCalls(value, title);
@@ -459,44 +391,19 @@
},
openOrderModal(v) {
this.orderModalShowInfo = v;
console.log(
"this.orderModalShowInfo at line 727:",
this.orderModalShowInfo
);
this.orderModalShow = true;
if (this.orderModalShowInfo.type == "remark") {
this.content = this.remark;
}
},
//支付请求
async goBuyJie() {
var that = this;
// if (this.addressList.length == 0) {
// this.dizhiShow = true // 如果没有地址信息
// }
// if (!this.nowClick) {
// return
// }
this.nowClick = false;
setTimeout(() => {
this.nowClick = true;
}, 5000);
// let youPre = {
// id: "",
// coupons: {
// amount: 0,
// name: "",
// },
// };
// if (this.youhuiContent.id != undefined) {
// youPre = this.youhuiContent;
// }
let xiaBiao = [];
// for (let i = 0; i < this.cartList.length; i++) {
// xiaBiao.push({
// productId: this.cartList[i].productId,
// quantity: this.cartList[i].productAmount,
// });
// }
if (this.payType == 4 && this.initData.user.peanutCoin < this.dataInfo.lastFee) {
uni.showToast({
title: '天医币余额不足',
@@ -512,25 +419,17 @@
jfDeduction: 0, //积分抵扣
vipBuyConfigId: this.dataInfo.id,
come: 2, //订单来源0疯子读书1国学众妙之门2医学吴门医述
// appName: "wumen",
};
console.log("data at line 477:", data);
await $http
.request({
// url: "book/buyOrder/buySave",
url: that.urlList.buyOrder,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
method: "POST",
data,
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
console.log("res at line 598:", res);
if (res.code == 0) {
if (res.orderSn == null) {
uni.showToast({
@@ -539,7 +438,6 @@
image: "../../../static/icon/ic_close.png",
});
} else {
console.log("that.payType at line 607:", that.payType);
if (that.payType == 2) {
// 常规支付
uni.showToast({
@@ -569,24 +467,13 @@
});
}, 1000);
} else {
console.log("失败失败失败");
// that.$commonJS.showToast('支付是失败')
setTimeout(() => {
console.log("延迟调用 失败提示");
uni.showToast({
title: "支付失败",
image: "../../../static/icon/ic_close.png",
});
}, 0);
// setTimeout(() => {
// uni.navigateTo({
// url: './orderList'
// });
// }, 1000)
}
}
);
@@ -608,7 +495,6 @@
});
}, 1000);
} else {
console.log(res, "微信支付111111111111111");
if (res.data.errMsg.indexOf("User canceled") != -1) {
uni.showToast({
title: "用户取消支付",
@@ -644,7 +530,6 @@
radioChange(index) {
this.selectPayIndex = index;
this.payType = this.payList[this.selectPayIndex].type;
console.log("this.selectPayIndex at line 315:", this.selectPayIndex);
this.$forceUpdate();
},
handleValChange(e) {
@@ -664,12 +549,6 @@
...this.taiHuClassInfo,
},
};
// $mars.progressBegin('申请中...');
// $mars.post(customerType, 'applyRelearn', data, function (ret) {
// api.hideProgress();
// fnLoadDataGrid();
// });
},
fnRelearn(oid, days, courseFee) {
//99和199课程复读一个月60三个月120; 299和399课程复读一个月80三个月180
@@ -705,14 +584,6 @@
fee: fee,
};
this.show = true;
// $aui.alert({
// title: ,
// content: '用户您好,该课程已到期,通过支付' + fee + '元,本门课程可获得' + days + '天延期学习时间,点击确认即完成自动扣费,感谢配合!',
// buttons: ['取消', '确认'],
// radius: 6,
// titleColor: '#ff3300',
// contColor: '#333',
// btnColor: ''
},
//课程详情
async gotoDetail(v) {
@@ -729,7 +600,6 @@
}
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/curriculum/order/curriculum/detail?navTitle=${v.title}&title=${v.title}&oid=${v.courseOid}&conditions=${v.conditions}&detailOid=${v.detailOid}`,
});
},
@@ -737,14 +607,12 @@
goCourseDescription(v) {
console.log(v);
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/curriculum/order/curriculum/index?navTitle=${v.title}&title=${v.title}&oid=${v.oid}`,
});
},
async getCourseDescriptionData() {
var data = {};
var that = this;
console.log(this.$store.state, "11111111111");
this.$http
.post(this.urlList.list, {
customerType: "D",
@@ -762,16 +630,10 @@
this.swiperList.push(that.curriculumData.explainsImg);
} else {
that.swiperList = that.curriculumData.productImageList.split(",");
// for (var i = 0; i < imgList.length; i++) {
// this.swiperList.push(imgList[i])
// }
}
that.dataList = res.obj.correlatedList;
await that.getDetailInfo();
// that.relatedCoursesList = res.obj.correlatedList
// await that.handleselectCate({ ...this.cateList[0], index: 0 })
// socket.init();
});
},
getPriceData() {
@@ -786,21 +648,6 @@
checkDisable() {
console.log("点击了");
},
// 显示无权限弹窗
// showNoRights() {
// let that = this
// uni.showModal({
// content: "",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// that.clear()
// }
// }
// })
// },
// 获取用户详情
getUserInfo() {
// 用户详情
@@ -818,9 +665,6 @@
var data = [];
console.log(item, index, 99999);
var that = this;
// curriculumInfo
this.$http
.post(this.urlList.curriculumInfo, {
customerType: "D",
@@ -831,201 +675,27 @@
.then(async (res) => {
that.curriculumInfo = res.obj;
that.dataList = res.obj.courseList;
// socket.init();
});
// this.$nextTick(() => {
// switch (item.type) {
// case 1:
// // allDataList
// this.dataList = that.allDataList.result1Lst
// break;
// case 2:
// this.dataList = that.allDataList.result2Lst
// break;
// case 3:
// this.dataList = that.allDataList.result3Lst
// break;
// case 4:
// this.dataList = that.allDataList.result4Lst.filter(e =>
// e.oid != '5fcf991c027b11e7ae62008cfae40c18' && e.oid != 'b3d8a938b8e147bc877613bb712a9cb3' && e.oid != '4d4730163135420ea962bfac4805e026' && e.oid != '49fb76ca3d6b43718d78c6aa9a3003c2' && e.oid != 'c7b047ed9246469b9ae2b1013fc3df9c'
// )
// console.log(this.dataList.length, 6666666)
// break;
// }
// this.currentCateIndex = item.index
// })
console.log(this.allDataList, this.dataList, "1688");
// 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
// }
// this.currentStatusIndex = index
this.searchValue = "";
this.searchList = [];
this.showSearchList = false;
// if (index != 2) {
// uni.createSelectorQuery().select('.statusList').boundingClientRect(function (rect) {
// var height = rect.height
// console.log('元素高度:',);
// }).exec();
// } else {
// this.getJFList(dictType)
// }
return data;
},
async getDetailInfo() {
var that = this;
// curriculumInfo
this.detailInfo = {
content: "<img src='http://oss.taihumed.com/other/null_20210528102528870.jpg' ></img> <img src='http://101.201.146.165:8088/curriculum/detailImg/curriculum_20170420143333621.png' ></img><p><p>没有中医基础想学中医难不难?中医学者治疗出现瓶颈怎么办?中西医究竟有什么不同呢?吴雄志教授将以全新的视角,完美整合中药学和西医学知识,让你领略当代中医生理学魅力。</p><p><br/><p></p><p><br/></p><p>【思考题】</p><p>1、简述中医的发展这些年出现了哪些变化</p><p>2、简述中西医学科的异同</p>",
};
// this.$http
// .post(this.urlList.detailInfo, {
// customerType
// :
// "D",
// token
// : uni.getStorageSync("token")
// ,
// customerOid
// : uni.getStorageSync("customerOid"),
// classOid: 'f81b558ca4ee406e97c4045c87c2539c'
// })
// .then(async res => {
// that.detailInfo = res.obj
// // that.dataList = res.obj.courseList
// // socket.init();
// });
// this.$nextTick(() => {
// switch (item.type) {
// case 1:
// // allDataList
// this.dataList = that.allDataList.result1Lst
// break;
// case 2:
// this.dataList = that.allDataList.result2Lst
// break;
// case 3:
// this.dataList = that.allDataList.result3Lst
// break;
// case 4:
// this.dataList = that.allDataList.result4Lst.filter(e =>
// e.oid != '5fcf991c027b11e7ae62008cfae40c18' && e.oid != 'b3d8a938b8e147bc877613bb712a9cb3' && e.oid != '4d4730163135420ea962bfac4805e026' && e.oid != '49fb76ca3d6b43718d78c6aa9a3003c2' && e.oid != 'c7b047ed9246469b9ae2b1013fc3df9c'
// )
// console.log(this.dataList.length, 6666666)
// break;
// }
// this.currentCateIndex = item.index
// })
console.log(this.allDataList, this.dataList, "1688");
// 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
// }
// this.currentStatusIndex = index
this.searchValue = "";
this.searchList = [];
this.showSearchList = false;
// if (index != 2) {
// uni.createSelectorQuery().select('.statusList').boundingClientRect(function (rect) {
// var height = rect.height
// console.log('元素高度:',);
// }).exec();
// } else {
// this.getJFList(dictType)
// }
return data;
},
async setOneCateIndex(item, index) {
this.allDataList = [];
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
// }
this.currentStatusIndex = index;
// this.currentCateIndex = 0
this.searchValue = "";
this.searchList = [];
this.showSearchList = false;
@@ -1034,19 +704,6 @@
this.$forceUpdate();
});
// this.handleselectCate(this.cateList[this.currentCateIndex])
// if (index != 2) {
// uni.createSelectorQuery().select('.statusList').boundingClientRect(function (rect) {
// var height = rect.height
// console.log('元素高度:',);
// }).exec();
// } else {
// this.getJFList(dictType)
// }
},
transformData(inputData) {
@@ -1060,159 +717,13 @@
}
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.dataList = this.transformData(res.list)
// console.log('JF经方', this.dataList)
// } else {
// this.twoCateList = []
// this.dataList = []
// }
// }).catch(e => {
// this.twoCateList = []
// this.dataList = []
// 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.statusList = res.list
// this.getTowCateList(this.statusList[0].type)
// } else {
// this.statusList = []
// }
// }).catch(e => {
// this.statusList = []
// 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.currentStatusIndex + 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.dataList = []
// 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