dsd
This commit is contained in:
parent
85d68ee4fb
commit
fc119d70e8
@ -1,6 +1,6 @@
|
|||||||
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
|
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
|
||||||
NODE_ENV = 'development'
|
NODE_ENV = 'development'
|
||||||
VITE_APP_BASE_API = 'https://mini-chat.1024tool.vip/'
|
VITE_APP_BASE_API = 'https://mini-chat.1024tool.vip/api'
|
||||||
VITE_SERVE = "https://mini-chat.1024tool.vip/"
|
VITE_SERVE = "https://mini-chat.1024tool.vip/api"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
|
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
|
||||||
NODE_ENV = 'production'
|
NODE_ENV = 'production'
|
||||||
VITE_APP_BASE_API = 'https://mini-chat.1024tool.vip/'
|
VITE_APP_BASE_API = 'https://dsjhd9s.tbmw.cn/api/'
|
||||||
VITE_SERVE = "https://mini-chat.1024tool.vip/"
|
VITE_SERVE = "https://dsjhd9s.tbmw.cn/api/"
|
||||||
|
|
||||||
|
|||||||
@ -13,21 +13,22 @@ export const robotList = (params) => {
|
|||||||
|
|
||||||
export const addRobot = (data) => {
|
export const addRobot = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: `admin/app/create`,
|
url: `admin/create`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const deleteRobot = (id) => {
|
export const deleteRobot = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: `admin/app/${id}`,
|
url: `admin/delete`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export const editRobot = (id, data) => {
|
export const editRobot = (id, data) => {
|
||||||
return request({
|
return request({
|
||||||
url: `admin/app/${id}`,
|
url: `admin/${id}`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|||||||
@ -139,7 +139,7 @@ export const deleteAgent = (data: any) => {
|
|||||||
|
|
||||||
export const getQr = (data: any) => {
|
export const getQr = (data: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: `api/wechat/qrcode`,
|
url: `wechat/qrcode`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,10 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="width: 100%;">
|
<div style="width: 100%;">
|
||||||
<el-input v-model="centent" suffix-icon="Search" @input="inputSearch" placeholder="搜索"></el-input>
|
<!-- <el-input v-model="centent" suffix-icon="Search" @input="inputSearch" placeholder="搜索"></el-input> -->
|
||||||
<ul v-infinite-scroll="load" class="infinite-list" style="overflow: auto" :style="'height:' + height" :infinite-scroll-immediate="false" infinite-scroll-distance="5">
|
<ul v-infinite-scroll="load" class="infinite-list" style="overflow: auto" :style="'height:' + height" :infinite-scroll-immediate="false" infinite-scroll-distance="5">
|
||||||
<li v-for="item in cardlist" :key="item.sender_id" class="infinite-list-item" :class="{ active: item.active }"
|
<li v-for="item in cardlist" :key="item.sender_id" class="infinite-list-item" :class="{ active: item.active }"
|
||||||
@click="handleItem(item)">
|
@click="handleItem(item)">
|
||||||
|
<div class="avatar-container">
|
||||||
<el-image class="user-avatar" :src="item.sender_avatar"></el-image>
|
<el-image class="user-avatar" :src="item.sender_avatar"></el-image>
|
||||||
|
<span v-if="item.unread_count && item.unread_count > 0" class="unread-badge">{{ item.unread_count > 99 ? '99+' : item.unread_count }}</span>
|
||||||
|
</div>
|
||||||
<span class="nickname">{{ item.sender_name }}</span>
|
<span class="nickname">{{ item.sender_name }}</span>
|
||||||
<span class="sex">
|
<span class="sex">
|
||||||
<!-- <el-icon v-if="item.sex == '男'" style="color: rgb(121.3, 187.1, 255);">
|
<!-- <el-icon v-if="item.sex == '男'" style="color: rgb(121.3, 187.1, 255);">
|
||||||
@ -110,6 +113,11 @@ onMounted(() => {
|
|||||||
background-color: var(--el-color-primary-light-9);
|
background-color: var(--el-color-primary-light-9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.avatar-container {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
width: 32px;
|
width: 32px;
|
||||||
@ -118,6 +126,24 @@ onMounted(() => {
|
|||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.unread-badge {
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: -6px;
|
||||||
|
background-color: #ff4d4f;
|
||||||
|
color: white;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 2px 6px;
|
||||||
|
font-size: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
min-width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 7px;
|
||||||
|
text-align: center;
|
||||||
|
border: 2px solid white;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
.nickname {
|
.nickname {
|
||||||
margin: 0 20px;
|
margin: 0 20px;
|
||||||
font-size: 14px ;
|
font-size: 14px ;
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
<div class="table-card-center">
|
<div class="table-card-center">
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<el-table :data="robotCards" style="width: 100%" max-height="calc(100vh - 285px)"
|
<el-table :data="robotCards" style="width: 100%" max-height="calc(100vh - 285px)"
|
||||||
@selection-change="handleSelectionChange" row-key="user_id">
|
@selection-change="handleSelectionChange" row-key="id">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<span v-if="tableLoading">加载中...</span>
|
<span v-if="tableLoading">加载中...</span>
|
||||||
<span v-if="!tableLoading && query.robot_id">暂无数据</span>
|
<span v-if="!tableLoading && query.robot_id">暂无数据</span>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip class="box-item" effect="dark" content="删除" placement="bottom">
|
<el-tooltip class="box-item" effect="dark" content="删除" placement="bottom">
|
||||||
<el-icon class="el-icon-danger" @click="handeleDelete(scoped.row)">
|
<el-icon class="el-icon-danger" @click="handleDelete(scoped.row)">
|
||||||
<Delete />
|
<Delete />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@ -87,11 +87,13 @@
|
|||||||
<el-form-item label="客服昵称" prop="nickname">
|
<el-form-item label="客服昵称" prop="nickname">
|
||||||
<el-input v-model="ruleForm.nickname" placeholder="请输入客服昵称" size="large" />
|
<el-input v-model="ruleForm.nickname" placeholder="请输入客服昵称" size="large" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="客服密码" prop="password">
|
||||||
<el-form-item label="客服手机号" prop="mobile">
|
<el-input v-model="ruleForm.password" placeholder="请输入客服密码" size="large" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客服手机号">
|
||||||
<el-input v-model="ruleForm.mobile" placeholder="请输入客服手机号" size="large" />
|
<el-input v-model="ruleForm.mobile" placeholder="请输入客服手机号" size="large" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="头像" prop="avatar">
|
<el-form-item label="头像">
|
||||||
<Upload v-model="ruleForm.avatar" type="image" accept="image/*" :action="robotHost"
|
<Upload v-model="ruleForm.avatar" type="image" accept="image/*" :action="robotHost"
|
||||||
@change="changeFile" @success="uploadSuccess" @error="uploadError"></Upload>
|
@change="changeFile" @success="uploadSuccess" @error="uploadError"></Upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -192,6 +194,11 @@ const rules = ref({
|
|||||||
required: true,
|
required: true,
|
||||||
message: '请上传客服头像',
|
message: '请上传客服头像',
|
||||||
trigger: 'change',
|
trigger: 'change',
|
||||||
|
}],
|
||||||
|
password: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入客服密码',
|
||||||
|
trigger: 'blur',
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
const query = reactive({
|
const query = reactive({
|
||||||
@ -316,7 +323,9 @@ const handleDelete = (item, index) => {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
await deleteRobot(item.id)
|
await deleteRobot({
|
||||||
|
ids: String(item.id)
|
||||||
|
})
|
||||||
// getGroups()
|
// getGroups()
|
||||||
robotCards.value.splice(index, 1)
|
robotCards.value.splice(index, 1)
|
||||||
|
|
||||||
@ -373,6 +382,7 @@ const saveBind = (val) => {
|
|||||||
bindApps(robot_data.id, {
|
bindApps(robot_data.id, {
|
||||||
ids: appSelects.join(',')
|
ids: appSelects.join(',')
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
dialogLog.value = false
|
||||||
ElNotification({
|
ElNotification({
|
||||||
message: '绑定成功',
|
message: '绑定成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user