Ver código fonte

Merge branch '添加生图积分和服务商切换' into 20260415生产发布版本

yanym 3 semanas atrás
pai
commit
3b0d51e168

+ 4 - 1
src/api/indexAI.js

@@ -369,10 +369,13 @@ export function GetOrderAddress() {
     formData.append('token', auth.token);
     const weChat = window.localStorage.getItem("weChat");
     formData.append('WXuserid', weChat);
+    const checkedFwsInfo = JSON.parse(window.localStorage.getItem("pageDesignfwsRadioValue"));
+    if (checkedFwsInfo){
+        formData.append('servicecode', checkedFwsInfo.shop_code);
+    }
     return request({
         url: '/aidesign/outside/GetOrderAddress',
         method: 'post',
         data: formData
     })
 }
-

+ 0 - 4
src/views/AIDesign/GeneratePlan.vue

@@ -250,7 +250,6 @@ export default class GeneratePlan extends Vue {
         let that = this;
         if (Number(this.mainArea) > 0) {
             const formData = new FormData();
-            const checkedFwsInfo: any = JSON.parse(window.localStorage.getItem("pageDesignfwsRadioValue")!);
             formData.append('eventname', '确认方案去下单');//事件名称
             formData.append('eventtype', 'click');//事件类型
             formData.append('menupath', '外墙质感/结果页/确认AI设计/确认方案去下单');//完整菜单路径
@@ -262,9 +261,6 @@ export default class GeneratePlan extends Vue {
                 F_ID: that.planParams.F_ID
             };
             formData.append('eventdata', JSON.stringify(eventdataObj));//事件数据
-            if (checkedFwsInfo){
-                formData.append('servicecode', checkedFwsInfo.shop_code);
-            }
             AddTrackEvent(formData)//埋点
             // 获取确认下单地址
             GetOrderAddress().then((res) => {

+ 11 - 5
src/views/AIDesign/design.vue

@@ -668,11 +668,17 @@ export default class extends Vue {
     }
     that.fwsList = serviceObjArray;
     that.serviceCodeArray = serviceCodeArray;
-    const serviceCodeIndex = serviceObjArray.findIndex(item => item.shop_code == checkedFwsInfo.shop_code);
-    if (checkedFwsInfo && serviceCodeIndex != -1){
-        that.fwsCode = checkedFwsInfo.shop_code;
-        that.fwsName = checkedFwsInfo.shop_name;
-        that.fwsRadioValue = checkedFwsInfo.shop_code;
+    if (checkedFwsInfo){
+        const serviceCodeIndex = serviceObjArray.findIndex(item => item.shop_code == checkedFwsInfo.shop_code);
+        if (serviceCodeIndex == -1){
+            that.fwsCode = serviceObjArray[0].shop_code;
+            that.fwsName = serviceObjArray[0].shop_name;
+            that.fwsRadioValue = serviceObjArray[0].shop_code;
+        } else {
+            that.fwsCode = checkedFwsInfo.shop_code;
+            that.fwsName = checkedFwsInfo.shop_name;
+            that.fwsRadioValue = checkedFwsInfo.shop_code;
+        }
     } else {
         that.fwsCode = serviceObjArray[0].shop_code;
         that.fwsName = serviceObjArray[0].shop_name;