Commit 048de4c4 authored by mengcuiguang's avatar mengcuiguang

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

parent e735b094
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
style="display: flex;flex-direction: column;background-color:white;border-radius:10rpx;margin-top: 20rpx;"> 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> <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;"> <scroll-view scroll-x="true" style="white-space: nowrap; margin-top: 18rpx;">
<block v-for="(item, index) in topList" :key="item.vedioId"> <block v-for="(item, index) in topList" :key="item.vedioId">
<view @click="handleTop(item)" <view @click="handleTop(item)"
style="display:inline-block;background-color:white;border-radius:10rpx;width: 200rpx;margin: 5rpx 10rpx 15rpx 10rpx;"> style="display:inline-block;background-color:white;border-radius:10rpx;width: 200rpx;margin: 5rpx 10rpx 15rpx 10rpx;">
...@@ -163,6 +162,27 @@ ...@@ -163,6 +162,27 @@
</view> </view>
</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> </view>
</template> </template>
<script> <script>
...@@ -198,6 +218,8 @@ ...@@ -198,6 +218,8 @@
}, },
methods: { methods: {
show() { show() {
// 匹配视频
this.showFirstDialog();
// 轮播图 // 轮播图
this.post({ this.post({
url: '/vedio/topTabs', url: '/vedio/topTabs',
...@@ -218,25 +240,24 @@ ...@@ -218,25 +240,24 @@
this.topList = data.list; this.topList = data.list;
} }
}); });
// 最近观看剧 // 最近观看剧
this.post({ this.post({
url: '/vedio/newest', url: '/vedio/newest',
data: {}, data: {},
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
if (data.vedio != null) { if (data.vedio != null) {
this.newRecordBean = data.vedio; this.newRecordBean = data.vedio;
} }
} }
}); });
}, },
hide() { hide() {
}, },
queryList(page, size) { queryList(page, size) {
// this.show();
// 推荐列表 // 推荐列表
this.post({ this.post({
url: '/vedio/list', url: '/vedio/list',
...@@ -274,6 +295,32 @@ ...@@ -274,6 +295,32 @@
data 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 @@ ...@@ -291,7 +338,7 @@
background-color: #fff; background-color: #fff;
break-inside: avoid; break-inside: avoid;
margin-bottom: 20rpx; margin-bottom: 20rpx;
height: 490rpx; height: 500rpx;
} }
.img { .img {
......
<template> <template>
<view class="body loading"> <view class="body">
<view class="logo"> <image style="width: 170rpx;height: 170rpx;margin-top: 30%;" src="@/static/logo-about.png" mode="widthFix" />
<image src="@/static/logo-about.png" mode="widthFix" style="border-radius: 20rpx;margin-bottom: 200rpx;" /> <view style="color: black;margin-top: 30rpx;font-size: 40rpx;font-size: 50rpx;">河狸刷剧</view>
<view class="animation"> <view style="color: #A231EF;margin-top: 10rpx;font-size: 40rpx;font-size: 40rpx;">欢迎使用</view>
<text style="animation-delay: 0s;color: black;"></text> <view style="bottom: 0;position: absolute;">
<text style="animation-delay: 0.1s;color: black;"> </text> <image style="width: 540rpx;height: 644rpx;display: flex;align-items: center;margin-bottom: 30%;"
<text style="animation-delay: 0.2s;color: black;"> </text> src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_splash.png" mode="scaleToFill">
<text style="animation-delay: 0.3s;color: black;"></text> </image>
<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> </view>
</view> </view>
</template> </template>
...@@ -36,101 +25,101 @@ ...@@ -36,101 +25,101 @@
export default { export default {
name: 'loading', name: 'loading',
mixins: [common], mixins: [common],
data() { data() {
return { return {
tips1: '' tips1: ''
} }
}, },
onLoad(options) { onLoad(options) {
this.tips1 = options.tips1; this.tips1 = options.tips1;
}, },
onShow(options) { onShow(options) {
this.wxlogin(); // this.wxlogin();
// setTimeout(() => {
// redirectTo('home');
// }, 2800);
}, },
methods: { methods: {
wxlogin() { wxlogin() {
var that=this; var that = this;
// var obj = wx.getEnterOptionsSync() var obj = wx.getLaunchOptionsSync()
var obj = wx.getLaunchOptionsSync()
var channel = 'mints' // 渠道
var channel = 'mints' // 渠道 var clueToken = '' // 归因参数
var clueToken = '' // 归因参数 var adId = '' // 计划id
var adId = '' // 计划id var advertiserId = '' // 账号id
var advertiserId = '' // 账号id var reqId = '' // 请求id
var reqId = '' // 请求id var promotionId = '' // aid
var promotionId = '' // aid var projectId = '';
var projectId = ''; var tips2 = ''; // 投放测试标记
var tips2 = ''; var product_type = ''; //自有产品
var product_type = ''; var zs_channel = ''; // 自有渠道
var zs_channel = ''; var vedio_id = ''; // 自有剧
if (obj.query.clue_token ?? '' != '') { // 头条渠道参数
channel = 'tt' if (obj.query.clue_token ?? '' != '') {
clueToken = obj.query.clue_token ?? '' channel = 'tt'
adId = obj.query.ad_id ?? '' clueToken = obj.query.clue_token ?? ''
advertiserId = obj.query.advertiser_id ?? '' adId = obj.query.ad_id ?? ''
reqId = obj.query.req_id ?? '' advertiserId = obj.query.advertiser_id ?? ''
promotionId = obj.query.promotion_id ?? '' reqId = obj.query.req_id ?? ''
projectId = obj.query.project_id ?? '' promotionId = obj.query.promotion_id ?? ''
tips2 = obj.query.tips2 ?? '' projectId = obj.query.project_id ?? ''
product_type = obj.query.product_type ?? '' tips2 = obj.query.tips2 ?? ''
zs_channel = obj.query.zs_channel ?? '' 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 ?? '' if (obj.query.ksChannel ?? '' != '') {
adId = obj.query.aid ?? '' channel = 'kuaishou'
} advertiserId = obj.query.accountid ?? ''
clueToken = obj.query.callback ?? ''
if(this.tips1=='mints_vedio'||tips2=='mints_vedio'){ adId = obj.query.aid ?? ''
toastMessage("JSON.stringify(this.log)="+JSON.stringify(obj.query)+"channel=" + channel + "clueToken=" + clueToken + }
"adId=" + adId + "advertiserId=" + advertiserId + "projectId=" + projectId +
"reqId=" + reqId + "promotionId=" + promotionId); // 打印渠道参数
} if (this.tips1 == 'mints_vedio' || tips2 == 'mints_vedio') {
toastMessage("param = " + JSON.stringify(obj.query));
uni.login({ }
provider: 'weixin',
success: function(loginRes) { uni.login({
provider: 'weixin',
that.post({ success: function(loginRes) {
url: '/user/wechatlogin',
data: { that.post({
channel: channel, url: '/user/wechatlogin',
clueToken: clueToken, data: {
code: loginRes.code, channel: channel,
adId: adId, clueToken: clueToken,
advertiserId: advertiserId, code: loginRes.code,
reqId: reqId, adId: adId,
promotionId: promotionId, advertiserId: advertiserId,
projectId: projectId, reqId: reqId,
productType: product_type, promotionId: promotionId,
zsChannel: zs_channel projectId: projectId,
}, productType: product_type,
showLoading: false, vedioId: vedio_id,
success: ({ zsChannel: zs_channel
data },
}) => { showLoading: false,
uni.setStorage({ success: ({
key: 'token', data
data: data.token }) => {
}); uni.setStorage({
app.globalData.userInfo = data; key: 'token',
setTimeout(() => { data: data.token
redirectTo('home'); });
}, 1500); app.globalData.userInfo = data;
} setTimeout(() => {
}); redirectTo('home');
}, }, 1500);
fail: function(err) { }
// 登录授权失败 });
message.notify('登录授权失败 错误码:' + err.code); },
} fail: function(err) {
}); // 登录授权失败
message.notify('登录授权失败 错误码:' + err.code);
}
});
} }
} }
}; };
...@@ -139,63 +128,9 @@ ...@@ -139,63 +128,9 @@
<style lang="scss"> <style lang="scss">
.body { .body {
background-color: white; background-color: white;
} background: linear-gradient(to bottom, #F2F1FF, #FBFBFF);
display: flex;
.loading { flex-direction: column;
text-align: center; align-items: 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);
}
} }
</style> </style>
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:style="'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+statusBarHeight+'px;'"> :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> <image class="avatar" src="@/static/logo-about.png"></image>
<view> <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>
</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