广告内容调整
This commit is contained in:
parent
c56262a04b
commit
82c1b3dd38
@ -176,6 +176,7 @@ export default {
|
|||||||
// other
|
// other
|
||||||
exportData() {
|
exportData() {
|
||||||
this.$emit('selectMaterial', this.selectedData)
|
this.$emit('selectMaterial', this.selectedData)
|
||||||
|
console.log(this.selectedData)
|
||||||
},
|
},
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
const isLt600k = file.size / 1024 / 1024 < 0.6
|
const isLt600k = file.size / 1024 / 1024 < 0.6
|
||||||
@ -191,7 +192,15 @@ export default {
|
|||||||
user: this.username,
|
user: this.username,
|
||||||
})
|
})
|
||||||
this.$message.success('图片上传成功!')
|
this.$message.success('图片上传成功!')
|
||||||
this.getData({user: this.username})
|
if(this.useAsCom) {
|
||||||
|
this.imgList.unshift({url: res.message.url})
|
||||||
|
this.selectedData.imgs = [{url: res.message.url}]
|
||||||
|
this.imgsSelected = [0]
|
||||||
|
} else {
|
||||||
|
this.getData({user: this.username})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
uploadErr() {
|
uploadErr() {
|
||||||
this.$message.error('图片上传失败!')
|
this.$message.error('图片上传失败!')
|
||||||
|
@ -61,17 +61,6 @@ export const constantRoutes = [
|
|||||||
// comRouter,
|
// comRouter,
|
||||||
// adminRouter,
|
// adminRouter,
|
||||||
errRouter,
|
errRouter,
|
||||||
// TODO: 添加granfa 外链
|
|
||||||
// {
|
|
||||||
// path: 'external-link',
|
|
||||||
// component: Layout,
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// path: 'https://github.com/PanJiaChen/vue-element-admin',
|
|
||||||
// meta: {title: 'externalLink', icon: 'link'},
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
userRouter,
|
userRouter,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
placeholder="请选择要投放的广告位置"
|
placeholder="请选择要投放的广告位置"
|
||||||
class="w100"
|
class="w100"
|
||||||
:disabled="!writeable"
|
:disabled="!writeable"
|
||||||
|
multiple
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
@ -184,6 +185,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="openModal"
|
@click="openModal"
|
||||||
|
:disabled="!writeable"
|
||||||
>选择图片</el-button>
|
>选择图片</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
@ -268,6 +270,16 @@
|
|||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="显示人数"
|
||||||
|
prop="ad_property.played"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model.number="adForm.ad_property.played"
|
||||||
|
class="w100"
|
||||||
|
:disabled="!writeable"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
@ -363,7 +375,6 @@ export default {
|
|||||||
gameList: [],
|
gameList: [],
|
||||||
platformList: [],
|
platformList: [],
|
||||||
locationList: [],
|
locationList: [],
|
||||||
areaList: {},
|
|
||||||
typeList: {},
|
typeList: {},
|
||||||
modeList: {},
|
modeList: {},
|
||||||
uploadUrl: `${process.env.VUE_APP_UPLOAD}`,
|
uploadUrl: `${process.env.VUE_APP_UPLOAD}`,
|
||||||
@ -372,7 +383,7 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
gameid: '',
|
gameid: '',
|
||||||
channelid: '',
|
channelid: '',
|
||||||
locationid: '',
|
locationid: [],
|
||||||
ad_title: '',
|
ad_title: '',
|
||||||
ad_body: '',
|
ad_body: '',
|
||||||
ad_image: '',
|
ad_image: '',
|
||||||
@ -392,6 +403,7 @@ export default {
|
|||||||
is_recommend: 0,
|
is_recommend: 0,
|
||||||
appid: '',
|
appid: '',
|
||||||
jump_param: '',
|
jump_param: '',
|
||||||
|
played: 0,
|
||||||
}, //用于拓展属性
|
}, //用于拓展属性
|
||||||
},
|
},
|
||||||
adFormRules: {
|
adFormRules: {
|
||||||
@ -402,7 +414,6 @@ export default {
|
|||||||
],
|
],
|
||||||
locationid: [
|
locationid: [
|
||||||
{required: true, message: '请选择投放位置', trigger: 'blur'},
|
{required: true, message: '请选择投放位置', trigger: 'blur'},
|
||||||
{type: 'number', message: '投放位置必须是数值', trigger: 'blur'},
|
|
||||||
],
|
],
|
||||||
ad_image: [
|
ad_image: [
|
||||||
{required: true, message: '请上传广告头像', trigger: 'blur'},
|
{required: true, message: '请上传广告头像', trigger: 'blur'},
|
||||||
@ -445,11 +456,6 @@ export default {
|
|||||||
this.modeList = modeList
|
this.modeList = modeList
|
||||||
this.typeList = typeList
|
this.typeList = typeList
|
||||||
|
|
||||||
const areaListRes = await this.getAdAreaList()
|
|
||||||
areaListRes.adAreaList.map(item => {
|
|
||||||
this.areaList[item.area_id] = item.name
|
|
||||||
})
|
|
||||||
|
|
||||||
// 获取所有可投放游戏
|
// 获取所有可投放游戏
|
||||||
const allGame = await this.getGameList()
|
const allGame = await this.getGameList()
|
||||||
this.allGame = allGame.gameList
|
this.allGame = allGame.gameList
|
||||||
@ -493,9 +499,12 @@ export default {
|
|||||||
is_recommend: 0,
|
is_recommend: 0,
|
||||||
appid: '',
|
appid: '',
|
||||||
jump_param: '',
|
jump_param: '',
|
||||||
|
played: 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.adForm.locationid = JSON.parse(this.adForm.locationid)
|
||||||
|
|
||||||
// 兼容跳转参数显示
|
// 兼容跳转参数显示
|
||||||
if (!this.adForm.ad_property.jump_param) {
|
if (!this.adForm.ad_property.jump_param) {
|
||||||
this.adForm.ad_property.jump_param = this.adForm.jump_param
|
this.adForm.ad_property.jump_param = this.adForm.jump_param
|
||||||
@ -651,9 +660,7 @@ export default {
|
|||||||
const area = item.area.split(',')
|
const area = item.area.split(',')
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
label: `${this.areaList[area[0]]}-(${area[1]},${area[2]})-${
|
label: `${JSON.parse(item.ld_property).title}`,
|
||||||
this.modeList[item.mode]
|
|
||||||
}`,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -681,6 +688,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.adForm.ad_property = JSON.stringify(this.adForm.ad_property)
|
this.adForm.ad_property = JSON.stringify(this.adForm.ad_property)
|
||||||
|
this.adForm.locationid = JSON.stringify(this.adForm.locationid)
|
||||||
|
|
||||||
this.adForm.begin_time = this.adForm.dateRange[0]
|
this.adForm.begin_time = this.adForm.dateRange[0]
|
||||||
this.adForm.end_time = this.adForm.dateRange[1]
|
this.adForm.end_time = this.adForm.dateRange[1]
|
||||||
|
@ -104,12 +104,6 @@
|
|||||||
:formatter="formPlatform"
|
:formatter="formPlatform"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
|
||||||
prop="area"
|
|
||||||
label="投放位置"
|
|
||||||
:formatter="formLocation"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="jump_status"
|
prop="jump_status"
|
||||||
label="是否跳转"
|
label="是否跳转"
|
||||||
@ -227,7 +221,6 @@ export default {
|
|||||||
gameList: {},
|
gameList: {},
|
||||||
platformList: {},
|
platformList: {},
|
||||||
locationList: {},
|
locationList: {},
|
||||||
areaList: {},
|
|
||||||
typeList: {},
|
typeList: {},
|
||||||
modeList: {},
|
modeList: {},
|
||||||
sortList: {
|
sortList: {
|
||||||
@ -261,10 +254,6 @@ export default {
|
|||||||
this.modeList = modeList
|
this.modeList = modeList
|
||||||
this.typeList = typeList
|
this.typeList = typeList
|
||||||
|
|
||||||
const areaListRes = await this.getAdAreaList()
|
|
||||||
areaListRes.adAreaList.map(item => {
|
|
||||||
this.areaList[item.area_id] = item.name
|
|
||||||
})
|
|
||||||
|
|
||||||
const gameListRes = await this.getGameList()
|
const gameListRes = await this.getGameList()
|
||||||
const gameList = gameListRes.gameList
|
const gameList = gameListRes.gameList
|
||||||
@ -294,19 +283,6 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAdAreaList(params) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
getAdAreaList(params)
|
|
||||||
.then(res => {
|
|
||||||
const data = res.data
|
|
||||||
resolve(data)
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
reject(err)
|
|
||||||
console.log(err)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getAdPos(params) {
|
getAdPos(params) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getAdPos(params)
|
getAdPos(params)
|
||||||
@ -420,13 +396,6 @@ export default {
|
|||||||
formPlatform(row, column, cellValue, index) {
|
formPlatform(row, column, cellValue, index) {
|
||||||
return `${this.platformList[cellValue]}`
|
return `${this.platformList[cellValue]}`
|
||||||
},
|
},
|
||||||
formLocation(row, column, cellValue, index) {
|
|
||||||
const area = cellValue.split(',')
|
|
||||||
|
|
||||||
return `${this.areaList[area[0]]}-(${area[1]},${area[2]})-${
|
|
||||||
this.modeList[row.mode]
|
|
||||||
}`
|
|
||||||
},
|
|
||||||
formJump(row, column, cellValue, index) {
|
formJump(row, column, cellValue, index) {
|
||||||
return cellValue === 1 ? '是' : '否'
|
return cellValue === 1 ? '是' : '否'
|
||||||
},
|
},
|
||||||
|
@ -115,12 +115,6 @@
|
|||||||
:formatter="formGame"
|
:formatter="formGame"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
|
||||||
prop="area"
|
|
||||||
label="投放位置"
|
|
||||||
:formatter="formLocation"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="jump_status"
|
prop="jump_status"
|
||||||
label="跳转"
|
label="跳转"
|
||||||
@ -231,7 +225,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getAd, updateAd, delAd, getAdPos, getAdAreaList } from '@/api/ad'
|
import { getAd, updateAd, delAd, getAdPos, getAdAreaList } from '@/api/ad'
|
||||||
import { getGameList } from '@/api/game'
|
import { getGameList } from '@/api/game'
|
||||||
import { areaList, typeList, modeList } from '@/utils/ad-data'
|
import { typeList, modeList } from '@/utils/ad-data'
|
||||||
import { Promise, reject } from 'q'
|
import { Promise, reject } from 'q'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
|
||||||
@ -243,7 +237,6 @@ export default {
|
|||||||
gameList: {},
|
gameList: {},
|
||||||
platformList: {},
|
platformList: {},
|
||||||
locationList: {},
|
locationList: {},
|
||||||
areaList: {},
|
|
||||||
typeList: {},
|
typeList: {},
|
||||||
modeList: {},
|
modeList: {},
|
||||||
sortList: {
|
sortList: {
|
||||||
@ -277,11 +270,6 @@ export default {
|
|||||||
this.modeList = modeList
|
this.modeList = modeList
|
||||||
this.typeList = typeList
|
this.typeList = typeList
|
||||||
|
|
||||||
const areaListRes = await this.getAdAreaList()
|
|
||||||
areaListRes.adAreaList.map(item => {
|
|
||||||
this.areaList[item.area_id] = item.name
|
|
||||||
})
|
|
||||||
|
|
||||||
const gameListRes = await this.getGameList()
|
const gameListRes = await this.getGameList()
|
||||||
const gameList = gameListRes.gameList
|
const gameList = gameListRes.gameList
|
||||||
|
|
||||||
@ -529,12 +517,6 @@ export default {
|
|||||||
formSort(row, column, cellValue, index) {
|
formSort(row, column, cellValue, index) {
|
||||||
return `${this.sortList[cellValue]}`
|
return `${this.sortList[cellValue]}`
|
||||||
},
|
},
|
||||||
formLocation(row, column, cellValue, index) {
|
|
||||||
const area = cellValue.split(',')
|
|
||||||
return `${this.areaList[area[0]]}-(${area[1]},${area[2]})-${
|
|
||||||
this.modeList[row.mode]
|
|
||||||
}`
|
|
||||||
},
|
|
||||||
formJump(row, column, cellValue, index) {
|
formJump(row, column, cellValue, index) {
|
||||||
return cellValue === 1 ? '是' : '否'
|
return cellValue === 1 ? '是' : '否'
|
||||||
},
|
},
|
||||||
|
@ -40,7 +40,7 @@ module.exports = {
|
|||||||
// change xxx-api/login => mock/login
|
// change xxx-api/login => mock/login
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://154.8.214.202:5015/interface`,
|
target: `http://154.8.214.202:6015/interface`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: '',
|
['^' + process.env.VUE_APP_BASE_API]: '',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user