提交 e9099ce1 作者: 毛细亚

同步代码

上级 00afd8bc
<template>
<div class="sendGameContent">
<div
v-if="!disabled && bindGameUserList.length > 0"
class="btnRelease"
>
<div v-if="!disabled && bindGameUserList.length > 0" class="btnRelease">
<div class="btntab">
<div
class="btn rowFlex allCenter"
:class="activeName == '1' ? 'btnActive' : ''"
:type="activeName == '1' ? 'primary' : ''"
@click="activeName = '1'"
>
转端
</div>
<div
class="btn rowFlex allCenter"
:class="activeName == '3' ? 'btnActive' : ''"
:type="activeName == '3' ? 'primary' : ''"
@click="recallTabChange"
>
召回
</div>
<div
class="btn rowFlex allCenter"
:class="activeName == '2' ? 'btnActive' : ''"
:type="activeName == '2' ? 'primary' : ''"
@click="requestRegGameList"
>
转游
<el-radio-group border v-model="activeName" class="radio-group">
<el-radio-button border label="1" @click.native="activeName = '1'">转端</el-radio-button>
<el-radio-button border label="3" @click.native="recallTabChange">召回</el-radio-button>
<el-radio-button border label="2" @click.native="requestRegGameList">转游</el-radio-button>
</el-radio-group>
</div>
</div>
<div
v-loading="contentLoading"
class="gameList"
>
<div v-loading="contentLoading" class="gameList">
<!-- 转端 -->
<el-collapse
v-if="activeName == '1' && conversionGameList.length > 0"
:disabled="disabled"
@change="conversionChangeOld"
>
<el-collapse-item
v-for="(item,index) in conversionGameList"
:key="index"
:title="item.game_text"
:name="item.game_type"
>
<el-collapse v-if="activeName == '1' && conversionGameList.length > 0" :disabled="disabled"
@change="conversionChangeOld">
<el-collapse-item v-for="(item, index) in conversionGameList" :key="index" :title="item.game_text"
:name="item.game_type">
<div v-if="item.children && item.children.length > 0">
<div
v-for="(items, indexs) in item.children"
:key="indexs"
class="gameListItem rowFlex columnCenter spaceBetween"
>
<p>{{ items.game_name +'/'+items.game_id }}</p>
<el-popover
placement="top"
width="160"
trigger="hover"
>
<div v-for="(items, indexs) in item.children" :key="indexs"
class="gameListItem rowFlex columnCenter spaceBetween">
<p>{{ items.game_name + '/' + items.game_id }}</p>
<el-popover placement="top" width="160" trigger="hover">
<div>
<p
class="sendLink"
@click="sendLink(items,item.game_type)"
>
<p class="sendLink" @click="sendLink(items, item.game_type)">
仅发送链接
</p>
<p
class="sendLink"
@click="sendPassword(items,item.game_type)"
>
<p class="sendLink" @click="sendPassword(items, item.game_type)">
仅发送账号密码
</p>
<p
class="sendLink"
@click="sendMessage(items,item.game_type)"
>
<p class="sendLink" @click="sendMessage(items, item.game_type)">
发送链接和账号密码
</p>
<p
class="sendLink"
@click="sendDownLoadPage(items,item.game_type,index)"
>
<p class="sendLink" @click="sendDownLoadPage(items, item.game_type, index)">
发送落地页
</p>
</div>
<el-button
slot="reference"
size="mini"
:disabled="accountSelect == ''"
>发送</el-button>
<el-button slot="reference" size="mini" :disabled="accountSelect == ''">发送</el-button>
</el-popover>
</div>
</div>
<div
v-else-if="gameLoding"
class="channelLoading rowFlex allCenter"
>
<div v-else-if="gameLoding" class="channelLoading rowFlex allCenter">
<i class="el-icon-loading"></i>
<el-button type="text">加载中</el-button>
</div>
<div
v-else
class="rowFlex allCenter"
>暂无游戏</div>
<div v-else class="rowFlex allCenter">暂无游戏</div>
</el-collapse-item>
</el-collapse>
<!-- 召回 -->
<div
v-else-if="activeName == '3' && recallGameList.length > 0"
class="collapseContent"
>
<div v-else-if="activeName == '3' && recallGameList.length > 0" class="collapseContent">
<!-- v-if="chatUser.task_type && chatUser.task_type == 7"-->
<el-button
v-if='false'
type="primary"
style="margin-left:50px;"
:loading="sendLoading"
@click="sendTaskChannel"
>根据任务一键发送链接</el-button>
<el-collapse
:disabled="disabled"
@change="recallChange"
>
<el-collapse-item
v-for="(item,index) in recallGameList"
:key="index"
:title="item.game_text"
:name="item.game_type"
>
<el-button v-if='false' type="primary" style="margin-left:50px;" :loading="sendLoading"
@click="sendTaskChannel">根据任务一键发送链接</el-button>
<el-collapse :disabled="disabled" @change="recallChange">
<el-collapse-item v-for="(item, index) in recallGameList" :key="index" :title="item.game_text"
:name="item.game_type">
<div v-if="item.children && item.children.length > 0">
<div
v-for="(items, indexs) in item.children"
:key="indexs"
class="gameListItem rowFlex columnCenter spaceBetween"
>
<p>{{ items.game_name +'/'+items.game_id }}</p>
<el-button
slot="reference"
size="mini"
:disabled="accountSelect == ''"
@click="sendChannel(items)"
>发送</el-button>
<div v-for="(items, indexs) in item.children" :key="indexs"
class="gameListItem rowFlex columnCenter spaceBetween">
<p>{{ items.game_name + '/' + items.game_id }}</p>
<el-button slot="reference" size="mini" :disabled="accountSelect == ''"
@click="sendChannel(items)">发送</el-button>
</div>
</div>
<div
v-else-if="gameLoding"
class="channelLoading rowFlex allCenter"
>
<div v-else-if="gameLoding" class="channelLoading rowFlex allCenter">
<i class="el-icon-loading"></i>
<el-button type="text">加载中</el-button>
</div>
<div
v-else
class="rowFlex allCenter"
>暂无游戏</div>
<div v-else class="rowFlex allCenter">暂无游戏</div>
</el-collapse-item>
<!-- 新建渠道链接 -->
</el-collapse>
<div class="createChannel rowFlex allCenter">
<span class="label">找不到对应游戏的链接点此</span>
<el-button
type="text"
size="medium"
@click="showCreateChannel=true"
>新建渠道链接</el-button>
<el-button type="text" size="medium" @click="showCreateChannel = true">新建渠道链接</el-button>
</div>
</div>
<!--
......@@ -173,65 +80,31 @@
3.安卓或者 IOS 点击发送的时候 先判断是否有配置落地页 如果没有 走之前的发送逻辑 如果有 加入到发送的暂存列表中 加入时 需要判断和列表中已有的游戏是否时同一个项目和主游戏下 如果不是 提示错误 如果是 加入到暂存列表中 获取当前游戏下的渠道 选择渠道信息 发送给掌游后端 安卓或者 IOS 游戏 只能选择一个单选
-->
<div v-else-if="activeName == '2'">
<el-collapse
:disabled="disabled"
>
<el-input
v-model="filterGameText"
placeholder="请输入游戏名 按回车搜索"
style="margin-top: 10px"
@keydown.enter.native="changeGameText"
@blur="changeGameText"
>
<i
slot="prefix"
class="el-input__icon el-icon-search"
></i>
<el-collapse :disabled="disabled">
<el-input v-model="filterGameText" placeholder="请输入游戏名 按回车搜索" style="margin-top: 10px"
@keydown.enter.native="changeGameText" @blur="changeGameText">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
<el-collapse-item
v-for="(item, index) in regGameList"
:key="index"
:title="item.label"
>
<el-collapse-item v-for="(item, index) in regGameList" :key="index" :title="item.label">
<div v-if="regGameList.length > 0">
<div
v-for="(items, indexs) in item.children"
:key="indexs"
class="gameListItem rowFlex columnCenter spaceBetween"
>
<div v-for="(items, indexs) in item.children" :key="indexs"
class="gameListItem rowFlex columnCenter spaceBetween">
<p>{{ items.label + "/" + items.id }}</p>
<!--game_type: 1 微信小游戏 2 H5 游戏 3 安卓游戏 4 IOS 游戏 5 抖音小游戏 -->
<!-- 微信小游戏 安卓游戏 IOS游戏 处理逻辑 -->
<el-popover
v-if="items.game_type == 1 || items.game_type == 3 || items.game_type == 4 "
placement="top"
trigger="click"
>
<p
class="sendLink"
@click="sendChannelGame(items,item)"
>
<el-popover v-if="items.game_type == 1 || items.game_type == 3 || items.game_type == 4"
placement="top" trigger="click">
<p class="sendLink" @click="sendChannelGame(items, item)">
发送链接/渠道二维码
</p>
<p
class="sendLink"
@click="handleGameType(items,item,item.game_type,index)"
>
<p class="sendLink" @click="handleGameType(items, item, item.game_type, index)">
发送落地页
</p>
<el-button
slot="reference"
size="mini"
:disabled="accountSelect == ''"
>发送</el-button>
<el-button slot="reference" size="mini" :disabled="accountSelect == ''">发送</el-button>
</el-popover>
<el-button
v-else
size="mini"
:disabled="accountSelect == ''"
@click="noH5AndroidIOSGame(items,item)"
>发送</el-button>
<el-button v-else size="mini" :disabled="accountSelect == ''"
@click="noH5AndroidIOSGame(items, item)">发送</el-button>
</div>
</div>
<!-- <div
......@@ -241,20 +114,13 @@
<i class="el-icon-loading"></i>
<el-button type="text">加载中</el-button>
</div> -->
<div
v-else
class="rowFlex allCenter"
>暂无游戏</div>
<div v-else class="rowFlex allCenter">暂无游戏</div>
</el-collapse-item>
</el-collapse>
<div class="createChannel rowFlex allCenter">
<span class="label">找不到对应游戏的链接点此</span>
<el-button
type="text"
size="medium"
@click="showCreateChannel=true"
>新建渠道链接</el-button>
<el-button type="text" size="medium" @click="showCreateChannel = true">新建渠道链接</el-button>
</div>
</div>
</div>
......@@ -263,49 +129,24 @@
<p>暂未绑定关联账号,请先去绑定账号</p>
</div>
<!-- 新建渠道链接 -->
<createChannel
v-if="showCreateChannel"
:type="activeName"
:show="showCreateChannel"
:game-user-info="gameUserInfo"
@close="showCreateChannel = false"
/>
<createChannel v-if="showCreateChannel" :type="activeName" :show="showCreateChannel" :game-user-info="gameUserInfo"
@close="showCreateChannel = false" />
<sendPage v-if="showSendPage" :show.sync="showSendPage" :game-list="conversionGameList" @confirm="startSendPage" />
<!-- 小游戏转游判断 -->
<SendTransWxGame
v-if="showWxGameDrawer"
:show.sync="showWxGameDrawer"
:game-list="selectedWxGameList"
:chat-user-info="chatUserInfo"
@close="SendTransWxGameClose"
@confirm="handleWxGameConfirm"
/>
<SendTransAppGame
v-if="showAppGameDrawer"
:show.sync="showAppGameDrawer"
:game-list="selectedAppGameList"
:chat-user-info="chatUserInfo"
@close="SendTransAppGameClose"
@confirm="handleAppGameConfirm"
/>
<SendTransWxGame v-if="showWxGameDrawer" :show.sync="showWxGameDrawer" :game-list="selectedWxGameList"
:chat-user-info="chatUserInfo" @close="SendTransWxGameClose" @confirm="handleWxGameConfirm" />
<SendTransAppGame v-if="showAppGameDrawer" :show.sync="showAppGameDrawer" :game-list="selectedAppGameList"
:chat-user-info="chatUserInfo" @close="SendTransAppGameClose" @confirm="handleAppGameConfirm" />
<!-- 选择发送渠道 -->
<selectChannel
v-if="showLayer"
:show.sync="showLayer"
:chat-user="chatUserInfo"
:channel-info-list="channelInfoList"
/>
<selectChannel v-if="showLayer" :show.sync="showLayer" :chat-user="chatUserInfo"
:channel-info-list="channelInfoList" />
<!-- 如果选择发送的渠道链接只有一个 直接发送 -->
<sendSelectChannel
:show.sync="showSendChannel"
:chat-user="chatUserInfo"
:channel-info-list="channelInfoList"
/>
<sendSelectChannel :show.sync="showSendChannel" :chat-user="chatUserInfo" :channel-info-list="channelInfoList" />
</div>
</template>
<script>
import { mapState, mapMutations,mapActions } from 'vuex'
import {
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex'
import {
memberExtensionGameList,
passwardEncryption,
channelList,
......@@ -317,19 +158,19 @@
getLandingPageMemberLink,
getLandingPageConfig,
getMemberTransStatus
} from '@/api/game'
import { getRecentSendLog, markTransScene,getZqCserGroup,getZqCserWxBelong,getMediaId,send_log_add } from '@/api/works'
import { companyviewConfig } from '@/api/user'
import { throttle, throttleStart, sendChatMessage } from '@/utils/index'
import createChannel from './sendGame/createChannel'
import sendPage from './sendGame/SendTransPage.vue'
import SendTransWxGame from './sendGame/SendTransWxGame.vue'
import SendTransAppGame from './sendGame/SendTransAppGame.vue'
import selectChannel from './sendGame/selectChannel.vue'
import sendSelectChannel from './sendGame/sendSelectChannel.vue'
import gameLogMixin from '@/mixins/gameLogMixin'
} from '@/api/game'
import { getRecentSendLog, markTransScene, getZqCserGroup, getZqCserWxBelong, getMediaId, send_log_add } from '@/api/works'
import { companyviewConfig } from '@/api/user'
import { throttle, throttleStart, sendChatMessage } from '@/utils/index'
import createChannel from './sendGame/createChannel'
import sendPage from './sendGame/SendTransPage.vue'
import SendTransWxGame from './sendGame/SendTransWxGame.vue'
import SendTransAppGame from './sendGame/SendTransAppGame.vue'
import selectChannel from './sendGame/selectChannel.vue'
import sendSelectChannel from './sendGame/sendSelectChannel.vue'
import gameLogMixin from '@/mixins/gameLogMixin'
export default {
export default {
mixins: [gameLogMixin],
components: {
createChannel,
......@@ -371,7 +212,7 @@
imageInfo: {},
showLayer: false,
showSendChannel: false,
channelInfoList:{},
channelInfoList: {},
transMemberStatus: true
}
},
......@@ -380,8 +221,8 @@
this.sendGameInfo()
},
computed: {
...mapState('game', ['accountSelect', 'bindGameUserList','chatUserInfo','gameUserInfo','send_game_log']),
...mapState('user', ['userInfo','corp_id'])
...mapState('game', ['accountSelect', 'bindGameUserList', 'chatUserInfo', 'gameUserInfo', 'send_game_log']),
...mapState('user', ['userInfo', 'corp_id'])
},
// props: [ 'chatUserInfo', 'chatUser'],
watch: {
......@@ -403,7 +244,7 @@
},
methods: {
...mapMutations('game', ['set_send_game_log']),
initDisable(){
initDisable() {
// 切换 w 账号的时候清空 conversionGameList 数据
this.conversionGameList = []
this.getMemberTransStatus()
......@@ -424,7 +265,7 @@
},
requestConfig() {
return new Promise((resolve, reject) => {
companyviewConfig({corp_id:this.corp_id}).then((res) => {
companyviewConfig({ corp_id: this.corp_id }).then((res) => {
this.weixin_blongs_id = res.data.weixin_blongs_id
resolve()
})
......@@ -813,7 +654,7 @@
})
.catch((err) => {
const list = [
{ msgtype: 'text', text: { content: `账号:${username}` }}
{ msgtype: 'text', text: { content: `账号:${username}` } }
]
// this.set_sendSkillMessage(list)
this.sendChatMessage(`账号:${username}`, 'text')
......@@ -881,7 +722,7 @@
this.getMediaId(value, 'image')
},
// 转端发送落地页面
sendDownLoadPage: throttleStart(function(items, type, index) {
sendDownLoadPage: throttleStart(function (items, type, index) {
if (!this.transMemberStatus) {
this.$message.warning('当前w账号不满足转端要求,请联系组长处理')
return
......@@ -1004,7 +845,7 @@
this.sendGameLog(game_data)
} else {
// this.set_sendSkillMessage(list)
this.getMediaId(data.game_data.game_url,'image')
this.getMediaId(data.game_data.game_url, 'image')
this.sendGameLog(data.game_data)
}
}
......@@ -1199,10 +1040,10 @@
// }
// ]
// this.set_sendSkillMessage(list)
this.sendChatMessage(`游戏地址:${data.landing_page_url} \n账号:${data.username} \n密码:${data.password}`,'text')
this.sendChatMessage(`游戏地址:${data.landing_page_url} \n账号:${data.username} \n密码:${data.password}`, 'text')
},
async getMediaId(picurl){
async getMediaId(picurl) {
// 发送图片作为链接消息
if (picurl) {
this.sendChatMessage(picurl, 'image')
......@@ -1212,109 +1053,206 @@
}
},
}
}
</script>
<style lang="scss" scoped>
.sendGameContent{
}
</script>
<style lang="scss" scoped>
.sendGameContent {
width: 100%;
height: 100%;
overflow: auto;
.createChannel {
font-size: 14px;
margin-top: 16px;
padding: 0 16px;
.label {
color: #878787;
font-size: 12px;
margin-right: 5px;
}
}
.channelLoading {
color: #00bf8a;
font-size: 16px;
text-align: center;
padding: 20px;
}
.btnRelease {
position: relative;
padding-top: 40px;
// ::v-deep .el-collapse-item__header {
// border-bottom: none;
// background: #f7f8fa;
// }
}
background: #fff;
.btntab {
width: 100%;
display: flex;
height: 36px;
position: absolute;
left: 0;
top: 0;
.btn {
height: 44px;
margin: 12px 16px;
width: calc(100% - 32px);
.radio-group {
width: 100%;
::v-deep .el-radio-group {
width: 100%;
display: flex;
}
::v-deep .el-radio-button {
flex: 1;
height: 44px;
&__inner {
width: 100%;
height: 100%;
display: flex;
cursor: pointer;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: 500;
border-color: #f0f0f0;
}
}
.btnActive {
background: #00bf8a;
color: #fff;
}
}
.gameList {
width: 100%;
::v-deep .el-tabs__item {
width: 70px;
background: #fff;
::v-deep .el-collapse {
border: none;
.el-collapse-item {
border: none;
margin-bottom: 1px;
&__header {
height: 52px;
line-height: 52px;
background: #fff;
border: none;
border-bottom: 1px solid #f0f0f0;
padding: 0 16px;
font-size: 16px;
font-weight: 500;
color: #333;
.el-collapse-item__arrow {
color: #999;
font-size: 14px;
}
}
&__wrap {
border: none;
background: #fafafa;
}
&__content {
padding: 0;
background: #fafafa;
}
}
}
.gameListItem {
width: 100%;
height: 40px;
background: #f7f8fa;
padding: 0 10px;
height: 52px;
background: #fff;
padding: 0 16px;
border-bottom: 1px solid #f0f0f0;
display: flex;
align-items: center;
justify-content: space-between;
&:last-child {
border-bottom: none;
}
p {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
color: #333;
margin: 0;
flex: 1;
}
.icon {
::v-deep .el-button {
background: #1890ff;
border-color: #1890ff;
color: #fff;
font-size: 14px;
cursor: pointer;
height: 32px;
padding: 0 16px;
border-radius: 4px;
&:hover {
background: #40a9ff;
border-color: #40a9ff;
}
&:disabled {
background: #f5f5f5;
border-color: #d9d9d9;
color: #bfbfbf;
}
::v-deep .el-collapse {
border-top: none;
border-bottom: none;
}
::v-deep .el-collapse-item__header {
border-bottom: none;
::v-deep .el-popover__reference {
.el-button {
background: #1890ff;
border-color: #1890ff;
color: #fff;
&:hover {
background: #40a9ff;
border-color: #40a9ff;
}
::v-deep .el-collapse-item__wrap {
border-bottom: none;
}
::v-deep .el-collapse {
border-top: none;
border-bottom: none;
}
::v-deep .el-collapse-item {
border-radius: 4px;
background: #f7f8fa;
}
::v-deep .el-collapse-item__content {
padding: 5px;
.collapseContent {
background: #fff;
}
::v-deep .el-collapse-item__wrap {
border-bottom: none;
// 搜索框样式
::v-deep .el-input {
margin: 16px;
width: calc(100% - 32px);
.el-input__inner {
border-radius: 6px;
border: 1px solid #d9d9d9;
height: 40px;
font-size: 14px;
&:focus {
border-color: #1890ff;
}
}
.el-input__prefix {
left: 12px;
}
}
// 暂无游戏状态
.rowFlex.allCenter {
padding: 40px 0;
color: #999;
font-size: 14px;
}
}
}
}
</style>
<style>
.sendLink {
.sendLink {
width: 150px;
height: 25px;
cursor: pointer;
}
.sendLink:hover {
color: #00bf8a;
}</style>
}
.sendLink:hover {
color: #00bf8a;
}
</style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论