瀏覽代碼

完成小说接口对接

master
Eddie 3 年之前
父節點
當前提交
d0151bfa7d
共有 3 個文件被更改,包括 318 次插入0 次删除
  1. +3
    -0
      src/router/index.js
  2. +24
    -0
      src/router/modules/set-advertising.js
  3. +291
    -0
      src/views/set-advertising/set-advertising.vue

+ 3
- 0
src/router/index.js 查看文件

@@ -15,6 +15,8 @@ import booksManagement from './modules/books-management'
import sortManagement from './modules/sort-management'

import basicSetting from './modules/basic-setting'
import setAdvertising from './modules/set-advertising'




@@ -91,6 +93,7 @@ export const asyncRoutes = [
memberManagement,
booksManagement,
sortManagement,
setAdvertising,
// 404 page must be placed at the end !!!
{ path: '*', redirect: '/404', hidden: true }
]


+ 24
- 0
src/router/modules/set-advertising.js 查看文件

@@ -0,0 +1,24 @@
/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const basicSetting = {
path: '/set-advertising',
component: Layout,
redirect: '/set-advertising',
name: 'set-advertising',
meta: {
title: '广告设置',
icon: 'system-management'
},
children: [
{
path: 'article',
component: () => import('@/views/set-advertising/set-advertising'),
name: 'articleManagement',
meta: { title: '广告设置' }
},
]
}
export default basicSetting

+ 291
- 0
src/views/set-advertising/set-advertising.vue 查看文件

@@ -0,0 +1,291 @@
<template>
<div class="basic-box">
<el-form ref="formData" :model="formData" label-width="220px">
<div v-if="formData.advertisement">
<div class="basic-title">广告设置</div>
<el-form-item label="开屏广告" prop="advertisement.open_screen_ad.is_select">
<el-switch
v-model="formData.advertisement.open_screen_ad.is_select"
:active-value="1"
:inactive-value="0"
></el-switch>
<div style="display: flex">
<div style="margin-right: 60px">
<el-form-item label="" prop="advertisement.open_screen_ad.you_liang_hui">
<el-checkbox
:true-label="1"
:false-label="0"
v-model="formData.advertisement.open_screen_ad.you_liang_hui"
>优量汇</el-checkbox
></el-form-item
>
</div>
<div style="margin-right: 60px">
<el-form-item
label=""
prop="advertisement.open_screen_ad.kuai_shou_lian_meng"
>
<el-checkbox
:true-label="1"
:false-label="0"
v-model="formData.advertisement.open_screen_ad.kuai_shou_lian_meng"
>快手联盟</el-checkbox
></el-form-item
>
</div>
<div style="margin-right: 60px">
<el-form-item label="" prop="advertisement.open_screen_ad.chuang_sha_jia">
<el-checkbox
:true-label="1"
:false-label="0"
v-model="formData.advertisement.open_screen_ad.chuang_sha_jia"
>穿山甲</el-checkbox
></el-form-item
>
</div>
</div>
</el-form-item>

<el-form-item
label="动态信息流"
prop="advertisement.dynamic_information_flow.is_select"
>
<el-switch
v-model="formData.advertisement.dynamic_information_flow.is_select"
:active-value="1"
:inactive-value="0"
></el-switch>
<div style="display: flex">
<div style="margin-right: 60px">
<el-form-item
label=""
prop="advertisement.dynamic_information_flow.you_liang_hui"
>
<el-checkbox
:true-label="1"
:false-label="0"
v-model="formData.advertisement.dynamic_information_flow.you_liang_hui"
>优量汇</el-checkbox
></el-form-item
>
</div>
<div style="margin-right: 60px">
<el-form-item
label=""
prop="advertisement.dynamic_information_flow.kuai_shou_lian_meng"
>
<el-checkbox
:true-label="1"
:false-label="0"
v-model="
formData.advertisement.dynamic_information_flow.kuai_shou_lian_meng
"
>快手联盟</el-checkbox
></el-form-item
>
</div>
<div style="margin-right: 60px">
<el-form-item
label=""
prop="advertisement.dynamic_information_flow.chuang_sha_jia"
>
<el-checkbox
:true-label="1"
:false-label="0"
v-model="formData.advertisement.dynamic_information_flow.chuang_sha_jia"
>穿山甲</el-checkbox
></el-form-item
>
</div>
</div>
</el-form-item>

<el-form-item label="banner广告" prop="advertisement.banner_ad.is_select">
<el-switch
v-model="formData.advertisement.banner_ad.is_select"
:active-value="1"
:inactive-value="0"
></el-switch>
<div style="display: flex">
<div style="margin-right: 60px">
<el-form-item label="" prop="advertisement.banner_ad.you_liang_hui">
<el-checkbox
:true-label="1"
:false-label="0"
v-model="formData.advertisement.banner_ad.you_liang_hui"
>优量汇</el-checkbox
></el-form-item
>
</div>
<div style="margin-right: 60px">
<el-form-item label="" prop="advertisement.banner_ad.kuai_shou_lian_meng">
<el-checkbox
:true-label="1"
:false-label="0"
v-model="formData.advertisement.banner_ad.kuai_shou_lian_meng"
>快手联盟</el-checkbox
></el-form-item
>
</div>
<div style="margin-right: 60px">
<el-form-item label="" prop="advertisement.banner_ad.chuang_sha_jia">
<el-checkbox
:true-label="1"
:false-label="0"
v-model="formData.advertisement.banner_ad.chuang_sha_jia"
>穿山甲</el-checkbox
></el-form-item
>
</div>
</div>
</el-form-item>
</div>

<div v-if="formData.mob">
<div class="basic-title">广告SDK设置</div>

<el-form-item label=" ">
<div style="display: flex">
<div style="margin-right: 60px">
<el-form-item label="" prop="advertisement_sdk.you_liang_hui">
<el-checkbox
:true-label="1"
:false-label="0"
v-model="formData.advertisement_sdk.you_liang_hui"
>优量汇</el-checkbox
></el-form-item
>
</div>
<div style="margin-right: 60px">
<el-form-item label="" prop="advertisement_sdk.kuai_shou_lian_meng">
<el-checkbox
:true-label="1"
:false-label="0"
v-model="formData.advertisement_sdk.kuai_shou_lian_meng"
>快手联盟</el-checkbox
></el-form-item
>
</div>
<div style="margin-right: 60px">
<el-form-item label="" prop="advertisement_sdk.chuang_sha_jia">
<el-checkbox
:true-label="1"
:false-label="0"
v-model="formData.advertisement_sdk.chuang_sha_jia"
>穿山甲</el-checkbox
></el-form-item
>
</div>
</div>
<div style="color: #1890ff; font-size: 12px">
<i class="el-icon-warning"></i>
可多选,选多个会自动选择适合的进行展示,打包时需要同时勾选
</div>
</el-form-item>

<el-form-item label="优量汇媒体ID(Android):" prop="advertisement_sdk_value.you_liang_hui.media_id_android">
<el-input v-model="formData.advertisement_sdk_value.you_liang_hui.media_id_android" show-password></el-input>
</el-form-item>
<el-form-item label="优量汇媒体ID(iOS):" prop="advertisement_sdk_value.you_liang_hui.media_id_ios">
<el-input v-model="formData.advertisement_sdk_value.you_liang_hui.media_id_ios" show-password></el-input>
</el-form-item>

<el-form-item label="优量汇广告位ID(Android):" prop="advertisement_sdk_value.you_liang_hui.ad_space_id_android">
<el-input v-model="formData.advertisement_sdk_value.you_liang_hui.ad_space_id_android"show-password></el-input>
</el-form-item>

<el-form-item label="优量汇广告位ID(iOS):" prop="advertisement_sdk_value.you_liang_hui.ad_space_id_ios">
<el-input v-model="formData.advertisement_sdk_value.you_liang_hui.ad_space_id_ios"show-password></el-input>
</el-form-item>

<el-form-item label="快手联盟媒体ID(Android):" prop="advertisement_sdk_value.kuai_shou_lian_meng.media_id_android">
<el-input v-model="formData.advertisement_sdk_value.kuai_shou_lian_meng.media_id_android" show-password></el-input>
</el-form-item>
<el-form-item label="快手联盟媒体ID(iOS):" prop="advertisement_sdk_value.kuai_shou_lian_meng.media_id_ios">
<el-input v-model="formData.advertisement_sdk_value.kuai_shou_lian_meng.media_id_ios" show-password></el-input>
</el-form-item>
<el-form-item label="快手联盟广告位ID(Android):" prop="advertisement_sdk_value.kuai_shou_lian_meng.ad_space_id_android">
<el-input v-model="formData.advertisement_sdk_value.kuai_shou_lian_meng.ad_space_id_android" show-password></el-input>
</el-form-item>
<el-form-item label="快手联盟广告位ID(iOS):" prop="advertisement_sdk_value.kuai_shou_lian_meng.ad_space_id_ios">
<el-input v-model="formData.advertisement_sdk_value.kuai_shou_lian_meng.ad_space_id_ios" show-password></el-input>
</el-form-item>




<el-form-item label="穿山甲媒体ID(Android):" prop="advertisement_sdk_value.chuang_sha_jia.media_id_android">
<el-input v-model="formData.advertisement_sdk_value.chuang_sha_jia.media_id_android" show-password></el-input>
</el-form-item>
<el-form-item label="穿山甲媒体ID(iOS):" prop="advertisement_sdk_value.chuang_sha_jia.media_id_ios">
<el-input v-model="formData.advertisement_sdk_value.chuang_sha_jia.media_id_ios" show-password></el-input>
</el-form-item>
<el-form-item label="穿山甲广告位ID(Android):" prop="advertisement_sdk_value.chuang_sha_jia.ad_space_id_android">
<el-input v-model="formData.advertisement_sdk_value.chuang_sha_jia.ad_space_id_android" show-password></el-input>
</el-form-item>
<el-form-item label="穿山甲广告位ID(iOS):" prop="advertisement_sdk_value.chuang_sha_jia.ad_space_id_ios">
<el-input v-model="formData.advertisement_sdk_value.chuang_sha_jia.ad_space_id_ios" show-password></el-input>
</el-form-item>
</div>
<el-form-item class="ml-100" style="margin-top: 50px">
<button class="blue-btn" @click.prevent="handleSubmit">提交</button>
<button class="gray-btn ml-10" @click="resetQuery">重置</button>
</el-form-item>
</el-form>
</div>
</template>

<script>
import { getBasicSetting, getBasicCreate } from "@/api/basic-setting";

export default {
data() {
return {
formData: {},
};
},
mounted() {
this.init();
},
methods: {
init() {
getBasicSetting().then((res) => {
this.formData = res.data;
});
},

handleSubmit() {
getBasicCreate(this.formData)
.then((res) => {
this.$message.success("保存成功");
this.init();
})
.catch((err) => {
return;
});
},
resetQuery() {
this.$refs.formData.resetFields();
},
},
};
</script>

<style lang="scss" scoped>
.basic-box {
width: 80%;
box-sizing: border-box;
padding: 63px 0 0px 150px;
.basic-title {
color: #333333;
font-size: 16px;
padding-left: 10px;
height: 16px;
line-height: 16px;
border-left: #1890ff 5px solid;
font-weight: bold;
margin-bottom: 30px;
margin-left: 50px;
}
}
</style>

Loading…
取消
儲存