diff --git a/app.json b/app.json index e2ea4bd..f7fcbde 100644 --- a/app.json +++ b/app.json @@ -9,7 +9,8 @@ "pages/subscribe/subscribe", "pages/consumption/consumption", "pages/rechargeRecord/rechargeRecord", - "pages/videoDetail/videoDetail" + "pages/videoDetail/videoDetail", + "pages/pay/pay" ], "window": { "backgroundTextStyle": "light", diff --git a/app.ts b/app.ts index 4778f28..88b8ad8 100644 --- a/app.ts +++ b/app.ts @@ -2,9 +2,30 @@ import { httpRequest } from "./utils/httpReques" App({ data: { - httpRequest + httpRequest, + equipmentInfo: {} }, - onLaunch: function () { - + globalData: { + loginPromise: null + }, + onLaunch() { + const loginPromise: any = new Promise((resolve: any) => { + tt.login({ + force: false, + success: async (loginRes) => { + const params = { + code: loginRes.code || '', + anonymousCode: loginRes.anonymousCode || '', + isLogin: loginRes.isLogin ? 1 : 2 + } + const res: any = await httpRequest('/reg', 'post', params); + if (res.status == 1) { + tt.setStorageSync('uid', res.data.uid); + } + resolve() + } + }); + }) + this.globalData.loginPromise = loginPromise; } }) diff --git a/pages/consumption/consumption.json b/pages/consumption/consumption.json index 3928faa..2d8b369 100644 --- a/pages/consumption/consumption.json +++ b/pages/consumption/consumption.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "navigationBarTitleText": "消费记录" } \ No newline at end of file diff --git a/pages/consumption/consumption.ts b/pages/consumption/consumption.ts index 39a1e9e..c76dad5 100644 --- a/pages/consumption/consumption.ts +++ b/pages/consumption/consumption.ts @@ -1,9 +1,32 @@ // e:\project\dy_video_all\初晴剧场\pages\consumption\consumption.ts +import { httpRequest } from "../../utils/httpReques"; Page({ data: { + moneyLogList: [], + moneyFlag: false + }, + onLoad(options) { }, - onLoad: function (options) { - - } + onShow() { + httpRequest('/moneylog', 'POST').then((res: any) => { + console.log(res, "moneylogmoneylog") + if (res.status == 1 && Array.isArray(res.data)) { + this.setData({ + moneyFlag: true, + moneyLogList: res.data, + }) + } else { + this.setData({ + moneyFlag: true, + }) + } + }) + }, + toPathVideo(ev: any) { + const sid = ev.currentTarget.dataset.sid; + tt.navigateTo({ + url: `/pages/videoDetail/videoDetail?sid=${sid}`, + }); + }, }) \ No newline at end of file diff --git a/pages/consumption/consumption.ttml b/pages/consumption/consumption.ttml index 95ef7cd..c895e85 100644 --- a/pages/consumption/consumption.ttml +++ b/pages/consumption/consumption.ttml @@ -1,9 +1,9 @@ - + - - + + { + const params = { + total: 10 + } + const indexRes: any = await httpRequest('/index', 'POST'); + const getNewModuleRes: any = await httpRequest('/getNewModule', 'POST', { page }); + const chasingdramaRes: any = await httpRequest('/Chasingdrama', 'POST', params); + let carouselChart = []; + let boutique = []; + let optimalSelection = []; + let classical = []; + let bookcase = []; + let newModule = [] + tt.hideLoading({}); + if (indexRes.status == 1) { + const data = indexRes.data; + carouselChart = data?.ads; + boutique = data?.module1; + optimalSelection = data?.module3; + classical = data?.module4; + } + if (chasingdramaRes.status == 1) { + bookcase = chasingdramaRes?.data?.bookcase + } + + if (getNewModuleRes.status == 1) { + newModule = getNewModuleRes.data.module + } + + this.setData({ + carouselChart, + boutique, + optimalSelection, + classical, + bookcase, + newModule + }) + }) + }, + + handelCount(count: any) { + if (count > 999) { + const isCount: any = (count / 100000).toFixed(2); + const ik = parseFloat(isCount) * 100 + return `${ik}k`; + } + return count; + }, + getNewModuleFn(page: any) { + const params = { + page: page + } + httpRequest('/getNewModule', 'POST', params).then((res: any) => { + if (res.status == 1 && Array.isArray(res?.data?.module)) { + const dataModule = res?.data?.module; + const ms = dataModule.map((m: any) => { + return { + ...m, + count: this.handelCount(m.count) + } + }) + if (page == 1) { + this.setData({ + newModule: ms, + page: page + }) + } else { + const newModule: any = this.data.newModule; + + const ls: any = [...newModule, ...ms] + this.setData({ + newModule: ls, + page: page + }) + } + } + }) }, handelSwiperChange(ev: any) { - console.log(ev, "[[[[[[[[") const current = ev.detail.current; this.setData({ swiperCurrent: current @@ -17,5 +111,76 @@ Page({ tt.navigateTo({ url: `/pages/search/search`, }); + }, + toPathVideo(ev: any) { + const sid = ev.currentTarget.dataset.sid; + tt.navigateTo({ + url: `/pages/videoDetail/videoDetail?sid=${sid}`, + }); + }, + onReachBottom() { + const page = this.data.page; + this.getNewModuleFn(page + 1); + }, + + handelKeepFn(sid: any, bok: any) { + let newModule: any = this.data.newModule; + const idx = newModule.findIndex((m: any) => m.id == sid) + newModule[idx].bookcase = bok + this.setData({ + newModule: newModule + }) + }, + chasingdramadel(ev: any) { + const sid = ev.currentTarget.dataset.sid; + this.myModal?.show?.(); + this.setData({ + bookId: sid + }) + }, + addkeep(ev: any) { + const sid = ev.currentTarget.dataset.sid; + const params = { + sid: sid + } + httpRequest('/addkeep', 'POST', params).then((res: any) => { + if (res.status == 1) { + this.handelKeepFn(sid, 1); + tt.showToast({ + title: '订阅成功', + icon: 'none' + }); + } + }) + }, + myModalRef(ref: any) { + this.myModal = ref + }, + handelMyModal(ev: any) { + const sid = ev.currentTarget.dataset.sid; + this.myModal?.show?.(); + this.setData({ + bookId: sid + }) + }, + modalConfirm() { + const bookId = this.data.bookId; + const params = { + ids: bookId + } + httpRequest('/chasingdramadel', 'POST', params).then((res: any) => { + if (res.status == 1) { + this.handelKeepFn(bookId, 0); + tt.showToast({ + title: '取消成功', + icon: 'none' + }); + } + }) + }, + toPathSubScribe() { + tt.navigateTo({ + url: `/pages/subscribe/subscribe`, + }); } }) \ No newline at end of file diff --git a/pages/home/home.ttml b/pages/home/home.ttml index 7ad2d4e..a3cb158 100644 --- a/pages/home/home.ttml +++ b/pages/home/home.ttml @@ -6,13 +6,12 @@ - - - - + bindchange="handelSwiperChange" autoplay="{{true}}" interval="{{2000}}"> + + + + 播放 @@ -28,48 +27,47 @@ - 模块一 + 精品短剧 - - - - + + + + - + - 模块二 - 更多 + 订阅专享 + 更多 - - - - + + + + - + - + + + 已订阅 - 第一 + 第{{index + 1}} @@ -78,18 +76,16 @@ - 模块三 + 优选好剧 - - - + + + - - + + - 这是可以变的剧名这是可以变的剧名 + {{item.name}} @@ -112,18 +108,16 @@ - 模块四 + 经典短剧 - - - + + + - - + + - 这是一个可以变的剧名这是一个可以变的剧名 + {{item.name}} - 这是描述描述描述描述 + {{item.description}} @@ -151,38 +145,35 @@ - 模块五 + 最新好剧 - - - - + + + + - 200k + {{item.count}} - 这是一个可以变化的剧名这是一个可以变化的剧名 + {{item.name}} - - 这是描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述 + + {{item.description}} - - + + 订阅 @@ -190,7 +181,8 @@ - + 已订阅 @@ -203,6 +195,17 @@ + + + + + + 加载中... + + + + \ No newline at end of file diff --git a/pages/home/home.ttss b/pages/home/home.ttss index 467de64..25e1c52 100644 --- a/pages/home/home.ttss +++ b/pages/home/home.ttss @@ -258,6 +258,11 @@ page { height: 40rpx; border-radius: 20rpx; background: linear-gradient(90deg, #5BBE04 0%, #04BE55 100%); + cursor: pointer; +} + +._mo_2_scr__b_subscribe._with_bg_color { + background: rgba(255, 255, 255, 0.10) } ._mo_2_scr__b_su_text { @@ -266,6 +271,10 @@ page { color: #fff; } +._with_bg_color ._mo_2_scr__b_su_text { + color: #999; +} + ._mo_3_header { padding: 28rpx 32rpx 36rpx; } @@ -478,9 +487,9 @@ page { margin-bottom: 32rpx; } -._mo_5_con_li_item:last-child { +/* ._mo_5_con_li_item:last-child { margin-bottom: 0; -} +} */ ._mo_5_con_li_it_left { position: relative; @@ -628,4 +637,20 @@ page { ._mo_5_con_li_it_ri_btn_wa_no_text { font-size: 20rpx; color: #999999; +} + +._mo_5_loadong { + display: flex; + justify-content: center; + align-items: center; +} + +._mo_5_load_name { + display: flex; + line-height: 1; +} + +._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/leaderboard/leaderboard.json b/pages/leaderboard/leaderboard.json index 3928faa..774fef8 100644 --- a/pages/leaderboard/leaderboard.json +++ b/pages/leaderboard/leaderboard.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "navigationBarTitleText": "排行榜" } \ No newline at end of file diff --git a/pages/leaderboard/leaderboard.ts b/pages/leaderboard/leaderboard.ts index a849391..571f328 100644 --- a/pages/leaderboard/leaderboard.ts +++ b/pages/leaderboard/leaderboard.ts @@ -1,9 +1,26 @@ // e:\project\dy_video_all\初晴剧场\pages\leaderboard\leaderboard.ts +import { httpRequest } from "../../utils/httpReques"; Page({ data: { - + module2: [] }, onLoad: function (options) { - } + }, + onShow() { + httpRequest('/top', 'POST', { lm: 1 }).then((res: any) => { + console.log(res, "[ohdsfkjshgdfkjsdkjfhs") + if (res.status == 1 && Array.isArray(res?.data?.module2)) { + this.setData({ + module2: res?.data?.module2 + }) + } + }) + }, + toPathVideo(ev: any) { + const sid = ev.currentTarget.dataset.sid; + tt.navigateTo({ + url: `/pages/videoDetail/videoDetail?sid=${sid}`, + }); + }, }) \ No newline at end of file diff --git a/pages/leaderboard/leaderboard.ttml b/pages/leaderboard/leaderboard.ttml index 20c4e18..30d9c8c 100644 --- a/pages/leaderboard/leaderboard.ttml +++ b/pages/leaderboard/leaderboard.ttml @@ -19,8 +19,8 @@ - - + + - 这是一个可以72变的剧名 + {{item.name}} - 20K + {{item.rand}} - 描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述 + {{item.description}} - + 立即观看 diff --git a/pages/my/my.json b/pages/my/my.json index 0a1d6b4..6a6d9c3 100644 --- a/pages/my/my.json +++ b/pages/my/my.json @@ -1,5 +1,6 @@ { "usingComponents": { "my-modal": "/components/myModal/myModal" - } + }, + "navigationBarTitleText": "我的" } \ No newline at end of file diff --git a/pages/my/my.ts b/pages/my/my.ts index 9759932..06e68bc 100644 --- a/pages/my/my.ts +++ b/pages/my/my.ts @@ -1,9 +1,39 @@ // e:\project\dy_video_all\初晴剧场\pages\my\my.ts +import { httpRequest } from "../../utils/httpReques"; + Page({ myModal: null as any, data: { + userInfo: {}, + platform: '', + historyList: [] }, - onLoad: function (options) { + onLoad() { + tt.getSystemInfo({ + success: (res: any) => { + this.setData({ + platform: res.platform + }) + } + }) + }, + onShow() { + httpRequest('/user', 'POST').then((res: any) => { + if (res.status == 1) { + this.setData({ + userInfo: res.data.info, + }) + } + }) + httpRequest('/history', 'POST').then((res: any) => { + console.log(res, "history") + if (res.status == 1 && Array.isArray(res.data)) { + this.setData({ + historyList: res.data, + }) + } + }) + }, handelTipsGold() { @@ -11,5 +41,31 @@ Page({ }, myModalRef(ref: any) { this.myModal = ref + }, + toPathVideo(ev: any) { + const sid = ev.currentTarget.dataset.sid; + tt.navigateTo({ + url: `/pages/videoDetail/videoDetail?sid=${sid}`, + }); + }, + toPathRechargeRecord() { + tt.navigateTo({ + url: `/pages/rechargeRecord/rechargeRecord`, + }); + }, + toPathPay() { + tt.navigateTo({ + url: `/pages/pay/pay`, + }); + }, + toPathSubScribe() { + tt.navigateTo({ + url: `/pages/subscribe/subscribe`, + }); + }, + toPathConsumption() { + tt.navigateTo({ + url: `/pages/consumption/consumption`, + }); } }) \ No newline at end of file diff --git a/pages/my/my.ttml b/pages/my/my.ttml index c6c0634..9de93fa 100644 --- a/pages/my/my.ttml +++ b/pages/my/my.ttml @@ -8,7 +8,7 @@ - + 购买记录 @@ -16,10 +16,15 @@ - 用户的名字 + + {{userInfo.nickname}} + + + 用户{{userInfo.uid}} + - ID:123456789 + ID:{{userInfo.uid}} @@ -37,12 +42,21 @@ VIP - - 您还没有激活VIP - - - 立即充值 - + + + 距离VIP到期时间还剩下{{ userInfo.vip_enddate }}天 + + + + + 您还没有激活VIP + + + + + 立即充值 + + @@ -56,7 +70,7 @@ - 99999 + {{userInfo.egold || 0}} @@ -75,7 +89,7 @@ - 99999 + {{userInfo.zb || 0}} @@ -83,26 +97,25 @@ - + 观看历史 - + - - + + - + - 这是一个可以变哈哈哈哈哈哈 + {{item.name}} @@ -112,7 +125,7 @@ - + @@ -127,7 +140,7 @@ - + @@ -142,21 +155,23 @@ - - - - + diff --git a/pages/my/my.ttss b/pages/my/my.ttss index 4079bae..bfeacda 100644 --- a/pages/my/my.ttss +++ b/pages/my/my.ttss @@ -394,4 +394,13 @@ page { ._my_ste_5_co_it_ri_arrow { width: 12rpx; height: 24rpx; +} + +._my_ste_5_co_ke_fu { + background-color: transparent; + padding: 0; +} + +._my_ste_5_co_ke_fu::after { + content: none; } \ No newline at end of file diff --git a/pages/pay/pay.json b/pages/pay/pay.json new file mode 100644 index 0000000..3928faa --- /dev/null +++ b/pages/pay/pay.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/pay/pay.ts b/pages/pay/pay.ts new file mode 100644 index 0000000..d8a5dc5 --- /dev/null +++ b/pages/pay/pay.ts @@ -0,0 +1,113 @@ +// e:\project\dy_video_all\dy_iaa_new_project\pages\pay\pay.ts +import { httpRequest } from "../../utils/httpReques"; +Page({ + data: { + currentPrice: 0, + userInfo: {}, + payList: [], + platform: '', + otherInfo: {}, + iosIm: '' + }, + onLoad(options) { + tt.getSystemInfo({ + success: (res: any) => { + this.setData({ + platform: res.platform, + otherInfo: options + }) + } + }) + }, + onShow() { + httpRequest('/user', 'POST').then((res: any) => { + if (res.status == 1) { + this.setData({ + userInfo: res.data.info, + }) + } + }) + httpRequest('/paysetting', 'POST').then((res: any) => { + console.log(res, "---------") + if (res.status == 1) { + this.setData({ + payList: res.data.list, + iosIm: res.iosIm + }) + } + }) + }, + handelSelectPrice(ev: any) { + const idx = ev.currentTarget.dataset.idx; + this.setData({ + currentPrice: idx + }) + }, + handelRechargeNow() { + const platform = this.data.platform; + const payList = this.data.payList; + const currentPrice = this.data.currentPrice; + const payItemInfo: any = payList[currentPrice]; + const otherInfo: any = this.data.otherInfo; + const iosIm = this.data.iosIm; + const launchsite = tt.getStorageSync('launchsite') || 1; + if (platform == 'ios') { + tt.showToast({ + title: '暂不支持ios支付', + icon: 'none', + duration: 2000 + }); + } else { + console.log(payItemInfo, "payItemInfo") + if (tt.canIUse('getOrderPayment') && tt.canIUse('requestOrder')) { + const params = { + id: payItemInfo.id, + isback: payItemInfo?.isback == 1 ? 1 : 0, + launchsite, + sid: otherInfo.sid || '', + jid: otherInfo.id || '' + } + httpRequest('/Newplaceanorder', 'POST', params).then((res: any) => { + console.log(res, "paramsparams") + if (res.status == 1) { + tt.requestOrder({ + data: res.data.data, + byteAuthorization: res.data.byteAuthorization, + payScene: platform === 'ios' ? 'IM' : '', + success: (su: any) => { + console.log(su, "susu"); + tt.showLoading({ + title: '拉起支付中...' + }) + tt.getOrderPayment({ + orderId: su.orderId, + imId: platform === 'ios' ? iosIm : '', + success: (payRes: any) => { + tt.hideLoading({}); + if (platform != 'ios') { + tt.showToast({ + title: '支付成功', + duration: 2000 + }); + } + }, + fail: (payError: any) => { + console.log(payError); + tt.hideLoading({}); + }, + complete: (complete: any) => { + console.log(complete); + }, + }) + }, + fail: (failError: any) => { + console.log(failError); + } + }) + } + + }) + } + } + } +}) \ No newline at end of file diff --git a/pages/pay/pay.ttml b/pages/pay/pay.ttml new file mode 100644 index 0000000..81f9fb2 --- /dev/null +++ b/pages/pay/pay.ttml @@ -0,0 +1,134 @@ + + + + + + + + 购买记录 + + + + + + + + + + {{userInfo.nickname}} + + + 用户{{userInfo.uid}} + + + + + + + + + + + + + ID: {{userInfo.uid}} + + + + + + + + + + + + + + VIP到期还有: + + + {{userInfo.vip_enddate}} 天 + + + + + 您还没有激活VlP + + + + + + + + + + + + + {{item.poster}} + + + + + {{item.price}} + + + + + + + + + + + + + + + + + 观看中无广告 + + + + + + + + + + + + + 享受全部资源 + + + + + + + + + + + + + 跟多特权 + + + + + + + + + + + + 立即购买 + + + + + \ No newline at end of file diff --git a/pages/pay/pay.ttss b/pages/pay/pay.ttss new file mode 100644 index 0000000..9e5a9df --- /dev/null +++ b/pages/pay/pay.ttss @@ -0,0 +1,332 @@ +/* e:\project\dy_video_all\dy_iaa_new_project\pages\pay\pay.ttss */ + +._pay_html { + position: relative; + padding-bottom: 196rpx; +} + +._pay_top_bg { + position: absolute; + top: -46rpx; + left: 0; + width: 100%; + height: 440rpx; + z-index: 1; +} + +._pay_body { + position: relative; + top: 0; + left: 0; + z-index: 2; +} + +._pay_b_buy { + display: flex; + justify-content: flex-end; + padding: 42rpx 32rpx; +} + +._pay_b_bu_btn { + display: flex; + justify-content: center; + align-items: center; + /* width: 208rpx; */ + height: 50rpx; + padding: 0 32rpx; + background-color: #000000; + border-radius: 50rpx; +} + +._pay_b_bu_bt_text { + font-size: 20rpx; + color: #fff; +} + +._pay_b_user { + width: 100%; + padding: 0 32rpx; +} + +._pay_b_us_info { + display: flex; + justify-content: space-between; + width: 100%; + height: 152rpx; +} + +._pay_b_us_in_right { + width: 152rpx; + height: 152rpx; + border-radius: 50%; + margin-left: 20rpx; +} + +._pay_b_us_in_left { + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; +} + +._pay_b_us_in_le_name { + display: flex; + max-width: 70%; + line-height: 1; +} + +._pay_b_us_in_le_na_text { + display: inline-block; + width: 100%; + font-size: 44rpx; + color: #fff; + font-weight: 600; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +._pay_b_us_in_le_id { + display: flex; + line-height: 1; + margin-top: 30rpx; +} + +._pay_b_us_in_le_id_text { + font-size: 24rpx; + color: #fff; +} + +._pay_b_us_in_le_warp { + display: flex; +} + +._pay_b_us_in_le_vip_icon { + width: 44rpx; + height: 36rpx; +} + +._pay_b_vip_timer { + width: 100%; + padding: 0 32rpx; + margin-top: 34rpx; +} + +._pay_b_v_ti_box { + display: flex; + flex-direction: column; + justify-content: center; + width: 100%; + height: 158rpx; + background-color: #080B16; + border-radius: 16rpx; + border: 2rpx solid #FFE8C3; + padding: 0 28rpx; +} + +._pay_b_v_ti_b_warp { + display: flex; + width: 100%; +} + +._pay_b_v_ti_b_w_tips { + display: flex; + line-height: 1; +} + +._pay_b_v_ti_b_w_t_text { + font-size: 28rpx; + color: #999999; +} + +._pay_b_v_ti_b_w_timer { + display: flex; + line-height: 1; +} + +._pay_b_v_ti_b_w_ti_text { + font-size: 28rpx; + color: #fff; +} + +._pay_b_top_up { + width: 100%; + padding-left: 32rpx; + padding-right: 16rpx; + margin-top: 60rpx; +} + +._pay_b_to_u_box { + display: flex; + flex-wrap: wrap; +} + +._pay_b_to_u_b_item { + width: 33.33%; + height: 256rpx; + padding-right: 16rpx; + margin-bottom: 22rpx; +} + +._pay_b_to_u_b_it_content { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + background-color: #272A30; + border-radius: 16rpx 40rpx 16rpx 16rpx; + border: 4rpx solid transparent; + overflow: hidden; +} + +._pay_b_to_u_b_it_con_day { + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 56rpx; +} + +._pay_b_to_u_b_it_con_da_text { + line-height: 1; + font-size: 28rpx; + color: #999999; +} + +._pay_b_to_u_b_it_con_price { + flex: 1; + display: flex; + justify-content: center; + align-items: center; + line-height: 1 +} + +._pay_b_to_u_b_it_con_pr_warp { + display: flex; + align-items: flex-end; +} + +._pay_b_to_u_b_it_con_pr_symbol { + font-size: 28rpx; + color: #999999; +} + +._pay_b_to_u_b_it_con_pr_num { + font-size: 48rpx; + color: #999999; + font-weight: 600; +} + +._pay_b_to_u_b_it_content._acv_bg_it { + border-color: #5BBE04; + background-color: rgba(91, 190, 4, 0.20); +} + +._acv_bg_it ._pay_b_to_u_b_it_con_day { + background: linear-gradient(180deg, #5BBE04 0%, #04BE55 100%); +} + +._acv_bg_it ._pay_b_to_u_b_it_con_da_text { + color: #080B16; +} + +._acv_bg_it ._pay_b_to_u_b_it_con_pr_symbol { + color: #5BBE04; +} + +._acv_bg_it ._pay_b_to_u_b_it_con_pr_num { + color: #5BBE04; +} + +._pay_b_privilege { + width: 100%; + padding-left: 32rpx; + padding-right: 16rpx; + margin-top: 80rpx; +} + +._pay_b_pri_list { + display: flex; + flex-wrap: wrap; +} + +._pay_b_pri_li_item { + width: 33.33%; + height: 220rpx; + padding-right: 16rpx; +} + +._pay_b_pri_li_it_box { + position: relative; + width: 100%; + height: 100%; + /* overflow: hidden; */ +} + +._pay_b_pri_li_it_b_icon { + position: absolute; + top: -20rpx; + left: 50%; + width: 88rpx; + height: 88rpx; + border-radius: 50%; + transform: translateX(-50%); +} + +._pay_b_pri_li_it_b_description { + display: flex; + justify-content: center; + padding-top: 102rpx; +} + +._pay_b_pri_li_it_b_des_text { + font-size: 24rpx; + color: #fff; +} + +._pay_b_pri_li_it_b_bg_color { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + z-index: -1; + overflow: hidden; +} + +._pay_b_pri_li_it_b_bg_co_warp { + position: absolute; + top: 16rpx; + left: -2rpx; + width: 105%; + height: 100%; + background: linear-gradient(180deg, #272A30 0%, rgba(39, 42, 48, 0) 100%); + border-radius: 56rpx 46rpx 0 0; + transform: rotate(-6deg); +} + +._pay_b_footer { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + padding: 32rpx 32rpx 60rpx; + background-color: #080B16; +} + +._pay_b_foo_bug_btn { + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 84rpx; + border-radius: 84rpx; + background: linear-gradient(90deg, #5BBE04 0%, #04BE55 100%); + z-index: 2; +} + +._pay_b_foo_bug_bt_text { + font-size: 28rpx; + color: #fff; +} \ No newline at end of file diff --git a/pages/rechargeRecord/rechargeRecord.json b/pages/rechargeRecord/rechargeRecord.json index 3928faa..0205b63 100644 --- a/pages/rechargeRecord/rechargeRecord.json +++ b/pages/rechargeRecord/rechargeRecord.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "navigationBarTitleText": "购买记录" } \ No newline at end of file diff --git a/pages/rechargeRecord/rechargeRecord.ts b/pages/rechargeRecord/rechargeRecord.ts index 1b2ac71..3dbeb3b 100644 --- a/pages/rechargeRecord/rechargeRecord.ts +++ b/pages/rechargeRecord/rechargeRecord.ts @@ -1,16 +1,35 @@ // e:\project\dy_video_all\初晴剧场\pages\rechargeRecord\rechargeRecord.ts +import { httpRequest } from "../../utils/httpReques"; Page({ data: { - tabIndex: 1 + tabIndex: 1, + recordList: [], + recordFlag: false }, - onLoad: function (options) { + onLoad() { + }, + onShow() { + this.getRechargerecord() + }, + getRechargerecord() { + httpRequest('/rechargerecord', 'POST').then((res: any) => { + if (res.status == 1 && Array.isArray(res.data)) { + this.setData({ + recordList: res.data, + recordFlag: true + }) + } + }) }, handelTabCh(ev: any) { - console.log(ev, "kkkkkkkkkkkkkkkk") const idx = ev.currentTarget.dataset.idx; + if (idx == 1) { + this.getRechargerecord(); + } this.setData({ tabIndex: idx }) - } + }, + }) \ No newline at end of file diff --git a/pages/rechargeRecord/rechargeRecord.ttml b/pages/rechargeRecord/rechargeRecord.ttml index d90fc7a..a061dec 100644 --- a/pages/rechargeRecord/rechargeRecord.ttml +++ b/pages/rechargeRecord/rechargeRecord.ttml @@ -2,49 +2,51 @@ - 购买K币 + 购买VIP - 购买VIP + 购买K币 - - - - - - 2024-05-17 - - - - - - - 购买购买 - - - 2024-05-17 55555555 - + + + + + + + 2024-05-17 - - - VIP + + + + + + 购买购买 + + + 2024-05-17 55555555 + - - +3天 + + + VIP + + + +3天 + - - + + diff --git a/pages/recommend/components/mVideo/mVideo.json b/pages/recommend/components/mVideo/mVideo.json deleted file mode 100644 index e8cfaaf..0000000 --- a/pages/recommend/components/mVideo/mVideo.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/recommend/components/mVideo/mVideo.ts b/pages/recommend/components/mVideo/mVideo.ts deleted file mode 100644 index 2d90f1c..0000000 --- a/pages/recommend/components/mVideo/mVideo.ts +++ /dev/null @@ -1,12 +0,0 @@ -// e:\project\dy_video_all\初晴剧场\pages\recommend\components\mVideo\mVideo.ts -Component({ - data: { - - }, - properties: { - - }, - methods: { - - } -}) \ No newline at end of file diff --git a/pages/recommend/components/mVideo/mVideo.ttml b/pages/recommend/components/mVideo/mVideo.ttml deleted file mode 100644 index 811832f..0000000 --- a/pages/recommend/components/mVideo/mVideo.ttml +++ /dev/null @@ -1,2 +0,0 @@ - -e:\project\dy_video_all\初晴剧场\pages\recommend\components\mVideo\mVideo.ttml \ No newline at end of file diff --git a/pages/recommend/components/mVideo/mVideo.ttss b/pages/recommend/components/mVideo/mVideo.ttss deleted file mode 100644 index 1bb3ce8..0000000 --- a/pages/recommend/components/mVideo/mVideo.ttss +++ /dev/null @@ -1 +0,0 @@ -/* e:\project\dy_video_all\初晴剧场\pages\recommend\components\mVideo\mVideo.ttss */ \ No newline at end of file diff --git a/pages/recommend/components/mVideoPlayer/mVideoPlayer.json b/pages/recommend/components/mVideoPlayer/mVideoPlayer.json deleted file mode 100644 index ba565cc..0000000 --- a/pages/recommend/components/mVideoPlayer/mVideoPlayer.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "video-player": "ext://industry/video-player" - } -} \ No newline at end of file diff --git a/pages/recommend/components/mVideoPlayer/mVideoPlayer.ts b/pages/recommend/components/mVideoPlayer/mVideoPlayer.ts deleted file mode 100644 index 27966ab..0000000 --- a/pages/recommend/components/mVideoPlayer/mVideoPlayer.ts +++ /dev/null @@ -1,47 +0,0 @@ -// e:\project\dy_video_all\初晴剧场\pages\recommend\components\mVideoPlayer\mVideoPlayer.ts -import { httpRequest } from "../../../../utils/httpReques" - -Component({ - data: { - videoInfo: {}, - videoList: [], - batchList: [] - }, - properties: { - videoCanIUse: { - type: Boolean, - value: false - } - }, - methods: { - inShow() { - this.initFn() - }, - async initFn() { - const params = { - "uid": 127457025, - "platform": "devtools", - "is_b": 2, - "sid": "2" - } - - const videoreadRes: any = await httpRequest('/videoread', 'POST', params); - let videoInfo: any = {} - if (videoreadRes.status == 1 && Array.isArray(videoreadRes.data)) { - videoInfo = videoreadRes.data[0]; - } - - const batchlistRes: any = await httpRequest('/batchlist', 'POST', params); - let batchList: any = []; - if (batchlistRes.status == 1 && Array.isArray(batchlistRes.data)) { - batchList = batchlistRes.data; - } - - this.setData({ - batchList, - videoInfo - }) - - } - } -}) \ No newline at end of file diff --git a/pages/recommend/components/mVideoPlayer/mVideoPlayer.ttml b/pages/recommend/components/mVideoPlayer/mVideoPlayer.ttml deleted file mode 100644 index c13b37f..0000000 --- a/pages/recommend/components/mVideoPlayer/mVideoPlayer.ttml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/pages/recommend/components/mVideoPlayer/mVideoPlayer.ttss b/pages/recommend/components/mVideoPlayer/mVideoPlayer.ttss deleted file mode 100644 index 9cd41f3..0000000 --- a/pages/recommend/components/mVideoPlayer/mVideoPlayer.ttss +++ /dev/null @@ -1,2 +0,0 @@ -/* e:\project\dy_video_all\初晴剧场\pages\recommend\components\mVideoPlayer\mVideoPlayer.ttss */ - diff --git a/pages/recommend/recommend.json b/pages/recommend/recommend.json index cf43d88..b629a88 100644 --- a/pages/recommend/recommend.json +++ b/pages/recommend/recommend.json @@ -1,5 +1,6 @@ { "usingComponents": { "video-player": "ext://industry/video-player" - } + }, + "navigationBarTitleText": "剧场" } \ No newline at end of file diff --git a/pages/recommend/recommend.ts b/pages/recommend/recommend.ts index c505049..71c0fc0 100644 --- a/pages/recommend/recommend.ts +++ b/pages/recommend/recommend.ts @@ -9,39 +9,76 @@ Page({ batchList: [], videoPlayerCurrent: 0, videoPlayernum: 4, + videoErrorText: '', + page: 1 }, - onLoad: function (options: any) { + onLoad() { const videoCanIUse = tt.canIUse('video-player'); this.setData({ videoCanIUse, }) - this.initFn(); + }, - onShow() { }, - async initFn() { - const params = { - "uid": 127457025, - "platform": "devtools", - "is_b": 2, - "sid": "2" + onShow() { + const page = this.data.page; + this.initFn(page); + }, + handelCount(count: any) { + if (count > 999) { + const isCount: any = (count / 100000).toFixed(2); + const ik = parseFloat(isCount) * 100 + return `${ik}k`; } + return count; + }, + async initFn(page: any) { + // const params = { + // "uid": 127457025, + // "platform": "devtools", + // "is_b": 2, + // "sid": "2" + // } + // const videoreadRes: any = await httpRequest('/videoread', 'POST', params); + + const getNewModule2Res: any = await httpRequest('/getNewModule2', 'POST', { page }); + // console.log(getNewModule2) + // let videoInfo: any = {} + // if (videoreadRes.status == 1 && Array.isArray(videoreadRes.data)) { + // videoInfo = videoreadRes.data[0]; + // } + + // const batchlistRes: any = await httpRequest('/batchlist', 'POST', params); + // let batchList: any = []; + // if (batchlistRes.status == 1 && Array.isArray(batchlistRes.data)) { + // batchList = batchlistRes.data; + // } + console.log(getNewModule2Res, "getNewModule2Res") + if (getNewModule2Res.status == 1 && Array.isArray(getNewModule2Res.data.module)) { + const moduleList = getNewModule2Res.data.module; + const batchList = this.data.batchList; + const ls = moduleList.map((m: any) => { + return { + ...m, + count: this.handelCount(m.count) + } + }) + if (page == 1) { + this.setData({ + batchList: ls, + page + }) + } else { + this.setData({ + batchList: batchList.concat(ls), + page + }) + } - const videoreadRes: any = await httpRequest('/videoread', 'POST', params); - let videoInfo: any = {} - if (videoreadRes.status == 1 && Array.isArray(videoreadRes.data)) { - videoInfo = videoreadRes.data[0]; } - - const batchlistRes: any = await httpRequest('/batchlist', 'POST', params); - let batchList: any = []; - if (batchlistRes.status == 1 && Array.isArray(batchlistRes.data)) { - batchList = batchlistRes.data; - } - - this.setData({ - batchList, - videoInfo - }) + // this.setData({ + // batchList, + // videoInfo + // }) }, handelSeiperChange(ev: any) { @@ -62,17 +99,96 @@ Page({ }); this.setData({ - videoPlayerCurrent: current + videoPlayerCurrent: current, }) - + if (current + 5 >= batchList.length) { + const page = this.data.page; + this.initFn(page + 1) + } }, videoPlayerEnded() { console.log('videoPlayerEnded') const videoPlayerCurrent = this.data.videoPlayerCurrent; this.setData({ - videoPlayerCurrent: videoPlayerCurrent + 1 + videoPlayerCurrent: videoPlayerCurrent + 1, + videoErrorText: '' }) + }, - } + videError(ev: any) { + const errMsg = ev.detail.errMsg; + console.log(errMsg, "errMsgerrMsg") + let errMsgText = ''; + if (errMsg == 'Video is forbidden in playlet,please use video-player instead') { + errMsgText = '抱歉,当前抖音版本过低,请升级抖音' + } else { + errMsgText = errMsg; + } + this.setData({ + videoErrorText: errMsgText + }) + }, + + videPlayerError(ev: any) { + + const errMsg = ev.detail.errMsg; + let errMsgText = ''; + if (errMsg == 'Video is forbidden in playlet,please use video-player instead') { + errMsgText = '抱歉,当前抖音版本过低,请升级抖音' + } else { + errMsgText = errMsg; + } + this.setData({ + videoErrorText: errMsgText + }) + }, + + toPathVideoDetail() { + console.log("toPathVideoDetail") + tt.navigateTo({ + url: `/pages/videoDetail/videoDetail`, + }); + }, + handelCollection(ev: any) { + console.log(ev, "kkkkkkkkkkkk") + const id = ev.currentTarget.dataset.id; + let batchList: any = this.data.batchList; + const idx = batchList.findIndex((m: any) => m.id == id); + const bookcase = batchList[idx].bookcase; + batchList[idx].bookcase = bookcase == 1 ? 0 : 1; + if (bookcase) { + const params = { + ids: id + } + httpRequest('/chasingdramadel', 'POST', params).then((res: any) => { + if (res.status == 1) { + this.setData({ + batchList: batchList + }) + tt.showToast({ + title: '取消成功', + icon: 'none' + }); + } + }) + } else { + const params = { + sid: id + } + httpRequest('/addkeep', 'POST', params).then((res: any) => { + if (res.status == 1) { + this.setData({ + batchList: batchList + }) + tt.showToast({ + title: '收藏成功', + icon: 'none' + }); + } + }) + + } + + }, }) \ No newline at end of file diff --git a/pages/recommend/recommend.ttml b/pages/recommend/recommend.ttml index 11c545f..8da48be 100644 --- a/pages/recommend/recommend.ttml +++ b/pages/recommend/recommend.ttml @@ -1,62 +1,118 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + {{videoErrorText}} + + + + + + - - - - + + 进入观看 + + + + + + + + - - - 66K - + + + {{item.count}} + + + + + + + + {{item.name}} - - - {{videoInfo.title}}{{videoPlayerCurrent}}{{index}}--{{item.id}} - - - 第{{videoInfo.order}}集 - 全剧{{100}}集 - - - 描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述 - + + 第{{item.videoinfo.order}}集 + 全剧{{item.number}}集 + + + {{item.description}} - - - - - + + + + + + \ No newline at end of file diff --git a/pages/recommend/recommend.ttss b/pages/recommend/recommend.ttss index fde04c3..09190be 100644 --- a/pages/recommend/recommend.ttss +++ b/pages/recommend/recommend.ttss @@ -30,7 +30,7 @@ ._m_v_w_v_operate_l { position: absolute; right: 32rpx; - bottom: 154rpx; + bottom: 260rpx; z-index: 2; } @@ -78,7 +78,7 @@ ._m_v_ww_in_lll_num { display: flex; line-height: 1; - margin-top: 16rpx; + margin-top: 26rpx; } ._m_v_ww_in_l_n_current { @@ -115,4 +115,68 @@ /* 设置为想要的行数 */ overflow: hidden; text-overflow: ellipsis; +} + +._iii_video_content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: flex; + justify-content: center; + align-items: center; + z-index: 3; +} + +._iii_video_co_err_warp { + display: flex; + flex-direction: column; + align-items: center; +} + +._iii_vi_co_err { + display: flex; + margin-top: 80rpx; +} + +._iii_vi_co_err_text { + font-size: 28rpx; + color: rgba(255, 255, 255, 0.6); +} + +._iii_vi_co_e_img { + width: 166rpx; + height: 166rpx; +} + +._m_v_jw_v_to_path { + position: absolute; + left: 50%; + bottom: 0; + display: flex; + justify-content: center; + align-items: center; + width: 200rpx; + height: 66rpx; + border-radius: 66rpx; + border: 0.5px solid var(--line-color-dark-const-line-inverse, rgba(255, 255, 255, 0.20)); + background: var(--bg-color-dark-bg-inverse-3, rgba(41, 41, 41, 0.34)); + z-index: 66; + transform: translate(-50%, -700%); +} + +._m_v_jw_v_to_p_text { + font-size: 24rpx; + color: rgba(255, 255, 255, 0.90); +} + +._m_vv_oper_l_share { + background-color: transparent; + border: none; + padding: 0; +} + +._m_vv_oper_l_share::after { + content: none; } \ No newline at end of file diff --git a/pages/search/search.json b/pages/search/search.json index 3928faa..5667d5c 100644 --- a/pages/search/search.json +++ b/pages/search/search.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "navigationBarTitleText": "搜索" } \ No newline at end of file diff --git a/pages/search/search.ts b/pages/search/search.ts index 4949568..cdedabe 100644 --- a/pages/search/search.ts +++ b/pages/search/search.ts @@ -1,16 +1,84 @@ // e:\project\dy_video_all\初晴剧场\pages\search\search.ts +import { httpRequest } from "../../utils/httpReques"; Page({ data: { - searchValue: '' + searchValue: '', + historySearchList: [], + searchList: [], + searchFlag: false }, onLoad: function (options) { + }, + onShow() { + const historySearchList = tt.getStorageSync('historySearchList') || []; + console.log(historySearchList, "historySearchList") + this.setData({ + historySearchList + }) }, handelSearchInput(ev: any) { - console.log(ev, "[[[[[[[[[[[") const val = ev.detail.value; this.setData({ - searchValue: val + searchValue: val, }) + }, + handelKeyword() { + const searchValue = this.data.searchValue; + const historySearchList: any = this.data.historySearchList; + if (!searchValue) { + tt.showToast({ + title: '搜索剧名不能为空', + }); + return; + } + tt.showLoading({ + title: '加载中...', + }); + httpRequest('/sididtidlaunchsite', 'POST', { tid: searchValue }).then((res: any) => { + if (res.status == 1) { + if (res.data.pageurl) { + tt.hideLoading({}); + tt.navigateTo({ + url: `/pages/videoDetail/videoDetail?${res.data.pageurl}`, + }); + } else { + if (historySearchList.length >= 10) { + historySearchList.pop(); + historySearchList.unshift(searchValue); + } else { + historySearchList.unshift(searchValue) + } + httpRequest('/find', 'POST', { keyword: searchValue }).then((reults: any) => { + tt.hideLoading({}); + if (reults.status == 1 && Array.isArray(reults.data)) { + tt.setStorageSync('historySearchList', historySearchList) + this.setData({ + historySearchList: historySearchList, + searchList: reults.data, + searchFlag: true + }) + } + }) + } + } + }) + }, + handelHistoryItem(ev: any) { + console.log(ev, "jjjjjjjjjjjjjj") + const item = ev.currentTarget.dataset.item; + this.setData({ + searchValue: item, + }) + this.handelKeyword() + }, + cleanHistory() { + tt.setStorageSync('historySearchList', []); + this.setData({ + historySearchList: [] + }) + tt.showToast({ + title: '清空搜索历史成功', + }); } }) \ No newline at end of file diff --git a/pages/search/search.ttml b/pages/search/search.ttml index 8f560f5..ca9fa87 100644 --- a/pages/search/search.ttml +++ b/pages/search/search.ttml @@ -7,57 +7,42 @@ - + 搜索 - + 搜索历史 - + - - 剧宝 - - - 剧宝 - - - 剧宝 - - - 剧宝 - - - 剧宝 - - - 剧宝 - + + + {{item}} + + - + - + - + - 这是一个可以变化的剧名神奇吗 + {{item.name}} @@ -66,7 +51,7 @@ - + diff --git a/pages/search/search.ttss b/pages/search/search.ttss index 9978bda..12cc476 100644 --- a/pages/search/search.ttss +++ b/pages/search/search.ttss @@ -127,6 +127,7 @@ page { ._search_con_vi_l_item { width: 50%; padding-right: 32rpx; + margin-bottom: 32rpx; } ._search_con_vi_l_i_warp { diff --git a/pages/subscribe/subscribe.json b/pages/subscribe/subscribe.json index 3928faa..54c6d4a 100644 --- a/pages/subscribe/subscribe.json +++ b/pages/subscribe/subscribe.json @@ -1,3 +1,6 @@ { - "usingComponents": {} + "usingComponents": { + "my-modal": "/components/myModal/myModal" + }, + "navigationBarTitleText": "订阅" } \ No newline at end of file diff --git a/pages/subscribe/subscribe.ts b/pages/subscribe/subscribe.ts index 5af4d36..56f1959 100644 --- a/pages/subscribe/subscribe.ts +++ b/pages/subscribe/subscribe.ts @@ -1,9 +1,73 @@ // e:\project\dy_video_all\初晴剧场\pages\subscribe\subscribe.ts +import { httpRequest } from "../../utils/httpReques"; Page({ + myModal: null as any, data: { - + bookcase: [], + bookcaseFlag: false, + bookId: '' + }, + onLoad() { + const params = { + total: 99999 + } + httpRequest('/Chasingdrama', 'POST', params).then((res: any) => { + if (res.status == 1 && Array.isArray(res?.data?.bookcase)) { + const bookcase = res?.data?.bookcase; + const ls: any = bookcase.map((m: any) => { + return { + ...m, + count: this.handelCount(m.count), + } + }) + this.setData({ + bookcase: ls, + bookcaseFlag: true + }) + } + }) + }, + toPathVideo(ev: any) { + const sid = ev.currentTarget.dataset.sid; + tt.navigateTo({ + url: `/pages/videoDetail/videoDetail?sid=${sid}`, + }); + }, + handelCount(count: any) { + if (count > 999) { + const isCount: any = (count / 100000).toFixed(2); + const ik = parseFloat(isCount) * 100 + return `${ik}k`; + } + return count; + }, + myModalRef(ref: any) { + this.myModal = ref + }, + handelMyModal(ev: any) { + const sid = ev.currentTarget.dataset.sid; + this.myModal?.show?.(); + this.setData({ + bookId: sid + }) + }, + modalConfirm() { + const bookId = this.data.bookId; + const bookcase = this.data.bookcase; + const params = { + ids: bookId + } + httpRequest('/chasingdramadel', 'POST', params).then((res: any) => { + if (res.status == 1) { + const ls: any = bookcase.filter((m: any) => m.id != bookId); + this.setData({ + bookcase: ls + }) + tt.showToast({ + title: '取消成功', + icon: 'none' + }); + } + }) }, - onLoad: function (options) { - - } }) \ No newline at end of file diff --git a/pages/subscribe/subscribe.ttml b/pages/subscribe/subscribe.ttml index 38c3cad..3abd14d 100644 --- a/pages/subscribe/subscribe.ttml +++ b/pages/subscribe/subscribe.ttml @@ -1,60 +1,71 @@ - - - - - - 第五 - - - - - - - - - - - - 200k - - + + + + + + + 第{{index + 1}} - - - - 这是一个可以变化的剧名这是一个可以变化的剧名 - - - 这是描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述 + + + + + + + + + + + {{item.count}} + - - - - 订阅 - - - + + + + {{item.name}} - - - + + {{item.description}} + + + + + 已订阅 - + + - + + + + + + + - - + + 暂时没有内容~ + + + + \ No newline at end of file diff --git a/pages/subscribe/subscribe.ttss b/pages/subscribe/subscribe.ttss index d7b1a0e..9e477c0 100644 --- a/pages/subscribe/subscribe.ttss +++ b/pages/subscribe/subscribe.ttss @@ -182,4 +182,26 @@ ._mo_5_con_li_it_ri_btn_wa_no_text { font-size: 20rpx; color: #999999; -} \ No newline at end of file +} + + +._search_con_empty { + display: flex; + flex-direction: column; + align-items: center; + padding-top: 308rpx; +} + +._search_c_e_img { + width: 438rpx; + height: 340rpx; +} + +._search_c_e_tips { + margin-top: 56rpx; +} + +._search_c_e_t_text { + font-size: 32rpx; + color: #fff; +} diff --git a/pages/theater/theater.ts b/pages/theater/theater.ts index 92ba473..9c5f8d7 100644 --- a/pages/theater/theater.ts +++ b/pages/theater/theater.ts @@ -1,11 +1,28 @@ // e:\project\dy_video_all\初晴剧场\pages\theater\theater.ts +import { httpRequest } from "../../utils/httpReques"; Page({ data: { swiperCurrent: 0, - sortIndex: 0 + categoryList: [], + categoryid: '', + module1: [], + module2: [] }, - onLoad: function (options) { + onLoad(options) { + }, + onShow() { + httpRequest('/top', 'POST').then((res: any) => { + console.log(res, "ppppppppp") + if (res.status == 1) { + this.setData({ + categoryList: res.data.category, + categoryid: res.data.categoryid, + module1: res.data.module1, + module2: res.data.module2 + }) + } + }) }, handelSwiperChange(ev: any) { const current = ev.detail.current; @@ -14,10 +31,20 @@ Page({ }) }, handelSortTap(ev: any) { - const idx = ev.currentTarget.dataset.index; - this.setData({ - sortIndex: idx - }) + const datasetcCtegoryid = ev.currentTarget.dataset.categoryid; + const categoryid = this.data.categoryid; + console.log(datasetcCtegoryid, categoryid) + if (categoryid != datasetcCtegoryid) { + httpRequest('/top', 'POST', { categoryid: datasetcCtegoryid }).then((res: any) => { + if (res.status == 1) { + this.setData({ + categoryid: datasetcCtegoryid, + module1: res.data.module1, + }) + } + }) + } + }, toPathTap() { tt.navigateTo({ @@ -28,5 +55,11 @@ Page({ tt.navigateTo({ url: `/pages/leaderboard/leaderboard`, }); - } + }, + toPathVideo(ev: any) { + const sid = ev.currentTarget.dataset.sid; + tt.navigateTo({ + url: `/pages/videoDetail/videoDetail?sid=${sid}`, + }); + }, }) \ No newline at end of file diff --git a/pages/theater/theater.ttml b/pages/theater/theater.ttml index 0455a6c..2f433f3 100644 --- a/pages/theater/theater.ttml +++ b/pages/theater/theater.ttml @@ -4,7 +4,7 @@ - + - 模块一 + 热剧排行榜 更多 - - - + + + - + @@ -58,7 +56,7 @@ - 这是可以变的剧名这是可以变的剧名 + {{item.name}} @@ -70,41 +68,52 @@ - - - {{index}} + + + {{item.title}} - - - - - - - - - 新剧 - - - - - 火热 - - - - - 这是可以变的剧名这是可以变的剧名 + + + + + + + + + + + 火热 + + + + + {{item.name}} + + + + + + + + - - + + 暂无数据~ + + + diff --git a/pages/theater/theater.ttss b/pages/theater/theater.ttss index 44a3fe0..68d76f3 100644 --- a/pages/theater/theater.ttss +++ b/pages/theater/theater.ttss @@ -80,9 +80,9 @@ page { padding-top: 10rpx; } -._theater_modul_one { +/* ._theater_modul_one { padding-top: 30rpx; -} +} */ ._theater_swi_ind_item { width: 16rpx; @@ -108,7 +108,7 @@ page { display: flex; flex-direction: row; justify-content: space-between; - padding: 30rpx 32rpx 36rpx; + padding: 0 32rpx 36rpx; } ._mo_one_hea_title { @@ -271,4 +271,25 @@ page { color: #fff; font-size: 24rpx; line-height: 1; +} + +._search_con_empty { + display: flex; + flex-direction: column; + align-items: center; + padding-top: 30rpx; +} + +._search_c_e_img { + width: 438rpx; + height: 340rpx; +} + +._search_c_e_tips { + margin-top: 56rpx; +} + +._search_c_e_t_text { + font-size: 32rpx; + color: #fff; } \ No newline at end of file diff --git a/pages/videoDetail/components/mVideo/mVideo.json b/pages/videoDetail/components/mVideo/mVideo.json deleted file mode 100644 index e8cfaaf..0000000 --- a/pages/videoDetail/components/mVideo/mVideo.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/videoDetail/components/mVideo/mVideo.ts b/pages/videoDetail/components/mVideo/mVideo.ts deleted file mode 100644 index 2d90f1c..0000000 --- a/pages/videoDetail/components/mVideo/mVideo.ts +++ /dev/null @@ -1,12 +0,0 @@ -// e:\project\dy_video_all\初晴剧场\pages\recommend\components\mVideo\mVideo.ts -Component({ - data: { - - }, - properties: { - - }, - methods: { - - } -}) \ No newline at end of file diff --git a/pages/videoDetail/components/mVideo/mVideo.ttml b/pages/videoDetail/components/mVideo/mVideo.ttml deleted file mode 100644 index 811832f..0000000 --- a/pages/videoDetail/components/mVideo/mVideo.ttml +++ /dev/null @@ -1,2 +0,0 @@ - -e:\project\dy_video_all\初晴剧场\pages\recommend\components\mVideo\mVideo.ttml \ No newline at end of file diff --git a/pages/videoDetail/components/mVideo/mVideo.ttss b/pages/videoDetail/components/mVideo/mVideo.ttss deleted file mode 100644 index 1bb3ce8..0000000 --- a/pages/videoDetail/components/mVideo/mVideo.ttss +++ /dev/null @@ -1 +0,0 @@ -/* e:\project\dy_video_all\初晴剧场\pages\recommend\components\mVideo\mVideo.ttss */ \ No newline at end of file diff --git a/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.json b/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.json deleted file mode 100644 index ba565cc..0000000 --- a/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "video-player": "ext://industry/video-player" - } -} \ No newline at end of file diff --git a/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.ts b/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.ts deleted file mode 100644 index c24a3cd..0000000 --- a/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.ts +++ /dev/null @@ -1,46 +0,0 @@ -// e:\project\dy_video_all\初晴剧场\pages\recommend\components\mVideoPlayer\mVideoPlayer.ts -const { httpRequest } = getApp()?.data; - -Component({ - data: { - videoInfo: {}, - videoList: [], - batchList: [] - }, - properties: { - videoCanIUse: { - type: Boolean, - value: false - } - }, - methods: { - inShow() { - this.initFn() - }, - async initFn() { - const params = { - "uid": 127457025, - "platform": "devtools", - "is_b": 2, - "sid": "2" - } - const videoreadRes = await httpRequest('/videoread', 'POST', params); - let videoInfo: any = {} - if (videoreadRes.status == 1 && Array.isArray(videoreadRes.data)) { - videoInfo = videoreadRes.data[0]; - } - - const batchlistRes = await httpRequest('/batchlist', 'POST', params); - let batchList: any = []; - if (batchlistRes.status == 1 && Array.isArray(batchlistRes.data)) { - batchList = batchlistRes.data; - } - - this.setData({ - videoInfo, - batchList - }) - - } - } -}) \ No newline at end of file diff --git a/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.ttml b/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.ttml deleted file mode 100644 index d7b2c7c..0000000 --- a/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.ttml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.ttss b/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.ttss deleted file mode 100644 index e1f650e..0000000 --- a/pages/videoDetail/components/mVideoPlayer/mVideoPlayer.ttss +++ /dev/null @@ -1,6 +0,0 @@ -/* e:\project\dy_video_all\初晴剧场\pages\recommend\components\mVideoPlayer\mVideoPlayer.ttss */ - -._m_vi_pl_swiper { - width: 100%; - height: 100%; -} \ No newline at end of file diff --git a/pages/videoDetail/videoDetail.json b/pages/videoDetail/videoDetail.json index 3928faa..cf43d88 100644 --- a/pages/videoDetail/videoDetail.json +++ b/pages/videoDetail/videoDetail.json @@ -1,3 +1,5 @@ { - "usingComponents": {} + "usingComponents": { + "video-player": "ext://industry/video-player" + } } \ No newline at end of file diff --git a/pages/videoDetail/videoDetail.ts b/pages/videoDetail/videoDetail.ts index 62a2b94..0afebcb 100644 --- a/pages/videoDetail/videoDetail.ts +++ b/pages/videoDetail/videoDetail.ts @@ -1,9 +1,145 @@ -// e:\project\dy_video_all\初晴剧场\pages\videoDetail\videoDetail.ts +// e:\project\dy_video_all\初晴剧场\pages\recommend\recommend.ts +import { httpRequest } from "../../utils/httpReques" + Page({ data: { + videoCanIUse: false, + videoInfo: {}, + videoList: [], + batchList: [], + videoPlayerCurrent: 0, + videoPlayernum: 4, + videoErrorText: '', + safeAreaBottom: 0, + platform: '', + anthologyFlag: false + }, + onLoad: function (options: any) { + const videoCanIUse = tt.canIUse('video-player'); + this.setData({ + videoCanIUse, + }) + this.initFn(); + + tt.getSystemInfo({ + success: (res: any) => { + console.log(res, "------------") + const screenHeight = res.screenHeight; + const statusBarHeight = res.statusBarHeight; + const safeAreaHeight = res.safeArea.height; + const safeAreaBottom = screenHeight - statusBarHeight - safeAreaHeight; + console.log(safeAreaBottom, "safeAreaBottom") + this.setData({ + safeAreaBottom, + platform: res.platform + }) + } + }) }, - onLoad: function (options) { + onShow() { }, + async initFn() { + const params = { + "uid": 127457025, + "platform": "devtools", + "is_b": 2, + "sid": "2" + } + const videoreadRes: any = await httpRequest('/videoread', 'POST', params); + let videoInfo: any = {} + if (videoreadRes.status == 1 && Array.isArray(videoreadRes.data)) { + videoInfo = videoreadRes.data[0]; + } + + const batchlistRes: any = await httpRequest('/batchlist', 'POST', params); + let batchList: any = []; + if (batchlistRes.status == 1 && Array.isArray(batchlistRes.data)) { + batchList = batchlistRes.data; + } + + this.setData({ + batchList, + videoInfo + }) + + }, + handelSeiperChange(ev: any) { + const current = ev.detail.current; + const videoPlayerCurrent = this.data.videoPlayerCurrent; + const batchList: any = this.data.batchList; + const id = batchList[videoPlayerCurrent]?.id; + const nextId = batchList[current]?.id; + const context: any = tt.createVideoContext(`${id}`); + const nextContext: any = tt.createVideoContext(`${nextId}`); + + context?.pause?.(); + nextContext?.play?.(); + + this.selectComponent(`#${nextId}`, (res: any) => { + console.log(res, "resres") + res?.hidePauseIcon() + }); + + this.setData({ + videoPlayerCurrent: current, + }) + + + }, + videoPlayerEnded() { + console.log('videoPlayerEnded') + const videoPlayerCurrent = this.data.videoPlayerCurrent; + this.setData({ + videoPlayerCurrent: videoPlayerCurrent + 1, + videoErrorText: '' + }) + }, + + videError(ev: any) { + const errMsg = ev.detail.errMsg; + let errMsgText = ''; + if (errMsg == 'Video is forbidden in playlet,please use video-player instead') { + errMsgText = '抱歉,当前抖音版本过低,请升级抖音' + } else { + errMsgText = errMsg; + } + this.setData({ + videoErrorText: errMsgText + }) + }, + + videPlayerError(ev: any) { + console.log(ev, "errMsgTexterrMsgText") + const errMsg = ev.detail.errMsg; + let errMsgText = ''; + if (errMsg == 'Video is forbidden in playlet,please use video-player instead') { + errMsgText = '抱歉,当前抖音版本过低,请升级抖音' + } else { + errMsgText = errMsg; + } + this.setData({ + videoErrorText: errMsgText + }) + }, + + toPathVideoDetail() { + tt.navigateTo({ + url: `pages/videoDetail/videoDetail`, + }); + }, + + anthologyTap() { + console.log('anthologyTap') + + this.setData({ + anthologyFlag: true + }) + }, + + handelAnthologyClose() { + this.setData({ + anthologyFlag: false + }) } }) \ No newline at end of file diff --git a/pages/videoDetail/videoDetail.ttml b/pages/videoDetail/videoDetail.ttml index 57f4c21..e881420 100644 --- a/pages/videoDetail/videoDetail.ttml +++ b/pages/videoDetail/videoDetail.ttml @@ -1,2 +1,182 @@ - -e:\project\dy_video_all\初晴剧场\pages\videoDetail\videoDetail.ttml \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + {{videoErrorText}} + + + + + + + + + + + + + + + + + + + + + + + + + + 充值解锁 + + + + + + + + + 观看广告解锁 + + + + + + + + + + + + 66K + + + + + + + + 选集 + + + + + + + + 分享 + + + + + + {{videoInfo.title}}{{videoPlayerCurrent}}{{index}}--{{item.id}} + + + 第{{videoInfo.order}}集 + 全剧{{100}}集 + + + 描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述 + + + + + + + + + + + + 剧名剧名剧名剧名剧名剧名剧名剧名剧名剧名剧名剧名剧名剧名 + + + + + + + + + + 1-30 + + + + + + + + + + + + + + {{idx}} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/videoDetail/videoDetail.ttss b/pages/videoDetail/videoDetail.ttss index bc617f1..65ae0ea 100644 --- a/pages/videoDetail/videoDetail.ttss +++ b/pages/videoDetail/videoDetail.ttss @@ -1 +1,362 @@ -/* e:\project\dy_video_all\初晴剧场\pages\videoDetail\videoDetail.ttss */ \ No newline at end of file +/* e:\project\dy_video_all\初晴剧场\pages\videoDetail\videoDetail.ttss */ + +._vv_detail_html { + width: 100%; + height: 100vh; + position: relative; +} + +._vv_de_swiper { + width: 100%; + height: 100%; + z-index: 1999; + /* padding-bottom: 40rpx; */ + box-sizing: border-box; +} + +._swiper_item_warp { + width: 100%; + height: 100%; + z-index: 1; + box-sizing: border-box; +} + +._m_v_w_video_player { + width: 100%; + height: 100%; + z-index: 1; +} + + +._m_v_w_it_ma_cover { + width: 100%; + height: 100%; + z-index: 1; +} + +._m_v_w_v_operate_l { + position: absolute; + right: 32rpx; + bottom: 260rpx; + z-index: 2; +} + +._m_vv_oper_l_col_w { + display: flex; + flex-direction: column; + align-items: center; +} + +._m_vv_oper_l_collect { + width: 68rpx; + height: 68rpx; +} + +._m_vv_oper_l_col_sss { + display: flex; + line-height: 1; + margin-top: 10rpx; +} + +._m_vv_oper_l_col_s_text { + font-size: 24rpx; + color: #fff; +} + +._m_v_ww_info_vo { + position: absolute; + left: 32rpx; + bottom: 66rpx; + width: 80%; + z-index: 2; +} + +._m_v_ww_in_vooo_title { + display: flex; + line-height: 1; +} + +._m_v_ww_in_vooo_ti_text { + font-size: 36rpx; + font-weight: 600; + color: #fff; +} + +._m_v_ww_in_lll_num { + display: flex; + line-height: 1; + margin-top: 16rpx; +} + +._m_v_ww_in_l_n_current { + display: inline-block; + font-size: 24rpx; + font-weight: 500; + color: #fff; +} + +._m_v_ww_in_l_n_all { + display: inline-block; + font-size: 24rpx; + font-weight: 500; + color: #fff; + margin-left: 20rpx; +} + +._m_v_ww_in_ttt_tips { + display: flex; + width: 100%; + line-height: 1; + margin-top: 26rpx; +} + +._m_v_ww_in_ttt_t_text { + display: -webkit-box; + width: 100%; + font-weight: 300; + line-height: 1.5; + font-size: 24rpx; + color: #fff; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + /* 设置为想要的行数 */ + overflow: hidden; + text-overflow: ellipsis; +} + +._iii_video_content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: flex; + justify-content: center; + align-items: center; + z-index: 3; +} + +._iii_video_co_err_warp { + display: flex; + flex-direction: column; + align-items: center; +} + +._iii_vi_co_err { + display: flex; + margin-top: 80rpx; +} + +._iii_vi_co_err_text { + font-size: 28rpx; + color: rgba(255, 255, 255, 0.6); +} + +._iii_vi_co_e_img { + width: 166rpx; + height: 166rpx; +} + +._k_l_unlock { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +._k_l_unlo_mask { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 90rpx; + background-color: rgba(0, 0, 0, 0.45); + z-index: 99; +} + +._k_l_unlo_ma_pay { + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 92rpx; + background: linear-gradient(90deg, #5BBE04 0%, #04BE55 100%); + border-radius: 92rpx; +} + +._k_l_unlo_ma_ad { + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 92rpx; + background: linear-gradient(90deg, #5BBE04 0%, #04BE55 100%); + border-radius: 92rpx; + margin-top: 36rpx; +} + +._k_l_unlo_ma_p_icon { + width: 42rpx; + height: 37rpx; +} + +._k_l_unlo_ma_name { + display: flex; + line-height: 1; + margin-left: 42rpx; +} + +._k_l_unlo_ma_na_text { + font-size: 24rpx; + color: #fff; +} + +._vv_det_anthology_dialog { + position: absolute; + left: 0; + bottom: 0; + display: flex; + flex-direction: column; + width: 100%; + height: 886rpx; + border-radius: 16rpx 16rpx 0 0; + background-color: #080B16; + z-index: 9999; + transform: translateY(100%); + transition: transform 0.5s; +} + +._vv_det_anthology_dialog.ac_dis_blo{ + transform: translateY(0); + transition: transform 0.5s; +} + +._vv_det_ant_dia_header { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + padding: 40rpx 32rpx 40rpx 32rpx; +} + +._vv_det_ant_dia_hea_name { + display: flex; + width: 70%; +} + +._vv_det_ant_dia_hea_na_text { + display: inline-block; + font-size: 36rpx; + color: #fff; + font-weight: 600; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +._vv_det_ant_dia_hea_close { + width: 30rpx; + height: 30rpx; +} + +._vv_det_ant_dia_sort { + width: 100%; + padding: 0 32rpx; + margin-bottom: 40rpx; +} + +._vv_det_ant_dia_so_scr { + width: 100%; + white-space: nowrap; +} + +._vv_det_ant_dia_so_sc_item { + display: inline-block; + margin-right: 40rpx; +} + +._vv_det_ant_dia_so_sc_item:last-child { + margin-right: 0; +} + +._vv_det_ant_dia_so_sc_it_text { + font-size: 28rpx; + color: rgba(255, 255, 255, 0.4); + line-height: 1; +} + +._vv_det_ant_dia_so_sc_it_text.ac_color { + color: #fff; +} + +._vv_det_ant_dia_list { + flex: 1; +} + +._vv_det_ant_dia_li_warp { + width: 100%; + height: 100%; +} + +._vv_det_ant_dia_li_wa_ppp_li { + width: 100%; + height: 100%; + padding-left: 32rpx; + padding-right: 10rpx; +} + +._vv_det_ant_dia_li_wa_p_hhhh { + display: flex; + flex-wrap: wrap; + width: 100%; + /* height: 100%; */ +} + +._vv_det_ant_dia_li_wa_p_h_yyyy { + width: 16.666%; + height: 96rpx; + padding-right: 22rpx; + margin-bottom: 22rpx; +} + +._vv_det_ant_dia_li_wa_p_h_y_ggg { + position: relative; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 96rpx; + background-color: rgba(255, 255, 255, 0.1); + border-radius: 8rpx; + border: 2rpx solid transparent; +} + +._vv_det_ant_dia_li_wa_p_h_y_ggg.acv_class_color { + border: 2rpx solid #5BBE04; + background-color: rgba(91, 190, 4, 0.2); +} + + +._vv_det_ant_dia_li_wa_p_h_y_ggg.acv_class_color ._vv_det_ant_dia_li_wa_p_h_y_g_t { + color: #5BBE04; +} + +._vv_det_ant_dia_li_wa_p_h_y_g_t { + font-size: 32rpx; + color: #999999; + font-weight: 600; +} + +._vv_det_ant_dia_li_wa_p_h_y_g_lock { + position: absolute; + top: 8rpx; + right: 8rpx; + width: 20rpx; + height: 24rpx; +} \ No newline at end of file diff --git a/project.config.json b/project.config.json index 4a5d49e..cfcc7b5 100644 --- a/project.config.json +++ b/project.config.json @@ -1,18 +1 @@ -{ - "setting": { - "urlCheck": true, - "es6": true, - "postcss": true, - "minified": true, - "newFeature": true, - "autoCompile": true, - "compileHotReLoad": true, - "nativeCompile": true, - "useCompilerPlugins": [ - "typescript" - ] - }, - "appid": "tt216c57d1be50cc7b01", - "projectname": "初晴剧场", - "douyinProjectType": "native" -} +{"setting":{"urlCheck":true,"es6":true,"postcss":true,"minified":true,"newFeature":true,"autoCompile":true,"compileHotReLoad":true,"nativeCompile":true,"useCompilerPlugins":["typescript"]},"appid":"tt216c57d1be50cc7b01","projectname":"初晴剧场","douyinProjectType":"native"} diff --git a/project.private.config.json b/project.private.config.json index 560d804..70cbd82 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,7 +1,7 @@ { "condition": { "miniprogram": { - "current": 1715994690522, + "current": -1, "list": [ { "id": 1715845062520, @@ -72,6 +72,26 @@ "launchFrom": "scan", "location": "qr_code", "mockUpdateType": "Noupdate" + }, + { + "id": 1716172737903, + "name": "播放详情", + "pathName": "pages/videoDetail/videoDetail", + "query": "", + "scene": "990001", + "launchFrom": "scan", + "location": "qr_code", + "mockUpdateType": "Noupdate" + }, + { + "id": 1716196645433, + "name": "充值", + "pathName": "pages/pay/pay", + "query": "", + "scene": "990001", + "launchFrom": "scan", + "location": "qr_code", + "mockUpdateType": "Noupdate" } ] } diff --git a/static/ant_lock_icon.png b/static/ant_lock_icon.png new file mode 100644 index 0000000..6b471ed Binary files /dev/null and b/static/ant_lock_icon.png differ diff --git a/static/close_icon.png b/static/close_icon.png new file mode 100644 index 0000000..44b1933 Binary files /dev/null and b/static/close_icon.png differ diff --git a/static/error-page.png b/static/error-page.png new file mode 100644 index 0000000..7d328e3 Binary files /dev/null and b/static/error-page.png differ diff --git a/static/loading.gif b/static/loading.gif new file mode 100644 index 0000000..08d1c3e Binary files /dev/null and b/static/loading.gif differ diff --git a/static/pay_bg.png b/static/pay_bg.png new file mode 100644 index 0000000..d01e0f0 Binary files /dev/null and b/static/pay_bg.png differ diff --git a/static/privilege_more.png b/static/privilege_more.png new file mode 100644 index 0000000..dbbf456 Binary files /dev/null and b/static/privilege_more.png differ diff --git a/static/privilege_no_ad.png b/static/privilege_no_ad.png new file mode 100644 index 0000000..fdb94b5 Binary files /dev/null and b/static/privilege_no_ad.png differ diff --git a/static/privilege_play.png b/static/privilege_play.png new file mode 100644 index 0000000..4874944 Binary files /dev/null and b/static/privilege_play.png differ diff --git a/static/unlock_icon.png b/static/unlock_icon.png new file mode 100644 index 0000000..dece299 Binary files /dev/null and b/static/unlock_icon.png differ diff --git a/static/vip_icon.png b/static/vip_icon.png new file mode 100644 index 0000000..3135766 Binary files /dev/null and b/static/vip_icon.png differ diff --git a/static/vip_icon_selected.png b/static/vip_icon_selected.png new file mode 100644 index 0000000..ed297dd Binary files /dev/null and b/static/vip_icon_selected.png differ diff --git a/utils/config.ts b/utils/config.ts index 4947217..de8e2f7 100644 --- a/utils/config.ts +++ b/utils/config.ts @@ -1 +1,2 @@ -export const basUrl = 'https://dymgjcweb.qinjiu8.com' \ No newline at end of file +// export const basUrl = 'https://dymgjcweb.qinjiu8.com' +export const basUrl = 'https://dycqjcweb.jiulingliu.cn' \ No newline at end of file diff --git a/utils/httpReques.ts b/utils/httpReques.ts index 587a9a5..eaaf0d4 100644 --- a/utils/httpReques.ts +++ b/utils/httpReques.ts @@ -3,6 +3,8 @@ import { basUrl } from './config' //request.js 此demo为简易封装,开发者可根据自己的业务场景进行修改 export const httpRequest = (url: string, method: any = 'GET', data: any = {}, header: any = {}) => { + const uid = tt.getStorageSync('uid'); + const platform = tt.getSystemInfoSync().platform; return new Promise((resolve, reject) => { let newUrl = ''; if (url.includes('https') || url.includes('http')) { @@ -13,7 +15,11 @@ export const httpRequest = (url: string, method: any = 'GET', data: any = {}, he tt.request({ url: newUrl, method: method, - data: data, + data: { + uid: uid || '', + platform: platform || '', + ...data, + }, header: header, success: (res) => { resolve(res.data)