commit message

This commit is contained in:
Chopper
2021-05-13 10:56:04 +08:00
commit ec3e958037
728 changed files with 132685 additions and 0 deletions

3
manager/.browserslistrc Normal file
View File

@@ -0,0 +1,3 @@
> 1%
last 2 versions
not ie <= 8

14
manager/.editorconfig Normal file
View File

@@ -0,0 +1,14 @@
# https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

4
manager/.eslintignore Normal file
View File

@@ -0,0 +1,4 @@
build/*.js
src/assets
public
dist

198
manager/.eslintrc.js Normal file
View File

@@ -0,0 +1,198 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
// add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
"vue/max-attributes-per-line": [2, {
"singleline": 10,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline":"off",
"vue/name-property-casing": ["error", "PascalCase"],
"vue/no-v-html": "off",
'accessor-pairs': 2,
'arrow-spacing': [2, {
'before': true,
'after': true
}],
'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', {
'allowSingleLine': true
}],
'camelcase': [0, {
'properties': 'always'
}],
'comma-dangle': [2, 'never'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'comma-style': [2, 'last'],
'constructor-super': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
'eqeqeq': ["error", "always", {"null": "ignore"}],
'generator-star-spacing': [2, {
'before': true,
'after': true
}],
'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, {
'SwitchCase': 1
}],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, {
'beforeColon': false,
'afterColon': true
}],
'keyword-spacing': [2, {
'before': true,
'after': true
}],
'new-cap': [2, {
'newIsCap': true,
'capIsNew': false
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 0,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, {
'allowLoop': false,
'allowSwitch': false
}],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [2, {
'max': 1
}],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, {
'defaultAssignment': false
}],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, {
'vars': 'all',
'args': 'none'
}],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [2, {
'initialized': 'never'
}],
'operator-linebreak': [2, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}],
'padded-blocks': [2, 'never'],
'quotes': [2, 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'semi': [2, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, {
'words': true,
'nonwords': false
}],
'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
}
}

23
manager/.gitignore vendored Normal file
View File

@@ -0,0 +1,23 @@
.DS_Store
node_modules/*
dist/
gifs/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
test/unit/coverage
test/e2e/reports
selenium-debug.log
# Editor directories and files
.idea/*
.vscode/*
*.suo
*.ntvs*
*.njsproj
*.sln
yarn.lock
package-lock.json
yarn.lock

8
manager/Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
FROM nginx:alpine
RUN mkdir -p /app/
COPY ./dist /app/
COPY ./nginx.conf /etc/nginx/nginx.conf
EXPOSE 80

37
manager/README.md Normal file
View File

@@ -0,0 +1,37 @@
# LILISHOP-UI
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Run your tests
```
npm run test
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
详情点击 [https://cli.vuejs.org/zn/config/](https://cli.vuejs.org/zn/config/).
#### login.vue页面测试时不走权限直接return 318行
#### Main.vue 页面241行修改避免报错
#### main-components 头部,左侧所有内容
#### lili-floor-renovation 楼层装修模块

10
manager/babel.config.js Normal file
View File

@@ -0,0 +1,10 @@
module.exports = {
presets: [
[
'@vue/app',
{
useBuiltIns: 'entry'
}
]
]
}

1
manager/docker.sh Normal file
View File

@@ -0,0 +1 @@
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui-1.0.1:0.0.1 .

51
manager/nginx.conf Normal file
View File

@@ -0,0 +1,51 @@
#这个文件给docker用的
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
client_max_body_size 10m;
gzip on;
gzip_min_length 5k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 4;
gzip_types text/plain application/x-javascript application/javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
server {
listen 80;
server_name localhost;
location / {
root /app;
try_files $uri $uri/ /index.html $uri/ =404;
index index.html index.htm;
}
}
}

65
manager/package.json Normal file
View File

@@ -0,0 +1,65 @@
{
"name": "lilishop",
"version": "1.0.0",
"private": true,
"description": "lilishop-ui",
"author": "lili-platform",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"dev": "vue-cli-service serve"
},
"dependencies": {
"@amap/amap-jsapi-loader": "0.0.7",
"@antv/g2": "^4.1.12",
"apexcharts": "^3.26.0",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"countup.js": "^2.0.4",
"date-fns": "^1.30.1",
"dplayer": "^1.26.0",
"gitalk": "^1.6.2",
"html2canvas": "^1.0.0-rc.5",
"iview-area": "^1.6.0",
"js-cookie": "^2.2.1",
"node-sass": "^4.14.1",
"pinyin": "^2.9.0",
"print-js": "^1.0.63",
"qrcodejs2": "0.0.2",
"quill": "^1.3.7",
"sass-loader": "^8.0.2",
"sockjs-client": "^1.4.0",
"stompjs": "^2.3.3",
"swiper": "^6.3.5",
"view-design": "^4.2.0",
"vue": "^2.6.10",
"vue-apexcharts": "^1.5.1",
"vue-awesome": "^4.0.2",
"vue-awesome-swiper": "^4.1.1",
"vue-clipboard2": "^0.3.0",
"vue-cropper": "^0.4.9",
"vue-i18n": "^8.15.1",
"vue-json-pretty": "^1.4.1",
"vue-lazyload": "^1.3.3",
"vue-router": "^3.1.3",
"vuedraggable": "^2.23.2",
"vuex": "^3.4.0",
"wangeditor": "^4.5.3",
"xlsx": "^0.16.2",
"xss": "^1.0.7"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.4.4",
"@vue/cli-plugin-router": "^4.4.4",
"@vue/cli-plugin-vuex": "^4.4.4",
"@vue/cli-service": "^4.4.4",
"compression-webpack-plugin": "^4.0.0",
"css-loader": "^5.0.1",
"less": "^3.12.2",
"less-loader": "^6.2.0",
"style-loader": "^2.0.0",
"style-resources-loader": "^1.3.2",
"vue-cli-plugin-style-resources-loader": "^0.1.4",
"vue-template-compiler": "^2.6.10"
}
}

View File

@@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}

109
manager/public/index.html Normal file
View File

@@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
<link rel="icon" href="./logo.ico" type="image/x-icon">
<title>lili admin</title>
<meta name="keywords"
content="keywords">
<meta name="description"
content="description">
<!-- 部署CDN优化 -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuex@3.1.2/dist/vuex.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-i18n@8.15.1/dist/vue-i18n.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-router@3.1.3/dist/vue-router.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios@0.19.0/dist/axios.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/view-design@4.1.1/dist/styles/iview.css">
<script src="https://cdn.jsdelivr.net/npm/view-design@4.1.1/dist/iview.min.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/iview-area@1.6.0/dist/iview-area.min.js"></script> -->
<script src="https://cdn.jsdelivr.net/npm/vue-lazyload@1.3.3/vue-lazyload.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-apexcharts@1.5.1/dist/vue-apexcharts.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/xlsx@0.15.3/dist/xlsx.full.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dplayer@1.25.0/dist/DPlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/print-js@1.0.63/dist/print.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-json-pretty@1.6.2/vue-json-pretty.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gitalk@1.5.0/dist/gitalk.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/wangeditor@3.1.1/release/wangEditor.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/quill@1.3.7/dist/quill.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/quill@1.3.7/dist/quill.snow.css">
<script src="https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/stomp.js/2.3.3/stomp.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.8.4/Sortable.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuedraggable@2.23.2/dist/vuedraggable.umd.min.js"></script>
<script src="https://v.vaptcha.com/v3.js"></script>
<style>
.page-loading-wrap {
padding: 120px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.half-circle-spinner,
.half-circle-spinner * {
box-sizing: border-box;
}
.half-circle-spinner {
width: 35px;
height: 35px;
border-radius: 100%;
position: relative;
}
.half-circle-spinner .circle {
content: "";
position: absolute;
width: 100%;
height: 100%;
border-radius: 100%;
border: calc(35px / 10) solid transparent;
}
.half-circle-spinner .circle.circle-1 {
border-top-color: #5cadff;
animation: half-circle-spinner-animation 1s infinite;
}
.half-circle-spinner .circle.circle-2 {
border-bottom-color: #5cadff;
animation: half-circle-spinner-animation 1s infinite alternate;
}
@keyframes half-circle-spinner-animation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<noscript>
<strong>We're sorry but lili-admin doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>
<div id="app">
<div class="page-loading-wrap">
<div class="half-circle-spinner">
<div class="circle circle-1"></div>
<div class="circle circle-2"></div>
</div>
<h4 style="margin-top:20px;">正在加载资源...</h4>
</div>
</div>
<!-- built files will be auto injected -->
</body>
</html>

BIN
manager/public/logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

53
manager/src/App.vue Normal file
View File

@@ -0,0 +1,53 @@
<template>
<div id="main" class="app-main">
<router-view></router-view>
</div>
</template>
<script>
import {getCategoryTree} from '@/api/goods.js'
export default {
updated() {
if (!localStorage.getItem('category') && this.$route.path !== '/login') {
getCategoryTree(0).then(res => {
if (res.success) {
localStorage.setItem('category', JSON.stringify(res.result))
}
})
}
}
};
</script>
<style>
html,
body {
width: 100%;
height: 100%;
background: #f0f0f0;
font-size: 12px;
/* overflow: hidden; */
}
.app-main {
width: 100%;
height: 100%;
}
.br button {
margin-right: 5px;
}
.operation button {
margin-right: 5px;
}
.ivu-btn-text:focus {
box-shadow: none !important;
}
.ivu-tag {
cursor: pointer;
}
</style>

11
manager/src/api/common.js Normal file
View File

@@ -0,0 +1,11 @@
import {commonUrl, getRequest} from '@/libs/axios';
// 通过id获取子地区
export const getChildRegion = (id) => {
return getRequest(`${commonUrl}/common/region/item/${id}`);
};
// 点地图获取地址信息
export const getRegion = (parpams) => {
return getRequest(`${commonUrl}/common/region/region`, parpams);
};

View File

@@ -0,0 +1,58 @@
// 统一请求路径前缀在libs/axios.js中修改
import {getRequest, postRequest, putRequest, deleteRequest} from '@/libs/axios';
//查询分销商
export const getDistributionListData = (params) => {
return getRequest('/distribution/getByPage', params)
}
//审核分销商
export const auditDistribution = (id, params) => {
return putRequest(`/distribution/audit/${id}`, params)
}
// 清退分销商
export const retreatDistribution = (id, params) => {
return putRequest(`/distribution/retreat/${id}`, params)
}
// 恢复分销商
export const resumeDistribution = (id, params) => {
return putRequest(`/distribution/resume/${id}`, params)
}
//保存更新分销设置
export const saveDistributionSetting = (params) => {
return postRequest('/distribution/setting/insertOrUpdate', params)
}
//获取分销设置
export const getDistributionSetting = (id, params) => {
return getRequest(`/distribution/setting/get/${id}`, params)
}
//获取分销订单列表
export const getDistributionOrder = (params) => {
return getRequest('/distribution/order/getByPage', params)
}
//获取分销商品列表
export const getDistributionGoods = (params) => {
return getRequest('/distribution/goods/getByPage', params)
}
//删除分销商品
export const delDistributionGoods = (ids) => {
return deleteRequest(`/distribution/goods/delByIds/${ids}`)
}
//获取分销佣金信息
export const getDistributionCash = (params) => {
return getRequest('/distribution/cash/getByPage', params)
}
//审核分销佣金申请
export const auditDistributionCash = (id,params) => {
return postRequest(`/distribution/cash/audit/${id}`, params)
}

226
manager/src/api/goods.js Normal file
View File

@@ -0,0 +1,226 @@
// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, deleteRequest} from '@/libs/axios';
// 获取商品品牌分页列表
export const getManagerBrandPage = (params) => {
return getRequest('/goods/brand/getByPage', params)
}
// 添加或修改品牌设置
export const addBrand = (params) => {
return postRequest('/goods/brand', params)
}
// 禁用品牌
export const disableBrand = (id, params) => {
return putRequest(`/goods/brand/disable/${id}`, params)
}
//根据分类id获取关联品牌
export const getCategoryBrandListData = (category_id, params) => {
return getRequest(`/category/brand/${category_id}`, params)
}
//保存获取关联品牌
export const saveCategoryBrand = (category_id, params) => {
return postRequest(`/category/brand/${category_id}`, params)
}
//保存获取关联规格
export const saveCategorySpec = (category_id, params) => {
return postRequest(`/goods/category/spec/${category_id}`, params)
}
//获取所有可用品牌
export const getBrandListData = (params) => {
return getRequest('/goods/brand/all', params)
}
// 获取所有可用规格
export const getSpecificationList = (params) => {
return getRequest('/goods/spec/all', params)
}
//获取分类列表数据
export const getAllCategoryList = (parent_id) => {
return getRequest(`/goods/category/${parent_id}/all-children`)
}
//获取分类列表数据
export const getCategoryTree = () => {
return getRequest(`/goods/category/allChildren`)
}
// 添加商品分类
export const insertCategory = (params) => {
return postRequest('/goods/category', params)
}
// 添加商品分类
export const updateCategory = (params) => {
return putRequest('/goods/category', params)
}
//删除商品分类
export const delCategory = (id) => {
return deleteRequest(`/goods/category/${id}`)
}
// 禁用分类
export const disableCategory = (id, type) => {
return putRequest(`/goods/category/disable/${id}`, type)
}
// 获取商品规格分页列表
export const getSpecListData = (params) => {
return getRequest('/goods/spec/page', params)
}
// 添加或修改规格设置
export const insertSpec = (params) => {
return postRequest('/goods/spec', params)
}
// 添加或修改规格设置
export const updateSpec = (params) => {
return putRequest('/goods/spec', params)
}
//根据分类id获取关联规格
export const getCategorySpecListData = (category_id, params) => {
return getRequest(`/goods/category/spec/${category_id}`, params)
}
//删除gUI个
export const delSpec = (id, params) => {
return deleteRequest(`/goods/spec/${id}`, params)
}
// 获取商品规格值列表
export const getSpecValuesListData = (id, params) => {
return getRequest(`/goods/specValues/values/${id}`, params)
}
// 添加商品规格值
export const saveSpecValues = (id, params) => {
return postRequest(`/goods/specValues/save/${id}`, params)
}
// 查询某分类下的全部子分类列表
export const getGoodsCategory = (parent_id) => {
return getRequest(`/goods/category/${parent_id}/all-children`)
}
// 上架商品
export const upGoods = (id, params) => {
return putRequest(`/goods/${id}/up`, params)
}
// 下架商品
export const lowGoods = (id, params) => {
return putRequest(`/goods/${id}/under`, params)
}
// 获取商品sku分页列表
export const getGoodsSkuData = (params) => {
return getRequest('/goods/sku/list', params)
}
// 获取商品分页列表
export const getGoodsListData = (params) => {
return getRequest('/goods/list', params)
}
// 获取待审核商品分页列表
export const getAuthGoodsListData = (params) => {
return getRequest('/goods/auth/list', params)
}
// 审核商品
export const authGoods = (id, params) => {
return putRequest(`/goods/${id}/auth`, params)
}
//查询分类绑定参数信息
export const getCategoryParamsListData = (id, params) => {
return getRequest(`/goods/category/parameters/${id}`, params)
}
//查询商品绑定参数信息
export const getCategoryParamsByGoodsId = (goodsId, categoryId) => {
return getRequest(`/goods/parameters/${goodsId}/${categoryId}`)
}
//保存参数
export const insertGoodsParams = (params) => {
return postRequest('/goods/parameters', params)
}
//更新参数
export const updateGoodsParams = (params) => {
return putRequest('/goods/parameters', params)
}
//删除参数
export const deleteParams = (id, params) => {
return deleteRequest(`/goods/parameters/${id}`, params)
}
//保存参数组
export const insertParamsGroup = (params) => {
return postRequest('/goods/category/parameters', params)
}
//更新参数组
export const updateParamsGroup = (params) => {
return putRequest('/goods/category/parameters', params)
}
//删除参数组
export const deleteParamsGroup = (id, params) => {
return deleteRequest(`/goods/category/parameters/${id}`, params)
}
//保存获取关联规格
export const getGoodsSpecInfo = (category_id, params) => {
return getRequest(`/goods/category/spec/goods/${category_id}`, params)
}
//获取sku列表
export const getSkuPage = (params) => {
return getRequest(`/goodsSku/getByPage`, params)
}
//查看商品详情
export const getGoodsDetail = (id) => {
return getRequest(`/goods/get/${id}`)
}
// 获取订单统计图表
export const getOrderChart = (params) => {
return getRequest(`/statistics/order`, params)
}
// 订单统计概览
export const getOrderOverView = (params) => {
return getRequest(`/statistics/order/overview`, params)
}
// 统计相关订单统计
export const statisticsOrderList = (params) => {
return getRequest(`/statistics/order/order`, params)
}
// 统计相关退单统计
export const statisticsOrderRefundList = (params) => {
return getRequest(`/statistics/order/refund`, params)
}
// 获取行业统计列表
export const goodsCategoryStatistics = (params) => {
return getRequest(`/statistics/goods/getCategoryByPage`, params)
}
// 获取统计列表,排行前一百的数据
export const goodsStatistics = (params) => {
return getRequest(`/statistics/goods`, params)
}
// 获取退款统计列表
export const refundStatistics = (params) => {
return getRequest(`/statistics/refund/order/getByPage`, params)
}
// 获取退款统计金额
export const refundPriceStatistics = (params) => {
return getRequest(`/statistics/refund/order/getPrice`, params)
}

413
manager/src/api/index.js Normal file
View File

