浏览代码

Merge branch 'dev_1.1.7' of https://git.yishihui.com/DeNet/de-net into dev_1.1.7

wenliming 2 年之前
父节点
当前提交
208fa8c44b

+ 1 - 1
src/view/iframe/buy-nft/buy/pay.vue

@@ -392,7 +392,7 @@ onUnmounted(() => {
     background: #fff;
     border-radius: 25px;
     max-width: 1000px;
-    min-width: 800px;
+    min-width: 1000px;
     max-height: 90%;
     z-index: 23;
     display: flex;

+ 95 - 44
src/view/iframe/treasure-hunt/components/btn.vue

@@ -1,12 +1,20 @@
 <template>
-    <div class="btn-submit" @click="clickBtn" :class="{ 'no': loading, 'disabled': disabled }">
-        <img :src="require('@/assets/svg/icon-iframe-loading.svg')" alt="" class="loading" v-if="loading && icon" />
-        <img :src="require('@/assets/svg/icon-btn-box.svg')" alt="" v-if="!loading && icon" />
-        <span :style="{ 'font-size': fontSize, 'color': txtCorlor }">{{ txt }}</span>
+    <div :class="{ 'area-btn': disabled }">
+        <div class="btn-submit" @click="clickBtn" :class="{ 'no': loading, 'disabled': disabled }">
+            <img :src="require('@/assets/svg/icon-iframe-loading.svg')" alt="" class="loading" v-if="loading && icon" />
+            <img :src="require('@/assets/svg/icon-btn-box.svg')" alt="" v-if="!loading && icon" />
+            <span :style="{ 'font-size': fontSize, 'color': txtCorlor, 'font-weight': fontWeight }">{{ txt }}</span>
+        </div>
+        <div class="refresh" v-if="disabled">
+            <img :src="require('@/assets/svg/icon-refresh-treasure.svg')"
+                :class="{ 'icon-refresh-rotate': refreshRotate }" alt="" @click="refresh" />
+        </div>
     </div>
 </template>
 <script setup>
-import { defineProps, defineEmits } from 'vue'
+import { inject, defineProps, defineEmits, ref } from 'vue'
+let refreshRotate = ref(false);
+let state = inject('state')
 defineProps({
     txt: {
         type: String,
@@ -20,6 +28,10 @@ defineProps({
         type: String,
         default: '20px'
     },
+    fontWeight: {
+        type: String,
+        default: '800'
+    },
     icon: {
         type: Boolean,
         default: true
@@ -33,64 +45,103 @@ defineProps({
     }
 })
 const emit = defineEmits(['on-click'])
+
 const clickBtn = () => {
     emit('on-click')
 }
+
+const refresh = () => {
+    if (!refreshRotate.value) {
+        refreshRotate.value = true;
+        setTimeout(() => {
+            refreshRotate.value = false;
+        }, 1000)
+
+        state.init(() => {
+            state.inviteInit()
+        })
+    }
+}
 </script>
 <style scoped lang="scss">
-.btn-submit {
-    background: #1D9BF0;
-    border-radius: 100px;
+.area-btn {
     display: flex;
-    align-items: center;
-    justify-content: center;
-    height: 53px;
-    width: 343px;
-    margin: 0 auto;
-    cursor: pointer;
-    user-select: none;
-
-    span {
-        font-weight: 800;
-        color: #FFFFFF;
-        font-size: 20px;
-        line-height: 24px;
-        margin-left: 6px;
 
-    }
+    .btn-submit {
+        background: #1D9BF0;
+        border-radius: 100px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        height: 53px;
+        width: 343px;
+        margin: 0 auto;
+        cursor: pointer;
+        user-select: none;
 
-    img {
-        width: 20px;
-        height: 20px;
-    }
+        span {
+            font-weight: 800;
+            color: #FFFFFF;
+            font-size: 20px;
+            line-height: 24px;
+            margin-left: 6px;
+
+        }
 
+        img {
+            width: 20px;
+            height: 20px;
+        }
 
 
-    .loading {
-        animation: loading 1s infinite linear;
+
+        .loading {
+            animation: loading 1s infinite linear;
+        }
     }
-}
 
-.no {
-    cursor: no-drop;
-}
+    .refresh {
+        display: flex;
+        justify-content: center;
+        align-items: center;
 
-.disabled {
-    cursor: no-drop;
-    background: #F1F1F1;
+        img {
+            cursor: pointer;
+            margin-left: 12px;
+        }
 
-    span {
-        color: #AFAFAF;
+        .icon-refresh-rotate {
+            transform: rotate(360deg);
+            transition-duration: 1s;
+        }
     }
-}
 
-@keyframes loading {
-    from {
-        transform: rotate(0deg);
+    .no {
+        cursor: no-drop;
     }
 
-    to {
-        transform: rotate(360deg);
+    .disabled {
+        cursor: no-drop;
+        background: #F1F1F1;
+        width: 305px;
+        font-weight: 600;
+        margin: 0;
+
+
+        span {
+            font-weight: 600;
+            color: #AFAFAF;
+        }
+    }
+
+    @keyframes loading {
+        from {
+            transform: rotate(0deg);
+        }
+
+        to {
+            transform: rotate(360deg);
+        }
     }
 }
 </style>

+ 1 - 1
src/view/iframe/treasure-hunt/components/invite-friends.vue

@@ -13,7 +13,7 @@
             <img :src="item.iconPath" alt="" v-for="item in state.share_list" @click="clickShare(item)" />
         </div>
         <v-btn :txt="state.open_btn.txt" :font-size="'17px'" class="btn" :icon="false"
-            :disabled="state.open_btn.disabled" @onClick="clickBtn"></v-btn>
+            :disabled="state.open_btn.disabled" @onClick="clickBtn" font-weight="600"></v-btn>
         <v-toast :show="state.toast.show" :txt="state.toast.txt"></v-toast>
     </div>
 </template>

+ 1 - 2
src/view/iframe/treasure-hunt/components/invite-list.vue

@@ -16,8 +16,7 @@
         </div>
         <div class="footer">
             <v-btn :txt="state.open_btn.txt" :font-size="'17px'" class="btn" :icon="false"
-                :disabled="state.open_btn.disabled" @onClick="clickBtn"></v-btn>
-            <!-- <img :src="require('@/assets/svg/icon-refresh-treasure.svg')" alt="" class="refresh"> -->
+                :disabled="state.open_btn.disabled" @onClick="clickBtn" font-weight="600"></v-btn>
         </div>
     </div>
 </template>

+ 5 - 0
src/view/iframe/treasure-hunt/index.vue

@@ -110,6 +110,11 @@ state.treasureOpen = () => {
                 case '2037':
                     state.dialog.show = true
                     break;
+                default:
+                    state.init(() => {
+                        state.inviteInit()
+                    })
+                    break
             }
         }
     })