├── weChat ├── src │ ├── pages │ │ ├── logistics │ │ │ ├── success │ │ │ │ ├── success.json │ │ │ │ ├── main.js │ │ │ │ └── index.vue │ │ │ ├── main.js │ │ │ └── index.vue │ │ ├── index │ │ │ ├── main.json │ │ │ ├── main.js │ │ │ └── index.vue │ │ ├── judge │ │ │ ├── main.json │ │ │ ├── main.js │ │ │ └── index.vue │ │ ├── seek │ │ │ ├── main.json │ │ │ ├── main.js │ │ │ └── index.vue │ │ ├── go2detail │ │ │ ├── main.json │ │ │ └── main.js │ │ ├── goPay │ │ │ ├── mian.json │ │ │ ├── main.js │ │ │ └── index.vue │ │ ├── newDetail │ │ │ ├── main.json │ │ │ ├── main.js │ │ │ └── index.vue │ │ ├── referrer │ │ │ ├── main.json │ │ │ ├── main.js │ │ │ └── index.vue │ │ ├── special │ │ │ ├── main.json │ │ │ └── main.js │ │ ├── spike │ │ │ ├── main.json │ │ │ ├── main.js │ │ │ └── index.vue │ │ ├── autonym │ │ │ ├── main.json │ │ │ └── main.js │ │ ├── spikeDetail │ │ │ ├── main.json │ │ │ └── main.js │ │ ├── submission │ │ │ ├── main.json │ │ │ └── main.js │ │ ├── orderdetails │ │ │ ├── main.json │ │ │ └── main.js │ │ ├── shoppingadress │ │ │ ├── main.json │ │ │ ├── main.js │ │ │ ├── redactAddress │ │ │ │ └── main.js │ │ │ └── index.vue │ │ ├── artificial │ │ │ ├── main.json │ │ │ ├── main.js │ │ │ └── index.vue │ │ ├── myorder │ │ │ ├── cashDetails │ │ │ │ ├── main.json │ │ │ │ ├── main.js │ │ │ │ └── index.vue │ │ │ ├── settlement │ │ │ │ ├── main.json │ │ │ │ ├── main.js │ │ │ │ └── index.vue │ │ │ ├── main.json │ │ │ ├── main.js │ │ │ └── successfulTrade │ │ │ │ ├── main.js │ │ │ │ └── index.vue │ │ ├── classify │ │ │ ├── main.json │ │ │ └── main.js │ │ ├── phone │ │ │ ├── main.js │ │ │ └── index.vue │ │ ├── share │ │ │ └── main.js │ │ ├── conponlist │ │ │ ├── main.js │ │ │ └── index.vue │ │ └── sharedetail │ │ │ ├── main.js │ │ │ └── index.vue │ ├── components │ │ ├── listType.vue │ │ ├── seek │ │ │ ├── without.vue │ │ │ ├── history.vue │ │ │ └── detali.vue │ │ ├── conpon │ │ │ ├── null.vue │ │ │ └── conponList.vue │ │ ├── user │ │ │ └── login.vue │ │ ├── spikeCom.vue │ │ ├── confirm.vue │ │ ├── coupon.vue │ │ └── modalFrame.vue │ ├── main.js │ ├── store │ │ ├── modules │ │ │ ├── newadd.js │ │ │ ├── spike.js │ │ │ ├── myorder.js │ │ │ ├── settlement.js │ │ │ ├── invite.js │ │ │ ├── special.js │ │ │ ├── getAddressList.js │ │ │ ├── classify.js │ │ │ ├── phone.js │ │ │ ├── user.js │ │ │ ├── coupon.js │ │ │ ├── seek.js │ │ │ └── shopDetail.js │ │ └── index.js │ ├── App.vue │ ├── app.json │ ├── utils │ │ ├── request.js │ │ └── index.js │ └── api │ │ └── index.js ├── config │ ├── prod.env.js │ ├── dev.env.js │ └── index.js ├── static │ ├── images │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 32.png │ │ ├── d1.png │ │ ├── d2.png │ │ ├── d3.png │ │ ├── d4.png │ │ ├── d5.png │ │ ├── dfh.png │ │ ├── dsh.png │ │ ├── dz.png │ │ ├── jt.png │ │ ├── kf.png │ │ ├── my.png │ │ ├── sm.png │ │ ├── sou.jpg │ │ ├── xin.png │ │ ├── yhj.png │ │ ├── 对勾.png │ │ ├── 待付款.png │ │ ├── 暂无.png │ │ ├── creame.png │ │ ├── fail.png │ │ ├── hxin.png │ │ ├── jycg.jpg │ │ ├── man_2.jpg │ │ ├── miss.png │ │ ├── shop.png │ │ ├── shouye.png │ │ ├── true.png │ │ ├── true2.png │ │ ├── xzyuan.png │ │ ├── yuan.png │ │ ├── 位图@2x.png │ │ ├── 返回-11.png │ │ ├── 马上抢@2x.png │ │ ├── 黑卡@2x.png │ │ ├── offline.png │ │ ├── Group 2@2x.png │ │ ├── Group 9@2x.png │ │ ├── my_active.png │ │ ├── remindIcon.png │ │ ├── remindIcon2.png │ │ ├── wudingdan.png │ │ ├── 黄金会员-v1@2x.png │ │ ├── locationIcon.png │ │ ├── shouye_active.png │ │ ├── defaultadderss.png │ │ ├── ture3.svg │ │ ├── choose.svg │ │ ├── lt.svg │ │ ├── success.svg │ │ ├── zfb.svg │ │ ├── ding.svg │ │ └── wx.svg │ └── seek │ │ ├── del.png │ │ ├── back.png │ │ └── search.png ├── .postcssrc.js ├── .editorconfig ├── .gitignore ├── index.html ├── build │ ├── dev-client.js │ ├── vue-loader.conf.js │ ├── build.js │ ├── check-versions.js │ ├── webpack.dev.conf.js │ ├── utils.js │ ├── dev-server.js │ ├── webpack.base.conf.js │ └── webpack.prod.conf.js ├── .babelrc ├── README.md ├── package.json └── project.config.json └── .gitignore /weChat/src/pages/logistics/success/success.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /weChat/src/pages/index/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "积纳有品" 3 | } -------------------------------------------------------------------------------- /weChat/src/pages/judge/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "积纳有品" 3 | } -------------------------------------------------------------------------------- /weChat/src/pages/seek/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationStyle":"custom" 3 | } 4 | -------------------------------------------------------------------------------- /weChat/src/pages/go2detail/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "商品详情" 3 | } -------------------------------------------------------------------------------- /weChat/src/pages/goPay/mian.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "结算中心" 3 | } -------------------------------------------------------------------------------- /weChat/src/pages/newDetail/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "商品详情" 3 | } -------------------------------------------------------------------------------- /weChat/src/pages/referrer/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "积纳有品" 3 | } -------------------------------------------------------------------------------- /weChat/src/pages/special/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "专题页面" 3 | } -------------------------------------------------------------------------------- /weChat/src/pages/spike/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "限时秒杀" 3 | } -------------------------------------------------------------------------------- /weChat/config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /weChat/src/pages/autonym/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "实名认证" 3 | } 4 | -------------------------------------------------------------------------------- /weChat/src/pages/spikeDetail/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "秒杀详情页" 3 | } -------------------------------------------------------------------------------- /weChat/src/pages/submission/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "提交订单" 3 | } -------------------------------------------------------------------------------- /weChat/src/pages/orderdetails/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "订单详情" 3 | } 4 | -------------------------------------------------------------------------------- /weChat/src/pages/shoppingadress/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "收货地址" 3 | } 4 | -------------------------------------------------------------------------------- /weChat/src/pages/artificial/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "联系客服" 3 | } 4 | -------------------------------------------------------------------------------- /weChat/src/pages/myorder/cashDetails/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "交易详情" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /weChat/src/pages/myorder/settlement/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "结算中心" 3 | } 4 | -------------------------------------------------------------------------------- /weChat/static/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/1.png -------------------------------------------------------------------------------- /weChat/static/images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/2.png -------------------------------------------------------------------------------- /weChat/static/images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/3.png -------------------------------------------------------------------------------- /weChat/static/images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/4.png -------------------------------------------------------------------------------- /weChat/static/images/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/5.png -------------------------------------------------------------------------------- /weChat/static/images/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/6.png -------------------------------------------------------------------------------- /weChat/static/images/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/7.png -------------------------------------------------------------------------------- /weChat/static/seek/del.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/seek/del.png -------------------------------------------------------------------------------- /weChat/static/images/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/32.png -------------------------------------------------------------------------------- /weChat/static/images/d1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/d1.png -------------------------------------------------------------------------------- /weChat/static/images/d2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/d2.png -------------------------------------------------------------------------------- /weChat/static/images/d3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/d3.png -------------------------------------------------------------------------------- /weChat/static/images/d4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/d4.png -------------------------------------------------------------------------------- /weChat/static/images/d5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/d5.png -------------------------------------------------------------------------------- /weChat/static/images/dfh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/dfh.png -------------------------------------------------------------------------------- /weChat/static/images/dsh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/dsh.png -------------------------------------------------------------------------------- /weChat/static/images/dz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/dz.png -------------------------------------------------------------------------------- /weChat/static/images/jt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/jt.png -------------------------------------------------------------------------------- /weChat/static/images/kf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/kf.png -------------------------------------------------------------------------------- /weChat/static/images/my.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/my.png -------------------------------------------------------------------------------- /weChat/static/images/sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/sm.png -------------------------------------------------------------------------------- /weChat/static/images/sou.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/sou.jpg -------------------------------------------------------------------------------- /weChat/static/images/xin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/xin.png -------------------------------------------------------------------------------- /weChat/static/images/yhj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/yhj.png -------------------------------------------------------------------------------- /weChat/static/images/对勾.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/对勾.png -------------------------------------------------------------------------------- /weChat/static/images/待付款.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/待付款.png -------------------------------------------------------------------------------- /weChat/static/images/暂无.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/暂无.png -------------------------------------------------------------------------------- /weChat/static/seek/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/seek/back.png -------------------------------------------------------------------------------- /weChat/static/images/creame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/creame.png -------------------------------------------------------------------------------- /weChat/static/images/fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/fail.png -------------------------------------------------------------------------------- /weChat/static/images/hxin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/hxin.png -------------------------------------------------------------------------------- /weChat/static/images/jycg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/jycg.jpg -------------------------------------------------------------------------------- /weChat/static/images/man_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/man_2.jpg -------------------------------------------------------------------------------- /weChat/static/images/miss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/miss.png -------------------------------------------------------------------------------- /weChat/static/images/shop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/shop.png -------------------------------------------------------------------------------- /weChat/static/images/shouye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/shouye.png -------------------------------------------------------------------------------- /weChat/static/images/true.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/true.png -------------------------------------------------------------------------------- /weChat/static/images/true2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/true2.png -------------------------------------------------------------------------------- /weChat/static/images/xzyuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/xzyuan.png -------------------------------------------------------------------------------- /weChat/static/images/yuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/yuan.png -------------------------------------------------------------------------------- /weChat/static/images/位图@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/位图@2x.png -------------------------------------------------------------------------------- /weChat/static/images/返回-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/返回-11.png -------------------------------------------------------------------------------- /weChat/static/images/马上抢@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/马上抢@2x.png -------------------------------------------------------------------------------- /weChat/static/images/黑卡@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/黑卡@2x.png -------------------------------------------------------------------------------- /weChat/static/seek/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/seek/search.png -------------------------------------------------------------------------------- /weChat/src/pages/classify/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "积纳有品", 3 | "onReachBottomDistance": 50 4 | } 5 | -------------------------------------------------------------------------------- /weChat/static/images/offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/offline.png -------------------------------------------------------------------------------- /weChat/src/pages/myorder/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "我的订单", 3 | "onReachBottomDistance": 50 4 | } 5 | 6 | -------------------------------------------------------------------------------- /weChat/static/images/Group 2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/Group 2@2x.png -------------------------------------------------------------------------------- /weChat/static/images/Group 9@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/Group 9@2x.png -------------------------------------------------------------------------------- /weChat/static/images/my_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/my_active.png -------------------------------------------------------------------------------- /weChat/static/images/remindIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/remindIcon.png -------------------------------------------------------------------------------- /weChat/static/images/remindIcon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/remindIcon2.png -------------------------------------------------------------------------------- /weChat/static/images/wudingdan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/wudingdan.png -------------------------------------------------------------------------------- /weChat/static/images/黄金会员-v1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/黄金会员-v1@2x.png -------------------------------------------------------------------------------- /weChat/static/images/locationIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/locationIcon.png -------------------------------------------------------------------------------- /weChat/static/images/shouye_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/shouye_active.png -------------------------------------------------------------------------------- /weChat/static/images/defaultadderss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guhuilin/April_eight/HEAD/weChat/static/images/defaultadderss.png -------------------------------------------------------------------------------- /weChat/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-mpvue-wxss": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /weChat/config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /weChat/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /weChat/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | *.suo 11 | *.ntvs* 12 | *.njsproj 13 | *.sln 14 | -------------------------------------------------------------------------------- /weChat/src/components/listType.vue: -------------------------------------------------------------------------------- 1 | 4 | 11 | 13 | -------------------------------------------------------------------------------- /weChat/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 宝贝多多 6 | 7 | 8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /weChat/build/dev-client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | require('eventsource-polyfill') 3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 4 | 5 | hotClient.subscribe(function (event) { 6 | if (event.action === 'reload') { 7 | window.location.reload() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /weChat/src/pages/phone/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function(err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() -------------------------------------------------------------------------------- /weChat/src/pages/seek/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/share/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/artificial/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/autonym/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/classify/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/conponlist/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/goPay/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | 14 | -------------------------------------------------------------------------------- /weChat/src/pages/index/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | 14 | -------------------------------------------------------------------------------- /weChat/src/pages/judge/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | 14 | -------------------------------------------------------------------------------- /weChat/src/pages/logistics/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/myorder/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/referrer/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/sharedetail/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/special/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/spike/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | 14 | -------------------------------------------------------------------------------- /weChat/src/main.js: -------------------------------------------------------------------------------- 1 | var bus = new Vue(); 2 | import Vue from 'vue' 3 | import App from './App' 4 | // 引入store 5 | import store from '@/store/index' 6 | 7 | Vue.config.productionTip = false 8 | App.mpType = 'app' 9 | 10 | // 挂载store到原型链上 11 | Vue.prototype.$store = store; 12 | const app = new Vue(App) 13 | app.$mount() -------------------------------------------------------------------------------- /weChat/src/pages/go2detail/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | 14 | -------------------------------------------------------------------------------- /weChat/src/pages/newDetail/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | 14 | -------------------------------------------------------------------------------- /weChat/src/pages/orderdetails/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/shoppingadress/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/submission/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | 14 | -------------------------------------------------------------------------------- /weChat/src/pages/logistics/success/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() -------------------------------------------------------------------------------- /weChat/src/pages/myorder/cashDetails/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/myorder/settlement/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/spikeDetail/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | 14 | -------------------------------------------------------------------------------- /weChat/src/pages/myorder/successfulTrade/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | const app = new Vue(App) 12 | app.$mount() 13 | -------------------------------------------------------------------------------- /weChat/src/pages/shoppingadress/redactAddress/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './index' 3 | 4 | // add this to handle exception 5 | Vue.config.errorHandler = function (err) { 6 | if (console && console.error) { 7 | console.error(err) 8 | } 9 | } 10 | 11 | 12 | const app = new Vue(App) 13 | app.$mount() 14 | -------------------------------------------------------------------------------- /weChat/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["istanbul"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /weChat/src/store/modules/newadd.js: -------------------------------------------------------------------------------- 1 | import {addAddress} from '@/api/index' 2 | 3 | const state ={ 4 | 5 | } 6 | const actions = { 7 | submit({commit},payload){ 8 | return new Promise(async (resolve,reject)=>{ 9 | let data =await addAddress(payload); 10 | resolve(data) 11 | }) 12 | } 13 | } 14 | 15 | export default{ 16 | namespaced: true, 17 | state, 18 | actions 19 | } -------------------------------------------------------------------------------- /weChat/src/App.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 27 | -------------------------------------------------------------------------------- /weChat/src/pages/artificial/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 10 | 26 | -------------------------------------------------------------------------------- /weChat/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var config = require('../config') 3 | // var isProduction = process.env.NODE_ENV === 'production' 4 | // for mp 5 | var isProduction = true 6 | 7 | module.exports = { 8 | loaders: utils.cssLoaders({ 9 | sourceMap: isProduction 10 | ? config.build.productionSourceMap 11 | : config.dev.cssSourceMap, 12 | extract: isProduction 13 | }), 14 | transformToRequire: { 15 | video: 'src', 16 | source: 'src', 17 | img: 'src', 18 | image: 'xlink:href' 19 | }, 20 | fileExt: config.build.fileExt 21 | } 22 | -------------------------------------------------------------------------------- /weChat/src/components/seek/without.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /weChat/src/store/modules/spike.js: -------------------------------------------------------------------------------- 1 | import { shareDate } from '@/api/index' 2 | 3 | const state = { 4 | shareCont: [] 5 | } 6 | 7 | const mutations = { 8 | shareText(state, payload) { 9 | state.shareCont = {...state.shareCont,...payload} 10 | } 11 | } 12 | 13 | const actions = { 14 | async shareList({ 15 | commit, 16 | state 17 | }, payload) { 18 | return new Promise(async (resolve, reject) => { 19 | let result = await shareDate(payload) 20 | commit('shareText', result.data.result) 21 | }) 22 | } 23 | } 24 | 25 | export default { 26 | namespaced: true, 27 | state, 28 | mutations, 29 | actions 30 | } 31 | -------------------------------------------------------------------------------- /weChat/src/store/modules/myorder.js: -------------------------------------------------------------------------------- 1 | import {FindOrder} from '@/api/index' 2 | const state = { 3 | active:0, 4 | list:[] 5 | } 6 | 7 | const mutations = { 8 | changeMyOrderList(state,payload){ 9 | state.active = payload.active 10 | state.list = payload.list; 11 | } 12 | } 13 | 14 | const actions = { 15 | async getFindOrderData({commit},payload){ 16 | let data = await FindOrder(payload) 17 | commit('changeMyOrderList',{active:payload.orderStatus,list:data.data.result||[]}) 18 | return data; 19 | } 20 | } 21 | 22 | export default { 23 | namespaced:true, 24 | state, 25 | mutations, 26 | actions 27 | } 28 | -------------------------------------------------------------------------------- /weChat/src/store/modules/settlement.js: -------------------------------------------------------------------------------- 1 | const state ={ 2 | items: [ 3 | {name: '支付宝支付', img:'/static/images/zfb.svg',checked:true}, 4 | {name: '微信支付', img:'/static/images/wx.svg',checked:false} 5 | ], 6 | payway:'支付宝支付' 7 | } 8 | 9 | const mutations = { 10 | updateState(state,payload){ 11 | state.items.forEach((item,index)=>{ 12 | item.checked=false 13 | if(item.name === payload.val){ 14 | item.checked=true 15 | state.payway=payload.val 16 | } 17 | }) 18 | } 19 | } 20 | 21 | const actions = { 22 | 23 | } 24 | 25 | export default{ 26 | namespaced: true, 27 | state, 28 | mutations, 29 | actions 30 | } -------------------------------------------------------------------------------- /weChat/src/store/modules/invite.js: -------------------------------------------------------------------------------- 1 | import {groupName, Invitelist, bindInvite} from "@/api/index" 2 | 3 | const state={ 4 | visitor:{ 5 | imgSrc:"", 6 | name:"" 7 | } 8 | } 9 | 10 | const actions={ 11 | async InviteCode(state, payload){ 12 | console.log("payload.......",payload) 13 | let data = await groupName(payload); 14 | return data 15 | }, 16 | async InviteList(){ 17 | let list = await Invitelist(); 18 | return list 19 | }, 20 | async InviteBind(state,payload){ 21 | console.log("payload.....3333",payload) 22 | let list = await bindInvite(payload) 23 | return list 24 | } 25 | } 26 | 27 | export default { 28 | namespaced:true, 29 | state, 30 | actions 31 | } 32 | -------------------------------------------------------------------------------- /weChat/src/store/modules/special.js: -------------------------------------------------------------------------------- 1 | import {special} from '../../api/index' 2 | const state = { 3 | list:[], 4 | banner:null, 5 | title:null 6 | } 7 | 8 | const mutations = { 9 | upstate(state,payload){ 10 | state.list = {...payload.list.data.result.anchors}; 11 | state.banner = payload.list.data.result.specialImg; 12 | state.title = payload.list.data.result.specialName; 13 | } 14 | } 15 | 16 | const actions = { 17 | getList({commit},payload){ 18 | return new Promise(async(resolve, reject)=>{ 19 | let result = await special(payload.siid); 20 | console.log('result',result) 21 | commit('upstate',{list:result}) 22 | resolve(result); 23 | }) 24 | } 25 | } 26 | 27 | export default { 28 | namespaced: true, 29 | state, 30 | actions, 31 | mutations 32 | } 33 | -------------------------------------------------------------------------------- /weChat/src/store/modules/getAddressList.js: -------------------------------------------------------------------------------- 1 | import {getAddressListData, changeUserAddress, addNewAddress} from '@/api/index' 2 | 3 | // 异步改变 4 | const actions = { 5 | addressList({state}, payload){ 6 | return new Promise(async (resolve, reject)=>{ 7 | let listData = await getAddressListData(payload); 8 | resolve(listData); 9 | }) 10 | }, 11 | changeUserAddress({state}, payload){ 12 | return new Promise(async (resolve, reject)=>{ 13 | let getCode = await changeUserAddress(payload); 14 | resolve(getCode); 15 | }) 16 | }, 17 | addNewAddress({state}, payload) { 18 | return new Promise(async (resolve, reject)=>{ 19 | let addAddress = await addNewAddress(payload); 20 | resolve(addAddress); 21 | }) 22 | } 23 | }; 24 | 25 | export default { 26 | // 命名空间 27 | namespaced: true, 28 | actions 29 | } 30 | -------------------------------------------------------------------------------- /weChat/src/components/conpon/null.vue: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 42 | -------------------------------------------------------------------------------- /weChat/src/pages/judge/index.vue: -------------------------------------------------------------------------------- 1 | 11 | 49 | -------------------------------------------------------------------------------- /weChat/src/store/modules/classify.js: -------------------------------------------------------------------------------- 1 | import {getSignList,listings} from '@/api/index'; 2 | const state={ 3 | list:[], 4 | props:[], 5 | page:1, 6 | pageSize:8 7 | } 8 | const mutations={ 9 | updateState(state, payload){ 10 | state.list=payload 11 | }, 12 | appuserState(state,payload){ 13 | state.props=payload 14 | } 15 | } 16 | const actions={ 17 | async getList({commit},payload){ 18 | let result=await getSignList(payload); 19 | commit('updateState',result.data.result) 20 | }, 21 | async getProps({commit, state},payload){ 22 | console.log(payload,'...') 23 | let result=await listings(payload); 24 | if (result.data.result && result.data.result.length){ 25 | if (payload.pageIndex === 1){ 26 | commit('appuserState', result.data.result) 27 | }else{ 28 | commit('appuserState', [...state.props, ...result.data.result]) 29 | } 30 | } 31 | } 32 | } 33 | export default { 34 | namespaced:true, 35 | state, 36 | actions, 37 | mutations 38 | } 39 | -------------------------------------------------------------------------------- /weChat/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex from 'vuex'; 3 | import createLogger from 'vuex/dist/logger'; 4 | 5 | // 挂载modules 6 | import special from './modules/special' 7 | import newadd from './modules/newadd' 8 | import myorder from './modules/myorder' 9 | import getAddressList from './modules/getAddressList' 10 | import shopDetail from "./modules/shopDetail" 11 | import phone from './modules/phone' 12 | import user from './modules/user' 13 | 14 | import spike from './modules/spike' 15 | import invite from "./modules/invite" 16 | import classify from "./modules/classify"; 17 | 18 | import coupon from './modules/coupon.js' //优惠券页面 19 | import settlement from './modules/settlement' 20 | import seek from './modules/seek' // 搜索 21 | 22 | //import upPicture from './modules/upPicture' 23 | 24 | Vue.use(Vuex); 25 | export default new Vuex.Store({ 26 | modules: { 27 | special, 28 | user, 29 | seek, 30 | phone, 31 | getAddressList, 32 | coupon, 33 | newadd, 34 | myorder, 35 | shopDetail, 36 | spike, 37 | invite, 38 | classify, 39 | settlement, 40 | shopDetail 41 | }, 42 | 43 | plugins: [createLogger()] 44 | }) 45 | -------------------------------------------------------------------------------- /weChat/src/store/modules/phone.js: -------------------------------------------------------------------------------- 1 | import { identify, bindPhone } from '@/api' 2 | const state = { 3 | phoneData: { 4 | userphone: '', 5 | phoneCode: '' 6 | } 7 | } 8 | const mutations = { 9 | updateState(state, payload) { 10 | for (let key in payload) { 11 | state.phoneData[key] = payload[key] 12 | } 13 | } 14 | } 15 | 16 | const actions = { 17 | //获取验证码 18 | async etIdentify({ commit }, payload) { 19 | return new Promise(async(resolve, reject) => { 20 | 21 | //version,phoneNumber 22 | let data = await identify(payload.userphone); 23 | commit('updateState', { userphone: data.phoneNumber }); 24 | resolve(data); 25 | }) 26 | }, 27 | 28 | //绑定手机号 29 | async bindPhone({ commit }, payload) { 30 | let result = await bindPhone({ 31 | phoneNumber: payload.userphone, 32 | verificationCode : payload.phoneCode, 33 | wxOauthJson: JSON.stringify(payload.wxOauthJson) 34 | }); 35 | return result; 36 | } 37 | } 38 | export default { 39 | namespaced: true, 40 | state, 41 | mutations, 42 | actions 43 | } 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | -------------------------------------------------------------------------------- /weChat/src/store/modules/user.js: -------------------------------------------------------------------------------- 1 | import { 2 | login, 3 | identifyBase, 4 | edit 5 | } from '@/api/index' 6 | 7 | const state = { 8 | code: '', 9 | userInfo: {}, 10 | wxOauthJson: {}, 11 | trackId: '' 12 | } 13 | 14 | const mutations = { 15 | updateState(state, payload) { 16 | for (let key in payload) { 17 | state[key] = payload[key]; 18 | } 19 | } 20 | } 21 | 22 | const actions = { 23 | async identify({commit}, payload) { 24 | console.log('payload...', payload); 25 | let result = await identifyBase(payload); 26 | return result; 27 | }, 28 | async edit({commit,state}, payload) { 29 | console.log('payload...', payload); 30 | let result = await edit(payload); 31 | return result; 32 | }, 33 | async login({commit,state}, payload) { 34 | console.log('payload...', payload); 35 | payload = { 36 | ...payload, 37 | code: state.code 38 | } 39 | let result = await login(payload); 40 | commit('updateState', { 41 | trackId: result.data.result.trackId, 42 | userInfo: result.data.result.userInfo, 43 | wxOauthJson: result.data.result.wxOauthJson 44 | }) 45 | return result.data; 46 | } 47 | } 48 | 49 | export default { 50 | namespaced: true, 51 | state, 52 | mutations, 53 | actions 54 | } 55 | -------------------------------------------------------------------------------- /weChat/src/store/modules/coupon.js: -------------------------------------------------------------------------------- 1 | //优惠券页面 2 | import { 3 | getConponList 4 | } from '@/api/index'; 5 | const moment = require('moment'); 6 | const state = { 7 | active: 0, 8 | list: [], //优惠券列表 9 | } 10 | 11 | const mutations = { 12 | updateState(state, payload) { 13 | for (let key in payload) { 14 | state[key] = payload[key] 15 | } 16 | } 17 | } 18 | 19 | const actions = { 20 | //获取优惠券列表 21 | getList({ 22 | commit, 23 | state 24 | }, payload) { 25 | return new Promise(async (resolve, reject) => { 26 | let params = {}; 27 | if (payload.active) { 28 | params.state = payload.active; 29 | } 30 | if (payload.active == 0) { 31 | params.state = 0; 32 | } 33 | let data = await getConponList(params); 34 | data.data.result.forEach(item => { 35 | item.startTime = formatTime(item.startTime); 36 | item.endTime = formatTime(item.endTime); 37 | item.updateTime = formatTime(item.updateTime); 38 | }) 39 | commit('updateState', { 40 | list: data.data.result 41 | }); 42 | resolve(data) 43 | }) 44 | } 45 | } 46 | 47 | function formatTime(start_time) { 48 | return moment(start_time).format('YYYY-MM-DD HH:mm'); 49 | } 50 | export default { 51 | namespaced: true, 52 | state, 53 | mutations, 54 | actions 55 | } 56 | -------------------------------------------------------------------------------- /weChat/src/store/modules/seek.js: -------------------------------------------------------------------------------- 1 | import { getPecommend, searchSort } from '@/api/index.js' 2 | 3 | const state = { 4 | productName: '', 5 | // detail的数据存放 6 | list: [], 7 | // 控制组件显示 8 | isShow: { 9 | isDetail: false, 10 | isWithout: false, 11 | isHistory: false 12 | }, 13 | priceSort: ['价格从高到低', '价格从低到高'] 14 | } 15 | const mutations = { 16 | updateState(state, payload) { 17 | for (let key in payload) { //list 18 | state[key] = payload[key] 19 | } 20 | } 21 | } 22 | const actions = { 23 | // 获取搜索内容 24 | async getSeekList({ commit }, payload) { 25 | console.log(payload) 26 | return new Promise(async(resolve, reject) => { 27 | let result = await getPecommend({ title: payload }); 28 | commit('updateState', { list: result.data.result }) 29 | resolve(result.data) 30 | }) 31 | }, 32 | 33 | // 数据排序 34 | async getSeekSort({ commit, state }, payload) { 35 | console.log('payload....', payload) 36 | return new Promise(async(resolve, reject) => { 37 | let data = await searchSort(payload) 38 | commit('updateState', { list: data.data.result }) 39 | }) 40 | } 41 | } 42 | 43 | export default { 44 | namespaced: true, 45 | state, 46 | mutations, 47 | actions 48 | } -------------------------------------------------------------------------------- /weChat/build/build.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.NODE_ENV = 'production' 4 | process.env.PLATFORM = process.argv[process.argv.length - 1] || 'wx' 5 | 6 | var ora = require('ora') 7 | var rm = require('rimraf') 8 | var path = require('path') 9 | var chalk = require('chalk') 10 | var webpack = require('webpack') 11 | var config = require('../config') 12 | var webpackConfig = require('./webpack.prod.conf') 13 | var utils = require('./utils') 14 | 15 | var spinner = ora('building for production...') 16 | spinner.start() 17 | 18 | rm(path.join(config.build.assetsRoot, '*'), err => { 19 | if (err) throw err 20 | webpack(webpackConfig, function (err, stats) { 21 | spinner.stop() 22 | if (err) throw err 23 | if (process.env.PLATFORM === 'swan') { 24 | utils.writeFrameworkinfo() 25 | } 26 | process.stdout.write(stats.toString({ 27 | colors: true, 28 | modules: false, 29 | children: false, 30 | chunks: false, 31 | chunkModules: false 32 | }) + '\n\n') 33 | 34 | if (stats.hasErrors()) { 35 | console.log(chalk.red(' Build failed with errors.\n')) 36 | process.exit(1) 37 | } 38 | 39 | console.log(chalk.cyan(' Build complete.\n')) 40 | console.log(chalk.yellow( 41 | ' Tip: built files are meant to be served over an HTTP server.\n' + 42 | ' Opening index.html over file:// won\'t work.\n' 43 | )) 44 | }) 45 | }) 46 | -------------------------------------------------------------------------------- /weChat/build/check-versions.js: -------------------------------------------------------------------------------- 1 | var chalk = require('chalk') 2 | var semver = require('semver') 3 | var packageConfig = require('../package.json') 4 | var shell = require('shelljs') 5 | function exec (cmd) { 6 | return require('child_process').execSync(cmd).toString().trim() 7 | } 8 | 9 | var versionRequirements = [ 10 | { 11 | name: 'node', 12 | currentVersion: semver.clean(process.version), 13 | versionRequirement: packageConfig.engines.node 14 | } 15 | ] 16 | 17 | if (shell.which('npm')) { 18 | versionRequirements.push({ 19 | name: 'npm', 20 | currentVersion: exec('npm --version'), 21 | versionRequirement: packageConfig.engines.npm 22 | }) 23 | } 24 | 25 | module.exports = function () { 26 | var warnings = [] 27 | for (var i = 0; i < versionRequirements.length; i++) { 28 | var mod = versionRequirements[i] 29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 30 | warnings.push(mod.name + ': ' + 31 | chalk.red(mod.currentVersion) + ' should be ' + 32 | chalk.green(mod.versionRequirement) 33 | ) 34 | } 35 | } 36 | 37 | if (warnings.length) { 38 | console.log('') 39 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 40 | console.log() 41 | for (var i = 0; i < warnings.length; i++) { 42 | var warning = warnings[i] 43 | console.log(' ' + warning) 44 | } 45 | console.log() 46 | process.exit(1) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /weChat/static/images/ture3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 圆形-勾选@2x 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /weChat/static/images/choose.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 圆形-勾选@2x 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /weChat/src/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/referrer/main", 4 | "pages/phone/main", 5 | "pages/classify/main", 6 | "pages/autonym/main", 7 | "pages/share/main", 8 | "pages/index/main", 9 | 10 | "pages/judge/main", 11 | "pages/artificial/main", 12 | 13 | "pages/submission/main", 14 | "pages/go2detail/main", 15 | "pages/spike/main", 16 | "pages/spikeDetail/main", 17 | 18 | "pages/special/main", 19 | "pages/conponlist/main", 20 | "pages/logistics/main", 21 | "pages/myorder/main", 22 | "pages/myorder/successfulTrade/main", 23 | "pages/myorder/cashDetails/main", 24 | "pages/orderdetails/main", 25 | "pages/seek/main", 26 | 27 | "pages/sharedetail/main", 28 | "pages/logs/main", 29 | "pages/shoppingadress/main", 30 | "pages/shoppingadress/redactAddress/main", 31 | "pages/logistics/success/main", 32 | "pages/myorder/settlement/main" 33 | ], 34 | "window": { 35 | "backgroundTextStyle": "light", 36 | "navigationBarBackgroundColor": "#fff", 37 | "navigationBarTitleText": "WeChat", 38 | "navigationBarTextStyle": "black" 39 | }, 40 | "tabBar":{ 41 | "selectedColor":"#56D2BF", 42 | "borderStyle":"black", 43 | "list":[{ 44 | "pagePath": "pages/index/main", 45 | "text":"首页", 46 | "iconPath": "/static/images/shouye.png", 47 | "selectedIconPath": "/static/images/shouye_active.png" 48 | }, 49 | { 50 | "pagePath": "pages/logs/main", 51 | "text": "我的", 52 | "iconPath":"/static/images/my.png", 53 | "selectedIconPath": "/static/images/my_active.png" 54 | }] 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /weChat/static/images/lt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 下一步@2x 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /weChat/README.md: -------------------------------------------------------------------------------- 1 | ## 宝贝多多 2 | 3 | > A Mpvue project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # 初始化项目 9 | vue init mpvue/mpvue-quickstart myproject 10 | cd myproject 11 | 12 | # 安装依赖 13 | yarn 14 | 15 | # 开发时构建 16 | npm dev 17 | 18 | # 打包构建 19 | npm build 20 | 21 | # 指定平台的开发时构建(微信、百度、头条、支付宝) 22 | npm dev:wx 23 | npm dev:swan 24 | npm dev:tt 25 | npm dev:my 26 | 27 | # 指定平台的打包构建 28 | npm build:wx 29 | npm build:swan 30 | npm build:tt 31 | npm build:my 32 | 33 | # 生成 bundle 分析报告 34 | npm run build --report 35 | ``` 36 | 37 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 38 | 39 | 40 | ### 开发问题 41 | - 没有邀请码可测试 42 | - 没有立即加入点击之后的逻辑 43 | 44 | - 分类页面逻辑混乱 45 | - 专题页面传siid获取数据返回不对 46 | - 分享页面逻辑,二维码生成接口 47 | 48 | - 需要测试订单id 49 | - 需要测试优惠券信息 50 | 51 | 52 | 53 | - 需要商品详情页面 54 | 55 | 56 | ## 部分流程 57 | - 登陆流程 58 | 注册的逻辑是 微信授权 - 没有绑定手机号 -绑定手机号 - 没有上级-到绑定邀请码-绑定邀请码-到首页 59 | 60 | 61 | ## 路由信息 62 | - 邀请人页面 "pages/referrer/main", 63 | - 绑定手机号 "pages/phone/main", 64 | - 分类页面 "pages/classify/main", 65 | - 身份认证 "pages/autonym/main", 66 | - 分享页面 "pages/share/main", 67 | - 首页 "pages/index/main", 68 | 69 | "pages/submission/main", 70 | "pages/go2detail/main", 71 | "pages/spike/main", 72 | "pages/spikeDetail/main", 73 | 74 | - 专题页 "pages/special/main", 75 | - 优惠券 "pages/conponlist/main", 76 | - 物流信息 "pages/logistics/main", 77 | - 购买成功 "pages/logistics/success/main", 78 | - 我的订单 "pages/myorder/main", 79 | - 交易成功 "pages/myorder/successfulTrade/main", 80 | - 去付款 "pages/myorder/settlement/main", 81 | - 订单详情 "pages/orderdetails/main", 82 | - 搜索页面 "pages/seek/main", 83 | 84 | - 分享详情 "pages/sharedetail/main", 85 | - 收获地址 "pages/shoppingadress/main", 86 | - 修改地址 "pages/shoppingadress/redactAddress/main" 87 | -------------------------------------------------------------------------------- /weChat/static/images/success.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 成功已解决@2x 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /weChat/src/store/modules/shopDetail.js: -------------------------------------------------------------------------------- 1 | import {getDatail} from "@/api/index" 2 | 3 | const state={ 4 | detailData:[], 5 | createTimes:[], 6 | payTimes:[], 7 | allMoney:"" 8 | 9 | } 10 | 11 | const mutations={ 12 | updata(state,payload){ 13 | state.detailData=payload.data 14 | }, 15 | getLocalTime(state,payload){ 16 | let createTime=payload.data.createTime 17 | let payTime=payload.data.payTime 18 | //支付金额 19 | let sumMoney=payload.data.totalAmount*payload.data.products.length 20 | +payload.data.totalDeliveryMoney+payload.data.totalTaxationAmount-payload.data.totalDiscountAmount 21 | state.allMoney=sumMoney 22 | 23 | state.payTimes=getTime(payTime) 24 | state.createTimes=getTime(createTime) 25 | } 26 | } 27 | 28 | const actions={ 29 | async getDatail({commit},payload){ 30 | let result=await getDatail(payload); 31 | console.log(result.data.result,"result") 32 | commit("updata",{data:result.data.result}) 33 | commit("getLocalTime",{data:result.data.result}) 34 | return result 35 | } 36 | } 37 | 38 | function getTime(x){ 39 | var d = new Date(x); 40 | var Y = d.getFullYear(); 41 | var M = d.getMonth()+1; 42 | if (M<=9) { 43 | M = '0'+M; 44 | }else{ 45 | M = M; 46 | } 47 | var day = d.getDate(); 48 | if (day<=9) { 49 | day = '0'+day 50 | }else{ 51 | day = day; 52 | } 53 | var hour = d.getHours(); 54 | if (hour<10) { 55 | hour = '0' + hour; 56 | }else{ 57 | hour = hour ; 58 | } 59 | var min = d.getMinutes(); 60 | if (min<10) { 61 | min = '0' + min; 62 | } else { 63 | min = min; 64 | } 65 | let timeArr=[Y+'-'+M+'-'+day, hour+':'+min] 66 | return timeArr 67 | } 68 | export default { 69 | namespaced:true, 70 | state, 71 | actions, 72 | mutations 73 | } 74 | -------------------------------------------------------------------------------- /weChat/src/pages/myorder/successfulTrade/index.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 40 | -------------------------------------------------------------------------------- /weChat/src/utils/request.js: -------------------------------------------------------------------------------- 1 | import Fly from "flyio" 2 | import store from '@/store/index' 3 | 4 | const fly = new Fly() 5 | //设置超时 6 | fly.config.timeout = 10000; 7 | //设置请求基地址 8 | fly.config.baseURL = "http://test.api.jinaup.com/" 9 | // 设置版本号 10 | const version = '1.0.0' 11 | 12 | let cookies = {} 13 | //添加请求拦截器 14 | fly.interceptors.request.use((request) => { 15 | // 把trackId放在请求头部 16 | let trackId = store.state.user.trackId; 17 | trackId = trackId ||'F649B34989975F268D3E917EBD51B81C7D08F94FA6DDF11851787716A558794DC6291F956DE6188AC10DAC62D9392D3B3674D93872E445F199F0CD733106E3F6BDCEDB846A3B42A62830075BE7A4132959767C70BBCC4FD2504723625057EDC2925C8248A015E8F1'; 18 | if (trackId) { 19 | request.headers['trackId'] = trackId; 20 | } 21 | // 拼接版本号 22 | request.url += `/${version}`; 23 | 24 | // 修改content-type = 'x-www-form-urlencoded' 25 | request.headers['Content-Type'] = 'application/x-www-form-urlencoded' 26 | 27 | //给所有请求添加自定义header 28 | let header_cookie = []; 29 | for (let key in cookies) { 30 | header_cookie.push(`${key}=${cookies[key]}`); 31 | } 32 | request.headers["Cookie"] = header_cookie.join(';') 33 | //打印出请求体 34 | // console.log(request.body) 35 | //终止请求 36 | //var err=new Error("xxx") 37 | //err.request=request 38 | //return Promise.reject(new Error("")) 39 | //可以显式返回request, 也可以不返回,没有返回值时拦截器中默认返回request 40 | return request; 41 | }) 42 | 43 | //添加响应拦截器,响应拦截器会在then/catch处理之前执行 44 | fly.interceptors.response.use( 45 | (response) => { 46 | // 截取cookie 47 | let hcks = response.headers['set-cookie'] || response.headers['Set-Cookie'] 48 | if (hcks != null) { 49 | hcks.forEach(v => { 50 | let ck = v.split(';')[0].split('=') 51 | cookies[ck[0]] = ck[1] 52 | }) 53 | } 54 | // return response.data; 55 | (err) => { 56 | //发生网络错误后会走到这里 57 | //return Promise.resolve("ssss") 58 | } 59 | }) 60 | 61 | export default fly 62 | -------------------------------------------------------------------------------- /weChat/src/pages/conponlist/index.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 64 | 65 | 90 | -------------------------------------------------------------------------------- /weChat/src/utils/index.js: -------------------------------------------------------------------------------- 1 | function formatNumber(n) { 2 | const str = n.toString() 3 | return str[1] ? str : `0${str}` 4 | } 5 | 6 | export function formatTime(date) { 7 | typeof date == 'number'?date=new Date(date): null; 8 | const year = date.getFullYear() 9 | const month = date.getMonth() + 1 10 | const day = date.getDate() 11 | 12 | const hour = date.getHours() 13 | const minute = date.getMinutes() 14 | const second = date.getSeconds() 15 | 16 | const t1 = [year, month, day].map(formatNumber).join('-') 17 | const t2 = [hour, minute, second].map(formatNumber).join(':') 18 | 19 | return `${t1} ${t2}` 20 | } 21 | 22 | // 格式化倒计时 23 | export function formatTimeout(timestamp) { 24 | let min = Math.floor(timestamp/1000/60%60), 25 | sec = Math.floor(timestamp/1000%60); 26 | 27 | if (min ==0 && sec == 0){ 28 | return `结:束` 29 | }else{ 30 | return `${formatNumber(min)}:${formatNumber(sec)}`; 31 | } 32 | } 33 | 34 | // 登陆改成Promise 35 | export function getCode(){ 36 | return new Promise((resolve, reject)=>{ 37 | wx.login({ 38 | success: res => { 39 | resolve(res.code); 40 | }, 41 | }) 42 | }) 43 | } 44 | 45 | /** 46 | * 通用授权逻辑 47 | * @export 48 | * @param {*} scope 权限信息 49 | * @param {*} callback 授权成功回调 50 | */ 51 | export function getAuth(scope, callback, showTip = true) { 52 | wx.getSetting({ 53 | success: res => { 54 | // 如果已授权 55 | if (res.authSetting[scope]) { 56 | callback(); 57 | } else { 58 | showTip && wx.authorize({ 59 | scope, 60 | success: callback, 61 | fail: () => { 62 | wx.showModal({ 63 | title: '亲爱的用户', //提示的标题, 64 | content: '同意我们的授权,让我们为你提供更加优质的服务', //提示的内容, 65 | showCancel: false, //是否显示取消按钮, 66 | confirmText: '去设置', //确定按钮的文字,默认为取消,最多 4 个字符, 67 | confirmColor: '#3CC51F', //确定按钮的文字颜色 68 | success: res => { 69 | wx.openSetting() 70 | } 71 | }) 72 | } 73 | }) 74 | } 75 | } 76 | }) 77 | } 78 | export default { 79 | formatNumber, 80 | formatTime 81 | } 82 | -------------------------------------------------------------------------------- /weChat/static/images/zfb.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 支付宝icon@2x 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /weChat/src/components/user/login.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 79 | 80 | 90 | -------------------------------------------------------------------------------- /weChat/static/images/ding.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 提醒铃铛icon@2x 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /weChat/config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | var fileExtConfig = { 4 | swan: { 5 | template: 'swan', 6 | script: 'js', 7 | style: 'css', 8 | platform: 'swan' 9 | }, 10 | tt: { 11 | template: 'ttml', 12 | script: 'js', 13 | style: 'ttss', 14 | platform: 'tt' 15 | }, 16 | wx: { 17 | template: 'wxml', 18 | script: 'js', 19 | style: 'wxss', 20 | platform: 'wx' 21 | }, 22 | my: { 23 | template: 'axml', 24 | script: 'js', 25 | style: 'acss', 26 | platform: 'my' 27 | } 28 | } 29 | var fileExt = fileExtConfig[process.env.PLATFORM] 30 | 31 | module.exports = { 32 | build: { 33 | env: require('./prod.env'), 34 | index: path.resolve(__dirname, `../dist/${fileExt.platform}/index.html`), 35 | assetsRoot: path.resolve(__dirname, `../dist/${fileExt.platform}`), 36 | assetsSubDirectory: '', 37 | assetsPublicPath: '/', 38 | productionSourceMap: false, 39 | // Gzip off by default as many popular static hosts such as 40 | // Surge or Netlify already gzip all static assets for you. 41 | // Before setting to `true`, make sure to: 42 | // npm install --save-dev compression-webpack-plugin 43 | productionGzip: false, 44 | productionGzipExtensions: ['js', 'css'], 45 | // Run the build command with an extra argument to 46 | // View the bundle analyzer report after build finishes: 47 | // `npm run build --report` 48 | // Set to `true` or `false` to always turn it on or off 49 | bundleAnalyzerReport: process.env.npm_config_report, 50 | fileExt: fileExt 51 | }, 52 | dev: { 53 | env: require('./dev.env'), 54 | port: 8080, 55 | // 在小程序开发者工具中不需要自动打开浏览器 56 | autoOpenBrowser: false, 57 | assetsSubDirectory: '', 58 | assetsPublicPath: '/', 59 | proxyTable: {}, 60 | // CSS Sourcemaps off by default because relative paths are "buggy" 61 | // with this option, according to the CSS-Loader README 62 | // (https://github.com/webpack/css-loader#sourcemaps) 63 | // In our experience, they generally work as expected, 64 | // just be aware of this issue when enabling this option. 65 | cssSourceMap: false, 66 | fileExt: fileExt 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /weChat/src/pages/logistics/success/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 45 | 46 | 113 | -------------------------------------------------------------------------------- /weChat/src/pages/goPay/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /weChat/src/components/spikeCom.vue: -------------------------------------------------------------------------------- 1 | 28 | 46 | 112 | -------------------------------------------------------------------------------- /weChat/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "up_wechat_app", 3 | "version": "1.0.0", 4 | "mpvueTemplateProjectVersion": "0.1.0", 5 | "description": "A Mpvue project", 6 | "author": "", 7 | "private": true, 8 | "scripts": { 9 | "dev:wx": "node build/dev-server.js wx", 10 | "start:wx": "npm run dev:wx", 11 | "build:wx": "node build/build.js wx", 12 | "dev:swan": "node build/dev-server.js swan", 13 | "start:swan": "npm run dev:swan", 14 | "build:swan": "node build/build.js swan", 15 | "dev:tt": "node build/dev-server.js tt", 16 | "start:tt": "npm run dev:tt", 17 | "build:tt": "node build/build.js tt", 18 | "dev:my": "node build/dev-server.js my", 19 | "start:my": "npm run dev:my", 20 | "build:my": "node build/build.js my", 21 | "dev": "node build/dev-server.js wx", 22 | "start": "npm run dev", 23 | "build": "node build/build.js wx" 24 | }, 25 | "dependencies": { 26 | "better-scroll": "^1.15.1", 27 | "chalk": "^2.4.2", 28 | "escape-string-regexp": "^1.0.5", 29 | "flyio": "^0.6.14", 30 | "moment": "^2.24.0", 31 | "mpvue": "^2.0.0", 32 | "node-sass": "^4.11.0", 33 | "sass-loader": "^7.1.0", 34 | "vuex": "^3.0.1" 35 | }, 36 | "devDependencies": { 37 | "babel-core": "^6.22.1", 38 | "babel-eslint": "^8.2.3", 39 | "babel-loader": "^7.1.5", 40 | "babel-plugin-transform-runtime": "^6.22.0", 41 | "babel-preset-env": "^1.3.2", 42 | "babel-preset-stage-2": "^6.22.0", 43 | "babel-register": "^6.22.0", 44 | "chalk": "^2.4.0", 45 | "connect-history-api-fallback": "^1.3.0", 46 | "copy-webpack-plugin": "^4.5.1", 47 | "css-loader": "^0.28.11", 48 | "cssnano": "^3.10.0", 49 | "eventsource-polyfill": "^0.9.6", 50 | "express": "^4.16.3", 51 | "extract-text-webpack-plugin": "^3.0.2", 52 | "file-loader": "^1.1.11", 53 | "friendly-errors-webpack-plugin": "^1.7.0", 54 | "glob": "^7.1.2", 55 | "html-webpack-plugin": "^3.2.0", 56 | "http-proxy-middleware": "^0.18.0", 57 | "mkdirp": "^0.5.1", 58 | "mpvue-loader": "^2.0.0", 59 | "mpvue-template-compiler": "^2.0.0", 60 | "mpvue-webpack-target": "^1.0.3", 61 | "optimize-css-assets-webpack-plugin": "^3.2.0", 62 | "ora": "^2.0.0", 63 | "portfinder": "^1.0.13", 64 | "postcss-loader": "^2.1.4", 65 | "postcss-mpvue-wxss": "^1.0.0", 66 | "prettier": "~1.12.1", 67 | "px2rpx-loader": "^0.1.10", 68 | "relative": "^3.0.2", 69 | "rimraf": "^2.6.0", 70 | "semver": "^5.3.0", 71 | "shelljs": "^0.8.1", 72 | "uglifyjs-webpack-plugin": "^1.2.5", 73 | "url-loader": "^1.0.1", 74 | "vue-style-loader": "^4.1.0", 75 | "webpack": "^3.11.0", 76 | "webpack-bundle-analyzer": "^2.2.1", 77 | "webpack-dev-middleware-hard-disk": "^1.12.0", 78 | "webpack-merge": "^4.1.0", 79 | "webpack-mpvue-asset-plugin": "^2.0.0", 80 | "webpack-mpvue-vendor-plugin": "^2.0.0" 81 | }, 82 | "engines": { 83 | "node": ">= 4.0.0", 84 | "npm": ">= 3.0.0" 85 | }, 86 | "browserslist": [ 87 | "> 1%", 88 | "last 2 versions", 89 | "not ie <= 8" 90 | ] 91 | } 92 | -------------------------------------------------------------------------------- /weChat/src/pages/sharedetail/index.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 47 | 48 | 150 | -------------------------------------------------------------------------------- /weChat/src/components/seek/history.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 69 | 70 | -------------------------------------------------------------------------------- /weChat/build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var webpack = require('webpack') 3 | var config = require('../config') 4 | var merge = require('webpack-merge') 5 | var baseWebpackConfig = require('./webpack.base.conf') 6 | // var HtmlWebpackPlugin = require('html-webpack-plugin') 7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 8 | var MpvueVendorPlugin = require('webpack-mpvue-vendor-plugin') 9 | 10 | // copy from ./webpack.prod.conf.js 11 | var path = require('path') 12 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 13 | var CopyWebpackPlugin = require('copy-webpack-plugin') 14 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 15 | 16 | // add hot-reload related code to entry chunks 17 | // Object.keys(baseWebpackConfig.entry).forEach(function (name) { 18 | // baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 19 | // }) 20 | 21 | module.exports = merge(baseWebpackConfig, { 22 | module: { 23 | rules: utils.styleLoaders({ 24 | sourceMap: config.dev.cssSourceMap, 25 | extract: true 26 | }) 27 | }, 28 | // cheap-module-eval-source-map is faster for development 29 | // devtool: '#cheap-module-eval-source-map', 30 | // devtool: '#source-map', 31 | output: { 32 | path: config.build.assetsRoot, 33 | // filename: utils.assetsPath('[name].[chunkhash].js'), 34 | // chunkFilename: utils.assetsPath('[id].[chunkhash].js') 35 | filename: utils.assetsPath('[name].js'), 36 | chunkFilename: utils.assetsPath('[id].js') 37 | }, 38 | plugins: [ 39 | new webpack.DefinePlugin({ 40 | 'process.env': config.dev.env 41 | }), 42 | 43 | // copy from ./webpack.prod.conf.js 44 | // extract css into its own file 45 | new ExtractTextPlugin({ 46 | // filename: utils.assetsPath('[name].[contenthash].css') 47 | filename: utils.assetsPath(`[name].${config.dev.fileExt.style}`) 48 | }), 49 | // Compress extracted CSS. We are using this plugin so that possible 50 | // duplicated CSS from different components can be deduped. 51 | new OptimizeCSSPlugin({ 52 | cssProcessorOptions: { 53 | safe: true 54 | } 55 | }), 56 | new webpack.optimize.CommonsChunkPlugin({ 57 | name: 'common/vendor', 58 | minChunks: function (module, count) { 59 | // any required modules inside node_modules are extracted to vendor 60 | return ( 61 | module.resource && 62 | /\.js$/.test(module.resource) && 63 | module.resource.indexOf('node_modules') >= 0 64 | ) || count > 1 65 | } 66 | }), 67 | new webpack.optimize.CommonsChunkPlugin({ 68 | name: 'common/manifest', 69 | chunks: ['common/vendor'] 70 | }), 71 | new MpvueVendorPlugin({ 72 | platform: process.env.PLATFORM 73 | }), 74 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage 75 | // new webpack.HotModuleReplacementPlugin(), 76 | new webpack.NoEmitOnErrorsPlugin(), 77 | // https://github.com/ampedandwired/html-webpack-plugin 78 | // new HtmlWebpackPlugin({ 79 | // filename: 'index.html', 80 | // template: 'index.html', 81 | // inject: true 82 | // }), 83 | new FriendlyErrorsPlugin() 84 | ] 85 | }) 86 | -------------------------------------------------------------------------------- /weChat/static/images/wx.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分享微信@2x 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /weChat/build/utils.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('fs') 3 | var config = require('../config') 4 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | var mpvueInfo = require('../node_modules/mpvue/package.json') 6 | var packageInfo = require('../package.json') 7 | var mkdirp = require('mkdirp') 8 | 9 | exports.assetsPath = function (_path) { 10 | var assetsSubDirectory = process.env.NODE_ENV === 'production' 11 | ? config.build.assetsSubDirectory 12 | : config.dev.assetsSubDirectory 13 | return path.posix.join(assetsSubDirectory, _path) 14 | } 15 | 16 | exports.cssLoaders = function (options) { 17 | options = options || {} 18 | 19 | var cssLoader = { 20 | loader: 'css-loader', 21 | options: { 22 | minimize: process.env.NODE_ENV === 'production', 23 | sourceMap: options.sourceMap 24 | } 25 | } 26 | 27 | var postcssLoader = { 28 | loader: 'postcss-loader', 29 | options: { 30 | sourceMap: true 31 | } 32 | } 33 | 34 | var px2rpxLoader = { 35 | loader: 'px2rpx-loader', 36 | options: { 37 | baseDpr: 1, 38 | rpxUnit: 0.5 39 | } 40 | } 41 | 42 | // generate loader string to be used with extract text plugin 43 | function generateLoaders (loader, loaderOptions) { 44 | var loaders = [cssLoader, px2rpxLoader, postcssLoader] 45 | if (loader) { 46 | loaders.push({ 47 | loader: loader + '-loader', 48 | options: Object.assign({}, loaderOptions, { 49 | sourceMap: options.sourceMap 50 | }) 51 | }) 52 | } 53 | 54 | // Extract CSS when that option is specified 55 | // (which is the case during production build) 56 | if (options.extract) { 57 | return ExtractTextPlugin.extract({ 58 | use: loaders, 59 | fallback: 'vue-style-loader' 60 | }) 61 | } else { 62 | return ['vue-style-loader'].concat(loaders) 63 | } 64 | } 65 | 66 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 67 | return { 68 | css: generateLoaders(), 69 | wxss: generateLoaders(), 70 | postcss: generateLoaders(), 71 | less: generateLoaders('less'), 72 | sass: generateLoaders('sass', { indentedSyntax: true }), 73 | scss: generateLoaders('sass'), 74 | stylus: generateLoaders('stylus'), 75 | styl: generateLoaders('stylus') 76 | } 77 | } 78 | 79 | // Generate loaders for standalone style files (outside of .vue) 80 | exports.styleLoaders = function (options) { 81 | var output = [] 82 | var loaders = exports.cssLoaders(options) 83 | for (var extension in loaders) { 84 | var loader = loaders[extension] 85 | output.push({ 86 | test: new RegExp('\\.' + extension + '$'), 87 | use: loader 88 | }) 89 | } 90 | return output 91 | } 92 | 93 | const writeFile = async (filePath, content) => { 94 | let dir = path.dirname(filePath) 95 | let exist = fs.existsSync(dir) 96 | if (!exist) { 97 | await mkdirp(dir) 98 | } 99 | await fs.writeFileSync(filePath, content, 'utf8') 100 | } 101 | 102 | exports.writeFrameworkinfo = function () { 103 | var buildInfo = { 104 | 'toolName': mpvueInfo.name, 105 | 'toolFrameWorkVersion': mpvueInfo.version, 106 | 'toolCliVersion': packageInfo.mpvueTemplateProjectVersion || '', 107 | 'createTime': Date.now() 108 | } 109 | 110 | var content = JSON.stringify(buildInfo) 111 | var fileName = '.frameworkinfo' 112 | var rootDir = path.resolve(__dirname, `../${fileName}`) 113 | var distDir = path.resolve(config.build.assetsRoot, `./${fileName}`) 114 | 115 | writeFile(rootDir, content) 116 | writeFile(distDir, content) 117 | } 118 | -------------------------------------------------------------------------------- /weChat/build/dev-server.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.PLATFORM = process.argv[process.argv.length - 1] || 'wx' 4 | var config = require('../config') 5 | if (!process.env.NODE_ENV) { 6 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) 7 | } 8 | 9 | // var opn = require('opn') 10 | var path = require('path') 11 | var express = require('express') 12 | var webpack = require('webpack') 13 | var proxyMiddleware = require('http-proxy-middleware') 14 | var portfinder = require('portfinder') 15 | var webpackConfig = require('./webpack.dev.conf') 16 | var utils = require('./utils') 17 | 18 | // default port where dev server listens for incoming traffic 19 | var port = process.env.PORT || config.dev.port 20 | // automatically open browser, if not set will be false 21 | var autoOpenBrowser = !!config.dev.autoOpenBrowser 22 | // Define HTTP proxies to your custom API backend 23 | // https://github.com/chimurai/http-proxy-middleware 24 | var proxyTable = config.dev.proxyTable 25 | 26 | var app = express() 27 | var compiler = webpack(webpackConfig) 28 | if (process.env.PLATFORM === 'swan') { 29 | utils.writeFrameworkinfo() 30 | } 31 | 32 | // var devMiddleware = require('webpack-dev-middleware')(compiler, { 33 | // publicPath: webpackConfig.output.publicPath, 34 | // quiet: true 35 | // }) 36 | 37 | // var hotMiddleware = require('webpack-hot-middleware')(compiler, { 38 | // log: false, 39 | // heartbeat: 2000 40 | // }) 41 | // force page reload when html-webpack-plugin template changes 42 | // compiler.plugin('compilation', function (compilation) { 43 | // compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 44 | // hotMiddleware.publish({ action: 'reload' }) 45 | // cb() 46 | // }) 47 | // }) 48 | 49 | // proxy api requests 50 | Object.keys(proxyTable).forEach(function (context) { 51 | var options = proxyTable[context] 52 | if (typeof options === 'string') { 53 | options = { target: options } 54 | } 55 | app.use(proxyMiddleware(options.filter || context, options)) 56 | }) 57 | 58 | // handle fallback for HTML5 history API 59 | app.use(require('connect-history-api-fallback')()) 60 | 61 | // serve webpack bundle output 62 | // app.use(devMiddleware) 63 | 64 | // enable hot-reload and state-preserving 65 | // compilation error display 66 | // app.use(hotMiddleware) 67 | 68 | // serve pure static assets 69 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 70 | app.use(staticPath, express.static('./static')) 71 | 72 | // var uri = 'http://localhost:' + port 73 | 74 | var _resolve 75 | var readyPromise = new Promise(resolve => { 76 | _resolve = resolve 77 | }) 78 | 79 | // console.log('> Starting dev server...') 80 | // devMiddleware.waitUntilValid(() => { 81 | // console.log('> Listening at ' + uri + '\n') 82 | // // when env is testing, don't need open it 83 | // if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { 84 | // opn(uri) 85 | // } 86 | // _resolve() 87 | // }) 88 | 89 | module.exports = new Promise((resolve, reject) => { 90 | portfinder.basePort = port 91 | portfinder.getPortPromise() 92 | .then(newPort => { 93 | if (port !== newPort) { 94 | console.log(`${port}端口被占用,开启新端口${newPort}`) 95 | } 96 | var server = app.listen(newPort, 'localhost') 97 | // for 小程序的文件保存机制 98 | require('webpack-dev-middleware-hard-disk')(compiler, { 99 | publicPath: webpackConfig.output.publicPath, 100 | quiet: true 101 | }) 102 | resolve({ 103 | ready: readyPromise, 104 | close: () => { 105 | server.close() 106 | } 107 | }) 108 | }).catch(error => { 109 | console.log('没有找到空闲端口,请打开任务管理器杀死进程端口再试', error) 110 | }) 111 | }) 112 | -------------------------------------------------------------------------------- /weChat/src/api/index.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | // 登陆接口 4 | export let login = params => { 5 | return request.post('api/open/user/info/oauth', { 6 | ...params, 7 | platform: 4, 8 | }) 9 | } 10 | 11 | //匹配邀请码正确的群信息 12 | export let groupName = params => { 13 | return request.post('/api/open/user/info/getbycode', params); 14 | } 15 | //获取验证码 16 | export let identify = phoneNumber => { 17 | return request.post('/api/open/user/info/send/code', { 18 | phoneNumber 19 | }) 20 | } 21 | 22 | // 绑定手机号 23 | export let bindPhone = params => { 24 | return request.post('/api/open/user/info/bind/phone', { 25 | platform: 4, 26 | ...params 27 | }) 28 | } 29 | //分类接口 30 | export let fenlei = params => { 31 | return request.post('/api/open/product/category/query', params) 32 | } 33 | //获取用户收货地址列表 34 | export let getAddressListData = code => { 35 | return request.post('/api/open/user/address/list', { 36 | code 37 | }) 38 | } 39 | 40 | // 获取用户 41 | export let addAddress = code => { 42 | return request.post('/api/open/user/address/list', { 43 | code 44 | }) 45 | } 46 | 47 | // 搜索数据 48 | export let getPecommend = params => { 49 | return request.post('/api/open/search/query/recommend', params) //{title:'kh'} 50 | } 51 | // 修改用户收货地址 52 | export let changeUserAddress = userData => { 53 | return request.post('/api/open/user/address/editAddress', userData) 54 | } 55 | 56 | //添加用户收货地址 57 | export let addNewAddress = params => { 58 | return request.post('/api/open/user/address/addAddress', params) 59 | } 60 | // 订单查询 61 | export let FindOrder = (params) => { 62 | return request.post('/api/open/order/query', params) 63 | } 64 | 65 | //订单详情 66 | export let getDatail = params => { 67 | return request.post('/api/open/order/query/detail', params) 68 | } 69 | 70 | //取消订单 71 | export let cancelOrder = params=>{ 72 | return request.post('/api/open/order/cancel/detail', params) 73 | } 74 | 75 | //确认订单 76 | export let ensureOrder = params=>{ 77 | return request.post('/api/open/order/confirm/order', params) 78 | } 79 | 80 | // 用户身份认证 81 | export let identif = params => { 82 | return request.post('/api/open/user/auth/identify', params); 83 | } 84 | 85 | //分享页数据 86 | export let shareDate = params => { 87 | return request.post('api/open/product/seckill/query', params) 88 | } 89 | 90 | // 专题分类 91 | export let special = params => { 92 | return request.post('api/open/sepcial/query', { 93 | siid: params 94 | }) 95 | } 96 | 97 | // 邀请人列表 98 | export let Invitelist = () => { 99 | return request.post('/api/open/user/recommender/list') 100 | } 101 | 102 | // 获取分类tab数据 103 | export let getSignList = params => { 104 | return request.post('/api/open/product/category/query', params); 105 | } 106 | //获取分类下拉列表 107 | export let listings = params => { 108 | return request.post('/api/open/product/category/productList', params) 109 | } 110 | // 用户身份认证 111 | export let identifyBase = params => { 112 | return request.post('/api/open/user/auth/identityBase64', params); 113 | } 114 | 115 | //更新用户实名认证 116 | export let edit = params => { 117 | return request.post('/api/open/user/auth/editBase64', params); 118 | } 119 | 120 | //优惠券接口 121 | export let getConponList = params => { 122 | 123 | return request.post('/api/open/user/coupon/userCouponInfoList', params); 124 | } 125 | 126 | //绑定联系人 127 | export let bindInvite = params => { 128 | return request.post('/api/open/user/recommender/bind', params) 129 | } 130 | 131 | // 搜索数据排序 132 | export let searchSort = params => { 133 | return request.post('/api/open/search/query', params) 134 | } 135 | 136 | 137 | // 预支付接口 138 | export let prePare = params => { 139 | return request.post('/api/open/order/prepare', params) 140 | } 141 | 142 | // 支付接口 143 | export let payOrder = params => { 144 | return request.post('/api/open/order/place/order', params); 145 | } 146 | 147 | // 获取订单数量 148 | export let ddNum = params => { 149 | return request.post('/api/open/order/tips') 150 | } 151 | -------------------------------------------------------------------------------- /weChat/src/pages/shoppingadress/index.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 74 | 75 | 167 | -------------------------------------------------------------------------------- /weChat/build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('fs') 3 | var utils = require('./utils') 4 | var config = require('../config') 5 | var webpack = require('webpack') 6 | var merge = require('webpack-merge') 7 | var vueLoaderConfig = require('./vue-loader.conf') 8 | var MpvuePlugin = require('webpack-mpvue-asset-plugin') 9 | var glob = require('glob') 10 | var CopyWebpackPlugin = require('copy-webpack-plugin') 11 | var relative = require('relative') 12 | 13 | function resolve (dir) { 14 | return path.join(__dirname, '..', dir) 15 | } 16 | 17 | function getEntry (rootSrc) { 18 | var map = {}; 19 | glob.sync(rootSrc + '/pages/**/main.js') 20 | .forEach(file => { 21 | var key = relative(rootSrc, file).replace('.js', ''); 22 | map[key] = file; 23 | }) 24 | return map; 25 | } 26 | 27 | const appEntry = { app: resolve('./src/main.js') } 28 | const pagesEntry = getEntry(resolve('./src'), 'pages/**/main.js') 29 | const entry = Object.assign({}, appEntry, pagesEntry) 30 | 31 | let baseWebpackConfig = { 32 | // 如果要自定义生成的 dist 目录里面的文件路径, 33 | // 可以将 entry 写成 {'toPath': 'fromPath'} 的形式, 34 | // toPath 为相对于 dist 的路径, 例:index/demo,则生成的文件地址为 dist/index/demo.js 35 | entry, 36 | target: require('mpvue-webpack-target'), 37 | output: { 38 | path: config.build.assetsRoot, 39 | jsonpFunction: 'webpackJsonpMpvue', 40 | filename: '[name].js', 41 | publicPath: process.env.NODE_ENV === 'production' 42 | ? config.build.assetsPublicPath 43 | : config.dev.assetsPublicPath 44 | }, 45 | resolve: { 46 | extensions: ['.js', '.vue', '.json'], 47 | alias: { 48 | 'vue': 'mpvue', 49 | '@': resolve('src'), 50 | "flyio":"flyio/dist/npm/wx" 51 | }, 52 | symlinks: false, 53 | aliasFields: ['mpvue', 'weapp', 'browser'], 54 | mainFields: ['browser', 'module', 'main'] 55 | }, 56 | module: { 57 | rules: [ 58 | { 59 | test: /\.vue$/, 60 | loader: 'mpvue-loader', 61 | options: vueLoaderConfig 62 | }, 63 | { 64 | test: /\.js$/, 65 | include: [resolve('src'), resolve('test')], 66 | use: [ 67 | 'babel-loader', 68 | { 69 | loader: 'mpvue-loader', 70 | options: Object.assign({checkMPEntry: true}, vueLoaderConfig) 71 | }, 72 | ] 73 | }, 74 | { 75 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 76 | loader: 'url-loader', 77 | options: { 78 | limit: 10000, 79 | name: utils.assetsPath('img/[name].[ext]') 80 | } 81 | }, 82 | { 83 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 84 | loader: 'url-loader', 85 | options: { 86 | limit: 10000, 87 | name: utils.assetsPath('media/[name].[ext]') 88 | } 89 | }, 90 | { 91 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 92 | loader: 'url-loader', 93 | options: { 94 | limit: 10000, 95 | name: utils.assetsPath('fonts/[name].[ext]') 96 | } 97 | } 98 | ] 99 | }, 100 | plugins: [ 101 | // api 统一桥协议方案 102 | new webpack.DefinePlugin({ 103 | 'mpvue': 'global.mpvue', 104 | 'mpvuePlatform': 'global.mpvuePlatform' 105 | }), 106 | new MpvuePlugin(), 107 | new CopyWebpackPlugin([{ 108 | from: '**/*.json', 109 | to: '' 110 | }], { 111 | context: 'src/' 112 | }), 113 | new CopyWebpackPlugin([ 114 | { 115 | from: path.resolve(__dirname, '../static'), 116 | to: path.resolve(config.build.assetsRoot, './static'), 117 | ignore: ['.*'] 118 | } 119 | ]) 120 | ] 121 | } 122 | 123 | // 针对百度小程序,由于不支持通过 miniprogramRoot 进行自定义构建完的文件的根路径 124 | // 所以需要将项目根路径下面的 project.swan.json 拷贝到构建目录 125 | // 然后百度开发者工具将 dist/swan 作为项目根目录打 126 | const projectConfigMap = { 127 | tt: '../project.config.json', 128 | swan: '../project.swan.json' 129 | } 130 | 131 | const PLATFORM = process.env.PLATFORM 132 | if (/^(swan)|(tt)$/.test(PLATFORM)) { 133 | baseWebpackConfig = merge(baseWebpackConfig, { 134 | plugins: [ 135 | new CopyWebpackPlugin([{ 136 | from: path.resolve(__dirname, projectConfigMap[PLATFORM]), 137 | to: path.resolve(config.build.assetsRoot) 138 | }]) 139 | ] 140 | }) 141 | } 142 | 143 | module.exports = baseWebpackConfig 144 | -------------------------------------------------------------------------------- /weChat/src/pages/index/index.vue: -------------------------------------------------------------------------------- 1 | 25 | 112 | 166 | -------------------------------------------------------------------------------- /weChat/src/components/confirm.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 75 | 76 | 149 | -------------------------------------------------------------------------------- /weChat/project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件", 3 | "packOptions": { 4 | "ignore": [] 5 | }, 6 | "setting": { 7 | "urlCheck": false, 8 | "es6": true, 9 | "postcss": true, 10 | "minified": true, 11 | "newFeature": true, 12 | "autoAudits": false 13 | }, 14 | "libVersion": "2.6.4", 15 | "compileType": "miniprogram", 16 | "id": "wx3375420e2c184d34", 17 | "appid": "wx17c5702ff48987a2", 18 | "projectname": "up_wechat_app", 19 | "miniprogramRoot": "dist/wx/", 20 | "debugOptions": { 21 | "hidedInDevtools": [] 22 | }, 23 | "scripts": {}, 24 | "condition": { 25 | "search": { 26 | "current": -1, 27 | "list": [] 28 | }, 29 | "conversation": { 30 | "current": -1, 31 | "list": [] 32 | }, 33 | "plugin": { 34 | "current": -1, 35 | "list": [] 36 | }, 37 | "game": { 38 | "list": [] 39 | }, 40 | "miniprogram": { 41 | "current": 21, 42 | "list": [ 43 | { 44 | "id": 0, 45 | "name": "专题页面", 46 | "pathName": "pages/special/main", 47 | "query": "", 48 | "scene": null 49 | }, 50 | { 51 | "id": -1, 52 | "name": "购物地址", 53 | "pathName": "pages/shoppingadress/redactAddress/main", 54 | "query": "", 55 | "scene": null 56 | }, 57 | { 58 | "id": -1, 59 | "name": "身份认证", 60 | "pathName": "pages/autonym/main", 61 | "query": "", 62 | "scene": null 63 | }, 64 | { 65 | "id": -1, 66 | "name": "秒杀列表", 67 | "pathName": "pages/spike/main", 68 | "query": "", 69 | "scene": null 70 | }, 71 | { 72 | "id": -1, 73 | "name": "秒杀详情页", 74 | "pathName": "pages/spikeDetail/main", 75 | "query": "name=农家橘园土鸡蛋月子蛋笨鸡蛋30枚", 76 | "scene": null 77 | }, 78 | { 79 | "id": 11, 80 | "name": "商品详情页", 81 | "pathName": "pages/go2detail/main", 82 | "query": "id=11", 83 | "scene": null 84 | }, 85 | { 86 | "id": -1, 87 | "name": "提交订单", 88 | "pathName": "pages/submission/main", 89 | "query": "", 90 | "scene": null 91 | }, 92 | { 93 | "id": -1, 94 | "name": "物流详情", 95 | "pathName": "pages/logistics/main", 96 | "query": "", 97 | "scene": null 98 | }, 99 | { 100 | "id": 8, 101 | "name": "收货地址", 102 | "pathName": "pages/shoppingadress/main", 103 | "query": "fromOrder=\"order\"", 104 | "scene": null 105 | }, 106 | { 107 | "id": 9, 108 | "name": "去付款", 109 | "pathName": "pages/myorder/settlement/main", 110 | "query": "", 111 | "scene": null 112 | }, 113 | { 114 | "id": 10, 115 | "name": "交易详情", 116 | "pathName": "pages/myorder/cashDetails/main", 117 | "query": "", 118 | "scene": null 119 | }, 120 | { 121 | "id": -1, 122 | "name": "优惠券列表", 123 | "pathName": "pages/conponlist/main", 124 | "query": "", 125 | "scene": null 126 | }, 127 | { 128 | "id": -1, 129 | "name": "分类页面", 130 | "pathName": "pages/classify/main", 131 | "query": "", 132 | "scene": null 133 | }, 134 | { 135 | "id": -1, 136 | "name": "我的", 137 | "pathName": "pages/logs/main", 138 | "query": "", 139 | "scene": null 140 | }, 141 | { 142 | "id": -1, 143 | "name": "首页", 144 | "pathName": "pages/index/main", 145 | "query": "", 146 | "scene": null 147 | }, 148 | { 149 | "id": -1, 150 | "name": "搜索", 151 | "pathName": "pages/seek/main", 152 | "query": "", 153 | "scene": null 154 | }, 155 | { 156 | "id": -1, 157 | "name": "优惠券", 158 | "pathName": "pages/conponlist/main", 159 | "query": "", 160 | "scene": null 161 | }, 162 | { 163 | "id": -1, 164 | "name": "订单详情", 165 | "pathName": "pages/orderdetails/main", 166 | "query": "", 167 | "scene": null 168 | }, 169 | { 170 | "id": 11, 171 | "name": "商品详情页", 172 | "pathName": "pages/go2detail/main", 173 | "query": "id=35791", 174 | "scene": null 175 | }, 176 | { 177 | "id": -1, 178 | "name": "我的订单", 179 | "pathName": "pages/myorder/main", 180 | "query": "", 181 | "scene": null 182 | }, 183 | { 184 | "id": -1, 185 | "name": "订单详情", 186 | "pathName": "pages/orderdetails/main", 187 | "query": "orderId=20190401111538261735", 188 | "scene": null 189 | }, 190 | { 191 | "id": -1, 192 | "name": "支付页面", 193 | "pathName": "pages/submission/main", 194 | "query": "fromOrder=\"order\"", 195 | "scene": null 196 | } 197 | ] 198 | } 199 | } 200 | } -------------------------------------------------------------------------------- /weChat/build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var webpack = require('webpack') 4 | var config = require('../config') 5 | var merge = require('webpack-merge') 6 | var baseWebpackConfig = require('./webpack.base.conf') 7 | var UglifyJsPlugin = require('uglifyjs-webpack-plugin') 8 | var CopyWebpackPlugin = require('copy-webpack-plugin') 9 | // var HtmlWebpackPlugin = require('html-webpack-plugin') 10 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | var MpvueVendorPlugin = require('webpack-mpvue-vendor-plugin') 13 | var env = config.build.env 14 | 15 | var webpackConfig = merge(baseWebpackConfig, { 16 | module: { 17 | rules: utils.styleLoaders({ 18 | sourceMap: config.build.productionSourceMap, 19 | extract: true 20 | }) 21 | }, 22 | devtool: config.build.productionSourceMap ? '#source-map' : false, 23 | output: { 24 | path: config.build.assetsRoot, 25 | // filename: utils.assetsPath('[name].[chunkhash].js'), 26 | // chunkFilename: utils.assetsPath('[id].[chunkhash].js') 27 | filename: utils.assetsPath('[name].js'), 28 | chunkFilename: utils.assetsPath('[id].js') 29 | }, 30 | plugins: [ 31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 32 | new webpack.DefinePlugin({ 33 | 'process.env': env 34 | }), 35 | // extract css into its own file 36 | new ExtractTextPlugin({ 37 | // filename: utils.assetsPath('[name].[contenthash].css') 38 | filename: utils.assetsPath(`[name].${config.build.fileExt.style}`) 39 | }), 40 | // Compress extracted CSS. We are using this plugin so that possible 41 | // duplicated CSS from different components can be deduped. 42 | new OptimizeCSSPlugin({ 43 | cssProcessorOptions: { 44 | safe: true 45 | } 46 | }), 47 | // generate dist index.html with correct asset hash for caching. 48 | // you can customize output by editing /index.html 49 | // see https://github.com/ampedandwired/html-webpack-plugin 50 | // new HtmlWebpackPlugin({ 51 | // filename: config.build.index, 52 | // template: 'index.html', 53 | // inject: true, 54 | // minify: { 55 | // removeComments: true, 56 | // collapseWhitespace: true, 57 | // removeAttributeQuotes: true 58 | // // more options: 59 | // // https://github.com/kangax/html-minifier#options-quick-reference 60 | // }, 61 | // // necessary to consistently work with multiple chunks via CommonsChunkPlugin 62 | // chunksSortMode: 'dependency' 63 | // }), 64 | // keep module.id stable when vender modules does not change 65 | new webpack.HashedModuleIdsPlugin(), 66 | // split vendor js into its own file 67 | new webpack.optimize.CommonsChunkPlugin({ 68 | name: 'common/vendor', 69 | minChunks: function (module, count) { 70 | // any required modules inside node_modules are extracted to vendor 71 | return ( 72 | module.resource && 73 | /\.js$/.test(module.resource) && 74 | module.resource.indexOf('node_modules') >= 0 75 | ) || count > 1 76 | } 77 | }), 78 | // extract webpack runtime and module manifest to its own file in order to 79 | // prevent vendor hash from being updated whenever app bundle is updated 80 | new webpack.optimize.CommonsChunkPlugin({ 81 | name: 'common/manifest', 82 | chunks: ['common/vendor'] 83 | }), 84 | new MpvueVendorPlugin({ 85 | platform: process.env.PLATFORM 86 | }) 87 | ] 88 | }) 89 | 90 | // if (config.build.productionGzip) { 91 | // var CompressionWebpackPlugin = require('compression-webpack-plugin') 92 | 93 | // webpackConfig.plugins.push( 94 | // new CompressionWebpackPlugin({ 95 | // asset: '[path].gz[query]', 96 | // algorithm: 'gzip', 97 | // test: new RegExp( 98 | // '\\.(' + 99 | // config.build.productionGzipExtensions.join('|') + 100 | // ')$' 101 | // ), 102 | // threshold: 10240, 103 | // minRatio: 0.8 104 | // }) 105 | // ) 106 | // } 107 | 108 | if (config.build.bundleAnalyzerReport) { 109 | var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 110 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 111 | } 112 | 113 | var useUglifyJs = process.env.PLATFORM !== 'swan' 114 | if (useUglifyJs) { 115 | webpackConfig.plugins.push(new UglifyJsPlugin({ 116 | sourceMap: true 117 | })) 118 | } 119 | 120 | module.exports = webpackConfig 121 | -------------------------------------------------------------------------------- /weChat/src/components/conpon/conponList.vue: -------------------------------------------------------------------------------- 1 | 2 | 35 | 36 | 51 | 52 | 193 | -------------------------------------------------------------------------------- /weChat/src/pages/myorder/settlement/index.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 81 | -------------------------------------------------------------------------------- /weChat/src/pages/seek/index.vue: -------------------------------------------------------------------------------- 1 | 23 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /weChat/src/pages/myorder/cashDetails/index.vue: -------------------------------------------------------------------------------- 1 | 64 | 65 | 70 | -------------------------------------------------------------------------------- /weChat/src/pages/newDetail/index.vue: -------------------------------------------------------------------------------- 1 | 32 | 98 | 239 | -------------------------------------------------------------------------------- /weChat/src/pages/phone/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 131 | 132 | 212 | -------------------------------------------------------------------------------- /weChat/src/components/coupon.vue: -------------------------------------------------------------------------------- 1 | 69 | 72 | 73 | 265 | -------------------------------------------------------------------------------- /weChat/src/pages/spike/index.vue: -------------------------------------------------------------------------------- 1 | 23 | 138 | 263 | 264 | -------------------------------------------------------------------------------- /weChat/src/components/seek/detali.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 103 | 104 | 279 | -------------------------------------------------------------------------------- /weChat/src/components/modalFrame.vue: -------------------------------------------------------------------------------- 1 | 49 | 156 | 269 | -------------------------------------------------------------------------------- /weChat/src/pages/referrer/index.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 123 | 124 | 282 | 283 | -------------------------------------------------------------------------------- /weChat/src/pages/logistics/index.vue: -------------------------------------------------------------------------------- 1 | 126 | 127 | 148 | 149 | 316 | --------------------------------------------------------------------------------