mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-10 18:02:49 +00:00
Compare commits
4 Commits
43645fa23c
...
e6c822aa8e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6c822aa8e | ||
|
|
8afcecff6e | ||
|
|
c5d183570a | ||
|
|
58ad1f489b |
@ -99,6 +99,15 @@ export function getShowApp() {
|
||||
return request.get('addon/list/showapp')
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取营销列表
|
||||
* @returns
|
||||
*/
|
||||
export function getShowMarketing() {
|
||||
return request.get('showMarketing')
|
||||
}
|
||||
|
||||
|
||||
export function getAddonInit() {
|
||||
return request.get('addon/init')
|
||||
}
|
||||
|
||||
@ -125,6 +125,14 @@ export function editMemberDetail(params: Record<string, any>) {
|
||||
return request.put(`member/member/modify/${params.member_id}/${params.field}`, params, { showSuccessMessage: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员批量操作
|
||||
* @param params
|
||||
*/
|
||||
export function memberBatchModify(params: Record<string, any>) {
|
||||
return request.post(`member/member/batch_modify`, params, { showSuccessMessage: true })
|
||||
}
|
||||
|
||||
/***************************************************** 会员零钱 ****************************************************/
|
||||
|
||||
|
||||
|
||||
@ -61,6 +61,14 @@ export function deleteRole(roleId: number) {
|
||||
return request.delete(`sys/role/${ roleId }`, { showSuccessMessage: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改角色状态
|
||||
* @param params
|
||||
*/
|
||||
export function modifyRoleStatus(params: Record<string, any>) {
|
||||
return request.put(`sys/role/status`, params, { showSuccessMessage: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* 全部分组
|
||||
* @returns
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
{
|
||||
"ip":"登录IP",
|
||||
"username":"管理员姓名",
|
||||
"operationLog": "操作日志",
|
||||
"url":"链接",
|
||||
"detail": "详情",
|
||||
"params":"参数",
|
||||
@ -14,6 +15,5 @@
|
||||
"typePlaceholder":"请输入请求方式",
|
||||
"createTimePlaceholder":"请输入操作时间",
|
||||
"addSysUserLog":"添加管理员操作记录表",
|
||||
"updateSysUserLog":"编辑管理员操作记录表",
|
||||
"sys_user_logDeleteTips":"确定要删除该管理员操作记录表吗?"
|
||||
"updateSysUserLog":"编辑管理员操作记录表"
|
||||
}
|
||||
@ -14,6 +14,14 @@
|
||||
"statusBarStyle": "导航栏样式",
|
||||
"statusBarSwitchTips": "此处控制当前页面导航栏是否显示",
|
||||
"bottomNavContent": "底部导航内容",
|
||||
"popWindowAds": "弹窗广告",
|
||||
"popAdsLink": "广告链接",
|
||||
"popAdsImage": "广告图",
|
||||
"popAdsType": "显示类型",
|
||||
"popAdsIsEnabled": "是否显示",
|
||||
"firstPop": "首次弹出",
|
||||
"popWindowCountTips": "建议上传图片大小:290px * 410px",
|
||||
"everyTimePops": "每次弹出",
|
||||
"diyPageTitle": "页面名称",
|
||||
"diyPageTitlePlaceholder": "请输入页面名称",
|
||||
"pageTitleTips": "页面名称用于后台显示",
|
||||
|
||||
@ -362,7 +362,7 @@
|
||||
"imageLimitErrorTips":"限制数量格式输入错误",
|
||||
"imageLimitErrorTipsTwo":"限制数量不能小于0",
|
||||
"imageLimitErrorTipsThree":"限制数量必须大于0",
|
||||
"imafeLimitErrorTipsFour":"限制数量最大不能超过9",
|
||||
"imageLimitErrorTipsFour":"限制数量最大不能超过9",
|
||||
|
||||
"defaultValueTips":"设置后,默认值会自动填充到输入框,填表人可在此基础上进行修改。",
|
||||
"defaultErrorTips":"默认值格式输入错误",
|
||||
|
||||
@ -1,82 +1,86 @@
|
||||
{
|
||||
"registerChannel":"注册来源",
|
||||
"nickname":"会员昵称",
|
||||
"memberNo":"会员编号",
|
||||
"mobile":"手机号",
|
||||
"createTime":"注册时间",
|
||||
"lastVisitTime":"最后访问时间",
|
||||
"addMember":"添加会员",
|
||||
"nickNamePlaceholder":"请输入会员昵称",
|
||||
"mobilePlaceholder":"请输入手机号",
|
||||
"channelPlaceholder":"请选择注册类型",
|
||||
"memberNoPlaceholder":"请选择会员编号",
|
||||
"memberDeleteTips" : "确定要删除该会员吗?",
|
||||
"edit": "编辑",
|
||||
"memberDelete":"删除",
|
||||
"adjust":"调整",
|
||||
"startDate": "开始时间",
|
||||
"endDate": "结束时间",
|
||||
"essentialInfo": "基本信息",
|
||||
"accountInfo": "账户信息",
|
||||
"registeredSource": "注册来源",
|
||||
"memberLabel": "会员标签",
|
||||
"urserName": "用户名",
|
||||
"point": "积分",
|
||||
"balance": "余额",
|
||||
"growth": "成长值",
|
||||
"memo":"备注",
|
||||
"adjustPoint":"调整积分",
|
||||
"detaBirth": "出生日期",
|
||||
"sex": "性别",
|
||||
"wxUnionid": "微信unionid",
|
||||
"weappOpenid": "微信小程序openid",
|
||||
"wxOpenid": "微信用户openid",
|
||||
"head": "会员头像",
|
||||
"username": "用户名",
|
||||
"usernamePlaceholder": "请输入用户名",
|
||||
"password": "密码",
|
||||
"passwordCopy": "确认密码",
|
||||
"passwordPlaceholder": "请输入密码",
|
||||
"doubleCipherHint": "输入的两次密码不一致",
|
||||
"memberNoHint":"会员编号只能输入字母和数字",
|
||||
"mobileHint": "请输入正确的手机号!",
|
||||
"memberLabelTag": "标签",
|
||||
"setLabel": "标签",
|
||||
"memberLabelPlaceholder": "请选择会员标签",
|
||||
"memberInfo":"会员信息",
|
||||
"memberInfoPlaceholder":"请输入会员编号/昵称/手机号",
|
||||
"lock": "锁定",
|
||||
"normal": "正常",
|
||||
"memberLevel": "会员等级",
|
||||
"memberLevelPlaceholder": "请选择会员等级",
|
||||
"adjustType":"调整类型",
|
||||
"adjustReduceBalance":"减少余额",
|
||||
"adjustAddBalance":"增加余额",
|
||||
"adjustReducePoint":"减少积分",
|
||||
"adjustAddPoint":"增加积分",
|
||||
"adjustBalance":"调整余额",
|
||||
"currBalance":"当前余额",
|
||||
"currPoint":"当前积分",
|
||||
"adjustPlaceholder":"请输入调整数量",
|
||||
"memoPlaceholder":"请输入备注",
|
||||
"adjustBalancePlaceholder":"请输入调整余额",
|
||||
"adjustPointPlaceholder":"请输入调整积分",
|
||||
"adjustBalanceMaxAccountMessage":"调整后余额需大于0",
|
||||
"adjustPointMaxAccountMessage":"调整后积分需大于0",
|
||||
"birthday": "出生日期",
|
||||
"birthdayTip": "请输入出生日期",
|
||||
"headimg": "会员头像",
|
||||
"updateMember": "编辑会员信息",
|
||||
"notAvailable":"暂无",
|
||||
"girlSex":"女",
|
||||
"manSex":"男",
|
||||
"secrecySex":"保密",
|
||||
"detail":"详情",
|
||||
"accumulative":"累计",
|
||||
"money":"可提现余额",
|
||||
"commission":"佣金",
|
||||
"memberNull":"未读取到会员详情信息",
|
||||
"memberLevelUpdate": "修改等级至",
|
||||
"memberLevelUpdateTips": "该操作只会修改会员等级不会发放等级礼包"
|
||||
|
||||
"registerChannel": "注册来源",
|
||||
"nickname": "会员昵称",
|
||||
"memberNo": "会员编号",
|
||||
"mobile": "手机号",
|
||||
"createTime": "注册时间",
|
||||
"lastVisitTime": "最后访问时间",
|
||||
"addMember": "添加会员",
|
||||
"nickNamePlaceholder": "请输入会员昵称",
|
||||
"mobilePlaceholder": "请输入手机号",
|
||||
"channelPlaceholder": "请选择注册类型",
|
||||
"memberNoPlaceholder": "请选择会员编号",
|
||||
"memberDeleteTips": "确定要删除该会员吗?",
|
||||
"edit": "编辑",
|
||||
"memberDelete": "删除",
|
||||
"adjust": "调整",
|
||||
"startDate": "开始时间",
|
||||
"endDate": "结束时间",
|
||||
"essentialInfo": "基本信息",
|
||||
"accountInfo": "账户信息",
|
||||
"registeredSource": "注册来源",
|
||||
"memberLabel": "会员标签",
|
||||
"urserName": "用户名",
|
||||
"point": "积分",
|
||||
"balance": "余额",
|
||||
"growth": "成长值",
|
||||
"memo": "备注",
|
||||
"adjustPoint": "调整积分",
|
||||
"detaBirth": "出生日期",
|
||||
"sex": "性别",
|
||||
"wxUnionid": "微信unionid",
|
||||
"weappOpenid": "微信小程序openid",
|
||||
"wxOpenid": "微信用户openid",
|
||||
"head": "会员头像",
|
||||
"username": "用户名",
|
||||
"usernamePlaceholder": "请输入用户名",
|
||||
"password": "密码",
|
||||
"passwordCopy": "确认密码",
|
||||
"passwordPlaceholder": "请输入密码",
|
||||
"doubleCipherHint": "输入的两次密码不一致",
|
||||
"memberNoHint": "会员编号只能输入字母和数字",
|
||||
"mobileHint": "请输入正确的手机号!",
|
||||
"memberLabelTag": "标签",
|
||||
"setLabel": "标签",
|
||||
"memberLabelPlaceholder": "请选择会员标签",
|
||||
"memberInfo": "会员信息",
|
||||
"memberInfoPlaceholder": "请输入会员编号/昵称/手机号",
|
||||
"lock": "锁定",
|
||||
"normal": "正常",
|
||||
"memberLevel": "会员等级",
|
||||
"memberLevelPlaceholder": "请选择会员等级",
|
||||
"adjustType": "调整类型",
|
||||
"adjustReduceBalance": "减少余额",
|
||||
"adjustAddBalance": "增加余额",
|
||||
"adjustReducePoint": "减少积分",
|
||||
"adjustAddPoint": "增加积分",
|
||||
"adjustBalance": "调整余额",
|
||||
"currBalance": "当前余额",
|
||||
"currPoint": "当前积分",
|
||||
"adjustPlaceholder": "请输入调整数量",
|
||||
"memoPlaceholder": "请输入备注",
|
||||
"adjustBalancePlaceholder": "请输入调整余额",
|
||||
"adjustPointPlaceholder": "请输入调整积分",
|
||||
"adjustBalanceMaxAccountMessage": "调整后余额需大于0",
|
||||
"adjustPointMaxAccountMessage": "调整后积分需大于0",
|
||||
"birthday": "出生日期",
|
||||
"birthdayTip": "请输入出生日期",
|
||||
"headimg": "会员头像",
|
||||
"updateMember": "编辑会员信息",
|
||||
"notAvailable": "暂无",
|
||||
"girlSex": "女",
|
||||
"manSex": "男",
|
||||
"secrecySex": "保密",
|
||||
"detail": "详情",
|
||||
"accumulative": "累计",
|
||||
"money": "可提现余额",
|
||||
"commission": "佣金",
|
||||
"memberNull": "未读取到会员详情信息",
|
||||
"memberLevelUpdate": "修改等级至",
|
||||
"memberLevelUpdateTips": "该操作只会修改会员等级不会发放等级礼包",
|
||||
"idCard": "身份证",
|
||||
"idCardPlaceholder": "请输入身份证号",
|
||||
"remark": "备注",
|
||||
"remarkPlaceholder": "请输入备注",
|
||||
"batchEmptySelectedTips": "请选择要操作的数据"
|
||||
}
|
||||
|
||||
@ -1,55 +1,59 @@
|
||||
{
|
||||
"adjustType":"调整类型",
|
||||
"adjustReduceBalance":"减少余额",
|
||||
"adjustAddBalance":"增加余额",
|
||||
"adjustReducePoint":"减少积分",
|
||||
"adjustAddPoint":"增加积分",
|
||||
"adjustBalance":"调整余额",
|
||||
"memberNo":"会员编号",
|
||||
"currBalance":"当前余额",
|
||||
"currPoint":"当前积分",
|
||||
"memo":"备注",
|
||||
"adjustPlaceholder":"请输入调整数量",
|
||||
"memoPlaceholder":"请输入备注",
|
||||
"adjustBalancePlaceholder":"请输入调整余额",
|
||||
"adjustPointPlaceholder":"请输入调整积分",
|
||||
"adjustBalanceMaxAccountMessage":"调整后余额需大于0",
|
||||
"adjustPointMaxAccountMessage":"调整后积分需大于0",
|
||||
"birthday": "出生日期",
|
||||
"birthdayTip": "请输入出生日期",
|
||||
"sex": "性别",
|
||||
"sexPlaceholder": "请选择性别",
|
||||
"headimg": "会员头像",
|
||||
"wxUnionid": "微信unionid",
|
||||
"weappOpenid": "微信小程序openid",
|
||||
"wxOpenid": "微信公众号openid",
|
||||
"memberLabel": "会员标签",
|
||||
"memberLabelPlaceholder": "请选择会员标签",
|
||||
"nickNamePlaceholder": "请输入会员名称",
|
||||
"updateMember": "编辑会员信息",
|
||||
"notAvailable":"暂无",
|
||||
"girlSex":"女",
|
||||
"manSex":"男",
|
||||
"secrecySex":"保密",
|
||||
"essentialInfo": "基本信息",
|
||||
"accountInfo": "账户信息",
|
||||
"urserName": "用户名",
|
||||
"nickname":"会员昵称",
|
||||
"registeredSource": "注册来源",
|
||||
"lastVisitTime":"最后登录时间",
|
||||
"point": "积分",
|
||||
"balance": "余额",
|
||||
"growth": "成长值",
|
||||
"adjust":"调整",
|
||||
"mobile":"手机号",
|
||||
"detail":"详情",
|
||||
"accumulative":"累计",
|
||||
"money":"可提现余额",
|
||||
"adjustPoint":"调整积分",
|
||||
"commission":"佣金",
|
||||
"memberNull":"未读取到会员详情信息",
|
||||
"memberLevel": "会员等级",
|
||||
"memberLevelUpdate": "修改等级至",
|
||||
"memberLevelUpdateTips": "该操作只会修改会员等级不会发放等级礼包",
|
||||
"memberLevelPlaceholder": "请选择会员等级"
|
||||
"adjustType": "调整类型",
|
||||
"adjustReduceBalance": "减少余额",
|
||||
"adjustAddBalance": "增加余额",
|
||||
"adjustReducePoint": "减少积分",
|
||||
"adjustAddPoint": "增加积分",
|
||||
"adjustBalance": "调整余额",
|
||||
"memberNo": "会员编号",
|
||||
"currBalance": "当前余额",
|
||||
"currPoint": "当前积分",
|
||||
"memo": "备注",
|
||||
"adjustPlaceholder": "请输入调整数量",
|
||||
"memoPlaceholder": "请输入备注",
|
||||
"adjustBalancePlaceholder": "请输入调整余额",
|
||||
"adjustPointPlaceholder": "请输入调整积分",
|
||||
"adjustBalanceMaxAccountMessage": "调整后余额需大于0",
|
||||
"adjustPointMaxAccountMessage": "调整后积分需大于0",
|
||||
"birthday": "出生日期",
|
||||
"birthdayTip": "请输入出生日期",
|
||||
"sex": "性别",
|
||||
"sexPlaceholder": "请选择性别",
|
||||
"headimg": "会员头像",
|
||||
"wxUnionid": "微信unionid",
|
||||
"weappOpenid": "微信小程序openid",
|
||||
"wxOpenid": "微信公众号openid",
|
||||
"memberLabel": "会员标签",
|
||||
"memberLabelPlaceholder": "请选择会员标签",
|
||||
"nickNamePlaceholder": "请输入会员名称",
|
||||
"updateMember": "编辑会员信息",
|
||||
"notAvailable": "暂无",
|
||||
"girlSex": "女",
|
||||
"manSex": "男",
|
||||
"secrecySex": "保密",
|
||||
"essentialInfo": "基本信息",
|
||||
"accountInfo": "账户信息",
|
||||
"urserName": "用户名",
|
||||
"nickname": "会员昵称",
|
||||
"registeredSource": "注册来源",
|
||||
"lastVisitTime": "最后登录时间",
|
||||
"point": "积分",
|
||||
"balance": "余额",
|
||||
"growth": "成长值",
|
||||
"adjust": "调整",
|
||||
"mobile": "手机号",
|
||||
"detail": "详情",
|
||||
"accumulative": "累计",
|
||||
"money": "可提现余额",
|
||||
"adjustPoint": "调整积分",
|
||||
"commission": "佣金",
|
||||
"memberNull": "未读取到会员详情信息",
|
||||
"memberLevel": "会员等级",
|
||||
"memberLevelUpdate": "修改等级至",
|
||||
"memberLevelUpdateTips": "该操作只会修改会员等级不会发放等级礼包",
|
||||
"memberLevelPlaceholder": "请选择会员等级",
|
||||
"idCard": "身份证",
|
||||
"idCardPlaceholder": "请输入身份证号",
|
||||
"remark": "备注",
|
||||
"remarkPlaceholder": "请输入备注"
|
||||
}
|
||||
|
||||
@ -7,5 +7,9 @@
|
||||
"prefixTips": "编码格式如:",
|
||||
"length": "编码长度",
|
||||
"lengthPlaceholder": "请输入编码长度",
|
||||
"lengthTips": "编码长度包含前缀,去除前缀最少不能低于4位,最多不能超过30位"
|
||||
"lengthTips": "编码长度包含前缀,去除前缀最少不能低于4位,最多不能超过30位",
|
||||
"diyForm": "万能表单",
|
||||
"diyFormPlaceholder": "请选择万能表单",
|
||||
"addDiyForm": "添加表单",
|
||||
"personalForm": "个人资料"
|
||||
}
|
||||
@ -6,35 +6,33 @@
|
||||
<template v-if="Object.keys(appList).length">
|
||||
|
||||
<template v-for="(item, index) in appList" :key="index + 'b'">
|
||||
<template v-if="item.list.length">
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-page-title">{{ item.title }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between items-center" v-if="item.list.length">
|
||||
<span class="text-page-title">{{ item.title }}</span>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap plug-list pb-10 plug-large">
|
||||
<div class="cursor-pointer mt-[20px] mr-4 bg-[#f7f7f7]" v-for="(childItem,childIndex) in item.list" :key="childIndex" @click="toLink(childItem)">
|
||||
<div class="w-[264px] flex py-[20px] px-[17px] app-item relative">
|
||||
<el-image class="w-[40px] h-[40px] mr-[10px]" :src="img(childItem.icon)" fit="contain">
|
||||
<template #error>
|
||||
<div class="image-slot">
|
||||
<img class="w-[40px] h-[40px]" src="@/app/assets/images/index/app_default.png" />
|
||||
</div>
|
||||
</template>
|
||||
</el-image>
|
||||
<div class="flex flex-col justify-between w-[180px]">
|
||||
<div class="text-[14px] flex items-center">
|
||||
<span class="app-text max-w-[170px]">{{ childItem.title }}</span>
|
||||
<span class="iconfont iconxiaochengxu2 text-[#00b240] ml-[4px] !text-[14px]"></span>
|
||||
<div class="flex flex-wrap plug-list pb-10 plug-large" v-if="item.list.length">
|
||||
<div class="cursor-pointer mt-[20px] mr-4 bg-[#f7f7f7]" v-for="(childItem,childIndex) in item.list" :key="childIndex" @click="toLink(childItem)">
|
||||
<div class="w-[264px] flex py-[20px] px-[17px] app-item relative">
|
||||
<el-image class="w-[40px] h-[40px] mr-[10px]" :src="img(childItem.icon)" fit="contain">
|
||||
<template #error>
|
||||
<div class="image-slot">
|
||||
<img class="w-[40px] h-[40px]" src="@/app/assets/images/index/app_default.png" />
|
||||
</div>
|
||||
<!-- <el-icon color="#666">
|
||||
<QuestionFilled />
|
||||
</el-icon> -->
|
||||
<p class="app-text text-[12px] text-[#999]">{{childItem.desc}}</p>
|
||||
</template>
|
||||
</el-image>
|
||||
<div class="flex flex-col justify-between w-[180px]">
|
||||
<div class="text-[14px] flex items-center">
|
||||
<span class="app-text max-w-[170px]">{{ childItem.title }}</span>
|
||||
<!-- <span class="iconfont iconxiaochengxu2 text-[#00b240] ml-[4px] !text-[14px]"></span>-->
|
||||
</div>
|
||||
<!-- <el-icon color="#666">
|
||||
<QuestionFilled />
|
||||
</el-icon> -->
|
||||
<p class="app-text text-[12px] text-[#999]">{{childItem.desc}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
|
||||
88
admin/src/app/views/app/marketing.vue
Normal file
88
admin/src/app/views/app/marketing.vue
Normal file
@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<!--营销管理-->
|
||||
<div class="main-container" v-loading="loading">
|
||||
<el-card class="box-card !border-none" shadow="never">
|
||||
|
||||
<template v-if="Object.keys(marketingList).length">
|
||||
|
||||
<template v-for="(item, index) in marketingList" :key="index + 'b'">
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-page-title">{{ item.title }}</span>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap plug-list pb-10 plug-large">
|
||||
<div class="cursor-pointer mt-[20px] mr-4 bg-[#f7f7f7]" v-for="(childItem,childIndex) in item.list" :key="childIndex" @click="toLink(childItem)">
|
||||
<div class="w-[264px] flex py-[20px] px-[17px] app-item relative">
|
||||
<el-image class="w-[40px] h-[40px] mr-[10px]" :src="img(childItem.icon)" fit="contain">
|
||||
<template #error>
|
||||
<div class="image-slot">
|
||||
<img class="w-[40px] h-[40px]" src="@/app/assets/images/index/app_default.png" />
|
||||
</div>
|
||||
</template>
|
||||
</el-image>
|
||||
<div class="flex flex-col justify-between w-[180px]">
|
||||
<div class="text-[14px] flex items-center">
|
||||
<span class="app-text max-w-[170px]">{{ childItem.title }}</span>
|
||||
<!-- <span class="iconfont iconxiaochengxu2 text-[#00b240] ml-[4px] !text-[14px]"></span>-->
|
||||
</div>
|
||||
<!-- <el-icon color="#666">
|
||||
<QuestionFilled />
|
||||
</el-icon> -->
|
||||
<p class="app-text text-[12px] text-[#999]">{{childItem.desc}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<div class="empty flex items-center justify-center" v-if="!loading && !Object.keys(marketingList).length">
|
||||
<el-empty :description="t('emptyAppData')" />
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { getShowMarketing } from '@/app/api/addon'
|
||||
import { img } from '@/utils/common'
|
||||
import useUserStore from '@/stores/modules/user'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { t } from '@/lang'
|
||||
|
||||
const addonIndexRoute = useUserStore().addonIndexRoute
|
||||
const router = useRouter()
|
||||
const marketingList = ref<Record<string, any>[]>([])
|
||||
|
||||
const loading = ref(true)
|
||||
const getMarketingList = async () => {
|
||||
const res = await getShowMarketing()
|
||||
marketingList.value = res.data
|
||||
loading.value = false
|
||||
}
|
||||
getMarketingList()
|
||||
|
||||
const toLink = (item: any) => {
|
||||
if (item.url) {
|
||||
router.push(item.url)
|
||||
} else {
|
||||
addonIndexRoute[item.key] && router.push({ name: addonIndexRoute[item.key] })
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-text {
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
white-space: nowrap;
|
||||
/* 禁止文本换行 */
|
||||
text-overflow: ellipsis;
|
||||
/* 显示省略号 */
|
||||
}
|
||||
.app-item:hover{
|
||||
transition: 0.5s;
|
||||
box-shadow: 0px 2px 8px 0px rgba(0,0,0,0.1);
|
||||
}
|
||||
</style>
|
||||
@ -4,6 +4,7 @@
|
||||
<el-descriptions :column="1">
|
||||
<el-descriptions-item :label="t('username')" label-align="right">{{logData.username}}</el-descriptions-item>
|
||||
<el-descriptions-item :label="t('ip')" label-align="right">{{logData.ip}}</el-descriptions-item>
|
||||
<el-descriptions-item :label="t('operation')" label-align="right">{{logData.operation}}</el-descriptions-item>
|
||||
<el-descriptions-item :label="t('url')" label-align="right"><span class="break-all">{{logData.url}}</span></el-descriptions-item>
|
||||
<el-descriptions-item :label="t('type')" label-align="right">{{logData.type}}</el-descriptions-item>
|
||||
<el-descriptions-item :label="t('params')" label-align="right">
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
</template>
|
||||
<el-table-column prop="username" :label="t('username')" min-width="120" />
|
||||
<el-table-column prop="ip" :label="t('ip')" min-width="100" align="left"/>
|
||||
<el-table-column prop="operation" :label="t('operationLog')" min-width="200" align="left"/>
|
||||
<el-table-column prop="url" :label="t('url')" min-width="180" />
|
||||
<el-table-column prop="type" :label="t('type')" min-width="100" align="center"/>
|
||||
<el-table-column :label="t('createTime')" min-width="180" align="center">
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
<div class="main-container">
|
||||
<el-card class="box-card !border-none" shadow="never">
|
||||
|
||||
<div class="flex justify-between items-center">
|
||||
<!-- <div class="flex justify-between items-center">
|
||||
<span class="text-page-title">{{ pageName }}</span>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="flex justify-between items-center mt-[20px]">
|
||||
<el-form :inline="true" :model="roleTableData.searchParam" ref="searchFormRef">
|
||||
@ -28,8 +28,8 @@
|
||||
<el-table-column prop="role_name" :label="t('roleName')" />
|
||||
<el-table-column :label="t('status')">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="success" v-if="row.status == 1">{{ row.status_name }}</el-tag>
|
||||
<el-tag type="error" v-if="row.status == 0">{{ row.status_name }}</el-tag>
|
||||
<el-tag type="success" v-if="row.status == 1" @click="modifyRoleStatusEvent(row.role_id, 0)" class="cursor-pointer">{{ row.status_name }}</el-tag>
|
||||
<el-tag type="error" v-else @click="modifyRoleStatusEvent(row.role_id, 1)" class="cursor-pointer">{{ row.status_name }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" :label="t('createTime')"></el-table-column>
|
||||
@ -54,7 +54,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { t } from '@/lang'
|
||||
import { getRoleList, deleteRole } from '@/app/api/sys'
|
||||
import { getRoleList, deleteRole, modifyRoleStatus } from '@/app/api/sys'
|
||||
import { ElMessageBox, FormInstance } from 'element-plus'
|
||||
import EditRole from '@/app/views/auth/components/edit-role.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
@ -136,6 +136,25 @@ const deleteEvent = (id: number) => {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const isRepeat = ref(false)
|
||||
|
||||
// 修改状态
|
||||
const modifyRoleStatusEvent = (role_id: any, status: any) => {
|
||||
if (isRepeat.value) return
|
||||
isRepeat.value = true
|
||||
|
||||
modifyRoleStatus({
|
||||
role_id,
|
||||
status
|
||||
}).then((res) => {
|
||||
loadRoleList()
|
||||
isRepeat.value = false
|
||||
}).catch(() => {
|
||||
isRepeat.value = false
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
@ -3,31 +3,6 @@
|
||||
<div class="content-wrap float-btn" v-show="diyStore.editTab == 'content'">
|
||||
|
||||
<div class="edit-attr-item-wrap">
|
||||
<!-- <h3 class="mb-[10px]">{{ t('selectStyle') }}</h3>
|
||||
<el-form label-width="80px" class="px-[10px]">
|
||||
<el-form-item :label="t('selectStyle')" class="flex">
|
||||
<span class="text-primary flex-1 cursor-pointer" @click="showCouponStyle">{{ diyStore.editComponent.styleName }}</span>
|
||||
<el-icon>
|
||||
<ArrowRight />
|
||||
</el-icon>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-dialog v-model="showCouponDialog" :title="t('selectStyle')" width="500px">
|
||||
<div class="flex flex-wrap">
|
||||
<template v-for="(item,index) in couponStyleList" :key="index">
|
||||
<div :class="{ 'border-primary': selectCouponStyle.value == item.value }" @click="changeCouponStyle(item)" class="flex items-center justify-center overflow-hidden w-[200px] h-[100px] mr-[12px] cursor-pointer border bg-gray-50">
|
||||
<img :src="img(item.url)" />
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="showCouponDialog = false">{{ t('cancel') }}</el-button>
|
||||
<el-button type="primary" @click="confirmCouponStyle">{{ t('confirm') }}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
</el-dialog> -->
|
||||
<h3 class="mb-[10px]">{{ t('floatBtnButton') }}</h3>
|
||||
<el-form label-width="80px" class="px-[10px]">
|
||||
<el-form-item :label="t('floatBtnButton')">
|
||||
@ -98,7 +73,6 @@ import { ref, reactive, onMounted, nextTick } from 'vue'
|
||||
import { t } from '@/lang'
|
||||
import Sortable from 'sortablejs'
|
||||
import useDiyStore from '@/stores/modules/diy'
|
||||
import { img } from '@/utils/common'
|
||||
import { range } from 'lodash-es'
|
||||
|
||||
const diyStore = useDiyStore()
|
||||
@ -117,48 +91,6 @@ diyStore.editComponent.verify = (index: number) => {
|
||||
return res
|
||||
}
|
||||
|
||||
/*********** 风格样式 **********/
|
||||
|
||||
const showCouponDialog = ref(false)
|
||||
const selectCouponStyle = reactive({
|
||||
title: diyStore.editComponent.styleName,
|
||||
value: diyStore.editComponent.style
|
||||
})
|
||||
const showCouponStyle = () => {
|
||||
showCouponDialog.value = true
|
||||
selectCouponStyle.title = diyStore.editComponent.styleName;
|
||||
selectCouponStyle.value = diyStore.editComponent.style;
|
||||
}
|
||||
// const couponStyleList = reactive([
|
||||
// {
|
||||
// url: 'addon/shop/diy/goods_coupon/style-1.png',
|
||||
// title: '风格1',
|
||||
// value: 'style-1'
|
||||
// },
|
||||
// {
|
||||
// url: 'addon/shop/diy/goods_coupon/style-2.png',
|
||||
// title: '风格2',
|
||||
// value: 'style-2'
|
||||
// }
|
||||
// ])
|
||||
//风格点击
|
||||
const changeCouponStyle = (item: any) => {
|
||||
selectCouponStyle.title = item.title;
|
||||
selectCouponStyle.value = item.value;
|
||||
}
|
||||
//确认风格
|
||||
const confirmCouponStyle = () => {
|
||||
diyStore.editComponent.styleName = selectCouponStyle.title;
|
||||
diyStore.editComponent.style = selectCouponStyle.value;
|
||||
showCouponDialog.value = false
|
||||
selectTemplate.value = {
|
||||
name: '右下',
|
||||
src: 'iconyouxiajiao',
|
||||
className: 'lowerRight'
|
||||
};
|
||||
diyStore.editComponent.bottomPosition = 'lowerRight'
|
||||
}
|
||||
/******** end *******/
|
||||
const templateList = ref([
|
||||
{
|
||||
name: '左上',
|
||||
|
||||
@ -65,6 +65,29 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="edit-attr-item-wrap">
|
||||
<h3 class="mb-[10px]">{{ t('popWindowAds') }}</h3>
|
||||
<el-form label-width="80px" class="px-[10px]">
|
||||
<el-form-item :label="t('popAdsIsEnabled')" class="display-block">
|
||||
<el-switch v-model="diyStore.global.popWindow.show" />
|
||||
</el-form-item>
|
||||
<div v-show="diyStore.global.popWindow.show">
|
||||
<el-form-item :label="t('popAdsType')">
|
||||
<el-radio-group v-model="diyStore.global.popWindow.count">
|
||||
<el-radio label="once">{{ t('firstPop') }}</el-radio>
|
||||
<el-radio label="always">{{ t('everyTimePops') }}</el-radio>
|
||||
</el-radio-group>
|
||||
<div class="text-sm text-gray-400">{{ t('popWindowCountTips') }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('popAdsImage')">
|
||||
<upload-image v-model="diyStore.global.popWindow.imgUrl" :limit="1" @change="selectImg" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('popAdsLink')">
|
||||
<diy-link v-model="diyStore.global.popWindow.link" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-dialog v-model="showDialog" :title="t('selectStyle')" width="800px">
|
||||
|
||||
@ -180,7 +203,6 @@ const inputBoth = (value: any) => {
|
||||
diyStore.value.forEach((item, index) => {
|
||||
item.margin.both = value;
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
watch(
|
||||
@ -215,6 +237,15 @@ const changeStyle = () => {
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
const selectImg = (url: any) => {
|
||||
const image = new Image()
|
||||
image.src = img(url)
|
||||
image.onload = async() => {
|
||||
diyStore.global.popWindow.imgWidth = image.width
|
||||
diyStore.global.popWindow.imgHeight = image.height
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({})
|
||||
</script>
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ diyStore.editComponent.verify = (index: number) => {
|
||||
}
|
||||
if (diyStore.value[index].limit > 9) {
|
||||
res.code = false
|
||||
res.message = t('imafeLimitErrorTipsFour')
|
||||
res.message = t('imageLimitErrorTipsFour')
|
||||
return res
|
||||
}
|
||||
return res
|
||||
|
||||
@ -177,7 +177,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="right" fixed="right" width="120">
|
||||
<el-table-column align="right" fixed="right" width="120">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link @click="successfulAuditFn(row)" v-if="row.status == 1"> {{ t('successfulAudit') }}</el-button>
|
||||
<el-button type="primary" link @click="auditFailureFn(row)" v-if="row.status == 1"> {{ t('auditFailure') }}</el-button>
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref, computed,defineEmits } from 'vue'
|
||||
import { reactive, ref, computed,defineEmits } from 'vue'
|
||||
import { t } from '@/lang'
|
||||
import { getPayRefundInfo, getRefundType, getRefundTransfer } from '@/app/api/pay'
|
||||
import { FormInstance } from 'element-plus'
|
||||
|
||||
@ -10,8 +10,7 @@
|
||||
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never">
|
||||
<el-form :inline="true" :model="payRefundTable.searchParam" ref="searchFormRef">
|
||||
<el-form-item :label="t('refundNo')" prop="refund_no">
|
||||
<el-input v-model.trim="payRefundTable.searchParam.refund_no"
|
||||
:placeholder="t('refundNoPlaceholder')" />
|
||||
<el-input v-model.trim="payRefundTable.searchParam.refund_no" :placeholder="t('refundNoPlaceholder')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('status')" prop="status">
|
||||
<el-select v-model="payRefundTable.searchParam.status" clearable class="input-width">
|
||||
|
||||
@ -332,10 +332,20 @@
|
||||
</div>
|
||||
<!-- </el-scrollbar> -->
|
||||
<div class="flex justify-end">
|
||||
<el-tooltip effect="dark" :content="t('installTips')" placement="top">
|
||||
<el-tooltip effect="dark" placement="top">
|
||||
<template #content>
|
||||
<div class="w-[400px]">
|
||||
{{t("installTips")}}
|
||||
</div>
|
||||
</template>
|
||||
<el-button :disabled="!installCheckResult.is_pass || cloudInstalling" :loading="localInstalling" @click="handleInstall">{{ t("localInstall") }}</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" :content="t('cloudInstallTips')" placement="top">
|
||||
<el-tooltip effect="dark" placement="top">
|
||||
<template #content>
|
||||
<div class="w-[400px]">
|
||||
{{t("cloudInstallTips")}}
|
||||
</div>
|
||||
</template>
|
||||
<el-button type="primary" :disabled="!installCheckResult.is_pass || localInstalling" :loading="cloudInstalling" @click="handleCloudInstall">{{ t("cloudInstall") }}</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@ -503,11 +513,6 @@ const frameworkVersion = ref('')
|
||||
const upgradeLogRef = ref<any>(null)
|
||||
getVersions().then((res) => {
|
||||
frameworkVersion.value = res.data.version.version
|
||||
|
||||
})
|
||||
|
||||
const treeProps = reactive({
|
||||
checkStrictly: false
|
||||
})
|
||||
|
||||
const typeList = ref({})
|
||||
@ -607,7 +612,7 @@ const buildInfo = (list: any[]) => {
|
||||
// const filteredUninstalled = localList.value.uninstalled.filter((el: any) => el.title.indexOf(search_name.value) != -1)
|
||||
// const filteredAll = localList.value.all.filter((el: any) => el.title.indexOf(search_name.value) != -1)
|
||||
// const filteredRecentlyUpdated = localList.value.recentlyUpdated.filter((el: any) => el.title.indexOf(search_name.value) != -1)
|
||||
|
||||
|
||||
// // 构建父子关系
|
||||
// info.value.installed = buildInfo(filteredInstalled)
|
||||
// info.value.uninstalled = buildInfo(filteredUninstalled)
|
||||
@ -896,17 +901,15 @@ const handleCloudInstall = () => {
|
||||
cloudInstalling.value = true
|
||||
installType.value = 'cloud'
|
||||
|
||||
cloudInstallAddon({ addon: currAddon.value })
|
||||
.then((res) => {
|
||||
installStep.value = 1
|
||||
terminalRef.value.execute('clear')
|
||||
terminalRef.value.execute('开始安装插件')
|
||||
getInstallTask()
|
||||
cloudInstalling.value = false
|
||||
})
|
||||
.catch((res) => {
|
||||
cloudInstalling.value = false
|
||||
})
|
||||
cloudInstallAddon({ addon: currAddon.value }).then((res) => {
|
||||
installStep.value = 1
|
||||
terminalRef.value.execute('clear')
|
||||
terminalRef.value.execute('开始安装插件')
|
||||
getInstallTask()
|
||||
cloudInstalling.value = false
|
||||
}).catch((res) => {
|
||||
cloudInstalling.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const authElMessageBox = () => {
|
||||
@ -1163,7 +1166,7 @@ const batchUpgrade = () => {
|
||||
}
|
||||
|
||||
const visibleRowKeys = computed(() => {
|
||||
return new Set((info.value[activeName.value] || []).map(row => row.key));
|
||||
return new Set((info.value[activeName.value] || []).map(row => row.key));
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1443,6 +1446,7 @@ html.dark .table-head-bg {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style>
|
||||
|
||||
@ -92,15 +92,15 @@ const regExp = {
|
||||
const formRules = reactive<FormRules>({
|
||||
continue_sign: [
|
||||
{ required: true, message: t('continueSignPlaceholder'), trigger: 'blur' },
|
||||
{
|
||||
{
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (isNaN(value) || !regExp.number.test(value)) {
|
||||
if (isNaN(value) || !regExp.number.test(value)) {
|
||||
callback(t('continueSignFormatError'))
|
||||
} else if (value < 2 || value > 365) {
|
||||
callback(t('continueSignBerweenDays'))
|
||||
} else if (Number(value) > Number(props.sign_period)) {
|
||||
} else if (Number(value) > Number(props.sign_period)) {
|
||||
callback(t('continueSignMustLessThanSignPeriod')) // 添加这个校验
|
||||
} else{
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
|
||||
@ -98,22 +98,18 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref, computed } from 'vue'
|
||||
import { reactive, ref } from 'vue'
|
||||
import { t } from '@/lang'
|
||||
import { getVerifyDetail } from '@/app/api/verify'
|
||||
import { FormInstance, ElMessage } from 'element-plus'
|
||||
import { ArrowLeft } from '@element-plus/icons-vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { img, filterNumber } from '@/utils/common'
|
||||
import useAppStore from '@/stores/modules/app'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { img } from '@/utils/common'
|
||||
|
||||
const showDialog = ref(false)
|
||||
const loading = ref(true)
|
||||
const router = useRouter()
|
||||
|
||||
const appStore = useAppStore()
|
||||
const activeName = ref('verifyInfo')
|
||||
const formData:Record<string, any> = ref({})
|
||||
|
||||
const handleClick = (data:string) => {
|
||||
activeName.value = data
|
||||
|
||||
@ -141,7 +141,7 @@ const regExp: any = {
|
||||
// 表单验证规则
|
||||
const formRules = reactive<FormRules>({
|
||||
day_award: [
|
||||
{
|
||||
{
|
||||
required: true,
|
||||
trigger: 'change',
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
@ -157,15 +157,15 @@ const formRules = reactive<FormRules>({
|
||||
}
|
||||
}
|
||||
],
|
||||
sign_period:[{
|
||||
sign_period: [{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (value === null || value === '') {
|
||||
callback(t('signPeriodTip'))
|
||||
}else if (isNaN(value) || !regExp.number.test(value)) {
|
||||
} else if (isNaN(value) || !regExp.number.test(value)) {
|
||||
callback(t('signPeriodLimitTips'))
|
||||
}else if (value < 2 || value > 365) {
|
||||
} else if (value < 2 || value > 365) {
|
||||
callback(t('signPeriodMustZeroTips'))
|
||||
} else {
|
||||
callback()
|
||||
|
||||
@ -93,10 +93,6 @@ import { getVerifyDetail } from '@/app/api/verify'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ArrowLeft } from '@element-plus/icons-vue'
|
||||
import { img } from '@/utils/common'
|
||||
import PointEdit from '@/app/views/member/components/member-point-edit.vue'
|
||||
import BalanceEdit from '@/app/views/member/components/member-balance-edit.vue'
|
||||
import EditMember from '@/app/views/member/components/edit-member.vue'
|
||||
import useAppStore from '@/stores/modules/app'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@ -105,7 +101,6 @@ const back = () => {
|
||||
router.push('/marketing/verify')
|
||||
}
|
||||
|
||||
const appStore = useAppStore()
|
||||
const loading = ref(true)
|
||||
|
||||
// 获取核销信息
|
||||
|
||||
@ -166,7 +166,7 @@ const memberAccountLogTableData = reactive({
|
||||
from_type: '',
|
||||
create_time: '',
|
||||
mobile: '',
|
||||
member_id: member_id,
|
||||
member_id,
|
||||
balance_type: ''
|
||||
}
|
||||
})
|
||||
|
||||
@ -49,11 +49,11 @@ const formRules = reactive<FormRules>({
|
||||
if (!Test.decimal(formData.value.discount, 1)) {
|
||||
callback('折扣格式错误')
|
||||
}
|
||||
if (parseFloat(formData.value.discount) < 0.1 || parseFloat(formData.value.discount) > 9.9) {
|
||||
callback('折扣只能输入0.1~9.9之间的值')
|
||||
if (parseFloat(formData.value.discount) < 0 || parseFloat(formData.value.discount) > 9.9) {
|
||||
callback('折扣只能输入0~9.9之间的值')
|
||||
}
|
||||
if (formData.value.discount <= 0) {
|
||||
callback('折扣不能小于等于0')
|
||||
if (formData.value.discount < 0) {
|
||||
callback('折扣不能小于0')
|
||||
}
|
||||
callback()
|
||||
} else {
|
||||
|
||||
@ -164,7 +164,9 @@
|
||||
<div class="flex mt-[15px] w-[33.3%] break-all leading-[21px]">
|
||||
<span class="text-[14px] w-[130px] text-right flex-shrink-0 mr-[20px]">{{ t('mobile') }}</span>
|
||||
<span class="text-[14px] text-[#666666]">
|
||||
{{ formData.mobile || t('notAvailable') }}
|
||||
{{ formData.mobile || t('notAvailable') }}<el-icon @click="editMemberInfo('mobile')" class="-bottom-[2px] -right-[4px] cursor-pointer">
|
||||
<EditPen color="#273CE2" />
|
||||
</el-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex mt-[15px] w-[33.3%] break-all leading-[21px]">
|
||||
@ -199,6 +201,22 @@
|
||||
</el-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex mt-[15px] w-[33.3%] break-all leading-[21px]">
|
||||
<span class="text-[14px] w-[130px] text-right flex-shrink-0 mr-[20px]">{{ t('身份证') }}</span>
|
||||
<span class="text-[14px] text-[#666666]">
|
||||
{{ formData.id_card || t('notAvailable') }}<el-icon @click="editMemberInfo('id_card')" class="-bottom-[2px] -right-[4px] cursor-pointer">
|
||||
<EditPen color="#273CE2" />
|
||||
</el-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex mt-[15px] w-[33.3%] break-all leading-[21px]">
|
||||
<span class="text-[14px] w-[130px] text-right flex-shrink-0 mr-[20px]">{{ t('备注') }}</span>
|
||||
<span class="text-[14px] text-[#666666]">
|
||||
{{ formData.remark || t('notAvailable') }}<el-icon @click="editMemberInfo('remark')" class="-bottom-[2px] -right-[4px] cursor-pointer">
|
||||
<EditPen color="#273CE2" />
|
||||
</el-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex mt-[15px] w-[33.3%] break-all leading-[21px]">
|
||||
<span class="text-[14px] w-[130px] text-right flex-shrink-0 mr-[20px]">{{ t('wxUnionid') }}</span>
|
||||
<span class="text-[14px] text-[#666666]">
|
||||
@ -248,7 +266,7 @@
|
||||
import { reactive, ref } from 'vue'
|
||||
import { t } from '@/lang'
|
||||
import { getMemberInfo } from '@/app/api/member'
|
||||
import { FormInstance, ElMessage } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { img } from '@/utils/common'
|
||||
import PointEdit from '@/app/views/member/components/member-point-edit.vue'
|
||||
|
||||
@ -8,6 +8,15 @@
|
||||
<el-form-item :label="t('nickname')" v-if="type == 'nickname'">
|
||||
<el-input v-model.trim="saveData.nickname" clearable :placeholder="t('nickNamePlaceholder')" class="input-width" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('mobile')" v-if="type == 'mobile'" prop="mobile">
|
||||
<el-input v-model.trim="saveData.mobile" clearable :placeholder="t('mobilePlaceholder')" maxlength="11" class="input-width" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('idCard')" v-if="type == 'id_card'" prop="id_card">
|
||||
<el-input v-model.trim="saveData.id_card" clearable :placeholder="t('idCardPlaceholder')" maxlength="18" class="input-width" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('remark')" v-if="type == 'remark'" prop="remark">
|
||||
<el-input v-model.trim="saveData.remark" type="textarea" clearable :placeholder="t('remarkPlaceholder')" maxlength="100" :rows="5" class="input-width" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('birthday')" v-if="type == 'birthday'">
|
||||
<el-date-picker v-model="saveData.birthday" value-format="YYYY-MM-DD" type="date" :placeholder="t('birthdayTip')" />
|
||||
</el-form-item>
|
||||
@ -23,7 +32,7 @@
|
||||
</el-form-item>
|
||||
<div v-if="type == 'member_level'">
|
||||
<el-form-item :label="t('memberLevelUpdate')" prop="member_level">
|
||||
<el-select v-model="saveData.member_level" :placeholder="t('memberLevelPlaceholder')" class="input-width">
|
||||
<el-select v-model="saveData.member_level" :placeholder="t('memberLevelPlaceholder')" clearable class="input-width">
|
||||
<el-option :label="t('memberLevelPlaceholder')" :value="0" />
|
||||
<el-option :label="item['level_name']" :value="item['level_id']" v-for="(item,index) in levelSelectData" :key="index"/>
|
||||
</el-select>
|
||||
@ -35,7 +44,8 @@
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="showDialog = false">{{ t('cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="confirm(formRef)">{{t('confirm')}}</el-button>
|
||||
<el-button type="primary" :loading="loading" v-if="method=='batchSet'" @click="batchSetConfirm(formRef)">{{t('confirm')}}</el-button>
|
||||
<el-button type="primary" :loading="loading" v-else @click="confirm(formRef)">{{t('confirm')}}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@ -46,7 +56,7 @@ import { ref, reactive, computed } from 'vue'
|
||||
import { t } from '@/lang'
|
||||
import { deepClone } from '@/utils/common'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import { editMemberDetail, getMemberLabelAll, getMemberLevelAll } from '@/app/api/member'
|
||||
import { editMemberDetail, getMemberLabelAll, getMemberLevelAll,memberBatchModify } from '@/app/api/member'
|
||||
import Test from '@/utils/test'
|
||||
|
||||
// 修改类型
|
||||
@ -87,16 +97,50 @@ getMemberLevelAll().then(({ data }) => {
|
||||
|
||||
const formRules = computed(() => {
|
||||
return {
|
||||
member_level: [
|
||||
mobile: [
|
||||
{
|
||||
validator: (rule: any, value: any, callback: Function) => {
|
||||
if (Test.empty(saveData.member_level)) {
|
||||
callback(t('memberLevelPlaceholder'))
|
||||
}
|
||||
callback()
|
||||
validator(rule, value, callback) {
|
||||
// 允许为空,直接通过验证
|
||||
if (!value) return callback();
|
||||
|
||||
// 非空值时,验证手机号格式
|
||||
const reg = /^1[3-9]\d{9}$/;
|
||||
if (!reg.test(value)) {
|
||||
callback(new Error('请输入正确的手机号'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
id_card:[
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
// 允许为空,直接通过验证
|
||||
if (!value) return callback();
|
||||
|
||||
// 非空值时,验证身份证号格式
|
||||
const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
|
||||
if (!reg.test(value)) {
|
||||
callback(new Error('请输入正确的身份证号'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
// member_level: [
|
||||
// {
|
||||
// validator: (rule: any, value: any, callback: Function) => {
|
||||
// if (Test.empty(saveData.member_level)) {
|
||||
// callback(t('memberLevelPlaceholder'))
|
||||
// }
|
||||
// callback()
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
})
|
||||
|
||||
@ -151,7 +195,7 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
const setDialogType = async (row: any = null) => {
|
||||
loading.value = true
|
||||
type.value = row.type
|
||||
@ -178,9 +222,63 @@ const setDialogType = async (row: any = null) => {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
// 批量设置
|
||||
const method = ref(null)
|
||||
const batchInfo = ref({
|
||||
is_all: 0,
|
||||
ids: [],
|
||||
where: {}
|
||||
})
|
||||
const batchSetDialogType = (data)=>{
|
||||
loading.value = true
|
||||
type.value =data.type
|
||||
method.value = data.method
|
||||
batchInfo.value.is_all = data.data.is_all
|
||||
batchInfo.value.ids = data.data.ids
|
||||
batchInfo.value.where = data.data.where
|
||||
title.value = data.title
|
||||
saveData[type.value] = null
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
const batchSetConfirm = async (formEl: FormInstance | undefined) => {
|
||||
await formRef.value?.validate((valid) => {
|
||||
if (valid) {
|
||||
loading.value = true
|
||||
|
||||
if (repeat.value) return
|
||||
repeat.value = true
|
||||
|
||||
let val = saveData[type.value];
|
||||
if(type.value == 'member_label'){
|
||||
val = saveData[type.value] && saveData[type.value].length ? deepClone(saveData[type.value]).join(',').split(',') : '';
|
||||
}
|
||||
|
||||
const data = ref({
|
||||
is_all: batchInfo.value.is_all,
|
||||
member_ids:batchInfo.value.ids,
|
||||
where: batchInfo.value.where,
|
||||
field: type.value,
|
||||
value: val
|
||||
})
|
||||
console.log(data.value)
|
||||
memberBatchModify(data.value).then(res => {
|
||||
loading.value = false
|
||||
repeat.value = false
|
||||
showDialog.value = false
|
||||
emit('complete')
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
repeat.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showDialog,
|
||||
setDialogType
|
||||
setDialogType,
|
||||
batchSetDialogType
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, reactive, ref, watch } from 'vue'
|
||||
import { FormRules } from 'element-plus'
|
||||
import Test from '@/utils/test'
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
|
||||
@ -107,7 +107,6 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
repeat.value = false
|
||||
// showDialog.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@ -2,38 +2,38 @@
|
||||
<el-dialog v-model="showDialog" :title="t('balanceInfo')" width="550px" :destroy-on-close="true">
|
||||
<el-form :model="formData" label-width="110px" ref="formRef" :rules="formRules" class="page-form" v-loading="loading">
|
||||
|
||||
<el-form-item :label="t('headimg')" >
|
||||
<el-form-item :label="t('headimg')">
|
||||
<div class="flex items-center">
|
||||
<img class="w-[50px] h-[50px] mr-[10px]" v-if="formData.member.headimg" :src="img(formData.member.headimg)" alt="" >
|
||||
<img class="w-[50px] h-[50px] mr-[10px] rounded-full" v-else src="@/app/assets/images/member_head.png" alt="">
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('memberId')" >
|
||||
<el-form-item :label="t('memberId')">
|
||||
<div class="input-width"> {{ formData.member.member_no }} </div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('nickName')" >
|
||||
<el-form-item :label="t('nickName')">
|
||||
<div class="input-width"> {{ formData.member.nickname }} </div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('mobile')" >
|
||||
<el-form-item :label="t('mobile')">
|
||||
<div class="input-width"> {{ formData.member.mobile }} </div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('accountData')" >
|
||||
<el-form-item :label="t('accountData')">
|
||||
<div class="input-width"> {{ formData.account_data }} </div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('fromType')" >
|
||||
<el-form-item :label="t('fromType')">
|
||||
<div class="input-width"> {{ formData.from_type_name }} </div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('memo')" >
|
||||
<el-form-item :label="t('memo')">
|
||||
<div class="input-width"> {{ formData.memo }} </div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('createTime')" >
|
||||
<el-form-item :label="t('createTime')">
|
||||
<div class="input-width"> {{ formData.create_time }} </div>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('adjustPoint')" prop="adjust">
|
||||
<el-input-number v-model="formData.adjust" clearable :min="0" :max="999999" :placeholder="t('adjustPlaceholder')"/>
|
||||
<el-input-number v-model="formData.adjust" clearable :min="0" :max="999999" :placeholder="t('adjustPlaceholder')" @focus="formData.adjust = ''" class="!w-[200px]"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('memo')" prop="memo">
|
||||
@ -94,7 +94,7 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
||||
await formEl.validate(async (valid) => {
|
||||
if (valid) {
|
||||
loading.value = true
|
||||
|
||||
|
||||
if (repeat.value) return
|
||||
repeat.value = true
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<el-card class="box-card !border-none my-[20px] table-search-wrap" shadow="never">
|
||||
<el-form :inline="true" :model="memberTableData.searchParam" ref="searchFormRef">
|
||||
<el-form-item :label="t('memberInfo')" prop="keyword">
|
||||
<el-input v-model.trim="memberTableData.searchParam.keyword" class="w-[240px]" :placeholder="t('memberInfoPlaceholder')" />
|
||||
<el-input v-model.trim="memberTableData.searchParam.keyword" class="!w-[200px]" :placeholder="t('memberInfoPlaceholder')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('registerChannel')" prop="register_channel">
|
||||
@ -47,11 +47,29 @@
|
||||
</el-card>
|
||||
|
||||
<div class="mt-[10px]">
|
||||
<el-table :data="memberTableData.data" size="large" v-loading="memberTableData.loading">
|
||||
<div class="mb-[10px] flex items-center">
|
||||
<el-dropdown class="mr-[20px] !text-primary">
|
||||
<span class="el-dropdown-link">
|
||||
<span>{{ currentSelectMode === 'all' ? t('全选所有页') : t('全选当前页')}}</span>({{ selectedCount }})
|
||||
<el-icon>
|
||||
<arrow-down />
|
||||
</el-icon>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item class="select-wrap" :class="{ active: currentSelectMode === 'all' }" @click="selectAllPages">全选所有页</el-dropdown-item>
|
||||
<el-dropdown-item class="select-wrap" :class="{ active: currentSelectMode === 'page' }" @click="toggleChange">全选当前页</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<el-button @click="batchSetLabel" size="small">{{ t('标签') }}</el-button>
|
||||
<el-button @click="batchSetLevel" size="small">{{ t('等级') }}</el-button>
|
||||
</div>
|
||||
<el-table :data="memberTableData.data" size="large" ref="memberListTableRef" v-loading="memberTableData.loading" :row-key="row => row.member_id" :default-selection="defaultSelection" @selection-change="handleSelectionChange">
|
||||
<template #empty>
|
||||
<span>{{ !memberTableData.loading ? t('emptyData') : '' }}</span>
|
||||
</template>
|
||||
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="member_no" :label="t('memberNo')" min-width="120" />
|
||||
<el-table-column prop="nickname" :show-overflow-tooltip="true" :label="t('memberInfo')" min-width="170">
|
||||
<template #default="{ row }">
|
||||
@ -120,9 +138,8 @@
|
||||
@size-change="loadMemberList()" @current-change="loadMemberList" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<add-member ref="addMemberDialog" @complete="loadMemberList()" />
|
||||
<edit-member ref="editMemberDialog" @complete="loadMemberList()" />
|
||||
<edit-member ref="editMemberDialog" @complete="loadMemberListReset()" />
|
||||
<export-sure ref="exportSureDialog" :show="flag" type="member" :searchParam="memberTableData.searchParam" @close="handleClose" />
|
||||
<detail-member ref="detailMemberDialog" @load="loadMemberList()"></detail-member>
|
||||
</el-card>
|
||||
@ -130,7 +147,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref } from 'vue'
|
||||
import { reactive, ref,nextTick ,computed } from 'vue'
|
||||
import { t } from '@/lang'
|
||||
import { img } from '@/utils/common'
|
||||
import { getRegisterChannelType, getMemberList, getMemberLabelAll, editMemberStatus, deleteMember, getMemberLevelAll } from '@/app/api/member'
|
||||
@ -183,9 +200,11 @@ getMemberLevelAll().then(({ data }) => {
|
||||
const resetForm = (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
formEl.resetFields()
|
||||
isReset.value = true
|
||||
loadMemberList()
|
||||
}
|
||||
|
||||
const isReset = ref(false)
|
||||
// 获取会员列表
|
||||
const loadMemberList = (page: number = 1) => {
|
||||
memberTableData.loading = true
|
||||
@ -199,12 +218,195 @@ const loadMemberList = (page: number = 1) => {
|
||||
memberTableData.loading = false
|
||||
memberTableData.data = res.data.data
|
||||
memberTableData.total = res.data.total
|
||||
if (isReset.value) {
|
||||
isSelectAllPages.value = false
|
||||
excludedIds.value = []
|
||||
currentSelectMode.value = null
|
||||
multipleSelection.value = []
|
||||
}
|
||||
if (isSelectAllPages.value && !isReset.value) {
|
||||
restoringSelection.value = true
|
||||
nextTick(() => {
|
||||
memberTableData.data.forEach(item => {
|
||||
if (!excludedIds.value.includes(item.member_id)) {
|
||||
memberListTableRef.value?.toggleRowSelection(item, true)
|
||||
} else {
|
||||
memberListTableRef.value?.toggleRowSelection(item, false)
|
||||
}
|
||||
})
|
||||
|
||||
restoringSelection.value = false
|
||||
})
|
||||
}
|
||||
isReset.value = false
|
||||
}).catch(() => {
|
||||
isReset.value = false
|
||||
memberTableData.loading = false
|
||||
})
|
||||
}
|
||||
loadMemberList()
|
||||
|
||||
// 全选所有页时排除的 ID
|
||||
const excludedIds = ref<number[]>([])
|
||||
// 是否全选所有页
|
||||
const isSelectAllPages = ref(false)
|
||||
|
||||
const currentSelectMode = ref<'all' | 'page' | null>(null)
|
||||
|
||||
// 全选当前页
|
||||
const toggleChange = () => {
|
||||
restoringSelection.value = true // 加锁
|
||||
if (currentSelectMode.value === 'page') {
|
||||
isSelectAllPages.value = false
|
||||
currentSelectMode.value = null
|
||||
excludedIds.value = []
|
||||
multipleSelection.value = []
|
||||
memberListTableRef.value.clearSelection()
|
||||
} else {
|
||||
isSelectAllPages.value = false
|
||||
currentSelectMode.value = 'page'
|
||||
excludedIds.value = []
|
||||
multipleSelection.value = []
|
||||
memberTableData.data.forEach(row => {
|
||||
memberListTableRef.value.toggleRowSelection(row, true)
|
||||
})
|
||||
multipleSelection.value = [...memberTableData.data]
|
||||
}
|
||||
nextTick(() => {
|
||||
restoringSelection.value = false // 解锁
|
||||
})
|
||||
}
|
||||
|
||||
// 全选所有页
|
||||
const selectAllPages = () => {
|
||||
restoringSelection.value = true // 加锁
|
||||
if (currentSelectMode.value === 'all') {
|
||||
isSelectAllPages.value = false
|
||||
currentSelectMode.value = null
|
||||
excludedIds.value = []
|
||||
multipleSelection.value = []
|
||||
memberListTableRef.value.clearSelection()
|
||||
} else {
|
||||
// memberListTableRef.value.clearSelection()
|
||||
excludedIds.value = []
|
||||
multipleSelection.value = []
|
||||
isSelectAllPages.value = true
|
||||
currentSelectMode.value = 'all'
|
||||
memberTableData.data.forEach(row => {
|
||||
memberListTableRef.value.toggleRowSelection(row, true)
|
||||
})
|
||||
}
|
||||
nextTick(() => {
|
||||
restoringSelection.value = false // 解锁
|
||||
})
|
||||
}
|
||||
const defaultSelection = computed(() => {
|
||||
if (isSelectAllPages.value) {
|
||||
return memberTableData.data.filter(item => !excludedIds.value.includes(item.member_id))
|
||||
} else {
|
||||
return multipleSelection.value
|
||||
}
|
||||
})
|
||||
|
||||
const memberListTableRef = ref()
|
||||
|
||||
// 选中数据
|
||||
const multipleSelection: any = ref([])
|
||||
const restoringSelection = ref(false)
|
||||
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
if (restoringSelection.value) return // 阻止自动恢复触发逻辑
|
||||
|
||||
if (isSelectAllPages.value) {
|
||||
const currentPageIds = memberTableData.data.map(item => item.member_id)
|
||||
const selectedIds = val.map(item => item.member_id)
|
||||
const unselected = currentPageIds.filter(id => !selectedIds.includes(id))
|
||||
|
||||
excludedIds.value = Array.from(new Set([...excludedIds.value, ...unselected]))
|
||||
excludedIds.value = excludedIds.value.filter(id => !selectedIds.includes(id))
|
||||
} else {
|
||||
multipleSelection.value = val
|
||||
}
|
||||
}
|
||||
const selectedCount = computed(() => {
|
||||
if (isSelectAllPages.value) {
|
||||
return memberTableData.total - excludedIds.value.length
|
||||
} else {
|
||||
return multipleSelection.value.length
|
||||
}
|
||||
})
|
||||
|
||||
const getBatchPayload = () => {
|
||||
if (isSelectAllPages.value) {
|
||||
return {
|
||||
is_all: 1,
|
||||
ids: excludedIds.value,
|
||||
where: {
|
||||
...memberTableData.searchParam
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
is_all: 0,
|
||||
ids: multipleSelection.value.map(item => item.member_id),
|
||||
where: {
|
||||
...memberTableData.searchParam
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** ***************** 批量设置-start *************************/
|
||||
const batchSetLabel = () => {
|
||||
const isNoneSelected =
|
||||
(!isSelectAllPages.value && multipleSelection.value.length === 0) ||
|
||||
(isSelectAllPages.value && excludedIds.value.length === memberTableData.total)
|
||||
|
||||
if (isNoneSelected) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: `${ t('batchEmptySelectedTips') }`
|
||||
})
|
||||
return
|
||||
}
|
||||
const info = getBatchPayload()
|
||||
const data = ref({
|
||||
method: 'batchSet',
|
||||
type: 'member_label',
|
||||
title: t('批量设置会员标签'),
|
||||
data: info
|
||||
})
|
||||
editMemberDialog.value.batchSetDialogType(data.value)
|
||||
editMemberDialog.value.showDialog = true
|
||||
}
|
||||
// 等级
|
||||
const batchSetLevel = () => {
|
||||
const isNoneSelected =
|
||||
(!isSelectAllPages.value && multipleSelection.value.length === 0) ||
|
||||
(isSelectAllPages.value && excludedIds.value.length === memberTableData.total)
|
||||
|
||||
if (isNoneSelected) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: `${t('batchEmptySelectedTips')}`
|
||||
})
|
||||
return
|
||||
}
|
||||
const info = getBatchPayload()
|
||||
const data = ref({
|
||||
method: 'batchSet',
|
||||
type: 'member_level',
|
||||
title: t('批量设置会员等级'),
|
||||
data: info
|
||||
})
|
||||
editMemberDialog.value.batchSetDialogType(data.value)
|
||||
editMemberDialog.value.showDialog = true
|
||||
}
|
||||
const loadMemberListReset = () => {
|
||||
isReset.value = true
|
||||
loadMemberList()
|
||||
}
|
||||
/** ***************** 批量设置-end *************************/
|
||||
const addMemberDialog: Record<string, any> | null = ref(null)
|
||||
const editMemberDialog: Record<string, any> | null = ref(null)
|
||||
const detailMemberDialog: Record<string, any> | null = ref(null)
|
||||
@ -249,12 +451,6 @@ const addEvent = () => {
|
||||
addMemberDialog.value.showDialog = true
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑会员
|
||||
* @param data
|
||||
*/
|
||||
const editEvent = (data: any) => { }
|
||||
|
||||
/**
|
||||
* 会员详情
|
||||
*/
|
||||
@ -280,10 +476,11 @@ const exportEvent = () => {
|
||||
*/
|
||||
const lockMember = (res: any, status: any) => {
|
||||
editMemberStatus({
|
||||
status: status,
|
||||
status,
|
||||
member_ids: [res.member_id]
|
||||
}).then(res => {
|
||||
if (res.code >= 0) {
|
||||
isReset.value = true
|
||||
loadMemberList()
|
||||
}
|
||||
})
|
||||
|
||||
@ -199,6 +199,22 @@
|
||||
</el-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex items-center mt-[15px]">
|
||||
<span class="text-[14px] w-[130px] text-right flex-shrink-0 mr-[20px]">{{ t('身份证') }}</span>
|
||||
<span class="text-[14px] text-[#666666]">
|
||||
{{ formData.id_card || t('notAvailable') }}<el-icon @click="editMemberInfo('id_card')" class="-bottom-[2px] -right-[4px] cursor-pointer">
|
||||
<EditPen color="#273CE2" />
|
||||
</el-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex items-center mt-[15px]">
|
||||
<span class="text-[14px] w-[130px] text-right flex-shrink-0 mr-[20px]">{{ t('备注') }}</span>
|
||||
<span class="text-[14px] text-[#666666]">
|
||||
{{ formData.remark || t('notAvailable') }}<el-icon @click="editMemberInfo('remark')" class="-bottom-[2px] -right-[4px] cursor-pointer">
|
||||
<EditPen color="#273CE2" />
|
||||
</el-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex items-center mt-[15px]">
|
||||
<span class="text-[14px] w-[130px] text-right mr-[20px]">{{ t('wxUnionid') }}</span>
|
||||
<span class="text-[14px] text-[#666666]">
|
||||
@ -360,12 +376,12 @@ const infoCommission = () => {
|
||||
}
|
||||
|
||||
const back = () => {
|
||||
if (window.history.length > 1){
|
||||
if (window.history.length > 1) {
|
||||
router.go(-1)
|
||||
}else{
|
||||
} else {
|
||||
router.push(`/member/member`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -142,7 +142,7 @@ const memberAccountLogTableData = reactive({
|
||||
from_type: '',
|
||||
create_time: '',
|
||||
mobile: '',
|
||||
member_id: member_id
|
||||
member_id
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -75,21 +75,21 @@ const formRules = computed(() => {
|
||||
{ required: true, message: t('titlePlaceholder'), trigger: 'blur' }
|
||||
],
|
||||
content: [
|
||||
{
|
||||
required: true,
|
||||
trigger: ['blur', 'change'],
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (value === '') {
|
||||
callback(new Error(t('contentPlaceholder')))
|
||||
} else if (value.length < 5 || value.length > 100000) {
|
||||
callback(new Error(t('contentMaxTips')))
|
||||
return false
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
{
|
||||
required: true,
|
||||
trigger: ['blur', 'change'],
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (value === '') {
|
||||
callback(new Error(t('contentPlaceholder')))
|
||||
} else if (value.length < 5 || value.length > 100000) {
|
||||
callback(new Error(t('contentMaxTips')))
|
||||
return false
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('smsType')">
|
||||
<div class="input-width">
|
||||
<div class="input-width">
|
||||
<div v-if="formData.notice_type == 'sms'">{{ t('sms') }}</div>
|
||||
<div v-if="formData.notice_type == 'wechat'">{{ t('wechat') }}</div>
|
||||
<div v-if="formData.notice_type == 'weapp'">{{ t('weapp') }}</div>
|
||||
<div v-if="formData.notice_type == 'weapp'">{{ t('weapp') }}</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
@ -89,7 +89,6 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
||||
emit('complete')
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
// showDialog.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@ -104,7 +104,6 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
||||
emit('complete')
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
// showDialog.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
<el-button @click="editPass()">忘记密码</el-button>
|
||||
<el-button @click="back()" v-if="props.isLogin">返回</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<div v-if="type=='register'" >
|
||||
@ -63,7 +62,6 @@
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input placeholder="请输入备注" class="input-width" type="textarea" maxlength="50" show-word-limit v-model="registerFormData.remark" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<h3 class="panel-title !text-[14px">{{ t('实名信息') }}</h3>
|
||||
<el-form-item :label="t('短信示例内容')" prop="contentExample">
|
||||
<el-input v-model="registerFormData.contentExample" placeholder="请输入短信示例内容" clearable maxlength="50" show-word-limit class="input-width" />
|
||||
@ -88,12 +86,12 @@
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('签名来源')">
|
||||
<el-radio-group v-model="registerFormData.signSource" >
|
||||
<el-radio v-for="item in signCofig.signsourceList" :key="item.type" :label="item.type" >{{item.name}}</el-radio>
|
||||
<el-radio v-for="item in signConfig.signSourceList" :key="item.type" :label="item.type" >{{item.name}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('签名类型')">
|
||||
<el-radio-group v-model="registerFormData.signType">
|
||||
<el-radio v-for="item in signCofig.signTypeList" :key="item.type" :label="item.type" >{{item.name}}</el-radio>
|
||||
<el-radio v-for="item in signConfig.signTypeList" :key="item.type" :label="item.type" >{{item.name}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('上传图片')" prop="imgUrl">
|
||||
@ -138,13 +136,13 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref ,computed,reactive} from 'vue'
|
||||
import { loginAccount,getSmsCaptcha,getSmsSend,resetPassword,registerAccount ,getSmsSignConfig} from '@/app/api/notice'
|
||||
import { t } from "@/lang";
|
||||
|
||||
const props = defineProps({
|
||||
info:{
|
||||
type: Object,
|
||||
@ -166,7 +164,7 @@ const formData = ref({
|
||||
})
|
||||
|
||||
const isBack = computed(() => {
|
||||
return !!props.info && Object.keys(props.info).length > 0;
|
||||
return !!props.info && Object.keys(props.info).length > 0;
|
||||
})
|
||||
|
||||
const formRules = computed(() => {
|
||||
@ -194,14 +192,14 @@ const back = () => {
|
||||
}
|
||||
|
||||
// 注册
|
||||
const signCofig = reactive({
|
||||
const signConfig = reactive({
|
||||
signTypeList: [],
|
||||
signsourceList:[]
|
||||
signSourceList:[]
|
||||
})
|
||||
const getSmsSignConfigFn = ()=> {
|
||||
getSmsSignConfig().then(res => {
|
||||
signCofig.signTypeList = res.data.sign_type_list
|
||||
signCofig.signsourceList = res.data.sign_source_list
|
||||
signConfig.signTypeList = res.data.sign_type_list
|
||||
signConfig.signSourceList = res.data.sign_source_list
|
||||
registerFormData.value.signSource = res.data.sign_source_list[0].type
|
||||
registerFormData.value.signType = res.data.sign_type_list[0].type
|
||||
})
|
||||
@ -216,7 +214,7 @@ const registerFormData = ref({
|
||||
password: '',
|
||||
company: '',
|
||||
mobile: '',
|
||||
captcha_key : '',
|
||||
captcha_key: '',
|
||||
captcha_code: '',
|
||||
captcha_img: '',
|
||||
imgUrl: '',
|
||||
@ -240,10 +238,8 @@ const toRegister = async () => {
|
||||
registerFormData.value.username = ''
|
||||
registerFormData.value.password = ''
|
||||
type.value = 'register'
|
||||
loading.value = false
|
||||
}else {
|
||||
loading.value = false
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
const registerFormRef = ref()
|
||||
@ -275,36 +271,36 @@ const registerFormRules = computed(() => {
|
||||
code: [
|
||||
{ required: true, message: '请输入动态码', trigger: 'blur' },
|
||||
],
|
||||
company:[
|
||||
company: [
|
||||
{ required: true, message: '请输入公司名称', trigger: 'blur' },
|
||||
],
|
||||
signature: [
|
||||
{ required: true, message: '请输入短信签名', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
const singleBracketValid = /^【[^【】]*】$/.test(value);
|
||||
if (!singleBracketValid) {
|
||||
return callback(new Error('短信签名必须被【】包裹'));
|
||||
}
|
||||
const singleBracketValid = /^【[^【】]*】$/.test(value);
|
||||
if (!singleBracketValid) {
|
||||
return callback(new Error('短信签名必须被【】包裹'));
|
||||
}
|
||||
|
||||
const content = value.slice(1, -1);
|
||||
|
||||
const lengthValid = content.length >= 2 && content.length <= 20;
|
||||
if (!lengthValid) {
|
||||
return callback(new Error('短信签名内容需在 2-20 个字符之间'));
|
||||
}
|
||||
|
||||
const invalidChars = /[\s\-+=*&%#@~;]/;
|
||||
if (invalidChars.test(content)) {
|
||||
return callback(new Error('短信签名不能包含空格或特殊字符 - + = * & % # @ ~ ;'));
|
||||
}
|
||||
|
||||
callback();
|
||||
const content = value.slice(1, -1);
|
||||
|
||||
const lengthValid = content.length >= 2 && content.length <= 20;
|
||||
if (!lengthValid) {
|
||||
return callback(new Error('短信签名内容需在 2-20 个字符之间'));
|
||||
}
|
||||
|
||||
const invalidChars = /[\s\-+=*&%#@~;]/;
|
||||
if (invalidChars.test(content)) {
|
||||
return callback(new Error('短信签名不能包含空格或特殊字符 - + = * & % # @ ~ ;'));
|
||||
}
|
||||
|
||||
callback();
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
principalMobile:[
|
||||
principalMobile: [
|
||||
{ required: true, message: '请输入经办人手机号', trigger: 'blur' },
|
||||
{ validator: phoneVerify, trigger: 'blur' }
|
||||
],
|
||||
@ -389,11 +385,11 @@ const getSmsCaptchaFn = async () => {
|
||||
try {
|
||||
const res = await getSmsCaptcha()
|
||||
if (captchaType.value === 'register') {
|
||||
registerFormData.value.captcha_key = res.data.captcha_key
|
||||
registerFormData.value.captcha_img = res.data.img
|
||||
registerFormData.value.captcha_key = res.data.captcha_key
|
||||
registerFormData.value.captcha_img = res.data.img
|
||||
} else if (captchaType.value === 'password') {
|
||||
changeFormData.value.captcha_key = res.data.captcha_key
|
||||
changeFormData.value.captcha_img = res.data.img
|
||||
changeFormData.value.captcha_key = res.data.captcha_key
|
||||
changeFormData.value.captcha_img = res.data.img
|
||||
}
|
||||
return true // 表示成功
|
||||
} catch (error) {
|
||||
@ -409,8 +405,8 @@ const getSmsSendFn = () => {
|
||||
if (countdown.value > 0 || sending.value) return; // 正在倒计时或发送中,直接返回
|
||||
if (type.value === 'register') {
|
||||
registerFormRef.value.validateField(['mobile', 'captcha_code'], (valid) => {
|
||||
if (!valid) return;
|
||||
sending.value = true; // 标记为发送中
|
||||
if (!valid) return
|
||||
sending.value = true // 标记为发送中
|
||||
const params = {
|
||||
mobile: registerFormData.value.mobile,
|
||||
captcha_key: registerFormData.value.captcha_key,
|
||||
@ -424,13 +420,12 @@ const getSmsSendFn = () => {
|
||||
sending.value = false;
|
||||
}).finally(() => {
|
||||
sending.value = false; // 无论成功失败都重置发送状态
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
})
|
||||
} else if (type.value === 'password') {
|
||||
changeFormRef.value.validateField(['mobile', 'captcha_code'], (valid) => {
|
||||
if (!valid) return;
|
||||
sending.value = true; // 标记为发送中
|
||||
if (!valid) return
|
||||
sending.value = true // 标记为发送中
|
||||
|
||||
const params = {
|
||||
mobile: changeFormData.value.mobile,
|
||||
@ -456,11 +451,12 @@ const startCountdown = (seconds) => {
|
||||
const timer = setInterval(() => {
|
||||
countdown.value--;
|
||||
if (countdown.value <= 0) {
|
||||
clearInterval(timer);
|
||||
sending.value = false; // 发送状态重置
|
||||
clearInterval(timer);
|
||||
sending.value = false; // 发送状态重置
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
}
|
||||
|
||||
const changeFormRules = computed(() => {
|
||||
return {
|
||||
mobile: [
|
||||
@ -484,12 +480,11 @@ const editPass = async () => {
|
||||
captchaType.value = 'password'
|
||||
const success = await getSmsCaptchaFn()
|
||||
if (success) {
|
||||
loading.value = false
|
||||
type.value = 'password'
|
||||
}else{
|
||||
loading.value = false
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
const reset = async () => {
|
||||
await changeFormRef.value?.validate(async (valid) => {
|
||||
if (valid) {
|
||||
@ -498,25 +493,24 @@ const reset = async () => {
|
||||
code: changeFormData.value.code,
|
||||
mobile: changeFormData.value.mobile
|
||||
}
|
||||
resetPassword(props.info.username,{...params}).then((res) => {
|
||||
resetPassword(props.info.username, { ...params }).then((res) => {
|
||||
let newPassword = res.data.password
|
||||
ElMessageBox.confirm(`新密码为:${newPassword}`, '请保存好新密码', {
|
||||
ElMessageBox.confirm(`新密码为:${ newPassword }`, '请保存好新密码', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
}).then(() => {
|
||||
type.value='login'
|
||||
type.value = 'login'
|
||||
emit('complete')
|
||||
}).catch(() => {
|
||||
type.value='login'
|
||||
type.value = 'login'
|
||||
emit('complete')
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-card class="box-card !border-none p-[10px]" shadow="never" v-loading="loadingPackage">
|
||||
<div class="panel-title">选择套餐</div>
|
||||
<div class="flex flex-wrap mb-[30px]">
|
||||
<div class="flex flex-wrap mb-[30px]">
|
||||
<div v-for="(item,index) in smsPackages" :key="index" :span="4">
|
||||
<div class="package-card mr-[10px] mb-[10px]" :class="{ active: selectedPackage?.id === item.id }" @click="selectPackage(item)">
|
||||
<div class="text-[14px] mb-1 using-hidden">{{ item.package_name }}</div>
|
||||
@ -40,11 +40,12 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isRecharge:{
|
||||
isRecharge: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['back', 'complete'])
|
||||
|
||||
const smsPackages = ref<any[]>([])
|
||||
@ -117,7 +118,7 @@ const goBack = () => {
|
||||
const showRecharge = ref(false);
|
||||
watch(() => props.isRecharge, (newVal) => {
|
||||
showRecharge.value = newVal;
|
||||
if (newVal) {
|
||||
if (newVal) {
|
||||
getSmsPackagesListFn();
|
||||
}
|
||||
});
|
||||
|
||||
@ -111,12 +111,12 @@
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('签名来源')">
|
||||
<el-radio-group v-model="formData.signSource" >
|
||||
<el-radio v-for="item in signCofig.signsourceList" :key="item.type" :label="item.type" >{{item.name}}</el-radio>
|
||||
<el-radio v-for="item in signConfig.signSourceList" :key="item.type" :label="item.type" >{{item.name}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('签名类型')">
|
||||
<el-radio-group v-model="formData.signType">
|
||||
<el-radio v-for="item in signCofig.signTypeList" :key="item.type" :label="item.type" >{{item.name}}</el-radio>
|
||||
<el-radio v-for="item in signConfig.signTypeList" :key="item.type" :label="item.type" >{{item.name}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('上传图片')" prop="imgUrl">
|
||||
@ -169,15 +169,14 @@ const initialFormData = {
|
||||
}
|
||||
const formData = reactive({ ...initialFormData })
|
||||
|
||||
|
||||
const signCofig = reactive({
|
||||
const signConfig = reactive({
|
||||
signTypeList: [],
|
||||
signsourceList:[]
|
||||
signSourceList:[]
|
||||
})
|
||||
const getSmsSignConfigFn = ()=> {
|
||||
getSmsSignConfig().then(res => {
|
||||
signCofig.signTypeList = res.data.sign_type_list
|
||||
signCofig.signsourceList = res.data.sign_source_list
|
||||
signConfig.signTypeList = res.data.sign_type_list
|
||||
signConfig.signSourceList = res.data.sign_source_list
|
||||
formData.signSource = res.data.sign_source_list[0].type
|
||||
formData.signType = res.data.sign_type_list[0].type
|
||||
})
|
||||
@ -192,29 +191,29 @@ const formRules = computed(() => {
|
||||
{ required: true, message: '请输入短信签名', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
const singleBracketValid = /^【[^【】]*】$/.test(value);
|
||||
if (!singleBracketValid) {
|
||||
return callback(new Error('短信签名必须被【】包裹'));
|
||||
}
|
||||
const singleBracketValid = /^【[^【】]*】$/.test(value);
|
||||
if (!singleBracketValid) {
|
||||
return callback(new Error('短信签名必须被【】包裹'));
|
||||
}
|
||||
|
||||
const content = value.slice(1, -1);
|
||||
|
||||
const lengthValid = content.length >= 2 && content.length <= 20;
|
||||
if (!lengthValid) {
|
||||
return callback(new Error('短信签名内容需在 2-20 个字符之间'));
|
||||
}
|
||||
|
||||
const invalidChars = /[\s\-+=*&%#@~;]/;
|
||||
if (invalidChars.test(content)) {
|
||||
return callback(new Error('短信签名不能包含空格或特殊字符 - + = * & % # @ ~ ;'));
|
||||
}
|
||||
|
||||
callback();
|
||||
const content = value.slice(1, -1);
|
||||
|
||||
const lengthValid = content.length >= 2 && content.length <= 20;
|
||||
if (!lengthValid) {
|
||||
return callback(new Error('短信签名内容需在 2-20 个字符之间'));
|
||||
}
|
||||
|
||||
const invalidChars = /[\s\-+=*&%#@~;]/;
|
||||
if (invalidChars.test(content)) {
|
||||
return callback(new Error('短信签名不能包含空格或特殊字符 - + = * & % # @ ~ ;'));
|
||||
}
|
||||
|
||||
callback();
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
principalMobile:[
|
||||
principalMobile: [
|
||||
{ required: true, message: '请输入经办人手机号', trigger: 'blur' },
|
||||
{ validator: phoneVerify, trigger: 'blur' }
|
||||
],
|
||||
@ -320,8 +319,8 @@ const loadSignList = () => {
|
||||
|
||||
const addEvent = () => {
|
||||
Object.assign(formData, initialFormData)
|
||||
formData.signSource = signCofig.signsourceList[0].type
|
||||
formData.signType = signCofig.signTypeList[0].type
|
||||
formData.signSource = signConfig.signSourceList[0].type
|
||||
formData.signType = signConfig.signTypeList[0].type
|
||||
visibleAdd.value = true
|
||||
}
|
||||
|
||||
@ -397,14 +396,13 @@ const batchDeleteEvent = () => {
|
||||
signatures.push(item.sign)
|
||||
})
|
||||
|
||||
deleteSign(props.username,{
|
||||
signatures: signatures
|
||||
deleteSign(props.username, {
|
||||
signatures
|
||||
}).then(() => {
|
||||
tableData.loading = true;
|
||||
setTimeout(() => {
|
||||
loadSignList()
|
||||
},1000)
|
||||
// loadSignList()
|
||||
}, 1000)
|
||||
}).catch(() => {
|
||||
})
|
||||
})
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<el-form-item :label="t('状态')" prop="status">
|
||||
<el-select v-model="tableData.searchParam.status" :placeholder="t('请选择状态')">
|
||||
<el-option :label="t('全部')" :value="''"></el-option>
|
||||
<el-option v-for="(statusText, statusValue) in template_status_list" :key="statusValue" :label="statusText" :value="statusValue"></el-option>
|
||||
<el-option v-for="(statusText, statusValue) in template_status_list" :key="statusValue" :label="statusText" :value="statusValue"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -46,7 +46,6 @@
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" v-if="row.audit_info.audit_status!=2" link @click="reportEvent(row)">{{ row.audit_info.audit_status!=1 && row.audit_info.audit_status!=2? t("报备") : t("修改") }}</el-button>
|
||||
<el-button type="primary" v-if="row.audit_info.audit_status==2" link @click="clearEvent(row)">{{ t('清除报备信息') }}</el-button>
|
||||
|
||||
<el-button type="primary" link @click="editEvent(row)">{{ t("详情") }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -173,20 +172,19 @@ const tableData = reactive({
|
||||
}
|
||||
});
|
||||
const filterData = () => {
|
||||
const { template_id, name, status } = tableData.searchParam;
|
||||
return tableData.allData.filter(item => {
|
||||
const matchId = !template_id || String(item.template_id || '').includes(template_id);
|
||||
const matchName = !name || String(item.name || '').includes(name);
|
||||
const matchStatus = !status || item.audit_info.audit_status == status;
|
||||
return matchId && matchName && matchStatus;
|
||||
});
|
||||
};
|
||||
const { template_id, name, status } = tableData.searchParam;
|
||||
return tableData.allData.filter(item => {
|
||||
const matchId = !template_id || String(item.template_id || '').includes(template_id);
|
||||
const matchName = !name || String(item.name || '').includes(name);
|
||||
const matchStatus = !status || item.audit_info.audit_status == status;
|
||||
return matchId && matchName && matchStatus;
|
||||
});
|
||||
}
|
||||
|
||||
watch(() => [tableData.limit, tableData.page], () => {
|
||||
pagedDataChange()
|
||||
})
|
||||
|
||||
|
||||
// 获取列表
|
||||
const loadSmsTemplateList = () => {
|
||||
tableData.loading = true;
|
||||
@ -290,7 +288,7 @@ const filteredParamTypes = computed(() => {
|
||||
return template_params_type_list.value.filter(item => item.type === 'valid_code')
|
||||
} else {
|
||||
return template_params_type_list.value
|
||||
}
|
||||
}
|
||||
})
|
||||
const isMarketingWithVariable = computed(() => {
|
||||
return reportData.value.template_type === 3 && detail.value.variable && Object.keys(detail.value.variable).length > 0
|
||||
@ -306,11 +304,11 @@ const reportLoading = ref(false)
|
||||
const reportEvent = (row:any) => {
|
||||
reportLoading.value = true
|
||||
let signature = props.signature
|
||||
if(!signature){
|
||||
if (!signature) {
|
||||
ElMessage.error('请先配置签名')
|
||||
return
|
||||
}else{
|
||||
if(row.template_id){
|
||||
} else {
|
||||
if (row.template_id) {
|
||||
visibleReport.value = true;
|
||||
detail.value = row;
|
||||
getreportTemplateInfo('niuyun', props.username, { template_key: row.key }).then((res) => {
|
||||
@ -325,7 +323,7 @@ const reportEvent = (row:any) => {
|
||||
}
|
||||
reportLoading.value = false;
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
visibleReport.value = true
|
||||
reportLoading.value = false
|
||||
detail.value = row
|
||||
@ -333,9 +331,10 @@ const reportEvent = (row:any) => {
|
||||
reportData.value.template_key = detail.value.key
|
||||
reportData.value.params_json = {}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const reportTemplateFn = () => {
|
||||
if (!detail.value.sms) {
|
||||
ElMessage.error('请先配置模版内容')
|
||||
|
||||
@ -108,7 +108,6 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
||||
emit('complete')
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
// showDialog.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@ -68,7 +68,6 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
||||
emit('complete')
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
// showDialog.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@ -107,7 +107,6 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
||||
emit('complete')
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
// showDialog.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@ -15,6 +15,17 @@
|
||||
<el-form-item >
|
||||
<div class="text-lg">{{ memberNo }}</div>
|
||||
</el-form-item>
|
||||
|
||||
<h3 class="panel-title">{{ t('diyForm') }}</h3>
|
||||
<el-form-item :label="t('personalForm')">
|
||||
<el-select v-model="formData.form_id" :placeholder="t('diyFormPlaceholder')" clearable>
|
||||
<el-option v-for="item in diyFormOptions" :key="item.form_id" :label="item.page_title" :value="item.form_id" />
|
||||
</el-select>
|
||||
<div class="ml-[10px]">
|
||||
<span class="cursor-pointer text-primary mr-[10px]" @click="refreshDiyForm(true)">{{ t('refresh') }}</span>
|
||||
<span class="cursor-pointer text-primary" @click="toDiyFormEvent">{{ t('addDiyForm') }}</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
@ -32,7 +43,10 @@ import { t } from '@/lang'
|
||||
import { getMemberConfig, setMemberConfig } from '@/app/api/member'
|
||||
import { FormInstance, FormRules } from 'element-plus'
|
||||
import { filterNumber } from '@/utils/common'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { getDiyFormList } from '@/app/api/diy_form'
|
||||
|
||||
const router = useRouter()
|
||||
const loading = ref(true)
|
||||
const ruleFormRef = ref<FormInstance>({})
|
||||
const memberNo = ref('')
|
||||
@ -68,7 +82,8 @@ const formRules = reactive<FormRules>({
|
||||
|
||||
const formData = reactive<Record<string, number | string>>({
|
||||
prefix: '',
|
||||
length: 10
|
||||
length: 10,
|
||||
form_id: ''
|
||||
})
|
||||
|
||||
const setFormData = async () => {
|
||||
@ -92,6 +107,39 @@ const getMemberNo = async (formEl: FormInstance | undefined) => {
|
||||
})
|
||||
}
|
||||
|
||||
/** ***************** 万能表单-start *************************/
|
||||
// 万能表单列表下拉框
|
||||
const diyFormOptions = reactive([])
|
||||
// 跳转到万能表单列表,添加表单
|
||||
const toDiyFormEvent = () => {
|
||||
const url = router.resolve({
|
||||
path: '/diy_form/list'
|
||||
})
|
||||
window.open(url.href)
|
||||
}
|
||||
|
||||
// 刷新万能表单
|
||||
const refreshDiyForm = (bool = false) => {
|
||||
getDiyFormList({
|
||||
type: 'DIY_FORM_MEMBER_INFO',
|
||||
status: 1
|
||||
}).then((res) => {
|
||||
const data = res.data
|
||||
if (data) {
|
||||
diyFormOptions.splice(0, diyFormOptions.length, ...data)
|
||||
if (bool) {
|
||||
ElMessage({
|
||||
message: t('refreshSuccess'),
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
refreshDiyForm()
|
||||
/** *****************万能表单-end *************************/
|
||||
|
||||
const onSave = async (formEl: FormInstance | undefined) => {
|
||||
if (loading.value || !formEl) return
|
||||
await formEl.validate((valid) => {
|
||||
|
||||
@ -84,7 +84,10 @@ getPointRuleDict().then(({ data }) => {
|
||||
|
||||
const ruleConfigFn = () => {
|
||||
getPointRuleConfig().then(({ data }) => {
|
||||
!Test.empty(data) && (formData.value = data)
|
||||
if (!Test.empty(data)) {
|
||||
Object.assign(formData.value.grant, data.grant || {})
|
||||
Object.assign(formData.value.consume, data.consume || {})
|
||||
}
|
||||
loading.value = false
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
@ -97,7 +100,7 @@ const onSave = async () => {
|
||||
if (await ruleRefs.value[0].verify()) {
|
||||
if (saveLoading.value) return
|
||||
saveLoading.value = true
|
||||
|
||||
|
||||
setPointRuleConfig(formData.value).then(() => {
|
||||
ruleDialog.value = false
|
||||
saveLoading.value = false
|
||||
|
||||
@ -74,13 +74,11 @@ const setSmsTypeRefs = (el, index) => {
|
||||
}
|
||||
|
||||
loadSmsList()
|
||||
const isLogin = ref(false)
|
||||
const editEvent = (data: any, index: number) => {
|
||||
if (data.sms_type == 'niuyun') {
|
||||
getAccountIsLogin().then((res: any) => {
|
||||
router.push('/setting/niusms/setting')
|
||||
})
|
||||
|
||||
} else {
|
||||
smsTypeRefs.value[index].setFormData(data)
|
||||
smsTypeRefs.value[index].showDialog = true
|
||||
|
||||
@ -75,4 +75,4 @@ const checkStatus = async (orderNo: string) => {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@ -23,8 +23,6 @@
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
<el-table :data="tableData.data" size="large" v-loading="tableData.loading" ref="tableRef" @selection-change="handleSelectionChange">
|
||||
|
||||
<template #empty>
|
||||
@ -176,7 +174,6 @@
|
||||
<el-button @click="showDialog=false" type="primary" class="!w-[90px]">完成</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
|
||||
</div>
|
||||
<!-- 失败 -->
|
||||
<div class="mt-[50px]" v-show="active == 'error'">
|
||||
@ -189,9 +186,7 @@
|
||||
<el-button @click="showDialog=false" type="primary" class="!w-[90px]">完成</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
@ -261,8 +256,8 @@ const isPass: any = ref(false)
|
||||
const uploading: any = ref(false)
|
||||
const numberOfSteps = ref(0)
|
||||
const currentId: any = ref(0)
|
||||
let backupContents = []
|
||||
let restoreContents = []
|
||||
let backupContents: any = []
|
||||
let restoreContents: any = []
|
||||
|
||||
const resetForm = (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
|
||||
@ -11,12 +11,8 @@
|
||||
<template #default>
|
||||
<div class="flex items-center">
|
||||
<div>
|
||||
<p>
|
||||
{{ t('cronTipsOne') }}
|
||||
</p>
|
||||
<p class="mt-2">
|
||||
{{ t('cronTipsTwo') }}
|
||||
</p>
|
||||
<p>{{ t('cronTipsOne') }}</p>
|
||||
<p class="mt-2">{{ t('cronTipsTwo') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="loadCronLogList()">{{ t('search') }}</el-button>
|
||||
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button>
|
||||
<el-button @click="clearAll" :loading="clearLoading">{{ t('clearAll') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -42,7 +43,6 @@
|
||||
<div class="mb-[10px] flex items-center">
|
||||
<el-checkbox v-model="toggleCheckbox" size="large" class="px-[14px]" @change="toggleChange" :indeterminate="isIndeterminate" />
|
||||
<el-button @click="batchDelete" size="small" :loading="deleteLoading">{{ t('batchDelete') }}</el-button>
|
||||
<el-button @click="clearAll" size="small" :loading="clearLoading">{{ t('clearAll') }}</el-button>
|
||||
</div>
|
||||
|
||||
<el-table :data="cronTableData.data" size="large" v-loading="cronTableData.loading" ref="cronLogListTableRef" @selection-change="handleSelectionChange">
|
||||
@ -115,7 +115,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref, computed } from 'vue'
|
||||
import { reactive, ref } from 'vue'
|
||||
import { t } from '@/lang'
|
||||
import { ArrowLeft } from "@element-plus/icons-vue"
|
||||
import { getCronLogList, getCronTemplate, deleteCronLog, clearCronLog } from '@/app/api/sys'
|
||||
@ -186,7 +186,7 @@ const clearLoading = ref(false)
|
||||
/**
|
||||
* 表单数据
|
||||
*/
|
||||
const initialFormData = {
|
||||
const initialFormData = {
|
||||
id: '',
|
||||
name: '',
|
||||
key: '',
|
||||
@ -301,7 +301,7 @@ const batchDelete = () => {
|
||||
})
|
||||
|
||||
deleteCronLog({
|
||||
ids: ids
|
||||
ids
|
||||
}).then(() => {
|
||||
loadCronLogList()
|
||||
toggleCheckbox.value = false
|
||||
@ -316,7 +316,6 @@ const batchDelete = () => {
|
||||
|
||||
// 清空日志
|
||||
const clearAll = () => {
|
||||
|
||||
ElMessageBox.confirm(t('clearAllTips'), t('warning'),
|
||||
{
|
||||
confirmButtonText: t('confirm'),
|
||||
@ -328,10 +327,10 @@ const clearAll = () => {
|
||||
repeat.value = true
|
||||
clearLoading.value = true
|
||||
|
||||
const schedule_id = route.query.id ?? ''
|
||||
let schedule_id: any = route.query.id ?? ''
|
||||
|
||||
clearCronLog({
|
||||
schedule_id: schedule_id
|
||||
schedule_id
|
||||
}).then(() => {
|
||||
loadCronLogList()
|
||||
toggleCheckbox.value = false
|
||||
|
||||
@ -22,7 +22,8 @@ import { ref } from 'vue'
|
||||
import { t } from '@/lang'
|
||||
import { clearCache } from '@/app/api/sys'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const loading = ref<Boolean>(false)
|
||||
const route = useRoute()
|
||||
const pageName = route.meta.title
|
||||
|
||||
@ -72,7 +72,6 @@ import { t } from '@/lang'
|
||||
import {ElMessage, ElMessageBox, FormInstance} from 'element-plus'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { getUpgradeRecords, delUpgradeRecords } from '@/app/api/upgrade'
|
||||
import 'vue-web-terminal/lib/theme/dark.css'
|
||||
|
||||
const route = useRoute()
|
||||
const pageName = route.meta.title
|
||||
@ -146,7 +145,7 @@ const deleteEvent = (ids: any) => {
|
||||
}
|
||||
).then(() => {
|
||||
delUpgradeRecords({
|
||||
ids: ids
|
||||
ids
|
||||
}).then(() => {
|
||||
loadList()
|
||||
}).catch(() => {
|
||||
|
||||
@ -92,11 +92,11 @@ const handleEditorReady = (editor) => {
|
||||
// 方案二:原型链扩展(如果编辑器版本支持)
|
||||
const originalCount = editor.getContentLength; // 原生统计方法
|
||||
|
||||
// 覆盖方法:去除空格后统计
|
||||
editor.getContentLength = function () {
|
||||
const rawContent = editor.getContent();
|
||||
return rawContent.replace(/[\s\u3000]+/g, '').length;
|
||||
};
|
||||
// 覆盖方法:去除空格后统计
|
||||
editor.getContentLength = function () {
|
||||
const rawContent = editor.getContent();
|
||||
return rawContent.replace(/[\s\u3000]+/g, '').length;
|
||||
};
|
||||
}
|
||||
|
||||
const imageSelect = (data: Record<string, any>) => {
|
||||
|
||||
@ -80,7 +80,6 @@ const value: any = computed({
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* 公式:
|
||||
* 宽度:400
|
||||
|
||||
@ -455,17 +455,16 @@ const upload = computed(() => {
|
||||
getAttachmentList()
|
||||
uploadRef.value?.handleRemove(uploadFile)
|
||||
} else {
|
||||
if(time.value==null) {
|
||||
if (time.value == null) {
|
||||
time.value = setTimeout(() => {
|
||||
uploadFile.status = 'fail'
|
||||
showElMessage({ message: response.msg, type: 'error' })
|
||||
clearTimeout(time.value)
|
||||
time.value=null
|
||||
},500)
|
||||
|
||||
}else{
|
||||
time.value = null
|
||||
}, 500)
|
||||
} else {
|
||||
clearTimeout(time.value)
|
||||
time.value=null
|
||||
time.value = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,19 +47,17 @@ const emit = defineEmits(['confirm'])
|
||||
*/
|
||||
const confirm = () => {
|
||||
showDialog.value = false
|
||||
|
||||
let filesObj = attachmentRef?.value.selectedFile || {};
|
||||
let filesIndexObj = attachmentRef?.value.selectedFileIndex || {};
|
||||
// 整理图片顺序
|
||||
let arr = [];
|
||||
Object.values(filesIndexObj).forEach((item,index)=>{
|
||||
for(let key in filesObj){
|
||||
if(item == key){
|
||||
Object.values(filesIndexObj).forEach((item, index) => {
|
||||
for (let key in filesObj) {
|
||||
if (item == key) {
|
||||
arr.push(deepClone(filesObj[key]))
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
emit('confirm', prop.limit == 1 ? arr[0] ?? null : arr)
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ const prop = defineProps({
|
||||
type: String,
|
||||
default: 'image'
|
||||
},
|
||||
imageFit : {
|
||||
imageFit: {
|
||||
type: String,
|
||||
default: 'contain'
|
||||
},
|
||||
@ -106,9 +106,9 @@ const setValue = () => {
|
||||
}
|
||||
|
||||
watch(() => value.value, () => {
|
||||
if(value.value.indexOf('data:image') != -1){
|
||||
if (value.value.indexOf('data:image') != -1) {
|
||||
images.data = [value.value]
|
||||
}else {
|
||||
} else {
|
||||
images.data = [
|
||||
...value.value.split(',').filter((item: string) => {
|
||||
return item
|
||||
@ -141,7 +141,7 @@ const confirmSelect = (data: Record<string, any>) => {
|
||||
})
|
||||
}
|
||||
setValue()
|
||||
|
||||
|
||||
nextTick(() => {
|
||||
emit('change', value.value)
|
||||
})
|
||||
@ -172,14 +172,12 @@ const previewImage = (index: number = 0) => {
|
||||
* 拖拽
|
||||
*/
|
||||
const imgListRef:any = ref(null)
|
||||
onMounted(()=>{
|
||||
onMounted(()=> {
|
||||
nextTick(() => {
|
||||
rowDrop()
|
||||
})
|
||||
})
|
||||
|
||||
const activeRows = ref<any[]>([])
|
||||
|
||||
// 拖拽排序
|
||||
const rowDrop = () => {
|
||||
if (prop.limit == 1) return;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
import request from "./../utils/axios" //组件内部封装的axios
|
||||
// import request from "@/app/api/axios.js" //调用项目封装的axios
|
||||
|
||||
//获取验证图片 以及token
|
||||
// 获取验证图片 以及token
|
||||
export function reqGet(data) {
|
||||
return request.get('/captcha/create', { params: { ...data } });
|
||||
|
||||
@ -16,7 +16,7 @@ export function reqGet(data) {
|
||||
// })
|
||||
}
|
||||
|
||||
//滑动或者点选验证
|
||||
// 滑动或者点选验证
|
||||
export function reqCheck(data) {
|
||||
return request.get('/captcha/check', { params: { ...data } });
|
||||
|
||||
@ -26,5 +26,3 @@ export function reqCheck(data) {
|
||||
// data
|
||||
// })
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<span class="ml-[10px]">{{ meta.title }}</span>
|
||||
</template>
|
||||
<menu-item v-for="(route, index) in routes.children" :routes="route" :key="index" :level="props.level + 1" />
|
||||
<template v-if="routes.name == 'addon_list'">
|
||||
<template v-if="routes.name == 'addon_list' || routes.name == 'marketing_list'">
|
||||
<template v-if="addonsMenus">
|
||||
<menu-item :routes="addonsMenus" :key="index" :level="props.level + 1"/>
|
||||
</template>
|
||||
@ -43,6 +43,7 @@ import { ref, computed, watch } from 'vue'
|
||||
import menuItem from './menu-item.vue'
|
||||
import useSystemStore from '@/stores/modules/system'
|
||||
import useUserStore from '@/stores/modules/user'
|
||||
import storage from '@/utils/storage'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
@ -85,14 +86,25 @@ routers.forEach(item => {
|
||||
const addonsMenus = ref(null)
|
||||
|
||||
watch(route, () => {
|
||||
if (props.routes.name != 'addon_list') return
|
||||
if (props.routes.name == 'addon_list') {
|
||||
if (systemAddonKeys.value.includes(route.meta.addon) && addonRouters[route.meta.addon]) {
|
||||
addonsMenus.value = addonRouters[route.meta.addon]
|
||||
} else if (route.meta.attr && addonRouters[route.meta.attr]) {
|
||||
addonsMenus.value = addonRouters[route.meta.attr]
|
||||
} else {
|
||||
addonsMenus.value = null
|
||||
}
|
||||
}
|
||||
|
||||
if (systemAddonKeys.value.includes(route.meta.addon) && addonRouters[route.meta.addon]) {
|
||||
addonsMenus.value = addonRouters[route.meta.addon]
|
||||
} else if (route.meta.attr && addonRouters[route.meta.attr]) {
|
||||
addonsMenus.value = addonRouters[route.meta.attr]
|
||||
} else {
|
||||
addonsMenus.value = null
|
||||
const marketingKeys = storage.get('defaultMarketingKeys')
|
||||
const matchedName = route.matched[1]?.name
|
||||
if (props.routes.name == 'marketing_list') {
|
||||
if (marketingKeys && marketingKeys.includes(matchedName)) {
|
||||
addonsMenus.value = route.matched[1] ?? []
|
||||
addonsMenus.value.meta.show = 1
|
||||
} else {
|
||||
addonsMenus.value = null
|
||||
}
|
||||
}
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import useSystemStore from '@/stores/modules/system'
|
||||
import useUserStore from '@/stores/modules/user'
|
||||
@ -31,6 +31,8 @@ import menuItem from './menu-item.vue'
|
||||
import { img } from '@/utils/common'
|
||||
import { findFirstValidRoute } from '@/router/routers'
|
||||
import { getWebConfig } from "@/app/api/sys"
|
||||
import { getShowMarketing } from '@/app/api/addon'
|
||||
import storage from '@/utils/storage'
|
||||
|
||||
const systemStore = useSystemStore()
|
||||
const userStore = useUserStore()
|
||||
@ -41,20 +43,35 @@ const addonIndexRoute = userStore.addonIndexRoute
|
||||
const menuData = ref<Record<string, any>[]>([])
|
||||
const addonRouters: Record<string, any> = {}
|
||||
|
||||
getWebConfig().then(({ data }) => {
|
||||
webSite.value = data
|
||||
const getMarketingList = async () => {
|
||||
const res = await getShowMarketing()
|
||||
const marketingList = res.data
|
||||
const marketingKeys = marketingList?.marketing?.list?.map(item => item.key) ?? []
|
||||
// menuData.value.forEach((item, index, arr) => {
|
||||
// if (marketingKeys.includes(item.name)) {
|
||||
// arr.splice(index, 1)
|
||||
// }
|
||||
// })
|
||||
storage.set({ key: 'defaultMarketingKeys', data: marketingKeys })
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getWebConfig().then(({ data }) => {
|
||||
webSite.value = data
|
||||
});
|
||||
getMarketingList()
|
||||
})
|
||||
|
||||
routers.forEach(item => {
|
||||
item.original_name = item.name
|
||||
if (item.meta.addon == '') {
|
||||
if (item.meta.attr == '') {
|
||||
if (item.meta.attr == '' && item.name != 'sign' && item.name != 'verify') {
|
||||
if (item.children && item.children.length) {
|
||||
item.name = findFirstValidRoute(item.children)
|
||||
}
|
||||
menuData.value.push(item)
|
||||
}
|
||||
} else if (item.meta.addon != '' && systemStore?.apps.length == 1 && systemStore?.apps[0].key == item.meta.addon) {
|
||||
} else if (item.meta.addon != '' && systemStore?.apps.length == 1 && systemStore?.apps[0].key == item.meta.addon && item.meta.show) {
|
||||
if (item.children) {
|
||||
item.children.forEach((citem: Record<string, any>) => {
|
||||
citem.original_name = citem.name
|
||||
@ -69,6 +86,19 @@ routers.forEach(item => {
|
||||
} else {
|
||||
addonRouters[item.meta.addon] = item
|
||||
}
|
||||
|
||||
// 排序, 功能正确,改了排序后需要把菜单排序的默认值重新调整一下【多应用一级菜单,单应用二级菜单】
|
||||
// menuData.value.sort((a, b) => {
|
||||
// if (a.meta.sort && b.meta.sort) {
|
||||
// return b.meta.sort - a.meta.sort
|
||||
// } else if (a.meta.sort) {
|
||||
// return -1
|
||||
// } else if (b.meta.sort) {
|
||||
// return 1
|
||||
// } else {
|
||||
// return 0
|
||||
// }
|
||||
// })
|
||||
})
|
||||
|
||||
// 多应用时将应用插入菜单
|
||||
@ -81,6 +111,19 @@ if (systemStore?.apps.length > 1) {
|
||||
}
|
||||
})
|
||||
menuData.value.unshift(...routers)
|
||||
|
||||
// 排序, 功能正确,改了排序后需要把菜单排序的默认值重新调整一下【多应用一级菜单,单应用二级菜单】
|
||||
// menuData.value.sort((a, b) => {
|
||||
// if (a.meta.sort && b.meta.sort) {
|
||||
// return b.meta.sort - a.meta.sort
|
||||
// } else if (a.meta.sort) {
|
||||
// return -1
|
||||
// } else if (b.meta.sort) {
|
||||
// return 1
|
||||
// } else {
|
||||
// return 0
|
||||
// }
|
||||
// })
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -38,21 +38,20 @@
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<el-dialog v-model="changePasswordDialog" width="450px" title="修改密码">
|
||||
<div>
|
||||
<el-form :model="saveInfo" label-width="90px" ref="formRef" :rules="formRules" class="page-form">
|
||||
<el-form-item :label="t('originalPassword')" prop="original_password">
|
||||
<el-input v-model="saveInfo.original_password" type="password" :placeholder="t('originalPasswordPlaceholder')" clearable class="input-width" />
|
||||
<el-input v-model="saveInfo.original_password" type="password" :placeholder="t('originalPasswordPlaceholder')" clearable class="input-width" maxlength="40" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('newPassword')" prop="password">
|
||||
<el-input v-model="saveInfo.password" type="password" :placeholder="t('passwordPlaceholder')" clearable class="input-width" />
|
||||
<el-input v-model="saveInfo.password" type="password" :placeholder="t('passwordPlaceholder')" clearable class="input-width" maxlength="40" />
|
||||
<div class="form-tip">{{t('passwordTip')}}</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('passwordCopy')" prop="password_copy">
|
||||
<el-input v-model="saveInfo.password_copy" type="password" :placeholder="t('passwordPlaceholder')" clearable class="input-width" />
|
||||
<el-input v-model="saveInfo.password_copy" type="password" :placeholder="t('passwordPlaceholder')" clearable class="input-width" maxlength="40" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
@ -47,10 +47,11 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch } from 'vue'
|
||||
import { ref, watch, computed, onMounted, watchEffect } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import useSystemStore from '@/stores/modules/system'
|
||||
import useUserStore from '@/stores/modules/user'
|
||||
import { getShowApp,getShowMarketing } from '@/app/api/addon'
|
||||
import menuItem from './menu-item.vue'
|
||||
import { img, isUrl } from '@/utils/common'
|
||||
import { findFirstValidRoute } from '@/router/routers'
|
||||
@ -105,35 +106,92 @@ if (systemStore?.apps.length > 1) {
|
||||
oneMenuData.value.unshift(...routers)
|
||||
}
|
||||
|
||||
const appList = ref(null);
|
||||
const marketingList = ref(null);
|
||||
const oneMenuActive = ref(route.matched[1].name)
|
||||
|
||||
watch(route, () => {
|
||||
if (route.meta.attr != '') {
|
||||
if (route.matched[2]) oneMenuActive.value = route.matched[2].name
|
||||
twoMenuData.value = route.matched[1].children ?? []
|
||||
const getAppList = async () => {
|
||||
const res = await getShowApp();
|
||||
appList.value = res.data;
|
||||
// loading.value = false;
|
||||
};
|
||||
const getMarketingList = async () => {
|
||||
const res = await getShowMarketing();
|
||||
marketingList.value = res.data
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await getAppList() // 确保数据先加载
|
||||
await getMarketingList()
|
||||
})
|
||||
|
||||
watchEffect(() => {
|
||||
// if (!appList.value || loading.value) return; // 确保数据加载完毕
|
||||
const addonKeys = appList.value?.addon?.list?.map(item => item.key) ?? [];
|
||||
const toolKeys = appList.value?.tool?.list?.map(item => item.key) ?? [];
|
||||
const allKeys = [...addonKeys, ...toolKeys];
|
||||
const marketingKeys = marketingList.value?.marketing?.list?.map(item => item.key) ?? [];
|
||||
const matchedName = route.matched[1]?.name;
|
||||
if (allKeys.includes(matchedName)) {
|
||||
oneMenuActive.value = "addon";
|
||||
twoMenuData.value = route.matched[1]?.children ?? [];
|
||||
} else if (marketingKeys.includes(matchedName)) {
|
||||
oneMenuActive.value = "active";
|
||||
twoMenuData.value = route.matched[1]?.children ?? [];
|
||||
} else if (route.meta.attr !== "") {
|
||||
oneMenuActive.value = route.matched[2]?.name;
|
||||
twoMenuData.value = route.matched[1]?.children ?? [];
|
||||
} else {
|
||||
// 多应用
|
||||
if (systemStore?.apps.length > 1) {
|
||||
twoMenuData.value = route.matched[1].children
|
||||
oneMenuActive.value = route.matched[1].name
|
||||
twoMenuData.value = route.matched[1]?.children;
|
||||
oneMenuActive.value = route.matched[1]?.name;
|
||||
} else {
|
||||
// 单应用
|
||||
const oneMenu = route.matched[1]
|
||||
if (oneMenu.meta.addon == '') {
|
||||
oneMenuActive.value = route.matched[1].name
|
||||
twoMenuData.value = route.matched[1].children ?? []
|
||||
const oneMenu = route.matched[1];
|
||||
if (oneMenu.meta.addon === "") {
|
||||
oneMenuActive.value = route.matched[1]?.name;
|
||||
twoMenuData.value = route.matched[1]?.children ?? [];
|
||||
} else {
|
||||
if (oneMenu.meta.addon == systemStore?.apps[0].key) {
|
||||
oneMenuActive.value = route.matched[2].name
|
||||
twoMenuData.value = route.matched[2].children ?? []
|
||||
if (oneMenu.meta.addon === systemStore?.apps[0]?.key) {
|
||||
oneMenuActive.value = route.matched[2]?.name;
|
||||
twoMenuData.value = route.matched[2]?.children ?? [];
|
||||
} else {
|
||||
oneMenuActive.value = route.matched[1].name
|
||||
twoMenuData.value = route.matched[1].children ?? []
|
||||
oneMenuActive.value = route.matched[1]?.name;
|
||||
twoMenuData.value = route.matched[1]?.children ?? [];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, { immediate: true })
|
||||
})
|
||||
|
||||
// watch(route, () => {
|
||||
// if (route.meta.attr != '') {
|
||||
// if (route.matched[2]) oneMenuActive.value = route.matched[2].name
|
||||
// twoMenuData.value = route.matched[1].children ?? []
|
||||
// } else {
|
||||
// // 多应用
|
||||
// if (systemStore?.apps.length > 1) {
|
||||
// twoMenuData.value = route.matched[1].children
|
||||
// oneMenuActive.value = route.matched[1].name
|
||||
// } else {
|
||||
// // 单应用
|
||||
// const oneMenu = route.matched[1]
|
||||
// if (oneMenu.meta.addon == '') {
|
||||
// oneMenuActive.value = route.matched[1].name
|
||||
// twoMenuData.value = route.matched[1].children ?? []
|
||||
// } else {
|
||||
// if (oneMenu.meta.addon == systemStore?.apps[0].key) {
|
||||
// oneMenuActive.value = route.matched[2].name
|
||||
// twoMenuData.value = route.matched[2].children ?? []
|
||||
// } else {
|
||||
// oneMenuActive.value = route.matched[1].name
|
||||
// twoMenuData.value = route.matched[1].children ?? []
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }, { immediate: true })
|
||||
|
||||
// 让二级菜单默认展开
|
||||
const menuOption = ref([])
|
||||
|
||||
@ -79,7 +79,7 @@ const useDiyStore = defineStore('diy', {
|
||||
imgUrl: "",
|
||||
imgWidth: '',
|
||||
imgHeight: '',
|
||||
count: -1,
|
||||
count: 'once', // 'once'(仅一次) | 'always'(每次)
|
||||
show: 0,
|
||||
link: {
|
||||
name: ""
|
||||
@ -168,7 +168,7 @@ const useDiyStore = defineStore('diy', {
|
||||
imgUrl: "",
|
||||
imgWidth: '',
|
||||
imgHeight: '',
|
||||
count: -1,
|
||||
count: 'once', // 'once'(仅一次) | 'always'(每次)
|
||||
show: 0,
|
||||
link: {
|
||||
name: ""
|
||||
@ -510,6 +510,14 @@ const useDiyStore = defineStore('diy', {
|
||||
// this.changeCurrentIndex(-99);
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if (this.global.popWindow.show && !this.global.popWindow.imgUrl) {
|
||||
ElMessage({
|
||||
message: '请上传弹窗图片',
|
||||
type: 'warning'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var i = 0; i < this.value.length; i++) {
|
||||
try {
|
||||
|
||||
@ -247,7 +247,6 @@ export function moneyFormat(money: string): string {
|
||||
return isNaN(parseFloat(money)) ? money : parseFloat(money).toFixed(2)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 时间戳转日期格式
|
||||
*/
|
||||
@ -338,50 +337,6 @@ export function filterSpecial(event: any) {
|
||||
export function filterBlank(event: any) {
|
||||
event.target.value = event.target.value.replace(/\s/g, '');
|
||||
}
|
||||
export function importIconFontCss() {
|
||||
// const modulesFiles = {}; // import.meta.glob('@/styles/icon/official-iconfont.css', { eager: true })
|
||||
// const modulesFiles = import.meta.glob('@/addon/**/assets/icon/*.css', { eager: true })
|
||||
// // console.log('modulesFiles',modulesFiles)
|
||||
//
|
||||
// const modules:any = {}
|
||||
// for (const [key, value] of Object.entries(modulesFiles)) {
|
||||
// const moduleName:any = key.split('/').pop()
|
||||
// const name = moduleName.split('.')[0]
|
||||
// modules[name] = value.default
|
||||
// }
|
||||
//
|
||||
// // console.log('modules',modules)
|
||||
//
|
||||
// for(let key in modules) {
|
||||
// // console.log('modules[key]',modules[key])
|
||||
// import(modules[key]).then((module) => {
|
||||
// // console.log('module', module.default);
|
||||
// }).catch((e) => {
|
||||
// // console.log('caca', e)
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
export function getIcon() {
|
||||
// const modulesFiles = import.meta.glob('@/styles/icon/*.json', { eager: true })
|
||||
// const addonModulesFiles = import.meta.glob('@/addon/**/assets/icon/*.json', { eager: true })
|
||||
// addonModulesFiles && Object.assign(modulesFiles, addonModulesFiles)
|
||||
//
|
||||
// // const modulesFiles = {}; // import.meta.glob('@/styles/icon/official-iconfont.css', { eager: true })
|
||||
// // const modulesFiles = import.meta.glob('@/styles/icon/*.json', { eager: true })
|
||||
// console.log('modulesFiles', modulesFiles)
|
||||
//
|
||||
// const modules = {}
|
||||
// for (const [key, value] of Object.entries(modulesFiles)) {
|
||||
// const moduleName = key.split('/').pop()
|
||||
// console.log('moduleName',moduleName)
|
||||
// const name = moduleName.split('.')[0]
|
||||
// modules[name] = value.default
|
||||
// }
|
||||
// console.log('modules', modules)
|
||||
// // const addonModulesFiles = import.meta.glob('@/addon/**/assets/icon/*.json', { eager: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置表格分页数据的本地存储
|
||||
* @param page
|
||||
|
||||
@ -18,15 +18,28 @@ use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
|
||||
/**
|
||||
* 插件管理
|
||||
* Class Addon
|
||||
* @description 插件管理
|
||||
* @package app\adminapi\controller\addon
|
||||
*/
|
||||
class Addon extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* 插件初始化
|
||||
* @description 插件初始化
|
||||
* @return Response
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
return success((new CoreAddonService())->getInitList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取已下载插架
|
||||
* @description 获取已下载插架
|
||||
*/
|
||||
public function getLocalAddonList()
|
||||
{
|
||||
@ -35,6 +48,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 安装插件
|
||||
* @description 安装插件
|
||||
* @param string $addon
|
||||
*/
|
||||
public function install($addon)
|
||||
@ -44,6 +58,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 云安装插件
|
||||
* @description 云安装插件
|
||||
* @param $addon
|
||||
* @return Response
|
||||
*/
|
||||
@ -54,6 +69,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取安装任务
|
||||
* @description 获取安装任务
|
||||
* @return Response
|
||||
*/
|
||||
public function getInstallTask() {
|
||||
@ -62,6 +78,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取云安装日志
|
||||
* @description 获取云安装日志
|
||||
* @param $addon
|
||||
* @return mixed
|
||||
*/
|
||||
@ -71,6 +88,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 插件安装环境检测
|
||||
* @description 插件安装环境检测
|
||||
* @param $addon
|
||||
* @return Response
|
||||
*/
|
||||
@ -81,6 +99,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 取消安装
|
||||
* @description 取消安装
|
||||
* @param $addon
|
||||
* @return mixed
|
||||
*/
|
||||
@ -91,6 +110,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 卸载插件
|
||||
* @description 卸载插件
|
||||
* @param string $addon
|
||||
*/
|
||||
public function uninstall($addon)
|
||||
@ -101,6 +121,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 插件安装环境检测
|
||||
* @description 插件安装环境检测
|
||||
* @param $addon
|
||||
* @return Response
|
||||
*/
|
||||
@ -111,6 +132,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 插件列表
|
||||
* @description 插件列表
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
@ -123,6 +145,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 插件详情
|
||||
* @description 插件详情
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -133,6 +156,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 设置插件状态
|
||||
* @description 设置插件状态
|
||||
* @param int $id
|
||||
* @param int $status
|
||||
* @return Response
|
||||
@ -145,7 +169,8 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 下载插件
|
||||
* @param $app_key
|
||||
* @description 下载插件
|
||||
* @param $addon
|
||||
* @return Response
|
||||
*/
|
||||
public function download($addon){
|
||||
@ -158,6 +183,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 查询已安装插件
|
||||
* @description 查询已安装插件
|
||||
* @return Response
|
||||
*/
|
||||
public function getInstallList(){
|
||||
@ -166,6 +192,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 查询已安装有效应用
|
||||
* @description 查询已安装有效应用
|
||||
*/
|
||||
public function getAddonList()
|
||||
{
|
||||
@ -174,6 +201,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 插件类型
|
||||
* @description 插件类型
|
||||
* @return Response
|
||||
*/
|
||||
public function getType(){
|
||||
@ -182,7 +210,8 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 更新插件
|
||||
* @param $app_key
|
||||
* @description 更新插件
|
||||
* @param $addon
|
||||
* @return Response
|
||||
*/
|
||||
public function upgrade($addon = ''){
|
||||
@ -194,8 +223,14 @@ class Addon extends BaseAdminController
|
||||
return success(data:(new AddonService())->getShowAppTools());
|
||||
}
|
||||
|
||||
public function showMarketing()
|
||||
{
|
||||
return success(( new AddonService() )->getShowMarketingTools());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取首页应用标签
|
||||
* @description 获取首页应用标签
|
||||
*/
|
||||
public function getIndexAddonLabelList()
|
||||
{
|
||||
@ -204,6 +239,7 @@ class Addon extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取首页应用
|
||||
* @description 获取首页应用
|
||||
* @return Response
|
||||
*/
|
||||
public function getIndexAddonList()
|
||||
|
||||
@ -16,11 +16,18 @@ use app\service\admin\addon\AddonDevelopService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 开发插件
|
||||
* Class AddonDevelop
|
||||
* @description 开发插件
|
||||
* @package app\adminapi\controller\addon
|
||||
*/
|
||||
class AddonDevelop extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* 开发插件列表
|
||||
* @description 开发插件列表
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
@ -30,6 +37,12 @@ class AddonDevelop extends BaseAdminController
|
||||
return success(( new AddonDevelopService() )->getList($data[ 'search' ]));
|
||||
}
|
||||
|
||||
/**
|
||||
* 开发插件详情
|
||||
* @description 开发插件详情
|
||||
* @param $key
|
||||
* @return Response
|
||||
*/
|
||||
public function info($key)
|
||||
{
|
||||
return success(( new AddonDevelopService() )->getInfo($key));
|
||||
@ -37,6 +50,7 @@ class AddonDevelop extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 开发插件新增
|
||||
* @description 开发插件新增
|
||||
* @return Response
|
||||
*/
|
||||
public function add(string $key)
|
||||
@ -60,6 +74,7 @@ class AddonDevelop extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 开发插件更新
|
||||
* @description 开发插件更新
|
||||
* @param string $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -85,6 +100,7 @@ class AddonDevelop extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 删除开发插件
|
||||
* @description 删除开发插件
|
||||
* @param $key
|
||||
* @return Response
|
||||
*/
|
||||
@ -95,7 +111,8 @@ class AddonDevelop extends BaseAdminController
|
||||
}
|
||||
|
||||
/**
|
||||
*校验key是否被占用
|
||||
* 校验key是否被占用
|
||||
* @description 校验key是否被占用
|
||||
* @param $key
|
||||
* @return void
|
||||
*/
|
||||
@ -106,6 +123,7 @@ class AddonDevelop extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 打包
|
||||
* @description 打包
|
||||
* @param $key
|
||||
* @return Response
|
||||
*/
|
||||
@ -117,6 +135,7 @@ class AddonDevelop extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 下载
|
||||
* @description 下载
|
||||
* @param $key
|
||||
* @return Response
|
||||
*/
|
||||
@ -127,7 +146,8 @@ class AddonDevelop extends BaseAdminController
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 插件key黑名单
|
||||
* @description 插件key黑名单
|
||||
* @return Response
|
||||
*/
|
||||
public function keyBlackList()
|
||||
|
||||
@ -15,11 +15,18 @@ use app\service\admin\upgrade\BackupRecordsService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 备份管理
|
||||
* Class Backup
|
||||
* @description 备份管理
|
||||
* @package app\adminapi\controller\addon
|
||||
*/
|
||||
class Backup extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* 获取升级记录分页列表
|
||||
* @description 获取升级记录分页列表
|
||||
* @return Response
|
||||
*/
|
||||
public function getRecords()
|
||||
@ -32,6 +39,7 @@ class Backup extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 修改备注
|
||||
* @description 修改备注
|
||||
* @return Response
|
||||
*/
|
||||
public function modifyRemark()
|
||||
@ -46,6 +54,7 @@ class Backup extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 恢复前检测文件是否存在
|
||||
* @description 恢复前检测文件是否存在
|
||||
* @return Response
|
||||
*/
|
||||
public function checkDirExist()
|
||||
@ -58,6 +67,7 @@ class Backup extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 检测目录权限
|
||||
* @description 检测目录权限
|
||||
* @return Response
|
||||
*/
|
||||
public function checkPermission()
|
||||
@ -67,6 +77,7 @@ class Backup extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 恢复备份
|
||||
* @description 恢复备份
|
||||
* @return Response
|
||||
*/
|
||||
public function restoreBackup()
|
||||
@ -81,6 +92,7 @@ class Backup extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 删除升级记录
|
||||
* @description 删除升级记录
|
||||
* @return Response
|
||||
*/
|
||||
public function deleteRecords()
|
||||
@ -94,6 +106,7 @@ class Backup extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 手动备份
|
||||
* @description 手动备份
|
||||
* @return Response
|
||||
*/
|
||||
public function manualBackup()
|
||||
@ -107,6 +120,7 @@ class Backup extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取正在进行的恢复任务
|
||||
* @description 获取正在进行的恢复任务
|
||||
* @return Response
|
||||
*/
|
||||
public function getRestoreTask()
|
||||
@ -116,6 +130,7 @@ class Backup extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取正在进行的备份任务
|
||||
* @description 获取正在进行的备份任务
|
||||
* @return Response
|
||||
*/
|
||||
public function getBackupTask()
|
||||
|
||||
@ -16,11 +16,18 @@ use app\service\admin\upgrade\UpgradeService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 升级管理
|
||||
* Class Upgrade
|
||||
* @description 升级管理
|
||||
* @package app\adminapi\controller\addon
|
||||
*/
|
||||
class Upgrade extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 更新插件
|
||||
* @param $app_key
|
||||
* @description 更新插件
|
||||
* @param $addon
|
||||
* @return Response
|
||||
*/
|
||||
public function upgrade($addon = '')
|
||||
@ -34,7 +41,7 @@ class Upgrade extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 执行升级
|
||||
* @param $app_key
|
||||
* @description 执行升级
|
||||
* @return Response
|
||||
*/
|
||||
public function execute()
|
||||
@ -44,6 +51,7 @@ class Upgrade extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取升级内容
|
||||
* @description 获取升级内容
|
||||
* @param $addon
|
||||
* @return Response
|
||||
*/
|
||||
@ -54,6 +62,7 @@ class Upgrade extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取正在进行的升级任务
|
||||
* @description 获取正在进行的升级任务
|
||||
* @return Response
|
||||
*/
|
||||
public function getUpgradeTask()
|
||||
@ -63,6 +72,7 @@ class Upgrade extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 升级前环境检测
|
||||
* @description 升级前环境检测
|
||||
* @param $addon
|
||||
* @return Response
|
||||
*/
|
||||
@ -73,6 +83,7 @@ class Upgrade extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 清除
|
||||
* @description 清除升级任务
|
||||
* @return Response
|
||||
*/
|
||||
public function clearUpgradeTask()
|
||||
@ -80,12 +91,19 @@ class Upgrade extends BaseAdminController
|
||||
return success(data: ( new UpgradeService() )->clearUpgradeTask(0, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作
|
||||
* @description 操作
|
||||
* @param $operate
|
||||
* @return Response
|
||||
*/
|
||||
public function operate($operate) {
|
||||
return success(( new UpgradeService() )->operate($operate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取升级记录分页列表
|
||||
* @description 获取升级记录分页列表
|
||||
* @return Response
|
||||
*/
|
||||
public function getRecords()
|
||||
@ -96,6 +114,11 @@ class Upgrade extends BaseAdminController
|
||||
return success(( new UpgradeRecordsService() )->getPage($data));
|
||||
}
|
||||
|
||||
/**
|
||||
* 刪除升级记录
|
||||
* @description 刪除升级记录
|
||||
* @return Response
|
||||
*/
|
||||
public function delRecords() {
|
||||
$data = $this->request->params([
|
||||
[ 'ids', '' ],
|
||||
|
||||
@ -15,10 +15,17 @@ use app\service\admin\aliapp\AliappConfigService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 支付宝配置
|
||||
* Class Config
|
||||
* @description 支付宝配置
|
||||
* @package app\adminapi\controller\aliapp
|
||||
*/
|
||||
class Config extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 获取支付宝配置信息
|
||||
* @description 获取支付宝配置信息
|
||||
* @return Response
|
||||
*/
|
||||
public function get()
|
||||
@ -28,6 +35,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 设置支付宝配置信息
|
||||
* @description 设置支付宝配置信息
|
||||
* @return Response
|
||||
*/
|
||||
public function set()
|
||||
@ -49,6 +57,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 静态资源
|
||||
* @description 静态资源
|
||||
* @return Response
|
||||
*/
|
||||
public function static()
|
||||
|
||||
@ -17,23 +17,25 @@ use think\Response;
|
||||
|
||||
/**
|
||||
* 站点小程序版本升级下载控制器
|
||||
* @description 站点小程序版本升级下载
|
||||
*/
|
||||
class SiteVersion extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 列表
|
||||
* @description 列表
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
|
||||
]);
|
||||
return success((new AppletVersionSiteService())->getPage($data));
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @description 详情
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -44,6 +46,7 @@ class SiteVersion extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 查询最后一个下载或升级的版本
|
||||
* @description 查询最后一个下载或升级的版本
|
||||
* @param string $type
|
||||
* @return Response
|
||||
*/
|
||||
@ -54,6 +57,7 @@ class SiteVersion extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 查看可升级的最高版本
|
||||
* @description 查看可升级的最高版本
|
||||
* @param string $type
|
||||
* @return Response
|
||||
*/
|
||||
|
||||
@ -18,11 +18,13 @@ use think\Response;
|
||||
|
||||
/**
|
||||
* 小程序版本管理控制器
|
||||
* @description 小程序版本管理
|
||||
*/
|
||||
class Version extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 列表
|
||||
* @description 列表
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
@ -35,6 +37,7 @@ class Version extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @description 详情
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -45,6 +48,7 @@ class Version extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @description 添加
|
||||
* @return Response
|
||||
*/
|
||||
public function add()
|
||||
@ -62,6 +66,7 @@ class Version extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @description 编辑
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -80,6 +85,7 @@ class Version extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @description 删除
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -91,6 +97,7 @@ class Version extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 设置状态
|
||||
* @description 设置状态
|
||||
* @param int $id
|
||||
* @param $status
|
||||
* @return Response
|
||||
@ -103,6 +110,7 @@ class Version extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 小程序包上传
|
||||
* @description 小程序包上传
|
||||
* @return Response
|
||||
* @throws Exception
|
||||
*/
|
||||
|
||||
@ -17,12 +17,14 @@ use think\response\File;
|
||||
|
||||
/**
|
||||
* 小程序版本下载控制器
|
||||
* @description 小程序版本下载
|
||||
*/
|
||||
class VersionDownload extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* 下载
|
||||
* @description 下载
|
||||
* @param $id
|
||||
* @return File
|
||||
*/
|
||||
|
||||
@ -16,11 +16,18 @@ use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
|
||||
/**
|
||||
* 用户管理
|
||||
* Class Auth
|
||||
* @description 用户管理
|
||||
* @package app\adminapi\controller\auth
|
||||
*/
|
||||
class Auth extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* 登录用户菜单列表的接口
|
||||
* @description 登录用户菜单列表
|
||||
*/
|
||||
public function authMenuList()
|
||||
{
|
||||
@ -34,6 +41,7 @@ class Auth extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取登录用户信息
|
||||
* @description 获取登录用户信息
|
||||
* @return Response
|
||||
*/
|
||||
public function get()
|
||||
@ -43,6 +51,7 @@ class Auth extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 修改登录用户信息
|
||||
* @description 修改登录用户信息
|
||||
* @param $field
|
||||
* @return Response
|
||||
*/
|
||||
@ -59,6 +68,7 @@ class Auth extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 更新用户
|
||||
* @description 更新用户
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
|
||||
@ -15,10 +15,16 @@ use app\service\admin\channel\H5Service;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* H5配置
|
||||
* Class H5
|
||||
* @package app\adminapi\controller\channel
|
||||
*/
|
||||
class H5 extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 获取H5配置信息
|
||||
* @description 获取H5配置信息
|
||||
* @return Response
|
||||
*/
|
||||
public function get()
|
||||
@ -28,6 +34,7 @@ class H5 extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 设置H5配置信息
|
||||
* @description 设置H5配置信息
|
||||
* @return Response
|
||||
*/
|
||||
public function set()
|
||||
|
||||
@ -15,10 +15,17 @@ use app\service\admin\channel\PcService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* PC端配置
|
||||
* Class Pc
|
||||
* @description PC端配置
|
||||
* @package app\adminapi\controller\channel
|
||||
*/
|
||||
class Pc extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 获取PC配置信息
|
||||
* @description 获取PC配置信息
|
||||
* @return Response
|
||||
*/
|
||||
public function get()
|
||||
@ -28,6 +35,7 @@ class Pc extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 设置PC配置信息
|
||||
* @description 设置PC配置信息
|
||||
* @return Response
|
||||
*/
|
||||
public function set()
|
||||
|
||||
@ -18,12 +18,14 @@ use app\service\admin\dict\DictService;
|
||||
/**
|
||||
* 数据字典控制器
|
||||
* Class Dict
|
||||
* @description 数据字典
|
||||
* @package app\adminapi\controller\dict
|
||||
*/
|
||||
class Dict extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 获取数据字典列表
|
||||
* @description 获取数据字典列表
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function lists(){
|
||||
@ -36,6 +38,7 @@ class Dict extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 数据字典详情
|
||||
* @description 数据字典详情
|
||||
* @param int $id
|
||||
* @return \think\Response
|
||||
*/
|
||||
@ -45,6 +48,7 @@ class Dict extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 添加数据字典
|
||||
* @description 添加数据字典
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function add(){
|
||||
@ -61,6 +65,7 @@ class Dict extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 数据字典编辑
|
||||
* @description 数据字典编辑
|
||||
* @param $id 数据字典id
|
||||
* @return \think\Response
|
||||
*/
|
||||
@ -77,6 +82,7 @@ class Dict extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 数据字典删除
|
||||
* @description 数据字典删除
|
||||
* @param $id 数据字典id
|
||||
* @return \think\Response
|
||||
*/
|
||||
@ -87,6 +93,7 @@ class Dict extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 添加数据字典内容
|
||||
* @description 添加数据字典内容
|
||||
*/
|
||||
public function addDictData($id)
|
||||
{
|
||||
@ -101,6 +108,7 @@ class Dict extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取全部数据字典
|
||||
* @description 获取全部数据字典
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function getAll(){
|
||||
@ -109,6 +117,7 @@ class Dict extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 数据字典详情
|
||||
* @description 数据字典详情
|
||||
* @param key 数据字典关键字
|
||||
* @return \think\Response
|
||||
*/
|
||||
|
||||
@ -19,12 +19,14 @@ use think\Response;
|
||||
/**
|
||||
* 自定义配置相关
|
||||
* Class Config
|
||||
* @description 自定义配置
|
||||
* @package app\adminapi\controller\diy
|
||||
*/
|
||||
class Config extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 获取底部导航列表
|
||||
* @description 获取底部导航列表
|
||||
* @return Response
|
||||
*/
|
||||
public function getBottomList()
|
||||
@ -34,6 +36,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取底部导航
|
||||
* @description 获取底部导航
|
||||
* @return Response
|
||||
*/
|
||||
public function getBottomConfig()
|
||||
@ -46,6 +49,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 设置底部导航
|
||||
* @description 设置底部导航
|
||||
* @return Response
|
||||
*/
|
||||
public function setBottomConfig()
|
||||
|
||||
@ -24,12 +24,14 @@ use think\Response;
|
||||
/**
|
||||
* 自定义页面控制器
|
||||
* Class DiyController
|
||||
* @description 自定义页面
|
||||
* @package app\adminapi\controller\diy
|
||||
*/
|
||||
class Diy extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取自定义页面分页列表
|
||||
* 获取自定义页面分页列表
|
||||
* @description 获取自定义页面分页列表
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
@ -44,7 +46,8 @@ class Diy extends BaseAdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取自定义页面分页列表,轮播搜索组件用
|
||||
* 获取自定义页面分页列表,轮播搜索组件用
|
||||
* @description 获取自定义页面分页列表,轮播搜索组件用
|
||||
* @return Response
|
||||
*/
|
||||
public function getPageByCarouselSearch()
|
||||
@ -53,7 +56,8 @@ class Diy extends BaseAdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取自定义页面列表
|
||||
* 获取自定义页面列表
|
||||
* @description 获取自定义页面列表
|
||||
* @return Response
|
||||
* @throws DataNotFoundException
|
||||
* @throws DbException
|
||||
@ -71,6 +75,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 自定义页面详情
|
||||
* @description 自定义页面详情
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -81,6 +86,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 添加自定义页面
|
||||
* @description 添加自定义页面
|
||||
* @return Response
|
||||
*/
|
||||
public function add()
|
||||
@ -104,6 +110,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 自定义页面编辑
|
||||
* @description 自定义页面编辑
|
||||
* @param $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -126,6 +133,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 自定义页面删除
|
||||
* @description 自定义页面删除
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -137,6 +145,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 设为使用
|
||||
* @description 设为使用
|
||||
* @param $id
|
||||
* @return Response
|
||||
* @throws Exception
|
||||
@ -149,6 +158,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取页面初始化数据
|
||||
* @description 获取页面初始化数据
|
||||
* @return Response
|
||||
*/
|
||||
public function getPageInit()
|
||||
@ -166,6 +176,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取自定义链接列表
|
||||
* @description 获取自定义链接列表
|
||||
*/
|
||||
public function getLink()
|
||||
{
|
||||
@ -175,6 +186,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取页面模板
|
||||
* @description 获取页面模板
|
||||
* @return Response
|
||||
*/
|
||||
public function getTemplate()
|
||||
@ -192,6 +204,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 修改页面分享内容
|
||||
* @description 修改页面分享内容
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -206,6 +219,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取装修页面列表
|
||||
* @description 获取装修页面列表
|
||||
*/
|
||||
public function getDecoratePage()
|
||||
{
|
||||
@ -217,6 +231,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 切换模板
|
||||
* @description 切换模板
|
||||
*/
|
||||
public function changeTemplate()
|
||||
{
|
||||
@ -234,6 +249,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取模板页面列表
|
||||
* @description 获取模板页面列表
|
||||
* @return Response
|
||||
*/
|
||||
public function getTemplatePages()
|
||||
@ -248,6 +264,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取模板页面(存在的应用插件列表)
|
||||
* @description 获取模板页面(存在的应用插件列表)
|
||||
* @return Response
|
||||
*/
|
||||
public function getApps()
|
||||
@ -257,6 +274,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 复制模版
|
||||
* @description 复制模版
|
||||
* @return Response
|
||||
*/
|
||||
public function copy()
|
||||
@ -270,6 +288,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取主题风格列表
|
||||
* @description 获取主题风格列表
|
||||
* @return Response
|
||||
*/
|
||||
public function getDiyTheme()
|
||||
@ -279,6 +298,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 设置主题风格
|
||||
* @description 设置主题风格
|
||||
* @return Response
|
||||
*/
|
||||
public function setDiyTheme()
|
||||
@ -296,6 +316,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取主题配色列表
|
||||
* @description 获取主题配色列表
|
||||
* @return Response
|
||||
*/
|
||||
public function getDefaultThemeColor()
|
||||
@ -308,6 +329,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 添加自定义主题配色
|
||||
* @description 添加自定义主题配色
|
||||
* @return Response
|
||||
*/
|
||||
public function addDiyTheme()
|
||||
@ -326,6 +348,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 编辑自定义主题配色
|
||||
* @description 编辑自定义主题配色
|
||||
* @param $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -345,6 +368,7 @@ class Diy extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 删除自定义主题配色
|
||||
* @description 删除自定义主题配色
|
||||
* @param $id
|
||||
* @return Response
|
||||
*/
|
||||
|
||||
@ -24,12 +24,14 @@ use think\Response;
|
||||
/**
|
||||
* 万能表单控制器
|
||||
* Class DiyForm
|
||||
* @description 万能表单
|
||||
* @package app\adminapi\controller\diy
|
||||
*/
|
||||
class DiyForm extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取万能表单分页列表
|
||||
* 获取万能表单分页列表
|
||||
* @description 获取万能表单分页列表
|
||||
* @return Response
|
||||
*/
|
||||
public function pages()
|
||||
@ -43,7 +45,8 @@ class DiyForm extends BaseAdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取万能表单分页列表(用于弹框选择)
|
||||
* 获取万能表单分页列表(用于弹框选择)
|
||||
* @description 获取万能表单分页列表(用于弹框选择)
|
||||
* @return Response
|
||||
*/
|
||||
public function select()
|
||||
@ -58,7 +61,8 @@ class DiyForm extends BaseAdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取万能表单列表
|
||||
* 获取万能表单列表
|
||||
* @description 获取万能表单列表
|
||||
* @return Response
|
||||
* @throws DataNotFoundException
|
||||
* @throws DbException
|
||||
@ -77,6 +81,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 万能表单详情
|
||||
* @description 万能表单详情
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -87,6 +92,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 添加万能表单
|
||||
* @description 添加万能表单
|
||||
* @return Response
|
||||
*/
|
||||
public function add()
|
||||
@ -105,6 +111,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 万能表单编辑
|
||||
* @description 万能表单编辑
|
||||
* @param $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -124,6 +131,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 万能表单删除
|
||||
* @description 万能表单删除
|
||||
* @return Response
|
||||
*/
|
||||
public function del()
|
||||
@ -137,6 +145,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取万能表单初始化数据
|
||||
* @description 获取万能表单初始化数据
|
||||
* @return Response
|
||||
* @throws DbException
|
||||
*/
|
||||
@ -153,6 +162,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取万能表单模板
|
||||
* @description 获取万能表单模板
|
||||
* @return Response
|
||||
*/
|
||||
public function getTemplate()
|
||||
@ -167,6 +177,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 修改页面分享内容
|
||||
* @description 修改页面分享内容
|
||||
* @return Response
|
||||
*/
|
||||
public function modifyShare()
|
||||
@ -181,6 +192,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取模板页面(存在的应用插件列表)
|
||||
* @description 获取模板页面(存在的应用插件列表)
|
||||
* @return Response
|
||||
*/
|
||||
public function getApps()
|
||||
@ -189,7 +201,8 @@ class DiyForm extends BaseAdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制模版 todo 靠后
|
||||
* 复制万能表单
|
||||
* @description 复制万能表单
|
||||
* @return Response
|
||||
*/
|
||||
public function copy()
|
||||
@ -203,6 +216,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取模板页面(存在的应用插件列表)
|
||||
* @description 获取模板页面(存在的应用插件列表)
|
||||
* @return Response
|
||||
*/
|
||||
public function getFormType()
|
||||
@ -212,6 +226,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 修改状态
|
||||
* @description 修改状态
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function modifyStatus()
|
||||
@ -226,6 +241,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取使用记录
|
||||
* @description 获取使用记录
|
||||
* @return Response
|
||||
*/
|
||||
public function getRecordPages()
|
||||
@ -240,6 +256,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取使用记录详情
|
||||
* @description 获取使用记录详情
|
||||
* @param int $record_id
|
||||
* @return Response
|
||||
*/
|
||||
@ -250,6 +267,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 使用记录删除
|
||||
* @description 使用记录删除
|
||||
* @return Response
|
||||
*/
|
||||
public function delRecord()
|
||||
@ -264,6 +282,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取万能表单字段记录
|
||||
* @description 获取万能表单字段记录
|
||||
* @return Response
|
||||
*/
|
||||
public function getFieldsList()
|
||||
@ -278,6 +297,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取表单填写配置
|
||||
* @description 获取表单填写配置
|
||||
* @param $form_id int 所属万能表单id
|
||||
* @return Response
|
||||
*/
|
||||
@ -288,6 +308,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 编辑表单填写配置
|
||||
* @description 编辑表单填写配置
|
||||
* @return Response
|
||||
*/
|
||||
public function editWriteConfig()
|
||||
@ -314,6 +335,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取表单提交成功 也配置
|
||||
* @description 获取表单提交成功页配置
|
||||
* @param $form_id int 所属万能表单id
|
||||
* @return Response
|
||||
*/
|
||||
@ -324,6 +346,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 编辑表单提交成功页配置
|
||||
* @description 编辑表单提交成功页配置
|
||||
* @return Response
|
||||
*/
|
||||
public function editSubmitConfig()
|
||||
@ -347,6 +370,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取万能表单填表人统计列表
|
||||
* @description 获取万能表单填表人统计列表
|
||||
* @return Response
|
||||
*/
|
||||
public function memberStatPages()
|
||||
@ -360,6 +384,7 @@ class DiyForm extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取万能表单字段统计列表
|
||||
* @description 获取万能表单字段统计列表
|
||||
* @return Response
|
||||
*/
|
||||
public function fieldStatList()
|
||||
|
||||
@ -19,12 +19,14 @@ use think\Response;
|
||||
/**
|
||||
* 自定义路由表控制器
|
||||
* Class DiyRouteController
|
||||
* @description 自定义路由
|
||||
* @package app\adminapi\controller\diy
|
||||
*/
|
||||
class DiyRoute extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取自定义路由表列表
|
||||
* 获取自定义路由表列表
|
||||
* @description 获取自定义路由表列表
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
@ -39,6 +41,7 @@ class DiyRoute extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 自定义路由表详情
|
||||
* @description 自定义路由表详情
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -49,6 +52,7 @@ class DiyRoute extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 自定义路由表详情
|
||||
* @description 自定义路由表详情
|
||||
* @param string $name
|
||||
* @return Response
|
||||
*/
|
||||
@ -59,6 +63,7 @@ class DiyRoute extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 添加自定义路由表
|
||||
* @description 添加自定义路由表
|
||||
* @return Response
|
||||
*/
|
||||
public function add()
|
||||
@ -77,6 +82,7 @@ class DiyRoute extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 自定义路由表编辑
|
||||
* @description 自定义路由表编辑
|
||||
* @param $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -96,6 +102,7 @@ class DiyRoute extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 自定义路由表删除
|
||||
* @description 自定义路由表删除
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -107,6 +114,7 @@ class DiyRoute extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 修改页面分享内容
|
||||
* @description 修改页面分享内容
|
||||
*/
|
||||
public function modifyShare()
|
||||
{
|
||||
@ -125,6 +133,7 @@ class DiyRoute extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取模板页面(存在的应用插件列表)
|
||||
* @description 获取模板页面(存在的应用插件列表)
|
||||
* @return Response
|
||||
*/
|
||||
public function getApps()
|
||||
|
||||
@ -22,12 +22,14 @@ use think\Response;
|
||||
/**
|
||||
* 代码生成-控制器
|
||||
* Class Generate
|
||||
* @description 代码生成器
|
||||
* @package app\adminapi\controller\generate
|
||||
*/
|
||||
class Generator extends BaseController
|
||||
{
|
||||
/**
|
||||
* 代码生成器列表
|
||||
* @description 代码生成器列表
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
@ -43,6 +45,7 @@ class Generator extends BaseController
|
||||
|
||||
/**
|
||||
* 代码生成详情
|
||||
* @description 代码生成详情
|
||||
* @param int $id
|
||||
* @return Response
|
||||
* @throws DataNotFoundException
|
||||
@ -56,6 +59,7 @@ class Generator extends BaseController
|
||||
|
||||
/**
|
||||
* 代码预览
|
||||
* @description 代码预览
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -68,6 +72,7 @@ class Generator extends BaseController
|
||||
|
||||
/**
|
||||
* 添加代码生成
|
||||
* @description 添加代码生成
|
||||
* @return Response
|
||||
* @throws Exception
|
||||
*/
|
||||
@ -83,6 +88,7 @@ class Generator extends BaseController
|
||||
|
||||
/**
|
||||
* 代码生成编辑
|
||||
* @description 代码生成编辑
|
||||
* @param $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -111,6 +117,7 @@ class Generator extends BaseController
|
||||
|
||||
/**
|
||||
* 代码生成删除
|
||||
* @description 代码生成删除
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -122,6 +129,7 @@ class Generator extends BaseController
|
||||
|
||||
/**
|
||||
* 生成代码
|
||||
* @description 生成代码
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
@ -137,6 +145,7 @@ class Generator extends BaseController
|
||||
|
||||
/**
|
||||
* 获取数据表列表
|
||||
* @description 获取数据表列表
|
||||
* @return Response
|
||||
*/
|
||||
public function tableList()
|
||||
@ -151,6 +160,7 @@ class Generator extends BaseController
|
||||
|
||||
/**
|
||||
* 代码生成检测
|
||||
* @description 代码生成检测
|
||||
*/
|
||||
public function checkFile()
|
||||
{
|
||||
@ -163,6 +173,7 @@ class Generator extends BaseController
|
||||
|
||||
/**
|
||||
* 获取表字段
|
||||
* @description 获取表字段
|
||||
*/
|
||||
public function getTableColumn()
|
||||
{
|
||||
@ -172,9 +183,9 @@ class Generator extends BaseController
|
||||
return success((new GenerateService())->getTableColumn($data));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取全部模型
|
||||
* @description 获取全部模型
|
||||
*/
|
||||
public function getModels()
|
||||
{
|
||||
@ -186,6 +197,7 @@ class Generator extends BaseController
|
||||
|
||||
/**
|
||||
* 根据模型获取表字段
|
||||
* @description 根据模型获取表字段
|
||||
*/
|
||||
public function getModelTableColumn()
|
||||
{
|
||||
|
||||
@ -15,12 +15,18 @@ use app\service\admin\captcha\CaptchaService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
* Class Captcha
|
||||
* @description 验证码
|
||||
* @package app\adminapi\controller\login
|
||||
*/
|
||||
class Captcha extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* 创建验证码
|
||||
* @description 创建验证码
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
@ -30,6 +36,7 @@ class Captcha extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 一次校验验证码
|
||||
* @description 一次校验验证码
|
||||
* @return Response
|
||||
*/
|
||||
public function check()
|
||||
@ -39,6 +46,7 @@ class Captcha extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 二次校验验证码
|
||||
* @description 二次校验验证码
|
||||
* @return Response
|
||||
*/
|
||||
public function verification()
|
||||
|
||||
@ -15,12 +15,18 @@ use app\service\admin\auth\ConfigService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
|
||||
/**
|
||||
* 登录设置
|
||||
* Class Config
|
||||
* @description 登录设置
|
||||
* @package app\adminapi\controller\login
|
||||
*/
|
||||
class Config extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* 获取登录设置
|
||||
* @description 获取登录设置
|
||||
* @return Response
|
||||
*/
|
||||
public function getConfig()
|
||||
@ -30,6 +36,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 注册与登录设置
|
||||
* @description 注册与登录设置
|
||||
* @return Response
|
||||
*/
|
||||
public function setConfig()
|
||||
|
||||
@ -16,10 +16,18 @@ use app\service\admin\auth\LoginService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 登录
|
||||
* Class Login
|
||||
* @description 登录
|
||||
* @package app\adminapi\controller\login
|
||||
*/
|
||||
class Login extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* 登录
|
||||
* @description 登录
|
||||
* @return Response
|
||||
*/
|
||||
public function login()
|
||||
@ -41,7 +49,8 @@ class Login extends BaseAdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* 登出
|
||||
* 退出登录
|
||||
* @description 退出登录
|
||||
* @return Response
|
||||
*/
|
||||
public function logout()
|
||||
@ -50,9 +59,9 @@ class Login extends BaseAdminController
|
||||
return success('LOGOUT');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取登录设置
|
||||
* @description 获取登录设置
|
||||
* @return Response
|
||||
*/
|
||||
public function getConfig()
|
||||
|
||||
@ -17,10 +17,17 @@ use app\service\admin\member\MemberService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 会员账户
|
||||
* Class Account
|
||||
* @description 会员账户
|
||||
* @package app\adminapi\controller\member
|
||||
*/
|
||||
class Account extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 积分流水
|
||||
* @description 积分流水
|
||||
* @return Response
|
||||
*/
|
||||
public function point()
|
||||
@ -37,6 +44,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员积分统计(用于会员积分统计窗口)
|
||||
* @description 会员积分统计(用于会员积分统计窗口)
|
||||
*/
|
||||
public function sumPoint()
|
||||
{
|
||||
@ -64,6 +72,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 余额流水
|
||||
* @description 余额流水
|
||||
* @return Response
|
||||
*/
|
||||
public function balance()
|
||||
@ -80,6 +89,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 可提现余额流水
|
||||
* @description 可提现余额流水
|
||||
* @return Response
|
||||
*/
|
||||
public function money()
|
||||
@ -96,6 +106,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 查询成长值
|
||||
* @description 查询成长值
|
||||
* @return Response
|
||||
*/
|
||||
public function growth()
|
||||
@ -112,6 +123,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 积分账户调整
|
||||
* @description 积分账户调整
|
||||
*/
|
||||
public function adjustPoint()
|
||||
{
|
||||
@ -126,6 +138,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 余额账户调整
|
||||
* @description 余额账户调整
|
||||
*/
|
||||
public function adjustBalance()
|
||||
{
|
||||
@ -140,6 +153,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 零钱调整
|
||||
* @description 零钱调整
|
||||
* @return Response
|
||||
*/
|
||||
public function adjustMoney()
|
||||
@ -155,6 +169,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员佣金
|
||||
* @description 会员佣金
|
||||
* @return Response
|
||||
*/
|
||||
public function commission()
|
||||
@ -171,6 +186,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员佣金统计(用于会员账户统计窗口)
|
||||
* @description 会员佣金统计(用于会员账户统计窗口)
|
||||
*/
|
||||
public function sumCommission()
|
||||
{
|
||||
@ -202,6 +218,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员余额统计(用于会员账户统计窗口)
|
||||
* @description 会员余额统计(用于会员账户统计窗口)
|
||||
*/
|
||||
public function sumBalance()
|
||||
{
|
||||
@ -223,6 +240,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 账户变化类型
|
||||
* @description 账户变化类型
|
||||
* @param string $account_type
|
||||
* @return Response
|
||||
*/
|
||||
@ -234,6 +252,7 @@ class Account extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 账户类型
|
||||
* @description 账户类型
|
||||
*/
|
||||
public function accountType()
|
||||
{
|
||||
|
||||
@ -17,11 +17,13 @@ use core\base\BaseAdminController;
|
||||
|
||||
/**
|
||||
* 会员收货地址控制器
|
||||
* @description 会员收货地址
|
||||
*/
|
||||
class Address extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 获取会员收货地址列表
|
||||
* @description 获取会员收货地址列表
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function lists(){
|
||||
@ -33,6 +35,7 @@ class Address extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员收货地址详情
|
||||
* @description 会员收货地址详情
|
||||
* @param $id 会员收货地址id
|
||||
* @return \think\Response
|
||||
*/
|
||||
@ -45,6 +48,7 @@ class Address extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 添加会员收货地址
|
||||
* @description 添加会员收货地址
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function add(){
|
||||
@ -68,6 +72,7 @@ class Address extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员收货地址编辑
|
||||
* @description 会员收货地址编辑
|
||||
* @param $id 会员收货地址id
|
||||
* @return \think\Response
|
||||
*/
|
||||
|
||||
@ -17,10 +17,17 @@ use app\service\admin\member\MemberCashOutService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 提现
|
||||
* Class CashOut
|
||||
* @description 提现
|
||||
* @package app\adminapi\controller\member
|
||||
*/
|
||||
class CashOut extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 提现列表
|
||||
* @description 提现列表
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
@ -40,6 +47,7 @@ class CashOut extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 提现详情
|
||||
* @description 提现详情
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -48,6 +56,13 @@ class CashOut extends BaseAdminController
|
||||
return success((new MemberCashOutService())->getInfo($id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现申请
|
||||
* @description 提现申请
|
||||
* @param $id
|
||||
* @param $action
|
||||
* @return Response
|
||||
*/
|
||||
public function audit($id, $action)
|
||||
{
|
||||
$data = $this->request->params([
|
||||
@ -59,6 +74,7 @@ class CashOut extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 转账方式
|
||||
* @description 转账方式
|
||||
* @return Response
|
||||
*/
|
||||
public function getTransferType()
|
||||
@ -68,6 +84,7 @@ class CashOut extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 转账方式
|
||||
* @description 转账方式
|
||||
* @param $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -84,6 +101,7 @@ class CashOut extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 备注转账信息
|
||||
* @description 备注转账信息
|
||||
* @param $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -97,6 +115,7 @@ class CashOut extends BaseAdminController
|
||||
}
|
||||
/**
|
||||
* 状态
|
||||
* @description 状态
|
||||
* @return Response
|
||||
*/
|
||||
public function getStatusList()
|
||||
@ -106,6 +125,7 @@ class CashOut extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 统计数据
|
||||
* @description 统计数据
|
||||
*/
|
||||
public function stat()
|
||||
{
|
||||
@ -114,6 +134,7 @@ class CashOut extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 校验数组是否
|
||||
* @description 校验数组是否
|
||||
* @return void
|
||||
*/
|
||||
public function checkTransferStatus($id){
|
||||
@ -123,6 +144,7 @@ class CashOut extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 取消
|
||||
* @description 取消
|
||||
* @param $id
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@ -16,10 +16,17 @@ use app\service\admin\member\MemberService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 会员设置
|
||||
* Class Config
|
||||
* @description 会员设置
|
||||
* @package app\adminapi\controller\member
|
||||
*/
|
||||
class Config extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 获取登录设置
|
||||
* @description 获取登录设置
|
||||
* @return Response
|
||||
*/
|
||||
public function getLoginConfig()
|
||||
@ -29,6 +36,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 注册与登录设置
|
||||
* @description 设置注册与登录配置
|
||||
* @return Response
|
||||
*/
|
||||
public function setLoginConfig()
|
||||
@ -50,6 +58,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取提现设置
|
||||
* @description 获取提现设置
|
||||
* @return Response
|
||||
*/
|
||||
public function getCashOutConfig()
|
||||
@ -59,6 +68,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 提现设置
|
||||
* @description 设置提现设置
|
||||
* @return Response
|
||||
*/
|
||||
public function setCashOutConfig()
|
||||
@ -78,6 +88,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取会员配置
|
||||
* @description 获取会员配置
|
||||
* @return Response
|
||||
*/
|
||||
public function getMemberConfig()
|
||||
@ -87,13 +98,15 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 设置会员配置
|
||||
* @description 设置会员配置
|
||||
* @return Response
|
||||
*/
|
||||
public function setMemberConfig()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
[ 'prefix', '' ],
|
||||
[ 'length', 10 ]
|
||||
[ 'length', 10 ],
|
||||
[ 'form_id', '' ],
|
||||
]);
|
||||
$this->validate($data, 'app\validate\member\MemberConfig.set');
|
||||
( new MemberConfigService() )->setMemberConfig($data);
|
||||
@ -102,6 +115,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取成长值规则配置
|
||||
* @description 获取成长值规则配置
|
||||
* @return Response
|
||||
*/
|
||||
public function getGrowthRuleConfig()
|
||||
@ -111,6 +125,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 配置成长值规则
|
||||
* @description 配置成长值规则
|
||||
* @return Response
|
||||
*/
|
||||
public function setGrowthRuleConfig()
|
||||
@ -127,6 +142,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取积分规则配置
|
||||
* @description 获取积分规则配置
|
||||
* @return Response
|
||||
*/
|
||||
public function getPointRuleConfig()
|
||||
@ -136,6 +152,7 @@ class Config extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 配置积分规则
|
||||
* @description 配置积分规则
|
||||
* @return Response
|
||||
*/
|
||||
public function setPointRuleConfig()
|
||||
|
||||
@ -21,10 +21,17 @@ use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 会员管理
|
||||
* Class Member
|
||||
* @description 会员管理
|
||||
* @package app\adminapi\controller\member
|
||||
*/
|
||||
class Member extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 会员列表
|
||||
* @description 会员列表
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
@ -42,6 +49,7 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员详情
|
||||
* @description 会员详情
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -52,6 +60,7 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 添加会员
|
||||
* @description 添加会员
|
||||
* @return Response
|
||||
*/
|
||||
public function add()
|
||||
@ -76,6 +85,7 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 修改会员
|
||||
* @description 修改会员
|
||||
* @param $member_id
|
||||
* @param $field
|
||||
* @return Response
|
||||
@ -95,6 +105,7 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* @description 更新
|
||||
* @return Response
|
||||
*/
|
||||
public function edit($member_id)
|
||||
@ -112,6 +123,12 @@ class Member extends BaseAdminController
|
||||
return success('EDIT_SUCCESS');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员
|
||||
* @description 删除会员
|
||||
* @param $member_id
|
||||
* @return Response
|
||||
*/
|
||||
public function del($member_id)
|
||||
{
|
||||
$res = (new MemberService())->deleteMember($member_id);
|
||||
@ -120,6 +137,7 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 导出会员列表
|
||||
* @description 导出会员列表
|
||||
* @return Response
|
||||
*/
|
||||
public function export()
|
||||
@ -137,6 +155,7 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员使用场景
|
||||
* @description 会员使用场景
|
||||
* @return Response
|
||||
*/
|
||||
public function getMemberRegisterType()
|
||||
@ -146,6 +165,7 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员列表
|
||||
* @description 会员列表
|
||||
* @return Response
|
||||
* @throws DataNotFoundException
|
||||
* @throws DbException
|
||||
@ -162,6 +182,7 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取会员注册渠道
|
||||
* @description 获取会员注册渠道
|
||||
* @return Response
|
||||
*/
|
||||
public function getMemberRegisterChannelType()
|
||||
@ -171,6 +192,7 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 设置会员的状态
|
||||
* @description 设置会员的状态
|
||||
* @param $status
|
||||
* @return Response
|
||||
*/
|
||||
@ -187,6 +209,7 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取状态枚举
|
||||
* @description 获取状态枚举
|
||||
* @return Response
|
||||
*/
|
||||
public function getStatusList()
|
||||
@ -196,6 +219,7 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取会员编码
|
||||
* @description 获取会员编码
|
||||
* @return Response
|
||||
*/
|
||||
public function getMemberNo()
|
||||
@ -206,55 +230,85 @@ class Member extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取会员权益字典
|
||||
* @description 获取会员权益字典
|
||||
* @return mixed
|
||||
*/
|
||||
public function getMemberBenefitsDict() {
|
||||
public function getMemberBenefitsDict()
|
||||
{
|
||||
return success((new MemberService())->getMemberBenefitsDict());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员礼包字典
|
||||
* @description 获取会员礼包字典
|
||||
* @return array|null
|
||||
*/
|
||||
public function getMemberGiftDict() {
|
||||
public function getMemberGiftDict()
|
||||
{
|
||||
return success((new MemberService())->getMemberGiftDict());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取成长值规则字典
|
||||
* @description 获取成长值规则字典
|
||||
* @return array|null
|
||||
*/
|
||||
public function getGrowthRuleDict() {
|
||||
public function getGrowthRuleDict()
|
||||
{
|
||||
return success((new MemberService())->getGrowthRuleDict());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取积分规则字典
|
||||
* @description 获取积分规则字典
|
||||
* @return array|null
|
||||
*/
|
||||
public function getPointRuleDict() {
|
||||
public function getPointRuleDict()
|
||||
{
|
||||
return success((new MemberService())->getPointRuleDict());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员权益内容
|
||||
* @description 获取会员权益内容
|
||||
* @return Response
|
||||
*/
|
||||
public function getMemberBenefitsContent() {
|
||||
public function getMemberBenefitsContent()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
[ 'benefits', [] ],
|
||||
['benefits', []],
|
||||
]);
|
||||
return success((new MemberService())->getMemberBenefitsContent($data['benefits']));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员礼包内容
|
||||
* @description 获取会员礼包内容
|
||||
* @return Response
|
||||
*/
|
||||
public function getMemberGiftsContent() {
|
||||
public function getMemberGiftsContent()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
[ 'gifts', [] ],
|
||||
['gifts', []],
|
||||
]);
|
||||
return success((new MemberService())->getMemberGiftsContent($data['gifts']));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量操作
|
||||
* @description 批量操作
|
||||
* @return Response
|
||||
*/
|
||||
public function batchModify()
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['is_all', 0],
|
||||
['where', []],
|
||||
['member_ids', []],
|
||||
['value', ''],
|
||||
['field', ''],
|
||||
]);
|
||||
(new MemberService())->batchModify($data);
|
||||
return success('MODIFY_SUCCESS');
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,10 +18,17 @@ use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 会员标签
|
||||
* Class MemberLabel
|
||||
* @description 会员标签
|
||||
* @package app\adminapi\controller\member
|
||||
*/
|
||||
class MemberLabel extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 会员标签列表
|
||||
* @description 会员标签列表
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
@ -34,6 +41,7 @@ class MemberLabel extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员标签详情
|
||||
* @description 会员标签详情
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -44,6 +52,7 @@ class MemberLabel extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 添加会员标签
|
||||
* @description 添加会员标签
|
||||
* @return Response
|
||||
*/
|
||||
public function add()
|
||||
@ -61,6 +70,7 @@ class MemberLabel extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 编辑会员标签
|
||||
* @description 编辑会员标签
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -76,6 +86,7 @@ class MemberLabel extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员标签删除
|
||||
* @description 会员标签删除
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -87,6 +98,7 @@ class MemberLabel extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取标签
|
||||
* @description 获取标签
|
||||
* @return Response
|
||||
* @throws DataNotFoundException
|
||||
* @throws DbException
|
||||
|
||||
@ -18,10 +18,17 @@ use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 会员等级
|
||||
* Class MemberLevel
|
||||
* @description 会员等级
|
||||
* @package app\adminapi\controller\member
|
||||
*/
|
||||
class MemberLevel extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 会员等级分页列表
|
||||
* @description 会员等级分页列表
|
||||
* @return Response
|
||||
*/
|
||||
public function pages()
|
||||
@ -34,6 +41,7 @@ class MemberLevel extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员等级详情
|
||||
* @description 会员等级详情
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -44,6 +52,7 @@ class MemberLevel extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 添加会员等级
|
||||
* @description 添加会员等级
|
||||
* @return Response
|
||||
*/
|
||||
public function add()
|
||||
@ -62,6 +71,7 @@ class MemberLevel extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 编辑会员等级
|
||||
* @description 编辑会员等级
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@ -79,6 +89,7 @@ class MemberLevel extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员等级删除
|
||||
* @description 会员等级删除
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
@ -90,6 +101,7 @@ class MemberLevel extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取标签
|
||||
* @description 获取标签
|
||||
* @return Response
|
||||
* @throws DataNotFoundException
|
||||
* @throws DbException
|
||||
|
||||
@ -15,10 +15,17 @@ use app\service\admin\member\MemberSignService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 会员签到
|
||||
* Class MemberSign
|
||||
* @description 会员签到
|
||||
* @package app\adminapi\controller\member
|
||||
*/
|
||||
class MemberSign extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 会员签到记录
|
||||
* @description 会员签到记录
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
@ -32,6 +39,7 @@ class MemberSign extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 会员签到详情
|
||||
* @description 会员签到详情
|
||||
* @param int $sign_id
|
||||
* @return Response
|
||||
*/
|
||||
@ -40,7 +48,9 @@ class MemberSign extends BaseAdminController
|
||||
return success(( new MemberSignService() )->getInfo($sign_id));
|
||||
}
|
||||
|
||||
/**设置签到设置
|
||||
/**
|
||||
* 设置签到设置
|
||||
* @description 设置签到设置
|
||||
* @return Response
|
||||
*/
|
||||
public function setSign()
|
||||
@ -58,6 +68,7 @@ class MemberSign extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取签到设置
|
||||
* @description 获取签到设置
|
||||
* @return Response
|
||||
*/
|
||||
public function getSign()
|
||||
|
||||
@ -14,10 +14,17 @@ namespace app\adminapi\controller\niucloud;
|
||||
use app\service\core\niucloud\CoreCloudBuildService;
|
||||
use core\base\BaseAdminController;
|
||||
|
||||
/**
|
||||
* 云编译
|
||||
* Class Cloud
|
||||
* @description 云编译
|
||||
* @package app\adminapi\controller\niucloud
|
||||
*/
|
||||
class Cloud extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 云编译
|
||||
* @description 云编译
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function build() {
|
||||
@ -34,6 +41,7 @@ class Cloud extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取云编译日志
|
||||
* @description 获取云编译日志
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function getBuildLog() {
|
||||
@ -42,6 +50,7 @@ class Cloud extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取云编译任务
|
||||
* @description 获取云编译任务
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function getBuildTask() {
|
||||
@ -50,6 +59,7 @@ class Cloud extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 清除云编译任务
|
||||
* @description 清除云编译任务
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function clearBuildTask() {
|
||||
@ -58,6 +68,7 @@ class Cloud extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 编译前环境检测
|
||||
* @description 编译前环境检测
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function buildPreCheck() {
|
||||
|
||||
@ -16,8 +16,20 @@ use app\service\core\niucloud\CoreAuthService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 模块
|
||||
* Class Module
|
||||
* @description 模块
|
||||
* @package app\adminapi\controller\niucloud
|
||||
*/
|
||||
class Module extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 获取授权信息
|
||||
* @description 获取授权信息
|
||||
* @return Response
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return success(( new CoreAuthService() )->getAuthInfo());
|
||||
@ -25,6 +37,7 @@ class Module extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 设置 授权信息
|
||||
* @description 设置 授权信息
|
||||
*/
|
||||
public function setAuthorize()
|
||||
{
|
||||
@ -38,6 +51,7 @@ class Module extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取 授权信息
|
||||
* @description 获取 授权信息
|
||||
*/
|
||||
public function getAuthorize()
|
||||
{
|
||||
@ -46,6 +60,7 @@ class Module extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取框架最新版本
|
||||
* @description 获取框架最新版本
|
||||
* @return Response
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
@ -56,6 +71,7 @@ class Module extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取框架最新版本
|
||||
* @description 获取框架最新版本
|
||||
* @return Response
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
@ -66,6 +82,7 @@ class Module extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 申请体验
|
||||
* @description 申请体验
|
||||
* @return Response
|
||||
*/
|
||||
public function applyExperience()
|
||||
@ -75,6 +92,7 @@ class Module extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取应用/插件的版本更新记录
|
||||
* @description 获取应用/插件的版本更新记录
|
||||
* @return Response
|
||||
*/
|
||||
public function getAppVersionList()
|
||||
|
||||
@ -15,10 +15,17 @@ use app\service\admin\notice\NiuSmsService;
|
||||
use core\base\BaseAdminController;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 牛云短信管理
|
||||
* Class NiuSms
|
||||
* @description 牛云短信管理
|
||||
* @package app\adminapi\controller\notice
|
||||
*/
|
||||
class NiuSms extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* 启用牛云短信
|
||||
* @description 启用牛云短信
|
||||
* @return Response
|
||||
*/
|
||||
public function enable()
|
||||
@ -30,9 +37,9 @@ class NiuSms extends BaseAdminController
|
||||
return success("SUCCESS");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取基础信息
|
||||
* @description 获取基础信息
|
||||
* @return Response
|
||||
*/
|
||||
public function getConfig()
|
||||
@ -40,6 +47,11 @@ class NiuSms extends BaseAdminController
|
||||
return success((new NiuSmsService())->getConfig());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取短信套餐列表
|
||||
* @description 获取短信套餐列表
|
||||
* @return Response
|
||||
*/
|
||||
public function getSmsPackageList()
|
||||
{
|
||||
$params = $this->request->params([
|
||||
@ -56,7 +68,11 @@ class NiuSms extends BaseAdminController
|
||||
return success($list);
|
||||
}
|
||||
|
||||
/*******牛云*******/
|
||||
/**
|
||||
* 发送短信验证码
|
||||
* @description 发送短信验证码
|
||||
* @return Response
|
||||
*/
|
||||
public function sendMobileCode()
|
||||
{
|
||||
$params = $this->request->params([
|
||||
@ -70,6 +86,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取图形验证码
|
||||
* @description 获取图形验证码
|
||||
* @return Response
|
||||
*/
|
||||
public function captcha()
|
||||
@ -80,6 +97,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 注册牛云短信子账号
|
||||
* @description 注册牛云短信子账号
|
||||
* @return Response
|
||||
*/
|
||||
public function registerAccount()
|
||||
@ -112,6 +130,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 登录牛云短信子账号
|
||||
* @description 登录牛云短信子账号
|
||||
* @return Response
|
||||
*/
|
||||
public function loginAccount()
|
||||
@ -126,6 +145,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取短信发送列表
|
||||
* @description 获取短信发送列表
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -142,6 +162,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 获取子账户信息
|
||||
* @description 获取子账户信息
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -153,6 +174,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 修改子账户信息
|
||||
* @description 修改子账户信息
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -171,6 +193,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
* @description 重置密码
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -187,6 +210,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 忘记密码
|
||||
* @description 忘记密码
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -203,6 +227,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 签名列表
|
||||
* @description 签名列表
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -214,6 +239,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 签名信息
|
||||
* @description 签名信息
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -224,6 +250,11 @@ class NiuSms extends BaseAdminController
|
||||
return success($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 签名创建、报备需要的配置
|
||||
* @description 签名创建、报备需要的配置
|
||||
* @return Response
|
||||
*/
|
||||
public function signCreateConfig()
|
||||
{
|
||||
return success((new NiuSmsService())->signCreateConfig());
|
||||
@ -231,6 +262,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 签名创建、报备
|
||||
* @description 签名创建、报备
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -254,6 +286,12 @@ class NiuSms extends BaseAdminController
|
||||
return success("SUCCESS");
|
||||
}
|
||||
|
||||
/**
|
||||
* 签名删除
|
||||
* @description 签名删除
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
public function signDelete($username)
|
||||
{
|
||||
$params = $this->request->params([
|
||||
@ -265,6 +303,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 同步模版状态
|
||||
* @description 同步模版状态
|
||||
* @param $sms_type
|
||||
* @param $username
|
||||
* @return Response
|
||||
@ -277,6 +316,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 模版列表
|
||||
* @description 模版列表
|
||||
* @param $sms_type
|
||||
* @param $username
|
||||
* @return Response
|
||||
@ -289,6 +329,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 模版信息
|
||||
* @description 模版信息
|
||||
* @param $sms_type
|
||||
* @param $username
|
||||
* @return Response
|
||||
@ -302,6 +343,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 创建模版需要的配置
|
||||
* @description 创建模版需要的配置
|
||||
* @return Response
|
||||
*/
|
||||
public function templateCreateConfig()
|
||||
@ -311,6 +353,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 创建模版
|
||||
* @description 创建模版
|
||||
* @param $sms_type
|
||||
* @param $username
|
||||
* @return Response
|
||||
@ -329,6 +372,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 清除模版
|
||||
* @description 清除模版
|
||||
* @param $username
|
||||
* @param $template_id
|
||||
* @return Response
|
||||
@ -341,6 +385,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 创建订单
|
||||
* @description 创建订单
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -356,6 +401,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 订单计算
|
||||
* @description 订单计算
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -366,11 +412,11 @@ class NiuSms extends BaseAdminController
|
||||
]);
|
||||
$data = (new NiuSmsService())->calculate($username, $params['package_id']);
|
||||
return success($data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取支付信息
|
||||
* @description 获取支付信息
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -384,7 +430,8 @@ class NiuSms extends BaseAdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值、订单列表
|
||||
* 充值订单列表
|
||||
* @description 充值订单列表
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -402,6 +449,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 订单详情
|
||||
* @description 订单详情
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
@ -416,6 +464,7 @@ class NiuSms extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 订单状态
|
||||
* @description 订单状态
|
||||
* @param $username
|
||||
* @return Response
|
||||
*/
|
||||
|
||||
@ -18,11 +18,18 @@ use core\base\BaseAdminController;
|
||||
use core\exception\AdminException;
|
||||
use think\Response;
|
||||
|
||||
/**
|
||||
* 消息管理
|
||||
* Class Notice
|
||||
* @description 消息管理
|
||||
* @package app\adminapi\controller\notice
|
||||
*/
|
||||
class Notice extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* 消息列表
|
||||
* @description 消息列表
|
||||
* @return Response
|
||||
*/
|
||||
public function lists()
|
||||
@ -31,6 +38,12 @@ class Notice extends BaseAdminController
|
||||
return success($res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息详情
|
||||
* @description 消息详情
|
||||
* @param $key
|
||||
* @return Response
|
||||
*/
|
||||
public function info($key)
|
||||
{
|
||||
$res = (new NoticeService())->getInfo($key);
|
||||
@ -39,6 +52,7 @@ class Notice extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 消息启动与关闭
|
||||
* @description 消息启动与关闭
|
||||
* @return Response
|
||||
*/
|
||||
public function editStatus()
|
||||
@ -54,6 +68,8 @@ class Notice extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 短信配置列表
|
||||
* @description 短信配置列表
|
||||
* @return Response
|
||||
*/
|
||||
public function smsList()
|
||||
{
|
||||
@ -63,6 +79,7 @@ class Notice extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 短信配置详情
|
||||
* @description 短信配置详情
|
||||
* @param $sms_type
|
||||
* @return Response
|
||||
*/
|
||||
@ -74,6 +91,7 @@ class Notice extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 短信配置修改
|
||||
* @description 短信配置修改
|
||||
* @return Response
|
||||
*/
|
||||
public function editSms($sms_type)
|
||||
@ -96,6 +114,7 @@ class Notice extends BaseAdminController
|
||||
|
||||
/**
|
||||
* 消息修改
|
||||
* @description 消息修改
|
||||
* @return Response
|
||||
*/
|
||||
public function edit()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user