├── src ├── assets │ ├── .gitkeep │ ├── logo.png │ └── favicon.ico ├── static │ ├── .gitkeep │ ├── css │ │ └── wap.css │ └── images │ │ ├── sf.png │ │ ├── back1.jpg │ │ ├── icons.jpg │ │ └── loading2.gif ├── settings.js ├── store │ ├── index.js │ └── modules │ │ └── index.js ├── config │ └── api.js ├── main.js ├── components │ ├── WapPage.vue │ ├── Wap │ │ ├── Topbar.vue │ │ ├── WapPage.vue │ │ ├── CenterPage.vue │ │ ├── Footerbar.vue │ │ └── GoodsPage.vue │ ├── DashboardPage.vue │ ├── Common │ │ ├── Navbar.vue │ │ ├── Countdown.vue │ │ └── Sidebar.vue │ ├── Freight │ │ ├── FreightPage.vue │ │ ├── ExceptAreaPage.vue │ │ └── ExceptAreaAddPage.vue │ ├── Admin │ │ ├── AdminPage.vue │ │ └── AdminAddPage.vue │ ├── GoodsGallery │ │ └── GoodsGalleryEditPage.vue │ ├── Keywords │ │ ├── KeywordsAddPage.vue │ │ └── KeywordsPage.vue │ ├── ShopCart │ │ └── ShopCartPage.vue │ ├── Shipper │ │ ├── ShipperAddPage.vue │ │ ├── ShipperListPage.vue │ │ └── ShipperPage.vue │ ├── Showset │ │ └── ShowSetPage.vue │ ├── Ad │ │ ├── AdPage.vue │ │ └── AdAddPage.vue │ ├── LoginPage.vue │ ├── Comment │ │ ├── ComPage.vue │ │ └── ComAddPage.vue │ ├── Settings │ │ └── NoticePage.vue │ ├── User │ │ └── UserPage.vue │ ├── Category │ │ ├── CategoryPage.vue │ │ └── CategoryAddPage.vue │ ├── Specification │ │ └── SpecificationAddPage.vue │ ├── Nature │ │ └── NaturePage.vue │ └── WelcomePage.vue ├── App.vue ├── element.js └── router │ └── index.js ├── .browserslistrc ├── .env.development ├── .env.production ├── gitImg ├── cart.png ├── home.png ├── set.png ├── user.png ├── goods.png ├── order.png ├── weixin.jpeg ├── category.png └── xzzshop.jpeg ├── public ├── favicon.ico └── index.html ├── postcss.config.js ├── scripts ├── oss │ ├── config.js │ ├── index.js │ ├── client.js │ └── upload.js └── plop │ ├── util.js │ └── view │ ├── index.hbs │ └── prompt.js ├── babel.config.js ├── .gitignore ├── .eslintrc.js ├── .prettierrc ├── package.json ├── README.md └── vue.config.js /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/static/css/wap.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | ENV = 'development' 2 | VUE_APP_BASE_API = '/dev-api' -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | ENV = 'production' 2 | VUE_APP_BASE_API = '/prod-api' 3 | 4 | -------------------------------------------------------------------------------- /gitImg/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/gitImg/cart.png -------------------------------------------------------------------------------- /gitImg/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/gitImg/home.png -------------------------------------------------------------------------------- /gitImg/set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/gitImg/set.png -------------------------------------------------------------------------------- /gitImg/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/gitImg/user.png -------------------------------------------------------------------------------- /gitImg/goods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/gitImg/goods.png -------------------------------------------------------------------------------- /gitImg/order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/gitImg/order.png -------------------------------------------------------------------------------- /gitImg/weixin.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/gitImg/weixin.jpeg -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /gitImg/category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/gitImg/category.png -------------------------------------------------------------------------------- /gitImg/xzzshop.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/gitImg/xzzshop.jpeg -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/src/assets/favicon.ico -------------------------------------------------------------------------------- /src/static/images/sf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/src/static/images/sf.png -------------------------------------------------------------------------------- /src/static/images/back1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/src/static/images/back1.jpg -------------------------------------------------------------------------------- /src/static/images/icons.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/src/static/images/icons.jpg -------------------------------------------------------------------------------- /src/settings.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | title: '小猪猪后台管理', 3 | fixedHeader: true, 4 | sidebarLogo: true 5 | } 6 | -------------------------------------------------------------------------------- /src/static/images/loading2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zxb1655/xzzshop-admin/HEAD/src/static/images/loading2.gif -------------------------------------------------------------------------------- /scripts/oss/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | accessKeyId: 'LTAI5tFcn9fqRU54dov6RFvp', 3 | accessKeySecret: '5fc9pBQAigwg49FhQ8BZ03gIWF8lcz' 4 | } 5 | -------------------------------------------------------------------------------- /scripts/plop/util.js: -------------------------------------------------------------------------------- 1 | exports.notEmpty = name => { 2 | return v => { 3 | if (!v || v.trim === '') { 4 | return `${name} is required` 5 | } else { 6 | return true 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | import modules from './modules' 5 | 6 | Vue.use(Vuex) 7 | 8 | export default new Vuex.Store({ 9 | modules, 10 | strict: process.env.NODE_ENV !== 'production' 11 | }) 12 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ["@vue/cli-plugin-babel/preset"], 3 | plugins: [ 4 | [ 5 | "component", 6 | { 7 | libraryName: "element-ui", 8 | styleLibraryName: "theme-chalk", 9 | }, 10 | ], 11 | ], 12 | }; 13 | -------------------------------------------------------------------------------- /scripts/oss/index.js: -------------------------------------------------------------------------------- 1 | const pwd = process.cwd() 2 | const path = require('path') 3 | const package = require('../../package.json') 4 | const { upload } = require('./upload') 5 | 6 | const ossBasePath = package.name 7 | 8 | function start() { 9 | upload(path.join(pwd, `/${package.entry}/`), `${ossBasePath}`) 10 | } 11 | 12 | start() 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /src/config/api.js: -------------------------------------------------------------------------------- 1 | const rootUrl = 'http://127.0.0.1:8360/admin/' 2 | // const rootUrl = 'https://shopserver.zxb66.top/admin/' 3 | 4 | const api = { 5 | rootUrl: rootUrl, 6 | qiniu: 'http://up.qiniu.com' 7 | // 请根据自己创建的七牛的区域进行设置: 8 | // https://developer.qiniu.com/kodo/manual/1671/region-endpoint 9 | } 10 | 11 | // import api from './config/api' 12 | // Axios.defaults.baseURL = api.rootUrl; 13 | 14 | export default api 15 | -------------------------------------------------------------------------------- /src/store/modules/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The file enables `@/store/index.js` to import all vuex modules 3 | * in a one-shot manner. There should not be any reason to edit this file. 4 | */ 5 | 6 | const files = require.context('.', false, /\.js$/) 7 | const modules = {} 8 | 9 | files.keys().forEach(key => { 10 | if (key === './index.js') return 11 | modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default 12 | }) 13 | 14 | export default modules 15 | -------------------------------------------------------------------------------- /scripts/oss/client.js: -------------------------------------------------------------------------------- 1 | const OSS = require('ali-oss') 2 | const OSSConfig = require('./config') 3 | 4 | const BUILD_FOR = process.env.BUILD_FOR 5 | 6 | let client = new OSS({ 7 | region: 'oss-cn-shenzhen', 8 | accessKeyId: OSSConfig.accessKeyId, 9 | accessKeySecret: OSSConfig.accessKeySecret 10 | }) 11 | 12 | console.log(`mw${BUILD_FOR ? '-' + BUILD_FOR : ''}`) 13 | client.useBucket(`mw${BUILD_FOR ? '-' + BUILD_FOR : ''}`) 14 | 15 | module.exports = { 16 | client 17 | } 18 | -------------------------------------------------------------------------------- /scripts/plop/view/index.hbs: -------------------------------------------------------------------------------- 1 | {{#if template}} 2 | 6 | {{/if}} 7 | 8 | {{#if script}} 9 | 13 | {{/if}} 14 | 15 | {{#if style}} 16 | 20 | {{/if}} -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: false, 3 | env: { 4 | browser: true, 5 | node: true, 6 | es6: true 7 | }, 8 | 9 | extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/prettier'], 10 | 11 | parserOptions: { 12 | parser: 'babel-eslint' 13 | }, 14 | 15 | extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/prettier'], 16 | rules: { 17 | 'no-console': 'off', 18 | 'no-debugger': 'off', 19 | 'no-unused-vars': 'off' 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "tabWidth": 2, 4 | "singleQuote": true, 5 | "trailingComma": "none", 6 | "semi": false, 7 | "wrap_line_length": 120, 8 | "wrap_attributes": "auto", 9 | "proseWrap": "always", 10 | "arrowParens": "avoid", 11 | "bracketSpacing": true, 12 | "jsxBracketSameLine": true, 13 | "useTabs": false, 14 | "eslintIntegration": true, 15 | "overrides": [ 16 | { 17 | "files": ".prettierrc", 18 | "options": { 19 | "parser": "json" 20 | } 21 | } 22 | ], 23 | "endOfLine": "auto" 24 | } 25 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /scripts/oss/upload.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const { client } = require('./client') 3 | 4 | function putOSS(src, dist) { 5 | return new Promise(async resolve => { 6 | try { 7 | await client.put(dist, src) 8 | resolve() 9 | } catch (e) { 10 | console.log(e) 11 | resolve() 12 | } 13 | }) 14 | } 15 | 16 | function upload(src, dist) { 17 | var docs = fs.readdirSync(src) 18 | return new Promise(resolve => { 19 | docs.forEach(function (doc) { 20 | var _src = src + '/' + doc, 21 | _dist = dist + '/' + doc 22 | var st = fs.statSync(_src) 23 | // 判断是否为文件 24 | if (st.isFile() && doc !== '.DS_Store') { 25 | putOSS(_src, _dist) 26 | // console.log(_src+'是文件',_dist) 27 | } 28 | // 如果是目录则递归调用自身 29 | else if (st.isDirectory()) { 30 | // console.log(_src+'是文件夹') 31 | upload(_src, _dist) 32 | } 33 | }) 34 | // console.log('上传结束'); 35 | resolve() 36 | }) 37 | } 38 | 39 | module.exports = { 40 | upload 41 | } 42 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Axios from 'axios' 3 | import VueAxios from 'vue-axios' 4 | 5 | import App from './App' 6 | import router from './router' 7 | import store from './store' 8 | import api from './config/api' 9 | import './element.js' 10 | 11 | import 'quill/dist/quill.core.css' 12 | import 'quill/dist/quill.snow.css' 13 | import 'quill/dist/quill.bubble.css' 14 | 15 | Vue.use(VueAxios, Axios) 16 | 17 | router.beforeEach((to, from, next) => { 18 | let token = localStorage.getItem('token') || '' 19 | //配置接口信息 20 | Axios.defaults.baseURL = api.rootUrl 21 | console.log(Axios.defaults.headers) 22 | Axios.defaults.headers.common['x-xzzshop-token'] = token 23 | 24 | if (!token && to.name !== 'login') { 25 | next({ 26 | path: '/login', 27 | query: { redirect: to.fullPath } 28 | }) 29 | } else { 30 | next() 31 | } 32 | }) 33 | 34 | Vue.config.productionTip = false 35 | 36 | new Vue({ 37 | el: '#app', 38 | router, 39 | store, 40 | render: h => h(App) 41 | }) 42 | -------------------------------------------------------------------------------- /src/components/WapPage.vue: -------------------------------------------------------------------------------- 1 | 16 | 27 | 51 | -------------------------------------------------------------------------------- /src/components/Wap/Topbar.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 29 | 53 | -------------------------------------------------------------------------------- /src/components/Wap/WapPage.vue: -------------------------------------------------------------------------------- 1 | 17 | 28 | 54 | -------------------------------------------------------------------------------- /scripts/plop/view/prompt.js: -------------------------------------------------------------------------------- 1 | const { notEmpty } = require('../util.js') 2 | 3 | module.exports = { 4 | description: 'generate a view', 5 | prompts: [ 6 | { 7 | type: 'input', 8 | name: 'name', 9 | message: '页面文件名', 10 | validate: notEmpty('name') 11 | }, 12 | { 13 | type: 'checkbox', 14 | name: 'blocks', 15 | message: 'Blocks:', 16 | choices: [ 17 | { 18 | name: '