From 08c5478bf13e2015de295219335b51f93148b777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BE=81?= Date: Tue, 10 May 2022 15:05:50 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=E8=AE=A2=E5=8D=95=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/BsAddress.vue | 118 +++++++++++++++++++++++++++++++-- pages/goods/detail/_id.vue | 7 +- pages/goods/list/index.vue | 3 +- static/images/goods/add.png | Bin 0 -> 653 bytes static/images/goods/point.png | Bin 0 -> 928 bytes static/images/goods/switch.png | Bin 0 -> 540 bytes 6 files changed, 119 insertions(+), 9 deletions(-) create mode 100644 static/images/goods/add.png create mode 100644 static/images/goods/point.png create mode 100644 static/images/goods/switch.png diff --git a/components/BsAddress.vue b/components/BsAddress.vue index 8f0db1d..7b81097 100644 --- a/components/BsAddress.vue +++ b/components/BsAddress.vue @@ -1,20 +1,130 @@ diff --git a/pages/goods/detail/_id.vue b/pages/goods/detail/_id.vue index 68bf1f5..a9b4f40 100644 --- a/pages/goods/detail/_id.vue +++ b/pages/goods/detail/_id.vue @@ -1,5 +1,6 @@ - \ No newline at end of file + diff --git a/pages/goods/detail/_id.vue b/pages/goods/detail/_id.vue index 68bf1f5..b46df9d 100644 --- a/pages/goods/detail/_id.vue +++ b/pages/goods/detail/_id.vue @@ -21,7 +21,7 @@
左侧切换 @@ -44,7 +44,7 @@
右侧切换 @@ -68,7 +68,7 @@ > 服务 diff --git a/pages/goods/list/module/SortItem.vue b/pages/goods/list/module/SortItem.vue index ea36522..c887235 100644 --- a/pages/goods/list/module/SortItem.vue +++ b/pages/goods/list/module/SortItem.vue @@ -4,22 +4,22 @@
sort sort sort sort
diff --git a/plugins/vue-inject.js b/plugins/vue-inject.js index 7d8acb5..0ea1a64 100644 --- a/plugins/vue-inject.js +++ b/plugins/vue-inject.js @@ -2,7 +2,7 @@ import Vue from "vue"; import { TOKEN_KEY } from "@/constants"; const injectOptions = { - // 是否需要登录拦截 + // 是否需要登录拦截,如果未登录,会默认唤起登录弹窗 $isLoginValidate() { if (this.$cookies.get(TOKEN_KEY)) { return true; From a670935eff41c5aba993ccdf8afb42e4907b166d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BE=81?= Date: Tue, 10 May 2022 16:55:56 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=E5=AE=8C=E6=88=90=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/BsAddress.vue | 280 +++++++++++++++++++++++++++++++++---- nuxt.config.js | 7 +- package.json | 1 + pages/goods/detail/_id.vue | 21 +-- 4 files changed, 272 insertions(+), 37 deletions(-) diff --git a/components/BsAddress.vue b/components/BsAddress.vue index 7b81097..fc59b8c 100644 --- a/components/BsAddress.vue +++ b/components/BsAddress.vue @@ -3,66 +3,218 @@
- 收货地址 + 收货地址 默认地址 修改
收货地址: - 北京市XXXXX区XXXX路xxxxxx小区XXX单元 + {{ + curAddressListItem.area + + curAddressListItem.city + + curAddressListItem.province + + curAddressListItem.detailAddress + }}
收 货 人 : - 北京市XXXXX区XXXX路xxxxxx小区XXX单元 + {{ + curAddressListItem.name + }}
手机号码: - 北京市XXXXX区XXXX路xxxxxx小区XXX单元 + {{ + curAddressListItem.phone + }}
- 切换地址 - 切换地址 - + 切换地址 - 新建地址 + 切换地址 + + + 新建地址 + 新建地址 +
-
+
+
+ 所在区域 + +
+
+ 详细地址 + +
+
+ 收货人 + + 手机号码 + +
+
-
+
+ 设为默认地址 +
+ 取消 + 保存地址 +
+
+ + +
+
+
收货人:{{ item.name }}
+
手机号码:{{ item.phone }}
+
收货地址:{{ item.detailAddress }}
+
+
+ + 取消 + 确认 + +
diff --git a/nuxt.config.js b/nuxt.config.js index 8af2ead..521cc4b 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -43,7 +43,8 @@ export default { '@/plugins/element-ui', '@/plugins/axios', '@plugins/axiosTk.js', - '@plugins/vue-inject.js' + '@plugins/vue-inject.js', + '@/plugins/v-distpicker', ], // Auto import components: https://go.nuxtjs.dev/config-components @@ -53,6 +54,10 @@ export default { buildModules: [ ], + build: { + vendor: ['v-distpicker'] + }, + styleResources: { scss: '@/assets/scss/global.scss' }, diff --git a/package.json b/package.json index 13fe036..2d092e4 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "element-ui": "^2.15.8", "js-util-all": "^1.0.6", "nuxt": "^2.15.8", + "v-distpicker": "^1.2.13", "vue": "^2.6.14", "vue-server-renderer": "^2.6.14", "vue-template-compiler": "^2.6.14" diff --git a/pages/goods/detail/_id.vue b/pages/goods/detail/_id.vue index ca3db6d..a2ed4d5 100644 --- a/pages/goods/detail/_id.vue +++ b/pages/goods/detail/_id.vue @@ -1,6 +1,6 @@