@@ -0,0 +1,413 @@
// 统一请求路径前缀在libs/axios.js中修改
import {
getRequest,
postRequest,
putRequest,
deleteRequest,
importRequest,
getRequestWithNoToken,
putRequestWithNoForm,
postRequestWithNoForm,
commonUrl,
managerUrl
} from "@/libs/axios";
import config from "@/config";
// 文件上传接口
export const uploadFile = commonUrl + "/common/upload/file";
// 验证码渲染图片接口
export const drawCodeImage = commonUrl + "/common/captcha/draw/";
// 获取菜单
export const getMenuList = managerUrl + "/permission/getMenuList";
// Websocket
export const ws = managerUrl + "/ws";
export const getMessageSendData = "";
//获取所有city
export const getAllCity = (params) => {
return getRequest(commonUrl + '/common/region/allCity', params)
}
// 获取首页查询数据
export const homeStatistics = (params) => {
return getRequest("/statistics/index", params);
};
// 获取首页tpo10商品
export const hotGoods = (params) => {
return getRequest("/statistics/index/goodsStatistics", params);
};
// 获取首页tpo10店铺
export const hotShops = (params) => {
return getRequest("/statistics/index/storeStatistics", params);
};
// 通知提示信息
export const getNoticePage = (params) => {
return getRequest("/statistics/index/notice", params);
};
// 登陆
export const login = (params) => {
return getRequestWithNoToken("/user/login", params);
};
// 刷新token
export const handleRefreshToken = (token) => {
return getRequestWithNoToken(`/user/refresh/${token}`);
};
// 获取用户登录信息
export const userInfo = (params) => {
return getRequest("/user/info", params);
};
// 注册
export const regist = (params) => {
return postRequest("/user/regist", params);
};
// 初始化验证码
export const initCaptcha = (params) => {
return getRequestWithNoToken("/common/captcha/init", params);
};
// 发送登录短信验证码
export const sendLoginSms = (mobile, params) => {
return getRequest(`/common/captcha/sendLoginSms/${mobile}`, params);
};
// 发送注册短信验证码
export const sendRegistSms = (mobile, params) => {
return getRequest(`/common/captcha/sendRegistSms/${mobile}`, params);
};
// 发送重置密码短信验证码
export const sendResetSms = (mobile, params) => {
return getRequest(`/common/captcha/sendResetSms/${mobile}`, params);
};
// 发送修改绑定手机短信验证码
export const sendEditMobileSms = (mobile, params) => {
return getRequest(`/common/captcha/sendEditMobileSms/${mobile}`, params);
};
// 通过手机重置密码
export const resetByMobile = (params) => {
return postRequest("/user/resetByMobile", params);
};
// IP天气信息
export const ipInfo = (params) => {
return getRequest("/common/ip/info", params);
};
// 个人中心编辑
export const userInfoEdit = (params) => {
return putRequest("/user/edit", params);
};
// 个人中心修改密码
export const changePass = (params) => {
return putRequest("/user/editPassword", params);
};
// 个人中心修改手机
export const changeMobile = (params) => {
return postRequest("/user/changeMobile", params);
};
// 获取用户数据 多条件
export const getUserListData = (params) => {
return getRequest("/user", params);
};
// 通过用户名搜索
export const searchUserByName = (username, params) => {
return getRequest("/user/searchByName/" + username, params);
};
// 获取全部用户数据
export const getAllUserData = (params) => {
return getRequest("/user/getAll", params);
};
// 添加用户
export const addUser = (params) => {
return postRequest("/user", params);
};
// 编辑管理员自身
export const editUser = (params) => {
return putRequest("/user/edit", params);
};
// 编辑用户
export const editOtherUser = (params) => {
return putRequest("/user/admin/edit", params);
};
// 启用用户
export const enableUser = (id, params) => {
return putRequest(`/user/enable/${id}`, params);
};
// 删除用户
export const deleteUser = (ids, params) => {
return deleteRequest(`/user/${ids}`, params);
};
// 导入用户
export const importUserData = (params) => {
return importRequest("/user/importData", params);
};
/****************************** 部门 */
// 通过部门获取全部角色数据
export const getUserByDepartmentId = (id, params) => {
return getRequest(`/departmentRole/${id}`, params);
};
// 通过部门修改绑定角色
export const updateDepartmentRole = (id, params) => {
return putRequestWithNoForm(`/departmentRole/${id}`, params);
};
// 获取一级部门
export const initDepartment = (params) => {
return getRequest("/department", params);
};
// 加载部门子级数据
export const loadDepartment = (id) => {
return getRequest(`/department/${id}`);
};
// 添加部门
export const addDepartment = (params) => {
return postRequest("/department", params);
};
// 编辑部门
export const editDepartment = (ids, params) => {
return putRequest(`/department/${ids} `, params);
};
// 删除部门
export const deleteDepartment = (ids, params) => {
return deleteRequest(`/department/${ids}`, params);
};
// 搜索部门
export const searchDepartment = (params) => {
return getRequest("/department/search", params);
};
/****************************** 部门结束 */
// 获取全部角色数据
export const getAllRoleList = (params) => {
return getRequest("/role", params);
};
// 分页获取角色数据
export const getRoleList = (params) => {
return getRequest("/role", params);
};
// 添加角色
export const addRole = (params) => {
return postRequest("/role", params);
};
// 编辑角色
export const editRole = (params) => {
return putRequest(`/role/${params.roleId}`, params);
};
// 查看某角色拥有的菜单
export const selectRoleMenu = (params) => {
return getRequest(`/roleMenu/${params}`);
};
// 保存角色菜单
export const saveRoleMenu = (id, params) => {
return postRequestWithNoForm(`/roleMenu/${id}`, params);
};
// 分配角色权限
export const editRolePerm = (params) => {
return postRequest("/role/editRolePerm", params);
};
// 分配角色数据权限
export const editRoleDep = (params) => {
return postRequest("/role/editRoleDep", params);
};
// 删除角色
export const deleteRole = (ids, params) => {
return deleteRequest(`/role/${ids}`, params);
};
/****************************** 角色结束 */
/****************************** 权限 */
// 获取全部权限数据
export const getAllPermissionList = (params) => {
return getRequest("/menu/tree", params);
};
// 获取全部权限数据
export const getCurrentPermissionList = (params) => {
return getRequest("/menu/memberMenu", params);
};
// 添加权限
export const addPermission = (params) => {
return postRequest("/menu", params);
};
// 编辑权限
export const editPermission = (params) => {
return putRequest(`/menu/${params.id}`, params);
};
// 删除权限
export const deletePermission = (ids, params) => {
return deleteRequest(`/menu/${ids}`, params);
};
// 搜索权限
export const searchPermission = (params) => {
return getRequest("/menu", params);
};
/****************************** 权限结束 */
// 分页获取日志数据
export const getLogListData = (params) => {
return getRequest("/log/getAllByPage", params);
};
// 删除日志
export const deleteLog = (ids, params) => {
return deleteRequest(`/log/${ids}`, params);
};
// 清空日志
export const deleteAllLog = (params) => {
return deleteRequest("/log", params);
};
// 分页获取消息数据
export const getMessageData = (params) => {
return getRequest("/message/getByCondition", params);
};
// 获取单个消息详情
export const getMessageDataById = (id, params) => {
return getRequest(`/message/get/${id}`, params);
};
// 发送消息
export const addMessage = (params) => {
return postRequest("/messageSend/send", params);
};
// 编辑消息
export const editMessage = (params) => {
return postRequest("/message/edit", params);
};
// 删除消息
export const deleteMessage = (ids, params) => {
return deleteRequest(`/message/delByIds/${ids}`, params);
};
// 编辑发送消息
export const editMessageSend = (params) => {
return putRequest("/messageSend/update", params);
};
// 删除发送消息
export const deleteMessageSend = (ids, params) => {
return deleteRequest(`/manager/messageSend/delByIds/${ids}`, params);
};
// 通过id获取子地区
export const getRegion = (id) => {
return getRequest(`/region/item/${id}`);
};
// 分页获取文件数据
export const getFileListData = (params) => {
return getRequest("/file", params);
};
// 重命名文件
export const renameFile = (params) => {
return postRequest("/file/rename", params);
};
// 删除文件
export const deleteFile = (ids, params) => {
return deleteRequest(`/file/delete/${ids}`, params);
};
// 下载文件
export const aliDownloadFile = (fKey, params) => {
return getRequest(`/file/ali/download/${fKey}`, params);
};
// base64上传
export const base64Upload = (params) => {
return postRequest("/upload/file", params);
};
// 系统设置
export const getSetting = (key) => {
return getRequest(`/system/setting/get/${key}`);
};
// 更新系统配置
export const setSetting = (key, params) => {
return putRequestWithNoForm(`/system/setting/put/${key}`, params);
};
// 分页查询敏感词
export const getSensitiveWordsPage = (params) => {
return getRequest(`/sensitiveWords`, params);
};
// 分页查询敏感词
export const insertSensitiveWords = (params) => {
return postRequest(`/sensitiveWords`, params);
};
// 修改
export const updateSensitiveWords = (id, params) => {
return putRequest(`/sensitiveWords/${id}`, params);
};
// 删除敏感词
export const delSensitive = (ids) => {
return deleteRequest(`/sensitiveWords/delByIds/${ids}`);
};
// 添加商品计量单位
export const addGoodsUnit = (params) => {
return postRequest(`/goods/goodsUnit`, params);
};
// 分页获取商品计量单位
export const getGoodsUnitPage = (params) => {
return getRequest(`/goods/goodsUnit`, params);
};
// 编辑商品计量单位
export const updateGoodsUnit = (id, params) => {
return putRequest(`/goods/goodsUnit/${id}`, params);
};
// 删除商品计量单位
export const delGoodsUnit = (ids) => {
return deleteRequest(`/goods/goodsUnit/delete/${ids}`);
};
// 同步高德行政地区数据
export const asyncRegion = () => {
return postRequest(`/region/sync`);
};
// 批量id删除
export const delRegion = (ids) => {
return deleteRequest(`/region/${ids}`);
};
// 通过id获取地区详情
export const getRegionDetail = (id) => {
return getRequest(`/region/${id}`);
};
// 更新地区
export const updateRegion = (id, params) => {
return putRequest(`/region/${id}`, params);
};
// 添加地区
export const addRegion = (params) => {
return postRequest(`/region`, params);
};
// 通过id获取子地区
export const getChildRegion = (id) => {
return getRequest(`/region/item/${id}`);
};
// 重置用户密码
export const resetPassword = (params) => {
return postRequest(`/user/resetPassword/${params}"`);
};

View File

@@ -0,0 +1,32 @@
// 统一请求路径前缀在libs/axios.js中修改
import {
getRequest,
postRequest,
putRequest,
deleteRequest,
} from "@/libs/axios";
// 分页获取物流公司
export const getLogisticsPage = params => {
return getRequest(`/logistics/getByPage`, params);
};
// 删除
export const delLogistics = id => {
return deleteRequest(`/logistics/delete/${id}`);
};
// 添加
export const addLogistics = params => {
return postRequest(`/logistics/save`,params);
};
// 通过id查询详情
export const getLogisticsDetail = id => {
return getRequest(`/logistics/get/${id}`);
};
// 编辑
export const updateLogistics = (id,params) => {
return putRequest(`/logistics/${id}`,params);
};

138
manager/src/api/member.js Normal file
View File

@@ -0,0 +1,138 @@
// 统一请求路径前缀在libs/axios.js中修改
import {getRequest, putRequest, postRequest, deleteRequest} from "@/libs/axios";
// 获取分页
export const getMember = params => {
return getRequest("/member/getByPage", params);
};
// 分页获取会员评价
export const getMemberReview = params => {
return getRequest("/memberEvaluation/getByPage", params);
};
// 获取id
export const getMemberInfoReview = id => {
return getRequest(`/memberEvaluation/get/${id}`);
};
// 删除评论
export const delMemberReview = id => {
return putRequest(`/memberEvaluation/delete/${id}`);
};
// 修改评价状态
export const updateMemberReview = (id, params) => {
return getRequest(`/memberEvaluation/updateStatus/${id}`, params);
};
// 添加或修改
export const insertOrUpdateSpec = params => {
return postRequest("/memberNoticeSenter/insertOrUpdate", params);
};
// 获取会员列表
export const getMemberListData = params => {
return getRequest("/member", params);
};
// 获取会员详情
export const getMemberInfoData = (id) => {
return getRequest(`/member/${id}`);
};
// 修改会员基本信息
export const updateMember = (params) => {
return putRequest(`/member`, params);
};
// 添加会员基本信息
export const addMember = params => {
return postRequest(`/member`, params);
};
// 获取会员列表
export const getMemberAll = () => {
return getRequest("/member/getAll");
};
// 增加或修改会员列表
export const operationMemberListData = params => {
return postRequest("/member/insertOrUpdate", params);
};
// 增加或修改会员列表
export const deleteMemberListData = ids => {
return deleteRequest(`/member/delByIds/${ids}`);
};
// 获取充值记录列表数据
export const getUserRecharge = params => {
return getRequest("/recharge", params);
};
// 获取预存款明细列表数据
export const getUserWallet = params => {
return getRequest("/wallet/log", params);
};
// 获取提现申请列表数据
export const getUserWithdrawApply = params => {
return getRequest("/members/withdraw-apply", params);
};
// 审核提现申请
export const withdrawApply = params => {
return postRequest("/members/withdraw-apply", params);
};
//会员状态修改
export const updateMemberStatus = params => {
return putRequest("/member/updateMemberStatus", params);
};
// 获取会员注册统计列表
export const getMemberStatistics = params => {
return getRequest("/statistics/member", params);
};
// 获取会员注册统计列表
export const getStatisticsList = params => {
return getRequest("/statistics/view/list", params);
};
//查询会员数量
export const getMemberNum = params => {
return getRequest("/member/num", params);
};
//查询会员历史积分
export const getHistoryPointData = (params) => {
return getRequest(`/member/memberPointsHistory/getByPage`, params)
}
//查询会员的收货地址
export const getMemberAddressData = (id, params) => {
return getRequest(`/member/address/${id}`, params)
}
//删除会员地址
export const removeMemberAddress = (id) => {
return deleteRequest(`/member/address/delById/${id}`)
}
//添加会员收货地址
export const addMemberAddress = (params) => {
return postRequest(`/member/address`,params)
}
//修改会员收货地址
export const editMemberAddress = (params) => {
return putRequest(`/member/address`,params)
}
//查询会员预存款
export const getMemberWallet = (params) => {
return getRequest(`/members/wallet`,params)
}

163
manager/src/api/order.js Normal file
View File

@@ -0,0 +1,163 @@
// 统一请求路径前缀在libs/axios.js中修改
import {
getRequest,
postRequest,
putRequest,
deleteRequest
} from '@/libs/axios';
// 交由商家申诉
export const storeComplain = (params) => {
return putRequest(`/complain/status`, params)
}
// 获取售后原因分页列表
export const getAfterSaleReasonPage = (params) => {
return getRequest('/afterSaleReason/getByPage', params)
}
// 删除售后原因
export const delAfterSaleReason = (id) => {
return deleteRequest(`/afterSaleReason/delByIds/${id}`)
}
// 添加售后原因
export const addAfterSaleReason = (params) => {
return postRequest(`/afterSaleReason`, params)
}
// 修改售后原因
export const editAfterSaleReason = (id, params) => {
return putRequest(`/afterSaleReason/update/${id}`, params)
}
// 售后服务单详情
export const afterSaleOrderDetail = (sn) => {
return getRequest(`/afterSale/${sn}`)
}
// 商家审核
export const afterSaleSellerReview = (sn, params) => {
return putRequest(`/afterSale/review/${sn}`, params)
}
// 商家确认收货
export const afterSaleSellerConfirm = (sn, params) => {
return putRequest(`/afterSale/confirm/${sn}`, params)
}
// 商家换货业务发货
export const afterSaleSellerDelivery = (sn, params) => {
return putRequest(`/afterSale/${sn}/delivery`, params)
}
// 获取交易投诉信息
export const getOrderComplain = (params) => {
return getRequest('/complain', params)
}
// 获取交易投诉详细信息
export const getOrderComplainDetail = (id) => {
return getRequest(`/complain/${id}`)
}
// 交易投诉对话
export const addOrderCommunication = (params) => {
return postRequest(`/complain/communication`, params)
}
// 平台仲裁
export const orderComplete = (id, params) => {
return putRequest(`/complain/complete/${id}`, params)
}
// 查询订单列表
export const getOrderList = (params) => {
return getRequest(`/orders`, params)
}
// 订单付款
export const orderPay = (sn) => {
return postRequest(`/orders/${sn}/pay`)
}
// 订单付款
export const orderDetail = (sn) => {
return getRequest(`/orders/${sn}`)
}
// 修改订单价格
export const updateOrderPrice = (sn, params) => {
return putRequest(`/orders/update/${sn}/price`, params)
}
// 获取订单日志
export const getOrderLog = (params) => {
return getRequest(`/orderLog/getByPage`, params)
}
// 订单取消
export const orderCancel = (sn, params) => {
return postRequest(`/orders/${sn}/cancel`, params)
}
// 修改收货地址
export const editOrderConsignee = (sn, params) => {
return postRequest(`/orders/update/${sn}/consignee`, params)
}
// 获取售后订单列表
export const getAfterSaleOrderPage = (params) => {
return getRequest('/afterSale/page', params)
}
// 获取售后订单详情
export const getAfterSaleOrderDetail = (sn) => {
return getRequest(`/afterSale/get/${sn}`)
}
//售后单查询物流
export const getSellerDeliveryTraces = (sn, params) => {
return getRequest(`/afterSale/getSellerDeliveryTraces/${sn}`, params)
}
//售后单查询物流
export const getAfterSaleTraces = (sn, params) => {
return getRequest(`/afterSale/getDeliveryTraces/${sn}`, params)
}
// 获取商家选中的物流公司
export const getLogisticsChecked = () => {
return getRequest(`/logistics/getChecked`)
}
//查询物流
export const getTraces = (sn, params) => {
return postRequest(`/orders/getTraces/${sn}`, params)
}
//获取发票列表
export const getReceiptPage = (params) => {
return getRequest(`/receipt`, params)
}
//平台退款
export const refundPrice = (afterSaleSn, params) => {
return putRequest(`/afterSale/refund/${afterSaleSn}`, params)
}
//平台收款记录
export const paymentLog = (params) => {
return getRequest(`/paymentLog`, params)
}
//平台退款记录
export const refundLog = (params) => {
return getRequest(`/refundLog`, params)
}

89
manager/src/api/other.js Normal file
View File

@@ -0,0 +1,89 @@
// 统一请求路径前缀在libs/axios.js中修改
import {
getRequest,
postRequest,
putRequest,
deleteRequest
} from "@/libs/axios";
/**
* 楼层装修设置
*
*/
export const setHomeSetup = params => {
return postRequest("/pageData/add", params);
};
/**
* 获取页面信息
*
*/
export const getHomeData = params => {
return getRequest(`/pageData/${params}`);
};
/**
* 查询楼层装修列表
*
*/
export const getHomeList = params => {
return getRequest("/pageData/pageDataList", params);
};
/**
* 修改楼层装修
*
*/
export const updateHome = (id, params) => {
return putRequest(`/pageData/update/${id}`, params);
};
/**
* 删除楼层装修
*
*/
export const removePageHome = (id) => {
return deleteRequest(`/pageData/remove/${id}`);
};
/**
* 发布页面
*
*/
export const releasePageHome = (id) => {
return putRequest(`/pageData/release/${id}`);
};
//管理员获取发送列表
export const getMessagePage = (params) => {
return getRequest(`/message`, params);
};
//管理员获取发送列表
export const sendMessage = (params) => {
return postRequest(`/message`, params);
};
//管理员获取发送详情列表
export const getShopMessage = (params) => {
return getRequest(`/message/store`, params);
};
//管理员获取会员意见反馈
export const getMemberFeedback = (params) => {
return getRequest(`/feedback`, params);
};
//管理员获取会员意见反馈
export const getMemberFeedbackDetail = (id) => {
return getRequest(`/feedback/${id}`);
};

116
manager/src/api/pages.js Normal file
View File

@@ -0,0 +1,116 @@
// 统一请求路径前缀在libs/axios.js中修改
import {getRequest, postRequest, putRequest, deleteRequest} from '@/libs/axios';
//保存导航栏
export const save = (params) => {
return postRequest('/siteNavigation/save', params)
}
//保存导航栏
export const update = (params) => {
return postRequest('/siteNavigation/update', params)
}
//查询导航栏
export const getNavigationData = (params) => {
return getRequest('/siteNavigation/getByPage', params)
}
//禁用导航栏
export const disableNavigation = (ids) => {
return deleteRequest(`/siteNavigation/disable/${ids}`)
}
//启用导航栏
export const enableNavigation = (ids) => {
return deleteRequest(`/siteNavigation/enable/${ids}`)
}
//删除导航栏
export const delNavigation = (ids) => {
return deleteRequest(`/siteNavigation/remove/${ids}`)
}
//
export const saveFocus = (params) => {
return deleteRequest('/siteNavigation/remove/${ids}', params)
}
//查询焦点图
export const getFocusData = (params) => {
return getRequest('/focus/getByPage', params)
}
//查询焦点图
export const saveFocusData = (params) => {
return postRequest('/focus/insertOrUpdate', params)
}
//禁用导航栏
export const disableFocus = (ids) => {
return putRequest(`/focus/disable/${ids}`)
}
//启用导航栏
export const enableFocus = (ids) => {
return putRequest(`/focus/enable/${ids}`)
}
//删除导航栏
export const delFocus = (ids) => {
return deleteRequest(`/focus/delByIds/${ids}`)
}
//根据店铺编号查询页面数据店铺编号为0则为平台
export const getPageData = (id) => {
return getRequest(`/page/get/${id}`)
}
//保存页面数据
export const savePageData = (params) => {
return postRequest('/page/insertOrUpdate', params)
}
//获取分类列表数据
export const getArticleCategory = () => {
return getRequest(`/article-category/all-children`)
}
//文章分类添加
export const saveArticleCategory = (params) => {
return postRequest('/article-category', params)
}
//删除文章分类
export const delArticleCategory = (id) => {
return deleteRequest(`/article-category/${id}`)
}
//修改文章分类
export const updateArticleCategory = (params, id) => {
return putRequest(`/article-category/update/${id}`, params)
}
//文章添加
export const saveArticle = (params) => {
return postRequest('/article', params)
}
//文章修改
export const updateArticle = (params) => {
return putRequest(`/article/update/${params.id}`, params)
}
//文章是否展示修改
export const updateArticleStatus = (id,params) => {
return putRequest(`/article/update/status/${id}`, params)
}
//查看文章
export const seeArticle = (id) => {
return getRequest(`/article/${id}`)
}
//获取文章列表数据
export const getArticle = (params) => {
return getRequest('/article/getByPage', params)
}
//删除文章数据
export const delArticle = (ids) => {
return deleteRequest(`/article/delByIds/${ids}`)
}

View File

@@ -0,0 +1,15 @@
// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest } from '@/libs/axios';
// 验证码渲染图片接口
export const drawCodeImage = "/lili/common/captcha/draw/"
// 获取kuaidi配置
export const getParams = (params) => {
return getRequest('/platformSetting/get/'+params)
}
// 编辑kuaidi配置
export const editParams = (params,method) => {
return postRequest('/platformSetting/insertOrUpdate/'+method, params)
}

View File

@@ -0,0 +1,174 @@
// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, deleteRequest } from '@/libs/axios';
// 获取限时抢购申请列表
export const getPromotionSeckill = (params) => {
return getRequest(`/promotion/seckill/apply`, params)
}
// 获取当前进行中的促销活动商品
export const getPromotionGoods = (promotionId,params) => {
return getRequest(`/promotion/${promotionId}/goods`, params)
}
// 获取当前进行中的促销活动
export const getAllPromotion = (params) => {
return getRequest('/promotion/current', params)
}
// 获取拼团数据
export const getPintuanList = (params) => {
return getRequest('/promotion/pintuan', params)
}
// 获取拼团详情
export const getPintuanDetail = (id) => {
return getRequest(`/promotion/pintuan/${id}`)
}
// 获取拼团商品数据
export const getPintuanGoodsList = (params) => {
return getRequest(`/promotion/pintuan/goods/${params.pintuanId}`,params)
}
// 关闭拼团活动
export const closePintuan = (pintuanId) => {
return putRequest(`/promotion/pintuan/close/${pintuanId}`)
}
// 保存平台优惠券
export const savePlatformCoupon = (params) => {
return postRequest('/promotion/coupon', params,{'Content-type': 'application/json'})
}
// 修改平台优惠券
export const editPlatformCoupon = (params) => {
return putRequest('/promotion/coupon', params,{'Content-type': 'application/json'})
}
// 获取平台优惠券
export const getPlatformCouponList = (params) => {
return getRequest('/promotion/coupon', params)
}
// 作废优惠券
export const deletePlatformCoupon = (ids) => {
return deleteRequest(`/promotion/coupon/${ids}`)
}
// 更新优惠券状态
export const updatePlatformCouponStatus = ( params) => {
return putRequest(`/promotion/coupon/status`, params)
}
// 获取单个优惠券
export const getPlatformCoupon = (id) => {
return getRequest(`/promotion/coupon/${id}`)
}
// 获取优惠券领取详情
export const getMemberReceiveCouponList = (id) => {
return getRequest(`/promotion/coupon/member/${id}`)
}
// 作废会员优惠券
export const deleteMemberReceiveCoupon = (id) => {
return putRequest(`/promotion/coupon/member/cancellation/${id}`)
}
// 获取限时抢购数据
export const getSeckillList = (params) => {
return getRequest('/promotion/seckill', params)
}
// 获取限时抢购审核列表
export const seckillGoodsList = (params) => {
return getRequest('/promotion/seckill/apply', params)
}
// 获取限时抢购详情数据
export const seckillDetail = (id, params) => {
return getRequest(`/promotion/seckill/${id}`, params)
}
// 删除限时抢购
export const delSeckill = (id) => {
return deleteRequest(`/promotion/seckill/${id}`)
}
// 保存限时抢购
export const saveSeckill = (params) => {
return postRequest('/promotion/seckill', params)
}
// 修改限时抢购
export const updateSeckill = (params) => {
return putRequest('/promotion/seckill', params)
}
// 关闭限时抢购
export const closeSeckill = (id) => {
return putRequest(`/promotion/seckill/close/${id}`)
}
// 审核限时抢购
export const auditApplySeckill = (params) => {
return putRequest(`/promotion/seckill/apply/audit/${params.ids}`, params)
}
// 满优惠列表
export const getFullDiscountList = (params) => {
return getRequest(`/promotion/fullDiscount`,params)
}
// 满优惠列表
export const getFullDiscountById = (id) => {
return getRequest(`/promotion/fullDiscount/${id}`)
}
// 积分商品列表
export const getPointsGoodsList = (params) => {
return getRequest(`/promotion/pointsGoods`,params)
}
// 积分商品详情
export const getPointsGoodsById = (id) => {
return getRequest(`/promotion/pointsGoods/${id}`)
}
// 添加积分商品
export const addPointsGoods = (params) => {
return postRequest(`/promotion/pointsGoods`,params, {'Content-type': 'application/json'})
}
// 修改积分商品
export const updatePointsGoods = (params) => {
return putRequest(`/promotion/pointsGoods`,params, {'Content-type': 'application/json'})
}
// 修改积分商品状态
export const editPointsGoodsStatus = (id, params) => {
return putRequest(`/promotion/pointsGoods/${id}`,params)
}
// 删除积分商品
export const deletePointsGoodsStatus = (id) => {
return deleteRequest(`/promotion/pointsGoods/${id}`)
}
// 积分商品分类列表
export const getPointsGoodsCategoryList = (params) => {
return getRequest(`/promotion/pointsGoodsCategory`,params)
}
// 积分商品分类详情
export const getPointsGoodsCategoryById = (id) => {
return getRequest(`/promotion/pointsGoodsCategory/${id}`)
}
// 添加积分商品分类
export const addPointsGoodsCategory = (params) => {
return postRequest(`/promotion/pointsGoodsCategory`, params)
}
// 更新积分商品分类
export const updatePointsGoodsCategory = (params) => {
return putRequest(`/promotion/pointsGoodsCategory`, params)
}
// 删除积分商品分类
export const deletePointsGoodsCategoryById = (id) => {
return deleteRequest(`/promotion/pointsGoodsCategory/${id}`)
}

198
manager/src/api/setting.js Normal file
View File

@@ -0,0 +1,198 @@
import {
getRequest,
putRequest,
deleteRequest,
postRequest
} from '@/libs/axios';
// 查询短信站内信信息
export const getMessageData = params => {
return getRequest("/message", params);
};
//修改短信模板
export const editSmsMessageTemplate = (id, params) => {
return putRequest(`/message/sms/${id}`, params)
}
//修改站内信模板
export const editNoticeMessage = (id, params) => {
return putRequest(`/noticeMessage/${id}`, params)
}
//微信消息同步
export const wechatMessageSync = (params) => {
return getRequest("/message/wechat/init", params)
}
//分页获取微信消息
export const getWechatMessagePage = (params) => {
return getRequest("/message/wechat", params)
}
//编辑微信消息模版
export const editWechatMessageTemplate = (id, params) => {
return putRequest(`/message/wechat/${id}`, params)
}
//删除微信消息模版
export const delWechatMessageTemplate = (id, params) => {
return deleteRequest(`/message/wechat/${id}`, params)
}
//微信消息订阅同步
export const wechatMPMessageSync = (params) => {
return getRequest("/message/wechatMPMessage/init", params)
}
//分页获取微信消息订阅
export const getWechatMPMessagePage = (params) => {
return getRequest("/message/wechatMPMessage", params)
}
//编辑微信消息订阅模版
export const editWechatMPMessageTemplate = (id, params) => {
return putRequest(`/message/wechatMPMessage/${id}`, params)
}
//删除微信消息订阅模版
export const delWechatMPMessageTemplate = (id, params) => {
return deleteRequest(`/message/wechatMPMessage/${id}`, params)
}
// 查询站内信模板信息
export const getNoticeMessageData = params => {
return getRequest("/noticeMessage", params);
};
//删除站内信
export const deleteMessage = (id) => {
return deleteRequest(`message/${id}`);
};
// 开启站内信模板
export const openNoticeMessage = (id) => {
return putRequest(`/noticeMessage/${id}/open`);
};
// 修改站内信状态
export const updateMessageStatus = (id,status) => {
return putRequest(`/noticeMessage/${id}/${status}`);
};
//获取短信模板
export const getSmsTemplatePage = (params) => {
return getRequest(`sms/template/querySmsTemplatePage`, params);
};
//添加短信模板
export const addSmsTemplatePage = (params) => {
return postRequest(`sms/template`, params);
};
//删除短信模板
export const deleteSmsTemplatePage = (params) => {
return deleteRequest(`sms/template`, params);
};
//删除短信模板
export const editSmsTemplatePage = (params) => {
return putRequest(`sms/template/modifySmsTemplate`, params);
};
//分页查询短信签名
export const getSmsSignPage = (params) => {
return getRequest(`sms/sign/querySmsSignPage`, params);
};
//更新短信模板
export const syncTemplate = () => {
return putRequest(`sms/template/querySmsSign`);
};
//更新短信模板
export const addSmsSign = (params) => {
return postRequest(`sms/sign`, params);
};
//同步短信签名
export const syncSign = () => {
return putRequest(`sms/sign/querySmsSign`);
};
//删除短信签名
export const deleteSign = (id) => {
return deleteRequest(`sms/sign/${id}`);
};
//更新短信签名
export const editSmsSign = (params) => {
return putRequest(`sms/sign/modifySmsSign`, params);
};
//查询签名详情
export const smsSignDetail = (id) => {
return getRequest(`sms/sign/${id}`);
};
//分页查询app版本信息
export const appVersionPage = (params) => {
return getRequest(`systems/app/version`, params);
};
//添加app版本信息
export const addVersion = (params) => {
return postRequest(`systems/app/version`, params);
};
//修改app版本信息
export const editVersion = (params, id) => {
return putRequest(`systems/app/version/${id}`, params);
};
//删除app版本信息
export const deleteVersion = (id) => {
return deleteRequest(`systems/app/version/${id}`);
};
//查询同城配送列表
export const getInstantDelivery = (params) => {
return getRequest(`instant-delivery/getByPage`, params);
};
//添加同城配送信息
export const editInstantDelivery = (bean, params, headers) => {
return putRequest(`instant-delivery/${bean}/config`, params, headers);
};
//启用配送方案
export const openInstantDelivery = (bean) => {
return putRequest(`instant-delivery/${bean}/open`);
};
//修改封面图片
export const editInstantDeliveryImage = (bean, params) => {
return putRequest(`instant-delivery/${bean}/image`, params);
};
//查询短信发送记录
export const getSmsPage = (params) => {
return getRequest(`sms`, params);
};
//发送短信
export const sendSms = (params) => {
return postRequest(`sms`, params);
};
/*
* 获取 支付支持设置开关
*/
export const getPaymentSupportForm = () => {
return getRequest(`system/settingx/paymentSupport`);
}
// 验证码源文件删除
export const delVerification = (id) => {
return deleteRequest(`/verificationSource/${id}`)
}
// 添加验证码源文件
export const addVerification = (params) => {
return postRequest(`/verificationSource`, params)
}
// 修改验证码源文件
export const editVerification = (id, params) => {
return putRequest(`/verificationSource/${id}`, params)
}
// 验证码源文件详情
export const verificationDetail = (id) => {
return getRequest(`/verificationSource/${id}`)
}
// 验证码源文件列表
export const verificationPage = (params) => {
return getRequest(`/verificationSource`, params)
}
//获取通知类站内信
export const getNoticeMessageDetail = (id, params) => {
return getRequest(`/noticeMessage/${id}`, params)
}

83
manager/src/api/shops.js Normal file
View File

@@ -0,0 +1,83 @@
// 统一请求路径前缀在libs/axios.js中修改
import {getRequest, postRequest, putRequest} from '@/libs/axios';
//查询店铺列表
export const getBillPage = (params) => {
return getRequest('/', params)
}
//查询店铺列表
export const getShopListData = (params) => {
return getRequest('/store', params)
}
//禁用店铺
export const disableShop = (id) => {
return putRequest(`/store/disable/${id}`)
}
//开启店铺
export const enableBrand = (id) => {
return putRequest(`/store/enable/${id}`)
}
//查询店铺详细
export const getShopDetailData = (id, params) => {
return getRequest(`/store/get/detail/${id}`, params)
}
//增加店铺列表
export const shopAdd = (params) => {
return postRequest(`/store/add`, params)
}
//修改店铺列表
export const shopEdit = (id,params) => {
return putRequest(`/store/edit/${id}`, params)
}
//审核店铺
export const shopAudit = (id, passed) => {
return putRequest(`/store/audit/${id}/${passed}`)
}
//查询店铺详情
export const shopDetail = (id) => {
return getRequest(`/store/get/detail/${id}`)
}
// 获取结算单分页
export const getBuyBillPage = (params) => {
return getRequest(`/store/bill/getByPage`,params)
}
// 获取结算单详情
export const getBuyBillDetail = (id) => {
return getRequest(`/store/bill/get/${id}`)
}
// 获取商家结算单流水分页
export const getStoreFlow = (id,params) => {
return getRequest(`/store/bill/${id}/getStoreFlow`,params)
}
// 审核结算单
export const examine = (id) => {
return putRequest(`/store/bill/examine/${id}`)
}
// 审核结算单
export const pay = (id) => {
return putRequest(`/store/bill/pay/${id}`)
}
//获取所有商家
export const getShopList = () => {
return getRequest(`/store/all`)
}
//根据id获取店铺信息
export const getShopByMemberId = (id) => {
return getRequest(`/store/${id}/member`)
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="1361px" height="609px" viewBox="0 0 1361 609" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
<title>Group 21</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Ant-Design-Pro-3.0" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="账户密码登录-校验" transform="translate(-79.000000, -82.000000)">
<g id="Group-21" transform="translate(77.000000, 73.000000)">
<g id="Group-18" opacity="0.8" transform="translate(74.901416, 569.699158) rotate(-7.000000) translate(-74.901416, -569.699158) translate(4.901416, 525.199158)">
<ellipse id="Oval-11" fill="#CFDAE6" opacity="0.25" cx="63.5748792" cy="32.468367" rx="21.7830479" ry="21.766008"></ellipse>
<ellipse id="Oval-3" fill="#CFDAE6" opacity="0.599999964" cx="5.98746479" cy="13.8668601" rx="5.2173913" ry="5.21330997"></ellipse>
<path d="M38.1354514,88.3520215 C43.8984227,88.3520215 48.570234,83.6838647 48.570234,77.9254015 C48.570234,72.1669383 43.8984227,67.4987816 38.1354514,67.4987816 C32.3724801,67.4987816 27.7006688,72.1669383 27.7006688,77.9254015 C27.7006688,83.6838647 32.3724801,88.3520215 38.1354514,88.3520215 Z" id="Oval-3-Copy" fill="#CFDAE6" opacity="0.45"></path>
<path d="M64.2775582,33.1704963 L119.185836,16.5654915" id="Path-12" stroke="#CFDAE6" stroke-width="1.73913043" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M42.1431708,26.5002681 L7.71190162,14.5640702" id="Path-16" stroke="#E0B4B7" stroke-width="0.702678964" opacity="0.7" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="1.405357899873153,2.108036953469981"></path>
<path d="M63.9262187,33.521561 L43.6721326,69.3250951" id="Path-15" stroke="#BACAD9" stroke-width="0.702678964" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="1.405357899873153,2.108036953469981"></path>
<g id="Group-17" transform="translate(126.850922, 13.543654) rotate(30.000000) translate(-126.850922, -13.543654) translate(117.285705, 4.381889)" fill="#CFDAE6">
<ellipse id="Oval-4" opacity="0.45" cx="9.13482653" cy="9.12768076" rx="9.13482653" ry="9.12768076"></ellipse>
<path d="M18.2696531,18.2553615 C18.2696531,13.2142826 14.1798519,9.12768076 9.13482653,9.12768076 C4.08980114,9.12768076 0,13.2142826 0,18.2553615 L18.2696531,18.2553615 Z" id="Oval-4" transform="translate(9.134827, 13.691521) scale(-1, -1) translate(-9.134827, -13.691521) "></path>
</g>
</g>
<g id="Group-14" transform="translate(216.294700, 123.725600) rotate(-5.000000) translate(-216.294700, -123.725600) translate(106.294700, 35.225600)">
<ellipse id="Oval-2" fill="#CFDAE6" opacity="0.25" cx="29.1176471" cy="29.1402439" rx="29.1176471" ry="29.1402439"></ellipse>
<ellipse id="Oval-2" fill="#CFDAE6" opacity="0.3" cx="29.1176471" cy="29.1402439" rx="21.5686275" ry="21.5853659"></ellipse>
<ellipse id="Oval-2-Copy" stroke="#CFDAE6" opacity="0.4" cx="179.019608" cy="138.146341" rx="23.7254902" ry="23.7439024"></ellipse>
<ellipse id="Oval-2" fill="#BACAD9" opacity="0.5" cx="29.1176471" cy="29.1402439" rx="10.7843137" ry="10.7926829"></ellipse>
<path d="M29.1176471,39.9329268 L29.1176471,18.347561 C23.1616351,18.347561 18.3333333,23.1796097 18.3333333,29.1402439 C18.3333333,35.1008781 23.1616351,39.9329268 29.1176471,39.9329268 Z" id="Oval-2" fill="#BACAD9"></path>
<g id="Group-9" opacity="0.45" transform="translate(172.000000, 131.000000)" fill="#E6A1A6">
<ellipse id="Oval-2-Copy-2" cx="7.01960784" cy="7.14634146" rx="6.47058824" ry="6.47560976"></ellipse>
<path d="M0.549019608,13.6219512 C4.12262681,13.6219512 7.01960784,10.722722 7.01960784,7.14634146 C7.01960784,3.56996095 4.12262681,0.670731707 0.549019608,0.670731707 L0.549019608,13.6219512 Z" id="Oval-2-Copy-2" transform="translate(3.784314, 7.146341) scale(-1, 1) translate(-3.784314, -7.146341) "></path>
</g>
<ellipse id="Oval-10" fill="#CFDAE6" cx="218.382353" cy="138.685976" rx="1.61764706" ry="1.61890244"></ellipse>
<ellipse id="Oval-10-Copy-2" fill="#E0B4B7" opacity="0.35" cx="179.558824" cy="175.381098" rx="1.61764706" ry="1.61890244"></ellipse>
<ellipse id="Oval-10-Copy" fill="#E0B4B7" opacity="0.35" cx="180.098039" cy="102.530488" rx="2.15686275" ry="2.15853659"></ellipse>
<path d="M28.9985381,29.9671598 L171.151018,132.876024" id="Path-11" stroke="#CFDAE6" opacity="0.8"></path>
</g>
<g id="Group-10" opacity="0.799999952" transform="translate(1054.100635, 36.659317) rotate(-11.000000) translate(-1054.100635, -36.659317) translate(1026.600635, 4.659317)">
<ellipse id="Oval-7" stroke="#CFDAE6" stroke-width="0.941176471" cx="43.8135593" cy="32" rx="11.1864407" ry="11.2941176"></ellipse>
<g id="Group-12" transform="translate(34.596774, 23.111111)" fill="#BACAD9">
<ellipse id="Oval-7" opacity="0.45" cx="9.18534718" cy="8.88888889" rx="8.47457627" ry="8.55614973"></ellipse>
<path d="M9.18534718,17.4450386 C13.8657264,17.4450386 17.6599235,13.6143199 17.6599235,8.88888889 C17.6599235,4.16345787 13.8657264,0.332739156 9.18534718,0.332739156 L9.18534718,17.4450386 Z" id="Oval-7"></path>
</g>
<path d="M34.6597385,24.809694 L5.71666084,4.76878945" id="Path-2" stroke="#CFDAE6" stroke-width="0.941176471"></path>
<ellipse id="Oval" stroke="#CFDAE6" stroke-width="0.941176471" cx="3.26271186" cy="3.29411765" rx="3.26271186" ry="3.29411765"></ellipse>
<ellipse id="Oval-Copy" fill="#F7E1AD" cx="2.79661017" cy="61.1764706" rx="2.79661017" ry="2.82352941"></ellipse>
<path d="M34.6312443,39.2922712 L5.06366663,59.785082" id="Path-10" stroke="#CFDAE6" stroke-width="0.941176471"></path>
</g>
<g id="Group-19" opacity="0.33" transform="translate(1282.537219, 446.502867) rotate(-10.000000) translate(-1282.537219, -446.502867) translate(1142.537219, 327.502867)">
<g id="Group-17" transform="translate(141.333539, 104.502742) rotate(275.000000) translate(-141.333539, -104.502742) translate(129.333539, 92.502742)" fill="#BACAD9">
<circle id="Oval-4" opacity="0.45" cx="11.6666667" cy="11.6666667" r="11.6666667"></circle>
<path d="M23.3333333,23.3333333 C23.3333333,16.8900113 18.1099887,11.6666667 11.6666667,11.6666667 C5.22334459,11.6666667 0,16.8900113 0,23.3333333 L23.3333333,23.3333333 Z" id="Oval-4" transform="translate(11.666667, 17.500000) scale(-1, -1) translate(-11.666667, -17.500000) "></path>
</g>
<circle id="Oval-5-Copy-6" fill="#CFDAE6" cx="201.833333" cy="87.5" r="5.83333333"></circle>
<path d="M143.5,88.8126685 L155.070501,17.6038544" id="Path-17" stroke="#BACAD9" stroke-width="1.16666667"></path>
<path d="M17.5,37.3333333 L127.466252,97.6449735" id="Path-18" stroke="#BACAD9" stroke-width="1.16666667"></path>
<polyline id="Path-19" stroke="#CFDAE6" stroke-width="1.16666667" points="143.902597 120.302281 174.935455 231.571342 38.5 147.510847 126.366941 110.833333"></polyline>
<path d="M159.833333,99.7453842 L195.416667,89.25" id="Path-20" stroke="#E0B4B7" stroke-width="1.16666667" opacity="0.6"></path>
<path d="M205.333333,82.1372105 L238.719406,36.1666667" id="Path-24" stroke="#BACAD9" stroke-width="1.16666667"></path>
<path d="M266.723424,132.231988 L207.083333,90.4166667" id="Path-25" stroke="#CFDAE6" stroke-width="1.16666667"></path>
<circle id="Oval-5" fill="#C1D1E0" cx="156.916667" cy="8.75" r="8.75"></circle>
<circle id="Oval-5-Copy-3" fill="#C1D1E0" cx="39.0833333" cy="148.75" r="5.25"></circle>
<circle id="Oval-5-Copy-2" fill-opacity="0.6" fill="#D1DEED" cx="8.75" cy="33.25" r="8.75"></circle>
<circle id="Oval-5-Copy-4" fill-opacity="0.6" fill="#D1DEED" cx="243.833333" cy="30.3333333" r="5.83333333"></circle>
<circle id="Oval-5-Copy-5" fill="#E0B4B7" cx="175.583333" cy="232.75" r="5.25"></circle>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
manager/src/assets/dada.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
manager/src/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
manager/src/assets/play.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1 @@
<svg height="16" viewBox="0 0 1024 1024" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 512a512 512 0 1 0 1024 0 512 512 0 1 0 -1024 0z" fill="#cce0f5"/><path d="m306.122105 573.44h-115.334737l-29.103157 96.471579h-42.037895l107.789473-315.823158h42.037895l107.789474 315.823158h-40.96zm-9.701052-31.797895-15.090527-48.505263c-11.856842-35.570526-21.557895-70.063158-31.797894-107.789474-10.24 37.187368-20.48 71.141053-31.797895 107.789474l-15.629474 48.505263zm126.652631-187.553684h90.004211c71.141053 0 118.568421 23.713684 118.568421 92.698947s-47.427368 97.549474-116.412632 97.549474h-53.894737v125.574737h-38.265263zm87.309474 157.911579c53.894737 0 81.92-19.941053 81.92-65.212632s-28.025263-60.362105-83.536842-60.362105h-45.271579v125.574737zm185.397895-157.911579h90.00421c71.141053 0 118.568421 23.713684 118.568421 92.698947s-47.427368 97.549474-116.412631 97.549474h-53.894737v125.574737h-39.882105zm86.770526 157.911579c53.894737 0 81.92-19.941053 81.92-65.212632s-28.025263-60.362105-83.536842-60.362105h-45.271579v125.574737z" fill="#06c"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1 @@
<svg height="64" viewBox="0 0 1024 1024" width="64" xmlns="http://www.w3.org/2000/svg"><path d="m128 128 70.4 748.8 313.6 83.2 313.6-83.2 70.4-748.8zm614.4 243.2h-364.8l6.4 96h352l-25.6 281.6-198.4 51.2-198.4-51.2-12.8-147.2h96l6.4 70.4 108.8 32 108.8-25.6 12.8-121.6h-339.2l-25.6-275.2h480zm0 0" fill="#f39d24"/></svg>

After

Width:  |  Height:  |  Size: 319 B

View File

@@ -0,0 +1 @@
<svg height="16" viewBox="0 0 1024 1024" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 512a512 512 0 1 0 1024 0 512 512 0 1 0 -1024 0z" fill="#4485ff"/><path d="m433.624615 529.683692v188.337231l-197.316923-27.214769v-161.122462zm0-214.96123v190.621538h-197.316923v-163.446154zm284.041847 214.96123v227.367385l-262.380308-36.155077v-191.172923h262.380308zm0-253.991384v229.691077h-262.380308v-193.536z" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 434 B

View File

@@ -0,0 +1 @@
<svg height="16" viewBox="0 0 1024 1024" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 512a512 512 0 1 0 1024 0 512 512 0 1 0 -1024 0z" fill="#fff"/><path d="m512 39.385a472.615 472.615 0 1 0 472.615 472.615 472.615 472.615 0 0 0 -472.615-472.615zm157.538 507.273a39.385 39.385 0 0 1 -48.049-19.692c-8.664-18.904 0-32.295 17.33-43.323a120.517 120.517 0 0 1 20.48-11.028c31.507-18.117 57.501-41.747 41.747-78.769a71.68 71.68 0 0 0 -84.283-41.748 66.954 66.954 0 0 0 -65.378 68.53v196.135a157.538 157.538 0 0 1 -157.539 136.27 157.538 157.538 0 0 1 -145.723-166.202c0-45.686 42.535-78.77 98.462-107.126 23.63-7.09 47.261-7.09 59.864 16.541s-11.027 40.96-31.507 50.412c-41.748 18.117-62.228 47.262-42.536 89.797a73.255 73.255 0 0 0 98.462 34.659 69.317 69.317 0 0 0 46.474-74.83v-178.02a137.058 137.058 0 0 1 99.249-139.42 163.84 163.84 0 0 1 173.292 44.898 144.148 144.148 0 0 1 -78.77 222.916z" fill="#7789db"/></svg>

After

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,50 @@
export default {
/**
* @description 配置显示在浏览器标签的title
*/
title: 'Lili电商',
/**
* @description token在Cookie中存储的天数默认1天
*/
cookieExpires: 1,
/**
* @description 是否使用国际化默认为false
* 如果不使用则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}
* 用来在菜单中显示文字
*/
useI18n: true,
/**
* @description api请求基础路径
*/
api_dev: {
// common: 'http://192.168.0.111:9000',
// buyer: 'http://buyer-api.pickmall.cn',
// seller: 'http://store-api.pickmall.cn',
// manager: 'http://192.168.0.111:8887'
common: 'https://common-api.pickmall.cn',
buyer: 'https://buyer-api.pickmall.cn',
seller: 'https://store-api.pickmall.cn',
manager: 'https://admin-api.pickmall.cn'
},
api_prod: {
common: 'https://common-api.pickmall.cn',
buyer: 'https://buyer-api.pickmall.cn',
seller: 'https://store-api.pickmall.cn',
manager: 'https://admin-api.pickmall.cn'
},
/**
* @description api请求基础路径前缀
*/
baseUrlPrefix: '/manager',
/**
* @description 需要加载的插件
*/
plugin: {
'error-store': {
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
developmentOff: true // 设为true后在开发环境不会收集错误信息方便开发中排查错误
}
}
}

View File

@@ -0,0 +1,47 @@
/**
* 各种正则表达式
* mobile 手机号
* email 电子邮箱
* password 密码【6-20位】
* integer 正整数【不包含0】
* money 金钱
* TINumber 纳税识别号
* IDCard 身份证
* userName 账户名称【汉字、字母、数字、“-”、“_”的组合】
* URL URL
* TEL 固定电话
*/
// 手机号
export const mobile = /^0?(13[0-9]|14[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9])[0-9]{8}$/
// 电子邮箱
export const email = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
// 密码【6-20位】
export const password = /^[@A-Za-z0-9!#$%^&*.~,]{6,20}$/
// 正整数【不包含0】
export const integer = /^[1-9]\d*$/
// 正整数【包含0】
export const Integer = /^[0-9]\d*$/
// 金钱
export const money = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/
// 纳税识别号
export const TINumber = /^((\d{6}[0-9A-Z]{9})|([0-9A-Za-z]{2}\d{6}[0-9A-Za-z]{10,12}))$/
// 身份证
export const IDCard = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
// 账户名称【汉字、字母、数字、“-”、“_”的组合】
export const userName = /[A-Za-z0-9_\-\u4e00-\u9fa5]$/
// URL
export const URL =
/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
// 固话
export const TEL = /0\d{2,3}-\d{7,8}/

340
manager/src/libs/axios.js Normal file
View File

@@ -0,0 +1,340 @@
import axios from "axios";
import config from "@/config";
import {getStore, setStore} from "./storage.js";
import {router} from "../router/index";
import {Message} from "view-design";
import Cookies from "js-cookie";
import {handleRefreshToken} from "../api/index"
// 统一请求路径前缀
export const commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common);
export const managerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.manager : config.api_prod.manager) + config.baseUrlPrefix;
const service = axios.create({
timeout: 8000,
baseURL: managerUrl
})
var isRefreshToken = 0;
const refreshToken = getTokenDebounce()
service.interceptors.request.use(
config => {
if (config.method == 'get') {
config.params = {
_t: Date.parse(new Date()) / 1000,
...config.params
}
}
return config;
},
err => {
Message.error("请求超时");
return Promise.reject(err);
}
);
// http response 拦截器
service.interceptors.response.use(
(response) => {
const data = response.data;
// 根据返回的code值来做不同的处理(和后端约定)
if (!data.success && data.message) {
Message.error(data.message);
}
switch (data.code) {
case 400:
if (data.message !== null) {
Message.error(data.message);
} else {
Message.error("系统异常");
}
break;
case 401:
// 未登录 清除已登录状态
Cookies.set("userInfo", "");
setStore("accessToken", "");
if (router.history.current.name != "login") {
if (data.message !== null) {
Message.error(data.message);
} else {
Message.error("未知错误,请重新登录");
}
router.push("/login");
}
return data;
break;
case 403:
// 权限不足
if (data.message !== null) {
Message.error(data.message);
} else {
Message.error("权限不足");
}
break;
case 500:
// 系统异常
if (data.message !== null) {
Message.error(data.message);
} else {
Message.error("系统异常");
}
break;
default:
return data;
}
},
async (error) => {
// 返回状态码不为200时候的错误处理
if (error.response) {
if (error.response.status === 401) {
// 这种情况一般调到登录页
} else if (error.response.status === 403) {
isRefreshToken++;
if(isRefreshToken === 1) {
const getTokenRes = await refreshToken();
if (getTokenRes === 'success') { // 刷新token
if (isRefreshToken === 1) {
error.response.config.headers.accessToken = getStore('accessToken')
return service(error.response.config)
} else {
router.go(0)
}
} else {
Cookies.set("userInfo", "");
router.push('/login')
}
isRefreshToken = 0
}
} else {
// 其他错误处理
Message.error(error.response.data.message)
}
}
/* router.push("/login") */
return Promise.resolve(error);
}
)
// 防抖闭包来一波
function getTokenDebounce() {
let lock = false
let success = false
return function () {
if (!lock) {
lock = true
let oldRefreshToken = getStore("refreshToken");
handleRefreshToken(oldRefreshToken).then(res => {
if (res.code === 200) {
let {
accessToken,
refreshToken
} = res.result;
setStore("accessToken", accessToken);
setStore("refreshToken", refreshToken);
success = true
lock = false
} else {
success = false
lock = false
router.push('/login')
}
}).catch((err) => {
success = false
lock = false
})
}
return new Promise(resolve => {
// 一直看lock,直到请求失败或者成功
const timer = setInterval(() => {
if (!lock) {
clearInterval(timer)
if (success) {
resolve('success')
} else {
resolve('fail')
}
}
}, 500) // 轮询时间间隔
})
}
}
export const getRequest = (url, params) => {
let accessToken = getStore("accessToken");
return service({
method: "get",
url: `${url}`,
params: params,
headers: {
accessToken: accessToken
}
});
};
export const postRequest = (url, params, headers) => {
let accessToken = getStore("accessToken");
return service({
method: "post",
url: `${url}`,
data: params,
transformRequest: headers
? undefined
: [
function (data) {
let ret = "";
for (let it in data) {
ret +=
encodeURIComponent(it) +
"=" +
encodeURIComponent(data[it]) +
"&";
}
ret = ret.substring(0, ret.length - 1);
return ret;
}
],
headers: {
"Content-Type": "application/x-www-form-urlencoded",
accessToken: accessToken,
...headers
}
});
};
/** 不带form表单不带transformRequest */
export const postRequestWithNoForm = (url, params) => {
let accessToken = getStore("accessToken");
return service({
method: "post",
url: `${url}`,
data: params,
headers: {
accessToken: accessToken
}
});
};
// export const postRequestWithHeaders = (url, params) => {
// let accessToken = getStore("accessToken");
// return axios({
// method: "post",
// url: `${url}`,
// data: params,
// headers: {
// accessToken: accessToken,
// "Content-Type": "application/x-www-form-urlencoded"
// }
// });
// };
export const putRequest = (url, params, headers) => {
let accessToken = getStore("accessToken");
return service({
method: "put",
url: `${url}`,
data: params,
transformRequest: headers
? undefined
: [
function (data) {
let ret = "";
for (let it in data) {
ret +=
encodeURIComponent(it) +
"=" +
encodeURIComponent(data[it]) +
"&";
}
ret = ret.substring(0, ret.length - 1);
return ret;
}
],
headers: {
"Content-Type": "application/x-www-form-urlencoded",
accessToken: accessToken,
...headers
}
});
};
export const putRequestWithNoForm = (url, params) => {
let accessToken = getStore("accessToken");
return service({
method: "put",
url: `${url}`,
data: params,
headers: {
accessToken: accessToken
}
});
};
export const deleteRequest = (url, params) => {
let accessToken = getStore("accessToken");
return service({
method: "delete",
url: `${url}`,
params: params,
headers: {
accessToken: accessToken
}
});
};
export const importRequest = (url, params) => {
let accessToken = getStore("accessToken");
return service({
method: "post",
url: `${url}`,
data: params,
headers: {
accessToken: accessToken
}
});
};
export const uploadFileRequest = (url, params) => {
let accessToken = getStore("accessToken");
return service({
method: "post",
url: `${url}`,
params: params,
headers: {
accessToken: accessToken
}
});
};
/**
* 无需token验证的请求 避免旧token过期导致请求失败
* @param {*} url
* @param {*} params
*/
export const getRequestWithNoToken = (url, params) => {
return service({
method: "get",
url: `${url}`,
params: params
});
};
/**
* 无需token验证的请求 避免旧token过期导致请求失败
* @param {*} url
* @param {*} params
*/
export const postRequestWithNoToken = (url, params) => {
return service({
method: "post",
url: `${url}`,
params: params
});
};

77
manager/src/libs/emoji.js Normal file
View File

@@ -0,0 +1,77 @@
// 新浪表情包api https://api.weibo.com/2/emotions.json?source=1362404091
export const sina = [
{
alt: "[坏笑]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4d/2018new_huaixiao_org.png"
},
{
alt: "[笑cry]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4a/2018new_xiaoku_org.png"
},
{
alt: "[拜拜]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fd/2018new_baibai_org.png"
},
{
alt: "[微笑]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e3/2018new_weixioa02_org.png"
},
{
alt: "[偷笑]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/71/2018new_touxiao_org.png"
},
{
alt: "[亲亲]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/2c/2018new_qinqin_org.png"
},
{
alt: "[太开心]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1e/2018new_taikaixin_org.png"
},
{
alt: "[挤眼]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/43/2018new_jiyan_org.png"
},
{
alt: "[可怜]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/96/2018new_kelian_org.png"
},
{
alt: "[可爱]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/09/2018new_keai_org.png"
},
{
alt: "[doge]",
src: "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a1/2018new_doge02_org.png"
},
{
alt: "[二哈]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/22/2018new_erha_org.png"
},
{
alt: "[喵喵]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7b/2018new_miaomiao_org.png"
},
{
alt: "[摊手]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/62/2018new_tanshou_org.png"
},
{
alt: "[跪了]",
src:
"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/75/2018new_gui_org.png"
}
]

102
manager/src/libs/excel.js Normal file
View File

@@ -0,0 +1,102 @@
import XLSX from 'xlsx';
function auto_width(ws, data){
/*set worksheet max width per col*/
const colWidth = data.map(row => row.map(val => {
/*if null/undefined*/
if (val == null) {
return {'wch': 10};
}
/*if chinese*/
else if (val.toString().charCodeAt(0) > 255) {
return {'wch': val.toString().length * 2};
} else {
return {'wch': val.toString().length};
}
}))
/*start in the first row*/
let result = colWidth[0];
for (let i = 1; i < colWidth.length; i++) {
for (let j = 0; j < colWidth[i].length; j++) {
if (result[j]['wch'] < colWidth[i][j]['wch']) {
result[j]['wch'] = colWidth[i][j]['wch'];
}
}
}
ws['!cols'] = result;
}
function json_to_array(key, jsonData){
return jsonData.map(v => key.map(j => { return v[j] }));
}
// fix data,return string
function fixdata(data) {
let o = ''
let l = 0
const w = 10240
for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
return o
}
// get head from excel file,return array
function get_header_row(sheet) {
const headers = []
const range = XLSX.utils.decode_range(sheet['!ref'])
let C
const R = range.s.r /* start in the first row */
for (C = range.s.c; C <= range.e.c; ++C) { /* walk every column in the range */
var cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })] /* find the cell in the first row */
var hdr = 'UNKNOWN ' + C // <-- replace with your desired default
if (cell && cell.t) hdr = XLSX.utils.format_cell(cell)
headers.push(hdr)
}
return headers
}
export const export_table_to_excel= (id, filename) => {
const table = document.getElementById(id);
const wb = XLSX.utils.table_to_book(table);
XLSX.writeFile(wb, filename);
}
export const export_json_to_excel = ({data, key, title, filename, autoWidth}) => {
const wb = XLSX.utils.book_new();
data.unshift(title);
const ws = XLSX.utils.json_to_sheet(data, {header: key, skipHeader: true});
if(autoWidth){
const arr = json_to_array(key, data);
auto_width(ws, arr);
}
XLSX.utils.book_append_sheet(wb, ws, filename);
XLSX.writeFile(wb, filename + '.xlsx');
}
export const export_array_to_excel = ({key, data, title, filename, autoWidth}) => {
const wb = XLSX.utils.book_new();
const arr = json_to_array(key, data);
arr.unshift(title);
const ws = XLSX.utils.aoa_to_sheet(arr);
if(autoWidth){
auto_width(ws, arr);
}
XLSX.utils.book_append_sheet(wb, ws, filename);
XLSX.writeFile(wb, filename + '.xlsx');
}
export const read = (data, type) => {
const workbook = XLSX.read(data, { type: type });
const firstSheetName = workbook.SheetNames[0];
const worksheet = workbook.Sheets[firstSheetName];
const header = get_header_row(worksheet);
const results = XLSX.utils.sheet_to_json(worksheet);
return {header, results};
}
export default {
export_table_to_excel,
export_array_to_excel,
export_json_to_excel,
read
}

3513
manager/src/libs/icon.js Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
export default (url) =>()=>import(`@/views/${url}.vue`)

View File

@@ -0,0 +1,30 @@
/**
* 存储localStorage
*/
export const setStore = (name, content) => {
if (!name) return;
if (typeof content !== 'string') {
content = JSON.stringify(content);
}
window.localStorage.setItem(name, content);
}
/**
* 获取localStorage
*/
export const getStore = name => {
if (!name) return;
let v = window.localStorage.getItem(name);
if (v == null) {
return "";
}
return v;
}
/**
* 删除localStorage
*/
export const removeStore = name => {
if (!name) return;
window.localStorage.removeItem(name);
}

View File

@@ -0,0 +1,100 @@
var idTmr;
function getExplorer () {
var explorer = window.navigator.userAgent;
if (explorer.indexOf('MSIE') >= 0) {
// ie
return 'ie';
} else if (explorer.indexOf('Firefox') >= 0) {
// firefox
return 'Firefox';
} else if (explorer.indexOf('Chrome') >= 0) {
// Chrome
return 'Chrome';
} else if (explorer.indexOf('Opera') >= 0) {
// Opera
return 'Opera';
} else if (explorer.indexOf('Safari') >= 0) {
// Safari
return 'Safari';
};
};
function tranform (table, aId, name) {
let tableHead = table.$children[0].$el;
let tableBody = table.$children[1].$el;
let tableInnerHTML = '<thead><tr>';
if (table.$children.length !== 1) {
let len = tableBody.rows.length;
let i = -1;
while (i < len) {
if (i == -1) {
Array.from(tableHead.rows[0].children).forEach((td) => {
tableInnerHTML = tableInnerHTML + '<th>' + td.children[0].children[0].innerHTML + '</th>';
});
tableInnerHTML += '</tr><thead><tbody>';
} else {
tableInnerHTML += '<tr>';
Array.from(tableBody.rows[i].children).forEach((td) => {
tableInnerHTML = tableInnerHTML + '<td>' + td.children[0].children[0].innerHTML + '</td>';
});
tableInnerHTML += '</tr>';
}
i++;
}
tableInnerHTML += '</tbody>';
}
if (getExplorer() !== 'Safari' && name.substr(-1, 4) !== '.xls') {
name += '.xls';
}
if (getExplorer() == 'ie') {
var curTbl = table;
var oXL = new ActiveXObject('Excel.Application');
var oWB = oXL.Workbooks.Add();
var xlsheet = oWB.Worksheets(1);
var sel = document.body.createTextRange();
sel.moveToElementText(curTbl);
sel.select();
sel.execCommand('Copy');
xlsheet.Paste();
oXL.Visible = true;
try {
var fname = oXL.Application.GetSaveAsFilename('Excel.xls', 'Excel Spreadsheets (*.xls), *.xls');
} catch (e) {
print('Nested catch caught ' + e);
} finally {
oWB.SaveAs(fname);
// oWB.Close(savechanges = false);
oXL.Quit();
oXL = null;
idTmr = setInterval(Cleanup(), 1);
}
} else {
tableToExcel(tableInnerHTML, aId, name);
}
}
function Cleanup () {
window.clearInterval(idTmr);
// CollectGarbage();
}
let tableToExcel = (function () {
let uri = 'data:application/vnd.ms-excel;base64,';
let template = '<html><head><meta charset="UTF-8"></head><body><table>{table}</table></body></html>';
let base64 = function (s) { return window.btoa(unescape(encodeURIComponent(s))); };
let format = function (s, c) {
return s.replace(/{(\w+)}/g, function (m, p) { return c[p]; });
};
return function (table, aId, name) {
let ctx = {worksheet: name || 'Worksheet', table: table};
document.getElementById(aId).href = uri + base64(format(template, ctx));
document.getElementById(aId).download = name;
document.getElementById(aId).click();
};
})();
const table2excel = {};
table2excel.transform = tranform;
export default table2excel;

469
manager/src/libs/util.js Normal file
View File

@@ -0,0 +1,469 @@
import axios from 'axios';
import { getCurrentPermissionList } from '@/api/index';
import lazyLoading from './lazyLoading.js';
import router from '@/router/index';
import Cookies from "js-cookie";
let util = {
};
util.title = function (title) {
title = title || 'lili ';
window.document.title = title;
};
util.millsToTime = function (mills) {
if (!mills) {
return "";
}
let s = mills / 1000;
if (s < 60) {
return s.toFixed(0) + " 秒"
}
let m = s / 60;
if (m < 60) {
return m.toFixed(0) + " 分钟"
}
let h = m / 60;
if (h < 24) {
return h.toFixed(0) + " 小时"
}
let d = h / 24;
if (d < 30) {
return d.toFixed(0) + " 天"
}
let month = d / 30
if (month < 12) {
return month.toFixed(0) + " 个月"
}
let year = month / 12
return year.toFixed(0) + " 年"
};
util.inOf = function (arr, targetArr) {
let res = true;
arr.forEach(item => {
if (targetArr.indexOf(item) < 0) {
res = false;
}
});
return res;
};
util.oneOf = function (ele, targetArr) {
if (targetArr.indexOf(ele) >= 0) {
return true;
} else {
return false;
}
};
util.getRouterObjByName = function (routers, name) {
if (!name || !routers || !routers.length) {
return null;
}
let routerObj = null;
for (let item of routers) {
if (item.name == name) {
return item;
}
routerObj = util.getRouterObjByName(item.children, name);
if (routerObj) {
return routerObj;
}
}
return null;
};
util.handleTitle = function (vm, item) {
if (typeof item.title == 'object') {
return vm.$t(item.title.i18n);
} else {
return item.title;
}
};
util.setCurrentPath = function (vm, name) {
let title = '';
let isOtherRouter = false;
vm.$store.state.app.routers.forEach(item => {
if (item.children.length == 1) {
if (item.children[0].name == name) {
title = util.handleTitle(vm, item);
if (item.name == 'otherRouter') {
isOtherRouter = true;
}
}
} else {
item.children.forEach(child => {
if (child.name == name) {
title = util.handleTitle(vm, child);
if (item.name == 'otherRouter') {
isOtherRouter = true;
}
}
});
}
});
let currentPathArr = [];
if (name == 'home_index') {
currentPathArr = [
{
title: util.handleTitle(vm, util.getRouterObjByName(vm.$store.state.app.routers, 'home_index')),
path: '',
name: 'home_index'
}
];
} else if ((name.indexOf('_index') >= 0 || isOtherRouter) && name !== 'home_index') {
currentPathArr = [
{
title: util.handleTitle(vm, util.getRouterObjByName(vm.$store.state.app.routers, 'home_index')),
path: '/home',
name: 'home_index'
},
{
title: title,
path: '',
name: name
}
];
} else {
let currentPathObj = vm.$store.state.app.routers.filter(item => {
if (item.children.length <= 1) {
return item.children[0].name == name;
} else {
let i = 0;
let childArr = item.children;
let len = childArr.length;
while (i < len) {
if (childArr[i].name == name) {
return true;
}
i++;
}
return false;
}
})[0];
if (currentPathObj.children.length <= 1 && currentPathObj.name == 'home') {
currentPathArr = [
{
title: '首页',
path: '',
name: 'home_index'
}
];
} else if (currentPathObj.children.length <= 1 && currentPathObj.name !== 'home') {
currentPathArr = [
{
title: '首页',
path: '/home',
name: 'home_index'
},
{
title: currentPathObj.title,
path: '',
name: name
}
];
} else {
let childObj = currentPathObj.children.filter((child) => {
return child.name == name;
})[0];
currentPathArr = [
{
title: '首页',
path: '/home',
name: 'home_index'
},
{
title: currentPathObj.title,
path: '',
name: currentPathObj.name
},
{
title: childObj.title,
path: currentPathObj.path + '/' + childObj.path,
name: name
}
];
}
}
vm.$store.commit('setCurrentPath', currentPathArr);
return currentPathArr;
};
util.openNewPage = function (vm, name, argu, query) {
if (!vm.$store) {
return;
}
let pageOpenedList = vm.$store.state.app.pageOpenedList;
let openedPageLen = pageOpenedList.length;
let i = 0;
let tagHasOpened = false;
while (i < openedPageLen) {
if (name == pageOpenedList[i].name) { // 页面已经打开
vm.$store.commit('pageOpenedList', {
index: i,
argu: argu,
query: query
});
tagHasOpened = true;
break;
}
i++;
}
if (!tagHasOpened) {
let tag = vm.$store.state.app.tagsList.filter((item) => {
if (item.children) {
return name == item.children[0].name;
} else {
return name == item.name;
}
});
tag = tag[0];
if (tag) {
tag = tag.children ? tag.children[0] : tag;
if (argu) {
tag.argu = argu;
}
if (query) {
tag.query = query;
}
vm.$store.commit('increateTag', tag);
}
}
vm.$store.commit('setCurrentPageName', name);
};
util.toDefaultPage = function (routers, name, route, next) {
let len = routers.length;
let i = 0;
let notHandle = true;
while (i < len) {
if (routers[i].name == name && routers[i].children && routers[i].redirect == undefined) {
route.replace({
name: routers[i].children[0].name
});
notHandle = false;
next();
break;
}
i++;
}
if (notHandle) {
next();
}
};
// 将Csv文件解析为二维数组
export const getArrayFromFile = (file) => {
let nameSplit = file.name.split('.')
let format = nameSplit[nameSplit.length - 1]
return new Promise((resolve, reject) => {
let reader = new FileReader()
reader.readAsText(file) // 以文本格式读取
let arr = []
reader.onload = function (evt) {
let data = evt.target.result // 读到的数据
let pasteData = data.trim()
arr = pasteData.split((/[\n\u0085\u2028\u2029]|\r\n?/g)).map(row => {
return row.split('\t')
}).map(item => {
return item[0].split(',')
})
if (format == 'csv') resolve(arr)
else reject(new Error('[Format Error]:不是Csv文件'))
}
})
}
// 将二维数组转为表格数据
export const getTableDataFromArray = (array) => {
let columns = []
let tableData = []
if (array.length > 1) {
let titles = array.shift()
columns = titles.map(item => {
return {
title: item,
key: item
}
})
tableData = array.map(item => {
let res = {}
item.forEach((col, i) => {
res[titles[i]] = col
})
return res
})
}
return {
columns,
tableData
}
}
util.initRouter = function (vm) { // 初始化路由
const constRoutes = [];
const otherRoutes = [];
// 404路由需要和动态路由一起加载
const otherRouter = [{
path: '/*',
name: 'error-404',
meta: {
title: '404-页面不存在'
},
frontRoute: 'error-page/404'
}];
// 判断用户是否登录
let userInfo = Cookies.get('userInfo')
if (!userInfo) {
// 未登录
return;
}
if (!vm.$store.state.app.added) {
// 第一次加载 读取数据
// 加载菜单
getCurrentPermissionList().then(res => {
if (!res.success) return false;
let menuData = res.result;
// let menuData = result
// 格式化数据,设置 空children 为 null
for(let i =0;i<menuData.length;i++){
let t = menuData[i].children
for(let k = 0;k<t.length;k++){
let tt = t[k].children;
for(let z = 0;z<tt.length;z++){
tt[z].children = null
}
}
}
if (!menuData) {
return;
}
util.initAllMenuData(constRoutes, menuData);
util.initRouterNode(otherRoutes, otherRouter);
// 添加所有主界面路由
vm.$store.commit('updateAppRouter', constRoutes.filter(item => item.children.length > 0));
// 添加全局路由
vm.$store.commit('updateDefaultRouter', otherRoutes);
// 添加菜单路由
util.initMenuData(vm, menuData);
// 缓存数据 修改加载标识
window.localStorage.setItem('menuData', JSON.stringify(menuData));
vm.$store.commit('setAdded', true);
});
} else {
// 读取缓存数据
let data = window.localStorage.getItem('menuData');
if (!data) {
vm.$store.commit('setAdded', false);
return;
}
let menuData = JSON.parse(data);
// 添加菜单路由
util.initMenuData(vm, menuData);
}
};
// 添加所有顶部导航栏下的菜单路由
util.initAllMenuData = function (constRoutes, data) {
let allMenuData = [];
data.forEach(e => {
if (e.level == 0) {
e.children.forEach(item => {
allMenuData.push(item);
})
}
})
util.initRouterNode(constRoutes, allMenuData);
}
// 生成菜单格式数据
util.initMenuData = function (vm, data) {
const menuRoutes = [];
let menuData = data;
// 顶部菜单
let navList = [];
menuData.forEach(e => {
let nav = {
name: e.name,
title: e.title,
icon: e.icon
}
navList.push(nav);
})
if (navList.length < 1) {
return;
}
// 存入vuex
vm.$store.commit('setNavList', navList);
let currNav = window.localStorage.getItem('currNav')
if (currNav) {
// 读取缓存title
for (var item of navList) {
if (item.name == currNav) {
vm.$store.commit('setCurrNavTitle', item.title);
break;
}
}
} else {
// 默认第一个
currNav = navList[0].name;
vm.$store.commit('setCurrNavTitle', navList[0].title);
}
vm.$store.commit('setCurrNav', currNav);
for (let item of menuData) {
if (item.name == currNav) {
// 过滤
menuData = item.children;
break;
}
}
util.initRouterNode(menuRoutes, menuData);
// 刷新界面菜单
vm.$store.commit('updateMenulist', menuRoutes.filter(item => item.children.length > 0));
let tagsList = [];
vm.$store.state.app.routers.map((item) => {
if (item.children.length <= 1) {
tagsList.push(item.children[0]);
} else {
tagsList.push(...item.children);
}
});
vm.$store.commit('setTagsList', tagsList);
};
// 生成路由节点
util.initRouterNode = function (routers, data) { // data为所有子菜单数据
for (let item of data) {
let menu = Object.assign({}, item);
menu.component = lazyLoading(menu.frontRoute);
if (item.children && item.children.length > 0) {
menu.children = [];
util.initRouterNode(menu.children, item.children);
}
let meta = {};
// 给页面添加权限、标题、第三方网页链接
meta.permTypes = menu.permTypes ? menu.permTypes : null;
meta.title = menu.title ? menu.title + " - lilishop 运营后台" : null;
meta.url = menu.url ? menu.url : null;
menu.meta = meta;
routers.push(menu);
}
};
export default util;

