├── src
├── assets
│ ├── teat.pdf
│ ├── logo.png
│ ├── imgs
│ │ ├── demo1.png
│ │ ├── rotate1.jpg
│ │ ├── rotate2.jpg
│ │ ├── rotate3.jpg
│ │ ├── rotate4.jpg
│ │ ├── rotate5.jpg
│ │ ├── logo
│ │ │ ├── logo.png
│ │ │ └── weChat.jpg
│ │ └── home-ad
│ │ │ └── top-ad.jpg
│ └── 保理融资平台注册协议.pdf
├── api
│ └── api.js
├── utils
│ ├── vue-print-nb
│ │ ├── src
│ │ │ ├── index.js
│ │ │ ├── main.js
│ │ │ ├── packages
│ │ │ │ ├── print.js
│ │ │ │ └── printarea.js
│ │ │ └── App.vue
│ │ ├── dist
│ │ │ ├── css
│ │ │ │ └── app.ba09feb9.css
│ │ │ └── js
│ │ │ │ └── app.615a4834.js
│ │ ├── .Archive
│ │ │ └── README.md
│ │ │ │ └── 2019-06-06 22-53-18.md
│ │ ├── package.json
│ │ ├── README.md
│ │ └── components
│ │ │ └── HelloWorld.vue
│ ├── request.js
│ ├── utils.js
│ └── common.js
├── service
│ ├── file.js
│ ├── user.js
│ ├── login.js
│ └── list.js
├── vuex
│ └── store.js
├── permisson.js
├── layout
│ ├── commonLayout.vue
│ ├── components
│ │ ├── copyrightFooter.vue
│ │ ├── sider.vue
│ │ ├── siderItem.vue
│ │ ├── breadcrumb.vue
│ │ └── footer.vue
│ └── index.vue
├── main.js
├── components
│ ├── AdContainer.vue
│ ├── HistoryBussiness.vue
│ ├── HelloWorld.vue
│ ├── ConcatinfoDialog.vue
│ ├── BussinessReqiure.vue
│ ├── DetailDialog.vue
│ ├── BusinessDialog.vue
│ └── Newcap.vue
├── App.vue
├── mixin
│ └── filter.js
├── views
│ ├── business
│ │ ├── message.vue
│ │ ├── partner.vue
│ │ └── cultrue.vue
│ ├── user
│ │ ├── issue.vue
│ │ ├── resume.vue
│ │ ├── photo.vue
│ │ ├── dynamic.vue
│ │ ├── friend.vue
│ │ ├── user.vue
│ │ └── identity.vue
│ └── home
│ │ └── index.vue
└── router
│ ├── index.js
│ └── menu.js
├── config
├── prod.env.js
├── dev.env.js
└── index.js
├── public
├── test1.pdf
├── test2.pdf
├── favicon.ico
└── index.html
├── jsconfig.json
├── mock
├── index.js
├── upload.js
└── list.js
├── babel.config.js
├── .gitignore
├── README.md
├── package.json
└── vue.config.js
/src/assets/teat.pdf:
--------------------------------------------------------------------------------
1 | ggggg
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | MODE_ENV: '"production'
3 | }
--------------------------------------------------------------------------------
/public/test1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/public/test1.pdf
--------------------------------------------------------------------------------
/public/test2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/public/test2.pdf
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/public/favicon.ico
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/src/assets/logo.png
--------------------------------------------------------------------------------
/src/assets/imgs/demo1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/src/assets/imgs/demo1.png
--------------------------------------------------------------------------------
/src/assets/保理融资平台注册协议.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/src/assets/保理融资平台注册协议.pdf
--------------------------------------------------------------------------------
/src/assets/imgs/rotate1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/src/assets/imgs/rotate1.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/rotate2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/src/assets/imgs/rotate2.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/rotate3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/src/assets/imgs/rotate3.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/rotate4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/src/assets/imgs/rotate4.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/rotate5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/src/assets/imgs/rotate5.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/logo/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/src/assets/imgs/logo/logo.png
--------------------------------------------------------------------------------
/src/assets/imgs/logo/weChat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/src/assets/imgs/logo/weChat.jpg
--------------------------------------------------------------------------------
/src/assets/imgs/home-ad/top-ad.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shengbid/genius-home/master/src/assets/imgs/home-ad/top-ad.jpg
--------------------------------------------------------------------------------
/src/api/api.js:
--------------------------------------------------------------------------------
1 | export default {
2 | shareholder: {
3 | addShareHolder: "",
4 | deleteHolder: function(id) {
5 | return `*****/${id}`;
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var prodEnv = require('./prod.env')
3 |
4 | module.exports = merge(prodEnv, {
5 | MODE_ENV: '"development'
6 | })
--------------------------------------------------------------------------------
/src/utils/vue-print-nb/src/index.js:
--------------------------------------------------------------------------------
1 | import Print from './packages/print.js';
2 | Print.install = function(Vue) {
3 | Vue.directive('print', Print);
4 | };
5 |
6 | export default Print;
--------------------------------------------------------------------------------
/src/service/file.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | export const getFileList = () => {
4 | return request({
5 | url: '/get/file/list',
6 | method: 'get'
7 | })
8 | }
--------------------------------------------------------------------------------
/src/utils/vue-print-nb/dist/css/app.ba09feb9.css:
--------------------------------------------------------------------------------
1 | p{color:#00f}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px}
--------------------------------------------------------------------------------
/src/utils/vue-print-nb/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import Print from './index.js'
4 | Vue.config.productionTip = false
5 |
6 | Vue.use(Print);
7 | new Vue({
8 | render: h => h(App),
9 | }).$mount('#app')
10 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": "./",
4 | "paths": {
5 | "@/*": ["src/*"],
6 | "@assets/*": ["src/assets"],
7 | "@comp/*": ["src/components"],
8 | }
9 | },
10 | "exclude": ["node_modules", "dist"]
11 | }
--------------------------------------------------------------------------------
/mock/index.js:
--------------------------------------------------------------------------------
1 | import Mock from 'mockjs'
2 | import list from './list'
3 | import upload from './upload'
4 |
5 | const info = [
6 | ...list,
7 | ...upload
8 | ]
9 |
10 | for (const item of info) {
11 | // 使用正则处理url带参数情况
12 | Mock.mock(new RegExp(item.url), item.type || 'get', item.response)
13 | }
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/app'
4 | ],
5 | plugins: ["@babel/plugin-transform-runtime", "transform-vue-jsx"],
6 | comments: false,
7 | env: {
8 | test: {
9 | presets: ["@babel/preset-env"],
10 | plugins: ["istanbul"]
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw?
22 |
--------------------------------------------------------------------------------
/src/vuex/store.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 |
4 | Vue.use(Vuex)
5 |
6 | const store = new Vuex.Store({
7 | state: {
8 | type: '0'
9 | },
10 | mutations: {
11 | updateType (state, payload) {
12 | state.type = payload.type
13 | }
14 | }
15 | })
16 |
17 | export default store
--------------------------------------------------------------------------------
/src/permisson.js:
--------------------------------------------------------------------------------
1 | import router from './router'
2 | import { isLogin } from '@/utils/utils'
3 |
4 | router.beforeEach((to, from, next) => {
5 | if (to.path !== '/login' && to.path !== '/home' && to.path !== '/') {
6 | if (isLogin()) {
7 | next()
8 | } else {
9 | router.push('login')
10 | }
11 | } else next()
12 | })
--------------------------------------------------------------------------------
/src/service/user.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 获取联系人数据
4 | export const getConcatList = () => {
5 | return request({
6 | url: '/get/main/concat/list',
7 | method: 'get'
8 | })
9 | }
10 |
11 | // 获取商汇数据
12 | export const getIssueInfo = (data) => {
13 | return request({
14 | url: '/get/main/issue/info',
15 | method: 'get',
16 | data
17 | })
18 | }
--------------------------------------------------------------------------------
/src/layout/commonLayout.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
16 |
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | ## clone
3 | ```
4 | git clone https://gitee.com/genius-offical/genius-home.git
5 | ```
6 |
7 | ## Project setup
8 | ```
9 | yarn install 或者 npm i 或者 cnpm i
10 | ```
11 |
12 | ### Compiles and hot-reloads for development
13 | ```
14 | npm run serve
15 | ```
16 |
17 | ### Compiles and minifies for production
18 | ```
19 | npm run build
20 | ```
21 |
22 | ### Lints and fixes files
23 | ```
24 | npm run lint
25 | ```
26 |
27 | ### Customize configuration
28 | See [Configuration Reference](https://cli.vuejs.org/config/).
29 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import ElementUI from 'element-ui';
4 | import 'element-ui/lib/theme-chalk/index.css';
5 | /* 引入公用filter */
6 | import filter from '@/mixin/filter'
7 | import store from './vuex/store'
8 | import router from './router'
9 | import './permisson'
10 | import '../mock'
11 |
12 | Vue.config.productionTip = false
13 | Vue.use(ElementUI)
14 |
15 | Vue.mixin(filter) // 混入公用filter
16 |
17 | new Vue({
18 | render: h => h(App),
19 | router,
20 | store
21 | }).$mount('#app')
22 |
--------------------------------------------------------------------------------
/src/layout/components/copyrightFooter.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | genius
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 |
3 | module.exports = {
4 | build: {
5 | env: require('./prod.env'),
6 | index: path.resolve(__dirname, '../dist/index.html'),
7 | assetsRoot: path.resolve(__dirname, '../dist'),
8 | assetsSubDirectory: 'public',
9 | assetsPublicPath: './',
10 | productionSourceMap: true,
11 | productionGzip: false,
12 | productionGzipExtensions: ['js', 'css'],
13 | bundleAnalyzerReport: process.env.npm_config_report
14 | },
15 | dev: {
16 | env: require('./dev.env'),
17 | port: 8082,
18 | autoOpenBrowser: true,
19 | assetsSubDirectory: 'public',
20 | assetsPublicPath: '/',
21 | proxyTable: {},
22 | cssSourceMap: false
23 | }
24 | }
--------------------------------------------------------------------------------
/src/service/login.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 获取登录广告数据
4 | export const getAdLoginList = (params) => {
5 | return request({
6 | url: '/get/main/adlogin/list',
7 | method: 'get',
8 | params
9 | })
10 | }
11 |
12 | // 注册
13 | export const getRegister = (data) => {
14 | return request({
15 | url: '/TGshUser/saveTGshUser',
16 | method: 'post',
17 | data
18 | })
19 | }
20 |
21 | // 获取验证码
22 | export const getCode = (params) => {
23 | return request({
24 | url: '/email/sendSimpleEmail',
25 | method: 'get',
26 | params
27 | })
28 | }
29 |
30 | // 登陆
31 | export const login = (data) => {
32 | return request({
33 | url: '/TGshUser/login',
34 | method: 'post',
35 | data: {
36 | userAccount: data.email,
37 | userPwd: data.password
38 | }
39 | })
40 | }
41 |
--------------------------------------------------------------------------------
/src/components/AdContainer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
商汇推荐
6 |
7 |
![]()
8 |
9 |
10 |
11 |
12 |
13 |
29 |
30 |
--------------------------------------------------------------------------------
/src/utils/vue-print-nb/.Archive/README.md/2019-06-06 22-53-18.md:
--------------------------------------------------------------------------------
1 | # vue-print-nb
2 |
3 | This is a directive wrapper for printed, Simple, fast, convenient, light.
4 |
5 | ## Install
6 |
7 | #### NPM
8 | ```bash
9 | npm install vue-print-nb --save
10 | ```
11 |
12 | ```javascript
13 | import Print from 'vue-print-nb'
14 |
15 | Vue.use(Print);
16 | ```
17 |
18 |
19 | ## Description
20 |
21 | #### Print the entire page:
22 |
23 | ```
24 |
25 | ```
26 |
27 |
28 | #### Print local range:
29 |
30 | HTML:
31 | ```
32 |
33 |
葫芦娃,葫芦娃
34 |
一根藤上七朵花
35 |
小小树藤是我家 啦啦啦啦
36 |
叮当当咚咚当当 浇不大
37 |
叮当当咚咚当当 是我家
38 |
啦啦啦啦
39 |
...
40 |
41 |
42 |
43 | ```
44 |
45 |
46 | ## License
47 |
48 | [MIT](http://opensource.org/licenses/MIT)
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
13 |
14 |
67 |
--------------------------------------------------------------------------------
/src/service/list.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | export const getClassify = () => {
4 | return request({
5 | url: '/get/classify/list',
6 | method: 'get'
7 | })
8 | }
9 | // 获取平台数据
10 | export const getMainCompanyList = (params) => {
11 | return request({
12 | url: '/TMainPage/listByTMainPage',
13 | method: 'get',
14 | params
15 | })
16 | }
17 | // 获取平台广告数据
18 | export const getAdList = (params) => {
19 | return request({
20 | url: '/get/main/ad/list',
21 | method: 'get',
22 | params
23 | })
24 | }
25 | // 获取动态数据
26 | export const getDynamicList = (params) => {
27 | return request({
28 | url: '/get/main/dynamic/list',
29 | method: 'get',
30 | params
31 | })
32 | }
33 | // 获取聊天数据
34 | export const getMessageList = (params) => {
35 | return request({
36 | url: '/get/main/message/list',
37 | method: 'get',
38 | params
39 | })
40 | }
41 | // 获取留言数据
42 | export const getNoteList = (params) => {
43 | return request({
44 | url: '/get/main/note/list',
45 | method: 'get',
46 | params
47 | })
48 | }
--------------------------------------------------------------------------------
/src/mixin/filter.js:
--------------------------------------------------------------------------------
1 | /* 公用的filter集合,使用mixin的方式 */
2 | import common from '@/utils/common'
3 |
4 | export default {
5 | filters: {
6 | // 格式化金钱
7 | formatUSD (val, currency) {
8 | return common.formatUSD(val, currency)
9 | },
10 |
11 | // 过滤是否为空
12 | isEmptyVal (val) {
13 | return common.isEmptyVal(val)
14 | },
15 |
16 | // 格式化时间
17 | formatYMD (val) {
18 | return common.formatYMD(val)
19 | },
20 |
21 | // 格式化时间
22 | formatDate (val) {
23 | return common.formatDate(val)
24 | },
25 |
26 | // 格式化数量
27 | formatAmount (val) {
28 | return common.formatAmount(val)
29 | },
30 |
31 | // 格式化数量
32 | formatNumber (val) {
33 | return common.formatAmount(val)
34 | },
35 |
36 | // 处理商圈状态
37 | handleStatus(val) {
38 | let text = ''
39 | switch (val) {
40 | case 0:
41 | text = '有效'
42 | break;
43 | case 1:
44 | text = '加急'
45 | break;
46 | case 2:
47 | text = '失效'
48 | break;
49 |
50 | default:
51 | break;
52 | }
53 | return text
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/utils/request.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 | import { Message } from 'element-ui'
3 | import { getToken } from '@/utils/utils'
4 | import router from '@/router'
5 |
6 | const service = axios.create({
7 | timeout: 5000,
8 | baseURL: '/api'
9 | })
10 |
11 | if (getToken()) {
12 | service.defaults.headers.common['token'] = getToken()
13 | // service.defaults.headers.common['Authorization'] = "Bearer " + getToken()
14 | }
15 |
16 | service.interceptors.request.use(
17 | config => {
18 | return config
19 | },
20 | error => {
21 | Message({
22 | type: 'error',
23 | message: error.message
24 | })
25 | return Promise.reject(error)
26 | }
27 | )
28 |
29 | service.interceptors.response.use(
30 | response => {
31 | const res = response.data
32 | if (res.code === 200) {
33 | return res
34 | } else {
35 | if (res.code === 103) { // 登陆超时
36 | router.push({name: 'Login'})
37 | }
38 | Message({
39 | type: 'error',
40 | message: res.msg
41 | })
42 | return Promise.reject(new Error(res.msg || 'error'))
43 | }
44 | },
45 | error => {
46 | Message({
47 | type: 'error',
48 | message: error.message
49 | })
50 | return Promise.reject(error)
51 | }
52 | )
53 |
54 | export default service
--------------------------------------------------------------------------------
/mock/upload.js:
--------------------------------------------------------------------------------
1 | import Mock from 'mockjs'
2 | const Random = Mock.Random
3 |
4 | export default [
5 | {
6 | url: '/upload/file',
7 | type: 'post',
8 | response: () => {
9 | const color = Random.color()
10 | const text = Random.word(4, 10)
11 | return {
12 | code: 200,
13 | message: 'success',
14 | data: {
15 | file: Random.image('400x300', color, '#FFF', text),
16 | }
17 | }
18 | }
19 | },
20 | {
21 | url: '/get/file/list',
22 | type: 'get',
23 | response: () => {
24 | const color = Random.color()
25 | const text = Random.word(4, 10)
26 | const data = {
27 | processList: []
28 | }
29 | for (let i = 1; i < 5; i++) {
30 | const item = {
31 | id: Random.id(),
32 | title: '流程' + i,
33 | fileList: []
34 | }
35 | if (i === 3) {
36 | item.fileList = [
37 | {
38 | uid: Random.id(),
39 | name: '测试文件1',
40 | url: Random.image('400x300', color, '#FFF', text),
41 | }
42 | ]
43 | }
44 | data.processList.push(item)
45 | }
46 | return {
47 | code: 200,
48 | message: 'success',
49 | data,
50 | }
51 | }
52 | }
53 | ]
--------------------------------------------------------------------------------
/src/layout/components/sider.vue:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/layout/components/siderItem.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 | {{item.meta.title}}
13 |
14 |
15 |
16 |
17 |
18 | {{item.meta.title}}
19 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
51 |
52 |
--------------------------------------------------------------------------------
/src/utils/vue-print-nb/src/packages/print.js:
--------------------------------------------------------------------------------
1 | import Print from './printarea.js';
2 | /**
3 | * @file 打印
4 | * 指令`v-print`,默认打印整个窗口
5 | * 传入参数`v-print="'#id'"` , 参数为需要打印局部的盒子标识.
6 | */
7 | export default {
8 | directiveName: 'print',
9 | bind(el, binding, vnode) {
10 | let vue = vnode.context;
11 | let closeBtn = true;
12 | let id = '';
13 | el.addEventListener('click', () => {
14 | vue.$nextTick(() => {
15 | if (typeof binding.value === 'string') {
16 | id = binding.value;
17 | } else if (typeof binding.value === 'object' && !!binding.value.id) {
18 | id = binding.value.id;
19 | let ids = id.replace(new RegExp("#", "g"), '');
20 | let elsdom = document.getElementById(ids);
21 | if (!elsdom) console.log("id in Error"), id = '';
22 | }
23 | // 局部打印
24 | if (id) {
25 | localPrint();
26 | } else {
27 | // 直接全局打印
28 | window.print();
29 | }
30 | });
31 |
32 | });
33 | const localPrint = () => {
34 | if (closeBtn) {
35 | closeBtn = false;
36 | new Print({
37 | ids: id, // * 局部打印必传入id
38 | ignoreClass: binding.value.ignoreClass, // 不需要打印内容的class
39 | standard: '', // 文档类型,默认是html5,可选 html5,loose,strict
40 | extraHead: binding.value.extraHead, // 附加在head标签上的额外标签,使用逗号分隔
41 | extraCss: binding.value.extraCss, // 额外的css连接,多个逗号分开
42 | popTitle: binding.value.popTitle, // title的标题
43 | endCallback() { // 调用打印之后的回调事件
44 | closeBtn = true;
45 | binding.value.endCallback && binding.value.endCallback(binding)
46 | }
47 | });
48 | }
49 | };
50 | }
51 | };
--------------------------------------------------------------------------------
/src/utils/utils.js:
--------------------------------------------------------------------------------
1 | const isLogin = () => {
2 | const res = sessionStorage.getItem('login')
3 | return res
4 | }
5 |
6 | // 设置token
7 | const getToken = (name="login") => {
8 | if (document.cookie.length > 0) {
9 | let cStart = document.cookie.indexOf(name + '=')
10 | if (cStart !== -1) {
11 | cStart = cStart + name.length + 1
12 | let cEnd = document.cookie.indexOf(';', cStart)
13 | if (cEnd === -1) cEnd = document.cookie.length
14 | return unescape(document.cookie.substring(cStart, cEnd))
15 | }
16 | }
17 | return ''
18 | }
19 | // 删除cookie
20 | const delToken = (name="login") => {
21 | let exp = new Date()
22 | exp.setTime(exp.getTime() - 1)
23 | var cval = getToken(name)
24 | if (cval !== null) {
25 | document.cookie = name + '=' + cval + ';expires=' + exp.toGMTString() + ';path=/'
26 | }
27 | }
28 | // 设置token
29 | const setToken = (value, name="login") => {
30 | let getValue = getToken()
31 | if (getValue !== null && getValue !== '') {
32 | delToken(name)
33 | }
34 | let exdate = new Date()
35 | let expiredays = 60
36 | exdate.setDate(exdate.getDate() + expiredays)
37 | document.cookie = name + '=' + escape(value) + ((expiredays === null) ? '' : ';expires=' + exdate.toGMTString() + ';path=/')
38 | }
39 |
40 | const isBuyer = () => {
41 | let res = sessionStorage.getItem('login')
42 | if (res && typeof res === 'string') {
43 | res = JSON.parse(res)
44 | }
45 | if (res && res.type === '1') {
46 | return true
47 | }
48 | return false
49 | }
50 |
51 | export {
52 | isLogin,
53 | setToken,
54 | getToken,
55 | delToken,
56 | isBuyer
57 | }
--------------------------------------------------------------------------------
/src/utils/vue-print-nb/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-print-nb",
3 | "version": "1.5.0",
4 | "description": "Vue plug-in, print! Good!",
5 | "main": "lib/tag-textarea.umd.min.js",
6 | "author": "Power-kxLee",
7 | "private": false,
8 | "license": "MIT",
9 | "scripts": {
10 | "serve": "vue-cli-service serve",
11 | "build": "vue-cli-service build",
12 | "lint": "vue-cli-service lint",
13 | "lib": "vue-cli-service build --target lib --name tag-textarea --dest lib src/index.js"
14 | },
15 | "dependencies": {
16 | "core-js": "^2.6.5",
17 | "echarts": "^4.6.0",
18 | "qrcodejs2": "0.0.2",
19 | "vue": "^2.6.10"
20 | },
21 | "devDependencies": {
22 | "@vue/cli-plugin-babel": "^3.8.0",
23 | "@vue/cli-plugin-eslint": "^3.8.0",
24 | "@vue/cli-service": "^3.8.0",
25 | "babel-eslint": "^10.0.1",
26 | "eslint": "^5.16.0",
27 | "eslint-plugin-vue": "^5.0.0",
28 | "vue-template-compiler": "^2.6.10"
29 | },
30 | "eslintConfig": {
31 | "root": true,
32 | "env": {
33 | "node": true
34 | },
35 | "extends": [
36 | "plugin:vue/essential",
37 | "eslint:recommended"
38 | ],
39 | "rules": {},
40 | "parserOptions": {
41 | "parser": "babel-eslint"
42 | }
43 | },
44 | "postcss": {
45 | "plugins": {
46 | "autoprefixer": {}
47 | }
48 | },
49 | "browserslist": [
50 | "> 1%",
51 | "last 2 versions"
52 | ],
53 | "__npminstall_done": "Wed Jul 01 2020 21:27:21 GMT+0800 (GMT+08:00)",
54 | "_from": "vue-print-nb@1.5.0",
55 | "_resolved": "https://registry.npm.taobao.org/vue-print-nb/download/vue-print-nb-1.5.0.tgz"
56 | }
--------------------------------------------------------------------------------
/src/layout/components/breadcrumb.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 首页
4 | {{ item }}
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/components/HistoryBussiness.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
历史商汇
5 |
6 |
7 |
11 |
12 | -
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
65 |
66 |
--------------------------------------------------------------------------------
/src/views/business/message.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
8 |
9 |
![]()
10 |
11 |
12 |
{{ item.name }}
13 |
14 | -
18 |
{{ subitem.time }}
19 | {{ subitem.msg }}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
50 |
51 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-tetris",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "axios": "^0.20.0",
12 | "core-js": "^2.6.5",
13 | "element-ui": "^2.12.0",
14 | "lodash": "^4.17.15",
15 | "vue": "^2.6.10",
16 | "vue-router": "^3.3.2",
17 | "vuex": "^3.6.2"
18 | },
19 | "devDependencies": {
20 | "@babel/plugin-transform-runtime": "^7.5.5",
21 | "@babel/preset-env": "^7.5.5",
22 | "@vue/cli-plugin-babel": "^3.9.0",
23 | "@vue/cli-plugin-eslint": "^3.9.0",
24 | "@vue/cli-service": "^3.9.0",
25 | "babel-eslint": "^10.0.1",
26 | "babel-loader": "^8.0.6",
27 | "babel-plugin-syntax-jsx": "^6.18.0",
28 | "babel-plugin-transform-runtime": "^6.23.0",
29 | "babel-plugin-transform-vue-jsx": "^3.7.0",
30 | "babel-preset-env": "^1.7.0",
31 | "babel-preset-es2015": "^6.24.1",
32 | "babel-preset-stage-2": "^6.24.1",
33 | "css-loader": "^3.0.0",
34 | "eslint": "^5.16.0",
35 | "eslint-plugin-vue": "^5.0.0",
36 | "extract-text-webpack-plugin": "^3.0.2",
37 | "file-loader": "^4.0.0",
38 | "friendly-errors-webpack-plugin": "^1.7.0",
39 | "html-loader": "^0.5.5",
40 | "html-webpack-plugin": "^3.2.0",
41 | "html2canvas": "^1.0.0-rc.5",
42 | "jquery": "^3.4.1",
43 | "less": "^3.10.3",
44 | "less-loader": "^5.0.0",
45 | "mockjs": "^1.1.0",
46 | "open": "^6.4.0",
47 | "optimize-css-assets-webpack-plugin": "^5.0.3",
48 | "url-loader": "^2.0.1",
49 | "vue-template-compiler": "^2.6.10",
50 | "webpack": "^4.35.3",
51 | "webpack-dev-middleware": "^3.7.0",
52 | "webpack-hot-middleware": "^2.25.0",
53 | "webpack-merge": "^4.2.1"
54 | },
55 | "eslintConfig": {
56 | "root": true,
57 | "env": {
58 | "node": true
59 | },
60 | "extends": [
61 | "plugin:vue/essential",
62 | "eslint:recommended"
63 | ],
64 | "rules": {
65 | "no-console": "off"
66 | },
67 | "parserOptions": {
68 | "parser": "babel-eslint"
69 | }
70 | },
71 | "postcss": {
72 | "plugins": {
73 | "autoprefixer": {}
74 | }
75 | },
76 | "browserslist": [
77 | "> 1%",
78 | "last 2 versions"
79 | ]
80 | }
81 |
--------------------------------------------------------------------------------
/src/utils/vue-print-nb/README.md:
--------------------------------------------------------------------------------
1 | # vue-print-nb
2 |
3 | This is a directive wrapper for printed, Simple, fast, convenient, light.
4 |
5 | ## Install
6 |
7 | #### NPM
8 | ```bash
9 | npm install vue-print-nb --save
10 | ```
11 |
12 | ```javascript
13 | import Print from 'vue-print-nb'
14 |
15 | Vue.use(Print);
16 | ```
17 | ## Run demo
18 | Download the project, install dependencies, run demo
19 | ```
20 | npm run serve
21 | -Local: http://localhost:8080/
22 | ```
23 |
24 | ## Description
25 |
26 | #### Print the entire page:
27 |
28 | ```
29 |
30 | ```
31 |
32 |
33 | #### Print local range:
34 |
35 | HTML:
36 | ```
37 |
38 |
葫芦娃,葫芦娃
39 |
一根藤上七朵花
40 |
小小树藤是我家 啦啦啦啦
41 |
叮当当咚咚当当 浇不大
42 |
叮当当咚咚当当 是我家
43 |
啦啦啦啦
44 |
...
45 |
46 |
47 |
48 | ```
49 | Pass in a string type directly
50 | * `id`: ID of local print range
51 |
52 | #### More
53 | HTML:
54 | ```
55 |
56 |
57 |
58 |
葫芦娃,葫芦娃
59 |
一根藤上七朵花
60 |
小小树藤是我家 啦啦啦啦
61 |
叮当当咚咚当当 浇不大
62 |
叮当当咚咚当当 是我家
63 |
啦啦啦啦
64 |
...
65 |
66 | ```
67 | JavaScript:
68 | ```
69 | export default {
70 | data() {
71 | return {
72 | printObj: {
73 | id: "printMe",
74 | popTitle: 'good print',
75 | extraCss: 'https://www.google.com,https://www.google.com',
76 | extraHead: ''
77 | }
78 | };
79 | }
80 | }
81 | ```
82 | You can also pass in an object type `Objcet`
83 |
84 | ### API
85 | * `id`: *requisite Partial printing of the incoming ID
86 | * `standard`: Document type, default is html5, optional `html5`, `loose`, `strict`
87 | * `extraHead`: Additional tags attached to the head tag, separated by commas
88 | * `extraCss`: Additional link connections, separated by commas
89 | * `popTitle`: Title shows the title
90 | * `endCallback()`: Callback events after printing
91 | ## License
92 |
93 | [MIT](http://opensource.org/licenses/MIT)
--------------------------------------------------------------------------------
/src/utils/vue-print-nb/components/HelloWorld.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ msg }}
4 |
5 | For a guide and recipes on how to configure / customize this project,
6 | check out the
7 | vue-cli documentation.
8 |
9 |
Installed CLI Plugins
10 |
14 |
Essential Links
15 |
22 |
Ecosystem
23 |
30 |
31 |
32 |
37 |
45 |
46 |
47 |
63 |
--------------------------------------------------------------------------------
/src/views/business/partner.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{ title }}
7 |
8 |
9 |
10 | -
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
66 |
67 |
--------------------------------------------------------------------------------
/src/components/HelloWorld.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ msg }}
4 |
5 | For a guide and recipes on how to configure / customize this project,
6 | check out the
7 |
8 | vue-cli documentation.
9 |
10 |
Installed CLI Plugins
11 |
15 |
Essential Links
16 |
23 |
Ecosystem
24 |
31 |
32 |
33 |
34 |
35 |
56 |
57 |
58 |
74 |
--------------------------------------------------------------------------------
/src/utils/vue-print-nb/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
17 |
18 |
24 |
25 |
26 |
葫芦娃,葫芦娃
27 |
一根藤上七朵花
28 |
小小树藤是我家 啦啦啦啦
29 |
叮当当咚咚当当 浇不大
30 |
叮当当咚咚当当 是我家
31 |
啦啦啦啦
32 |
...
33 |
34 |
35 |
36 |
41 |
89 |
90 |
100 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 | Vue.use(Router)
5 |
6 | import Layout from '@/layout'
7 | import CommonLayout from '@/layout/commonLayout'
8 |
9 | const constantRoter = [{
10 | path: '/login',
11 | component: () => import('@/views/login'),
12 | name: 'Login',
13 | }, {
14 | path: '/',
15 | component: CommonLayout,
16 | redirect: '/home',
17 | children: [
18 | {
19 | path: 'home',
20 | component: () => import('@/views/home'),
21 | name: 'Home',
22 | meta: { title: '首页', icon: 'el-icon-s-home' }
23 | }
24 | ]
25 | }, {
26 | path: '/user',
27 | component: Layout,
28 | redirect: '/user/home',
29 | children: [
30 | {
31 | path: 'home',
32 | component: () => import('@/views/user/user'),
33 | name: 'User'
34 | },
35 | {
36 | path: 'identity',
37 | component: () => import('@/views/user/identity'),
38 | name: 'Identity'
39 | },
40 | {
41 | path: 'photo',
42 | component: () => import('@/views/user/photo'),
43 | name: 'Photo'
44 | },
45 | {
46 | path: 'resume',
47 | component: () => import('@/views/user/resume'),
48 | name: 'Resume'
49 | },
50 | {
51 | path: 'issue',
52 | component: () => import('@/views/user/issue'),
53 | name: 'Issue'
54 | },
55 | {
56 | path: 'dynamic',
57 | component: () => import('@/views/user/dynamic'),
58 | name: 'Dynamic'
59 | },
60 | {
61 | path: 'friend',
62 | component: () => import('@/views/user/friend'),
63 | name: 'Friend'
64 | },
65 | {
66 | path: 'message',
67 | component: () => import('@/views/business/message'),
68 | name: 'Message1'
69 | }
70 | ]
71 | }, {
72 | path: '/business',
73 | component: Layout,
74 | redirect: '/business/cultrue',
75 | children: [
76 | {
77 | path: 'home',
78 | component: () => import('@/views/user/user'),
79 | name: 'Business'
80 | },
81 | {
82 | path: 'cultrue',
83 | component: () => import('@/views/business/cultrue'),
84 | name: 'Cultrue'
85 | },
86 | {
87 | path: 'partner1',
88 | component: () => import('@/views/business/partner'),
89 | name: 'Partner1'
90 | },
91 | {
92 | path: 'partner',
93 | component: () => import('@/views/business/partner'),
94 | name: 'Partner'
95 | },
96 | {
97 | path: 'message',
98 | component: () => import('@/views/business/message'),
99 | name: 'Message'
100 | },
101 | ]
102 | }
103 | ]
104 |
105 | const router = new Router({
106 | scrollBehavior: () => ({ y: 0 }),
107 | routes: constantRoter
108 | })
109 |
110 | export default router
--------------------------------------------------------------------------------
/src/router/menu.js:
--------------------------------------------------------------------------------
1 |
2 | const getMenus = (type) => {
3 | const isHidden = type === '1'
4 | const menus = [
5 | {
6 | path: '/user/home',
7 | component: 'user/user',
8 | name: 'User',
9 | hidden: isHidden,
10 | meta: { title: '牛人首页', icon: 'el-icon-s-home' }
11 | },
12 | {
13 | path: '/business/home',
14 | component: 'user/user',
15 | name: 'Business',
16 | hidden: !isHidden,
17 | meta: { title: '商户首页', icon: 'el-icon-s-home' }
18 | },
19 | {
20 | path: '/user/identity',
21 | component: 'user/identity',
22 | name: 'Identity',
23 | hidden: false,
24 | meta: { title: '身份认证', icon: 'el-icon-s-custom' }
25 | },
26 | {
27 | path: '/user/issue',
28 | component: 'user/issue',
29 | name: 'Issue',
30 | hidden: false,
31 | meta: { title: '发布商汇', icon: 'el-icon-s-grid' }
32 | },
33 | {
34 | path: '/user/dynamic',
35 | component: 'user/dynamic',
36 | name: 'Dynamic',
37 | hidden: false,
38 | meta: { title: '我的动态', icon: 'el-icon-news' }
39 | },
40 | {
41 | path: '/user/friend',
42 | component: 'user/friend',
43 | name: 'Friend',
44 | hidden: isHidden,
45 | meta: { title: '我的好友', icon: 'el-icon-user-solid' }
46 | },
47 | {
48 | path: '/user/photo',
49 | component: 'user/photo',
50 | name: 'Photo',
51 | hidden: isHidden,
52 | meta: { title: '我的相册', icon: 'el-icon-picture' }
53 | },
54 | {
55 | path: '/user/resume',
56 | component: 'user/resume',
57 | name: 'Resume',
58 | hidden: isHidden,
59 | meta: { title: '我的简历', icon: 'el-icon-tickets' }
60 | },
61 | {
62 | path: '/user/message',
63 | component: 'user/message',
64 | name: 'Message1',
65 | hidden: isHidden,
66 | meta: { title: '我的留言', icon: 'el-icon-chat-line-round' }
67 | },
68 | {
69 | path: '/business/cultrue',
70 | component: '/business/cultrue',
71 | name: 'Cultrue',
72 | hidden: !isHidden,
73 | meta: { title: '企业文化', icon: 'el-icon-s-flag' }
74 | },
75 | {
76 | path: '/business/partner1',
77 | component: '/business/partner',
78 | name: 'Partner1',
79 | hidden: !isHidden,
80 | meta: { title: '合作牛人', icon: 'el-icon-user' }
81 | },
82 | {
83 | path: '/business/partner',
84 | component: '/business/partner',
85 | name: 'Partner',
86 | hidden: !isHidden,
87 | meta: { title: '商业伙伴', icon: 'el-icon-connection' }
88 | },
89 | {
90 | path: '/business/message',
91 | component: '/business/message',
92 | name: 'Message',
93 | hidden: !isHidden,
94 | meta: { title: '商业留言', icon: 'el-icon-chat-line-square' }
95 | }
96 | ]
97 | return menus
98 | }
99 |
100 | export default getMenus
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | const path = require("path");
3 |
4 | module.exports = {
5 | publicPath: "/", // 基本 URL
6 | outputDir: "dist", // 生成的生产环境构建文件的目录
7 | assetsDir: "", // 放置生成的静态资源的 (相对于 outputDir 的) 目录
8 | indexPath: "index.html", // 生成的 index.html 的输出路径
9 | filenameHashing: true, // 文件名hash值,控制缓存
10 | pages: {
11 | index: {
12 | // page 的入口
13 | entry: "src/main.js",
14 | // 模板来源
15 | template: "public/index.html",
16 | // 在 dist/index.html 的输出
17 | filename: "index.html",
18 | // 提取出来的通用 chunk 和 vendor chunk。
19 | chunks: ["chunk-vendors", "chunk-common", "index"]
20 | }
21 | }, // 多页面时配置的对象, 每个"page"应该有一个对应的 JavaScript 入口文件
22 | // lintOnSave: true, // 开发环境下,每次保存时lint检测代码
23 | // https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
24 | runtimeCompiler: false, // 使用运行时编译器的Vue构建版本
25 | transpileDependencies: [], // babel-loader会忽略所有node_modules中的文件, 需要转译时可以一一列出
26 | productionSourceMap: false, // 生产环境是否生成 sourceMap 文件
27 | crossorigin: undefined, // 设置生成的 HTML 中 和
68 |
69 |
--------------------------------------------------------------------------------
/src/components/ConcatinfoDialog.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 | 温馨提示:
12 | 商汇数据仅为了大家方便线下交易,请勿用于其他用途,请遵守平台条约
13 |
14 |
15 | -
16 |
17 |
18 | -
19 | {{ detailForm.name }}
20 |
21 |
22 |
23 | -
24 | 联系电话:
25 | {{ detailForm.tel }}
26 |
27 | -
28 | 联系手机:
29 | {{ detailForm.phone }}
30 |
31 | -
32 | 微信:
33 | {{ detailForm.wechart }}
34 |
35 | -
36 | QQ:
37 | {{ detailForm.qq }}
38 |
39 | -
40 | 邮箱:
41 | {{ detailForm.email }}
42 |
43 |
44 |
45 | -
46 | 微信二维码:
47 |
48 |
![]()
49 |
50 |
51 | -
52 | qq二维码:
53 |
54 |
![]()
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
87 |
88 |
--------------------------------------------------------------------------------
/src/components/BussinessReqiure.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
9 |
10 |
![]()
11 |
12 |
13 |
{{item.name}}
14 |
{{item.text}}
15 |
拉入时间: {{item.time}}
16 |
17 | 发布状态:
18 | {{item.status | handleStatus()}}
22 |
23 |
价格: ¥{{item.price}}
24 |
25 | 信誉度:
26 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
56 |
57 |
--------------------------------------------------------------------------------
/src/views/user/issue.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 我发布的商汇需求
9 |
10 | 发布新商汇需求
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | 描述:
21 | {{ scope.item.detail }}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
36 |
37 |
38 |
39 |
116 |
117 |
--------------------------------------------------------------------------------
/src/layout/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
42 |
43 |
44 |
79 |
80 |
132 |
--------------------------------------------------------------------------------
/src/views/user/resume.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 | -
14 | 姓名:
15 | 张三
16 |
17 | -
18 | 性别:
19 | 女
20 |
21 | -
22 | 联系电话:
23 | 181-5589-6936
24 |
25 | -
26 | 微信号:
27 | 18155896936
28 |
29 | -
30 | QQ:
31 | 589666222
32 |
33 |
34 |
35 |
45 | 上传简历
46 | 文件大小不超过4M
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
116 |
117 |
--------------------------------------------------------------------------------
/src/components/DetailDialog.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 | -
12 |
13 |
14 | -
15 | {{ detailForm.name }}
16 |
17 | -
18 | {{ detailForm.text }}
19 |
20 | -
21 | 报价:{{ detailForm.price }}
22 |
23 |
27 |
28 |
29 | - 附件
30 | -
35 |
36 |
37 |
38 |
39 |
44 |
45 |
46 |
47 |
48 |
125 |
126 |
--------------------------------------------------------------------------------
/src/views/business/cultrue.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
添加链接地址
7 |
8 | 链接地址
9 | {{links.name}}
10 |
11 |
12 |
13 |
14 |
15 |
22 |
23 |
24 |
25 |
30 |
35 |
40 |
41 |
42 |
43 |
44 |
45 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
62 |
63 |
64 |
65 |
66 |
118 |
119 |
--------------------------------------------------------------------------------
/src/views/user/photo.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
129 |
130 |
--------------------------------------------------------------------------------
/mock/list.js:
--------------------------------------------------------------------------------
1 | import Mock from 'mockjs'
2 | const Random = Mock.Random
3 |
4 | export default [
5 | {
6 | url: '/get/classify/list',
7 | type: 'get',
8 | response: () => {
9 | // 创建树形数据
10 | let data = []
11 | // const number = Random.natural(1, 10)
12 | const loop = (data, count = 4, l = 0) => {
13 | const level = l + 1
14 | for (let i = 0; i < count; i++) {
15 | const item = {
16 | id: Random.id(),
17 | level,
18 | name: Random.word(3, 5),
19 | }
20 | if (level >2) {
21 | return
22 | // 方法2
23 | // return data
24 | }
25 |
26 | const number = Mock.mock({
27 | "number|1-10": 6
28 | })
29 | item.children = loop([], number.number, level)
30 |
31 | // 方法2
32 | // const childrens = Mock.mock({
33 | // "array|1-6": [
34 | // "Mock.js"
35 | // ]
36 | // })
37 | // childrens.array.forEach(() => {
38 | // item.childs = []
39 | // const number = Mock.mock({
40 | // "number|1-6": 6
41 | // })
42 | // return loop(item.childs, number.number, level)
43 | // })
44 | data.push(item)
45 | }
46 |
47 | // 方法2不需要return
48 | return data
49 | }
50 | loop(data)
51 | return {
52 | code: 200,
53 | message: 'success',
54 | data,
55 | }
56 | }
57 | },
58 | {
59 | url: '/get/main/company/list',
60 | type: 'get',
61 | response: (config) => {
62 | const count = config.body ? (JSON.parse(config.body)).count : 1
63 | let data = []
64 | for (let i = 0; i < count; i++) {
65 | const obj = {
66 | id: Random.increment(),
67 | name: '科技公司' + i,
68 | text: '设计公司LOGO',
69 | time: Random.date(),
70 | status: Random.natural(0, 2),
71 | price: Random.natural(500, 50000),
72 | logo: Random.image('150x180', Random.color()),
73 | credit: Random.natural(0, 5),
74 | detail: Random.paragraph(1, 3)
75 | }
76 | data.push(obj)
77 | }
78 | return {
79 | code: 200,
80 | message: 'success',
81 | data
82 | }
83 | }
84 | },
85 | {
86 | url: '/get/main/ad/list',
87 | type: 'get',
88 | response: () => {
89 | let data = []
90 | for (let i = 0; i < 5; i++) {
91 | const obj = {
92 | id: Random.increment(),
93 | fileUrl: Random.image('320x220', Random.color(), '广告'),
94 | time: Random.time('HH:mm'),
95 | name: Random.cname(),
96 | message: Random.title()
97 | }
98 | data.push(obj)
99 | }
100 |
101 | return {
102 | code: 200,
103 | message: 'success',
104 | data
105 | }
106 | }
107 | },
108 | {
109 | url: '/get/main/adlogin/list',
110 | type: 'get',
111 | response: () => {
112 | let data = []
113 | for (let i = 0; i < 5; i++) {
114 | const obj = {
115 | id: Random.increment(),
116 | fileUrl: Random.image('900x600', Random.color(), '广告')
117 | }
118 | data.push(obj)
119 | }
120 | return {
121 | code: 200,
122 | message: 'success',
123 | data
124 | }
125 | }
126 | },
127 | {
128 | url: '/get/main/concat/list',
129 | type: 'get',
130 | response: () => {
131 | let data = []
132 | for (let i = 0; i < 7; i++) {
133 | const obj = {
134 | id: Random.increment(),
135 | count: Random.natural(0, 20),
136 | fileUrl: Random.image('190x205', Random.color(), 'user')
137 | }
138 | data.push(obj)
139 | }
140 | return {
141 | code: 200,
142 | message: 'success',
143 | data
144 | }
145 | }
146 | },
147 | {
148 | url: '/get/main/dynamic/list',
149 | type: 'get',
150 | response: () => {
151 | let data = []
152 | for (let i = 0; i < 7; i++) {
153 | const obj = {
154 | id: Random.increment(),
155 | star: Random.natural(0, 20),
156 | comment: Random.word(3, 5),
157 | text: Random.title(5, 10),
158 | time: Random.datetime(),
159 | fileList: loop()
160 | }
161 | data.push(obj)
162 | }
163 |
164 | function loop() {
165 | let arr = []
166 | for (let i = 0; i < Random.natural(1, 9); i++) {
167 | const element = {
168 | id: Random.increment(),
169 | fileUrl: Random.image('150x180', Random.color(), 'user')
170 | }
171 | arr.push(element)
172 | }
173 | return arr
174 | }
175 | return {
176 | code: 200,
177 | message: 'success',
178 | data
179 | }
180 | }
181 | },
182 | {
183 | url: '/get/main/message/list',
184 | type: 'get',
185 | response: () => {
186 | let data = []
187 | for (let i = 0; i < Random.natural(3, 15); i++) {
188 | const element = {
189 | id: Random.increment(),
190 | user: loop2(1),
191 | fuser: loop2(2)
192 | }
193 | data.push(element)
194 | }
195 |
196 | function loop2(type) {
197 | let arr = []
198 | for (let i = 0; i < Random.natural(0, 5); i++) {
199 | const element = {
200 | id: Random.increment(),
201 | type,
202 | msg: Random.sentence()
203 | }
204 | arr.push(element)
205 | }
206 | return arr
207 | }
208 | return {
209 | code: 200,
210 | message: 'success',
211 | avactor: Random.image('55x55', Random.color(), 'user'),
212 | data
213 | }
214 | }
215 | },
216 | {
217 | url: '/get/main/issue/info',
218 | type: 'get',
219 | response: (config) => {
220 | const id = config.body ? (JSON.parse(config.body)).id : 1
221 | let data = {
222 | id: id,
223 | bussinessName: Random.title(),
224 | title: Random.title(),
225 | industry: Random.word(),
226 | quote: Random.natural(500, 10000),
227 | website: Random.url(),
228 | email: Random.email(),
229 | phone: '135698969666',
230 | wechart: '586666',
231 | qq: '56666',
232 | otherConcat: '2222',
233 | LogoImg: Random.image('148x148', Random.color()),
234 | wechartImg: Random.image('148x148', Random.color()),
235 | qqImg: Random.image('148x148', Random.color()),
236 | desc: Random.paragraph(1, 3)
237 | }
238 | return {
239 | code: 200,
240 | message: 'success',
241 | data
242 | }
243 | }
244 | },
245 | {
246 | url: '/get/main/note/list',
247 | type: 'get',
248 | response: () => {
249 | let data = []
250 | for (let i = 0; i < 6; i++) {
251 | const obj = {
252 | id: Random.increment(),
253 | name: Random.cname(),
254 | logo: Random.image('100x90', Random.color(), 'user'),
255 | list: loop()
256 | }
257 | data.push(obj)
258 | }
259 | function loop() {
260 | let arr = []
261 | for (let i = 0; i < Random.natural(1, 5); i++) {
262 | const element = {
263 | id: Random.increment(),
264 | time: Random.datetime(),
265 | msg: Random.sentence()
266 | }
267 | arr.push(element)
268 | }
269 | return arr
270 |
271 | }
272 | return {
273 | code: 200,
274 | message: 'success',
275 | data
276 | }
277 | }
278 | },
279 | ]
--------------------------------------------------------------------------------
/src/utils/common.js:
--------------------------------------------------------------------------------
1 | export default {
2 | // 限制只能输入数字(可以输入两位小数点)
3 | limitInputPointNumber(val) {
4 | if (val === 0 || val === "0" || val === "" || val === undefined) {
5 | return "";
6 | } else {
7 | let value = null;
8 | value = val.replace(/[^\d.]/g, ""); // 清除“数字”和“.”以外的字符
9 | value = value.replace(/\.{2,}/g, "."); // 只保留第一个. 清除多余的
10 | value = value
11 | .replace(".", "$#$")
12 | .replace(/\./g, "")
13 | .replace("$#$", ".");
14 | value = value.replace(/^(-)*(\d+)\.(\d\d).*$/, "$1$2.$3"); // 只能输入两个小数
15 | return value;
16 | }
17 | },
18 |
19 | handleRouteToArray(route) {
20 | const matchs = route.path.split('/')
21 | matchs.shift()
22 | let newMatch = []
23 | matchs.map((item, i) => {
24 | if (matchs[i - 1]) {
25 | item = newMatch[i - 1] + '/' + item
26 | }
27 | newMatch.push(item)
28 | })
29 | newMatch = newMatch.map(item => {
30 | return `/${item}`
31 | })
32 | return newMatch
33 | },
34 |
35 | // 密码长度8位以上,须包含大写、小写、数字、特殊符号中的任意3种
36 | testPassWord: function (str) {
37 | var rC = {
38 | lW: '[a-z]',
39 | uW: '[A-Z]',
40 | nW: '[0-9]',
41 | sW: '[\\u0020-\\u002F\\u003A-\\u0040\\u005B-\\u0060\\u007B-\\u007E]'
42 | }
43 | function Reg (str, rStr) {
44 | var reg = new RegExp(rStr)
45 | if (reg.test(str)) return true
46 | else return false
47 | }
48 | if (str.length < 8) {
49 | return false
50 | } else {
51 | var tR = {
52 | l: Reg(str, rC.lW),
53 | u: Reg(str, rC.uW),
54 | n: Reg(str, rC.nW),
55 | s: Reg(str, rC.sW)
56 | }
57 | if ((tR.l && tR.u && tR.n) || (tR.l && tR.u && tR.s) || (tR.s && tR.u && tR.n) || (tR.s && tR.l && tR.n)) {
58 | // document.title = "密码符合要求"
59 | return true
60 | } else {
61 | return false
62 | }
63 | }
64 | },
65 |
66 | // 密码验证x-y位任意字符
67 | pwdReg: /^([0-9a-zA-Z]|(?:&)|(?:~)|(?:!)|(?:@)|(?:#)|(?:\$)|(?:%)|(?:\^)|(?:\*)){6,20}$/,
68 |
69 | // 电话号码验证
70 | phoneReg: /^1[3|4|5|6|7|8][0-9]{9}$/,
71 |
72 | // 邮箱验证
73 | mailReg: /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/,
74 |
75 | // 格式化金钱
76 | formatUSD (val, currency) {
77 | if (val === '' || val === '--' || val === undefined) {
78 | return '--'
79 | }
80 | // 先判断数据是否有小数点
81 | let newVal = String(Number(val).toFixed(2))
82 | // 将科学计数转为正常的字符串显示
83 | if (newVal.includes('e+')) {
84 | newVal = Number(newVal).toLocaleString()
85 | newVal = this.unFormatAmount(newVal)
86 | }
87 | let dotIdx = newVal.lastIndexOf('.')
88 | let dotVal = '.00' // 保留小数点后面的数据
89 | if (dotIdx >= 0) {
90 | dotVal = newVal.substr(dotIdx, newVal.length)
91 | newVal = newVal.slice(0, dotIdx)
92 | }
93 |
94 | let len = newVal.length
95 | let arr = []
96 | let lastIndex = null
97 | while (len > 0) {
98 | lastIndex = len
99 | len -= 3
100 | arr.unshift(newVal.substring(len, lastIndex))
101 | }
102 | val = arr.join(',')
103 |
104 | if (currency) {
105 | newVal = `${currency} ${val}${dotVal}`
106 | } else {
107 | // newVal = `$ ${val}${dotVal}`
108 | newVal = `¥ ${val}${dotVal}` // 默认人民币
109 | }
110 | return newVal
111 | },
112 |
113 | // 格式化金额数字,不包含小数点,金额符等 输入整数
114 | formatAmount (val) {
115 | if (val === '' || val === '--' || val === undefined) {
116 | return '--'
117 | }
118 | if (val === 0 || val === '0') {
119 | return 0
120 | }
121 | // 先判断数据是否有小数点
122 | let newVal = String(val)
123 | let dotIdx = newVal.lastIndexOf('.')
124 | let dotLength = 0
125 | if (newVal.split('.').length > 1) {
126 | dotLength = newVal.split('.')[1].length
127 | }
128 | let dotVal = '' // 保留小数点后面的数据
129 | if (dotIdx >= 0) {
130 | newVal = String(Number(val).toFixed(5))
131 | dotVal = newVal.substr(dotIdx, dotLength + 1)
132 | newVal = newVal.slice(0, dotIdx)
133 | }
134 | let len = newVal.length
135 | let arr = []
136 | let lastIndex = null
137 | while (len > 0) {
138 | lastIndex = len
139 | len -= 3
140 | arr.unshift(newVal.substring(len, lastIndex))
141 | }
142 | val = arr.join(',')
143 | if (dotVal.length < 2) {
144 | dotVal = ''
145 | }
146 | return val + dotVal
147 | },
148 |
149 | // 判断数据是否为空
150 | isEmptyVal (val) {
151 | if (val === undefined || val === '') {
152 | return '--'
153 | } else {
154 | return val
155 | }
156 | },
157 |
158 | // 格式化年月日 type: 中国显示方式(ch)及拼接的方式
159 | // 注: 只有在接口传参时才需要中国的显示方式,其它为美式
160 | formatYMD (now, type='ch') {
161 | if (!now || now === 'null' || now === '--' || now === undefined) {
162 | return '--'
163 | }
164 | if (Number(now)) {
165 | now = new Date(now)
166 | }
167 | // 兼容IE浏览器 , YY-MM-DD 格式
168 | if (typeof now === 'string' && now.includes('-')) {
169 | now = this.NewDate(now)
170 | }
171 | if (now) {
172 | let year = ''
173 | let month = ''
174 | let date = ''
175 | // 这里的8位用于返回如 20180423 这样的格式
176 | if (String(now).length === 8 && String(now).indexOf('-') === -1 && String(now).indexOf('/') === -1) {
177 | const getNow = String(now)
178 | return `${getNow.substring(4, 6)}/${getNow.substring(6, 8)}/${getNow.substring(0, 4)}`
179 | } else {
180 | now = new Date(now)
181 | year = now.getFullYear()
182 | month = now.getMonth() + 1
183 | date = now.getDate()
184 | }
185 | if (month < 10) {
186 | month = `0${month}`
187 | }
188 | if (date < 10) {
189 | date = `0${date}`
190 | }
191 | if (type === 'ch') {
192 | return `${year}-${month}-${date}`
193 | } else if (type) {
194 | return `${year}${type}${month}${type}${date}`
195 | } else {
196 | return `${month}/${date}/${year}`
197 | }
198 | } else {
199 | return ''
200 | }
201 | },
202 |
203 | // 格式化时间 年,月,日,时,分,秒
204 | formatDate (now, type) {
205 | if (!now || now === 'null' || now === '--' || now === undefined) {
206 | return '--'
207 | }
208 | if (now) {
209 | now = new Date(now)
210 | let year = now.getFullYear()
211 | let month = now.getMonth() + 1
212 | let date = now.getDate()
213 | let hour = now.getHours()
214 | let minute = now.getMinutes()
215 | let second = now.getSeconds()
216 | if (month < 10) {
217 | month = `0${month}`
218 | }
219 | if (date < 10) {
220 | date = `0${date}`
221 | }
222 | if (hour < 10) {
223 | hour = `0${hour}`
224 | }
225 | if (minute < 10) {
226 | minute = `0${minute}`
227 | }
228 | if (second < 10) {
229 | second = `0${second}`
230 | }
231 | if (type) {
232 | return `${month}/${date}/${year} ${hour}:${minute}:${second}`
233 | } else {
234 | return `${month}-${date}-${year}`
235 | }
236 | } else {
237 | return ''
238 | }
239 | },
240 |
241 | // 验证上传的文件类型,是否为pdf
242 | isPdfType (file) {
243 | const fileType = file.type
244 | if (fileType.lastIndexOf('/pdf') > 0) {
245 | return true
246 | }
247 | return false
248 | },
249 |
250 | // 验证上传的文件类型,是否为png/jpeg/gif等
251 | isPictureType (file) {
252 | const fileType = file.type
253 | if (fileType.lastIndexOf('/jpeg') > 0 || fileType.lastIndexOf('/png') > 0 || fileType.lastIndexOf('/x-icon') > 0 || fileType.lastIndexOf('/gif') >= 0) {
254 | return true
255 | }
256 | return false
257 | },
258 |
259 | // 验证上传的文件大小,小于4m
260 | isLimitFile (file, size = 4) {
261 | const isLtM = file.size / 1024 / 1024 < size
262 | if (isLtM) {
263 | return true
264 | }
265 | return false
266 | },
267 |
268 | // 获取登陆信息
269 | getLoginInfo (name) {
270 | let info = sessionStorage.getItem('login')
271 | info = info ? JSON.parse(info) : {}
272 | return info[name]
273 | }
274 | }
--------------------------------------------------------------------------------
/src/views/user/dynamic.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | -
7 | 我的动态
8 |
9 | 发布新动态
10 |
11 |
12 | -
16 |
17 |
{{ item.text }}
18 |
19 | -
24 |
25 |
26 |
27 |
28 |
{{item.time}}
29 |
30 |
34 |
35 |
36 | 赞
37 |
38 |
39 | 评论
40 |
41 |
42 |
48 |
49 |
50 |
51 |
52 |
53 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
70 |
76 |
77 |
84 |
85 |
86 |
97 |
98 |
99 |
100 |
101 |
102 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
223 |
224 |
--------------------------------------------------------------------------------
/src/views/user/friend.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
我的好友
6 |
7 |
8 | 好友申请
9 |
10 |
11 |
12 |
13 |
14 |
15 | -
16 |
22 |
23 |
24 |
25 | -
32 |
33 |
![]()
34 |
35 |
36 |
37 |
{{ item.name }}
38 |
{{ item.time }}
39 |
40 |
{{ item.message }}
41 |
42 |
43 |
44 |
45 |
{{ activeName }}
46 |
47 |
48 | -
53 |
54 |
55 |
![]()
56 |
57 |
58 | {{item.msg}}
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
141 |
142 |
--------------------------------------------------------------------------------
/src/utils/vue-print-nb/dist/js/app.615a4834.js:
--------------------------------------------------------------------------------
1 | (function(t){function e(e){for(var r,o,s=e[0],c=e[1],l=e[2],d=0,p=[];d'}}},mounted:function(){var t=this;this.echart(),this.$nextTick((function(){new s.a(t.$refs.qrcode,{width:100,height:100,text:"https://www.baidu.com/"})}))},methods:{echart:function(){var t=l.a.init(this.$refs.echartMain);t.setOption({title:{text:"ECharts 入门示例"},tooltip:{},xAxis:{data:["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]},yAxis:{},series:[{name:"销量",type:"bar",data:[5,20,36,10,10,20]}]})}}},d=u,p=(n("034f"),n("b0a0"),n("5511")),h=Object(p["a"])(d,a,i,!1,null,null,null),v=h.exports,f=(n("9dd9"),n("f548"),n("684c")),g=(n("6d57"),n("8e0d")),y=n("4317"),m=function(){function t(e){Object(g["a"])(this,t),this.standards={strict:"strict",loose:"loose",html5:"html5"},this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5,extraHead:"",extraCss:"",popTitle:"",endCallback:null,ids:""},Object.assign(this.settings,e),this.init()}return Object(y["a"])(t,[{key:"init",value:function(){this.counter++,this.settings.id="printArea_".concat(this.counter);var t=this.getPrintWindow();this.write(t.doc),this.print(t),this.settings.endCallback()}},{key:"print",value:function(t){var e=this,n=t.win,r=function(){n.focus(),n.print();try{var t=document.getElementById(e.settings.id),r=e.elsdom.querySelectorAll(".canvasImg");console.log(e.elsdom);for(var a=0;a").concat(this.getHead()).concat(this.getBody(),"