Commit 103a8eab by fengzhaoyu

项目第一次提交

parents
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/ming-order.iml" filepath="$PROJECT_DIR$/.idea/ming-order.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="3f11f0c2-4f1a-448b-9322-b444722d73f2" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/../.idea/work.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/.babelrc" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/.editorconfig" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/.gitignore" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/.postcssrc.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/README.md" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/build/build.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/build/check-versions.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/build/logo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/build/utils.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/build/vue-loader.conf.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/build/webpack.base.conf.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/build/webpack.dev.conf.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/build/webpack.prod.conf.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/config/dev.env.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/config/index.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/config/prod.env.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/index.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/package-lock.json" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/package.json" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/src/App.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/src/assets/logo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/src/components/affix.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/src/components/bt.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/src/components/grid.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/src/components/layout.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/src/main.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/src/router/index.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/static/.gitkeep" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../antDesignVue/static/util/hello.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/.babelrc" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/.editorconfig" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/.gitignore" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/.postcssrc.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/README.md" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/build/build.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/build/check-versions.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/build/logo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/build/utils.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/build/vue-loader.conf.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/build/webpack.base.conf.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/build/webpack.dev.conf.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/build/webpack.prod.conf.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/config/dev.env.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/config/index.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/config/prod.env.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/index.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/package-lock.json" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/package.json" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/src/API/http.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/src/App.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/src/assets/logo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/src/components/HelloWorld.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/src/main.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/src/utils/constants.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../diancai/static/.gitkeep" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../guofeng" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../mingPay-Mobile" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../mingPay-web" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../mingpay/mingPay-Mobile" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../mingwork-H3C" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../order/.idea/workspace.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../pig" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/.idea/misc.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/.idea/modules.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/.idea/text.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/.idea/workspace.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/css/selectSeat.css" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/ff.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/html/16宫格自由变色.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/html/Es6解析.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/html/object。key.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/html/原生区域滚动.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/html/对象转化成字符串.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/html/幸运大转盘.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/html/影院选座.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/html/循环显示颜色.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/html/时钟转动.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/html/点击特效.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/html/调用摄像头.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/img/bg_body.gif" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/img/dogSeat.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/img/meSeat.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/img/otherSeat.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/js/jquery-3.4.1.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../text/js/showColor.menmgmeng.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../waimai" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/css/index.css" beforeDir="false" afterPath="$PROJECT_DIR$/css/index.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/menu.html" beforeDir="false" afterPath="$PROJECT_DIR$/menu.html" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="HTML File" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
</component>
<component name="ProjectId" id="1RVZjC7Veum5HAS9awJ6LOFgQe7" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="PropertiesComponent">
<property name="DefaultHtmlFileTemplate" value="HTML File" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.path.for.package.eslint" value="project" />
<property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="F:\work\ming-order\js" />
<recent name="F:\work\ming-order\img" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="3f11f0c2-4f1a-448b-9322-b444722d73f2" name="Default Changelist" comment="" />
<created>1569754356137</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1569754356137</updated>
<workItem from="1569754358583" duration="157000" />
<workItem from="1569770803153" duration="1563000" />
<workItem from="1569807167889" duration="9597000" />
<workItem from="1569823040347" duration="4290000" />
<workItem from="1570431232559" duration="21614000" />
<workItem from="1570498392822" duration="13878000" />
<workItem from="1570585829723" duration="817000" />
<workItem from="1570603691636" duration="709000" />
<workItem from="1570621459219" duration="500000" />
<workItem from="1570670327176" duration="1220000" />
<workItem from="1570781784702" duration="15433000" />
<workItem from="1570843686159" duration="23451000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="COLUMN_ORDER" />
</State>
</value>
</entry>
</map>
</option>
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="javascript">
<url>file://$PROJECT_DIR$/menu.html</url>
<line>75</line>
<option name="timeStamp" value="3" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
</project>
\ No newline at end of file
* {
font-family: 'PingFangSC-Regular';
font-size: 22px;
color: #000000;
margin: 0;
padding: 0;
-webkit-tap-highlight-color:rgba(0,0,0,0);
}
li {
list-style: none;
}
::-webkit-scrollbar{
display: none;
width: 0;
height: 0;
}
[v-cloak] {
display: none;
}
#order {
display: flex;
background: #ECECEC;
height: 678px;
overflow: hidden;
}
/*菜单分类*/
.category {
background: #ffffff;
width: 160px;
height: 678px;
overflow: hidden;
}
.category ul {
width: 100%;
height: 598px;
margin-top: 20px;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.category li {
cursor: pointer;
width: 155px;
height: 64px;
text-align: center;
line-height: 64px;
border-right: 5px solid #ffffff;
}
/*点菜*/
.menu {
width: 820px;
height: 678px;
overflow: hidden;
}
.menu ul {
width: 820px;
height: 658px;
margin-top: 20px;
-webkit-overflow-scrolling: touch;
overflow-y: scroll;
}
.menu li:nth-child(-n +4) {
margin-top: 0;
}
.menu li {
width: 180px;
height: 186px;
float: left;
margin: 35px 0 0 20px;
background: #ffffff;
border-radius: 4px;
}
.imgContainer {
width: 100%;
height: 102px;
}
.menu img {
width: 100%;
height: 102px;
vertical-align: center;
}
.menu .name {
margin: 9px 0 5px 10px;
height: 30px;
line-height: 30px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.menu .price {
height: 30px;
margin-left: 10px;
line-height: 30px;
font-size: 20px;
color: #E60012;;
}
/*支付模块*/
.payment {
width: 366px;
height: 628px;
background: white;
position: relative;
margin-top: 20px;
border-radius: 4px;
overflow: hidden;
}
.title {
font-family: PingFangSC-Medium;
width: 100%;
height: 64px;
line-height: 64px;
text-align: center;
border-bottom: 1px solid #ECECEC;
position: relative;
}
.title span {
line-height: 30px;
width: 90px;
height: 30px;
display: inline-block;
position: absolute;
top: 50%;
left: 50%;
margin-top: -15px;
margin-left: -45px;
}
.clear {
text-align: center;
background: #E60012;
border-radius: 4px;
width: 78px;
height: 40px;
line-height: 40px;
float: right;
margin-right: 10px;
margin-top: 12px;
color: #ffffff;
font-size: 20px;
cursor: pointer;
}
.payment .scroll3 {
width: 100%;
height: 350px;
overflow: hidden;
}
.payment ul {
width: 100%;
height: 350px;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.payment li {
width: 100%;
height: 58px;
border-bottom: 1px solid #ECECEC;
position: relative;
}
.payment .name{
text-align: left;
position: absolute;
width: 134px;
height: 30px;
line-height: 30px;
font-size: 18px;
top: 50%;
left: 10px;
margin-top: -15px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.num {
height: 30px;
position: absolute;
top: 50%;
left: 157px;
margin-top: -15px;
}
.num>div {
text-align: center;
line-height: 30px;
width: 30px;
height: 30px;
float: left;
border-radius: 50%;
color: #A6A6A6;
cursor: pointer;
}
.reduce {
background: url("../img/reduce.png") center /100% 100%;
}
.add {
background: url("../img/add.png") center /100% 100%;
}
.num span {
float: left;
font-family: 'PingFangSC-Medium';
text-align: center;
display: inline-block;
width: 38px;
height: 30px;
line-height: 30px;
vertical-align: top;
}
.money {
font-size: 20px;
height: 30px;
line-height: 30px;
position: absolute;
top: 50%;
margin-top: -15px;
right: 10px;
color: #E60012;
}
.allPrice {
font-family: 'PingFangSC-Medium';
width: 100%;
height: 30px;
display: flex;
font-size: 20px;
line-height: 30px;
position: absolute;
bottom: 125px;
}
.allName {
font-family: 'PingFangSC-Medium';
margin-right: 70px;
margin-left: 10px;
}
.allMoney {
position: absolute;
height: 30px;
top: 50%;
right: 10px;
margin-top: -15px;
color: #E60012 ;
}
.checkout {
font-family: 'PingFangSC-Medium';
width: 345px;
height: 65px;
text-align: center;
line-height: 65px;
background: #E60012;
border-radius: 4px;
color: #ffffff;
font-size: 24px;
position: absolute;
bottom: 30px;
left: 50%;
margin-left: -172px;
cursor: pointer;
}
\ No newline at end of file
img/add.png

902 Bytes

img/reduce.png

830 Bytes

/* axios v0.18.0 | (c) 2018 by Matt Zabriskie */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new s(e),n=i(s.prototype.request,t);return o.extend(n,s.prototype,t),o.extend(n,t),n}var o=n(2),i=n(3),s=n(5),u=n(6),a=r(u);a.Axios=s,a.create=function(e){return r(o.merge(u,e))},a.Cancel=n(23),a.CancelToken=n(24),a.isCancel=n(20),a.all=function(e){return Promise.all(e)},a.spread=n(25),e.exports=a,e.exports.default=a},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"[object ArrayBuffer]"===R.call(e)}function i(e){return"undefined"!=typeof FormData&&e instanceof FormData}function s(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function u(e){return"string"==typeof e}function a(e){return"number"==typeof e}function c(e){return"undefined"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===R.call(e)}function d(e){return"[object File]"===R.call(e)}function l(e){return"[object Blob]"===R.call(e)}function h(e){return"[object Function]"===R.call(e)}function m(e){return f(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function w(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function x(){function e(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=x(t[n],e):t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)v(arguments[n],e);return t}function b(e,t,n){return v(t,function(t,r){n&&"function"==typeof t?e[r]=E(t,n):e[r]=t}),e}var E=n(3),C=n(4),R=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:o,isBuffer:C,isFormData:i,isArrayBufferView:s,isString:u,isNumber:a,isObject:f,isUndefined:c,isDate:p,isFile:d,isBlob:l,isFunction:h,isStream:m,isURLSearchParams:y,isStandardBrowserEnv:g,forEach:v,merge:x,extend:b,trim:w}},function(e,t){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new s,response:new s}}var o=n(6),i=n(2),s=n(17),u=n(18);r.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[u,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(8):"undefined"!=typeof process&&(e=n(8)),e}var i=n(2),s=n(7),u={"Content-Type":"application/x-www-form-urlencoded"},a={adapter:o(),transformRequest:[function(e,t){return s(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){a.headers[e]={}}),i.forEach(["post","put","patch"],function(e){a.headers[e]=i.merge(u)}),e.exports=a},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(9),i=n(12),s=n(13),u=n(14),a=n(10),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(15);e.exports=function(e){return new Promise(function(t,f){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||u(e.url)||(l=new window.XDomainRequest,h="onload",m=!0,l.onprogress=function(){},l.ontimeout=function(){}),e.auth){var y=e.auth.username||"",w=e.auth.password||"";d.Authorization="Basic "+c(y+":"+w)}if(l.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l[h]=function(){if(l&&(4===l.readyState||m)&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:r,status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:n,config:e,request:l};o(t,f,i),l=null}},l.onerror=function(){f(a("Network Error",e,null,l)),l=null},l.ontimeout=function(){f(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=n(16),v=(e.withCredentials||u(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),f(e),l=null)}),void 0===p&&(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var s=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))}))}),i=s.join("&")}return i&&(e+=(e.indexOf("?")===-1?"?":"&")+i),e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([n]):s[t]=s[t]?s[t]+", "+n:n}}),s):s}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t){"use strict";function n(){this.message="String contains an invalid character"}function r(e){for(var t,r,i=String(e),s="",u=0,a=o;i.charAt(0|u)||(a="=",u%1);s+=a.charAt(63&t>>8-u%1*8)){if(r=i.charCodeAt(u+=.75),r>255)throw new n;t=t<<8|r}return s}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=r},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,s){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),i=n(19),s=n(20),u=n(6),a=n(21),c=n(22);e.exports=function(e){r(e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||u.adapter;return t(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return s(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])});
//# sourceMappingURL=axios.min.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>点餐中心</title>
<!-- 引入主界面的样式-->
<link rel="stylesheet" href="css/index.css">
<!-- 引入vue-->
<script src="js/vue.js"></script>
<!-- 引入axios-->
<script src="js/axios.min.js"></script>
</head>
<body>
<div id="order" >
<!-- 菜单分类-->
<div class="category">
<ul>
<li v-cloak
v-for=" (category, index) in categorys" :key="category.productCategoryId"
@click="selectClass(category,index)"
:style = 'selectIndex == index ? selectStyle: "" '>
{{category.productCategoryName}}
</li>
</ul>
</div>
<!-- 点菜-->
<div class="menu" >
<ul >
<li v-for="(menu,index) in defaultProduct" :key="menu.productId" @click="addCar(menu,index)" v-cloak>
<div class="imgContainer">
<img :src='menu.productIcon' alt="">
</div>
<div class="name">{{menu.productName}}</div>
<div class="price">¥{{menu.productPrice}}</div>
</li>
</ul>
</div>
<!-- 支付-->
<div class="payment">
<div class="title">
<span>已选菜单</span>
<div class="clear" @click="clearCar()" >清空</div>
</div>
<div class="scroll3">
<ul>
<li v-for="(item, index) in carList" :key="item.productId" v-cloak>
<div class="name">{{item.productName}}</div>
<div class="num">
<div @click="reduce(index)" class="reduce"></div>
<span>{{item.count}}</span>
<div @click="add(index)" class="add"></div>
</div>
<div class="money">¥{{item.count * (item.productPrice*100)/100}}</div>
</li>
</ul>
</div>
<div class="allPrice">
<div class="allName">总计金额:</div>
<div class="allNum" v-cloak>{{allNum}}份</div>
<div class="allMoney" v-cloak>¥{{allPrice}}</div>
</div>
<div class="checkout" @click ='checkout'>结账</div>
</div>
</div>
</body>
<script>
// 获取orgId
var orgId = window.android.getOrgId()
localStorage.setItem('orgId',orgId)
// localStorage.setItem('orgId','ding9ddd48137390507735c2f4657eb6378f')
// axios.defaults.baseURL = 'http://192.168.1.101:9999/mingpay-phone' // 本地钱
axios.defaults.baseURL = 'http://139.224.55.14:9999/mingpay-phone' // beta环境
const $http = {
request: (url,method,data) => {
return new Promise(((resolve, reject) => {
axios({
method: method,
url: url,
data: data,
}).then(res => {
return resolve(res)
}).catch(err => {
return reject(res)
});
}))
}
}
Vue.prototype.$http = $http
var order = new Vue({
el: '#order',
data: {
categorys: [], // 菜单分类
defaultProduct: [], // 默认展示的菜
selectIndex: '0', // 左侧选中类别的index,用来做选项卡判断
selectStyle: {
'font-family': 'PingFangSC-Medium',
'border-right': '5px solid red',
'background-color':' #FFEDED',
'color': ' #E60012'
}, //左侧菜单分类列表选中时的样式
carList: [],// 所有加入购物车的列表数据
allNum: 0, // 购物车里商品总数
allPrice: 0 ,// 购物车里商品总价格
isDisplay: true, // 菜品分类是否展示隐藏 默认展示
isUp: true, //菜品是否上架 菜品上架
},
created() {
let data = {
orgId: localStorage.getItem('orgId')
}
this.$http.request('/v1/product/list_product_category','POST',data).then(res => {
// 左侧分类是否展示
res.data.data.forEach((item) => {
if(item.isDisplay == "DISPLAY") {
this.categorys.push(item)
}
})
console.log(this.categorys,33333333333333333)
return this.$http.request('/v1/product/list_product','post',{ productCategoryId: this.categorys[0].productCategoryId })
}).then(e => {
e.data.data.forEach((product) => {
// 菜品是否展示
if(product.productStatus == 'UP') {
this.defaultProduct.push(product)
}
})
})
},
mounted() {
window.clearCar = this.clearCar
},
methods:{
// 选菜的类别的点击事件
selectClass:function (menu,index) {
this.selectIndex = index
this.defaultProduct = []
this.$http.request('/v1/product/list_product','post',{productCategoryId: menu.productCategoryId})
.then(res => {
res.data.data.forEach(product => {
if(product.productStatus == 'UP') {
this.defaultProduct.push(product)
}
})
})
.catch(err => {
console.log(err)
})
},
// 点击加入购物车列表e
addCar:function (e) {
// 假设在购物车中没有找到商品
var flag = false
let gooodinfo = {
productId: e.productId,
productName: e.productName,
productPrice: e.productPrice,
count: 0
}
// 判断购物车里是否已经存在商品
this.carList.some(item => {
if(gooodinfo.productId == item.productId ) {
item.count += parseInt(gooodinfo.count) + 1
flag = true
return
}
})
// 购物车不存在这个商品新加一条数据
if (!flag) {
gooodinfo.count = 1
this.carList.push(gooodinfo)
}
//计算总数量 总价格
console.log(typeof(gooodinfo.productPrice))
var num1 = 270.72*10000
var num2 = 45.12*10000
console.log( (num1 + num2 )/10000)
console.log( num1)
console.log( num2)
this.allNum = this.allNum + 1
console.log(this.allPrice )
this.allPrice = ((this.allPrice*100 + gooodinfo.productPrice*100)/100).toFixed(2)
},
// 清空购物车
clearCar:function() {
this.carList = [];
this.allNum = 0
this.allPrice = 0
},
// 减少购物车的数量
reduce:function(index) {
this.allPrice = ((this.allPrice*100 - this.carList[index].productPrice*100)/100).toFixed(2)
this.carList[index].count = this.carList[index].count - 1
// 购物车里的商品数量减少到小于等于0时,从购物车里删除这条信息
if(this.carList[index].count <= 0) {
this.carList.splice(index,1)
}
this.allNum = this.allNum - 1
},
// 增加购物车的数量
add:function(index) {
this.carList[index].count = this.carList[index].count + 1
this.allNum = this.allNum + 1
this.allPrice = ((this.allPrice*100 + this.carList[index].productPrice*100)/100).toFixed(2)
},
// 结账
checkout: function () {
let setData = []
this.carList.forEach(item => {
setData.push({
productId: item.productId,
productQuantity: item.count
})
})
// 向设备端发送详情账单
window.android.pay(JSON.stringify(setData),this.allPrice)
}
}
})
</script>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment