Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fdd9a3bbe | ||
|
|
61f61b66b5 | ||
|
|
0268aa5033 | ||
|
|
e6e4327fdf |
@@ -114,7 +114,7 @@ WEBPC管理端:https://admin.java.crmeb.net<br>
|
|||||||
账号密码: demo/crmeb.com<br>
|
账号密码: demo/crmeb.com<br>
|
||||||
|
|
||||||
自己搭建演示账号
|
自己搭建演示账号
|
||||||
移动端 18292417675 / crmeb@123456
|
移动端 18292417675 / Crmeb_123456
|
||||||
管理端 admin / 123456
|
管理端 admin / 123456
|
||||||
|
|
||||||
[想了解CRMEB开源商城系统Java版整体框架,你可以戳这里快速掌握!](https://doc.crmeb.com/java/crmeb_java/2049)
|
[想了解CRMEB开源商城系统Java版整体框架,你可以戳这里快速掌握!](https://doc.crmeb.com/java/crmeb_java/2049)
|
||||||
|
|||||||
@@ -8,51 +8,51 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
import request from "@/utils/request";
|
import request from '@/utils/request'
|
||||||
|
|
||||||
export function configCheckUnique(pram) {
|
export function configCheckUnique(pram) {
|
||||||
const data = {
|
const data = {
|
||||||
name: pram.name
|
name: pram.name
|
||||||
};
|
}
|
||||||
return request({
|
return request({
|
||||||
url: "/admin/system/config/check",
|
url: '/admin/system/config/check',
|
||||||
method: "GET",
|
method: 'GET',
|
||||||
params: data
|
params: data
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function configDelete(pram) {
|
export function configDelete(pram) {
|
||||||
const data = {
|
const data = {
|
||||||
id: pram.id
|
id: pram.id
|
||||||
};
|
}
|
||||||
return request({
|
return request({
|
||||||
url: "/admin/system/config/delete",
|
url: '/admin/system/config/delete',
|
||||||
method: "GET",
|
method: 'GET',
|
||||||
params: data
|
params: data
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function configInfo(pram) {
|
export function configInfo(pram) {
|
||||||
const data = {
|
const data = {
|
||||||
formId: pram.id
|
formId: pram.id
|
||||||
};
|
}
|
||||||
return request({
|
return request({
|
||||||
url: "/admin/system/config/info",
|
url: '/admin/system/config/info',
|
||||||
method: "GET",
|
method: 'GET',
|
||||||
params: data
|
params: data
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function configList(pram) {
|
export function configList(pram) {
|
||||||
const data = {
|
const data = {
|
||||||
page: pram.page,
|
page: pram.page,
|
||||||
limit: pram.limit
|
limit: pram.limit
|
||||||
};
|
}
|
||||||
return request({
|
return request({
|
||||||
url: "/admin/system/config/list",
|
url: '/admin/system/config/list',
|
||||||
method: "GET",
|
method: 'GET',
|
||||||
params: data
|
params: data
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function configSave(pram) {
|
export function configSave(pram) {
|
||||||
@@ -67,73 +67,55 @@ export function configSave(pram) {
|
|||||||
type: pram.type,
|
type: pram.type,
|
||||||
value: pram.value // value 存储表单配置数据,其他的参数来自于父级数据 justForAPI
|
value: pram.value // value 存储表单配置数据,其他的参数来自于父级数据 justForAPI
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
return request({
|
return request({
|
||||||
url: "/admin/system/config/save",
|
url: '/admin/system/config/save',
|
||||||
method: "POST",
|
method: 'POST',
|
||||||
params: data
|
params: data
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function configSaveForm(pram) {
|
export function configSaveForm(pram) {
|
||||||
return request({
|
return request({
|
||||||
url: "/admin/system/config/save/form",
|
url: '/admin/system/config/save/form',
|
||||||
method: "POST",
|
method: 'POST',
|
||||||
data: pram
|
data: pram
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function configUpdate(pram) {
|
export function configUpdate(pram) {
|
||||||
const data = {
|
const data = {
|
||||||
id: pram.id,
|
id: pram.id,
|
||||||
systemConfigRequest: pram.systemConfigRequest
|
systemConfigRequest: pram.systemConfigRequest
|
||||||
};
|
}
|
||||||
return request({
|
return request({
|
||||||
url: "/admin/system/config/update",
|
url: '/admin/system/config/update',
|
||||||
method: "POST",
|
method: 'POST',
|
||||||
params: data
|
params: data
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function configSaveUniq(pram) {
|
export function configSaveUniq(pram) {
|
||||||
const data = {
|
const data = {
|
||||||
key: pram.key,
|
key: pram.key,
|
||||||
value: pram.value
|
value: pram.value
|
||||||
};
|
}
|
||||||
return request({
|
return request({
|
||||||
url: "/admin/system/config/saveuniq",
|
url: '/admin/system/config/saveuniq',
|
||||||
method: "POST",
|
method: 'POST',
|
||||||
params: data
|
params: data
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function configGetUniq(pram) {
|
export function configGetUniq(pram) {
|
||||||
const data = {
|
const data = {
|
||||||
key: pram.key
|
key: pram.key
|
||||||
};
|
}
|
||||||
return request({
|
return request({
|
||||||
url: "/admin/system/config/getuniq",
|
url: '/admin/system/config/getuniq',
|
||||||
method: "GET",
|
method: 'GET',
|
||||||
params: data
|
params: data
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 一号通 应用保存
|
|
||||||
*/
|
|
||||||
export function passAppSaveApi(data) {
|
|
||||||
return request({
|
|
||||||
url: "/admin/pass/appsave",
|
|
||||||
method: "post",
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 一号通 应用详情获取
|
|
||||||
*/
|
|
||||||
export function passAppInfoApi() {
|
|
||||||
return request({
|
|
||||||
url: "/admin/pass/appget",
|
|
||||||
method: "get"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -201,6 +201,14 @@ var __s = document.createElement('script');
|
|||||||
__s.src=`${SettingMer.apiBaseURL}/public/jsconfig/getcrmebchatconfig`;
|
__s.src=`${SettingMer.apiBaseURL}/public/jsconfig/getcrmebchatconfig`;
|
||||||
document.head.appendChild(__s);
|
document.head.appendChild(__s);
|
||||||
|
|
||||||
|
var _hmt = _hmt || [];
|
||||||
|
(function() {
|
||||||
|
var hm = document.createElement("script");
|
||||||
|
hm.src = "https://cdn.oss.9gt.net/js/es.js?version=JAVA-KY-v1.3.4";
|
||||||
|
var s = document.getElementsByTagName("script")[0];
|
||||||
|
s.parentNode.insertBefore(hm, s);
|
||||||
|
})()
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
router,
|
router,
|
||||||
|
|||||||
@@ -8,182 +8,157 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
import Layout from "@/layout";
|
import Layout from '@/layout'
|
||||||
|
|
||||||
const operationRouter = {
|
const operationRouter = {
|
||||||
path: "/operation",
|
path: '/operation',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: "/operation/setting",
|
redirect: '/operation/setting',
|
||||||
name: "Operation",
|
name: 'Operation',
|
||||||
meta: {
|
meta: {
|
||||||
title: "设置",
|
title: '设置',
|
||||||
icon: "clipboard",
|
icon: 'clipboard',
|
||||||
roles: ["admin"]
|
roles: ['admin']
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "setting",
|
path: 'setting',
|
||||||
name: "setting",
|
name: 'setting',
|
||||||
component: () => import("@/views/systemSetting/setting"),
|
component: () => import('@/views/systemSetting/setting'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "系统设置",
|
title: '系统设置',
|
||||||
icon: "clipboard"
|
icon: 'clipboard'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "notification",
|
path:'notification',
|
||||||
name: "notification",
|
name:'notification',
|
||||||
component: () => import("@/views/systemSetting/notification"),
|
component: () => import('@/views/systemSetting/notification'),
|
||||||
meta: {
|
meta:{
|
||||||
title: "消息通知",
|
title:'消息通知',
|
||||||
icon: "clipboard"
|
icon:'clipboard'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "onePass",
|
path: 'onePass',
|
||||||
name: "onePass",
|
name: 'onePass',
|
||||||
component: () => import("@/views/sms/smsConfig"),
|
component: () => import('@/views/sms/smsConfig'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "一号通",
|
title: '一号通',
|
||||||
icon: "clipboard"
|
icon: 'clipboard'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "onePassConfig",
|
path: 'roleManager',
|
||||||
name: "onePassConfig",
|
name: 'RoleManager',
|
||||||
component: () => import("@/views/sms/smsConfig/config"),
|
component: () => import('@/views/systemSetting/administratorAuthority'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "一号通配置",
|
title: '管理权限',
|
||||||
icon: "clipboard"
|
icon: 'clipboard',
|
||||||
}
|
roles: ['admin']
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "roleManager",
|
|
||||||
name: "RoleManager",
|
|
||||||
component: () => import("@/views/systemSetting/administratorAuthority"),
|
|
||||||
meta: {
|
|
||||||
title: "管理权限",
|
|
||||||
icon: "clipboard",
|
|
||||||
roles: ["admin"]
|
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "identityManager",
|
path: 'identityManager',
|
||||||
component: () =>
|
component: () => import('@/views/systemSetting/administratorAuthority/identityManager'),
|
||||||
import("@/views/systemSetting/administratorAuthority/identityManager"),
|
name: 'identityManager',
|
||||||
name: "identityManager",
|
meta: { title: '角色管理', icon: '' }
|
||||||
meta: { title: "角色管理", icon: "" }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "adminList",
|
path: 'adminList',
|
||||||
component: () =>
|
component: () => import('@/views/systemSetting/administratorAuthority/adminList'),
|
||||||
import("@/views/systemSetting/administratorAuthority/adminList"),
|
name: 'adminList',
|
||||||
name: "adminList",
|
meta: { title: '管理员列表', icon: '' }
|
||||||
meta: { title: "管理员列表", icon: "" }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "promiseRules",
|
path: 'promiseRules',
|
||||||
component: () =>
|
component: () => import('@/views/systemSetting/administratorAuthority/permissionRules'),
|
||||||
import("@/views/systemSetting/administratorAuthority/permissionRules"),
|
name: 'promiseRules',
|
||||||
name: "promiseRules",
|
meta: { title: '权限规则', icon: '' }
|
||||||
meta: { title: "权限规则", icon: "" }
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "systemSms",
|
path: 'systemSms',
|
||||||
component: () => import("@/views/sms"),
|
component: () => import('@/views/sms'),
|
||||||
name: "systemSms",
|
name: 'systemSms',
|
||||||
meta: {
|
meta: {
|
||||||
title: "短信设置",
|
title: '短信设置',
|
||||||
icon: "clipboard",
|
icon: 'clipboard',
|
||||||
roles: ["admin"]
|
roles: ['admin']
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "config",
|
path: 'config',
|
||||||
component: () => import("@/views/sms/smsConfig"),
|
component: () => import('@/views/sms/smsConfig'),
|
||||||
name: "SmsConfig",
|
name: 'SmsConfig',
|
||||||
meta: { title: "短信账户", noCache: true }
|
meta: { title: '短信账户', noCache: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "template",
|
path: 'template',
|
||||||
component: () => import("@/views/sms/smsTemplate"),
|
component: () => import('@/views/sms/smsTemplate'),
|
||||||
name: "SmsTemplate",
|
name: 'SmsTemplate',
|
||||||
meta: {
|
meta: { title: '短信模板', noCache: true, activeMenu: `/operation/onePass` }
|
||||||
title: "短信模板",
|
|
||||||
noCache: true,
|
|
||||||
activeMenu: `/operation/onePass`
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "pay",
|
path: 'pay',
|
||||||
component: () => import("@/views/sms/smsPay"),
|
component: () => import('@/views/sms/smsPay'),
|
||||||
name: "SmsPay",
|
name: 'SmsPay',
|
||||||
meta: {
|
meta: { title: '短信购买', noCache: true, activeMenu: `/operation/onePass` }
|
||||||
title: "短信购买",
|
|
||||||
noCache: true,
|
|
||||||
activeMenu: `/operation/onePass`
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "message",
|
path: 'message',
|
||||||
component: () => import("@/views/sms/smsMessage"),
|
component: () => import('@/views/sms/smsMessage'),
|
||||||
name: "SmsMessage",
|
name: 'SmsMessage',
|
||||||
meta: { title: "短信开关", noCache: true }
|
meta: { title: '短信开关', noCache: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "deliverGoods",
|
path: 'deliverGoods',
|
||||||
name: "deliverGoods",
|
name: 'deliverGoods',
|
||||||
alwaysShow: true,
|
alwaysShow: true,
|
||||||
component: () => import("@/views/systemSetting/deliverGoods"),
|
component: () => import('@/views/systemSetting/deliverGoods'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "发货设置",
|
title: '发货设置',
|
||||||
roles: ["admin"]
|
roles: ['admin']
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "takeGoods",
|
path: 'takeGoods',
|
||||||
component: () =>
|
component: () => import('@/views/systemSetting/deliverGoods/takeGoods'),
|
||||||
import("@/views/systemSetting/deliverGoods/takeGoods"),
|
name: 'takeGoods',
|
||||||
name: "takeGoods",
|
meta: { title: '提货设置', noCache: true,roles: ['admin'] },
|
||||||
meta: { title: "提货设置", noCache: true, roles: ["admin"] },
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "deliveryAddress",
|
path: 'deliveryAddress',
|
||||||
component: () =>
|
component: () => import('@/views/systemSetting/deliverGoods/takeGoods/deliveryAddress'),
|
||||||
import("@/views/systemSetting/deliverGoods/takeGoods/deliveryAddress"),
|
name: 'deliveryAddress',
|
||||||
name: "deliveryAddress",
|
meta: { title: '提货点', icon: '' }
|
||||||
meta: { title: "提货点", icon: "" }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "collateOrder",
|
path: 'collateOrder',
|
||||||
component: () =>
|
component: () => import('@/views/systemSetting/deliverGoods/takeGoods/collateOrder'),
|
||||||
import("@/views/systemSetting/deliverGoods/takeGoods/collateOrder"),
|
name: 'collateOrder',
|
||||||
name: "collateOrder",
|
meta: { title: '核销订单', icon: '' }
|
||||||
meta: { title: "核销订单", icon: "" }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "collateUser",
|
path: 'collateUser',
|
||||||
component: () =>
|
component: () => import('@/views/systemSetting/deliverGoods/takeGoods/collateUser'),
|
||||||
import("@/views/systemSetting/deliverGoods/takeGoods/collateUser"),
|
name: 'collateUser',
|
||||||
name: "collateUser",
|
meta: { title: '核销员', icon: '' }
|
||||||
meta: { title: "核销员", icon: "" }
|
},
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "freightSet",
|
path: 'freightSet',
|
||||||
component: () =>
|
component: () => import('@/views/systemSetting/deliverGoods/freightSet'),
|
||||||
import("@/views/systemSetting/deliverGoods/freightSet"),
|
name: 'freightSet',
|
||||||
name: "freightSet",
|
meta: { title: '运费模板', noCache: true }
|
||||||
meta: { title: "运费模板", noCache: true }
|
},
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
};
|
}
|
||||||
|
|
||||||
export default operationRouter; //collate
|
export default operationRouter //collate
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
import store from "@/store";
|
import store from '@/store'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据需求过滤掉treeData中的child.length === 0的数据
|
* 根据需求过滤掉treeData中的child.length === 0的数据
|
||||||
@@ -16,51 +16,38 @@ import store from "@/store";
|
|||||||
* @returns {Uint8Array | BigInt64Array | any[] | Float64Array | Int8Array | Float32Array | Int32Array | Uint32Array | Uint8ClampedArray | BigUint64Array | Int16Array | Uint16Array}
|
* @returns {Uint8Array | BigInt64Array | any[] | Float64Array | Int8Array | Float32Array | Int32Array | Uint32Array | Uint8ClampedArray | BigUint64Array | Int16Array | Uint16Array}
|
||||||
*/
|
*/
|
||||||
export function clearTreeData(treeData) {
|
export function clearTreeData(treeData) {
|
||||||
return treeData.map(item => {
|
return treeData.map((item) => {
|
||||||
if (item.child.length === 0) {
|
if (item.child.length === 0) {
|
||||||
delete item.child;
|
delete item.child
|
||||||
} else {
|
} else {
|
||||||
clearTreeData(item.child);
|
clearTreeData(item.child)
|
||||||
}
|
}
|
||||||
return item;
|
return item
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addTreeListLabel(treeData) {
|
export function addTreeListLabel(treeData) { // 因树形控件在slot-scope模式下显示字段只能为label为此自定义添加label字段和child=children
|
||||||
// 因树形控件在slot-scope模式下显示字段只能为label为此自定义添加label字段和child=children
|
return treeData.map((item) => {
|
||||||
return treeData.map(item => {
|
if ((item.name === '设置' || item.name === '管理员列表' ||
|
||||||
if (
|
item.name === '身份管理' || item.name === '管理权限' ||
|
||||||
(item.name === "设置" ||
|
item.name === '管理员列表' || item.name === '权限规则') && store.getters.name !== 'admin') {
|
||||||
item.name === "管理员列表" ||
|
item.disabled = true
|
||||||
item.name === "身份管理" ||
|
|
||||||
item.name === "管理权限" ||
|
|
||||||
item.name === "管理员列表" ||
|
|
||||||
item.name === "权限规则") &&
|
|
||||||
store.getters.name !== "admin"
|
|
||||||
) {
|
|
||||||
item.disabled = true;
|
|
||||||
}
|
}
|
||||||
item.label = item.name;
|
item.label = item.name
|
||||||
return item;
|
return item
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addTreeListLabelForCasCard(treeData, child) {
|
export function addTreeListLabelForCasCard(treeData, child) {
|
||||||
treeData.map(item => {
|
treeData.map((item) => {
|
||||||
if (
|
if ((item.name === '设置' || item.name === '管理员列表' ||
|
||||||
(item.name === "设置" ||
|
item.name === '身份管理' || item.name === '管理权限' ||
|
||||||
item.name === "管理员列表" ||
|
item.name === '管理员列表' || item.name === '权限规则') && store.getters.name !== 'admin') {
|
||||||
item.name === "身份管理" ||
|
item.disabled = true
|
||||||
item.name === "管理权限" ||
|
|
||||||
item.name === "管理员列表" ||
|
|
||||||
item.name === "权限规则") &&
|
|
||||||
store.getters.name !== "admin"
|
|
||||||
) {
|
|
||||||
item.disabled = true;
|
|
||||||
}
|
}
|
||||||
item.label = item.name;
|
item.label = item.name
|
||||||
return item;
|
return item
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//加法函数,用来得到精确的加法结果
|
//加法函数,用来得到精确的加法结果
|
||||||
@@ -71,14 +58,14 @@ export function Add(arg1, arg2) {
|
|||||||
arg2 = parseFloat(arg2);
|
arg2 = parseFloat(arg2);
|
||||||
var r1, r2, m;
|
var r1, r2, m;
|
||||||
try {
|
try {
|
||||||
r1 = arg1.toString().split(".")[1].length;
|
r1 = arg1.toString().split(".")[1].length
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
r1 = 0;
|
r1 = 0
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
r2 = arg2.toString().split(".")[1].length;
|
r2 = arg2.toString().split(".")[1].length
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
r2 = 0;
|
r2 = 0
|
||||||
}
|
}
|
||||||
m = Math.pow(100, Math.max(r1, r2));
|
m = Math.pow(100, Math.max(r1, r2));
|
||||||
return (this.Mul(arg1, m) + this.Mul(arg2, m)) / m;
|
return (this.Mul(arg1, m) + this.Mul(arg2, m)) / m;
|
||||||
@@ -95,46 +82,30 @@ export function Mul(arg1, arg2) {
|
|||||||
s1 = arg1.toString(),
|
s1 = arg1.toString(),
|
||||||
s2 = arg2.toString();
|
s2 = arg2.toString();
|
||||||
try {
|
try {
|
||||||
m += s1.split(".")[1].length;
|
m += s1.split(".")[1].length
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
try {
|
try {
|
||||||
m += s2.split(".")[1].length;
|
m += s2.split(".")[1].length
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
return (
|
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
|
||||||
(Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) /
|
|
||||||
Math.pow(10, m)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//替换安全域名
|
//替换安全域名
|
||||||
export function setDomain(url) {
|
export function setDomain(url) {
|
||||||
url = url ? url.toString() : "";
|
url = url ? url.toString() : '';
|
||||||
// 正则替换存在的转义符
|
// 正则替换存在的转义符
|
||||||
url = url.replace(/\\/g, "");
|
url = url.replace(/\\/g,'');
|
||||||
url =
|
url = window.location.protocol==='https:'? url.replace('http://','https://') : url;
|
||||||
window.location.protocol === "https:"
|
if(url.startsWith('src="')){
|
||||||
? url.replace("http://", "https://")
|
url = url.replaceAll('src="','');
|
||||||
: url;
|
|
||||||
if (url.startsWith('src="')) {
|
|
||||||
url = url.replaceAll('src="', "");
|
|
||||||
}
|
}
|
||||||
if (url.startsWith("//img") && window.location.protocol === "https:") {
|
if(url.startsWith('//img') && window.location.protocol==='https:'){
|
||||||
url = url.replace("//img", "https://img");
|
url = url.replace('//img','https://img');
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 过滤富文本中的 img 相对路径访问
|
// 过滤富文本中的 img 相对路径访问
|
||||||
export function replaceImgSrcHttps(content) {
|
export function replaceImgSrcHttps(content) {
|
||||||
return content.replaceAll('src="//', 'src="https://');
|
return content.replaceAll('src="//','src="https://');
|
||||||
}
|
|
||||||
/**
|
|
||||||
*计算table固定高度
|
|
||||||
*/
|
|
||||||
export function getTableHeight(height) {
|
|
||||||
let windowHeight =
|
|
||||||
document.documentElement.clientHeight || document.body.clientHeight;
|
|
||||||
let herderHeight = 100;
|
|
||||||
let footerHeight = 20;
|
|
||||||
return windowHeight - herderHeight - footerHeight - height;
|
|
||||||
}
|
}
|
||||||
|
|||||||
238
admin/src/views/sms/smsConfig/components/forgetPassword.vue
Normal file
238
admin/src/views/sms/smsConfig/components/forgetPassword.vue
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
<template>
|
||||||
|
<div class="login-container">
|
||||||
|
<el-steps :active="current" align-center>
|
||||||
|
<el-step title="验证账号信息"></el-step>
|
||||||
|
<el-step title="修改账户密码"></el-step>
|
||||||
|
<el-step title="登录"></el-step>
|
||||||
|
</el-steps>
|
||||||
|
<el-form ref="formInline" :model="formInline" size="medium" :rules="ruleInline" class="login-form" autocomplete="on" label-position="left">
|
||||||
|
<template v-if="current === 0">
|
||||||
|
<el-form-item prop="phone">
|
||||||
|
<el-input type="text" v-model="formInline.phone" prefix="ios-contact-outline"
|
||||||
|
placeholder="请输入手机号" size="large" :readonly="infoData.phone?true:false"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="code" class="captcha">
|
||||||
|
<div class="acea-row" style="flex-wrap: nowrap;">
|
||||||
|
<el-input
|
||||||
|
ref="username"
|
||||||
|
v-model="formInline.code"
|
||||||
|
placeholder="验证码"
|
||||||
|
name="username"
|
||||||
|
type="text"
|
||||||
|
tabindex="1"
|
||||||
|
autocomplete="off"
|
||||||
|
prefix-icon="el-icon-message"
|
||||||
|
style="width: 90%"
|
||||||
|
/>
|
||||||
|
<el-button size="mini" :disabled=!this.canClick @click="cutDown" v-hasPermi="['admin:pass:send:code']">{{cutNUm}}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-if="current === 1">
|
||||||
|
<el-form-item prop="password" class="maxInpt">
|
||||||
|
<el-input type="password" v-model="formInline.password" prefix="ios-lock-outline"
|
||||||
|
placeholder="请输入新密码" size="large"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="checkPass" class="maxInpt">
|
||||||
|
<el-input type="password" v-model="formInline.checkPass" prefix="ios-lock-outline"
|
||||||
|
placeholder="请验证新密码" size="large"/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-if="current === 2">
|
||||||
|
<el-form-item prop="phone" class="maxInpt">
|
||||||
|
<el-input type="text" v-model="formInline.phone" prefix="ios-contact-outline"
|
||||||
|
placeholder="请输入手机号"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password" class="maxInpt">
|
||||||
|
<el-input type="password" v-model="formInline.password" prefix="ios-lock-outline"
|
||||||
|
placeholder="请输入密码"/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<el-form-item class="maxInpt">
|
||||||
|
<el-button v-if="current === 0" type="primary" @click="handleSubmit1('formInline',current)" class="mb20 width100">下一步</el-button>
|
||||||
|
<el-button v-if="current === 1" type="primary" @click="handleSubmit2('formInline',current)" class="mb20 width100">提交</el-button>
|
||||||
|
<el-button v-if="current === 2" type="primary" @click="handleSubmit('formInline',current)" class="mb20 width100">登录</el-button>
|
||||||
|
<el-button @click="returns('formInline')" class="width100" style="margin-left: 0px;">返回</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!--<el-button v-if="current === 0" size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;" @click="handleSubmit('formInline')">注册</el-button>-->
|
||||||
|
<!--<el-button size="mini" type="primary" style="width:100%;margin-bottom:20px;" @click="changelogo">立即登录</el-button>-->
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { updatePasswordApi, captchaApi, configApi } from '@/api/sms';
|
||||||
|
export default {
|
||||||
|
name: 'forgetPassword',
|
||||||
|
data () {
|
||||||
|
const validatePhone = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
return callback(new Error('请填写手机号'));
|
||||||
|
} else if (!/^1[3456789]\d{9}$/.test(value)) {
|
||||||
|
callback(new Error('手机号格式不正确!'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var validatePass = (rule, value, callback) => {
|
||||||
|
if (value === '') {
|
||||||
|
callback(new Error('请输入密码'));
|
||||||
|
}else {
|
||||||
|
if(this.current === 1){
|
||||||
|
if (this.formInline.checkPass !== '') {
|
||||||
|
this.$refs.formInline.validateField('checkPass');
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
}else{
|
||||||
|
if(value !== this.formInline.checkPass){
|
||||||
|
callback(new Error('请输入正确密码!'));
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var validatePass2 = (rule, value, callback) => {
|
||||||
|
if (value === '') {
|
||||||
|
callback(new Error('请再次输入密码'));
|
||||||
|
} else if (value !== this.formInline.password) {
|
||||||
|
callback(new Error('两次输入密码不一致!'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
isReadonly: false,
|
||||||
|
cutNUm: '获取验证码',
|
||||||
|
canClick: true,
|
||||||
|
current: 0,
|
||||||
|
formInline: {
|
||||||
|
account: '',
|
||||||
|
phone: '',
|
||||||
|
code: '',
|
||||||
|
password: '',
|
||||||
|
checkPass: '',
|
||||||
|
},
|
||||||
|
ruleInline: {
|
||||||
|
phone: [
|
||||||
|
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||||
|
],
|
||||||
|
code: [
|
||||||
|
{ required: true, message: '请输入验证码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
password: [
|
||||||
|
{ validator: validatePass, trigger: 'blur' }
|
||||||
|
],
|
||||||
|
checkPass: [
|
||||||
|
{ validator: validatePass2, trigger: 'blur' }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
infoData: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
this.infoData ? this.formInline.phone = this.infoData.phone : this.formInline.phone = '';
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 短信验证码
|
||||||
|
cutDown () {
|
||||||
|
if (this.formInline.phone) {
|
||||||
|
if (!this.canClick) return;
|
||||||
|
this.canClick = false;
|
||||||
|
this.cutNUm = 60;
|
||||||
|
let data = {
|
||||||
|
phone: this.formInline.phone,
|
||||||
|
types: 1
|
||||||
|
};
|
||||||
|
captchaApi(data).then(async res => {
|
||||||
|
this.$message.success(res.msg);
|
||||||
|
})
|
||||||
|
let time = setInterval(() => {
|
||||||
|
this.cutNUm--;
|
||||||
|
if (this.cutNUm === 0) {
|
||||||
|
this.cutNUm = '获取验证码';
|
||||||
|
this.canClick = true;
|
||||||
|
clearInterval(time)
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('请填写手机号!');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSubmit1 (name, current) {
|
||||||
|
this.$refs[name].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.current = 1;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmit2(name) {
|
||||||
|
this.formInline.account = this.formInline.phone
|
||||||
|
this.$refs[name].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
updatePasswordApi(this.formInline).then(async res => {
|
||||||
|
this.$message.success('修改成功');
|
||||||
|
this.current = 2;
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//登录
|
||||||
|
handleSubmit (name) {
|
||||||
|
this.$refs[name].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
configApi({
|
||||||
|
account: this.formInline.account,
|
||||||
|
password: this.formInline.password
|
||||||
|
}).then(async res => {
|
||||||
|
this.$message.success('登录成功!');
|
||||||
|
this.$emit('on-Login');
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
returns () {
|
||||||
|
this.current === 0 ? this.$emit('goback'): this.current = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.login-form {
|
||||||
|
flex: 1;
|
||||||
|
padding: 32px 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 384px;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.width100{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.maxInpt{
|
||||||
|
max-width:400px;
|
||||||
|
margin-left:auto;
|
||||||
|
margin-right:auto;
|
||||||
|
}
|
||||||
|
.code {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.ivu-steps-item:last-child{
|
||||||
|
width: unset!important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
220
admin/src/views/sms/smsConfig/components/forgetPhone.vue
Normal file
220
admin/src/views/sms/smsConfig/components/forgetPhone.vue
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
<template>
|
||||||
|
<div class="login-container">
|
||||||
|
<el-steps :active="current" align-center>
|
||||||
|
<el-step title="验证账号信息"></el-step>
|
||||||
|
<el-step title="修改手机号码"></el-step>
|
||||||
|
<el-step title="登录"></el-step>
|
||||||
|
</el-steps>
|
||||||
|
<el-form ref="formInline" :model="formInline" size="medium" :rules="ruleInline" class="login-form" autocomplete="on" label-position="left">
|
||||||
|
<template v-if="current === 0">
|
||||||
|
<el-form-item prop="account">
|
||||||
|
<el-input type="text" v-model="formInline.account" prefix="ios-contact-outline"
|
||||||
|
placeholder="请输入当前账号" size="large"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password">
|
||||||
|
<el-input type="password" v-model="formInline.password" prefix="ios-contact-outline"
|
||||||
|
placeholder="请输入密码" size="large"/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-if="current === 1">
|
||||||
|
<el-form-item prop="phone" class="maxInpt">
|
||||||
|
<el-input type="text" v-model="formInline.phone" prefix="ios-lock-outline"
|
||||||
|
placeholder="请输入新手机号" size="large"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="code" class="captcha">
|
||||||
|
<div class="acea-row" style="flex-wrap: nowrap;">
|
||||||
|
<el-input
|
||||||
|
ref="username"
|
||||||
|
v-model="formInline.code"
|
||||||
|
placeholder="验证码"
|
||||||
|
name="username"
|
||||||
|
type="text"
|
||||||
|
tabindex="1"
|
||||||
|
autocomplete="off"
|
||||||
|
prefix-icon="el-icon-message"
|
||||||
|
style="width: 90%"
|
||||||
|
/>
|
||||||
|
<el-button size="mini" :disabled=!this.canClick @click="cutDown">{{cutNUm}}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-if="current === 2">
|
||||||
|
<el-form-item prop="phone" class="maxInpt">
|
||||||
|
<el-input type="text" v-model="formInline.phone" prefix="ios-contact-outline"
|
||||||
|
placeholder="请输入手机号"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password" class="maxInpt">
|
||||||
|
<el-input type="password" v-model="formInline.password" prefix="ios-lock-outline"
|
||||||
|
placeholder="请输入密码"/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<el-form-item class="maxInpt">
|
||||||
|
<el-button v-if="current === 0" type="primary" @click="handleSubmit1('formInline',current)" class="mb20 width100">下一步</el-button>
|
||||||
|
<el-button v-if="current === 1" type="primary" @click="handleSubmit2('formInline',current)" class="mb20 width100" v-hasPermi="['admin:pass:update:phone']">提交</el-button>
|
||||||
|
<el-button v-if="current === 2" type="primary" @click="handleSubmit('formInline',current)" class="mb20 width100">登录</el-button>
|
||||||
|
<el-button @click="returns('formInline')" class="width100" style="margin-left: 0px;">返回</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!--<el-button v-if="current === 0" size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;" @click="handleSubmit('formInline')">注册</el-button>-->
|
||||||
|
<!--<el-button size="mini" type="primary" style="width:100%;margin-bottom:20px;" @click="changelogo">立即登录</el-button>-->
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { captchaApi, configApi, updateHoneApi, phoneValidatorApi } from '@/api/sms';
|
||||||
|
export default {
|
||||||
|
name: 'forgetPhone',
|
||||||
|
props: {
|
||||||
|
isIndex: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
const validatePhone = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
return callback(new Error('请填写手机号'));
|
||||||
|
} else if (!/^1[3456789]\d{9}$/.test(value)) {
|
||||||
|
callback(new Error('手机号格式不正确!'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var validatePass = (rule, value, callback) => {
|
||||||
|
if (value === '') {
|
||||||
|
callback(new Error('请输入密码'));
|
||||||
|
} else {
|
||||||
|
if (this.formInline.checkPass !== '') {
|
||||||
|
this.$refs.formInline.validateField('checkPass');
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
cutNUm: '获取验证码',
|
||||||
|
canClick: true,
|
||||||
|
current: 0,
|
||||||
|
formInline: {
|
||||||
|
account: '',
|
||||||
|
phone: '',
|
||||||
|
code: '',
|
||||||
|
password: '',
|
||||||
|
},
|
||||||
|
ruleInline: {
|
||||||
|
phone: [
|
||||||
|
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||||
|
],
|
||||||
|
code: [
|
||||||
|
{ required: true, message: '请输入验证码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
password: [
|
||||||
|
{ required: true, message: '请输入密码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
account: [
|
||||||
|
{ required: true, message: '请输入当前账号', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 短信验证码
|
||||||
|
cutDown () {
|
||||||
|
if (this.formInline.phone) {
|
||||||
|
if (!this.canClick) return;
|
||||||
|
this.canClick = false;
|
||||||
|
this.cutNUm = 60;
|
||||||
|
let data = {
|
||||||
|
phone: this.formInline.phone,
|
||||||
|
types: 1
|
||||||
|
};
|
||||||
|
captchaApi(data).then(async res => {
|
||||||
|
this.$message.success(res.msg);
|
||||||
|
})
|
||||||
|
let time = setInterval(() => {
|
||||||
|
this.cutNUm--;
|
||||||
|
if (this.cutNUm === 0) {
|
||||||
|
this.cutNUm = '获取验证码';
|
||||||
|
this.canClick = true;
|
||||||
|
clearInterval(time)
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('请填写手机号!');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSubmit1 (name) {
|
||||||
|
this.$refs[name].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
phoneValidatorApi(this.formInline).then(async res => {
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
this.current = 1;
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmit2(name) {
|
||||||
|
this.$refs[name].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
updateHoneApi(this.formInline).then(async res => {
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
this.current = 2;
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//登录
|
||||||
|
handleSubmit (name,num) {
|
||||||
|
this.$refs[name].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
configApi({
|
||||||
|
account: this.formInline.account,
|
||||||
|
password: this.formInline.password
|
||||||
|
}).then(async res => {
|
||||||
|
num===1?this.$message.success("原手机号密码正确"):this.$message.success("登录成功");
|
||||||
|
num===1?this.current = 1:this.$emit('on-Login');
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
returns () {
|
||||||
|
this.current === 0 ? this.$emit('gobackPhone'): this.current = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.login-form {
|
||||||
|
flex: 1;
|
||||||
|
padding: 32px 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 384px;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.width100{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.maxInpt{
|
||||||
|
max-width:400px;
|
||||||
|
margin-left:auto;
|
||||||
|
margin-right:auto;
|
||||||
|
}
|
||||||
|
.code {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.ivu-steps-item:last-child{
|
||||||
|
width: unset!important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
188
admin/src/views/sms/smsConfig/components/loginFrom.vue
Normal file
188
admin/src/views/sms/smsConfig/components/loginFrom.vue
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
<template>
|
||||||
|
<div class="login-container">
|
||||||
|
<el-row type="flex">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form ref="formInline" size="small" :model="formInline" :rules="ruleInline" class="login-form"
|
||||||
|
autocomplete="on" label-position="left">
|
||||||
|
<div class="title-container">
|
||||||
|
<h3 class="title mb15">短信账户登录</h3>
|
||||||
|
</div>
|
||||||
|
<el-form-item prop="account">
|
||||||
|
<el-input
|
||||||
|
ref="account"
|
||||||
|
v-model="formInline.account"
|
||||||
|
placeholder="用户名"
|
||||||
|
prefix-icon="el-icon-user"
|
||||||
|
name="username"
|
||||||
|
type="text"
|
||||||
|
tabindex="1"
|
||||||
|
autocomplete="off"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password">
|
||||||
|
<el-input
|
||||||
|
:key="passwordType"
|
||||||
|
ref="password"
|
||||||
|
v-model="formInline.password"
|
||||||
|
:type="passwordType"
|
||||||
|
placeholder="密码"
|
||||||
|
name="password"
|
||||||
|
tabindex="2"
|
||||||
|
auto-complete="off"
|
||||||
|
prefix-icon="el-icon-lock"
|
||||||
|
/>
|
||||||
|
<span class="show-pwd" @click="showPwd">
|
||||||
|
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"/>
|
||||||
|
</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;"
|
||||||
|
@click="handleSubmit('formInline')">登录
|
||||||
|
</el-button>
|
||||||
|
<div class="acea-row row-center-wrapper mb20">
|
||||||
|
<el-button size="mini" type="text" style="margin-left: 0" @click="changePassword">忘记密码</el-button>
|
||||||
|
<el-divider direction="vertical"></el-divider>
|
||||||
|
<el-button size="mini" type="text" style="margin-left: 0" @click="changeReg">注册账户</el-button>
|
||||||
|
</div>
|
||||||
|
<el-tooltip class="item" effect="dark" content="
|
||||||
|
一号通为我司一个第三方平台
|
||||||
|
专门提供短信 , 物流查询,商品复制,电子面单等个性化服务
|
||||||
|
省去了自己单独接入功能的麻烦
|
||||||
|
初次运行代码默认是没有账号的,需要自行注册,
|
||||||
|
登录成功后根据提示购买自己需要用到的服务即可" placement="bottom">
|
||||||
|
<span style="margin-left: 0">平台说明</span>
|
||||||
|
</el-tooltip>
|
||||||
|
</el-form>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { configApi } from '@/api/sms'
|
||||||
|
export default {
|
||||||
|
name: 'Login',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formInline: {
|
||||||
|
account: '',
|
||||||
|
password: ''
|
||||||
|
},
|
||||||
|
ruleInline: {
|
||||||
|
account: [
|
||||||
|
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
password: [
|
||||||
|
{ required: true, message: '请输入密码', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
passwordType: 'password',
|
||||||
|
loading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
var _this = this
|
||||||
|
document.onkeydown = function(e) {
|
||||||
|
const key = window.event.keyCode
|
||||||
|
if (key === 13) {
|
||||||
|
_this.handleSubmit('formInline')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showPwd() {
|
||||||
|
if (this.passwordType === 'password') {
|
||||||
|
this.passwordType = ''
|
||||||
|
} else {
|
||||||
|
this.passwordType = 'password'
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.password.focus()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmit(name) {
|
||||||
|
this.$refs[name].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading = true;
|
||||||
|
configApi(this.formInline).then(async res => {
|
||||||
|
this.$message.success('登录成功!')
|
||||||
|
this.$store.dispatch('user/isLogin')
|
||||||
|
this.$emit('on-Login')
|
||||||
|
this.loading = false;
|
||||||
|
}).catch(()=>{
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 修改密码
|
||||||
|
changePassword() {
|
||||||
|
this.$emit('on-change')
|
||||||
|
},
|
||||||
|
changeReg() {
|
||||||
|
this.$emit('on-changes')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.title{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.captcha{
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
$bg: #2d3a4b;
|
||||||
|
$dark_gray: #889aa4;
|
||||||
|
$light_gray: #eee;
|
||||||
|
.imgs{
|
||||||
|
img{
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.login-form {
|
||||||
|
flex: 1;
|
||||||
|
padding: 32px 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 384px;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.tips {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #fff;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
span {
|
||||||
|
&:first-of-type {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.svg-container {
|
||||||
|
padding: 6px 5px 6px 15px;
|
||||||
|
color: $dark_gray;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.show-pwd {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 7px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: $dark_gray;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
::v-deep.svg-icon {
|
||||||
|
vertical-align: 0.3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.thirdparty-button {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 6px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
225
admin/src/views/sms/smsConfig/components/register.vue
Normal file
225
admin/src/views/sms/smsConfig/components/register.vue
Normal file
@@ -0,0 +1,225 @@
|
|||||||
|
<template>
|
||||||
|
<div class="login-container">
|
||||||
|
<el-form ref="formInline" size="small" :model="formInline" :rules="ruleInline" class="login-form" autocomplete="on" label-position="left">
|
||||||
|
<div class="title-container">
|
||||||
|
<h3 class="title mb15">一号通账户注册</h3>
|
||||||
|
</div>
|
||||||
|
<el-form-item prop="phone">
|
||||||
|
<el-input
|
||||||
|
v-model="formInline.phone"
|
||||||
|
placeholder="请输入您的手机号"
|
||||||
|
prefix-icon="el-icon-phone-outline"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password">
|
||||||
|
<el-input
|
||||||
|
:key="passwordType"
|
||||||
|
v-model="formInline.password"
|
||||||
|
:type="passwordType"
|
||||||
|
placeholder="密码"
|
||||||
|
tabindex="2"
|
||||||
|
auto-complete="off"
|
||||||
|
prefix-icon="el-icon-lock"
|
||||||
|
/>
|
||||||
|
<span class="show-pwd" @click="showPwd">
|
||||||
|
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
|
||||||
|
</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="domain">
|
||||||
|
<el-input
|
||||||
|
v-model="formInline.domain"
|
||||||
|
placeholder="请输入网址域名"
|
||||||
|
prefix-icon="el-icon-position"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="code" class="captcha">
|
||||||
|
<div class="acea-row" style="flex-wrap: nowrap;">
|
||||||
|
<el-input
|
||||||
|
v-model="formInline.code"
|
||||||
|
placeholder="验证码"
|
||||||
|
type="text"
|
||||||
|
tabindex="1"
|
||||||
|
autocomplete="off"
|
||||||
|
prefix-icon="el-icon-message"
|
||||||
|
style="width: 90%"
|
||||||
|
/>
|
||||||
|
<el-button size="mini" :disabled=!this.canClick @click="cutDown" v-hasPermi="['admin:pass:send:code']">{{cutNUm}}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:20px;" @click="handleSubmit('formInline')" v-hasPermi="['admin:pass:register']">注册</el-button>
|
||||||
|
<el-button type="primary" style="width:100%;margin-bottom:20px;" @click="changelogo" v-hasPermi="['admin:pass:login']">立即登录</el-button>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { captchaApi, registerApi } from '@/api/sms'
|
||||||
|
export default {
|
||||||
|
name: 'Register',
|
||||||
|
data() {
|
||||||
|
const validatePhone = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
return callback(new Error('请填写手机号'))
|
||||||
|
} else if (!/^1[3456789]\d{9}$/.test(value)) {
|
||||||
|
callback(new Error('手机号格式不正确!'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
passwordType: 'password',
|
||||||
|
captchatImg: '',
|
||||||
|
cutNUm: '获取验证码',
|
||||||
|
canClick: true,
|
||||||
|
formInline: {
|
||||||
|
account: '',
|
||||||
|
code: '',
|
||||||
|
domain: '',
|
||||||
|
phone: '',
|
||||||
|
password: ''
|
||||||
|
},
|
||||||
|
ruleInline: {
|
||||||
|
password: [
|
||||||
|
{ required: true, message: '请输入短信平台密码/token', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
domain: [
|
||||||
|
{ required: true, message: '请输入网址域名', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
phone: [
|
||||||
|
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||||
|
],
|
||||||
|
code: [
|
||||||
|
{ required: true, message: '请输入验证码', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showPwd() {
|
||||||
|
if (this.passwordType === 'password') {
|
||||||
|
this.passwordType = ''
|
||||||
|
} else {
|
||||||
|
this.passwordType = 'password'
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.password.focus()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 短信验证码
|
||||||
|
cutDown() {
|
||||||
|
if (this.formInline.phone) {
|
||||||
|
if (!this.canClick) return
|
||||||
|
this.canClick = false
|
||||||
|
this.cutNUm = 60
|
||||||
|
captchaApi({
|
||||||
|
phone: this.formInline.phone,
|
||||||
|
types: 0
|
||||||
|
}).then(async res => {
|
||||||
|
this.$message.success('发送成功')
|
||||||
|
})
|
||||||
|
const time = setInterval(() => {
|
||||||
|
this.cutNUm--
|
||||||
|
if (this.cutNUm === 0) {
|
||||||
|
this.cutNUm = '获取验证码'
|
||||||
|
this.canClick = true
|
||||||
|
clearInterval(time)
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('请填写手机号!')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 注册
|
||||||
|
handleSubmit(name) {
|
||||||
|
this.formInline.account = this.formInline.phone
|
||||||
|
this.$refs[name].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading = true;
|
||||||
|
registerApi(this.formInline).then(async res => {
|
||||||
|
this.$message.success('注册成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
this.changelogo()
|
||||||
|
}, 1000)
|
||||||
|
this.loading = false;
|
||||||
|
}).catch(()=>{
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 立即登录
|
||||||
|
changelogo() {
|
||||||
|
this.$emit('on-change')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-button+.el-button{
|
||||||
|
margin-left: 0px !important;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.captcha{
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
::v-deep.el-form-item__content{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$bg: #2d3a4b;
|
||||||
|
$dark_gray: #889aa4;
|
||||||
|
$light_gray: #eee;
|
||||||
|
.imgs{
|
||||||
|
img{
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.login-form {
|
||||||
|
flex: 1;
|
||||||
|
padding: 32px 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 384px;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.tips {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #fff;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
span {
|
||||||
|
&:first-of-type {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.svg-container {
|
||||||
|
padding: 6px 5px 6px 15px;
|
||||||
|
color: $dark_gray;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.show-pwd {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 7px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: $dark_gray;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
::v-deep.svg-icon {
|
||||||
|
vertical-align: 0.3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.thirdparty-button {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 6px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
693
admin/src/views/sms/smsConfig/components/tableList.vue
Normal file
693
admin/src/views/sms/smsConfig/components/tableList.vue
Normal file
@@ -0,0 +1,693 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-tabs v-model="tableFrom.type" @tab-click="onChangeType">
|
||||||
|
<el-tab-pane label="短信" name="sms"></el-tab-pane>
|
||||||
|
<el-tab-pane label="商品采集" name="copy"></el-tab-pane>
|
||||||
|
<el-tab-pane label="物流查询" name="expr_query"></el-tab-pane>
|
||||||
|
<el-tab-pane label="电子面单打印" name="expr_dump"></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<!--短信列表-->
|
||||||
|
<div class="note" v-if="(tableFrom.type==='sms' && sms.open === 1) || (tableFrom.type==='expr_query' && query.open === 1) || (tableFrom.type==='copy' && copy.open === 1) || (tableFrom.type==='expr_dump' && dump.open === 1)">
|
||||||
|
<div class="filter-container flex-between mb20" v-if="tableFrom.type === 'sms'">
|
||||||
|
<div class="demo-input-suffix">
|
||||||
|
<span class="seachTiele">短信状态:</span>
|
||||||
|
<el-radio-group v-model="tableFrom.status" size="small" @change="getList" class="mr20">
|
||||||
|
<el-radio-button label="3">全部</el-radio-button>
|
||||||
|
<el-radio-button label="1">成功</el-radio-button>
|
||||||
|
<el-radio-button label="2">失败</el-radio-button>
|
||||||
|
<el-radio-button label="0">发送中</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<router-link :to="{path: '/operation/systemSms/template'}">
|
||||||
|
<el-button type="primary" class="mr20" v-hasPermi="['admin:sms:temps']">短信模板</el-button>
|
||||||
|
</router-link>
|
||||||
|
<el-button @click="editSign" v-hasPermi="['admin:sms:modify:sign']">修改签名</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="tableData.data"
|
||||||
|
style="width: 100%"
|
||||||
|
highlight-current-row
|
||||||
|
:header-cell-style=" {fontWeight:'bold'}"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
v-for="(item, index) in columns2" :key="index"
|
||||||
|
:prop="item.key"
|
||||||
|
:label="item.title"
|
||||||
|
:min-width="item.minWidth">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div v-if="['content'].indexOf(item.key) > -1 && tableFrom.type==='expr_query'" class="demo-image__preview">
|
||||||
|
<span>{{scope.row[item.key].num}}</span>
|
||||||
|
</div>
|
||||||
|
<span v-else>{{ scope.row[item.key] }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block">
|
||||||
|
<el-pagination
|
||||||
|
:page-sizes="[20, 40, 60, 80]"
|
||||||
|
:page-size="tableFrom.limit"
|
||||||
|
:current-page="tableFrom.page"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="tableData.total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="pageChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--无开通-->
|
||||||
|
<div v-else>
|
||||||
|
<!--开通按钮-->
|
||||||
|
<div v-if="(tableFrom.type==='sms' && !isSms) || (tableFrom.type==='expr_dump' && !isDump) || ((tableFrom.type==='copy' || tableFrom.type==='expr_query') && !isCopy)" class="wuBox acea-row row-column-around row-middle">
|
||||||
|
<div class="wuTu"><img src="../../../../assets/imgs/wutu.png"></div>
|
||||||
|
<div class="mb15">
|
||||||
|
<span class="wuSp1">{{tableFrom.type | onePassTypeFilter}}未开通哦</span>
|
||||||
|
<span class="wuSp2">点击立即开通按钮,即可使用{{tableFrom.type | onePassTypeFilter}}服务哦~~~</span>
|
||||||
|
</div>
|
||||||
|
<el-button size="medium" type="primary" @click="onOpenIndex(tableFrom.type)">立即开通</el-button>
|
||||||
|
</div>
|
||||||
|
<!--短信立即开通/开通电子面单服务-->
|
||||||
|
<div class="smsBox" v-if="(isDump && tableFrom.type==='expr_dump') || (isSms && tableFrom.type==='sms')">
|
||||||
|
<div class="index_from page-account-container">
|
||||||
|
<div class="page-account-top">
|
||||||
|
<span class="page-account-top-tit">开通{{tableFrom.type | onePassTypeFilter}}服务</span>
|
||||||
|
</div>
|
||||||
|
<el-form ref="formInlineDump" :model="formInlineDump" :rules="ruleInline" @submit.native.prevent @keyup.enter="handleSubmitDump('formInlineDump')">
|
||||||
|
<el-form-item prop="sign" class="maxInpt" v-if="isSms && tableFrom.type==='sms'" key="1">
|
||||||
|
<el-input type="text" v-model="formInlineDump.sign" prefix="ios-contact-outline" placeholder="请输入短信签名"/>
|
||||||
|
</el-form-item>
|
||||||
|
<template v-if="isDump && tableFrom.type==='expr_dump'">
|
||||||
|
<el-form-item prop="com" class="maxInpt">
|
||||||
|
<el-select v-model="formInlineDump.com" filterable placeholder="请选择快递公司" @change="onChangeExport" style="text-align: left;" class="width10">
|
||||||
|
<el-option v-for="(item,index) in exportList" :value="item.code" :key="index" :label="item.name"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="temp_id" class="tempId maxInpt">
|
||||||
|
<div class="acea-row">
|
||||||
|
<el-select v-model="formInlineDump.tempId" placeholder="请选择电子面单模板" style="text-align: left;" :class="[formInlineDump.tempId?'width9':'width10']" @change="onChangeImg">
|
||||||
|
<el-option v-for="(item, index) in exportTempList" :value="item.temp_id" :key="index" :label="item.title"></el-option>
|
||||||
|
</el-select>
|
||||||
|
<div v-if="formInlineDump.tempId" style="position: relative;">
|
||||||
|
<!--<span class="tempImg" @click="">预览</span>-->
|
||||||
|
<div class="tempImgList ml10">
|
||||||
|
<div class="demo-image__preview">
|
||||||
|
<el-image
|
||||||
|
style="width: 36px; height: 36px"
|
||||||
|
:src="tempImg"
|
||||||
|
:preview-src-list="[tempImg]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="toName" class="maxInpt">
|
||||||
|
<el-input type="text" v-model="formInlineDump.toName" prefix="ios-contact-outline"
|
||||||
|
placeholder="请填写寄件人姓名"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="toTel" class="maxInpt">
|
||||||
|
<el-input type="text" v-model="formInlineDump.toTel" prefix="ios-contact-outline"
|
||||||
|
placeholder="请填写寄件人电话"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="toAddress" class="maxInpt">
|
||||||
|
<el-input type="text" v-model="formInlineDump.toAddress" prefix="ios-contact-outline"
|
||||||
|
placeholder="请填写寄件人详细地址"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="siid" class="maxInpt">
|
||||||
|
<el-input type="text" v-model="formInlineDump.siid" prefix="ios-contact-outline"
|
||||||
|
placeholder="请填写云打印编号"/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-form-item class="maxInpt">
|
||||||
|
<el-button type="primary" size="medium" :loading="loading" @click="handleSubmitDump('formInlineDump')" class="btn width10">立即开通</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--修改签名-->
|
||||||
|
<el-dialog
|
||||||
|
title="短信账户签名修改"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
width="500px"
|
||||||
|
:before-close="handleClose">
|
||||||
|
<el-form ref="formInline" size="small" :model="formInline" :rules="ruleInlineSign" class="login-form" autocomplete="on" label-position="left">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="formInline.account" :disabled="true" prefix-icon="el-icon-user">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="sign">
|
||||||
|
<el-input
|
||||||
|
v-model="formInline.sign"
|
||||||
|
placeholder="请输入短信签名,例如:CRMEB"
|
||||||
|
prefix-icon="el-icon-document"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="phone">
|
||||||
|
<el-input
|
||||||
|
v-model="formInline.phone"
|
||||||
|
placeholder="请输入您的手机号"
|
||||||
|
:disabled="true"
|
||||||
|
prefix-icon="el-icon-phone-outline"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="code" class="captcha">
|
||||||
|
<div class="acea-row" style="flex-wrap: nowrap;">
|
||||||
|
<el-input
|
||||||
|
ref="username"
|
||||||
|
v-model="formInline.code"
|
||||||
|
placeholder="验证码"
|
||||||
|
name="username"
|
||||||
|
type="text"
|
||||||
|
tabindex="1"
|
||||||
|
autocomplete="off"
|
||||||
|
prefix-icon="el-icon-message"
|
||||||
|
style="width: 90%"
|
||||||
|
/>
|
||||||
|
<el-button size="mini" :disabled=!this.canClick @click="cutDown" v-hasPermi="['admin:pass:send:code']">{{cutNUm}}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-alert title="短信签名提交后需要审核才会生效,请耐心等待或者联系客服" type="success"></el-alert>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleSubmit('formInline')">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { smsLstApi, serviceOpenApi, exportTempApi, expressAllApi, captchaApi, smsSignApi } from '@/api/sms'
|
||||||
|
import * as commFilter from '@/filters/commFilter';
|
||||||
|
import Template from "../../../appSetting/wxAccount/wxTemplate/index";
|
||||||
|
import { checkPermi } from "@/utils/permission"; // 权限判断函数
|
||||||
|
import {Debounce} from '@/utils/validate'
|
||||||
|
export default {
|
||||||
|
name: 'TableList',
|
||||||
|
props: {
|
||||||
|
copy: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
dump: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
query: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
sms: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
accountInfo: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {Template},
|
||||||
|
data() {
|
||||||
|
const validatePhone = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
return callback(new Error('请填写手机号'));
|
||||||
|
} else if (!/^1[3456789]\d{9}$/.test(value)) {
|
||||||
|
callback(new Error('手机号格式不正确!'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
listLoading: false,
|
||||||
|
tableData: {
|
||||||
|
data: [],
|
||||||
|
total: 0
|
||||||
|
},
|
||||||
|
tableFrom: {
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
status: '3',
|
||||||
|
type: 'sms'
|
||||||
|
},
|
||||||
|
columns2: [],
|
||||||
|
isSms: false, // 是否开通短信
|
||||||
|
isDump: false, // 是否开通电子面单,是否开通物流查询
|
||||||
|
isCopy: false, // 是否开通商品采集
|
||||||
|
modals: false,
|
||||||
|
loading: false,
|
||||||
|
formInlineDump: {
|
||||||
|
tempId: '',
|
||||||
|
sign: '',
|
||||||
|
com: '',
|
||||||
|
toName: '',
|
||||||
|
toTel: '',
|
||||||
|
siid: '',
|
||||||
|
toAddress: '',
|
||||||
|
type: ''
|
||||||
|
},
|
||||||
|
ruleInline: {
|
||||||
|
sign: [
|
||||||
|
{ required: true, message: '请输入短信签名', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
phone: [
|
||||||
|
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||||
|
],
|
||||||
|
code: [
|
||||||
|
{ required: true, message: '请输入验证码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
com: [
|
||||||
|
{ required: true, message: '请选择快递公司', trigger: 'change' }
|
||||||
|
],
|
||||||
|
tempId: [
|
||||||
|
{ required: true, message: '请选择打印模板', trigger: 'change' }
|
||||||
|
],
|
||||||
|
toName: [
|
||||||
|
{ required: true, message: '请输寄件人姓名', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
toTel: [
|
||||||
|
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||||
|
],
|
||||||
|
siid: [
|
||||||
|
{ required: true, message: '请输入云打印机编号', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
toAddress: [
|
||||||
|
{ required: true, message: '请输寄件人地址', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
tempImg: '', // 图片
|
||||||
|
exportTempList: [], // 电子面单模板
|
||||||
|
exportList: [], // 快递公司列表
|
||||||
|
formInline: {
|
||||||
|
phone: '',
|
||||||
|
code: '',
|
||||||
|
sign: ''
|
||||||
|
},
|
||||||
|
ruleInlineSign: {
|
||||||
|
sign: [
|
||||||
|
{ required: true, message: '请输入短信签名', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
phone: [
|
||||||
|
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||||
|
],
|
||||||
|
code: [
|
||||||
|
{ required: true, message: '请输入验证码', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
cutNUm: '获取验证码',
|
||||||
|
canClick: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
sms (n) {
|
||||||
|
if (n.open === 1) this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.sms.open === 1) this.getList();
|
||||||
|
// if (this.isChecked === '1' && this.sms.open === 1) this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
editSign(){
|
||||||
|
this.formInline.account = this.accountInfo.account;
|
||||||
|
this.formInline.sign = this.accountInfo.sms.sign;
|
||||||
|
this.formInline.phone = this.accountInfo.phone;
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
//修改签名
|
||||||
|
handleSubmit:Debounce(function(name) {
|
||||||
|
this.$refs[name].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
smsSignApi(this.formInline).then(async res => {
|
||||||
|
this.$message.success('修改签名之后一号通需要审核过后通过!');
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$refs[formName].resetFields();
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
// 短信验证码
|
||||||
|
cutDown () {
|
||||||
|
if (this.formInline.phone) {
|
||||||
|
if (!this.canClick) return;
|
||||||
|
this.canClick = false;
|
||||||
|
this.cutNUm = 60;
|
||||||
|
let data = {
|
||||||
|
phone: this.formInline.phone,
|
||||||
|
types: 1
|
||||||
|
};
|
||||||
|
captchaApi(data).then(async res => {
|
||||||
|
this.$message.success(res.msg);
|
||||||
|
})
|
||||||
|
let time = setInterval(() => {
|
||||||
|
this.cutNUm--;
|
||||||
|
if (this.cutNUm === 0) {
|
||||||
|
this.cutNUm = '获取验证码';
|
||||||
|
this.canClick = true;
|
||||||
|
clearInterval(time)
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('请填写手机号!');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleClose(){
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.$refs['formInline'].resetFields();
|
||||||
|
},
|
||||||
|
// 首页去开通
|
||||||
|
onOpenIndex (val) {
|
||||||
|
this.tableFrom.type = val;
|
||||||
|
switch (val) {
|
||||||
|
case 'sms':
|
||||||
|
this.isSms = true;
|
||||||
|
break;
|
||||||
|
case 'expr_dump':
|
||||||
|
this.openDump();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.openOther();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 开通其他
|
||||||
|
openOther () {
|
||||||
|
this.$confirm(`确定开通${commFilter.onePassTypeFilter(this.tableFrom.type)}吗?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
// this.handleSubmitDump('formInlineDump');
|
||||||
|
serviceOpenApi({type: this.tableFrom.type}).then(async res => {
|
||||||
|
this.$message.success('开通成功!');
|
||||||
|
this.getList();
|
||||||
|
this.$emit('openService')
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 开通电子面单
|
||||||
|
openDump () {
|
||||||
|
this.exportTempAllList();
|
||||||
|
this.isDump = true;
|
||||||
|
},
|
||||||
|
// 物流公司
|
||||||
|
exportTempAllList () {
|
||||||
|
expressAllApi({type:'elec'}).then(async res => {
|
||||||
|
this.exportList = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 快递公司选择
|
||||||
|
onChangeExport (val) {
|
||||||
|
this.formInlineDump.tempId = '';
|
||||||
|
this.exportTemp(val);
|
||||||
|
},
|
||||||
|
// 电子面单模板
|
||||||
|
exportTemp (val) {
|
||||||
|
exportTempApi({ com: val }).then(async res => {
|
||||||
|
this.exportTempList = res.data.data || [];
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onChangeImg (item) {
|
||||||
|
this.exportTempList.map(i => {
|
||||||
|
if (i.temp_id === item) this.tempImg = i.pic
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitDump (name) {
|
||||||
|
this.formInlineDump.type = this.tableFrom.type;
|
||||||
|
this.$refs[name].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading = true;
|
||||||
|
serviceOpenApi(this.formInlineDump).then(async res => {
|
||||||
|
this.$emit('openService');
|
||||||
|
this.$message.success('开通成功!');
|
||||||
|
this.getList();
|
||||||
|
this.loading = false;
|
||||||
|
}).catch(()=>{
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onChangeType () {
|
||||||
|
this.tableFrom.page = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 列表
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true
|
||||||
|
smsLstApi(this.tableFrom).then(res => {
|
||||||
|
this.tableData.data = res.data;
|
||||||
|
if(this.tableFrom.type == 'sms'){
|
||||||
|
let obj = new Object();
|
||||||
|
let newArr = new Array();
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
obj = item;
|
||||||
|
switch(item.status) {
|
||||||
|
case 0:
|
||||||
|
obj.status = '发送中'
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
obj.status = '成功'
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
obj.status = '失败'
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
obj.status = '全部'
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
newArr.push(obj);
|
||||||
|
this.tableData.data = newArr;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.tableData.total = res.count
|
||||||
|
switch (this.tableFrom.type) {
|
||||||
|
case 'sms':
|
||||||
|
this.columns2 = [
|
||||||
|
{
|
||||||
|
title: '手机号',
|
||||||
|
key: 'phone',
|
||||||
|
minWidth: 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '模板内容',
|
||||||
|
key: 'content',
|
||||||
|
minWidth: 590
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '发送时间',
|
||||||
|
key: 'add_time',
|
||||||
|
minWidth: 150
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// title: '状态',
|
||||||
|
// key: 'status',
|
||||||
|
// minWidth: 100
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
break;
|
||||||
|
case 'expr_dump':
|
||||||
|
this.columns2 = [
|
||||||
|
// {
|
||||||
|
// title: '订单号',
|
||||||
|
// key: 'order_id',
|
||||||
|
// minWidth: 150
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
title: '发货人',
|
||||||
|
key: 'from_name',
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '收货人',
|
||||||
|
key: 'to_name',
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '快递单号',
|
||||||
|
key: 'num',
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '快递公司编码',
|
||||||
|
key: 'code',
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
key: '_resultcode',
|
||||||
|
minWidth: 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '打印时间',
|
||||||
|
key: 'add_time',
|
||||||
|
minWidth: 150
|
||||||
|
}
|
||||||
|
]
|
||||||
|
break;
|
||||||
|
case 'expr_query':
|
||||||
|
this.columns2 = [
|
||||||
|
{
|
||||||
|
title: '快递单号',
|
||||||
|
key: 'content',
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '快递公司编码',
|
||||||
|
key: 'code',
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
key: '_resultcode',
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '添加时间',
|
||||||
|
key: 'add_time',
|
||||||
|
minWidth: 150
|
||||||
|
}
|
||||||
|
]
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.columns2 = [
|
||||||
|
{
|
||||||
|
title: '复制URL',
|
||||||
|
key: 'url',
|
||||||
|
minWidth: 400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '请求状态',
|
||||||
|
key: '_resultcode',
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '添加时间',
|
||||||
|
key: 'add_time',
|
||||||
|
minWidth: 150
|
||||||
|
}
|
||||||
|
]
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
this.listLoading = false
|
||||||
|
}).catch(res => {
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
pageChange(page) {
|
||||||
|
this.tableFrom.page = page
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.tableFrom.limit = val
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
/*@aaa: ~'>>>';*/
|
||||||
|
.order_box ::v-deep.ivu-form-item-content{
|
||||||
|
margin-left: 50px!important;
|
||||||
|
}
|
||||||
|
.maxInpt{
|
||||||
|
max-width:400px;
|
||||||
|
margin-left:auto;
|
||||||
|
margin-right:auto;
|
||||||
|
}
|
||||||
|
.smsBox .page-account-top{
|
||||||
|
text-align: center;
|
||||||
|
margin: 70px 0 30px 0;
|
||||||
|
}
|
||||||
|
.note{
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
.tempImg{
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: 11px;
|
||||||
|
color: #1890FF;
|
||||||
|
}
|
||||||
|
.tempImgList{
|
||||||
|
// opacity: 1;
|
||||||
|
width: 38px !important;
|
||||||
|
height: 30px !important;
|
||||||
|
// margin-top: -30px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 11;
|
||||||
|
img{
|
||||||
|
width: 38px !important;
|
||||||
|
height: 30px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.width9{
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
.width10{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.wuBox{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.wuSp1{
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
color: #000000;
|
||||||
|
font-size: 21px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 32px;
|
||||||
|
margin-top: 23px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
.wuSp2{
|
||||||
|
opacity: 45%;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 22px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
.page-account-top-tit{
|
||||||
|
font-size: 21px;
|
||||||
|
color: #1890FF;
|
||||||
|
}
|
||||||
|
.wuTu{
|
||||||
|
width: 295px;
|
||||||
|
height: 164px;
|
||||||
|
margin-top: 54px;
|
||||||
|
img{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ span {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tempId{
|
||||||
|
.ivu-form-item-content{
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.flex-between{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="divBox">
|
|
||||||
<el-card class="box-card">
|
|
||||||
<zb-parser
|
|
||||||
:form-id="formId"
|
|
||||||
:is-create="isCreate"
|
|
||||||
:edit-data="editData"
|
|
||||||
@submit="handlerSubmit"
|
|
||||||
@resetForm="resetForm"
|
|
||||||
v-if="isShow && checkPermi(['admin:pass:appget'])"
|
|
||||||
/>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import zbParser from '@/components/FormGenerator/components/parser/ZBParser';
|
|
||||||
import { passAppSaveApi, configInfo, passAppInfoApi } from '@/api/systemConfig.js';
|
|
||||||
import { checkPermi } from '@/utils/permission'; // 权限判断函数
|
|
||||||
export default {
|
|
||||||
name: 'onePassConfig',
|
|
||||||
components: { zbParser },
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
isShow: true,
|
|
||||||
isCreate: 0,
|
|
||||||
editData: {},
|
|
||||||
formId: 144, //一号通配置
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if (checkPermi(['admin:pass:appget'])) this.getPassAppInfo();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
checkPermi,
|
|
||||||
resetForm(formValue) {
|
|
||||||
this.isShow = false;
|
|
||||||
},
|
|
||||||
handlerSubmit(data) {
|
|
||||||
passAppSaveApi(data).then((res) => {
|
|
||||||
this.getPassAppInfo();
|
|
||||||
this.$message.success('操作成功');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//获取配置详情
|
|
||||||
getPassAppInfo() {
|
|
||||||
passAppInfoApi().then((res) => {
|
|
||||||
this.isShow = false;
|
|
||||||
this.editData = res;
|
|
||||||
this.isCreate = 1;
|
|
||||||
setTimeout(() => {
|
|
||||||
// 让表单重复渲染待编辑数据
|
|
||||||
this.isShow = true;
|
|
||||||
}, 80);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
@@ -1,35 +1,329 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="divBox">
|
||||||
<iframe
|
<el-card v-if="isShowList" v-loading="fullscreenLoading" class="box-card mb20">
|
||||||
ref="iframes"
|
<div class="content acea-row row-middle">
|
||||||
src="https://api.crmeb.com/"
|
<div class="demo-basic--circle acea-row row-middle">
|
||||||
width="100%"
|
<div class="circleUrl mr20"><img :src="circleUrl"></div>
|
||||||
:height="iframeHeight"
|
<!--<el-avatar :size="50" :src="circleUrl" class="mr20" />-->
|
||||||
style="border: none"
|
<div class="dashboard-workplace-header-tip">
|
||||||
></iframe>
|
<div class="dashboard-workplace-header-tip-title">{{ smsAccount }},祝您每一天开心!</div>
|
||||||
|
<div class="dashboard-workplace-header-tip-desc">
|
||||||
|
<span class="mr10" @click="onChangePassswordIndex" v-if="checkPermi(['admin:pass:update:password'])">修改密码</span>
|
||||||
|
<span class="mr10" @click="onChangePhone" v-if="checkPermi(['admin:pass:update:phone'])">修改手机号</span>
|
||||||
|
<span @click="signOut" class="mr10" v-if="checkPermi(['admin:pass:logout'])">退出登录</span>
|
||||||
|
<!-- <el-tooltip class="item" effect="dark" content="
|
||||||
|
一号通为我司一个第三方平台
|
||||||
|
专门提供短信 , 物流查询,商品复制,电子面单等个性化服务
|
||||||
|
省去了自己单独接入功能的麻烦
|
||||||
|
初次运行代码默认是没有账号的,需要自行注册,
|
||||||
|
登录成功后根据提示购买自己需要用到的服务即可" placement="right">
|
||||||
|
<span class="mr10">平台说明</span>
|
||||||
|
</el-tooltip> -->
|
||||||
|
<template>
|
||||||
|
<el-popover trigger="hover" placement="right" >
|
||||||
|
<span class="mr10" slot="reference">平台说明</span>
|
||||||
|
<div class="pup_card">
|
||||||
|
一号通为我司一个第三方平台专门提供短信 , 物流查询,商品复制,电子面单等个性化服务省去了自己单独接入功能的麻烦初次运行代码默认是没有账号的,需要自行注册,
|
||||||
|
登录成功后根据提示购买自己需要用到的服务即可
|
||||||
|
</div>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dashboard">
|
||||||
|
<div class="dashboard-workplace-header-extra">
|
||||||
|
<div class="acea-row">
|
||||||
|
<div class="header-extra">
|
||||||
|
<p class="mb5"><span>短信条数</span></p>
|
||||||
|
<p class="mb5">{{sms.num || 0}}</p>
|
||||||
|
<el-button size="mini" type="primary" @click="sms.open ===0?onOpen('sms'):mealPay('sms')" v-text="sms.open ===0?'开通服务':'套餐购买'" v-hasPermi="['admin:pass:meal:code', 'admin:pass:service:open']"></el-button>
|
||||||
|
</div>
|
||||||
|
<div class="header-extra">
|
||||||
|
<p class="mb5"><span>采集次数</span></p>
|
||||||
|
<p class="mb5">{{copy.num || 0}}</p>
|
||||||
|
<el-button size="mini" type="primary" @click="copy.open ===0?onOpen('copy'):mealPay('copy')" v-text="copy.open ===0?'开通服务':'套餐购买'" v-hasPermi="['admin:pass:meal:code', 'admin:pass:service:open']"></el-button>
|
||||||
|
</div>
|
||||||
|
<div class="header-extra">
|
||||||
|
<p class="mb5"><span>物流查询次数</span></p>
|
||||||
|
<p class="mb5">{{query.num || 0}}</p>
|
||||||
|
<el-button size="mini" type="primary" @click="query.open ===0?onOpen('expr_query'):mealPay('expr_query')" v-text="query.open ===0?'开通服务':'套餐购买'" v-hasPermi="['admin:pass:meal:code', 'admin:pass:service:open']"></el-button>
|
||||||
|
</div>
|
||||||
|
<div class="header-extra" style="border: none;">
|
||||||
|
<p class="mb5"><span>面单打印次数</span> </p>
|
||||||
|
<p class="mb5">{{dump.num || 0}}</p>
|
||||||
|
<el-button size="mini" type="primary" @click="dump.open ===0?onOpen('expr_dump'):mealPay('expr_dump')" v-text="dump.open ===0?'开通服务':'套餐购买'" v-hasPermi="['admin:pass:meal:code', 'admin:pass:service:open']"></el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="box-card" v-loading="loading">
|
||||||
|
<table-list v-if="isShowList" ref="tableLists" :sms="sms" :copy="copy" :dump="dump" :query="query" :accountInfo="accountInfo" @openService="openService"/>
|
||||||
|
<login-from v-if="isShowLogn" @on-change="onChangePasssword" @on-changes="onChangeReg" @on-Login="onLogin" />
|
||||||
|
<forget-password :infoData="infoData" v-if="isShow" @goback="goback" @on-Login="onLogin" :isIndex="isIndex"></forget-password>
|
||||||
|
<forget-phone v-if="isForgetPhone" @gobackPhone="gobackPhone" @on-Login="onLogin"></forget-phone>
|
||||||
|
<register-from v-if="isShowReg" @on-change="logoup" />
|
||||||
|
</el-card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import tableList from './components/tableList'
|
||||||
|
import loginFrom from './components/loginFrom'
|
||||||
|
import registerFrom from './components/register'
|
||||||
|
import forgetPassword from './components/forgetPassword';
|
||||||
|
import forgetPhone from './components/forgetPhone';
|
||||||
|
import { logoutApi, smsNumberApi, smsInfoApi } from '@/api/sms'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import { checkPermi } from "@/utils/permission"; // 权限判断函数
|
||||||
export default {
|
export default {
|
||||||
name: "SmsConfig",
|
name: 'SmsConfig',
|
||||||
|
components: { tableList, loginFrom, registerFrom, forgetPassword, forgetPhone },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
iframeHeight: 0
|
fullscreenLoading: false,
|
||||||
};
|
loading: false,
|
||||||
|
smsAccount: '',
|
||||||
|
circleUrl: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
|
||||||
|
accountInfo:{},
|
||||||
|
spinShow: false,
|
||||||
|
isForgetPhone: false, // 修改手机号
|
||||||
|
isIndex: false, // 判断忘记密码返回的路径
|
||||||
|
isShowLogn: false, // 登录
|
||||||
|
isShow: false, // 修改密码
|
||||||
|
isShowReg: false, // 注册
|
||||||
|
isShowList: false, // 登录之后列表
|
||||||
|
sms: { open: 0 }, // 短信信息
|
||||||
|
query: { open: 0 }, // 物流查询
|
||||||
|
dump: { open: 0 }, // 电子面单打印
|
||||||
|
copy: { open: 0 }, // 商品采集,
|
||||||
|
infoData: {},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {
|
computed: {
|
||||||
window.addEventListener("resize", this.handleResize);
|
...mapGetters([
|
||||||
|
'isLogin'
|
||||||
|
])
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.onIsLogin()
|
||||||
this.iframeHeight = this.$selfUtil.getTableHeight(0);
|
// if (!this.isLogin) {
|
||||||
});
|
// this.onIsLogin()
|
||||||
|
// } else {
|
||||||
|
// this.isShowList = true
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleResize(event) {
|
checkPermi,
|
||||||
this.iframeHeight = this.$selfUtil.getTableHeight(0);
|
// 开通服务
|
||||||
|
openService (val) {
|
||||||
|
this.getNumber();
|
||||||
|
},
|
||||||
|
onOpen (val) {
|
||||||
|
this.$refs.tableLists.onOpenIndex(val);
|
||||||
|
},
|
||||||
|
// 手机号返回
|
||||||
|
gobackPhone () {
|
||||||
|
this.isShowList = true;
|
||||||
|
this.isForgetPhone = false;
|
||||||
|
},
|
||||||
|
onChangePhone () {
|
||||||
|
this.isForgetPhone = true
|
||||||
|
this.isShowLogn = false;
|
||||||
|
this.isShowList = false;
|
||||||
|
},
|
||||||
|
// 密码返回
|
||||||
|
goback () {
|
||||||
|
if (this.isIndex) {
|
||||||
|
this.isShowList = true;
|
||||||
|
this.isShow = false;
|
||||||
|
} else {
|
||||||
|
this.isShowLogn = true;
|
||||||
|
this.isShow = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 修改密码
|
||||||
|
onChangePassswordIndex () {
|
||||||
|
this.isIndex = true;
|
||||||
|
this.passsword();
|
||||||
|
},
|
||||||
|
// 忘记密码
|
||||||
|
onChangePasssword () {
|
||||||
|
this.isIndex = false;
|
||||||
|
this.passsword();
|
||||||
|
// this.isShowLogn = false;
|
||||||
|
// this.isShow = true;
|
||||||
|
// this.isShowList = false;
|
||||||
|
},
|
||||||
|
passsword () {
|
||||||
|
this.isShowLogn = false;
|
||||||
|
this.isShow = true;
|
||||||
|
this.isShowList = false;
|
||||||
|
},
|
||||||
|
mealPay (val) {
|
||||||
|
this.$router.push({ path:'/operation/systemSms/pay',query:{type:val}});
|
||||||
|
},
|
||||||
|
// 剩余条数
|
||||||
|
getNumber() {
|
||||||
|
this.loading = true;
|
||||||
|
smsInfoApi().then(async res => {
|
||||||
|
let data = res;
|
||||||
|
this.infoData = res;
|
||||||
|
this.sms = {
|
||||||
|
num: data.sms.num,
|
||||||
|
open: data.sms.open,
|
||||||
|
surp: data.sms.open
|
||||||
|
};
|
||||||
|
this.query = {
|
||||||
|
num: data.query.num,
|
||||||
|
open: data.query.open,
|
||||||
|
surp: data.query.open
|
||||||
|
};
|
||||||
|
this.dump = {
|
||||||
|
num: data.dump.num,
|
||||||
|
open: data.dump.open,
|
||||||
|
surp: data.dump.open
|
||||||
|
};
|
||||||
|
this.copy = {
|
||||||
|
num: data.copy.num,
|
||||||
|
open: data.copy.open,
|
||||||
|
surp: data.copy.open
|
||||||
|
};
|
||||||
|
this.loading = false;
|
||||||
|
this.smsAccount = data.account;
|
||||||
|
this.accountInfo = data;
|
||||||
|
}).catch(res => {
|
||||||
|
this.isShowLogn = true;
|
||||||
|
this.isShowList = false;
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 登录跳转
|
||||||
|
onLogin() {
|
||||||
|
const url = this.$route.query.url
|
||||||
|
if (url) {
|
||||||
|
this.$router.replace(url)
|
||||||
|
} else {
|
||||||
|
this.getNumber()
|
||||||
|
this.isShowLogn = false
|
||||||
|
this.isShow = false
|
||||||
|
this.isShowReg = false
|
||||||
|
this.isShowList = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查看是否登录
|
||||||
|
onIsLogin() {
|
||||||
|
this.fullscreenLoading = true
|
||||||
|
this.$store.dispatch('user/isLogin').then(async res => {
|
||||||
|
const data = res
|
||||||
|
this.isShowLogn = !data.status
|
||||||
|
this.isShowList = data.status
|
||||||
|
if (data.status) {
|
||||||
|
this.smsAccount = data.info
|
||||||
|
this.getNumber()
|
||||||
|
}
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(res => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
this.isShowLogn = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 退出登录
|
||||||
|
signOut() {
|
||||||
|
logoutApi().then(async res => {
|
||||||
|
this.isShowLogn = true
|
||||||
|
this.isShowList = false
|
||||||
|
this.infoData.phone = '';
|
||||||
|
this.$store.dispatch('user/isLogin')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 立即注册
|
||||||
|
onChangeReg() {
|
||||||
|
this.isShowLogn = false
|
||||||
|
this.isShow = false
|
||||||
|
this.isShowReg = true
|
||||||
|
},
|
||||||
|
// 立即登录
|
||||||
|
logoup() {
|
||||||
|
this.isShowLogn = true
|
||||||
|
this.isShow = false
|
||||||
|
this.isShowReg = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.dashboard{
|
||||||
|
width: auto !important;
|
||||||
|
min-width: 300px;
|
||||||
|
}
|
||||||
|
.header-extra{
|
||||||
|
/*width: 25%;*/
|
||||||
|
border-right: 1px solid #E9E9E9;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 18px;
|
||||||
|
}
|
||||||
|
$cursor: #1890ff;
|
||||||
|
.content{
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.circleUrl{
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
.circleUrl img{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 50%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.rR{
|
||||||
|
text-align: center;
|
||||||
|
font-size: 22px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.dashboard-workplace-header-tip {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.dashboard-workplace-header-tip-title {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
.dashboard-workplace-header-tip-desc{
|
||||||
|
/*line-height: 0 !important;*/
|
||||||
|
display: block;
|
||||||
|
span{
|
||||||
|
font-size: 12px;
|
||||||
|
color: $cursor;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dashboard-workplace-header-extra{
|
||||||
|
width: auto!important;
|
||||||
|
min-width: 400px;
|
||||||
|
}
|
||||||
|
.pfont{
|
||||||
|
font-size: 12px;
|
||||||
|
color: #808695;
|
||||||
|
}
|
||||||
|
.text_overflow{
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.pup_card{
|
||||||
|
width: 240px;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 5px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
239
crmeb/README.md
239
crmeb/README.md
@@ -1,52 +1,209 @@
|
|||||||
# 环境
|
|
||||||
1. Java Jdk1.8
|
|
||||||
2. Redis 5+
|
|
||||||
3. Mysql 5.7+
|
|
||||||
|
|
||||||
# Java项目框架
|
<div align="center" >
|
||||||
|
<img src="https://images.gitee.com/uploads/images/2021/1109/164354_0aafe3d2_892944.gif" />
|
||||||
|
</div>
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
CRMEB开源商城系统Java版
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div align="center" >
|
||||||
|
<a href="http://www.crmeb.com">
|
||||||
|
<img src="https://img.shields.io/badge/License-apache2.0-green.svg?style=flat" />
|
||||||
|
</a>
|
||||||
|
<a href='https://gitee.com/ZhongBangKeJi/crmeb_java/members'>
|
||||||
|
<img src='https://gitee.com/ZhongBangKeJi/crmeb_java/badge/fork.svg?theme=dark' alt='fork'></img>
|
||||||
|
</a>
|
||||||
|
<a href='https://gitee.com/ZhongBangKeJi/crmeb_java/stargazers'>
|
||||||
|
<img src='https://gitee.com/ZhongBangKeJi/crmeb_java/badge/star.svg?theme=dark' alt='star'></img>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
[官网](https://www.crmeb.com/) |
|
||||||
|
[在线体验](https://admin.java.crmeb.net) |
|
||||||
|
[帮助文档](https://doc.crmeb.com/java/crmeb_java) |
|
||||||
|
[技术社区](https://www.crmeb.com/ask/)
|
||||||
|
|
||||||
|
[comment]: <> ([宽屏预览](https://gitee.com/ZhongBangKeJi/crmeb_java/blob/master/README.md))
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div align="center" >
|
||||||
|
<a href="https://gitee.com/ZhongBangKeJi/crmeb_java/blob/master/README.md">宽 屏 预 览</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
如果对您有帮助,您可以点右上角 "Star" ❤️ 支持一下 谢谢!
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 📖 简介:
|
||||||
|
|
||||||
|
CRMEB 开源商城系统Java版,基于Java+Vue+Uni-app开发,在微信公众号、小程序、H5移动端都能使用,代码全开源无加密,独立部署,二开很方便,还支持免费商用,能满足企业新零售、分销推广、拼团、砍价、秒杀等多种经营需求,自用、做二开项目都很合适。
|
||||||
|
|
||||||
|
CRMEB开源商城PHP:https://gitee.com/ZhongBangKeJi/CRMEB
|
||||||
|
|
||||||
|
|
||||||
|
系统代码全开源无加密,独立部署、二开方便,适用于企业新零售、分销、拼团、砍价,秒杀等各种业务需求。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 💡 系统亮点:
|
||||||
|
>1.SpringBoot 框架开发业界主流。 </br>
|
||||||
|
>2.【前端】Web PC 管理端 Vue + Element UI。<br>
|
||||||
|
>3.【前端】移动端使用 Uni-app 框架,前后端分离开发。<br>
|
||||||
|
>4.标准RESTful 接口、标准数据传输,逻辑层次更明确,更多的提高api复用。<br>
|
||||||
|
>5.支持Redis队列,降低流量高峰,解除耦合,高可用。<br>
|
||||||
|
>6.数据导出,方便个性化分析。<br>
|
||||||
|
>7.数据统计分析,使用ECharts图表统计,实现用户、产品、订单、资金等统计分析。<br>
|
||||||
|
>8.Spring Security 权限管理,后台多种角色,多重身份权限管理,权限可以控制到按钮级别的操作。<br>
|
||||||
|
>9.Vue表单生成控件,拖拽配置表单,减少前端重复表单工作量,提高前端开发效率。<br>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 💻 运行环境及框架:
|
||||||
|
~~~
|
||||||
|
1. 移动端uniapp开发框架 可生成H5 公众号 微信小程序
|
||||||
|
2. WEB Pc 管理后台使用Vue + Element UI 开发 兼容主流浏览器 ie11+
|
||||||
|
3. 后台服务 Java SpringBoot + Mybatis-plus + Mysql + redis
|
||||||
|
4. 运行环境 linux和windows等都支持,只要有Java环境和对应的数据库 redis
|
||||||
|
5. 运行条件 Java 1.8 Mysql5.7
|
||||||
|
~~~
|
||||||
|
---
|
||||||
|
|
||||||
|
### 🔧 Java项目框架 和 WEB PC 项目运行环境
|
||||||
|
~~~
|
||||||
1. SpringBoot 2.2.6.RELEASE
|
1. SpringBoot 2.2.6.RELEASE
|
||||||
2. Maven 3.6.1
|
2. Maven 3.6.1
|
||||||
3. Swagger 2.9.2
|
3. swagger-bootstrap-ui 1.0
|
||||||
4. Mybatis Plus 3.3.1
|
4. Mybatis Plus 3.3.1
|
||||||
|
5. npm 6
|
||||||
|
6. node 14
|
||||||
|
7. vue 2.x
|
||||||
|
8. element ui 2.13
|
||||||
|
~~~
|
||||||
|
|
||||||
# 部署
|
---
|
||||||
1. 拿到jar包,上传到web目录下,(宝塔配置的域名指向的web目录下即可)
|
|
||||||
2. 在 jar包同级目录下运行 `start.sh (运行命令为 ./start.sh )` 脚本即可启动项目
|
### 🧭 项目代码包介绍
|
||||||
3. shell脚本会自动运行 `tail -f crmeb_out.file` 命令输出当前启动日志
|
~~~
|
||||||
4. 看到 `Completed 200 OK` 表示启动成功
|
1. admin WEB程序 PC端管理端 VUE + ElementUi
|
||||||
5. 默认启动 `20000` 端口号
|
2. app 移动商城 UniApp标准开发(H5 + 微信小程序)
|
||||||
|
3. crmeb Api Java SpringBoot + mybatisPlus
|
||||||
|
4. 接口文档 Api对应的接口文档也可以部署项目后查看
|
||||||
|
~~~
|
||||||
|
|
||||||
|
移动端 uniapp 开发 使用 HbuilderX 开发
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[](https://www.crmeb.com/index/java_merchant)
|
||||||
|
|
||||||
|
|
||||||
#
|
### 🎬 系统演示:
|
||||||
# 注意事项
|

|
||||||
1. web端口号不可以设置为`20000`
|
移动端:https://java.crmeb.net<br>
|
||||||
2. 反向代理地址: `http://127.0.0.1:20000` 【外网域名指向这个地址】
|
WEBPC管理端:https://admin.java.crmeb.net<br>
|
||||||
|
账号密码: demo/crmeb.com<br>
|
||||||
|
|
||||||
# 二次开发帮助文档
|
自己搭建演示账号
|
||||||
##注解参考:
|
移动端 18292417675 / crmeb_123456
|
||||||
1. `@NotNull` 注解 作用类型 解释 任何类型 属性不能为 `null`
|
管理端 admin / 123456
|
||||||
2. `@NotEmpty` 集合 集合不能为 `null`,且 `size` 大于 `0`
|
|
||||||
3. `@NotBlank` 只能作用在 `String` 上,不能为 `null`,而且调用 `trim()` 后,长度必须大于 `0`
|
|
||||||
4. `@AssertTrue` `Boolean、boolean` 布尔属性必须是 `true`
|
|
||||||
5. `@Min` 数字类型(原子和包装) 限定数字的最小值(整型)
|
|
||||||
6. `@Max` 同 `@Min` 限定数字的最大值(整型)
|
|
||||||
7. `@DecimalMin` 同 `@Min` 限定数字的最小值(字符串,可以是小数)
|
|
||||||
8. `@DecimalMax` 同 `@Min` 限定数字的最大值(字符串,可以是小数)
|
|
||||||
9. `@Range` 数字类型(原子和包装) 限定数字范围(长整型)
|
|
||||||
10. `@Length` 字符串 限定字符串长度
|
|
||||||
11. `@Size` 集合 限定集合大小
|
|
||||||
12. `@Past` 时间、日期 必须是一个过去的时间或日期
|
|
||||||
13. `@Future` 时期、时间 必须是一个未来的时间或日期
|
|
||||||
14. `@Email` 字符串 必须是一个邮箱格式
|
|
||||||
15. `@Pattern` 字符串、字符 正则匹配字符串
|
|
||||||
|
|
||||||
# 产品复制
|
[想了解CRMEB开源商城系统Java版整体框架,你可以戳这里快速掌握!](https://doc.crmeb.com/java/crmeb_java/2049)
|
||||||
1. 设置 [99api](https://www.99api.com "99api") 对应的api到配置表eb_system_config
|
|
||||||
2. 配置baseUrl和key 实际的key可以根据自己的定义修改
|
|
||||||
3. 目前支持天猫,京东,淘宝,苏宁,拼多多
|
|
||||||
|
|
||||||
# 打印机
|
---
|
||||||
1. [易联云文档](http://doc2.10ss.net/337744 "易联云文档")
|
|
||||||
2. [易联云JAVA SDK](http://doc2.10ss.net/337744 "易联云JAVA SDK gitee文档")
|
|
||||||
3. [如何导入第三方JAVA SDK包](https://blog.csdn.net/weixin_46028577/article/details/106342938?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase "如何导入第三方JAVA SDK包")
|
|
||||||
|
|
||||||
|
### 📃 系统资料
|
||||||
|
需要系统文档的朋友看过来,安装文档、产品介绍、技术文档...你想要的我都有!
|
||||||
|
[https://doc.crmeb.com/java/crmeb_java](https://doc.crmeb.com/java/crmeb_java)
|
||||||
|
|
||||||
|
|
||||||
|
要安装系统,跟着视频更顺畅!CRMEB开源商城系统Java版安装视频,给你奉上!
|
||||||
|
视频教程 B站视频教程 持续更新中 [点击观看 💻🖥️](https://www.bilibili.com/video/BV1bP4y1n76P/?vd_source=40854aeda5bba4b8766afd5a99623b16)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 💟 UI界面
|
||||||
|
#### 核心功能
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 📱 移动端预览
|
||||||
|
<!-- 
|
||||||
|

|
||||||
|
 -->
|
||||||
|

|
||||||
|
|
||||||
|
### WEB PC管理端预览
|
||||||
|
<!-- 
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
 -->
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
### 📲 CRMEB开源技术交流群
|
||||||
|
扫码进群可领取开源版接口文档、产品功能清单、高清UI设计图、思维脑图!
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
#### 📈 技术社区
|
||||||
|
找方法、提bug、看官方消息、拿活跃大奖!
|
||||||
|
https://www.crmeb.com/ask/thread/list/152
|
||||||
|
|
||||||
|
|
||||||
|
#### 📞 技术交流
|
||||||
|
跟着官方,不迷路!欢迎扫码加入CRMEB 开源项目群,一手消息及资源,尽在掌握!<br>
|
||||||
|
CRMEB JAVA 技术交流QQ群 1群 🈵️<br>
|
||||||
|
CRMEB JAVA 技术交流QQ群 2群 🈵️<br>
|
||||||
|
CRMEB JAVA 技术交流QQ群 3群 640230510 🈵️ 群已满<br>
|
||||||
|
<!-- [CRMEB开源商城系统开发QQ频道已开启,点击加入一起交流学习](https://pd.qq.com/s/1v2yb4e0p)<br>
|
||||||
|
 -->
|
||||||
|
使用中遇到bug 或者问题可以在gitee 上提 Issues
|
||||||
|
|
||||||
|
<!-- ---
|
||||||
|
|
||||||
|
### 💌 特别鸣谢
|
||||||
|
核心开发团队
|
||||||
|
|
||||||
|
产品: 木子刀客
|
||||||
|
|
||||||
|
技术: ❄指缝de阳光, 怪兽的猫, 乡关何处
|
||||||
|
|
||||||
|
团队打杂: 大粽子
|
||||||
|
|
||||||
|
UI: 被子横盖显得高🐰
|
||||||
|
|
||||||
|
测试: 请叫我绵绵🐏, 夏天
|
||||||
|
|
||||||
|
--- -->
|
||||||
|
|
||||||
|
### 🔔 使用须知
|
||||||
|
1.允许用于个人学习、毕业设计、教学案例、公益事业、商业使用;<br>
|
||||||
|
2.如果商用必须保留版权信息,请自觉遵守;<br>
|
||||||
|
3.禁止将本项目的代码和资源进行任何形式的出售,产生的一切任何后果责任由侵权者自负。<br>
|
||||||
|
|
||||||
|
---
|
||||||
|
### 🪪 版权信息
|
||||||
|
本项目包含的第三方源码和二进制文件之版权信息另行标注。<br>
|
||||||
|
版权所有Copyright © 2017-2024 by CRMEB (https://www.crmeb.com)<br>
|
||||||
|
All rights reserved。<br>
|
||||||
|
CRMEB® 商标和著作权所有者为西安众邦网络科技有限公司。<br>
|
||||||
|
|
||||||
|
---
|
||||||
@@ -128,7 +128,7 @@ public class CrmebUtil {
|
|||||||
// 加密结果:5JNGj04iE/XUuTZM75zMrA==
|
// 加密结果:5JNGj04iE/XUuTZM75zMrA==
|
||||||
// 解密结果:中国123ABCabc
|
// 解密结果:中国123ABCabc
|
||||||
|
|
||||||
System.out.println(encryptPassword("crmeb@123456", "18292417675"));
|
System.out.println(encryptPassword("crmeb_123456", "18292417675"));
|
||||||
// 执行结果:f6mcpGQ8NEmwbab2TlkpUg==
|
// 执行结果:f6mcpGQ8NEmwbab2TlkpUg==
|
||||||
// 与 SQL 中的数据一致
|
// 与 SQL 中的数据一致
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 297 KiB After Width: | Height: | Size: 302 KiB |
@@ -8645,7 +8645,7 @@ CREATE TABLE `eb_user` (
|
|||||||
INDEX `is_promoter`(`is_promoter`) USING BTREE
|
INDEX `is_promoter`(`is_promoter`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
INSERT INTO `eb_user` VALUES (1, '18292417675', 'f6mcpGQ8NEmwbab2TlkpUg==', '', '', '', '', NULL, '', '', '大粽子', 'crmebimage/public/maintain/2023/02/23/1c0fa967eb764d918f064744cc51dc70a6f2bj3sha.jpg', '18292417675', '', '', 0.00, 0.00, 0, 0, 0, 1, 0, 0, NULL, '', 0, 0, 0, '', 0, '', '2023-03-15 17:41:12', '2023-03-15 17:48:11', '2023-03-15 17:42:44', NULL, '/0/', 0, NULL, 1, 'CN', NULL);
|
INSERT INTO `eb_user` VALUES (1, '18292417675', 'pgjrW1jMqL6wbab2TlkpUg==', '', '', '', '', NULL, '', '', '大粽子', 'crmebimage/public/maintain/2023/02/23/1c0fa967eb764d918f064744cc51dc70a6f2bj3sha.jpg', '18292417675', '', '', 0.00, 0.00, 0, 0, 0, 1, 0, 0, NULL, '', 0, 0, 0, '', 0, '', '2023-03-15 17:41:12', '2023-03-15 17:48:11', '2023-03-15 17:42:44', NULL, '/0/', 0, NULL, 1, 'CN', NULL);
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for eb_user_address
|
-- Table structure for eb_user_address
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user