From 1c75580749035f86e301226cf2502508857d47a7 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Thu, 9 Feb 2023 10:38:47 +0800
Subject: [PATCH 01/17] =?UTF-8?q?style:=20=E9=A6=96=E9=A1=B5=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 4 +-
app.wxss | 10 +
components/goods-card/index.js | 23 +++
components/goods-card/index.json | 4 +
components/goods-card/index.wxml | 19 ++
components/goods-card/index.wxss | 70 +++++++
modal/category.js | 189 +++++++++++++++++++
modal/swiper.js | 12 ++
pages/index/components/goods-list/index.js | 23 +++
pages/index/components/goods-list/index.json | 6 +
pages/index/components/goods-list/index.wxml | 13 ++
pages/index/components/goods-list/index.wxss | 34 ++++
pages/index/components/procate/index.js | 22 +++
pages/index/components/procate/index.json | 4 +
pages/index/components/procate/index.wxml | 13 ++
pages/index/components/procate/index.wxss | 46 +++++
pages/index/index.js | 7 +
pages/index/index.json | 7 +-
pages/index/index.wxml | 32 +++-
pages/index/index.wxss | 7 +
project.config.json | 2 +-
21 files changed, 537 insertions(+), 10 deletions(-)
create mode 100644 components/goods-card/index.js
create mode 100644 components/goods-card/index.json
create mode 100644 components/goods-card/index.wxml
create mode 100644 components/goods-card/index.wxss
create mode 100644 modal/category.js
create mode 100644 modal/swiper.js
create mode 100644 pages/index/components/goods-list/index.js
create mode 100644 pages/index/components/goods-list/index.json
create mode 100644 pages/index/components/goods-list/index.wxml
create mode 100644 pages/index/components/goods-list/index.wxss
create mode 100644 pages/index/components/procate/index.js
create mode 100644 pages/index/components/procate/index.json
create mode 100644 pages/index/components/procate/index.wxml
create mode 100644 pages/index/components/procate/index.wxss
diff --git a/app.json b/app.json
index b8a333d..089460b 100644
--- a/app.json
+++ b/app.json
@@ -7,9 +7,9 @@
],
"window": {
"backgroundTextStyle": "light",
- "navigationBarBackgroundColor": "#fff",
+ "navigationBarBackgroundColor": "#9C0211",
"navigationBarTitleText": "Weixin",
- "navigationBarTextStyle": "black"
+ "navigationBarTextStyle": "white"
},
"tabBar": {
"color": "#252933",
diff --git a/app.wxss b/app.wxss
index 777998b..4653885 100644
--- a/app.wxss
+++ b/app.wxss
@@ -4,4 +4,14 @@
display: flex;
flex-direction: column;
box-sizing: border-box;
+ background-color: #f3f5f7;
+ padding-bottom: 49px;
+}
+
+.bg-white {
+ background-color: white;
+}
+
+.img {
+ width: 100%;
}
diff --git a/components/goods-card/index.js b/components/goods-card/index.js
new file mode 100644
index 0000000..42ca51a
--- /dev/null
+++ b/components/goods-card/index.js
@@ -0,0 +1,23 @@
+// components/goods-card/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+
+ }
+})
diff --git a/components/goods-card/index.json b/components/goods-card/index.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/components/goods-card/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/goods-card/index.wxml b/components/goods-card/index.wxml
new file mode 100644
index 0000000..2f54b1a
--- /dev/null
+++ b/components/goods-card/index.wxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+ 亲爱的/情人节网红款/19枝
+ 情人节新品
+
+ ¥399
+ ¥499
+
+
+
+
+
+
+
diff --git a/components/goods-card/index.wxss b/components/goods-card/index.wxss
new file mode 100644
index 0000000..cbd4ff7
--- /dev/null
+++ b/components/goods-card/index.wxss
@@ -0,0 +1,70 @@
+/* components/goods-card/index.wxss */
+.product-item {
+ display: inline-block;
+ width: 46.96132597%;
+ margin: 0 1.51933702% 3.03867403%;
+ border-radius: 8px;
+ vertical-align: top;
+ overflow: hidden;
+ background-color: #fff;
+}
+
+.navigation {
+ width: 100%;
+ height: 100%;
+ display: block;
+}
+
+.product-item-info {
+ padding: 8px 10px;
+ display: flex;
+ flex-direction: column;
+}
+
+.product-item-info-name {
+ font-weight: 600;
+ font-size: 15px;
+ line-height: 20px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.product-item-info-promo {
+ padding-top: 4px;
+ padding-bottom: 3px;
+ font-size: 12px;
+ color: #71797f;
+}
+
+.product-item-info-bottom {
+ margin-top: 8px;
+ display: flex;
+}
+.pre {
+ margin-right: 2px;
+}
+
+.product-item-info-price {
+ font-size: 15px;
+ line-height: 24px;
+ font-weight: bold;
+}
+
+.product-item-info-origin-price {
+ flex: 1;
+ font-size: 12px;
+ line-height: 26px;
+ color: #71797f;
+ text-decoration-line: line-through;
+ margin-left: 6%;
+}
+
+.product-item-info-btn image {
+ width: 24px;
+ height: 24px;
+}
+
+.img {
+ width: 100%;
+}
diff --git a/modal/category.js b/modal/category.js
new file mode 100644
index 0000000..8cc1dbb
--- /dev/null
+++ b/modal/category.js
@@ -0,0 +1,189 @@
+/**
+ * @description: 首页分类导航
+ * @returns {*}
+ */
+
+export const categorylist = [
+ {
+ url: 'https://img02.hua.com//chanpintupian/2022shouye/flowers1.png',
+ text: '韩式花束',
+ },
+ {
+ url: 'https://img02.hua.com//chanpintupian/2022shouye/flowers1.png',
+ text: '韩式花束',
+ },
+ {
+ url: 'https://img02.hua.com//chanpintupian/2022shouye/flowers1.png',
+ text: '韩式花束',
+ },
+ {
+ url: 'https://img02.hua.com//chanpintupian/2022shouye/flowers1.png',
+ text: '韩式花束',
+ },
+ {
+ url: 'https://img02.hua.com//chanpintupian/2022shouye/flowers1.png',
+ text: '韩式花束',
+ },
+ {
+ url: 'https://img02.hua.com//chanpintupian/2022shouye/srzf2.png?v122',
+ text: '生日祝福',
+ small: true,
+ },
+ {
+ url: 'https://img02.hua.com//chanpintupian/2022shouye/srzf2.png?v122',
+ text: '生日祝福',
+ small: true,
+ },
+ {
+ url: 'https://img02.hua.com//chanpintupian/2022shouye/srzf2.png?v122',
+ text: '生日祝福',
+ small: true,
+ },
+ {
+ url: 'https://img02.hua.com//chanpintupian/2022shouye/srzf2.png?v122',
+ text: '生日祝福',
+ small: true,
+ },
+ {
+ url: 'https://img02.hua.com//chanpintupian/2022shouye/srzf2.png?v122',
+ text: '生日祝福',
+ small: true,
+ },
+];
+
+export const catg = {
+ code: 200,
+ message: '成功',
+ data: [
+ {
+ children: [
+ {
+ name: '电子书刊',
+ id: 1,
+ },
+ {
+ name: '音像',
+ id: 2,
+ },
+ {
+ name: '英文原版',
+ id: 3,
+ },
+ {
+ name: '文艺',
+ id: 4,
+ },
+ {
+ name: '少儿',
+ id: 5,
+ },
+ {
+ name: '人文社科',
+ id: 6,
+ },
+ {
+ name: '经管励志',
+ id: 7,
+ },
+ {
+ name: '生活',
+ id: 8,
+ },
+ {
+ name: '科技',
+ id: 9,
+ },
+ {
+ name: '教育',
+ id: 10,
+ },
+ {
+ name: '港台图书',
+ id: 11,
+ },
+ {
+ name: '其他',
+ id: 12,
+ },
+ ],
+ name: '手机数码',
+ id: 1,
+ },
+ {
+ children: [
+ {
+ name: '手机通讯',
+ id: 13,
+ },
+ {
+ name: '运营商',
+ id: 14,
+ },
+ {
+ name: '手机配件',
+ id: 15,
+ },
+ ],
+ name: '电脑、办公',
+ id: 2,
+ },
+ {
+ children: [
+ {
+ name: '大 家 电',
+ id: 16,
+ },
+ {
+ name: '厨卫大电',
+ id: 17,
+ },
+ {
+ name: '厨房小电',
+ id: 18,
+ },
+ {
+ name: '生活电器',
+ id: 19,
+ },
+ {
+ name: '个护健康',
+ id: 20,
+ },
+ {
+ name: '五金家装',
+ id: 21,
+ },
+ ],
+ name: '家用电器',
+ id: 3,
+ },
+ {
+ children: [
+ {
+ name: '摄影摄像',
+ id: 22,
+ },
+ {
+ name: '数码配件',
+ id: 23,
+ },
+ {
+ name: '智能设备',
+ id: 24,
+ },
+ {
+ name: '影音娱乐',
+ id: 25,
+ },
+ {
+ name: '电子教育',
+ id: 26,
+ },
+ {
+ name: '虚拟商品',
+ id: 27,
+ },
+ ],
+ },
+ ],
+};
diff --git a/modal/swiper.js b/modal/swiper.js
new file mode 100644
index 0000000..5458756
--- /dev/null
+++ b/modal/swiper.js
@@ -0,0 +1,12 @@
+/**
+ * @description: 轮播数据
+ * @returns {*}
+ */
+export const backgroundList = [
+ 'https://img02.hua.com/zhuanti/valentine/2023/23_valentine_banner_m.jpg',
+ 'https://img02.hua.com/slider/22_nuandong_banner_m.jpg',
+ 'https://img02.hua.com/slider/22_birthday.jpg',
+];
+
+export const banner =
+ 'https://img02.hua.com/zhuanti/valentine/2023/23_valentine_mbanner_m.png?a1';
diff --git a/pages/index/components/goods-list/index.js b/pages/index/components/goods-list/index.js
new file mode 100644
index 0000000..d94a26b
--- /dev/null
+++ b/pages/index/components/goods-list/index.js
@@ -0,0 +1,23 @@
+// components/goods-list/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+
+ }
+})
diff --git a/pages/index/components/goods-list/index.json b/pages/index/components/goods-list/index.json
new file mode 100644
index 0000000..981de64
--- /dev/null
+++ b/pages/index/components/goods-list/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "goods-card": "/components/goods-card/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/index/components/goods-list/index.wxml b/pages/index/components/goods-list/index.wxml
new file mode 100644
index 0000000..563d7f6
--- /dev/null
+++ b/pages/index/components/goods-list/index.wxml
@@ -0,0 +1,13 @@
+
+
+
+ 送恋人/爱情鲜花
+
+
+
+
+
+
+ 查看更多
+
+
\ No newline at end of file
diff --git a/pages/index/components/goods-list/index.wxss b/pages/index/components/goods-list/index.wxss
new file mode 100644
index 0000000..48375c7
--- /dev/null
+++ b/pages/index/components/goods-list/index.wxss
@@ -0,0 +1,34 @@
+/* components/goods-list/index.wxss */
+.product {
+ margin-top: 24px;
+ padding-bottom: 12px;
+}
+
+.product-title {
+ font-size: 19px;
+ line-height: 26px;
+ text-align: center;
+ font-weight: bold;
+ padding: 0 12px;
+ color: #232628;
+}
+
+.product-list {
+ padding: 7px;
+ margin-top: 12px;
+}
+
+.product-more {
+ margin: 0 1.51933702%;
+}
+.product-more-btn {
+ display: block;
+ margin: 0 auto;
+ background: #ffffff;
+ border-radius: 20px;
+ height: 40px;
+ line-height: 40px;
+ text-align: center;
+ font-size: 14px;
+ color: rgba(35, 38, 40, 0.7);
+}
diff --git a/pages/index/components/procate/index.js b/pages/index/components/procate/index.js
new file mode 100644
index 0000000..6edc8e9
--- /dev/null
+++ b/pages/index/components/procate/index.js
@@ -0,0 +1,22 @@
+// pages/index/components/procate/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ category: {
+ type: Array,
+ value: [],
+ },
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {},
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {},
+});
diff --git a/pages/index/components/procate/index.json b/pages/index/components/procate/index.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/pages/index/components/procate/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/index/components/procate/index.wxml b/pages/index/components/procate/index.wxml
new file mode 100644
index 0000000..7bee75d
--- /dev/null
+++ b/pages/index/components/procate/index.wxml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ {{item.text}}
+
+
+
\ No newline at end of file
diff --git a/pages/index/components/procate/index.wxss b/pages/index/components/procate/index.wxss
new file mode 100644
index 0000000..e3dfb0c
--- /dev/null
+++ b/pages/index/components/procate/index.wxss
@@ -0,0 +1,46 @@
+/* pages/index/components/procate/index.wxss */
+.procate {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ margin: 0 14px;
+ padding: 10px 0;
+ border-radius: 8px;
+}
+
+.procate-item {
+ flex: 1;
+ min-width: 20%;
+ max-width: 20%;
+}
+
+.procate-nav {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+}
+.procate-img {
+ width: 44px;
+ height: 44px;
+}
+
+.procate-nav text {
+ margin-top: 4px;
+ font-size: 12px;
+ font-weight: 600;
+}
+
+.procate-item.small {
+ margin-top: 20px;
+}
+.procate-item.small .procate-img {
+ width: 19px;
+ height: 20px;
+}
+
+.procate-item.small text {
+ font-weight: 400;
+}
diff --git a/pages/index/index.js b/pages/index/index.js
index 99ab7af..8b877f2 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -1,3 +1,5 @@
+import { backgroundList, banner } from '../../modal/swiper';
+import { categorylist } from '../../modal/category';
Component({
pageLifetimes: {
show() {
@@ -8,4 +10,9 @@ Component({
}
},
},
+ data: {
+ background: backgroundList,
+ category: categorylist,
+ banner: banner,
+ },
});
diff --git a/pages/index/index.json b/pages/index/index.json
index 8a09782..f2a4ee6 100644
--- a/pages/index/index.json
+++ b/pages/index/index.json
@@ -1,6 +1,9 @@
{
"usingComponents": {
"van-button": "@vant/weapp/button/index",
- "van-icon": "@vant/weapp/icon/index"
- }
+ "van-icon": "@vant/weapp/icon/index",
+ "goods-list": "./components/goods-list/index",
+ "procate": "./components/procate/index"
+ },
+ "navigationBarTitleText": "慕尚花坊"
}
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 0fdc399..f29af15 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -1,8 +1,30 @@
- 首页
- 按钮
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index e69de29..3f47565 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -0,0 +1,7 @@
+.festival-banner {
+ margin-top: 14px;
+}
+
+.swiper-box {
+ margin-bottom: 12px;
+}
diff --git a/project.config.json b/project.config.json
index 2a48e73..74ae95e 100644
--- a/project.config.json
+++ b/project.config.json
@@ -50,7 +50,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.19.4",
- "appid": "wx1a1229a503f7e641",
+ "appid": "wx566be3b9e68287c9",
"projectname": "miniprogram-92",
"condition": {},
"editorSetting": {
--
Gitee
From 9164e9653e6f88c498c27ce815dd84096f0447a1 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Thu, 9 Feb 2023 15:15:12 +0800
Subject: [PATCH 02/17] =?UTF-8?q?feat:=20=E5=95=86=E5=93=81=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E9=A1=B5=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 3 +-
app.wxss | 1 +
components/filter-group/index.js | 34 ++++++
components/filter-group/index.json | 6 +
components/filter-group/index.wxml | 20 +++
components/filter-group/index.wxss | 40 ++++++
components/filter/index.js | 82 +++++++++++++
components/filter/index.json | 6 +
components/filter/index.wxml | 39 ++++++
components/filter/index.wxss | 51 ++++++++
modal/category.js | 188 ++++++++---------------------
pages/goods/list/index.js | 70 +++++++++++
pages/goods/list/index.json | 9 ++
pages/goods/list/index.wxml | 21 ++++
pages/goods/list/index.wxss | 1 +
15 files changed, 434 insertions(+), 137 deletions(-)
create mode 100644 components/filter-group/index.js
create mode 100644 components/filter-group/index.json
create mode 100644 components/filter-group/index.wxml
create mode 100644 components/filter-group/index.wxss
create mode 100644 components/filter/index.js
create mode 100644 components/filter/index.json
create mode 100644 components/filter/index.wxml
create mode 100644 components/filter/index.wxss
create mode 100644 pages/goods/list/index.js
create mode 100644 pages/goods/list/index.json
create mode 100644 pages/goods/list/index.wxml
create mode 100644 pages/goods/list/index.wxss
diff --git a/app.json b/app.json
index 089460b..9acd48a 100644
--- a/app.json
+++ b/app.json
@@ -3,7 +3,8 @@
"pages/index/index",
"pages/category/category",
"pages/cart/cart",
- "pages/info/info"
+ "pages/info/info",
+ "pages/goods/list/index"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/app.wxss b/app.wxss
index 4653885..cc93c7c 100644
--- a/app.wxss
+++ b/app.wxss
@@ -1,4 +1,5 @@
/**app.wxss**/
+
.container {
height: 100%;
display: flex;
diff --git a/components/filter-group/index.js b/components/filter-group/index.js
new file mode 100644
index 0000000..0ab8c35
--- /dev/null
+++ b/components/filter-group/index.js
@@ -0,0 +1,34 @@
+// components/filter-group/index.js
+Component({
+ options: {
+ multipleSlots: true,
+ },
+ properties: {
+ show: {
+ type: Boolean,
+ observer(newVal, oldVal) {
+ console.log('show', newVal, oldVal);
+ this.setData({ visible: newVal });
+ },
+ },
+ closeBtn: {
+ type: Boolean,
+ value: false,
+ },
+ },
+
+ data: { visible: false },
+
+ methods: {
+ reset() {
+ this.triggerEvent('reset');
+ },
+ confirm() {
+ this.triggerEvent('confirm');
+ },
+ close() {
+ this.triggerEvent('showFilterPopupClose');
+ this.setData({ visible: false });
+ },
+ },
+});
diff --git a/components/filter-group/index.json b/components/filter-group/index.json
new file mode 100644
index 0000000..b94c3e8
--- /dev/null
+++ b/components/filter-group/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-popup": "@vant/weapp/popup/index"
+ }
+}
\ No newline at end of file
diff --git a/components/filter-group/index.wxml b/components/filter-group/index.wxml
new file mode 100644
index 0000000..8e3afef
--- /dev/null
+++ b/components/filter-group/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ 重置
+
+ 确定
+
+
+
+
diff --git a/components/filter-group/index.wxss b/components/filter-group/index.wxss
new file mode 100644
index 0000000..8940b5e
--- /dev/null
+++ b/components/filter-group/index.wxss
@@ -0,0 +1,40 @@
+/* components/filter-group/index.wxss */
+.content .filter-btns-wrap {
+ width: 100%;
+ position: absolute;
+ bottom: calc(20rpx + env(safe-area-inset-bottom));
+ display: flex;
+ flex-direction: row;
+ border-radius: 10rpx 0 0 10rpx;
+ padding: 16rpx 32rpx;
+ border-top: 1rpx solid #e5e5e5;
+ box-sizing: border-box;
+}
+
+.filter-btn {
+ flex: 1;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 28rpx;
+ font-weight: 500;
+ height: 80rpx;
+}
+
+.btn-reset {
+ color: #fa4126;
+ background: rgba(255, 255, 255, 1);
+ position: relative;
+ border: 1rpx solid #fa4126;
+ border-radius: 84rpx 0 0 84rpx;
+}
+
+.btn-confirm {
+ border-radius: 0 84rpx 84rpx 0;
+ border: 1rpx solid #fa4126;
+}
+
+.btn-confirm {
+ color: #fff;
+ background: #fa4126;
+}
diff --git a/components/filter/index.js b/components/filter/index.js
new file mode 100644
index 0000000..06bbac2
--- /dev/null
+++ b/components/filter/index.js
@@ -0,0 +1,82 @@
+Component({
+ options: {
+ multipleSlots: true,
+ },
+
+ properties: {
+ overall: {
+ type: Number,
+ value: 1,
+ observer(overall) {
+ this.setData({
+ overall,
+ });
+ },
+ },
+ layout: {
+ type: Number,
+ value: 1,
+ observer(layout) {
+ this.setData({
+ layout,
+ });
+ },
+ },
+ sorts: {
+ type: String,
+ value: '',
+ observer(sorts) {
+ this.setData({
+ sorts,
+ });
+ },
+ },
+ color: {
+ type: String,
+ value: '#FA550F',
+ },
+ },
+
+ data: {
+ layout: 1,
+ overall: 1,
+ sorts: '',
+ },
+
+ methods: {
+ onChangeShowAction() {
+ const { layout } = this.data;
+ const nextLayout = layout === 1 ? 0 : 1;
+ this.triggerEvent('change', { ...this.properties, layout: nextLayout });
+ },
+
+ handlePriseSort() {
+ const { sorts } = this.data;
+ this.triggerEvent('change', {
+ ...this.properties,
+ overall: 0,
+ sorts: sorts === 'desc' ? 'asc' : 'desc',
+ });
+ },
+
+ open() {
+ this.triggerEvent('showFilterPopup', {
+ show: true,
+ });
+ },
+
+ onOverallAction() {
+ const { overall } = this.data;
+ const nextOverall = overall === 1 ? 0 : 1;
+ const nextData = {
+ sorts: '',
+ prices: [],
+ };
+ this.triggerEvent('change', {
+ ...this.properties,
+ ...nextData,
+ overall: nextOverall,
+ });
+ },
+ },
+});
diff --git a/components/filter/index.json b/components/filter/index.json
new file mode 100644
index 0000000..6f50345
--- /dev/null
+++ b/components/filter/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-icon": "@vant/weapp/icon/index"
+ }
+}
\ No newline at end of file
diff --git a/components/filter/index.wxml b/components/filter/index.wxml
new file mode 100644
index 0000000..6cbae59
--- /dev/null
+++ b/components/filter/index.wxml
@@ -0,0 +1,39 @@
+
+
+
+
+
+ 综合
+
+
+ 价格
+
+
+
+
+
+
+ 筛选
+
+
+
+
+
+
+
+
diff --git a/components/filter/index.wxss b/components/filter/index.wxss
new file mode 100644
index 0000000..e9bd6bd
--- /dev/null
+++ b/components/filter/index.wxss
@@ -0,0 +1,51 @@
+/* components/filter/index.wxss */
+.filter-wrap {
+ width: 100%;
+ height: 88rpx;
+ display: flex;
+ justify-content: space-between;
+ position: relative;
+ background: #fff;
+}
+
+.filter-right-content {
+ height: 100%;
+ flex-basis: 100rpx;
+ text-align: center;
+ line-height: 88rpx;
+}
+
+.filter-left-content {
+ height: 100%;
+ display: flex;
+ flex-grow: 2;
+ flex-flow: row nowrap;
+ justify-content: space-between;
+}
+
+.filter-left-content .filter-item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 26rpx;
+ line-height: 36rpx;
+ font-weight: 400;
+ color: rgba(51, 51, 51, 1);
+}
+
+.filter-left-content .filter-item .filter-price {
+ display: flex;
+ flex-direction: column;
+ margin-left: 6rpx;
+ justify-content: space-between;
+}
+
+.filter-left-content .filter-item .wr-filter {
+ margin-left: 8rpx;
+}
+
+.filter-left-content .filter-active-item {
+ color: #fa550f;
+}
diff --git a/modal/category.js b/modal/category.js
index 8cc1dbb..59c08dd 100644
--- a/modal/category.js
+++ b/modal/category.js
@@ -51,139 +51,55 @@ export const categorylist = [
},
];
-export const catg = {
- code: 200,
- message: '成功',
- data: [
- {
- children: [
- {
- name: '电子书刊',
- id: 1,
- },
- {
- name: '音像',
- id: 2,
- },
- {
- name: '英文原版',
- id: 3,
- },
- {
- name: '文艺',
- id: 4,
- },
- {
- name: '少儿',
- id: 5,
- },
- {
- name: '人文社科',
- id: 6,
- },
- {
- name: '经管励志',
- id: 7,
- },
- {
- name: '生活',
- id: 8,
- },
- {
- name: '科技',
- id: 9,
- },
- {
- name: '教育',
- id: 10,
- },
- {
- name: '港台图书',
- id: 11,
- },
- {
- name: '其他',
- id: 12,
- },
- ],
- name: '手机数码',
- id: 1,
- },
- {
- children: [
- {
- name: '手机通讯',
- id: 13,
- },
- {
- name: '运营商',
- id: 14,
- },
- {
- name: '手机配件',
- id: 15,
- },
- ],
- name: '电脑、办公',
- id: 2,
- },
- {
- children: [
- {
- name: '大 家 电',
- id: 16,
- },
- {
- name: '厨卫大电',
- id: 17,
- },
- {
- name: '厨房小电',
- id: 18,
- },
- {
- name: '生活电器',
- id: 19,
- },
- {
- name: '个护健康',
- id: 20,
- },
- {
- name: '五金家装',
- id: 21,
- },
- ],
- name: '家用电器',
- id: 3,
- },
- {
- children: [
- {
- name: '摄影摄像',
- id: 22,
- },
- {
- name: '数码配件',
- id: 23,
- },
- {
- name: '智能设备',
- id: 24,
- },
- {
- name: '影音娱乐',
- id: 25,
- },
- {
- name: '电子教育',
- id: 26,
- },
- {
- name: '虚拟商品',
- id: 27,
- },
- ],
- },
- ],
-};
+export const category = [
+ {
+ name: '爱礼精选',
+ imageUrl: 'https://img02.hua.com//chanpintupian/2022shouye/flowers1.png',
+ id: 1,
+ },
+ {
+ name: '鲜花玫瑰',
+ imageUrl: 'https://img02.hua.com//chanpintupian/2022shouye/forever1.png',
+ id: 2,
+ },
+ {
+ name: '永生玫瑰',
+ imageUrl: 'https://img02.hua.com//chanpintupian/2022shouye/cake1.png',
+ id: 3,
+ },
+ {
+ name: '玫瑰珠宝',
+ imageUrl: 'https://img02.hua.com//chanpintupian/2022shouye/gifts1.png',
+ id: 4,
+ },
+ {
+ name: '香水体护',
+ imageUrl: 'https://img02.hua.com//chanpintupian/2022shouye/chocolate1.png',
+ id: 5,
+ },
+ {
+ name: '玫瑰家居',
+ imageUrl: 'https://img02.hua.com//chanpintupian/2022shouye/srzf2.png?v122',
+ id: 6,
+ },
+ {
+ name: '开业花礼',
+ imageUrl: 'https://img02.hua.com//chanpintupian/2022shouye/bbqh2.png?v122',
+ id: 7,
+ },
+ {
+ name: '生日祝福',
+ imageUrl: 'https://img02.hua.com//chanpintupian/2022shouye/swky2.png?v132',
+ id: 8,
+ },
+ {
+ name: '一周一花',
+ imageUrl: 'https://img02.hua.com//chanpintupian/2022shouye/znjn2.png?v122',
+ id: 9,
+ },
+ {
+ name: '网红绿植',
+ imageUrl: 'https://img02.hua.com//chanpintupian/2022shouye/qytg2.png?v111',
+ id: 10,
+ },
+];
diff --git a/pages/goods/list/index.js b/pages/goods/list/index.js
new file mode 100644
index 0000000..b3ed59b
--- /dev/null
+++ b/pages/goods/list/index.js
@@ -0,0 +1,70 @@
+// pages/goods/list/index.js
+const initFilters = {
+ overall: 1,
+ sorts: '',
+ layout: 0,
+};
+
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ layout: 0,
+ sorts: '',
+ overall: 1,
+ show: false,
+ },
+
+ showFilterPopup() {
+ this.setData({
+ show: true,
+ });
+ },
+
+ showFilterPopupClose() {
+ this.setData({
+ show: false,
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {},
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {},
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {},
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {},
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {},
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {},
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {},
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {},
+});
diff --git a/pages/goods/list/index.json b/pages/goods/list/index.json
new file mode 100644
index 0000000..a976bdd
--- /dev/null
+++ b/pages/goods/list/index.json
@@ -0,0 +1,9 @@
+{
+ "usingComponents": {
+ "filter": "/components/filter/index",
+ "filter-group": "/components/filter-group/index",
+ "goods-card": "/components/goods-card/index",
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationBarTitleText": "商品列表"
+}
\ No newline at end of file
diff --git a/pages/goods/list/index.wxml b/pages/goods/list/index.wxml
new file mode 100644
index 0000000..272b982
--- /dev/null
+++ b/pages/goods/list/index.wxml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ 12313
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/goods/list/index.wxss b/pages/goods/list/index.wxss
new file mode 100644
index 0000000..e2a65a7
--- /dev/null
+++ b/pages/goods/list/index.wxss
@@ -0,0 +1 @@
+/* pages/goods/list/index.wxss */
\ No newline at end of file
--
Gitee
From 497e0ffd8b081ebd15985cceeaca0d8726a41812 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Thu, 9 Feb 2023 18:31:18 +0800
Subject: [PATCH 03/17] =?UTF-8?q?feat:=20=E5=88=86=E7=B1=BB=E5=B8=83?=
=?UTF-8?q?=E5=B1=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modal/category.js | 214 ++++++++++++++++++
pages/category/category.js | 26 ++-
pages/category/category.json | 5 +-
pages/category/category.wxml | 7 +-
pages/category/category.wxss | 9 +
pages/category/components/c-sidebar/index.js | 20 ++
.../category/components/c-sidebar/index.json | 4 +
.../category/components/c-sidebar/index.wxml | 13 ++
.../category/components/c-sidebar/index.wxss | 61 +++++
.../components/goods-category/index.js | 29 +++
.../components/goods-category/index.json | 6 +
.../components/goods-category/index.wxml | 18 ++
.../components/goods-category/index.wxss | 55 +++++
13 files changed, 455 insertions(+), 12 deletions(-)
create mode 100644 pages/category/components/c-sidebar/index.js
create mode 100644 pages/category/components/c-sidebar/index.json
create mode 100644 pages/category/components/c-sidebar/index.wxml
create mode 100644 pages/category/components/c-sidebar/index.wxss
create mode 100644 pages/category/components/goods-category/index.js
create mode 100644 pages/category/components/goods-category/index.json
create mode 100644 pages/category/components/goods-category/index.wxml
create mode 100644 pages/category/components/goods-category/index.wxss
diff --git a/modal/category.js b/modal/category.js
index 59c08dd..2f522d7 100644
--- a/modal/category.js
+++ b/modal/category.js
@@ -103,3 +103,217 @@ export const category = [
id: 10,
},
];
+
+// export const categoryList = [];
+export const getCategoryList = [
+ {
+ children: [
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/cate-1.png',
+ name: '真情告白',
+ id: 1,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '浪漫求婚',
+ id: 2,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '珍贵纪念',
+ id: 3,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '爱意表达',
+ id: 4,
+ },
+ ],
+ imageUrl: 'http://39.98.123.211:8300/images/cate-1.png',
+ name: '爱礼精选',
+ id: 1,
+ },
+ {
+ children: [
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '经典永续',
+ id: 5,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '玫瑰经典',
+ id: 6,
+ },
+ ],
+ imageUrl: 'http://39.98.123.211:8300/images/cate-2.png',
+ name: '鲜花玫瑰',
+ id: 2,
+ },
+ {
+ children: [
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '玫瑰公仔',
+ id: 7,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '星座金典',
+ id: 8,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '玫瑰系列',
+ id: 9,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '音乐系列',
+ id: 10,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '经典永续',
+ id: 11,
+ },
+ ],
+ imageUrl: 'http://39.98.123.211:8300/images/cate-3.png',
+ name: '永生玫瑰',
+ id: 3,
+ },
+ {
+ children: [
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '星座经典',
+ id: 12,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '爱锁系列',
+ id: 13,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '玫瑰公仔',
+ id: 14,
+ },
+ ],
+ imageUrl: 'http://39.98.123.211:8300/images/cate-4.png',
+ name: '玫瑰珠宝',
+ id: 4,
+ },
+ {
+ children: [
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '香水',
+ id: 15,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '织恋',
+ id: 16,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '沉爱',
+ id: 17,
+ },
+ ],
+ imageUrl: 'http://39.98.123.211:8300/images/cate-5.png',
+ name: '香水体护',
+ id: 5,
+ },
+ {
+ children: [
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '香氛蜡烛',
+ id: 18,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '香氛散香',
+ id: 19,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '玫瑰礼品',
+ id: 20,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '香氛挂件',
+ id: 21,
+ },
+ ],
+ imageUrl: 'http://39.98.123.211:8300/images/cate-6.png',
+ name: '玫瑰家居',
+ id: 6,
+ },
+ {
+ children: [
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '开业花礼',
+ id: 22,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '会议用花',
+ id: 23,
+ },
+ ],
+ imageUrl: 'http://39.98.123.211:8300/images/cate-7.png',
+ name: '开业花礼',
+ id: 7,
+ },
+ {
+ children: [
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '送恋人',
+ id: 24,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '送朋友',
+ id: 25,
+ },
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '送长辈',
+ id: 26,
+ },
+ ],
+ imageUrl: 'http://39.98.123.211:8300/images/cate-8.png',
+ name: '生日祝福',
+ id: 8,
+ },
+ {
+ children: [
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '一周一花',
+ id: 27,
+ },
+ ],
+ imageUrl: 'http://39.98.123.211:8300/images/cate-9.png',
+ name: '一周一花',
+ id: 9,
+ },
+ {
+ children: [
+ {
+ imageUrl: 'http://39.98.123.211:8300/images/null',
+ name: '网红绿植',
+ id: 28,
+ },
+ ],
+ imageUrl: 'http://39.98.123.211:8300/images/cate-10.png',
+ name: '网红绿植',
+ id: 10,
+ },
+];
diff --git a/pages/category/category.js b/pages/category/category.js
index f83348a..b44d505 100644
--- a/pages/category/category.js
+++ b/pages/category/category.js
@@ -1,11 +1,19 @@
-Component({
- pageLifetimes: {
- show() {
- if (typeof this.getTabBar === 'function' && this.getTabBar()) {
- this.getTabBar().setData({
- selected: 1,
- });
- }
- },
+import { getCategoryList } from '../..//modal/category';
+Page({
+ data: {
+ list: getCategoryList,
+ },
+
+ onShow() {
+ if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+ this.getTabBar().setData({
+ selected: 1,
+ });
+ }
+ },
+ onChange() {
+ wx.navigateTo({
+ url: '/pages/goods/list/index',
+ });
},
});
diff --git a/pages/category/category.json b/pages/category/category.json
index 8835af0..9997119 100644
--- a/pages/category/category.json
+++ b/pages/category/category.json
@@ -1,3 +1,6 @@
{
- "usingComponents": {}
+ "navigationBarTitleText": "分类",
+ "usingComponents": {
+ "goods-category": "./components/goods-category/index"
+ }
}
\ No newline at end of file
diff --git a/pages/category/category.wxml b/pages/category/category.wxml
index 2a4fdbb..5a7e02b 100644
--- a/pages/category/category.wxml
+++ b/pages/category/category.wxml
@@ -1,4 +1,7 @@
-
- 分类
+
+
diff --git a/pages/category/category.wxss b/pages/category/category.wxss
index e69de29..a78b7db 100644
--- a/pages/category/category.wxss
+++ b/pages/category/category.wxss
@@ -0,0 +1,9 @@
+.wrap {
+ height: 100vh;
+ overflow: hidden;
+}
+
+.goods-category {
+ background-color: #f6f6f6 !important;
+ height: 100%;
+}
diff --git a/pages/category/components/c-sidebar/index.js b/pages/category/components/c-sidebar/index.js
new file mode 100644
index 0000000..10aca0e
--- /dev/null
+++ b/pages/category/components/c-sidebar/index.js
@@ -0,0 +1,20 @@
+// pages/category/components/c-siderbar/index.js
+Component({
+ properties: {
+ list: {
+ type: Array,
+ value: [],
+ },
+ },
+ data: {
+ activeKey: 0,
+ },
+ methods: {
+ setActive(activeKey) {
+ return this.setData({ activeKey });
+ },
+ onClick(e) {
+ this.setActive(e.currentTarget.dataset.index);
+ },
+ },
+});
diff --git a/pages/category/components/c-sidebar/index.json b/pages/category/components/c-sidebar/index.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/pages/category/components/c-sidebar/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/category/components/c-sidebar/index.wxml b/pages/category/components/c-sidebar/index.wxml
new file mode 100644
index 0000000..52c68c4
--- /dev/null
+++ b/pages/category/components/c-sidebar/index.wxml
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/pages/category/components/c-sidebar/index.wxss b/pages/category/components/c-sidebar/index.wxss
new file mode 100644
index 0000000..896f172
--- /dev/null
+++ b/pages/category/components/c-sidebar/index.wxss
@@ -0,0 +1,61 @@
+/* pages/category/components/c-siderbar/index.wxss */
+
+.c-sidebar {
+ background-color: #f5f5f5;
+ width: 180rpx;
+ height: 100vh;
+}
+
+.c-sidebar-item-container {
+ background-color: white;
+}
+
+.c-sidebar-item {
+ background-color: white;
+}
+.c-sidebar-item {
+ display: flex;
+ justify-content: center;
+ text-align: center;
+ background-color: #f5f5f5;
+ color: #222427;
+ padding: 20rpx 0;
+ font-size: 26rpx;
+}
+
+.c-sidebar-item.active {
+ position: relative;
+ background: white;
+}
+
+.c-sidebar-item.active::before {
+ content: '';
+ position: absolute;
+ width: 6rpx;
+ height: 48rpx;
+ background-color: #fa4126;
+ left: 0;
+ top: 50%;
+ transform: translate(0, -50%);
+ border-radius: 64rpx;
+ border-top-left-radius: 35px;
+ border-top-right-radius: 35px;
+ border-bottom-right-radius: 35px;
+ border-bottom-left-radius: 35px;
+}
+
+.c-sidebar-item__text {
+ width: 136rpx;
+ height: 36rpx;
+ padding: 8rpx 0;
+ line-height: 36rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #666666;
+}
+
+.c-sidebar-item.active .c-sidebar-item__text {
+ background-color: white;
+ border-radius: 36rpx;
+ color: #fa4126;
+}
diff --git a/pages/category/components/goods-category/index.js b/pages/category/components/goods-category/index.js
new file mode 100644
index 0000000..b665bcc
--- /dev/null
+++ b/pages/category/components/goods-category/index.js
@@ -0,0 +1,29 @@
+Component({
+ properties: {
+ category: {
+ type: Array,
+ value: [],
+ },
+ initActive: {
+ type: Array,
+ value: [],
+ observer(newVal, oldVal) {
+ if (newVal[0] !== oldVal[0]) {
+ this.setActiveKey(newVal[0], 0);
+ }
+ },
+ },
+ },
+ data: {
+ activeKey: 0,
+ defaultImg:
+ 'https://img02.hua.com/m/category/Classification/m_category_flowers_use_1-2Girlfriend.png',
+ },
+ methods: {
+ onParentChange(event) {
+ this.setActiveKey(event.detail.index, 0).then(() => {
+ this.triggerEvent('change', [this.data.activeKey]);
+ });
+ },
+ },
+});
diff --git a/pages/category/components/goods-category/index.json b/pages/category/components/goods-category/index.json
new file mode 100644
index 0000000..0db18a8
--- /dev/null
+++ b/pages/category/components/goods-category/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "c-sidebar": "../c-sidebar/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/category/components/goods-category/index.wxml b/pages/category/components/goods-category/index.wxml
new file mode 100644
index 0000000..181e15b
--- /dev/null
+++ b/pages/category/components/goods-category/index.wxml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ 女装
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
diff --git a/pages/category/components/goods-category/index.wxss b/pages/category/components/goods-category/index.wxss
new file mode 100644
index 0000000..8797517
--- /dev/null
+++ b/pages/category/components/goods-category/index.wxss
@@ -0,0 +1,55 @@
+.goods-category {
+ display: flex;
+}
+
+.goods-category__right {
+ height: 100vh;
+ flex: auto;
+ position: relative;
+ overflow: scroll;
+ -webkit-overflow-scrolling: touch;
+ background-color: white;
+ padding: 28rpx 34rpx 0rpx 32rpx;
+}
+
+.goods-category-normal-item-title {
+ font-size: 28rpx;
+ font-weight: 500;
+}
+
+.goods-category-normal-item-container {
+ background-color: #fff;
+ border-radius: 8rpx;
+ padding-top: 28rpx;
+ margin-top: -24rpx;
+ margin-bottom: 30rpx;
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.category-card-item {
+ display: inline-block;
+ width: 33.33333333%;
+ padding: 0.57142857rem 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+.category-card-item .img-bg {
+ width: 60px;
+ height: 60px;
+ background-color: aliceblue;
+ border-radius: 50%;
+}
+.img-bg image {
+ width: 100%;
+ height: 100%;
+}
+
+.category-card-item .item-title {
+ font-size: 24rpx;
+ color: #666666;
+ margin-top: 20rpx;
+}
--
Gitee
From d2a70e561ed7e0d0a241b6e152eb34d147a66d3d Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Thu, 9 Feb 2023 20:16:11 +0800
Subject: [PATCH 04/17] =?UTF-8?q?feat:=20=E5=88=86=E7=B1=BB=E9=80=89?=
=?UTF-8?q?=E6=8B=A9=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/category/components/c-sidebar/index.js | 20 ------
.../category/components/c-sidebar/index.json | 4 --
.../category/components/c-sidebar/index.wxml | 13 ----
.../category/components/c-sidebar/index.wxss | 61 -------------------
.../components/goods-category/index.js | 18 ++----
.../components/goods-category/index.wxml | 21 +++++--
.../components/goods-category/index.wxss | 60 ++++++++++++++++++
7 files changed, 81 insertions(+), 116 deletions(-)
delete mode 100644 pages/category/components/c-sidebar/index.js
delete mode 100644 pages/category/components/c-sidebar/index.json
delete mode 100644 pages/category/components/c-sidebar/index.wxml
delete mode 100644 pages/category/components/c-sidebar/index.wxss
diff --git a/pages/category/components/c-sidebar/index.js b/pages/category/components/c-sidebar/index.js
deleted file mode 100644
index 10aca0e..0000000
--- a/pages/category/components/c-sidebar/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// pages/category/components/c-siderbar/index.js
-Component({
- properties: {
- list: {
- type: Array,
- value: [],
- },
- },
- data: {
- activeKey: 0,
- },
- methods: {
- setActive(activeKey) {
- return this.setData({ activeKey });
- },
- onClick(e) {
- this.setActive(e.currentTarget.dataset.index);
- },
- },
-});
diff --git a/pages/category/components/c-sidebar/index.json b/pages/category/components/c-sidebar/index.json
deleted file mode 100644
index e8cfaaf..0000000
--- a/pages/category/components/c-sidebar/index.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "component": true,
- "usingComponents": {}
-}
\ No newline at end of file
diff --git a/pages/category/components/c-sidebar/index.wxml b/pages/category/components/c-sidebar/index.wxml
deleted file mode 100644
index 52c68c4..0000000
--- a/pages/category/components/c-sidebar/index.wxml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
\ No newline at end of file
diff --git a/pages/category/components/c-sidebar/index.wxss b/pages/category/components/c-sidebar/index.wxss
deleted file mode 100644
index 896f172..0000000
--- a/pages/category/components/c-sidebar/index.wxss
+++ /dev/null
@@ -1,61 +0,0 @@
-/* pages/category/components/c-siderbar/index.wxss */
-
-.c-sidebar {
- background-color: #f5f5f5;
- width: 180rpx;
- height: 100vh;
-}
-
-.c-sidebar-item-container {
- background-color: white;
-}
-
-.c-sidebar-item {
- background-color: white;
-}
-.c-sidebar-item {
- display: flex;
- justify-content: center;
- text-align: center;
- background-color: #f5f5f5;
- color: #222427;
- padding: 20rpx 0;
- font-size: 26rpx;
-}
-
-.c-sidebar-item.active {
- position: relative;
- background: white;
-}
-
-.c-sidebar-item.active::before {
- content: '';
- position: absolute;
- width: 6rpx;
- height: 48rpx;
- background-color: #fa4126;
- left: 0;
- top: 50%;
- transform: translate(0, -50%);
- border-radius: 64rpx;
- border-top-left-radius: 35px;
- border-top-right-radius: 35px;
- border-bottom-right-radius: 35px;
- border-bottom-left-radius: 35px;
-}
-
-.c-sidebar-item__text {
- width: 136rpx;
- height: 36rpx;
- padding: 8rpx 0;
- line-height: 36rpx;
- text-align: center;
- font-size: 28rpx;
- color: #666666;
-}
-
-.c-sidebar-item.active .c-sidebar-item__text {
- background-color: white;
- border-radius: 36rpx;
- color: #fa4126;
-}
diff --git a/pages/category/components/goods-category/index.js b/pages/category/components/goods-category/index.js
index b665bcc..0addcff 100644
--- a/pages/category/components/goods-category/index.js
+++ b/pages/category/components/goods-category/index.js
@@ -4,15 +4,6 @@ Component({
type: Array,
value: [],
},
- initActive: {
- type: Array,
- value: [],
- observer(newVal, oldVal) {
- if (newVal[0] !== oldVal[0]) {
- this.setActiveKey(newVal[0], 0);
- }
- },
- },
},
data: {
activeKey: 0,
@@ -20,10 +11,11 @@ Component({
'https://img02.hua.com/m/category/Classification/m_category_flowers_use_1-2Girlfriend.png',
},
methods: {
- onParentChange(event) {
- this.setActiveKey(event.detail.index, 0).then(() => {
- this.triggerEvent('change', [this.data.activeKey]);
- });
+ setActive(activeKey) {
+ this.setData({ activeKey });
+ },
+ onClick(e) {
+ this.setActive(e.currentTarget.dataset.index);
},
},
});
diff --git a/pages/category/components/goods-category/index.wxml b/pages/category/components/goods-category/index.wxml
index 181e15b..0622860 100644
--- a/pages/category/components/goods-category/index.wxml
+++ b/pages/category/components/goods-category/index.wxml
@@ -1,15 +1,26 @@
-
-
+
+
- 女装
+ {{category[activeKey].name}}
-
+
-
+
{{item.name}}
diff --git a/pages/category/components/goods-category/index.wxss b/pages/category/components/goods-category/index.wxss
index 8797517..f81e5c9 100644
--- a/pages/category/components/goods-category/index.wxss
+++ b/pages/category/components/goods-category/index.wxss
@@ -2,6 +2,66 @@
display: flex;
}
+.c-sidebar {
+ background-color: #f5f5f5;
+ width: 180rpx;
+ height: 100vh;
+}
+
+.c-sidebar-item-container {
+ background-color: white;
+}
+
+.c-sidebar-item {
+ background-color: white;
+}
+.c-sidebar-item {
+ display: flex;
+ justify-content: center;
+ text-align: center;
+ background-color: #f5f5f5;
+ color: #222427;
+ padding: 20rpx 0;
+ font-size: 26rpx;
+}
+
+.c-sidebar-item.active {
+ position: relative;
+ background: white;
+}
+
+.c-sidebar-item.active::before {
+ content: '';
+ position: absolute;
+ width: 6rpx;
+ height: 48rpx;
+ background-color: #fa4126;
+ left: 0;
+ top: 50%;
+ transform: translate(0, -50%);
+ border-radius: 64rpx;
+ border-top-left-radius: 35px;
+ border-top-right-radius: 35px;
+ border-bottom-right-radius: 35px;
+ border-bottom-left-radius: 35px;
+}
+
+.c-sidebar-item__text {
+ width: 136rpx;
+ height: 36rpx;
+ padding: 8rpx 0;
+ line-height: 36rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #666666;
+}
+
+.c-sidebar-item.active .c-sidebar-item__text {
+ background-color: white;
+ border-radius: 36rpx;
+ color: #fa4126;
+}
+
.goods-category__right {
height: 100vh;
flex: auto;
--
Gitee
From 534611d701c379243a8116d6ff22153c9fa1110a Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Thu, 9 Feb 2023 22:00:07 +0800
Subject: [PATCH 05/17] =?UTF-8?q?feat:=20=E8=B4=AD=E7=89=A9=E8=BD=A6?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 3 +-
pages/cart/cart.js | 30 +++++---
pages/cart/cart.json | 6 +-
pages/cart/cart.wxml | 49 ++++++++++++-
pages/cart/cart.wxss | 68 +++++++++++++++++++
.../components/goods-category/index.json | 4 +-
pages/goods/detail/index.js | 66 ++++++++++++++++++
pages/goods/detail/index.json | 3 +
pages/goods/detail/index.wxml | 2 +
pages/goods/detail/index.wxss | 1 +
10 files changed, 216 insertions(+), 16 deletions(-)
create mode 100644 pages/goods/detail/index.js
create mode 100644 pages/goods/detail/index.json
create mode 100644 pages/goods/detail/index.wxml
create mode 100644 pages/goods/detail/index.wxss
diff --git a/app.json b/app.json
index 9acd48a..9735513 100644
--- a/app.json
+++ b/app.json
@@ -4,7 +4,8 @@
"pages/category/category",
"pages/cart/cart",
"pages/info/info",
- "pages/goods/list/index"
+ "pages/goods/list/index",
+ "pages/goods/detail/index"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/pages/cart/cart.js b/pages/cart/cart.js
index 1a45cef..922b06d 100644
--- a/pages/cart/cart.js
+++ b/pages/cart/cart.js
@@ -1,11 +1,23 @@
-Component({
- pageLifetimes: {
- show() {
- if (typeof this.getTabBar === 'function' && this.getTabBar()) {
- this.getTabBar().setData({
- selected: 2,
- });
- }
- },
+Page({
+ onShow() {
+ if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+ this.getTabBar().setData({
+ selected: 2,
+ });
+ }
+ },
+
+ data: {
+ checked: true,
+ price: 0,
+ },
+
+ onChange(event) {
+ this.setData({
+ checked: event.detail,
+ });
+ },
+ onChangePrice(event) {
+ console.log(event.detail);
},
});
diff --git a/pages/cart/cart.json b/pages/cart/cart.json
index 8835af0..d4a0602 100644
--- a/pages/cart/cart.json
+++ b/pages/cart/cart.json
@@ -1,3 +1,7 @@
{
- "usingComponents": {}
+ "usingComponents": {
+ "van-swipe-cell": "@vant/weapp/swipe-cell/index",
+ "van-checkbox": "@vant/weapp/checkbox/index",
+ "van-stepper": "@vant/weapp/stepper/index"
+ }
}
\ No newline at end of file
diff --git a/pages/cart/cart.wxml b/pages/cart/cart.wxml
index 932f9ee..d5ae1bf 100644
--- a/pages/cart/cart.wxml
+++ b/pages/cart/cart.wxml
@@ -1,5 +1,50 @@
-
- 购物车
+
+
+
+
+
+
+
+
+
+
+
+ 腾讯极光盒子4智能网络电视机顶盒6K千兆网络机顶盒4K高分辨率
+
+
+
+ ¥
+ 99.00
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 腾讯极光盒子4智能网络电视机顶盒6K千兆网络机顶盒4K高分辨率
+
+
+
+ ¥
+ 99.00
+
+
+
+
+
+
+
+
diff --git a/pages/cart/cart.wxss b/pages/cart/cart.wxss
index e69de29..7863168 100644
--- a/pages/cart/cart.wxss
+++ b/pages/cart/cart.wxss
@@ -0,0 +1,68 @@
+.goods-wrap {
+ height: 100vh;
+}
+
+.cart-wrap {
+ padding-top: 20px;
+ background-color: white;
+}
+.goods-item {
+ display: flex;
+ align-items: center;
+ padding: 0 32rpx 40rpx 0;
+}
+
+.goods-item .left {
+ width: 56px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.goods-item .mid {
+ width: 114px;
+ height: 125px;
+}
+
+.mid image {
+ height: 100%;
+}
+
+.goods-item .right {
+ height: 125px;
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ margin-left: 10px;
+}
+
+.right .title {
+ flex: 1;
+ flex-shrink: 0;
+ font-size: 28rpx;
+ color: #333;
+ line-height: 40rpx;
+ font-weight: 400;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ word-break: break-word;
+}
+.buy {
+ display: flex;
+ justify-content: space-between;
+}
+
+.price {
+ display: flex;
+ /* align-items: flex-end; */
+ color: #fa4126;
+ font-size: 36rpx;
+}
+
+.price .symbol {
+ font-size: 10px;
+ margin-right: 2px;
+ margin-top: 8px;
+}
diff --git a/pages/category/components/goods-category/index.json b/pages/category/components/goods-category/index.json
index 0db18a8..e8cfaaf 100644
--- a/pages/category/components/goods-category/index.json
+++ b/pages/category/components/goods-category/index.json
@@ -1,6 +1,4 @@
{
"component": true,
- "usingComponents": {
- "c-sidebar": "../c-sidebar/index"
- }
+ "usingComponents": {}
}
\ No newline at end of file
diff --git a/pages/goods/detail/index.js b/pages/goods/detail/index.js
new file mode 100644
index 0000000..df24173
--- /dev/null
+++ b/pages/goods/detail/index.js
@@ -0,0 +1,66 @@
+// pages/goods/detail/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/goods/detail/index.json b/pages/goods/detail/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/goods/detail/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/goods/detail/index.wxml b/pages/goods/detail/index.wxml
new file mode 100644
index 0000000..35ae7d3
--- /dev/null
+++ b/pages/goods/detail/index.wxml
@@ -0,0 +1,2 @@
+
+
diff --git a/pages/goods/detail/index.wxss b/pages/goods/detail/index.wxss
new file mode 100644
index 0000000..ac87adb
--- /dev/null
+++ b/pages/goods/detail/index.wxss
@@ -0,0 +1 @@
+/* pages/goods/detail/index.wxss */
--
Gitee
From 3b623ddc800b2db0711ad1b4b0bcc667020df4c1 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Fri, 10 Feb 2023 11:12:02 +0800
Subject: [PATCH 06/17] =?UTF-8?q?feat:=20=E8=AE=A2=E5=8D=95=E5=88=97?=
=?UTF-8?q?=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 7 ++-
pages/address/add/index.js | 66 ++++++++++++++++++++
pages/address/add/index.json | 3 +
pages/address/add/index.wxml | 2 +
pages/address/add/index.wxss | 1 +
pages/address/list/index.js | 66 ++++++++++++++++++++
pages/address/list/index.json | 3 +
pages/address/list/index.wxml | 2 +
pages/address/list/index.wxss | 1 +
pages/goods/detail/index.json | 4 +-
pages/goods/detail/index.wxml | 38 +++++++++++-
pages/goods/detail/index.wxss | 112 ++++++++++++++++++++++++++++++++++
pages/order/detail/index.js | 66 ++++++++++++++++++++
pages/order/detail/index.json | 5 ++
pages/order/detail/index.wxml | 30 +++++++++
pages/order/detail/index.wxss | 104 +++++++++++++++++++++++++++++++
pages/order/list/index.js | 66 ++++++++++++++++++++
pages/order/list/index.json | 3 +
pages/order/list/index.wxml | 2 +
pages/order/list/index.wxss | 1 +
20 files changed, 579 insertions(+), 3 deletions(-)
create mode 100644 pages/address/add/index.js
create mode 100644 pages/address/add/index.json
create mode 100644 pages/address/add/index.wxml
create mode 100644 pages/address/add/index.wxss
create mode 100644 pages/address/list/index.js
create mode 100644 pages/address/list/index.json
create mode 100644 pages/address/list/index.wxml
create mode 100644 pages/address/list/index.wxss
create mode 100644 pages/order/detail/index.js
create mode 100644 pages/order/detail/index.json
create mode 100644 pages/order/detail/index.wxml
create mode 100644 pages/order/detail/index.wxss
create mode 100644 pages/order/list/index.js
create mode 100644 pages/order/list/index.json
create mode 100644 pages/order/list/index.wxml
create mode 100644 pages/order/list/index.wxss
diff --git a/app.json b/app.json
index 9735513..e078d63 100644
--- a/app.json
+++ b/app.json
@@ -5,7 +5,12 @@
"pages/cart/cart",
"pages/info/info",
"pages/goods/list/index",
- "pages/goods/detail/index"
+ "pages/goods/detail/index",
+ "pages/order/detail/index",
+ "pages/order/list/list",
+ "pages/order/list/index",
+ "pages/address/add/index",
+ "pages/address/list/index"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/pages/address/add/index.js b/pages/address/add/index.js
new file mode 100644
index 0000000..47650dd
--- /dev/null
+++ b/pages/address/add/index.js
@@ -0,0 +1,66 @@
+// pages/address/add/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/address/add/index.json b/pages/address/add/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/address/add/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/address/add/index.wxml b/pages/address/add/index.wxml
new file mode 100644
index 0000000..875ec95
--- /dev/null
+++ b/pages/address/add/index.wxml
@@ -0,0 +1,2 @@
+
+pages/address/add/index.wxml
diff --git a/pages/address/add/index.wxss b/pages/address/add/index.wxss
new file mode 100644
index 0000000..d176586
--- /dev/null
+++ b/pages/address/add/index.wxss
@@ -0,0 +1 @@
+/* pages/address/add/index.wxss */
\ No newline at end of file
diff --git a/pages/address/list/index.js b/pages/address/list/index.js
new file mode 100644
index 0000000..e472561
--- /dev/null
+++ b/pages/address/list/index.js
@@ -0,0 +1,66 @@
+// pages/address/list/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/address/list/index.json b/pages/address/list/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/address/list/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/address/list/index.wxml b/pages/address/list/index.wxml
new file mode 100644
index 0000000..ffbe0e6
--- /dev/null
+++ b/pages/address/list/index.wxml
@@ -0,0 +1,2 @@
+
+pages/address/list/index.wxml
diff --git a/pages/address/list/index.wxss b/pages/address/list/index.wxss
new file mode 100644
index 0000000..24cad04
--- /dev/null
+++ b/pages/address/list/index.wxss
@@ -0,0 +1 @@
+/* pages/address/list/index.wxss */
\ No newline at end of file
diff --git a/pages/goods/detail/index.json b/pages/goods/detail/index.json
index 8835af0..d9c985d 100644
--- a/pages/goods/detail/index.json
+++ b/pages/goods/detail/index.json
@@ -1,3 +1,5 @@
{
- "usingComponents": {}
+ "usingComponents": {
+ "van-icon": "@vant/weapp/icon/index"
+ }
}
\ No newline at end of file
diff --git a/pages/goods/detail/index.wxml b/pages/goods/detail/index.wxml
index 35ae7d3..5da2f38 100644
--- a/pages/goods/detail/index.wxml
+++ b/pages/goods/detail/index.wxml
@@ -1,2 +1,38 @@
-
+
+
+
+
+
+
+ ¥299
+ ¥399
+
+
+ 亲爱的/情人节网红款/19枝亲爱的/情人节网红款/19枝亲爱的/情人节网红款/19枝
+ 用最温暖的最有情的心意,用最温暖的最有情的心意,用最温暖的最有情的心意,用最温暖的最有情的心意,用最温暖的最有情的心意,用最温暖的最有情的心意,
+
+
+
+
+
+
+
+
diff --git a/pages/goods/detail/index.wxss b/pages/goods/detail/index.wxss
index ac87adb..a9dafb5 100644
--- a/pages/goods/detail/index.wxss
+++ b/pages/goods/detail/index.wxss
@@ -1 +1,113 @@
/* pages/goods/detail/index.wxss */
+.goods-detail {
+ height: 100%;
+}
+
+.banner-img {
+ width: 100%;
+ height: 245px;
+}
+.banner-img .img {
+ width: 100%;
+}
+
+.content {
+ margin: 0 20px;
+ background: white;
+ padding: 20px;
+ position: relative;
+ border-radius: 20px;
+ top: -40px;
+}
+
+.price {
+ display: flex;
+}
+
+.price .price-num {
+ font-size: 18px;
+ color: #fa4126;
+ font-weight: bold;
+}
+
+.price .price-origin-num {
+ font-size: 12px;
+ color: #b4babf;
+ margin-left: 4px;
+ text-decoration: line-through;
+ margin-top: 6px;
+}
+
+.title {
+ font-size: 18px;
+ font-weight: bold;
+}
+
+.desc {
+ font-size: 12px;
+ color: #999999;
+}
+
+.detail {
+ margin: -20px 20px 20px 20px;
+ background: white;
+ padding: 20px;
+ border-radius: 20px;
+}
+
+.footer {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ background-color: #fff;
+ padding-bottom: env(safe-area-inset-bottom);
+}
+.flex {
+ display: flex;
+}
+
+.flex-between {
+ justify-content: space-between;
+}
+
+.footer-cont {
+ background-color: #fff;
+ padding: 16rpx;
+}
+
+.bottom-operate-left {
+ width: 100%;
+ justify-content: space-around;
+}
+.icon-wrap {
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+.icon-wrap text {
+ font-size: 10px;
+ color: #666;
+}
+
+.bar-separately,
+.bar-buy {
+ width: 254rpx;
+ height: 80rpx;
+ color: #fff;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.bar-separately {
+ background: #ffece9;
+ color: #fa4126;
+ border-radius: 40rpx 0 0 40rpx;
+}
+
+.bar-buy {
+ background-color: #fa4126;
+ border-radius: 0rpx 40rpx 40rpx 0rpx;
+}
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
new file mode 100644
index 0000000..a755d3c
--- /dev/null
+++ b/pages/order/detail/index.js
@@ -0,0 +1,66 @@
+// pages/order/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/detail/index.json b/pages/order/detail/index.json
new file mode 100644
index 0000000..d9c985d
--- /dev/null
+++ b/pages/order/detail/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "van-icon": "@vant/weapp/icon/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
new file mode 100644
index 0000000..e78e555
--- /dev/null
+++ b/pages/order/detail/index.wxml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ 添加收货地址
+
+
+
+ 甘肃省 甘南藏族自治州 碌曲县
+ 松日鼎盛大厦0层0号
+
+ 测试
+ 130839991443
+
+
+
+
+
+
+
+
+
+ 配送时间
+ 请选择配送时间
+
+
+
+
+
diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss
new file mode 100644
index 0000000..9954f09
--- /dev/null
+++ b/pages/order/detail/index.wxss
@@ -0,0 +1,104 @@
+/* pages/order/index.wxss */
+
+.flex {
+ display: flex;
+}
+
+.order-address {
+ justify-content: space-between;
+ padding: 24rpx 32rpx;
+}
+.address-card .order-address .title {
+ display: flex;
+ align-items: center;
+ height: 40rpx;
+ font-size: 28rpx;
+ font-weight: normal;
+ color: #999999;
+ line-height: 40rpx;
+}
+
+.address-card .order-address .detail {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ font-size: 36rpx;
+ font-weight: bold;
+ color: #333333;
+ line-height: 48rpx;
+ margin: 8rpx 0;
+}
+
+address-card .order-address .info {
+ height: 40rpx;
+ font-size: 28rpx;
+ font-weight: normal;
+ color: #333333;
+ line-height: 40rpx;
+}
+
+.address-card {
+ margin: 24rpx 0;
+ background-color: #fff;
+}
+
+.t-cell--middle {
+ align-items: center;
+}
+
+.t-cell {
+ position: relative;
+ display: flex;
+ box-sizing: border-box;
+ width: 100%;
+ padding: 24rpx 32rpx;
+ font-size: 32rpx;
+ line-height: 48rpx;
+ color: rgba(0, 0, 0, 0.9);
+ background-color: #ffffff;
+}
+
+.t-cell__left,
+.t-cell__right {
+ display: flex;
+ align-items: center;
+ font-size: 48rpx;
+ line-height: 48rpx;
+}
+
+.t-cell__title-text {
+ display: flex;
+}
+
+.t-cell__title-text {
+ margin-left: 6px;
+}
+.address-card .top-line {
+ width: 100%;
+ height: 6rpx;
+ background-color: #fff;
+ background-image: url(https://cdn-we-retail.ym.tencent.com/miniapp/order/stripe.png);
+ background-repeat: repeat-x;
+ display: block;
+}
+
+.goods-wraper {
+ background-color: white;
+ padding: 24rpx 32rpx;
+}
+
+.time-wraper view {
+ justify-content: space-between;
+ font-size: 14px;
+ color: #333333;
+}
+
+.title {
+ flex: 1;
+}
+
+.time {
+ margin-right: 4px;
+}
diff --git a/pages/order/list/index.js b/pages/order/list/index.js
new file mode 100644
index 0000000..1fac1dc
--- /dev/null
+++ b/pages/order/list/index.js
@@ -0,0 +1,66 @@
+// pages/order/list/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/list/index.json b/pages/order/list/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/order/list/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/order/list/index.wxml b/pages/order/list/index.wxml
new file mode 100644
index 0000000..0f0eb6f
--- /dev/null
+++ b/pages/order/list/index.wxml
@@ -0,0 +1,2 @@
+
+pages/order/list/index.wxml
diff --git a/pages/order/list/index.wxss b/pages/order/list/index.wxss
new file mode 100644
index 0000000..fb82b6e
--- /dev/null
+++ b/pages/order/list/index.wxss
@@ -0,0 +1 @@
+/* pages/order/list/index.wxss */
\ No newline at end of file
--
Gitee
From c0b980536401acf1730e532b13130bc7e003ce25 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Fri, 10 Feb 2023 11:28:06 +0800
Subject: [PATCH 07/17] =?UTF-8?q?feat:=20=E8=B7=AF=E7=94=B1=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 1 -
pages/order/detail/index.wxml | 10 +++++++++-
pages/order/detail/index.wxss | 10 ++++++++++
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/app.json b/app.json
index e078d63..8411622 100644
--- a/app.json
+++ b/app.json
@@ -7,7 +7,6 @@
"pages/goods/list/index",
"pages/goods/detail/index",
"pages/order/detail/index",
- "pages/order/list/list",
"pages/order/list/index",
"pages/address/add/index",
"pages/address/list/index"
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index e78e555..b218585 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -25,6 +25,14 @@
请选择配送时间
-
+
+ 贺卡备注
+
+
+
+
+
diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss
index 9954f09..21e5f6f 100644
--- a/pages/order/detail/index.wxss
+++ b/pages/order/detail/index.wxss
@@ -93,6 +93,7 @@ address-card .order-address .info {
justify-content: space-between;
font-size: 14px;
color: #333333;
+ margin-bottom: 12px;
}
.title {
@@ -102,3 +103,12 @@ address-card .order-address .info {
.time {
margin-right: 4px;
}
+
+.form-textarea {
+ border-radius: 12px;
+ background-color: #f7f8fa;
+ padding: 16px 12px;
+ font-size: 13px;
+ margin-top: 12px;
+ width: 94%;
+}
--
Gitee
From 1ab9124e948c1408195f533497906e7a66124c03 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Fri, 10 Feb 2023 14:14:29 +0800
Subject: [PATCH 08/17] =?UTF-8?q?feat:=20=E8=AE=A2=E5=8D=95=E4=B8=8B?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/order/detail/index.js | 38 ++++---------
pages/order/detail/index.json | 4 +-
pages/order/detail/index.wxml | 36 +++++++++++-
pages/order/detail/index.wxss | 100 +++++++++++++++++++++++++++++++++-
4 files changed, 146 insertions(+), 32 deletions(-)
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index a755d3c..bbc615e 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -1,66 +1,50 @@
// pages/order/index.js
Page({
-
/**
* 页面的初始数据
*/
data: {
-
+ price: 0,
},
+ onChangePrice() {},
/**
* 生命周期函数--监听页面加载
*/
- onLoad(options) {
-
- },
+ onLoad(options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
- onReady() {
-
- },
+ onReady() {},
/**
* 生命周期函数--监听页面显示
*/
- onShow() {
-
- },
+ onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
- onHide() {
-
- },
+ onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
- onUnload() {
-
- },
+ onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
- onPullDownRefresh() {
-
- },
+ onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
- onReachBottom() {
-
- },
+ onReachBottom() {},
/**
* 用户点击右上角分享
*/
- onShareAppMessage() {
-
- }
-})
\ No newline at end of file
+ onShareAppMessage() {},
+});
diff --git a/pages/order/detail/index.json b/pages/order/detail/index.json
index d9c985d..c052190 100644
--- a/pages/order/detail/index.json
+++ b/pages/order/detail/index.json
@@ -1,5 +1,7 @@
{
"usingComponents": {
- "van-icon": "@vant/weapp/icon/index"
+ "van-icon": "@vant/weapp/icon/index",
+ "van-stepper": "@vant/weapp/stepper/index",
+ "van-checkbox": "@vant/weapp/checkbox/index"
}
}
\ No newline at end of file
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index b218585..2514ab8 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -32,7 +32,41 @@
placeholder="写上您的祝福语,“署名处”为选填,如未填写,虚线框区域不会打印在贺卡上(请勿填写特殊符号或表情符号)" name="textarea"/>
-
+
+
+
+
+
+ [鲜花]韩式花篮/阳光使者
+ ¥99.0
+
+
+
+
+
+
+
+
+
+
+ [鲜花]韩式花篮/阳光使者
+ ¥99.0
+
+
+
+
+
+
+
+
+ 支付方式
+
+
+
+
diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss
index 21e5f6f..27e7d01 100644
--- a/pages/order/detail/index.wxss
+++ b/pages/order/detail/index.wxss
@@ -4,6 +4,10 @@
display: flex;
}
+.order {
+ padding-bottom: 80px;
+}
+
.order-address {
justify-content: space-between;
padding: 24rpx 32rpx;
@@ -31,7 +35,7 @@
margin: 8rpx 0;
}
-address-card .order-address .info {
+.address-card .order-address .info {
height: 40rpx;
font-size: 28rpx;
font-weight: normal;
@@ -89,11 +93,14 @@ address-card .order-address .info {
padding: 24rpx 32rpx;
}
-.time-wraper view {
+.time-wraper {
+ margin-bottom: 12px;
+}
+.time-wraper .title,
+.time-wraper .time {
justify-content: space-between;
font-size: 14px;
color: #333333;
- margin-bottom: 12px;
}
.title {
@@ -111,4 +118,91 @@ address-card .order-address .info {
font-size: 13px;
margin-top: 12px;
width: 94%;
+ height: 84px;
+}
+
+.goods-list {
+ padding: 12px 0;
+}
+
+.goods-list .goods-item {
+ display: flex;
+ margin-bottom: 12px;
+}
+
+.goods-item .img {
+ width: 64px;
+ height: 69px;
+}
+
+.img image {
+ width: 100%;
+ height: 100%;
+}
+
+.content {
+ flex: 1;
+ margin: 0 8px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+}
+
+.content .goods-title {
+ font-size: 14px;
+ color: #333;
+}
+
+.goods-price {
+ font-size: 18px;
+ font-weight: bold;
+}
+
+.num {
+ display: flex;
+ align-items: center;
+}
+
+.time-wraper .title {
+ flex: 1;
+ align-items: center;
+ margin-bottom: 0;
+}
+.time-wraper image {
+ margin-right: 4px;
+ height: 22px;
+ width: 22px;
+}
+
+.footer {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ background-color: #fff;
+ height: 112rpx;
+ padding-bottom: env(safe-area-inset-bottom);
+ justify-content: space-between;
+ align-items: center;
+}
+
+.left {
+ color: #fa4126;
+ font-weight: bold;
+ font-size: 63rpx;
+ line-height: 88rpx;
+ margin-left: 16px;
+}
+
+.right {
+ height: 80rpx;
+ width: 240rpx;
+ border-radius: 40rpx;
+ background-color: #fa4126;
+ color: #ffffff;
+ line-height: 80rpx;
+ font-weight: bold;
+ font-size: 28rpx;
+ text-align: center;
+ margin-right: 16px;
}
--
Gitee
From 2a7d3d8c5c18764ee227a34df9eedb2ae79ea736 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Fri, 10 Feb 2023 15:10:00 +0800
Subject: [PATCH 09/17] =?UTF-8?q?feat:=20=E5=9C=B0=E5=9D=80=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/address/list/index.json | 4 +-
pages/address/list/index.wxml | 31 +++++++++++-
pages/address/list/index.wxss | 94 ++++++++++++++++++++++++++++++++++-
3 files changed, 126 insertions(+), 3 deletions(-)
diff --git a/pages/address/list/index.json b/pages/address/list/index.json
index 8835af0..d9c985d 100644
--- a/pages/address/list/index.json
+++ b/pages/address/list/index.json
@@ -1,3 +1,5 @@
{
- "usingComponents": {}
+ "usingComponents": {
+ "van-icon": "@vant/weapp/icon/index"
+ }
}
\ No newline at end of file
diff --git a/pages/address/list/index.wxml b/pages/address/list/index.wxml
index ffbe0e6..1d07c56 100644
--- a/pages/address/list/index.wxml
+++ b/pages/address/list/index.wxml
@@ -1,2 +1,31 @@
-pages/address/list/index.wxml
+
+
+ 我的收货地址
+
+
+
+
+ 甘肃省甘南藏族自治州碌曲县松日鼎盛大厦0层0号
+
+ 家
+ 测试用户176****5678
+
+
+
+
+
+
+ 甘肃省甘南藏族自治州碌曲县松日鼎盛大厦0层0号
+
+ 公司
+ 测试用户176****5678
+
+
+
+
+
+
+
diff --git a/pages/address/list/index.wxss b/pages/address/list/index.wxss
index 24cad04..4654b6b 100644
--- a/pages/address/list/index.wxss
+++ b/pages/address/list/index.wxss
@@ -1 +1,93 @@
-/* pages/address/list/index.wxss */
\ No newline at end of file
+/* pages/address/list/index.wxss */
+
+.address-list {
+ height: 100vh;
+}
+
+.flex {
+ display: flex;
+}
+
+.title {
+ font-size: 12px;
+ padding: 12px;
+ color: #999999;
+}
+
+.address-info {
+ font-size: 16px;
+ color: #333;
+ margin-bottom: 8px;
+}
+
+.user-info {
+ font-size: 14px;
+ color: #999;
+}
+.list-warpper {
+ background-color: #fff;
+ padding: 0 12px;
+}
+
+.list-item::after {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 32rpx;
+ width: 200%;
+ height: 2rpx;
+ transform: scale(0.5);
+ transform-origin: 0 0;
+ box-sizing: border-box;
+ border-bottom: #e5e5e5 2rpx solid;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+ border-bottom-color: rgb(229, 229, 229);
+}
+
+.list-warpper .list-item {
+ align-items: center;
+ padding: 20px;
+ justify-content: space-between;
+}
+
+.list-warpper .list-item:not(:last-child) {
+ border-bottom: #e5e5e5 2rpx solid;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+ border-bottom-color: rgb(229, 229, 229);
+}
+
+.tag {
+ display: inline-block;
+ font-size: 12px;
+ padding: 0rpx 8rpx;
+ background: #f0f1ff;
+ color: #5a66ff;
+}
+
+.info {
+ margin-right: 16px;
+}
+
+.footer {
+ position: fixed;
+ width: 100%;
+ left: 0;
+ bottom: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding-bottom: env(safe-area-inset-bottom);
+}
+
+.btn {
+ width: 76%;
+ line-height: 80rpx;
+ font-weight: bold;
+ font-size: 28rpx;
+ text-align: center;
+ border-radius: 40rpx;
+ background-color: #fa4126;
+ color: #ffffff;
+}
--
Gitee
From 18437025cdc2903363bfbd646cbf47dda87cb55e Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Fri, 10 Feb 2023 16:10:36 +0800
Subject: [PATCH 10/17] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=9C=B0?=
=?UTF-8?q?=E5=9D=80=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 2 +-
pages/address/add/index.js | 37 ++++++++++--------------------------
pages/address/add/index.json | 9 ++++++++-
pages/address/add/index.wxml | 37 +++++++++++++++++++++++++++++++++++-
pages/address/add/index.wxss | 17 ++++++++++++++++-
5 files changed, 71 insertions(+), 31 deletions(-)
diff --git a/app.json b/app.json
index 8411622..e86234c 100644
--- a/app.json
+++ b/app.json
@@ -14,7 +14,7 @@
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#9C0211",
- "navigationBarTitleText": "Weixin",
+ "navigationBarTitleText": "慕尚花坊",
"navigationBarTextStyle": "white"
},
"tabBar": {
diff --git a/pages/address/add/index.js b/pages/address/add/index.js
index 47650dd..a883ed9 100644
--- a/pages/address/add/index.js
+++ b/pages/address/add/index.js
@@ -1,66 +1,49 @@
// pages/address/add/index.js
Page({
-
/**
* 页面的初始数据
*/
data: {
-
+ radio: '1',
},
/**
* 生命周期函数--监听页面加载
*/
- onLoad(options) {
-
- },
+ onLoad(options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
- onReady() {
-
- },
+ onReady() {},
/**
* 生命周期函数--监听页面显示
*/
- onShow() {
-
- },
+ onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
- onHide() {
-
- },
+ onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
- onUnload() {
-
- },
+ onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
- onPullDownRefresh() {
-
- },
+ onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
- onReachBottom() {
-
- },
+ onReachBottom() {},
/**
* 用户点击右上角分享
*/
- onShareAppMessage() {
-
- }
-})
\ No newline at end of file
+ onShareAppMessage() {},
+});
diff --git a/pages/address/add/index.json b/pages/address/add/index.json
index 8835af0..81472b1 100644
--- a/pages/address/add/index.json
+++ b/pages/address/add/index.json
@@ -1,3 +1,10 @@
{
- "usingComponents": {}
+ "usingComponents": {
+ "van-cell": "@vant/weapp/cell/index",
+ "van-cell-group": "@vant/weapp/cell-group/index",
+ "van-field": "@vant/weapp/field/index",
+ "van-radio": "@vant/weapp/radio/index",
+ "van-radio-group": "@vant/weapp/radio-group/index",
+ "van-button": "@vant/weapp/button/index"
+ }
}
\ No newline at end of file
diff --git a/pages/address/add/index.wxml b/pages/address/add/index.wxml
index 875ec95..e3829fe 100644
--- a/pages/address/add/index.wxml
+++ b/pages/address/add/index.wxml
@@ -1,2 +1,37 @@
-pages/address/add/index.wxml
+
+
+
+
\ No newline at end of file
diff --git a/pages/address/add/index.wxss b/pages/address/add/index.wxss
index d176586..95c3d71 100644
--- a/pages/address/add/index.wxss
+++ b/pages/address/add/index.wxss
@@ -1 +1,16 @@
-/* pages/address/add/index.wxss */
\ No newline at end of file
+/* pages/address/add/index.wxss */
+
+.address-detail {
+ height: 100vh;
+}
+.flex {
+ display: flex;
+}
+.form-content {
+ margin-top: 16px;
+}
+
+.footer-btn {
+ margin-top: 20px;
+ padding: 0 30px;
+}
--
Gitee
From 5e78b7f413f29d100d66d7860d1bd457ef6b98d2 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Fri, 10 Feb 2023 22:11:55 +0800
Subject: [PATCH 11/17] =?UTF-8?q?feat:=20reqeust=E8=AF=B7=E6=B1=82?=
=?UTF-8?q?=E6=B5=8B=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 3 ++-
pages/login/index.js | 24 ++++++++++++++++++++++++
pages/login/index.json | 3 +++
pages/login/index.wxml | 4 ++++
pages/login/index.wxss | 1 +
project.config.json | 2 +-
6 files changed, 35 insertions(+), 2 deletions(-)
create mode 100644 pages/login/index.js
create mode 100644 pages/login/index.json
create mode 100644 pages/login/index.wxml
create mode 100644 pages/login/index.wxss
diff --git a/app.json b/app.json
index e86234c..e31de73 100644
--- a/app.json
+++ b/app.json
@@ -9,7 +9,8 @@
"pages/order/detail/index",
"pages/order/list/index",
"pages/address/add/index",
- "pages/address/list/index"
+ "pages/address/list/index",
+ "pages/login/index"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/pages/login/index.js b/pages/login/index.js
new file mode 100644
index 0000000..fa321bf
--- /dev/null
+++ b/pages/login/index.js
@@ -0,0 +1,24 @@
+// pages/login/index.js
+Page({
+ data: {
+ userInfo: {},
+ hasUserInfo: false,
+ canIUseGetUserProfile: false,
+ },
+ onLoad() {},
+ getUserProfile(e) {
+ wx.login({
+ success: (res) => {
+ console.log(res.code);
+
+ wx.request({
+ url: `https://gmall-prod.atguigu.cn/mall-api/weixin/wxLogin/${res.code}`,
+ method: 'GET',
+ success(res) {
+ console.log(res);
+ },
+ });
+ },
+ });
+ },
+});
diff --git a/pages/login/index.json b/pages/login/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/login/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/login/index.wxml b/pages/login/index.wxml
new file mode 100644
index 0000000..cb2459a
--- /dev/null
+++ b/pages/login/index.wxml
@@ -0,0 +1,4 @@
+
+
+ 获取头像昵称
+
\ No newline at end of file
diff --git a/pages/login/index.wxss b/pages/login/index.wxss
new file mode 100644
index 0000000..0681818
--- /dev/null
+++ b/pages/login/index.wxss
@@ -0,0 +1 @@
+/* pages/login/index.wxss */
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
index 74ae95e..9639937 100644
--- a/project.config.json
+++ b/project.config.json
@@ -50,7 +50,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.19.4",
- "appid": "wx566be3b9e68287c9",
+ "appid": "wx42b3c92e8c28e85b",
"projectname": "miniprogram-92",
"condition": {},
"editorSetting": {
--
Gitee
From 3ae18555859863fd9113afd0ea96b833710645b4 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Sat, 11 Feb 2023 21:15:53 +0800
Subject: [PATCH 12/17] =?UTF-8?q?feat:=20wx.request=E5=B0=81=E8=A3=85?=
=?UTF-8?q?=E5=92=8C=E4=BD=BF=E7=94=A8=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/category/category.js | 2 +-
pages/index/index.js | 56 +++++++++++++++++++----
pages/index/index.wxml | 2 +-
pages/login/index.js | 16 ++++---
utils/api.js | 25 ++++++++++
utils/request.js | 94 ++++++++++++++++++++++++++++++++++++++
6 files changed, 176 insertions(+), 19 deletions(-)
create mode 100644 utils/api.js
create mode 100644 utils/request.js
diff --git a/pages/category/category.js b/pages/category/category.js
index b44d505..9705d20 100644
--- a/pages/category/category.js
+++ b/pages/category/category.js
@@ -1,4 +1,4 @@
-import { getCategoryList } from '../..//modal/category';
+import { getCategoryList } from '../../modal/category';
Page({
data: {
list: getCategoryList,
diff --git a/pages/index/index.js b/pages/index/index.js
index 8b877f2..7407977 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -1,18 +1,54 @@
import { backgroundList, banner } from '../../modal/swiper';
import { categorylist } from '../../modal/category';
-Component({
- pageLifetimes: {
- show() {
- if (typeof this.getTabBar === 'function' && this.getTabBar()) {
- this.getTabBar().setData({
- selected: 0,
- });
- }
- },
+import { findBanner } from '../../utils/api';
+Page({
+ onShow() {
+ if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+ this.getTabBar().setData({
+ selected: 1,
+ });
+ }
},
data: {
- background: backgroundList,
+ bannerList: backgroundList,
category: categorylist,
banner: banner,
},
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.getBannerList();
+ },
+
+ /**
+ * 获取轮播图
+ */
+
+ async getBannerList() {
+ const res = await findBanner();
+ console.log(res);
+ this.bannerList = res.data;
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {},
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {},
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {},
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {},
});
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index f29af15..2284b30 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -10,7 +10,7 @@
interval="{{2000}}"
duration="{{500}}"
>
-
+
diff --git a/pages/login/index.js b/pages/login/index.js
index fa321bf..b2ead75 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -1,4 +1,5 @@
// pages/login/index.js
+import { login } from '../../utils/api';
Page({
data: {
userInfo: {},
@@ -10,13 +11,14 @@ Page({
wx.login({
success: (res) => {
console.log(res.code);
-
- wx.request({
- url: `https://gmall-prod.atguigu.cn/mall-api/weixin/wxLogin/${res.code}`,
- method: 'GET',
- success(res) {
- console.log(res);
- },
+ const { code } = res;
+ login(code).then((res) => {
+ console.log(res);
+ wx.showToast({
+ title: '登陆成功',
+ });
+ wx.setStorageSync('token', res.data.token);
+ wx.switchTab({ url: '/pages/login/index' });
});
},
});
diff --git a/utils/api.js b/utils/api.js
new file mode 100644
index 0000000..8b142e5
--- /dev/null
+++ b/utils/api.js
@@ -0,0 +1,25 @@
+import { request } from './request';
+
+/**
+ * @description: 登陆
+ * @param {*} code
+ * @returns {*}
+ */
+export const login = (code) => {
+ return request({
+ url: `/mall-api/weixin/wxLogin/${code}`,
+ method: 'GET',
+ });
+};
+
+/**
+ * @description: 获取轮播图
+ * @returns {*}
+ */
+
+export const findBanner = () => {
+ return request({
+ url: `/mall-api/index/findBanner`,
+ method: 'GET',
+ });
+};
diff --git a/utils/request.js b/utils/request.js
new file mode 100644
index 0000000..2e31d4e
--- /dev/null
+++ b/utils/request.js
@@ -0,0 +1,94 @@
+/*
+ * @Author: 朽木白
+ * @Date: 2023-02-10 23:11:51
+ * @LastEditors: 1547702880@@qq.com
+ * @LastEditTime: 2023-02-11 21:08:38
+ * @Description: wx.request
+ * @docs: https://blog.csdn.net/qq_23073811/article/details/127387089
+ */
+
+// 公共的请求地址
+const apiUrl = 'https://gmall-prod.atguigu.cn';
+
+/**
+ * @description: 封装微信请求方法
+ * @param {*} params
+ * @returns {*}
+ */
+export const request = (params) => {
+ let url = params.url;
+ let data = params.data;
+ let method = params.method;
+ let header = {
+ 'Content-Type': 'application/json',
+ };
+
+ // 鉴权验证,获取登录之后后端返回的token,存在即在头部Authorization写token
+ if (wx.getStorageSync('token')) {
+ header.Authorization = wx.getStorageSync('token');
+ // header.token = wx.getStorageSync('token');
+ }
+ return new Promise((resolve, reject) => {
+ wx.request({
+ url: apiUrl + url,
+ method: method,
+ data: data, // 请求参数
+ header: header, // 头部
+ success(res) {
+ // 请求成功
+ // 判断状态码---errCode状态根据后端定义来判断
+ if (res.statusCode < 399) {
+ if (res.data.code === 208) {
+ wx.showModal({
+ title: '提示',
+ content: '请登录',
+ showCancel: false,
+ success(res) {
+ wx.navigateTo({
+ url: '/pages/login/index',
+ });
+ },
+ });
+ reject(res.data);
+ }
+ resolve(res.data);
+ } else {
+ // 其他异常
+ switch (res.statusCode) {
+ case 404:
+ wx.showToast({
+ title: '未知异常',
+ duration: 2000,
+ });
+ break;
+ default:
+ wx.showToast({
+ title: '请重试...',
+ duration: 2000,
+ });
+ break;
+ }
+ reject('未知错误,请稍后再试');
+ }
+ },
+ fail(err) {
+ if (err.errMsg.indexOf('request:fail') !== -1) {
+ wx.showToast({
+ title: '网络异常',
+ icon: 'error',
+ duration: 2000,
+ });
+ } else {
+ wx.showToast({
+ title: '未知异常',
+ duration: 2000,
+ });
+ }
+ reject(err);
+ },
+ complete() {
+ wx.hideLoading();
+ },
+ });
+ });
+};
--
Gitee
From 2252c61cd3a2d2d5c146645d03f0e19af681f332 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Sat, 11 Feb 2023 22:16:07 +0800
Subject: [PATCH 13/17] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=EF=BC=8C=E5=88=86=E7=B1=BB=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/goods-card/index.js | 15 ++--
components/goods-card/index.wxml | 10 +--
components/goods-card/index.wxss | 3 +
pages/category/category.js | 21 ++++-
pages/index/components/goods-list/index.js | 19 +++--
pages/index/components/goods-list/index.wxml | 6 +-
pages/index/components/procate/index.js | 19 +++--
pages/index/components/procate/index.wxml | 4 +-
pages/index/index.js | 80 ++++++++++++++++----
pages/index/index.wxml | 8 +-
utils/api.js | 47 ++++++++++--
11 files changed, 168 insertions(+), 64 deletions(-)
diff --git a/components/goods-card/index.js b/components/goods-card/index.js
index 42ca51a..442933c 100644
--- a/components/goods-card/index.js
+++ b/components/goods-card/index.js
@@ -4,20 +4,19 @@ Component({
* 组件的属性列表
*/
properties: {
-
+ item: {
+ type: Object,
+ value: {},
+ },
},
/**
* 组件的初始数据
*/
- data: {
-
- },
+ data: {},
/**
* 组件的方法列表
*/
- methods: {
-
- }
-})
+ methods: {},
+});
diff --git a/components/goods-card/index.wxml b/components/goods-card/index.wxml
index 2f54b1a..aecee87 100644
--- a/components/goods-card/index.wxml
+++ b/components/goods-card/index.wxml
@@ -2,14 +2,14 @@
-
+
- 亲爱的/情人节网红款/19枝
- 情人节新品
+ {{item.name}}
+ {{item.floralLanguage}}
- ¥399
- ¥499
+ ¥{{item.price}}
+ ¥{{item.marketPrice}}
diff --git a/components/goods-card/index.wxss b/components/goods-card/index.wxss
index cbd4ff7..9acb2ed 100644
--- a/components/goods-card/index.wxss
+++ b/components/goods-card/index.wxss
@@ -35,6 +35,9 @@
padding-bottom: 3px;
font-size: 12px;
color: #71797f;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
.product-item-info-bottom {
diff --git a/pages/category/category.js b/pages/category/category.js
index 9705d20..954635d 100644
--- a/pages/category/category.js
+++ b/pages/category/category.js
@@ -1,7 +1,7 @@
-import { getCategoryList } from '../../modal/category';
+import { findCategoryTree } from '../../utils/api';
Page({
data: {
- list: getCategoryList,
+ list: [],
},
onShow() {
@@ -11,6 +11,23 @@ Page({
});
}
},
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.getCategoryTree();
+ },
+
+ /**
+ * 分类层级
+ */
+ async getCategoryTree() {
+ const res = await findCategoryTree();
+ this.setData({
+ list: res.data,
+ });
+ },
onChange() {
wx.navigateTo({
url: '/pages/goods/list/index',
diff --git a/pages/index/components/goods-list/index.js b/pages/index/components/goods-list/index.js
index d94a26b..703e8de 100644
--- a/pages/index/components/goods-list/index.js
+++ b/pages/index/components/goods-list/index.js
@@ -4,20 +4,23 @@ Component({
* 组件的属性列表
*/
properties: {
-
+ title: {
+ type: String,
+ value: '标题',
+ },
+ list: {
+ type: Array,
+ value: [],
+ },
},
/**
* 组件的初始数据
*/
- data: {
-
- },
+ data: {},
/**
* 组件的方法列表
*/
- methods: {
-
- }
-})
+ methods: {},
+});
diff --git a/pages/index/components/goods-list/index.wxml b/pages/index/components/goods-list/index.wxml
index 563d7f6..d399607 100644
--- a/pages/index/components/goods-list/index.wxml
+++ b/pages/index/components/goods-list/index.wxml
@@ -1,11 +1,9 @@
- 送恋人/爱情鲜花
+ {{title}}
-
-
-
+
查看更多
diff --git a/pages/index/components/procate/index.js b/pages/index/components/procate/index.js
index 6edc8e9..2baedeb 100644
--- a/pages/index/components/procate/index.js
+++ b/pages/index/components/procate/index.js
@@ -9,14 +9,13 @@ Component({
value: [],
},
},
-
- /**
- * 组件的初始数据
- */
- data: {},
-
- /**
- * 组件的方法列表
- */
- methods: {},
+ data: {
+ categoryList: [],
+ },
+ pageLifetimes: {
+ // 组件所在页面的生命周期函数
+ show: function () {},
+ hide: function () {},
+ resize: function () {},
+ },
});
diff --git a/pages/index/components/procate/index.wxml b/pages/index/components/procate/index.wxml
index 7bee75d..f35ffc5 100644
--- a/pages/index/components/procate/index.wxml
+++ b/pages/index/components/procate/index.wxml
@@ -6,8 +6,8 @@
wx:key="index"
>
-
- {{item.text}}
+
+ {{item.name}}
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index 7407977..827a679 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -1,18 +1,17 @@
import { backgroundList, banner } from '../../modal/swiper';
-import { categorylist } from '../../modal/category';
-import { findBanner } from '../../utils/api';
+import {
+ findBanner,
+ findCategoryFirstLevel,
+ findListGoods,
+ findRecommendGoods,
+} from '../../utils/api';
Page({
- onShow() {
- if (typeof this.getTabBar === 'function' && this.getTabBar()) {
- this.getTabBar().setData({
- selected: 1,
- });
- }
- },
data: {
bannerList: backgroundList,
- category: categorylist,
+ categoryList: [],
banner: banner,
+ loveList: [],
+ recommendList: [],
},
/**
@@ -20,27 +19,76 @@ Page({
*/
onLoad(options) {
this.getBannerList();
+ this.getCategoryFirstLevel();
+ this.getListGoods();
+ this.getRecommendGoods();
},
/**
* 获取轮播图
*/
-
async getBannerList() {
const res = await findBanner();
- console.log(res);
- this.bannerList = res.data;
+ this.setData({
+ bannerList: res.data,
+ });
},
/**
- * 生命周期函数--监听页面初次渲染完成
+ * 获取一级分类
*/
- onReady() {},
+ async getCategoryFirstLevel() {
+ this.categoryList = [1, 2, 3];
+ const res = await findCategoryFirstLevel();
+ const list = res.data.map((item, index) => {
+ // 分类前五个和后五个样式不一样,区别处理
+ if (index > 4) {
+ item['small'] = true;
+ }
+ return item;
+ });
+
+ this.setData({
+ categoryList: list,
+ });
+ },
+
+ /**
+ * 获取猜你喜欢
+ */
+ async getListGoods() {
+ const res = await findListGoods();
+ this.setData({
+ loveList: res.data,
+ });
+ },
+
+ /**
+ * 获取人气推荐
+ */
+ async getRecommendGoods() {
+ const res = await findRecommendGoods();
+ console.log('recommendList', res);
+ this.setData({
+ recommendList: res.data,
+ });
+ },
/**
* 生命周期函数--监听页面显示
*/
- onShow() {},
+ onShow() {
+ if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+ this.getTabBar().setData({
+ selected: 0,
+ });
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {},
/**
* 生命周期函数--监听页面隐藏
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 2284b30..cfd839e 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -12,19 +12,19 @@
>
-
+
-
+
-
-
+
+
diff --git a/utils/api.js b/utils/api.js
index 8b142e5..dcaaa4d 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -1,9 +1,7 @@
import { request } from './request';
/**
- * @description: 登陆
- * @param {*} code
- * @returns {*}
+ * 登陆
*/
export const login = (code) => {
return request({
@@ -13,8 +11,7 @@ export const login = (code) => {
};
/**
- * @description: 获取轮播图
- * @returns {*}
+ * 获取轮播图
*/
export const findBanner = () => {
@@ -23,3 +20,43 @@ export const findBanner = () => {
method: 'GET',
});
};
+
+/**
+ * 获取一级分类
+ */
+export const findCategoryFirstLevel = () => {
+ return request({
+ url: `/mall-api/index/findCategory1`,
+ method: 'GET',
+ });
+};
+
+/**
+ * 猜你喜欢
+ */
+export const findListGoods = () => {
+ return request({
+ url: `/mall-api/index/findListGoods`,
+ method: 'GET',
+ });
+};
+
+/**
+ * 人气推荐
+ */
+export const findRecommendGoods = () => {
+ return request({
+ url: `/mall-api/index/findRecommendGoods`,
+ method: 'GET',
+ });
+};
+
+/**
+ * 分类层级
+ */
+export const findCategoryTree = () => {
+ return request({
+ url: `/mall-api/index/findCategoryTree`,
+ method: 'GET',
+ });
+};
--
Gitee
From de50c9ad5aeff495c2000b2527433323b8a74f53 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Sat, 11 Feb 2023 22:24:58 +0800
Subject: [PATCH 14/17] =?UTF-8?q?feat:=20=E5=95=86=E5=93=81=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/filter/index.wxml | 13 +++++--------
pages/goods/list/index.wxml | 2 --
utils/api.js | 10 ++++++++++
3 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/components/filter/index.wxml b/components/filter/index.wxml
index 6cbae59..5116923 100644
--- a/components/filter/index.wxml
+++ b/components/filter/index.wxml
@@ -5,6 +5,9 @@
综合
+
+ 综合
+
价格
@@ -22,14 +25,8 @@
/>
-
- 筛选
-
+
+ 新品
diff --git a/pages/goods/list/index.wxml b/pages/goods/list/index.wxml
index 272b982..abb0ec3 100644
--- a/pages/goods/list/index.wxml
+++ b/pages/goods/list/index.wxml
@@ -14,8 +14,6 @@
-
-
\ No newline at end of file
diff --git a/utils/api.js b/utils/api.js
index dcaaa4d..2dd2887 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -60,3 +60,13 @@ export const findCategoryTree = () => {
method: 'GET',
});
};
+
+/**
+ * 商品列表
+ */
+export const findGoodsList = (params) => {
+ return request({
+ url: `/mall-api/index/findCategoryTree`,
+ method: 'GET',
+ });
+};
--
Gitee
From 955feb0e3b0be4f6c63fd4fc0d36ef73c8ced149 Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Sun, 12 Feb 2023 21:47:43 +0800
Subject: [PATCH 15/17] =?UTF-8?q?feat:=20=E8=B4=AD=E7=89=A9=E8=BD=A6?=
=?UTF-8?q?=E5=A2=9E=E5=88=A0=E6=94=B9=E6=9F=A5=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/filter-group/index.js | 34 --------
components/filter-group/index.json | 6 --
components/filter-group/index.wxml | 20 -----
components/filter-group/index.wxss | 40 ---------
components/goods-card/index.wxml | 2 +-
pages/cart/cart.js | 134 +++++++++++++++++++++++++++--
pages/cart/cart.json | 5 +-
pages/cart/cart.wxml | 73 ++++++++++------
pages/cart/cart.wxss | 48 +++++++++++
pages/goods/detail/index.js | 77 ++++++++++-------
pages/goods/detail/index.json | 7 +-
pages/goods/detail/index.wxml | 62 +++++++++----
pages/goods/detail/index.wxss | 69 +++++++++++++++
pages/goods/list/index.js | 22 ++++-
pages/goods/list/index.json | 4 +-
pages/goods/list/index.wxml | 9 +-
pages/goods/list/index.wxss | 5 +-
pages/login/index.js | 1 -
utils/api.js | 66 +++++++++++++-
utils/request.js | 4 +-
20 files changed, 489 insertions(+), 199 deletions(-)
delete mode 100644 components/filter-group/index.js
delete mode 100644 components/filter-group/index.json
delete mode 100644 components/filter-group/index.wxml
delete mode 100644 components/filter-group/index.wxss
diff --git a/components/filter-group/index.js b/components/filter-group/index.js
deleted file mode 100644
index 0ab8c35..0000000
--- a/components/filter-group/index.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// components/filter-group/index.js
-Component({
- options: {
- multipleSlots: true,
- },
- properties: {
- show: {
- type: Boolean,
- observer(newVal, oldVal) {
- console.log('show', newVal, oldVal);
- this.setData({ visible: newVal });
- },
- },
- closeBtn: {
- type: Boolean,
- value: false,
- },
- },
-
- data: { visible: false },
-
- methods: {
- reset() {
- this.triggerEvent('reset');
- },
- confirm() {
- this.triggerEvent('confirm');
- },
- close() {
- this.triggerEvent('showFilterPopupClose');
- this.setData({ visible: false });
- },
- },
-});
diff --git a/components/filter-group/index.json b/components/filter-group/index.json
deleted file mode 100644
index b94c3e8..0000000
--- a/components/filter-group/index.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "component": true,
- "usingComponents": {
- "van-popup": "@vant/weapp/popup/index"
- }
-}
\ No newline at end of file
diff --git a/components/filter-group/index.wxml b/components/filter-group/index.wxml
deleted file mode 100644
index 8e3afef..0000000
--- a/components/filter-group/index.wxml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
- 重置
-
- 确定
-
-
-
-
diff --git a/components/filter-group/index.wxss b/components/filter-group/index.wxss
deleted file mode 100644
index 8940b5e..0000000
--- a/components/filter-group/index.wxss
+++ /dev/null
@@ -1,40 +0,0 @@
-/* components/filter-group/index.wxss */
-.content .filter-btns-wrap {
- width: 100%;
- position: absolute;
- bottom: calc(20rpx + env(safe-area-inset-bottom));
- display: flex;
- flex-direction: row;
- border-radius: 10rpx 0 0 10rpx;
- padding: 16rpx 32rpx;
- border-top: 1rpx solid #e5e5e5;
- box-sizing: border-box;
-}
-
-.filter-btn {
- flex: 1;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 28rpx;
- font-weight: 500;
- height: 80rpx;
-}
-
-.btn-reset {
- color: #fa4126;
- background: rgba(255, 255, 255, 1);
- position: relative;
- border: 1rpx solid #fa4126;
- border-radius: 84rpx 0 0 84rpx;
-}
-
-.btn-confirm {
- border-radius: 0 84rpx 84rpx 0;
- border: 1rpx solid #fa4126;
-}
-
-.btn-confirm {
- color: #fff;
- background: #fa4126;
-}
diff --git a/components/goods-card/index.wxml b/components/goods-card/index.wxml
index aecee87..d995744 100644
--- a/components/goods-card/index.wxml
+++ b/components/goods-card/index.wxml
@@ -1,6 +1,6 @@
-
+
diff --git a/pages/cart/cart.js b/pages/cart/cart.js
index 922b06d..3268323 100644
--- a/pages/cart/cart.js
+++ b/pages/cart/cart.js
@@ -1,23 +1,143 @@
+import {
+ findCartList,
+ deleteCart,
+ checkCart,
+ addToCart,
+ checkAllCart,
+} from '../../utils/api';
Page({
+ data: {
+ checked: true,
+ price: 0,
+ list: [],
+ totalCount: 0,
+ totalPrice: 0,
+ isCheckedAll: true,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {},
+
onShow() {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
selected: 2,
});
}
+ this.getCartList();
},
- data: {
- checked: true,
- price: 0,
+ /**
+ * 获取轮播图
+ */
+ async getCartList() {
+ const res = await findCartList();
+ this.setData({
+ list: res.data,
+ });
+ this.computedTotalCount();
+ this.computedTotalPrice();
+ this.getCheckAllStatus();
},
- onChange(event) {
- this.setData({
- checked: event.detail,
+ /**
+ * 修改选中状态
+ */
+ async onChangeCheck(event) {
+ const isChecked = event.detail ? 1 : 0;
+ const goodsId = event.target.dataset.goodsid;
+ await checkCart({
+ goodsId,
+ isChecked,
});
+ this.getCartList();
},
- onChangePrice(event) {
+ /**
+ * 修改购物车数量
+ */
+ async onChangeCount(event) {
console.log(event.detail);
+ const newCount = event.detail;
+ const goodsId = event.target.dataset.goodsid;
+ const originCount = event.target.dataset.count;
+ const count = newCount - originCount;
+
+ console.log(count, goodsId);
+ if (count > 0) {
+ await addToCart({
+ goodsId,
+ count,
+ });
+ this.getCartList();
+ }
+ },
+ /**
+ * 删除购物车
+ */
+ async handleDelCart(event) {
+ const goodsId = event.target.dataset.goodsid;
+ const res = await deleteCart(goodsId);
+ if (res.code == 200) {
+ wx.showToast({ title: '删除成功' });
+ this.getCartList();
+ }
+ },
+
+ /**
+ * 计算购物车总数量
+ */
+ computedTotalCount() {
+ let s = 0;
+ this.data.list.map((item) => {
+ return (s += item.count);
+ });
+ this.setData({ totalCount: s });
+ },
+ /**
+ * 计算购物车商品总价
+ */
+ computedTotalPrice() {
+ let s = 0;
+ const { list } = this.data;
+ list.forEach((e) => {
+ if (e.isChecked) {
+ const n = e.price * e.count;
+ console.log(n);
+ s = n + s;
+ }
+ });
+ this.setData({ totalPrice: s });
+ },
+ /**
+ * 判断是不是全选
+ */
+
+ /**
+ * 全选
+ */
+ async onChangeCheckAll(event) {
+ const status = event.detail;
+ const res = await checkAllCart(status ? 1 : 0);
+ if (res.code === 200) {
+ this.setData({
+ isCheckedAll: status,
+ });
+ this.getCartList();
+ }
+ },
+
+ /**
+ * 获取全选状态
+ */
+ getCheckAllStatus() {
+ this.setData({ isCheckedAll: true });
+ this.data.list.map((item) => {
+ if (!item.isChecked) {
+ this.setData({ isCheckedAll: false });
+ return;
+ }
+ });
},
});
diff --git a/pages/cart/cart.json b/pages/cart/cart.json
index d4a0602..9496b03 100644
--- a/pages/cart/cart.json
+++ b/pages/cart/cart.json
@@ -2,6 +2,9 @@
"usingComponents": {
"van-swipe-cell": "@vant/weapp/swipe-cell/index",
"van-checkbox": "@vant/weapp/checkbox/index",
- "van-stepper": "@vant/weapp/stepper/index"
+ "van-stepper": "@vant/weapp/stepper/index",
+ "van-submit-bar": "@vant/weapp/submit-bar/index",
+ "van-button": "@vant/weapp/button/index",
+ "van-icon": "@vant/weapp/icon/index"
}
}
\ No newline at end of file
diff --git a/pages/cart/cart.wxml b/pages/cart/cart.wxml
index d5ae1bf..7e15c4c 100644
--- a/pages/cart/cart.wxml
+++ b/pages/cart/cart.wxml
@@ -1,50 +1,67 @@
-
+
-
+
+
-
+
-
- 腾讯极光盒子4智能网络电视机顶盒6K千兆网络机顶盒4K高分辨率
-
+ {{item.name}}
¥
- 99.00
+ {{item.price}}
-
+
+
-
-
-
-
-
-
+
+
-
diff --git a/pages/cart/cart.wxss b/pages/cart/cart.wxss
index 7863168..5debbc8 100644
--- a/pages/cart/cart.wxss
+++ b/pages/cart/cart.wxss
@@ -2,8 +2,12 @@
height: 100vh;
}
+.flex {
+ display: flex;
+}
.cart-wrap {
padding-top: 20px;
+ padding-bottom: 100px;
background-color: white;
}
.goods-item {
@@ -61,8 +65,52 @@
font-size: 36rpx;
}
+.buy-btn {
+ display: flex;
+ align-items: center;
+}
+
+.buy-btn .del {
+ margin-right: 4px;
+}
+
.price .symbol {
font-size: 10px;
margin-right: 2px;
margin-top: 8px;
}
+
+.submit-footer {
+ position: fixed;
+ bottom: 56px;
+ left: 0;
+ width: 100%;
+ background-color: white;
+ padding: 12px 8px;
+ align-items: center;
+ justify-content: space-between;
+ z-index: 10;
+}
+
+.submit-footer .left {
+ /* flex: 1; */
+}
+
+.submit-footer .right {
+ flex: 1;
+ margin-right: 16px;
+ align-items: center;
+ justify-content: flex-end;
+}
+
+.total-wrapper {
+ color: #323233;
+ font-size: 13px;
+}
+
+.total-wrapper .total-price {
+ color: #ee0a24;
+ font-weight: 500;
+ font-size: 20px;
+ margin: 0 4px;
+}
diff --git a/pages/goods/detail/index.js b/pages/goods/detail/index.js
index df24173..f89eed0 100644
--- a/pages/goods/detail/index.js
+++ b/pages/goods/detail/index.js
@@ -1,66 +1,85 @@
// pages/goods/detail/index.js
+import { findGoodsDetail, addToCart } from '../../../utils/api';
Page({
-
/**
* 页面的初始数据
*/
data: {
-
+ goods: {},
+ show: false,
+ count: 1,
+ goodsId: '',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
-
+ this.setData({ goodsId: options.goodsId });
+ this.getGoodsDetail(options.goodsId);
},
/**
- * 生命周期函数--监听页面初次渲染完成
+ * 商品详情
*/
- onReady() {
-
+ async getGoodsDetail(goodsId) {
+ const res = await findGoodsDetail(goodsId);
+ this.setData({
+ goods: res.data,
+ });
},
/**
- * 生命周期函数--监听页面显示
+ * 事件:加入购物车
*/
- onShow() {
-
+ async handleAddCart() {
+ const { goodsId, count } = this.data;
+ if (count > 0) {
+ const res = await addToCart({
+ goodsId,
+ count,
+ });
+
+ console.log(res);
+
+ if (res.code === 200) {
+ wx.showToast({ title: '添加成功' });
+ this.setData({
+ show: false,
+ });
+ }
+ }
},
/**
- * 生命周期函数--监听页面隐藏
+ * 事件 打开action-sheet
*/
- onHide() {
-
+ onSHowSheet() {
+ this.setData({
+ show: true,
+ });
},
/**
- * 生命周期函数--监听页面卸载
+ * 事件,关闭action-sheet
*/
- onUnload() {
-
+ onClose() {
+ this.setData({ show: false, count: 1 });
},
/**
- * 页面相关事件处理函数--监听用户下拉动作
+ * 事件:修改商品数量
*/
- onPullDownRefresh() {
-
+ onChangeGoodsCount(event) {
+ this.setData({ count: event.detail });
},
/**
- * 页面上拉触底事件的处理函数
+ * 事件:立即购买
*/
- onReachBottom() {
-
+ handeGotoBuy() {
+ wx.navigateTo({
+ url: `/pages/order/detail/index?goodsId=${this.data.goodsId}`,
+ });
},
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
- }
-})
\ No newline at end of file
+});
diff --git a/pages/goods/detail/index.json b/pages/goods/detail/index.json
index d9c985d..c5dd391 100644
--- a/pages/goods/detail/index.json
+++ b/pages/goods/detail/index.json
@@ -1,5 +1,10 @@
{
"usingComponents": {
- "van-icon": "@vant/weapp/icon/index"
+ "van-icon": "@vant/weapp/icon/index",
+ "van-action-sheet": "@vant/weapp/action-sheet/index",
+ "van-cell": "@vant/weapp/cell/index",
+ "van-cell-group": "@vant/weapp/cell-group/index",
+ "van-stepper": "@vant/weapp/stepper/index",
+ "van-button": "@vant/weapp/button/index"
}
}
\ No newline at end of file
diff --git a/pages/goods/detail/index.wxml b/pages/goods/detail/index.wxml
index 5da2f38..f337b3f 100644
--- a/pages/goods/detail/index.wxml
+++ b/pages/goods/detail/index.wxml
@@ -1,38 +1,70 @@
-
+
- ¥299
- ¥399
+ ¥{{goods.price}}
+ ¥{{goods.marketPrice}}
- 亲爱的/情人节网红款/19枝亲爱的/情人节网红款/19枝亲爱的/情人节网红款/19枝
- 用最温暖的最有情的心意,用最温暖的最有情的心意,用最温暖的最有情的心意,用最温暖的最有情的心意,用最温暖的最有情的心意,用最温暖的最有情的心意,
+ {{goods.name}}
+ {{goods.floralLanguage}}
-
-
-
+
diff --git a/pages/goods/detail/index.wxss b/pages/goods/detail/index.wxss
index a9dafb5..3ad883b 100644
--- a/pages/goods/detail/index.wxss
+++ b/pages/goods/detail/index.wxss
@@ -111,3 +111,72 @@
background-color: #fa4126;
border-radius: 0rpx 40rpx 40rpx 0rpx;
}
+
+.sheet-wrapper {
+ padding: 16px;
+}
+.sheet-footer-btn {
+ padding: 16px;
+}
+
+.goods-item {
+ display: flex;
+ align-items: center;
+ padding: 0 32rpx 40rpx 0;
+}
+
+.goods-item .left {
+ width: 56px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.goods-item .mid {
+ width: 114px;
+ height: 125px;
+}
+
+.mid image {
+ height: 100%;
+}
+
+.goods-item .right {
+ height: 125px;
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ margin-left: 10px;
+}
+
+.right .title {
+ flex: 1;
+ flex-shrink: 0;
+ font-size: 28rpx;
+ color: #333;
+ line-height: 40rpx;
+ font-weight: 400;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ word-break: break-word;
+}
+
+.buy {
+ display: flex;
+ justify-content: space-between;
+}
+
+.price {
+ display: flex;
+ /* align-items: flex-end; */
+ color: #fa4126;
+ font-size: 36rpx;
+}
+
+.price .symbol {
+ font-size: 10px;
+ margin-right: 2px;
+ margin-top: 8px;
+}
diff --git a/pages/goods/list/index.js b/pages/goods/list/index.js
index b3ed59b..1d4b0e7 100644
--- a/pages/goods/list/index.js
+++ b/pages/goods/list/index.js
@@ -1,4 +1,5 @@
// pages/goods/list/index.js
+import { findGoodsList } from '../../../utils/api';
const initFilters = {
overall: 1,
sorts: '',
@@ -14,6 +15,9 @@ Page({
sorts: '',
overall: 1,
show: false,
+ page: 1,
+ limit: 10,
+ list: [],
},
showFilterPopup() {
@@ -31,7 +35,23 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
- onLoad(options) {},
+ onLoad(options) {
+ this.getGoodsList();
+ },
+
+ /**
+ * 商品列表
+ */
+ async getGoodsList() {
+ const params = {
+ page: this.data.page,
+ limit: this.data.limit,
+ };
+ const res = await findGoodsList(params);
+ this.setData({
+ list: res.data.records,
+ });
+ },
/**
* 生命周期函数--监听页面初次渲染完成
diff --git a/pages/goods/list/index.json b/pages/goods/list/index.json
index a976bdd..2fe0814 100644
--- a/pages/goods/list/index.json
+++ b/pages/goods/list/index.json
@@ -1,9 +1,7 @@
{
"usingComponents": {
"filter": "/components/filter/index",
- "filter-group": "/components/filter-group/index",
- "goods-card": "/components/goods-card/index",
- "van-popup": "@vant/weapp/popup/index"
+ "goods-card": "/components/goods-card/index"
},
"navigationBarTitleText": "商品列表"
}
\ No newline at end of file
diff --git a/pages/goods/list/index.wxml b/pages/goods/list/index.wxml
index abb0ec3..1e02203 100644
--- a/pages/goods/list/index.wxml
+++ b/pages/goods/list/index.wxml
@@ -4,16 +4,9 @@
-
- 12313
-
-
+
\ No newline at end of file
diff --git a/pages/goods/list/index.wxss b/pages/goods/list/index.wxss
index e2a65a7..8a20ac9 100644
--- a/pages/goods/list/index.wxss
+++ b/pages/goods/list/index.wxss
@@ -1 +1,4 @@
-/* pages/goods/list/index.wxss */
\ No newline at end of file
+/* pages/goods/list/index.wxss */
+.goods-list {
+ margin-top: 12px;
+}
diff --git a/pages/login/index.js b/pages/login/index.js
index b2ead75..ecb3575 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -13,7 +13,6 @@ Page({
console.log(res.code);
const { code } = res;
login(code).then((res) => {
- console.log(res);
wx.showToast({
title: '登陆成功',
});
diff --git a/utils/api.js b/utils/api.js
index 2dd2887..3b1684d 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -66,7 +66,71 @@ export const findCategoryTree = () => {
*/
export const findGoodsList = (params) => {
return request({
- url: `/mall-api/index/findCategoryTree`,
+ url: `/mall-api/goods/list/${params.page}/${params.limit}`,
+ method: 'GET',
+ data: params,
+ });
+};
+
+/**
+ * 商品详情
+ */
+export const findGoodsDetail = (goodsId) => {
+ return request({
+ url: `/mall-api/goods/${goodsId}`,
+ method: 'GET',
+ });
+};
+
+/**
+ * 购物车列表
+ */
+
+export const findCartList = () => {
+ return request({
+ url: `/mall-api/cart/getCartList`,
+ method: 'GET',
+ });
+};
+
+/**
+ * 加入购物车
+ */
+export const addToCart = (params) => {
+ return request({
+ url: `/mall-api/cart/addToCart/${params.goodsId}/${params.count}`,
+ method: 'GET',
+ });
+};
+
+/**
+ * 删除购物车
+ */
+
+export const deleteCart = (goodsId) => {
+ return request({
+ url: `/mall-api/cart/delete/${goodsId}`,
+ method: 'GET',
+ });
+};
+
+/**
+ * 选中与取消选中购物车
+ */
+export const checkCart = (params) => {
+ console.log(params);
+ return request({
+ url: `/mall-api/cart/checkCart/${params.goodsId}/${params.isChecked}`,
+ method: 'GET',
+ });
+};
+
+/**
+ * 全部选中与全部取消选中购物车商品
+ */
+export const checkAllCart = (isChecked) => {
+ return request({
+ url: `/mall-api/cart/checkAllCart/${isChecked}`,
method: 'GET',
});
};
diff --git a/utils/request.js b/utils/request.js
index 2e31d4e..2d28b88 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -2,7 +2,7 @@
* @Author: 朽木白
* @Date: 2023-02-10 23:11:51
* @LastEditors: 1547702880@@qq.com
- * @LastEditTime: 2023-02-11 21:08:38
+ * @LastEditTime: 2023-02-12 17:31:39
* @Description: wx.request
* @docs: https://blog.csdn.net/qq_23073811/article/details/127387089
*/
@@ -25,7 +25,7 @@ export const request = (params) => {
// 鉴权验证,获取登录之后后端返回的token,存在即在头部Authorization写token
if (wx.getStorageSync('token')) {
- header.Authorization = wx.getStorageSync('token');
+ header.token = wx.getStorageSync('token');
// header.token = wx.getStorageSync('token');
}
return new Promise((resolve, reject) => {
--
Gitee
From e5fed03c6b38eab2b27d9a78e05218e69cb338ee Mon Sep 17 00:00:00 2001
From: xiumubai <1547702880@qq.com>
Date: Sun, 12 Feb 2023 21:54:47 +0800
Subject: [PATCH 16/17] =?UTF-8?q?feat:=20=E8=B4=AD=E7=89=A9=E8=BD=A6?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/cart/cart.wxml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/pages/cart/cart.wxml b/pages/cart/cart.wxml
index 7e15c4c..b7d5868 100644
--- a/pages/cart/cart.wxml
+++ b/pages/cart/cart.wxml
@@ -49,10 +49,8 @@
- 合计:
-
- ¥{{totalPrice}}
-
+ 合计:
+ ¥{{totalPrice}}
Date: Sun, 12 Feb 2023 23:47:16 +0800
Subject: [PATCH 17/17] =?UTF-8?q?feat:=20=E5=9C=B0=E5=9D=80=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/address/add/index.js | 16 +++++++++++++
pages/address/add/index.json | 4 +++-
pages/address/add/index.wxml | 9 ++++++++
pages/address/list/index.wxml | 6 ++++-
pages/info/info.wxml | 12 +++++-----
utils/api.js | 42 +++++++++++++++++++++++++++++++++++
6 files changed, 82 insertions(+), 7 deletions(-)
diff --git a/pages/address/add/index.js b/pages/address/add/index.js
index a883ed9..fa53383 100644
--- a/pages/address/add/index.js
+++ b/pages/address/add/index.js
@@ -1,10 +1,13 @@
// pages/address/add/index.js
+import { areaList } from '@vant/area-data';
Page({
/**
* 页面的初始数据
*/
data: {
radio: '1',
+ show: false,
+ areaList,
},
/**
@@ -12,6 +15,19 @@ Page({
*/
onLoad(options) {},
+ /**
+ * 打开popup
+ */
+ onShowPopup() {
+ this.setData({ show: true });
+ },
+ /**
+ * 关闭popup
+ */
+ onClose() {
+ this.setData({ show: false });
+ },
+
/**
* 生命周期函数--监听页面初次渲染完成
*/
diff --git a/pages/address/add/index.json b/pages/address/add/index.json
index 81472b1..a50dbaa 100644
--- a/pages/address/add/index.json
+++ b/pages/address/add/index.json
@@ -5,6 +5,8 @@
"van-field": "@vant/weapp/field/index",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index",
- "van-button": "@vant/weapp/button/index"
+ "van-button": "@vant/weapp/button/index",
+ "van-popup": "@vant/weapp/popup/index",
+ "van-area": "@vant/weapp/area/index"
}
}
\ No newline at end of file
diff --git a/pages/address/add/index.wxml b/pages/address/add/index.wxml
index e3829fe..910a311 100644
--- a/pages/address/add/index.wxml
+++ b/pages/address/add/index.wxml
@@ -15,6 +15,7 @@
+
+
+
\ No newline at end of file
diff --git a/pages/address/list/index.wxml b/pages/address/list/index.wxml
index 1d07c56..5fc455a 100644
--- a/pages/address/list/index.wxml
+++ b/pages/address/list/index.wxml
@@ -26,6 +26,10 @@
diff --git a/pages/info/info.wxml b/pages/info/info.wxml
index 3e7476f..b210fa9 100644
--- a/pages/info/info.wxml
+++ b/pages/info/info.wxml
@@ -35,10 +35,12 @@
我的功能
-
-
- 地址管理
-
+
+
+
+ 地址管理
+
+
我的客服
@@ -69,6 +71,6 @@
-
+
diff --git a/utils/api.js b/utils/api.js
index 3b1684d..717fcd9 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -134,3 +134,45 @@ export const checkAllCart = (isChecked) => {
method: 'GET',
});
};
+
+/**
+ * 添加地址
+ */
+export const userAddressSave = (params) => {
+ return request({
+ url: `/mall-api/userAddress/save`,
+ method: 'POST',
+ data: params,
+ });
+};
+
+/**
+ * 修改地址
+ */
+export const userAddressUpdate = (params) => {
+ return request({
+ url: `/mall-api/userAddress/update`,
+ method: 'POST',
+ data: params,
+ });
+};
+
+/**
+ * 删除地址
+ */
+export const userAddressDelete = (id) => {
+ return request({
+ url: `/mall-api/userAddress/delete/${id}`,
+ method: 'GET',
+ });
+};
+
+/**
+ * 删除地址
+ */
+export const findUserAddress = (id) => {
+ return request({
+ url: `/mall-api/userAddress/findUserAddress/`,
+ method: 'GET',
+ });
+};
--
Gitee