From 4da852944e22fd33eff3f06e47e9bb716170d555 Mon Sep 17 00:00:00 2001
From: ZF sun <34314687@qq.com>
Date: Sun, 4 Jan 2026 09:40:09 +0800
Subject: [PATCH 01/26] =?UTF-8?q?chore(=E4=BB=A3=E7=A0=81=E5=90=88?=
=?UTF-8?q?=E5=B9=B6):=20=E4=BB=A3=E7=A0=81=E4=BB=8ECustom/common=E5=88=86?=
=?UTF-8?q?=E6=94=AF=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 5 +-
common/css/main.scss | 1754 +++++------
common/css/mp_html_patch.scss | 4 +
common/js/config.js | 32 +-
common/js/golbalConfig.js | 36 +-
common/js/http.js | 2 +-
common/js/lang.js | 1 +
common/js/style_color.js | 879 +++---
common/js/util.js | 33 +-
components-diy/diy-bottom-nav.vue | 4 +-
components-diy/diy-category-item.vue | 4 +-
components-diy/diy-category.vue | 5 +-
components-diy/diy-digit.vue | 4 +-
components-diy/diy-index-page.vue | 4 +-
components-diy/diy-listmenu.vue | 2 +-
components-diy/diy-text.vue | 2 +-
components/common-payment/common-payment.vue | 19 +
components/hover-nav/hover-nav.vue | 6 +-
docs/H5_ROUTER_FIX_README.md | 32 +
docs/HISTORY_MODE_SUB_DIR_DEPLOY.md | 756 +++++
docs/SERVER_ROUTER_FALLBACK_CONFIG.md | 140 +
lang/en-us/contact/contact.js | 16 +-
lang/en-us/member/index.js | 24 +-
lang/zh-cn/agreement/contenr.js | 1 +
lang/zh-cn/contact/contact.js | 16 +-
lang/zh-cn/goods/category.js | 13 +-
lang/zh-cn/goods/detail.js | 6 +-
lang/zh-cn/goods/list.js | 22 +-
lang/zh-cn/member/index.js | 37 +-
pages.json | 8 +
pages/empty/index.vue | 3 +-
pages/index/index.vue | 216 +-
pages_goods/cart.vue | 3 +-
pages_goods/category.vue | 3 +-
pages_goods/detail.vue | 3 +-
pages_goods/list.vue | 12 +-
pages_goods/public/css/list.scss | 10 +
pages_order/detail.vue | 3 +-
pages_order/detail_local_delivery.vue | 3 +-
pages_order/detail_pickup.vue | 3 +-
pages_order/detail_point.vue | 3 +-
pages_order/list.vue | 3 +-
pages_order/payment.vue | 3 +-
pages_promotion/fenxiao/apply.vue | 3 +-
pages_promotion/fenxiao/bill.vue | 310 +-
pages_promotion/fenxiao/child_fenxiao.vue | 599 ++--
pages_promotion/fenxiao/goods_list.vue | 19 +-
pages_promotion/fenxiao/index.vue | 1189 +++----
pages_promotion/fenxiao/level.vue | 637 ++--
pages_promotion/fenxiao/order.vue | 421 +--
pages_promotion/fenxiao/order_detail.vue | 755 +++--
pages_promotion/fenxiao/promote.vue | 753 ++---
pages_promotion/fenxiao/promote_code.vue | 611 ++--
pages_promotion/fenxiao/ranking_list.vue | 849 ++---
pages_promotion/fenxiao/relation.vue | 327 +-
pages_promotion/fenxiao/team.vue | 736 ++---
pages_promotion/fenxiao/withdraw_apply.vue | 3 +-
pages_promotion/fenxiao/withdraw_list.vue | 433 +--
pages_promotion/fenxiao/withdrawal_detail.vue | 253 +-
pages_promotion/merch/detail.vue | 23 +-
pages_promotion/merch/merchcategory.vue | 3 +-
pages_promotion/merch/public/category.scss | 1856 +++++------
pages_promotion/point/detail.vue | 3 +-
pages_promotion/point/goods_list.vue | 17 +-
pages_promotion/point/list.vue | 3 +-
pages_promotion/point/order_list.vue | 20 +-
pages_promotion/point/payment.vue | 25 +-
pages_promotion/point/result.vue | 185 +-
pages_tool/agreement/contenr.vue | 107 +-
pages_tool/article/detail.vue | 3 +-
pages_tool/article/list.vue | 20 +-
pages_tool/contact/contact.vue | 100 +-
pages_tool/form/form.vue | 3 +-
pages_tool/form/formdata.vue | 165 +
pages_tool/goods/brand.vue | 16 +-
pages_tool/goods/coupon.vue | 19 +-
pages_tool/goods/coupon_receive.vue | 3 +-
pages_tool/goods/evaluate.vue | 706 +++--
pages_tool/goods/not_exist.vue | 85 +-
pages_tool/goods/search.vue | 3 +-
pages_tool/help/detail.vue | 3 +-
pages_tool/help/list.vue | 3 +-
pages_tool/index/diy.vue | 153 +-
pages_tool/login/find.vue | 3 +-
pages_tool/login/login.vue | 894 +++---
pages_tool/member/account.vue | 13 +-
pages_tool/member/account_edit.vue | 3 +-
pages_tool/member/address.vue | 982 +++---
pages_tool/member/address_edit.vue | 3 +-
pages_tool/member/apply_withdrawal.vue | 3 +-
pages_tool/member/assets.vue | 3 +-
pages_tool/member/balance.vue | 3 +-
pages_tool/member/balance_detail.vue | 11 +-
pages_tool/member/cancellation.vue | 3 +-
pages_tool/member/cancelrefuse.vue | 3 +-
pages_tool/member/cancelstatus.vue | 3 +-
pages_tool/member/cancelsuccess.vue | 3 +-
pages_tool/member/card.vue | 3 +-
pages_tool/member/card_agreement.vue | 3 +-
pages_tool/member/card_buy.vue | 3 +-
pages_tool/member/collection.vue | 11 +-
pages_tool/member/contact.vue | 3 +-
pages_tool/member/coupon.vue | 11 +-
pages_tool/member/footprint.vue | 11 +-
pages_tool/member/index.vue | 190 +-
pages_tool/member/info.vue | 3 +-
pages_tool/member/info_edit.vue | 3 +-
pages_tool/member/invite_friends.vue | 3 +-
pages_tool/member/level.vue | 3 +-
pages_tool/member/level_growth_rules.vue | 547 ++--
pages_tool/member/modify_face.vue | 3 +-
pages_tool/member/pay_password.vue | 3 +-
pages_tool/member/point.vue | 3 +-
pages_tool/member/point_detail.vue | 11 +-
pages_tool/member/withdrawal.vue | 11 +-
pages_tool/member/withdrawal_detail.vue | 3 +-
pages_tool/notice/detail.vue | 3 +-
pages_tool/notice/list.vue | 283 +-
pages_tool/order/activist.vue | 9 +-
pages_tool/order/detail_virtual.vue | 3 +-
pages_tool/order/evaluate.vue | 171 +-
pages_tool/order/logistics.vue | 3 +-
pages_tool/order/refund.vue | 3 +-
pages_tool/order/refund_batch.vue | 3 +-
pages_tool/order/refund_detail.vue | 3 +-
pages_tool/order/refund_goods_select.vue | 3 +-
pages_tool/order/refund_type_select.vue | 3 +-
pages_tool/pay/cashier.vue | 13 +-
pages_tool/pay/index.vue | 36 +-
pages_tool/pay/result.vue | 3 +-
pages_tool/pay/wx_pay.vue | 187 +-
pages_tool/recharge/list.vue | 3 +-
pages_tool/recharge/order_list.vue | 4 +-
pages_tool/storeclose/storeclose.vue | 197 +-
pages_tool/vr/index.vue | 103 +-
pages_tool/webview/webview.vue | 3 +-
store/index.js | 63 +-
uni_modules/mp-html/README.md | 453 +--
.../mp-html/components/mp-html/mp-html.vue | 998 +++---
.../mp-html/components/mp-html/node/node.vue | 1209 +++----
.../mp-html/components/mp-html/parser.js | 2793 +++++++++--------
uni_modules/mp-html/package.json | 150 +-
.../static/app-plus/mp-html/js/handler.js | 255 +-
.../static/app-plus/mp-html/local.html | 34 +-
vue.config.js | 103 +-
145 files changed, 13781 insertions(+), 11628 deletions(-)
create mode 100644 common/css/mp_html_patch.scss
create mode 100644 docs/H5_ROUTER_FIX_README.md
create mode 100644 docs/HISTORY_MODE_SUB_DIR_DEPLOY.md
create mode 100644 docs/SERVER_ROUTER_FALLBACK_CONFIG.md
create mode 100644 lang/zh-cn/agreement/contenr.js
create mode 100644 pages_tool/form/formdata.vue
diff --git a/App.vue b/App.vue
index af2d651..7382b24 100644
--- a/App.vue
+++ b/App.vue
@@ -1,7 +1,7 @@
-
-
+
+
+
+
+
+
+
+
+ {{ item.type_name }}
+ 账单编号: {{ item.account_no }}
+ {{ $util.timeStampTurnTime(item.create_time) }}
+
+
+ {{ item.money > 0 ? '+' + item.money : item.money }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/fenxiao/child_fenxiao.vue b/pages_promotion/fenxiao/child_fenxiao.vue
index 4fcf443..a3f6786 100644
--- a/pages_promotion/fenxiao/child_fenxiao.vue
+++ b/pages_promotion/fenxiao/child_fenxiao.vue
@@ -1,289 +1,310 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.nickname }}
- {{ item.level_name }}
-
- 加入时间:{{ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}
-
-
- {{ item.one_child_fenxiao_num + item.one_child_num }} 人
- {{ item.order_num }} 单
- {{ item.order_money|moneyFormat }} 元
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.nickname }}
+ {{
+ item.level_name }}
+
+ 加入时间:{{
+ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}
+
+
+ {{ item.one_child_fenxiao_num + item.one_child_num }} 人
+ {{ item.order_num }} 单
+ {{ item.order_money | moneyFormat }} 元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/fenxiao/goods_list.vue b/pages_promotion/fenxiao/goods_list.vue
index 85fdee1..ef3f20c 100644
--- a/pages_promotion/fenxiao/goods_list.vue
+++ b/pages_promotion/fenxiao/goods_list.vue
@@ -1,6 +1,5 @@
-
-
+
@@ -133,10 +132,26 @@
diff --git a/pages_promotion/fenxiao/index.vue b/pages_promotion/fenxiao/index.vue
index 370447d..dc128d6 100644
--- a/pages_promotion/fenxiao/index.vue
+++ b/pages_promotion/fenxiao/index.vue
@@ -1,587 +1,604 @@
-
-
-
-
-
-
-
-
-
-
- 可{{ fenxiaoWords.withdraw }}(元)
-
- 提现明细
-
-
-
- {{ info.account }}
-
-
-
-
-
- 提现中(元)
- {{ info.account_withdraw_apply | moneyFormat }}
-
-
- 待入账(元)
- {{ info.in_progress_money | moneyFormat }}
-
-
- 提现
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 您还不是{{ fenxiaoWords.fenxiao_name }},请先提交申请
- 立即加入
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/level.vue b/pages_promotion/fenxiao/level.vue
index 5a5f0d5..a673cb0 100644
--- a/pages_promotion/fenxiao/level.vue
+++ b/pages_promotion/fenxiao/level.vue
@@ -1,320 +1,319 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ fenxiaoInfo.nickname }}
- {{ item.level_name }}
-
-
-
- 一级分佣比率
- {{ item.one_rate }}%
-
-
- 二级分佣比率
- {{ item.two_rate }}%
-
-
- 三级分佣比率
- {{ item.three_rate }}%
-
-
-
-
-
-
-
-
-
-
-
-
-
- 快速升级技巧
-
- {{ levelInfo.complete > levelInfo.task_num ? levelInfo.task_num : levelInfo.complete }}
- /{{ levelInfo.task_num }}
-
-
-
-
-
-
- {{item.title}}
-
-
-
- {{ item.progress == 100 ? '已完成' : '未完成' }}
-
-
-
-
-
- {{item.desc}}
-
- {{ item.value }}
- /{{ item.condition }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/order.vue b/pages_promotion/fenxiao/order.vue
index 589d0c2..36e0a17 100644
--- a/pages_promotion/fenxiao/order.vue
+++ b/pages_promotion/fenxiao/order.vue
@@ -1,203 +1,218 @@
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ orderItem.sku_name }}
-
- 返{{ fenxiaoWords.account }}
- {{ $lang('common.currencySymbol') }}
- {{ parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}
- .{{ parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}
-
-
-
-
- {{ $lang('common.currencySymbol') }}
- {{ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
- .{{ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}
-
-
-
-
- {{ orderItem.num }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ orderItem.sku_name }}
+
+ 返{{ fenxiaoWords.account }}
+ {{ $lang('common.currencySymbol') }}
+ {{ parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}
+ .{{ parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}
+
+
+
+
+ {{ $lang('common.currencySymbol') }}
+ {{ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
+ .{{ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}
+
+
+
+
+ {{ orderItem.num }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/fenxiao/order_detail.vue b/pages_promotion/fenxiao/order_detail.vue
index 64b1888..4158687 100644
--- a/pages_promotion/fenxiao/order_detail.vue
+++ b/pages_promotion/fenxiao/order_detail.vue
@@ -1,378 +1,377 @@
-
-
-
-
-
-
-
-
-
-
- {{ orderData.sku_name }}
-
-
-
- ¥
- {{ parseFloat(orderData.price).toFixed(2).split(".")[0] }}
- .{{ parseFloat(orderData.price).toFixed(2).split(".")[1] }}
-
-
-
-
-
- {{ orderData.num }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 订单编号:
- {{ orderData.order_no }}
-
-
- 分佣层级:
- {{ orderData.commission_level }}级
-
-
- 返佣金额:
-
- ¥
- {{ parseFloat(orderData.commission).toFixed(2).split(".")[0] }}
- .{{ parseFloat(orderData.commission).toFixed(2).split(".")[1] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ orderData.sku_name }}
+
+
+
+ ¥
+ {{ parseFloat(orderData.price).toFixed(2).split(".")[0] }}
+ .{{ parseFloat(orderData.price).toFixed(2).split(".")[1] }}
+
+
+
+
+
+ {{ orderData.num }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 订单编号:
+ {{ orderData.order_no }}
+
+
+ 分佣层级:
+ {{ orderData.commission_level }}级
+
+
+ 返佣金额:
+
+ ¥
+ {{ parseFloat(orderData.commission).toFixed(2).split(".")[0] }}
+ .{{ parseFloat(orderData.commission).toFixed(2).split(".")[1] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/fenxiao/promote.vue b/pages_promotion/fenxiao/promote.vue
index e234f96..e634a8d 100644
--- a/pages_promotion/fenxiao/promote.vue
+++ b/pages_promotion/fenxiao/promote.vue
@@ -1,363 +1,390 @@
-
-
-
-
-
-
-
-
-
- 累计收益
- {{ detailData.total_commission }}
- 元
-
-
-
-
-
- 已邀请好友
- 已下单好友
-
-
-
-
-
-
- {{ item.nickname }}
-
-
-
- 暂无已邀请好友,快去邀请吧
-
-
-
-
-
-
- 暂无活动规则
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 累计收益
+ {{ detailData.total_commission }}
+ 元
+
+
+
+
+
+ 已邀请好友
+ 已下单好友
+
+
+
+
+
+
+ {{ item.nickname }}
+
+
+
+ 暂无已邀请好友,快去邀请吧
+
+
+
+
+
+
+ 暂无活动规则
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/fenxiao/promote_code.vue b/pages_promotion/fenxiao/promote_code.vue
index c0d5480..d1063e3 100644
--- a/pages_promotion/fenxiao/promote_code.vue
+++ b/pages_promotion/fenxiao/promote_code.vue
@@ -1,307 +1,306 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 长按识别图中二维码
-
-
-
- 保存海报
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/ranking_list.vue b/pages_promotion/fenxiao/ranking_list.vue
index 1f6c723..6a134eb 100644
--- a/pages_promotion/fenxiao/ranking_list.vue
+++ b/pages_promotion/fenxiao/ranking_list.vue
@@ -1,416 +1,433 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{info.nickname}}
-
- 点击提现
- 我的团队
-
-
-
-
-
-
-
-
-
-
-
- 分销佣金
- {{ info.today_commission}}元
-
-
-
-
-
-
-
-
-
- 佣金排行
- 您排行第{{ ranking }}名
-
-
-
-
-
-
-
-
-
-
-
- 推广人数
- {{ info.one_child_num}}人
-
-
-
-
-
-
-
-
-
- 推广排行
- 您排行第{{ ranking }}名
-
-
-
-
-
- 佣金排行
- 推广排行
-
-
-
- {{ index + 1 }}
-
-
-
-
- {{ item.nickname }}
-
-
- ¥{{ item.total_commission|moneyFormat }}
- {{ item.child_num }}人
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ {{info.nickname}}
+
+ 点击提现
+ 我的团队
+
+
+
+
+
+
+
+
+
+
+
+ 分销佣金
+ {{ info.today_commission}}元
+
+
+
+
+
+
+
+
+
+ 佣金排行
+ 您排行第{{ ranking }}名
+
+
+
+
+
+
+
+
+
+
+
+ 推广人数
+ {{ info.one_child_num}}人
+
+
+
+
+
+
+
+
+
+ 推广排行
+ 您排行第{{ ranking }}名
+
+
+
+
+
+ 佣金排行
+ 推广排行
+
+
+
+ {{ index + 1 }}
+
+
+
+
+ {{ item.nickname }}
+
+
+ ¥{{ item.total_commission|moneyFormat }}
+ {{ item.child_num }}人
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/fenxiao/relation.vue b/pages_promotion/fenxiao/relation.vue
index b1d5b9c..36927b5 100644
--- a/pages_promotion/fenxiao/relation.vue
+++ b/pages_promotion/fenxiao/relation.vue
@@ -1,152 +1,175 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ orderItem.sku_name }}
-
- 返{{ fenxiaoWords.account }}
- {{ $lang('common.currencySymbol') }}
- {{ orderItem.commission }}
-
-
-
-
- {{ $lang('common.currencySymbol') }}
- {{ orderItem.price }}
-
-
-
-
- {{ orderItem.num }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ orderItem.sku_name }}
+
+ 返{{ fenxiaoWords.account }}
+ {{
+ $lang('common.currencySymbol') }}
+ {{ orderItem.commission
+ }}
+
+
+
+
+ {{ $lang('common.currencySymbol') }}
+ {{ orderItem.price }}
+
+
+
+
+ {{ orderItem.num }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/fenxiao/team.vue b/pages_promotion/fenxiao/team.vue
index 878cc7e..87d9a47 100644
--- a/pages_promotion/fenxiao/team.vue
+++ b/pages_promotion/fenxiao/team.vue
@@ -1,355 +1,381 @@
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.nickname }}
- {{ fenxiaoWords.fenxiao_name }}
-
- 加入时间:{{ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}
-
-
-
- {{ item.one_child_num }}
- 人
-
-
- {{ item.order_num }}
- 单
-
-
- {{ item.order_money | moneyFormat }}
- 元
-
-
-
-
-
-
-
- {{ item.nickname }}
-
-
- 加入时间:{{ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}
-
-
-
- 0
- 人
-
-
- {{ item.order_num }}
- 单
-
-
- {{ item.order_money | moneyFormat }}
- 元
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.nickname }}
+ {{
+ fenxiaoWords.fenxiao_name }}
+
+ 加入时间:{{
+ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}
+
+
+
+ {{ item.one_child_num }}
+ 人
+
+
+ {{ item.order_num }}
+ 单
+
+
+ {{ item.order_money | moneyFormat }}
+ 元
+
+
+
+
+
+
+
+ {{ item.nickname }}
+
+
+ 加入时间:{{
+ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}
+
+
+
+ 0
+ 人
+
+
+ {{ item.order_num }}
+ 单
+
+
+ {{ item.order_money | moneyFormat }}
+ 元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/fenxiao/withdraw_apply.vue b/pages_promotion/fenxiao/withdraw_apply.vue
index f1e109d..e5dfb4e 100644
--- a/pages_promotion/fenxiao/withdraw_apply.vue
+++ b/pages_promotion/fenxiao/withdraw_apply.vue
@@ -1,6 +1,5 @@
-
-
+
提现到
diff --git a/pages_promotion/fenxiao/withdraw_list.vue b/pages_promotion/fenxiao/withdraw_list.vue
index 4c0a66f..60812fd 100644
--- a/pages_promotion/fenxiao/withdraw_list.vue
+++ b/pages_promotion/fenxiao/withdraw_list.vue
@@ -1,209 +1,224 @@
-
-
-
-
-
-
-
-
-
-
- {{ item.transfer_type=='balance'&&'余额' || item.transfer_type=='alipay'&&'支付宝' || item.transfer_type=='bank'&&'银行卡' || item.transfer_type=='wechatpay'&&'微信' }}
-
- {{ $util.timeStampTurnTime(item.create_time) }}
-
-
-
- ¥{{ item.money }}
- {{ item.status_name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ item.transfer_type=='balance'&&'余额' || item.transfer_type=='alipay'&&'支付宝' || item.transfer_type=='bank'&&'银行卡' || item.transfer_type=='wechatpay'&&'微信' }}
+
+ {{ $util.timeStampTurnTime(item.create_time) }}
+
+
+
+ ¥{{ item.money }}
+ {{ item.status_name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/fenxiao/withdrawal_detail.vue b/pages_promotion/fenxiao/withdrawal_detail.vue
index ab18b5b..51d563a 100644
--- a/pages_promotion/fenxiao/withdrawal_detail.vue
+++ b/pages_promotion/fenxiao/withdrawal_detail.vue
@@ -1,127 +1,126 @@
-
-
-
-
- -{{ detail.money }}
-
-
-
-
-
- 当前状态
- {{ detail.status_name }}
-
-
- 交易号
- {{ detail.withdraw_no }}
-
-
- 手续费
- ¥{{ detail.withdraw_rate_money }}
-
-
- 申请时间
- {{ $util.timeStampTurnTime(detail.create_time) }}
-
-
- 审核时间
- {{ $util.timeStampTurnTime(detail.audit_time) }}
-
-
- 银行名称
- {{ detail.bank_name }}
-
-
- 收款账号
- {{ detail.account_number }}
-
-
- 拒绝理由
- {{ detail.refuse_reason }}
-
-
- 转账方式名称
- {{ detail.transfer_name }}
-
-
- 转账时间
- {{ $util.timeStampTurnTime(detail.payment_time) }}
-
-
-
-
-
-
-
-
-
-
+
+
+
+ -{{ detail.money }}
+
+
+
+
+
+ 当前状态
+ {{ detail.status_name }}
+
+
+ 交易号
+ {{ detail.withdraw_no }}
+
+
+ 手续费
+ ¥{{ detail.withdraw_rate_money }}
+
+
+ 申请时间
+ {{ $util.timeStampTurnTime(detail.create_time) }}
+
+
+ 审核时间
+ {{ $util.timeStampTurnTime(detail.audit_time) }}
+
+
+ 银行名称
+ {{ detail.bank_name }}
+
+
+ 收款账号
+ {{ detail.account_number }}
+
+
+ 拒绝理由
+ {{ detail.refuse_reason }}
+
+
+ 转账方式名称
+ {{ detail.transfer_name }}
+
+
+ 转账时间
+ {{ $util.timeStampTurnTime(detail.payment_time) }}
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/merch/detail.vue b/pages_promotion/merch/detail.vue
index e45ec69..c0a454c 100644
--- a/pages_promotion/merch/detail.vue
+++ b/pages_promotion/merch/detail.vue
@@ -1,6 +1,5 @@
-
-
+
@@ -79,7 +78,7 @@
.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}
- {{ $lang('Make') ? $lang('Make') : '咨询' }}
+ {{ $lang('Make') ? $lang('Make') : '询底价' }}
@@ -164,7 +163,7 @@
.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}
- {{ $lang('Make') ? $lang('Make') : '咨询' }}
+ {{ $lang('Make') ? $lang('Make') : '询底价' }}
@@ -294,13 +293,27 @@
import uniDrawer from '@/components/uni-drawer/uni-drawer.vue';
import uniTag from '@/components/uni-tag/uni-tag.vue';
import nsGoodsSkuIndex from '@/components/ns-goods-sku/ns-goods-sku-index.vue';
+ import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
+ import nsLogin from '@/components/ns-login/ns-login.vue';
+ import loadingCover from '@/components/loading-cover/loading-cover.vue';
+ import nsEmpty from '@/components/ns-empty/ns-empty.vue';
+ // #ifdef MP-WEIXIN
+ import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
+ // #endif
import list from './public/js/list.js';
export default {
components: {
uniDrawer,
uniTag,
- nsGoodsSkuIndex
+ nsGoodsSkuIndex,
+ MescrollUni,
+ nsLogin,
+ loadingCover,
+ nsEmpty,
+ // #ifdef MP-WEIXIN
+ privacyPopup
+ // #endif
},
data() {
return {};
diff --git a/pages_promotion/merch/merchcategory.vue b/pages_promotion/merch/merchcategory.vue
index ce7f83e..91180a8 100644
--- a/pages_promotion/merch/merchcategory.vue
+++ b/pages_promotion/merch/merchcategory.vue
@@ -1,6 +1,5 @@
-
-
+
@@ -116,11 +115,25 @@
-
-
+
+
+
+
+
+ {{ $lang('exchangeSuccess') }}
+
+ {{ $lang('see') }}
+ {{ $lang('goHome') }}
+
+
+
+
+
+
+
diff --git a/pages_tool/agreement/contenr.vue b/pages_tool/agreement/contenr.vue
index 41b7087..7dfcaa9 100644
--- a/pages_tool/agreement/contenr.vue
+++ b/pages_tool/agreement/contenr.vue
@@ -1,55 +1,54 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/article/detail.vue b/pages_tool/article/detail.vue
index e86ed84..d2c7c25 100644
--- a/pages_tool/article/detail.vue
+++ b/pages_tool/article/detail.vue
@@ -1,6 +1,5 @@
-
-
+
{{ detail.article_title }}
发表时间: {{ $util.timeStampTurnTime(detail.create_time) }}
diff --git a/pages_tool/article/list.vue b/pages_tool/article/list.vue
index fbca850..bcbbb96 100644
--- a/pages_tool/article/list.vue
+++ b/pages_tool/article/list.vue
@@ -1,6 +1,5 @@
-
-
+
@@ -35,6 +34,14 @@
+
+
diff --git a/pages_tool/goods/brand.vue b/pages_tool/goods/brand.vue
index 33e5334..1865f85 100644
--- a/pages_tool/goods/brand.vue
+++ b/pages_tool/goods/brand.vue
@@ -27,11 +27,25 @@
import uniGrid from '@/components/uni-grid/uni-grid.vue';
import uniGridItem from '@/components/uni-grid-item/uni-grid-item.vue';
import nsAdv from '@/pages_tool/components/ns-adv/ns-adv.vue';
+ import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
+ import nsLogin from '@/components/ns-login/ns-login.vue';
+ import loadingCover from '@/components/loading-cover/loading-cover.vue';
+ import nsEmpty from '@/components/ns-empty/ns-empty.vue';
+ // #ifdef MP-WEIXIN
+ import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
+ // #endif
export default {
components: {
uniGrid,
uniGridItem,
- nsAdv
+ nsAdv,
+ MescrollUni,
+ nsLogin,
+ loadingCover,
+ nsEmpty,
+ // #ifdef MP-WEIXIN
+ privacyPopup
+ // #endif
},
data() {
return {
diff --git a/pages_tool/goods/coupon.vue b/pages_tool/goods/coupon.vue
index 5405b52..2b332ba 100644
--- a/pages_tool/goods/coupon.vue
+++ b/pages_tool/goods/coupon.vue
@@ -1,6 +1,5 @@
-
-
+
全部
@@ -71,7 +70,23 @@
-
-
+
+
+
+
+ {{ item.name }}({{ item.count }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.member_name[0] }}***{{ item.member_name[item.member_name.length - 1] }}
+
+ {{ item.member_name }}
+ {{ $util.timeStampTurnTime(item.create_time)
+ }}
+
+
+
+
+
+
+
+ {{ item.content }}
+
+
+
+
+
+
+
+
+
+ 商家回复:
+ {{ item.explain_first }}
+
+
+
+ 追加评价
+ {{ item.again_content }}
+
+
+
+
+
+
+
+
+
+ 商家回复:
+ {{ item.again_explain }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_tool/goods/not_exist.vue b/pages_tool/goods/not_exist.vue
index 0dc8b4a..36a10bc 100644
--- a/pages_tool/goods/not_exist.vue
+++ b/pages_tool/goods/not_exist.vue
@@ -1,43 +1,42 @@
-
-
-
-
-
- 您查看的商品不存在,可能已下架或被删除
-
-
-
-
-
-
-
+
+
+
+
+ 您查看的商品不存在,可能已下架或被删除
+
+
+
+
+
+
+
diff --git a/pages_tool/goods/search.vue b/pages_tool/goods/search.vue
index df4eddf..1b50446 100644
--- a/pages_tool/goods/search.vue
+++ b/pages_tool/goods/search.vue
@@ -1,6 +1,5 @@
-
-
+
diff --git a/pages_tool/help/detail.vue b/pages_tool/help/detail.vue
index 4eabe01..cd41c7f 100644
--- a/pages_tool/help/detail.vue
+++ b/pages_tool/help/detail.vue
@@ -1,6 +1,5 @@
-
-
+
{{ detail.title }}
diff --git a/pages_tool/help/list.vue b/pages_tool/help/list.vue
index 77efc6c..32f5f6b 100644
--- a/pages_tool/help/list.vue
+++ b/pages_tool/help/list.vue
@@ -1,6 +1,5 @@
-
-
+
{{ item.class_name }}
diff --git a/pages_tool/index/diy.vue b/pages_tool/index/diy.vue
index e2b0461..fe93e58 100644
--- a/pages_tool/index/diy.vue
+++ b/pages_tool/index/diy.vue
@@ -1,95 +1,104 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/login/find.vue b/pages_tool/login/find.vue
index ab04b00..bf8281f 100644
--- a/pages_tool/login/find.vue
+++ b/pages_tool/login/find.vue
@@ -1,6 +1,5 @@
-
-
+
\ No newline at end of file
diff --git a/pages_tool/member/account.vue b/pages_tool/member/account.vue
index 203d0fb..6fa4744 100644
--- a/pages_tool/member/account.vue
+++ b/pages_tool/member/account.vue
@@ -1,6 +1,5 @@
-
-
+
@@ -66,12 +65,20 @@
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
import nsLogin from '@/components/ns-login/ns-login.vue';
import loadingCover from '@/components/loading-cover/loading-cover.vue';
+ import nsEmpty from '@/components/ns-empty/ns-empty.vue';
+ // #ifdef MP-WEIXIN
+ import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
+ // #endif
export default {
components: {
MescrollUni,
nsLogin,
- loadingCover
+ loadingCover,
+ nsEmpty,
+ // #ifdef MP-WEIXIN
+ privacyPopup
+ // #endif
},
data() {
return {
diff --git a/pages_tool/member/account_edit.vue b/pages_tool/member/account_edit.vue
index 1ff5f5a..0225527 100644
--- a/pages_tool/member/account_edit.vue
+++ b/pages_tool/member/account_edit.vue
@@ -1,6 +1,5 @@
-
-
+
{{ $lang('name') }}
diff --git a/pages_tool/member/address.vue b/pages_tool/member/address.vue
index 3a18f70..055f213 100644
--- a/pages_tool/member/address.vue
+++ b/pages_tool/member/address.vue
@@ -1,6 +1,5 @@
-
-
+
@@ -11,7 +10,8 @@
{{ item.name }}
{{ item.mobile }}
- {{ item.local_data }}
+ {{
+ item.local_data }}
{{ item.full_address }}{{ item.address }}
@@ -34,14 +34,16 @@
-
+
设为默认地址
设为默认地址
-
+
-
+
@@ -51,16 +53,21 @@
-
+
暂无收货地址,请添加
-
+
-
+
-
+
@@ -74,7 +81,9 @@
-
+
\ No newline at end of file
diff --git a/pages_tool/member/address_edit.vue b/pages_tool/member/address_edit.vue
index 4cdfccf..d028016 100644
--- a/pages_tool/member/address_edit.vue
+++ b/pages_tool/member/address_edit.vue
@@ -1,6 +1,5 @@
-
-
+
地址信息
diff --git a/pages_tool/member/apply_withdrawal.vue b/pages_tool/member/apply_withdrawal.vue
index 97b0762..d258e4f 100644
--- a/pages_tool/member/apply_withdrawal.vue
+++ b/pages_tool/member/apply_withdrawal.vue
@@ -1,6 +1,5 @@
-
-
+
提现到
diff --git a/pages_tool/member/assets.vue b/pages_tool/member/assets.vue
index bf72e84..000b039 100644
--- a/pages_tool/member/assets.vue
+++ b/pages_tool/member/assets.vue
@@ -1,6 +1,5 @@
-
-
+
风险提示:确认申请后您的资产将被清空且不可找回!
diff --git a/pages_tool/member/balance.vue b/pages_tool/member/balance.vue
index 4304607..1976189 100644
--- a/pages_tool/member/balance.vue
+++ b/pages_tool/member/balance.vue
@@ -1,6 +1,5 @@
-
-
+
-
+
diff --git a/pages_tool/member/coupon.vue b/pages_tool/member/coupon.vue
index 5e7eaaa..660888b 100644
--- a/pages_tool/member/coupon.vue
+++ b/pages_tool/member/coupon.vue
@@ -1,6 +1,5 @@
-
-
+
未使用
@@ -75,12 +74,18 @@ import nsEmpty from '@/components/ns-empty/ns-empty.vue';
import nsLogin from '@/components/ns-login/ns-login.vue';
import loadingCover from '@/components/loading-cover/loading-cover.vue';
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
+// #ifdef MP-WEIXIN
+import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
+// #endif
export default {
components: {
nsEmpty,
nsLogin,
loadingCover,
- MescrollUni
+ MescrollUni,
+ // #ifdef MP-WEIXIN
+ privacyPopup
+ // #endif
},
data() {
return {
diff --git a/pages_tool/member/footprint.vue b/pages_tool/member/footprint.vue
index f0a2aa8..4cf5824 100644
--- a/pages_tool/member/footprint.vue
+++ b/pages_tool/member/footprint.vue
@@ -1,6 +1,5 @@
-
-
+
{{ manage ? '完成' : '管理' }}
@@ -69,13 +68,19 @@ import nsEmpty from '@/components/ns-empty/ns-empty.vue';
import nsLogin from '@/components/ns-login/ns-login.vue';
import loadingCover from '@/components/loading-cover/loading-cover.vue';
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
+// #ifdef MP-WEIXIN
+import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
+// #endif
export default {
components: {
nsEmpty,
nsLogin,
loadingCover,
- MescrollUni
+ MescrollUni,
+ // #ifdef MP-WEIXIN
+ privacyPopup
+ // #endif
},
data() {
return {
diff --git a/pages_tool/member/index.vue b/pages_tool/member/index.vue
index bd574b8..1cabd7f 100644
--- a/pages_tool/member/index.vue
+++ b/pages_tool/member/index.vue
@@ -1,65 +1,75 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -79,6 +89,52 @@ export default {
tourl(url) {
this.$util.redirectTo(url);
+ },
+
+ // 退出登录
+ logout() {
+ uni.showModal({
+ title: this.$lang('logoutTitle'),
+ content: this.$lang('logoutContent'),
+ success: (res) => {
+ if (res.confirm) {
+ this.$store.commit('setToken', '');
+ this.$store.commit('setMemberInfo', '');
+ this.$store.dispatch('emptyCart');
+ uni.removeStorageSync('authInfo');
+ this.$util.redirectTo('/pages/member/index');
+ }
+ }
+ });
+ },
+
+ // 账号注销
+ cancellation() {
+ uni.showModal({
+ title: this.$lang('cancellationTitle'),
+ content: this.$lang('cancellationContent'),
+ confirmColor: '#000000',
+ success: res => {
+ if (res.confirm) {
+ this.$api.sendRequest({
+ url: '/membercancel/api/membercancel/apply',
+ success: rres => {
+ if (rres.code >= 0) {
+ this.$store.commit('setToken', '');
+ this.$store.commit('setMemberInfo', '');
+ this.$store.dispatch('emptyCart');
+ uni.removeStorageSync('authInfo');
+ this.$util.redirectTo('/pages/member/index');
+ } else {
+ this.$util.showToast({
+ title: rres.message
+ });
+ }
+ }
+ });
+ }
+ }
+ });
}
}
@@ -100,6 +156,7 @@ export default {
color: #F4391c
}
}
+
\ No newline at end of file
diff --git a/pages_tool/member/info.vue b/pages_tool/member/info.vue
index 066494d..844b6ae 100644
--- a/pages_tool/member/info.vue
+++ b/pages_tool/member/info.vue
@@ -1,6 +1,5 @@
-
-
+
diff --git a/pages_tool/member/info_edit.vue b/pages_tool/member/info_edit.vue
index bf3de74..6a64810 100644
--- a/pages_tool/member/info_edit.vue
+++ b/pages_tool/member/info_edit.vue
@@ -1,6 +1,5 @@
-
-
+
diff --git a/pages_tool/member/invite_friends.vue b/pages_tool/member/invite_friends.vue
index 028bed5..8321783 100644
--- a/pages_tool/member/invite_friends.vue
+++ b/pages_tool/member/invite_friends.vue
@@ -1,6 +1,5 @@
-
-
+
diff --git a/pages_tool/member/level.vue b/pages_tool/member/level.vue
index e70b07a..c7e6d1d 100644
--- a/pages_tool/member/level.vue
+++ b/pages_tool/member/level.vue
@@ -1,6 +1,5 @@
-
-
+
diff --git a/pages_tool/member/level_growth_rules.vue b/pages_tool/member/level_growth_rules.vue
index 14bdadf..69a684e 100644
--- a/pages_tool/member/level_growth_rules.vue
+++ b/pages_tool/member/level_growth_rules.vue
@@ -1,275 +1,274 @@
-
-
-
-
-
-
- 成长值说明
-
-
-
-
- 等级
- 成长值
-
-
- {{ item.level_name }}
- {{ item.growth }}
-
-
-
-
-
-
- 什么是成长值
-
- 成长值是消费者在店铺成为会员后,通过消费计算出来的值。成长值决定会员等级,会员等级越高,所享受的会员权益和会员礼包就越多。
-
-
-
-
- 如何获得成长值
-
-
- 1、注册会员送x成长值。
- 2、会员充值到余额送x成长值。
- 3、会员签到送x成长值。
- 4、会员消费x元,交易完成即可获得x个成长值。
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/modify_face.vue b/pages_tool/member/modify_face.vue
index 7a2f258..593b9e1 100644
--- a/pages_tool/member/modify_face.vue
+++ b/pages_tool/member/modify_face.vue
@@ -1,6 +1,5 @@
-
-
+
diff --git a/pages_tool/member/pay_password.vue b/pages_tool/member/pay_password.vue
index 53989b9..67e2774 100644
--- a/pages_tool/member/pay_password.vue
+++ b/pages_tool/member/pay_password.vue
@@ -1,6 +1,5 @@
-
-
+
请输入6位支付密码,建议不要使用重复或连续数字
验证码已发送至{{ memberInfo.mobile | mobile }}请在下方输入4位数字验证码
diff --git a/pages_tool/member/point.vue b/pages_tool/member/point.vue
index 984809f..3c4ae9d 100644
--- a/pages_tool/member/point.vue
+++ b/pages_tool/member/point.vue
@@ -1,6 +1,5 @@
-
-
+
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_tool/webview/webview.vue b/pages_tool/webview/webview.vue
index c12f31f..62f7d93 100644
--- a/pages_tool/webview/webview.vue
+++ b/pages_tool/webview/webview.vue
@@ -1,6 +1,5 @@
-
-
+
diff --git a/store/index.js b/store/index.js
index a148bb5..17b9fad 100644
--- a/store/index.js
+++ b/store/index.js
@@ -5,6 +5,7 @@ Vue.use(Vuex)
import Http from '../common/js/http.js'
import { themeConfig } from '../common/js/config-external.js'
import configExternal from '../common/js/config-external.js'
+import util from '../common/js/util.js'
const store = new Vuex.Store({
state: {
@@ -14,6 +15,7 @@ const store = new Vuex.Store({
tabBarList: '',
siteState: 1,
themeStyle: '',
+ themeColor: '',
addonIsExist: {
bundling: 0,
coupon: 0,
@@ -59,7 +61,7 @@ const store = new Vuex.Store({
cartNumber: 0,
cartMoney: 0,
cartChange: 0,
- wechatConfigStatus:0,
+ wechatConfigStatus: 0,
bottomNavHidden: false, // 底部导航是否隐藏,true:隐藏,false:显示
aiUnreadCount: 10, // AI未读消息数量
globalAIKefuConfig: null, // AI客服配置
@@ -80,8 +82,8 @@ const store = new Vuex.Store({
wap_valid_time: 0,
},
copyright: null,
- initStatus:false,
- offlineWhiteList:['pages_order/payment','pages_order/list','pages_order/detail'],//线下支付白名单
+ initStatus: false,
+ offlineWhiteList: ['pages_order/payment', 'pages_order/list', 'pages_order/detail'],//线下支付白名单
canReceiveRegistergiftInfo: {
status: false,
path: ''
@@ -227,15 +229,19 @@ const store = new Vuex.Store({
setCartMoney(state, value) {
state.cartMoney = value;
},
- setInitStatus(state,value){
+ setInitStatus(state, value) {
state.initStatus = value
},
- setWechatConfigStatus(state,value){
+ setWechatConfigStatus(state, value) {
state.wechatConfigStatus = value
- },
+ },
// 设置AI未读消息数量
setAiUnreadCount(state, value) {
state.aiUnreadCount = value;
+ },
+ // 设置主题颜色
+ setThemeColor(state, value) {
+ state.themeColor = value;
}
},
getters: {
@@ -252,7 +258,8 @@ const store = new Vuex.Store({
success: res => {
var data = res.data;
if (data) {
- this.commit('setThemeStyle', configExternal.loadThemeSync(data.style_theme.name));
+ this.commit('setThemeStyle', configExternal.loadThemeSync(data.style_theme?.name));
+ this.dispatch('themeColorSet');
// 底部导航
this.commit('setTabBarList', data.diy_bottom_nav);
@@ -260,16 +267,16 @@ const store = new Vuex.Store({
this.commit('setAddonIsExist', data.addon_is_exist);
this.commit('setDefaultImg', data.default_img);
-
+
this.commit('setSiteInfo', data.site_info);
this.commit('setServicerConfig', data.servicer);
-
+
// 企业微信配置
if (data?.wxwork_config) {
this.commit('setWxworkConfig', data.wxwork_config);
}
-
+
this.commit('setCopyright', data.copyright);
this.commit('setMapConfig', data.map_config);
@@ -277,11 +284,11 @@ const store = new Vuex.Store({
this.commit('setglobalAIKefuConfig', data.ai_agent_config);
this.commit('setGlobalStoreConfig', data.store_config);
-
+
//联系我们
-
+
this.commit('setShopInfo', data.shop_info);
- this.commit('setWechatConfigStatus',data?.wechat_config_status);
+ this.commit('setWechatConfigStatus', data?.wechat_config_status);
// 默认总店
if (data.store_info) {
this.commit('setDefaultStoreInfo', data.store_info);
@@ -290,7 +297,7 @@ const store = new Vuex.Store({
this.commit('setDefaultStoreInfo', null);
this.commit('setGlobalStoreInfo', null);
}
- this.commit('setInitStatus',true)
+ this.commit('setInitStatus', true)
resolve(data);
}
}
@@ -401,6 +408,34 @@ const store = new Vuex.Store({
this.commit('setCartIds', ids);
+ },
+ // 生成主题颜色CSS变量
+ themeColorSet() {
+ console.log('样式颜色设置...');
+ let theme = this.state.themeStyle;
+ if (!theme?.main_color || !theme?.aux_color) return;
+ try {
+ let themeColor = `--base-color:${theme.main_color};--base-help-color:${theme.aux_color};`;
+ if (this.state.tabBarHeight != '56px') themeColor += `--tab-bar-height:${this.state.tabBarHeight};`
+ Object.keys(theme).forEach(key => {
+ let data = theme[key];
+ if (typeof (data) == "object") {
+ Object.keys(data).forEach(k => {
+ themeColor += '--' + k.replace(/_/g, "-") + ':' + data[k] + ';';
+ });
+ } else if (typeof (key) == "string" && key) {
+ themeColor += '--' + key.replace(/_/g, "-") + ':' + data + ';';
+ }
+ });
+ for (let i = 9; i >= 5; i--) {
+ let color = util.colourBlend(theme.main_color, '#ffffff', (i / 10));
+ themeColor += `--base-color-light-${i}:${color};`;
+ }
+ this.commit('setThemeColor', themeColor);
+ } catch (e) {
+ console.error('设置主题颜色失败', e);
+ }
+ console.log('themeColor => ', this.state.themeColor);
}
}
})
diff --git a/uni_modules/mp-html/README.md b/uni_modules/mp-html/README.md
index 7626289..784800e 100644
--- a/uni_modules/mp-html/README.md
+++ b/uni_modules/mp-html/README.md
@@ -1,194 +1,259 @@
-## 为减小组件包的大小,默认组件包中不包含编辑、latex 公式等扩展功能,需要使用扩展功能的请参考下方的 插件扩展 栏的说明
-
-## 功能介绍
-- 全端支持(含 `v3、NVUE`)
-- 支持丰富的标签(包括 `table`、`video`、`svg` 等)
-- 支持丰富的事件效果(自动预览图片、链接处理等)
-- 支持设置占位图(加载中、出错时、预览时)
-- 支持锚点跳转、长按复制等丰富功能
-- 支持大部分 *html* 实体
-- 丰富的插件(关键词搜索、内容编辑、`latex` 公式等)
-- 效率高、容错性强且轻量化
-
-查看 [功能介绍](https://jin-yufeng.gitee.io/mp-html/#/overview/feature) 了解更多
-
-## 使用方法
-- `uni_modules` 方式
- 1. 点击右上角的 `使用 HBuilder X 导入插件` 按钮直接导入项目或点击 `下载插件 ZIP` 按钮下载插件包并解压到项目的 `uni_modules/mp-html` 目录下
- 2. 在需要使用页面的 `(n)vue` 文件中添加
- ```html
-
-
- ```
- ```javascript
- export default {
- data() {
- return {
- html: 'Hello World!
'
- }
- }
- }
- ```
- 3. 需要更新版本时在 `HBuilder X` 中右键 `uni_modules/mp-html` 目录选择 `从插件市场更新` 即可
-
-- 源码方式
- 1. 从 [github](https://github.com/jin-yufeng/mp-html/tree/master/dist/uni-app) 或 [gitee](https://gitee.com/jin-yufeng/mp-html/tree/master/dist/uni-app) 下载源码
- 插件市场的 **非 uni_modules 版本** 无法更新,不建议从插件市场获取
- 2. 在需要使用页面的 `(n)vue` 文件中添加
- ```html
-
- ```
- ```javascript
- import mpHtml from '@/components/mp-html/mp-html'
- export default {
- // HBuilderX 2.5.5+ 可以通过 easycom 自动引入
- components: {
- mpHtml
- },
- data() {
- return {
- html: 'Hello World!
'
- }
- }
- }
- ```
-
-- npm 方式
- 1. 在项目根目录下执行
- ```bash
- npm install mp-html
- ```
- 2. 在需要使用页面的 `(n)vue` 文件中添加
- ```html
-
- ```
- ```javascript
- import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
- export default {
- // 不可省略
- components: {
- mpHtml
- },
- data() {
- return {
- html: 'Hello World!
'
- }
- }
- }
- ```
- 3. 需要更新版本时执行以下命令即可
- ```bash
- npm update mp-html
- ```
-
- 使用 *cli* 方式运行的项目,通过 *npm* 方式引入时,需要在 *vue.config.js* 中配置 *transpileDependencies*,详情可见 [#330](https://github.com/jin-yufeng/mp-html/issues/330#issuecomment-913617687)
- 如果在 **nvue** 中使用还要将 `dist/uni-app/static` 目录下的内容拷贝到项目的 `static` 目录下,否则无法运行
-
-查看 [快速开始](https://jin-yufeng.gitee.io/mp-html/#/overview/quickstart) 了解更多
-
-## 组件属性
-
-| 属性 | 类型 | 默认值 | 说明 |
-|:---:|:---:|:---:|---|
-| container-style | String | | 容器的样式([2.1.0+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v210)) |
-| content | String | | 用于渲染的 html 字符串 |
-| copy-link | Boolean | true | 是否允许外部链接被点击时自动复制 |
-| domain | String | | 主域名(用于链接拼接) |
-| error-img | String | | 图片出错时的占位图链接 |
-| lazy-load | Boolean | false | 是否开启图片懒加载 |
-| loading-img | String | | 图片加载过程中的占位图链接 |
-| pause-video | Boolean | true | 是否在播放一个视频时自动暂停其他视频 |
-| preview-img | Boolean | true | 是否允许图片被点击时自动预览 |
-| scroll-table | Boolean | false | 是否给每个表格添加一个滚动层使其能单独横向滚动 |
-| selectable | Boolean | false | 是否开启文本长按复制 |
-| set-title | Boolean | true | 是否将 title 标签的内容设置到页面标题 |
-| show-img-menu | Boolean | true | 是否允许图片被长按时显示菜单 |
-| tag-style | Object | | 设置标签的默认样式 |
-| use-anchor | Boolean | false | 是否使用锚点链接 |
-
-查看 [属性](https://jin-yufeng.gitee.io/mp-html/#/basic/prop) 了解更多
-
-## 组件事件
-
-| 名称 | 触发时机 |
-|:---:|---|
-| load | dom 树加载完毕时 |
-| ready | 图片加载完毕时 |
-| error | 发生渲染错误时 |
-| imgtap | 图片被点击时 |
-| linktap | 链接被点击时 |
-| play | 音视频播放时 |
-
-查看 [事件](https://jin-yufeng.gitee.io/mp-html/#/basic/event) 了解更多
-
-## api
-组件实例上提供了一些 `api` 方法可供调用
-
-| 名称 | 作用 |
-|:---:|---|
-| in | 将锚点跳转的范围限定在一个 scroll-view 内 |
-| navigateTo | 锚点跳转 |
-| getText | 获取文本内容 |
-| getRect | 获取富文本内容的位置和大小 |
-| setContent | 设置富文本内容 |
-| imgList | 获取所有图片的数组 |
-| pauseMedia | 暂停播放音视频([2.2.2+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v222)) |
-| setPlaybackRate | 设置音视频播放速率([2.4.0+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v240)) |
-
-查看 [api](https://jin-yufeng.gitee.io/mp-html/#/advanced/api) 了解更多
-
-## 插件扩展
-除基本功能外,本组件还提供了丰富的扩展,可按照需要选用
-
-| 名称 | 作用 |
-|:---:|---|
-| audio | 音乐播放器 |
-| editable | 富文本 **编辑**([示例项目](https://mp-html.oss-cn-hangzhou.aliyuncs.com/editable.zip)) |
-| emoji | 解析 emoji |
-| highlight | 代码块高亮显示 |
-| markdown | 渲染 markdown |
-| search | 关键词搜索 |
-| style | 匹配 style 标签中的样式 |
-| txv-video | 使用腾讯视频 |
-| img-cache | 图片缓存 by [@PentaTea](https://github.com/PentaTea) |
-| latex | 渲染 latex 公式 by [@Zeng-J](https://github.com/Zeng-J) |
-
-从插件市场导入的包中 **不含有** 扩展插件,使用插件需通过微信小程序 `富文本插件` 获取或参考以下方法进行打包:
-1. 获取完整组件包
- ```bash
- npm install mp-html
- ```
-2. 编辑 `tools/config.js` 中的 `plugins` 项,选择需要的插件
-3. 生成新的组件包
- 在 `node_modules/mp-html` 目录下执行
- ```bash
- npm install
- npm run build:uni-app
- ```
-4. 拷贝 `dist/uni-app` 中的内容到项目根目录
-
-查看 [插件](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin) 了解更多
-
-## 关于 nvue
-`nvue` 使用原生渲染,不支持部分 `css` 样式,为实现和 `html` 相同的效果,组件内部通过 `web-view` 进行渲染,性能上差于原生,根据 `weex` 官方建议,`web` 标签仅应用在非常规的降级场景。因此,如果通过原生的方式(如 `richtext`)能够满足需要,则不建议使用本组件,如果有较多的富文本内容,则可以直接使用 `vue` 页面
-由于渲染方式与其他端不同,有以下限制:
-1. 不支持 `lazy-load` 属性
-2. 视频不支持全屏播放
-3. 如果在 `flex-direction: row` 的容器中使用,需要给组件设置宽度或设置 `flex: 1` 占满剩余宽度
-
-纯 `nvue` 模式下,[此问题](https://ask.dcloud.net.cn/question/119678) 修复前,不支持通过 `uni_modules` 引入,需要本地引入(将 [dist/uni-app](https://github.com/jin-yufeng/mp-html/tree/master/dist/uni-app) 中的内容拷贝到项目根目录下)
-
-## 立即体验
-
-
-## 问题反馈
-遇到问题时,请先查阅 [常见问题](https://jin-yufeng.gitee.io/mp-html/#/question/faq) 和 [issue](https://github.com/jin-yufeng/mp-html/issues) 中是否已有相同的问题
-可通过 [issue](https://github.com/jin-yufeng/mp-html/issues/new/choose) 、插件问答或发送邮件到 [mp_html@126.com](mailto:mp_html@126.com) 提问,不建议在评论区提问(不方便回复)
-提问请严格按照 [issue 模板](https://github.com/jin-yufeng/mp-html/issues/new/choose) ,描述清楚使用环境、`html` 内容或可复现的 `demo` 项目以及复现方式,对于 **描述不清**、**无法复现** 或重复的问题将不予回复
-
-欢迎加入 `QQ` 交流群:
-群1(已满):`699734691`
-群2(已满):`778239129`
-群3:`960265313`
-
-查看 [问题反馈](https://jin-yufeng.gitee.io/mp-html/#/question/feedback) 了解更多
+# mp-html
+
+> 一个强大的小程序富文本组件
+
+
+
+[](https://www.npmjs.com/package/mp-html)
+
+[](https://coveralls.io/github/jin-yufeng/mp-html?branch=master)
+
+[](https://standardjs.com)
+
+## 功能介绍
+- 支持在多个主流的小程序平台和 `uni-app` 中使用
+- 支持丰富的标签(包括 `table`、`video`、`svg` 等)
+- 支持丰富的事件效果(自动预览图片、链接处理等)
+- 支持设置占位图(加载中、出错时、预览时)
+- 支持锚点跳转、长按复制等丰富功能
+- 支持大部分 *html* 实体
+- 丰富的插件(关键词搜索、内容编辑、`latex` 公式等)
+- 效率高、容错性强且轻量化(`≈25KB`,`9KB gzipped`)
+
+查看 [功能介绍](https://jin-yufeng.github.io/mp-html/#/overview/feature) 了解更多
+
+## 使用方法
+### 原生平台
+- `npm` 方式
+ 1. 在项目目录下安装组件包
+
+ ```bash
+ npm install mp-html
+ ```
+ 2. 开发者工具中勾选 `使用 npm 模块`(若没有此选项则不需要)并点击 `工具 - 构建 npm`
+ 3. 在需要使用页面的 `json` 文件中添加
+
+ ```json
+ {
+ "usingComponents": {
+ "mp-html": "mp-html"
+ }
+ }
+ ```
+ 4. 在需要使用页面的 `wxml` 文件中添加
+
+ ```html
+
+ ```
+ 5. 在需要使用页面的 `js` 文件中添加
+
+ ```javascript
+ Page({
+ onLoad () {
+ this.setData({
+ html: 'Hello World!
'
+ })
+ }
+ })
+ ```
+- 源码方式
+ 1. 将源码中对应平台的代码包(`dist/platform`)拷贝到 `components` 目录下,更名为 `mp-html`
+ 2. 在需要使用页面的 `json` 文件中添加
+
+ ```json
+ {
+ "usingComponents": {
+ "mp-html": "/components/mp-html/index"
+ }
+ }
+ ```
+
+ 后续步骤同上
+
+查看 [快速开始](https://jin-yufeng.github.io/mp-html/#/overview/quickstart) 了解更多
+
+### uni-app
+- 源码方式
+ 1. 将源码中 `dist/uni-app` 内的内容拷贝到项目根目录下
+ 可以直接通过 [插件市场](https://ext.dcloud.net.cn/plugin?id=805) 引入
+ 2. 在需要使用页面的 `vue` 文件中添加
+
+ ```vue
+
+
+
+
+
+
+ ```
+- `npm` 方式
+ 1. 在项目目录下安装组件包
+
+ ```bash
+ npm install mp-html
+ ```
+ 2. 在需要使用页面的 `vue` 文件中添加
+
+ ```vue
+
+
+
+
+
+
+ ```
+
+ 使用 `cli` 方式运行的项目,通过 `npm` 方式引入时,需要在 `vue.config.js` 中配置 `transpileDependencies`,详情可见 [#330](https://github.com/jin-yufeng/mp-html/issues/330#issuecomment-913617687)
+ 如果在 `nvue` 中使用还要将 `dist/uni-app/static` 目录下的内容拷贝到项目的 `static` 目录下,否则无法运行
+
+查看 [快速开始](https://jin-yufeng.github.io/mp-html/#/overview/quickstart) 了解更多
+
+## 组件属性
+
+| 属性 | 类型 | 默认值 | 说明 |
+|:---:|:---:|:---:|---|
+| container-style | String | | 容器的样式([2.1.0+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v210)) |
+| content | String | | 用于渲染的 html 字符串 |
+| copy-link | Boolean | true | 是否允许外部链接被点击时自动复制 |
+| domain | String | | 主域名(用于链接拼接) |
+| error-img | String | | 图片出错时的占位图链接 |
+| lazy-load | Boolean | false | 是否开启图片懒加载 |
+| loading-img | String | | 图片加载过程中的占位图链接 |
+| pause-video | Boolean | true | 是否在播放一个视频时自动暂停其他视频 |
+| preview-img | Boolean | true | 是否允许图片被点击时自动预览 |
+| scroll-table | Boolean | false | 是否给每个表格添加一个滚动层使其能单独横向滚动 |
+| selectable | Boolean | false | 是否开启文本长按复制 |
+| set-title | Boolean | true | 是否将 title 标签的内容设置到页面标题 |
+| show-img-menu | Boolean | true | 是否允许图片被长按时显示菜单 |
+| tag-style | Object | | 设置标签的默认样式 |
+| use-anchor | Boolean | false | 是否使用锚点链接 |
+
+查看 [属性](https://jin-yufeng.github.io/mp-html/#/basic/prop) 了解更多
+
+## 组件事件
+
+| 名称 | 触发时机 |
+|:---:|---|
+| load | dom 树加载完毕时 |
+| ready | 图片加载完毕时 |
+| error | 发生渲染错误时 |
+| imgtap | 图片被点击时 |
+| linktap | 链接被点击时 |
+| play | 音视频播放时([2.3.0+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v230)) |
+| pause | 音视频暂停时([2.5.2+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v252)) |
+| fullscreenchange | 视频全屏变化时([2.5.2+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v252)) |
+
+查看 [事件](https://jin-yufeng.github.io/mp-html/#/basic/event) 了解更多
+
+## api
+组件实例上提供了一些 `api` 方法可供调用
+
+| 名称 | 作用 |
+|:---:|---|
+| in | 将锚点跳转的范围限定在一个 scroll-view 内 |
+| navigateTo | 锚点跳转 |
+| getText | 获取文本内容 |
+| getRect | 获取富文本内容的位置和大小 |
+| setContent | 设置富文本内容 |
+| imgList | 获取所有图片的数组 |
+| pauseMedia | 暂停播放音视频([2.2.2+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v222)) |
+| setPlaybackRate | 设置音视频播放速率([2.4.0+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v240)) |
+
+查看 [api](https://jin-yufeng.github.io/mp-html/#/advanced/api) 了解更多
+
+## 插件扩展
+除基本功能外,本组件还提供了丰富的扩展,可按照需要选用
+
+| 名称 | 作用 |
+|:---:|---|
+| audio | 音乐播放器 |
+| editable | 富文本编辑 |
+| emoji | 解析 emoji |
+| highlight | 代码块高亮显示 |
+| markdown | 渲染 markdown |
+| search | 关键词搜索 |
+| style | 匹配 style 标签中的样式 |
+| txv-video | 使用腾讯视频 |
+| img-cache | 图片缓存 by [@PentaTea](https://github.com/PentaTea) |
+| latex | 渲染 latex 公式 by [@Zeng-J](https://github.com/Zeng-J) |
+| card | 卡片展示 by [@whoooami](https://github.com/whoooami) |
+
+查看 [插件](https://jin-yufeng.github.io/mp-html/#/advanced/plugin) 了解更多
+
+## 使用案例
+
+| [官方示例](https://github.com/jin-yufeng/mp-html-demo) | 欢喜商城 | 多么生活 | 食法查 | 微慕 | 科学复习 |
+|:---:|:---:|:---:|:---:|:---:|:---:|
+|  |  |  |  |  |  |
+
+| [程序员技术之旅](https://github.com/fendoudebb/z-blog-wx) | 典典博客 | 优秀笔记 | 同城共享书 | [技术源 share](https://github.com/wangsrGit119/mini-blog-halo) | 你的代码写的真棒 |
+|:---:|:---:|:---:|:---:|:---:|:---:|
+|  |  |  |  |  |  |
+
+| 谛否 | 小莫唐尼 | [模版演示](https://github.com/zhihuifanqiechaodan/miniprogram-template) | AI瓦力 | 豆流便签 | 前端八股通 |
+|:---:|:---:|:---:|:---:|:---:|:---:|
+|  |  |  |  |  |  |
+
+以上排名不分先后,更多可见 [使用案例收集](https://github.com/jin-yufeng/mp-html/issues/27)(欢迎添加)
+
+## 许可与支持
+- 许可
+ 您可以免费的使用(包括商用)、复制或修改本组件 [MIT License](https://github.com/jin-yufeng/mp-html/blob/master/LICENSE)
+ 在用于生产环境前务必经过充分测试,由插件 `bug` 带来的损失概不负责(可以自行修改源码)
+
+- 联系
+ 欢迎加入 `QQ` 交流群:
+ 群1(已满):`699734691`
+ 群2(已满):`778239129`
+ 群3:`960265313`
+ 
+
+- 支持
+ 
+
+## 更新日志
+- v2.5.2 (20251214)
+ 1. `A` 增加了音视频暂停 [pause](https://jin-yufeng.github.io/mp-html/#/basic/event?id=pause) 和视频全屏 [fullscreenchange](https://jin-yufeng.github.io/mp-html/#/basic/event?id=fullscreenchange) 事件 [#495](https://github.com/jin-yufeng/mp-html/issues/495) [#595](https://github.com/jin-yufeng/mp-html/issues/595)
+ 2. `U` 优化了 [流式输出](https://jin-yufeng.github.io/mp-html/#/overview/feature?id=stream) 效果,通过差量更新解决闪烁问题 [详细](https://github.com/jin-yufeng/mp-html/issues/657)
+ 3. `U` `latex` 插件更新字体文件 [详细](https://github.com/jin-yufeng/mp-html/pull/647) by [@JiuyeXD](https://github.com/JiuyeXD)
+ 4. `U` 更新 `markdown` 插件中 `marked.js` 版本 [详细](https://github.com/jin-yufeng/mp-html/issues/672)
+ 5. `U` 微信小程序替换遗漏的废弃 `api` `getSystemInfoSync` [详细](https://github.com/jin-yufeng/mp-html/pull/653) by [@zcSkr](https://github.com/zcSkr)
+ 6. `F` 修复了 `markdown` 插件加粗文本遇到中文符号无效的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/664) by [@qp666](https://github.com/qp666)
+
+- v2.5.1 (20250420)
+ 1. `U` `uni-app` 包适配鸿蒙 `APP` [详细](https://github.com/jin-yufeng/mp-html/issues/615)
+ 2. `U` 微信小程序替换废弃 `api` `getSystemInfoSync` [详细](https://github.com/jin-yufeng/mp-html/issues/613)
+ 3. `F` 修复了微信小程序 `glass-easel` 框架下真机换行异常的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/607) by [@PaperStrike](https://github.com/PaperStrike)
+ 4. `F` 修复了 `uni-app` 包 `app` 端播放视频可能报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/617)
+ 5. `F` 修复了 `latex` 插件可能出现 `xxx can be used only in display mode` 的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/632)
+ 6. `F` 修复了 `uni-app` 包 `latex` 公式可能不显示的问题 [#599](https://github.com/jin-yufeng/mp-html/issues/599)、[#627](https://github.com/jin-yufeng/mp-html/issues/627)
+
+ 从 `1.x` 的升级方法可见 [更新指南](https://jin-yufeng.github.io/mp-html/#/changelog/changelog?id=v200)
+
+查看 [更新日志](https://jin-yufeng.github.io/mp-html/#/changelog/changelog) 了解更多
diff --git a/uni_modules/mp-html/components/mp-html/mp-html.vue b/uni_modules/mp-html/components/mp-html/mp-html.vue
index 5d1d36d..ec6d7f5 100644
--- a/uni_modules/mp-html/components/mp-html/mp-html.vue
+++ b/uni_modules/mp-html/components/mp-html/mp-html.vue
@@ -1,498 +1,500 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/mp-html/components/mp-html/node/node.vue b/uni_modules/mp-html/components/mp-html/node/node.vue
index 09252fd..4733445 100644
--- a/uni_modules/mp-html/components/mp-html/node/node.vue
+++ b/uni_modules/mp-html/components/mp-html/node/node.vue
@@ -1,587 +1,624 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{n.text}}
-
-
- {{n.text}}
-
- \n
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/uni_modules/mp-html/components/mp-html/parser.js b/uni_modules/mp-html/components/mp-html/parser.js
index 5a93000..574f6b7 100644
--- a/uni_modules/mp-html/components/mp-html/parser.js
+++ b/uni_modules/mp-html/components/mp-html/parser.js
@@ -1,1393 +1,1400 @@
-/**
- * @fileoverview html 解析器
- */
-
-// 配置
-const config = {
- // 信任的标签(保持标签名不变)
- trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
-
- // 块级标签(转为 div,其他的非信任标签转为 span)
- blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
-
- // #ifdef (MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE3
- // 行内标签
- inlineTags: makeMap('abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup'),
- // #endif
-
- // 要移除的标签
- ignoreTags: makeMap('area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr'),
-
- // 自闭合的标签
- voidTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
-
- // html 实体
- entities: {
- lt: '<',
- gt: '>',
- quot: '"',
- apos: "'",
- ensp: '\u2002',
- emsp: '\u2003',
- nbsp: '\xA0',
- semi: ';',
- ndash: '–',
- mdash: '—',
- middot: '·',
- lsquo: '‘',
- rsquo: '’',
- ldquo: '“',
- rdquo: '”',
- bull: '•',
- hellip: '…',
- larr: '←',
- uarr: '↑',
- rarr: '→',
- darr: '↓'
- },
-
- // 默认的标签样式
- tagStyle: {
- // #ifndef APP-PLUS-NVUE
- address: 'font-style:italic',
- big: 'display:inline;font-size:1.2em',
- caption: 'display:table-caption;text-align:center',
- center: 'text-align:center',
- cite: 'font-style:italic',
- dd: 'margin-left:40px',
- mark: 'background-color:yellow',
- pre: 'font-family:monospace;white-space:pre',
- s: 'text-decoration:line-through',
- small: 'display:inline;font-size:0.8em',
- strike: 'text-decoration:line-through',
- u: 'text-decoration:underline'
- // #endif
- },
-
- // svg 大小写对照表
- svgDict: {
- animatetransform: 'animateTransform',
- lineargradient: 'linearGradient',
- viewbox: 'viewBox',
- attributename: 'attributeName',
- repeatcount: 'repeatCount',
- repeatdur: 'repeatDur',
- foreignobject: 'foreignObject'
- }
-}
-const tagSelector={}
-const {
- windowWidth,
- // #ifdef MP-WEIXIN
- system
- // #endif
-} = uni.getSystemInfoSync()
-const blankChar = makeMap(' ,\r,\n,\t,\f')
-let idIndex = 0
-
-// #ifdef H5 || APP-PLUS
-config.ignoreTags.iframe = undefined
-config.trustTags.iframe = true
-config.ignoreTags.embed = undefined
-config.trustTags.embed = true
-// #endif
-// #ifdef APP-PLUS-NVUE
-config.ignoreTags.source = undefined
-config.ignoreTags.style = undefined
-// #endif
-
-/**
- * @description 创建 map
- * @param {String} str 逗号分隔
- */
-function makeMap (str) {
- const map = Object.create(null)
- const list = str.split(',')
- for (let i = list.length; i--;) {
- map[list[i]] = true
- }
- return map
-}
-
-/**
- * @description 解码 html 实体
- * @param {String} str 要解码的字符串
- * @param {Boolean} amp 要不要解码 &
- * @returns {String} 解码后的字符串
- */
-function decodeEntity (str, amp) {
- let i = str.indexOf('&')
- while (i !== -1) {
- const j = str.indexOf(';', i + 3)
- let code
- if (j === -1) break
- if (str[i + 1] === '#') {
- // { 形式的实体
- code = parseInt((str[i + 2] === 'x' ? '0' : '') + str.substring(i + 2, j))
- if (!isNaN(code)) {
- str = str.substr(0, i) + String.fromCharCode(code) + str.substr(j + 1)
- }
- } else {
- // 形式的实体
- code = str.substring(i + 1, j)
- if (config.entities[code] || (code === 'amp' && amp)) {
- str = str.substr(0, i) + (config.entities[code] || '&') + str.substr(j + 1)
- }
- }
- i = str.indexOf('&', i + 1)
- }
- return str
-}
-
-/**
- * @description 合并多个块级标签,加快长内容渲染
- * @param {Array} nodes 要合并的标签数组
- */
-function mergeNodes (nodes) {
- let i = nodes.length - 1
- for (let j = i; j >= -1; j--) {
- if (j === -1 || nodes[j].c || !nodes[j].name || (nodes[j].name !== 'div' && nodes[j].name !== 'p' && nodes[j].name[0] !== 'h') || (nodes[j].attrs.style || '').includes('inline')) {
- if (i - j >= 5) {
- nodes.splice(j + 1, i - j, {
- name: 'div',
- attrs: {},
- children: nodes.slice(j + 1, i + 1)
- })
- }
- i = j - 1
- }
- }
-}
-
-/**
- * @description html 解析器
- * @param {Object} vm 组件实例
- */
-function Parser (vm) {
- this.options = vm || {}
- this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle)
- this.imgList = vm.imgList || []
- this.imgList._unloadimgs = 0
- this.plugins = vm.plugins || []
- this.attrs = Object.create(null)
- this.stack = []
- this.nodes = []
- this.pre = (this.options.containerStyle || '').includes('white-space') && this.options.containerStyle.includes('pre') ? 2 : 0
-}
-
-/**
- * @description 执行解析
- * @param {String} content 要解析的文本
- */
-Parser.prototype.parse = function (content) {
- // 插件处理
- for (let i = this.plugins.length; i--;) {
- if (this.plugins[i].onUpdate) {
- content = this.plugins[i].onUpdate(content, config) || content
- }
- }
-
- new Lexer(this).parse(content)
- // 出栈未闭合的标签
- while (this.stack.length) {
- this.popNode()
- }
- if (this.nodes.length > 50) {
- mergeNodes(this.nodes)
- }
- return this.nodes
-}
-
-/**
- * @description 将标签暴露出来(不被 rich-text 包含)
- */
-Parser.prototype.expose = function () {
- // #ifndef APP-PLUS-NVUE
- for (let i = this.stack.length; i--;) {
- const item = this.stack[i]
- if (item.c || item.name === 'a' || item.name === 'video' || item.name === 'audio') return
- item.c = 1
- }
- // #endif
-}
-
-/**
- * @description 处理插件
- * @param {Object} node 要处理的标签
- * @returns {Boolean} 是否要移除此标签
- */
-Parser.prototype.hook = function (node) {
- for (let i = this.plugins.length; i--;) {
- if (this.plugins[i].onParse && this.plugins[i].onParse(node, this) === false) {
- return false
- }
- }
- return true
-}
-
-/**
- * @description 将链接拼接上主域名
- * @param {String} url 需要拼接的链接
- * @returns {String} 拼接后的链接
- */
-Parser.prototype.getUrl = function (url) {
- const domain = this.options.domain
- if (url[0] === '/') {
- if (url[1] === '/') {
- // // 开头的补充协议名
- url = (domain ? domain.split('://')[0] : 'http') + ':' + url
- } else if (domain) {
- // 否则补充整个域名
- url = domain + url
- } /* #ifdef APP-PLUS */ else {
- url = plus.io.convertLocalFileSystemURL(url)
- } /* #endif */
- } else if (!url.includes('data:') && !url.includes('://')) {
- if (domain) {
- url = domain + '/' + url
- } /* #ifdef APP-PLUS */ else {
- url = plus.io.convertLocalFileSystemURL(url)
- } /* #endif */
- }
- return url
-}
-
-/**
- * @description 解析样式表
- * @param {Object} node 标签
- * @returns {Object}
- */
-Parser.prototype.parseStyle = function (node) {
- const attrs = node.attrs
- const list = (this.tagStyle[node.name] || '').split(';').concat((attrs.style || '').split(';'))
- const styleObj = {}
- let tmp = ''
-
- if (attrs.id && !this.xml) {
- // 暴露锚点
- if (this.options.useAnchor) {
- this.expose()
- } else if (node.name !== 'img' && node.name !== 'a' && node.name !== 'video' && node.name !== 'audio') {
- attrs.id = undefined
- }
- }
-
- // 转换 width 和 height 属性
- if (attrs.width) {
- styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px')
- attrs.width = undefined
- }
- if (attrs.height) {
- styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px')
- attrs.height = undefined
- }
-
- for (let i = 0, len = list.length; i < len; i++) {
- const info = list[i].split(':')
- if (info.length < 2) continue
- const key = info.shift().trim().toLowerCase()
- let value = info.join(':').trim()
- if ((value[0] === '-' && value.lastIndexOf('-') > 0) || value.includes('safe')) {
- // 兼容性的 css 不压缩
- tmp += `;${key}:${value}`
- } else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) {
- // 重复的样式进行覆盖
- if (value.includes('url')) {
- // 填充链接
- let j = value.indexOf('(') + 1
- if (j) {
- while (value[j] === '"' || value[j] === "'" || blankChar[value[j]]) {
- j++
- }
- value = value.substr(0, j) + this.getUrl(value.substr(j))
- }
- } else if (value.includes('rpx')) {
- // 转换 rpx(rich-text 内部不支持 rpx)
- value = value.replace(/[0-9.]+\s*rpx/g, $ => parseFloat($) * windowWidth / 750 + 'px')
- }
- styleObj[key] = value
- }
- }
-
- node.attrs.style = tmp
- return styleObj
-}
-
-/**
- * @description 解析到标签名
- * @param {String} name 标签名
- * @private
- */
-Parser.prototype.onTagName = function (name) {
- this.tagName = this.xml ? name : name.toLowerCase()
- if (this.tagName === 'svg') {
- this.xml = (this.xml || 0) + 1 // svg 标签内大小写敏感
- config.ignoreTags.style = undefined // svg 标签内 style 可用
- }
-}
-
-/**
- * @description 解析到属性名
- * @param {String} name 属性名
- * @private
- */
-Parser.prototype.onAttrName = function (name) {
- name = this.xml ? name : name.toLowerCase()
- // #ifdef (VUE3 && (H5 || APP-PLUS)) || APP-PLUS-NVUE
- if (name.includes('?') || name.includes(';')) {
- this.attrName = undefined
- return
- }
- // #endif
- if (name.substr(0, 5) === 'data-') {
- if (name === 'data-src' && !this.attrs.src) {
- // data-src 自动转为 src
- this.attrName = 'src'
- } else if (this.tagName === 'img' || this.tagName === 'a') {
- // a 和 img 标签保留 data- 的属性,可以在 imgtap 和 linktap 事件中使用
- this.attrName = name
- } else {
- // 剩余的移除以减小大小
- this.attrName = undefined
- }
- } else {
- this.attrName = name
- this.attrs[name] = 'T' // boolean 型属性缺省设置
- }
-}
-
-/**
- * @description 解析到属性值
- * @param {String} val 属性值
- * @private
- */
-Parser.prototype.onAttrVal = function (val) {
- const name = this.attrName || ''
- if (name === 'style' || name === 'href') {
- // 部分属性进行实体解码
- this.attrs[name] = decodeEntity(val, true)
- } else if (name.includes('src')) {
- // 拼接主域名
- this.attrs[name] = this.getUrl(decodeEntity(val, true))
- } else if (name) {
- this.attrs[name] = val
- }
-}
-
-/**
- * @description 解析到标签开始
- * @param {Boolean} selfClose 是否有自闭合标识 />
- * @private
- */
-Parser.prototype.onOpenTag = function (selfClose) {
- // 拼装 node
- const node = Object.create(null)
- node.name = this.tagName
- node.attrs = this.attrs
- // 避免因为自动 diff 使得 type 被设置为 null 导致部分内容不显示
- if (this.options.nodes.length) {
- node.type = 'node'
- }
- this.attrs = Object.create(null)
-
- const attrs = node.attrs
- const parent = this.stack[this.stack.length - 1]
- const siblings = parent ? parent.children : this.nodes
- const close = this.xml ? selfClose : config.voidTags[node.name]
-
- // 替换标签名选择器
- if (tagSelector[node.name]) {
- attrs.class = tagSelector[node.name] + (attrs.class ? ' ' + attrs.class : '')
- }
-
- // 转换 embed 标签
- if (node.name === 'embed') {
- // #ifndef H5 || APP-PLUS
- const src = attrs.src || ''
- // 按照后缀名和 type 将 embed 转为 video 或 audio
- if (src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8') || (attrs.type || '').includes('video')) {
- node.name = 'video'
- } else if (src.includes('.mp3') || src.includes('.wav') || src.includes('.aac') || src.includes('.m4a') || (attrs.type || '').includes('audio')) {
- node.name = 'audio'
- }
- if (attrs.autostart) {
- attrs.autoplay = 'T'
- }
- attrs.controls = 'T'
- // #endif
- // #ifdef H5 || APP-PLUS
- this.expose()
- // #endif
- }
-
- // #ifndef APP-PLUS-NVUE
- // 处理音视频
- if (node.name === 'video' || node.name === 'audio') {
- // 设置 id 以便获取 context
- if (node.name === 'video' && !attrs.id) {
- attrs.id = 'v' + idIndex++
- }
- // 没有设置 controls 也没有设置 autoplay 的自动设置 controls
- if (!attrs.controls && !attrs.autoplay) {
- attrs.controls = 'T'
- }
- // 用数组存储所有可用的 source
- node.src = []
- if (attrs.src) {
- node.src.push(attrs.src)
- attrs.src = undefined
- }
- this.expose()
- }
- // #endif
-
- // 处理自闭合标签
- if (close) {
- if (!this.hook(node) || config.ignoreTags[node.name]) {
- // 通过 base 标签设置主域名
- if (node.name === 'base' && !this.options.domain) {
- this.options.domain = attrs.href
- } /* #ifndef APP-PLUS-NVUE */ else if (node.name === 'source' && parent && (parent.name === 'video' || parent.name === 'audio') && attrs.src) {
- // 设置 source 标签(仅父节点为 video 或 audio 时有效)
- parent.src.push(attrs.src)
- } /* #endif */
- return
- }
-
- // 解析 style
- const styleObj = this.parseStyle(node)
-
- // 处理图片
- if (node.name === 'img') {
- if (attrs.src) {
- // 标记 webp
- if (attrs.src.includes('webp')) {
- node.webp = 'T'
- }
- // data url 图片如果没有设置 original-src 默认为不可预览的小图片
- if (attrs.src.includes('data:') && this.options.previewImg !== 'all' && !attrs['original-src']) {
- attrs.ignore = 'T'
- }
- if (!attrs.ignore || node.webp || attrs.src.includes('cloud://')) {
- for (let i = this.stack.length; i--;) {
- const item = this.stack[i]
- if (item.name === 'a') {
- node.a = item.attrs
- }
- if (item.name === 'table' && !node.webp && !attrs.src.includes('cloud://')) {
- if (!styleObj.display || styleObj.display.includes('inline')) {
- node.t = 'inline-block'
- } else {
- node.t = styleObj.display
- }
- styleObj.display = undefined
- }
- // #ifndef H5 || APP-PLUS
- const style = item.attrs.style || ''
- if (style.includes('flex:') && !style.includes('flex:0') && !style.includes('flex: 0') && (!styleObj.width || parseInt(styleObj.width) > 100)) {
- styleObj.width = '100% !important'
- styleObj.height = ''
- for (let j = i + 1; j < this.stack.length; j++) {
- this.stack[j].attrs.style = (this.stack[j].attrs.style || '').replace('inline-', '')
- }
- } else if (style.includes('flex') && styleObj.width === '100%') {
- for (let j = i + 1; j < this.stack.length; j++) {
- const style = this.stack[j].attrs.style || ''
- if (!style.includes(';width') && !style.includes(' width') && style.indexOf('width') !== 0) {
- styleObj.width = ''
- break
- }
- }
- } else if (style.includes('inline-block')) {
- if (styleObj.width && styleObj.width[styleObj.width.length - 1] === '%') {
- item.attrs.style += ';max-width:' + styleObj.width
- styleObj.width = ''
- } else {
- item.attrs.style += ';max-width:100%'
- }
- }
- // #endif
- item.c = 1
- }
- attrs.i = this.imgList.length.toString()
- let src = attrs['original-src'] || attrs.src
- // #ifndef H5 || MP-ALIPAY || APP-PLUS || MP-360
- if (this.imgList.includes(src)) {
- // 如果有重复的链接则对域名进行随机大小写变换避免预览时错位
- let i = src.indexOf('://')
- if (i !== -1) {
- i += 3
- let newSrc = src.substr(0, i)
- for (; i < src.length; i++) {
- if (src[i] === '/') break
- newSrc += Math.random() > 0.5 ? src[i].toUpperCase() : src[i]
- }
- newSrc += src.substr(i)
- src = newSrc
- }
- }
- // #endif
- this.imgList.push(src)
- if (!node.t) {
- this.imgList._unloadimgs += 1
- }
- // #ifdef H5 || APP-PLUS
- if (this.options.lazyLoad) {
- attrs['data-src'] = attrs.src
- attrs.src = undefined
- }
- // #endif
- }
- }
- if (styleObj.display === 'inline') {
- styleObj.display = ''
- }
- // #ifndef APP-PLUS-NVUE
- if (attrs.ignore) {
- styleObj['max-width'] = styleObj['max-width'] || '100%'
- attrs.style += ';-webkit-touch-callout:none'
- }
- // #endif
- // 设置的宽度超出屏幕,为避免变形,高度转为自动
- if (parseInt(styleObj.width) > windowWidth) {
- styleObj.height = undefined
- }
- // 记录是否设置了宽高
- if (!isNaN(parseInt(styleObj.width))) {
- node.w = 'T'
- }
- if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes('%') || (parent && (parent.attrs.style || '').includes('height')))) {
- node.h = 'T'
- }
- if (node.w && node.h && styleObj['object-fit']) {
- if (styleObj['object-fit'] === 'contain') {
- node.m = 'aspectFit'
- } else if (styleObj['object-fit'] === 'cover') {
- node.m = 'aspectFill'
- }
- }
- } else if (node.name === 'svg') {
- siblings.push(node)
- this.stack.push(node)
- this.popNode()
- return
- }
- for (const key in styleObj) {
- if (styleObj[key]) {
- attrs.style += `;${key}:${styleObj[key].replace(' !important', '')}`
- }
- }
- attrs.style = attrs.style.substr(1) || undefined
- // #ifdef (MP-WEIXIN || MP-QQ) && VUE3
- if (!attrs.style) {
- delete attrs.style
- }
- // #endif
- } else {
- if ((node.name === 'pre' || ((attrs.style || '').includes('white-space') && attrs.style.includes('pre'))) && this.pre !== 2) {
- this.pre = node.pre = 1
- }
- node.children = []
- this.stack.push(node)
- }
-
- // 加入节点树
- siblings.push(node)
-}
-
-/**
- * @description 解析到标签结束
- * @param {String} name 标签名
- * @private
- */
-Parser.prototype.onCloseTag = function (name) {
- // 依次出栈到匹配为止
- name = this.xml ? name : name.toLowerCase()
- let i
- for (i = this.stack.length; i--;) {
- if (this.stack[i].name === name) break
- }
- if (i !== -1) {
- while (this.stack.length > i) {
- this.popNode()
- }
- } else if (name === 'p' || name === 'br') {
- const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes
- siblings.push({
- name,
- attrs: {
- class: tagSelector[name] || '',
- style: this.tagStyle[name] || ''
- }
- })
- }
-}
-
-/**
- * @description 处理标签出栈
- * @private
- */
-Parser.prototype.popNode = function () {
- const node = this.stack.pop()
- let attrs = node.attrs
- const children = node.children
- const parent = this.stack[this.stack.length - 1]
- const siblings = parent ? parent.children : this.nodes
-
- if (!this.hook(node) || config.ignoreTags[node.name]) {
- // 获取标题
- if (node.name === 'title' && children.length && children[0].type === 'text' && this.options.setTitle) {
- uni.setNavigationBarTitle({
- title: children[0].text
- })
- }
- siblings.pop()
- return
- }
-
- if (node.pre && this.pre !== 2) {
- // 是否合并空白符标识
- this.pre = node.pre = undefined
- for (let i = this.stack.length; i--;) {
- if (this.stack[i].pre) {
- this.pre = 1
- }
- }
- }
-
- const styleObj = {}
-
- // 转换 svg
- if (node.name === 'svg') {
- if (this.xml > 1) {
- // 多层 svg 嵌套
- this.xml--
- return
- }
- // #ifdef APP-PLUS-NVUE
- (function traversal (node) {
- if (node.name) {
- // 调整 svg 的大小写
- node.name = config.svgDict[node.name] || node.name
- for (const item in node.attrs) {
- if (config.svgDict[item]) {
- node.attrs[config.svgDict[item]] = node.attrs[item]
- node.attrs[item] = undefined
- }
- }
- for (let i = 0; i < (node.children || []).length; i++) {
- traversal(node.children[i])
- }
- }
- })(node)
- // #endif
- // #ifndef APP-PLUS-NVUE
- let src = ''
- const style = attrs.style
- attrs.style = ''
- attrs.xmlns = 'http://www.w3.org/2000/svg';
- (function traversal (node) {
- if (node.type === 'text') {
- src += node.text
- return
- }
- const name = config.svgDict[node.name] || node.name
- if (name === 'foreignObject') {
- for (const child of (node.children || [])) {
- if (child.attrs && !child.attrs.xmlns) {
- child.attrs.xmlns = 'http://www.w3.org/1999/xhtml'
- break
- }
- }
- }
- src += '<' + name
- for (const item in node.attrs) {
- const val = node.attrs[item]
- if (val) {
- src += ` ${config.svgDict[item] || item}="${val.replace(/"/g, '')}"`
- }
- }
- if (!node.children) {
- src += '/>'
- } else {
- src += '>'
- for (let i = 0; i < node.children.length; i++) {
- traversal(node.children[i])
- }
- src += '' + name + '>'
- }
- })(node)
- node.name = 'img'
- node.attrs = {
- src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
- style,
- ignore: 'T'
- }
- node.children = undefined
- // #endif
- this.xml = false
- config.ignoreTags.style = true
- return
- }
-
- // #ifndef APP-PLUS-NVUE
- // 转换 align 属性
- if (attrs.align) {
- if (node.name === 'table') {
- if (attrs.align === 'center') {
- styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto'
- } else {
- styleObj.float = attrs.align
- }
- } else {
- styleObj['text-align'] = attrs.align
- }
- attrs.align = undefined
- }
-
- // 转换 dir 属性
- if (attrs.dir) {
- styleObj.direction = attrs.dir
- attrs.dir = undefined
- }
-
- // 转换 font 标签的属性
- if (node.name === 'font') {
- if (attrs.color) {
- styleObj.color = attrs.color
- attrs.color = undefined
- }
- if (attrs.face) {
- styleObj['font-family'] = attrs.face
- attrs.face = undefined
- }
- if (attrs.size) {
- let size = parseInt(attrs.size)
- if (!isNaN(size)) {
- if (size < 1) {
- size = 1
- } else if (size > 7) {
- size = 7
- }
- styleObj['font-size'] = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'xxx-large'][size - 1]
- }
- attrs.size = undefined
- }
- }
- // #endif
-
- // 一些编辑器的自带 class
- if ((attrs.class || '').includes('align-center')) {
- styleObj['text-align'] = 'center'
- }
-
- Object.assign(styleObj, this.parseStyle(node))
-
- if (node.name !== 'table' && parseInt(styleObj.width) > windowWidth) {
- styleObj['max-width'] = '100%'
- styleObj['box-sizing'] = 'border-box'
- }
-
- // #ifndef APP-PLUS-NVUE
- if (config.blockTags[node.name]) {
- node.name = 'div'
- } else if (!config.trustTags[node.name] && !this.xml) {
- // 未知标签转为 span,避免无法显示
- node.name = 'span'
- }
-
- if (node.name === 'a' || node.name === 'ad'
- // #ifdef H5 || APP-PLUS
- || node.name === 'iframe' // eslint-disable-line
- // #endif
- ) {
- this.expose()
- } else if (node.name === 'video') {
- if ((styleObj.height || '').includes('auto')) {
- styleObj.height = undefined
- }
- /* #ifdef APP-PLUS */
- let str = ''
- node.html = str
- /* #endif */
- } else if ((node.name === 'ul' || node.name === 'ol') && node.c) {
- // 列表处理
- const types = {
- a: 'lower-alpha',
- A: 'upper-alpha',
- i: 'lower-roman',
- I: 'upper-roman'
- }
- if (types[attrs.type]) {
- attrs.style += ';list-style-type:' + types[attrs.type]
- attrs.type = undefined
- }
- for (let i = children.length; i--;) {
- if (children[i].name === 'li') {
- children[i].c = 1
- }
- }
- } else if (node.name === 'table') {
- // 表格处理
- // cellpadding、cellspacing、border 这几个常用表格属性需要通过转换实现
- let padding = parseFloat(attrs.cellpadding)
- let spacing = parseFloat(attrs.cellspacing)
- const border = parseFloat(attrs.border)
- const bordercolor = styleObj['border-color']
- const borderstyle = styleObj['border-style']
- if (node.c) {
- // padding 和 spacing 默认 2
- if (isNaN(padding)) {
- padding = 2
- }
- if (isNaN(spacing)) {
- spacing = 2
- }
- }
- if (border) {
- attrs.style += `;border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'}`
- }
- if (node.flag && node.c) {
- // 有 colspan 或 rowspan 且含有链接的表格通过 grid 布局实现
- styleObj.display = 'grid'
- if (styleObj['border-collapse'] === 'collapse') {
- styleObj['border-collapse'] = undefined
- spacing = 0
- }
- if (spacing) {
- styleObj['grid-gap'] = spacing + 'px'
- styleObj.padding = spacing + 'px'
- } else if (border) {
- // 无间隔的情况下避免边框重叠
- attrs.style += ';border-left:0;border-top:0'
- }
-
- const width = [] // 表格的列宽
- const trList = [] // tr 列表
- const cells = [] // 保存新的单元格
- const map = {}; // 被合并单元格占用的格子
-
- (function traversal (nodes) {
- for (let i = 0; i < nodes.length; i++) {
- if (nodes[i].name === 'tr') {
- trList.push(nodes[i])
- } else if (nodes[i].name === 'colgroup') {
- let colI = 1
- for (const col of (nodes[i].children || [])) {
- if (col.name === 'col') {
- const style = col.attrs.style || ''
- const start = style.indexOf('width') ? style.indexOf(';width') : 0
- // 提取出宽度
- if (start !== -1) {
- let end = style.indexOf(';', start + 6)
- if (end === -1) {
- end = style.length
- }
- width[colI] = style.substring(start ? start + 7 : 6, end)
- }
- colI += 1
- }
- }
- } else {
- traversal(nodes[i].children || [])
- }
- }
- })(children)
-
- for (let row = 1; row <= trList.length; row++) {
- let col = 1
- for (let j = 0; j < trList[row - 1].children.length; j++) {
- const td = trList[row - 1].children[j]
- if (td.name === 'td' || td.name === 'th') {
- // 这个格子被上面的单元格占用,则列号++
- while (map[row + '.' + col]) {
- col++
- }
- let style = td.attrs.style || ''
- let start = style.indexOf('width') ? style.indexOf(';width') : 0
- // 提取出 td 的宽度
- if (start !== -1) {
- let end = style.indexOf(';', start + 6)
- if (end === -1) {
- end = style.length
- }
- if (!td.attrs.colspan) {
- width[col] = style.substring(start ? start + 7 : 6, end)
- }
- style = style.substr(0, start) + style.substr(end)
- }
- // 设置竖直对齐
- style += ';display:flex'
- start = style.indexOf('vertical-align')
- if (start !== -1) {
- const val = style.substr(start + 15, 10)
- if (val.includes('middle')) {
- style += ';align-items:center'
- } else if (val.includes('bottom')) {
- style += ';align-items:flex-end'
- }
- } else {
- style += ';align-items:center'
- }
- // 设置水平对齐
- start = style.indexOf('text-align')
- if (start !== -1) {
- const val = style.substr(start + 11, 10)
- if (val.includes('center')) {
- style += ';justify-content: center'
- } else if (val.includes('right')) {
- style += ';justify-content: right'
- }
- }
- style = (border ? `;border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'}` + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? `;padding:${padding}px` : '') + ';' + style
- // 处理列合并
- if (td.attrs.colspan) {
- style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`
- if (!td.attrs.rowspan) {
- style += `;grid-row-start:${row};grid-row-end:${row + 1}`
- }
- col += parseInt(td.attrs.colspan) - 1
- }
- // 处理行合并
- if (td.attrs.rowspan) {
- style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`
- if (!td.attrs.colspan) {
- style += `;grid-column-start:${col};grid-column-end:${col + 1}`
- }
- // 记录下方单元格被占用
- for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
- for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
- map[(row + rowspan) + '.' + (col - colspan)] = 1
- }
- }
- }
- if (style) {
- td.attrs.style = style
- }
- cells.push(td)
- col++
- }
- }
- if (row === 1) {
- let temp = ''
- for (let i = 1; i < col; i++) {
- temp += (width[i] ? width[i] : 'auto') + ' '
- }
- styleObj['grid-template-columns'] = temp
- }
- }
- node.children = cells
- } else {
- // 没有使用合并单元格的表格通过 table 布局实现
- if (node.c) {
- styleObj.display = 'table'
- }
- if (!isNaN(spacing)) {
- styleObj['border-spacing'] = spacing + 'px'
- }
- if (border || padding) {
- // 遍历
- (function traversal (nodes) {
- for (let i = 0; i < nodes.length; i++) {
- const td = nodes[i]
- if (td.name === 'th' || td.name === 'td') {
- if (border) {
- td.attrs.style = `border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'};${td.attrs.style || ''}`
- }
- if (padding) {
- td.attrs.style = `padding:${padding}px;${td.attrs.style || ''}`
- }
- } else if (td.children) {
- traversal(td.children)
- }
- }
- })(children)
- }
- }
- // 给表格添加一个单独的横向滚动层
- if (this.options.scrollTable && !(attrs.style || '').includes('inline')) {
- const table = Object.assign({}, node)
- node.name = 'div'
- node.attrs = {
- style: 'overflow:auto'
- }
- node.children = [table]
- attrs = table.attrs
- }
- } else if ((node.name === 'tbody' || node.name === 'tr') && node.flag && node.c) {
- node.flag = undefined;
- (function traversal (nodes) {
- for (let i = 0; i < nodes.length; i++) {
- if (nodes[i].name === 'td') {
- // 颜色样式设置给单元格避免丢失
- for (const style of ['color', 'background', 'background-color']) {
- if (styleObj[style]) {
- nodes[i].attrs.style = style + ':' + styleObj[style] + ';' + (nodes[i].attrs.style || '')
- }
- }
- } else {
- traversal(nodes[i].children || [])
- }
- }
- })(children)
- } else if ((node.name === 'td' || node.name === 'th') && (attrs.colspan || attrs.rowspan)) {
- for (let i = this.stack.length; i--;) {
- if (this.stack[i].name === 'table' || this.stack[i].name === 'tbody' || this.stack[i].name === 'tr') {
- this.stack[i].flag = 1 // 指示含有合并单元格
- }
- }
- } else if (node.name === 'ruby') {
- // 转换 ruby
- node.name = 'span'
- for (let i = 0; i < children.length - 1; i++) {
- if (children[i].type === 'text' && children[i + 1].name === 'rt') {
- children[i] = {
- name: 'div',
- attrs: {
- style: 'display:inline-block;text-align:center'
- },
- children: [{
- name: 'div',
- attrs: {
- style: 'font-size:50%;' + (children[i + 1].attrs.style || '')
- },
- children: children[i + 1].children
- }, children[i]]
- }
- children.splice(i + 1, 1)
- }
- }
- } else if (node.c) {
- (function traversal (node) {
- node.c = 2
- for (let i = node.children.length; i--;) {
- const child = node.children[i]
- // #ifdef (MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE3
- if (child.name && (config.inlineTags[child.name] || ((child.attrs.style || '').includes('inline') && child.children)) && !child.c) {
- traversal(child)
- }
- // #endif
- if (!child.c || child.name === 'table') {
- node.c = 1
- }
- }
- })(node)
- }
-
- if ((styleObj.display || '').includes('flex') && !node.c) {
- for (let i = children.length; i--;) {
- const item = children[i]
- if (item.f) {
- item.attrs.style = (item.attrs.style || '') + item.f
- item.f = undefined
- }
- }
- }
- // flex 布局时部分样式需要提取到 rich-text 外层
- const flex = parent && ((parent.attrs.style || '').includes('flex') || (parent.attrs.style || '').includes('grid'))
- // #ifdef MP-WEIXIN
- // 检查基础库版本 virtualHost 是否可用
- && !(node.c && wx.getNFCAdapter) // eslint-disable-line
- // #endif
- // #ifndef MP-WEIXIN || MP-QQ || MP-BAIDU || MP-TOUTIAO
- && !node.c // eslint-disable-line
- // #endif
- if (flex) {
- node.f = ';max-width:100%'
- }
-
- if (children.length >= 50 && node.c && !(styleObj.display || '').includes('flex')) {
- mergeNodes(children)
- }
- // #endif
-
- for (const key in styleObj) {
- if (styleObj[key]) {
- const val = `;${key}:${styleObj[key].replace(' !important', '')}`
- /* #ifndef APP-PLUS-NVUE */
- if (flex && ((key.includes('flex') && key !== 'flex-direction') || key === 'align-self' || key.includes('grid') || styleObj[key][0] === '-' || (key.includes('width') && val.includes('%')))) {
- node.f += val
- if (key === 'width') {
- attrs.style += ';width:100%'
- }
- } else /* #endif */ {
- attrs.style += val
- }
- }
- }
- attrs.style = attrs.style.substr(1) || undefined
- // #ifdef (MP-WEIXIN || MP-QQ) && VUE3
- for (const key in attrs) {
- if (!attrs[key]) {
- delete attrs[key]
- }
- }
- // #endif
-}
-
-/**
- * @description 解析到文本
- * @param {String} text 文本内容
- */
-Parser.prototype.onText = function (text) {
- if (!this.pre) {
- // 合并空白符
- let trim = ''
- let flag
- for (let i = 0, len = text.length; i < len; i++) {
- if (!blankChar[text[i]]) {
- trim += text[i]
- } else {
- if (trim[trim.length - 1] !== ' ') {
- trim += ' '
- }
- if (text[i] === '\n' && !flag) {
- flag = true
- }
- }
- }
- // 去除含有换行符的空串
- if (trim === ' ') {
- if (flag) return
- // #ifdef VUE3
- else {
- const parent = this.stack[this.stack.length - 1]
- if (parent && parent.name[0] === 't') return
- }
- // #endif
- }
- text = trim
- }
- const node = Object.create(null)
- node.type = 'text'
- // #ifdef (MP-BAIDU || MP-ALIPAY || MP-TOUTIAO) && VUE3
- node.attrs = {}
- // #endif
- node.text = decodeEntity(text)
- if (this.hook(node)) {
- // #ifdef MP-WEIXIN
- if (this.options.selectable === 'force' && system.includes('iOS') && !uni.canIUse('rich-text.user-select')) {
- this.expose()
- }
- // #endif
- const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes
- siblings.push(node)
- }
-}
-
-/**
- * @description html 词法分析器
- * @param {Object} handler 高层处理器
- */
-function Lexer (handler) {
- this.handler = handler
-}
-
-/**
- * @description 执行解析
- * @param {String} content 要解析的文本
- */
-Lexer.prototype.parse = function (content) {
- this.content = content || ''
- this.i = 0 // 标记解析位置
- this.start = 0 // 标记一个单词的开始位置
- this.state = this.text // 当前状态
- for (let len = this.content.length; this.i !== -1 && this.i < len;) {
- this.state()
- }
-}
-
-/**
- * @description 检查标签是否闭合
- * @param {String} method 如果闭合要进行的操作
- * @returns {Boolean} 是否闭合
- * @private
- */
-Lexer.prototype.checkClose = function (method) {
- const selfClose = this.content[this.i] === '/'
- if (this.content[this.i] === '>' || (selfClose && this.content[this.i + 1] === '>')) {
- if (method) {
- this.handler[method](this.content.substring(this.start, this.i))
- }
- this.i += selfClose ? 2 : 1
- this.start = this.i
- this.handler.onOpenTag(selfClose)
- if (this.handler.tagName === 'script') {
- this.i = this.content.indexOf('', this.i)
- if (this.i !== -1) {
- this.i += 2
- this.start = this.i
- }
- this.state = this.endTag
- } else {
- this.state = this.text
- }
- return true
- }
- return false
-}
-
-/**
- * @description 文本状态
- * @private
- */
-Lexer.prototype.text = function () {
- this.i = this.content.indexOf('<', this.i) // 查找最近的标签
- if (this.i === -1) {
- // 没有标签了
- if (this.start < this.content.length) {
- this.handler.onText(this.content.substring(this.start, this.content.length))
- }
- return
- }
- const c = this.content[this.i + 1]
- if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
- // 标签开头
- if (this.start !== this.i) {
- this.handler.onText(this.content.substring(this.start, this.i))
- }
- this.start = ++this.i
- this.state = this.tagName
- } else if (c === '/' || c === '!' || c === '?') {
- if (this.start !== this.i) {
- this.handler.onText(this.content.substring(this.start, this.i))
- }
- const next = this.content[this.i + 2]
- if (c === '/' && ((next >= 'a' && next <= 'z') || (next >= 'A' && next <= 'Z'))) {
- // 标签结尾
- this.i += 2
- this.start = this.i
- this.state = this.endTag
- return
- }
- // 处理注释
- let end = '-->'
- if (c !== '!' || this.content[this.i + 2] !== '-' || this.content[this.i + 3] !== '-') {
- end = '>'
- }
- this.i = this.content.indexOf(end, this.i)
- if (this.i !== -1) {
- this.i += end.length
- this.start = this.i
- }
- } else {
- this.i++
- }
-}
-
-/**
- * @description 标签名状态
- * @private
- */
-Lexer.prototype.tagName = function () {
- if (blankChar[this.content[this.i]]) {
- // 解析到标签名
- this.handler.onTagName(this.content.substring(this.start, this.i))
- while (blankChar[this.content[++this.i]]);
- if (this.i < this.content.length && !this.checkClose()) {
- this.start = this.i
- this.state = this.attrName
- }
- } else if (!this.checkClose('onTagName')) {
- this.i++
- }
-}
-
-/**
- * @description 属性名状态
- * @private
- */
-Lexer.prototype.attrName = function () {
- let c = this.content[this.i]
- if (blankChar[c] || c === '=') {
- // 解析到属性名
- this.handler.onAttrName(this.content.substring(this.start, this.i))
- let needVal = c === '='
- const len = this.content.length
- while (++this.i < len) {
- c = this.content[this.i]
- if (!blankChar[c]) {
- if (this.checkClose()) return
- if (needVal) {
- // 等号后遇到第一个非空字符
- this.start = this.i
- this.state = this.attrVal
- return
- }
- if (this.content[this.i] === '=') {
- needVal = true
- } else {
- this.start = this.i
- this.state = this.attrName
- return
- }
- }
- }
- } else if (!this.checkClose('onAttrName')) {
- this.i++
- }
-}
-
-/**
- * @description 属性值状态
- * @private
- */
-Lexer.prototype.attrVal = function () {
- const c = this.content[this.i]
- const len = this.content.length
- if (c === '"' || c === "'") {
- // 有冒号的属性
- this.start = ++this.i
- this.i = this.content.indexOf(c, this.i)
- if (this.i === -1) return
- this.handler.onAttrVal(this.content.substring(this.start, this.i))
- } else {
- // 没有冒号的属性
- for (; this.i < len; this.i++) {
- if (blankChar[this.content[this.i]]) {
- this.handler.onAttrVal(this.content.substring(this.start, this.i))
- break
- } else if (this.checkClose('onAttrVal')) return
- }
- }
- while (blankChar[this.content[++this.i]]);
- if (this.i < len && !this.checkClose()) {
- this.start = this.i
- this.state = this.attrName
- }
-}
-
-/**
- * @description 结束标签状态
- * @returns {String} 结束的标签名
- * @private
- */
-Lexer.prototype.endTag = function () {
- const c = this.content[this.i]
- if (blankChar[c] || c === '>' || c === '/') {
- this.handler.onCloseTag(this.content.substring(this.start, this.i))
- if (c !== '>') {
- this.i = this.content.indexOf('>', this.i)
- if (this.i === -1) return
- }
- this.start = ++this.i
- this.state = this.text
- } else {
- this.i++
- }
-}
-
-export default Parser
+/**
+ * @fileoverview html 解析器
+ */
+
+// 配置
+const config = {
+ // 信任的标签(保持标签名不变)
+ trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
+
+ // 块级标签(转为 div,其他的非信任标签转为 span)
+ blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
+
+ // #ifdef (MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE3
+ // 行内标签
+ inlineTags: makeMap('abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup'),
+ // #endif
+
+ // 要移除的标签
+ ignoreTags: makeMap('area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr'),
+
+ // 自闭合的标签
+ voidTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
+
+ // html 实体
+ entities: {
+ lt: '<',
+ gt: '>',
+ quot: '"',
+ apos: "'",
+ ensp: '\u2002',
+ emsp: '\u2003',
+ nbsp: '\xA0',
+ semi: ';',
+ ndash: '–',
+ mdash: '—',
+ middot: '·',
+ lsquo: '‘',
+ rsquo: '’',
+ ldquo: '“',
+ rdquo: '”',
+ bull: '•',
+ hellip: '…',
+ larr: '←',
+ uarr: '↑',
+ rarr: '→',
+ darr: '↓'
+ },
+
+ // 默认的标签样式
+ tagStyle: {
+ // #ifndef APP-PLUS-NVUE
+ address: 'font-style:italic',
+ big: 'display:inline;font-size:1.2em',
+ caption: 'display:table-caption;text-align:center',
+ center: 'text-align:center',
+ cite: 'font-style:italic',
+ dd: 'margin-left:40px',
+ mark: 'background-color:yellow',
+ pre: 'font-family:monospace;white-space:pre',
+ s: 'text-decoration:line-through',
+ small: 'display:inline;font-size:0.8em',
+ strike: 'text-decoration:line-through',
+ u: 'text-decoration:underline'
+ // #endif
+ },
+
+ // svg 大小写对照表
+ svgDict: {
+ animatetransform: 'animateTransform',
+ lineargradient: 'linearGradient',
+ viewbox: 'viewBox',
+ attributename: 'attributeName',
+ repeatcount: 'repeatCount',
+ repeatdur: 'repeatDur',
+ foreignobject: 'foreignObject'
+ }
+}
+const tagSelector = {}
+let windowWidth, system
+// #ifdef MP-WEIXIN
+if (uni.canIUse('getWindowInfo')) {
+ windowWidth = uni.getWindowInfo().windowWidth
+ system = uni.getDeviceInfo().system
+} else {
+// #endif
+ const systemInfo = uni.getSystemInfoSync()
+ windowWidth = systemInfo.windowWidth
+ // #ifdef MP-WEIXIN
+ system = systemInfo.system
+}
+// #endif
+const blankChar = makeMap(' ,\r,\n,\t,\f')
+let idIndex = 0
+
+// #ifdef H5 || APP-PLUS
+config.ignoreTags.iframe = undefined
+config.trustTags.iframe = true
+config.ignoreTags.embed = undefined
+config.trustTags.embed = true
+// #endif
+// #ifdef APP-PLUS-NVUE
+config.ignoreTags.source = undefined
+config.ignoreTags.style = undefined
+// #endif
+
+/**
+ * @description 创建 map
+ * @param {String} str 逗号分隔
+ */
+function makeMap (str) {
+ const map = Object.create(null)
+ const list = str.split(',')
+ for (let i = list.length; i--;) {
+ map[list[i]] = true
+ }
+ return map
+}
+
+/**
+ * @description 解码 html 实体
+ * @param {String} str 要解码的字符串
+ * @param {Boolean} amp 要不要解码 &
+ * @returns {String} 解码后的字符串
+ */
+function decodeEntity (str, amp) {
+ let i = str.indexOf('&')
+ while (i !== -1) {
+ const j = str.indexOf(';', i + 3)
+ let code
+ if (j === -1) break
+ if (str[i + 1] === '#') {
+ // { 形式的实体
+ code = parseInt((str[i + 2] === 'x' ? '0' : '') + str.substring(i + 2, j))
+ if (!isNaN(code)) {
+ str = str.substr(0, i) + String.fromCharCode(code) + str.substr(j + 1)
+ }
+ } else {
+ // 形式的实体
+ code = str.substring(i + 1, j)
+ if (config.entities[code] || (code === 'amp' && amp)) {
+ str = str.substr(0, i) + (config.entities[code] || '&') + str.substr(j + 1)
+ }
+ }
+ i = str.indexOf('&', i + 1)
+ }
+ return str
+}
+
+/**
+ * @description 合并多个块级标签,加快长内容渲染
+ * @param {Array} nodes 要合并的标签数组
+ */
+function mergeNodes (nodes) {
+ let i = nodes.length - 1
+ for (let j = i; j >= -1; j--) {
+ if (j === -1 || nodes[j].c || !nodes[j].name || (nodes[j].name !== 'div' && nodes[j].name !== 'p' && nodes[j].name[0] !== 'h') || (nodes[j].attrs.style || '').includes('inline')) {
+ if (i - j >= 5) {
+ nodes.splice(j + 1, i - j, {
+ name: 'div',
+ attrs: {},
+ children: nodes.slice(j + 1, i + 1)
+ })
+ }
+ i = j - 1
+ }
+ }
+}
+
+/**
+ * @description html 解析器
+ * @param {Object} vm 组件实例
+ */
+function Parser (vm) {
+ this.options = vm || {}
+ this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle)
+ this.imgList = vm.imgList || []
+ this.imgList._unloadimgs = 0
+ this.plugins = vm.plugins || []
+ this.attrs = Object.create(null)
+ this.stack = []
+ this.nodes = []
+ this.pre = (this.options.containerStyle || '').includes('white-space') && this.options.containerStyle.includes('pre') ? 2 : 0
+}
+
+/**
+ * @description 执行解析
+ * @param {String} content 要解析的文本
+ */
+Parser.prototype.parse = function (content) {
+ // 插件处理
+ for (let i = this.plugins.length; i--;) {
+ if (this.plugins[i].onUpdate) {
+ content = this.plugins[i].onUpdate(content, config) || content
+ }
+ }
+
+ new Lexer(this).parse(content)
+ // 出栈未闭合的标签
+ while (this.stack.length) {
+ this.popNode()
+ }
+ if (this.nodes.length > 50) {
+ mergeNodes(this.nodes)
+ }
+ return this.nodes
+}
+
+/**
+ * @description 将标签暴露出来(不被 rich-text 包含)
+ */
+Parser.prototype.expose = function () {
+ // #ifndef APP-PLUS-NVUE
+ for (let i = this.stack.length; i--;) {
+ const item = this.stack[i]
+ if (item.c || item.name === 'a' || item.name === 'video' || item.name === 'audio') return
+ item.c = 1
+ }
+ // #endif
+}
+
+/**
+ * @description 处理插件
+ * @param {Object} node 要处理的标签
+ * @returns {Boolean} 是否要移除此标签
+ */
+Parser.prototype.hook = function (node) {
+ for (let i = this.plugins.length; i--;) {
+ if (this.plugins[i].onParse && this.plugins[i].onParse(node, this) === false) {
+ return false
+ }
+ }
+ return true
+}
+
+/**
+ * @description 将链接拼接上主域名
+ * @param {String} url 需要拼接的链接
+ * @returns {String} 拼接后的链接
+ */
+Parser.prototype.getUrl = function (url) {
+ const domain = this.options.domain
+ if (url[0] === '/') {
+ if (url[1] === '/') {
+ // // 开头的补充协议名
+ url = (domain ? domain.split('://')[0] : 'http') + ':' + url
+ } else if (domain) {
+ // 否则补充整个域名
+ url = domain + url
+ } /* #ifdef APP-PLUS */ else {
+ url = plus.io.convertLocalFileSystemURL(url)
+ } /* #endif */
+ } else if (!url.includes('data:') && !url.includes('://')) {
+ if (domain) {
+ url = domain + '/' + url
+ } /* #ifdef APP-PLUS */ else {
+ url = plus.io.convertLocalFileSystemURL(url)
+ } /* #endif */
+ }
+ return url
+}
+
+/**
+ * @description 解析样式表
+ * @param {Object} node 标签
+ * @returns {Object}
+ */
+Parser.prototype.parseStyle = function (node) {
+ const attrs = node.attrs
+ const list = (this.tagStyle[node.name] || '').split(';').concat((attrs.style || '').split(';'))
+ const styleObj = {}
+ let tmp = ''
+
+ if (attrs.id && !this.xml) {
+ // 暴露锚点
+ if (this.options.useAnchor) {
+ this.expose()
+ } else if (node.name !== 'img' && node.name !== 'a' && node.name !== 'video' && node.name !== 'audio') {
+ attrs.id = undefined
+ }
+ }
+
+ // 转换 width 和 height 属性
+ if (attrs.width) {
+ styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px')
+ attrs.width = undefined
+ }
+ if (attrs.height) {
+ styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px')
+ attrs.height = undefined
+ }
+
+ for (let i = 0, len = list.length; i < len; i++) {
+ const info = list[i].split(':')
+ if (info.length < 2) continue
+ const key = info.shift().trim().toLowerCase()
+ let value = info.join(':').trim()
+ if ((value[0] === '-' && value.lastIndexOf('-') > 0) || value.includes('safe')) {
+ // 兼容性的 css 不压缩
+ tmp += `;${key}:${value}`
+ } else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) {
+ // 重复的样式进行覆盖
+ if (value.includes('url')) {
+ // 填充链接
+ let j = value.indexOf('(') + 1
+ if (j) {
+ while (value[j] === '"' || value[j] === "'" || blankChar[value[j]]) {
+ j++
+ }
+ value = value.substr(0, j) + this.getUrl(value.substr(j))
+ }
+ } else if (value.includes('rpx')) {
+ // 转换 rpx(rich-text 内部不支持 rpx)
+ value = value.replace(/[0-9.]+\s*rpx/g, $ => parseFloat($) * windowWidth / 750 + 'px')
+ }
+ styleObj[key] = value
+ }
+ }
+
+ node.attrs.style = tmp
+ return styleObj
+}
+
+/**
+ * @description 解析到标签名
+ * @param {String} name 标签名
+ * @private
+ */
+Parser.prototype.onTagName = function (name) {
+ this.tagName = this.xml ? name : name.toLowerCase()
+ if (this.tagName === 'svg') {
+ this.xml = (this.xml || 0) + 1 // svg 标签内大小写敏感
+ config.ignoreTags.style = undefined // svg 标签内 style 可用
+ }
+}
+
+/**
+ * @description 解析到属性名
+ * @param {String} name 属性名
+ * @private
+ */
+Parser.prototype.onAttrName = function (name) {
+ name = this.xml ? name : name.toLowerCase()
+ // #ifdef (VUE3 && (H5 || APP-PLUS)) || APP-PLUS-NVUE
+ if (name.includes('?') || name.includes(';')) {
+ this.attrName = undefined
+ return
+ }
+ // #endif
+ if (name.substr(0, 5) === 'data-') {
+ if (name === 'data-src' && !this.attrs.src) {
+ // data-src 自动转为 src
+ this.attrName = 'src'
+ } else if (this.tagName === 'img' || this.tagName === 'a') {
+ // a 和 img 标签保留 data- 的属性,可以在 imgtap 和 linktap 事件中使用
+ this.attrName = name
+ } else {
+ // 剩余的移除以减小大小
+ this.attrName = undefined
+ }
+ } else {
+ this.attrName = name
+ this.attrs[name] = 'T' // boolean 型属性缺省设置
+ }
+}
+
+/**
+ * @description 解析到属性值
+ * @param {String} val 属性值
+ * @private
+ */
+Parser.prototype.onAttrVal = function (val) {
+ const name = this.attrName || ''
+ if (name === 'style' || name === 'href') {
+ // 部分属性进行实体解码
+ this.attrs[name] = decodeEntity(val, true)
+ } else if (name.includes('src')) {
+ // 拼接主域名
+ this.attrs[name] = this.getUrl(decodeEntity(val, true))
+ } else if (name) {
+ this.attrs[name] = val
+ }
+}
+
+/**
+ * @description 解析到标签开始
+ * @param {Boolean} selfClose 是否有自闭合标识 />
+ * @private
+ */
+Parser.prototype.onOpenTag = function (selfClose) {
+ // 拼装 node
+ const node = Object.create(null)
+ node.name = this.tagName
+ node.attrs = this.attrs
+ // 避免因为自动 diff 使得 type 被设置为 null 导致部分内容不显示
+ if (this.options.nodes.length) {
+ node.type = 'node'
+ }
+ this.attrs = Object.create(null)
+
+ const attrs = node.attrs
+ const parent = this.stack[this.stack.length - 1]
+ const siblings = parent ? parent.children : this.nodes
+ const close = this.xml ? selfClose : config.voidTags[node.name]
+
+ // 替换标签名选择器
+ if (tagSelector[node.name]) {
+ attrs.class = tagSelector[node.name] + (attrs.class ? ' ' + attrs.class : '')
+ }
+
+ // 转换 embed 标签
+ if (node.name === 'embed') {
+ // #ifndef H5 || APP-PLUS
+ const src = attrs.src || ''
+ // 按照后缀名和 type 将 embed 转为 video 或 audio
+ if (src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8') || (attrs.type || '').includes('video')) {
+ node.name = 'video'
+ } else if (src.includes('.mp3') || src.includes('.wav') || src.includes('.aac') || src.includes('.m4a') || (attrs.type || '').includes('audio')) {
+ node.name = 'audio'
+ }
+ if (attrs.autostart) {
+ attrs.autoplay = 'T'
+ }
+ attrs.controls = 'T'
+ // #endif
+ // #ifdef H5 || APP-PLUS
+ this.expose()
+ // #endif
+ }
+
+ // #ifndef APP-PLUS-NVUE
+ // 处理音视频
+ if (node.name === 'video' || node.name === 'audio') {
+ // 设置 id 以便获取 context
+ if (node.name === 'video' && !attrs.id) {
+ attrs.id = 'v' + idIndex++
+ }
+ // 没有设置 controls 也没有设置 autoplay 的自动设置 controls
+ if (!attrs.controls && !attrs.autoplay) {
+ attrs.controls = 'T'
+ }
+ // 用数组存储所有可用的 source
+ node.src = []
+ if (attrs.src) {
+ node.src.push(attrs.src)
+ attrs.src = undefined
+ }
+ this.expose()
+ }
+ // #endif
+
+ // 处理自闭合标签
+ if (close) {
+ if (!this.hook(node) || config.ignoreTags[node.name]) {
+ // 通过 base 标签设置主域名
+ if (node.name === 'base' && !this.options.domain) {
+ this.options.domain = attrs.href
+ } /* #ifndef APP-PLUS-NVUE */ else if (node.name === 'source' && parent && (parent.name === 'video' || parent.name === 'audio') && attrs.src) {
+ // 设置 source 标签(仅父节点为 video 或 audio 时有效)
+ parent.src.push(attrs.src)
+ } /* #endif */
+ return
+ }
+
+ // 解析 style
+ const styleObj = this.parseStyle(node)
+
+ // 处理图片
+ if (node.name === 'img') {
+ if (attrs.src) {
+ // 标记 webp
+ if (attrs.src.includes('webp')) {
+ node.webp = 'T'
+ }
+ // data url 图片如果没有设置 original-src 默认为不可预览的小图片
+ if (attrs.src.includes('data:') && this.options.previewImg !== 'all' && !attrs['original-src']) {
+ attrs.ignore = 'T'
+ }
+ if (!attrs.ignore || node.webp || attrs.src.includes('cloud://')) {
+ for (let i = this.stack.length; i--;) {
+ const item = this.stack[i]
+ if (item.name === 'a') {
+ node.a = item.attrs
+ }
+ if (item.name === 'table' && !node.webp && !attrs.src.includes('cloud://')) {
+ if (!styleObj.display || styleObj.display.includes('inline')) {
+ node.t = 'inline-block'
+ } else {
+ node.t = styleObj.display
+ }
+ styleObj.display = undefined
+ }
+ // #ifndef H5 || APP-PLUS
+ const style = item.attrs.style || ''
+ if (style.includes('flex:') && !style.includes('flex:0') && !style.includes('flex: 0') && (!styleObj.width || parseInt(styleObj.width) > 100)) {
+ styleObj.width = '100% !important'
+ styleObj.height = ''
+ for (let j = i + 1; j < this.stack.length; j++) {
+ this.stack[j].attrs.style = (this.stack[j].attrs.style || '').replace('inline-', '')
+ }
+ } else if (style.includes('flex') && styleObj.width === '100%') {
+ for (let j = i + 1; j < this.stack.length; j++) {
+ const style = this.stack[j].attrs.style || ''
+ if (!style.includes(';width') && !style.includes(' width') && style.indexOf('width') !== 0) {
+ styleObj.width = ''
+ break
+ }
+ }
+ } else if (style.includes('inline-block')) {
+ if (styleObj.width && styleObj.width[styleObj.width.length - 1] === '%') {
+ item.attrs.style += ';max-width:' + styleObj.width
+ styleObj.width = ''
+ } else {
+ item.attrs.style += ';max-width:100%'
+ }
+ }
+ // #endif
+ item.c = 1
+ }
+ attrs.i = this.imgList.length.toString()
+ let src = attrs['original-src'] || attrs.src
+ // #ifndef H5 || MP-ALIPAY || APP-PLUS || MP-360
+ if (this.imgList.includes(src)) {
+ // 如果有重复的链接则对域名进行随机大小写变换避免预览时错位
+ let i = src.indexOf('://')
+ if (i !== -1) {
+ i += 3
+ let newSrc = src.substr(0, i)
+ for (; i < src.length; i++) {
+ if (src[i] === '/') break
+ newSrc += Math.random() > 0.5 ? src[i].toUpperCase() : src[i]
+ }
+ newSrc += src.substr(i)
+ src = newSrc
+ }
+ }
+ // #endif
+ this.imgList.push(src)
+ if (!node.t) {
+ this.imgList._unloadimgs += 1
+ }
+ // #ifdef H5 || APP-PLUS
+ if (this.options.lazyLoad) {
+ attrs['data-src'] = attrs.src
+ attrs.src = undefined
+ }
+ // #endif
+ }
+ }
+ if (styleObj.display === 'inline') {
+ styleObj.display = ''
+ }
+ // #ifndef APP-PLUS-NVUE
+ if (attrs.ignore) {
+ styleObj['max-width'] = styleObj['max-width'] || '100%'
+ attrs.style += ';-webkit-touch-callout:none'
+ }
+ // #endif
+ // 设置的宽度超出屏幕,为避免变形,高度转为自动
+ if (parseInt(styleObj.width) > windowWidth) {
+ styleObj.height = undefined
+ }
+ // 记录是否设置了宽高
+ if (!isNaN(parseInt(styleObj.width))) {
+ node.w = 'T'
+ }
+ if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes('%') || (parent && (parent.attrs.style || '').includes('height')))) {
+ node.h = 'T'
+ }
+ if (node.w && node.h && styleObj['object-fit']) {
+ if (styleObj['object-fit'] === 'contain') {
+ node.m = 'aspectFit'
+ } else if (styleObj['object-fit'] === 'cover') {
+ node.m = 'aspectFill'
+ }
+ }
+ } else if (node.name === 'svg') {
+ siblings.push(node)
+ this.stack.push(node)
+ this.popNode()
+ return
+ }
+ for (const key in styleObj) {
+ if (styleObj[key]) {
+ attrs.style += `;${key}:${styleObj[key].replace(' !important', '')}`
+ }
+ }
+ attrs.style = attrs.style.substr(1) || undefined
+ // #ifdef (MP-WEIXIN || MP-QQ) && VUE3
+ if (!attrs.style) {
+ delete attrs.style
+ }
+ // #endif
+ } else {
+ if ((node.name === 'pre' || ((attrs.style || '').includes('white-space') && attrs.style.includes('pre'))) && this.pre !== 2) {
+ this.pre = node.pre = 1
+ }
+ node.children = []
+ this.stack.push(node)
+ }
+
+ // 加入节点树
+ siblings.push(node)
+}
+
+/**
+ * @description 解析到标签结束
+ * @param {String} name 标签名
+ * @private
+ */
+Parser.prototype.onCloseTag = function (name) {
+ // 依次出栈到匹配为止
+ name = this.xml ? name : name.toLowerCase()
+ let i
+ for (i = this.stack.length; i--;) {
+ if (this.stack[i].name === name) break
+ }
+ if (i !== -1) {
+ while (this.stack.length > i) {
+ this.popNode()
+ }
+ } else if (name === 'p' || name === 'br') {
+ const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes
+ siblings.push({
+ name,
+ attrs: {
+ class: tagSelector[name] || '',
+ style: this.tagStyle[name] || ''
+ }
+ })
+ }
+}
+
+/**
+ * @description 处理标签出栈
+ * @private
+ */
+Parser.prototype.popNode = function () {
+ const node = this.stack.pop()
+ let attrs = node.attrs
+ const children = node.children
+ const parent = this.stack[this.stack.length - 1]
+ const siblings = parent ? parent.children : this.nodes
+
+ if (!this.hook(node) || config.ignoreTags[node.name]) {
+ // 获取标题
+ if (node.name === 'title' && children.length && children[0].type === 'text' && this.options.setTitle) {
+ uni.setNavigationBarTitle({
+ title: children[0].text
+ })
+ }
+ siblings.pop()
+ return
+ }
+
+ if (node.pre && this.pre !== 2) {
+ // 是否合并空白符标识
+ this.pre = node.pre = undefined
+ for (let i = this.stack.length; i--;) {
+ if (this.stack[i].pre) {
+ this.pre = 1
+ }
+ }
+ }
+
+ const styleObj = {}
+
+ // 转换 svg
+ if (node.name === 'svg') {
+ if (this.xml > 1) {
+ // 多层 svg 嵌套
+ this.xml--
+ return
+ }
+ // #ifdef APP-PLUS-NVUE
+ (function traversal (node) {
+ if (node.name) {
+ // 调整 svg 的大小写
+ node.name = config.svgDict[node.name] || node.name
+ for (const item in node.attrs) {
+ if (config.svgDict[item]) {
+ node.attrs[config.svgDict[item]] = node.attrs[item]
+ node.attrs[item] = undefined
+ }
+ }
+ for (let i = 0; i < (node.children || []).length; i++) {
+ traversal(node.children[i])
+ }
+ }
+ })(node)
+ // #endif
+ // #ifndef APP-PLUS-NVUE
+ let src = ''
+ const style = attrs.style
+ attrs.style = ''
+ attrs.xmlns = 'http://www.w3.org/2000/svg';
+ (function traversal (node) {
+ if (node.type === 'text') {
+ src += node.text
+ return
+ }
+ const name = config.svgDict[node.name] || node.name
+ if (name === 'foreignObject') {
+ for (const child of (node.children || [])) {
+ if (child.attrs && !child.attrs.xmlns) {
+ child.attrs.xmlns = 'http://www.w3.org/1999/xhtml'
+ break
+ }
+ }
+ }
+ src += '<' + name
+ for (const item in node.attrs) {
+ const val = node.attrs[item]
+ if (val) {
+ src += ` ${config.svgDict[item] || item}="${val.replace(/"/g, '')}"`
+ }
+ }
+ if (!node.children) {
+ src += '/>'
+ } else {
+ src += '>'
+ for (let i = 0; i < node.children.length; i++) {
+ traversal(node.children[i])
+ }
+ src += '' + name + '>'
+ }
+ })(node)
+ node.name = 'img'
+ node.attrs = {
+ src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
+ style,
+ ignore: 'T'
+ }
+ node.children = undefined
+ // #endif
+ this.xml = false
+ config.ignoreTags.style = true
+ return
+ }
+
+ // #ifndef APP-PLUS-NVUE
+ // 转换 align 属性
+ if (attrs.align) {
+ if (node.name === 'table') {
+ if (attrs.align === 'center') {
+ styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto'
+ } else {
+ styleObj.float = attrs.align
+ }
+ } else {
+ styleObj['text-align'] = attrs.align
+ }
+ attrs.align = undefined
+ }
+
+ // 转换 dir 属性
+ if (attrs.dir) {
+ styleObj.direction = attrs.dir
+ attrs.dir = undefined
+ }
+
+ // 转换 font 标签的属性
+ if (node.name === 'font') {
+ if (attrs.color) {
+ styleObj.color = attrs.color
+ attrs.color = undefined
+ }
+ if (attrs.face) {
+ styleObj['font-family'] = attrs.face
+ attrs.face = undefined
+ }
+ if (attrs.size) {
+ let size = parseInt(attrs.size)
+ if (!isNaN(size)) {
+ if (size < 1) {
+ size = 1
+ } else if (size > 7) {
+ size = 7
+ }
+ styleObj['font-size'] = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'xxx-large'][size - 1]
+ }
+ attrs.size = undefined
+ }
+ }
+ // #endif
+
+ // 一些编辑器的自带 class
+ if ((attrs.class || '').includes('align-center')) {
+ styleObj['text-align'] = 'center'
+ }
+
+ Object.assign(styleObj, this.parseStyle(node))
+
+ if (node.name !== 'table' && parseInt(styleObj.width) > windowWidth) {
+ styleObj['max-width'] = '100%'
+ styleObj['box-sizing'] = 'border-box'
+ }
+
+ // #ifndef APP-PLUS-NVUE
+ if (config.blockTags[node.name]) {
+ node.name = 'div'
+ } else if (!config.trustTags[node.name] && !this.xml) {
+ // 未知标签转为 span,避免无法显示
+ node.name = 'span'
+ }
+
+ if (node.name === 'a' || node.name === 'ad'
+ // #ifdef H5 || APP-PLUS
+ || node.name === 'iframe' // eslint-disable-line
+ // #endif
+ ) {
+ this.expose()
+ } else if (node.name === 'video') {
+ if ((styleObj.height || '').includes('auto')) {
+ styleObj.height = undefined
+ }
+ /* #ifdef APP-PLUS */
+ let str = ''
+ node.html = str
+ /* #endif */
+ } else if ((node.name === 'ul' || node.name === 'ol') && node.c) {
+ // 列表处理
+ const types = {
+ a: 'lower-alpha',
+ A: 'upper-alpha',
+ i: 'lower-roman',
+ I: 'upper-roman'
+ }
+ if (types[attrs.type]) {
+ attrs.style += ';list-style-type:' + types[attrs.type]
+ attrs.type = undefined
+ }
+ for (let i = children.length; i--;) {
+ if (children[i].name === 'li') {
+ children[i].c = 1
+ }
+ }
+ } else if (node.name === 'table') {
+ // 表格处理
+ // cellpadding、cellspacing、border 这几个常用表格属性需要通过转换实现
+ let padding = parseFloat(attrs.cellpadding)
+ let spacing = parseFloat(attrs.cellspacing)
+ const border = parseFloat(attrs.border)
+ const bordercolor = styleObj['border-color']
+ const borderstyle = styleObj['border-style']
+ if (node.c) {
+ // padding 和 spacing 默认 2
+ if (isNaN(padding)) {
+ padding = 2
+ }
+ if (isNaN(spacing)) {
+ spacing = 2
+ }
+ }
+ if (border) {
+ attrs.style += `;border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'}`
+ }
+ if (node.flag && node.c) {
+ // 有 colspan 或 rowspan 且含有链接的表格通过 grid 布局实现
+ styleObj.display = 'grid'
+ if (styleObj['border-collapse'] === 'collapse') {
+ styleObj['border-collapse'] = undefined
+ spacing = 0
+ }
+ if (spacing) {
+ styleObj['grid-gap'] = spacing + 'px'
+ styleObj.padding = spacing + 'px'
+ } else if (border) {
+ // 无间隔的情况下避免边框重叠
+ attrs.style += ';border-left:0;border-top:0'
+ }
+
+ const width = [] // 表格的列宽
+ const trList = [] // tr 列表
+ const cells = [] // 保存新的单元格
+ const map = {}; // 被合并单元格占用的格子
+
+ (function traversal (nodes) {
+ for (let i = 0; i < nodes.length; i++) {
+ if (nodes[i].name === 'tr') {
+ trList.push(nodes[i])
+ } else if (nodes[i].name === 'colgroup') {
+ let colI = 1
+ for (const col of (nodes[i].children || [])) {
+ if (col.name === 'col') {
+ const style = col.attrs.style || ''
+ const start = style.indexOf('width') ? style.indexOf(';width') : 0
+ // 提取出宽度
+ if (start !== -1) {
+ let end = style.indexOf(';', start + 6)
+ if (end === -1) {
+ end = style.length
+ }
+ width[colI] = style.substring(start ? start + 7 : 6, end)
+ }
+ colI += 1
+ }
+ }
+ } else {
+ traversal(nodes[i].children || [])
+ }
+ }
+ })(children)
+
+ for (let row = 1; row <= trList.length; row++) {
+ let col = 1
+ for (let j = 0; j < trList[row - 1].children.length; j++) {
+ const td = trList[row - 1].children[j]
+ if (td.name === 'td' || td.name === 'th') {
+ // 这个格子被上面的单元格占用,则列号++
+ while (map[row + '.' + col]) {
+ col++
+ }
+ let style = td.attrs.style || ''
+ let start = style.indexOf('width') ? style.indexOf(';width') : 0
+ // 提取出 td 的宽度
+ if (start !== -1) {
+ let end = style.indexOf(';', start + 6)
+ if (end === -1) {
+ end = style.length
+ }
+ if (!td.attrs.colspan) {
+ width[col] = style.substring(start ? start + 7 : 6, end)
+ }
+ style = style.substr(0, start) + style.substr(end)
+ }
+ // 设置竖直对齐
+ style += ';display:flex'
+ start = style.indexOf('vertical-align')
+ if (start !== -1) {
+ const val = style.substr(start + 15, 10)
+ if (val.includes('middle')) {
+ style += ';align-items:center'
+ } else if (val.includes('bottom')) {
+ style += ';align-items:flex-end'
+ }
+ } else {
+ style += ';align-items:center'
+ }
+ // 设置水平对齐
+ start = style.indexOf('text-align')
+ if (start !== -1) {
+ const val = style.substr(start + 11, 10)
+ if (val.includes('center')) {
+ style += ';justify-content: center'
+ } else if (val.includes('right')) {
+ style += ';justify-content: right'
+ }
+ }
+ style = (border ? `;border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'}` + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? `;padding:${padding}px` : '') + ';' + style
+ // 处理列合并
+ if (td.attrs.colspan) {
+ style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`
+ if (!td.attrs.rowspan) {
+ style += `;grid-row-start:${row};grid-row-end:${row + 1}`
+ }
+ col += parseInt(td.attrs.colspan) - 1
+ }
+ // 处理行合并
+ if (td.attrs.rowspan) {
+ style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`
+ if (!td.attrs.colspan) {
+ style += `;grid-column-start:${col};grid-column-end:${col + 1}`
+ }
+ // 记录下方单元格被占用
+ for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
+ for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
+ map[(row + rowspan) + '.' + (col - colspan)] = 1
+ }
+ }
+ }
+ if (style) {
+ td.attrs.style = style
+ }
+ cells.push(td)
+ col++
+ }
+ }
+ if (row === 1) {
+ let temp = ''
+ for (let i = 1; i < col; i++) {
+ temp += (width[i] ? width[i] : 'auto') + ' '
+ }
+ styleObj['grid-template-columns'] = temp
+ }
+ }
+ node.children = cells
+ } else {
+ // 没有使用合并单元格的表格通过 table 布局实现
+ if (node.c) {
+ styleObj.display = 'table'
+ }
+ if (!isNaN(spacing)) {
+ styleObj['border-spacing'] = spacing + 'px'
+ }
+ if (border || padding) {
+ // 遍历
+ (function traversal (nodes) {
+ for (let i = 0; i < nodes.length; i++) {
+ const td = nodes[i]
+ if (td.name === 'th' || td.name === 'td') {
+ if (border) {
+ td.attrs.style = `border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'};${td.attrs.style || ''}`
+ }
+ if (padding) {
+ td.attrs.style = `padding:${padding}px;${td.attrs.style || ''}`
+ }
+ } else if (td.children) {
+ traversal(td.children)
+ }
+ }
+ })(children)
+ }
+ }
+ // 给表格添加一个单独的横向滚动层
+ if (this.options.scrollTable && !(attrs.style || '').includes('inline')) {
+ const table = Object.assign({}, node)
+ node.name = 'div'
+ node.attrs = {
+ style: 'overflow:auto'
+ }
+ node.children = [table]
+ attrs = table.attrs
+ }
+ } else if ((node.name === 'tbody' || node.name === 'tr') && node.flag && node.c) {
+ node.flag = undefined;
+ (function traversal (nodes) {
+ for (let i = 0; i < nodes.length; i++) {
+ if (nodes[i].name === 'td') {
+ // 颜色样式设置给单元格避免丢失
+ for (const style of ['color', 'background', 'background-color']) {
+ if (styleObj[style]) {
+ nodes[i].attrs.style = style + ':' + styleObj[style] + ';' + (nodes[i].attrs.style || '')
+ }
+ }
+ } else {
+ traversal(nodes[i].children || [])
+ }
+ }
+ })(children)
+ } else if ((node.name === 'td' || node.name === 'th') && (attrs.colspan || attrs.rowspan)) {
+ for (let i = this.stack.length; i--;) {
+ if (this.stack[i].name === 'table' || this.stack[i].name === 'tbody' || this.stack[i].name === 'tr') {
+ this.stack[i].flag = 1 // 指示含有合并单元格
+ }
+ }
+ } else if (node.name === 'ruby') {
+ // 转换 ruby
+ node.name = 'span'
+ for (let i = 0; i < children.length - 1; i++) {
+ if (children[i].type === 'text' && children[i + 1].name === 'rt') {
+ children[i] = {
+ name: 'div',
+ attrs: {
+ style: 'display:inline-block;text-align:center'
+ },
+ children: [{
+ name: 'div',
+ attrs: {
+ style: 'font-size:50%;' + (children[i + 1].attrs.style || '')
+ },
+ children: children[i + 1].children
+ }, children[i]]
+ }
+ children.splice(i + 1, 1)
+ }
+ }
+ } else if (node.c) {
+ (function traversal (node) {
+ node.c = 2
+ for (let i = node.children.length; i--;) {
+ const child = node.children[i]
+ // #ifdef (MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE3
+ if (child.name && (config.inlineTags[child.name] || ((child.attrs.style || '').includes('inline') && child.children)) && !child.c) {
+ traversal(child)
+ }
+ // #endif
+ if (!child.c || child.name === 'table') {
+ node.c = 1
+ }
+ }
+ })(node)
+ }
+
+ if ((styleObj.display || '').includes('flex') && !node.c) {
+ for (let i = children.length; i--;) {
+ const item = children[i]
+ if (item.f) {
+ item.attrs.style = (item.attrs.style || '') + item.f
+ item.f = undefined
+ }
+ }
+ }
+ // flex 布局时部分样式需要提取到 rich-text 外层
+ const flex = parent && ((parent.attrs.style || '').includes('flex') || (parent.attrs.style || '').includes('grid'))
+ // #ifdef MP-WEIXIN
+ // 检查基础库版本 virtualHost 是否可用
+ && !(node.c && wx.getNFCAdapter) // eslint-disable-line
+ // #endif
+ // #ifndef MP-WEIXIN || MP-QQ || MP-BAIDU || MP-TOUTIAO
+ && !node.c // eslint-disable-line
+ // #endif
+ if (flex) {
+ node.f = ';max-width:100%'
+ }
+
+ if (children.length >= 50 && node.c && !(styleObj.display || '').includes('flex')) {
+ mergeNodes(children)
+ }
+ // #endif
+
+ for (const key in styleObj) {
+ if (styleObj[key]) {
+ const val = `;${key}:${styleObj[key].replace(' !important', '')}`
+ /* #ifndef APP-PLUS-NVUE */
+ if (flex && ((key.includes('flex') && key !== 'flex-direction') || key === 'align-self' || key.includes('grid') || styleObj[key][0] === '-' || (key.includes('width') && val.includes('%')))) {
+ node.f += val
+ if (key === 'width') {
+ attrs.style += ';width:100%'
+ }
+ } else /* #endif */ {
+ attrs.style += val
+ }
+ }
+ }
+ attrs.style = attrs.style.substr(1) || undefined
+ // #ifdef (MP-WEIXIN || MP-QQ) && VUE3
+ for (const key in attrs) {
+ if (!attrs[key]) {
+ delete attrs[key]
+ }
+ }
+ // #endif
+}
+
+/**
+ * @description 解析到文本
+ * @param {String} text 文本内容
+ */
+Parser.prototype.onText = function (text) {
+ if (!this.pre) {
+ // 合并空白符
+ let trim = ''
+ let flag
+ for (let i = 0, len = text.length; i < len; i++) {
+ if (!blankChar[text[i]]) {
+ trim += text[i]
+ } else {
+ if (trim[trim.length - 1] !== ' ') {
+ trim += ' '
+ }
+ if (text[i] === '\n' && !flag) {
+ flag = true
+ }
+ }
+ }
+ // 去除含有换行符的空串
+ if (trim === ' ') {
+ if (flag) return
+ // #ifdef VUE3
+ else {
+ const parent = this.stack[this.stack.length - 1]
+ if (parent && parent.name[0] === 't') return
+ }
+ // #endif
+ }
+ text = trim
+ }
+ const node = Object.create(null)
+ node.type = 'text'
+ // #ifdef (MP-BAIDU || MP-ALIPAY || MP-TOUTIAO) && VUE3
+ node.attrs = {}
+ // #endif
+ node.text = decodeEntity(text)
+ if (this.hook(node)) {
+ // #ifdef MP-WEIXIN
+ if (this.options.selectable === 'force' && system.includes('iOS') && !uni.canIUse('rich-text.user-select')) {
+ this.expose()
+ }
+ // #endif
+ const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes
+ siblings.push(node)
+ }
+}
+
+/**
+ * @description html 词法分析器
+ * @param {Object} handler 高层处理器
+ */
+function Lexer (handler) {
+ this.handler = handler
+}
+
+/**
+ * @description 执行解析
+ * @param {String} content 要解析的文本
+ */
+Lexer.prototype.parse = function (content) {
+ this.content = content || ''
+ this.i = 0 // 标记解析位置
+ this.start = 0 // 标记一个单词的开始位置
+ this.state = this.text // 当前状态
+ for (let len = this.content.length; this.i !== -1 && this.i < len;) {
+ this.state()
+ }
+}
+
+/**
+ * @description 检查标签是否闭合
+ * @param {String} method 如果闭合要进行的操作
+ * @returns {Boolean} 是否闭合
+ * @private
+ */
+Lexer.prototype.checkClose = function (method) {
+ const selfClose = this.content[this.i] === '/'
+ if (this.content[this.i] === '>' || (selfClose && this.content[this.i + 1] === '>')) {
+ if (method) {
+ this.handler[method](this.content.substring(this.start, this.i))
+ }
+ this.i += selfClose ? 2 : 1
+ this.start = this.i
+ this.handler.onOpenTag(selfClose)
+ if (this.handler.tagName === 'script') {
+ this.i = this.content.indexOf('', this.i)
+ if (this.i !== -1) {
+ this.i += 2
+ this.start = this.i
+ }
+ this.state = this.endTag
+ } else {
+ this.state = this.text
+ }
+ return true
+ }
+ return false
+}
+
+/**
+ * @description 文本状态
+ * @private
+ */
+Lexer.prototype.text = function () {
+ this.i = this.content.indexOf('<', this.i) // 查找最近的标签
+ if (this.i === -1) {
+ // 没有标签了
+ if (this.start < this.content.length) {
+ this.handler.onText(this.content.substring(this.start, this.content.length))
+ }
+ return
+ }
+ const c = this.content[this.i + 1]
+ if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
+ // 标签开头
+ if (this.start !== this.i) {
+ this.handler.onText(this.content.substring(this.start, this.i))
+ }
+ this.start = ++this.i
+ this.state = this.tagName
+ } else if (c === '/' || c === '!' || c === '?') {
+ if (this.start !== this.i) {
+ this.handler.onText(this.content.substring(this.start, this.i))
+ }
+ const next = this.content[this.i + 2]
+ if (c === '/' && ((next >= 'a' && next <= 'z') || (next >= 'A' && next <= 'Z'))) {
+ // 标签结尾
+ this.i += 2
+ this.start = this.i
+ this.state = this.endTag
+ return
+ }
+ // 处理注释
+ let end = '-->'
+ if (c !== '!' || this.content[this.i + 2] !== '-' || this.content[this.i + 3] !== '-') {
+ end = '>'
+ }
+ this.i = this.content.indexOf(end, this.i)
+ if (this.i !== -1) {
+ this.i += end.length
+ this.start = this.i
+ }
+ } else {
+ this.i++
+ }
+}
+
+/**
+ * @description 标签名状态
+ * @private
+ */
+Lexer.prototype.tagName = function () {
+ if (blankChar[this.content[this.i]]) {
+ // 解析到标签名
+ this.handler.onTagName(this.content.substring(this.start, this.i))
+ while (blankChar[this.content[++this.i]]);
+ if (this.i < this.content.length && !this.checkClose()) {
+ this.start = this.i
+ this.state = this.attrName
+ }
+ } else if (!this.checkClose('onTagName')) {
+ this.i++
+ }
+}
+
+/**
+ * @description 属性名状态
+ * @private
+ */
+Lexer.prototype.attrName = function () {
+ let c = this.content[this.i]
+ if (blankChar[c] || c === '=') {
+ // 解析到属性名
+ this.handler.onAttrName(this.content.substring(this.start, this.i))
+ let needVal = c === '='
+ const len = this.content.length
+ while (++this.i < len) {
+ c = this.content[this.i]
+ if (!blankChar[c]) {
+ if (this.checkClose()) return
+ if (needVal) {
+ // 等号后遇到第一个非空字符
+ this.start = this.i
+ this.state = this.attrVal
+ return
+ }
+ if (this.content[this.i] === '=') {
+ needVal = true
+ } else {
+ this.start = this.i
+ this.state = this.attrName
+ return
+ }
+ }
+ }
+ } else if (!this.checkClose('onAttrName')) {
+ this.i++
+ }
+}
+
+/**
+ * @description 属性值状态
+ * @private
+ */
+Lexer.prototype.attrVal = function () {
+ const c = this.content[this.i]
+ const len = this.content.length
+ if (c === '"' || c === "'") {
+ // 有冒号的属性
+ this.start = ++this.i
+ this.i = this.content.indexOf(c, this.i)
+ if (this.i === -1) return
+ this.handler.onAttrVal(this.content.substring(this.start, this.i))
+ } else {
+ // 没有冒号的属性
+ for (; this.i < len; this.i++) {
+ if (blankChar[this.content[this.i]]) {
+ this.handler.onAttrVal(this.content.substring(this.start, this.i))
+ break
+ } else if (this.checkClose('onAttrVal')) return
+ }
+ }
+ while (blankChar[this.content[++this.i]]);
+ if (this.i < len && !this.checkClose()) {
+ this.start = this.i
+ this.state = this.attrName
+ }
+}
+
+/**
+ * @description 结束标签状态
+ * @returns {String} 结束的标签名
+ * @private
+ */
+Lexer.prototype.endTag = function () {
+ const c = this.content[this.i]
+ if (blankChar[c] || c === '>' || c === '/') {
+ this.handler.onCloseTag(this.content.substring(this.start, this.i))
+ if (c !== '>') {
+ this.i = this.content.indexOf('>', this.i)
+ if (this.i === -1) return
+ }
+ this.start = ++this.i
+ this.state = this.text
+ } else {
+ this.i++
+ }
+}
+
+export default Parser
diff --git a/uni_modules/mp-html/package.json b/uni_modules/mp-html/package.json
index 84c07e3..91deca7 100644
--- a/uni_modules/mp-html/package.json
+++ b/uni_modules/mp-html/package.json
@@ -1,76 +1,74 @@
-{
- "id": "mp-html",
- "displayName": "mp-html 富文本组件【全端支持,支持编辑、latex等扩展】",
- "version": "v2.5.0",
- "description": "一个强大的富文本组件,高效轻量,功能丰富",
- "keywords": [
- "富文本",
- "编辑器",
- "html",
- "rich-text",
- "editor"
- ],
- "repository": "https://github.com/jin-yufeng/mp-html",
- "dcloudext": {
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/mp-html",
- "type": "component-vue"
- },
- "uni_modules": {
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "u",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "y",
- "联盟": "y"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
\ No newline at end of file
+{
+ "name": "mp-html",
+ "version": "2.5.2",
+ "description": "小程序富文本组件",
+ "miniprogram": "dist/mp-weixin",
+ "repository": "https://github.com/jin-yufeng/mp-html",
+ "author": "Jin Yufeng",
+ "license": "MIT",
+ "keywords": [
+ "miniprogram",
+ "rich-text",
+ "html"
+ ],
+ "standard": {
+ "globals": ["App", "Page", "Component", "wx", "requirePlugin", "uni", "plus", "weex"],
+ "envs": ["jest", "browser"]
+ },
+ "jest": {
+ "testEnvironment": "jsdom",
+ "collectCoverageFrom": [
+ "dev/mp-weixin/components/mp-html/**/*.js"
+ ]
+ },
+ "scripts": {
+ "lint": "node lint.js",
+ "lintcss": "npx stylelint src/**/*.wxss",
+ "build:weixin": "gulp build --mp-weixin",
+ "build:qq": "gulp build --mp-qq",
+ "build:baidu": "gulp build --mp-baidu",
+ "build:alipay": "gulp build --mp-alipay",
+ "build:toutiao": "gulp build --mp-toutiao",
+ "build:uni-app": "gulp build --uni-app",
+ "build": "gulp build --mp-weixin & gulp build --mp-qq & gulp build --mp-baidu & gulp build --mp-alipay & gulp build --mp-toutiao & gulp build --uni-app",
+ "watch:weixin": "gulp watch --mp-weixin --dev",
+ "watch:qq": "gulp watch --mp-qq --dev",
+ "watch:baidu": "gulp watch --mp-baidu --dev",
+ "watch:alipay": "gulp watch --mp-alipay --dev",
+ "watch:toutiao": "gulp watch --mp-toutiao --dev",
+ "watch:uni-app": "gulp watch --uni-app --dev",
+ "dev:weixin": "gulp dev --mp-weixin --dev",
+ "dev:qq": "gulp dev --mp-qq --dev",
+ "dev:baidu": "gulp dev --mp-baidu --dev",
+ "dev:alipay": "gulp dev --mp-alipay --dev",
+ "dev:toutiao": "gulp dev --mp-toutiao --dev",
+ "dev:uni-app": "gulp dev --uni-app --dev",
+ "test": "gulp dev --mp-weixin --dev && npx jest",
+ "coverage": "gulp dev --mp-weixin --dev && npx jest --coverage",
+ "coveralls": "npx coveralls < coverage/lcov.info",
+ "clean": "gulp clean --all",
+ "clean:dev": "gulp clean --all --dev"
+ },
+ "devDependencies": {
+ "@babel/preset-env": "^7.12.1",
+ "coveralls": "^3.1.0",
+ "gulp": "^4.0.0",
+ "gulp-babel": "^8.0.0",
+ "gulp-clean": "^0.4.0",
+ "gulp-clean-css": "^4.3.0",
+ "gulp-htmlmin": "^5.0.1",
+ "gulp-if": "^3.0.0",
+ "gulp-plumber": "^1.2.1",
+ "gulp-size": "^3.0.0",
+ "gulp-uglify": "^2.1.2",
+ "jest": "^26.6.1",
+ "miniprogram-simulate": "^1.2.7",
+ "standard": "^16.0.3",
+ "stylelint": "^13.7.2",
+ "stylelint-config-recess-order": "^2.3.0",
+ "stylelint-config-standard": "^20.0.0",
+ "through2": "^4.0.2",
+ "uglify-js": "^2.8.29"
+ },
+ "dependencies": {}
+}
diff --git a/uni_modules/mp-html/static/app-plus/mp-html/js/handler.js b/uni_modules/mp-html/static/app-plus/mp-html/js/handler.js
index 1d986bd..1b3ee25 100644
--- a/uni_modules/mp-html/static/app-plus/mp-html/js/handler.js
+++ b/uni_modules/mp-html/static/app-plus/mp-html/js/handler.js
@@ -1 +1,254 @@
-"use strict";function t(t){for(var e=Object.create(null),n=t.attributes.length;n--;)e[t.attributes[n].name]=t.attributes[n].value;return e}function e(){a[1]&&(this.src=a[1],this.onerror=null),this.onclick=null,this.ontouchstart=null,uni.postMessage({data:{action:"onError",source:"img",attrs:t(this)}})}function n(){window.unloadimgs-=1,0===window.unloadimgs&&uni.postMessage({data:{action:"onReady"}})}function o(r,s,c){for(var d=0;d {
+ document.body.onclick = () =>
+ uni.postMessage({
+ data: {
+ action: 'onClick'
+ }
+ })
+ uni.postMessage({
+ data: {
+ action: 'onJSBridgeReady'
+ }
+ })
+})
+
+let options
+let medias = []
+
+/**
+ * @description 获取标签的所有属性
+ * @param {Element} ele
+ */
+function getAttrs (ele) {
+ const attrs = Object.create(null)
+ for (let i = ele.attributes.length; i--;) {
+ attrs[ele.attributes[i].name] = ele.attributes[i].value
+ }
+ return attrs
+}
+
+/**
+ * @description 图片加载出错
+ */
+function onImgError () {
+ if (options[1]) {
+ this.src = options[1]
+ this.onerror = null
+ }
+ // 取消监听点击
+ this.onclick = null
+ this.ontouchstart = null
+ uni.postMessage({
+ data: {
+ action: 'onError',
+ source: 'img',
+ attrs: getAttrs(this)
+ }
+ })
+}
+
+/**
+ * @description 检查是否所有图片加载完毕
+ */
+function checkReady () {
+ window.unloadimgs -= 1
+ if (window.unloadimgs === 0) {
+ // 所有图片加载完毕
+ uni.postMessage({
+ data: {
+ action: 'onReady'
+ }
+ })
+ }
+}
+
+/**
+ * @description 创建 dom 结构
+ * @param {object[]} nodes 节点数组
+ * @param {Element} parent 父节点
+ * @param {string} namespace 命名空间
+ */
+function createDom (nodes, parent, namespace) {
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i]
+ let ele
+ if (!node.type || node.type === 'node') {
+ let name = node.name
+ // svg 需要设置 namespace
+ if (name === 'svg') {
+ namespace = 'http://www.w3.org/2000/svg'
+ }
+ if (name === 'html' || name === 'body') {
+ name = 'div'
+ }
+ // 创建标签
+ if (!namespace) {
+ ele = document.createElement(name)
+ } else {
+ ele = document.createElementNS(namespace, name)
+ }
+ // 设置属性
+ for (const item in node.attrs) {
+ ele.setAttribute(item, node.attrs[item])
+ }
+ // 递归创建子节点
+ if (node.children) {
+ createDom(node.children, ele, namespace)
+ }
+
+ // 处理图片
+ if (name === 'img') {
+ window.unloadimgs += 1
+ ele.onload = checkReady
+ ele.onerror = checkReady
+ if (!ele.src && ele.getAttribute('data-src')) {
+ ele.src = ele.getAttribute('data-src')
+ }
+ if (!node.attrs.ignore) {
+ // 监听图片点击事件
+ ele.onclick = function (e) {
+ e.stopPropagation()
+ uni.postMessage({
+ data: {
+ action: 'onImgTap',
+ attrs: getAttrs(this)
+ }
+ })
+ }
+ }
+ if (options[2]) {
+ const image = new Image()
+ image.src = ele.src
+ ele.src = options[2]
+ image.onload = function () {
+ ele.src = this.src
+ }
+ image.onerror = function () {
+ ele.onerror()
+ }
+ }
+ ele.onerror = onImgError
+ } else if (name === 'a') {
+ // 处理链接
+ ele.addEventListener('click', function (e) {
+ e.stopPropagation()
+ e.preventDefault() // 阻止默认跳转
+ const href = this.getAttribute('href')
+ let offset
+ if (href && href[0] === '#') {
+ offset = (document.getElementById(href.substr(1)) || {}).offsetTop
+ }
+ uni.postMessage({
+ data: {
+ action: 'onLinkTap',
+ attrs: getAttrs(this),
+ offset
+ }
+ })
+ }, true)
+ } else if (name === 'video' || name === 'audio') {
+ // 处理音视频
+ medias.push(ele)
+ if (!node.attrs.autoplay && !node.attrs.controls) {
+ ele.setAttribute('controls', 'true')
+ }
+ ele.onplay = function () {
+ uni.postMessage({
+ data: {
+ action: 'onPlay'
+ }
+ })
+ if (options[3]) {
+ for (let i = 0; i < medias.length; i++) {
+ if (medias[i] !== this) {
+ medias[i].pause()
+ }
+ }
+ }
+ }
+ ele.onerror = function () {
+ uni.postMessage({
+ data: {
+ action: 'onError',
+ source: name,
+ attrs: getAttrs(this)
+ }
+ })
+ }
+ } else if (name === 'table' && options[4] && !ele.style.cssText.includes('inline')) {
+ // 处理表格
+ const div = document.createElement('div')
+ div.style.overflow = 'auto'
+ div.appendChild(ele)
+ ele = div
+ } else if (name === 'svg') {
+ namespace = undefined
+ }
+ } else {
+ ele = document.createTextNode(node.text.replace(/&/g, '&'))
+ }
+ parent.appendChild(ele)
+ }
+}
+
+// 设置 html 内容
+window.setContent = function (nodes, opts, append) {
+ const ele = document.getElementById('content')
+
+ // 容器样式
+ if (opts[0]) {
+ document.body.style.cssText = opts[0]
+ }
+
+ // 长按复制
+ if (!opts[5]) {
+ ele.style.userSelect = 'none'
+ }
+
+ if (!append) {
+ ele.innerHTML = '' // 不追加则先清空
+ medias = []
+ }
+
+ options = opts
+ window.unloadimgs = 0
+ const fragment = document.createDocumentFragment()
+ createDom(nodes, fragment)
+ ele.appendChild(fragment)
+
+ // 触发事件
+ let height = ele.scrollHeight
+ uni.postMessage({
+ data: {
+ action: 'onLoad',
+ height
+ }
+ })
+ if (!window.unloadimgs) {
+ uni.postMessage({
+ data: {
+ action: 'onReady',
+ height
+ }
+ })
+ }
+
+ clearInterval(window.timer)
+ window.timer = setInterval(() => {
+ if (ele.scrollHeight !== height) {
+ height = ele.scrollHeight
+ uni.postMessage({
+ data: {
+ action: 'onHeightChange',
+ height: height
+ }
+ })
+ }
+ }, 350)
+}
+
+// 回收计时器
+window.onunload = function () {
+ clearInterval(window.timer)
+}
diff --git a/uni_modules/mp-html/static/app-plus/mp-html/local.html b/uni_modules/mp-html/static/app-plus/mp-html/local.html
index 04355c9..2e23fb4 100644
--- a/uni_modules/mp-html/static/app-plus/mp-html/local.html
+++ b/uni_modules/mp-html/static/app-plus/mp-html/local.html
@@ -1 +1,33 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/vue.config.js b/vue.config.js
index d213d17..ebf8b7f 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -2,44 +2,73 @@ module.exports = {
productionSourceMap: false,
configureWebpack: config => {
if (process.env.NODE_ENV === 'production') {
- config.optimization.minimizer[0].options.terserOptions = {
- compress: {
- drop_console: true, // 去除所有console语句
- drop_debugger: true, // 去除debugger语句
- dead_code: true, // 移除死代码
- unused: true, // 移除未使用的变量
- toplevel: true, // 清理顶层作用域未使用的变量
- passes: 3, // 大幅增加压缩次数
- reduce_funcs: true, // 合并或移除未使用的函数
- collapse_vars: true, // 折叠定义后不再修改的变量
- sequences: true, // 合并连续的变量声明
- evaluate: true, // 提前计算常量表达式
- unsafe: true, // 已压缩代码启用更激进的压缩策略
- unsafe_comps: true, // 优化比较操作
- reduce_vars: true, // 合并或移除变量
- join_vars: true, // 合并变量声明
- side_effects: false, // 假设函数调用没有副作用
- pure_funcs: ['console.log', 'console.warn', 'console.error', 'console.info', 'console.debug'], // 标记这些函数为纯函数,可以安全移除
- pure_getters: true, // 假设getter函数没有副作用
- unsafe_math: true, // 允许不安全的数学优化
- unsafe_proto: true, // 允许不安全的原型优化
- unsafe_regexp: true, // 允许不安全的正则表达式优化
- conditionals: true, // 优化条件表达式
- comparisons: true, // 优化比较操作
- booleans: true, // 优化布尔表达式
- typeofs: true // 优化typeof操作
- },
- format: {
- ascii_only: true, // 确保输出ASCII字符
- comments: false, // 去除所有注释
- beautify: false // 不美化输出
- },
- // 为已压缩代码启用更严格的处理
- parse: {
- bare_returns: true, // 允许顶级return语句
- expression: false // 禁用表达式模式
+ console.log('生产环境下开启极限压缩');
+
+ // 确保minimizer数组存在
+ if (config.optimization && config.optimization.minimizer && Array.isArray(config.optimization.minimizer)) {
+ // 查找TerserWebpackPlugin实例,而不是依赖索引
+ const terserPluginIndex = config.optimization.minimizer.findIndex(plugin => {
+ return plugin.constructor && plugin.constructor.name === 'TerserWebpackPlugin' ||
+ (plugin.options && plugin.options.terserOptions);
+ });
+
+ if (terserPluginIndex !== -1) {
+ // 确保options对象存在
+ if (!config.optimization.minimizer[terserPluginIndex].options) {
+ config.optimization.minimizer[terserPluginIndex].options = {};
+ }
+
+ // 设置terserOptions - 极限压缩配置
+ config.optimization.minimizer[terserPluginIndex].options.terserOptions = {
+ compress: {
+ drop_console: true, // 去除所有console语句
+ drop_debugger: true, // 去除debugger语句
+ dead_code: true, // 移除死代码
+ unused: true, // 移除未使用的变量
+ toplevel: true, // 清理顶层作用域未使用的变量
+ passes: 5, // 增加压缩次数以获得更好的压缩效果
+ sequences: true, // 合并连续的变量声明
+ evaluate: true, // 提前计算常量表达式
+ reduce_vars: true, // 合并或移除变量
+ join_vars: true, // 合并变量声明
+ conditionals: true, // 优化条件表达式
+ comparisons: true, // 优化比较操作
+ booleans: true, // 优化布尔表达式
+ typeofs: true, // 优化typeof操作
+ collapse_vars: true, // 折叠定义后不再修改的变量
+ reduce_funcs: true, // 合并或移除未使用的函数
+ inline: true, // 内联简单函数
+ side_effects: true, // 移除有副作用的代码
+ keep_fargs: false, // 移除未使用的函数参数
+ keep_fnames: false, // 不保留函数名称
+ pure_funcs: ['console.log', 'console.warn', 'console.error', 'console.info'], // 标记为纯函数的console方法
+ pure_getters: true // 假设getter函数没有副作用
+ },
+ format: {
+ ascii_only: true, // 确保输出ASCII字符
+ comments: false, // 去除所有注释
+ beautify: false, // 不美化输出
+ ecma: 5, // 输出兼容ECMAScript 5
+ wrap_func_args: false, // 不包裹函数参数
+ bracketize: true, // 使用大括号包裹所有块
+ quote_style: 1 // 使用单引号
+ },
+ parse: {
+ ecma: 8, // 使用ECMAScript 8解析
+ bare_returns: true // 允许顶级return语句
+ },
+ mangle: {
+ toplevel: true, // 混淆顶层作用域的变量名
+ keep_fnames: false, // 不保留函数名称
+ keep_classnames: false // 不保留类名称
+ },
+ module: false, // 不是ES模块
+ sourceMap: false // 不生成source map
+ };
+
+ console.log('terserOptions配置完成');
}
- };
+ }
}
}
};
\ No newline at end of file
From 9415f397d2de1e7656e623b6595dbcc23cb21a79 Mon Sep 17 00:00:00 2001
From: ZF sun <34314687@qq.com>
Date: Sun, 4 Jan 2026 14:40:00 +0800
Subject: [PATCH 02/26] =?UTF-8?q?chore(=E7=BB=84=E4=BB=B6):=20=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6=E5=B0=BD=E9=87=8F=E4=BD=BF=E7=94=A8=E5=BC=82=E6=AD=A5?=
=?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=A8=A1=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/js/goods_detail_base.js | 2 +-
components-diy/diy-bargain.vue | 3 +
components-diy/diy-category.vue | 3 +-
components-diy/diy-coupon.vue | 4 +
components-diy/diy-digit.vue | 8 +-
components-diy/diy-goods-brand.vue | 8 +-
components-diy/diy-goods-list.vue | 4 +-
components-diy/diy-goods-recommend.vue | 3 +
components-diy/diy-graphic-nav.vue | 4 +
components-diy/diy-groupbuy.vue | 3 +
components-diy/diy-image-nav.vue | 3 +-
components-diy/diy-index-page.vue | 7 +-
components-diy/diy-live.vue | 3 +
components-diy/diy-map.vue | 1 +
components-diy/diy-member-info.vue | 7 +-
components-diy/diy-member-my-order.vue | 4 +
components-diy/diy-merch-list.vue | 5 +
components-diy/diy-notes.vue | 5 +
components-diy/diy-notice.vue | 4 +
components-diy/diy-payment-qrcode.vue | 4 +
components-diy/diy-pinfan.vue | 5 +
components-diy/diy-pintuan.vue | 5 +
components-diy/diy-presale.vue | 5 +
components-diy/diy-quick-nav.vue | 4 +
components-diy/diy-rich-text.vue | 6 +-
components-diy/diy-rubik-cube.vue | 2 +-
components-diy/diy-search.vue | 4 +
components-diy/diy-seckill.vue | 5 +
components-diy/diy-store-label.vue | 5 +
components-diy/diy-video-list.vue | 3 +-
.../ai-chat-message/ai-chat-message.vue | 3 +-
components/common-payment/common-payment.vue | 21 +-
components/common-payment/payment.js | 2 +-
.../goods-detail-view/goods-detail-view.vue | 15 +-
components/mescroll/mescroll-body.vue | 8 +-
components/mescroll/mescroll-uni.vue | 11 +-
components/mescroll/my-list-mescroll.vue | 225 ++-
components/ns-adv/ns-adv.vue | 238 +--
.../ns-birthday-gift/ns-birthday-gift.vue | 7 +-
components/ns-contact/ns-contact.vue | 3 +
components/ns-form/ns-form.vue | 3 +-
.../ns-goods-action-button.vue | 192 +--
.../ns-goods-action-icon.vue | 3 +-
.../ns-goods-recommend/ns-goods-recommend.vue | 7 +-
.../ns-goods-sku/ns-goods-sku-category.vue | 4 +-
.../ns-goods-sku/ns-goods-sku-index.vue | 4 +-
components/ns-goods-sku/ns-goods-sku.vue | 4 +-
components/ns-login/ns-login.vue | 15 +-
components/ns-mp-html/ns-mp-html.vue | 2 +-
components/ns-new-gift/ns-new-gift.vue | 8 +-
components/ns-newform/ns-newform.vue | 4 +-
components/ns-payment/ns-payment.vue | 12 +-
components/ns-select-time/ns-select-time.vue | 62 +-
components/payment/payment.vue | 7 +-
components/pick-regions/pick-regions.vue | 3 +
.../register-reward/register-reward.vue | 4 +-
components/uni-grid-item/uni-grid-item.vue | 3 +-
components/wxwork-contact/wxwork-contact.vue | 3 +
pages/index/index.vue | 22 +-
pages_goods/cart.vue | 207 ++-
pages_goods/category.vue | 12 +-
.../goods-detail-view/goods-detail-view.vue | 15 +-
.../ns-goods-promotion/ns-goods-promotion.vue | 30 +-
pages_goods/detail.vue | 377 +++--
pages_goods/list.vue | 222 +--
pages_order/detail.vue | 485 +++---
pages_order/detail_local_delivery.vue | 3 +
pages_order/detail_pickup.vue | 3 +
pages_order/detail_point.vue | 341 ++--
pages_order/list.vue | 15 +-
pages_order/payment.vue | 3 +
.../components/yuyue-date/yuyue-date.vue | 643 +++----
pages_promotion/fenxiao/apply.vue | 10 +-
pages_promotion/fenxiao/bill.vue | 35 +-
pages_promotion/fenxiao/child_fenxiao.vue | 25 +-
pages_promotion/fenxiao/goods_list.vue | 66 +-
pages_promotion/fenxiao/index.vue | 18 +-
pages_promotion/fenxiao/level.vue | 448 ++---
pages_promotion/fenxiao/order.vue | 75 +-
pages_promotion/fenxiao/order_detail.vue | 53 +-
pages_promotion/fenxiao/promote.vue | 12 +-
pages_promotion/fenxiao/promote_code.vue | 452 ++---
pages_promotion/fenxiao/ranking_list.vue | 586 ++++---
pages_promotion/fenxiao/relation.vue | 17 +-
pages_promotion/fenxiao/team.vue | 17 +-
pages_promotion/fenxiao/withdraw_apply.vue | 3 +
pages_promotion/fenxiao/withdraw_list.vue | 39 +-
pages_promotion/fenxiao/withdrawal_detail.vue | 3 +
pages_promotion/merch/detail.vue | 230 +--
pages_promotion/merch/merchcategory.vue | 5 +-
pages_promotion/point/detail.vue | 25 +-
pages_promotion/point/goods_list.vue | 1471 +++++++++--------
pages_promotion/point/list.vue | 726 ++++----
pages_promotion/point/order_list.vue | 956 +++++------
pages_promotion/point/payment.vue | 175 +-
pages_promotion/point/result.vue | 136 +-
pages_tool/agreement/contenr.vue | 68 +-
pages_tool/article/detail.vue | 252 +--
pages_tool/article/list.vue | 335 ++--
pages_tool/cases/index.vue | 42 +-
.../components/chat-message/chat-message.vue | 12 +-
.../components/uni-calendar/uni-calendar.vue | 4 +-
.../components/uni-nav-bar/uni-nav-bar.vue | 6 +-
pages_tool/contact/contact.vue | 40 +-
pages_tool/files/list.vue | 457 ++---
pages_tool/form/form.vue | 219 +--
pages_tool/form/formdata.vue | 16 +-
pages_tool/goods/brand.vue | 196 ++-
pages_tool/goods/coupon.vue | 770 ++++-----
pages_tool/goods/coupon_receive.vue | 7 +
pages_tool/goods/evaluate.vue | 22 +-
pages_tool/goods/not_exist.vue | 7 +-
pages_tool/goods/search.vue | 535 +++---
pages_tool/help/detail.vue | 212 +--
pages_tool/help/list.vue | 16 +-
pages_tool/index/diy.vue | 31 +-
pages_tool/login/find.vue | 67 +-
pages_tool/login/login.vue | 8 +-
pages_tool/member/account.vue | 692 ++++----
pages_tool/member/account_edit.vue | 14 +-
pages_tool/member/address.vue | 22 +-
pages_tool/member/address_edit.vue | 801 +++++----
pages_tool/member/apply_withdrawal.vue | 599 +++----
pages_tool/member/balance.vue | 36 +-
pages_tool/member/balance_detail.vue | 582 ++++---
pages_tool/member/cancellation.vue | 2 +-
pages_tool/member/cancelrefuse.vue | 4 +-
pages_tool/member/cancelstatus.vue | 269 ++-
pages_tool/member/cancelsuccess.vue | 142 +-
pages_tool/member/card.vue | 204 +--
pages_tool/member/card_agreement.vue | 4 +-
pages_tool/member/card_buy.vue | 466 +++---
pages_tool/member/collection.vue | 97 +-
pages_tool/member/contact.vue | 5 +-
pages_tool/member/coupon.vue | 625 +++----
pages_tool/member/footprint.vue | 56 +-
pages_tool/member/index.vue | 65 +-
pages_tool/member/info.vue | 405 ++---
pages_tool/member/info_edit.vue | 457 ++---
pages_tool/member/invite_friends.vue | 113 +-
pages_tool/member/level.vue | 471 +++---
pages_tool/member/level_growth_rules.vue | 404 ++---
pages_tool/member/modify_face.vue | 297 ++--
pages_tool/member/pay_password.vue | 434 ++---
pages_tool/member/point.vue | 22 +-
pages_tool/member/point_detail.vue | 36 +-
pages_tool/member/withdrawal.vue | 18 +-
pages_tool/member/withdrawal_detail.vue | 3 +-
pages_tool/notice/detail.vue | 234 +--
pages_tool/notice/list.vue | 17 +-
pages_tool/order/activist.vue | 35 +-
pages_tool/order/detail_virtual.vue | 8 +-
pages_tool/order/evaluate.vue | 60 +-
pages_tool/order/logistics.vue | 40 +-
pages_tool/order/refund.vue | 64 +-
pages_tool/order/refund_batch.vue | 81 +-
pages_tool/order/refund_detail.vue | 61 +-
pages_tool/order/refund_goods_select.vue | 371 +++--
pages_tool/order/refund_type_select.vue | 169 +-
pages_tool/pay/cashier.vue | 40 +-
pages_tool/pay/index.vue | 4 +-
pages_tool/pay/result.vue | 513 +++---
pages_tool/pay/wx_pay.vue | 40 +-
pages_tool/recharge/list.vue | 988 +++++------
pages_tool/recharge/order_list.vue | 23 +-
pages_tool/seal/medium/detail.vue | 10 +-
pages_tool/seal/medium/search.vue | 9 +-
pages_tool/seal/structure.vue | 7 +-
pages_tool/storeclose/storeclose.vue | 11 +-
pages_tool/vr/index.vue | 7 +-
pages_tool/weapp/order_shipping.vue | 72 +-
pages_tool/webview/webview.vue | 5 +-
172 files changed, 11520 insertions(+), 10979 deletions(-)
diff --git a/common/js/goods_detail_base.js b/common/js/goods_detail_base.js
index 2fe192a..c04b212 100644
--- a/common/js/goods_detail_base.js
+++ b/common/js/goods_detail_base.js
@@ -1,5 +1,5 @@
// 商品详情业务
-import htmlParser from '@/common/js/html-parser';
+import htmlParser from '@/common/js/html-parser.js';
export default {
data() {
diff --git a/components-diy/diy-bargain.vue b/components-diy/diy-bargain.vue
index 373dd8a..2939daf 100644
--- a/components-diy/diy-bargain.vue
+++ b/components-diy/diy-bargain.vue
@@ -186,6 +186,9 @@ export default {
type: Object
}
},
+ components: {
+ XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
+ },
mixins: [DiyMinx],
data() {
return {
diff --git a/components-diy/diy-category.vue b/components-diy/diy-category.vue
index f907f50..c5d392b 100644
--- a/components-diy/diy-category.vue
+++ b/components-diy/diy-category.vue
@@ -161,14 +161,13 @@ let menuButtonInfo = {};
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
// #endif
-import nsGoodsSkuCategory from '@/components/ns-goods-sku/ns-goods-sku-category.vue';
import DiyMinx from './minx.js'
var contentWrapHeight, query, cartPosition;
// 商品分类
export default {
components: {
- nsGoodsSkuCategory
+ nsGoodsSkuCategory: () => import('@/components/ns-goods-sku/ns-goods-sku-category.vue'),
},
name: 'diy-category',
props: {
diff --git a/components-diy/diy-coupon.vue b/components-diy/diy-coupon.vue
index 52d0b86..b3bf43f 100644
--- a/components-diy/diy-coupon.vue
+++ b/components-diy/diy-coupon.vue
@@ -303,6 +303,10 @@ export default {
}
}
},
+ components: {
+ XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
+ nsLogin: () => import('@/components/ns-login/ns-login.vue'),
+ },
mixins: [DiyMinx],
data() {
return {
diff --git a/components-diy/diy-digit.vue b/components-diy/diy-digit.vue
index 4a51a91..91eacc7 100644
--- a/components-diy/diy-digit.vue
+++ b/components-diy/diy-digit.vue
@@ -1,4 +1,4 @@
-
+
@@ -38,15 +38,13 @@
+
+
+
+
+
+
+
+
+
diff --git a/components/ns-adv/ns-adv.vue b/components/ns-adv/ns-adv.vue
index 0d44df7..978f3bd 100644
--- a/components/ns-adv/ns-adv.vue
+++ b/components/ns-adv/ns-adv.vue
@@ -1,120 +1,120 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/components/ns-birthday-gift/ns-birthday-gift.vue b/components/ns-birthday-gift/ns-birthday-gift.vue
index e34abb7..e3cd63b 100644
--- a/components/ns-birthday-gift/ns-birthday-gift.vue
+++ b/components/ns-birthday-gift/ns-birthday-gift.vue
@@ -80,13 +80,12 @@
-
\ No newline at end of file
diff --git a/components/ns-goods-action-icon/ns-goods-action-icon.vue b/components/ns-goods-action-icon/ns-goods-action-icon.vue
index f958edd..c4ea7d3 100644
--- a/components/ns-goods-action-icon/ns-goods-action-icon.vue
+++ b/components/ns-goods-action-icon/ns-goods-action-icon.vue
@@ -20,7 +20,6 @@
-
-
\ No newline at end of file
diff --git a/pages_goods/category.vue b/pages_goods/category.vue
index 57902b4..98a0413 100644
--- a/pages_goods/category.vue
+++ b/pages_goods/category.vue
@@ -25,17 +25,13 @@
@@ -570,12 +594,12 @@ export default {
position: relative;
z-index: 999;
}
-
-
\ No newline at end of file
diff --git a/pages_order/detail.vue b/pages_order/detail.vue
index 659d78b..3fe333e 100644
--- a/pages_order/detail.vue
+++ b/pages_order/detail.vue
@@ -1,7 +1,8 @@
-
+
@@ -64,9 +65,9 @@
{{ orderData.delivery_store_name }}
@@ -108,8 +109,11 @@
复制
-
-
+
+
@@ -121,7 +125,8 @@
-
+
{{ goodsItem.sku_name }}
@@ -129,16 +134,18 @@
{{ x.spec_value_name }}
- {{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }}
-
+ {{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }}
{{ $lang('common.currencySymbol') }}
- {{ parseFloat(goodsItem.price).toFixed(2).split('.')[0] }}
- .{{ parseFloat(goodsItem.price).toFixed(2).split('.')[1] }}
+ {{
+ parseFloat(goodsItem.price).toFixed(2).split('.')[0]
+ }}
+ .{{
+ parseFloat(goodsItem.price).toFixed(2).split('.')[1] }}
@@ -152,8 +159,10 @@
次卡抵扣
-{{ $lang('common.currencySymbol') }}
- {{ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[0] }}
- .{{ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[1] }}
+ {{
+ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[0] }}
+ .{{
+ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[1] }}
@@ -164,7 +173,8 @@
{{ item.value.title }}:
-
+
@@ -176,13 +186,15 @@
-
+
{{ orderData.order_status == 10 ? '申请售后' : '申请退款' }}
-
+
{{ orderData.order_status == 10 ? '查看售后' : '查看退款' }}
@@ -315,11 +327,12 @@
我的卡包:
- 查看
+ 查看
-
-
+
@@ -608,216 +633,218 @@
\ No newline at end of file
diff --git a/pages_order/detail_local_delivery.vue b/pages_order/detail_local_delivery.vue
index ff0c6d3..506fb93 100644
--- a/pages_order/detail_local_delivery.vue
+++ b/pages_order/detail_local_delivery.vue
@@ -6,6 +6,9 @@
\ No newline at end of file
diff --git a/pages_order/list.vue b/pages_order/list.vue
index 0d45196..67112f4 100644
--- a/pages_order/list.vue
+++ b/pages_order/list.vue
@@ -166,19 +166,14 @@
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/apply.vue b/pages_promotion/fenxiao/apply.vue
index c8eae81..d388389 100644
--- a/pages_promotion/fenxiao/apply.vue
+++ b/pages_promotion/fenxiao/apply.vue
@@ -153,10 +153,13 @@
@@ -165,8 +159,10 @@ export default {
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important;
}
+
.quick-nav {
margin-bottom: 20rpx;
+
.quick-nav-item {
display: flex;
align-items: center;
@@ -190,6 +186,7 @@ export default {
}
}
}
+
.content {
overflow: hidden;
padding: 0 30rpx 160rpx;
@@ -202,12 +199,14 @@ export default {
background-size: 100%;
background-repeat: no-repeat;
box-sizing: border-box;
+
.goods-item {
margin-bottom: 20rpx;
background: #ffffff;
padding: $padding;
display: flex;
border-radius: 10rpx;
+
&:last-child {
margin-bottom: 0;
}
@@ -221,6 +220,7 @@ export default {
border-radius: 10rpx;
overflow: hidden;
flex-shrink: 0;
+
image {
width: 100%;
height: 100%;
@@ -241,6 +241,7 @@ export default {
.goods-name {
width: 100%;
line-height: 1.3;
+
.name {
line-height: 1.3;
word-break: break-all;
@@ -250,10 +251,12 @@ export default {
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
+
.label-list {
display: flex;
align-items: center;
margin-top: 6rpx;
+
.label-item {
padding: 4rpx 10rpx;
font-size: $font-size-tag;
@@ -285,6 +288,7 @@ export default {
padding: 0 $padding;
border-radius: 50rpx;
border: 2rpx solid $base-color;
+
text {
color: $base-color;
border-radius: 40rpx;
@@ -299,6 +303,7 @@ export default {
}
}
}
+
.active-btn {
position: fixed;
bottom: 40rpx;
@@ -312,10 +317,12 @@ export default {
border-radius: 50rpx;
background-color: $base-color;
color: #fff;
+
.btn {
flex: 1;
text-align: center;
}
+
.share-btn {
margin: 0;
padding: 0;
@@ -355,6 +362,7 @@ export default {
border: none;
line-height: 1;
height: auto;
+
text {
margin-top: 20rpx;
font-size: $font-size-tag;
@@ -367,6 +375,7 @@ export default {
font-size: 80rpx;
line-height: initial;
}
+
.icon-fuzhilianjie,
.icon-pengyouquan,
.icon-haowuquan,
@@ -383,39 +392,48 @@ export default {
text-align: center;
}
}
+
.poster-layer {
.generate-poster {
padding: 40rpx 0;
+
.iconfont {
font-size: 80rpx;
color: #07c160;
line-height: initial;
}
- > view {
+
+ >view {
text-align: center;
+
&:last-child {
margin-top: 20rpx;
}
}
}
+
.image-wrap {
width: 64%;
height: 854rpx;
margin: 60rpx auto 40rpx auto;
box-shadow: 0 0 32rpx rgba(100, 100, 100, 0.3);
+
image {
width: 480rpx;
height: 854rpx;
}
}
+
.msg {
padding: 40rpx;
}
+
.save {
text-align: center;
height: 80rpx;
line-height: 80rpx;
}
+
.close {
position: absolute;
top: 0;
diff --git a/pages_promotion/fenxiao/index.vue b/pages_promotion/fenxiao/index.vue
index dc128d6..8cc162d 100644
--- a/pages_promotion/fenxiao/index.vue
+++ b/pages_promotion/fenxiao/index.vue
@@ -261,11 +261,25 @@
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/order.vue b/pages_promotion/fenxiao/order.vue
index 36e0a17..6e398d2 100644
--- a/pages_promotion/fenxiao/order.vue
+++ b/pages_promotion/fenxiao/order.vue
@@ -2,40 +2,51 @@
- {{ item.name }}
+ {{ item.name }}
+
-
+
-
+
{{ orderItem.sku_name }}
返{{ fenxiaoWords.account }}
- {{ $lang('common.currencySymbol') }}
- {{ parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}
- .{{ parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}
+ {{
+ $lang('common.currencySymbol') }}
+ {{
+ parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}
+ .{{
+ parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}
- {{ $lang('common.currencySymbol') }}
- {{ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
- .{{ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}
+ {{ $lang('common.currencySymbol')
+ }}
+ {{
+ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
+ .{{
+ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}
@@ -57,18 +68,24 @@
合计:
{{ $lang('common.currencySymbol') }}
- {{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}
- .{{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[1] }}
+ {{
+ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}
+ .{{
+ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[1] }}
-
-
-
-
+
+
+
+
@@ -79,22 +96,16 @@
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/ranking_list.vue b/pages_promotion/fenxiao/ranking_list.vue
index 6a134eb..8211aa3 100644
--- a/pages_promotion/fenxiao/ranking_list.vue
+++ b/pages_promotion/fenxiao/ranking_list.vue
@@ -3,17 +3,22 @@
-
+
-
+
- {{info.nickname}}
+ {{ info.nickname }}
- 点击提现
- 我的团队
+ 点击提现
+ 我的团队
@@ -26,7 +31,7 @@
分销佣金
- {{ info.today_commission}}元
+ {{ info.today_commission }}元
@@ -50,7 +55,7 @@
推广人数
- {{ info.one_child_num}}人
+ {{ info.one_child_num }}人
@@ -67,20 +72,21 @@
- 佣金排行
- 推广排行
+ 佣金排行
+ 推广排行
{{ index + 1 }}
-
+
{{ item.nickname }}
- ¥{{ item.total_commission|moneyFormat }}
+ ¥{{ item.total_commission | moneyFormat }}
{{ item.child_num }}人
@@ -97,337 +103,329 @@
diff --git a/pages_promotion/fenxiao/relation.vue b/pages_promotion/fenxiao/relation.vue
index 36927b5..f0e643b 100644
--- a/pages_promotion/fenxiao/relation.vue
+++ b/pages_promotion/fenxiao/relation.vue
@@ -72,23 +72,16 @@
-
\ No newline at end of file
diff --git a/pages_promotion/merch/merchcategory.vue b/pages_promotion/merch/merchcategory.vue
index 91180a8..e016d17 100644
--- a/pages_promotion/merch/merchcategory.vue
+++ b/pages_promotion/merch/merchcategory.vue
@@ -61,7 +61,10 @@
-
+
diff --git a/pages_promotion/point/list.vue b/pages_promotion/point/list.vue
index c1331b1..47f99e5 100644
--- a/pages_promotion/point/list.vue
+++ b/pages_promotion/point/list.vue
@@ -2,16 +2,19 @@
-
-
+ :style="{ 'padding-top': menuButtonBounding.top + 'px', height: menuButtonBounding.height + 'px' }">
+
+
搜索商品
-
+
@@ -20,7 +23,7 @@
-
+
@@ -28,9 +31,9 @@
我的积分
- {{point}}
+ {{ point }}
积分
-
+
-
-
-
+
储值{{ parseFloat(item.buy_price) }}元
可得{{ item.point }}积分
@@ -92,10 +96,13 @@
-
-
+
+
-
+
- {{ couponItem.at_least == 0 ? '无门槛优惠券' : '满' + parseFloat(couponItem.at_least).toFixed(0) + '可用' }}
+ {{ couponItem.at_least == 0 ? '无门槛优惠券' : '满' +
+ parseFloat(couponItem.at_least).toFixed(0) + '可用' }}
- 全场券
- 指定券
+ 全场券
+
+ 指定券
@@ -139,7 +150,9 @@
-
+
@@ -188,17 +201,19 @@
+
- {{ parseFloat(item.price).toFixed(2).split(".")[0] }}
- .{{ parseFloat(item.price).toFixed(2).split(".")[1] }}元
+ {{
+ parseFloat(item.price).toFixed(2).split(".")[0] }}
+ .{{
+ parseFloat(item.price).toFixed(2).split(".")[1] }}元
兑换
-
-
+
+
库存:{{ isNaN(parseInt(item.stock)) ? 0 : parseInt(item.stock) }}
-
+
已兑:{{ isNaN(parseInt(item.sale_num)) ? 0 : parseInt(item.sale_num) }}
@@ -216,19 +231,19 @@
- {{ isEnEnv ? 'Integral Description' : '积分说明'}}
+ {{ isEnEnv ? 'Integral Description' : '积分说明' }}
- {{ isEnEnv ? 'Integral Acquisition' : '积分的获取'}}
+ {{ isEnEnv ? 'Integral Acquisition' : '积分的获取' }}
1、积分可在注册、签到、分享、消费、充值时获得。
2、在购买部分商品时可获得积分。
- {{ isEnEnv ? 'Integral Use' : '积分的使用'}}
+ {{ isEnEnv ? 'Integral Use' : '积分的使用' }}
1、积分可用于兑换积分中心的商品。
2、积分可在参与某些活动时使用。
3、积分不得转让,出售,不设有效期。
- {{ isEnEnv ? 'Integral Query' : '积分的查询'}}
+ {{ isEnEnv ? 'Integral Query' : '积分的查询' }}
1、积分可在会员中心中查询具体数额以及明细。
@@ -245,349 +260,358 @@
\ No newline at end of file
diff --git a/pages_promotion/point/order_list.vue b/pages_promotion/point/order_list.vue
index 66b6a83..2ab4990 100644
--- a/pages_promotion/point/order_list.vue
+++ b/pages_promotion/point/order_list.vue
@@ -1,36 +1,43 @@
-
-
+
+
{{ statusItem.name }}
-
-
+
+
-
+
-
+
-
+
-
+
@@ -42,9 +49,12 @@
积分
+
- {{ $lang('common.currencySymbol') }}
- {{ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
- .{{ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}
+ {{
+ $lang('common.currencySymbol') }}
+ {{
+ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
+ .{{
+ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}
@@ -58,8 +68,10 @@
-
+
@@ -83,509 +96,508 @@
diff --git a/pages_promotion/point/payment.vue b/pages_promotion/point/payment.vue
index 155cf6f..b53424f 100644
--- a/pages_promotion/point/payment.vue
+++ b/pages_promotion/point/payment.vue
@@ -2,9 +2,9 @@
+ 'padding-top': menuButtonBounding.top + 'px',
+ height: menuButtonBounding.height + 'px'
+ }">
确认订单
@@ -18,11 +18,12 @@
-
+
{{ deliveryItem.title }}
@@ -31,10 +32,12 @@
-
-
+
由 {{ storeInfo.currStore.store_name }} 提供配送
@@ -49,14 +52,19 @@
-
+
- {{ orderCreateData.member_address.name ? orderCreateData.member_address.name : '' }}
- {{ orderCreateData.member_address.mobile ? orderCreateData.member_address.mobile : '' }}
+ {{ orderCreateData.member_address.name ?
+ orderCreateData.member_address.name : '' }}
+ {{ orderCreateData.member_address.mobile ?
+ orderCreateData.member_address.mobile : '' }}
- {{ orderCreateData.member_address.full_address ? orderCreateData.member_address.full_address : '' }}
- {{ orderCreateData.member_address.address ? orderCreateData.member_address.address : '' }}
+ {{ orderCreateData.member_address.full_address ?
+ orderCreateData.member_address.full_address : '' }}
+ {{ orderCreateData.member_address.address ? orderCreateData.member_address.address : ''
+ }}
@@ -69,11 +77,14 @@
-
+
送达时间
- {{ orderCreateData.buyer_ask_delivery_title ? orderCreateData.buyer_ask_delivery_title : '请选择送达时间' }}
+ {{
+ orderCreateData.buyer_ask_delivery_title ?
+ orderCreateData.buyer_ask_delivery_title : '请选择送达时间' }}
@@ -82,7 +93,9 @@
-
+
@@ -104,20 +117,22 @@
姓名
-
+
预留手机
+ placeholder-class="color-tip placeholder" class="input"
+ v-model="member_address.mobile" />
自提时间
- {{orderCreateData.buyer_ask_delivery_title}}
+ {{ orderCreateData.buyer_ask_delivery_title }}
@@ -137,27 +152,35 @@
手机号码
-
+
-
+
-
+
-
+
-
+
@@ -182,7 +205,8 @@
@@ -196,7 +220,8 @@
积分
-
+
运费
{{ $lang('common.currencySymbol') }}
@@ -206,8 +231,9 @@
-
- {{orderPaymentData.delivery.error_msg}}
+
+ {{ orderPaymentData.delivery.error_msg }}
@@ -221,12 +247,14 @@
-
+
@@ -241,22 +269,29 @@
-
+
-
+
{{ item.store_name }}
({{ item.distance }}km)
-
+
营业时间:{{ item.open_date }}
-
+
地址:{{ item.full_address }}{{ item.address }}
-
+
所选择收货地址附近没有可以自提的门店
@@ -267,7 +302,8 @@
-
+
@@ -277,48 +313,41 @@
\ No newline at end of file
diff --git a/pages_promotion/point/result.vue b/pages_promotion/point/result.vue
index ce14ea8..62c7f14 100644
--- a/pages_promotion/point/result.vue
+++ b/pages_promotion/point/result.vue
@@ -12,81 +12,81 @@
diff --git a/pages_tool/agreement/contenr.vue b/pages_tool/agreement/contenr.vue
index 7dfcaa9..581f70b 100644
--- a/pages_tool/agreement/contenr.vue
+++ b/pages_tool/agreement/contenr.vue
@@ -5,50 +5,48 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages_tool/article/detail.vue b/pages_tool/article/detail.vue
index d2c7c25..7b39f90 100644
--- a/pages_tool/article/detail.vue
+++ b/pages_tool/article/detail.vue
@@ -25,134 +25,140 @@
\ No newline at end of file
diff --git a/pages_tool/article/list.vue b/pages_tool/article/list.vue
index bcbbb96..4d9ca46 100644
--- a/pages_tool/article/list.vue
+++ b/pages_tool/article/list.vue
@@ -6,7 +6,8 @@
-
+
{{ item.article_title }}
@@ -33,203 +34,195 @@
\ No newline at end of file
diff --git a/pages_tool/cases/index.vue b/pages_tool/cases/index.vue
index 50303ad..7b52aac 100644
--- a/pages_tool/cases/index.vue
+++ b/pages_tool/cases/index.vue
@@ -1,5 +1,5 @@
-
+
@@ -8,7 +8,9 @@
-
+
@@ -17,16 +19,16 @@
- {{item.$orig.title}}
- {{item.$orig.desc}}
- {{"完成时间:" + item.g3}}
+ {{ item.$orig.title }}
+ {{ item.$orig.desc }}
+ {{ "完成时间:" + item.g3 }}
- {{item.$orig.files_title}}
+ {{ item.$orig.files_title }}
查看PDF文件
@@ -59,13 +61,15 @@
联系方式
-
+
留言内容
-
+
@@ -77,9 +81,11 @@
-
+
-
+
@@ -88,6 +94,9 @@
\ No newline at end of file
diff --git a/pages_tool/form/form.vue b/pages_tool/form/form.vue
index 52f2d16..c6342be 100644
--- a/pages_tool/form/form.vue
+++ b/pages_tool/form/form.vue
@@ -10,7 +10,7 @@
-
+
@@ -18,130 +18,135 @@
\ No newline at end of file
diff --git a/pages_tool/form/formdata.vue b/pages_tool/form/formdata.vue
index 7743cc8..66e4a5b 100644
--- a/pages_tool/form/formdata.vue
+++ b/pages_tool/form/formdata.vue
@@ -3,11 +3,13 @@
-
+
请填写表单所需信息
-
+
@@ -21,6 +23,12 @@
\ No newline at end of file
diff --git a/pages_tool/goods/coupon.vue b/pages_tool/goods/coupon.vue
index 2b332ba..80c0bfc 100644
--- a/pages_tool/goods/coupon.vue
+++ b/pages_tool/goods/coupon.vue
@@ -2,42 +2,53 @@
- 全部
- 满减券
- 折扣券
-
+ 全部
+ 满减券
+ 折扣券
+
-
+
-
+
-
+
¥
{{ parseFloat(item.money) }}
-
+
{{ parseFloat(item.discount) }}
折
- 满{{ item.at_least }}元可用
- 无门槛优惠券
+ 满{{ item.at_least }}元可用
+ 无门槛优惠券
{{ item.coupon_name }}
- 指定商品
+ 指定商品
全场商品
(最大优惠{{ item.discount_limit }}元)
- {{ item.use_channel_name }}
-
@@ -70,406 +81,401 @@
\ No newline at end of file
diff --git a/pages_tool/goods/coupon_receive.vue b/pages_tool/goods/coupon_receive.vue
index eb910ea..7daebfe 100644
--- a/pages_tool/goods/coupon_receive.vue
+++ b/pages_tool/goods/coupon_receive.vue
@@ -39,6 +39,13 @@
\ No newline at end of file
diff --git a/pages_tool/help/detail.vue b/pages_tool/help/detail.vue
index cd41c7f..cb6104b 100644
--- a/pages_tool/help/detail.vue
+++ b/pages_tool/help/detail.vue
@@ -15,51 +15,49 @@
\ No newline at end of file
diff --git a/pages_tool/help/list.vue b/pages_tool/help/list.vue
index 32f5f6b..83ae09e 100644
--- a/pages_tool/help/list.vue
+++ b/pages_tool/help/list.vue
@@ -3,7 +3,8 @@
{{ item.class_name }}
- {{ s_item.title }}
+ {{ s_item.title }}
@@ -19,12 +20,18 @@
\ No newline at end of file
diff --git a/pages_tool/member/account_edit.vue b/pages_tool/member/account_edit.vue
index 0225527..5507b2c 100644
--- a/pages_tool/member/account_edit.vue
+++ b/pages_tool/member/account_edit.vue
@@ -2,7 +2,8 @@
{{ $lang('name') }}
-
+
{{ $lang('mobilePhone') }}
@@ -17,11 +18,13 @@
银行名称
-
+
提现账号
-
+
@@ -33,6 +36,9 @@
\ No newline at end of file
diff --git a/pages_tool/member/apply_withdrawal.vue b/pages_tool/member/apply_withdrawal.vue
index d258e4f..1b93d35 100644
--- a/pages_tool/member/apply_withdrawal.vue
+++ b/pages_tool/member/apply_withdrawal.vue
@@ -31,7 +31,8 @@
- 可提现余额:{{ $lang('common.currencySymbol') }}{{ withdrawInfo.member_info.balance_money | moneyFormat }}
+ 可提现余额:{{ $lang('common.currencySymbol') }}{{
+ withdrawInfo.member_info.balance_money | moneyFormat }}
全部提现
@@ -41,7 +42,8 @@
-
+
提现
@@ -53,163 +55,130 @@
\ No newline at end of file
diff --git a/pages_tool/member/balance.vue b/pages_tool/member/balance.vue
index 1976189..f00c414 100644
--- a/pages_tool/member/balance.vue
+++ b/pages_tool/member/balance.vue
@@ -2,9 +2,9 @@
+ 'padding-top': menuButtonBounding.top + 'px',
+ 'height': menuButtonBounding.height + 'px'
+ }">
@@ -13,12 +13,14 @@
-
-
-
+
+
+
账户余额(元)
- {{ (parseFloat(balanceInfo.balance) + parseFloat(balanceInfo.balance_money)).toFixed(2) }}
-
-
-
-
+
{{ $util.timeStampTurnTime(item.create_time) }}
- {{ item.account_data > 0 ? '+' + item.account_data : item.account_data }}元
+ {{ item.account_data > 0 ?
+ '+' + item.account_data : item.account_data }}元
@@ -50,324 +53,319 @@
\ No newline at end of file
diff --git a/pages_tool/member/cancellation.vue b/pages_tool/member/cancellation.vue
index b1e05a8..f9d60f3 100644
--- a/pages_tool/member/cancellation.vue
+++ b/pages_tool/member/cancellation.vue
@@ -19,7 +19,7 @@
\ No newline at end of file
diff --git a/pages_tool/member/cancelsuccess.vue b/pages_tool/member/cancelsuccess.vue
index 4f975ab..a028ccf 100644
--- a/pages_tool/member/cancelsuccess.vue
+++ b/pages_tool/member/cancelsuccess.vue
@@ -12,88 +12,88 @@
\ No newline at end of file
diff --git a/pages_tool/member/card.vue b/pages_tool/member/card.vue
index 2d5d236..9706d63 100644
--- a/pages_tool/member/card.vue
+++ b/pages_tool/member/card.vue
@@ -5,8 +5,9 @@
-
-
+
+
{{ memberInfo.nickname }}
@@ -22,15 +23,18 @@
{{ levelInfo.level_name }}
{{ levelInfo.level_name }}可享受消费折扣和
会员大礼包等权益
-
+
-
+
-
+
@@ -118,113 +122,111 @@
-
\ No newline at end of file
diff --git a/pages_tool/member/card_agreement.vue b/pages_tool/member/card_agreement.vue
index aa54a01..b489938 100644
--- a/pages_tool/member/card_agreement.vue
+++ b/pages_tool/member/card_agreement.vue
@@ -6,7 +6,7 @@
\ No newline at end of file
diff --git a/pages_tool/member/collection.vue b/pages_tool/member/collection.vue
index 5153e8b..5800ebb 100644
--- a/pages_tool/member/collection.vue
+++ b/pages_tool/member/collection.vue
@@ -1,19 +1,24 @@
-
+
-
+
-
+
{{ item.sku_name }}
¥
- {{ parseFloat(item.discount_price).toFixed(2).split('.')[0] }}
- .{{ parseFloat(item.discount_price).toFixed(2).split('.')[1] }}
+ {{
+ parseFloat(item.discount_price).toFixed(2).split('.')[0] }}
+ .{{
+ parseFloat(item.discount_price).toFixed(2).split('.')[1] }}
@@ -35,65 +40,57 @@
-
\ No newline at end of file
diff --git a/pages_tool/member/contact.vue b/pages_tool/member/contact.vue
index 3ef3863..f10d1b5 100644
--- a/pages_tool/member/contact.vue
+++ b/pages_tool/member/contact.vue
@@ -10,8 +10,8 @@ export default {
data() {
return {};
},
- onLoad(options) {},
- onShow() {},
+ onLoad(options) { },
+ onShow() { },
methods: {}
};
@@ -21,6 +21,7 @@ export default {
width: 80%;
text-align: center;
margin: 0 auto;
+
image {
width: 500rpx;
}
diff --git a/pages_tool/member/coupon.vue b/pages_tool/member/coupon.vue
index 660888b..60efffe 100644
--- a/pages_tool/member/coupon.vue
+++ b/pages_tool/member/coupon.vue
@@ -2,9 +2,12 @@
- 未使用
- 已使用
- 已过期
+ 未使用
+ 已使用
+ 已过期
@@ -60,7 +69,8 @@
-
+
@@ -70,347 +80,342 @@
\ No newline at end of file
diff --git a/pages_tool/member/footprint.vue b/pages_tool/member/footprint.vue
index 4cf5824..f31e808 100644
--- a/pages_tool/member/footprint.vue
+++ b/pages_tool/member/footprint.vue
@@ -10,11 +10,14 @@
{{ datetime(item) }}
-
+
-
- {{ goodsTag(item) }}
+
+
+ {{ goodsTag(item) }}
+
@@ -24,22 +27,28 @@
{{ $lang('common.currencySymbol') }}
- {{ parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}
- .{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}
+ {{
+ parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}
+ .{{
+ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}
-
+
-
+
+
-
+
{{ $lang('common.currencySymbol') }}
{{ showMarketPrice(item) }}
- 已售{{ item.sale_num }}{{ item.unit ? item.unit : '件' }}
+ 已售{{
+ item.sale_num }}{{ item.unit ? item.unit : '件' }}
@@ -49,10 +58,12 @@
-
+
全选
-
+
@@ -64,22 +75,15 @@
\ No newline at end of file
diff --git a/pages_tool/member/info_edit.vue b/pages_tool/member/info_edit.vue
index 6a64810..ac1a93c 100644
--- a/pages_tool/member/info_edit.vue
+++ b/pages_tool/member/info_edit.vue
@@ -5,7 +5,8 @@
用户名
-
+
用户名仅可修改一次,请谨慎设置
@@ -16,7 +17,8 @@
昵称
-
+
@@ -26,7 +28,8 @@
姓名
-
+
@@ -39,7 +42,8 @@
@@ -53,7 +57,8 @@
生日
-
+
{{ formData.birthday ? formData.birthday : '请选择生日' }}
@@ -69,35 +74,42 @@
请先绑定手机再执行该操作
-
+
原密码
-
+
新密码
-
+
再次输入
-
-
+
+
点击“获取动态码”,将会向您已绑定的手机号{{ memberInfoformData.mobile | mobile }}发送验证码
新密码
-
+
再次输入
-
+
@@ -109,17 +121,21 @@
手机号
-
+
验证码
-
+
短信验证码
-
-
+
+
@@ -138,7 +154,7 @@
所在地区
-
+
{{ formData.fullAddress ? formData.fullAddress : '请选择省市区县' }}
@@ -157,237 +173,238 @@
\ No newline at end of file
diff --git a/pages_tool/member/invite_friends.vue b/pages_tool/member/invite_friends.vue
index 8321783..3e8c1b1 100644
--- a/pages_tool/member/invite_friends.vue
+++ b/pages_tool/member/invite_friends.vue
@@ -9,12 +9,15 @@
活动说明
-
+
- 活动时间:{{ $util.timeStampTurnTime(info.start_time, 1) }}至{{ $util.timeStampTurnTime(info.end_time, 1) }}
+ 活动时间:{{ $util.timeStampTurnTime(info.start_time, 1) }}至{{ $util.timeStampTurnTime(info.end_time, 1)
+ }}
- 立即邀请
+ 立即邀请
我的好友
@@ -23,7 +26,8 @@
-
+
@@ -43,11 +47,13 @@
-
+
查看更多
- 没有更多数据了
+ 没有更多数据了
@@ -62,7 +68,7 @@
-
+
{{ $lang('common.currencySymbol') }}
@@ -73,7 +79,7 @@
-
+
{{ parseInt(info.point) }}
@@ -128,7 +134,7 @@
-
+
分享链接给好友
@@ -137,7 +143,7 @@
-
+
好友进入
@@ -146,7 +152,7 @@
-
+
好友注册成功获得奖励
@@ -231,56 +237,55 @@
diff --git a/pages_tool/member/level.vue b/pages_tool/member/level.vue
index c7e6d1d..3d48a5c 100644
--- a/pages_tool/member/level.vue
+++ b/pages_tool/member/level.vue
@@ -5,7 +5,8 @@
-
+
{{ memberInfo.nickname }}
@@ -25,56 +26,64 @@
+ ? 'item-left'
+ : i === curIndex + 1
+ ? 'item-right'
+ : 'item-center'
+ ]">
-
-
+ transform: curIndex === i ? 'scale(' + scaleX + ',' + scaleY + ')' : 'scale(1,1)',
+ transitionDuration: '.3s',
+ transitionTimingFunction: 'ease'
+ }">
+
+
-
+
{{ levelList[curIndex].level_name }}
- 当前等级
+ 当前等级
- 当前成长值
- {{ growth }}
+ 当前成长值
+
+ {{
+ growth }}
- 再获得{{ levelList[curIndex + 1].needGrowth > 0 ? levelList[curIndex + 1].needGrowth : 0 }}成长值成为{{
+ :style="{ color: levelList[curIndex]['level_text_color'] }">
+ 再获得{{ levelList[curIndex + 1].needGrowth > 0 ? levelList[curIndex +
+ 1].needGrowth : 0 }}成长值成为{{
levelList[curIndex + 1].level_name
}}
- 您现在已经是最高等级
+ 您现在已经是最高等级
-
-
+
+
再获得{{ levelList[curIndex].needGrowth }}成长值成为{{ levelList[curIndex].level_name }}
@@ -83,7 +92,8 @@
-
+
会员权益
@@ -109,7 +119,8 @@
-
+
会员礼包
@@ -125,7 +136,8 @@
赠送{{ levelList[curIndex].send_balance }}元红包
-
+
优惠券礼包
@@ -168,215 +180,212 @@
\ No newline at end of file
diff --git a/pages_tool/member/level_growth_rules.vue b/pages_tool/member/level_growth_rules.vue
index 69a684e..9511f42 100644
--- a/pages_tool/member/level_growth_rules.vue
+++ b/pages_tool/member/level_growth_rules.vue
@@ -43,232 +43,232 @@
\ No newline at end of file
diff --git a/pages_tool/member/modify_face.vue b/pages_tool/member/modify_face.vue
index 593b9e1..f04891a 100644
--- a/pages_tool/member/modify_face.vue
+++ b/pages_tool/member/modify_face.vue
@@ -2,8 +2,10 @@
-
-
+
+
@@ -28,167 +30,166 @@
\ No newline at end of file
diff --git a/pages_tool/member/pay_password.vue b/pages_tool/member/pay_password.vue
index 67e2774..2b22c36 100644
--- a/pages_tool/member/pay_password.vue
+++ b/pages_tool/member/pay_password.vue
@@ -3,8 +3,10 @@
请输入6位支付密码,建议不要使用重复或连续数字
验证码已发送至{{ memberInfo.mobile | mobile }}请在下方输入4位数字验证码
-
-
+
+
{{ dynacodeData.codeText }}
输入短信验证码
@@ -16,263 +18,263 @@
\ No newline at end of file
diff --git a/pages_tool/member/point.vue b/pages_tool/member/point.vue
index 3c4ae9d..66acffc 100644
--- a/pages_tool/member/point.vue
+++ b/pages_tool/member/point.vue
@@ -2,10 +2,9 @@
+ 'padding-top': menuButtonBounding.top + 'px',
+ 'height': menuButtonBounding.height + 'px'
+ }">
@@ -14,8 +13,9 @@
-
-
+
+
{{ pointInfo.point }}
当前积分
@@ -48,7 +48,7 @@
积分商城
-
@@ -16,126 +16,132 @@
\ No newline at end of file
diff --git a/pages_tool/notice/list.vue b/pages_tool/notice/list.vue
index 9d9c465..bacc3da 100644
--- a/pages_tool/notice/list.vue
+++ b/pages_tool/notice/list.vue
@@ -28,20 +28,15 @@
-
+
diff --git a/pages_tool/order/evaluate.vue b/pages_tool/order/evaluate.vue
index 1f01bdc..9d0717f 100644
--- a/pages_tool/order/evaluate.vue
+++ b/pages_tool/order/evaluate.vue
@@ -6,27 +6,31 @@
-
+
{{ item.sku_name }}
描述相符
-
+
-
- 好评
- 中评
- 差评
+ 好评
+ 中评
+ 差评
@@ -35,20 +39,24 @@
-
+
{{ goodsEvalList[index].content.length }}/200
-
+
{{ goodsEvalList[index].again_content.length }}/200
-
+
-
+
{{ imgList[index].length ? 6 - imgList[index].length : 0 }}/6
@@ -59,7 +67,8 @@
-
+
匿名
@@ -71,16 +80,17 @@
\ No newline at end of file
diff --git a/pages_tool/order/logistics.vue b/pages_tool/order/logistics.vue
index 90f4522..dab892d 100644
--- a/pages_tool/order/logistics.vue
+++ b/pages_tool/order/logistics.vue
@@ -1,22 +1,27 @@
-
-
+
+
{{ packageItem.package_name }}
-
+
-
+
- {{ goodsItem.sku_name }}
+ {{ goodsItem.sku_name
+ }}
@@ -31,7 +36,9 @@
-
+
+
+
承运公司: {{ packageItem.express_company_name }}
@@ -48,16 +55,14 @@
-
+
- {{ traceItem.remark }}
- {{ traceItem.datetime }}
+ {{ traceItem.remark
+ }}
+ {{
+ traceItem.datetime }}
@@ -76,6 +81,9 @@
diff --git a/pages_tool/order/refund_type_select.vue b/pages_tool/order/refund_type_select.vue
index 8ca80fd..4e6e512 100644
--- a/pages_tool/order/refund_type_select.vue
+++ b/pages_tool/order/refund_type_select.vue
@@ -25,96 +25,97 @@
-
\ No newline at end of file
diff --git a/pages_tool/pay/cashier.vue b/pages_tool/pay/cashier.vue
index 72cfdd1..abc2a58 100644
--- a/pages_tool/pay/cashier.vue
+++ b/pages_tool/pay/cashier.vue
@@ -7,15 +7,17 @@
¥
{{ payInfo.pay_money | moneyFormat }}
-
+
-
+
{{ item.name }}
-
+
@@ -31,11 +33,13 @@
-
\ No newline at end of file
diff --git a/pages_tool/pay/wx_pay.vue b/pages_tool/pay/wx_pay.vue
index f9af381..d6af337 100644
--- a/pages_tool/pay/wx_pay.vue
+++ b/pages_tool/pay/wx_pay.vue
@@ -12,15 +12,15 @@ export default {
name: 'wx_pay',
data() {
return {
- show : true,
- wx_alipay : "",
- out_trade_no : ""
+ show: true,
+ wx_alipay: "",
+ out_trade_no: ""
};
},
onLoad(options) {
this.wx_alipay = options.wx_alipay || '';
this.out_trade_no = options.out_trade_no || '';
- if(!this.$util.isWeiXin() && this.wx_alipay){
+ if (!this.$util.isWeiXin() && this.wx_alipay) {
this.show = false;
location.href = this.wx_alipay;
}
@@ -36,7 +36,7 @@ export default {
success: res => {
if (res.code >= 0 && res.data) {
this.checkPayStatus();
- }
+ }
}
});
},
@@ -64,29 +64,33 @@ export default {
diff --git a/pages_tool/recharge/order_list.vue b/pages_tool/recharge/order_list.vue
index 8b7870e..c35f44e 100644
--- a/pages_tool/recharge/order_list.vue
+++ b/pages_tool/recharge/order_list.vue
@@ -9,11 +9,14 @@
{{ orderItem.order_no }}
- {{ $util.timeStampTurnTime(orderItem.create_time) }}
+ {{ $util.timeStampTurnTime(orderItem.create_time)
+ }}
- 充值成功
+
+ 充值成功
+
¥
@@ -40,17 +43,13 @@
diff --git a/pages_tool/webview/webview.vue b/pages_tool/webview/webview.vue
index 62f7d93..bd3a940 100644
--- a/pages_tool/webview/webview.vue
+++ b/pages_tool/webview/webview.vue
@@ -11,14 +11,11 @@
diff --git a/pages_promotion/fenxiao/order_detail.vue b/pages_promotion/fenxiao/order/order_detail.vue
similarity index 100%
rename from pages_promotion/fenxiao/order_detail.vue
rename to pages_promotion/fenxiao/order/order_detail.vue
diff --git a/pages_promotion/fenxiao/child_fenxiao.vue b/pages_promotion/fenxiao/relation/child_fenxiao.vue
similarity index 100%
rename from pages_promotion/fenxiao/child_fenxiao.vue
rename to pages_promotion/fenxiao/relation/child_fenxiao.vue
diff --git a/pages_promotion/fenxiao/relation.vue b/pages_promotion/fenxiao/relation/relation.vue
similarity index 96%
rename from pages_promotion/fenxiao/relation.vue
rename to pages_promotion/fenxiao/relation/relation.vue
index f0e643b..b51e94e 100644
--- a/pages_promotion/fenxiao/relation.vue
+++ b/pages_promotion/fenxiao/relation/relation.vue
@@ -154,7 +154,7 @@ export default {
diff --git a/pages_tool/member/balance_detail.vue b/pages_tool/member/finance/balance_detail.vue
similarity index 100%
rename from pages_tool/member/balance_detail.vue
rename to pages_tool/member/finance/balance_detail.vue
diff --git a/pages_tool/member/card.vue b/pages_tool/member/finance/card.vue
similarity index 99%
rename from pages_tool/member/card.vue
rename to pages_tool/member/finance/card.vue
index 9706d63..d4ef962 100644
--- a/pages_tool/member/card.vue
+++ b/pages_tool/member/finance/card.vue
@@ -195,7 +195,7 @@ export default {
\ No newline at end of file
diff --git a/pages_tool/member/pay_password.vue b/pages_tool/member/finance/pay_password.vue
similarity index 100%
rename from pages_tool/member/pay_password.vue
rename to pages_tool/member/finance/pay_password.vue
diff --git a/pages_tool/member/point.vue b/pages_tool/member/finance/point.vue
similarity index 99%
rename from pages_tool/member/point.vue
rename to pages_tool/member/finance/point.vue
index 66acffc..2039cdf 100644
--- a/pages_tool/member/point.vue
+++ b/pages_tool/member/finance/point.vue
@@ -161,5 +161,5 @@ export default {
diff --git a/pages_tool/member/point_detail.vue b/pages_tool/member/finance/point_detail.vue
similarity index 100%
rename from pages_tool/member/point_detail.vue
rename to pages_tool/member/finance/point_detail.vue
diff --git a/pages_tool/member/withdrawal.vue b/pages_tool/member/finance/withdrawal.vue
similarity index 100%
rename from pages_tool/member/withdrawal.vue
rename to pages_tool/member/finance/withdrawal.vue
diff --git a/pages_tool/member/withdrawal_detail.vue b/pages_tool/member/finance/withdrawal_detail.vue
similarity index 100%
rename from pages_tool/member/withdrawal_detail.vue
rename to pages_tool/member/finance/withdrawal_detail.vue
diff --git a/pages_tool/member/assets.vue b/pages_tool/member/other/assets.vue
similarity index 100%
rename from pages_tool/member/assets.vue
rename to pages_tool/member/other/assets.vue
diff --git a/pages_tool/member/cancellation.vue b/pages_tool/member/other/cancellation.vue
similarity index 100%
rename from pages_tool/member/cancellation.vue
rename to pages_tool/member/other/cancellation.vue
diff --git a/pages_tool/member/cancelrefuse.vue b/pages_tool/member/other/cancelrefuse.vue
similarity index 100%
rename from pages_tool/member/cancelrefuse.vue
rename to pages_tool/member/other/cancelrefuse.vue
diff --git a/pages_tool/member/cancelstatus.vue b/pages_tool/member/other/cancelstatus.vue
similarity index 100%
rename from pages_tool/member/cancelstatus.vue
rename to pages_tool/member/other/cancelstatus.vue
diff --git a/pages_tool/member/cancelsuccess.vue b/pages_tool/member/other/cancelsuccess.vue
similarity index 100%
rename from pages_tool/member/cancelsuccess.vue
rename to pages_tool/member/other/cancelsuccess.vue
diff --git a/pages_tool/member/collection.vue b/pages_tool/member/other/collection.vue
similarity index 96%
rename from pages_tool/member/collection.vue
rename to pages_tool/member/other/collection.vue
index 5800ebb..9263921 100644
--- a/pages_tool/member/collection.vue
+++ b/pages_tool/member/other/collection.vue
@@ -40,7 +40,7 @@
\ No newline at end of file
diff --git a/pages_tool/member/level_growth_rules.vue b/pages_tool/member/rights/level_growth_rules.vue
similarity index 100%
rename from pages_tool/member/level_growth_rules.vue
rename to pages_tool/member/rights/level_growth_rules.vue
From b24f77be1a814050325bb3453049aff730cb3e48 Mon Sep 17 00:00:00 2001
From: ZF sun <34314687@qq.com>
Date: Mon, 5 Jan 2026 09:29:19 +0800
Subject: [PATCH 05/26] =?UTF-8?q?chore(=E7=BB=84=E4=BB=B6):=20components-d?=
=?UTF-8?q?iy=20=E5=BF=85=E9=A1=BB=E4=BD=BF=E7=94=A8easyncom=E7=B3=BB?=
=?UTF-8?q?=E7=BB=9F=EF=BC=8C=E4=B8=8D=E7=84=B6=E5=9C=A8=E5=BE=AE=E4=BF=A1?=
=?UTF-8?q?=E4=B8=8A=E6=97=A0=E6=B3=95=E6=B8=B2=E6=9F=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/js/diy.js | 5 +-
common/js/util.js | 17 +-
components-diy/diy-article.vue | 3 +
components-diy/diy-category-item.vue | 3 +
components-diy/diy-category.vue | 2 +-
components-diy/diy-goods-list.vue | 2 +-
components-diy/diy-graphic-nav.vue | 2 +-
components-diy/diy-group.vue | 65 +-
components-diy/diy-merch-list.vue | 2 +-
.../chat-message/chat-message.vue | 6 +-
.../img-cropping/cropping.vue | 0
.../myp-one/myp-one.vue | 0
.../ns-chat/ns-chat-goods.vue | 0
.../ns-chat/ns-chat-order.vue | 298 ++--
.../ns-chat/ns-chat-receiveGoods.vue | 0
components/ns-copyright/ns-copyright.vue | 282 ++--
.../ns-progress/ns-progress.vue | 74 +-
.../sx-rate/common.js | 12 +-
.../sx-rate/index.vue | 0
.../sx-rate/sx-rate/iconfont.css | 42 +-
.../sx-rate/sx-rate/iconfont.eot | Bin
.../sx-rate/sx-rate/iconfont.svg | 58 +-
.../sx-rate/sx-rate/iconfont.ttf | Bin
.../sx-rate/sx-rate/iconfont.woff | Bin
.../sx-rate/sx-rate/iconfont.woff2 | Bin
.../uni-calendar/calendar.js | 1246 ++++++++---------
.../uni-calendar/uni-calendar-item.vue | 0
.../uni-calendar/uni-calendar.vue | 0
.../uni-calendar/util.js | 708 +++++-----
.../uni-nav-bar/uni-nav-bar.vue | 2 +-
.../uni-status-bar/uni-status-bar.vue | 0
pages.json | 6 +-
pages/index/index.vue | 21 +-
pages_tool/article/list.vue | 2 +-
pages_tool/components/ns-adv/ns-adv.vue | 120 --
pages_tool/contact/contact.vue | 1 -
pages_tool/files/list.vue | 2 +-
pages_tool/goods/brand.vue | 2 +-
pages_tool/index/diy.vue | 4 -
pages_tool/login/find.vue | 2 +-
pages_tool/member/basic/index.vue | 3 -
pages_tool/member/basic/info.vue | 2 +-
pages_tool/member/basic/info_edit.vue | 2 +-
pages_tool/member/basic/modify_face.vue | 2 +-
pages_tool/member/finance/pay_password.vue | 2 +-
pages_tool/member/rights/level.vue | 2 +-
.../member/rights/level_growth_rules.vue | 2 +-
pages_tool/order/evaluate.vue | 2 +-
pages_tool/vr/index.vue | 3 -
49 files changed, 1462 insertions(+), 1547 deletions(-)
rename {pages_tool/components => components}/chat-message/chat-message.vue (96%)
rename {pages_tool/components => components}/img-cropping/cropping.vue (100%)
rename {pages_tool/components => components}/myp-one/myp-one.vue (100%)
rename {pages_tool/components => components}/ns-chat/ns-chat-goods.vue (100%)
rename {pages_tool/components => components}/ns-chat/ns-chat-order.vue (96%)
rename {pages_tool/components => components}/ns-chat/ns-chat-receiveGoods.vue (100%)
rename {pages_tool/components => components}/ns-progress/ns-progress.vue (94%)
rename {pages_tool/components => components}/sx-rate/common.js (97%)
rename {pages_tool/components => components}/sx-rate/index.vue (100%)
rename {pages_tool/components => components}/sx-rate/sx-rate/iconfont.css (68%)
rename {pages_tool/components => components}/sx-rate/sx-rate/iconfont.eot (100%)
rename {pages_tool/components => components}/sx-rate/sx-rate/iconfont.svg (97%)
rename {pages_tool/components => components}/sx-rate/sx-rate/iconfont.ttf (100%)
rename {pages_tool/components => components}/sx-rate/sx-rate/iconfont.woff (100%)
rename {pages_tool/components => components}/sx-rate/sx-rate/iconfont.woff2 (100%)
rename {pages_tool/components => components}/uni-calendar/calendar.js (97%)
rename {pages_tool/components => components}/uni-calendar/uni-calendar-item.vue (100%)
rename {pages_tool/components => components}/uni-calendar/uni-calendar.vue (100%)
rename {pages_tool/components => components}/uni-calendar/util.js (95%)
rename {pages_tool/components => components}/uni-nav-bar/uni-nav-bar.vue (93%)
rename {pages_tool/components => components}/uni-status-bar/uni-status-bar.vue (100%)
delete mode 100644 pages_tool/components/ns-adv/ns-adv.vue
diff --git a/common/js/diy.js b/common/js/diy.js
index 539e0fc..3adc343 100644
--- a/common/js/diy.js
+++ b/common/js/diy.js
@@ -111,9 +111,8 @@ export default {
}
},
- onShow() {
-
- this.init();
+ async onShow() {
+ await this.init();
},
onHide() {
if (this.storeTimeOut) {
diff --git a/common/js/util.js b/common/js/util.js
index 2874026..60081d3 100644
--- a/common/js/util.js
+++ b/common/js/util.js
@@ -35,7 +35,7 @@ export const adaptSubpackageUrl = (url) => {
'/pages/goods/': '/pages_goods/',
'/pages/contact/': '/pages_tool/contact/',
'/pages/member/': '/pages_tool/member/',
- '/pages/vr': '/pages_tool/vr/'
+ '/pages/vr': '/pages_tool/vr/',
};
// 构建正则表达式
@@ -58,7 +58,20 @@ export const adaptSubpackageUrl = (url) => {
});
}
- return replacePrefix(url);
+ const currentUrl = replacePrefix(url);
+
+ // 分包子包导致的路径变化,需要根据前后关系修复
+ const subPackagesMap = {
+ '/pages_tool/member/index': '/pages_tool/member/basic/index',
+ }
+
+
+ // 修复url
+ if (subPackagesMap[currentUrl]) {
+ return subPackagesMap[currentUrl];
+ }
+
+ return currentUrl;
}
/**
diff --git a/components-diy/diy-article.vue b/components-diy/diy-article.vue
index 5539a1b..3b78b39 100644
--- a/components-diy/diy-article.vue
+++ b/components-diy/diy-article.vue
@@ -47,6 +47,9 @@ export default {
type: Object
}
},
+ components: {
+ XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
+ },
mixins: [DiyMinx],
data() {
return {
diff --git a/components-diy/diy-category-item.vue b/components-diy/diy-category-item.vue
index 4e4cd06..54e5611 100644
--- a/components-diy/diy-category-item.vue
+++ b/components-diy/diy-category-item.vue
@@ -293,6 +293,9 @@ export default {
default: false
}
},
+ components: {
+ loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
+ },
mixins: [DiyMinx],
data() {
return {
diff --git a/components-diy/diy-category.vue b/components-diy/diy-category.vue
index c5d392b..24f310a 100644
--- a/components-diy/diy-category.vue
+++ b/components-diy/diy-category.vue
@@ -166,7 +166,7 @@ var contentWrapHeight, query, cartPosition;
// 商品分类
export default {
- components: {
+ components: {
nsGoodsSkuCategory: () => import('@/components/ns-goods-sku/ns-goods-sku-category.vue'),
},
name: 'diy-category',
diff --git a/components-diy/diy-goods-list.vue b/components-diy/diy-goods-list.vue
index 2cc5d56..8b2327e 100644
--- a/components-diy/diy-goods-list.vue
+++ b/components-diy/diy-goods-list.vue
@@ -258,7 +258,7 @@ import DiyMinx from './minx.js'
// 自定义商品列表展示
export default {
name: 'diy-goods-list',
- components: {
+ components: {
nsGoodsSkuIndex: () => import('@/components/ns-goods-sku/ns-goods-sku-index.vue'),
XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
},
diff --git a/components-diy/diy-graphic-nav.vue b/components-diy/diy-graphic-nav.vue
index af1e0ec..e3982aa 100644
--- a/components-diy/diy-graphic-nav.vue
+++ b/components-diy/diy-graphic-nav.vue
@@ -103,7 +103,7 @@ export default {
type: Object
}
},
- components: {
+ components: {
XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
},
diff --git a/components-diy/diy-group.vue b/components-diy/diy-group.vue
index 41541b4..27050d5 100644
--- a/components-diy/diy-group.vue
+++ b/components-diy/diy-group.vue
@@ -251,6 +251,11 @@
+
+
+
+
+
@@ -261,20 +266,24 @@
// 组件组展示
import DiyMinx from './minx.js'
export default {
- components: {},
+ name: 'DiyGroup',
+ mixins: [DiyMinx],
props: {
diyData: {
- type: Object
+ type: Object,
+ default: () => ({})
},
scrollTop: {
type: [String, Number],
default: '0'
},
haveTopCategory: {
- type: Boolean
+ type: Boolean,
+ default: false
},
followOfficialAccount: {
- type: Object
+ type: Object,
+ default: () => ({})
},
},
mixins: [DiyMinx],
@@ -284,25 +293,28 @@ export default {
};
},
created() {
- this.diyGlobalData = JSON.parse(JSON.stringify(this.diyData));
+ this.diyGlobalData = JSON.parse(JSON.stringify(this.diyData || {}));
},
computed: {
topNavColor() {
var color = '';
- if (this.diyData.global.topNavBg) {
+ if (this.diyData.global && this.diyData.global.topNavBg) {
color = 'transparent';
- if (this.scrollTop > 20) {
+ if (this.scrollTop > 20 && this.diyData.global.topNavColor) {
color = this.diyData.global.topNavColor;
} else {
color = 'transparent';
}
- } else {
+ } else if (this.diyData.global && this.diyData.global.topNavColor) {
color = this.diyData.global.topNavColor;
}
return color;
},
// 修改属性样式
setPagestyle() {
+ if (!this.diyGlobalData || !this.diyGlobalData.value || !Array.isArray(this.diyGlobalData.value)) {
+ return [];
+ }
this.diyGlobalData.value.forEach((item, index) => {
item.pageStyle = '';
// 给每个组件增加位置属性,用于定位,搜索、分类导航等定位
@@ -314,12 +326,12 @@ export default {
return false;
}
- item.pageStyle += 'background-color:' + item.pageBgColor + ';';
+ item.pageStyle += 'background-color:' + (item.pageBgColor || '') + ';';
if (item.margin) {
- item.pageStyle += 'padding-top:' + item.margin.top * 2 + 'rpx' + ';';
- item.pageStyle += 'padding-bottom:' + item.margin.bottom * 2 + 'rpx' + ';';
- item.pageStyle += 'padding-right:' + item.margin.both * 2 + 'rpx' + ';';
- item.pageStyle += 'padding-left:' + item.margin.both * 2 + 'rpx' + ';';
+ item.pageStyle += 'padding-top:' + (item.margin.top || 0) * 2 + 'rpx' + ';';
+ item.pageStyle += 'padding-bottom:' + (item.margin.bottom || 0) * 2 + 'rpx' + ';';
+ item.pageStyle += 'padding-right:' + (item.margin.both || 0) * 2 + 'rpx' + ';';
+ item.pageStyle += 'padding-left:' + (item.margin.both || 0) * 2 + 'rpx' + ';';
}
});
@@ -327,20 +339,35 @@ export default {
},
// 过滤组件的渲染
diyDataArray() {
- let data = [],
- showModuleData = this.$store.state.diyGroupShowModule ? JSON.parse(this.$store.state
- .diyGroupShowModule) : '';
+ let data = [];
+ let showModuleData = [];
+
+ // 安全获取store中的模块显示数据
+ try {
+ if (this.$store && this.$store.state && this.$store.state.diyGroupShowModule) {
+ showModuleData = JSON.parse(this.$store.state.diyGroupShowModule);
+ // 确保showModuleData是数组
+ if (!Array.isArray(showModuleData)) {
+ showModuleData = [];
+ }
+ }
+ } catch (e) {
+ showModuleData = [];
+ }
+ const diyDataArr = this.setPagestyle;
+
if (showModuleData.length) {
if (showModuleData.includes('null')) return [];
- let diyDataArr = this.setPagestyle;
diyDataArr.forEach((item, index) => {
- if (showModuleData.includes(item.componentName)) {
+ if (item && item.componentName && showModuleData.includes(item.componentName)) {
data.push(item);
}
});
- } else data = this.setPagestyle;
+ } else {
+ data = diyDataArr;
+ }
return data;
}
},
diff --git a/components-diy/diy-merch-list.vue b/components-diy/diy-merch-list.vue
index 61cf70e..5374a6c 100644
--- a/components-diy/diy-merch-list.vue
+++ b/components-diy/diy-merch-list.vue
@@ -51,7 +51,7 @@
// 文章
import DiyMinx from './minx.js'
export default {
- name: 'diy-article',
+ name: 'diy-merch-list',
props: {
value: {
type: Object
diff --git a/pages_tool/components/chat-message/chat-message.vue b/components/chat-message/chat-message.vue
similarity index 96%
rename from pages_tool/components/chat-message/chat-message.vue
rename to components/chat-message/chat-message.vue
index e4a9cf7..96bcbb5 100644
--- a/pages_tool/components/chat-message/chat-message.vue
+++ b/components/chat-message/chat-message.vue
@@ -86,9 +86,9 @@
},
components: {
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
- nsChatGoods: () => import('@/pages_tool/components/ns-chat/ns-chat-goods.vue'),
- nsChatOrder: () => import('@/pages_tool/components/ns-chat/ns-chat-order.vue'),
- nsChatReceiveGoods: () => import('@/pages_tool/components/ns-chat/ns-chat-receiveGoods.vue'),
+ nsChatGoods: () => import('@/components/ns-chat/ns-chat-goods.vue'),
+ nsChatOrder: () => import('@/components/ns-chat/ns-chat-order.vue'),
+ nsChatReceiveGoods: () => import('@/components/ns-chat/ns-chat-receiveGoods.vue')
},
data() {
return {
diff --git a/pages_tool/components/img-cropping/cropping.vue b/components/img-cropping/cropping.vue
similarity index 100%
rename from pages_tool/components/img-cropping/cropping.vue
rename to components/img-cropping/cropping.vue
diff --git a/pages_tool/components/myp-one/myp-one.vue b/components/myp-one/myp-one.vue
similarity index 100%
rename from pages_tool/components/myp-one/myp-one.vue
rename to components/myp-one/myp-one.vue
diff --git a/pages_tool/components/ns-chat/ns-chat-goods.vue b/components/ns-chat/ns-chat-goods.vue
similarity index 100%
rename from pages_tool/components/ns-chat/ns-chat-goods.vue
rename to components/ns-chat/ns-chat-goods.vue
diff --git a/pages_tool/components/ns-chat/ns-chat-order.vue b/components/ns-chat/ns-chat-order.vue
similarity index 96%
rename from pages_tool/components/ns-chat/ns-chat-order.vue
rename to components/ns-chat/ns-chat-order.vue
index 334c9fd..d78afec 100644
--- a/pages_tool/components/ns-chat/ns-chat-order.vue
+++ b/components/ns-chat/ns-chat-order.vue
@@ -1,149 +1,149 @@
-
-
-
-
-
- {{ orderdetails.order_goods ? orderdetails.order_goods[0].sku_name : '' }}
- 订单状态:{{ orderdetails.order_status_name }}
- 配送方式:{{ orderdetails.delivery_type_name }}
-
-
- ¥
- {{ orderdetails.order_goods ? orderdetails.order_goods[0].price : '' }}
-
- 发送
-
-
-
-
-
-
- {{ orderInfo.order_goods ? orderInfo.order_goods[0].sku_name : '' }}
- 订单状态:{{ orderInfo.order_status_name }}
- 配送方式:{{ orderInfo.delivery_type_name }}
-
-
- ¥
- {{ orderInfo.order_goods ? orderInfo.order_goods[0].price : '' }}
-
- 已发送
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ orderdetails.order_goods ? orderdetails.order_goods[0].sku_name : '' }}
+ 订单状态:{{ orderdetails.order_status_name }}
+ 配送方式:{{ orderdetails.delivery_type_name }}
+
+
+ ¥
+ {{ orderdetails.order_goods ? orderdetails.order_goods[0].price : '' }}
+
+ 发送
+
+
+
+
+
+
+ {{ orderInfo.order_goods ? orderInfo.order_goods[0].sku_name : '' }}
+ 订单状态:{{ orderInfo.order_status_name }}
+ 配送方式:{{ orderInfo.delivery_type_name }}
+
+
+ ¥
+ {{ orderInfo.order_goods ? orderInfo.order_goods[0].price : '' }}
+
+ 已发送
+
+
+
+
+
+
+
+
+
diff --git a/pages_tool/components/ns-chat/ns-chat-receiveGoods.vue b/components/ns-chat/ns-chat-receiveGoods.vue
similarity index 100%
rename from pages_tool/components/ns-chat/ns-chat-receiveGoods.vue
rename to components/ns-chat/ns-chat-receiveGoods.vue
diff --git a/components/ns-copyright/ns-copyright.vue b/components/ns-copyright/ns-copyright.vue
index 53444af..7985848 100644
--- a/components/ns-copyright/ns-copyright.vue
+++ b/components/ns-copyright/ns-copyright.vue
@@ -1,142 +1,142 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/components/ns-progress/ns-progress.vue b/components/ns-progress/ns-progress.vue
similarity index 94%
rename from pages_tool/components/ns-progress/ns-progress.vue
rename to components/ns-progress/ns-progress.vue
index e3afc36..ac70b54 100644
--- a/pages_tool/components/ns-progress/ns-progress.vue
+++ b/components/ns-progress/ns-progress.vue
@@ -1,37 +1,37 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/pages_tool/components/sx-rate/common.js b/components/sx-rate/common.js
similarity index 97%
rename from pages_tool/components/sx-rate/common.js
rename to components/sx-rate/common.js
index 6e559dc..3128593 100644
--- a/pages_tool/components/sx-rate/common.js
+++ b/components/sx-rate/common.js
@@ -1,6 +1,6 @@
-export function getClientRect(selector, component) {
- return new Promise((resolve, reject) => {
- let query = component ? uni.createSelectorQuery().in(component) : uni.createSelectorQuery();
- return query.select(selector).boundingClientRect(resolve).exec()
- })
-}
+export function getClientRect(selector, component) {
+ return new Promise((resolve, reject) => {
+ let query = component ? uni.createSelectorQuery().in(component) : uni.createSelectorQuery();
+ return query.select(selector).boundingClientRect(resolve).exec()
+ })
+}
diff --git a/pages_tool/components/sx-rate/index.vue b/components/sx-rate/index.vue
similarity index 100%
rename from pages_tool/components/sx-rate/index.vue
rename to components/sx-rate/index.vue
diff --git a/pages_tool/components/sx-rate/sx-rate/iconfont.css b/components/sx-rate/sx-rate/iconfont.css
similarity index 68%
rename from pages_tool/components/sx-rate/sx-rate/iconfont.css
rename to components/sx-rate/sx-rate/iconfont.css
index 48200e0..897ecc0 100644
--- a/pages_tool/components/sx-rate/sx-rate/iconfont.css
+++ b/components/sx-rate/sx-rate/iconfont.css
@@ -1,21 +1,21 @@
-@font-face {font-family: "iconfont";
- src: url('~@/pages_tool/components/sx-rate/sx-rate/iconfont.eot?t=1574760464482'); /* IE9 */
- src: url('~@/pages_tool/components/sx-rate/sx-rate/iconfont.eot?t=1574760464482#iefix') format('embedded-opentype'), /* IE6-IE8 */
- url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAK8AAsAAAAABnAAAAJwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAp8gQgBNgIkAwgLBgAEIAWEbQcuG6wFyA4lTcHACOEZBUg8fL/2O3f3fTHEkoh28SSayCSxkkgQG6Uz3UvYITu9Qr5K0Vh6Ij6f+8CXKzVBHDvWa6d0lSfK57mc3gQ6kGt8oBz3ojUG9QLqxYEU6B4YRVYqecPYBS7hMYG6QWF0dlOycoGxxFoViFuxkALGuYAksXRVKNccTOJdSTV7zbSAt/D78Y8XxmRKOavq5CZZAOK+7u2svLVode0TggR0vIQc84BEXNQmjugJxumpJ/SNAvsqD77ui8K3i71aBPvrrNIm6IfSe5K58ltNZ3BbU40Blkf9OmKsIW/Un1qddc4dcSma3ArIX7PPXdlxK5l2zJ+aD6TXnQqmu330wqpeWkYN/OnNm/0trU+YvqNR4UN99f+x/tApIFTfR7u39X4gKPnb9pOX5RAQB6DYyc/zOKCD4OUp6KiiPeqnapbAp56NdegrdhLo5wKq+3UG/0fWcyDpCsuWJVVWO5oZO29bXR0FwJ4uV2ONvTeTCVW9I1wVAylyVeNkYudR0rCOsqoN1M1JPd7QDdMTqYZZXQChwwYybT6Q63BIJvYSJX1eUNYReqi7CrsLGyZDbJqIEUWQAPLroJhWKhjHQUyj8mwkrJJROKsI+XyENeIw5LI4xXQqUiA8xxZNtZBHCAMZrJTDFPAcksmUUIWVEkQTlogQVQSbzdS9iUUr5cDUDgyhEIgAxFcHEqMpKTD+eMK09PlsiFAVGQpu6atJ5kMwDfHsEBcLpweZqlX06ruXVzSqCfEQBANiYEpyUAqYh8jIKEGq+nkSCI1gEY2IqURg28OYvlrW+nr5152AOsuUhV2fSy+EwgAAAA==') format('woff2'),
- url('~@/pages_tool/components/sx-rate/sx-rate/iconfont.woff?t=1574760464482') format('woff'),
- url('~@/pages_tool/components/sx-rate/sx-rate/iconfont.ttf?t=1574760464482') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
- url('~@/pages_tool/components/sx-rate/sx-rate/iconfont.svg?t=1574760464482#iconfont') format('svg'); /* iOS 4.1- */
-}
-
-.iconfont {
- font-family: "iconfont" !important;
- font-size: inherit;
- font-style: normal;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-.icon-star:before {
- content: "\e6e3";
-}
-
+@font-face {font-family: "iconfont";
+ src: url('~@/components/sx-rate/sx-rate/iconfont.eot?t=1574760464482'); /* IE9 */
+ src: url('~@/components/sx-rate/sx-rate/iconfont.eot?t=1574760464482#iefix') format('embedded-opentype'), /* IE6-IE8 */
+ url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAK8AAsAAAAABnAAAAJwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAp8gQgBNgIkAwgLBgAEIAWEbQcuG6wFyA4lTcHACOEZBUg8fL/2O3f3fTHEkoh28SSayCSxkkgQG6Uz3UvYITu9Qr5K0Vh6Ij6f+8CXKzVBHDvWa6d0lSfK57mc3gQ6kGt8oBz3ojUG9QLqxYEU6B4YRVYqecPYBS7hMYG6QWF0dlOycoGxxFoViFuxkALGuYAksXRVKNccTOJdSTV7zbSAt/D78Y8XxmRKOavq5CZZAOK+7u2svLVode0TggR0vIQc84BEXNQmjugJxumpJ/SNAvsqD77ui8K3i71aBPvrrNIm6IfSe5K58ltNZ3BbU40Blkf9OmKsIW/Un1qddc4dcSma3ArIX7PPXdlxK5l2zJ+aD6TXnQqmu330wqpeWkYN/OnNm/0trU+YvqNR4UN99f+x/tApIFTfR7u39X4gKPnb9pOX5RAQB6DYyc/zOKCD4OUp6KiiPeqnapbAp56NdegrdhLo5wKq+3UG/0fWcyDpCsuWJVVWO5oZO29bXR0FwJ4uV2ONvTeTCVW9I1wVAylyVeNkYudR0rCOsqoN1M1JPd7QDdMTqYZZXQChwwYybT6Q63BIJvYSJX1eUNYReqi7CrsLGyZDbJqIEUWQAPLroJhWKhjHQUyj8mwkrJJROKsI+XyENeIw5LI4xXQqUiA8xxZNtZBHCAMZrJTDFPAcksmUUIWVEkQTlogQVQSbzdS9iUUr5cDUDgyhEIgAxFcHEqMpKTD+eMK09PlsiFAVGQpu6atJ5kMwDfHsEBcLpweZqlX06ruXVzSqCfEQBANiYEpyUAqYh8jIKEGq+nkSCI1gEY2IqURg28OYvlrW+nr5152AOsuUhV2fSy+EwgAAAA==') format('woff2'),
+ url('~@/components/sx-rate/sx-rate/iconfont.woff?t=1574760464482') format('woff'),
+ url('~@/components/sx-rate/sx-rate/iconfont.ttf?t=1574760464482') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
+ url('~@/components/sx-rate/sx-rate/iconfont.svg?t=1574760464482#iconfont') format('svg'); /* iOS 4.1- */
+}
+
+.iconfont {
+ font-family: "iconfont" !important;
+ font-size: inherit;
+ font-style: normal;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-star:before {
+ content: "\e6e3";
+}
+
diff --git a/pages_tool/components/sx-rate/sx-rate/iconfont.eot b/components/sx-rate/sx-rate/iconfont.eot
similarity index 100%
rename from pages_tool/components/sx-rate/sx-rate/iconfont.eot
rename to components/sx-rate/sx-rate/iconfont.eot
diff --git a/pages_tool/components/sx-rate/sx-rate/iconfont.svg b/components/sx-rate/sx-rate/iconfont.svg
similarity index 97%
rename from pages_tool/components/sx-rate/sx-rate/iconfont.svg
rename to components/sx-rate/sx-rate/iconfont.svg
index 8e29477..3e53590 100644
--- a/pages_tool/components/sx-rate/sx-rate/iconfont.svg
+++ b/components/sx-rate/sx-rate/iconfont.svg
@@ -1,29 +1,29 @@
-
-
-
-
+
+
+
+
diff --git a/pages_tool/components/sx-rate/sx-rate/iconfont.ttf b/components/sx-rate/sx-rate/iconfont.ttf
similarity index 100%
rename from pages_tool/components/sx-rate/sx-rate/iconfont.ttf
rename to components/sx-rate/sx-rate/iconfont.ttf
diff --git a/pages_tool/components/sx-rate/sx-rate/iconfont.woff b/components/sx-rate/sx-rate/iconfont.woff
similarity index 100%
rename from pages_tool/components/sx-rate/sx-rate/iconfont.woff
rename to components/sx-rate/sx-rate/iconfont.woff
diff --git a/pages_tool/components/sx-rate/sx-rate/iconfont.woff2 b/components/sx-rate/sx-rate/iconfont.woff2
similarity index 100%
rename from pages_tool/components/sx-rate/sx-rate/iconfont.woff2
rename to components/sx-rate/sx-rate/iconfont.woff2
diff --git a/pages_tool/components/uni-calendar/calendar.js b/components/uni-calendar/calendar.js
similarity index 97%
rename from pages_tool/components/uni-calendar/calendar.js
rename to components/uni-calendar/calendar.js
index 2331f75..b42c560 100644
--- a/pages_tool/components/uni-calendar/calendar.js
+++ b/components/uni-calendar/calendar.js
@@ -1,623 +1,623 @@
-/**
- * @1900-2100区间内的公历、农历互转
- * @charset UTF-8
- * @github https://github.com/jjonline/calendar.js
- * @Author Jea杨(JJonline@JJonline.Cn)
- * @Time 2014-7-21
- * @Time 2016-8-13 Fixed 2033hex、Attribution Annals
- * @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
- * @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
- * @Version 1.0.3
- * @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
- * @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
- */
-/* eslint-disable */
-var calendar = {
-
- /**
- * 农历1900-2100的润大小信息表
- * @Array Of Property
- * @return Hex
- */
- lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0,
- 0x055d2, // 1900-1909
- 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
- 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
- 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
- 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
- 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
- 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
- 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
- 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
- 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
- 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
- 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
- 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
- 0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
- 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
- /** Add By JJonline@JJonline.Cn**/
- 0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
- 0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
- 0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
- 0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
- 0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
- 0x0d520
- ], // 2100
-
- /**
- * 公历每个月份的天数普通表
- * @Array Of Property
- * @return Number
- */
- solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
-
- /**
- * 天干地支之天干速查表
- * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
- * @return Cn string
- */
- Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
-
- /**
- * 天干地支之地支速查表
- * @Array Of Property
- * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
- * @return Cn string
- */
- Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149',
- '\u620c',
- '\u4ea5'
- ],
-
- /**
- * 天干地支之地支速查表<=>生肖
- * @Array Of Property
- * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
- * @return Cn string
- */
- Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21',
- '\u72d7', '\u732a'
- ],
-
- /**
- * 24节气速查表
- * @Array Of Property
- * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
- * @return Cn string
- */
- solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206',
- '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3',
- '\u5c0f\u6691',
- '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732',
- '\u971c\u964d',
- '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'
- ],
-
- /**
- * 1900-2100各年的24节气日期速查表
- * @Array Of Property
- * @return 0x string For splice
- */
- sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf97c3598082c95f8c965cc920f',
- '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
- 'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
- '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
- '97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
- '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
- '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
- '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
- '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
- '97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
- '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
- '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
- '9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
- '97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
- '9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
- '9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
- '977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
- '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
- '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
- '977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
- '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
- '7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
- '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
- '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
- '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
- '7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
- '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
- '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
- '665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
- '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'
- ],
-
- /**
- * 数字转中文速查表
- * @Array Of Property
- * @trans ['日','一','二','三','四','五','六','七','八','九','十']
- * @return Cn string
- */
- nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d',
- '\u5341'
- ],
-
- /**
- * 日期转农历称呼速查表
- * @Array Of Property
- * @trans ['初','十','廿','卅']
- * @return Cn string
- */
- nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
-
- /**
- * 月份转农历称呼速查表
- * @Array Of Property
- * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
- * @return Cn string
- */
- nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341',
- '\u51ac',
- '\u814a'
- ],
-
- /**
- * 返回农历y年一整年的总天数
- * @param lunar Year
- * @return Number
- * @eg:var count = calendar.lYearDays(1987) ;//count=387
- */
- lYearDays: function(y) {
- var i;
- var sum = 348
- for (i = 0x8000; i > 0x8; i >>= 1) {
- sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0
- }
- return (sum + this.leapDays(y))
- },
-
- /**
- * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
- * @param lunar Year
- * @return Number (0-12)
- * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
- */
- leapMonth: function(y) { // 闰字编码 \u95f0
- return (this.lunarInfo[y - 1900] & 0xf)
- },
-
- /**
- * 返回农历y年闰月的天数 若该年没有闰月则返回0
- * @param lunar Year
- * @return Number (0、29、30)
- * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
- */
- leapDays: function(y) {
- if (this.leapMonth(y)) {
- return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
- }
- return (0)
- },
-
- /**
- * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
- * @param lunar Year
- * @return Number (-1、29、30)
- * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
- */
- monthDays: function(y, m) {
- if (m > 12 || m < 1) {
- return -1
- } // 月份参数从1至12,参数错误返回-1
- return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
- },
-
- /**
- * 返回公历(!)y年m月的天数
- * @param solar Year
- * @return Number (-1、28、29、30、31)
- * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
- */
- solarDays: function(y, m) {
- if (m > 12 || m < 1) {
- return -1
- } // 若参数错误 返回-1
- var ms = m - 1
- if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
- return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
- } else {
- return (this.solarMonth[ms])
- }
- },
-
- /**
- * 农历年份转换为干支纪年
- * @param lYear 农历年的年份数
- * @return Cn string
- */
- toGanZhiYear: function(lYear) {
- var ganKey = (lYear - 3) % 10
- var zhiKey = (lYear - 3) % 12
- if (ganKey == 0) ganKey = 10 // 如果余数为0则为最后一个天干
- if (zhiKey == 0) zhiKey = 12 // 如果余数为0则为最后一个地支
- return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
- },
-
- /**
- * 公历月、日判断所属星座
- * @param cMonth [description]
- * @param cDay [description]
- * @return Cn string
- */
- toAstro: function(cMonth, cDay) {
- var s =
- '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf'
- var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
- return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7' // 座
- },
-
- /**
- * 传入offset偏移量返回干支
- * @param offset 相对甲子的偏移量
- * @return Cn string
- */
- toGanZhi: function(offset) {
- return this.Gan[offset % 10] + this.Zhi[offset % 12]
- },
-
- /**
- * 传入公历(!)y年获得该年第n个节气的公历日期
- * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
- * @return day Number
- * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
- */
- getTerm: function(y, n) {
- if (y < 1900 || y > 2100) {
- return -1
- }
- if (n < 1 || n > 24) {
- return -1
- }
- var _table = this.sTermInfo[y - 1900]
- var _info = [
- parseInt('0x' + _table.substr(0, 5)).toString(),
- parseInt('0x' + _table.substr(5, 5)).toString(),
- parseInt('0x' + _table.substr(10, 5)).toString(),
- parseInt('0x' + _table.substr(15, 5)).toString(),
- parseInt('0x' + _table.substr(20, 5)).toString(),
- parseInt('0x' + _table.substr(25, 5)).toString()
- ]
- var _calday = [
- _info[0].substr(0, 1),
- _info[0].substr(1, 2),
- _info[0].substr(3, 1),
- _info[0].substr(4, 2),
-
- _info[1].substr(0, 1),
- _info[1].substr(1, 2),
- _info[1].substr(3, 1),
- _info[1].substr(4, 2),
-
- _info[2].substr(0, 1),
- _info[2].substr(1, 2),
- _info[2].substr(3, 1),
- _info[2].substr(4, 2),
-
- _info[3].substr(0, 1),
- _info[3].substr(1, 2),
- _info[3].substr(3, 1),
- _info[3].substr(4, 2),
-
- _info[4].substr(0, 1),
- _info[4].substr(1, 2),
- _info[4].substr(3, 1),
- _info[4].substr(4, 2),
-
- _info[5].substr(0, 1),
- _info[5].substr(1, 2),
- _info[5].substr(3, 1),
- _info[5].substr(4, 2)
- ]
- return parseInt(_calday[n - 1])
- },
-
- /**
- * 传入农历数字月份返回汉语通俗表示法
- * @param lunar month
- * @return Cn string
- * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
- */
- toChinaMonth: function(m) { // 月 => \u6708
- if (m > 12 || m < 1) {
- return -1
- } // 若参数错误 返回-1
- var s = this.nStr3[m - 1]
- s += '\u6708' // 加上月字
- return s
- },
-
- /**
- * 传入农历日期数字返回汉字表示法
- * @param lunar day
- * @return Cn string
- * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
- */
- toChinaDay: function(d) { // 日 => \u65e5
- var s
- switch (d) {
- case 10:
- s = '\u521d\u5341';
- break
- case 20:
- s = '\u4e8c\u5341';
- break
- break
- case 30:
- s = '\u4e09\u5341';
- break
- break
- default:
- s = this.nStr2[Math.floor(d / 10)]
- s += this.nStr1[d % 10]
- }
- return (s)
- },
-
- /**
- * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
- * @param y year
- * @return Cn string
- * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
- */
- getAnimal: function(y) {
- return this.Animals[(y - 4) % 12]
- },
-
- /**
- * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
- * @param y solar year
- * @param m solar month
- * @param d solar day
- * @return JSON object
- * @eg:console.log(calendar.solar2lunar(1987,11,01));
- */
- solar2lunar: function(y, m, d) { // 参数区间1900.1.31~2100.12.31
- // 年份限定、上限
- if (y < 1900 || y > 2100) {
- return -1 // undefined转换为数字变为NaN
- }
- // 公历传参最下限
- if (y == 1900 && m == 1 && d < 31) {
- return -1
- }
- // 未传参 获得当天
- if (!y) {
- var objDate = new Date()
- } else {
- var objDate = new Date(y, parseInt(m) - 1, d)
- }
- var i;
- var leap = 0;
- var temp = 0
- // 修正ymd参数
- var y = objDate.getFullYear()
- var m = objDate.getMonth() + 1
- var d = objDate.getDate()
- var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0,
- 31)) /
- 86400000
- for (i = 1900; i < 2101 && offset > 0; i++) {
- temp = this.lYearDays(i)
- offset -= temp
- }
- if (offset < 0) {
- offset += temp;
- i--
- }
-
- // 是否今天
- var isTodayObj = new Date()
- var isToday = false
- if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
- isToday = true
- }
- // 星期几
- var nWeek = objDate.getDay()
- var cWeek = this.nStr1[nWeek]
- // 数字表示周几顺应天朝周一开始的惯例
- if (nWeek == 0) {
- nWeek = 7
- }
- // 农历年
- var year = i
- var leap = this.leapMonth(i) // 闰哪个月
- var isLeap = false
-
- // 效验闰月
- for (i = 1; i < 13 && offset > 0; i++) {
- // 闰月
- if (leap > 0 && i == (leap + 1) && isLeap == false) {
- --i
- isLeap = true;
- temp = this.leapDays(year) // 计算农历闰月天数
- } else {
- temp = this.monthDays(year, i) // 计算农历普通月天数
- }
- // 解除闰月
- if (isLeap == true && i == (leap + 1)) {
- isLeap = false
- }
- offset -= temp
- }
- // 闰月导致数组下标重叠取反
- if (offset == 0 && leap > 0 && i == leap + 1) {
- if (isLeap) {
- isLeap = false
- } else {
- isLeap = true;
- --i
- }
- }
- if (offset < 0) {
- offset += temp;
- --i
- }
- // 农历月
- var month = i
- // 农历日
- var day = offset + 1
- // 天干地支处理
- var sm = m - 1
- var gzY = this.toGanZhiYear(year)
-
- // 当月的两个节气
- // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
- var firstNode = this.getTerm(y, (m * 2 - 1)) // 返回当月「节」为几日开始
- var secondNode = this.getTerm(y, (m * 2)) // 返回当月「节」为几日开始
-
- // 依据12节气修正干支月
- var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
- if (d >= firstNode) {
- gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
- }
-
- // 传入的日期的节气与否
- var isTerm = false
- var Term = null
- if (firstNode == d) {
- isTerm = true
- Term = this.solarTerm[m * 2 - 2]
- }
- if (secondNode == d) {
- isTerm = true
- Term = this.solarTerm[m * 2 - 1]
- }
- // 日柱 当月一日与 1900/1/1 相差天数
- var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
- var gzD = this.toGanZhi(dayCyclical + d - 1)
- // 该日期所属的星座
- var astro = this.toAstro(m, d)
-
- return {
- 'lYear': year,
- 'lMonth': month,
- 'lDay': day,
- 'Animal': this.getAnimal(year),
- 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month),
- 'IDayCn': this.toChinaDay(day),
- 'cYear': y,
- 'cMonth': m,
- 'cDay': d,
- 'gzYear': gzY,
- 'gzMonth': gzM,
- 'gzDay': gzD,
- 'isToday': isToday,
- 'isLeap': isLeap,
- 'nWeek': nWeek,
- 'ncWeek': '\u661f\u671f' + cWeek,
- 'isTerm': isTerm,
- 'Term': Term,
- 'astro': astro
- }
- },
-
- /**
- * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
- * @param y lunar year
- * @param m lunar month
- * @param d lunar day
- * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
- * @return JSON object
- * @eg:console.log(calendar.lunar2solar(1987,9,10));
- */
- lunar2solar: function(y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
- var isLeapMonth = !!isLeapMonth
- var leapOffset = 0
- var leapMonth = this.leapMonth(y)
- var leapDay = this.leapDays(y)
- if (isLeapMonth && (leapMonth != m)) {
- return -1
- } // 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
- if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) {
- return -1
- } // 超出了最大极限值
- var day = this.monthDays(y, m)
- var _day = day
- // bugFix 2016-9-25
- // if month is leap, _day use leapDays method
- if (isLeapMonth) {
- _day = this.leapDays(y, m)
- }
- if (y < 1900 || y > 2100 || d > _day) {
- return -1
- } // 参数合法性效验
-
- // 计算农历的时间差
- var offset = 0
- for (var i = 1900; i < y; i++) {
- offset += this.lYearDays(i)
- }
- var leap = 0;
- var isAdd = false
- for (var i = 1; i < m; i++) {
- leap = this.leapMonth(y)
- if (!isAdd) { // 处理闰月
- if (leap <= i && leap > 0) {
- offset += this.leapDays(y);
- isAdd = true
- }
- }
- offset += this.monthDays(y, i)
- }
- // 转换闰月农历 需补充该年闰月的前一个月的时差
- if (isLeapMonth) {
- offset += day
- }
- // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
- var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
- var calObj = new Date((offset + d - 31) * 86400000 + stmap)
- var cY = calObj.getUTCFullYear()
- var cM = calObj.getUTCMonth() + 1
- var cD = calObj.getUTCDate()
-
- return this.solar2lunar(cY, cM, cD)
- }
-}
-
-export default calendar
+/**
+ * @1900-2100区间内的公历、农历互转
+ * @charset UTF-8
+ * @github https://github.com/jjonline/calendar.js
+ * @Author Jea杨(JJonline@JJonline.Cn)
+ * @Time 2014-7-21
+ * @Time 2016-8-13 Fixed 2033hex、Attribution Annals
+ * @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
+ * @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
+ * @Version 1.0.3
+ * @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
+ * @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
+ */
+/* eslint-disable */
+var calendar = {
+
+ /**
+ * 农历1900-2100的润大小信息表
+ * @Array Of Property
+ * @return Hex
+ */
+ lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0,
+ 0x055d2, // 1900-1909
+ 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
+ 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
+ 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
+ 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
+ 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
+ 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
+ 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
+ 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
+ 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
+ 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
+ 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
+ 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
+ 0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
+ 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
+ /** Add By JJonline@JJonline.Cn**/
+ 0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
+ 0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
+ 0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
+ 0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
+ 0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
+ 0x0d520
+ ], // 2100
+
+ /**
+ * 公历每个月份的天数普通表
+ * @Array Of Property
+ * @return Number
+ */
+ solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
+
+ /**
+ * 天干地支之天干速查表
+ * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
+ * @return Cn string
+ */
+ Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
+
+ /**
+ * 天干地支之地支速查表
+ * @Array Of Property
+ * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
+ * @return Cn string
+ */
+ Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149',
+ '\u620c',
+ '\u4ea5'
+ ],
+
+ /**
+ * 天干地支之地支速查表<=>生肖
+ * @Array Of Property
+ * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
+ * @return Cn string
+ */
+ Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21',
+ '\u72d7', '\u732a'
+ ],
+
+ /**
+ * 24节气速查表
+ * @Array Of Property
+ * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
+ * @return Cn string
+ */
+ solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206',
+ '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3',
+ '\u5c0f\u6691',
+ '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732',
+ '\u971c\u964d',
+ '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'
+ ],
+
+ /**
+ * 1900-2100各年的24节气日期速查表
+ * @Array Of Property
+ * @return 0x string For splice
+ */
+ sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf97c3598082c95f8c965cc920f',
+ '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
+ 'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
+ '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
+ '97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
+ '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
+ '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
+ '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
+ '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
+ '97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
+ '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
+ '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+ '9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
+ '97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
+ '9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+ '9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
+ '977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+ '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+ '977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
+ '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
+ '7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
+ '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+ '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
+ '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
+ '7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+ '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
+ '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
+ '665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
+ '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'
+ ],
+
+ /**
+ * 数字转中文速查表
+ * @Array Of Property
+ * @trans ['日','一','二','三','四','五','六','七','八','九','十']
+ * @return Cn string
+ */
+ nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d',
+ '\u5341'
+ ],
+
+ /**
+ * 日期转农历称呼速查表
+ * @Array Of Property
+ * @trans ['初','十','廿','卅']
+ * @return Cn string
+ */
+ nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
+
+ /**
+ * 月份转农历称呼速查表
+ * @Array Of Property
+ * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
+ * @return Cn string
+ */
+ nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341',
+ '\u51ac',
+ '\u814a'
+ ],
+
+ /**
+ * 返回农历y年一整年的总天数
+ * @param lunar Year
+ * @return Number
+ * @eg:var count = calendar.lYearDays(1987) ;//count=387
+ */
+ lYearDays: function(y) {
+ var i;
+ var sum = 348
+ for (i = 0x8000; i > 0x8; i >>= 1) {
+ sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0
+ }
+ return (sum + this.leapDays(y))
+ },
+
+ /**
+ * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
+ * @param lunar Year
+ * @return Number (0-12)
+ * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
+ */
+ leapMonth: function(y) { // 闰字编码 \u95f0
+ return (this.lunarInfo[y - 1900] & 0xf)
+ },
+
+ /**
+ * 返回农历y年闰月的天数 若该年没有闰月则返回0
+ * @param lunar Year
+ * @return Number (0、29、30)
+ * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
+ */
+ leapDays: function(y) {
+ if (this.leapMonth(y)) {
+ return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
+ }
+ return (0)
+ },
+
+ /**
+ * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
+ * @param lunar Year
+ * @return Number (-1、29、30)
+ * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
+ */
+ monthDays: function(y, m) {
+ if (m > 12 || m < 1) {
+ return -1
+ } // 月份参数从1至12,参数错误返回-1
+ return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
+ },
+
+ /**
+ * 返回公历(!)y年m月的天数
+ * @param solar Year
+ * @return Number (-1、28、29、30、31)
+ * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
+ */
+ solarDays: function(y, m) {
+ if (m > 12 || m < 1) {
+ return -1
+ } // 若参数错误 返回-1
+ var ms = m - 1
+ if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
+ return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
+ } else {
+ return (this.solarMonth[ms])
+ }
+ },
+
+ /**
+ * 农历年份转换为干支纪年
+ * @param lYear 农历年的年份数
+ * @return Cn string
+ */
+ toGanZhiYear: function(lYear) {
+ var ganKey = (lYear - 3) % 10
+ var zhiKey = (lYear - 3) % 12
+ if (ganKey == 0) ganKey = 10 // 如果余数为0则为最后一个天干
+ if (zhiKey == 0) zhiKey = 12 // 如果余数为0则为最后一个地支
+ return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
+ },
+
+ /**
+ * 公历月、日判断所属星座
+ * @param cMonth [description]
+ * @param cDay [description]
+ * @return Cn string
+ */
+ toAstro: function(cMonth, cDay) {
+ var s =
+ '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf'
+ var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
+ return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7' // 座
+ },
+
+ /**
+ * 传入offset偏移量返回干支
+ * @param offset 相对甲子的偏移量
+ * @return Cn string
+ */
+ toGanZhi: function(offset) {
+ return this.Gan[offset % 10] + this.Zhi[offset % 12]
+ },
+
+ /**
+ * 传入公历(!)y年获得该年第n个节气的公历日期
+ * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
+ * @return day Number
+ * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
+ */
+ getTerm: function(y, n) {
+ if (y < 1900 || y > 2100) {
+ return -1
+ }
+ if (n < 1 || n > 24) {
+ return -1
+ }
+ var _table = this.sTermInfo[y - 1900]
+ var _info = [
+ parseInt('0x' + _table.substr(0, 5)).toString(),
+ parseInt('0x' + _table.substr(5, 5)).toString(),
+ parseInt('0x' + _table.substr(10, 5)).toString(),
+ parseInt('0x' + _table.substr(15, 5)).toString(),
+ parseInt('0x' + _table.substr(20, 5)).toString(),
+ parseInt('0x' + _table.substr(25, 5)).toString()
+ ]
+ var _calday = [
+ _info[0].substr(0, 1),
+ _info[0].substr(1, 2),
+ _info[0].substr(3, 1),
+ _info[0].substr(4, 2),
+
+ _info[1].substr(0, 1),
+ _info[1].substr(1, 2),
+ _info[1].substr(3, 1),
+ _info[1].substr(4, 2),
+
+ _info[2].substr(0, 1),
+ _info[2].substr(1, 2),
+ _info[2].substr(3, 1),
+ _info[2].substr(4, 2),
+
+ _info[3].substr(0, 1),
+ _info[3].substr(1, 2),
+ _info[3].substr(3, 1),
+ _info[3].substr(4, 2),
+
+ _info[4].substr(0, 1),
+ _info[4].substr(1, 2),
+ _info[4].substr(3, 1),
+ _info[4].substr(4, 2),
+
+ _info[5].substr(0, 1),
+ _info[5].substr(1, 2),
+ _info[5].substr(3, 1),
+ _info[5].substr(4, 2)
+ ]
+ return parseInt(_calday[n - 1])
+ },
+
+ /**
+ * 传入农历数字月份返回汉语通俗表示法
+ * @param lunar month
+ * @return Cn string
+ * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
+ */
+ toChinaMonth: function(m) { // 月 => \u6708
+ if (m > 12 || m < 1) {
+ return -1
+ } // 若参数错误 返回-1
+ var s = this.nStr3[m - 1]
+ s += '\u6708' // 加上月字
+ return s
+ },
+
+ /**
+ * 传入农历日期数字返回汉字表示法
+ * @param lunar day
+ * @return Cn string
+ * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
+ */
+ toChinaDay: function(d) { // 日 => \u65e5
+ var s
+ switch (d) {
+ case 10:
+ s = '\u521d\u5341';
+ break
+ case 20:
+ s = '\u4e8c\u5341';
+ break
+ break
+ case 30:
+ s = '\u4e09\u5341';
+ break
+ break
+ default:
+ s = this.nStr2[Math.floor(d / 10)]
+ s += this.nStr1[d % 10]
+ }
+ return (s)
+ },
+
+ /**
+ * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
+ * @param y year
+ * @return Cn string
+ * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
+ */
+ getAnimal: function(y) {
+ return this.Animals[(y - 4) % 12]
+ },
+
+ /**
+ * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
+ * @param y solar year
+ * @param m solar month
+ * @param d solar day
+ * @return JSON object
+ * @eg:console.log(calendar.solar2lunar(1987,11,01));
+ */
+ solar2lunar: function(y, m, d) { // 参数区间1900.1.31~2100.12.31
+ // 年份限定、上限
+ if (y < 1900 || y > 2100) {
+ return -1 // undefined转换为数字变为NaN
+ }
+ // 公历传参最下限
+ if (y == 1900 && m == 1 && d < 31) {
+ return -1
+ }
+ // 未传参 获得当天
+ if (!y) {
+ var objDate = new Date()
+ } else {
+ var objDate = new Date(y, parseInt(m) - 1, d)
+ }
+ var i;
+ var leap = 0;
+ var temp = 0
+ // 修正ymd参数
+ var y = objDate.getFullYear()
+ var m = objDate.getMonth() + 1
+ var d = objDate.getDate()
+ var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0,
+ 31)) /
+ 86400000
+ for (i = 1900; i < 2101 && offset > 0; i++) {
+ temp = this.lYearDays(i)
+ offset -= temp
+ }
+ if (offset < 0) {
+ offset += temp;
+ i--
+ }
+
+ // 是否今天
+ var isTodayObj = new Date()
+ var isToday = false
+ if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
+ isToday = true
+ }
+ // 星期几
+ var nWeek = objDate.getDay()
+ var cWeek = this.nStr1[nWeek]
+ // 数字表示周几顺应天朝周一开始的惯例
+ if (nWeek == 0) {
+ nWeek = 7
+ }
+ // 农历年
+ var year = i
+ var leap = this.leapMonth(i) // 闰哪个月
+ var isLeap = false
+
+ // 效验闰月
+ for (i = 1; i < 13 && offset > 0; i++) {
+ // 闰月
+ if (leap > 0 && i == (leap + 1) && isLeap == false) {
+ --i
+ isLeap = true;
+ temp = this.leapDays(year) // 计算农历闰月天数
+ } else {
+ temp = this.monthDays(year, i) // 计算农历普通月天数
+ }
+ // 解除闰月
+ if (isLeap == true && i == (leap + 1)) {
+ isLeap = false
+ }
+ offset -= temp
+ }
+ // 闰月导致数组下标重叠取反
+ if (offset == 0 && leap > 0 && i == leap + 1) {
+ if (isLeap) {
+ isLeap = false
+ } else {
+ isLeap = true;
+ --i
+ }
+ }
+ if (offset < 0) {
+ offset += temp;
+ --i
+ }
+ // 农历月
+ var month = i
+ // 农历日
+ var day = offset + 1
+ // 天干地支处理
+ var sm = m - 1
+ var gzY = this.toGanZhiYear(year)
+
+ // 当月的两个节气
+ // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
+ var firstNode = this.getTerm(y, (m * 2 - 1)) // 返回当月「节」为几日开始
+ var secondNode = this.getTerm(y, (m * 2)) // 返回当月「节」为几日开始
+
+ // 依据12节气修正干支月
+ var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
+ if (d >= firstNode) {
+ gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
+ }
+
+ // 传入的日期的节气与否
+ var isTerm = false
+ var Term = null
+ if (firstNode == d) {
+ isTerm = true
+ Term = this.solarTerm[m * 2 - 2]
+ }
+ if (secondNode == d) {
+ isTerm = true
+ Term = this.solarTerm[m * 2 - 1]
+ }
+ // 日柱 当月一日与 1900/1/1 相差天数
+ var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
+ var gzD = this.toGanZhi(dayCyclical + d - 1)
+ // 该日期所属的星座
+ var astro = this.toAstro(m, d)
+
+ return {
+ 'lYear': year,
+ 'lMonth': month,
+ 'lDay': day,
+ 'Animal': this.getAnimal(year),
+ 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month),
+ 'IDayCn': this.toChinaDay(day),
+ 'cYear': y,
+ 'cMonth': m,
+ 'cDay': d,
+ 'gzYear': gzY,
+ 'gzMonth': gzM,
+ 'gzDay': gzD,
+ 'isToday': isToday,
+ 'isLeap': isLeap,
+ 'nWeek': nWeek,
+ 'ncWeek': '\u661f\u671f' + cWeek,
+ 'isTerm': isTerm,
+ 'Term': Term,
+ 'astro': astro
+ }
+ },
+
+ /**
+ * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
+ * @param y lunar year
+ * @param m lunar month
+ * @param d lunar day
+ * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
+ * @return JSON object
+ * @eg:console.log(calendar.lunar2solar(1987,9,10));
+ */
+ lunar2solar: function(y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
+ var isLeapMonth = !!isLeapMonth
+ var leapOffset = 0
+ var leapMonth = this.leapMonth(y)
+ var leapDay = this.leapDays(y)
+ if (isLeapMonth && (leapMonth != m)) {
+ return -1
+ } // 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
+ if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) {
+ return -1
+ } // 超出了最大极限值
+ var day = this.monthDays(y, m)
+ var _day = day
+ // bugFix 2016-9-25
+ // if month is leap, _day use leapDays method
+ if (isLeapMonth) {
+ _day = this.leapDays(y, m)
+ }
+ if (y < 1900 || y > 2100 || d > _day) {
+ return -1
+ } // 参数合法性效验
+
+ // 计算农历的时间差
+ var offset = 0
+ for (var i = 1900; i < y; i++) {
+ offset += this.lYearDays(i)
+ }
+ var leap = 0;
+ var isAdd = false
+ for (var i = 1; i < m; i++) {
+ leap = this.leapMonth(y)
+ if (!isAdd) { // 处理闰月
+ if (leap <= i && leap > 0) {
+ offset += this.leapDays(y);
+ isAdd = true
+ }
+ }
+ offset += this.monthDays(y, i)
+ }
+ // 转换闰月农历 需补充该年闰月的前一个月的时差
+ if (isLeapMonth) {
+ offset += day
+ }
+ // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
+ var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
+ var calObj = new Date((offset + d - 31) * 86400000 + stmap)
+ var cY = calObj.getUTCFullYear()
+ var cM = calObj.getUTCMonth() + 1
+ var cD = calObj.getUTCDate()
+
+ return this.solar2lunar(cY, cM, cD)
+ }
+}
+
+export default calendar
diff --git a/pages_tool/components/uni-calendar/uni-calendar-item.vue b/components/uni-calendar/uni-calendar-item.vue
similarity index 100%
rename from pages_tool/components/uni-calendar/uni-calendar-item.vue
rename to components/uni-calendar/uni-calendar-item.vue
diff --git a/pages_tool/components/uni-calendar/uni-calendar.vue b/components/uni-calendar/uni-calendar.vue
similarity index 100%
rename from pages_tool/components/uni-calendar/uni-calendar.vue
rename to components/uni-calendar/uni-calendar.vue
diff --git a/pages_tool/components/uni-calendar/util.js b/components/uni-calendar/util.js
similarity index 95%
rename from pages_tool/components/uni-calendar/util.js
rename to components/uni-calendar/util.js
index 4b423f2..8ddfe6d 100644
--- a/pages_tool/components/uni-calendar/util.js
+++ b/components/uni-calendar/util.js
@@ -1,354 +1,354 @@
-import CALENDAR from './calendar.js'
-
-class Calendar {
- constructor({
- date,
- selected,
- startDate,
- endDate,
- range
- } = {}) {
- // 当前日期
- this.date = this.getDate(new Date()) // 当前初入日期
- // 打点信息
- this.selected = selected || [];
- // 范围开始
- this.startDate = startDate
- // 范围结束
- this.endDate = endDate
- this.range = range
- // 多选状态
- this.cleanMultipleStatus()
- // 每周日期
- this.weeks = {}
- // this._getWeek(this.date.fullDate)
- }
- /**
- * 设置日期
- * @param {Object} date
- */
- setDate(date) {
- this.selectDate = this.getDate(date)
- this._getWeek(this.selectDate.fullDate)
- }
-
- /**
- * 清理多选状态
- */
- cleanMultipleStatus() {
- this.multipleStatus = {
- before: '',
- after: '',
- data: []
- }
- }
-
- /**
- * 重置开始日期
- */
- resetSatrtDate(startDate) {
- // 范围开始
- this.startDate = startDate
-
- }
-
- /**
- * 重置结束日期
- */
- resetEndDate(endDate) {
- // 范围结束
- this.endDate = endDate
- }
-
- /**
- * 获取任意时间
- */
- getDate(date, AddDayCount = 0, str = 'day') {
- if (!date) {
- date = new Date()
- }
- if (typeof date !== 'object') {
- date = date.replace(/-/g, '/')
- }
- const dd = new Date(date)
- switch (str) {
- case 'day':
- dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
- break
- case 'month':
- if (dd.getDate() === 31) {
- dd.setDate(dd.getDate() + AddDayCount)
- } else {
- dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期
- }
- break
- case 'year':
- dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期
- break
- }
- const y = dd.getFullYear()
- const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
- const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
- return {
- fullDate: y + '-' + m + '-' + d,
- year: y,
- month: m,
- date: d,
- day: dd.getDay()
- }
- }
-
-
- /**
- * 获取上月剩余天数
- */
- _getLastMonthDays(firstDay, full) {
- let dateArr = []
- for (let i = firstDay; i > 0; i--) {
- const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate()
- dateArr.push({
- date: beforeDate,
- month: full.month - 1,
- lunar: this.getlunar(full.year, full.month - 1, beforeDate),
- disable: true
- })
- }
- return dateArr
- }
- /**
- * 获取本月天数
- */
- _currentMonthDys(dateData, full) {
- let dateArr = []
- let fullDate = this.date.fullDate
- for (let i = 1; i <= dateData; i++) {
- let isinfo = false
- let nowDate = full.year + '-' + (full.month < 10 ?
- full.month : full.month) + '-' + (i < 10 ?
- '0' + i : i)
- // 是否今天
- let isDay = fullDate === nowDate
- // 获取打点信息
- let info = this.selected && this.selected.find((item) => {
- if (this.dateEqual(nowDate, item.date)) {
- return item
- }
- })
-
- // 日期禁用
- let disableBefore = true
- let disableAfter = true
- if (this.startDate) {
- let dateCompBefore = this.dateCompare(this.startDate, fullDate)
- disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)
- }
-
- if (this.endDate) {
- let dateCompAfter = this.dateCompare(fullDate, this.endDate)
- disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)
- }
- let multiples = this.multipleStatus.data
- let checked = false
- let multiplesStatus = -1
- if (this.range) {
- if (multiples) {
- multiplesStatus = multiples.findIndex((item) => {
- return this.dateEqual(item, nowDate)
- })
- }
- if (multiplesStatus !== -1) {
- checked = true
- }
- }
- let data = {
- fullDate: nowDate,
- year: full.year,
- date: i,
- multiple: this.range ? checked : false,
- beforeMultiple: this.dateEqual(this.multipleStatus.before, nowDate),
- afterMultiple: this.dateEqual(this.multipleStatus.after, nowDate),
- month: full.month,
- lunar: this.getlunar(full.year, full.month, i),
- disable: !disableBefore || !disableAfter,
- isDay
- }
- if (info) {
- data.extraInfo = info
- }
-
- dateArr.push(data)
- }
- return dateArr
- }
- /**
- * 获取下月天数
- */
- _getNextMonthDays(surplus, full) {
- let dateArr = []
- for (let i = 1; i < surplus + 1; i++) {
- dateArr.push({
- date: i,
- month: Number(full.month) + 1,
- lunar: this.getlunar(full.year, Number(full.month) + 1, i),
- disable: true
- })
- }
- return dateArr
- }
-
- /**
- * 获取当前日期详情
- * @param {Object} date
- */
- getInfo(date) {
- if (!date) {
- date = new Date()
- }
- const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate)
- return dateInfo
- }
-
- /**
- * 比较时间大小
- */
- dateCompare(startDate, endDate) {
- // 计算截止时间
- startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
- // 计算详细项的截止时间
- endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
- if (startDate <= endDate) {
- return true
- } else {
- return false
- }
- }
-
- /**
- * 比较时间是否相等
- */
- dateEqual(before, after) {
- // 计算截止时间
- before = new Date(before.replace('-', '/').replace('-', '/'))
- // 计算详细项的截止时间
- after = new Date(after.replace('-', '/').replace('-', '/'))
- if (before.getTime() - after.getTime() === 0) {
- return true
- } else {
- return false
- }
- }
-
-
- /**
- * 获取日期范围内所有日期
- * @param {Object} begin
- * @param {Object} end
- */
- geDateAll(begin, end) {
- var arr = []
- var ab = begin.split('-')
- var ae = end.split('-')
- var db = new Date()
- db.setFullYear(ab[0], ab[1] - 1, ab[2])
- var de = new Date()
- de.setFullYear(ae[0], ae[1] - 1, ae[2])
- var unixDb = db.getTime() - 24 * 60 * 60 * 1000
- var unixDe = de.getTime() - 24 * 60 * 60 * 1000
- for (var k = unixDb; k <= unixDe;) {
- k = k + 24 * 60 * 60 * 1000
- arr.push(this.getDate(new Date(parseInt(k))).fullDate)
- }
- return arr
- }
- /**
- * 计算阴历日期显示
- */
- getlunar(year, month, date) {
- return CALENDAR.solar2lunar(year, month, date)
- }
- /**
- * 设置打点
- */
- setSelectInfo(data, value) {
- this.selected = value
- this._getWeek(data)
- }
-
- /**
- * 获取多选状态
- */
- setMultiple(fullDate) {
- let {
- before,
- after
- } = this.multipleStatus
-
- if (!this.range) return
- if (before && after) {
- this.multipleStatus.before = ''
- this.multipleStatus.after = ''
- this.multipleStatus.data = []
- } else {
- if (!before) {
- this.multipleStatus.before = fullDate
- } else {
- this.multipleStatus.after = fullDate
- if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus
- .after);
- } else {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus
- .before);
- }
- }
- }
- this._getWeek(fullDate)
- }
-
- /**
- * 获取每周数据
- * @param {Object} dateData
- */
- _getWeek(dateData) {
- const {
- fullDate,
- year,
- month,
- date,
- day
- } = this.getDate(dateData)
- let firstDay = new Date(year, month - 1, 1).getDay()
- let currentDay = new Date(year, month, 0).getDate()
- let dates = {
- lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天
- currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数
- nextMonthDays: [], // 下个月开始几天
- weeks: []
- }
- let canlender = []
- const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length)
- dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData))
- canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays)
- let weeks = {}
- // 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天
- for (let i = 0; i < canlender.length; i++) {
- if (i % 7 === 0) {
- weeks[parseInt(i / 7)] = new Array(7)
- }
- weeks[parseInt(i / 7)][i % 7] = canlender[i]
- }
- this.canlender = canlender
- this.weeks = weeks
- }
-
- //静态方法
- // static init(date) {
- // if (!this.instance) {
- // this.instance = new Calendar(date);
- // }
- // return this.instance;
- // }
-}
-
-
-export default Calendar
+import CALENDAR from './calendar.js'
+
+class Calendar {
+ constructor({
+ date,
+ selected,
+ startDate,
+ endDate,
+ range
+ } = {}) {
+ // 当前日期
+ this.date = this.getDate(new Date()) // 当前初入日期
+ // 打点信息
+ this.selected = selected || [];
+ // 范围开始
+ this.startDate = startDate
+ // 范围结束
+ this.endDate = endDate
+ this.range = range
+ // 多选状态
+ this.cleanMultipleStatus()
+ // 每周日期
+ this.weeks = {}
+ // this._getWeek(this.date.fullDate)
+ }
+ /**
+ * 设置日期
+ * @param {Object} date
+ */
+ setDate(date) {
+ this.selectDate = this.getDate(date)
+ this._getWeek(this.selectDate.fullDate)
+ }
+
+ /**
+ * 清理多选状态
+ */
+ cleanMultipleStatus() {
+ this.multipleStatus = {
+ before: '',
+ after: '',
+ data: []
+ }
+ }
+
+ /**
+ * 重置开始日期
+ */
+ resetSatrtDate(startDate) {
+ // 范围开始
+ this.startDate = startDate
+
+ }
+
+ /**
+ * 重置结束日期
+ */
+ resetEndDate(endDate) {
+ // 范围结束
+ this.endDate = endDate
+ }
+
+ /**
+ * 获取任意时间
+ */
+ getDate(date, AddDayCount = 0, str = 'day') {
+ if (!date) {
+ date = new Date()
+ }
+ if (typeof date !== 'object') {
+ date = date.replace(/-/g, '/')
+ }
+ const dd = new Date(date)
+ switch (str) {
+ case 'day':
+ dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
+ break
+ case 'month':
+ if (dd.getDate() === 31) {
+ dd.setDate(dd.getDate() + AddDayCount)
+ } else {
+ dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期
+ }
+ break
+ case 'year':
+ dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期
+ break
+ }
+ const y = dd.getFullYear()
+ const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
+ const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
+ return {
+ fullDate: y + '-' + m + '-' + d,
+ year: y,
+ month: m,
+ date: d,
+ day: dd.getDay()
+ }
+ }
+
+
+ /**
+ * 获取上月剩余天数
+ */
+ _getLastMonthDays(firstDay, full) {
+ let dateArr = []
+ for (let i = firstDay; i > 0; i--) {
+ const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate()
+ dateArr.push({
+ date: beforeDate,
+ month: full.month - 1,
+ lunar: this.getlunar(full.year, full.month - 1, beforeDate),
+ disable: true
+ })
+ }
+ return dateArr
+ }
+ /**
+ * 获取本月天数
+ */
+ _currentMonthDys(dateData, full) {
+ let dateArr = []
+ let fullDate = this.date.fullDate
+ for (let i = 1; i <= dateData; i++) {
+ let isinfo = false
+ let nowDate = full.year + '-' + (full.month < 10 ?
+ full.month : full.month) + '-' + (i < 10 ?
+ '0' + i : i)
+ // 是否今天
+ let isDay = fullDate === nowDate
+ // 获取打点信息
+ let info = this.selected && this.selected.find((item) => {
+ if (this.dateEqual(nowDate, item.date)) {
+ return item
+ }
+ })
+
+ // 日期禁用
+ let disableBefore = true
+ let disableAfter = true
+ if (this.startDate) {
+ let dateCompBefore = this.dateCompare(this.startDate, fullDate)
+ disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)
+ }
+
+ if (this.endDate) {
+ let dateCompAfter = this.dateCompare(fullDate, this.endDate)
+ disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)
+ }
+ let multiples = this.multipleStatus.data
+ let checked = false
+ let multiplesStatus = -1
+ if (this.range) {
+ if (multiples) {
+ multiplesStatus = multiples.findIndex((item) => {
+ return this.dateEqual(item, nowDate)
+ })
+ }
+ if (multiplesStatus !== -1) {
+ checked = true
+ }
+ }
+ let data = {
+ fullDate: nowDate,
+ year: full.year,
+ date: i,
+ multiple: this.range ? checked : false,
+ beforeMultiple: this.dateEqual(this.multipleStatus.before, nowDate),
+ afterMultiple: this.dateEqual(this.multipleStatus.after, nowDate),
+ month: full.month,
+ lunar: this.getlunar(full.year, full.month, i),
+ disable: !disableBefore || !disableAfter,
+ isDay
+ }
+ if (info) {
+ data.extraInfo = info
+ }
+
+ dateArr.push(data)
+ }
+ return dateArr
+ }
+ /**
+ * 获取下月天数
+ */
+ _getNextMonthDays(surplus, full) {
+ let dateArr = []
+ for (let i = 1; i < surplus + 1; i++) {
+ dateArr.push({
+ date: i,
+ month: Number(full.month) + 1,
+ lunar: this.getlunar(full.year, Number(full.month) + 1, i),
+ disable: true
+ })
+ }
+ return dateArr
+ }
+
+ /**
+ * 获取当前日期详情
+ * @param {Object} date
+ */
+ getInfo(date) {
+ if (!date) {
+ date = new Date()
+ }
+ const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate)
+ return dateInfo
+ }
+
+ /**
+ * 比较时间大小
+ */
+ dateCompare(startDate, endDate) {
+ // 计算截止时间
+ startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
+ // 计算详细项的截止时间
+ endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
+ if (startDate <= endDate) {
+ return true
+ } else {
+ return false
+ }
+ }
+
+ /**
+ * 比较时间是否相等
+ */
+ dateEqual(before, after) {
+ // 计算截止时间
+ before = new Date(before.replace('-', '/').replace('-', '/'))
+ // 计算详细项的截止时间
+ after = new Date(after.replace('-', '/').replace('-', '/'))
+ if (before.getTime() - after.getTime() === 0) {
+ return true
+ } else {
+ return false
+ }
+ }
+
+
+ /**
+ * 获取日期范围内所有日期
+ * @param {Object} begin
+ * @param {Object} end
+ */
+ geDateAll(begin, end) {
+ var arr = []
+ var ab = begin.split('-')
+ var ae = end.split('-')
+ var db = new Date()
+ db.setFullYear(ab[0], ab[1] - 1, ab[2])
+ var de = new Date()
+ de.setFullYear(ae[0], ae[1] - 1, ae[2])
+ var unixDb = db.getTime() - 24 * 60 * 60 * 1000
+ var unixDe = de.getTime() - 24 * 60 * 60 * 1000
+ for (var k = unixDb; k <= unixDe;) {
+ k = k + 24 * 60 * 60 * 1000
+ arr.push(this.getDate(new Date(parseInt(k))).fullDate)
+ }
+ return arr
+ }
+ /**
+ * 计算阴历日期显示
+ */
+ getlunar(year, month, date) {
+ return CALENDAR.solar2lunar(year, month, date)
+ }
+ /**
+ * 设置打点
+ */
+ setSelectInfo(data, value) {
+ this.selected = value
+ this._getWeek(data)
+ }
+
+ /**
+ * 获取多选状态
+ */
+ setMultiple(fullDate) {
+ let {
+ before,
+ after
+ } = this.multipleStatus
+
+ if (!this.range) return
+ if (before && after) {
+ this.multipleStatus.before = ''
+ this.multipleStatus.after = ''
+ this.multipleStatus.data = []
+ } else {
+ if (!before) {
+ this.multipleStatus.before = fullDate
+ } else {
+ this.multipleStatus.after = fullDate
+ if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
+ this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus
+ .after);
+ } else {
+ this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus
+ .before);
+ }
+ }
+ }
+ this._getWeek(fullDate)
+ }
+
+ /**
+ * 获取每周数据
+ * @param {Object} dateData
+ */
+ _getWeek(dateData) {
+ const {
+ fullDate,
+ year,
+ month,
+ date,
+ day
+ } = this.getDate(dateData)
+ let firstDay = new Date(year, month - 1, 1).getDay()
+ let currentDay = new Date(year, month, 0).getDate()
+ let dates = {
+ lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天
+ currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数
+ nextMonthDays: [], // 下个月开始几天
+ weeks: []
+ }
+ let canlender = []
+ const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length)
+ dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData))
+ canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays)
+ let weeks = {}
+ // 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天
+ for (let i = 0; i < canlender.length; i++) {
+ if (i % 7 === 0) {
+ weeks[parseInt(i / 7)] = new Array(7)
+ }
+ weeks[parseInt(i / 7)][i % 7] = canlender[i]
+ }
+ this.canlender = canlender
+ this.weeks = weeks
+ }
+
+ //静态方法
+ // static init(date) {
+ // if (!this.instance) {
+ // this.instance = new Calendar(date);
+ // }
+ // return this.instance;
+ // }
+}
+
+
+export default Calendar
diff --git a/pages_tool/components/uni-nav-bar/uni-nav-bar.vue b/components/uni-nav-bar/uni-nav-bar.vue
similarity index 93%
rename from pages_tool/components/uni-nav-bar/uni-nav-bar.vue
rename to components/uni-nav-bar/uni-nav-bar.vue
index 0f93bc1..2ea092d 100644
--- a/pages_tool/components/uni-nav-bar/uni-nav-bar.vue
+++ b/components/uni-nav-bar/uni-nav-bar.vue
@@ -42,7 +42,7 @@
export default {
name: 'UniNavBar',
components: {
- uniStatusBar: () => import('@/pages_tool/components/uni-status-bar/uni-status-bar.vue'),
+ uniStatusBar: () => import('@/components/uni-status-bar/uni-status-bar.vue'),
uniIcons: () => import('@/components/uni-icons/uni-icons.vue'),
},
props: {
diff --git a/pages_tool/components/uni-status-bar/uni-status-bar.vue b/components/uni-status-bar/uni-status-bar.vue
similarity index 100%
rename from pages_tool/components/uni-status-bar/uni-status-bar.vue
rename to components/uni-status-bar/uni-status-bar.vue
diff --git a/pages.json b/pages.json
index aa31a4d..5263633 100644
--- a/pages.json
+++ b/pages.json
@@ -344,11 +344,7 @@
}
]
},
- {
- //******************工具模块主分包(公共组件)******************
- "root": "pages_tool",
- "pages": []
- },
+
{
//******************会员模块-基础信息子分包******************
"root": "pages_tool/member/basic",
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 0e5471c..40f6e5b 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -14,7 +14,7 @@
{{ isEnEnv ? 'Follow Official Account' : '关注公众号'
- }}
+ }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -265,9 +18,14 @@
diff --git a/components-diy/diy-member-my-order.vue b/components-diy/diy-member-my-order.vue
index e4c2dd5..47880c5 100644
--- a/components-diy/diy-member-my-order.vue
+++ b/components-diy/diy-member-my-order.vue
@@ -2,7 +2,7 @@
-
@@ -21,7 +21,7 @@
{{ $lang('waitpay') }}
-
@@ -40,7 +40,7 @@
{{ $lang('waitsend') }}
-
@@ -59,7 +59,7 @@
{{ $lang('waitconfirm') }}
-
diff --git a/components/common-payment/payment.js b/components/common-payment/payment.js
index 2fcfeb6..0164f98 100644
--- a/components/common-payment/payment.js
+++ b/components/common-payment/payment.js
@@ -922,7 +922,7 @@ export default {
payClose() {
// 更新购物车数量
this.$store.dispatch('getCartNumber');
- this.$util.redirectTo('/pages_order/detail', {
+ this.$util.redirectTo('/pages_order/detail/detail', {
order_id: this.$refs.choosePaymentPopup.payInfo.order_id
}, 'redirectTo');
},
diff --git a/components/ns-goods-sku/ns-goods-sku.vue b/components/ns-goods-sku/ns-goods-sku.vue
index dff91b0..bd28821 100644
--- a/components/ns-goods-sku/ns-goods-sku.vue
+++ b/components/ns-goods-sku/ns-goods-sku.vue
@@ -1109,7 +1109,7 @@
key: 'orderCreateData',
data: data,
success: () => {
- this.$util.redirectTo('/pages_order/payment');
+ this.$util.redirectTo('/pages_order/base/payment');
this.btnSwitch = false;
}
});
diff --git a/pages.json b/pages.json
index 5263633..4d40da0 100644
--- a/pages.json
+++ b/pages.json
@@ -58,8 +58,8 @@
]
},
{
- //******************订单模块分包******************
- "root": "pages_order",
+ //******************订单模块-基础功能子分包******************
+ "root": "pages_order/base",
"pages": [
{
"path": "payment",
@@ -74,7 +74,13 @@
"navigationStyle": "custom"
// #endif
}
- },
+ }
+ ]
+ },
+ {
+ //******************订单模块-详情功能子分包******************
+ "root": "pages_order/detail",
+ "pages": [
{
"path": "detail",
"style": {
@@ -111,8 +117,8 @@
]
},
{
- //******************积分模块分包******************
- "root": "pages_promotion/point",
+ //******************积分模块-基础功能子分包******************
+ "root": "pages_promotion/point/base",
"pages": [
{
"path": "list",
@@ -127,7 +133,13 @@
"navigationStyle": "custom"
// #endif
}
- },
+ }
+ ]
+ },
+ {
+ //******************积分模块-详情功能子分包******************
+ "root": "pages_promotion/point/detail",
+ "pages": [
{
"path": "detail",
"style": {
@@ -185,8 +197,8 @@
]
},
{
- //******************分销核心模块分包******************
- "root": "pages_promotion/fenxiao/core",
+ //******************分销核心模块-基础功能子包******************
+ "root": "pages_promotion/fenxiao/core/base",
"pages": [
{
"path": "index",
@@ -196,14 +208,6 @@
// #endif
}
},
- {
- "path": "promote",
- "style": {
- // #ifdef APP-PLUS
- "navigationStyle": "custom"
- // #endif
- }
- },
{
"path": "apply",
"style": {
@@ -213,7 +217,21 @@
}
},
{
- "path": "promote_code",
+ "path": "level",
+ "style": {
+ // #ifdef APP-PLUS
+ "navigationStyle": "custom"
+ // #endif
+ }
+ }
+ ]
+ },
+ {
+ //******************分销核心模块-推广功能子包******************
+ "root": "pages_promotion/fenxiao/core/promote",
+ "pages": [
+ {
+ "path": "promote",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
@@ -221,7 +239,7 @@
}
},
{
- "path": "level",
+ "path": "promote_code",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
@@ -423,8 +441,8 @@
]
},
{
- //******************会员模块-资金管理子分包******************
- "root": "pages_tool/member/finance",
+ //******************会员模块-资金管理-账户基础子分包******************
+ "root": "pages_tool/member/finance/account",
"pages": [
{
"path": "balance",
@@ -454,6 +472,20 @@
// #endif
}
},
+ {
+ "path": "pay_password",
+ "style": {
+ // #ifdef APP-PLUS
+ "navigationStyle": "custom"
+ // #endif
+ }
+ }
+ ]
+ },
+ {
+ //******************会员模块-资金管理-交易功能子分包******************
+ "root": "pages_tool/member/finance/transaction",
+ "pages": [
{
"path": "apply_withdrawal",
"style": {
@@ -478,14 +510,6 @@
// #endif
}
},
- {
- "path": "pay_password",
- "style": {
- // #ifdef APP-PLUS
- "navigationStyle": "custom"
- // #endif
- }
- },
{
"path": "card",
"style": {
diff --git a/pages_goods/public/js/cart.js b/pages_goods/public/js/cart.js
index 5c2f9ab..04001a3 100644
--- a/pages_goods/public/js/cart.js
+++ b/pages_goods/public/js/cart.js
@@ -367,7 +367,7 @@ export default {
cart_ids: cart_ids.toString()
},
success: () => {
- this.$util.redirectTo('/pages_order/payment');
+ this.$util.redirectTo('/pages_order/base/payment');
this.isSub = false;
}
});
diff --git a/pages_order/list.vue b/pages_order/base/list.vue
similarity index 97%
rename from pages_order/list.vue
rename to pages_order/base/list.vue
index 67112f4..779cdc3 100644
--- a/pages_order/list.vue
+++ b/pages_order/base/list.vue
@@ -165,7 +165,7 @@
diff --git a/pages_tool/member/finance/balance_detail.vue b/pages_tool/member/finance/account/balance_detail.vue
similarity index 98%
rename from pages_tool/member/finance/balance_detail.vue
rename to pages_tool/member/finance/account/balance_detail.vue
index 5cde924..f0f4a82 100644
--- a/pages_tool/member/finance/balance_detail.vue
+++ b/pages_tool/member/finance/account/balance_detail.vue
@@ -200,11 +200,11 @@ export default {
},
toFromDetail(item) {
if (item.from_type == 'order' && !isNaN(parseInt(item.type_tag))) {
- this.$util.redirectTo('/pages_order/detail', {
+ this.$util.redirectTo('/pages_order/detail/detail', {
order_id: item.type_tag
});
} else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) {
- this.$util.redirectTo('/pages_order/detail', {
+ this.$util.redirectTo('/pages_order/detail/detail', {
order_id: item.type_tag
});
}
diff --git a/pages_tool/member/finance/pay_password.vue b/pages_tool/member/finance/account/pay_password.vue
similarity index 100%
rename from pages_tool/member/finance/pay_password.vue
rename to pages_tool/member/finance/account/pay_password.vue
diff --git a/pages_tool/member/finance/point.vue b/pages_tool/member/finance/account/point.vue
similarity index 98%
rename from pages_tool/member/finance/point.vue
rename to pages_tool/member/finance/account/point.vue
index 2039cdf..4526b74 100644
--- a/pages_tool/member/finance/point.vue
+++ b/pages_tool/member/finance/account/point.vue
@@ -161,5 +161,5 @@ export default {
diff --git a/pages_tool/member/finance/point_detail.vue b/pages_tool/member/finance/account/point_detail.vue
similarity index 94%
rename from pages_tool/member/finance/point_detail.vue
rename to pages_tool/member/finance/account/point_detail.vue
index a9c15fe..b9b4d00 100644
--- a/pages_tool/member/finance/point_detail.vue
+++ b/pages_tool/member/finance/account/point_detail.vue
@@ -161,22 +161,22 @@ export default {
if (data.type == 1 && data.relate_order_id) {
switch (data.delivery_type) {
case 'store':
- this.$util.redirectTo('/pages_order/detail_pickup', {
+ this.$util.redirectTo('/pages_order/detail/detail_pickup', {
order_id: data.relate_order_id
});
break;
case 'local':
- this.$util.redirectTo('/pages_order/detail_local_delivery', {
+ this.$util.redirectTo('/pages_order/detail/detail_local_delivery', {
order_id: data.relate_order_id
});
break;
default:
- this.$util.redirectTo('/pages_order/detail', {
+ this.$util.redirectTo('/pages_order/detail/detail', {
order_id: data.relate_order_id
});
}
} else {
- this.$util.redirectTo('/pages_order/detail_point', {
+ this.$util.redirectTo('/pages_order/detail/detail_point', {
order_id: data.order_id
});
}
@@ -184,7 +184,7 @@ export default {
}
});
} else if (item.from_type == 'pointcash') {
- this.$util.redirectTo('/pages_order/detail', {
+ this.$util.redirectTo('/pages_order/detail/detail', {
order_id: item.type_tag
});
} else if (item.from_type == 'memberconsume') {
@@ -192,11 +192,11 @@ export default {
// order_id: item.type_tag
// });
} else if (item.from_type == 'pointexchangerefund' && parseInt(item.type_tag) != 0) {
- this.$util.redirectTo('/pages_order/detail_point', {
+ this.$util.redirectTo('/pages_order/detail/detail_point', {
order_id: item.type_tag
});
} else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) {
- this.$util.redirectTo('/pages_order/detail', {
+ this.$util.redirectTo('/pages_order/detail/detail', {
order_id: item.type_tag
});
}
diff --git a/pages_tool/member/finance/apply_withdrawal.vue b/pages_tool/member/finance/transaction/apply_withdrawal.vue
similarity index 100%
rename from pages_tool/member/finance/apply_withdrawal.vue
rename to pages_tool/member/finance/transaction/apply_withdrawal.vue
diff --git a/pages_tool/member/finance/card.vue b/pages_tool/member/finance/transaction/card.vue
similarity index 99%
rename from pages_tool/member/finance/card.vue
rename to pages_tool/member/finance/transaction/card.vue
index d4ef962..48d3b06 100644
--- a/pages_tool/member/finance/card.vue
+++ b/pages_tool/member/finance/transaction/card.vue
@@ -195,7 +195,7 @@ export default {
\ No newline at end of file
diff --git a/pages_tool/member/finance/withdrawal.vue b/pages_tool/member/finance/transaction/withdrawal.vue
similarity index 100%
rename from pages_tool/member/finance/withdrawal.vue
rename to pages_tool/member/finance/transaction/withdrawal.vue
diff --git a/pages_tool/member/finance/withdrawal_detail.vue b/pages_tool/member/finance/transaction/withdrawal_detail.vue
similarity index 100%
rename from pages_tool/member/finance/withdrawal_detail.vue
rename to pages_tool/member/finance/transaction/withdrawal_detail.vue
diff --git a/pages_tool/order/detail_virtual.vue b/pages_tool/order/detail_virtual.vue
index 8799438..2836315 100644
--- a/pages_tool/order/detail_virtual.vue
+++ b/pages_tool/order/detail_virtual.vue
@@ -15,7 +15,7 @@ export default {
},
onLoad(option) {
if (option.order_id) {
- this.$util.redirectTo('/pages_order/detail', { order_id: option.order_id }, 'redirectTo');
+ this.$util.redirectTo('/pages_order/detail/detail', { order_id: option.order_id }, 'redirectTo');
}
}
};
diff --git a/pages_tool/order/logistics.vue b/pages_tool/order/logistics.vue
index dab892d..371b60b 100644
--- a/pages_tool/order/logistics.vue
+++ b/pages_tool/order/logistics.vue
@@ -135,7 +135,7 @@ export default {
title: '未获取到订单信息!'
});
setTimeout(() => {
- this.$util.redirectTo('/pages_order/list');
+ this.$util.redirectTo('/pages_order/base/list');
}, 1500);
}
},
diff --git a/pages_tool/order/public/js/evaluate.js b/pages_tool/order/public/js/evaluate.js
index 63ebd01..e3ea6bb 100644
--- a/pages_tool/order/public/js/evaluate.js
+++ b/pages_tool/order/public/js/evaluate.js
@@ -23,7 +23,7 @@ export default {
},
onLoad(options) {
//接收订单号,订单是否是追评等信息
- options.order_id ? (this.orderId = options.order_id) : this.$util.redirectTo('/pages_order/list');
+ options.order_id ? (this.orderId = options.order_id) : this.$util.redirectTo('/pages_order/base/list');
this.isIphoneX = this.$util.uniappIsIPhoneX();
if (!this.storeToken) {
@@ -90,7 +90,7 @@ export default {
title: "未获取到订单数据"
})
setTimeout(() => {
- this.$util.redirectTo('/pages_order/list', {}, "redirectTo");
+ this.$util.redirectTo('/pages_order/base/list', {}, "redirectTo");
}, 1000)
}
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
@@ -200,7 +200,7 @@ export default {
title: "评价成功"
});
setTimeout(() => {
- this.$util.redirectTo('/pages_order/list', {}, "redirectTo");
+ this.$util.redirectTo('/pages_order/base/list', {}, "redirectTo");
}, 1000);
} else {
this.$util.showToast({
diff --git a/pages_tool/order/refund.vue b/pages_tool/order/refund.vue
index fa3b159..325d566 100644
--- a/pages_tool/order/refund.vue
+++ b/pages_tool/order/refund.vue
@@ -175,7 +175,7 @@ export default {
} else {
this.$util.showToast({ title: '未获取到该订单项退款信息' });
setTimeout(() => {
- this.$util.redirectTo('/pages_order/list');
+ this.$util.redirectTo('/pages_order/base/list');
}, 1000);
}
},
diff --git a/pages_tool/order/refund_batch.vue b/pages_tool/order/refund_batch.vue
index dcb398d..b5fd387 100644
--- a/pages_tool/order/refund_batch.vue
+++ b/pages_tool/order/refund_batch.vue
@@ -168,7 +168,7 @@ export default {
} else {
this.$util.showToast({ title: '未获取到该订单项退款信息' });
setTimeout(() => {
- this.$util.redirectTo('/pages_order/list');
+ this.$util.redirectTo('/pages_order/base/list');
}, 1000);
}
},
diff --git a/pages_tool/order/refund_detail.vue b/pages_tool/order/refund_detail.vue
index 580b1ab..19cda70 100644
--- a/pages_tool/order/refund_detail.vue
+++ b/pages_tool/order/refund_detail.vue
@@ -191,7 +191,7 @@ export default {
} else {
this.$util.showToast({ title: '未获取到该订单项退款信息' });
setTimeout(() => {
- this.$util.redirectTo('/pages_order/list');
+ this.$util.redirectTo('/pages_order/base/list');
}, 1000);
}
},
@@ -207,7 +207,7 @@ export default {
if (res.code >= 0) {
this.$util.showToast({ title: '撤销成功' });
setTimeout(() => {
- this.$util.redirectTo('/pages_order/list');
+ this.$util.redirectTo('/pages_order/base/list');
}, 1000);
}
});
diff --git a/pages_tool/order/refund_goods_select.vue b/pages_tool/order/refund_goods_select.vue
index da75bad..b773d5b 100644
--- a/pages_tool/order/refund_goods_select.vue
+++ b/pages_tool/order/refund_goods_select.vue
@@ -57,7 +57,7 @@ export default {
icon: 'none'
})
setTimeout(() => {
- this.$util.redirectTo('/pages_order/list');
+ this.$util.redirectTo('/pages_order/base/list');
}, 1000)
}
},
diff --git a/pages_tool/order/refund_type_select.vue b/pages_tool/order/refund_type_select.vue
index 4e6e512..19975d4 100644
--- a/pages_tool/order/refund_type_select.vue
+++ b/pages_tool/order/refund_type_select.vue
@@ -83,7 +83,7 @@ export default {
title: '未获取到该订单项退款信息'
});
setTimeout(() => {
- this.$util.redirectTo('/pages_order/list');
+ this.$util.redirectTo('/pages_order/base/list');
}, 1000);
}
},
diff --git a/pages_tool/pay/result.vue b/pages_tool/pay/result.vue
index e400a78..cc3d397 100644
--- a/pages_tool/pay/result.vue
+++ b/pages_tool/pay/result.vue
@@ -154,11 +154,11 @@ export default {
},
toOrderDetail(id) {
if (this.payInfo.order_type == 2) {
- this.$util.redirectTo('/pages_order/detail_pickup', {
+ this.$util.redirectTo('/pages_order/detail/detail_pickup', {
order_id: id
}, 'redirectTo');
} else if (this.payInfo.order_type == 3) {
- this.$util.redirectTo('/pages_order/detail_local_delivery', {
+ this.$util.redirectTo('/pages_order/detail/detail_local_delivery', {
order_id: id
}, 'redirectTo');
} else if (this.payInfo.order_type == 4) {
@@ -166,7 +166,7 @@ export default {
order_id: id
}, 'redirectTo');
} else {
- this.$util.redirectTo('/pages_order/detail', {
+ this.$util.redirectTo('/pages_order/detail/detail', {
order_id: id
}, 'redirectTo');
}
diff --git a/vue.config.js b/vue.config.js
index ebf8b7f..64ab2f8 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,23 +1,24 @@
module.exports = {
productionSourceMap: false,
configureWebpack: config => {
+ // 生产环境下开启极限压缩
if (process.env.NODE_ENV === 'production') {
console.log('生产环境下开启极限压缩');
-
+
// 确保minimizer数组存在
if (config.optimization && config.optimization.minimizer && Array.isArray(config.optimization.minimizer)) {
// 查找TerserWebpackPlugin实例,而不是依赖索引
const terserPluginIndex = config.optimization.minimizer.findIndex(plugin => {
- return plugin.constructor && plugin.constructor.name === 'TerserWebpackPlugin' ||
- (plugin.options && plugin.options.terserOptions);
+ return plugin.constructor && plugin.constructor.name === 'TerserWebpackPlugin' ||
+ (plugin.options && plugin.options.terserOptions);
});
-
+
if (terserPluginIndex !== -1) {
// 确保options对象存在
if (!config.optimization.minimizer[terserPluginIndex].options) {
config.optimization.minimizer[terserPluginIndex].options = {};
}
-
+
// 设置terserOptions - 极限压缩配置
config.optimization.minimizer[terserPluginIndex].options.terserOptions = {
compress: {
From 8ef6975ee1c8c88559f72332f7fd06f0e29497c6 Mon Sep 17 00:00:00 2001
From: ZF sun <34314687@qq.com>
Date: Mon, 5 Jan 2026 15:27:34 +0800
Subject: [PATCH 07/26] =?UTF-8?q?chore(=E7=BB=84=E4=BB=B6):=20=E7=94=B1?=
=?UTF-8?q?=E4=BA=8Eeasycom=E4=BC=9A=E8=87=AA=E5=8A=A8=E6=B3=A8=E5=86=8Cco?=
=?UTF-8?q?mponents=E5=92=8Cuni=5Fmodules=20=E7=9B=AE=E5=BD=95=E4=B8=8B?=
=?UTF-8?q?=E7=9A=84=E7=BB=84=E4=BB=B6=EF=BC=8C=E6=89=80=E4=BB=A5=E5=8E=BB?=
=?UTF-8?q?=E9=99=A4=E5=BC=95=E7=94=A8=E9=83=A8=E5=88=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components-diy/diy-article.vue | 3 -
components-diy/diy-bargain.vue | 3 -
components-diy/diy-coupon.vue | 1 -
components-diy/diy-goods-brand.vue | 1 -
components-diy/diy-goods-list.vue | 1 -
components-diy/diy-goods-recommend.vue | 3 -
components-diy/diy-graphic-nav.vue | 3 +-
components-diy/diy-group.vue | 393 ++++++++++++++++---------
components-diy/diy-groupbuy.vue | 3 -
components-diy/diy-live.vue | 3 -
components-diy/diy-merch-list.vue | 1 -
components-diy/diy-notes.vue | 1 -
components-diy/diy-pinfan.vue | 1 -
components-diy/diy-pintuan.vue | 1 -
components-diy/diy-presale.vue | 1 -
components-diy/diy-seckill.vue | 1 -
components-diy/diy-store-label.vue | 1 -
vue.config.js | 127 ++++----
18 files changed, 321 insertions(+), 227 deletions(-)
diff --git a/components-diy/diy-article.vue b/components-diy/diy-article.vue
index 3b78b39..5539a1b 100644
--- a/components-diy/diy-article.vue
+++ b/components-diy/diy-article.vue
@@ -47,9 +47,6 @@ export default {
type: Object
}
},
- components: {
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
- },
mixins: [DiyMinx],
data() {
return {
diff --git a/components-diy/diy-bargain.vue b/components-diy/diy-bargain.vue
index 2939daf..373dd8a 100644
--- a/components-diy/diy-bargain.vue
+++ b/components-diy/diy-bargain.vue
@@ -186,9 +186,6 @@ export default {
type: Object
}
},
- components: {
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
- },
mixins: [DiyMinx],
data() {
return {
diff --git a/components-diy/diy-coupon.vue b/components-diy/diy-coupon.vue
index b3bf43f..eae716a 100644
--- a/components-diy/diy-coupon.vue
+++ b/components-diy/diy-coupon.vue
@@ -304,7 +304,6 @@ export default {
}
},
components: {
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
},
mixins: [DiyMinx],
diff --git a/components-diy/diy-goods-brand.vue b/components-diy/diy-goods-brand.vue
index 15949c3..288d5b4 100644
--- a/components-diy/diy-goods-brand.vue
+++ b/components-diy/diy-goods-brand.vue
@@ -31,7 +31,6 @@ export default {
components: {
uniGrid: () => import('@/components/uni-grid/uni-grid.vue'),
uniGridItem: () => import('@/components/uni-grid-item/uni-grid-item.vue'),
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
},
data() {
return {
diff --git a/components-diy/diy-goods-list.vue b/components-diy/diy-goods-list.vue
index 8b2327e..4916a92 100644
--- a/components-diy/diy-goods-list.vue
+++ b/components-diy/diy-goods-list.vue
@@ -260,7 +260,6 @@ export default {
name: 'diy-goods-list',
components: {
nsGoodsSkuIndex: () => import('@/components/ns-goods-sku/ns-goods-sku-index.vue'),
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
},
props: {
value: {
diff --git a/components-diy/diy-goods-recommend.vue b/components-diy/diy-goods-recommend.vue
index ad03f7b..c179408 100644
--- a/components-diy/diy-goods-recommend.vue
+++ b/components-diy/diy-goods-recommend.vue
@@ -78,9 +78,6 @@ export default {
}
}
},
- components: {
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
- },
mixins: [DiyMinx],
data() {
return {
diff --git a/components-diy/diy-graphic-nav.vue b/components-diy/diy-graphic-nav.vue
index e3982aa..68cab7f 100644
--- a/components-diy/diy-graphic-nav.vue
+++ b/components-diy/diy-graphic-nav.vue
@@ -103,8 +103,7 @@ export default {
type: Object
}
},
- components: {
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
+ components: {
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
},
mixins: [DiyMinx],
diff --git a/components-diy/diy-group.vue b/components-diy/diy-group.vue
index dac4b12..27050d5 100644
--- a/components-diy/diy-group.vue
+++ b/components-diy/diy-group.vue
@@ -1,14 +1,261 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -18,14 +265,9 @@
diff --git a/components-diy/diy-groupbuy.vue b/components-diy/diy-groupbuy.vue
index db207fd..9583cec 100644
--- a/components-diy/diy-groupbuy.vue
+++ b/components-diy/diy-groupbuy.vue
@@ -131,9 +131,6 @@ export default {
type: Object
}
},
- components: {
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
- },
mixins: [DiyMinx],
data() {
return {
diff --git a/components-diy/diy-live.vue b/components-diy/diy-live.vue
index 9f98473..568b58a 100644
--- a/components-diy/diy-live.vue
+++ b/components-diy/diy-live.vue
@@ -51,9 +51,6 @@ export default {
}
}
},
- components: {
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
- },
data() {
return {
loading: true,
diff --git a/components-diy/diy-merch-list.vue b/components-diy/diy-merch-list.vue
index 5374a6c..51f684a 100644
--- a/components-diy/diy-merch-list.vue
+++ b/components-diy/diy-merch-list.vue
@@ -60,7 +60,6 @@ export default {
components: {
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
},
data() {
return {
diff --git a/components-diy/diy-notes.vue b/components-diy/diy-notes.vue
index 38ff3bb..0ee8f0b 100644
--- a/components-diy/diy-notes.vue
+++ b/components-diy/diy-notes.vue
@@ -66,7 +66,6 @@ export default {
components: {
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
},
data() {
return {
diff --git a/components-diy/diy-pinfan.vue b/components-diy/diy-pinfan.vue
index 78e1437..0d26f55 100644
--- a/components-diy/diy-pinfan.vue
+++ b/components-diy/diy-pinfan.vue
@@ -178,7 +178,6 @@ export default {
components: {
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
},
mixins: [DiyMinx],
data() {
diff --git a/components-diy/diy-pintuan.vue b/components-diy/diy-pintuan.vue
index 6b3040a..184a624 100644
--- a/components-diy/diy-pintuan.vue
+++ b/components-diy/diy-pintuan.vue
@@ -214,7 +214,6 @@ export default {
components: {
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
},
mixins: [DiyMinx],
data() {
diff --git a/components-diy/diy-presale.vue b/components-diy/diy-presale.vue
index 7d2c734..1bd2a2c 100644
--- a/components-diy/diy-presale.vue
+++ b/components-diy/diy-presale.vue
@@ -122,7 +122,6 @@ export default {
components: {
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
},
data() {
return {
diff --git a/components-diy/diy-seckill.vue b/components-diy/diy-seckill.vue
index 4baf128..c5f3532 100644
--- a/components-diy/diy-seckill.vue
+++ b/components-diy/diy-seckill.vue
@@ -245,7 +245,6 @@ export default {
components: {
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
},
mixins: [DiyMinx],
data() {
diff --git a/components-diy/diy-store-label.vue b/components-diy/diy-store-label.vue
index 5aa713e..87ed5eb 100644
--- a/components-diy/diy-store-label.vue
+++ b/components-diy/diy-store-label.vue
@@ -41,7 +41,6 @@ export default {
components: {
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
- XSkeleton: () => import('@/uni_modules/x-skeleton/components/x-skeleton/x-skeleton.vue'),
},
mixins: [DiyMinx],
data() {
diff --git a/vue.config.js b/vue.config.js
index 64ab2f8..c89a95b 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,74 +1,71 @@
module.exports = {
productionSourceMap: false,
configureWebpack: config => {
- // 生产环境下开启极限压缩
- if (process.env.NODE_ENV === 'production') {
- console.log('生产环境下开启极限压缩');
+ console.log('开始尝试配置极限压缩');
- // 确保minimizer数组存在
- if (config.optimization && config.optimization.minimizer && Array.isArray(config.optimization.minimizer)) {
- // 查找TerserWebpackPlugin实例,而不是依赖索引
- const terserPluginIndex = config.optimization.minimizer.findIndex(plugin => {
- return plugin.constructor && plugin.constructor.name === 'TerserWebpackPlugin' ||
- (plugin.options && plugin.options.terserOptions);
- });
+ // 确保minimizer数组存在
+ if (config.optimization && config.optimization.minimizer && Array.isArray(config.optimization.minimizer)) {
+ // 查找TerserWebpackPlugin实例,而不是依赖索引
+ const terserPluginIndex = config.optimization.minimizer.findIndex(plugin => {
+ return plugin.constructor && plugin.constructor.name === 'TerserWebpackPlugin' ||
+ (plugin.options && plugin.options.terserOptions);
+ });
- if (terserPluginIndex !== -1) {
- // 确保options对象存在
- if (!config.optimization.minimizer[terserPluginIndex].options) {
- config.optimization.minimizer[terserPluginIndex].options = {};
- }
-
- // 设置terserOptions - 极限压缩配置
- config.optimization.minimizer[terserPluginIndex].options.terserOptions = {
- compress: {
- drop_console: true, // 去除所有console语句
- drop_debugger: true, // 去除debugger语句
- dead_code: true, // 移除死代码
- unused: true, // 移除未使用的变量
- toplevel: true, // 清理顶层作用域未使用的变量
- passes: 5, // 增加压缩次数以获得更好的压缩效果
- sequences: true, // 合并连续的变量声明
- evaluate: true, // 提前计算常量表达式
- reduce_vars: true, // 合并或移除变量
- join_vars: true, // 合并变量声明
- conditionals: true, // 优化条件表达式
- comparisons: true, // 优化比较操作
- booleans: true, // 优化布尔表达式
- typeofs: true, // 优化typeof操作
- collapse_vars: true, // 折叠定义后不再修改的变量
- reduce_funcs: true, // 合并或移除未使用的函数
- inline: true, // 内联简单函数
- side_effects: true, // 移除有副作用的代码
- keep_fargs: false, // 移除未使用的函数参数
- keep_fnames: false, // 不保留函数名称
- pure_funcs: ['console.log', 'console.warn', 'console.error', 'console.info'], // 标记为纯函数的console方法
- pure_getters: true // 假设getter函数没有副作用
- },
- format: {
- ascii_only: true, // 确保输出ASCII字符
- comments: false, // 去除所有注释
- beautify: false, // 不美化输出
- ecma: 5, // 输出兼容ECMAScript 5
- wrap_func_args: false, // 不包裹函数参数
- bracketize: true, // 使用大括号包裹所有块
- quote_style: 1 // 使用单引号
- },
- parse: {
- ecma: 8, // 使用ECMAScript 8解析
- bare_returns: true // 允许顶级return语句
- },
- mangle: {
- toplevel: true, // 混淆顶层作用域的变量名
- keep_fnames: false, // 不保留函数名称
- keep_classnames: false // 不保留类名称
- },
- module: false, // 不是ES模块
- sourceMap: false // 不生成source map
- };
-
- console.log('terserOptions配置完成');
+ if (terserPluginIndex !== -1) {
+ // 确保options对象存在
+ if (!config.optimization.minimizer[terserPluginIndex].options) {
+ config.optimization.minimizer[terserPluginIndex].options = {};
}
+
+ // 设置terserOptions - 极限压缩配置
+ config.optimization.minimizer[terserPluginIndex].options.terserOptions = {
+ compress: {
+ drop_console: true, // 去除所有console语句
+ drop_debugger: true, // 去除debugger语句
+ dead_code: true, // 移除死代码
+ unused: true, // 移除未使用的变量
+ toplevel: true, // 清理顶层作用域未使用的变量
+ passes: 5, // 增加压缩次数以获得更好的压缩效果
+ sequences: true, // 合并连续的变量声明
+ evaluate: true, // 提前计算常量表达式
+ reduce_vars: true, // 合并或移除变量
+ join_vars: true, // 合并变量声明
+ conditionals: true, // 优化条件表达式
+ comparisons: true, // 优化比较操作
+ booleans: true, // 优化布尔表达式
+ typeofs: true, // 优化typeof操作
+ collapse_vars: true, // 折叠定义后不再修改的变量
+ reduce_funcs: true, // 合并或移除未使用的函数
+ inline: true, // 内联简单函数
+ side_effects: true, // 移除有副作用的代码
+ keep_fargs: false, // 移除未使用的函数参数
+ keep_fnames: false, // 不保留函数名称
+ pure_funcs: ['console.log', 'console.warn', 'console.error', 'console.info'], // 标记为纯函数的console方法
+ pure_getters: true // 假设getter函数没有副作用
+ },
+ format: {
+ ascii_only: true, // 确保输出ASCII字符
+ comments: false, // 去除所有注释
+ beautify: false, // 不美化输出
+ ecma: 5, // 输出兼容ECMAScript 5
+ wrap_func_args: false, // 不包裹函数参数
+ bracketize: true, // 使用大括号包裹所有块
+ quote_style: 1 // 使用单引号
+ },
+ parse: {
+ ecma: 8, // 使用ECMAScript 8解析
+ bare_returns: true // 允许顶级return语句
+ },
+ mangle: {
+ toplevel: true, // 混淆顶层作用域的变量名
+ keep_fnames: false, // 不保留函数名称
+ keep_classnames: false // 不保留类名称
+ },
+ module: false, // 不是ES模块
+ sourceMap: false // 不生成source map
+ };
+
+ console.log('配置极限压缩完成');
}
}
}
From 60a0e5133efe70092cd177ff62d5fc911395e5ca Mon Sep 17 00:00:00 2001
From: ZF sun <34314687@qq.com>
Date: Mon, 5 Jan 2026 15:56:49 +0800
Subject: [PATCH 08/26] =?UTF-8?q?revert:=20=E6=89=80=E6=9C=89=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E4=B8=8Ecustom/common=E5=88=86=E6=94=AF=E5=90=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.local.config.js | 39 -
.local.config.js.example | 10 +-
common/js/config-external.js | 6 +-
common/js/diy.js | 5 +-
common/js/goods_detail_base.js | 2 +-
common/js/util.js | 103 +-
components-diy/diy-category-item.vue | 3 -
components-diy/diy-category.vue | 7 +-
components-diy/diy-coupon.vue | 3 -
components-diy/diy-digit.vue | 8 +-
components-diy/diy-goods-brand.vue | 7 +-
components-diy/diy-goods-list.vue | 5 +-
components-diy/diy-graphic-nav.vue | 3 -
components-diy/diy-group.vue | 65 +-
components-diy/diy-image-nav.vue | 3 +-
components-diy/diy-index-page.vue | 7 +-
components-diy/diy-map.vue | 1 -
components-diy/diy-member-info.vue | 7 +-
components-diy/diy-member-my-order.vue | 12 +-
components-diy/diy-merch-list.vue | 6 +-
components-diy/diy-notes.vue | 4 -
components-diy/diy-notice.vue | 4 -
components-diy/diy-payment-qrcode.vue | 4 -
components-diy/diy-pinfan.vue | 4 -
components-diy/diy-pintuan.vue | 4 -
components-diy/diy-presale.vue | 4 -
components-diy/diy-quick-nav.vue | 4 -
components-diy/diy-rich-text.vue | 6 +-
components-diy/diy-rubik-cube.vue | 2 +-
components-diy/diy-search.vue | 4 -
components-diy/diy-seckill.vue | 4 -
components-diy/diy-store-label.vue | 4 -
components-diy/diy-video-list.vue | 3 +-
.../ai-chat-message/ai-chat-message.vue | 3 +-
components/common-payment/common-payment.vue | 21 +-
components/common-payment/payment.js | 4 +-
.../goods-detail-view/goods-detail-view.vue | 15 +-
components/mescroll/mescroll-body.vue | 8 +-
components/mescroll/mescroll-uni.vue | 11 +-
components/mescroll/my-list-mescroll.vue | 225 +--
components/ns-adv/ns-adv.vue | 238 ++--
.../ns-birthday-gift/ns-birthday-gift.vue | 7 +-
components/ns-contact/ns-contact.vue | 3 -
components/ns-copyright/ns-copyright.vue | 282 ++--
components/ns-form/ns-form.vue | 3 +-
.../ns-goods-action-button.vue | 192 ++-
.../ns-goods-action-icon.vue | 3 +-
.../ns-goods-recommend/ns-goods-recommend.vue | 7 +-
.../ns-goods-sku/ns-goods-sku-category.vue | 4 +-
.../ns-goods-sku/ns-goods-sku-index.vue | 4 +-
components/ns-goods-sku/ns-goods-sku.vue | 6 +-
components/ns-login/ns-login.vue | 15 +-
components/ns-mp-html/ns-mp-html.vue | 2 +-
components/ns-new-gift/ns-new-gift.vue | 8 +-
components/ns-newform/ns-newform.vue | 4 +-
components/ns-payment/ns-payment.vue | 12 +-
components/ns-select-time/ns-select-time.vue | 62 +-
components/payment/payment.vue | 7 +-
components/pick-regions/pick-regions.vue | 3 -
.../register-reward/register-reward.vue | 4 +-
components/uni-grid-item/uni-grid-item.vue | 3 +-
components/wxwork-contact/wxwork-contact.vue | 3 -
manifest.json | 4 +-
pages.json | 985 ++++++-------
pages/index/index.vue | 41 +-
pages_goods/cart.vue | 207 ++-
pages_goods/category.vue | 12 +-
.../goods-detail-view/goods-detail-view.vue | 15 +-
.../ns-goods-promotion/ns-goods-promotion.vue | 30 +-
pages_goods/detail.vue | 377 +++--
pages_goods/list.vue | 222 ++-
pages_goods/public/js/cart.js | 2 +-
pages_order/{detail => }/detail.vue | 471 +++----
.../{detail => }/detail_local_delivery.vue | 5 +-
pages_order/{detail => }/detail_pickup.vue | 5 +-
pages_order/{detail => }/detail_point.vue | 325 +++--
pages_order/{base => }/list.vue | 27 +-
pages_order/{base => }/payment.vue | 3 -
.../components/yuyue-date/yuyue-date.vue | 645 +++++----
.../fenxiao/{core/base => }/apply.vue | 14 +-
.../fenxiao/{withdraw => }/bill.vue | 35 +-
.../fenxiao/{relation => }/child_fenxiao.vue | 25 +-
pages_promotion/fenxiao/core/base/level.vue | 329 -----
.../fenxiao/core/promote/promote_code.vue | 314 -----
.../fenxiao/{core/promote => }/goods_list.vue | 70 +-
.../fenxiao/{core/base => }/index.vue | 23 +-
pages_promotion/fenxiao/level.vue | 319 +++++
pages_promotion/fenxiao/{order => }/order.vue | 77 +-
.../fenxiao/{order => }/order_detail.vue | 53 +-
.../fenxiao/{core/promote => }/promote.vue | 12 +-
pages_promotion/fenxiao/promote_code.vue | 306 ++++
pages_promotion/fenxiao/ranking_list.vue | 433 ++++++
.../fenxiao/{relation => }/relation.vue | 19 +-
pages_promotion/fenxiao/stat/ranking_list.vue | 431 ------
.../fenxiao/{relation => }/team.vue | 17 +-
.../fenxiao/{withdraw => }/withdraw_apply.vue | 3 -
.../fenxiao/{withdraw => }/withdraw_list.vue | 39 +-
.../{withdraw => }/withdrawal_detail.vue | 3 -
pages_promotion/merch/detail.vue | 230 ++-
pages_promotion/merch/merchcategory.vue | 5 +-
pages_promotion/point/base/goods_list.vue | 924 ------------
pages_promotion/point/base/list.vue | 617 --------
pages_promotion/point/{detail => }/detail.vue | 25 +-
pages_promotion/point/detail/order_list.vue | 603 --------
pages_promotion/point/detail/result.vue | 92 --
pages_promotion/point/goods_list.vue | 907 ++++++++++++
pages_promotion/point/list.vue | 593 ++++++++
pages_promotion/point/order_list.vue | 591 ++++++++
.../point/{detail => }/payment.vue | 175 +--
pages_promotion/point/result.vue | 92 ++
pages_tool/agreement/contenr.vue | 68 +-
pages_tool/article/detail.vue | 250 ++--
pages_tool/article/list.vue | 337 ++---
pages_tool/cases/index.vue | 42 +-
.../components}/chat-message/chat-message.vue | 12 +-
.../components}/img-cropping/cropping.vue | 0
.../components}/myp-one/myp-one.vue | 0
pages_tool/components/ns-adv/ns-adv.vue | 120 ++
.../components}/ns-chat/ns-chat-goods.vue | 0
.../components}/ns-chat/ns-chat-order.vue | 298 ++--
.../ns-chat/ns-chat-receiveGoods.vue | 0
.../components}/ns-progress/ns-progress.vue | 74 +-
.../components}/sx-rate/common.js | 12 +-
.../components}/sx-rate/index.vue | 0
.../components}/sx-rate/sx-rate/iconfont.css | 42 +-
.../components}/sx-rate/sx-rate/iconfont.eot | Bin
.../components}/sx-rate/sx-rate/iconfont.svg | 58 +-
.../components}/sx-rate/sx-rate/iconfont.ttf | Bin
.../components}/sx-rate/sx-rate/iconfont.woff | Bin
.../sx-rate/sx-rate/iconfont.woff2 | Bin
.../components}/uni-calendar/calendar.js | 1246 ++++++++---------
.../uni-calendar/uni-calendar-item.vue | 0
.../components}/uni-calendar/uni-calendar.vue | 4 +-
.../components}/uni-calendar/util.js | 708 +++++-----
.../components}/uni-nav-bar/uni-nav-bar.vue | 6 +-
.../uni-status-bar/uni-status-bar.vue | 0
pages_tool/contact/contact.vue | 39 +-
pages_tool/files/list.vue | 457 +++---
pages_tool/form/form.vue | 221 ++-
pages_tool/form/formdata.vue | 16 +-
pages_tool/goods/brand.vue | 196 +--
pages_tool/goods/coupon.vue | 752 +++++-----
pages_tool/goods/coupon_receive.vue | 7 -
pages_tool/goods/evaluate.vue | 22 +-
pages_tool/goods/not_exist.vue | 7 +-
pages_tool/goods/search.vue | 543 ++++---
pages_tool/help/detail.vue | 220 ++-
pages_tool/help/list.vue | 16 +-
pages_tool/index/diy.vue | 27 +-
pages_tool/login/find.vue | 67 +-
pages_tool/login/login.vue | 8 +-
pages_tool/member/account.vue | 465 ++++++
.../member/{basic => }/account_edit.vue | 14 +-
pages_tool/member/{address => }/address.vue | 22 +-
pages_tool/member/address/address_edit.vue | 496 -------
pages_tool/member/address_edit.vue | 501 +++++++
pages_tool/member/apply_withdrawal.vue | 425 ++++++
pages_tool/member/{other => }/assets.vue | 0
.../member/{finance/account => }/balance.vue | 38 +-
pages_tool/member/balance_detail.vue | 373 +++++
pages_tool/member/basic/account.vue | 465 ------
pages_tool/member/basic/modify_face.vue | 195 ---
.../member/{other => }/cancellation.vue | 2 +-
.../member/{other => }/cancelrefuse.vue | 4 +-
pages_tool/member/cancelstatus.vue | 189 +++
pages_tool/member/cancelsuccess.vue | 99 ++
.../member/{finance/transaction => }/card.vue | 200 ++-
.../transaction => }/card_agreement.vue | 4 +-
.../{finance/transaction => }/card_buy.vue | 444 +++---
pages_tool/member/collection.vue | 99 ++
pages_tool/member/{other => }/contact.vue | 5 +-
pages_tool/member/coupon.vue | 416 ++++++
.../member/finance/account/balance_detail.vue | 371 -----
.../member/finance/account/pay_password.vue | 280 ----
.../finance/transaction/apply_withdrawal.vue | 430 ------
pages_tool/member/{other => }/footprint.vue | 58 +-
pages_tool/member/{basic => }/index.vue | 64 +-
pages_tool/member/{basic => }/info.vue | 405 +++---
pages_tool/member/{basic => }/info_edit.vue | 491 ++++---
.../member/{rights => }/invite_friends.vue | 113 +-
pages_tool/member/level.vue | 382 +++++
pages_tool/member/level_growth_rules.vue | 274 ++++
pages_tool/member/modify_face.vue | 194 +++
pages_tool/member/other/cancelstatus.vue | 188 ---
pages_tool/member/other/cancelsuccess.vue | 99 --
pages_tool/member/other/collection.vue | 96 --
pages_tool/member/pay_password.vue | 278 ++++
.../member/{finance/account => }/point.vue | 24 +-
.../{finance/account => }/point_detail.vue | 50 +-
pages_tool/member/rights/coupon.vue | 421 ------
pages_tool/member/rights/level.vue | 391 ------
.../member/rights/level_growth_rules.vue | 274 ----
.../{finance/transaction => }/withdrawal.vue | 18 +-
.../transaction => }/withdrawal_detail.vue | 3 +-
pages_tool/notice/detail.vue | 240 ++--
pages_tool/notice/list.vue | 17 +-
pages_tool/order/activist.vue | 35 +-
pages_tool/order/detail_virtual.vue | 8 +-
pages_tool/order/evaluate.vue | 60 +-
pages_tool/order/logistics.vue | 42 +-
pages_tool/order/public/js/evaluate.js | 6 +-
pages_tool/order/refund.vue | 66 +-
pages_tool/order/refund_batch.vue | 83 +-
pages_tool/order/refund_detail.vue | 65 +-
pages_tool/order/refund_goods_select.vue | 375 +++--
pages_tool/order/refund_type_select.vue | 165 ++-
pages_tool/pay/cashier.vue | 40 +-
pages_tool/pay/index.vue | 4 +-
pages_tool/pay/result.vue | 533 ++++---
pages_tool/pay/wx_pay.vue | 40 +-
pages_tool/recharge/list.vue | 1024 +++++++-------
pages_tool/recharge/order_list.vue | 23 +-
pages_tool/seal/medium/detail.vue | 10 +-
pages_tool/seal/medium/search.vue | 9 +-
pages_tool/seal/structure.vue | 7 +-
pages_tool/storeclose/storeclose.vue | 11 +-
pages_tool/vr/index.vue | 4 +-
pages_tool/weapp/order_shipping.vue | 74 +-
pages_tool/webview/webview.vue | 5 +-
219 files changed, 14860 insertions(+), 15585 deletions(-)
delete mode 100644 .local.config.js
rename pages_order/{detail => }/detail.vue (73%)
rename pages_order/{detail => }/detail_local_delivery.vue (57%)
rename pages_order/{detail => }/detail_pickup.vue (57%)
rename pages_order/{detail => }/detail_point.vue (50%)
rename pages_order/{base => }/list.vue (95%)
rename pages_order/{base => }/payment.vue (97%)
rename pages_promotion/fenxiao/{core/base => }/apply.vue (94%)
rename pages_promotion/fenxiao/{withdraw => }/bill.vue (81%)
rename pages_promotion/fenxiao/{relation => }/child_fenxiao.vue (89%)
delete mode 100644 pages_promotion/fenxiao/core/base/level.vue
delete mode 100644 pages_promotion/fenxiao/core/promote/promote_code.vue
rename pages_promotion/fenxiao/{core/promote => }/goods_list.vue (89%)
rename pages_promotion/fenxiao/{core/base => }/index.vue (92%)
create mode 100644 pages_promotion/fenxiao/level.vue
rename pages_promotion/fenxiao/{order => }/order.vue (63%)
rename pages_promotion/fenxiao/{order => }/order_detail.vue (86%)
rename pages_promotion/fenxiao/{core/promote => }/promote.vue (90%)
create mode 100644 pages_promotion/fenxiao/promote_code.vue
create mode 100644 pages_promotion/fenxiao/ranking_list.vue
rename pages_promotion/fenxiao/{relation => }/relation.vue (88%)
delete mode 100644 pages_promotion/fenxiao/stat/ranking_list.vue
rename pages_promotion/fenxiao/{relation => }/team.vue (91%)
rename pages_promotion/fenxiao/{withdraw => }/withdraw_apply.vue (99%)
rename pages_promotion/fenxiao/{withdraw => }/withdraw_list.vue (77%)
rename pages_promotion/fenxiao/{withdraw => }/withdrawal_detail.vue (93%)
delete mode 100644 pages_promotion/point/base/goods_list.vue
delete mode 100644 pages_promotion/point/base/list.vue
rename pages_promotion/point/{detail => }/detail.vue (92%)
delete mode 100644 pages_promotion/point/detail/order_list.vue
delete mode 100644 pages_promotion/point/detail/result.vue
create mode 100644 pages_promotion/point/goods_list.vue
create mode 100644 pages_promotion/point/list.vue
create mode 100644 pages_promotion/point/order_list.vue
rename pages_promotion/point/{detail => }/payment.vue (63%)
create mode 100644 pages_promotion/point/result.vue
rename {components => pages_tool/components}/chat-message/chat-message.vue (95%)
rename {components => pages_tool/components}/img-cropping/cropping.vue (100%)
rename {components => pages_tool/components}/myp-one/myp-one.vue (100%)
create mode 100644 pages_tool/components/ns-adv/ns-adv.vue
rename {components => pages_tool/components}/ns-chat/ns-chat-goods.vue (100%)
rename {components => pages_tool/components}/ns-chat/ns-chat-order.vue (96%)
rename {components => pages_tool/components}/ns-chat/ns-chat-receiveGoods.vue (100%)
rename {components => pages_tool/components}/ns-progress/ns-progress.vue (94%)
rename {components => pages_tool/components}/sx-rate/common.js (97%)
rename {components => pages_tool/components}/sx-rate/index.vue (100%)
rename {components => pages_tool/components}/sx-rate/sx-rate/iconfont.css (68%)
rename {components => pages_tool/components}/sx-rate/sx-rate/iconfont.eot (100%)
rename {components => pages_tool/components}/sx-rate/sx-rate/iconfont.svg (97%)
rename {components => pages_tool/components}/sx-rate/sx-rate/iconfont.ttf (100%)
rename {components => pages_tool/components}/sx-rate/sx-rate/iconfont.woff (100%)
rename {components => pages_tool/components}/sx-rate/sx-rate/iconfont.woff2 (100%)
rename {components => pages_tool/components}/uni-calendar/calendar.js (97%)
rename {components => pages_tool/components}/uni-calendar/uni-calendar-item.vue (100%)
rename {components => pages_tool/components}/uni-calendar/uni-calendar.vue (95%)
rename {components => pages_tool/components}/uni-calendar/util.js (95%)
rename {components => pages_tool/components}/uni-nav-bar/uni-nav-bar.vue (92%)
rename {components => pages_tool/components}/uni-status-bar/uni-status-bar.vue (100%)
create mode 100644 pages_tool/member/account.vue
rename pages_tool/member/{basic => }/account_edit.vue (95%)
rename pages_tool/member/{address => }/address.vue (96%)
delete mode 100644 pages_tool/member/address/address_edit.vue
create mode 100644 pages_tool/member/address_edit.vue
create mode 100644 pages_tool/member/apply_withdrawal.vue
rename pages_tool/member/{other => }/assets.vue (100%)
rename pages_tool/member/{finance/account => }/balance.vue (83%)
create mode 100644 pages_tool/member/balance_detail.vue
delete mode 100644 pages_tool/member/basic/account.vue
delete mode 100644 pages_tool/member/basic/modify_face.vue
rename pages_tool/member/{other => }/cancellation.vue (98%)
rename pages_tool/member/{other => }/cancelrefuse.vue (94%)
create mode 100644 pages_tool/member/cancelstatus.vue
create mode 100644 pages_tool/member/cancelsuccess.vue
rename pages_tool/member/{finance/transaction => }/card.vue (65%)
rename pages_tool/member/{finance/transaction => }/card_agreement.vue (94%)
rename pages_tool/member/{finance/transaction => }/card_buy.vue (58%)
create mode 100644 pages_tool/member/collection.vue
rename pages_tool/member/{other => }/contact.vue (92%)
create mode 100644 pages_tool/member/coupon.vue
delete mode 100644 pages_tool/member/finance/account/balance_detail.vue
delete mode 100644 pages_tool/member/finance/account/pay_password.vue
delete mode 100644 pages_tool/member/finance/transaction/apply_withdrawal.vue
rename pages_tool/member/{other => }/footprint.vue (81%)
rename pages_tool/member/{basic => }/index.vue (87%)
rename pages_tool/member/{basic => }/info.vue (50%)
rename pages_tool/member/{basic => }/info_edit.vue (58%)
rename pages_tool/member/{rights => }/invite_friends.vue (82%)
create mode 100644 pages_tool/member/level.vue
create mode 100644 pages_tool/member/level_growth_rules.vue
create mode 100644 pages_tool/member/modify_face.vue
delete mode 100644 pages_tool/member/other/cancelstatus.vue
delete mode 100644 pages_tool/member/other/cancelsuccess.vue
delete mode 100644 pages_tool/member/other/collection.vue
create mode 100644 pages_tool/member/pay_password.vue
rename pages_tool/member/{finance/account => }/point.vue (88%)
rename pages_tool/member/{finance/account => }/point_detail.vue (87%)
delete mode 100644 pages_tool/member/rights/coupon.vue
delete mode 100644 pages_tool/member/rights/level.vue
delete mode 100644 pages_tool/member/rights/level_growth_rules.vue
rename pages_tool/member/{finance/transaction => }/withdrawal.vue (88%)
rename pages_tool/member/{finance/transaction => }/withdrawal_detail.vue (97%)
diff --git a/.local.config.js b/.local.config.js
deleted file mode 100644
index 9026bc8..0000000
--- a/.local.config.js
+++ /dev/null
@@ -1,39 +0,0 @@
-// 本地调试配置示例文件
-// 复制此文件并重命名为 local.config.js 以使用自定义本地配置
-
-const localDevConfig = ({
- '460': { // 制氧设备平台
- uniacid: 460,
- domain: 'https://xcx30.5g-quickapp.com/',
- },
- '2285': { // 数码喷墨墨水
- uniacid: 2285,
- domain: 'https://xcx.aigc-quickapp.com/',
- },
- '2811': { // POCT检测分析平台
- uniacid: 2811,
- domain: 'https://xcx.aigc-quickapp.com/',
- },
- '2724': { // 生物菌肥
- uniacid: 2724,
- domain: 'https://xcx.aigc-quickapp.com/',
- },
- '2505': { // 煤矿钻机
- uniacid: 2505,
- domain: 'https://xcx.aigc-quickapp.com/',
- },
- '2777': { // 养老服务
- uniacid: 2777,
- domain: 'https://xcx.aigc-quickapp.com/',
- },
- '1': { // 开发平台
- uniacid: 1,
- domain: 'https://dev.aigc-quickapp.com',
- },
- '1-test': { // 测试平台
- uniacid: 1,
- domain: 'https://test.aigc-quickapp.com',
- },
-})['2285']; // 选择要使用的环境配置
-
-export default localDevConfig;
\ No newline at end of file
diff --git a/.local.config.js.example b/.local.config.js.example
index 738b89e..fd74a22 100644
--- a/.local.config.js.example
+++ b/.local.config.js.example
@@ -9,7 +9,15 @@ const localDevConfig = ({
'2285': { // 数码喷墨墨水
uniacid: 2285,
domain: 'https://xcx.aigc-quickapp.com/',
+ },
+ '2724': { // 德龙生物肥料
+ uniacid: 2724,
+ domain: 'https://xcx.aigc-quickapp.com/',
},
+ '2777': { // 养老服务
+ uniacid: 2777,
+ domain: 'https://xcx.aigc-quickapp.com/',
+ },
'1': { // 开发平台
uniacid: 1,
domain: 'https://dev.aigc-quickapp.com',
@@ -18,6 +26,6 @@ const localDevConfig = ({
uniacid: 1,
domain: 'https://test.aigc-quickapp.com',
},
-})['2285']; // 选择要使用的环境配置
+})['2724']; // 选择要使用的环境配置
export default localDevConfig;
\ No newline at end of file
diff --git a/common/js/config-external.js b/common/js/config-external.js
index 555a704..26cc8f1 100644
--- a/common/js/config-external.js
+++ b/common/js/config-external.js
@@ -110,7 +110,8 @@ class ConfigExternal {
try {
// 动态加载主题配置
- const themeData = require(`@/common/js/style_color.js`)[theme];
+ const themeData = require(`@/common/js/style_color.js`)['default'][theme];
+ console.log('sync themeData => ', themeData);
this.loadedConfigs[`theme_${theme}`] = themeData;
return themeData;
} catch (error) {
@@ -136,7 +137,8 @@ class ConfigExternal {
this.loadPromises[`theme_${theme}`] = new Promise((resolve, reject) => {
try {
// 动态加载主题配置
- const themeData = require(`@/common/js/style_color.js`)[theme];
+ const themeData = require(`@/common/js/style_color.js`)['default'][theme];
+ console.log('async themeData => ', themeData);
this.loadedConfigs[`theme_${theme}`] = themeData;
resolve(themeData);
} catch (error) {
diff --git a/common/js/diy.js b/common/js/diy.js
index 3adc343..539e0fc 100644
--- a/common/js/diy.js
+++ b/common/js/diy.js
@@ -111,8 +111,9 @@ export default {
}
},
- async onShow() {
- await this.init();
+ onShow() {
+
+ this.init();
},
onHide() {
if (this.storeTimeOut) {
diff --git a/common/js/goods_detail_base.js b/common/js/goods_detail_base.js
index c04b212..2fe192a 100644
--- a/common/js/goods_detail_base.js
+++ b/common/js/goods_detail_base.js
@@ -1,5 +1,5 @@
// 商品详情业务
-import htmlParser from '@/common/js/html-parser.js';
+import htmlParser from '@/common/js/html-parser';
export default {
data() {
diff --git a/common/js/util.js b/common/js/util.js
index 9beac5c..2874026 100644
--- a/common/js/util.js
+++ b/common/js/util.js
@@ -35,7 +35,7 @@ export const adaptSubpackageUrl = (url) => {
'/pages/goods/': '/pages_goods/',
'/pages/contact/': '/pages_tool/contact/',
'/pages/member/': '/pages_tool/member/',
- '/pages/vr': '/pages_tool/vr/',
+ '/pages/vr': '/pages_tool/vr/'
};
// 构建正则表达式
@@ -58,106 +58,7 @@ export const adaptSubpackageUrl = (url) => {
});
}
- const currentUrl = replacePrefix(url);
-
- // 分包子包导致的路径变化,需要根据前后关系修复
- const subPackagesMap = {
- // pages_order 基础功能子包
- '/pages_order/list': '/pages_order/base/list',
- '/pages_order/payment': '/pages_order/base/payment',
-
- // pages_order 详情功能子包
- '/pages_order/detail': '/pages_order/detail/detail',
- '/pages_order/detail_local_delivery': '/pages_order/detail/detail_local_delivery',
- '/pages_order/detail_pickup': '/pages_order/detail/detail_pickup',
- '/pages_order/detail_point': '/pages_order/detail/detail_point',
-
- // pages_promotion/fenxiao/core 基础功能子包
- '/pages_promotion/fenxiao/core/index': '/pages_promotion/fenxiao/core/base/index',
- '/pages_promotion/fenxiao/core/apply': '/pages_promotion/fenxiao/core/base/apply',
- '/pages_promotion/fenxiao/core/level': '/pages_promotion/fenxiao/core/base/level',
-
- // pages_promotion/fenxiao/core 推广功能子包
- '/pages_promotion/fenxiao/core/promote': '/pages_promotion/fenxiao/core/promote/promote',
- '/pages_promotion/fenxiao/core/promote_code': '/pages_promotion/fenxiao/core/promote/promote_code',
- '/pages_promotion/fenxiao/core/goods_list': '/pages_promotion/fenxiao/core/promote/goods_list',
-
- // pages_promotion/point 基础功能子包
- '/pages_promotion/point/list': '/pages_promotion/point/base/list',
- '/pages_promotion/point/goods_list': '/pages_promotion/point/base/goods_list',
-
- // pages_promotion/point 详情功能子包
- '/pages_promotion/point/detail': '/pages_promotion/point/detail/detail',
- '/pages_promotion/point/order_list': '/pages_promotion/point/detail/order_list',
- '/pages_promotion/point/payment': '/pages_promotion/point/detail/payment',
- '/pages_promotion/point/result': '/pages_promotion/point/detail/result',
-
- // basic子包
- '/pages_tool/member/index': '/pages_tool/member/basic/index',
- '/pages_tool/member/info': '/pages_tool/member/basic/info',
- '/pages_tool/member/info_edit': '/pages_tool/member/basic/info_edit',
- '/pages_tool/member/account': '/pages_tool/member/basic/account',
- '/pages_tool/member/account_edit': '/pages_tool/member/basic/account_edit',
- '/pages_tool/member/modify_face': '/pages_tool/member/basic/modify_face',
-
- // address子包
- '/pages_tool/member/address': '/pages_tool/member/address/address',
- '/pages_tool/member/address_edit': '/pages_tool/member/address/address_edit',
-
- // finance子包 - 基础账户和积分相关
- '/pages_tool/member/balance': '/pages_tool/member/finance/account/balance',
- '/pages_tool/member/balance_detail': '/pages_tool/member/finance/account/balance_detail',
- '/pages_tool/member/point': '/pages_tool/member/finance/account/point',
- '/pages_tool/member/point_detail': '/pages_tool/member/finance/account/point_detail',
- '/pages_tool/member/pay_password': '/pages_tool/member/finance/account/pay_password',
-
- // finance子包 - 提现和储值卡相关
- '/pages_tool/member/card': '/pages_tool/member/finance/transaction/card',
- '/pages_tool/member/card_buy': '/pages_tool/member/finance/transaction/card_buy',
- '/pages_tool/member/card_agreement': '/pages_tool/member/finance/transaction/card_agreement',
- '/pages_tool/member/apply_withdrawal': '/pages_tool/member/finance/transaction/apply_withdrawal',
- '/pages_tool/member/withdrawal': '/pages_tool/member/finance/transaction/withdrawal',
- '/pages_tool/member/withdrawal_detail': '/pages_tool/member/finance/transaction/withdrawal_detail',
-
- // finance子包路径映射(从旧的finance子包路径到新的account和transaction子子包路径)
- '/pages_tool/member/finance/balance': '/pages_tool/member/finance/account/balance',
- '/pages_tool/member/finance/balance_detail': '/pages_tool/member/finance/account/balance_detail',
- '/pages_tool/member/finance/point': '/pages_tool/member/finance/account/point',
- '/pages_tool/member/finance/point_detail': '/pages_tool/member/finance/account/point_detail',
- '/pages_tool/member/finance/pay_password': '/pages_tool/member/finance/account/pay_password',
-
- '/pages_tool/member/finance/card': '/pages_tool/member/finance/transaction/card',
- '/pages_tool/member/finance/card_buy': '/pages_tool/member/finance/transaction/card_buy',
- '/pages_tool/member/finance/card_agreement': '/pages_tool/member/finance/transaction/card_agreement',
- '/pages_tool/member/finance/apply_withdrawal': '/pages_tool/member/finance/transaction/apply_withdrawal',
- '/pages_tool/member/finance/withdrawal': '/pages_tool/member/finance/transaction/withdrawal',
- '/pages_tool/member/finance/withdrawal_detail': '/pages_tool/member/finance/transaction/withdrawal_detail',
-
- // rights子包
- '/pages_tool/member/coupon': '/pages_tool/member/rights/coupon',
- '/pages_tool/member/level': '/pages_tool/member/rights/level',
- '/pages_tool/member/level_growth_rules': '/pages_tool/member/rights/level_growth_rules',
- '/pages_tool/member/invite_friends': '/pages_tool/member/rights/invite_friends',
-
- // other子包
- '/pages_tool/member/signin': '/pages_tool/member/other/signin',
- '/pages_tool/member/collection': '/pages_tool/member/other/collection',
- '/pages_tool/member/footprint': '/pages_tool/member/other/footprint',
- '/pages_tool/member/assets': '/pages_tool/member/other/assets',
- '/pages_tool/member/cancellation': '/pages_tool/member/other/cancellation',
- '/pages_tool/member/cancelstatus': '/pages_tool/member/other/cancelstatus',
- '/pages_tool/member/cancelsuccess': '/pages_tool/member/other/cancelsuccess',
- '/pages_tool/member/cancelrefuse': '/pages_tool/member/other/cancelrefuse',
- '/pages_tool/member/contact': '/pages_tool/member/other/contact'
- }
-
-
- // 修复url
- if (subPackagesMap[currentUrl]) {
- return subPackagesMap[currentUrl];
- }
-
- return currentUrl;
+ return replacePrefix(url);
}
/**
diff --git a/components-diy/diy-category-item.vue b/components-diy/diy-category-item.vue
index 54e5611..4e4cd06 100644
--- a/components-diy/diy-category-item.vue
+++ b/components-diy/diy-category-item.vue
@@ -293,9 +293,6 @@ export default {
default: false
}
},
- components: {
- loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
- },
mixins: [DiyMinx],
data() {
return {
diff --git a/components-diy/diy-category.vue b/components-diy/diy-category.vue
index 16df131..f907f50 100644
--- a/components-diy/diy-category.vue
+++ b/components-diy/diy-category.vue
@@ -161,13 +161,14 @@ let menuButtonInfo = {};
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
// #endif
+import nsGoodsSkuCategory from '@/components/ns-goods-sku/ns-goods-sku-category.vue';
import DiyMinx from './minx.js'
var contentWrapHeight, query, cartPosition;
// 商品分类
export default {
- components: {
- nsGoodsSkuCategory: () => import('@/components/ns-goods-sku/ns-goods-sku-category.vue'),
+ components: {
+ nsGoodsSkuCategory
},
name: 'diy-category',
props: {
@@ -462,7 +463,7 @@ export default {
cart_ids: this.cartIds.toString()
},
success: () => {
- this.$util.redirectTo('/pages_order/base/payment');
+ this.$util.redirectTo('/pages_order/payment');
this.isSub = false;
}
});
diff --git a/components-diy/diy-coupon.vue b/components-diy/diy-coupon.vue
index eae716a..52d0b86 100644
--- a/components-diy/diy-coupon.vue
+++ b/components-diy/diy-coupon.vue
@@ -303,9 +303,6 @@ export default {
}
}
},
- components: {
- nsLogin: () => import('@/components/ns-login/ns-login.vue'),
- },
mixins: [DiyMinx],
data() {
return {
diff --git a/components-diy/diy-digit.vue b/components-diy/diy-digit.vue
index 91eacc7..4a51a91 100644
--- a/components-diy/diy-digit.vue
+++ b/components-diy/diy-digit.vue
@@ -1,4 +1,4 @@
-
+
@@ -38,13 +38,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/components/ns-adv/ns-adv.vue b/components/ns-adv/ns-adv.vue
index 978f3bd..0d44df7 100644
--- a/components/ns-adv/ns-adv.vue
+++ b/components/ns-adv/ns-adv.vue
@@ -1,120 +1,120 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/components/ns-birthday-gift/ns-birthday-gift.vue b/components/ns-birthday-gift/ns-birthday-gift.vue
index e3cd63b..e34abb7 100644
--- a/components/ns-birthday-gift/ns-birthday-gift.vue
+++ b/components/ns-birthday-gift/ns-birthday-gift.vue
@@ -80,12 +80,13 @@
-
\ No newline at end of file
diff --git a/components/ns-form/ns-form.vue b/components/ns-form/ns-form.vue
index 4ff72b0..452c8df 100644
--- a/components/ns-form/ns-form.vue
+++ b/components/ns-form/ns-form.vue
@@ -200,10 +200,11 @@
-
-
\ No newline at end of file
diff --git a/components/ns-goods-action-icon/ns-goods-action-icon.vue b/components/ns-goods-action-icon/ns-goods-action-icon.vue
index c4ea7d3..f958edd 100644
--- a/components/ns-goods-action-icon/ns-goods-action-icon.vue
+++ b/components/ns-goods-action-icon/ns-goods-action-icon.vue
@@ -20,6 +20,7 @@
-
-
-
-
\ No newline at end of file
diff --git a/pages_goods/category.vue b/pages_goods/category.vue
index 98a0413..57902b4 100644
--- a/pages_goods/category.vue
+++ b/pages_goods/category.vue
@@ -25,13 +25,17 @@
@@ -594,12 +570,12 @@ export default {
position: relative;
z-index: 999;
}
+
-
\ No newline at end of file
diff --git a/pages_goods/public/js/cart.js b/pages_goods/public/js/cart.js
index 04001a3..5c2f9ab 100644
--- a/pages_goods/public/js/cart.js
+++ b/pages_goods/public/js/cart.js
@@ -367,7 +367,7 @@ export default {
cart_ids: cart_ids.toString()
},
success: () => {
- this.$util.redirectTo('/pages_order/base/payment');
+ this.$util.redirectTo('/pages_order/payment');
this.isSub = false;
}
});
diff --git a/pages_order/detail/detail.vue b/pages_order/detail.vue
similarity index 73%
rename from pages_order/detail/detail.vue
rename to pages_order/detail.vue
index 9e896f7..659d78b 100644
--- a/pages_order/detail/detail.vue
+++ b/pages_order/detail.vue
@@ -1,8 +1,7 @@
-
+
@@ -65,9 +64,9 @@
{{ orderData.delivery_store_name }}
@@ -109,11 +108,8 @@
复制
-
-
+
+
@@ -125,8 +121,7 @@
-
+
{{ goodsItem.sku_name }}
@@ -134,18 +129,16 @@
{{ x.spec_value_name }}
- {{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }}
+ {{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }}
+
{{ $lang('common.currencySymbol') }}
- {{
- parseFloat(goodsItem.price).toFixed(2).split('.')[0]
- }}
- .{{
- parseFloat(goodsItem.price).toFixed(2).split('.')[1] }}
+ {{ parseFloat(goodsItem.price).toFixed(2).split('.')[0] }}
+ .{{ parseFloat(goodsItem.price).toFixed(2).split('.')[1] }}
@@ -159,10 +152,8 @@
次卡抵扣
-{{ $lang('common.currencySymbol') }}
- {{
- parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[0] }}
- .{{
- parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[1] }}
+ {{ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[0] }}
+ .{{ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[1] }}
@@ -173,8 +164,7 @@
{{ item.value.title }}:
-
+
@@ -186,15 +176,13 @@
-
+
{{ orderData.order_status == 10 ? '申请售后' : '申请退款' }}
-
+
{{ orderData.order_status == 10 ? '查看售后' : '查看退款' }}
@@ -327,12 +315,11 @@
我的卡包:
- 查看
+ 查看
-
-
+
@@ -633,218 +608,216 @@
\ No newline at end of file
diff --git a/pages_order/detail/detail_local_delivery.vue b/pages_order/detail_local_delivery.vue
similarity index 57%
rename from pages_order/detail/detail_local_delivery.vue
rename to pages_order/detail_local_delivery.vue
index c5f3987..ff0c6d3 100644
--- a/pages_order/detail/detail_local_delivery.vue
+++ b/pages_order/detail_local_delivery.vue
@@ -6,15 +6,12 @@
\ No newline at end of file
diff --git a/pages_order/base/list.vue b/pages_order/list.vue
similarity index 95%
rename from pages_order/base/list.vue
rename to pages_order/list.vue
index 779cdc3..0d45196 100644
--- a/pages_order/base/list.vue
+++ b/pages_order/list.vue
@@ -165,15 +165,20 @@
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/core/base/apply.vue b/pages_promotion/fenxiao/apply.vue
similarity index 94%
rename from pages_promotion/fenxiao/core/base/apply.vue
rename to pages_promotion/fenxiao/apply.vue
index d2d7d54..c8eae81 100644
--- a/pages_promotion/fenxiao/core/base/apply.vue
+++ b/pages_promotion/fenxiao/apply.vue
@@ -152,14 +152,11 @@
-
-
-
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/core/promote/promote_code.vue b/pages_promotion/fenxiao/core/promote/promote_code.vue
deleted file mode 100644
index 637f0a9..0000000
--- a/pages_promotion/fenxiao/core/promote/promote_code.vue
+++ /dev/null
@@ -1,314 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 长按识别图中二维码
-
-
-
- 保存海报
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/core/promote/goods_list.vue b/pages_promotion/fenxiao/goods_list.vue
similarity index 89%
rename from pages_promotion/fenxiao/core/promote/goods_list.vue
rename to pages_promotion/fenxiao/goods_list.vue
index 09ecec6..ef3f20c 100644
--- a/pages_promotion/fenxiao/core/promote/goods_list.vue
+++ b/pages_promotion/fenxiao/goods_list.vue
@@ -2,28 +2,28 @@
-
+
- 全部
- 全部
+
+ @click="changeCategory(item.category_id)"
+ >
{{ item.category_name }}
-
+
-
+
@@ -132,18 +132,24 @@
@@ -159,10 +165,8 @@ export default {
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important;
}
-
.quick-nav {
margin-bottom: 20rpx;
-
.quick-nav-item {
display: flex;
align-items: center;
@@ -186,7 +190,6 @@ export default {
}
}
}
-
.content {
overflow: hidden;
padding: 0 30rpx 160rpx;
@@ -199,14 +202,12 @@ export default {
background-size: 100%;
background-repeat: no-repeat;
box-sizing: border-box;
-
.goods-item {
margin-bottom: 20rpx;
background: #ffffff;
padding: $padding;
display: flex;
border-radius: 10rpx;
-
&:last-child {
margin-bottom: 0;
}
@@ -220,7 +221,6 @@ export default {
border-radius: 10rpx;
overflow: hidden;
flex-shrink: 0;
-
image {
width: 100%;
height: 100%;
@@ -241,7 +241,6 @@ export default {
.goods-name {
width: 100%;
line-height: 1.3;
-
.name {
line-height: 1.3;
word-break: break-all;
@@ -251,12 +250,10 @@ export default {
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
-
.label-list {
display: flex;
align-items: center;
margin-top: 6rpx;
-
.label-item {
padding: 4rpx 10rpx;
font-size: $font-size-tag;
@@ -288,7 +285,6 @@ export default {
padding: 0 $padding;
border-radius: 50rpx;
border: 2rpx solid $base-color;
-
text {
color: $base-color;
border-radius: 40rpx;
@@ -303,7 +299,6 @@ export default {
}
}
}
-
.active-btn {
position: fixed;
bottom: 40rpx;
@@ -317,12 +312,10 @@ export default {
border-radius: 50rpx;
background-color: $base-color;
color: #fff;
-
.btn {
flex: 1;
text-align: center;
}
-
.share-btn {
margin: 0;
padding: 0;
@@ -362,7 +355,6 @@ export default {
border: none;
line-height: 1;
height: auto;
-
text {
margin-top: 20rpx;
font-size: $font-size-tag;
@@ -375,7 +367,6 @@ export default {
font-size: 80rpx;
line-height: initial;
}
-
.icon-fuzhilianjie,
.icon-pengyouquan,
.icon-haowuquan,
@@ -392,48 +383,39 @@ export default {
text-align: center;
}
}
-
.poster-layer {
.generate-poster {
padding: 40rpx 0;
-
.iconfont {
font-size: 80rpx;
color: #07c160;
line-height: initial;
}
-
- >view {
+ > view {
text-align: center;
-
&:last-child {
margin-top: 20rpx;
}
}
}
-
.image-wrap {
width: 64%;
height: 854rpx;
margin: 60rpx auto 40rpx auto;
box-shadow: 0 0 32rpx rgba(100, 100, 100, 0.3);
-
image {
width: 480rpx;
height: 854rpx;
}
}
-
.msg {
padding: 40rpx;
}
-
.save {
text-align: center;
height: 80rpx;
line-height: 80rpx;
}
-
.close {
position: absolute;
top: 0;
diff --git a/pages_promotion/fenxiao/core/base/index.vue b/pages_promotion/fenxiao/index.vue
similarity index 92%
rename from pages_promotion/fenxiao/core/base/index.vue
rename to pages_promotion/fenxiao/index.vue
index df7f728..dc128d6 100644
--- a/pages_promotion/fenxiao/core/base/index.vue
+++ b/pages_promotion/fenxiao/index.vue
@@ -261,25 +261,11 @@
+
+
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/order/order.vue b/pages_promotion/fenxiao/order.vue
similarity index 63%
rename from pages_promotion/fenxiao/order/order.vue
rename to pages_promotion/fenxiao/order.vue
index efb6747..36e0a17 100644
--- a/pages_promotion/fenxiao/order/order.vue
+++ b/pages_promotion/fenxiao/order.vue
@@ -2,51 +2,40 @@
- {{ item.name }}
-
+ {{ item.name }}
-
+
-
+
{{ orderItem.sku_name }}
返{{ fenxiaoWords.account }}
- {{
- $lang('common.currencySymbol') }}
- {{
- parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}
- .{{
- parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}
+ {{ $lang('common.currencySymbol') }}
+ {{ parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}
+ .{{ parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}
- {{ $lang('common.currencySymbol')
- }}
- {{
- parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
- .{{
- parseFloat(orderItem.price).toFixed(2).split(".")[1] }}
+ {{ $lang('common.currencySymbol') }}
+ {{ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
+ .{{ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}
@@ -68,24 +57,18 @@
合计:
{{ $lang('common.currencySymbol') }}
- {{
- parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}
- .{{
- parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[1] }}
+ {{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}
+ .{{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[1] }}
-
-
-
-
+
+
+
+
@@ -96,16 +79,22 @@
diff --git a/pages_promotion/fenxiao/order/order_detail.vue b/pages_promotion/fenxiao/order_detail.vue
similarity index 86%
rename from pages_promotion/fenxiao/order/order_detail.vue
rename to pages_promotion/fenxiao/order_detail.vue
index eb2267a..4158687 100644
--- a/pages_promotion/fenxiao/order/order_detail.vue
+++ b/pages_promotion/fenxiao/order_detail.vue
@@ -12,20 +12,15 @@
-
-
-
+
{{ orderData.sku_name }}
¥
- {{
- parseFloat(orderData.price).toFixed(2).split(".")[0] }}
- .{{
- parseFloat(orderData.price).toFixed(2).split(".")[1] }}
+ {{ parseFloat(orderData.price).toFixed(2).split(".")[0] }}
+ .{{ parseFloat(orderData.price).toFixed(2).split(".")[1] }}
@@ -66,10 +61,9 @@
¥
{{ parseFloat(orderData.commission).toFixed(2).split(".")[0] }}
- .{{
- parseFloat(orderData.commission).toFixed(2).split(".")[1] }}
+ .{{ parseFloat(orderData.commission).toFixed(2).split(".")[1] }}
-
+
@@ -82,10 +76,6 @@
+
+
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/ranking_list.vue b/pages_promotion/fenxiao/ranking_list.vue
new file mode 100644
index 0000000..6a134eb
--- /dev/null
+++ b/pages_promotion/fenxiao/ranking_list.vue
@@ -0,0 +1,433 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{info.nickname}}
+
+ 点击提现
+ 我的团队
+
+
+
+
+
+
+
+
+
+
+
+ 分销佣金
+ {{ info.today_commission}}元
+
+
+
+
+
+
+
+
+
+ 佣金排行
+ 您排行第{{ ranking }}名
+
+
+
+
+
+
+
+
+
+
+
+ 推广人数
+ {{ info.one_child_num}}人
+
+
+
+
+
+
+
+
+
+ 推广排行
+ 您排行第{{ ranking }}名
+
+
+
+
+
+ 佣金排行
+ 推广排行
+
+
+
+ {{ index + 1 }}
+
+
+
+
+ {{ item.nickname }}
+
+
+ ¥{{ item.total_commission|moneyFormat }}
+ {{ item.child_num }}人
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/fenxiao/relation/relation.vue b/pages_promotion/fenxiao/relation.vue
similarity index 88%
rename from pages_promotion/fenxiao/relation/relation.vue
rename to pages_promotion/fenxiao/relation.vue
index b51e94e..36927b5 100644
--- a/pages_promotion/fenxiao/relation/relation.vue
+++ b/pages_promotion/fenxiao/relation.vue
@@ -72,16 +72,23 @@
diff --git a/pages_promotion/fenxiao/relation/team.vue b/pages_promotion/fenxiao/team.vue
similarity index 91%
rename from pages_promotion/fenxiao/relation/team.vue
rename to pages_promotion/fenxiao/team.vue
index 069ee50..87d9a47 100644
--- a/pages_promotion/fenxiao/relation/team.vue
+++ b/pages_promotion/fenxiao/team.vue
@@ -83,15 +83,22 @@
-
\ No newline at end of file
diff --git a/pages_promotion/merch/merchcategory.vue b/pages_promotion/merch/merchcategory.vue
index e016d17..91180a8 100644
--- a/pages_promotion/merch/merchcategory.vue
+++ b/pages_promotion/merch/merchcategory.vue
@@ -61,10 +61,7 @@
-
-
-
diff --git a/pages_promotion/point/base/list.vue b/pages_promotion/point/base/list.vue
deleted file mode 100644
index d3ba7e9..0000000
--- a/pages_promotion/point/base/list.vue
+++ /dev/null
@@ -1,617 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- 搜索商品
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 我的积分
-
-
- {{ point }}
- 积分
-
-
-
-
-
-
-
-
-
-
-
- 储值{{ parseFloat(item.buy_price) }}元
- 可得{{ item.point }}积分
- 去储值
-
-
-
-
-
-
-
- 积分换券
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ¥
- {{ parseFloat(couponItem.money) }}
-
-
-
- {{ parseFloat(couponItem.discount) }}折
-
-
-
-
-
- {{ couponItem.at_least == 0 ? '无门槛优惠券' : '满' +
- parseFloat(couponItem.at_least).toFixed(0) + '可用' }}
-
- 全场券
-
- 指定券
-
-
-
- {{ couponItem.point }}积分
- 兑换
-
-
-
-
-
-
-
-
-
-
-
- 积分换红包
-
-
-
-
-
-
-
-
-
-
-
-
- ¥
- {{ parseFloat(hongbaoItem.balance).toFixed(0) }}
-
-
-
-
- {{ hongbaoItem.point }}积分
- 兑换
-
-
-
-
-
-
-
-
-
-
- 积分换礼品
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
- {{ item.point }}
- 积分
-
-
- +
-
- {{
- parseFloat(item.price).toFixed(2).split(".")[0] }}
- .{{
- parseFloat(item.price).toFixed(2).split(".")[1] }}元
-
-
-
- 兑换
-
-
-
- 库存:{{ isNaN(parseInt(item.stock)) ? 0 : parseInt(item.stock) }}
-
- 已兑:{{ isNaN(parseInt(item.sale_num)) ? 0 : parseInt(item.sale_num) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ isEnEnv ? 'Integral Description' : '积分说明' }}
-
-
-
-
- {{ isEnEnv ? 'Integral Acquisition' : '积分的获取' }}
- 1、积分可在注册、签到、分享、消费、充值时获得。
- 2、在购买部分商品时可获得积分。
- {{ isEnEnv ? 'Integral Use' : '积分的使用' }}
- 1、积分可用于兑换积分中心的商品。
- 2、积分可在参与某些活动时使用。
- 3、积分不得转让,出售,不设有效期。
- {{ isEnEnv ? 'Integral Query' : '积分的查询' }}
- 1、积分可在会员中心中查询具体数额以及明细。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_promotion/point/detail/detail.vue b/pages_promotion/point/detail.vue
similarity index 92%
rename from pages_promotion/point/detail/detail.vue
rename to pages_promotion/point/detail.vue
index b992616..5dfd5ad 100644
--- a/pages_promotion/point/detail/detail.vue
+++ b/pages_promotion/point/detail.vue
@@ -195,23 +195,18 @@
-
-
diff --git a/pages_promotion/point/detail/result.vue b/pages_promotion/point/detail/result.vue
deleted file mode 100644
index 62c7f14..0000000
--- a/pages_promotion/point/detail/result.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
- {{ $lang('exchangeSuccess') }}
-
- {{ $lang('see') }}
- {{ $lang('goHome') }}
-
-
-
-
-
-
-
diff --git a/pages_promotion/point/goods_list.vue b/pages_promotion/point/goods_list.vue
new file mode 100644
index 0000000..fa3ce71
--- /dev/null
+++ b/pages_promotion/point/goods_list.vue
@@ -0,0 +1,907 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ isEnEnv ? 'Comprehensive' : '综合' }}
+
+
+ {{ isEnEnv ? 'Points' : '积分' }}
+
+
+
+
+
+
+ {{ isEnEnv ? 'New Arrival' : '上新时间' }}
+
+
+
+
+
+
+ {{ isEnEnv ? 'Filter' : '筛选' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ isEnEnv ? item.en_goods_name : item.goods_name }}
+
+
+
+ {{ item.point }}
+ {{ isEnEnv ? 'Points' : '积分' }}
+
+ +
+ {{ $lang('common.currencySymbol') }}
+ {{ parseFloat(item.price).toFixed(2).split(".")[0] }}
+ .{{ parseFloat(item.price).toFixed(2).split(".")[1] }}
+
+
+
+
+ {{ isEnEnv ? 'Stock ' : '库存' }}{{ item.stock }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ isEnEnv ? 'Filter' : '筛选' }}
+
+
+
+ {{ isEnEnv ? 'Point Range' : '积分区间' }}
+
+
+
+
+
+
+
+
+ {{ isEnEnv ? 'All Categories' : '全部分类' }}
+
+ {{ isEnEnv ? 'All' : '全部' }}
+
+ {{ item.category_name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/point/list.vue b/pages_promotion/point/list.vue
new file mode 100644
index 0000000..c1331b1
--- /dev/null
+++ b/pages_promotion/point/list.vue
@@ -0,0 +1,593 @@
+
+
+
+
+
+
+
+
+
+
+ 搜索商品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 我的积分
+
+
+ {{point}}
+ 积分
+
+
+
+
+
+
+
+
+
+
+
+ 储值{{ parseFloat(item.buy_price) }}元
+ 可得{{ item.point }}积分
+ 去储值
+
+
+
+
+
+
+
+ 积分换券
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ¥
+ {{ parseFloat(couponItem.money) }}
+
+
+
+ {{ parseFloat(couponItem.discount) }}折
+
+
+
+
+
+ {{ couponItem.at_least == 0 ? '无门槛优惠券' : '满' + parseFloat(couponItem.at_least).toFixed(0) + '可用' }}
+
+ 全场券
+ 指定券
+
+
+
+ {{ couponItem.point }}积分
+ 兑换
+
+
+
+
+
+
+
+
+
+
+
+ 积分换红包
+
+
+
+
+
+
+
+
+
+
+
+
+ ¥
+ {{ parseFloat(hongbaoItem.balance).toFixed(0) }}
+
+
+
+
+ {{ hongbaoItem.point }}积分
+ 兑换
+
+
+
+
+
+
+
+
+
+
+ 积分换礼品
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+ {{ item.point }}
+ 积分
+
+
+ +
+
+ {{ parseFloat(item.price).toFixed(2).split(".")[0] }}
+ .{{ parseFloat(item.price).toFixed(2).split(".")[1] }}元
+
+
+
+ 兑换
+
+
+
+ 库存:{{ isNaN(parseInt(item.stock)) ? 0 : parseInt(item.stock) }}
+
+ 已兑:{{ isNaN(parseInt(item.sale_num)) ? 0 : parseInt(item.sale_num) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ isEnEnv ? 'Integral Description' : '积分说明'}}
+
+
+
+
+ {{ isEnEnv ? 'Integral Acquisition' : '积分的获取'}}
+ 1、积分可在注册、签到、分享、消费、充值时获得。
+ 2、在购买部分商品时可获得积分。
+ {{ isEnEnv ? 'Integral Use' : '积分的使用'}}
+ 1、积分可用于兑换积分中心的商品。
+ 2、积分可在参与某些活动时使用。
+ 3、积分不得转让,出售,不设有效期。
+ {{ isEnEnv ? 'Integral Query' : '积分的查询'}}
+ 1、积分可在会员中心中查询具体数额以及明细。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_promotion/point/order_list.vue b/pages_promotion/point/order_list.vue
new file mode 100644
index 0000000..66b6a83
--- /dev/null
+++ b/pages_promotion/point/order_list.vue
@@ -0,0 +1,591 @@
+
+
+
+
+
+ {{ statusItem.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ orderItem.exchange_name }}
+
+
+ {{ orderItem.point }}
+ 积分
+
+ +
+ {{ $lang('common.currencySymbol') }}
+ {{ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
+ .{{ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}
+
+
+
+
+ {{ orderItem.num }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages_promotion/point/detail/payment.vue b/pages_promotion/point/payment.vue
similarity index 63%
rename from pages_promotion/point/detail/payment.vue
rename to pages_promotion/point/payment.vue
index 4f43bc1..155cf6f 100644
--- a/pages_promotion/point/detail/payment.vue
+++ b/pages_promotion/point/payment.vue
@@ -2,9 +2,9 @@
+ 'padding-top': menuButtonBounding.top + 'px',
+ height: menuButtonBounding.height + 'px'
+ }">
确认订单
@@ -18,12 +18,11 @@
-
+
{{ deliveryItem.title }}
@@ -32,12 +31,10 @@
-
-
+
由 {{ storeInfo.currStore.store_name }} 提供配送
@@ -52,19 +49,14 @@
-
+
- {{ orderCreateData.member_address.name ?
- orderCreateData.member_address.name : '' }}
- {{ orderCreateData.member_address.mobile ?
- orderCreateData.member_address.mobile : '' }}
+ {{ orderCreateData.member_address.name ? orderCreateData.member_address.name : '' }}
+ {{ orderCreateData.member_address.mobile ? orderCreateData.member_address.mobile : '' }}
- {{ orderCreateData.member_address.full_address ?
- orderCreateData.member_address.full_address : '' }}
- {{ orderCreateData.member_address.address ? orderCreateData.member_address.address : ''
- }}
+ {{ orderCreateData.member_address.full_address ? orderCreateData.member_address.full_address : '' }}
+ {{ orderCreateData.member_address.address ? orderCreateData.member_address.address : '' }}
@@ -77,14 +69,11 @@
-
+
送达时间
- {{
- orderCreateData.buyer_ask_delivery_title ?
- orderCreateData.buyer_ask_delivery_title : '请选择送达时间' }}
+ {{ orderCreateData.buyer_ask_delivery_title ? orderCreateData.buyer_ask_delivery_title : '请选择送达时间' }}
@@ -93,9 +82,7 @@
-
+
@@ -117,22 +104,20 @@
姓名
-
+
预留手机
+ placeholder-class="color-tip placeholder" class="input" v-model="member_address.mobile" />
自提时间
- {{ orderCreateData.buyer_ask_delivery_title }}
+ {{orderCreateData.buyer_ask_delivery_title}}
@@ -152,35 +137,27 @@
手机号码
-
+
-
+
-
+
-
+
-
+
@@ -205,8 +182,7 @@
@@ -220,8 +196,7 @@
积分
-
+
运费
{{ $lang('common.currencySymbol') }}
@@ -231,9 +206,8 @@
-
- {{ orderPaymentData.delivery.error_msg }}
+
+ {{orderPaymentData.delivery.error_msg}}
@@ -247,14 +221,12 @@
-
+
@@ -269,29 +241,22 @@
-
+
-
+
{{ item.store_name }}
({{ item.distance }}km)
-
+
营业时间:{{ item.open_date }}
-
+
地址:{{ item.full_address }}{{ item.address }}
-
+
所选择收货地址附近没有可以自提的门店
@@ -302,8 +267,7 @@
-
+
@@ -313,41 +277,48 @@
\ No newline at end of file
diff --git a/pages_promotion/point/result.vue b/pages_promotion/point/result.vue
new file mode 100644
index 0000000..ce14ea8
--- /dev/null
+++ b/pages_promotion/point/result.vue
@@ -0,0 +1,92 @@
+
+
+
+
+
+ {{ $lang('exchangeSuccess') }}
+
+ {{ $lang('see') }}
+ {{ $lang('goHome') }}
+
+
+
+
+
+
+
diff --git a/pages_tool/agreement/contenr.vue b/pages_tool/agreement/contenr.vue
index 581f70b..7dfcaa9 100644
--- a/pages_tool/agreement/contenr.vue
+++ b/pages_tool/agreement/contenr.vue
@@ -5,48 +5,50 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages_tool/article/detail.vue b/pages_tool/article/detail.vue
index 7b39f90..d2c7c25 100644
--- a/pages_tool/article/detail.vue
+++ b/pages_tool/article/detail.vue
@@ -25,140 +25,134 @@
\ No newline at end of file
diff --git a/pages_tool/article/list.vue b/pages_tool/article/list.vue
index 967fcfa..bcbbb96 100644
--- a/pages_tool/article/list.vue
+++ b/pages_tool/article/list.vue
@@ -6,8 +6,7 @@
-
+
{{ item.article_title }}
@@ -34,195 +33,203 @@
\ No newline at end of file
diff --git a/pages_tool/cases/index.vue b/pages_tool/cases/index.vue
index 7b52aac..50303ad 100644
--- a/pages_tool/cases/index.vue
+++ b/pages_tool/cases/index.vue
@@ -1,5 +1,5 @@
-
+
@@ -8,9 +8,7 @@
-
+
@@ -19,16 +17,16 @@
- {{ item.$orig.title }}
- {{ item.$orig.desc }}
- {{ "完成时间:" + item.g3 }}
+ {{item.$orig.title}}
+ {{item.$orig.desc}}
+ {{"完成时间:" + item.g3}}
- {{ item.$orig.files_title }}
+ {{item.$orig.files_title}}
查看PDF文件
@@ -61,15 +59,13 @@
联系方式
-
+
留言内容
-
+
@@ -81,11 +77,9 @@
-
+
-
+
@@ -94,9 +88,6 @@
+
+
\ No newline at end of file
diff --git a/components/ns-chat/ns-chat-goods.vue b/pages_tool/components/ns-chat/ns-chat-goods.vue
similarity index 100%
rename from components/ns-chat/ns-chat-goods.vue
rename to pages_tool/components/ns-chat/ns-chat-goods.vue
diff --git a/components/ns-chat/ns-chat-order.vue b/pages_tool/components/ns-chat/ns-chat-order.vue
similarity index 96%
rename from components/ns-chat/ns-chat-order.vue
rename to pages_tool/components/ns-chat/ns-chat-order.vue
index d78afec..334c9fd 100644
--- a/components/ns-chat/ns-chat-order.vue
+++ b/pages_tool/components/ns-chat/ns-chat-order.vue
@@ -1,149 +1,149 @@
-
-
-
-
-
- {{ orderdetails.order_goods ? orderdetails.order_goods[0].sku_name : '' }}
- 订单状态:{{ orderdetails.order_status_name }}
- 配送方式:{{ orderdetails.delivery_type_name }}
-
-
- ¥
- {{ orderdetails.order_goods ? orderdetails.order_goods[0].price : '' }}
-
- 发送
-
-
-
-
-
-
- {{ orderInfo.order_goods ? orderInfo.order_goods[0].sku_name : '' }}
- 订单状态:{{ orderInfo.order_status_name }}
- 配送方式:{{ orderInfo.delivery_type_name }}
-
-
- ¥
- {{ orderInfo.order_goods ? orderInfo.order_goods[0].price : '' }}
-
- 已发送
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ orderdetails.order_goods ? orderdetails.order_goods[0].sku_name : '' }}
+ 订单状态:{{ orderdetails.order_status_name }}
+ 配送方式:{{ orderdetails.delivery_type_name }}
+
+
+ ¥
+ {{ orderdetails.order_goods ? orderdetails.order_goods[0].price : '' }}
+
+ 发送
+
+
+
+
+
+
+ {{ orderInfo.order_goods ? orderInfo.order_goods[0].sku_name : '' }}
+ 订单状态:{{ orderInfo.order_status_name }}
+ 配送方式:{{ orderInfo.delivery_type_name }}
+
+
+ ¥
+ {{ orderInfo.order_goods ? orderInfo.order_goods[0].price : '' }}
+
+ 已发送
+
+
+
+
+
+
+
+
+
diff --git a/components/ns-chat/ns-chat-receiveGoods.vue b/pages_tool/components/ns-chat/ns-chat-receiveGoods.vue
similarity index 100%
rename from components/ns-chat/ns-chat-receiveGoods.vue
rename to pages_tool/components/ns-chat/ns-chat-receiveGoods.vue
diff --git a/components/ns-progress/ns-progress.vue b/pages_tool/components/ns-progress/ns-progress.vue
similarity index 94%
rename from components/ns-progress/ns-progress.vue
rename to pages_tool/components/ns-progress/ns-progress.vue
index ac70b54..e3afc36 100644
--- a/components/ns-progress/ns-progress.vue
+++ b/pages_tool/components/ns-progress/ns-progress.vue
@@ -1,37 +1,37 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/components/sx-rate/common.js b/pages_tool/components/sx-rate/common.js
similarity index 97%
rename from components/sx-rate/common.js
rename to pages_tool/components/sx-rate/common.js
index 3128593..6e559dc 100644
--- a/components/sx-rate/common.js
+++ b/pages_tool/components/sx-rate/common.js
@@ -1,6 +1,6 @@
-export function getClientRect(selector, component) {
- return new Promise((resolve, reject) => {
- let query = component ? uni.createSelectorQuery().in(component) : uni.createSelectorQuery();
- return query.select(selector).boundingClientRect(resolve).exec()
- })
-}
+export function getClientRect(selector, component) {
+ return new Promise((resolve, reject) => {
+ let query = component ? uni.createSelectorQuery().in(component) : uni.createSelectorQuery();
+ return query.select(selector).boundingClientRect(resolve).exec()
+ })
+}
diff --git a/components/sx-rate/index.vue b/pages_tool/components/sx-rate/index.vue
similarity index 100%
rename from components/sx-rate/index.vue
rename to pages_tool/components/sx-rate/index.vue
diff --git a/components/sx-rate/sx-rate/iconfont.css b/pages_tool/components/sx-rate/sx-rate/iconfont.css
similarity index 68%
rename from components/sx-rate/sx-rate/iconfont.css
rename to pages_tool/components/sx-rate/sx-rate/iconfont.css
index 897ecc0..48200e0 100644
--- a/components/sx-rate/sx-rate/iconfont.css
+++ b/pages_tool/components/sx-rate/sx-rate/iconfont.css
@@ -1,21 +1,21 @@
-@font-face {font-family: "iconfont";
- src: url('~@/components/sx-rate/sx-rate/iconfont.eot?t=1574760464482'); /* IE9 */
- src: url('~@/components/sx-rate/sx-rate/iconfont.eot?t=1574760464482#iefix') format('embedded-opentype'), /* IE6-IE8 */
- url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAK8AAsAAAAABnAAAAJwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAp8gQgBNgIkAwgLBgAEIAWEbQcuG6wFyA4lTcHACOEZBUg8fL/2O3f3fTHEkoh28SSayCSxkkgQG6Uz3UvYITu9Qr5K0Vh6Ij6f+8CXKzVBHDvWa6d0lSfK57mc3gQ6kGt8oBz3ojUG9QLqxYEU6B4YRVYqecPYBS7hMYG6QWF0dlOycoGxxFoViFuxkALGuYAksXRVKNccTOJdSTV7zbSAt/D78Y8XxmRKOavq5CZZAOK+7u2svLVode0TggR0vIQc84BEXNQmjugJxumpJ/SNAvsqD77ui8K3i71aBPvrrNIm6IfSe5K58ltNZ3BbU40Blkf9OmKsIW/Un1qddc4dcSma3ArIX7PPXdlxK5l2zJ+aD6TXnQqmu330wqpeWkYN/OnNm/0trU+YvqNR4UN99f+x/tApIFTfR7u39X4gKPnb9pOX5RAQB6DYyc/zOKCD4OUp6KiiPeqnapbAp56NdegrdhLo5wKq+3UG/0fWcyDpCsuWJVVWO5oZO29bXR0FwJ4uV2ONvTeTCVW9I1wVAylyVeNkYudR0rCOsqoN1M1JPd7QDdMTqYZZXQChwwYybT6Q63BIJvYSJX1eUNYReqi7CrsLGyZDbJqIEUWQAPLroJhWKhjHQUyj8mwkrJJROKsI+XyENeIw5LI4xXQqUiA8xxZNtZBHCAMZrJTDFPAcksmUUIWVEkQTlogQVQSbzdS9iUUr5cDUDgyhEIgAxFcHEqMpKTD+eMK09PlsiFAVGQpu6atJ5kMwDfHsEBcLpweZqlX06ruXVzSqCfEQBANiYEpyUAqYh8jIKEGq+nkSCI1gEY2IqURg28OYvlrW+nr5152AOsuUhV2fSy+EwgAAAA==') format('woff2'),
- url('~@/components/sx-rate/sx-rate/iconfont.woff?t=1574760464482') format('woff'),
- url('~@/components/sx-rate/sx-rate/iconfont.ttf?t=1574760464482') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
- url('~@/components/sx-rate/sx-rate/iconfont.svg?t=1574760464482#iconfont') format('svg'); /* iOS 4.1- */
-}
-
-.iconfont {
- font-family: "iconfont" !important;
- font-size: inherit;
- font-style: normal;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-.icon-star:before {
- content: "\e6e3";
-}
-
+@font-face {font-family: "iconfont";
+ src: url('~@/pages_tool/components/sx-rate/sx-rate/iconfont.eot?t=1574760464482'); /* IE9 */
+ src: url('~@/pages_tool/components/sx-rate/sx-rate/iconfont.eot?t=1574760464482#iefix') format('embedded-opentype'), /* IE6-IE8 */
+ url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAK8AAsAAAAABnAAAAJwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAp8gQgBNgIkAwgLBgAEIAWEbQcuG6wFyA4lTcHACOEZBUg8fL/2O3f3fTHEkoh28SSayCSxkkgQG6Uz3UvYITu9Qr5K0Vh6Ij6f+8CXKzVBHDvWa6d0lSfK57mc3gQ6kGt8oBz3ojUG9QLqxYEU6B4YRVYqecPYBS7hMYG6QWF0dlOycoGxxFoViFuxkALGuYAksXRVKNccTOJdSTV7zbSAt/D78Y8XxmRKOavq5CZZAOK+7u2svLVode0TggR0vIQc84BEXNQmjugJxumpJ/SNAvsqD77ui8K3i71aBPvrrNIm6IfSe5K58ltNZ3BbU40Blkf9OmKsIW/Un1qddc4dcSma3ArIX7PPXdlxK5l2zJ+aD6TXnQqmu330wqpeWkYN/OnNm/0trU+YvqNR4UN99f+x/tApIFTfR7u39X4gKPnb9pOX5RAQB6DYyc/zOKCD4OUp6KiiPeqnapbAp56NdegrdhLo5wKq+3UG/0fWcyDpCsuWJVVWO5oZO29bXR0FwJ4uV2ONvTeTCVW9I1wVAylyVeNkYudR0rCOsqoN1M1JPd7QDdMTqYZZXQChwwYybT6Q63BIJvYSJX1eUNYReqi7CrsLGyZDbJqIEUWQAPLroJhWKhjHQUyj8mwkrJJROKsI+XyENeIw5LI4xXQqUiA8xxZNtZBHCAMZrJTDFPAcksmUUIWVEkQTlogQVQSbzdS9iUUr5cDUDgyhEIgAxFcHEqMpKTD+eMK09PlsiFAVGQpu6atJ5kMwDfHsEBcLpweZqlX06ruXVzSqCfEQBANiYEpyUAqYh8jIKEGq+nkSCI1gEY2IqURg28OYvlrW+nr5152AOsuUhV2fSy+EwgAAAA==') format('woff2'),
+ url('~@/pages_tool/components/sx-rate/sx-rate/iconfont.woff?t=1574760464482') format('woff'),
+ url('~@/pages_tool/components/sx-rate/sx-rate/iconfont.ttf?t=1574760464482') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
+ url('~@/pages_tool/components/sx-rate/sx-rate/iconfont.svg?t=1574760464482#iconfont') format('svg'); /* iOS 4.1- */
+}
+
+.iconfont {
+ font-family: "iconfont" !important;
+ font-size: inherit;
+ font-style: normal;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-star:before {
+ content: "\e6e3";
+}
+
diff --git a/components/sx-rate/sx-rate/iconfont.eot b/pages_tool/components/sx-rate/sx-rate/iconfont.eot
similarity index 100%
rename from components/sx-rate/sx-rate/iconfont.eot
rename to pages_tool/components/sx-rate/sx-rate/iconfont.eot
diff --git a/components/sx-rate/sx-rate/iconfont.svg b/pages_tool/components/sx-rate/sx-rate/iconfont.svg
similarity index 97%
rename from components/sx-rate/sx-rate/iconfont.svg
rename to pages_tool/components/sx-rate/sx-rate/iconfont.svg
index 3e53590..8e29477 100644
--- a/components/sx-rate/sx-rate/iconfont.svg
+++ b/pages_tool/components/sx-rate/sx-rate/iconfont.svg
@@ -1,29 +1,29 @@
-
-
-
-
+
+
+
+
diff --git a/components/sx-rate/sx-rate/iconfont.ttf b/pages_tool/components/sx-rate/sx-rate/iconfont.ttf
similarity index 100%
rename from components/sx-rate/sx-rate/iconfont.ttf
rename to pages_tool/components/sx-rate/sx-rate/iconfont.ttf
diff --git a/components/sx-rate/sx-rate/iconfont.woff b/pages_tool/components/sx-rate/sx-rate/iconfont.woff
similarity index 100%
rename from components/sx-rate/sx-rate/iconfont.woff
rename to pages_tool/components/sx-rate/sx-rate/iconfont.woff
diff --git a/components/sx-rate/sx-rate/iconfont.woff2 b/pages_tool/components/sx-rate/sx-rate/iconfont.woff2
similarity index 100%
rename from components/sx-rate/sx-rate/iconfont.woff2
rename to pages_tool/components/sx-rate/sx-rate/iconfont.woff2
diff --git a/components/uni-calendar/calendar.js b/pages_tool/components/uni-calendar/calendar.js
similarity index 97%
rename from components/uni-calendar/calendar.js
rename to pages_tool/components/uni-calendar/calendar.js
index b42c560..2331f75 100644
--- a/components/uni-calendar/calendar.js
+++ b/pages_tool/components/uni-calendar/calendar.js
@@ -1,623 +1,623 @@
-/**
- * @1900-2100区间内的公历、农历互转
- * @charset UTF-8
- * @github https://github.com/jjonline/calendar.js
- * @Author Jea杨(JJonline@JJonline.Cn)
- * @Time 2014-7-21
- * @Time 2016-8-13 Fixed 2033hex、Attribution Annals
- * @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
- * @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
- * @Version 1.0.3
- * @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
- * @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
- */
-/* eslint-disable */
-var calendar = {
-
- /**
- * 农历1900-2100的润大小信息表
- * @Array Of Property
- * @return Hex
- */
- lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0,
- 0x055d2, // 1900-1909
- 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
- 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
- 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
- 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
- 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
- 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
- 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
- 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
- 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
- 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
- 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
- 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
- 0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
- 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
- /** Add By JJonline@JJonline.Cn**/
- 0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
- 0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
- 0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
- 0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
- 0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
- 0x0d520
- ], // 2100
-
- /**
- * 公历每个月份的天数普通表
- * @Array Of Property
- * @return Number
- */
- solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
-
- /**
- * 天干地支之天干速查表
- * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
- * @return Cn string
- */
- Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
-
- /**
- * 天干地支之地支速查表
- * @Array Of Property
- * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
- * @return Cn string
- */
- Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149',
- '\u620c',
- '\u4ea5'
- ],
-
- /**
- * 天干地支之地支速查表<=>生肖
- * @Array Of Property
- * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
- * @return Cn string
- */
- Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21',
- '\u72d7', '\u732a'
- ],
-
- /**
- * 24节气速查表
- * @Array Of Property
- * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
- * @return Cn string
- */
- solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206',
- '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3',
- '\u5c0f\u6691',
- '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732',
- '\u971c\u964d',
- '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'
- ],
-
- /**
- * 1900-2100各年的24节气日期速查表
- * @Array Of Property
- * @return 0x string For splice
- */
- sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf97c3598082c95f8c965cc920f',
- '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
- 'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
- '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
- '97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
- '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
- '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
- '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
- '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
- '97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
- '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
- '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
- '9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
- '97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
- '9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
- '9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
- '977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
- '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
- '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
- '977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
- '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
- '7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
- '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
- '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
- '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
- '7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
- '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
- '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
- '665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
- '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'
- ],
-
- /**
- * 数字转中文速查表
- * @Array Of Property
- * @trans ['日','一','二','三','四','五','六','七','八','九','十']
- * @return Cn string
- */
- nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d',
- '\u5341'
- ],
-
- /**
- * 日期转农历称呼速查表
- * @Array Of Property
- * @trans ['初','十','廿','卅']
- * @return Cn string
- */
- nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
-
- /**
- * 月份转农历称呼速查表
- * @Array Of Property
- * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
- * @return Cn string
- */
- nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341',
- '\u51ac',
- '\u814a'
- ],
-
- /**
- * 返回农历y年一整年的总天数
- * @param lunar Year
- * @return Number
- * @eg:var count = calendar.lYearDays(1987) ;//count=387
- */
- lYearDays: function(y) {
- var i;
- var sum = 348
- for (i = 0x8000; i > 0x8; i >>= 1) {
- sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0
- }
- return (sum + this.leapDays(y))
- },
-
- /**
- * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
- * @param lunar Year
- * @return Number (0-12)
- * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
- */
- leapMonth: function(y) { // 闰字编码 \u95f0
- return (this.lunarInfo[y - 1900] & 0xf)
- },
-
- /**
- * 返回农历y年闰月的天数 若该年没有闰月则返回0
- * @param lunar Year
- * @return Number (0、29、30)
- * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
- */
- leapDays: function(y) {
- if (this.leapMonth(y)) {
- return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
- }
- return (0)
- },
-
- /**
- * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
- * @param lunar Year
- * @return Number (-1、29、30)
- * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
- */
- monthDays: function(y, m) {
- if (m > 12 || m < 1) {
- return -1
- } // 月份参数从1至12,参数错误返回-1
- return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
- },
-
- /**
- * 返回公历(!)y年m月的天数
- * @param solar Year
- * @return Number (-1、28、29、30、31)
- * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
- */
- solarDays: function(y, m) {
- if (m > 12 || m < 1) {
- return -1
- } // 若参数错误 返回-1
- var ms = m - 1
- if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
- return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
- } else {
- return (this.solarMonth[ms])
- }
- },
-
- /**
- * 农历年份转换为干支纪年
- * @param lYear 农历年的年份数
- * @return Cn string
- */
- toGanZhiYear: function(lYear) {
- var ganKey = (lYear - 3) % 10
- var zhiKey = (lYear - 3) % 12
- if (ganKey == 0) ganKey = 10 // 如果余数为0则为最后一个天干
- if (zhiKey == 0) zhiKey = 12 // 如果余数为0则为最后一个地支
- return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
- },
-
- /**
- * 公历月、日判断所属星座
- * @param cMonth [description]
- * @param cDay [description]
- * @return Cn string
- */
- toAstro: function(cMonth, cDay) {
- var s =
- '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf'
- var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
- return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7' // 座
- },
-
- /**
- * 传入offset偏移量返回干支
- * @param offset 相对甲子的偏移量
- * @return Cn string
- */
- toGanZhi: function(offset) {
- return this.Gan[offset % 10] + this.Zhi[offset % 12]
- },
-
- /**
- * 传入公历(!)y年获得该年第n个节气的公历日期
- * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
- * @return day Number
- * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
- */
- getTerm: function(y, n) {
- if (y < 1900 || y > 2100) {
- return -1
- }
- if (n < 1 || n > 24) {
- return -1
- }
- var _table = this.sTermInfo[y - 1900]
- var _info = [
- parseInt('0x' + _table.substr(0, 5)).toString(),
- parseInt('0x' + _table.substr(5, 5)).toString(),
- parseInt('0x' + _table.substr(10, 5)).toString(),
- parseInt('0x' + _table.substr(15, 5)).toString(),
- parseInt('0x' + _table.substr(20, 5)).toString(),
- parseInt('0x' + _table.substr(25, 5)).toString()
- ]
- var _calday = [
- _info[0].substr(0, 1),
- _info[0].substr(1, 2),
- _info[0].substr(3, 1),
- _info[0].substr(4, 2),
-
- _info[1].substr(0, 1),
- _info[1].substr(1, 2),
- _info[1].substr(3, 1),
- _info[1].substr(4, 2),
-
- _info[2].substr(0, 1),
- _info[2].substr(1, 2),
- _info[2].substr(3, 1),
- _info[2].substr(4, 2),
-
- _info[3].substr(0, 1),
- _info[3].substr(1, 2),
- _info[3].substr(3, 1),
- _info[3].substr(4, 2),
-
- _info[4].substr(0, 1),
- _info[4].substr(1, 2),
- _info[4].substr(3, 1),
- _info[4].substr(4, 2),
-
- _info[5].substr(0, 1),
- _info[5].substr(1, 2),
- _info[5].substr(3, 1),
- _info[5].substr(4, 2)
- ]
- return parseInt(_calday[n - 1])
- },
-
- /**
- * 传入农历数字月份返回汉语通俗表示法
- * @param lunar month
- * @return Cn string
- * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
- */
- toChinaMonth: function(m) { // 月 => \u6708
- if (m > 12 || m < 1) {
- return -1
- } // 若参数错误 返回-1
- var s = this.nStr3[m - 1]
- s += '\u6708' // 加上月字
- return s
- },
-
- /**
- * 传入农历日期数字返回汉字表示法
- * @param lunar day
- * @return Cn string
- * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
- */
- toChinaDay: function(d) { // 日 => \u65e5
- var s
- switch (d) {
- case 10:
- s = '\u521d\u5341';
- break
- case 20:
- s = '\u4e8c\u5341';
- break
- break
- case 30:
- s = '\u4e09\u5341';
- break
- break
- default:
- s = this.nStr2[Math.floor(d / 10)]
- s += this.nStr1[d % 10]
- }
- return (s)
- },
-
- /**
- * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
- * @param y year
- * @return Cn string
- * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
- */
- getAnimal: function(y) {
- return this.Animals[(y - 4) % 12]
- },
-
- /**
- * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
- * @param y solar year
- * @param m solar month
- * @param d solar day
- * @return JSON object
- * @eg:console.log(calendar.solar2lunar(1987,11,01));
- */
- solar2lunar: function(y, m, d) { // 参数区间1900.1.31~2100.12.31
- // 年份限定、上限
- if (y < 1900 || y > 2100) {
- return -1 // undefined转换为数字变为NaN
- }
- // 公历传参最下限
- if (y == 1900 && m == 1 && d < 31) {
- return -1
- }
- // 未传参 获得当天
- if (!y) {
- var objDate = new Date()
- } else {
- var objDate = new Date(y, parseInt(m) - 1, d)
- }
- var i;
- var leap = 0;
- var temp = 0
- // 修正ymd参数
- var y = objDate.getFullYear()
- var m = objDate.getMonth() + 1
- var d = objDate.getDate()
- var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0,
- 31)) /
- 86400000
- for (i = 1900; i < 2101 && offset > 0; i++) {
- temp = this.lYearDays(i)
- offset -= temp
- }
- if (offset < 0) {
- offset += temp;
- i--
- }
-
- // 是否今天
- var isTodayObj = new Date()
- var isToday = false
- if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
- isToday = true
- }
- // 星期几
- var nWeek = objDate.getDay()
- var cWeek = this.nStr1[nWeek]
- // 数字表示周几顺应天朝周一开始的惯例
- if (nWeek == 0) {
- nWeek = 7
- }
- // 农历年
- var year = i
- var leap = this.leapMonth(i) // 闰哪个月
- var isLeap = false
-
- // 效验闰月
- for (i = 1; i < 13 && offset > 0; i++) {
- // 闰月
- if (leap > 0 && i == (leap + 1) && isLeap == false) {
- --i
- isLeap = true;
- temp = this.leapDays(year) // 计算农历闰月天数
- } else {
- temp = this.monthDays(year, i) // 计算农历普通月天数
- }
- // 解除闰月
- if (isLeap == true && i == (leap + 1)) {
- isLeap = false
- }
- offset -= temp
- }
- // 闰月导致数组下标重叠取反
- if (offset == 0 && leap > 0 && i == leap + 1) {
- if (isLeap) {
- isLeap = false
- } else {
- isLeap = true;
- --i
- }
- }
- if (offset < 0) {
- offset += temp;
- --i
- }
- // 农历月
- var month = i
- // 农历日
- var day = offset + 1
- // 天干地支处理
- var sm = m - 1
- var gzY = this.toGanZhiYear(year)
-
- // 当月的两个节气
- // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
- var firstNode = this.getTerm(y, (m * 2 - 1)) // 返回当月「节」为几日开始
- var secondNode = this.getTerm(y, (m * 2)) // 返回当月「节」为几日开始
-
- // 依据12节气修正干支月
- var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
- if (d >= firstNode) {
- gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
- }
-
- // 传入的日期的节气与否
- var isTerm = false
- var Term = null
- if (firstNode == d) {
- isTerm = true
- Term = this.solarTerm[m * 2 - 2]
- }
- if (secondNode == d) {
- isTerm = true
- Term = this.solarTerm[m * 2 - 1]
- }
- // 日柱 当月一日与 1900/1/1 相差天数
- var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
- var gzD = this.toGanZhi(dayCyclical + d - 1)
- // 该日期所属的星座
- var astro = this.toAstro(m, d)
-
- return {
- 'lYear': year,
- 'lMonth': month,
- 'lDay': day,
- 'Animal': this.getAnimal(year),
- 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month),
- 'IDayCn': this.toChinaDay(day),
- 'cYear': y,
- 'cMonth': m,
- 'cDay': d,
- 'gzYear': gzY,
- 'gzMonth': gzM,
- 'gzDay': gzD,
- 'isToday': isToday,
- 'isLeap': isLeap,
- 'nWeek': nWeek,
- 'ncWeek': '\u661f\u671f' + cWeek,
- 'isTerm': isTerm,
- 'Term': Term,
- 'astro': astro
- }
- },
-
- /**
- * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
- * @param y lunar year
- * @param m lunar month
- * @param d lunar day
- * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
- * @return JSON object
- * @eg:console.log(calendar.lunar2solar(1987,9,10));
- */
- lunar2solar: function(y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
- var isLeapMonth = !!isLeapMonth
- var leapOffset = 0
- var leapMonth = this.leapMonth(y)
- var leapDay = this.leapDays(y)
- if (isLeapMonth && (leapMonth != m)) {
- return -1
- } // 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
- if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) {
- return -1
- } // 超出了最大极限值
- var day = this.monthDays(y, m)
- var _day = day
- // bugFix 2016-9-25
- // if month is leap, _day use leapDays method
- if (isLeapMonth) {
- _day = this.leapDays(y, m)
- }
- if (y < 1900 || y > 2100 || d > _day) {
- return -1
- } // 参数合法性效验
-
- // 计算农历的时间差
- var offset = 0
- for (var i = 1900; i < y; i++) {
- offset += this.lYearDays(i)
- }
- var leap = 0;
- var isAdd = false
- for (var i = 1; i < m; i++) {
- leap = this.leapMonth(y)
- if (!isAdd) { // 处理闰月
- if (leap <= i && leap > 0) {
- offset += this.leapDays(y);
- isAdd = true
- }
- }
- offset += this.monthDays(y, i)
- }
- // 转换闰月农历 需补充该年闰月的前一个月的时差
- if (isLeapMonth) {
- offset += day
- }
- // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
- var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
- var calObj = new Date((offset + d - 31) * 86400000 + stmap)
- var cY = calObj.getUTCFullYear()
- var cM = calObj.getUTCMonth() + 1
- var cD = calObj.getUTCDate()
-
- return this.solar2lunar(cY, cM, cD)
- }
-}
-
-export default calendar
+/**
+ * @1900-2100区间内的公历、农历互转
+ * @charset UTF-8
+ * @github https://github.com/jjonline/calendar.js
+ * @Author Jea杨(JJonline@JJonline.Cn)
+ * @Time 2014-7-21
+ * @Time 2016-8-13 Fixed 2033hex、Attribution Annals
+ * @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
+ * @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
+ * @Version 1.0.3
+ * @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
+ * @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
+ */
+/* eslint-disable */
+var calendar = {
+
+ /**
+ * 农历1900-2100的润大小信息表
+ * @Array Of Property
+ * @return Hex
+ */
+ lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0,
+ 0x055d2, // 1900-1909
+ 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
+ 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
+ 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
+ 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
+ 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
+ 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
+ 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
+ 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
+ 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
+ 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
+ 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
+ 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
+ 0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
+ 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
+ /** Add By JJonline@JJonline.Cn**/
+ 0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
+ 0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
+ 0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
+ 0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
+ 0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
+ 0x0d520
+ ], // 2100
+
+ /**
+ * 公历每个月份的天数普通表
+ * @Array Of Property
+ * @return Number
+ */
+ solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
+
+ /**
+ * 天干地支之天干速查表
+ * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
+ * @return Cn string
+ */
+ Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
+
+ /**
+ * 天干地支之地支速查表
+ * @Array Of Property
+ * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
+ * @return Cn string
+ */
+ Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149',
+ '\u620c',
+ '\u4ea5'
+ ],
+
+ /**
+ * 天干地支之地支速查表<=>生肖
+ * @Array Of Property
+ * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
+ * @return Cn string
+ */
+ Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21',
+ '\u72d7', '\u732a'
+ ],
+
+ /**
+ * 24节气速查表
+ * @Array Of Property
+ * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
+ * @return Cn string
+ */
+ solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206',
+ '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3',
+ '\u5c0f\u6691',
+ '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732',
+ '\u971c\u964d',
+ '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'
+ ],
+
+ /**
+ * 1900-2100各年的24节气日期速查表
+ * @Array Of Property
+ * @return 0x string For splice
+ */
+ sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf97c3598082c95f8c965cc920f',
+ '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
+ 'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
+ '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
+ '97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
+ '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
+ '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
+ '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
+ '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
+ '97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
+ '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
+ '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+ '9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
+ '97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
+ '9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+ '9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
+ '977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+ '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+ '977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
+ '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
+ '7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
+ '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+ '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
+ '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
+ '7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+ '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
+ '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
+ '665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
+ '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'
+ ],
+
+ /**
+ * 数字转中文速查表
+ * @Array Of Property
+ * @trans ['日','一','二','三','四','五','六','七','八','九','十']
+ * @return Cn string
+ */
+ nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d',
+ '\u5341'
+ ],
+
+ /**
+ * 日期转农历称呼速查表
+ * @Array Of Property
+ * @trans ['初','十','廿','卅']
+ * @return Cn string
+ */
+ nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
+
+ /**
+ * 月份转农历称呼速查表
+ * @Array Of Property
+ * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
+ * @return Cn string
+ */
+ nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341',
+ '\u51ac',
+ '\u814a'
+ ],
+
+ /**
+ * 返回农历y年一整年的总天数
+ * @param lunar Year
+ * @return Number
+ * @eg:var count = calendar.lYearDays(1987) ;//count=387
+ */
+ lYearDays: function(y) {
+ var i;
+ var sum = 348
+ for (i = 0x8000; i > 0x8; i >>= 1) {
+ sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0
+ }
+ return (sum + this.leapDays(y))
+ },
+
+ /**
+ * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
+ * @param lunar Year
+ * @return Number (0-12)
+ * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
+ */
+ leapMonth: function(y) { // 闰字编码 \u95f0
+ return (this.lunarInfo[y - 1900] & 0xf)
+ },
+
+ /**
+ * 返回农历y年闰月的天数 若该年没有闰月则返回0
+ * @param lunar Year
+ * @return Number (0、29、30)
+ * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
+ */
+ leapDays: function(y) {
+ if (this.leapMonth(y)) {
+ return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
+ }
+ return (0)
+ },
+
+ /**
+ * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
+ * @param lunar Year
+ * @return Number (-1、29、30)
+ * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
+ */
+ monthDays: function(y, m) {
+ if (m > 12 || m < 1) {
+ return -1
+ } // 月份参数从1至12,参数错误返回-1
+ return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
+ },
+
+ /**
+ * 返回公历(!)y年m月的天数
+ * @param solar Year
+ * @return Number (-1、28、29、30、31)
+ * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
+ */
+ solarDays: function(y, m) {
+ if (m > 12 || m < 1) {
+ return -1
+ } // 若参数错误 返回-1
+ var ms = m - 1
+ if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
+ return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
+ } else {
+ return (this.solarMonth[ms])
+ }
+ },
+
+ /**
+ * 农历年份转换为干支纪年
+ * @param lYear 农历年的年份数
+ * @return Cn string
+ */
+ toGanZhiYear: function(lYear) {
+ var ganKey = (lYear - 3) % 10
+ var zhiKey = (lYear - 3) % 12
+ if (ganKey == 0) ganKey = 10 // 如果余数为0则为最后一个天干
+ if (zhiKey == 0) zhiKey = 12 // 如果余数为0则为最后一个地支
+ return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
+ },
+
+ /**
+ * 公历月、日判断所属星座
+ * @param cMonth [description]
+ * @param cDay [description]
+ * @return Cn string
+ */
+ toAstro: function(cMonth, cDay) {
+ var s =
+ '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf'
+ var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
+ return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7' // 座
+ },
+
+ /**
+ * 传入offset偏移量返回干支
+ * @param offset 相对甲子的偏移量
+ * @return Cn string
+ */
+ toGanZhi: function(offset) {
+ return this.Gan[offset % 10] + this.Zhi[offset % 12]
+ },
+
+ /**
+ * 传入公历(!)y年获得该年第n个节气的公历日期
+ * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
+ * @return day Number
+ * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
+ */
+ getTerm: function(y, n) {
+ if (y < 1900 || y > 2100) {
+ return -1
+ }
+ if (n < 1 || n > 24) {
+ return -1
+ }
+ var _table = this.sTermInfo[y - 1900]
+ var _info = [
+ parseInt('0x' + _table.substr(0, 5)).toString(),
+ parseInt('0x' + _table.substr(5, 5)).toString(),
+ parseInt('0x' + _table.substr(10, 5)).toString(),
+ parseInt('0x' + _table.substr(15, 5)).toString(),
+ parseInt('0x' + _table.substr(20, 5)).toString(),
+ parseInt('0x' + _table.substr(25, 5)).toString()
+ ]
+ var _calday = [
+ _info[0].substr(0, 1),
+ _info[0].substr(1, 2),
+ _info[0].substr(3, 1),
+ _info[0].substr(4, 2),
+
+ _info[1].substr(0, 1),
+ _info[1].substr(1, 2),
+ _info[1].substr(3, 1),
+ _info[1].substr(4, 2),
+
+ _info[2].substr(0, 1),
+ _info[2].substr(1, 2),
+ _info[2].substr(3, 1),
+ _info[2].substr(4, 2),
+
+ _info[3].substr(0, 1),
+ _info[3].substr(1, 2),
+ _info[3].substr(3, 1),
+ _info[3].substr(4, 2),
+
+ _info[4].substr(0, 1),
+ _info[4].substr(1, 2),
+ _info[4].substr(3, 1),
+ _info[4].substr(4, 2),
+
+ _info[5].substr(0, 1),
+ _info[5].substr(1, 2),
+ _info[5].substr(3, 1),
+ _info[5].substr(4, 2)
+ ]
+ return parseInt(_calday[n - 1])
+ },
+
+ /**
+ * 传入农历数字月份返回汉语通俗表示法
+ * @param lunar month
+ * @return Cn string
+ * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
+ */
+ toChinaMonth: function(m) { // 月 => \u6708
+ if (m > 12 || m < 1) {
+ return -1
+ } // 若参数错误 返回-1
+ var s = this.nStr3[m - 1]
+ s += '\u6708' // 加上月字
+ return s
+ },
+
+ /**
+ * 传入农历日期数字返回汉字表示法
+ * @param lunar day
+ * @return Cn string
+ * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
+ */
+ toChinaDay: function(d) { // 日 => \u65e5
+ var s
+ switch (d) {
+ case 10:
+ s = '\u521d\u5341';
+ break
+ case 20:
+ s = '\u4e8c\u5341';
+ break
+ break
+ case 30:
+ s = '\u4e09\u5341';
+ break
+ break
+ default:
+ s = this.nStr2[Math.floor(d / 10)]
+ s += this.nStr1[d % 10]
+ }
+ return (s)
+ },
+
+ /**
+ * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
+ * @param y year
+ * @return Cn string
+ * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
+ */
+ getAnimal: function(y) {
+ return this.Animals[(y - 4) % 12]
+ },
+
+ /**
+ * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
+ * @param y solar year
+ * @param m solar month
+ * @param d solar day
+ * @return JSON object
+ * @eg:console.log(calendar.solar2lunar(1987,11,01));
+ */
+ solar2lunar: function(y, m, d) { // 参数区间1900.1.31~2100.12.31
+ // 年份限定、上限
+ if (y < 1900 || y > 2100) {
+ return -1 // undefined转换为数字变为NaN
+ }
+ // 公历传参最下限
+ if (y == 1900 && m == 1 && d < 31) {
+ return -1
+ }
+ // 未传参 获得当天
+ if (!y) {
+ var objDate = new Date()
+ } else {
+ var objDate = new Date(y, parseInt(m) - 1, d)
+ }
+ var i;
+ var leap = 0;
+ var temp = 0
+ // 修正ymd参数
+ var y = objDate.getFullYear()
+ var m = objDate.getMonth() + 1
+ var d = objDate.getDate()
+ var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0,
+ 31)) /
+ 86400000
+ for (i = 1900; i < 2101 && offset > 0; i++) {
+ temp = this.lYearDays(i)
+ offset -= temp
+ }
+ if (offset < 0) {
+ offset += temp;
+ i--
+ }
+
+ // 是否今天
+ var isTodayObj = new Date()
+ var isToday = false
+ if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
+ isToday = true
+ }
+ // 星期几
+ var nWeek = objDate.getDay()
+ var cWeek = this.nStr1[nWeek]
+ // 数字表示周几顺应天朝周一开始的惯例
+ if (nWeek == 0) {
+ nWeek = 7
+ }
+ // 农历年
+ var year = i
+ var leap = this.leapMonth(i) // 闰哪个月
+ var isLeap = false
+
+ // 效验闰月
+ for (i = 1; i < 13 && offset > 0; i++) {
+ // 闰月
+ if (leap > 0 && i == (leap + 1) && isLeap == false) {
+ --i
+ isLeap = true;
+ temp = this.leapDays(year) // 计算农历闰月天数
+ } else {
+ temp = this.monthDays(year, i) // 计算农历普通月天数
+ }
+ // 解除闰月
+ if (isLeap == true && i == (leap + 1)) {
+ isLeap = false
+ }
+ offset -= temp
+ }
+ // 闰月导致数组下标重叠取反
+ if (offset == 0 && leap > 0 && i == leap + 1) {
+ if (isLeap) {
+ isLeap = false
+ } else {
+ isLeap = true;
+ --i
+ }
+ }
+ if (offset < 0) {
+ offset += temp;
+ --i
+ }
+ // 农历月
+ var month = i
+ // 农历日
+ var day = offset + 1
+ // 天干地支处理
+ var sm = m - 1
+ var gzY = this.toGanZhiYear(year)
+
+ // 当月的两个节气
+ // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
+ var firstNode = this.getTerm(y, (m * 2 - 1)) // 返回当月「节」为几日开始
+ var secondNode = this.getTerm(y, (m * 2)) // 返回当月「节」为几日开始
+
+ // 依据12节气修正干支月
+ var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
+ if (d >= firstNode) {
+ gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
+ }
+
+ // 传入的日期的节气与否
+ var isTerm = false
+ var Term = null
+ if (firstNode == d) {
+ isTerm = true
+ Term = this.solarTerm[m * 2 - 2]
+ }
+ if (secondNode == d) {
+ isTerm = true
+ Term = this.solarTerm[m * 2 - 1]
+ }
+ // 日柱 当月一日与 1900/1/1 相差天数
+ var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
+ var gzD = this.toGanZhi(dayCyclical + d - 1)
+ // 该日期所属的星座
+ var astro = this.toAstro(m, d)
+
+ return {
+ 'lYear': year,
+ 'lMonth': month,
+ 'lDay': day,
+ 'Animal': this.getAnimal(year),
+ 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month),
+ 'IDayCn': this.toChinaDay(day),
+ 'cYear': y,
+ 'cMonth': m,
+ 'cDay': d,
+ 'gzYear': gzY,
+ 'gzMonth': gzM,
+ 'gzDay': gzD,
+ 'isToday': isToday,
+ 'isLeap': isLeap,
+ 'nWeek': nWeek,
+ 'ncWeek': '\u661f\u671f' + cWeek,
+ 'isTerm': isTerm,
+ 'Term': Term,
+ 'astro': astro
+ }
+ },
+
+ /**
+ * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
+ * @param y lunar year
+ * @param m lunar month
+ * @param d lunar day
+ * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
+ * @return JSON object
+ * @eg:console.log(calendar.lunar2solar(1987,9,10));
+ */
+ lunar2solar: function(y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
+ var isLeapMonth = !!isLeapMonth
+ var leapOffset = 0
+ var leapMonth = this.leapMonth(y)
+ var leapDay = this.leapDays(y)
+ if (isLeapMonth && (leapMonth != m)) {
+ return -1
+ } // 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
+ if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) {
+ return -1
+ } // 超出了最大极限值
+ var day = this.monthDays(y, m)
+ var _day = day
+ // bugFix 2016-9-25
+ // if month is leap, _day use leapDays method
+ if (isLeapMonth) {
+ _day = this.leapDays(y, m)
+ }
+ if (y < 1900 || y > 2100 || d > _day) {
+ return -1
+ } // 参数合法性效验
+
+ // 计算农历的时间差
+ var offset = 0
+ for (var i = 1900; i < y; i++) {
+ offset += this.lYearDays(i)
+ }
+ var leap = 0;
+ var isAdd = false
+ for (var i = 1; i < m; i++) {
+ leap = this.leapMonth(y)
+ if (!isAdd) { // 处理闰月
+ if (leap <= i && leap > 0) {
+ offset += this.leapDays(y);
+ isAdd = true
+ }
+ }
+ offset += this.monthDays(y, i)
+ }
+ // 转换闰月农历 需补充该年闰月的前一个月的时差
+ if (isLeapMonth) {
+ offset += day
+ }
+ // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
+ var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
+ var calObj = new Date((offset + d - 31) * 86400000 + stmap)
+ var cY = calObj.getUTCFullYear()
+ var cM = calObj.getUTCMonth() + 1
+ var cD = calObj.getUTCDate()
+
+ return this.solar2lunar(cY, cM, cD)
+ }
+}
+
+export default calendar
diff --git a/components/uni-calendar/uni-calendar-item.vue b/pages_tool/components/uni-calendar/uni-calendar-item.vue
similarity index 100%
rename from components/uni-calendar/uni-calendar-item.vue
rename to pages_tool/components/uni-calendar/uni-calendar-item.vue
diff --git a/components/uni-calendar/uni-calendar.vue b/pages_tool/components/uni-calendar/uni-calendar.vue
similarity index 95%
rename from components/uni-calendar/uni-calendar.vue
rename to pages_tool/components/uni-calendar/uni-calendar.vue
index 0d47d42..604f6d4 100644
--- a/components/uni-calendar/uni-calendar.vue
+++ b/pages_tool/components/uni-calendar/uni-calendar.vue
@@ -44,7 +44,7 @@
\ No newline at end of file
diff --git a/pages_tool/form/form.vue b/pages_tool/form/form.vue
index c6342be..52f2d16 100644
--- a/pages_tool/form/form.vue
+++ b/pages_tool/form/form.vue
@@ -10,7 +10,7 @@
-
+
@@ -18,135 +18,130 @@
\ No newline at end of file
diff --git a/pages_tool/form/formdata.vue b/pages_tool/form/formdata.vue
index 66e4a5b..7743cc8 100644
--- a/pages_tool/form/formdata.vue
+++ b/pages_tool/form/formdata.vue
@@ -3,13 +3,11 @@
-
+
请填写表单所需信息
-
+
@@ -23,12 +21,6 @@
\ No newline at end of file
diff --git a/pages_tool/goods/coupon.vue b/pages_tool/goods/coupon.vue
index 80c0bfc..2b332ba 100644
--- a/pages_tool/goods/coupon.vue
+++ b/pages_tool/goods/coupon.vue
@@ -2,53 +2,42 @@
- 全部
- 满减券
- 折扣券
-
+ 全部
+ 满减券
+ 折扣券
+
-
+
-
+
-
+
¥
{{ parseFloat(item.money) }}
-
+
{{ parseFloat(item.discount) }}
折
- 满{{ item.at_least }}元可用
- 无门槛优惠券
+ 满{{ item.at_least }}元可用
+ 无门槛优惠券
{{ item.coupon_name }}
- 指定商品
+ 指定商品
全场商品
(最大优惠{{ item.discount_limit }}元)
- {{
- item.use_channel_name }}
-
@@ -81,401 +70,406 @@
\ No newline at end of file
diff --git a/pages_tool/goods/coupon_receive.vue b/pages_tool/goods/coupon_receive.vue
index 7daebfe..eb910ea 100644
--- a/pages_tool/goods/coupon_receive.vue
+++ b/pages_tool/goods/coupon_receive.vue
@@ -39,13 +39,6 @@
\ No newline at end of file
diff --git a/pages_tool/help/detail.vue b/pages_tool/help/detail.vue
index cb6104b..cd41c7f 100644
--- a/pages_tool/help/detail.vue
+++ b/pages_tool/help/detail.vue
@@ -15,49 +15,51 @@
\ No newline at end of file
diff --git a/pages_tool/help/list.vue b/pages_tool/help/list.vue
index 83ae09e..32f5f6b 100644
--- a/pages_tool/help/list.vue
+++ b/pages_tool/help/list.vue
@@ -3,8 +3,7 @@
{{ item.class_name }}
- {{ s_item.title }}
+ {{ s_item.title }}
@@ -20,18 +19,12 @@
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/member/basic/account_edit.vue b/pages_tool/member/account_edit.vue
similarity index 95%
rename from pages_tool/member/basic/account_edit.vue
rename to pages_tool/member/account_edit.vue
index 5507b2c..0225527 100644
--- a/pages_tool/member/basic/account_edit.vue
+++ b/pages_tool/member/account_edit.vue
@@ -2,8 +2,7 @@
{{ $lang('name') }}
-
+
{{ $lang('mobilePhone') }}
@@ -18,13 +17,11 @@
银行名称
-
+
提现账号
-
+
@@ -36,9 +33,6 @@
-
-
\ No newline at end of file
diff --git a/pages_tool/member/address_edit.vue b/pages_tool/member/address_edit.vue
new file mode 100644
index 0000000..d028016
--- /dev/null
+++ b/pages_tool/member/address_edit.vue
@@ -0,0 +1,501 @@
+
+
+
+ 地址信息
+
+
+ {{ $lang('consignee') }}
+ *
+
+
+
+
+
+ {{ $lang('mobile') }}
+ *
+
+
+
+
+ {{ $lang('telephone') }}
+
+
+
+
+
+
+ {{ $lang('receivingCity') }}
+ *
+
+
+ {{ formData.full_address ? formData.full_address : '请选择省市区县' }}
+
+
+
+
+
+
+
+
+ {{ $lang('receivingCity') }}
+ *
+
+
+
+ {{ formData.full_address ? formData.full_address : '请选择省市区县' }}
+
+
+
+
+
+
+
+ {{ $lang('address') }}
+ *
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/member/apply_withdrawal.vue b/pages_tool/member/apply_withdrawal.vue
new file mode 100644
index 0000000..d258e4f
--- /dev/null
+++ b/pages_tool/member/apply_withdrawal.vue
@@ -0,0 +1,425 @@
+
+
+
+
+ 提现到
+ 微信默认钱包
+ {{ bankAccountInfo.bank_account }}
+
+
+
+
+
+
+
+
+
+
+
+ 请添加提现方式
+
+
+
+
+ 提现金额
+
+ {{ $lang('common.currencySymbol') }}
+
+
+
+
+
+
+
+ 可提现余额:{{ $lang('common.currencySymbol') }}{{ withdrawInfo.member_info.balance_money | moneyFormat }}
+ 全部提现
+
+
+
+ 最小提现金额为{{ $lang('common.currencySymbol') }}{{ withdrawInfo.config.min | moneyFormat }}
+ ,手续费为{{ withdrawInfo.config.rate + '%' }}
+
+
+
+
+ 提现
+
+
+
+ 提现记录
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/member/other/assets.vue b/pages_tool/member/assets.vue
similarity index 100%
rename from pages_tool/member/other/assets.vue
rename to pages_tool/member/assets.vue
diff --git a/pages_tool/member/finance/account/balance.vue b/pages_tool/member/balance.vue
similarity index 83%
rename from pages_tool/member/finance/account/balance.vue
rename to pages_tool/member/balance.vue
index 2bbfd65..1976189 100644
--- a/pages_tool/member/finance/account/balance.vue
+++ b/pages_tool/member/balance.vue
@@ -2,9 +2,9 @@
+ 'padding-top': menuButtonBounding.top + 'px',
+ 'height': menuButtonBounding.height + 'px'
+ }">
@@ -13,14 +13,12 @@
-
-
-
+
+
+
账户余额(元)
- {{ (parseFloat(balanceInfo.balance) +
- parseFloat(balanceInfo.balance_money)).toFixed(2) }}
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {{ item.remark }}
+
+ {{ $util.timeStampTurnTime(item.create_time) }}
+
+
+ {{ item.account_data > 0 ? '+' + item.account_data : item.account_data }}元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/member/basic/account.vue b/pages_tool/member/basic/account.vue
deleted file mode 100644
index aa3ead7..0000000
--- a/pages_tool/member/basic/account.vue
+++ /dev/null
@@ -1,465 +0,0 @@
-
-
-
-
-
-
-
-
- 提现到余额
-
-
-
-
-
-
-
- {{ item.withdraw_type_name }}
-
- {{ item.realname }}
- {{ item.mobile }}
-
-
-
- 提现账号:{{ item.bank_account }}
-
-
- 银行名称 :{{ item.branch_bank_name }}
-
-
-
- 修改
-
-
-
-
- 设为默认账户
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 暂无账户信息,请添加
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/basic/modify_face.vue b/pages_tool/member/basic/modify_face.vue
deleted file mode 100644
index cd9f7be..0000000
--- a/pages_tool/member/basic/modify_face.vue
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/other/cancellation.vue b/pages_tool/member/cancellation.vue
similarity index 98%
rename from pages_tool/member/other/cancellation.vue
rename to pages_tool/member/cancellation.vue
index f9d60f3..b1e05a8 100644
--- a/pages_tool/member/other/cancellation.vue
+++ b/pages_tool/member/cancellation.vue
@@ -19,7 +19,7 @@
+
+
\ No newline at end of file
diff --git a/pages_tool/member/cancelsuccess.vue b/pages_tool/member/cancelsuccess.vue
new file mode 100644
index 0000000..4f975ab
--- /dev/null
+++ b/pages_tool/member/cancelsuccess.vue
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+ 您已成功注销账号
+ 待下次与您更好的相遇,如需再次使用,请重新注册
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/member/finance/transaction/card.vue b/pages_tool/member/card.vue
similarity index 65%
rename from pages_tool/member/finance/transaction/card.vue
rename to pages_tool/member/card.vue
index 48d3b06..2d5d236 100644
--- a/pages_tool/member/finance/transaction/card.vue
+++ b/pages_tool/member/card.vue
@@ -5,9 +5,8 @@
-
-
+
+
{{ memberInfo.nickname }}
@@ -23,18 +22,15 @@
{{ levelInfo.level_name }}
{{ levelInfo.level_name }}可享受消费折扣和
会员大礼包等权益
-
+
-
+
-
+
@@ -122,111 +118,113 @@
-
\ No newline at end of file
diff --git a/pages_tool/member/finance/transaction/card_agreement.vue b/pages_tool/member/card_agreement.vue
similarity index 94%
rename from pages_tool/member/finance/transaction/card_agreement.vue
rename to pages_tool/member/card_agreement.vue
index b489938..aa54a01 100644
--- a/pages_tool/member/finance/transaction/card_agreement.vue
+++ b/pages_tool/member/card_agreement.vue
@@ -6,7 +6,7 @@
\ No newline at end of file
diff --git a/pages_tool/member/collection.vue b/pages_tool/member/collection.vue
new file mode 100644
index 0000000..5153e8b
--- /dev/null
+++ b/pages_tool/member/collection.vue
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+ {{ item.sku_name }}
+
+
+ ¥
+ {{ parseFloat(item.discount_price).toFixed(2).split('.')[0] }}
+ .{{ parseFloat(item.discount_price).toFixed(2).split('.')[1] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/member/other/contact.vue b/pages_tool/member/contact.vue
similarity index 92%
rename from pages_tool/member/other/contact.vue
rename to pages_tool/member/contact.vue
index f10d1b5..3ef3863 100644
--- a/pages_tool/member/other/contact.vue
+++ b/pages_tool/member/contact.vue
@@ -10,8 +10,8 @@ export default {
data() {
return {};
},
- onLoad(options) { },
- onShow() { },
+ onLoad(options) {},
+ onShow() {},
methods: {}
};
@@ -21,7 +21,6 @@ export default {
width: 80%;
text-align: center;
margin: 0 auto;
-
image {
width: 500rpx;
}
diff --git a/pages_tool/member/coupon.vue b/pages_tool/member/coupon.vue
new file mode 100644
index 0000000..660888b
--- /dev/null
+++ b/pages_tool/member/coupon.vue
@@ -0,0 +1,416 @@
+
+
+
+
+ 未使用
+ 已使用
+ 已过期
+
+
+
+
+
+
+
+
+
+
+
+
+ ¥
+ {{ parseFloat(item.money) }}
+
+
+ ¥
+ {{ parseFloat(item.money) }}
+
+
+ {{ parseFloat(item.discount) }}
+ 折
+
+
+ 满{{ item.at_least }}元可用
+ 无门槛优惠券
+
+
+
+
+ {{ item.coupon_name }}
+ 指定商品
+ (最大优惠{{ item.discount_limit }}元)
+ {{ item.use_channel_name }}
+
+
+ 有效期:{{ $util.timeStampTurnTime(item.end_time) }}
+
+ 有效期:长期有效
+
+
+ 去使用
+ 已使用
+ 已过期
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/member/finance/account/balance_detail.vue b/pages_tool/member/finance/account/balance_detail.vue
deleted file mode 100644
index f0f4a82..0000000
--- a/pages_tool/member/finance/account/balance_detail.vue
+++ /dev/null
@@ -1,371 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.remark }}
-
- {{ $util.timeStampTurnTime(item.create_time) }}
-
-
- {{ item.account_data > 0 ?
- '+' + item.account_data : item.account_data }}元
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/finance/account/pay_password.vue b/pages_tool/member/finance/account/pay_password.vue
deleted file mode 100644
index a5d6c1b..0000000
--- a/pages_tool/member/finance/account/pay_password.vue
+++ /dev/null
@@ -1,280 +0,0 @@
-
-
- 请输入6位支付密码,建议不要使用重复或连续数字
- 验证码已发送至{{ memberInfo.mobile | mobile }}请在下方输入4位数字验证码
-
-
-
- {{ dynacodeData.codeText }}
-
- 输入短信验证码
- 请设置支付密码
- 请再次输入
- 确认
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/finance/transaction/apply_withdrawal.vue b/pages_tool/member/finance/transaction/apply_withdrawal.vue
deleted file mode 100644
index 1b93d35..0000000
--- a/pages_tool/member/finance/transaction/apply_withdrawal.vue
+++ /dev/null
@@ -1,430 +0,0 @@
-
-
-
-
- 提现到
- 微信默认钱包
- {{ bankAccountInfo.bank_account }}
-
-
-
-
-
-
-
-
-
-
-
- 请添加提现方式
-
-
-
-
- 提现金额
-
- {{ $lang('common.currencySymbol') }}
-
-
-
-
-
-
-
- 可提现余额:{{ $lang('common.currencySymbol') }}{{
- withdrawInfo.member_info.balance_money | moneyFormat }}
- 全部提现
-
-
-
- 最小提现金额为{{ $lang('common.currencySymbol') }}{{ withdrawInfo.config.min | moneyFormat }}
- ,手续费为{{ withdrawInfo.config.rate + '%' }}
-
-
-
-
- 提现
-
-
-
- 提现记录
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/other/footprint.vue b/pages_tool/member/footprint.vue
similarity index 81%
rename from pages_tool/member/other/footprint.vue
rename to pages_tool/member/footprint.vue
index 20cbd6e..4cf5824 100644
--- a/pages_tool/member/other/footprint.vue
+++ b/pages_tool/member/footprint.vue
@@ -10,14 +10,11 @@
{{ datetime(item) }}
-
+
-
-
- {{ goodsTag(item) }}
-
+
+ {{ goodsTag(item) }}
@@ -27,28 +24,22 @@
{{ $lang('common.currencySymbol') }}
- {{
- parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}
- .{{
- parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}
+ {{ parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}
+ .{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}
-
+
-
-
+
-
+
{{ $lang('common.currencySymbol') }}
{{ showMarketPrice(item) }}
- 已售{{
- item.sale_num }}{{ item.unit ? item.unit : '件' }}
+ 已售{{ item.sale_num }}{{ item.unit ? item.unit : '件' }}
@@ -58,12 +49,10 @@
-
+
全选
-
+
@@ -75,15 +64,22 @@
\ No newline at end of file
diff --git a/pages_tool/member/basic/info_edit.vue b/pages_tool/member/info_edit.vue
similarity index 58%
rename from pages_tool/member/basic/info_edit.vue
rename to pages_tool/member/info_edit.vue
index d73b44f..6a64810 100644
--- a/pages_tool/member/basic/info_edit.vue
+++ b/pages_tool/member/info_edit.vue
@@ -5,8 +5,7 @@
用户名
-
+
用户名仅可修改一次,请谨慎设置
@@ -17,8 +16,7 @@
昵称
-
+
@@ -28,8 +26,7 @@
姓名
-
+
@@ -42,8 +39,7 @@
@@ -57,8 +53,7 @@
生日
-
+
{{ formData.birthday ? formData.birthday : '请选择生日' }}
@@ -74,42 +69,35 @@
请先绑定手机再执行该操作
-
+
原密码
-
+
新密码
-
+
再次输入
-
-
+
+
点击“获取动态码”,将会向您已绑定的手机号{{ memberInfoformData.mobile | mobile }}发送验证码
新密码
-
+
再次输入
-
+
@@ -121,21 +109,17 @@
手机号
-
+
验证码
-
+
短信验证码
-
-
+
+
@@ -154,7 +138,7 @@
所在地区
-
+
{{ formData.fullAddress ? formData.fullAddress : '请选择省市区县' }}
@@ -173,238 +157,237 @@
\ No newline at end of file
diff --git a/pages_tool/member/rights/invite_friends.vue b/pages_tool/member/invite_friends.vue
similarity index 82%
rename from pages_tool/member/rights/invite_friends.vue
rename to pages_tool/member/invite_friends.vue
index 4cb9c65..8321783 100644
--- a/pages_tool/member/rights/invite_friends.vue
+++ b/pages_tool/member/invite_friends.vue
@@ -9,15 +9,12 @@
活动说明
-
+
- 活动时间:{{ $util.timeStampTurnTime(info.start_time, 1) }}至{{ $util.timeStampTurnTime(info.end_time, 1)
- }}
+ 活动时间:{{ $util.timeStampTurnTime(info.start_time, 1) }}至{{ $util.timeStampTurnTime(info.end_time, 1) }}
- 立即邀请
+ 立即邀请
我的好友
@@ -26,8 +23,7 @@
-
+
@@ -47,13 +43,11 @@
-
+
查看更多
- 没有更多数据了
+ 没有更多数据了
@@ -68,7 +62,7 @@
-
+
{{ $lang('common.currencySymbol') }}
@@ -79,7 +73,7 @@
-
+
{{ parseInt(info.point) }}
@@ -134,7 +128,7 @@
-
+
分享链接给好友
@@ -143,7 +137,7 @@
-
+
好友进入
@@ -152,7 +146,7 @@
-
+
好友注册成功获得奖励
@@ -237,55 +231,56 @@
diff --git a/pages_tool/member/level.vue b/pages_tool/member/level.vue
new file mode 100644
index 0000000..c7e6d1d
--- /dev/null
+++ b/pages_tool/member/level.vue
@@ -0,0 +1,382 @@
+
+
+
+
+
+
+
+
+
+
+ {{ memberInfo.nickname }}
+ 当前等级:{{ memberInfo.member_level_name }}
+
+
+
+ 成长规则
+
+
+
+
+
+
+
+
+
+
+
+ {{ levelList[curIndex].level_name }}
+ 当前等级
+
+ 当前成长值
+ {{ growth }}
+
+
+
+
+ 再获得{{ levelList[curIndex + 1].needGrowth > 0 ? levelList[curIndex + 1].needGrowth : 0 }}成长值成为{{
+ levelList[curIndex + 1].level_name
+ }}
+
+
+
+ 您现在已经是最高等级
+
+
+
+
+
+ 再获得{{ levelList[curIndex].needGrowth }}成长值成为{{ levelList[curIndex].level_name }}
+
+
+
+
+
+
+
+
+ 会员权益
+
+
+
+ 包邮服务
+ 提供商品包邮服务
+
+
+
+
+
+ 享受消费折扣服务
+ 不享受任何消费折扣和其他权益
+ 提供{{ levelList[curIndex].consume_discount }}折消费折扣
+
+
+
+
+
+ 享受积分回馈服务
+ 提供{{ levelList[curIndex].point_feedback }}倍积分回馈倍率
+
+
+
+
+
+ 会员礼包
+
+
+
+ 积分礼包
+ 赠送{{ levelList[curIndex].send_point }}积分
+
+
+
+
+
+ 红包礼包
+ 赠送{{ levelList[curIndex].send_balance }}元红包
+
+
+
+
+
+ 优惠券礼包
+ 赠送{{ levelList[curIndex].coupon_length }}张优惠券
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/member/level_growth_rules.vue b/pages_tool/member/level_growth_rules.vue
new file mode 100644
index 0000000..69a684e
--- /dev/null
+++ b/pages_tool/member/level_growth_rules.vue
@@ -0,0 +1,274 @@
+
+
+
+
+
+ 成长值说明
+
+
+
+
+ 等级
+ 成长值
+
+
+ {{ item.level_name }}
+ {{ item.growth }}
+
+
+
+
+
+
+ 什么是成长值
+
+ 成长值是消费者在店铺成为会员后,通过消费计算出来的值。成长值决定会员等级,会员等级越高,所享受的会员权益和会员礼包就越多。
+
+
+
+
+ 如何获得成长值
+
+
+ 1、注册会员送x成长值。
+ 2、会员充值到余额送x成长值。
+ 3、会员签到送x成长值。
+ 4、会员消费x元,交易完成即可获得x个成长值。
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/member/modify_face.vue b/pages_tool/member/modify_face.vue
new file mode 100644
index 0000000..593b9e1
--- /dev/null
+++ b/pages_tool/member/modify_face.vue
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/member/other/cancelstatus.vue b/pages_tool/member/other/cancelstatus.vue
deleted file mode 100644
index 481ea04..0000000
--- a/pages_tool/member/other/cancelstatus.vue
+++ /dev/null
@@ -1,188 +0,0 @@
-
-
-
-
-
- 1
-
- 提交申请
- 您已提交申请,请耐心等待~
-
-
-
-
- 2
-
- 等待审核
- 等待审核中,审核通过后您的账号将直接被删除
-
-
-
-
-
-
-
- 审核通过,注销完成
- 您已成功注销账号,期待下一次与您相遇
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/other/cancelsuccess.vue b/pages_tool/member/other/cancelsuccess.vue
deleted file mode 100644
index a028ccf..0000000
--- a/pages_tool/member/other/cancelsuccess.vue
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
- 您已成功注销账号
- 待下次与您更好的相遇,如需再次使用,请重新注册
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/other/collection.vue b/pages_tool/member/other/collection.vue
deleted file mode 100644
index 9263921..0000000
--- a/pages_tool/member/other/collection.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{ item.sku_name }}
-
-
- ¥
- {{
- parseFloat(item.discount_price).toFixed(2).split('.')[0] }}
- .{{
- parseFloat(item.discount_price).toFixed(2).split('.')[1] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/pay_password.vue b/pages_tool/member/pay_password.vue
new file mode 100644
index 0000000..67e2774
--- /dev/null
+++ b/pages_tool/member/pay_password.vue
@@ -0,0 +1,278 @@
+
+
+ 请输入6位支付密码,建议不要使用重复或连续数字
+ 验证码已发送至{{ memberInfo.mobile | mobile }}请在下方输入4位数字验证码
+
+
+
+ {{ dynacodeData.codeText }}
+
+ 输入短信验证码
+ 请设置支付密码
+ 请再次输入
+ 确认
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_tool/member/finance/account/point.vue b/pages_tool/member/point.vue
similarity index 88%
rename from pages_tool/member/finance/account/point.vue
rename to pages_tool/member/point.vue
index 4526b74..3c4ae9d 100644
--- a/pages_tool/member/finance/account/point.vue
+++ b/pages_tool/member/point.vue
@@ -2,9 +2,10 @@
+ 'padding-top': menuButtonBounding.top + 'px',
+ 'height': menuButtonBounding.height + 'px'
+ }"
+ >
@@ -13,9 +14,8 @@
-
-
+
+
{{ pointInfo.point }}
当前积分
@@ -48,7 +48,7 @@
积分商城
-
-
-
-
-
-
-
-
-
-
-
- ¥
- {{ parseFloat(item.money) }}
-
-
- ¥
- {{ parseFloat(item.money) }}
-
-
- {{ parseFloat(item.discount) }}
- 折
-
-
- 满{{ item.at_least }}元可用
- 无门槛优惠券
-
-
-
-
- {{ item.coupon_name }}
- 指定商品
- (最大优惠{{ item.discount_limit
- }}元)
- {{
- item.use_channel_name }}
-
-
- 有效期:{{ $util.timeStampTurnTime(item.end_time) }}
-
- 有效期:长期有效
-
-
- 去使用
- 已使用
- 已过期
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/rights/level.vue b/pages_tool/member/rights/level.vue
deleted file mode 100644
index 2e131f2..0000000
--- a/pages_tool/member/rights/level.vue
+++ /dev/null
@@ -1,391 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{ memberInfo.nickname }}
- 当前等级:{{ memberInfo.member_level_name }}
-
-
-
- 成长规则
-
-
-
-
-
-
-
-
-
-
-
- {{ levelList[curIndex].level_name }}
- 当前等级
-
- 当前成长值
-
- {{
- growth }}
-
-
-
-
- 再获得{{ levelList[curIndex + 1].needGrowth > 0 ? levelList[curIndex +
- 1].needGrowth : 0 }}成长值成为{{
- levelList[curIndex + 1].level_name
- }}
-
-
-
- 您现在已经是最高等级
-
-
-
-
-
- 再获得{{ levelList[curIndex].needGrowth }}成长值成为{{ levelList[curIndex].level_name }}
-
-
-
-
-
-
-
-
- 会员权益
-
-
-
- 包邮服务
- 提供商品包邮服务
-
-
-
-
-
- 享受消费折扣服务
- 不享受任何消费折扣和其他权益
- 提供{{ levelList[curIndex].consume_discount }}折消费折扣
-
-
-
-
-
- 享受积分回馈服务
- 提供{{ levelList[curIndex].point_feedback }}倍积分回馈倍率
-
-
-
-
-
- 会员礼包
-
-
-
- 积分礼包
- 赠送{{ levelList[curIndex].send_point }}积分
-
-
-
-
-
- 红包礼包
- 赠送{{ levelList[curIndex].send_balance }}元红包
-
-
-
-
-
- 优惠券礼包
- 赠送{{ levelList[curIndex].coupon_length }}张优惠券
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/rights/level_growth_rules.vue b/pages_tool/member/rights/level_growth_rules.vue
deleted file mode 100644
index fc264a4..0000000
--- a/pages_tool/member/rights/level_growth_rules.vue
+++ /dev/null
@@ -1,274 +0,0 @@
-
-
-
-
-
- 成长值说明
-
-
-
-
- 等级
- 成长值
-
-
- {{ item.level_name }}
- {{ item.growth }}
-
-
-
-
-
-
- 什么是成长值
-
- 成长值是消费者在店铺成为会员后,通过消费计算出来的值。成长值决定会员等级,会员等级越高,所享受的会员权益和会员礼包就越多。
-
-
-
-
- 如何获得成长值
-
-
- 1、注册会员送x成长值。
- 2、会员充值到余额送x成长值。
- 3、会员签到送x成长值。
- 4、会员消费x元,交易完成即可获得x个成长值。
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_tool/member/finance/transaction/withdrawal.vue b/pages_tool/member/withdrawal.vue
similarity index 88%
rename from pages_tool/member/finance/transaction/withdrawal.vue
rename to pages_tool/member/withdrawal.vue
index c839671..0efa35e 100644
--- a/pages_tool/member/finance/transaction/withdrawal.vue
+++ b/pages_tool/member/withdrawal.vue
@@ -30,15 +30,21 @@
\ No newline at end of file
diff --git a/pages_tool/notice/list.vue b/pages_tool/notice/list.vue
index bacc3da..9d9c465 100644
--- a/pages_tool/notice/list.vue
+++ b/pages_tool/notice/list.vue
@@ -28,15 +28,20 @@
-
+
diff --git a/pages_tool/order/evaluate.vue b/pages_tool/order/evaluate.vue
index 28ba68e..1f01bdc 100644
--- a/pages_tool/order/evaluate.vue
+++ b/pages_tool/order/evaluate.vue
@@ -6,31 +6,27 @@
-
+
{{ item.sku_name }}
描述相符
-
+
-
- 好评
- 中评
- 差评
+ 好评
+ 中评
+ 差评
@@ -39,24 +35,20 @@
-
+
{{ goodsEvalList[index].content.length }}/200
-
+
{{ goodsEvalList[index].again_content.length }}/200
-
+
-
+
{{ imgList[index].length ? 6 - imgList[index].length : 0 }}/6
@@ -67,8 +59,7 @@
-
+
匿名
@@ -80,17 +71,16 @@
\ No newline at end of file
diff --git a/pages_tool/order/logistics.vue b/pages_tool/order/logistics.vue
index 371b60b..90f4522 100644
--- a/pages_tool/order/logistics.vue
+++ b/pages_tool/order/logistics.vue
@@ -1,27 +1,22 @@
-
-
+
+
{{ packageItem.package_name }}
-
+
-
+
- {{ goodsItem.sku_name
- }}
+ {{ goodsItem.sku_name }}
@@ -36,9 +31,7 @@
-
-
-
+
承运公司: {{ packageItem.express_company_name }}
@@ -55,14 +48,16 @@
-
+
- {{ traceItem.remark
- }}
- {{
- traceItem.datetime }}
+ {{ traceItem.remark }}
+ {{ traceItem.datetime }}
@@ -81,9 +76,6 @@
diff --git a/pages_tool/order/refund_type_select.vue b/pages_tool/order/refund_type_select.vue
index 19975d4..8ca80fd 100644
--- a/pages_tool/order/refund_type_select.vue
+++ b/pages_tool/order/refund_type_select.vue
@@ -25,97 +25,96 @@
-
\ No newline at end of file
diff --git a/pages_tool/pay/cashier.vue b/pages_tool/pay/cashier.vue
index abc2a58..72cfdd1 100644
--- a/pages_tool/pay/cashier.vue
+++ b/pages_tool/pay/cashier.vue
@@ -7,17 +7,15 @@
¥
{{ payInfo.pay_money | moneyFormat }}
-
+
-
+
{{ item.name }}
-
+
@@ -33,13 +31,11 @@
-
\ No newline at end of file
diff --git a/pages_tool/pay/wx_pay.vue b/pages_tool/pay/wx_pay.vue
index d6af337..f9af381 100644
--- a/pages_tool/pay/wx_pay.vue
+++ b/pages_tool/pay/wx_pay.vue
@@ -12,15 +12,15 @@ export default {
name: 'wx_pay',
data() {
return {
- show: true,
- wx_alipay: "",
- out_trade_no: ""
+ show : true,
+ wx_alipay : "",
+ out_trade_no : ""
};
},
onLoad(options) {
this.wx_alipay = options.wx_alipay || '';
this.out_trade_no = options.out_trade_no || '';
- if (!this.$util.isWeiXin() && this.wx_alipay) {
+ if(!this.$util.isWeiXin() && this.wx_alipay){
this.show = false;
location.href = this.wx_alipay;
}
@@ -36,7 +36,7 @@ export default {
success: res => {
if (res.code >= 0 && res.data) {
this.checkPayStatus();
- }
+ }
}
});
},
@@ -64,33 +64,29 @@ export default {
diff --git a/pages_tool/recharge/order_list.vue b/pages_tool/recharge/order_list.vue
index c35f44e..8b7870e 100644
--- a/pages_tool/recharge/order_list.vue
+++ b/pages_tool/recharge/order_list.vue
@@ -9,14 +9,11 @@
{{ orderItem.order_no }}
- {{ $util.timeStampTurnTime(orderItem.create_time)
- }}
+ {{ $util.timeStampTurnTime(orderItem.create_time) }}
-
- 充值成功
-
+ 充值成功
¥
@@ -43,13 +40,17 @@
diff --git a/pages_tool/webview/webview.vue b/pages_tool/webview/webview.vue
index bd3a940..62f7d93 100644
--- a/pages_tool/webview/webview.vue
+++ b/pages_tool/webview/webview.vue
@@ -11,11 +11,14 @@
diff --git a/pages_tool/components/img-cropping/cropping.vue b/components/img-cropping/img-cropping.vue
similarity index 100%
rename from pages_tool/components/img-cropping/cropping.vue
rename to components/img-cropping/img-cropping.vue
diff --git a/pages_promotion/components/l-time/l-time.vue b/components/l-time/l-time.vue
similarity index 100%
rename from pages_promotion/components/l-time/l-time.vue
rename to components/l-time/l-time.vue
diff --git a/pages_promotion/components/l-time/time.js b/components/l-time/time.js
similarity index 100%
rename from pages_promotion/components/l-time/time.js
rename to components/l-time/time.js
diff --git a/components/mescroll/mescroll-uni.vue b/components/mescroll/mescroll-uni.vue
index ccc425a..3d0ef07 100644
--- a/components/mescroll/mescroll-uni.vue
+++ b/components/mescroll/mescroll-uni.vue
@@ -62,8 +62,6 @@
// 引入回到顶部组件
import MescrollTop from './components/mescroll-top.vue';
- import nsLoading from '@/components/ns-loading/ns-loading.vue';
-
export default {
name: 'mescroll-uni',
components: {
diff --git a/pages_tool/components/myp-one/myp-one.vue b/components/myp-one/myp-one.vue
similarity index 100%
rename from pages_tool/components/myp-one/myp-one.vue
rename to components/myp-one/myp-one.vue
diff --git a/components/ns-adv/ns-adv.vue b/components/ns-adv/ns-adv.vue
index 0d44df7..978f3bd 100644
--- a/components/ns-adv/ns-adv.vue
+++ b/components/ns-adv/ns-adv.vue
@@ -1,120 +1,120 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/components/ns-birthday-gift/ns-birthday-gift.vue b/components/ns-birthday-gift/ns-birthday-gift.vue
index e34abb7..254126c 100644
--- a/components/ns-birthday-gift/ns-birthday-gift.vue
+++ b/components/ns-birthday-gift/ns-birthday-gift.vue
@@ -80,14 +80,10 @@
-
-
\ No newline at end of file
diff --git a/components/ns-goods-action-icon/ns-goods-action-icon.vue b/components/ns-goods-action-icon/ns-goods-action-icon.vue
index f958edd..dded95b 100644
--- a/components/ns-goods-action-icon/ns-goods-action-icon.vue
+++ b/components/ns-goods-action-icon/ns-goods-action-icon.vue
@@ -20,7 +20,6 @@
\ No newline at end of file
diff --git a/components/ns-goods-sku/ns-goods-sku.vue b/components/ns-goods-sku/ns-goods-sku.vue
index a7441d7..0c06877 100644
--- a/components/ns-goods-sku/ns-goods-sku.vue
+++ b/components/ns-goods-sku/ns-goods-sku.vue
@@ -214,7 +214,7 @@
\ No newline at end of file
diff --git a/components/ns-new-gift/ns-new-gift.vue b/components/ns-new-gift/ns-new-gift.vue
index a6553c9..eed5fa9 100644
--- a/components/ns-new-gift/ns-new-gift.vue
+++ b/components/ns-new-gift/ns-new-gift.vue
@@ -75,12 +75,8 @@
\ No newline at end of file
diff --git a/pages_tool/components/ns-progress/ns-progress.vue b/components/ns-progress/ns-progress.vue
similarity index 100%
rename from pages_tool/components/ns-progress/ns-progress.vue
rename to components/ns-progress/ns-progress.vue
diff --git a/components/ns-select-time/ns-select-time.vue b/components/ns-select-time/ns-select-time.vue
index 15a5553..8d39484 100644
--- a/components/ns-select-time/ns-select-time.vue
+++ b/components/ns-select-time/ns-select-time.vue
@@ -30,12 +30,8 @@
\ No newline at end of file
diff --git a/pages_goods/category.vue b/pages_goods/category.vue
index 57902b4..e43b94a 100644
--- a/pages_goods/category.vue
+++ b/pages_goods/category.vue
@@ -25,15 +25,11 @@
-
-
-
\ No newline at end of file
diff --git a/pages_goods/components/ns-goods-action-button/ns-goods-action-button.vue b/pages_goods/components/ns-goods-action-button/ns-goods-action-button.vue
deleted file mode 100644
index 7798141..0000000
--- a/pages_goods/components/ns-goods-action-button/ns-goods-action-button.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-
- {{ disabledText }}
-
- {{ textPrice }}
- {{ text }}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages_goods/components/ns-goods-action-icon/ns-goods-action-icon.vue b/pages_goods/components/ns-goods-action-icon/ns-goods-action-icon.vue
deleted file mode 100644
index f958edd..0000000
--- a/pages_goods/components/ns-goods-action-icon/ns-goods-action-icon.vue
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{ text }}
- {{ cornerMark > 99 ? '99+' : cornerMark }}
-
-
-
-
-
-
-
-
diff --git a/pages_goods/components/ns-goods-action/ns-goods-action.vue b/pages_goods/components/ns-goods-action/ns-goods-action.vue
deleted file mode 100644
index 4e9e0f5..0000000
--- a/pages_goods/components/ns-goods-action/ns-goods-action.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
diff --git a/pages_goods/components/ns-goods-promotion/ns-goods-promotion.vue b/pages_goods/components/ns-goods-promotion/ns-goods-promotion.vue
deleted file mode 100644
index d102e84..0000000
--- a/pages_goods/components/ns-goods-promotion/ns-goods-promotion.vue
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
-
- 限时折扣
- 当前商品正在参加{{ item.promotion_name }}
-
-
-
-
-
- 团购
- 当前商品正在参加{{ item.promotion_name }}
-
-
-
-
- 拼团
- 当前商品正在参加{{ item.promotion_name }}
-
-
-
-
- 秒杀
- 当前商品正在参加{{ item.promotion_name }}
-
-
-
-
- 专题活动
- 当前商品正在参加{{ item.promotion_name }}
-
-
-
-
- 砍价
- 当前商品正在参加{{ item.promotion_name }}
-
-
-
-
- 拼团返利
- 当前商品正在参加{{ item.promotion_name }}
-
-
-
-
-
-
-
-
-
diff --git a/pages_goods/detail.vue b/pages_goods/detail.vue
index 875d0e2..e17cba1 100644
--- a/pages_goods/detail.vue
+++ b/pages_goods/detail.vue
@@ -521,38 +521,16 @@
\ No newline at end of file
diff --git a/pages_order/detail.vue b/pages_order/detail.vue
index 659d78b..16202b9 100644
--- a/pages_order/detail.vue
+++ b/pages_order/detail.vue
@@ -1,7 +1,8 @@
-
+
@@ -64,9 +65,9 @@
{{ orderData.delivery_store_name }}
@@ -108,8 +109,11 @@
复制
-
-
+
+
@@ -121,7 +125,8 @@
-
+
{{ goodsItem.sku_name }}
@@ -129,16 +134,18 @@
{{ x.spec_value_name }}
- {{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }}
-
+ {{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }}
{{ $lang('common.currencySymbol') }}
- {{ parseFloat(goodsItem.price).toFixed(2).split('.')[0] }}
- .{{ parseFloat(goodsItem.price).toFixed(2).split('.')[1] }}
+ {{
+ parseFloat(goodsItem.price).toFixed(2).split('.')[0]
+ }}
+ .{{
+ parseFloat(goodsItem.price).toFixed(2).split('.')[1] }}
@@ -152,8 +159,10 @@
次卡抵扣
-{{ $lang('common.currencySymbol') }}
- {{ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[0] }}
- .{{ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[1] }}
+ {{
+ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[0] }}
+ .{{
+ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[1] }}
@@ -164,7 +173,8 @@
{{ item.value.title }}:
-
+
@@ -176,13 +186,15 @@
-
+
{{ orderData.order_status == 10 ? '申请售后' : '申请退款' }}
-
+
{{ orderData.order_status == 10 ? '查看售后' : '查看退款' }}
@@ -315,11 +327,12 @@
我的卡包:
- 查看
+ 查看
-
-
+
@@ -608,216 +633,209 @@
\ No newline at end of file
diff --git a/pages_order/detail_point.vue b/pages_order/detail_point.vue
index a62cc38..37ee721 100644
--- a/pages_order/detail_point.vue
+++ b/pages_order/detail_point.vue
@@ -1,14 +1,18 @@
-
+
-
-
-
+
+
+
- {{ orderData.order_status == 0 ? '待支付' : orderData.order_status == 1 ? '已完成' : orderData.order_status == -1 ? '已关闭' : '' }}
+ {{ orderData.order_status == 0 ? '待支付' : orderData.order_status == 1 ? '已完成' :
+ orderData.order_status == -1 ? '已关闭' : '' }}
@@ -79,7 +83,7 @@
-
- 全部
- 全部
+
+ @click="changeCategory(item.category_id)">
{{ item.category_name }}
-
+
-
+
@@ -132,22 +132,16 @@
@@ -165,8 +159,10 @@ export default {
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important;
}
+
.quick-nav {
margin-bottom: 20rpx;
+
.quick-nav-item {
display: flex;
align-items: center;
@@ -190,6 +186,7 @@ export default {
}
}
}
+
.content {
overflow: hidden;
padding: 0 30rpx 160rpx;
@@ -202,12 +199,14 @@ export default {
background-size: 100%;
background-repeat: no-repeat;
box-sizing: border-box;
+
.goods-item {
margin-bottom: 20rpx;
background: #ffffff;
padding: $padding;
display: flex;
border-radius: 10rpx;
+
&:last-child {
margin-bottom: 0;
}
@@ -221,6 +220,7 @@ export default {
border-radius: 10rpx;
overflow: hidden;
flex-shrink: 0;
+
image {
width: 100%;
height: 100%;
@@ -241,6 +241,7 @@ export default {
.goods-name {
width: 100%;
line-height: 1.3;
+
.name {
line-height: 1.3;
word-break: break-all;
@@ -250,10 +251,12 @@ export default {
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
+
.label-list {
display: flex;
align-items: center;
margin-top: 6rpx;
+
.label-item {
padding: 4rpx 10rpx;
font-size: $font-size-tag;
@@ -285,6 +288,7 @@ export default {
padding: 0 $padding;
border-radius: 50rpx;
border: 2rpx solid $base-color;
+
text {
color: $base-color;
border-radius: 40rpx;
@@ -299,6 +303,7 @@ export default {
}
}
}
+
.active-btn {
position: fixed;
bottom: 40rpx;
@@ -312,10 +317,12 @@ export default {
border-radius: 50rpx;
background-color: $base-color;
color: #fff;
+
.btn {
flex: 1;
text-align: center;
}
+
.share-btn {
margin: 0;
padding: 0;
@@ -355,6 +362,7 @@ export default {
border: none;
line-height: 1;
height: auto;
+
text {
margin-top: 20rpx;
font-size: $font-size-tag;
@@ -367,6 +375,7 @@ export default {
font-size: 80rpx;
line-height: initial;
}
+
.icon-fuzhilianjie,
.icon-pengyouquan,
.icon-haowuquan,
@@ -383,39 +392,48 @@ export default {
text-align: center;
}
}
+
.poster-layer {
.generate-poster {
padding: 40rpx 0;
+
.iconfont {
font-size: 80rpx;
color: #07c160;
line-height: initial;
}
- > view {
+
+ >view {
text-align: center;
+
&:last-child {
margin-top: 20rpx;
}
}
}
+
.image-wrap {
width: 64%;
height: 854rpx;
margin: 60rpx auto 40rpx auto;
box-shadow: 0 0 32rpx rgba(100, 100, 100, 0.3);
+
image {
width: 480rpx;
height: 854rpx;
}
}
+
.msg {
padding: 40rpx;
}
+
.save {
text-align: center;
height: 80rpx;
line-height: 80rpx;
}
+
.close {
position: absolute;
top: 0;
diff --git a/pages_promotion/fenxiao/index.vue b/pages_promotion/fenxiao/index.vue
index dc128d6..178e244 100644
--- a/pages_promotion/fenxiao/index.vue
+++ b/pages_promotion/fenxiao/index.vue
@@ -261,12 +261,8 @@
\ No newline at end of file
diff --git a/pages_promotion/fenxiao/ranking_list.vue b/pages_promotion/fenxiao/ranking_list.vue
index 6a134eb..32af31b 100644
--- a/pages_promotion/fenxiao/ranking_list.vue
+++ b/pages_promotion/fenxiao/ranking_list.vue
@@ -3,17 +3,22 @@
-
+
-
+
- {{info.nickname}}
+ {{ info.nickname }}
- 点击提现
- 我的团队
+ 点击提现
+ 我的团队
@@ -26,7 +31,7 @@
分销佣金
- {{ info.today_commission}}元
+ {{ info.today_commission }}元
@@ -50,7 +55,7 @@
推广人数
- {{ info.one_child_num}}人
+ {{ info.one_child_num }}人
@@ -67,20 +72,21 @@
- 佣金排行
- 推广排行
+ 佣金排行
+ 推广排行
{{ index + 1 }}
-
+
{{ item.nickname }}
- ¥{{ item.total_commission|moneyFormat }}
+ ¥{{ item.total_commission | moneyFormat }}
{{ item.child_num }}人
@@ -97,337 +103,331 @@
diff --git a/pages_promotion/fenxiao/relation.vue b/pages_promotion/fenxiao/relation.vue
index 36927b5..df61a30 100644
--- a/pages_promotion/fenxiao/relation.vue
+++ b/pages_promotion/fenxiao/relation.vue
@@ -73,9 +73,6 @@
\ No newline at end of file
diff --git a/pages_promotion/point/detail.vue b/pages_promotion/point/detail.vue
index 5dfd5ad..b035f3f 100644
--- a/pages_promotion/point/detail.vue
+++ b/pages_promotion/point/detail.vue
@@ -5,7 +5,8 @@
-
+
+
@@ -13,12 +14,21 @@
-
+
-
+
+
+
+
-
@@ -27,7 +37,8 @@
{{ pointInfo.point }}积分
- +{{ $lang('common.currencySymbol') }}{{ pointInfo.exchange_price }}
+ +{{ $lang('common.currencySymbol') }}{{ pointInfo.exchange_price
+ }}
@@ -35,26 +46,36 @@
{{ pointInfo.price }}
-
- 库存:{{ pointInfo.stock }}{{ pointInfo.stock >= 0 ? pointInfo.unit : '' }}
+
+ 库存:{{ pointInfo.stock }}{{
+ pointInfo.stock >= 0 ?
+ pointInfo.unit : '' }}
库存:无限{{ pointInfo.stock >= 0 ? pointInfo.unit : '' }}
- {{ isEnEnv ? pointInfo.en_goods_name : pointInfo.goods_name }}
+ {{ isEnEnv ? pointInfo.en_goods_name :
+ pointInfo.goods_name
+ }}
{{ pointInfo.name }}
- 内含{{ pointInfo.balance }}元
+ 内含{{ pointInfo.balance
+ }}元
无门槛优惠券
- {{ '满' + pointInfo.at_least + '减' + pointInfo.money }}
+ {{ '满' + pointInfo.at_least +
+ '减' + pointInfo.money
+ }}
满{{ pointInfo.at_least }}元
{{ pointInfo.discount }}折
- 最多优惠{{ pointInfo.discount_limit }}元
+ 最多优惠{{
+ pointInfo.discount_limit }}元
- {{ pointInfo.validity_type == 1 ? '领取之日起' + pointInfo.fixed_term + '天内有效' : $util.timeStampTurnTime(pointInfo.end_time) + '到期' }}
+ {{ pointInfo.validity_type == 1 ? '领取之日起' + pointInfo.fixed_term + '天内有效' :
+ $util.timeStampTurnTime(pointInfo.end_time) + '到期' }}
@@ -71,22 +92,23 @@
-
@@ -136,7 +165,8 @@
-
+
{{ item.service_name }}
@@ -144,7 +174,8 @@
-
+
@@ -152,41 +183,42 @@
- 兑换详情
+
+ 兑换详情
+
-
+
+
暂无兑换详情!
-
+
-
+
-
-
-
+
+
+
-
+
@@ -195,19 +227,10 @@
\ No newline at end of file
diff --git a/pages_promotion/point/order_list.vue b/pages_promotion/point/order_list.vue
index 66b6a83..7ed130c 100644
--- a/pages_promotion/point/order_list.vue
+++ b/pages_promotion/point/order_list.vue
@@ -84,9 +84,6 @@
-
-
\ No newline at end of file
diff --git a/pages_tool/contact/contact.vue b/pages_tool/contact/contact.vue
index 47a76d5..2f7bbbc 100644
--- a/pages_tool/contact/contact.vue
+++ b/pages_tool/contact/contact.vue
@@ -143,13 +143,9 @@
diff --git a/pages_tool/login/find.vue b/pages_tool/login/find.vue
index bf8281f..07d65a9 100644
--- a/pages_tool/login/find.vue
+++ b/pages_tool/login/find.vue
@@ -87,11 +87,7 @@
\ No newline at end of file
diff --git a/pages_tool/member/address.vue b/pages_tool/member/address.vue
index 055f213..82ff235 100644
--- a/pages_tool/member/address.vue
+++ b/pages_tool/member/address.vue
@@ -101,10 +101,6 @@ import {
Weixin
} from 'common/js/wx-jssdk.js';
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
-import nsLogin from '@/components/ns-login/ns-login.vue';
-import loadingCover from '@/components/loading-cover/loading-cover.vue';
-import nsEmpty from '@/components/ns-empty/ns-empty.vue';
-
// #ifdef MP-WEIXIN
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
// #endif
@@ -112,9 +108,6 @@ import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
export default {
components: {
MescrollUni,
- nsLogin,
- loadingCover,
- nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
diff --git a/pages_tool/member/address_edit.vue b/pages_tool/member/address_edit.vue
index d028016..cd0fa86 100644
--- a/pages_tool/member/address_edit.vue
+++ b/pages_tool/member/address_edit.vue
@@ -79,14 +79,10 @@
\ No newline at end of file
diff --git a/pages_tool/member/card_buy.vue b/pages_tool/member/card_buy.vue
index 9597f20..d188504 100644
--- a/pages_tool/member/card_buy.vue
+++ b/pages_tool/member/card_buy.vue
@@ -6,7 +6,8 @@
-
+
{{ memberInfo.nickname }}
@@ -22,26 +23,27 @@
:circular="swiperConfig.circular" :previous-margin="swiperConfig.previousMargin"
:next-margin="swiperConfig.nextMargin" @change="swiperChange" @animationfinish="animationfinish"
:current="curIndex">
-
+
+ ? 'item-left'
+ : i === curIndex + 1
+ ? 'item-right'
+ : 'item-center'
+ ]">
-
-
+
+
- {{ levelList[curIndex].level_name }}
- {{ levelList[curIndex].level_name }}可享受消费折扣和
- 会员大礼包等权益
-
+
+ {{ levelList[curIndex].level_name }}
+ {{
+ levelList[curIndex].level_name }}可享受消费折扣和
+
+ 会员大礼包等权益
+
@@ -78,8 +85,10 @@
-
-
+
+
{{ cardType[item.key].name }}
@@ -172,7 +181,8 @@
购买既视为同意
- 《{{ agreement.title }}》
+ 《{{ agreement.title
+ }}》
@@ -198,7 +208,8 @@
-
+
@@ -209,221 +220,210 @@
\ No newline at end of file
diff --git a/pages_tool/member/collection.vue b/pages_tool/member/collection.vue
index 5153e8b..66a83a5 100644
--- a/pages_tool/member/collection.vue
+++ b/pages_tool/member/collection.vue
@@ -35,10 +35,7 @@
diff --git a/pages_tool/order/refund.vue b/pages_tool/order/refund.vue
index 8d57d4e..7f7e6cb 100644
--- a/pages_tool/order/refund.vue
+++ b/pages_tool/order/refund.vue
@@ -104,11 +104,7 @@
+
+
diff --git a/pages_tool/components/uni-calendar/calendar.js b/uni_modules/uni-calendar/components/uni-calendar/calendar.js
similarity index 100%
rename from pages_tool/components/uni-calendar/calendar.js
rename to uni_modules/uni-calendar/components/uni-calendar/calendar.js
diff --git a/pages_tool/components/uni-calendar/uni-calendar-item.vue b/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue
similarity index 100%
rename from pages_tool/components/uni-calendar/uni-calendar-item.vue
rename to uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue
diff --git a/pages_tool/components/uni-calendar/uni-calendar.vue b/uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue
similarity index 100%
rename from pages_tool/components/uni-calendar/uni-calendar.vue
rename to uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue
diff --git a/pages_tool/components/uni-calendar/util.js b/uni_modules/uni-calendar/components/uni-calendar/util.js
similarity index 100%
rename from pages_tool/components/uni-calendar/util.js
rename to uni_modules/uni-calendar/components/uni-calendar/util.js
diff --git a/components/uni-count-down/uni-count-down.vue b/uni_modules/uni-count-down/components/uni-count-down/uni-count-down.vue
similarity index 95%
rename from components/uni-count-down/uni-count-down.vue
rename to uni_modules/uni-count-down/components/uni-count-down/uni-count-down.vue
index 2bdf21d..333817c 100644
--- a/components/uni-count-down/uni-count-down.vue
+++ b/uni_modules/uni-count-down/components/uni-count-down/uni-count-down.vue
@@ -1,252 +1,252 @@
-
-
-
- {{ d }}
-
- {{ showColon ? '天' : '天' }}
-
- {{ h }}
-
- {{ showColon ? ':' : '时' }}
-
- {{ i }}
-
- {{ showColon ? ':' : '分' }}
-
- {{ s }}
-
- 秒
-
-
-
-
+
+
+
+ {{ d }}
+
+ {{ showColon ? '天' : '天' }}
+
+ {{ h }}
+
+ {{ showColon ? ':' : '时' }}
+
+ {{ i }}
+
+ {{ showColon ? ':' : '分' }}
+
+ {{ s }}
+
+ 秒
+
+
+
+
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/changelog.md b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/changelog.md
new file mode 100644
index 0000000..401063e
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/changelog.md
@@ -0,0 +1,85 @@
+## 2.2.2(2021-12-10)
+- 修复 clear-icon 属性在小程序平台不生效的 bug
+## 2.2.1(2021-12-10)
+- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的 bug
+## 2.2.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
+## 2.1.5(2021-11-09)
+- 新增 提供组件设计资源,组件样式调整
+## 2.1.4(2021-09-10)
+- 修复 hide-second 在移动端的 bug
+- 修复 单选赋默认值时,赋值日期未高亮的 bug
+- 修复 赋默认值时,移动端未正确显示时间的 bug
+## 2.1.3(2021-09-09)
+- 新增 hide-second 属性,支持只使用时分,隐藏秒
+## 2.1.2(2021-09-03)
+- 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次
+- 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法
+- 优化 调整字号大小,美化日历界面
+- 修复 因国际化导致的 placeholder 失效的 bug
+## 2.1.1(2021-08-24)
+- 新增 支持国际化
+- 优化 范围选择器在 pc 端过宽的问题
+## 2.1.0(2021-08-09)
+- 新增 适配 vue3
+## 2.0.19(2021-08-09)
+- 新增 支持作为 uni-forms 子组件相关功能
+- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的 bug
+## 2.0.18(2021-08-05)
+- 修复 type 属性动态赋值无效的 bug
+- 修复 ‘确认’按钮被 tabbar 遮盖 bug
+- 修复 组件未赋值时范围选左、右日历相同的 bug
+## 2.0.17(2021-08-04)
+- 修复 范围选未正确显示当前值的 bug
+- 修复 h5 平台(移动端)报错 'cale' of undefined 的 bug
+## 2.0.16(2021-07-21)
+- 新增 return-type 属性支持返回 date 日期对象
+## 2.0.15(2021-07-14)
+- 修复 单选日期类型,初始赋值后不在当前日历的 bug
+- 新增 clearIcon 属性,显示框的清空按钮可配置显示隐藏(仅 pc 有效)
+- 优化 移动端移除显示框的清空按钮,无实际用途
+## 2.0.14(2021-07-14)
+- 修复 组件赋值为空,界面未更新的 bug
+- 修复 start 和 end 不能动态赋值的 bug
+- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的 bug
+## 2.0.13(2021-07-08)
+- 修复 范围选择不能动态赋值的 bug
+## 2.0.12(2021-07-08)
+- 修复 范围选择的初始时间在一个月内时,造成无法选择的bug
+## 2.0.11(2021-07-08)
+- 优化 弹出层在超出视窗边缘定位不准确的问题
+## 2.0.10(2021-07-08)
+- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的 bug
+- 优化 弹出层在超出视窗边缘被遮盖的问题
+## 2.0.9(2021-07-07)
+- 新增 maskClick 事件
+- 修复 特殊情况日历 rpx 布局错误的 bug,rpx -> px
+- 修复 范围选择时清空返回值不合理的bug,['', ''] -> []
+## 2.0.8(2021-07-07)
+- 新增 日期时间显示框支持插槽
+## 2.0.7(2021-07-01)
+- 优化 添加 uni-icons 依赖
+## 2.0.6(2021-05-22)
+- 修复 图标在小程序上不显示的 bug
+- 优化 重命名引用组件,避免潜在组件命名冲突
+## 2.0.5(2021-05-20)
+- 优化 代码目录扁平化
+## 2.0.4(2021-05-12)
+- 新增 组件示例地址
+## 2.0.3(2021-05-10)
+- 修复 ios 下不识别 '-' 日期格式的 bug
+- 优化 pc 下弹出层添加边框和阴影
+## 2.0.2(2021-05-08)
+- 修复 在 admin 中获取弹出层定位错误的bug
+## 2.0.1(2021-05-08)
+- 修复 type 属性向下兼容,默认值从 date 变更为 datetime
+## 2.0.0(2021-04-30)
+- 支持日历形式的日期+时间的范围选择
+ > 注意:此版本不向后兼容,不再支持单独时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)
+## 1.0.6(2021-03-18)
+- 新增 hide-second 属性,时间支持仅选择时、分
+- 修复 选择跟显示的日期不一样的 bug
+- 修复 chang事件触发2次的 bug
+- 修复 分、秒 end 范围错误的 bug
+- 优化 更好的 nvue 适配
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/package.json b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/package.json
new file mode 100644
index 0000000..d2959e5
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/package.json
@@ -0,0 +1,90 @@
+{
+ "id": "uni-datetime-picker",
+ "displayName": "uni-datetime-picker 日期选择器",
+ "version": "2.2.2",
+ "description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
+ "keywords": [
+ "uni-datetime-picker",
+ "uni-ui",
+ "uniui",
+ "日期时间选择器",
+ "日期时间"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+ "dcloudext": {
+ "category": [
+ "前端组件",
+ "通用组件"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ },
+ "uni_modules": {
+ "dependencies": [
+ "uni-scss",
+ "uni-icons"
+ ],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "n"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/readme.md b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/readme.md
new file mode 100644
index 0000000..940c0b2
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/readme.md
@@ -0,0 +1,21 @@
+
+
+> `重要通知:组件升级更新 2.0.0 后,支持日期+时间范围选择,组件 ui 将使用日历选择日期,ui 变化较大,同时支持 PC 和 移动端。此版本不向后兼容,不再支持单独的时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)。若仍需使用旧版本,可在插件市场下载*非uni_modules版本*,旧版本将不再维护`
+
+## DatetimePicker 时间选择器
+
+> **组件名:uni-datetime-picker**
+> 代码块: `uDatetimePicker`
+
+
+该组件的优势是,支持**时间戳**输入和输出(起始时间、终止时间也支持时间戳),可**同时选择**日期和时间。
+
+若只是需要单独选择日期和时间,不需要时间戳输入和输出,可使用原生的 picker 组件。
+
+**_点击 picker 默认值规则:_**
+
+- 若设置初始值 value, 会显示在 picker 显示框中
+- 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/components/uni-drawer/uni-drawer.vue b/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue
similarity index 100%
rename from components/uni-drawer/uni-drawer.vue
rename to uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue
diff --git a/components/uni-grid-item/uni-grid-item.vue b/uni_modules/uni-grid-item/components/uni-grid-item/uni-grid-item.vue
similarity index 93%
rename from components/uni-grid-item/uni-grid-item.vue
rename to uni_modules/uni-grid-item/components/uni-grid-item/uni-grid-item.vue
index e7fb018..c0027de 100644
--- a/components/uni-grid-item/uni-grid-item.vue
+++ b/uni_modules/uni-grid-item/components/uni-grid-item/uni-grid-item.vue
@@ -19,12 +19,8 @@
diff --git a/pages_goods/cart.vue b/pages_goods/cart.vue
index 06228d7..379b051 100644
--- a/pages_goods/cart.vue
+++ b/pages_goods/cart.vue
@@ -366,19 +366,10 @@
diff --git a/pages_goods/category.vue b/pages_goods/category.vue
index e43b94a..2ed3067 100644
--- a/pages_goods/category.vue
+++ b/pages_goods/category.vue
@@ -25,15 +25,7 @@
diff --git a/pages_goods/list.vue b/pages_goods/list.vue
index b406c53..f4d0517 100644
--- a/pages_goods/list.vue
+++ b/pages_goods/list.vue
@@ -307,19 +307,9 @@
diff --git a/pages_promotion/fenxiao/order.vue b/pages_promotion/fenxiao/order.vue
index 11f4ef5..df7c28f 100644
--- a/pages_promotion/fenxiao/order.vue
+++ b/pages_promotion/fenxiao/order.vue
@@ -42,7 +42,7 @@
{{ $lang('common.currencySymbol')
- }}
+ }}
{{
parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
.{{
@@ -96,18 +96,8 @@
diff --git a/pages_promotion/point/order_list.vue b/pages_promotion/point/order_list.vue
index 7ed130c..1f87102 100644
--- a/pages_promotion/point/order_list.vue
+++ b/pages_promotion/point/order_list.vue
@@ -1,36 +1,43 @@
-
-
+
+
{{ statusItem.name }}
-
-
+
+
-
+
-
+
-
+
-
+
@@ -42,9 +49,12 @@
积分
+
- {{ $lang('common.currencySymbol') }}
- {{ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
- .{{ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}
+ {{
+ $lang('common.currencySymbol') }}
+ {{
+ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}
+ .{{
+ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}
@@ -58,8 +68,10 @@