diff --git a/boundle.sh b/boundle.sh
index 8272b03..8e18195 100644
--- a/boundle.sh
+++ b/boundle.sh
@@ -5,8 +5,8 @@ source /etc/profile
npm install --prefer-offline --loglevel info --unsafe-perm=true --allow-root >> boundle.log
echo 'copy node_modules to /data/publish/node_packages' >> boundle.log
-npm run build:prod
-#npm run build:stage
+#npm run build:prod
+npm run build:stage
cd ./dist/ && tar -zcvf pop-sys.tar.gz ./
cd ..
diff --git a/src/api/game.js b/src/api/game.js
index 1405454..52692f9 100644
--- a/src/api/game.js
+++ b/src/api/game.js
@@ -1,8 +1,44 @@
import requestMp from '@/utils/request-mp'
+// 获取游戏列表
export function getGameList(params) {
- return requestMp({
- url: '/games/list',
- method: 'get',
- })
- }
\ No newline at end of file
+ return requestMp({
+ url: '/games/list',
+ method: 'get',
+ })
+}
+
+/* -------------------------------------- */
+
+// 获取游戏关联列表
+export function getJumpList(params) {
+ return requestMp({
+ url: '/jump',
+ method: 'get',
+ params
+ })
+}
+// 添加关联游戏
+export function addJump(data) {
+ return requestMp({
+ url: '/jump',
+ method: 'post',
+ data
+ })
+}
+// 修改关联游戏
+export function updateJump(data) {
+ return requestMp({
+ url: '/jump',
+ method: 'put',
+ data
+ })
+}
+// 删除关联游戏
+export function delJump(data) {
+ return requestMp({
+ url: '/jump',
+ method: 'delete',
+ data
+ })
+}
diff --git a/src/router/admin.js b/src/router/admin.js
index a4418ca..00162d8 100644
--- a/src/router/admin.js
+++ b/src/router/admin.js
@@ -35,6 +35,14 @@ const adminRouter = {
title: '广告列表',
},
},
+ {
+ path: 'jump',
+ component: () => import('@/views/admin/jump'), // Parent router-view
+ name: 'adminAdJump',
+ meta: {
+ title: '跳转列表',
+ },
+ },
],
}
diff --git a/src/views/ad/edit.vue b/src/views/ad/edit.vue
index 0099cb9..a85c0ea 100644
--- a/src/views/ad/edit.vue
+++ b/src/views/ad/edit.vue
@@ -76,6 +76,77 @@
/>
+
+
+
+
+
+ 只能上传小于 600k 的图片
+ 选择图片
+
+
+
+
+
+
+
+
+
+ 选择游戏或输入APPID
+
-
-
-
-
-
- 只能上传小于 600k 的图片
- 选择图片
-
-
-
-
-
-
-
-
+
import {getAdPos, getAd, addAd, updateAd, getAdAreaList} from '@/api/ad'
-import {getGameList} from '@/api/game'
+import {getGameList, getJumpList} from '@/api/game'
import {typeList, modeList} from '@/utils/ad-data'
import moment from 'moment'
import PicLib from '@/components/PicLib'
@@ -359,6 +372,7 @@ export default {
typeList: {},
modeList: {},
uploadUrl: `${process.env.VUE_APP_UPLOAD}`,
+ targetList: [],
// form
adForm: {
name: '',
@@ -505,6 +519,11 @@ export default {
this.adForm.gameid = gameid
this.changeGame()
this.adForm.locationid = locationid
+ const targetList = await this.getJumpList({
+ game_id: this.adForm.gameid,
+ platform_id: this.adForm.channelid,
+ })
+ this.targetList = targetList.result
} else {
hasAd = false
}
@@ -550,6 +569,19 @@ export default {
})
})
},
+ getJumpList(params) {
+ return new Promise((resolve, reject) => {
+ getJumpList(params)
+ .then(res => {
+ const data = res.data
+ resolve(data)
+ })
+ .catch(err => {
+ reject(err)
+ console.log(err)
+ })
+ })
+ },
resetForm(formName) {
this.$refs[formName].resetFields()
},
@@ -628,6 +660,10 @@ export default {
changePlatform(val) {
this.adForm.gameid = ''
this.adForm.locationid = ''
+ this.adForm.ad_property.appid = ''
+ this.adForm.ad_property.link = ''
+ this.adForm.ad_property.jump_param = ''
+ this.targetList = {}
this.gameList = this.allGame.filter(item => {
return item.platform_id === val
})
@@ -650,6 +686,32 @@ export default {
label: `${JSON.parse(item.ld_property).title}`,
}
})
+
+ this.adForm.ad_property.appid = ''
+ this.adForm.ad_property.link = ''
+ this.adForm.ad_property.jump_param = ''
+ this.targetList = {}
+ const targetList = await this.getJumpList({
+ game_id: this.adForm.gameid,
+ platform_id: this.adForm.channelid,
+ })
+ this.targetList = targetList.result
+ },
+ changeTarget(val) {
+ let target
+ for (let i = 0; i < this.targetList.length; i++) {
+ if (this.targetList[i].t_appid === val) {
+ target = this.targetList[i]
+ break
+ }
+ }
+ if (target) {
+ if (target.link) this.adForm.ad_property.link = target.link
+ if (target.ad_uid) this.adForm.ad_property.jump_param = target.ad_uid
+ } else {
+ this.adForm.ad_property.link = ''
+ this.adForm.ad_property.jump_param = ''
+ }
},
beforeUpload(file) {
const isLt600k = file.size / 1024 / 1024 < 0.6
diff --git a/src/views/admin/jump.vue b/src/views/admin/jump.vue
new file mode 100644
index 0000000..f3d6ac2
--- /dev/null
+++ b/src/views/admin/jump.vue
@@ -0,0 +1,518 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取 消
+ 确 定
+
+
+
+
+
+