From eb0faad7ecbff4006634ac8ab67c507ad4cbef14 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?=
<17633066053@163.com>
Date: Fri, 30 Sep 2022 09:58:08 +0800
Subject: [PATCH 01/22] =?UTF-8?q?refactor:=20:bug:=20=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../{seckill.vue => base-list.vue} | 10 +++++++-
pages/cart/payment/payOrder.vue | 24 +++++++++----------
2 files changed, 21 insertions(+), 13 deletions(-)
rename components/m-goods-list/{seckill.vue => base-list.vue} (94%)
diff --git a/components/m-goods-list/seckill.vue b/components/m-goods-list/base-list.vue
similarity index 94%
rename from components/m-goods-list/seckill.vue
rename to components/m-goods-list/base-list.vue
index 4e7b834..df3b036 100644
--- a/components/m-goods-list/seckill.vue
+++ b/components/m-goods-list/base-list.vue
@@ -3,7 +3,7 @@
-
+
@@ -55,6 +55,14 @@
return []
}
},
+ },
+ methods:{
+ // 跳转到商品详情
+ navigateToDetailPage(item) {
+ uni.navigateTo({
+ url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`,
+ });
+ },
}
}
diff --git a/pages/cart/payment/payOrder.vue b/pages/cart/payment/payOrder.vue
index 71be635..a145a4b 100644
--- a/pages/cart/payment/payOrder.vue
+++ b/pages/cart/payment/payOrder.vue
@@ -98,18 +98,18 @@
},
onBackPress(e) {
if (e.from == "backbutton") {
- if(this.routerVal.recharge_sn){
- uni.switchTab({
- url: '/pages/tabbar/user/my'
- });
- }
- else{
- uni.redirectTo({
- url: "/pages/order/myOrder?status=0",
- });
- }
- return true; //阻止默认返回行为
- }
+ if(this.routerVal.recharge_sn){
+ uni.switchTab({
+ url: '/pages/tabbar/user/my'
+ });
+ }
+ else{
+ uni.navigateTo({
+ url: "/pages/order/myOrder?status=0",
+ });
+ }
+ return true; //阻止默认返回行为
+ }
},
mounted() {
this.cashierData();
From d101cd1b6a07458521ca288036015a2d7bc987f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?=
<17633066053@163.com>
Date: Fri, 30 Sep 2022 16:29:16 +0800
Subject: [PATCH 02/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B9=8B=E5=89=8D?=
=?UTF-8?q?=E5=B0=81=E8=A3=85=E6=96=B9=E6=B3=95=E5=87=BA=E9=94=99=E5=AF=BC?=
=?UTF-8?q?=E8=87=B4=E5=87=BA=E7=8E=B0=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/mine/deposit/index.vue | 16 ++++-------
pages/order/myOrder.vue | 2 +-
utils/filters.js | 56 +++++++++++++++++-------------------
3 files changed, 34 insertions(+), 40 deletions(-)
diff --git a/pages/mine/deposit/index.vue b/pages/mine/deposit/index.vue
index 85287ee..2b9bda5 100644
--- a/pages/mine/deposit/index.vue
+++ b/pages/mine/deposit/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -28,7 +28,7 @@
-
+
@@ -45,7 +45,7 @@ export default {
data() {
return {
walletNum: 0,
- status: "loadmore",
+
current: 0,
swiperCurrent: 0,
userInfo: "", //用户详情信息
@@ -82,27 +82,23 @@ export default {
/**分页获取预存款充值记录 */
getRecharge() {
- this.status = "loading";
+
getUserRecharge(this.params).then((res) => {
if (res.data.success) {
if (res.data.result.records.length != 0) {
- this.status = "loadmore";
+
this.datas.push(...res.data.result.records);
- } else {
- this.status = "nomore";
}
}
});
},
getWallet() {
- this.status = "loading";
+
getWalletLog(this.params).then((res) => {
if (res.data.success) {
if (res.data.result.records.length != 0) {
this.datas.push(...res.data.result.records);
- } else {
- this.status = "nomore";
}
}
});
diff --git a/pages/order/myOrder.vue b/pages/order/myOrder.vue
index a4e0996..2d1eb1c 100644
--- a/pages/order/myOrder.vue
+++ b/pages/order/myOrder.vue
@@ -331,7 +331,7 @@ export default {
this.initData(0);
}
}
- this.loadData(this.status);
+ // this.loadData(this.status);
},
onLoad(options) {
diff --git a/utils/filters.js b/utils/filters.js
index 9635a05..adec726 100644
--- a/utils/filters.js
+++ b/utils/filters.js
@@ -1,6 +1,6 @@
import Foundation from "./Foundation.js";
import storage from "@/utils/storage.js";
-import { getUserInfo } from '@/api/members';
+import { getUserInfo } from "@/api/members";
import Vue from "vue";
/**
* 金钱单位置换 2999 --> 2,999.00
@@ -107,38 +107,36 @@ export function isLogin(val) {
}
}
-
-export function tipsToLogin(){
-if(!isLogin('auth')){
- uni.showModal({
- title: "提示",
- content: "当前用户未登录是否登录?",
- confirmText: "确定",
- cancelText: "取消",
- confirmColor:Vue.prototype.$mainColor,
- success: res => {
- if (res.confirm) {
- navigateToLogin()
- } else if (res.cancel) {
- uni.navigateBack()
- }
- },
- })
- return
- }
+export function tipsToLogin() {
+ if (!isLogin("auth")) {
+ uni.showModal({
+ title: "提示",
+ content: "当前用户未登录是否登录?",
+ confirmText: "确定",
+ cancelText: "取消",
+ confirmColor: Vue.prototype.$mainColor,
+ success: (res) => {
+ if (res.confirm) {
+ navigateToLogin();
+ } else if (res.cancel) {
+ uni.navigateBack();
+ }
+ },
+ });
+ return false;
+ }
+ return true;
}
-
-
/**
* 获取用户信息并重新添加到缓存里面
*/
-export async function userInfo(){
- let res = await getUserInfo();
- if(res.data.success){
- storage.setUserInfo(res.data.result);
- return res.data.result
- }
+export async function userInfo() {
+ let res = await getUserInfo();
+ if (res.data.success) {
+ storage.setUserInfo(res.data.result);
+ return res.data.result;
+ }
}
/**
@@ -149,7 +147,7 @@ export async function userInfo(){
export function forceLogin() {
let userInfo = storage.getUserInfo();
- if (!userInfo || !userInfo.id) {
+ if (!userInfo || !userInfo.id) {
// #ifdef MP-WEIXIN
uni.navigateTo({
From 1225a41de489fd84938d0c6a2db291df371d4de9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?=
<17633066053@163.com>
Date: Fri, 30 Sep 2022 18:36:21 +0800
Subject: [PATCH 03/22] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E9=87=91=E9=A2=9D=E5=8F=AF=E8=83=BD?=
=?UTF-8?q?=E4=BC=9A=E5=87=BA=E7=8E=B0=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/m-goods-list/common.vue | 3 ++-
components/m-goods-list/list.vue | 2 +-
pages/navigation/search/searchPage.vue | 2 +-
pages/order/fillorder.vue | 2 +-
pages/product/goods.vue | 2 +-
.../product/promotion/-promotion-assemble-promotions.vue | 2 +-
pages/product/product/shop/-shop.vue | 2 +-
pages/product/shopList.vue | 2 +-
pages/tabbar/cart/cartList.vue | 2 +-
pages/tabbar/home/template/tpl_goods.vue | 2 +-
10 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/components/m-goods-list/common.vue b/components/m-goods-list/common.vue
index c4975f8..dd46e5d 100644
--- a/components/m-goods-list/common.vue
+++ b/components/m-goods-list/common.vue
@@ -43,7 +43,8 @@
if (typeof val == "undefined") {
return val;
}
- return val.toFixed(2).split(".");
+
+ return parseInt(val).toFixed(2).split(".");
},
// 数据去重一下 只显示一次 减免 劵 什么的
diff --git a/components/m-goods-list/list.vue b/components/m-goods-list/list.vue
index 33d3a33..636decc 100644
--- a/components/m-goods-list/list.vue
+++ b/components/m-goods-list/list.vue
@@ -184,7 +184,7 @@
if (typeof val == "undefined") {
return val;
}
- return val.toFixed(2).split(".");
+ return parseInt(val).toFixed(2).split(".");
},
// 数据去重一下 只显示一次 减免 劵 什么的
diff --git a/pages/navigation/search/searchPage.vue b/pages/navigation/search/searchPage.vue
index 1d9fbf0..0de7f91 100644
--- a/pages/navigation/search/searchPage.vue
+++ b/pages/navigation/search/searchPage.vue
@@ -376,7 +376,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return val.toFixed(2).split(".");
+ return parseInt(val).toFixed(2).split(".");
},
// 展示更多数据
diff --git a/pages/order/fillorder.vue b/pages/order/fillorder.vue
index e0c03a8..238bb51 100644
--- a/pages/order/fillorder.vue
+++ b/pages/order/fillorder.vue
@@ -460,7 +460,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return val.toFixed(2).split(".");
+ return parseInt(val).toFixed(2).split(".");
},
//发票回调 选择发票之后刷新购物车
async callbackInvoice(val) {
diff --git a/pages/product/goods.vue b/pages/product/goods.vue
index 76ac9e1..1f59271 100644
--- a/pages/product/goods.vue
+++ b/pages/product/goods.vue
@@ -757,7 +757,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return val.toFixed(2).split(".");
+ return parseInt(val).toFixed(2).split(".");
},
/**选择商品 */
diff --git a/pages/product/product/promotion/-promotion-assemble-promotions.vue b/pages/product/product/promotion/-promotion-assemble-promotions.vue
index 625cc6e..b007f31 100644
--- a/pages/product/product/promotion/-promotion-assemble-promotions.vue
+++ b/pages/product/product/promotion/-promotion-assemble-promotions.vue
@@ -146,7 +146,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return val.toFixed(2).split(".");
+ return parseInt(val).toFixed(2).split(".");
},
getCountDownTime(val) {
let date = new Date(val);
diff --git a/pages/product/product/shop/-shop.vue b/pages/product/product/shop/-shop.vue
index 3220628..521952c 100644
--- a/pages/product/product/shop/-shop.vue
+++ b/pages/product/product/shop/-shop.vue
@@ -53,7 +53,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return val.toFixed(2).split(".");
+ return parseInt(val).toFixed(2).split(".");
},
// 点击商品
clickGoods(val) {
diff --git a/pages/product/shopList.vue b/pages/product/shopList.vue
index c91daa8..873205d 100644
--- a/pages/product/shopList.vue
+++ b/pages/product/shopList.vue
@@ -87,7 +87,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return val.toFixed(2).split(".");
+ return parseInt(val).toFixed(2).split(".");
},
async init() {
let res = await getStoreList(this.params);
diff --git a/pages/tabbar/cart/cartList.vue b/pages/tabbar/cart/cartList.vue
index 0842a42..3bdd5ef 100644
--- a/pages/tabbar/cart/cartList.vue
+++ b/pages/tabbar/cart/cartList.vue
@@ -264,7 +264,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return val.toFixed(2).split(".");
+ return parseInt(val).toFixed(2).split(".");
},
/**
diff --git a/pages/tabbar/home/template/tpl_goods.vue b/pages/tabbar/home/template/tpl_goods.vue
index 5bcc728..8d85f30 100644
--- a/pages/tabbar/home/template/tpl_goods.vue
+++ b/pages/tabbar/home/template/tpl_goods.vue
@@ -63,7 +63,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return val.toFixed(2).split(".");
+ return parseInt(val).toFixed(2).split(".");
},
handleClick(item) {
uni.navigateTo({
From 3c7d940ba8a6f4727ca02e7a7d733f0a5f413168 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com>
Date: Mon, 3 Oct 2022 12:47:03 +0800
Subject: [PATCH 04/22] =?UTF-8?q?fix:=20:bug:=20=E6=8F=90=E4=BA=A4parseInt?=
=?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/m-buy/goods.vue | 2 +-
components/m-goods-list/common.vue | 2 +-
components/m-goods-list/list.vue | 2 +-
pages/navigation/search/searchPage.vue | 2 +-
pages/order/fillorder.vue | 2 +-
pages/product/goods.vue | 2 +-
.../product/promotion/-promotion-assemble-promotions.vue | 2 +-
pages/product/product/shop/-shop.vue | 2 +-
pages/product/shopList.vue | 2 +-
pages/tabbar/cart/cartList.vue | 2 +-
pages/tabbar/home/template/tpl_goods.vue | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue
index a6cef91..924a9a2 100644
--- a/components/m-buy/goods.vue
+++ b/components/m-buy/goods.vue
@@ -209,7 +209,7 @@
if (typeof val == "undefined") {
return val;
}
- return val.toFixed(2).split(".");
+ return Number(val).toFixed(2).split(".");
},
closeMask() {
diff --git a/components/m-goods-list/common.vue b/components/m-goods-list/common.vue
index dd46e5d..fe65b55 100644
--- a/components/m-goods-list/common.vue
+++ b/components/m-goods-list/common.vue
@@ -44,7 +44,7 @@
return val;
}
- return parseInt(val).toFixed(2).split(".");
+ return Number(val).toFixed(2).split(".");
},
// 数据去重一下 只显示一次 减免 劵 什么的
diff --git a/components/m-goods-list/list.vue b/components/m-goods-list/list.vue
index 636decc..2642594 100644
--- a/components/m-goods-list/list.vue
+++ b/components/m-goods-list/list.vue
@@ -184,7 +184,7 @@
if (typeof val == "undefined") {
return val;
}
- return parseInt(val).toFixed(2).split(".");
+ return Number(val).toFixed(2).split(".");
},
// 数据去重一下 只显示一次 减免 劵 什么的
diff --git a/pages/navigation/search/searchPage.vue b/pages/navigation/search/searchPage.vue
index 0de7f91..758b727 100644
--- a/pages/navigation/search/searchPage.vue
+++ b/pages/navigation/search/searchPage.vue
@@ -376,7 +376,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return parseInt(val).toFixed(2).split(".");
+ return Number(val).toFixed(2).split(".");
},
// 展示更多数据
diff --git a/pages/order/fillorder.vue b/pages/order/fillorder.vue
index 238bb51..930a851 100644
--- a/pages/order/fillorder.vue
+++ b/pages/order/fillorder.vue
@@ -460,7 +460,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return parseInt(val).toFixed(2).split(".");
+ return Number(val).toFixed(2).split(".");
},
//发票回调 选择发票之后刷新购物车
async callbackInvoice(val) {
diff --git a/pages/product/goods.vue b/pages/product/goods.vue
index 1f59271..90a9a57 100644
--- a/pages/product/goods.vue
+++ b/pages/product/goods.vue
@@ -757,7 +757,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return parseInt(val).toFixed(2).split(".");
+ return Number(val).toFixed(2).split(".");
},
/**选择商品 */
diff --git a/pages/product/product/promotion/-promotion-assemble-promotions.vue b/pages/product/product/promotion/-promotion-assemble-promotions.vue
index b007f31..aef1a4a 100644
--- a/pages/product/product/promotion/-promotion-assemble-promotions.vue
+++ b/pages/product/product/promotion/-promotion-assemble-promotions.vue
@@ -146,7 +146,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return parseInt(val).toFixed(2).split(".");
+ return Number(val).toFixed(2).split(".");
},
getCountDownTime(val) {
let date = new Date(val);
diff --git a/pages/product/product/shop/-shop.vue b/pages/product/product/shop/-shop.vue
index 521952c..a04e234 100644
--- a/pages/product/product/shop/-shop.vue
+++ b/pages/product/product/shop/-shop.vue
@@ -53,7 +53,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return parseInt(val).toFixed(2).split(".");
+ return Number(val).toFixed(2).split(".");
},
// 点击商品
clickGoods(val) {
diff --git a/pages/product/shopList.vue b/pages/product/shopList.vue
index 873205d..967abf2 100644
--- a/pages/product/shopList.vue
+++ b/pages/product/shopList.vue
@@ -87,7 +87,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return parseInt(val).toFixed(2).split(".");
+ return Number(val).toFixed(2).split(".");
},
async init() {
let res = await getStoreList(this.params);
diff --git a/pages/tabbar/cart/cartList.vue b/pages/tabbar/cart/cartList.vue
index 3bdd5ef..a0ebc9a 100644
--- a/pages/tabbar/cart/cartList.vue
+++ b/pages/tabbar/cart/cartList.vue
@@ -264,7 +264,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return parseInt(val).toFixed(2).split(".");
+ return Number(val).toFixed(2).split(".");
},
/**
diff --git a/pages/tabbar/home/template/tpl_goods.vue b/pages/tabbar/home/template/tpl_goods.vue
index 8d85f30..9fb7fa0 100644
--- a/pages/tabbar/home/template/tpl_goods.vue
+++ b/pages/tabbar/home/template/tpl_goods.vue
@@ -63,7 +63,7 @@ export default {
if (typeof val == "undefined") {
return val;
}
- return parseInt(val).toFixed(2).split(".");
+ return Number(val).toFixed(2).split(".");
},
handleClick(item) {
uni.navigateTo({
From 7179ca41de32b1a99e574ccf58706dcb4b75b47b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?=
<17633066053@163.com>
Date: Mon, 10 Oct 2022 18:53:14 +0800
Subject: [PATCH 05/22] =?UTF-8?q?feat:=20:art:=20=E5=9C=A8config=E4=B8=AD?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E5=E4=B8=AA=E4=BE=BF=E6=8D=B7=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E9=80=89=E9=A1=B9=EF=BC=8C=E6=9B=B4=E5=8A=A0=E7=AE=80?=
=?UTF-8?q?=E5=8D=95=E4=BE=BF=E6=8D=B7=E9=85=8D=E7=BD=AE=E4=BB=A5=E5=8F=8A?=
=?UTF-8?q?=E4=BD=BF=E7=94=A8=E4=BB=A3=E7=A0=81=E3=80=82=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E9=83=A8=E5=88=86=E5=86=97=E4=BD=99=E7=9A=84=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 4 ++-
components/m-buy/goods.vue | 24 +++++---------
components/m-goods-list/base-list.vue | 6 ++--
components/m-goods-list/common.vue | 11 -------
components/m-goods-list/list.vue | 20 +++---------
components/m-goods-list/promotion.vue | 10 +++---
config/config.js | 24 +++++++++-----
main.js | 19 ++++++------
pages/navigation/search/searchPage.vue | 9 ------
pages/order/fillorder.vue | 15 +++------
pages/product/goods.vue | 14 ++-------
.../-promotion-assemble-promotions.vue | 31 +++++++------------
pages/product/product/shop/-shop.vue | 9 +-----
pages/product/shopList.vue | 8 +----
pages/product/shopPage.vue | 10 +++---
pages/tabbar/cart/cartList.vue | 21 +++----------
pages/tabbar/home/template/tpl_goods.vue | 11 ++-----
uni.scss | 8 ++---
utils/filters.js | 14 +++++++++
19 files changed, 100 insertions(+), 168 deletions(-)
diff --git a/App.vue b/App.vue
index 4304ad7..f8f76ae 100644
--- a/App.vue
+++ b/App.vue
@@ -88,7 +88,9 @@
onShow() {
// #ifndef H5
- this.getClipboard();
+ if(this.config.enableGetClipboard){
+ this.getClipboard();
+ }
// #endif
// #ifdef APP-PLUS
diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue
index a6cef91..6a80af3 100644
--- a/components/m-buy/goods.vue
+++ b/components/m-buy/goods.vue
@@ -16,9 +16,9 @@
¥
{{
- formatPrice(goodsDetail.promotionPrice)[0]
+ $options.filters.goodsFormatPrice(goodsDetail.promotionPrice)[0]
}}
- .{{ formatPrice(goodsDetail.promotionPrice)[1] }}
+ .{{ $options.filters.goodsFormatPrice(goodsDetail.promotionPrice)[1] }}
{{
@@ -29,9 +29,9 @@
¥
{{
- formatPrice(goodsDetail.price)[0]
+ $options.filters.goodsFormatPrice(goodsDetail.price)[0]
}}
- .{{ formatPrice(goodsDetail.price)[1] }}
+ .{{ $options.filters.goodsFormatPrice(goodsDetail.price)[1] }}
@@ -43,9 +43,9 @@
¥
{{
- formatPrice(item.price)[0]
+ $options.filters.goodsFormatPrice(item.price)[0]
}}
- .{{ formatPrice(item.price)[1] }}
+ .{{ $options.filters.goodsFormatPrice(item.price)[1] }}
{{item.num}}{{goodsDetail.goodsUnit}}
@@ -56,9 +56,9 @@
¥
{{
- formatPrice(goodsDetail.price)[0]
+ $options.filters.goodsFormatPrice(goodsDetail.price)[0]
}}
- .{{ formatPrice(goodsDetail.price)[1] }}
+ .{{ $options.filters.goodsFormatPrice(goodsDetail.price)[1] }}
@@ -204,14 +204,6 @@
},
methods: {
- // 格式化金钱 1999 --> [1999,00]
- formatPrice(val) {
- if (typeof val == "undefined") {
- return val;
- }
- return val.toFixed(2).split(".");
- },
-
closeMask() {
this.$emit("closeBuy", false);
},
diff --git a/components/m-goods-list/base-list.vue b/components/m-goods-list/base-list.vue
index df3b036..a64c302 100644
--- a/components/m-goods-list/base-list.vue
+++ b/components/m-goods-list/base-list.vue
@@ -11,8 +11,8 @@
{{ item.goodsName }}
- ¥{{ formatPrice(item.price )[0] }} .{{
- formatPrice(item.price )[1]
+ ¥{{ $options.filters.goodsFormatPrice(item.price )[0] }} .{{
+ $options.filters.goodsFormatPrice(item.price )[1]
}}
@@ -135,7 +135,7 @@
font-size: $font-base;
color: $font-color-dark;
line-height: 1.5;
- height: 84rpx;
+ height: 86rpx;
padding: 10rpx 0 0;
display: -webkit-box;
-webkit-box-orient: vertical;
diff --git a/components/m-goods-list/common.vue b/components/m-goods-list/common.vue
index dd46e5d..4896ace 100644
--- a/components/m-goods-list/common.vue
+++ b/components/m-goods-list/common.vue
@@ -36,17 +36,6 @@
}
return str;
},
-
-
- // 格式化金钱 1999 --> [1999,00]
- formatPrice(val) {
- if (typeof val == "undefined") {
- return val;
- }
-
- return parseInt(val).toFixed(2).split(".");
- },
-
// 数据去重一下 只显示一次 减免 劵 什么的
getPromotion(item) {
if (item.promotionMap) {
diff --git a/components/m-goods-list/list.vue b/components/m-goods-list/list.vue
index 636decc..db5494c 100644
--- a/components/m-goods-list/list.vue
+++ b/components/m-goods-list/list.vue
@@ -15,8 +15,8 @@
- ¥{{ formatPrice(item.content.price )[0] }} .{{
- formatPrice(item.content.price )[1]
+ ¥{{ $options.filters.goodsFormatPrice(item.content.price )[0] }} .{{
+ $options.filters.goodsFormatPrice(item.content.price )[1]
}}
@@ -60,8 +60,8 @@
{{ item.content.goodsName }}
- ¥{{ formatPrice(item.content.price )[0] }} .{{
- formatPrice(item.content.price )[1]
+ ¥{{ $options.filters.goodsFormatPrice(item.content.price )[0] }} .{{
+ $options.filters.goodsFormatPrice(item.content.price )[1]
}}
@@ -177,16 +177,6 @@
}
return str;
},
-
-
- // 格式化金钱 1999 --> [1999,00]
- formatPrice(val) {
- if (typeof val == "undefined") {
- return val;
- }
- return parseInt(val).toFixed(2).split(".");
- },
-
// 数据去重一下 只显示一次 减免 劵 什么的
getPromotion(item) {
if (item.promotionMap) {
@@ -284,7 +274,7 @@
font-size: $font-base;
color: $font-color-dark;
line-height: 1.5;
- height: 84rpx;
+ height: 86rpx;
padding: 10rpx 0 0;
display: -webkit-box;
-webkit-box-orient: vertical;
diff --git a/components/m-goods-list/promotion.vue b/components/m-goods-list/promotion.vue
index 1f24739..44338a0 100644
--- a/components/m-goods-list/promotion.vue
+++ b/components/m-goods-list/promotion.vue
@@ -13,15 +13,15 @@
- ¥{{ formatPrice(item.price )[0] }} .{{
- formatPrice(item.price )[1]
+ ¥{{ $options.filters.goodsFormatPrice(item.price )[0] }} .{{
+ $options.filters.goodsFormatPrice(item.price )[1]
}}
最低:
- ¥{{ formatPrice(item.purchasePrice )[0] }} .{{
- formatPrice(item.purchasePrice )[1]
+ ¥{{ $options.filters.goodsFormatPrice(item.purchasePrice )[0] }} .{{
+ $options.filters.goodsFormatPrice(item.purchasePrice )[1]
}}
@@ -107,7 +107,7 @@
font-size: $font-base;
color: $font-color-dark;
line-height: 1.5;
- height: 84rpx;
+ height: 86rpx;
padding: 10rpx 0 0;
display: -webkit-box;
-webkit-box-orient: vertical;
diff --git a/config/config.js b/config/config.js
index 9624a59..a709b19 100644
--- a/config/config.js
+++ b/config/config.js
@@ -1,5 +1,5 @@
const name = "lilishop"; //全局商城name
-const schemeName = 'lilishop' //唤醒app需要的schemeName
+const schemeName = "lilishop"; //唤醒app需要的schemeName
export default {
name: name,
schemeLink: `${schemeName}://`, //唤起app地址
@@ -7,10 +7,18 @@ export default {
shareLink: "https://m-b2b2c.pickmall.cn", //分享地址,也就是在h5中默认的复制地址
appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请Web服务key
- scanAuthNavigation:['https://m-b2b2c.pickmall.cn/'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
- iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
- logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址
- customerServiceMobile:"13161366885", //客服电话
- customerServiceEmail:"lili@lili.com", //客服邮箱
- imWebSrc:"https://im.pickmall.cn" //IM地址
-};
+ scanAuthNavigation: ["https://m-b2b2c.pickmall.cn/"], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
+ iosAppId: "id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
+ logo: "https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址
+ customerServiceMobile: "13161366885", //客服电话
+ customerServiceEmail: "lili@lili.com", //客服邮箱
+ imWebSrc: "https://im.pickmall.cn", //IM地址
+ enableGetClipboard: true, //是否启用粘贴板获取 scanAuthNavigation 中的链接,如果匹配则会跳转到对应页面
+ enableMiniBarStartUpApp: true, //是否在h5中右侧浮空按钮点击启动app
+ /**
+ * 如需更换主题请修改此处以及uni.scss中的全局颜色
+ */
+ mainColor: "#ff3c2a", // 主题色
+ lightColor: "#ff6b35", // 高亮主题色
+ aiderLightColor: "#ff9f28", // 辅助高亮颜色
+};
diff --git a/main.js b/main.js
index 9b47071..03cf4ef 100644
--- a/main.js
+++ b/main.js
@@ -3,17 +3,18 @@ import App from "./App";
import * as filters from "./utils/filters.js"; // global filter
import uView from "uview-ui";
import store from "./store";
-
-
+import config from '@/config/config';
+import airBtn from "@/components/m-airbtn/index.vue";
/**
* 仅在h5中显示唤醒app功能
* 在h5页面手动挂载
*
*/
// #ifdef H5
-import airBtn from "@/components/m-airbtn/index.vue";
-let btn = Vue.component("airBtn", airBtn); //全局注册
-document.body.appendChild(new btn().$mount().$el);
+if(config.enableMiniBarStartUpApp){
+ let btn = Vue.component("airBtn", airBtn); //全局注册
+ document.body.appendChild(new btn().$mount().$el);
+}
// #endif
// 引入uView对小程序分享的mixin封装
@@ -30,8 +31,6 @@ Object.keys(filters).forEach((key) => {
// 引入Vuex
Vue.prototype.$store = store;
-
-
Vue.use(uView);
Vue.config.productionTip = false;
@@ -43,11 +42,11 @@ Vue.config.productionTip = false;
* 如需更换主题请修改此处以及uni.scss中的全局颜色
*/
// 主题色
-Vue.prototype.$mainColor = "#ff3c2a";
+Vue.prototype.$mainColor = config.mainColor;
// 高亮主题色
-Vue.prototype.$lightColor = "#ff6b35";
+Vue.prototype.$lightColor = config.lightColor;
// 辅助高亮颜色
-Vue.prototype.$aiderLightColor = "#ff9f28";
+Vue.prototype.$aiderLightColor = config.aiderLightColor;
App.mpType = "app";
diff --git a/pages/navigation/search/searchPage.vue b/pages/navigation/search/searchPage.vue
index 0de7f91..449312a 100644
--- a/pages/navigation/search/searchPage.vue
+++ b/pages/navigation/search/searchPage.vue
@@ -370,15 +370,6 @@ export default {
return array;
}
},
-
- // 格式化金钱 1999 --> [1999,00]
- formatPrice(val) {
- if (typeof val == "undefined") {
- return val;
- }
- return parseInt(val).toFixed(2).split(".");
- },
-
// 展示更多数据
showMore() {
this.loadOldKeyword(this.oldKeywordIndex);
diff --git a/pages/order/fillorder.vue b/pages/order/fillorder.vue
index 238bb51..1c8f0fe 100644
--- a/pages/order/fillorder.vue
+++ b/pages/order/fillorder.vue
@@ -147,9 +147,9 @@
¥
{{
- formatPrice(val.goodsSku.price)[0]
+ $options.filters.goodsFormatPrice(val.goodsSku.price)[0]
}}
- .{{ formatPrice(val.goodsSku.price)[1] }}
+ .{{ $options.filters.goodsFormatPrice(val.goodsSku.price)[1] }}
@@ -315,10 +315,10 @@
¥
{{
- formatPrice(orderMessage.priceDetailDTO.flowPrice)[0]
+ $options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[0]
}}
.{{ formatPrice(orderMessage.priceDetailDTO.flowPrice)[1] }}
+ >.{{ $options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[1] }}
[1999,00]
- formatPrice(val) {
- if (typeof val == "undefined") {
- return val;
- }
- return parseInt(val).toFixed(2).split(".");
- },
//发票回调 选择发票之后刷新购物车
async callbackInvoice(val) {
this.invoiceFlag = false;
diff --git a/pages/product/goods.vue b/pages/product/goods.vue
index 1f59271..3647eb3 100644
--- a/pages/product/goods.vue
+++ b/pages/product/goods.vue
@@ -151,12 +151,12 @@
- ¥{{ formatPrice(wholesaleList[wholesaleList.length-1].price)[0] }}.{{ formatPrice(wholesaleList[wholesaleList.length-1].price)[1] }}
+ ¥{{ $options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length-1].price)[0] }}.{{ $options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length-1].price)[1] }}
~
- ¥{{ formatPrice(wholesaleList[0].price)[0] }}.{{ formatPrice(wholesaleList[0].price)[1] }}
+ ¥{{ $options.filters.goodsFormatPrice(wholesaleList[0].price)[0] }}.{{ $options.filters.goodsFormatPrice(wholesaleList[0].price)[1] }}
- ¥{{ formatPrice(goodsDetail.price)[0] }}.{{ formatPrice(goodsDetail.price)[1] }}
+ ¥{{ $options.filters.goodsFormatPrice(goodsDetail.price)[0] }}.{{ $options.filters.goodsFormatPrice(goodsDetail.price)[1] }}
@@ -752,14 +752,6 @@ export default {
// // #endif
},
- // 格式化金钱 1999 --> [1999,00]
- formatPrice(val) {
- if (typeof val == "undefined") {
- return val;
- }
- return parseInt(val).toFixed(2).split(".");
- },
-
/**选择商品 */
changedGoods(val) {
this.selectedGoods = val;
diff --git a/pages/product/product/promotion/-promotion-assemble-promotions.vue b/pages/product/product/promotion/-promotion-assemble-promotions.vue
index b007f31..8dd01bb 100644
--- a/pages/product/product/promotion/-promotion-assemble-promotions.vue
+++ b/pages/product/product/promotion/-promotion-assemble-promotions.vue
@@ -21,15 +21,15 @@
>
¥
- {{ formatPrice(detail.promotionPrice)[0] }}.{{
- formatPrice(detail.promotionPrice)[1]
+ {{ $options.filters.goodsFormatPrice(detail.promotionPrice)[0] }}.{{
+ $options.filters.goodsFormatPrice(detail.promotionPrice)[1]
}}
¥{{ formatPrice(detail.price)[0] }}.{{
- formatPrice(detail.price)[1]
+ >¥{{ $options.filters.goodsFormatPrice(detail.price)[0] }}.{{
+ $options.filters.goodsFormatPrice(detail.price)[1]
}}
限时抢购
@@ -42,8 +42,8 @@
¥{{ formatPrice(promotion.groupbuy_goods_vo.price)[0] }}.{{
- formatPrice(promotion.groupbuy_goods_vo.price)[1]
+ >¥{{ $options.filters.goodsFormatPrice(promotion.groupbuy_goods_vo.price)[0] }}.{{
+ $options.filters.goodsFormatPrice(promotion.groupbuy_goods_vo.price)[1]
}}
@@ -53,9 +53,9 @@
class="old-price"
v-if="promotion.groupbuy_goods_vo.original_price != undefined"
>¥{{
- formatPrice(promotion.groupbuy_goods_vo.original_price)[0]
+ $options.filters.goodsFormatPrice(promotion.groupbuy_goods_vo.original_price)[0]
}}.{{
- formatPrice(promotion.groupbuy_goods_vo.original_price)[1]
+ $options.filters.goodsFormatPrice(promotion.groupbuy_goods_vo.original_price)[1]
}}
团购活动
@@ -68,13 +68,13 @@
v-if="detail.promotionPrice != undefined"
>
¥
- {{ formatPrice(detail.promotionPrice)[0] }}.{{ formatPrice(detail.promotionPrice)[1] }}
+ {{ $options.filters.goodsFormatPrice(detail.promotionPrice)[0] }}.{{ $options.filters.goodsFormatPrice(detail.promotionPrice)[1] }}
¥{{ formatPrice(detail.price)[0] }}.{{
- formatPrice(detail.price)[1]
+ >¥{{ $options.filters.goodsFormatPrice(detail.price)[0] }}.{{
+ $options.filters.goodsFormatPrice(detail.price)[1]
}}
拼团活动
@@ -141,13 +141,6 @@ export default {
},
mounted() {},
methods: {
- // 格式化金钱 1999 --> [1999,00]
- formatPrice(val) {
- if (typeof val == "undefined") {
- return val;
- }
- return parseInt(val).toFixed(2).split(".");
- },
getCountDownTime(val) {
let date = new Date(val);
let timeSimple = new Date(date).getTime() / 1000;
diff --git a/pages/product/product/shop/-shop.vue b/pages/product/product/shop/-shop.vue
index 521952c..cf4ab41 100644
--- a/pages/product/product/shop/-shop.vue
+++ b/pages/product/product/shop/-shop.vue
@@ -32,7 +32,7 @@
{{ item.content.goodsName }}
- ¥{{ formatPrice(item.content.price)[0] }}.{{ formatPrice(item.content.price)[1] }}
+ ¥{{ $options.filters.goodsFormatPrice(item.content.price)[0] }}.{{ $options.filters.goodsFormatPrice(item.content.price)[1] }}
@@ -48,13 +48,6 @@ export default {
props: ["res", "goodsDetail", "storeDetail"],
mounted() {},
methods: {
- // 格式化金钱 1999 --> [1999,00]
- formatPrice(val) {
- if (typeof val == "undefined") {
- return val;
- }
- return parseInt(val).toFixed(2).split(".");
- },
// 点击商品
clickGoods(val) {
uni.navigateTo({
diff --git a/pages/product/shopList.vue b/pages/product/shopList.vue
index 873205d..79e81ca 100644
--- a/pages/product/shopList.vue
+++ b/pages/product/shopList.vue
@@ -82,13 +82,7 @@ export default {
this.storeList = [];
this.init();
},
- // 格式化金钱 1999 --> [1999,00]
- formatPrice(val) {
- if (typeof val == "undefined") {
- return val;
- }
- return parseInt(val).toFixed(2).split(".");
- },
+
async init() {
let res = await getStoreList(this.params);
if (res.data.success) {
diff --git a/pages/product/shopPage.vue b/pages/product/shopPage.vue
index cbceb11..aed083b 100644
--- a/pages/product/shopPage.vue
+++ b/pages/product/shopPage.vue
@@ -58,7 +58,7 @@
-
+
@@ -382,11 +382,11 @@ export default {
color: #999;
}
-.contant {
+.content {
margin-top: 20rpx;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
+ // display: flex;
+ // flex-wrap: wrap;
+ // justify-content: space-between;
> .empty {
width: 100%;
display: flex;
diff --git a/pages/tabbar/cart/cartList.vue b/pages/tabbar/cart/cartList.vue
index 3bdd5ef..8f12b77 100644
--- a/pages/tabbar/cart/cartList.vue
+++ b/pages/tabbar/cart/cartList.vue
@@ -79,8 +79,8 @@
- ¥{{ formatPrice(skuItem.goodsSku.price)[0] }}
- .{{ formatPrice(skuItem.goodsSku.price)[1] }}
+ ¥{{ $options.filters.goodsFormatPrice(skuItem.goodsSku.price)[0] }}
+ .{{ $options.filters.goodsFormatPrice(skuItem.goodsSku.price)[1] }}
@@ -108,8 +108,8 @@
- 预估到手价 ¥{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[0]}}
- .{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }}
+ 预估到手价 ¥{{ $options.filters.goodsFormatPrice(skuItem.priceDetailDTO.flowPrice)[0]}}
+ .{{ $options.filters.goodsFormatPrice(skuItem.priceDetailDTO.flowPrice)[1] }}
{{skuItem.errorMessage}}
@@ -131,7 +131,7 @@
总计:
- ¥{{ formatPrice(cartDetail.priceDetailDTO.flowPrice)[0] }}.{{ formatPrice(cartDetail.priceDetailDTO.flowPrice)[1] }}
+ ¥{{ $options.filters.goodsFormatPrice(cartDetail.priceDetailDTO.flowPrice)[0] }}.{{ $options.filters.goodsFormatPrice(cartDetail.priceDetailDTO.flowPrice)[1] }}
总计:0.00
@@ -256,17 +256,6 @@ export default {
discountDetails() {
this.discountDetailsFlag = true;
},
-
- /**
- * 格式化金钱 1999 --> [1999,00]
- */
- formatPrice(val) {
- if (typeof val == "undefined") {
- return val;
- }
- return parseInt(val).toFixed(2).split(".");
- },
-
/**
* 左滑打开删除
*/
diff --git a/pages/tabbar/home/template/tpl_goods.vue b/pages/tabbar/home/template/tpl_goods.vue
index 8d85f30..98f6b15 100644
--- a/pages/tabbar/home/template/tpl_goods.vue
+++ b/pages/tabbar/home/template/tpl_goods.vue
@@ -24,8 +24,8 @@
{{ item.title }}
-
¥
{{ formatPrice(item.price )[0] }} .{{
- formatPrice(item.price )[1]
+
¥{{ $options.filters.goodsFormatPrice(item.price )[0] }} .{{
+ $options.filters.goodsFormatPrice(item.price)[1]
}}
@@ -58,13 +58,6 @@ export default {
},
mounted() {},
methods: {
- // 格式化金钱 1999 --> [1999,00]
- formatPrice(val) {
- if (typeof val == "undefined") {
- return val;
- }
- return parseInt(val).toFixed(2).split(".");
- },
handleClick(item) {
uni.navigateTo({
url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`,
diff --git a/uni.scss b/uni.scss
index c8a7b34..422266e 100644
--- a/uni.scss
+++ b/uni.scss
@@ -149,9 +149,9 @@ $font-weight: 400;
}
.flex-a-c{
align-items: center;
-}
-.flex-j-sb{
- justify-content: space-between;
+}
+.flex-j-sb{
+ justify-content: space-between;
}
.relative {
position: relative;
@@ -171,7 +171,7 @@ $font-weight: 400;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
-}
+}
.wes-3 {
/* 适用于webkit内核和移动端 */
diff --git a/utils/filters.js b/utils/filters.js
index adec726..0fbb778 100644
--- a/utils/filters.js
+++ b/utils/filters.js
@@ -21,6 +21,20 @@ export function unitPrice(val, unit, location) {
return (unit || "") + price;
}
+/**
+ * 格式化价格 1999 --> [1999,00]
+ * @param {*} val
+ * @returns
+ */
+export function goodsFormatPrice(val) {
+ if (typeof val == "undefined") {
+ return val;
+ }
+ let valNum = new Number(val);
+ return valNum.toFixed(2).split(".");
+}
+
+
/**
* 脱敏姓名
*/
From fc8123c194612fa29d04a0d0dc0b5666b8a61458 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?=
<17633066053@163.com>
Date: Tue, 11 Oct 2022 17:36:40 +0800
Subject: [PATCH 06/22] =?UTF-8?q?feat:=20:art:=20=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E4=B8=93=E9=A2=98=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/home.js | 17 +-
pages.json | 6 +
pages/tabbar/home/template/tpl.js | 312 +++++++++++++++++++-----------
pages/tabbar/special/special.vue | 247 +++++++++++++++++++++++
4 files changed, 470 insertions(+), 112 deletions(-)
create mode 100644 pages/tabbar/special/special.vue
diff --git a/api/home.js b/api/home.js
index a5dee69..836891d 100644
--- a/api/home.js
+++ b/api/home.js
@@ -1,6 +1,21 @@
import { http, Method } from "@/utils/request.js";
-
+ export function toSpecial(data) {
+ return http.request({
+ url: `/other/pageData/getSpecial`,
+ method: Method.GET,
+ data
+ });
+}
+/**
+ * 专题内容
+ */
+ export function getSpecial(id) {
+ return http.request({
+ url: `/other/pageData/get/${id}`,
+ method: Method.GET,
+ });
+}
/**
* 获取广告图
diff --git a/pages.json b/pages.json
index 6838480..7744e98 100644
--- a/pages.json
+++ b/pages.json
@@ -79,6 +79,12 @@
"style": {
}
+ },
+ {
+ "path": "pages/tabbar/special/special",
+ "style": {
+ "navigationBarTitleText": "专题"
+ }
}
],
diff --git a/pages/tabbar/home/template/tpl.js b/pages/tabbar/home/template/tpl.js
index c1af693..cdcb2fd 100644
--- a/pages/tabbar/home/template/tpl.js
+++ b/pages/tabbar/home/template/tpl.js
@@ -1,118 +1,208 @@
/** 配置楼层模块的跳转 */
export function modelNavigateTo(item) {
- let val = item.url || item;
- console.log(item);
- // return;
- switch (val.___type || item.type) {
- case "goods":
- uni.navigateTo({
- url: "/pages/product/goods?id=" + val.id + "&goodsId=" + val.goodsId,
- });
- break;
- case "category":
- if (val.id) {
+ let val = item.url || item;
+ //链接跳转到专题
+
+ if (val && val.id && val.pageType == "special") {
+ uni.navigateTo({
+ url: `/pages/tabbar/special/special?id=${val.id}`,
+ });
+ }
+ switch (val.___type || val.type) {
+ case "goods":
+ uni.navigateTo({
+ url: "/pages/product/goods?id=" + val.id + "&goodsId=" + val.goodsId,
+ });
+ break;
+ case "category":
+ if (val.id) {
+ uni.navigateTo({
+ url: `/pages/navigation/search/searchPage?category=${val.id}`,
+ });
+ } else {
+ uni.navigateTo({
+ url: `/pages/navigation/search/searchPage`,
+ });
+ }
+ break;
+ case "shops":
+ uni.navigateTo({
+ url: `/pages/product/shopPage?id=${val.id}`,
+ });
+ break;
+ // 活动
+ case "marketing":
+ uni.navigateTo({
+ url: "/pages/product/goods?id=" + val.id + "goodsId=" + val.goodsId,
+ });
+ break;
+ case "pages":
+ uni.navigateTo({
+ url: val.___path + "?id=" + val.id + "&title=" + val.title,
+ });
+ break;
+ case "other":
+ switch (val.title || item.title) {
+ case "首页":
+ uni.switchTab({
+ url: `/pages/tabbar/home/index`,
+ });
+ break;
+ case "购物车":
+ uni.switchTab({
+ url: `/pages/tabbar/cart/cartList`,
+ });
+ return;
+ case "个人中心":
+ uni.switchTab({
+ url: `/pages/tabbar/user/my`,
+ });
+ break;
+ case "收藏商品":
+ uni.navigateTo({
+ url: `/pages/mine/myCollect`,
+ });
+ break;
+ case "我的订单":
+ uni.navigateTo({
+ url: `/pages/order/myOrder?status=0`,
+ });
+ break;
+ case "领券中心":
+ uni.navigateTo({
+ url: `/pages/cart/coupon/couponCenter`,
+ });
+ break;
+ case "签到":
+ uni.navigateTo({
+ url: `/pages/mine/signIn`,
+ });
+ break;
+ case "秒杀频道":
+ uni.navigateTo({
+ url: `/pages/promotion/seckill`,
+ });
+ break;
+ case "拼团频道":
+ uni.navigateTo({
+ url: `/pages/promotion/joinGroup`,
+ });
+ break;
+ case "小程序直播":
+ uni.navigateTo({
+ url: `/pages/promotion/lives`,
+ });
+ break;
+ case "砍价":
+ uni.navigateTo({
+ url: `/pages/promotion/bargain/list`,
+ });
+ break;
+ case "积分商城":
+ uni.navigateTo({
+ url: `/pages/promotion/point/pointList`,
+ });
+ break;
+ case "店铺列表":
+ uni.navigateTo({
+ url: `/pages/product/shopList`,
+ });
+ break;
+ default:
+ // #ifdef H5
+ window.location.href = val.url || item.link;
+ // #endif
+ // #ifdef APP-PLUS
+ plus.runtime.openURL(val.url || item.link) //不需要拼接\
+ // #endif
+ break;
+ }
+
+ break;
+ }
+}
+
+
+
+
+import config from "@/config/config";
+
+async function scan() {
+ // #ifdef APP-PLUS
+ let isIos = plus.os.name == "iOS";
+ // 判断是否是Ios
+ if (isIos) {
+ const iosFirstCamera = uni.getStorageSync("iosFirstCamera"); //是不是第一次开启相机
+ if (iosFirstCamera !== "false") {
+ uni.setStorageSync("iosFirstCamera", "false"); //设为false就代表不是第一次开启相机
+ seacnCode();
+ } else {
+ if (permision.judgeIosPermission("camera")) {
+ seacnCode();
+ } else {
+ // 没有权限提醒是否去申请权限
+ tipsGetSettings();
+ }
+ }
+ } else {
+ /**
+ * TODO 安卓 权限已经授权了,调用api总是显示用户已永久拒绝申请。人傻了
+ * TODO 如果xdm有更好的办法请在 https://gitee.com/beijing_hongye_huicheng/lilishop/issues 提下谢谢
+ */
+ seacnCode();
+ }
+
+ // #endif
+
+ // #ifdef MP-WEIXIN
+ seacnCode();
+ // #endif
+}
+/**
+ * 提示获取权限
+ */
+function tipsGetSettings() {
+ uni.showModal({
+ title: "提示",
+ content: "您已经关闭相机权限,去设置",
+ success: function (res) {
+ if (res.confirm) {
+ if (isIos) {
+ plus.runtime.openURL("app-settings:");
+ } else {
+ permision.gotoAppPermissionSetting();
+ }
+ }
+ },
+ });
+}
+
+function seacnCode() {
+ uni.scanCode({
+ success: function (res) {
+ let path = encodeURIComponent(res.result);
+
+ // WX_CODE 为小程序码
+ if (res.scanType == "WX_CODE") {
+ console.log(res);
uni.navigateTo({
- url: `/pages/navigation/search/searchPage?category=${val.id}`,
+ url: `/${res.path}`,
});
} else {
- uni.navigateTo({
- url: `/pages/navigation/search/searchPage`,
+ config.scanAuthNavigation.forEach((src) => {
+ if (res.result.indexOf(src) != -1) {
+ uni.navigateTo({
+ url: `/${res.result.substring(src.length)}`,
+ });
+ } else {
+ setTimeout(() => {
+ uni.navigateTo({
+ url: "/pages/tabbar/home/web-view?src=" + path,
+ });
+ }, 100);
+ }
});
}
- break;
- case "shops":
- uni.navigateTo({
- url: `/pages/product/shopPage?id=${val.id}`,
- });
- break;
- // 活动
- case "marketing":
- uni.navigateTo({
- url: "/pages/product/goods?id=" + val.id + "goodsId=" + val.goodsId,
- });
- break;
- case "pages":
- uni.navigateTo({
- url: val.___path + "?id=" + val.id + "&title=" + val.title,
- });
- break;
- case "other":
- switch (val.title || item.title) {
- case "首页":
- uni.switchTab({
- url: `/pages/tabbar/home/index`,
- });
- break;
- case "购物车":
- uni.switchTab({
- url: `/pages/tabbar/cart/cartList`,
- });
- return;
- case "个人中心":
- uni.switchTab({
- url: `/pages/tabbar/user/my`,
- });
- break;
- case "收藏商品":
- uni.navigateTo({
- url: `/pages/mine/myCollect`,
- });
- break;
- case "我的订单":
- uni.navigateTo({
- url: `/pages/order/myOrder?status=0`,
- });
- break;
- case "领券中心":
- uni.navigateTo({
- url: `/pages/cart/coupon/couponCenter`,
- });
- break;
- case "签到":
- uni.navigateTo({
- url: `/pages/mine/signIn`,
- });
- break;
- case "秒杀频道":
- uni.navigateTo({
- url: `/pages/promotion/seckill`,
- });
- break;
- case "拼团频道":
- uni.navigateTo({
- url: `/pages/promotion/joinGroup`,
- });
- break;
- case "小程序直播":
- uni.navigateTo({
- url: `/pages/promotion/lives`,
- });
- break;
- case "砍价":
- uni.navigateTo({
- url: `/pages/promotion/bargain/list`,
- });
- break;
- case "积分商城":
- uni.navigateTo({
- url: `/pages/promotion/point/pointList`,
- });
- break;
- case "店铺列表":
- uni.navigateTo({
- url: `/pages/product/shopList`,
- });
- break;
- default:
- // #ifdef H5
- window.location.href = val.url || item.link;
- // #endif
- // #ifdef APP-PLUS
- plus.runtime.openURL(val.url || item.link) //不需要拼接\
- // #endif
- break;
- }
-
- break;
- }
-}
+ },
+ });
+ }
\ No newline at end of file
diff --git a/pages/tabbar/special/special.vue b/pages/tabbar/special/special.vue
new file mode 100644
index 0000000..ea7b5e2
--- /dev/null
+++ b/pages/tabbar/special/special.vue
@@ -0,0 +1,247 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 1776f43425eaffcd01d78398583c1e8c7144f6bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=9C=E8=89=AFking?= <2244255345@qq.com>
Date: Tue, 11 Oct 2022 18:27:42 +0800
Subject: [PATCH 07/22] =?UTF-8?q?=E7=AB=99=E5=86=85=E4=BF=A1=20app?=
=?UTF-8?q?=E7=AB=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/message.js | 18 ++++
pages.json | 6 ++
pages/tabbar/home/title.vue | 182 ++++++++++++++++++++++++++++++++++++
3 files changed, 206 insertions(+)
create mode 100644 pages/tabbar/home/title.vue
diff --git a/api/message.js b/api/message.js
index c6e7dd8..9b8a4f2 100644
--- a/api/message.js
+++ b/api/message.js
@@ -48,6 +48,24 @@ export function messageMarkAsRead(ids) {
});
}
+//读取站内消息
+export function editMessages(message_id,params){
+ return http.request({
+ url:`/message/member/${message_id}`,
+ method:Method.PUT,
+ needToken:true,
+ params
+ })
+}
+//获取站内消息
+export function messages(params) {
+ return http.request({
+ url: "/message/member",
+ method: Method.GET,
+ needToken: true,
+ params,
+ });
+}
/**
* 获取物流消息列表
diff --git a/pages.json b/pages.json
index 6838480..9458b7b 100644
--- a/pages.json
+++ b/pages.json
@@ -26,6 +26,12 @@
}
}
},
+ {
+ "path": "pages/tabbar/home/title",
+ "style": {
+ "navigationBarTitleText": "消息"
+ }
+ },
{
"path": "pages/tabbar/cart/cartList",
"style": {
diff --git a/pages/tabbar/home/title.vue b/pages/tabbar/home/title.vue
new file mode 100644
index 0000000..a007339
--- /dev/null
+++ b/pages/tabbar/home/title.vue
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+ {{item.title}}
+ {{item.createTime}}
+
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+ {{item.createTime}}
+
+
+
+
+
+
+
+
+
+
+
+
+
From 6ee0abd150a3e235c86fd6a648a4dbcc75b6561c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=9C=E8=89=AFking?= <2244255345@qq.com>
Date: Tue, 11 Oct 2022 19:09:22 +0800
Subject: [PATCH 08/22] =?UTF-8?q?=E7=AB=99=E5=86=85=E4=BF=A1=20=E5=85=A5?=
=?UTF-8?q?=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/tabbar/home/template/tpl_search.vue | 17 +++++++++++++++++
static/img/title.png | Bin 0 -> 7792 bytes
2 files changed, 17 insertions(+)
create mode 100644 static/img/title.png
diff --git a/pages/tabbar/home/template/tpl_search.vue b/pages/tabbar/home/template/tpl_search.vue
index 2bbc598..4332785 100644
--- a/pages/tabbar/home/template/tpl_search.vue
+++ b/pages/tabbar/home/template/tpl_search.vue
@@ -4,6 +4,9 @@
{{ res.list[0].title }}
+
+
+
+ .desc-light {
+ color: #999999;
+
+ >span {
+ color: #333;
+ margin-left: 8rpx;
+ }
+ }
+
+ .mobile {
+ margin-top: 80rpx;
+ }
+
+ .disable {
+ background: linear-gradient(90deg, #ffdcba 2.21%, #ffcfb2 99.86%);
+ }
+
+ .fetch {
+ background: linear-gradient(57.72deg, #ff8a19 18.14%, #ff5e00 98.44%);
+ }
+
+ .btn {
+ border-radius: 100px;
+ width: 590rpx;
+ margin-top: 97rpx;
+ height: 80rpx;
+ font-size: 30rpx;
+ line-height: 80rpx;
+ text-align: center;
+ color: #ffffff;
+ }
+
+ .tips {
+ font-size: 12px;
+ line-height: 20px;
+ margin-top: 32rpx;
+ width: 546rpx;
+
+ >span {
+ color: $light-color;
+ }
+ }
+
+ .fetch-btn {
+ width: 370rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ text-align: center;
+ background: #f2f2f2;
+ border-radius: 100rpx;
+ font-size: 28rpx;
+ color: #999;
+
+ margin: 71rpx auto 0 auto;
+ }
+
+ .login-list {
+ display: flex;
+ width: 590rpx;
+ position: absolute;
+ top: 1200rpx;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .login-item {
+ width: 80rpx;
+ border-radius: 10rpx;
+ height: 80rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ margin: 0 20rpx;
+ }
+
+ .user-password-tips {
+ text-align: center;
+ color: $main-color;
+ margin: 20px 0;
+ }
+
diff --git a/project.config.json b/project.config.json
new file mode 100644
index 0000000..0695933
--- /dev/null
+++ b/project.config.json
@@ -0,0 +1,28 @@
+{
+ "appid": "wx98ebde1da5b340d4",
+ "compileType": "miniprogram",
+ "libVersion": "2.27.0",
+ "packOptions": {
+ "ignore": [],
+ "include": []
+ },
+ "setting": {
+ "coverView": true,
+ "es6": true,
+ "postcss": true,
+ "minified": true,
+ "enhance": true,
+ "showShadowRootInWxmlPanel": true,
+ "packNpmRelationList": [],
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
+ }
+ },
+ "condition": {},
+ "editorSetting": {
+ "tabIndent": "insertSpaces",
+ "tabSize": 2
+ }
+}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
new file mode 100644
index 0000000..1fa0e89
--- /dev/null
+++ b/project.private.config.json
@@ -0,0 +1,7 @@
+{
+ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+ "projectname": "lilishop-uniapp",
+ "setting": {
+ "compileHotReLoad": true
+ }
+}
\ No newline at end of file
From 6b3b61acb56c5515b4a30a580523190871f5899d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?=
<17633066053@163.com>
Date: Mon, 17 Oct 2022 14:27:24 +0800
Subject: [PATCH 11/22] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E5=A4=8D?=
=?UTF-8?q?=E6=90=9C=E7=B4=A2=E9=A1=B5=E9=9D=A2=E5=B1=95=E5=BC=80=E5=8E=86?=
=?UTF-8?q?=E5=8F=B2=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/navigation/search/searchPage.vue | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pages/navigation/search/searchPage.vue b/pages/navigation/search/searchPage.vue
index 449312a..765834c 100644
--- a/pages/navigation/search/searchPage.vue
+++ b/pages/navigation/search/searchPage.vue
@@ -35,7 +35,8 @@
@click="doSearch(keyword)">
{{ keyword }}
- 展示更多
+
+ 展示更多
@@ -202,7 +203,7 @@ export default {
empty:false,
scrollTop: 0,
loadIndex: 10,
- oldKeywordIndex: "",
+ oldKeywordIndex: 0,
selectedWay: {
brand: [],
categoryId: [],
@@ -570,7 +571,7 @@ export default {
key: "OldKeys",
success: (res) => {
var OldKeys = JSON.parse(res.data);
- this.oldKeywordIndex = res.data.length;
+ this.oldKeywordIndex = OldKeys.length;
for (let i = 0; i < index; i++) {
this.oldKeywordList.push(OldKeys[i]);
}
From f08d166c862cba2a05998c25244c4194608a578d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?=
<17633066053@163.com>
Date: Mon, 17 Oct 2022 15:28:31 +0800
Subject: [PATCH 12/22] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=9C=A8=E5=85=B3=E4=BA=8E=E6=88=91=E4=BB=AC=E7=AD=89=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/mine/help/tips.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages/mine/help/tips.vue b/pages/mine/help/tips.vue
index 5401e69..19d3086 100644
--- a/pages/mine/help/tips.vue
+++ b/pages/mine/help/tips.vue
@@ -1,6 +1,6 @@
-
+
From d01edbdfe2a3a2af10a9a8fcaab7956726b8d9ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?=
<17633066053@163.com>
Date: Wed, 19 Oct 2022 11:56:42 +0800
Subject: [PATCH 13/22] =?UTF-8?q?feat:=20:sparkles:=20=E6=A5=BC=E5=B1=82?=
=?UTF-8?q?=E8=A3=85=E4=BF=AE=E6=96=B0=E5=A2=9E=E7=BB=91=E5=AE=9A=E5=88=86?=
=?UTF-8?q?=E7=B1=BB=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/m-goods-list/base-list.vue | 458 +++++++++++++----------
pages/tabbar/home/index.vue | 5 +
pages/tabbar/home/template/tpl_goods.vue | 120 +++++-
pages/tabbar/home/views.vue | 11 +-
4 files changed, 385 insertions(+), 209 deletions(-)
diff --git a/components/m-goods-list/base-list.vue b/components/m-goods-list/base-list.vue
index a64c302..bae5637 100644
--- a/components/m-goods-list/base-list.vue
+++ b/components/m-goods-list/base-list.vue
@@ -1,198 +1,276 @@
-
-
-
-
-
-
-
-
-
-
{{ item.goodsName }}
-
-
- ¥{{ $options.filters.goodsFormatPrice(item.price )[0] }} .{{
- $options.filters.goodsFormatPrice(item.price )[1]
- }}
-
-
-
-
- 已售 {{ item.buyCount || '0' }}
- {{ item.commentNum || '0' }}条评论
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ¥{{
+ $options.filters.goodsFormatPrice(item.price)[0]
+ }} .{{ $options.filters.goodsFormatPrice(item.price)[1] }}
+
+
+
+ 已售 {{ item.buyCount || "0" }}
+ {{ item.commentNum || "0" }}条评论
+
+
+
+
+ {{ item.storeName || "暂无" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.goodsName }}
+
+
+
+ ¥{{ $options.filters.goodsFormatPrice(item.price)[0] }} .{{ $options.filters.goodsFormatPrice(item.price)[1] }}
+
+
+
+
+ 已售 {{ item.buyCount || "0" }}
+ {{ item.commentNum || "0" }}条评论
+
+
+
+
+
+
-
diff --git a/pages/tabbar/home/index.vue b/pages/tabbar/home/index.vue
index cbeebf5..ea9406e 100644
--- a/pages/tabbar/home/index.vue
+++ b/pages/tabbar/home/index.vue
@@ -15,6 +15,11 @@ export default {
},
};
},
+ onReachBottom(){
+ // 给子级监听触底加载
+ uni.$emit('onReachBottom',true)
+ },
+
onPullDownRefresh() {
this.$refs.tpl.init();
diff --git a/pages/tabbar/home/template/tpl_goods.vue b/pages/tabbar/home/template/tpl_goods.vue
index 98f6b15..9075aa0 100644
--- a/pages/tabbar/home/template/tpl_goods.vue
+++ b/pages/tabbar/home/template/tpl_goods.vue
@@ -1,21 +1,38 @@
-
-
+
{{ title.title }}
{{ title.desc }}
-
+
-
+
@@ -24,9 +41,42 @@
{{ item.title }}
-
¥{{ $options.filters.goodsFormatPrice(item.price )[0] }} .{{
- $options.filters.goodsFormatPrice(item.price)[1]
- }}
+
+ ¥{{ $options.filters.goodsFormatPrice(item.price)[0] }} .{{ $options.filters.goodsFormatPrice(item.price)[1] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.goodsName }}
+
+
+
+ ¥{{ $options.filters.goodsFormatPrice(item.price)[0] }} .{{ $options.filters.goodsFormatPrice(item.price)[1] }}
+
@@ -34,6 +84,7 @@