Quellcode durchsuchen

修改bug

修改bug
dangyunlong vor 3 Wochen
Ursprung
Commit
22bab80059

+ 1 - 1
src/layout/components/template/pages/index/sector.vue

@@ -436,7 +436,7 @@ export default {
                     "price": 0,//价格
                     "introduce": "",//介绍
                     "website_id": "",//网站id
-                    "thumb": "https://img.bjzxtw.org.cn/pre/image/png/20250530/1748588901281358.png",//示例图 - 默认值
+                    "thumb": "http://192.168.1.234:19000/pre/image/jpeg/20251226/1766714842116708.jpg",//示例图 - 默认值
                     "typeid": 2,//广告类型 - 2 图片
                     "ad_tag": ""//广告标识 - 网站标识 + 页面名称 + sort
                 }

+ 4 - 4
src/store/modules/template.js

@@ -196,7 +196,7 @@ const state = {
                 "price": "",//价格
                 "introduce":"",//介绍
                 "website_id": "",//网站id
-                "thumb": "http://img.bjzxtw.org.cn/pre/image/png/20250527/1748332370111555.png",//示例图 - 默认值
+                "thumb": "http://192.168.1.234:19000/pre/image/jpeg/20251226/1766715237727691.jpg",//示例图 - 默认值
                 "typeid": 2,//广告类型 - 2 图片
                 "ad_tag": ""//广告标识 - 网站标识 + 页面名称 + sort
             },
@@ -923,7 +923,7 @@ const mutations = {
     saveTemplate(state) {
         //1.保存网站id和模板风格id
         state.webSiteData.base.websiteId = state.editWebsiteId;
-        state.webSiteData.style.styleId = state.editWebsiteClass;
+        state.webSiteData.style.styleId = parseFloat(state.editWebsiteClass);
         //2.格式化数据
         //2.1 清理广告位数据
         this.commit('template/clearAd');
@@ -1120,10 +1120,10 @@ const mutations = {
         }
         //如果处于预览模式,可能无法获取到website_id和style_id,需要从router中获取
         if(state.editWebsiteId == undefined || state.editWebsiteId == "" || state.editWebsiteId == null){
-            state.editWebsiteId = router.currentRoute.query.website_id;
+            state.editWebsiteId = parseFloat(router.currentRoute.query.website_id);
         }
         if(state.editWebsiteClass == undefined || state.editWebsiteClass == "" || state.editWebsiteClass == null){
-            state.editWebsiteClass = router.currentRoute.query.style;
+            state.editWebsiteClass = parseFloat(router.currentRoute.query.style);
         }
         // console.log(state.editWebsiteId)
         // console.log(state.editWebsiteClass)

+ 6 - 4
src/utils/streamFetch.js

@@ -2,11 +2,13 @@
 import { Message } from 'element-ui'
 import store from '@/store'
 import { getToken, getUserUrl } from '@/utils/auth'
+import URL from '@/utils/baseUrl'
 
 // 创建fetch流式请求类
 class StreamFetch {
     // 1.构造函数
     constructor(baseURL = '/ai') {
+        //this.baseURL = URL.aiUrl + baseURL
         this.baseURL = baseURL
         this.currentController = null // 存储当前请求的控制器
     }
@@ -47,10 +49,10 @@ class StreamFetch {
         if (store.getters.token) {
             config.headers['token'] = getToken()
         }
-        if (store.getters.userurl) {
-            // 如果用户登录携带了userurl就存起来
-            config.headers['userurl'] = getUserUrl()
-        }
+        // if (store.getters.userurl) {
+        //     // 如果用户登录携带了userurl就存起来
+        //     config.headers['userurl'] = getUserUrl()
+        // }
         
         // 添加请求携带的值
         if (data) {