提交 ae154c5a 作者: 毛细亚

开始调试发送游戏

上级 22a18be7
......@@ -20,11 +20,13 @@
"cos-js-sdk-v5": "^1.10.1",
"dingtalk-jsapi": "^3.1.0",
"element-ui": "^2.15.14",
"html2canvas": "^1.4.1",
"js-cookie": "^3.0.5",
"lib-flexible": "^0.3.2",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"postcss-plugin-px2rem": "^0.8.1",
"qrcode.vue": "^3.6.0",
"sass": "^1.89.0",
"sass-loader": "^16.0.5",
"vconsole": "^3.15.1",
......
......@@ -41,6 +41,9 @@ importers:
element-ui:
specifier: ^2.15.14
version: 2.15.14(vue@2.7.16)
html2canvas:
specifier: ^1.4.1
version: 1.4.1
js-cookie:
specifier: ^3.0.5
version: 3.0.5
......@@ -56,6 +59,9 @@ importers:
postcss-plugin-px2rem:
specifier: ^0.8.1
version: 0.8.1
qrcode.vue:
specifier: ^3.6.0
version: 3.6.0(vue@2.7.16)
sass:
specifier: ^1.89.0
version: 1.89.0
......@@ -1336,6 +1342,10 @@ packages:
balanced-match@1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
base64-arraybuffer@1.0.2:
resolution: {integrity: sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==}
engines: {node: '>= 0.6.0'}
base64-js@1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
......@@ -1883,6 +1893,9 @@ packages:
peerDependencies:
postcss: ^8.0.9
css-line-break@2.1.0:
resolution: {integrity: sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==}
css-loader@6.11.0:
resolution: {integrity: sha512-CTJ+AEQJjq5NzLga5pE39qdiSV56F8ywCIsqNIRF0r7BDgWsN25aazToqAFg7ZrtA/U016xudB3ffgweORxX7g==}
engines: {node: '>= 12.13.0'}
......@@ -2820,6 +2833,10 @@ packages:
webpack:
optional: true
html2canvas@1.4.1:
resolution: {integrity: sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==}
engines: {node: '>=8.0.0'}
htmlparser2@6.1.0:
resolution: {integrity: sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==}
......@@ -4248,6 +4265,11 @@ packages:
(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
qrcode.vue@3.6.0:
resolution: {integrity: sha512-vQcl2fyHYHMjDO1GguCldJxepq2izQjBkDEEu9NENgfVKP6mv/e2SU62WbqYHGwTgWXLhxZ1NCD1dAZKHQq1fg==}
peerDependencies:
vue: ^3.0.0
qs@6.13.0:
resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==}
engines: {node: '>=0.6'}
......@@ -4899,6 +4921,9 @@ packages:
engines: {node: '>=10'}
hasBin: true
text-segmentation@1.0.3:
resolution: {integrity: sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==}
thenify-all@1.6.0:
resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==}
engines: {node: '>=0.8'}
......@@ -5098,6 +5123,9 @@ packages:
resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==}
engines: {node: '>= 0.4.0'}
utrie@1.0.2:
resolution: {integrity: sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==}
uuid@3.4.0:
resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==}
deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
......@@ -7135,6 +7163,8 @@ snapshots:
balanced-match@1.0.2: {}
base64-arraybuffer@1.0.2: {}
base64-js@1.5.1: {}
batch@0.6.1: {}
......@@ -7643,6 +7673,10 @@ snapshots:
dependencies:
postcss: 8.5.3
css-line-break@2.1.0:
dependencies:
utrie: 1.0.2
css-loader@6.11.0(webpack@5.99.8):
dependencies:
icss-utils: 5.1.0(postcss@8.5.3)
......@@ -8835,6 +8869,11 @@ snapshots:
optionalDependencies:
webpack: 5.99.8
html2canvas@1.4.1:
dependencies:
css-line-break: 2.1.0
text-segmentation: 1.0.3
htmlparser2@6.1.0:
dependencies:
domelementtype: 2.3.0
......@@ -10317,6 +10356,10 @@ snapshots:
q@1.5.1:
optional: true
qrcode.vue@3.6.0(vue@2.7.16):
dependencies:
vue: 2.7.16
qs@6.13.0:
dependencies:
side-channel: 1.1.0
......@@ -11143,6 +11186,10 @@ snapshots:
commander: 2.20.3
source-map-support: 0.5.21
text-segmentation@1.0.3:
dependencies:
utrie: 1.0.2
thenify-all@1.6.0:
dependencies:
thenify: 3.3.1
......@@ -11364,6 +11411,10 @@ snapshots:
utils-merge@1.0.1: {}
utrie@1.0.2:
dependencies:
base64-arraybuffer: 1.0.2
uuid@3.4.0:
optional: true
......
......@@ -91,12 +91,12 @@ export default {
},
{
label: '通讯录',
path: '/mailList'
path: '/addressBook'
},
{
label: '快捷发送',
path: '/quickSendGame'
},
// {
// label: '快捷发送',
// path: '/quickSend'
// },
// {
// label: '通讯录',
// path: '/addressBook'
......@@ -311,7 +311,7 @@ export default {
/* 收起状态:只显示第一行 */
.mobile-el-menu.collapsed {
max-height: 50px;
max-height: 35px;
overflow: hidden;
}
......@@ -335,7 +335,7 @@ export default {
.menu-toggle-btn {
position: absolute;
right: 10px;
top: 25px;
top: 18px;
transform: translateY(-50%);
display: flex;
align-items: center;
......@@ -362,8 +362,8 @@ export default {
}
.el-menu--horizontal>.el-menu-item {
height: 50px;
line-height: 50px;
height: 35px;
line-height: 35px;
}
body {
......
......@@ -149,4 +149,62 @@ export function remarkSearchSelect(data) {
method: 'post',
data
})
}
// 礼包可发送礼包
export function giftCodeList(data) {
return request({
url: returnApi('/corp_gift_package_list/getCanSendPackage'),
method: 'post',
data
})
}
// 礼包码发送
export function sendGiftCode(data) {
return request({
url: returnApi('/corp_gift_package_list/sendGiftCode'),
method: 'post',
data
})
}
// 获取举报授权链接地址
export function getZyouAuthLink(data) {
return request({
url: returnApi('/corp_zyou_bind/getZyouAuthLink'),
method: 'post',
data
})
}
// 转游最近发送的记录 5 条
export function getRecentSendLog(data) {
return request({
url: returnApi('/corp_zyou_game_send_log/getRecentSendLog'),
method: 'post',
data
})
}
// 标记转端
export function markTransScene(data) {
return request({
url: returnApi('/external_user/markTransScene'),
method: 'post',
data
})
}
// 根据用户 id 获取掌权分组
export function getZqCserGroup(data) {
return request({
url: returnApi('/common/getZqCserGroup'),
method: 'post',
data
})
}
// 根据用户 id 获取掌权项目
export function getZqCserWxBelong(data) {
return request({
url: returnApi('/common/getZqCserWxBelong'),
method: 'post',
data
})
}
\ No newline at end of file
<svg t="1718879942311" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4563" width="200" height="200"><path d="M256 960a128 128 0 0 1-128-128V466.645333A85.376 85.376 0 0 1 64 384v-106.666667a85.333333 85.333333 0 0 1 85.333333-85.333333h290.901334l-68.629334-68.629333a8.533333 8.533333 0 0 1 0-12.074667l33.194667-33.173333a8.533333 8.533333 0 0 1 12.053333 0l84.48 84.48 84.48-84.48a8.533333 8.533333 0 0 1 12.053334 0l33.194666 33.173333a8.533333 8.533333 0 0 1 0 12.074667l-68.650666 68.608L874.666667 192a85.333333 85.333333 0 0 1 85.333333 85.333333v106.666667a85.376 85.376 0 0 1-64 82.645333V832a128 128 0 0 1-128 128H256z m213.333333-490.666667H192v362.666667a64 64 0 0 0 60.245333 63.893333L256 896h213.333333V469.333333z m362.666667 0H533.333333v426.666667h234.666667a64 64 0 0 0 63.893333-60.245333L832 832V469.333333zM469.333333 256H149.333333a21.333333 21.333333 0 0 0-21.184 18.837333L128 277.333333v106.666667a21.333333 21.333333 0 0 0 18.837333 21.184L149.333333 405.333333h320v-149.333333z m405.333334 0H533.333333v149.333333h341.333334a21.333333 21.333333 0 0 0 21.184-18.837333L896 384v-106.666667a21.333333 21.333333 0 0 0-18.837333-21.184L874.666667 256z" fill="#8CA4BA" p-id="4564"></path></svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>VIP自助工具</title>
<g id="游戏" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="游戏-违规记录" transform="translate(-564, -468)" fill-rule="nonzero">
<g id="4.数据展示/10.Popover气泡卡片/上左⬇️" transform="translate(552, 452)">
<g id="VIP自助工具" transform="translate(12, 16)">
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
<path d="M7.99821895,14.321585 C7.56391795,14.321585 7.15856419,14.1264531 6.85937495,13.7875521 L1.12654628,7.17392176 C0.595742151,6.55774355 0.576419359,5.61294483 1.09759904,4.97622538 L3.26912253,2.31640027 C3.55866885,1.95695807 3.98330845,1.75156533 4.43691378,1.75156533 L11.5884714,1.75156533 C12.0324338,1.75156533 12.4570734,1.95697773 12.7466197,2.31640027 L14.9277861,4.97622538 C15.4489658,5.61294483 15.4393044,6.55774355 14.8988389,7.17392176 L9.12742004,13.7875521 C8.83787372,14.1264531 8.42285856,14.321585 7.99821895,14.321585 Z M7.41909807,13.0918286 C7.55918834,13.2618573 7.75534332,13.351868 7.9701627,13.351868 C8.17564989,13.351868 8.37178699,13.2618573 8.52124521,13.0918286 L14.1160422,6.65100913 C14.3775584,6.35097981 14.3868906,5.89091444 14.1347066,5.58087331 L12.0051415,2.99054812 C11.8650333,2.82051939 11.659564,2.72051599 11.4447268,2.72051599 L4.5142988,2.72051599 C4.29947942,2.72051599 4.09399224,2.82051939 3.95388409,2.99054812 L1.85231552,5.58087331 C1.60013158,5.89091444 1.60946378,6.35097981 1.8709978,6.65100913 L7.41908019,13.0918286 L7.41909807,13.0918286 Z M7.681625,9.94284375 L4.49796875,6.6775625 C4.37553125,6.54695312 4.37553125,6.342875 4.50614063,6.21225 C4.63675,6.0898125 4.84082813,6.0898125 4.97145313,6.22042187 L7.92654688,9.249 L11.03675,6.21226562 C11.167375,6.0898125 11.3714375,6.0898125 11.5020625,6.22042187 C11.6245,6.35104687 11.6245,6.55510937 11.4938906,6.68573437 L8.14695313,9.95104687 C8.08164063,10.0081719 8.00001563,10.0408281 7.91839063,10.0408281 C7.83673438,10.0408281 7.7469375,10.0081562 7.681625,9.94284375 Z" id="形状" fill="#889FB5"></path>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
......@@ -48,11 +48,11 @@
</template>
<script>
import { remarkSearchSelect } from '@/api/user'
import { remarkSearchSelect } from '@/api/works'
import { mapState } from 'vuex'
export default {
name: 'SearchSelectUser',
props: ['placeholder', 'label', 'isResize', 'userid', 'disabled', 'width'],
props: ['placeholder','corp_id', 'label', 'isResize', 'userid', 'disabled', 'width'],
// End of Selection
data() {
return {
......@@ -100,6 +100,7 @@
const data = {
remark: this.resulte.trim(),
...this.pageInfo,
corp_id: [this.corp_id]|| [],
userid: this.userid || '',
}
remarkSearchSelect(data).then((res) => {
......
......@@ -4,12 +4,13 @@ import userInfo from '../views/userInfo/userInfo.vue'
import quickReply from '../views/quickReply.vue'
import giftRecord from '../views/giftRecord.vue'
import applyRecord from '../views/applyRecord.vue'
import addressBook from '../views/addressBook.vue'
import addressBook from '../views/mailList.vue'
import orderList from '../views/orderList.vue'
import roleInfo from '../views/roleInfo.vue'
import violationRecord from '../views/ViolationRecord.vue'
import taskRecord from '../views/taskRecord.vue'
import mailList from '@/views/mailList.vue'
import quickSendGame from '@/views/quickSendGame.vue'
import Cookies from 'js-cookie'
import store from '@/store'
Vue.use(VueRouter)
......@@ -69,9 +70,9 @@ const routes = [
component: taskRecord
},
{
path: '/mailList',
name: 'mailList',
component: mailList
path: '/quickSendGame',
name: 'quickSendGame',
component: quickSendGame
},
{
path: '/login',
......
<template>
<!-- 转端发送游戏 -->
<el-drawer
title="选择游戏"
:visible="show"
width="400px"
@close="close"
>
<el-form label-position="top" class="game-select-container">
<div v-for="(item,index) in gameList" :key="index">
<el-form-item :label="gameTypeLabel(item.game_type)">
<el-select
v-model="item.send_trans_page_id"
placeholder="请选择游戏"
style="width: 100%"
:clearable="true"
>
<el-option
v-for="(item,index) in item.children"
:key="index"
:label="item.game_name + ' / ' + item.game_id || ''"
:value="item.game_id || ''"
>
</el-option>
</el-select>
</el-form-item>
</div>
</el-form>
<div v-show="false" class="createImage">
<qrcode-vue ref="qrcode" :value="sendPageUrl" :size="size" level="H"></qrcode-vue>
</div>
<span class="dialog-footer rowFlex">
<el-button class="btn" @click="close">取消</el-button>
<el-button class="btn" type="primary" :loading="loading" @click="handleConfirm">确认</el-button>
</span>
</el-drawer>
</template>
<script>
import { getLandingPageTransfer } from '@/api/game'
import { mapState, mapMutations } from 'vuex'
import QrcodeVue from 'qrcode.vue'
export default {
name: 'SendTransPage',
components: {
QrcodeVue
},
props: {
show: {
default: false,
type: Boolean
},
gameList: {
default: () => [],
type: Array
}
},
computed: {
...mapState('game', ['accountSelect', 'bindGameUserList']),
...mapState('user', ['userInfo'])
},
data() {
return {
loading: false,
sendPageUrl: '',
size: 200,
gameInfoLog: []
}
},
mounted() {
},
methods: {
...mapMutations('game', ['set_send_game_log']),
async getQRCodeBlob() {
const canvas = this.$refs.qrcode.$el.querySelector('canvas')
try {
const blob = await new Promise(resolve => {
canvas.toBlob(blob => {
resolve(blob)
}, 'image/png')
})
blob.name = 'sendPageImage.png'
// 如果需要预览,可以创建一个临时 URL
// const blobUrl = URL.createObjectURL(blob)
this.uploadCos(blob)
} catch (error) {
this.loading = false
console.error('获取 Blob 失败:', error)
}
},
async uploadCos(File) {
const uploadConfig = {
dir: '/company_wx/service/avatars/'
}
const result = await this.uploading(File, uploadConfig)
if (result.data) {
this.loading = false
this.$emit('confirm', result.data)
this.close()
} else {
this.loading = false
this.$message.warning('二维码上传失败,请重新生成')
}
setTimeout(() => {
this.loading = false
}, 2000)
},
gameTypeLabel(game_type) {
switch (game_type) {
case 2:
return 'H5游戏'
case 3:
return '安卓游戏'
case 4:
return 'IOS游戏'
default:
return ''
}
},
async handleConfirm() {
const sendGameList = this.gameList.filter(item => item.send_trans_page_id).map(item => {
return {
game_type: item.game_type,
game_id: item.send_trans_page_id
}
})
this.gameInfoLog = this.gameList.map(item => {
if (item.send_trans_page_id && item.send_trans_page_id !== '') {
const gameInfo = item.children.find(items => items.game_id == item.send_trans_page_id)
return gameInfo
} else {
return null
}
})
this.gameInfoLog = this.gameInfoLog.filter(item => item)
// if (this.gameInfoLog && this.gameInfoLog.length > 0) {
// this.gameInfoLog.map(item => {
// setTimeout(() => {
// this.set_send_game_log({ game_id: item.game_id, game_name: item.game_name })
// }, 500)
// })
// }
this.loading = true
try {
const account = this.bindGameUserList.find(
(item) => item.member_id == this.accountSelect
)
const data = {
zq_user_id: this.userInfo.id,
zq_user_name: this.userInfo.username,
username: account.username,
member_id: this.accountSelect,
game: sendGameList
}
const res = await getLandingPageTransfer(data)
if (res.status_code === 1 && res.data?.data?.landing_page_url) {
this.sendPageUrl = res.data.data.landing_page_url
await this.$nextTick()
setTimeout(() => {
this.getQRCodeBlob()
}, 300)
} else {
this.$message.warning('获取落地页地址失败')
}
} catch (error) {
this.loading = false
} finally {
this.loading = false
}
},
close() {
this.$emit('update:show', false)
}
}
}
</script>
<style scoped lang="scss">
.dialog-footer{
width: calc(100%);
height: auto;
position: absolute;
padding-top: 20px;
padding-bottom: 20px;
bottom: 0;
right: 0;
justify-content: flex-end;
border-top: 1px solid rgba(0, 0, 0, 0.06);
background: #fff;
.btn{
width:84px ;
height: 32px;
}
}
.game-select-container {
padding: 0 20px;
::v-deep .el-icon-circle-close{
color: #C0C4CC !important;
}
::v-deep .el-form-item__label{
line-height: 32px;
padding: 0;
}
}
</style>
\ No newline at end of file
<template>
<el-dialog
title="新建渠道链接"
:visible="show"
@close='close'
width="500px"
>
<div class="channelContent">
<el-form
:model="formData"
:rules="rules"
ref="formData"
label-width="100px"
>
<el-form-item
label="使用人"
prop="use_user_id"
>
<el-input
v-model="formData.use_user_name"
disabled
></el-input>
</el-form-item>
<el-form-item
label="小组"
prop="group_id"
>
<el-select
v-model="formData.group_id"
size="small"
placeholder="请选择小组"
filterable
style='width:100%;'
@change="groupChange"
>
<el-option
v-for="item in optionsList.groupList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label="马甲包"
prop="game_id"
>
<mainGameSelect
:defaultValue="formData.game_id"
style="width:100%;"
@result="changeGame"
/>
</el-form-item>
<el-form-item
v-if="loginButton"
label="登录类型"
prop="login_type"
>
<el-checkbox-group v-model="formData.login_type">
<el-checkbox label="1">验证码登录</el-checkbox>
<el-checkbox label="2">账号密码</el-checkbox>
<el-checkbox label="3">快捷登录 </el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item
label="分销方"
prop="distributor_id"
>
<el-select
v-model="formData.distributor_id"
size="small"
placeholder="请先选择游戏"
filterable
style='width:100%;'
@change="onDistributorChange"
>
<el-option
v-for="item in optionsList.distributor"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label="渠道名称"
prop="name"
>
<el-input
v-model="formData.name"
></el-input>
</el-form-item>
<el-form-item
label="用途"
prop="use_type"
>
<el-select
v-model="formData.use_type"
filterable
remote
style='width:100%;'
reserve-keyword
clearable
@change="use_type_change"
placeholder="请选择"
>
<el-option
v-for="(item, index) in optionsList.use_type"
:key="'use_type_' + index"
:label="item.label"
:value="item.value"
> </el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<span
slot="footer"
class="dialog-footer"
style="padding-top: 0;padding-bottom:0;"
>
<el-button @click="close()">取 消</el-button>
<el-button
type="primary"
:loading='btnLoading'
@click="submit"
>确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import { searchcondition, getGameInfo ,addChannel} from '@/api/game'
import { mapState, mapMutations } from "vuex";
import { getZqCserGroup,getZqCserWxBelong } from '@/api/works'
import mainGameSelect from './mainGame.vue'
export default {
components: {
mainGameSelect
},
data() {
return {
optionsList: {
gs_user: [],
advertiser: [],
belongList:[],
groupList:[],
use_type:[
{
"value": 3,
"label": "召回",
},
{
"value": 2,
"label": "转游",
},
// {
// "value": 1,
// "label": "转端",
// }
],
},
loginButton: false,
btnLoading:false,
formData: {
use_user_id: '',
use_user_name: '',
type: 2,
group_id: '',
group_name: '',
game_id: '',
game_name:'',
login_type: '',
distributor_id: '',
login_type: '',
use_type:3,
name: ''
},
rules: {
use_user_id: [{ required: true, message: '请选择', trigger: 'blur' }],
group_id: [{ required: true, message: '请选择', trigger: 'blur' }],
game_id: [{ required: true, message: '请选择', trigger: 'blur' }],
use_type: [{ required: true, message: '请输入', trigger: 'blur' }],
name: [{ required: true, message: '请输入', trigger: 'blur' }],
channel_name: [{ required: true, message: '请输入', trigger: 'blur' }],
login_type: [{ required: true, message: '请选择', trigger: 'blur' }],
pos_type: [{ required: true, message: '请选择', trigger: 'blur' }],
distributor_id: [{ required: true, message: '请选择', trigger: 'blur' }]
},
}
},
computed: {
...mapState("user", ["userInfo"]),
},
props: ['show', 'gameUserInfo','type'],
mounted() {
this.formData.use_user_id = this.userInfo.id
this.formData.use_user_name = this.userInfo.username
this.changeGame(this.gameUserInfo.reg_game_id.toString(),this.gameUserInfo.reg_game_name)
this.formData.use_type = Number(this.type)
this.getZqCserGroup()
this.getZqCserWxBelong()
},
beforeDestroy() {
this.close()
},
destroyed(){
this.close()
},
methods: {
async getZqCserGroup() {
const res = await getZqCserGroup({ zq_user_id: Number(this.userInfo.id) })
if (res.status_code == 1 && res.data.data.length > 0) {
this.optionsList.groupList = res.data.data
this.formData.group_id = res.data.data[0].value
this.formData.group_name = res.data.data[0].label
} else {
this.$message.error('获取分组失败,请到掌权添加分组')
}
},
async getZqCserWxBelong() {
const data = {
zq_user_id: Number(this.userInfo.id)
}
const res = await getZqCserWxBelong(data)
if (res.status_code === 1 && res.data.data) {
this.optionsList.belongList = res.data.data.map(item=>{
return {
value:item.value,
label:item.label && item.label.split('-')[0]?item.label.split('-')[0]:''
}
})
this.formData.name = this.returnName()
}
},
async getGameInfo(game_id) {
this.loginButton = false
this.formData.login_type = []
const res = await getGameInfo({ game_id: game_id })
if (res.status_code === 1) {
this.loginButton = res.data.data.login_button
}
},
onDistributorChange() {
this.optionsList.advertiser = []
this.formData.name = this.returnName()
},
returnName(){
const group_name_list = this.formData.group_name.split('-')
let name = ''
if(this.optionsList.belongList[0]){
name+= this.optionsList.belongList[0].label+'-'+ group_name_list[group_name_list.length-1]+'-'+this.formData.use_user_name
}
if(this.formData.game_name){
const use_type_name = this.optionsList.use_type.find(item=>item.value == this.formData.use_type).label
name+='-'+this.formData.game_name+'-'+use_type_name
}
return name
},
async distributorSearchAsync(value) {
const data = {
type:'channel_distributor',
name:'',
game_id:value,
}
const res = await searchcondition(data)
this.$set(this.optionsList,'distributor',res.data.data)
},
async changeGame(value, label) {
this.formData.distributor_id = ''
if (value) {
this.formData.game_id = value
this.formData.game_name = label
this.getGameInfo(value)
this.distributorSearchAsync(value)
this.formData.name = this.returnName()
}
},
groupChange(value){
const item = this.optionsList.groupList.find(item=>item.value == value)
this.formData.group_name = item.label
this.formData.name = this.returnName()
},
use_type_change(){
this.formData.name = this.returnName()
},
close() {
this.$emit('close', false)
},
submit() {
this.$refs.formData.validate((valid) => {
if (valid) {
this.btnLoading = true
this.addChannel()
} else {
console.log('error submit!!');
return false;
}
});
},
//新建渠道
async addChannel(){
setTimeout(() => {
this.btnLoading = false
}, 3000);
const res = await addChannel(this.formData)
this.btnLoading = false
if(res.status_code === 1){
this.$message.success(res.msg)
this.close()
}
},
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<el-cascader
v-model="reg_game_id"
:options="regGameList"
:props="{expandTrigger: 'hover',label:'full_label',emitPath:false }"
collapse-tags
clearable
multiple
filterable
:show-all-levels="true"
:style="{'width':width || ''}"
@change="returnGameId"
>
<template slot-scope="{ data }">
<span>{{ data.label }}</span>
</template>
</el-cascader>
</template>
<script>
import { selectSearch } from '@/api/game'
export default {
props: ['defaultValue', 'width', 'label'],
data() {
return {
loading: false,
reg_game_id: '',
regGameList: []
}
},
watch: {
defaultValue(newVal) {
if (newVal) {
this.reg_game_id = this.defaultValue
} else {
}
}
},
mounted() {
this.reg_game_id = this.defaultValue
this.requestRegGameList()
},
methods: {
requestRegGameList() {
const data = {
type: 'gameListWithType',
value: '',
weixin_blong_id: ''
}
selectSearch(data).then(res => {
this.loading = false
if (res.status_code == 1) {
this.regGameList = res.data.data
}
})
},
returnGameId() {
let label = ''
let list = []
this.regGameList.map(item => {
list = list.concat(item.children)
})
list.map(items => {
if (items.value === this.reg_game_id) {
label = items.label
}
})
this.$emit('result', this.reg_game_id, label)
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
......@@ -24,6 +24,7 @@
<searchSelectUser
v-if="searchType === 'remark'"
class="search-input"
:corp_id="corp_id"
:userid="userid"
width="100%"
placeholder="请输入"
......@@ -175,7 +176,7 @@ export default {
},
computed: {
...mapState('game', ['chatUserInfo']),
...mapState('user', ['userid']),
...mapState('user', ['userid','corp_id']),
},
data() {
return {
......@@ -245,11 +246,11 @@ export default {
// 用户选择结果处理
onUserSelect(external_userid, userid) {
this.searchParams = {
external_userid,
userid
}
this.resetAndReload()
this.searchParams = {
external_userid:external_userid || '',
userid:this.userid
}
this.resetAndReload()
},
// 构建搜索参数
......
......@@ -51,6 +51,7 @@
import skillCompany from './components/skill/skillCompany.vue'
import skillPersonal from './components/skill/skillPersonal.vue'
import skillLibrary from './components/skill/skillLibrary.vue'
import { mapActions } from 'vuex'
export default {
components: {
skillCompany,
......@@ -64,12 +65,21 @@ export default {
}
},
created() {
},
mounted() {
this.initializeWecom()
},
mounted() { },
methods: {
...mapActions('user', ['initWecom']),
async initializeWecom() {
try {
console.log('🚀 开始初始化企业微信 SDK')
const result = await this.initWecom()
console.log('✅ 企业微信 SDK 初始化成功', result)
} catch (error) {
console.error('❌ 企业微信 SDK 初始化失败:', error)
}
},
}
}
</script>
......
<template>
<div class="quickSendGame columnFlex">
<div class="content search-form">
<el-tabs v-model="activeName">
<el-tab-pane
label="自助工具"
name="tools"
>
<vipTools v-if="activeName === 'tools'"/>
</el-tab-pane>
<el-tab-pane
label="发送游戏"
name="sendGame"
>
<sendGame v-if="activeName === 'sendGame'"/>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
import vipTools from './components/quickSendGame/vipTools.vue'
import sendGame from './components/quickSendGame/sendGame.vue'
import { mapActions } from 'vuex'
export default {
components: {
vipTools,
sendGame,
},
data() {
return {
activeName: 'tools'
}
},
created() {
},
mounted() {
this.initializeWecom()
},
methods: {
...mapActions('user', ['initWecom']),
async initializeWecom() {
try {
console.log('🚀 开始初始化企业微信 SDK')
const result = await this.initWecom()
console.log('✅ 企业微信 SDK 初始化成功', result)
} catch (error) {
console.error('❌ 企业微信 SDK 初始化失败:', error)
}
},
}
}
</script>
<style lang="scss" scoped>
.quickSendGame {
::v-deep .el-tabs__nav-next,::v-deep .el-tabs__nav-prev{
line-height: 50px;
}
width: 100%;
height: 100%;
background: #fff;
::v-deep .el-tabs__item {
padding: 0 15px;
}
.detailsTitle {
width: 100%;
padding: 0 vw(20);
height: 60px;
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
border-bottom: 1px solid #ebeef5;
border-left: 1px solid #ebeef5;
p {
color: #333333;
}
}
.content {
width: 100%;
height: calc(100% - 10px);
::v-deep .el-tabs__header {
margin: 0 0 20px;
}
}
::v-deep .el-collapse-item {
margin-bottom: 20px;
}
::v-deep .el-collapse-item__content {
padding-bottom: 10px;
}
::v-deep .el-collapse {
border: none;
}
::v-deep .el-tabs--border-card .is-active {
border: none !important;
}
::v-deep .el-collapse-item__header {
width: 100%;
height: 44px;
background: #f9faff;
color: #333333;
padding-left: 35px;
font-size: 14px;
font-weight: 400;
// cursor: move;
}
::v-deep .is-active {
border: none;
}
.inputContent {
width: 100%;
::v-deep .el-input {
width: 80%;
}
}
::v-deep .el-tabs,
.el-tabs__content,
.el-tab-pane {
width: 100%;
height: 100%;
}
::v-deep .el-tabs__content {
width: 100%;
height: calc(100% - 50px);
}
::v-deep .el-tab-pane {
width: 100%;
height: 100%;
}
.scrollList {
width: 100%;
height: calc(100% - 40px);
overflow: auto;
}
.draggable {
position: relative;
transition: all 0.3s;
.icon {
position: absolute;
left: 10px;
top: 15px;
z-index: 10;
}
}
::v-deep .el-icon-circle-close {
color: #fff;
}
.bate {
width: 42px;
height: 20px;
background: linear-gradient(135deg, #6ee7e9 0%, #9ff2cd 47%, #e3fdb2 100%);
border-radius: 10px;
padding: 0px 10px 3px 10px;
}
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论