From 552abd895c2becf2e818ee925c539fb91c0eafce Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Fri, 17 Apr 2020 13:48:54 +0800
Subject: [PATCH] 1.1.8
---
pages/mall/index.wxs | 16 +++++++++++++---
pages/mall/order-info/index.wxml | 2 +-
pages/mall/order-offer/index.wxml | 4 ++--
pages/mall/page-list/index.wxml | 7 ++++---
pages/mall/page-list/index.wxss | 9 +++++----
pages/mall/shops/index.wxml | 1 +
utils/request.js | 2 +-
7 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/pages/mall/index.wxs b/pages/mall/index.wxs
index 0eebd2c..2a566ea 100644
--- a/pages/mall/index.wxs
+++ b/pages/mall/index.wxs
@@ -1,4 +1,3 @@
-
function formatePrice(price) {
return Number(parseFloat(price) / 100).toFixed(2)
}
@@ -6,7 +5,7 @@ function formatePrice(price) {
function formateWeight(weight) {
return Number(parseFloat(weight) / 1000).toFixed(3)
}
-
+
function isEmpty(val) {
return typeof val === 'undefined' || val === '' || val === null
}
@@ -37,8 +36,19 @@ function formateDate(datetime) {
return datetime + week
}
+function formateText(text, length) {
+ if (!text) {
+ return ''
+ }
+ if (text.length <= length) {
+ return text
+ }
+ return text.substring(0, length) + '...'
+}
+
module.exports = {
formatePrice: formatePrice,
formateWeight: formateWeight,
- formateDate: formateDate
+ formateDate: formateDate,
+ formateText: formateText
}
\ No newline at end of file
diff --git a/pages/mall/order-info/index.wxml b/pages/mall/order-info/index.wxml
index dca5053..2bdfb41 100644
--- a/pages/mall/order-info/index.wxml
+++ b/pages/mall/order-info/index.wxml
@@ -19,7 +19,7 @@
{{orderInfo.name}}
- {{orderInfo.outline}}
+ {{orderInfo.outline}}
diff --git a/pages/mall/order-offer/index.wxml b/pages/mall/order-offer/index.wxml
index e70a767..c821b9a 100644
--- a/pages/mall/order-offer/index.wxml
+++ b/pages/mall/order-offer/index.wxml
@@ -78,8 +78,8 @@
- 预付定金
- 预付款10%,余款货到付款
+ 预付定金
+ 预付款10%,余款货到付款
diff --git a/pages/mall/page-list/index.wxml b/pages/mall/page-list/index.wxml
index 6983231..485a028 100644
--- a/pages/mall/page-list/index.wxml
+++ b/pages/mall/page-list/index.wxml
@@ -1,3 +1,4 @@
+
@@ -11,12 +12,12 @@
已拼{{item.soldNum}}{{item.unit}}
- {{item.outline}}
- {{item.summary}}
+ {{formate.formateText(item.outline, 16)}}
+ {{formate.formateText(item.summary, 14)}}
¥{{item.price}}
- 库存:{{item.stockNumber}}{{item.unit}}
+ 库存:{{item.stockNumber}}{{item.unit}}
diff --git a/pages/mall/page-list/index.wxss b/pages/mall/page-list/index.wxss
index b07996b..50a13cf 100644
--- a/pages/mall/page-list/index.wxss
+++ b/pages/mall/page-list/index.wxss
@@ -32,7 +32,7 @@
.page-outline {
margin-top: 8rpx;
- font-size: 24rpx;
+ font-size: 28rpx;
font-family: PingFang-SC-Regular, PingFang-SC;
font-weight: 400;
color: rgba(51, 51, 51, 1);
@@ -47,7 +47,7 @@
.page-summary {
margin-top: 8rpx;
- font-size: 24rpx;
+ font-size: 28rpx;
font-family: PingFang-SC-Regular, PingFang-SC;
font-weight: 400;
color: rgba(51, 51, 51, 1);
@@ -69,6 +69,7 @@
}
.page-price {
+ line-height: 30rpx;
font-size: 32rpx;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
@@ -76,11 +77,11 @@
}
.page-stock {
- font-size: 24rpx;
+ font-size: 20rpx;
+ line-height: 20rpx;
font-family: PingFang-SC-Regular, PingFang-SC;
font-weight: 400;
color: rgba(153, 153, 153, 1);
- line-height: 14px;
}
.image-load {
diff --git a/pages/mall/shops/index.wxml b/pages/mall/shops/index.wxml
index bbfd255..dd19238 100644
--- a/pages/mall/shops/index.wxml
+++ b/pages/mall/shops/index.wxml
@@ -1,4 +1,5 @@
+
原纸商城
diff --git a/utils/request.js b/utils/request.js
index 3b13421..86894e7 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -27,7 +27,7 @@ function fun(url, method, data, header) {
what: 666,
desc: 'Logout'
})
- resolve(result.data)
+ reject(result.data)
} else {
var msg = '数据错误'
if (result.data.message) {