adPos areaList
This commit is contained in:
parent
a6cc19c7fb
commit
1cb51ef60b
@ -179,7 +179,7 @@ export default {
|
|||||||
getAdAreaList()
|
getAdAreaList()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const { data } = res
|
const { data } = res
|
||||||
this.tableData = data.AdAreaList
|
this.tableData = data.adAreaList
|
||||||
this.isLoaded = false
|
this.isLoaded = false
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
@ -51,10 +51,10 @@
|
|||||||
style="width: 70%"
|
style="width: 70%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(area,idx) in areaList"
|
v-for="(area, idx) in areaList"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
:label="area.name"
|
:label="`${area.name}(${area.key})`"
|
||||||
:value="area.value"
|
:value="area.area_id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
class="tip "
|
class="tip "
|
||||||
v-else
|
v-else
|
||||||
>
|
>
|
||||||
<placeholder/>
|
<placeholder />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@ -162,6 +162,7 @@
|
|||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { getGame } from '@/api/games'
|
import { getGame } from '@/api/games'
|
||||||
import { getAdPosList, addAdPos, modifyAdPos, delAdPos } from '@/api/ad'
|
import { getAdPosList, addAdPos, modifyAdPos, delAdPos } from '@/api/ad'
|
||||||
|
import { getAdAreaList } from '@/api/ad'
|
||||||
import getPageTitle from '@/utils/get-page-title'
|
import getPageTitle from '@/utils/get-page-title'
|
||||||
import Coordinate from '@/components/Coordinate'
|
import Coordinate from '@/components/Coordinate'
|
||||||
import Placeholder from '@/components/Placeholder'
|
import Placeholder from '@/components/Placeholder'
|
||||||
@ -180,24 +181,7 @@ export default {
|
|||||||
permEdit: false,
|
permEdit: false,
|
||||||
permPublish: false,
|
permPublish: false,
|
||||||
hasList: false,
|
hasList: false,
|
||||||
areaList: [
|
areaList: {},
|
||||||
{
|
|
||||||
name: '首页',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '游戏中',
|
|
||||||
value: '2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '结算页',
|
|
||||||
value: '3'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '关闭',
|
|
||||||
value: '4'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
typeList: [
|
typeList: [
|
||||||
{
|
{
|
||||||
name: 'icon',
|
name: 'icon',
|
||||||
@ -283,6 +267,7 @@ export default {
|
|||||||
this.userInfo.permissions.includes(`${this.uid}-publish`) ||
|
this.userInfo.permissions.includes(`${this.uid}-publish`) ||
|
||||||
this.userInfo.permissions.includes(`games-writeable`)
|
this.userInfo.permissions.includes(`games-writeable`)
|
||||||
this.getGameInfo(this.getAdPosList)
|
this.getGameInfo(this.getAdPosList)
|
||||||
|
this.getAdAreaList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getGameInfo(cb) {
|
getGameInfo(cb) {
|
||||||
@ -333,6 +318,22 @@ export default {
|
|||||||
this.posNumList = this.allPos.map(item => {
|
this.posNumList = this.allPos.map(item => {
|
||||||
return `${item.area}${item.type}${item.mode}${item.coorX}${item.coorY}`
|
return `${item.area}${item.type}${item.mode}${item.coorX}${item.coorY}`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getAdAreaList() {
|
||||||
|
getAdAreaList()
|
||||||
|
.then(res => {
|
||||||
|
const { data } = res
|
||||||
|
if (data.errcode === 0) {
|
||||||
|
this.areaList = data.adAreaList.map(item => {
|
||||||
|
item.area_id = item.area_id.toString()
|
||||||
|
return item
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
@ -288,7 +288,7 @@ export default {
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
const { data } = res
|
const { data } = res
|
||||||
if (data.errcode === 0) {
|
if (data.errcode === 0) {
|
||||||
data.AdAreaList.map(item => {
|
data.adAreaList.map(item => {
|
||||||
this.areaList[item.area_id] = {
|
this.areaList[item.area_id] = {
|
||||||
id: item.area_id,
|
id: item.area_id,
|
||||||
label: `${item.name}(${item.key})`
|
label: `${item.name}(${item.key})`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user