Commit 39969b32 authored by mengcuiguang's avatar mengcuiguang

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

parent b4c566fb
......@@ -90,7 +90,7 @@
// baseUrl: 'http://192.168.110.71:8301/miniApi',
titleButtonWidth: 38,
token: '',
userId: 0,
userId: '',
inviteUId: '',
serviceUrl: '',
downUrl: '', //
......
<template>
<view class="body">
<z-paging style="height: 100%;background-color: #f0f8ff;">
<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;">
<view style="width: 100%;height: 340rpx;
background-repeat: no-repeat;
background-size: 100%;
......@@ -64,9 +76,6 @@
</view>
</view>
<view class="inviteClass">
<view @click="handleTask" class="inviteItemclass" style="margin-right: 10rpx">
<image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
......@@ -100,6 +109,10 @@
<view class="item arrow" @click="handleWatchRecord">
观看记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></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">
联系客服
......@@ -124,7 +137,10 @@
mixins: [common],
data() {
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: {
......@@ -148,8 +164,7 @@
},
handleDotRecord() {
// 看点记录
// navigateTo(`/pagesD/dotRecord/dotRecord`)
navigateTo(`/pagesA/task/task`)
navigateTo(`/pagesD/dotRecord/dotRecord`)
},
handleUseDotRecord() {
// 看点消费记录
......@@ -166,6 +181,9 @@
},
handleCoinPay() {
navigateTo(`/pagesA/vipPay/vipPay`)
},
handleFind(){
this.showMask = true
},
handlePhone() {
wx.makePhoneCall({
......@@ -205,64 +223,11 @@
<style lang="scss">
@import '@/scss/uni.scss';
.body {
.body {
height: 100%;
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 {
display: flex;
flex-direction: row;
......@@ -290,69 +255,19 @@
border-radius: 50%;
overflow: hidden;
//box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
}
.vip-item {
width: 100%;
padding: 10rpx 40rpx;
.content {
width: 90%;
margin: auto;
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;
margin-bottom: 15rpx;
}
.row:last-child {
margin-bottom: 0;
}
.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;
}
}
.show-mask {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
position: absolute;
z-index: 999;
color: white;
align-items: center;
image {
width: 90%;
}
}
</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 {
share: {
title: '更多好剧,等你来看',
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
}
}
},
......
......@@ -145,7 +145,8 @@
showLoading: false,
success: ({
data
}) => {
}) => {
app.globalData.userId = data.idcode;
uni.setStorage({
key: 'token',
data: data.token
......
<template>
<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 class="section">
<view class="pack-box">
......@@ -71,35 +71,24 @@
</view>
</view>
</scroll-view>
<view style="display: flex;
align-items: center;flex-direction: column;">
<view @click="handleAgree" style="margin-top: 12rpx;margin-right: 10rpx;">付费须知></view>
<view @click="handlePay" class="bottomtext">
<text style="
display: flex;
color: white;
font-size: 26rpx;
justify-content: center;
align-items: center;
">
{{ btnText }}
</text>
</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> -->
</z-paging>
<view style="display: flex;
align-items: center;flex-direction: column;">
<view @click="handleAgree" style="margin-top: 12rpx;margin-right: 10rpx;">付费须知></view>
<view @click="handlePay" class="bottomtext">
<text style="
display: flex;
color: white;
font-size: 26rpx;
justify-content: center;
align-items: center;
">
{{ btnText }}
</text>
</view>
</view>
</view>
</template>
......@@ -262,13 +251,13 @@
}
}
},
handleAgree() {
uni.showModal({
title: '付费须知',
content: '1、会员属于虚拟商品,一经购买不可退换;\n2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作;\n3、充值会员一般5分钟内到账,如未到账请在“我的”页面联系客服;',
showCancel: false,
confirmColor: '#33dd44',
confirmText: '确定'
handleAgree() {
uni.showModal({
title: '付费须知',
content: '1、会员属于虚拟商品,一经购买不可退换;\n2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作;\n3、充值会员一般5分钟内到账,如未到账请在“我的”页面联系客服;',
showCancel: false,
confirmColor: '#33dd44',
confirmText: '确定'
})
// this.$refs.alertDialog.open();
},
......
......@@ -69,6 +69,7 @@
<coin-popup :show="showCoinPop" :point="data.point" :vedioId="data.vedioId" @close="showCoinPop = false"
@clickClose="coinPopupClose" @paySuccess="paySuccess" />
<ad-popup :show="showAdPop" @close="adPopupClose" :vedioIndex="originIndex" />
<sign-popup :show="showSignPop" @close="showSignPop = false" />
</view>
</template>
......@@ -85,12 +86,14 @@
import adPopup from '@/components/ad-popup/ad-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 ttVideoPlayer from '@/ttcomponents/tt-video-player'
import {
navigateTo,
message
} from '@/utils/fun.js';
import {
data
......@@ -102,6 +105,7 @@
components: {
coinPopup,
episodePopup,
signPopup,
adPopup,
ttVideoPlayer
},
......@@ -124,16 +128,25 @@
data: {},
isPlayNext: 0,
tabIndex: 0,
tabs: [],
tabs: [],
userBean: {},
subList: [],
showTap: false,
showCoinPop: false,
showSignPop: false,
showAdPop: false,
showAdForServer: false,
vipBackPage: '',
curTimeData: '',
localTimeData: '',
canUseTTPlayer: true,
};
},
onBackPress(options) {
message.notify('onBackPress');
console.log('from:' + options.from);
return true;
},
onLoad(options) {
this.data = JSON.parse(decodeURIComponent(options.data));
if (decodeURIComponent(options.isPlayNext) != undefined) {
......@@ -144,15 +157,17 @@
this.safeArea = res.safeAreaInsets.bottom;
}
})
this.getDataTime();
// #ifdef MP-TOUTIAO
this.canUseTTPlayer = tt.canIUse('video-player')
this.ttuop = 64
// #endif
this.localTimeData = uni.getStorageSync('ONE_DAY_OPENBEG');
this.getData()
this.preloadAd()
},
onShow() {
// 从VIP页面返回关闭弹框
......@@ -195,6 +210,15 @@
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() {
var preIndex = 0
if (this.displayIndex < 2) {
......@@ -331,7 +355,21 @@
},
getData() {
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({
url: '/vedio/getIndexList',
data: {
......@@ -469,18 +507,19 @@
});
},
cancelCollect(vedioId, index) {
this.showSignPop = true
this.data.collect = 0
// 取消收藏
this.post({
url: '/vedio/cancelCollect',
data: {
vedioId
},
showLoading: false,
success: ({
data
}) => {}
});
// // 取消收藏
// this.post({
// url: '/vedio/cancelCollect',
// data: {
// vedioId
// },
// showLoading: false,
// success: ({
// data
// }) => {}
// });
},
commitVideo() {
// 提交后台
......
......@@ -65,7 +65,7 @@
</template>
<script>
import common from '@/mixins/common';
const app = getApp();
import {
formateTime
} from "@/utils/utils.js"
......@@ -93,13 +93,15 @@
}) => {
this.inviteData = data;
}
});
});
},
onShareAppMessage(res) { //发送给朋友
return {
title: this.share.title,
imageUrl: this.share.imageUrl,
path: this.share.path,
path: this.share.path+getApp().globalData.userId,
}
},
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