Commit 39969b32 authored by mengcuiguang's avatar mengcuiguang

详情页添加签到弹窗,添加邀请好友

parent b4c566fb
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
// baseUrl: 'http://192.168.110.71:8301/miniApi', // baseUrl: 'http://192.168.110.71:8301/miniApi',
titleButtonWidth: 38, titleButtonWidth: 38,
token: '', token: '',
userId: 0, userId: '',
inviteUId: '', inviteUId: '',
serviceUrl: '', serviceUrl: '',
downUrl: '', // downUrl: '', //
......
<template> <template>
<view class="body"> <view class="body">
<view v-if="showMask" class="show-mask flex-v" @click="showMask=false">
<view class="mt-30" style="width: 90%;text-align: right;">
<image style="width: 30rpx;height: 30rpx;padding:6rpx;
border-radius: 40rpx;border: 2px solid darkgray;" src="@/static/index/ic_quit_white.png" />
</view>
<text class="mt-10" style="font-size: 46rpx;">如何继续使用?</text>
<text class="m-10">找到“寻觅短剧”小程序</text>
<image class="mt-30" mode="widthFix" :src="maskImage1"></image>
<image :src="maskImage2" mode="widthFix"></image>
</view>
<z-paging style="height: 100%;background-color: #f0f8ff;"> <z-paging style="height: 100%;background-color: #f0f8ff;">
<view style="width: 100%;height: 340rpx; <view style="width: 100%;height: 340rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100%; background-size: 100%;
...@@ -64,9 +76,6 @@ ...@@ -64,9 +76,6 @@
</view> </view>
</view> </view>
<view class="inviteClass"> <view class="inviteClass">
<view @click="handleTask" class="inviteItemclass" style="margin-right: 10rpx"> <view @click="handleTask" class="inviteItemclass" style="margin-right: 10rpx">
<image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" <image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
...@@ -101,6 +110,10 @@ ...@@ -101,6 +110,10 @@
观看记录 观看记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
<view class="item arrow" @click="handleFind">
如何找到我
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view>
<view class="item arrow" @click="handlePhone"> <view class="item arrow" @click="handlePhone">
联系客服 联系客服
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
...@@ -124,7 +137,10 @@ ...@@ -124,7 +137,10 @@
mixins: [common], mixins: [common],
data() { data() {
return { return {
userBean: {} userBean: {},
showMask: false,
maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png',
maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png'
}; };
}, },
methods: { methods: {
...@@ -148,8 +164,7 @@ ...@@ -148,8 +164,7 @@
}, },
handleDotRecord() { handleDotRecord() {
// 看点记录 // 看点记录
// navigateTo(`/pagesD/dotRecord/dotRecord`) navigateTo(`/pagesD/dotRecord/dotRecord`)
navigateTo(`/pagesA/task/task`)
}, },
handleUseDotRecord() { handleUseDotRecord() {
// 看点消费记录 // 看点消费记录
...@@ -167,6 +182,9 @@ ...@@ -167,6 +182,9 @@
handleCoinPay() { handleCoinPay() {
navigateTo(`/pagesA/vipPay/vipPay`) navigateTo(`/pagesA/vipPay/vipPay`)
}, },
handleFind(){
this.showMask = true
},
handlePhone() { handlePhone() {
wx.makePhoneCall({ wx.makePhoneCall({
phoneNumber: '4000969950', phoneNumber: '4000969950',
...@@ -206,63 +224,10 @@ ...@@ -206,63 +224,10 @@
@import '@/scss/uni.scss'; @import '@/scss/uni.scss';
.body { .body {
height: 100%;
background-color: #f0f8ff; background-color: #f0f8ff;
} }
.user-wrapper {
margin: 10rpx 25rpx;
height: 110rpx;
display: flex;
flex-direction: row;
.user-avatar {
width: 110rpx;
height: 110rpx;
border-radius: 60rpx;
margin-right: 30rpx;
}
.user-info {
height: 110rpx;
display: flex;
flex-direction: column;
}
}
.item-wrapper {
margin: 0 25rpx;
flex-direction: row;
height: 100rpx;
/* width: 100%; */
border-bottom: 1rpx solid #eeeeee;
.img {
align-self: center;
width: 50rpx;
height: 50rpx;
margin-right: 10rpx;
}
.text1 {
flex: 1;
}
.text2 {
font-size: 30rpx;
}
}
.loginWrapper {
margin-top: 10rpx;
}
.orderstyle {
flex-direction: column;
background-color: #ffffff;
margin: 20rpx;
border-radius: 15rpx;
}
.inviteClass { .inviteClass {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -292,67 +257,17 @@ ...@@ -292,67 +257,17 @@
//box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1) //box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
} }
.vip-item { .show-mask {
width: 100%; width: 100%;
padding: 10rpx 40rpx; height: 100%;
background: rgba(0, 0, 0, 0.6);
.content { position: absolute;
width: 90%; z-index: 999;
margin: auto; color: white;
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 20rpx 40rpx;
background: #263358;
color: #fff;
border-radius: 18rpx;
}
.item {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
margin-right: 20rpx;
}
.item:last-child {
margin-right: 0;
}
.row {
display: flex;
flex-direction: row;
align-items: center; align-items: center;
margin-bottom: 15rpx;
}
.row:last-child { image {
margin-bottom: 0; width: 90%;
}
.title {
font-size: 38rpx;
font-weight: 700;
font-style: italic;
}
.desc {
font-size: 26rpx;
color: #b5b5b5;
}
.button {
height: 40rpx;
line-height: 70rpx;
border-radius: 35rpx;
width: 160rpx;
background: #fff;
color: #263358;
text-align: center;
font-size: 30rpx;
font-weight: 700;
font-style: italic;
} }
} }
</style> </style>
\ No newline at end of file
<template>
<view>
<uni-popup type="center" ref="signPop" :maskClick="false" :isMaskClick="false">
<view class="body" style="width: 100%;height: 100%;background-color: transparent;">
<view class="rightclass">
<image @click="handleClose" style="width: 60rpx; height: 60rpx;"
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_close_white.png">
</image>
</view>
<image style="width: 510rpx; height: 584rpx; border-radius: 10rpx;margin-top: 10rpx;"
@click="openRedpkg"
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_dialog_openbeg.png"></image>
</view>
</uni-popup>
</view>
</template>
<script>
import common from '@/mixins/common';
import {
navigateTo,
message,
loading
} from '@/utils/fun.js';
export default {
name: 'signPopup',
mixins: [common],
props: {
show: {
type: Boolean,
default: false
}
},
data() {
return {
time: ''
};
},
methods: {
handleShow() {
this.getDataTime()
console.log('sign-time-->',this.time)
uni.setStorage({
key: 'ONE_DAY_OPENBEG',
data: this.time
});
this.$refs.signPop.open('center');
},
getDataTime() {
// 获取当前时间
let currentTime = new Date();
// 获取年份
let year = currentTime.getFullYear();
// 获取月份(注意月份是从0开始计数的,所以需要加1)
let month = currentTime.getMonth() + 1;
// 获取日期
let day = currentTime.getDate();
// 格式化时间为 YYYY-MM-DD
this.time = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
},
handleClose() {
this.$refs.signPop.close('center');
this.$emit('close');
},
openRedpkg() {
navigateTo(`/pagesA/task/task`)
this.handleClose()
}
},
watch: {
show: {
handler: function(newVal, oldVal) {
if (newVal) {
this.handleShow();
}
},
immediate: true
}
}
};
</script>
<style lang="scss">
.body {
display: flex;
flex-direction: column;
}
.rightclass {
display: flex;
justify-content: end;
}
</style>
\ No newline at end of file
...@@ -4,7 +4,7 @@ export default { ...@@ -4,7 +4,7 @@ export default {
share: { share: {
title: '更多好剧,等你来看', title: '更多好剧,等你来看',
imageUrl: 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_movie.png', imageUrl: 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_movie.png',
path: '/pages/loading?shareId=' path: '/pages/loading?shareId='+getApp().globalData.userId
} }
} }
}, },
......
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
success: ({ success: ({
data data
}) => { }) => {
app.globalData.userId = data.idcode;
uni.setStorage({ uni.setStorage({
key: 'token', key: 'token',
data: data.token data: data.token
......
<template> <template>
<view class="body"> <view class="body">
<scroll-view scroll-y style="height: 100%;"> <z-paging style="height: 88%;">
<view style="font-size: 36rpx;color: black;font-weight: 777;">充值看点</view> <view style="font-size: 36rpx;color: black;font-weight: 777;">充值看点</view>
<view class="section"> <view class="section">
<view class="pack-box"> <view class="pack-box">
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</view> </view>
</scroll-view> </z-paging>
<view style="display: flex; <view style="display: flex;
align-items: center;flex-direction: column;"> align-items: center;flex-direction: column;">
...@@ -89,17 +89,6 @@ ...@@ -89,17 +89,6 @@
</text> </text>
</view> </view>
</view> </view>
<!-- <uni-popup ref="alertDialog" type="center">
<uni-popup-dialog confirmText="确认" title="付费须知" content="
1、会员属于虚拟商品,一经购买不可退换;
2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作;
3、充值会员一般5分钟内到账,如未到账请在“我的”页面联系客服;" @close="dialogClose">
</uni-popup-dialog>
</uni-popup> -->
</view> </view>
</template> </template>
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
<coin-popup :show="showCoinPop" :point="data.point" :vedioId="data.vedioId" @close="showCoinPop = false" <coin-popup :show="showCoinPop" :point="data.point" :vedioId="data.vedioId" @close="showCoinPop = false"
@clickClose="coinPopupClose" @paySuccess="paySuccess" /> @clickClose="coinPopupClose" @paySuccess="paySuccess" />
<ad-popup :show="showAdPop" @close="adPopupClose" :vedioIndex="originIndex" /> <ad-popup :show="showAdPop" @close="adPopupClose" :vedioIndex="originIndex" />
<sign-popup :show="showSignPop" @close="showSignPop = false" />
</view> </view>
</template> </template>
...@@ -85,12 +86,14 @@ ...@@ -85,12 +86,14 @@
import adPopup from '@/components/ad-popup/ad-popup.vue'; import adPopup from '@/components/ad-popup/ad-popup.vue';
import coinPopup from '@/components/coin-popup/coin-popup.vue'; import coinPopup from '@/components/coin-popup/coin-popup.vue';
import signPopup from '@/components/sign-popup/sign-popup.vue';
import episodePopup from '@/components/episode-popup/episode-popup.vue'; import episodePopup from '@/components/episode-popup/episode-popup.vue';
import ttVideoPlayer from '@/ttcomponents/tt-video-player' import ttVideoPlayer from '@/ttcomponents/tt-video-player'
import { import {
navigateTo, navigateTo,
message
} from '@/utils/fun.js'; } from '@/utils/fun.js';
import { import {
data data
...@@ -102,6 +105,7 @@ ...@@ -102,6 +105,7 @@
components: { components: {
coinPopup, coinPopup,
episodePopup, episodePopup,
signPopup,
adPopup, adPopup,
ttVideoPlayer ttVideoPlayer
}, },
...@@ -125,15 +129,24 @@ ...@@ -125,15 +129,24 @@
isPlayNext: 0, isPlayNext: 0,
tabIndex: 0, tabIndex: 0,
tabs: [], tabs: [],
userBean: {},
subList: [], subList: [],
showTap: false, showTap: false,
showCoinPop: false, showCoinPop: false,
showSignPop: false,
showAdPop: false, showAdPop: false,
showAdForServer: false, showAdForServer: false,
vipBackPage: '', vipBackPage: '',
curTimeData: '',
localTimeData: '',
canUseTTPlayer: true, canUseTTPlayer: true,
}; };
}, },
onBackPress(options) {
message.notify('onBackPress');
console.log('from:' + options.from);
return true;
},
onLoad(options) { onLoad(options) {
this.data = JSON.parse(decodeURIComponent(options.data)); this.data = JSON.parse(decodeURIComponent(options.data));
if (decodeURIComponent(options.isPlayNext) != undefined) { if (decodeURIComponent(options.isPlayNext) != undefined) {
...@@ -144,15 +157,17 @@ ...@@ -144,15 +157,17 @@
this.safeArea = res.safeAreaInsets.bottom; this.safeArea = res.safeAreaInsets.bottom;
} }
}) })
this.getDataTime();
// #ifdef MP-TOUTIAO // #ifdef MP-TOUTIAO
this.canUseTTPlayer = tt.canIUse('video-player') this.canUseTTPlayer = tt.canIUse('video-player')
this.ttuop = 64 this.ttuop = 64
// #endif // #endif
this.localTimeData = uni.getStorageSync('ONE_DAY_OPENBEG');
this.getData() this.getData()
this.preloadAd() this.preloadAd()
}, },
onShow() { onShow() {
// 从VIP页面返回关闭弹框 // 从VIP页面返回关闭弹框
...@@ -195,6 +210,15 @@ ...@@ -195,6 +210,15 @@
this.preloadplaylet() this.preloadplaylet()
} }
}, },
getDataTime() {
let currentTime = new Date();
let year = currentTime.getFullYear();
// 获取月份(注意月份是从0开始计数的,所以需要加1)
let month = currentTime.getMonth() + 1;
let day = currentTime.getDate();
// 格式化时间为 YYYY-MM-DD
this.curTimeData = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
},
preloadplaylet() { preloadplaylet() {
var preIndex = 0 var preIndex = 0
if (this.displayIndex < 2) { if (this.displayIndex < 2) {
...@@ -332,6 +356,20 @@ ...@@ -332,6 +356,20 @@
getData() { getData() {
let that = this let that = this
this.originList = [] this.originList = []
this.post({
url: '/user/baseMsg',
showLoading: false,
success: ({
data
}) => {
this.userBean = data;
// 非会员且当天未弹出 签到弹窗
if (this.userBean.expireTime <= 0 && this.curTimeData != this.localTimeData) {
this.showSignPop = true
}
}
});
this.post({ this.post({
url: '/vedio/getIndexList', url: '/vedio/getIndexList',
data: { data: {
...@@ -469,18 +507,19 @@ ...@@ -469,18 +507,19 @@
}); });
}, },
cancelCollect(vedioId, index) { cancelCollect(vedioId, index) {
this.showSignPop = true
this.data.collect = 0 this.data.collect = 0
// 取消收藏 // // 取消收藏
this.post({ // this.post({
url: '/vedio/cancelCollect', // url: '/vedio/cancelCollect',
data: { // data: {
vedioId // vedioId
}, // },
showLoading: false, // showLoading: false,
success: ({ // success: ({
data // data
}) => {} // }) => {}
}); // });
}, },
commitVideo() { commitVideo() {
// 提交后台 // 提交后台
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</template> </template>
<script> <script>
import common from '@/mixins/common'; import common from '@/mixins/common';
const app = getApp();
import { import {
formateTime formateTime
} from "@/utils/utils.js" } from "@/utils/utils.js"
...@@ -94,12 +94,14 @@ ...@@ -94,12 +94,14 @@
this.inviteData = data; this.inviteData = data;
} }
}); });
}, },
onShareAppMessage(res) { //发送给朋友 onShareAppMessage(res) { //发送给朋友
return { return {
title: this.share.title, title: this.share.title,
imageUrl: this.share.imageUrl, imageUrl: this.share.imageUrl,
path: this.share.path, path: this.share.path+getApp().globalData.userId,
} }
}, },
handleRule(){ handleRule(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment