Quellcode durchsuchen

代码逻辑修复

chenlei1231 vor 3 Monaten
Ursprung
Commit
1b3ad7d582

+ 11 - 1
src/views/adweb/site/components/Sohoeb2bOrder.vue

@@ -44,7 +44,7 @@
 
 <script setup lang="ts">
   import { reactive, ref } from 'vue';
-  import { postAction } from '@/api/manage/manage';
+  import { getAction, postAction } from '@/api/manage/manage';
   import { useMessage } from '@/hooks/web/useMessage';
   import pick from 'lodash.pick';
 
@@ -65,6 +65,16 @@
 
   function init(record) {
     Object.assign(formState, pick(record, 'code', 'orderUrl', 'domain', 'orderUrlID'));
+    spinning.value = true;
+    getAction('/adweb/adwebSiteManage/getSiteOrderInfo?siteCode=' + record.code, {}).then(function (res) {
+      if (res.code == 200) {
+        formState.orderUrl = res.result.orderInitUrl;
+        formState.orderUrlID = res.result.orderID;
+      }
+
+      spinning.value = false;
+    });
+
     modalVisible.value = true;
   }
 

+ 2 - 8
src/views/adweb/sohoeb2b/Order.vue

@@ -99,15 +99,9 @@
     });
   }
 
-  function setSiteInfo() {
+  function setSiteInfo(selectSiteInfo) {
     confirmLoading.value = true;
-    let url = location.href;
-    let i = url.lastIndexOf('/');
-    let siteId = url.substring(i + 1, url.length);
-    let siteCode = '';
-    if (localStorage.getItem('siteCode') !== null) {
-      siteCode = localStorage.getItem('siteCode');
-    }
+    let siteCode = selectSiteInfo.code;
     getAction('/adweb/adwebSiteManage/getSiteOrderInfo?siteCode=' + siteCode, {}).then(function (res) {
       if (res.code == 200) {
         showiIrame.value = true;