From 0de52b524d12986da38e9979bce865ae1008e2c8 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Fri, 1 Dec 2023 11:00:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E6=96=87=E5=88=9B?= =?UTF-8?q?=E8=B1=86=E5=95=86=E5=9F=8E=20=E6=B7=BB=E5=8A=A0=E5=85=91?= =?UTF-8?q?=E6=8D=A2=E9=A2=9D=E5=BA=A6=E6=98=BE=E7=A4=BA=E3=80=81=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=85=91=E6=8D=A2=E5=95=86=E5=93=81=E6=97=B6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=A9=BA=E6=8F=90=E7=A4=BA=E3=80=81=E6=96=87=E5=88=9B?= =?UTF-8?q?=E8=B1=86=E6=98=93=E5=87=BA=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD?= =?UTF-8?q?-=E4=B8=8D=E8=83=BD=E8=B6=85=E5=87=BA=E6=8C=81=E6=9C=89?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/weight_value/legumes/shopping.vue | 127 ++++++++++++------ 1 file changed, 85 insertions(+), 42 deletions(-) diff --git a/src/views/member/weight_value/legumes/shopping.vue b/src/views/member/weight_value/legumes/shopping.vue index e8afca1..520da3e 100644 --- a/src/views/member/weight_value/legumes/shopping.vue +++ b/src/views/member/weight_value/legumes/shopping.vue @@ -12,24 +12,15 @@ +
兑换额度:{{ goods_legumes }}
易出任务
-
- -
-
看视频
-
- 做任务可申请易出 -
-
-
去完成
-
- +
转发分享
@@ -38,27 +29,42 @@
去完成
+
+ +
+
看视频
+
+ 做任务可申请易出 +
+
+
去完成
+
文创豆兑换
-
- -
-
{{ item.goods_title }}
-
价值 ¥ {{ item.legumes_exchange_price }}
- @@ -97,7 +103,9 @@
- +
@@ -212,6 +220,7 @@ export default { return { // 顶部内容 hold_legumes: 0,// 当前持有文创豆数量 + goods_legumes: 0,// 兑换额度 task_video_link: '', is_show_share: false,// 是否显示分享任务 仅微信浏览器中显示 // 提现相关 @@ -255,9 +264,9 @@ export default { _this.getGoodsList(); _this.getAccountInfo(); // 判断:当前是否为微信浏览器打开 - _this.$nextTick(() => { - _this.is_show_share = _this.fun.getTyep() == 1; - }); + // _this.$nextTick(() => { + // _this.is_show_share = _this.fun.getTyep() == 1; + // }); }, methods: { // 获取用户持有文创豆信息 @@ -266,7 +275,8 @@ export default { $http.get("plugin.cultural-space.api.index.legumes-hold", {}, "加载中...") .then(response => { if (response.result === 1) { - _this.hold_legumes = Math.floor(response.data.voucher_number);// 这里持有数量 需要显示整数 + _this.hold_legumes = Math.floor(response.data.voucher_number); + _this.goods_legumes = Math.floor(response.data.goods_legumes); _this.task_video_link = response.data.task_video_link || ''; } else { _this.$dialog.alert({message: response.msg}).then(() => { @@ -323,11 +333,14 @@ export default { }, // 视频监听 getVidDur(){ + console.log("触发视频监听"); let _this = this; let videoTime = document.getElementById('taskMedia'); _this.videoTime = videoTime; + _this.videoTime.play(); // 监听视频暂停 videoTime.addEventListener("pause", function () { + console.log("播放完成"); if(Math.floor(videoTime.duration) <= Math.floor(videoTime.currentTime)){ _this.is_video_show = false; _this.task_status = true; @@ -350,6 +363,11 @@ export default { _this.$dialog.alert({ message: '请输入易出数量!' }); return ; } + // 判断:提现数量是否超过持有数量 + if(withdrawalNum > _this.hold_legumes){ + _this.$dialog.alert({ message: '易出数量不能超出持有数量!' }); + return ; + } // 任务是否完成 if(!_this.task_status) { _this.taskIsComplete(); @@ -544,7 +562,7 @@ export default { --top-box-height-: 80px; width: 100%; - min-height: calc(100vh - 40px); + min-height: calc(100vh - 124px); display: inline-flex; flex-direction: column; background: #f6f6f6; @@ -598,6 +616,20 @@ export default { color: #ca9a5c; } } + + .exchange_legumes { + position: absolute; + bottom: 15px; + left: 15px; + font-size: 15px; + color: #838485 !important; + + .hold_exchange_legumes { + color: #9b571e !important; + font-weight: bold; + font-size: 17px; + } + } } .task-and-goods { @@ -791,7 +823,8 @@ export default { border-radius: 15px !important; overflow: unset !important; background: transparent !important; - width: 300px!important; + width: 300px !important; + .withdrawal-content { width: 100%; position: relative; @@ -922,14 +955,14 @@ export default { } } -.task-video-content{ - #taskMedia{ +.task-video-content { + #taskMedia { width: 100vw; height: 100vh; } } -.bandBox{ +.bandBox { .h2 { margin-bottom: 32px; @@ -956,13 +989,14 @@ export default { display: flex; align-items: center; padding: 0 15.04px; - margin-bottom:22.08px; + margin-bottom: 22.08px; .ruleLeftDist { display: flex; align-items: center; font-size: 15.04px; } + .rightDist { height: 0.6875rem; flex: 1; @@ -971,23 +1005,29 @@ export default { font-size: 15.04px; align-items: center; } + .rightDist span { margin-right: 6.24px; } + .rightDist i { margin-top: 0.0938rem; } + .ruleRighe { flex: 1; } + .ruleRighe ::-webkit-input-placeholder { /* placeholder字体大小 */ font-size: 15.04px; } + .ruleRighe .van-cell { padding-top: 0; padding-bottom: 0; } + .ruleLeft { display: flex; align-items: center; @@ -1010,17 +1050,20 @@ export default { margin-top: 30px; } } -.ruleRightContent{ - width: calc(100% - (var(--cell-horizontal-padding,16px) * 2)); - display: inline-flex!important; + +.ruleRightContent { + width: calc(100% - (var(--cell-horizontal-padding, 16px) * 2)); + display: inline-flex !important; flex-direction: row; flex-wrap: wrap; - padding: 0 var(--cell-horizontal-padding,16px); + padding: 0 var(--cell-horizontal-padding, 16px); } -.ruleRightContent .ruleRightContentRadio:not(:first-child){ - margin-left: var(--cell-horizontal-padding,16px); + +.ruleRightContent .ruleRightContentRadio:not(:first-child) { + margin-left: var(--cell-horizontal-padding, 16px); } -.status-tips{ + +.status-tips { width: 100%; text-align: center; height: 25px;