View File

@@ -0,0 +1,80 @@
/**
* 密码格式验证
* @param rule 验证规则不少于6位
* @param value 需要验证的值
* @param callback 回调函数
*/
export const validatePassword = (rule, value, callback) => {
if (value.length < 6) {
callback(new Error('密码长度不得小于6位'));
} else {
callback();
}
};
/**
* 手机号码格式验证
* @param rule 验证规则
* @param value 需要验证的值
* @param callback 回调函数
*/
export const validateMobile = (rule, value, callback) => {
var reg = /^[1][3,4,5,6,7,8][0-9]{9}$/;
if (!reg.test(value)) {
callback(new Error('手机号格式错误'));
} else {
callback();
}
};
/**
* 身份证号码格式验证
* @param rule 验证规则是否满足18位
* @param value 需要验证的值
* @param callback 回调函数
*/
export const validateIDCard = (rule, value, callback) => {
const reg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (!reg.test(value)) {
callback(new Error('身份证号码格式错误'));
} else {
callback();
}
};
// 验证是否整数
export function isInteger(rule, value, callback) {
if (!value) {
return callback(new Error('输入不可以为空'));
}
setTimeout(() => {
if (!Number(value)) {
callback(new Error('请输入正整数'));
} else {
const re = /^[0-9]*[1-9][0-9]*$/;
const rsCheck = re.test(value);
if (!rsCheck) {
callback(new Error('请输入正整数'));
} else {
callback();
}
}
}, 1000);
}
export function isMoney(rule, value, callback) {
if (!value) {
return callback(new Error('输入不可以为空'));
}
let re =/(^[1-9]{1}[0-9]*$)|(^[0-9]*\.[0-9]{2}$)/;
const rsCheck = re.test(value);
if (!rsCheck) {
callback(new Error('请输入正整数'));
} else {
callback();
}
}
export function validatetoFixedNew(str) {
return str ;
}

20
manager/src/libs/zh.json Normal file
View File

@@ -0,0 +1,20 @@
{
"name": "zh",
"options": {
"months": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
"shortMonths": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
"days": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
"shortDays": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
"toolbar": {
"exportToSVG": "下载图表 SVG",
"exportToPNG": "下载图表 PNG",
"menu": "菜单",
"selection": "选择",
"selectionZoom": "区域缩放",
"zoomIn": "缩小",
"zoomOut": "放大",
"pan": "移动",
"reset": "重置缩放"
}
}
}

View File

@@ -0,0 +1,28 @@
import Vue from 'vue';
import VueI18n from 'vue-i18n';
import zhLocale from './lang/zh-CN';
import enLocale from './lang/en-US';
import zhCnLocale from 'view-design/src/locale/lang/zh-CN';
import enUsLocale from 'view-design/src/locale/lang/en-US';
Vue.use(VueI18n);
// 根据浏览器信息自动设置语言
const navLang = navigator.language;
const localLang = (navLang == 'zh-CN' || navLang == 'en-US') ? navLang : false;
const lang = window.localStorage.lang || localLang || 'zh-CN';
Vue.config.lang = lang;
// 多语言配置 vue-i18n 6.x+
Vue.locale = () => { };
const messages = {
'zh-CN': Object.assign(zhCnLocale, zhLocale),
'en-US': Object.assign(enUsLocale, enLocale)
};
const i18n = new VueI18n({
locale: lang,
messages
});
export default i18n;

View File

@@ -0,0 +1,24 @@
export default {
lili: 'lili',
usernameLogin: 'UsernameLogin',
mobileLogin: 'MobileLogin',
autoLogin: 'Auto Login',
forgetPass: 'Forget Password',
otherLogin: 'Sign in with',
regist: 'Register',
login: 'Login',
logining: 'Logining...',
home: 'home',
switchLangTitle: 'Switch Lang',
international: 'Switch Lang',
userCenter: 'Account Center',
changePass: 'Account Pass',
logout: 'Logout',
tagOption: 'Label Options',
closeAll: 'Close All',
closeOthers: 'Close Others',
help: 'Help',
privacy: 'Privacy',
terms: 'Terms',
rights: 'All Rights Reserved'
};

View File

@@ -0,0 +1,24 @@
export default {
lili: 'lili',
usernameLogin: '账户密码登录',
mobileLogin: '手机号登录',
autoLogin: '自动登录',
forgetPass: '忘记密码',
otherLogin: '其他方式登录',
regist: '注册账户',
login: '登录',
logining: '登录中...',
home: '首页',
switchLangTitle: '切换语言',
international: '多语言切换',
userCenter: '个人中心',
changePass: '修改密码',
logout: '退出登录',
tagOption: '标签选项',
closeAll: '关闭全部',
closeOthers: '关闭其他',
help: '帮助',
privacy: '隐私',
terms: '条款',
rights: '版权所有'
};

76
manager/src/main.js Normal file
View File

@@ -0,0 +1,76 @@
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import ViewUI from 'view-design'
// import 'view-design/dist/styles/iview.css'
import './styles/theme.less';
import "core-js/stable"
import "regenerator-runtime/runtime"
import App from './App'
import { router } from './router/index'
import store from './store'
import i18n from '@/locale'
import { getRequest, postRequest, putRequest, deleteRequest, importRequest, uploadFileRequest } from '@/libs/axios'
import { setStore, getStore, removeStore } from '@/libs/storage'
import util from '@/libs/util'
import VueLazyload from 'vue-lazyload'
import * as filters from '@/utils/filters' // global filter
import liliDialog from '@/views/lili-dialog'
import {md5} from '@/utils/md5.js';
Vue.config.devtools = true;
Vue.config.productionTip = false
Vue.use(VueLazyload, {
error: require('./assets/img-error.png'),
loading: require('./assets/loading2.gif')
})
Vue.use(ViewUI, {
i18n: (key, value) => i18n.t(key, value)
});
Vue.component('liliDialog',liliDialog)
// 挂载全局使用的方法
Vue.prototype.getRequest = getRequest;
Vue.prototype.postRequest = postRequest;
Vue.prototype.putRequest = putRequest;
Vue.prototype.deleteRequest = deleteRequest;
Vue.prototype.importRequest = importRequest;
Vue.prototype.uploadFileRequest = uploadFileRequest;
Vue.prototype.setStore = setStore;
Vue.prototype.getStore = getStore;
Vue.prototype.removeStore = removeStore;
Vue.prototype.md5 = md5;
Array.prototype.remove = function(from, to) {
var rest = this.slice((to || from) + 1 || this.length);
this.length = from < 0 ? this.length + from : from;
return this.push.apply(this, rest);
};
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
})
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
store,
i18n,
render: h => h(App),
data: {
currentPageName: ''
},
mounted() {
// 初始化菜单
util.initRouter(this);
this.currentPageName = this.$route.name;
// 显示打开的页面的列表
this.$store.commit('setOpenedList');
this.$store.commit('initCachePage');
}
})

View File

@@ -0,0 +1,46 @@
import Vue from 'vue';
import ViewUI from 'view-design';
import Util from '../libs/util';
import VueRouter from 'vue-router';
import Cookies from 'js-cookie';
import {routers} from './router';
Vue.use(VueRouter);
// 路由配置
const RouterConfig = {
mode: 'history',
routes: routers
};
export const router = new VueRouter(RouterConfig);
router.beforeEach((to, from, next) => {
ViewUI.LoadingBar.start();
Util.title(to.meta.title);
next();
const name = to.name;
if (!Cookies.get('userInfo') && name !== 'login') {
// 判断是否已经登录且前往的页面不是登录页
next({
name: 'login'
});
} else if (Cookies.get('userInfo') && name === 'login') {
// 判断是否已经登录且前往的是登录页
Util.title();
next({
name: 'home_index'
});
} else {
Util.toDefaultPage([...routers], name, router, next);
}
});
router.afterEach((to) => {
Util.openNewPage(router.app, to.name, to.params, to.query);
ViewUI.LoadingBar.finish();
window.scrollTo(0, 0);
});

View File

@@ -0,0 +1,337 @@
import Main from "@/views/Main.vue";
// 不作为Main组件的子页面展示的页面单独写如下
export const loginRouter = {
path: "/login",
name: "login",
meta: {
title: "登录 - lili "
},
component: () => import("@/views/login.vue")
};
// 作为Main组件的子页面展示但是不在左侧菜单显示的路由写在otherRouter里
export const otherRouter = {
path: "/",
name: "otherRouter",
redirect: "/home",
component: Main,
children: [
{
path: "home",
title: { i18n: "home" },
name: "home_index",
component: () => import("@/views/home/home.vue")
},
{
path: "personal-center",
title: "个人中心",
name: "personal-center",
meta: { title: "个人中心" },
component: () => import("@/views/personal-center/personal-center.vue")
},
{
path: "change-password",
title: "修改密码",
name: "change_password",
component: () => import("@/views/change-password/change-password.vue")
},
{
path: "message",
title: "消息中心",
name: "message_index",
component: () => import("@/views/message/message.vue")
},
{
path: "category",
title: "类型列表",
name: "category",
component: () => import("@/views/goods/goods-manage/category.vue")
},
{
path: "message",
title: "消息中心",
name: "message_index",
component: () => import("@/views/message/message.vue")
},
{
path: "category",
title: "类型列表",
name: "category",
component: () => import("@/views/goods/goods-manage/category.vue")
},
{
path: "parameter",
title: "参数绑定",
name: "parameter",
component: () => import("@/views/goods/goods-manage/parameter.vue")
},
{
path: "shop",
title: "店铺列表",
name: "shop",
component: () => import("@/views/seller/shop/shopList.vue")
},
{
path: "shop-operation",
title: "店铺操作",
name: "shop-operation",
component: () => import("@/views/seller/shop/shopOperation.vue")
},
{
path: "shop-detail",
title: "店铺详细",
name: "shop-detail",
component: () => import("@/views/seller/shop/shopDetail.vue")
},
{
path: "add-edit-message",
title: "消息详情",
name: "add_edit_message",
component: () =>
import("@/views/member/message-manage/addOrEditMessage.vue")
},
{
path: "add_message",
title: "会员站内信",
name: "add_message",
component: () => import("@/views/member/notice/addMessage.vue")
},
{
path: "message-send-detail",
title: "消息发送详情",
name: "message_send_detail",
component: () =>
import("@/views/member/message-manage/messageSendDetail.vue")
},
{
path: "bill-detail",
title: "结算单详情",
name: "bill-detail",
component: () => import("@/views/seller/bill/bill-detail.vue")
},
{
path: "apply-goods",
title: "商品审核列表",
name: "apply-goods",
component: () => import("@/views/goods/goods-info/goodsApply.vue")
},
{
path: "manager-goods",
title: "管理端商品列表",
name: "manager-goods",
component: () => import("@/views/goods/goods-info/goods.vue")
},
{
path: "goods-brand",
title: "商品品牌",
name: "goods-brand",
component: () => import("@/views/goods/goods-manage/brand.vue")
},
{
path: "goods-category",
title: "商品分类",
name: "goods-category",
component: () => import("@/views/goods/goods-manage/category.vue")
},
{
path: "goods-parameter",
title: "商品参数",
name: "goods-parameter",
component: () => import("@/views/goods/goods-manage/parameter.vue")
},
{
path: "goods-spec",
title: "商品参数",
name: "goods-spec",
component: () => import("@/views/goods/goods-manage/spec.vue")
},
{
path: "order-complaint-detail",
title: "投诉详情",
name: "order-complaint-detail",
component: () =>
import("@/views/order/after-order/orderComplaintDetail.vue")
},
{
path: "order-list",
title: "订单列表",
name: "order-list",
component: () => import("@/views/order/order/orderList.vue")
},
{
path: "order-detail",
title: "订单详情",
name: "order-detail",
component: () => import("@/views/order/order/orderDetail.vue")
},
{
path: "after-order-detail",
title: "售后单详情",
name: "after-order-detail",
component: () =>
import("@/views/order/after-order/afterSaleOrderDetail.vue")
},
{
path: "shop-operation",
title: "店铺详情",
name: "shop-operation",
component: () => import("@/views/seller/shop/shopOperation.vue")
},
{
path: "member-detail",
title: "会员详情",
name: "member-detail",
component: () => import("@/views/member/list/memberDetail.vue")
},
{
path: "goods/goods-info/goodsDetail",
title: "商品详情",
name: "goods-detail",
component: () => import("@/views/goods/goods-info/goodsDetail.vue")
},
{
path: "promotion/manager-poonts-goods",
title: "积分商品",
name: "manager-points-goods",
component: () => import("@/views/promotion/pointsGoods/pointsGoods.vue")
},
{
path: "promotion/add-poonts-goods",
title: "添加积分商品",
name: "add-points-goods",
component: () =>
import("@/views/promotion/pointsGoods/addPointsGoods.vue")
},
{
path: "promotion/edit-poonts-goods",
title: "修改积分商品",
name: "edit-points-goods",
component: () =>
import("@/views/promotion/pointsGoods/editPointsGoods.vue")
},
{
path: "promotion/manager-poonts-goods-category",
title: "积分商品分类",
name: "manager-points-goods-category",
component: () =>
import("@/views/promotion/pointsGoodsCategory/pointsGoodsCategory.vue")
},
{
path: "promotion/manager-coupon",
title: "平台优惠券",
name: "manager-coupon",
component: () => import("@/views/promotion/coupon/coupon.vue")
},
{
path: "promotion/add-platform-coupon",
title: "添加平台优惠券",
name: "add-platform-coupon",
component: () => import("@/views/promotion/coupon/couponPublish.vue")
},
{
path: "promotion/edit-platform-coupon",
title: "编辑平台优惠券",
name: "edit-platform-coupon",
component: () => import("@/views/promotion/coupon/couponPublish.vue")
},
{
path: "promotion/member-receive-coupon",
title: "领取详情",
name: "member-receive-coupon",
component: () =>
import("@/views/promotion/coupon/memberReceiveCoupon.vue")
},
{
path: "promotion/platform-coupon-info",
title: "详情",
name: "platform-coupon-info",
component: () => import("@/views/promotion/coupon/couponInfo.vue")
},
{
path: "promotion/manager-pintuan",
title: "平台拼团",
name: "manager-pintuan",
component: () => import("@/views/promotion/pintuan/pintuan.vue")
},
{
path: "promotion/pintuan/pintuan-goods",
title: "拼团商品",
name: "pintuan-goods",
component: () => import("@/views/promotion/pintuan/pintuanGoods.vue")
},
{
path: "promotion/full-cut-detail",
title: "满减满折详情",
name: "full-cut-detail",
component: () => import("@/views/promotion/fullCut/fullCutDetail.vue")
},
{
path: "promotion/seckill/manager-seckill",
title: "限时抢购列表",
name: "manager-seckill",
component: () => import("@/views/promotion/seckill/seckill.vue")
},
{
path: "promotion/seckill/seckill-goods",
title: "限时抢购商品",
name: "seckill-goods",
component: () => import("@/views/promotion/seckill/seckillGoods.vue")
},
{
path: "promotion/seckill/manager-seckill-add",
title: "添加限时抢购",
name: "manager-seckill-add",
component: () => import("@/views/promotion/seckill/addSeckill.vue")
},
{
path: "/floorList/renovation",
title: "编辑模板",
name: "renovation",
component: () => import("@/views/lili-floor-renovation/renovation.vue")
},
{
path: "/floorList/main",
title: "编辑模板",
name: "main",
component: () => import("@/views/lili-floor-renovation/wap/main.vue")
},
{
path: "add-sms-sign",
title: "短信签名",
name: "add-sms-sign",
component: () => import("@/views/sys/message/smsSign.vue")
}
]
};
export const page404 = {
path: "/*",
name: "error-404",
meta: {
title: "404-页面不存在"
},
component: () => import("@/views/error-page/404.vue")
};
export const page403 = {
path: "/403",
meta: {
title: "403-权限不足"
},
name: "error-403",
component: () => import("@/views/error-page/403.vue")
};
export const page500 = {
path: "/500",
meta: {
title: "500-服务端错误"
},
name: "error-500",
component: () => import("@/views/error-page/500.vue")
};
// 所有上面定义的路由都要写在下面的routers里
export const routers = [loginRouter, otherRouter, page500, page403];

