From b6a87f7265aa06dfc22704feebd3ca19d6746179 Mon Sep 17 00:00:00 2001
From: maguohua <1264889788@qq.com>
Date: Sun, 19 Feb 2017 00:28:12 +0800
Subject: [PATCH] confrim
---
README.md | 15 +-
src/components/common/alertTip.vue | 2 +-
src/components/header/head.vue | 12 +-
src/config/fetch.js | 30 +--
src/images/add_address.png | Bin 0 -> 1127 bytes
src/images/add_phone.png | Bin 0 -> 186 bytes
src/images/search.png | Bin 0 -> 1019 bytes
.../children/children/addAddress.vue | 213 +++++++++++++++++
.../children/children/searchAddress.vue | 118 +++++++++
.../confirmOrder/children/chooseAddress.vue | 224 ++++++++++++++++++
src/page/confirmOrder/children/invoice.vue | 87 +++++++
src/page/confirmOrder/confirmOrder.vue | 105 ++++++--
src/page/login/login.vue | 2 +-
.../shop/children/{ => children}/shopSafe.vue | 11 +-
src/router/router.js | 77 ++++--
src/service/getData.js | 66 +++++-
src/service/tempdata/confirm.js | 187 ++++++++++++++-
src/service/tempdata/login.js | 14 +-
src/store/action.js | 20 +-
src/store/index.js | 7 +-
src/store/mutation-types.js | 6 +-
src/store/mutations.js | 42 +++-
22 files changed, 1131 insertions(+), 107 deletions(-)
create mode 100644 src/images/add_address.png
create mode 100644 src/images/add_phone.png
create mode 100644 src/images/search.png
create mode 100644 src/page/confirmOrder/children/children/addAddress.vue
create mode 100644 src/page/confirmOrder/children/children/children/searchAddress.vue
create mode 100644 src/page/confirmOrder/children/chooseAddress.vue
create mode 100644 src/page/confirmOrder/children/invoice.vue
rename src/page/shop/children/{ => children}/shopSafe.vue (96%)
diff --git a/README.md b/README.md
index 491354f..acad6c5 100644
--- a/README.md
+++ b/README.md
@@ -66,7 +66,13 @@ vue2 + vue-rotuer2 + vuex + webpack + ES6/7 + fetch + sass + flex + svg + http-p
| |-- city // 当前城市页
| |-- food // 食品筛选排序页
| |-- confirmOrder // 确认订单页
-| |--children
+| |--children
+| |--chooseAddress // 选择地址页
+| |--children
+| |--addAddress // 添加地址页
+| |--children
+| |--searchAddress // 搜索地址页
+| |--invoice // 选择发票页
| |--remark // 订单备注页
| |-- forget // 忘记密码,修改密码页
| |-- home // 首页
@@ -83,9 +89,10 @@ vue2 + vue-rotuer2 + vuex + webpack + ES6/7 + fetch + sass + flex + svg + http-p
| |-- search // 搜索页
| |-- shop // 商铺筛选页
| |-- children
-| |-- foodDetail // 单个商铺信息页
-| |-- shopDetail // 商铺信息页
-| |-- shopSafe // 商铺认证信息页
+| |-- foodDetail // 单个商铺信息页
+| |-- children
+| |-- shopSafe // 商铺认证信息页
+| |-- shopDetail // 商铺信息页
| |-- vipcard // vip办理页
|
| |-- plugins // 引用的插件
diff --git a/src/components/common/alertTip.vue b/src/components/common/alertTip.vue
index c0df88b..a2d5fe8 100644
--- a/src/components/common/alertTip.vue
+++ b/src/components/common/alertTip.vue
@@ -22,7 +22,7 @@
mounted(){
},
- props: ['showHide','alertText'],
+ props: ['alertText'],
methods: {
closeTip(){
this.$emit('closeTip')
diff --git a/src/components/header/head.vue b/src/components/header/head.vue
index f9951b9..b1eae78 100644
--- a/src/components/header/head.vue
+++ b/src/components/header/head.vue
@@ -24,7 +24,7 @@
+
+
diff --git a/src/page/confirmOrder/children/children/children/searchAddress.vue b/src/page/confirmOrder/children/children/children/searchAddress.vue
new file mode 100644
index 0000000..b16649b
--- /dev/null
+++ b/src/page/confirmOrder/children/children/children/searchAddress.vue
@@ -0,0 +1,118 @@
+
+ {{item.address}} 找不到地址? 尝试输入小区、写字楼或学校名 详细地址(如门牌号等)可稍后输入哦
+
+ {{item.name}}
+
{{choosedAddress.address_detail}}
+送达时间
待支付 ¥{{checkoutData.cart.total}}
@@ -137,7 +153,10 @@ this.shopCart = this.cartList[this.shopId]; }, mounted(){ - this.initData(); + if (this.geohash) { + this.initData(); + this.SAVE_GEOHASH(this.geohash); + } }, components: { headTop, @@ -146,21 +165,25 @@ }, computed: { ...mapState([ - 'cartList', 'remarkText', 'inputText' + 'cartList', 'remarkText', 'inputText', 'invoice', 'choosedAddress' ]), remarklist: function (){ - if (this.remarkText&&this.inputText) { - let str = new String; + let str = new String; + if (this.remarkText) { Object.values(this.remarkText).forEach(item => { str += item[1] + ','; }) + } + if (this.inputText) { return str + this.inputText; + }else{ + return str.substr(0, str.lastIndexOf(',')) ; } - } + }, }, methods: { ...mapMutations([ - 'INIT_BUYCART' + 'INIT_BUYCART', 'SAVE_GEOHASH' ]), async initData(){ let newArr = new Array; @@ -194,6 +217,12 @@ this.payWayId = id; } }, + iconColor(name){ + switch(name){ + case '公司': return '#4cd964'; + case '学校': return '#3190e8'; + } + }, } } @@ -233,12 +262,39 @@ .add_address{ @include sc(.7rem, #333); } - } - .address_empty_right{ - @include wh(.6rem, .6rem); - fill: #999; + .address_detail_container{ + margin-left: .2rem; + header{ + @include sc(.75rem, #333); + span:nth-of-type(1){ + font-size: .85rem; + font-weight: bold; + } + } + .address_detail{ + width: 100%; + display: flex; + align-items: center; + span{ + @include sc(.5rem, #fff); + border-radius: .15rem; + background-color: #ff5722; + height: .65rem; + line-height: .65rem; + padding: 0 .3rem; + margin-right: .3rem; + } + p{ + @include sc(.65rem, #777); + } + } + } } } + .address_empty_right{ + @include wh(.6rem, .6rem); + fill: #999; + } .delivery_model{ border-left: .2rem solid $blue; min-height: 4rem; @@ -292,8 +348,21 @@ @include fj; border-top: 0.025rem solid #f5f5f5; span{ - @include sc(.6rem, #ccc); + @include sc(.6rem, #aaa); line-height: 2rem; + svg{ + @include wh(.5rem, .5rem); + vertical-align: middle; + fill: #ccc; + } + } + span:nth-of-type(2){ + color: #aaa; + } + } + .support_is_available{ + span{ + color: #666; } } } diff --git a/src/page/login/login.vue b/src/page/login/login.vue index 838732a..96b5dff 100644 --- a/src/page/login/login.vue +++ b/src/page/login/login.vue @@ -109,7 +109,7 @@ clearInterval(this.timer) } }, 1000) - let exsis = await checkExsis(this.phoneNumber, this.accountType); + let exsis = await checkExsis(this.phoneNumber, 'mobile'); if (exsis.message) { this.showAlert = true; this.alertText = exsis.message; diff --git a/src/page/shop/children/shopSafe.vue b/src/page/shop/children/children/shopSafe.vue similarity index 96% rename from src/page/shop/children/shopSafe.vue rename to src/page/shop/children/children/shopSafe.vue index 220279b..6a245e0 100644 --- a/src/page/shop/children/shopSafe.vue +++ b/src/page/shop/children/children/shopSafe.vue @@ -97,8 +97,8 @@