فهرست منبع

文案库 添加 编辑删除搜索

jiayufei 4 سال پیش
والد
کامیت
fbb60fb4c2

+ 106 - 103
src/utils/request.js

@@ -1,130 +1,133 @@
-import Vue from 'vue'
-import axios from 'axios'
-import store from '@/store'
-import {VueAxios} from './axios'
-import {Modal, notification} from 'ant-design-vue'
-import {ACCESS_TOKEN} from "@/store/mutation-types"
-const key = "1"
+/**
+ * @file reauest 配置
+ * @author zhuxinbo
+ */
+
+import Vue from 'vue';
+import axios from 'axios';
+import store from '@/store';
+import {VueAxios} from './axios';
+import {Modal, notification} from 'ant-design-vue';
+import {ACCESS_TOKEN} from '@/store/mutation-types';
+const key = '1';
 // 创建 axios 实例
 
-if (process.env.NODE_ENV == 'development') { 
-    axios.defaults.baseURL = '/jeecg-boot'
-    
-} 
-else if (process.env.NODE_ENV == 'debug') { 
-} 
-else if (process.env.NODE_ENV == 'production') { 
-  
-  // axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot';//预生产
-  axios.defaults.baseURL = 'http://139.186.165.84:8806/jeecg-boot';     
-  // axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';//生产环境
+if (process.env.NODE_ENV === 'development') {
+    axios.defaults.baseURL = '/jeecg-boot';
+}
+else if (process.env.NODE_ENV === 'debug') {
+}
+else if (process.env.NODE_ENV === 'production') {
+	// axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot';//预生产
+    axios.defaults.baseURL = 'http://139.186.165.84:8806/jeecg-boot';
+	// axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';//生产环境
 }
 const service = axios.create({
-//   baseURL: '/jeecg-boot', // api base_url
-  timeout: 6000000 // 请求超时时间
-})
+	// baseURL: '/jeecg-boot', // api base_url
+    timeout: 6000000 // 请求超时时间
+});
 
 
 
 
 const err = (error) => {
-  if (error.esponse) {
-    let data = error.response.data
-    const token = Vue.ls.get(ACCESS_TOKEN)
-    // console.log("------异常响应------", token)
-    // console.log("------异常响应------", error.response.status)
-    switch (error.response.status) {
-      case 403:
-        notification.error({key,message: '系统提示', description: '拒绝访问', duration: 4})
-        break
-      case 500:
-        //notification.error({ message: '系统提示', description:'Token失效,请重新登录!',duration: 4})
-        if (token && data.message == "Token失效,请重新登录") {
-          // update-begin- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
-          // store.dispatch('Logout').then(() => {
-          //     window.location.reload()
-          // })
-          Modal.error({
-            title: '登录已过期',
-            content: '很抱歉,登录已过期,请重新登录',
-            okText: '重新登录',
-            mask: false,
-            onOk: () => {
-              store.dispatch('Logout').then(() => {
-                Vue.ls.remove(ACCESS_TOKEN)
-                window.location.reload()
-              })
-            }
-          })
-          // update-end- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
-        }
-        break
-      case 404:
-        notification.error({key,message: '系统提示', description: '很抱歉,资源未找到!', duration: 4})
-        break
-      case 504:
-        notification.error({key,message: '系统提示', description: '网络超时'})
-        break
-      case 401:
-        notification.error({key,message: '系统提示', description: '未授权,请重新登录', duration: 4})
-        if (token) {
-          store.dispatch('Logout').then(() => {
-            setTimeout(() => {
-              window.location.reload()
-            }, 1500)
-          })
-        }
-        break
-      default:
-        notification.error({
-          key,
-          message: '系统提示',
-          description: data.message,
-          duration: 4
-        })
-        break
-    }
-  }
-  return Promise.reject(error)
+    if (error.esponse) {
+		let data = error.response.data
+		const token = Vue.ls.get(ACCESS_TOKEN)
+		// console.log("------异常响应------", token)
+		// console.log("------异常响应------", error.response.status)
+		switch (error.response.status) {
+		case 403:
+			notification.error({key,message: '系统提示', description: '拒绝访问', duration: 4})
+			break
+		case 500:
+			//notification.error({ message: '系统提示', description:'Token失效,请重新登录!',duration: 4})
+			if (token && data.message == "Token失效,请重新登录") {
+			// update-begin- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
+			// store.dispatch('Logout').then(() => {
+			//     window.location.reload()
+			// })
+			Modal.error({
+				title: '登录已过期',
+				content: '很抱歉,登录已过期,请重新登录',
+				okText: '重新登录',
+				mask: false,
+				onOk: () => {
+				store.dispatch('Logout').then(() => {
+					Vue.ls.remove(ACCESS_TOKEN)
+					window.location.reload()
+				})
+				}
+			})
+			// update-end- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
+			}
+			break
+		case 404:
+			notification.error({key,message: '系统提示', description: '很抱歉,资源未找到!', duration: 4})
+			break
+		case 504:
+			notification.error({key,message: '系统提示', description: '网络超时'})
+			break
+		case 401:
+			notification.error({key,message: '系统提示', description: '未授权,请重新登录', duration: 4})
+			if (token) {
+			store.dispatch('Logout').then(() => {
+				setTimeout(() => {
+				window.location.reload()
+				}, 1500)
+			})
+			}
+			break
+		default:
+			notification.error({
+			key,
+			message: '系统提示',
+			description: data.message,
+			duration: 4
+			})
+			break
+		}
+	}
+	return Promise.reject(error)
 };
 
 // request interceptor
 service.interceptors.request.use(config => {
-  const token = Vue.ls.get(ACCESS_TOKEN)
-  if (token) {
-    config.headers['X-Access-Token'] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
-  }
-  if (config.method == 'get') {
-    config.params = {
-      _t: Date.parse(new Date()) / 1000,
-      ...config.params
+	const token = Vue.ls.get(ACCESS_TOKEN);
+    if (token) {
+		config.headers['X-Access-Token'] = token; // 让每个请求携带自定义 token 请根据实际情况自行修改
     }
-  }
-  return config
+    if (config.method === 'get') {
+		config.params = {
+			_t: Date.parse(new Date()) / 1000,
+			...config.params
+		};
+    }
+	return config;
 }, (error) => {
-  return Promise.reject(error)
-})
+  	return Promise.reject(error);
+});
 
 // response interceptor
 service.interceptors.response.use((response) => {
-  return response.data
+    return response.data;
 }, (error) => {
     notification.error({
         key,
         message: '系统提示',
         description: '网络超时,请刷新页面'
-      })
-    return 
-  })
+    });
+    return;
+});
 
 const installer = {
-  vm: {},
-  install(Vue, router = {}) {
-    Vue.use(VueAxios, router, service)
-  }
-}
+	vm: {},
+	install(Vue, router = {}) {
+		Vue.use(VueAxios, router, service);
+	}
+};
 
 export {
-  installer as VueAxios,
-  service as axios
-}
+    installer as VueAxios,
+	service as axios
+};