View File

@@ -0,0 +1,27 @@
import Vue from "vue";
import Vuex from "vuex";
import app from "./modules/app";
import user from "./modules/user";
import dict from "./modules/dict";
Vue.use(Vuex);
const store = new Vuex.Store({
state: {
// 状态
notices: "" //通知提示信息
},
mutations: {
// 改变方法
},
actions: {},
modules: {
app,
user,
dict
}
});
export default store;

View File

@@ -0,0 +1,178 @@
import { otherRouter } from '@/router/router';
import { router } from '@/router/index';
import Util from '@/libs/util';
import Cookies from 'js-cookie';
import Vue from 'vue';
const app = {
state: {
styleStore:"", //移动端楼层装修中选择风格存储
loading: false, // 全局加载动画
added: false, // 加载路由标识
navList: [], // 顶部菜单
currNav: "", // 当前顶部菜单name
currNavTitle: "", // 当前顶部菜单标题
cachePage: [],
lang: '',
isFullScreen: false,
openedSubmenuArr: [], // 要展开的菜单数组
menuTheme: 'dark', // 主题
themeColor: '',
pageOpenedList: [{
title: '首页',
path: '',
name: 'home_index'
}],
currentPageName: '',
currentPath: [
{
title: '首页',
path: '',
name: 'home_index'
}
],
// 面包屑数组 左侧菜单
menuList: [],
tagsList: [...otherRouter.children], //这块是面包屑的内容不能删除
routers: [
otherRouter
],
messageCount: 0,
// 在这里定义你不想要缓存的页面的name属性值(参见路由配置router.js)
dontCache: ['test', 'test']
},
mutations: {
// 动态添加主界面路由,需要缓存
updateAppRouter(state, routes) {
state.routers.push(...routes);
router.addRoutes(routes);
},
// 动态添加全局路由404、500等页面不需要缓存
updateDefaultRouter(state, routes) {
router.addRoutes(routes);
},
setLoading(state, v) {
state.loading = v;
},
setAdded(state, v) {
state.added = v;
},
setNavList(state, list) {
state.navList = list;
},
setCurrNav(state, v) {
state.currNav = v;
},
setCurrNavTitle(state, v) {
state.currNavTitle = v;
},
setTagsList(state, list) {
state.tagsList.push(...list);
},
updateMenulist(state, routes) {
state.menuList = routes;
},
addOpenSubmenu(state, name) {
let hasThisName = false;
let isEmpty = false;
if (name.length == 0) {
isEmpty = true;
}
if (state.openedSubmenuArr.indexOf(name) > -1) {
hasThisName = true;
}
if (!hasThisName && !isEmpty) {
state.openedSubmenuArr.push(name);
}
},
closePage(state, name) {
state.cachePage.forEach((item, index) => {
if (item == name) {
state.cachePage.splice(index, 1);
}
});
},
initCachePage(state) {
if (localStorage.cachePage) {
state.cachePage = JSON.parse(localStorage.cachePage);
}
},
removeTag(state, name) {
state.pageOpenedList.map((item, index) => {
if (item.name == name) {
state.pageOpenedList.splice(index, 1);
}
});
},
pageOpenedList(state, get) {
let openedPage = state.pageOpenedList[get.index];
if (get.argu) {
openedPage.argu = get.argu;
}
if (get.query) {
openedPage.query = get.query;
}
state.pageOpenedList.splice(get.index, 1, openedPage);
localStorage.pageOpenedList = JSON.stringify(state.pageOpenedList);
},
clearAllTags(state) {
state.pageOpenedList.splice(1);
state.cachePage.length = 0;
localStorage.pageOpenedList = JSON.stringify(state.pageOpenedList);
},
clearOtherTags(state, vm) {
let currentName = vm.$route.name;
let currentIndex = 0;
state.pageOpenedList.forEach((item, index) => {
if (item.name == currentName) {
currentIndex = index;
}
});
if (currentIndex == 0) {
state.pageOpenedList.splice(1);
} else {
state.pageOpenedList.splice(currentIndex + 1);
state.pageOpenedList.splice(1, currentIndex - 1);
}
let newCachepage = state.cachePage.filter(item => {
return item == currentName;
});
state.cachePage = newCachepage;
localStorage.pageOpenedList = JSON.stringify(state.pageOpenedList);
},
setOpenedList(state) {
state.pageOpenedList = localStorage.pageOpenedList ? JSON.parse(localStorage.pageOpenedList) : [otherRouter.children[0]];
},
setCurrentPath(state, pathArr) {
state.currentPath = pathArr;
},
setCurrentPageName(state, name) {
state.currentPageName = name;
},
setAvatarPath(state, path) {
localStorage.avatorImgPath = path;
},
switchLang(state, lang) {
state.lang = lang;
localStorage.lang = lang;
Vue.config.lang = lang;
},
clearOpenedSubmenu(state) {
state.openedSubmenuArr.length = 0;
},
setMessageCount(state, count) {
state.messageCount = count;
},
increateTag(state, tagObj) {
if (!Util.oneOf(tagObj.name, state.dontCache)) {
state.cachePage.push(tagObj.name);
localStorage.cachePage = JSON.stringify(state.cachePage);
}
state.pageOpenedList.push(tagObj);
localStorage.pageOpenedList = JSON.stringify(state.pageOpenedList);
}
}
};
export default app;

View File

@@ -0,0 +1,26 @@
const dict = {
state: {
// 经常需要读取的数据字典
sex: [],
messageType: [],
priority: [],
leaveType: []
},
mutations: {
// 设置值的改变方法
setSex(state, list) {
state.sex = list;
},
setMessageType(state, list) {
state.messageType = list;
},
setPriority(state, list) {
state.priority = list;
},
setLeaveType(state, list) {
state.leaveType = list;
},
}
};
export default dict;

View File

@@ -0,0 +1,14 @@
import Cookies from 'js-cookie';
const user = {
state: {},
mutations: {
logout () {
Cookies.remove('userInfo');
// 清空打开的页面等数据
localStorage.clear();
}
}
};
export default user;

View File

@@ -0,0 +1,197 @@
$theme_color: #804ed1;
//自动移滚动条样式
::-webkit-scrollbar{
width: 1px;
height: 5px;
}
::-webkit-scrollbar-thumb{
border-radius: 1em;
background-color: rgba(50,50,50,.3);
}
::-webkit-scrollbar-track{
border-radius: 1em;
background-color: rgba(50,50,50,.1);
}
.flex{
display: flex !important;
}
.flex_justify_content{
justify-content: center;
}
.flex_align_item{
align-items: center;
}
.global_text_left {
text-align: left;
}
.global_text_right {
text-align: right;
}
.global_float_left {
float: left;
}
.global_float_right {
float: right;
}
.clearfix::after{
content: '';
display: block;
clear: both;
}
.width_1200{width: 1200px;}
.width_800{width: 800px;}
.width_400{width: 400px;}
.width_300{width: 300px;}
.width_200{width: 200px;}
.width_100{width: 100px;}
.fz_12{font-size: 12px;}
.fz_14{font-size: 14px;}
.fz_16{font-size: 16px;}
.fz_18{font-size: 18px;}
.fw_bold{font-weight: bold;}
.mb_20{margin-bottom: 20px;}
.mt_20{margin-top: 20px;}
.ml_20{margin-left: 20px;}
.mr_20{margin-right: 20px;}
.mb_10{margin-bottom: 10px;}
.mt_10{margin-top: 10px;}
.ml_10{margin-left: 10px;}
.mr_10{margin-right: 10px;}
.pb_20{padding-bottom: 20px;}
.pt_20{padding-top: 20px;}
.pl_20{padding-left: 20px;}
.pr_20{padding-right: 20px;}
.pb_10{padding-bottom: 10px;}
.pt_10{padding-top: 10px;}
.pl_10{padding-left: 10px;}
.pr_10{padding-right: 10px;}
ul,li{
list-style: none;
}
.ellipsis{
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
/*
* @Author: LMR
* @Date: 2020-08-14 11:04:12
* @Last Modified by: LMR
* @Last Modified time: 2020-08-18 14:21:41
*/
// 主题颜色
// 明亮主题颜色
$primary_color: #2d8cf0;
$primary_light_color: #0f1011;
$primary_dark_color: #2b85e4;
$success_color: #19be6b;
$warning_color: #ff9900;
$error_color: #ed3f14;
$handle-btn-color: #438cde;
$theme_color: #ed3f14;
.theme_color{
color: #ed3f14 !important;
}
$border_color: #dddee1;
$title_color: #8c8c8c;
$light_title_color: #1c2438;
$light_content_color: #495060;
$light_sub_color: #80848f;
$light_background_color: #f8f8f9;
$light_white_background_color: #fff;
// 暗黑主题颜色
$dark_background_color: #141414;
$dark_sub_background_color: #1d1d1d; //稍微浅一点的
$dark_content_color: #d5d5d5;
/***** 封装一些方法可用于 黑暗主题 ,明亮主题 *****/
// 背景颜色
@mixin background_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_background_color;
}
[data-theme="light"] & {
background-color: $light_background_color;
}
}
// 辅助背景颜色
@mixin sub_background_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_sub_background_color;
}
[data-theme="light"] & {
background-color: $light_background_color;
}
}
@mixin white_background_color() {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $light_white_background_color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_sub_background_color;
}
[data-theme="light"] & {
background-color: $light_white_background_color;
}
}
// 正文颜色
@mixin content_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_content_color;
}
}
// 辅助颜色
@mixin sub_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_sub_color;
}
}
// 标题颜色
@mixin title_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_title_color;
}
}

View File

@@ -0,0 +1,79 @@
.search {
.operation {
margin-bottom: 2vh;
}
.select-count {
font-weight: 600;
color: #40a9ff;
}
.select-clear {
margin-left: 10px;
}
.page {
margin-top: 2vh;
}
.drop-down {
margin-left: 5px;
}
}
.tree-list {
position: relative;
min-height: 80px;
}
.drawer-footer {
z-index: 10;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
.block-tool .ivu-tooltip,
.block-tool .ivu-tooltip-rel {
display: block;
}
.block-pop .ivu-poptip,
.block-pop .ivu-poptip-rel {
display: block;
}
.search-form {
width: 100% !important;
display: flex;
align-items: center;
background-color: #F0F0F0;
padding: 10px;
margin: 0;
flex-wrap: wrap;
.ivu-form-item{
margin:8px 10px !important;
}
}
.padding-row{
margin-top: 15px;
margin-bottom: 15px;
}
.search-btn{
margin-left: 20px;
}
.div-zoom{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
overflow: hidden;
}

View File

@@ -0,0 +1,16 @@
@import "~view-design/src/styles/index.less";
// iview 自定义样式
@primary-color: #ed3f14;
@table-thead-bg: #f8f8f9;
@table-td-stripe-bg: #f8f8f9;
@table-td-hover-bg: #ededed;
@table-td-highlight-bg: #ededed;
@font-size-base: 12px;
.ivu-drawer,
.drawer,
.ivu-drawer-wrap {
z-index: 2600 !important;
}

View File

@@ -0,0 +1,42 @@
.search {
.operation {
margin-bottom: 2vh;
}
.select-title {
font-weight: 600;
color: #40a9ff;
}
.select-clear {
margin-left: 10px;
}
}
.tree-bar {
overflow: auto;
margin-top: 5px;
position: relative;
min-height: 80px;
}
.tree-bar::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.tree-bar::-webkit-scrollbar-thumb {
border-radius: 4px;
-webkit-box-shadow: inset 0 0 2px #d1d1d1;
background: #e4e4e4;
}
.block-tool .ivu-tooltip,
.block-tool .ivu-tooltip-rel {
display: block;
}
.block-pop .ivu-poptip,
.block-pop .ivu-poptip-rel {
display: block;
}

View File

@@ -0,0 +1,175 @@
/**
* 金钱单位置换 2999 --> 2,999.00
* @param val
* @param unit
* @param location
* @returns {*}
*/
export function unitPrice(val, unit, location) {
let price = formatPrice(val)
if (location === 'before') {
return price.substr(0, price.length - 3)
}
if (location === 'after') {
return price.substr(-2)
}
return (unit || '') + price
}
/**
* 货币格式化
* @param price
* @returns {string}
*/
export function formatPrice(price) {
if (typeof price !== 'number') return price
return String(Number(price).toFixed(2)).replace(/\B(?=(\d{3})+(?!\d))/g, ',')
}
/**
* 处理unix时间戳转换为可阅读时间格式
* @param unix
* @param format
* @returns {*|string}
*/
export function unixToDate(unix, format) {
let _format = format || 'yyyy-MM-dd hh:mm:ss'
const d = new Date(unix * 1000)
const o = {
'M+': d.getMonth() + 1,
'd+': d.getDate(),
'h+': d.getHours(),
'm+': d.getMinutes(),
's+': d.getSeconds(),
'q+': Math.floor((d.getMonth() + 3) / 3),
S: d.getMilliseconds()
}
if (/(y+)/.test(_format)) _format = _format.replace(RegExp.$1, (d.getFullYear() + '').substr(4 - RegExp.$1.length))
for (const k in o) if (new RegExp('(' + k + ')').test(_format)) _format = _format.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
return _format
}
//是否格式化
export function unixWhether(status) {
switch (status) {
case 'YES':
return "是"
case 'NO':
return "否"
}
}
export function unixSellerBillStatus(status_code) {
switch (status_code) {
case 'OUT':
return '已出账'
case 'CHECK':
return '已对账'
case 'EXAMINE':
return '已审核'
case 'PAY':
return '已结算'
case 'COMPLETE':
return '已完成'
}
}
export function unixSwitchStatus(status_code) {
switch (status_code) {
case 'OPEN':
return '开启'
case 'CLOSE':
return '关闭'
}
}
/**
* 13888888888 -> 138****8888
* @param mobile
* @returns {*}
*/
export function secrecyMobile(mobile) {
mobile = String(mobile)
if (!/\d{11}/.test(mobile)) {
return mobile
}
return mobile.replace(/(\d{3})(\d{4})(\d{4})/, '$1****$3')
}
export function formatDate(date, fmt) {
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
}
let o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds()
};
for (let k in o) {
if (new RegExp(`(${k})`).test(fmt)) {
let str = o[k] + '';
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));
}
}
return fmt;
};
// 楼层装修,选择链接处理跳转方式
export function formatLinkType (item) {
const types = ['goods', 'category', 'shops', 'marketing', 'pages', 'other'] // 所有跳转的分类 依次为 商品、分类、店铺、活动、页面、其他
let url = '';
switch (item.___type) {
case 'goods':
url = `/goodsDetail?skuId=${item.id}&goodsId=${item.goodsId}`;
break;
case 'category':
url = `/goodsList?categoryId=${item.allId}`;
break;
case 'shops':
url = `/merchant?id=${item.id}`;
break;
case 'marketing': // 暂无数据,需要后续修改
url = `/seckill?id=${item.id}`;
break;
case 'pages': // 暂无数据,需要后续修改
url = `/article?id=${item.id}`;
break;
case 'other':
switch (item.title) {
case '首页':
url = '/';
break;
case '购物车':
url = '/cart';
break;
case '我的订单':
url = '/home/MyOrder';
break;
case '收藏商品':
url = '/home/Favorites';
break;
case '个人中心':
url = '/home';
break;
case '外部链接':
url = item.url;
break;
case '秒杀频道':
url = '/seckill';
break;
case '领券中心':
url = '/coupon';
break;
}
break;
}
return url;
}

View File

@@ -0,0 +1,27 @@
import * as regular from './regular'
export {
regular
}
/**
* 数组对象深拷贝
* @param obj
* @returns {*}
*/
export default function cloneObj(obj) {
let str = null
let newobj = obj.constructor === Array ? [] : {}
if (typeof obj !== 'object') {
return
} else if (window && window.JSON) {
str = JSON.stringify(obj) // 系列化对象
newobj = JSON.parse(str) // 还原
} else {
for (var i in obj) {
newobj[i] = typeof obj[i] === 'object' ? cloneObj(obj[i]) : obj[i]
}
}
return newobj
}

223
manager/src/utils/md5.js Normal file
View File

