提交 d372d726 编写于 作者: 璃白.'s avatar 璃白. 🌻

add pwd of message send

上级 a4473eb4
<template>
<div class="fixHeight">
<TransitionRoot as="template" :show="sidebarOpen">
<Dialog as="div" class="fixed inset-0 z-40 flex md:hidden" @close="sidebarOpen = false">
<Dialog
as="div"
class="fixed inset-0 z-40 flex md:hidden"
@close="sidebarOpen = false"
>
<TransitionChild
as="template"
enter="transition-opacity ease-linear duration-300"
......@@ -45,7 +49,11 @@
</TransitionChild>
<div class="flex-1 h-0 pt-5 pb-4 overflow-y-auto">
<div class="flex-shrink-0 flex items-center px-4">
<img class="h-8 w-auto" src="@/assets/imgs/logo.png" alt="Workflow" />
<img
class="h-8 w-auto"
src="@/assets/imgs/logo.png"
alt="Workflow"
/>
</div>
<nav class="mt-10 px-2 space-y-1">
<nuxt-link
......@@ -88,7 +96,9 @@
>
<!-- Sidebar component, swap this element with another sidebar if you like -->
<div class="flex-1 flex flex-col min-h-0 bg-white">
<div class="flex-1 flex justify-start flex-col pt-5 pb-4 overflow-y-auto">
<div
class="flex-1 flex justify-start flex-col pt-5 pb-4 overflow-y-auto"
>
<nav class="mt-16 flex-1 px-2">
<div class="text-sm text-gray-500 my-4 ml-2">数据报表</div>
<nuxt-link
......@@ -166,7 +176,8 @@
: 'cursor-pointer text-gray-800',
'group flex items-center px-14 py-2 text-sm font-medium rounded-sm'
]"
>{{ subItem.name }}</nuxt-link>
>{{ subItem.name }}</nuxt-link
>
</DisclosurePanel>
</Disclosure>
<nuxt-link
......@@ -236,7 +247,11 @@ import {
MenuIcon,
UsersIcon,
ChatIcon,
SpeakerphoneIcon,
CurrencyYenIcon,
VideoCameraIcon,
TicketIcon,
ChatAltIcon,
XIcon
} from "@heroicons/vue/outline/index";
import { SourceType } from "~~/types";
......@@ -291,15 +306,15 @@ const adminMenu = computed(() => {
{
name: "公开课管理",
href: "/admin/manage/",
icon: ChatIcon,
icon: VideoCameraIcon,
children: [
{
name: "视频公开课管理",
name: "视频管理",
href: "/admin/manage/course",
current: path.value.includes("manage/course")
},
{
name: "文档公开课管理",
name: "文档管理",
href: "/admin/manage/textcourse",
current: path.value.includes("manage/textcourse")
},
......@@ -313,7 +328,7 @@ const adminMenu = computed(() => {
{
name: "广告活动管理",
href: "/admin/manage/",
icon: ChatIcon,
icon: SpeakerphoneIcon,
children: [
{
name: "蒙版弹框管理",
......@@ -325,7 +340,7 @@ const adminMenu = computed(() => {
{
name: "活动管理",
href: "/admin/manage/activity",
icon: ChatIcon,
icon: TicketIcon,
current: path.value.includes("manage/activity")
},
{
......@@ -337,14 +352,8 @@ const adminMenu = computed(() => {
{
name: "短信群发",
href: "/admin/manage/message",
icon: ChatIcon,
icon: ChatAltIcon,
current: path.value.includes("manage/message")
},
{
name: "模块测试",
href: "/admin/manage/test",
icon: ChatIcon,
current: path.value.includes("manage/test")
}
];
});
......
<template>
<h3 class="text-lg leading-6 font-medium text-gray-900">短信群发服务</h3>
<div class="mt-8 flex items-start space-x-4">
<div class="flex-shrink-0">
<img
class="inline-block h-10 w-10 rounded-full"
src="@/assets/imgs/logo.png"
alt=""
/>
</div>
<div class="min-w-0 flex-1">
<form class="relative">
<div class="min-w-0 flex-1 px-12">
<form class="relative mt-12 max-w-[800px]">
<div class="flex items-center">
<span class="w-28">测试手机号:</span>
<span class="w-28 text-md text-gray-600">发送对象:</span>
<el-radio-group @change="changeType" size="large" v-model="type">
<el-radio :label="1">指定手机号</el-radio>
<el-radio :label="0">所有用户</el-radio>
</el-radio-group>
</div>
<div v-if="type === 1" class="flex mt-4 items-center">
<span class="w-28 text-md text-gray-600">手机号:</span>
<el-input
size="large"
maxlength="11"
v-model="telNumber"
placeholder="测试手机号有值时,只对该手机发送短信"
placeholder="请输入手机号"
></el-input>
</div>
<div v-else class="flex mt-4 items-center">
<span class="w-28 text-md text-gray-600">群发密码:</span>
<el-input
size="large"
v-model="password"
placeholder="请输入群发密码"
></el-input>
</div>
<div
class="mt-4 border border-gray-300 rounded-lg shadow-sm overflow-hidden focus-within:border-indigo-500 focus-within:ring-1 focus-within:ring-indigo-500"
>
<label for="comment" class="sr-only">Add your comment</label>
<textarea
<div class="flex mt-6 items-start">
<span class="w-28 text-md text-gray-600">短信内容:</span>
<el-input
type="textarea"
rows="6"
name="comment"
id="comment"
size="large"
v-model="message"
class="p-4 block w-full py-3 outline-0 border-none resize-none ring-none sm:text-sm"
placeholder="输入短信内容"
/>
<!-- Spacer element to match the height of the toolbar -->
<div class="py-2" aria-hidden="true">
<!-- Matches height of button in toolbar (1px border + 36px content height) -->
<div class="py-px">
<div class="h-9" />
</div>
</div>
placeholder="请输入短信内容"
></el-input>
</div>
<div
class="absolute bottom-0 inset-x-0 pl-3 pr-2 py-2 flex justify-between"
>
<div class="flex items-center space-x-5"></div>
<div class="flex-shrink-0">
<span
@click="openSend"
class="cursor-pointer inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
>
{{ telNumber ? "发送测试消息" : "群 发" }}
</span>
</div>
<div class="flex mt-6 items-center">
<span class="w-28 text-md text-gray-600"></span>
<span
@click="openSend"
class="cursor-pointer inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
>
发 送
</span>
</div>
</form>
</div>
</div>
<confirm
tip="短信将通知到所有用户,确认发送?"
:tip="`短信将通知到${telNumber || '所有用户'},确认发送?`"
:open="showSend"
@confirm="confirmSend"
@cancel="cancelSend"
......@@ -67,15 +61,42 @@
<script lang="ts" setup>
import confirm from "~~/components/confirm.vue";
import api from "@/api";
import { ElNotification, ElInput } from "element-plus";
import { HelloWorld } from "./index.cmd.js";
import {
ElNotification,
ElInput,
ElSelect,
ElRadio,
ElRadioGroup,
ElOption
} from "element-plus";
const type = ref(1);
const telNumber = ref("");
const password = ref("");
const message = ref("");
const showSend = ref(false);
const changeType = (val: any) => {
console.log(val);
switch (val) {
case 0:
telNumber.value = "";
break;
case 1:
password.value = "";
break;
default:
break;
}
};
const openSend = () => {
if (!message.value.trim()) return;
if (!message.value.trim()) return ElNotification.warning("请输入短信内容");
if (type.value === 1) {
if (!telNumber.value) return ElNotification.warning("请输入手机号");
} else {
if (!password.value) return ElNotification.warning("请输入群发确认密码");
}
showSend.value = true;
};
......
......@@ -21,18 +21,18 @@
<el-form-item label="查看详情链接">
<el-input v-model="form.destUrl" />
</el-form-item>
<el-form-item label="发送人数">
<el-form-item v-if="!form.openid" label="发送人数">
<el-input v-model="form.num" />
</el-form-item>
<el-form-item label="测试openid">
<el-form-item v-if="!form.openid" label="包含已发送用户">
<el-checkbox v-model="form.needRestart" />
</el-form-item>
<el-form-item label="指定用户( 选填 )">
<el-input
v-model="form.openid"
placeholder="openid有值时,只对该用户发送消息"
placeholder="请输入指定用户的 openid"
/>
</el-form-item>
<el-form-item label="包含已发送用户">
<el-checkbox v-model="form.needRestart" />
</el-form-item>
<el-form-item label="">
<span
@click="openSend"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册