+ 60 - 1
src/views/modules/account-config/components/configuration-modal.vue

@@ -325,7 +325,7 @@
                                 </a-tooltip>
                             </a-radio-button>
                             <a-radio-button value="ORIGINAL_VIDEO">原生</a-radio-button>
-                            <a-radio-button value="SPLASH_VIDEO" disabled>开屏</a-radio-button>
+                            <a-radio-button value="SPLASH_VIDEO">开屏</a-radio-button>
                         </a-radio-group>
                     </a-form-model-item>
                 </div>
@@ -910,6 +910,59 @@
                             使用创意轮播,系统将平分各创意展现机会,便于广告主比较各创意投放效果
                         </div>
                     </div>
+                    <div v-else-if="configForm.adUnionVideoType === 'SPLASH_VIDEO'">
+                        <a-form-model-item label="创意内容">
+                            <a-radio-group v-model="configForm.creativeImageMode" button-style="solid">
+                                <a-radio-button value="arr">开屏图片</a-radio-button>
+                            </a-radio-group>
+                        </a-form-model-item>
+                        <a-form-model-item label="行动号召" prop="creativeCallToAction">
+                            <a-select
+                                class="common-input-long"
+                                v-model="configForm.creativeCallToAction"
+                            >
+                                <a-select-option
+                                    v-for="(item, index) in configForm.creativeOptions"
+                                    :key="index + 1"
+                                    :value="item"
+                                >
+                                    {{ item }}
+                                </a-select-option>
+                            </a-select>
+                        </a-form-model-item>
+                        <a-form-model-item label="来源" prop="creativeSource">
+                            <a-input
+                                class="common-input-long"
+                                placeholder="请输入来源"
+                                v-model="configForm.creativeSource"
+                                allow-clear
+                            />
+                        </a-form-model-item>
+                        <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="自动生成视频素材">
+                            <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
+                                <a-radio-button :value="0">不启用</a-radio-button>
+                                <a-radio-button :value="1">启用</a-radio-button>
+                            </a-radio-group>
+                        </a-form-model-item>
+                        <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="最优创意衍生计划">
+                            <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
+                                <a-radio-button :value="0">不启用</a-radio-button>
+                                <a-radio-button :value="1">启用</a-radio-button>
+                            </a-radio-group>
+                        </a-form-model-item>
+                        <a-form-model-item v-if="isTomatoStatus" label="创意展现">
+                            <a-radio-group v-model="configForm.creativeDisplayMode" button-style="solid">
+                                <a-radio-button value="CREATIVE_DISPLAY_MODE_CTR">优选模式</a-radio-button>
+                                <a-radio-button value="CREATIVE_DISPLAY_MODE_RANDOM">轮播模式</a-radio-button>
+                            </a-radio-group>
+                        </a-form-model-item>
+                        <div v-if="configForm.creativeDisplayMode === 'CREATIVE_DISPLAY_MODE_CTR'" class="adver-position-radio">
+                            选择优选模式,系统会自动对效果好的创意进行展示量倾斜,创意效果越好展示量越高
+                        </div>
+                        <div v-if="configForm.creativeDisplayMode === 'CREATIVE_DISPLAY_MODE_RANDOM'" class="adver-position-radio">
+                            使用创意轮播,系统将平分各创意展现机会,便于广告主比较各创意投放效果
+                        </div>
+                    </div>
                     <div v-else>
                         <a-form-model-item label="创意内容">
                             <a-radio-group v-model="configForm.creativeImageMode" button-style="solid">
