Commit 048de4c4 authored by mengcuiguang's avatar mengcuiguang

添加新启动页,添加匹配用户进入首页直接播放剧集

parent e735b094
......@@ -13,7 +13,6 @@
style="display: flex;flex-direction: column;background-color:white;border-radius:10rpx;margin-top: 20rpx;">
<view style="font-size: 30rpx;font-weight: 777;margin-left: 12rpx;margin-top: 18rpx;">排行榜</view>
<scroll-view scroll-x="true" style="white-space: nowrap; margin-top: 18rpx;">
<block v-for="(item, index) in topList" :key="item.vedioId">
<view @click="handleTop(item)"
style="display:inline-block;background-color:white;border-radius:10rpx;width: 200rpx;margin: 5rpx 10rpx 15rpx 10rpx;">
......@@ -163,6 +162,27 @@
</view>
</view>
<!-- <uni-popup type="center" ref="select">
<view>
<view style="font-size: 30rpx;font-weight: 777;color: white;">刚刚看的</view>
<view style="text-align: center;">
<view>
<video :id="recommendBean.vedioId" :loop="true" :enable-progress-gesture="false"
:show-loading="true" :show-fullscreen-btn="false"
style="width:100%; height:100%;background: #f56c6c;" :src="recommendBean.vedioUrl"
:poster="recommendBean.coverImage" play-btn-position="center" object-fit="contain" />
</view>
<view>123</view>
<view @click="handleVipPay"
style="width: 350rpx;height: 80rpx;background-color: #f2575b;border-radius:20rpx;color: white;font-size: 26rpx;justify-content: center;align-items: center;display: flex;">
立即试看
</view>
</view>
</view>
</uni-popup> -->
</view>
</template>
<script>
......@@ -198,6 +218,8 @@
},
methods: {
show() {
// 匹配视频
this.showFirstDialog();
// 轮播图
this.post({
url: '/vedio/topTabs',
......@@ -218,25 +240,24 @@
this.topList = data.list;
}
});
// 最近观看剧
this.post({
url: '/vedio/newest',
data: {},
showLoading: false,
success: ({
data
}) => {
if (data.vedio != null) {
this.newRecordBean = data.vedio;
}
}
// 最近观看剧
this.post({
url: '/vedio/newest',
data: {},
showLoading: false,
success: ({
data
}) => {
if (data.vedio != null) {
this.newRecordBean = data.vedio;
}
}
});
},
hide() {
},
queryList(page, size) {
// this.show();
// 推荐列表
this.post({
url: '/vedio/list',
......@@ -274,6 +295,32 @@
data
}) => {}
});
},
showFirstDialog() {
let that = this;
// 匹配用户展示视频
let showFirstVedio = uni.getStorageSync('showFirstVedio') || '';
if (showFirstVedio == '') {
uni.setStorage({
key: 'showFirstVedio',
data: 'true'
});
setTimeout(() => {
that.post({
url: '/vedio/firstVedio',
data: {},
showLoading: false,
success: ({
data
}) => {
if (data.vedioMsg != null) {
navigateTo(`/pagesC/video/videoDetail?data=` + encodeURIComponent(
JSON.stringify(data.vedioMsg)));
}
}
});
}, 800);
}
}
}
};
......@@ -291,7 +338,7 @@
background-color: #fff;
break-inside: avoid;
margin-bottom: 20rpx;
height: 490rpx;
height: 500rpx;
}
.img {
......
<template>
<view class="body loading">
<view class="logo">
<image src="@/static/logo-about.png" mode="widthFix" style="border-radius: 20rpx;margin-bottom: 200rpx;" />
<view class="animation">
<text style="animation-delay: 0s;color: black;"></text>
<text style="animation-delay: 0.1s;color: black;"> </text>
<text style="animation-delay: 0.2s;color: black;"> </text>
<text style="animation-delay: 0.3s;color: black;"></text>
<text style="animation-delay: 0.4s;color: black;"> </text>
<text style="animation-delay: 0.4s;color: black;"> </text>
<text style="animation-delay: 0.5s;color: black;"></text>
<text style="animation-delay: 0.6s;color: black;"> </text>
<text style="animation-delay: 0.7s;color: black;"> </text>
<text style="animation-delay: 0.8s;color: black;"></text>
<text style="animation-delay: 0.9s;color: black;"> </text>
<text style="animation-delay: 1s;color: black;"> </text>
<text style="animation-delay: 1.1s;color: black;"></text>
</view>
<view style="color: black;margin-top: 40rpx;font-size: 40rpx;">欢迎使用</view>
<view class="body">
<image style="width: 170rpx;height: 170rpx;margin-top: 30%;" src="@/static/logo-about.png" mode="widthFix" />
<view style="color: black;margin-top: 30rpx;font-size: 40rpx;font-size: 50rpx;">河狸刷剧</view>
<view style="color: #A231EF;margin-top: 10rpx;font-size: 40rpx;font-size: 40rpx;">欢迎使用</view>
<view style="bottom: 0;position: absolute;">
<image style="width: 540rpx;height: 644rpx;display: flex;align-items: center;margin-bottom: 30%;"
src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_splash.png" mode="scaleToFill">
</image>
</view>
</view>
</template>
......@@ -36,101 +25,101 @@
export default {
name: 'loading',
mixins: [common],
data() {
return {
tips1: ''
}
},
onLoad(options) {
this.tips1 = options.tips1;
},
onShow(options) {
this.wxlogin();
// setTimeout(() => {
// redirectTo('home');
// }, 2800);
data() {
return {
tips1: ''
}
},
onLoad(options) {
this.tips1 = options.tips1;
},
onShow(options) {
// this.wxlogin();
},
methods: {
wxlogin() {
var that=this;
// var obj = wx.getEnterOptionsSync()
var obj = wx.getLaunchOptionsSync()
var channel = 'mints' // 渠道
var clueToken = '' // 归因参数
var adId = '' // 计划id
var advertiserId = '' // 账号id
var reqId = '' // 请求id
var promotionId = '' // aid
var projectId = '';
var tips2 = '';
var product_type = '';
var zs_channel = '';
if (obj.query.clue_token ?? '' != '') {
channel = 'tt'
clueToken = obj.query.clue_token ?? ''
adId = obj.query.ad_id ?? ''
advertiserId = obj.query.advertiser_id ?? ''
reqId = obj.query.req_id ?? ''
promotionId = obj.query.promotion_id ?? ''
projectId = obj.query.project_id ?? ''
tips2 = obj.query.tips2 ?? ''
product_type = obj.query.product_type ?? ''
zs_channel = obj.query.zs_channel ?? ''
}
if (obj.query.ksChannel ?? '' != '') {
channel = 'kuaishou'
advertiserId = obj.query.accountid ?? ''
clueToken = obj.query.callback ?? ''
adId = obj.query.aid ?? ''
}
if(this.tips1=='mints_vedio'||tips2=='mints_vedio'){
toastMessage("JSON.stringify(this.log)="+JSON.stringify(obj.query)+"channel=" + channel + "clueToken=" + clueToken +
"adId=" + adId + "advertiserId=" + advertiserId + "projectId=" + projectId +
"reqId=" + reqId + "promotionId=" + promotionId);
}
uni.login({
provider: 'weixin',
success: function(loginRes) {
that.post({
url: '/user/wechatlogin',
data: {
channel: channel,
clueToken: clueToken,
code: loginRes.code,
adId: adId,
advertiserId: advertiserId,
reqId: reqId,
promotionId: promotionId,
projectId: projectId,
productType: product_type,
zsChannel: zs_channel
},
showLoading: false,
success: ({
data
}) => {
uni.setStorage({
key: 'token',
data: data.token
});
app.globalData.userInfo = data;
setTimeout(() => {
redirectTo('home');
}, 1500);
}
});
},
fail: function(err) {
// 登录授权失败
message.notify('登录授权失败 错误码:' + err.code);
}
});
methods: {
wxlogin() {
var that = this;
var obj = wx.getLaunchOptionsSync()
var channel = 'mints' // 渠道
var clueToken = '' // 归因参数
var adId = '' // 计划id
var advertiserId = '' // 账号id
var reqId = '' // 请求id
var promotionId = '' // aid
var projectId = '';
var tips2 = ''; // 投放测试标记
var product_type = ''; //自有产品
var zs_channel = ''; // 自有渠道
var vedio_id = ''; // 自有剧
// 头条渠道参数
if (obj.query.clue_token ?? '' != '') {
channel = 'tt'
clueToken = obj.query.clue_token ?? ''
adId = obj.query.ad_id ?? ''
advertiserId = obj.query.advertiser_id ?? ''
reqId = obj.query.req_id ?? ''
promotionId = obj.query.promotion_id ?? ''
projectId = obj.query.project_id ?? ''
tips2 = obj.query.tips2 ?? ''
product_type = obj.query.product_type ?? ''
zs_channel = obj.query.zs_channel ?? ''
vedio_id = obj.query.vedio_id ?? ''
}
// 快手渠道参数
if (obj.query.ksChannel ?? '' != '') {
channel = 'kuaishou'
advertiserId = obj.query.accountid ?? ''
clueToken = obj.query.callback ?? ''
adId = obj.query.aid ?? ''
}
// 打印渠道参数
if (this.tips1 == 'mints_vedio' || tips2 == 'mints_vedio') {
toastMessage("param = " + JSON.stringify(obj.query));
}
uni.login({
provider: 'weixin',
success: function(loginRes) {
that.post({
url: '/user/wechatlogin',
data: {
channel: channel,
clueToken: clueToken,
code: loginRes.code,
adId: adId,
advertiserId: advertiserId,
reqId: reqId,
promotionId: promotionId,
projectId: projectId,
productType: product_type,
vedioId: vedio_id,
zsChannel: zs_channel
},
showLoading: false,
success: ({
data
}) => {
uni.setStorage({
key: 'token',
data: data.token
});
app.globalData.userInfo = data;
setTimeout(() => {
redirectTo('home');
}, 1500);
}
});
},
fail: function(err) {
// 登录授权失败
message.notify('登录授权失败 错误码:' + err.code);
}
});
}
}
};
......@@ -139,63 +128,9 @@
<style lang="scss">
.body {
background-color: white;
}
.loading {
text-align: center;
.logo {
position: absolute;
top: 40%;
width: 100%;
transform: translateY(-50%);
image {
width: 120rpx;
height: 180rpx;
margin-bottom: 52rpx;
}
.animation {
font-size: 72rpx;
margin-top: 200rpx;
text {
text-align: center;
display: inline-block;
animation: spring 1s ease-in-out infinite;
}
}
}
}
@keyframes spring {
0% {
transform: scaleX(1);
}
30% {
transform: scale3d(1.25, 0.75, 1);
}
40% {
transform: scale3d(0.75, 1.25, 1);
}
50% {
transform: scale3d(1.15, 0.85, 1);
}
65% {
transform: scale3d(0.95, 1.05, 1);
}
75% {
transform: scale3d(1.05, 0.95, 1);
}
to {
transform: scaleX(1);
}
background: linear-gradient(to bottom, #F2F1FF, #FBFBFF);
display: flex;
flex-direction: column;
align-items: center;
}
</style>
\ No newline at end of file
......@@ -4,7 +4,7 @@
:style="'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+statusBarHeight+'px;'">
<image class="avatar" src="@/static/logo-about.png"></image>
<view>
<view style="font-size: 26rpx;color: black;margin-left: 20rpx;">用户ID:{{userBean.idcode}}</view>
<view style="font-size: 32rpx;color: black;margin-left: 20rpx;">用户ID:{{userBean.idcode}}</view>
</view>
</view>
......
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