|
@@ -4,18 +4,21 @@
|
|
|
<div class="page" v-show="show">
|
|
<div class="page" v-show="show">
|
|
|
<img src="@assets/png-renwu.png" @click="show = false" class="topImg" alt="" />
|
|
<img src="@assets/png-renwu.png" @click="show = false" class="topImg" alt="" />
|
|
|
<img src="@assets/rice-biaoti.png" class="topBanner" alt="" />
|
|
<img src="@assets/rice-biaoti.png" class="topBanner" alt="" />
|
|
|
|
|
+ <img src="@assets/icon_close.png" @click.stop="show = false" alt="" class="close" />
|
|
|
|
|
|
|
|
<div class="page-content" @click.stop="">
|
|
<div class="page-content" @click.stop="">
|
|
|
<div class="page-box">
|
|
<div class="page-box">
|
|
|
<div class="box-item">
|
|
<div class="box-item">
|
|
|
<img src="@assets/icon_qiandao.png" alt="" />
|
|
<img src="@assets/icon_qiandao.png" alt="" />
|
|
|
<div class="box-info">
|
|
<div class="box-info">
|
|
|
- <div class="text1">签到奖励(1/1)</div>
|
|
|
|
|
|
|
+ <div class="text1">签到奖励({{ taskInfo.isSignedIn ? 1 : 0 }}/1)</div>
|
|
|
<div class="text2">每天签到可免费领取1滴水滴</div>
|
|
<div class="text2">每天签到可免费领取1滴水滴</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <van-button type="primary" round @click="send">邀请</van-button>
|
|
|
|
|
|
|
+ <van-button type="primary" :class="{ not: taskInfo.isSignedIn }" round @click="sign">{{
|
|
|
|
|
+ taskInfo.isSignedIn ? '已完成' : '签到'
|
|
|
|
|
+ }}</van-button>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="box-item">
|
|
|
|
|
|
|
+ <div class="box-item" @click="share">
|
|
|
<img src="@assets/icon_yaoqing.png" alt="" />
|
|
<img src="@assets/icon_yaoqing.png" alt="" />
|
|
|
<div class="box-info">
|
|
<div class="box-info">
|
|
|
<div class="text1">邀请互动(0/1)</div>
|
|
<div class="text1">邀请互动(0/1)</div>
|
|
@@ -33,7 +36,10 @@
|
|
|
每天寄售商品购买成功次数 ≤4 次获得1积分,4次以上获得2积分(2积分可兑换1滴水)
|
|
每天寄售商品购买成功次数 ≤4 次获得1积分,4次以上获得2积分(2积分可兑换1滴水)
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <van-button type="primary" round>兑换</van-button>
|
|
|
|
|
|
|
+ <van-button type="primary" round v-if="taskInfo.exchangeCount" @click="exchange"
|
|
|
|
|
+ >兑换</van-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <van-button type="primary" round v-else @click="$router.push('/hopeMarket')">去看看</van-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="box-item">
|
|
<div class="box-item">
|
|
|
<img src="@assets/icon_huodong.png" alt="" />
|
|
<img src="@assets/icon_huodong.png" alt="" />
|
|
@@ -44,7 +50,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<van-button type="primary" round>兑换</van-button>
|
|
<van-button type="primary" round>兑换</van-button>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="box-item">
|
|
|
|
|
|
|
+ <!-- <div class="box-item">
|
|
|
<img src="@assets/icon_zhiya.png" alt="" />
|
|
<img src="@assets/icon_zhiya.png" alt="" />
|
|
|
<div class="box-info">
|
|
<div class="box-info">
|
|
|
<div class="text1">数字产品质押</div>
|
|
<div class="text1">数字产品质押</div>
|
|
@@ -52,7 +58,7 @@
|
|
|
<div class="text2">特定产品质押兑换成水滴,兑换当天不可寄售</div>
|
|
<div class="text2">特定产品质押兑换成水滴,兑换当天不可寄售</div>
|
|
|
</div>
|
|
</div>
|
|
|
<van-button type="primary" round>去看看</van-button>
|
|
<van-button type="primary" round>去看看</van-button>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -60,19 +66,54 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref, defineEmits, defineExpose } from 'vue';
|
|
|
|
|
|
|
+import { ref, defineEmits, defineExpose, getCurrentInstance, computed } from 'vue';
|
|
|
|
|
+import http from '../../plugins/http';
|
|
|
|
|
+import resolveUrl from 'resolve-url';
|
|
|
|
|
+import store from '../../store';
|
|
|
|
|
|
|
|
-const emit = defineEmits(['send']);
|
|
|
|
|
|
|
+const emit = defineEmits(['send', 'share']);
|
|
|
const show = ref(false);
|
|
const show = ref(false);
|
|
|
|
|
|
|
|
function send() {
|
|
function send() {
|
|
|
emit('send');
|
|
emit('send');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function sign() {
|
|
|
|
|
+ if (!taskInfo.value.isSignedIn) {
|
|
|
|
|
+ http.http.get('/rice/signin').then(res => {
|
|
|
|
|
+ taskInfo.value = res.map;
|
|
|
|
|
+ getTask();
|
|
|
|
|
+ send();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const taskInfo = ref({});
|
|
|
|
|
+function getTask() {
|
|
|
|
|
+ http.http.get('/rice/taskInitialization').then(res => {
|
|
|
|
|
+ taskInfo.value = res.map;
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
function init() {
|
|
function init() {
|
|
|
show.value = true;
|
|
show.value = true;
|
|
|
|
|
+ getTask();
|
|
|
}
|
|
}
|
|
|
defineExpose({ init });
|
|
defineExpose({ init });
|
|
|
|
|
+
|
|
|
|
|
+const {
|
|
|
|
|
+ appContext: {
|
|
|
|
|
+ config: { globalProperties: gobal }
|
|
|
|
|
+ }
|
|
|
|
|
+} = getCurrentInstance();
|
|
|
|
|
+function share() {
|
|
|
|
|
+ emit('share');
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function exchange() {
|
|
|
|
|
+ http.http.get('/rice/exchangeScoreForWaterDrop').then(res => {
|
|
|
|
|
+ // taskInfo.value = res.map;
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
@@ -93,6 +134,15 @@ defineExpose({ init });
|
|
|
margin-left: -123px;
|
|
margin-left: -123px;
|
|
|
z-index: 2;
|
|
z-index: 2;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.close {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ width: 26px;
|
|
|
|
|
+ height: 26px;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: -52px;
|
|
|
|
|
+ right: 16px;
|
|
|
|
|
+}
|
|
|
.wrapper {
|
|
.wrapper {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
z-index: 19;
|
|
z-index: 19;
|
|
@@ -113,7 +163,7 @@ defineExpose({ init });
|
|
|
|
|
|
|
|
&::after {
|
|
&::after {
|
|
|
content: '';
|
|
content: '';
|
|
|
- background: linear-gradient(180deg, #3ab200 0%, #49c52f 100%);
|
|
|
|
|
|
|
+ background: linear-gradient(180deg, #eda94c 0%, #ffe4b9 100%);
|
|
|
box-shadow: inset 0px 2px 0px 0px rgba(255, 255, 255, 0.7);
|
|
box-shadow: inset 0px 2px 0px 0px rgba(255, 255, 255, 0.7);
|
|
|
border-radius: 16px 16px 0px 0px;
|
|
border-radius: 16px 16px 0px 0px;
|
|
|
position: absolute;
|
|
position: absolute;
|
|
@@ -125,7 +175,7 @@ defineExpose({ init });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.page-content {
|
|
.page-content {
|
|
|
- background: linear-gradient(180deg, #f2ffd7 0%, #fcfff6 100%);
|
|
|
|
|
|
|
+ background: linear-gradient(180deg, #fff6e6 0%, #ffffff 100%);
|
|
|
border-radius: 16px 16px 0px 0px;
|
|
border-radius: 16px 16px 0px 0px;
|
|
|
padding: 6px 6px 0;
|
|
padding: 6px 6px 0;
|
|
|
z-index: 3;
|
|
z-index: 3;
|
|
@@ -135,7 +185,7 @@ defineExpose({ init });
|
|
|
padding: 12px 0 calc(var(--safe-bottom) + 12px);
|
|
padding: 12px 0 calc(var(--safe-bottom) + 12px);
|
|
|
box-shadow: inset 1px 1px 0px 0px #ffffff, inset 0px 0px 0px 0px #ffffff;
|
|
box-shadow: inset 1px 1px 0px 0px #ffffff, inset 0px 0px 0px 0px #ffffff;
|
|
|
border-radius: 16px 16px 0px 0px;
|
|
border-radius: 16px 16px 0px 0px;
|
|
|
- border: 1px solid rgba(59, 179, 2, 0.3);
|
|
|
|
|
|
|
+ border: 1px solid rgba(178, 104, 31, 0.3);
|
|
|
border-bottom-width: 0;
|
|
border-bottom-width: 0;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -173,6 +223,12 @@ defineExpose({ init });
|
|
|
height: 32px;
|
|
height: 32px;
|
|
|
margin-top: 7px;
|
|
margin-top: 7px;
|
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
|
|
|
+ --van-button-primary-background-color: #b2681f;
|
|
|
|
|
+ --van-button-primary-border-color: #b2681f;
|
|
|
|
|
+ &.not {
|
|
|
|
|
+ --van-button-primary-background-color: rgba(178, 104, 31, 0.5);
|
|
|
|
|
+ --van-button-primary-border-color: rgba(178, 104, 31, 0.5);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|