提交 26ef2fa3 作者: 毛细亚

set_send_game_log还没有适配

上级 ae154c5a
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"moment": "^2.29.1", "moment": "^2.29.1",
"postcss-plugin-px2rem": "^0.8.1", "postcss-plugin-px2rem": "^0.8.1",
"qrcode.vue": "^3.6.0", "qrcode.vue": "^1.7.0",
"sass": "^1.89.0", "sass": "^1.89.0",
"sass-loader": "^16.0.5", "sass-loader": "^16.0.5",
"vconsole": "^3.15.1", "vconsole": "^3.15.1",
......
...@@ -208,3 +208,12 @@ export function getZqCserWxBelong(data) { ...@@ -208,3 +208,12 @@ export function getZqCserWxBelong(data) {
data data
}) })
} }
// 记录转游发送记录
export function send_log_add(data) {
return request({
url: returnApi('/corp_zyou_game_send_log/add'),
method: 'post',
data
})
}
\ No newline at end of file
<template> <template>
<div class="sendGameContent"> <div class="sendGameContent">
<div <div
v-if="!disabled && bindGameUserList.length > 0" v-if="!disabled && bindGameUserList.length > 0"
class="btnRelease" class="btnRelease"
...@@ -292,7 +291,7 @@ ...@@ -292,7 +291,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations,mapActions } from 'vuex'
import { import {
memberExtensionGameList, memberExtensionGameList,
passwardEncryption, passwardEncryption,
...@@ -306,7 +305,7 @@ ...@@ -306,7 +305,7 @@
getLandingPageConfig, getLandingPageConfig,
getMemberTransStatus getMemberTransStatus
} from '@/api/game' } from '@/api/game'
import { getRecentSendLog, markTransScene,getZqCserGroup,getZqCserWxBelong } from '@/api/works' import { getRecentSendLog, markTransScene,getZqCserGroup,getZqCserWxBelong,getMediaId } from '@/api/works'
import { companyviewConfig } from '@/api/user' import { companyviewConfig } from '@/api/user'
import { throttle, throttleStart } from '@/utils/index' import { throttle, throttleStart } from '@/utils/index'
import createChannel from './sendGame/createChannel' import createChannel from './sendGame/createChannel'
...@@ -355,11 +354,12 @@ ...@@ -355,11 +354,12 @@
} }
}, },
mounted() { mounted() {
this.initDisable()
this.sendGameInfo() this.sendGameInfo()
}, },
computed: { computed: {
...mapState('game', ['accountSelect', 'bindGameUserList','chatUserInfo','gameUserInfo']), ...mapState('game', ['accountSelect', 'bindGameUserList','chatUserInfo','gameUserInfo']),
...mapState('user', ['userInfo']) ...mapState('user', ['userInfo','corp_id'])
}, },
// props: [ 'chatUserInfo', 'chatUser'], // props: [ 'chatUserInfo', 'chatUser'],
watch: { watch: {
...@@ -380,11 +380,20 @@ ...@@ -380,11 +380,20 @@
} }
}, },
methods: { methods: {
...mapMutations('common', ['set_sendSkillMessage']),
// ...mapMutations('game', ['set_send_game_log']), // ...mapMutations('game', ['set_send_game_log']),
initDisable(){
// 切换 w 账号的时候清空 conversionGameList 数据
this.conversionGameList = []
this.getMemberTransStatus()
if (this.accountSelect && this.accountSelect !== '' && this.bindGameUserList.length > 0) {
this.disabled = false
} else {
this.disabled = true
}
},
requestConfig() { requestConfig() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
companyviewConfig().then((res) => { companyviewConfig({corp_id:this.corp_id}).then((res) => {
this.weixin_blongs_id = res.data.weixin_blongs_id this.weixin_blongs_id = res.data.weixin_blongs_id
resolve() resolve()
}) })
...@@ -736,10 +745,10 @@ ...@@ -736,10 +745,10 @@
str = 'IOS游戏链接:' str = 'IOS游戏链接:'
} else { } else {
} }
const list = [ // const list = [
{ msgtype: 'text', text: { content: `${str}${item.url}` }} // { msgtype: 'text', text: { content: `${str}${item.url}` }}
] // ]
this.set_sendSkillMessage(list) this.sendChatMessage(`${str}${item.url}`, 'text')
this.markTransScene(type) this.markTransScene(type)
item.type = 1 item.type = 1
this.sendGameLog(item) this.sendGameLog(item)
...@@ -760,13 +769,14 @@ ...@@ -760,13 +769,14 @@
).username ).username
passwardEncryption({ member_id: this.accountSelect }) passwardEncryption({ member_id: this.accountSelect })
.then((res) => { .then((res) => {
const list = [ // const list = [
{ // {
msgtype: 'text', // msgtype: 'text',
text: { content: `账号:${username} \n密码:${res.data.encryptPassword}`, key: res.data.key, iv: res.data.iv } // text: { content: `账号:${username} \n密码:${res.data.encryptPassword}`, key: res.data.key, iv: res.data.iv }
} // }
] // ]
this.set_sendSkillMessage(list) // this.set_sendSkillMessage(list)
this.sendChatMessage(`账号:${username} \n密码:${res.data.encryptPassword}`, 'text')
this.markTransScene(type) this.markTransScene(type)
this.sendGameLog(item) this.sendGameLog(item)
}) })
...@@ -774,7 +784,8 @@ ...@@ -774,7 +784,8 @@
const list = [ const list = [
{ msgtype: 'text', text: { content: `账号:${username}` }} { msgtype: 'text', text: { content: `账号:${username}` }}
] ]
this.set_sendSkillMessage(list) // this.set_sendSkillMessage(list)
this.sendChatMessage(`账号:${username}`, 'text')
item.type = 1 item.type = 1
this.sendGameLog(item) this.sendGameLog(item)
console.log(err) console.log(err)
...@@ -813,7 +824,8 @@ ...@@ -813,7 +824,8 @@
} }
} }
] ]
this.set_sendSkillMessage(list) // this.set_sendSkillMessage(list)
this.sendChatMessage(`${str}${item.url} \n账号:${username} \n密码:${res.data.encryptPassword}`, 'text')
this.markTransScene(type) this.markTransScene(type)
item.type = 1 item.type = 1
this.sendGameLog(item) this.sendGameLog(item)
...@@ -825,7 +837,8 @@ ...@@ -825,7 +837,8 @@
text: { content: `${str}${item.url} \n账号:${username}` } text: { content: `${str}${item.url} \n账号:${username}` }
} }
] ]
this.set_sendSkillMessage(list) // this.set_sendSkillMessage(list)
this.sendChatMessage(`${str}${item.url} \n账号:${username}`, 'text')
this.sendGameLog(item) this.sendGameLog(item)
console.log(err) console.log(err)
}) })
...@@ -833,15 +846,8 @@ ...@@ -833,15 +846,8 @@
// 发送游戏落地页 // 发送游戏落地页
startSendPage(value) { startSendPage(value) {
console.log(value, 'value') console.log(value, 'value')
const list = [ // this.set_sendSkillMessage(list)
{ this.getMediaId(value, 'image')
msgtype: 'image',
image: {
picurl: value
}
}
]
this.set_sendSkillMessage(list)
}, },
// 转端发送落地页面 // 转端发送落地页面
sendDownLoadPage: throttleStart(function(items, type, index) { sendDownLoadPage: throttleStart(function(items, type, index) {
...@@ -938,10 +944,8 @@ ...@@ -938,10 +944,8 @@
} else { } else {
// 没有转端标记过,发送小程序链接 判断标题和封面是否存在 存在发小程序卡片 不存在发二维码 // 没有转端标记过,发送小程序链接 判断标题和封面是否存在 存在发小程序卡片 不存在发二维码
if (data.share_data.share_title && data.share_data.share_img) { if (data.share_data.share_title && data.share_data.share_img) {
const list = [ const miniprogramInfo =
{ {
msgtype: 'miniprogram',
miniprogram: {
appid: data.share_data.app_id, appid: data.share_data.app_id,
rawid: data.share_data.raw_id, rawid: data.share_data.raw_id,
channle_id: data.share_data.channel_key, channle_id: data.share_data.channel_key,
...@@ -949,25 +953,17 @@ ...@@ -949,25 +953,17 @@
title: data.share_data.share_title, title: data.share_data.share_title,
platform: 27, platform: 27,
page: data.share_data.page, page: data.share_data.page,
picurl: data.share_data.share_img imgUrl: data.share_data.share_img
} }
} // this.set_sendSkillMessage(list)
] this.sendChatMessage(miniprogramInfo, 'miniprogram')
this.set_sendSkillMessage(list)
const game_data = this.$clone(data.game_data) const game_data = this.$clone(data.game_data)
game_data.type = 3 game_data.type = 3
console.log(game_data, 'data----------') console.log(game_data, 'data----------')
this.sendGameLog(game_data) this.sendGameLog(game_data)
} else { } else {
const list = [ // this.set_sendSkillMessage(list)
{ this.getMediaId(data.game_data.game_url,'image')
msgtype: 'image',
image: {
picurl: data.game_data.game_url
}
}
]
this.set_sendSkillMessage(list)
this.sendGameLog(data.game_data) this.sendGameLog(data.game_data)
} }
} }
...@@ -1131,15 +1127,16 @@ ...@@ -1131,15 +1127,16 @@
// 小游戏游戏确认 // 小游戏游戏确认
async handleWxGameConfirm(value) { async handleWxGameConfirm(value) {
console.log(value, 'value') console.log(value, 'value')
const list = [ // const list = [
{ // {
msgtype: 'image', // msgtype: 'image',
image: { // image: {
picurl: value // picurl: value
} // }
} // }
] // ]
this.set_sendSkillMessage(list) // this.set_sendSkillMessage(list)
this.getMediaId(value, 'image')
}, },
SendTransAppGameClose() { SendTransAppGameClose() {
this.selectedAppGameList = [] this.selectedAppGameList = []
...@@ -1150,21 +1147,86 @@ ...@@ -1150,21 +1147,86 @@
// 安卓或者 IOS 游戏处理 // 安卓或者 IOS 游戏处理
handleAppGameConfirm(data) { handleAppGameConfirm(data) {
this.selectedAppGameList = [] this.selectedAppGameList = []
const list = [ // const list = [
{ // {
// msgtype: 'text',
// text: {
// content: `游戏地址:${data.landing_page_url} \n账号:${data.username} \n密码:${data.password}`
// }
// }
// ]
// this.set_sendSkillMessage(list)
this.sendChatMessage(`游戏地址:${data.landing_page_url} \n账号:${data.username} \n密码:${data.password}`,'text')
},
sendChatMessage(content,type){
let message = {}
if(type == 'text'){
message = {
msgtype: 'text', msgtype: 'text',
text: { text: {
content: `游戏地址:${data.landing_page_url} \n账号:${data.username} \n密码:${data.password}` content: content
},
success: (res) => {
console.log(res, '发送文本成功')
},
fail: (err) => {
console.log(err, '发送文本失败')
} }
} }
] }else if(type == 'link'){
this.set_sendSkillMessage(list) message = {
msgtype: 'news',
news: content,
success: (res) => {
console.log(res, '发送 news 成功')
},
fail: (err) => {
console.log(err, '发送 news 失败')
} }
} }
}else if(type == 'image'){
message = {
msgtype: 'image',
image: {
mediaid: content
},
success: (res) => {
console.log(res, '发送 image 成功')
},
fail: (err) => {
console.log(err, '发送 image 失败')
}
}
}else if(type=='miniprogram'){
message = {
msgtype: 'miniprogram',
miniprogram: content,
}
}
console.log(message,'1231')
this.$ww.sendChatMessage(message)
},
async getMediaId(picurl){
// 发送图片作为链接消息
if (picurl) {
const res = await getMediaId({url:picurl})
if(res.status_code == 1){
this.sendChatMessage(res.data.media_id,'image')
}
} else {
// 如果没有图片URL,提示用户
this.$message.error('图片链接不存在,无法发送')
}
},
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.sendGameContent{ .sendGameContent{
width: 100%;
height: 100%;
overflow: auto;
.sendLink { .sendLink {
width: 150px; width: 150px;
height: 25px; height: 25px;
...@@ -1213,12 +1275,9 @@ ...@@ -1213,12 +1275,9 @@
} }
.gameList { .gameList {
width: 100%; width: 100%;
height: 300px;
overflow: auto;
::v-deep .el-tabs__item { ::v-deep .el-tabs__item {
width: 70px; width: 70px;
} }
.gameListItem { .gameListItem {
width: 100%; width: 100%;
height: 40px; height: 40px;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-drawer <el-drawer
title="选择游戏" title="选择游戏"
:visible="show" :visible="show"
width="400px" size="360px"
@close="close" @close="close"
> >
<el-form <el-form
...@@ -95,12 +95,14 @@ ...@@ -95,12 +95,14 @@
<span class="dialog-footer rowFlex"> <span class="dialog-footer rowFlex">
<el-button <el-button
class="btn" class="btn"
size="small"
@click="close" @click="close"
>取消</el-button> >取消</el-button>
<el-button <el-button
class="btn" class="btn"
:loading="loading" :loading="loading"
type="primary" type="primary"
size="small"
@click="handleConfirm" @click="handleConfirm"
>确认</el-button> >确认</el-button>
</span> </span>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-drawer <el-drawer
title="选择游戏" title="选择游戏"
:visible="show" :visible="show"
width="400px" size="360px"
@close="close" @close="close"
> >
<el-form label-position="top" class="game-select-container"> <el-form label-position="top" class="game-select-container">
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
<qrcode-vue ref="qrcode" :value="sendPageUrl" :size="size" level="H"></qrcode-vue> <qrcode-vue ref="qrcode" :value="sendPageUrl" :size="size" level="H"></qrcode-vue>
</div> </div>
<span class="dialog-footer rowFlex"> <span class="dialog-footer rowFlex">
<el-button class="btn" @click="close">取消</el-button> <el-button class="btn" @click="close" size="small">取消</el-button>
<el-button class="btn" type="primary" :loading="loading" @click="handleConfirm">确认</el-button> <el-button class="btn" type="primary" :loading="loading" @click="handleConfirm" size="small">确认</el-button>
</span> </span>
</el-drawer> </el-drawer>
</template> </template>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-drawer <el-drawer
title="选择游戏" title="选择游戏"
:visible="show" :visible="show"
width="400px" size="360px"
@close="close" @close="close"
> >
<el-form ref="wxGameForm" :model="wxGameForm" :rules="wxGameRules" label-position="top" class="game-select-container"> <el-form ref="wxGameForm" :model="wxGameForm" :rules="wxGameRules" label-position="top" class="game-select-container">
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span class="dialog-footer rowFlex"> <span class="dialog-footer rowFlex">
<el-button class="btn" @click="close">取消</el-button> <el-button class="btn" @click="close" size="small">取消</el-button>
<el-button class="btn" :loading="loading" type="primary" @click="handleConfirm">确认</el-button> <el-button class="btn" :loading="loading" type="primary" @click="handleConfirm" size="small">确认</el-button>
</span> </span>
<div ref="composeContainer" class="compose-container"> <div ref="composeContainer" class="compose-container">
<div ref="imageWrapper" class="image-wrapper"> <div ref="imageWrapper" class="image-wrapper">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
title="新建渠道链接" title="新建渠道链接"
:visible="show" :visible="show"
@close='close' @close='close'
width="500px" size="360px"
> >
<div class="channelContent"> <div class="channelContent">
<el-form <el-form
...@@ -119,11 +119,12 @@ ...@@ -119,11 +119,12 @@
class="dialog-footer" class="dialog-footer"
style="padding-top: 0;padding-bottom:0;" style="padding-top: 0;padding-bottom:0;"
> >
<el-button @click="close()">取 消</el-button> <el-button @click="close()" size="small">取 消</el-button>
<el-button <el-button
type="primary" type="primary"
:loading='btnLoading' :loading='btnLoading'
@click="submit" @click="submit"
size="small"
>确 定</el-button> >确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
......
...@@ -285,6 +285,9 @@ ...@@ -285,6 +285,9 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.vipToolsContent{ .vipToolsContent{
width: 100%;
height: 100%;
overflow: auto;
.sendLink { .sendLink {
width: 150px; width: 150px;
height: 25px; height: 25px;
...@@ -321,7 +324,7 @@ ...@@ -321,7 +324,7 @@
.gameList { .gameList {
width: 100%; width: 100%;
height: 350px; height: auto;
overflow: auto; overflow: auto;
::v-deep .el-tabs__item { ::v-deep .el-tabs__item {
width: 70px; width: 70px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论