Browse Source

feat: 新增去兑换按钮

zhangyuhan 3 months ago
parent
commit
56346dedcc
1 changed files with 35 additions and 1 deletions
  1. 35 1
      apps/mobile/src/views/equitycenter/index.vue

+ 35 - 1
apps/mobile/src/views/equitycenter/index.vue

@@ -168,8 +168,9 @@
                           <span
                             class="highlight-text"
                             @click="getOtherProductInfo(item)"
-                            >立即获取</span
                           >
+                            立即获取
+                          </span>
                         </div>
                       </div>
 
@@ -280,6 +281,17 @@
                             {{ formatDate(item.ex_date) }}
                           </div>
                         </div>
+                        <div class="records-line" v-if="item.address">
+                          <div class="records-line-left">操作:</div>
+                          <div class="records-line-right">
+                            <span
+                              class="highlight-text"
+                              @click="goToExChangePage(item.address)"
+                            >
+                              去兑换
+                            </span>
+                          </div>
+                        </div>
                       </div>
                     </div>
                     <div v-else>
@@ -327,6 +339,18 @@
                             {{ formatDate(item.ex_date) }}
                           </div>
                         </div>
+
+                        <div class="records-line" v-if="item.address">
+                          <div class="records-line-left">操作:</div>
+                          <div class="records-line-right">
+                            <span
+                              class="highlight-text"
+                              @click="goToExChangePage(item.address)"
+                            >
+                              去兑换
+                            </span>
+                          </div>
+                        </div>
                       </div>
                     </div>
 
@@ -615,6 +639,16 @@ export default {
         openLinkOfOther(this.exChangeAddress)
       }
     },
+    goToExChangePage(address) {
+      if (!address) {
+        return this.$toast('获取兑换地址异常')
+      }
+      if (this.$envs.inApp) {
+        appCallOpenWindow(address, '兑换')
+      } else {
+        openLinkOfOther(address)
+      }
+    },
     doCopyCode(code) {
       if (!code) {
         return this.$toast('获取兑换码异常')