提交 ef9a9644 编写于 作者: H Hevin

First submission

Signed-off-by: NHevin <390330302@qq.com>
上级 782a9464
{
"presets": [
"es2015","stage-3"
]
}
\ No newline at end of file
<p align="center">
<a href="https://www.iviewui.com">
<img width="200" src="https://file.iviewui.com/logo.svg">
</a>
</p>
# iView Admin
[![](https://img.shields.io/travis/iview/iview-admin.svg?style=flat-square)](https://travis-ci.org/iview/iview-admin)
[![vue](https://img.shields.io/badge/vue-2.5.2-brightgreen.svg?style=flat-square)](https://github.com/vuejs/vue)
[![iview ui](https://img.shields.io/badge/iview-2.7.2-brightgreen.svg?style=flat-square)](https://github.com/iview/iview)
## Current version:v1.2.3
[Update log](https://github.com/iview/iview-admin/releases)
[WIKI](https://github.com/iview/iview-admin/wiki)
[View online](https://iview.github.io/iview-admin)
[Simplified template](https://github.com/iview/iview-admin/tree/template)
`Note: The demo online will be updated after the new version of the development version is released, so if you want to experience the iview-admin with latest version, please clone the full project code and run it locally.`
## Install
```bush
// install dependencies
npm install
```
## Run
### Development
```bush
npm run dev
```
### Production(Build)
```bush
npm run build
```
## Introduction
&emsp;&emsp;iView-admin is a suite of backstage management system developed based on Vue.js and use the UI Toolkit -- [iView](https://www.iviewui.com). It's maintained by the TalkingData front-end visualization team member. iView-admin compolies with iView design and development contract, use uniform style, and more features are developing. If you want to check the update of iView-admin, you can view [Update log](https://github.com/iview/iview-admin/releases) to get. If you are new to iView-admin, you can go to [WIKI](https://github.com/iview/iview-admin/wiki) for tutorials. If you want to experience iView-admin online, you can visit [View online](https://iview.github.io/iview-admin) to experience. If you just want a sober and cool interface then you can download [Simplify Templates](https://github.com/iview/iview-admin/tree/template) for development.
## Features
- Login/Logout
- Authority management
- Menu filter
- Permission switch
- Multi-language switch
- Components
- text editor
- Markdown editor
- Area cascade
- Picture editor
- Dragable list
- File upload
- Count animation
- Form
- Artical publish
- Workflow
- Tables
- Dragable table
- Editable table
- Inline editable table
- Cell editable table
- Searchable table
- Exporting data
- As CSV file
- As XLS file
- Table to picture
- Error page
- 403
- 404
- 500
- Advanced router
- Dynamic router
- Pages with arguments
- Skin
- Shrinkable sidebar menu
- Tag navigation
- Breadcrumbs
- Full screen/Exit full screen
- Lock screen
- Message center
- Personal center
## File tree
```shell
.
├── build   //the configuration of project builds
└── src
   ├── images   //images files
   ├── libs   //tool method
   ├── locale   //language files
   ├── router   //configuration of router
   ├── store   //status management
   ├── styles   //style files
├── template //template file
├── vendors //public library files
└── views
├── access //access management
├── advanced-router //Advanced router
├── error_page //error page
├── form //form
├── home //home page
│   ├── components //the components of home page
├── international //Multi-language
├── main_components //Main
│   ├── lockscreen //lock screen
│   ├── shrinkable-menu //shrinkable sidebar
│   └── theme-switch //skin switch
├── message //message center
├── my_components //components
│   ├── area-linkage //China area cascade
│   ├── count-to //count animation
│   ├── draggable-list //dragable list
│   ├── file-upload //file upload
│   ├── image-editor //picture editor
│   ├── markdown-editor //Markdown editor
│   └── text-editor //text editor
├── own-space //personal center
└── tables //tables
```
## Links
- [TalkingData](https://github.com/TalkingData)
- [iView](https://github.com/iview/iview)
- [Vue](https://github.com/vuejs/vue)
- [Webpack](https://github.com/webpack/webpack)
## Show
- home
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/home.gif)
- tag navigation
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/page-tags.gif)
- access management
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/access.gif)
- dragable list
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/dragable-list.gif)
- picture editor
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/image-editor.gif)
- file upload
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/upload.gif)
- count animation
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/count-to.gif)
- artical publish
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/article-publish.gif)
- workflow
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/workflow.gif)
- dragable table
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/dragable-table.gif)
- editable table
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/editable-table.gif)
- export data
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/exportable-table.gif)
- table to picture
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/table2image.gif)
- error page
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/error-page.gif)
- lock screen
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/locking.gif)
- shrinkable sidbar menu
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/sidebarmenu.gif)s
- skin switch
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/theme.gif)
- message center
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/message.gif)
## License
[MIT](http://opensource.org/licenses/MIT)
Copyright (c) 2016-present, iView
<p align="center">
<a href="https://www.iviewui.com">
<img width="200" src="https://file.iviewui.com/logo.svg">
</a>
</p>
# iView Admin
[![](https://img.shields.io/travis/iview/iview-admin.svg?style=flat-square)](https://travis-ci.org/iview/iview-admin)
[![vue](https://img.shields.io/badge/vue-2.5.2-brightgreen.svg?style=flat-square)](https://github.com/vuejs/vue)
[![iview ui](https://img.shields.io/badge/iview-2.7.2-brightgreen.svg?style=flat-square)](https://github.com/iview/iview)
## Current version:v1.2.3
[Update log](https://github.com/iview/iview-admin/releases)
[WIKI](https://github.com/iview/iview-admin/wiki)
[View online](https://iview.github.io/iview-admin)
[Simplified template](https://github.com/iview/iview-admin/tree/template)
`Note: The demo online will be updated after the new version of the development version is released, so if you want to experience the iview-admin with latest version, please clone the full project code and run it locally.`
## Install
```bush
// install dependencies
npm install
```
## Run
### Development
```bush
npm run dev
```
### Production(Build)
```bush
npm run build
```
## Introduction
&emsp;&emsp;iView-admin is a suite of backstage management system developed based on Vue.js and use the UI Toolkit -- [iView](https://www.iviewui.com). It's maintained by the TalkingData front-end visualization team member. iView-admin compolies with iView design and development contract, use uniform style, and more features are developing. If you want to check the update of iView-admin, you can view [Update log](https://github.com/iview/iview-admin/releases) to get. If you are new to iView-admin, you can go to [WIKI](https://github.com/iview/iview-admin/wiki) for tutorials. If you want to experience iView-admin online, you can visit [View online](https://iview.github.io/iview-admin) to experience. If you just want a sober and cool interface then you can download [Simplify Templates](https://github.com/iview/iview-admin/tree/template) for development.
## Features
- Login/Logout
- Authority management
- Menu filter
- Permission switch
- Multi-language switch
- Components
- text editor
- Markdown editor
- Area cascade
- Picture editor
- Dragable list
- File upload
- Count animation
- Form
- Artical publish
- Workflow
- Tables
- Dragable table
- Editable table
- Inline editable table
- Cell editable table
- Searchable table
- Exporting data
- As CSV file
- As XLS file
- Table to picture
- Error page
- 403
- 404
- 500
- Advanced router
- Dynamic router
- Pages with arguments
- Skin
- Shrinkable sidebar menu
- Tag navigation
- Breadcrumbs
- Full screen/Exit full screen
- Lock screen
- Message center
- Personal center
## File tree
```shell
.
├── build   //the configuration of project builds
└── src
   ├── images   //images files
   ├── libs   //tool method
   ├── locale   //language files
   ├── router   //configuration of router
   ├── store   //status management
   ├── styles   //style files
├── template //template file
├── vendors //public library files
└── views
├── access //access management
├── advanced-router //Advanced router
├── error_page //error page
├── form //form
├── home //home page
│   ├── components //the components of home page
├── international //Multi-language
├── main_components //Main
│   ├── lockscreen //lock screen
│   ├── shrinkable-menu //shrinkable sidebar
│   └── theme-switch //skin switch
├── message //message center
├── my_components //components
│   ├── area-linkage //China area cascade
│   ├── count-to //count animation
│   ├── draggable-list //dragable list
│   ├── file-upload //file upload
│   ├── image-editor //picture editor
│   ├── markdown-editor //Markdown editor
│   └── text-editor //text editor
├── own-space //personal center
└── tables //tables
```
## Links
- [TalkingData](https://github.com/TalkingData)
- [iView](https://github.com/iview/iview)
- [Vue](https://github.com/vuejs/vue)
- [Webpack](https://github.com/webpack/webpack)
## Show
- home
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/home.gif)
- tag navigation
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/page-tags.gif)
- access management
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/access.gif)
- dragable list
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/dragable-list.gif)
- picture editor
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/image-editor.gif)
- file upload
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/upload.gif)
- count animation
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/count-to.gif)
- artical publish
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/article-publish.gif)
- workflow
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/workflow.gif)
- dragable table
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/dragable-table.gif)
- editable table
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/editable-table.gif)
- export data
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/exportable-table.gif)
- table to picture
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/table2image.gif)
- error page
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/error-page.gif)
- lock screen
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/locking.gif)
- shrinkable sidbar menu
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/sidebarmenu.gif)s
- skin switch
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/theme.gif)
- message center
![image](https://github.com/iview/iview-admin/raw/dev/github-gif/message.gif)
## License
[MIT](http://opensource.org/licenses/MIT)
Copyright (c) 2016-present, iView
import Env from './env';
let trueconfig = Env.slice(0, 3)
let config = {
env: trueconfig
};
export default config;
\ No newline at end of file
export default "production";
\ No newline at end of file
const path = require('path');
const os = require('os');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HappyPack = require('happypack');
var happyThreadPool = HappyPack.ThreadPool({ size: os.cpus().length });
function resolve(dir) {
return path.join(__dirname, dir);
}
module.exports = {
entry: {
main: '@/main',
'vender-base': '@/vendors/vendors.base.js',
'vender-exten': '@/vendors/vendors.exten.js'
},
output: {
path: path.resolve(__dirname, '../dist/dist')
},
module: {
rules: [{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
less: ExtractTextPlugin.extract({
use: ['css-loader?minimize', 'autoprefixer-loader', 'less-loader'],
fallback: 'vue-style-loader'
}),
},
loaders: {
css: 'vue-style-loader!css-loader',
less: 'vue-style-loader!css-loader!less-loader'
},
postLoaders: {
html: 'babel-loader'
}
}
},
{
test: /iview\/.*?js$/,
loader: 'happypack/loader?id=happybabel',
exclude: /node_modules/
},
{
test: /\.js$/,
loader: 'happypack/loader?id=happybabel',
exclude: /node_modules/
},
{
test: /\.js[x]?$/,
include: [resolve('src')],
exclude: /node_modules/,
loader: 'happypack/loader?id=happybabel'
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
use: ['css-loader?minimize', 'autoprefixer-loader'],
fallback: 'style-loader'
})
},
{
test: /\.less$/,
use: ExtractTextPlugin.extract({
use: ['autoprefixer-loader', 'less-loader'],
fallback: 'style-loader'
}),
},
{
test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
loader: 'url-loader?limit=1024'
},
{
test: /\.(html|tpl)$/,
loader: 'html-loader'
}
]
},
plugins: [
new HappyPack({
id: 'happybabel',
loaders: ['babel-loader'],
threadPool: happyThreadPool,
verbose: true
})
],
resolve: {
extensions: ['.js', '.vue'],
alias: {
'vue': 'vue/dist/vue.esm.js',
'@': resolve('../src'),
}
}
};
\ No newline at end of file
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const merge = require('webpack-merge');
const webpackBaseConfig = require('./webpack.base.config.js');
const fs = require('fs');
const package = require('../package.json');
const ip = require('ip').address()
// fs.open('./build/env.js', 'w', function(err, fd) {
// const buf = 'export default "development";';
// fs.write(fd, buf, 0, buf.length, 0, function(err, written, buffer) {});
// });
module.exports = merge(webpackBaseConfig, {
devtool: '#source-map',
devServer: {
port: 9090,
host: "127.0.0.1"
},
output: {
publicPath: '/dist/',
filename: '[name].js',
chunkFilename: '[name].chunk.js'
},
plugins: [
new ExtractTextPlugin({
filename: '[name].css',
allChunks: true
}),
new webpack.optimize.CommonsChunkPlugin({
name: ['vender-exten', 'vender-base'],
minChunks: Infinity
}),
new HtmlWebpackPlugin({
title: '后台管理',
filename: '../index.html',
template: './src/template/index.ejs',
favicon: './favicon.ico',
inject: false
}),
new CopyWebpackPlugin([{
from: 'src/views/main-components/theme-switch/theme'
}, ], {
ignore: [
//'text-editor.vue'
]
})
]
});
\ No newline at end of file
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const cleanWebpackPlugin = require('clean-webpack-plugin');
const UglifyJsParallelPlugin = require('webpack-uglify-parallel');
const merge = require('webpack-merge');
const webpackBaseConfig = require('./webpack.base.config.js');
const os = require('os');
const fs = require('fs');
const path = require('path');
const package = require('../package.json');
fs.open('./build/env.js', 'w', function(err, fd) {
const buf = 'export default "production";';
fs.write(fd, buf, function(err, written, buffer) {});
});
module.exports = merge(webpackBaseConfig, {
// devtool:'eval',
output: {
// publicPath: 'http://admin.bitrade.wxmarket.cn/dist/', //114 test
publicPath: '/dist/', //114 test
filename: '[name].[hash].js',
chunkFilename: '[name].[hash].chunk.js'
},
plugins: [
new cleanWebpackPlugin(['dist/*'], {
root: path.resolve(__dirname, '../')
}),
new ExtractTextPlugin({
filename: '[name].[hash].css',
allChunks: true
}),
new webpack.optimize.CommonsChunkPlugin({
// name: 'vendors',
// filename: 'vendors.[hash].js'
name: ['vender-exten', 'vender-base'],
minChunks: Infinity
}),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
// new UglifyJsParallelPlugin({
// workers: os.cpus().length,
// mangle: true,
// compressor: {
// warnings: false,
// drop_console: true,
// drop_debugger: true
// }
// }),
new CopyWebpackPlugin([{
from: 'favicon.ico'
},
{
from: 'src/styles/fonts',
to: 'fonts'
},
{
from: 'src/views/main-components/theme-switch/theme'
}
], {
ignore: [
// 'text-editor.vue'
]
}),
new HtmlWebpackPlugin({
title: '后台管理',
favicon: './favicon.ico',
filename: '../index.html',
template: './src/template/index.ejs',
inject: false
})
]
});
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>管理后台</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link rel="stylesheet" href="/dist/main.css">
<link rel="stylesheet" name="theme" href="">
<!-- <link rel="shortcut icon" href="/dist/favicon.ico" type="image/x-icon"> -->
</head>
<body>
<div id="app"></div>
<div class="lock-screen-back" id="lock_screen_back"></div>
<script type="text/javascript" src="/dist/vender-base.js"></script>
<script type="text/javascript" src="/dist/vender-exten.js"></script>
<script type="text/javascript" src="/dist/main.js"></script>
</body>
</html>
\ No newline at end of file
此差异已折叠。
{
"name": "ztuo_admins",
"version": "1.2.3",
"description": "a management bases on iview",
"main": "main.js",
"scripts": {
"init": "webpack --progress --config build/webpack.dev.config.js",
"dev": "webpack-dev-server --content-base ./ --open --inline --hot --compress --config build/webpack.dev.config.js",
"build": "webpack --progress --hide-modules --config build/webpack.prod.config.js"
},
"repository": {
"type": "git",
"url": "https://github.com/iview/iview-admin.git"
},
"author": "Lison<zhigang.li@tendcloud.com>",
"license": "MIT",
"dependencies": {
"@antv/data-set": "^0.8.7",
"ajv": "^5.0.0",
"area-data": "^1.0.0",
"axios": "^0.17.1",
"clipboard": "^1.7.1",
"countup": "^1.8.2",
"cropperjs": "^1.1.3",
"echarts": "^3.8.5",
"html2canvas": "^0.5.0-beta4",
"ip": "^1.1.5",
"iview": "^2.13.1",
"iview-area": "^1.5.12",
"jquery": "^2.2.3",
"js-cookie": "^2.2.0",
"js-file-download": "^0.4.1",
"node-pre-gyp": "^0.15.0",
"pnpm": "^5.4.11",
"rasterizehtml": "^1.2.4",
"simplemde": "^1.11.2",
"smeditor": "^0.1.19",
"sortablejs": "^1.7.0",
"time-formater": "^1.0.1",
"tinymce": "^4.7.3",
"viser-vue": "^2.2.3",
"vue": "^2.5.9",
"vue-resource": "^1.3.5",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
},
"devDependencies": {
"autoprefixer-loader": "^3.2.0",
"babel": "^6.23.0",
"babel-core": "^6.23.1",
"babel-eslint": "^8.0.3",
"babel-loader": "^7.1.2",
"babel-plugin-transform-runtime": "^6.12.0",
"babel-preset-env": "^1.6.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-3": "^6.24.1",
"babel-runtime": "^6.11.6",
"clean-webpack-plugin": "^0.1.17",
"copy-webpack-plugin": "^4.2.3",
"css-hot-loader": "^1.3.4",
"css-loader": "^0.28.7",
"eslint": "^4.12.1",
"eslint-config-google": "^0.9.1",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-html": "^4.0.1",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.5",
"happypack": "^4.0.0",
"html-loader": "^0.5.1",
"html-webpack-plugin": "^2.28.0",
"less": "^2.7.3",
"less-loader": "^4.1.0",
"semver": "^5.4.1",
"style-loader": "^0.19.0",
"uglifyjs-webpack-plugin": "^1.0.0-rc.0",
"unsupported": "^1.1.0",
"url-loader": "^0.6.2",
"vue-hot-reload-api": "^2.2.4",
"vue-html-loader": "^1.2.3",
"vue-i18n": "^5.0.3",
"vue-loader": "^13.5.0",
"vue-style-loader": "^3.0.3",
"vue-template-compiler": "^2.5.9",
"webpack": "^3.10.0",
"webpack-dev-server": "^2.9.5",
"webpack-merge": "^4.1.1",
"webpack-parallel-uglify-plugin": "^1.1.0",
"webpack-uglify-parallel": "^0.1.4"
}
}
<style lang="less">
@import "./styles/common.less";
@import "./styles/reset-iview-style.less";
</style>
<template>
<div id="main" class="app-main">
<router-view></router-view>
<transition name="loadingFade">
<div class="loadingMask" v-show="loading">
<div class="wrapper">
<Icon type="load-c" class="loadingIcon"></Icon>
<p>加载中...</p>
</div>
</div>
</transition>
<!-- <transition name="loadingFade"> -->
<div class="memberCheckMask" v-show="memberCheckMask">
<div class="wrapper">
<Steps :current="imgIndex">
<Step title="" content="身份证正面"></Step>
<Step title="" content="身份证手持"></Step>
<Step title="" content="身份证反面"></Step>
</Steps>
<Row class="img">
<Spin size="large" v-if="!memberCheckImgInfo.imgArr"></Spin>
<img :src="!memberCheckImgInfo.imgArr ? '' : Object.values(memberCheckImgInfo.imgArr[imgIndex])" alt="">
<span class="preStep" v-show="!!imgIndex" @click="imgIndex--">上一步 < </span> <span class="nextStep" v-show="!(imgIndex===2)" @click="imgIndex++"> > 下一步</span>
</Row>
<Row class="btns">
<Row v-show="imgIndex!==2">
<Col span="4" offset="10">
<Button type="primary" long @click="cancelMemberCheck">取消</Button>
</Col>
</Row>
<Row v-show="imgIndex===2">
<Col span="4" offset="7">
<Button type="info" long @click="memberPass(true)">审核通过</Button>
</Col>
<Col span="4" offset="2">
<Button type="error" long @click="memberPass(false)">审核不通过</Button>
</Col>
</Row>
<Modal v-model="rejectModel" :width="450" title="请备注失败原因(选填)" @on-ok="noPass" @on-cancel="cancelMemberCheck">
<Input type="textarea" v-model="rejectReason"></Input>
</Modal>
</Row>
</div>
</div>
<div class="memberCheckMask" v-show="videoCheckMask">
<div class="wrapper">
<Row class="img video">
<!-- <Spin size="large" v-if="!memberVideoInfo.videoUrl">
</Spin> -->
<video :src="memberVideoInfo.videoUrl" controls="controls"></video>
<Icon type="ios-backspace-outline" size="30"/>
</Row>
<Row class="btns">
<Row>
<Col span="4" offset="4">
<Button type="info" long @click="videoPass(true)">审核通过</Button>
</Col>
<Col span="4" offset="2">
<Button type="error" long @click="videoPass(false)">审核不通过</Button>
</Col>
<Col span="4" offset="2">
<Button type="primary" long @click="cancelExamine">取消审核</Button>
</Col>
</Row>
<Modal v-model="rejectModelVideo" :width="450" title="请备注失败原因(选填)" @on-ok="VideoNoPass" @on-cancel="cancelVideoCheck">
<Input type="textarea" v-model="rejectVideoReason"></Input>
</Modal>
</Row>
</div>
</div>
<!-- </transition> -->
<div class="businessCheckMask" v-show="businessCheckMask">
<div class="wrapper">
<!-- <Steps :current="authImgIndex">
<Step title="" content="个人数字资产证明"></Step>
<Step title="" content="数字资产交易证明"></Step>
</Steps> -->
<Row class="title">
<Col span="12" :class="{ active: !authImgIndex}">① 个人数字资产证明</Col>
<Col span="12" :class="{ active: !!authImgIndex}">② 数字资产交易证明</Col>
</Row>
<Row class="businessInfo">
<Col span="8">手机号:{{ businessCheckInfo.telno }}</Col>
<Col span="8">微信号:{{ businessCheckInfo.wechat }}</Col>
<Col span="8">QQ号:{{ businessCheckInfo.qq }}</Col>
<Col span="8">保证金:{{ `${businessCheckInfo.amount}${businessCheckInfo.coinSymbol}` }}</Col>
<!-- businessCheckInfo.assetData -->
<!-- businessCheckInfo.tradeData -->
</Row>
<Row class="img">
<Spin size="large" v-if="!authImg.length"></Spin>
<img :src="authImg">
<span class="preStep" v-show="!authImgStep" @click="switchAuthImg(true)">上一步 < </span> <span class="nextStep" v-show="authImgStep" @click="switchAuthImg(false)"> > 下一步</span>
</Row>
<Row class="btns">
<Row v-show="authImgStep">
<Col span="4" offset="10">
<Button type="primary" long @click="cancelBusinessCheck">取消</Button>
</Col>
</Row>
<Row v-show="!authImgStep">
<Col span="4" offset="7">
<Button type="info" long @click="businessPass(true)">审核通过</Button>
</Col>
<Col span="4" offset="2">
<Button type="error" long @click="businessPass(false)">审核不通过</Button>
</Col>
</Row>
<Modal v-model="rejectBusinessModel" :width="450" title="请备注失败原因(选填)" @on-ok="businessNoPass" @on-cancel="cancelBusinessCheck">
<Input type="textarea" v-model="rejectBusinessReason"></Input>
</Modal>
</Row>
</div>
</div>
</div>
</template>
<script>
import store from "./store";
import axios from "axios";
import { memberCheckPass, memberCheckNotPass, businessAudit } from '@/service/getData';
export default {
data() {
return {
theme: this.$store.state.app.themeColor,
imgIndex: 0,
rejectModel: false,
rejectModelVideo: false,
rejectReason: '',
authImg: '',
authImgIndex: 0,
authImgStep: true,
rejectBusinessModel: false,
rejectBusinessReason: '',
rejectVideoReason:""
};
},
created() {
let permission = store.state.app.permissionData;
var nes = JSON.parse(localStorage.getItem("ROLEINFO"));
},
methods: {
businessNoPass() {
let userInfo = this.$store.state.user.businessCheckInfo;
businessAudit(userInfo.member.id, { status: 3, detail: this.rejectBusinessReason }).then(res => {
if (!res.code) {
this.$Message.success(res.message);
} else {
this.$Message.error(res.message);
this.$store.commit('changeDate', Date.now());
}
})
},
VideoNoPass() {
memberCheckNotPass(this.memberVideoInfo.id, { rejectReason: this.rejectVideoReason }).then(res => {
if (!res.code) {
this.$Message.success(res.message);
} else {
this.$Message.error(res.message);
}
this.$store.commit('changeDate', Date.now());
this.cancelVideoCheck();
})
.catch(err => { console.log(err) })
},
cancelExamine(){
this.cancelVideoCheck();
},
switchAuthImg(bol) {
if (bol) {
this.authImg = this.businessCheckInfo.assetData;
this.authImgIndex = 0;
} else {
this.authImg = this.businessCheckInfo.tradeData;
this.authImgIndex = 1;
}
this.authImgStep = !this.authImgStep;
},
noPass() {
memberCheckNotPass(this.memberCheckImgInfo.id, { rejectReason: this.rejectReason })
.then(res => {
if (!res.code) {
this.$Message.success(res.message);
} else this.$Message.error(res.message);
this.$store.commit('changeDate', Date.now());
this.cancelMemberCheck();
})
.catch(err => { console.log(err) })
console.log(this.memberCheckImgInfo);
},
cancelMemberCheck() {
this.imgIndex = 0;
this.authImgStep = true;
this.$store.commit('switchMemberMask', false);
this.$store.commit('memeberCheckImg', []);
this.rejectReason = '';
},
cancelVideoCheck() {
this.$store.commit('switchVideoMask', false);
this.$store.commit('memberCheckVideo', []);
this.rejectVideoReason = "";
},
cancelBusinessCheck() {
this.authImgIndex = 0;
this.authImgStep = true;
this.rejectBusinessReason = '';
this.$store.commit('switchBusinessMask', false);
},
memberPass(bol) {
if (bol) {
memberCheckPass(this.memberCheckImgInfo.id)
.then(res => {
if (!res.code) {
this.$Message.success(res.message);
} else this.$Message.error(res.message);
this.$store.commit('changeDate', Date.now());
this.cancelMemberCheck();
})
.catch(err => { console.log(err) })
} else {
this.$store.commit('switchMemberMask', false);
this.rejectModel = true;
}
},
videoPass(bol) {
if (bol) {
memberCheckPass(this.memberVideoInfo.id)
.then(res => {
if (!res.code) {
this.$Message.success(res.message);
} else {
this.$Message.error(res.message);
this.$store.commit('changeDate', Date.now());
this.cancelVideoCheck();
}
})
.catch(err => { console.log(err) })
} else {
this.$store.commit('switchVideoMask', false);
this.rejectModelVideo = true;
}
},
businessPass(bol) {
let userInfo = this.$store.state.user.businessCheckInfo;
if (bol) {
businessAudit(userInfo.member.id, { status: 2, detail: '' })
.then(res => {
if (!res.code) {
this.$Message.success(res.message);
} else this.$Message.error(res.message);
this.authImgIndex = 0;
this.authImgStep = true;
this.$store.commit('changeDate', Date.now());
this.$store.commit('switchBusinessMask', false);
})
} else {
this.$store.commit('switchBusinessMask', false);
this.rejectBusinessModel = true;
}
},
},
computed: {
loading() {
return this.$store.state.user.pageLoading;
},
memberCheckMask() {
return this.$store.state.user.memberCheckMask;
},
videoCheckMask() {
return this.$store.state.user.videoCheckMask;
},
businessCheckMask() {
return this.$store.state.user.businessCheckMask;
},
memberCheckImgInfo() {
return this.$store.state.user.memberCheckImgInfo;
},
memberVideoInfo() {
return this.$store.state.user.memberVideoInfo;
},
businessCheckInfo() {
if (!this.$store.state.user.businessCheckInfo.authInfo) return {};
else {
let authInfoObj = JSON.parse(this.$store.state.user.businessCheckInfo.authInfo);
this.authImg = authInfoObj.assetData;
return authInfoObj;
}
}
}
};
</script>
/**
* 格式化时间
* date Thu Mar 01 2018 00:00:00 GMT+0800 (中国标准时间)
*
*/
// export const formatDate = (date, delimiter = '-') => {
// if (!!date || (!!date.length)) {
// let year = date.getFullYear();
// let month = date.getMonth() + 1;
// let day = date.getDate();
// let hours = date.getHours();
// let min = date.getMinutes();
// let sec = date.getSeconds();
// let timeArr = [year, month, day, hours, min, sec];
// let formateTimeArr = [];
// let timeStr = '';
// timeArr.forEach((item, index) => {
// if (item * 1 < 10) item = '0' + item;
// if (index === 2) timeStr += (item + ' ');
// else if (index === 5) timeStr += (item + '');
// else if (index === 3 || index === 4) timeStr += (item + ':');
// else timeStr += (item + delimiter);
// })
// return timeStr;
// }
// }
/**
* 过滤搜索条件
*/
export const filterSearch = searchID => {
if (!searchID || (!String(searchID).length)) {
return false;
} else {
if (isNaN(searchID * 1) || searchID * 1 < 0 ||
(searchID.toString().split('.')[1] !== undefined)) {
return false;
} else {
return true;
}
}
}
\ No newline at end of file
export default {
host: 'http://127.0.0.1/8090',
common: {
login: '/admin/system/employee/sign/in'
},
system: {
permissionAll: '/admin/system/role/permission/all',
role: '/admin/system/role/all',
rolePermission: '/admin/system/role/permission',
statistics: '/admin/system/statistics/dashboard'
},
otc:{
//法币币种管理
OtcCoin: '/admin/otc/otc-coin/page-query',
OtcCoinDetail:'admin/otc/otc-coin/detail',
update: 'admin/otc/otc-coin/update',
create: 'admin/otc/otc-coin/create',
//法币广告管理
advertise:'admin/otc/advertise/page-query',
advertiseStatus:'admin/otc/advertise/alter-status',
//法币订单管理
order:'admin/otc/order/page-query',
orderDetail:'admin/otc/order/detail',
//法币申诉管理
appeal:'admin/otc/appeal/page-query',
detail:'admin/otc/appeal/detail',
cancelOrder:'admin/otc/appeal/cancel-order',//取消订单
releaseCoin: 'admin/otc/appeal/release-coin',//放币
}
}
\ No newline at end of file
/**
* 存储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;
return window.localStorage.getItem(name);
}
/**
* 删除localStorage
*/
export const removeStore = name => {
if (!name) return;
window.localStorage.removeItem(name);
}
\ No newline at end of file
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;
import axios from 'axios';
import env from '../../build/env';
import semver from 'semver';
import packjson from '../../package.json';
let util = {
};
util.title = function(title) {
title = title || '后台管理';
window.document.title = title;
};
const ajaxUrl = env === 'development' ?
'http://127.0.0.1:8888' :
env === 'production' ?
'https://www.url.com' :
'https://debug.url.com';
util.ajax = axios.create({
baseURL: ajaxUrl,
timeout: 30000
});
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.showThisRoute = function(itAccess, currentAccess) {
if (typeof itAccess === 'object' && Array.isArray(itAccess)) {
return util.oneOf(currentAccess, itAccess);
} else {
return itAccess === currentAccess;
}
};
util.getRouterObjByName = function(routers, name) {
if (!name || !routers || !routers.length) {
return null;
}
// debugger;
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 && !!item.children.length) {
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) {
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) {
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();
}
};
util.fullscreenEvent = function(vm) {
vm.$store.commit('initCachepage');
// 权限菜单过滤相关
vm.$store.commit('updateMenulist');
// 全屏相关
};
util.checkUpdate = function(vm) {
axios.get('https://api.github.com/repos/iview/iview-admin/releases/latest').then(res => {
let version = res.data.tag_name;
vm.$Notice.config({
duration: 0
});
if (semver.lt(packjson.version, version)) {
vm.$Notice.info({
title: 'iview-admin更新啦',
desc: '<p>iView-admin更新到了' + version + '了,去看看有哪些变化吧</p><a style="font-size:13px;" href="https://github.com/iview/iview-admin/releases" target="_blank">前往github查看</a>'
});
}
});
};
util.numToFixed = function(number, scale) {
return new Number(number).toFixed(scale);
}
export default util;
\ No newline at end of file
import Vue from 'vue';
import Locales from './locale';
import zhLocale from 'iview/src/locale/lang/zh-CN';
import enLocale from 'iview/src/locale/lang/en-US';
import zhTLocale from 'iview/src/locale/lang/zh-TW';
// 自动设置语言
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;
// 多语言配置
const locales = Locales;
const mergeZH = Object.assign(zhLocale, locales['zh-CN']);
const mergeEN = Object.assign(enLocale, locales['en-US']);
const mergeTW = Object.assign(zhTLocale, locales['zh-TW']);
Vue.locale('zh-CN', mergeZH);
Vue.locale('en-US', mergeEN);
Vue.locale('zh-TW', mergeTW);
export default {
'zh-CN': {
home: '首页',
switchLangTitle: '切换语言',
international: '多语言切换',
iviewComponentTitle: 'iview组件多语言切换',
tip: '注:iview-admin只是为了示范如何实现多语言切换,所以只对当前页做了翻译。',
intro: 'iview目前支持15种语言,只要你看得到的iview组件出现iview内置文字的地方都会根据你设置的语言类型自动切换对应的语言。',
placeholderText: '请输入文字...',
placeholderDate: '选择日期',
name: '姓名',
company: '公司',
btnText: '点击查看模态框',
modalText: '在这里你可以看到iview模态框默认的确定和取消按钮会切换语言',
poptip: '国际化的气泡提示',
showPoptipText: '点击显示气泡提示'
},
'zh-TW': {
home: '首頁',
switchLangTitle: '切換語言',
international: '多語言切換',
iviewComponentTitle: 'iview組件多語言切換',
tip: '注:iview-admin只是為了示範如何實現多語言切換,所以只對當前頁做了翻譯。',
intro: 'iview目前支持15種語言,只要你看得到的iview組件出現iview內置文字的地方都會根據你設置的語言類型自動切換對應的語言。',
placeholderText: '請輸入文字...',
placeholderDate: '選擇日期',
name: '姓名',
company: '公司',
btnText: '點擊查看模態框',
modalText: '在這裡你可以看到iview模態框默認的確定和取消按鈕會切換語言',
poptip: '國際化的氣泡提示',
showPoptipText: '點擊顯示氣泡提示'
},
'en-US': {
home: 'home',
switchLangTitle: 'Switch Lang',
international: 'Switch Lang',
tip: 'Note: iview-admin just to demonstrate how to achieve multi-language switching, so only the current page to do the translation.',
iviewComponentTitle: 'The effect on the iview',
intro: 'iview currently supports 15 languages, as long as you see the iview component where the text will be based on your language type automatically set the corresponding language.',
placeholderText: 'please enter text...',
placeholderDate: 'Select Date',
name: 'name',
company: 'company',
btnText: 'Click to show modal',
modalText: 'Here you can see the iview modal box by default to the OK and Cancel buttons that will switch the language',
poptip: 'international poptip',
showPoptipText: 'Click to show poptip'
}
};
import Vue from 'vue';
import iView from 'iview';
import { router, initRouter } from './router/index';
import { appRouter } from './router/router';
import store from './store';
import App from './app.vue';
import '@/locale';
import 'iview/dist/styles/iview.css';
import VueI18n from 'vue-i18n';
import util from '@/libs/util';
import axios from 'axios';
import qs from 'qs';
import Api from '@/config/api';
import Cookies from 'js-cookie';
import Viser from 'viser-vue';
import { setStore, getStore, removeStore } from "@/config/storage.js";
Vue.prototype.$ajax = axios;
axios.defaults.withCredentials = true;
function toFloor(number, scale = 8) {
if (new Number(number) == 0) { //如果是"0.0000000000000000"
return 0;
}
let str = number + ""; //转字符串
if (str.indexOf('e') > -1 || str.indexOf('E') > -1) { //科学计数法
let num = new Number(number).toFixed(scale + 1),
str = num + "";
return str.substring(0, str.length - 1);
} else if (str.indexOf(".") > -1) { //小数
if (scale == 0) {
return str.substring(0, str.indexOf("."));
}
return str.substring(0, str.indexOf(".") + scale + 1); //截取指定位数
} else { //整数
return str;
}
}
Vue.filter('toFloor', (number, scale) => {
return toFloor(number, scale);
});
Vue.prototype.toFloor = toFloor;
axios.interceptors.response.use((response) => {
const data = response.data
let baseURL = response.config.baseURL;
let url = response.config.url;
if (data.code === 4000) {
Cookies.remove('user');
Cookies.remove('userPhone');
Cookies.remove('userInfo');
router.push({ name: 'login' });
}
if (data.code === 5000) {
router.push({ name: 'error-403' });
}
return response;
})
// axios.interceptors.request.use((config) => {
// config.headers['x-auth-token'] = Cookies.get('x-auth-token');
// return config;
// })
Vue.prototype.numToFixed = util.numToFixed; //主要用于科学计数法转数字
Vue.prototype.api = Api;
Vue.use(VueI18n);
Vue.use(iView);
Vue.use(Viser);
new Vue({
el: '#app',
router: router,
store: store,
render: h => h(App),
data: {
currentPageName: ''
},
mounted() {
this.currentPageName = this.$route.name;
// 显示打开的页面的列表
this.$store.commit('setOpenedList');
this.$store.commit('initCachepage');
// 权限菜单过滤相关
this.$store.commit('updateMenulist');
},
created() {
let tagsList = [];
appRouter.map((item) => {
if (item.children.length <= 1) {
tagsList.push(item.children[0]);
} else {
tagsList.push(...item.children);
}
});
this.$store.commit('setTagsList', tagsList);
}
});
\ No newline at end of file
import Vue from 'vue';
import iView from 'iview';
import Util from '../libs/util';
import VueRouter from 'vue-router';
import Cookies from 'js-cookie';
import { routers, otherRouter, appRouter } from './router';
Vue.use(VueRouter);
// 路由配置
const RouterConfig = {
// mode: 'history',
routes: routers
};
export const router = new VueRouter(RouterConfig);
router.beforeEach((to, from, next) => {
iView.LoadingBar.start();
Util.title(to.meta.title);
if (Cookies.get('locking') === '1' && to.name !== 'locking') { // 判断当前是否是锁定状态
next({
replace: true,
name: 'locking'
});
} else if (Cookies.get('locking') === '0' && to.name === 'locking') {
next(false);
} else {
if (!Cookies.get('user') && to.name !== 'login') { // 判断是否已经登录且前往的页面不是登录页
next({
name: 'login'
});
} else if (Cookies.get('user') && to.name === 'login') { // 判断是否已经登录且前往的是登录页
Util.title();
next({
name: 'home_index'
});
} else {
const curRouterObj = Util.getRouterObjByName([otherRouter, ...appRouter], to.name);
if (curRouterObj && curRouterObj.access !== undefined) { // 需要判断权限的路由
if (curRouterObj.access === 1) {
Util.toDefaultPage([otherRouter, ...appRouter], to.name, router, next); // 如果在地址栏输入的是一级菜单则默认打开其第一个二级菜单的页面
} else {
// removeStore("leftSidebarList");
// Cookies.remove('userInfo');
// Cookies.remove('userPhone');
// removeStore("pageOpenedList");
// this.$store.commit("logout", this);
// this.$store.commit("clearOpenedSubmenu");
// this.$store.commit('clearAllTags');
// clearAppRouter();
// this.$router.push({
// name: "login"
// });
// this.$Message.warning('您无此权限 !');
// next();
next({
replace: true,
name: 'error-403'
});
}
} else { // 没有配置权限的路由, 直接通过
Util.toDefaultPage([...routers], to.name, router, next);
}
}
}
});
router.afterEach((to) => {
Util.openNewPage(router.app, to.name, to.params, to.query);
iView.LoadingBar.finish();
window.scrollTo(0, 0);
});
\ No newline at end of file
import Main from '@/views/Main.vue';
import Cookies from "js-cookie";
import {
setStore,
getStore,
removeStore
} from "@/config/storage.js"
// 不作为Main组件的子页面展示的页面单独写,如下
export const loginRouter = {
path: '/login',
name: 'login',
meta: {
title: 'Login - 登录'
},
component: resolve => {
require(['@/views/login.vue'], resolve);
}
};
export const page404 = {
path: '/*',
name: 'error-404',
meta: {
title: '404-页面不存在'
},
component: resolve => {
require(['@/views/error-page/404.vue'], resolve);
}
};
export const page403 = {
path: '/403',
meta: {
title: '403-权限不足'
},
name: 'error-403',
component: resolve => {
require(['@//views/error-page/403.vue'], resolve);
}
};
export const page500 = {
path: '/500',
meta: {
title: '500-服务端错误'
},
name: 'error-500',
component: resolve => {
require(['@/views/error-page/500.vue'], resolve);
}
};
export const locking = {
path: '/locking',
name: 'locking',
component: resolve => {
require(['@/views/main-components/lockscreen/components/locking-page.vue'], resolve);
}
};
// 作为Main组件的子页面展示但是不在左侧菜单显示的路由写在otherRouter里
export const otherRouter = {
path: '/',
name: 'otherRouter',
redirect: '/home',
component: Main,
children: [{
path: 'home',
title: '首页',
name: 'home_index',
component: resolve => {
require(['@/views/home/home.vue'], resolve);
}
},
{
path: 'finance/auditdetail',
title: '提现审核详情',
name: 'finance:auditdetail',
component: resolve => {
require(['@/views/finance/AuditDetail.vue'], resolve);
}
},
{
path: 'member/memberaudit/auditdetail',
title: '会员审核详情',
name: 'member:memberaudit:auditdetail',
component: resolve => {
require(['@/views/member/AuthenticateDetail.vue'], resolve);
}
},
{
path: 'member/memberdetail',
title: '会员详情',
name: 'member:memberdetail',
component: resolve => {
require(['@/views/member/MemberDetail.vue'], resolve);
}
},
{
path: 'content/helpManage/addhelpmanage',
title: '系统帮助',
name: 'content:helpManage:addhelpmanage',
component: resolve => {
require(['@/views/content/AddHelpManage.vue'], resolve);
}
},
{
path: 'content/announceManage/addAnnounce',
title: '编辑公告',
name: 'content:announceManage:addAnnounce',
component: resolve => {
require(['@/views/content/AddAnnouncement.vue'], resolve);
}
},
{
path: 'exchange/bborder/detail',
title: '订单详情',
name: 'exchange:bborder:detail',
component: resolve => {
require(['@/views/exchange/OrderDetail.vue'], resolve);
}
},
{
path: 'system/employee/auditEmployee',
title: '编辑用户',
name: 'system:employee:auditEmployee',
component: resolve => {
require(['@/views/system/AddAuditEmployee.vue'], resolve)
}
},
{
path: '/user/personalcenter',
title: '个人中心',
name: 'user:personalcenter',
component: resolve => {
require(['@/views/user/PersonalCenter.vue'], resolve)
}
},
{
path: '/system/coin/transferdetail',
title: '转账明细',
name: 'system:coin:transferdetail',
component: resolve => {
require(['@/views/system/CoinTransferDetail.vue'], resolve)
}
},
{
path: '/otc/adManage/advertisedetail',
title: '广告详情',
name: 'otc:adManage:advertisedetail',
component: resolve => {
require(['@/views/otc/AdvertiseDetail.vue'], resolve)
}
},
{
path: '/otc/appealmanage/appealdetail',
title: '申诉详情',
name: 'otc:appealmanage:appealdetail',
component: resolve => {
require(['@/views/otc/AppealDetail.vue'], resolve)
}
},
{
path: '/otc/adManage/exitbonddetail',
title: '退保详情',
name: 'otc:adManage:exitbonddetail',
component: resolve => {
require(['@/views/otc/ExitBondDetail.vue'], resolve)
}
},
{
path: '/otc/businessaudit/businessdetail',
title: '商家详情',
name: 'otc:businessaudit:businessdetail',
component: resolve => {
require(['@/views/otc/BusinessDetail.vue'], resolve)
}
},
]
};
// 作为Main组件的子页面展示并且在左侧菜单显示的路由写在appRouter里
let findSlideArr = [{
id: 8,
path: '/system',
icon: 'person-stalker',
component: Main
},
{
id: 11,
path: '/member',
icon: 'ios-people',
component: Main
},
{
id: 66,
path: '/otc',
icon: 'social-bitcoin',
component: Main
},
{
id: 60,
path: '/exchange',
icon: 'social-yen',
component: Main
},
{ //邀请管理父级菜单
id: 206,
path: '/Invitation',
icon: 'social-yen',
component: Main
},
{ //邀请管理子级菜单
id: 207,
path: '/InvitationRecord',
icon: 'social-yen',
component: resolve => {
require(['@/views/invitation/InvitationRecord.vue'], resolve)
}
},
{ //注册送币配置一级菜单
id: 208,
path: '/registerGiftIndex',
icon: "social-yen",
component: Main
},
{ //注册送币审核
id: 204,
path: '/registerEximineGift',
icon: "social-yen",
component: resolve => {
require(['@/views/rejisterGift/examine.vue'], resolve)
}
},
{ //注册送币配置二级菜单
id: 205,
path: '/registerGift',
icon: "social-yen",
component: resolve => {
require(['@/views/rejisterGift/index.vue'], resolve)
}
},
{
id: 208,
path: '/registerGift',
icon: "social-yen",
component: resolve => {
require(['@/views/rejisterGift/index.vue'], resolve)
}
},
{
id: 93,
path: '/finance',
icon: 'calculator',
component: Main
},
{
id: 18,
path: '/content',
icon: 'folder',
component: Main
},
{
id: 177,
path: '/businessAuth',
icon: 'cash',
component: Main
},
{
id: 13,
path: 'memberaudit',
icon: 'ios-person',
component: resolve => {
require(['@/views/member/Authenticate.vue'], resolve)
}
},
{
id: 203,
path: 'memberIntegral',
icon: 'ios-person',
component: resolve => {
require(['@/views/member/Integral.vue'], resolve)
}
},
{
id: 196,
path: "/integar",
icon: "ios-person",
component: resolve => {
require(['@/views/system/Integral.vue'], resolve)
}
},
{
id: 23,
path: 'coin',
icon: 'social-yen',
component: resolve => {
require(['@/views/system/Coin.vue'], resolve)
}
},
{
id: 94,
path: 'userwithdrawals',
icon: 'cash',
component: resolve => {
require(['@/views/finance/WithdrawalsExamine.vue'], resolve)
}
},
{
id: 9,
path: 'advertise',
icon: 'ios-keypad',
component: resolve => {
require(['@/views/content/AddAdvertisement.vue'], resolve)
}
},
{
id: 10,
path: 'helpManage',
icon: 'ios-keypad',
component: resolve => {
require(['@/views/content/helpManage.vue'], resolve)
}
},
{
id: 26,
path: 'announcemanage',
icon: 'ios-keypad',
component: resolve => {
require(['@/views/content/AnnounceManage.vue'], resolve)
}
},
{
id: 12,
path: 'membermanage',
icon: 'ios-person',
component: resolve => {
require(['@/views/member/MemberManage.vue'], resolve)
}
},
{
id: 19,
path: 'tradedetail',
icon: 'cash',
component: resolve => {
require(['@/views/finance/TradeDetail.vue'], resolve)
}
},
{
id: 131,
path: 'changecoindetail',
icon: 'cash',
component: resolve => {
require(['@/views/finance/ChargeCoinDetail.vue'], resolve)
}
},
{
id: 95,
path: 'feemanage',
icon: 'cash',
component: resolve => {
require(['@/views/finance/FeeManage.vue'], resolve)
}
},
{
id: 4,
path: 'departmanage',
icon: 'clipboard',
component: resolve => {
require(['@/views/system/Department.vue'], resolve)
}
},
{
id: 2,
path: 'rolemanage',
icon: 'clipboard',
component: resolve => {
require(['@/views/system/Role.vue'], resolve)
}
},
{
id: 62,
path: 'bborder',
icon: 'clipboard',
component: resolve => {
require(['@/views/exchange/Order.vue'], resolve)
}
},
{
id: 103,
path: 'bbsetting',
icon: 'clipboard',
component: resolve => {
require(['@/views/exchange/Setting.vue'], resolve)
}
},
{
id: 238,
path: 'bbrobot',
icon: 'clipboard',
component: resolve => {
require(['@/views/exchange/Robot.vue'], resolve)
}
},
{
id: 184,
path: 'businessaudit',
icon: 'clipboard',
component: resolve => {
require(['@/views/otc/BusinessAudit.vue'], resolve)
}
},
{
id: 111,
path: 'permission',
icon: 'clipboard',
component: resolve => {
require(['@/views/system/Permission.vue'], resolve)
}
},
{
id: 91,
path: 'memberasset',
icon: 'clipboard',
component: resolve => {
require(['@/views/member/MemberAsset.vue'], resolve)
}
},
{
id: 3,
path: 'employee',
icon: 'clipboard',
component: resolve => {
require(['@/views/system/Employee.vue'], resolve)
}
},
{
id: 7,
path: 'accesslog',
icon: 'clipboard',
component: resolve => {
require(['@/views/system/AccessLog.vue'], resolve)
}
},
{
id: 83,
path: 'coinManage',
icon: 'social-yen',
component: resolve => {
require(['@/views/otc/CoinManage.vue'], resolve)
}
},
{
id: 70,
path: 'adManage',
icon: 'clipboard',
component: resolve => {
require(['@/views/otc/AdManage.vue'], resolve)
}
},
{
id: 182,
path: 'cancelapply',
icon: 'clipboard',
component: resolve => {
require(['@/views/otc/ExitBond.vue'], resolve)
}
},
{
id: 77,
path: 'orderManage',
icon: 'clipboard',
component: resolve => {
require(['@/views/otc/OrderManage.vue'], resolve)
}
},
{
id: 72,
path: 'appealManage',
icon: 'clipboard',
component: resolve => {
require(['@/views/otc/AppealManage.vue'], resolve)
}
},
{
id: 159,
path: 'otcdetail',
icon: 'clipboard',
component: resolve => {
require(['@/views/finance/OtcDetail.vue'], resolve)
}
},
{
id: 160,
path: 'withdrawdetail',
icon: 'clipboard',
component: resolve => {
require(['@/views/finance/WithdrawDetail.vue'], resolve)
}
},
{
id: 147,
path: 'dictionary',
icon: 'clipboard',
component: resolve => {
require(['@/views/system/Dictionary.vue'], resolve)
}
},
{
id: 171,
path: 'statistic',
icon: 'clipboard',
component: resolve => {
require(['@/views/finance/FinanceStatistic.vue'], resolve)
}
},
{
id: 178,
path: 'manage',
icon: 'clipboard',
component: resolve => {
require(['@/views/bond/BondManage.vue'], resolve)
}
},
]
let sidebarArr = JSON.parse(getStore('leftSidebarList')) || [];
let userDefinedIDArr = [];
findSlideArr.forEach(item => {
userDefinedIDArr.push(item.id);
})
let arr = [];
sidebarArr.forEach((item, index) => {
if (!userDefinedIDArr.includes(item.id)) {
delete sidebarArr[index];
}
})
let formateUndefinedArr = [];
sidebarArr.forEach(item => {
formateUndefinedArr.push(item);
})
if (formateUndefinedArr.length > 0) {
formateUndefinedArr.forEach(item => {
let index = userDefinedIDArr.indexOf(item.id);
item.path = findSlideArr[index].path;
item.icon = findSlideArr[index].icon;
item.perChildren = [...item.subMenu];
item.children = [];
item.component = Main
if (item.perChildren.length > 0) {
item.perChildren.forEach((it, index) => {
let subIndex = userDefinedIDArr.indexOf(it.id);
if (subIndex !== -1) {
it.icon = findSlideArr[subIndex].icon;
it.path = findSlideArr[subIndex].path;
it.component = findSlideArr[subIndex].component;
} else {
delete item.perChildren[index]
}
})
item.perChildren.forEach(it => {
item.children.push(it);
})
}
})
console.log(formateUndefinedArr);
}
export let appRouter = formateUndefinedArr;
export const clearAppRouter = () => {
appRouter = [];
}
// 所有上面定义的路由都要写在下面的routers里
export const routers = [
loginRouter,
otherRouter,
locking,
...appRouter,
page500,
page403,
page404
];
\ No newline at end of file
此差异已折叠。
import axios from 'axios'
import qs from 'qs'
export const BASEURL = axios.defaults.baseURL = 'http://admin.ztuo.fcoincn.com:6010';
//export const BASEURL = axios.defaults.baseURL = 'https://manager.coinmany.com';
// export const BASEURL = axios.defaults.baseURL = 'http://39.100.79.158:9090/';
export const fetch = (url, params = {}) => {
return new Promise((resolve, reject) => {
axios.get(url, {
params: params
})
.then(response => {
resolve(response.data);
})
.catch(err => {
reject(err);
})
})
}
export const post = (url, data = {}) => {
return new Promise((resolve, reject) => {
axios.post(url, qs.stringify(data, { arrayFormat: 'repeat' }))
.then(response => {
resolve(response.data)
})
.catch(err => {
reject(err);
})
})
}
export const patch = (url, data = {}) => {
return new Promise((resolve, reject) => {
axios.patch(url, qs.stringify(data, { arrayFormat: 'repeat' }))
.then(response => {
resolve(response.data)
})
.catch(err => {
reject(err);
})
})
}
export const put = (url, data = {}) => {
return new Promise((resolve, reject) => {
axios.put(url, qs.stringify(data))
.then(response => {
resolve(response.data)
})
.catch(err => {
reject(err);
})
})
}
export const postConfig = (url, data = {}, config) => {
return new Promise((resolve, reject) => {
axios.post(url, data, config)
.then(response => {
resolve(response.data)
})
.catch(err => {
reject(err);
})
})
}
\ No newline at end of file
<template>
<span class="color-picker-options">
<span v-for='(color, index) in colors' data-light="light" class="ql-picker-item ql-primary" :data-value="color" v-bind:style="{backgroundColor: color}" v-on:click='handleColorClick(index)' v-on:mouseover='handleColorHover(index)' v-bind:title='names[index]'>
</span>
<input type="text" class="color-input" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" maxlength="6" v-model='selectColor'>
</span>
</template>
<script type="text/javascript">
// import tippy from '../../node_modules/tippy.js/dist/tippy.min.js'
export default {
name: 'ColorPicker',
data () {
return {
selectColor: '#ffffff',
names: ['', '漆黑', '', '', '', '葱绿', '湖蓝', '天色', '', '白练', '', '', '薄卵', '蒸栗', '白绿', '蓝白', '天空', '紫水晶', '白鼠', '', '甚三红', '雄黄', '金子', '薄青', '白群', '薄花', '紫苑', '灰青', '石墨', '红绯', '红金', '枯茶', '绿青', '浅葱', '薄缥', '紫霞', '薄钝', '', '朱绯', '', '黑茶', '深绿', '苍蓝', '琉璃', '葡萄'],
colors: ['#ffffff', '#0d0015', '#fe2c23', '#ff9900', '#ffd900', '#a3e043', '#37d9f0', '#4da8ee', '#aa17d0', '#f3f3f1', '#949494', '#fcdbd6', '#fde9d0', '#fff0cf', '#d4e9d6', '#def3f3', '#cee0ef', '#dfdbec', '#dcdedd', '#595856', '#ee837d', '#f8c387', '#e6b322', '#9abd9d', '#83ccd2', '#89b0ce', '#9389b1', '#c1c6ca', '#41464b', '#d51228', '#cf770b', '#8d634a', '#557b5c', '#01a3b0', '#3776a6', '#765c83', '#adadad', '#2b2b2b', '#a91913', '#884702', '#563725', '#00552e', '#00767a', '#194e77', '#530e6f']
}
},
props: ['ColorPickerClick'],
methods: {
handleColorHover (index) {
this.selectColor = this.colors[index]
// tippy(document.querySelectorAll('.color-picker-options span')[index])
},
handleColorClick (index) {
this.selectColor = this.colors[index]
this.ColorPickerClick(this.selectColor)
}
}
}
</script>
<style type="text/css">
.color-picker-options {
width: 200px;
text-align: justify;
padding: 10px 10px 12px;
border-radius: 2px;
position: absolute;
left: -80px;
box-shadow: 0 1px 2px #ccc;
background-color: #fff;
margin-top: 10px;
}
.ql-picker-item {
border: 1px solid transparent;
float: left;
height: 16px;
margin: 2px;
padding: 0;
width: 16px;
cursor: pointer;
/*position: relative;*/
}
.color-name-tip {
/*background-color: transparent;*/
/* position: absolute;
z-index: 2;
display: flex;
background-color: #000;
color: #fff;*/
}
input {
outline: none;
}
</style>
<template>
<div class="font-size-picker-options">
<ul>
<li v-for='(size, index) in sizes' v-on:click='handleFontSizeClick(size, index)' v-bind:class="{fontSizeActive: fontSize === size}">{{size}}</li>
</ul>
</div>
</template>
<script type="text/javascript">
export default {
name: 'FontSizePicker',
data () {
return {
sizes: [10, 13, 16, 18, 24, 32, 48],
fontSize: 16
}
},
props: ['FontSizePickerClick'],
methods: {
handleFontSizeClick (size, index) {
this.fontSize = size
this.FontSizePickerClick(size, index)
}
}
}
</script>
<style type="text/css">
.font-size-picker-options {
width: 60px;
text-align: justify;
padding: 5px 0px;
border-radius: 2px;
position: absolute;
box-shadow: 0 1px 2px #ccc;
background-color: #fff;
margin-top: 10px;
text-align: center;
}
.font-size-picker-options ul {
list-style: none;
padding: 0px;
margin: 0px;
font-size: 14px;
color: #333;
}
.font-size-picker-options ul li {
padding: 5px;
transition: all 0.3s;
}
.font-size-picker-options ul li:hover, .fontSizeActive {
background-color: #E5E5E5;
}
</style>
<template>
<div class="insert-options-items">
<ul>
<li v-for='(key, index) in names' @click='insertClick(key, index)'>
<input
v-if='index === 0'
id="images_upload"
ref="input"
type="file"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"
multiple="multiple"
@change="handleFileChange"
/>
<img :src='icons[key]' :class='key'></img>
<span>{{labels[index]}}</span>
</li>
</ul>
</div>
</template>
<script type="text/javascript">
import icons from './icons.js'
export default {
name: 'Insert',
data () {
return {
icons: icons,
labels: ['图片', '分割线'],
// labels: ['图片', '分割线', '视频', '代码块'],
// names: ['insertImage', 'insertLine', 'insertVideo', 'insertBlock']
names: ['insertImage', 'insertLine']
}
},
props: ['insertImageClick', 'insertLink', 'insertLine', 'insertVideo', 'insertBlock', 'uploadImages'],
methods: {
handleFileChange () {
let input = this.$refs.input[0]
let files = input.files
this.uploadImages(files)
},
insertClick (key, index) {
if (this[key]) {
this[key]()
}
}
},
watch: {
textareaInner(newVal, oldVal) {
console.log(newVal);
console.log(oldVal);
}
}
}
</script>
<style type="text/css">
.insert-options-items {
width: 120px;
padding: 5px 0px;
border-radius: 2px;
position: absolute;
box-shadow: 0 1px 2px #ccc;
background-color: #fff;
margin-top: 35px;
text-align: left;
z-index: 3;
}
.insert-options-items ul {
list-style: none;
padding: 0;
margin: 0;
}
.insert-options-items ul li {
padding: 5px 20px;
color: #333;
font-size: 12px;
position: relative;
cursor: pointer;
display: flex;
align-items: center;
}
.insert-options-items ul li:hover, .insertActive {
background-color: #E5E5E5;
}
.insert-options-items img {
width: 20px;
height: 20px;
top: 1px;
position: relative;
margin-right: 15px;
}
.insert-options-items #images_upload {
position: absolute;
z-index: 2;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
</style>
<template>
<div class="insert-link">
<div class="insert-link-box">
<span class="cancel" @click='cancelClick'>X</span>
<p>插入链接</p>
<input type="text" name="text" placeholder="链接文本" v-model='text' v-on:keyup.enter='conformClick'>
<input type="text" name="link" placeholder="链接地址" v-model='link'>
<button @click='conformClick'> 确认</button>
</div>
</div>
</template>
<script type="text/javascript">
export default {
name: 'InsertLink',
data () {
return {
link: '',
text: ''
}
},
props: ['insertLink', 'cancel', 'propText'],
methods: {
conformClick () {
this.insertLink(this.link, this.text)
},
cancelClick () {
this.cancel()
}
},
watch: {
'propText': function () {
this.text = this.propText
this.link = this.propLink
}
}
}
</script>
<style type="text/css">
.insert-link {
position: fixed;
top: 0px;
left: 0;
background-color: rgba(255, 255, 255, 1);
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
}
.insert-link-box {
position: relative;
padding: 30px 20px;
border-radius: 6px;
margin: 0 auto 24px;
background-clip: padding-box;
box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.insert-link p {
text-align: center;
padding: 20px 0px;
font-size: 25px;
}
.insert-link input {
text-align: left;
margin: 5px 0px;
border: 1px solid rgb(200,200,200);
font-size: 14px;
padding: 10px 5px;
width: calc(100% - 20px);
}
.insert-link button {
outline: none;
cursor: pointer;
margin-left: calc(50% - 40px);
margin-top: 10px;
width: 80px;
height: 40px;
border: none;
text-align: center;
color: #898989;
background-color: #fff;
font-size: 15px;
border-radius: 1px;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-webkit-transition: all .2s ease-in;
-moz-transition: all .2s ease-in;
transition: all .2s ease-in;
-webkit-box-shadow: 0 2px 8px hsla(0,0%,70%,.8);
-moz-box-shadow: 0 2px 8px hsla(0,0%,70%,.8);
-ms-box-shadow: 0 2px 8px hsla(0,0%,70%,.8);
-o-box-shadow: 0 2px 8px hsla(0,0%,70%,.8);
box-shadow: 1px 2px 8px hsla(0,0%,70%,.8);
transition-property: right;
transition: all 0.3s;
}
.insert-link .cancel {
position: absolute;
top: 10px;
right: 10px;
z-index: 2;
font-size: 20px;
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
cursor: pointer;
}
</style>
<template>
<div class="insert-video">
<div class="insert-video-box">
<span class="cancel" @click='cancelClick'>X</span>
<p>插入视频</p>
<input type="text" name="text" placeholder="复制通用代码 <iframe src='...'></iframe>" v-model='text' v-on:keyup.enter='conformClick'>
<button @click='conformClick'> 确认</button>
</div>
</div>
</template>
<script type="text/javascript">
export default {
name: 'InsertVideo',
data () {
return {
text: ''
}
},
props: ['insertVideo', 'cancel'],
methods: {
conformClick () {
this.insertVideo(this.text)
},
cancelClick () {
this.cancel()
}
},
mounted () {
document.querySelector('.insert-video-box input').focus()
}
}
</script>
<style type="text/css">
.insert-video {
position: fixed;
top: 0;
left: 0;
background-color: rgba(255, 255, 255, 1);
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.insert-video-box {
position: relative;
padding: 30px 20px;
border-radius: 6px;
margin: 0 auto 24px;
background-clip: padding-box;
box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.insert-video p {
text-align: center;
padding: 20px 0px;
font-size: 25px;
}
.insert-video input {
text-align: left;
margin: 5px 0px;
border: 1px solid rgb(200,200,200);
font-size: 14px;
padding: 10px 5px;
width: calc(100% - 10px);
}
.insert-video button {
outline: none;
cursor: pointer;
margin-left: calc(50% - 40px);
margin-top: 10px;
width: 80px;
height: 40px;
border: none;
text-align: center;
color: #898989;
background-color: #fff;
font-size: 15px;
border-radius: 1px;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-webkit-transition: all .2s ease-in;
-moz-transition: all .2s ease-in;
transition: all .2s ease-in;
-webkit-box-shadow: 0 2px 8px hsla(0,0%,70%,.8);
-moz-box-shadow: 0 2px 8px hsla(0,0%,70%,.8);
-ms-box-shadow: 0 2px 8px hsla(0,0%,70%,.8);
-o-box-shadow: 0 2px 8px hsla(0,0%,70%,.8);
box-shadow: 1px 2px 8px hsla(0,0%,70%,.8);
transition-property: right;
transition: all 0.3s;
}
.insert-video .cancel {
position: absolute;
top: 10px;
right: 10px;
z-index: 2;
font-size: 20px;
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
cursor: pointer;
}
</style>
此差异已折叠。
<template>
<div class="title-options">
<ul>
<li v-for='(size, index) in sizes' v-on:click.stop='handleFontSizeClick(size, index)' v-bind:class="{fontSizeActive: current === size}">
<div v-html='getHtml(size, index)'></div>
</li>
</ul>
</div>
</template>
<script type="text/javascript">
export default {
name: 'FontSizePicker',
data () {
return {
sizes: ['H1', 'H2', 'H3', 'H4', 'H5', '正文'],
current: '正文'
}
},
props: ['titlePickerClick'],
methods: {
getHtml (size, index) {
if (index === this.sizes.length - 1) {
return size
}
return `<${size}>${size}</${size}>`
},
handleFontSizeClick (size, index) {
this.current = size
this.titlePickerClick(size, index)
}
}
}
</script>
<style type="text/css">
.title-options {
width: 60px;
text-align: justify;
padding: 5px 0px;
border-radius: 2px;
position: absolute;
box-shadow: 0 1px 2px #ccc;
background-color: #fff;
margin-top: 10px;
text-align: center;
margin-left: -15px;
}
.title-options ul {
list-style: none;
padding: 0px;
margin: 0px;
font-size: 14px;
color: #333;
}
.title-options ul li {
padding: 5px;
transition: all 0.3s;
}
.title-options ul li:hover, .fontSizeActive {
background-color: #E5E5E5;
}
.title-options h1,
.title-options h2,
.title-options h3,
.title-options h4,
.title-options h5 {
margin: 0px;
}
</style>
const qiniu = (name) => {
return `https://om4m02471.qnssl.com/2018/editor/${name}.svg?2`
}
const names = ['bold', 'italic', 'underline', 'strikethrough', 'color', 'listOrdered', 'listUnordered', 'listCheck', 'indent', 'outdent', 'alignLeft', 'alignCenter', 'alignRight', 'undo', 'redo', 'removeFormat', 'insertVideo', 'insertLink', 'insertImage', 'insertLine', 'insertQuote', 'insertBlock']
const icons = {}
names.forEach(name => {
icons[name] = qiniu(name.toLowerCase())
})
export default icons
import Vue from 'vue';
import Vuex from 'vuex';
import app from './modules/app';
import user from './modules/user';
Vue.use(Vuex);
const store = new Vuex.Store({
state: {
//
},
mutations: {
//
},
actions: {
},
modules: {
app,
user
}
});
export default store;
import { otherRouter, appRouter } from '@/router/router';
import myhome from '@/views/home/home.vue';
import { setStore, getStore, removeStore } from "@/config/storage.js"
import Util from '@/libs/util';
import Cookies from 'js-cookie';
import Vue from 'vue';
const app = {
state: {
maskLayer: true,
cachePage: [],
lang: '',
isFullScreen: false,
openedSubmenuArr: [], // 要展开的菜单数组
menuTheme: 'dark', // 主题
themeColor: '',
pageOpenedList: [{
title: '首页',
path: '',
name: 'home_index'
}],
currentPageName: '',
currentPath: [{
title: '首页',
path: '',
name: 'home_index'
}], // 面包屑数组
menuList: [],
datas: [],
permissionData: {},
routers: [
otherRouter,
...appRouter
],
tagsList: [...otherRouter.children],
messageCount: 0,
dontCache: ['artical-publish'] // 在这里定义你不想要缓存的页面的name属性值(参见路由配置router.js)
},
mutations: {
// mutations里面注册时间 type为方法名字,触发该函数的方法为commit
switchMaskLayer(state, bol) {
state.maskLayer = bol;
},
updatePermission(state, data) {
state.permissionData = data;
},
setTagsList(state, list) {
state.tagsList.push(...list);
},
updateMenulist(state) {
state.menuList = appRouter;
},
clearMenulist(state) {
state.menuList = [];
},
changeMenuTheme(state, theme) {
state.menuTheme = theme;
},
changeMainTheme(state, mainTheme) {
state.themeColor = mainTheme;
},
resetOpenSubmenu(state, arr) {
state.openedSubmenuArr = arr;
},
addOpenSubmenu(state, name) {
let isEmpty = false;
if (name.length === 0) {
isEmpty = true;
}
if (!isEmpty) {
state.openedSubmenuArr.push(name);
}
state.openedSubmenuArr = [...new Set(state.openedSubmenuArr)];
},
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;
},
setAvator(state, path) {
localStorage.avatorImgPath = path;
},
switchLang(state, lang) {
state.lang = lang;
Vue.config.lang = lang;
},
clearOpenedSubmenu(state) {
debugger;
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;
\ No newline at end of file
import Cookies from 'js-cookie';
const user = {
state: {
pageLoading: false,
memberCheckMask: false,
videoCheckMask: false,
memberCheckImgInfo: {},
memberVideoInfo: {},
date: '',
businessCheckMask: false,
businessCheckInfo: {},
},
mutations: {
logout(state, vm) {
Cookies.remove('user');
Cookies.remove('password');
Cookies.remove('access');
// 恢复默认样式
let themeLink = document.querySelector('link[name="theme"]');
themeLink.setAttribute('href', '');
// 清空打开的页面等数据,但是保存主题数据
let theme = '';
if (localStorage.theme) {
theme = localStorage.theme;
}
localStorage.clear();
if (theme) {
localStorage.theme = theme;
}
},
switchBusinessMask(state, bol) {
state.businessCheckMask = bol;
},
switchLoading(state, bol) {
state.pageLoading = bol;
},
switchMemberMask(state, bol) {
state.memberCheckMask = bol;
},
switchVideoMask(state, bol) {
state.videoCheckMask = bol;
},
businessCheckInfo(state, obj) {
state.businessCheckInfo = obj;
},
memeberCheckImg(state, obj) {
state.memberCheckImgInfo = obj;
},
memberCheckVideo(state, obj) {
state.memberVideoInfo = obj;
},
changeDate(state, str) {
state.date = str;
}
}
};
export default user;
\ No newline at end of file
此差异已折叠。
此差异已折叠。
.demo-spin-icon-load{
animation: ani-demo-spin 1s linear infinite;
}
@keyframes ani-demo-spin {
from { transform: rotate(0deg);}
50% { transform: rotate(180deg);}
to { transform: rotate(360deg);}
}
\ No newline at end of file
.errorFormatBorder {
.ivu-input{
border-color: #ed3f14a6;
box-shadow: 0 0 2px 1px #ed3f14a6;
}
}
.resetRequired{
&>.ivu-form-item-label:before{
content: "*";
display: inline-block;
margin-right: 4px;
line-height: 1;
font-family: SimSun;
font-size: 12px;
color: #ed3f14;
}
}
.resetFromErr {
.ivu-input{
border: 1px solid #ed3f14;
}
}
.resetFromErr {
.ivu-input:focus{
border-color: #ed3f14;
outline: 0;
box-shadow: 0 0 0 2px rgba(237, 63, 20, .2);
}
}
/* 不显示用户名、密码 输入框logo */
.ivu-input {
background-image: unset !important;
}
/* form内单行显示自定义input 编辑投票 */
.formLine {
&>.ivu-form-item-label {
width: 90px !important;
}
}
.formLine{
&>.ivu-form-item-content {
margin-left: 90px !important;
}
}
/* 用户管理 添加角色路由*/
.mainEmployeeContent {
&>.ivu-form-item-content {
padding-right: 60px !important;
}
}
/*
认证商家详情页
*/
.businessDetail{
.ivu-spin-main{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>管理后台</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link rel="stylesheet" href="<%= htmlWebpackPlugin.files.css[0] %>">
<link rel="stylesheet" name="theme" href="">
<link rel="shortcut icon" href="/dist/favicon.ico" type="image/x-icon">
</head>
<body>
<div id="app"></div>
<div class="lock-screen-back" id="lock_screen_back"></div>
<script type="text/javascript" src="<%= htmlWebpackPlugin.files.js[0] %>"></script>
<script type="text/javascript" src="<%= htmlWebpackPlugin.files.js[1] %>"></script>
<script type="text/javascript" src="<%= htmlWebpackPlugin.files.js[2] %>"></script>
</body>
</html>
\ No newline at end of file
import Vue from 'vue';
import iView from 'iview';
import VueRouter from 'vue-router';
import Vuex from 'vuex';
import axios from 'axios';
// import echarts from 'echarts';
import Cookies from 'js-cookie';
import clipboard from 'clipboard';
import html2canvas from 'html2canvas';
import rasterizehtml from 'rasterizehtml';
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
@keyframes error403animation {
0% {
transform: rotateZ(0deg);
}
40% {
transform: rotateZ(-20deg);
}
45% {
transform: rotateZ(-15deg);
}
50% {
transform: rotateZ(-20deg);
}
55% {
transform: rotateZ(-15deg);
}
60% {
transform: rotateZ(-20deg);
}
100% {
transform: rotateZ(0deg);
}
}
.error403{
&-body-con{
width: 700px;
height: 500px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
&-title{
text-align: center;
font-size: 240px;
font-weight: 700;
color: #2d8cf0;
height: 260px;
line-height: 260px;
margin-top: 40px;
.error403-0-span{
display: inline-block;
position: relative;
width: 170px;
height: 170px;
border-radius: 50%;
border: 20px solid #ed3f14;
color: #ed3f14;
margin-right: 10px;
i{
display: inline-block;
font-size: 120px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
}
.error403-key-span{
display: inline-block;
position: relative;
width: 100px;
height: 190px;
border-radius: 50%;
margin-right: 10px;
i{
display: inline-block;
font-size: 190px;
position: absolute;
left: 20px;
transform: translate(-50%,-60%);
transform-origin: center bottom;
animation: error403animation 2.8s ease 0s infinite;
}
}
}
&-message{
display: block;
text-align: center;
font-size: 30px;
font-weight: 500;
letter-spacing: 4px;
color: #dddde2;
}
}
&-btn-con{
text-align: center;
padding: 20px 0;
margin-bottom: 40px;
}
}
\ No newline at end of file
<style lang="less">
@import "./403.less";
</style>
<template>
<div class="error403">
<div class="error403-body-con">
<Card>
<div class="error403-body-con-title">4<span class="error403-0-span"><Icon type="android-lock"></Icon></span><span class="error403-key-span"><Icon size="220" type="ios-bolt"></Icon></span></div>
<p class="error403-body-con-message">You don't have permission</p>
<div class="error403-btn-con">
<Button @click="goLogin" size="large" style="width: 200px;" type="text">重新登录</Button>
<Button @click="goHome" size="large" style="width: 200px;margin-left: 40px;" type="primary">返回首页</Button>
</div>
</Card>
</div>
</div>
</template>
<script>
import Cookies from 'js-cookie';
export default {
name: "Error403",
methods: {
goHome() {
this.$router.push({ name: "home_index" });
},
goLogin() {
Cookies.remove('user');
Cookies.remove('userInfo');
Cookies.remove('userPhone');
this.$router.push({
name: "login"
});
}
}
};
</script>
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册