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

add pwd of message send

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