@@ -0,0 +1,223 @@
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 1.1 Copyright (C) Paul Johnston 1999 - 2002.
* Code also contributed by Greg Holt
* See http://pajhome.org.uk/site/legal.html for details.
*/
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add(x, y) {
var lsw = (x & 0xFFFF) + (y & 0xFFFF)
var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
return (msw << 16) | (lsw & 0xFFFF)
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function rol(num, cnt) {
return (num << cnt) | (num >>> (32 - cnt))
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function cmn(q, a, b, x, s, t) {
return safe_add(rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)
}
function ff(a, b, c, d, x, s, t) {
return cmn((b & c) | ((~b) & d), a, b, x, s, t)
}
function gg(a, b, c, d, x, s, t) {
return cmn((b & d) | (c & (~d)), a, b, x, s, t)
}
function hh(a, b, c, d, x, s, t) {
return cmn(b ^ c ^ d, a, b, x, s, t)
}
function ii(a, b, c, d, x, s, t) {
return cmn(c ^ (b | (~d)), a, b, x, s, t)
}
/*
* Calculate the MD5 of an array of little-endian words, producing an array
* of little-endian words.
*/
function coreMD5(x) {
var a = 1732584193
var b = -271733879
var c = -1732584194
var d = 271733878
for (var i = 0; i < x.length; i += 16) {
var olda = a
var oldb = b
var oldc = c
var oldd = d
a = ff(a, b, c, d, x[i + 0], 7, -680876936)
d = ff(d, a, b, c, x[i + 1], 12, -389564586)
c = ff(c, d, a, b, x[i + 2], 17, 606105819)
b = ff(b, c, d, a, x[i + 3], 22, -1044525330)
a = ff(a, b, c, d, x[i + 4], 7, -176418897)
d = ff(d, a, b, c, x[i + 5], 12, 1200080426)
c = ff(c, d, a, b, x[i + 6], 17, -1473231341)
b = ff(b, c, d, a, x[i + 7], 22, -45705983)
a = ff(a, b, c, d, x[i + 8], 7, 1770035416)
d = ff(d, a, b, c, x[i + 9], 12, -1958414417)
c = ff(c, d, a, b, x[i + 10], 17, -42063)
b = ff(b, c, d, a, x[i + 11], 22, -1990404162)
a = ff(a, b, c, d, x[i + 12], 7, 1804603682)
d = ff(d, a, b, c, x[i + 13], 12, -40341101)
c = ff(c, d, a, b, x[i + 14], 17, -1502002290)
b = ff(b, c, d, a, x[i + 15], 22, 1236535329)
a = gg(a, b, c, d, x[i + 1], 5, -165796510)
d = gg(d, a, b, c, x[i + 6], 9, -1069501632)
c = gg(c, d, a, b, x[i + 11], 14, 643717713)
b = gg(b, c, d, a, x[i + 0], 20, -373897302)
a = gg(a, b, c, d, x[i + 5], 5, -701558691)
d = gg(d, a, b, c, x[i + 10], 9, 38016083)
c = gg(c, d, a, b, x[i + 15], 14, -660478335)
b = gg(b, c, d, a, x[i + 4], 20, -405537848)
a = gg(a, b, c, d, x[i + 9], 5, 568446438)
d = gg(d, a, b, c, x[i + 14], 9, -1019803690)
c = gg(c, d, a, b, x[i + 3], 14, -187363961)
b = gg(b, c, d, a, x[i + 8], 20, 1163531501)
a = gg(a, b, c, d, x[i + 13], 5, -1444681467)
d = gg(d, a, b, c, x[i + 2], 9, -51403784)
c = gg(c, d, a, b, x[i + 7], 14, 1735328473)
b = gg(b, c, d, a, x[i + 12], 20, -1926607734)
a = hh(a, b, c, d, x[i + 5], 4, -378558)
d = hh(d, a, b, c, x[i + 8], 11, -2022574463)
c = hh(c, d, a, b, x[i + 11], 16, 1839030562)
b = hh(b, c, d, a, x[i + 14], 23, -35309556)
a = hh(a, b, c, d, x[i + 1], 4, -1530992060)
d = hh(d, a, b, c, x[i + 4], 11, 1272893353)
c = hh(c, d, a, b, x[i + 7], 16, -155497632)
b = hh(b, c, d, a, x[i + 10], 23, -1094730640)
a = hh(a, b, c, d, x[i + 13], 4, 681279174)
d = hh(d, a, b, c, x[i + 0], 11, -358537222)
c = hh(c, d, a, b, x[i + 3], 16, -722521979)
b = hh(b, c, d, a, x[i + 6], 23, 76029189)
a = hh(a, b, c, d, x[i + 9], 4, -640364487)
d = hh(d, a, b, c, x[i + 12], 11, -421815835)
c = hh(c, d, a, b, x[i + 15], 16, 530742520)
b = hh(b, c, d, a, x[i + 2], 23, -995338651)
a = ii(a, b, c, d, x[i + 0], 6, -198630844)
d = ii(d, a, b, c, x[i + 7], 10, 1126891415)
c = ii(c, d, a, b, x[i + 14], 15, -1416354905)
b = ii(b, c, d, a, x[i + 5], 21, -57434055)
a = ii(a, b, c, d, x[i + 12], 6, 1700485571)
d = ii(d, a, b, c, x[i + 3], 10, -1894986606)
c = ii(c, d, a, b, x[i + 10], 15, -1051523)
b = ii(b, c, d, a, x[i + 1], 21, -2054922799)
a = ii(a, b, c, d, x[i + 8], 6, 1873313359)
d = ii(d, a, b, c, x[i + 15], 10, -30611744)
c = ii(c, d, a, b, x[i + 6], 15, -1560198380)
b = ii(b, c, d, a, x[i + 13], 21, 1309151649)
a = ii(a, b, c, d, x[i + 4], 6, -145523070)
d = ii(d, a, b, c, x[i + 11], 10, -1120210379)
c = ii(c, d, a, b, x[i + 2], 15, 718787259)
b = ii(b, c, d, a, x[i + 9], 21, -343485551)
a = safe_add(a, olda)
b = safe_add(b, oldb)
c = safe_add(c, oldc)
d = safe_add(d, oldd)
}
return [a, b, c, d]
}
/*
* Convert an array of little-endian words to a hex string.
*/
function binl2hex(binarray) {
var hex_tab = "0123456789abcdef"
var str = ""
for (var i = 0; i < binarray.length * 4; i++) {
str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) +
hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF)
}
return str
}
/*
* Convert an array of little-endian words to a base64 encoded string.
*/
function binl2b64(binarray) {
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
var str = ""
for (var i = 0; i < binarray.length * 32; i += 6) {
str += tab.charAt(((binarray[i >> 5] << (i % 32)) & 0x3F) |
((binarray[i >> 5 + 1] >> (32 - i % 32)) & 0x3F))
}
return str
}
/*
* Convert an 8-bit character string to a sequence of 16-word blocks, stored
* as an array, and append appropriate padding for MD4/5 calculation.
* If any of the characters are >255, the high byte is silently ignored.
*/
function str2binl(str) {
var nblk = ((str.length + 8) >> 6) + 1 // number of 16-word blocks
var blks = new Array(nblk * 16)
for (var i = 0; i < nblk * 16; i++) blks[i] = 0
for (var i = 0; i < str.length; i++)
blks[i >> 2] |= (str.charCodeAt(i) & 0xFF) << ((i % 4) * 8)
blks[i >> 2] |= 0x80 << ((i % 4) * 8)
blks[nblk * 16 - 2] = str.length * 8
return blks
}
/*
* Convert a wide-character string to a sequence of 16-word blocks, stored as
* an array, and append appropriate padding for MD4/5 calculation.
*/
function strw2binl(str) {
var nblk = ((str.length + 4) >> 5) + 1 // number of 16-word blocks
var blks = new Array(nblk * 16)
for (var i = 0; i < nblk * 16; i++) blks[i] = 0
for (var i = 0; i < str.length; i++)
blks[i >> 1] |= str.charCodeAt(i) << ((i % 2) * 16)
blks[i >> 1] |= 0x80 << ((i % 2) * 16)
blks[nblk * 16 - 2] = str.length * 16
return blks
}
/*
* External interface
*/
function hexMD5(str) {
return binl2hex(coreMD5(str2binl(str)))
}
function hexMD5w(str) {
return binl2hex(coreMD5(strw2binl(str)))
}
function b64MD5(str) {
return binl2b64(coreMD5(str2binl(str)))
}
function b64MD5w(str) {
return binl2b64(coreMD5(strw2binl(str)))
}
/* Backward compatibility */
function calcMD5(str) {
return binl2hex(coreMD5(str2binl(str)))
}
module.exports = {
md5: hexMD5
}

View File

@@ -0,0 +1,59 @@
/**
* 各种正则表达式
*
* qq qq号
* name 汉字
* mobile 手机号
* email 电子邮箱
* password 密码【6-20位】
* integer 正整数【不包含0】
* money 金钱
* IDCard 身份证
* userName 账户名称【汉字、字母、数字、“-”、“_”的组合】
* URL URL
* TEL 固定电话
*/
//qq
export const qq = /^[1-9][0-9]{4,14}$/
//汉字
export const name = /^[\u4e00-\u9fa5]{0,}$/
// 手机号
export const mobile = /^0?(13[0-9]|14[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9])[0-9]{8}$/
// 电子邮箱
export const email = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
// 密码【6-20位】
export const password = /^[@A-Za-z0-9!#$%^&*.~,]{6,20}$/
// 正整数【不包含0】
export const integer = /^[1-9]\d*$/
// 正整数【包含0】
export const Integer = /^[0-9]\d*$/
// 折扣
export const discount = /^((0\.[1-9]{1})|(([1-9]{1})(\.\d{1})?))$/
// 0-100正整数
export const rate = /^([0-9]{1,2}|100)$/
// 金钱
export const money = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/
// 身份证
export const IDCard = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
// 账户名称【汉字、字母、数字、“-”、“_”的组合】
export const userName = /[A-Za-z0-9_\-\u4e00-\u9fa5]$/
// URL
export const URL =
/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
// 固话
export const TEL = /0\d{2,3}-\d{7,8}/

View File

@@ -0,0 +1,21 @@
import * as regExp from "./regular";
//表单中必须输入汉字
export function validateNeedName(rule, value, callback) {
const name = regExp.name;
if (name.test(value)) {
callback();
} else {
return callback(new Error("请输入汉字"));
}
}
//表单中输入手机号验证
export function validateMobile(rule, value, callback) {
const mobile = regExp.mobile;
if (mobile.test(value)) {
callback();
} else {
return callback(new Error("手机号输入错误!"));
}
}

217
manager/src/views/Main.vue Normal file
View File

@@ -0,0 +1,217 @@
<style lang="scss">
@import "./main.scss";
</style>
<template>
<div class="main">
<!-- 左侧菜单 -->
<div class="sidebar-menu-con menu-bar">
<div class="logo-con">
<img src="../assets/logo.png" key="max-logo" />
</div>
<shrinkable-menu></shrinkable-menu>
</div>
<!-- 顶部标题栏主体 -->
<div class="main-header-con" style="padding-left:240px">
<div class="main-header">
<div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}">
<!-- 通知消息 -->
<message-tip v-if="tipsMessage" :res="tipsMessage"></message-tip>
<!-- 用户头像 -->
<div class="user-dropdown-menu-con">
<Row type="flex" justify="end" align="middle" class="user-dropdown-innercon">
<Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown">
<div class="dropList">
<span class="main-user-name">{{ userInfo.nickName }}</span>
<Icon type="md-arrow-dropdown" />
<Avatar :src="avatarPath" style="background: #fff;margin-left: 10px;"></Avatar>
</div>
<DropdownMenu slot="list">
<DropdownItem name="personalCenter">{{ $t('userCenter') }}</DropdownItem>
<DropdownItem name="changePass">{{ $t('changePass') }}</DropdownItem>
<DropdownItem name="loginOut" divided>{{ $t('logout') }}</DropdownItem>
</DropdownMenu>
</Dropdown>
</Row>
</div>
</div>
</div>
<!-- 已打开的页面标签 -->
<div class="tags-con">
<tags-page-opened :pageTagsList="pageTagsList"></tags-page-opened>
</div>
</div>
<div class="single-page-con">
<div class="single-page">
<!-- <keep-alive :include="cachePage"> -->
<router-view></router-view>
<!-- </keep-alive> -->
</div>
</div>
<!-- 全局加载动画 -->
<circleLoading class="loading-position" v-show="loading" />
</div>
</template>
<script>
import shrinkableMenu from "./main-components/shrinkable-menu/shrinkable-menu.vue";
import tagsPageOpened from "./main-components/tags-page-opened.vue";
import breadcrumbNav from "./main-components/breadcrumb-nav.vue";
import fullScreen from "./main-components/fullscreen.vue";
import messageTip from "./main-components/message-tip.vue";
import circleLoading from "@/views/my-components/lili/circle-loading.vue";
import Cookies from "js-cookie";
import util from "@/libs/util.js";
import { getNoticePage } from "@/api/index";
var client;
export default {
components: {
shrinkableMenu,
tagsPageOpened,
breadcrumbNav,
fullScreen,
messageTip,
circleLoading,
},
data() {
return {
sliceNum: 5,
userInfo: "",
userId: "",
openedSubmenuArr: this.$store.state.app.openedSubmenuArr,
firstThreeNav: [],
lastNav: [],
navType: 1,
tipsMessage: "",
};
},
computed: {
loading() {
return this.$store.state.app.loading;
},
pageTagsList() {
return this.$store.state.app.pageOpenedList; // 打开的页面的页面对象
},
avatarPath() {
return localStorage.avatorImgPath;
},
cachePage() {
return this.$store.state.app.cachePage;
},
lang() {
return this.$store.state.app.lang;
},
mesCount() {
return 0;
},
},
methods: {
init() {
// 菜单初始化
let pathArr = util.setCurrentPath(this, this.$route.name);
if (pathArr.length >= 2) {
this.$store.commit("addOpenSubmenu", pathArr[1].name);
}
let userInfo = JSON.parse(Cookies.get("userInfo"));
this.userInfo = userInfo;
this.userId = userInfo.id;
this.checkTag(this.$route.name);
let currWidth = document.body.clientWidth;
if (currWidth <= 1200) {
this.sliceNum = 2;
}
// 读取未读消息数
getNoticePage({}).then((res) => {
if (res.success) {
this.tipsMessage = res.result;
this.$store.state.notices = res.result;
}
});
},
//用户头像下方抽屉点击
handleClickUserDropdown(name) {
//个人中心
if (name === "personalCenter") {
util.openNewPage(this, "personal-center");
this.$router.push({
name: "personal-center",
});
}
//修改密码
else if (name === "changePass") {
util.openNewPage(this, "change-password");
this.$router.push({
name: "change_password",
});
}
// 退出登录
else if (name === "loginOut") {
Cookies.set("accessToken", "");
this.$store.commit("logout", this);
this.$store.commit("clearOpenedSubmenu");
this.setStore("accessToken", "");
this.setStore("refreshToken", "");
this.$router.push({ path: "/login" });
}
},
//切换标签
checkTag(name) {
let openpageHasTag = this.pageTagsList.some((item) => {
if (item.name == name) {
return true;
}
});
if (!openpageHasTag) {
// 解决关闭当前标签后再点击回退按钮会退到当前页时没有标签的问题
util.openNewPage(
this,
name,
this.$route.params || {},
this.$route.query || {}
);
}
},
//宽度动态计算
resize() {
let currWidth = document.body.clientWidth;
let count = currWidth / 300;
if (count > 6) {
this.sliceNum = 6;
} else {
this.sliceNum = count;
}
},
},
watch: {
$route(to, from) {
this.$store.commit("setCurrentPageName", to.name);
let pathArr = util.setCurrentPath(this, to.name);
if (pathArr.length > 2) {
this.$store.commit("addOpenSubmenu", pathArr[1].name);
}
this.checkTag(to.name);
localStorage.currentPageName = to.name;
},
lang() {
util.setCurrentPath(this, this.$route.name); // 在切换语言时用于刷新面包屑
},
},
mounted() {
this.init();
let that = this;
this.resize();
window.addEventListener("resize", function () {
that.resize();
});
},
created() {
// 显示打开的页面的列表
this.$store.commit("setOpenedList");
},
};
</script>

View File

@@ -0,0 +1,168 @@
<template>
<div>
<Card class="change-pass">
<p slot="title">
<Icon type="key"></Icon>
修改密码
</p>
<div>
<Form ref="editPasswordForm" :model="editPasswordForm" :label-width="100" label-position="right" :rules="passwordValidate" style="width:450px">
<FormItem label="原密码" prop="oldPass">
<Input type="password" v-model="editPasswordForm.oldPassword" placeholder="请输入现在使用的密码"></Input>
</FormItem>
<FormItem label="新密码" prop="newPass">
<SetPassword v-model="editPasswordForm.newPassword" @on-change="changeInputPass" />
</FormItem>
<FormItem label="确认新密码" prop="rePass">
<Input type="password" v-model="editPasswordForm.rePassword" placeholder="请再次输入新密码"></Input>
</FormItem>
<FormItem>
<Button type="primary" style="width: 100px;margin-right:5px" :loading="savePassLoading" @click="saveEditPass">保存
</Button>
<Button @click="cancelEditPass">取消</Button>
</FormItem>
</Form>
</div>
</Card>
</div>
</template>
<script>
import SetPassword from "@/views/my-components/lili/set-password";
import { changePass } from "@/api/index";
export default {
name: "change-password",
components: {
SetPassword,
},
data() {
const valideRePassword = (rule, value, callback) => {
if (value !== this.editPasswordForm.newPassword) {
callback(new Error("两次输入密码不一致"));
} else {
callback();
}
};
return {
savePassLoading: false,
editPasswordForm: {
oldPassword: "",
newPassword: "",
rePassword: "",
},
strength: "",
passwordValidate: {
oldPassword: [
{
required: true,
message: "请输入原密码",
trigger: "blur",
},
],
newPassword: [
{
required: true,
message: "请输入新密码",
trigger: "blur",
},
{
min: 6,
message: "请至少输入6个字符",
trigger: "blur",
},
{
max: 32,
message: "最多输入32个字符",
trigger: "blur",
},
],
rePassword: [
{
required: true,
message: "请再次输入新密码",
trigger: "blur",
},
{
validator: valideRePassword,
trigger: "blur",
},
],
},
};
},
methods: {
changeInputPass(v, grade, strength) {
this.strength = strength;
},
saveEditPass() {
let params = {
password: this.md5(this.editPasswordForm.oldPassword),
newPassword: this.md5(this.editPasswordForm.newPassword),
passStrength: this.md5(this.strength),
};
this.$refs["editPasswordForm"].validate((valid) => {
if (valid) {
this.savePassLoading = true;
changePass(params).then((res) => {
this.savePassLoading = false;
if (res.success) {
this.$Modal.success({
title: "修改密码成功",
content: "修改密码成功,需重新登录",
onOk: () => {
this.$store.commit("logout", this);
this.$store.commit("clearOpenedSubmenu");
this.$router.push({
name: "login",
});
},
});
}
});
}
});
},
cancelEditPass() {
this.$store.commit("removeTag", "change_password");
localStorage.pageOpenedList = JSON.stringify(
this.$store.state.app.pageOpenedList
);
let lastPageName = "";
let length = this.$store.state.app.pageOpenedList.length;
if (length > 1) {
lastPageName = this.$store.state.app.pageOpenedList[length - 1].name;
} else {
lastPageName = this.$store.state.app.pageOpenedList[0].name;
}
this.$router.push({
name: lastPageName,
});
},
},
mounted() {},
};
</script>
<style lang="scss" scoped>
.change-pass {
&-btn-box {
margin-bottom: 10px;
button {
padding-left: 0;
span {
color: #2d8cf0;
transition: all 0.2s;
}
span:hover {
color: #0c25f1;
transition: all 0.2s;
}
}
}
}
</style>

View File

@@ -0,0 +1,49 @@
// 分销商状态列表
export const distributionStatusList= [
{
value:'APPLY',
label:'申请中'
},
{
value:'RETREAT',
label:'已清退'
},
{
value:'REFUSE',
label:'审核拒绝'
},
{
value:'PASS',
label:'审核通过'
},
]
// 分销佣金状态列表
export const cashStatusList = [
{
value:'APPLY',
label:'待处理'
},
{
value:'REFUSE',
label:'拒绝'
},
{
value:'PASS',
label:'通过'
}
]
// 分销订单状态列表
export const orderStatusList = [
{
value:'WAIT_BILL',
label:'待结算'
},
{
value:'WAIT_CASH',
label:'待提现'
},
{
value:'COMPLETE_CASH',
label:'提现完成'
}
]

Some files were not shown because too many files have changed in this diff Show More