USER-20230908AJ\Administrator 6 ماه پیش
والد
کامیت
49fe904928
2فایلهای تغییر یافته به همراه25 افزوده شده و 1 حذف شده
  1. 7 0
      api/deal.js
  2. 18 1
      pages/convert/convert-index.vue

+ 7 - 0
api/deal.js

@@ -0,0 +1,7 @@
+import {request} from './ajax.js'
+
+const commonUrl = '/api/deal/'
+// 获取sts
+export const addDeal = (data) => request(commonUrl + 'add', 'post', { ...data })
+export const getAddress = (data) => request(commonUrl + 'address', 'post', { ...data })
+

+ 18 - 1
pages/convert/convert-index.vue

@@ -1,6 +1,7 @@
 <script>
 import tokenpocketBnb from "@/common/wallet/tokenpocket-wallet/tokenpocket-bnb";
 import {getTotalMoney} from "@/api/money";
+import {addDeal, getAddress} from "@/api/deal";
 
 export default {
   name: "convert-index",
@@ -13,7 +14,8 @@ export default {
       toNum:'',
       formNUm:'',
       price:'',
-      address:''
+      address:'',
+      dealAddress:'',
     };
   },
   watch:{
@@ -28,8 +30,23 @@ export default {
   mounted() {
     this.getIconNum()
     this.getTotalMoney()
+    this.getAddress()
   },
   methods: {
+    getAddress(){
+      getAddress().then(res=>{
+        if(res.code===1){
+          this.dealAddress=res.data
+        }
+      })
+    },
+    addDeal(){
+      if(this.type===1){
+
+      }else {
+
+      }
+    },
     setMax(){
       if(this.type===1){
         this.formNUm=this.usdtNum