@@ -1872,6 +1925,12 @@ export default {
         },
         handleAdUnionVideoType(e) {
             this.$refs['ruleForm'].clearValidate(['creativeSource']);
+            if (e.target.value === 'SPLASH_VIDEO') {
+                this.configForm.creativeImageMode = 'arr';
+            }
+            else {
+                this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
+            }
         },
         NewCheckboxChangeValue(newVal) {
             this.$refs['ruleForm'].clearValidate(['creativeSource']);

+ 2 - 2
src/views/modules/copy-library/copy-library-server.js

@@ -6,5 +6,5 @@
 // export const urlAcount = 'http://118.24.244.213:8080'; // 线上
 // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
 // export const urlAcount = 'http://192.168.1.43:8080'; // 子安
-// export const urlAcount = 'http://139.186.165.84:8080'; // 测试
-export const urlAcount = 'http://192.168.1.8:8080'; // 学超
+export const urlAcount = 'http://139.186.165.84:8080'; // 测试
+// export const urlAcount = 'http://192.168.1.8:8080'; // 学超

+ 2 - 2
src/views/modules/user-manage-operation/user-manage-operation-server.js

@@ -3,8 +3,8 @@
  * @author jiayufei
  */
 
- export const urlAcount = 'http://118.24.244.213:8080'; // 线上
+//  export const urlAcount = 'http://118.24.244.213:8080'; // 线上
  // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
 //  export const urlAcount = 'http://192.168.1.43:8080'; // 子安
-//  export const urlAcount = 'http://139.186.165.84:8080'; // 测试
+ export const urlAcount = 'http://139.186.165.84:8080'; // 测试
 //  export const urlAcount = 'http://192.168.1.8:8080'; // 学超

+ 2 - 2
vue.config.js

@@ -87,8 +87,8 @@ module.exports = {
 				// target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
 				// target:'http://118.24.244.213:8804',
 				// target: 'http://192.168.1.43:8806', // 子安
-				target: 'http://192.168.1.8:8806', // 学超
-				// target:'http://139.186.165.84:8806', //测试
+				// target: 'http://192.168.1.8:8806', // 学超
+				target:'http://139.186.165.84:8806', //测试
 				// target:'http://apipre.tjyourong.com.cn', //预生产
 
 				ws: false,