Преглед изворни кода

引导用户领取更多红包

nieyuge пре 2 година
родитељ
комит
c858ff180f

+ 23 - 6
src/view/iframe/publish/components/get-more.vue

@@ -1,23 +1,40 @@
 <template>
-    <div class="getMore">
+    <div class="getMore" @click="jumpMore">
         <img width="20" :src=" require('@/assets/svg/icon-big-give.svg') " />
         <font>Get More Giveaway</font>
         <img height="20" :src=" require('@/assets/svg/icon-cell-arrow-right.svg') " />
       </div>
 </template>
 
-<script>
-export default {
-    setup() {
-        
-    },
+<script setup>
+import { getFrontConfig } from "@/http/account";
+import { onBeforeMount, ref } from "vue";
+
+// const
+const moreUrl = ref('');
+
+onBeforeMount(() => {
+    getFrontConfig({
+        params: {},
+    }).then(res => {
+        moreUrl.value = res.data.moreLuckdropsUrl;
+    })
+})
+
+const jumpMore = () => {
+    if (moreUrl.value) {
+        window.open(moreUrl.value)
+    }
 }
+
 </script>
 
 <style lang="scss" scoped>
 .getMore {
     display: flex;
     height: 50px;
+    cursor: pointer;
+    user-select: none;
     align-items: center;
     justify-content: center;
     box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.06);

+ 3 - 2
src/view/iframe/red-packet/red-packet.vue

@@ -105,7 +105,7 @@
             data.detail.currencySymbol || ''
         }}</div>
       </div>
-      <div class="luck-list" @scroll="handleScroll($event)">
+      <div class="luck-list max" @scroll="handleScroll($event)">
         <div class="luck-item" v-for="item, i in data.detail.allReceived" v-bind:key="i">
           <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
           <img v-else :src="require('@/assets/svg/icon-twitter.svg')" alt />
@@ -125,6 +125,7 @@
           </div>
         </div>
       </div>
+      <get-more></get-more>
     </div>
 
 
@@ -1166,7 +1167,7 @@ body {
 
       .luck-item {
         display: flex;
-        padding: 12px 0;
+        padding: 10px 0;
         margin: 0 16px;
         border-bottom: 1px solid #F2F2F2;
         justify-content: space-between;