快手init

This commit is contained in:
zby 2022-10-26 18:37:46 +08:00
parent ec5edb13cc
commit 2698975c3c
8 changed files with 223 additions and 171 deletions

View File

@ -1,17 +1,40 @@
<template>
<view class="flex-1">
<GLoading />
<scroll-view
<view style="height: 100vh;">
<view
:style="{
background: `linear-gradient(93deg, rgba(255, 220, 230,1) 45%, rgba(255, 238, 195, 1))`
}"
>
<GNavbar
left-width="200rpx"
backgroud-color="transparent"
:custom-left-fn="true"
>
<view
slot="left"
class="flex-row flex-center"
>
<text
class="fs-40"
style="color: #1a1a1a;font-weight: bold;"
>
某某短剧
</text>
</view>
</GNavbar>
</view>
<GList
class="flex-1"
style="z-index: 999;"
scroll-y="true"
lower-threshold="30"
lower-threshold="300"
@scrolltolower="scrollLower"
>
<view style="position: relative;">
<view class="body-bg" />
<view class=" px-20 py-20">
<view
class=" px-20 py-20"
>
<!-- <view class="high mb-20">
<view class="high-title mb-24">
<text class="high-title-text">
@ -125,13 +148,13 @@
</text>
</view>
</view>
<u-loadmore :status="status" />
</view>
<u-loadmore :status="status" />
<!-- #ifndef H5 -->
<u-gap height="80" />
<!-- #endif -->
</view>
</scroll-view>
<!-- #ifndef H5 -->
<u-gap height="160" />
<!-- #endif -->
</GList>
</view>
</template>
@ -287,9 +310,9 @@ export default {
}
.body-bg {
position: absolute;
top: 0;
top: -4rpx;
width: 750rpx;
z-index: 2rpx;
height: 434rpx;
background: url('https://diyyhdapi.qinjiu8.com/backImg.png');
background-size: 100% 100%;

View File

@ -1,5 +1,5 @@
<template>
<view class="flex-1">
<view style="height:100vh;">
<GList class="flex-1">
<GLoading />
<view

View File

@ -1,15 +1,39 @@
<template>
<view
class="flex-1"
style="position: relative;"
style=";height:100vh;"
>
<GLoading />
<view class="body-bg" />
<view
:style="{
background: `linear-gradient(93deg, rgba(255, 220, 230,1) 45%, rgba(255, 238, 195, 1))`
}"
>
<GNavbar
left-width="200rpx"
backgroud-color="transparent"
:custom-left-fn="true"
>
<view
slot="left"
class="flex-row flex-center"
>
<text
class="fs-40"
style="color: #1a1a1a;font-weight: bold;"
>
某某短剧
</text>
</view>
</GNavbar>
</view>
<view
class="flex-1"
style="position: absolute;z-index: 9999;"
style="position: relative"
>
<view class="body-bg" />
<view
style="z-index: 99;"
class="px-28 flex-row pt-48 "
@click="getUserInfo"
>
@ -50,7 +74,10 @@
</text>
</view>
</view>
<view class="userInfo mt-48 px-30 flex-row mb-20">
<view
class="userInfo mt-48 px-30 flex-row mb-20"
style="z-index: 99;"
>
<view
class="flex-row flex-1 "
style="align-items: center;"
@ -357,7 +384,7 @@ export default {
}
.body-bg {
position: absolute;
top: 2rpx;
top: -4rpx;
width: 750rpx;
z-index: 0;
height: 434rpx;

View File

@ -1,66 +1,63 @@
<template>
<GList
class="flex-1"
style="background: #F3F4F6;"
>
<GLoading />
<view
v-if="dataList.length !==0"
class="px-30 py-28"
<view sytle="height:100%;background: #fff;">
<GList
v-if="dataList.length !== 0"
style="background: #F3F4F6;height: 100vh;"
>
<view
v-for="(item, index) in dataList"
:key="index"
class="pay-item mb-24"
>
<view class="px-30 py-28">
<view
class="pay-item-header flex-center"
:class="{ status: item.status === 0 }"
v-for="(item, index) in dataList"
:key="index"
class="pay-item mb-24"
>
<text class="pay-item-header-text">
充值{{ item.money || 0 }}{{
item.status === 1 ? '已支付' : '未支付'
}}
</text>
</view>
<view class="pay-item-bottom">
<view
class="flex-row mb-20 mt-8"
style="justify-content: space-between;"
class="pay-item-header flex-center"
:class="{ status: item.status === 0 }"
>
<text class="pay-item-bottom-left">
订单号码
</text>
<text class="pay-item-bottom-right">
{{ item.out_trade_no }}
<text class="pay-item-header-text">
充值{{ item.money || 0 }}{{
item.status === 1 ? '已支付' : '未支付'
}}
</text>
</view>
<view
class="flex-row"
style="justify-content: space-between;"
>
<text class="pay-item-bottom-left">
下单时间
</text>
<text class="pay-item-bottom-right">
{{ item.create_time }}
</text>
<view class="pay-item-bottom">
<view
class="flex-row mb-20 mt-8"
style="justify-content: space-between;"
>
<text class="pay-item-bottom-left">
订单号码
</text>
<text class="pay-item-bottom-right">
{{ item.out_trade_no }}
</text>
</view>
<view
class="flex-row"
style="justify-content: space-between;"
>
<text class="pay-item-bottom-left">
下单时间
</text>
<text class="pay-item-bottom-right">
{{ item.create_time }}
</text>
</view>
</view>
</view>
</view>
</view>
</GList>
<view
v-else
class="flex-1 flex-center"
style="height: 100%;background-color: #ffffff;"
>
<GNoData
image="pay-noData"
text="暂无充值记录~"
/>
</view>
</GList>
</view>
</template>
<script>

View File

@ -69,7 +69,7 @@
</view>
<!-- #ifndef H5 -->
<u-gap height="80" />
<u-gap height="160" />
<!-- #endif -->
</GList>
</template>

View File

@ -141,7 +141,7 @@
</view>
<GFooter />
<!-- #ifndef H5 -->
<u-gap height="80" />
<u-gap height="160" />
<!-- #endif -->
</view>
</GList>

View File

@ -1,81 +1,87 @@
<template>
<view class="flex-1">
<GLoading />
<view :style="`height:100vh`">
<view
:style="{
background: `linear-gradient(93deg, rgba(255, 220, 230, ${
swiperIndex === 0 ? backOpacityOne : backOpacity
}) 45%, rgba(255, 238, 195, ${
swiperIndex === 0 ? backOpacityOne : backOpacity
}))`
}"
>
<GNavbar
left-width="200rpx"
backgroud-color="transparent"
:custom-left-fn="true"
>
<view slot="left" class="flex-row flex-center">
<text
class="fs-40"
style="color: #1a1a1a;font-weight: bold;"
>
某某短剧
</text>
</view>
</GNavbar>
<view class="header_tabs flex-row px-20">
<view class="">
<u-tabs
:list="tabList"
:inactive-style="{
fontSize: '34rpx',
color: '#666666',
fontWeight: 500
}"
:current="swiperIndex"
:active-style="{
color: '#1A1A1A',
fontSize: '40rpx',
fontWeight: 'bold'
}"
:item-style="{
'padding-left': 0,
'padding-right': '50rpx'
}"
line-height="0"
@click="tabsClick"
/>
</view>
<view class="search" @click="navSearch">
<view
class="search-view flex-row"
style="align-items: center;"
>
<u-icon name="/static/icon/search.png" size="24rpx" />
<text class="search-text"> 寻找你喜欢的短剧 </text>
</view>
</view>
</view>
</view>
<view class="flex-1">
<swiper
class="flex-1"
:current="swiperIndex"
@change="swiperChange"
>
<swiper-item>
<Pursue
ref="Pursue"
:tab-index="swiperIndex"
@signIn="signIn"
/>
</swiper-item>
<swiper-item>
<Recommend
ref="Recommend"
:tab-index="swiperIndex"
@opacity="opacity"
/>
</swiper-item>
</swiper>
<view
class="header_tabs flex-row px-20"
:style="{
background: `linear-gradient(93deg, rgba(255, 220, 230, ${
swiperIndex === 0 ? backOpacityOne : backOpacity
}) 45%, rgba(255, 238, 195, ${
swiperIndex === 0 ? backOpacityOne : backOpacity
}))`
}"
>
<view class="">
<u-tabs
:list="tabList"
:inactive-style="{
fontSize: '34rpx',
color: '#666666',
fontWeight: 500
}"
:current="swiperIndex"
:active-style="{
color: '#1A1A1A',
fontSize: '40rpx',
fontWeight: 'bold'
}"
:item-style="{
'padding-left':0,
'padding-right':'50rpx'
}"
line-height="0"
@click="tabsClick"
/>
</view>
<view
class="search"
@click="navSearch"
>
<view
class="search-view flex-row"
style="align-items: center;"
>
<u-icon
name="/static/icon/search.png"
size="24rpx"
/>
<text class="search-text">
寻找你喜欢的短剧
</text>
</view>
</view>
</view>
<swiper
class="flex-1"
:current="swiperIndex"
@change="swiperChange"
>
<swiper-item>
<Pursue
ref="Pursue"
:tab-index="swiperIndex"
@signIn="signIn"
/>
</swiper-item>
<swiper-item>
<Recommend
ref="Recommend"
:tab-index="swiperIndex"
@opacity="opacity"
/>
</swiper-item>
</swiper>
<GSignMadel ref="GSignMadel" />
</view>
<GSignMadel ref="GSignMadel" />
</view>
</view>
</template>
<script>
@ -96,10 +102,11 @@ export default {
}
],
keyword: '',
swiperIndex:1,
swiperIndex: 1,
backOpacity: 1,
backOpacityOne: 0,
time: null
time: null,
statusBarHeight:''
};
},
computed: {
@ -108,39 +115,35 @@ export default {
}
},
onShow() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight * 2 + 'rpx';
setTimeout(() => {
this.$showLoading(false);
}, 1000);
if(this.swiperIndex === 1){
setTimeout(()=>{
if (this.swiperIndex === 1) {
setTimeout(() => {
this.$refs.Recommend.getList();
},500);
}, 500);
} else {
setTimeout(()=>{
setTimeout(() => {
this.$refs.Pursue.getList();
},500);
}, 500);
}
},
onLoad() {
const uid = uni.getStorageSync('uid')|| '';
if(!uid){
uni.login({
success: function(loginRes) {
reg({
code:loginRes.code
}).then(res=>{
uni.setStorageSync('uid', res.uid );
});
}
});
}
// const uid = uni.getStorageSync('uid') || '';
// if (!uid) {
// uni.login({
// success: function(loginRes) {
// reg({
// code: loginRes.code
// }).then(res => {
// });
// }
// });
// }
uni.setStorageSync('uid', 3);
},
methods: {
swiperChange(e) {
@ -185,7 +188,6 @@ export default {
}
.header_tabs {
z-index: 999;
height: 90rpx;
justify-content: space-between;
align-items: center;

View File

@ -1,10 +1,11 @@
<template>
<view
class="flex-1"
style="background-color: #000000;"
style="background-color: #000000;height:100vh;"
>
<GLoading :back-color="'#000'" />
<swiper
:duration="500"
vertical
class="flex-1"
@ -16,7 +17,6 @@
v-for="(item, index) in videoList"
:key="index"
class="flex-1"
@touchmove.stop="stopTouchMove"
>
<!-- 视频 -->
<video
@ -31,10 +31,13 @@
:src="item.video_url"
:play-strategy="1"
:show-fullscreen-btn="false"
@touchStart="touchStart"
@touchEnd="touchEnd"
@play="videoPlay"
/>
</swiper-item>
</swiper>
<view
v-if="watchInfo.order"
class="jishu1"