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

View File

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

View File

@@ -74,10 +74,8 @@
<!-- </text> --> <!-- </text> -->
</view> </view>
<view class="tag-view"> <view class="tag-view">
<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" />
<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" />
</view> </view>
</view> </view>
</view> </view>
@@ -116,6 +114,7 @@
export default { export default {
data() { data() {
return { return {
isAndorid: true,
playData: {}, playData: {},
catalogueId: null, catalogueId: null,
// fixed: false, // fixed: false,
@@ -209,6 +208,7 @@
plus.screen.lockOrientation("portrait-primary"); plus.screen.lockOrientation("portrait-primary");
// #endif // #endif
this.getData(this.courseId) this.getData(this.courseId)
this.getOS()
}, },
onReachBottom() { onReachBottom() {
console.log('触底'); console.log('触底');
@@ -225,7 +225,17 @@
}, },
//方法 //方法
methods: { methods: {
// 获得操作系统
getOS() {
let oprateOs = "";
oprateOs = uni.getSystemInfoSync().platform;
// console.log(oprateOs)
if (oprateOs == "android") {
this.isAndorid = true;
} else {
this.isAndorid = false;
}
},
getUserInfo() { getUserInfo() {
// 用户详情 // 用户详情
// if (this.userInfo.id != undefined) { // if (this.userInfo.id != undefined) {

View File

@@ -63,31 +63,73 @@
</view> </view>
<br clear="both" /> <br clear="both" />
</view> </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 <view
style=" style="
padding: 20rpx; padding: 20rpx; overflow: hidden;
height: 200rpx;
display: flex;
align-items: center;
justify-content: space-between;
" "
> >
<!-- 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="chong_zhi boxShadow box_fillet chongzhi_box">
<!-- <view <!-- <view
class="zhanghu" class="zhanghu"
@@ -177,64 +219,6 @@
> >
</view> </view>
</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>
<view class="list_box"> <view class="list_box">
@@ -326,16 +310,16 @@ export default {
data() { data() {
return { return {
swiperList: [ swiperList: [
{ 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: "专属视频视听" }, { 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, // 显示电子书相关 infoShow: false, // 显示电子书相关
showEbook: false, // 显示电子书相关 showEbook: false, // 显示电子书相关
@@ -613,16 +597,16 @@ export default {
font-weight: bold; font-weight: bold;
font-size: 38upx; font-size: 38upx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
color: #fff !important; color: #6990c7 !important;
} }
.phone { .phone {
font-size: 28rpx; font-size: 28rpx;
color: #fff; color: #6990c7 !important;
} }
.tong { .tong {
color: #999; color: #6990c7 !important;
font-size: 25upx; font-size: 25upx;
} }
@@ -671,9 +655,10 @@ export default {
} }
} }
.commonPageBox { .commonPageBox {
background-image: url("@/static/icon/mine_bg.png"); // background-image: url("@/static/icon/mine_bg.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
background-image: linear-gradient(-60deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%, #bfe3f0 80%, #fdf0ed 100%);
// background-color: #d8f8e4 !important; // background-color: #d8f8e4 !important;
} }
.chong_zhi { .chong_zhi {
@@ -703,19 +688,19 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
flex-direction: column; // flex-direction: column;
.zhanghu { .zhanghu {
font-size: 40rpx; font-size: 40rpx;
width: 120rpx; width: 200rpx;
margin-top: 20rpx; // margin-top: 20rpx;
margin-bottom: 0rpx; margin-bottom: 0rpx;
text-align: center; text-align: center;
display: flex; display: flex;
align-items: center; align-items: center;
// justify-content: space-around; // justify-content: space-around;
image { image {
width: 40rpx; width: 100rpx;
height: 40rpx; height: 100rpx;
} }
} }
} }
@@ -724,13 +709,13 @@ export default {
.time { .time {
color: #fff; color: #fff;
padding: 4rpx 20rpx; padding: 4rpx 20rpx;
font-size: 26rpx; font-size: 28rpx;
border-radius: 20rpx; border-radius: 20rpx;
background: linear-gradient( // background: linear-gradient(
to right, // to right,
#56B0CE 0%, // #56B0CE 0%,
#6DDAEA 100% // #6DDAEA 100%
) !important; // ) !important;
} }
} }
.chong_list { .chong_list {
@@ -762,11 +747,11 @@ export default {
} }
.chong_btn { .chong_btn {
position: absolute; // position: absolute;
font-size: 26rpx; font-size: 26rpx;
display: block; display: block;
top: 0px; // top: 0px;
right: 0px; // right: 0px;
float: right; float: right;
border-radius: 50rpx; border-radius: 50rpx;
color: #fffbf6; color: #fffbf6;
@@ -782,7 +767,7 @@ export default {
border-radius: 20rpx !important; border-radius: 20rpx !important;
margin: 0 20rpx; margin: 0 20rpx;
// padding:0 40rpx; // padding:0 40rpx;
background: #E2F5FA; background: #f0f9fb;
.nav_list { .nav_list {
background-color: #b7e0e2; background-color: #b7e0e2;
@@ -824,7 +809,7 @@ export default {
} }
.box_fillet { .box_fillet {
border-radius: 40rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
@@ -833,34 +818,30 @@ export default {
.chongzhi_box { .chongzhi_box {
position: relative; position: relative;
width: calc(100% - 320rpx); width: 100%;
height: 100%; height: 100%;
float: left; // float: left;
padding: 30rpx 20rpx 10rpx; padding: 30rpx 20rpx 10rpx;
background-color: #E2F5FA; background-color: #f0f9fb;
border-radius: 20rpx; border-radius: 20rpx;
} }
.vip_box { .vip_box {
margin-bottom: 32rpx;
padding: 0; padding: 0;
float: right;
position: relative; position: relative;
width: 300rpx; width: 100%;
height: 100%; height: 100%;
border-radius: 20rx; border-radius: 20rx;
// background: rgba(255, 255, 255, 0.85); background-image: linear-gradient(60deg, #8265f9 30%, #016dea 100%);
// padding: 30rpx 20rpx 10rpx;
// background-color: $themeBgColor;
// @include themeBorder(6rpx, 20rpx, #258feb, #a6d8dc); // @include themeBorder(6rpx, 20rpx, #258feb, #a6d8dc);
@include themeBorder( // @include themeBorder(
10rpx, // 10rpx,
20rpx, // 20rpx,
( // (
linear-gradient(#DDF2FC, #BFDDF2), // linear-gradient(#DDF2FC, #BFDDF2),
linear-gradient(to bottom left, #D5EDF8, #a6d8dc) // linear-gradient(to bottom left, #D5EDF8, #a6d8dc)
) // )
); // );
.zhanghu { .zhanghu {
font-size: 80rpx; font-size: 80rpx;
@@ -990,16 +971,13 @@ uni-page-body {
} }
.user_vip { .user_vip {
z-index:1; z-index:1;
color: #fff;
font-size: 24rpx; font-size: 24rpx;
width: auto; width: auto;
padding: 4rpx 10rpx; padding: 4rpx 10rpx;
font-weight: 800; font-weight: 800;
border-radius: 20rpx; border-radius: 20rpx;
background: linear-gradient( background: linear-gradient(60deg, #8265f9 30%, #016dea 100%);
to right,
rgb(204, 229, 244) 0%,
rgb(197, 227, 215) 100%
);
} }
.super { .super {
background: linear-gradient(to right, #5bc9c1 0%, #258feb 100%); background: linear-gradient(to right, #5bc9c1 0%, #258feb 100%);

View File

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

View File

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

BIN
static/vip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB