From 535214091413d5411fabb42c0c3cccb474145d0a Mon Sep 17 00:00:00 2001
From: chen <2659004835@qq.com>
Date: Sat, 7 May 2022 19:26:04 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=B4=AD=E7=89=A9=E8=BD=A6?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E3=80=81=E4=BC=98=E5=8C=96tools.js=E4=B8=AD?=
=?UTF-8?q?=E7=BB=99=E6=95=B0=E5=AD=97=E6=B7=BB=E5=8A=A0=E4=B8=A4=E4=BD=8D?=
=?UTF-8?q?=E5=B0=8F=E6=95=B0=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
commons/icon-font.css | 20 +-
components/foot-tabs/foot-tab.vue | 4 +-
components/shopping-carts/cart-one.vue | 219 +++++++++++++++++++++
components/swiper-tab/swiper-tab-slide.vue | 2 +-
jsFile/tools.js | 10 +-
pages.json | 9 +
pages/tabbar/feedback/feedback.vue | 6 +-
pages/tabbar/project-list/project-list.vue | 21 +-
pagesA/shopping-cart/shopping-cart.vue | 30 +++
9 files changed, 306 insertions(+), 15 deletions(-)
create mode 100644 components/shopping-carts/cart-one.vue
create mode 100644 pagesA/shopping-cart/shopping-cart.vue
diff --git a/commons/icon-font.css b/commons/icon-font.css
index 6acb33b..6270de7 100644
--- a/commons/icon-font.css
+++ b/commons/icon-font.css
@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 3180711 */
- src: url('https://at.alicdn.com/t/font_3180711_mjqzq7x5vu.woff2?t=1649586677823') format('woff2'),
- url('https://at.alicdn.com/t/font_3180711_mjqzq7x5vu.woff?t=1649586677823') format('woff'),
- url('https://at.alicdn.com/t/font_3180711_mjqzq7x5vu.ttf?t=1649586677823') format('truetype');
+ src: url('https://at.alicdn.com/t/font_3180711_atv5gkgm4w4.woff2?t=1651830764889') format('woff2'),
+ url('https://at.alicdn.com/t/font_3180711_atv5gkgm4w4.woff?t=1651830764889') format('woff'),
+ url('https://at.alicdn.com/t/font_3180711_atv5gkgm4w4.ttf?t=1651830764889') format('truetype');
}
.icon {
@@ -13,6 +13,18 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-del:before {
+ content: "\e718";
+}
+
+.icon-cut:before {
+ content: "\e609";
+}
+
+.icon-add:before {
+ content: "\e60a";
+}
+
.icon-add-picture05:before {
content: "\e639";
}
@@ -113,7 +125,7 @@
content: "\e73f";
}
-.icon-shopp-cart:before {
+.icon-shop-cart:before {
content: "\e73d";
}
diff --git a/components/foot-tabs/foot-tab.vue b/components/foot-tabs/foot-tab.vue
index 8a2a6ee..4060358 100644
--- a/components/foot-tabs/foot-tab.vue
+++ b/components/foot-tabs/foot-tab.vue
@@ -84,7 +84,7 @@
{
iconPath: "/static/tabbar/icon-mo-fun.png",
selectedIconPath: "/static/tabbar/icon-select-fun.png",
- title:'项目列表'
+ title:'分类'
},
{
iconPath: "/static/tabbar/icon-scan.png",
@@ -94,7 +94,7 @@
{
iconPath: "/static/tabbar/icon-mo-news.png",
selectedIconPath: "/static/tabbar/icon-select-news.png",
- title:'意见反馈'
+ title:'商品列表'
},
{
iconPath: "/static/tabbar/icon-mo-person.png",
diff --git a/components/shopping-carts/cart-one.vue b/components/shopping-carts/cart-one.vue
new file mode 100644
index 0000000..2f3161f
--- /dev/null
+++ b/components/shopping-carts/cart-one.vue
@@ -0,0 +1,219 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+ {{item.content}}
+
+
+
+ ¥:{{$toolAll.tools.addXiaoShu(item.price)}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ifManage ? '管理' : '取消'}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/swiper-tab/swiper-tab-slide.vue b/components/swiper-tab/swiper-tab-slide.vue
index bcc9fcf..4f34c01 100644
--- a/components/swiper-tab/swiper-tab-slide.vue
+++ b/components/swiper-tab/swiper-tab-slide.vue
@@ -8,7 +8,7 @@
-
+
{{item1.title}}{{index1}}
diff --git a/jsFile/tools.js b/jsFile/tools.js
index aa21056..5a53b02 100644
--- a/jsFile/tools.js
+++ b/jsFile/tools.js
@@ -38,6 +38,12 @@ const tools = {
clearInterval(this.timer)
console.log('倒计时清空了');
},
+ /**
+ * @description 获取字符串中的数字
+ */
+ obtainCount(str) {
+ return parseInt(str.replace(/[^0-9]/ig,""))
+ },
/**
* @description 获取微信扫码后的结果,并解析
*/
@@ -119,13 +125,11 @@ const tools = {
* @description 整数添加.00,小数就不添加
*/
addXiaoShu(num){
- console.log(num,120);
+ // console.log(num,'添加小数点后两位小数');
let str = num.toString();
- if(str.length > 9){
str = str*1;
str = str.toFixed(2);
str = str+'';
- }
return str.includes('.') ? str : str = num + '.00';
},
// type:+加、-减、*乘、/除
diff --git a/pages.json b/pages.json
index 6fc2cf9..a1e7be7 100644
--- a/pages.json
+++ b/pages.json
@@ -61,6 +61,15 @@
"enablePullDownRefresh": false
}
+ }
+ ,{
+ "path" : "shopping-cart/shopping-cart",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
}
]
},
diff --git a/pages/tabbar/feedback/feedback.vue b/pages/tabbar/feedback/feedback.vue
index 0b90db6..5868061 100644
--- a/pages/tabbar/feedback/feedback.vue
+++ b/pages/tabbar/feedback/feedback.vue
@@ -1,6 +1,10 @@
-
+
+
+
+
+
diff --git a/pages/tabbar/project-list/project-list.vue b/pages/tabbar/project-list/project-list.vue
index 50d07cf..be47bfb 100644
--- a/pages/tabbar/project-list/project-list.vue
+++ b/pages/tabbar/project-list/project-list.vue
@@ -1,22 +1,35 @@
+
+
+
+
+
-
+
diff --git a/pagesA/shopping-cart/shopping-cart.vue b/pagesA/shopping-cart/shopping-cart.vue
new file mode 100644
index 0000000..eb24eef
--- /dev/null
+++ b/pagesA/shopping-cart/shopping-cart.vue
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+