liyongli 3 miesięcy temu
rodzic
commit
e61c82b112

+ 0 - 1
components.d.ts

@@ -32,7 +32,6 @@ declare module 'vue' {
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
-    ElTag: typeof import('element-plus/es')['ElTag']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
     ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
     MediaComponents: typeof import('./src/components/mediaComponents.vue')['default']

+ 1 - 1
sdk/adList.js

@@ -12,7 +12,7 @@
 document.addEventListener('DOMContentLoaded', function () {
   const agreement =
     location.origin === 'http://' ? 'http:' : location.origin === 'https://' ? 'https:' : 'http://'
-  const base = agreement + '172.16.51.161:8082/'
+  const base = agreement + 'ads-qidian.sxtvs.com/'
   /**
    * 广告初始化
    * @param config 广告配置

+ 1 - 1
sdk/adList.min.js

@@ -146,7 +146,7 @@ function _0x144b() {
     'hidden',
     'jpg',
     'play',
-    '172.16.51.161:8082/',
+    'ads-qidian.sxtvs.com/',
   ]
   _0x144b = function () {
     return _0x6769d3

+ 1 - 49
src/views/AdvertiserPage.vue

@@ -4,16 +4,6 @@
     <el-form-item label="广告主名称">
       <el-input v-model="pages.keyword" placeholder="输入广告主关键词" clearable />
     </el-form-item>
-    <el-form-item label="状态">
-      <el-select filterable clearable v-model="pages.status" style="width: 200px">
-        <el-option
-          v-for="item in statusList"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
-        />
-      </el-select>
-    </el-form-item>
     <el-form-item>
       <el-button type="primary" @click="onSubmit">搜索</el-button>
       <el-button type="primary" link @click="() => creatEditPlan()">创建广告主</el-button>
@@ -25,12 +15,6 @@
     <el-table-column prop="enterpriseBrand" label="品牌" />
     <el-table-column prop="enterpriseContacts" label="联系人" />
     <el-table-column prop="enterpriseTel" label="联系电话" />
-    <el-table-column label="状态" width="60">
-      <template #default="scope">
-        <el-tag v-if="scope.row.status == 10" type="success">启用</el-tag>
-        <el-tag v-if="scope.row.status == 6" type="danger">禁用</el-tag>
-      </template>
-    </el-table-column>
 
     <el-table-column label="操作">
       <template #default="scope">
@@ -45,37 +29,6 @@
         <el-button link type="primary" size="small" @click="() => creatEditPlan(scope.row)">
           修改
         </el-button>
-
-        <el-popconfirm
-          v-if="scope.row.status == 6"
-          @confirm="
-            () =>
-              updateAdvertiserStatus({
-                id: scope.row.advertiserId,
-                status: 10,
-              }).then(() => onSubmit())
-          "
-          title="确定启用该广告主吗?"
-        >
-          <template #reference>
-            <el-button link type="primary" size="small"> 启用 </el-button>
-          </template>
-        </el-popconfirm>
-        <el-popconfirm
-          v-if="scope.row.status == 10"
-          @confirm="
-            () =>
-              updateAdvertiserStatus({
-                id: scope.row.advertiserId,
-                status: 6,
-              }).then(() => onSubmit())
-          "
-          title="确定禁用该广告主吗?"
-        >
-          <template #reference>
-            <el-button link type="primary" size="small"> 禁用 </el-button>
-          </template>
-        </el-popconfirm>
       </template>
     </el-table-column>
   </el-table>
@@ -117,12 +70,11 @@ import type { Advertiser } from '@/types/Advertiser'
 import {
   getAdvertiserList,
   deleteAdvertiser,
-  updateAdvertiserStatus,
   updateAdvertiser,
   createAdvertiser,
 } from '@/api/index'
 import { ref } from 'vue'
-import { statusList } from '@/tool'
+// import { statusList } from '@/tool'
 import { ElMessage } from 'element-plus'
 const pages = ref<Pages>({
   pageNum: 1,

+ 4 - 2
src/views/OriginalityPage.vue

@@ -169,7 +169,7 @@
                 />
               </template>
             </el-table-column>
-            <el-table-column :label="i - 1 + ''" v-for="i in 24" :key="i" width="50">
+            <el-table-column :label="i - 1 + '时'" v-for="i in 24" center :key="i" width="60">
               <template #default="scope">
                 <el-checkbox
                   @change="(val: boolean) => select(val, scope.row, scope.$index)"
@@ -414,6 +414,7 @@ const creatEditPlan = async (data?: OriginalityItem) => {
       form.value = {
         ...D,
         slot,
+        showIntervalTime: 1,
         dates: [D.startDate ? D.startDate : '', D.endDate ? D.endDate : ''],
         mediaIds:
           D.mediaList && typeof D.mediaList == 'object'
@@ -430,6 +431,7 @@ const creatEditPlan = async (data?: OriginalityItem) => {
   } else {
     form.value = {
       ...D,
+      showIntervalTime: 1,
       showType: 3,
     }
     if (typeof siteList.value[0].mediaId === 'number')
@@ -488,7 +490,7 @@ const createOrUpdate = (formEl: FormInstance | undefined) => {
         showType: form.value.showType,
         mediaIds: form.value.mediaIds,
         slotIds: form.value.slot,
-        showIntervalTime: form.value.showIntervalTime,
+        showIntervalTime: form.value.showIntervalTime || 1,
       }
       Func(p).then(() => {
         ElMessage.success(form.value.creativeId ? '更新成功' : '创建成功')

+ 1 - 1
src/views/SitePage.vue

@@ -201,7 +201,7 @@ const copyCode = (row: CatalogTreeOri) => {
       h('h3', { style: { 'font-weight': 'bold', padding: '5px 0' } }, '代码(https)'),
       h('div', null, elehttps.outerHTML),
       h('h3', { style: { 'font-weight': 'bold', padding: '5px 0' } }, '广告位id:'),
-      h('div', null, slots.map((v) => '#sxtv-ad-' + v.slotId).join(',')),
+      h('div', null, slots.map((v) => 'sxtv-ad-' + v.slotId).join(',')),
     ]),
   })
   // #sxtv-ad- + id

+ 5 - 4
src/views/SourceMaterialPage.vue

@@ -136,7 +136,7 @@
         </el-select>
       </el-form-item>
       <el-form-item label="落地页" prop="landingPage">
-        <el-input v-model="form.landingPage" />
+        <el-input v-model="form.landingPage" placeholeedr="请输入落地页" />
       </el-form-item>
       <el-form-item label="上传素材" prop="addr">
         <MediaComponents
@@ -205,7 +205,6 @@ const query = ref<number>(Number(queryRouter?.creativeId) || -1)
 const ruleFormRef = ref<FormInstance>()
 const rules = reactive<FormRules<ISourceMaterialProps>>({
   stuffName: [{ required: true, message: '请输入名称', trigger: 'blur' }],
-  landingPage: [{ required: true, message: '请输入落地页地址', trigger: 'blur' }],
   creativeId: [{ required: true, message: '请选择创意', trigger: 'change' }],
   addr: [{ required: true, message: '请选择素材', trigger: 'change' }],
   width: [{ required: true, message: '请输入宽', trigger: 'change' }],
@@ -295,8 +294,10 @@ const creatMaterial = (formEl: FormInstance | undefined) => {
   if (!formEl) return
   formEl.validate((valid) => {
     if (!valid) return
+    const p: ISourceMaterialProps = { ...form.value }
+    if (!p.landingPage) p.landingPage = '#'
     if (typeof form.value.stuffId === 'number') {
-      updateMaterial(form.value).then(() => {
+      updateMaterial(p).then(() => {
         ElMessage({
           message: '更新成功',
           type: 'success',
@@ -306,7 +307,7 @@ const creatMaterial = (formEl: FormInstance | undefined) => {
       })
       return
     }
-    createMaterial(form.value).then(() => {
+    createMaterial(p).then(() => {
       ElMessage({
         message: '创建成功',
         type: 'success',