├── .editorconfig ├── .eslintrc.js ├── .gitattributes ├── .github └── issue_template.md ├── .gitignore ├── LICENSE ├── README.md ├── README_zh-EN.md ├── assets ├── images │ ├── add.png │ ├── benefit.gif │ ├── cart.svg │ ├── cart2.svg │ └── sprite-avatar.png ├── services │ ├── common.js │ ├── shopping.js │ └── user.js ├── styles │ ├── base.scss │ ├── iconfont.scss │ └── mixin.scss └── utils │ ├── request.js │ ├── tool.js │ └── validate.js ├── components ├── ratingStar.vue ├── shopList.vue ├── svg.vue └── tabbar.vue ├── config └── index.js ├── dist ├── .nojekyll ├── 200.html ├── discover │ └── index.html ├── download │ └── index.html ├── favicon.ico ├── index.html ├── login │ └── index.html ├── newretail │ └── index.html ├── nuxt │ ├── 0540702f607b62192bec.js │ ├── 08564482ad21262a60cc.js │ ├── 0f7ece06e41b1d42755e.js │ ├── 1556fba2b785fd22c0e6.js │ ├── 2563ac12edb147b973ef.js │ ├── 2d96f02b6e76718c60f9.js │ ├── 2e6602af1f9e1a92ceb2.js │ ├── 304042af442e88979d27.js │ ├── 36e21aca6d5f734fc3d0.js │ ├── 375572cd74e141c9280b.js │ ├── 3c856f4921cf276b63e6.js │ ├── 420383f182311cfb08fa.js │ ├── 5455e8fbdd4d0f5a6254.js │ ├── 5865da82b7a58b6331ef.js │ ├── 5d2fd86eba958ee3e0b9.js │ ├── 81a11e366a76ecb7fd21.js │ ├── 81cbb94a52a968507b35.js │ ├── 8a742fc72447bfb3fe47.js │ ├── 910bf465f75eb44872dd.js │ ├── 942b5b960cde6491f42d.js │ ├── LICENSES │ ├── ad79a751146a41a1bf69.js │ ├── af39b561142935cada55.js │ ├── b55c5287f2d8d2abdbaa.js │ ├── c83d4103a4ad4f73ef76.js │ ├── d1fdb79693a4f11e1701.js │ ├── eb373e3b4d9cf2501ba1.js │ ├── eb7154e09515daf5b694.js │ ├── f52491409b34f058c284.js │ ├── f9fd03ccf0fc51dedeeb.js │ └── img │ │ ├── 3ffb5d8.png │ │ ├── 4c99015.png │ │ ├── 8ecc9f8.svg │ │ └── e50a008.svg ├── order │ └── index.html ├── robots.txt ├── search │ └── index.html ├── shop │ ├── components │ │ ├── goods │ │ │ ├── cartcontrol │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ └── shopcart │ │ │ │ └── index.html │ │ ├── header │ │ │ └── index.html │ │ ├── ratings │ │ │ ├── index.html │ │ │ └── ratingselect │ │ │ │ └── index.html │ │ └── seller │ │ │ └── index.html │ └── index.html └── user │ ├── addAddress │ └── index.html │ ├── address │ └── index.html │ ├── benefit │ └── index.html │ ├── forget │ └── index.html │ ├── index.html │ ├── info │ └── index.html │ ├── service │ └── index.html │ └── username │ └── index.html ├── layouts ├── default.vue └── error.vue ├── middleware └── README.md ├── nuxt.config.js ├── package.json ├── pages ├── discover.vue ├── download.vue ├── index.vue ├── login.vue ├── newretail.vue ├── order.vue ├── search.vue ├── shop │ ├── components │ │ ├── goods │ │ │ ├── cartcontrol.vue │ │ │ ├── index.vue │ │ │ └── shopcart.vue │ │ ├── header.vue │ │ ├── ratings │ │ │ ├── index.vue │ │ │ └── ratingselect.vue │ │ └── seller.vue │ └── index.vue └── user │ ├── addAddress.vue │ ├── address.vue │ ├── benefit.vue │ ├── forget.vue │ ├── index.vue │ ├── info.vue │ ├── service.vue │ └── username.vue ├── plugins └── mint-ui.js ├── screenshots ├── 1.gif ├── 1.png ├── 2.gif ├── 2.png ├── 3.gif ├── 3.png ├── 4.gif ├── 4.png ├── 5.gif ├── 5.png ├── alipay.jpg ├── gh_44a51ea2dd08_430.jpg ├── gh_a896d27a50a3_430.jpg ├── qr-code.png └── wechat.jpg ├── server └── index.js ├── static ├── favicon.ico └── robots.txt ├── store ├── index.js ├── modules │ └── userInfo.js └── types.js └── template.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | 13 | [*.md] 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | browser: true, 5 | node: true 6 | }, 7 | parserOptions: { 8 | parser: 'babel-eslint' 9 | }, 10 | extends: [ 11 | 'plugin:vue/recommended' 12 | ], 13 | // required to lint *.vue files 14 | plugins: [ 15 | 'vue' 16 | ], 17 | // add your custom rules here 18 | rules: { 19 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 20 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 21 | 'vue/require-prop-types': 'off', 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=Vue 2 | *.css linguist-language=Vue 3 | *.scss linguist-language=Vue 4 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | 如果是提交 bug,请搜索文档和 issue,确认以下事项: 2 | 3 | * 该问题没有在其他 issue 和文档讨论到,不属于重复内容 4 | 5 | * 分割线以下的模板除了「 补充信息」每一样都必填 6 | 7 | 🙏🙏🙏 8 | 阅读完后请在提交的issue中删除以上内容,包括分割线。 9 | ------------------------ 10 | 11 | **问题描述** 12 | [问题描述:站在其它人的角度尽可能清晰地、简洁地把问题描述清楚] 13 | 14 | **复现步骤** 15 | [复现问题的步骤] 16 | 1. Go to '...' 17 | 2. Click on '....' 18 | 3. Scroll down to '....' 19 | 4. See error 20 | 21 | [或者可以直接贴源代码,能贴文字就不要截图] 22 | 23 | ```js 24 | // 这里可以贴代码 25 | 26 | ``` 27 | 28 | **期望行为** 29 | [这里请用简洁清晰的语言描述你期望的行为] 30 | 31 | **报错信息** 32 | 33 | [这里请贴上你的**完整**报错截图或文字] 34 | 35 | **系统信息** 36 | 37 | - 操作系统: [e.g. Windows 10] 38 | - Node.js 版本 [e.g. v10.13.0] 39 | 40 | **补充信息** 41 | [可选] 42 | [根据你的调查研究,出现这个问题的原因可能在哪里?] 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | 4 | # logs 5 | npm-debug.log 6 | 7 | # Nuxt build 8 | .nuxt 9 | 10 | # Nuxt generate 11 | dist 12 | 13 | .DS_Store 14 | .eslintcache 15 | selenium-debug.log 16 | test/unit/coverage 17 | test/e2e/reports 18 | cordova/platforms 19 | cordova/plugins 20 | thumbs.db 21 | !.gitkeep 22 | .idea/ 23 | .vscode 24 | .project 25 | typings/ 26 | typings.json 27 | build/ 28 | package-lock.json 29 | -------------------------------------------------------------------------------- /assets/images/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/assets/images/add.png -------------------------------------------------------------------------------- /assets/images/benefit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/assets/images/benefit.gif -------------------------------------------------------------------------------- /assets/images/cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/cart2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/sprite-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/assets/images/sprite-avatar.png -------------------------------------------------------------------------------- /assets/services/common.js: -------------------------------------------------------------------------------- 1 | import request from '../utils/request'; 2 | 3 | const prefix = '/common'; 4 | 5 | export const getHomeData = (params) => { 6 | return request({ 7 | url: `${prefix}/getHomeData`, 8 | method: 'GET', 9 | data: params, 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /assets/services/shopping.js: -------------------------------------------------------------------------------- 1 | import request from '../utils/request'; 2 | 3 | const prefix = '/shopping'; 4 | 5 | export const restaurants = (params) => { 6 | return request({ 7 | url: `${prefix}/restaurants`, 8 | method: 'GET', 9 | data: params, 10 | }) 11 | } 12 | 13 | export const seller = (params) => { 14 | return request({ 15 | url: `${prefix}/seller`, 16 | method: 'GET', 17 | data: params, 18 | }) 19 | } 20 | export const goods = (params) => { 21 | return request({ 22 | url: `${prefix}/goods`, 23 | method: 'GET', 24 | data: params, 25 | }) 26 | } 27 | export const ratings = (params) => { 28 | return request({ 29 | url: `${prefix}/ratings`, 30 | method: 'GET', 31 | data: params, 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /assets/services/user.js: -------------------------------------------------------------------------------- 1 | import request from '../utils/request'; 2 | 3 | const prefix = '/user'; 4 | 5 | // 登录 6 | export const loginApi = (params) => { 7 | return request({ 8 | url: `${prefix}/login`, 9 | method: 'POST', 10 | data: params, 11 | }) 12 | } 13 | 14 | // 修改昵称 15 | export const retsetName = (params) => { 16 | return request({ 17 | url: `${prefix}/retsetName`, 18 | method: 'POST', 19 | data: params, 20 | }) 21 | } 22 | 23 | // 修改密码 24 | export const retsetPassword = (params) => { 25 | return request({ 26 | url: `${prefix}/retsetPassword`, 27 | method: 'POST', 28 | data: params, 29 | }) 30 | } 31 | 32 | // 获取用户地址列表 33 | export const getAddress = (params) => { 34 | return request({ 35 | url: `${prefix}/getAddress`, 36 | method: 'GET', 37 | data: params, 38 | }) 39 | } 40 | 41 | // 获取用户地址 42 | export const getAddAddressById = (params) => { 43 | return request({ 44 | url: `${prefix}/getAddAddressById`, 45 | method: 'GET', 46 | data: params, 47 | }) 48 | } 49 | 50 | // 添加用户地址 51 | export const addAddress = (params) => { 52 | return request({ 53 | url: `${prefix}/addAddress`, 54 | method: 'POST', 55 | data: params, 56 | }) 57 | } 58 | 59 | // 删除用户地址 60 | export const deleteAddress = (params) => { 61 | return request({ 62 | url: `${prefix}/deleteAddress`, 63 | method: 'DELETE', 64 | data: params, 65 | }) 66 | } 67 | -------------------------------------------------------------------------------- /assets/styles/base.scss: -------------------------------------------------------------------------------- 1 | @import './mixin'; 2 | @import './iconfont'; 3 | 4 | * { 5 | word-break: break-all; 6 | } 7 | 8 | input[disabled] { 9 | background: #fff; 10 | opacity: 1; 11 | } 12 | 13 | ul, 14 | li { 15 | list-style: none; 16 | padding: 0; 17 | } 18 | 19 | a:link, 20 | a:visited, 21 | a:hover, 22 | a:active { 23 | text-decoration: none; 24 | } 25 | 26 | @media screen and (min-width: 500px) { 27 | 28 | body, 29 | .mint-tabbar, 30 | .mint-header { 31 | max-width: 500px; 32 | margin: 0 auto; 33 | position: relative; 34 | } 35 | } 36 | 37 | .mint-header { 38 | height: px2rem(88px); 39 | font-size: px2rem(36px); 40 | 41 | .mintui { 42 | font-size: px2rem(36px); 43 | } 44 | } 45 | 46 | body, 47 | html { 48 | @include wh(100%, 100%); 49 | background-color: $fill-base; 50 | } 51 | 52 | img { 53 | display: block; 54 | max-width: 100%; 55 | } 56 | -------------------------------------------------------------------------------- /assets/styles/mixin.scss: -------------------------------------------------------------------------------- 1 | //******颜色变量******/ 2 | $primary: #4aa5f0; 3 | $secondary: #fff100; 4 | $danger: #d81e06; 5 | $blue: #1070ff; 6 | $light: #eee; 7 | $dark: #333; 8 | 9 | $fc: #fff; 10 | $fill-base: #f5f5f5; 11 | 12 | 13 | 14 | @function px2rem($px, $base-font-size: 46.875px) { 15 | @return ($px / $base-font-size) * 1rem; 16 | } 17 | 18 | // 背景图片地址和大小 19 | @mixin bg($url) { 20 | background-image: url($url); 21 | background-repeat: no-repeat; 22 | background-size: 100% 100%; 23 | } 24 | 25 | @mixin borderRadius($radius:4px) { 26 | -webkit-border-radius: $radius; 27 | -moz-border-radius: $radius; 28 | -ms-border-radius: $radius; 29 | -o-border-radius: $radius; 30 | border-radius: $radius; 31 | } 32 | 33 | //定位全屏 34 | @mixin allcover { 35 | position: fixed; 36 | top: 0; 37 | left: 0; 38 | width: 100%; 39 | height: 100%; 40 | } 41 | 42 | //定位上下左右居中 43 | @mixin center { 44 | position: absolute; 45 | top: 50%; 46 | left: 50%; 47 | transform: translate(-50%, -50%); 48 | } 49 | 50 | 51 | //定位上下居中 52 | @mixin ct { 53 | position: absolute; 54 | top: 50%; 55 | transform: translateY(-50%); 56 | } 57 | 58 | //定位上下居中 59 | @mixin cl { 60 | position: absolute; 61 | left: 50%; 62 | transform: translateX(-50%); 63 | } 64 | 65 | //宽高 66 | @mixin wh($width, $height) { 67 | width: $width; 68 | height: $height; 69 | } 70 | 71 | //字体大小、行高、字体 72 | @mixin font($size, $line-height, $family: 'Microsoft YaHei') { 73 | font: #{$size}/#{$line-height} $family; 74 | } 75 | 76 | //字体大小,颜色 77 | @mixin sc($size, $color) { 78 | font-size: $size; 79 | color: $color; 80 | } 81 | 82 | //flex 布局和 子元素 对其方式 83 | @mixin fj($type: space-between) { 84 | display: -webkit-flex; 85 | display: -webkit-box; 86 | display: flex; 87 | -webkit-justify-content: $type; 88 | justify-content: $type; 89 | } 90 | -------------------------------------------------------------------------------- /assets/utils/request.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import config from '~/config'; 3 | import { Toast } from 'mint-ui'; 4 | 5 | axios.defaults.baseURL = config.BASE_URL; 6 | axios.defaults.timeout = config.TIMEOUT; 7 | axios.defaults.headers = config.HEADERS; 8 | 9 | // 请求拦截器 10 | axios.interceptors.request.use( request => { 11 | if (!config.IS_RELEASE) { 12 | console.log( 13 | `${new Date().toLocaleString()}【 M=${request.url} 】P=`, 14 | request.params || request.data, 15 | ); 16 | } 17 | return request; 18 | }, error => { 19 | return Promise.reject(error); 20 | }); 21 | 22 | export default async (options = { method: 'GET' }) => { 23 | let isdata = true; 24 | if ( 25 | options.method.toUpperCase() !== 'POST' 26 | && options.method.toUpperCase() !== 'PUT' 27 | && options.method.toUpperCase() !== 'PATCH' 28 | ) { 29 | isdata = false; 30 | } 31 | const res = await axios({ 32 | method: options.method, 33 | url: options.url, 34 | data: isdata ? options.data : null, 35 | params: !isdata ? options.data : null, 36 | }); 37 | if (res.status >= 200 && res.status < 300) { 38 | if (!config.IS_RELEASE) { 39 | console.log( 40 | `${new Date().toLocaleString()}【接口响应:】`, 41 | res.data, 42 | ); 43 | } 44 | // 浏览器环境弹出报错信息 45 | if(typeof window !== "undefined" && res.data.code !== 0) { 46 | Toast(res.data.msg); 47 | } 48 | return res.data; 49 | }else { 50 | if(typeof window !== "undefined" && res.data.code !== 0) { 51 | Toast('请求错误'); 52 | } 53 | } 54 | 55 | }; 56 | -------------------------------------------------------------------------------- /assets/utils/tool.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 常用工具 3 | */ 4 | export default class Tool { 5 | /** 6 | * 存储localStorage 7 | */ 8 | static setStore(name, content) { 9 | if (!name) return; 10 | if (typeof content !== 'string') { 11 | content = JSON.stringify(content); 12 | } 13 | window.localStorage.setItem(name, content); 14 | } 15 | 16 | /** 17 | * 获取localStorage 18 | */ 19 | static getStore(name) { 20 | if (!name) return; 21 | return window.localStorage.getItem(name); 22 | } 23 | 24 | /** 25 | * 删除localStorage 26 | */ 27 | static removeStore(name) { 28 | if (!name) return; 29 | window.localStorage.removeItem(name); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /assets/utils/validate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 表单验证工具类 3 | */ 4 | export default class Validate { 5 | /** 6 | * 判断输入值是否为空 7 | */ 8 | static required(value) { 9 | if (typeof value === 'number') { 10 | value = value.toString(); 11 | } else if (typeof value === 'boolean') { 12 | return !0; 13 | } 14 | return value && value.length > 0; 15 | } 16 | 17 | /** 18 | * 重复验证 19 | */ 20 | static noDuplicate(values) { 21 | for (let i = 0; i < values.length; i++) { 22 | for (let j = 0; j < values.length; j++) { 23 | if (values[i] == values[j] && i != j) { 24 | return false; 25 | } 26 | } 27 | } 28 | return true; 29 | } 30 | 31 | /** 32 | * 验证电子邮箱格式 33 | */ 34 | static email(value) { 35 | return /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(value); 36 | } 37 | 38 | /** 39 | * 验证手机格式 40 | */ 41 | static tel(value) { 42 | return /^1[234578]\d{9}$/.test(value); 43 | } 44 | 45 | /** 46 | * 验证电话格式 47 | */ 48 | static phone(value) { 49 | return /^0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8}$/.test(value); 50 | } 51 | 52 | /** 53 | * 验证联系方式(固话&手机) 54 | */ 55 | static call(value) { 56 | return /(^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$)|(^((\(\d{3}\))|(\d{3}\-))?(1[358]\d{9})$)/.test(value); 57 | } 58 | 59 | /** 60 | * 验证传真格式 61 | */ 62 | static fax(value) { 63 | return /^(\d{3,4}-)\d{7,8}$/.test(value); 64 | } 65 | 66 | /** 67 | * 验证URL格式 68 | */ 69 | static url(value) { 70 | return /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(value); 71 | } 72 | 73 | /** 74 | * 验证日期格式 75 | */ 76 | static date(value) { 77 | return !/Invalid|NaN/.test(new Date(value).toString()); 78 | } 79 | 80 | /** 81 | * 验证ISO类型的日期格式 82 | */ 83 | static dateISO(value) { 84 | return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value); 85 | } 86 | 87 | /** 88 | * 验证十进制数字 89 | */ 90 | static number(value) { 91 | return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value); 92 | } 93 | 94 | /** 95 | * 验证整数 96 | */ 97 | static digits(value) { 98 | return /^\d+$/.test(value); 99 | } 100 | 101 | /** 102 | * 验证正整数 103 | */ 104 | static amount(value) { 105 | return /^[1-9]\d*$/.test(value); 106 | } 107 | 108 | /** 109 | * 验证身份证号码 110 | */ 111 | static idcard(value) { 112 | return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value); 113 | } 114 | 115 | /** 116 | * 验证内容是否相同 117 | */ 118 | static equalTo(value, param) { 119 | return value == param; 120 | } 121 | 122 | /** 123 | * 验证是否包含某个值 124 | */ 125 | static contains(value, param) { 126 | return value.indexOf(param) >= 0; 127 | } 128 | 129 | /** 130 | * 验证最小长度 131 | */ 132 | static minlength(value, param) { 133 | return value.length >= param; 134 | } 135 | 136 | /** 137 | * 验证最大长度 138 | */ 139 | static maxlength(value, param) { 140 | return value.length <= param; 141 | } 142 | 143 | /** 144 | * 验证一个长度范围[min, max] 145 | */ 146 | static rangelength(value, param) { 147 | return (value.length >= param[0] && value.length <= param[1]); 148 | } 149 | 150 | /** 151 | * 验证最小值 152 | */ 153 | static min(value, param) { 154 | return Number(value) >= Number(param); 155 | } 156 | 157 | /** 158 | * 验证最大值 159 | */ 160 | static max(value, param) { 161 | return Number(value) <= Number(param); 162 | } 163 | 164 | /** 165 | * 验证一个值范围[min, max] 166 | */ 167 | static range(value, param) { 168 | return (value >= param[0] && value <= param[1]); 169 | } 170 | 171 | } 172 | -------------------------------------------------------------------------------- /components/ratingStar.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 48 | 49 | 82 | -------------------------------------------------------------------------------- /components/tabbar.vue: -------------------------------------------------------------------------------- 1 | 113 | 114 | 137 | 138 | 159 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | export default { 2 | IS_RELEASE: false, // true线上,false测试 3 | 4 | BASE_URL: 'http://localhost:3000/api', // 测试 5 | 6 | // BASE_URL: '//elm.caibowen.net/api', // 生产 7 | 8 | // IMG_URL: 'http://localhost:9000/', // 测试 9 | 10 | IMG_URL: 'https://easytuan.gitee.io/node-elm-api/public/', // 生产(使用码云Gitee Pages 服务) 11 | 12 | HEADERS: { 13 | 'Content-Type': 'application/json;charset=UTF-8' 14 | }, 15 | 16 | TIMEOUT: 12000, // api超时时间 17 | 18 | }; 19 | -------------------------------------------------------------------------------- /dist/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/dist/.nojekyll -------------------------------------------------------------------------------- /dist/200.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/discover/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/download/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/dist/favicon.ico -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/login/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/newretail/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/nuxt/2e6602af1f9e1a92ceb2.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[14],{369:function(t,e,o){var r=o(403);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,o(18).default)("4182667b",r,!0,{sourceMap:!1})},402:function(t,e,o){"use strict";var r=o(369);o.n(r).a},403:function(t,e,o){(t.exports=o(17)(!1)).push([t.i,"\n.userInfo-page{padding:1.87733rem 0 0\n}\n.userInfo-page .rating_page{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#f2f2f2;z-index:202;padding-top:1.95rem\n}\n.userInfo-page .rating_page p,.userInfo-page .rating_page span{font-family:Helvetica Neue,Tahoma,Arial\n}\n.userInfo-page .profile-info{width:100%;height:3.1rem\n}\n.userInfo-page .profile-info .profileinfopanel-upload{display:block;position:absolute;opacity:0;top:2.35rem;left:0;width:100%;height:3.1rem\n}\n.userInfo-page .profile-info .headportrait{margin-top:.4rem;padding:.5rem .4rem;display:flex;justify-content:space-between;align-items:center;border-top:1px solid #ddd;background:#fff\n}\n.userInfo-page .profile-info .headportrait h2{font-size:.6rem;color:#333;font-weight:500;display:flex;align-items:center\n}\n.userInfo-page .profile-info .headportrait h2 svg{width:.68267rem;height:.68267rem;margin-right:5px\n}\n.userInfo-page .profile-info .headportrait .headportrait-div{display:flex\n}\n.userInfo-page .profile-info .headportrait .headportrait-div span{display:inline-block\n}\n.userInfo-page .profile-info .headportrait .headportrait-div span svg{width:100%;height:100%\n}\n.userInfo-page .profile-info .headportrait .headportrait-div .headportrait-div-top{width:2.5rem;height:2.5rem;border-radius:50%;vertical-align:middle;margin-right:5px\n}\n.userInfo-page .profile-info .headportrait .headportrait-div .headportrait-div-bottom{width:.66667rem;height:1.4rem;position:relative;top:.44rem\n}\n.userInfo-page .profile-info .headportraitwo{margin-top:0;padding:.3rem .4rem\n}\n.userInfo-page .profile-info .headportraitwo .headportrait-div{display:flex;justify-content:left\n}\n.userInfo-page .profile-info .headportraitwo .headportrait-div p{text-align:left;line-height:1.39rem;font-size:.7rem;color:#666;margin-right:.2rem;font-family:Arial\n}\n.userInfo-page .profile-info .headportraitwo .headportrait-div .blue{color:#0097ff\n}\n.userInfo-page .profile-info .headportraitwo .headportrait-div .headportrait-div-bottom{top:0\n}\n.userInfo-page .profile-info .headportraithree{border-bottom:1px solid #ddd\n}\n.userInfo-page .profile-info .bind-phone{padding:.4rem;font-size:.5rem;color:#666\n}\n.userInfo-page .profile-info .exitlogin{width:100%;margin:1.3rem auto 0;line-height:2.13333rem;border-radius:4px;text-align:center;background:#fff;font-size:.7rem;color:#ff5339\n}\n.userInfo-page .profile-info .exitlogin:active{opacity:.8;background:#c1c1c1\n}\n.userInfo-page .info-router{display:block\n}\n.userInfo-page .coverpart,.userInfo-page .coverpart .cover-background{position:fixed;top:0;left:0;width:100%;height:100%\n}\n.userInfo-page .coverpart .cover-background{background:#000;z-index:100;opacity:.2\n}\n.userInfo-page .coverpart .cover-content{width:94%;background:#fff;padding:17px;position:absolute;top:20%;left:3%;z-index:1000;border-radius:5px\n}\n.userInfo-page .coverpart .cover-content .sa-icon{width:90px;height:90px;border:4px solid #f8bb86;border-radius:50%;margin:20px auto;position:relative\n}\n.userInfo-page .coverpart .cover-content .sa-icon .sa-body{width:5px;height:47px;border-radius:2px;background:#f8bb86;position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:10px\n}\n.userInfo-page .coverpart .cover-content .sa-icon .sa-dot{width:7px;height:7px;border-radius:50%;background:#f8bb86;position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:10px\n}\n.userInfo-page .coverpart .cover-content h2{width:100%;text-align:center;font-size:30px;color:#575757;font-weight:500;margin:25px 0\n}\n.userInfo-page .coverpart .cover-content .sa-botton{width:100%;text-align:center\n}\n.userInfo-page .coverpart .cover-content .sa-botton button{display:inline-block;padding:.4rem 1rem;border-radius:4px;font-size:.6rem;color:#fff;letter-spacing:1px;margin-top:26px\n}\n.userInfo-page .coverpart .cover-content .sa-botton .waiting{background:#c1c1c1;margin-right:.4rem\n}\n.userInfo-page .coverpart .cover-content .sa-botton .quitlogin{background:#dd6b55\n}",""])},419:function(t,e,o){"use strict";o.r(e);var r=o(22),i=o.n(r),n=o(23),a={head:{title:"账户信息"},computed:i()({},Object(n.c)(["userInfo"])),methods:i()({},Object(n.b)(["outLogin"]),{outlogin:function(){this.outLogin(),this.$router.go(-1)}})},s=(o(402),o(13)),p=Object(s.a)(a,function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"userInfo-page"},[o("mt-header",{attrs:{fixed:"",title:"账户信息"}},[o("div",{attrs:{slot:"left"},on:{click:function(e){t.$router.go(-1)}},slot:"left"},[o("mt-button",{attrs:{icon:"back"}})],1)]),t._v(" "),o("section",{staticClass:"profile-info"},[o("section",{staticClass:"headportrait",staticStyle:{"margin-top":"0"}},[o("h2",[t._v("头像")]),t._v(" "),o("div",{staticClass:"headportrait-div"},[t.userInfo&&t.userInfo.user_id&&t.userInfo.avatar?o("img",{staticClass:"headportrait-div-top",attrs:{src:t.userInfo.avatar}}):o("img",{staticClass:"headportrait-div-top",attrs:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAMAAAAOusbgAAAAM1BMVEXE5/XI6fbT7fjW7/jl9fvw+f3////a8Pnt+PzL6vb7/v7i8/rP7Pf4/P7e8vn0+/3p9vvI4mwRAAACI0lEQVR4Ae3YBxbkIAgGYDCKgqbc/7LbS5hJexvMNr7Xp/0j9oBzzjnnnHPOuX8Qhq/wycwhJvopxQGfSM2F3pXcOZuj0DaJDN1gpSMRoY9B6Jhk6AALnSsI1tpIV0jrX+ZHyp3putwzN9XA8BmHmvolN1LGCWENp5GUADZYVGyGd1lFC4OJmVYqbKu0MoOFem22TPrv3cf004ywa6A1htvStdw2Go+vcC03C5EuzV3pSv/iQsqCllN4gj1tJmWC+342JV1dx8cGBuR8nEbznVHNkQW28UxKBeV+pRtsCrrMEsDGeLIIVlISgg08HqiYSIlgJRxWuoku8wA2VCU3dwVlZugQnE4PnYt+t05wR6FvysmeIPltrC8mC3U97t65bRQq9whO23uC6gRp9sFMa9NOJ8z2wWF3T1BvDfdXzLLb4oL7a1m9P53mq50PwSR42ltA2v6eEC2uFGH38Ja39wRVDUGDTSJudH+ETSg3G6wuESO8anxSpww3xF+aGvX+yWvQZ72rohQ0O+wFeI6q9QiPYr0cPGih31Rs1pfjBy2/KxnlYjJPtTYwNFy7CE5CnyzGxf4pMWzhQkTWyTjTWkV4hVW6PNhjIWUZdF+okgiDnSakSakhMHAItQhpAXom7xN+8nG1OnTawkRXJARzlc5V6KElOpYadJJH2jdm6CjPtG3O0FmL780eY4MncI5J6CtJMTM8iwODc84555xzzv0PPgKMKi2olgNo0QAAAABJRU5ErkJggg=="}}),t._v(" "),o("span",{staticClass:"headportrait-div-bottom"},[o("svg",{attrs:{fill:"#d8d8d8"}},[o("use",{attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#arrow-right"}})])])])]),t._v(" "),o("router-link",{staticClass:"info-router",attrs:{to:"/user/username"}},[o("section",{staticClass:"headportrait headportraitwo"},[o("h2",[t._v("用户名")]),t._v(" "),o("div",{staticClass:"headportrait-div"},[o("p",[t._v(t._s(t.userInfo.username))]),t._v(" "),o("span",{staticClass:"headportrait-div-bottom"},[o("svg",{attrs:{fill:"#d8d8d8"}},[o("use",{attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#arrow-right"}})])])])])]),t._v(" "),o("section",{staticClass:"bind-phone"},[t._v("\n 账号绑定\n ")]),t._v(" "),o("section",{staticClass:"info-router"},[o("section",{staticClass:"headportrait headportraitwo headportraithree"},[o("h2",[o("svg",{attrs:{fill:"#0097FF"}},[o("use",{attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#mobile"}})]),t._v("\n 手机\n ")]),t._v(" "),o("div",{staticClass:"headportrait-div"},[t.userInfo.mobile?o("p",[t._v(t._s(t.userInfo.mobile.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")))]):t._e(),t._v(" "),o("span",{staticClass:"headportrait-div-bottom"},[o("svg",{attrs:{fill:"#d8d8d8"}},[o("use",{attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#arrow-right"}})])])])])]),t._v(" "),o("section",{staticClass:"bind-phone"},[t._v("\n 安全设置\n ")]),t._v(" "),o("router-link",{staticClass:"info-router",attrs:{to:"/user/forget"}},[o("section",{staticClass:"headportrait headportraitwo headportraithree"},[o("h2",[t._v("登录密码")]),t._v(" "),o("div",{staticClass:"headportrait-div"},[o("p",{staticClass:"blue"},[t._v("修改")]),t._v(" "),o("span",{staticClass:"headportrait-div-bottom"},[o("svg",{attrs:{fill:"#d8d8d8"}},[o("use",{attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#arrow-right"}})])])])])]),t._v(" "),o("section",{staticClass:"exitlogin",on:{click:function(e){t.outlogin()}}},[t._v("退出登录")])],1)],1)},[],!1,null,null,null);p.options.__file="info.vue";e.default=p.exports}}]); -------------------------------------------------------------------------------- /dist/nuxt/304042af442e88979d27.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[5],{186:function(t,n,a){"use strict";n.a={IS_RELEASE:!0,BASE_URL:"//elm-api.caibowen.net",IMG_URL:"https://easytuan.gitee.io/node-elm-api/public/",HEADERS:{"Content-Type":"application/json;charset=UTF-8"},TIMEOUT:12e3}},337:function(t,n,a){var e=a(382);"string"==typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);(0,a(18).default)("9ff80e34",e,!0,{sourceMap:!1})},381:function(t,n,a){"use strict";var e=a(337);a.n(e).a},382:function(t,n,a){(t.exports=a(17)(!1)).push([t.i,"\n.download-page{padding:0\n}",""])},425:function(t,n,a){"use strict";a.r(n);var e=a(186),s={head:{title:"下载APP"},data:function(){return{startup:"".concat(e.a.IMG_URL,"startup.png")}}},i=(a(381),a(13)),o=Object(i.a)(s,function(){var t=this.$createElement,n=this._self._c||t;return n("div",{staticClass:"download-page"},[n("img",{attrs:{src:this.startup,alt:""}})])},[],!1,null,null,null);o.options.__file="download.vue";n.default=o.exports}}]); -------------------------------------------------------------------------------- /dist/nuxt/36e21aca6d5f734fc3d0.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[15],{186:function(t,e,n){"use strict";e.a={IS_RELEASE:!0,BASE_URL:"//elm-api.caibowen.net",IMG_URL:"https://easytuan.gitee.io/node-elm-api/public/",HEADERS:{"Content-Type":"application/json;charset=UTF-8"},TIMEOUT:12e3}},187:function(t,e,n){"use strict";n(51);var a=n(3),r=n.n(a),s=n(70),d=n.n(s),o=n(186),i=n(69);d.a.defaults.baseURL=o.a.BASE_URL,d.a.defaults.timeout=o.a.TIMEOUT,d.a.defaults.headers=o.a.HEADERS,d.a.interceptors.request.use(function(t){return o.a.IS_RELEASE||console.log("".concat((new Date).toLocaleString(),"【 M=").concat(t.url," 】P="),t.params||t.data),t},function(t){return Promise.reject(t)}),e.a=r()(regeneratorRuntime.mark(function t(){var e,n,a,r=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{method:"GET"},n=!0,"POST"!==e.method.toUpperCase()&&"PUT"!==e.method.toUpperCase()&&"PATCH"!==e.method.toUpperCase()&&(n=!1),t.next=5,d()({method:e.method,url:e.url,data:n?e.data:null,params:n?null:e.data});case 5:if(!((a=t.sent).status>=200&&a.status<300)){t.next=12;break}return o.a.IS_RELEASE||console.log("".concat((new Date).toLocaleString(),"【接口响应:】"),a.data),"undefined"!=typeof window&&0!==a.data.code&&Object(i.Toast)(a.data.msg),t.abrupt("return",a.data);case 12:"undefined"!=typeof window&&0!==a.data.code&&Object(i.Toast)("请求错误");case 13:case"end":return t.stop()}},t,this)}))},195:function(t,e,n){"use strict";n.d(e,"d",function(){return r}),n.d(e,"e",function(){return s}),n.d(e,"f",function(){return d}),n.d(e,"c",function(){return o}),n.d(e,"a",function(){return i}),n.d(e,"b",function(){return c});var a=n(187),r=function(t){return Object(a.a)({url:"".concat("/user","/login"),method:"POST",data:t})},s=function(t){return Object(a.a)({url:"".concat("/user","/retsetName"),method:"POST",data:t})},d=function(t){return Object(a.a)({url:"".concat("/user","/retsetPassword"),method:"POST",data:t})},o=function(t){return Object(a.a)({url:"".concat("/user","/getAddress"),method:"GET",data:t})},i=function(t){return Object(a.a)({url:"".concat("/user","/addAddress"),method:"POST",data:t})},c=function(t){return Object(a.a)({url:"".concat("/user","/deleteAddress"),method:"DELETE",data:t})}},370:function(t,e,n){var a=n(406);"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n(18).default)("b892aa82",a,!0,{sourceMap:!1})},404:function(t,e,n){t.exports=n.p+"img/4c99015.png"},405:function(t,e,n){"use strict";var a=n(370);n.n(a).a},406:function(t,e,n){(t.exports=n(17)(!1)).push([t.i,"\n.address-page{padding:1.87733rem 0 0\n}\n.address-page .add-address{width:100%;height:2.13333rem;line-height:2.13333rem;background:#fff;position:fixed;bottom:0;display:flex;justify-content:center;align-items:center;font-size:.68267rem;color:#3190e8\n}\n.address-page .add-address img{width:.85333rem;height:.85333rem;margin-right:5px\n}\n.address-page .address-item{display:flex;justify-content:space-between;align-items:center;height:2.98667rem;font-size:.72533rem;padding:0 .64rem;background:#fff\n}\n.address-page .address-item span{color:#666\n}\n.address-page .address-item .detail{font-size:.59733rem;color:#666\n}",""])},418:function(t,e,n){"use strict";n.r(e);n(51);var a,r,s=n(3),d=n.n(s),o=n(195),i=n(69),c={head:{title:"我的地址"},data:function(){return{addressList:[]}},mounted:function(){this.dataInit()},methods:{dataInit:(r=d()(regeneratorRuntime.mark(function t(){var e,n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(o.c)();case 2:e=t.sent,n=e.data,this.addressList=n;case 5:case"end":return t.stop()}},t,this)})),function(){return r.apply(this,arguments)}),delectAddress:(a=d()(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.MessageBox.confirm("删除该地址","删除地址");case 2:return t.prev=2,t.next=5,Object(o.b)({address_id:e});case 5:n=t.sent,0===n.code&&(Object(i.Toast)({message:"删除地址成功",position:"bottom",duration:1500}),this.dataInit()),t.next=12;break;case 10:t.prev=10,t.t0=t.catch(2);case 12:case"end":return t.stop()}},t,this,[[2,10]])})),function(t){return a.apply(this,arguments)})}},u=(n(405),n(13)),l=Object(u.a)(c,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"address-page"},[a("mt-header",{attrs:{fixed:"",title:"我的地址"}},[a("div",{attrs:{slot:"left"},on:{click:function(e){t.$router.go(-1)}},slot:"left"},[a("mt-button",{attrs:{icon:"back"}})],1)]),t._v(" "),a("ul",t._l(t.addressList,function(e){return a("li",{key:e.id,staticClass:"address-item"},[a("div",[a("p",[t._v("\n "+t._s(e.name)+"\n "),a("span",[t._v(t._s(e.phone))])]),t._v(" "),a("p",{staticClass:"detail"},[t._v(t._s(e.address)+" "+t._s(e.details))])]),t._v(" "),a("svg",{attrs:{width:"15",height:"15"},on:{click:function(n){t.delectAddress(e.id)}}},[a("use",{attrs:{"xlink:href":"#delete"}})])])})),t._v(" "),a("router-link",{staticClass:"add-address",attrs:{to:{path:"/user/addAddress",query:{pkid:0}},tag:"div"}},[a("img",{attrs:{src:n(404),alt:""}}),t._v("\n 新增收货地址\n ")])],1)},[],!1,null,null,null);l.options.__file="address.vue";e.default=l.exports}}]); -------------------------------------------------------------------------------- /dist/nuxt/5455e8fbdd4d0f5a6254.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{336:function(t,e,a){var n=a(380);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,a(18).default)("d6337634",n,!0,{sourceMap:!1})},379:function(t,e,a){"use strict";var n=a(336);a.n(n).a},380:function(t,e,a){(t.exports=a(17)(!1)).push([t.i,"\n.search-page{padding:1.87733rem 0 0\n}",""])},420:function(t,e,a){"use strict";a.r(e);var n={head:{title:"搜索"},data:function(){return{value:""}}},s=(a(379),a(13)),r=Object(s.a)(n,function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"search-page"},[e("mt-header",{attrs:{fixed:"",title:"搜索"}},[e("router-link",{attrs:{slot:"left",to:"/"},slot:"left"},[e("mt-button",{attrs:{icon:"back"}})],1)],1)],1)},[],!1,null,null,null);r.options.__file="search.vue";e.default=r.exports}}]); -------------------------------------------------------------------------------- /dist/nuxt/5865da82b7a58b6331ef.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[17],{186:function(t,e,n){"use strict";e.a={IS_RELEASE:!0,BASE_URL:"//elm-api.caibowen.net",IMG_URL:"https://easytuan.gitee.io/node-elm-api/public/",HEADERS:{"Content-Type":"application/json;charset=UTF-8"},TIMEOUT:12e3}},372:function(t,e,n){var i=n(410);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,n(18).default)("a7575b42",i,!0,{sourceMap:!1})},409:function(t,e,n){"use strict";var i=n(372);n.n(i).a},410:function(t,e,n){(t.exports=n(17)(!1)).push([t.i,"\n.benefit-page{text-align:center\n}\n.benefit-page .benefit-img{width:60vw;margin:30% auto 0\n}\n.benefit-page h2{margin:.64rem 0;font-size:.68267rem;font-weight:400;color:#6a6a6a\n}\n.benefit-page p{font-size:.512rem;color:#999\n}",""])},415:function(t,e,n){"use strict";n.r(e);var i=n(186),a={head:{title:"我的优惠"},data:function(){return{benefit:"".concat(i.a.IMG_URL,"benefit.gif")}}},o=(n(409),n(13)),s=Object(o.a)(a,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"benefit-page"},[n("mt-header",{attrs:{fixed:"",title:"我的优惠"}},[n("div",{attrs:{slot:"left"},on:{click:function(e){t.$router.go(-1)}},slot:"left"},[n("mt-button",{attrs:{icon:"back"}})],1)]),t._v(" "),n("img",{staticClass:"benefit-img",attrs:{src:t.benefit,alt:""}}),t._v(" "),n("h2",[t._v("没有红包")]),t._v(" "),n("p",[t._v("快去抢几个吧")])],1)},[],!1,null,null,null);s.options.__file="benefit.vue";e.default=s.exports}}]); -------------------------------------------------------------------------------- /dist/nuxt/5d2fd86eba958ee3e0b9.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[23],{193:function(t,o,n){var e=n(209);"string"==typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);(0,n(18).default)("072daf24",e,!0,{sourceMap:!1})},208:function(t,o,n){"use strict";var e=n(193);n.n(e).a},209:function(t,o,n){(t.exports=n(17)(!1)).push([t.i,"\n.cartcontrol{display:flex;align-items:center\n}\n.cartcontrol .inner{width:24px;height:24px\n}\n.cartcontrol .cart-count{display:inline-block;vertical-align:top;width:25px;text-align:center;font-size:15px;color:#333\n}\n.cartcontrol .cart-add{display:inline-block;padding:6px;line-height:24px;font-size:24px;color:#00a0dc\n}",""])},34:function(t,o,n){"use strict";n.r(o);var e=n(0),a={props:["food"],methods:{addCart:function(t){this.food.count?this.food.count++:e.default.set(this.food,"count",1),this.$emit("add",t.target)},decreaseCart:function(t){this.food.count&&this.food.count--}}},i=(n(208),n(13)),c=Object(i.a)(a,function(){var t=this,o=t.$createElement,n=t._self._c||o;return n("div",{staticClass:"cartcontrol"},[n("svg",{directives:[{name:"show",rawName:"v-show",value:t.food.count>0,expression:"food.count>0"}],staticClass:"inner",attrs:{fill:"rgb(35, 149, 255)"},on:{click:function(o){return o.stopPropagation(),o.preventDefault(),t.decreaseCart(o)}}},[n("use",{attrs:{"xlink:href":"#cart-minus"}})]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.food.count>0,expression:"food.count>0"}],staticClass:"cart-count"},[t._v(t._s(t.food.count))]),t._v(" "),n("svg",{attrs:{width:"24",height:"24",fill:"rgb(35, 149, 255)"},on:{click:t.addCart}},[n("use",{attrs:{"xlink:href":"#cart-add"}})])])},[],!1,null,null,null);c.options.__file="cartcontrol.vue";o.default=c.exports}}]); -------------------------------------------------------------------------------- /dist/nuxt/81a11e366a76ecb7fd21.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[10],{186:function(t,a,e){"use strict";a.a={IS_RELEASE:!0,BASE_URL:"//elm-api.caibowen.net",IMG_URL:"https://easytuan.gitee.io/node-elm-api/public/",HEADERS:{"Content-Type":"application/json;charset=UTF-8"},TIMEOUT:12e3}},188:function(t,a,e){var i=e(198);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,e(18).default)("24adb7b2",i,!0,{sourceMap:!1})},197:function(t,a,e){"use strict";var i=e(188);e.n(i).a},198:function(t,a,e){(t.exports=e(17)(!1)).push([t.i,"\n.mint-tabbar>.mint-tab-item.is-selected[data-v-eb6c6784]{background:#fafafa\n}\n.mint-tab-item-icon[data-v-eb6c6784]{width:22px;height:22px\n}\n.mint-tabbar[data-v-eb6c6784]{color:#818181;position:fixed\n}\n.mint-tabbar>.mint-tab-item.is-selected[data-v-eb6c6784]{color:#4aa5f0\n}",""])},206:function(t,a,e){"use strict";e(54);var i={props:{page:{default:0}},data:function(){return{selected:0}},created:function(){this.selected=this.page},methods:{goPage:function(t){this.$router.replace(t)}}},n=(e(197),e(13)),l=Object(n.a)(i,function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("mt-tabbar",{model:{value:t.selected,callback:function(a){t.selected=a},expression:"selected"}},[e("mt-tab-item",{attrs:{id:"0"}},[e("div",{on:{click:function(a){t.goPage("/")}}},[e("div",{staticClass:"mint-tab-item-icon"},[0==t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#4aa5f0","fill-rule":"evenodd",d:"M16.822 17.089l.456.707c.212.33.14.778-.174 1.033a9.91 9.91 0 0 1-.767.555 9.817 9.817 0 0 1-7.473 1.395 9.867 9.867 0 0 1-6.265-4.334C-.383 11.822.927 5.618 5.52 2.616a9.81 9.81 0 0 1 7.475-1.394 9.866 9.866 0 0 1 6.264 4.334c.166.258.323.528.466.803.19.385.072.82-.262 1.039l-9.05 5.916a.783.783 0 0 1-1.086-.232l-.47-.73a1.668 1.668 0 0 1 .484-2.295l5.766-3.769a.286.286 0 0 0 .03-.455 6.576 6.576 0 0 0-7.821-.434 6.636 6.636 0 0 0-2.877 4.213 6.671 6.671 0 0 0 .926 5.026c1.99 3.085 6.104 3.968 9.17 1.969a1.65 1.65 0 0 1 2.288.482zm3.878-5.445c.56.863.314 2.02-.549 2.58l-.906.59a.786.786 0 0 1-1.086-.232l-1.177-1.812a.787.787 0 0 1 .23-1.086l1.813-1.176a.783.783 0 0 1 1.086.23l.589.906z"}})]):t._e(),t._v(" "),0!=t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#818181","fill-rule":"nonzero",d:"M7.924 6.273A5.597 5.597 0 0 0 5.48 9.828a5.596 5.596 0 0 0 .787 4.242 5.646 5.646 0 0 0 7.793 1.66 2.188 2.188 0 0 1 3.02.638l.43.663c.377.58.247 1.358-.3 1.798a10 10 0 0 1-.771.555 9.93 9.93 0 0 1-7.523 1.395 9.937 9.937 0 0 1-6.306-4.334C-.393 11.82.926 5.618 5.55 2.615a9.935 9.935 0 0 1 7.523-1.393 9.937 9.937 0 0 1 6.781 5.148c.318.64.12 1.396-.467 1.777l-8.54 5.546c-.632.41-1.478.23-1.89-.401l-.443-.684a2.182 2.182 0 0 1 .641-3.016l5.011-3.255a5.612 5.612 0 0 0-6.242-.064zm6.813 10.507c-3.184 2.062-7.453 1.152-9.519-2.03a6.846 6.846 0 0 1-.96-5.182 6.847 6.847 0 0 1 2.986-4.344 6.869 6.869 0 0 1 8.13.46.892.892 0 0 1-.098 1.422l-5.44 3.534a.932.932 0 0 0-.274 1.287l.444.684a.117.117 0 0 0 .16.034l8.54-5.547c.05-.032.067-.095.035-.16a8.687 8.687 0 0 0-5.928-4.494 8.685 8.685 0 0 0-6.583 1.22c-4.044 2.627-5.198 8.056-2.572 12.1a8.686 8.686 0 0 0 5.517 3.792 8.68 8.68 0 0 0 6.583-1.22c.231-.15.458-.314.672-.483.047-.038.057-.102.032-.142l-.43-.662a.938.938 0 0 0-1.295-.269zm5.88-5.517c.714 1.099.4 2.571-.697 3.284l-.851.553a1.362 1.362 0 0 1-1.882-.401l-1.103-1.7a1.362 1.362 0 0 1 .4-1.882l1.699-1.102a1.357 1.357 0 0 1 1.883.399l.552.85zm-1.6-.168a.107.107 0 0 0-.07-.048.107.107 0 0 0-.083.016l-1.699 1.102a.112.112 0 0 0-.032.154l1.102 1.698c.021.032.056.05.095.05a.108.108 0 0 0 .06-.016l.849-.552c.519-.337.667-1.035.33-1.555l-.551-.849z"}})]):t._e()]),t._v("\n 首页\n ")])]),t._v(" "),e("mt-tab-item",{attrs:{id:"1"}},[e("div",{on:{click:function(a){t.goPage("/discover")}}},[e("div",{staticClass:"mint-tab-item-icon"},[1==t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#4aa5f0","fill-rule":"evenodd",d:"M3.929 3.929c3.899-3.9 10.243-3.9 14.142 0 3.899 3.899 3.899 10.243 0 14.142-3.899 3.9-10.243 3.9-14.142 0-3.9-3.899-3.9-10.243 0-14.142zM14.639 7a.363.363 0 0 0-.146.03l-4.39 1.901c-.254.11-.493.264-.701.471a2.23 2.23 0 0 0-.476.712l-1.896 4.38a.363.363 0 0 0 .476.476l4.38-1.896a2.203 2.203 0 0 0 1.183-1.178l1.9-4.39A.363.363 0 0 0 14.64 7zM11 12a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"}})]):t._e(),t._v(" "),1!=t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#818181","fill-rule":"nonzero",d:"M16.62 2.727a.75.75 0 0 1-.844 1.24 8.455 8.455 0 0 0-4.095-1.44 8.5 8.5 0 0 0-9.153 7.792 8.499 8.499 0 0 0 7.79 9.153 8.5 8.5 0 0 0 9.154-7.791 8.46 8.46 0 0 0-1.435-5.449.75.75 0 1 1 1.24-.842 9.96 9.96 0 0 1 1.69 6.411c-.442 5.505-5.264 9.609-10.768 9.166-5.505-.442-9.61-5.263-9.166-10.768C1.475 4.694 6.296.59 11.8 1.033c1.75.14 3.398.727 4.819 1.694zM14.638 7c.244 0 .44.254.331.506l-1.9 4.39c-.11.255-.264.494-.471.702-.21.21-.454.367-.712.476l-4.38 1.895a.363.363 0 0 1-.476-.476l1.895-4.38c.11-.258.266-.5.477-.711.207-.208.447-.362.7-.471l4.391-1.9A.367.367 0 0 1 14.638 7zM12.45 9.55l-1.751.757a.737.737 0 0 0-.237.156.753.753 0 0 0-.156.236l-.758 1.752 1.742-.753a.766.766 0 0 0 .247-.161.733.733 0 0 0 .154-.234l.76-1.754z"}})]):t._e()]),t._v("\n 发现\n ")])]),t._v(" "),e("mt-tab-item",{attrs:{id:"2"}},[e("div",{on:{click:function(a){t.goPage("/order")}}},[e("div",{staticClass:"mint-tab-item-icon"},[2==t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#4aa5f0","fill-rule":"evenodd",d:"M2.75 1.5h16.5a.75.75 0 0 1 .75.75v11.5a6.758 6.758 0 0 1-6.75 6.75H2.75a.75.75 0 0 1-.75-.75V2.25a.75.75 0 0 1 .75-.75zm12 6.5a.75.75 0 0 0 0-1.5h-7.5a.75.75 0 0 0 0 1.5h7.5zm-3.002 5.003a.75.75 0 0 0 0-1.5H7.25a.75.75 0 0 0 0 1.5h4.498z"}})]):t._e(),t._v(" "),2!=t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#818181","fill-rule":"nonzero",d:"M7.25 8a.75.75 0 0 1 0-1.5h7.5a.75.75 0 1 1 0 1.5h-7.5zm0 5.004a.75.75 0 1 1 0-1.5h4.498a.75.75 0 1 1 0 1.5H7.25zM3.5 3v16h9.75c2.9 0 5.25-2.35 5.25-5.25V5.748a.75.75 0 1 1 1.5 0v8.002a6.75 6.75 0 0 1-6.75 6.75H2.75a.75.75 0 0 1-.75-.75V2.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 1 1 0 1.5H3.5z"}})]):t._e()]),t._v("\n 订单\n ")])]),t._v(" "),e("mt-tab-item",{attrs:{id:"3"}},[e("div",{on:{click:function(a){t.goPage("/user")}}},[e("div",{staticClass:"mint-tab-item-icon"},[3==t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#4aa5f0","fill-rule":"evenodd",d:"M11 1c2.757 0 5 2.243 5 5v1c0 2.757-2.243 5-5 5S6 9.757 6 7V6c0-2.757 2.243-5 5-5zm5.967 10.071A6.76 6.76 0 0 1 21 17.251v3a.75.75 0 0 1-.75.75H1.75a.75.75 0 0 1-.75-.75v-3a6.76 6.76 0 0 1 4.033-6.18.992.992 0 0 1 1.135.263A6.476 6.476 0 0 0 11 13.5c1.919 0 3.642-.84 4.832-2.166a.993.993 0 0 1 1.135-.263z"}})]):t._e(),t._v(" "),3!=t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#818181","fill-rule":"nonzero",d:"M10.955 12H7.75a5.25 5.25 0 0 0-5.25 5.25v2.25h17v-2.25a5.244 5.244 0 0 0-2.626-4.548.75.75 0 0 1 .75-1.3l.183.11A6.745 6.745 0 0 1 21 17.25v3a.75.75 0 0 1-.75.75H1.75a.75.75 0 0 1-.75-.75v-3a6.75 6.75 0 0 1 6.436-6.743A4.984 4.984 0 0 1 6 7V6a5 5 0 0 1 10 0v1a5 5 0 0 1-5.045 5zM11 10.5A3.5 3.5 0 0 0 14.5 7V6a3.5 3.5 0 0 0-7 0v1a3.5 3.5 0 0 0 3.5 3.5z"}})]):t._e()]),t._v("\n 我的\n ")])])],1)},[],!1,null,"eb6c6784",null);l.options.__file="tabbar.vue";a.a=l.exports},365:function(t,a,e){var i=e(395);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,e(18).default)("4943bf9a",i,!0,{sourceMap:!1})},394:function(t,a,e){"use strict";var i=e(365);e.n(i).a},395:function(t,a,e){(t.exports=e(17)(!1)).push([t.i,"\n.order-page{padding:1.87733rem 0 53px\n}\n.order-page .no-data{text-align:center\n}\n.order-page .no-data .nodata{width:8.53333rem;height:8.53333rem;margin:15vh auto .21333rem\n}\n.order-page .no-data p{color:#6a6a6a;font-size:.68267rem;margin-bottom:.32rem\n}\n.order-page .no-data .login{width:5.12rem;height:1.70667rem;background:#56d176;border:none;color:#fff;font-size:.59733rem;border-radius:2px\n}",""])},426:function(t,a,e){"use strict";e.r(a);var i=e(22),n=e.n(i),l=e(186),o=e(206),r=e(23),s={components:{Tabbar:o.a},head:{title:"订单"},data:function(){return{nodata:"".concat(l.a.IMG_URL,"nodata.png")}},computed:n()({},Object(r.c)(["userInfo"]))},c=(e(394),e(13)),d=Object(c.a)(s,function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"order-page"},[e("mt-header",{attrs:{fixed:"",title:"订单"}}),t._v(" "),e("div",{staticClass:"no-data"},[e("img",{staticClass:"nodata",attrs:{src:t.nodata,alt:""}}),t._v(" "),t.userInfo&&t.userInfo.user_id?t._e():e("p",[t._v("登陆后查看外卖订单")]),t._v(" "),t.userInfo&&t.userInfo.user_id?e("p",[t._v("暂无订单信息")]):t._e(),t._v(" "),t.userInfo&&t.userInfo.user_id?t._e():e("button",{staticClass:"login",on:{click:function(a){t.$router.push("/login")}}},[t._v("立即登录")])]),t._v(" "),e("Tabbar",{attrs:{page:"2"}})],1)},[],!1,null,null,null);d.options.__file="order.vue";a.default=d.exports}}]); -------------------------------------------------------------------------------- /dist/nuxt/81cbb94a52a968507b35.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[12],{186:function(e,t,n){"use strict";t.a={IS_RELEASE:!0,BASE_URL:"//elm-api.caibowen.net",IMG_URL:"https://easytuan.gitee.io/node-elm-api/public/",HEADERS:{"Content-Type":"application/json;charset=UTF-8"},TIMEOUT:12e3}},187:function(e,t,n){"use strict";n(51);var a=n(3),r=n.n(a),s=n(70),o=n.n(s),u=n(186),c=n(69);o.a.defaults.baseURL=u.a.BASE_URL,o.a.defaults.timeout=u.a.TIMEOUT,o.a.defaults.headers=u.a.HEADERS,o.a.interceptors.request.use(function(e){return u.a.IS_RELEASE||console.log("".concat((new Date).toLocaleString(),"【 M=").concat(e.url," 】P="),e.params||e.data),e},function(e){return Promise.reject(e)}),t.a=r()(regeneratorRuntime.mark(function e(){var t,n,a,r=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{method:"GET"},n=!0,"POST"!==t.method.toUpperCase()&&"PUT"!==t.method.toUpperCase()&&"PATCH"!==t.method.toUpperCase()&&(n=!1),e.next=5,o()({method:t.method,url:t.url,data:n?t.data:null,params:n?null:t.data});case 5:if(!((a=e.sent).status>=200&&a.status<300)){e.next=12;break}return u.a.IS_RELEASE||console.log("".concat((new Date).toLocaleString(),"【接口响应:】"),a.data),"undefined"!=typeof window&&0!==a.data.code&&Object(c.Toast)(a.data.msg),e.abrupt("return",a.data);case 12:"undefined"!=typeof window&&0!==a.data.code&&Object(c.Toast)("请求错误");case 13:case"end":return e.stop()}},e,this)}))},195:function(e,t,n){"use strict";n.d(t,"d",function(){return r}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return o}),n.d(t,"c",function(){return u}),n.d(t,"a",function(){return c}),n.d(t,"b",function(){return i});var a=n(187),r=function(e){return Object(a.a)({url:"".concat("/user","/login"),method:"POST",data:e})},s=function(e){return Object(a.a)({url:"".concat("/user","/retsetName"),method:"POST",data:e})},o=function(e){return Object(a.a)({url:"".concat("/user","/retsetPassword"),method:"POST",data:e})},u=function(e){return Object(a.a)({url:"".concat("/user","/getAddress"),method:"GET",data:e})},c=function(e){return Object(a.a)({url:"".concat("/user","/addAddress"),method:"POST",data:e})},i=function(e){return Object(a.a)({url:"".concat("/user","/deleteAddress"),method:"DELETE",data:e})}},367:function(e,t,n){var a=n(399);"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,n(18).default)("6f41b0cb",a,!0,{sourceMap:!1})},398:function(e,t,n){"use strict";var a=n(367);n.n(a).a},399:function(e,t,n){(e.exports=n(17)(!1)).push([e.i,"\n.discover-page{padding:1.87733rem 0 0\n}\n.discover-page .setname{padding:0 .64rem\n}\n.discover-page .setname p{width:100%;font-size:.4rem;color:#666;padding:.4rem 0 1rem\n}\n.discover-page .setname .unlikep{font-size:.58rem;color:#a9a9a9;padding:.42667rem 0\n}\n.discover-page .setname .submit{box-sizing:border-box;width:100%;height:2.048rem;background:#56d176;border:none;color:#fff;font-size:.72533rem;border-radius:8px\n}",""])},422:function(e,t,n){"use strict";n.r(t);n(51);var a,r=n(3),s=n.n(r),o=n(22),u=n.n(o),c=n(69),i=n(195),d=n(23),l={head:{title:"修改用户名"},data:function(){return{username:""}},methods:u()({},Object(d.b)(["update"]),{submit:(a=s()(regeneratorRuntime.mark(function e(){var t,n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==this.username){e.next=3;break}return Object(c.Toast)("请输入用户名"),e.abrupt("return");case 3:if(!(this.username.length<2||this.username.length>24)){e.next=6;break}return Object(c.Toast)("用户名长度不合法"),e.abrupt("return");case 6:return e.next=8,Object(i.e)({username:this.username});case 8:t=e.sent,0===t.code&&(Object(c.Toast)("修改成功"),this.update({username:this.username}),setTimeout(function(){n.$router.go(-1)},1e3));case 11:case"end":return e.stop()}},e,this)})),function(){return a.apply(this,arguments)})})},m=(n(398),n(13)),f=Object(m.a)(l,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"discover-page"},[n("mt-header",{attrs:{fixed:"",title:"修改用户名"}},[n("div",{attrs:{slot:"left"},on:{click:function(t){e.$router.go(-1)}},slot:"left"},[n("mt-button",{attrs:{icon:"back"}})],1)]),e._v(" "),n("div",{staticStyle:{height:"10px"}}),e._v(" "),n("mt-field",{attrs:{placeholder:"请输入用户名"},model:{value:e.username,callback:function(t){e.username=t},expression:"username"}}),e._v(" "),n("section",{staticClass:"setname"},[n("p",{staticClass:"unlikep"},[e._v("用户名长度在2到24位之间")]),e._v(" "),n("button",{staticClass:"submit",on:{click:function(t){e.submit()}}},[e._v("确认修改")])])],1)},[],!1,null,null,null);f.options.__file="username.vue";t.default=f.exports}}]); -------------------------------------------------------------------------------- /dist/nuxt/LICENSES: -------------------------------------------------------------------------------- 1 | /** 2 | * [js-md5]{@link https://github.com/emn178/js-md5} 3 | * 4 | * @namespace md5 5 | * @version 0.7.3 6 | * @author Chen, Yi-Cyuan [emn178@gmail.com] 7 | * @copyright Chen, Yi-Cyuan 2014-2017 8 | * @license MIT 9 | */ 10 | 11 | /** 12 | * [js-md5]{@link https://github.com/emn178/js-md5} 13 | * 14 | * @namespace md5 15 | * @version 0.7.3 16 | * @author Chen, Yi-Cyuan [emn178@gmail.com] 17 | * @copyright Chen, Yi-Cyuan 2014-2017 18 | * @license MIT 19 | */ 20 | 21 | /** 22 | * [js-md5]{@link https://github.com/emn178/js-md5} 23 | * 24 | * @namespace md5 25 | * @version 0.7.3 26 | * @author Chen, Yi-Cyuan [emn178@gmail.com] 27 | * @copyright Chen, Yi-Cyuan 2014-2017 28 | * @license MIT 29 | */ 30 | 31 | /** 32 | * [js-md5]{@link https://github.com/emn178/js-md5} 33 | * 34 | * @namespace md5 35 | * @version 0.7.3 36 | * @author Chen, Yi-Cyuan [emn178@gmail.com] 37 | * @copyright Chen, Yi-Cyuan 2014-2017 38 | * @license MIT 39 | */ 40 | 41 | /*! 42 | * Vue.js v2.5.17 43 | * (c) 2014-2018 Evan You 44 | * Released under the MIT License. 45 | */ 46 | 47 | /** 48 | * vuex v3.0.1 49 | * (c) 2017 Evan You 50 | * @license MIT 51 | */ 52 | 53 | /*! 54 | * JavaScript Cookie v2.2.0 55 | * https://github.com/js-cookie/js-cookie 56 | * 57 | * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 58 | * Released under the MIT license 59 | */ 60 | 61 | /** 62 | * vue-router v3.0.1 63 | * (c) 2017 Evan You 64 | * @license MIT 65 | */ 66 | 67 | /** 68 | * vue-meta v1.5.5 69 | * (c) 2018 Declan de Wet & Sébastien Chopin (@Atinux) 70 | * @license MIT 71 | */ 72 | 73 | /* 74 | object-assign 75 | (c) Sindre Sorhus 76 | @license MIT 77 | */ 78 | 79 | /*! 80 | * Determine if an object is a Buffer 81 | * 82 | * @author Feross Aboukhadijeh 83 | * @license MIT 84 | */ 85 | 86 | /*! 87 | * vue-no-ssr v1.0.0 88 | * (c) 2018-present egoist <0x142857@gmail.com> 89 | * Released under the MIT License. 90 | */ 91 | 92 | /*! 93 | * Vue-Lazyload.js v1.2.6 94 | * (c) 2018 Awe 95 | * Released under the MIT License. 96 | */ 97 | -------------------------------------------------------------------------------- /dist/nuxt/ad79a751146a41a1bf69.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[18],{105:function(e,n,t){"use strict";t.r(n);var a=t(186),s={props:{seller:{default:{}}},computed:{banner:function(){return a.a.IMG_URL+this.seller.banner}}},o=(t(344),t(13)),r=Object(o.a)(s,function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"shop-header"},[t("div",{staticClass:"head"},[t("nav",{style:"background-image: url('"+e.banner+"');"},[t("i",{staticClass:"mintui mintui-back",on:{click:function(n){e.$router.go(-1)}}}),e._v(" "),t("img",{staticClass:"shop-logo",attrs:{src:e.seller.avatar}})])]),e._v(" "),t("div",{staticClass:"content"},[t("h2",[e._v(e._s(e.seller.name))]),e._v(" "),t("div",{staticClass:"info"},[t("span",[e._v("评价"+e._s(e.seller.score))]),e._v(" "),t("span",[e._v("月售"+e._s(e.seller.sellCount)+"单")]),e._v(" "),t("span",[e._v("蜂鸟快送约"+e._s(e.seller.deliveryTime)+"分钟")])])]),e._v(" "),t("div",{staticClass:"foot"},[t("p",[t("mt-badge",{attrs:{size:"small",color:"rgb(240, 115, 115)"}},[e._v("满减")]),e._v("\n 满36减21,满50减26,满80减44\n ")],1),e._v(" "),t("span",{staticClass:"announcement"},[e._v("公告:专注汉堡品牌,华莱士简单有滋味,本店位于:金港路183号。如果您的美食凉了,或者口味不好,错送,漏送等,请及时联系我们:18385528274,如您对我们的送餐服务口味满意请给5星好评哟,谢谢!我们将竭诚为您服务!")])])])},[],!1,null,null,null);r.options.__file="header.vue";n.default=r.exports},186:function(e,n,t){"use strict";n.a={IS_RELEASE:!0,BASE_URL:"//elm-api.caibowen.net",IMG_URL:"https://easytuan.gitee.io/node-elm-api/public/",HEADERS:{"Content-Type":"application/json;charset=UTF-8"},TIMEOUT:12e3}},199:function(e,n,t){var a=t(345);"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,t(18).default)("de5f1534",a,!0,{sourceMap:!1})},344:function(e,n,t){"use strict";var a=t(199);t.n(a).a},345:function(e,n,t){(e.exports=t(17)(!1)).push([e.i,"\n.shop-header{background:#fff\n}\n.shop-header .head{height:4.26667rem\n}\n.shop-header .head nav{height:4.26667rem;background-position:50%;background-size:cover;background-repeat:no-repeat;padding:.21333rem;position:relative\n}\n.shop-header .head nav .mintui-back{font-size:.98133rem;color:#fff\n}\n.shop-header .head nav .shop-logo{width:3.2rem;height:3.2rem;position:absolute;bottom:-10px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)\n}\n.shop-header .content{font-size:.512rem;margin-top:1.06667rem;text-align:center\n}\n.shop-header .content h2{font-size:.85333rem\n}\n.shop-header .content .info{color:#666\n}\n.shop-header .content .info span{margin:0 .21333rem\n}\n.shop-header .foot{padding:0 1.49333rem;margin-top:10px;font-size:.512rem\n}\n.shop-header .foot .mint-badge{-webkit-transform:scale(.8) translateX(-10%);transform:scale(.8) translateX(-10%);border-radius:1px\n}\n.shop-header .foot .announcement{display:inline-block;width:100%;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap\n}",""])}}]); -------------------------------------------------------------------------------- /dist/nuxt/af39b561142935cada55.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[9],{186:function(t,a,e){"use strict";a.a={IS_RELEASE:!0,BASE_URL:"//elm-api.caibowen.net",IMG_URL:"https://easytuan.gitee.io/node-elm-api/public/",HEADERS:{"Content-Type":"application/json;charset=UTF-8"},TIMEOUT:12e3}},188:function(t,a,e){var i=e(198);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,e(18).default)("24adb7b2",i,!0,{sourceMap:!1})},197:function(t,a,e){"use strict";var i=e(188);e.n(i).a},198:function(t,a,e){(t.exports=e(17)(!1)).push([t.i,"\n.mint-tabbar>.mint-tab-item.is-selected[data-v-eb6c6784]{background:#fafafa\n}\n.mint-tab-item-icon[data-v-eb6c6784]{width:22px;height:22px\n}\n.mint-tabbar[data-v-eb6c6784]{color:#818181;position:fixed\n}\n.mint-tabbar>.mint-tab-item.is-selected[data-v-eb6c6784]{color:#4aa5f0\n}",""])},206:function(t,a,e){"use strict";e(54);var i={props:{page:{default:0}},data:function(){return{selected:0}},created:function(){this.selected=this.page},methods:{goPage:function(t){this.$router.replace(t)}}},l=(e(197),e(13)),s=Object(l.a)(i,function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("mt-tabbar",{model:{value:t.selected,callback:function(a){t.selected=a},expression:"selected"}},[e("mt-tab-item",{attrs:{id:"0"}},[e("div",{on:{click:function(a){t.goPage("/")}}},[e("div",{staticClass:"mint-tab-item-icon"},[0==t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#4aa5f0","fill-rule":"evenodd",d:"M16.822 17.089l.456.707c.212.33.14.778-.174 1.033a9.91 9.91 0 0 1-.767.555 9.817 9.817 0 0 1-7.473 1.395 9.867 9.867 0 0 1-6.265-4.334C-.383 11.822.927 5.618 5.52 2.616a9.81 9.81 0 0 1 7.475-1.394 9.866 9.866 0 0 1 6.264 4.334c.166.258.323.528.466.803.19.385.072.82-.262 1.039l-9.05 5.916a.783.783 0 0 1-1.086-.232l-.47-.73a1.668 1.668 0 0 1 .484-2.295l5.766-3.769a.286.286 0 0 0 .03-.455 6.576 6.576 0 0 0-7.821-.434 6.636 6.636 0 0 0-2.877 4.213 6.671 6.671 0 0 0 .926 5.026c1.99 3.085 6.104 3.968 9.17 1.969a1.65 1.65 0 0 1 2.288.482zm3.878-5.445c.56.863.314 2.02-.549 2.58l-.906.59a.786.786 0 0 1-1.086-.232l-1.177-1.812a.787.787 0 0 1 .23-1.086l1.813-1.176a.783.783 0 0 1 1.086.23l.589.906z"}})]):t._e(),t._v(" "),0!=t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#818181","fill-rule":"nonzero",d:"M7.924 6.273A5.597 5.597 0 0 0 5.48 9.828a5.596 5.596 0 0 0 .787 4.242 5.646 5.646 0 0 0 7.793 1.66 2.188 2.188 0 0 1 3.02.638l.43.663c.377.58.247 1.358-.3 1.798a10 10 0 0 1-.771.555 9.93 9.93 0 0 1-7.523 1.395 9.937 9.937 0 0 1-6.306-4.334C-.393 11.82.926 5.618 5.55 2.615a9.935 9.935 0 0 1 7.523-1.393 9.937 9.937 0 0 1 6.781 5.148c.318.64.12 1.396-.467 1.777l-8.54 5.546c-.632.41-1.478.23-1.89-.401l-.443-.684a2.182 2.182 0 0 1 .641-3.016l5.011-3.255a5.612 5.612 0 0 0-6.242-.064zm6.813 10.507c-3.184 2.062-7.453 1.152-9.519-2.03a6.846 6.846 0 0 1-.96-5.182 6.847 6.847 0 0 1 2.986-4.344 6.869 6.869 0 0 1 8.13.46.892.892 0 0 1-.098 1.422l-5.44 3.534a.932.932 0 0 0-.274 1.287l.444.684a.117.117 0 0 0 .16.034l8.54-5.547c.05-.032.067-.095.035-.16a8.687 8.687 0 0 0-5.928-4.494 8.685 8.685 0 0 0-6.583 1.22c-4.044 2.627-5.198 8.056-2.572 12.1a8.686 8.686 0 0 0 5.517 3.792 8.68 8.68 0 0 0 6.583-1.22c.231-.15.458-.314.672-.483.047-.038.057-.102.032-.142l-.43-.662a.938.938 0 0 0-1.295-.269zm5.88-5.517c.714 1.099.4 2.571-.697 3.284l-.851.553a1.362 1.362 0 0 1-1.882-.401l-1.103-1.7a1.362 1.362 0 0 1 .4-1.882l1.699-1.102a1.357 1.357 0 0 1 1.883.399l.552.85zm-1.6-.168a.107.107 0 0 0-.07-.048.107.107 0 0 0-.083.016l-1.699 1.102a.112.112 0 0 0-.032.154l1.102 1.698c.021.032.056.05.095.05a.108.108 0 0 0 .06-.016l.849-.552c.519-.337.667-1.035.33-1.555l-.551-.849z"}})]):t._e()]),t._v("\n 首页\n ")])]),t._v(" "),e("mt-tab-item",{attrs:{id:"1"}},[e("div",{on:{click:function(a){t.goPage("/discover")}}},[e("div",{staticClass:"mint-tab-item-icon"},[1==t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#4aa5f0","fill-rule":"evenodd",d:"M3.929 3.929c3.899-3.9 10.243-3.9 14.142 0 3.899 3.899 3.899 10.243 0 14.142-3.899 3.9-10.243 3.9-14.142 0-3.9-3.899-3.9-10.243 0-14.142zM14.639 7a.363.363 0 0 0-.146.03l-4.39 1.901c-.254.11-.493.264-.701.471a2.23 2.23 0 0 0-.476.712l-1.896 4.38a.363.363 0 0 0 .476.476l4.38-1.896a2.203 2.203 0 0 0 1.183-1.178l1.9-4.39A.363.363 0 0 0 14.64 7zM11 12a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"}})]):t._e(),t._v(" "),1!=t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#818181","fill-rule":"nonzero",d:"M16.62 2.727a.75.75 0 0 1-.844 1.24 8.455 8.455 0 0 0-4.095-1.44 8.5 8.5 0 0 0-9.153 7.792 8.499 8.499 0 0 0 7.79 9.153 8.5 8.5 0 0 0 9.154-7.791 8.46 8.46 0 0 0-1.435-5.449.75.75 0 1 1 1.24-.842 9.96 9.96 0 0 1 1.69 6.411c-.442 5.505-5.264 9.609-10.768 9.166-5.505-.442-9.61-5.263-9.166-10.768C1.475 4.694 6.296.59 11.8 1.033c1.75.14 3.398.727 4.819 1.694zM14.638 7c.244 0 .44.254.331.506l-1.9 4.39c-.11.255-.264.494-.471.702-.21.21-.454.367-.712.476l-4.38 1.895a.363.363 0 0 1-.476-.476l1.895-4.38c.11-.258.266-.5.477-.711.207-.208.447-.362.7-.471l4.391-1.9A.367.367 0 0 1 14.638 7zM12.45 9.55l-1.751.757a.737.737 0 0 0-.237.156.753.753 0 0 0-.156.236l-.758 1.752 1.742-.753a.766.766 0 0 0 .247-.161.733.733 0 0 0 .154-.234l.76-1.754z"}})]):t._e()]),t._v("\n 发现\n ")])]),t._v(" "),e("mt-tab-item",{attrs:{id:"2"}},[e("div",{on:{click:function(a){t.goPage("/order")}}},[e("div",{staticClass:"mint-tab-item-icon"},[2==t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#4aa5f0","fill-rule":"evenodd",d:"M2.75 1.5h16.5a.75.75 0 0 1 .75.75v11.5a6.758 6.758 0 0 1-6.75 6.75H2.75a.75.75 0 0 1-.75-.75V2.25a.75.75 0 0 1 .75-.75zm12 6.5a.75.75 0 0 0 0-1.5h-7.5a.75.75 0 0 0 0 1.5h7.5zm-3.002 5.003a.75.75 0 0 0 0-1.5H7.25a.75.75 0 0 0 0 1.5h4.498z"}})]):t._e(),t._v(" "),2!=t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#818181","fill-rule":"nonzero",d:"M7.25 8a.75.75 0 0 1 0-1.5h7.5a.75.75 0 1 1 0 1.5h-7.5zm0 5.004a.75.75 0 1 1 0-1.5h4.498a.75.75 0 1 1 0 1.5H7.25zM3.5 3v16h9.75c2.9 0 5.25-2.35 5.25-5.25V5.748a.75.75 0 1 1 1.5 0v8.002a6.75 6.75 0 0 1-6.75 6.75H2.75a.75.75 0 0 1-.75-.75V2.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 1 1 0 1.5H3.5z"}})]):t._e()]),t._v("\n 订单\n ")])]),t._v(" "),e("mt-tab-item",{attrs:{id:"3"}},[e("div",{on:{click:function(a){t.goPage("/user")}}},[e("div",{staticClass:"mint-tab-item-icon"},[3==t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#4aa5f0","fill-rule":"evenodd",d:"M11 1c2.757 0 5 2.243 5 5v1c0 2.757-2.243 5-5 5S6 9.757 6 7V6c0-2.757 2.243-5 5-5zm5.967 10.071A6.76 6.76 0 0 1 21 17.251v3a.75.75 0 0 1-.75.75H1.75a.75.75 0 0 1-.75-.75v-3a6.76 6.76 0 0 1 4.033-6.18.992.992 0 0 1 1.135.263A6.476 6.476 0 0 0 11 13.5c1.919 0 3.642-.84 4.832-2.166a.993.993 0 0 1 1.135-.263z"}})]):t._e(),t._v(" "),3!=t.selected?e("svg",{attrs:{viewBox:"0 0 22 22",width:"100%",height:"100%"}},[e("path",{attrs:{fill:"#818181","fill-rule":"nonzero",d:"M10.955 12H7.75a5.25 5.25 0 0 0-5.25 5.25v2.25h17v-2.25a5.244 5.244 0 0 0-2.626-4.548.75.75 0 0 1 .75-1.3l.183.11A6.745 6.745 0 0 1 21 17.25v3a.75.75 0 0 1-.75.75H1.75a.75.75 0 0 1-.75-.75v-3a6.75 6.75 0 0 1 6.436-6.743A4.984 4.984 0 0 1 6 7V6a5 5 0 0 1 10 0v1a5 5 0 0 1-5.045 5zM11 10.5A3.5 3.5 0 0 0 14.5 7V6a3.5 3.5 0 0 0-7 0v1a3.5 3.5 0 0 0 3.5 3.5z"}})]):t._e()]),t._v("\n 我的\n ")])])],1)},[],!1,null,"eb6c6784",null);s.options.__file="tabbar.vue";a.a=s.exports},364:function(t,a,e){var i=e(393);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,e(18).default)("7bb3f846",i,!0,{sourceMap:!1})},392:function(t,a,e){"use strict";var i=e(364);e.n(i).a},393:function(t,a,e){(t.exports=e(17)(!1)).push([t.i,"\n.discover-page{padding:1.87733rem 0 53px\n}\n.discover-page a{display:block\n}",""])},427:function(t,a,e){"use strict";e.r(a);var i=e(186),l={components:{Tabbar:e(206).a},head:{title:"发现"},data:function(){return{discover1:"".concat(i.a.IMG_URL,"discover/discover1.jpg"),discover2:"".concat(i.a.IMG_URL,"discover/discover2.jpg")}}},s=(e(392),e(13)),c=Object(s.a)(l,function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"discover-page"},[a("mt-header",{attrs:{fixed:"",title:"发现"}}),this._v(" "),a("a",{attrs:{href:"https://h5.ele.me/exchange/"}},[a("img",{attrs:{src:this.discover1,alt:""}})]),this._v(" "),a("div",{staticStyle:{height:"12px"}}),this._v(" "),a("a",{attrs:{href:"https://goods.m.duiba.com.cn/mobile/appItemDetail?appItemId=1544968&from=login&spm=14695.1.1.1"}},[a("img",{attrs:{src:this.discover2,alt:""}})]),this._v(" "),a("Tabbar",{attrs:{page:"1"}})],1)},[],!1,null,null,null);c.options.__file="discover.vue";a.default=c.exports}}]); -------------------------------------------------------------------------------- /dist/nuxt/c83d4103a4ad4f73ef76.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[20],{107:function(e,n,r){"use strict";r.r(n);var l=r(186),t={props:{seller:{default:{}}},computed:{banner:function(){return l.a.IMG_URL+this.seller.banner}}},s=(r(354),r(13)),a=Object(s.a)(t,function(){var e=this,n=e.$createElement,r=e._self._c||n;return r("div",{staticClass:"seller-page"},[r("div",{staticClass:"logo"},[r("img",{attrs:{src:e.banner,alt:""}})]),e._v(" "),r("h2",[e._v(e._s(e.seller.name))]),e._v(" "),r("p",[e._v(e._s(e.seller.bulletin))]),e._v(" "),r("a",{staticClass:"brandstory",attrs:{href:e.seller.brandstory}},[e._v("查看品牌故事")]),e._v(" "),r("div",{staticClass:"placeholder"}),e._v(" "),r("h2",[e._v("配送信息")]),e._v(" "),r("p",[e._v("由蜂鸟快送提供配送,约"+e._s(e.seller.deliveryTime)+"分钟送达,距离2.1km")]),e._v(" "),r("p",[e._v("配送费¥"+e._s(e.seller.deliveryPrice))])])},[],!1,null,null,null);a.options.__file="seller.vue";n.default=a.exports},186:function(e,n,r){"use strict";n.a={IS_RELEASE:!0,BASE_URL:"//elm-api.caibowen.net",IMG_URL:"https://easytuan.gitee.io/node-elm-api/public/",HEADERS:{"Content-Type":"application/json;charset=UTF-8"},TIMEOUT:12e3}},204:function(e,n,r){var l=r(355);"string"==typeof l&&(l=[[e.i,l,""]]),l.locals&&(e.exports=l.locals);(0,r(18).default)("160954b4",l,!0,{sourceMap:!1})},354:function(e,n,r){"use strict";var l=r(204);r.n(l).a},355:function(e,n,r){(e.exports=r(17)(!1)).push([e.i,"\n.seller-page{background:#fff;padding-bottom:.64rem\n}\n.seller-page .logo{padding:.64rem .64rem 0\n}\n.seller-page h2{font-size:.68267rem;margin-top:.85333rem;padding:0 .64rem .42667rem\n}\n.seller-page p{padding:0 .64rem;color:#666;font-size:.55467rem;line-height:1.5\n}\n.seller-page .brandstory{display:block;line-height:2.13333rem;margin-top:1.06667rem;color:#666;font-size:.59733rem;text-align:center\n}\n.seller-page .placeholder{height:.42667rem;background:#f5f5f5\n}",""])}}]); -------------------------------------------------------------------------------- /dist/nuxt/d1fdb79693a4f11e1701.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[13],{368:function(e,t,n){var s=n(401);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(18).default)("1304669f",s,!0,{sourceMap:!1})},400:function(e,t,n){"use strict";var s=n(368);n.n(s).a},401:function(e,t,n){(e.exports=n(17)(!1)).push([e.i,"\n.service-page{padding:1.87733rem 0 0;height:100vh;background:#fff\n}\n.service-page .service_connect{display:flex;justify-content:space-between\n}\n.service-page .service_connect a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;height:4rem;border-bottom:1px solid #f5f5f5\n}\n.service-page .service_connect a svg{width:1rem;height:1rem\n}\n.service-page .service_connect a span{margin-top:.4rem;font-size:.6rem;color:#666\n}\n.service-page .service_connect .service_left{border-right:1px solid #f5f5f5\n}",""])},421:function(e,t,n){"use strict";n.r(t);var s={head:{title:"我的客服"}},i=(n(400),n(13)),r=Object(i.a)(s,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"service-page"},[n("mt-header",{attrs:{fixed:"",title:"我的客服"}},[n("div",{attrs:{slot:"left"},on:{click:function(t){e.$router.go(-1)}},slot:"left"},[n("mt-button",{attrs:{icon:"back"}})],1)]),e._v(" "),n("section",{staticClass:"service_connect"},[n("a",{staticClass:"service_left",attrs:{href:"https://help.ele.me/#im?from=eleme-app?status=4"}},[n("svg",[n("use",{attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#human"}})]),e._v(" "),n("span",[e._v("在线客服")])]),e._v(" "),n("a",{staticClass:"service_right",attrs:{href:"tel:10105757"}},[n("svg",[n("use",{attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#phone"}})]),e._v(" "),n("span",[e._v("电话客服")])])])],1)},[],!1,null,null,null);r.options.__file="service.vue";t.default=r.exports}}]); -------------------------------------------------------------------------------- /dist/nuxt/eb373e3b4d9cf2501ba1.js: -------------------------------------------------------------------------------- 1 | !function(e){function t(t){for(var n,f,c=t[0],u=t[1],d=t[2],b=0,l=[];b2){var t,n,i,a=(e=h?e.trim():N(e,3)).charCodeAt(0);if(43===a||45===a){if(88===(t=e.charCodeAt(2))||120===t)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+e}for(var o,u=e.slice(2),c=0,s=u.length;ci)return NaN;return parseInt(u,n)}}return+e};if(!I(" 0o1")||!I("0b1")||I("+0x1")){I=function(r){var e=arguments.length<1?0:r,t=this;return t instanceof I&&(g?u(function(){E.valueOf.call(t)}):"Number"!=a(t))?o(new l(A(e)),t,I):A(e)};for(var v,b=t(6)?c(l):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),m=0;b.length>m;m++)i(l,v=b[m])&&!i(I,v)&&p(I,v,s(l,v));I.prototype=E,E.constructor=I,t(11)(n,"Number",I)}},191:function(r,e,t){var n=t(5),i=t(19),a=t(10),o=t(192),f="["+o+"]",u=RegExp("^"+f+f+"*"),c=RegExp(f+f+"*$"),s=function(r,e,t){var i={},f=a(function(){return!!o[r]()||"​…"!="​…"[r]()}),u=i[r]=f?e(p):o[r];t&&(i[t]=u),n(n.P+n.F*f,"String",i)},p=s.trim=function(r,e){return r=String(i(r)),1&e&&(r=r.replace(u,"")),2&e&&(r=r.replace(c,"")),r};r.exports=s},192:function(r,e){r.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"}}]); -------------------------------------------------------------------------------- /dist/nuxt/f52491409b34f058c284.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[22,19],{190:function(t,e,n){"use strict";var i=n(2),s=n(16),a=n(20),r=n(104),c=n(52),l=n(10),o=n(53).f,p=n(72).f,g=n(9).f,u=n(191).trim,f=i.Number,v=f,d=f.prototype,h="Number"==a(n(71)(d)),b="trim"in String.prototype,x=function(t){var e=c(t,!1);if("string"==typeof e&&e.length>2){var n,i,s,a=(e=b?e.trim():u(e,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:i=2,s=49;break;case 79:case 111:i=8,s=55;break;default:return+e}for(var r,l=e.slice(2),o=0,p=l.length;os)return NaN;return parseInt(l,i)}}return+e};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof f&&(h?l(function(){d.valueOf.call(n)}):"Number"!=a(n))?r(new v(x(e)),n,f):x(e)};for(var y,_=n(6)?o(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),k=0;_.length>k;k++)s(v,y=_[k])&&!s(f,y)&&g(f,y,p(v,y));f.prototype=d,d.constructor=f,n(11)(i,"Number",f)}},191:function(t,e,n){var i=n(5),s=n(19),a=n(10),r=n(192),c="["+r+"]",l=RegExp("^"+c+c+"*"),o=RegExp(c+c+"*$"),p=function(t,e,n){var s={},c=a(function(){return!!r[t]()||"​…"!="​…"[t]()}),l=s[t]=c?e(g):r[t];n&&(s[n]=l),i(i.P+i.F*c,"String",s)},g=p.trim=function(t,e){return t=String(s(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(o,"")),t};t.exports=p},192:function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},194:function(t,e,n){var i=n(211);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,n(18).default)("be294624",i,!0,{sourceMap:!1})},210:function(t,e,n){"use strict";var i=n(194);n.n(i).a},211:function(t,e,n){(t.exports=n(17)(!1)).push([t.i,"\n.ratingselect .rating-type{padding:18px 0;margin:0 18px;font-size:0\n}\n.ratingselect .rating-type .block{display:inline-block;padding:8px 12px;margin-right:8px;line-height:16px;border-radius:1px;font-size:12px;color:#4d555d\n}\n.ratingselect .rating-type .block.active{color:#fff\n}\n.ratingselect .rating-type .block .count{margin-left:2px;font-size:12px\n}\n.ratingselect .rating-type .block.positive{background:rgba(0,160,220,.2)\n}\n.ratingselect .rating-type .block.positive.active{background:#00a0dc\n}\n.ratingselect .rating-type .block.negative{background:rgba(77,85,93,.2)\n}\n.ratingselect .rating-type .block.negative.active{background:#4d555d\n}\n.ratingselect .switch{display:flex;align-items:center;padding:12px 18px;line-height:24px;border-bottom:1px solid rgba(7,17,27,.1);color:#93999f;font-size:0\n}\n.ratingselect .switch svg{margin-right:5px;fill:#e8e8e8\n}\n.ratingselect .switch.on .check{fill:#76d572\n}\n.ratingselect .switch .icon-check_circle{display:inline-block;vertical-align:top;margin-right:4px;font-size:24px\n}\n.ratingselect .switch .text{display:inline-block;vertical-align:top;font-size:12px\n}",""])},35:function(t,e,n){"use strict";n.r(e);n(190);var i={props:{ratings:{type:Array,default:function(){return[]}},selectType:{type:Number,default:2},onlyContent:{type:Boolean,default:!1},desc:{type:Object,default:function(){return{all:"全部",positive:"满意",negative:"不满意"}}}},computed:{positives:function(){return this.ratings.filter(function(t){return 0===t.rateType})},negatives:function(){return this.ratings.filter(function(t){return 1===t.rateType})}},methods:{select:function(t,e){this.$emit("select",t)},toggleContent:function(t){this.$emit("toggle")}}},s=(n(210),n(13)),a=Object(s.a)(i,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"ratingselect"},[n("div",{staticClass:"rating-type border-1px"},[n("span",{staticClass:"block positive",class:{active:2===t.selectType},on:{click:function(e){t.select(2,e)}}},[t._v(t._s(t.desc.all)+"\n "),n("span",{staticClass:"count"},[t._v(t._s(t.ratings.length))])]),t._v(" "),n("span",{staticClass:"block positive",class:{active:0===t.selectType},on:{click:function(e){t.select(0,e)}}},[t._v(t._s(t.desc.positive)),n("span",{staticClass:"count"},[t._v(t._s(t.positives.length))])]),t._v(" "),n("span",{staticClass:"block negative",class:{active:1===t.selectType},on:{click:function(e){t.select(1,e)}}},[t._v(t._s(t.desc.negative)),n("span",{staticClass:"count"},[t._v(t._s(t.negatives.length))])])]),t._v(" "),n("div",{staticClass:"switch",class:{on:t.onlyContent},on:{click:t.toggleContent}},[n("svg",{staticClass:"check",attrs:{width:"12",height:"12"}},[n("use",{attrs:{"xlink:href":"#select"}})]),t._v(" "),n("span",{staticClass:"text"},[t._v("只看有内容的评价")])])])},[],!1,null,null,null);a.options.__file="ratingselect.vue";e.default=a.exports}}]); -------------------------------------------------------------------------------- /dist/nuxt/img/3ffb5d8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/dist/nuxt/img/3ffb5d8.png -------------------------------------------------------------------------------- /dist/nuxt/img/4c99015.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/dist/nuxt/img/4c99015.png -------------------------------------------------------------------------------- /dist/nuxt/img/8ecc9f8.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dist/nuxt/img/e50a008.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dist/order/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /dist/search/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/shop/components/goods/cartcontrol/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/shop/components/goods/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/shop/components/goods/shopcart/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/shop/components/header/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/shop/components/ratings/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/shop/components/ratings/ratingselect/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/shop/components/seller/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/shop/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/user/addAddress/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/user/address/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/user/benefit/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/user/forget/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/user/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/user/info/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/user/service/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /dist/user/username/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 饿了么 5 | 6 | 7 |
Loading...
8 | 9 | 10 | -------------------------------------------------------------------------------- /layouts/default.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 16 | 17 | 66 | -------------------------------------------------------------------------------- /layouts/error.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 28 | 29 | 74 | -------------------------------------------------------------------------------- /middleware/README.md: -------------------------------------------------------------------------------- 1 | # MIDDLEWARE 2 | 3 | This directory contains your Application Middleware. 4 | The middleware lets you define custom function to be ran before rendering a page or a group of pages (layouts). 5 | 6 | More information about the usage of this directory in the documentation: 7 | https://nuxtjs.org/guide/routing#middleware 8 | 9 | **This directory is not required, you can delete it if you don't want to use it.** 10 | 11 | -------------------------------------------------------------------------------- /nuxt.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | mode: 'spa', 3 | head: { 4 | title: '饿了么', 5 | meta: [ 6 | { charset: 'utf-8' }, 7 | { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0' }, 8 | { hid: 'description', name: 'description', content: 'Nuxt.js project' }, 9 | { name: 'format-detection', content: 'telephone=no' }, 10 | { name: 'msapplication-tap-highlight', content: 'no' }, 11 | { name: 'apple-mobile-web-app-capable', content: 'yes' }, 12 | ], 13 | link: [ 14 | { rel: 'SHORTCUT ICON', type: 'image/x-icon', href: '/favicon.ico' } 15 | ], 16 | script: [ 17 | { src: 'https://easytuan.gitee.io/node-elm-api/public/flexible.js' }, 18 | ], 19 | }, 20 | 21 | loading: { color: '#3B8070' }, 22 | 23 | cache: true, 24 | 25 | build: { 26 | vendor: ['axios', 'mint-ui', 'js-cookie'], 27 | extend (config, { isDev, isClient }) { 28 | if (isDev && isClient) { 29 | config.module.rules.push({ 30 | enforce: 'pre', 31 | test: /\.(js|vue)$/, 32 | loader: 'eslint-loader', 33 | exclude: /(node_modules)/ 34 | }) 35 | } 36 | } 37 | }, 38 | 39 | plugins: [ 40 | { src: '~plugins/mint-ui' }, 41 | { src: '~assets/styles/base.scss' }, 42 | ], 43 | } 44 | 45 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nuxt-elm", 3 | "version": "2.0.0", 4 | "description": "Nuxt.js project", 5 | "author": "[easytuan] <[easytuan@foxmail.com]>", 6 | "private": true, 7 | "license": "GPL", 8 | "scripts": { 9 | "dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server", 10 | "start": "nuxt build && cross-env NODE_ENV=production pm2 start server/index.js --node-args='--harmony' --name 'nuxt-elm'", 11 | "stop": "pm2 stop server/index.js --name 'nuxt-elm'", 12 | "restart": "nuxt build && cross-env NODE_ENV=production pm2 restart server/index.js --node-args='--harmony' --name 'nuxt-elm'", 13 | "delete": "pm2 delete nuxt-elm", 14 | "lint": "eslint --cache --fix --ext .js,.vue --ignore-path .gitignore .", 15 | "generate": "nuxt generate", 16 | "tep": "node template", 17 | "precommit": "npm run lint" 18 | }, 19 | "dependencies": { 20 | "axios": "^0.18.0", 21 | "cross-env": "^5.2.0", 22 | "express": "^4.16.3", 23 | "express-http-proxy": "^1.4.0", 24 | "js-cookie": "^2.2.0", 25 | "js-md5": "^0.7.3", 26 | "mint-ui": "^2.2.13", 27 | "moment": "^2.22.2", 28 | "nuxt": "^2.0.0", 29 | "pm2": "^3.1.2", 30 | "postcss-loader": "^3.0.0" 31 | }, 32 | "devDependencies": { 33 | "nodemon": "^1.11.0", 34 | "babel-eslint": "^8.2.1", 35 | "eslint": "^5.0.1", 36 | "eslint-friendly-formatter": "^3.0.0", 37 | "eslint-loader": "^2.0.0", 38 | "eslint-plugin-vue": "^4.0.0", 39 | "less-loader": "^4.0.5", 40 | "node-sass": "^4.5.3", 41 | "postcss-loader": "^3.0.0", 42 | "postcss-px2rem": "^0.3.0", 43 | "sass-loader": "^6.0.5", 44 | "sass-resources-loader": "^1.3.3", 45 | "stylus": "^0.54.5", 46 | "stylus-loader": "^3.0.2" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /pages/discover.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 41 | 42 | 54 | -------------------------------------------------------------------------------- /pages/download.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 23 | 24 | 32 | -------------------------------------------------------------------------------- /pages/index.vue: -------------------------------------------------------------------------------- 1 | 55 | 56 | 94 | 95 | 149 | -------------------------------------------------------------------------------- /pages/newretail.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 25 | 26 | 34 | -------------------------------------------------------------------------------- /pages/order.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 47 | 48 | 82 | -------------------------------------------------------------------------------- /pages/search.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 28 | 29 | 37 | -------------------------------------------------------------------------------- /pages/shop/components/goods/cartcontrol.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 41 | 42 | 68 | -------------------------------------------------------------------------------- /pages/shop/components/header.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 49 | 50 | 123 | -------------------------------------------------------------------------------- /pages/shop/components/ratings/index.vue: -------------------------------------------------------------------------------- 1 | 70 | 71 | 125 | 126 | 127 | 267 | -------------------------------------------------------------------------------- /pages/shop/components/ratings/ratingselect.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 88 | 89 | 168 | -------------------------------------------------------------------------------- /pages/shop/components/seller.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 36 | 37 | 77 | -------------------------------------------------------------------------------- /pages/shop/index.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 64 | 65 | 104 | -------------------------------------------------------------------------------- /pages/user/addAddress.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 117 | 118 | 147 | -------------------------------------------------------------------------------- /pages/user/address.vue: -------------------------------------------------------------------------------- 1 | 43 | 44 | 95 | 96 | 141 | -------------------------------------------------------------------------------- /pages/user/benefit.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 35 | 36 | 61 | -------------------------------------------------------------------------------- /pages/user/forget.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 89 | 90 | 124 | -------------------------------------------------------------------------------- /pages/user/service.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 45 | 46 | 83 | -------------------------------------------------------------------------------- /pages/user/username.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 75 | 76 | 110 | -------------------------------------------------------------------------------- /plugins/mint-ui.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import MintUI from 'mint-ui' 3 | import 'mint-ui/lib/style.css' 4 | 5 | Vue.use(MintUI) 6 | -------------------------------------------------------------------------------- /screenshots/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/1.gif -------------------------------------------------------------------------------- /screenshots/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/1.png -------------------------------------------------------------------------------- /screenshots/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/2.gif -------------------------------------------------------------------------------- /screenshots/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/2.png -------------------------------------------------------------------------------- /screenshots/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/3.gif -------------------------------------------------------------------------------- /screenshots/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/3.png -------------------------------------------------------------------------------- /screenshots/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/4.gif -------------------------------------------------------------------------------- /screenshots/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/4.png -------------------------------------------------------------------------------- /screenshots/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/5.gif -------------------------------------------------------------------------------- /screenshots/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/5.png -------------------------------------------------------------------------------- /screenshots/alipay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/alipay.jpg -------------------------------------------------------------------------------- /screenshots/gh_44a51ea2dd08_430.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/gh_44a51ea2dd08_430.jpg -------------------------------------------------------------------------------- /screenshots/gh_a896d27a50a3_430.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/gh_a896d27a50a3_430.jpg -------------------------------------------------------------------------------- /screenshots/qr-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/qr-code.png -------------------------------------------------------------------------------- /screenshots/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/screenshots/wechat.jpg -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const consola = require('consola') 3 | const proxy = require('express-http-proxy') 4 | const { Nuxt, Builder } = require('nuxt') 5 | 6 | // const PROXY_URL = 'http://localhost:9000'; // 反向代理域名,测试 7 | const PROXY_URL = 'http://elm-api.caibowen.net'; // 反向代理域名,生产 8 | 9 | const app = express() 10 | const port = process.env.PORT || 3000 11 | 12 | app.set('port', port) 13 | 14 | // Import and Set Nuxt.js options 15 | let config = require('../nuxt.config.js') 16 | config.dev = !(process.env.NODE_ENV === 'production') 17 | 18 | app.use('/api', proxy(PROXY_URL)); 19 | 20 | async function start() { 21 | // Init Nuxt.js 22 | const nuxt = new Nuxt(config) 23 | 24 | // Build only in dev mode 25 | if (config.dev) { 26 | const builder = new Builder(nuxt) 27 | await builder.build() 28 | } 29 | 30 | // Give nuxt middleware to express 31 | app.use(nuxt.render) 32 | 33 | // Listen the server 34 | app.listen(port) 35 | consola.ready({ 36 | message: `Server listening on http://localhost:${port}`, 37 | badge: true 38 | }) 39 | } 40 | start() 41 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyTuan/nuxt-elm/d92f7c5f461af06ee739444f2ebb2a524a499a37/static/favicon.ico -------------------------------------------------------------------------------- /static/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex from 'vuex'; 3 | import { 4 | LOGIN, 5 | } from './types.js'; 6 | 7 | import userInfo from './modules/userInfo'; 8 | 9 | Vue.use(Vuex) 10 | 11 | const store = () => new Vuex.Store({ 12 | modules: { 13 | userInfo, 14 | }, 15 | actions: { 16 | nuxtServerInit({ 17 | _, 18 | commit 19 | }, { 20 | req 21 | }) { 22 | // cookie持久化,这会导致服务的cookie缓存 23 | // if (req.headers.cookie) { 24 | // // 解析cookie 25 | // let cookie = req.headers.cookie, 26 | // cookieObj = {}, 27 | // cookieArr = [], 28 | // key = '', 29 | // value = ''; 30 | // cookie = cookie.split(';') 31 | // for (let i = 0; i < cookie.length; i++) { 32 | // cookieArr = cookie[i].trim().split('=') 33 | // key = cookieArr[0] 34 | // value = cookieArr[1] 35 | // cookieObj[key] = value 36 | // } 37 | 38 | // if (cookieObj.userInfo) { 39 | // const userInfo = JSON.parse(decodeURIComponent(cookieObj.userInfo)); 40 | // if (userInfo) { 41 | // commit(LOGIN, userInfo) 42 | // } 43 | // } 44 | // } 45 | }, 46 | } 47 | }) 48 | 49 | export default store; 50 | -------------------------------------------------------------------------------- /store/modules/userInfo.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 用户模块 3 | */ 4 | import cookies from "js-cookie"; 5 | import { 6 | LOGIN, 7 | OUT_LOGIN, 8 | USER_INFO_UPDATA 9 | } from '../types.js'; 10 | 11 | const state = { 12 | userInfo: {} 13 | } 14 | 15 | const getters = { 16 | userInfo(state) { 17 | if (typeof window !== "undefined" && JSON.stringify(state.userInfo) === '{}' && cookies.get('userInfo')) { 18 | state.userInfo = JSON.parse(cookies.get('userInfo')); 19 | } 20 | return state.userInfo; 21 | }, 22 | } 23 | 24 | const actions = { 25 | login({ 26 | commit 27 | }, value) { 28 | commit(LOGIN, value); 29 | }, 30 | outLogin({ 31 | commit 32 | }) { 33 | commit(OUT_LOGIN); 34 | }, 35 | update({ 36 | commit 37 | }, value) { 38 | commit(USER_INFO_UPDATA, value); 39 | } 40 | } 41 | 42 | const mutations = { 43 | [LOGIN](state, value) { 44 | cookies.set('userInfo', { 45 | avatar: value.avatar, 46 | // create_time: value.create_time, 47 | mobile: value.mobile, 48 | user_id: value.user_id, 49 | username: value.username 50 | }); 51 | state.userInfo = value; 52 | }, 53 | [OUT_LOGIN](state) { 54 | cookies.remove('userInfo'); 55 | state.userInfo = {}; 56 | }, 57 | [USER_INFO_UPDATA](state, value) { 58 | state.userInfo = Object.assign(state.userInfo, value); 59 | cookies.set('userInfo', state.userInfo); 60 | }, 61 | } 62 | 63 | export default { 64 | state, 65 | actions, 66 | getters, 67 | mutations 68 | } 69 | -------------------------------------------------------------------------------- /store/types.js: -------------------------------------------------------------------------------- 1 | // user 用户 2 | export const LOGIN = 'LOGIN' // 用户登录 3 | export const OUT_LOGIN = 'OUT_LOGIN' // 用户退出 4 | export const USER_INFO_UPDATA = 'USER_INFO_UPDATA' // 更新用户信息 5 | -------------------------------------------------------------------------------- /template.js: -------------------------------------------------------------------------------- 1 | /** 2 | * pages模版快速生成脚本,执行命令 npm run tep `文件名` 3 | */ 4 | 5 | const fs = require('fs'); 6 | 7 | const dirName = process.argv[2]; 8 | 9 | if (!dirName) { 10 | console.log('文件夹名称不能为空!'); 11 | console.log('示例:npm run create test'); 12 | process.exit(0); 13 | } 14 | 15 | // 页面模版 16 | const indexTep = ` 22 | 23 | 30 | 31 | 38 | `; 39 | 40 | 41 | process.chdir(`./pages`); // cd $1 42 | 43 | fs.writeFileSync(`${dirName}.vue`, indexTep); 44 | 45 | console.log(`模版${dirName}已创建`); 46 | 47 | process.exit(0); 48 | --------------------------------------------------------------------------------