Commit 9b217226 authored by Junling Bu's avatar Junling Bu
Browse files

Merge branch 'litemall-vue' of https://github.com/pkwenda/litemall into pkwenda-litemall-vue

parents 3cb559bb ce4ef458
module.exports = {
root: true,
env: {
node: true
},
extends: ['plugin:vue/essential', '@vue/prettier'],
// rules: {
// camelcase: 'off',
// quotes: ['error', 'single'],
// indent: ['error', 2, { SwitchCase: 1 }],
// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
// },
parserOptions: {
parser: 'babel-eslint'
}
};
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
module.exports = {
plugins: {
autoprefixer: {}
}
};
module.exports = {
tabWidth: 2,
singleQuote: true
};
# liteMall 移动商城
- 本项目是小程序的 vue 版本,样式大体相同,欢迎有能力的人贡献更优秀的代码
> 使用有赞移动端 Vue 组件库 — [Vant](https://www.youzanyun.com/zanui/vant#/zh-CN/component/intro)
## Vue相关库与插件
- power by vue-cli3
- Vue + Vue-router + Vant + Sass
- axios
- vee-validate
- fastclick
- babel-polyfill
- @xkeshi/vue-countdown
## Build Script
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:6255 九键输入法的 「mall」= 「6255」
npm run serve
# build for production with minification : build result at /dist
npm run build
# build for production and view the bundle analyzer report
npm run build -- --report
```
- 简单预览:
[![AqVx1g.md.png](https://s2.ax1x.com/2019/04/12/AqVx1g.md.png)](https://imgchr.com/i/AqVx1g)
[![AqZZ3F.md.gif](https://s2.ax1x.com/2019/04/12/AqZZ3F.md.gif)](https://imgchr.com/i/AqZZ3F)
### 一些 Tips
- 手机浏览或 chrome 手机模式:开发/浏览 体验更佳
- 运行项目
```bash
npm i && npm run serve
```
- 打包项目
```bash
# /dist copy to you http server
npm run build
```
module.exports = {
presets: ['@vue/app'],
plugins: [
'lodash',
[
'import',
{
libraryName: 'vant',
libraryDirectory: 'es',
style: true
},
'vant'
]
]
};
This diff is collapsed.
This diff is collapsed.
{
"name": "lite-mall",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"mock": "json-server ./mock/db.json"
},
"dependencies": {
"@xkeshi/vue-countdown": "^1.0.1",
"axios": "^0.18.0",
"dayjs": "^1.7.7",
"js-md5": "^0.7.3",
"lodash": "^4.17.11",
"vant": "^1.4.4",
"vee-validate": "^2.1.4",
"vue": "^2.5.17",
"vue-router": "^3.0.1",
"protobufjs": "^6.8.6",
"vuelidation": "^1.1.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.5",
"@vue/cli-plugin-eslint": "^3.0.5",
"@vue/cli-service": "^3.0.5",
"@vue/eslint-config-prettier": "^3.0.5",
"babel-plugin-import": "^1.9.1",
"babel-plugin-lodash": "^3.3.4",
"node-sass": "^4.9.3",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.5.17"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<script src="<%= BASE_URL %>vconsole.min.js"></script>
<title>liteMall</title>
</head>
<body>
<noscript>
<strong>We're sorry but zing-mall doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>
<div id="app">
<div class="lds-ball">
<div></div>
</div>
</div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
This diff is collapsed.
<template>
<div id="app">
<keep-alive>
<router-view class="view-router" v-if="$route.meta.keepAlive"></router-view>
</keep-alive>
<router-view class="view-router" v-if="!$route.meta.keepAlive"></router-view>
<router-view name="tabbar"></router-view>
</div>
</template>
<style lang="scss" src="./assets/scss/global.scss" />
// export const GOODS_CATEGORY = '/category';
export const GOODS_CATEGORY = '/wx/catalog/index';
export const GOODS_CHANNGE_CATEGORY = '/wx/catalog/current?id=';
export const GOODS_SEARCH = '/moreGoods';
export const GOODS_DETAIL = '/details';
export const ORDER_LIST = '/order-list';
export const ELE_COUPON_LIST = '/electronic-list';
export const REFUND_LIST = '/refund-list';
export const HOME_module = '/home';
export const ALL_GOODS = '/moreGoods';
export const SHOPINFO = '/shop-info';
// 运费模板
export const POST_FEE = '';
// 登录
export const USER_LOGIN = '/wx/auth/login';
export const USER_LOGOUT = '';
// 用户信息
export const USER_PROFILE = '/user-profile';
export const USER_MODIFY_PASSWORD = '';
export const USER_CHANGE_MOBILE = '';
// 验证码
export const USER_SENDCODE = '';
// 地址
export const ADDRESS = '/address';
export const ADDRESS_DEFAULT = '/address-default';
// 收藏
export const GOODS_COLLECT_LIST = '/moreGoods';
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment