From 206546aed8fad185f7ecc63def0da02c1404f29a Mon Sep 17 00:00:00 2001 From: GYJ <1157756119@qq.com> Date: Thu, 19 Dec 2024 16:22:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?iOS=20=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 2 +- main.js | 11 +---- manifest.json | 11 +++-- me/detail/detailIOS.nvue | 23 ++++++++--- pages/index/index.vue | 16 ++++++-- pages/me/index.vue | 17 ++++++-- pages/pays/pays.vue | 86 ++++++++++++++++------------------------ 7 files changed, 89 insertions(+), 77 deletions(-) diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 5f39510..74c3eab 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -22,7 +22,7 @@ "type" : "uni-app:app-android" }, { - "playground" : "custom", + "playground" : "standard", "type" : "uni-app:app-ios" } ] diff --git a/main.js b/main.js index 9fb1ab5..74b2cd9 100644 --- a/main.js +++ b/main.js @@ -34,8 +34,6 @@ Vue.use(httpApi, app) app.$mount() -console.log(uni); - // #ifdef APP const sysInfo = uni.getSystemInfoSync(); @@ -44,15 +42,10 @@ let isIos = sysInfo.platform == 'ios' if (isIos) { const originNavigateTo = uni.navigateTo - uni.navigateTo = (params) => { - - console.log("自定义 navigate 。。。。。。。。。。"); - + uni.navigateTo = (params) => { let jsonParam = JSON.parse(JSON.stringify(params)) - - + if (isIos && jsonParam.url.includes('/me/detail/detail')) { - console.log('iOS 跳转视频也'); jsonParam.url = jsonParam.url.replace('/me/detail/detail', '/me/detail/detailIOS') } diff --git a/manifest.json b/manifest.json index b079a86..5e15b72 100644 --- a/manifest.json +++ b/manifest.json @@ -27,8 +27,8 @@ "VideoPlayer" : {}, "Camera" : {}, "Record" : {}, - "Push" : {}, - "OAuth" : {} + "OAuth" : {}, + "Push" : {} }, /* 应用发布信息 */ "distribute" : { @@ -63,7 +63,12 @@ }, /* ios打包配置 */ "ios" : { - "dSYMs" : false + "dSYMs" : false, + "urltypes" : "com.hnsiyao.duanju", + "privacyDescription" : { + "NSPhotoLibraryUsageDescription" : "获取您的相册读取权限,目的是为了在我的资料页面使用相册读取功能,修改上传头像", + "NSCameraUsageDescription" : "获取您的摄像头权限,目的是为了在我的资料页面使用摄像头功能,修改上传头像" + } }, /* SDK配置 */ "sdkConfigs" : { diff --git a/me/detail/detailIOS.nvue b/me/detail/detailIOS.nvue index f173165..7ba91fe 100644 --- a/me/detail/detailIOS.nvue +++ b/me/detail/detailIOS.nvue @@ -145,7 +145,7 @@ - {{this.courseDetailsId}} + {{getRedEnvelopeTips}} @@ -154,7 +154,7 @@ {{countPrice*scale}}金币解锁整部视频 - + {{countPrice}}元解锁单集视频 @@ -369,6 +369,7 @@ getRedEnvelopeTips: '', scale: 1, paddingBottom: '0', + isShowMoneyPay: true, }; }, computed: { @@ -492,6 +493,13 @@ console.log('this bottom padding = ' + this.paddingBottom); + httpsRequest.getT("app/common/type/919", {}).then(res => { + if (res.code == 0) { + const sysInfo = uni.getSystemInfoSync(); + let isIos = sysInfo.platform == 'ios' + this.isShowMoneyPay = !(res.data.value == '1' && isIos) + } + }); }, onLoad(e) { let that = this @@ -711,7 +719,10 @@ // #endif // APP支付宝支付 httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId + '?payType=' + paytype, {}).then(ret => { - plus.runtime.openURL(ret.data.h5Url) + // plus.runtime.openURL(ret.data.h5Url) + uni.navigateTo({ + url: '/pages/pays/pays?ordersId=' + this.ordersId + '&url=' + ret.data.h5Url + }); // this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data)); }); } else if (this.openWay == 3) { @@ -1051,7 +1062,7 @@ // const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId); // this.videoList = [this.meunList[index]] this.current = index - if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) { + if (this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type) { this.getDataList(this.courseId, this.courseDetailsId, true, 'select') return; } @@ -1399,8 +1410,8 @@ } else { //不能播放则需要购买 this.openPay() } - if ( t == 'select') { - this.selectPlay(this.videoList[this.current],this.current,true) + if (t == 'select') { + this.selectPlay(this.videoList[this.current], this.current, true) } this.$forceUpdate(); //插入历史记录 diff --git a/pages/index/index.vue b/pages/index/index.vue index 701b09e..f8fd2fc 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -185,8 +185,8 @@ - +
@@ -209,6 +209,7 @@ import recommendVideo from '../../components/recommendVideo/recommendVideo.vue' import activityComp from '../../components/activityComp/activityComp.vue' import dragButton from "@/components/drag-button/drag-button.vue"; + import httpsRequest from '../../common/httpRequest.js' export default { components: { videoList, @@ -260,6 +261,7 @@ isWeixin: false, isIos: true, scrollTop: 0, + isShowMoneyPay: true, }; }, onShareAppMessage(res) { @@ -279,7 +281,6 @@ } }, onPageScroll(e) { - console.log(e); this.scrollTop = e.scrollTop }, onLoad(options) { @@ -293,6 +294,7 @@ // #endif + console.log(options, '22222222222222222') if (uni.getStorageSync('qdCode')) { this.qdCode = uni.getStorageSync('qdCode') } @@ -435,6 +437,14 @@ this.shodrag = false this.videoInfo = [] } + + httpsRequest.getT("app/common/type/919", {}).then(res => { + if (res.code == 0) { + const sysInfo = uni.getSystemInfoSync(); + let isIos = sysInfo.platform == 'ios' + this.isShowMoneyPay = !(res.data.value == '1' && isIos) + } + }); }, onReachBottom() { if (this.page < this.pages) { diff --git a/pages/me/index.vue b/pages/me/index.vue index f30158d..d074982 100644 --- a/pages/me/index.vue +++ b/pages/me/index.vue @@ -53,7 +53,7 @@ 我的积分 --> - + {{userInfo.amount || '0.00'}} @@ -146,7 +146,7 @@ 转盘抽奖 --> - @@ -184,7 +184,7 @@ 观看历史 - @@ -257,6 +257,7 @@ From 423276573189d215b76c4a762c17edd46639721d Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Thu, 19 Dec 2024 16:42:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/task/index.vue | 90 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 74 insertions(+), 16 deletions(-) diff --git a/pages/task/index.vue b/pages/task/index.vue index 9fd713e..ac94de0 100644 --- a/pages/task/index.vue +++ b/pages/task/index.vue @@ -11,27 +11,32 @@ -