From 886aa998cc4835d22b4379a8f8cf4bea86397310 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Thu, 16 Jan 2025 11:21:14 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=AF=8F=E6=9C=881?= =?UTF-8?q?=E6=AF=8F=E6=9C=882?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/task/index.vue | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/pages/task/index.vue b/pages/task/index.vue index 40c6a2d..844300b 100644 --- a/pages/task/index.vue +++ b/pages/task/index.vue @@ -21,7 +21,7 @@ {{ item.status == 1 ? '已签到' : '待签到' }} - + {{ item.signDay.substr(5, 8) }} @@ -295,12 +295,12 @@ url: urls }) } else { + console.log(item, '林区') if (item.jumpType == 0) { if (item.buttonTitle.indexOf("领取") != -1) { let res = await taskReceive({ id: item.id }) - console.log(res,'调试') if (res.code == 0) { uni.showToast({ title: res.id == 15 ? '签到成功' : '领取成功', @@ -355,21 +355,45 @@ } } else if (item.jumpType == 1) { let buttonUrl = item.buttonUrl - console.log(buttonUrl, 'debug') if (item.title && item.title.indexOf('每周打卡奖励') != -1) { buttonUrl = item.buttonUrl + '?source=2' + + uni.navigateTo({ + url: buttonUrl + }) } if (item.title && item.title.indexOf('每月打卡奖励1') != -1) { buttonUrl = item.buttonUrl + '?source=3' + + uni.navigateTo({ + url: buttonUrl + }) } if (item.title && item.title.indexOf('每月打卡奖励2') != -1) { - buttonUrl = - `${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}` + + let res = await taskReceive({ + id: item.id + }) + if (res.code == 0) { + uni.showToast({ + title: res.id == 15 ? '签到成功' : '领取成功', + icon: 'none' + }) + setTimeout(() => { + getTaskdata() + getsignIn() + }, 1000) + } else { + uni.showToast({ + title: res.msg, + icon: 'none' + }) + } + + // buttonUrl = + // `${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}` } - uni.navigateTo({ - url: buttonUrl - }) } else if (item.jumpType == 3) { uni.switchTab({ From c1f3c9a9378df01a4522a29eb2b04898acb10c1f Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Thu, 16 Jan 2025 11:24:24 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 2 +- App.vue | 3 ++- pages/me/withdraw/index.vue | 12 +++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 15f1188..e466870 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -2,7 +2,7 @@ "version" : "1.0", "configurations" : [ { - "playground" : "custom", + "playground" : "standard", "type" : "uni-app:app-android" }, { diff --git a/App.vue b/App.vue index 9f89c23..ec8eb74 100644 --- a/App.vue +++ b/App.vue @@ -2,7 +2,8 @@ export default { onLaunch: function() { console.log('App Launch'); - + uni.setStorageSync('adRewardedNum',0) + }, onShow: function() { }, diff --git a/pages/me/withdraw/index.vue b/pages/me/withdraw/index.vue index dac6b4f..8ba8898 100644 --- a/pages/me/withdraw/index.vue +++ b/pages/me/withdraw/index.vue @@ -114,6 +114,7 @@ urlCallback: {}, adpid: null, adRewardedShow: false, + adRewardedNum: 0, adRewardedVideoloadNum: 0, isWithdraw: false, userInfo: null, @@ -131,6 +132,7 @@ // } getExtractFei(); getMoneyDetail(); + getCanCash() }) onShow(() => { @@ -147,7 +149,6 @@ data.adRewardedVideoloadNum = 0 adRewardedw.value.load(); }) - getCanCash() }) onReachBottom(() => { if (data.page * data.limit < data.totalCount) { @@ -209,6 +210,12 @@ async function getCanCash() { canCash().then(res => { data.isWithdraw = !res; + if( uni.getStorageSync('adRewardedNum') >= 3 ){ + data.isWithdraw = true; + // uni.setStorageSync('adRewardedNum',0) + } else { + uni.setStorageSync('adRewardedNum',((uni.getStorageSync('adRewardedNum')||0)+1)) + } }) } @@ -218,6 +225,7 @@ */ function onadload(e) { data.adRewardedShow = true; + uni.setStorageSync('adRewardedNum',0) console.log('广告数据加载成功'); } @@ -247,6 +255,7 @@ let res = await state({ extraKey: data.urlCallback.extra }) + uni.setStorageSync('adRewardedNum',0) getCanCash() } else { // 播放中途退出 @@ -349,6 +358,7 @@ amount: data.money }).then(res => { data.money = '' + uni.setStorageSync('adRewardedNum',0) setTimeout(function() { getcashMoney() }, 1500) From 55449dd52235bb642d15bddeb4b4a16ff21f2727 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Thu, 16 Jan 2025 11:41:58 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/task/index.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pages/task/index.vue b/pages/task/index.vue index 844300b..aae4fb2 100644 --- a/pages/task/index.vue +++ b/pages/task/index.vue @@ -15,13 +15,13 @@ 已连续签到 {{ datas.signDays }} - + {{ item.status == 1 ? '已签到' : '待签到' }} - + {{ item.signDay.substr(5, 8) }} @@ -357,20 +357,20 @@ let buttonUrl = item.buttonUrl if (item.title && item.title.indexOf('每周打卡奖励') != -1) { buttonUrl = item.buttonUrl + '?source=2' - + uni.navigateTo({ url: buttonUrl }) } if (item.title && item.title.indexOf('每月打卡奖励1') != -1) { buttonUrl = item.buttonUrl + '?source=3' - + uni.navigateTo({ url: buttonUrl }) } if (item.title && item.title.indexOf('每月打卡奖励2') != -1) { - + let res = await taskReceive({ id: item.id }) @@ -389,7 +389,7 @@ icon: 'none' }) } - + // buttonUrl = // `${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}` } @@ -504,7 +504,7 @@ } } - >view:last-child { + .contentTopTwo { margin-top: 100rpx; display: flex; align-items: center; @@ -514,8 +514,9 @@ position: relative; >view { + display: flex; margin-top: 20rpx; - width: 86rpx; + width: 100%; height: 94rpx; background: linear-gradient(180deg, #FFF7E3 0%, #FFFFFF 100%); border-radius: 14rpx 14rpx 0rpx 0rpx; @@ -530,6 +531,7 @@ } } } + } .content { From 1704cd2e7c240547fa35e1f275e208cacb58d49f Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Thu, 16 Jan 2025 13:33:28 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E7=9C=8B=E5=B9=BF?= =?UTF-8?q?=E5=91=8A=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 2 +- pages/me/withdraw/index.vue | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index e466870..15f1188 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -2,7 +2,7 @@ "version" : "1.0", "configurations" : [ { - "playground" : "standard", + "playground" : "custom", "type" : "uni-app:app-android" }, { diff --git a/pages/me/withdraw/index.vue b/pages/me/withdraw/index.vue index 8ba8898..c14423b 100644 --- a/pages/me/withdraw/index.vue +++ b/pages/me/withdraw/index.vue @@ -185,7 +185,6 @@ function ruleConfirm() { data.ruleShow = false data.ruleIndex++ - console.log(data.ruleIndex >= data.ruleList.length) if( data.ruleIndex >= data.ruleList.length) { data.ruleIndex = 0 return @@ -209,7 +208,7 @@ */ async function getCanCash() { canCash().then(res => { - data.isWithdraw = !res; + data.isWithdraw = res; if( uni.getStorageSync('adRewardedNum') >= 3 ){ data.isWithdraw = true; // uni.setStorageSync('adRewardedNum',0) From 51f8f54a26426d9b7c94c2caf5fd9a33ba5ece1d Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Thu, 16 Jan 2025 13:55:54 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E8=AF=B7=E6=B1=82=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/http.js | 15 ++++++++++++--- pages/me/withdraw/index.vue | 2 ++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/http/http.js b/http/http.js index 201fd1a..7278af6 100644 --- a/http/http.js +++ b/http/http.js @@ -92,7 +92,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) { infoBox.showToast(data.message); return; } - + // 加密数据 if (!bodyData.data && bodyData.encryptData) { return Promise.resolve({ @@ -100,9 +100,18 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) { code: bodyData.code, }); } - + let result=null; + if(bodyData.hasOwnProperty('data')){ + result=bodyData.data + } + else if(bodyData.hasOwnProperty('page')){ + result=bodyData.page + } + else{ + result=bodyData + } // 构造请求成功的响应数据 - return Promise.resolve(bodyData.data || bodyData.page || bodyData); + return Promise.resolve(result); }) .catch((res) => { diff --git a/pages/me/withdraw/index.vue b/pages/me/withdraw/index.vue index c14423b..04ffedd 100644 --- a/pages/me/withdraw/index.vue +++ b/pages/me/withdraw/index.vue @@ -209,6 +209,8 @@ async function getCanCash() { canCash().then(res => { data.isWithdraw = res; + console.log(res) + console.log(uni.getStorageSync('adRewardedNum')) if( uni.getStorageSync('adRewardedNum') >= 3 ){ data.isWithdraw = true; // uni.setStorageSync('adRewardedNum',0) From 899680b0c52abd425dd5836bad038ffd9cd40cab Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Thu, 16 Jan 2025 15:14:18 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/me/withdraw/index.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pages/me/withdraw/index.vue b/pages/me/withdraw/index.vue index 04ffedd..fbb17cc 100644 --- a/pages/me/withdraw/index.vue +++ b/pages/me/withdraw/index.vue @@ -101,7 +101,7 @@ import { linkTo } from '@/utils/app.js'; let data = reactive({ - ruleShow: true, + ruleShow: false, rule_title: "", rule_content: "", money: '', @@ -209,8 +209,7 @@ async function getCanCash() { canCash().then(res => { data.isWithdraw = res; - console.log(res) - console.log(uni.getStorageSync('adRewardedNum')) + console.log(res) if( uni.getStorageSync('adRewardedNum') >= 3 ){ data.isWithdraw = true; // uni.setStorageSync('adRewardedNum',0) @@ -253,9 +252,11 @@ const detail = e.detail if (detail && detail.isEnded) { // 正常播放结束 + console.log(data.urlCallback.extra) let res = await state({ extraKey: data.urlCallback.extra }) + console.log(res) uni.setStorageSync('adRewardedNum',0) getCanCash() } else { @@ -351,18 +352,22 @@ } function getMoney() { - let data = uni.showLoading({ title: '提现中' }); withdraw({ amount: data.money }).then(res => { + console.log(res) data.money = '' uni.setStorageSync('adRewardedNum',0) setTimeout(function() { getcashMoney() }, 1500) + uni.showToast({ + title: res.msg, + icon: 'none' + }) }).catch(res =>{ if (res.code == 9991) { uni.showToast({ @@ -372,6 +377,7 @@ setTimeout(function() { linkTo('/pages/me/withdraw/alipay') }, 1500) + }else{ } }) @@ -409,6 +415,7 @@ success: (e) => { if (e.confirm) { + console.log(data.money) getMoney(); getMoneyDetail(); } From be4bf820b45b3bb79ef9681b78b1d535a83e594a Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Thu, 16 Jan 2025 15:18:10 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=88=B7=E6=96=B0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/me/index.vue | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pages/me/index.vue b/pages/me/index.vue index 8991ac9..952d302 100644 --- a/pages/me/index.vue +++ b/pages/me/index.vue @@ -111,21 +111,19 @@ -