diff --git a/components/customerService/customerService.json b/components/customerService/customerService.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/components/customerService/customerService.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/customerService/customerService.ts b/components/customerService/customerService.ts
new file mode 100644
index 0000000..dc702bd
--- /dev/null
+++ b/components/customerService/customerService.ts
@@ -0,0 +1,22 @@
+// e:\project\dy_video_all\dy_iaa_new_project\components\customerService\customerService.ts
+import { httpRequest } from "../../utils/httpReques"
+Component({
+ data: {
+ userInfo: {}
+ },
+ properties: {
+
+ },
+ attached() {
+ httpRequest('/user', 'POST').then((res: any) => {
+ if (res.status == 1) {
+ this.setData({
+ userInfo: res.data.info,
+ })
+ }
+ })
+ },
+ methods: {
+
+ }
+})
\ No newline at end of file
diff --git a/components/customerService/customerService.ttml b/components/customerService/customerService.ttml
new file mode 100644
index 0000000..7d42fef
--- /dev/null
+++ b/components/customerService/customerService.ttml
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/components/customerService/customerService.ttss b/components/customerService/customerService.ttss
new file mode 100644
index 0000000..346f8c4
--- /dev/null
+++ b/components/customerService/customerService.ttss
@@ -0,0 +1,18 @@
+/* e:\project\dy_video_all\dy_iaa_new_project\components\customerService\customerService.ttss */
+.contact_customer_service {
+ position: fixed;
+ bottom: 100rpx;
+ right: 20rpx;
+ background: transparent;
+ padding: 0;
+ z-index: 99;
+}
+
+.contact_customer_service::after {
+ content: none;
+}
+
+.contact_custo_ser_icon {
+ width: 50rpx;
+ height: 50rpx;
+}
\ No newline at end of file
diff --git a/pages/home/home.json b/pages/home/home.json
index c2b07b4..82b0dc6 100644
--- a/pages/home/home.json
+++ b/pages/home/home.json
@@ -1,7 +1,8 @@
{
"usingComponents": {
"my-modal": "/components/myModal/myModal",
- "comm-tabs": "/components/commTabs/commTabs"
+ "comm-tabs": "/components/commTabs/commTabs",
+ "customer-service": "/components/customerService/customerService"
},
"navigationBarTitleText": "首页"
}
\ No newline at end of file
diff --git a/pages/home/home.ts b/pages/home/home.ts
index c58a513..a56ccb7 100644
--- a/pages/home/home.ts
+++ b/pages/home/home.ts
@@ -12,7 +12,7 @@ Page({
page: 1,
newModule: [],
bookcase: [],
- bookId: ''
+ bookId: '',
},
onLoad: function () {
diff --git a/pages/home/home.ttml b/pages/home/home.ttml
index 0c009a9..f65ab7b 100644
--- a/pages/home/home.ttml
+++ b/pages/home/home.ttml
@@ -5,13 +5,13 @@
-
+
-
-
-
+
+
+
@@ -156,7 +156,7 @@
-
+
@@ -215,4 +215,6 @@
+
+
\ No newline at end of file
diff --git a/pages/home/home.ttss b/pages/home/home.ttss
index 537e5ab..dd44d33 100644
--- a/pages/home/home.ttss
+++ b/pages/home/home.ttss
@@ -32,7 +32,10 @@ page {
._home_swi_item {
position: relative;
- padding: 76rpx 20rpx;
+ display: flex;
+ align-items: center;
+ /* padding: 76rpx 20rpx; */
+ padding: 0 20rpx;
box-sizing: border-box;
border-radius: 12rpx;
overflow: hidden;
@@ -41,20 +44,23 @@ page {
._home_swi_it_ppp {
position: relative;
width: 100%;
- height: 100%;
+ /* height: 100%; */
}
._home_swi_it_warp {
position: relative;
width: 100%;
- height: 100%;
- transform: scaleY(1);
- transition: transform 0.5s;
+ height: 561rpx;
+ /* transform: scaleY(1); */
+ /* transition: transform 0.5s; */
+ transition: height 0.5s;
}
-._home_swi_it_warp.active {
- transform: scaleY(1.2);
- transition: transform 0.5s;
+._wk_it_op_ac ._home_swi_it_warp {
+ /* transform: scaleY(1.2); */
+ height: 712rpx;
+ /* transition: transform 0.5s; */
+ transition: height 0.5s;
}
._home_swi_it_wa_img {
@@ -76,6 +82,13 @@ page {
transform: translateX(-50%);
border-radius: 8rpx;
background-color: #fff;
+ opacity: 0;
+ transition: opacity 1s;
+}
+
+._wk_it_op_ac ._home_swi_it__play {
+ opacity: 1;
+ transition: opacity 1s;
}
._home_swi_it__pl_text {
@@ -87,7 +100,7 @@ page {
._heome_swi_indicator {
display: flex;
justify-content: center;
- padding-top: 10rpx;
+ padding-top: 20rpx;
}
._heome_swi_ind_item {
@@ -96,7 +109,7 @@ page {
border-radius: 16rpx;
background-color: rgba(255, 255, 255, 0.10);
margin-right: 16rpx;
- transition: width 0.5s;
+ transition: width 0.8s;
}
._heome_swi_ind_item:last-child {
@@ -107,7 +120,7 @@ page {
width: 32rpx;
/* transform: scaleX(2); */
background-color: #5BBE04;
- transition: width 0.5s;
+ transition: width 0.8s;
}
._home_modul_1 {
@@ -660,4 +673,5 @@ page {
._mo_5_load_na_test {
font-size: 32rpx;
color: rgba(255, 255, 255, 0.3);
-}
\ No newline at end of file
+}
+
diff --git a/pages/rechargeRecord/rechargeRecord.json b/pages/rechargeRecord/rechargeRecord.json
index 0205b63..b27e707 100644
--- a/pages/rechargeRecord/rechargeRecord.json
+++ b/pages/rechargeRecord/rechargeRecord.json
@@ -1,4 +1,6 @@
{
- "usingComponents": {},
+ "usingComponents": {
+ "customer-service": "/components/customerService/customerService"
+ },
"navigationBarTitleText": "购买记录"
}
\ No newline at end of file
diff --git a/pages/rechargeRecord/rechargeRecord.ttml b/pages/rechargeRecord/rechargeRecord.ttml
index ebfe5d5..8d350c3 100644
--- a/pages/rechargeRecord/rechargeRecord.ttml
+++ b/pages/rechargeRecord/rechargeRecord.ttml
@@ -59,4 +59,7 @@
+
+
+
\ No newline at end of file
diff --git a/pages/theater/theater.json b/pages/theater/theater.json
index bf6acf2..8d42fa0 100644
--- a/pages/theater/theater.json
+++ b/pages/theater/theater.json
@@ -1,5 +1,6 @@
{
"usingComponents": {
- "comm-tabs": "/components/commTabs/commTabs"
+ "comm-tabs": "/components/commTabs/commTabs",
+ "customer-service": "/components/customerService/customerService"
}
}
\ No newline at end of file
diff --git a/pages/theater/theater.ttml b/pages/theater/theater.ttml
index a4d0bc2..5477908 100644
--- a/pages/theater/theater.ttml
+++ b/pages/theater/theater.ttml
@@ -71,7 +71,9 @@
- {{item.title}}
+
+ {{item.title}}
+
@@ -117,4 +119,7 @@
+
+
+
\ No newline at end of file
diff --git a/pages/theater/theater.ttss b/pages/theater/theater.ttss
index f71a95d..994ad2b 100644
--- a/pages/theater/theater.ttss
+++ b/pages/theater/theater.ttss
@@ -254,10 +254,17 @@ page {
display: inline-block;
height: 56rpx;
padding: 0 28rpx;
- border-radius: 8rpx;
background-color: #272A30;
margin-right: 32rpx;
cursor: pointer;
+ border-radius: 10rpx;
+}
+
+._mo_so_he_scr_warp_flex {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
}
._mo_so_he_scr_warp:last-child {
diff --git a/pages/videoDetail/videoDetail.ts b/pages/videoDetail/videoDetail.ts
index c29eafd..2a4e9e4 100644
--- a/pages/videoDetail/videoDetail.ts
+++ b/pages/videoDetail/videoDetail.ts
@@ -19,7 +19,9 @@ Page({
selectionConList: [],
roderCurrent: 0,
collectionItem: {},
- nextbatchList: []
+ nextbatchList: [],
+ selectedId: '',
+ adBanner: null
},
onLoad(options: any) {
const videoCanIUse = tt.canIUse('video-player');
@@ -30,15 +32,19 @@ Page({
this.setData({
platform: res.platform,
videoCanIUse,
- toOptions: options,
- sid: options?.sid || ''
+
})
}
})
+ this.setData({
+ toOptions: options,
+ sid: options?.sid || ''
+ })
+ this.initFn();
},
onShow() {
- this.initFn();
+
},
async initFn() {
@@ -94,10 +100,11 @@ Page({
const nextId = batchList[current]?.id;
const context: any = tt.createVideoContext(`${id}`);
const nextContext: any = tt.createVideoContext(`${nextId}`);
+ const selectionConList = this.data.selectionConList;
// const collectionItem: any = this.data.collectionItem;
const sid = this.data.sid;
- const videoInfo = this.data.videoInfo;
+ const videoInfo: any = this.data.videoInfo;
const collectionItem = batchList[current]
const params = {
sid: sid,
@@ -117,6 +124,24 @@ Page({
// this.selectComponent(`#${nextId}`, (res: any) => {
// res?.hidePauseIcon()
// });
+ const lk: any = [];
+ selectionConList.forEach((m: any) => {
+ const bm = {
+ ...m,
+ temp: []
+ }
+ m.temp.forEach((k: any) => {
+ if (k.id == videoInfo.id) {
+ bm.temp.push({
+ ...k,
+ isvip: 0
+ })
+ } else {
+ bm.temp.push(k)
+ }
+ })
+ lk.push(bm)
+ })
this.setData({
videoInfo: {
@@ -126,7 +151,8 @@ Page({
videoPlayerCurrent: current,
anthologyFlag: false,
collectionItem: collectionItem,
- videoErrorText: ''
+ videoErrorText: '',
+ selectionConList: lk
})
@@ -183,13 +209,20 @@ Page({
// });
// },
- anthologyTap() {
+ anthologyTap(ev: any) {
+ const id = ev.currentTarget.dataset.id;
+ const context: any = tt.createVideoContext(`${id}`);
+ context?.pause?.();
this.setData({
- anthologyFlag: true
+ anthologyFlag: true,
+ selectedId: id
})
},
handelAnthologyClose() {
+ const selectedId = this.data.selectedId;
+ const context: any = tt.createVideoContext(`${selectedId}`);
+ context?.play?.();
this.setData({
anthologyFlag: false
})
@@ -319,7 +352,84 @@ Page({
});
},
watchAdvertisement() {
+ let adBanner: any = this.data.adBanner;
+ const videoInfo: any = this.data.videoInfo;
+ const batchList: any = this.data.batchList;
+ const selectionConList = this.data.selectionConList;
+ const context: any = tt.createVideoContext(`${videoInfo.id}`);
+ // this.watchInfo.isvip = 0;
+ if (!adBanner) {
+ tt.showToast({
+ title: `广告加载中...`,
+ });
+ adBanner = tt.createRewardedVideoAd({
+ adUnitId: "82jc4t11786rd3thuq",
+ });
+ adBanner.show().then((res: any) => {
+ console.log("视频广告展示");
+ console.log(res, "pppppppp")
+ });
+ // 监听错误
+ adBanner.onError((err: any) => {
+ tt.hideLoading({});
+ switch (err.errCode) {
+ case 1004:
+ // 无合适的广告
+ break;
+ default:
+ // 更多请参考错误码文档
+ }
+ });
+
+ // 监听视频播放完成
+ adBanner.onClose(async (res: any) => {
+ console.log(res, "resres")
+ // const videoIndex = batchList.findIndex(
+ // (r: any) => r.id === videoInfo.id
+ // );
+ // batchList[videoIndex].isvip = 0; // 购买成功 或者本来就是免费
+ // batchList[videoIndex].state = "play";
+ // batchList[videoIndex].playIng = true;
+ // batchList[videoIndex].isplay = true;
+ // context?.play?.();
+
+ const lk: any = [];
+ selectionConList.forEach((m: any) => {
+ const bm = {
+ ...m,
+ temp: []
+ }
+ m.temp.forEach((k: any) => {
+ if (k.id == videoInfo.id) {
+ bm.temp.push({
+ ...k,
+ isvip: 0
+ })
+ } else {
+ bm.temp.push(k)
+ }
+ })
+ lk.push(bm)
+ })
+ const params = {
+ sid: videoInfo.sid,
+ id: videoInfo.id,
+ };
+ const transferadRes: any = await httpRequest('/transferad', 'POST', params);
+ this.setData({
+ batchList: batchList,
+ videoInfo: {
+ ...videoInfo,
+ chackpay: 1
+ },
+ selectionConList: lk
+ })
+ });
+
+ // 预加载资源
+ adBanner.load();
+ }
},
toPathVideoitself(ev: any) {
const sid = ev.currentTarget.dataset.sid;
@@ -341,5 +451,11 @@ Page({
this.setData({
nextbatchList
})
+ },
+ handelEpisode(ev: any) {
+ const current = ev.detail.current;
+ this.setData({
+ roderCurrent: current
+ })
}
})
\ No newline at end of file
diff --git a/pages/videoDetail/videoDetail.ttml b/pages/videoDetail/videoDetail.ttml
index 79807dc..f49592e 100644
--- a/pages/videoDetail/videoDetail.ttml
+++ b/pages/videoDetail/videoDetail.ttml
@@ -16,7 +16,7 @@
three-party-cloud="{{item.video_url}}" version="1"
enable-progress-gesture="{{true}}" autoplay="{{videoPlayerCurrent == index}}"
id="{{item.id}}" enable-dark-water-mark="{{true}}" bindended="videoPlayerEnded"
- binderror="videPlayerError">
+ binderror="videPlayerError" show-fullscreen-btn="{{false}}" object-fit="cover">
@@ -42,7 +42,7 @@
src="{{videoInfo.video_url}}" version="1" enable-progress-gesture="{{true}}"
autoplay="{{ videoPlayerCurrent == index}}" id="{{item.id}}"
enable-dark-water-mark="{{true}}" bindended="videoPlayerEnded"
- binderror="videError">
+ binderror="videError" show-fullscreen-btn="{{false}}">
@@ -108,7 +108,7 @@
{{videoInfo.isCount}}
-
+
@@ -183,52 +183,57 @@
-
-
\ No newline at end of file
diff --git a/pages/videoDetail/videoDetail.ttss b/pages/videoDetail/videoDetail.ttss
index 2346b2a..12e8dbf 100644
--- a/pages/videoDetail/videoDetail.ttss
+++ b/pages/videoDetail/videoDetail.ttss
@@ -1,5 +1,9 @@
/* e:\project\dy_video_all\初晴剧场\pages\videoDetail\videoDetail.ttss */
+page {
+ overflow: hidden;
+}
+
._vv_detail_html {
width: 100%;
height: 100vh;
@@ -232,6 +236,16 @@
transition: transform 0.5s;
}
+._vv_det_anthology_mask {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: rgba(0, 0, 0, 0.45);
+ z-index: 9998;
+}
+
._vv_det_anthology_dialog.ac_dis_blo {
transform: translateY(0);
transition: transform 0.5s;
diff --git a/static/tab/recommend_selected.png b/static/tab/recommend_selected.png
index e1eb309..5a18ea7 100644
Binary files a/static/tab/recommend_selected.png and b/static/tab/recommend_selected.png differ