苹果内购调整,苹果端隐藏vip相关内容

This commit is contained in:
@fawn-nine
2024-07-09 16:39:48 +08:00
parent 545fd9cc75
commit 7f49331372
7 changed files with 186 additions and 160 deletions

View File

@@ -14,7 +14,7 @@
<view class="contentBox commonPageContentBox">
<u-alert
v-if="goBuyTitle"
v-if="goBuyTitle && isAndorid"
style="
background: linear-gradient(90deg, #258feb 0%, #00e1ec 100%);
position: fixed;
@@ -638,6 +638,7 @@ export default {
goodsList: "sociology/product/getProductListForCourse",
startStudyForMF: "sociology/course/startStudyForMF",
},
isAndorid:true
};
},
//第一次加载
@@ -652,6 +653,7 @@ export default {
// this.getCateList(this.courseId)
await this.getData(e.id);
await this.getSayList();
this.getOS()
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
@@ -670,6 +672,7 @@ export default {
uni.hideTabBar();
plus.screen.unlockOrientation();
plus.screen.lockOrientation("portrait-primary");
},
onUnload() {
this.selectGoodsData = {};
@@ -700,6 +703,17 @@ export default {
},
//方法
methods: {
// 获得操作系统
getOS() {
let oprateOs = "";
oprateOs = uni.getSystemInfoSync().platform;
// console.log(oprateOs)
if (oprateOs == "android") {
this.isAndorid = true;
} else {
this.isAndorid = false;
}
},
async checkPermision(){
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
if (result != 1) {
@@ -1492,7 +1506,7 @@ export default {
} else {
list = [];
}
console.log("at line 1333:", list);
// console.log("at line 1333:", list);
this.$forceUpdate();
});

View File

@@ -4,7 +4,7 @@
<public-module></public-module>
<z-nav-bar title="课程价格"></z-nav-bar>
<view class="addVip">
<u-alert v-if="" style="
<u-alert v-if="isAndorid" style="
width: 100%;
" :title="goBuyTitle" type="warning" :show-icon="true">
<template slot="rightSlot" slot-scope="slotProps">
@@ -105,7 +105,8 @@
proPriceList: [],
pricespop: false,
userMsg: {},
cartList: []
cartList: [],
isAndorid:true
};
},
//第一次加载
@@ -115,6 +116,7 @@
// console.log(e, '------')
this.getUserInfo()
this.getCoursePriceList1()
this.getOS()
},
computed: {
...mapState(['userInfo'])
@@ -138,6 +140,17 @@
},
//方法
methods: {
// 获得操作系统
getOS() {
let oprateOs = "";
oprateOs = uni.getSystemInfoSync().platform;
// console.log(oprateOs)
if (oprateOs == "android") {
this.isAndorid = true;
} else {
this.isAndorid = false;
}
},
loadMoreCourse(val, i) {
console.log(val, 'val',i,'++++++++++++++++')
let _page = val.subpage

View File

@@ -74,10 +74,8 @@
<!-- </text> -->
</view>
<view class="tag-view">
<uni-tag @click="goBuy()" text="购买课程" type="warning" style="larg" />
<uni-tag @click="onPageJump('/pages/mine/vip/index')" style="margin-left: 20rpx;" text="开通VIP" type="success" />
<uni-tag @click="goBuy()" text="购买课程" type="warning" size="normal" />
<uni-tag v-if="isAndorid" @click="onPageJump('/pages/mine/vip/index')" size="normal" style="margin-left: 20rpx;" text="开通VIP" type="success" />
</view>
</view>
</view>
@@ -116,6 +114,7 @@
export default {
data() {
return {
isAndorid: true,
playData: {},
catalogueId: null,
// fixed: false,
@@ -209,6 +208,7 @@
plus.screen.lockOrientation("portrait-primary");
// #endif
this.getData(this.courseId)
this.getOS()
},
onReachBottom() {
console.log('触底');
@@ -225,7 +225,17 @@
},
//方法
methods: {
// 获得操作系统
getOS() {
let oprateOs = "";
oprateOs = uni.getSystemInfoSync().platform;
// console.log(oprateOs)
if (oprateOs == "android") {
this.isAndorid = true;
} else {
this.isAndorid = false;
}
},
getUserInfo() {
// 用户详情
// if (this.userInfo.id != undefined) {

View File

@@ -63,31 +63,73 @@
</view>
<br clear="both" />
</view>
<!-- <view class="now_vip" v-if="userMes.vip==0">
<text>
<image src="../../static/icon/mine_p.png" style="height: 44rpx;"></image>
开通会员畅享海量内容
</text>
<b class="kt_btn" @click="onPageJump('./opeVip')">开通VIP</b>
</view> -->
<!-- <view class="now_vip" v-if="userMes.vip==1">
<text>
<image src="../../static/icon/mine_v.png"></image>
尊贵的VIP会员
<font style="font-size: 14rpx;margin-left: 20rpx;">{{userMes.vipValidtime}}到期</font>
</text>
<b class="kt_btn" @click="onPageJump('./opeVip')">立即续费</b>
</view> -->
<view
style="
padding: 20rpx;
height: 200rpx;
display: flex;
align-items: center;
justify-content: space-between;
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="zhanghu PM_font" style="text-align: left">
<image
class="vip_image"
src="@/static/vip.png"
mode="aspectFit"
>
</image>
<text style="color: #fff; font-size: 60rpx;">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>
</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>
</view>
<!-- end -->
<view class="chong_zhi boxShadow box_fillet chongzhi_box">
<!-- <view
class="zhanghu"
@@ -177,64 +219,6 @@
>
</view>
</view>
<view
class="chong_zhi boxShadow box_fillet vip_box"
@click="onPageJump('/pages/mine/vip/index')"
>
<view v-if="!userMes.userVip" class="noVip">
<view class="zhanghu PM_font" style="text-align: center">
<image
class="vip_image"
src="@/static/icon/noquanyi.png"
mode="aspectFit"
>
</image>
<text style="color: #c4d3d4">VIP</text>
</view>
<swiper
:autoplay="true"
:interval="3000"
:duration="1000"
style="width: 100%; height: 60rpx"
>
<swiper-item
v-for="(item, index) in swiperList"
style="width: 100%; height: 100%"
>
<view
style="
background: linear-gradient(
130deg,
rgb(46, 103, 106) 0%,
rgb(114, 173, 146) 100%
)
text;
text-align: center;
"
:style="item.style"
v-html="item.name"
></view>
<!-- <image :src="curriculumData.explainsImg" mode="widthFix" class="headImage"></image> -->
</swiper-item>
</swiper>
</view>
<view v-else class="noVip hasVip">
<view class="zhanghu PM_font" style="text-align: center">
<image
class="vip_image"
src="@/static/icon/quanyi.png"
mode="aspectFit"
>
</image>
<text style="">VIP</text>
</view>
<view class="time"
>{{ userMes.userVip.endTime.split(" ")[0] }}到期</view
>
</view>
</view>
</view>
<view class="list_box">
@@ -326,16 +310,16 @@ export default {
data() {
return {
swiperList: [
{ name: "开通会员畅享更多活动" },
{ name: "众妙之门视频" },
{ name: "开通会员畅享更多活动",style:"color:#fff;font-size:28rpx" },
{ name: "众妙之门视频",style:"color:#fff;font-size:28rpx" },
{
name: "吴门医述视频",
name: "吴门医述视频",style:"color:#fff;font-size:28rpx"
},
{ name: "专属视频视听" },
{ name: "专属视频视听",style:"color:#fff;font-size:28rpx" },
{
name: "读书相关权益",
name: "读书相关权益",style:"color:#fff;font-size:28rpx"
},
{ name: "活动报名<text style='color:red'>(折扣价)</text>" },
{ name: "活动报名<text style='color:#ffaa7f'>(折扣价)</text>" ,style:"color:#fff;font-size:28rpx"},
],
infoShow: false, // 显示电子书相关
showEbook: false, // 显示电子书相关
@@ -613,16 +597,16 @@ export default {
font-weight: bold;
font-size: 38upx;
margin-bottom: 10rpx;
color: #fff !important;
color: #6990c7 !important;
}
.phone {
font-size: 28rpx;
color: #fff;
color: #6990c7 !important;
}
.tong {
color: #999;
color: #6990c7 !important;
font-size: 25upx;
}
@@ -671,9 +655,10 @@ export default {
}
}
.commonPageBox {
background-image: url("@/static/icon/mine_bg.png");
// background-image: url("@/static/icon/mine_bg.png");
background-repeat: no-repeat;
background-size: 100% 100%;
background-image: linear-gradient(-60deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%, #bfe3f0 80%, #fdf0ed 100%);
// background-color: #d8f8e4 !important;
}
.chong_zhi {
@@ -703,19 +688,19 @@ export default {
display: flex;
align-items: center;
justify-content: space-around;
flex-direction: column;
// flex-direction: column;
.zhanghu {
font-size: 40rpx;
width: 120rpx;
margin-top: 20rpx;
width: 200rpx;
// margin-top: 20rpx;
margin-bottom: 0rpx;
text-align: center;
display: flex;
align-items: center;
// justify-content: space-around;
image {
width: 40rpx;
height: 40rpx;
width: 100rpx;
height: 100rpx;
}
}
}
@@ -724,13 +709,13 @@ export default {
.time {
color: #fff;
padding: 4rpx 20rpx;
font-size: 26rpx;
font-size: 28rpx;
border-radius: 20rpx;
background: linear-gradient(
to right,
#56B0CE 0%,
#6DDAEA 100%
) !important;
// background: linear-gradient(
// to right,
// #56B0CE 0%,
// #6DDAEA 100%
// ) !important;
}
}
.chong_list {
@@ -762,11 +747,11 @@ export default {
}
.chong_btn {
position: absolute;
// position: absolute;
font-size: 26rpx;
display: block;
top: 0px;
right: 0px;
// top: 0px;
// right: 0px;
float: right;
border-radius: 50rpx;
color: #fffbf6;
@@ -782,7 +767,7 @@ export default {
border-radius: 20rpx !important;
margin: 0 20rpx;
// padding:0 40rpx;
background: #E2F5FA;
background: #f0f9fb;
.nav_list {
background-color: #b7e0e2;
@@ -824,7 +809,7 @@ export default {
}
.box_fillet {
border-radius: 40rpx;
border-radius: 20rpx;
overflow: hidden;
@@ -833,34 +818,30 @@ export default {
.chongzhi_box {
position: relative;
width: calc(100% - 320rpx);
width: 100%;
height: 100%;
float: left;
// float: left;
padding: 30rpx 20rpx 10rpx;
background-color: #E2F5FA;
background-color: #f0f9fb;
border-radius: 20rpx;
}
.vip_box {
margin-bottom: 32rpx;
padding: 0;
float: right;
position: relative;
width: 300rpx;
width: 100%;
height: 100%;
border-radius: 20rx;
// background: rgba(255, 255, 255, 0.85);
// padding: 30rpx 20rpx 10rpx;
// background-color: $themeBgColor;
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)
)
);
// @include themeBorder(
// 10rpx,
// 20rpx,
// (
// linear-gradient(#DDF2FC, #BFDDF2),
// linear-gradient(to bottom left, #D5EDF8, #a6d8dc)
// )
// );
.zhanghu {
font-size: 80rpx;
@@ -990,16 +971,13 @@ uni-page-body {
}
.user_vip {
z-index:1;
color: #fff;
font-size: 24rpx;
width: auto;
padding: 4rpx 10rpx;
font-weight: 800;
border-radius: 20rpx;
background: linear-gradient(
to right,
rgb(204, 229, 244) 0%,
rgb(197, 227, 215) 100%
);
background: linear-gradient(60deg, #8265f9 30%, #016dea 100%);
}
.super {
background: linear-gradient(to right, #5bc9c1 0%, #258feb 100%);

View File

@@ -122,9 +122,9 @@
</view>
</view>
<!-- <view class="youKeL" style="margin-bottom: 80rpx;">
<view class="youKeL" style="margin-bottom: 80rpx;" v-if="!isAndorid">
<view @click="onPageJump('/pages/user/visitor')">免登陆体验</view>
</view> -->
</view>
<z-popup v-model="HealthOpen" type="center" :hideOnBlur="false">
@@ -251,6 +251,7 @@
quCodeList: [], // 国家区域码
quCode: '86',
submitClickNum:0, // 登陆按钮点击次数
isAndorid : true
};
},
//第一次加载
@@ -264,6 +265,7 @@
pname: 'com.tencent.mm',
action: "weixin://"
});
this.getOS()
// #endif
},
//页面显示
@@ -277,6 +279,17 @@
methods: {
...mapMutations(['setUserInfo']),
...mapMutations(['setHealthMes']),
// 获得操作系统
getOS() {
let oprateOs = "";
oprateOs = uni.getSystemInfoSync().platform;
// console.log(oprateOs)
if (oprateOs == "android") {
this.isAndorid = true;
} else {
this.isAndorid = false;
}
},
closeMusic() {
this.$music.setCloseBgm() // 关闭音频
uni.setStorage({

View File

@@ -120,24 +120,24 @@
</view>
<view class="footer_item">
<view class="footer_nav_item" @click="onYouAlert()">
<image class="footer_nav_item_image" src="/static/tab/icon3_n.png" mode="aspectFit"></image>
<text class="footer_nav_item_text">我的图书</text>
<image class="footer_nav_item_image" src="/static/tab/order.png" mode="aspectFit"></image>
<text class="footer_nav_item_text">我的订单</text>
</view>
</view>
<view class="footer_item">
<view class="footer_nav_item" @click="onYouAlert()">
<image class="footer_nav_item_image" src="/static/tab/icon2_n.png" mode="aspectFit"></image>
<text class="footer_nav_item_text">我的订单</text>
<image class="footer_nav_item_image" src="/static/tab/tab_nor_03.png" mode="aspectFit"></image>
<text class="footer_nav_item_text">太湖公益</text>
</view>
</view>
<view class="footer_item">
<view class="footer_nav_item" @click="selected=4">
<image v-if="selected == 4" class="footer_nav_item_image footer_nav_item_image_scale"
src="/static/tab/icon4_y.png" mode="aspectFit"></image>
<image v-else class="footer_nav_item_image" src="/static/tab/icon4_n.png" mode="aspectFit">
<image v-else class="footer_nav_item_image" src="/static/tab/tab_nor_04.png" mode="aspectFit">
</image>
<text class="footer_nav_item_text"
:class="[selected == 4 ? 'footer_item_text_active' : '']">首页</text>
:class="[selected == 4 ? 'footer_item_text_active' : '']">我的</text>
</view>
</view>
</view>
@@ -335,12 +335,9 @@
您还未登录请先登录~
</view>
</u-modal>
<!-- <z-navigation></z-navigation> -->
</view>
</template>
<script>
@@ -404,6 +401,7 @@
//页面显示
onShow() {
// 隐藏原生的tabbar
// uni.hideTabBar();
this.tjProList = []
this.getData();
this.getTags()
@@ -470,7 +468,7 @@
'page': 1
})
.then(res => {
console.log(res, 'xinshu')
// console.log(res, 'xinshu')
this.newBookList = res.page.list
}).catch(e => {
console.log(e, '新书上市报错')
@@ -513,7 +511,7 @@
this.tjProList = this.tjProList.concat(res.page.records)
this.totalPage = res.page.pages
this.status = 3
console.log(this.tjProList, '按标签检索结果')
// console.log(this.tjProList, '按标签检索结果')
} else {
this.tjProList = []
this.totalPage = 0
@@ -1249,7 +1247,7 @@
.footer_item_text_active {
color: #079307;
color: #258feb;
font-weight: bold;
}
</style>

BIN
static/vip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB