<template>
    <!-- 广告服务 -->
    <div>
        <!-- 广告页面头部 -->
        <!-- <AdvertisingHead></AdvertisingHead> -->
        <HomePageHead></HomePageHead>
        <HomePageNavigation1></HomePageNavigation1>

        <div class="adtips">
            <div class="inner">
                <p v-if="activeName == '1'">注意：广告购买需提交信息，用户与商务人员进行线下金额交易，交易成功后由商务人员后台审核。审核通过，即广告投放成功。</p>
            </div>
        </div>
        <div class="advertising">
            <div class="inner">

                <el-tabs v-model="activeName" :tab-position="tabPosition" class="demo-tabs" @tab-change="goOrderList">
                    
                    <!-- {{  ad }} -->
                    <el-tab-pane label="广告购买" name="1" @click="goBuyAd">

                         
                        <!-- 广告购买 -->
                        <div id="buyAd">
                            <div class="buyAD">
                                <div class="inner">

                                    <!-- 填写广告信息内容 -->
                                    <div class="textOne" v-if="ad == 1">
                                        <el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="120"
                                            class="demo-ruleForm" :size="formSize" status-icon>
                                            <el-form-item label="广告名称:" prop="adName">
                                                <el-input v-model="ruleForm.adName" placeholder="请输入广告名称" />
                                            </el-form-item>
                                            <el-form-item label="广告链接:" prop="adLink">
                                                <el-input v-model="ruleForm.adLink" placeholder="请输入广告链接" />
                                            </el-form-item>

                                            <el-form-item label="广告持续时间:" required class="">
                                                <el-config-provider :locale="zhCn">
                                                    <!-- <el-date-picker v-model="ruleForm.time" type="daterange"
                                                        range-separator="至" start-placeholder="请选择开始时间"
                                                        end-placeholder="请选择结束时间" :size="size" @change="changeStartTime"
                                                        :disabled-date="disabledStartTime" /> -->
                                                    <el-date-picker v-model="ruleForm.time" type="datetimerange"
                                                        format="YYYY-MM-DD HH:mm"
                                                        value-format="YYYY-MM-DD HH:00:00"
                                                        range-separator="至" start-placeholder="请选择开始时间"
                                                        end-placeholder="请选择结束时间" :size="size" @change="changeStartTime"
                                                        :disabled-date="disabledStartTime"
                                                        :disabledMinutes="disabledMinutes">
                                                    </el-date-picker>

                                                </el-config-provider>
                                            </el-form-item>
   
  
                                            
                                            <el-form-item label="广告尺寸:" prop="adSize">
                                                <el-radio-group v-model="ruleForm.adSize">
                                                    <el-radio :value="item.id" v-for="item in options" :key="item.id"
                                                        @change="changeAdSize">{{
                                                            item.size }}</el-radio>
                                                </el-radio-group>
                                                <!-- <el-select v-model="ruleForm.adSize" placeholder="请选择广告尺寸" @change="changeAdSize">
                                                    <el-option v-for="item in options" :key="item.id" :label="item.size"
                                                        :value="item.id"></el-option>
                                                </el-select> -->
                                                <a class="pic" @click="goPhoto">查看示意图</a>
                                            </el-form-item>

                                            <!-- 表格部分 phone-->
                                            <div class="pc_none">

                                                <div class="phone_advertis_box" v-show="tableData.length <= 0">

                                                     <div class="phone_advertis_head">
                                                         <div class="phone_advertis_head_li">网站</div>
                                                        <div class="phone_advertis_head_li">广告位名称</div>
                                                        <div class="phone_advertis_head_li">广告尺寸</div>
                                                        <div class="phone_advertis_head_li">金额(元)/天</div>
                                                     </div>   

                                                     <div class="phone_advertis_text"> 请先选择广告持续时间</div>
                                                </div>
 
                                                <div class="phone_advertis_ul">

                                                    <div class="phone_advertis_li" v-for="(per_obj,per_index) in tableData" :key="per_obj">
                                                        <div class="phone_advertis_li_in ">

                                                            <div class="phone_advertis_li_tip">
                                                                
                                                                <label class="phone_advertis_li_label">网站:</label>
                                                                <div class="phone_advertis_li_text"> {{ per_obj.website_name }}</div>
                                                            </div>
                                                            
                                                            <div class="phone_advertis_li_tip">
                                                                
                                                                <label class="phone_advertis_li_label">广告位名称:</label>
                                                                <div class="phone_advertis_li_text">{{ per_obj.name }}</div>
                                                            </div>
                                                            
                                                            <div class="phone_advertis_li_tip">
                                                                <label class="phone_advertis_li_label">广告尺寸:</label>
                                                                <div class="phone_advertis_li_text">{{ per_obj.size }}</div>
                                                            </div>
                                                            
                                                            <div class="phone_advertis_li_tip">

                                                                <label class="phone_advertis_li_label">金额(元)/天:</label>
                                                                <div class="phone_advertis_li_text">{{ per_obj.price }}</div>

                                                            </div>
                                                        </div>
 
    
                                                        <el-checkbox v-model="per_obj.selected" class="phone_advertis_li_btn"
                                                                @change="toggleRowSelection(per_obj)">
                                                        </el-checkbox>

                                                    </div>

                                                </div>

                                            </div>




                                            <!-- 表格部分 pc-->
                                            <div class="pageTable phone_none">


                                                <el-table :data="tableData" border ref="multipleTable" empty-text="请先选择广告持续时间"
                                                    @selection-change="handleSelectionChange" style="width: 100%"
                                                    :header-row-style="{ height: '60px' }"
                                                    :row-style="{ height: '74px' }"
                                                    :header-cell-style="{ backgroundColor: '#fafafa', color: '#666' }">
                                                    <!-- <el-table-column type="selection" :reserve-selection="true"
                                                        width="152" align="center" /> -->
                                                    <el-table-column width="" align="center" >
                                                        <template #default="{ row }">
                                                            <el-checkbox v-model="row.selected"
                                                                @change="toggleRowSelection(row)">
                                                            </el-checkbox>
                                                        </template>
                                                    </el-table-column>

                                                    <el-table-column prop="website_name" label="网站" width="220" />
                                                    <el-table-column prop="name" label="广告位名称" width="320" />
                                                    <el-table-column prop="size" label="广告尺寸" width="180" />
                                                    <el-table-column prop="price" label="金额 (元) / 天" width="160" />
                                                </el-table>
                                            </div>

                                            <el-form-item label="广告图:" prop="adImg">
                                                <el-upload class="avatar-uploader" action="#" :show-file-list="false"
                                                    :on-success="handleAvatarSuccess"
                                                    :before-upload="beforeAvatarUpload" accept=".jpg,.jpeg,.png">
                                                    <img v-if="imageUrl" :src="imageUrl" class="avatar" />
                                                    <div v-else>
                                                        <el-icon class="avatar-uploader-icon">
                                                            <Plus></Plus>
                                                            <div class="chooseImgDiv">选择图片</div>
                                                        </el-icon>
                                                    </div>
                                                </el-upload>
                                            </el-form-item>
                                        </el-form>


                                        <!-- 示意图弹框 -->
                                        <el-dialog v-model="dialogTableVisible" :show-close="false" width="1280px"
                                            :close-on-click-modal="false">
                                            <template #header="{ close, titleId, titleClass }">
                                                <div class="my-header">
                                                    <h4 :id="titleId" :class="titleClass" class="left">示意图类型</h4>
                                                    <el-button type="danger" @click="close" class="right">
                                                        <el-icon class="el-icon--left">
                                                            <CircleCloseFilled />
                                                        </el-icon>
                                                        关闭
                                                    </el-button>
                                                </div>
                                            </template>
                                            <div class="block text-center dialogPicBox" m="t-4">
                                                <el-carousel trigger="click" height="680px" autoplay="">
                                                    <el-carousel-item>
                                                       <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/new1.png" alt="">
                                                    </el-carousel-item>
                                                    <el-carousel-item>
                                                        <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/new2.png" alt="">
                                                    </el-carousel-item>
                                                </el-carousel>
                                            </div>
                                        </el-dialog>
                                    </div>

                                    <!-- 提交工单信息 -->
                                    <div class="submit" v-if="ad == 2">
                                        <div class="inner">
                                            <h1>广告信息已提交成功，请等待审核......</h1>
                                            <p>
                                                工单编号:
                                                <span>{{ orderInformation }}</span>
                                            </p>
                                            <div class="btn">
                                                <button class="check" @click="lookOrder">查看工单</button>
                                                <button class="apply" @click="reapply">再次申请</button>
                                            </div>
                                            <span>如有疑问，可联系客服人员。</span>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </el-tab-pane>
                    <el-tab-pane label="工单列表" name="2">
                        <!-- 工单列表 -->
                        <AdvertisingOrderList @childData="handleChildData"></AdvertisingOrderList>
                    </el-tab-pane>
                    
                </el-tabs>

            </div>
            <div class="bottom" v-if="ad == 1 && activeName == '1'" :key="ad">
                <div class="inner">
                    <!-- 总金额 -->
                    <div class="amount" v-if="ad == 1">
                        总金额:
                        <span>{{ priceTotal == '' ? 0 : priceTotal }}</span>
                        元
                    </div>
                    <!-- 按钮 -->
                    <div class="btn">
                        <button class="btn2" @click="submitStep" v-if="ad == 1"> 提交工单</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- 广告页面底部 -->
        <HomeFoot1></HomeFoot1>

    </div>
</template>

<script setup>
import { ref, onMounted, watch, reactive } from 'vue'
// import { ElCheckbox, ElRadio, ElRadioGroup, ElDatePicker, ElInput, ElUpload, ElPagination, ElIcon, ElSelect, ElOption, ElTabs, ElTabPane, ElTable, ElTableColumn, ElMessage, ElForm, ElFormItem, ElCol, valueEquals } from 'element-plus'
import { ElCheckbox, ElRadio, ElRadioGroup, ElDatePicker, ElInput, ElUpload, ElPagination, ElIcon, ElSelect, ElOption, ElTabs, ElTabPane, ElTable, ElTableColumn, ElMessage, ElForm, ElFormItem, ElCol, valueEquals, ElConfigProvider,ElCarousel, ElCarouselItem } from 'element-plus'
import { ElButton, ElDialog } from 'element-plus'
import { CircleCloseFilled } from '@element-plus/icons-vue'
import { Plus, DArrowRight, Edit, Picture, UploadFilled } from '@element-plus/icons-vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
import { getToken, setToken, removeToken } from '@/store/useCookieStore'
const { $webUrl, $CwebUrl, $BwebUrl,$LoginWebUrl } = useNuxtApp()


import { useRoute } from 'vue-router'

const route = useRoute()

// axios请求
const nuxtApp = useNuxtApp();
const axios = nuxtApp.$axios;

// 通过变量ad控制tab栏标题的颜色及每一步下的不同的内容
let ad = useState("ad", () => 1)
let dialogTableVisible = useState("dialogTableVisible", () => false)//示意图弹框
let dialogTableVisible1 = useState("dialogTableVisible1", () => false)//示意图弹框

let activeName = useState("activeName", () => "1")
let startTime = useState("startTime", () => new Date())
let adSize = useState("adSize", () => "")
let tableData = useState("tableData", () => [])
let processedData = useState("processedData", () => [])
let pid = useState("pid", () => [])
let pids = useState("pids", () => [])
let pidArr = useState("pidArr", () => [])
let orderInformation = useState("orderInformation", () => "")
let adWeb = useState("adWeb", () => "")
let adWebId = useState("adWebId", () => "")
let adWebList = useState("adWebList", () => [])
let priceTotal = useState("priceTotal", () => '')//总金额
let orderId = useState("orderId", () => "")
let options = useState('options', () => [])
const multipleTable = ref('');
let shopCode = useState('shopCode', () => '')
let token = useState('token', () => '')
let showToken = useState("showToken", () => '')


watch(token, (newval, oldval) => {
    console.log(newval, oldval);
    showToken.value = newval
}, {
    deep: true,
    immediate: true,
})

// 定义响应式数据
const seoData = ref({
    title: '广告服务',
    description: '默认描述',
    keywords: '默认关键词',
    image: 'https://example.com/default-image.jpg'
});

// 在 onMounted 钩子中获取数据
onMounted(() => {
    seoData.value.title = '广告服务';
    seoData.value.description = '默认描述';
    seoData.value.keywords = '默认关键词';
})

// 分页
let total = useState('total', () => 0)
let pageSize = useState("pageSize", () => 20)
let page = useState("page", () => 1)

//ruleForm
let logoUrl = ref('');
const formSize = ref('default');
const ruleFormRef = ref();
const ruleForm = reactive({
    adName: '',
    adLink: '',
    time: "",
    startTime: '',
    endTime: '',
    adSize: 1,
    adImg: '',
});

const rules = reactive({
    adName: [{ required: true, message: '请输入广告名称', trigger: 'blur' }],
    adLink: [{ required: true, message: '请输入广告链接', trigger: 'change' }],
    startTime: [{ required: true, message: '请输入开始时间', trigger: 'change' }],
    endTime: [{ required: true, message: '请输入结束时间', trigger: 'change' }],
    adSize: [{ required: true, message: '请选择广告尺寸', trigger: 'change' }],
    adImg: [{ required: true, message: '请选择广告图', trigger: 'change' }],
});

const tabPosition = ref('left')



//禁用分钟
const disabledMinutes = () => {
    return Array.from({ length: 60 }, (_, i) => i).filter(minute => minute !== 0);
}

// 获取开始时间
let changeStartTime = (val) => {
    //第一步，获取用户选择的时间跟当前时间进行对比
    let setTime = new Date(new Date(val[0])).getTime();
    let localtime = new Date().getTime();

    if(setTime < localtime){
        //第二步，将时间戳转换为本地时间
        ElMessage.error('时间选择错误，已为您自动重设！');
        //获取当前小时之后的整数小时0分0秒
        let time1 = new Date(new Date(val[0]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
        let time2 = new Date(new Date(val[1]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
        //同样的道理，获取当前时间的下一个整数小时0分0秒
        let currentTimestamp = new Date(new Date().setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();

        let localTime = new Date(currentTimestamp).toLocaleString('zh-CN', {
            year: 'numeric',
            month: '2-digit',
            day: '2-digit',
            hour: '2-digit',
            minute: '2-digit'
        }).replace(/\//g, '-');
        //第三步，将当前时间加24小时
        let twoHoursLocalTime = new Date(currentTimestamp + 24 * 60 * 60 * 1000).toLocaleString('zh-CN', {
            year: 'numeric', 
            month: '2-digit',
            day: '2-digit',
            hour: '2-digit',
            minute: '2-digit'
        }).replace(/\//g, '-');

        //第四步，将当前时间赋值给ruleForm.time[0]
        ruleForm.time[0] = localTime;
        ruleForm.time[1] = twoHoursLocalTime;
        ruleForm.startTime = localTime;
        ruleForm.endTime = twoHoursLocalTime;

        //获取广告尺寸
        getAdSize()
        //创建购物车
        axios.post("/order/addShoppingCart").then(response => {
            // console.log("创建购物车", response.data);
            shopCode.value = response.data
            console.log('shopCode', shopCode.value);
        })

    }else{
        //获取当前小时之后的整数小时0分0秒
        let time1 = new Date(new Date(val[0]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
        let time2 = new Date(new Date(val[1]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
        //同样的道理，获取当前时间的下一个整数小时0分0秒
        let currentTimestamp = new Date(new Date().setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();

        //第二种情况，传入的时间戳大于当前时间
        //但是时间间隔小于2小时
        if(time2 - time1 < 24 * 60 * 60 * 1000){
            ElMessage.error('广告持续时间不得低于24小时，已为您自动重设！');
            //第一步，将时间戳转换为本地时间
            let localTime = new Date(currentTimestamp).toLocaleString('zh-CN', {
                year: 'numeric',
                month: '2-digit',
                day: '2-digit',
                hour: '2-digit',
                minute: '2-digit'
            }).replace(/\//g, '-');
            //第二步，将当前时间加2小时
            let twoHoursLocalTime = new Date(currentTimestamp + 24 * 60 * 60 * 1000).toLocaleString('zh-CN', {
                year: 'numeric', 
                month: '2-digit',
                day: '2-digit',
                hour: '2-digit',
                minute: '2-digit'
            }).replace(/\//g, '-');

        
            //第三步，将当前时间赋值给ruleForm.time[0]
            ruleForm.time[0] = localTime;
            ruleForm.time[1] = twoHoursLocalTime;
            ruleForm.startTime = localTime;
            ruleForm.endTime = twoHoursLocalTime;

            
            //获取广告尺寸
            getAdSize()
            //创建购物车
            axios.post("/order/addShoppingCart").then(response => {
                // console.log("创建购物车", response.data);
                shopCode.value = response.data
                console.log('shopCode', shopCode.value);
            })

        }else{
            //第三种情况，用户时间选择正确，无需操作
            ruleForm.startTime = val[0]
            ruleForm.endTime = val[1]
            //获取广告尺寸
            getAdSize()
            //创建购物车
            axios.post("/order/addShoppingCart").then(response => {
                // console.log("创建购物车", response.data);
                shopCode.value = response.data
                console.log('shopCode', shopCode.value);
            })
        }
    }


    //第四种情况，使广告立即生效，请注释上面的if 直接使用下面这一段
    // ruleForm.startTime = val[0]
    // ruleForm.endTime = val[1]
    // //获取广告尺寸
    // getAdSize()
    // //创建购物车
    // axios.post("/order/addShoppingCart").then(response => {
    //     // console.log("创建购物车", response.data);
    //     shopCode.value = response.data
    //     console.log('shopCode', shopCode.value);
    // })

}
//禁止选择的时间区域
let disabledStartTime = (time) => {
    // console.log("time", time);
    return time.getTime() <= (Date.now() - 3600 * 1000 * 24);
}

const imageUrl = ref('');
const handleAvatarSuccess = (response, uploadFile) => {
    imageUrl.value = URL.createObjectURL(uploadFile.raw);
};
const bb = (item) => {
    console.log("===", item)
    navigateTo({
        path: "/advertising/addetail",
        query: {
            id: item
        }
    })
}
//获取图片地址
const beforeAvatarUpload = (file) => {
    console.log('file', file);

    if (!file) return;
    const isJPG = file.type === 'image/jpeg';
    const isPNG = file.type === 'image/png';
    const isLt2M = file.size / 1024 / 1024 < 2;

    if (!isJPG && !isPNG) {
        ElMessage.error('上传图片只能是 JPG 或 PNG 格式!');
        return;
    }
    if (!isLt2M) {
        ElMessage.error('上传图片大小不能超过 2MB!');
        return;
    }

    const data = new FormData();
    data.append('file', file);

    axios.post("/public/uploadFile", data).then(res => {
        console.log(res);
        logoUrl.value = res.data.imgUrl;
        ruleForm.adImg = res.data.imgUrl;
    }).catch(() => {
        ElMessage({
            type: 'info',
            message: '网络错误，请重试！'
        });
    });
};

let goPhoto = () => {
    dialogTableVisible.value = true
}

//选择的广告位
let handleSelectionChange = (selectedRows) => {

    pidArr.value = selectedRows.map(row => row.pid);
    console.log("选中的广告位llllllllll", pidArr.value);
    // getPrice() //获取总金额
    let aa = JSON.parse(JSON.stringify(pidArr.value))
    console.log("pids", aa);

    for (let item = 0; item <= aa.length - 1; item++) {
        console.log('pidArr.value', aa[item]);
        pids.value = aa[item]
    }
}

pidArr.value.forEach((item) => {
    const index = tableData.findIndex((row) => row.id === item);
    if (index !== -1) {
        tableData[index].selected = true;
    }
});

let toggleRowSelection = (row) => {
    console.log('11111', row);
    console.log('类型', typeof (row.pid));

    // 判断 row.pid 是否已经存在于 pid.value 数组中
    const isExist = pid.value.includes(row.pid);
    console.log('判断当前选择的id是否已被选择', isExist); // 输出: true
    if (isExist) {
        //删除购物车中的广告位
        let data = {
            shopping_id: shopCode.value,
            pid: row.pid,
        }
        //删除购物车接口
        axios.post('/order/delShoppingCartAD', data).then(data => {
            console.log('删除购物车广告位--------------', data);
            if (data.code == 200) {
                getShoppingCartAD()
            }
        })
    } else {
        //添加购物车中的广告位
        let data = {
            shopping_id: shopCode.value,
            pid: row.pid,
        }
        //添加购物车接口
        axios.post('/order/addShoppingCartAD', data).then(data => {
            console.log('添加购物车广告位--------------', data);
            if (data.code == 200) {
                getShoppingCartAD()
            }
        })
    }

};

onMounted(() => {
    tableData.value.forEach((row) => {
        console.log(row);

        if (row.selected) {
            multipleTable.value.toggleRowSelection(row, true);
        }
    });
});


//获取广告尺寸列表
let adSizeList = () => {
    // 搜索按钮接口
    axios.post("/order/getAD").then(response => {
        console.log("response", response);
        options.value = response.data
        for (let item of options.value) {
            console.log(item);
            item.size = item.width + ' * ' + item.height + ' px '
            // ruleForm.adSize = item.id
        }
        console.log("=========", options.value);
    })
}

//查看工单
let lookOrder = () => {
    activeName.value = '2'
    sessionStorage.setItem('activeName', JSON.stringify('2'));
    // window.location.href = (`http://localhost:3000/advertising?activeName=${'2'}`)
    let url = $CwebUrl + '/advertising?activeName=2';
    window.location.href = url;
}

//再次申请
let reapply = () => {
    ad.value = 1
    // window.location.href = ('http://localhost:3000/advertising')
    let url = $CwebUrl + '/advertising';
    window.location.href = url;
}

//获取总金额
const getPrice = () => {
    let data = {
        starttime: ruleForm.startTime,
        endtime: ruleForm.endTime,
        pid: pid.value
    }
    // console.log('data=========', data);

    axios.post('/order/getPrice', data).then(data => {
        console.log('获取到的金额', data.data);
        priceTotal.value = data.data
    })
}


//获取购物车广告位 
const getShoppingCartAD = () => {
    axios.post('/order/getShoppingCartAD', {
        shopping_id: shopCode.value
    }).then(data => {
        console.log('获取购物车广告位=====================', data.data.pid);
        pid.value = data.data.pid
        getPrice()
    })
}


//挂载成功
onMounted(() => {
    adSizeList()
    getPrice()

    if (route.query.activeName == '1' || route.query.activeName == '2') {
        activeName.value = route.query.activeName;
    }
    if (!route.query.activeName) {
        activeName.value = JSON.parse(sessionStorage.getItem('activeName'));
        // console.log('activeName', activeName.value);
    }
})
onMounted(() => {
    // ad.value=route.query.ad

    watch(activeName, (newval) => {
        console.log('activeName', newval);
        sessionStorage.setItem('activeName', JSON.stringify(newval));
    }, {
        deep: true,
        immediate: true
    })
})


//6.子组件传递的数据 start ---------------------------------------->
let handleChildData = (data) => {
    activeName.value = `${data}`
}
//6.子组件传递的数据 end ---------------------------------------->



//广告尺寸发生变化的时候
let changeAdSize = (val) => {
    console.log('val', val);
    ruleForm.adSize = val
    getAdSize()
}

//获取广告尺寸
let getAdSize = () => {
    // 获取广告位需要传递的参数
    let adData = {
        ad_size_id: ruleForm.adSize,
        starttime: ruleForm.startTime,
        endtime: ruleForm.endTime,
        pageSize: pageSize.value,
        page: page.value,
    }

    //获取广告位
    axios.post("/order/getWebsiteAd", adData).then(response => {
        console.log("广告位", response.data);
        // console.log("广告位信息", response.data.rows);
        total.value = response.data.count
        tableData.value = response.data.rows
        for (let item of tableData.value) {
            item.size = item.size_width + ' * ' + item.size_height + ' px '
            item.selected = false
        }
        console.log('tableData', tableData.value);
    }).catch(error => {
        console.log(error);
    })
}


// 点击提交工单信息
let submitStep = () => {
    // 表单验证
    if (ruleForm.adName == '') {
        ElMessage({
            message: '请输入广告名称',
            type: 'error',
        })
        return
    }
    if (ruleForm.adLink == '') {
        ElMessage({
            message: '请输入广告链接',
            type: 'error',
        })
        return
    }
    if (ruleForm.startTime == '') {
        ElMessage({
            message: '请选择广告持续时间!',
            type: 'error',
        })
        return
    }
    if (ruleForm.endTime == '') {
        ElMessage({
            message: '请选择广告尺寸',
            type: 'error',
        })
        return
    }
    if (ruleForm.adSize == '') {
        ElMessage({
            message: '请选择广告尺寸',
            type: 'error',
        })
        return
    }
    if (ruleForm.adImg == '') {
        ElMessage({
            message: '请添加广告图',
            type: 'error',
        })
        return
    }
    ad.value++
    // 获取广告位需要传递的参数
    let orderData = {
        name: ruleForm.adName,
        ad_size_id: ruleForm.adSize,
        starttime: ruleForm.startTime,
        endtime: ruleForm.endTime,
        imgurl: ruleForm.adLink,
        imgsrc: ruleForm.adImg,
        pid: pid.value,
        price: priceTotal.value
    }


    //提交工单
    axios.post("/order/addAD", orderData).then(response => {
        console.log("提交工单", response); //order_id
        console.log("orderData", orderData);

        if (response.code == 200) {
            tableData.value = response.data.rows
            orderInformation.value = response.data.ordernum
            orderId.value = response.data.order_id
        }


    }).catch(error => {
        console.log(error);
    })
}


// // 点击广告购买标签的事件驱动函数
let goBuyAd = () => {
    activeName.value = '1'
}

// 点击工单列表标签的事件驱动函数
let goOrderList = (item) => {

    if (item == 2 && (route.query.activeName == '1' || route.query.activeName == '2')) {
        // window.location.href = ('http://localhost:3000/advertising')
        let url = $CwebUrl + '/advertising';
        window.location.href = url;
    }
}


watch(adSize, (newval) => {
    // console.log('newval', newval);
    adSize.value = newval
}, {
    deep: true,
    immediate: true
})
watch(ad, (newval) => {
    // console.log('adnewval', newval);
    adSize.value = newval
}, {
    deep: true,
    immediate: true
})

//seo
useSeoMeta({
    title: "广告服务" + "_" + "三农资讯网_全国政务信息一体化应用平台",
    meta: [
        { name: 'description', content: "三农资讯网以服务于党和国家各级职能部门三农政务资讯发布及政务公开信息公示为基点，为全国县级以上各级党政机关及其职能部门配置各自公开独立网络发布平台。主要频道有：三农政务资讯，农科资讯，农资购销，农产购销，农贸资讯，三农致富信息，农村文化生活，三农政策法规，三农之窗，三农调查，三农服务，三农知识，农民工，打假维权等。三农资讯网打造最具影响力的三农信息发布平台，并成为最具权威的三农资讯网。_三农资讯网-测试专用_全国政务信息一体化应用平台" , tagPriority: 10 },
        { name: 'keywords', content: "三农资讯,农业,三农,三农在线,农业新闻,三农资讯网_三农资讯网-测试专用_全国政务信息一体化应用平台" , tagPriority: 10 },
        { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no',tagPriority: 10 }
    ]
});
</script>

<style lang="less" scoped>
// 广告页面头部
.head {
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);

    .inner {
        width: 1200px;
        height: 27px;
    }

    .headLogo {

        .webName {
            display: inline-block;

            span {
                margin-right: 30px;
                font-family: Microsoft YaHei, Microsoft YaHei;
                font-weight: 400;
                font-size: 12px;
                color: #666666;
                line-height: 14px;
                text-align: left;
                font-style: normal;
                text-transform: none;
            }
        }

        >span {
            display: inline-block;
            width: 100px;
            padding-left: 25px;
            vertical-align: middle;
            font-family: Microsoft YaHei, Microsoft YaHei;
            font-weight: 400;
            font-size: 12px;
            color: #333333;
            line-height: 21px;
            text-align: left;
            font-style: normal;
            text-transform: none;
            border-left: 1px solid #ccc;
        }
    }

    .right {
        span {
            margin-left: 26px;
            font-family: PingFang SC, PingFang SC;
            font-weight: 400;
            font-size: 12px;
            color: #666666;
            line-height: 14px;
            text-align: left;
            font-style: normal;
            text-transform: none;
        }

        .login,
        .reg,
        .user,
        .topic,
        .ad {
            display: inline-block;
            width: 16px;
            height: 16px;
            vertical-align: -6px;
        }

        .topic {
            background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/shopping-mall.png") no-repeat;
        }

        .ad {
            background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/ad-product.png") no-repeat;
        }

        .login {
            background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/user.png") no-repeat;
        }

        .reg {
            background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/write.png") no-repeat;
        }

        .user {
            background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/user.png") no-repeat;
        }
    }

    .tips1 {
        padding: 20px 0;
        text-align: center;
        font-size: 20px;
        color: #40663B;
        font-weight: bold;

        img {
            width: 78px;
            height: 78px;
            vertical-align: middle;
            margin-right: 20px;

            p {
                line-height: 30px;
            }
        }

        p {
            line-height: 40px;
        }

        >p:first-child {
            margin-bottom: 30px;
        }

    }
}

//提示信息
.adtips {
    width: 100%;
    height: 70px;
    line-height: 70px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);

    .inner {
        width: 1200px;
        height: 70px;
    }

    p {
        font-family: Microsoft YaHei, Microsoft YaHei;
        font-weight: 400;
        font-size: 16px;
        color: #FE0101;
        // line-height: 19px;
        text-align: left;
        font-style: normal;
        text-transform: none;
    }
}


.advertising {
    width: 100%;
    overflow: hidden;

    .inner {
        width: 1520px;
        // height: 900px;
        overflow: hidden;
        position: relative;

        // 左侧tab导航
        :deep(.el-tabs--left .el-tabs__header.is-left) {
            margin-top: 50px;
            margin-right: 10px;
        }

        // 左侧tab导航字体颜色
        :deep(.el-tabs__item.is-active),
        :deep(.el-tabs__item:hover) {
            color: #139602;
            // font-weight: bold;
        }

        // 左侧tab导航字体大小
        :deep(.el-tabs--left .el-tabs__item.is-left) {
            text-align: right;
            font-size: 20px;
        }

        // 左侧tab导航下划线
        :deep(.el-tabs__active-bar) {
            background-color: #139602;
        }

        // 广告购买
        #buyAd {
            width: 1200px;
            margin: 0 35px;

            .buyAD {
                width: 1200px;
                overflow: hidden;

                .inner {
                    width: 1200px;
                    overflow: hidden;
                    position: relative;

                    // 填写信息页tab标题
                    .tabTitle {
                        width: 1100px;
                        height: 80px;
                        padding-top: 26px;
                        margin: 0 auto;
                        box-sizing: border-box;
                        border-bottom: 1px solid rgba(0, 0, 0, 0.1);

                        .icon,
                        .title {
                            font-family: Microsoft YaHei, Microsoft YaHei;
                            font-weight: bold;
                            font-size: 16px;
                            color: #D5D5D5;
                            text-align: center;
                            font-style: normal;
                            text-transform: none;
                        }

                        .number {
                            display: inline-block;
                            width: 32px;
                            height: 32px;
                            line-height: 32px;
                            color: #ffffff;
                            background-color: #d5d5d5;
                            border-radius: 50%;

                        }

                        .bgc {
                            background-color: #139602;
                        }

                        .color {
                            color: #139602;
                        }

                        // 填写广告信息字体及背景颜色
                        .title:first-child {
                            color: #139602;
                        }

                        .title:first-child .number {
                            background-color: #139602;
                        }

                        // 图标>>
                        .icon {
                            padding: 0 165px;
                        }

                    }

                    // 1.填写信息内容
                    .textOne {
                        width: 1100px;
                        overflow: hidden;
                        // height: 515px;
                        margin-top: 35px;
                        margin-left: 50px;

                        .pic {
                            margin-left: 30px;
                            width: 80px;
                            height: 21px;
                            padding-left: 30px;
                            font-family: Microsoft YaHei, Microsoft YaHei;
                            font-weight: 400;
                            font-size: 16px;
                            color: #47ACFF;
                            line-height: 19px;
                            text-align: left;
                            font-style: normal;
                            text-transform: none;
                            cursor: pointer;
                        }

                        //示意图
                        .my-header {
                            display: flex;
                            flex-direction: row;
                            justify-content: space-between;
                            gap: 16px;

                            .el-button {
                                border-radius: var(--el-border-radius-base);
                                font-size: var(--el-font-size-base);
                                background: #ee8787;
                                border: none;
                            }
                        }

                        .graph {
                            background-color: #fff;
                            padding: 40px 60px 80px;
                            overflow: hidden;
                            display: flex;

                            li {
                                float: left;

                                span {
                                    display: inline-block;
                                    width: 246px;
                                    font-family: Microsoft YaHei, Microsoft YaHei;
                                    font-weight: bold;
                                    font-size: 16px;
                                    color: #333333;
                                    line-height: 30px;
                                    text-align: center;
                                    margin-bottom: 15px;
                                }

                                img {
                                    width: 246px;
                                    height: 344px;
                                }
                            }

                            >li:first-child {
                                margin-right: 60px;
                            }

                            >li:last-child {
                                margin-left: 60px;
                            }
                        }

                        // 页面中的表格
                        .pageTable {
                            width: 90%;
                            overflow: hidden;
                            padding-bottom: 60px;
                            margin-left: 110px;
                            box-sizing: border-box;


                            :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
                                background-color: #333;
                                border-color: #333;
                            }

                            :deep(.el-table tr) {
                                background-color: #fafafa;
                                height: 74px;
                            }

                            :deep(.el-table .cell) {
                                text-align: center;
                                box-sizing: border-box;
                                height: 23px;
                                line-height: 23px;
                                overflow-wrap: break-word;
                                padding: 0 12px;
                                text-overflow: ellipsis;
                                white-space: normal;
                                font-family: Microsoft YaHei, Microsoft YaHei;
                                font-weight: 400;
                                font-size: 16px;
                                color: #333333;
                                line-height: 19px;
                                font-style: normal;
                                text-transform: none;
                            }
                        }

                        :deep(.el-select) {
                            --el-select-width: 30%;
                        }

                        :deep(.el-form-item) {
                            margin-bottom: 35px;
                        }

                        .el-col {
                            height: 36px;
                        }

                        .el-col-2 {
                            text-align: center;
                        }

                        .chooseImg {
                            display: block;
                        }

                        .chooseImgDiv {
                            font-size: 16px;
                            font-style: normal;
                        }

                        .avatar-uploader {
                            width: 120px;
                            height: 120px;
                            border: 1px solid #ededed;
                            border-radius: 12px;
                        }

                        .avatar-uploader .avatar {
                            width: 120px;
                            border-top-left-radius: 12px;
                            border-top-right-radius: 12px;
                        }

                        .avatar-uploader .el-upload {
                            border: 1px dashed var(--el-border-color);
                            border-radius: 6px;
                            cursor: pointer;
                            position: relative;
                            overflow: hidden;
                            transition: var(--el-transition-duration-fast);
                        }

                        .avatar-uploader .el-upload:hover {
                            border-color: var(--el-color-primary);
                        }

                        .el-icon.avatar-uploader-icon {
                            display: block;
                            font-size: 36px;
                            color: #8c939d;
                            background-color: #fafafa;
                            width: 120px;
                            height: 120px;
                            padding-top: 30px;
                            box-sizing: border-box;
                            border: 1px solid #EDEDED;
                            border-radius: 12px;
                            text-align: center;
                        }

                        >p {
                            width: 1110px;
                            height: 75px;

                            strong {
                                font-weight: 500;
                                color: #333333;
                                padding: 0 14px;
                            }

                            label {
                                display: inline-block;
                                width: 125px;
                                text-align: right;
                                padding-right: 10px;
                                box-sizing: border-box;
                                font-family: Microsoft YaHei, Microsoft YaHei;
                                font-weight: 400;
                                font-size: 16px;
                                color: #333333;
                                line-height: 19px;
                                font-style: normal;
                                text-transform: none;
                            }

                            >label::before {
                                content: "*";
                                display: inline-block;
                                width: 10px;
                                height: 2px;
                                color: #fe0101;
                            }

                            span {
                                color: #fe0101;
                                display: block;
                                padding-left: 135px;
                                height: 30px;
                            }

                            .upload-demo {
                                display: inline-block;
                                width: 112px;
                                height: 112px;
                                vertical-align: -93px;
                            }

                            //上传图片相关样式
                            .avatar-uploader .el-upload {
                                border: 1px dashed var(--el-border-color);
                                border-radius: 6px;
                                cursor: pointer;
                                position: relative;
                                overflow: hidden;
                                transition: var(--el-transition-duration-fast);
                            }

                            .avatar-uploader .el-upload:hover {
                                border-color: var(--el-color-primary);
                            }

                            .el-icon.avatar-uploader-icon {
                                font-size: 28px;
                                color: #8c939d;
                                width: 178px;
                                height: 178px;
                                text-align: center;
                            }

                            //上传图片相关样式 end


                            :deep(.el-input__wrapper.is-focus) {
                                box-shadow: 0 0 0 1px #c0c4cc;
                            }

                            :deep(.el-date-editor.el-input),
                            :deep(.el-date-editor.el-input__wrapper) {
                                height: 44px;
                                width: 470px;
                            }

                            :deep(.el-input__inner) {
                                font-size: 16px;
                            }

                            :deep(.el-upload-dragger) {
                                padding: 0;
                                margin: 0;
                                border: 1px solid #ededed;
                            }

                            :deep(.el-upload-dragger .el-icon--upload) {
                                font-size: 67px;
                                line-height: 50px;
                                padding: 0;
                                margin: 0;
                            }

                            :deep(.el-upload-dragger .el-upload__text) {
                                font-size: 18px;
                                font-weight: 400;
                                color: #999;
                                text-align: center;
                                margin-bottom: 14px;
                                margin-top: 5px;
                            }

                            :deep(.el-icon svg) {
                                width: 34px;
                                height: 34px;
                            }
                        }

                    }

                    // 2.选择相应网站
                    .textTwo {
                        width: 1200px;
                        overflow: hidden;

                        // 页面头部搜索和按钮
                        .pageTop {
                            width: 1150px;
                            height: 44px;
                            margin: 30px 0 40px 50px;

                            >.left {
                                font-family: Microsoft YaHei, Microsoft YaHei;
                                font-weight: 400;
                                font-size: 16px;
                                color: #333333;
                                line-height: 19px;

                                >a {
                                    width: 80px;
                                    height: 21px;
                                    padding-left: 30px;
                                    font-family: Microsoft YaHei, Microsoft YaHei;
                                    font-weight: 400;
                                    font-size: 16px;
                                    color: #47ACFF;
                                    line-height: 19px;
                                    text-align: left;
                                    font-style: normal;
                                    text-transform: none;
                                }

                                :deep(.el-select__wrapper.is-focused) {
                                    box-shadow: 0 0 0 1px var(--el-border-color) inset;
                                }

                            }

                            >.right {
                                button {
                                    width: 94px;
                                    height: 36px;
                                    line-height: 36px;
                                    font-family: Microsoft YaHei, Microsoft YaHei;
                                    font-weight: 400;
                                    font-size: 16px;
                                    color: #33B023;
                                    line-height: 19px;
                                    text-align: center;
                                    border: none;
                                    border-radius: 7px;
                                }

                                .reset {
                                    border: 1px solid #33B023;
                                    color: #33B023;
                                    background-color: #fff;
                                    margin-right: 25px;
                                }

                                .search {
                                    background-color: #33B023;
                                    color: #ffffff;
                                }
                            }

                        }

                        //示意图
                        .my-header {
                            display: flex;
                            flex-direction: row;
                            justify-content: space-between;
                            gap: 16px;

                            .el-button {
                                border-radius: var(--el-border-radius-base);
                                font-size: var(--el-font-size-base);
                                background: #ee8787;
                                border: none;
                            }
                        }

                        .graph {
                            background-color: #fff;
                            padding: 40px 60px 80px;
                            overflow: hidden;
                            display: flex;

                            li {
                                float: left;

                                span {
                                    display: inline-block;
                                    width: 246px;
                                    font-family: Microsoft YaHei, Microsoft YaHei;
                                    font-weight: bold;
                                    font-size: 16px;
                                    color: #333333;
                                    line-height: 30px;
                                    text-align: center;
                                    margin-bottom: 15px;
                                }

                                img {
                                    width: 246px;
                                    height: 344px;
                                }
                            }

                            >li:first-child {
                                margin-right: 60px;
                            }

                            >li:last-child {
                                margin-left: 60px;
                            }
                        }

                        // 页面中的表格
                        .pageTable {
                            width: 100%;
                            overflow: hidden;
                            padding-bottom: 60px;


                            :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
                                background-color: #333;
                                border-color: #333;
                            }

                            :deep(.el-table tr) {
                                background-color: #fafafa;
                                height: 74px;
                            }

                            :deep(.el-table .cell) {
                                text-align: center;
                                box-sizing: border-box;
                                height: 23px;
                                line-height: 23px;
                                overflow-wrap: break-word;
                                padding: 0 12px;
                                text-overflow: ellipsis;
                                white-space: normal;
                                font-family: Microsoft YaHei, Microsoft YaHei;
                                font-weight: 400;
                                font-size: 16px;
                                color: #333333;
                                line-height: 19px;
                                font-style: normal;
                                text-transform: none;
                            }
                        }

                        // 页码
                        .pagination {
                            display: flex;
                            justify-content: center;
                            // margin-top: 60px;
                            margin-bottom: 90px;

                            // 鼠标移入后字体颜色
                            :deep(.el-pagination:hover) {
                                color: #139609;
                            }

                            :deep(.el-pagination.is-background .btn-next),
                            :deep(.el-pagination.is-background .btn-prev) {
                                width: 70px;
                                height: 34px;
                                margin: 0px 10px;
                                border-radius: 4px;
                            }

                            :deep(.el-pagination.is-background .el-pager li) {
                                margin: 0px 10px;
                                width: 38px;
                                height: 34px;
                                border-radius: 4px;
                            }

                            :deep(.el-pagination.is-background .btn-next.is-active),
                            :deep(.el-pagination.is-background .btn-prev.is-active),
                            :deep(.el-pagination.is-background .el-pager li.is-active) {
                                background-color: #028e21;
                                color: #fff;
                            }
                        }

                    }

                    // 3.提交工单信息
                    .submit {
                        width: 1200px;
                        overflow: hidden;
                        text-align: center;

                        .inner {
                            width: 1100px;
                            padding-left: 50px;
                            padding-bottom: 130px;
                            font-family: Microsoft YaHei, Microsoft YaHei;
                            font-style: normal;
                            text-transform: none;

                            // 标题
                            >h1 {
                                margin-top: 80px;
                                margin-bottom: 30px;
                                font-weight: bold;
                                font-size: 26px;
                                color: #333333;
                                line-height: 30px;
                                text-align: center;
                            }

                            // 工单编号
                            >p {
                                margin-bottom: 257px;
                                font-weight: 400;
                                font-size: 22px;
                                color: #333333;
                                text-align: center;
                            }

                            // 按钮
                            >.btn {
                                margin-bottom: 30px;

                                button {
                                    width: 134px;
                                    height: 50px;
                                    border: none;
                                    font-weight: 400;
                                    font-size: 16px;
                                    text-align: center;
                                    border-radius: 7px;
                                }

                                .check {
                                    background-color: #fff;
                                    color: #33B023;
                                    border: 1px solid #33B023;
                                    margin-right: 160px;
                                }

                                .apply {
                                    background-color: #33B023;
                                    color: #fff;
                                }
                            }

                            // 提示文字
                            >span {
                                font-weight: 400;
                                font-size: 14px;
                                color: #999999;
                            }

                        }

                    }
                }
            }
        }

        //工单列表
        #orderList {
            width: 1200px;
            margin: 0 auto;
        }


    }

    //广告页面底部部分
    .bottom {
        width: 1200px;
        height: 145px;
        background-color: #ecf5ee;
        padding: 0px 30px;
        margin: 0 auto;
        box-sizing: border-box;
        // display: none;

        .inner {
            width: 1200px;
            height: 145px;
            padding: 0;

            .amount {
                float: left;
                padding-top: 52px;
                font-family: Microsoft YaHei, Microsoft YaHei;
                font-weight: 400;
                font-size: 16px;
                color: #333333;
                line-height: 19px;
                text-align: left;
                font-style: normal;
                text-transform: none;

                span {
                    padding: 0 15px 0 25px;
                    font-family: Microsoft YaHei, Microsoft YaHei;
                    font-weight: bold;
                    font-size: 24px;
                    color: #028E21;
                    line-height: 28px;
                    text-align: left;
                    font-style: normal;
                    text-transform: none;
                }
            }

            .btn {
                float: right;
                margin-right: 60px;

                .btn1 {
                    width: 115px;
                    height: 40px;
                    font-size: 16px;
                    background-color: #ffffff;
                    color: #028e21;
                    border: 1px solid #028e21;
                    border-radius: 6px;
                    margin-right: 50px;
                    margin-top: 53px;
                }

                .btn2 {
                    width: 115px;
                    height: 40px;
                    font-size: 16px;
                    background-color: #028e21;
                    color: #ffffff;
                    border: none;
                    border-radius: 6px;
                    margin: 53px 0;
                }
            }

        }
    }
}
.dialogPicBox {
    img {
        width: 1200px;
        
    }
}

/deep/.el-carousel__indicators .el-carousel__indicator button {
  width: 12px; /* 宽度 */
  height: 12px; /* 高度 */
  border-radius: 50%; /* 圆形 */
  background-color: #999;
}
/* 可选：更改当前项指示器的颜色 */
/deep/.el-carousel__indicators .el-carousel__indicator.is-active button {
  background-color: #028e21; /* 当前项颜色 */
}
</style>



<style lang="less" scoped>


@media screen and (min-width:801px){/*pc*/
    
    
    
    .pc_none{display:none;}  
}        

@media screen and (max-width:800px){/*ipad_phone*/
    .adtips{height:auto;line-height:normal;}
    .adtips .inner{width:92%;height:auto;}
    .adtips p{line-height:22px;display:block;margin:5px auto;}

    .advertising .inner{width:92%;}
     
    //选项卡-按钮
    /deep/.el-tabs__header {
        //  display:none;
    }


    /deep/.el-tabs {
            display:block;position:relative;
            padding-top:111px;
    }
    
    /deep/.el-tabs__header {
            position:absolute;left:0px;top:0px;border-bottom:1px solid #D9D9D9;
              height:50px!important;
            margin:10px 0px 0px 0px!important;display:block;width:100%;
    }

     /deep/.el-tabs__nav-prev{display:none;}   
     /deep/.el-tabs__nav-next{display:none;}   
     /deep/.el-tabs__nav-wrap{width:100%;height:100%;padding:0!important;}   
     /deep/.el-tabs__nav-scroll{width:100%;height:100%;padding:0!important;}   
     /deep/.el-tabs__nav{width:100%;height:100%;padding:0!important;display:block;}   
     /deep/.el-tabs__item{float:left; height:100%;line-height:50px;font-size:18px!important;}   
     /deep/.el-tabs__active-bar{display:none;}   
     /deep/.el-tabs__nav .is-active{ font-weight:bold;box-sizing:border-box;border-bottom:solid 2px #139602;padding:0px 11px;}
     /deep/.el-tabs--left .el-tabs__nav-wrap.is-left:after{display:none;}

    .advertising .inner #buyAd{width:100%;margin:10px 0px;}
    .advertising .inner #buyAd .buyAD {width:100%; }
    .advertising .inner #buyAd .buyAD .inner{width:100%;margin:0;}
    .advertising .inner #buyAd .buyAD .inner .textOne{width:100%;margin:0;}
    /deep/.el-form{width:100%;}
    .advertising .inner #buyAd .buyAD .inner .textOne .pic{margin-left:8px;padding-left:8px;}

    
    /deep/.el-form-item{width:100%;display:block;}
    /deep/.el-form-item__label{display:block;font-size:16px;}
    /deep/.el-form-item__content{width:100%;}
     
    .advertising .inner #buyAd .buyAD .inner .textOne .pageTable{margin:0;width:100%;}

    /deep/.el-input__wrapper{box-shadow:0 0 0 0px;border-bottom:1px solid #D9D9D9;border-radius:0px;}
    /deep/.el-input__inner{font-size:14px;}

    .advertising .inner #buyAd .buyAD .inner .textOne .avatar-uploader{width:88px;height:88px;overflow:hidden;margin-top:10px;}
    /deep/.el-upload{width:88px;height:88px;overflow:hidden;}
    /deep/.el-upload>div{width:100%;height:100%;}
    .advertising .inner #buyAd .buyAD .inner .textOne .el-icon.avatar-uploader-icon{width:100%;height:100%;padding-top:10px;}
    /deep/.el-icon svg{width:22px;height:22px;}

    .advertising .bottom{width:100%;padding:0;height:auto;padding:10px 0px;margin-bottom:20px;}
    .advertising .bottom .inner{width:92%;margin:10px auto;height:auto;}
    .advertising .bottom .inner .amount{padding-top:0px;font-size:16px;}
    .advertising .bottom .inner .amount span {font-size:18px;padding:0px 10px;}
    .advertising .bottom .inner .btn{float:right;margin:0;}

    .advertising .bottom .inner .btn .btn2{width:auto;display:block;
                font-size:14px;margin:0px;padding:0px 8px;height:28px;line-height:18px;}

     
    .phone_advertis_box{border:solid 1px #ebeef5; }
    .phone_advertis_head{height:55px;text-align:center;background:#fafafa;}
    .phone_advertis_head_li{display:inline-block;height:100%;line-height:55px;text-align:center;
                                color:#333;font-size:16px; padding:0px 2.5vw;}

    .phone_advertis_text{color:#909399;font-size:14px;text-align:center;padding:15px 0px;
                            border-top:solid 1px #ebeef5; }
                
    .phone_advertis_ul{ width:100%;display:block;margin-top:11px;}    
    .phone_advertis_li{width:100%;display:block;overflow:hidden;
        padding-left:33px;
         position:relative;
        margin-bottom:11px;
        width:100%;box-sizing:border-box; 

        .phone_advertis_li_in{width:100%;height:100%;border:solid 1px #ccc;
                        border-radius:5px;box-sizing:border-box;
                        padding:10px 10px 0px;
                    }


        .phone_advertis_li_tip{display:flex;overflow:hidden;margin-bottom:22px;}    
        .phone_advertis_li_label{width:100px;margin-right:8px;color:#909399;font-size:16px;line-height:22px;height:22px;}    
        .phone_advertis_li_text{flex:1;line-height:22px;color:#333;font-size:16px;}    
    }    

    .phone_advertis_li_btn{overflow:hidden;
         position:absolute;width:22px;height:22px;
         left:0px;top:11px;border:solid 2px #ccc;border-radius:50%;
            box-sizing:border-box;
    
    } 
    /deep/.el-checkbox__input{display:block;width:100%;height:100%;border-radius:50%;}
    /deep/.el-checkbox__inner{display:block;width:100%;height:100%;border-radius:50%;}
    /deep/.el-checkbox__input.is-checked .el-checkbox__inner{background:url(../../public/image/8.png) no-repeat left top #139602;
                background-size:100% 100%;    border-color:#139602;}

     /deep/.el-checkbox__input.is-checked .el-checkbox__inner:after{display:none;}   
     /deep/.is-checked.phone_advertis_li_btn{border-color:#139602;}

     /deep/.el-checkbox__inner:hover{border:0;}   


            .phone_none{display:none;}     
}

</style>


