From b929e9d487632580cc28ac7b8bf9494f25ca8ca3 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期一, 18 三月 2024 14:45:37 +0800 Subject: [PATCH] 代码分包 --- packageBookService/pages/bookServices/webpage/index.wxml | 0 packageBookService/pages/bookServices/examination/questionList/index.wxml | 0 packagePersonal/pages/sampleBooks/index.wxml | 0 packagePersonal/pages/activateProduct/index.wxss | 0 packageDomain/pages/sampleBookList/index.wxss | 0 packagePersonal/pages/myCollection/index.js | 192 ++ packageBookService/pages/bookServices/examination/questionSchedule/index.json | 0 packageBookService/pages/bookServices/examination/questionOptions/index.wxss | 0 packageBookService/pages/bookServices/examination/questionSchedule/index.wxss | 0 packageDomain/pages/resourceDetails/myVideo/index.wxml | 0 packageBookService/pages/bookServices/detail/components/testResource/testResource.js | 133 + packageBookService/pages/bookServices/detail/components/tree/index.js | 253 ++ packageDomain/pages/resourceDetails/myAudio/index.json | 0 packageBookService/pages/bookServices/detail/components/tree/index.json | 12 packagePersonal/pages/activateProduct/index.js | 0 packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxss | 0 packageBookService/pages/bookServices/detail/components/brief/index.wxss | 0 packagePersonal/pages/personalCenter/myMassage/index.wxml | 2 packageBookService/pages/bookServices/examination/questionSchedule/index.js | 0 packagePersonal/pages/myMassage/massageDetail/index.js | 0 packageDomain/pages/sampleBookList/applicationForm/index.js | 306 +++ packageBookService/pages/bookServices/detail/components/suggest/suggest.js | 0 packagePersonal/pages/publishBooks/index.wxml | 0 packagePersonal/pages/feedBack/index.json | 0 packagePersonal/pages/aboutUs/index.wxss | 0 packageBookService/pages/bookServices/detail/components/tree/index.wxss | 0 packagePersonal/pages/publishBooks/index.js | 0 packageDomain/pages/resourceDetails/document/index.wxss | 0 packageBookService/pages/bookServices/webpage/index.wxss | 0 packagePersonal/pages/personalCenter/publishBooks/index.wxss | 1 packageDomain/pages/sampleBookList/index.wxml | 0 packagePersonal/pages/activateProduct/index.wxml | 0 packageBookService/pages/bookServices/detail/components/teachResource/index.json | 0 packageBookService/pages/bookServices/detail/components/brief/index.js | 0 packageBookService/pages/bookServices/examination/questionOptions/index.wxml | 0 packagePersonal/pages/feedBack/index.wxss | 0 packagePersonal/pages/personalCenter/myMassage/index.js | 66 packageBookService/pages/bookServices/webpage/index.json | 0 packageBookService/pages/bookServices/detail/components/learnResource/learnResource.json | 0 packageBookService/pages/bookServices/examination/questionSchedule/index.wxml | 0 packagePersonal/pages/feedBack/index.js | 0 packagePersonal/pages/myCollection/index.json | 0 packageBookService/pages/bookServices/detail/index.js | 1120 ++++++++++++ packageDomain/pages/resourceDetails/myVideo/index.wxss | 0 static/images/resourceDetailsMyAudio/video-bg.png | 0 packageBookService/pages/bookServices/detail/components/note/note.wxml | 0 packagePersonal/pages/personalCenter/myMassage/massageDetail/index.js | 66 packageBookService/pages/bookServices/detail/components/suggest/suggest.wxml | 0 packageDomain/pages/resourceDetails/myAudio/index.js | 0 packageDomain/pages/resourceDetails/document/index.json | 0 packagePersonal/pages/myMassage/massageDetail/index.json | 0 packageDomain/pages/sampleBookList/applicationForm/index.wxml | 0 packagePersonal/pages/aboutUs/index.wxml | 0 app.json | 92 packageDomain/pages/resourceDetails/document/index.js | 0 packageBookService/pages/bookServices/detail/components/tree/index.wxml | 0 packagePersonal/pages/personalCenter/publishBooks/index.json | 0 packageBookService/pages/bookServices/detail/components/brief/index.json | 0 packagePersonal/pages/myCollection/index.wxss | 0 packageDomain/pages/resourceDetails/myAudio/index.wxss | 0 packagePersonal/pages/myMassage/index.wxml | 0 packageBookService/pages/bookServices/list/index.wxml | 0 packagePersonal/pages/personalCenter/publishBooks/index.wxml | 2 pages/student/index.wxss | 1 packageDomain/pages/resourceDetails/document/index.wxml | 0 packagePersonal/pages/myOrder/index.json | 0 packageBookService/pages/bookServices/detail/index.wxml | 0 packagePersonal/pages/myOrder/index.js | 0 packageBookService/pages/bookServices/detail/components/suggest/suggest.json | 0 packageBookService/pages/bookServices/examination/examination.json | 12 services/home/home.js | 13 packagePersonal/pages/feedBack/index.wxml | 0 packagePersonal/pages/myMassage/massageDetail/index.wxss | 0 packagePersonal/pages/myMassage/index.json | 0 packageBookService/pages/bookServices/examination/examination.wxss | 0 packageDomain/pages/teacherCertification/index.wxss | 0 pages/student/index.json | 0 packageBookService/pages/bookServices/examination/examination.js | 1123 ++++++++++++ packagePersonal/pages/myMassage/index.js | 157 + packagePersonal/pages/myOrder/index.wxss | 0 packageBookService/pages/bookServices/list/index.js | 453 +++++ pages/personalCenter/index.js | 22 packageBookService/pages/bookServices/detail/components/testResource/testResource.json | 0 packageBookService/pages/bookServices/detail/components/note/note.json | 0 packageBookService/pages/bookServices/detail/components/teachResource/index.js | 0 packageBookService/pages/bookServices/examination/questionList/index.js | 0 packageBookService/pages/bookServices/detail/components/note/note.wxss | 0 packageBookService/pages/bookServices/webpage/index.js | 0 packageDomain/pages/resourceDetails/myVideo/index.json | 0 pages/home/home.json | 4 packageBookService/pages/bookServices/detail/components/teachResource/index.wxss | 0 packageBookService/pages/bookServices/examination/questionOptions/index.js | 0 packageBookService/pages/bookServices/detail/components/suggest/suggest.wxss | 0 packageBookService/pages/bookServices/examination/questionList/index.json | 0 packageDomain/pages/sampleBookList/applicationForm/index.wxss | 0 packagePersonal/pages/downloads/index.wxml | 0 custom-tab-bar/data.js | 2 packagePersonal/pages/myCollection/index.wxml | 0 packageDomain/pages/teacherCertification/index.json | 0 packagePersonal/pages/downloads/index.js | 149 + packageDomain/pages/resourceDetails/myAudio/index.wxml | 0 packageBookService/pages/bookServices/detail/components/testResource/testResource.wxss | 0 packagePersonal/pages/myMassage/index.wxss | 0 packageBookService/pages/bookServices/examination/questionList/index.wxss | 0 packagePersonal/pages/aboutUs/index.js | 0 pages/home/home.js | 4 packageBookService/pages/bookServices/list/index.wxss | 0 pages/student/index.wxml | 2 packagePersonal/pages/personalCenter/publishBooks/index.js | 66 packagePersonal/pages/myMassage/massageDetail/index.wxml | 0 packageBookService/pages/bookServices/detail/index.wxss | 0 packageDomain/pages/sampleBookList/applicationForm/index.json | 0 packagePersonal/pages/aboutUs/index.json | 0 pages/bookServices/assort/index.js | 6 packageDomain/pages/teacherCertification/index.js | 0 packageBookService/pages/bookServices/examination/examination.wxml | 0 pages/student/index.js | 66 packagePersonal/pages/downloads/index.json | 0 packagePersonal/pages/sampleBooks/index.json | 0 packageBookService/pages/bookServices/list/index.json | 0 packageDomain/pages/teacherCertification/index.wxml | 0 packagePersonal/pages/myOrder/index.wxml | 0 packageBookService/pages/bookServices/detail/components/note/note.js | 0 packageDomain/pages/sampleBookList/index.js | 995 +++++++++++ pages/home/home.wxml | 5 pages/retrievalPage/index.js | 2 packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxml | 0 packageBookService/pages/bookServices/detail/components/tree/components/util.js | 0 packageBookService/pages/bookServices/detail/components/brief/index.wxml | 0 packageBookService/pages/bookServices/detail/index.json | 23 pages/personalCenter/index.json | 2 packageBookService/pages/bookServices/detail/components/teachResource/index.wxml | 0 packageBookService/pages/bookServices/examination/questionOptions/index.json | 0 packagePersonal/pages/personalCenter/myMassage/massageDetail/index.wxml | 2 packageDomain/pages/resourceDetails/myVideo/index.js | 0 packagePersonal/pages/activateProduct/index.json | 0 packagePersonal/pages/publishBooks/index.wxss | 0 packagePersonal/pages/downloads/index.wxss | 0 /dev/null | 0 packageBookService/pages/bookServices/detail/components/learnResource/learnResource.js | 0 packagePersonal/pages/publishBooks/index.json | 0 pages/bookServices/assort/index.json | 4 static/images/home/home-bg.png | 0 packageDomain/pages/sampleBookList/index.json | 0 packagePersonal/pages/sampleBooks/index.js | 0 packagePersonal/pages/sampleBooks/index.wxss | 0 packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml | 0 147 files changed, 5,273 insertions(+), 85 deletions(-) diff --git a/app.json b/app.json index d440e7c..294a29e 100644 --- a/app.json +++ b/app.json @@ -1,64 +1,58 @@ { "pages": [ + "pages/student/index", "pages/home/home", - "pages/resourceDetails/myAudio/index", - "pages/resourceDetails/myVideo/index", - "pages/resourceDetails/document/index", "pages/retrievalPage/index", "pages/cart/paymentPage/index", "pages/cart/index", - "pages/aboutUs/index", - "pages/bookServices/assort/index", - "pages/bookServices/detail/index", - "pages/bookServices/list/index", "pages/bookExhibitionList/index", "pages/bookExhibitionDetails/index", "pages/bibliographyList/index", - "pages/usercenter/index", - "pages/usercenter/person-info/index", - "pages/usercenter/address/list/index", - "pages/usercenter/address/edit/index", - "pages/goods/list/index", - "pages/goods/details/index", - "pages/goods/category/index", - "pages/goods/search/index", - "pages/goods/result/index", - "pages/order/order-confirm/index", - "pages/order/receipt/index", - "pages/order/pay-result/index", - "pages/order/order-list/index", - "pages/order/order-detail/index", - "pages/goods/comments/index", - "pages/order/apply-service/index", - "pages/order/after-service-list/index", - "pages/order/after-service-detail/index", - "pages/goods/comments/create/index", - "pages/coupon/coupon-list/index", - "pages/coupon/coupon-detail/index", - "pages/coupon/coupon-activity-goods/index", - "pages/promotion-detail/index", - "pages/order/fill-tracking-no/index", - "pages/order/delivery-detail/index", - "pages/order/invoice/index", - "pages/usercenter/name-edit/index", - "pages/teacherCertification/index", - "pages/sampleBookList/index", - "pages/sampleBookList/applicationForm/index", "pages/personalCenter/index", - "pages/personalCenter/myOrder/index", - "pages/personalCenter/myCollection/index", - "pages/personalCenter/myMassage/index", - "pages/personalCenter/myMassage/massageDetail/index", - "pages/personalCenter/feedBack/index", "pages/personalCenter/feedBackSubmit/index", "pages/personalCenter/certificate/index", - "pages/personalCenter/publishBooks/index", - "pages/personalCenter/sampleBooks/index", - "pages/personalCenter/downloads/index", - "pages/personalCenter/activateProduct/index", "pages/testLogin/index", - "pages/bookServices/examination/examination", - "pages/bookServices/webpage/index" + "pages/bookServices/assort/index" + ], + "subPackages": [ + { + "root": "packageDomain", + "name": "packageDomain", + "pages": [ + "pages/resourceDetails/myAudio/index", + "pages/resourceDetails/myVideo/index", + "pages/resourceDetails/document/index", + "pages/sampleBookList/index", + "pages/sampleBookList/applicationForm/index", + "pages/teacherCertification/index" + ] + }, + { + "root": "packagePersonal", + "name": "packagePersonal", + "pages": [ + "pages/myOrder/index", + "pages/myCollection/index", + "pages/myMassage/index", + "pages/myMassage/massageDetail/index", + "pages/downloads/index", + "pages/activateProduct/index", + "pages/sampleBooks/index", + "pages/personalCenter/publishBooks/index", + "pages/feedBack/index", + "pages/aboutUs/index" + ] + }, + { + "root": "packageBookService", + "name": "packageBookService", + "pages": [ + "pages/bookServices/list/index", + "pages/bookServices/detail/index", + "pages/bookServices/examination/examination", + "pages/bookServices/webpage/index" + ] + } ], "tabBar": { "custom": true, @@ -80,7 +74,7 @@ "selectedIconPatn": "/static/images/home/service-click@2x.png" }, { - "pagePath": "pages/goods/category/index", + "pagePath": "pages/student/index", "text": "瀛︿範", "iconPath": "/static/images/home/learn@2x.png", "selectedIconPatn": "/static/images/home/learn-click@2x.png" diff --git a/components/filter-popup/index.js b/components/filter-popup/index.js deleted file mode 100644 index 14c69fd..0000000 --- a/components/filter-popup/index.js +++ /dev/null @@ -1,36 +0,0 @@ -Component({ - externalClasses: ['wr-class'], - - options: { - multipleSlots: true, - }, - - properties: { - show: { - type: Boolean, - observer(show) { - this.setData({ visible: show }); - }, - }, - closeBtn: { - type: Boolean, - value: false, - }, - }, - - data: { visible: false }, - - methods: { - reset() { - this.triggerEvent('reset'); - }, - confirm() { - this.triggerEvent('confirm'); - }, - close() { - this.triggerEvent('showFilterPopupClose'); - - this.setData({ visible: false }); - }, - }, -}); diff --git a/components/filter-popup/index.json b/components/filter-popup/index.json deleted file mode 100644 index f5d3702..0000000 --- a/components/filter-popup/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-popup": "tdesign-miniprogram/popup/popup" - } -} \ No newline at end of file diff --git a/components/filter-popup/index.wxml b/components/filter-popup/index.wxml deleted file mode 100644 index 2932624..0000000 --- a/components/filter-popup/index.wxml +++ /dev/null @@ -1,18 +0,0 @@ -<t-popup - visible="{{visible}}" - placement="right" - bind:visible-change="close" - data-index="5" - close-btn="{{closeBtn}}" -> - <view class="content"> - <slot name="filterSlot" /> - <view class="filter-btns-wrap"> - <view class="filter-btn btn-reset" bind:tap="reset">閲嶇疆</view> - <view class="filter-btn btn-confirm" bind:tap="confirm" data-index="5"> - 纭畾 - </view> - </view> - </view> -</t-popup> - diff --git a/components/filter-popup/index.wxss b/components/filter-popup/index.wxss deleted file mode 100644 index a206a82..0000000 --- a/components/filter-popup/index.wxss +++ /dev/null @@ -1,39 +0,0 @@ -.content .filter-btns-wrap { - width: 100%; - position: absolute; - bottom: calc(20rpx + env(safe-area-inset-bottom)); - display: flex; - flex-direction: row; - border-radius: 10rpx 0 0 10rpx; - padding: 16rpx 32rpx; - border-top: 1rpx solid #e5e5e5; - box-sizing: border-box; -} - -.filter-btn { - flex: 1; - display: flex; - justify-content: center; - align-items: center; - font-size: 28rpx; - font-weight: 500; - height: 80rpx; -} - -.btn-reset { - color: #fa4126; - background: rgba(255, 255, 255, 1); - position: relative; - border: 1rpx solid #fa4126; - border-radius: 84rpx 0 0 84rpx; -} - -.btn-confirm { - border-radius: 0 84rpx 84rpx 0; - border: 1rpx solid #fa4126; -} - -.btn-confirm { - color: #fff; - background: #fa4126; -} diff --git a/components/filter/index.js b/components/filter/index.js deleted file mode 100644 index dc99b95..0000000 --- a/components/filter/index.js +++ /dev/null @@ -1,84 +0,0 @@ -Component({ - externalClasses: ['wr-class'], - - options: { - multipleSlots: true, - }, - - properties: { - overall: { - type: Number, - value: 1, - observer(overall) { - this.setData({ - overall, - }); - }, - }, - layout: { - type: Number, - value: 1, - observer(layout) { - this.setData({ - layout, - }); - }, - }, - sorts: { - type: String, - value: '', - observer(sorts) { - this.setData({ - sorts, - }); - }, - }, - color: { - type: String, - value: '#FA550F', - }, - }, - - data: { - layout: 1, - overall: 1, - sorts: '', - }, - - methods: { - onChangeShowAction() { - const { layout } = this.data; - const nextLayout = layout === 1 ? 0 : 1; - this.triggerEvent('change', { ...this.properties, layout: nextLayout }); - }, - - handlePriseSort() { - const { sorts } = this.data; - this.triggerEvent('change', { - ...this.properties, - overall: 0, - sorts: sorts === 'desc' ? 'asc' : 'desc', - }); - }, - - open() { - this.triggerEvent('showFilterPopup', { - show: true, - }); - }, - - onOverallAction() { - const { overall } = this.data; - const nextOverall = overall === 1 ? 0 : 1; - const nextData = { - sorts: '', - prices: [], - }; - this.triggerEvent('change', { - ...this.properties, - ...nextData, - overall: nextOverall, - }); - }, - }, -}); diff --git a/components/filter/index.json b/components/filter/index.json deleted file mode 100644 index 7464ae6..0000000 --- a/components/filter/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon" - } -} \ No newline at end of file diff --git a/components/filter/index.wxml b/components/filter/index.wxml deleted file mode 100644 index 9048bfd..0000000 --- a/components/filter/index.wxml +++ /dev/null @@ -1,37 +0,0 @@ -<!-- 杩囨护缁勪欢 --> -<view class="wr-class filter-wrap"> - <view class="filter-left-content"> - <view class="filter-item {{overall === 1 ? 'filter-active-item' : ''}}" bindtap="onOverallAction"> - 缁煎悎 - </view> - <view class="filter-item" bind:tap="handlePriseSort"> - <text style="color: {{sorts !== '' ? color : '' }}">浠锋牸</text> - <view class="filter-price"> - <t-icon - prefix="wr" - name="arrow_drop_up" - size="18rpx" - style="color:{{sorts === 'asc' ? color : '#bbb'}}" - /> - <t-icon - prefix="wr" - name="arrow_drop_down" - size="18rpx" - style="color:{{sorts === 'desc' ? color : '#bbb'}}" - /> - </view> - </view> - <view class="filter-item {{prices.length ? 'filter-active-item' : ''}}" bindtap="open" data-index="5"> - 绛涢�� - <t-icon - name="filter" - prefix="wr" - color="#333" - size="32rpx" - /> - </view> - </view> -</view> -<!-- 绛涢�夊脊妗� --> -<slot name="filterPopup" /> - diff --git a/components/filter/index.wxss b/components/filter/index.wxss deleted file mode 100644 index 97728f9..0000000 --- a/components/filter/index.wxss +++ /dev/null @@ -1,50 +0,0 @@ -.filter-wrap { - width: 100%; - height: 88rpx; - display: flex; - justify-content: space-between; - position: relative; - background: #fff; -} - -.filter-right-content { - height: 100%; - flex-basis: 100rpx; - text-align: center; - line-height: 88rpx; -} - -.filter-left-content { - height: 100%; - display: flex; - flex-grow: 2; - flex-flow: row nowrap; - justify-content: space-between; -} - -.filter-left-content .filter-item { - flex: 1; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - font-size: 26rpx; - line-height: 36rpx; - font-weight: 400; - color: rgba(51, 51, 51, 1); -} - -.filter-left-content .filter-item .filter-price { - display: flex; - flex-direction: column; - margin-left: 6rpx; - justify-content: space-between; -} - -.filter-left-content .filter-item .wr-filter { - margin-left: 8rpx; -} - -.filter-left-content .filter-active-item { - color: #fa550f; -} diff --git a/components/goods-card/index.js b/components/goods-card/index.js deleted file mode 100644 index eb75361..0000000 --- a/components/goods-card/index.js +++ /dev/null @@ -1,141 +0,0 @@ -Component({ - options: { - addGlobalClass: true, - }, - - properties: { - id: { - type: String, - value: '', - observer(id) { - this.genIndependentID(id); - if (this.properties.thresholds?.length) { - this.createIntersectionObserverHandle(); - } - }, - }, - data: { - type: Object, - observer(data) { - if (!data) { - return; - } - let isValidityLinePrice = true; - if (data.originPrice && data.price && data.originPrice < data.price) { - isValidityLinePrice = false; - } - this.setData({ goods: data, isValidityLinePrice }); - }, - }, - currency: { - type: String, - value: '楼', - }, - - thresholds: { - type: Array, - value: [], - observer(thresholds) { - if (thresholds && thresholds.length) { - this.createIntersectionObserverHandle(); - } else { - this.clearIntersectionObserverHandle(); - } - }, - }, - }, - - data: { - independentID: '', - goods: { id: '' }, - isValidityLinePrice: false, - }, - - lifetimes: { - ready() { - this.init(); - }, - detached() { - this.clear(); - }, - }, - - pageLifeTimes: {}, - - methods: { - clickHandle() { - this.triggerEvent('click', { goods: this.data.goods }); - }, - - clickThumbHandle() { - this.triggerEvent('thumb', { goods: this.data.goods }); - }, - - addCartHandle(e) { - const { id } = e.currentTarget; - const { id: cardID } = e.currentTarget.dataset; - this.triggerEvent('add-cart', { - ...e.detail, - id, - cardID, - goods: this.data.goods, - }); - }, - - genIndependentID(id) { - let independentID; - if (id) { - independentID = id; - } else { - independentID = `goods-card-${~~(Math.random() * 10 ** 8)}`; - } - this.setData({ independentID }); - }, - - init() { - const { thresholds, id } = this.properties; - this.genIndependentID(id); - if (thresholds && thresholds.length) { - this.createIntersectionObserverHandle(); - } - }, - - clear() { - this.clearIntersectionObserverHandle(); - }, - - intersectionObserverContext: null, - - createIntersectionObserverHandle() { - if (this.intersectionObserverContext || !this.data.independentID) { - return; - } - this.intersectionObserverContext = this.createIntersectionObserver({ - thresholds: this.properties.thresholds, - }).relativeToViewport(); - - this.intersectionObserverContext.observe( - `#${this.data.independentID}`, - (res) => { - this.intersectionObserverCB(res); - }, - ); - }, - - intersectionObserverCB() { - this.triggerEvent('ob', { - goods: this.data.goods, - context: this.intersectionObserverContext, - }); - }, - - clearIntersectionObserverHandle() { - if (this.intersectionObserverContext) { - try { - this.intersectionObserverContext.disconnect(); - } catch (e) {} - this.intersectionObserverContext = null; - } - }, - }, -}); diff --git a/components/goods-card/index.json b/components/goods-card/index.json deleted file mode 100644 index f199647..0000000 --- a/components/goods-card/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "component": true, - "usingComponents": { - "price": "/components/price/index", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-image": "/components/webp-image/index" - } -} \ No newline at end of file diff --git a/components/goods-card/index.wxml b/components/goods-card/index.wxml deleted file mode 100644 index 1292f65..0000000 --- a/components/goods-card/index.wxml +++ /dev/null @@ -1,63 +0,0 @@ -<view - id="{{independentID}}" - class="goods-card" - bind:tap="clickHandle" - data-goods="{{ goods }}" -> - <view class="goods-card__main"> - <view class="goods-card__thumb" bind:tap="clickThumbHandle"> - <t-image - wx:if="{{ !!goods.thumb }}" - t-class="goods-card__img" - src="{{ goods.thumb }}" - mode="aspectFill" - lazy-load - /> - </view> - <view class="goods-card__body"> - <view class="goods-card__upper"> - <view wx:if="{{ goods.title }}" class="goods-card__title"> - {{ goods.title }} - </view> - <view wx:if="{{ goods.tags && !!goods.tags.length }}" class="goods-card__tags"> - <view - wx:for="{{ goods.tags }}" - wx:key="index" - wx:for-item="tag" - class="goods-card__tag" - data-index="{{index}}" - > - {{tag}} - </view> - </view> - </view> - <view class="goods-card__down"> - <price - wx:if="{{ goods.price }}" - wr-class="spec-for-price" - symbol-class="spec-for-symbol" - symbol="{{currency}}" - price="{{goods.price}}" - /> - <price - wx:if="{{ goods.originPrice && isValidityLinePrice }}" - wr-class="goods-card__origin-price" - symbol="{{currency}}" - price="{{goods.originPrice}}" - type="delthrough" - /> - <t-icon - class="goods-card__add-cart" - prefix="wr" - name="cartAdd" - id="{{independentID}}-cart" - data-id="{{independentID}}" - catchtap="addCartHandle" - size="48rpx" - color="#FA550F" - /> - </view> - </view> - </view> -</view> - diff --git a/components/goods-card/index.wxss b/components/goods-card/index.wxss deleted file mode 100644 index 6a3efe2..0000000 --- a/components/goods-card/index.wxss +++ /dev/null @@ -1,133 +0,0 @@ -.goods-card { - box-sizing: border-box; - font-size: 24rpx; - border-radius: 0 0 16rpx 16rpx; - border-bottom: none; -} - -.goods-card__main { - position: relative; - display: flex; - line-height: 1; - padding: 0; - background: transparent; - width: 342rpx; - border-radius: 0 0 16rpx 16rpx; - align-items: center; - justify-content: center; - margin-bottom: 16rpx; - flex-direction: column; -} - -.goods-card__thumb { - flex-shrink: 0; - position: relative; - width: 340rpx; - height: 340rpx; -} - -.goods-card__thumb:empty { - display: none; - margin: 0; -} - -.goods-card__img { - display: block; - width: 100%; - height: 100%; - border-radius: 16rpx 16rpx 0 0; - overflow: hidden; -} - -.goods-card__body { - display: flex; - flex: 1 1 auto; - background: #fff; - border-radius: 0 0 16rpx 16rpx; - padding: 16rpx 24rpx 18rpx; - flex-direction: column; -} - -.goods-card__upper { - display: flex; - flex-direction: column; - overflow: hidden; - flex: 1 1 auto; -} - -.goods-card__title { - flex-shrink: 0; - font-size: 28rpx; - color: #333; - font-weight: 400; - display: -webkit-box; - height: 72rpx; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; - word-break: break-word; - line-height: 36rpx; -} - -.goods-card__tags { - display: flex; - flex-direction: row; - flex-wrap: wrap; - margin: 8rpx 0 0 0; -} - -.goods-card__tag { - color: #fa4126; - background: transparent; - font-size: 20rpx; - border: 1rpx solid #fa4126; - padding: 0 8rpx; - border-radius: 16rpx; - line-height: 30rpx; - margin: 0 8rpx 8rpx 0; - display: block; - overflow: hidden; - white-space: nowrap; - word-break: keep-all; - text-overflow: ellipsis; -} - -.goods-card__down { - display: flex; - position: relative; - flex-direction: row; - justify-content: flex-start; - align-items: baseline; - line-height: 32rpx; - margin: 8rpx 0 0 0; -} - -.goods-card__origin-price { - white-space: nowrap; - font-weight: 700; - order: 2; - color: #bbbbbb; - font-size: 24rpx; - margin: 0 0 0 8rpx; -} - -.goods-card__add-cart { - order: 3; - margin: auto 0 0 auto; - position: absolute; - bottom: 0; - right: 0; -} - -.spec-for-price { - font-size: 36rpx; - white-space: nowrap; - font-weight: 700; - order: 1; - color: #fa4126; - margin: 0; -} - -.spec-for-symbol { - font-size: 24rpx; -} \ No newline at end of file diff --git a/components/goods-list/index.js b/components/goods-list/index.js deleted file mode 100644 index 5184903..0000000 --- a/components/goods-list/index.js +++ /dev/null @@ -1,62 +0,0 @@ -Component({ - externalClasses: ['wr-class'], - - properties: { - goodsList: { - type: Array, - value: [], - }, - id: { - type: String, - value: '', - observer: (id) => { - this.genIndependentID(id); - }, - }, - thresholds: { - type: Array, - value: [], - }, - }, - - data: { - independentID: '', - }, - - lifetimes: { - ready() { - this.init(); - }, - }, - - methods: { - onClickGoods(e) { - const { index } = e.currentTarget.dataset; - this.triggerEvent('click', { ...e.detail, index }); - }, - - onAddCart(e) { - const { index } = e.currentTarget.dataset; - this.triggerEvent('addcart', { ...e.detail, index }); - }, - - onClickGoodsThumb(e) { - const { index } = e.currentTarget.dataset; - this.triggerEvent('thumb', { ...e.detail, index }); - }, - - init() { - this.genIndependentID(this.id || ''); - }, - - genIndependentID(id) { - if (id) { - this.setData({ independentID: id }); - } else { - this.setData({ - independentID: `goods-list-${~~(Math.random() * 10 ** 8)}`, - }); - } - }, - }, -}); diff --git a/components/goods-list/index.json b/components/goods-list/index.json deleted file mode 100644 index bdaa23d..0000000 --- a/components/goods-list/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "goods-card": "/components/goods-card/index" - } -} \ No newline at end of file diff --git a/components/goods-list/index.wxml b/components/goods-list/index.wxml deleted file mode 100644 index 5a9a804..0000000 --- a/components/goods-list/index.wxml +++ /dev/null @@ -1,16 +0,0 @@ -<view class="goods-list-wrap wr-class" id="{{independentID}}"> - <block wx:for="{{goodsList}}" wx:for-item="item" wx:key="index"> - <goods-card - id="{{independentID}}-gd-{{index}}" - data="{{item}}" - currency="{{item.currency || '楼'}}" - thresholds="{{thresholds}}" - class="goods-card-inside" - data-index="{{index}}" - bind:thumb="onClickGoodsThumb" - bind:click="onClickGoods" - bind:add-cart="onAddCart" - /> - </block> -</view> - diff --git a/components/goods-list/index.wxss b/components/goods-list/index.wxss deleted file mode 100644 index 7262a4d..0000000 --- a/components/goods-list/index.wxss +++ /dev/null @@ -1,7 +0,0 @@ -.goods-list-wrap { - display: flex; - flex-flow: row wrap; - justify-content: space-between; - padding: 0; - background: #fff; -} diff --git a/components/load-more/index.js b/components/load-more/index.js deleted file mode 100644 index b71a839..0000000 --- a/components/load-more/index.js +++ /dev/null @@ -1,54 +0,0 @@ -Component({ - externalClasses: ['wr-class', 'wr-class--no-more'], - - options: { multipleSlots: true }, - - properties: { - status: { - type: Number, - value: 0, - }, - loadingText: { - type: String, - value: '鍔犺浇涓�...', - }, - noMoreText: { - type: String, - value: '娌℃湁鏇村浜�', - }, - failedText: { - type: String, - value: '鍔犺浇澶辫触锛岀偣鍑婚噸璇�', - }, - color: { - type: String, - value: '#BBBBBB', - }, - failedColor: { - type: String, - value: '#FA550F', - }, - size: { - type: null, - value: '40rpx', - }, - loadingBackgroundColor: { - type: String, - value: '#F5F5F5', - }, - listIsEmpty: { - type: Boolean, - value: false, - }, - }, - - methods: { - /** 鐐瑰嚮澶勭悊 */ - tapHandle() { - // 澶辫触閲嶈瘯 - if (this.data.status === 3) { - this.triggerEvent('retry'); - } - }, - }, -}); diff --git a/components/load-more/index.json b/components/load-more/index.json deleted file mode 100644 index 94e107c..0000000 --- a/components/load-more/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-loading": "tdesign-miniprogram/loading/loading", - "t-divider": "tdesign-miniprogram/divider/divider" - } -} \ No newline at end of file diff --git a/components/load-more/index.wxml b/components/load-more/index.wxml deleted file mode 100644 index 4b69c86..0000000 --- a/components/load-more/index.wxml +++ /dev/null @@ -1,31 +0,0 @@ -<view - class="load-more wr-class" - style="{{listIsEmpty && (status === 0 || status === 2) ? 'display: none' : '' }}" - bindtap="tapHandle" -> - <!-- 鍔犺浇涓� --> - - <t-loading - t-class="t-class-loading" - t-class-text="t-class-loading-text" - t-class-indicator="t-class-indicator" - loading="{{status === 1}}" - text="鍔犺浇涓�..." - theme="circular" - size="40rpx" - /> - - <!-- 宸插叏閮ㄥ姞杞� --> - <t-divider wx:if="{{status === 2}}" t-class="t-class-divider" t-class-content="t-class-divider-content"> - <text slot="content">{{noMoreText}}</text> - </t-divider> - - <!-- 鍔犺浇澶辫触 --> - <view class="load-more__error" wx:if="{{status===3}}"> - 鍔犺浇澶辫触 - <text class="load-more__refresh-btn" bind:tap="tapHandle">鍒锋柊</text> - </view> -</view> - -<!-- 鏀寔閫氳繃slot浼犲叆椤甸潰/鍒楄〃鐨勭┖鎬侊紝load-more鏉ユ帶鍒剁┖鎬佺殑鏄剧ず鐘舵�� --> -<slot wx:if="{{listIsEmpty && (status === 0 || status === 2)}}" name="empty" /> diff --git a/components/load-more/index.wxss b/components/load-more/index.wxss deleted file mode 100644 index bbaf636..0000000 --- a/components/load-more/index.wxss +++ /dev/null @@ -1,35 +0,0 @@ -.load-more { - font-size: 24rpx; - height: 100rpx; - display: flex; - flex-direction: column; - justify-content: center; -} - -.load-more .t-class-loading { - display: flex; - justify-content: center; - - --td-loading-color: #fa4126; -} - -.load-more .t-class-loading-text { - color: #bbbbbb; -} - -.t-class-divider-content { - margin: 0 10rpx; - color: #bbbbbb; -} -.load-more .t-class-indicator { - color: #b9b9b9 !important; -} - -.load-more__error { - margin: auto; -} - -.load-more__refresh-btn { - margin-left: 16rpx; - color: #fa4126; -} diff --git a/components/loading-content/index.js b/components/loading-content/index.js deleted file mode 100644 index 4c6b925..0000000 --- a/components/loading-content/index.js +++ /dev/null @@ -1,23 +0,0 @@ -Component({ - externalClasses: ['wr-class'], - properties: { - position: { - type: String, - value: 'static', - }, - noMask: Boolean, - type: { - type: String, - value: 'circular', - }, - vertical: Boolean, - size: { - type: String, - value: '50rpx', - }, - backgroundColor: { - type: String, - value: 'rgba(0, 0, 0, .6)', - }, - }, -}); diff --git a/components/loading-content/index.json b/components/loading-content/index.json deleted file mode 100644 index c08b2ef..0000000 --- a/components/loading-content/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-loading": "tdesign-miniprogram/loading/loading" - } -} diff --git a/components/loading-content/index.wxml b/components/loading-content/index.wxml deleted file mode 100644 index add589c..0000000 --- a/components/loading-content/index.wxml +++ /dev/null @@ -1,11 +0,0 @@ -<view class="t-class loading-content {{position}}" style="{{(position === 'static' || noMask) ? 'visibility: hidden;' : ''}} background-color: {{backgroundColor}}"> - <t-loading - t-class="loading" - theme="{{type}}" - layout="{{vertical}}" - size="{{size}}" - > - <slot/> - </t-loading> -</view> - diff --git a/components/loading-content/index.wxss b/components/loading-content/index.wxss deleted file mode 100644 index d3c112b..0000000 --- a/components/loading-content/index.wxss +++ /dev/null @@ -1,23 +0,0 @@ -.loading-content { - width: 100%; - height: 100%; - background-color: rgba(0, 0, 0, 0.6); - position: relative; -} -.loading-content.absolute { - position: absolute; - z-index: 1; - left: 0; - top: 0; -} -.loading-content.fixed { - position: fixed; - z-index: 1; - left: 0; - top: 0; -} -.loading-content .loading { - width: 100%; - height: 100%; - visibility: visible; -} diff --git a/components/price/index.js b/components/price/index.js deleted file mode 100644 index c0218f7..0000000 --- a/components/price/index.js +++ /dev/null @@ -1,71 +0,0 @@ -Component({ - externalClasses: ['wr-class', 'symbol-class', 'decimal-class'], - useStore: [], - properties: { - priceUnit: { - type: String, - value: 'fen', - }, // 浠锋牸鍗曚綅锛屽垎 | 鍏�, fen锛寉uan - price: { - type: null, - value: '', - observer(price) { - this.format(price); - }, - }, // 浠锋牸, 浠ュ垎涓哄崟浣� - type: { - type: String, - value: '', // - }, // main 绮椾綋, lighter 缁嗕綋, mini 榛戣壊, del 涓垝绾�, delthrough 涓垝绾匡紝鍖呮嫭璐у竵绗﹀彿 - symbol: { - type: String, - value: '楼', // '锟�', - }, // 璐у竵绗﹀彿锛岄粯璁ゆ槸浜烘皯甯佺鍙凤骏 - fill: Boolean, // 鏄惁鑷姩琛ラ綈涓や綅灏忔暟 - decimalSmaller: Boolean, // 灏忔暟瀛楀彿灏忎竴鐐� - lineThroughWidth: { - type: null, - value: '0.12em', - }, // 鍒掔嚎浠风嚎鏉¢珮搴� - }, - - data: { - pArr: [], - }, - - methods: { - format(price) { - price = parseFloat(`${price}`); - const pArr = []; - if (!isNaN(price)) { - const isMinus = price < 0; - if (isMinus) { - price = -price; - } - if (this.properties.priceUnit === 'yuan') { - const priceSplit = price.toString().split('.'); - pArr[0] = priceSplit[0]; - pArr[1] = !priceSplit[1] - ? '00' - : priceSplit[1].length === 1 - ? `${priceSplit[1]}0` - : priceSplit[1]; - } else { - price = Math.round(price * 10 ** 8) / 10 ** 8; // 鎭㈠绮惧害涓㈠け - price = Math.ceil(price); // 鍚戜笂鍙栨暣 - pArr[0] = price >= 100 ? `${price}`.slice(0, -2) : '0'; - pArr[1] = `${price + 100}`.slice(-2); - } - if (!this.properties.fill) { - // 濡傛灉 fill 涓� false锛� 涓嶆樉绀哄皬鏁版湯灏剧殑0 - if (pArr[1] === '00') pArr[1] = ''; - else if (pArr[1][1] === '0') pArr[1] = pArr[1][0]; - } - if (isMinus) { - pArr[0] = `-${pArr[0]}`; - } - } - this.setData({ pArr }); - }, - }, -}); diff --git a/components/price/index.json b/components/price/index.json deleted file mode 100644 index a89ef4d..0000000 --- a/components/price/index.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} diff --git a/components/price/index.wxml b/components/price/index.wxml deleted file mode 100644 index 7f4f9d9..0000000 --- a/components/price/index.wxml +++ /dev/null @@ -1,21 +0,0 @@ -<wxs module="utils"> - var REGEXP = getRegExp('^\d+(\.\d+)?$'); - function addUnit(value) { - if (value == null) { - return ''; - } - return REGEXP.test('' + value) ? value + 'rpx' : value; - } - module.exports = { - addUnit: addUnit - }; -</wxs> -<view class="price {{type}} wr-class"> - <view wx:if="{{type === 'delthrough'}}" class="line" style="height:{{utils.addUnit(lineThroughWidth)}};" /> - <view class="symbol symbol-class">{{symbol}}</view> - <view class="pprice"> - <view class="integer inline">{{pArr[0]}}</view> - <view wx:if="{{pArr[1]}}" class="decimal inline {{decimalSmaller ? 'smaller' : ''}} decimal-class">.{{pArr[1]}}</view> - </view> -</view> - diff --git a/components/price/index.wxss b/components/price/index.wxss deleted file mode 100644 index 45da266..0000000 --- a/components/price/index.wxss +++ /dev/null @@ -1,66 +0,0 @@ -:host { - display: inline-block; - display: inline-block; - font-weight: inherit; -} -.inline { - display: inline; - white-space: nowrap; -} -.price { - display: inline; - color: inherit; - font-size: inherit; - text-decoration: inherit; -} - -.lighter { - font-weight: 400; - font-size: 32rpx; -} -.mini { - font-size: 24rpx; - color: #5d5d5d; - font-weight: 400; -} -.del .pprice { - font-size: 32rpx; - color: #9b9b9b; - text-decoration: line-through; - font-weight: 400; -} -.delthrough { - position: relative; -} -.delthrough .line { - position: absolute; - top: 50%; - left: 0; - right: 0; - transform: translateY(-50%); - margin: 0; - background-color: currentColor; -} - -.symbol { - display: inline; - color: inherit; - font-size: inherit; - font-size: 0.8em; -} -.pprice { - display: inline; - margin: 0 0 0 4rpx; -} -.integer { - color: inherit; - font-size: inherit; -} -.decimal { - color: inherit; - font-size: inherit; -} -.decimal.smaller { - font-size: 0.8em; - vertical-align: baseline; -} diff --git a/components/swipeout/index.js b/components/swipeout/index.js deleted file mode 100644 index 3db6b79..0000000 --- a/components/swipeout/index.js +++ /dev/null @@ -1,79 +0,0 @@ -let ARRAY = []; -Component({ - externalClasses: ['wr-class'], - - options: { - multipleSlots: true, - }, - properties: { - disabled: Boolean, - leftWidth: { - type: Number, - value: 0, - }, - rightWidth: { - type: Number, - value: 0, - }, - asyncClose: Boolean, - }, - attached() { - ARRAY.push(this); - }, - - detached() { - ARRAY = ARRAY.filter((item) => item !== this); - }, - - /** - * Component initial data - */ - data: { - wrapperStyle: '', - asyncClose: false, - closed: true, - }, - - /** - * Component methods - */ - methods: { - open(position) { - this.setData({ closed: false }); - this.triggerEvent('close', { - position, - instance: this, - }); - }, - - close() { - this.setData({ closed: true }); - }, - - closeOther() { - ARRAY.filter((item) => item !== this).forEach((item) => item.close()); - }, - - noop() { - return; - }, - - onClick(event) { - const { key: position = 'outside' } = event.currentTarget.dataset; - this.triggerEvent('click', position); - - if (this.data.closed) { - return; - } - - if (this.data.asyncClose) { - this.triggerEvent('close', { - position, - instance: this, - }); - } else { - this.close(); - } - }, - }, -}); diff --git a/components/swipeout/index.json b/components/swipeout/index.json deleted file mode 100644 index a89ef4d..0000000 --- a/components/swipeout/index.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} diff --git a/components/swipeout/index.wxml b/components/swipeout/index.wxml deleted file mode 100644 index 353bf72..0000000 --- a/components/swipeout/index.wxml +++ /dev/null @@ -1,174 +0,0 @@ -<wxs module="swipe"> - var THRESHOLD = 0.3; - var MIN_DISTANCE = 10; - var owner; - var state; - - var getState = function(ownerInstance) { - owner = ownerInstance; - state = owner.getState(); - state.leftWidth = state.leftWidth || 0; - state.rightWidth = state.rightWidth || 0; - state.offset = state.offset || 0; - state.startOffset = state.startOffset || 0; - }; - - var initRightWidth = function(newVal, oldVal, ownerInstance) { - getState(ownerInstance); - state.rightWidth = newVal; - if (state.offset < 0) { - swipeMove(-state.rightWidth); - } - }; - - var initLeftWidth = function(newVal, oldVal, ownerInstance) { - getState(ownerInstance); - state.leftWidth = newVal; - if (state.offset > 0) { - swipeMove(state.leftWidth); - } - } - - var resetTouchStatus = function() { - state.direction = ''; - state.deltaX = 0; - state.deltaY = 0; - state.offsetX = 0; - state.offsetY = 0; - }; - - var touchMove = function(event) { - var touchPoint = event.touches[0]; - state.deltaX = touchPoint.clientX - state.startX; - state.deltaY = touchPoint.clientY - state.startY; - state.offsetX = Math.abs(state.deltaX); - state.offsetY = Math.abs(state.deltaY); - state.direction = state.direction || getDirection(state.offsetX, state.offsetY); - }; - - var getDirection = function(x, y) { - if (x > y && x > MIN_DISTANCE) { - return 'horizontal'; - } - if (y > x && y > MIN_DISTANCE) { - return 'vertical'; - } - return ''; - }; - - var range = function(num, min, max) { - return Math.min(Math.max(num, min), max); - }; - - var swipeMove = function(_offset = 0) { - state.offset = range( - _offset, - -state.rightWidth, - +state.leftWidth, - ); - - var transform = 'translate3d(' + state.offset + 'px, 0, 0)'; - var transition = state.dragging - ? 'none' - : 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)'; - owner.selectComponent('#wrapper').setStyle({ - '-webkit-transform': transform, - '-webkit-transition': transition, - 'transform': transform, - 'transition': transition - }); - }; - - var close = function() { - swipeMove(0); - }; - - var onCloseChange = function(newVal, oldVal, ownerInstance) { - getState(ownerInstance); - if (newVal === oldVal) return; - if (newVal) { - close(); - } - }; - - var touchStart = function(event) { - resetTouchStatus(); - state.startOffset = state.offset; - var touchPoint = event.touches[0]; - state.startX = touchPoint.clientX; - state.startY = touchPoint.clientY; - owner.callMethod('closeOther'); - }; - - var startDrag = function(event, ownerInstance) { - getState(ownerInstance); - touchStart(event); - }; - - var onDrag = function(event, ownerInstance) { - getState(ownerInstance); - touchMove(event); - if (state.direction !== 'horizontal') { - return; - } - state.dragging = true; - swipeMove(state.startOffset + state.deltaX); - }; - - var open = function(position) { - var _offset = position === 'left' ? +state.leftWidth : -state.rightWidth; - owner.callMethod('open', { position: position }); - swipeMove(_offset); - }; - - var endDrag = function(event, ownerInstance) { - getState(ownerInstance); - state.dragging = false; - // 宸�/鍙充晶鏈夊彲婊戝姩鍖哄煙锛屼笖褰撳墠涓嶆槸宸瞣pen鐘舵�侊紝涓旀粦鍔ㄥ箙搴﹁秴杩囬槇鍊兼椂open宸�/鍙充晶锛堟粴鍔ㄥ埌璇ヤ晶鐨勬渶杈逛笂锛� - if (+state.rightWidth > 0 && -state.startOffset < +state.rightWidth && -state.offset > +state.rightWidth * THRESHOLD) { - open('right'); - } else if (+state.leftWidth > 0 && state.startOffset < +state.leftWidth && state.offset > +state.leftWidth * THRESHOLD) { - open('left'); - } else { - // 浠呭湪鏈夊彂鐢熶晶婊戠殑鎯呭喌涓嬭嚜鍔ㄥ叧闂紙鐢眏s鎺у埗鏄惁寮傛鍏抽棴锛� - if (state.startOffset !== state.offset) { - close(); - } - } - }; - - module.exports = { - initLeftWidth: initLeftWidth, - initRightWidth: initRightWidth, - startDrag: startDrag, - onDrag: onDrag, - endDrag: endDrag, - onCloseChange: onCloseChange - }; -</wxs> - -<view - class="wr-class wr-swipeout" - data-key="cell" - capture-bind:tap="onClick" - bindtouchstart="{{disabled || swipe.startDrag}}" - capture-bind:touchmove="{{disabled || swipe.onDrag}}" - bindtouchend="{{disabled || swipe.endDrag}}" - bindtouchcancel="{{disabled || swipe.endDrag}}" - closed="{{closed}}" - change:closed="{{swipe.onCloseChange}}" - leftWidth="{{leftWidth}}" - rightWidth="{{rightWidth}}" - change:leftWidth="{{swipe.initLeftWidth}}" - change:rightWidth="{{swipe.initRightWidth}}" -> - <view id="wrapper"> - <view wx:if="{{ leftWidth }}" class="wr-swipeout__left" data-key="left" catch:tap="onClick"> - <slot name="left" /> - </view> - <slot /> - <view wx:if="{{ rightWidth }}" class="wr-swipeout__right" data-key="right" catch:tap="onClick"> - <slot name="right" /> - </view> - </view> -</view> diff --git a/components/swipeout/index.wxss b/components/swipeout/index.wxss deleted file mode 100644 index 1aa2943..0000000 --- a/components/swipeout/index.wxss +++ /dev/null @@ -1,18 +0,0 @@ -.wr-swipeout { - position: relative; - overflow: hidden; -} -.wr-swipeout__left, -.wr-swipeout__right { - position: absolute; - top: 0; - height: 100%; -} -.wr-swipeout__left { - left: 0; - transform: translate3d(-100%, 0, 0); -} -.wr-swipeout__right { - right: 0; - transform: translate3d(100%, 0, 0); -} diff --git a/components/webp-image/index.js b/components/webp-image/index.js deleted file mode 100644 index 1706049..0000000 --- a/components/webp-image/index.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * @Author: rileycai - * @Date: 2022-03-14 14:21:26 - * @LastEditTime: 2022-03-14 15:23:04 - * @LastEditors: rileycai - * @Description: webp-image缁勪欢瀵箃-image鍖呰9浜嗕竴灞傦紝涓昏瀹炵幇鍥剧墖瑁佸壀銆亀ebp鍘嬬缉鍔熻兘 - * @FilePath: /tdesign-miniprogram-starter/components/webp-image/index.js - */ -const systemInfo = wx.getSystemInfoSync(); -Component({ - externalClasses: ['t-class', 't-class-load'], - properties: { - loadFailed: { - type: String, - value: 'default', - }, - loading: { - type: String, - value: 'default', - }, - src: { - type: String, - value: '', - }, - mode: { - type: String, - value: 'aspectFill', - }, - webp: { - type: Boolean, - value: true, - }, - lazyLoad: { - type: Boolean, - value: false, - }, - showMenuByLongpress: { - type: Boolean, - value: false, - }, - }, - data: { - thumbHeight: 375, - thumbWidth: 375, - systemInfo, - }, - lifetimes: { - ready() { - const { mode } = this.properties; - // 鑾峰彇瀹瑰櫒鐨勭湡瀹炲楂橈紝璁剧疆鍥剧墖鐨勮鍓搴� - this.getRect('.J-image').then((res) => { - if (res) { - const { width, height } = res; - this.setData( - mode === 'heightFix' - ? { - thumbHeight: this.px2rpx(height) || 375, - } - : { - thumbWidth: this.px2rpx(width) || 375, - }, - ); - } - }); - }, - }, - methods: { - px2rpx(px) { - return (750 / (systemInfo.screenWidth || 375)) * px; - }, - getRect(selector) { - return new Promise((resolve) => { - if (!this.selectorQuery) { - this.selectorQuery = this.createSelectorQuery(); - } - this.selectorQuery.select(selector).boundingClientRect(resolve).exec(); - }); - }, - onLoad(e) { - this.triggerEvent('load', e.detail); - }, - onError(e) { - this.triggerEvent('error', e.detail); - }, - }, -}); diff --git a/components/webp-image/index.json b/components/webp-image/index.json deleted file mode 100644 index 6ffda42..0000000 --- a/components/webp-image/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-image": "tdesign-miniprogram/image/image" - } -} \ No newline at end of file diff --git a/components/webp-image/index.wxml b/components/webp-image/index.wxml deleted file mode 100644 index 1a917b2..0000000 --- a/components/webp-image/index.wxml +++ /dev/null @@ -1,14 +0,0 @@ -<wxs src="./utils.wxs" module="Utils" /> -<t-image - t-class="J-image" - src="{{Utils.getSrc({src, thumbWidth: thumbWidth || 0, thumbHeight: thumbHeight || 0, systemInfo, webp, mode})}}" - t-class="t-class" - t-class-load="t-class-load" - mode="{{ mode }}" - lazy="{{ lazyLoad }}" - show-menu-by-longpress="{{showMenuByLongpress}}" - error="{{loadFailed}}" - loading="{{loading}}" - binderror="onError" - bindload="onLoad" -/> diff --git a/components/webp-image/index.wxss b/components/webp-image/index.wxss deleted file mode 100644 index e69de29..0000000 --- a/components/webp-image/index.wxss +++ /dev/null diff --git a/components/webp-image/utils.wxs b/components/webp-image/utils.wxs deleted file mode 100644 index 4f6e5d1..0000000 --- a/components/webp-image/utils.wxs +++ /dev/null @@ -1,140 +0,0 @@ -var isString = function (value) { - return typeof value === 'string'; -}; - -var isNumber = function (value) { - return typeof value === 'number'; -}; - -var getFileExt = function (src) { - var fileUrl = src.split('?')[0]; - var splitUlr = fileUrl.split('/'); - var filepath = splitUlr[splitUlr.length - 1]; - return filepath.split('.')[1] || 'jpg'; -}; - -function isUrl(url) { - // NOCC:ToolNameCheck(闈炴晱鎰熻瘝) - var urlReg = getRegExp( - '/[(http(s)?)://(www.)?a-zA-Z0-9@:%._+~#=]{2,256}.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/', - 'ig', - ); - - return urlReg.test(url); -} - -function rpx2px(rpx, screenWidth) { - // px / systemWidth = rpx / 750 - var result = (rpx * (screenWidth || 375)) / 750; - - return Math.round(result); -} - -function imageMogr(url, options) { - if (!isString(url) || !url) return ''; - - if ( - url.indexOf('qlogo.cn') !== -1 || - url.indexOf('wxfile://') === 0 || - url.indexOf('http://tmp/wx') === 0 || - url.indexOf('imageMogr2') !== -1 - ) { - //qlogo.cn鍩熷悕鎴栬�呮湰鍦板浘鐗囦笉鍋氳浆鎹� - return url; - } //寮哄埗杞琱ttps - - if (url.indexOf('http://') === 0) { - url = url.replace('http://', 'https://'); - } else if (url.indexOf('//') === 0) { - url = 'https:' + url; - } - - if (!options) return url; - - var width = Math.ceil(options.width), - height = Math.ceil(options.height), - format = options.format, - _optionsQuality = options.quality, - quality = _optionsQuality === undefined ? 70 : _optionsQuality, - _optionsStrip = options.strip, - strip = _optionsStrip === undefined ? true : _optionsStrip, - crop = options.crop; - var isValidWidth = isNumber(width) && width > 0; - var isValidHeight = isNumber(height) && height > 0; - var imageMogrStr = ''; - var size = ''; - - if (isValidWidth && isValidHeight) { - size = ''.concat(width, 'x').concat(height); - } else if (isValidWidth) { - size = ''.concat(width, 'x'); - } else if (isValidHeight) { - size = 'x'.concat(height); - } - - if (size) { - //缂╂斁鎴栬�呰鍓� - imageMogrStr += '/'.concat(crop ? 'crop' : 'thumbnail', '/').concat(size); - - if (crop) { - //瑁佸壀鐩墠闇�姹傚彧鏈変互鍥剧墖涓績涓哄熀鍑� - imageMogrStr += '/gravity/center'; - } - } - - if (isNumber(quality)) { - //璐ㄩ噺鍙樻崲 - imageMogrStr += '/quality/'.concat(quality); - } - - if (strip) { - //鍘婚櫎鍏冧俊鎭� - imageMogrStr += '/strip'; - } - - var ext = getFileExt(url); - - // gif 鍥剧墖涓嶅仛鏍煎紡杞崲锛屽惁鍒欎細鎹熷潖鍔ㄥ浘 - if (ext === 'gif') { - imageMogrStr += '/cgif/1'; - } else if (format) { - //鏍煎紡杞崲 - imageMogrStr += '/format/'.concat(format); - } - - if (format === 'jpg' || (!format && (ext === 'jpg' || ext === 'jpeg'))) { - //娓愯繘寮� jpg 鍔犺浇 - imageMogrStr += '/interlace/1'; - } - if (!imageMogrStr) return url; - return '' - .concat(url) - .concat(url.indexOf('?') !== -1 ? '&' : '?', 'imageMogr2') - .concat(imageMogrStr); -} -function getSrc(options) { - if (!options.src) return ''; - - if (options.thumbWidth || options.thumbHeight) { - return imageMogr(options.src, { - width: - options.mode !== 'heightFix' - ? rpx2px(options.thumbWidth, options.systemInfo.screenWidth) * - options.systemInfo.pixelRatio - : null, - height: - options.mode !== 'widthFix' - ? rpx2px(options.thumbHeight, options.systemInfo.screenWidth) * - options.systemInfo.pixelRatio - : null, - format: options.webp ? 'webp' : null, - }); - } - - return ''; -} - -module.exports = { - imageMogr: imageMogr, - getSrc: getSrc, -}; diff --git a/config/eslintCheck.js b/config/eslintCheck.js deleted file mode 100644 index 9294baf..0000000 --- a/config/eslintCheck.js +++ /dev/null @@ -1,91 +0,0 @@ -/* eslint-disable prefer-template */ -/** - * 宸ョ▼浠g爜pre-commit 妫�鏌ュ伐鍏� - * @date 2019.9.4 - * @author 310227663@qq.com - */ -const { exec } = require('child_process'); -const chalk = require('chalk'); -const { CLIEngine } = require('eslint'); -const cli = new CLIEngine({}); -const { log } = console; - -function getErrorLevel(number) { - switch (number) { - case 2: - return 'error'; - case 1: - return 'warn'; - default: - } - return 'undefined'; -} -let pass = 0; -exec( - 'git diff --cached --name-only --diff-filter=ACM | grep -Ei "\\.ts$|\\.js$"', - (error, stdout) => { - if (stdout.length) { - const array = stdout.split('\n'); - array.pop(); - const { results } = cli.executeOnFiles(array); - let errorCount = 0; - let warningCount = 0; - results.forEach((result) => { - errorCount += result.errorCount; - warningCount += result.warningCount; - if (result.messages.length > 0) { - log('\n'); - log(result.filePath); - result.messages.forEach((obj) => { - const level = getErrorLevel(obj.severity); - if (level === 'warn') - log( - ' ' + - obj.line + - ':' + - obj.column + - '\t ' + - chalk.yellow(level) + - ' \0 ' + - obj.message + - '\t\t' + - chalk.grey(obj.ruleId) + - '', - ); - if (level === 'error') - log( - ' ' + - obj.line + - ':' + - obj.column + - '\t ' + - chalk.red.bold(level) + - ' \0 ' + - obj.message + - '\t\t ' + - chalk.grey(obj.ruleId) + - '', - ); - if (level === 'error') pass = 1; - }); - } - }); - if (warningCount > 0 || errorCount > 0) { - log( - '\n' + - chalk.bgRed.bold(errorCount + warningCount + ' problems') + - ' (' + - chalk.red.bold(errorCount) + - ' errors, ' + - chalk.yellow(warningCount) + - ' warnings) \0', - ); - } - !pass && log(chalk.green.bold('~~ Done: 浠g爜妫�楠岄�氳繃锛屾彁浜ゆ垚鍔� ~~')); - process.exit(pass); - } - if (error !== null) { - log(`exec error: ${error}`); - } - }, -); diff --git a/config/index.js b/config/index.js deleted file mode 100644 index 3d59a2c..0000000 --- a/config/index.js +++ /dev/null @@ -1,20437 +0,0 @@ -export const config = { - /** 鏄惁浣跨敤mock浠f浛api杩斿洖 */ - useMock: true, -}; - -export const cdnBase = - 'https://we-retail-static-1300977798.cos.ap-guangzhou.myqcloud.com/retail-mp'; - -export const areaData = [ - { - label: '鍖椾含甯�', - value: '110000', - children: [ - { - label: '鍖椾含甯�', - value: '110100', - children: [ - { - label: '涓滃煄鍖�', - value: '110101', - children: null, - }, - { - label: '瑗垮煄鍖�', - value: '110102', - children: null, - }, - { - label: '鏈濋槼鍖�', - value: '110105', - children: null, - }, - { - label: '涓板彴鍖�', - value: '110106', - children: null, - }, - { - label: '鐭虫櫙灞卞尯', - value: '110107', - children: null, - }, - { - label: '娴锋穩鍖�', - value: '110108', - children: null, - }, - { - label: '闂ㄥご娌熷尯', - value: '110109', - children: null, - }, - { - label: '鎴垮北鍖�', - value: '110111', - children: null, - }, - { - label: '閫氬窞鍖�', - value: '110112', - children: null, - }, - { - label: '椤轰箟鍖�', - value: '110113', - children: null, - }, - { - label: '鏄屽钩鍖�', - value: '110114', - children: null, - }, - { - label: '澶у叴鍖�', - value: '110115', - children: null, - }, - { - label: '鎬�鏌斿尯', - value: '110116', - children: null, - }, - { - label: '骞宠胺鍖�', - value: '110117', - children: null, - }, - { - label: '瀵嗕簯鍖�', - value: '110118', - children: null, - }, - { - label: '寤跺簡鍖�', - value: '110119', - children: null, - }, - ], - }, - ], - }, - { - label: '澶╂触甯�', - value: '120000', - children: [ - { - label: '澶╂触甯�', - value: '120100', - children: [ - { - label: '鍜屽钩鍖�', - value: '120101', - children: null, - }, - { - label: '娌充笢鍖�', - value: '120102', - children: null, - }, - { - label: '娌宠タ鍖�', - value: '120103', - children: null, - }, - { - label: '鍗楀紑鍖�', - value: '120104', - children: null, - }, - { - label: '娌冲寳鍖�', - value: '120105', - children: null, - }, - { - label: '绾㈡ˉ鍖�', - value: '120106', - children: null, - }, - { - label: '涓滀附鍖�', - value: '120110', - children: null, - }, - { - label: '瑗块潚鍖�', - value: '120111', - children: null, - }, - { - label: '娲ュ崡鍖�', - value: '120112', - children: null, - }, - { - label: '鍖楄景鍖�', - value: '120113', - children: null, - }, - { - label: '姝︽竻鍖�', - value: '120114', - children: null, - }, - { - label: '瀹濆澔鍖�', - value: '120115', - children: null, - }, - { - label: '婊ㄦ捣鏂板尯', - value: '120116', - children: null, - }, - { - label: '瀹佹渤鍖�', - value: '120117', - children: null, - }, - { - label: '闈欐捣鍖�', - value: '120118', - children: null, - }, - { - label: '钃熷窞鍖�', - value: '120119', - children: null, - }, - ], - }, - ], - }, - { - label: '娌冲寳鐪�', - value: '130000', - children: [ - { - label: '鐭冲搴勫競', - value: '130100', - children: [ - { - label: '闀垮畨鍖�', - value: '130102', - children: null, - }, - { - label: '妗ヨタ鍖�', - value: '130104', - children: null, - }, - { - label: '鏂板崕鍖�', - value: '130105', - children: null, - }, - { - label: '浜曢檳鐭垮尯', - value: '130107', - children: null, - }, - { - label: '瑁曞崕鍖�', - value: '130108', - children: null, - }, - { - label: '钘佸煄鍖�', - value: '130109', - children: null, - }, - { - label: '楣挎硥鍖�', - value: '130110', - children: null, - }, - { - label: '鏍惧煄鍖�', - value: '130111', - children: null, - }, - { - label: '浜曢檳鍘�', - value: '130121', - children: null, - }, - { - label: '姝e畾鍘�', - value: '130123', - children: null, - }, - { - label: '琛屽攼鍘�', - value: '130125', - children: null, - }, - { - label: '鐏靛鍘�', - value: '130126', - children: null, - }, - { - label: '楂橀倯鍘�', - value: '130127', - children: null, - }, - { - label: '娣辨辰鍘�', - value: '130128', - children: null, - }, - { - label: '璧炵殗鍘�', - value: '130129', - children: null, - }, - { - label: '鏃犳瀬鍘�', - value: '130130', - children: null, - }, - { - label: '骞冲北鍘�', - value: '130131', - children: null, - }, - { - label: '鍏冩皬鍘�', - value: '130132', - children: null, - }, - { - label: '璧靛幙', - value: '130133', - children: null, - }, - { - label: '杈涢泦甯�', - value: '130181', - children: null, - }, - { - label: '鏅嬪窞甯�', - value: '130183', - children: null, - }, - { - label: '鏂颁箰甯�', - value: '130184', - children: null, - }, - ], - }, - { - label: '鍞愬北甯�', - value: '130200', - children: [ - { - label: '璺崡鍖�', - value: '130202', - children: null, - }, - { - label: '璺寳鍖�', - value: '130203', - children: null, - }, - { - label: '鍙ゅ喍鍖�', - value: '130204', - children: null, - }, - { - label: '寮�骞冲尯', - value: '130205', - children: null, - }, - { - label: '涓板崡鍖�', - value: '130207', - children: null, - }, - { - label: '涓版鼎鍖�', - value: '130208', - children: null, - }, - { - label: '鏇瑰鐢稿尯', - value: '130209', - children: null, - }, - { - label: '婊﹀崡鍘�', - value: '130224', - children: null, - }, - { - label: '涔愪涵鍘�', - value: '130225', - children: null, - }, - { - label: '杩佽タ鍘�', - value: '130227', - children: null, - }, - { - label: '鐜夌敯鍘�', - value: '130229', - children: null, - }, - { - label: '鑺﹀彴鍖�', - value: '130230', - children: null, - }, - { - label: '閬靛寲甯�', - value: '130281', - children: null, - }, - { - label: '杩佸畨甯�', - value: '130283', - children: null, - }, - { - label: '婊﹀窞甯�', - value: '130284', - children: null, - }, - ], - }, - { - label: '绉︾殗宀涘競', - value: '130300', - children: [ - { - label: '娴锋腐鍖�', - value: '130302', - children: null, - }, - { - label: '灞辨捣鍏冲尯', - value: '130303', - children: null, - }, - { - label: '鍖楁埓娌冲尯', - value: '130304', - children: null, - }, - { - label: '鎶氬畞鍖�', - value: '130306', - children: null, - }, - { - label: '闈掗緳婊℃棌鑷不鍘�', - value: '130321', - children: null, - }, - { - label: '鏄岄粠鍘�', - value: '130322', - children: null, - }, - { - label: '鍗㈤緳鍘�', - value: '130324', - children: null, - }, - ], - }, - { - label: '閭兏甯�', - value: '130400', - children: [ - { - label: '閭北鍖�', - value: '130402', - children: null, - }, - { - label: '涓涘彴鍖�', - value: '130403', - children: null, - }, - { - label: '澶嶅叴鍖�', - value: '130404', - children: null, - }, - { - label: '宄板嘲鐭垮尯', - value: '130406', - children: null, - }, - { - label: '鑲ヤ埂鍖�', - value: '130407', - children: null, - }, - { - label: '姘稿勾鍖�', - value: '130408', - children: null, - }, - { - label: '涓存汲鍘�', - value: '130423', - children: null, - }, - { - label: '鎴愬畨鍘�', - value: '130424', - children: null, - }, - { - label: '澶у悕鍘�', - value: '130425', - children: null, - }, - { - label: '娑夊幙', - value: '130426', - children: null, - }, - { - label: '纾佸幙', - value: '130427', - children: null, - }, - { - label: '閭卞幙', - value: '130430', - children: null, - }, - { - label: '楦℃辰鍘�', - value: '130431', - children: null, - }, - { - label: '骞垮钩鍘�', - value: '130432', - children: null, - }, - { - label: '棣嗛櫠鍘�', - value: '130433', - children: null, - }, - { - label: '榄忓幙', - value: '130434', - children: null, - }, - { - label: '鏇插懆鍘�', - value: '130435', - children: null, - }, - { - label: '姝﹀畨甯�', - value: '130481', - children: null, - }, - ], - }, - { - label: '閭㈠彴甯�', - value: '130500', - children: [ - { - label: '妗ヤ笢鍖�', - value: '130502', - children: null, - }, - { - label: '妗ヨタ鍖�', - value: '130503', - children: null, - }, - { - label: '閭㈠彴鍘�', - value: '130521', - children: null, - }, - { - label: '涓村煄鍘�', - value: '130522', - children: null, - }, - { - label: '鍐呬笜鍘�', - value: '130523', - children: null, - }, - { - label: '鏌忎埂鍘�', - value: '130524', - children: null, - }, - { - label: '闅嗗哀鍘�', - value: '130525', - children: null, - }, - { - label: '浠诲幙', - value: '130526', - children: null, - }, - { - label: '鍗楀拰鍘�', - value: '130527', - children: null, - }, - { - label: '瀹佹檵鍘�', - value: '130528', - children: null, - }, - { - label: '宸ㄩ箍鍘�', - value: '130529', - children: null, - }, - { - label: '鏂版渤鍘�', - value: '130530', - children: null, - }, - { - label: '骞垮畻鍘�', - value: '130531', - children: null, - }, - { - label: '骞充埂鍘�', - value: '130532', - children: null, - }, - { - label: '濞佸幙', - value: '130533', - children: null, - }, - { - label: '娓呮渤鍘�', - value: '130534', - children: null, - }, - { - label: '涓磋タ鍘�', - value: '130535', - children: null, - }, - { - label: '鍗楀甯�', - value: '130581', - children: null, - }, - { - label: '娌欐渤甯�', - value: '130582', - children: null, - }, - ], - }, - { - label: '淇濆畾甯�', - value: '130600', - children: [ - { - label: '绔炵鍖�', - value: '130602', - children: null, - }, - { - label: '鑾叉睜鍖�', - value: '130606', - children: null, - }, - { - label: '婊″煄鍖�', - value: '130607', - children: null, - }, - { - label: '娓呰嫅鍖�', - value: '130608', - children: null, - }, - { - label: '寰愭按鍖�', - value: '130609', - children: null, - }, - { - label: '娑炴按鍘�', - value: '130623', - children: null, - }, - { - label: '闃滃钩鍘�', - value: '130624', - children: null, - }, - { - label: '瀹氬叴鍘�', - value: '130626', - children: null, - }, - { - label: '鍞愬幙', - value: '130627', - children: null, - }, - { - label: '楂橀槼鍘�', - value: '130628', - children: null, - }, - { - label: '瀹瑰煄鍘�', - value: '130629', - children: null, - }, - { - label: '娑炴簮鍘�', - value: '130630', - children: null, - }, - { - label: '鏈涢兘鍘�', - value: '130631', - children: null, - }, - { - label: '瀹夋柊鍘�', - value: '130632', - children: null, - }, - { - label: '鏄撳幙', - value: '130633', - children: null, - }, - { - label: '鏇查槼鍘�', - value: '130634', - children: null, - }, - { - label: '锠″幙', - value: '130635', - children: null, - }, - { - label: '椤哄钩鍘�', - value: '130636', - children: null, - }, - { - label: '鍗氶噹鍘�', - value: '130637', - children: null, - }, - { - label: '闆勫幙', - value: '130638', - children: null, - }, - { - label: '娑垮窞甯�', - value: '130681', - children: null, - }, - { - label: '瀹氬窞甯�', - value: '130682', - children: null, - }, - { - label: '瀹夊浗甯�', - value: '130683', - children: null, - }, - { - label: '楂樼搴楀競', - value: '130684', - children: null, - }, - ], - }, - { - label: '寮犲鍙e競', - value: '130700', - children: [ - { - label: '妗ヤ笢鍖�', - value: '130702', - children: null, - }, - { - label: '妗ヨタ鍖�', - value: '130703', - children: null, - }, - { - label: '瀹e寲鍖�', - value: '130705', - children: null, - }, - { - label: '涓嬭姳鍥尯', - value: '130706', - children: null, - }, - { - label: '涓囧叏鍖�', - value: '130708', - children: null, - }, - { - label: '宕囩ぜ鍖�', - value: '130709', - children: null, - }, - { - label: '寮犲寳鍘�', - value: '130722', - children: null, - }, - { - label: '搴蜂繚鍘�', - value: '130723', - children: null, - }, - { - label: '娌芥簮鍘�', - value: '130724', - children: null, - }, - { - label: '灏氫箟鍘�', - value: '130725', - children: null, - }, - { - label: '钄氬幙', - value: '130726', - children: null, - }, - { - label: '闃冲師鍘�', - value: '130727', - children: null, - }, - { - label: '鎬�瀹夊幙', - value: '130728', - children: null, - }, - { - label: '鎬�鏉ュ幙', - value: '130730', - children: null, - }, - { - label: '娑块箍鍘�', - value: '130731', - children: null, - }, - { - label: '璧ゅ煄鍘�', - value: '130732', - children: null, - }, - ], - }, - { - label: '鎵垮痉甯�', - value: '130800', - children: [ - { - label: '鍙屾ˉ鍖�', - value: '130802', - children: null, - }, - { - label: '鍙屾沪鍖�', - value: '130803', - children: null, - }, - { - label: '楣版墜钀ュ瓙鐭垮尯', - value: '130804', - children: null, - }, - { - label: '鎵垮痉鍘�', - value: '130821', - children: null, - }, - { - label: '鍏撮殕鍘�', - value: '130822', - children: null, - }, - { - label: '婊﹀钩鍘�', - value: '130824', - children: null, - }, - { - label: '闅嗗寲鍘�', - value: '130825', - children: null, - }, - { - label: '涓板畞婊℃棌鑷不鍘�', - value: '130826', - children: null, - }, - { - label: '瀹藉煄婊℃棌鑷不鍘�', - value: '130827', - children: null, - }, - { - label: '鍥村満婊℃棌钂欏彜鏃忚嚜娌诲幙', - value: '130828', - children: null, - }, - { - label: '骞虫硥甯�', - value: '130881', - children: null, - }, - ], - }, - { - label: '娌у窞甯�', - value: '130900', - children: [ - { - label: '鏂板崕鍖�', - value: '130902', - children: null, - }, - { - label: '杩愭渤鍖�', - value: '130903', - children: null, - }, - { - label: '娌у幙', - value: '130921', - children: null, - }, - { - label: '闈掑幙', - value: '130922', - children: null, - }, - { - label: '涓滃厜鍘�', - value: '130923', - children: null, - }, - { - label: '娴峰叴鍘�', - value: '130924', - children: null, - }, - { - label: '鐩愬北鍘�', - value: '130925', - children: null, - }, - { - label: '鑲冨畞鍘�', - value: '130926', - children: null, - }, - { - label: '鍗楃毊鍘�', - value: '130927', - children: null, - }, - { - label: '鍚存ˉ鍘�', - value: '130928', - children: null, - }, - { - label: '鐚幙', - value: '130929', - children: null, - }, - { - label: '瀛熸潙鍥炴棌鑷不鍘�', - value: '130930', - children: null, - }, - { - label: '娉婂ご甯�', - value: '130981', - children: null, - }, - { - label: '浠讳笜甯�', - value: '130982', - children: null, - }, - { - label: '榛勯獏甯�', - value: '130983', - children: null, - }, - { - label: '娌抽棿甯�', - value: '130984', - children: null, - }, - ], - }, - { - label: '寤婂潑甯�', - value: '131000', - children: [ - { - label: '瀹夋鍖�', - value: '131002', - children: null, - }, - { - label: '骞块槼鍖�', - value: '131003', - children: null, - }, - { - label: '鍥哄畨鍘�', - value: '131022', - children: null, - }, - { - label: '姘告竻鍘�', - value: '131023', - children: null, - }, - { - label: '棣欐渤鍘�', - value: '131024', - children: null, - }, - { - label: '澶у煄鍘�', - value: '131025', - children: null, - }, - { - label: '鏂囧畨鍘�', - value: '131026', - children: null, - }, - { - label: '澶у巶鍥炴棌鑷不鍘�', - value: '131028', - children: null, - }, - { - label: '闇稿窞甯�', - value: '131081', - children: null, - }, - { - label: '涓夋渤甯�', - value: '131082', - children: null, - }, - ], - }, - { - label: '琛℃按甯�', - value: '131100', - children: [ - { - label: '妗冨煄鍖�', - value: '131102', - children: null, - }, - { - label: '鍐�宸炲尯', - value: '131103', - children: null, - }, - { - label: '鏋e己鍘�', - value: '131121', - children: null, - }, - { - label: '姝﹂倯鍘�', - value: '131122', - children: null, - }, - { - label: '姝﹀己鍘�', - value: '131123', - children: null, - }, - { - label: '楗堕槼鍘�', - value: '131124', - children: null, - }, - { - label: '瀹夊钩鍘�', - value: '131125', - children: null, - }, - { - label: '鏁呭煄鍘�', - value: '131126', - children: null, - }, - { - label: '鏅幙', - value: '131127', - children: null, - }, - { - label: '闃滃煄鍘�', - value: '131128', - children: null, - }, - { - label: '娣卞窞甯�', - value: '131182', - children: null, - }, - ], - }, - ], - }, - { - label: '灞辫タ鐪�', - value: '140000', - children: [ - { - label: '澶師甯�', - value: '140100', - children: [ - { - label: '灏忓簵鍖�', - value: '140105', - children: null, - }, - { - label: '杩庢辰鍖�', - value: '140106', - children: null, - }, - { - label: '鏉忚姳宀尯', - value: '140107', - children: null, - }, - { - label: '灏栬崏鍧尯', - value: '140108', - children: null, - }, - { - label: '涓囨煆鏋楀尯', - value: '140109', - children: null, - }, - { - label: '鏅嬫簮鍖�', - value: '140110', - children: null, - }, - { - label: '娓呭緪鍘�', - value: '140121', - children: null, - }, - { - label: '闃虫洸鍘�', - value: '140122', - children: null, - }, - { - label: '濞勭儲鍘�', - value: '140123', - children: null, - }, - { - label: '鍙や氦甯�', - value: '140181', - children: null, - }, - ], - }, - { - label: '澶у悓甯�', - value: '140200', - children: [ - { - label: '鏂拌崳鍖�', - value: '140212', - children: null, - }, - { - label: '骞冲煄鍖�', - value: '140213', - children: null, - }, - { - label: '浜戝唸鍖�', - value: '140214', - children: null, - }, - { - label: '浜戝窞鍖�', - value: '140215', - children: null, - }, - { - label: '闃抽珮鍘�', - value: '140221', - children: null, - }, - { - label: '澶╅晣鍘�', - value: '140222', - children: null, - }, - { - label: '骞跨伒鍘�', - value: '140223', - children: null, - }, - { - label: '鐏典笜鍘�', - value: '140224', - children: null, - }, - { - label: '娴戞簮鍘�', - value: '140225', - children: null, - }, - { - label: '宸︿簯鍘�', - value: '140226', - children: null, - }, - ], - }, - { - label: '闃虫硥甯�', - value: '140300', - children: [ - { - label: '鍩庡尯', - value: '140302', - children: null, - }, - { - label: '鐭垮尯', - value: '140303', - children: null, - }, - { - label: '閮婂尯', - value: '140311', - children: null, - }, - { - label: '骞冲畾鍘�', - value: '140321', - children: null, - }, - { - label: '鐩傚幙', - value: '140322', - children: null, - }, - ], - }, - { - label: '闀挎不甯�', - value: '140400', - children: [ - { - label: '娼炲窞鍖�', - value: '140403', - children: null, - }, - { - label: '涓婂厷鍖�', - value: '140404', - children: null, - }, - { - label: '灞暀鍖�', - value: '140405', - children: null, - }, - { - label: '娼炲煄鍖�', - value: '140406', - children: null, - }, - { - label: '瑗勫灒鍘�', - value: '140423', - children: null, - }, - { - label: '骞抽『鍘�', - value: '140425', - children: null, - }, - { - label: '榛庡煄鍘�', - value: '140426', - children: null, - }, - { - label: '澹跺叧鍘�', - value: '140427', - children: null, - }, - { - label: '闀垮瓙鍘�', - value: '140428', - children: null, - }, - { - label: '姝︿埂鍘�', - value: '140429', - children: null, - }, - { - label: '娌佸幙', - value: '140430', - children: null, - }, - { - label: '娌佹簮鍘�', - value: '140431', - children: null, - }, - ], - }, - { - label: '鏅嬪煄甯�', - value: '140500', - children: [ - { - label: '鍩庡尯', - value: '140502', - children: null, - }, - { - label: '娌佹按鍘�', - value: '140521', - children: null, - }, - { - label: '闃冲煄鍘�', - value: '140522', - children: null, - }, - { - label: '闄靛窛鍘�', - value: '140524', - children: null, - }, - { - label: '娉藉窞鍘�', - value: '140525', - children: null, - }, - { - label: '楂樺钩甯�', - value: '140581', - children: null, - }, - ], - }, - { - label: '鏈斿窞甯�', - value: '140600', - children: [ - { - label: '鏈斿煄鍖�', - value: '140602', - children: null, - }, - { - label: '骞抽瞾鍖�', - value: '140603', - children: null, - }, - { - label: '灞遍槾鍘�', - value: '140621', - children: null, - }, - { - label: '搴斿幙', - value: '140622', - children: null, - }, - { - label: '鍙崇帀鍘�', - value: '140623', - children: null, - }, - { - label: '鎬�浠佸競', - value: '140681', - children: null, - }, - ], - }, - { - label: '鏅嬩腑甯�', - value: '140700', - children: [ - { - label: '姒嗘鍖�', - value: '140702', - children: null, - }, - { - label: '姒嗙ぞ鍘�', - value: '140721', - children: null, - }, - { - label: '宸︽潈鍘�', - value: '140722', - children: null, - }, - { - label: '鍜岄『鍘�', - value: '140723', - children: null, - }, - { - label: '鏄旈槼鍘�', - value: '140724', - children: null, - }, - { - label: '瀵块槼鍘�', - value: '140725', - children: null, - }, - { - label: '澶胺鍘�', - value: '140726', - children: null, - }, - { - label: '绁佸幙', - value: '140727', - children: null, - }, - { - label: '骞抽仴鍘�', - value: '140728', - children: null, - }, - { - label: '鐏电煶鍘�', - value: '140729', - children: null, - }, - { - label: '浠嬩紤甯�', - value: '140781', - children: null, - }, - ], - }, - { - label: '杩愬煄甯�', - value: '140800', - children: [ - { - label: '鐩愭箹鍖�', - value: '140802', - children: null, - }, - { - label: '涓寸寳鍘�', - value: '140821', - children: null, - }, - { - label: '涓囪崳鍘�', - value: '140822', - children: null, - }, - { - label: '闂诲枩鍘�', - value: '140823', - children: null, - }, - { - label: '绋峰北鍘�', - value: '140824', - children: null, - }, - { - label: '鏂扮粵鍘�', - value: '140825', - children: null, - }, - { - label: '缁涘幙', - value: '140826', - children: null, - }, - { - label: '鍨f洸鍘�', - value: '140827', - children: null, - }, - { - label: '澶忓幙', - value: '140828', - children: null, - }, - { - label: '骞抽檰鍘�', - value: '140829', - children: null, - }, - { - label: '鑺煄鍘�', - value: '140830', - children: null, - }, - { - label: '姘告祹甯�', - value: '140881', - children: null, - }, - { - label: '娌虫触甯�', - value: '140882', - children: null, - }, - ], - }, - { - label: '蹇诲窞甯�', - value: '140900', - children: [ - { - label: '蹇诲簻鍖�', - value: '140902', - children: null, - }, - { - label: '瀹氳鍘�', - value: '140921', - children: null, - }, - { - label: '浜斿彴鍘�', - value: '140922', - children: null, - }, - { - label: '浠e幙', - value: '140923', - children: null, - }, - { - label: '绻佸硻鍘�', - value: '140924', - children: null, - }, - { - label: '瀹佹鍘�', - value: '140925', - children: null, - }, - { - label: '闈欎箰鍘�', - value: '140926', - children: null, - }, - { - label: '绁炴睜鍘�', - value: '140927', - children: null, - }, - { - label: '浜斿鍘�', - value: '140928', - children: null, - }, - { - label: '宀㈠矚鍘�', - value: '140929', - children: null, - }, - { - label: '娌虫洸鍘�', - value: '140930', - children: null, - }, - { - label: '淇濆痉鍘�', - value: '140931', - children: null, - }, - { - label: '鍋忓叧鍘�', - value: '140932', - children: null, - }, - { - label: '鍘熷钩甯�', - value: '140981', - children: null, - }, - ], - }, - { - label: '涓存本甯�', - value: '141000', - children: [ - { - label: '灏ч兘鍖�', - value: '141002', - children: null, - }, - { - label: '鏇叉矁鍘�', - value: '141021', - children: null, - }, - { - label: '缈煎煄鍘�', - value: '141022', - children: null, - }, - { - label: '瑗勬本鍘�', - value: '141023', - children: null, - }, - { - label: '娲礊鍘�', - value: '141024', - children: null, - }, - { - label: '鍙ゅ幙', - value: '141025', - children: null, - }, - { - label: '瀹夋辰鍘�', - value: '141026', - children: null, - }, - { - label: '娴北鍘�', - value: '141027', - children: null, - }, - { - label: '鍚夊幙', - value: '141028', - children: null, - }, - { - label: '涔″畞鍘�', - value: '141029', - children: null, - }, - { - label: '澶у畞鍘�', - value: '141030', - children: null, - }, - { - label: '闅板幙', - value: '141031', - children: null, - }, - { - label: '姘稿拰鍘�', - value: '141032', - children: null, - }, - { - label: '钂插幙', - value: '141033', - children: null, - }, - { - label: '姹捐タ鍘�', - value: '141034', - children: null, - }, - { - label: '渚┈甯�', - value: '141081', - children: null, - }, - { - label: '闇嶅窞甯�', - value: '141082', - children: null, - }, - ], - }, - { - label: '鍚曟甯�', - value: '141100', - children: [ - { - label: '绂荤煶鍖�', - value: '141102', - children: null, - }, - { - label: '鏂囨按鍘�', - value: '141121', - children: null, - }, - { - label: '浜ゅ煄鍘�', - value: '141122', - children: null, - }, - { - label: '鍏村幙', - value: '141123', - children: null, - }, - { - label: '涓村幙', - value: '141124', - children: null, - }, - { - label: '鏌虫灄鍘�', - value: '141125', - children: null, - }, - { - label: '鐭虫ゼ鍘�', - value: '141126', - children: null, - }, - { - label: '宀氬幙', - value: '141127', - children: null, - }, - { - label: '鏂瑰北鍘�', - value: '141128', - children: null, - }, - { - label: '涓槼鍘�', - value: '141129', - children: null, - }, - { - label: '浜ゅ彛鍘�', - value: '141130', - children: null, - }, - { - label: '瀛濅箟甯�', - value: '141181', - children: null, - }, - { - label: '姹鹃槼甯�', - value: '141182', - children: null, - }, - ], - }, - ], - }, - { - label: '鍐呰挋鍙よ嚜娌诲尯', - value: '150000', - children: [ - { - label: '鍛煎拰娴╃壒甯�', - value: '150100', - children: [ - { - label: '鏂板煄鍖�', - value: '150102', - children: null, - }, - { - label: '鍥炴皯鍖�', - value: '150103', - children: null, - }, - { - label: '鐜夋硥鍖�', - value: '150104', - children: null, - }, - { - label: '璧涚綍鍖�', - value: '150105', - children: null, - }, - { - label: '鍦熼粯鐗瑰乏鏃�', - value: '150121', - children: null, - }, - { - label: '鎵樺厠鎵樺幙', - value: '150122', - children: null, - }, - { - label: '鍜屾灄鏍煎皵鍘�', - value: '150123', - children: null, - }, - { - label: '娓呮按娌冲幙', - value: '150124', - children: null, - }, - { - label: '姝﹀窛鍘�', - value: '150125', - children: null, - }, - ], - }, - { - label: '鍖呭ご甯�', - value: '150200', - children: [ - { - label: '涓滄渤鍖�', - value: '150202', - children: null, - }, - { - label: '鏄嗛兘浠戝尯', - value: '150203', - children: null, - }, - { - label: '闈掑北鍖�', - value: '150204', - children: null, - }, - { - label: '鐭虫嫄鍖�', - value: '150205', - children: null, - }, - { - label: '鐧戒簯閯傚崥鐭垮尯', - value: '150206', - children: null, - }, - { - label: '涔濆師鍖�', - value: '150207', - children: null, - }, - { - label: '鍦熼粯鐗瑰彸鏃�', - value: '150221', - children: null, - }, - { - label: '鍥洪槼鍘�', - value: '150222', - children: null, - }, - { - label: '杈惧皵缃曡寕鏄庡畨鑱斿悎鏃�', - value: '150223', - children: null, - }, - ], - }, - { - label: '涔屾捣甯�', - value: '150300', - children: [ - { - label: '娴峰媰婀惧尯', - value: '150302', - children: null, - }, - { - label: '娴峰崡鍖�', - value: '150303', - children: null, - }, - { - label: '涔岃揪鍖�', - value: '150304', - children: null, - }, - ], - }, - { - label: '璧ゅ嘲甯�', - value: '150400', - children: [ - { - label: '绾㈠北鍖�', - value: '150402', - children: null, - }, - { - label: '鍏冨疂灞卞尯', - value: '150403', - children: null, - }, - { - label: '鏉惧北鍖�', - value: '150404', - children: null, - }, - { - label: '闃块瞾绉戝皵娌佹棗', - value: '150421', - children: null, - }, - { - label: '宸存灄宸︽棗', - value: '150422', - children: null, - }, - { - label: '宸存灄鍙虫棗', - value: '150423', - children: null, - }, - { - label: '鏋楄タ鍘�', - value: '150424', - children: null, - }, - { - label: '鍏嬩粈鍏嬭吘鏃�', - value: '150425', - children: null, - }, - { - label: '缈佺墰鐗规棗', - value: '150426', - children: null, - }, - { - label: '鍠�鍠囨瞾鏃�', - value: '150428', - children: null, - }, - { - label: '瀹佸煄鍘�', - value: '150429', - children: null, - }, - { - label: '鏁栨眽鏃�', - value: '150430', - children: null, - }, - ], - }, - { - label: '閫氳窘甯�', - value: '150500', - children: [ - { - label: '绉戝皵娌佸尯', - value: '150502', - children: null, - }, - { - label: '绉戝皵娌佸乏缈间腑鏃�', - value: '150521', - children: null, - }, - { - label: '绉戝皵娌佸乏缈煎悗鏃�', - value: '150522', - children: null, - }, - { - label: '寮�椴佸幙', - value: '150523', - children: null, - }, - { - label: '搴撲鸡鏃�', - value: '150524', - children: null, - }, - { - label: '濂堟浖鏃�', - value: '150525', - children: null, - }, - { - label: '鎵庨瞾鐗规棗', - value: '150526', - children: null, - }, - { - label: '闇嶆灄閮嫆甯�', - value: '150581', - children: null, - }, - ], - }, - { - label: '閯傚皵澶氭柉甯�', - value: '150600', - children: [ - { - label: '涓滆儨鍖�', - value: '150602', - children: null, - }, - { - label: '搴峰反浠�鍖�', - value: '150603', - children: null, - }, - { - label: '杈炬媺鐗规棗', - value: '150621', - children: null, - }, - { - label: '鍑嗘牸灏旀棗', - value: '150622', - children: null, - }, - { - label: '閯傛墭鍏嬪墠鏃�', - value: '150623', - children: null, - }, - { - label: '閯傛墭鍏嬫棗', - value: '150624', - children: null, - }, - { - label: '鏉敠鏃�', - value: '150625', - children: null, - }, - { - label: '涔屽鏃�', - value: '150626', - children: null, - }, - { - label: '浼婇噾闇嶆礇鏃�', - value: '150627', - children: null, - }, - ], - }, - { - label: '鍛间鸡璐濆皵甯�', - value: '150700', - children: [ - { - label: '娴锋媺灏斿尯', - value: '150702', - children: null, - }, - { - label: '鎵庤祲璇哄皵鍖�', - value: '150703', - children: null, - }, - { - label: '闃胯崳鏃�', - value: '150721', - children: null, - }, - { - label: '鑾姏杈剧摝杈炬枴灏旀棌鑷不鏃�', - value: '150722', - children: null, - }, - { - label: '閯備鸡鏄ヨ嚜娌绘棗', - value: '150723', - children: null, - }, - { - label: '閯傛俯鍏嬫棌鑷不鏃�', - value: '150724', - children: null, - }, - { - label: '闄堝反灏旇檸鏃�', - value: '150725', - children: null, - }, - { - label: '鏂板反灏旇檸宸︽棗', - value: '150726', - children: null, - }, - { - label: '鏂板反灏旇檸鍙虫棗', - value: '150727', - children: null, - }, - { - label: '婊℃床閲屽競', - value: '150781', - children: null, - }, - { - label: '鐗欏厠鐭冲競', - value: '150782', - children: null, - }, - { - label: '鎵庡叞灞競', - value: '150783', - children: null, - }, - { - label: '棰濆皵鍙ょ撼甯�', - value: '150784', - children: null, - }, - { - label: '鏍规渤甯�', - value: '150785', - children: null, - }, - ], - }, - { - label: '宸村溅娣栧皵甯�', - value: '150800', - children: [ - { - label: '涓存渤鍖�', - value: '150802', - children: null, - }, - { - label: '浜斿師鍘�', - value: '150821', - children: null, - }, - { - label: '纾村彛鍘�', - value: '150822', - children: null, - }, - { - label: '涔屾媺鐗瑰墠鏃�', - value: '150823', - children: null, - }, - { - label: '涔屾媺鐗逛腑鏃�', - value: '150824', - children: null, - }, - { - label: '涔屾媺鐗瑰悗鏃�', - value: '150825', - children: null, - }, - { - label: '鏉敠鍚庢棗', - value: '150826', - children: null, - }, - ], - }, - { - label: '涔屽叞瀵熷竷甯�', - value: '150900', - children: [ - { - label: '闆嗗畞鍖�', - value: '150902', - children: null, - }, - { - label: '鍗撹祫鍘�', - value: '150921', - children: null, - }, - { - label: '鍖栧痉鍘�', - value: '150922', - children: null, - }, - { - label: '鍟嗛兘鍘�', - value: '150923', - children: null, - }, - { - label: '鍏村拰鍘�', - value: '150924', - children: null, - }, - { - label: '鍑夊煄鍘�', - value: '150925', - children: null, - }, - { - label: '瀵熷搱灏斿彸缈煎墠鏃�', - value: '150926', - children: null, - }, - { - label: '瀵熷搱灏斿彸缈间腑鏃�', - value: '150927', - children: null, - }, - { - label: '瀵熷搱灏斿彸缈煎悗鏃�', - value: '150928', - children: null, - }, - { - label: '鍥涘瓙鐜嬫棗', - value: '150929', - children: null, - }, - { - label: '涓伴晣甯�', - value: '150981', - children: null, - }, - ], - }, - { - label: '鍏村畨鐩�', - value: '152200', - children: [ - { - label: '涔屽叞娴╃壒甯�', - value: '152201', - children: null, - }, - { - label: '闃垮皵灞卞競', - value: '152202', - children: null, - }, - { - label: '绉戝皵娌佸彸缈煎墠鏃�', - value: '152221', - children: null, - }, - { - label: '绉戝皵娌佸彸缈间腑鏃�', - value: '152222', - children: null, - }, - { - label: '鎵庤祲鐗规棗', - value: '152223', - children: null, - }, - { - label: '绐佹硥鍘�', - value: '152224', - children: null, - }, - ], - }, - { - label: '閿℃灄閮嫆鐩�', - value: '152500', - children: [ - { - label: '浜岃繛娴╃壒甯�', - value: '152501', - children: null, - }, - { - label: '閿℃灄娴╃壒甯�', - value: '152502', - children: null, - }, - { - label: '闃垮反鍢庢棗', - value: '152522', - children: null, - }, - { - label: '鑻忓凹鐗瑰乏鏃�', - value: '152523', - children: null, - }, - { - label: '鑻忓凹鐗瑰彸鏃�', - value: '152524', - children: null, - }, - { - label: '涓滀箤鐝犵﹩娌佹棗', - value: '152525', - children: null, - }, - { - label: '瑗夸箤鐝犵﹩娌佹棗', - value: '152526', - children: null, - }, - { - label: '澶粏瀵烘棗', - value: '152527', - children: null, - }, - { - label: '闀堕粍鏃�', - value: '152528', - children: null, - }, - { - label: '姝i暥鐧芥棗', - value: '152529', - children: null, - }, - { - label: '姝h摑鏃�', - value: '152530', - children: null, - }, - { - label: '澶氫鸡鍘�', - value: '152531', - children: null, - }, - ], - }, - { - label: '闃挎媺鍠勭洘', - value: '152900', - children: [ - { - label: '闃挎媺鍠勫乏鏃�', - value: '152921', - children: null, - }, - { - label: '闃挎媺鍠勫彸鏃�', - value: '152922', - children: null, - }, - { - label: '棰濇祹绾虫棗', - value: '152923', - children: null, - }, - ], - }, - ], - }, - { - label: '杈藉畞鐪�', - value: '210000', - children: [ - { - label: '娌堥槼甯�', - value: '210100', - children: [ - { - label: '鍜屽钩鍖�', - value: '210102', - children: null, - }, - { - label: '娌堟渤鍖�', - value: '210103', - children: null, - }, - { - label: '澶т笢鍖�', - value: '210104', - children: null, - }, - { - label: '鐨囧鍖�', - value: '210105', - children: null, - }, - { - label: '閾佽タ鍖�', - value: '210106', - children: null, - }, - { - label: '鑻忓灞尯', - value: '210111', - children: null, - }, - { - label: '娴戝崡鍖�', - value: '210112', - children: null, - }, - { - label: '娌堝寳鏂板尯', - value: '210113', - children: null, - }, - { - label: '浜庢椽鍖�', - value: '210114', - children: null, - }, - { - label: '杈戒腑鍖�', - value: '210115', - children: null, - }, - { - label: '搴峰钩鍘�', - value: '210123', - children: null, - }, - { - label: '娉曞簱鍘�', - value: '210124', - children: null, - }, - { - label: '鏂版皯甯�', - value: '210181', - children: null, - }, - ], - }, - { - label: '澶ц繛甯�', - value: '210200', - children: [ - { - label: '涓北鍖�', - value: '210202', - children: null, - }, - { - label: '瑗垮矖鍖�', - value: '210203', - children: null, - }, - { - label: '娌欐渤鍙e尯', - value: '210204', - children: null, - }, - { - label: '鐢樹簳瀛愬尯', - value: '210211', - children: null, - }, - { - label: '鏃呴『鍙e尯', - value: '210212', - children: null, - }, - { - label: '閲戝窞鍖�', - value: '210213', - children: null, - }, - { - label: '鏅叞搴楀尯', - value: '210214', - children: null, - }, - { - label: '闀挎捣鍘�', - value: '210224', - children: null, - }, - { - label: '鐡︽埧搴楀競', - value: '210281', - children: null, - }, - { - label: '搴勬渤甯�', - value: '210283', - children: null, - }, - ], - }, - { - label: '闉嶅北甯�', - value: '210300', - children: [ - { - label: '閾佷笢鍖�', - value: '210302', - children: null, - }, - { - label: '閾佽タ鍖�', - value: '210303', - children: null, - }, - { - label: '绔嬪北鍖�', - value: '210304', - children: null, - }, - { - label: '鍗冨北鍖�', - value: '210311', - children: null, - }, - { - label: '鍙板畨鍘�', - value: '210321', - children: null, - }, - { - label: '宀博婊℃棌鑷不鍘�', - value: '210323', - children: null, - }, - { - label: '娴峰煄甯�', - value: '210381', - children: null, - }, - ], - }, - { - label: '鎶氶『甯�', - value: '210400', - children: [ - { - label: '鏂版姎鍖�', - value: '210402', - children: null, - }, - { - label: '涓滄床鍖�', - value: '210403', - children: null, - }, - { - label: '鏈涜姳鍖�', - value: '210404', - children: null, - }, - { - label: '椤哄煄鍖�', - value: '210411', - children: null, - }, - { - label: '鎶氶『鍘�', - value: '210421', - children: null, - }, - { - label: '鏂板婊℃棌鑷不鍘�', - value: '210422', - children: null, - }, - { - label: '娓呭師婊℃棌鑷不鍘�', - value: '210423', - children: null, - }, - ], - }, - { - label: '鏈邯甯�', - value: '210500', - children: [ - { - label: '骞冲北鍖�', - value: '210502', - children: null, - }, - { - label: '婧箹鍖�', - value: '210503', - children: null, - }, - { - label: '鏄庡北鍖�', - value: '210504', - children: null, - }, - { - label: '鍗楄姮鍖�', - value: '210505', - children: null, - }, - { - label: '鏈邯婊℃棌鑷不鍘�', - value: '210521', - children: null, - }, - { - label: '妗撲粊婊℃棌鑷不鍘�', - value: '210522', - children: null, - }, - ], - }, - { - label: '涓逛笢甯�', - value: '210600', - children: [ - { - label: '鍏冨疂鍖�', - value: '210602', - children: null, - }, - { - label: '鎸叴鍖�', - value: '210603', - children: null, - }, - { - label: '鎸畨鍖�', - value: '210604', - children: null, - }, - { - label: '瀹界敻婊℃棌鑷不鍘�', - value: '210624', - children: null, - }, - { - label: '涓滄腐甯�', - value: '210681', - children: null, - }, - { - label: '鍑ゅ煄甯�', - value: '210682', - children: null, - }, - ], - }, - { - label: '閿﹀窞甯�', - value: '210700', - children: [ - { - label: '鍙ゅ鍖�', - value: '210702', - children: null, - }, - { - label: '鍑屾渤鍖�', - value: '210703', - children: null, - }, - { - label: '澶拰鍖�', - value: '210711', - children: null, - }, - { - label: '榛戝北鍘�', - value: '210726', - children: null, - }, - { - label: '涔夊幙', - value: '210727', - children: null, - }, - { - label: '鍑屾捣甯�', - value: '210781', - children: null, - }, - { - label: '鍖楅晣甯�', - value: '210782', - children: null, - }, - ], - }, - { - label: '钀ュ彛甯�', - value: '210800', - children: [ - { - label: '绔欏墠鍖�', - value: '210802', - children: null, - }, - { - label: '瑗垮競鍖�', - value: '210803', - children: null, - }, - { - label: '椴呴奔鍦堝尯', - value: '210804', - children: null, - }, - { - label: '鑰佽竟鍖�', - value: '210811', - children: null, - }, - { - label: '鐩栧窞甯�', - value: '210881', - children: null, - }, - { - label: '澶х煶妗ュ競', - value: '210882', - children: null, - }, - ], - }, - { - label: '闃滄柊甯�', - value: '210900', - children: [ - { - label: '娴峰窞鍖�', - value: '210902', - children: null, - }, - { - label: '鏂伴偙鍖�', - value: '210903', - children: null, - }, - { - label: '澶钩鍖�', - value: '210904', - children: null, - }, - { - label: '娓呮渤闂ㄥ尯', - value: '210905', - children: null, - }, - { - label: '缁嗘渤鍖�', - value: '210911', - children: null, - }, - { - label: '闃滄柊钂欏彜鏃忚嚜娌诲幙', - value: '210921', - children: null, - }, - { - label: '褰版鍘�', - value: '210922', - children: null, - }, - ], - }, - { - label: '杈介槼甯�', - value: '211000', - children: [ - { - label: '鐧藉鍖�', - value: '211002', - children: null, - }, - { - label: '鏂囧湥鍖�', - value: '211003', - children: null, - }, - { - label: '瀹忎紵鍖�', - value: '211004', - children: null, - }, - { - label: '寮撻暱宀尯', - value: '211005', - children: null, - }, - { - label: '澶瓙娌冲尯', - value: '211011', - children: null, - }, - { - label: '杈介槼鍘�', - value: '211021', - children: null, - }, - { - label: '鐏甯�', - value: '211081', - children: null, - }, - ], - }, - { - label: '鐩橀敠甯�', - value: '211100', - children: [ - { - label: '鍙屽彴瀛愬尯', - value: '211102', - children: null, - }, - { - label: '鍏撮殕鍙板尯', - value: '211103', - children: null, - }, - { - label: '澶ф醇鍖�', - value: '211104', - children: null, - }, - { - label: '鐩樺北鍘�', - value: '211122', - children: null, - }, - ], - }, - { - label: '閾佸箔甯�', - value: '211200', - children: [ - { - label: '閾跺窞鍖�', - value: '211202', - children: null, - }, - { - label: '娓呮渤鍖�', - value: '211204', - children: null, - }, - { - label: '閾佸箔鍘�', - value: '211221', - children: null, - }, - { - label: '瑗夸赴鍘�', - value: '211223', - children: null, - }, - { - label: '鏄屽浘鍘�', - value: '211224', - children: null, - }, - { - label: '璋冨叺灞卞競', - value: '211281', - children: null, - }, - { - label: '寮�鍘熷競', - value: '211282', - children: null, - }, - ], - }, - { - label: '鏈濋槼甯�', - value: '211300', - children: [ - { - label: '鍙屽鍖�', - value: '211302', - children: null, - }, - { - label: '榫欏煄鍖�', - value: '211303', - children: null, - }, - { - label: '鏈濋槼鍘�', - value: '211321', - children: null, - }, - { - label: '寤哄钩鍘�', - value: '211322', - children: null, - }, - { - label: '鍠�鍠囨瞾宸︾考钂欏彜鏃忚嚜娌诲幙', - value: '211324', - children: null, - }, - { - label: '鍖楃エ甯�', - value: '211381', - children: null, - }, - { - label: '鍑屾簮甯�', - value: '211382', - children: null, - }, - ], - }, - { - label: '钁姦宀涘競', - value: '211400', - children: [ - { - label: '杩炲北鍖�', - value: '211402', - children: null, - }, - { - label: '榫欐腐鍖�', - value: '211403', - children: null, - }, - { - label: '鍗楃エ鍖�', - value: '211404', - children: null, - }, - { - label: '缁ヤ腑鍘�', - value: '211421', - children: null, - }, - { - label: '寤烘槍鍘�', - value: '211422', - children: null, - }, - { - label: '鍏村煄甯�', - value: '211481', - children: null, - }, - ], - }, - ], - }, - { - label: '鍚夋灄鐪�', - value: '220000', - children: [ - { - label: '闀挎槬甯�', - value: '220100', - children: [ - { - label: '鍗楀叧鍖�', - value: '220102', - children: null, - }, - { - label: '瀹藉煄鍖�', - value: '220103', - children: null, - }, - { - label: '鏈濋槼鍖�', - value: '220104', - children: null, - }, - { - label: '浜岄亾鍖�', - value: '220105', - children: null, - }, - { - label: '缁垮洯鍖�', - value: '220106', - children: null, - }, - { - label: '鍙岄槼鍖�', - value: '220112', - children: null, - }, - { - label: '涔濆彴鍖�', - value: '220113', - children: null, - }, - { - label: '鍐滃畨鍘�', - value: '220122', - children: null, - }, - { - label: '姒嗘爲甯�', - value: '220182', - children: null, - }, - { - label: '寰锋儬甯�', - value: '220183', - children: null, - }, - ], - }, - { - label: '鍚夋灄甯�', - value: '220200', - children: [ - { - label: '鏄岄倯鍖�', - value: '220202', - children: null, - }, - { - label: '榫欐江鍖�', - value: '220203', - children: null, - }, - { - label: '鑸硅惀鍖�', - value: '220204', - children: null, - }, - { - label: '涓版弧鍖�', - value: '220211', - children: null, - }, - { - label: '姘稿悏鍘�', - value: '220221', - children: null, - }, - { - label: '铔熸渤甯�', - value: '220281', - children: null, - }, - { - label: '妗︾敻甯�', - value: '220282', - children: null, - }, - { - label: '鑸掑叞甯�', - value: '220283', - children: null, - }, - { - label: '纾愮煶甯�', - value: '220284', - children: null, - }, - ], - }, - { - label: '鍥涘钩甯�', - value: '220300', - children: [ - { - label: '閾佽タ鍖�', - value: '220302', - children: null, - }, - { - label: '閾佷笢鍖�', - value: '220303', - children: null, - }, - { - label: '姊ㄦ爲鍘�', - value: '220322', - children: null, - }, - { - label: '浼婇�氭弧鏃忚嚜娌诲幙', - value: '220323', - children: null, - }, - { - label: '鍏富宀競', - value: '220381', - children: null, - }, - { - label: '鍙岃窘甯�', - value: '220382', - children: null, - }, - ], - }, - { - label: '杈芥簮甯�', - value: '220400', - children: [ - { - label: '榫欏北鍖�', - value: '220402', - children: null, - }, - { - label: '瑗垮畨鍖�', - value: '220403', - children: null, - }, - { - label: '涓滀赴鍘�', - value: '220421', - children: null, - }, - { - label: '涓滆窘鍘�', - value: '220422', - children: null, - }, - ], - }, - { - label: '閫氬寲甯�', - value: '220500', - children: [ - { - label: '涓滄槍鍖�', - value: '220502', - children: null, - }, - { - label: '浜岄亾姹熷尯', - value: '220503', - children: null, - }, - { - label: '閫氬寲鍘�', - value: '220521', - children: null, - }, - { - label: '杈夊崡鍘�', - value: '220523', - children: null, - }, - { - label: '鏌虫渤鍘�', - value: '220524', - children: null, - }, - { - label: '姊呮渤鍙e競', - value: '220581', - children: null, - }, - { - label: '闆嗗畨甯�', - value: '220582', - children: null, - }, - ], - }, - { - label: '鐧藉北甯�', - value: '220600', - children: [ - { - label: '娴戞睙鍖�', - value: '220602', - children: null, - }, - { - label: '姹熸簮鍖�', - value: '220605', - children: null, - }, - { - label: '鎶氭澗鍘�', - value: '220621', - children: null, - }, - { - label: '闈栧畤鍘�', - value: '220622', - children: null, - }, - { - label: '闀跨櫧鏈濋矞鏃忚嚜娌诲幙', - value: '220623', - children: null, - }, - { - label: '涓存睙甯�', - value: '220681', - children: null, - }, - ], - }, - { - label: '鏉惧師甯�', - value: '220700', - children: [ - { - label: '瀹佹睙鍖�', - value: '220702', - children: null, - }, - { - label: '鍓嶉儹灏旂綏鏂挋鍙ゆ棌鑷不鍘�', - value: '220721', - children: null, - }, - { - label: '闀垮箔鍘�', - value: '220722', - children: null, - }, - { - label: '涔惧畨鍘�', - value: '220723', - children: null, - }, - { - label: '鎵朵綑甯�', - value: '220781', - children: null, - }, - ], - }, - { - label: '鐧藉煄甯�', - value: '220800', - children: [ - { - label: '娲寳鍖�', - value: '220802', - children: null, - }, - { - label: '闀囪祲鍘�', - value: '220821', - children: null, - }, - { - label: '閫氭鍘�', - value: '220822', - children: null, - }, - { - label: '娲崡甯�', - value: '220881', - children: null, - }, - { - label: '澶у畨甯�', - value: '220882', - children: null, - }, - ], - }, - { - label: '寤惰竟鏈濋矞鏃忚嚜娌诲窞', - value: '222400', - children: [ - { - label: '寤跺悏甯�', - value: '222401', - children: null, - }, - { - label: '鍥句滑甯�', - value: '222402', - children: null, - }, - { - label: '鏁﹀寲甯�', - value: '222403', - children: null, - }, - { - label: '鐝叉槬甯�', - value: '222404', - children: null, - }, - { - label: '榫欎簳甯�', - value: '222405', - children: null, - }, - { - label: '鍜岄緳甯�', - value: '222406', - children: null, - }, - { - label: '姹竻鍘�', - value: '222424', - children: null, - }, - { - label: '瀹夊浘鍘�', - value: '222426', - children: null, - }, - ], - }, - ], - }, - { - label: '榛戦緳姹熺渷', - value: '230000', - children: [ - { - label: '鍝堝皵婊ㄥ競', - value: '230100', - children: [ - { - label: '閬撻噷鍖�', - value: '230102', - children: null, - }, - { - label: '鍗楀矖鍖�', - value: '230103', - children: null, - }, - { - label: '閬撳鍖�', - value: '230104', - children: null, - }, - { - label: '骞虫埧鍖�', - value: '230108', - children: null, - }, - { - label: '鏉惧寳鍖�', - value: '230109', - children: null, - }, - { - label: '棣欏潑鍖�', - value: '230110', - children: null, - }, - { - label: '鍛煎叞鍖�', - value: '230111', - children: null, - }, - { - label: '闃垮煄鍖�', - value: '230112', - children: null, - }, - { - label: '鍙屽煄鍖�', - value: '230113', - children: null, - }, - { - label: '渚濆叞鍘�', - value: '230123', - children: null, - }, - { - label: '鏂规鍘�', - value: '230124', - children: null, - }, - { - label: '瀹惧幙', - value: '230125', - children: null, - }, - { - label: '宸村溅鍘�', - value: '230126', - children: null, - }, - { - label: '鏈ㄥ叞鍘�', - value: '230127', - children: null, - }, - { - label: '閫氭渤鍘�', - value: '230128', - children: null, - }, - { - label: '寤跺鍘�', - value: '230129', - children: null, - }, - { - label: '灏氬織甯�', - value: '230183', - children: null, - }, - { - label: '浜斿父甯�', - value: '230184', - children: null, - }, - ], - }, - { - label: '榻愰綈鍝堝皵甯�', - value: '230200', - children: [ - { - label: '榫欐矙鍖�', - value: '230202', - children: null, - }, - { - label: '寤哄崕鍖�', - value: '230203', - children: null, - }, - { - label: '閾侀攱鍖�', - value: '230204', - children: null, - }, - { - label: '鏄傛槀婧尯', - value: '230205', - children: null, - }, - { - label: '瀵屾媺灏斿熀鍖�', - value: '230206', - children: null, - }, - { - label: '纰惧瓙灞卞尯', - value: '230207', - children: null, - }, - { - label: '姊呴噷鏂揪鏂″皵鏃忓尯', - value: '230208', - children: null, - }, - { - label: '榫欐睙鍘�', - value: '230221', - children: null, - }, - { - label: '渚濆畨鍘�', - value: '230223', - children: null, - }, - { - label: '娉版潵鍘�', - value: '230224', - children: null, - }, - { - label: '鐢樺崡鍘�', - value: '230225', - children: null, - }, - { - label: '瀵岃鍘�', - value: '230227', - children: null, - }, - { - label: '鍏嬪北鍘�', - value: '230229', - children: null, - }, - { - label: '鍏嬩笢鍘�', - value: '230230', - children: null, - }, - { - label: '鎷滄硥鍘�', - value: '230231', - children: null, - }, - { - label: '璁锋渤甯�', - value: '230281', - children: null, - }, - ], - }, - { - label: '楦¤タ甯�', - value: '230300', - children: [ - { - label: '楦″啝鍖�', - value: '230302', - children: null, - }, - { - label: '鎭掑北鍖�', - value: '230303', - children: null, - }, - { - label: '婊撮亾鍖�', - value: '230304', - children: null, - }, - { - label: '姊ㄦ爲鍖�', - value: '230305', - children: null, - }, - { - label: '鍩庡瓙娌冲尯', - value: '230306', - children: null, - }, - { - label: '楹诲北鍖�', - value: '230307', - children: null, - }, - { - label: '楦′笢鍘�', - value: '230321', - children: null, - }, - { - label: '铏庢灄甯�', - value: '230381', - children: null, - }, - { - label: '瀵嗗北甯�', - value: '230382', - children: null, - }, - ], - }, - { - label: '楣ゅ矖甯�', - value: '230400', - children: [ - { - label: '鍚戦槼鍖�', - value: '230402', - children: null, - }, - { - label: '宸ュ啘鍖�', - value: '230403', - children: null, - }, - { - label: '鍗楀北鍖�', - value: '230404', - children: null, - }, - { - label: '鍏村畨鍖�', - value: '230405', - children: null, - }, - { - label: '涓滃北鍖�', - value: '230406', - children: null, - }, - { - label: '鍏村北鍖�', - value: '230407', - children: null, - }, - { - label: '钀濆寳鍘�', - value: '230421', - children: null, - }, - { - label: '缁ユ花鍘�', - value: '230422', - children: null, - }, - ], - }, - { - label: '鍙岄腑灞卞競', - value: '230500', - children: [ - { - label: '灏栧北鍖�', - value: '230502', - children: null, - }, - { - label: '宀笢鍖�', - value: '230503', - children: null, - }, - { - label: '鍥涙柟鍙板尯', - value: '230505', - children: null, - }, - { - label: '瀹濆北鍖�', - value: '230506', - children: null, - }, - { - label: '闆嗚搐鍘�', - value: '230521', - children: null, - }, - { - label: '鍙嬭皧鍘�', - value: '230522', - children: null, - }, - { - label: '瀹濇竻鍘�', - value: '230523', - children: null, - }, - { - label: '楗舵渤鍘�', - value: '230524', - children: null, - }, - ], - }, - { - label: '澶у簡甯�', - value: '230600', - children: [ - { - label: '钀ㄥ皵鍥惧尯', - value: '230602', - children: null, - }, - { - label: '榫欏嚖鍖�', - value: '230603', - children: null, - }, - { - label: '璁╄儭璺尯', - value: '230604', - children: null, - }, - { - label: '绾㈠矖鍖�', - value: '230605', - children: null, - }, - { - label: '澶у悓鍖�', - value: '230606', - children: null, - }, - { - label: '鑲囧窞鍘�', - value: '230621', - children: null, - }, - { - label: '鑲囨簮鍘�', - value: '230622', - children: null, - }, - { - label: '鏋楃敻鍘�', - value: '230623', - children: null, - }, - { - label: '鏉滃皵浼壒钂欏彜鏃忚嚜娌诲幙', - value: '230624', - children: null, - }, - ], - }, - { - label: '浼婃槬甯�', - value: '230700', - children: [ - { - label: '浼婃槬鍖�', - value: '230702', - children: null, - }, - { - label: '鍗楀矓鍖�', - value: '230703', - children: null, - }, - { - label: '鍙嬪ソ鍖�', - value: '230704', - children: null, - }, - { - label: '瑗挎灄鍖�', - value: '230705', - children: null, - }, - { - label: '缈犲肠鍖�', - value: '230706', - children: null, - }, - { - label: '鏂伴潚鍖�', - value: '230707', - children: null, - }, - { - label: '缇庢邯鍖�', - value: '230708', - children: null, - }, - { - label: '閲戝北灞尯', - value: '230709', - children: null, - }, - { - label: '浜旇惀鍖�', - value: '230710', - children: null, - }, - { - label: '涔岄┈娌冲尯', - value: '230711', - children: null, - }, - { - label: '姹ゆ椇娌冲尯', - value: '230712', - children: null, - }, - { - label: '甯﹀箔鍖�', - value: '230713', - children: null, - }, - { - label: '涔屼紛宀尯', - value: '230714', - children: null, - }, - { - label: '绾㈡槦鍖�', - value: '230715', - children: null, - }, - { - label: '涓婄敇宀尯', - value: '230716', - children: null, - }, - { - label: '鍢夎崼鍘�', - value: '230722', - children: null, - }, - { - label: '閾佸姏甯�', - value: '230781', - children: null, - }, - ], - }, - { - label: '浣虫湪鏂競', - value: '230800', - children: [ - { - label: '鍚戦槼鍖�', - value: '230803', - children: null, - }, - { - label: '鍓嶈繘鍖�', - value: '230804', - children: null, - }, - { - label: '涓滈鍖�', - value: '230805', - children: null, - }, - { - label: '閮婂尯', - value: '230811', - children: null, - }, - { - label: '妗﹀崡鍘�', - value: '230822', - children: null, - }, - { - label: '妗﹀窛鍘�', - value: '230826', - children: null, - }, - { - label: '姹ゅ師鍘�', - value: '230828', - children: null, - }, - { - label: '鍚屾睙甯�', - value: '230881', - children: null, - }, - { - label: '瀵岄敠甯�', - value: '230882', - children: null, - }, - { - label: '鎶氳繙甯�', - value: '230883', - children: null, - }, - ], - }, - { - label: '涓冨彴娌冲競', - value: '230900', - children: [ - { - label: '鏂板叴鍖�', - value: '230902', - children: null, - }, - { - label: '妗冨北鍖�', - value: '230903', - children: null, - }, - { - label: '鑼勫瓙娌冲尯', - value: '230904', - children: null, - }, - { - label: '鍕冨埄鍘�', - value: '230921', - children: null, - }, - ], - }, - { - label: '鐗′腹姹熷競', - value: '231000', - children: [ - { - label: '涓滃畨鍖�', - value: '231002', - children: null, - }, - { - label: '闃虫槑鍖�', - value: '231003', - children: null, - }, - { - label: '鐖辨皯鍖�', - value: '231004', - children: null, - }, - { - label: '瑗垮畨鍖�', - value: '231005', - children: null, - }, - { - label: '鏋楀彛鍘�', - value: '231025', - children: null, - }, - { - label: '缁ヨ姮娌冲競', - value: '231081', - children: null, - }, - { - label: '娴锋灄甯�', - value: '231083', - children: null, - }, - { - label: '瀹佸畨甯�', - value: '231084', - children: null, - }, - { - label: '绌嗘1甯�', - value: '231085', - children: null, - }, - { - label: '涓滃畞甯�', - value: '231086', - children: null, - }, - ], - }, - { - label: '榛戞渤甯�', - value: '231100', - children: [ - { - label: '鐖辫緣鍖�', - value: '231102', - children: null, - }, - { - label: '瀚╂睙鍘�', - value: '231121', - children: null, - }, - { - label: '閫婂厠鍘�', - value: '231123', - children: null, - }, - { - label: '瀛欏惔鍘�', - value: '231124', - children: null, - }, - { - label: '鍖楀畨甯�', - value: '231181', - children: null, - }, - { - label: '浜斿ぇ杩炴睜甯�', - value: '231182', - children: null, - }, - ], - }, - { - label: '缁ュ寲甯�', - value: '231200', - children: [ - { - label: '鍖楁灄鍖�', - value: '231202', - children: null, - }, - { - label: '鏈涘鍘�', - value: '231221', - children: null, - }, - { - label: '鍏拌タ鍘�', - value: '231222', - children: null, - }, - { - label: '闈掑唸鍘�', - value: '231223', - children: null, - }, - { - label: '搴嗗畨鍘�', - value: '231224', - children: null, - }, - { - label: '鏄庢按鍘�', - value: '231225', - children: null, - }, - { - label: '缁ユ1鍘�', - value: '231226', - children: null, - }, - { - label: '瀹夎揪甯�', - value: '231281', - children: null, - }, - { - label: '鑲囦笢甯�', - value: '231282', - children: null, - }, - { - label: '娴蜂鸡甯�', - value: '231283', - children: null, - }, - ], - }, - { - label: '澶у叴瀹夊箔鍦板尯', - value: '232700', - children: [ - { - label: '婕犳渤甯�', - value: '232701', - children: null, - }, - { - label: '鍛肩帥鍘�', - value: '232721', - children: null, - }, - { - label: '濉旀渤鍘�', - value: '232722', - children: null, - }, - ], - }, - ], - }, - { - label: '涓婃捣甯�', - value: '310000', - children: [ - { - label: '涓婃捣甯�', - value: '310100', - children: [ - { - label: '榛勬郸鍖�', - value: '310101', - children: null, - }, - { - label: '寰愭眹鍖�', - value: '310104', - children: null, - }, - { - label: '闀垮畞鍖�', - value: '310105', - children: null, - }, - { - label: '闈欏畨鍖�', - value: '310106', - children: null, - }, - { - label: '鏅檧鍖�', - value: '310107', - children: null, - }, - { - label: '铏瑰彛鍖�', - value: '310109', - children: null, - }, - { - label: '鏉ㄦ郸鍖�', - value: '310110', - children: null, - }, - { - label: '闂佃鍖�', - value: '310112', - children: null, - }, - { - label: '瀹濆北鍖�', - value: '310113', - children: null, - }, - { - label: '鍢夊畾鍖�', - value: '310114', - children: null, - }, - { - label: '娴︿笢鏂板尯', - value: '310115', - children: null, - }, - { - label: '閲戝北鍖�', - value: '310116', - children: null, - }, - { - label: '鏉炬睙鍖�', - value: '310117', - children: null, - }, - { - label: '闈掓郸鍖�', - value: '310118', - children: null, - }, - { - label: '濂夎搐鍖�', - value: '310120', - children: null, - }, - { - label: '宕囨槑鍖�', - value: '310151', - children: null, - }, - ], - }, - ], - }, - { - label: '姹熻嫃鐪�', - value: '320000', - children: [ - { - label: '鍗椾含甯�', - value: '320100', - children: [ - { - label: '鐜勬鍖�', - value: '320102', - children: null, - }, - { - label: '绉︽樊鍖�', - value: '320104', - children: null, - }, - { - label: '寤洪偤鍖�', - value: '320105', - children: null, - }, - { - label: '榧撴ゼ鍖�', - value: '320106', - children: null, - }, - { - label: '娴﹀彛鍖�', - value: '320111', - children: null, - }, - { - label: '鏍栭湠鍖�', - value: '320113', - children: null, - }, - { - label: '闆ㄨ姳鍙板尯', - value: '320114', - children: null, - }, - { - label: '姹熷畞鍖�', - value: '320115', - children: null, - }, - { - label: '鍏悎鍖�', - value: '320116', - children: null, - }, - { - label: '婧ф按鍖�', - value: '320117', - children: null, - }, - { - label: '楂樻烦鍖�', - value: '320118', - children: null, - }, - ], - }, - { - label: '鏃犻敗甯�', - value: '320200', - children: [ - { - label: '閿″北鍖�', - value: '320205', - children: null, - }, - { - label: '鎯犲北鍖�', - value: '320206', - children: null, - }, - { - label: '婊ㄦ箹鍖�', - value: '320211', - children: null, - }, - { - label: '姊佹邯鍖�', - value: '320213', - children: null, - }, - { - label: '鏂板惔鍖�', - value: '320214', - children: null, - }, - { - label: '姹熼槾甯�', - value: '320281', - children: null, - }, - { - label: '瀹滃叴甯�', - value: '320282', - children: null, - }, - ], - }, - { - label: '寰愬窞甯�', - value: '320300', - children: [ - { - label: '榧撴ゼ鍖�', - value: '320302', - children: null, - }, - { - label: '浜戦緳鍖�', - value: '320303', - children: null, - }, - { - label: '璐炬豹鍖�', - value: '320305', - children: null, - }, - { - label: '娉夊北鍖�', - value: '320311', - children: null, - }, - { - label: '閾滃北鍖�', - value: '320312', - children: null, - }, - { - label: '涓板幙', - value: '320321', - children: null, - }, - { - label: '娌涘幙', - value: '320322', - children: null, - }, - { - label: '鐫㈠畞鍘�', - value: '320324', - children: null, - }, - { - label: '鏂版矀甯�', - value: '320381', - children: null, - }, - { - label: '閭冲窞甯�', - value: '320382', - children: null, - }, - ], - }, - { - label: '甯稿窞甯�', - value: '320400', - children: [ - { - label: '澶╁畞鍖�', - value: '320402', - children: null, - }, - { - label: '閽熸ゼ鍖�', - value: '320404', - children: null, - }, - { - label: '鏂板寳鍖�', - value: '320411', - children: null, - }, - { - label: '姝﹁繘鍖�', - value: '320412', - children: null, - }, - { - label: '閲戝潧鍖�', - value: '320413', - children: null, - }, - { - label: '婧ч槼甯�', - value: '320481', - children: null, - }, - ], - }, - { - label: '鑻忓窞甯�', - value: '320500', - children: [ - { - label: '铏庝笜鍖�', - value: '320505', - children: null, - }, - { - label: '鍚翠腑鍖�', - value: '320506', - children: null, - }, - { - label: '鐩稿煄鍖�', - value: '320507', - children: null, - }, - { - label: '濮戣嫃鍖�', - value: '320508', - children: null, - }, - { - label: '鍚存睙鍖�', - value: '320509', - children: null, - }, - { - label: '甯哥啛甯�', - value: '320581', - children: null, - }, - { - label: '寮犲娓競', - value: '320582', - children: null, - }, - { - label: '鏄嗗北甯�', - value: '320583', - children: null, - }, - { - label: '澶粨甯�', - value: '320585', - children: null, - }, - ], - }, - { - label: '鍗楅�氬競', - value: '320600', - children: [ - { - label: '宕囧窛鍖�', - value: '320602', - children: null, - }, - { - label: '娓椄鍖�', - value: '320611', - children: null, - }, - { - label: '閫氬窞鍖�', - value: '320612', - children: null, - }, - { - label: '濡備笢鍘�', - value: '320623', - children: null, - }, - { - label: '鍚笢甯�', - value: '320681', - children: null, - }, - { - label: '濡傜殝甯�', - value: '320682', - children: null, - }, - { - label: '娴烽棬甯�', - value: '320684', - children: null, - }, - { - label: '娴峰畨甯�', - value: '320685', - children: null, - }, - ], - }, - { - label: '杩炰簯娓競', - value: '320700', - children: [ - { - label: '杩炰簯鍖�', - value: '320703', - children: null, - }, - { - label: '娴峰窞鍖�', - value: '320706', - children: null, - }, - { - label: '璧f鍖�', - value: '320707', - children: null, - }, - { - label: '涓滄捣鍘�', - value: '320722', - children: null, - }, - { - label: '鐏屼簯鍘�', - value: '320723', - children: null, - }, - { - label: '鐏屽崡鍘�', - value: '320724', - children: null, - }, - ], - }, - { - label: '娣畨甯�', - value: '320800', - children: [ - { - label: '娣畨鍖�', - value: '320803', - children: null, - }, - { - label: '娣槾鍖�', - value: '320804', - children: null, - }, - { - label: '娓呮睙娴﹀尯', - value: '320812', - children: null, - }, - { - label: '娲辰鍖�', - value: '320813', - children: null, - }, - { - label: '娑熸按鍘�', - value: '320826', - children: null, - }, - { - label: '鐩辩湙鍘�', - value: '320830', - children: null, - }, - { - label: '閲戞箹鍘�', - value: '320831', - children: null, - }, - ], - }, - { - label: '鐩愬煄甯�', - value: '320900', - children: [ - { - label: '浜箹鍖�', - value: '320902', - children: null, - }, - { - label: '鐩愰兘鍖�', - value: '320903', - children: null, - }, - { - label: '澶т赴鍖�', - value: '320904', - children: null, - }, - { - label: '鍝嶆按鍘�', - value: '320921', - children: null, - }, - { - label: '婊ㄦ捣鍘�', - value: '320922', - children: null, - }, - { - label: '闃滃畞鍘�', - value: '320923', - children: null, - }, - { - label: '灏勯槼鍘�', - value: '320924', - children: null, - }, - { - label: '寤烘箹鍘�', - value: '320925', - children: null, - }, - { - label: '涓滃彴甯�', - value: '320981', - children: null, - }, - ], - }, - { - label: '鎵窞甯�', - value: '321000', - children: [ - { - label: '骞块櫟鍖�', - value: '321002', - children: null, - }, - { - label: '閭楁睙鍖�', - value: '321003', - children: null, - }, - { - label: '姹熼兘鍖�', - value: '321012', - children: null, - }, - { - label: '瀹濆簲鍘�', - value: '321023', - children: null, - }, - { - label: '浠緛甯�', - value: '321081', - children: null, - }, - { - label: '楂橀偖甯�', - value: '321084', - children: null, - }, - ], - }, - { - label: '闀囨睙甯�', - value: '321100', - children: [ - { - label: '浜彛鍖�', - value: '321102', - children: null, - }, - { - label: '娑﹀窞鍖�', - value: '321111', - children: null, - }, - { - label: '涓瑰緬鍖�', - value: '321112', - children: null, - }, - { - label: '涓归槼甯�', - value: '321181', - children: null, - }, - { - label: '鎵腑甯�', - value: '321182', - children: null, - }, - { - label: '鍙ュ甯�', - value: '321183', - children: null, - }, - ], - }, - { - label: '娉板窞甯�', - value: '321200', - children: [ - { - label: '娴烽櫟鍖�', - value: '321202', - children: null, - }, - { - label: '楂樻腐鍖�', - value: '321203', - children: null, - }, - { - label: '濮滃牥鍖�', - value: '321204', - children: null, - }, - { - label: '鍏村寲甯�', - value: '321281', - children: null, - }, - { - label: '闈栨睙甯�', - value: '321282', - children: null, - }, - { - label: '娉板叴甯�', - value: '321283', - children: null, - }, - ], - }, - { - label: '瀹胯縼甯�', - value: '321300', - children: [ - { - label: '瀹垮煄鍖�', - value: '321302', - children: null, - }, - { - label: '瀹胯鲍鍖�', - value: '321311', - children: null, - }, - { - label: '娌槼鍘�', - value: '321322', - children: null, - }, - { - label: '娉楅槼鍘�', - value: '321323', - children: null, - }, - { - label: '娉楁椽鍘�', - value: '321324', - children: null, - }, - ], - }, - ], - }, - { - label: '娴欐睙鐪�', - value: '330000', - children: [ - { - label: '鏉窞甯�', - value: '330100', - children: [ - { - label: '涓婂煄鍖�', - value: '330102', - children: null, - }, - { - label: '涓嬪煄鍖�', - value: '330103', - children: null, - }, - { - label: '姹熷共鍖�', - value: '330104', - children: null, - }, - { - label: '鎷卞鍖�', - value: '330105', - children: null, - }, - { - label: '瑗挎箹鍖�', - value: '330106', - children: null, - }, - { - label: '婊ㄦ睙鍖�', - value: '330108', - children: null, - }, - { - label: '钀у北鍖�', - value: '330109', - children: null, - }, - { - label: '浣欐澀鍖�', - value: '330110', - children: null, - }, - { - label: '瀵岄槼鍖�', - value: '330111', - children: null, - }, - { - label: '涓村畨鍖�', - value: '330112', - children: null, - }, - { - label: '妗愬簮鍘�', - value: '330122', - children: null, - }, - { - label: '娣冲畨鍘�', - value: '330127', - children: null, - }, - { - label: '寤哄痉甯�', - value: '330182', - children: null, - }, - ], - }, - { - label: '瀹佹尝甯�', - value: '330200', - children: [ - { - label: '娴锋洐鍖�', - value: '330203', - children: null, - }, - { - label: '姹熷寳鍖�', - value: '330205', - children: null, - }, - { - label: '鍖椾粦鍖�', - value: '330206', - children: null, - }, - { - label: '闀囨捣鍖�', - value: '330211', - children: null, - }, - { - label: '閯炲窞鍖�', - value: '330212', - children: null, - }, - { - label: '濂夊寲鍖�', - value: '330213', - children: null, - }, - { - label: '璞″北鍘�', - value: '330225', - children: null, - }, - { - label: '瀹佹捣鍘�', - value: '330226', - children: null, - }, - { - label: '浣欏甯�', - value: '330281', - children: null, - }, - { - label: '鎱堟邯甯�', - value: '330282', - children: null, - }, - ], - }, - { - label: '娓╁窞甯�', - value: '330300', - children: [ - { - label: '楣垮煄鍖�', - value: '330302', - children: null, - }, - { - label: '榫欐咕鍖�', - value: '330303', - children: null, - }, - { - label: '鐡捣鍖�', - value: '330304', - children: null, - }, - { - label: '娲炲ご鍖�', - value: '330305', - children: null, - }, - { - label: '姘稿槈鍘�', - value: '330324', - children: null, - }, - { - label: '骞抽槼鍘�', - value: '330326', - children: null, - }, - { - label: '鑻嶅崡鍘�', - value: '330327', - children: null, - }, - { - label: '鏂囨垚鍘�', - value: '330328', - children: null, - }, - { - label: '娉伴『鍘�', - value: '330329', - children: null, - }, - { - label: '鐟炲畨甯�', - value: '330381', - children: null, - }, - { - label: '涔愭竻甯�', - value: '330382', - children: null, - }, - ], - }, - { - label: '鍢夊叴甯�', - value: '330400', - children: [ - { - label: '鍗楁箹鍖�', - value: '330402', - children: null, - }, - { - label: '绉�娲插尯', - value: '330411', - children: null, - }, - { - label: '鍢夊杽鍘�', - value: '330421', - children: null, - }, - { - label: '娴风洂鍘�', - value: '330424', - children: null, - }, - { - label: '娴峰畞甯�', - value: '330481', - children: null, - }, - { - label: '骞虫箹甯�', - value: '330482', - children: null, - }, - { - label: '妗愪埂甯�', - value: '330483', - children: null, - }, - ], - }, - { - label: '婀栧窞甯�', - value: '330500', - children: [ - { - label: '鍚村叴鍖�', - value: '330502', - children: null, - }, - { - label: '鍗楁禂鍖�', - value: '330503', - children: null, - }, - { - label: '寰锋竻鍘�', - value: '330521', - children: null, - }, - { - label: '闀垮叴鍘�', - value: '330522', - children: null, - }, - { - label: '瀹夊悏鍘�', - value: '330523', - children: null, - }, - ], - }, - { - label: '缁嶅叴甯�', - value: '330600', - children: [ - { - label: '瓒婂煄鍖�', - value: '330602', - children: null, - }, - { - label: '鏌ˉ鍖�', - value: '330603', - children: null, - }, - { - label: '涓婅櫈鍖�', - value: '330604', - children: null, - }, - { - label: '鏂版槍鍘�', - value: '330624', - children: null, - }, - { - label: '璇告毃甯�', - value: '330681', - children: null, - }, - { - label: '宓婂窞甯�', - value: '330683', - children: null, - }, - ], - }, - { - label: '閲戝崕甯�', - value: '330700', - children: [ - { - label: '濠哄煄鍖�', - value: '330702', - children: null, - }, - { - label: '閲戜笢鍖�', - value: '330703', - children: null, - }, - { - label: '姝︿箟鍘�', - value: '330723', - children: null, - }, - { - label: '娴︽睙鍘�', - value: '330726', - children: null, - }, - { - label: '纾愬畨鍘�', - value: '330727', - children: null, - }, - { - label: '鍏版邯甯�', - value: '330781', - children: null, - }, - { - label: '涔変箤甯�', - value: '330782', - children: null, - }, - { - label: '涓滈槼甯�', - value: '330783', - children: null, - }, - { - label: '姘稿悍甯�', - value: '330784', - children: null, - }, - ], - }, - { - label: '琛㈠窞甯�', - value: '330800', - children: [ - { - label: '鏌煄鍖�', - value: '330802', - children: null, - }, - { - label: '琛㈡睙鍖�', - value: '330803', - children: null, - }, - { - label: '甯稿北鍘�', - value: '330822', - children: null, - }, - { - label: '寮�鍖栧幙', - value: '330824', - children: null, - }, - { - label: '榫欐父鍘�', - value: '330825', - children: null, - }, - { - label: '姹熷北甯�', - value: '330881', - children: null, - }, - ], - }, - { - label: '鑸熷北甯�', - value: '330900', - children: [ - { - label: '瀹氭捣鍖�', - value: '330902', - children: null, - }, - { - label: '鏅檧鍖�', - value: '330903', - children: null, - }, - { - label: '宀卞北鍘�', - value: '330921', - children: null, - }, - { - label: '宓婃硹鍘�', - value: '330922', - children: null, - }, - ], - }, - { - label: '鍙板窞甯�', - value: '331000', - children: [ - { - label: '妞掓睙鍖�', - value: '331002', - children: null, - }, - { - label: '榛勫博鍖�', - value: '331003', - children: null, - }, - { - label: '璺ˉ鍖�', - value: '331004', - children: null, - }, - { - label: '涓夐棬鍘�', - value: '331022', - children: null, - }, - { - label: '澶╁彴鍘�', - value: '331023', - children: null, - }, - { - label: '浠欏眳鍘�', - value: '331024', - children: null, - }, - { - label: '娓╁箔甯�', - value: '331081', - children: null, - }, - { - label: '涓存捣甯�', - value: '331082', - children: null, - }, - { - label: '鐜夌幆甯�', - value: '331083', - children: null, - }, - ], - }, - { - label: '涓芥按甯�', - value: '331100', - children: [ - { - label: '鑾查兘鍖�', - value: '331102', - children: null, - }, - { - label: '闈掔敯鍘�', - value: '331121', - children: null, - }, - { - label: '缂欎簯鍘�', - value: '331122', - children: null, - }, - { - label: '閬傛槍鍘�', - value: '331123', - children: null, - }, - { - label: '鏉鹃槼鍘�', - value: '331124', - children: null, - }, - { - label: '浜戝拰鍘�', - value: '331125', - children: null, - }, - { - label: '搴嗗厓鍘�', - value: '331126', - children: null, - }, - { - label: '鏅畞鐣叉棌鑷不鍘�', - value: '331127', - children: null, - }, - { - label: '榫欐硥甯�', - value: '331181', - children: null, - }, - ], - }, - ], - }, - { - label: '瀹夊窘鐪�', - value: '340000', - children: [ - { - label: '鍚堣偉甯�', - value: '340100', - children: [ - { - label: '鐟舵捣鍖�', - value: '340102', - children: null, - }, - { - label: '搴愰槼鍖�', - value: '340103', - children: null, - }, - { - label: '铚�灞卞尯', - value: '340104', - children: null, - }, - { - label: '鍖呮渤鍖�', - value: '340111', - children: null, - }, - { - label: '闀夸赴鍘�', - value: '340121', - children: null, - }, - { - label: '鑲ヤ笢鍘�', - value: '340122', - children: null, - }, - { - label: '鑲ヨタ鍘�', - value: '340123', - children: null, - }, - { - label: '搴愭睙鍘�', - value: '340124', - children: null, - }, - { - label: '宸㈡箹甯�', - value: '340181', - children: null, - }, - ], - }, - { - label: '鑺滄箹甯�', - value: '340200', - children: [ - { - label: '闀滄箹鍖�', - value: '340202', - children: null, - }, - { - label: '寮嬫睙鍖�', - value: '340203', - children: null, - }, - { - label: '楦犳睙鍖�', - value: '340207', - children: null, - }, - { - label: '涓夊北鍖�', - value: '340208', - children: null, - }, - { - label: '鑺滄箹鍘�', - value: '340221', - children: null, - }, - { - label: '绻佹槍鍘�', - value: '340222', - children: null, - }, - { - label: '鍗楅櫟鍘�', - value: '340223', - children: null, - }, - { - label: '鏃犱负鍘�', - value: '340225', - children: null, - }, - ], - }, - { - label: '铓屽煚甯�', - value: '340300', - children: [ - { - label: '榫欏瓙婀栧尯', - value: '340302', - children: null, - }, - { - label: '铓屽北鍖�', - value: '340303', - children: null, - }, - { - label: '绂逛細鍖�', - value: '340304', - children: null, - }, - { - label: '娣笂鍖�', - value: '340311', - children: null, - }, - { - label: '鎬�杩滃幙', - value: '340321', - children: null, - }, - { - label: '浜旀渤鍘�', - value: '340322', - children: null, - }, - { - label: '鍥洪晣鍘�', - value: '340323', - children: null, - }, - ], - }, - { - label: '娣崡甯�', - value: '340400', - children: [ - { - label: '澶ч�氬尯', - value: '340402', - children: null, - }, - { - label: '鐢板搴靛尯', - value: '340403', - children: null, - }, - { - label: '璋㈠闆嗗尯', - value: '340404', - children: null, - }, - { - label: '鍏叕灞卞尯', - value: '340405', - children: null, - }, - { - label: '娼橀泦鍖�', - value: '340406', - children: null, - }, - { - label: '鍑ゅ彴鍘�', - value: '340421', - children: null, - }, - { - label: '瀵垮幙', - value: '340422', - children: null, - }, - ], - }, - { - label: '椹瀺灞卞競', - value: '340500', - children: [ - { - label: '鑺卞北鍖�', - value: '340503', - children: null, - }, - { - label: '闆ㄥ北鍖�', - value: '340504', - children: null, - }, - { - label: '鍗氭湜鍖�', - value: '340506', - children: null, - }, - { - label: '褰撴秱鍘�', - value: '340521', - children: null, - }, - { - label: '鍚北鍘�', - value: '340522', - children: null, - }, - { - label: '鍜屽幙', - value: '340523', - children: null, - }, - ], - }, - { - label: '娣寳甯�', - value: '340600', - children: [ - { - label: '鏉滈泦鍖�', - value: '340602', - children: null, - }, - { - label: '鐩稿北鍖�', - value: '340603', - children: null, - }, - { - label: '鐑堝北鍖�', - value: '340604', - children: null, - }, - { - label: '婵夋邯鍘�', - value: '340621', - children: null, - }, - ], - }, - { - label: '閾滈櫟甯�', - value: '340700', - children: [ - { - label: '閾滃畼鍖�', - value: '340705', - children: null, - }, - { - label: '涔夊畨鍖�', - value: '340706', - children: null, - }, - { - label: '閮婂尯', - value: '340711', - children: null, - }, - { - label: '鏋為槼鍘�', - value: '340722', - children: null, - }, - ], - }, - { - label: '瀹夊簡甯�', - value: '340800', - children: [ - { - label: '杩庢睙鍖�', - value: '340802', - children: null, - }, - { - label: '澶ц鍖�', - value: '340803', - children: null, - }, - { - label: '瀹滅鍖�', - value: '340811', - children: null, - }, - { - label: '鎬�瀹佸幙', - value: '340822', - children: null, - }, - { - label: '澶箹鍘�', - value: '340825', - children: null, - }, - { - label: '瀹挎澗鍘�', - value: '340826', - children: null, - }, - { - label: '鏈涙睙鍘�', - value: '340827', - children: null, - }, - { - label: '宀宠タ鍘�', - value: '340828', - children: null, - }, - { - label: '妗愬煄甯�', - value: '340881', - children: null, - }, - { - label: '娼滃北甯�', - value: '340882', - children: null, - }, - ], - }, - { - label: '榛勫北甯�', - value: '341000', - children: [ - { - label: '灞邯鍖�', - value: '341002', - children: null, - }, - { - label: '榛勫北鍖�', - value: '341003', - children: null, - }, - { - label: '寰藉窞鍖�', - value: '341004', - children: null, - }, - { - label: '姝欏幙', - value: '341021', - children: null, - }, - { - label: '浼戝畞鍘�', - value: '341022', - children: null, - }, - { - label: '榛熷幙', - value: '341023', - children: null, - }, - { - label: '绁侀棬鍘�', - value: '341024', - children: null, - }, - ], - }, - { - label: '婊佸窞甯�', - value: '341100', - children: [ - { - label: '鐞呯悐鍖�', - value: '341102', - children: null, - }, - { - label: '鍗楄隘鍖�', - value: '341103', - children: null, - }, - { - label: '鏉ュ畨鍘�', - value: '341122', - children: null, - }, - { - label: '鍏ㄦ鍘�', - value: '341124', - children: null, - }, - { - label: '瀹氳繙鍘�', - value: '341125', - children: null, - }, - { - label: '鍑ら槼鍘�', - value: '341126', - children: null, - }, - { - label: '澶╅暱甯�', - value: '341181', - children: null, - }, - { - label: '鏄庡厜甯�', - value: '341182', - children: null, - }, - ], - }, - { - label: '闃滈槼甯�', - value: '341200', - children: [ - { - label: '棰嶅窞鍖�', - value: '341202', - children: null, - }, - { - label: '棰嶄笢鍖�', - value: '341203', - children: null, - }, - { - label: '棰嶆硥鍖�', - value: '341204', - children: null, - }, - { - label: '涓存硥鍘�', - value: '341221', - children: null, - }, - { - label: '澶拰鍘�', - value: '341222', - children: null, - }, - { - label: '闃滃崡鍘�', - value: '341225', - children: null, - }, - { - label: '棰嶄笂鍘�', - value: '341226', - children: null, - }, - { - label: '鐣岄甯�', - value: '341282', - children: null, - }, - ], - }, - { - label: '瀹垮窞甯�', - value: '341300', - children: [ - { - label: '鍩囨ˉ鍖�', - value: '341302', - children: null, - }, - { - label: '鐮�灞卞幙', - value: '341321', - children: null, - }, - { - label: '钀у幙', - value: '341322', - children: null, - }, - { - label: '鐏电挧鍘�', - value: '341323', - children: null, - }, - { - label: '娉楀幙', - value: '341324', - children: null, - }, - ], - }, - { - label: '鍏畨甯�', - value: '341500', - children: [ - { - label: '閲戝畨鍖�', - value: '341502', - children: null, - }, - { - label: '瑁曞畨鍖�', - value: '341503', - children: null, - }, - { - label: '鍙堕泦鍖�', - value: '341504', - children: null, - }, - { - label: '闇嶉偙鍘�', - value: '341522', - children: null, - }, - { - label: '鑸掑煄鍘�', - value: '341523', - children: null, - }, - { - label: '閲戝鍘�', - value: '341524', - children: null, - }, - { - label: '闇嶅北鍘�', - value: '341525', - children: null, - }, - ], - }, - { - label: '浜冲窞甯�', - value: '341600', - children: [ - { - label: '璋煄鍖�', - value: '341602', - children: null, - }, - { - label: '娑¢槼鍘�', - value: '341621', - children: null, - }, - { - label: '钂欏煄鍘�', - value: '341622', - children: null, - }, - { - label: '鍒╄緵鍘�', - value: '341623', - children: null, - }, - ], - }, - { - label: '姹犲窞甯�', - value: '341700', - children: [ - { - label: '璐垫睜鍖�', - value: '341702', - children: null, - }, - { - label: '涓滆嚦鍘�', - value: '341721', - children: null, - }, - { - label: '鐭冲彴鍘�', - value: '341722', - children: null, - }, - { - label: '闈掗槼鍘�', - value: '341723', - children: null, - }, - ], - }, - { - label: '瀹e煄甯�', - value: '341800', - children: [ - { - label: '瀹e窞鍖�', - value: '341802', - children: null, - }, - { - label: '閮庢邯鍘�', - value: '341821', - children: null, - }, - { - label: '骞垮痉鍘�', - value: '341822', - children: null, - }, - { - label: '娉惧幙', - value: '341823', - children: null, - }, - { - label: '缁╂邯鍘�', - value: '341824', - children: null, - }, - { - label: '鏃屽痉鍘�', - value: '341825', - children: null, - }, - { - label: '瀹佸浗甯�', - value: '341881', - children: null, - }, - ], - }, - ], - }, - { - label: '绂忓缓鐪�', - value: '350000', - children: [ - { - label: '绂忓窞甯�', - value: '350100', - children: [ - { - label: '榧撴ゼ鍖�', - value: '350102', - children: null, - }, - { - label: '鍙版睙鍖�', - value: '350103', - children: null, - }, - { - label: '浠撳北鍖�', - value: '350104', - children: null, - }, - { - label: '椹熬鍖�', - value: '350105', - children: null, - }, - { - label: '鏅嬪畨鍖�', - value: '350111', - children: null, - }, - { - label: '闀夸箰鍖�', - value: '350112', - children: null, - }, - { - label: '闂戒警鍘�', - value: '350121', - children: null, - }, - { - label: '杩炴睙鍘�', - value: '350122', - children: null, - }, - { - label: '缃楁簮鍘�', - value: '350123', - children: null, - }, - { - label: '闂芥竻鍘�', - value: '350124', - children: null, - }, - { - label: '姘告嘲鍘�', - value: '350125', - children: null, - }, - { - label: '骞虫江鍘�', - value: '350128', - children: null, - }, - { - label: '绂忔竻甯�', - value: '350181', - children: null, - }, - ], - }, - { - label: '鍘﹂棬甯�', - value: '350200', - children: [ - { - label: '鎬濇槑鍖�', - value: '350203', - children: null, - }, - { - label: '娴锋钵鍖�', - value: '350205', - children: null, - }, - { - label: '婀栭噷鍖�', - value: '350206', - children: null, - }, - { - label: '闆嗙編鍖�', - value: '350211', - children: null, - }, - { - label: '鍚屽畨鍖�', - value: '350212', - children: null, - }, - { - label: '缈斿畨鍖�', - value: '350213', - children: null, - }, - ], - }, - { - label: '鑾嗙敯甯�', - value: '350300', - children: [ - { - label: '鍩庡帰鍖�', - value: '350302', - children: null, - }, - { - label: '娑垫睙鍖�', - value: '350303', - children: null, - }, - { - label: '鑽斿煄鍖�', - value: '350304', - children: null, - }, - { - label: '绉�灞垮尯', - value: '350305', - children: null, - }, - { - label: '浠欐父鍘�', - value: '350322', - children: null, - }, - ], - }, - { - label: '涓夋槑甯�', - value: '350400', - children: [ - { - label: '姊呭垪鍖�', - value: '350402', - children: null, - }, - { - label: '涓夊厓鍖�', - value: '350403', - children: null, - }, - { - label: '鏄庢邯鍘�', - value: '350421', - children: null, - }, - { - label: '娓呮祦鍘�', - value: '350423', - children: null, - }, - { - label: '瀹佸寲鍘�', - value: '350424', - children: null, - }, - { - label: '澶х敯鍘�', - value: '350425', - children: null, - }, - { - label: '灏ゆ邯鍘�', - value: '350426', - children: null, - }, - { - label: '娌欏幙', - value: '350427', - children: null, - }, - { - label: '灏嗕箰鍘�', - value: '350428', - children: null, - }, - { - label: '娉板畞鍘�', - value: '350429', - children: null, - }, - { - label: '寤哄畞鍘�', - value: '350430', - children: null, - }, - { - label: '姘稿畨甯�', - value: '350481', - children: null, - }, - ], - }, - { - label: '娉夊窞甯�', - value: '350500', - children: [ - { - label: '椴ゅ煄鍖�', - value: '350502', - children: null, - }, - { - label: '涓版辰鍖�', - value: '350503', - children: null, - }, - { - label: '娲涙睙鍖�', - value: '350504', - children: null, - }, - { - label: '娉夋腐鍖�', - value: '350505', - children: null, - }, - { - label: '鎯犲畨鍘�', - value: '350521', - children: null, - }, - { - label: '瀹夋邯鍘�', - value: '350524', - children: null, - }, - { - label: '姘告槬鍘�', - value: '350525', - children: null, - }, - { - label: '寰峰寲鍘�', - value: '350526', - children: null, - }, - { - label: '閲戦棬鍘�', - value: '350527', - children: null, - }, - { - label: '鐭崇嫯甯�', - value: '350581', - children: null, - }, - { - label: '鏅嬫睙甯�', - value: '350582', - children: null, - }, - { - label: '鍗楀畨甯�', - value: '350583', - children: null, - }, - ], - }, - { - label: '婕冲窞甯�', - value: '350600', - children: [ - { - label: '鑺楀煄鍖�', - value: '350602', - children: null, - }, - { - label: '榫欐枃鍖�', - value: '350603', - children: null, - }, - { - label: '浜戦渼鍘�', - value: '350622', - children: null, - }, - { - label: '婕虫郸鍘�', - value: '350623', - children: null, - }, - { - label: '璇忓畨鍘�', - value: '350624', - children: null, - }, - { - label: '闀挎嘲鍘�', - value: '350625', - children: null, - }, - { - label: '涓滃北鍘�', - value: '350626', - children: null, - }, - { - label: '鍗楅潠鍘�', - value: '350627', - children: null, - }, - { - label: '骞冲拰鍘�', - value: '350628', - children: null, - }, - { - label: '鍗庡畨鍘�', - value: '350629', - children: null, - }, - { - label: '榫欐捣甯�', - value: '350681', - children: null, - }, - ], - }, - { - label: '鍗楀钩甯�', - value: '350700', - children: [ - { - label: '寤跺钩鍖�', - value: '350702', - children: null, - }, - { - label: '寤洪槼鍖�', - value: '350703', - children: null, - }, - { - label: '椤烘槍鍘�', - value: '350721', - children: null, - }, - { - label: '娴﹀煄鍘�', - value: '350722', - children: null, - }, - { - label: '鍏夋辰鍘�', - value: '350723', - children: null, - }, - { - label: '鏉炬邯鍘�', - value: '350724', - children: null, - }, - { - label: '鏀垮拰鍘�', - value: '350725', - children: null, - }, - { - label: '閭垫甯�', - value: '350781', - children: null, - }, - { - label: '姝﹀し灞卞競', - value: '350782', - children: null, - }, - { - label: '寤虹摨甯�', - value: '350783', - children: null, - }, - ], - }, - { - label: '榫欏博甯�', - value: '350800', - children: [ - { - label: '鏂扮綏鍖�', - value: '350802', - children: null, - }, - { - label: '姘稿畾鍖�', - value: '350803', - children: null, - }, - { - label: '闀挎眬鍘�', - value: '350821', - children: null, - }, - { - label: '涓婃澀鍘�', - value: '350823', - children: null, - }, - { - label: '姝﹀钩鍘�', - value: '350824', - children: null, - }, - { - label: '杩炲煄鍘�', - value: '350825', - children: null, - }, - { - label: '婕冲钩甯�', - value: '350881', - children: null, - }, - ], - }, - { - label: '瀹佸痉甯�', - value: '350900', - children: [ - { - label: '钑夊煄鍖�', - value: '350902', - children: null, - }, - { - label: '闇炴郸鍘�', - value: '350921', - children: null, - }, - { - label: '鍙ょ敯鍘�', - value: '350922', - children: null, - }, - { - label: '灞忓崡鍘�', - value: '350923', - children: null, - }, - { - label: '瀵垮畞鍘�', - value: '350924', - children: null, - }, - { - label: '鍛ㄥ畞鍘�', - value: '350925', - children: null, - }, - { - label: '鏌樿崳鍘�', - value: '350926', - children: null, - }, - { - label: '绂忓畨甯�', - value: '350981', - children: null, - }, - { - label: '绂忛紟甯�', - value: '350982', - children: null, - }, - ], - }, - ], - }, - { - label: '姹熻タ鐪�', - value: '360000', - children: [ - { - label: '鍗楁槍甯�', - value: '360100', - children: [ - { - label: '涓滄箹鍖�', - value: '360102', - children: null, - }, - { - label: '瑗挎箹鍖�', - value: '360103', - children: null, - }, - { - label: '闈掍簯璋卞尯', - value: '360104', - children: null, - }, - { - label: '婀鹃噷鍖�', - value: '360105', - children: null, - }, - { - label: '闈掑北婀栧尯', - value: '360111', - children: null, - }, - { - label: '鏂板缓鍖�', - value: '360112', - children: null, - }, - { - label: '鍗楁槍鍘�', - value: '360121', - children: null, - }, - { - label: '瀹変箟鍘�', - value: '360123', - children: null, - }, - { - label: '杩涜搐鍘�', - value: '360124', - children: null, - }, - ], - }, - { - label: '鏅痉闀囧競', - value: '360200', - children: [ - { - label: '鏄屾睙鍖�', - value: '360202', - children: null, - }, - { - label: '鐝犲北鍖�', - value: '360203', - children: null, - }, - { - label: '娴鍘�', - value: '360222', - children: null, - }, - { - label: '涔愬钩甯�', - value: '360281', - children: null, - }, - ], - }, - { - label: '钀嶄埂甯�', - value: '360300', - children: [ - { - label: '瀹夋簮鍖�', - value: '360302', - children: null, - }, - { - label: '婀樹笢鍖�', - value: '360313', - children: null, - }, - { - label: '鑾茶姳鍘�', - value: '360321', - children: null, - }, - { - label: '涓婃牀鍘�', - value: '360322', - children: null, - }, - { - label: '鑺︽邯鍘�', - value: '360323', - children: null, - }, - ], - }, - { - label: '涔濇睙甯�', - value: '360400', - children: [ - { - label: '婵傛邯鍖�', - value: '360402', - children: null, - }, - { - label: '娴旈槼鍖�', - value: '360403', - children: null, - }, - { - label: '鏌存鍖�', - value: '360404', - children: null, - }, - { - label: '姝﹀畞鍘�', - value: '360423', - children: null, - }, - { - label: '淇按鍘�', - value: '360424', - children: null, - }, - { - label: '姘镐慨鍘�', - value: '360425', - children: null, - }, - { - label: '寰峰畨鍘�', - value: '360426', - children: null, - }, - { - label: '閮芥槍鍘�', - value: '360428', - children: null, - }, - { - label: '婀栧彛鍘�', - value: '360429', - children: null, - }, - { - label: '褰辰鍘�', - value: '360430', - children: null, - }, - { - label: '鐟炴槍甯�', - value: '360481', - children: null, - }, - { - label: '鍏遍潚鍩庡競', - value: '360482', - children: null, - }, - { - label: '搴愬北甯�', - value: '360483', - children: null, - }, - ], - }, - { - label: '鏂颁綑甯�', - value: '360500', - children: [ - { - label: '娓濇按鍖�', - value: '360502', - children: null, - }, - { - label: '鍒嗗疁鍘�', - value: '360521', - children: null, - }, - ], - }, - { - label: '楣版江甯�', - value: '360600', - children: [ - { - label: '鏈堟箹鍖�', - value: '360602', - children: null, - }, - { - label: '浣欐睙鍖�', - value: '360603', - children: null, - }, - { - label: '璐垫邯甯�', - value: '360681', - children: null, - }, - ], - }, - { - label: '璧e窞甯�', - value: '360700', - children: [ - { - label: '绔犺础鍖�', - value: '360702', - children: null, - }, - { - label: '鍗楀悍鍖�', - value: '360703', - children: null, - }, - { - label: '璧e幙鍖�', - value: '360704', - children: null, - }, - { - label: '淇′赴鍘�', - value: '360722', - children: null, - }, - { - label: '澶т綑鍘�', - value: '360723', - children: null, - }, - { - label: '涓婄姽鍘�', - value: '360724', - children: null, - }, - { - label: '宕囦箟鍘�', - value: '360725', - children: null, - }, - { - label: '瀹夎繙鍘�', - value: '360726', - children: null, - }, - { - label: '榫欏崡鍘�', - value: '360727', - children: null, - }, - { - label: '瀹氬崡鍘�', - value: '360728', - children: null, - }, - { - label: '鍏ㄥ崡鍘�', - value: '360729', - children: null, - }, - { - label: '瀹侀兘鍘�', - value: '360730', - children: null, - }, - { - label: '浜庨兘鍘�', - value: '360731', - children: null, - }, - { - label: '鍏村浗鍘�', - value: '360732', - children: null, - }, - { - label: '浼氭槍鍘�', - value: '360733', - children: null, - }, - { - label: '瀵讳箤鍘�', - value: '360734', - children: null, - }, - { - label: '鐭冲煄鍘�', - value: '360735', - children: null, - }, - { - label: '鐟為噾甯�', - value: '360781', - children: null, - }, - ], - }, - { - label: '鍚夊畨甯�', - value: '360800', - children: [ - { - label: '鍚夊窞鍖�', - value: '360802', - children: null, - }, - { - label: '闈掑師鍖�', - value: '360803', - children: null, - }, - { - label: '鍚夊畨鍘�', - value: '360821', - children: null, - }, - { - label: '鍚夋按鍘�', - value: '360822', - children: null, - }, - { - label: '宄℃睙鍘�', - value: '360823', - children: null, - }, - { - label: '鏂板共鍘�', - value: '360824', - children: null, - }, - { - label: '姘镐赴鍘�', - value: '360825', - children: null, - }, - { - label: '娉板拰鍘�', - value: '360826', - children: null, - }, - { - label: '閬傚窛鍘�', - value: '360827', - children: null, - }, - { - label: '涓囧畨鍘�', - value: '360828', - children: null, - }, - { - label: '瀹夌鍘�', - value: '360829', - children: null, - }, - { - label: '姘告柊鍘�', - value: '360830', - children: null, - }, - { - label: '浜曞唸灞卞競', - value: '360881', - children: null, - }, - ], - }, - { - label: '瀹滄槬甯�', - value: '360900', - children: [ - { - label: '琚佸窞鍖�', - value: '360902', - children: null, - }, - { - label: '濂夋柊鍘�', - value: '360921', - children: null, - }, - { - label: '涓囪浇鍘�', - value: '360922', - children: null, - }, - { - label: '涓婇珮鍘�', - value: '360923', - children: null, - }, - { - label: '瀹滀赴鍘�', - value: '360924', - children: null, - }, - { - label: '闈栧畨鍘�', - value: '360925', - children: null, - }, - { - label: '閾滈紦鍘�', - value: '360926', - children: null, - }, - { - label: '涓板煄甯�', - value: '360981', - children: null, - }, - { - label: '妯熸爲甯�', - value: '360982', - children: null, - }, - { - label: '楂樺畨甯�', - value: '360983', - children: null, - }, - ], - }, - { - label: '鎶氬窞甯�', - value: '361000', - children: [ - { - label: '涓村窛鍖�', - value: '361002', - children: null, - }, - { - label: '涓滀埂鍖�', - value: '361003', - children: null, - }, - { - label: '鍗楀煄鍘�', - value: '361021', - children: null, - }, - { - label: '榛庡窛鍘�', - value: '361022', - children: null, - }, - { - label: '鍗椾赴鍘�', - value: '361023', - children: null, - }, - { - label: '宕囦粊鍘�', - value: '361024', - children: null, - }, - { - label: '涔愬畨鍘�', - value: '361025', - children: null, - }, - { - label: '瀹滈粍鍘�', - value: '361026', - children: null, - }, - { - label: '閲戞邯鍘�', - value: '361027', - children: null, - }, - { - label: '璧勬邯鍘�', - value: '361028', - children: null, - }, - { - label: '骞挎槍鍘�', - value: '361030', - children: null, - }, - ], - }, - { - label: '涓婇ザ甯�', - value: '361100', - children: [ - { - label: '淇″窞鍖�', - value: '361102', - children: null, - }, - { - label: '骞夸赴鍖�', - value: '361103', - children: null, - }, - { - label: '涓婇ザ鍘�', - value: '361121', - children: null, - }, - { - label: '鐜夊北鍘�', - value: '361123', - children: null, - }, - { - label: '閾呭北鍘�', - value: '361124', - children: null, - }, - { - label: '妯嘲鍘�', - value: '361125', - children: null, - }, - { - label: '寮嬮槼鍘�', - value: '361126', - children: null, - }, - { - label: '浣欏共鍘�', - value: '361127', - children: null, - }, - { - label: '閯遍槼鍘�', - value: '361128', - children: null, - }, - { - label: '涓囧勾鍘�', - value: '361129', - children: null, - }, - { - label: '濠烘簮鍘�', - value: '361130', - children: null, - }, - { - label: '寰峰叴甯�', - value: '361181', - children: null, - }, - ], - }, - ], - }, - { - label: '灞变笢鐪�', - value: '370000', - children: [ - { - label: '娴庡崡甯�', - value: '370100', - children: [ - { - label: '鍘嗕笅鍖�', - value: '370102', - children: null, - }, - { - label: '甯備腑鍖�', - value: '370103', - children: null, - }, - { - label: '妲愯崼鍖�', - value: '370104', - children: null, - }, - { - label: '澶╂ˉ鍖�', - value: '370105', - children: null, - }, - { - label: '鍘嗗煄鍖�', - value: '370112', - children: null, - }, - { - label: '闀挎竻鍖�', - value: '370113', - children: null, - }, - { - label: '绔犱笜鍖�', - value: '370114', - children: null, - }, - { - label: '娴庨槼鍖�', - value: '370115', - children: null, - }, - { - label: '鑾辫姕鍖�', - value: '370116', - children: null, - }, - { - label: '閽㈠煄鍖�', - value: '370117', - children: null, - }, - { - label: '骞抽槾鍘�', - value: '370124', - children: null, - }, - { - label: '鍟嗘渤鍘�', - value: '370126', - children: null, - }, - ], - }, - { - label: '闈掑矝甯�', - value: '370200', - children: [ - { - label: '甯傚崡鍖�', - value: '370202', - children: null, - }, - { - label: '甯傚寳鍖�', - value: '370203', - children: null, - }, - { - label: '榛勫矝鍖�', - value: '370211', - children: null, - }, - { - label: '宕傚北鍖�', - value: '370212', - children: null, - }, - { - label: '鏉庢钵鍖�', - value: '370213', - children: null, - }, - { - label: '鍩庨槼鍖�', - value: '370214', - children: null, - }, - { - label: '鍗冲ⅷ鍖�', - value: '370215', - children: null, - }, - { - label: '鑳跺窞甯�', - value: '370281', - children: null, - }, - { - label: '骞冲害甯�', - value: '370283', - children: null, - }, - { - label: '鑾辫タ甯�', - value: '370285', - children: null, - }, - ], - }, - { - label: '娣勫崥甯�', - value: '370300', - children: [ - { - label: '娣勫窛鍖�', - value: '370302', - children: null, - }, - { - label: '寮犲簵鍖�', - value: '370303', - children: null, - }, - { - label: '鍗氬北鍖�', - value: '370304', - children: null, - }, - { - label: '涓存穭鍖�', - value: '370305', - children: null, - }, - { - label: '鍛ㄦ潙鍖�', - value: '370306', - children: null, - }, - { - label: '妗撳彴鍘�', - value: '370321', - children: null, - }, - { - label: '楂橀潚鍘�', - value: '370322', - children: null, - }, - { - label: '娌傛簮鍘�', - value: '370323', - children: null, - }, - ], - }, - { - label: '鏋e簞甯�', - value: '370400', - children: [ - { - label: '甯備腑鍖�', - value: '370402', - children: null, - }, - { - label: '钖涘煄鍖�', - value: '370403', - children: null, - }, - { - label: '宄勫煄鍖�', - value: '370404', - children: null, - }, - { - label: '鍙板効搴勫尯', - value: '370405', - children: null, - }, - { - label: '灞变涵鍖�', - value: '370406', - children: null, - }, - { - label: '婊曞窞甯�', - value: '370481', - children: null, - }, - ], - }, - { - label: '涓滆惀甯�', - value: '370500', - children: [ - { - label: '涓滆惀鍖�', - value: '370502', - children: null, - }, - { - label: '娌冲彛鍖�', - value: '370503', - children: null, - }, - { - label: '鍨﹀埄鍖�', - value: '370505', - children: null, - }, - { - label: '鍒╂触鍘�', - value: '370522', - children: null, - }, - { - label: '骞块ザ鍘�', - value: '370523', - children: null, - }, - ], - }, - { - label: '鐑熷彴甯�', - value: '370600', - children: [ - { - label: '鑺濈綐鍖�', - value: '370602', - children: null, - }, - { - label: '绂忓北鍖�', - value: '370611', - children: null, - }, - { - label: '鐗熷钩鍖�', - value: '370612', - children: null, - }, - { - label: '鑾卞北鍖�', - value: '370613', - children: null, - }, - { - label: '闀垮矝鍘�', - value: '370634', - children: null, - }, - { - label: '榫欏彛甯�', - value: '370681', - children: null, - }, - { - label: '鑾遍槼甯�', - value: '370682', - children: null, - }, - { - label: '鑾卞窞甯�', - value: '370683', - children: null, - }, - { - label: '钃幈甯�', - value: '370684', - children: null, - }, - { - label: '鎷涜繙甯�', - value: '370685', - children: null, - }, - { - label: '鏍栭湠甯�', - value: '370686', - children: null, - }, - { - label: '娴烽槼甯�', - value: '370687', - children: null, - }, - ], - }, - { - label: '娼嶅潑甯�', - value: '370700', - children: [ - { - label: '娼嶅煄鍖�', - value: '370702', - children: null, - }, - { - label: '瀵掍涵鍖�', - value: '370703', - children: null, - }, - { - label: '鍧婂瓙鍖�', - value: '370704', - children: null, - }, - { - label: '濂庢枃鍖�', - value: '370705', - children: null, - }, - { - label: '涓存湊鍘�', - value: '370724', - children: null, - }, - { - label: '鏄屼箰鍘�', - value: '370725', - children: null, - }, - { - label: '闈掑窞甯�', - value: '370781', - children: null, - }, - { - label: '璇稿煄甯�', - value: '370782', - children: null, - }, - { - label: '瀵垮厜甯�', - value: '370783', - children: null, - }, - { - label: '瀹変笜甯�', - value: '370784', - children: null, - }, - { - label: '楂樺瘑甯�', - value: '370785', - children: null, - }, - { - label: '鏄岄倯甯�', - value: '370786', - children: null, - }, - ], - }, - { - label: '娴庡畞甯�', - value: '370800', - children: [ - { - label: '浠诲煄鍖�', - value: '370811', - children: null, - }, - { - label: '鍏栧窞鍖�', - value: '370812', - children: null, - }, - { - label: '寰北鍘�', - value: '370826', - children: null, - }, - { - label: '楸煎彴鍘�', - value: '370827', - children: null, - }, - { - label: '閲戜埂鍘�', - value: '370828', - children: null, - }, - { - label: '鍢夌ゥ鍘�', - value: '370829', - children: null, - }, - { - label: '姹朵笂鍘�', - value: '370830', - children: null, - }, - { - label: '娉楁按鍘�', - value: '370831', - children: null, - }, - { - label: '姊佸北鍘�', - value: '370832', - children: null, - }, - { - label: '鏇查槣甯�', - value: '370881', - children: null, - }, - { - label: '閭瑰煄甯�', - value: '370883', - children: null, - }, - ], - }, - { - label: '娉板畨甯�', - value: '370900', - children: [ - { - label: '娉板北鍖�', - value: '370902', - children: null, - }, - { - label: '宀卞渤鍖�', - value: '370911', - children: null, - }, - { - label: '瀹侀槼鍘�', - value: '370921', - children: null, - }, - { - label: '涓滃钩鍘�', - value: '370923', - children: null, - }, - { - label: '鏂版嘲甯�', - value: '370982', - children: null, - }, - { - label: '鑲ュ煄甯�', - value: '370983', - children: null, - }, - ], - }, - { - label: '濞佹捣甯�', - value: '371000', - children: [ - { - label: '鐜繝鍖�', - value: '371002', - children: null, - }, - { - label: '鏂囩櫥鍖�', - value: '371003', - children: null, - }, - { - label: '鑽f垚甯�', - value: '371082', - children: null, - }, - { - label: '涔冲北甯�', - value: '371083', - children: null, - }, - ], - }, - { - label: '鏃ョ収甯�', - value: '371100', - children: [ - { - label: '涓滄腐鍖�', - value: '371102', - children: null, - }, - { - label: '宀氬北鍖�', - value: '371103', - children: null, - }, - { - label: '浜旇幉鍘�', - value: '371121', - children: null, - }, - { - label: '鑾掑幙', - value: '371122', - children: null, - }, - ], - }, - { - label: '涓存矀甯�', - value: '371300', - children: [ - { - label: '鍏板北鍖�', - value: '371302', - children: null, - }, - { - label: '缃楀簞鍖�', - value: '371311', - children: null, - }, - { - label: '娌充笢鍖�', - value: '371312', - children: null, - }, - { - label: '娌傚崡鍘�', - value: '371321', - children: null, - }, - { - label: '閮煄鍘�', - value: '371322', - children: null, - }, - { - label: '娌傛按鍘�', - value: '371323', - children: null, - }, - { - label: '鍏伴櫟鍘�', - value: '371324', - children: null, - }, - { - label: '璐瑰幙', - value: '371325', - children: null, - }, - { - label: '骞抽倯鍘�', - value: '371326', - children: null, - }, - { - label: '鑾掑崡鍘�', - value: '371327', - children: null, - }, - { - label: '钂欓槾鍘�', - value: '371328', - children: null, - }, - { - label: '涓存箔鍘�', - value: '371329', - children: null, - }, - ], - }, - { - label: '寰峰窞甯�', - value: '371400', - children: [ - { - label: '寰峰煄鍖�', - value: '371402', - children: null, - }, - { - label: '闄靛煄鍖�', - value: '371403', - children: null, - }, - { - label: '瀹佹触鍘�', - value: '371422', - children: null, - }, - { - label: '搴嗕簯鍘�', - value: '371423', - children: null, - }, - { - label: '涓撮倯鍘�', - value: '371424', - children: null, - }, - { - label: '榻愭渤鍘�', - value: '371425', - children: null, - }, - { - label: '骞冲師鍘�', - value: '371426', - children: null, - }, - { - label: '澶忔触鍘�', - value: '371427', - children: null, - }, - { - label: '姝﹀煄鍘�', - value: '371428', - children: null, - }, - { - label: '涔愰櫟甯�', - value: '371481', - children: null, - }, - { - label: '绂瑰煄甯�', - value: '371482', - children: null, - }, - ], - }, - { - label: '鑱婂煄甯�', - value: '371500', - children: [ - { - label: '涓滄槍搴滃尯', - value: '371502', - children: null, - }, - { - label: '闃宠胺鍘�', - value: '371521', - children: null, - }, - { - label: '鑾樺幙', - value: '371522', - children: null, - }, - { - label: '鑼屽钩鍘�', - value: '371523', - children: null, - }, - { - label: '涓滈樋鍘�', - value: '371524', - children: null, - }, - { - label: '鍐犲幙', - value: '371525', - children: null, - }, - { - label: '楂樺攼鍘�', - value: '371526', - children: null, - }, - { - label: '涓存竻甯�', - value: '371581', - children: null, - }, - ], - }, - { - label: '婊ㄥ窞甯�', - value: '371600', - children: [ - { - label: '婊ㄥ煄鍖�', - value: '371602', - children: null, - }, - { - label: '娌惧寲鍖�', - value: '371603', - children: null, - }, - { - label: '鎯犳皯鍘�', - value: '371621', - children: null, - }, - { - label: '闃充俊鍘�', - value: '371622', - children: null, - }, - { - label: '鏃犳#鍘�', - value: '371623', - children: null, - }, - { - label: '鍗氬叴鍘�', - value: '371625', - children: null, - }, - { - label: '閭瑰钩甯�', - value: '371681', - children: null, - }, - ], - }, - { - label: '鑿忔辰甯�', - value: '371700', - children: [ - { - label: '鐗′腹鍖�', - value: '371702', - children: null, - }, - { - label: '瀹氶櫠鍖�', - value: '371703', - children: null, - }, - { - label: '鏇瑰幙', - value: '371721', - children: null, - }, - { - label: '鍗曞幙', - value: '371722', - children: null, - }, - { - label: '鎴愭鍘�', - value: '371723', - children: null, - }, - { - label: '宸ㄩ噹鍘�', - value: '371724', - children: null, - }, - { - label: '閮撳煄鍘�', - value: '371725', - children: null, - }, - { - label: '閯勫煄鍘�', - value: '371726', - children: null, - }, - { - label: '涓滄槑鍘�', - value: '371728', - children: null, - }, - ], - }, - ], - }, - { - label: '娌冲崡鐪�', - value: '410000', - children: [ - { - label: '閮戝窞甯�', - value: '410100', - children: [ - { - label: '涓師鍖�', - value: '410102', - children: null, - }, - { - label: '浜屼竷鍖�', - value: '410103', - children: null, - }, - { - label: '绠″煄鍥炴棌鍖�', - value: '410104', - children: null, - }, - { - label: '閲戞按鍖�', - value: '410105', - children: null, - }, - { - label: '涓婅鍖�', - value: '410106', - children: null, - }, - { - label: '鎯犳祹鍖�', - value: '410108', - children: null, - }, - { - label: '涓墴鍘�', - value: '410122', - children: null, - }, - { - label: '宸╀箟甯�', - value: '410181', - children: null, - }, - { - label: '鑽ラ槼甯�', - value: '410182', - children: null, - }, - { - label: '鏂板瘑甯�', - value: '410183', - children: null, - }, - { - label: '鏂伴儜甯�', - value: '410184', - children: null, - }, - { - label: '鐧诲皝甯�', - value: '410185', - children: null, - }, - ], - }, - { - label: '寮�灏佸競', - value: '410200', - children: [ - { - label: '榫欎涵鍖�', - value: '410202', - children: null, - }, - { - label: '椤烘渤鍥炴棌鍖�', - value: '410203', - children: null, - }, - { - label: '榧撴ゼ鍖�', - value: '410204', - children: null, - }, - { - label: '绂圭帇鍙板尯', - value: '410205', - children: null, - }, - { - label: '绁ョ鍖�', - value: '410212', - children: null, - }, - { - label: '鏉炲幙', - value: '410221', - children: null, - }, - { - label: '閫氳鍘�', - value: '410222', - children: null, - }, - { - label: '灏夋皬鍘�', - value: '410223', - children: null, - }, - { - label: '鍏拌�冨幙', - value: '410225', - children: null, - }, - ], - }, - { - label: '娲涢槼甯�', - value: '410300', - children: [ - { - label: '鑰佸煄鍖�', - value: '410302', - children: null, - }, - { - label: '瑗垮伐鍖�', - value: '410303', - children: null, - }, - { - label: '鐎嶆渤鍥炴棌鍖�', - value: '410304', - children: null, - }, - { - label: '娑цタ鍖�', - value: '410305', - children: null, - }, - { - label: '鍚夊埄鍖�', - value: '410306', - children: null, - }, - { - label: '娲涢緳鍖�', - value: '410311', - children: null, - }, - { - label: '瀛熸触鍘�', - value: '410322', - children: null, - }, - { - label: '鏂板畨鍘�', - value: '410323', - children: null, - }, - { - label: '鏍惧窛鍘�', - value: '410324', - children: null, - }, - { - label: '宓╁幙', - value: '410325', - children: null, - }, - { - label: '姹濋槼鍘�', - value: '410326', - children: null, - }, - { - label: '瀹滈槼鍘�', - value: '410327', - children: null, - }, - { - label: '娲涘畞鍘�', - value: '410328', - children: null, - }, - { - label: '浼婂窛鍘�', - value: '410329', - children: null, - }, - { - label: '鍋冨笀甯�', - value: '410381', - children: null, - }, - ], - }, - { - label: '骞抽《灞卞競', - value: '410400', - children: [ - { - label: '鏂板崕鍖�', - value: '410402', - children: null, - }, - { - label: '鍗笢鍖�', - value: '410403', - children: null, - }, - { - label: '鐭抽緳鍖�', - value: '410404', - children: null, - }, - { - label: '婀涙渤鍖�', - value: '410411', - children: null, - }, - { - label: '瀹濅赴鍘�', - value: '410421', - children: null, - }, - { - label: '鍙跺幙', - value: '410422', - children: null, - }, - { - label: '椴佸北鍘�', - value: '410423', - children: null, - }, - { - label: '閮忓幙', - value: '410425', - children: null, - }, - { - label: '鑸為挗甯�', - value: '410481', - children: null, - }, - { - label: '姹濆窞甯�', - value: '410482', - children: null, - }, - ], - }, - { - label: '瀹夐槼甯�', - value: '410500', - children: [ - { - label: '鏂囧嘲鍖�', - value: '410502', - children: null, - }, - { - label: '鍖楀叧鍖�', - value: '410503', - children: null, - }, - { - label: '娈烽兘鍖�', - value: '410505', - children: null, - }, - { - label: '榫欏畨鍖�', - value: '410506', - children: null, - }, - { - label: '瀹夐槼鍘�', - value: '410522', - children: null, - }, - { - label: '姹ら槾鍘�', - value: '410523', - children: null, - }, - { - label: '婊戝幙', - value: '410526', - children: null, - }, - { - label: '鍐呴粍鍘�', - value: '410527', - children: null, - }, - { - label: '鏋楀窞甯�', - value: '410581', - children: null, - }, - ], - }, - { - label: '楣ゅ甯�', - value: '410600', - children: [ - { - label: '楣ゅ北鍖�', - value: '410602', - children: null, - }, - { - label: '灞卞煄鍖�', - value: '410603', - children: null, - }, - { - label: '娣囨花鍖�', - value: '410611', - children: null, - }, - { - label: '娴氬幙', - value: '410621', - children: null, - }, - { - label: '娣囧幙', - value: '410622', - children: null, - }, - ], - }, - { - label: '鏂颁埂甯�', - value: '410700', - children: [ - { - label: '绾㈡棗鍖�', - value: '410702', - children: null, - }, - { - label: '鍗花鍖�', - value: '410703', - children: null, - }, - { - label: '鍑ゆ硥鍖�', - value: '410704', - children: null, - }, - { - label: '鐗ч噹鍖�', - value: '410711', - children: null, - }, - { - label: '鏂颁埂鍘�', - value: '410721', - children: null, - }, - { - label: '鑾峰槈鍘�', - value: '410724', - children: null, - }, - { - label: '鍘熼槼鍘�', - value: '410725', - children: null, - }, - { - label: '寤舵触鍘�', - value: '410726', - children: null, - }, - { - label: '灏佷笜鍘�', - value: '410727', - children: null, - }, - { - label: '闀垮灒鍘�', - value: '410728', - children: null, - }, - { - label: '鍗緣甯�', - value: '410781', - children: null, - }, - { - label: '杈夊幙甯�', - value: '410782', - children: null, - }, - ], - }, - { - label: '鐒︿綔甯�', - value: '410800', - children: [ - { - label: '瑙f斁鍖�', - value: '410802', - children: null, - }, - { - label: '涓珯鍖�', - value: '410803', - children: null, - }, - { - label: '椹潙鍖�', - value: '410804', - children: null, - }, - { - label: '灞遍槼鍖�', - value: '410811', - children: null, - }, - { - label: '淇鍘�', - value: '410821', - children: null, - }, - { - label: '鍗氱埍鍘�', - value: '410822', - children: null, - }, - { - label: '姝﹂櫉鍘�', - value: '410823', - children: null, - }, - { - label: '娓╁幙', - value: '410825', - children: null, - }, - { - label: '娌侀槼甯�', - value: '410882', - children: null, - }, - { - label: '瀛熷窞甯�', - value: '410883', - children: null, - }, - ], - }, - { - label: '婵槼甯�', - value: '410900', - children: [ - { - label: '鍗庨緳鍖�', - value: '410902', - children: null, - }, - { - label: '娓呬赴鍘�', - value: '410922', - children: null, - }, - { - label: '鍗椾箰鍘�', - value: '410923', - children: null, - }, - { - label: '鑼冨幙', - value: '410926', - children: null, - }, - { - label: '鍙板墠鍘�', - value: '410927', - children: null, - }, - { - label: '婵槼鍘�', - value: '410928', - children: null, - }, - ], - }, - { - label: '璁告槍甯�', - value: '411000', - children: [ - { - label: '榄忛兘鍖�', - value: '411002', - children: null, - }, - { - label: '寤哄畨鍖�', - value: '411003', - children: null, - }, - { - label: '閯㈤櫟鍘�', - value: '411024', - children: null, - }, - { - label: '瑗勫煄鍘�', - value: '411025', - children: null, - }, - { - label: '绂瑰窞甯�', - value: '411081', - children: null, - }, - { - label: '闀胯憶甯�', - value: '411082', - children: null, - }, - ], - }, - { - label: '婕渤甯�', - value: '411100', - children: [ - { - label: '婧愭眹鍖�', - value: '411102', - children: null, - }, - { - label: '閮惧煄鍖�', - value: '411103', - children: null, - }, - { - label: '鍙櫟鍖�', - value: '411104', - children: null, - }, - { - label: '鑸為槼鍘�', - value: '411121', - children: null, - }, - { - label: '涓撮鍘�', - value: '411122', - children: null, - }, - ], - }, - { - label: '涓夐棬宄″競', - value: '411200', - children: [ - { - label: '婀栨花鍖�', - value: '411202', - children: null, - }, - { - label: '闄曞窞鍖�', - value: '411203', - children: null, - }, - { - label: '娓戞睜鍘�', - value: '411221', - children: null, - }, - { - label: '鍗㈡皬鍘�', - value: '411224', - children: null, - }, - { - label: '涔夐┈甯�', - value: '411281', - children: null, - }, - { - label: '鐏靛疂甯�', - value: '411282', - children: null, - }, - ], - }, - { - label: '鍗楅槼甯�', - value: '411300', - children: [ - { - label: '瀹涘煄鍖�', - value: '411302', - children: null, - }, - { - label: '鍗ч緳鍖�', - value: '411303', - children: null, - }, - { - label: '鍗楀彫鍘�', - value: '411321', - children: null, - }, - { - label: '鏂瑰煄鍘�', - value: '411322', - children: null, - }, - { - label: '瑗垮场鍘�', - value: '411323', - children: null, - }, - { - label: '闀囧钩鍘�', - value: '411324', - children: null, - }, - { - label: '鍐呬埂鍘�', - value: '411325', - children: null, - }, - { - label: '娣呭窛鍘�', - value: '411326', - children: null, - }, - { - label: '绀炬棗鍘�', - value: '411327', - children: null, - }, - { - label: '鍞愭渤鍘�', - value: '411328', - children: null, - }, - { - label: '鏂伴噹鍘�', - value: '411329', - children: null, - }, - { - label: '妗愭煆鍘�', - value: '411330', - children: null, - }, - { - label: '閭撳窞甯�', - value: '411381', - children: null, - }, - ], - }, - { - label: '鍟嗕笜甯�', - value: '411400', - children: [ - { - label: '姊佸洯鍖�', - value: '411402', - children: null, - }, - { - label: '鐫㈤槼鍖�', - value: '411403', - children: null, - }, - { - label: '姘戞潈鍘�', - value: '411421', - children: null, - }, - { - label: '鐫㈠幙', - value: '411422', - children: null, - }, - { - label: '瀹侀櫟鍘�', - value: '411423', - children: null, - }, - { - label: '鏌樺煄鍘�', - value: '411424', - children: null, - }, - { - label: '铏炲煄鍘�', - value: '411425', - children: null, - }, - { - label: '澶忛倯鍘�', - value: '411426', - children: null, - }, - { - label: '姘稿煄甯�', - value: '411481', - children: null, - }, - ], - }, - { - label: '淇¢槼甯�', - value: '411500', - children: [ - { - label: '娴夋渤鍖�', - value: '411502', - children: null, - }, - { - label: '骞虫ˉ鍖�', - value: '411503', - children: null, - }, - { - label: '缃楀北鍘�', - value: '411521', - children: null, - }, - { - label: '鍏夊北鍘�', - value: '411522', - children: null, - }, - { - label: '鏂板幙', - value: '411523', - children: null, - }, - { - label: '鍟嗗煄鍘�', - value: '411524', - children: null, - }, - { - label: '鍥哄鍘�', - value: '411525', - children: null, - }, - { - label: '娼㈠窛鍘�', - value: '411526', - children: null, - }, - { - label: '娣花鍘�', - value: '411527', - children: null, - }, - { - label: '鎭幙', - value: '411528', - children: null, - }, - ], - }, - { - label: '鍛ㄥ彛甯�', - value: '411600', - children: [ - { - label: '宸濇眹鍖�', - value: '411602', - children: null, - }, - { - label: '鎵舵矡鍘�', - value: '411621', - children: null, - }, - { - label: '瑗垮崕鍘�', - value: '411622', - children: null, - }, - { - label: '鍟嗘按鍘�', - value: '411623', - children: null, - }, - { - label: '娌堜笜鍘�', - value: '411624', - children: null, - }, - { - label: '閮稿煄鍘�', - value: '411625', - children: null, - }, - { - label: '娣槼鍘�', - value: '411626', - children: null, - }, - { - label: '澶悍鍘�', - value: '411627', - children: null, - }, - { - label: '楣块倯鍘�', - value: '411628', - children: null, - }, - { - label: '椤瑰煄甯�', - value: '411681', - children: null, - }, - ], - }, - { - label: '椹婚┈搴楀競', - value: '411700', - children: [ - { - label: '椹垮煄鍖�', - value: '411702', - children: null, - }, - { - label: '瑗垮钩鍘�', - value: '411721', - children: null, - }, - { - label: '涓婅敗鍘�', - value: '411722', - children: null, - }, - { - label: '骞宠垎鍘�', - value: '411723', - children: null, - }, - { - label: '姝i槼鍘�', - value: '411724', - children: null, - }, - { - label: '纭北鍘�', - value: '411725', - children: null, - }, - { - label: '娉岄槼鍘�', - value: '411726', - children: null, - }, - { - label: '姹濆崡鍘�', - value: '411727', - children: null, - }, - { - label: '閬傚钩鍘�', - value: '411728', - children: null, - }, - { - label: '鏂拌敗鍘�', - value: '411729', - children: null, - }, - ], - }, - { - label: '娴庢簮甯�', - value: '419001', - children: [ - { - label: '娌佸洯琛楅亾', - value: '419001001', - children: null, - }, - { - label: '娴庢按琛楅亾', - value: '419001002', - children: null, - }, - { - label: '鍖楁捣琛楅亾', - value: '419001003', - children: null, - }, - { - label: '澶╁潧琛楅亾', - value: '419001004', - children: null, - }, - { - label: '鐜夋硥琛楅亾', - value: '419001005', - children: null, - }, - { - label: '鍏嬩簳闀�', - value: '419001100', - children: null, - }, - { - label: '浜旈緳鍙i晣', - value: '419001101', - children: null, - }, - { - label: '杞靛煄闀�', - value: '419001102', - children: null, - }, - { - label: '鎵跨暀闀�', - value: '419001103', - children: null, - }, - { - label: '閭靛師闀�', - value: '419001104', - children: null, - }, - { - label: '鍧″ご闀�', - value: '419001105', - children: null, - }, - { - label: '姊ㄦ灄闀�', - value: '419001106', - children: null, - }, - { - label: '澶у唱闀�', - value: '419001107', - children: null, - }, - { - label: '鎬濈ぜ闀�', - value: '419001108', - children: null, - }, - { - label: '鐜嬪眿闀�', - value: '419001109', - children: null, - }, - { - label: '涓嬪喍闀�', - value: '419001110', - children: null, - }, - ], - }, - ], - }, - { - label: '婀栧寳鐪�', - value: '420000', - children: [ - { - label: '姝︽眽甯�', - value: '420100', - children: [ - { - label: '姹熷哺鍖�', - value: '420102', - children: null, - }, - { - label: '姹熸眽鍖�', - value: '420103', - children: null, - }, - { - label: '纭氬彛鍖�', - value: '420104', - children: null, - }, - { - label: '姹夐槼鍖�', - value: '420105', - children: null, - }, - { - label: '姝︽槍鍖�', - value: '420106', - children: null, - }, - { - label: '闈掑北鍖�', - value: '420107', - children: null, - }, - { - label: '娲北鍖�', - value: '420111', - children: null, - }, - { - label: '涓滆タ婀栧尯', - value: '420112', - children: null, - }, - { - label: '姹夊崡鍖�', - value: '420113', - children: null, - }, - { - label: '钄$敻鍖�', - value: '420114', - children: null, - }, - { - label: '姹熷鍖�', - value: '420115', - children: null, - }, - { - label: '榛勯檪鍖�', - value: '420116', - children: null, - }, - { - label: '鏂版床鍖�', - value: '420117', - children: null, - }, - ], - }, - { - label: '榛勭煶甯�', - value: '420200', - children: [ - { - label: '榛勭煶娓尯', - value: '420202', - children: null, - }, - { - label: '瑗垮灞卞尯', - value: '420203', - children: null, - }, - { - label: '涓嬮檰鍖�', - value: '420204', - children: null, - }, - { - label: '閾佸北鍖�', - value: '420205', - children: null, - }, - { - label: '闃虫柊鍘�', - value: '420222', - children: null, - }, - { - label: '澶у喍甯�', - value: '420281', - children: null, - }, - ], - }, - { - label: '鍗佸牥甯�', - value: '420300', - children: [ - { - label: '鑼呯鍖�', - value: '420302', - children: null, - }, - { - label: '寮犳咕鍖�', - value: '420303', - children: null, - }, - { - label: '閮ч槼鍖�', - value: '420304', - children: null, - }, - { - label: '閮цタ鍘�', - value: '420322', - children: null, - }, - { - label: '绔瑰北鍘�', - value: '420323', - children: null, - }, - { - label: '绔规邯鍘�', - value: '420324', - children: null, - }, - { - label: '鎴垮幙', - value: '420325', - children: null, - }, - { - label: '涓规睙鍙e競', - value: '420381', - children: null, - }, - ], - }, - { - label: '瀹滄槍甯�', - value: '420500', - children: [ - { - label: '瑗块櫟鍖�', - value: '420502', - children: null, - }, - { - label: '浼嶅宀楀尯', - value: '420503', - children: null, - }, - { - label: '鐐瑰啗鍖�', - value: '420504', - children: null, - }, - { - label: '鐚囦涵鍖�', - value: '420505', - children: null, - }, - { - label: '澶烽櫟鍖�', - value: '420506', - children: null, - }, - { - label: '杩滃畨鍘�', - value: '420525', - children: null, - }, - { - label: '鍏村北鍘�', - value: '420526', - children: null, - }, - { - label: '绉綊鍘�', - value: '420527', - children: null, - }, - { - label: '闀块槼鍦熷鏃忚嚜娌诲幙', - value: '420528', - children: null, - }, - { - label: '浜斿嘲鍦熷鏃忚嚜娌诲幙', - value: '420529', - children: null, - }, - { - label: '瀹滈兘甯�', - value: '420581', - children: null, - }, - { - label: '褰撻槼甯�', - value: '420582', - children: null, - }, - { - label: '鏋濇睙甯�', - value: '420583', - children: null, - }, - ], - }, - { - label: '瑗勯槼甯�', - value: '420600', - children: [ - { - label: '瑗勫煄鍖�', - value: '420602', - children: null, - }, - { - label: '妯婂煄鍖�', - value: '420606', - children: null, - }, - { - label: '瑗勫窞鍖�', - value: '420607', - children: null, - }, - { - label: '鍗楁汲鍘�', - value: '420624', - children: null, - }, - { - label: '璋峰煄鍘�', - value: '420625', - children: null, - }, - { - label: '淇濆悍鍘�', - value: '420626', - children: null, - }, - { - label: '鑰佹渤鍙e競', - value: '420682', - children: null, - }, - { - label: '鏋i槼甯�', - value: '420683', - children: null, - }, - { - label: '瀹滃煄甯�', - value: '420684', - children: null, - }, - ], - }, - { - label: '閯傚窞甯�', - value: '420700', - children: [ - { - label: '姊佸瓙婀栧尯', - value: '420702', - children: null, - }, - { - label: '鍗庡鍖�', - value: '420703', - children: null, - }, - { - label: '閯傚煄鍖�', - value: '420704', - children: null, - }, - ], - }, - { - label: '鑽嗛棬甯�', - value: '420800', - children: [ - { - label: '涓滃疂鍖�', - value: '420802', - children: null, - }, - { - label: '鎺囧垁鍖�', - value: '420804', - children: null, - }, - { - label: '娌欐磱鍘�', - value: '420822', - children: null, - }, - { - label: '閽熺ゥ甯�', - value: '420881', - children: null, - }, - { - label: '浜北甯�', - value: '420882', - children: null, - }, - ], - }, - { - label: '瀛濇劅甯�', - value: '420900', - children: [ - { - label: '瀛濆崡鍖�', - value: '420902', - children: null, - }, - { - label: '瀛濇槍鍘�', - value: '420921', - children: null, - }, - { - label: '澶ф偀鍘�', - value: '420922', - children: null, - }, - { - label: '浜戞ⅵ鍘�', - value: '420923', - children: null, - }, - { - label: '搴斿煄甯�', - value: '420981', - children: null, - }, - { - label: '瀹夐檰甯�', - value: '420982', - children: null, - }, - { - label: '姹夊窛甯�', - value: '420984', - children: null, - }, - ], - }, - { - label: '鑽嗗窞甯�', - value: '421000', - children: [ - { - label: '娌欏競鍖�', - value: '421002', - children: null, - }, - { - label: '鑽嗗窞鍖�', - value: '421003', - children: null, - }, - { - label: '鍏畨鍘�', - value: '421022', - children: null, - }, - { - label: '鐩戝埄鍘�', - value: '421023', - children: null, - }, - { - label: '姹熼櫟鍘�', - value: '421024', - children: null, - }, - { - label: '鐭抽甯�', - value: '421081', - children: null, - }, - { - label: '娲箹甯�', - value: '421083', - children: null, - }, - { - label: '鏉炬粙甯�', - value: '421087', - children: null, - }, - ], - }, - { - label: '榛勫唸甯�', - value: '421100', - children: [ - { - label: '榛勫窞鍖�', - value: '421102', - children: null, - }, - { - label: '鍥㈤鍘�', - value: '421121', - children: null, - }, - { - label: '绾㈠畨鍘�', - value: '421122', - children: null, - }, - { - label: '缃楃敯鍘�', - value: '421123', - children: null, - }, - { - label: '鑻卞北鍘�', - value: '421124', - children: null, - }, - { - label: '娴犳按鍘�', - value: '421125', - children: null, - }, - { - label: '钑叉槬鍘�', - value: '421126', - children: null, - }, - { - label: '榛勬鍘�', - value: '421127', - children: null, - }, - { - label: '楹诲煄甯�', - value: '421181', - children: null, - }, - { - label: '姝︾┐甯�', - value: '421182', - children: null, - }, - ], - }, - { - label: '鍜稿畞甯�', - value: '421200', - children: [ - { - label: '鍜稿畨鍖�', - value: '421202', - children: null, - }, - { - label: '鍢夐奔鍘�', - value: '421221', - children: null, - }, - { - label: '閫氬煄鍘�', - value: '421222', - children: null, - }, - { - label: '宕囬槼鍘�', - value: '421223', - children: null, - }, - { - label: '閫氬北鍘�', - value: '421224', - children: null, - }, - { - label: '璧ゅ甯�', - value: '421281', - children: null, - }, - ], - }, - { - label: '闅忓窞甯�', - value: '421300', - children: [ - { - label: '鏇鹃兘鍖�', - value: '421303', - children: null, - }, - { - label: '闅忓幙', - value: '421321', - children: null, - }, - { - label: '骞挎按甯�', - value: '421381', - children: null, - }, - ], - }, - { - label: '鎭╂柦鍦熷鏃忚嫍鏃忚嚜娌诲窞', - value: '422800', - children: [ - { - label: '鎭╂柦甯�', - value: '422801', - children: null, - }, - { - label: '鍒╁窛甯�', - value: '422802', - children: null, - }, - { - label: '寤哄鍘�', - value: '422822', - children: null, - }, - { - label: '宸翠笢鍘�', - value: '422823', - children: null, - }, - { - label: '瀹f仼鍘�', - value: '422825', - children: null, - }, - { - label: '鍜镐赴鍘�', - value: '422826', - children: null, - }, - { - label: '鏉ュ嚖鍘�', - value: '422827', - children: null, - }, - { - label: '楣ゅ嘲鍘�', - value: '422828', - children: null, - }, - ], - }, - { - label: '浠欐甯�', - value: '429004', - children: [ - { - label: '娌欏槾琛楅亾', - value: '429004001', - children: null, - }, - { - label: '骞叉渤琛楅亾', - value: '429004002', - children: null, - }, - { - label: '榫欏崕灞辫閬�', - value: '429004003', - children: null, - }, - { - label: '閮戝満闀�', - value: '429004100', - children: null, - }, - { - label: '姣涘槾闀�', - value: '429004101', - children: null, - }, - { - label: '璞嗘渤闀�', - value: '429004102', - children: null, - }, - { - label: '涓変紡娼晣', - value: '429004103', - children: null, - }, - { - label: '鑳″満闀�', - value: '429004104', - children: null, - }, - { - label: '闀垮�樺彛闀�', - value: '429004105', - children: null, - }, - { - label: '瑗挎祦娌抽晣', - value: '429004106', - children: null, - }, - { - label: '娌欐箹闀�', - value: '429004107', - children: null, - }, - { - label: '鏉ㄦ灄灏鹃晣', - value: '429004108', - children: null, - }, - { - label: '褰満闀�', - value: '429004109', - children: null, - }, - { - label: '寮犳矡闀�', - value: '429004110', - children: null, - }, - { - label: '閮渤闀�', - value: '429004111', - children: null, - }, - { - label: '娌斿煄鍥炴棌闀�', - value: '429004112', - children: null, - }, - { - label: '閫氭捣鍙i晣', - value: '429004113', - children: null, - }, - { - label: '闄堝満闀�', - value: '429004114', - children: null, - }, - { - label: '宸ヤ笟鍥尯', - value: '429004400', - children: null, - }, - { - label: '涔濆悎鍨稿師绉嶅満', - value: '429004401', - children: null, - }, - { - label: '浜旀箹娓斿満', - value: '429004404', - children: null, - }, - { - label: '璧佃タ鍨告灄鍦�', - value: '429004405', - children: null, - }, - { - label: '鐣滅鑹鍦�', - value: '429004407', - children: null, - }, - ], - }, - { - label: '娼滄睙甯�', - value: '429005', - children: [ - { - label: '鍥灄琛楅亾', - value: '429005001', - children: null, - }, - { - label: '鍛ㄧ煻琛楅亾', - value: '429005003', - children: null, - }, - { - label: '骞垮崕琛楅亾', - value: '429005004', - children: null, - }, - { - label: '娉颁赴琛楅亾', - value: '429005005', - children: null, - }, - { - label: '楂樺満琛楅亾', - value: '429005006', - children: null, - }, - { - label: '绔规牴婊╅晣', - value: '429005100', - children: null, - }, - { - label: '娓旀磱闀�', - value: '429005101', - children: null, - }, - { - label: '鐜嬪満闀�', - value: '429005102', - children: null, - }, - { - label: '楂樼煶纰戦晣', - value: '429005103', - children: null, - }, - { - label: '鐔婂彛闀�', - value: '429005104', - children: null, - }, - { - label: '鑰佹柊闀�', - value: '429005105', - children: null, - }, - { - label: '娴╁彛闀�', - value: '429005106', - children: null, - }, - { - label: '绉帀鍙i晣', - value: '429005107', - children: null, - }, - { - label: '寮犻噾闀�', - value: '429005108', - children: null, - }, - { - label: '榫欐咕闀�', - value: '429005109', - children: null, - }, - { - label: '鍚庢箹绠$悊鍖�', - value: '429005451', - children: null, - }, - { - label: '鐔婂彛绠$悊鍖�', - value: '429005452', - children: null, - }, - { - label: '鎬诲彛绠$悊鍖�', - value: '429005453', - children: null, - }, - { - label: '鐧介弓婀栫鐞嗗尯', - value: '429005454', - children: null, - }, - { - label: '杩愮伯婀栫鐞嗗尯', - value: '429005455', - children: null, - }, - { - label: '鏉ㄥ競琛楅亾', - value: '429005900', - children: null, - }, - { - label: '骞垮崕瀵哄啘鍦�', - value: '429005950', - children: null, - }, - ], - }, - { - label: '澶╅棬甯�', - value: '429006', - children: [ - { - label: '绔熼櫟琛楅亾', - value: '429006001', - children: null, - }, - { - label: '渚ㄤ埂琛楅亾寮�鍙戝尯', - value: '429006002', - children: null, - }, - { - label: '鏉ㄦ灄琛楅亾', - value: '429006003', - children: null, - }, - { - label: '澶氬疂闀�', - value: '429006100', - children: null, - }, - { - label: '鎷栧競闀�', - value: '429006101', - children: null, - }, - { - label: '寮犳腐闀�', - value: '429006102', - children: null, - }, - { - label: '钂嬪満闀�', - value: '429006103', - children: null, - }, - { - label: '姹満闀�', - value: '429006104', - children: null, - }, - { - label: '娓旇柂闀�', - value: '429006105', - children: null, - }, - { - label: '榛勬江闀�', - value: '429006106', - children: null, - }, - { - label: '宀冲彛闀�', - value: '429006107', - children: null, - }, - { - label: '妯灄闀�', - value: '429006108', - children: null, - }, - { - label: '褰競闀�', - value: '429006109', - children: null, - }, - { - label: '楹绘磱闀�', - value: '429006110', - children: null, - }, - { - label: '澶氱ゥ闀�', - value: '429006111', - children: null, - }, - { - label: '骞查┛闀�', - value: '429006112', - children: null, - }, - { - label: '椹咕闀�', - value: '429006113', - children: null, - }, - { - label: '鍗㈠競闀�', - value: '429006114', - children: null, - }, - { - label: '灏忔澘闀�', - value: '429006115', - children: null, - }, - { - label: '涔濈湡闀�', - value: '429006116', - children: null, - }, - { - label: '鐨傚競闀�', - value: '429006118', - children: null, - }, - { - label: '鑳″競闀�', - value: '429006119', - children: null, - }, - { - label: '鐭虫渤闀�', - value: '429006120', - children: null, - }, - { - label: '浣涘瓙灞遍晣', - value: '429006121', - children: null, - }, - { - label: '鍑�娼埂', - value: '429006201', - children: null, - }, - { - label: '钂嬫箹鍐滃満', - value: '429006450', - children: null, - }, - { - label: '鐧借寘婀栧啘鍦�', - value: '429006451', - children: null, - }, - { - label: '娌夋箹绠″浼�', - value: '429006452', - children: null, - }, - ], - }, - { - label: '绁炲啘鏋舵灄鍖�', - value: '429021', - children: [ - { - label: '鏉炬煆闀�', - value: '429021100', - children: null, - }, - { - label: '闃虫棩闀�', - value: '429021101', - children: null, - }, - { - label: '鏈ㄩ奔闀�', - value: '429021102', - children: null, - }, - { - label: '绾㈠潽闀�', - value: '429021103', - children: null, - }, - { - label: '鏂板崕闀�', - value: '429021104', - children: null, - }, - { - label: '涔濇箹闀�', - value: '429021105', - children: null, - }, - { - label: '瀹嬫礇涔�', - value: '429021200', - children: null, - }, - { - label: '涓嬭胺鍧湡瀹舵棌涔�', - value: '429021202', - children: null, - }, - ], - }, - ], - }, - { - label: '婀栧崡鐪�', - value: '430000', - children: [ - { - label: '闀挎矙甯�', - value: '430100', - children: [ - { - label: '鑺欒搲鍖�', - value: '430102', - children: null, - }, - { - label: '澶╁績鍖�', - value: '430103', - children: null, - }, - { - label: '宀抽簱鍖�', - value: '430104', - children: null, - }, - { - label: '寮�绂忓尯', - value: '430105', - children: null, - }, - { - label: '闆ㄨ姳鍖�', - value: '430111', - children: null, - }, - { - label: '鏈涘煄鍖�', - value: '430112', - children: null, - }, - { - label: '闀挎矙鍘�', - value: '430121', - children: null, - }, - { - label: '娴忛槼甯�', - value: '430181', - children: null, - }, - { - label: '瀹佷埂甯�', - value: '430182', - children: null, - }, - ], - }, - { - label: '鏍床甯�', - value: '430200', - children: [ - { - label: '鑽峰鍖�', - value: '430202', - children: null, - }, - { - label: '鑺︽窞鍖�', - value: '430203', - children: null, - }, - { - label: '鐭冲嘲鍖�', - value: '430204', - children: null, - }, - { - label: '澶╁厓鍖�', - value: '430211', - children: null, - }, - { - label: '娓屽彛鍖�', - value: '430212', - children: null, - }, - { - label: '鏀稿幙', - value: '430223', - children: null, - }, - { - label: '鑼堕櫟鍘�', - value: '430224', - children: null, - }, - { - label: '鐐庨櫟鍘�', - value: '430225', - children: null, - }, - { - label: '閱撮櫟甯�', - value: '430281', - children: null, - }, - ], - }, - { - label: '婀樻江甯�', - value: '430300', - children: [ - { - label: '闆ㄦ箹鍖�', - value: '430302', - children: null, - }, - { - label: '宀冲鍖�', - value: '430304', - children: null, - }, - { - label: '婀樻江鍘�', - value: '430321', - children: null, - }, - { - label: '婀樹埂甯�', - value: '430381', - children: null, - }, - { - label: '闊跺北甯�', - value: '430382', - children: null, - }, - ], - }, - { - label: '琛¢槼甯�', - value: '430400', - children: [ - { - label: '鐝犳櫀鍖�', - value: '430405', - children: null, - }, - { - label: '闆佸嘲鍖�', - value: '430406', - children: null, - }, - { - label: '鐭抽紦鍖�', - value: '430407', - children: null, - }, - { - label: '钂告箻鍖�', - value: '430408', - children: null, - }, - { - label: '鍗楀渤鍖�', - value: '430412', - children: null, - }, - { - label: '琛¢槼鍘�', - value: '430421', - children: null, - }, - { - label: '琛″崡鍘�', - value: '430422', - children: null, - }, - { - label: '琛″北鍘�', - value: '430423', - children: null, - }, - { - label: '琛′笢鍘�', - value: '430424', - children: null, - }, - { - label: '绁佷笢鍘�', - value: '430426', - children: null, - }, - { - label: '鑰掗槼甯�', - value: '430481', - children: null, - }, - { - label: '甯稿畞甯�', - value: '430482', - children: null, - }, - ], - }, - { - label: '閭甸槼甯�', - value: '430500', - children: [ - { - label: '鍙屾竻鍖�', - value: '430502', - children: null, - }, - { - label: '澶хゥ鍖�', - value: '430503', - children: null, - }, - { - label: '鍖楀鍖�', - value: '430511', - children: null, - }, - { - label: '閭典笢鍘�', - value: '430521', - children: null, - }, - { - label: '鏂伴偟鍘�', - value: '430522', - children: null, - }, - { - label: '閭甸槼鍘�', - value: '430523', - children: null, - }, - { - label: '闅嗗洖鍘�', - value: '430524', - children: null, - }, - { - label: '娲炲彛鍘�', - value: '430525', - children: null, - }, - { - label: '缁ュ畞鍘�', - value: '430527', - children: null, - }, - { - label: '鏂板畞鍘�', - value: '430528', - children: null, - }, - { - label: '鍩庢鑻楁棌鑷不鍘�', - value: '430529', - children: null, - }, - { - label: '姝﹀唸甯�', - value: '430581', - children: null, - }, - ], - }, - { - label: '宀抽槼甯�', - value: '430600', - children: [ - { - label: '宀抽槼妤煎尯', - value: '430602', - children: null, - }, - { - label: '浜戞邯鍖�', - value: '430603', - children: null, - }, - { - label: '鍚涘北鍖�', - value: '430611', - children: null, - }, - { - label: '宀抽槼鍘�', - value: '430621', - children: null, - }, - { - label: '鍗庡鍘�', - value: '430623', - children: null, - }, - { - label: '婀橀槾鍘�', - value: '430624', - children: null, - }, - { - label: '骞虫睙鍘�', - value: '430626', - children: null, - }, - { - label: '姹ㄧ綏甯�', - value: '430681', - children: null, - }, - { - label: '涓存箻甯�', - value: '430682', - children: null, - }, - ], - }, - { - label: '甯稿痉甯�', - value: '430700', - children: [ - { - label: '姝﹂櫟鍖�', - value: '430702', - children: null, - }, - { - label: '榧庡煄鍖�', - value: '430703', - children: null, - }, - { - label: '瀹変埂鍘�', - value: '430721', - children: null, - }, - { - label: '姹夊鍘�', - value: '430722', - children: null, - }, - { - label: '婢у幙', - value: '430723', - children: null, - }, - { - label: '涓存晶鍘�', - value: '430724', - children: null, - }, - { - label: '妗冩簮鍘�', - value: '430725', - children: null, - }, - { - label: '鐭抽棬鍘�', - value: '430726', - children: null, - }, - { - label: '娲ュ競甯�', - value: '430781', - children: null, - }, - ], - }, - { - label: '寮犲鐣屽競', - value: '430800', - children: [ - { - label: '姘稿畾鍖�', - value: '430802', - children: null, - }, - { - label: '姝﹂櫟婧愬尯', - value: '430811', - children: null, - }, - { - label: '鎱堝埄鍘�', - value: '430821', - children: null, - }, - { - label: '妗戞鍘�', - value: '430822', - children: null, - }, - ], - }, - { - label: '鐩婇槼甯�', - value: '430900', - children: [ - { - label: '璧勯槼鍖�', - value: '430902', - children: null, - }, - { - label: '璧北鍖�', - value: '430903', - children: null, - }, - { - label: '鍗楀幙', - value: '430921', - children: null, - }, - { - label: '妗冩睙鍘�', - value: '430922', - children: null, - }, - { - label: '瀹夊寲鍘�', - value: '430923', - children: null, - }, - { - label: '娌呮睙甯�', - value: '430981', - children: null, - }, - ], - }, - { - label: '閮村窞甯�', - value: '431000', - children: [ - { - label: '鍖楁箹鍖�', - value: '431002', - children: null, - }, - { - label: '鑻忎粰鍖�', - value: '431003', - children: null, - }, - { - label: '妗傞槼鍘�', - value: '431021', - children: null, - }, - { - label: '瀹滅珷鍘�', - value: '431022', - children: null, - }, - { - label: '姘稿叴鍘�', - value: '431023', - children: null, - }, - { - label: '鍢夌鍘�', - value: '431024', - children: null, - }, - { - label: '涓存鍘�', - value: '431025', - children: null, - }, - { - label: '姹濆煄鍘�', - value: '431026', - children: null, - }, - { - label: '妗備笢鍘�', - value: '431027', - children: null, - }, - { - label: '瀹変粊鍘�', - value: '431028', - children: null, - }, - { - label: '璧勫叴甯�', - value: '431081', - children: null, - }, - ], - }, - { - label: '姘稿窞甯�', - value: '431100', - children: [ - { - label: '闆堕櫟鍖�', - value: '431102', - children: null, - }, - { - label: '鍐锋按婊╁尯', - value: '431103', - children: null, - }, - { - label: '绁侀槼鍘�', - value: '431121', - children: null, - }, - { - label: '涓滃畨鍘�', - value: '431122', - children: null, - }, - { - label: '鍙岀墝鍘�', - value: '431123', - children: null, - }, - { - label: '閬撳幙', - value: '431124', - children: null, - }, - { - label: '姹熸案鍘�', - value: '431125', - children: null, - }, - { - label: '瀹佽繙鍘�', - value: '431126', - children: null, - }, - { - label: '钃濆北鍘�', - value: '431127', - children: null, - }, - { - label: '鏂扮敯鍘�', - value: '431128', - children: null, - }, - { - label: '姹熷崕鐟舵棌鑷不鍘�', - value: '431129', - children: null, - }, - ], - }, - { - label: '鎬�鍖栧競', - value: '431200', - children: [ - { - label: '楣ゅ煄鍖�', - value: '431202', - children: null, - }, - { - label: '涓柟鍘�', - value: '431221', - children: null, - }, - { - label: '娌呴櫟鍘�', - value: '431222', - children: null, - }, - { - label: '杈版邯鍘�', - value: '431223', - children: null, - }, - { - label: '婧嗘郸鍘�', - value: '431224', - children: null, - }, - { - label: '浼氬悓鍘�', - value: '431225', - children: null, - }, - { - label: '楹婚槼鑻楁棌鑷不鍘�', - value: '431226', - children: null, - }, - { - label: '鏂版檭渚楁棌鑷不鍘�', - value: '431227', - children: null, - }, - { - label: '鑺锋睙渚楁棌鑷不鍘�', - value: '431228', - children: null, - }, - { - label: '闈栧窞鑻楁棌渚楁棌鑷不鍘�', - value: '431229', - children: null, - }, - { - label: '閫氶亾渚楁棌鑷不鍘�', - value: '431230', - children: null, - }, - { - label: '娲睙甯�', - value: '431281', - children: null, - }, - ], - }, - { - label: '濞勫簳甯�', - value: '431300', - children: [ - { - label: '濞勬槦鍖�', - value: '431302', - children: null, - }, - { - label: '鍙屽嘲鍘�', - value: '431321', - children: null, - }, - { - label: '鏂板寲鍘�', - value: '431322', - children: null, - }, - { - label: '鍐锋按姹熷競', - value: '431381', - children: null, - }, - { - label: '娑熸簮甯�', - value: '431382', - children: null, - }, - ], - }, - { - label: '婀樿タ鍦熷鏃忚嫍鏃忚嚜娌诲窞', - value: '433100', - children: [ - { - label: '鍚夐甯�', - value: '433101', - children: null, - }, - { - label: '娉告邯鍘�', - value: '433122', - children: null, - }, - { - label: '鍑ゅ嚢鍘�', - value: '433123', - children: null, - }, - { - label: '鑺卞灒鍘�', - value: '433124', - children: null, - }, - { - label: '淇濋潠鍘�', - value: '433125', - children: null, - }, - { - label: '鍙や笀鍘�', - value: '433126', - children: null, - }, - { - label: '姘搁『鍘�', - value: '433127', - children: null, - }, - { - label: '榫欏北鍘�', - value: '433130', - children: null, - }, - ], - }, - ], - }, - { - label: '骞夸笢鐪�', - value: '440000', - children: [ - { - label: '骞垮窞甯�', - value: '440100', - children: [ - { - label: '鑽旀咕鍖�', - value: '440103', - children: null, - }, - { - label: '瓒婄鍖�', - value: '440104', - children: null, - }, - { - label: '娴风彔鍖�', - value: '440105', - children: null, - }, - { - label: '澶╂渤鍖�', - value: '440106', - children: null, - }, - { - label: '鐧戒簯鍖�', - value: '440111', - children: null, - }, - { - label: '榛勫煍鍖�', - value: '440112', - children: null, - }, - { - label: '鐣鍖�', - value: '440113', - children: null, - }, - { - label: '鑺遍兘鍖�', - value: '440114', - children: null, - }, - { - label: '鍗楁矙鍖�', - value: '440115', - children: null, - }, - { - label: '浠庡寲鍖�', - value: '440117', - children: null, - }, - { - label: '澧炲煄鍖�', - value: '440118', - children: null, - }, - ], - }, - { - label: '闊跺叧甯�', - value: '440200', - children: [ - { - label: '姝︽睙鍖�', - value: '440203', - children: null, - }, - { - label: '娴堟睙鍖�', - value: '440204', - children: null, - }, - { - label: '鏇叉睙鍖�', - value: '440205', - children: null, - }, - { - label: '濮嬪叴鍘�', - value: '440222', - children: null, - }, - { - label: '浠佸寲鍘�', - value: '440224', - children: null, - }, - { - label: '缈佹簮鍘�', - value: '440229', - children: null, - }, - { - label: '涔虫簮鐟舵棌鑷不鍘�', - value: '440232', - children: null, - }, - { - label: '鏂颁赴鍘�', - value: '440233', - children: null, - }, - { - label: '涔愭槍甯�', - value: '440281', - children: null, - }, - { - label: '鍗楅泟甯�', - value: '440282', - children: null, - }, - ], - }, - { - label: '娣卞湷甯�', - value: '440300', - children: [ - { - label: '缃楁箹鍖�', - value: '440303', - children: null, - }, - { - label: '绂忕敯鍖�', - value: '440304', - children: null, - }, - { - label: '鍗楀北鍖�', - value: '440305', - children: null, - }, - { - label: '瀹濆畨鍖�', - value: '440306', - children: null, - }, - { - label: '榫欏矖鍖�', - value: '440307', - children: null, - }, - { - label: '鐩愮敯鍖�', - value: '440308', - children: null, - }, - { - label: '榫欏崕鍖�', - value: '440309', - children: null, - }, - { - label: '鍧北鍖�', - value: '440310', - children: null, - }, - { - label: '鍏夋槑鍖�', - value: '440311', - children: null, - }, - ], - }, - { - label: '鐝犳捣甯�', - value: '440400', - children: [ - { - label: '棣欐床鍖�', - value: '440402', - children: null, - }, - { - label: '鏂楅棬鍖�', - value: '440403', - children: null, - }, - { - label: '閲戞咕鍖�', - value: '440404', - children: null, - }, - { - label: '棣欐床鍖烘í鐞存牎鍖�(鐢辨境闂ㄧ壒鍒鏀垮尯瀹炴柦绠¤緰)', - value: '440499', - children: null, - }, - ], - }, - { - label: '姹曞ご甯�', - value: '440500', - children: [ - { - label: '榫欐箹鍖�', - value: '440507', - children: null, - }, - { - label: '閲戝钩鍖�', - value: '440511', - children: null, - }, - { - label: '婵犳睙鍖�', - value: '440512', - children: null, - }, - { - label: '娼槼鍖�', - value: '440513', - children: null, - }, - { - label: '娼崡鍖�', - value: '440514', - children: null, - }, - { - label: '婢勬捣鍖�', - value: '440515', - children: null, - }, - { - label: '鍗楁境鍘�', - value: '440523', - children: null, - }, - ], - }, - { - label: '浣涘北甯�', - value: '440600', - children: [ - { - label: '绂呭煄鍖�', - value: '440604', - children: null, - }, - { - label: '鍗楁捣鍖�', - value: '440605', - children: null, - }, - { - label: '椤哄痉鍖�', - value: '440606', - children: null, - }, - { - label: '涓夋按鍖�', - value: '440607', - children: null, - }, - { - label: '楂樻槑鍖�', - value: '440608', - children: null, - }, - ], - }, - { - label: '姹熼棬甯�', - value: '440700', - children: [ - { - label: '钃睙鍖�', - value: '440703', - children: null, - }, - { - label: '姹熸捣鍖�', - value: '440704', - children: null, - }, - { - label: '鏂颁細鍖�', - value: '440705', - children: null, - }, - { - label: '鍙板北甯�', - value: '440781', - children: null, - }, - { - label: '寮�骞冲競', - value: '440783', - children: null, - }, - { - label: '楣ゅ北甯�', - value: '440784', - children: null, - }, - { - label: '鎭╁钩甯�', - value: '440785', - children: null, - }, - ], - }, - { - label: '婀涙睙甯�', - value: '440800', - children: [ - { - label: '璧ゅ潕鍖�', - value: '440802', - children: null, - }, - { - label: '闇炲北鍖�', - value: '440803', - children: null, - }, - { - label: '鍧″ご鍖�', - value: '440804', - children: null, - }, - { - label: '楹荤珷鍖�', - value: '440811', - children: null, - }, - { - label: '閬傛邯鍘�', - value: '440823', - children: null, - }, - { - label: '寰愰椈鍘�', - value: '440825', - children: null, - }, - { - label: '寤夋睙甯�', - value: '440881', - children: null, - }, - { - label: '闆峰窞甯�', - value: '440882', - children: null, - }, - { - label: '鍚村窛甯�', - value: '440883', - children: null, - }, - ], - }, - { - label: '鑼傚悕甯�', - value: '440900', - children: [ - { - label: '鑼傚崡鍖�', - value: '440902', - children: null, - }, - { - label: '鐢电櫧鍖�', - value: '440904', - children: null, - }, - { - label: '楂樺窞甯�', - value: '440981', - children: null, - }, - { - label: '鍖栧窞甯�', - value: '440982', - children: null, - }, - { - label: '淇″疁甯�', - value: '440983', - children: null, - }, - ], - }, - { - label: '鑲囧簡甯�', - value: '441200', - children: [ - { - label: '绔窞鍖�', - value: '441202', - children: null, - }, - { - label: '榧庢箹鍖�', - value: '441203', - children: null, - }, - { - label: '楂樿鍖�', - value: '441204', - children: null, - }, - { - label: '骞垮畞鍘�', - value: '441223', - children: null, - }, - { - label: '鎬�闆嗗幙', - value: '441224', - children: null, - }, - { - label: '灏佸紑鍘�', - value: '441225', - children: null, - }, - { - label: '寰峰簡鍘�', - value: '441226', - children: null, - }, - { - label: '鍥涗細甯�', - value: '441284', - children: null, - }, - ], - }, - { - label: '鎯犲窞甯�', - value: '441300', - children: [ - { - label: '鎯犲煄鍖�', - value: '441302', - children: null, - }, - { - label: '鎯犻槼鍖�', - value: '441303', - children: null, - }, - { - label: '鍗氱綏鍘�', - value: '441322', - children: null, - }, - { - label: '鎯犱笢鍘�', - value: '441323', - children: null, - }, - { - label: '榫欓棬鍘�', - value: '441324', - children: null, - }, - ], - }, - { - label: '姊呭窞甯�', - value: '441400', - children: [ - { - label: '姊呮睙鍖�', - value: '441402', - children: null, - }, - { - label: '姊呭幙鍖�', - value: '441403', - children: null, - }, - { - label: '澶у煍鍘�', - value: '441422', - children: null, - }, - { - label: '涓伴『鍘�', - value: '441423', - children: null, - }, - { - label: '浜斿崕鍘�', - value: '441424', - children: null, - }, - { - label: '骞宠繙鍘�', - value: '441426', - children: null, - }, - { - label: '钑夊箔鍘�', - value: '441427', - children: null, - }, - { - label: '鍏村畞甯�', - value: '441481', - children: null, - }, - ], - }, - { - label: '姹曞熬甯�', - value: '441500', - children: [ - { - label: '鍩庡尯', - value: '441502', - children: null, - }, - { - label: '娴蜂赴鍘�', - value: '441521', - children: null, - }, - { - label: '闄嗘渤鍘�', - value: '441523', - children: null, - }, - { - label: '闄嗕赴甯�', - value: '441581', - children: null, - }, - ], - }, - { - label: '娌虫簮甯�', - value: '441600', - children: [ - { - label: '婧愬煄鍖�', - value: '441602', - children: null, - }, - { - label: '绱噾鍘�', - value: '441621', - children: null, - }, - { - label: '榫欏窛鍘�', - value: '441622', - children: null, - }, - { - label: '杩炲钩鍘�', - value: '441623', - children: null, - }, - { - label: '鍜屽钩鍘�', - value: '441624', - children: null, - }, - { - label: '涓滄簮鍘�', - value: '441625', - children: null, - }, - ], - }, - { - label: '闃虫睙甯�', - value: '441700', - children: [ - { - label: '姹熷煄鍖�', - value: '441702', - children: null, - }, - { - label: '闃充笢鍖�', - value: '441704', - children: null, - }, - { - label: '闃宠タ鍘�', - value: '441721', - children: null, - }, - { - label: '闃虫槬甯�', - value: '441781', - children: null, - }, - ], - }, - { - label: '娓呰繙甯�', - value: '441800', - children: [ - { - label: '娓呭煄鍖�', - value: '441802', - children: null, - }, - { - label: '娓呮柊鍖�', - value: '441803', - children: null, - }, - { - label: '浣涘唸鍘�', - value: '441821', - children: null, - }, - { - label: '闃冲北鍘�', - value: '441823', - children: null, - }, - { - label: '杩炲北澹棌鐟舵棌鑷不鍘�', - value: '441825', - children: null, - }, - { - label: '杩炲崡鐟舵棌鑷不鍘�', - value: '441826', - children: null, - }, - { - label: '鑻卞痉甯�', - value: '441881', - children: null, - }, - { - label: '杩炲窞甯�', - value: '441882', - children: null, - }, - ], - }, - { - label: '涓滆帪甯�', - value: '441900', - children: [ - { - label: '涓滆帪甯�', - value: '441999', - children: null, - }, - ], - }, - { - label: '涓北甯�', - value: '442000', - children: [ - { - label: '涓北甯�', - value: '442099', - children: null, - }, - ], - }, - { - label: '娼窞甯�', - value: '445100', - children: [ - { - label: '婀樻ˉ鍖�', - value: '445102', - children: null, - }, - { - label: '娼畨鍖�', - value: '445103', - children: null, - }, - { - label: '楗跺钩鍘�', - value: '445122', - children: null, - }, - ], - }, - { - label: '鎻槼甯�', - value: '445200', - children: [ - { - label: '姒曞煄鍖�', - value: '445202', - children: null, - }, - { - label: '鎻笢鍖�', - value: '445203', - children: null, - }, - { - label: '鎻タ鍘�', - value: '445222', - children: null, - }, - { - label: '鎯犳潵鍘�', - value: '445224', - children: null, - }, - { - label: '鏅畞甯�', - value: '445281', - children: null, - }, - ], - }, - { - label: '浜戞诞甯�', - value: '445300', - children: [ - { - label: '浜戝煄鍖�', - value: '445302', - children: null, - }, - { - label: '浜戝畨鍖�', - value: '445303', - children: null, - }, - { - label: '鏂板叴鍘�', - value: '445321', - children: null, - }, - { - label: '閮佸崡鍘�', - value: '445322', - children: null, - }, - { - label: '缃楀畾甯�', - value: '445381', - children: null, - }, - ], - }, - ], - }, - { - label: '骞胯タ澹棌鑷不鍖�', - value: '450000', - children: [ - { - label: '鍗楀畞甯�', - value: '450100', - children: [ - { - label: '鍏村畞鍖�', - value: '450102', - children: null, - }, - { - label: '闈掔鍖�', - value: '450103', - children: null, - }, - { - label: '姹熷崡鍖�', - value: '450105', - children: null, - }, - { - label: '瑗夸埂濉樺尯', - value: '450107', - children: null, - }, - { - label: '鑹簡鍖�', - value: '450108', - children: null, - }, - { - label: '閭曞畞鍖�', - value: '450109', - children: null, - }, - { - label: '姝﹂福鍖�', - value: '450110', - children: null, - }, - { - label: '闅嗗畨鍘�', - value: '450123', - children: null, - }, - { - label: '椹北鍘�', - value: '450124', - children: null, - }, - { - label: '涓婃灄鍘�', - value: '450125', - children: null, - }, - { - label: '瀹鹃槼鍘�', - value: '450126', - children: null, - }, - { - label: '妯幙', - value: '450127', - children: null, - }, - ], - }, - { - label: '鏌冲窞甯�', - value: '450200', - children: [ - { - label: '鍩庝腑鍖�', - value: '450202', - children: null, - }, - { - label: '楸煎嘲鍖�', - value: '450203', - children: null, - }, - { - label: '鏌冲崡鍖�', - value: '450204', - children: null, - }, - { - label: '鏌冲寳鍖�', - value: '450205', - children: null, - }, - { - label: '鏌虫睙鍖�', - value: '450206', - children: null, - }, - { - label: '鏌冲煄鍘�', - value: '450222', - children: null, - }, - { - label: '楣垮鍘�', - value: '450223', - children: null, - }, - { - label: '铻嶅畨鍘�', - value: '450224', - children: null, - }, - { - label: '铻嶆按鑻楁棌鑷不鍘�', - value: '450225', - children: null, - }, - { - label: '涓夋睙渚楁棌鑷不鍘�', - value: '450226', - children: null, - }, - ], - }, - { - label: '妗傛灄甯�', - value: '450300', - children: [ - { - label: '绉�宄板尯', - value: '450302', - children: null, - }, - { - label: '鍙犲僵鍖�', - value: '450303', - children: null, - }, - { - label: '璞″北鍖�', - value: '450304', - children: null, - }, - { - label: '涓冩槦鍖�', - value: '450305', - children: null, - }, - { - label: '闆佸北鍖�', - value: '450311', - children: null, - }, - { - label: '涓存鍖�', - value: '450312', - children: null, - }, - { - label: '闃虫湐鍘�', - value: '450321', - children: null, - }, - { - label: '鐏靛窛鍘�', - value: '450323', - children: null, - }, - { - label: '鍏ㄥ窞鍘�', - value: '450324', - children: null, - }, - { - label: '鍏村畨鍘�', - value: '450325', - children: null, - }, - { - label: '姘哥鍘�', - value: '450326', - children: null, - }, - { - label: '鐏岄槼鍘�', - value: '450327', - children: null, - }, - { - label: '榫欒儨鍚勬棌鑷不鍘�', - value: '450328', - children: null, - }, - { - label: '璧勬簮鍘�', - value: '450329', - children: null, - }, - { - label: '骞充箰鍘�', - value: '450330', - children: null, - }, - { - label: '鎭煄鐟舵棌鑷不鍘�', - value: '450332', - children: null, - }, - { - label: '鑽旀郸甯�', - value: '450381', - children: null, - }, - ], - }, - { - label: '姊у窞甯�', - value: '450400', - children: [ - { - label: '涓囩鍖�', - value: '450403', - children: null, - }, - { - label: '闀挎床鍖�', - value: '450405', - children: null, - }, - { - label: '榫欏湬鍖�', - value: '450406', - children: null, - }, - { - label: '鑻嶆ⅶ鍘�', - value: '450421', - children: null, - }, - { - label: '钘ゅ幙', - value: '450422', - children: null, - }, - { - label: '钂欏北鍘�', - value: '450423', - children: null, - }, - { - label: '宀戞邯甯�', - value: '450481', - children: null, - }, - ], - }, - { - label: '鍖楁捣甯�', - value: '450500', - children: [ - { - label: '娴峰煄鍖�', - value: '450502', - children: null, - }, - { - label: '閾舵捣鍖�', - value: '450503', - children: null, - }, - { - label: '閾佸北娓尯', - value: '450512', - children: null, - }, - { - label: '鍚堟郸鍘�', - value: '450521', - children: null, - }, - ], - }, - { - label: '闃插煄娓競', - value: '450600', - children: [ - { - label: '娓彛鍖�', - value: '450602', - children: null, - }, - { - label: '闃插煄鍖�', - value: '450603', - children: null, - }, - { - label: '涓婃�濆幙', - value: '450621', - children: null, - }, - { - label: '涓滃叴甯�', - value: '450681', - children: null, - }, - ], - }, - { - label: '閽﹀窞甯�', - value: '450700', - children: [ - { - label: '閽﹀崡鍖�', - value: '450702', - children: null, - }, - { - label: '閽﹀寳鍖�', - value: '450703', - children: null, - }, - { - label: '鐏靛北鍘�', - value: '450721', - children: null, - }, - { - label: '娴﹀寳鍘�', - value: '450722', - children: null, - }, - ], - }, - { - label: '璐垫腐甯�', - value: '450800', - children: [ - { - label: '娓寳鍖�', - value: '450802', - children: null, - }, - { - label: '娓崡鍖�', - value: '450803', - children: null, - }, - { - label: '瑕冨鍖�', - value: '450804', - children: null, - }, - { - label: '骞冲崡鍘�', - value: '450821', - children: null, - }, - { - label: '妗傚钩甯�', - value: '450881', - children: null, - }, - ], - }, - { - label: '鐜夋灄甯�', - value: '450900', - children: [ - { - label: '鐜夊窞鍖�', - value: '450902', - children: null, - }, - { - label: '绂忕坏鍖�', - value: '450903', - children: null, - }, - { - label: '瀹瑰幙', - value: '450921', - children: null, - }, - { - label: '闄嗗窛鍘�', - value: '450922', - children: null, - }, - { - label: '鍗氱櫧鍘�', - value: '450923', - children: null, - }, - { - label: '鍏翠笟鍘�', - value: '450924', - children: null, - }, - { - label: '鍖楁祦甯�', - value: '450981', - children: null, - }, - ], - }, - { - label: '鐧捐壊甯�', - value: '451000', - children: [ - { - label: '鍙虫睙鍖�', - value: '451002', - children: null, - }, - { - label: '鐢伴槼鍘�', - value: '451021', - children: null, - }, - { - label: '鐢颁笢鍘�', - value: '451022', - children: null, - }, - { - label: '骞虫灉鍘�', - value: '451023', - children: null, - }, - { - label: '寰蜂繚鍘�', - value: '451024', - children: null, - }, - { - label: '閭e潯鍘�', - value: '451026', - children: null, - }, - { - label: '鍑屼簯鍘�', - value: '451027', - children: null, - }, - { - label: '涔愪笟鍘�', - value: '451028', - children: null, - }, - { - label: '鐢版灄鍘�', - value: '451029', - children: null, - }, - { - label: '瑗挎灄鍘�', - value: '451030', - children: null, - }, - { - label: '闅嗘灄鍚勬棌鑷不鍘�', - value: '451031', - children: null, - }, - { - label: '闈栬タ甯�', - value: '451081', - children: null, - }, - ], - }, - { - label: '璐哄窞甯�', - value: '451100', - children: [ - { - label: '鍏鍖�', - value: '451102', - children: null, - }, - { - label: '骞虫鍖�', - value: '451103', - children: null, - }, - { - label: '鏄钩鍘�', - value: '451121', - children: null, - }, - { - label: '閽熷北鍘�', - value: '451122', - children: null, - }, - { - label: '瀵屽窛鐟舵棌鑷不鍘�', - value: '451123', - children: null, - }, - ], - }, - { - label: '娌虫睜甯�', - value: '451200', - children: [ - { - label: '閲戝煄姹熷尯', - value: '451202', - children: null, - }, - { - label: '瀹滃窞鍖�', - value: '451203', - children: null, - }, - { - label: '鍗椾腹鍘�', - value: '451221', - children: null, - }, - { - label: '澶╁敞鍘�', - value: '451222', - children: null, - }, - { - label: '鍑ゅ北鍘�', - value: '451223', - children: null, - }, - { - label: '涓滃叞鍘�', - value: '451224', - children: null, - }, - { - label: '缃楀煄浠浆鏃忚嚜娌诲幙', - value: '451225', - children: null, - }, - { - label: '鐜睙姣涘崡鏃忚嚜娌诲幙', - value: '451226', - children: null, - }, - { - label: '宸撮┈鐟舵棌鑷不鍘�', - value: '451227', - children: null, - }, - { - label: '閮藉畨鐟舵棌鑷不鍘�', - value: '451228', - children: null, - }, - { - label: '澶у寲鐟舵棌鑷不鍘�', - value: '451229', - children: null, - }, - ], - }, - { - label: '鏉ュ甯�', - value: '451300', - children: [ - { - label: '鍏村鍖�', - value: '451302', - children: null, - }, - { - label: '蹇诲煄鍘�', - value: '451321', - children: null, - }, - { - label: '璞″窞鍘�', - value: '451322', - children: null, - }, - { - label: '姝﹀鍘�', - value: '451323', - children: null, - }, - { - label: '閲戠鐟舵棌鑷不鍘�', - value: '451324', - children: null, - }, - { - label: '鍚堝北甯�', - value: '451381', - children: null, - }, - ], - }, - { - label: '宕囧乏甯�', - value: '451400', - children: [ - { - label: '姹熷窞鍖�', - value: '451402', - children: null, - }, - { - label: '鎵剁互鍘�', - value: '451421', - children: null, - }, - { - label: '瀹佹槑鍘�', - value: '451422', - children: null, - }, - { - label: '榫欏窞鍘�', - value: '451423', - children: null, - }, - { - label: '澶ф柊鍘�', - value: '451424', - children: null, - }, - { - label: '澶╃瓑鍘�', - value: '451425', - children: null, - }, - { - label: '鍑ゥ甯�', - value: '451481', - children: null, - }, - ], - }, - ], - }, - { - label: '娴峰崡鐪�', - value: '460000', - children: [ - { - label: '娴峰彛甯�', - value: '460100', - children: [ - { - label: '绉�鑻卞尯', - value: '460105', - children: null, - }, - { - label: '榫欏崕鍖�', - value: '460106', - children: null, - }, - { - label: '鐞煎北鍖�', - value: '460107', - children: null, - }, - { - label: '缇庡叞鍖�', - value: '460108', - children: null, - }, - ], - }, - { - label: '涓変簹甯�', - value: '460200', - children: [ - { - label: '娴锋鍖�', - value: '460202', - children: null, - }, - { - label: '鍚夐槼鍖�', - value: '460203', - children: null, - }, - { - label: '澶╂动鍖�', - value: '460204', - children: null, - }, - { - label: '宕栧窞鍖�', - value: '460205', - children: null, - }, - ], - }, - { - label: '涓夋矙甯�', - value: '460300', - children: [ - { - label: '瑗挎矙缇ゅ矝', - value: '460321', - children: null, - }, - { - label: '鍗楁矙缇ゅ矝', - value: '460322', - children: null, - }, - { - label: '涓矙缇ゅ矝鐨勫矝绀佸強鍏舵捣鍩�', - value: '460323', - children: null, - }, - ], - }, - { - label: '鍎嬪窞甯�', - value: '460400', - children: [ - { - label: '鍎嬪窞甯�', - value: '460499', - children: null, - }, - ], - }, - { - label: '浜旀寚灞卞競', - value: '469001', - children: [ - { - label: '閫氫粈闀�', - value: '469001100', - children: null, - }, - { - label: '鍗楀湥闀�', - value: '469001101', - children: null, - }, - { - label: '姣涢槼闀�', - value: '469001102', - children: null, - }, - { - label: '鐣槼闀�', - value: '469001103', - children: null, - }, - { - label: '鐣呭ソ涔�', - value: '469001200', - children: null, - }, - { - label: '姣涢亾涔�', - value: '469001201', - children: null, - }, - { - label: '姘存弧涔�', - value: '469001202', - children: null, - }, - { - label: '鍥借惀鐣呭ソ鍐滃満', - value: '469001400', - children: null, - }, - ], - }, - { - label: '鐞兼捣甯�', - value: '469002', - children: [ - { - label: '鍢夌Н闀�', - value: '469002100', - children: null, - }, - { - label: '涓囨硥闀�', - value: '469002101', - children: null, - }, - { - label: '鐭冲闀�', - value: '469002102', - children: null, - }, - { - label: '涓師闀�', - value: '469002103', - children: null, - }, - { - label: '鍗氶硨闀�', - value: '469002104', - children: null, - }, - { - label: '闃虫睙闀�', - value: '469002105', - children: null, - }, - { - label: '榫欐睙闀�', - value: '469002106', - children: null, - }, - { - label: '娼棬闀�', - value: '469002107', - children: null, - }, - { - label: '濉旀磱闀�', - value: '469002108', - children: null, - }, - { - label: '闀垮潯闀�', - value: '469002109', - children: null, - }, - { - label: '澶ц矾闀�', - value: '469002110', - children: null, - }, - { - label: '浼氬北闀�', - value: '469002111', - children: null, - }, - { - label: '涓滃お鍐滃満', - value: '469002400', - children: null, - }, - { - label: '鍗椾扛鍐滃満', - value: '469002401', - children: null, - }, - { - label: '涓滅孩鍐滃満', - value: '469002402', - children: null, - }, - { - label: '褰潙灞卞崕渚ㄥ啘鍦�', - value: '469002500', - children: null, - }, - { - label: '涓滃钩鍐滃満', - value: '469002953', - children: null, - }, - ], - }, - { - label: '鏂囨槍甯�', - value: '469005', - children: [ - { - label: '鏂囧煄闀�', - value: '469005100', - children: null, - }, - { - label: '閲嶅叴闀�', - value: '469005101', - children: null, - }, - { - label: '钃幈闀�', - value: '469005102', - children: null, - }, - { - label: '浼氭枃闀�', - value: '469005103', - children: null, - }, - { - label: '涓滆矾闀�', - value: '469005104', - children: null, - }, - { - label: '娼墰闀�', - value: '469005105', - children: null, - }, - { - label: '涓滈榿闀�', - value: '469005106', - children: null, - }, - { - label: '鏂囨暀闀�', - value: '469005107', - children: null, - }, - { - label: '涓滈儕闀�', - value: '469005108', - children: null, - }, - { - label: '榫欐ゼ闀�', - value: '469005109', - children: null, - }, - { - label: '鏄屾磼闀�', - value: '469005110', - children: null, - }, - { - label: '缈佺敯闀�', - value: '469005111', - children: null, - }, - { - label: '鎶辩綏闀�', - value: '469005112', - children: null, - }, - { - label: '鍐潯闀�', - value: '469005113', - children: null, - }, - { - label: '閿﹀北闀�', - value: '469005114', - children: null, - }, - { - label: '閾哄墠闀�', - value: '469005115', - children: null, - }, - { - label: '鍏潯闀�', - value: '469005116', - children: null, - }, - { - label: '鍥借惀鍗楅槼鍐滃満', - value: '469005401', - children: null, - }, - { - label: '鍥借惀缃楄眴鍐滃満', - value: '469005402', - children: null, - }, - ], - }, - { - label: '涓囧畞甯�', - value: '469006', - children: [ - { - label: '涓囧煄闀�', - value: '469006100', - children: null, - }, - { - label: '榫欐粴闀�', - value: '469006101', - children: null, - }, - { - label: '鍜屼箰闀�', - value: '469006102', - children: null, - }, - { - label: '鍚庡畨闀�', - value: '469006103', - children: null, - }, - { - label: '澶ц寕闀�', - value: '469006104', - children: null, - }, - { - label: '涓滄境闀�', - value: '469006105', - children: null, - }, - { - label: '绀肩邯闀�', - value: '469006106', - children: null, - }, - { - label: '闀夸赴闀�', - value: '469006107', - children: null, - }, - { - label: '灞辨牴闀�', - value: '469006108', - children: null, - }, - { - label: '鍖楀ぇ闀�', - value: '469006109', - children: null, - }, - { - label: '鍗楁ˉ闀�', - value: '469006110', - children: null, - }, - { - label: '涓夋洿缃楅晣', - value: '469006111', - children: null, - }, - { - label: '鍥借惀涓滃叴鍐滃満', - value: '469006400', - children: null, - }, - { - label: '鍏撮殕鍗庝鲸鍐滃満', - value: '469006500', - children: null, - }, - { - label: '鍦版柟鍥借惀鍏繛鏋楀満', - value: '469006501', - children: null, - }, - { - label: '涓滃箔鍐滃満', - value: '469006951', - children: null, - }, - ], - }, - { - label: '涓滄柟甯�', - value: '469007', - children: [ - { - label: '鍏墍闀�', - value: '469007100', - children: null, - }, - { - label: '涓滄渤闀�', - value: '469007101', - children: null, - }, - { - label: '澶х敯闀�', - value: '469007102', - children: null, - }, - { - label: '鎰熷煄闀�', - value: '469007103', - children: null, - }, - { - label: '鏉挎ˉ闀�', - value: '469007104', - children: null, - }, - { - label: '涓夊闀�', - value: '469007105', - children: null, - }, - { - label: '鍥涙洿闀�', - value: '469007106', - children: null, - }, - { - label: '鏂伴緳闀�', - value: '469007107', - children: null, - }, - { - label: '澶╁畨涔�', - value: '469007200', - children: null, - }, - { - label: '姹熻竟涔�', - value: '469007201', - children: null, - }, - { - label: '鍥借惀骞垮潩鍐滃満', - value: '469007400', - children: null, - }, - { - label: '涓滄柟鍗庝鲸鍐滃満', - value: '469007500', - children: null, - }, - { - label: '涓滄柟鍐滃満', - value: '469007950', - children: null, - }, - ], - }, - { - label: '瀹氬畨鍘�', - value: '469021', - children: [ - { - label: '瀹氬煄闀�', - value: '469021100', - children: null, - }, - { - label: '鏂扮闀�', - value: '469021101', - children: null, - }, - { - label: '榫欐箹闀�', - value: '469021102', - children: null, - }, - { - label: '榛勭闀�', - value: '469021103', - children: null, - }, - { - label: '闆烽福闀�', - value: '469021104', - children: null, - }, - { - label: '榫欓棬闀�', - value: '469021105', - children: null, - }, - { - label: '榫欐渤闀�', - value: '469021106', - children: null, - }, - { - label: '宀彛闀�', - value: '469021107', - children: null, - }, - { - label: '缈版灄闀�', - value: '469021108', - children: null, - }, - { - label: '瀵屾枃闀�', - value: '469021109', - children: null, - }, - { - label: '鍥借惀涓憺鍐滃満', - value: '469021400', - children: null, - }, - { - label: '鍥借惀鍗楁捣鍐滃満', - value: '469021401', - children: null, - }, - { - label: '鍥借惀閲戦浮宀啘鍦�', - value: '469021402', - children: null, - }, - { - label: '鍥借惀涓滃崌鍐滃満', - value: '469021403', - children: null, - }, - ], - }, - { - label: '灞槍鍘�', - value: '469022', - children: [ - { - label: '灞煄闀�', - value: '469022100', - children: null, - }, - { - label: '鏂板叴闀�', - value: '469022101', - children: null, - }, - { - label: '鏋湪闀�', - value: '469022102', - children: null, - }, - { - label: '涔屽潯闀�', - value: '469022103', - children: null, - }, - { - label: '鍗楀悤闀�', - value: '469022104', - children: null, - }, - { - label: '鍗楀潳闀�', - value: '469022105', - children: null, - }, - { - label: '鍧″績闀�', - value: '469022106', - children: null, - }, - { - label: '瑗挎槍闀�', - value: '469022107', - children: null, - }, - { - label: '鍥借惀涓憺鍐滃満', - value: '469022400', - children: null, - }, - { - label: '鍥借惀涓潳鍐滃満', - value: '469022401', - children: null, - }, - { - label: '鍥借惀涓缓鍐滃満', - value: '469022950', - children: null, - }, - { - label: '鏅ㄦ槦鍐滃満', - value: '469022951', - children: null, - }, - { - label: '榛勫箔鍐滃満', - value: '469022952', - children: null, - }, - { - label: '骞块潚鍐滃満', - value: '469022954', - children: null, - }, - ], - }, - { - label: '婢勮繄鍘�', - value: '469023', - children: [ - { - label: '閲戞睙闀�', - value: '469023100', - children: null, - }, - { - label: '鑰佸煄闀�', - value: '469023101', - children: null, - }, - { - label: '鐟炴邯闀�', - value: '469023102', - children: null, - }, - { - label: '姘稿彂闀�', - value: '469023103', - children: null, - }, - { - label: '鍔犱箰闀�', - value: '469023104', - children: null, - }, - { - label: '鏂囧剴闀�', - value: '469023105', - children: null, - }, - { - label: '涓叴闀�', - value: '469023106', - children: null, - }, - { - label: '浠佸叴闀�', - value: '469023107', - children: null, - }, - { - label: '绂忓北闀�', - value: '469023108', - children: null, - }, - { - label: '妗ュご闀�', - value: '469023109', - children: null, - }, - { - label: '澶т赴闀�', - value: '469023110', - children: null, - }, - { - label: '鍥借惀绾㈠厜鍐滃満', - value: '469023400', - children: null, - }, - { - label: '绾㈠矖鍐滃満', - value: '469023401', - children: null, - }, - { - label: '鍥借惀瑗胯揪鍐滃満', - value: '469023402', - children: null, - }, - { - label: '鍥借惀閲戝畨鍐滃満', - value: '469023405', - children: null, - }, - ], - }, - { - label: '涓撮珮鍘�', - value: '469024', - children: [ - { - label: '涓村煄闀�', - value: '469024100', - children: null, - }, - { - label: '娉㈣幉闀�', - value: '469024101', - children: null, - }, - { - label: '涓滆嫳闀�', - value: '469024102', - children: null, - }, - { - label: '鍗氬帤闀�', - value: '469024103', - children: null, - }, - { - label: '鐨囨闀�', - value: '469024104', - children: null, - }, - { - label: '澶氭枃闀�', - value: '469024105', - children: null, - }, - { - label: '鍜岃垗闀�', - value: '469024106', - children: null, - }, - { - label: '鍗楀疂闀�', - value: '469024107', - children: null, - }, - { - label: '鏂扮泩闀�', - value: '469024108', - children: null, - }, - { - label: '璋冩ゼ闀�', - value: '469024109', - children: null, - }, - { - label: '鍥借惀绾㈠崕鍐滃満', - value: '469024400', - children: null, - }, - { - label: '鍥借惀鍔犳潵鍐滃満', - value: '469024401', - children: null, - }, - ], - }, - { - label: '鐧芥矙榛庢棌鑷不鍘�', - value: '469025', - children: [ - { - label: '鐗欏弶闀�', - value: '469025100', - children: null, - }, - { - label: '涓冨潑闀�', - value: '469025101', - children: null, - }, - { - label: '閭︽邯闀�', - value: '469025102', - children: null, - }, - { - label: '鎵撳畨闀�', - value: '469025103', - children: null, - }, - { - label: '缁嗘按涔�', - value: '469025200', - children: null, - }, - { - label: '鍏冮棬涔�', - value: '469025201', - children: null, - }, - { - label: '鍗楀紑涔�', - value: '469025202', - children: null, - }, - { - label: '闃滈緳涔�', - value: '469025203', - children: null, - }, - { - label: '闈掓澗涔�', - value: '469025204', - children: null, - }, - { - label: '閲戞尝涔�', - value: '469025205', - children: null, - }, - { - label: '鑽i偊涔�', - value: '469025206', - children: null, - }, - { - label: '鍥借惀鐧芥矙鍐滃満', - value: '469025401', - children: null, - }, - { - label: '鍥借惀榫欐睙鍐滃満', - value: '469025404', - children: null, - }, - { - label: '鍗槦鍐滃満', - value: '469025950', - children: null, - }, - ], - }, - { - label: '鏄屾睙榛庢棌鑷不鍘�', - value: '469026', - children: [ - { - label: '鐭崇闀�', - value: '469026100', - children: null, - }, - { - label: '鍙夋渤闀�', - value: '469026101', - children: null, - }, - { - label: '鍗佹湀鐢伴晣', - value: '469026102', - children: null, - }, - { - label: '涔岀儓闀�', - value: '469026103', - children: null, - }, - { - label: '鏄屽寲闀�', - value: '469026104', - children: null, - }, - { - label: '娴峰熬闀�', - value: '469026105', - children: null, - }, - { - label: '涓冨弶闀�', - value: '469026106', - children: null, - }, - { - label: '鐜嬩笅涔�', - value: '469026200', - children: null, - }, - { - label: '鍥借惀绾㈡灄鍐滃満', - value: '469026401', - children: null, - }, - { - label: '鍥借惀闇哥帇宀灄鍦�', - value: '469026500', - children: null, - }, - ], - }, - { - label: '涔愪笢榛庢棌鑷不鍘�', - value: '469027', - children: [ - { - label: '鎶辩敱闀�', - value: '469027100', - children: null, - }, - { - label: '涓囧啿闀�', - value: '469027101', - children: null, - }, - { - label: '澶у畨闀�', - value: '469027102', - children: null, - }, - { - label: '蹇椾徊闀�', - value: '469027103', - children: null, - }, - { - label: '鍗冨闀�', - value: '469027104', - children: null, - }, - { - label: '涔濇墍闀�', - value: '469027105', - children: null, - }, - { - label: '鍒╁浗闀�', - value: '469027106', - children: null, - }, - { - label: '榛勬祦闀�', - value: '469027107', - children: null, - }, - { - label: '浣涚綏闀�', - value: '469027108', - children: null, - }, - { - label: '灏栧嘲闀�', - value: '469027109', - children: null, - }, - { - label: '鑾烘瓕娴烽晣', - value: '469027110', - children: null, - }, - { - label: '鍥借惀灞辫崳鍐滃満', - value: '469027401', - children: null, - }, - { - label: '鍥借惀涔愬厜鍐滃満', - value: '469027402', - children: null, - }, - { - label: '鍥借惀淇濆浗鍐滃満', - value: '469027405', - children: null, - }, - { - label: '绂忔姤鍐滃満', - value: '469027951', - children: null, - }, - ], - }, - { - label: '闄垫按榛庢棌鑷不鍘�', - value: '469028', - children: [ - { - label: '妞版灄闀�', - value: '469028100', - children: null, - }, - { - label: '鍏夊潯闀�', - value: '469028101', - children: null, - }, - { - label: '涓夋墠闀�', - value: '469028102', - children: null, - }, - { - label: '鑻卞窞闀�', - value: '469028103', - children: null, - }, - { - label: '闅嗗箍闀�', - value: '469028104', - children: null, - }, - { - label: '鏂囩綏闀�', - value: '469028105', - children: null, - }, - { - label: '鏈彿闀�', - value: '469028106', - children: null, - }, - { - label: '鏂版潙闀�', - value: '469028107', - children: null, - }, - { - label: '榛庡畨闀�', - value: '469028108', - children: null, - }, - { - label: '鎻愯挋涔�', - value: '469028200', - children: null, - }, - { - label: '缇よ嫳涔�', - value: '469028201', - children: null, - }, - { - label: '宀棬鍐滃満', - value: '469028400', - children: null, - }, - { - label: '鍥借惀鍗楀钩鍐滃満', - value: '469028401', - children: null, - }, - ], - }, - { - label: '淇濅涵榛庢棌鑻楁棌鑷不鍘�', - value: '469029', - children: [ - { - label: '淇濆煄闀�', - value: '469029100', - children: null, - }, - { - label: '浠�鐜查晣', - value: '469029101', - children: null, - }, - { - label: '鍔犺寕闀�', - value: '469029102', - children: null, - }, - { - label: '鍝嶆按闀�', - value: '469029103', - children: null, - }, - { - label: '鏂版斂闀�', - value: '469029104', - children: null, - }, - { - label: '涓夐亾闀�', - value: '469029105', - children: null, - }, - { - label: '鍏紦涔�', - value: '469029200', - children: null, - }, - { - label: '鍗楁灄涔�', - value: '469029201', - children: null, - }, - { - label: '姣涙劅涔�', - value: '469029202', - children: null, - }, - { - label: '鏂版槦鍐滃満', - value: '469029401', - children: null, - }, - { - label: '娴峰崡淇濅涵鐑甫浣滅墿鐮旂┒鎵�', - value: '469029402', - children: null, - }, - { - label: '鍥借惀閲戞睙鍐滃満', - value: '469029403', - children: null, - }, - { - label: '鍗楄寕鍐滃満', - value: '469029950', - children: null, - }, - { - label: '閫氫粈鑼跺満', - value: '469029952', - children: null, - }, - ], - }, - { - label: '鐞间腑榛庢棌鑻楁棌鑷不鍘�', - value: '469030', - children: [ - { - label: '钀ユ牴闀�', - value: '469030100', - children: null, - }, - { - label: '婀惧箔闀�', - value: '469030101', - children: null, - }, - { - label: '榛庢瘝灞遍晣', - value: '469030102', - children: null, - }, - { - label: '鍜屽钩闀�', - value: '469030103', - children: null, - }, - { - label: '闀垮緛闀�', - value: '469030104', - children: null, - }, - { - label: '绾㈡瘺闀�', - value: '469030105', - children: null, - }, - { - label: '涓钩闀�', - value: '469030106', - children: null, - }, - { - label: '鍚婄綏灞变埂', - value: '469030200', - children: null, - }, - { - label: '涓婂畨涔�', - value: '469030201', - children: null, - }, - { - label: '浠�杩愪埂', - value: '469030202', - children: null, - }, - { - label: '闃虫睙鍐滃満', - value: '469030402', - children: null, - }, - { - label: '涔岀煶鍐滃満', - value: '469030403', - children: null, - }, - { - label: '宀ご鑼跺満', - value: '469030950', - children: null, - }, - { - label: '鍗楁柟鍐滃満', - value: '469030951', - children: null, - }, - ], - }, - ], - }, - { - label: '閲嶅簡甯�', - value: '500000', - children: [ - { - label: '閲嶅簡甯�', - value: '500100', - children: [ - { - label: '涓囧窞鍖�', - value: '500101', - children: null, - }, - { - label: '娑櫟鍖�', - value: '500102', - children: null, - }, - { - label: '娓濅腑鍖�', - value: '500103', - children: null, - }, - { - label: '澶ф浮鍙e尯', - value: '500104', - children: null, - }, - { - label: '姹熷寳鍖�', - value: '500105', - children: null, - }, - { - label: '娌欏潽鍧濆尯', - value: '500106', - children: null, - }, - { - label: '涔濋緳鍧″尯', - value: '500107', - children: null, - }, - { - label: '鍗楀哺鍖�', - value: '500108', - children: null, - }, - { - label: '鍖楃鍖�', - value: '500109', - children: null, - }, - { - label: '缍︽睙鍖�', - value: '500110', - children: null, - }, - { - label: '澶ц冻鍖�', - value: '500111', - children: null, - }, - { - label: '娓濆寳鍖�', - value: '500112', - children: null, - }, - { - label: '宸村崡鍖�', - value: '500113', - children: null, - }, - { - label: '榛旀睙鍖�', - value: '500114', - children: null, - }, - { - label: '闀垮鍖�', - value: '500115', - children: null, - }, - { - label: '姹熸触鍖�', - value: '500116', - children: null, - }, - { - label: '鍚堝窛鍖�', - value: '500117', - children: null, - }, - { - label: '姘稿窛鍖�', - value: '500118', - children: null, - }, - { - label: '鍗楀窛鍖�', - value: '500119', - children: null, - }, - { - label: '鐠у北鍖�', - value: '500120', - children: null, - }, - { - label: '閾滄鍖�', - value: '500151', - children: null, - }, - { - label: '娼煎崡鍖�', - value: '500152', - children: null, - }, - { - label: '鑽f槍鍖�', - value: '500153', - children: null, - }, - { - label: '寮�宸炲尯', - value: '500154', - children: null, - }, - { - label: '姊佸钩鍖�', - value: '500155', - children: null, - }, - { - label: '姝﹂殕鍖�', - value: '500156', - children: null, - }, - { - label: '鍩庡彛鍘�', - value: '500229', - children: null, - }, - { - label: '涓伴兘鍘�', - value: '500230', - children: null, - }, - { - label: '鍨睙鍘�', - value: '500231', - children: null, - }, - { - label: '蹇犲幙', - value: '500233', - children: null, - }, - { - label: '浜戦槼鍘�', - value: '500235', - children: null, - }, - { - label: '濂夎妭鍘�', - value: '500236', - children: null, - }, - { - label: '宸北鍘�', - value: '500237', - children: null, - }, - { - label: '宸邯鍘�', - value: '500238', - children: null, - }, - { - label: '鐭虫煴鍦熷鏃忚嚜娌诲幙', - value: '500240', - children: null, - }, - { - label: '绉�灞卞湡瀹舵棌鑻楁棌鑷不鍘�', - value: '500241', - children: null, - }, - { - label: '閰夐槼鍦熷鏃忚嫍鏃忚嚜娌诲幙', - value: '500242', - children: null, - }, - { - label: '褰按鑻楁棌鍦熷鏃忚嚜娌诲幙', - value: '500243', - children: null, - }, - ], - }, - ], - }, - { - label: '鍥涘窛鐪�', - value: '510000', - children: [ - { - label: '鎴愰兘甯�', - value: '510100', - children: [ - { - label: '閿︽睙鍖�', - value: '510104', - children: null, - }, - { - label: '闈掔緤鍖�', - value: '510105', - children: null, - }, - { - label: '閲戠墰鍖�', - value: '510106', - children: null, - }, - { - label: '姝︿警鍖�', - value: '510107', - children: null, - }, - { - label: '鎴愬崕鍖�', - value: '510108', - children: null, - }, - { - label: '榫欐硥椹垮尯', - value: '510112', - children: null, - }, - { - label: '闈掔櫧姹熷尯', - value: '510113', - children: null, - }, - { - label: '鏂伴兘鍖�', - value: '510114', - children: null, - }, - { - label: '娓╂睙鍖�', - value: '510115', - children: null, - }, - { - label: '鍙屾祦鍖�', - value: '510116', - children: null, - }, - { - label: '閮兘鍖�', - value: '510117', - children: null, - }, - { - label: '閲戝爞鍘�', - value: '510121', - children: null, - }, - { - label: '澶ч倯鍘�', - value: '510129', - children: null, - }, - { - label: '钂叉睙鍘�', - value: '510131', - children: null, - }, - { - label: '鏂版触鍘�', - value: '510132', - children: null, - }, - { - label: '閮芥睙鍫板競', - value: '510181', - children: null, - }, - { - label: '褰窞甯�', - value: '510182', - children: null, - }, - { - label: '閭涘磧甯�', - value: '510183', - children: null, - }, - { - label: '宕囧窞甯�', - value: '510184', - children: null, - }, - { - label: '绠�闃冲競', - value: '510185', - children: null, - }, - ], - }, - { - label: '鑷础甯�', - value: '510300', - children: [ - { - label: '鑷祦浜曞尯', - value: '510302', - children: null, - }, - { - label: '璐′簳鍖�', - value: '510303', - children: null, - }, - { - label: '澶у畨鍖�', - value: '510304', - children: null, - }, - { - label: '娌挎哗鍖�', - value: '510311', - children: null, - }, - { - label: '鑽e幙', - value: '510321', - children: null, - }, - { - label: '瀵岄『鍘�', - value: '510322', - children: null, - }, - ], - }, - { - label: '鏀�鏋濊姳甯�', - value: '510400', - children: [ - { - label: '涓滃尯', - value: '510402', - children: null, - }, - { - label: '瑗垮尯', - value: '510403', - children: null, - }, - { - label: '浠佸拰鍖�', - value: '510411', - children: null, - }, - { - label: '绫虫槗鍘�', - value: '510421', - children: null, - }, - { - label: '鐩愯竟鍘�', - value: '510422', - children: null, - }, - ], - }, - { - label: '娉稿窞甯�', - value: '510500', - children: [ - { - label: '姹熼槼鍖�', - value: '510502', - children: null, - }, - { - label: '绾虫邯鍖�', - value: '510503', - children: null, - }, - { - label: '榫欓┈娼尯', - value: '510504', - children: null, - }, - { - label: '娉稿幙', - value: '510521', - children: null, - }, - { - label: '鍚堟睙鍘�', - value: '510522', - children: null, - }, - { - label: '鍙欐案鍘�', - value: '510524', - children: null, - }, - { - label: '鍙よ敽鍘�', - value: '510525', - children: null, - }, - ], - }, - { - label: '寰烽槼甯�', - value: '510600', - children: [ - { - label: '鏃岄槼鍖�', - value: '510603', - children: null, - }, - { - label: '缃楁睙鍖�', - value: '510604', - children: null, - }, - { - label: '涓睙鍘�', - value: '510623', - children: null, - }, - { - label: '骞挎眽甯�', - value: '510681', - children: null, - }, - { - label: '浠�閭″競', - value: '510682', - children: null, - }, - { - label: '缁电甯�', - value: '510683', - children: null, - }, - ], - }, - { - label: '缁甸槼甯�', - value: '510700', - children: [ - { - label: '娑煄鍖�', - value: '510703', - children: null, - }, - { - label: '娓镐粰鍖�', - value: '510704', - children: null, - }, - { - label: '瀹夊窞鍖�', - value: '510705', - children: null, - }, - { - label: '涓夊彴鍘�', - value: '510722', - children: null, - }, - { - label: '鐩愪涵鍘�', - value: '510723', - children: null, - }, - { - label: '姊撴郊鍘�', - value: '510725', - children: null, - }, - { - label: '鍖楀窛缇屾棌鑷不鍘�', - value: '510726', - children: null, - }, - { - label: '骞虫鍘�', - value: '510727', - children: null, - }, - { - label: '姹熸补甯�', - value: '510781', - children: null, - }, - ], - }, - { - label: '骞垮厓甯�', - value: '510800', - children: [ - { - label: '鍒╁窞鍖�', - value: '510802', - children: null, - }, - { - label: '鏄寲鍖�', - value: '510811', - children: null, - }, - { - label: '鏈濆ぉ鍖�', - value: '510812', - children: null, - }, - { - label: '鏃鸿媿鍘�', - value: '510821', - children: null, - }, - { - label: '闈掑窛鍘�', - value: '510822', - children: null, - }, - { - label: '鍓戦榿鍘�', - value: '510823', - children: null, - }, - { - label: '鑻嶆邯鍘�', - value: '510824', - children: null, - }, - ], - }, - { - label: '閬傚畞甯�', - value: '510900', - children: [ - { - label: '鑸瑰北鍖�', - value: '510903', - children: null, - }, - { - label: '瀹夊眳鍖�', - value: '510904', - children: null, - }, - { - label: '钃邯鍘�', - value: '510921', - children: null, - }, - { - label: '灏勬椽鍘�', - value: '510922', - children: null, - }, - { - label: '澶ц嫳鍘�', - value: '510923', - children: null, - }, - ], - }, - { - label: '鍐呮睙甯�', - value: '511000', - children: [ - { - label: '甯備腑鍖�', - value: '511002', - children: null, - }, - { - label: '涓滃叴鍖�', - value: '511011', - children: null, - }, - { - label: '濞佽繙鍘�', - value: '511024', - children: null, - }, - { - label: '璧勪腑鍘�', - value: '511025', - children: null, - }, - { - label: '闅嗘槍甯�', - value: '511083', - children: null, - }, - ], - }, - { - label: '涔愬北甯�', - value: '511100', - children: [ - { - label: '甯備腑鍖�', - value: '511102', - children: null, - }, - { - label: '娌欐咕鍖�', - value: '511111', - children: null, - }, - { - label: '浜旈�氭ˉ鍖�', - value: '511112', - children: null, - }, - { - label: '閲戝彛娌冲尯', - value: '511113', - children: null, - }, - { - label: '鐘嶄负鍘�', - value: '511123', - children: null, - }, - { - label: '浜曠爺鍘�', - value: '511124', - children: null, - }, - { - label: '澶规睙鍘�', - value: '511126', - children: null, - }, - { - label: '娌愬窛鍘�', - value: '511129', - children: null, - }, - { - label: '宄ㄨ竟褰濇棌鑷不鍘�', - value: '511132', - children: null, - }, - { - label: '椹竟褰濇棌鑷不鍘�', - value: '511133', - children: null, - }, - { - label: '宄ㄧ湁灞卞競', - value: '511181', - children: null, - }, - ], - }, - { - label: '鍗楀厖甯�', - value: '511300', - children: [ - { - label: '椤哄簡鍖�', - value: '511302', - children: null, - }, - { - label: '楂樺潽鍖�', - value: '511303', - children: null, - }, - { - label: '鍢夐櫟鍖�', - value: '511304', - children: null, - }, - { - label: '鍗楅儴鍘�', - value: '511321', - children: null, - }, - { - label: '钀ュ北鍘�', - value: '511322', - children: null, - }, - { - label: '钃畨鍘�', - value: '511323', - children: null, - }, - { - label: '浠檱鍘�', - value: '511324', - children: null, - }, - { - label: '瑗垮厖鍘�', - value: '511325', - children: null, - }, - { - label: '闃嗕腑甯�', - value: '511381', - children: null, - }, - ], - }, - { - label: '鐪夊北甯�', - value: '511400', - children: [ - { - label: '涓滃潯鍖�', - value: '511402', - children: null, - }, - { - label: '褰北鍖�', - value: '511403', - children: null, - }, - { - label: '浠佸鍘�', - value: '511421', - children: null, - }, - { - label: '娲泤鍘�', - value: '511423', - children: null, - }, - { - label: '涓规1鍘�', - value: '511424', - children: null, - }, - { - label: '闈掔鍘�', - value: '511425', - children: null, - }, - ], - }, - { - label: '瀹滃甯�', - value: '511500', - children: [ - { - label: '缈犲睆鍖�', - value: '511502', - children: null, - }, - { - label: '鍗楁邯鍖�', - value: '511503', - children: null, - }, - { - label: '鍙欏窞鍖�', - value: '511504', - children: null, - }, - { - label: '姹熷畨鍘�', - value: '511523', - children: null, - }, - { - label: '闀垮畞鍘�', - value: '511524', - children: null, - }, - { - label: '楂樺幙', - value: '511525', - children: null, - }, - { - label: '鐝欏幙', - value: '511526', - children: null, - }, - { - label: '绛犺繛鍘�', - value: '511527', - children: null, - }, - { - label: '鍏存枃鍘�', - value: '511528', - children: null, - }, - { - label: '灞忓北鍘�', - value: '511529', - children: null, - }, - ], - }, - { - label: '骞垮畨甯�', - value: '511600', - children: [ - { - label: '骞垮畨鍖�', - value: '511602', - children: null, - }, - { - label: '鍓嶉攱鍖�', - value: '511603', - children: null, - }, - { - label: '宀虫睜鍘�', - value: '511621', - children: null, - }, - { - label: '姝﹁儨鍘�', - value: '511622', - children: null, - }, - { - label: '閭绘按鍘�', - value: '511623', - children: null, - }, - { - label: '鍗庤摜甯�', - value: '511681', - children: null, - }, - ], - }, - { - label: '杈惧窞甯�', - value: '511700', - children: [ - { - label: '閫氬窛鍖�', - value: '511702', - children: null, - }, - { - label: '杈惧窛鍖�', - value: '511703', - children: null, - }, - { - label: '瀹f眽鍘�', - value: '511722', - children: null, - }, - { - label: '寮�姹熷幙', - value: '511723', - children: null, - }, - { - label: '澶х鍘�', - value: '511724', - children: null, - }, - { - label: '娓犲幙', - value: '511725', - children: null, - }, - { - label: '涓囨簮甯�', - value: '511781', - children: null, - }, - ], - }, - { - label: '闆呭畨甯�', - value: '511800', - children: [ - { - label: '闆ㄥ煄鍖�', - value: '511802', - children: null, - }, - { - label: '鍚嶅北鍖�', - value: '511803', - children: null, - }, - { - label: '鑽ョ粡鍘�', - value: '511822', - children: null, - }, - { - label: '姹夋簮鍘�', - value: '511823', - children: null, - }, - { - label: '鐭虫鍘�', - value: '511824', - children: null, - }, - { - label: '澶╁叏鍘�', - value: '511825', - children: null, - }, - { - label: '鑺﹀北鍘�', - value: '511826', - children: null, - }, - { - label: '瀹濆叴鍘�', - value: '511827', - children: null, - }, - ], - }, - { - label: '宸翠腑甯�', - value: '511900', - children: [ - { - label: '宸村窞鍖�', - value: '511902', - children: null, - }, - { - label: '鎭╅槼鍖�', - value: '511903', - children: null, - }, - { - label: '閫氭睙鍘�', - value: '511921', - children: null, - }, - { - label: '鍗楁睙鍘�', - value: '511922', - children: null, - }, - { - label: '骞虫槍鍘�', - value: '511923', - children: null, - }, - ], - }, - { - label: '璧勯槼甯�', - value: '512000', - children: [ - { - label: '闆佹睙鍖�', - value: '512002', - children: null, - }, - { - label: '瀹夊渤鍘�', - value: '512021', - children: null, - }, - { - label: '涔愯嚦鍘�', - value: '512022', - children: null, - }, - ], - }, - { - label: '闃垮潩钘忔棌缇屾棌鑷不宸�', - value: '513200', - children: [ - { - label: '椹皵搴峰競', - value: '513201', - children: null, - }, - { - label: '姹跺窛鍘�', - value: '513221', - children: null, - }, - { - label: '鐞嗗幙', - value: '513222', - children: null, - }, - { - label: '鑼傚幙', - value: '513223', - children: null, - }, - { - label: '鏉炬綐鍘�', - value: '513224', - children: null, - }, - { - label: '涔濆娌熷幙', - value: '513225', - children: null, - }, - { - label: '閲戝窛鍘�', - value: '513226', - children: null, - }, - { - label: '灏忛噾鍘�', - value: '513227', - children: null, - }, - { - label: '榛戞按鍘�', - value: '513228', - children: null, - }, - { - label: '澹ゅ鍘�', - value: '513230', - children: null, - }, - { - label: '闃垮潩鍘�', - value: '513231', - children: null, - }, - { - label: '鑻ュ皵鐩栧幙', - value: '513232', - children: null, - }, - { - label: '绾㈠師鍘�', - value: '513233', - children: null, - }, - ], - }, - { - label: '鐢樺瓬钘忔棌鑷不宸�', - value: '513300', - children: [ - { - label: '搴峰畾甯�', - value: '513301', - children: null, - }, - { - label: '娉稿畾鍘�', - value: '513322', - children: null, - }, - { - label: '涓瑰反鍘�', - value: '513323', - children: null, - }, - { - label: '涔濋緳鍘�', - value: '513324', - children: null, - }, - { - label: '闆呮睙鍘�', - value: '513325', - children: null, - }, - { - label: '閬撳瓪鍘�', - value: '513326', - children: null, - }, - { - label: '鐐夐湇鍘�', - value: '513327', - children: null, - }, - { - label: '鐢樺瓬鍘�', - value: '513328', - children: null, - }, - { - label: '鏂伴緳鍘�', - value: '513329', - children: null, - }, - { - label: '寰锋牸鍘�', - value: '513330', - children: null, - }, - { - label: '鐧界帀鍘�', - value: '513331', - children: null, - }, - { - label: '鐭虫笭鍘�', - value: '513332', - children: null, - }, - { - label: '鑹茶揪鍘�', - value: '513333', - children: null, - }, - { - label: '鐞嗗鍘�', - value: '513334', - children: null, - }, - { - label: '宸村鍘�', - value: '513335', - children: null, - }, - { - label: '涔″煄鍘�', - value: '513336', - children: null, - }, - { - label: '绋诲煄鍘�', - value: '513337', - children: null, - }, - { - label: '寰楄崳鍘�', - value: '513338', - children: null, - }, - ], - }, - { - label: '鍑夊北褰濇棌鑷不宸�', - value: '513400', - children: [ - { - label: '瑗挎槍甯�', - value: '513401', - children: null, - }, - { - label: '鏈ㄩ噷钘忔棌鑷不鍘�', - value: '513422', - children: null, - }, - { - label: '鐩愭簮鍘�', - value: '513423', - children: null, - }, - { - label: '寰锋槍鍘�', - value: '513424', - children: null, - }, - { - label: '浼氱悊鍘�', - value: '513425', - children: null, - }, - { - label: '浼氫笢鍘�', - value: '513426', - children: null, - }, - { - label: '瀹佸崡鍘�', - value: '513427', - children: null, - }, - { - label: '鏅牸鍘�', - value: '513428', - children: null, - }, - { - label: '甯冩嫋鍘�', - value: '513429', - children: null, - }, - { - label: '閲戦槼鍘�', - value: '513430', - children: null, - }, - { - label: '鏄鍘�', - value: '513431', - children: null, - }, - { - label: '鍠滃痉鍘�', - value: '513432', - children: null, - }, - { - label: '鍐曞畞鍘�', - value: '513433', - children: null, - }, - { - label: '瓒婅タ鍘�', - value: '513434', - children: null, - }, - { - label: '鐢樻礇鍘�', - value: '513435', - children: null, - }, - { - label: '缇庡鍘�', - value: '513436', - children: null, - }, - { - label: '闆锋尝鍘�', - value: '513437', - children: null, - }, - ], - }, - ], - }, - { - label: '璐靛窞鐪�', - value: '520000', - children: [ - { - label: '璐甸槼甯�', - value: '520100', - children: [ - { - label: '鍗楁槑鍖�', - value: '520102', - children: null, - }, - { - label: '浜戝博鍖�', - value: '520103', - children: null, - }, - { - label: '鑺辨邯鍖�', - value: '520111', - children: null, - }, - { - label: '涔屽綋鍖�', - value: '520112', - children: null, - }, - { - label: '鐧戒簯鍖�', - value: '520113', - children: null, - }, - { - label: '瑙傚北婀栧尯', - value: '520115', - children: null, - }, - { - label: '寮�闃冲幙', - value: '520121', - children: null, - }, - { - label: '鎭兘鍘�', - value: '520122', - children: null, - }, - { - label: '淇枃鍘�', - value: '520123', - children: null, - }, - { - label: '娓呴晣甯�', - value: '520181', - children: null, - }, - ], - }, - { - label: '鍏洏姘村競', - value: '520200', - children: [ - { - label: '閽熷北鍖�', - value: '520201', - children: null, - }, - { - label: '鍏灊鐗瑰尯', - value: '520203', - children: null, - }, - { - label: '姘村煄鍘�', - value: '520221', - children: null, - }, - { - label: '鐩樺窞甯�', - value: '520281', - children: null, - }, - ], - }, - { - label: '閬典箟甯�', - value: '520300', - children: [ - { - label: '绾㈣姳宀楀尯', - value: '520302', - children: null, - }, - { - label: '姹囧窛鍖�', - value: '520303', - children: null, - }, - { - label: '鎾窞鍖�', - value: '520304', - children: null, - }, - { - label: '妗愭鍘�', - value: '520322', - children: null, - }, - { - label: '缁ラ槼鍘�', - value: '520323', - children: null, - }, - { - label: '姝e畨鍘�', - value: '520324', - children: null, - }, - { - label: '閬撶湡浠′浆鏃忚嫍鏃忚嚜娌诲幙', - value: '520325', - children: null, - }, - { - label: '鍔″窛浠′浆鏃忚嫍鏃忚嚜娌诲幙', - value: '520326', - children: null, - }, - { - label: '鍑ゅ唸鍘�', - value: '520327', - children: null, - }, - { - label: '婀勬江鍘�', - value: '520328', - children: null, - }, - { - label: '浣欏簡鍘�', - value: '520329', - children: null, - }, - { - label: '涔犳按鍘�', - value: '520330', - children: null, - }, - { - label: '璧ゆ按甯�', - value: '520381', - children: null, - }, - { - label: '浠佹��甯�', - value: '520382', - children: null, - }, - ], - }, - { - label: '瀹夐『甯�', - value: '520400', - children: [ - { - label: '瑗跨鍖�', - value: '520402', - children: null, - }, - { - label: '骞冲潩鍖�', - value: '520403', - children: null, - }, - { - label: '鏅畾鍘�', - value: '520422', - children: null, - }, - { - label: '闀囧畞甯冧緷鏃忚嫍鏃忚嚜娌诲幙', - value: '520423', - children: null, - }, - { - label: '鍏冲箔甯冧緷鏃忚嫍鏃忚嚜娌诲幙', - value: '520424', - children: null, - }, - { - label: '绱簯鑻楁棌甯冧緷鏃忚嚜娌诲幙', - value: '520425', - children: null, - }, - ], - }, - { - label: '姣曡妭甯�', - value: '520500', - children: [ - { - label: '涓冩槦鍏冲尯', - value: '520502', - children: null, - }, - { - label: '澶ф柟鍘�', - value: '520521', - children: null, - }, - { - label: '榛旇タ鍘�', - value: '520522', - children: null, - }, - { - label: '閲戞矙鍘�', - value: '520523', - children: null, - }, - { - label: '缁囬噾鍘�', - value: '520524', - children: null, - }, - { - label: '绾抽泹鍘�', - value: '520525', - children: null, - }, - { - label: '濞佸畞褰濇棌鍥炴棌鑻楁棌鑷不鍘�', - value: '520526', - children: null, - }, - { - label: '璧珷鍘�', - value: '520527', - children: null, - }, - ], - }, - { - label: '閾滀粊甯�', - value: '520600', - children: [ - { - label: '纰ф睙鍖�', - value: '520602', - children: null, - }, - { - label: '涓囧北鍖�', - value: '520603', - children: null, - }, - { - label: '姹熷彛鍘�', - value: '520621', - children: null, - }, - { - label: '鐜夊睆渚楁棌鑷不鍘�', - value: '520622', - children: null, - }, - { - label: '鐭抽槨鍘�', - value: '520623', - children: null, - }, - { - label: '鎬濆崡鍘�', - value: '520624', - children: null, - }, - { - label: '鍗版睙鍦熷鏃忚嫍鏃忚嚜娌诲幙', - value: '520625', - children: null, - }, - { - label: '寰锋睙鍘�', - value: '520626', - children: null, - }, - { - label: '娌挎渤鍦熷鏃忚嚜娌诲幙', - value: '520627', - children: null, - }, - { - label: '鏉炬鑻楁棌鑷不鍘�', - value: '520628', - children: null, - }, - ], - }, - { - label: '榛旇タ鍗楀竷渚濇棌鑻楁棌鑷不宸�', - value: '522300', - children: [ - { - label: '鍏翠箟甯�', - value: '522301', - children: null, - }, - { - label: '鍏翠粊甯�', - value: '522302', - children: null, - }, - { - label: '鏅畨鍘�', - value: '522323', - children: null, - }, - { - label: '鏅撮殕鍘�', - value: '522324', - children: null, - }, - { - label: '璐炰赴鍘�', - value: '522325', - children: null, - }, - { - label: '鏈涜盁鍘�', - value: '522326', - children: null, - }, - { - label: '鍐屼酣鍘�', - value: '522327', - children: null, - }, - { - label: '瀹夐緳鍘�', - value: '522328', - children: null, - }, - ], - }, - { - label: '榛斾笢鍗楄嫍鏃忎緱鏃忚嚜娌诲窞', - value: '522600', - children: [ - { - label: '鍑噷甯�', - value: '522601', - children: null, - }, - { - label: '榛勫钩鍘�', - value: '522622', - children: null, - }, - { - label: '鏂界鍘�', - value: '522623', - children: null, - }, - { - label: '涓夌鍘�', - value: '522624', - children: null, - }, - { - label: '闀囪繙鍘�', - value: '522625', - children: null, - }, - { - label: '宀戝珐鍘�', - value: '522626', - children: null, - }, - { - label: '澶╂煴鍘�', - value: '522627', - children: null, - }, - { - label: '閿﹀睆鍘�', - value: '522628', - children: null, - }, - { - label: '鍓戞渤鍘�', - value: '522629', - children: null, - }, - { - label: '鍙版睙鍘�', - value: '522630', - children: null, - }, - { - label: '榛庡钩鍘�', - value: '522631', - children: null, - }, - { - label: '姒曟睙鍘�', - value: '522632', - children: null, - }, - { - label: '浠庢睙鍘�', - value: '522633', - children: null, - }, - { - label: '闆峰北鍘�', - value: '522634', - children: null, - }, - { - label: '楹绘睙鍘�', - value: '522635', - children: null, - }, - { - label: '涓瑰鍘�', - value: '522636', - children: null, - }, - ], - }, - { - label: '榛斿崡甯冧緷鏃忚嫍鏃忚嚜娌诲窞', - value: '522700', - children: [ - { - label: '閮藉寑甯�', - value: '522701', - children: null, - }, - { - label: '绂忔硥甯�', - value: '522702', - children: null, - }, - { - label: '鑽旀尝鍘�', - value: '522722', - children: null, - }, - { - label: '璐靛畾鍘�', - value: '522723', - children: null, - }, - { - label: '鐡畨鍘�', - value: '522725', - children: null, - }, - { - label: '鐙北鍘�', - value: '522726', - children: null, - }, - { - label: '骞冲鍘�', - value: '522727', - children: null, - }, - { - label: '缃楃敻鍘�', - value: '522728', - children: null, - }, - { - label: '闀块『鍘�', - value: '522729', - children: null, - }, - { - label: '榫欓噷鍘�', - value: '522730', - children: null, - }, - { - label: '鎯犳按鍘�', - value: '522731', - children: null, - }, - { - label: '涓夐兘姘存棌鑷不鍘�', - value: '522732', - children: null, - }, - ], - }, - ], - }, - { - label: '浜戝崡鐪�', - value: '530000', - children: [ - { - label: '鏄嗘槑甯�', - value: '530100', - children: [ - { - label: '浜斿崕鍖�', - value: '530102', - children: null, - }, - { - label: '鐩橀緳鍖�', - value: '530103', - children: null, - }, - { - label: '瀹樻浮鍖�', - value: '530111', - children: null, - }, - { - label: '瑗垮北鍖�', - value: '530112', - children: null, - }, - { - label: '涓滃窛鍖�', - value: '530113', - children: null, - }, - { - label: '鍛堣础鍖�', - value: '530114', - children: null, - }, - { - label: '鏅嬪畞鍖�', - value: '530115', - children: null, - }, - { - label: '瀵屾皯鍘�', - value: '530124', - children: null, - }, - { - label: '瀹滆壇鍘�', - value: '530125', - children: null, - }, - { - label: '鐭虫灄褰濇棌鑷不鍘�', - value: '530126', - children: null, - }, - { - label: '宓╂槑鍘�', - value: '530127', - children: null, - }, - { - label: '绂勫姖褰濇棌鑻楁棌鑷不鍘�', - value: '530128', - children: null, - }, - { - label: '瀵荤敻鍥炴棌褰濇棌鑷不鍘�', - value: '530129', - children: null, - }, - { - label: '瀹夊畞甯�', - value: '530181', - children: null, - }, - ], - }, - { - label: '鏇查潠甯�', - value: '530300', - children: [ - { - label: '楹掗簾鍖�', - value: '530302', - children: null, - }, - { - label: '娌剧泭鍖�', - value: '530303', - children: null, - }, - { - label: '椹緳鍖�', - value: '530304', - children: null, - }, - { - label: '闄嗚壇鍘�', - value: '530322', - children: null, - }, - { - label: '甯堝畻鍘�', - value: '530323', - children: null, - }, - { - label: '缃楀钩鍘�', - value: '530324', - children: null, - }, - { - label: '瀵屾簮鍘�', - value: '530325', - children: null, - }, - { - label: '浼氭辰鍘�', - value: '530326', - children: null, - }, - { - label: '瀹e▉甯�', - value: '530381', - children: null, - }, - ], - }, - { - label: '鐜夋邯甯�', - value: '530400', - children: [ - { - label: '绾㈠鍖�', - value: '530402', - children: null, - }, - { - label: '姹熷窛鍖�', - value: '530403', - children: null, - }, - { - label: '婢勬睙鍘�', - value: '530422', - children: null, - }, - { - label: '閫氭捣鍘�', - value: '530423', - children: null, - }, - { - label: '鍗庡畞鍘�', - value: '530424', - children: null, - }, - { - label: '鏄撻棬鍘�', - value: '530425', - children: null, - }, - { - label: '宄ㄥ北褰濇棌鑷不鍘�', - value: '530426', - children: null, - }, - { - label: '鏂板钩褰濇棌鍌f棌鑷不鍘�', - value: '530427', - children: null, - }, - { - label: '鍏冩睙鍘�', - value: '530428', - children: null, - }, - ], - }, - { - label: '淇濆北甯�', - value: '530500', - children: [ - { - label: '闅嗛槼鍖�', - value: '530502', - children: null, - }, - { - label: '鏂界敻鍘�', - value: '530521', - children: null, - }, - { - label: '榫欓櫟鍘�', - value: '530523', - children: null, - }, - { - label: '鏄屽畞鍘�', - value: '530524', - children: null, - }, - { - label: '鑵惧啿甯�', - value: '530581', - children: null, - }, - ], - }, - { - label: '鏄�氬競', - value: '530600', - children: [ - { - label: '鏄槼鍖�', - value: '530602', - children: null, - }, - { - label: '椴佺敻鍘�', - value: '530621', - children: null, - }, - { - label: '宸у鍘�', - value: '530622', - children: null, - }, - { - label: '鐩愭触鍘�', - value: '530623', - children: null, - }, - { - label: '澶у叧鍘�', - value: '530624', - children: null, - }, - { - label: '姘稿杽鍘�', - value: '530625', - children: null, - }, - { - label: '缁ユ睙鍘�', - value: '530626', - children: null, - }, - { - label: '闀囬泟鍘�', - value: '530627', - children: null, - }, - { - label: '褰濊壇鍘�', - value: '530628', - children: null, - }, - { - label: '濞佷俊鍘�', - value: '530629', - children: null, - }, - { - label: '姘村瘜甯�', - value: '530681', - children: null, - }, - ], - }, - { - label: '涓芥睙甯�', - value: '530700', - children: [ - { - label: '鍙ゅ煄鍖�', - value: '530702', - children: null, - }, - { - label: '鐜夐緳绾宠タ鏃忚嚜娌诲幙', - value: '530721', - children: null, - }, - { - label: '姘歌儨鍘�', - value: '530722', - children: null, - }, - { - label: '鍗庡潽鍘�', - value: '530723', - children: null, - }, - { - label: '瀹佽挆褰濇棌鑷不鍘�', - value: '530724', - children: null, - }, - ], - }, - { - label: '鏅幢甯�', - value: '530800', - children: [ - { - label: '鎬濊寘鍖�', - value: '530802', - children: null, - }, - { - label: '瀹佹幢鍝堝凹鏃忓綕鏃忚嚜娌诲幙', - value: '530821', - children: null, - }, - { - label: '澧ㄦ睙鍝堝凹鏃忚嚜娌诲幙', - value: '530822', - children: null, - }, - { - label: '鏅笢褰濇棌鑷不鍘�', - value: '530823', - children: null, - }, - { - label: '鏅胺鍌f棌褰濇棌鑷不鍘�', - value: '530824', - children: null, - }, - { - label: '闀囨矃鍘�', - value: '530825', - children: null, - }, - { - label: '姹熷煄鍝堝凹鏃忓綕鏃忚嚜娌诲幙', - value: '530826', - children: null, - }, - { - label: '瀛熻繛鍘�', - value: '530827', - children: null, - }, - { - label: '婢滄钵鎷夌鏃忚嚜娌诲幙', - value: '530828', - children: null, - }, - { - label: '瑗跨洘浣ゆ棌鑷不鍘�', - value: '530829', - children: null, - }, - ], - }, - { - label: '涓存钵甯�', - value: '530900', - children: [ - { - label: '涓寸繑鍖�', - value: '530902', - children: null, - }, - { - label: '鍑ゅ簡鍘�', - value: '530921', - children: null, - }, - { - label: '浜戝幙', - value: '530922', - children: null, - }, - { - label: '姘稿痉鍘�', - value: '530923', - children: null, - }, - { - label: '闀囧悍鍘�', - value: '530924', - children: null, - }, - { - label: '鍙屾睙鍘�', - value: '530925', - children: null, - }, - { - label: '鑰块┈鍌f棌浣ゆ棌鑷不鍘�', - value: '530926', - children: null, - }, - { - label: '娌ф簮浣ゆ棌鑷不鍘�', - value: '530927', - children: null, - }, - ], - }, - { - label: '妤氶泟褰濇棌鑷不宸�', - value: '532300', - children: [ - { - label: '妤氶泟甯�', - value: '532301', - children: null, - }, - { - label: '鍙屾煆鍘�', - value: '532322', - children: null, - }, - { - label: '鐗熷畾鍘�', - value: '532323', - children: null, - }, - { - label: '鍗楀崕鍘�', - value: '532324', - children: null, - }, - { - label: '濮氬畨鍘�', - value: '532325', - children: null, - }, - { - label: '澶у鍘�', - value: '532326', - children: null, - }, - { - label: '姘镐粊鍘�', - value: '532327', - children: null, - }, - { - label: '鍏冭皨鍘�', - value: '532328', - children: null, - }, - { - label: '姝﹀畾鍘�', - value: '532329', - children: null, - }, - { - label: '绂勪赴鍘�', - value: '532331', - children: null, - }, - ], - }, - { - label: '绾㈡渤鍝堝凹鏃忓綕鏃忚嚜娌诲窞', - value: '532500', - children: [ - { - label: '涓棫甯�', - value: '532501', - children: null, - }, - { - label: '寮�杩滃競', - value: '532502', - children: null, - }, - { - label: '钂欒嚜甯�', - value: '532503', - children: null, - }, - { - label: '寮ュ嫆甯�', - value: '532504', - children: null, - }, - { - label: '灞忚竟鑻楁棌鑷不鍘�', - value: '532523', - children: null, - }, - { - label: '寤烘按鍘�', - value: '532524', - children: null, - }, - { - label: '鐭冲睆鍘�', - value: '532525', - children: null, - }, - { - label: '娉歌タ鍘�', - value: '532527', - children: null, - }, - { - label: '鍏冮槼鍘�', - value: '532528', - children: null, - }, - { - label: '绾㈡渤鍘�', - value: '532529', - children: null, - }, - { - label: '閲戝钩鑻楁棌鐟舵棌鍌f棌鑷不鍘�', - value: '532530', - children: null, - }, - { - label: '缁挎槬鍘�', - value: '532531', - children: null, - }, - { - label: '娌冲彛鐟舵棌鑷不鍘�', - value: '532532', - children: null, - }, - ], - }, - { - label: '鏂囧北澹棌鑻楁棌鑷不宸�', - value: '532600', - children: [ - { - label: '鏂囧北甯�', - value: '532601', - children: null, - }, - { - label: '鐮氬北鍘�', - value: '532622', - children: null, - }, - { - label: '瑗跨暣鍘�', - value: '532623', - children: null, - }, - { - label: '楹绘牀鍧″幙', - value: '532624', - children: null, - }, - { - label: '椹叧鍘�', - value: '532625', - children: null, - }, - { - label: '涓樺寳鍘�', - value: '532626', - children: null, - }, - { - label: '骞垮崡鍘�', - value: '532627', - children: null, - }, - { - label: '瀵屽畞鍘�', - value: '532628', - children: null, - }, - ], - }, - { - label: '瑗垮弻鐗堢撼鍌f棌鑷不宸�', - value: '532800', - children: [ - { - label: '鏅椽甯�', - value: '532801', - children: null, - }, - { - label: '鍕愭捣鍘�', - value: '532822', - children: null, - }, - { - label: '鍕愯厞鍘�', - value: '532823', - children: null, - }, - ], - }, - { - label: '澶х悊鐧芥棌鑷不宸�', - value: '532900', - children: [ - { - label: '澶х悊甯�', - value: '532901', - children: null, - }, - { - label: '婕炬繛褰濇棌鑷不鍘�', - value: '532922', - children: null, - }, - { - label: '绁ヤ簯鍘�', - value: '532923', - children: null, - }, - { - label: '瀹惧窛鍘�', - value: '532924', - children: null, - }, - { - label: '寮ユ浮鍘�', - value: '532925', - children: null, - }, - { - label: '鍗楁锭褰濇棌鑷不鍘�', - value: '532926', - children: null, - }, - { - label: '宸嶅北褰濇棌鍥炴棌鑷不鍘�', - value: '532927', - children: null, - }, - { - label: '姘稿钩鍘�', - value: '532928', - children: null, - }, - { - label: '浜戦緳鍘�', - value: '532929', - children: null, - }, - { - label: '娲辨簮鍘�', - value: '532930', - children: null, - }, - { - label: '鍓戝窛鍘�', - value: '532931', - children: null, - }, - { - label: '楣ゅ簡鍘�', - value: '532932', - children: null, - }, - ], - }, - { - label: '寰峰畯鍌f棌鏅鏃忚嚜娌诲窞', - value: '533100', - children: [ - { - label: '鐟炰附甯�', - value: '533102', - children: null, - }, - { - label: '鑺掑競', - value: '533103', - children: null, - }, - { - label: '姊佹渤鍘�', - value: '533122', - children: null, - }, - { - label: '鐩堟睙鍘�', - value: '533123', - children: null, - }, - { - label: '闄囧窛鍘�', - value: '533124', - children: null, - }, - ], - }, - { - label: '鎬掓睙鍌堝兂鏃忚嚜娌诲窞', - value: '533300', - children: [ - { - label: '娉告按甯�', - value: '533301', - children: null, - }, - { - label: '绂忚础鍘�', - value: '533323', - children: null, - }, - { - label: '璐″北鐙緳鏃忔�掓棌鑷不鍘�', - value: '533324', - children: null, - }, - { - label: '鍏板潽鐧芥棌鏅背鏃忚嚜娌诲幙', - value: '533325', - children: null, - }, - ], - }, - { - label: '杩簡钘忔棌鑷不宸�', - value: '533400', - children: [ - { - label: '棣欐牸閲屾媺甯�', - value: '533401', - children: null, - }, - { - label: '寰烽挦鍘�', - value: '533422', - children: null, - }, - { - label: '缁磋タ鍌堝兂鏃忚嚜娌诲幙', - value: '533423', - children: null, - }, - ], - }, - ], - }, - { - label: '瑗胯棌鑷不鍖�', - value: '540000', - children: [ - { - label: '鎷夎惃甯�', - value: '540100', - children: [ - { - label: '鍩庡叧鍖�', - value: '540102', - children: null, - }, - { - label: '鍫嗛緳寰峰簡鍖�', - value: '540103', - children: null, - }, - { - label: '杈惧瓬鍖�', - value: '540104', - children: null, - }, - { - label: '鏋楀懆鍘�', - value: '540121', - children: null, - }, - { - label: '褰撻泟鍘�', - value: '540122', - children: null, - }, - { - label: '灏兼湪鍘�', - value: '540123', - children: null, - }, - { - label: '鏇叉按鍘�', - value: '540124', - children: null, - }, - { - label: '澧ㄧ宸ュ崱鍘�', - value: '540127', - children: null, - }, - ], - }, - { - label: '鏃ュ杸鍒欏競', - value: '540200', - children: [ - { - label: '妗戠彔瀛滃尯', - value: '540202', - children: null, - }, - { - label: '鍗楁湪鏋楀幙', - value: '540221', - children: null, - }, - { - label: '姹熷瓬鍘�', - value: '540222', - children: null, - }, - { - label: '瀹氭棩鍘�', - value: '540223', - children: null, - }, - { - label: '钀ㄨ喀鍘�', - value: '540224', - children: null, - }, - { - label: '鎷夊瓬鍘�', - value: '540225', - children: null, - }, - { - label: '鏄備粊鍘�', - value: '540226', - children: null, - }, - { - label: '璋㈤�氶棬鍘�', - value: '540227', - children: null, - }, - { - label: '鐧芥湕鍘�', - value: '540228', - children: null, - }, - { - label: '浠佸竷鍘�', - value: '540229', - children: null, - }, - { - label: '搴烽┈鍘�', - value: '540230', - children: null, - }, - { - label: '瀹氱粨鍘�', - value: '540231', - children: null, - }, - { - label: '浠插反鍘�', - value: '540232', - children: null, - }, - { - label: '浜氫笢鍘�', - value: '540233', - children: null, - }, - { - label: '鍚夐殕鍘�', - value: '540234', - children: null, - }, - { - label: '鑱傛媺鏈ㄥ幙', - value: '540235', - children: null, - }, - { - label: '钀ㄥ槑鍘�', - value: '540236', - children: null, - }, - { - label: '宀楀反鍘�', - value: '540237', - children: null, - }, - ], - }, - { - label: '鏄岄兘甯�', - value: '540300', - children: [ - { - label: '鍗¤嫢鍖�', - value: '540302', - children: null, - }, - { - label: '姹熻揪鍘�', - value: '540321', - children: null, - }, - { - label: '璐¤鍘�', - value: '540322', - children: null, - }, - { - label: '绫讳箤榻愬幙', - value: '540323', - children: null, - }, - { - label: '涓侀潚鍘�', - value: '540324', - children: null, - }, - { - label: '瀵熼泤鍘�', - value: '540325', - children: null, - }, - { - label: '鍏鍘�', - value: '540326', - children: null, - }, - { - label: '宸﹁础鍘�', - value: '540327', - children: null, - }, - { - label: '鑺掑悍鍘�', - value: '540328', - children: null, - }, - { - label: '娲涢殕鍘�', - value: '540329', - children: null, - }, - { - label: '杈瑰潩鍘�', - value: '540330', - children: null, - }, - ], - }, - { - label: '鏋楄姖甯�', - value: '540400', - children: [ - { - label: '宸村疁鍖�', - value: '540402', - children: null, - }, - { - label: '宸ュ竷姹熻揪鍘�', - value: '540421', - children: null, - }, - { - label: '绫虫灄鍘�', - value: '540422', - children: null, - }, - { - label: '澧ㄨ劚鍘�', - value: '540423', - children: null, - }, - { - label: '娉㈠瘑鍘�', - value: '540424', - children: null, - }, - { - label: '瀵熼殔鍘�', - value: '540425', - children: null, - }, - { - label: '鏈楀幙', - value: '540426', - children: null, - }, - ], - }, - { - label: '灞卞崡甯�', - value: '540500', - children: [ - { - label: '涔冧笢鍖�', - value: '540502', - children: null, - }, - { - label: '鎵庡泭鍘�', - value: '540521', - children: null, - }, - { - label: '璐″槑鍘�', - value: '540522', - children: null, - }, - { - label: '妗戞棩鍘�', - value: '540523', - children: null, - }, - { - label: '鐞肩粨鍘�', - value: '540524', - children: null, - }, - { - label: '鏇叉澗鍘�', - value: '540525', - children: null, - }, - { - label: '鎺編鍘�', - value: '540526', - children: null, - }, - { - label: '娲涙墡鍘�', - value: '540527', - children: null, - }, - { - label: '鍔犳煡鍘�', - value: '540528', - children: null, - }, - { - label: '闅嗗瓙鍘�', - value: '540529', - children: null, - }, - { - label: '閿欓偅鍘�', - value: '540530', - children: null, - }, - { - label: '娴崱瀛愬幙', - value: '540531', - children: null, - }, - ], - }, - { - label: '閭f洸甯�', - value: '540600', - children: [ - { - label: '鑹插凹鍖�', - value: '540602', - children: null, - }, - { - label: '鍢夐粠鍘�', - value: '540621', - children: null, - }, - { - label: '姣斿鍘�', - value: '540622', - children: null, - }, - { - label: '鑱傝崳鍘�', - value: '540623', - children: null, - }, - { - label: '瀹夊鍘�', - value: '540624', - children: null, - }, - { - label: '鐢虫墡鍘�', - value: '540625', - children: null, - }, - { - label: '绱㈠幙', - value: '540626', - children: null, - }, - { - label: '鐝垐鍘�', - value: '540627', - children: null, - }, - { - label: '宸撮潚鍘�', - value: '540628', - children: null, - }, - { - label: '灏肩帥鍘�', - value: '540629', - children: null, - }, - { - label: '鍙屾箹鍘�', - value: '540630', - children: null, - }, - ], - }, - { - label: '闃块噷鍦板尯', - value: '542500', - children: [ - { - label: '鏅叞鍘�', - value: '542521', - children: null, - }, - { - label: '鏈揪鍘�', - value: '542522', - children: null, - }, - { - label: '鍣跺皵鍘�', - value: '542523', - children: null, - }, - { - label: '鏃ュ湡鍘�', - value: '542524', - children: null, - }, - { - label: '闈╁悏鍘�', - value: '542525', - children: null, - }, - { - label: '鏀瑰垯鍘�', - value: '542526', - children: null, - }, - { - label: '鎺嫟鍘�', - value: '542527', - children: null, - }, - ], - }, - ], - }, - { - label: '闄曡タ鐪�', - value: '610000', - children: [ - { - label: '瑗垮畨甯�', - value: '610100', - children: [ - { - label: '鏂板煄鍖�', - value: '610102', - children: null, - }, - { - label: '纰戞灄鍖�', - value: '610103', - children: null, - }, - { - label: '鑾叉箹鍖�', - value: '610104', - children: null, - }, - { - label: '鐏炴ˉ鍖�', - value: '610111', - children: null, - }, - { - label: '鏈ぎ鍖�', - value: '610112', - children: null, - }, - { - label: '闆佸鍖�', - value: '610113', - children: null, - }, - { - label: '闃庤壇鍖�', - value: '610114', - children: null, - }, - { - label: '涓存郊鍖�', - value: '610115', - children: null, - }, - { - label: '闀垮畨鍖�', - value: '610116', - children: null, - }, - { - label: '楂橀櫟鍖�', - value: '610117', - children: null, - }, - { - label: '閯犻倯鍖�', - value: '610118', - children: null, - }, - { - label: '钃濈敯鍘�', - value: '610122', - children: null, - }, - { - label: '鍛ㄨ嚦鍘�', - value: '610124', - children: null, - }, - ], - }, - { - label: '閾滃窛甯�', - value: '610200', - children: [ - { - label: '鐜嬬泭鍖�', - value: '610202', - children: null, - }, - { - label: '鍗板彴鍖�', - value: '610203', - children: null, - }, - { - label: '鑰�宸炲尯', - value: '610204', - children: null, - }, - { - label: '瀹滃悰鍘�', - value: '610222', - children: null, - }, - ], - }, - { - label: '瀹濋浮甯�', - value: '610300', - children: [ - { - label: '娓花鍖�', - value: '610302', - children: null, - }, - { - label: '閲戝彴鍖�', - value: '610303', - children: null, - }, - { - label: '闄堜粨鍖�', - value: '610304', - children: null, - }, - { - label: '鍑ょ繑鍘�', - value: '610322', - children: null, - }, - { - label: '宀愬北鍘�', - value: '610323', - children: null, - }, - { - label: '鎵堕鍘�', - value: '610324', - children: null, - }, - { - label: '鐪夊幙', - value: '610326', - children: null, - }, - { - label: '闄囧幙', - value: '610327', - children: null, - }, - { - label: '鍗冮槼鍘�', - value: '610328', - children: null, - }, - { - label: '楹熸父鍘�', - value: '610329', - children: null, - }, - { - label: '鍑ゅ幙', - value: '610330', - children: null, - }, - { - label: '澶櫧鍘�', - value: '610331', - children: null, - }, - ], - }, - { - label: '鍜搁槼甯�', - value: '610400', - children: [ - { - label: '绉﹂兘鍖�', - value: '610402', - children: null, - }, - { - label: '鏉ㄩ櫟鍖�', - value: '610403', - children: null, - }, - { - label: '娓煄鍖�', - value: '610404', - children: null, - }, - { - label: '涓夊師鍘�', - value: '610422', - children: null, - }, - { - label: '娉鹃槼鍘�', - value: '610423', - children: null, - }, - { - label: '涔惧幙', - value: '610424', - children: null, - }, - { - label: '绀兼硥鍘�', - value: '610425', - children: null, - }, - { - label: '姘稿鍘�', - value: '610426', - children: null, - }, - { - label: '闀挎鍘�', - value: '610428', - children: null, - }, - { - label: '鏃倯鍘�', - value: '610429', - children: null, - }, - { - label: '娣冲寲鍘�', - value: '610430', - children: null, - }, - { - label: '姝﹀姛鍘�', - value: '610431', - children: null, - }, - { - label: '鍏村钩甯�', - value: '610481', - children: null, - }, - { - label: '褰窞甯�', - value: '610482', - children: null, - }, - ], - }, - { - label: '娓崡甯�', - value: '610500', - children: [ - { - label: '涓存腑鍖�', - value: '610502', - children: null, - }, - { - label: '鍗庡窞鍖�', - value: '610503', - children: null, - }, - { - label: '娼煎叧鍘�', - value: '610522', - children: null, - }, - { - label: '澶ц崝鍘�', - value: '610523', - children: null, - }, - { - label: '鍚堥槼鍘�', - value: '610524', - children: null, - }, - { - label: '婢勫煄鍘�', - value: '610525', - children: null, - }, - { - label: '钂插煄鍘�', - value: '610526', - children: null, - }, - { - label: '鐧芥按鍘�', - value: '610527', - children: null, - }, - { - label: '瀵屽钩鍘�', - value: '610528', - children: null, - }, - { - label: '闊╁煄甯�', - value: '610581', - children: null, - }, - { - label: '鍗庨槾甯�', - value: '610582', - children: null, - }, - ], - }, - { - label: '寤跺畨甯�', - value: '610600', - children: [ - { - label: '瀹濆鍖�', - value: '610602', - children: null, - }, - { - label: '瀹夊鍖�', - value: '610603', - children: null, - }, - { - label: '寤堕暱鍘�', - value: '610621', - children: null, - }, - { - label: '寤跺窛鍘�', - value: '610622', - children: null, - }, - { - label: '瀛愰暱鍘�', - value: '610623', - children: null, - }, - { - label: '蹇椾腹鍘�', - value: '610625', - children: null, - }, - { - label: '鍚磋捣鍘�', - value: '610626', - children: null, - }, - { - label: '鐢樻硥鍘�', - value: '610627', - children: null, - }, - { - label: '瀵屽幙', - value: '610628', - children: null, - }, - { - label: '娲涘窛鍘�', - value: '610629', - children: null, - }, - { - label: '瀹滃窛鍘�', - value: '610630', - children: null, - }, - { - label: '榛勯緳鍘�', - value: '610631', - children: null, - }, - { - label: '榛勯櫟鍘�', - value: '610632', - children: null, - }, - ], - }, - { - label: '姹変腑甯�', - value: '610700', - children: [ - { - label: '姹夊彴鍖�', - value: '610702', - children: null, - }, - { - label: '鍗楅儜鍖�', - value: '610703', - children: null, - }, - { - label: '鍩庡浐鍘�', - value: '610722', - children: null, - }, - { - label: '娲嬪幙', - value: '610723', - children: null, - }, - { - label: '瑗夸埂鍘�', - value: '610724', - children: null, - }, - { - label: '鍕夊幙', - value: '610725', - children: null, - }, - { - label: '瀹佸己鍘�', - value: '610726', - children: null, - }, - { - label: '鐣ラ槼鍘�', - value: '610727', - children: null, - }, - { - label: '闀囧反鍘�', - value: '610728', - children: null, - }, - { - label: '鐣欏潩鍘�', - value: '610729', - children: null, - }, - { - label: '浣涘潽鍘�', - value: '610730', - children: null, - }, - ], - }, - { - label: '姒嗘灄甯�', - value: '610800', - children: [ - { - label: '姒嗛槼鍖�', - value: '610802', - children: null, - }, - { - label: '妯北鍖�', - value: '610803', - children: null, - }, - { - label: '搴滆胺鍘�', - value: '610822', - children: null, - }, - { - label: '闈栬竟鍘�', - value: '610824', - children: null, - }, - { - label: '瀹氳竟鍘�', - value: '610825', - children: null, - }, - { - label: '缁ュ痉鍘�', - value: '610826', - children: null, - }, - { - label: '绫宠剛鍘�', - value: '610827', - children: null, - }, - { - label: '浣冲幙', - value: '610828', - children: null, - }, - { - label: '鍚村牎鍘�', - value: '610829', - children: null, - }, - { - label: '娓呮锭鍘�', - value: '610830', - children: null, - }, - { - label: '瀛愭床鍘�', - value: '610831', - children: null, - }, - { - label: '绁炴湪甯�', - value: '610881', - children: null, - }, - ], - }, - { - label: '瀹夊悍甯�', - value: '610900', - children: [ - { - label: '姹夋花鍖�', - value: '610902', - children: null, - }, - { - label: '姹夐槾鍘�', - value: '610921', - children: null, - }, - { - label: '鐭虫硥鍘�', - value: '610922', - children: null, - }, - { - label: '瀹侀檿鍘�', - value: '610923', - children: null, - }, - { - label: '绱槼鍘�', - value: '610924', - children: null, - }, - { - label: '宀氱殝鍘�', - value: '610925', - children: null, - }, - { - label: '骞冲埄鍘�', - value: '610926', - children: null, - }, - { - label: '闀囧潽鍘�', - value: '610927', - children: null, - }, - { - label: '鏃槼鍘�', - value: '610928', - children: null, - }, - { - label: '鐧芥渤鍘�', - value: '610929', - children: null, - }, - ], - }, - { - label: '鍟嗘礇甯�', - value: '611000', - children: [ - { - label: '鍟嗗窞鍖�', - value: '611002', - children: null, - }, - { - label: '娲涘崡鍘�', - value: '611021', - children: null, - }, - { - label: '涓瑰嚖鍘�', - value: '611022', - children: null, - }, - { - label: '鍟嗗崡鍘�', - value: '611023', - children: null, - }, - { - label: '灞遍槼鍘�', - value: '611024', - children: null, - }, - { - label: '闀囧畨鍘�', - value: '611025', - children: null, - }, - { - label: '鏌炴按鍘�', - value: '611026', - children: null, - }, - ], - }, - ], - }, - { - label: '鐢樿們鐪�', - value: '620000', - children: [ - { - label: '鍏板窞甯�', - value: '620100', - children: [ - { - label: '鍩庡叧鍖�', - value: '620102', - children: null, - }, - { - label: '涓冮噷娌冲尯', - value: '620103', - children: null, - }, - { - label: '瑗垮浐鍖�', - value: '620104', - children: null, - }, - { - label: '瀹夊畞鍖�', - value: '620105', - children: null, - }, - { - label: '绾㈠彜鍖�', - value: '620111', - children: null, - }, - { - label: '姘哥櫥鍘�', - value: '620121', - children: null, - }, - { - label: '鐨嬪叞鍘�', - value: '620122', - children: null, - }, - { - label: '姒嗕腑鍘�', - value: '620123', - children: null, - }, - ], - }, - { - label: '鍢夊唱鍏冲競', - value: '620200', - children: [ - { - label: '鍢夊唱鍏冲競', - value: '620299', - children: null, - }, - ], - }, - { - label: '閲戞槍甯�', - value: '620300', - children: [ - { - label: '閲戝窛鍖�', - value: '620302', - children: null, - }, - { - label: '姘告槍鍘�', - value: '620321', - children: null, - }, - ], - }, - { - label: '鐧介摱甯�', - value: '620400', - children: [ - { - label: '鐧介摱鍖�', - value: '620402', - children: null, - }, - { - label: '骞冲窛鍖�', - value: '620403', - children: null, - }, - { - label: '闈栬繙鍘�', - value: '620421', - children: null, - }, - { - label: '浼氬畞鍘�', - value: '620422', - children: null, - }, - { - label: '鏅嘲鍘�', - value: '620423', - children: null, - }, - ], - }, - { - label: '澶╂按甯�', - value: '620500', - children: [ - { - label: '绉﹀窞鍖�', - value: '620502', - children: null, - }, - { - label: '楹︾Н鍖�', - value: '620503', - children: null, - }, - { - label: '娓呮按鍘�', - value: '620521', - children: null, - }, - { - label: '绉﹀畨鍘�', - value: '620522', - children: null, - }, - { - label: '鐢樿胺鍘�', - value: '620523', - children: null, - }, - { - label: '姝﹀北鍘�', - value: '620524', - children: null, - }, - { - label: '寮犲宸濆洖鏃忚嚜娌诲幙', - value: '620525', - children: null, - }, - ], - }, - { - label: '姝﹀▉甯�', - value: '620600', - children: [ - { - label: '鍑夊窞鍖�', - value: '620602', - children: null, - }, - { - label: '姘戝嫟鍘�', - value: '620621', - children: null, - }, - { - label: '鍙ゆ氮鍘�', - value: '620622', - children: null, - }, - { - label: '澶╃钘忔棌鑷不鍘�', - value: '620623', - children: null, - }, - ], - }, - { - label: '寮犳帠甯�', - value: '620700', - children: [ - { - label: '鐢樺窞鍖�', - value: '620702', - children: null, - }, - { - label: '鑲冨崡瑁曞浐鏃忚嚜娌诲幙', - value: '620721', - children: null, - }, - { - label: '姘戜箰鍘�', - value: '620722', - children: null, - }, - { - label: '涓存辰鍘�', - value: '620723', - children: null, - }, - { - label: '楂樺彴鍘�', - value: '620724', - children: null, - }, - { - label: '灞变腹鍘�', - value: '620725', - children: null, - }, - ], - }, - { - label: '骞冲噳甯�', - value: '620800', - children: [ - { - label: '宕嗗硳鍖�', - value: '620802', - children: null, - }, - { - label: '娉惧窛鍘�', - value: '620821', - children: null, - }, - { - label: '鐏靛彴鍘�', - value: '620822', - children: null, - }, - { - label: '宕囦俊鍘�', - value: '620823', - children: null, - }, - { - label: '搴勬氮鍘�', - value: '620825', - children: null, - }, - { - label: '闈欏畞鍘�', - value: '620826', - children: null, - }, - { - label: '鍗庝涵甯�', - value: '620881', - children: null, - }, - ], - }, - { - label: '閰掓硥甯�', - value: '620900', - children: [ - { - label: '鑲冨窞鍖�', - value: '620902', - children: null, - }, - { - label: '閲戝鍘�', - value: '620921', - children: null, - }, - { - label: '鐡滃窞鍘�', - value: '620922', - children: null, - }, - { - label: '鑲冨寳钂欏彜鏃忚嚜娌诲幙', - value: '620923', - children: null, - }, - { - label: '闃垮厠濉炲搱钀ㄥ厠鏃忚嚜娌诲幙', - value: '620924', - children: null, - }, - { - label: '鐜夐棬甯�', - value: '620981', - children: null, - }, - { - label: '鏁︾厡甯�', - value: '620982', - children: null, - }, - ], - }, - { - label: '搴嗛槼甯�', - value: '621000', - children: [ - { - label: '瑗垮嘲鍖�', - value: '621002', - children: null, - }, - { - label: '搴嗗煄鍘�', - value: '621021', - children: null, - }, - { - label: '鐜幙', - value: '621022', - children: null, - }, - { - label: '鍗庢睜鍘�', - value: '621023', - children: null, - }, - { - label: '鍚堟按鍘�', - value: '621024', - children: null, - }, - { - label: '姝e畞鍘�', - value: '621025', - children: null, - }, - { - label: '瀹佸幙', - value: '621026', - children: null, - }, - { - label: '闀囧師鍘�', - value: '621027', - children: null, - }, - ], - }, - { - label: '瀹氳タ甯�', - value: '621100', - children: [ - { - label: '瀹夊畾鍖�', - value: '621102', - children: null, - }, - { - label: '閫氭腑鍘�', - value: '621121', - children: null, - }, - { - label: '闄囪タ鍘�', - value: '621122', - children: null, - }, - { - label: '娓簮鍘�', - value: '621123', - children: null, - }, - { - label: '涓存串鍘�', - value: '621124', - children: null, - }, - { - label: '婕冲幙', - value: '621125', - children: null, - }, - { - label: '宀峰幙', - value: '621126', - children: null, - }, - ], - }, - { - label: '闄囧崡甯�', - value: '621200', - children: [ - { - label: '姝﹂兘鍖�', - value: '621202', - children: null, - }, - { - label: '鎴愬幙', - value: '621221', - children: null, - }, - { - label: '鏂囧幙', - value: '621222', - children: null, - }, - { - label: '瀹曟槍鍘�', - value: '621223', - children: null, - }, - { - label: '搴峰幙', - value: '621224', - children: null, - }, - { - label: '瑗垮拰鍘�', - value: '621225', - children: null, - }, - { - label: '绀煎幙', - value: '621226', - children: null, - }, - { - label: '寰藉幙', - value: '621227', - children: null, - }, - { - label: '涓ゅ綋鍘�', - value: '621228', - children: null, - }, - ], - }, - { - label: '涓村鍥炴棌鑷不宸�', - value: '622900', - children: [ - { - label: '涓村甯�', - value: '622901', - children: null, - }, - { - label: '涓村鍘�', - value: '622921', - children: null, - }, - { - label: '搴蜂箰鍘�', - value: '622922', - children: null, - }, - { - label: '姘搁潠鍘�', - value: '622923', - children: null, - }, - { - label: '骞挎渤鍘�', - value: '622924', - children: null, - }, - { - label: '鍜屾斂鍘�', - value: '622925', - children: null, - }, - { - label: '涓滀埂鏃忚嚜娌诲幙', - value: '622926', - children: null, - }, - { - label: '绉煶灞卞幙', - value: '622927', - children: null, - }, - ], - }, - { - label: '鐢樺崡钘忔棌鑷不宸�', - value: '623000', - children: [ - { - label: '鍚堜綔甯�', - value: '623001', - children: null, - }, - { - label: '涓存江鍘�', - value: '623021', - children: null, - }, - { - label: '鍗撳凹鍘�', - value: '623022', - children: null, - }, - { - label: '鑸熸洸鍘�', - value: '623023', - children: null, - }, - { - label: '杩儴鍘�', - value: '623024', - children: null, - }, - { - label: '鐜涙洸鍘�', - value: '623025', - children: null, - }, - { - label: '纰屾洸鍘�', - value: '623026', - children: null, - }, - { - label: '澶忔渤鍘�', - value: '623027', - children: null, - }, - ], - }, - ], - }, - { - label: '闈掓捣鐪�', - value: '630000', - children: [ - { - label: '瑗垮畞甯�', - value: '630100', - children: [ - { - label: '鍩庝笢鍖�', - value: '630102', - children: null, - }, - { - label: '鍩庝腑鍖�', - value: '630103', - children: null, - }, - { - label: '鍩庤タ鍖�', - value: '630104', - children: null, - }, - { - label: '鍩庡寳鍖�', - value: '630105', - children: null, - }, - { - label: '澶ч�氬洖鏃忓湡鏃忚嚜娌诲幙', - value: '630121', - children: null, - }, - { - label: '婀熶腑鍘�', - value: '630122', - children: null, - }, - { - label: '婀熸簮鍘�', - value: '630123', - children: null, - }, - ], - }, - { - label: '娴蜂笢甯�', - value: '630200', - children: [ - { - label: '涔愰兘鍖�', - value: '630202', - children: null, - }, - { - label: '骞冲畨鍖�', - value: '630203', - children: null, - }, - { - label: '姘戝拰鍥炴棌鍦熸棌鑷不鍘�', - value: '630222', - children: null, - }, - { - label: '浜掑姪鍦熸棌鑷不鍘�', - value: '630223', - children: null, - }, - { - label: '鍖栭殕鍥炴棌鑷不鍘�', - value: '630224', - children: null, - }, - { - label: '寰寲鎾掓媺鏃忚嚜娌诲幙', - value: '630225', - children: null, - }, - ], - }, - { - label: '娴峰寳钘忔棌鑷不宸�', - value: '632200', - children: [ - { - label: '闂ㄦ簮鍥炴棌鑷不鍘�', - value: '632221', - children: null, - }, - { - label: '绁佽繛鍘�', - value: '632222', - children: null, - }, - { - label: '娴锋檹鍘�', - value: '632223', - children: null, - }, - { - label: '鍒氬療鍘�', - value: '632224', - children: null, - }, - ], - }, - { - label: '榛勫崡钘忔棌鑷不宸�', - value: '632300', - children: [ - { - label: '鍚屼粊鍘�', - value: '632321', - children: null, - }, - { - label: '灏栨墡鍘�', - value: '632322', - children: null, - }, - { - label: '娉藉簱鍘�', - value: '632323', - children: null, - }, - { - label: '娌冲崡钂欏彜鏃忚嚜娌诲幙', - value: '632324', - children: null, - }, - ], - }, - { - label: '娴峰崡钘忔棌鑷不宸�', - value: '632500', - children: [ - { - label: '鍏卞拰鍘�', - value: '632521', - children: null, - }, - { - label: '鍚屽痉鍘�', - value: '632522', - children: null, - }, - { - label: '璐靛痉鍘�', - value: '632523', - children: null, - }, - { - label: '鍏存捣鍘�', - value: '632524', - children: null, - }, - { - label: '璐靛崡鍘�', - value: '632525', - children: null, - }, - ], - }, - { - label: '鏋滄礇钘忔棌鑷不宸�', - value: '632600', - children: [ - { - label: '鐜涙瞾鍘�', - value: '632621', - children: null, - }, - { - label: '鐝帥鍘�', - value: '632622', - children: null, - }, - { - label: '鐢樺痉鍘�', - value: '632623', - children: null, - }, - { - label: '杈炬棩鍘�', - value: '632624', - children: null, - }, - { - label: '涔呮不鍘�', - value: '632625', - children: null, - }, - { - label: '鐜涘鍘�', - value: '632626', - children: null, - }, - ], - }, - { - label: '鐜夋爲钘忔棌鑷不宸�', - value: '632700', - children: [ - { - label: '鐜夋爲甯�', - value: '632701', - children: null, - }, - { - label: '鏉傚鍘�', - value: '632722', - children: null, - }, - { - label: '绉板鍘�', - value: '632723', - children: null, - }, - { - label: '娌诲鍘�', - value: '632724', - children: null, - }, - { - label: '鍥婅唉鍘�', - value: '632725', - children: null, - }, - { - label: '鏇查夯鑾卞幙', - value: '632726', - children: null, - }, - ], - }, - { - label: '娴疯タ钂欏彜鏃忚棌鏃忚嚜娌诲窞', - value: '632800', - children: [ - { - label: '鏍煎皵鏈ㄥ競', - value: '632801', - children: null, - }, - { - label: '寰蜂护鍝堝競', - value: '632802', - children: null, - }, - { - label: '鑼礀甯�', - value: '632803', - children: null, - }, - { - label: '涔屽叞鍘�', - value: '632821', - children: null, - }, - { - label: '閮藉叞鍘�', - value: '632822', - children: null, - }, - { - label: '澶╁郴鍘�', - value: '632823', - children: null, - }, - { - label: '澶ф煷鏃﹁鏀垮鍛樹細', - value: '632825', - children: null, - }, - ], - }, - ], - }, - { - label: '瀹佸鍥炴棌鑷不鍖�', - value: '640000', - children: [ - { - label: '閾跺窛甯�', - value: '640100', - children: [ - { - label: '鍏村簡鍖�', - value: '640104', - children: null, - }, - { - label: '瑗垮鍖�', - value: '640105', - children: null, - }, - { - label: '閲戝嚖鍖�', - value: '640106', - children: null, - }, - { - label: '姘稿畞鍘�', - value: '640121', - children: null, - }, - { - label: '璐哄叞鍘�', - value: '640122', - children: null, - }, - { - label: '鐏垫甯�', - value: '640181', - children: null, - }, - ], - }, - { - label: '鐭冲槾灞卞競', - value: '640200', - children: [ - { - label: '澶ф鍙e尯', - value: '640202', - children: null, - }, - { - label: '鎯犲啘鍖�', - value: '640205', - children: null, - }, - { - label: '骞崇綏鍘�', - value: '640221', - children: null, - }, - ], - }, - { - label: '鍚村繝甯�', - value: '640300', - children: [ - { - label: '鍒╅�氬尯', - value: '640302', - children: null, - }, - { - label: '绾㈠鍫″尯', - value: '640303', - children: null, - }, - { - label: '鐩愭睜鍘�', - value: '640323', - children: null, - }, - { - label: '鍚屽績鍘�', - value: '640324', - children: null, - }, - { - label: '闈掗摐宄″競', - value: '640381', - children: null, - }, - ], - }, - { - label: '鍥哄師甯�', - value: '640400', - children: [ - { - label: '鍘熷窞鍖�', - value: '640402', - children: null, - }, - { - label: '瑗垮悏鍘�', - value: '640422', - children: null, - }, - { - label: '闅嗗痉鍘�', - value: '640423', - children: null, - }, - { - label: '娉炬簮鍘�', - value: '640424', - children: null, - }, - { - label: '褰槼鍘�', - value: '640425', - children: null, - }, - ], - }, - { - label: '涓崼甯�', - value: '640500', - children: [ - { - label: '娌欏潯澶村尯', - value: '640502', - children: null, - }, - { - label: '涓畞鍘�', - value: '640521', - children: null, - }, - { - label: '娴峰師鍘�', - value: '640522', - children: null, - }, - ], - }, - ], - }, - { - label: '鏂扮枂缁村惥灏旇嚜娌诲尯', - value: '650000', - children: [ - { - label: '涔岄瞾鏈ㄩ綈甯�', - value: '650100', - children: [ - { - label: '澶╁北鍖�', - value: '650102', - children: null, - }, - { - label: '娌欎緷宸村厠鍖�', - value: '650103', - children: null, - }, - { - label: '鏂板競鍖�', - value: '650104', - children: null, - }, - { - label: '姘寸(娌熷尯', - value: '650105', - children: null, - }, - { - label: '澶村悲娌冲尯', - value: '650106', - children: null, - }, - { - label: '杈惧潅鍩庡尯', - value: '650107', - children: null, - }, - { - label: '绫充笢鍖�', - value: '650109', - children: null, - }, - { - label: '涔岄瞾鏈ㄩ綈鍘�', - value: '650121', - children: null, - }, - ], - }, - { - label: '鍏嬫媺鐜涗緷甯�', - value: '650200', - children: [ - { - label: '鐙北瀛愬尯', - value: '650202', - children: null, - }, - { - label: '鍏嬫媺鐜涗緷鍖�', - value: '650203', - children: null, - }, - { - label: '鐧界⒈婊╁尯', - value: '650204', - children: null, - }, - { - label: '涔屽皵绂惧尯', - value: '650205', - children: null, - }, - ], - }, - { - label: '鍚愰瞾鐣競', - value: '650400', - children: [ - { - label: '楂樻槍鍖�', - value: '650402', - children: null, - }, - { - label: '閯杽鍘�', - value: '650421', - children: null, - }, - { - label: '鎵樺厠閫婂幙', - value: '650422', - children: null, - }, - ], - }, - { - label: '鍝堝瘑甯�', - value: '650500', - children: [ - { - label: '浼婂窞鍖�', - value: '650502', - children: null, - }, - { - label: '宸撮噷鍧ゅ搱钀ㄥ厠鑷不鍘�', - value: '650521', - children: null, - }, - { - label: '浼婂惥鍘�', - value: '650522', - children: null, - }, - ], - }, - { - label: '鏄屽悏鍥炴棌鑷不宸�', - value: '652300', - children: [ - { - label: '鏄屽悏甯�', - value: '652301', - children: null, - }, - { - label: '闃滃悍甯�', - value: '652302', - children: null, - }, - { - label: '鍛煎浘澹佸幙', - value: '652323', - children: null, - }, - { - label: '鐜涚撼鏂幙', - value: '652324', - children: null, - }, - { - label: '濂囧彴鍘�', - value: '652325', - children: null, - }, - { - label: '鍚夋湪钀ㄥ皵鍘�', - value: '652327', - children: null, - }, - { - label: '鏈ㄥ瀿鍝堣惃鍏嬭嚜娌诲幙', - value: '652328', - children: null, - }, - ], - }, - { - label: '鍗氬皵濉旀媺钂欏彜鑷不宸�', - value: '652700', - children: [ - { - label: '鍗氫箰甯�', - value: '652701', - children: null, - }, - { - label: '闃挎媺灞卞彛甯�', - value: '652702', - children: null, - }, - { - label: '绮炬渤鍘�', - value: '652722', - children: null, - }, - { - label: '娓╂硥鍘�', - value: '652723', - children: null, - }, - ], - }, - { - label: '宸撮煶閮钂欏彜鑷不宸�', - value: '652800', - children: [ - { - label: '搴撳皵鍕掑競', - value: '652801', - children: null, - }, - { - label: '杞彴鍘�', - value: '652822', - children: null, - }, - { - label: '灏夌妬鍘�', - value: '652823', - children: null, - }, - { - label: '鑻ョ緦鍘�', - value: '652824', - children: null, - }, - { - label: '涓旀湯鍘�', - value: '652825', - children: null, - }, - { - label: '鐒夎�嗗洖鏃忚嚜娌诲幙', - value: '652826', - children: null, - }, - { - label: '鍜岄潤鍘�', - value: '652827', - children: null, - }, - { - label: '鍜岀鍘�', - value: '652828', - children: null, - }, - { - label: '鍗氭箹鍘�', - value: '652829', - children: null, - }, - ], - }, - { - label: '闃垮厠鑻忓湴鍖�', - value: '652900', - children: [ - { - label: '闃垮厠鑻忓競', - value: '652901', - children: null, - }, - { - label: '娓╁鍘�', - value: '652922', - children: null, - }, - { - label: '搴撹溅鍘�', - value: '652923', - children: null, - }, - { - label: '娌欓泤鍘�', - value: '652924', - children: null, - }, - { - label: '鏂板拰鍘�', - value: '652925', - children: null, - }, - { - label: '鎷滃煄鍘�', - value: '652926', - children: null, - }, - { - label: '涔屼粈鍘�', - value: '652927', - children: null, - }, - { - label: '闃跨摝鎻愬幙', - value: '652928', - children: null, - }, - { - label: '鏌潽鍘�', - value: '652929', - children: null, - }, - ], - }, - { - label: '鍏嬪瓬鍕掕嫃鏌皵鍏嬪瓬鑷不宸�', - value: '653000', - children: [ - { - label: '闃垮浘浠�甯�', - value: '653001', - children: null, - }, - { - label: '闃垮厠闄跺幙', - value: '653022', - children: null, - }, - { - label: '闃垮悎濂囧幙', - value: '653023', - children: null, - }, - { - label: '涔屾伆鍘�', - value: '653024', - children: null, - }, - ], - }, - { - label: '鍠�浠�鍦板尯', - value: '653100', - children: [ - { - label: '鍠�浠�甯�', - value: '653101', - children: null, - }, - { - label: '鐤忛檮鍘�', - value: '653121', - children: null, - }, - { - label: '鐤忓嫆鍘�', - value: '653122', - children: null, - }, - { - label: '鑻卞悏娌欏幙', - value: '653123', - children: null, - }, - { - label: '娉芥櫘鍘�', - value: '653124', - children: null, - }, - { - label: '鑾庤溅鍘�', - value: '653125', - children: null, - }, - { - label: '鍙跺煄鍘�', - value: '653126', - children: null, - }, - { - label: '楹︾洊鎻愬幙', - value: '653127', - children: null, - }, - { - label: '宀虫櫘婀栧幙', - value: '653128', - children: null, - }, - { - label: '浼藉笀鍘�', - value: '653129', - children: null, - }, - { - label: '宸存鍘�', - value: '653130', - children: null, - }, - { - label: '濉斾粈搴撳皵骞插鍚夊厠鑷不鍘�', - value: '653131', - children: null, - }, - ], - }, - { - label: '鍜岀敯鍦板尯', - value: '653200', - children: [ - { - label: '鍜岀敯甯�', - value: '653201', - children: null, - }, - { - label: '鍜岀敯鍘�', - value: '653221', - children: null, - }, - { - label: '澧ㄧ帀鍘�', - value: '653222', - children: null, - }, - { - label: '鐨北鍘�', - value: '653223', - children: null, - }, - { - label: '娲涙郸鍘�', - value: '653224', - children: null, - }, - { - label: '绛栧嫆鍘�', - value: '653225', - children: null, - }, - { - label: '浜庣敯鍘�', - value: '653226', - children: null, - }, - { - label: '姘戜赴鍘�', - value: '653227', - children: null, - }, - ], - }, - { - label: '浼婄妬鍝堣惃鍏嬭嚜娌诲窞', - value: '654000', - children: [ - { - label: '浼婂畞甯�', - value: '654002', - children: null, - }, - { - label: '濂庡悲甯�', - value: '654003', - children: null, - }, - { - label: '闇嶅皵鏋滄柉甯�', - value: '654004', - children: null, - }, - { - label: '浼婂畞鍘�', - value: '654021', - children: null, - }, - { - label: '瀵熷竷鏌ュ皵閿′集鑷不鍘�', - value: '654022', - children: null, - }, - { - label: '闇嶅煄鍘�', - value: '654023', - children: null, - }, - { - label: '宸╃暀鍘�', - value: '654024', - children: null, - }, - { - label: '鏂版簮鍘�', - value: '654025', - children: null, - }, - { - label: '鏄嫃鍘�', - value: '654026', - children: null, - }, - { - label: '鐗瑰厠鏂幙', - value: '654027', - children: null, - }, - { - label: '灏煎嫆鍏嬪幙', - value: '654028', - children: null, - }, - ], - }, - { - label: '濉斿煄鍦板尯', - value: '654200', - children: [ - { - label: '濉斿煄甯�', - value: '654201', - children: null, - }, - { - label: '涔岃嫃甯�', - value: '654202', - children: null, - }, - { - label: '棰濇晱鍘�', - value: '654221', - children: null, - }, - { - label: '娌欐咕鍘�', - value: '654223', - children: null, - }, - { - label: '鎵橀噷鍘�', - value: '654224', - children: null, - }, - { - label: '瑁曟皯鍘�', - value: '654225', - children: null, - }, - { - label: '鍜屽竷鍏嬭禌灏旇挋鍙よ嚜娌诲幙', - value: '654226', - children: null, - }, - ], - }, - { - label: '闃垮嫆娉板湴鍖�', - value: '654300', - children: [ - { - label: '闃垮嫆娉板競', - value: '654301', - children: null, - }, - { - label: '甯冨皵娲ュ幙', - value: '654321', - children: null, - }, - { - label: '瀵岃暣鍘�', - value: '654322', - children: null, - }, - { - label: '绂忔捣鍘�', - value: '654323', - children: null, - }, - { - label: '鍝堝反娌冲幙', - value: '654324', - children: null, - }, - { - label: '闈掓渤鍘�', - value: '654325', - children: null, - }, - { - label: '鍚夋湪涔冨幙', - value: '654326', - children: null, - }, - ], - }, - { - label: '鐭虫渤瀛愬競', - value: '659001', - children: [ - { - label: '鏂板煄琛楅亾', - value: '659001001', - children: null, - }, - { - label: '鍚戦槼琛楅亾', - value: '659001002', - children: null, - }, - { - label: '绾㈠北琛楅亾', - value: '659001003', - children: null, - }, - { - label: '鑰佽琛楅亾', - value: '659001004', - children: null, - }, - { - label: '涓滃煄琛楅亾', - value: '659001005', - children: null, - }, - { - label: '鍖楁硥闀�', - value: '659001100', - children: null, - }, - { - label: '鐭虫渤瀛愰晣', - value: '659001200', - children: null, - }, - { - label: '鍏靛洟涓�浜斾簩鍥�', - value: '659001500', - children: null, - }, - ], - }, - { - label: '闃挎媺灏斿競', - value: '659002', - children: [ - { - label: '閲戦摱宸濊矾琛楅亾', - value: '659002001', - children: null, - }, - { - label: '骞哥璺閬�', - value: '659002002', - children: null, - }, - { - label: '闈掓澗璺閬�', - value: '659002003', - children: null, - }, - { - label: '鍗楀彛琛楅亾', - value: '659002004', - children: null, - }, - { - label: '鎵樺杸渚濅埂', - value: '659002200', - children: null, - }, - { - label: '鍏靛洟涓冨洟', - value: '659002500', - children: null, - }, - { - label: '鍏靛洟鍏洟', - value: '659002501', - children: null, - }, - { - label: '鍏靛洟鍗佸洟', - value: '659002503', - children: null, - }, - { - label: '鍏靛洟鍗佷簩鍥�', - value: '659002505', - children: null, - }, - { - label: '鍏靛洟鍗佸洓鍥�', - value: '659002507', - children: null, - }, - { - label: '鍏靛洟浜斿洟', - value: '659002508', - children: null, - }, - { - label: '鍏靛洟鍗佸叚鍥�', - value: '659002509', - children: null, - }, - { - label: '鍏靛洟绗竴甯堟按鍒╂按鐢靛伐绋嬪', - value: '659002511', - children: null, - }, - { - label: '闃挎媺灏斿啘鍦�', - value: '659002513', - children: null, - }, - { - label: '鍏靛洟绗竴甯堝垢绂忓啘鍦�', - value: '659002514', - children: null, - }, - { - label: '鍏靛洟浜屽洟', - value: '659002901', - children: null, - }, - { - label: '鍏靛洟鍐滀竴甯堟矙浜曞瓙姘村埄绠$悊澶�', - value: '659002902', - children: null, - }, - { - label: '鍏靛洟涔濆洟', - value: '659002964', - children: null, - }, - { - label: '鍏靛洟鍗佷竴鍥�', - value: '659002966', - children: null, - }, - { - label: '鍏靛洟鍗佷笁鍥�', - value: '659002967', - children: null, - }, - { - label: '鍏靛洟鍗佷簲鍥�', - value: '659002968', - children: null, - }, - ], - }, - { - label: '鍥炬湪鑸掑厠甯�', - value: '659003', - children: [ - { - label: '榻愬共鍗村嫆琛楅亾', - value: '659003001', - children: null, - }, - { - label: '鍓嶆捣琛楅亾', - value: '659003002', - children: null, - }, - { - label: '姘稿畨鍧濊閬�', - value: '659003003', - children: null, - }, - { - label: '鍏靛洟鍥涘崄鍥涘洟', - value: '659003504', - children: null, - }, - { - label: '鍏靛洟鍥涘崄涔濆洟', - value: '659003509', - children: null, - }, - { - label: '鍏靛洟浜斿崄涓夊洟', - value: '659003513', - children: null, - }, - { - label: '鍠�鎷夋嫓鍕掗晣', - value: '659003960', - children: null, - }, - { - label: '鍏靛洟浜斿崄涓�鍥�', - value: '659003964', - children: null, - }, - { - label: '鍏靛洟浜斿崄浜屽洟', - value: '659003965', - children: null, - }, - { - label: '鍏靛洟浜斿崄鍥�', - value: '659003966', - children: null, - }, - ], - }, - { - label: '浜斿娓犲競', - value: '659004', - children: [ - { - label: '鍐涘灕璺閬�', - value: '659004001', - children: null, - }, - { - label: '闈掓箹璺閬�', - value: '659004002', - children: null, - }, - { - label: '浜烘皯璺閬�', - value: '659004003', - children: null, - }, - { - label: '鍏靛洟涓�闆朵竴鍥�', - value: '659004500', - children: null, - }, - { - label: '钄″婀栭晣', - value: '659004960', - children: null, - }, - { - label: '姊ф闀�', - value: '659004961', - children: null, - }, - ], - }, - { - label: '鍖楀悲甯�', - value: '659005', - children: [ - { - label: '鍏靛洟涓�鍏竷鍥�', - value: '659005502', - children: null, - }, - { - label: '鍏靛洟涓�鍏叓鍥�', - value: '659005503', - children: null, - }, - ], - }, - { - label: '閾侀棬鍏冲競', - value: '659006', - children: [ - { - label: '鍏靛洟浜屽崄涔濆洟', - value: '659006501', - children: null, - }, - { - label: '鍐滀簩甯堜笁鍗佸洟', - value: '659006502', - children: null, - }, - ], - }, - { - label: '鍙屾渤甯�', - value: '659007', - children: [ - { - label: '鍏靛洟鍏崄涓�鍥�', - value: '659007501', - children: null, - }, - { - label: '鍏靛洟鍏崄鍥涘洟', - value: '659007502', - children: null, - }, - { - label: '鍏靛洟鍏崄鍏洟', - value: '659007504', - children: null, - }, - { - label: '鍏靛洟鍏崄涔濆洟', - value: '659007505', - children: null, - }, - { - label: '鍏靛洟涔濆崄鍥�', - value: '659007506', - children: null, - }, - ], - }, - { - label: '鍙厠杈炬媺甯�', - value: '659008', - children: [ - { - label: '鍏靛洟鍏崄涓冨洟', - value: '659008502', - children: null, - }, - { - label: '鍏靛洟鍏崄鍏洟', - value: '659008503', - children: null, - }, - { - label: '鍏靛洟鍏崄涓夊洟', - value: '659008507', - children: null, - }, - { - label: '鍏靛洟鍏崄鍥涘洟', - value: '659008508', - children: null, - }, - { - label: '鍏靛洟鍏崄鍏洟', - value: '659008509', - children: null, - }, - ], - }, - { - label: '鏄嗙帀甯�', - value: '659009', - children: [ - { - label: '鍏靛洟涓�鐗у満', - value: '659009400', - children: null, - }, - { - label: '鍏靛洟鐨北鍐滃満', - value: '659009401', - children: null, - }, - { - label: '鍏靛洟浜屼簩鍥涘洟', - value: '659009501', - children: null, - }, - ], - }, - ], - }, - { - label: '鍙版咕鐪�', - value: '710000', - children: [ - { - label: '鍙板寳甯�', - value: '710100', - children: [ - { - label: '涓鍖�', - value: '710101', - children: null, - }, - { - label: '澶у悓鍖�', - value: '710102', - children: null, - }, - { - label: '涓北鍖�', - value: '710103', - children: null, - }, - { - label: '鏉惧北鍖�', - value: '710104', - children: null, - }, - { - label: '澶у畨鍖�', - value: '710105', - children: null, - }, - { - label: '涓囧崕鍖�', - value: '710106', - children: null, - }, - { - label: '淇′箟鍖�', - value: '710107', - children: null, - }, - { - label: '澹灄鍖�', - value: '710108', - children: null, - }, - { - label: '鍖楁姇鍖�', - value: '710109', - children: null, - }, - { - label: '鍐呮箹鍖�', - value: '710110', - children: null, - }, - { - label: '鍗楁腐鍖�', - value: '710111', - children: null, - }, - { - label: '鏂囧北鍖�', - value: '710112', - children: null, - }, - ], - }, - { - label: '楂橀泟甯�', - value: '710200', - children: [ - { - label: '鏂板叴鍖�', - value: '710201', - children: null, - }, - { - label: '鍓嶉噾鍖�', - value: '710202', - children: null, - }, - { - label: '鑻撻泤鍖�', - value: '710203', - children: null, - }, - { - label: '鐩愬煏鍖�', - value: '710204', - children: null, - }, - { - label: '榧撳北鍖�', - value: '710205', - children: null, - }, - { - label: '鏃楁触鍖�', - value: '710206', - children: null, - }, - { - label: '鍓嶉晣鍖�', - value: '710207', - children: null, - }, - { - label: '涓夋皯鍖�', - value: '710208', - children: null, - }, - { - label: '宸﹁惀鍖�', - value: '710209', - children: null, - }, - { - label: '妤犳鍖�', - value: '710210', - children: null, - }, - { - label: '灏忔腐鍖�', - value: '710211', - children: null, - }, - { - label: '浠佹鍖�', - value: '710242', - children: null, - }, - { - label: '澶хぞ鍖�', - value: '710243', - children: null, - }, - { - label: '鍐堝北鍖�', - value: '710244', - children: null, - }, - { - label: '璺鍖�', - value: '710245', - children: null, - }, - { - label: '闃胯幉鍖�', - value: '710246', - children: null, - }, - { - label: '鐢板鍖�', - value: '710247', - children: null, - }, - { - label: '鐕曞发鍖�', - value: '710248', - children: null, - }, - { - label: '妗ュご鍖�', - value: '710249', - children: null, - }, - { - label: '姊撳畼鍖�', - value: '710250', - children: null, - }, - { - label: '寮ラ檧鍖�', - value: '710251', - children: null, - }, - { - label: '姘稿畨鍖�', - value: '710252', - children: null, - }, - { - label: '婀栧唴鍖�', - value: '710253', - children: null, - }, - { - label: '鍑ゅ北鍖�', - value: '710254', - children: null, - }, - { - label: '澶у鍖�', - value: '710255', - children: null, - }, - { - label: '鏋楀洯鍖�', - value: '710256', - children: null, - }, - { - label: '楦熸澗鍖�', - value: '710257', - children: null, - }, - { - label: '澶ф爲鍖�', - value: '710258', - children: null, - }, - { - label: '鏃楀北鍖�', - value: '710259', - children: null, - }, - { - label: '缇庢祿鍖�', - value: '710260', - children: null, - }, - { - label: '鍏緹鍖�', - value: '710261', - children: null, - }, - { - label: '鍐呴棬鍖�', - value: '710262', - children: null, - }, - { - label: '鏉夋灄鍖�', - value: '710263', - children: null, - }, - { - label: '鐢蹭粰鍖�', - value: '710264', - children: null, - }, - { - label: '妗冩簮鍖�', - value: '710265', - children: null, - }, - { - label: '閭g帥澶忓尯', - value: '710266', - children: null, - }, - { - label: '鑼傛灄鍖�', - value: '710267', - children: null, - }, - { - label: '鑼勮悾鍖�', - value: '710268', - children: null, - }, - ], - }, - { - label: '鍙板崡甯�', - value: '710300', - children: [ - { - label: '涓タ鍖�', - value: '710301', - children: null, - }, - { - label: '涓滃尯', - value: '710302', - children: null, - }, - { - label: '鍗楀尯', - value: '710303', - children: null, - }, - { - label: '鍖楀尯', - value: '710304', - children: null, - }, - { - label: '瀹夊钩鍖�', - value: '710305', - children: null, - }, - { - label: '瀹夊崡鍖�', - value: '710306', - children: null, - }, - { - label: '姘稿悍鍖�', - value: '710339', - children: null, - }, - { - label: '褰掍粊鍖�', - value: '710340', - children: null, - }, - { - label: '鏂板寲鍖�', - value: '710341', - children: null, - }, - { - label: '宸﹂晣鍖�', - value: '710342', - children: null, - }, - { - label: '鐜変簳鍖�', - value: '710343', - children: null, - }, - { - label: '妤犺タ鍖�', - value: '710344', - children: null, - }, - { - label: '鍗楀寲鍖�', - value: '710345', - children: null, - }, - { - label: '浠佸痉鍖�', - value: '710346', - children: null, - }, - { - label: '鍏冲簷鍖�', - value: '710347', - children: null, - }, - { - label: '榫欏磶鍖�', - value: '710348', - children: null, - }, - { - label: '瀹樼敯鍖�', - value: '710349', - children: null, - }, - { - label: '楹昏眴鍖�', - value: '710350', - children: null, - }, - { - label: '浣抽噷鍖�', - value: '710351', - children: null, - }, - { - label: '瑗挎腐鍖�', - value: '710352', - children: null, - }, - { - label: '涓冭偂鍖�', - value: '710353', - children: null, - }, - { - label: '灏嗗啗鍖�', - value: '710354', - children: null, - }, - { - label: '瀛︾敳鍖�', - value: '710355', - children: null, - }, - { - label: '鍖楅棬鍖�', - value: '710356', - children: null, - }, - { - label: '鏂拌惀鍖�', - value: '710357', - children: null, - }, - { - label: '鍚庡鍖�', - value: '710358', - children: null, - }, - { - label: '鐧芥渤鍖�', - value: '710359', - children: null, - }, - { - label: '涓滃北鍖�', - value: '710360', - children: null, - }, - { - label: '鍏敳鍖�', - value: '710361', - children: null, - }, - { - label: '涓嬭惀鍖�', - value: '710362', - children: null, - }, - { - label: '鏌宠惀鍖�', - value: '710363', - children: null, - }, - { - label: '鐩愭按鍖�', - value: '710364', - children: null, - }, - { - label: '鍠勫寲鍖�', - value: '710365', - children: null, - }, - { - label: '澶у唴鍖�', - value: '710366', - children: null, - }, - { - label: '灞变笂鍖�', - value: '710367', - children: null, - }, - { - label: '鏂板競鍖�', - value: '710368', - children: null, - }, - { - label: '瀹夊畾鍖�', - value: '710369', - children: null, - }, - ], - }, - { - label: '鍙颁腑甯�', - value: '710400', - children: [ - { - label: '涓尯', - value: '710401', - children: null, - }, - { - label: '涓滃尯', - value: '710402', - children: null, - }, - { - label: '鍗楀尯', - value: '710403', - children: null, - }, - { - label: '瑗垮尯', - value: '710404', - children: null, - }, - { - label: '鍖楀尯', - value: '710405', - children: null, - }, - { - label: '鍖楀悲鍖�', - value: '710406', - children: null, - }, - { - label: '瑗垮悲鍖�', - value: '710407', - children: null, - }, - { - label: '鍗楀悲鍖�', - value: '710408', - children: null, - }, - { - label: '澶钩鍖�', - value: '710431', - children: null, - }, - { - label: '澶ч噷鍖�', - value: '710432', - children: null, - }, - { - label: '闆惧嘲鍖�', - value: '710433', - children: null, - }, - { - label: '涔屾棩鍖�', - value: '710434', - children: null, - }, - { - label: '涓板師鍖�', - value: '710435', - children: null, - }, - { - label: '鍚庨噷鍖�', - value: '710436', - children: null, - }, - { - label: '鐭冲唸鍖�', - value: '710437', - children: null, - }, - { - label: '涓滃娍鍖�', - value: '710438', - children: null, - }, - { - label: '鍜屽钩鍖�', - value: '710439', - children: null, - }, - { - label: '鏂扮ぞ鍖�', - value: '710440', - children: null, - }, - { - label: '娼瓙鍖�', - value: '710441', - children: null, - }, - { - label: '澶ч泤鍖�', - value: '710442', - children: null, - }, - { - label: '绁炲唸鍖�', - value: '710443', - children: null, - }, - { - label: '澶ц倸鍖�', - value: '710444', - children: null, - }, - { - label: '娌欓箍鍖�', - value: '710445', - children: null, - }, - { - label: '榫欎簳鍖�', - value: '710446', - children: null, - }, - { - label: '姊ф爾鍖�', - value: '710447', - children: null, - }, - { - label: '娓呮按鍖�', - value: '710448', - children: null, - }, - { - label: '澶х敳鍖�', - value: '710449', - children: null, - }, - { - label: '澶栧煍鍖�', - value: '710450', - children: null, - }, - { - label: '澶у畨鍖�', - value: '710451', - children: null, - }, - ], - }, - { - label: '鍗楁姇鍘�', - value: '710600', - children: [ - { - label: '鍗楁姇甯�', - value: '710614', - children: null, - }, - { - label: '涓涔�', - value: '710615', - children: null, - }, - { - label: '鑽夊悲闀�', - value: '710616', - children: null, - }, - { - label: '鍥藉涔�', - value: '710617', - children: null, - }, - { - label: '鍩旈噷闀�', - value: '710618', - children: null, - }, - { - label: '浠佺埍涔�', - value: '710619', - children: null, - }, - { - label: '鍚嶉棿涔�', - value: '710620', - children: null, - }, - { - label: '闆嗛泦闀�', - value: '710621', - children: null, - }, - { - label: '姘撮噷涔�', - value: '710622', - children: null, - }, - { - label: '楸兼睜涔�', - value: '710623', - children: null, - }, - { - label: '淇′箟涔�', - value: '710624', - children: null, - }, - { - label: '绔瑰北闀�', - value: '710625', - children: null, - }, - { - label: '楣胯胺涔�', - value: '710626', - children: null, - }, - ], - }, - { - label: '鍩洪殕甯�', - value: '710700', - children: [ - { - label: '浠佺埍鍖�', - value: '710701', - children: null, - }, - { - label: '淇′箟鍖�', - value: '710702', - children: null, - }, - { - label: '涓鍖�', - value: '710703', - children: null, - }, - { - label: '涓北鍖�', - value: '710704', - children: null, - }, - { - label: '瀹変箰鍖�', - value: '710705', - children: null, - }, - { - label: '鏆栨殩鍖�', - value: '710706', - children: null, - }, - { - label: '涓冨牭鍖�', - value: '710707', - children: null, - }, - ], - }, - { - label: '鏂扮甯�', - value: '710800', - children: [ - { - label: '涓滃尯', - value: '710801', - children: null, - }, - { - label: '鍖楀尯', - value: '710802', - children: null, - }, - { - label: '棣欏北鍖�', - value: '710803', - children: null, - }, - ], - }, - { - label: '鍢変箟甯�', - value: '710900', - children: [ - { - label: '涓滃尯', - value: '710901', - children: null, - }, - { - label: '瑗垮尯', - value: '710902', - children: null, - }, - ], - }, - { - label: '鏂板寳甯�', - value: '711100', - children: [ - { - label: '涓囬噷鍖�', - value: '711130', - children: null, - }, - { - label: '閲戝北鍖�', - value: '711131', - children: null, - }, - { - label: '鏉挎ˉ鍖�', - value: '711132', - children: null, - }, - { - label: '姹愭鍖�', - value: '711133', - children: null, - }, - { - label: '娣卞潙鍖�', - value: '711134', - children: null, - }, - { - label: '鐭崇鍖�', - value: '711135', - children: null, - }, - { - label: '鐟炶姵鍖�', - value: '711136', - children: null, - }, - { - label: '骞虫邯鍖�', - value: '711137', - children: null, - }, - { - label: '鍙屾邯鍖�', - value: '711138', - children: null, - }, - { - label: '璐″鍖�', - value: '711139', - children: null, - }, - { - label: '鏂板簵鍖�', - value: '711140', - children: null, - }, - { - label: '鍧灄鍖�', - value: '711141', - children: null, - }, - { - label: '涔屾潵鍖�', - value: '711142', - children: null, - }, - { - label: '姘稿拰鍖�', - value: '711143', - children: null, - }, - { - label: '涓拰鍖�', - value: '711144', - children: null, - }, - { - label: '鍦熷煄鍖�', - value: '711145', - children: null, - }, - { - label: '涓夊场鍖�', - value: '711146', - children: null, - }, - { - label: '鏍戞灄鍖�', - value: '711147', - children: null, - }, - { - label: '鑾烘瓕鍖�', - value: '711148', - children: null, - }, - { - label: '涓夐噸鍖�', - value: '711149', - children: null, - }, - { - label: '鏂板簞鍖�', - value: '711150', - children: null, - }, - { - label: '娉板北鍖�', - value: '711151', - children: null, - }, - { - label: '鏋楀彛鍖�', - value: '711152', - children: null, - }, - { - label: '鑺︽床鍖�', - value: '711153', - children: null, - }, - { - label: '浜旇偂鍖�', - value: '711154', - children: null, - }, - { - label: '鍏噷鍖�', - value: '711155', - children: null, - }, - { - label: '娣℃按鍖�', - value: '711156', - children: null, - }, - { - label: '涓夎姖鍖�', - value: '711157', - children: null, - }, - { - label: '鐭抽棬鍖�', - value: '711158', - children: null, - }, - ], - }, - { - label: '瀹滃叞鍘�', - value: '711200', - children: [ - { - label: '瀹滃叞甯�', - value: '711214', - children: null, - }, - { - label: '澶村煄闀�', - value: '711215', - children: null, - }, - { - label: '绀佹邯涔�', - value: '711216', - children: null, - }, - { - label: '澹洿涔�', - value: '711217', - children: null, - }, - { - label: '鍛樺北涔�', - value: '711218', - children: null, - }, - { - label: '缃椾笢闀�', - value: '711219', - children: null, - }, - { - label: '涓夋槦涔�', - value: '711220', - children: null, - }, - { - label: '澶у悓涔�', - value: '711221', - children: null, - }, - { - label: '浜旂粨涔�', - value: '711222', - children: null, - }, - { - label: '鍐北涔�', - value: '711223', - children: null, - }, - { - label: '鑻忔境闀�', - value: '711224', - children: null, - }, - { - label: '鍗楁境涔�', - value: '711225', - children: null, - }, - ], - }, - { - label: '鏂扮鍘�', - value: '711300', - children: [ - { - label: '绔瑰寳甯�', - value: '711314', - children: null, - }, - { - label: '婀栧彛涔�', - value: '711315', - children: null, - }, - { - label: '鏂颁赴涔�', - value: '711316', - children: null, - }, - { - label: '鏂板煍闀�', - value: '711317', - children: null, - }, - { - label: '鍏宠タ闀�', - value: '711318', - children: null, - }, - { - label: '鑺庢灄涔�', - value: '711319', - children: null, - }, - { - label: '瀹濆北涔�', - value: '711320', - children: null, - }, - { - label: '绔逛笢闀�', - value: '711321', - children: null, - }, - { - label: '浜斿嘲涔�', - value: '711322', - children: null, - }, - { - label: '妯北涔�', - value: '711323', - children: null, - }, - { - label: '灏栫煶涔�', - value: '711324', - children: null, - }, - { - label: '鍖楀煍涔�', - value: '711325', - children: null, - }, - { - label: '宄ㄧ湁涔�', - value: '711326', - children: null, - }, - ], - }, - { - label: '妗冨洯甯�', - value: '711400', - children: [ - { - label: '涓潨鍖�', - value: '711414', - children: null, - }, - { - label: '骞抽晣鍖�', - value: '711415', - children: null, - }, - { - label: '榫欐江鍖�', - value: '711416', - children: null, - }, - { - label: '鏉ㄦ鍖�', - value: '711417', - children: null, - }, - { - label: '鏂板眿鍖�', - value: '711418', - children: null, - }, - { - label: '瑙傞煶鍖�', - value: '711419', - children: null, - }, - { - label: '妗冨洯鍖�', - value: '711420', - children: null, - }, - { - label: '榫熷北鍖�', - value: '711421', - children: null, - }, - { - label: '鍏痉鍖�', - value: '711422', - children: null, - }, - { - label: '澶ф邯鍖�', - value: '711423', - children: null, - }, - { - label: '澶嶅叴鍖�', - value: '711424', - children: null, - }, - { - label: '澶у洯鍖�', - value: '711425', - children: null, - }, - { - label: '鑺︾鍖�', - value: '711426', - children: null, - }, - ], - }, - { - label: '鑻楁牀鍘�', - value: '711500', - children: [ - { - label: '绔瑰崡闀�', - value: '711519', - children: null, - }, - { - label: '澶翠唤甯�', - value: '711520', - children: null, - }, - { - label: '涓夋咕涔�', - value: '711521', - children: null, - }, - { - label: '鍗楀簞涔�', - value: '711522', - children: null, - }, - { - label: '鐙江涔�', - value: '711523', - children: null, - }, - { - label: '鍚庨緳闀�', - value: '711524', - children: null, - }, - { - label: '閫氶渼闀�', - value: '711525', - children: null, - }, - { - label: '鑻戦噷闀�', - value: '711526', - children: null, - }, - { - label: '鑻楁牀甯�', - value: '711527', - children: null, - }, - { - label: '閫犳ˉ涔�', - value: '711528', - children: null, - }, - { - label: '澶村眿涔�', - value: '711529', - children: null, - }, - { - label: '鍏涔�', - value: '711530', - children: null, - }, - { - label: '澶ф箹涔�', - value: '711531', - children: null, - }, - { - label: '娉板畨涔�', - value: '711532', - children: null, - }, - { - label: '閾滈敚涔�', - value: '711533', - children: null, - }, - { - label: '涓変箟涔�', - value: '711534', - children: null, - }, - { - label: '瑗挎箹涔�', - value: '711535', - children: null, - }, - { - label: '鍗撳叞闀�', - value: '711536', - children: null, - }, - ], - }, - { - label: '褰板寲鍘�', - value: '711700', - children: [ - { - label: '褰板寲甯�', - value: '711727', - children: null, - }, - { - label: '鑺洯涔�', - value: '711728', - children: null, - }, - { - label: '鑺卞潧涔�', - value: '711729', - children: null, - }, - { - label: '绉�姘翠埂', - value: '711730', - children: null, - }, - { - label: '楣挎腐闀�', - value: '711731', - children: null, - }, - { - label: '绂忓叴涔�', - value: '711732', - children: null, - }, - { - label: '绾胯タ涔�', - value: '711733', - children: null, - }, - { - label: '鍜岀編闀�', - value: '711734', - children: null, - }, - { - label: '浼告腐涔�', - value: '711735', - children: null, - }, - { - label: '鍛樻灄甯�', - value: '711736', - children: null, - }, - { - label: '绀惧ご涔�', - value: '711737', - children: null, - }, - { - label: '姘搁潠涔�', - value: '711738', - children: null, - }, - { - label: '鍩斿績涔�', - value: '711739', - children: null, - }, - { - label: '婧箹闀�', - value: '711740', - children: null, - }, - { - label: '澶ф潙涔�', - value: '711741', - children: null, - }, - { - label: '鍩旂洂涔�', - value: '711742', - children: null, - }, - { - label: '鐢颁腑闀�', - value: '711743', - children: null, - }, - { - label: '鍖楁枟闀�', - value: '711744', - children: null, - }, - { - label: '鐢板熬涔�', - value: '711745', - children: null, - }, - { - label: '鍩ゅご涔�', - value: '711746', - children: null, - }, - { - label: '婧窞涔�', - value: '711747', - children: null, - }, - { - label: '绔瑰涔�', - value: '711748', - children: null, - }, - { - label: '浜屾灄闀�', - value: '711749', - children: null, - }, - { - label: '澶у煄涔�', - value: '711750', - children: null, - }, - { - label: '鑺宠嫅涔�', - value: '711751', - children: null, - }, - { - label: '浜屾按涔�', - value: '711752', - children: null, - }, - ], - }, - { - label: '鍢変箟鍘�', - value: '711900', - children: [ - { - label: '鐣矾涔�', - value: '711919', - children: null, - }, - { - label: '姊呭北涔�', - value: '711920', - children: null, - }, - { - label: '绔瑰磶涔�', - value: '711921', - children: null, - }, - { - label: '闃块噷灞变埂', - value: '711922', - children: null, - }, - { - label: '涓煍涔�', - value: '711923', - children: null, - }, - { - label: '澶у煍涔�', - value: '711924', - children: null, - }, - { - label: '姘翠笂涔�', - value: '711925', - children: null, - }, - { - label: '楣胯崏涔�', - value: '711926', - children: null, - }, - { - label: '澶繚甯�', - value: '711927', - children: null, - }, - { - label: '鏈村瓙甯�', - value: '711928', - children: null, - }, - { - label: '涓滅煶涔�', - value: '711929', - children: null, - }, - { - label: '鍏剼涔�', - value: '711930', - children: null, - }, - { - label: '鏂版腐涔�', - value: '711931', - children: null, - }, - { - label: '姘戦泟涔�', - value: '711932', - children: null, - }, - { - label: '澶ф灄闀�', - value: '711933', - children: null, - }, - { - label: '婧彛涔�', - value: '711934', - children: null, - }, - { - label: '涔夌涔�', - value: '711935', - children: null, - }, - { - label: '甯冭闀�', - value: '711936', - children: null, - }, - ], - }, - { - label: '浜戞灄鍘�', - value: '712100', - children: [ - { - label: '鏂楀崡闀�', - value: '712121', - children: null, - }, - { - label: '澶у煠涔�', - value: '712122', - children: null, - }, - { - label: '铏庡熬闀�', - value: '712123', - children: null, - }, - { - label: '鍦熷簱闀�', - value: '712124', - children: null, - }, - { - label: '瑜掑繝涔�', - value: '712125', - children: null, - }, - { - label: '涓滃娍涔�', - value: '712126', - children: null, - }, - { - label: '鍙拌タ涔�', - value: '712127', - children: null, - }, - { - label: '浠戣儗涔�', - value: '712128', - children: null, - }, - { - label: '楹﹀涔�', - value: '712129', - children: null, - }, - { - label: '鏂楀叚甯�', - value: '712130', - children: null, - }, - { - label: '鏋楀唴涔�', - value: '712131', - children: null, - }, - { - label: '鍙ゅ潙涔�', - value: '712132', - children: null, - }, - { - label: '鑾挎涔�', - value: '712133', - children: null, - }, - { - label: '瑗胯灪闀�', - value: '712134', - children: null, - }, - { - label: '浜屼粦涔�', - value: '712135', - children: null, - }, - { - label: '鍖楁腐闀�', - value: '712136', - children: null, - }, - { - label: '姘存灄涔�', - value: '712137', - children: null, - }, - { - label: '鍙f箹涔�', - value: '712138', - children: null, - }, - { - label: '鍥涙箹涔�', - value: '712139', - children: null, - }, - { - label: '鍏冮暱涔�', - value: '712140', - children: null, - }, - ], - }, - { - label: '灞忎笢鍘�', - value: '712400', - children: [ - { - label: '灞忎笢甯�', - value: '712434', - children: null, - }, - { - label: '涓夊湴闂ㄤ埂', - value: '712435', - children: null, - }, - { - label: '闆惧彴涔�', - value: '712436', - children: null, - }, - { - label: '鐜涘涔�', - value: '712437', - children: null, - }, - { - label: '涔濆涔�', - value: '712438', - children: null, - }, - { - label: '閲屾腐涔�', - value: '712439', - children: null, - }, - { - label: '楂樻爲涔�', - value: '712440', - children: null, - }, - { - label: '鐩愬煍涔�', - value: '712441', - children: null, - }, - { - label: '闀挎不涔�', - value: '712442', - children: null, - }, - { - label: '楹熸礇涔�', - value: '712443', - children: null, - }, - { - label: '绔圭敯涔�', - value: '712444', - children: null, - }, - { - label: '鍐呭煍涔�', - value: '712445', - children: null, - }, - { - label: '涓囦腹涔�', - value: '712446', - children: null, - }, - { - label: '娼窞闀�', - value: '712447', - children: null, - }, - { - label: '娉版涔�', - value: '712448', - children: null, - }, - { - label: '鏉ヤ箟涔�', - value: '712449', - children: null, - }, - { - label: '涓囧肠涔�', - value: '712450', - children: null, - }, - { - label: '宕侀《涔�', - value: '712451', - children: null, - }, - { - label: '鏂板煠涔�', - value: '712452', - children: null, - }, - { - label: '鍗楀窞涔�', - value: '712453', - children: null, - }, - { - label: '鏋楄竟涔�', - value: '712454', - children: null, - }, - { - label: '涓滄腐闀�', - value: '712455', - children: null, - }, - { - label: '鐞夌悆涔�', - value: '712456', - children: null, - }, - { - label: '浣冲啲涔�', - value: '712457', - children: null, - }, - { - label: '鏂板洯涔�', - value: '712458', - children: null, - }, - { - label: '鏋嬪涔�', - value: '712459', - children: null, - }, - { - label: '鏋嬪北涔�', - value: '712460', - children: null, - }, - { - label: '鏄ユ棩涔�', - value: '712461', - children: null, - }, - { - label: '鐙瓙涔�', - value: '712462', - children: null, - }, - { - label: '杞﹀煄涔�', - value: '712463', - children: null, - }, - { - label: '鐗′腹涔�', - value: '712464', - children: null, - }, - { - label: '鎭掓槬闀�', - value: '712465', - children: null, - }, - { - label: '婊″窞涔�', - value: '712466', - children: null, - }, - ], - }, - { - label: '鍙颁笢鍘�', - value: '712500', - children: [ - { - label: '鍙颁笢甯�', - value: '712517', - children: null, - }, - { - label: '缁垮矝涔�', - value: '712518', - children: null, - }, - { - label: '鍏板笨涔�', - value: '712519', - children: null, - }, - { - label: '寤跺钩涔�', - value: '712520', - children: null, - }, - { - label: '鍗戝崡涔�', - value: '712521', - children: null, - }, - { - label: '楣块噹涔�', - value: '712522', - children: null, - }, - { - label: '鍏冲北闀�', - value: '712523', - children: null, - }, - { - label: '娴风涔�', - value: '712524', - children: null, - }, - { - label: '姹犱笂涔�', - value: '712525', - children: null, - }, - { - label: '涓滄渤涔�', - value: '712526', - children: null, - }, - { - label: '鎴愬姛闀�', - value: '712527', - children: null, - }, - { - label: '闀挎花涔�', - value: '712528', - children: null, - }, - { - label: '閲戝嘲涔�', - value: '712529', - children: null, - }, - { - label: '澶ф涔�', - value: '712530', - children: null, - }, - { - label: '杈句粊涔�', - value: '712531', - children: null, - }, - { - label: '澶夯閲屼埂', - value: '712532', - children: null, - }, - ], - }, - { - label: '鑺辫幉鍘�', - value: '712600', - children: [ - { - label: '鑺辫幉甯�', - value: '712615', - children: null, - }, - { - label: '鏂板煄涔�', - value: '712616', - children: null, - }, - { - label: '绉�鏋椾埂', - value: '712618', - children: null, - }, - { - label: '鍚夊畨涔�', - value: '712619', - children: null, - }, - { - label: '瀵夸赴涔�', - value: '712620', - children: null, - }, - { - label: '鍑ゆ灄闀�', - value: '712621', - children: null, - }, - { - label: '鍏夊涔�', - value: '712622', - children: null, - }, - { - label: '涓版花涔�', - value: '712623', - children: null, - }, - { - label: '鐟炵涔�', - value: '712624', - children: null, - }, - { - label: '涓囪崳涔�', - value: '712625', - children: null, - }, - { - label: '鐜夐噷闀�', - value: '712626', - children: null, - }, - { - label: '鍗撴邯涔�', - value: '712627', - children: null, - }, - { - label: '瀵岄噷涔�', - value: '712628', - children: null, - }, - ], - }, - { - label: '婢庢箹鍘�', - value: '712700', - children: [ - { - label: '椹叕甯�', - value: '712707', - children: null, - }, - { - label: '瑗垮笨涔�', - value: '712708', - children: null, - }, - { - label: '鏈涘畨涔�', - value: '712709', - children: null, - }, - { - label: '涓冪編涔�', - value: '712710', - children: null, - }, - { - label: '鐧芥矙涔�', - value: '712711', - children: null, - }, - { - label: '婀栬タ涔�', - value: '712712', - children: null, - }, - ], - }, - ], - }, - { - label: '棣欐腐鐗瑰埆琛屾斂鍖�', - value: '810000', - children: [ - { - label: '棣欐腐鐗瑰埆琛屾斂鍖�', - value: '810100', - children: [ - { - label: '涓タ鍖�', - value: '810101', - children: null, - }, - { - label: '涓滃尯', - value: '810102', - children: null, - }, - { - label: '涔濋緳鍩庡尯', - value: '810103', - children: null, - }, - { - label: '瑙傚鍖�', - value: '810104', - children: null, - }, - { - label: '鍗楀尯', - value: '810105', - children: null, - }, - { - label: '娣辨按鍩楀尯', - value: '810106', - children: null, - }, - { - label: '婀句粩鍖�', - value: '810107', - children: null, - }, - { - label: '榛勫ぇ浠欏尯', - value: '810108', - children: null, - }, - { - label: '娌瑰皷鏃哄尯', - value: '810109', - children: null, - }, - { - label: '绂诲矝鍖�', - value: '810110', - children: null, - }, - { - label: '钁甸潚鍖�', - value: '810111', - children: null, - }, - { - label: '鍖楀尯', - value: '810112', - children: null, - }, - { - label: '瑗胯础鍖�', - value: '810113', - children: null, - }, - { - label: '娌欑敯鍖�', - value: '810114', - children: null, - }, - { - label: '灞棬鍖�', - value: '810115', - children: null, - }, - { - label: '澶у煍鍖�', - value: '810116', - children: null, - }, - { - label: '鑽冩咕鍖�', - value: '810117', - children: null, - }, - { - label: '鍏冩湕鍖�', - value: '810118', - children: null, - }, - ], - }, - ], - }, - { - label: '婢抽棬鐗瑰埆琛屾斂鍖�', - value: '820000', - children: [ - { - label: '婢抽棬鐗瑰埆琛屾斂鍖�', - value: '820100', - children: [ - { - label: '婢抽棬鍗婂矝', - value: '820101', - children: null, - }, - { - label: '鍑间粩', - value: '820102', - children: null, - }, - { - label: '璺嚰鍩�', - value: '820103', - children: null, - }, - { - label: '璺幆', - value: '820104', - children: null, - }, - ], - }, - ], - }, -]; diff --git a/custom-tab-bar/data.js b/custom-tab-bar/data.js index e13c724..513be0c 100644 --- a/custom-tab-bar/data.js +++ b/custom-tab-bar/data.js @@ -14,7 +14,7 @@ { text: '瀛︿範', - url: 'pages/goods/category/index', + url: 'pages/student/index', icon: '/static/images/home/learn@2x.png', activeIcon: '/static/images/home/learn-click@2x.png' }, diff --git a/model/activities.js b/model/activities.js deleted file mode 100644 index 31bc3b8..0000000 --- a/model/activities.js +++ /dev/null @@ -1,7 +0,0 @@ -import { getActivity } from './activity'; - -export function getActivityList(baseID = 0, length = 10) { - return new Array(length).fill(0).map((_, idx) => getActivity(idx + baseID)); -} - -export const activityList = getActivityList(); diff --git a/model/activity.js b/model/activity.js deleted file mode 100644 index 34abb07..0000000 --- a/model/activity.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @param {string|number} key 鍞竴鍊� - */ -export function getActivity(key) { - return { - promotionId: `${key}`, - title: `婊″噺婊℃姌鍥炲綊${key}`, - description: null, - promotionCode: 'MERCHANT', - promotionSubCode: key % 2 === 0 ? 'MYJ' : 'MYG', - tag: '婊″噺', - timeType: 1, - startTime: '1588737710000', - endTime: '1601467070000', - teasingStartTime: null, - activityLadder: [{ label: '婊�100鍏冨噺99.9鍏�' }], - }; -} diff --git a/model/address.js b/model/address.js deleted file mode 100644 index c7ae8dc..0000000 --- a/model/address.js +++ /dev/null @@ -1,31 +0,0 @@ -/** 鍦板潃 */ -export function genAddress(id) { - return { - saasId: '88888888', - uid: `8888888820550${id}`, - authToken: null, - id: `${id}`, - addressId: `${id}`, - phone: '17612345678', - name: `娴嬭瘯鐢ㄦ埛${id}`, - countryName: '涓浗', - countryCode: 'chn', - provinceName: '鐢樿們鐪�', - provinceCode: '620000', - cityName: '鐢樺崡钘忔棌鑷不宸�', - cityCode: '623000', - districtName: '纰屾洸鍘�', - districtCode: '623026', - detailAddress: `鏉炬棩榧庣洓澶у帵${id}灞�${id}鍙穈, - isDefault: `${id}` === '0' ? 1 : 0, - addressTag: id === 0 ? '' : '鍏徃', - latitude: '34.59103', - longitude: '102.48699', - storeId: null, - }; -} - -/** 鍦板潃鍒楄〃 */ -export function genAddressList(len = 10) { - return new Array(len).fill(0).map((_, idx) => genAddress(idx)); -} diff --git a/model/cart.js b/model/cart.js deleted file mode 100644 index d0ad6c5..0000000 --- a/model/cart.js +++ /dev/null @@ -1,324 +0,0 @@ -import { mockIp, mockReqId } from '../utils/mock'; - -export function genCartGroupData() { - const resp = { - data: { - isNotEmpty: true, - storeGoods: [ - { - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - storeStatus: 1, - totalDiscountSalePrice: '9990', - promotionGoodsList: [ - { - title: '婊″噺婊℃姌鍥炲綊', - promotionCode: 'MERCHANT', - promotionSubCode: 'MYJ', - promotionId: '159174555838121985', - tagText: ['婊�100鍏冨噺99.9鍏�'], - promotionStatus: 3, - tag: '婊″噺', - description: '婊�100鍏冨噺99.9鍏�,宸插噺99.9鍏�', - doorSillRemain: null, - isNeedAddOnShop: 0, - goodsPromotionList: [ - { - uid: '88888888205468', - saasId: '88888888', - storeId: '1000', - spuId: '12', - skuId: '135691622', - isSelected: 1, - thumb: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3a.png', - title: - '鑵捐鏋佸厜鐩掑瓙4鏅鸿兘缃戠粶鐢佃鏈洪《鐩�6K鍗冨厗缃戠粶鏈洪《鐩�4K楂樺垎杈ㄧ巼', - primaryImage: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3a.png', - quantity: 1, - stockStatus: true, - stockQuantity: 3, - price: '9900', - originPrice: '16900', - tagPrice: null, - titlePrefixTags: [{ text: '鏂板搧' }, { text: '鐏垎' }], - roomId: null, - specInfo: [ - { - specTitle: '棰滆壊', - specValue: '缁忓吀鐧�', - }, - { - specTitle: '绫诲瀷', - specValue: '缁忓吀濂楄', - }, - ], - joinCartTime: '2020-06-29T07:55:40.000+0000', - available: 1, - putOnSale: 1, - etitle: null, - }, - { - uid: '88888888205468', - saasId: '88888888', - storeId: '1000', - spuId: '18', - skuId: '135681631', - isSelected: 1, - thumb: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - title: - '鐧借壊鐭杩炶。瑁欒嵎鍙惰竟瑁欐憜瀹芥澗闊╃増浼戦棽绾櫧娓呯埥浼橀泤杩炶。瑁�', - primaryImage: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - quantity: 1, - stockStatus: true, - stockQuantity: 177, - price: '29800', - originPrice: '40000', - tagPrice: null, - titlePrefixTags: null, - roomId: null, - specInfo: [ - { - specTitle: '棰滆壊', - specValue: '绫宠壊鑽峰彾杈�', - }, - { - specTitle: '灏虹爜', - specValue: 'M', - }, - ], - joinCartTime: '2020-06-29T07:55:27.000+0000', - available: 1, - putOnSale: 1, - etitle: null, - }, - { - uid: '88888888205468', - saasId: '88888888', - storeId: '1000', - spuId: '13', - skuId: '135698362', - isSelected: 1, - thumb: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png', - title: - '甯﹀附鍗堜紤姣檸骞存澶氬姛鑳藉姞鍘氬姞澶у姞缁掔畝绾﹀鍔熻兘鍗堜紤姣繛甯芥姭鑲�', - primaryImage: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png', - quantity: 13, - stockStatus: true, - stockQuantity: 9, - price: '29900', - originPrice: '0', - tagPrice: null, - titlePrefixTags: [{ text: '鐏垎' }], - roomId: null, - specInfo: [ - { - specTitle: '棰滆壊', - specValue: '娴呯伆鑹�', - }, - { - specTitle: '灏虹爜', - specValue: 'M', - }, - ], - joinCartTime: '2020-06-29T07:54:43.000+0000', - available: 1, - putOnSale: 1, - etitle: null, - }, - { - uid: '88888888205468', - saasId: '88888888', - storeId: '1000', - spuId: '7', - skuId: '135681625', - isSelected: 1, - thumb: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2b.png', - title: - '涓嶉攬閽㈠垁鍙夊嫼濂楄瀹剁敤瑗块椁愬叿ins绠�绾﹁�愮敤涓嶉攬閽㈤噾鑹查摱鑹插彲閫�', - primaryImage: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2b.png', - quantity: 1, - stockStatus: true, - stockQuantity: 0, - price: '29900', - originPrice: '29900', - tagPrice: null, - titlePrefixTags: null, - roomId: null, - specInfo: [ - { - specTitle: '棰滆壊', - specValue: '濂堕粍鑹�', - }, - { - specTitle: '鏁伴噺', - specValue: '鍏欢濂�', - }, - ], - joinCartTime: '2020-06-29T07:55:00.000+0000', - available: 1, - putOnSale: 1, - etitle: null, - }, - ], - lastJoinTime: '2020-06-29T07:55:40.000+0000', - }, - { - title: null, - promotionCode: 'EMPTY_PROMOTION', - promotionSubCode: null, - promotionId: null, - tagText: null, - promotionStatus: null, - tag: null, - description: null, - doorSillRemain: null, - isNeedAddOnShop: 0, - goodsPromotionList: [ - { - uid: '88888888205468', - saasId: '88888888', - storeId: '1000', - spuId: '11', - skuId: '135691629', - isSelected: 0, - thumb: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17a.png', - title: '杩愬姩杩炲附鎷夐摼鍗。浼戦棽寮�琛暱琚栧鑹茶繍鍔ㄧ粏缁掗潰鏂欒繍鍔ㄤ笂琛�', - primaryImage: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17a.png', - quantity: 1, - stockStatus: false, - stockQuantity: 0, - price: '25900', - originPrice: '39900', - tagPrice: null, - tagText: null, - roomId: null, - specInfo: [ - { - specTitle: '棰滆壊', - specValue: '鍐涚豢鑹�', - }, - { - specTitle: '灏虹爜', - specValue: 'S', - }, - ], - joinCartTime: '2020-04-24T06:26:48.000+0000', - available: 1, - putOnSale: 1, - etitle: null, - }, - { - uid: '88888888205468', - saasId: '88888888', - storeId: '1000', - spuId: '5', - skuId: '135691635', - isSelected: 0, - thumb: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2a.png', - title: - '杩蜂綘渚挎惡楂橀鍊艰摑鐗欐棤绾胯�虫満绔嬩綋澹板彧鑳借Е鎺у紡鎿嶄綔绠�绾︾珛浣撳0鑰虫満', - primaryImage: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2a.png', - quantity: 1, - stockStatus: true, - stockQuantity: 96, - price: '29000', - originPrice: '29900', - tagPrice: null, - tagText: null, - roomId: null, - specInfo: [ - { - specTitle: '棰滆壊', - specValue: '榛戣壊', - }, - { - specTitle: '绫诲瀷', - specValue: '绠�绾︽', - }, - ], - joinCartTime: '2020-06-29T07:55:17.000+0000', - available: 1, - putOnSale: 1, - etitle: null, - }, - ], - lastJoinTime: null, - }, - ], - lastJoinTime: '2020-06-29T07:55:40.000+0000', - postageFreePromotionVo: { - title: null, - promotionCode: null, - promotionSubCode: null, - promotionId: null, - tagText: null, - promotionStatus: null, - tag: null, - description: null, - doorSillRemain: null, - isNeedAddOnShop: 0, - }, - }, - ], - invalidGoodItems: [ - { - uid: '88888888205468', - saasId: '88888888', - storeId: '1000', - spuId: '1', - skuId: '135691631', - isSelected: 1, - thumb: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - title: '绾壊绾浼戦棽鍦嗛鐭T鎭ょ函鐧戒翰鑲ゅ帤鏌旇蒋缁嗚吇闈㈡枡绾櫧鐭濂楀ごT鎭�', - primaryImage: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - quantity: 8, - stockStatus: true, - stockQuantity: 177, - price: '26900', - originPrice: '31900', - tagPrice: null, - tagText: null, - roomId: null, - specInfo: [ - { - specTitle: '棰滆壊', - specValue: '鐧借壊', - }, - { - specTitle: '灏虹爜', - specValue: 'S', - }, - ], - joinCartTime: '2020-04-28T04:03:59.000+0000', - available: 1, - putOnSale: 1, - etitle: null, - }, - ], - isAllSelected: false, - selectedGoodsCount: 16, - totalAmount: '179997', - totalDiscountAmount: '110000', - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 269, - success: true, - }; - return resp; -} diff --git a/model/category.js b/model/category.js deleted file mode 100644 index 81b7502..0000000 --- a/model/category.js +++ /dev/null @@ -1,206 +0,0 @@ -export function getCategoryList() { - return [ - { - groupId: '24948', - name: '濂宠', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/miniapp/category/category-default.png', - children: [ - { - groupId: '249481', - name: '濂宠', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/miniapp/category/category-default.png', - children: [ - { - groupId: '249480', - name: '鍗。', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-1.png', - }, - { - groupId: '249480', - name: '姣涘憿澶栧', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-2.png', - }, - { - groupId: '249480', - name: '闆汉琛�', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-3.png', - }, - { - groupId: '249480', - name: '缇界粧鏈�', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-4.png', - }, - { - groupId: '249480', - name: '姣涜。', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-5.png', - }, - { - groupId: '249480', - name: '妫夎。', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-6.png', - }, - { - groupId: '249480', - name: '瑗胯', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-7.png', - }, - { - groupId: '249480', - name: '椹敳', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-8.png', - }, - { - groupId: '249480', - name: '杩炶。瑁�', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-9.png', - }, - { - groupId: '249480', - name: '鍗婅韩瑁�', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-10.png', - }, - { - groupId: '249480', - name: '瑁ゅ瓙', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-11.png', - }, - ], - }, - ], - }, - { - groupId: '24948', - name: '鐢疯', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/miniapp/category/category-default.png', - children: [ - { - groupId: '249481', - name: '鐢疯', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/miniapp/category/category-default.png', - children: [ - { - groupId: '249480', - name: '鍗。', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-1.png', - }, - { - groupId: '249480', - name: '瑁ゅ瓙', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-11.png', - }, - { - groupId: '249480', - name: '瑗胯', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-7.png', - }, - { - groupId: '249480', - name: '缇界粧鏈�', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-4.png', - }, - { - groupId: '249480', - name: '椹敳', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-8.png', - }, - ], - }, - ], - }, - { - groupId: '24948', - name: '鍎跨瑁�', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/miniapp/category/category-default.png', - children: [ - { - groupId: '249481', - name: '鍎跨瑁�', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/miniapp/category/category-default.png', - children: [ - { - groupId: '249480', - name: '椹敳', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-8.png', - }, - { - groupId: '249480', - name: '瑁ゅ瓙', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-11.png', - }, - { - groupId: '249480', - name: '杩炶。瑁�', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/classify/img-9.png', - }, - { - groupId: '249480', - name: '鍏朵粬', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3b.png', - }, - ], - }, - ], - }, - { - groupId: '24948', - name: '缇庡', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/miniapp/category/category-default.png', - children: [ - { - groupId: '249481', - name: '缇庡', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/miniapp/category/category-default.png', - children: [ - { - groupId: '249480', - name: '鍞囬噳', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/mz-20a1.png', - }, - { - groupId: '249480', - name: '缇庡铔�', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/mz-11a1.png', - }, - { - groupId: '249480', - name: '鐪煎奖', - thumbnail: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/mz-12b.png', - }, - ], - }, - ], - }, - ]; -} diff --git a/model/comments.js b/model/comments.js deleted file mode 100644 index 78dd61d..0000000 --- a/model/comments.js +++ /dev/null @@ -1,338 +0,0 @@ -/** - * * @param {number} spuId - * @param {number} pageNum - * @param {number} pageSize - * @param {number} commentsLevel - * @param {boolean} hasImage - */ -export function getGoodsAllComments(params) { - const { hasImage } = params.queryParameter; - if (hasImage) { - return { - pageNum: 1, - pageSize: 10, - totalCount: '1', - pageList: [ - { - spuId: '1722045', - skuId: '0', - specInfo: '', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentResources: [ - { - src: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - type: 'image', - }, - { - src: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/comment-video.mp4', - type: 'video', - coverSrc: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - }, - { - src: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/comment-video.mp4', - type: 'video', - coverSrc: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - }, - { - src: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/comment-video.mp4', - type: 'video', - coverSrc: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - }, - ], - commentScore: 4, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1591953561000', - isAutoComment: false, - sellerReply: - '浜诧紝浣犲ソ锛屾垜浠細鑱旂郴鍟嗗鍜屽巶鍟嗙粰鎮ㄤ竴涓弧鎰忕殑绛斿璇蜂竴瀹氬Ε鍠勪繚绠″ソ鍙戠エ', - goodsDetailInfo: '棰滆壊:绾噣鐧� 灏虹爜:S鐮�', - }, - { - spuId: '1722045', - skuId: '0', - specInfo: '', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentResources: [ - { - src: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - type: 'image', - }, - ], - commentScore: 4, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1591953561000', - isAutoComment: false, - sellerReply: - '浜诧紝浣犲ソ锛屾垜浠細鑱旂郴鍟嗗鍜屽巶鍟嗙粰鎮ㄤ竴涓弧鎰忕殑绛斿璇蜂竴瀹氬Ε鍠勪繚绠″ソ鍙戠エ', - goodsDetailInfo: '棰滆壊:绾噣鐧� 灏虹爜:S鐮�', - }, - { - spuId: '1722045', - skuId: '0', - specInfo: '', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentResources: [ - { - src: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - type: 'image', - }, - { - src: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/comment-video.mp4', - type: 'video', - coverSrc: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - }, - ], - commentScore: 4, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1591953561000', - isAutoComment: false, - sellerReply: - '浜诧紝浣犲ソ锛屾垜浠細鑱旂郴鍟嗗鍜屽巶鍟嗙粰鎮ㄤ竴涓弧鎰忕殑绛斿璇蜂竴瀹氬Ε鍠勪繚绠″ソ鍙戠エ', - goodsDetailInfo: '棰滆壊:绾噣鐧� 灏虹爜:S鐮�', - }, - { - spuId: '1722045', - skuId: '0', - specInfo: '', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentResources: [ - { - src: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - type: 'image', - }, - { - src: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/comment-video.mp4', - type: 'video', - coverSrc: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - }, - { - src: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/comment-video.mp4', - type: 'video', - coverSrc: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - }, - ], - commentScore: 4, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1591953561000', - isAutoComment: false, - sellerReply: - '浜诧紝浣犲ソ锛屾垜浠細鑱旂郴鍟嗗鍜屽巶鍟嗙粰鎮ㄤ竴涓弧鎰忕殑绛斿璇蜂竴瀹氬Ε鍠勪繚绠″ソ鍙戠エ', - goodsDetailInfo: '棰滆壊:绾噣鐧� 灏虹爜:S鐮�', - }, - ], - }; - } - return { - pageNum: 1, - pageSize: 10, - totalCount: '47', - pageList: [ - { - spuId: '1722045', - skuId: '1697694', - specInfo: '寰堜笉閿�', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentImageUrls: null, - commentScore: 1, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1592224320000', - isAutoComment: false, - sellerReply: - '浜诧紝浣犲ソ锛屾垜浠細鑱旂郴鍟嗗鍜屽巶鍟嗙粰鎮ㄤ竴涓弧鎰忕殑绛斿璇蜂竴瀹氬Ε鍠勪繚绠″ソ鍙戠エ', - goodsDetailInfo: '棰滆壊:绾噣鐧� 灏虹爜:S鐮�', - }, - { - spuId: '1722045', - skuId: '1697693', - specInfo: '寰堥�傚悎', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentImageUrls: null, - commentScore: 1, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1592224320000', - isAutoComment: false, - sellerReply: - '浜诧紝浣犲ソ锛屾垜浠細鑱旂郴鍟嗗鍜屽巶鍟嗙粰鎮ㄤ竴涓弧鎰忕殑绛斿璇蜂竴瀹氬Ε鍠勪繚绠″ソ鍙戠エ', - goodsDetailInfo: '棰滆壊:绾噣鐧� 灏虹爜:S鐮�', - }, - { - spuId: '1722045', - skuId: '1697694', - specInfo: 'NICE', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentImageUrls: null, - commentScore: 5, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1592218074000', - isAutoComment: true, - sellerReply: - '浜诧紝浣犲ソ锛屾垜浠細鑱旂郴鍟嗗鍜屽巶鍟嗙粰鎮ㄤ竴涓弧鎰忕殑绛斿璇蜂竴瀹氬Ε鍠勪繚绠″ソ鍙戠エ', - }, - { - spuId: '1722045', - skuId: '0', - specInfo: '', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentImageUrls: null, - commentScore: 5, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1592218074000', - isAutoComment: false, - goodsDetailInfo: '棰滆壊:绾噣鐧� 灏虹爜:S鐮�', - }, - { - spuId: '1722045', - skuId: '1697694', - specInfo: '娴嬭瘯dr瓒呴暱:dr涓撶敤瓒呴暱;bwtgg01:fff', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentImageUrls: null, - commentScore: 5, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1592217607000', - isAutoComment: false, - }, - { - spuId: '1722045', - skuId: '1697693', - specInfo: '娴嬭瘯dr瓒呴暱:瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1;bwtgg01:bbb', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentImageUrls: null, - commentScore: 4, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1592217607000', - isAutoComment: false, - }, - { - spuId: '1722045', - skuId: '1697694', - specInfo: '娴嬭瘯dr瓒呴暱:dr涓撶敤瓒呴暱;bwtgg01:fff', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentImageUrls: null, - commentScore: 5, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1592205599000', - isAutoComment: false, - }, - { - spuId: '1722045', - skuId: '1697694', - specInfo: '娴嬭瘯dr瓒呴暱:dr涓撶敤瓒呴暱;bwtgg01:fff', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentImageUrls: null, - commentScore: 5, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1592188822000', - isAutoComment: false, - }, - { - spuId: '1722045', - skuId: '1697694', - specInfo: '娴嬭瘯dr瓒呴暱:dr涓撶敤瓒呴暱;bwtgg01:fff', - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentImageUrls: null, - commentScore: 5, - uid: '88881055835', - userName: 'Max', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1593792002000', - isAutoComment: true, - }, - { - spuId: '1722045', - skuId: '1697694', - specInfo: '娴嬭瘯dr瓒呴暱:dr涓撶敤瓒呴暱;bwtgg01:fff', - commentContent: '', - commentImageUrls: null, - commentScore: 5, - uid: '88881055835', - userName: 'Max', - userHeadUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/avatar/avatar1.png', - isAnonymity: false, - commentTime: '1593792001000', - isAutoComment: true, - }, - ], - }; -} - -export function getGoodsCommentsCount() { - return { - commentCount: '47', - badCount: '0', - middleCount: '2', - goodCount: '45', - hasImageCount: '1', - goodRate: 95.7, - uidCount: '0', - }; -} diff --git a/model/comments/queryDetail.js b/model/comments/queryDetail.js deleted file mode 100644 index 9ce2eb8..0000000 --- a/model/comments/queryDetail.js +++ /dev/null @@ -1,50 +0,0 @@ -const queryDetail = { - commentInfos: [ - { - id: '647984992708380600', - uid: '', - userName: 'Dean Cheng', - userHeadUrl: - 'https://bizmid-material-qa-1302115263.cos.ap-guangzhou.myqcloud.com/comment/default_head.png', - commentId: '1937712', - commentIdName: '灏忛箍鍟嗗搧', - commentIdImageUrl: - 'https://bizmid-material-qa-1302115263.file.myqcloud.com/persist/4bf2ded7-1759-4821-919c-cc4960e14120/1078823925183295617/100000114727/material/1/cdbeb389be64427b8c165627895ff0bc-1610425563793-%E5%A4%B4%E5%83%8F.png', - commentStage: 1, - commentCheckStatus: 2, - commentIdType: 1, - content: '', - commentInfo: { - score: null, - content: '', - medias: [], - commentTime: '1617872404000', - }, - isAgainComment: 0, - commentHasAgainComment: 0, - isAnonymous: 0, - replyList: [], - specification: '棰滆壊:鐧借壊 ', - specificationJson: '{"棰滆壊":"鐧借壊"}', - commentExtendId: '1937713', - commentTime: '1617872404000', - score: 0, - goodsScore: null, - freightScore: null, - serviceScore: null, - medias: [], - againCommentList: null, - }, - ], - logisticsScore: null, - serviceScore: null, -}; - -/** - * @param {string} skuId - * @param {string} spuId - * @param {string} orderNo - */ -export function queryCommentDetail() { - return queryDetail; -} diff --git a/model/coupon.js b/model/coupon.js deleted file mode 100644 index a41ff8b..0000000 --- a/model/coupon.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 浼樻儬鍒� - * - * @typedef {'default'|'useless'|'disabled'} CouponCardStatus - * @typedef {'discount'|'price'} CouponCardType - * - * @param {number} [id] - * @param {CouponCardStatus} [status] - * @param {CouponCardType} [type] - */ -export function getCoupon(id = 0, status = 'default', type = (id % 2) + 1) { - return { - /** key */ - key: `${id}`, - /** 浼樻儬鍒哥姸鎬� */ - status, - /** 浼樻儬鍒哥被鍨� */ - type, - /** 鎶樻墸鎴栬�呮弧鍑忓�� */ - value: type === 2 ? 5.5 : 1800, - /** 鏍囩 */ - tag: '', - /** 鎻忚堪 */ - desc: parseInt(id) > 0 ? `婊�${parseInt(id) * 100}鍏冨彲鐢╜ : '鏃犻棬妲涗娇鐢�', - /** 璁㈠崟搴曚环,婊鍏� */ - base: 10000 * (parseInt(id) || 0), - /** 鏍囬 */ - title: type === 2 ? `鐢熼矞鎶樻墸鍒� - ${id}` : `鐢熼矞婊″噺鍒� - ${id}`, - /** 鏈夋晥鏃堕棿闄愬埗 */ - timeLimit: '2019.11.18-2023.12.18', - /** 璐у竵绗﹀彿 */ - currency: '楼', - }; -} - -/** 浼樻儬鍒稿垪琛� */ -export function getCouponList(status = 'default', length = 10) { - return new Array(length).fill(0).map((_, idx) => getCoupon(idx, status)); -} diff --git a/model/detailsComments.js b/model/detailsComments.js deleted file mode 100644 index 82fc887..0000000 --- a/model/detailsComments.js +++ /dev/null @@ -1,30 +0,0 @@ -export function getGoodsDetailsComments() { - return { - homePageComments: [ - { - spuId: '1722045', - skuId: null, - specInfo: null, - commentContent: - '鏀跺埌璐т簡锛岀涓�鏃堕棿璇曚簡涓�涓嬶紝寰堟紓浜壒鍒枩娆紝澶х埍澶х埍锛岄鑹蹭篃寰堝ソ鐪嬨�傛妫�!', - commentScore: 4, - uid: '88881048075', - userName: 'Dean', - userHeadUrl: - 'https://wx.qlogo.cn/mmopen/vi_32/5mKrvn3ibyDNaDZSZics3aoKlz1cv0icqn4EruVm6gKjsK0xvZZhC2hkUkRWGxlIzOEc4600JkzKn9icOLE6zjgsxw/132', - }, - ], - }; -} - -export function getGoodsDetailsCommentsCount() { - return { - commentCount: '47', - badCount: '0', - middleCount: '2', - goodCount: '45', - hasImageCount: '1', - goodRate: 95.7, - uidCount: '0', - }; -} diff --git a/model/good.js b/model/good.js deleted file mode 100644 index 9410d37..0000000 --- a/model/good.js +++ /dev/null @@ -1,1916 +0,0 @@ -import { cdnBase } from '../config/index'; -const imgPrefix = cdnBase; - -const defaultDesc = [`${imgPrefix}/goods/details-1.png`]; - -const allGoods = [ - { - saasId: '88888888', - storeId: '1000', - spuId: '0', - title: '鐧借壊鐭杩炶。瑁欒嵎鍙惰竟瑁欐憜瀹芥澗闊╃増浼戦棽绾櫧娓呯埥浼橀泤杩炶。瑁�', - primaryImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - images: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09b.png', - ], - video: null, - available: 1, - minSalePrice: 29800, - minLinePrice: 29800, - maxSalePrice: 29800, - maxLinePrice: 40000, - spuStockQuantity: 510, - soldNum: 1020, - isPutOnSale: 1, - categoryIds: [ - '127880527393854975', - '127880527393854976', - '127880537778953984', - ], - specList: [ - { - specId: '10011', - title: '棰滆壊', - specValueList: [ - { - specValueId: '10012', - specId: null, - saasId: null, - specValue: '绫宠壊鑽峰彾杈�', - image: null, - }, - ], - }, - { - specId: '10013', - title: '灏虹爜', - specValueList: [ - { - specValueId: '11014', - specId: null, - saasId: null, - specValue: 'S', - image: null, - }, - { - specValueId: '10014', - specId: null, - saasId: null, - specValue: 'M', - image: null, - }, - { - specValueId: '11013', - specId: null, - saasId: null, - specValue: 'L', - image: null, - }, - ], - }, - ], - skuList: [ - { - skuId: '135676631', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - specInfo: [ - { - specId: '10011', - specTitle: null, - specValueId: '10012', - specValue: null, - }, - { - specId: '10013', - specTitle: null, - specValueId: '11014', - specValue: null, - }, - ], - priceInfo: [ - { priceType: 1, price: '29800', priceTypeName: null }, - { priceType: 2, price: '40000', priceTypeName: null }, - ], - stockInfo: { - stockQuantity: 175, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: { value: null, unit: 'KG' }, - volume: null, - profitPrice: null, - }, - { - skuId: '135676632', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - specInfo: [ - { - specId: '10011', - specTitle: null, - specValueId: '10012', - specValue: null, - }, - { - specId: '10013', - specTitle: null, - specValueId: '11013', - specValue: null, - }, - ], - priceInfo: [ - { priceType: 1, price: '29800', priceTypeName: null }, - { priceType: 2, price: '40000', priceTypeName: null }, - ], - stockInfo: { - stockQuantity: 158, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: { value: null, unit: 'KG' }, - volume: null, - profitPrice: null, - }, - { - skuId: '135681631', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - specInfo: [ - { - specId: '10011', - specTitle: null, - specValueId: '10012', - specValue: null, - }, - { - specId: '10013', - specTitle: null, - specValueId: '10014', - specValue: null, - }, - ], - priceInfo: [ - { priceType: 1, price: '29800', priceTypeName: null }, - { priceType: 2, price: '40000', priceTypeName: null }, - ], - stockInfo: { - stockQuantity: 177, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: { value: null, unit: 'KG' }, - volume: null, - profitPrice: null, - }, - ], - spuTagList: [{ id: '13001', title: '闄愭椂鎶㈣喘', image: null }], - limitInfo: [ - { - text: '闄愯喘5浠�', - }, - ], - desc: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09c.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09d.png', - ], - etitle: '', - }, - { - saasId: '88888888', - storeId: '1000', - spuId: '135686633', - title: '绾壊绾浼戦棽鍦嗛鐭T鎭ょ函鐧戒翰鑲ゅ帤鏌旇蒋缁嗚吇闈㈡枡绾櫧鐭濂楀ごT鎭�', - primaryImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - minSalePrice: '25900', - minLinePrice: '31900', - maxSalePrice: '26900', - maxLinePrice: '31900', - isSoldOut: false, - images: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08a1.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - ], - groupIdList: ['15029', '14023'], - spuTagList: [ - { - id: null, - title: '2020澶忓鏂版', - image: null, - }, - ], - skuList: [ - { - skuId: '135686634', - skuImage: null, - specInfo: [ - { - specId: '10000', - specTitle: null, - specValueId: '10001', - specValue: '鐧借壊', - }, - { - specId: '10002', - specTitle: null, - specValueId: '10003', - specValue: 'M', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '25900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '31900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: -9, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135691631', - skuImage: null, - specInfo: [ - { - specId: '10000', - specTitle: null, - specValueId: '10001', - specValue: '鐧借壊', - }, - { - specId: '10002', - specTitle: null, - specValueId: '11003', - specValue: 'S', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '26900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '31900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 177, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135691632', - skuImage: null, - specInfo: [ - { - specId: '10000', - specTitle: null, - specValueId: '10001', - specValue: '鐧借壊', - }, - { - specId: '10002', - specTitle: null, - specValueId: '11002', - specValue: 'L', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '26900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '31900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 194, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - ], - isAvailable: 1, - spuStockQuantity: 371, - soldNum: 1032, - isPutOnSale: 1, - specList: [ - { - specId: '10000', - title: '棰滆壊', - specValueList: [ - { - specValueId: '10001', - specId: '10000', - saasId: '88888888', - specValue: '鐧借壊', - image: '', - }, - ], - }, - { - specId: '10002', - title: '灏虹爜', - specValueList: [ - { - specValueId: '11003', - specId: '10002', - saasId: '88888888', - specValue: 'S', - image: '', - }, - { - specValueId: '10003', - specId: '10002', - saasId: '88888888', - specValue: 'M', - image: '', - }, - { - specValueId: '11002', - specId: '10002', - saasId: '88888888', - specValue: 'L', - image: '', - }, - ], - }, - ], - promotionList: null, - minProfitPrice: null, - etitle: '', - desc: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08c.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08d.png', - ], - }, - { - saasId: '88888888', - storeId: '1000', - spuId: '135691628', - title: '杩愬姩杩炲附鎷夐摼鍗。浼戦棽寮�琛暱琚栧鑹茶繍鍔ㄧ粏缁掗潰鏂欒繍鍔ㄤ笂琛�', - images: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17a1.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17b.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17b1.png', - ], - primaryImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17a.png', - minSalePrice: '25900', - minLinePrice: '39900', - maxSalePrice: '25900', - maxLinePrice: '39900', - isSoldOut: true, - groupIdList: ['15029', '14023'], - spuTagList: [ - { - id: null, - title: '2020澶忓鏂版', - image: null, - }, - ], - skuList: [ - { - skuId: '135686631', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904180768617216', - specValue: '鍐涚豢鑹�', - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904862494014208', - specValue: 'XS', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '25900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '39900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 0, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135686632', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904180768617216', - specValue: '鍐涚豢鑹�', - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904862007474176', - specValue: 'M', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '25900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '39900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 0, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135691629', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904180768617216', - specValue: '鍐涚豢鑹�', - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904862175246592', - specValue: 'S', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '25900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '39900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 0, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135691630', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904180768617216', - specValue: '鍐涚豢鑹�', - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904861755815680', - specValue: 'L', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '25900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '39900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 0, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - ], - isAvailable: 1, - spuStockQuantity: 0, - soldNum: 1022, - isPutOnSale: 1, - specList: [ - { - specId: '127904180600844800', - title: '棰滆壊', - specValueList: [ - { - specValueId: '127904180768617216', - specId: '127904180600844800', - saasId: '88888888', - specValue: '鍐涚豢鑹�', - image: '', - }, - ], - }, - { - specId: '127904861604820480', - title: '灏虹爜', - specValueList: [ - { - specValueId: '127904862494014208', - specId: '127904861604820480', - saasId: '88888888', - specValue: 'XS', - image: '', - }, - { - specValueId: '127904862175246592', - specId: '127904861604820480', - saasId: '88888888', - specValue: 'S', - image: '', - }, - { - specValueId: '127904862007474176', - specId: '127904861604820480', - saasId: '88888888', - specValue: 'M', - image: '', - }, - { - specValueId: '127904861755815680', - specId: '127904861604820480', - saasId: '88888888', - specValue: 'L', - image: '', - }, - ], - }, - ], - promotionList: null, - minProfitPrice: null, - etitle: '', - desc: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17c.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17d.png', - ], - }, - { - saasId: '88888888', - storeId: '1000', - spuId: '135686623', - title: '鑵捐鏋佸厜鐩掑瓙4鏅鸿兘缃戠粶鐢佃鏈洪《鐩�6K鍗冨厗缃戠粶鏈洪《鐩�4K楂樺垎杈ㄧ巼', - primaryImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3a.png', - images: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3b.png', - ], - minSalePrice: '9900', - minLinePrice: '16900', - maxSalePrice: '10900', - maxLinePrice: '16900', - isSoldOut: false, - groupIdList: [ - '15029', - '15030', - '14023', - '127886731843219200', - '127886732665303040', - '127886733101511680', - '127886733923595520', - '14025', - '127886726071855616', - '14026', - '127886727481142784', - '127886731440566784', - ], - spuTagList: [ - { - id: null, - title: '鑱斿悕绯诲垪', - image: null, - }, - ], - skuList: [ - { - skuId: '135686624', - skuImage: null, - specInfo: [ - { - specId: '10000', - specTitle: null, - specValueId: '10001', - specValue: '缁忓吀鐧�', - }, - { - specId: '10002', - specTitle: null, - specValueId: '10003', - specValue: '鑺傝兘濂楄', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '9900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '16900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 98, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135686625', - skuImage: null, - specInfo: [ - { - specId: '10000', - specTitle: null, - specValueId: '11000', - specValue: '璐垫棌闈�', - }, - { - specId: '10002', - specTitle: null, - specValueId: '11003', - specValue: '缁忓吀濂楄', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '9900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '16900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 100, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135686626', - skuImage: null, - specInfo: [ - { - specId: '10000', - specTitle: null, - specValueId: '11000', - specValue: '缁忓吀鐧�', - }, - { - specId: '10002', - specTitle: null, - specValueId: '11002', - specValue: '灏婁韩绀肩洅瑁�', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '9900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '16900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 100, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135691622', - skuImage: null, - specInfo: [ - { - specId: '10000', - specTitle: null, - specValueId: '10001', - specValue: '缁忓吀鐧�', - }, - { - specId: '10002', - specTitle: null, - specValueId: '11003', - specValue: 'S', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '9900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '16900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 100, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135691623', - skuImage: null, - specInfo: [ - { - specId: '10000', - specTitle: null, - specValueId: '10001', - specValue: '缁忓吀鐧�', - }, - { - specId: '10002', - specTitle: null, - specValueId: '11002', - specValue: '灏婁韩绀肩洅瑁�', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '10900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '16900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 100, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135691624', - skuImage: null, - specInfo: [ - { - specId: '10000', - specTitle: null, - specValueId: '11000', - specValue: '璐垫棌闈�', - }, - { - specId: '10002', - specTitle: null, - specValueId: '10003', - specValue: '鑺傝兘濂楄', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '9900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '16900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 100, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - ], - isAvailable: 1, - spuStockQuantity: 598, - soldNum: 102, - isPutOnSale: 1, - desc: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3c.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3d.png', - ], - specList: [ - { - specId: '10000', - title: '棰滆壊', - specValueList: [ - { - specValueId: '10001', - specId: '10000', - saasId: '88888888', - specValue: '缁忓吀鐧�', - image: '', - }, - { - specValueId: '11000', - specId: '10000', - saasId: '88888888', - specValue: '璐垫棌闈�', - image: '', - }, - ], - }, - { - specId: '10002', - title: '灏虹爜', - specValueList: [ - { - specValueId: '11003', - specId: '10002', - saasId: '88888888', - specValue: '缁忓吀濂楄', - image: '', - }, - { - specValueId: '10003', - specId: '10002', - saasId: '88888888', - specValue: '鑺傝兘濂楄', - image: '', - }, - { - specValueId: '11002', - specId: '10002', - saasId: '88888888', - specValue: '灏婁韩绀肩洅瑁�', - image: '', - }, - ], - }, - ], - promotionList: null, - minProfitPrice: null, - etitle: '', - }, - { - saasId: '88888888', - storeId: '1000', - spuId: '135681628', - title: '甯﹀附鍗堜紤姣檸骞存澶氬姛鑳藉姞鍘氬姞澶у姞缁掔畝绾﹀鍔熻兘鍗堜紤姣繛甯芥姭鑲�', - primaryImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png', - images: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a1.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3b.png', - ], - minSalePrice: '29900', - minLinePrice: '39900', - maxSalePrice: '39900', - maxLinePrice: '39900', - isSoldOut: false, - groupIdList: [ - '14023', - '127886732245873408', - '127886733487386880', - '14025', - '127886726071855616', - '14026', - '127886728420666112', - '127886728957538048', - '127886729779621888', - '127886730165497088', - '127886730652037376', - '127886731037912576', - '127886731440566784', - '127886729360190464', - '15029', - '15030', - ], - spuTagList: [ - { - id: null, - title: '闄愭椂鎶㈣喘', - image: null, - }, - ], - skuList: [ - { - skuId: '135676629', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904181322265856', - specValue: '娴呯伆鑹�', - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904862175246592', - specValue: 'S', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '29900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '39900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 80, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135676630', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904181322265856', - specValue: '娴呯伆鑹�', - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904861755815680', - specValue: 'L', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '39900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '39900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 122, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135681629', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904181322265856', - specValue: '娴呯伆鑹�', - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904862007474176', - specValue: 'M', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '39900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '39900', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 119, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - ], - desc: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3c.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3d.png', - ], - isAvailable: 1, - spuStockQuantity: 321, - soldNum: 102, - isPutOnSale: 1, - specList: [ - { - specId: '127904180600844800', - title: '棰滆壊', - specValueList: [ - { - specValueId: '127904181322265856', - specId: '127904180600844800', - saasId: '88888888', - specValue: '娴呯伆鑹�', - image: '', - }, - ], - }, - { - specId: '127904861604820480', - title: '灏虹爜', - specValueList: [ - { - specValueId: '127904862175246592', - specId: '127904861604820480', - saasId: '88888888', - specValue: 'S', - image: '', - }, - { - specValueId: '127904862007474176', - specId: '127904861604820480', - saasId: '88888888', - specValue: 'M', - image: '', - }, - { - specValueId: '127904861755815680', - specId: '127904861604820480', - saasId: '88888888', - specValue: 'L', - image: '', - }, - ], - }, - ], - promotionList: null, - minProfitPrice: null, - etitle: '', - }, - { - saasId: '88888888', - storeId: '1000', - spuId: '135681626', - title: '杩蜂綘渚挎惡楂橀鍊艰摑鐗欐棤绾胯�虫満绔嬩綋澹板彧鑳借Е鎺у紡鎿嶄綔绠�绾︾珛浣撳0鑰虫満', - primaryImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2a.png', - images: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2a1.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2b.png', - ], - minSalePrice: '29000', - minLinePrice: '40000', - maxSalePrice: '39000', - maxLinePrice: '40000', - isSoldOut: false, - groupIdList: [ - '15029', - '15030', - '14023', - '127886732245873408', - '127886733487386880', - '14025', - '127886726071855616', - '14026', - '127886728420666112', - '127886728957538048', - '127886730652037376', - '127886731037912576', - ], - spuTagList: [ - { - id: null, - title: '闄愭椂鎶㈣喘', - image: null, - }, - ], - skuList: [ - { - skuId: '135676627', - skuImage: null, - specInfo: [ - { - specId: '10006', - specTitle: null, - specValueId: '10007', - specValue: '榛戣壊', - }, - { - specId: '11007', - specTitle: null, - specValueId: '10009', - specValue: '绠�绾︽', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '29000', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '40000', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 123, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135676628', - skuImage: null, - specInfo: [ - { - specId: '10006', - specTitle: null, - specValueId: '10007', - specValue: '榛戣壊', - }, - { - specId: '11007', - specTitle: null, - specValueId: '10008', - specValue: '绀肩洅瑁�', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '39000', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '40000', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 123, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135681627', - skuImage: null, - specInfo: [ - { - specId: '10006', - specTitle: null, - specValueId: '10007', - specValue: '榛戣壊', - }, - { - specId: '11007', - specTitle: null, - specValueId: '11008', - specValue: '甯﹀厖鐢电嚎绠�绾︽', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '39000', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '40000', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 120, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - ], - desc: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2c.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2d.png', - ], - isAvailable: 1, - spuStockQuantity: 366, - soldNum: 102, - isPutOnSale: 1, - specList: [ - { - specId: '10006', - title: '棰滆壊', - specValueList: [ - { - specValueId: '10007', - specId: '10006', - saasId: '88888888', - specValue: '榛戣壊', - image: '', - }, - ], - }, - { - specId: '11007', - title: '绫诲瀷', - specValueList: [ - { - specValueId: '10009', - specId: '11007', - saasId: '88888888', - specValue: '绠�绾︽', - image: '', - }, - { - specValueId: '11008', - specId: '11007', - saasId: '88888888', - specValue: '甯﹀厖鐢电嚎绠�绾︽', - image: '', - }, - { - specValueId: '10008', - specId: '11007', - saasId: '88888888', - specValue: '绀肩洅娆�', - image: '', - }, - ], - }, - ], - promotionList: null, - minProfitPrice: null, - etitle: '', - }, - { - saasId: '88888888', - storeId: '1000', - spuId: '135681622', - title: '绠�绾﹂鐩樿�愮儹瀹剁敤鐩樺瓙鑿滅洏濂楄澶氶鑹茬畝绾﹂鐩樿�愮儹瀹剁敤鐩樺瓙', - primaryImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-1a.png', - images: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-1a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-1a2.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-1b.png', - ], - minSalePrice: '129900', - minLinePrice: '218000', - maxSalePrice: '139900', - maxLinePrice: '218000', - isSoldOut: false, - desc: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-1c.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-1d.png', - ], - groupIdList: [ - '14023', - '127886732665303040', - '127886733101511680', - '127886733923595520', - '14025', - '127886726071855616', - '14026', - '127886728957538048', - '127886727481142784', - '127886729779621888', - '127886730165497088', - '127886730652037376', - '127886731440566784', - '127886729360190464', - '15029', - '15030', - ], - spuTagList: [ - { - id: null, - title: '鎺屾煖鐑崠', - image: null, - }, - ], - skuList: [ - { - skuId: '135676623', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904181506815488', - specValue: '濂堕粍鑹�', - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904862175246592', - specValue: '鍗曠洏', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '129900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '218000', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 119, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135676624', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904181506815488', - specValue: '濂堕粍鑹�', - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904861755815680', - specValue: '鐩�+纰�', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '139900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '218000', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 116, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - { - skuId: '135681623', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904181506815488', - specValue: '濂堕粍鑹�', - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904862007474176', - specValue: '鍗曠洏', - }, - ], - priceInfo: [ - { - priceType: 1, - price: '139900', - priceTypeName: '閿�鍞环鏍�', - }, - { - priceType: 2, - price: '218000', - priceTypeName: '鍒掔嚎浠锋牸', - }, - ], - stockInfo: { - stockQuantity: 122, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: null, - volume: null, - profitPrice: null, - }, - ], - isAvailable: 1, - spuStockQuantity: 357, - soldNum: 23102, - isPutOnSale: 1, - specList: [ - { - specId: '127904180600844800', - title: '棰滆壊', - specValueList: [ - { - specValueId: '127904181506815488', - specId: '127904180600844800', - saasId: '88888888', - specValue: '濂堕粍鑹�', - image: '', - }, - ], - }, - { - specId: '127904861604820480', - title: '绫诲瀷', - specValueList: [ - { - specValueId: '127904862175246592', - specId: '127904861604820480', - saasId: '88888888', - specValue: '鍗曠洏', - image: '', - }, - { - specValueId: '127904862007474176', - specId: '127904861604820480', - saasId: '88888888', - specValue: '鍗曠', - image: '', - }, - { - specValueId: '127904861755815680', - specId: '127904861604820480', - saasId: '88888888', - specValue: '鐩�+纰�', - image: '', - }, - ], - }, - ], - promotionList: null, - minProfitPrice: null, - etitle: '', - }, - { - saasId: '88888888', - storeId: '1000', - spuId: '135681624', - title: '涓嶉攬閽㈠垁鍙夊嫼濂楄瀹剁敤瑗块椁愬叿ins绠�绾﹁�愮敤涓嶉攬閽㈤噾鑹查摱鑹插彲閫�', - primaryImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2b.png', - images: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2a1.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2b.png', - ], - video: null, - available: 1, - minSalePrice: '19900', - minLinePrice: '19900', - maxSalePrice: '29900', - maxLinePrice: '29900', - spuStockQuantity: 0, - soldNum: 102, - isPutOnSale: 1, - categoryIds: [ - '127880527393854975', - '127880527393854977', - '127880526789875961', - ], - specList: [ - { - specId: '127904180600844800', - title: '棰滆壊', - specValueList: [ - { - specValueId: '127904180768617216', - specId: null, - saasId: null, - specValue: '濂堕粍鑹�', - image: null, - }, - ], - }, - { - specId: '127904861604820480', - title: '鏁伴噺', - specValueList: [ - { - specValueId: '127904862175246592', - specId: null, - saasId: null, - specValue: '涓変欢濂�', - image: null, - }, - { - specValueId: '127904862007474176', - specId: null, - saasId: null, - specValue: '鍏欢濂�', - image: null, - }, - { - specValueId: '127904861755815680', - specId: null, - saasId: null, - specValue: '鍏欢濂�', - image: null, - }, - ], - }, - ], - skuList: [ - { - skuId: '135676625', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904180768617216', - specValue: null, - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904862175246592', - specValue: null, - }, - ], - priceInfo: [ - { priceType: 1, price: '19900', priceTypeName: null }, - { priceType: 2, price: '29900', priceTypeName: null }, - ], - stockInfo: { - stockQuantity: 0, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: { value: null, unit: 'KG' }, - volume: null, - profitPrice: null, - }, - { - skuId: '135676626', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904180768617216', - specValue: null, - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904861755815680', - specValue: null, - }, - ], - priceInfo: [ - { priceType: 1, price: '29900', priceTypeName: null }, - { priceType: 2, price: '29900', priceTypeName: null }, - ], - stockInfo: { - stockQuantity: 0, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: { value: null, unit: 'KG' }, - volume: null, - profitPrice: null, - }, - { - skuId: '135681625', - skuImage: null, - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904180768617216', - specValue: null, - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904862007474176', - specValue: null, - }, - ], - priceInfo: [ - { priceType: 1, price: '29900', priceTypeName: null }, - { priceType: 2, price: '29900', priceTypeName: null }, - ], - stockInfo: { - stockQuantity: 0, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: { value: null, unit: 'KG' }, - volume: null, - profitPrice: null, - }, - ], - spuTagList: [{ id: '19011', title: '2020绉嬪鏂版', image: null }], - spuLimitList: null, - desc: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2c.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2d.png', - ], - etitle: '', - }, - { - saasId: '88888888', - storeId: '1000', - spuId: '135681628', - title: '甯﹀附鍗堜紤姣檸骞存澶氬姛鑳藉姞鍘氬姞澶у姞缁掔畝绾﹀鍔熻兘鍗堜紤姣繛甯芥姭鑲�', - primaryImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png', - images: ['https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png'], - video: null, - available: 1, - minSalePrice: '29900', - minLinePrice: '29900', - maxSalePrice: '39900', - maxLinePrice: '39900', - spuStockQuantity: 321, - soldNum: 103, - isPutOnSale: 1, - categoryIds: [ - '127880527393854975', - '127880527393854977', - '127880526789875961', - ], - specList: [ - { - specId: '127904180600844800', - title: '棰滆壊', - specValueList: [ - { - specValueId: '127904181322265856', - specId: null, - saasId: null, - specValue: '娴呯伆鑹�', - image: null, - }, - ], - }, - { - specId: '127904861604820480', - title: '灏虹爜', - specValueList: [ - { - specValueId: '127904862175246592', - specId: null, - saasId: null, - specValue: 'S', - image: null, - }, - { - specValueId: '127904862007474176', - specId: null, - saasId: null, - specValue: 'M', - image: null, - }, - { - specValueId: '127904861755815680', - specId: null, - saasId: null, - specValue: 'L', - image: null, - }, - ], - }, - ], - skuList: [ - { - skuId: '135676629', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png', - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904181322265856', - specValue: null, - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904862175246592', - specValue: null, - }, - ], - priceInfo: [ - { priceType: 1, price: '29900', priceTypeName: null }, - { priceType: 2, price: '39900', priceTypeName: null }, - ], - stockInfo: { - stockQuantity: 80, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: { value: null, unit: 'KG' }, - volume: null, - profitPrice: null, - }, - { - skuId: '135676630', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png', - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904181322265856', - specValue: null, - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904861755815680', - specValue: null, - }, - ], - priceInfo: [ - { priceType: 1, price: '39900', priceTypeName: null }, - { priceType: 2, price: '39900', priceTypeName: null }, - ], - stockInfo: { - stockQuantity: 122, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: { value: null, unit: 'KG' }, - volume: null, - profitPrice: null, - }, - { - skuId: '135681629', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png', - specInfo: [ - { - specId: '127904180600844800', - specTitle: null, - specValueId: '127904181322265856', - specValue: null, - }, - { - specId: '127904861604820480', - specTitle: null, - specValueId: '127904862007474176', - specValue: null, - }, - ], - priceInfo: [ - { priceType: 1, price: '39900', priceTypeName: null }, - { priceType: 2, price: '39900', priceTypeName: null }, - ], - stockInfo: { - stockQuantity: 119, - safeStockQuantity: 0, - soldQuantity: 0, - }, - weight: { value: null, unit: 'KG' }, - volume: null, - profitPrice: null, - }, - ], - spuTagList: [{ id: '13001', title: '闄愭椂鎶㈣喘', image: null }], - spuLimitList: null, - desc: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3c.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3d.png', - ], - etitle: '', - }, -]; - -/** - * @param {string} id - * @param {number} [available] 搴撳瓨, 榛樿1 - */ -export function genGood(id, available = 1) { - const specID = ['135681624', '135681628']; - if (specID.indexOf(id) > -1) { - return allGoods.filter((good) => good.spuId === id)[0]; - } - const item = allGoods[id % allGoods.length]; - return { - ...item, - spuId: `${id}`, - available: available, - desc: item?.desc || defaultDesc, - images: item?.images || [item?.primaryImage], - }; -} diff --git a/model/goods.js b/model/goods.js deleted file mode 100644 index 850e0ba..0000000 --- a/model/goods.js +++ /dev/null @@ -1,7 +0,0 @@ -import { genGood } from './good'; - -export function getGoodsList(baseID = 0, length = 10) { - return new Array(length).fill(0).map((_, idx) => genGood(idx + baseID)); -} - -export const goodsList = getGoodsList(); diff --git a/model/order/applyService.js b/model/order/applyService.js deleted file mode 100644 index e3a2fdf..0000000 --- a/model/order/applyService.js +++ /dev/null @@ -1,295 +0,0 @@ -import { mockIp, mockReqId } from '../../utils/mock'; - -const orderResps = [ - { - data: { - saasId: '88888888', - uid: '88888888205468', - storeId: '1000', - skuId: '135691625', - numOfSku: 1, - numOfSkuAvailable: 1, - refundableAmount: '26900', - refundableDiscountAmount: '0', - shippingFeeIncluded: '0', - paidAmountEach: '26900', - boughtQuantity: 1, - orderNo: '132222623132329291', - goodsInfo: { - goodsName: - '杩蜂綘渚挎惡楂橀鍊艰摑鐗欐棤绾胯�虫満绔嬩綋澹板彧鑳借Е鎺у紡鎿嶄綔绠�绾︾珛浣撳0鑰虫満', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2a.png', - specInfo: [ - { - specId: '50456', - specTitle: '棰滆壊', - specValue: '榛戣壊', - }, - { - specId: '50459', - specTitle: '灏虹爜', - specValue: '绠�绾︽', - }, - ], - }, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 36, - success: true, - }, - { - data: { - saasId: '88888888', - uid: '88888888205468', - storeId: '1000', - skuId: '135676631', - numOfSku: 1, - numOfSkuAvailable: 1, - refundableAmount: '26900', - refundableDiscountAmount: '0', - shippingFeeIncluded: '0', - paidAmountEach: '26900', - boughtQuantity: 1, - orderNo: '132222623132329291', - goodsInfo: { - goodsName: '鐧借壊鐭杩炶。瑁欒嵎鍙惰竟瑁欐憜瀹芥澗闊╃増浼戦棽绾櫧娓呯埥浼橀泤杩炶。瑁�', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - specInfo: [ - { - specId: '50456', - specTitle: '棰滆壊', - specValue: '绫宠壊鑽峰彾杈�', - }, - { - specId: '50459', - specTitle: '灏虹爜', - specValue: 'S', - }, - ], - }, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 36, - success: true, - }, - { - data: { - saasId: '88888888', - uid: '88888888205468', - storeId: '1000', - skuId: '135691622', - numOfSku: 1, - numOfSkuAvailable: 1, - refundableAmount: '26900', - refundableDiscountAmount: '0', - shippingFeeIncluded: '0', - paidAmountEach: '26900', - boughtQuantity: 1, - orderNo: '132222623132329291', - goodsInfo: { - goodsName: '鑵捐鏋佸厜鐩掑瓙4鏅鸿兘缃戠粶鐢佃鏈洪《鐩�6K鍗冨厗缃戠粶鏈洪《鐩�4K楂樺垎杈ㄧ巼', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3a.png', - specInfo: [ - { - specId: '50456', - specTitle: '棰滆壊', - specValue: '缁忓吀鐧�', - }, - { - specId: '50459', - specTitle: '绫诲瀷', - specValue: '缁忓吀濂楄', - }, - ], - }, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 36, - success: true, - }, - { - data: { - saasId: '88888888', - uid: '88888888205468', - storeId: '1000', - skuId: '135676629', - numOfSku: 1, - numOfSkuAvailable: 1, - refundableAmount: '26900', - refundableDiscountAmount: '0', - shippingFeeIncluded: '0', - paidAmountEach: '26900', - boughtQuantity: 1, - orderNo: '132222623132329291', - goodsInfo: { - goodsName: '甯﹀附鍗堜紤姣檸骞存澶氬姛鑳藉姞鍘氬姞澶у姞缁掔畝绾﹀鍔熻兘鍗堜紤姣繛甯芥姭鑲�', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png', - specInfo: [ - { - specId: '50456', - specTitle: '棰滆壊', - specValue: '娴呯伆鑹�', - }, - { - specId: '50459', - specTitle: '灏虹爜', - specValue: 'S', - }, - ], - }, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 36, - success: true, - }, - { - data: { - saasId: '88888888', - uid: '88888888205468', - storeId: '1000', - skuId: '135686631', - numOfSku: 1, - numOfSkuAvailable: 1, - refundableAmount: '26900', - refundableDiscountAmount: '0', - shippingFeeIncluded: '0', - paidAmountEach: '26900', - boughtQuantity: 1, - orderNo: '132222623132329291', - goodsInfo: { - goodsName: '杩愬姩杩炲附鎷夐摼鍗。浼戦棽寮�琛暱琚栧鑹茶繍鍔ㄧ粏缁掗潰鏂欒繍鍔ㄤ笂琛�', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17a.png', - specInfo: [ - { - specId: '50456', - specTitle: '棰滆壊', - specValue: '鍐涚豢鑹�', - }, - { - specId: '50459', - specTitle: '灏虹爜', - specValue: 'XS', - }, - ], - }, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 36, - success: true, - }, - { - data: { - saasId: '88888888', - uid: '88888888205468', - storeId: '1000', - skuId: '19384938948343', - numOfSku: 1, - numOfSkuAvailable: 1, - refundableAmount: '26900', - refundableDiscountAmount: '0', - shippingFeeIncluded: '0', - paidAmountEach: '26900', - boughtQuantity: 1, - orderNo: '130169571554503755', - goodsInfo: { - goodsName: - '绾壊绾浼戦棽鍦嗛鐭T鎭ょ函鐧戒翰鑲ゅ帤鏌旇蒋缁嗚吇闈㈡枡绾櫧鐭濂楀ごT鎭�', - skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - specInfo: [ - { - specId: '50456', - specTitle: '棰滆壊', - specValue: '鍐涚豢鑹�', - }, - { - specId: '50459', - specTitle: '灏虹爜', - specValue: 'XS', - }, - ], - }, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 36, - success: true, - }, -]; - -export function genRightsPreview(params) { - const { orderNo, skuId } = params; - const resp = orderResps.find( - (r) => r.data.orderNo === orderNo && r.data.skuId === skuId, - ); - return resp; -} - -export function genApplyReasonList(params) { - const resp = { - data: { - saasId: '70000001', - rightsReasonList: [ - { id: '1', desc: '瀹為檯鍟嗗搧涓庢弿杩颁笉绗�' }, - { id: '2', desc: '璐ㄩ噺闂' }, - { id: '3', desc: '灏戜欢/婕忓彂' }, - { id: '4', desc: '鍖呰/鍟嗗搧/姹¤抗/瑁傜棔/鍙樺舰' }, - { id: '5', desc: '鍙戣揣澶參' }, - { id: '6', desc: '鐗╂祦閰嶉�佸お鎱�' }, - { id: '7', desc: '鍟嗗鍙戦敊璐�' }, - { id: '8', desc: '涓嶅枩娆�' }, - ], - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 6, - success: true, - }; - // 鏈敹璐у搴旂殑鍘熷洜鍒楄〃 - if (params.rightsReasonType === 'REFUND_MONEY') { - resp.data.rightsReasonList = [ - { id: '9', desc: '绌哄寘瑁�' }, - { id: '10', desc: '蹇��/鐗╂祦涓�鐩存湭閫佸埌' }, - { id: '11', desc: '璐х墿鐮存崯宸叉嫆绛�' }, - { id: '12', desc: '涓嶅枩娆�' }, - ]; - } - return resp; -} - -export function applyService() { - const resp = { - data: { - rightsNo: '123123423', - saasId: '70000001', - uid: '700000011070005', - storeId: '542', - result: null, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 269, - success: true, - }; - return resp; -} diff --git a/model/order/orderConfirm.js b/model/order/orderConfirm.js deleted file mode 100644 index 7170492..0000000 --- a/model/order/orderConfirm.js +++ /dev/null @@ -1,147 +0,0 @@ -import { mockIp, mockReqId } from '../../utils/mock'; - -export const transformGoodsDataToConfirmData = (goodsDataList) => { - const list = []; - - goodsDataList.forEach((goodsData) => { - list.push({ - storeId: goodsData.storeId, - spuId: goodsData.spuId, - skuId: goodsData.skuId, - goodsName: goodsData.title, - image: goodsData.primaryImage, - reminderStock: 119, - quantity: goodsData.quantity, - payPrice: goodsData.price, - totalSkuPrice: goodsData.price, - discountSettlePrice: goodsData.price, - realSettlePrice: goodsData.price, - settlePrice: goodsData.price, - oriPrice: goodsData.originPrice, - tagPrice: null, - tagText: null, - skuSpecLst: goodsData.specInfo, - promotionIds: null, - weight: 0.0, - unit: 'KG', - volume: null, - masterGoodsType: 0, - viceGoodsType: 0, - roomId: goodsData.roomId, - egoodsName: null, - }); - }); - - return list; -}; - -/** 鐢熸垚缁撶畻鏁版嵁 */ -export function genSettleDetail(params) { - const { userAddressReq, couponList, goodsRequestList } = params; - - const resp = { - data: { - settleType: 0, - userAddress: null, - totalGoodsCount: 3, - packageCount: 1, - totalAmount: '289997', - totalPayAmount: '', - totalDiscountAmount: '110000', - totalPromotionAmount: '1100', - totalCouponAmount: '0', - totalSalePrice: '289997', - totalGoodsAmount: '289997', - totalDeliveryFee: '0', - invoiceRequest: null, - skuImages: null, - deliveryFeeList: null, - storeGoodsList: [ - { - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - remark: null, - goodsCount: 1, - deliveryFee: '0', - deliveryWords: null, - storeTotalAmount: '0', - storeTotalPayAmount: '179997', - storeTotalDiscountAmount: '110000', - storeTotalCouponAmount: '0', - skuDetailVos: [], - couponList: [ - { - couponId: 11, - storeId: '1000', - }, - ], - }, - ], - inValidGoodsList: null, - outOfStockGoodsList: null, - limitGoodsList: null, - abnormalDeliveryGoodsList: null, - invoiceSupport: 1, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 244, - success: true, - }; - - const list = transformGoodsDataToConfirmData(goodsRequestList); - - // 鑾峰彇璐墿杞︿紶閫掔殑鍟嗗搧鏁版嵁 - resp.data.storeGoodsList[0].skuDetailVos = list; - - // 鍒ゆ柇鏄惁鎼哄甫浼樻儬鍒告暟鎹� - const discountPrice = []; - - if (couponList && couponList.length > 0) { - couponList.forEach((coupon) => { - if (coupon.status === 'default') { - discountPrice.push({ - type: coupon.type, - value: coupon.value, - }); - } - }); - } - - // 妯℃嫙璁$畻鍦烘櫙 - - // 璁$畻鎬讳环 - const totalPrice = list.reduce((pre, cur) => { - return pre + cur.quantity * Number(cur.settlePrice); - }, 0); - - // 璁$畻鎶樻墸 - const totalDiscountPrice = - discountPrice.length > 0 - ? discountPrice.reduce((pre, cur) => { - if (cur.type === 1) { - return pre + cur.value; - } - if (cur.type === 2) { - return pre + (Number(totalPrice) * cur.value) / 10; - } - - return pre + cur; - }, 0) - : 0; - - resp.data.totalSalePrice = totalPrice; - - resp.data.totalCouponAmount = totalDiscountPrice; - - resp.data.totalPayAmount = - totalPrice - totalDiscountPrice - Number(resp.data.totalPromotionAmount); - - if (userAddressReq) { - resp.data.settleType = 1; - resp.data.userAddress = userAddressReq; - } - return resp; -} diff --git a/model/order/orderDetail.js b/model/order/orderDetail.js deleted file mode 100644 index 032a08b..0000000 --- a/model/order/orderDetail.js +++ /dev/null @@ -1,1212 +0,0 @@ -import { mockIp, mockReqId } from '../../utils/mock'; - -const orderResps = [ - { - data: { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '354021731671873099', - orderId: '354021735982432279', - orderNo: '354021731671873099', - orderType: 0, - orderSubType: 0, - orderStatus: 5, - orderSubStatus: null, - totalAmount: '10010', - goodsAmount: '10000', - goodsAmountApp: '10000', - paymentAmount: '20', - freightFee: '10', - packageFee: '0', - discountAmount: '9990', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '涔扮數椋庢墖閫佺數姹犲悧', - cancelType: 0, - cancelReasonType: 0, - cancelReason: '', - rightsType: 0, - createTime: '1600350829288', - orderItemVOs: [ - { - id: '354021736133427225', - orderNo: null, - spuId: '3', - skuId: '135696670', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '鑵捐鏋佸厜鐩掑瓙4鏅鸿兘缃戠粶鐢佃鏈洪《鐩�6K鍗冨厗缃戠粶鏈洪《鐩�4K楂樺垎杈ㄧ巼', - specifications: [ - { specTitle: '棰滆壊', specValue: '璐垫棌闈�' }, - { specTitle: '绫诲瀷', specValue: '灏婁韩绀肩洅瑁�' }, - ], - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3b.png', - originPrice: '0', - actualPrice: '9999', - buyQuantity: 1, - itemTotalAmount: '9999', - itemDiscountAmount: '9990', - itemPaymentAmount: '10', - goodsPaymentPrice: '10', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: [{ primary: false }], - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '14', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '瀹濆畨鍖�', - receiverArea: '', - receiverAddress: '娌欎簳涓績璺�28鍙蜂附娌欒姳閮絰x鏍媥x鍙�', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '娴嬭瘯鐢ㄦ埛', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: null, - arrivalTime: null, - }, - paymentVO: { - payStatus: 1, - amount: '20', - currency: null, - payType: null, - payWay: null, - payWayName: null, - interactId: null, - traceNo: null, - channelTrxNo: null, - period: null, - payTime: null, - paySuccessTime: null, - }, - buttonVOs: [{ primary: true, type: 1, name: '浠樻' }], - labelVOs: null, - invoiceVO: null, - couponAmount: '0', - autoCancelTime: '1823652629288', - orderStatusName: '寰呬粯娆�', - orderSatusRemark: '闇�鏀粯锟�0.20', - logisticsLogVO: null, - invoiceStatus: 3, - invoiceDesc: '鏆備笉寮�鍙戠エ', - invoiceUrl: null, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 89, - success: true, - }, - { - data: { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - - parentOrderNo: '132381532610540875', - orderId: '132381537256650240', - orderNo: '132381532610540875', - orderType: 0, - orderSubType: 0, - orderStatus: 10, - orderSubStatus: null, - totalAmount: '76600', - goodsAmount: '76600', - goodsAmountApp: '76600', - paymentAmount: '36800', - freightFee: '0', - packageFee: '0', - discountAmount: '34800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '楹荤儲缁欎釜閰嶉グ', - cancelType: 0, - cancelReasonType: 0, - cancelReason: '', - rightsType: 0, - - createTime: '1587140043976', - - orderItemVOs: [ - { - id: '132381537407645696', - orderNo: null, - spuId: '0', - skuId: '135676631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: '鐧借壊鐭杩炶。瑁欒嵎鍙惰竟瑁欐憜瀹芥澗闊╃増浼戦棽绾櫧娓呯埥浼橀泤杩炶。瑁�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - originPrice: '40000', - actualPrice: '29800', - specifications: [ - { - specTitle: '棰滆壊', - specValue: '绫宠壊鑽峰彾杈�', - }, - { - specTitle: '灏虹爜', - specValue: 'S', - }, - ], - buyQuantity: 1, - itemTotalAmount: '29800', - itemDiscountAmount: '19813', - itemPaymentAmount: '9987', - goodsPaymentPrice: '9987', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - { - id: '132381537407645952', - orderNo: null, - spuId: '7', - skuId: '135691633', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '涓嶉攬閽㈠垁鍙夊嫼濂楄瀹剁敤瑗块椁愬叿ins绠�绾﹁�愮敤涓嶉攬閽㈤噾鑹查摱鑹插彲閫�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2b.png', - originPrice: '29900', - actualPrice: '19900', - specifications: [ - { specTitle: '棰滆壊', specValue: '濂堕粍鑹�' }, - { specTitle: '绫诲瀷', specValue: '涓変欢濂�' }, - ], - buyQuantity: 1, - itemTotalAmount: '19900', - itemDiscountAmount: '13230', - itemPaymentAmount: '6670', - goodsPaymentPrice: '6670', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - { - id: '132381537407646208', - orderNo: null, - spuId: '1', - skuId: '135691631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '绾壊绾浼戦棽鍦嗛鐭T鎭ょ函鐧戒翰鑲ゅ帤鏌旇蒋缁嗚吇闈㈡枡绾櫧鐭濂楀ごT鎭�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08a.png', - originPrice: '31900', - actualPrice: '26900', - specifications: [ - { - specTitle: '棰滆壊', - specValue: '鐧借壊', - }, - { - specTitle: '灏虹爜', - specValue: 'S', - }, - ], - buyQuantity: 1, - itemTotalAmount: '26900', - itemDiscountAmount: '6757', - itemPaymentAmount: '20143', - goodsPaymentPrice: '20143', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - - receiverAddressId: '2', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '骞垮窞甯�', - receiverCountry: '娴风彔鍖�', - receiverArea: '', - receiverAddress: '鏂版腐涓矾397鍙�', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '寮犱笁', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: null, - arrivalTime: null, - }, - paymentVO: { - payStatus: 1, - amount: '36800', - currency: 'CNY', - payType: 0, - payWay: null, - payWayName: null, - interactId: '4923587', - traceNo: null, - channelTrxNo: null, - period: null, - payTime: '1600162877000', - paySuccessTime: '1600162877538', - }, - buttonVOs: [ - { - primary: false, - type: 2, - name: '鍙栨秷璁㈠崟', - }, - { - primary: true, - type: 9, - name: '鍐嶆璐拱', - }, - ], - labelVOs: null, - invoiceVO: { - buyerName: '鑵捐璁$畻鏈烘湁闄愬叕鍙�', //涓汉鎴栧叕鍙稿悕绉� - buyerTaxNo: '9144 9808 0909 0293 XG', //绋庡彿 - buyerPhone: '18600008888', //鎵嬫満 - email: '73900484@qq.com', //閭 - titleType: 2, //鍙戠エ鎶ご 1-涓汉 2-鍏徃 - ontentType: 1, //鍙戠エ鍐呭 1-鏄庣粏 2绫诲埆 - invoiceType: 5, //鏄惁寮�绁� 0-涓嶅紑 5-鐢靛瓙鍙戠エ - money: '1.54', - }, - trajectoryVos: [ - { - title: '宸蹭笅鍗�', - icon: 'https://cdn-we-retail.ym.tencent.com/web/trajectoryIcons/ordered.svg', - code: '200002', - nodes: [ - { - status: '璁㈠崟宸茬粡鏀粯鎴愬姛锛屾敮浠樻柟寮忎负锛氬井淇℃敮浠�', - timestamp: '1600162877506', - remark: null, - }, - ], - isShow: true, - }, - { - title: '', - icon: null, - code: '200001', - nodes: [ - { - status: '璁㈠崟宸叉彁浜�', - timestamp: '1600162856204', - remark: null, - }, - ], - isShow: true, - }, - ], - - couponAmount: '5000', - autoCancelTime: null, - orderStatusName: '寰呭彂璐�', - orderSatusRemark: null, - logisticsLogVO: null, - invoiceStatus: 3, - invoiceDesc: '鏆備笉寮�鍙戠エ', - invoiceUrl: null, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 79, - success: true, - }, - { - data: { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '132222623132329291', - orderId: '132222629674264064', - orderNo: '132222623132329291', - orderType: 0, - orderSubType: 0, - orderStatus: 40, - orderSubStatus: null, - totalAmount: '500400', - goodsAmount: '500400', - goodsAmountApp: '500400', - paymentAmount: '458600', - freightFee: '0', - packageFee: '0', - discountAmount: '36800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '鎴戞槸涔颁竴閫佷竴鐨勶紝璁板緱閫�', - cancelType: 3, - cancelReasonType: 0, - cancelReason: '', - rightsType: 0, - createTime: '1587130572345', - orderItemVOs: [ - { - id: '132222629825259776', - orderNo: null, - spuId: '5', - skuId: '135691625', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '杩蜂綘渚挎惡楂橀鍊艰摑鐗欐棤绾胯�虫満绔嬩綋澹板彧鑳借Е鎺у紡鎿嶄綔绠�绾︾珛浣撳0鑰虫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2a.png', - originPrice: '15900', - actualPrice: '8900', - specifications: [ - { - specTitle: '棰滆壊', - specValue: '榛戣壊', - }, - { - specTitle: '灏虹爜', - specValue: '绠�绾︽', - }, - ], - buyQuantity: 1, - itemTotalAmount: '8900', - itemDiscountAmount: '2134', - itemPaymentAmount: '6766', - goodsPaymentPrice: '6766', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: [{ primary: false, type: 4, name: '鐢宠鍞悗' }], - }, - { - id: '132222629825260032', - orderNo: null, - spuId: '0', - skuId: '135676631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: '鐧借壊鐭杩炶。瑁欒嵎鍙惰竟瑁欐憜瀹芥澗闊╃増浼戦棽绾櫧娓呯埥浼橀泤杩炶。瑁�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - originPrice: '40000', - actualPrice: '29800', - specifications: [ - { - specTitle: '棰滆壊', - specValue: '绫宠壊鑽峰彾杈�', - }, - { - specTitle: '灏虹爜', - specValue: 'S', - }, - ], - buyQuantity: 1, - itemTotalAmount: '29800', - itemDiscountAmount: '4026', - itemPaymentAmount: '25774', - goodsPaymentPrice: '25774', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: [{ primary: false, type: 4, name: '鐢宠鍞悗' }], - }, - { - id: '132222629825260288', - orderNo: null, - spuId: '3', - skuId: '135691622', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '鑵捐鏋佸厜鐩掑瓙4鏅鸿兘缃戠粶鐢佃鏈洪《鐩�6K鍗冨厗缃戠粶鏈洪《鐩�4K楂樺垎杈ㄧ巼', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3a.png', - originPrice: '16900', - actualPrice: '9900', - specifications: [ - { - specTitle: '棰滆壊', - specValue: '缁忓吀鐧�', - }, - { - specTitle: '绫诲瀷', - specValue: '缁忓吀濂楄', - }, - ], - buyQuantity: 1, - itemTotalAmount: '9900', - itemDiscountAmount: '1337', - itemPaymentAmount: '8563', - goodsPaymentPrice: '8563', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: [{ primary: false, type: 4, name: '鐢宠鍞悗' }], - }, - { - id: '132222629825260544', - orderNo: null, - spuId: '135681628', - skuId: '135676629', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '甯﹀附鍗堜紤姣檸骞存澶氬姛鑳藉姞鍘氬姞澶у姞缁掔畝绾﹀鍔熻兘鍗堜紤姣繛甯芥姭鑲�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png', - originPrice: '39900', - actualPrice: '29900', - specifications: [ - { - specTitle: '棰滆壊', - specValue: '娴呯伆鑹�', - }, - { - specTitle: '灏虹爜', - specValue: 'S', - }, - ], - buyQuantity: 4, - itemTotalAmount: '119600', - itemDiscountAmount: '4040', - itemPaymentAmount: '115560', - goodsPaymentPrice: '28890', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: [{ primary: false, type: 4, name: '鐢宠鍞悗' }], - }, - { - id: '132222629825260800', - orderNo: null, - spuId: '2', - skuId: '135686631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: '杩愬姩杩炲附鎷夐摼鍗。浼戦棽寮�琛暱琚栧鑹茶繍鍔ㄧ粏缁掗潰鏂欒繍鍔ㄤ笂琛�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17a.png', - originPrice: '39900', - actualPrice: '25900', - specifications: [ - { - specTitle: '棰滆壊', - specValue: '鍐涚豢鑹�', - }, - { - specTitle: '灏虹爜', - specValue: 'XS', - }, - ], - buyQuantity: 1, - itemTotalAmount: '25900', - itemDiscountAmount: '392', - itemPaymentAmount: '25508', - goodsPaymentPrice: '25508', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: [{ primary: false, type: 4, name: '鐢宠鍞悗' }], - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '111112', - logisticsStatus: null, - logisticsCompanyCode: 'yunda', - logisticsCompanyName: '闊佃揪蹇��', - - receiverAddressId: '8', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '鍓嶆捣璺�333鍙烽槼鍏夌帿鐟板洯', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '700000011070005', - receiverPhone: '17612345678', - receiverName: '骞冲潎绾�', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: '1599795293089', - arrivalTime: null, - }, - paymentVO: { - payStatus: 1, - amount: '458600', - currency: 'CNY', - payType: 0, - payWay: null, - payWayName: null, - interactId: '66869', - traceNo: null, - channelTrxNo: null, - period: null, - payTime: '1594869391000', - paySuccessTime: '1594869391287', - }, - buttonVOs: [ - { - primary: true, - type: 3, - name: '纭鏀惰揣', - }, - ], - labelVOs: null, - trajectoryVos: [ - { - title: '宸插彂璐�', - icon: 'deliver', - code: '200003', - nodes: [ - { - status: '鍟嗗宸插彂璐э紝鐗╂祦鎵胯繍鍟嗭細闊佃揪蹇��', - timestamp: '1599795293089', - remark: null, - }, - ], - isShow: true, - }, - { - title: '宸蹭笅鍗�', - icon: 'https://cdn-we-retail.ym.tencent.com/web/trajectoryIcons/ordered.svg', - code: '200002', - nodes: [ - { - status: '璁㈠崟宸茬粡鏀粯鎴愬姛锛屾敮浠樻柟寮忎负锛氬井淇℃敮浠�', - timestamp: '1594869391220', - remark: null, - }, - ], - isShow: true, - }, - { - title: '', - icon: null, - code: '200001', - nodes: [ - { - status: '璁㈠崟宸叉彁浜�', - timestamp: '1594869381185', - remark: null, - }, - ], - isShow: true, - }, - ], - - couponAmount: '5000', - autoCancelTime: null, - orderStatusName: '寰呮敹璐�', - orderSatusRemark: null, - logisticsLogVO: null, - invoiceStatus: 1, - invoiceDesc: '宸插紑鍙戠エ', - invoiceUrl: null, - invoiceVO: { - buyerName: '鍏徃鍚嶇ОXXXX', //涓汉鎴栧叕鍙稿悕绉� - buyerTaxNo: 'R5647U7', //绋庡彿 - buyerPhone: '13534343434', //鎵嬫満 - email: '123@qq.com', //閭 - titleType: 2, //鍙戠エ鎶ご 1-涓汉 2-鍏徃 - ontentType: 2, //鍙戠エ鍐呭 1-鏄庣粏 2绫诲埆 - invoiceType: 5, //鏄惁寮�绁� 0-涓嶅紑 5-鐢靛瓙鍙戠エ - isInvoice: '宸插紑绁�', - money: 10000, - }, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 74, - success: true, - }, - { - data: { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '130862219672031307', - orderId: '130862224737571072', - orderNo: '130862219672031307', - orderType: 0, - orderSubType: 0, - orderStatus: 80, - orderSubStatus: null, - totalAmount: '298000', - goodsAmount: '298000', - goodsAmountApp: '298000', - paymentAmount: '263200', - freightFee: '0', - packageFee: '0', - discountAmount: '29800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '', - cancelType: 3, - cancelReasonType: 0, - cancelReason: '瓒呮椂鏈敮浠�', - rightsType: 0, - createTime: '1587049485895', - orderItemVOs: [ - { - id: '130862224922120960', - orderNo: null, - spuId: '0', - skuId: '135676631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: '鐧借壊鐭杩炶。瑁欒嵎鍙惰竟瑁欐憜瀹芥澗闊╃増浼戦棽绾櫧娓呯埥浼橀泤杩炶。瑁�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - originPrice: '40000', - actualPrice: '29800', - specifications: [ - { specTitle: '棰滆壊', specValue: '绫宠壊鑽峰彾杈�' }, - { specTitle: '灏虹爜', specValue: 'S' }, - ], - buyQuantity: 10, - itemTotalAmount: '298000', - itemDiscountAmount: '29800', - itemPaymentAmount: '268200', - goodsPaymentPrice: '26820', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '2', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '瀹濆畨鍖�', - receiverArea: '', - receiverAddress: '娌欎簳涓績璺�28鍙蜂附娌欒姳閮絰x鏍媥x鍙�', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '娴嬭瘯鐢ㄦ埛', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: null, - arrivalTime: null, - }, - paymentVO: { - payStatus: 1, - amount: '263200', - currency: null, - payType: null, - payWay: null, - payWayName: null, - interactId: null, - traceNo: null, - channelTrxNo: null, - period: null, - payTime: null, - paySuccessTime: null, - }, - buttonVOs: null, - labelVOs: null, - invoiceVO: null, - couponAmount: '5000', - autoCancelTime: null, - orderStatusName: '宸插彇娑�(鏈敮浠�)', - orderSatusRemark: '瓒呮椂鏈敮浠�', - logisticsLogVO: null, - invoiceStatus: 2, - invoiceDesc: '鏆備笉寮�鍙戠エ', - invoiceUrl: null, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 70, - success: true, - }, - { - data: { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '130494472895208267', - orderId: '130494482155052032', - orderNo: '130494472895208267', - orderType: 0, - orderSubType: 0, - orderStatus: 80, - orderSubStatus: null, - totalAmount: '59700', - goodsAmount: '59700', - goodsAmountApp: '59700', - paymentAmount: '24900', - freightFee: '0', - packageFee: '0', - discountAmount: '29800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '', - cancelType: 3, - cancelReasonType: 0, - cancelReason: '瓒呮椂鏈敮浠�', - rightsType: 0, - createTime: '1587027566726', - orderItemVOs: [ - { - id: '130494482322824704', - orderNo: null, - spuId: '7', - skuId: '135691633', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '涓嶉攬閽㈠垁鍙夊嫼濂楄瀹剁敤瑗块椁愬叿ins绠�绾﹁�愮敤涓嶉攬閽㈤噾鑹查摱鑹插彲閫�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2b.png', - originPrice: '29900', - actualPrice: '19900', - specifications: [ - { specTitle: '棰滆壊', specValue: '濂堕粍鑹�' }, - { specTitle: '绫诲瀷', specValue: '涓変欢濂�' }, - ], - buyQuantity: 3, - itemTotalAmount: '59700', - itemDiscountAmount: '29800', - itemPaymentAmount: '29900', - goodsPaymentPrice: '9966', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '2', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '瀹濆畨鍖�', - receiverArea: '', - receiverAddress: '娌欎簳涓績璺�28鍙蜂附娌欒姳閮絰x鏍媥x鍙�', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '娴嬭瘯鐢ㄦ埛', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: null, - arrivalTime: null, - }, - paymentVO: { - payStatus: 1, - amount: '24900', - currency: null, - payType: null, - payWay: null, - payWayName: null, - interactId: null, - traceNo: null, - channelTrxNo: null, - period: null, - payTime: null, - paySuccessTime: null, - }, - buttonVOs: null, - labelVOs: null, - invoiceVO: null, - couponAmount: '5000', - autoCancelTime: null, - orderStatusName: '宸插彇娑�(鏈敮浠�)', - orderSatusRemark: '瓒呮椂鏈敮浠�', - logisticsLogVO: null, - invoiceStatus: 3, - invoiceDesc: '鏆備笉寮�鍙戠エ', - invoiceUrl: null, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 81, - success: true, - }, - { - data: { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '130169571554503755', - orderId: '130169572291521792', - orderNo: '130169571554503755', - orderType: 0, - orderSubType: 0, - orderStatus: 50, - orderSubStatus: null, - totalAmount: '538000', - goodsAmount: '538000', - goodsAmountApp: '538000', - paymentAmount: '508200', - freightFee: '0', - packageFee: '0', - discountAmount: '29800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '', - cancelType: 0, - cancelReasonType: 0, - cancelReason: '', - rightsType: 10, - createTime: '1587008200587', - orderItemVOs: [ - { - id: '130169572425740032', - orderNo: null, - spuId: '1', - skuId: '135691631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '绾壊绾浼戦棽鍦嗛鐭T鎭ょ函鐧戒翰鑲ゅ帤鏌旇蒋缁嗚吇闈㈡枡绾櫧鐭濂楀ごT鎭�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - originPrice: '31900', - actualPrice: '26900', - specifications: [ - { specTitle: '棰滆壊', specValue: '姗欒壊' }, - { specTitle: '灏虹爜', specValue: 'M' }, - ], - buyQuantity: 20, - itemTotalAmount: '538000', - itemDiscountAmount: '29800', - itemPaymentAmount: '508200', - goodsPaymentPrice: '25410', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '123', - logisticsStatus: null, - logisticsCompanyCode: 'zhongtong', - logisticsCompanyName: '涓�氶�熼��', - receiverAddressId: '2', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '瀹濆畨鍖�', - receiverArea: '', - receiverAddress: '娌欎簳涓績璺�28鍙蜂附娌欒姳閮絰x鏍媥x鍙�', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '娴嬭瘯鐢ㄦ埛', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: '1587008529453', - arrivalTime: '1587008623995', - }, - paymentVO: { - payStatus: 2, - amount: '508200', - currency: 'CNY', - payType: 0, - payWay: 0, - payWayName: '寰俊鏀粯', - interactId: '121212', - traceNo: '121212', - channelTrxNo: '121212', - period: null, - payTime: '2020-03-23 00:00:00', - paySuccessTime: '2020-04-16 11:36:41', - }, - buttonVOs: [ - { primary: false, type: 4, name: '鐢宠鍞悗' }, - { primary: true, type: 6, name: '璇勪环' }, - ], - labelVOs: null, - invoiceVO: { - buyerName: '鑵捐璁$畻鏈烘湁闄愬叕鍙�', //涓汉鎴栧叕鍙稿悕绉� - buyerTaxNo: '9144 9808 0909 0293 XG', //绋庡彿 - buyerPhone: '18600008888', //鎵嬫満 - email: '73900484@qq.com', //閭 - titleType: 2, //鍙戠エ鎶ご 1-涓汉 2-鍏徃 - ontentType: 1, //鍙戠エ鍐呭 1-鏄庣粏 2绫诲埆 - invoiceType: 5, //鏄惁寮�绁� 0-涓嶅紑 5-鐢靛瓙鍙戠エ - money: '1.54', - }, - couponAmount: '0', - autoCancelTime: null, - orderStatusName: '浜ゆ槗瀹屾垚', - orderSatusRemark: null, - logisticsLogVO: null, - invoiceStatus: 2, - invoiceDesc: '鏆備笉寮�鍙戠エ', - invoiceUrl: null, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 91, - success: true, - }, - { - data: { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '130150835531421259', - orderId: '130150836385879808', - orderNo: '130150835531421259', - orderType: 0, - orderSubType: 0, - orderStatus: 50, - orderSubStatus: null, - totalAmount: '29800', - goodsAmount: '29800', - goodsAmountApp: '29800', - paymentAmount: '4000', - freightFee: '0', - packageFee: '0', - discountAmount: '25800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '', - cancelType: 0, - cancelReasonType: 0, - cancelReason: '', - rightsType: 0, - createTime: '1587007083839', - orderItemVOs: [ - { - id: '130150836520098048', - orderNo: null, - spuId: '0', - skuId: '135681631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: '鐧借壊鐭杩炶。瑁欒嵎鍙惰竟瑁欐憜瀹芥澗闊╃増浼戦棽绾櫧娓呯埥浼橀泤杩炶。瑁�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - originPrice: '40000', - actualPrice: '29800', - specifications: [ - { specTitle: '棰滆壊', specValue: '绫宠壊鑽峰彾杈�' }, - { specTitle: '灏虹爜', specValue: 'M' }, - ], - buyQuantity: 1, - itemTotalAmount: '29800', - itemDiscountAmount: '25800', - itemPaymentAmount: '4000', - goodsPaymentPrice: '4000', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '123', - logisticsStatus: null, - logisticsCompanyCode: 'yuantong', - logisticsCompanyName: '鍦嗛�氶�熼��', - receiverAddressId: '2', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '瀹濆畨鍖�', - receiverArea: '', - receiverAddress: '娌欎簳涓績璺�28鍙蜂附娌欒姳閮絰x鏍媥x鍙�', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '娴嬭瘯鐢ㄦ埛', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: '1587008539953', - arrivalTime: '1588291200508', - }, - paymentVO: { - payStatus: 2, - amount: '4000', - currency: 'RNB', - payType: 0, - payWay: 0, - payWayName: '寰俊鏀粯', - interactId: '121212', - traceNo: '121212', - channelTrxNo: '121212', - period: null, - payTime: '2020-03-23 00:00:00', - paySuccessTime: '2020-04-16 11:18:09', - }, - buttonVOs: [ - { primary: false, type: 4, name: '鐢宠鍞悗' }, - { primary: true, type: 6, name: '璇勪环' }, - ], - labelVOs: null, - invoiceVO: null, - couponAmount: '0', - autoCancelTime: null, - orderStatusName: '浜ゆ槗瀹屾垚', - orderSatusRemark: null, - logisticsLogVO: null, - invoiceStatus: 2, - invoiceDesc: '鏆備笉寮�鍙戠エ', - invoiceUrl: null, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 95, - success: true, - }, -]; - -export function genOrderDetail(params) { - const { parameter } = params; - const resp = orderResps.find((r) => r.data.orderNo === parameter); - return resp; -} - -export function genBusinessTime() { - const resp = { - data: { - businessTime: ['鍛ㄤ竴,鍛ㄤ簩,鍛ㄤ笁,鍛ㄥ洓,鍛ㄤ簲:00:20:00-08:00:00'], - telphone: '18565372257', - saasId: '88888888', - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 3, - success: true, - }; - return resp; -} diff --git a/model/order/orderList.js b/model/order/orderList.js deleted file mode 100644 index a581fbb..0000000 --- a/model/order/orderList.js +++ /dev/null @@ -1,1054 +0,0 @@ -import { mockIp, mockReqId } from '../../utils/mock'; - -export function genOrders(params) { - const resp = { - data: { - pageNum: 1, - pageSize: 10, - totalCount: 7, - orders: [ - { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '354021731671873099', - orderId: '354021735982432279', - orderNo: '354021731671873099', - orderType: 0, - orderSubType: 0, - orderStatus: 5, - orderSubStatus: null, - totalAmount: '10010', - goodsAmount: '10000', - goodsAmountApp: '10000', - paymentAmount: '20', - freightFee: '10', - packageFee: '0', - discountAmount: '9990', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '', - cancelType: null, - cancelReasonType: null, - cancelReason: null, - rightsType: null, - createTime: '1600350829291', - orderItemVOs: [ - { - id: '354021736133427225', - orderNo: null, - spuId: '3', - skuId: '135696670', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '鑵捐鏋佸厜鐩掑瓙4鏅鸿兘缃戠粶鐢佃鏈洪《鐩�6K鍗冨厗缃戠粶鏈洪《鐩�4K楂樺垎杈ㄧ巼', - specifications: [ - { specTitle: '棰滆壊', specValue: '璐垫棌闈�' }, - { specTitle: '绫诲瀷', specValue: '灏婁韩绀肩洅瑁�' }, - ], - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3b.png', - originPrice: '0', - actualPrice: '9999', - buyQuantity: 1, - itemTotalAmount: '9999', - itemDiscountAmount: '9990', - itemPaymentAmount: '10', - goodsPaymentPrice: '10', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '14', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '瀹濆畨鍖�', - receiverArea: '', - receiverAddress: '娌欎簳涓績璺�28鍙蜂附娌欒姳閮絰x鏍媥x鍙�', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '娴嬭瘯鐢ㄦ埛', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: null, - arrivalTime: null, - }, - paymentVO: { - payStatus: 1, - amount: '20', - currency: null, - payType: null, - payWay: null, - payWayName: null, - interactId: null, - traceNo: null, - channelTrxNo: null, - period: null, - payTime: null, - paySuccessTime: null, - }, - buttonVOs: [ - { primary: false, type: 2, name: '鍙栨秷璁㈠崟' }, - { primary: true, type: 1, name: '浠樻' }, - ], - labelVOs: null, - invoiceVO: null, - couponAmount: null, - autoCancelTime: '1600352629291', - orderStatusName: '寰呬粯娆�', - orderSatusRemark: '闇�鏀粯锟�0.20', - logisticsLogVO: null, - invoiceStatus: null, - invoiceDesc: null, - invoiceUrl: null, - }, - { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '132381532610540875', - orderId: '132381537256650240', - orderNo: '132381532610540875', - orderType: 0, - orderSubType: 0, - orderStatus: 10, - orderSubStatus: null, - totalAmount: '76600', - goodsAmount: '76600', - goodsAmountApp: '76600', - paymentAmount: '36800', - freightFee: '0', - packageFee: '0', - discountAmount: '39800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '', - cancelType: null, - cancelReasonType: null, - cancelReason: null, - rightsType: null, - createTime: '1587140043980', - orderItemVOs: [ - { - id: '132381537407645696', - orderNo: null, - spuId: '0', - skuId: '135676631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '鐧借壊鐭杩炶。瑁欒嵎鍙惰竟瑁欐憜瀹芥澗闊╃増浼戦棽绾櫧娓呯埥浼橀泤杩炶。瑁�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - originPrice: '40000', - actualPrice: '29800', - specifications: [ - { specTitle: '棰滆壊', specValue: '绫宠壊鑽峰彾杈�' }, - { specTitle: '灏虹爜', specValue: 'S' }, - ], - buyQuantity: 1, - itemTotalAmount: '29800', - itemDiscountAmount: '19813', - itemPaymentAmount: '9987', - goodsPaymentPrice: '9987', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - { - id: '132381537407645952', - orderNo: null, - spuId: '7', - skuId: '135691633', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '涓嶉攬閽㈠垁鍙夊嫼濂楄瀹剁敤瑗块椁愬叿ins绠�绾﹁�愮敤涓嶉攬閽㈤噾鑹查摱鑹插彲閫�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2b.png', - originPrice: '29900', - actualPrice: '19900', - specifications: [ - { specTitle: '棰滆壊', specValue: '濂堕粍鑹�' }, - { specTitle: '绫诲瀷', specValue: '涓変欢濂�' }, - ], - buyQuantity: 1, - itemTotalAmount: '19900', - itemDiscountAmount: '13230', - itemPaymentAmount: '6670', - goodsPaymentPrice: '6670', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - { - id: '132381537407646208', - orderNo: null, - spuId: '1', - skuId: '135691631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '绾壊绾浼戦棽鍦嗛鐭T鎭ょ函鐧戒翰鑲ゅ帤鏌旇蒋缁嗚吇闈㈡枡绾櫧鐭濂楀ごT鎭�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08a.png', - originPrice: '31900', - actualPrice: '26900', - specifications: [ - { specTitle: '棰滆壊', specValue: '鐧借壊' }, - { specTitle: '灏虹爜', specValue: 'S' }, - ], - buyQuantity: 1, - itemTotalAmount: '26900', - itemDiscountAmount: '6757', - itemPaymentAmount: '20143', - goodsPaymentPrice: '20143', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '2', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '鍓嶆捣璺�333鍙烽槼鍏夌帿鐟板洯', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '骞冲潎绾�', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: null, - arrivalTime: null, - }, - paymentVO: { - payStatus: 1, - amount: '36800', - currency: null, - payType: null, - payWay: null, - payWayName: null, - interactId: null, - traceNo: null, - channelTrxNo: null, - period: null, - payTime: null, - paySuccessTime: null, - }, - buttonVOs: [ - { - primary: false, - type: 2, - name: '鍙栨秷璁㈠崟', - }, - { - primary: true, - type: 9, - name: '鍐嶆璐拱', - }, - ], - labelVOs: null, - invoiceVO: null, - couponAmount: null, - autoCancelTime: null, - orderStatusName: '寰呭彂璐�', - orderSatusRemark: null, - logisticsLogVO: null, - invoiceStatus: null, - invoiceDesc: null, - invoiceUrl: null, - }, - { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '132222623132329291', - orderId: '132222629674264064', - orderNo: '132222623132329291', - orderType: 0, - orderSubType: 0, - orderStatus: 40, - orderSubStatus: null, - totalAmount: '500400', - goodsAmount: '500400', - goodsAmountApp: '500400', - paymentAmount: '458600', - freightFee: '0', - packageFee: '0', - discountAmount: '41800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '', - cancelType: null, - cancelReasonType: null, - cancelReason: null, - rightsType: null, - createTime: '1587130572349', - orderItemVOs: [ - { - id: '132222629825259776', - orderNo: null, - spuId: '5', - skuId: '135691625', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '杩蜂綘渚挎惡楂橀鍊艰摑鐗欐棤绾胯�虫満绔嬩綋澹板彧鑳借Е鎺у紡鎿嶄綔绠�绾︾珛浣撳0鑰虫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2a.png', - originPrice: '15900', - actualPrice: '8900', - specifications: [ - { specTitle: '棰滆壊', specValue: '榛戣壊' }, - { specTitle: '灏虹爜', specValue: '绠�绾�' }, - ], - buyQuantity: 1, - itemTotalAmount: '8900', - itemDiscountAmount: '2134', - itemPaymentAmount: '6766', - goodsPaymentPrice: '6766', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - { - id: '132222629825260032', - orderNo: null, - spuId: '0', - skuId: '135676631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '鐧借壊鐭杩炶。瑁欒嵎鍙惰竟瑁欐憜瀹芥澗闊╃増浼戦棽绾櫧娓呯埥浼橀泤杩炶。瑁�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - originPrice: '40000', - actualPrice: '29800', - specifications: [ - { specTitle: '棰滆壊', specValue: '绫宠壊鑽峰彾杈�' }, - { specTitle: '灏虹爜', specValue: 'S' }, - ], - buyQuantity: 1, - itemTotalAmount: '29800', - itemDiscountAmount: '4026', - itemPaymentAmount: '25774', - goodsPaymentPrice: '25774', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - { - id: '132222629825260288', - orderNo: null, - spuId: '3', - skuId: '135691622', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '鑵捐鏋佸厜鐩掑瓙4鏅鸿兘缃戠粶鐢佃鏈洪《鐩�6K鍗冨厗缃戠粶鏈洪《鐩�4K楂樺垎杈ㄧ巼', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3a.png', - originPrice: '16900', - actualPrice: '9900', - specifications: [ - { specTitle: '棰滆壊', specValue: '缁忓吀鐧�' }, - { specTitle: '绫诲瀷', specValue: '缁忓吀濂楄' }, - ], - buyQuantity: 1, - itemTotalAmount: '9900', - itemDiscountAmount: '1337', - itemPaymentAmount: '8563', - goodsPaymentPrice: '8563', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - { - id: '132222629825260544', - orderNo: null, - spuId: '135681628', - skuId: '135676629', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '甯﹀附鍗堜紤姣檸骞存澶氬姛鑳藉姞鍘氬姞澶у姞缁掔畝绾﹀鍔熻兘鍗堜紤姣繛甯芥姭鑲�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png', - originPrice: '39900', - actualPrice: '29900', - specifications: [ - { specTitle: '棰滆壊', specValue: '娴呯伆鑹�' }, - { specTitle: '灏虹爜', specValue: 'S' }, - ], - buyQuantity: 4, - itemTotalAmount: '119600', - itemDiscountAmount: '4040', - itemPaymentAmount: '115560', - goodsPaymentPrice: '28890', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - { - id: '132222629825260800', - orderNo: null, - spuId: '2', - skuId: '135686631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: '杩愬姩杩炲附鎷夐摼鍗。浼戦棽寮�琛暱琚栧鑹茶繍鍔ㄧ粏缁掗潰鏂欒繍鍔ㄤ笂琛�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17a.png', - originPrice: '39900', - actualPrice: '25900', - specifications: [ - { specTitle: '棰滆壊', specValue: '鍐涚豢鑹�' }, - { specTitle: '灏虹爜', specValue: 'XS' }, - ], - buyQuantity: 1, - itemTotalAmount: '25900', - itemDiscountAmount: '392', - itemPaymentAmount: '25508', - goodsPaymentPrice: '25508', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '2', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '鍓嶆捣璺�333鍙烽槼鍏夌帿鐟板洯', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '骞冲潎绾�', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: null, - arrivalTime: null, - }, - paymentVO: { - payStatus: 1, - amount: '458600', - currency: null, - payType: null, - payWay: null, - payWayName: null, - interactId: null, - traceNo: null, - channelTrxNo: null, - period: null, - payTime: null, - paySuccessTime: null, - }, - buttonVOs: [ - { - primary: true, - type: 3, - name: '纭鏀惰揣', - }, - ], - labelVOs: null, - invoiceVO: null, - couponAmount: null, - autoCancelTime: null, - orderStatusName: '寰呮敹璐�', - orderSatusRemark: null, - logisticsLogVO: null, - invoiceStatus: null, - invoiceDesc: null, - invoiceUrl: null, - }, - { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '130862219672031307', - orderId: '130862224737571072', - orderNo: '130862219672031307', - orderType: 0, - orderSubType: 0, - orderStatus: 80, - orderSubStatus: null, - totalAmount: '298000', - goodsAmount: '298000', - goodsAmountApp: '298000', - paymentAmount: '263200', - freightFee: '0', - packageFee: '0', - discountAmount: '34800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '', - cancelType: null, - cancelReasonType: null, - cancelReason: null, - rightsType: null, - createTime: '1587049485899', - orderItemVOs: [ - { - id: '130862224922120960', - orderNo: null, - spuId: '0', - skuId: '135676631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '鐧借壊鐭杩炶。瑁欒嵎鍙惰竟瑁欐憜瀹芥澗闊╃増浼戦棽绾櫧娓呯埥浼橀泤杩炶。瑁�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - originPrice: '40000', - actualPrice: '29800', - specifications: [ - { specTitle: '棰滆壊', specValue: '绫宠壊鑽峰彾杈�' }, - { specTitle: '灏虹爜', specValue: 'S' }, - ], - buyQuantity: 10, - itemTotalAmount: '298000', - itemDiscountAmount: '29800', - itemPaymentAmount: '268200', - goodsPaymentPrice: '26820', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '2', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '鍓嶆捣璺�333鍙烽槼鍏夌帿鐟板洯', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '骞冲潎绾�', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: null, - arrivalTime: null, - }, - paymentVO: { - payStatus: 1, - amount: '263200', - currency: null, - payType: null, - payWay: null, - payWayName: null, - interactId: null, - traceNo: null, - channelTrxNo: null, - period: null, - payTime: null, - paySuccessTime: null, - }, - buttonVOs: null, - labelVOs: null, - invoiceVO: null, - couponAmount: null, - autoCancelTime: null, - orderStatusName: '宸插彇娑�', - orderSatusRemark: null, - logisticsLogVO: null, - invoiceStatus: null, - invoiceDesc: null, - invoiceUrl: null, - }, - { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '130494472895208267', - orderId: '130494482155052032', - orderNo: '130494472895208267', - orderType: 0, - orderSubType: 0, - orderStatus: 80, - orderSubStatus: null, - totalAmount: '59700', - goodsAmount: '59700', - goodsAmountApp: '59700', - paymentAmount: '24900', - freightFee: '0', - packageFee: '0', - discountAmount: '34800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '', - cancelType: null, - cancelReasonType: null, - cancelReason: null, - rightsType: null, - createTime: '1587027566730', - orderItemVOs: [ - { - id: '130494482322824704', - orderNo: null, - spuId: '7', - skuId: '135691633', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '涓嶉攬閽㈠垁鍙夊嫼濂楄瀹剁敤瑗块椁愬叿ins绠�绾﹁�愮敤涓嶉攬閽㈤噾鑹查摱鑹插彲閫�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2b.png', - originPrice: '29900', - actualPrice: '19900', - specifications: [ - { specTitle: '棰滆壊', specValue: '濂堕粍鑹�' }, - { specTitle: '绫诲瀷', specValue: '涓変欢濂�' }, - ], - buyQuantity: 3, - itemTotalAmount: '59700', - itemDiscountAmount: '29800', - itemPaymentAmount: '29900', - goodsPaymentPrice: '9966', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '2', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '鍓嶆捣璺�333鍙烽槼鍏夌帿鐟板洯', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '骞冲潎绾�', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: null, - arrivalTime: null, - }, - paymentVO: { - payStatus: 1, - amount: '24900', - currency: null, - payType: null, - payWay: null, - payWayName: null, - interactId: null, - traceNo: null, - channelTrxNo: null, - period: null, - payTime: null, - paySuccessTime: null, - }, - buttonVOs: null, - labelVOs: null, - invoiceVO: null, - couponAmount: null, - autoCancelTime: null, - orderStatusName: '宸插彇娑�', - orderSatusRemark: null, - logisticsLogVO: null, - invoiceStatus: null, - invoiceDesc: null, - invoiceUrl: null, - }, - { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '130169571554503755', - orderId: '130169572291521792', - orderNo: '130169571554503755', - orderType: 0, - orderSubType: 0, - orderStatus: 50, - orderSubStatus: null, - totalAmount: '538000', - goodsAmount: '538000', - goodsAmountApp: '538000', - paymentAmount: '508200', - freightFee: '0', - packageFee: '0', - discountAmount: '29800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '', - cancelType: null, - cancelReasonType: null, - cancelReason: null, - rightsType: null, - createTime: '1587008200590', - orderItemVOs: [ - { - id: '130169572425740032', - orderNo: null, - spuId: '1', - skuId: '135691631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '绾壊绾浼戦棽鍦嗛鐭T鎭ょ函鐧戒翰鑲ゅ帤鏌旇蒋缁嗚吇闈㈡枡绾櫧鐭濂楀ごT鎭�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png', - originPrice: '31900', - actualPrice: '26900', - specifications: [ - { specTitle: '棰滆壊', specValue: '姗欒壊' }, - { specTitle: '灏虹爜', specValue: 'M' }, - ], - buyQuantity: 20, - itemTotalAmount: '538000', - itemDiscountAmount: '29800', - itemPaymentAmount: '508200', - goodsPaymentPrice: '25410', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: [ - { - primary: true, - type: 4, - name: '', - }, - ], - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '123', - logisticsStatus: null, - logisticsCompanyCode: 'zhongtong', - logisticsCompanyName: '涓�氶�熼��', - receiverAddressId: '2', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '鍓嶆捣璺�333鍙烽槼鍏夌帿鐟板洯', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '骞冲潎绾�', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: '1587008529453', - arrivalTime: '1587008623995', - }, - paymentVO: { - payStatus: 1, - amount: '508200', - currency: null, - payType: null, - payWay: null, - payWayName: null, - interactId: null, - traceNo: null, - channelTrxNo: null, - period: null, - payTime: null, - paySuccessTime: null, - }, - buttonVOs: [ - { primary: false, type: 4, name: '鐢宠鍞悗' }, - { primary: true, type: 6, name: '璇勪环' }, - ], - labelVOs: null, - invoiceVO: { - buyerName: '鑵捐璁$畻鏈烘湁闄愬叕鍙�', //涓汉鎴栧叕鍙稿悕绉� - buyerTaxNo: '9144 9808 0909 0293 XG', //绋庡彿 - buyerPhone: '18600008888', //鎵嬫満 - email: '73900484@qq.com', //閭 - titleType: 2, //鍙戠エ鎶ご 1-涓汉 2-鍏徃 - ontentType: 1, //鍙戠エ鍐呭 1-鏄庣粏 2绫诲埆 - invoiceType: 5, //鏄惁寮�绁� 0-涓嶅紑 5-鐢靛瓙鍙戠エ - money: '1.54', - }, - couponAmount: null, - autoCancelTime: null, - orderStatusName: '浜ゆ槗瀹屾垚', - orderSatusRemark: null, - logisticsLogVO: null, - invoiceStatus: null, - invoiceDesc: null, - invoiceUrl: null, - }, - { - saasId: '88888888', - storeId: '1000', - storeName: '浜慚all娣卞湷鏃楄埌搴�', - uid: '88888888205468', - parentOrderNo: '130150835531421259', - orderId: '130150836385879808', - orderNo: '130150835531421259', - orderType: 0, - orderSubType: 0, - orderStatus: 50, - orderSubStatus: null, - totalAmount: '29800', - goodsAmount: '29800', - goodsAmountApp: '29800', - paymentAmount: '4000', - freightFee: '0', - packageFee: '0', - discountAmount: '25800', - channelType: 0, - channelSource: '', - channelIdentity: '', - remark: '', - cancelType: null, - cancelReasonType: null, - cancelReason: null, - rightsType: null, - createTime: '1587007083842', - orderItemVOs: [ - { - id: '130150836520098048', - orderNo: null, - spuId: '0', - skuId: '135681631', - roomId: null, - goodsMainType: 0, - goodsViceType: 0, - goodsName: - '鐧借壊鐭杩炶。瑁欒嵎鍙惰竟瑁欐憜瀹芥澗闊╃増浼戦棽绾櫧娓呯埥浼橀泤杩炶。瑁�', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - originPrice: '40000', - actualPrice: '29800', - specifications: [ - { specTitle: '棰滆壊', specValue: '绫宠壊鑽峰彾杈�' }, - { specTitle: '灏虹爜', specValue: 'M' }, - ], - buyQuantity: 1, - itemTotalAmount: '29800', - itemDiscountAmount: '25800', - itemPaymentAmount: '4000', - goodsPaymentPrice: '4000', - tagPrice: null, - tagText: null, - outCode: null, - labelVOs: null, - buttonVOs: null, - }, - ], - logisticsVO: { - logisticsType: 1, - logisticsNo: '123', - logisticsStatus: null, - logisticsCompanyCode: 'yuantong', - logisticsCompanyName: '鍦嗛�氶�熼��', - receiverAddressId: '2', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '鍓嶆捣璺�333鍙烽槼鍏夌帿鐟板洯', - receiverPostCode: '', - receiverLongitude: '113.829127', - receiverLatitude: '22.713649', - receiverIdentity: '88888888205468', - receiverPhone: '17612345678', - receiverName: '骞冲潎绾�', - expectArrivalTime: null, - senderName: '', - senderPhone: '', - senderAddress: '', - sendTime: '1587008539953', - arrivalTime: '1588291200508', - }, - paymentVO: { - payStatus: 1, - amount: '4000', - currency: null, - payType: null, - payWay: null, - payWayName: null, - interactId: null, - traceNo: null, - channelTrxNo: null, - period: null, - payTime: null, - paySuccessTime: null, - }, - buttonVOs: [{ primary: true, type: 6, name: '璇勪环' }], - labelVOs: null, - invoiceVO: null, - couponAmount: null, - autoCancelTime: null, - orderStatusName: '浜ゆ槗瀹屾垚', - orderSatusRemark: null, - logisticsLogVO: null, - invoiceStatus: null, - invoiceDesc: null, - invoiceUrl: null, - }, - ], - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 113, - success: true, - }; - const { pageNum, pageSize, orderStatus } = params.parameter; - // 瀹炵幇绛涢�� - if (orderStatus > -1) { - resp.data.orders = resp.data.orders.filter( - (order) => order.orderStatus === orderStatus, - ); - } - // 瀹炵幇鍒嗛〉 - resp.data.pageNum = pageNum; - resp.data.pageSize = pageSize; - resp.data.orders = resp.data.orders.slice( - (pageNum - 1) * pageSize, - pageNum * pageSize, - ); - return resp; -} - -export function genOrdersCount() { - const resp = { - data: [ - { tabType: 5, orderNum: 1 }, - { tabType: 10, orderNum: 1 }, - { tabType: 40, orderNum: 1 }, - { tabType: 50, orderNum: 2 }, - ], - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 41, - success: true, - }; - return resp; -} diff --git a/model/promotion.js b/model/promotion.js deleted file mode 100644 index 0aaee61..0000000 --- a/model/promotion.js +++ /dev/null @@ -1,21 +0,0 @@ -import { getGoodsList } from './goods'; - -export function getPromotion(baseID = 0, length = 10) { - return { - list: getGoodsList(baseID, length).map((item) => { - return { - spuId: item.spuId, - thumb: item.primaryImage, - title: item.title, - price: item.minSalePrice, - originPrice: item.maxLinePrice, - tags: item.spuTagList.map((tag) => ({ title: tag.title })), - }; - }), - banner: - 'https://cdn-we-retail.ym.tencent.com/tsr/promotion/banner-promotion.png', - time: 1000 * 60 * 60 * 20, - showBannerDesc: true, - statusTag: 'running', - }; -} diff --git a/model/search.js b/model/search.js deleted file mode 100644 index 2d2e68d..0000000 --- a/model/search.js +++ /dev/null @@ -1,60 +0,0 @@ -import { getGoodsList } from './goods'; - -/** - * @param {number} sort - * @param {number} pageNum - * @param {number} pageSize - * @param {number} minPrice - * @param {number} maxPrice - * @param {string} keyword - */ - -export function getSearchHistory() { - return { - historyWords: [ - '楦�', - '鐢佃剳', - 'iPhone12', - '杞﹁浇鎵嬫満鏀灦', - '鑷劧鍫�', - '灏忕背10', - '鍘熸祮鍙や簳璐¢厭', - '娆х背浼�', - '鍗庝负', - '閽堢粐鍗婅韩瑁�', - '姘㈣窇闉�', - '涓夌洅澶勭悊鍣�', - ], - }; -} - -export function getSearchPopular() { - return { - popularWords: [ - '楦�', - '鐢佃剳', - 'iPhone12', - '杞﹁浇鎵嬫満鏀灦', - '鑷劧鍫�', - '灏忕背10', - '鍘熸祮鍙や簳璐¢厭', - '娆х背浼�', - '鍗庝负', - '閽堢粐鍗婅韩瑁�', - '姘㈣窇闉�', - '涓夌洅澶勭悊鍣�', - ], - }; -} - -export function getSearchResult() { - return { - saasId: null, - storeId: null, - pageNum: 1, - pageSize: 30, - totalCount: 1, - spuList: getGoodsList(7), - algId: 0, - }; -} diff --git a/model/submitComment.js b/model/submitComment.js deleted file mode 100644 index e620b4f..0000000 --- a/model/submitComment.js +++ /dev/null @@ -1,58 +0,0 @@ -export function getGoods() { - return { - goods: [ - { - squid: '1', - checkItems: [ - { - name: '鍖垮悕璇勪环', - value: 'anonymous', - checked: false, - }, - ], - detail: { - image: - 'https://wx.qlogo.cn/mmopen/vi_32/51VSMNuy1CyHiaAhAjLJ00kMZVqqnCqXeZduCLXHUBr52zFHRGxwL7kGia3fHj8GSNzFcqFDInQmRGM1eWjtQgqA/132', - title: '', - }, - goodComment: { - /** 鍟嗗搧璇勪环 */ - rate: 0, - /** 璇勪环鍐呭 */ - label: '123', - /** 涓婁紶鍥剧墖 */ - images: [], - }, - }, - { - squid: '2', - checkItems: [ - { - name: '鍖垮悕璇勪环', - value: 'anonymous', - checked: false, - }, - ], - detail: { - image: - 'https://wx.qlogo.cn/mmopen/vi_32/51VSMNuy1CyHiaAhAjLJ00kMZVqqnCqXeZduCLXHUBr52zFHRGxwL7kGia3fHj8GSNzFcqFDInQmRGM1eWjtQgqA/132', - title: '璇勪环鍐呭 灞卞鏅哄埄杩涘彛', - }, - goodComment: { - /** 鍟嗗搧璇勪环 */ - rate: 0, - /** 璇勪环鍐呭 */ - label: '灞卞鏅哄埄杩涘彛', - /** 涓婁紶鍥剧墖 */ - images: [], - }, - }, - ], - storeComment: { - /** 鐗╂祦璇勪环 */ - logisticsRate: 0, - /** 鏈嶅姟璇勪环 */ - servicesRate: 0, - }, - }; -} diff --git a/model/swiper.js b/model/swiper.js deleted file mode 100644 index dd5702c..0000000 --- a/model/swiper.js +++ /dev/null @@ -1,39 +0,0 @@ -// const images = [ -// { -// img: 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner1.png', -// text: '1', -// }, -// { -// img: 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner2.png', -// text: '2', -// }, -// { -// img: 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner3.png', -// text: '3', -// }, -// { -// img: 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner4.png', -// text: '4', -// }, -// { -// img: 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner5.png', -// text: '5', -// }, -// { -// img: 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner6.png', -// text: '6', -// }, -// ]; - -const images = [ - 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner1.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner2.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner3.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner4.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner5.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner6.png', -]; - -export function genSwiperImageList() { - return images; -} diff --git a/model/usercenter.js b/model/usercenter.js deleted file mode 100644 index 8822f4f..0000000 --- a/model/usercenter.js +++ /dev/null @@ -1,52 +0,0 @@ -const userInfo = { - avatarUrl: - 'https://we-retail-static-1300977798.cos.ap-guangzhou.myqcloud.com/retail-ui/components-exp/avatar/avatar-1.jpg', - nickName: 'TDesign 馃専', - phoneNumber: '13438358888', - gender: 2, -}; -const countsData = [ - { - num: 2, - name: '绉垎', - type: 'point', - }, - { - num: 10, - name: '浼樻儬鍒�', - type: 'coupon', - }, -]; - -const orderTagInfos = [ - { - orderNum: 1, - tabType: 5, - }, - { - orderNum: 1, - tabType: 10, - }, - { - orderNum: 1, - tabType: 40, - }, - { - orderNum: 0, - tabType: 0, - }, -]; - -const customerServiceInfo = { - servicePhone: '4006336868', - serviceTimeDuration: '姣忓懆涓夎嚦鍛ㄤ簲 9:00-12:00 13:00-15:00', -}; - -export const genSimpleUserInfo = () => ({ ...userInfo }); - -export const genUsercenter = () => ({ - userInfo, - countsData, - orderTagInfos, - customerServiceInfo, -}); diff --git a/pages/bookServices/detail/components/brief/index.js b/packageBookService/pages/bookServices/detail/components/brief/index.js similarity index 100% rename from pages/bookServices/detail/components/brief/index.js rename to packageBookService/pages/bookServices/detail/components/brief/index.js diff --git a/pages/bookServices/detail/components/brief/index.json b/packageBookService/pages/bookServices/detail/components/brief/index.json similarity index 100% rename from pages/bookServices/detail/components/brief/index.json rename to packageBookService/pages/bookServices/detail/components/brief/index.json diff --git a/pages/bookServices/detail/components/brief/index.wxml b/packageBookService/pages/bookServices/detail/components/brief/index.wxml similarity index 100% rename from pages/bookServices/detail/components/brief/index.wxml rename to packageBookService/pages/bookServices/detail/components/brief/index.wxml diff --git a/pages/bookServices/detail/components/brief/index.wxss b/packageBookService/pages/bookServices/detail/components/brief/index.wxss similarity index 100% rename from pages/bookServices/detail/components/brief/index.wxss rename to packageBookService/pages/bookServices/detail/components/brief/index.wxss diff --git a/pages/bookServices/detail/components/learnResource/learnResource.js b/packageBookService/pages/bookServices/detail/components/learnResource/learnResource.js similarity index 100% rename from pages/bookServices/detail/components/learnResource/learnResource.js rename to packageBookService/pages/bookServices/detail/components/learnResource/learnResource.js diff --git a/pages/bookServices/detail/components/learnResource/learnResource.json b/packageBookService/pages/bookServices/detail/components/learnResource/learnResource.json similarity index 100% rename from pages/bookServices/detail/components/learnResource/learnResource.json rename to packageBookService/pages/bookServices/detail/components/learnResource/learnResource.json diff --git a/pages/bookServices/detail/components/learnResource/learnResource.wxml b/packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxml similarity index 100% rename from pages/bookServices/detail/components/learnResource/learnResource.wxml rename to packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxml diff --git a/pages/bookServices/detail/components/learnResource/learnResource.wxss b/packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxss similarity index 100% rename from pages/bookServices/detail/components/learnResource/learnResource.wxss rename to packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxss diff --git a/pages/bookServices/detail/components/note/note.js b/packageBookService/pages/bookServices/detail/components/note/note.js similarity index 100% rename from pages/bookServices/detail/components/note/note.js rename to packageBookService/pages/bookServices/detail/components/note/note.js diff --git a/pages/bookServices/detail/components/note/note.json b/packageBookService/pages/bookServices/detail/components/note/note.json similarity index 100% rename from pages/bookServices/detail/components/note/note.json rename to packageBookService/pages/bookServices/detail/components/note/note.json diff --git a/pages/bookServices/detail/components/note/note.wxml b/packageBookService/pages/bookServices/detail/components/note/note.wxml similarity index 100% rename from pages/bookServices/detail/components/note/note.wxml rename to packageBookService/pages/bookServices/detail/components/note/note.wxml diff --git a/pages/bookServices/detail/components/note/note.wxss b/packageBookService/pages/bookServices/detail/components/note/note.wxss similarity index 100% rename from pages/bookServices/detail/components/note/note.wxss rename to packageBookService/pages/bookServices/detail/components/note/note.wxss diff --git a/pages/bookServices/detail/components/suggest/suggest.js b/packageBookService/pages/bookServices/detail/components/suggest/suggest.js similarity index 100% rename from pages/bookServices/detail/components/suggest/suggest.js rename to packageBookService/pages/bookServices/detail/components/suggest/suggest.js diff --git a/pages/bookServices/detail/components/suggest/suggest.json b/packageBookService/pages/bookServices/detail/components/suggest/suggest.json similarity index 100% rename from pages/bookServices/detail/components/suggest/suggest.json rename to packageBookService/pages/bookServices/detail/components/suggest/suggest.json diff --git a/pages/bookServices/detail/components/suggest/suggest.wxml b/packageBookService/pages/bookServices/detail/components/suggest/suggest.wxml similarity index 100% rename from pages/bookServices/detail/components/suggest/suggest.wxml rename to packageBookService/pages/bookServices/detail/components/suggest/suggest.wxml diff --git a/pages/bookServices/detail/components/suggest/suggest.wxss b/packageBookService/pages/bookServices/detail/components/suggest/suggest.wxss similarity index 100% rename from pages/bookServices/detail/components/suggest/suggest.wxss rename to packageBookService/pages/bookServices/detail/components/suggest/suggest.wxss diff --git a/pages/bookServices/detail/components/teachResource/index.js b/packageBookService/pages/bookServices/detail/components/teachResource/index.js similarity index 100% rename from pages/bookServices/detail/components/teachResource/index.js rename to packageBookService/pages/bookServices/detail/components/teachResource/index.js diff --git a/pages/bookServices/detail/components/teachResource/index.json b/packageBookService/pages/bookServices/detail/components/teachResource/index.json similarity index 100% rename from pages/bookServices/detail/components/teachResource/index.json rename to packageBookService/pages/bookServices/detail/components/teachResource/index.json diff --git a/pages/bookServices/detail/components/teachResource/index.wxml b/packageBookService/pages/bookServices/detail/components/teachResource/index.wxml similarity index 100% rename from pages/bookServices/detail/components/teachResource/index.wxml rename to packageBookService/pages/bookServices/detail/components/teachResource/index.wxml diff --git a/pages/bookServices/detail/components/teachResource/index.wxss b/packageBookService/pages/bookServices/detail/components/teachResource/index.wxss similarity index 100% rename from pages/bookServices/detail/components/teachResource/index.wxss rename to packageBookService/pages/bookServices/detail/components/teachResource/index.wxss diff --git a/packageBookService/pages/bookServices/detail/components/testResource/testResource.js b/packageBookService/pages/bookServices/detail/components/testResource/testResource.js new file mode 100644 index 0000000..119ce3b --- /dev/null +++ b/packageBookService/pages/bookServices/detail/components/testResource/testResource.js @@ -0,0 +1,133 @@ +// pages/bookServices/detail/components/testResource/testResource.js +const app = getApp() +Component({ + /** + * 缁勪欢鐨勫睘鎬у垪琛� + */ + properties: { + list: { + type: Array, + value: [] + }, + bookInfo: { + type: Object, + value: "", + }, + mockData: { + type: Object, + value: {} + } + }, + + /** + * 缁勪欢鐨勫垵濮嬫暟鎹� + */ + data: { + selectBtn: 'test', // test mock + radioItem: 'test', + }, + + /** + * 缁勪欢鐨勬柟娉曞垪琛� + */ + methods: { + async goTest(e) { + const value = e.currentTarget.dataset.value + const token = wx.getStorageSync('jsek-token') + if (!token) { + return wx.getUserProfile({ + desc: '鐢ㄦ埛鐧诲綍', + success: (res) => { + console.log(res); + } + }) + } + // 鑾峰彇绔犺妭涓嬫槸鍚︽湁棰樼洰 + let idPathList = [] + let query = { + path: '*', + queryType: '*', + productId: this.properties.bookInfo.id, + cmsPath: value.productLinkPath, + pading: { + start: 0, + size: 999 + } + } + if (value.childrenFolderCount == 0) { + return wx.showToast({ + icon: "error", + title: '鏆傛棤鏁版嵁', + }) + } else { + const res = await app.MG.store.getProductDetail(query) + res.datas.cmsDatas[0].datas.forEach((item) => { + idPathList.push({ + id: item.id, + name: item.name, + productLinkPath: item.productLinkPath, + type: item.type + }) + }) + } + // query: { + // title: bookData.value.test, + // bookId: route.query.bookId, + // productLinkPath: data.productLinkPath, + // answerTitle: data.name, + // answerType: 'option', + // rootCmsItemId: bookData.value.rootCmsItemId, + // idPathList: JSON.stringify(idPathList) + // } + + wx.navigateTo({ + url: `/packageBookService/pages/bookServices/examination/examination?bookId=${this.properties.bookInfo.id}&productLinkPath=${value.productLinkPath}&rootCmsItemId=${this.properties.bookInfo.rootCmsItemId}&idPathList=${JSON.stringify(idPathList)}&answerTitle=${value.name}&answerType=${'option'}`, + }) + }, + goMycollect(e) { + const answertype = e.currentTarget.dataset.answertype + const token = wx.getStorageSync('jsek-token') + if (!token) { + return wx.getUserProfile({ + desc: '鐢ㄦ埛鐧诲綍', + success: (res) => { + console.log(res); + } + }) + } + wx.navigateTo({ + url: `/packageBookService/pages/bookServices/examination/examination?bookId=${this.properties.bookInfo.id}&rootCmsItemId=${this.properties.bookInfo.rootCmsItemId}&answerTitle=${answertype == 'collectQuestion' ? '鎴戠殑鏀惰棌' : '鎴戠殑閿欓'}&answerType=${answertype}`, + }) + }, + // 缁冧範 缁勪欢鍒囨崲 + onRadioChange(e) { + this.setData({ + radioItem: e.detail.value + }) + }, + async getMockId() { + let id + let query = { + start: 0, + size: 99, + productId: this.properties.bookInfo.id + } + await app.MG.edu.getQuizConfigListByProduct(query).then((res) => { + id = res.datas[0].id + }) + return id + }, + // 缁勫嵎璺宠浆绛旈鐣岄潰 + async goMackPaper(e) { + // const token = localStorage.getItem('jsek-token') + // if (!token) { + // return logIn() + // } + const mockid = await this.getMockId() + const item = e.currentTarget.dataset.item + wx.navigateTo({ + url: `/packageBookService/pages/bookServices/examination/examination?bookId=${this.properties.bookInfo.id}&rootCmsItemId=${this.properties.bookInfo.rootCmsItemId}&answerTitle=${item.name}&answerType=${'mock'}&uuid=${item.id}&mockid=${mockid}`, + }) + } + } +}) diff --git a/pages/bookServices/detail/components/testResource/testResource.json b/packageBookService/pages/bookServices/detail/components/testResource/testResource.json similarity index 100% rename from pages/bookServices/detail/components/testResource/testResource.json rename to packageBookService/pages/bookServices/detail/components/testResource/testResource.json diff --git a/pages/bookServices/detail/components/testResource/testResource.wxml b/packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml similarity index 100% rename from pages/bookServices/detail/components/testResource/testResource.wxml rename to packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml diff --git a/pages/bookServices/detail/components/testResource/testResource.wxss b/packageBookService/pages/bookServices/detail/components/testResource/testResource.wxss similarity index 100% rename from pages/bookServices/detail/components/testResource/testResource.wxss rename to packageBookService/pages/bookServices/detail/components/testResource/testResource.wxss diff --git a/pages/bookServices/detail/components/tree/components/util.js b/packageBookService/pages/bookServices/detail/components/tree/components/util.js similarity index 100% rename from pages/bookServices/detail/components/tree/components/util.js rename to packageBookService/pages/bookServices/detail/components/tree/components/util.js diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js new file mode 100644 index 0000000..414cc08 --- /dev/null +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -0,0 +1,253 @@ + +import Message from 'tdesign-miniprogram/message/message'; +const util = require('./components/util') // 寮曞叆灏佽杩囩殑鍔犺浇鎻愮ず +const app = getApp() +Component({ + properties: { + treeList: { + type: Array, + value: [] + }, + bookInfo: { + type: Object, + value: {} + }, + buyIds: { + type: Array, + value: [] + }, + tab: { + type: String, + value: '' + }, + applyState: { + type: String, + value: '' + }, + openTeachids: { + type: Array, + value: '' + }, + openLearnids: { + type: Array, + value: "" + } + }, + data: { + activeValues: [0], + webpageSrc: '' + }, + onShow() { + + }, + + + methods: { + // 鑺傜偣灞曞紑 + handleChange(e) { + this.setData({ + activeValues: e.detail.value, + }); + console.log('浼犻��', this.properties.buyIds); + }, + handleCheck(data) { + for (let index = 0; index < data.length; index++) { + const element = data[index]; + element.checked = true + if (element.childrenCount && element.type == "productFolder") { + handleCheck(element.children) + } + } + }, + downloadTeach(e) { + const value = e.currentTarget.dataset.value + var myEventDetail = { + value, + } // detail瀵硅薄锛屾彁渚涚粰浜嬩欢鐩戝惉鍑芥暟 + var myEventOption = { + bubbles: true, + composed: true + } // 瑙﹀彂浜嬩欢鐨勯�夐」 + this.triggerEvent('downloadTeach', myEventDetail, myEventOption) + + }, + // 鍒ゆ柇璧勬簮鏄惁璐拱 + resourceIsBuy(data) { + if (data.saleMethod && data.saleMethod.length) { + const isSHow = buyIdList.value.some((item) => item == data.saleMethod[0].Id) + return !isSHow + } else { + return false + } + }, + // 璺宠浆闊宠棰戞挱鏀惧櫒 + goPlayer(e) { + const item = e.currentTarget.dataset.item + const parent = e.currentTarget.dataset.parent + + + + let url + if (item.selectType == 'video') { + url = '/packageDomain/pages/resourceDetails/myVideo/index' + } else if (item.selectType == 'audio') { + url = '/packageDomain/pages/resourceDetails/myAudio/index' + } else if (item.selectType == 'picture' || item.selectType == 'zip') { + url = '/packageDomain/pages/resourceDetails/document/index' + } + + // else { + // + // } + wx.navigateTo({ + url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parent.productLinkPath}&parentName=${parent.name}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}`, + }) + + + if (item.selectType == 'document' || item.selectType == 'pdf') { + const fileLink = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file + console.log(fileLink, 'fileLink'); + //鎻愮ず鍔犺浇涓� + util.showLoading() + // 鍗曟涓嬭浇鍏佽鐨勬渶澶ф枃浠朵负 200MB + wx.downloadFile({ + url: fileLink, // 鍦板潃宸叉墦鐮侊紝鑷繁鎹釜鍏朵粬鐨勫湴鍧�锛�"https://www.xxxxx.com/file/娴嬭瘯閫氱煡.pdf"锛� + success: function (res) { + console.log(res, "wx.downloadFile success res") + if (res.statusCode != 200) { + util.hideLoadingWithErrorTips() + return false + } + var Path = res.tempFilePath //杩斿洖鐨勬枃浠朵复鏃跺湴鍧�锛岀敤浜庡悗闈㈡墦寮�鏈湴棰勮鎵�鐢� + wx.openDocument({ + filePath: Path, + showMenu: true, + success: function (res) { + console.log('鎵撳紑鎴愬姛'); + util.hideLoading() + } + }) + }, + fail: function (err) { + console.log(err, "wx.downloadFile fail err"); + util.hideLoadingWithErrorTips() + } + }) + + + } + + if (item.selectType == 'webpage') { + console.log(11); + this.setData({ + webpageSrc: item.jsek_link + }) + console.log(this.data.webpageSrc, 'webpageSrc'); + } + + + + }, + // 鎷垮埌鎵�鏈夐」 + getAllChildren(id) { + let result = []; + function findChildren(item) { + if (item.id === id) { + if (item.children && item.children.length > 0) { + item.children.forEach(child => { + findChildren(child); + }); + } + } else { + if (item.children && item.children.length > 0) { + item.children.forEach(child => { + findChildren(child); + }); + } + } + if (item.children && item.children.length > 0) { + result.push(...item.children); + } + } + console.log(this.properties.treeList); + this.properties.treeList.forEach(item => { + findChildren(item); + }); + return result; + }, + // 鎷垮埌褰撳墠椤瑰瓙椤� + flattenTree(tree) { + let result = []; + function flatten(node) { + result.push(node); + if (node.children && node.children.length > 0) { + node.children.forEach(child => { + flatten(child); + }); + } + } + tree.forEach(node => { + flatten(node); + }); + return result + }, + findAndUpdateItemById(tree, id) { + function findAndUpdate(node) { + if (node.id === id) { + node.check = true; // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true + return true; // 杩斿洖 true 琛ㄧず鎵惧埌浜嗙洰鏍囬」 + } + if (node.children && node.children.length > 0) { + for (let child of node.children) { + if (findAndUpdate(child)) { + return true; // 濡傛灉鍦ㄥ瓙鑺傜偣涓壘鍒颁簡鐩爣椤癸紝鍒欑洿鎺ヨ繑鍥� true + } + } + } + return false; // 琛ㄧず鏈壘鍒扮洰鏍囬」 + } + + for (let node of tree) { + if (findAndUpdate(node)) { + break; // 濡傛灉鍦ㄩ《灞傝妭鐐逛腑鎵惧埌浜嗙洰鏍囬」锛岀洿鎺ラ��鍑哄惊鐜� + } + } + }, + // 鍙樹负true + findAndUpdateItemsByIds(tree, ids) { + function findAndUpdate(node) { + if (ids.includes(node.id)) { + node.checked = true; // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true + } + if (node.children && node.children.length > 0) { + for (let child of node.children) { + findAndUpdate(child); // 閫掑綊澶勭悊瀛愯妭鐐� + } + } + } + + for (let node of tree) { + findAndUpdate(node); // 瀵规瘡涓《灞傝妭鐐规墽琛屾煡鎵惧拰鏇存柊鎿嶄綔 + } + return tree; // 杩斿洖淇敼鍚庣殑瀹屾暣鏁扮粍 + }, + // 绔犺妭鍕鹃�� + checkResourceTitle(e) { + const item = e.currentTarget.dataset.item + console.log(item, 'item'); + let list = this.flattenTree([item]) + let ids = [] + list.forEach(item => { + ids.push(item.id) + }) + const tab = this.findAndUpdateItemsByIds([item], ids) + console.log(ids, tab); + } + }, + onCloudShoppingCart() { + console.log(this.properties.treeList); + }, + oncheckbox() { + console.log(111); + } +}) \ No newline at end of file diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.json b/packageBookService/pages/bookServices/detail/components/tree/index.json new file mode 100644 index 0000000..aca6ac8 --- /dev/null +++ b/packageBookService/pages/bookServices/detail/components/tree/index.json @@ -0,0 +1,12 @@ +{ + "component": true, + "usingComponents": { + "t-icon": "tdesign-miniprogram/icon/icon", + "t-image": "tdesign-miniprogram/image/image", + "t-collapse": "tdesign-miniprogram/collapse/collapse", + "t-collapse-panel": "tdesign-miniprogram/collapse-panel/collapse-panel", + "t-button": "tdesign-miniprogram/button/button", + "t-checkbox": "tdesign-miniprogram/checkbox/checkbox", + "tree": "/packageBookService/pages/bookServices/detail/components/tree/index" + } +} \ No newline at end of file diff --git a/pages/bookServices/detail/components/tree/index.wxml b/packageBookService/pages/bookServices/detail/components/tree/index.wxml similarity index 100% rename from pages/bookServices/detail/components/tree/index.wxml rename to packageBookService/pages/bookServices/detail/components/tree/index.wxml diff --git a/pages/bookServices/detail/components/tree/index.wxss b/packageBookService/pages/bookServices/detail/components/tree/index.wxss similarity index 100% rename from pages/bookServices/detail/components/tree/index.wxss rename to packageBookService/pages/bookServices/detail/components/tree/index.wxss diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js new file mode 100644 index 0000000..0bc5d6c --- /dev/null +++ b/packageBookService/pages/bookServices/detail/index.js @@ -0,0 +1,1120 @@ +// pages/bookServices/detail/index.js +import Message from 'tdesign-miniprogram/message/index.js'; +import Toast from 'tdesign-miniprogram/toast'; +const app = getApp(); +Page({ + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + bookId: '', + barHeight: '', + navBarHeight: '', + options: { + id: '', + name: '', + }, + bookDetail: {}, + link: { + jd: '', + tamll: '', + dang: '', + micro: '', + }, + tabValue: 'brief', + cmsDatas: [], // 璧勬簮refCode鍒楄〃 + ids: [1], + list: [], + teachResources: [], + teach: [], + learn: [], + test: [], + openTeachids: [], + openLearnids: [], + openTestids: [], + resourceClassList: [], // 璧勬簮鎵�灞炲垎绫� + applyState: "", // 鏁欏璧勬簮鐢宠鐘舵�� + deadline: "", // 鏁欏璧勬簮鐢宠鏈夋晥鏃ユ湡 + rejectCause: "", // 涓嬭浇鎷掔粷鍘熷洜 + buyIdList: [], + shoppingCartGetId: [], // 宸茶喘涔癷d鍒楄〃 + shoppingList: [], + loading: false, + isShowTeachDownload: false, // 鎻愮ずPC涓嬭浇寮圭獥鐘舵�� + confirmBtn: { content: '鎴戠煡閬撲簡', variant: 'base' }, + mockData: { + id: 0, // 閿�鍞甶d + price: 0, // 鍞环 + count: 0, // 缁勫嵎宸茶喘涔版鏁� + useCount: 0, // 缁勪欢宸蹭娇鐢ㄦ鏁� + residue: 0, // 缁勫嵎鍓╀綑娆℃暟 + mockList: [] // 鐢ㄦ埛缁勫嵎鎻愪氦淇℃伅 + } + }, + + + resetTree: function (e) { + this.setData({ + currentCheck: e.detail.checkedItem, + list: e.detail.changeList + }) + }, + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + const systInfo = wx.getSystemInfoSync(); + const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 + const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� + this.setData({ + bookId: options.id, + barHeight: systInfo.statusBarHeight, + navBarHeight: navBarHeight, + }); + this.setData({ + options: { + id: options.id, + name: options.name, + }, + }); + this.getBookInfo(options.id); + this.getResourceClass() // 鑾峰彇璧勬簮鎵�灞炲垎绫� + const token = wx.getStorageSync('jsek-token') + if (token) { + this.getShoppingCartProductGet() + this.getApplyInfo(options.id) + this.getMockData() + } + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + if (this.data.tabValue == 'jesk_note') { + const child = this.selectComponent('#note') + child.onReachBottom() + } + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { }, + // 鏍煎紡鍖栨棩鏈� + formatDate(dateString) { + if (!dateString) { + return 'Invalid date'; + } + const match = dateString.match(/^(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/); + if (!match) { + throw new Error('Invalid date format'); + } + + const [, year, month, day, hours, minutes, seconds] = match; + const date = new Date( + parseInt(year, 10), + parseInt(month, 10) - 1, + parseInt(day, 10), + parseInt(hours, 10), + parseInt(minutes, 10), + parseInt(seconds, 10), + ); + + if (isNaN(date.getTime())) { + throw new Error('Invalid date'); + } + + // 鐢变簬灏忕▼搴忕幆澧冨彲鑳戒笉鏀寔 Intl.DateTimeFormat锛屾垜浠娇鐢ㄧ畝鍖栫殑鏍煎紡鍖栨柟娉� + const formatted = `${year}骞�${this.formatMonth(month)}`; + return formatted; + }, + // 绠�鍖栫殑鏈堜唤鏍煎紡鍖栧嚱鏁帮紝杩斿洖鏈堜唤鐨勪腑鏂囪〃杈� + formatMonth(month) { + const months = ['1鏈�', '2鏈�', '3鏈�', '4鏈�', '5鏈�', '6鏈�', '7鏈�', '8鏈�', '9鏈�', '10鏈�', '11鏈�', '12鏈�']; + return months[parseInt(month, 10) - 1]; + }, + // 閲戦鏄剧ず.00鏍煎紡 + numFormat(value) { + if (!value) return '0.00'; + value = Number(value).toFixed(2); + var intPart = Math.trunc(value); // 鑾峰彇鏁存暟閮ㄥ垎 + var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); // 灏嗘暣鏁伴儴鍒嗛�笁涓�鏂� + var floatPart = '.00'; // 棰勫畾涔夊皬鏁伴儴鍒� + var value2Array = value.split('.'); + // =2琛ㄧず鏁版嵁鏈夊皬鏁颁綅 + if (value2Array.length === 2) { + floatPart = value2Array[1].toString(); // 鎷垮埌灏忔暟閮ㄥ垎 + if (floatPart.length === 1) { + return `${intPartFormat}.${floatPart}0`; + } + return `${intPartFormat}.${floatPart}`; + } + return intPartFormat + floatPart; + }, + // 杩斿洖 + goBack() { + wx.navigateBack(); + }, + // 鑾峰彇鍥句功璇︽儏 + getBookInfo(id) { + this.setData({ + "mockData'.id": 0, + "mockData.price": 0, + "mockData.count": 0 + }) + const query = { + path: '*', + queryType: '*', + productId: id, + favoriteTypes: 'FavoriteBookCity', + itemFields: { + 'SysType=': 'CmsFolder', + }, + coverSize: { + height: 300, + }, + fields: { + seriesName: [], + author: [], + isbn: [], + publicationDate: [], + bookClassification: [], + paperPrice: [], + JDLink: [], + tmallLink: [], + dangdangLink: [], + weidianLink: [], + content: [], + authorIntroduction: [], + // isApplyPaperBook: [], + // isApplyEBook: [], + isApplyBook: [], + isSell: [], + pdf: [], + protectedEpub: [], + probationPage: [], //pdf璇曡椤垫暟 + freeEpubPage: [], //epub璇曡鐧惧垎姣� + }, + }; + app.MG.store.getProductDetail(query).then(async (res) => { + console.log(res.datas); + this.setData({ + bookDetail: res.datas, + cmsDatas: res.datas.cmsDatas[0].datas, + buyIdList: res.datas.purchasedSaleMethodIdList + }); + // 鑾峰彇鍥句功鍒嗙被 + const iconType = JSON.parse(res.datas.bookClassification)[0][0]; + const classType = JSON.parse(res.datas.bookClassification)[0][1]; + const className = await this.getBookClass(iconType, classType) + // 鑾峰彇缁勫嵎閿�鍞甶d + if (res.datas.saleMethod && res.datas.saleMethod.length) { + res.datas.saleMethod.forEach((item) => { + if (item.SaleType == 'combinationTestPaper') { + this.setData({ + 'mockData.id': item.Id, + 'mockData.price': item.Price + }) + } + }) + } + // 鑾峰彇缁勫嵎宸茶喘涔版鏁� + if (res.datas.purchasedSaleMethodIdList && res.datas.purchasedSaleMethodIdList.length) { + if (this.data.mockData.id) { + let count = res.datas.purchasedSaleMethodIdList.filter( + (item) => item == this.data.mockData.id + ).length + this.setData({ + 'mockData.count': count + }) + } + } + console.log('缁勫嵎淇℃伅', this.data.mockData); + this.setData({ + 'bookDetail.publicationDate': this.formatDate(this.data.bookDetail.publicationDate), + 'bookDetail.class': className, + 'bookDetail.price': this.numFormat(this.data.bookDetail.price), + 'bookDetail.oldPrice': this.numFormat(this.data.bookDetail.oldPrice), + 'bookDetail.paperPrice': this.numFormat(this.data.bookDetail.paperPrice), + }); + }); + + }, + // 鑾峰彇鍥句功鍒嗙被 + async getBookClass(iconType, classType) { + let name = ''; + const query = { + refCodes: ['bookClassification'], + }; + await app.MG.store.getProductTypeField(query).then((res) => { + JSON.parse(res[0].config).option.forEach((item) => { + if (item.value == iconType) { + item.child.forEach((citem) => { + if (citem.value == classType) { + name = citem.name; + } + }); + } + }); + }); + return name; + }, + // 鏀惰棌 + setCollect() { + if (this.data.bookDetail.isFavourite) { + app.MG.store + .delProductLink({ + productIds: [this.data.bookDetail.id], + linkType: 'FavoriteBookCity', + }) + .then(() => { + this.setData({ + 'bookDetail.isFavourite': false + }) + Message.success({ + context: this, + offset: [20, 32], + duration: 5000, + content: '杩欐槸涓�鏉℃垚鍔熺殑鎻愮ず娑堟伅', + }); + }); + } else { + const params = { + productIds: [this.data.bookDetail.id], + linkType: 'FavoriteBookCity', + }; + app.MG.store.addProductLink(params).then((res) => { + this.setData({ + 'bookDetail.isFavourite': true + }) + Message.success({ + context: this, + offset: ['20rpx', '32rpx'], + duration: 2000, + content: '鏀惰棌鎴愬姛', + }); + }); + } + }, + // 鎴戣寤鸿 + suggestBtn() { + const child = this.selectComponent('#suggest-component') + child.showDialog() + }, + // 璺宠浆缃戝簵 + goShop(e) { + const { link } = e.currentTarget.dataset; + wx.navigateTo({ + url: `/packageBookService/pages/bookServices/webpage/index?url=${link}`, + }) + }, + onTabsChange(e) { + this.setData({ + tabValue: e.detail.value + }) + if (e.detail.label == '鏁欏璧勬簮' || e.detail.label == '浜戝涔�' || e.detail.label == '浜戞祴璇�') { + const checkData = this.data.cmsDatas.find(item => item.refCode == e.detail.value) + if (checkData) { + if ((e.detail.value == 'jsek_teachingResources' && !this.data.teach.length) + || (e.detail.value == 'jsek_cloudLearning' && !this.data.learn.length) + || (e.detail.value == 'questionBank' && !this.data.test.length)) { + this.getResourceData(checkData) + } + + } + } else if (e.detail.label == '浜戠瑪璁�') { + const token = wx.getStorageSync('jsek-token') + const child = this.selectComponent('#note') + child.handleSubmitTitle() + if (token) { + child.changeLoading() + child.getNoteList() + } + + } + }, + // 鑾峰彇璧勬簮鎵�灞炲垎绫� + getResourceClass() { + let query = { + refCodes: ['resourcesClassification'] + } + app.MG.store.getProductTypeField(query).then((res) => { + this.setData({ + resourceClassList: JSON.parse(res[0].config).option + }) + }) + }, + // 鑾峰彇鏁欏璧勬簮 浜戝涔� 浜戞祴璇� + getResourceData(type) { + this.setData({ + loading: true + }) + let query = { + path: '*', + queryType: '*', + productId: this.data.bookDetail.id, + cmsPath: type.productLinkPath, + itemFields: { + SysType: 'CmsFolder', + // 璧勬簮绫诲瀷锛岃瘯璇绘枃浠讹紝鏄惁鍏佽涓嬭浇绛夊弬鏁� + selectType: [], + freeFile: [], + file: [], + resourcesClassification: [], + isDownload: [], + jsek_resourceBrief: [], + jsek_link: [], + jsek_questionBank: [] + }, + pading: { + start: 0, + size: 999 + }, + } + app.MG.store + .getProductDetail(query) + .then(async (res) => { + // 浜戞祴璇曪紝閫掑綊璇锋眰閲屽眰鏁版嵁 + if (type.refCode == 'questionBank') { + const data = res.datas.cmsDatas[0].datas.filter( + (item) => item.refCode == 'jsek_questionBank' + ) + if (data.length) return this.getResourceData(data[0]) + } + //鏁欏璧勬簮 浜戝涔� + if (type.refCode == 'jsek_teachingResources' || type.refCode == 'jsek_cloudLearning') { + if (res.datas.cmsDatas[0].datas.length > 0) { + if (type.refCode == 'jsek_teachingResources') { + res.datas.cmsDatas[0].datas.forEach(item => { + item.checked = false + }) + const list = await this.getAllResource(res.datas.cmsDatas[0].datas) + + console.log(list, 'list'); + this.setData({ + teach: list, + loading: false + }) + this.findChildIds(this.data.teach, this.data.openTeachids = []) + } else if (type.refCode == 'jsek_cloudLearning') { + const list = await this.getAllResource(res.datas.cmsDatas[0].datas) + this.setData({ + learn: list, + loading: false + }) + this.findChildIds(this.data.learn, this.data.openLearnids = []) + } + } else { + // 鏃犳暟鎹� + } + } else if (type.refCode == 'jsek_questionBank') { + // const list = await this.getAllResource(res.datas.cmsDatas[0].datas) + this.setData({ + test: res.datas.cmsDatas[0].datas, + loading: false + }) + } else { + console.log('鍏朵粬'); + } + }) + .catch((e) => { + console.log(e) + }) + }, + // 鑾峰彇tag涓嬫墍鏈夎祫婧� + async getAllResource(data) { + if (!data.length) return false + for (let i = 0; i < data.length; i++) { + let item = data[i] + if (item.sysType == 'CmsFolder' && item.childrenCount > 0) { + item.children = [] + item.children = await this.getFolderItem(item.productLinkPath) + await this.getAllResource(item.children) + } + } + return data + }, + // 鑾峰彇璧勬簮鎺ュ彛 + async getFolderItem(path) { + let query = { + path: '*', + queryType: '*', + productId: this.data.bookDetail.id, + cmsPath: path, + itemFields: { + SysType: 'CmsFolder', + // 璧勬簮绫诲瀷锛岃瘯璇绘枃浠讹紝鏄惁鍏佽涓嬭浇绛夊弬鏁� + selectType: [], + freeFile: [], + file: [], + protectedFile: [], + resourcesClassification: [], + isDownload: [], + jsek_resourceBrief: [], + jsek_link: [], + accessType: [] + }, + pading: { + start: 0, + size: 999 + }, + } + const data = await app.MG.store.getProductDetail(query) + data.datas.cmsDatas[0].datas.forEach((item) => { + this.data.resourceClassList.forEach((type) => { + if (type.value == item.resourcesClassification) item.resourceClass = type.name + }) + // 缃戦〉 涓嶈兘涓嬭浇 绉佹湁鏂囦欢 + if (item.sysType == 'CmsItem') { + if (item.selectType == 'webpage') { + item.disabled = true + } else { + if (item.isDownload != 1) { + item.disabled = true + } + } + if (item.file) { + if (item.fileMap[item.file].protectType == 'Private') item.disabled = true + } + } + }) + data.datas.cmsDatas[0].datas.forEach(item => { + if (this.data.tabValue == 'jsek_teachingResources') { + item.checked = false + } else if (this.data.tabValue == 'jsek_cloudLearning') { + item.isbuy = this.resourceIsBuy(item) + item.isShopCar = this.isShoppingCart(item) + } + }) + return data.datas.cmsDatas[0].datas + }, + // 鑾峰彇灞曞紑椤� + findChildIds(data, result) { + let index = 0 + for (let i = 0; i < data.length; i++) { + if (index < 3) { + const item = data[i] + if (item.childrenFolderCount > 0) { + result.push(item.id) + for (let j = 0; j < item.children.length; j++) { + if (index < 3) { + const childrenItme = item.children[j] + if (item.childrenCount > 0) { + result.push(childrenItme.id) + index += 1 + } + } else { + break + } + } + } else if (item.childrenCount > 0) { + result.push(item.id) + index += 1 + } + } else { + break + } + } + }, + + // 鍥句功娣诲姞璐墿杞� + async addBookShopcCar() { + const shoppingCartGetId = [] + + let query = { + start: 0, + size: 999, + filterList: [], + searchList: [] + } + const res = await app.MG.store.getShoppingCartProductList(query) + res.datas.forEach((item) => { + shoppingCartGetId.push(item.saleMethod.id) + }) + console.log(shoppingCartGetId, 'shoppingCartGetId'); + console.log(this.data.bookDetail.defaultSaleMethodId, 'this.data.bookDetail.defaultSaleMethodId'); + const determine = shoppingCartGetId.some((item) => item == this.data.bookDetail.defaultSaleMethodId) + console.log(determine); + + if (!determine) { + let query = { + requests: [ + { + saleMethodId: this.data.bookDetail.defaultSaleMethodId, + storeEventId: null, + agentCode: '鐢靛瓙涔�' + } + ] + } + const addRes = app.MG.store.addShoppingCart(query) + this.showSuccessToast() + + } else { + Toast({ + context: this, + selector: '#t-toast', + message: '宸叉坊鍔�', + theme: 'success', + direction: 'column', + }); + } + + }, + + showSuccessToast() { + Toast({ + context: this, + selector: '#t-toast', + message: '娣诲姞鎴愬姛', + theme: 'success', + direction: 'column', + }); + }, + + + + async buyBook() { + let bookOrdersId = '' + let query = { + remarks: '鐢靛瓙涔�', + requests: [ + { + saleMethodId: this.data.bookDetail.defaultSaleMethodId, + count: 1 + } + ] + } + // 鍙戣捣璁㈠崟鍒濆鍖栬姹傚苟绛夊緟缁撴灉 + const res = await app.MG.store.initOrder(query) + // 鑾峰彇璁㈠崟鍙峰苟璧嬪�肩粰 orderNumber.value + bookOrdersId = res.orderNumber + console.log(bookOrdersId); + // 妫�鏌ヨ鍗曞彿鏄惁瀛樺湪 + if (bookOrdersId) { + const url = '/pages/cart/paymentPage/index?orderNumber=' + bookOrdersId + wx.navigateTo({ + url + }) + } else { + console.log(222); + } + + }, + + // 鑾峰彇鏁欏璧勬簮涓嬭浇鏄惁鐢宠閫氳繃 + getApplyInfo(id) { + // 鑾峰彇褰撳墠鏃堕棿 + const currentDate = new Date() + let query = { + sort: { + type: 'Desc', + field: 'CreateDate' + }, + start: 0, + size: 99999, + appRefCode: app.config.appRefCode, + topicIdOrRefCode: 'productDownLoad' + } + app.MG.ugc.getTopicMessageList(query).then((res) => { + const applyResource = res.datas.find((item) => { + let content = [] + try { + content = JSON.parse(item.content) + } catch (error) { + content = [] + } + if (Array.isArray(content)) return content.find((citem) => citem.id == id) + return false + }) + // 鏈夌敵璇疯褰� + if (applyResource) { + if (applyResource.state == 'Reject') { + this.setData({ + rejectCause: JSON.parse(applyResource.feedBack).reason, + applyState: 'Reject' + }) + } else if (applyResource.state == 'Normal') { + const endDate = JSON.parse(applyResource.feedBack).endDate + // const endDate = new Date(JSON.parse(applyResource.feedBack).endDate + ' 23:59:59').getTime() + if (endDate == '姘镐箙') { + this.setData({ + applyState: 'Normal', + deadline: '姘镐箙', + }) + console.log('鏈夋晥鏃ユ湡', this.data.deadline); + } else { + + let endTime = new Date(endDate + ' 23:59:59').getTime() + this.setData({ + deadline: endDate + ' 23:59:59' + }) + if (currentDate.getTime() < endTime) { + // 鏈秴鏃� + this.setData({ + applyState: 'Normal' + }) + } else { + this.setData({ + applyState: 'none' + }) + } + } + } else { + this.setData({ + applyState: applyResource.state + }) + } + } else { + this.setData({ + applyState: 'none' + }) + } + }) + console.log('鏈夋晥鏃ユ湡', this.data.deadline); + }, + // 鐢宠鏁欏璧勬簮 + applyResource() { + // let role = userStore.userInfo ? userStore.userInfo.role : null + // if (role) { + // if (role == 'Teacher') { + // 鐢宠鏁欏璧勬簮 + let query = { + topicIdOrRefCode: 'productDownLoad', + type: 'applyForDownload', + state: 'WaitAudit', + cmsTypeRefCode: '', + newDataListRequest: [], + name: this.data.bookDetail.name, // name涓虹敵璇风殑涔︽湰鍚嶇О + content: JSON.stringify([ + { + name: this.data.bookDetail.name, + id: this.data.bookDetail.id, + // defaultSaleMethodId: bookData.value.defaultSaleMethodId, + icon: this.data.bookDetail.icon + } + ]) + } + app.MG.ugc.newTopicMessage(query).then((res) => { + if (res) { + Message.success('鐢宠宸叉彁浜わ紝璇峰緟瀹℃牳閫氳繃鍚庝笅杞�') + } + this.getApplyInfo(this.data.bookDetail.id) + }) + // } else { + // ElMessageBox.confirm('璇峰厛杩涜鏁欏笀璁よ瘉锛�', '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', { + // confirmButtonText: '鍘昏璇�', + // cancelButtonText: '鍙栨秷', + // type: 'warning' + // }) + // .then(() => { + // isShow.value = true + // }) + // .catch(() => { }) + // } + // } else { + // // logIn() + // } + }, + // 鏁欏璧勬簮涓嬭浇鍓嶅線PC鎻愮ずDiialog + closeTeachDownload() { + this.setData({ + isShowTeachDownload: false + }) + }, + // 涓嬭浇鍔熻兘 + downloadTeach(e) { + this.setData({ + isShowTeachDownload: true + }) + console.log('zhuan', this.data.isShowTeachDownload); + // const data = e.detail.value + // // const data + // // let role = userStore.userInfo ? userStore.userInfo.role : null + // // if (role) { + // // if (role == 'Teacher') { + // if (this.properties.applyState == 'Normal' || this.properties.applyState == 'none') { + // // 鏄惁鍏佽涓嬭浇 + // if (data.isDownload == 1) { + // // 鐢宠閫氳繃 + // let url = app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + // if (data.file) { + // // 鍒ゆ柇鏄惁绉佹湁 + // if (data.fileMap[data.file].protectType == 'Private') + // return Message.error({ + // context: this, + // offset: ['20rpx', '32rpx'], + // duration: 5000, + // content: '璇ユ枃浠舵棤娉曚笅杞�' + // }) + // url = url + data.file + '&token=' + wx.getStorageSync('jsek-token') + // } else if (data.freeFile) { + // url = url + data.freeFile + '&token=' + wx.getStorageSync('jsek-token') + // } else { + // Message.error({ + // context: this, + // offset: ['20rpx', '32rpx'], + // duration: 5000, + // content: '鏆傛棤璧勬簮', + // }) + // } + // this.downloadFile(url) + // } else { + // Message.error({ + // context: this, + // offset: ['20rpx', '32rpx'], + // duration: 5000, + // content: '璇ヨ祫婧愭棤娉曚笅杞�', + // }) + // } + // } else if (this.properties.applyState == 'WaitAudit') { + // // ElMessageBox.confirm('璇峰厛鐢宠涓嬭浇锛�', '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', { + // // confirmButtonText: '鐢宠', + // // cancelButtonText: '鍙栨秷', + // // type: 'warning' + // // }) + // // .then(() => applyBookInfo()) + // // .catch() + // Message.error({ + // context: this, + // offset: ['20rpx', '32rpx'], + // duration: 5000, + // content: '璇ヨ祫婧愪笅杞界敵璇峰鏍镐腑', + // }) + // } else if (this.properties.applyState == 'Reject') { + // Message.error({ + // context: this, + // offset: ['20rpx', '32rpx'], + // duration: 5000, + // content: '璧勬簮涓嬭浇鐢宠鏈�氳繃' + // }) + + // } else { + // // Message.error({ + // // context: this, + // // offset: ['20rpx', '32rpx'], + // // duration: 5000, + // // content: '璇峰厛鐢宠涓嬭浇' + // // }) + // console.log('璇峰厛鐢宠涓嬭浇'); + // } + // // } else { + // // ElMessageBox.confirm('璇峰厛杩涜鏁欏笀璁よ瘉锛�', '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', { + // // confirmButtonText: '鍘昏璇�', + // // cancelButtonText: '鍙栨秷', + // // type: 'warning' + // // }) + // // .then(() => { + // // isShow.value = true + // // }) + // // .catch(() => { }) + // // } + // // } else { + // // logIn() + // // } + }, + downloadFile(url) { + wx.downloadFile({ + url: url, + success: function (res) { + // 涓嬭浇鎴愬姛鍚庯紝璋冪敤saveImageToPhotosAlbum鍑芥暟淇濆瓨鍥剧墖鍒版湰鍦� + wx.saveFile({ + tempFilePath: res.tempFilePath, + success: function (res) { + wx.showToast({ + title: '涓嬭浇鎴愬姛', + icon: 'success' + }) + }, + fail: function (res) { + wx.showToast({ + title: '涓嬭浇澶辫触', + icon: 'none' + }) + } + }) + }, + fail: function (res) { + wx.showToast({ + title: '涓嬭浇澶辫触', + icon: 'none' + }) + } + }) + }, + // 鍒ゆ柇璧勬簮鏄惁璐拱 + resourceIsBuy(data) { + if (data.saleMethod && data.saleMethod.length) { + const isSHow = this.data.buyIdList.some((item) => item == data.saleMethod[0].Id) + return !isSHow + } else { + return false + } + }, + // 鑾峰彇宸茶喘涔板晢鍝� + getShoppingCartProductGet() { + let query = { + start: 0, + size: 999, + filterList: [], + searchList: [] + } + app.MG.store.getShoppingCartProductList(query).then((res) => { + const list = [] + res.datas.forEach((item) => { + list.push(item.saleMethod.id) + }) + this.setData({ + shoppingList: res.datas, + shoppingCartGetId: list + }) + }) + }, + // 鍒ゆ柇璧勬簮鍔犲叆璐墿杞︽寜閽槸鍚︽樉绀� + isShoppingCart(data) { + if (data.saleMethod && data.saleMethod.length) { + if (data.saleMethod[0].Price <= 0) return false + // 鍐嶅垽鏂槸鍚﹁喘涔� + const isBuy = this.data.buyIdList.some((item) => item == data.saleMethod[0].Id) + if (isBuy) { + // 璐拱浜� + return false + } else { + // 鍒ゆ柇鏄惁鍔犲叆璐墿杞� + const isSHow = this.data.shoppingCartGetId.some((item) => item == data.saleMethod[0].Id) + return !isSHow + } + } else { + return false + } + }, + // 閬嶅巻鏍戠粨鏋勮浆鎹负鏁扮粍鏂规硶 + handleTreeData(array) { + const flattenedArray = [] + array.forEach((node) => { + // 灏嗗綋鍓嶈妭鐐规坊鍔犲埌灞曞紑鐨勬暟缁勪腑 + flattenedArray.push(node) + // 閫掑綊澶勭悊瀛愯妭鐐� + if (node.children && node.children.length > 0) { + const childrenArray = this.handleTreeData(node.children) + flattenedArray.push(...childrenArray) + } + }) + return flattenedArray.filter((item) => item.sysType == 'CmsItem') + }, + // 浜戝涔犱竴閿鍙� + async getFreeResource() { + const child = this.selectComponent('#learn-resource') + const token = wx.getStorageSync('jsek-token') + if (!token) { + return wx.getUserProfile({ + desc: '鐢ㄦ埛鐧诲綍', + success: (res) => { + console.log(res); + } + }) + } + let arr = this.handleTreeData(this.data.learn).filter((item) => this.resourceIsBuy(item)) + let freeIds = arr.filter((item) => { + return item.saleMethod[0].Price == 0 + }) + if (!freeIds.length) return wx.showToast({ + icon: "error", + title: '鏆傛棤鍏嶈垂璧勬簮', + }) + child.changeReceive(true) + let requests = [] + freeIds.forEach((item, index) => { + if (this.resourceIsBuy(item)) { + requests.push({ + saleMethodId: item.saleMethod[0].Id, + count: 1 + }) + } + }) + + let query = { + remarks: '浜戝涔�', + requests, + } + try { + const initOrderRes = await app.MG.store.initOrder(query) + let parameter = { + orderNum: initOrderRes.orderNumber + } + // 纭璁㈠崟 + const confirmOrderRes = await app.MG.store.confirmOrder(parameter) + if (confirmOrderRes.orderNumber) { + child.changeReceive(false) + wx.showToast({ + title: '棰嗗彇鎴愬姛', + }) + this.getBookInfo(this.data.bookId) + } + } catch (error) { + console.log(error) + } + }, + // 浜戝涔犱竴閿喘涔� + async allAddShoppiingCar() { + const child = this.selectComponent('#learn-resource') + const token = wx.getStorageSync('jsek-token') + if (!token) { + return wx.getUserProfile({ + desc: '鐢ㄦ埛鐧诲綍', + success: (res) => { + console.log(res); + } + }) + } + let shopList = this.handleTreeData(this.data.learn).filter((item) => this.resourceIsBuy(item)) + this.getShoppingCartProductGet() + if (!shopList.length) return wx.showToast({ + icon: "error", + title: '宸插叏閮ㄨ喘涔�', + }) + child.changeBuy(true) + let requests = [] + shopList.forEach((item) => { + requests.push({ + saleMethodId: item.saleMethod[0].Id, + count: 1, + }) + }) + let query = { + remarks: '浜戝涔�', + requests, + } + const initOrderRes = await app.MG.store.initOrder(query) + child.changeBuy(false) + // 妫�鏌ヨ鍗曞彿鏄惁瀛樺湪 + if (initOrderRes.orderNumber) { + // bookService: orderNumber.value, 灏戜紶杩欎釜 锛屾殏鏃朵笉鐭ラ亾鏈変粈涔堢敤 + wx.navigateTo({ + url: `/pages/cart/paymentPage/index?&bookId=${this.data.bookDetail.id}&bookName=${this.data.bookDetail.name}&orderNumber=${initOrderRes.orderNumber}`, + }) + } else { + // 璁㈠崟鍙蜂笉瀛樺湪锛屾樉绀鸿鍛婃秷鎭� + wx.showToast({ + icon: "error", + title: '璇烽噸璇�', + }) + } + }, + // 鍙樹负鎵�鏈塩heck true + findAndUpdateItemsByIds(tree, ids) { + function findAndUpdate(node) { + if (ids.includes(node.id)) { + node.checked = true; // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true + } + if (node.children && node.children.length > 0) { + for (let child of node.children) { + findAndUpdate(child); // 閫掑綊澶勭悊瀛愯妭鐐� + } + } + } + + for (let node of tree) { + findAndUpdate(node); // 瀵规瘡涓《灞傝妭鐐规墽琛屾煡鎵惧拰鏇存柊鎿嶄綔 + } + return tree; // 杩斿洖淇敼鍚庣殑瀹屾暣鏁扮粍 + }, + handleTrue() { + // findAndUpdateItemsByIds(this.date.) + }, + // 缁勫嵎鏍煎紡鍖栨棩鏈熸樉绀� + DateFormat(date, fmt) { + if (date && fmt) { + let _date = new Date(date) + var o = { + 'M+': _date.getMonth() + 1, //鏈堜唤 + 'd+': _date.getDate(), //鏃� + 'h+': _date.getHours(), //灏忔椂 + 'm+': _date.getMinutes(), //鍒� + 's+': _date.getSeconds(), //绉� + 'q+': Math.floor((_date.getMonth() + 3) / 3), //瀛e害 + S: _date.getMilliseconds() //姣 + } + if (/(y+)/.test(fmt)) { + fmt = fmt.replace(RegExp.$1, (_date.getFullYear() + '').substr(4 - RegExp.$1.length)) + } + for (var k in o) { + if (new RegExp('(' + k + ')').test(fmt)) { + fmt = fmt.replace( + RegExp.$1, + RegExp.$1.length == 1 + ? (o)[k] + : ('00' + (o)[k]).substr(('' + (o)[k]).length) + ) + } + } + return fmt + } else { + return '' + } + }, + // 鑾峰彇缁勫嵎绛旈鏁版嵁 + getMockData() { + this.setData({ + 'mockData.useCount': 0, + 'mockData.mockList': [] + }) + app.MG.identity + .getUserKey({ + domain: 'mockData', + keys: [this.data.bookId] + }) + .then((res) => { + console.log(JSON.parse(res[0].value)); + if (res && res.length) { + const mock = JSON.parse(res[0].value) + mock.forEach(item => { + item.createDate = this.DateFormat(item.createDate, 'yyyy-MM-dd') + }) + this.setData({ + 'mockData.mockList': mock + }) + // 缁勫嵎宸蹭娇鐢ㄦ鏁� + res.forEach((item) => { + // 宸茬粡鏈夌瓟棰樺垎鏁扮瓑鏁版嵁锛岃瘉鏄庣粍鍗峰凡缁忎娇鐢ㄥ畬姣� + if (item.resultData) { + this.setData({ + 'mockData.useCount': this.data.mockData.useCount + 1 + }) + } + }) + } + }) + } + +}) diff --git a/packageBookService/pages/bookServices/detail/index.json b/packageBookService/pages/bookServices/detail/index.json new file mode 100644 index 0000000..823f4ac --- /dev/null +++ b/packageBookService/pages/bookServices/detail/index.json @@ -0,0 +1,23 @@ +{ + "component": true, + "usingComponents": { + "t-icon": "tdesign-miniprogram/icon/icon", + "t-image": "tdesign-miniprogram/image/image", + "t-tabs": "tdesign-miniprogram/tabs/tabs", + "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", + "t-button": "tdesign-miniprogram/button/button", + "t-message": "tdesign-miniprogram/message/message", + "book-brief": "/packageBookService/pages/bookServices/detail/components/brief/index", + "teach-resource": "/packageBookService/pages/bookServices/detail/components/teachResource/index", + "learn-resource": "/packageBookService/pages/bookServices/detail/components/learnResource/learnResource", + "test-resource": "/packageBookService/pages/bookServices/detail/components/testResource/testResource", + "note": "/packageBookService/pages/bookServices/detail/components/note/note", + "tree": "/packageBookService/pages/bookServices/detail/components/tree/index", + "suggest": "/packageBookService/pages/bookServices/detail/components/suggest/suggest", + "t-loading": "tdesign-miniprogram/loading/loading", + "t-dialog": "tdesign-miniprogram/dialog/dialog", + "t-toast": "tdesign-miniprogram/toast/toast" + }, + "navigationStyle": "custom", + "onReachBottomDistance": 200 +} \ No newline at end of file diff --git a/pages/bookServices/detail/index.wxml b/packageBookService/pages/bookServices/detail/index.wxml similarity index 100% rename from pages/bookServices/detail/index.wxml rename to packageBookService/pages/bookServices/detail/index.wxml diff --git a/pages/bookServices/detail/index.wxss b/packageBookService/pages/bookServices/detail/index.wxss similarity index 100% rename from pages/bookServices/detail/index.wxss rename to packageBookService/pages/bookServices/detail/index.wxss diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js new file mode 100644 index 0000000..a880c26 --- /dev/null +++ b/packageBookService/pages/bookServices/examination/examination.js @@ -0,0 +1,1123 @@ +import { getPublicImage } from '../../../../assets/js/middleGround/tool' +const app = getApp() +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + barHeight: "", + navBarHeight: "", + loading: false, + answerTitle: "", // 瀵艰埅鏍忔爣棰� + countdownInterval: null, // 璁℃椂鍣� + isCountdownRunning: true, // 鏄惁鍊掕鏃� + countdownTime: 0, // 鍊掕鏃舵椂闂� + bookId: "", + productLinkPath: "", + rootCmsItemId: "", + idPathList: [], // 棰樼洰鍒楄〃 + answerType: "", // 绛旈妯″紡 + submitStatus: false, // 鎻愪氦鐘舵�� + currentIndex: 0, // 褰撳墠鏄剧ず鐨勯鍙� + collectList: [], // 鏀惰棌棰樼洰鍒楄〃 + errorList: [], // 閿欓鍒楄〃 + subjectiveTotal: 0, // 瀹㈣棰樻�绘暟 + subjectiveNum: 0, // 瀹㈣棰樺緱鍒� + subjectiveGrade: 0, // 瀹㈣棰樻�诲垎 + correctNum: 0, // 姝g‘棰樼洰鏁伴噺 + total: 0, // 棰樼洰鎬绘暟 + cardList: [], // 鎻愪氦椤�, + questionDataList: [], // 鏄剧ず棰樼洰鍒楄〃 + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + const systInfo = wx.getSystemInfoSync(); + const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 + const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� + this.setData({ + barHeight: systInfo.statusBarHeight, + navBarHeight: navBarHeight, + answerTitle: options.answerTitle, + bookId: options.bookId, + productLinkPath: options.productLinkPath ? options.productLinkPath : '', + rootCmsItemId: options.rootCmsItemId, + idPathList: options.idPathList ? JSON.parse(options.idPathList) : [], + answerType: options.answerType + }); + this.init() + console.log('浼犲弬', options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + if (this.data.countdownInterval !== null) { + clearInterval(this.data.countdownInterval) + } + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + }, + // 杩斿洖 + goBack() { + wx.navigateBack(); + }, + + // 鑾峰彇淇濆瓨鐨勫�掕鏃舵椂闂� + getSavedTime() { + const savedTime = wx.getStorageSync('countdownTime') + return savedTime ? parseInt(savedTime) : null + }, + // 淇濆瓨鍊掕鏃舵椂闂村埌鏈湴瀛樺偍 + saveTime() { + wx.setStorageSync('countdownTime', this.data.countdownTime.toString()) + }, + clearTime() { + this.setData({ + countdownTime: 2 * 60 * 60 * 1000 + }) + }, + // 鏆傚仠鎴栫户缁�掕鏃� + toggleCountdown() { + if (this.data.countdownInterval) { + clearInterval(this.data.countdownInterval) + this.setData({ + countdownInterval: null, + isCountdownRunning: false + }) + } else { + this.startCountdown() + this.setData({ + isCountdownRunning: true + }) + } + }, + // 寮�濮嬪�掕鏃� + startCountdown() { + // 濡傛灉璁℃椂鍣ㄥ凡缁忓瓨鍦紝鍏堟竻闄や箣鍓嶇殑璁℃椂鍣� + if (this.data.countdownInterval) { + clearInterval(this.data.countdownInterval) + this.setData({ + countdownInterval: null + }) + } + this.setData({ + countdownInterval: setInterval(() => { + this.setData({ + countdownTime: this.data.countdownTime - 1000 + }) + if (this.data.countdownTime <= 0) { + clearInterval(this.data.countdownInterval) + this.setData({ + countdownTime: 0, + isCountdownRunning: false + }) + } + this.saveTime() + }, 1000) + }) + }, + // 鍒囨崲棰樼洰 + changeSwiper(e) { + this.setData({ + currentIndex: e.detail.index + }) + let index = e.detail.index - 1 >= 0 ? e.detail.index - 1 : 0 + let flag = this.isHaveAnswer(this.data.questionDataList[index].userAnswer) + if (flag) this.handleQuestion(e.detail.index) + + }, + // 鐐瑰嚮绛旈鍗¤烦杞鐩� + goQuestion(e) { + console.log(e); + const id = e.detail.id + this.data.questionDataList.forEach((item, index) => { + if (item.id == id) { + this.setData({ + currentIndex: index + }) + } + }) + }, + // 鍗曢�� 澶氶�� 瑙﹀彂 + onChangeRadio(e) { + const radioData = e.detail.value.currentTarget.dataset.value + const id = e.detail.value.currentTarget.dataset.id + const radioChecked = e.detail.value.detail.value + const questionList = this.data.questionDataList + questionList.forEach(item => { + if (item.id == id) { + item.userAnswer = radioChecked + } + }) + this.setData({ + questionDataList: questionList + }) + console.log(this.data.questionDataList); + }, + // 杈撳叆妗嗚Е鍙� + onChangeInput(e) { + const inputData = e.detail.value.detail.value + const id = e.detail.value.currentTarget.dataset.id + const index = e.detail.value.currentTarget.dataset.index + const questionList = this.data.questionDataList + questionList.forEach(item => { + if (item.id == id) { + item.userAnswer[index] = inputData + } + }) + this.setData({ + questionDataList: questionList + }) + console.log(this.data.questionDataList); + }, + // 鏁扮粍杞负瀛楃涓叉柟娉� + arrayToString(data) { + // 妫�鏌ユ槸鍚︿负鏁扮粍 + if (Array.isArray(data)) { + // 浣跨敤 join 鏂规硶灏嗘暟缁勮浆鎹负瀛楃涓诧紝榛樿浣跨敤閫楀彿鍒嗛殧 + return data.join(',').replace(/<[^>]*>/g, '') + } else { + // 濡傛灉涓嶆槸鏁扮粍锛岀洿鎺ヨ繑鍥炲師濮嬪�� + return data.replace(/<[^>]*>/g, '') + } + }, + // 鍒ゆ柇鏄惁鏈夌敤鎴风瓟妗� + isHaveAnswer(data) { + if (typeof data == 'string') { + data = data + .replace(/<[^>]*>/g, '') + .replace(/ /g, '') + .trim() + if (data.length) { + return true + } else { + return false + } + } else { + const answer = data.find((item) => item.length > 0) + if (answer) { + return true + } else { + return false + } + } + }, + // 鎻愪氦閫昏緫 + submitPaper() { + this.setData({ + submitStatus: true + }) + if (this.data.answerType == 'option') { + this.toggleCountdown() + const child = this.selectComponent('#question-options') + if (this.data.answerType == 'option' || this.data.answerType == 'errorQuestion') { + // 鍏堥亶鍘嗘墍鏈夐鐩紝灏嗘湭鎵规敼鐨勯鐩壒鏀� + const qustionList = this.data.questionDataList + for (let index = 0; index < qustionList.length; index++) { + const item = qustionList[index]; + if (!item.isComplete) this.handleQuestion(index + 1) + } + } + if (this.data.answerType == 'option') { + this.recordAnswerData() + child.openTestReportDialog() + } + } else if (this.data.answerType == 'collectQuestion' || this.data.answerType == 'errorQuestion') { + this.goBack() + } + + }, + // 鍒濆鍖栧嚱鏁� + async init() { + this.setData({ + loading: true, + subjectiveTotal: 0, + subjectiveNum: 0, + subjectiveGrade: 0 + }) + if (this.data.answerType == 'option') { + if (this.data) + this.startCountdown() + this.setData({ + countdownTime: 2 * 60 * 60 * 1000 + }) + // 娴嬭瘯绛旈 + await this.getCollectIdList() // 鑾峰彇鏀惰棌id鍒楄〃 + await this.getErrorList() // 鑾峰彇閿欓id鍒楄〃 + } else if (this.data.answerType == 'collectQuestion') { + // 鎴戠殑鏀惰棌 + await this.getcollectId() // 鑾峰彇鏀惰棌棰樼洰 + } else if (this.data.answerType == 'errorQuestion') { + // 鎴戠殑閿欓 + // loadings.value = true + await this.getErrorIdList() + await this.getCollectIdList() // 鑾峰彇鏀惰棌id鍒楄〃 + } + }, + async restart() { + const countDownRef = this.selectComponent('#countDownRef') + this.setData({ + loading: true, + total: 0, + subjectiveGrade: 0, + subjectiveTotal: 0, + subjectiveNum: 0, + currentIndex: 0, + submitStatus: false + }) + if (this.data.answerType == 'option') { + this.setData({ + countdownTime: 2 * 60 * 60 * 1000 + }) + this.delAnswerInfo(() => { + this.getQuestionList() + this.clearTime() + }) + if (!this.data.submitStatus) { + this.startCountdown() + } + } else if (this.data.answerType == 'mock') { + // 缁勫嵎妯″紡 + // 娓呯┖绛旈璁板綍 + await app.MG.identity.setUserKey({ + setKeyRequests: [ + { + domain: 'mockAnswerData', + key: route.query.uuid, + value: JSON.stringify({ + time: countDownRef.value.countdownTime, + answerData: [] + }) + } + ] + }) + this.init() + } else { + this.init() + this.clearTime() + if (submitStatus.value) { + this.startCountdown() + } + } + }, + // 鑾峰彇鏀惰棌棰樼洰鍒楄〃id + getCollectIdList() { + app.MG.identity + .getUserKey({ + domain: 'collectData', + keys: [this.data.rootCmsItemId] + }) + .then((res) => { + try { + this.setData({ + collectList: JSON.parse(res[0].value) + }) + } catch (error) { + } + if (this.data.answerType == 'option') { + // 鍏堣幏鍙栫敤鎴风瓟棰樿褰� + this.getAnswerInfo(async (res) => { + if (res.length) { + // 鏈夎褰曪紝涓嶈兘绛旈锛岀姸鎬佽涓哄凡鎻愪氦 + this.setData({ + submitStatus: true + }) + let value = JSON.parse(res[0].value) + // 鏈夌瓟棰樿褰曪紝寰楀垎璧嬪�� + if (value) { + this.setData({ + submitStatus: true + }) + value.dataList.forEach((item) => { + if (item.name == '瀹㈣棰樺緱鍒�' && item.path == this.data.productLinkPath) + this.setData({ + subjectiveNum: item.score + }) + }) + } + this.setData({ + currentIndex: value.currentIndex + }) + // 鎼哄甫绛旈璁板綍 鑾峰彇棰樼洰 + await this.getQuestionList(value.dataList) + } else { + await this.getQuestionList() // 鑾峰彇棰樺簱棰樼洰 + } + }) + } + }) + }, + // 鑾峰彇閿欓id鍒楄〃 + getErrorList() { + app.MG.identity + .getUserKey({ + domain: 'errorData', + keys: [this.data.rootCmsItemId] + }) + .then((res) => { + try { + this.setData({ + errorList: JSON.parse(res[0].value) + }) + } catch (error) { + + } + }) + }, + // 鑾峰彇棰樺簱棰樼洰 + getQuestionList(oldData) { + // 娓呯┖姝g‘棰樻暟璁板綍 + this.setData({ + cardList: [], + correctNum: 0, + }) + let flag = 0 + this.data.idPathList.forEach((pathitem) => { + const pathList = this.data.cardList + pathList.push({ + path: pathitem.productLinkPath, + catalogName: pathitem.name, + infoList: [] + }) + this.setData({ + cardList: pathList + }) + // 鑾峰彇棰樼洰 + let query = { + path: '*', + queryType: '*', + productId: this.data.bookId, + cmsPath: pathitem.productLinkPath, + itemFields: { + // SysType: 'CmsFolder', + Embedded_QuestionBank_Stem: [], + Embedded_QuestionBank_AnalysisCon: [], + Embedded_QuestionBank_Answer: [], + Embedded_QuestionBank_Option: [], + Embedded_QuestionBank_QuestionType: [], + Embedded_QuestionBank_StemStyle: [], + Embedded_QuestionBank_OptionStyle: [], + Embedded_QuestionBank_KnowledgePoint: [], + Embedded_QuestionBank_Difficulty: [] + }, + pading: { + start: 0, + size: 999 + } + } + app.MG.store.getProductDetail(query).then((res) => { + this.setData({ + total: res.datas.cmsDatas[0].datas.length + }) + // total.value += res.datas.cmsDatas[0].datas.length + let oldList + if (oldData) { + // 鎻愪氦杩囷紝瀛樺湪绛旈璁板綍 + oldList = oldData.find((item) => item.path == pathitem.productLinkPath).infoList + this.setData({ + submitStatus: true + }) + } + res.datas.cmsDatas[0].datas.forEach((item, index) => { + let oldObj = '' + if (oldList) oldObj = oldList.find((oldItem) => oldItem.id == item.id) + let questionObj = { + // num: index, // 棰樺彿 + id: item.id, + type: pathitem.name, + stem: + item.Embedded_QuestionBank_QuestionType == 'completion' + ? JSON.parse(item.Embedded_QuestionBank_Stem) + .stemTxt.replaceAll('<vacancy>', ',input,') + .split(',') + : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共 + answer: item.Embedded_QuestionBank_Answer, // 绛旀 + option: item.Embedded_QuestionBank_Option + ? JSON.parse(item.Embedded_QuestionBank_Option) + : '', // 閫夋嫨棰橀�夐」 + analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 瑙f瀽 + questionType: item.Embedded_QuestionBank_QuestionType, // 棰樺瀷 + optionStyle: item.Embedded_QuestionBank_OptionStyle, // 閫夐」鏄剧ず绫诲瀷 + stemStyle: item.Embedded_QuestionBank_StemStyle, // 棰樺共鏄剧ず绫诲瀷 + difficulty: item.Embedded_QuestionBank_Difficulty + ? 4 - item.Embedded_QuestionBank_Difficulty + : 0, // 闅惧害绛夌骇 + userAnswer: oldObj + ? oldObj.userAnswer + : item.Embedded_QuestionBank_QuestionType == 'completion' || + item.Embedded_QuestionBank_QuestionType == 'multipleChoice' + ? [] + : '', + isRight: oldObj ? oldObj.isRight : null, + isComplete: oldObj ? oldObj.isComplete : false, + isCollect: this.data.collectList.indexOf(item.id) > -1 ? true : false, + isUnfold: '' // 鎺у埗瑙f瀽鐨勬姌鍙犻潰鏉挎槸鍚﹀睍寮� + } + // 澶氶�夊拰濉┖绛旀鑲负鏁扮粍锛岃杞崲JSON鏍煎紡 + if ( + questionObj.questionType == 'completion' || + questionObj.questionType == 'multipleChoice' + ) { + try { + questionObj.answer = JSON.parse(questionObj.answer) + } catch (error) { + questionObj.answer = item.Embedded_QuestionBank_Answer + } + } + // questionObj.userAnswer = this.arrayToString(questionObj.userAnswer) + // questionObj.isHaveAnswer = this.isHaveAnswer(questionObj.userAnswer) + // 濉┖棰樻敼閫� + if (questionObj.questionType == 'completion') { + let index = 0 + for (let i = 0; i < questionObj.stem.length; i++) { + const item = questionObj.stem[i] + if (item == 'input') { + questionObj.stem[i] = { + num: index, + data: 'input' + } + if (!oldObj) questionObj.userAnswer[index] = '' + index++ + } + } + } + // 鑾峰彇鍥剧墖 + if (questionObj.stemStyle == 'Image' || questionObj.stemStyle == 'TxtAndImage') { + questionObj.stem.stemImage = getPublicImage(questionObj.stem.stemImage, 150) + } + if (questionObj.optionStyle == 'Image' || questionObj.optionStyle == 'TxtAndImage') { + questionObj.option.forEach(optionItem => { + if (optionItem.img) optionItem.img = getPublicImage(optionItem.img, 150) + }) + } + // if (questionObj.optionStyle == 'RichText') { + // questionObj.option.forEach(optionItem => { + // optionItem.txt.replace(/<img>/g, "<img class='imgClass'>") + // }) + // } + // 鏃ф暟鎹噷 棰樼洰宸茬粡浣滅瓟锛屼慨鏀瑰凡绛旈鐩暟閲� + // if (oldObj && oldObj.userAnswer.length > 0) countDownRef.value.changeAlready() + // 鏃ф暟鎹噷 棰樼洰姝g‘ 璁板綍姝g‘鏁伴噺 + if (questionObj.isRight) { + this.setData({ + correctNum: this.data.correctNum + 1 + }) + } + if (pathitem.name == '鍒ゆ柇棰�' || pathitem.name == '濉┖棰�' || pathitem.name == '澶氶�夐' || pathitem.name == '鍗曢�夐' || pathitem.name == '鍚姏棰�') { + if (oldObj) { + this.setData({ + subjectiveTotal: this.data.subjectiveTotal + 1 + }) + } + + } + // cardList璧嬪�� + let cardIndex = this.data.cardList.findIndex((item) => item.path == pathitem.productLinkPath) + let infoList = this.data.cardList[cardIndex].infoList + infoList.push(questionObj) + this.setData({ + [`cardList[${cardIndex}].infoList`]: infoList + }) + // this.data.cardList[this.data.cardList.findIndex((item) => item.path == pathitem.productLinkPath)] + // .infoList + // infoList.push(questionObj) + flag++; + let questionList = [] + const cardUpdatedList = this.data.cardList + // if (flag == this.data.idPathList.length) { + cardUpdatedList.forEach(aitem => { + aitem.infoList.forEach((bitem, bindex) => { + questionList.push(bitem) + bitem.number = bindex + 1 + bitem.grade = 2 + }) + }) + this.setData({ + questionDataList: questionList, + cardList: cardUpdatedList + }) + }) + }) + }) + this.setData({ + loading: false, + }) + }, + // 鎵规敼棰樼洰 锛堢粌涔狅紝鎴戠殑閿欓锛屾垜鐨勬敹钘忥級 + handleQuestion(num) { + const questionList = this.data.questionDataList + const index = num - 1 >= 0 ? num - 1 : 0 + if (questionList[index].isComplete) { + // 棰樼洰宸插畬鎴愶紝璺宠繃 + return true + } + questionList[index].isComplete = true + const item = questionList[index] + // 鎵规敼棰樼洰 + if (item.questionType == 'multipleChoice') { + // 澶氶�夐 + // subjectiveGrade.value += item.score + if (item.answer.length == item.userAnswer.length) { + const sortedArr1 = item.answer.slice().sort() + const sortedArr2 = item.userAnswer.slice().sort() + questionList[index].isRight = sortedArr1.every( + (value, valueIndex) => value === sortedArr2[valueIndex] + ) + } else { + questionList[index].isRight = false + } + } else if (item.questionType == 'singleChoice' || item.questionType == 'judge') { + // 鍗曢�� 鍒ゆ柇 + // subjectiveGrade.value += item.score + questionList[index].isRight = item.answer == item.userAnswer + } else if (item.questionType == 'shortAnswer') { + // 绠�绛� 缈昏瘧 + questionList[index].isRight = null + } else if (item.questionType == 'completion') { + // 濉┖ + // subjectiveGrade.value += item.score + if (typeof item.answer == 'string') { + questionList[index].isRight = item.answer == item.userAnswer[0] + } else { + if (item.answer.length != item.userAnswer.length) { + questionList[index].isRight = false + } else { + questionList[index].isRight = item.answer.every( + (value, valueIndex) => value === item.userAnswer[valueIndex] + ) + } + } + } + if (item.questionType != 'shortAnswer') { + this.setData({ + subjectiveTotal: this.data.subjectiveTotal + 1, + subjectiveGrade: this.data.subjectiveGrade + item.grade + }) + } + if (questionList[index].isRight && item.questionType != 'shortAnswer') { + // 瀹㈣棰樺洖绛旀纭� + this.setData({ + subjectiveNum: this.data.subjectiveNum + item.grade, + correctNum: this.data.correctNum + 1 + }) + } + if (!questionList[index].isRight && item.questionType != 'shortAnswer') { + // 瀹㈣棰樺洖绛旈敊璇� 璁板綍閿欓 + if (this.data.errorList.findIndex((errorItem) => errorItem == item.id) == -1) { + this.data.errorList.push(item.id) + } + } else { + if (this.data.answerType == 'errorQuestion' || this.data.answerType == 'option') { + // 浠庨敊棰橀泦涓Щ闄� + let errorIndex = this.data.errorList.findIndex((erroritem) => erroritem == item.id) + if (errorIndex > -1) { + this.data.errorList.splice(errorIndex, 1) + } + } + } + if (this.data.answerType != 'collectQuestion') { + // 璁板綍閿欓 + app.MG.identity + .setUserKey({ + setKeyRequests: [ + { + domain: 'errorData', + key: this.data.rootCmsItemId, + value: JSON.stringify(this.data.errorList) + } + ] + }) + .then((res) => { + console.log(res) + }) + } + this.setData({ + questionDataList: questionList + }) + const cardUpdatedList = this.data.cardList + cardUpdatedList.forEach((item) => { + item.infoList.forEach((citem) => { + if (citem.id == questionList[index].id) { + citem = questionList[index]; + } + }); + }); + this.setData({ + cardList: cardUpdatedList + }) + // console.log(this.data.questionDataList, this.data.cardList); + }, + // 棰樼洰鏀惰棌鎸夐挳,鏀惰棌鍜屽彇娑堝悓涓�鎺ュ彛锛屽彇娑堟暟缁勫噺鍘昏椤筰d + setCollect() { + const citem = this.data.questionDataList[this.data.currentIndex] + const questionList = this.data.questionDataList + for (let index = 0; index < questionList.length; index++) { + const item = questionList[index]; + if (item.id == citem.id) { + item.isCollect = !item.isCollect + } + } + this.setData({ + questionDataList: questionList + }) + if (this.data.collectList.length == 0) { + this.setData({ + collectList: [citem.id] + }) + } else { + const collectItme = this.data.collectList.filter((item) => item == citem.id) + if (collectItme.length) { + const arr = this.data.collectList.filter((item) => item != citem.id) + this.setData({ + collectList: arr + }) + } else { + const collectArr = this.data.collectList + collectArr.push(citem.id) + this.setData({ + collectList: collectArr + }) + } + } + app.MG.identity + .setUserKey({ + setKeyRequests: [ + { + domain: 'collectData', + key: this.data.rootCmsItemId, + value: JSON.stringify(this.data.collectList) + } + ] + }) + .then((res) => { }) + }, + // 澶勭悊绛旈鏁版嵁 + recordAnswerData() { + this.data.cardList.push( + { + name: '瀹㈣棰樺緱鍒�', + score: this.data.subjectiveNum, + path: this.data.productLinkPath, + // infoList: [], + // catalogName: '' + } + ) + let setInfoData = { + currentIndex: this.data.currentIndex, + dataList: JSON.parse(JSON.stringify(this.data.cardList)) + } + for (let i = 0; i < setInfoData.dataList.length; i++) { + const item = setInfoData.dataList[i] + if (!item.name && !item.name == '瀹㈣棰樺緱鍒�') { + for (let j = 0; j < item.infoList.length; j++) { + let obj = { + id: item.infoList[j].id, + userAnswer: item.infoList[j].userAnswer, + isComplete: item.infoList[j].isComplete, + isRight: item.infoList[j].isRight, + isCollect: item.infoList[j].isCollect + } + item.infoList[j] = obj + } + } + } + + this.setAnswerInfo(setInfoData) + }, + // 鎻愪氦绛旈鏁版嵁 + setAnswerInfo(data) { + app.MG.identity + .setUserKey({ + setKeyRequests: [ + { + domain: 'answerData', + key: this.data.productLinkPath, + value: JSON.stringify(data) + } + ] + }) + .then((res) => { }) + }, + // 鑾峰彇绛旈鏁版嵁 + getAnswerInfo(callback) { + app.MG.identity + .getUserKey({ + domain: 'answerData', + keys: [this.data.productLinkPath] + }) + .then((res) => { + if (callback) callback(res) + }) + }, + // 鍒犻櫎绛旈鏁版嵁 + delAnswerInfo(callback) { + app.MG.identity + .delUserKey({ + domain: 'answerData', + keys: [this.data.productLinkPath] + }) + .then((res) => { + if (callback) callback() + }) + }, + // 鎴戠殑鏀惰棌妯″紡涓嬭幏鍙栨敹钘忛鐩甶d + async getcollectId() { + app.MG.identity + .getUserKey({ + domain: 'collectData', + keys: [this.data.rootCmsItemId] + }) + .then(async (res) => { + try { + this.setData({ + collectList: JSON.parse(res[0].value) + }) + // total.value = collectList.value.length + } catch (error) { + } + if (this.data.collectList && this.data.collectList.length) { + await this.getCollectDataList() + } else { + this.setData({ + loading: false + }) + wx.showModal({ + title: '鎻愮ず', + content: '鏀惰棌澶规殏鏃犳暟鎹�',//editable濡傛灉涓簍rue锛岃繖灏辨槸杈撳叆妗嗙殑鍐呭 + editable: false,//鏄惁鏄剧ず杈撳叆妗� + showCancel: false, + success: (res) => { + if (res.confirm) { + this.setData({ + submitStatus: true + }) + this.goBack() + } + + } + }) + } + // console.log('鏀惰棌', collectList.value) + }) + }, + // 鑾峰彇鏀惰棌澶� + async getCollectDataList() { + let questionArr = [] + this.setData({ + cardList: [ + { + catalogName: '鏀惰棌澶�', + infoList: [] + } + ] + }) + let query = { + path: '*', + cmsPath: this.data.rootCmsItemId, + cmsType: '*', + productId: this.data.bookId, + queryType: '*', + itemIds: this.data.collectList.map((item) => item + ''), + itemFields: { + Embedded_QuestionBank_Stem: [], + Embedded_QuestionBank_AnalysisCon: [], + Embedded_QuestionBank_Answer: [], + Embedded_QuestionBank_Option: [], + Embedded_QuestionBank_QuestionType: [], + Embedded_QuestionBank_StemStyle: [], + Embedded_QuestionBank_OptionStyle: [], + Embedded_QuestionBank_KnowledgePoint: [], + Embedded_QuestionBank_Difficulty: [] + } + } + app.MG.store.getProductDetail(query).then((res) => { + let questionArr = [] + res.datas.cmsDatas[0].datas.forEach((item, index) => { + const questionObj = { + number: index + 1, // 棰樺彿 + id: item.id, + stem: + item.Embedded_QuestionBank_QuestionType == 'completion' + ? JSON.parse(item.Embedded_QuestionBank_Stem) + .stemTxt.replaceAll('<vacancy>', ',input,') + .split(',') + : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共 + answer: item.Embedded_QuestionBank_Answer, // 绛旀 + option: item.Embedded_QuestionBank_Option + ? JSON.parse(item.Embedded_QuestionBank_Option) + : '', // 閫夋嫨棰橀�夐」 + analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 瑙f瀽 + questionType: item.Embedded_QuestionBank_QuestionType, // 棰樺瀷 + optionStyle: item.Embedded_QuestionBank_OptionStyle, // 閫夐」鏄剧ず绫诲瀷 + stemStyle: item.Embedded_QuestionBank_StemStyle, // 棰樺共鏄剧ず绫诲瀷 + difficulty: item.Embedded_QuestionBank_Difficulty + ? 4 - item.Embedded_QuestionBank_Difficulty + : 0, // 闅惧害绛夌骇 + userAnswer: + item.Embedded_QuestionBank_QuestionType == 'completion' || + item.Embedded_QuestionBank_QuestionType == 'multipleChoice' + ? [] + : '', + isSubmit: false, // 鏌ョ湅瑙f瀽 + isRight: null, // 鏄惁姝g‘ + isComplete: false, + isCollect: true + } + // 澶氶�夊拰濉┖绛旀鑲负鏁扮粍锛岃杞崲JSON鏍煎紡 + if ( + questionObj.questionType == 'completion' || + questionObj.questionType == 'multipleChoice' + ) { + try { + questionObj.answer = JSON.parse(questionObj.answer) + } catch (error) { + // + } + } + // 濉┖棰樻敼閫� + if (questionObj.questionType == 'completion') { + let index = 0 + for (let i = 0; i < questionObj.stem.length; i++) { + const item = questionObj.stem[i] + if (item == 'input') { + questionObj.stem[i] = { + num: index, + data: 'input' + } + questionObj.userAnswer[index] = '' + index++ + } + } + } + // 鑾峰彇鍥剧墖 + if (questionObj.stemStyle == 'Image' || questionObj.stemStyle == 'TxtAndImage') { + questionObj.stem.stemImage = getPublicImage(questionObj.stem.stemImage, 150) + } + if (questionObj.optionStyle == 'Image' || questionObj.optionStyle == 'TxtAndImage') { + questionObj.option.forEach(optionItem => { + if (optionItem.img) optionItem.img = getPublicImage(optionItem.img, 150) + }) + } + // if (item.Embedded_QuestionBank_QuestionType == 'judge') { + // topicList.value.judge.data.push(questionObj) + // } else if (item.Embedded_QuestionBank_QuestionType == 'singleChoice') { + // topicList.value.radio.data.push(questionObj) + // } else if (item.Embedded_QuestionBank_QuestionType == 'multipleChoice') { + // topicList.value.check.data.push(questionObj) + // } else if (item.Embedded_QuestionBank_QuestionType == 'completion') { + // topicList.value.gap.data.push(questionObj) + // } else if (item.Embedded_QuestionBank_QuestionType == 'shortAnswer') { + // topicList.value.short.data.push(questionObj) + // } + questionArr.push(questionObj) + // cardList.value[0].infoList.push(questionObj) + }) + // loadings.value = false + this.setData({ + questionDataList: questionArr, + ['cardList[0].infoList']: questionArr, + loading: false, + }) + }) + }, + // 鎴戠殑閿欓妯″紡涓嬭幏鍙栭敊棰榠d鍒楄〃 + async getErrorIdList() { + await app.MG.identity + .getUserKey({ + domain: 'errorData', + keys: [this.data.rootCmsItemId] + }) + .then((res) => { + try { + this.setData({ + errorList: JSON.parse(res[0].value) + }) + } catch (error) { + } + if (this.data.errorList && this.data.errorList.length) { + this.getErrorDataList() + } else { + this.setData({ + loading: true + }) + wx.showModal({ + title: '鎻愮ず', + content: '閿欓闆嗘殏鏃犳暟鎹�',//editable濡傛灉涓簍rue锛岃繖灏辨槸杈撳叆妗嗙殑鍐呭 + editable: false,//鏄惁鏄剧ず杈撳叆妗� + showCancel: false, + success: (res) => { + if (res.confirm) { + this.setData({ + submitStatus: true + }) + this.goBack() + } + } + }) + } + }) + }, + // 鑾峰彇閿欓闆� + async getErrorDataList() { + this.setData({ + cardList: [ + { + catalogName: '閿欓闆�', + infoList: [] + } + ] + }) + let query = { + path: '*', + cmsPath: this.data.rootCmsItemId, + cmsType: '*', + productId: this.data.bookId, + queryType: '*', + itemIds: this.data.errorList.map((item) => item + ''), + itemFields: { + Embedded_QuestionBank_Stem: [], + Embedded_QuestionBank_AnalysisCon: [], + Embedded_QuestionBank_Answer: [], + Embedded_QuestionBank_Option: [], + Embedded_QuestionBank_QuestionType: [], + Embedded_QuestionBank_StemStyle: [], + Embedded_QuestionBank_OptionStyle: [], + Embedded_QuestionBank_KnowledgePoint: [], + Embedded_QuestionBank_Difficulty: [] + } + } + await app.MG.store.getProductDetail(query).then((res) => { + let questionArr = [] + res.datas.cmsDatas[0].datas.forEach((item, index) => { + const questionObj = { + number: index + 1, // 棰樺彿 + id: item.id, + stem: + item.Embedded_QuestionBank_QuestionType == 'completion' + ? JSON.parse(item.Embedded_QuestionBank_Stem) + .stemTxt.replaceAll('<vacancy>', ',input,') + .split(',') + : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共 + answer: item.Embedded_QuestionBank_Answer, // 绛旀 + option: item.Embedded_QuestionBank_Option + ? JSON.parse(item.Embedded_QuestionBank_Option) + : '', // 閫夋嫨棰橀�夐」 + analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 瑙f瀽 + questionType: item.Embedded_QuestionBank_QuestionType, // 棰樺瀷 + optionStyle: item.Embedded_QuestionBank_OptionStyle, // 閫夐」鏄剧ず绫诲瀷 + stemStyle: item.Embedded_QuestionBank_StemStyle, // 棰樺共鏄剧ず绫诲瀷 + difficulty: item.Embedded_QuestionBank_Difficulty + ? 4 - item.Embedded_QuestionBank_Difficulty + : 0, // 闅惧害绛夌骇 + userAnswer: + item.Embedded_QuestionBank_QuestionType == 'completion' || + item.Embedded_QuestionBank_QuestionType == 'multipleChoice' + ? [] + : '', + isSubmit: false, // 鏌ョ湅瑙f瀽 + isRight: null, // 鏄惁姝g‘ + isComplete: false, + isCollect: this.data.collectList.some((collectItem) => collectItem == item.id) + } + // 澶氶�夊拰濉┖绛旀鑲负鏁扮粍锛岃杞崲JSON鏍煎紡 + if ( + questionObj.questionType == 'completion' || + questionObj.questionType == 'multipleChoice' + ) { + try { + questionObj.answer = JSON.parse(questionObj.answer) + } catch (error) { + // + } + } + // 濉┖棰樻敼閫� + if (questionObj.questionType == 'completion') { + let index = 0 + for (let i = 0; i < questionObj.stem.length; i++) { + const item = questionObj.stem[i] + if (item == 'input') { + questionObj.stem[i] = { + num: index, + data: 'input' + } + questionObj.userAnswer[index] = '' + index++ + } + } + } + // 鑾峰彇鍥剧墖 + if (questionObj.stemStyle == 'Image' || questionObj.stemStyle == 'TxtAndImage') { + questionObj.stem.stemImage = getPublicImage(questionObj.stem.stemImage, 150) + } + if (questionObj.optionStyle == 'Image' || questionObj.optionStyle == 'TxtAndImage') { + questionObj.option.forEach(optionItem => { + if (optionItem.img) optionItem.img = getPublicImage(optionItem.img, 150) + }) + } + // if (item.Embedded_QuestionBank_QuestionType == 'judge') { + // topicList.value.judge.data.push(questionObj) + // } else if (item.Embedded_QuestionBank_QuestionType == 'singleChoice') { + // topicList.value.radio.data.push(questionObj) + // } else if (item.Embedded_QuestionBank_QuestionType == 'multipleChoice') { + // topicList.value.check.data.push(questionObj) + // } else if (item.Embedded_QuestionBank_QuestionType == 'completion') { + // topicList.value.gap.data.push(questionObj) + // } else if (item.Embedded_QuestionBank_QuestionType == 'shortAnswer') { + // topicList.value.short.data.push(questionObj) + // } + questionArr.push(questionObj) + }) + this.setData({ + questionDataList: questionArr, + ['cardList[0].infoList']: questionArr, + loading: false + }) + }) + // loadings.value = false + // console.log('閿欓闆�', topicList.value) + } +}) \ No newline at end of file diff --git a/packageBookService/pages/bookServices/examination/examination.json b/packageBookService/pages/bookServices/examination/examination.json new file mode 100644 index 0000000..d99d423 --- /dev/null +++ b/packageBookService/pages/bookServices/examination/examination.json @@ -0,0 +1,12 @@ +{ + "usingComponents": { + "question-options": "./questionOptions/index", + "question-schedule": "./questionSchedule/index", + "question-list": "./questionList/index", + "t-icon": "tdesign-miniprogram/icon/icon", + "t-image": "tdesign-miniprogram/image/image", + "t-button": "tdesign-miniprogram/button/button", + "t-loading": "tdesign-miniprogram/loading/loading" + }, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/bookServices/examination/examination.wxml b/packageBookService/pages/bookServices/examination/examination.wxml similarity index 100% rename from pages/bookServices/examination/examination.wxml rename to packageBookService/pages/bookServices/examination/examination.wxml diff --git a/pages/bookServices/examination/examination.wxss b/packageBookService/pages/bookServices/examination/examination.wxss similarity index 100% rename from pages/bookServices/examination/examination.wxss rename to packageBookService/pages/bookServices/examination/examination.wxss diff --git a/pages/bookServices/examination/questionList/index.js b/packageBookService/pages/bookServices/examination/questionList/index.js similarity index 100% rename from pages/bookServices/examination/questionList/index.js rename to packageBookService/pages/bookServices/examination/questionList/index.js diff --git a/pages/bookServices/examination/questionList/index.json b/packageBookService/pages/bookServices/examination/questionList/index.json similarity index 100% rename from pages/bookServices/examination/questionList/index.json rename to packageBookService/pages/bookServices/examination/questionList/index.json diff --git a/pages/bookServices/examination/questionList/index.wxml b/packageBookService/pages/bookServices/examination/questionList/index.wxml similarity index 100% rename from pages/bookServices/examination/questionList/index.wxml rename to packageBookService/pages/bookServices/examination/questionList/index.wxml diff --git a/pages/bookServices/examination/questionList/index.wxss b/packageBookService/pages/bookServices/examination/questionList/index.wxss similarity index 100% rename from pages/bookServices/examination/questionList/index.wxss rename to packageBookService/pages/bookServices/examination/questionList/index.wxss diff --git a/pages/bookServices/examination/questionOptions/index.js b/packageBookService/pages/bookServices/examination/questionOptions/index.js similarity index 100% rename from pages/bookServices/examination/questionOptions/index.js rename to packageBookService/pages/bookServices/examination/questionOptions/index.js diff --git a/pages/bookServices/examination/questionOptions/index.json b/packageBookService/pages/bookServices/examination/questionOptions/index.json similarity index 100% rename from pages/bookServices/examination/questionOptions/index.json rename to packageBookService/pages/bookServices/examination/questionOptions/index.json diff --git a/pages/bookServices/examination/questionOptions/index.wxml b/packageBookService/pages/bookServices/examination/questionOptions/index.wxml similarity index 100% rename from pages/bookServices/examination/questionOptions/index.wxml rename to packageBookService/pages/bookServices/examination/questionOptions/index.wxml diff --git a/pages/bookServices/examination/questionOptions/index.wxss b/packageBookService/pages/bookServices/examination/questionOptions/index.wxss similarity index 100% rename from pages/bookServices/examination/questionOptions/index.wxss rename to packageBookService/pages/bookServices/examination/questionOptions/index.wxss diff --git a/pages/bookServices/examination/questionSchedule/index.js b/packageBookService/pages/bookServices/examination/questionSchedule/index.js similarity index 100% rename from pages/bookServices/examination/questionSchedule/index.js rename to packageBookService/pages/bookServices/examination/questionSchedule/index.js diff --git a/pages/bookServices/examination/questionSchedule/index.json b/packageBookService/pages/bookServices/examination/questionSchedule/index.json similarity index 100% rename from pages/bookServices/examination/questionSchedule/index.json rename to packageBookService/pages/bookServices/examination/questionSchedule/index.json diff --git a/pages/bookServices/examination/questionSchedule/index.wxml b/packageBookService/pages/bookServices/examination/questionSchedule/index.wxml similarity index 100% rename from pages/bookServices/examination/questionSchedule/index.wxml rename to packageBookService/pages/bookServices/examination/questionSchedule/index.wxml diff --git a/pages/bookServices/examination/questionSchedule/index.wxss b/packageBookService/pages/bookServices/examination/questionSchedule/index.wxss similarity index 100% rename from pages/bookServices/examination/questionSchedule/index.wxss rename to packageBookService/pages/bookServices/examination/questionSchedule/index.wxss diff --git a/packageBookService/pages/bookServices/list/index.js b/packageBookService/pages/bookServices/list/index.js new file mode 100644 index 0000000..4fa9702 --- /dev/null +++ b/packageBookService/pages/bookServices/list/index.js @@ -0,0 +1,453 @@ +const app = getApp(); +Page({ + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + barHeight: '', + navBarHeight: '', + searchValue: '', + path: '', + pathList: [], + pageCount: { + page: 1, + total: 0, + }, + isMore: null, + assortCheck: { + name: '', + code: '', + }, + bookList: [], + stairList: { + value: '', + options: [ + { + value: '', + label: '涓�绾�', + }, + ], + }, + secondList: { + value: [], + options: [], + }, + majorProjectList: { + value: [], + options: [], + }, + newTextBook: { + value: [], + options: [], + }, + stairCode: '', // 涓�绾у垎绫婚�変腑椤� + secondCode: '', // 浜岀骇鍒嗙被閫変腑椤� + sort: '', // 鎺掑簭 + enable: false, + loadingProps: { + size: '50rpx', + }, + }, + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + const systInfo = wx.getSystemInfoSync(); + const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 + const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� + this.setData({ + barHeight: systInfo.statusBarHeight, + navBarHeight: navBarHeight, + }); + // 鎼滅储璧嬪�� + if (options.searchValue) { + this.setData({ + searchValue: options.searchValue, + }); + } + // 楂樼骇鍒嗙被璧嬪�� + this.setData({ + assortCheck: { + name: options.assorName, + code: options.assortCode, + }, + }); + if (this.data.assortCheck.code) { + this.setData({}); + } + // 鑾峰彇涓�绾у垎绫� + this.getStairList(options.assortCode); + // 涓�绾у垎绫诲拰path璧嬪�� + if (options.stairCode) { + this.setData({ + 'stairList.value': options.stairCode, + stairCode: options.stairCode, + path: `${options.assortCode}\\${options.stairCode}`, + }); + } + // 浜岀骇鍒嗙被璧嬪�� + if (options.secondCode) { + this.setData({ + secondCode: options.secondCode, + pathList: [{ + Path: options.secondCode, + Type: '*', + StoreRefCode: app.config.goodsStore, + } + ], + }) + } + // 鑾峰彇浜岀骇鍒嗙被 + this.getSecondList(`${options.assortCode}\\${options.stairCode}`); + this.getBookList(`${options.assortCode}\\${options.stairCode}`); + // 鑾峰彇閲嶇偣椤圭洰 + this.getProjectList('bookClassification'); + this.getProjectList('newFormsTextbooks'); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + console.log('涓嬫媺'); + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom(e) { + console.log('搴曢儴'); + const flag = this.data.bookList.length < this.data.pageCount.total + if (flag) { + this.setData({ + isMore: true, + "pageCount.page": this.data.pageCount.page + 1 + }) + this.getBookList(this.data.path) + } else { + this.setData({ + isMore: true, + }) + setTimeout(() => { + this.setData({ + isMore: false + }) + }, 100) + console.log('娌℃湁鏇村浜�'); + } + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { }, + goBack() { + wx.navigateBack(); + }, + // 鑾峰彇涓�绾у垪琛� + getStairList(path) { + const query = { + path, + filterList: [], + queryType: '\\', + searchList: [], + size: '30', + start: '0', + storeRefCode: app.config.goodsStore, + sort: { type: 'Asc', field: 'LinkOrder' }, + }; + app.MG.store.getStoreChannelList(query).then(async (res) => { + const options = [ + { + value: '', + label: '涓�绾�', + }, + ]; + for (let index = 0; index < res.datas.length; index++) { + const item = res.datas[index]; + options.push({ + value: item.refCode, + label: item.name, + }); + } + this.setData({ + 'stairList.options': options, + 'stairList.value': this.data.stairCode, + }); + }); + }, + // 鑾峰彇涓�绾у垎绫讳笅浜岀骇鍒嗙被 + getSecondList(path) { + const options = []; + const query = { + path, + filterList: [], + queryType: '\\', + searchList: [], + size: '30', + start: '0', + storeRefCode: app.config.goodsStore, + sort: { type: 'Asc', field: 'LinkOrder' }, + }; + app.MG.store.getStoreChannelList(query).then((res) => { + for (let index = 0; index < res.datas.length; index++) { + const item = res.datas[index]; + options.push({ + value: `${item.pathLinks[0].linkPath}\\${item.id}`, + label: item.name, + }); + } + this.setData({ + 'secondList.options': options, + }); + const second = [this.data.secondCode] + this.setData({ + 'secondList.value': second + }) + }); + }, + // 鑾峰彇閲嶇偣椤圭洰 + getProjectList(type) { + const options = []; + const arr = []; + let array = []; + const query = { + refCodes: [type], + }; + app.MG.store.getProductTypeField(query).then((res) => { + array = JSON.parse(res[0].config).option; + for (let index = 0; index < array.length; index++) { + const element = array[index]; + if (element.child) { + for (let index = 0; index < element.child.length; index++) { + const item = element.child[index]; + arr.push(item); + } + } + } + if (type == 'bookClassification') { + for (let index = 0; index < arr.length; index++) { + const element = arr[index]; + options.push({ + value: element.value, + label: element.name, + }); + } + this.setData({ + 'majorProjectList.options': options, + }); + } else if (type == 'newFormsTextbooks') { + for (let index = 0; index < arr.length; index++) { + const element = arr[index]; + options.push({ + value: element.value, + label: element.name, + }); + } + this.setData({ + 'newTextBook.options': options, + }); + console.log('閲嶇偣椤圭洰', this.data.newTextBook); + } + }); + }, + // 鑾峰彇鍥句功鍒楄〃 + getBookList(path) { + let sort; + let pathObj = {}; + if (this.data.pathList.length) { + pathObj = { + subAccess: this.data.pathList, + }; + } else { + pathObj = { + path, + queryType: '*', + }; + } + if (this.data.sort) { + sort = { + Name: this.data.sort, + BaseType: '', + }; + } else { + sort = { + type: 'Desc', + field: 'ViewCount', + }; + } + // 鎼滅储 + let searchObj = {}; + if (this.data.searchValue) { + searchObj = { + 'Name*': this.data.searchValue, + '||author*': this.data.searchValue, + '||isbn*': this.data.searchValue, + '||seriesName*': this.data.searchValue, + }; + } + const query = { + ...pathObj, + filterList: [ + { + value: 'Normal', + field: 'state', + }, + ], + sort, + coverSize: { + height: 145, + }, + paging: { + start: 0, + size: this.data.pageCount.page * 8, + }, + fields: { + author: [], + publicationDate: [], + ...searchObj, + 'bookClassification*': this.data.majorProjectList.value, + 'newFormsTextbooks*': this.data.newTextBook.value, + }, + }; + app.MG.store.getProductList(query).then((res) => { + this.setData({ + bookList: res.datas, + enable: false, + "pageCount.total": res.total + }); + console.log('鍥句功鍒楄〃', res, this.data.pageCount); + }); + }, + // 涓�绾у垎绫诲垏鎹� + onChangeStair(e) { + const path = e.detail.value.length + ? `${this.data.assortCheck.code}\\${e.detail.value}` + : this.data.assortCheck.code; + this.setData({ + pathList: [], + stairCode: e.detail.value, + secondCode: '', + path: path, + 'stairList.value': e.detail.value, + }); + this.getBookList(path); + this.getSecondList(path); + }, + // 浜岀骇鍒嗙被鍒囨崲 + onChangeSecond(e) { + const pathList = []; + for (let index = 0; index < e.detail.value.length; index++) { + const element = e.detail.value[index]; + pathList.push({ + Path: element, + Type: '*', + StoreRefCode: app.config.goodsStore, + }); + } + this.setData({ + pathList: pathList, + 'secondList.value': e.detail.value, + }); + + }, + // + onConfirmSecond() { + this.getBookList(this.data.path); + }, + // 閲嶇偣椤圭洰鏀瑰彉 + changeMajorProject(e) { + this.setData({ + 'majorProjectList.value': e.detail.value, + }); + this.getBookList(this.data.path); + }, + // 閲嶇偣椤圭洰閲嶇疆 + resetMajorProject() { + this.setData({ + 'majorProjectList.value': [], + }); + this.getBookList(this.data.path); + }, + changeNewText(e) { + this.setData({ + 'newTextBook.value': e.detail.value, + }); + this.getBookList(this.data.path); + }, + resetNewText() { + this.setData({ + 'newTextBook.value': [], + }); + this.getBookList(this.data.path); + }, + // 鎺掑簭鎸夐挳 + sortClick() { + if (!this.data.sort.length) { + this.setData({ + sort: 'Desc', + }); + } else if (this.data.sort == 'Desc') { + this.setData({ + sort: 'Asc', + }); + } else if (this.data.sort == 'Asc') { + this.setData({ + sort: '', + }); + } + let path; + if (this.data.secondCode) { + path = this.data.secondCode; + } else if (this.data.stairCode) { + path = `${this.data.assortCheck.code}\\${this.data.stairCode}`; + } else { + path = this.data.assortCheck.code; + } + this.setData({ + path: path, + }); + this.getBookList(path); + }, + // 鎼滅储鍥句功 + searchBook(e) { + console.log(e.detail.value); + this.setData({ + searchValue: e.detail.value, + }); + this.getBookList(this.data.path); + }, + // 璺宠浆鍥句功璇︽儏 + goDetail(e) { + const { book } = e.currentTarget.dataset; + wx.navigateTo({ + url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, + }); + }, + onRefresh() { + this.setData({ enable: true }); + this.getBookList(this.data.path) + }, +}); diff --git a/pages/bookServices/list/index.json b/packageBookService/pages/bookServices/list/index.json similarity index 100% rename from pages/bookServices/list/index.json rename to packageBookService/pages/bookServices/list/index.json diff --git a/pages/bookServices/list/index.wxml b/packageBookService/pages/bookServices/list/index.wxml similarity index 100% rename from pages/bookServices/list/index.wxml rename to packageBookService/pages/bookServices/list/index.wxml diff --git a/pages/bookServices/list/index.wxss b/packageBookService/pages/bookServices/list/index.wxss similarity index 100% rename from pages/bookServices/list/index.wxss rename to packageBookService/pages/bookServices/list/index.wxss diff --git a/pages/bookServices/webpage/index.js b/packageBookService/pages/bookServices/webpage/index.js similarity index 100% rename from pages/bookServices/webpage/index.js rename to packageBookService/pages/bookServices/webpage/index.js diff --git a/pages/bookServices/webpage/index.json b/packageBookService/pages/bookServices/webpage/index.json similarity index 100% rename from pages/bookServices/webpage/index.json rename to packageBookService/pages/bookServices/webpage/index.json diff --git a/pages/bookServices/webpage/index.wxml b/packageBookService/pages/bookServices/webpage/index.wxml similarity index 100% rename from pages/bookServices/webpage/index.wxml rename to packageBookService/pages/bookServices/webpage/index.wxml diff --git a/pages/bookServices/webpage/index.wxss b/packageBookService/pages/bookServices/webpage/index.wxss similarity index 100% rename from pages/bookServices/webpage/index.wxss rename to packageBookService/pages/bookServices/webpage/index.wxss diff --git a/pages/resourceDetails/document/index.js b/packageDomain/pages/resourceDetails/document/index.js similarity index 100% rename from pages/resourceDetails/document/index.js rename to packageDomain/pages/resourceDetails/document/index.js diff --git a/pages/resourceDetails/document/index.json b/packageDomain/pages/resourceDetails/document/index.json similarity index 100% rename from pages/resourceDetails/document/index.json rename to packageDomain/pages/resourceDetails/document/index.json diff --git a/pages/resourceDetails/document/index.wxml b/packageDomain/pages/resourceDetails/document/index.wxml similarity index 100% rename from pages/resourceDetails/document/index.wxml rename to packageDomain/pages/resourceDetails/document/index.wxml diff --git a/pages/resourceDetails/document/index.wxss b/packageDomain/pages/resourceDetails/document/index.wxss similarity index 100% rename from pages/resourceDetails/document/index.wxss rename to packageDomain/pages/resourceDetails/document/index.wxss diff --git a/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js similarity index 100% rename from pages/resourceDetails/myAudio/index.js rename to packageDomain/pages/resourceDetails/myAudio/index.js diff --git a/pages/resourceDetails/myAudio/index.json b/packageDomain/pages/resourceDetails/myAudio/index.json similarity index 100% rename from pages/resourceDetails/myAudio/index.json rename to packageDomain/pages/resourceDetails/myAudio/index.json diff --git a/pages/resourceDetails/myAudio/index.wxml b/packageDomain/pages/resourceDetails/myAudio/index.wxml similarity index 100% rename from pages/resourceDetails/myAudio/index.wxml rename to packageDomain/pages/resourceDetails/myAudio/index.wxml diff --git a/pages/resourceDetails/myAudio/index.wxss b/packageDomain/pages/resourceDetails/myAudio/index.wxss similarity index 100% rename from pages/resourceDetails/myAudio/index.wxss rename to packageDomain/pages/resourceDetails/myAudio/index.wxss diff --git a/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js similarity index 100% rename from pages/resourceDetails/myVideo/index.js rename to packageDomain/pages/resourceDetails/myVideo/index.js diff --git a/pages/resourceDetails/myVideo/index.json b/packageDomain/pages/resourceDetails/myVideo/index.json similarity index 100% rename from pages/resourceDetails/myVideo/index.json rename to packageDomain/pages/resourceDetails/myVideo/index.json diff --git a/pages/resourceDetails/myVideo/index.wxml b/packageDomain/pages/resourceDetails/myVideo/index.wxml similarity index 100% rename from pages/resourceDetails/myVideo/index.wxml rename to packageDomain/pages/resourceDetails/myVideo/index.wxml diff --git a/pages/resourceDetails/myVideo/index.wxss b/packageDomain/pages/resourceDetails/myVideo/index.wxss similarity index 100% rename from pages/resourceDetails/myVideo/index.wxss rename to packageDomain/pages/resourceDetails/myVideo/index.wxss diff --git a/packageDomain/pages/sampleBookList/applicationForm/index.js b/packageDomain/pages/sampleBookList/applicationForm/index.js new file mode 100644 index 0000000..8cd51e5 --- /dev/null +++ b/packageDomain/pages/sampleBookList/applicationForm/index.js @@ -0,0 +1,306 @@ +import { worksDataBytool } from "../../../../assets/js/toolClass.js"; +const app = getApp(); +Page({ + data: { + userInfo: null, + active: 0, + description: "", //鐢宠瑙勫垯 + teacherInfo: { + workInfo: null, + schoolName: "", + courseName: "", + }, + contactInfo: { + fullName: "", + phone: "", + detailedAddress: "" + }, + paperBookList: [], //鏍蜂功鍗曠焊璐ㄤ功 + electronicBookList: [], //鏍蜂功鍗曠數瀛愪功 + ebookCount: 0, + paperBookCount: 0, + bookList: [], + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad() { }, + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + if (wx.getStorageSync(app.config.userInfoKey)) { + this.setData({ + userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey)) + }) + if (this.data.userInfo.role == 'Teacher') { + this.setData({ + teacherInfo: { + schoolName: JSON.parse(this.data.userInfo.data).schoolName, + courseName: JSON.parse(this.data.userInfo.data).courseName, + }, + contactInfo: { + fullName: JSON.parse(this.data.userInfo.data).fullName, + phone: JSON.parse(this.data.userInfo.data).phone, + detailedAddress: JSON.parse(this.data.userInfo.data).detailedAddress + } + }) + } + if (wx.getStorageSync("paperBookList")) { + this.setData({ + paperBookList: JSON.parse(wx.getStorageSync("paperBookList")), + bookList: JSON.parse(wx.getStorageSync("paperBookList")) + }) + } + if (wx.getStorageSync("electronicBookList")) { + this.setData({ + electronicBookList: JSON.parse(wx.getStorageSync("electronicBookList")) + }) + } + this.getSelectBookCount(); + this.getSelectPaperBookCount(); + this.getPaperType(); + } else { + wx.navigateTo({ + url: "/pages/testLogin/index", + }); + } + + }, + + tabClick(item) { + let that = this; + if (item.detail.value == '1') { + that.setData({ + active: item.detail.value, + bookList: this.data.electronicBookList + }) + this.getElectronType(); + } else { + that.setData({ + active: item.detail.value, + bookList: this.data.paperBookList + }) + this.getPaperType(); + } + }, + + getElectronType() { + app.MG.resource.getCmsTypeByRefCode({ refCodes: ['jsek_electronicSampleBook'] }).then((res) => { + this.setData({ + description: res[0].description, + teacherInfo: { + workInfo: res[0].cmsTypeLinks[0].children + }, + }) + }) + }, + getPaperType() { + app.MG.resource.getCmsTypeByRefCode({ + refCodes: ['jsek_paperVersionSampleBook'] + }). + then((res) => { + if (res && res.length > 0) { + this.setData({ + description: res[0].description, + teacherInfo: { + workInfo: res[0].cmsTypeLinks[0].children + }, + }) + } + }) + }, + //鑾峰彇褰撳墠宸茬敵璇锋鏁帮紙鐢靛瓙锛� + getSelectBookCount() { + let that = this; + app.MG.app.getTicketResult({ + ticketRefCodeOrGuid: 'electronicSampleBookapplyNum', + roleId: that.data.userInfo.roleId + }) + .then((res) => { + let num = res.totalCount - res.usedCount; + that.setData({ + ebookCount: num + }) + }) + }, + //鑾峰彇褰撳墠宸茬敵璇锋鏁帮紙绾歌川锛� + getSelectPaperBookCount() { + let that = this; + app.MG.app.getTicketResult({ + ticketRefCodeOrGuid: 'paperSampleBookapplyNum', + roleId: that.data.userInfo.roleId + }) + .then((res) => { + let count = res.totalCount - res.usedCount; + that.setData({ + paperBookCount: count, + }) + }) + }, + + submit() { + let that = this; + if (that.data.bookList.length > 0) { + if (that.data.active == '1' && that.data.ebookCount == 0) { + wx.showToast({ + title: "鎮ㄧ殑鐢靛瓙鏍蜂功鐢宠娆℃暟宸茬敤灏斤紝鑻ヨ缁х画锛岃鑱旂郴绠$悊鍛橈紒", + icon: 'none', + duration: 1000, + }) + return + } + if (that.data.active == '0' && that.data.paperBookCount == 0) { + wx.showToast({ + title: "鎮ㄧ殑绾歌川鏍蜂功鐢宠娆℃暟宸茬敤灏斤紝鑻ヨ缁х画锛岃鑱旂郴绠$悊鍛橈紒", + icon: 'none', + duration: 1000, + }) + return + } + let data = {} + let applyInfo = {} + if (that.data.active == '1') { + data = { + topicIdOrRefCode: 'applyBook', + name: that.data.userInfo.name || '', + content: JSON.stringify(that.data.bookList), + state: 'WaitAudit', + type: 'applyForEbook', + cmsTypeRefCode: 'jsek_electronicSampleBook', + newDataListRequest: worksDataBytool(that.data.teacherInfo.workInfo, that.data.teacherInfo) + } + applyInfo = { + ticketRefCodeOrGuid: 'electronicSampleBookapplyNum', + roleId: userStore.userInfo.roleId, + refType: 'applyBook' + } + } else { + if (!(that.data.contactInfo.fullName && that.data.contactInfo.phone && that.data.contactInfo.detailedAddress)) { + wx.showToast({ + title: "璇峰皢鏀惰揣浜轰俊鎭~鍐欏畬鏁达紒", + icon: 'none', + duration: 1000, + }) + return + } + const mailAddress = JSON.stringify(that.data.contactInfo) + that.setData({ + teacherInfo: { + detailedAddress: mailAddress, + } + }) + data = { + topicIdOrRefCode: 'applyEntityBook', + name: that.data.userInfo.name || '', + content: JSON.stringify(that.data.bookList), + state: 'WaitAudit', + type: 'applyForPbook', + cmsTypeRefCode: 'jsek_paperVersionSampleBook', + newDataListRequest: worksDataBytool(that.data.teacherInfo.workInfo, that.data.teacherInfo) + } + applyInfo = { + ticketRefCodeOrGuid: 'paperSampleBookapplyNum', + roleId: that.data.userInfo.roleId, + refType: 'applyEntityBook' + } + } + app.MG.ugc.newTopicMessage(data).then((res) => { + if (res) { + app.MG.app.useTicket(applyInfo).then(() => { + if (that.data.active == '1') { + that.setData({ + electronicBookList: [], + bookList: [], + }) + wx.setStorageSync("electronicBookList", that.data.electronicBookList); + } else { + that.setData({ + paperBookList: [], + bookList: [], + }) + wx.setStorageSync("paperBookList", that.data.paperBookList); + } + + wx.showModal({ + title: '鎻愮ず锛�', //鎻愮ず鐨勬爣棰� + content: '鎮ㄧ殑鏍蜂功鐢宠宸叉彁浜わ紝绠$悊鍛樺鏍镐腑锛佺敵璇风姸鎬佸湪銆愪釜浜轰腑蹇冣�旀牱涔︾敵璇枫�戜腑鏌ヨ銆�', //鎻愮ず鐨勫唴瀹� + success: function (res) { + if (res.confirm) { + wx.navigateTo({ + url: "/packagePersonal/pages/sampleBooks/index", + }); + } else if (res.cancel) { + } + } + }) + }) + } + }) + } else { + wx.showToast({ + title: "鎮ㄨ繕鏈�夋嫨鍥句功鍔犲叆鐢宠鍗曪紒", + icon: 'none', + duration: 1000, + }) + } + + }, + + onDelete(e) { + let that = this; + const item = e.currentTarget.dataset.book; + wx.showModal({ + title: '鎻愮ず锛�', //鎻愮ず鐨勬爣棰� + content: '纭畾瑕佸垹闄よ涔﹀悧锛�', //鎻愮ず鐨勫唴瀹� + success: function (res) { + if (res.confirm) { + if (that.data.active == '1') { + that.data.electronicBookList.forEach((obj, index) => { + if (obj.id == item.id) { + that.data.electronicBookList.splice(index, 1); + } + }) + that.setData({ + bookList: that.data.electronicBookList + }) + wx.setStorageSync("electronicBookList", that.data.electronicBookList); + } else { + that.data.paperBookList.forEach((obj, index) => { + if (obj.id == item.id) { + that.data.paperBookList.splice(index, 1); + } + }) + that.setData({ + bookList: this.data.paperBookList + }) + wx.setStorageSync("paperBookList", that.data.paperBookList); + } + } else if (res.cancel) { + } + } + }) + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/sampleBookList/applicationForm/index.json b/packageDomain/pages/sampleBookList/applicationForm/index.json similarity index 100% rename from pages/sampleBookList/applicationForm/index.json rename to packageDomain/pages/sampleBookList/applicationForm/index.json diff --git a/pages/sampleBookList/applicationForm/index.wxml b/packageDomain/pages/sampleBookList/applicationForm/index.wxml similarity index 100% rename from pages/sampleBookList/applicationForm/index.wxml rename to packageDomain/pages/sampleBookList/applicationForm/index.wxml diff --git a/pages/sampleBookList/applicationForm/index.wxss b/packageDomain/pages/sampleBookList/applicationForm/index.wxss similarity index 100% rename from pages/sampleBookList/applicationForm/index.wxss rename to packageDomain/pages/sampleBookList/applicationForm/index.wxss diff --git a/packageDomain/pages/sampleBookList/index.js b/packageDomain/pages/sampleBookList/index.js new file mode 100644 index 0000000..30be704 --- /dev/null +++ b/packageDomain/pages/sampleBookList/index.js @@ -0,0 +1,995 @@ +const app = getApp(); +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + barHeight: '', + navBarHeight: '', + searchValue: '', + userInfo: null, + path: '*', + pathList: [], + + bookList: [], + //楂樼骇鍒嗙被 + iconList: { + value: "", + options: [], + }, + //涓�绾у垎绫� + stairList: { + value: '', + options: [], + }, + //浜岀骇鍒嗙被 + secondList: { + value: [], + options: [], + }, + //閲嶇偣椤圭洰 + majorProjectList: { + value: [], + options: [], + }, + //鏂板舰鎬佹暀鏉� + newTextBook: { + value: [], + options: [], + }, + //楂樼骇鍒嗙被閫変腑 + assortCheck: { + name: '', + code: '', + }, + + stairCode: '', // 涓�绾у垎绫婚�変腑椤� + secondCode: '', // 浜岀骇鍒嗙被閫変腑椤� + sort: '', // 鎺掑簭 + //鍒嗛〉 + page: 1, + limit: 10, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false, + // 杩斿洖椤堕儴 + isBackTop: false, + setScrollValue: 0, + skeletonLoding: true, + alreadyPaperBookList: [], //宸茬敵璇风焊璐ㄦ牱涔� + alreadyElectronicBookList: [], //宸茬敵璇风數瀛愭牱涔� + paperBookList: [], //鏍蜂功鍗曠焊璐ㄤ功 + electronicBookList: [], //鏍蜂功鍗曠數瀛愪功 + paperBookCount: 0, //绾歌川涔﹀墿浣欐鏁� + ebookCount: 0, //鐢靛瓙涔﹀墿浣欐鏁� + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + const systInfo = wx.getSystemInfoSync(); + const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 + const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� + this.setData({ + barHeight: systInfo.statusBarHeight, + navBarHeight: navBarHeight, + }); + // 鎼滅储璧嬪�� + if (options && options.searchValue) { + this.setData({ + searchValue: options.searchValue, + }); + } + // 楂樼骇鍒嗙被璧嬪�� + if (options && options.assortCode) { + this.setData({ + assortCheck: { + name: options.assorName, + code: options.assortCode, + 'iconList.value': options.assortCode + }, + }); + } + if (this.data.assortCheck.code) { + // 鑾峰彇涓�绾у垎绫� + this.getStairList(this.data.assortCheck.code); + } + // 涓�绾у垎绫诲拰path璧嬪�� + if (options && options.assortCode && options.stairCode) { + this.setData({ + 'stairList.value': options.stairCode, + stairCode: options.stairCode, + path: `${options.assortCode}\\${options.stairCode}`, + }); + } + // 浜岀骇鍒嗙被璧嬪�� + if (options && options.secondCode) { + this.setData({ + secondCode: options.secondCode, + pathList: [{ + Path: options.secondCode, + Type: '*', + StoreRefCode: app.config.goodsStore, + } + ], + }) + } + this.getIconTypeList(); + this.getBookList(false); + // 鑾峰彇閲嶇偣椤圭洰 + this.getProjectList('bookClassification'); + //鏂板舰鎬佹暀鏉� + this.getProjectList('newFormsTextbooks'); + if (wx.getStorageSync(app.config.tokenKey)) { + this.getAlreadyPBookList() + this.getAlreadyEBookList() + } + if (wx.getStorageSync(app.config.userInfoKey)) { + this.setData({ + userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey)) + }) + } + if (wx.getStorageSync("paperBookList")) { + this.setData({ + paperBookList: wx.getStorageSync("paperBookList") + }) + } + if (wx.getStorageSync("electronicBookList")) { + this.setData({ + electronicBookList: wx.getStorageSync("electronicBookList") + }) + } + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + goBack() { + wx.navigateBack(); + }, + //鑾峰彇楂樼骇鍒嗙被 + getIconTypeList() { + let query = { + path: '*', + filterList: [ + { + value: 'Normal', + field: 'state' + } + ], + queryType: '\\', + searchList: [], + size: '5', + start: '0', + storeRefCode: app.config.goodsStore, + sort: { type: 'Asc', field: 'LinkOrder' } + } + app.MG.store.getStoreChannelList(query).then((res) => { + let list = []; + if (res.datas.length > 0) ( + res.datas.forEach((item) => { + item.value = item.refCode; + item.label = item.name; + if (item.refCode == 'jsek_higherEducation') { + list.push(item) + } + if (item.refCode == 'jsek_vocationalEducation') { + list.push(item) + } + + }) + ) + this.setData({ + 'iconList.options': list, + 'iconList.value': this.data.assortCode, + }); + }) + }, + // 鑾峰彇涓�绾у垪琛� + getStairList(path) { + const query = { + path, + filterList: [], + queryType: '\\', + searchList: [], + size: '30', + start: '0', + storeRefCode: app.config.goodsStore, + sort: { type: 'Asc', field: 'LinkOrder' }, + }; + app.MG.store.getStoreChannelList(query).then(async (res) => { + let options = []; + if (res.datas.length > 0) { + for (let index = 0; index < res.datas.length; index++) { + let item = res.datas[index]; + options.push({ + value: item.refCode, + label: item.name, + }); + } + } + this.setData({ + 'stairList.options': options, + 'stairList.value': this.data.stairCode, + }); + }); + }, + // 鑾峰彇涓�绾у垎绫讳笅浜岀骇鍒嗙被 + getSecondList(path) { + let options = []; + let query = { + path, + filterList: [], + queryType: '\\', + searchList: [], + size: '30', + start: '0', + storeRefCode: app.config.goodsStore, + sort: { type: 'Asc', field: 'LinkOrder' }, + }; + app.MG.store.getStoreChannelList(query).then((res) => { + if (res.datas.length > 0) { + for (let index = 0; index < res.datas.length; index++) { + const item = res.datas[index]; + options.push({ + value: `${item.pathLinks[0].linkPath}\\${item.id}`, + label: item.name, + }); + } + } + this.setData({ + 'secondList.options': options, + }); + const second = [this.data.secondCode] + this.setData({ + 'secondList.value': second + }) + }); + }, + // 鑾峰彇閲嶇偣椤圭洰 + getProjectList(type) { + const options = []; + const arr = []; + let array = []; + const query = { + refCodes: [type], + }; + app.MG.store.getProductTypeField(query).then((res) => { + array = JSON.parse(res[0].config).option; + for (let index = 0; index < array.length; index++) { + const element = array[index]; + if (element.child) { + for (let index = 0; index < element.child.length; index++) { + const item = element.child[index]; + arr.push(item); + } + } + } + if (type == 'bookClassification') { + for (let index = 0; index < arr.length; index++) { + const element = arr[index]; + options.push({ + value: element.value, + label: element.name, + }); + } + this.setData({ + 'majorProjectList.options': options, + }); + } else if (type == 'newFormsTextbooks') { + for (let index = 0; index < arr.length; index++) { + const element = arr[index]; + options.push({ + value: element.value, + label: element.name, + }); + } + this.setData({ + 'newTextBook.options': options, + }); + console.log('閲嶇偣椤圭洰', this.data.newTextBook); + } + }); + }, + // 鑾峰彇鍥句功鍒楄〃 + getBookList(isReachBottom) { + let that = this; + let sort; + let pathObj = {}; + if (that.data.pathList.length) { + pathObj = { + subAccess: this.data.pathList, + }; + } else { + pathObj = { + path: that.data.path, + queryType: '*', + }; + } + if (that.data.sort) { + sort = { + Name: that.data.sort, + BaseType: '', + }; + } else { + sort = { + type: 'Desc', + field: 'ViewCount', + }; + } + // 鎼滅储 + let searchObj = {}; + if (that.data.searchValue) { + searchObj = { + 'Name*': that.data.searchValue, + '||author*': that.data.searchValue, + '||isbn*': that.data.searchValue, + '||seriesName*': that.data.searchValue, + }; + } + const query = { + ...pathObj, + filterList: [ + { + value: 'Normal', + field: 'state', + }, + ], + sort, + coverSize: { + height: 145, + }, + paging: { + start: that.data.page * that.data.limit - that.data.limit, + size: that.data.limit + }, + fields: { + author: [], + isbn: [], + publicationDate: [], + isApplyBook: [], + 'isApplyBook>': ['1'], + ...searchObj, + }, + }; + app.MG.store.getProductList(query).then((res) => { + try { + if (res.datas.length > 0) { + res.datas.forEach((item) => { + item.paperDisabled = false + item.paperChecked = false + item.electronDisabled = false + item.electronChecked = false + if (item.purchasedSaleMethodIdList.indexOf(item.defaultSaleMethodId) > -1) { + item.electronDisabled = true + item.electronChecked = true + } + if (that.data.alreadyPaperBookList.length > 0) { + that.data.alreadyPaperBookList.forEach((pBook) => { + pBook.content.forEach((pBookItem) => { + if (pBookItem.id === item.id && pBook.state == 'WaitAudit') { + item.paperDisabled = true + item.paperChecked = true + } + if (pBookItem.id === item.id && pBook.state == 'Normal') { + item.paperDisabled = false + } + }) + }) + } + if (that.data.alreadyElectronicBookList.length > 0) { + that.data.alreadyElectronicBookList.forEach((eBook) => { + eBook.content.forEach((eBookItem) => { + if (eBookItem.id === item.id && !eBook.isExpiry && eBook.state != 'Reject') { + item.electronDisabled = true + item.electronChecked = true + } + }) + }) + } + if (that.data.paperBookList.length > 0) { + for (let i = 0; i < that.data.paperBookList.length; i++) { + if (that.data.paperBookList[i].id == item.id) { + item.paperChecked = true + } + } + } + if (that.data.electronicBookList.length > 0) { + for (let i = 0; i < that.data.electronicBookList.length; i++) { + if (that.data.electronicBookList[i].id == item.id) { + item.electronChecked = true + } + } + } + }); + let list = res.datas; + //瑙﹀簳鍔犺浇鏂版暟鎹苟淇濈暀鑰佹暟鎹� + if (isReachBottom) { + list = [...this.data.bookList, ...list] //灏嗘柊鏁版嵁鍔犲叆鑰佹暟鎹腑 + } + that.setData({ + bookList: list, + pageTotalCount: res.total, + bottomLoading: false, + isMoreData: list.length > 0 ? false : true, + skeletonLoding: false, + loading: false + }) + } else { + that.setData({ + skeletonLoding: false, + loading: false + }) + } + } catch (error) { + console.log(error) + } + }); + }, + //楂樼骇鍒嗙被閫夋嫨 + onChangeIcon(e) { + this.setData({ + assortCheck: { + code: e.detail.value, + }, + stairCode: '', + secondCode: '', + path: `${e.detail.value}`, + 'iconList.value': e.detail.value, + }); + this.getBookList(false); + this.getStairList(this.data.assortCheck.code); + + }, + // 涓�绾у垎绫诲垏鎹� + onChangeStair(e) { + const path = e.detail.value.length + ? `${this.data.assortCheck.code}\\${e.detail.value}` + : this.data.assortCheck.code; + this.setData({ + pathList: [], + stairCode: e.detail.value, + secondCode: '', + path: path, + 'stairList.value': e.detail.value, + }); + this.getBookList(false); + this.getSecondList(path); + }, + // 浜岀骇鍒嗙被鍒囨崲 + onChangeSecond(e) { + const pathList = []; + for (let index = 0; index < e.detail.value.length; index++) { + const element = e.detail.value[index]; + pathList.push({ + Path: element, + Type: '*', + StoreRefCode: app.config.goodsStore, + }); + } + this.setData({ + pathList: pathList, + 'secondList.value': e.detail.value, + }); + + }, + // + onConfirmSecond() { + this.getBookList(false); + }, + // 閲嶇偣椤圭洰鏀瑰彉 + changeMajorProject(e) { + this.setData({ + 'majorProjectList.value': e.detail.value, + }); + this.getBookList(false); + }, + // 閲嶇偣椤圭洰閲嶇疆 + resetMajorProject() { + this.setData({ + 'majorProjectList.value': [], + }); + this.getBookList(false); + }, + changeNewText(e) { + this.setData({ + 'newTextBook.value': e.detail.value, + }); + this.getBookList(false); + }, + resetNewText() { + this.setData({ + 'newTextBook.value': [], + }); + this.getBookList(false); + }, + // 鎺掑簭鎸夐挳 + sortClick() { + if (!this.data.sort.length) { + this.setData({ + sort: 'Desc', + }); + } else if (this.data.sort == 'Desc') { + this.setData({ + sort: 'Asc', + }); + } else if (this.data.sort == 'Asc') { + this.setData({ + sort: '', + }); + } + let path; + if (this.data.secondCode) { + path = this.data.secondCode; + } else if (this.data.stairCode) { + path = `${this.data.assortCheck.code + }\\${this.data.stairCode}`; + } else { + path = this.data.assortCheck.code; + } + this.setData({ + path: path, + }); + this.getBookList(false); + }, + // 鎼滅储鍥句功 + searchBook(e) { + console.log(e.detail.value); + this.setData({ + searchValue: e.detail.value, + }); + this.getBookList(false); + }, + // 璺宠浆鍥句功璇︽儏 + goDetail(e) { + const { book } = e.currentTarget.dataset; + wx.navigateTo({ + url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, + }); + }, + //鑾峰彇宸茬敵璇风焊璐ㄦ牱涔� + getAlreadyPBookList() { + const data = { + start: 0, + size: 9999, + topicIdOrRefCode: 'applyEntityBook', + appRefCode: app.config.appRefCode, + sort: { + type: 'Desc', + field: 'CreateDate' + } + } + app.MG.ugc.getTopicMessageList(data).then((res) => { + res.datas.map((item) => { + if (item.content) { + item.content = JSON.parse(item.content) + } + }) + this.setData({ + alreadyPaperBookList: res.datas, + }); + }) + }, + //鑾峰彇宸茬敵璇风數瀛愭牱涔� + getAlreadyEBookList() { + const data = { + start: 0, + size: 9999, + topicIdOrRefCode: 'applyBook', + appRefCode: app.config.appRefCode, + sort: { + type: 'Desc', + field: 'CreateDate' + } + } + app.MG.ugc.getTopicMessageList(data).then((res) => { + let list = [] + res.datas.map((item) => { + if (item.feedBack) { + item.feedBack = JSON.parse(item.feedBack) + if (item.feedBack.endDate) { + let times = new Date(item.feedBack.endDate + ' 23:59:59').getTime() + let currentDate = new Date().getTime() + if (times < currentDate) { + item.isExpiry = true + } + } + } + if (item.content) { + item.content = JSON.parse(item.content) + } + if (item.state != 'Reject') { + list.push(item) + } + }) + this.setData({ + alreadyElectronicBookList: list, + }); + }) + }, + + + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + if (this._freshing) return + this.setData({ + page: 1, + limit: 10, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false + }) + this._freshing = true; + this.setData({ + triggered: false, + }) + this.getBookList(false); + this._freshing = false + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + this.setData({ + bottomLoading: true, + isMoreData: false + }) + let bool = false; + if (this.data.pageTotalCount > this.data.bookList.length) { + bool = true; + this.setData({ + page: this.data.page + 1, + }) + + } else { + setTimeout(() => { + this.setData({ + bottomLoading: false, + isMoreData: true + }) + }, 100) + return false; + } + this.getBookList(bool); + }, + //绾歌川鏍蜂功 + onChangePaper(e) { + const item = e.currentTarget.dataset.book; + let role = this.data.userInfo != null ? this.data.userInfo.role : null + if (role) { + if (item.paperDisabled) { + wx.showToast({ + title: "璇ユ牱涔﹀凡鐢宠", + icon: 'none', + duration: 1000, + }) + return + } + + if (item.paperChecked) { + if (this.data.paperBookList.length > 0) { + this.data.paperBookList.forEach((obj, index) => { + if (obj.id == item.id) { + this.data.paperBookList.splice(index, 1); + } + }) + } + item.paperChecked = false; + if (this.data.bookList.length > 0) { + this.data.bookList.forEach(i => { + if (i.id == item.id) { + i.paperChecked = false; + } + }) + } + wx.showToast({ + title: "宸蹭粠鏍蜂功鐢宠鍗曠Щ闄�", + icon: 'none', + duration: 1000, + }) + wx.setStorageSync("paperBookList", JSON.stringify(this.data.paperBookList)); + return + } + if (role == 'Teacher') { + this.getSelectPaperBookCount(item) + } else { + item.paperChecked = false + wx.showModal({ + title: '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', //鎻愮ず鐨勬爣棰� + content: '璇峰厛杩涜鏁欏笀璁よ瘉锛�', //鎻愮ず鐨勫唴瀹� + success: function (res) { + if (res.confirm) { + wx.navigateTo({ + url: "/packageDomain/pages/teacherCertification/index", + }); + } else if (res.cancel) { + item.paperChecked = false + } + } + }) + } + } else { + item.paperChecked = false + } + }, + getSelectPaperBookCount(item) { + app.MG.app + .getTicketResult({ + ticketRefCodeOrGuid: 'paperSampleBookapplyNum', + roleId: this.data.userInfo.roleId + }) + .then((res) => { + this.setData({ + paperBookCount: res.totalCount - res.usedCount + }) + if (!item.paperDisabled) { + this.getAlreadyBookList(item, 'pBook') + } + }) + }, + //閫夋嫨鐢靛瓙鏍蜂功 + onChangeElectron(e) { + const item = e.currentTarget.dataset.book; + let role = this.data.userInfo != null ? this.data.userInfo.role : null; + if (role) { + if (item.electronDisabled) { + wx.showToast({ + title: "璇ユ牱涔﹀凡鐢宠", + icon: 'none', + duration: 1000, + }) + return + } + if (item.electronChecked) { + if (this.data.electronicBookList) { + this.data.electronicBookList.forEach((obj, index) => { + if (obj.id == item.id) { + this.data.electronicBookList.splice(index, 1); + } + }) + } + if (this.data.bookList.length > 0) { + this.data.bookList.forEach(i => { + if (i.id == item.id) { + i.electronChecked = false; + } + }) + } + item.electronChecked = false; + wx.showToast({ + title: "宸蹭粠鏍蜂功鐢宠鍗曠Щ闄�", + icon: 'none', + duration: 1000, + }) + wx.setStorageSync("electronicBookList", JSON.stringify(this.data.electronicBookList)); + return + } + if (role == 'Teacher') { + //鏈夋棤瀛愬晢鍝侊紝瀛愬晢鍝佹湁鏃犵數瀛愪功鏂囦欢 + const obj = { + path: '*', + queryType: 'SubProduct', + sort: { + type: 'Desc', + field: 'CreateDate' + }, + paging: { + start: 0, + size: 6 + }, + mainProductId: item.id, + fields: { + bookshelf_pdf: [], + bookshelf_protectedEpub: [], + } + } + app.MG.store.getProductList(obj).then((res) => { + if (res.datas.length > 0) { + if (res.datas[0].bookshelf_pdf || res.datas[0].bookshelf_protectedEpub) { + this.getSelectBookCount(item) + } else { + wx.showToast({ + title: "鏆傛棤鐢靛瓙涔︽枃浠�,璇疯仈绯荤鐞嗗憳!", + icon: 'none', + duration: 1000, + }) + } + } else { + this.getSelectBookCount(item) + } + }) + } else { + item.electronChecked = false + wx.showModal({ + title: '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', //鎻愮ず鐨勬爣棰� + content: '璇峰厛杩涜鏁欏笀璁よ瘉锛�', //鎻愮ず鐨勫唴瀹� + success: function (res) { + if (res.confirm) { + wx.navigateTo({ + url: "/packageDomain/pages/teacherCertification/index", + }); + } else if (res.cancel) { + item.electronChecked = false + } + } + }) + } + } + }, + getSelectBookCount(item) { + app.MG.app + .getTicketResult({ + ticketRefCodeOrGuid: 'electronicSampleBookapplyNum', + roleId: this.data.userInfo.roleId + }) + .then((res) => { + this.setData({ + ebookCount: res.totalCount - res.usedCount + }) + if (!item.electronDisabled) { + this.getAlreadyBookList(item, 'eBook') + } + }) + }, + + getAlreadyBookList(item, type) { + let itemAttr = null + let isHas = false + itemAttr = { + id: item.id, + title: item.name || '-', + icon: item.icon, + checked: false, + defaultSaleMethodId: item.defaultSaleMethodId, + md5: item.datas.Icon, + author: item.author || '-', + price: item.price || '-', + isbn: item.isbn || '-', + publicationDate: item.publicationDate + } + + if (type == 'eBook') { + if (this.data.ebookCount > 0) { + const eBookData = this.data.electronicBookList + if (eBookData.length == 2) { + item.electronChecked = false + wx.showToast({ + title: "姣忔鏈�澶氬彧鍙敵璇�2鏈牱涔�", + icon: 'none', + duration: 1000, + }) + return false + } + if (eBookData.length > 0) { + for (let i = 0; i < eBookData.length; i++) { + if (eBookData[i].id == item.id) { + isHas = true + } + } + if (!isHas) { + wx.showToast({ + title: "娣诲姞鎴愬姛锛屽湪鏍蜂功鐢宠鍗曠瓑鎮ㄥ摝~", + icon: "none", + duration: 1000, + }) + this.setData({ + electronicBookList: [...this.data.electronicBookList, ...[item]] + }) + wx.setStorageSync("electronicBookList", JSON.stringify(this.data.electronicBookList)); + } else { + item.electronChecked = false + wx.showToast({ + title: "璇ヤ功宸插湪娓呭崟鍒楄〃涓�", + icon: "none", + duration: 1000, + }) + } + } else { + wx.showToast({ + title: "娣诲姞鎴愬姛锛屽湪鏍蜂功鐢宠鍗曠瓑鎮ㄥ摝~", + icon: "none", + duration: 1000, + }) + this.setData({ + electronicBookList: [...this.data.electronicBookList, ...[item]] + }) + wx.setStorageSync("electronicBookList", JSON.stringify(this.data.electronicBookList)); + } + } else { + item.electronChecked = false + wx.showToast({ + title: "鎮ㄧ殑鐢靛瓙鏍蜂功鐢宠娆℃暟宸茬敤灏斤紝鑻ヨ缁х画锛岃鑱旂郴绠$悊鍛橈紒", + icon: "none", + duration: 1000, + }) + } + } else { + if (this.data.paperBookCount > 0) { + const pBookData = this.data.paperBookList + if (pBookData.length == 2) { + item.paperChecked = false + wx.showToast({ + title: "姣忔鏈�澶氬彧鍙敵璇�2鏈牱涔�", + icon: 'none', + duration: 1000, + }) + return false + } + if (pBookData.length > 0) { + for (let i = 0; i < pBookData.length; i++) { + if (pBookData[i].id == item.id) { + isHas = true + } + } + if (!isHas) { + item.paperChecked = true + wx.showToast({ + title: "娣诲姞鎴愬姛锛屽湪鏍蜂功鐢宠鍗曠瓑鎮ㄥ摝~", + icon: 'none', + duration: 1000, + }) + this.setData({ + paperBookList: [...this.data.paperBookList, ...[item]] + }) + wx.setStorageSync("paperBookList", JSON.stringify(this.data.paperBookList)); + console.log(this.data.paperBookList, "3") + } else { + item.paperChecked = false + wx.showToast({ + title: "璇ヤ功宸插湪娓呭崟鍒楄〃涓�", + icon: 'none', + duration: 1000, + }) + } + } else { + item.paperChecked = true; + wx.showToast({ + title: "娣诲姞鎴愬姛锛屽湪鏍蜂功鐢宠鍗曠瓑鎮ㄥ摝~", + icon: 'none', + duration: 1000, + }) + this.setData({ + paperBookList: [item] + }) + wx.setStorageSync("paperBookList", JSON.stringify(this.data.paperBookList)); + console.log(this.data.paperBookList, "4") + } + } else { + item.paperChecked = false + wx.showToast({ + title: "鎮ㄧ殑绾歌川鏍蜂功鐢宠娆℃暟宸茬敤灏斤紝鑻ヨ缁х画锛岃鑱旂郴绠$悊鍛橈紒", + icon: 'none', + duration: 1000, + }) + } + } + }, + //鍘绘牱涔︾敵璇峰崟 + goApply() { + wx.navigateTo({ + url: "/packageDomain/pages/sampleBookList/applicationForm/index", + }); + }, + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/sampleBookList/index.json b/packageDomain/pages/sampleBookList/index.json similarity index 100% rename from pages/sampleBookList/index.json rename to packageDomain/pages/sampleBookList/index.json diff --git a/pages/sampleBookList/index.wxml b/packageDomain/pages/sampleBookList/index.wxml similarity index 100% rename from pages/sampleBookList/index.wxml rename to packageDomain/pages/sampleBookList/index.wxml diff --git a/pages/sampleBookList/index.wxss b/packageDomain/pages/sampleBookList/index.wxss similarity index 100% rename from pages/sampleBookList/index.wxss rename to packageDomain/pages/sampleBookList/index.wxss diff --git a/pages/teacherCertification/index.js b/packageDomain/pages/teacherCertification/index.js similarity index 100% rename from pages/teacherCertification/index.js rename to packageDomain/pages/teacherCertification/index.js diff --git a/pages/teacherCertification/index.json b/packageDomain/pages/teacherCertification/index.json similarity index 100% rename from pages/teacherCertification/index.json rename to packageDomain/pages/teacherCertification/index.json diff --git a/pages/teacherCertification/index.wxml b/packageDomain/pages/teacherCertification/index.wxml similarity index 100% rename from pages/teacherCertification/index.wxml rename to packageDomain/pages/teacherCertification/index.wxml diff --git a/pages/teacherCertification/index.wxss b/packageDomain/pages/teacherCertification/index.wxss similarity index 100% rename from pages/teacherCertification/index.wxss rename to packageDomain/pages/teacherCertification/index.wxss diff --git a/pages/aboutUs/index.js b/packagePersonal/pages/aboutUs/index.js similarity index 100% rename from pages/aboutUs/index.js rename to packagePersonal/pages/aboutUs/index.js diff --git a/pages/aboutUs/index.json b/packagePersonal/pages/aboutUs/index.json similarity index 100% rename from pages/aboutUs/index.json rename to packagePersonal/pages/aboutUs/index.json diff --git a/pages/aboutUs/index.wxml b/packagePersonal/pages/aboutUs/index.wxml similarity index 100% rename from pages/aboutUs/index.wxml rename to packagePersonal/pages/aboutUs/index.wxml diff --git a/pages/aboutUs/index.wxss b/packagePersonal/pages/aboutUs/index.wxss similarity index 100% rename from pages/aboutUs/index.wxss rename to packagePersonal/pages/aboutUs/index.wxss diff --git a/pages/personalCenter/activateProduct/index.js b/packagePersonal/pages/activateProduct/index.js similarity index 100% rename from pages/personalCenter/activateProduct/index.js rename to packagePersonal/pages/activateProduct/index.js diff --git a/pages/personalCenter/activateProduct/index.json b/packagePersonal/pages/activateProduct/index.json similarity index 100% rename from pages/personalCenter/activateProduct/index.json rename to packagePersonal/pages/activateProduct/index.json diff --git a/pages/personalCenter/activateProduct/index.wxml b/packagePersonal/pages/activateProduct/index.wxml similarity index 100% rename from pages/personalCenter/activateProduct/index.wxml rename to packagePersonal/pages/activateProduct/index.wxml diff --git a/pages/personalCenter/activateProduct/index.wxss b/packagePersonal/pages/activateProduct/index.wxss similarity index 100% rename from pages/personalCenter/activateProduct/index.wxss rename to packagePersonal/pages/activateProduct/index.wxss diff --git a/packagePersonal/pages/downloads/index.js b/packagePersonal/pages/downloads/index.js new file mode 100644 index 0000000..47cc245 --- /dev/null +++ b/packagePersonal/pages/downloads/index.js @@ -0,0 +1,149 @@ +const app = getApp(); +import moment from 'moment' +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + list: [], + //鍒嗛〉 + page: 1, + limit: 10, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false, + // 杩斿洖椤堕儴 + isBackTop: false, + setScrollValue: 0, + skeletonLoding: true, + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + this.getDataList(false); + }, + + getDataList(isReachBottom) { + app.MG.ugc.getTopicMessageList({ + appRefCode: app.config.appRefCode, + topicIdOrRefCode: "productDownLoad", + start: this.data.page * this.data.limit - this.data.limit, + size: this.data.limit, + sort: { + type: "Desc", + field: "CreateDate" + } + }) + .then(res => { + try { + if (res.datas.length > 0) { + res.datas.forEach((item) => { + item.createDate = moment(item.createDate).format("YYYY-MM-DD HH:mm:ss"); + item.updateDate = moment(item.updateDate).format("YYYY-MM-DD HH:mm:ss"); + if (item.feedBack) { + item.feedBack = JSON.parse(item.feedBack); + } + if (item.content) { + item.product = JSON.parse(item.content)[0]; + } + }); + + let dataList = res.datas; + + //瑙﹀簳鍔犺浇鏂版暟鎹苟淇濈暀鑰佹暟鎹� + if (isReachBottom) { + dataList = [...this.data.list, ...dataList] //灏嗘柊鏁版嵁鍔犲叆鑰佹暟鎹腑 + } + this.setData({ + list: dataList, + pageTotalCount: res.totalSize, + bottomLoading: false, + isMoreData: dataList.length > 0 ? false : true, + skeletonLoding: false, + }) + } else { + this.setData({ + skeletonLoding: false, + }) + } + } catch (error) { + console.log(error) + } + }) + }, + + goBookDetails(e) { + const { book } = e.currentTarget.dataset; + wx.navigateTo({ + url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, + }); + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + if (this._freshing) return + this.setData({ + page: 1, + limit: 10, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false + }) + this._freshing = true; + this.setData({ + triggered: false, + }) + this.getDataList(false); + this._freshing = false + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + this.setData({ + bottomLoading: true, + isMoreData: false + }) + let bool = false; + if (this.data.pageTotalCount > this.data.list.length) { + bool = true; + this.setData({ + page: this.data.page + 1, + }) + } else { + setTimeout(() => { + this.setData({ + bottomLoading: false, + isMoreData: true + }) + }, 100) + return false; + } + this.getDataList(bool); + }, + // 鐩戝惉婊氬姩璺濈 + onPageScroll(e) { + if (e && e.scrollTop >= 1000) { + this.setData({ + isBackTop: true + }) + } else { + this.setData({ + isBackTop: false + }) + } + }, + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/downloads/index.json b/packagePersonal/pages/downloads/index.json similarity index 100% rename from pages/personalCenter/downloads/index.json rename to packagePersonal/pages/downloads/index.json diff --git a/pages/personalCenter/downloads/index.wxml b/packagePersonal/pages/downloads/index.wxml similarity index 100% rename from pages/personalCenter/downloads/index.wxml rename to packagePersonal/pages/downloads/index.wxml diff --git a/pages/personalCenter/downloads/index.wxss b/packagePersonal/pages/downloads/index.wxss similarity index 100% rename from pages/personalCenter/downloads/index.wxss rename to packagePersonal/pages/downloads/index.wxss diff --git a/pages/personalCenter/feedBack/index.js b/packagePersonal/pages/feedBack/index.js similarity index 100% rename from pages/personalCenter/feedBack/index.js rename to packagePersonal/pages/feedBack/index.js diff --git a/pages/personalCenter/feedBack/index.json b/packagePersonal/pages/feedBack/index.json similarity index 100% rename from pages/personalCenter/feedBack/index.json rename to packagePersonal/pages/feedBack/index.json diff --git a/pages/personalCenter/feedBack/index.wxml b/packagePersonal/pages/feedBack/index.wxml similarity index 100% rename from pages/personalCenter/feedBack/index.wxml rename to packagePersonal/pages/feedBack/index.wxml diff --git a/pages/personalCenter/feedBack/index.wxss b/packagePersonal/pages/feedBack/index.wxss similarity index 100% rename from pages/personalCenter/feedBack/index.wxss rename to packagePersonal/pages/feedBack/index.wxss diff --git a/packagePersonal/pages/myCollection/index.js b/packagePersonal/pages/myCollection/index.js new file mode 100644 index 0000000..1a6e3ff --- /dev/null +++ b/packagePersonal/pages/myCollection/index.js @@ -0,0 +1,192 @@ +const app = getApp(); +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + active: 0, + activeName: "FavoriteBookCity", + tabList: [ + { + label: '鍥句功', + key: 0, + linkType: 'FavoriteBookCity', + }, + { + label: '璇剧▼', + key: 1, + linkType: 'Favoriteclass', + } + ], + list: [], + //鍒嗛〉 + page: 1, + limit: 18, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false, + // 杩斿洖椤堕儴 + isBackTop: false, + setScrollValue: 0, + skeletonLoding: true, + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + this.getDataList(false); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + tabBookClick(item) { + console.log(item, 1) + let that = this; + let info = this.data.tabList[item.detail.value] + that.setData({ + skeletonLoding: true, + active: item.detail.value, + activeName: info.linkType, + list: [], + page: 1, + bottomLoading: false, + isMoreData: false, + }) + that.getDataList(false); + }, + getDataList(isReachBottom) { + app.MG.store.getProductList({ + handelEBooK: true, + queryType: "AppUserProductLink", + linkType: this.data.activeName, + paging: { + start: this.data.page * this.data.limit - this.data.limit, + size: this.data.limit + }, + fields: { + author: [] + } + }).then((res) => { + try { + if (res.datas.length > 0) { + let dataList = res.datas; + //瑙﹀簳鍔犺浇鏂版暟鎹苟淇濈暀鑰佹暟鎹� + if (isReachBottom) { + dataList = [...this.data.list, ...dataList] //灏嗘柊鏁版嵁鍔犲叆鑰佹暟鎹腑 + } + this.setData({ + list: dataList, + pageTotalCount: res.total, + bottomLoading: false, + isMoreData: dataList.length > 0 ? false : true, + skeletonLoding: false, + loading: false + }) + } else { + this.setData({ + skeletonLoding: false, + loading: false + }) + } + } catch (error) { + console.log(error) + } + }) + }, + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + if (this._freshing) return + this.setData({ + // list: [], + page: 1, + limit: 18, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false + }) + this._freshing = true; + this.setData({ + triggered: false, + }) + this.getDataList(false); + this._freshing = false + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + this.setData({ + bottomLoading: true, + isMoreData: false + }) + let bool = false; + if (this.data.pageTotalCount > this.data.list.length) { + bool = true; + this.setData({ + page: this.data.page + 1, + }) + } else { + setTimeout(() => { + this.setData({ + bottomLoading: false, + isMoreData: true + }) + }, 100) + return false; + } + this.getDataList(bool); + }, + + setCoolect(itemData) { + let that = this; + let info = itemData.currentTarget.dataset.info; + wx.showModal({ + title: '鎻愮ず', //鎻愮ず鐨勬爣棰� + content: '纭畾瑕佸彇娑堟敹钘忥紵', //鎻愮ず鐨勫唴瀹� + success: function (res) { + if (res.confirm) { + app.MG.store + .delProductLink({ + productIds: [info.id], + linkType: that.data.activeName, + }) + .then(() => { + wx.showToast({ + title: "鏀惰棌宸插彇娑�", + icon: 'success', + duration: 1000, + }) + this.getDataList(false) + }); + } else if (res.cancel) { + console.log('鐢ㄦ埛鐐瑰嚮浜嗗彇娑�') + } + } + }) + }, + goBookDetails(e) { + const { book } = e.currentTarget.dataset; + wx.navigateTo({ + url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, + }); + }, + + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/myCollection/index.json b/packagePersonal/pages/myCollection/index.json similarity index 100% rename from pages/personalCenter/myCollection/index.json rename to packagePersonal/pages/myCollection/index.json diff --git a/pages/personalCenter/myCollection/index.wxml b/packagePersonal/pages/myCollection/index.wxml similarity index 100% rename from pages/personalCenter/myCollection/index.wxml rename to packagePersonal/pages/myCollection/index.wxml diff --git a/pages/personalCenter/myCollection/index.wxss b/packagePersonal/pages/myCollection/index.wxss similarity index 100% rename from pages/personalCenter/myCollection/index.wxss rename to packagePersonal/pages/myCollection/index.wxss diff --git a/packagePersonal/pages/myMassage/index.js b/packagePersonal/pages/myMassage/index.js new file mode 100644 index 0000000..34762a5 --- /dev/null +++ b/packagePersonal/pages/myMassage/index.js @@ -0,0 +1,157 @@ +import moment from 'moment' +const app = getApp(); +Page({ + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + list: [], + //鍒嗛〉 + page: 1, + limit: 10, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false, + // 杩斿洖椤堕儴 + isBackTop: false, + setScrollValue: 0, + skeletonLoding: true, + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + this.getDataList(false); + console.log(options); + }, + + getDataList(isReachBottom) { + app.MG.app.getAppMessageList({ + appRefCode: app.config.appRefCode, + start: this.data.page * this.data.limit - this.data.limit, + size: this.data.limit, + sort: { + type: "Desc", + field: "CreateDate" + } + }) + .then(res => { + try { + if (res.datas.length > 0) { + res.datas.forEach((item) => { + item.createDate = moment(item.createDate).format("YYYY-MM-DD HH:mm"); + }); + + let dataList = res.datas; + + //瑙﹀簳鍔犺浇鏂版暟鎹苟淇濈暀鑰佹暟鎹� + if (isReachBottom) { + dataList = [...this.data.list, ...dataList] //灏嗘柊鏁版嵁鍔犲叆鑰佹暟鎹腑 + } + this.setData({ + list: dataList, + pageTotalCount: res.totalSize, + bottomLoading: false, + isMoreData: dataList.length > 0 ? false : true, + skeletonLoding: false, + }) + } else { + this.setData({ + skeletonLoding: false, + }) + } + } catch (error) { + console.log(error) + } + }) + }, + + toList(itemData) { + let info = itemData.currentTarget.dataset.info; + wx.navigateTo({ + url: "/packagePersonal/pages/myMassage/massageDetail/index?id=" + info.id, + }); + }, + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + if (this._freshing) return + this.setData({ + page: 1, + limit: 10, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false + }) + this._freshing = true; + this.setData({ + triggered: false, + }) + this.getDataList(false); + this._freshing = false + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + this.setData({ + bottomLoading: true, + isMoreData: false + }) + let bool = false; + if (this.data.pageTotalCount > this.data.list.length) { + bool = true; + this.setData({ + page: this.data.page + 1, + }) + } else { + setTimeout(() => { + this.setData({ + bottomLoading: false, + isMoreData: true + }) + }, 100) + return false; + } + this.getDataList(bool); + + }, + + // 鐩戝惉婊氬姩璺濈 + onPageScroll(e) { + if (e && e.scrollTop >= 1000) { + this.setData({ + isBackTop: true + }) + } else { + this.setData({ + isBackTop: false + }) + } + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/myMassage/index.json b/packagePersonal/pages/myMassage/index.json similarity index 100% rename from pages/personalCenter/myMassage/index.json rename to packagePersonal/pages/myMassage/index.json diff --git a/pages/personalCenter/myMassage/index.wxml b/packagePersonal/pages/myMassage/index.wxml similarity index 100% rename from pages/personalCenter/myMassage/index.wxml rename to packagePersonal/pages/myMassage/index.wxml diff --git a/pages/personalCenter/myMassage/index.wxss b/packagePersonal/pages/myMassage/index.wxss similarity index 100% rename from pages/personalCenter/myMassage/index.wxss rename to packagePersonal/pages/myMassage/index.wxss diff --git a/pages/personalCenter/myMassage/massageDetail/index.js b/packagePersonal/pages/myMassage/massageDetail/index.js similarity index 100% rename from pages/personalCenter/myMassage/massageDetail/index.js rename to packagePersonal/pages/myMassage/massageDetail/index.js diff --git a/pages/personalCenter/myMassage/massageDetail/index.json b/packagePersonal/pages/myMassage/massageDetail/index.json similarity index 100% rename from pages/personalCenter/myMassage/massageDetail/index.json rename to packagePersonal/pages/myMassage/massageDetail/index.json diff --git a/pages/personalCenter/myMassage/massageDetail/index.wxml b/packagePersonal/pages/myMassage/massageDetail/index.wxml similarity index 100% rename from pages/personalCenter/myMassage/massageDetail/index.wxml rename to packagePersonal/pages/myMassage/massageDetail/index.wxml diff --git a/pages/personalCenter/myMassage/massageDetail/index.wxss b/packagePersonal/pages/myMassage/massageDetail/index.wxss similarity index 100% rename from pages/personalCenter/myMassage/massageDetail/index.wxss rename to packagePersonal/pages/myMassage/massageDetail/index.wxss diff --git a/pages/personalCenter/myOrder/index.js b/packagePersonal/pages/myOrder/index.js similarity index 100% rename from pages/personalCenter/myOrder/index.js rename to packagePersonal/pages/myOrder/index.js diff --git a/pages/personalCenter/myOrder/index.json b/packagePersonal/pages/myOrder/index.json similarity index 100% rename from pages/personalCenter/myOrder/index.json rename to packagePersonal/pages/myOrder/index.json diff --git a/pages/personalCenter/myOrder/index.wxml b/packagePersonal/pages/myOrder/index.wxml similarity index 100% rename from pages/personalCenter/myOrder/index.wxml rename to packagePersonal/pages/myOrder/index.wxml diff --git a/pages/personalCenter/myOrder/index.wxss b/packagePersonal/pages/myOrder/index.wxss similarity index 100% rename from pages/personalCenter/myOrder/index.wxss rename to packagePersonal/pages/myOrder/index.wxss diff --git a/packagePersonal/pages/personalCenter/myMassage/index.js b/packagePersonal/pages/personalCenter/myMassage/index.js new file mode 100644 index 0000000..499864a --- /dev/null +++ b/packagePersonal/pages/personalCenter/myMassage/index.js @@ -0,0 +1,66 @@ +// packagePersonal/pages/personalCenter/myMassage/index.js +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packagePersonal/pages/personalCenter/myMassage/index.wxml b/packagePersonal/pages/personalCenter/myMassage/index.wxml new file mode 100644 index 0000000..59a53bf --- /dev/null +++ b/packagePersonal/pages/personalCenter/myMassage/index.wxml @@ -0,0 +1,2 @@ +<!--packagePersonal/pages/personalCenter/myMassage/index.wxml--> +<text>packagePersonal/pages/personalCenter/myMassage/index.wxml</text> \ No newline at end of file diff --git a/packagePersonal/pages/personalCenter/myMassage/massageDetail/index.js b/packagePersonal/pages/personalCenter/myMassage/massageDetail/index.js new file mode 100644 index 0000000..9727da0 --- /dev/null +++ b/packagePersonal/pages/personalCenter/myMassage/massageDetail/index.js @@ -0,0 +1,66 @@ +// packagePersonal/pages/personalCenter/myMassage/massageDetail/index.js +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packagePersonal/pages/personalCenter/myMassage/massageDetail/index.wxml b/packagePersonal/pages/personalCenter/myMassage/massageDetail/index.wxml new file mode 100644 index 0000000..c847aff --- /dev/null +++ b/packagePersonal/pages/personalCenter/myMassage/massageDetail/index.wxml @@ -0,0 +1,2 @@ +<!--packagePersonal/pages/personalCenter/myMassage/massageDetail/index.wxml--> +<text>packagePersonal/pages/personalCenter/myMassage/massageDetail/index.wxml</text> \ No newline at end of file diff --git a/packagePersonal/pages/personalCenter/publishBooks/index.js b/packagePersonal/pages/personalCenter/publishBooks/index.js new file mode 100644 index 0000000..0ae96a8 --- /dev/null +++ b/packagePersonal/pages/personalCenter/publishBooks/index.js @@ -0,0 +1,66 @@ +// packagePersonal/pages/personalCenter/publishBooks/index.js +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/bookServices/webpage/index.json b/packagePersonal/pages/personalCenter/publishBooks/index.json similarity index 100% copy from pages/bookServices/webpage/index.json copy to packagePersonal/pages/personalCenter/publishBooks/index.json diff --git a/packagePersonal/pages/personalCenter/publishBooks/index.wxml b/packagePersonal/pages/personalCenter/publishBooks/index.wxml new file mode 100644 index 0000000..2f08b04 --- /dev/null +++ b/packagePersonal/pages/personalCenter/publishBooks/index.wxml @@ -0,0 +1,2 @@ +<!--packagePersonal/pages/personalCenter/publishBooks/index.wxml--> +<text>packagePersonal/pages/personalCenter/publishBooks/index.wxml</text> \ No newline at end of file diff --git a/packagePersonal/pages/personalCenter/publishBooks/index.wxss b/packagePersonal/pages/personalCenter/publishBooks/index.wxss new file mode 100644 index 0000000..627c7d0 --- /dev/null +++ b/packagePersonal/pages/personalCenter/publishBooks/index.wxss @@ -0,0 +1 @@ +/* packagePersonal/pages/personalCenter/publishBooks/index.wxss */ \ No newline at end of file diff --git a/pages/personalCenter/publishBooks/index.js b/packagePersonal/pages/publishBooks/index.js similarity index 100% rename from pages/personalCenter/publishBooks/index.js rename to packagePersonal/pages/publishBooks/index.js diff --git a/pages/personalCenter/publishBooks/index.json b/packagePersonal/pages/publishBooks/index.json similarity index 100% rename from pages/personalCenter/publishBooks/index.json rename to packagePersonal/pages/publishBooks/index.json diff --git a/pages/personalCenter/publishBooks/index.wxml b/packagePersonal/pages/publishBooks/index.wxml similarity index 100% rename from pages/personalCenter/publishBooks/index.wxml rename to packagePersonal/pages/publishBooks/index.wxml diff --git a/pages/personalCenter/publishBooks/index.wxss b/packagePersonal/pages/publishBooks/index.wxss similarity index 100% rename from pages/personalCenter/publishBooks/index.wxss rename to packagePersonal/pages/publishBooks/index.wxss diff --git a/pages/personalCenter/sampleBooks/index.js b/packagePersonal/pages/sampleBooks/index.js similarity index 100% rename from pages/personalCenter/sampleBooks/index.js rename to packagePersonal/pages/sampleBooks/index.js diff --git a/pages/personalCenter/sampleBooks/index.json b/packagePersonal/pages/sampleBooks/index.json similarity index 100% rename from pages/personalCenter/sampleBooks/index.json rename to packagePersonal/pages/sampleBooks/index.json diff --git a/pages/personalCenter/sampleBooks/index.wxml b/packagePersonal/pages/sampleBooks/index.wxml similarity index 100% rename from pages/personalCenter/sampleBooks/index.wxml rename to packagePersonal/pages/sampleBooks/index.wxml diff --git a/pages/personalCenter/sampleBooks/index.wxss b/packagePersonal/pages/sampleBooks/index.wxss similarity index 100% rename from pages/personalCenter/sampleBooks/index.wxss rename to packagePersonal/pages/sampleBooks/index.wxss diff --git a/pages/bookServices/assort/index.js b/pages/bookServices/assort/index.js index cdb9bcf..cb500e3 100644 --- a/pages/bookServices/assort/index.js +++ b/pages/bookServices/assort/index.js @@ -181,11 +181,11 @@ if (stair) { const secondCode = `${stair.pathLinks[0].linkPath}\\${stair.id}`; wx.navigateTo({ - url: `/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&secondCode=${secondCode}`, + url: `/packageBookService/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&secondCode=${secondCode}`, }); } else { wx.navigateTo({ - url: `/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}`, + url: `/packageBookService/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}`, }); } @@ -193,7 +193,7 @@ navToSearchPage(e) { console.log(e.detail.value); wx.navigateTo({ - url: `/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&searchValue=${e.detail.value}`, + url: `/packageBookService/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&searchValue=${e.detail.value}`, }); }, }); diff --git a/pages/bookServices/assort/index.json b/pages/bookServices/assort/index.json index 56ee96c..5c4dc95 100644 --- a/pages/bookServices/assort/index.json +++ b/pages/bookServices/assort/index.json @@ -12,6 +12,6 @@ "t-radio-group": "tdesign-miniprogram/radio-group/radio-group", "t-button": "tdesign-miniprogram/button/button", "t-loading": "tdesign-miniprogram/loading/loading", - "t-image": "/components/webp-image/index" + "t-image": "tdesign-miniprogram/image/image" } -} +} \ No newline at end of file diff --git a/pages/bookServices/detail/components/testResource/testResource.js b/pages/bookServices/detail/components/testResource/testResource.js deleted file mode 100644 index e365632..0000000 --- a/pages/bookServices/detail/components/testResource/testResource.js +++ /dev/null @@ -1,133 +0,0 @@ -// pages/bookServices/detail/components/testResource/testResource.js -const app = getApp() -Component({ - /** - * 缁勪欢鐨勫睘鎬у垪琛� - */ - properties: { - list: { - type: Array, - value: [] - }, - bookInfo: { - type: Object, - value: "", - }, - mockData: { - type: Object, - value: {} - } - }, - - /** - * 缁勪欢鐨勫垵濮嬫暟鎹� - */ - data: { - selectBtn: 'test', // test mock - radioItem: 'test', - }, - - /** - * 缁勪欢鐨勬柟娉曞垪琛� - */ - methods: { - async goTest(e) { - const value = e.currentTarget.dataset.value - const token = wx.getStorageSync('jsek-token') - if (!token) { - return wx.getUserProfile({ - desc: '鐢ㄦ埛鐧诲綍', - success: (res) => { - console.log(res); - } - }) - } - // 鑾峰彇绔犺妭涓嬫槸鍚︽湁棰樼洰 - let idPathList = [] - let query = { - path: '*', - queryType: '*', - productId: this.properties.bookInfo.id, - cmsPath: value.productLinkPath, - pading: { - start: 0, - size: 999 - } - } - if (value.childrenFolderCount == 0) { - return wx.showToast({ - icon: "error", - title: '鏆傛棤鏁版嵁', - }) - } else { - const res = await app.MG.store.getProductDetail(query) - res.datas.cmsDatas[0].datas.forEach((item) => { - idPathList.push({ - id: item.id, - name: item.name, - productLinkPath: item.productLinkPath, - type: item.type - }) - }) - } - // query: { - // title: bookData.value.test, - // bookId: route.query.bookId, - // productLinkPath: data.productLinkPath, - // answerTitle: data.name, - // answerType: 'option', - // rootCmsItemId: bookData.value.rootCmsItemId, - // idPathList: JSON.stringify(idPathList) - // } - - wx.navigateTo({ - url: `/pages/bookServices/examination/examination?bookId=${this.properties.bookInfo.id}&productLinkPath=${value.productLinkPath}&rootCmsItemId=${this.properties.bookInfo.rootCmsItemId}&idPathList=${JSON.stringify(idPathList)}&answerTitle=${value.name}&answerType=${'option'}`, - }) - }, - goMycollect(e) { - const answertype = e.currentTarget.dataset.answertype - const token = wx.getStorageSync('jsek-token') - if (!token) { - return wx.getUserProfile({ - desc: '鐢ㄦ埛鐧诲綍', - success: (res) => { - console.log(res); - } - }) - } - wx.navigateTo({ - url: `/pages/bookServices/examination/examination?bookId=${this.properties.bookInfo.id}&rootCmsItemId=${this.properties.bookInfo.rootCmsItemId}&answerTitle=${'鎴戠殑鏀惰棌'}&answerType=${answertype}`, - }) - }, - // 缁冧範 缁勪欢鍒囨崲 - onRadioChange(e) { - this.setData({ - radioItem: e.detail.value - }) - }, - async getMockId() { - let id - let query = { - start: 0, - size: 99, - productId: this.properties.bookInfo.id - } - await app.MG.edu.getQuizConfigListByProduct(query).then((res) => { - id = res.datas[0].id - }) - return id - }, - // 缁勫嵎璺宠浆绛旈鐣岄潰 - async goMackPaper(e) { - // const token = localStorage.getItem('jsek-token') - // if (!token) { - // return logIn() - // } - const mockid = await this.getMockId() - const item = e.currentTarget.dataset.item - wx.navigateTo({ - url: `/pages/bookServices/examination/examination?bookId=${this.properties.bookInfo.id}&rootCmsItemId=${this.properties.bookInfo.rootCmsItemId}&answerTitle=${item.name}&answerType=${'mock'}&uuid=${item.id}&mockid=${mockid}`, - }) - } - } -}) diff --git a/pages/bookServices/detail/components/tree/index.js b/pages/bookServices/detail/components/tree/index.js deleted file mode 100644 index 3b1bd8a..0000000 --- a/pages/bookServices/detail/components/tree/index.js +++ /dev/null @@ -1,256 +0,0 @@ - -import Message from 'tdesign-miniprogram/message/message'; -const util = require('./components/util') // 寮曞叆灏佽杩囩殑鍔犺浇鎻愮ず -const app = getApp() -Component({ - properties: { - treeList: { - type: Array, - value: [] - }, - bookInfo: { - type: Object, - value: {} - }, - buyIds: { - type: Array, - value: [] - }, - tab: { - type: String, - value: '' - }, - applyState: { - type: String, - value: '' - }, - openTeachids: { - type: Array, - value: '' - }, - openLearnids: { - type: Array, - value: "" - } - }, - data: { - activeValues: [0], - webpageSrc: '' - }, - onShow() { - - }, - - - methods: { - // 鑺傜偣灞曞紑 - handleChange(e) { - this.setData({ - activeValues: e.detail.value, - }); - console.log('浼犻��', this.properties.buyIds); - }, - handleCheck(data) { - for (let index = 0; index < data.length; index++) { - const element = data[index]; - element.checked = true - if (element.childrenCount && element.type == "productFolder") { - handleCheck(element.children) - } - } - }, - downloadTeach(e) { - const value = e.currentTarget.dataset.value - var myEventDetail = { - value, - } // detail瀵硅薄锛屾彁渚涚粰浜嬩欢鐩戝惉鍑芥暟 - var myEventOption = { - bubbles: true, - composed: true - } // 瑙﹀彂浜嬩欢鐨勯�夐」 - this.triggerEvent('downloadTeach', myEventDetail, myEventOption) - - }, - // 鍒ゆ柇璧勬簮鏄惁璐拱 - resourceIsBuy(data) { - if (data.saleMethod && data.saleMethod.length) { - const isSHow = buyIdList.value.some((item) => item == data.saleMethod[0].Id) - return !isSHow - } else { - return false - } - }, - // 璺宠浆闊宠棰戞挱鏀惧櫒 - goPlayer(e) { - const item = e.currentTarget.dataset.item - const parent = e.currentTarget.dataset.parent - // "pages/resourceDetails/myAudio/index", - // "pages/resourceDetails/myVideo/index", - // "pages/resourceDetails/document/index", - - - - let url - if (item.selectType == 'video') { - url = '/pages/resourceDetails/myVideo/index' - } else if (item.selectType == 'audio') { - url = '/pages/resourceDetails/myAudio/index' - } else if (item.selectType == 'picture' || item.selectType == 'zip') { - url = '/pages/resourceDetails/document/index' - } - - // else { - // - // } - wx.navigateTo({ - url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parent.productLinkPath}&parentName=${parent.name}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}`, - }) - - - if (item.selectType == 'document' || item.selectType == 'pdf') { - const fileLink = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file - console.log(fileLink, 'fileLink'); - //鎻愮ず鍔犺浇涓� - util.showLoading() - // 鍗曟涓嬭浇鍏佽鐨勬渶澶ф枃浠朵负 200MB - wx.downloadFile({ - url: fileLink, // 鍦板潃宸叉墦鐮侊紝鑷繁鎹釜鍏朵粬鐨勫湴鍧�锛�"https://www.xxxxx.com/file/娴嬭瘯閫氱煡.pdf"锛� - success: function (res) { - console.log(res, "wx.downloadFile success res") - if (res.statusCode != 200) { - util.hideLoadingWithErrorTips() - return false - } - var Path = res.tempFilePath //杩斿洖鐨勬枃浠朵复鏃跺湴鍧�锛岀敤浜庡悗闈㈡墦寮�鏈湴棰勮鎵�鐢� - wx.openDocument({ - filePath: Path, - showMenu: true, - success: function (res) { - console.log('鎵撳紑鎴愬姛'); - util.hideLoading() - } - }) - }, - fail: function (err) { - console.log(err, "wx.downloadFile fail err"); - util.hideLoadingWithErrorTips() - } - }) - - - } - - if (item.selectType == 'webpage') { - console.log(11); - this.setData({ - webpageSrc: item.jsek_link - }) - console.log(this.data.webpageSrc, 'webpageSrc'); - } - - - - }, - // 鎷垮埌鎵�鏈夐」 - getAllChildren(id) { - let result = []; - function findChildren(item) { - if (item.id === id) { - if (item.children && item.children.length > 0) { - item.children.forEach(child => { - findChildren(child); - }); - } - } else { - if (item.children && item.children.length > 0) { - item.children.forEach(child => { - findChildren(child); - }); - } - } - if (item.children && item.children.length > 0) { - result.push(...item.children); - } - } - console.log(this.properties.treeList); - this.properties.treeList.forEach(item => { - findChildren(item); - }); - return result; - }, - // 鎷垮埌褰撳墠椤瑰瓙椤� - flattenTree(tree) { - let result = []; - function flatten(node) { - result.push(node); - if (node.children && node.children.length > 0) { - node.children.forEach(child => { - flatten(child); - }); - } - } - tree.forEach(node => { - flatten(node); - }); - return result - }, - findAndUpdateItemById(tree, id) { - function findAndUpdate(node) { - if (node.id === id) { - node.check = true; // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true - return true; // 杩斿洖 true 琛ㄧず鎵惧埌浜嗙洰鏍囬」 - } - if (node.children && node.children.length > 0) { - for (let child of node.children) { - if (findAndUpdate(child)) { - return true; // 濡傛灉鍦ㄥ瓙鑺傜偣涓壘鍒颁簡鐩爣椤癸紝鍒欑洿鎺ヨ繑鍥� true - } - } - } - return false; // 琛ㄧず鏈壘鍒扮洰鏍囬」 - } - - for (let node of tree) { - if (findAndUpdate(node)) { - break; // 濡傛灉鍦ㄩ《灞傝妭鐐逛腑鎵惧埌浜嗙洰鏍囬」锛岀洿鎺ラ��鍑哄惊鐜� - } - } - }, - // 鍙樹负true - findAndUpdateItemsByIds(tree, ids) { - function findAndUpdate(node) { - if (ids.includes(node.id)) { - node.checked = true; // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true - } - if (node.children && node.children.length > 0) { - for (let child of node.children) { - findAndUpdate(child); // 閫掑綊澶勭悊瀛愯妭鐐� - } - } - } - - for (let node of tree) { - findAndUpdate(node); // 瀵规瘡涓《灞傝妭鐐规墽琛屾煡鎵惧拰鏇存柊鎿嶄綔 - } - return tree; // 杩斿洖淇敼鍚庣殑瀹屾暣鏁扮粍 - }, - // 绔犺妭鍕鹃�� - checkResourceTitle(e) { - const item = e.currentTarget.dataset.item - console.log(item, 'item'); - let list = this.flattenTree([item]) - let ids = [] - list.forEach(item => { - ids.push(item.id) - }) - const tab = this.findAndUpdateItemsByIds([item], ids) - console.log(ids, tab); - } - }, - onCloudShoppingCart() { - console.log(this.properties.treeList); - }, - oncheckbox() { - console.log(111); - } -}) \ No newline at end of file diff --git a/pages/bookServices/detail/components/tree/index.json b/pages/bookServices/detail/components/tree/index.json deleted file mode 100644 index d1ab1ff..0000000 --- a/pages/bookServices/detail/components/tree/index.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon", - "t-image": "tdesign-miniprogram/image/image", - "t-collapse": "tdesign-miniprogram/collapse/collapse", - "t-collapse-panel": "tdesign-miniprogram/collapse-panel/collapse-panel", - "t-button": "tdesign-miniprogram/button/button", - "t-checkbox": "tdesign-miniprogram/checkbox/checkbox", - "tree": "/pages/bookServices/detail/components/tree/index" - } -} \ No newline at end of file diff --git a/pages/bookServices/detail/index.js b/pages/bookServices/detail/index.js deleted file mode 100644 index 406ce39..0000000 --- a/pages/bookServices/detail/index.js +++ /dev/null @@ -1,1120 +0,0 @@ -// pages/bookServices/detail/index.js -import Message from 'tdesign-miniprogram/message/index.js'; -import Toast from 'tdesign-miniprogram/toast/index'; -const app = getApp(); -Page({ - /** - * 椤甸潰鐨勫垵濮嬫暟鎹� - */ - data: { - bookId: '', - barHeight: '', - navBarHeight: '', - options: { - id: '', - name: '', - }, - bookDetail: {}, - link: { - jd: '', - tamll: '', - dang: '', - micro: '', - }, - tabValue: 'brief', - cmsDatas: [], // 璧勬簮refCode鍒楄〃 - ids: [1], - list: [], - teachResources: [], - teach: [], - learn: [], - test: [], - openTeachids: [], - openLearnids: [], - openTestids: [], - resourceClassList: [], // 璧勬簮鎵�灞炲垎绫� - applyState: "", // 鏁欏璧勬簮鐢宠鐘舵�� - deadline: "", // 鏁欏璧勬簮鐢宠鏈夋晥鏃ユ湡 - rejectCause: "", // 涓嬭浇鎷掔粷鍘熷洜 - buyIdList: [], - shoppingCartGetId: [], // 宸茶喘涔癷d鍒楄〃 - shoppingList: [], - loading: false, - isShowTeachDownload: false, // 鎻愮ずPC涓嬭浇寮圭獥鐘舵�� - confirmBtn: { content: '鎴戠煡閬撲簡', variant: 'base' }, - mockData: { - id: 0, // 閿�鍞甶d - price: 0, // 鍞环 - count: 0, // 缁勫嵎宸茶喘涔版鏁� - useCount: 0, // 缁勪欢宸蹭娇鐢ㄦ鏁� - residue: 0, // 缁勫嵎鍓╀綑娆℃暟 - mockList: [] // 鐢ㄦ埛缁勫嵎鎻愪氦淇℃伅 - } - }, - - - resetTree: function (e) { - this.setData({ - currentCheck: e.detail.checkedItem, - list: e.detail.changeList - }) - }, - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - onLoad(options) { - const systInfo = wx.getSystemInfoSync(); - const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 - const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� - this.setData({ - bookId: options.id, - barHeight: systInfo.statusBarHeight, - navBarHeight: navBarHeight, - }); - this.setData({ - options: { - id: options.id, - name: options.name, - }, - }); - this.getBookInfo(options.id); - this.getResourceClass() // 鑾峰彇璧勬簮鎵�灞炲垎绫� - const token = wx.getStorageSync('jsek-token') - if (token) { - this.getShoppingCartProductGet() - this.getApplyInfo(options.id) - this.getMockData() - } - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 - */ - onReady() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず - */ - onShow() { }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 - */ - onHide() { }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 - */ - onUnload() { }, - - /** - * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 - */ - onPullDownRefresh() { - - - }, - - /** - * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� - */ - onReachBottom() { - if (this.data.tabValue == 'jesk_note') { - const child = this.selectComponent('#note') - child.onReachBottom() - } - }, - - /** - * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� - */ - onShareAppMessage() { }, - // 鏍煎紡鍖栨棩鏈� - formatDate(dateString) { - if (!dateString) { - return 'Invalid date'; - } - const match = dateString.match(/^(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/); - if (!match) { - throw new Error('Invalid date format'); - } - - const [, year, month, day, hours, minutes, seconds] = match; - const date = new Date( - parseInt(year, 10), - parseInt(month, 10) - 1, - parseInt(day, 10), - parseInt(hours, 10), - parseInt(minutes, 10), - parseInt(seconds, 10), - ); - - if (isNaN(date.getTime())) { - throw new Error('Invalid date'); - } - - // 鐢变簬灏忕▼搴忕幆澧冨彲鑳戒笉鏀寔 Intl.DateTimeFormat锛屾垜浠娇鐢ㄧ畝鍖栫殑鏍煎紡鍖栨柟娉� - const formatted = `${year}骞�${this.formatMonth(month)}`; - return formatted; - }, - // 绠�鍖栫殑鏈堜唤鏍煎紡鍖栧嚱鏁帮紝杩斿洖鏈堜唤鐨勪腑鏂囪〃杈� - formatMonth(month) { - const months = ['1鏈�', '2鏈�', '3鏈�', '4鏈�', '5鏈�', '6鏈�', '7鏈�', '8鏈�', '9鏈�', '10鏈�', '11鏈�', '12鏈�']; - return months[parseInt(month, 10) - 1]; - }, - // 閲戦鏄剧ず.00鏍煎紡 - numFormat(value) { - if (!value) return '0.00'; - value = Number(value).toFixed(2); - var intPart = Math.trunc(value); // 鑾峰彇鏁存暟閮ㄥ垎 - var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); // 灏嗘暣鏁伴儴鍒嗛�笁涓�鏂� - var floatPart = '.00'; // 棰勫畾涔夊皬鏁伴儴鍒� - var value2Array = value.split('.'); - // =2琛ㄧず鏁版嵁鏈夊皬鏁颁綅 - if (value2Array.length === 2) { - floatPart = value2Array[1].toString(); // 鎷垮埌灏忔暟閮ㄥ垎 - if (floatPart.length === 1) { - return `${intPartFormat}.${floatPart}0`; - } - return `${intPartFormat}.${floatPart}`; - } - return intPartFormat + floatPart; - }, - // 杩斿洖 - goBack() { - wx.navigateBack(); - }, - // 鑾峰彇鍥句功璇︽儏 - getBookInfo(id) { - this.setData({ - "mockData'.id": 0, - "mockData.price": 0, - "mockData.count": 0 - }) - const query = { - path: '*', - queryType: '*', - productId: id, - favoriteTypes: 'FavoriteBookCity', - itemFields: { - 'SysType=': 'CmsFolder', - }, - coverSize: { - height: 300, - }, - fields: { - seriesName: [], - author: [], - isbn: [], - publicationDate: [], - bookClassification: [], - paperPrice: [], - JDLink: [], - tmallLink: [], - dangdangLink: [], - weidianLink: [], - content: [], - authorIntroduction: [], - // isApplyPaperBook: [], - // isApplyEBook: [], - isApplyBook: [], - isSell: [], - pdf: [], - protectedEpub: [], - probationPage: [], //pdf璇曡椤垫暟 - freeEpubPage: [], //epub璇曡鐧惧垎姣� - }, - }; - app.MG.store.getProductDetail(query).then(async (res) => { - console.log(res.datas); - this.setData({ - bookDetail: res.datas, - cmsDatas: res.datas.cmsDatas[0].datas, - buyIdList: res.datas.purchasedSaleMethodIdList - }); - // 鑾峰彇鍥句功鍒嗙被 - const iconType = JSON.parse(res.datas.bookClassification)[0][0]; - const classType = JSON.parse(res.datas.bookClassification)[0][1]; - const className = await this.getBookClass(iconType, classType) - // 鑾峰彇缁勫嵎閿�鍞甶d - if (res.datas.saleMethod && res.datas.saleMethod.length) { - res.datas.saleMethod.forEach((item) => { - if (item.SaleType == 'combinationTestPaper') { - this.setData({ - 'mockData.id': item.Id, - 'mockData.price': item.Price - }) - } - }) - } - // 鑾峰彇缁勫嵎宸茶喘涔版鏁� - if (res.datas.purchasedSaleMethodIdList && res.datas.purchasedSaleMethodIdList.length) { - if (this.data.mockData.id) { - let count = res.datas.purchasedSaleMethodIdList.filter( - (item) => item == this.data.mockData.id - ).length - this.setData({ - 'mockData.count': count - }) - } - } - console.log('缁勫嵎淇℃伅', this.data.mockData); - this.setData({ - 'bookDetail.publicationDate': this.formatDate(this.data.bookDetail.publicationDate), - 'bookDetail.class': className, - 'bookDetail.price': this.numFormat(this.data.bookDetail.price), - 'bookDetail.oldPrice': this.numFormat(this.data.bookDetail.oldPrice), - 'bookDetail.paperPrice': this.numFormat(this.data.bookDetail.paperPrice), - }); - }); - - }, - // 鑾峰彇鍥句功鍒嗙被 - async getBookClass(iconType, classType) { - let name = ''; - const query = { - refCodes: ['bookClassification'], - }; - await app.MG.store.getProductTypeField(query).then((res) => { - JSON.parse(res[0].config).option.forEach((item) => { - if (item.value == iconType) { - item.child.forEach((citem) => { - if (citem.value == classType) { - name = citem.name; - } - }); - } - }); - }); - return name; - }, - // 鏀惰棌 - setCollect() { - if (this.data.bookDetail.isFavourite) { - app.MG.store - .delProductLink({ - productIds: [this.data.bookDetail.id], - linkType: 'FavoriteBookCity', - }) - .then(() => { - this.setData({ - 'bookDetail.isFavourite': false - }) - Message.success({ - context: this, - offset: [20, 32], - duration: 5000, - content: '杩欐槸涓�鏉℃垚鍔熺殑鎻愮ず娑堟伅', - }); - }); - } else { - const params = { - productIds: [this.data.bookDetail.id], - linkType: 'FavoriteBookCity', - }; - app.MG.store.addProductLink(params).then((res) => { - this.setData({ - 'bookDetail.isFavourite': true - }) - Message.success({ - context: this, - offset: ['20rpx', '32rpx'], - duration: 2000, - content: '鏀惰棌鎴愬姛', - }); - }); - } - }, - // 鎴戣寤鸿 - suggestBtn() { - const child = this.selectComponent('#suggest-component') - child.showDialog() - }, - // 璺宠浆缃戝簵 - goShop(e) { - const { link } = e.currentTarget.dataset; - wx.navigateTo({ - url: `/pages/bookServices/webpage/index?url=${link}`, - }) - }, - onTabsChange(e) { - this.setData({ - tabValue: e.detail.value - }) - if (e.detail.label == '鏁欏璧勬簮' || e.detail.label == '浜戝涔�' || e.detail.label == '浜戞祴璇�') { - const checkData = this.data.cmsDatas.find(item => item.refCode == e.detail.value) - if (checkData) { - if ((e.detail.value == 'jsek_teachingResources' && !this.data.teach.length) - || (e.detail.value == 'jsek_cloudLearning' && !this.data.learn.length) - || (e.detail.value == 'questionBank' && !this.data.test.length)) { - this.getResourceData(checkData) - } - - } - } else if (e.detail.label == '浜戠瑪璁�') { - const token = wx.getStorageSync('jsek-token') - const child = this.selectComponent('#note') - child.handleSubmitTitle() - if (token) { - child.changeLoading() - child.getNoteList() - } - - } - }, - // 鑾峰彇璧勬簮鎵�灞炲垎绫� - getResourceClass() { - let query = { - refCodes: ['resourcesClassification'] - } - app.MG.store.getProductTypeField(query).then((res) => { - this.setData({ - resourceClassList: JSON.parse(res[0].config).option - }) - }) - }, - // 鑾峰彇鏁欏璧勬簮 浜戝涔� 浜戞祴璇� - getResourceData(type) { - this.setData({ - loading: true - }) - let query = { - path: '*', - queryType: '*', - productId: this.data.bookDetail.id, - cmsPath: type.productLinkPath, - itemFields: { - SysType: 'CmsFolder', - // 璧勬簮绫诲瀷锛岃瘯璇绘枃浠讹紝鏄惁鍏佽涓嬭浇绛夊弬鏁� - selectType: [], - freeFile: [], - file: [], - resourcesClassification: [], - isDownload: [], - jsek_resourceBrief: [], - jsek_link: [], - jsek_questionBank: [] - }, - pading: { - start: 0, - size: 999 - }, - } - app.MG.store - .getProductDetail(query) - .then(async (res) => { - // 浜戞祴璇曪紝閫掑綊璇锋眰閲屽眰鏁版嵁 - if (type.refCode == 'questionBank') { - const data = res.datas.cmsDatas[0].datas.filter( - (item) => item.refCode == 'jsek_questionBank' - ) - if (data.length) return this.getResourceData(data[0]) - } - //鏁欏璧勬簮 浜戝涔� - if (type.refCode == 'jsek_teachingResources' || type.refCode == 'jsek_cloudLearning') { - if (res.datas.cmsDatas[0].datas.length > 0) { - if (type.refCode == 'jsek_teachingResources') { - res.datas.cmsDatas[0].datas.forEach(item => { - item.checked = false - }) - const list = await this.getAllResource(res.datas.cmsDatas[0].datas) - - console.log(list, 'list'); - this.setData({ - teach: list, - loading: false - }) - this.findChildIds(this.data.teach, this.data.openTeachids = []) - } else if (type.refCode == 'jsek_cloudLearning') { - const list = await this.getAllResource(res.datas.cmsDatas[0].datas) - this.setData({ - learn: list, - loading: false - }) - this.findChildIds(this.data.learn, this.data.openLearnids = []) - } - } else { - // 鏃犳暟鎹� - } - } else if (type.refCode == 'jsek_questionBank') { - // const list = await this.getAllResource(res.datas.cmsDatas[0].datas) - this.setData({ - test: res.datas.cmsDatas[0].datas, - loading: false - }) - } else { - console.log('鍏朵粬'); - } - }) - .catch((e) => { - console.log(e) - }) - }, - // 鑾峰彇tag涓嬫墍鏈夎祫婧� - async getAllResource(data) { - if (!data.length) return false - for (let i = 0; i < data.length; i++) { - let item = data[i] - if (item.sysType == 'CmsFolder' && item.childrenCount > 0) { - item.children = [] - item.children = await this.getFolderItem(item.productLinkPath) - await this.getAllResource(item.children) - } - } - return data - }, - // 鑾峰彇璧勬簮鎺ュ彛 - async getFolderItem(path) { - let query = { - path: '*', - queryType: '*', - productId: this.data.bookDetail.id, - cmsPath: path, - itemFields: { - SysType: 'CmsFolder', - // 璧勬簮绫诲瀷锛岃瘯璇绘枃浠讹紝鏄惁鍏佽涓嬭浇绛夊弬鏁� - selectType: [], - freeFile: [], - file: [], - protectedFile: [], - resourcesClassification: [], - isDownload: [], - jsek_resourceBrief: [], - jsek_link: [], - accessType: [] - }, - pading: { - start: 0, - size: 999 - }, - } - const data = await app.MG.store.getProductDetail(query) - data.datas.cmsDatas[0].datas.forEach((item) => { - this.data.resourceClassList.forEach((type) => { - if (type.value == item.resourcesClassification) item.resourceClass = type.name - }) - // 缃戦〉 涓嶈兘涓嬭浇 绉佹湁鏂囦欢 - if (item.sysType == 'CmsItem') { - if (item.selectType == 'webpage') { - item.disabled = true - } else { - if (item.isDownload != 1) { - item.disabled = true - } - } - if (item.file) { - if (item.fileMap[item.file].protectType == 'Private') item.disabled = true - } - } - }) - data.datas.cmsDatas[0].datas.forEach(item => { - if (this.data.tabValue == 'jsek_teachingResources') { - item.checked = false - } else if (this.data.tabValue == 'jsek_cloudLearning') { - item.isbuy = this.resourceIsBuy(item) - item.isShopCar = this.isShoppingCart(item) - } - }) - return data.datas.cmsDatas[0].datas - }, - // 鑾峰彇灞曞紑椤� - findChildIds(data, result) { - let index = 0 - for (let i = 0; i < data.length; i++) { - if (index < 3) { - const item = data[i] - if (item.childrenFolderCount > 0) { - result.push(item.id) - for (let j = 0; j < item.children.length; j++) { - if (index < 3) { - const childrenItme = item.children[j] - if (item.childrenCount > 0) { - result.push(childrenItme.id) - index += 1 - } - } else { - break - } - } - } else if (item.childrenCount > 0) { - result.push(item.id) - index += 1 - } - } else { - break - } - } - }, - - // 鍥句功娣诲姞璐墿杞� - async addBookShopcCar() { - const shoppingCartGetId = [] - - let query = { - start: 0, - size: 999, - filterList: [], - searchList: [] - } - const res = await app.MG.store.getShoppingCartProductList(query) - res.datas.forEach((item) => { - shoppingCartGetId.push(item.saleMethod.id) - }) - console.log(shoppingCartGetId, 'shoppingCartGetId'); - console.log(this.data.bookDetail.defaultSaleMethodId, 'this.data.bookDetail.defaultSaleMethodId'); - const determine = shoppingCartGetId.some((item) => item == this.data.bookDetail.defaultSaleMethodId) - console.log(determine); - - if (!determine) { - let query = { - requests: [ - { - saleMethodId: this.data.bookDetail.defaultSaleMethodId, - storeEventId: null, - agentCode: '鐢靛瓙涔�' - } - ] - } - const addRes = app.MG.store.addShoppingCart(query) - this.showSuccessToast() - - } else { - Toast({ - context: this, - selector: '#t-toast', - message: '宸叉坊鍔�', - theme: 'success', - direction: 'column', - }); - } - - }, - - showSuccessToast() { - Toast({ - context: this, - selector: '#t-toast', - message: '娣诲姞鎴愬姛', - theme: 'success', - direction: 'column', - }); - }, - - - - async buyBook() { - let bookOrdersId = '' - let query = { - remarks: '鐢靛瓙涔�', - requests: [ - { - saleMethodId: this.data.bookDetail.defaultSaleMethodId, - count: 1 - } - ] - } - // 鍙戣捣璁㈠崟鍒濆鍖栬姹傚苟绛夊緟缁撴灉 - const res = await app.MG.store.initOrder(query) - // 鑾峰彇璁㈠崟鍙峰苟璧嬪�肩粰 orderNumber.value - bookOrdersId = res.orderNumber - console.log(bookOrdersId); - // 妫�鏌ヨ鍗曞彿鏄惁瀛樺湪 - if (bookOrdersId) { - const url = '/pages/cart/paymentPage/index?orderNumber=' + bookOrdersId - wx.navigateTo({ - url - }) - } else { - console.log(222); - } - - }, - - // 鑾峰彇鏁欏璧勬簮涓嬭浇鏄惁鐢宠閫氳繃 - getApplyInfo(id) { - // 鑾峰彇褰撳墠鏃堕棿 - const currentDate = new Date() - let query = { - sort: { - type: 'Desc', - field: 'CreateDate' - }, - start: 0, - size: 99999, - appRefCode: app.config.appRefCode, - topicIdOrRefCode: 'productDownLoad' - } - app.MG.ugc.getTopicMessageList(query).then((res) => { - const applyResource = res.datas.find((item) => { - let content = [] - try { - content = JSON.parse(item.content) - } catch (error) { - content = [] - } - if (Array.isArray(content)) return content.find((citem) => citem.id == id) - return false - }) - // 鏈夌敵璇疯褰� - if (applyResource) { - if (applyResource.state == 'Reject') { - this.setData({ - rejectCause: JSON.parse(applyResource.feedBack).reason, - applyState: 'Reject' - }) - } else if (applyResource.state == 'Normal') { - const endDate = JSON.parse(applyResource.feedBack).endDate - // const endDate = new Date(JSON.parse(applyResource.feedBack).endDate + ' 23:59:59').getTime() - if (endDate == '姘镐箙') { - this.setData({ - applyState: 'Normal', - deadline: '姘镐箙', - }) - console.log('鏈夋晥鏃ユ湡', this.data.deadline); - } else { - - let endTime = new Date(endDate + ' 23:59:59').getTime() - this.setData({ - deadline: endDate + ' 23:59:59' - }) - if (currentDate.getTime() < endTime) { - // 鏈秴鏃� - this.setData({ - applyState: 'Normal' - }) - } else { - this.setData({ - applyState: 'none' - }) - } - } - } else { - this.setData({ - applyState: applyResource.state - }) - } - } else { - this.setData({ - applyState: 'none' - }) - } - }) - console.log('鏈夋晥鏃ユ湡', this.data.deadline); - }, - // 鐢宠鏁欏璧勬簮 - applyResource() { - // let role = userStore.userInfo ? userStore.userInfo.role : null - // if (role) { - // if (role == 'Teacher') { - // 鐢宠鏁欏璧勬簮 - let query = { - topicIdOrRefCode: 'productDownLoad', - type: 'applyForDownload', - state: 'WaitAudit', - cmsTypeRefCode: '', - newDataListRequest: [], - name: this.data.bookDetail.name, // name涓虹敵璇风殑涔︽湰鍚嶇О - content: JSON.stringify([ - { - name: this.data.bookDetail.name, - id: this.data.bookDetail.id, - // defaultSaleMethodId: bookData.value.defaultSaleMethodId, - icon: this.data.bookDetail.icon - } - ]) - } - app.MG.ugc.newTopicMessage(query).then((res) => { - if (res) { - Message.success('鐢宠宸叉彁浜わ紝璇峰緟瀹℃牳閫氳繃鍚庝笅杞�') - } - this.getApplyInfo(this.data.bookDetail.id) - }) - // } else { - // ElMessageBox.confirm('璇峰厛杩涜鏁欏笀璁よ瘉锛�', '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', { - // confirmButtonText: '鍘昏璇�', - // cancelButtonText: '鍙栨秷', - // type: 'warning' - // }) - // .then(() => { - // isShow.value = true - // }) - // .catch(() => { }) - // } - // } else { - // // logIn() - // } - }, - // 鏁欏璧勬簮涓嬭浇鍓嶅線PC鎻愮ずDiialog - closeTeachDownload() { - this.setData({ - isShowTeachDownload: false - }) - }, - // 涓嬭浇鍔熻兘 - downloadTeach(e) { - this.setData({ - isShowTeachDownload: true - }) - console.log('zhuan', this.data.isShowTeachDownload); - // const data = e.detail.value - // // const data - // // let role = userStore.userInfo ? userStore.userInfo.role : null - // // if (role) { - // // if (role == 'Teacher') { - // if (this.properties.applyState == 'Normal' || this.properties.applyState == 'none') { - // // 鏄惁鍏佽涓嬭浇 - // if (data.isDownload == 1) { - // // 鐢宠閫氳繃 - // let url = app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' - // if (data.file) { - // // 鍒ゆ柇鏄惁绉佹湁 - // if (data.fileMap[data.file].protectType == 'Private') - // return Message.error({ - // context: this, - // offset: ['20rpx', '32rpx'], - // duration: 5000, - // content: '璇ユ枃浠舵棤娉曚笅杞�' - // }) - // url = url + data.file + '&token=' + wx.getStorageSync('jsek-token') - // } else if (data.freeFile) { - // url = url + data.freeFile + '&token=' + wx.getStorageSync('jsek-token') - // } else { - // Message.error({ - // context: this, - // offset: ['20rpx', '32rpx'], - // duration: 5000, - // content: '鏆傛棤璧勬簮', - // }) - // } - // this.downloadFile(url) - // } else { - // Message.error({ - // context: this, - // offset: ['20rpx', '32rpx'], - // duration: 5000, - // content: '璇ヨ祫婧愭棤娉曚笅杞�', - // }) - // } - // } else if (this.properties.applyState == 'WaitAudit') { - // // ElMessageBox.confirm('璇峰厛鐢宠涓嬭浇锛�', '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', { - // // confirmButtonText: '鐢宠', - // // cancelButtonText: '鍙栨秷', - // // type: 'warning' - // // }) - // // .then(() => applyBookInfo()) - // // .catch() - // Message.error({ - // context: this, - // offset: ['20rpx', '32rpx'], - // duration: 5000, - // content: '璇ヨ祫婧愪笅杞界敵璇峰鏍镐腑', - // }) - // } else if (this.properties.applyState == 'Reject') { - // Message.error({ - // context: this, - // offset: ['20rpx', '32rpx'], - // duration: 5000, - // content: '璧勬簮涓嬭浇鐢宠鏈�氳繃' - // }) - - // } else { - // // Message.error({ - // // context: this, - // // offset: ['20rpx', '32rpx'], - // // duration: 5000, - // // content: '璇峰厛鐢宠涓嬭浇' - // // }) - // console.log('璇峰厛鐢宠涓嬭浇'); - // } - // // } else { - // // ElMessageBox.confirm('璇峰厛杩涜鏁欏笀璁よ瘉锛�', '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', { - // // confirmButtonText: '鍘昏璇�', - // // cancelButtonText: '鍙栨秷', - // // type: 'warning' - // // }) - // // .then(() => { - // // isShow.value = true - // // }) - // // .catch(() => { }) - // // } - // // } else { - // // logIn() - // // } - }, - downloadFile(url) { - wx.downloadFile({ - url: url, - success: function (res) { - // 涓嬭浇鎴愬姛鍚庯紝璋冪敤saveImageToPhotosAlbum鍑芥暟淇濆瓨鍥剧墖鍒版湰鍦� - wx.saveFile({ - tempFilePath: res.tempFilePath, - success: function (res) { - wx.showToast({ - title: '涓嬭浇鎴愬姛', - icon: 'success' - }) - }, - fail: function (res) { - wx.showToast({ - title: '涓嬭浇澶辫触', - icon: 'none' - }) - } - }) - }, - fail: function (res) { - wx.showToast({ - title: '涓嬭浇澶辫触', - icon: 'none' - }) - } - }) - }, - // 鍒ゆ柇璧勬簮鏄惁璐拱 - resourceIsBuy(data) { - if (data.saleMethod && data.saleMethod.length) { - const isSHow = this.data.buyIdList.some((item) => item == data.saleMethod[0].Id) - return !isSHow - } else { - return false - } - }, - // 鑾峰彇宸茶喘涔板晢鍝� - getShoppingCartProductGet() { - let query = { - start: 0, - size: 999, - filterList: [], - searchList: [] - } - app.MG.store.getShoppingCartProductList(query).then((res) => { - const list = [] - res.datas.forEach((item) => { - list.push(item.saleMethod.id) - }) - this.setData({ - shoppingList: res.datas, - shoppingCartGetId: list - }) - }) - }, - // 鍒ゆ柇璧勬簮鍔犲叆璐墿杞︽寜閽槸鍚︽樉绀� - isShoppingCart(data) { - if (data.saleMethod && data.saleMethod.length) { - if (data.saleMethod[0].Price <= 0) return false - // 鍐嶅垽鏂槸鍚﹁喘涔� - const isBuy = this.data.buyIdList.some((item) => item == data.saleMethod[0].Id) - if (isBuy) { - // 璐拱浜� - return false - } else { - // 鍒ゆ柇鏄惁鍔犲叆璐墿杞� - const isSHow = this.data.shoppingCartGetId.some((item) => item == data.saleMethod[0].Id) - return !isSHow - } - } else { - return false - } - }, - // 閬嶅巻鏍戠粨鏋勮浆鎹负鏁扮粍鏂规硶 - handleTreeData(array) { - const flattenedArray = [] - array.forEach((node) => { - // 灏嗗綋鍓嶈妭鐐规坊鍔犲埌灞曞紑鐨勬暟缁勪腑 - flattenedArray.push(node) - // 閫掑綊澶勭悊瀛愯妭鐐� - if (node.children && node.children.length > 0) { - const childrenArray = this.handleTreeData(node.children) - flattenedArray.push(...childrenArray) - } - }) - return flattenedArray.filter((item) => item.sysType == 'CmsItem') - }, - // 浜戝涔犱竴閿鍙� - async getFreeResource() { - const child = this.selectComponent('#learn-resource') - const token = wx.getStorageSync('jsek-token') - if (!token) { - return wx.getUserProfile({ - desc: '鐢ㄦ埛鐧诲綍', - success: (res) => { - console.log(res); - } - }) - } - let arr = this.handleTreeData(this.data.learn).filter((item) => this.resourceIsBuy(item)) - let freeIds = arr.filter((item) => { - return item.saleMethod[0].Price == 0 - }) - if (!freeIds.length) return wx.showToast({ - icon: "error", - title: '鏆傛棤鍏嶈垂璧勬簮', - }) - child.changeReceive(true) - let requests = [] - freeIds.forEach((item, index) => { - if (this.resourceIsBuy(item)) { - requests.push({ - saleMethodId: item.saleMethod[0].Id, - count: 1 - }) - } - }) - - let query = { - remarks: '浜戝涔�', - requests, - } - try { - const initOrderRes = await app.MG.store.initOrder(query) - let parameter = { - orderNum: initOrderRes.orderNumber - } - // 纭璁㈠崟 - const confirmOrderRes = await app.MG.store.confirmOrder(parameter) - if (confirmOrderRes.orderNumber) { - child.changeReceive(false) - wx.showToast({ - title: '棰嗗彇鎴愬姛', - }) - this.getBookInfo(this.data.bookId) - } - } catch (error) { - console.log(error) - } - }, - // 浜戝涔犱竴閿喘涔� - async allAddShoppiingCar() { - const child = this.selectComponent('#learn-resource') - const token = wx.getStorageSync('jsek-token') - if (!token) { - return wx.getUserProfile({ - desc: '鐢ㄦ埛鐧诲綍', - success: (res) => { - console.log(res); - } - }) - } - let shopList = this.handleTreeData(this.data.learn).filter((item) => this.resourceIsBuy(item)) - this.getShoppingCartProductGet() - if (!shopList.length) return wx.showToast({ - icon: "error", - title: '宸插叏閮ㄨ喘涔�', - }) - child.changeBuy(true) - let requests = [] - shopList.forEach((item) => { - requests.push({ - saleMethodId: item.saleMethod[0].Id, - count: 1, - }) - }) - let query = { - remarks: '浜戝涔�', - requests, - } - const initOrderRes = await app.MG.store.initOrder(query) - child.changeBuy(false) - // 妫�鏌ヨ鍗曞彿鏄惁瀛樺湪 - if (initOrderRes.orderNumber) { - // bookService: orderNumber.value, 灏戜紶杩欎釜 锛屾殏鏃朵笉鐭ラ亾鏈変粈涔堢敤 - wx.navigateTo({ - url: `/pages/cart/paymentPage/index?&bookId=${this.data.bookDetail.id}&bookName=${this.data.bookDetail.name}&orderNumber=${initOrderRes.orderNumber}`, - }) - } else { - // 璁㈠崟鍙蜂笉瀛樺湪锛屾樉绀鸿鍛婃秷鎭� - wx.showToast({ - icon: "error", - title: '璇烽噸璇�', - }) - } - }, - // 鍙樹负鎵�鏈塩heck true - findAndUpdateItemsByIds(tree, ids) { - function findAndUpdate(node) { - if (ids.includes(node.id)) { - node.checked = true; // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true - } - if (node.children && node.children.length > 0) { - for (let child of node.children) { - findAndUpdate(child); // 閫掑綊澶勭悊瀛愯妭鐐� - } - } - } - - for (let node of tree) { - findAndUpdate(node); // 瀵规瘡涓《灞傝妭鐐规墽琛屾煡鎵惧拰鏇存柊鎿嶄綔 - } - return tree; // 杩斿洖淇敼鍚庣殑瀹屾暣鏁扮粍 - }, - handleTrue() { - // findAndUpdateItemsByIds(this.date.) - }, - // 缁勫嵎鏍煎紡鍖栨棩鏈熸樉绀� - DateFormat(date, fmt) { - if (date && fmt) { - let _date = new Date(date) - var o = { - 'M+': _date.getMonth() + 1, //鏈堜唤 - 'd+': _date.getDate(), //鏃� - 'h+': _date.getHours(), //灏忔椂 - 'm+': _date.getMinutes(), //鍒� - 's+': _date.getSeconds(), //绉� - 'q+': Math.floor((_date.getMonth() + 3) / 3), //瀛e害 - S: _date.getMilliseconds() //姣 - } - if (/(y+)/.test(fmt)) { - fmt = fmt.replace(RegExp.$1, (_date.getFullYear() + '').substr(4 - RegExp.$1.length)) - } - for (var k in o) { - if (new RegExp('(' + k + ')').test(fmt)) { - fmt = fmt.replace( - RegExp.$1, - RegExp.$1.length == 1 - ? (o)[k] - : ('00' + (o)[k]).substr(('' + (o)[k]).length) - ) - } - } - return fmt - } else { - return '' - } - }, - // 鑾峰彇缁勫嵎绛旈鏁版嵁 - getMockData() { - this.setData({ - 'mockData.useCount': 0, - 'mockData.mockList': [] - }) - app.MG.identity - .getUserKey({ - domain: 'mockData', - keys: [this.data.bookId] - }) - .then((res) => { - console.log(JSON.parse(res[0].value)); - if (res && res.length) { - const mock = JSON.parse(res[0].value) - mock.forEach(item => { - item.createDate = this.DateFormat(item.createDate, 'yyyy-MM-dd') - }) - this.setData({ - 'mockData.mockList': mock - }) - // 缁勫嵎宸蹭娇鐢ㄦ鏁� - res.forEach((item) => { - // 宸茬粡鏈夌瓟棰樺垎鏁扮瓑鏁版嵁锛岃瘉鏄庣粍鍗峰凡缁忎娇鐢ㄥ畬姣� - if (item.resultData) { - this.setData({ - 'mockData.useCount': this.data.mockData.useCount + 1 - }) - } - }) - } - }) - } - -}) diff --git a/pages/bookServices/detail/index.json b/pages/bookServices/detail/index.json deleted file mode 100644 index 53b160f..0000000 --- a/pages/bookServices/detail/index.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon", - "t-image": "tdesign-miniprogram/image/image", - "t-tabs": "tdesign-miniprogram/tabs/tabs", - "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", - "t-button": "tdesign-miniprogram/button/button", - "t-message": "tdesign-miniprogram/message/message", - "book-brief": "/pages/bookServices/detail/components/brief/index", - "teach-resource": "/pages/bookServices/detail/components/teachResource/index", - "learn-resource": "/pages/bookServices/detail/components/learnResource/learnResource", - "test-resource": "/pages/bookServices/detail/components/testResource/testResource", - "note": "/pages/bookServices/detail/components/note/note", - "tree": "/pages/bookServices/detail/components/tree/index", - "suggest": "/pages/bookServices/detail/components/suggest/suggest", - "t-loading": "tdesign-miniprogram/loading/loading", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-toast": "tdesign-miniprogram/toast/toast" - }, - "navigationStyle": "custom", - "onReachBottomDistance": 200 -} \ No newline at end of file diff --git a/pages/bookServices/examination/examination.js b/pages/bookServices/examination/examination.js deleted file mode 100644 index cfad42b..0000000 --- a/pages/bookServices/examination/examination.js +++ /dev/null @@ -1,1123 +0,0 @@ -import { getPublicImage } from '../../../assets/js/middleGround/tool' -const app = getApp() -Page({ - - /** - * 椤甸潰鐨勫垵濮嬫暟鎹� - */ - data: { - barHeight: "", - navBarHeight: "", - loading: false, - answerTitle: "", // 瀵艰埅鏍忔爣棰� - countdownInterval: null, // 璁℃椂鍣� - isCountdownRunning: true, // 鏄惁鍊掕鏃� - countdownTime: 0, // 鍊掕鏃舵椂闂� - bookId: "", - productLinkPath: "", - rootCmsItemId: "", - idPathList: [], // 棰樼洰鍒楄〃 - answerType: "", // 绛旈妯″紡 - submitStatus: false, // 鎻愪氦鐘舵�� - currentIndex: 0, // 褰撳墠鏄剧ず鐨勯鍙� - collectList: [], // 鏀惰棌棰樼洰鍒楄〃 - errorList: [], // 閿欓鍒楄〃 - subjectiveTotal: 0, // 瀹㈣棰樻�绘暟 - subjectiveNum: 0, // 瀹㈣棰樺緱鍒� - subjectiveGrade: 0, // 瀹㈣棰樻�诲垎 - correctNum: 0, // 姝g‘棰樼洰鏁伴噺 - total: 0, // 棰樼洰鎬绘暟 - cardList: [], // 鎻愪氦椤�, - questionDataList: [], // 鏄剧ず棰樼洰鍒楄〃 - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - onLoad(options) { - const systInfo = wx.getSystemInfoSync(); - const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 - const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� - this.setData({ - barHeight: systInfo.statusBarHeight, - navBarHeight: navBarHeight, - answerTitle: options.answerTitle, - bookId: options.bookId, - productLinkPath: options.productLinkPath ? options.productLinkPath : '', - rootCmsItemId: options.rootCmsItemId, - idPathList: options.idPathList ? JSON.parse(options.idPathList) : [], - answerType: options.answerType - }); - this.init() - console.log('浼犲弬', options); - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 - */ - onReady() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず - */ - onShow() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 - */ - onHide() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 - */ - onUnload() { - if (this.data.countdownInterval !== null) { - clearInterval(this.data.countdownInterval) - } - }, - - /** - * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 - */ - onPullDownRefresh() { - - }, - - /** - * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� - */ - onReachBottom() { - - }, - - /** - * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� - */ - onShareAppMessage() { - }, - // 杩斿洖 - goBack() { - wx.navigateBack(); - }, - - // 鑾峰彇淇濆瓨鐨勫�掕鏃舵椂闂� - getSavedTime() { - const savedTime = wx.getStorageSync('countdownTime') - return savedTime ? parseInt(savedTime) : null - }, - // 淇濆瓨鍊掕鏃舵椂闂村埌鏈湴瀛樺偍 - saveTime() { - wx.setStorageSync('countdownTime', this.data.countdownTime.toString()) - }, - clearTime() { - this.setData({ - countdownTime: 2 * 60 * 60 * 1000 - }) - }, - // 鏆傚仠鎴栫户缁�掕鏃� - toggleCountdown() { - if (this.data.countdownInterval) { - clearInterval(this.data.countdownInterval) - this.setData({ - countdownInterval: null, - isCountdownRunning: false - }) - } else { - this.startCountdown() - this.setData({ - isCountdownRunning: true - }) - } - }, - // 寮�濮嬪�掕鏃� - startCountdown() { - // 濡傛灉璁℃椂鍣ㄥ凡缁忓瓨鍦紝鍏堟竻闄や箣鍓嶇殑璁℃椂鍣� - if (this.data.countdownInterval) { - clearInterval(this.data.countdownInterval) - this.setData({ - countdownInterval: null - }) - } - this.setData({ - countdownInterval: setInterval(() => { - this.setData({ - countdownTime: this.data.countdownTime - 1000 - }) - if (this.data.countdownTime <= 0) { - clearInterval(this.data.countdownInterval) - this.setData({ - countdownTime: 0, - isCountdownRunning: false - }) - } - this.saveTime() - }, 1000) - }) - }, - // 鍒囨崲棰樼洰 - changeSwiper(e) { - this.setData({ - currentIndex: e.detail.index - }) - let index = e.detail.index - 1 >= 0 ? e.detail.index - 1 : 0 - let flag = this.isHaveAnswer(this.data.questionDataList[index].userAnswer) - if (flag) this.handleQuestion(e.detail.index) - - }, - // 鐐瑰嚮绛旈鍗¤烦杞鐩� - goQuestion(e) { - console.log(e); - const id = e.detail.id - this.data.questionDataList.forEach((item, index) => { - if (item.id == id) { - this.setData({ - currentIndex: index - }) - } - }) - }, - // 鍗曢�� 澶氶�� 瑙﹀彂 - onChangeRadio(e) { - const radioData = e.detail.value.currentTarget.dataset.value - const id = e.detail.value.currentTarget.dataset.id - const radioChecked = e.detail.value.detail.value - const questionList = this.data.questionDataList - questionList.forEach(item => { - if (item.id == id) { - item.userAnswer = radioChecked - } - }) - this.setData({ - questionDataList: questionList - }) - console.log(this.data.questionDataList); - }, - // 杈撳叆妗嗚Е鍙� - onChangeInput(e) { - const inputData = e.detail.value.detail.value - const id = e.detail.value.currentTarget.dataset.id - const index = e.detail.value.currentTarget.dataset.index - const questionList = this.data.questionDataList - questionList.forEach(item => { - if (item.id == id) { - item.userAnswer[index] = inputData - } - }) - this.setData({ - questionDataList: questionList - }) - console.log(this.data.questionDataList); - }, - // 鏁扮粍杞负瀛楃涓叉柟娉� - arrayToString(data) { - // 妫�鏌ユ槸鍚︿负鏁扮粍 - if (Array.isArray(data)) { - // 浣跨敤 join 鏂规硶灏嗘暟缁勮浆鎹负瀛楃涓诧紝榛樿浣跨敤閫楀彿鍒嗛殧 - return data.join(',').replace(/<[^>]*>/g, '') - } else { - // 濡傛灉涓嶆槸鏁扮粍锛岀洿鎺ヨ繑鍥炲師濮嬪�� - return data.replace(/<[^>]*>/g, '') - } - }, - // 鍒ゆ柇鏄惁鏈夌敤鎴风瓟妗� - isHaveAnswer(data) { - if (typeof data == 'string') { - data = data - .replace(/<[^>]*>/g, '') - .replace(/ /g, '') - .trim() - if (data.length) { - return true - } else { - return false - } - } else { - const answer = data.find((item) => item.length > 0) - if (answer) { - return true - } else { - return false - } - } - }, - // 鎻愪氦閫昏緫 - submitPaper() { - this.setData({ - submitStatus: true - }) - if (this.data.answerType == 'option') { - this.toggleCountdown() - const child = this.selectComponent('#question-options') - if (this.data.answerType == 'option' || this.data.answerType == 'errorQuestion') { - // 鍏堥亶鍘嗘墍鏈夐鐩紝灏嗘湭鎵规敼鐨勯鐩壒鏀� - const qustionList = this.data.questionDataList - for (let index = 0; index < qustionList.length; index++) { - const item = qustionList[index]; - if (!item.isComplete) this.handleQuestion(index + 1) - } - } - if (this.data.answerType == 'option') { - this.recordAnswerData() - child.openTestReportDialog() - } - } else if (this.data.answerType == 'collectQuestion' || this.data.answerType == 'errorQuestion') { - this.goBack() - } - - }, - // 鍒濆鍖栧嚱鏁� - async init() { - this.setData({ - loading: true, - subjectiveTotal: 0, - subjectiveNum: 0, - subjectiveGrade: 0 - }) - if (this.data.answerType == 'option') { - if (this.data) - this.startCountdown() - this.setData({ - countdownTime: 2 * 60 * 60 * 1000 - }) - // 娴嬭瘯绛旈 - await this.getCollectIdList() // 鑾峰彇鏀惰棌id鍒楄〃 - await this.getErrorList() // 鑾峰彇閿欓id鍒楄〃 - } else if (this.data.answerType == 'collectQuestion') { - // 鎴戠殑鏀惰棌 - await this.getcollectId() // 鑾峰彇鏀惰棌棰樼洰 - } else if (this.data.answerType == 'errorQuestion') { - // 鎴戠殑閿欓 - // loadings.value = true - await this.getErrorIdList() - await this.getCollectIdList() // 鑾峰彇鏀惰棌id鍒楄〃 - } - }, - async restart() { - const countDownRef = this.selectComponent('#countDownRef') - this.setData({ - loading: true, - total: 0, - subjectiveGrade: 0, - subjectiveTotal: 0, - subjectiveNum: 0, - currentIndex: 0, - submitStatus: false - }) - if (this.data.answerType == 'option') { - this.setData({ - countdownTime: 2 * 60 * 60 * 1000 - }) - this.delAnswerInfo(() => { - this.getQuestionList() - this.clearTime() - }) - if (!this.data.submitStatus) { - this.startCountdown() - } - } else if (this.data.answerType == 'mock') { - // 缁勫嵎妯″紡 - // 娓呯┖绛旈璁板綍 - await app.MG.identity.setUserKey({ - setKeyRequests: [ - { - domain: 'mockAnswerData', - key: route.query.uuid, - value: JSON.stringify({ - time: countDownRef.value.countdownTime, - answerData: [] - }) - } - ] - }) - this.init() - } else { - this.init() - this.clearTime() - if (submitStatus.value) { - this.startCountdown() - } - } - }, - // 鑾峰彇鏀惰棌棰樼洰鍒楄〃id - getCollectIdList() { - app.MG.identity - .getUserKey({ - domain: 'collectData', - keys: [this.data.rootCmsItemId] - }) - .then((res) => { - try { - this.setData({ - collectList: JSON.parse(res[0].value) - }) - } catch (error) { - } - if (this.data.answerType == 'option') { - // 鍏堣幏鍙栫敤鎴风瓟棰樿褰� - this.getAnswerInfo(async (res) => { - if (res.length) { - // 鏈夎褰曪紝涓嶈兘绛旈锛岀姸鎬佽涓哄凡鎻愪氦 - this.setData({ - submitStatus: true - }) - let value = JSON.parse(res[0].value) - // 鏈夌瓟棰樿褰曪紝寰楀垎璧嬪�� - if (value) { - this.setData({ - submitStatus: true - }) - value.dataList.forEach((item) => { - if (item.name == '瀹㈣棰樺緱鍒�' && item.path == this.data.productLinkPath) - this.setData({ - subjectiveNum: item.score - }) - }) - } - this.setData({ - currentIndex: value.currentIndex - }) - // 鎼哄甫绛旈璁板綍 鑾峰彇棰樼洰 - await this.getQuestionList(value.dataList) - } else { - await this.getQuestionList() // 鑾峰彇棰樺簱棰樼洰 - } - }) - } - }) - }, - // 鑾峰彇閿欓id鍒楄〃 - getErrorList() { - app.MG.identity - .getUserKey({ - domain: 'errorData', - keys: [this.data.rootCmsItemId] - }) - .then((res) => { - try { - this.setData({ - errorList: JSON.parse(res[0].value) - }) - } catch (error) { - - } - }) - }, - // 鑾峰彇棰樺簱棰樼洰 - getQuestionList(oldData) { - // 娓呯┖姝g‘棰樻暟璁板綍 - this.setData({ - cardList: [], - correctNum: 0, - }) - let flag = 0 - this.data.idPathList.forEach((pathitem) => { - const pathList = this.data.cardList - pathList.push({ - path: pathitem.productLinkPath, - catalogName: pathitem.name, - infoList: [] - }) - this.setData({ - cardList: pathList - }) - // 鑾峰彇棰樼洰 - let query = { - path: '*', - queryType: '*', - productId: this.data.bookId, - cmsPath: pathitem.productLinkPath, - itemFields: { - // SysType: 'CmsFolder', - Embedded_QuestionBank_Stem: [], - Embedded_QuestionBank_AnalysisCon: [], - Embedded_QuestionBank_Answer: [], - Embedded_QuestionBank_Option: [], - Embedded_QuestionBank_QuestionType: [], - Embedded_QuestionBank_StemStyle: [], - Embedded_QuestionBank_OptionStyle: [], - Embedded_QuestionBank_KnowledgePoint: [], - Embedded_QuestionBank_Difficulty: [] - }, - pading: { - start: 0, - size: 999 - } - } - app.MG.store.getProductDetail(query).then((res) => { - this.setData({ - total: res.datas.cmsDatas[0].datas.length - }) - // total.value += res.datas.cmsDatas[0].datas.length - let oldList - if (oldData) { - // 鎻愪氦杩囷紝瀛樺湪绛旈璁板綍 - oldList = oldData.find((item) => item.path == pathitem.productLinkPath).infoList - this.setData({ - submitStatus: true - }) - } - res.datas.cmsDatas[0].datas.forEach((item, index) => { - let oldObj = '' - if (oldList) oldObj = oldList.find((oldItem) => oldItem.id == item.id) - let questionObj = { - // num: index, // 棰樺彿 - id: item.id, - type: pathitem.name, - stem: - item.Embedded_QuestionBank_QuestionType == 'completion' - ? JSON.parse(item.Embedded_QuestionBank_Stem) - .stemTxt.replaceAll('<vacancy>', ',input,') - .split(',') - : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共 - answer: item.Embedded_QuestionBank_Answer, // 绛旀 - option: item.Embedded_QuestionBank_Option - ? JSON.parse(item.Embedded_QuestionBank_Option) - : '', // 閫夋嫨棰橀�夐」 - analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 瑙f瀽 - questionType: item.Embedded_QuestionBank_QuestionType, // 棰樺瀷 - optionStyle: item.Embedded_QuestionBank_OptionStyle, // 閫夐」鏄剧ず绫诲瀷 - stemStyle: item.Embedded_QuestionBank_StemStyle, // 棰樺共鏄剧ず绫诲瀷 - difficulty: item.Embedded_QuestionBank_Difficulty - ? 4 - item.Embedded_QuestionBank_Difficulty - : 0, // 闅惧害绛夌骇 - userAnswer: oldObj - ? oldObj.userAnswer - : item.Embedded_QuestionBank_QuestionType == 'completion' || - item.Embedded_QuestionBank_QuestionType == 'multipleChoice' - ? [] - : '', - isRight: oldObj ? oldObj.isRight : null, - isComplete: oldObj ? oldObj.isComplete : false, - isCollect: this.data.collectList.indexOf(item.id) > -1 ? true : false, - isUnfold: '' // 鎺у埗瑙f瀽鐨勬姌鍙犻潰鏉挎槸鍚﹀睍寮� - } - // 澶氶�夊拰濉┖绛旀鑲负鏁扮粍锛岃杞崲JSON鏍煎紡 - if ( - questionObj.questionType == 'completion' || - questionObj.questionType == 'multipleChoice' - ) { - try { - questionObj.answer = JSON.parse(questionObj.answer) - } catch (error) { - questionObj.answer = item.Embedded_QuestionBank_Answer - } - } - // questionObj.userAnswer = this.arrayToString(questionObj.userAnswer) - // questionObj.isHaveAnswer = this.isHaveAnswer(questionObj.userAnswer) - // 濉┖棰樻敼閫� - if (questionObj.questionType == 'completion') { - let index = 0 - for (let i = 0; i < questionObj.stem.length; i++) { - const item = questionObj.stem[i] - if (item == 'input') { - questionObj.stem[i] = { - num: index, - data: 'input' - } - if (!oldObj) questionObj.userAnswer[index] = '' - index++ - } - } - } - // 鑾峰彇鍥剧墖 - if (questionObj.stemStyle == 'Image' || questionObj.stemStyle == 'TxtAndImage') { - questionObj.stem.stemImage = getPublicImage(questionObj.stem.stemImage, 150) - } - if (questionObj.optionStyle == 'Image' || questionObj.optionStyle == 'TxtAndImage') { - questionObj.option.forEach(optionItem => { - if (optionItem.img) optionItem.img = getPublicImage(optionItem.img, 150) - }) - } - // if (questionObj.optionStyle == 'RichText') { - // questionObj.option.forEach(optionItem => { - // optionItem.txt.replace(/<img>/g, "<img class='imgClass'>") - // }) - // } - // 鏃ф暟鎹噷 棰樼洰宸茬粡浣滅瓟锛屼慨鏀瑰凡绛旈鐩暟閲� - // if (oldObj && oldObj.userAnswer.length > 0) countDownRef.value.changeAlready() - // 鏃ф暟鎹噷 棰樼洰姝g‘ 璁板綍姝g‘鏁伴噺 - if (questionObj.isRight) { - this.setData({ - correctNum: this.data.correctNum + 1 - }) - } - if (pathitem.name == '鍒ゆ柇棰�' || pathitem.name == '濉┖棰�' || pathitem.name == '澶氶�夐' || pathitem.name == '鍗曢�夐' || pathitem.name == '鍚姏棰�') { - if (oldObj) { - this.setData({ - subjectiveTotal: this.data.subjectiveTotal + 1 - }) - } - - } - // cardList璧嬪�� - let cardIndex = this.data.cardList.findIndex((item) => item.path == pathitem.productLinkPath) - let infoList = this.data.cardList[cardIndex].infoList - infoList.push(questionObj) - this.setData({ - [`cardList[${cardIndex}].infoList`]: infoList - }) - // this.data.cardList[this.data.cardList.findIndex((item) => item.path == pathitem.productLinkPath)] - // .infoList - // infoList.push(questionObj) - flag++; - let questionList = [] - const cardUpdatedList = this.data.cardList - // if (flag == this.data.idPathList.length) { - cardUpdatedList.forEach(aitem => { - aitem.infoList.forEach((bitem, bindex) => { - questionList.push(bitem) - bitem.number = bindex + 1 - bitem.grade = 2 - }) - }) - this.setData({ - questionDataList: questionList, - cardList: cardUpdatedList - }) - }) - }) - }) - this.setData({ - loading: false, - }) - }, - // 鎵规敼棰樼洰 锛堢粌涔狅紝鎴戠殑閿欓锛屾垜鐨勬敹钘忥級 - handleQuestion(num) { - const questionList = this.data.questionDataList - const index = num - 1 >= 0 ? num - 1 : 0 - if (questionList[index].isComplete) { - // 棰樼洰宸插畬鎴愶紝璺宠繃 - return true - } - questionList[index].isComplete = true - const item = questionList[index] - // 鎵规敼棰樼洰 - if (item.questionType == 'multipleChoice') { - // 澶氶�夐 - // subjectiveGrade.value += item.score - if (item.answer.length == item.userAnswer.length) { - const sortedArr1 = item.answer.slice().sort() - const sortedArr2 = item.userAnswer.slice().sort() - questionList[index].isRight = sortedArr1.every( - (value, valueIndex) => value === sortedArr2[valueIndex] - ) - } else { - questionList[index].isRight = false - } - } else if (item.questionType == 'singleChoice' || item.questionType == 'judge') { - // 鍗曢�� 鍒ゆ柇 - // subjectiveGrade.value += item.score - questionList[index].isRight = item.answer == item.userAnswer - } else if (item.questionType == 'shortAnswer') { - // 绠�绛� 缈昏瘧 - questionList[index].isRight = null - } else if (item.questionType == 'completion') { - // 濉┖ - // subjectiveGrade.value += item.score - if (typeof item.answer == 'string') { - questionList[index].isRight = item.answer == item.userAnswer[0] - } else { - if (item.answer.length != item.userAnswer.length) { - questionList[index].isRight = false - } else { - questionList[index].isRight = item.answer.every( - (value, valueIndex) => value === item.userAnswer[valueIndex] - ) - } - } - } - if (item.questionType != 'shortAnswer') { - this.setData({ - subjectiveTotal: this.data.subjectiveTotal + 1, - subjectiveGrade: this.data.subjectiveGrade + item.grade - }) - } - if (questionList[index].isRight && item.questionType != 'shortAnswer') { - // 瀹㈣棰樺洖绛旀纭� - this.setData({ - subjectiveNum: this.data.subjectiveNum + item.grade, - correctNum: this.data.correctNum + 1 - }) - } - if (!questionList[index].isRight && item.questionType != 'shortAnswer') { - // 瀹㈣棰樺洖绛旈敊璇� 璁板綍閿欓 - if (this.data.errorList.findIndex((errorItem) => errorItem == item.id) == -1) { - this.data.errorList.push(item.id) - } - } else { - if (this.data.answerType == 'errorQuestion' || this.data.answerType == 'option') { - // 浠庨敊棰橀泦涓Щ闄� - let errorIndex = this.data.errorList.findIndex((erroritem) => erroritem == item.id) - if (errorIndex > -1) { - this.data.errorList.splice(errorIndex, 1) - } - } - } - if (this.data.answerType != 'collectQuestion') { - // 璁板綍閿欓 - app.MG.identity - .setUserKey({ - setKeyRequests: [ - { - domain: 'errorData', - key: this.data.rootCmsItemId, - value: JSON.stringify(this.data.errorList) - } - ] - }) - .then((res) => { - console.log(res) - }) - } - this.setData({ - questionDataList: questionList - }) - const cardUpdatedList = this.data.cardList - cardUpdatedList.forEach((item) => { - item.infoList.forEach((citem) => { - if (citem.id == questionList[index].id) { - citem = questionList[index]; - } - }); - }); - this.setData({ - cardList: cardUpdatedList - }) - // console.log(this.data.questionDataList, this.data.cardList); - }, - // 棰樼洰鏀惰棌鎸夐挳,鏀惰棌鍜屽彇娑堝悓涓�鎺ュ彛锛屽彇娑堟暟缁勫噺鍘昏椤筰d - setCollect() { - const citem = this.data.questionDataList[this.data.currentIndex] - const questionList = this.data.questionDataList - for (let index = 0; index < questionList.length; index++) { - const item = questionList[index]; - if (item.id == citem.id) { - item.isCollect = !item.isCollect - } - } - this.setData({ - questionDataList: questionList - }) - if (this.data.collectList.length == 0) { - this.setData({ - collectList: [citem.id] - }) - } else { - const collectItme = this.data.collectList.filter((item) => item == citem.id) - if (collectItme.length) { - const arr = this.data.collectList.filter((item) => item != citem.id) - this.setData({ - collectList: arr - }) - } else { - const collectArr = this.data.collectList - collectArr.push(citem.id) - this.setData({ - collectList: collectArr - }) - } - } - app.MG.identity - .setUserKey({ - setKeyRequests: [ - { - domain: 'collectData', - key: this.data.rootCmsItemId, - value: JSON.stringify(this.data.collectList) - } - ] - }) - .then((res) => { }) - }, - // 澶勭悊绛旈鏁版嵁 - recordAnswerData() { - this.data.cardList.push( - { - name: '瀹㈣棰樺緱鍒�', - score: this.data.subjectiveNum, - path: this.data.productLinkPath, - // infoList: [], - // catalogName: '' - } - ) - let setInfoData = { - currentIndex: this.data.currentIndex, - dataList: JSON.parse(JSON.stringify(this.data.cardList)) - } - for (let i = 0; i < setInfoData.dataList.length; i++) { - const item = setInfoData.dataList[i] - if (!item.name && !item.name == '瀹㈣棰樺緱鍒�') { - for (let j = 0; j < item.infoList.length; j++) { - let obj = { - id: item.infoList[j].id, - userAnswer: item.infoList[j].userAnswer, - isComplete: item.infoList[j].isComplete, - isRight: item.infoList[j].isRight, - isCollect: item.infoList[j].isCollect - } - item.infoList[j] = obj - } - } - } - - this.setAnswerInfo(setInfoData) - }, - // 鎻愪氦绛旈鏁版嵁 - setAnswerInfo(data) { - app.MG.identity - .setUserKey({ - setKeyRequests: [ - { - domain: 'answerData', - key: this.data.productLinkPath, - value: JSON.stringify(data) - } - ] - }) - .then((res) => { }) - }, - // 鑾峰彇绛旈鏁版嵁 - getAnswerInfo(callback) { - app.MG.identity - .getUserKey({ - domain: 'answerData', - keys: [this.data.productLinkPath] - }) - .then((res) => { - if (callback) callback(res) - }) - }, - // 鍒犻櫎绛旈鏁版嵁 - delAnswerInfo(callback) { - app.MG.identity - .delUserKey({ - domain: 'answerData', - keys: [this.data.productLinkPath] - }) - .then((res) => { - if (callback) callback() - }) - }, - // 鎴戠殑鏀惰棌妯″紡涓嬭幏鍙栨敹钘忛鐩甶d - async getcollectId() { - app.MG.identity - .getUserKey({ - domain: 'collectData', - keys: [this.data.rootCmsItemId] - }) - .then(async (res) => { - try { - this.setData({ - collectList: JSON.parse(res[0].value) - }) - // total.value = collectList.value.length - } catch (error) { - } - if (this.data.collectList && this.data.collectList.length) { - await this.getCollectDataList() - } else { - this.setData({ - loading: false - }) - wx.showModal({ - title: '鎻愮ず', - content: '鏀惰棌澶规殏鏃犳暟鎹�',//editable濡傛灉涓簍rue锛岃繖灏辨槸杈撳叆妗嗙殑鍐呭 - editable: false,//鏄惁鏄剧ず杈撳叆妗� - showCancel: false, - success: (res) => { - if (res.confirm) { - this.setData({ - submitStatus: true - }) - this.goBack() - } - - } - }) - } - // console.log('鏀惰棌', collectList.value) - }) - }, - // 鑾峰彇鏀惰棌澶� - async getCollectDataList() { - let questionArr = [] - this.setData({ - cardList: [ - { - catalogName: '鏀惰棌澶�', - infoList: [] - } - ] - }) - let query = { - path: '*', - cmsPath: this.data.rootCmsItemId, - cmsType: '*', - productId: this.data.bookId, - queryType: '*', - itemIds: this.data.collectList.map((item) => item + ''), - itemFields: { - Embedded_QuestionBank_Stem: [], - Embedded_QuestionBank_AnalysisCon: [], - Embedded_QuestionBank_Answer: [], - Embedded_QuestionBank_Option: [], - Embedded_QuestionBank_QuestionType: [], - Embedded_QuestionBank_StemStyle: [], - Embedded_QuestionBank_OptionStyle: [], - Embedded_QuestionBank_KnowledgePoint: [], - Embedded_QuestionBank_Difficulty: [] - } - } - app.MG.store.getProductDetail(query).then((res) => { - let questionArr = [] - res.datas.cmsDatas[0].datas.forEach((item, index) => { - const questionObj = { - number: index + 1, // 棰樺彿 - id: item.id, - stem: - item.Embedded_QuestionBank_QuestionType == 'completion' - ? JSON.parse(item.Embedded_QuestionBank_Stem) - .stemTxt.replaceAll('<vacancy>', ',input,') - .split(',') - : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共 - answer: item.Embedded_QuestionBank_Answer, // 绛旀 - option: item.Embedded_QuestionBank_Option - ? JSON.parse(item.Embedded_QuestionBank_Option) - : '', // 閫夋嫨棰橀�夐」 - analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 瑙f瀽 - questionType: item.Embedded_QuestionBank_QuestionType, // 棰樺瀷 - optionStyle: item.Embedded_QuestionBank_OptionStyle, // 閫夐」鏄剧ず绫诲瀷 - stemStyle: item.Embedded_QuestionBank_StemStyle, // 棰樺共鏄剧ず绫诲瀷 - difficulty: item.Embedded_QuestionBank_Difficulty - ? 4 - item.Embedded_QuestionBank_Difficulty - : 0, // 闅惧害绛夌骇 - userAnswer: - item.Embedded_QuestionBank_QuestionType == 'completion' || - item.Embedded_QuestionBank_QuestionType == 'multipleChoice' - ? [] - : '', - isSubmit: false, // 鏌ョ湅瑙f瀽 - isRight: null, // 鏄惁姝g‘ - isComplete: false, - isCollect: true - } - // 澶氶�夊拰濉┖绛旀鑲负鏁扮粍锛岃杞崲JSON鏍煎紡 - if ( - questionObj.questionType == 'completion' || - questionObj.questionType == 'multipleChoice' - ) { - try { - questionObj.answer = JSON.parse(questionObj.answer) - } catch (error) { - // - } - } - // 濉┖棰樻敼閫� - if (questionObj.questionType == 'completion') { - let index = 0 - for (let i = 0; i < questionObj.stem.length; i++) { - const item = questionObj.stem[i] - if (item == 'input') { - questionObj.stem[i] = { - num: index, - data: 'input' - } - questionObj.userAnswer[index] = '' - index++ - } - } - } - // 鑾峰彇鍥剧墖 - if (questionObj.stemStyle == 'Image' || questionObj.stemStyle == 'TxtAndImage') { - questionObj.stem.stemImage = getPublicImage(questionObj.stem.stemImage, 150) - } - if (questionObj.optionStyle == 'Image' || questionObj.optionStyle == 'TxtAndImage') { - questionObj.option.forEach(optionItem => { - if (optionItem.img) optionItem.img = getPublicImage(optionItem.img, 150) - }) - } - // if (item.Embedded_QuestionBank_QuestionType == 'judge') { - // topicList.value.judge.data.push(questionObj) - // } else if (item.Embedded_QuestionBank_QuestionType == 'singleChoice') { - // topicList.value.radio.data.push(questionObj) - // } else if (item.Embedded_QuestionBank_QuestionType == 'multipleChoice') { - // topicList.value.check.data.push(questionObj) - // } else if (item.Embedded_QuestionBank_QuestionType == 'completion') { - // topicList.value.gap.data.push(questionObj) - // } else if (item.Embedded_QuestionBank_QuestionType == 'shortAnswer') { - // topicList.value.short.data.push(questionObj) - // } - questionArr.push(questionObj) - // cardList.value[0].infoList.push(questionObj) - }) - // loadings.value = false - this.setData({ - questionDataList: questionArr, - ['cardList[0].infoList']: questionArr, - loading: false, - }) - }) - }, - // 鎴戠殑閿欓妯″紡涓嬭幏鍙栭敊棰榠d鍒楄〃 - async getErrorIdList() { - await app.MG.identity - .getUserKey({ - domain: 'errorData', - keys: [this.data.rootCmsItemId] - }) - .then((res) => { - try { - this.setData({ - errorList: JSON.parse(res[0].value) - }) - } catch (error) { - } - if (this.data.errorList && this.data.errorList.length) { - this.getErrorDataList() - } else { - this.setData({ - loading: true - }) - wx.showModal({ - title: '鎻愮ず', - content: '閿欓闆嗘殏鏃犳暟鎹�',//editable濡傛灉涓簍rue锛岃繖灏辨槸杈撳叆妗嗙殑鍐呭 - editable: false,//鏄惁鏄剧ず杈撳叆妗� - showCancel: false, - success: (res) => { - if (res.confirm) { - this.setData({ - submitStatus: true - }) - this.goBack() - } - } - }) - } - }) - }, - // 鑾峰彇閿欓闆� - async getErrorDataList() { - this.setData({ - cardList: [ - { - catalogName: '閿欓闆�', - infoList: [] - } - ] - }) - let query = { - path: '*', - cmsPath: this.data.rootCmsItemId, - cmsType: '*', - productId: this.data.bookId, - queryType: '*', - itemIds: this.data.errorList.map((item) => item + ''), - itemFields: { - Embedded_QuestionBank_Stem: [], - Embedded_QuestionBank_AnalysisCon: [], - Embedded_QuestionBank_Answer: [], - Embedded_QuestionBank_Option: [], - Embedded_QuestionBank_QuestionType: [], - Embedded_QuestionBank_StemStyle: [], - Embedded_QuestionBank_OptionStyle: [], - Embedded_QuestionBank_KnowledgePoint: [], - Embedded_QuestionBank_Difficulty: [] - } - } - await app.MG.store.getProductDetail(query).then((res) => { - let questionArr = [] - res.datas.cmsDatas[0].datas.forEach((item, index) => { - const questionObj = { - number: index + 1, // 棰樺彿 - id: item.id, - stem: - item.Embedded_QuestionBank_QuestionType == 'completion' - ? JSON.parse(item.Embedded_QuestionBank_Stem) - .stemTxt.replaceAll('<vacancy>', ',input,') - .split(',') - : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共 - answer: item.Embedded_QuestionBank_Answer, // 绛旀 - option: item.Embedded_QuestionBank_Option - ? JSON.parse(item.Embedded_QuestionBank_Option) - : '', // 閫夋嫨棰橀�夐」 - analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 瑙f瀽 - questionType: item.Embedded_QuestionBank_QuestionType, // 棰樺瀷 - optionStyle: item.Embedded_QuestionBank_OptionStyle, // 閫夐」鏄剧ず绫诲瀷 - stemStyle: item.Embedded_QuestionBank_StemStyle, // 棰樺共鏄剧ず绫诲瀷 - difficulty: item.Embedded_QuestionBank_Difficulty - ? 4 - item.Embedded_QuestionBank_Difficulty - : 0, // 闅惧害绛夌骇 - userAnswer: - item.Embedded_QuestionBank_QuestionType == 'completion' || - item.Embedded_QuestionBank_QuestionType == 'multipleChoice' - ? [] - : '', - isSubmit: false, // 鏌ョ湅瑙f瀽 - isRight: null, // 鏄惁姝g‘ - isComplete: false, - isCollect: this.data.collectList.some((collectItem) => collectItem == item.id) - } - // 澶氶�夊拰濉┖绛旀鑲负鏁扮粍锛岃杞崲JSON鏍煎紡 - if ( - questionObj.questionType == 'completion' || - questionObj.questionType == 'multipleChoice' - ) { - try { - questionObj.answer = JSON.parse(questionObj.answer) - } catch (error) { - // - } - } - // 濉┖棰樻敼閫� - if (questionObj.questionType == 'completion') { - let index = 0 - for (let i = 0; i < questionObj.stem.length; i++) { - const item = questionObj.stem[i] - if (item == 'input') { - questionObj.stem[i] = { - num: index, - data: 'input' - } - questionObj.userAnswer[index] = '' - index++ - } - } - } - // 鑾峰彇鍥剧墖 - if (questionObj.stemStyle == 'Image' || questionObj.stemStyle == 'TxtAndImage') { - questionObj.stem.stemImage = getPublicImage(questionObj.stem.stemImage, 150) - } - if (questionObj.optionStyle == 'Image' || questionObj.optionStyle == 'TxtAndImage') { - questionObj.option.forEach(optionItem => { - if (optionItem.img) optionItem.img = getPublicImage(optionItem.img, 150) - }) - } - // if (item.Embedded_QuestionBank_QuestionType == 'judge') { - // topicList.value.judge.data.push(questionObj) - // } else if (item.Embedded_QuestionBank_QuestionType == 'singleChoice') { - // topicList.value.radio.data.push(questionObj) - // } else if (item.Embedded_QuestionBank_QuestionType == 'multipleChoice') { - // topicList.value.check.data.push(questionObj) - // } else if (item.Embedded_QuestionBank_QuestionType == 'completion') { - // topicList.value.gap.data.push(questionObj) - // } else if (item.Embedded_QuestionBank_QuestionType == 'shortAnswer') { - // topicList.value.short.data.push(questionObj) - // } - questionArr.push(questionObj) - }) - this.setData({ - questionDataList: questionArr, - ['cardList[0].infoList']: questionArr, - loading: false - }) - }) - // loadings.value = false - // console.log('閿欓闆�', topicList.value) - } -}) \ No newline at end of file diff --git a/pages/bookServices/examination/examination.json b/pages/bookServices/examination/examination.json deleted file mode 100644 index 7b82bc1..0000000 --- a/pages/bookServices/examination/examination.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "usingComponents": { - "question-options": "/pages/bookServices/examination/questionOptions/index", - "question-schedule": "/pages/bookServices/examination/questionSchedule/index", - "question-list": "/pages/bookServices/examination/questionList/index", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-image": "tdesign-miniprogram/image/image", - "t-button": "tdesign-miniprogram/button/button", - "t-loading": "tdesign-miniprogram/loading/loading" - }, - "navigationStyle": "custom" -} \ No newline at end of file diff --git a/pages/bookServices/list/index.js b/pages/bookServices/list/index.js deleted file mode 100644 index ccb63b6..0000000 --- a/pages/bookServices/list/index.js +++ /dev/null @@ -1,453 +0,0 @@ -const app = getApp(); -Page({ - /** - * 椤甸潰鐨勫垵濮嬫暟鎹� - */ - data: { - barHeight: '', - navBarHeight: '', - searchValue: '', - path: '', - pathList: [], - pageCount: { - page: 1, - total: 0, - }, - isMore: null, - assortCheck: { - name: '', - code: '', - }, - bookList: [], - stairList: { - value: '', - options: [ - { - value: '', - label: '涓�绾�', - }, - ], - }, - secondList: { - value: [], - options: [], - }, - majorProjectList: { - value: [], - options: [], - }, - newTextBook: { - value: [], - options: [], - }, - stairCode: '', // 涓�绾у垎绫婚�変腑椤� - secondCode: '', // 浜岀骇鍒嗙被閫変腑椤� - sort: '', // 鎺掑簭 - enable: false, - loadingProps: { - size: '50rpx', - }, - }, - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - onLoad(options) { - const systInfo = wx.getSystemInfoSync(); - const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 - const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� - this.setData({ - barHeight: systInfo.statusBarHeight, - navBarHeight: navBarHeight, - }); - // 鎼滅储璧嬪�� - if (options.searchValue) { - this.setData({ - searchValue: options.searchValue, - }); - } - // 楂樼骇鍒嗙被璧嬪�� - this.setData({ - assortCheck: { - name: options.assorName, - code: options.assortCode, - }, - }); - if (this.data.assortCheck.code) { - this.setData({}); - } - // 鑾峰彇涓�绾у垎绫� - this.getStairList(options.assortCode); - // 涓�绾у垎绫诲拰path璧嬪�� - if (options.stairCode) { - this.setData({ - 'stairList.value': options.stairCode, - stairCode: options.stairCode, - path: `${options.assortCode}\\${options.stairCode}`, - }); - } - // 浜岀骇鍒嗙被璧嬪�� - if (options.secondCode) { - this.setData({ - secondCode: options.secondCode, - pathList: [{ - Path: options.secondCode, - Type: '*', - StoreRefCode: app.config.goodsStore, - } - ], - }) - } - // 鑾峰彇浜岀骇鍒嗙被 - this.getSecondList(`${options.assortCode}\\${options.stairCode}`); - this.getBookList(`${options.assortCode}\\${options.stairCode}`); - // 鑾峰彇閲嶇偣椤圭洰 - this.getProjectList('bookClassification'); - this.getProjectList('newFormsTextbooks'); - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 - */ - onReady() { - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず - */ - onShow() { - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 - */ - onHide() { }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 - */ - onUnload() { }, - - /** - * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 - */ - onPullDownRefresh() { - console.log('涓嬫媺'); - }, - - /** - * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� - */ - onReachBottom(e) { - console.log('搴曢儴'); - const flag = this.data.bookList.length < this.data.pageCount.total - if (flag) { - this.setData({ - isMore: true, - "pageCount.page": this.data.pageCount.page + 1 - }) - this.getBookList(this.data.path) - } else { - this.setData({ - isMore: true, - }) - setTimeout(() => { - this.setData({ - isMore: false - }) - }, 100) - console.log('娌℃湁鏇村浜�'); - } - }, - - /** - * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� - */ - onShareAppMessage() { }, - goBack() { - wx.navigateBack(); - }, - // 鑾峰彇涓�绾у垪琛� - getStairList(path) { - const query = { - path, - filterList: [], - queryType: '\\', - searchList: [], - size: '30', - start: '0', - storeRefCode: app.config.goodsStore, - sort: { type: 'Asc', field: 'LinkOrder' }, - }; - app.MG.store.getStoreChannelList(query).then(async (res) => { - const options = [ - { - value: '', - label: '涓�绾�', - }, - ]; - for (let index = 0; index < res.datas.length; index++) { - const item = res.datas[index]; - options.push({ - value: item.refCode, - label: item.name, - }); - } - this.setData({ - 'stairList.options': options, - 'stairList.value': this.data.stairCode, - }); - }); - }, - // 鑾峰彇涓�绾у垎绫讳笅浜岀骇鍒嗙被 - getSecondList(path) { - const options = []; - const query = { - path, - filterList: [], - queryType: '\\', - searchList: [], - size: '30', - start: '0', - storeRefCode: app.config.goodsStore, - sort: { type: 'Asc', field: 'LinkOrder' }, - }; - app.MG.store.getStoreChannelList(query).then((res) => { - for (let index = 0; index < res.datas.length; index++) { - const item = res.datas[index]; - options.push({ - value: `${item.pathLinks[0].linkPath}\\${item.id}`, - label: item.name, - }); - } - this.setData({ - 'secondList.options': options, - }); - const second = [this.data.secondCode] - this.setData({ - 'secondList.value': second - }) - }); - }, - // 鑾峰彇閲嶇偣椤圭洰 - getProjectList(type) { - const options = []; - const arr = []; - let array = []; - const query = { - refCodes: [type], - }; - app.MG.store.getProductTypeField(query).then((res) => { - array = JSON.parse(res[0].config).option; - for (let index = 0; index < array.length; index++) { - const element = array[index]; - if (element.child) { - for (let index = 0; index < element.child.length; index++) { - const item = element.child[index]; - arr.push(item); - } - } - } - if (type == 'bookClassification') { - for (let index = 0; index < arr.length; index++) { - const element = arr[index]; - options.push({ - value: element.value, - label: element.name, - }); - } - this.setData({ - 'majorProjectList.options': options, - }); - } else if (type == 'newFormsTextbooks') { - for (let index = 0; index < arr.length; index++) { - const element = arr[index]; - options.push({ - value: element.value, - label: element.name, - }); - } - this.setData({ - 'newTextBook.options': options, - }); - console.log('閲嶇偣椤圭洰', this.data.newTextBook); - } - }); - }, - // 鑾峰彇鍥句功鍒楄〃 - getBookList(path) { - let sort; - let pathObj = {}; - if (this.data.pathList.length) { - pathObj = { - subAccess: this.data.pathList, - }; - } else { - pathObj = { - path, - queryType: '*', - }; - } - if (this.data.sort) { - sort = { - Name: this.data.sort, - BaseType: '', - }; - } else { - sort = { - type: 'Desc', - field: 'ViewCount', - }; - } - // 鎼滅储 - let searchObj = {}; - if (this.data.searchValue) { - searchObj = { - 'Name*': this.data.searchValue, - '||author*': this.data.searchValue, - '||isbn*': this.data.searchValue, - '||seriesName*': this.data.searchValue, - }; - } - const query = { - ...pathObj, - filterList: [ - { - value: 'Normal', - field: 'state', - }, - ], - sort, - coverSize: { - height: 145, - }, - paging: { - start: 0, - size: this.data.pageCount.page * 8, - }, - fields: { - author: [], - publicationDate: [], - ...searchObj, - 'bookClassification*': this.data.majorProjectList.value, - 'newFormsTextbooks*': this.data.newTextBook.value, - }, - }; - app.MG.store.getProductList(query).then((res) => { - this.setData({ - bookList: res.datas, - enable: false, - "pageCount.total": res.total - }); - console.log('鍥句功鍒楄〃', res, this.data.pageCount); - }); - }, - // 涓�绾у垎绫诲垏鎹� - onChangeStair(e) { - const path = e.detail.value.length - ? `${this.data.assortCheck.code}\\${e.detail.value}` - : this.data.assortCheck.code; - this.setData({ - pathList: [], - stairCode: e.detail.value, - secondCode: '', - path: path, - 'stairList.value': e.detail.value, - }); - this.getBookList(path); - this.getSecondList(path); - }, - // 浜岀骇鍒嗙被鍒囨崲 - onChangeSecond(e) { - const pathList = []; - for (let index = 0; index < e.detail.value.length; index++) { - const element = e.detail.value[index]; - pathList.push({ - Path: element, - Type: '*', - StoreRefCode: app.config.goodsStore, - }); - } - this.setData({ - pathList: pathList, - 'secondList.value': e.detail.value, - }); - - }, - // - onConfirmSecond() { - this.getBookList(this.data.path); - }, - // 閲嶇偣椤圭洰鏀瑰彉 - changeMajorProject(e) { - this.setData({ - 'majorProjectList.value': e.detail.value, - }); - this.getBookList(this.data.path); - }, - // 閲嶇偣椤圭洰閲嶇疆 - resetMajorProject() { - this.setData({ - 'majorProjectList.value': [], - }); - this.getBookList(this.data.path); - }, - changeNewText(e) { - this.setData({ - 'newTextBook.value': e.detail.value, - }); - this.getBookList(this.data.path); - }, - resetNewText() { - this.setData({ - 'newTextBook.value': [], - }); - this.getBookList(this.data.path); - }, - // 鎺掑簭鎸夐挳 - sortClick() { - if (!this.data.sort.length) { - this.setData({ - sort: 'Desc', - }); - } else if (this.data.sort == 'Desc') { - this.setData({ - sort: 'Asc', - }); - } else if (this.data.sort == 'Asc') { - this.setData({ - sort: '', - }); - } - let path; - if (this.data.secondCode) { - path = this.data.secondCode; - } else if (this.data.stairCode) { - path = `${this.data.assortCheck.code}\\${this.data.stairCode}`; - } else { - path = this.data.assortCheck.code; - } - this.setData({ - path: path, - }); - this.getBookList(path); - }, - // 鎼滅储鍥句功 - searchBook(e) { - console.log(e.detail.value); - this.setData({ - searchValue: e.detail.value, - }); - this.getBookList(this.data.path); - }, - // 璺宠浆鍥句功璇︽儏 - goDetail(e) { - const { book } = e.currentTarget.dataset; - wx.navigateTo({ - url: `/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, - }); - }, - onRefresh() { - this.setData({ enable: true }); - this.getBookList(this.data.path) - }, -}); diff --git a/pages/coupon/components/coupon-card/index.js b/pages/coupon/components/coupon-card/index.js deleted file mode 100644 index 07785fe..0000000 --- a/pages/coupon/components/coupon-card/index.js +++ /dev/null @@ -1,57 +0,0 @@ -const statusMap = { - default: { text: '鍘讳娇鐢�', theme: 'primary' }, - useless: { text: '宸蹭娇鐢�', theme: 'default' }, - disabled: { text: '宸茶繃鏈�', theme: 'default' }, -}; -Component({ - options: { - addGlobalClass: true, - multipleSlots: true, // 鍦ㄧ粍浠跺畾涔夋椂鐨勯�夐」涓惎鐢ㄥslot鏀寔 - }, - - externalClasses: ['coupon-class'], - - properties: { - couponDTO: { - type: Object, - value: {}, // 浼樻儬鍒告暟鎹� - }, - }, - - data: { - btnText: '', - btnTheme: '', - }, - - observers: { - couponDTO: function (couponDTO) { - if (!couponDTO) { - return; - } - const statusInfo = statusMap[couponDTO.status]; - - this.setData({ - btnText: statusInfo.text, - btnTheme: statusInfo.theme, - }); - }, - }, - - attached() {}, - - methods: { - // 璺宠浆鍒拌鎯呴〉 - gotoDetail() { - wx.navigateTo({ - url: `/pages/coupon/coupon-detail/index?id=${this.data.couponDTO.key}`, - }); - }, - - // 璺宠浆鍒板晢鍝佸垪琛� - gotoGoodsList() { - wx.navigateTo({ - url: `/pages/coupon/coupon-activity-goods/index?id=${this.data.couponDTO.key}`, - }); - }, - }, -}); diff --git a/pages/coupon/components/coupon-card/index.json b/pages/coupon/components/coupon-card/index.json deleted file mode 100644 index 2d851d1..0000000 --- a/pages/coupon/components/coupon-card/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "component": true, - "usingComponents": { - "ui-coupon-card": "../ui-coupon-card/index", - "t-button": "tdesign-miniprogram/button/button" - } -} diff --git a/pages/coupon/components/coupon-card/index.wxml b/pages/coupon/components/coupon-card/index.wxml deleted file mode 100644 index 4dd56e1..0000000 --- a/pages/coupon/components/coupon-card/index.wxml +++ /dev/null @@ -1,23 +0,0 @@ -<ui-coupon-card - title="{{couponDTO.title || ''}}" - type="{{couponDTO.type || ''}}" - value="{{couponDTO.value || '0'}}" - tag="{{couponDTO.tag || ''}}" - desc="{{couponDTO.desc || ''}}" - currency="{{couponDTO.currency || ''}}" - timeLimit="{{couponDTO.timeLimit || ''}}" - status="{{couponDTO.status || ''}}" - bind:tap="gotoDetail" -> - <view slot="operator" class="coupon-btn-slot"> - <t-button - t-class="coupon-btn-{{btnTheme}}" - theme="{{btnTheme}}" - variant="outline" - shape="round" - size="extra-small" - bind:tap="gotoGoodsList" - >{{btnText}} - </t-button> - </view> -</ui-coupon-card> diff --git a/pages/coupon/components/coupon-card/index.wxss b/pages/coupon/components/coupon-card/index.wxss deleted file mode 100644 index 905dc40..0000000 --- a/pages/coupon/components/coupon-card/index.wxss +++ /dev/null @@ -1,9 +0,0 @@ -.coupon-btn-default { - display: none; -} - -.coupon-btn-primary { - --td-button-extra-small-padding-horizontal: 26rpx; - --td-button-primary-outline-color: #fa4126; - --td-button-primary-outline-border-color: #fa4126; -} diff --git a/pages/coupon/components/floating-button/index.js b/pages/coupon/components/floating-button/index.js deleted file mode 100644 index f29bcad..0000000 --- a/pages/coupon/components/floating-button/index.js +++ /dev/null @@ -1,17 +0,0 @@ -Component({ - data: { icon: 'cart' }, - - properties: { - count: { - type: Number, - }, - }, - - methods: { - goToCart() { - wx.switchTab({ - url: '/pages/cart/index', - }); - }, - }, -}); diff --git a/pages/coupon/components/floating-button/index.json b/pages/coupon/components/floating-button/index.json deleted file mode 100644 index fa2d209..0000000 --- a/pages/coupon/components/floating-button/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon" - } -} \ No newline at end of file diff --git a/pages/coupon/components/floating-button/index.wxml b/pages/coupon/components/floating-button/index.wxml deleted file mode 100644 index 7f1a9e7..0000000 --- a/pages/coupon/components/floating-button/index.wxml +++ /dev/null @@ -1,14 +0,0 @@ -<view class="floating-button" bind:tap="goToCart"> - <view class="floating-inner-container"> - <t-icon - prefix="wr" - name="{{icon}}" - size="42rpx" - color="#FFFFFF" - /> - </view> - <view class="floating-right-top"> - {{count}} - </view> -</view> - diff --git a/pages/coupon/components/floating-button/index.wxss b/pages/coupon/components/floating-button/index.wxss deleted file mode 100644 index faad943..0000000 --- a/pages/coupon/components/floating-button/index.wxss +++ /dev/null @@ -1,30 +0,0 @@ -.floating-button { - position: fixed; - right: 20rpx; - bottom: 108rpx; -} - -.floating-button .floating-inner-container { - display: flex; - align-items: center; - justify-content: center; - height: 96rpx; - width: 96rpx; - background-color: rgba(0, 0, 0, 0.8); - opacity: 0.7; - border-radius: 48rpx; -} - -.floating-button .floating-right-top { - position: absolute; - right: 0rpx; - top: 0rpx; - height: 28rpx; - background: #fa4126; - border-radius: 64rpx; - font-weight: bold; - font-size: 22rpx; - line-height: 28rpx; - color: #fff; - padding: 0 8rpx; -} diff --git a/pages/coupon/components/ui-coupon-card/index.js b/pages/coupon/components/ui-coupon-card/index.js deleted file mode 100644 index 9101be8..0000000 --- a/pages/coupon/components/ui-coupon-card/index.js +++ /dev/null @@ -1,87 +0,0 @@ -Component({ - options: { - addGlobalClass: true, - multipleSlots: true, - }, - - externalClasses: ['coupon-class'], - - properties: { - mask: { - type: Boolean, - value: false, // 鏄惁娣诲姞閬僵 - }, - superposable: { - type: Boolean, - value: false, // 鏄惁鍙彔鍔� - }, - type: { - type: String, - value: '', // 浼樻儬鍒哥被鍨嬶細CouponType - }, - value: { - type: String, - value: '', // 浼樻儬閲戦 - }, - tag: { - type: String, - value: '', // 浼樻儬鏍囩锛屼紭鎯犲埜鍚嶅瓧鏍囩锛宨mg - }, - desc: { - type: String, - value: '', // 浼樻儬閲戦鎻忚堪锛岄噾棰濅笅鏂� - }, - title: { - type: String, // 浼樻儬鍒稿悕绉� - value: '', - }, - timeLimit: { - type: String, // 浼樻儬鍒告椂闄� - value: '', - }, - ruleDesc: { - type: String, // 浼樻儬鍒搁�傜敤瑙勫垯鎻忚堪 - value: '', - }, - currency: { - type: String, - value: '楼', // 浼樻儬璐у竵 - }, - status: { - type: String, - value: 'default', - }, - image: { - type: String, - value: '', - }, - }, - - data: { - CouponType: { - MJ_COUPON: 1, - ZK_COUPON: 2, - MJF_COUPON: 3, - GIFT_COUPON: 4, - }, - theme: 'primary', - }, - - observers: { - status: function (value) { - let theme = 'primary'; - // 宸茶繃鏈熸垨宸蹭娇鐢ㄧ殑鍒� 棰滆壊缃伆 - if (value === 'useless' || value === 'disabled') { - theme = 'weak'; - } - - this.setData({ theme }); - }, - }, - - attached() { - this.setData({ - color: `color${this.properties.colorStyle}`, - }); - }, -}); diff --git a/pages/coupon/components/ui-coupon-card/index.json b/pages/coupon/components/ui-coupon-card/index.json deleted file mode 100644 index dd874c8..0000000 --- a/pages/coupon/components/ui-coupon-card/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon", - "t-image": "/components/webp-image/index" - } -} \ No newline at end of file diff --git a/pages/coupon/components/ui-coupon-card/index.wxml b/pages/coupon/components/ui-coupon-card/index.wxml deleted file mode 100644 index baf53d9..0000000 --- a/pages/coupon/components/ui-coupon-card/index.wxml +++ /dev/null @@ -1,54 +0,0 @@ -<wxs module="tools"> - function isBigValue(value) { - var values = (value + '').split('.'); - if (values[1] && values[0].length >= 3) return true; - else return false - } - - function getBigValues(value) { - return value.split('.'); - } - - module.exports = { isBigValue: isBigValue, getBigValues: getBigValues }; -</wxs> -<view class="wr-coupon coupon-class theme-{{theme}}"> - <view class="wr-coupon__left"> - <view wx:if="{{type == CouponType.ZK_COUPON || type === CouponType.MERCHANT_ZK_COUPON}}"> - <text class="wr-coupon__left--value">{{value}}</text> - <text class="wr-coupon__left--unit">鎶�</text> - <view class="wr-coupon__left--desc">{{desc}}</view> - </view> - <view wx:if="{{type == CouponType.MJ_COUPON || type === CouponType.MERCHANT_MJ_COUPON}}"> - <text class="wr-coupon__left--value" wx:if="{{tools.isBigValue(value)}}"> - <text class="wr-coupon__left--value-int">{{tools.getBigValues(value)[0]}}</text> - <text class="wr-coupon__left--value-decimal">.{{tools.getBigValues(value)[1]}}</text> - </text> - <text class="wr-coupon__left--value" wx:else>{{value / 100}}</text> - <text class="wr-coupon__left--unit">鍏�</text> - <view class="wr-coupon__left--desc">{{desc}}</view> - </view> - <view wx:if="{{type === CouponType.MJF_COUPON || type === CouponType.MYF_COUPON}}"> - <text class="wr-coupon__left--value" style="font-family: PingFang SC;font-size: 44rpx">鍏嶉偖</text> - <view class="wr-coupon__left--desc">{{desc}}</view> - </view> - <view wx:if="{{type == CouponType.GIFT_COUPON}}"> - <t-image t-class="wr-coupon__left--image" src="{{image}}" mode="aspectFill" /> - </view> - </view> - <view class="wr-coupon__right"> - <view class="wr-coupon__right--title"> - <text class="coupon-title">{{title}}</text> - <view class="coupon-time">{{timeLimit}}</view> - <view class="coupon-desc"> - <view wx:if="{{ruleDesc}}">{{ruleDesc}}</view> - </view> - </view> - <view class="wr-coupon__right--oper"> - <slot name="operator" /> - </view> - </view> - <view wx:if="{{status === 'useless' || status === 'disabled'}}" class="wr-coupon__seal seal-{{status}}}" /> - <view wx:if="{{mask}}" class="wr-coupon__mask" /> - <view wx:if="{{superposable}}" class="wr-coupon__tag">鍙彔鍔�</view> -</view> - diff --git a/pages/coupon/components/ui-coupon-card/index.wxss b/pages/coupon/components/ui-coupon-card/index.wxss deleted file mode 100644 index 0ef9648..0000000 --- a/pages/coupon/components/ui-coupon-card/index.wxss +++ /dev/null @@ -1,147 +0,0 @@ -.wr-coupon { - display: flex; - background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/coupon/coupon-bg-nocorners.png'); - background-size: 100% 100%; - background-repeat: no-repeat; - position: relative; - margin-bottom: 24rpx; - overflow: hidden; -} -.theme-weak.wr-coupon { - background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/coupon/coupon-bg-grey2.png'); -} - -.wr-coupon__left { - width: 200rpx; - height: 180rpx; - display: flex; - flex-direction: column; - justify-content: center; - text-align: center; - color: #fa4126; - overflow: hidden; - position: relative; -} -.theme-weak .wr-coupon__left { - color: #333; -} - -.wr-coupon__left--value { - font-size: 64rpx; - line-height: 88rpx; - font-weight: bold; - font-family: 'DIN Alternate', cursive; -} -.wr-coupon__left--value-int { - font-size: 48rpx; - line-height: 88rpx; -} -.wr-coupon__left--value-decimal { - font-size: 36rpx; - line-height: 48rpx; -} -.wr-coupon__left--image { - width: 128rpx; - height: 128rpx; - border-radius: 8px; - margin-top: 30rpx; -} -.wr-coupon__left--unit { - font-size: 24rpx; - line-height: 32rpx; -} -.wr-coupon__left--desc { - font-size: 24rpx; - line-height: 32rpx; - color: #fa4126; -} - -.theme-weak .wr-coupon__left--desc { - color: #333; -} - -.wr-coupon__right { - flex-grow: 1; - padding: 0 20rpx; - height: 180rpx; - box-sizing: border-box; - overflow: hidden; - display: flex; - align-items: center; -} -.wr-coupon__right--title { - display: flex; - -webkit-display: flex; - flex-direction: column; - align-items: flex-start; - color: #999999; - font-size: 24rpx; - flex: 1; -} -.wr-coupon__right--title .coupon-title { - max-width: 320rpx; - color: #333333; - font-size: 28rpx; - line-height: 40rpx; - font-weight: bold; - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - overflow: hidden; - white-space: normal; -} -.wr-coupon__right--title .coupon-time { - margin-top: 16rpx; - /* // letter-spacing: -0.05em; */ -} -.wr-coupon__right--title .coupon-desc { - margin-top: 8rpx; -} -.wr-coupon__right--title .coupon-arrow { - font-size: 22rpx; -} -.wr-coupon__right--oper { - display: flex; - justify-content: center; - align-items: center; -} -.wr-coupon__mask { - width: 702rpx; - height: 182rpx; - position: absolute; - top: 0; - left: 0; - background-color: #ffffff; - opacity: 0.5; -} -.wr-coupon__tag { - position: absolute; - top: 8px; - right: -24rpx; - text-align: center; - width: 106rpx; - height: 28rpx; - opacity: 0.9; - font-size: 20rpx; - line-height: 28rpx; - color: #fa4126; - border: 0.5px solid #fa4126; - box-sizing: border-box; - transform: rotate(45deg); -} -.wr-coupon__seal { - width: 128rpx; - height: 128rpx; - position: absolute; - top: 0; - right: 0; - background-size: 100% 100%; -} - -.wr-coupon__seal.seal-useless { - background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/coupon/seal-used.png'); -} - -.wr-coupon__seal.seal-disabled { - background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/coupon/coupon-expired.png'); -} diff --git a/pages/coupon/coupon-activity-goods/index.js b/pages/coupon/coupon-activity-goods/index.js deleted file mode 100644 index bf08d36..0000000 --- a/pages/coupon/coupon-activity-goods/index.js +++ /dev/null @@ -1,78 +0,0 @@ -import { fetchCouponDetail } from '../../../services/coupon/index'; -import { fetchGoodsList } from '../../../services/good/fetchGoods'; -import Toast from 'tdesign-miniprogram/toast/index'; - -Page({ - data: { - goods: [], - detail: {}, - couponTypeDesc: '', - showStoreInfoList: false, - cartNum: 2, - }, - - id: '', - - onLoad(query) { - const id = parseInt(query.id); - this.id = id; - - this.getCouponDetail(id); - this.getGoodsList(id); - }, - - getCouponDetail(id) { - fetchCouponDetail(id).then(({ detail }) => { - this.setData({ detail }); - if (detail.type === 2) { - if (detail.base > 0) { - this.setData({ - couponTypeDesc: `婊�${detail.base / 100}鍏�${detail.value}鎶榒, - }); - } else { - this.setData({ couponTypeDesc: `${detail.value}鎶榒 }); - } - } else if (detail.type === 1) { - if (detail.base > 0) { - this.setData({ - couponTypeDesc: `婊�${detail.base / 100}鍏冨噺${detail.value / 100}鍏僠, - }); - } else { - this.setData({ couponTypeDesc: `鍑�${detail.value / 100}鍏僠 }); - } - } - }); - }, - - getGoodsList(id) { - fetchGoodsList(id).then((goods) => { - this.setData({ goods }); - }); - }, - - openStoreList() { - this.setData({ - showStoreInfoList: true, - }); - }, - - closeStoreList() { - this.setData({ - showStoreInfoList: false, - }); - }, - - goodClickHandle(e) { - const { index } = e.detail; - const { spuId } = this.data.goods[index]; - wx.navigateTo({ url: `/pages/goods/details/index?spuId=${spuId}` }); - }, - - cartClickHandle() { - Toast({ - context: this, - selector: '#t-toast', - message: '鐐瑰嚮鍔犲叆璐墿杞�', - }); - }, -}); diff --git a/pages/coupon/coupon-activity-goods/index.json b/pages/coupon/coupon-activity-goods/index.json deleted file mode 100644 index 31cf9c3..0000000 --- a/pages/coupon/coupon-activity-goods/index.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "navigationBarTitleText": "娲诲姩鍟嗗搧", - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon", - "t-popup": "tdesign-miniprogram/popup/popup", - "t-toast": "tdesign-miniprogram/toast/toast", - "goods-list": "/components/goods-list/index", - "floating-button": "../components/floating-button/index" - } -} \ No newline at end of file diff --git a/pages/coupon/coupon-activity-goods/index.wxml b/pages/coupon/coupon-activity-goods/index.wxml deleted file mode 100644 index 1c55b7f..0000000 --- a/pages/coupon/coupon-activity-goods/index.wxml +++ /dev/null @@ -1,40 +0,0 @@ -<view class="coupon-page-container"> - <view class="notice-bar-content"> - <view class="notice-bar-text"> - 浠ヤ笅鍟嗗搧鍙娇鐢� - <text class="height-light">{{couponTypeDesc}}</text> - 浼樻儬鍒� - </view> - <t-icon name="help-circle" size="32rpx" color="#AAAAAA" bind:tap="openStoreList" /> - </view> - <view class="goods-list-container"> - <goods-list - wr-class="goods-list-wrap" - goodsList="{{goods}}" - bind:click="goodClickHandle" - bind:addcart="cartClickHandle" - /> - </view> - <floating-button count="{{cartNum}}" /> - <t-popup visible="{{showStoreInfoList}}" placement="bottom" bind:visible-change="closeStoreList"> - <t-icon slot="closeBtn" name="close" size="40rpx" bind:tap="closeStoreList" /> - <view class="popup-content-wrap"> - <view class="popup-content-title"> 瑙勫垯璇︽儏 </view> - <view class="desc-group-wrap"> - <view wx:if="{{detail && detail.timeLimit}}" class="item-wrap"> - <view class="item-title">浼樻儬鍒告湁鏁堟椂闂�</view> - <view class="item-label">{{detail.timeLimit}}</view> - </view> - <view wx:if="{{detail && detail.desc}}" class="item-wrap"> - <view class="item-title">浼樻儬鍒歌鏄�</view> - <view class="item-label">{{detail.desc}}</view> - </view> - <view wx:if="{{detail && detail.useNotes}}" class="item-wrap"> - <view class="item-title">浣跨敤椤荤煡</view> - <view class="item-label">{{detail.useNotes}}</view> - </view> - </view> - </view> - </t-popup> -</view> -<t-toast id="t-toast" /> diff --git a/pages/coupon/coupon-activity-goods/index.wxss b/pages/coupon/coupon-activity-goods/index.wxss deleted file mode 100644 index 3217203..0000000 --- a/pages/coupon/coupon-activity-goods/index.wxss +++ /dev/null @@ -1,69 +0,0 @@ -page { - background-color: #f5f5f5; -} - -.coupon-page-container .notice-bar-content { - display: flex; - flex-direction: row; - align-items: center; - padding: 8rpx 0; -} - -.coupon-page-container .notice-bar-text { - font-size: 26rpx; - line-height: 36rpx; - font-weight: 400; - color: #666666; - margin-left: 24rpx; - margin-right: 12rpx; -} - -.coupon-page-container .notice-bar-text .height-light { - color: #fa550f; -} - -.coupon-page-container .popup-content-wrap { - background-color: #fff; - border-top-left-radius: 20rpx; - border-top-right-radius: 20rpx; -} - -.coupon-page-container .popup-content-title { - font-size: 32rpx; - color: #333; - text-align: center; - height: 104rpx; - line-height: 104rpx; - position: relative; -} - -.coupon-page-container .desc-group-wrap { - padding-bottom: env(safe-area-inset-bottom); -} - -.coupon-page-container .desc-group-wrap .item-wrap { - margin: 0 30rpx 30rpx; -} - -.coupon-page-container .desc-group-wrap .item-title { - font-size: 26rpx; - color: #333; - font-weight: 500; -} - -.coupon-page-container .desc-group-wrap .item-label { - font-size: 24rpx; - color: #666; - margin-top: 12rpx; - white-space: pre-line; - word-break: break-all; - line-height: 34rpx; -} - -.coupon-page-container .goods-list-container { - margin: 0 24rpx 24rpx; -} - -.coupon-page-container .goods-list-wrap { - background: #f5f5f5 !important; -} diff --git a/pages/coupon/coupon-detail/index.js b/pages/coupon/coupon-detail/index.js deleted file mode 100644 index 71ff5d6..0000000 --- a/pages/coupon/coupon-detail/index.js +++ /dev/null @@ -1,32 +0,0 @@ -import { fetchCouponDetail } from '../../../services/coupon/index'; - -Page({ - data: { - detail: null, - storeInfoList: [], - storeInfoStr: '', - showStoreInfoList: false, - }, - - id: '', - - onLoad(query) { - const id = parseInt(query.id); - this.id = id; - this.getGoodsList(id); - }, - - getGoodsList(id) { - fetchCouponDetail(id).then(({ detail }) => { - this.setData({ - detail, - }); - }); - }, - - navGoodListHandle() { - wx.navigateTo({ - url: `/pages/coupon/coupon-activity-goods/index?id=${this.id}`, - }); - }, -}); diff --git a/pages/coupon/coupon-detail/index.json b/pages/coupon/coupon-detail/index.json deleted file mode 100644 index d419a0b..0000000 --- a/pages/coupon/coupon-detail/index.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "navigationBarTitleText": "浼樻儬鍒歌鎯�", - "usingComponents": { - "coupon-card": "../components/coupon-card/index", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", - "t-button": "tdesign-miniprogram/button/button", - "t-icon": "tdesign-miniprogram/icon/icon" - } -} \ No newline at end of file diff --git a/pages/coupon/coupon-detail/index.wxml b/pages/coupon/coupon-detail/index.wxml deleted file mode 100644 index 8c447c2..0000000 --- a/pages/coupon/coupon-detail/index.wxml +++ /dev/null @@ -1,45 +0,0 @@ -<!-- 浼樻儬鍒� --> -<view class="coupon-card-wrap"> - <coupon-card couponDTO="{{detail}}" /> -</view> -<!-- 璇存槑 --> -<view class="desc-wrap"> - <t-cell-group t-class="desc-group-wrap"> - <t-cell - wx:if="{{detail && detail.desc}}" - t-class="t-class-cell" - t-class-title="t-class-title" - t-class-note="t-class-note" - title="瑙勫垯璇存槑" - note="{{detail && detail.desc}}" - /> - <t-cell - wx:if="{{detail && detail.timeLimit}}" - t-class="t-class-cell" - t-class-title="t-class-title" - t-class-note="t-class-note" - title="鏈夋晥鏃堕棿" - note="{{detail && detail.timeLimit}}" - /> - <t-cell - wx:if="{{detail && detail.storeAdapt}}" - t-class="t-class-cell" - t-class-title="t-class-title" - t-class-note="t-class-note" - title="閫傜敤鑼冨洿" - note="{{detail && detail.storeAdapt}}" - /> - <t-cell - wx:if="{{detail && detail.useNotes}}" - t-class="t-class-cell" - t-class-title="t-class-title" - t-class-note="t-class-note" - title="浣跨敤椤荤煡" - note="{{detail && detail.useNotes}}" - /> - </t-cell-group> - <!-- 鏌ョ湅鍙敤鍟嗗搧 --> - <view class="button-wrap"> - <t-button shape="round" block bindtap="navGoodListHandle"> 鏌ョ湅鍙敤鍟嗗搧 </t-button> - </view> -</view> diff --git a/pages/coupon/coupon-detail/index.wxss b/pages/coupon/coupon-detail/index.wxss deleted file mode 100644 index 8fb1fe7..0000000 --- a/pages/coupon/coupon-detail/index.wxss +++ /dev/null @@ -1,91 +0,0 @@ -page { - background-color: #f5f5f5; -} - -.coupon-card-wrap { - background-color: #fff; - padding: 32rpx 32rpx 1rpx; -} -.desc-wrap { - margin-top: 24rpx; -} -.desc-wrap .button-wrap { - margin: 50rpx 32rpx 0; -} - -.desc-group-wrap .t-class-cell { - align-items: flex-start; -} - -.desc-group-wrap .t-class-title { - font-size: 26rpx; - width: 140rpx; - flex: none; - color: #888; -} - -.desc-group-wrap .t-class-note { - font-size: 26rpx; - word-break: break-all; - white-space: pre-line; - justify-content: flex-start; - color: #333; -} - -.desc-group-wrap { - border-radius: 8rpx; - overflow: hidden; - - --cell-label-font-size: 26rpx; - --cell-label-line-height: 36rpx; - --cell-label-color: #999; -} - -.desc-group-wrap.in-popup { - border-radius: 0; - overflow: auto; - max-height: 828rpx; -} - -.desc-group-wrap .wr-cell__title { - color: #333; - font-size: 28rpx; -} - -/* .desc-group-wrap .max-width-cell { - overflow: hidden; -} */ - -/* .desc-group-wrap .signal-line-label { - word-break: keep-all; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.desc-group-wrap .multi-line-label { - word-break: break-all; - white-space: pre-line; -} */ - -.popup-content-wrap { - background-color: #fff; - border-top-left-radius: 20rpx; - border-top-right-radius: 20rpx; -} - -.popup-content-title { - font-size: 32rpx; - color: #333; - - text-align: center; - height: 104rpx; - line-height: 104rpx; - - position: relative; -} - -.popup-content-title .close-icon { - position: absolute; - top: 24rpx; - right: 24rpx; -} diff --git a/pages/coupon/coupon-list/index.js b/pages/coupon/coupon-list/index.js deleted file mode 100644 index f3b8675..0000000 --- a/pages/coupon/coupon-list/index.js +++ /dev/null @@ -1,77 +0,0 @@ -import { fetchCouponList } from '../../../services/coupon/index'; - -Page({ - data: { - status: 0, - list: [ - { - text: '鍙娇鐢�', - key: 0, - }, - { - text: '宸蹭娇鐢�', - key: 1, - }, - { - text: '宸插け鏁�', - key: 2, - }, - ], - - couponList: [], - }, - - onLoad() { - this.init(); - }, - - init() { - this.fetchList(); - }, - - fetchList(status = this.data.status) { - let statusInFetch = ''; - switch (Number(status)) { - case 0: { - statusInFetch = 'default'; - break; - } - case 1: { - statusInFetch = 'useless'; - break; - } - case 2: { - statusInFetch = 'disabled'; - break; - } - default: { - throw new Error(`unknown fetchStatus: ${statusInFetch}`); - } - } - fetchCouponList(statusInFetch).then((couponList) => { - this.setData({ couponList }); - }); - }, - - tabChange(e) { - const { value } = e.detail; - - this.setData({ status: value }); - this.fetchList(value); - }, - - goCouponCenterHandle() { - wx.showToast({ title: '鍘婚鍒镐腑蹇�', icon: 'none' }); - }, - - onPullDownRefresh_() { - this.setData( - { - couponList: [], - }, - () => { - this.fetchList(); - }, - ); - }, -}); diff --git a/pages/coupon/coupon-list/index.json b/pages/coupon/coupon-list/index.json deleted file mode 100644 index 64b7e4b..0000000 --- a/pages/coupon/coupon-list/index.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "navigationBarTitleText": "浼樻儬鍒�", - "usingComponents": { - "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh", - "t-tabs": "tdesign-miniprogram/tabs/tabs", - "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", - "t-icon": "tdesign-miniprogram/icon/icon", - "coupon-card": "../components/coupon-card/index" - } -} \ No newline at end of file diff --git a/pages/coupon/coupon-list/index.wxml b/pages/coupon/coupon-list/index.wxml deleted file mode 100644 index 391fe7b..0000000 --- a/pages/coupon/coupon-list/index.wxml +++ /dev/null @@ -1,42 +0,0 @@ -<t-tabs - defaultValue="{{status}}" - bind:change="tabChange" - tabList="{{list}}" - t-class="tabs-external__inner" - t-class-item="tabs-external__item" - t-class-active="tabs-external__active" - t-class-track="tabs-external__track" -> - <t-tab-panel - wx:for="{{list}}" - wx:for-index="index" - wx:for-item="tab" - wx:key="key" - label="{{tab.text}}" - value="{{tab.key}}" - /> -</t-tabs> -<view class="coupon-list-wrap"> - <t-pull-down-refresh - t-class-indicator="t-class-indicator" - id="t-pull-down-refresh" - bind:refresh="onPullDownRefresh_" - background="#fff" - > - <view class="coupon-list-item" wx:for="{{couponList}}" wx:key="key"> - <coupon-card couponDTO="{{item}}" /> - </view> - </t-pull-down-refresh> - <view class="center-entry"> - <view class="center-entry-btn" bind:tap="goCouponCenterHandle"> - <view>棰嗗埜涓績</view> - <t-icon - name="chevron-right" - color="#fa4126" - size="40rpx" - style="line-height: 28rpx;" - /> - </view> - </view> -</view> - diff --git a/pages/coupon/coupon-list/index.wxss b/pages/coupon/coupon-list/index.wxss deleted file mode 100644 index 4e28302..0000000 --- a/pages/coupon/coupon-list/index.wxss +++ /dev/null @@ -1,78 +0,0 @@ -page { - height: 100%; -} - -.tabs-external__inner { - height: 88rpx; - width: 100%; - line-height: 88rpx; - z-index: 100; -} -.tabs-external__inner { - font-size: 26rpx; - color: #333333; - position: fixed; - width: 100vw; - top: 0; - left: 0; -} - -.tabs-external__inner .tabs-external__track { - background: #fa4126 !important; -} - -.tabs-external__inner .tabs-external__item { - color: #666; -} - -.tabs-external__inner .tabs-external__active { - font-size: 28rpx; - color: #fa4126 !important; -} - -.tabs-external__inner.order-nav .order-nav-item .bottom-line { - bottom: 12rpx; -} - -.coupon-list-wrap { - margin-top: 32rpx; - margin-left: 32rpx; - margin-right: 32rpx; - overflow-y: auto; - padding-bottom: 100rpx; - padding-bottom: calc(constant(safe-area-inset-top) + 100rpx); - padding-bottom: calc(env(safe-area-inset-bottom) + 100rpx); - -webkit-overflow-scrolling: touch; -} - -.center-entry { - box-sizing: content-box; - border-top: 1rpx solid #dce0e4; - background-color: #fff; - position: fixed; - bottom: 0; - left: 0; - right: 0; - height: 100rpx; - padding-bottom: 0; - padding-bottom: constant(safe-area-inset-top); - padding-bottom: env(safe-area-inset-bottom); -} - -.center-entry-btn { - color: #fa4126; - font-size: 28rpx; - text-align: center; - line-height: 100rpx; - display: flex; - align-items: center; - justify-content: center; - height: 100rpx; -} - -.coupon-list-wrap .t-pull-down-refresh__bar { - background: #fff !important; -} -.t-class-indicator { - color: #b9b9b9 !important; -} diff --git a/pages/goods/category/components/goods-category/components/c-sidebar/README.md b/pages/goods/category/components/goods-category/components/c-sidebar/README.md deleted file mode 100644 index 88d7b0b..0000000 --- a/pages/goods/category/components/goods-category/components/c-sidebar/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Sidebar 渚ц竟瀵艰埅 - -### 寮曞叆 - -鍏ㄥ眬寮曞叆锛屽湪miniprogram鏍圭洰褰曚笅鐨刞app.json`涓厤缃紝灞�閮ㄥ紩鍏ワ紝鍦ㄩ渶瑕佸紩鍏ョ殑椤甸潰鎴栫粍浠剁殑`index.json`涓厤缃�� - -```json -// app.json 鎴� index.json -"usingComponents": { - "wr-sidebar": "path/to/components/goods-category/wr-sidebar/index", - "wr-sidebar-item": "path/to/component/goods-category/wr-sidebar/wr-sidebar-item/index" -} -``` - -## 浠g爜婕旂ず - -### 鍩虹鐢ㄦ硶 - -閫氳繃鍦╜wr-sidebar`涓婅缃甡activeKey`灞炴�ф潵鎺у埗閫変腑椤� - -```html -<wr-sidebar active-key="{{ activeKey }}" bind:change="onChange"> - <wr-sidebar-item title="鏍囩鍚嶇О" /> - <wr-sidebar-item title="鏍囩鍚嶇О" /> - <wr-sidebar-item title="鏍囩鍚嶇О" /> -</wr-sidebar> -``` - -``` javascript -Page({ - data: { - activeKey: 0 - }, - - onChange(event) { - wx.showToast({ - icon: 'none', - title: `鍒囨崲鑷崇${event.detail}椤筦 - }); - } -}); -``` - -### 鎻愮ず姘旀场锛堟殏鏈疄鐜帮級 - -璁剧疆`dot`灞炴�у悗锛屼細鍦ㄥ彸涓婅灞曠ず涓�涓皬绾㈢偣銆傝缃甡info`灞炴�у悗锛屼細鍦ㄥ彸涓婅灞曠ず鐩稿簲鐨勫窘鏍� - -```html -<wr-sidebar active-key="{{ activeKey }}"> - <wr-sidebar-item title="鏍囩鍚嶇О" dot /> - <wr-sidebar-item title="鏍囩鍚嶇О" info="5" /> - <wr-sidebar-item title="鏍囩鍚嶇О" info="99+" /> -</wr-sidebar> -``` - -## API - -### Sidebar Props - -| 鍙傛暟 | 璇存槑 | 绫诲瀷 | 榛樿鍊� | 鐗堟湰 | -|-----------|-----------|-----------|-------------|-------------| -| activeKey | 閫変腑椤圭殑绱㈠紩 | *string \| number* | `0` | - | - -### Sidebar Event - -| 浜嬩欢鍚� | 璇存槑 | 鍙傛暟 | -|------|------|------| -| change | 鍒囨崲閫夐」鏃惰Е鍙� | 褰撳墠閫変腑閫夐」鐨勭储寮� | - -### Sidebar 澶栭儴鏍峰紡绫� - -| 绫诲悕 | 璇存槑 | -|-----------|-----------| -| custom-class | 鏍硅妭鐐规牱寮忕被 | - -### SidebarItem Props - -| 鍙傛暟 | 璇存槑 | 绫诲瀷 | 榛樿鍊� | 鐗堟湰 | -|-----------|-----------|-----------|-------------|-------------| -| title | 鍐呭 | *string* | `''` | - | -| disabled | 鏄惁绂佺敤 | | *boolean* | `false` | - | -| dot | 鏄惁鏄剧ず鍙充笂瑙掑皬绾㈢偣 | *boolean* | `false` | - | -| info | 鎻愮ず娑堟伅 | *string \| number* | `''` | - | - -### SidebarItem Event - -| 浜嬩欢鍚� | 璇存槑 | 鍙傛暟 | -|------|------|------| -| click | 鐐瑰嚮寰界珷鏃惰Е鍙� | 褰撳墠寰界珷鐨勭储寮� | - -### SidebarItem 澶栭儴鏍峰紡绫� - -| 绫诲悕 | 璇存槑 | -|-----------|-----------| -| custom-class | 鏍硅妭鐐规牱寮忕被 | diff --git a/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.js b/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.js deleted file mode 100644 index 810d5e5..0000000 --- a/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.js +++ /dev/null @@ -1,51 +0,0 @@ -Component({ - relations: { - '../../c-sidebar/index': { - type: 'ancestor', - linked(target) { - this.parent = target; - }, - }, - }, - - externalClasses: ['custom-class'], - properties: { - title: String, - disabled: Boolean, - }, - - data: { - topRightRadius: false, - bottomRightRadius: false, - }, - - methods: { - setActive(selected) { - return this.setData({ selected }); - }, - onClick() { - const { parent } = this; - - if (!parent || this.properties.disabled) { - return; - } - - const index = parent.children.indexOf(this); - - parent.setActive(index).then(() => { - this.triggerEvent('click', index); - parent.triggerEvent('change', { index }); - }); - }, - setTopRightRadius(val) { - return this.setData({ - topRightRadius: val, - }); - }, - setBottomRightRadius(val) { - return this.setData({ - bottomRightRadius: val, - }); - }, - }, -}); diff --git a/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.json b/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.json deleted file mode 100644 index e8cfaaf..0000000 --- a/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.wxml b/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.wxml deleted file mode 100644 index 435f1e9..0000000 --- a/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.wxml +++ /dev/null @@ -1,10 +0,0 @@ -<view class="c-sidebar-item-container"> - <view - class="c-sidebar-item {{ selected ? 'active' : '' }} {{ disabled ? 'disabled' : '' }} {{topRightRadius ? 'top-right-radius' : ''}} {{bottomRightRadius ? 'bottom-right-radius' : ''}} custom-class" - hover-class="c-sidebar-item--hover" - hover-stay-time="70" - bind:tap="onClick" - > - <view class="c-sidebar-item__text text-overflow"> {{ title }} </view> - </view> -</view> diff --git a/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.wxss b/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.wxss deleted file mode 100644 index 28d50dc..0000000 --- a/pages/goods/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.wxss +++ /dev/null @@ -1,60 +0,0 @@ -.c-sidebar-item { - display: flex; - justify-content: center; - text-align: center; - background-color: #f5f5f5; - color: #222427; - padding: 20rpx 0; - font-size: 26rpx; -} - -.c-sidebar-item.active { - position: relative; - background: white; -} - -.c-sidebar-item.active::before { - content: ''; - position: absolute; - width: 6rpx; - height: 48rpx; - background-color: #fa4126; - left: 0; - top: 50%; - transform: translate(0, -50%); - border-radius: 64rpx; -} - -.c-sidebar-item__text { - width: 136rpx; - height: 36rpx; - padding: 8rpx 0; - line-height: 36rpx; - text-align: center; - font-size: 28rpx; - color: #666666; -} - -.c-sidebar-item.active .c-sidebar-item__text { - background-color: white; - border-radius: 36rpx; - color: #fa4126; -} - -.text-overflow { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.top-right-radius { - border-top-right-radius: 16rpx; -} - -.bottom-right-radius { - border-bottom-right-radius: 16rpx; -} - -.c-sidebar-item-container { - background-color: white; -} diff --git a/pages/goods/category/components/goods-category/components/c-sidebar/index.js b/pages/goods/category/components/goods-category/components/c-sidebar/index.js deleted file mode 100644 index b057ad1..0000000 --- a/pages/goods/category/components/goods-category/components/c-sidebar/index.js +++ /dev/null @@ -1,106 +0,0 @@ -Component({ - relations: { - './c-sidebar-item/index': { - type: 'descendant', - linked(target) { - this.children.push(target); - this.setActive(this.properties.activeKey, true); - }, - unlinked(target) { - this.children = this.children.filter((item) => item !== target); - this.setActive(this.properties.activeKey, true); - }, - }, - }, - - externalClasses: ['custom-class'], - - properties: { - activeKey: { - type: Number, - value: 0, - }, - }, - observers: { - activeKey(newVal) { - this.setActive(newVal); - }, - }, - - created() { - this.children = []; - this.currentActive = -1; - this.topRightRadiusItemIndexs = []; - this.bottomRightRadiusItemIndexs = []; - }, - - methods: { - setActive(activeKey, isChildrenChange) { - const { - children, - currentActive, - topRightRadiusItemIndexs: preTopRightRadiusItemIndexs, - bottomRightRadiusItemIndexs: preBottomRightRadiusItemIndexs, - } = this; - - if (!children.length) { - return Promise.resolve(); - } - - if (activeKey === currentActive && !isChildrenChange) { - return Promise.resolve(); - } - - this.currentActive = activeKey; - this.topRightRadiusItemIndexs = this.getTopRightRadiusItemIndexs( - activeKey, - children, - ); - this.bottomRightRadiusItemIndexs = this.getBottomRightRadiusItemIndexs( - activeKey, - children, - ); - - const stack = []; // 浠诲姟鍒楄〃锛屽瓨鏀捐皟鐢ㄥ瓙缁勪欢鐨剆etActive鍚庤繑鍥炵殑涓�鍫唒romise - - // 灏嗘棫鐨勯�変腑椤规敼涓篺alse - if (currentActive !== activeKey && children[currentActive]) { - stack.push(children[currentActive].setActive(false)); - } - - // 灏嗘柊鐨勯�変腑椤规敼涓簍rue - if (children[activeKey]) { - stack.push(children[activeKey].setActive(true)); - } - - preTopRightRadiusItemIndexs.forEach((item) => { - stack.push(children[item].setTopRightRadius(false)); - }); - - preBottomRightRadiusItemIndexs.forEach((item) => { - stack.push(children[item].setBottomRightRadius(false)); - }); - - this.topRightRadiusItemIndexs.forEach((item) => { - stack.push(children[item].setTopRightRadius(true)); - }); - - this.bottomRightRadiusItemIndexs.forEach((item) => { - stack.push(children[item].setBottomRightRadius(true)); - }); - - return Promise.all(stack); - }, - getTopRightRadiusItemIndexs(activeKey, children) { - const { length } = children; - if (activeKey !== 0 && activeKey < length - 1) return [0, activeKey + 1]; - if (activeKey !== 0) return [0]; - if (activeKey < length - 1) return [activeKey + 1]; - return []; - }, - getBottomRightRadiusItemIndexs(activeKey) { - if (activeKey !== 0) return [activeKey - 1]; - return []; - }, - }, -}); diff --git a/pages/goods/category/components/goods-category/components/c-sidebar/index.json b/pages/goods/category/components/goods-category/components/c-sidebar/index.json deleted file mode 100644 index 84ff738..0000000 --- a/pages/goods/category/components/goods-category/components/c-sidebar/index.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true -} - \ No newline at end of file diff --git a/pages/goods/category/components/goods-category/components/c-sidebar/index.wxml b/pages/goods/category/components/goods-category/components/c-sidebar/index.wxml deleted file mode 100644 index a1fe026..0000000 --- a/pages/goods/category/components/goods-category/components/c-sidebar/index.wxml +++ /dev/null @@ -1,3 +0,0 @@ -<scroll-view class="c-sidebar custom-class" scroll-y> - <slot /> -</scroll-view> diff --git a/pages/goods/category/components/goods-category/components/c-sidebar/index.wxss b/pages/goods/category/components/goods-category/components/c-sidebar/index.wxss deleted file mode 100644 index 95e59ff..0000000 --- a/pages/goods/category/components/goods-category/components/c-sidebar/index.wxss +++ /dev/null @@ -1,9 +0,0 @@ -.c-sidebar { - width: 176rpx; - height: 100vh; -} -.c-sidebar::-webkit-scrollbar { - width: 0; - height: 0; - color: transparent; -} diff --git a/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.js b/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.js deleted file mode 100644 index 2b6f95d..0000000 --- a/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.js +++ /dev/null @@ -1,37 +0,0 @@ -Component({ - externalClasses: ['custom-class'], - - properties: { - tabList: Array, - }, - - data: { - unfolded: false, - boardMaxHeight: null, - }, - attached() { - wx.createSelectorQuery() - .in(this) - .select('.c-tabbar-more') - .boundingClientRect((rect) => { - this.setData({ boardMaxHeight: rect.height }); - }) - .exec(); - }, - - methods: { - changeFold() { - this.setData({ - unfolded: !this.data.unfolded, - }); - const { unfolded } = this.data; - this.triggerEvent('change', { unfolded }); - }, - - onSelect(event) { - const activeKey = event.currentTarget.dataset.index; - this.triggerEvent('select', activeKey); - this.changeFold(); - }, - }, -}); diff --git a/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.json b/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.json deleted file mode 100644 index a89ef4d..0000000 --- a/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} diff --git a/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.wxml b/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.wxml deleted file mode 100644 index 0ea9ad4..0000000 --- a/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.wxml +++ /dev/null @@ -1,25 +0,0 @@ -<view class="c-tabbar-more"> - <view class="c-tabbar-more__btn" bind:tap="changeFold"> - <view class="wr {{unfolded ? 'wr-arrow-up':'wr-arrow-down'}}"></view> - </view> - <view class="t-tabbar-more__boardwrapper" wx:if="{{ unfolded }}"> - <view class="t-tabbar-more__mask"></view> - <scroll-view - class="c-tabbar-more__board" - style="{{ boardMaxHeight ? 'height:' + boardMaxHeight + 'px;' : '' }}" - scroll-y - > - <view class="c-tabbar-more__boardinner"> - <view - class="c-tabbar-more__item text-overflow" - wx:for="{{ tabList }}" - wx:key="index" - data-index="{{ index }}" - bind:tap="onSelect" - > - {{ item.name }} - </view> - </view> - </scroll-view> - </view> -</view> diff --git a/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.wxss b/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.wxss deleted file mode 100644 index d0d08b3..0000000 --- a/pages/goods/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.wxss +++ /dev/null @@ -1,63 +0,0 @@ -.c-tabbar-more { - width: 100%; - height: calc(100% - var(--tabbar-height, 100rpx)); - position: absolute; - top: var(--tabbar-height, 100rpx); -} -.c-tabbar-more__btn { - position: absolute; - top: calc(0rpx - var(--tabbar-height, 100rpx)); - right: 0; - width: 80rpx; - height: var(--tabbar-height, 100rpx); - line-height: var(--tabbar-height, 100rpx); - background-color: var(--tabbar-background-color, white); - box-shadow: -20rpx 0 20rpx -10rpx var(--tabbar-background-color, white); - text-align: center; -} -.c-tabbar-more__btn .market { - font-size: 20rpx; -} -.t-tabbar-more__boardwrapper { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} -.t-tabbar-more__mask { - width: 100%; - height: 100%; - background-color: rgba(0, 0, 0, 0.5); -} -.c-tabbar-more__board { - position: absolute; - top: 0; - left: 0; - width: 100%; - max-height: 100%; -} -.c-tabbar-more__boardinner { - padding: 20rpx 0 20rpx 20rpx; - background-color: var(--tabbar-background-color, white); - display: flex; - flex-flow: row wrap; -} -.c-tabbar-more__item { - margin: 0 20rpx 20rpx 0; - flex: 0 0 calc((100% - 60rpx) / 3); - box-sizing: border-box; - padding: 0 10rpx; - border-radius: 30rpx; - height: 60rpx; - line-height: 60rpx; - text-align: center; - font-size: 22rpx; - color: #5d5d5d; - background-color: #eee; -} -.text-overflow { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} diff --git a/pages/goods/category/components/goods-category/components/c-tabbar/index.js b/pages/goods/category/components/goods-category/components/c-tabbar/index.js deleted file mode 100644 index ddf6367..0000000 --- a/pages/goods/category/components/goods-category/components/c-tabbar/index.js +++ /dev/null @@ -1,68 +0,0 @@ -Component({ - externalClasses: ['custom-class'], - - properties: { - activeKey: { - type: Number, - value: 0, - }, - tabList: { - type: Array, - value: [], - }, - showMore: Boolean, // 鏄惁闇�瑕佷笅鎷夊姛鑳� - }, - observers: { - activeKey(newVal) { - if (this.properties.tabList && newVal) { - this.setActive(newVal).catch((e) => { - console.error(e); - }); - } - }, - }, - - data: { - currentActive: -1, - }, - attached() { - this.setActive(this.properties.activeKey).catch((e) => { - console.error(e); - }); - }, - - methods: { - setActive(activeKey) { - if ( - !this.properties.tabList[activeKey] || - this.properties.tabList[activeKey].disabled - ) { - return Promise.reject('鏁版嵁寮傚父鎴栦笉鍙搷浣�'); - } - return new Promise((resolve) => { - this.setData( - { - currentActive: activeKey, - }, - () => resolve(), - ); - }); - }, - onClick(event) { - let activeKey; - if (event.type === 'select') { - activeKey = event.detail; - } else { - activeKey = event.currentTarget.dataset.index; - } - this.setActive(activeKey) - .then(() => { - const { currentActive } = this.data; - this.triggerEvent('change', { index: currentActive }); - }) - .catch((e) => { - console.error(e); - }); - }, - }, -}); diff --git a/pages/goods/category/components/goods-category/components/c-tabbar/index.json b/pages/goods/category/components/goods-category/components/c-tabbar/index.json deleted file mode 100644 index 644e632..0000000 --- a/pages/goods/category/components/goods-category/components/c-tabbar/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "c-tabbar-more": "./c-tabbar-more/index" - } -} \ No newline at end of file diff --git a/pages/goods/category/components/goods-category/components/c-tabbar/index.wxml b/pages/goods/category/components/goods-category/components/c-tabbar/index.wxml deleted file mode 100644 index 1227f88..0000000 --- a/pages/goods/category/components/goods-category/components/c-tabbar/index.wxml +++ /dev/null @@ -1,29 +0,0 @@ -<view class="c-tabbar custom-class"> - <scroll-view - wx:if="{{ tabList.length > 0 }}" - class="c-tabbar__scroll" - scroll-x="true" - scroll-into-view="{{ 'id-' + currentActive }}" - > - <view - class="c-tabbar__inner {{showMore && tabList.length > 4 ? 'c-tabbar__inner_more' : ''}}" - > - <view - wx:for="{{ tabList }}" - wx:key="index" - id="{{ 'id-' + index }}" - class="c-tabbar-item {{ currentActive === index ? 'active' : '' }} {{ item.disabled ? 'disabled' : '' }}" - bind:tap="onClick" - data-index="{{index}}" - > - <view class="c-tabbar-item__text"> {{ item.name }} </view> - </view> - </view> - </scroll-view> - <c-tabbar-more - wx:if="{{ showMore && tabList.length > 4 }}" - tabList="{{tabList}}" - bindselect="onClick" - /> - <slot /> -</view> diff --git a/pages/goods/category/components/goods-category/components/c-tabbar/index.wxss b/pages/goods/category/components/goods-category/components/c-tabbar/index.wxss deleted file mode 100644 index d89475f..0000000 --- a/pages/goods/category/components/goods-category/components/c-tabbar/index.wxss +++ /dev/null @@ -1,53 +0,0 @@ -.c-tabbar { - width: 100%; - height: 100%; - position: relative; - --tabbar-height: 100rpx; - --tabbar-fontsize: 28rpx; - --tabbar-background-color: white; -} -.c-tabbar__inner { - display: flex; - flex-flow: row nowrap; -} -.c-tabbar__scroll { - position: relative; -} -.c-tabbar__scroll::after { - content: ''; - display: block; - position: absolute; - width: 100%; - left: 0; - bottom: -1px; - height: 1px; - background-color: #eee; - z-index: 1; -} -.c-tabbar__inner.c-tabbar__inner_more::after { - content: ''; - display: block; - width: 100rpx; - height: 100rpx; - flex: none; -} -.c-tabbar-item { - flex: none; - height: 100rpx; - color: #282828; - font-size: 28rpx; - padding: 0 20rpx; -} -.c-tabbar-item.active:not(.disabled) { - color: #0071ce; - position: relative; -} -.c-tabbar-item.disabled { - color: #ccc; -} -.c-tabbar-item__text { - width: 100%; - text-align: center; - height: 100rpx; - line-height: 100rpx; -} diff --git a/pages/goods/category/components/goods-category/index.js b/pages/goods/category/components/goods-category/index.js deleted file mode 100644 index f622901..0000000 --- a/pages/goods/category/components/goods-category/index.js +++ /dev/null @@ -1,75 +0,0 @@ -Component({ - externalClasses: ['custom-class'], - - properties: { - category: { - type: Array, - }, - initActive: { - type: Array, - value: [], - observer(newVal, oldVal) { - if (newVal[0] !== oldVal[0]) { - this.setActiveKey(newVal[0], 0); - } - }, - }, - isSlotRight: { - type: Boolean, - value: false, - }, - level: { - type: Number, - value: 3, - }, - }, - data: { - activeKey: 0, - subActiveKey: 0, - }, - attached() { - if (this.properties.initActive && this.properties.initActive.length > 0) { - this.setData({ - activeKey: this.properties.initActive[0], - subActiveKey: this.properties.initActive[1] || 0, - }); - } - }, - methods: { - onParentChange(event) { - this.setActiveKey(event.detail.index, 0).then(() => { - this.triggerEvent('change', [ - this.data.activeKey, - this.data.subActiveKey, - ]); - }); - }, - onChildChange(event) { - this.setActiveKey(this.data.activeKey, event.detail.index).then(() => { - this.triggerEvent('change', [ - this.data.activeKey, - this.data.subActiveKey, - ]); - }); - }, - changCategory(event) { - const { item } = event.currentTarget.dataset; - this.triggerEvent('changeCategory', { - item, - }); - }, - setActiveKey(key, subKey) { - return new Promise((resolve) => { - this.setData( - { - activeKey: key, - subActiveKey: subKey, - }, - () => { - resolve(); - }, - ); - }); - }, - }, -}); diff --git a/pages/goods/category/components/goods-category/index.json b/pages/goods/category/components/goods-category/index.json deleted file mode 100644 index 8ca3d3c..0000000 --- a/pages/goods/category/components/goods-category/index.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "component": true, - "usingComponents": { - "c-tabbar": "./components/c-tabbar/index", - "c-sidebar": "./components/c-sidebar/index", - "c-sidebar-item": "./components/c-sidebar/c-sidebar-item/index", - "t-image": "/components/webp-image/index" - } -} \ No newline at end of file diff --git a/pages/goods/category/components/goods-category/index.wxml b/pages/goods/category/components/goods-category/index.wxml deleted file mode 100644 index 1b0b83f..0000000 --- a/pages/goods/category/components/goods-category/index.wxml +++ /dev/null @@ -1,61 +0,0 @@ -<view class="goods-category custom-class"> - <c-sidebar custom-class="custom-sidebar" bindchange="onParentChange" activeKey="{{activeKey}}"> - <c-sidebar-item - wx:for="{{ category }}" - wx:key="index" - title="{{ item.name }}" - disabled="{{ item.disabled }}" - /> - </c-sidebar> - <view class="goods-category__right"> - <c-tabbar - wx:if="{{isSlotRight}}" - activeKey="{{subActiveKey}}" - bindchange="onChildChange" - showMore - > - <slot/> - </c-tabbar> - <view wx:if="{{!isSlotRight}}" class="goods-category-normal"> - <view class="goods-category-normal-item" wx:if="{{category[activeKey].children && category[activeKey].children.length > 0}}"> - <block wx:for="{{category[activeKey].children}}" wx:key="index" wx:if="{{level === 3 && item.children && item.children.length > 0}}"> - <view class="flex goods-category-normal-item-title"> - {{item.name}} - </view> - <view class="goods-category-normal-item-container"> - <view - class="goods-category-normal-item-container-item" - wx:for="{{item.children}}" - wx:for-index="subIndex" - wx:key="subIndex" - wx:for-item="subItem" - bindtap="changCategory" - data-item="{{subItem}}" - > - <t-image src="{{subItem.thumbnail}}" t-class="image" /> - <view class="flex goods-category-normal-item-container-item-title"> - {{subItem.name}} - </view> - </view> - </view> - </block> - <view class="goods-category-normal-item-second-container" wx:if="{{level === 2}}"> - <block wx:for="{{category[activeKey].children}}" wx:key="index"> - <view - class="goods-category-normal-item-second-container-item" - wx:for-key="index" - bindtap="changCategory" - data-item="{{item}}" - > - <t-image src="{{item.thumbnail}}" t-class="image" /> - <view class="flex goods-category-normal-item-container-item-title"> - {{item.name}} - </view> - </view> - </block> - </view> - </view> - </view> - </view> -</view> - diff --git a/pages/goods/category/components/goods-category/index.wxss b/pages/goods/category/components/goods-category/index.wxss deleted file mode 100644 index fbf4569..0000000 --- a/pages/goods/category/components/goods-category/index.wxss +++ /dev/null @@ -1,102 +0,0 @@ -.goods-category { - display: flex; -} - -.custom-sidebar { - height: 100%; -} - -.goods-category__right { - height: 100%; - flex: auto; - width: 0; - position: relative; - overflow: scroll; - -webkit-overflow-scrolling: touch; - background-color: white; -} - -.flex { - display: flex; -} - -.goods-category-normal { - margin: 28rpx 34rpx 0rpx 32rpx; -} - -.goods-category-normal-item-title { - font-size: 28rpx; - font-weight: 500; -} - -.goods-category-normal-item-container { - background-color: #fff; - border-radius: 8rpx; - padding-top: 28rpx; - margin-top: -24rpx; - margin-bottom: 30rpx; - display: flex; - flex-wrap: wrap; -} - -.goods-category-normal-item-container-item { - height: 196rpx; - display: flex; - flex-direction: column; - align-items: center; - margin-top: 24rpx; - width: 33.3%; -} - -.goods-category-normal-item-container-item .image { - width: 144rpx; - height: 144rpx; -} - -.goods-category-normal-item-container-item-title { - justify-content: center; - font-size: 24rpx; - color: #666666; - margin-top: 20rpx; -} - -.goods-category .custom-sidebar { - background-color: #f5f5f5; -} - -.custom-sidebar { - width: 180rpx; - height: 100vh; -} - -.custom-sidebar::-webkit-scrollbar { - width: 0; - height: 0; - color: transparent; -} - -.goods-category-normal-item-second-container { - background-color: #fff; - border-radius: 8rpx; - margin-top: 8rpx; - margin-bottom: 30rpx; - display: grid; - grid-template-columns: 33.33% 33.33% 33.33%; -} - -.goods-category-normal-item-second-container-item { - height: 200rpx; - text-align: center; - margin-top: 20rpx; -} - -.goods-category-normal-item-second-container-item .image { - width: 144rpx; - height: 144rpx; -} - -.goods-category-normal-item-second-container-item-title { - justify-content: center; - font-size: 24rpx; - color: #222427; -} diff --git a/pages/goods/category/index.js b/pages/goods/category/index.js deleted file mode 100644 index e8c56ac..0000000 --- a/pages/goods/category/index.js +++ /dev/null @@ -1,28 +0,0 @@ -import { getCategoryList } from '../../../services/good/fetchCategoryList'; -Page({ - data: { - list: [], - }, - async init() { - try { - const result = await getCategoryList(); - this.setData({ - list: result, - }); - } catch (error) { - console.error('err:', error); - } - }, - - onShow() { - this.getTabBar().init(); - }, - onChange() { - wx.navigateTo({ - url: '/pages/goods/list/index', - }); - }, - onLoad() { - this.init(true); - }, -}); diff --git a/pages/goods/category/index.json b/pages/goods/category/index.json deleted file mode 100644 index f989443..0000000 --- a/pages/goods/category/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "navigationBarTitleText": "鍒嗙被", - "usingComponents": { - "goods-category": "./components/goods-category/index" - } -} diff --git a/pages/goods/category/index.wxml b/pages/goods/category/index.wxml deleted file mode 100644 index 2d8cab1..0000000 --- a/pages/goods/category/index.wxml +++ /dev/null @@ -1,8 +0,0 @@ -<view class="wrap"> - <goods-category - level="{{3}}" - custom-class="goods-category-class" - category="{{list}}" - bind:changeCategory="onChange" - /> -</view> diff --git a/pages/goods/category/index.wxss b/pages/goods/category/index.wxss deleted file mode 100644 index ac2e0a7..0000000 --- a/pages/goods/category/index.wxss +++ /dev/null @@ -1,23 +0,0 @@ -.tabbar-position { - position: fixed !important; - bottom: 0; - left: 0; - width: 100%; -} - -.wrap { - height: 100vh; - overflow: hidden; -} -.goods-category-class { - background-color: #f6f6f6 !important; - height: 100%; -} -.goods-category-class .goods-category-normal-item-container-item { - margin-top: 20rpx; -} - -page { - min-height: none; - padding-bottom: 0; -} diff --git a/pages/goods/comments/components/comments-card/components/images-videos/assets/play.png b/pages/goods/comments/components/comments-card/components/images-videos/assets/play.png deleted file mode 100644 index d816ef7..0000000 --- a/pages/goods/comments/components/comments-card/components/images-videos/assets/play.png +++ /dev/null Binary files differ diff --git a/pages/goods/comments/components/comments-card/components/images-videos/index.js b/pages/goods/comments/components/comments-card/components/images-videos/index.js deleted file mode 100644 index a0a3c48..0000000 --- a/pages/goods/comments/components/comments-card/components/images-videos/index.js +++ /dev/null @@ -1,36 +0,0 @@ -// pages/goods/comments/components/comments-card/images-videos/index.js -Component({ - /** - * 缁勪欢鐨勫睘鎬у垪琛� - */ - properties: { - resources: { - type: Array, - value: [], - }, - }, - - /** - * 缁勪欢鐨勫垵濮嬫暟鎹� - */ - data: { - classType: 'single', - }, - - observers: { - resources: function (newVal) { - if (newVal.length <= 1) { - this.setData({ classType: 'single' }); - } else if (newVal.length === 2) { - this.setData({ classType: 'double' }); - } else { - this.setData({ classType: 'multiple' }); - } - }, - }, - - /** - * 缁勪欢鐨勬柟娉曞垪琛� - */ - methods: {}, -}); diff --git a/pages/goods/comments/components/comments-card/components/images-videos/index.json b/pages/goods/comments/components/comments-card/components/images-videos/index.json deleted file mode 100644 index 83597fd..0000000 --- a/pages/goods/comments/components/comments-card/components/images-videos/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "component": true, - "usingComponents": { - "my-video": "../my-video/index", - "t-image": "/components/webp-image/index" - } -} \ No newline at end of file diff --git a/pages/goods/comments/components/comments-card/components/images-videos/index.wxml b/pages/goods/comments/components/comments-card/components/images-videos/index.wxml deleted file mode 100644 index 2515909..0000000 --- a/pages/goods/comments/components/comments-card/components/images-videos/index.wxml +++ /dev/null @@ -1,15 +0,0 @@ -<view class="images-videos-container container-{{classType}}"> - <view - class="resource-container resource-container-{{classType}}" - wx:for="{{resources}}" - wx:for-item="resource" - wx:key="*this" - > - <t-image wx:if="{{resource.type === 'image'}}" t-class="resource-item-{{classType}}" src="{{resource.src}}" /> - <my-video wx:else videoSrc="{{resource.src}} " my-video="resource-item-{{classType}}"> - <t-image t-class="resource-item resource-item-{{classType}}" slot="cover-img" src="{{resource.coverSrc}}" /> - <image class="play-icon" slot="play-icon" src="./assets/play.png" /> - </my-video> - </view> -</view> - diff --git a/pages/goods/comments/components/comments-card/components/images-videos/index.wxss b/pages/goods/comments/components/comments-card/components/images-videos/index.wxss deleted file mode 100644 index e7944be..0000000 --- a/pages/goods/comments/components/comments-card/components/images-videos/index.wxss +++ /dev/null @@ -1,68 +0,0 @@ -.resource-item-single { - width: 360rpx; - height: 360rpx; - border-radius: 8rpx; -} - -.resource-item-double { - width: 334rpx; - height: 334rpx; - border-radius: 8rpx; -} - -.resource-item-multiple { - width: 218rpx; - height: 218rpx; - border-radius: 8rpx; -} - -.resource-container-single { - padding-left: 0; - padding-top: 0; -} - -.resource-container-double { - padding-left: 18rpx; - padding-top: 18rpx; -} - -.resource-container-multiple { - padding-left: 16rpx; - padding-top: 16rpx; -} - -.container-single { - margin-left: 0; -} - -.container-double { - margin-left: -18rpx; - margin-top: -18rpx; -} - -.container-multiple { - margin-left: -16rpx; - margin-top: -16rpx; -} - -.resource-container { - display: flex; -} - -.play-icon { - width: 96rpx; - height: 96rpx; -} - -.images-videos-container { - display: flex; - flex-wrap: wrap; -} - -.image { - border-radius: 8rpx; -} - -.cover-img-container { - background-color: white; -} diff --git a/pages/goods/comments/components/comments-card/components/my-video/index.js b/pages/goods/comments/components/comments-card/components/my-video/index.js deleted file mode 100644 index 987cf18..0000000 --- a/pages/goods/comments/components/comments-card/components/my-video/index.js +++ /dev/null @@ -1,55 +0,0 @@ -Component({ - externalClasses: ['my-video', 'my-cover-img', 'my-play-icon'], - properties: { - videoSrc: { type: String }, - }, - data: { - isShow: true, - }, - - options: { - multipleSlots: true, // 鍦ㄧ粍浠跺畾涔夋椂鐨勯�夐」涓惎鐢ㄥslot鏀寔 - }, - - attached() { - this.videoContext = wx.createVideoContext('myVideo', this); - }, - - fullScreen: false, - - methods: { - // 鐐瑰嚮灏侀潰鑷畾涔夋挱鏀炬寜閽椂瑙﹀彂 - bindplay(e) { - this.setData({ - isShow: false, - }); - this.videoContext.play(); - this.triggerEvent('play', e); - }, - - bindplayByVideo(e) { - this.setData({ - isShow: false, - }); - this.triggerEvent('play', e); - }, - - // 鐩戝惉鎾斁鍒版湯灏炬椂瑙﹀彂 - bindended(e) { - if (!this.fullScreen) { - this.setData({ - isShow: true, - }); - } - this.triggerEvent('ended', e); - }, - // 鐩戝惉鏆傚仠鎾斁鏃惰Е鍙� - bindpause(e) { - this.triggerEvent('pause', e); - }, - bindfullscreenchange(e) { - const fullScreen = e?.detail?.fullScreen; - this.fullScreen = fullScreen; - }, - }, -}); diff --git a/pages/goods/comments/components/comments-card/components/my-video/index.json b/pages/goods/comments/components/comments-card/components/my-video/index.json deleted file mode 100644 index e8cfaaf..0000000 --- a/pages/goods/comments/components/comments-card/components/my-video/index.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/goods/comments/components/comments-card/components/my-video/index.wxml b/pages/goods/comments/components/comments-card/components/my-video/index.wxml deleted file mode 100644 index af38919..0000000 --- a/pages/goods/comments/components/comments-card/components/my-video/index.wxml +++ /dev/null @@ -1,26 +0,0 @@ -<video - id="myVideo" - src="{{videoSrc}}" - enable-danmu - controls - show-fullscreen-btn - show-center-play-btn="{{false}}" - auto-pause-if-navigate - auto-pause-if-open-native - show-play-btn - object-fit="contain" - bindpause="bindpause" - bindended="bindended" - bindplay="bindplayByVideo" - class="video my-video" - bindfullscreenchange="bindfullscreenchange" -> - <view class="video_cover" wx:if="{{isShow}}"> - <view class="my-cover-img"> - <slot name="cover-img" /> - </view> - <view class="video_play_icon my-play-icon" bindtap="bindplay"> - <slot name="play-icon" /> - </view> - </view> -</video> diff --git a/pages/goods/comments/components/comments-card/components/my-video/index.wxss b/pages/goods/comments/components/comments-card/components/my-video/index.wxss deleted file mode 100644 index 63b962b..0000000 --- a/pages/goods/comments/components/comments-card/components/my-video/index.wxss +++ /dev/null @@ -1,21 +0,0 @@ -.video .video_cover { - width: 100%; - height: 100%; - position: relative; -} - -.video .video_play_icon { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - z-index: 5; -} - -.video .video_txt { - margin: 10rpx auto; -} - -.video { - display: flex; -} diff --git a/pages/goods/comments/components/comments-card/index.js b/pages/goods/comments/components/comments-card/index.js deleted file mode 100644 index 53f6103..0000000 --- a/pages/goods/comments/components/comments-card/index.js +++ /dev/null @@ -1,51 +0,0 @@ -Component({ - externalClasses: ['wr-class'], - options: { - multipleSlots: true, - }, - properties: { - goodsDetailInfo: { - type: String, - value: '', - }, - sellerReply: { - type: String, - value: '', - }, - userHeadUrl: { - type: String, - value: '', - }, - userName: { - type: String, - default: '', - }, - commentContent: { - type: String, - value: '', - }, - commentScore: { - type: Number, - value: 0, - }, - commentTime: { - type: String, - value: '', - }, - commentResources: { - type: Array, - value: [], - }, - }, - - data: { - showMoreStatus: false, - showContent: false, - hideText: false, - eleHeight: null, - overText: false, - isDisabled: true, - startColors: ['#FFC51C', '#DDDDDD'], - }, - methods: {}, -}); diff --git a/pages/goods/comments/components/comments-card/index.json b/pages/goods/comments/components/comments-card/index.json deleted file mode 100644 index 1130655..0000000 --- a/pages/goods/comments/components/comments-card/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-rate": "tdesign-miniprogram/rate/rate", - "images-videos": "./components/images-videos", - "t-image": "/components/webp-image/index" - } -} \ No newline at end of file diff --git a/pages/goods/comments/components/comments-card/index.wxml b/pages/goods/comments/components/comments-card/index.wxml deleted file mode 100644 index af86507..0000000 --- a/pages/goods/comments/components/comments-card/index.wxml +++ /dev/null @@ -1,27 +0,0 @@ -<view class="comments-card-item wr-class"> - <view class="comments-card-item-container"> - <view class="comments-title"> - <view class="comments-card-item-userImg"> - <t-image t-class="userImg" src="{{userHeadUrl}}" /> - </view> - <view class="userName">{{userName}}</view> - <text class="commentTime">{{commentTime}}</text> - </view> - <view class="comments-info"> - <view class="rate"> - <t-rate value="{{commentScore}}" size="14" gap="2" color="{{['#ffc51c', '#ddd']}}" /> - </view> - <view class="goods-info-text" wx:if="{{goodsDetailInfo}}">{{goodsDetailInfo}}</view> - </view> - <view class="comments-card-item-container-content"> - <view class="content-text" hidden="{{showContent}}"> {{commentContent}} </view> - </view> - <view class="comments-card-item-container-image" wx:if="{{commentResources.length > 0}}"> - <images-videos resources="{{commentResources}}" /> - </view> - <view class="comments-card-reply" wx:if="{{sellerReply}}"> - <text class="prefix">搴楀鍥炲锛�</text> - <text class="content">{{sellerReply}}</text> - </view> - </view> -</view> diff --git a/pages/goods/comments/components/comments-card/index.wxss b/pages/goods/comments/components/comments-card/index.wxss deleted file mode 100644 index c5e0564..0000000 --- a/pages/goods/comments/components/comments-card/index.wxss +++ /dev/null @@ -1,172 +0,0 @@ -@import '../../../../../style/theme.wxss'; - -.comments-card-item { - padding: 32rpx; - display: flex; - background-color: #fff; - position: relative; -} - -.comments-card-item::after { - content: ''; - position: absolute; - bottom: 0rpx; - width: 686rpx; - height: 2rpx; - background-color: #f5f5f5; -} - -.comments-card-item-userImg { - display: flex; -} - -.comments-card-item-userImg .userImg { - width: 64rpx; - height: 64rpx; - border-radius: 50%; -} - -.comments-card-item-container { - width: 100%; -} - -.comments-card-item-container-name { - display: flex; - font-size: 28rpx; - color: #333; - font-weight: 600; - align-items: center; -} - -.comments-card-item-container-name .userName { - margin-right: 12rpx; -} - -.comments-card-item-container-date { - font-size: 22rpx; - color: #999; - margin-top: 4rpx; - display: flex; -} - -.comments-card-item-container-content { - margin-top: 16rpx; - position: relative; -} - -.comments-card-item-container-content .content-text { - font-size: 28rpx; - white-space: normal; - word-break: break-all; - font-weight: normal; -} - -.comments-card-item-container-content .hide-text { - overflow: hidden; - text-overflow: ellipsis; - -webkit-line-clamp: 5; - text-align: justify; - display: -webkit-box; - -webkit-box-orient: vertical; -} - -.comments-card-item-container-content .showMore { - position: absolute; - width: 112rpx; - height: 36rpx; - bottom: 0; - right: 0; - background: linear-gradient( - to right, - rgba(255, 255, 255, 0.2) 0, - rgba(255, 255, 255, 0.45) 20%, - rgba(255, 255, 255, 0.7) 25%, - rgba(255, 255, 255, 0.9) 30%, - rgba(255, 255, 255, 0.95) 35%, - #ffffff 50%, - #fff 100% - ); - font-size: 26rpx; - color: #fa550f; - line-height: 36rpx; - text-align: right; -} - -.comments-card-item-container-image { - margin-top: 24rpx; - display: flex; - justify-content: space-between; - flex-wrap: wrap; -} - -.comments-card-item-container-image .commentImg { - border-radius: 8rpx; - margin-top: 12rpx; -} - -.comments-card-item-container-image .commentImg3 { - width: 196rpx; - height: 196rpx; -} - -.comments-card-item-container-image .commentImg2 { - width: 300rpx; - height: 300rpx; -} - -.comments-card-item-container-image .commentImg1 { - width: 404rpx; - height: 404rpx; -} - -.comments-card-item-container .comments-title { - display: flex; - align-items: center; - position: relative; -} - -.comments-title .userName { - font-size: 26rpx; - color: #333333; - margin-left: 24rpx; -} - -.comments-title .commentTime { - font-size: 24rpx; - color: #999999; - position: absolute; - right: 0; -} - -.comments-info { - display: flex; - align-items: center; - margin-top: 18rpx; -} - -.comments-info .rate { - margin-right: 24rpx; -} - -.comments-info .goods-info-text { - font-size: 24rpx; - - color: #999999; -} - -.comments-card-item-container .comments-card-reply { - background-color: #f5f5f5; - padding: 24rpx 16rpx; - margin-top: 24rpx; -} - -.comments-card-item-container .comments-card-reply .prefix { - font-size: 26rpx; - font-weight: bold; - color: #666666; -} - -.comments-card-item-container .comments-card-reply .content { - font-size: 26rpx; - color: #666666; -} diff --git a/pages/goods/comments/create/index.js b/pages/goods/comments/create/index.js deleted file mode 100644 index 5296bc3..0000000 --- a/pages/goods/comments/create/index.js +++ /dev/null @@ -1,86 +0,0 @@ -// import { getCommentDetail } from '../../../../services/good/comments/fetchCommentDetail'; -import Toast from 'tdesign-miniprogram/toast/index'; -Page({ - data: { - serviceRateValue: 1, - goodRateValue: 1, - conveyRateValue: 1, - isAnonymous: false, - uploadFiles: [], - gridConfig: { - width: 218, - height: 218, - column: 3, - }, - isAllowedSubmit: false, - imgUrl: '', - title: '', - goodsDetail: '', - imageProps: { - mode: 'aspectFit', - }, - }, - - onLoad(options) { - this.setData({ - imgUrl: options.imgUrl, - title: options.title, - goodsDetail: options.specs, - }); - }, - - onRateChange(e) { - const { value } = e?.detail; - const item = e?.currentTarget?.dataset?.item; - this.setData({ [item]: value }, () => { - this.updateButtonStatus(); - }); - }, - - onAnonymousChange(e) { - const status = !!e?.detail?.checked; - this.setData({ isAnonymous: status }); - }, - - handleSuccess(e) { - const { files } = e.detail; - - this.setData({ - uploadFiles: files, - }); - }, - - handleRemove(e) { - const { index } = e.detail; - const { uploadFiles } = this.data; - uploadFiles.splice(index, 1); - this.setData({ - uploadFiles, - }); - }, - - onTextAreaChange(e) { - const value = e?.detail?.value; - this.textAreaValue = value; - this.updateButtonStatus(); - }, - - updateButtonStatus() { - const { serviceRateValue, goodRateValue, conveyRateValue, isAllowedSubmit } = this.data; - const { textAreaValue } = this; - const temp = serviceRateValue && goodRateValue && conveyRateValue && textAreaValue; - if (temp !== isAllowedSubmit) this.setData({ isAllowedSubmit: temp }); - }, - - onSubmitBtnClick() { - const { isAllowedSubmit } = this.data; - if (!isAllowedSubmit) return; - Toast({ - context: this, - selector: '#t-toast', - message: '璇勪环鎻愪氦鎴愬姛', - icon: 'check-circle', - }); - wx.navigateBack(); - }, -}); diff --git a/pages/goods/comments/create/index.json b/pages/goods/comments/create/index.json deleted file mode 100644 index 7c6d3eb..0000000 --- a/pages/goods/comments/create/index.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "navigationBarTitleText": "璇勪环鍟嗗搧", - "usingComponents": { - "t-image": "/components/webp-image/index", - "t-rate": "tdesign-miniprogram/rate/rate", - "t-textarea": "tdesign-miniprogram/textarea/textarea", - "t-checkbox": "tdesign-miniprogram/checkbox/checkbox", - "t-button": "tdesign-miniprogram/button/button", - "t-upload": "tdesign-miniprogram/upload/upload", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-toast": "tdesign-miniprogram/toast/toast" - } -} \ No newline at end of file diff --git a/pages/goods/comments/create/index.wxml b/pages/goods/comments/create/index.wxml deleted file mode 100644 index 52cb6d8..0000000 --- a/pages/goods/comments/create/index.wxml +++ /dev/null @@ -1,90 +0,0 @@ -<view class="page-container"> - <view class="comment-card"> - <view class="goods-info-container"> - <view class="goods-image-container"> - <t-image t-class="goods-image" src="{{imgUrl}}" /> - </view> - <view class="goods-title-container"> - <view class="goods-title">{{title}}</view> - <view class="goods-detail">{{goodsDetail}}</view> - </view> - </view> - <view class="rate-container"> - <text class="rate-title">鍟嗗搧璇勪环</text> - <view class="rate"> - <t-rate - value="{{goodRateValue}}" - bind:change="onRateChange" - size="26" - gap="6" - color="{{['#ffc51c', '#ddd']}}" - data-item="goodRateValue" - /> - </view> - </view> - <view class="textarea-container"> - <t-textarea - t-class="textarea" - maxlength="{{500}}" - indicator - placeholder="瀵瑰晢鍝佹弧鎰忓悧锛熻瘎璁轰竴涓�" - bind:change="onTextAreaChange" - /> - </view> - <view class="upload-container"> - <t-upload - media-type="{{['image','video']}}" - files="{{uploadFiles}}" - bind:remove="handleRemove" - bind:success="handleSuccess" - gridConfig="{{gridConfig}}" - imageProps="{{imageProps}}" - /> - </view> - - <view class="anonymous-box"> - <t-checkbox bind:change="onAnonymousChange" checked="{{isAnonymous}}" color="#FA4126" /> - <view class="name">鍖垮悕璇勪环</view> - </view> - </view> -</view> -<view class="comment-card convey-card"> - <view class="convey-comment-title">鐗╂祦鏈嶅姟璇勪环</view> - <view class="rate-container"> - <text class="rate-title">鐗╂祦璇勪环</text> - <view class="rate"> - <t-rate - value="{{conveyRateValue}}" - bind:change="onRateChange" - variant="filled" - size="26" - gap="6" - color="{{['#ffc51c', '#ddd']}}" - data-item="conveyRateValue" - /> - </view> - </view> - <view class="rate-container"> - <text class="rate-title">鏈嶅姟璇勪环</text> - <view class="rate"> - <t-rate - value="{{serviceRateValue}}" - bind:change="onRateChange" - size="26" - gap="6" - color="{{['#ffc51c', '#ddd']}}" - data-item="serviceRateValue" - /> - </view> - </view> -</view> -<view class="submit-button-container"> - <t-button - content="鎻愪氦" - block - shape="round" - t-class="submit-button{{isAllowedSubmit ? '' : '-disabled'}}" - bind:tap="onSubmitBtnClick" - /> -</view> -<t-toast id="t-toast" /> diff --git a/pages/goods/comments/create/index.wxss b/pages/goods/comments/create/index.wxss deleted file mode 100644 index abf20e4..0000000 --- a/pages/goods/comments/create/index.wxss +++ /dev/null @@ -1,168 +0,0 @@ -page { - background-color: #f5f5f5; -} - -.page-container .comment-card { - padding: 24rpx 32rpx 28rpx; - background-color: #ffffff; -} - -.comment-card .goods-info-container .goods-image { - width: 112rpx; - height: 112rpx; - border-radius: 8rpx; -} - -.comment-card .goods-info-container { - display: flex; - align-items: center; -} - -.comment-card .goods-info-container .goods-title-container { - padding-left: 24rpx; -} - -.comment-card .goods-info-container .goods-title { - font-size: 28rpx; - font-weight: normal; -} - -.comment-card .goods-info-container .goods-detail { - font-size: 24rpx; - font-weight: normal; - color: #999999; - margin-top: 16rpx; -} - -.comment-card .rate-container { - display: flex; - align-items: center; - margin-top: 22rpx; -} - -.comment-card .rate-container .rate-title { - font-size: 28rpx; - font-weight: bold; - margin-right: 12rpx; -} - -.comment-card .textarea-container { - margin-top: 22rpx; -} - -.comment-card .textarea-container .textarea { - height: 294rpx; - background-color: #f5f5f5; - border-radius: 16rpx; - font-size: 28rpx; - font-weight: normal; -} - -.page-container .t-checkbox__bordered { - display: none; -} - -.page-container .anonymous-box { - display: flex; - align-items: center; - padding-top: 52rpx; -} - -.page-container .anonymous-box .name { - font-size: 28rpx; - font-weight: normal; - color: #999999; - padding-left: 28rpx; -} - -.page-container .t-checkbox { - padding: 0rpx !important; -} - -.page-container .t-checkbox__content { - display: none; -} - -.comment-card .convey-comment-title { - font-size: 28rpx; - font-weight: bold; -} - -.convey-card { - background-color: #ffffff; - margin-top: 24rpx; - padding: 32rpx; - padding-bottom: calc(env(safe-area-inset-bottom) + 140rpx); -} - -.convey-card .rate-container .rate-title { - font-weight: normal; -} - -.page-container .t-checkbox__icon-left { - margin-right: 0rpx !important; -} - -.submit-button-container { - padding: 12rpx 32rpx; - display: flex; - width: 100vw; - box-sizing: border-box; - justify-content: center; - position: fixed; - bottom: 0; - padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx); - background-color: #ffffff; - z-index: 99; -} - -.submit-button-container .submit-button { - --td-button-default-color: #fff; - --td-button-default-bg-color: #fa4126; - --td-button-default-border-color: #fa4126; - --td-button-default-active-bg-color: #fa42269c; -} - -.submit-button-container .submit-button-disabled { - --td-button-default-color: #fff; - --td-button-default-bg-color: #ccc; - --td-button-default-border-color: #ccc; - --td-button-default-active-bg-color: rgba(204, 204, 204, 0.789); -} - -.page-container .upload-container { - margin-top: 24rpx; -} - -.page-container .t-upload__wrapper { - border-radius: 8rpx; - overflow: hidden; -} - -.page-container .submmit-bar { - position: fixed; - left: 0; - right: 0; - bottom: 0; - z-index: 12; - padding: 12rpx 32rpx; - padding-bottom: env(safe-area-inset-bottom); - background-color: #fff; - height: 112rpx; -} - -.page-container .submmit-bar-button { - border-radius: 48rpx !important; - padding: 0 !important; -} - -.page-container .t-upload__close-btn { - background-color: rgba(0, 0, 0, 0.4); - border-bottom-left-radius: 8rpx; - width: 36rpx; - height: 36rpx; -} - -.upload-container .upload-addcontent-slot { - font-size: 26rpx; -} diff --git a/pages/goods/comments/index.js b/pages/goods/comments/index.js deleted file mode 100644 index ef3b361..0000000 --- a/pages/goods/comments/index.js +++ /dev/null @@ -1,227 +0,0 @@ -import { fetchComments } from '../../../services/comments/fetchComments'; -import { fetchCommentsCount } from '../../../services/comments/fetchCommentsCount'; -import dayjs from 'dayjs'; -const layoutMap = { - 0: 'vertical', -}; -Page({ - data: { - pageLoading: false, - commentList: [], - pageNum: 1, - myPageNum: 1, - pageSize: 10, - total: 0, - myTotal: 0, - hasLoaded: false, - layoutText: layoutMap[0], - loadMoreStatus: 0, - myLoadStatus: 0, - spuId: '1060004', - commentLevel: '', - hasImage: '', - commentType: '', - totalCount: 0, - countObj: { - badCount: '0', - commentCount: '0', - goodCount: '0', - middleCount: '0', - hasImageCount: '0', - uidCount: '0', - }, - }, - onLoad(options) { - this.getCount(options); - this.getComments(options); - }, - async getCount(options) { - try { - const result = await fetchCommentsCount( - { - spuId: options.spuId, - }, - { - method: 'POST', - }, - ); - this.setData({ - countObj: result, - }); - // const { data, code = '' } = result; - // if (code.toUpperCase() === 'SUCCESS') { - // wx.setNavigationBarTitle({ - // title: `鍏ㄩ儴璇勪环(${data.commentCount})`, - // }); - // this.setData({ - // countObj: data, - // }); - // } else { - // wx.showToast({ - // title: '鏌ヨ澶辫触锛岃绋嶅�欓噸璇�', - // }); - // } - } catch (error) {} - }, - generalQueryData(reset) { - const { hasImage, pageNum, pageSize, spuId, commentLevel } = this.data; - const params = { - pageNum: 1, - pageSize: 30, - queryParameter: { - spuId, - }, - }; - if ( - Number(commentLevel) === 3 || - Number(commentLevel) === 2 || - Number(commentLevel) === 1 - ) { - params.queryParameter.commentLevel = Number(commentLevel); - } - if (hasImage && hasImage === '1') { - params.queryParameter.hasImage = true; - } else { - delete params.queryParameter.hasImage; - } - // 閲嶇疆璇锋眰 - if (reset) return params; - - return { - ...params, - pageNum: pageNum + 1, - pageSize, - }; - }, - async init(reset = true) { - const { loadMoreStatus, commentList = [] } = this.data; - const params = this.generalQueryData(reset); - - // 鍦ㄥ姞杞戒腑鎴栬�呮棤鏇村鏁版嵁锛岀洿鎺ヨ繑鍥� - if (loadMoreStatus !== 0) return; - - this.setData({ - loadMoreStatus: 1, - }); - - try { - const data = await fetchComments(params, { - method: 'POST', - }); - const code = 'SUCCESS'; - if (code.toUpperCase() === 'SUCCESS') { - const { pageList, totalCount = 0 } = data; - pageList.forEach((item) => { - // eslint-disable-next-line no-param-reassign - item.commentTime = dayjs(Number(item.commentTime)).format( - 'YYYY/MM/DD HH:mm', - ); - }); - - if (Number(totalCount) === 0 && reset) { - this.setData({ - commentList: [], - hasLoaded: true, - total: totalCount, - loadMoreStatus: 2, - }); - return; - } - const _commentList = reset ? pageList : commentList.concat(pageList); - const _loadMoreStatus = - _commentList.length === Number(totalCount) ? 2 : 0; - this.setData({ - commentList: _commentList, - pageNum: params.pageNum || 1, - totalCount: Number(totalCount), - loadMoreStatus: _loadMoreStatus, - }); - } else { - wx.showToast({ - title: '鏌ヨ澶辫触锛岃绋嶅�欓噸璇�', - }); - } - } catch (error) {} - this.setData({ - hasLoaded: true, - }); - }, - getScoreArray(score) { - var array = []; - for (let i = 0; i < 5; i++) { - if (i < score) { - array.push(2); - } else { - array.push(0); - } - } - return array; - }, - getComments(options) { - const { commentLevel = -1, spuId, hasImage = '' } = options; - if (commentLevel !== -1) { - this.setData({ - commentLevel: commentLevel, - }); - } - this.setData({ - hasImage: hasImage, - commentType: hasImage ? '4' : '', - spuId: spuId, - }); - this.init(true); - }, - changeTag(e) { - var { commenttype } = e.currentTarget.dataset; - var { commentType } = this.data; - if (commentType === commenttype) return; - this.setData({ - loadMoreStatus: 0, - commentList: [], - total: 0, - myTotal: 0, - myPageNum: 1, - pageNum: 1, - }); - if (commenttype === '' || commenttype === '5') { - this.setData({ - hasImage: '', - commentLevel: '', - }); - } else if (commenttype === '4') { - this.setData({ - hasImage: '1', - commentLevel: '', - }); - } else { - this.setData({ - hasImage: '', - commentLevel: commenttype, - }); - } - if (commenttype === '5') { - this.setData({ - myLoadStatus: 1, - commentType: commenttype, - }); - this.getMyCommentsList(); - } else { - this.setData({ - myLoadStatus: 0, - commentType: commenttype, - }); - this.init(true); - } - }, - onReachBottom() { - const { total = 0, commentList } = this.data; - if (commentList.length === total) { - this.setData({ - loadMoreStatus: 2, - }); - return; - } - - this.init(false); - }, -}); diff --git a/pages/goods/comments/index.json b/pages/goods/comments/index.json deleted file mode 100644 index a6418c9..0000000 --- a/pages/goods/comments/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "navigationBarTitleText": "鍏ㄩ儴璇勪环", - "usingComponents": { - "t-tag": "tdesign-miniprogram/tag/tag", - "comments-card": "./components/comments-card/index", - "t-load-more": "/components/load-more/index" - } -} diff --git a/pages/goods/comments/index.wxml b/pages/goods/comments/index.wxml deleted file mode 100644 index 89d2b0f..0000000 --- a/pages/goods/comments/index.wxml +++ /dev/null @@ -1,50 +0,0 @@ -<view class="comments-header"> - <t-tag t-class="comments-header-tag {{commentType === '' ? 'comments-header-active' : ''}}" data-commentType="" bindtap="changeTag"> - 鍏ㄩ儴({{countObj.commentCount}}) - </t-tag> - <t-tag - t-class="comments-header-tag {{commentType === '5' ? 'comments-header-active' : ''}}" - wx:if="{{countObj.uidCount !== '0'}}" - data-commentType="5" - bindtap="changeTag" - > - 鑷繁({{countObj.uidCount}}) - </t-tag> - <t-tag t-class="comments-header-tag {{commentType === '4' ? 'comments-header-active' : ''}}" data-commentType="4" bindtap="changeTag"> - 甯﹀浘({{countObj.hasImageCount}}) - </t-tag> - <t-tag t-class="comments-header-tag {{commentType === '3' ? 'comments-header-active' : ''}}" data-commentType="3" bindtap="changeTag"> - 濂借瘎({{countObj.goodCount}}) - </t-tag> - <t-tag t-class="comments-header-tag {{commentType === '2' ? 'comments-header-active' : ''}}" data-commentType="2" bindtap="changeTag"> - 涓瘎({{countObj.middleCount}}) - </t-tag> - <t-tag t-class="comments-header-tag {{commentType === '1' ? 'comments-header-active' : ''}}" data-commentType="1" bindtap="changeTag"> - 宸瘎({{countObj.badCount}}) - </t-tag> -</view> -<view class="comments-card-list"> - <block wx:for="{{commentList}}" wx:key="index"> - <comments-card - commentScore="{{item.commentScore}}" - userName="{{item.userName}}" - commentResources="{{item.commentResources || []}}" - commentContent="{{item.commentContent}}" - isAnonymity="{{item.isAnonymity}}" - commentTime="{{item.commentTime}}" - isAutoComment="{{item.isAutoComment}}" - userHeadUrl="{{item.userHeadUrl}}" - specInfo="{{item.specInfo}}" - sellerReply="{{item.sellerReply || ''}}" - goodsDetailInfo="{{item.goodsDetailInfo || ''}}" - /> - </block> - <t-load-more - t-class="no-more" - status="{{loadMoreStatus}}" - no-more-text="娌℃湁鏇村浜�" - color="#BBBBBB" - failedColor="#FA550F" - /> -</view> - diff --git a/pages/goods/comments/index.wxss b/pages/goods/comments/index.wxss deleted file mode 100644 index b98f36b..0000000 --- a/pages/goods/comments/index.wxss +++ /dev/null @@ -1,49 +0,0 @@ -/* 灞傜骇瀹氫箟 -@z-index-0: 1; -@z-index-1: 100; -@z-index-2: 200; -@z-index-5: 500; -@z-index-component: 1000; // 閫氱敤缁勪欢绾у埆 -@z-index-dropdown: @z-index-component; -@z-index-sticky: @z-index-component + 20; -@z-index-fixed: @z-index-component + 30; -@z-index-modal-backdrop:@z-index-component + 40; -@z-index-modal:@z-index-component + 50; -@z-index-popover:@z-index-component + 60; -@z-index-tooltip:@z-index-component + 70; -*/ -/* var() css鍙橀噺閫傞厤*/ -page { - background-color: #FFFFFF; -} - -.comments-header { - display: flex; - flex-wrap: wrap; - padding: 32rpx 32rpx 0rpx; - background-color: #fff; - margin-top: -24rpx; - margin-left: -24rpx; -} - -.comments-header-tag { - margin-top: 24rpx; - margin-left: 24rpx; - height: 56rpx !important; - font-size: 24rpx !important; - justify-content: center; - background-color: #F5F5F5 !important; - border-radius: 8rpx !important; - border: 1px solid #F5F5F5 !important; -} - -.comments-header-active { - background-color: #FFECE9 !important; - color: #FA4126 !important; - border: 1px solid #FA4126 !important; -} - -.no-more { - padding-left: 20rpx; - padding-right: 20rpx; -} \ No newline at end of file diff --git a/pages/goods/details/components/buy-bar/index.js b/pages/goods/details/components/buy-bar/index.js deleted file mode 100644 index 16d3f33..0000000 --- a/pages/goods/details/components/buy-bar/index.js +++ /dev/null @@ -1,85 +0,0 @@ -Component({ - externalClasses: ['wr-sold-out', 'wr-class'], - - options: { multipleSlots: true }, - - properties: { - soldout: { - // 鍟嗗搧鏄惁涓嬫灦 - type: Boolean, - value: false, - }, - jumpArray: { - type: Array, - value: [], - }, - isStock: { - type: Boolean, - value: true, - }, // 鏄惁鏈夊簱瀛� - isSlotButton: { - type: Boolean, - value: false, - }, // 鏄惁寮�鍚寜閽彃妲� - shopCartNum: { - type: Number, // 璐墿杞︽皵娉℃暟閲� - }, - buttonType: { - type: Number, - value: 0, - }, - minDiscountPrice: { - type: String, - value: '', - }, - minSalePrice: { - type: String, - value: '', - }, - }, - - data: { - fillPrice: false, - shoppingCartGetId: null - }, - - methods: { - toAddCart() { - const { isStock } = this.properties; - if (!isStock) return; - this.triggerEvent('toAddCart'); - // let query = { - // start: 0, - // size: 999, - // filterList: [], - // searchList: [] - // } - // app.MG.store.getShoppingCartProductList(query).then(res => { - // res.datas.forEach((item) => { - // console.log(item.saleMethod.id, 'item.saleMethod.id'); - // this.setData({ - // shoppingCartGetId: item.saleMethod.id - // }) - - // }) - // }) - - - - }, - - toBuyNow(e) { - const { isStock } = this.properties; - if (!isStock) return; - this.triggerEvent('toBuyNow', e); - }, - - toNav(e) { - const { url } = e.currentTarget.dataset; - return this.triggerEvent('toNav', { - e, - url, - }); - }, - }, -}); diff --git a/pages/goods/details/components/buy-bar/index.json b/pages/goods/details/components/buy-bar/index.json deleted file mode 100644 index 7464ae6..0000000 --- a/pages/goods/details/components/buy-bar/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon" - } -} \ No newline at end of file diff --git a/pages/goods/details/components/buy-bar/index.wxml b/pages/goods/details/components/buy-bar/index.wxml deleted file mode 100644 index a7aa86c..0000000 --- a/pages/goods/details/components/buy-bar/index.wxml +++ /dev/null @@ -1,29 +0,0 @@ -<view class="flex soldout flex-center wr-sold-out" wx:if="{{soldout || !isStock}}"> - {{soldout ? '鍟嗗搧宸蹭笅鏋�' : '鍟嗗搧宸插敭棣�'}} -</view> -<view class="footer-cont flex flex-between wr-class"> - <view class="flex flex-between bottom-operate-left" wx:if="{{jumpArray.length > 0}}"> - <view wx:for="{{jumpArray}}" wx:key="index" class="icon-warp operate-wrap" bindtap="toNav" data-ele="foot_navigation" data-index="{{index}}" data-url="{{item.url}}"> - <view> - <text wx:if="{{shopCartNum > 0 && item.showCartNum}}" class="tag-cart-num"> - {{shopCartNum > 99 ? '99+' : shopCartNum}} - </text> - <t-icon prefix="wr" name="{{item.iconName}}" size="40rpx" /> - <view class="operate-text">{{item.title}}</view> - </view> - </view> - </view> - <block wx:if="{{buttonType === 1}}"> - <view class="flex buy-buttons"> - <view class="bar-separately {{soldout || !isStock ? 'bar-addCart-disabled' : ''}}" bindtap="toAddCart"> - 鍔犲叆璐墿杞� - </view> - <view class="bar-buy {{soldout || !isStock ? 'bar-buyNow-disabled' : ''}}" bindtap="toBuyNow"> - 绔嬪嵆璐拱 - </view> - </view> - </block> - <block wx:if="{{isSlotButton}}"> - <slot name="buyButton" /> - </block> -</view> \ No newline at end of file diff --git a/pages/goods/details/components/buy-bar/index.wxss b/pages/goods/details/components/buy-bar/index.wxss deleted file mode 100644 index 44e8ad0..0000000 --- a/pages/goods/details/components/buy-bar/index.wxss +++ /dev/null @@ -1,107 +0,0 @@ -.footer-cont { - background-color: #fff; - padding: 16rpx; -} - -.icon-warp { - width: 110rpx; - display: flex; - justify-content: center; - align-items: center; - text-align: center; -} - -.operate-wrap { - position: relative; -} - -.bottom-operate-left { - width: 100%; -} - -.bottom-operate-left .icon-warp { - width: 50%; -} - -.tag-cart-num { - display: inline-block; - position: absolute; - left: 50rpx; - right: auto; - top: 6rpx; - color: #fff; - line-height: 24rpx; - text-align: center; - z-index: 99; - white-space: nowrap; - min-width: 28rpx; - border-radius: 14rpx; - background-color: #fa550f !important; - font-size: 20rpx; - font-weight: 400; - padding: 2rpx 6rpx; -} - -.operate-text { - color: #666; - font-size: 20rpx; -} - -.soldout { - height: 80rpx; - background: rgba(170, 170, 170, 1); - width: 100%; - color: #fff; -} - -.addCart-disabled, -.bar-addCart-disabled { - background: rgba(221, 221, 221, 1) !important; - color: #fff !important; - font-size: 28rpx; -} - -.buyNow-disabled, -.bar-buyNow-disabled { - background: rgba(198, 198, 198, 1) !important; - color: #fff !important; - font-size: 28rpx; -} - -.bar-separately, -.bar-buy { - width: 254rpx; - height: 80rpx; - color: #fff; - display: flex; - align-items: center; - justify-content: center; -} - -.bar-separately { - background: #ffece9; - color: #fa4126; - border-radius: 40rpx 0 0 40rpx; -} - -.bar-buy { - background-color: #fa4126; - border-radius: 0rpx 40rpx 40rpx 0rpx; -} - -.flex { - display: flex; - display: -webkit-flex; -} - -.flex-center { - justify-content: center; - -webkit-justify-content: center; - align-items: center; - -webkit-align-items: center; -} - -.flex-between { - justify-content: space-between; - -webkit-justify-content: space-between; -} diff --git a/pages/goods/details/components/goods-specs-popup/index.js b/pages/goods/details/components/goods-specs-popup/index.js deleted file mode 100644 index 5d4a6ad..0000000 --- a/pages/goods/details/components/goods-specs-popup/index.js +++ /dev/null @@ -1,339 +0,0 @@ -/* eslint-disable no-param-reassign */ -/* eslint-disable no-nested-ternary */ -import Toast from 'tdesign-miniprogram/toast/index'; - -Component({ - options: { - multipleSlots: true, - addGlobalClass: true, - }, - - properties: { - src: { - type: String, - }, - title: String, - show: { - type: Boolean, - value: false, - }, - limitBuyInfo: { - type: String, - value: '', - }, - isStock: { - type: Boolean, - value: true, - }, - limitMaxCount: { - type: Number, - value: 999, - }, - limitMinCount: { - type: Number, - value: 1, - }, - skuList: { - type: Array, - value: [], - observer(skuList) { - if (skuList && skuList.length > 0) { - if (this.initStatus) { - this.initData(); - } - } - }, - }, - specList: { - type: Array, - value: [], - observer(specList) { - if (specList && specList.length > 0) { - this.initData(); - } - }, - }, - outOperateStatus: { - type: Boolean, - value: false, - }, - hasAuth: { - type: Boolean, - value: false, - }, - count: { - type: Number, - value: 1, - observer(count) { - this.setData({ - buyNum: count, - }); - }, - }, - }, - - initStatus: false, - selectedSku: {}, - selectSpecObj: {}, - - data: { - buyNum: 1, - isAllSelectedSku: false, - }, - - methods: { - initData() { - const { skuList } = this.properties; - const { specList } = this.properties; - specList.forEach((item) => { - if (item.specValueList.length > 0) { - item.specValueList.forEach((subItem) => { - const obj = this.checkSkuStockQuantity(subItem.specValueId, skuList); - subItem.hasStockObj = obj; - }); - } - }); - const selectedSku = {}; - specList.forEach((item) => { - selectedSku[item.specId] = ''; - }); - this.setData({ - specList, - }); - this.selectSpecObj = {}; - this.selectedSku = {}; - this.initStatus = true; - }, - - checkSkuStockQuantity(specValueId, skuList) { - let hasStock = false; - const array = []; - skuList.forEach((item) => { - (item.specInfo || []).forEach((subItem) => { - if (subItem.specValueId === specValueId && item.quantity > 0) { - const subArray = []; - (item.specInfo || []).forEach((specItem) => { - subArray.push(specItem.specValueId); - }); - array.push(subArray); - hasStock = true; - } - }); - }); - return { - hasStock, - specsArray: array, - }; - }, - - chooseSpecValueId(specValueId, specId) { - const { selectSpecObj } = this; - const { skuList, specList } = this.properties; - if (selectSpecObj[specId]) { - selectSpecObj[specId] = []; - this.selectSpecObj = selectSpecObj; - } else { - selectSpecObj[specId] = []; - } - - const itemAllSpecArray = []; - const itemUnSelectArray = []; - const itemSelectArray = []; - specList.forEach((item) => { - if (item.specId === specId) { - const subSpecValueItem = item.specValueList.find((subItem) => subItem.specValueId === specValueId); - let specSelectStatus = false; - item.specValueList.forEach((n) => { - itemAllSpecArray.push(n.hasStockObj.specsArray); - if (n.isSelected) { - specSelectStatus = true; - } - if (n.hasStockObj.hasStock) { - itemSelectArray.push(n.specValueId); - } else { - itemUnSelectArray.push(n.specValueId); - } - }); - if (specSelectStatus) { - selectSpecObj[specId] = this.flatten(subSpecValueItem?.hasStockObj.specsArray.concat(itemSelectArray)); - } else { - const subSet = function (arr1, arr2) { - const set2 = new Set(arr2); - const subset = []; - arr1.forEach((val) => { - if (!set2.has(val)) { - subset.push(val); - } - }); - return subset; - }; - selectSpecObj[specId] = subSet(this.flatten(itemAllSpecArray), this.flatten(itemUnSelectArray)); - } - } else { - // 鏈偣鍑昏鏍肩殑閫昏緫 - const itemSelectArray = []; - let specSelectStatus = false; - item.specValueList.map( - // 鎵惧埌鏈夊簱瀛樼殑瑙勬牸鏁扮粍 - (n) => { - itemSelectArray.push(n.hasStockObj.specsArray); - if (n.isSelected) { - specSelectStatus = true; - } - n.hasStockObj.hasStock = true; - return n; - }, - ); - if (specSelectStatus) { - selectSpecObj[item.specId] = this.flatten(itemSelectArray); - } else { - delete selectSpecObj[item.specId]; - } - } - this.selectSpecObj = selectSpecObj; - }); - const combatArray = Object.values(selectSpecObj); - if (combatArray.length > 0) { - const showArray = combatArray.reduce((x, y) => this.getIntersection(x, y)); - const lastResult = Array.from(new Set(showArray)); - specList.forEach((item) => { - item.specValueList.forEach((subItem) => { - if (lastResult.includes(subItem.specValueId)) { - subItem.hasStockObj.hasStock = true; - } else { - subItem.hasStockObj.hasStock = false; - } - }); - }); - } else { - specList.forEach((item) => { - if (item.specValueList.length > 0) { - item.specValueList.forEach((subItem) => { - const obj = this.checkSkuStockQuantity(subItem.specValueId, skuList); - subItem.hasStockObj = obj; - }); - } - }); - } - this.setData({ - specList, - }); - }, - - flatten(input) { - const stack = [...input]; - const res = []; - while (stack.length) { - const next = stack.pop(); - if (Array.isArray(next)) { - stack.push(...next); - } else { - res.push(next); - } - } - return res.reverse(); - }, - - getIntersection(array, nextArray) { - return array.filter((item) => nextArray.includes(item)); - }, - - toChooseItem(e) { - const { isStock } = this.properties; - if (!isStock) return; - const { id } = e.currentTarget.dataset; - const specId = e.currentTarget.dataset.specid; - const hasStock = e.currentTarget.dataset.hasstock; - if (!hasStock) { - Toast({ - context: this, - selector: '#t-toast', - message: '璇ヨ鏍煎凡鍞絼', - icon: '', - duration: 1000, - }); - return; - } - - let { selectedSku } = this; - const { specList } = this.properties; - selectedSku = - selectedSku[specId] === id ? { ...this.selectedSku, [specId]: '' } : { ...this.selectedSku, [specId]: id }; - specList.forEach((item) => { - item.specValueList.forEach((valuesItem) => { - if (item.specId === specId) { - valuesItem.isSelected = valuesItem.specValueId === selectedSku[specId]; - } - }); - }); - this.chooseSpecValueId(id, specId); - const isAllSelectedSku = this.isAllSelected(specList, selectedSku); - if (!isAllSelectedSku) { - this.setData({ - selectSkuSellsPrice: 0, - selectSkuImg: '', - }); - } - this.setData({ - specList, - isAllSelectedSku, - }); - this.selectedSku = selectedSku; - this.triggerEvent('change', { - specList, - selectedSku, - isAllSelectedSku, - }); - }, - - // 鍒ゆ柇鏄惁鎵�鏈夌殑sku閮藉凡缁忛�変腑 - isAllSelected(skuTree, selectedSku) { - const selected = Object.keys(selectedSku).filter((skuKeyStr) => selectedSku[skuKeyStr] !== ''); - return skuTree.length === selected.length; - }, - - handlePopupHide() { - this.triggerEvent('closeSpecsPopup', { - show: false, - }); - }, - - specsConfirm() { - const { isStock } = this.properties; - if (!isStock) return; - this.triggerEvent('specsConfirm'); - }, - - addCart() { - const { isStock } = this.properties; - if (!isStock) return; - this.triggerEvent('addCart'); - }, - - buyNow() { - const { isAllSelectedSku } = this.data; - const { isStock } = this.properties; - if (!isStock) return; - this.triggerEvent('buyNow', { - isAllSelectedSku, - }); - }, - - // 鎬诲鐞� - setBuyNum(buyNum) { - this.setData({ - buyNum, - }); - this.triggerEvent('changeNum', { - buyNum, - }); - }, - - handleBuyNumChange(e) { - const { value } = e.detail; - this.setData({ - buyNum: value, - }); - }, - }, -}); diff --git a/pages/goods/details/components/goods-specs-popup/index.json b/pages/goods/details/components/goods-specs-popup/index.json deleted file mode 100644 index 34d167e..0000000 --- a/pages/goods/details/components/goods-specs-popup/index.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-popup": "tdesign-miniprogram/popup/popup", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-image": "/components/webp-image/index", - "t-stepper": "tdesign-miniprogram/stepper/stepper", - "t-toast": "tdesign-miniprogram/toast/toast" - } -} \ No newline at end of file diff --git a/pages/goods/details/components/goods-specs-popup/index.wxml b/pages/goods/details/components/goods-specs-popup/index.wxml deleted file mode 100644 index ff6ada7..0000000 --- a/pages/goods/details/components/goods-specs-popup/index.wxml +++ /dev/null @@ -1,84 +0,0 @@ -<t-popup visible="{{show}}" placement="bottom" bind:visible-change="handlePopupHide"> - <view class="popup-container"> - <view class="popup-close" bindtap="handlePopupHide"> - <t-icon name="close" size="36rpx" /> - </view> - <view class="popup-sku-header"> - <t-image t-class="popup-sku-header__img" src="{{src}}" /> - <view class="popup-sku-header__goods-info"> - <view class="popup-sku__goods-name">{{title}}</view> - <view class="goods-price-container"> - <slot name="goods-price" /> - </view> - <!-- 宸查�夎鏍� --> - <view class="popup-sku__selected-spec"> - <view>閫夋嫨锛�</view> - <view wx:for="{{specList}}" wx:key="specId"> - <view - class="popup-sku__selected-item" - wx:for="{{item.specValueList}}" - wx:for-item="selectedItem" - wx:if="{{selectedItem.isSelected}}" - wx:key="specValueId" - > - {{selectedItem.specValue}} - </view> - </view> - </view> - </view> - </view> - <view class="popup-sku-body"> - <view class="popup-sku-group-container"> - <view class="popup-sku-row" wx:for="{{specList}}" wx:key="specId"> - <view class="popup-sku-row__title">{{item.title}}</view> - <block - wx:for="{{item.specValueList}}" - wx:for-item="valuesItem" - wx:for-index="valuesIndex" - wx:key="specValueId" - > - <view - class="popup-sku-row__item {{valuesItem.isSelected ? 'popup-sku-row__item--active' : ''}} {{!valuesItem.hasStockObj.hasStock || !isStock ? 'disabled-sku-selected' : ''}}" - data-specid="{{item.specId}}" - data-id="{{valuesItem.specValueId}}" - data-val="{{valuesItem.specValue}}" - data-hasStock="{{valuesItem.hasStockObj.hasStock}}" - bindtap="toChooseItem" - > - {{valuesItem.specValue}} - </view> - </block> - </view> - </view> - <view class="popup-sku-stepper-stock"> - <view class="popup-sku-stepper-container"> - <view class="popup-sku__stepper-title"> - 璐拱鏁伴噺 - <view class="limit-text" wx:if="{{limitBuyInfo}}"> ({{limitBuyInfo}}) </view> - </view> - <t-stepper value="{{buyNum}}" min="{{1}}" max="{{2}}" theme="filled" bind:change="handleBuyNumChange" /> - </view> - </view> - </view> - <view wx:if="{{outOperateStatus}}" class="single-confirm-btn {{!isStock ? 'disabled' : ''}}" bindtap="specsConfirm"> - 纭畾 - </view> - <view - class="popup-sku-actions flex flex-between {{!isStock ? 'popup-sku-disabled' : ''}}" - wx:if="{{!outOperateStatus}}" - > - <view class="sku-operate"> - <view class="selected-sku-btn sku-operate-addCart {{!isStock ? 'disabled' : ''}}" bindtap="addCart"> - 鍔犲叆璐墿杞� - </view> - </view> - <view class="sku-operate"> - <view class="selected-sku-btn sku-operate-buyNow {{!isStock ? 'disabled' : ''}}" bindtap="buyNow"> - 绔嬪嵆璐拱 - </view> - </view> - </view> - <slot name="bottomSlot" /> - </view> -</t-popup> -<t-toast id="t-toast" /> diff --git a/pages/goods/details/components/goods-specs-popup/index.wxss b/pages/goods/details/components/goods-specs-popup/index.wxss deleted file mode 100644 index de0c749..0000000 --- a/pages/goods/details/components/goods-specs-popup/index.wxss +++ /dev/null @@ -1,300 +0,0 @@ -.popup-container { - background-color: #ffffff; - position: relative; - z-index: 100; - border-radius: 16rpx 16rpx 0 0; - padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx); -} - -.popup-container .popup-close { - position: absolute; - right: 30rpx; - top: 30rpx; - z-index: 9; - color: #999999; -} - -.popup-sku-header { - display: flex; - padding: 30rpx 28rpx 0 30rpx; -} - -.popup-sku-header .popup-sku-header__img { - width: 176rpx; - height: 176rpx; - border-radius: 8rpx; - background: #d8d8d8; - margin-right: 24rpx; -} - -.popup-sku-header .popup-sku-header__goods-info { - position: relative; - width: 500rpx; -} - -.popup-sku-header .popup-sku-header__goods-info .popup-sku__goods-name { - font-size: 28rpx; - line-height: 40rpx; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - white-space: normal; - overflow: hidden; - width: 430rpx; - text-overflow: ellipsis; -} - -.popup-sku-header .popup-sku-header__goods-info .popup-sku__selected-spec { - display: flex; - color: #333333; - font-size: 26rpx; - line-height: 36rpx; -} - -.popup-sku-header - .popup-sku-header__goods-info - .popup-sku__selected-spec - .popup-sku__selected-item { - margin-right: 10rpx; -} - -.popup-sku-body { - margin: 0 30rpx 40rpx; - max-height: 600rpx; - overflow-y: scroll; - -webkit-overflow-scrolling: touch; -} - -.popup-sku-body .popup-sku-group-container .popup-sku-row { - padding: 32rpx 0; - border-bottom: 1rpx solid #f5f5f5; -} - -.popup-sku-body - .popup-sku-group-container - .popup-sku-row - .popup-sku-row__title { - font-size: 26rpx; - color: #333; -} - -.popup-sku-body .popup-sku-group-container .popup-sku-row .popup-sku-row__item { - font-size: 24rpx; - color: #333; - min-width: 128rpx; - height: 56rpx; - background-color: #f5f5f5; - border-radius: 8rpx; - border: 2rpx solid #f5f5f5; - margin: 19rpx 26rpx 0 0; - padding: 0 16rpx; - display: inline-flex; - align-items: center; - justify-content: center; -} - -.popup-sku-body - .popup-sku-group-container - .popup-sku-row - .popup-sku-row__item.popup-sku-row__item--active { - border: 2rpx solid #fa4126; - color: #fa4126; - background: rgba(255, 95, 21, 0.04); -} - -.popup-sku-body - .popup-sku-group-container - .popup-sku-row - .disabled-sku-selected { - background: #f5f5f5 !important; - color: #cccccc; -} - -.popup-sku-body .popup-sku-stepper-stock .popup-sku-stepper-container { - display: flex; - align-items: center; - justify-content: space-between; - margin: 40rpx 0; -} - -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-sku__stepper-title { - display: flex; - font-size: 26rpx; - color: #333; -} - -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-sku__stepper-title - .limit-text { - margin-left: 10rpx; - color: #999999; -} - -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-stepper { - display: flex; - flex-flow: row nowrap; - align-items: center; - font-size: 28px; - height: 48rpx; - line-height: 62rpx; -} - -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-stepper - .input-btn, -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-stepper - .input-num-wrap { - position: relative; - height: 100%; - text-align: center; - background-color: #f5f5f5; - border-radius: 4rpx; -} - -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-stepper - .input-num-wrap { - color: #282828; - display: flex; - max-width: 76rpx; - align-items: center; - justify-content: space-between; -} - -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-stepper - .input-num-wrap - .input-num { - height: 100%; - width: auto; - font-weight: 600; - font-size: 30rpx; -} - -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-stepper - .input-btn { - width: 48rpx; -} - -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-stepper - .popup-stepper__minus { - margin-right: 4rpx; - border-radius: 4rpx; - color: #9a979b; - display: flex; - align-items: center; - justify-content: center; -} - -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-stepper - .popup-stepper__plus { - margin-left: 4rpx; - border-radius: 4rpx; - color: #9a979b; - display: flex; - align-items: center; - justify-content: center; -} - -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-stepper - .popup-stepper__plus::after { - width: 24rpx; - height: 3rpx; - background-color: #999999; -} - -.popup-sku-body - .popup-sku-stepper-stock - .popup-sku-stepper-container - .popup-stepper - .popup-stepper__plus::before { - width: 3rpx; - height: 24rpx; - background-color: #999999; -} - -.popup-sku-actions { - font-size: 32rpx; - height: 80rpx; - text-align: center; - line-height: 80rpx; - padding: 0 20rpx; -} - -.popup-sku-actions .sku-operate { - height: 80rpx; - width: 50%; - color: #fff; - border-radius: 48rpx; -} - -.popup-sku-actions .sku-operate .sku-operate-addCart { - background-color: #ffece9; - color: #fa4126; - border-radius: 48rpx 0 0 48rpx; -} - -.popup-sku-actions .sku-operate .sku-operate-addCart.disabled { - background: rgb(221, 221, 221); - color: #fff; -} - -.popup-sku-actions .sku-operate .sku-operate-buyNow { - background-color: #fa4126; - border-radius: 0 48rpx 48rpx 0; -} - -.popup-sku-actions .sku-operate .sku-operate-buyNow.disabled { - color: #fff; - background: rgb(198, 198, 198); -} - -.popup-sku-actions .sku-operate .selected-sku-btn { - width: 100%; -} - -.popup-container .single-confirm-btn { - border-radius: 48rpx; - color: #ffffff; - margin: 0 32rpx; - font-size: 32rpx; - height: 80rpx; - text-align: center; - line-height: 88rpx; - background-color: #fa4126; -} - -.popup-container .single-confirm-btn.disabled { - font-size: 32rpx; - color: #fff; - background-color: #dddddd; -} diff --git a/pages/goods/details/components/promotion-popup/index.js b/pages/goods/details/components/promotion-popup/index.js deleted file mode 100644 index 9743cc1..0000000 --- a/pages/goods/details/components/promotion-popup/index.js +++ /dev/null @@ -1,35 +0,0 @@ -Component({ - options: { - multipleSlots: true, - }, - - properties: { - list: Array, - title: { - type: String, - value: '淇冮攢璇存槑', - }, - show: { - type: Boolean, - }, - }, - - // data: { - // list: [], - // }, - - methods: { - change(e) { - const { index } = e.currentTarget.dataset; - this.triggerEvent('promotionChange', { - index, - }); - }, - - closePromotionPopup() { - this.triggerEvent('closePromotionPopup', { - show: false, - }); - }, - }, -}); diff --git a/pages/goods/details/components/promotion-popup/index.json b/pages/goods/details/components/promotion-popup/index.json deleted file mode 100644 index a9de77d..0000000 --- a/pages/goods/details/components/promotion-popup/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-popup": "tdesign-miniprogram/popup/popup", - "t-icon": "tdesign-miniprogram/icon/icon" - } -} \ No newline at end of file diff --git a/pages/goods/details/components/promotion-popup/index.wxml b/pages/goods/details/components/promotion-popup/index.wxml deleted file mode 100644 index c1cea9d..0000000 --- a/pages/goods/details/components/promotion-popup/index.wxml +++ /dev/null @@ -1,34 +0,0 @@ -<t-popup visible="{{show}}" placement="bottom" bind:visible-change="closePromotionPopup"> - <view class="promotion-popup-container"> - <view class="promotion-popup-close" bindtap="closePromotionPopup"> - <t-icon name="close" size="36rpx" /> - </view> - <view class="promotion-popup-title"> - <view class="title">{{title}}</view> - </view> - <view class="promotion-popup-content"> - <view class="promotion-detail-list"> - <view - class="list-item" - wx:for="{{list}}" - wx:key="index" - bindtap="change" - data-index="{{index}}" - > - <view class="tag">{{item.tag}}</view> - <view class="content"> - <text class="list-content">{{item.label ? item.label : ''}}</text> - </view> - <t-icon - class="collect-btn" - name="chevron-right" - size="40rpx" - color="#bbb" - /> - </view> - </view> - </view> - <slot name="promotion-bottom" /> - </view> -</t-popup> - diff --git a/pages/goods/details/components/promotion-popup/index.wxss b/pages/goods/details/components/promotion-popup/index.wxss deleted file mode 100644 index 6e0e167..0000000 --- a/pages/goods/details/components/promotion-popup/index.wxss +++ /dev/null @@ -1,131 +0,0 @@ -.promotion-popup-container { - background-color: #ffffff; - position: relative; - z-index: 100; - border-radius: 16rpx 16rpx 0 0; -} - -.promotion-popup-container .promotion-popup-close { - position: absolute; - right: 30rpx; - top: 30rpx; - z-index: 9; - color: rgba(153, 153, 153, 1); -} - -.promotion-popup-container .promotion-popup-close .market { - font-size: 25rpx; - color: #999; -} - -.promotion-popup-container .promotion-popup-title { - height: 100rpx; - position: relative; - display: flex; - align-items: center; - justify-content: center; -} - -.promotion-popup-container .promotion-popup-title { - font-size: 32rpx; - color: #222427; - font-weight: 600; -} - -.promotion-popup-container .promotion-popup-content { - min-height: 400rpx; - max-height: 600rpx; - padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx); - overflow-y: scroll; - -webkit-overflow-scrolling: touch; -} - -.promotion-popup-container .promotion-popup-content .promotion-detail-list { - margin: 0 30rpx; -} - -.promotion-popup-container - .promotion-popup-content - .promotion-detail-list - .list-item:last-child { - margin-bottom: env(safe-area-inset-bottom); - border-bottom: 0; - padding-bottom: calc(28rpx + env(safe-area-inset-bottom)); -} - -.promotion-popup-container - .promotion-popup-content - .promotion-detail-list - .list-item { - display: flex; - justify-content: space-between; - padding: 10rpx 0 28rpx; - position: relative; - font-size: 24rpx; - color: #222427; -} - -.promotion-popup-container - .promotion-popup-content - .promotion-detail-list - .list-item - .tag { - box-sizing: border-box; - font-size: 20rpx; - line-height: 32rpx; - padding: 2rpx 12rpx; - background-color: #ffece9; - margin-right: 16rpx; - display: inline-flex; - color: #fa4126; - border-radius: 54rpx; - flex-shrink: 0; - position: relative; - top: 2rpx; -} - -.promotion-popup-container - .promotion-popup-content - .promotion-detail-list - .list-item - .content { - font-size: 28rpx; - color: #222427; - flex: 1; - line-height: 40rpx; - display: flex; -} - -.promotion-popup-container - .promotion-popup-content - .promotion-detail-list - .list-item - .content - .list-content { - width: 440rpx; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - display: inline-block; -} - -.promotion-popup-container - .promotion-popup-content - .promotion-detail-list - .list-item - .collect-btn { - font-size: 24rpx; - flex-shrink: 0; - margin-left: 20rpx; - display: flex; - align-items: center; -} - -.promotion-popup-container - .promotion-popup-content - .promotion-detail-list - .list-item - .collect-btn - .linkText { - margin-right: 8rpx; -} diff --git a/pages/goods/details/index.js b/pages/goods/details/index.js deleted file mode 100644 index b41f007..0000000 --- a/pages/goods/details/index.js +++ /dev/null @@ -1,443 +0,0 @@ -import Toast from 'tdesign-miniprogram/toast/index'; -import { fetchGood } from '../../../services/good/fetchGood'; -import { fetchActivityList } from '../../../services/activity/fetchActivityList'; -import { - getGoodsDetailsCommentList, - getGoodsDetailsCommentsCount, -} from '../../../services/good/fetchGoodsDetailsComments'; - -import { cdnBase } from '../../../config/index'; - -const imgPrefix = `${cdnBase}/`; - -const recLeftImg = `${imgPrefix}common/rec-left.png`; -const recRightImg = `${imgPrefix}common/rec-right.png`; -const obj2Params = (obj = {}, encode = false) => { - const result = []; - Object.keys(obj).forEach((key) => - result.push(`${key}=${encode ? encodeURIComponent(obj[key]) : obj[key]}`), - ); - - return result.join('&'); -}; - -Page({ - data: { - commentsList: [], - commentsStatistics: { - badCount: 0, - commentCount: 0, - goodCount: 0, - goodRate: 0, - hasImageCount: 0, - middleCount: 0, - }, - isShowPromotionPop: false, - activityList: [], - recLeftImg, - recRightImg, - details: {}, - goodsTabArray: [ - { - name: '鍟嗗搧', - value: '', // 绌哄瓧绗︿覆浠h〃缃《 - }, - { - name: '璇︽儏', - value: 'goods-page', - }, - ], - storeLogo: `${imgPrefix}common/store-logo.png`, - storeName: '浜憁all鏍囧噯鐗堟棗鑸板簵', - jumpArray: [ - { - title: '棣栭〉', - url: '/pages/home/home', - iconName: 'home', - }, - { - title: '璐墿杞�', - url: '/pages/cart/index', - iconName: 'cart', - showCartNum: true, - }, - ], - isStock: true, - cartNum: 0, - soldout: false, - buttonType: 1, - buyNum: 1, - selectedAttrStr: '', - skuArray: [], - primaryImage: '', - specImg: '', - isSpuSelectPopupShow: false, - isAllSelectedSku: false, - buyType: 0, - outOperateStatus: false, // 鏄惁澶栧眰鍔犲叆璐墿杞� - operateType: 0, - selectSkuSellsPrice: 0, - maxLinePrice: 0, - minSalePrice: 0, - maxSalePrice: 0, - list: [], - spuId: '', - navigation: { type: 'fraction' }, - current: 0, - autoplay: true, - duration: 500, - interval: 5000, - soldNum: 0, // 宸插敭鏁伴噺 - }, - - handlePopupHide() { - this.setData({ - isSpuSelectPopupShow: false, - }); - }, - - showSkuSelectPopup(type) { - this.setData({ - buyType: type || 0, - outOperateStatus: type >= 1, - isSpuSelectPopupShow: true, - }); - }, - - buyItNow() { - this.showSkuSelectPopup(1); - }, - - toAddCart() { - this.showSkuSelectPopup(2); - }, - - toNav(e) { - const { url } = e.detail; - wx.switchTab({ - url: url, - }); - }, - - showCurImg(e) { - const { index } = e.detail; - const { images } = this.data.details; - wx.previewImage({ - current: images[index], - urls: images, // 闇�瑕侀瑙堢殑鍥剧墖http閾炬帴鍒楄〃 - }); - }, - - onPageScroll({ scrollTop }) { - const goodsTab = this.selectComponent('#goodsTab'); - goodsTab && goodsTab.onScroll(scrollTop); - }, - - chooseSpecItem(e) { - const { specList } = this.data.details; - const { selectedSku, isAllSelectedSku } = e.detail; - if (!isAllSelectedSku) { - this.setData({ - selectSkuSellsPrice: 0, - }); - } - this.setData({ - isAllSelectedSku, - }); - this.getSkuItem(specList, selectedSku); - }, - - getSkuItem(specList, selectedSku) { - const { skuArray, primaryImage } = this.data; - const selectedSkuValues = this.getSelectedSkuValues(specList, selectedSku); - let selectedAttrStr = ` 浠� `; - selectedSkuValues.forEach((item) => { - selectedAttrStr += `锛�${item.specValue} `; - }); - // eslint-disable-next-line array-callback-return - const skuItem = skuArray.filter((item) => { - let status = true; - (item.specInfo || []).forEach((subItem) => { - if ( - !selectedSku[subItem.specId] || - selectedSku[subItem.specId] !== subItem.specValueId - ) { - status = false; - } - }); - if (status) return item; - }); - this.selectSpecsName(selectedSkuValues.length > 0 ? selectedAttrStr : ''); - if (skuItem) { - this.setData({ - selectItem: skuItem, - selectSkuSellsPrice: skuItem.price || 0, - }); - } else { - this.setData({ - selectItem: null, - selectSkuSellsPrice: 0, - }); - } - this.setData({ - specImg: skuItem && skuItem.skuImage ? skuItem.skuImage : primaryImage, - }); - }, - - // 鑾峰彇宸查�夋嫨鐨剆ku鍚嶇О - getSelectedSkuValues(skuTree, selectedSku) { - const normalizedTree = this.normalizeSkuTree(skuTree); - return Object.keys(selectedSku).reduce((selectedValues, skuKeyStr) => { - const skuValues = normalizedTree[skuKeyStr]; - const skuValueId = selectedSku[skuKeyStr]; - if (skuValueId !== '') { - const skuValue = skuValues.filter((value) => { - return value.specValueId === skuValueId; - })[0]; - skuValue && selectedValues.push(skuValue); - } - return selectedValues; - }, []); - }, - - normalizeSkuTree(skuTree) { - const normalizedTree = {}; - skuTree.forEach((treeItem) => { - normalizedTree[treeItem.specId] = treeItem.specValueList; - }); - return normalizedTree; - }, - - selectSpecsName(selectSpecsName) { - if (selectSpecsName) { - this.setData({ - selectedAttrStr: selectSpecsName, - }); - } else { - this.setData({ - selectedAttrStr: '', - }); - } - }, - - addCart() { - const { isAllSelectedSku } = this.data; - Toast({ - context: this, - selector: '#t-toast', - message: isAllSelectedSku ? '鐐瑰嚮鍔犲叆璐墿杞�' : '璇烽�夋嫨瑙勬牸', - icon: '', - duration: 1000, - }); - }, - - gotoBuy(type) { - const { isAllSelectedSku, buyNum } = this.data; - if (!isAllSelectedSku) { - Toast({ - context: this, - selector: '#t-toast', - message: '璇烽�夋嫨瑙勬牸', - icon: '', - duration: 1000, - }); - return; - } - this.handlePopupHide(); - const query = { - quantity: buyNum, - storeId: '1', - spuId: this.data.spuId, - goodsName: this.data.details.title, - skuId: - type === 1 ? this.data.skuList[0].skuId : this.data.selectItem.skuId, - available: this.data.details.available, - price: this.data.details.minSalePrice, - specInfo: this.data.details.specList?.map((item) => ({ - specTitle: item.title, - specValue: item.specValueList[0].specValue, - })), - primaryImage: this.data.details.primaryImage, - spuId: this.data.details.spuId, - thumb: this.data.details.primaryImage, - title: this.data.details.title, - }; - let urlQueryStr = obj2Params({ - goodsRequestList: JSON.stringify([query]), - }); - urlQueryStr = urlQueryStr ? `?${urlQueryStr}` : ''; - const path = `/pages/order/order-confirm/index${urlQueryStr}`; - wx.navigateTo({ - url: path, - }); - }, - - specsConfirm() { - const { buyType } = this.data; - if (buyType === 1) { - this.gotoBuy(); - } else { - this.addCart(); - } - // this.handlePopupHide(); - }, - - changeNum(e) { - this.setData({ - buyNum: e.detail.buyNum, - }); - }, - - closePromotionPopup() { - this.setData({ - isShowPromotionPop: false, - }); - }, - - promotionChange(e) { - const { index } = e.detail; - wx.navigateTo({ - url: `/pages/promotion-detail/index?promotion_id=${index}`, - }); - }, - - showPromotionPopup() { - this.setData({ - isShowPromotionPop: true, - }); - }, - - getDetail(spuId) { - Promise.all([fetchGood(spuId), fetchActivityList()]).then((res) => { - const [details, activityList] = res; - const skuArray = []; - const { - skuList, - primaryImage, - isPutOnSale, - minSalePrice, - maxSalePrice, - maxLinePrice, - soldNum, - } = details; - skuList.forEach((item) => { - skuArray.push({ - skuId: item.skuId, - quantity: item.stockInfo ? item.stockInfo.stockQuantity : 0, - specInfo: item.specInfo, - }); - }); - const promotionArray = []; - activityList.forEach((item) => { - promotionArray.push({ - tag: item.promotionSubCode === 'MYJ' ? '婊″噺' : '婊℃姌', - label: '婊�100鍏冨噺99.9鍏�', - }); - }); - this.setData({ - details, - activityList, - isStock: details.spuStockQuantity > 0, - maxSalePrice: maxSalePrice ? parseInt(maxSalePrice) : 0, - maxLinePrice: maxLinePrice ? parseInt(maxLinePrice) : 0, - minSalePrice: minSalePrice ? parseInt(minSalePrice) : 0, - list: promotionArray, - skuArray: skuArray, - primaryImage, - soldout: isPutOnSale === 0, - soldNum, - }); - }); - }, - - async getCommentsList() { - try { - const code = 'Success'; - const data = await getGoodsDetailsCommentList(); - const { homePageComments } = data; - if (code.toUpperCase() === 'SUCCESS') { - const nextState = { - commentsList: homePageComments.map((item) => { - return { - goodsSpu: item.spuId, - userName: item.userName || '', - commentScore: item.commentScore, - commentContent: item.commentContent || '鐢ㄦ埛鏈~鍐欒瘎浠�', - userHeadUrl: item.isAnonymity - ? this.anonymityAvatar - : item.userHeadUrl || this.anonymityAvatar, - }; - }), - }; - this.setData(nextState); - } - } catch (error) { - console.error('comments error:', error); - } - }, - - onShareAppMessage() { - // 鑷畾涔夌殑杩斿洖淇℃伅 - const { selectedAttrStr } = this.data; - let shareSubTitle = ''; - if (selectedAttrStr.indexOf('浠�') > -1) { - const count = selectedAttrStr.indexOf('浠�'); - shareSubTitle = selectedAttrStr.slice(count + 1, selectedAttrStr.length); - } - const customInfo = { - imageUrl: this.data.details.primaryImage, - title: this.data.details.title + shareSubTitle, - path: `/pages/goods/details/index?spuId=${this.data.spuId}`, - }; - return customInfo; - }, - - /** 鑾峰彇璇勪环缁熻 */ - async getCommentsStatistics() { - try { - const code = 'Success'; - const data = await getGoodsDetailsCommentsCount(); - if (code.toUpperCase() === 'SUCCESS') { - const { - badCount, - commentCount, - goodCount, - goodRate, - hasImageCount, - middleCount, - } = data; - const nextState = { - commentsStatistics: { - badCount: parseInt(`${badCount}`), - commentCount: parseInt(`${commentCount}`), - goodCount: parseInt(`${goodCount}`), - /** 鍚庣杩斿洖鐧惧垎姣斿悗鏁版嵁浣嗘病鏈夐檺鍒朵綅鏁� */ - goodRate: Math.floor(goodRate * 10) / 10, - hasImageCount: parseInt(`${hasImageCount}`), - middleCount: parseInt(`${middleCount}`), - }, - }; - this.setData(nextState); - } - } catch (error) { - console.error('comments statiistics error:', error); - } - }, - - /** 璺宠浆鍒拌瘎浠峰垪琛� */ - navToCommentsListPage() { - wx.navigateTo({ - url: `/pages/goods/comments/index?spuId=${this.data.spuId}`, - }); - }, - - onLoad(query) { - const { spuId } = query; - this.setData({ - spuId: spuId, - }); - this.getDetail(spuId); - this.getCommentsList(spuId); - this.getCommentsStatistics(spuId); - }, -}); diff --git a/pages/goods/details/index.json b/pages/goods/details/index.json deleted file mode 100644 index 0051686..0000000 --- a/pages/goods/details/index.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "navigationBarTitleText": "鍟嗗搧璇︽儏", - "usingComponents": { - "t-image": "/components/webp-image/index", - "t-tag": "tdesign-miniprogram/tag/tag", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-rate": "tdesign-miniprogram/rate/rate", - "t-swiper": "tdesign-miniprogram/swiper/swiper", - "t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav", - "t-button": "tdesign-miniprogram/button/button", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-popup": "tdesign-miniprogram/popup/popup", - "price": "/components/price/index", - "buy-bar": "./components/buy-bar/index", - "promotion-popup": "./components/promotion-popup/index", - "goods-specs-popup": "./components/goods-specs-popup/index" - } -} \ No newline at end of file diff --git a/pages/goods/details/index.wxml b/pages/goods/details/index.wxml deleted file mode 100644 index 7442ff3..0000000 --- a/pages/goods/details/index.wxml +++ /dev/null @@ -1,153 +0,0 @@ -<view class="goods-detail-page"> - <view class="goods-head"> - <t-swiper - wx:if="{{details.images.length > 0}}" - height="750rpx" - current="{{current}}" - autoplay="{{autoplay}}" - duration="{{duration}}" - interval="{{interval}}" - navigation="{{navigation}}" - list="{{details.images}}" - ></t-swiper> - <view class="goods-info"> - <view class="goods-number"> - <view class="goods-price"> - <price - wr-class="class-goods-price" - symbol-class="class-goods-symbol" - price="{{minSalePrice}}" - type="lighter" - /> - <view class="goods-price-up">璧�</view> - <price wr-class="class-goods-del" price="{{maxLinePrice}}" type="delthrough" /> - </view> - <view class="sold-num">宸插敭{{soldNum}}</view> - </view> - <view wx:if="{{activityList.length > 0}}" class="goods-activity" bindtap="showPromotionPopup"> - <view class="tags-container"> - <view wx:for="{{activityList}}" data-promotionId="{{item.promotionId}}" wx:key="index" wx:if="{{index<4}}"> - <view class="goods-activity-tag">{{item.tag}}</view> - </view> - </view> - <view class="activity-show"> - <view class="activity-show-text">棰嗗姷</view> - <t-icon name="chevron-right" size="42rpx" /> - </view> - </view> - <view class="goods-title"> - <view class="goods-name">{{details.title}}</view> - <view class="goods-tag"> - <t-button open-type="share" t-class="shareBtn" variant="text"> - <view class="btn-icon"> - <t-icon name="share" size="40rpx" color="#000" /> - <view class="share-text">鍒嗕韩</view> - </view> - </t-button> - </view> - </view> - <view class="goods-intro">{{intro}}</view> - </view> - <view class="spu-select" bindtap="showSkuSelectPopup"> - <view class="label">宸查��</view> - <view class="content"> - <view class="{{!selectedAttrStr ? 'tintColor' : ''}}"> - {{selectedAttrStr ? buyNum : ''}}{{selectedAttrStr || '璇烽�夋嫨'}} - </view> - <t-icon name="chevron-right" size="40rpx" color="#BBBBBB" /> - </view> - </view> - <view wx:if="{{ commentsStatistics.commentCount > 0 }}" class="comments-wrap"> - <view class="comments-head" bindtap="navToCommentsListPage"> - <view class="comments-title-wrap"> - <view class="comments-title-label">鍟嗗搧璇勪环</view> - <view class="comments-title-count"> ({{ commentsStatistics.commentCount }}) </view> - </view> - <view class="comments-rate-wrap"> - <view class="comments-good-rate">{{commentsStatistics.goodRate}}% 濂借瘎</view> - <t-icon name="chevron-right" size="40rpx" color="#BBBBBB" /> - </view> - </view> - <view class="comment-item-wrap" wx:for="{{ commentsList }}" wx:for-item="commentItem" wx:key="goodsSpu"> - <view class="comment-item-head"> - <t-image src="{{commentItem.userHeadUrl}}" t-class="comment-item-avatar" /> - <view class="comment-head-right"> - <view class="comment-username">{{commentItem.userName}}</view> - <t-rate - value="{{ commentItem.commentScore }}" - count="{{5}}" - size="12" - gap="2" - color="{{['#ffc51c', '#ddd']}}" - /> - </view> - </view> - <view class="comment-item-content"> {{commentItem.commentContent}} </view> - </view> - </view> - </view> - <view class="desc-content"> - <view class="desc-content__title" wx:if="{{details.desc.length > 0}}"> - <t-image t-class="img" src="{{recLeftImg}}" /> - <span class="desc-content__title--text">璇︽儏浠嬬粛</span> - <t-image t-class="img" src="{{recRightImg}}" /> - </view> - <view wx:if="{{details.desc.length > 0}}" wx:for="{{details.desc}}" wx:key="index"> - <t-image t-class="desc-content__img" src="{{item}}" mode="widthFix" /> - </view> - </view> - <view class="goods-bottom-operation"> - <buy-bar - jumpArray="{{jumpArray}}" - soldout="{{soldout}}" - isStock="{{isStock}}" - shopCartNum="{{cartNum}}" - buttonType="{{buttonType}}" - bind:toAddCart="toAddCart" - bind:toNav="toNav" - bind:toBuyNow="buyItNow" - class="goods-details-card" - /> - </view> - <goods-specs-popup - id="goodsSpecsPopup" - show="{{isSpuSelectPopupShow}}" - title="{{details.title || ''}}" - src="{{specImg ? specImg : primaryImage}}" - specList="{{details.specList || []}}" - skuList="{{skuArray}}" - limitBuyInfo="{{details.limitInfo[0].text || ''}}" - bind:closeSpecsPopup="handlePopupHide" - bind:change="chooseSpecItem" - bind:changeNum="changeNum" - bind:addCart="addCart" - bind:buyNow="gotoBuy" - bind:specsConfirm="specsConfirm" - isStock="{{isStock}}" - outOperateStatus="{{outOperateStatus}}" - > - <view slot="goods-price"> - <view class="popup-sku__price"> - <price - wx:if="{{!isAllSelectedSku || (!promotionSubCode && isAllSelectedSku)}}" - price="{{selectSkuSellsPrice ? selectSkuSellsPrice : minSalePrice }}" - wr-class="popup-sku__price-num" - symbol-class="popup-sku__price-symbol" - /> - <price - wx:if="{{selectSkuSellsPrice === 0 && minSalePrice !== maxSalePrice && !isAllSelectedSku}}" - price="{{maxSalePrice}}" - wr-class="popup-sku__price-del" - type="delthrough" - /> - </view> - </view> - </goods-specs-popup> - <promotion-popup - list="{{list}}" - bind:closePromotionPopup="closePromotionPopup" - show="{{isShowPromotionPop}}" - bind:promotionChange="promotionChange" - /> -</view> -<t-toast id="t-toast" /> diff --git a/pages/goods/details/index.wxss b/pages/goods/details/index.wxss deleted file mode 100644 index d027cb1..0000000 --- a/pages/goods/details/index.wxss +++ /dev/null @@ -1,342 +0,0 @@ -@import '../../../style/global.wxss'; -page { - width: 100vw; -} - -.goods-detail-page .goods-info { - margin: 0 auto; - padding: 26rpx 0 28rpx 30rpx; - background-color: #fff; -} - -.goods-detail-page .swipe-img { - width: 100%; - height: 750rpx; -} - -.goods-detail-page .goods-info .goods-price { - display: flex; - align-items: baseline; -} - -.goods-detail-page .goods-info .goods-price-up { - color: #fa4126; - font-size: 28rpx; - position: relative; - bottom: 4rpx; - left: 8rpx; -} - -.goods-detail-page .goods-info .goods-price .class-goods-price { - font-size: 64rpx; - color: #fa4126; - font-weight: bold; - font-family: DIN Alternate; -} - -.goods-detail-page .goods-info .goods-price .class-goods-symbol { - font-size: 36rpx; - color: #fa4126; -} - -.goods-detail-page .goods-info .goods-price .class-goods-del { - position: relative; - font-weight: normal; - left: 16rpx; - bottom: 2rpx; - color: #999999; - font-size: 32rpx; -} - -.goods-detail-page .goods-info .goods-number { - display: flex; - align-items: center; - justify-content: space-between; -} - -.goods-detail-page .goods-info .goods-number .sold-num { - font-size: 24rpx; - color: #999999; - display: flex; - align-items: flex-end; - margin-right: 32rpx; -} - -.goods-detail-page .goods-info .goods-activity { - display: flex; - margin-top: 16rpx; - justify-content: space-between; -} - -.goods-detail-page .goods-info .goods-activity .tags-container { - display: flex; -} - -.goods-detail-page .goods-info .goods-activity .tags-container .goods-activity-tag { - background: #ffece9; - color: #fa4126; - font-size: 24rpx; - margin-right: 16rpx; - padding: 4rpx 8rpx; - border-radius: 4rpx; -} - -.goods-detail-page .goods-info .goods-activity .activity-show { - display: flex; - justify-content: center; - align-items: center; - color: #fa4126; - font-size: 24rpx; - padding-right: 32rpx; -} - -.goods-detail-page .goods-info .goods-activity .activity-show-text { - line-height: 42rpx; -} - -.goods-detail-page .goods-info .goods-title { - display: flex; - justify-content: space-between; - align-items: center; - margin-top: 20rpx; -} - -.goods-detail-page .goods-info .goods-title .goods-name { - width: 600rpx; - font-weight: 500; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; - font-size: 32rpx; - word-break: break-all; - color: #333333; -} - -.goods-detail-page .goods-info .goods-title .goods-tag { - width: 104rpx; - margin-left: 26rpx; -} - -.goods-detail-page .goods-info .goods-title .goods-tag .shareBtn { - border-radius: 200rpx 0px 0px 200rpx; - width: 100rpx; - height: 96rpx; - border: none; - padding-right: 36rpx !important; -} - -.goods-detail-page .goods-info .goods-title .goods-tag .shareBtn::after { - border: none; -} - -.goods-detail-page .goods-info .goods-title .goods-tag .btn-icon { - font-size: 20rpx; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - height: 96rpx; - color: #999; -} - -.goods-detail-page .goods-info .goods-title .goods-tag .btn-icon .share-text { - padding-top: 8rpx; - font-size: 20rpx; - line-height: 24rpx; -} - -.goods-detail-page .goods-info .goods-intro { - font-size: 26rpx; - color: #888; - line-height: 36rpx; - word-break: break-all; - padding-right: 30rpx; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - white-space: normal; - overflow: hidden; -} - -.spu-select { - height: 80rpx; - background-color: #fff; - margin-top: 20rpx; - display: flex; - align-items: center; - padding: 30rpx; - font-size: 28rpx; -} - -.spu-select .label { - margin-right: 30rpx; - text-align: center; - flex-shrink: 0; - color: #999999; - font-weight: normal; -} - -.spu-select .content { - display: flex; - flex: 1; - justify-content: space-between; - align-items: center; -} - -.spu-select .content .tintColor { - color: #aaa; -} - -.goods-detail-page .desc-content { - margin-top: 20rpx; - background-color: #fff; - padding-bottom: 120rpx; -} - -.goods-detail-page .desc-content__title { - font-size: 28rpx; - line-height: 36rpx; - text-align: center; - display: flex; - justify-content: center; - align-items: center; - padding: 30rpx 20rpx; -} - -.goods-detail-page .desc-content__title .img { - width: 206rpx; - height: 10rpx; -} - -.goods-detail-page .desc-content__title--text { - font-size: 26rpx; - margin: 0 32rpx; - font-weight: 600; -} - -.goods-detail-page .desc-content__img { - width: 100%; - height: auto; -} - -.goods-bottom-operation { - position: fixed; - left: 0; - bottom: 0; - width: 100%; - background-color: #fff; - padding-bottom: env(safe-area-inset-bottom); -} - -.popup-sku-header .popup-sku-header__goods-info .popup-sku__price { - display: flex; - align-items: baseline; - color: #fa4126; - margin-top: 48rpx; -} - -.popup-sku-header .popup-sku-header__goods-info .popup-sku__price .popup-sku__price-num { - font-size: 64rpx; - color: #fa4126; - font-weight: bold; - font-family: DIN Alternate; -} - -.popup-sku-header .popup-sku-header__goods-info .popup-sku__price .popup-sku__price-del { - position: relative; - font-weight: normal; - left: 12rpx; - bottom: 2rpx; - color: #999999; - font-size: 32rpx; -} - -.popup-sku-header .popup-sku-header__goods-info .popup-sku__price .popup-sku__price-symbol { - font-size: 36rpx; - color: #fa4126; -} - -.popup-sku-header .popup-sku-header__goods-info .popup-sku__price .popup-sku__price-max-num { - font-size: 48rpx; -} - -.goods-detail-page .goods-head { - --td-swiper-radius: 0; -} - -.t-toast__content { - z-index: 12000 !important; -} - -.comments-wrap { - margin-top: 20rpx; - padding: 32rpx; - background-color: #fff; -} - -.comments-wrap .comments-head { - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; -} - -.comments-wrap .comments-head .comments-title-wrap { - display: flex; -} - -.comments-title-label, -.comments-title-count { - color: #333333; - font-size: 32rpx; - font-weight: 500; - line-height: 48rpx; -} - -.comments-rate-wrap { - display: flex; - justify-content: center; - align-items: center; - font-size: 24rpx; -} - -.comments-rate-wrap .comments-good-rate { - color: #999999; - font-size: 26rpx; - font-weight: 400; - font-style: normal; - line-height: 36rpx; -} - -.comment-item-wrap .comment-item-head { - display: flex; - flex-direction: row; - align-items: center; - margin-top: 32rpx; -} - -.comment-item-wrap .comment-item-head .comment-item-avatar { - width: 64rpx; - height: 64rpx; - border-radius: 64rpx; -} - -.comment-item-wrap .comment-item-head .comment-head-right { - margin-left: 24rpx; -} - -.comment-head-right .comment-username { - font-size: 26rpx; - color: #333333; - line-height: 36rpx; - font-weight: 400; -} - -.comment-item-wrap .comment-item-content { - margin-top: 20rpx; - color: #333333; - line-height: 40rpx; - font-size: 28rpx; - font-weight: 400; -} diff --git a/pages/goods/list/index.js b/pages/goods/list/index.js deleted file mode 100644 index c16cd66..0000000 --- a/pages/goods/list/index.js +++ /dev/null @@ -1,226 +0,0 @@ -import { fetchGoodsList } from '../../../services/good/fetchGoodsList'; -import Toast from 'tdesign-miniprogram/toast/index'; - -const initFilters = { - overall: 1, - sorts: '', - layout: 0, -}; - -Page({ - data: { - goodsList: [], - layout: 0, - sorts: '', - overall: 1, - show: false, - minVal: '', - maxVal: '', - filter: initFilters, - hasLoaded: false, - loadMoreStatus: 0, - loading: true, - }, - - pageNum: 1, - pageSize: 30, - total: 0, - - handleFilterChange(e) { - const { layout, overall, sorts } = e.detail; - this.pageNum = 1; - this.setData({ - layout, - sorts, - overall, - loadMoreStatus: 0, - }); - this.init(true); - }, - - generalQueryData(reset = false) { - const { filter, keywords, minVal, maxVal } = this.data; - const { pageNum, pageSize } = this; - const { sorts, overall } = filter; - const params = { - sort: 0, // 0 缁煎悎锛�1 浠锋牸 - pageNum: 1, - pageSize: 30, - keyword: keywords, - }; - - if (sorts) { - params.sort = 1; - params.sortType = sorts === 'desc' ? 1 : 0; - } - - if (overall) { - params.sort = 0; - } else { - params.sort = 1; - } - params.minPrice = minVal ? minVal * 100 : 0; - params.maxPrice = maxVal ? maxVal * 100 : undefined; - if (reset) return params; - return { - ...params, - pageNum: pageNum + 1, - pageSize, - }; - }, - - async init(reset = true) { - const { loadMoreStatus, goodsList = [] } = this.data; - const params = this.generalQueryData(reset); - if (loadMoreStatus !== 0) return; - this.setData({ - loadMoreStatus: 1, - loading: true, - }); - try { - const result = await fetchGoodsList(params); - const code = 'Success'; - const data = result; - if (code.toUpperCase() === 'SUCCESS') { - const { spuList, totalCount = 0 } = data; - if (totalCount === 0 && reset) { - this.total = totalCount; - this.setData({ - emptyInfo: { - tip: '鎶辨瓑锛屾湭鎵惧埌鐩稿叧鍟嗗搧', - }, - hasLoaded: true, - loadMoreStatus: 0, - loading: false, - goodsList: [], - }); - return; - } - - const _goodsList = reset ? spuList : goodsList.concat(spuList); - const _loadMoreStatus = _goodsList.length === totalCount ? 2 : 0; - this.pageNum = params.pageNum || 1; - this.total = totalCount; - this.setData({ - goodsList: _goodsList, - loadMoreStatus: _loadMoreStatus, - }); - } else { - this.setData({ - loading: false, - }); - wx.showToast({ - title: '鏌ヨ澶辫触锛岃绋嶅�欓噸璇�', - }); - } - } catch (error) { - this.setData({ - loading: false, - }); - } - this.setData({ - hasLoaded: true, - loading: false, - }); - }, - - onLoad() { - this.init(true); - }, - - onReachBottom() { - const { goodsList } = this.data; - const { total = 0 } = this; - if (goodsList.length === total) { - this.setData({ - loadMoreStatus: 2, - }); - return; - } - this.init(false); - }, - - handleAddCart() { - Toast({ - context: this, - selector: '#t-toast', - message: '鐐瑰嚮鍔犺喘', - }); - }, - - tagClickHandle() { - Toast({ - context: this, - selector: '#t-toast', - message: '鐐瑰嚮鏍囩', - }); - }, - - gotoGoodsDetail(e) { - const { index } = e.detail; - const { spuId } = this.data.goodsList[index]; - wx.navigateTo({ - url: `/pages/goods/details/index?spuId=${spuId}`, - }); - }, - - showFilterPopup() { - this.setData({ - show: true, - }); - }, - - showFilterPopupClose() { - this.setData({ - show: false, - }); - }, - - onMinValAction(e) { - const { value } = e.detail; - this.setData({ minVal: value }); - }, - - onMaxValAction(e) { - const { value } = e.detail; - this.setData({ maxVal: value }); - }, - - reset() { - this.setData({ minVal: '', maxVal: '' }); - }, - - confirm() { - const { minVal, maxVal } = this.data; - let message = ''; - if (minVal && !maxVal) { - message = `浠锋牸鏈�灏忔槸${minVal}`; - } else if (!minVal && maxVal) { - message = `浠锋牸鑼冨洿鏄�0-${minVal}`; - } else if (minVal && maxVal && minVal <= maxVal) { - message = `浠锋牸鑼冨洿${minVal}-${this.data.maxVal}`; - } else { - message = '璇疯緭鍏ユ纭寖鍥�'; - } - if (message) { - Toast({ - context: this, - selector: '#t-toast', - message, - }); - } - this.pageNum = 1; - this.setData( - { - show: false, - minVal: '', - goodsList: [], - loadMoreStatus: 0, - maxVal: '', - }, - () => { - this.init(); - }, - ); - }, -}); diff --git a/pages/goods/list/index.json b/pages/goods/list/index.json deleted file mode 100644 index 0811511..0000000 --- a/pages/goods/list/index.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "navigationBarTitleText": "鍟嗗搧鍒楄〃", - "usingComponents": { - "t-input": "tdesign-miniprogram/input/input", - "t-empty": "tdesign-miniprogram/empty/empty", - "t-toast": "tdesign-miniprogram/toast/toast", - "goods-list": "/components/goods-list/index", - "filter": "/components/filter/index", - "filter-popup": "/components/filter-popup/index", - "load-more": "/components/load-more/index" - } -} \ No newline at end of file diff --git a/pages/goods/list/index.wxml b/pages/goods/list/index.wxml deleted file mode 100644 index 28c59df..0000000 --- a/pages/goods/list/index.wxml +++ /dev/null @@ -1,54 +0,0 @@ -<view class="goods-list-container"> - <filter - wr-class="filter-container" - bind:change="handleFilterChange" - layout="{{layout}}" - sorts="{{sorts}}" - overall="{{overall}}" - bind:showFilterPopup="showFilterPopup" - > - <filter-popup - slot="filterPopup" - show="{{show}}" - bind:showFilterPopupClose="showFilterPopupClose" - bind:reset="reset" - bind:confirm="confirm" - > - <view class="price-container" slot="filterSlot"> - <view class="price-between">浠锋牸鍖洪棿</view> - <view class="price-ipts-wrap"> - <t-input - align="center" - type="number" - t-class="price-ipt" - placeholder="鏈�浣庝环" - value="{{minVal}}" - bindchange="onMinValAction" - /> - <view class="price-divided">-</view> - <t-input - align="center" - type="number" - t-class="price-ipt" - placeholder="鏈�楂樹环" - value="{{maxVal}}" - bindchange="onMaxValAction" - /> - </view> - </view> - </filter-popup> - </filter> - <view class="empty-wrap" wx:if="{{goodsList.length === 0 && hasLoaded}}"> - <t-empty t-class="empty-tips" size="240rpx" description="鏆傛棤鐩稿叧鍟嗗搧" /> - </view> - <view class="category-goods-list" wx:if="{{goodsList.length}}"> - <goods-list - wr-class="wr-goods-list" - goodsList="{{goodsList}}" - bind:click="gotoGoodsDetail" - bind:addcart="handleAddCart" - /> - </view> - <load-more wx:if="{{goodsList.length > 0}}" status="{{loadMoreStatus}}" no-more-text="娌℃湁鏇村浜�" /> -</view> -<t-toast id="t-toast" /> diff --git a/pages/goods/list/index.wxss b/pages/goods/list/index.wxss deleted file mode 100644 index 5073012..0000000 --- a/pages/goods/list/index.wxss +++ /dev/null @@ -1,99 +0,0 @@ -page { - background-color: #fff; -} - -.goods-list-container { - display: block; -} - -.goods-list-container .t-search { - padding: 0 30rpx; - background-color: #fff; -} - -.goods-list-container .t-class__input-container { - height: 64rpx !important; - border-radius: 32rpx !important; -} - -.goods-list-container .t-search__left-icon { - display: flex; - align-items: center; -} - -.goods-list-container .t-search__input { - font-size: 28rpx !important; - color: rgb(116, 116, 116) !important; -} - -.goods-list-container .category-goods-list { - background-color: #f2f2f2; - overflow-y: scroll; - -webkit-overflow-scrolling: touch; - padding: 20rpx 24rpx; - -webkit-overflow-scrolling: touch; -} - -.goods-list-container .wr-goods-list { - background: #f2f2f2 !important; -} - -.goods-list-container .t-image__mask { - display: flex !important; -} - -.goods-list-container .empty-wrap { - margin-top: 184rpx; - margin-bottom: 120rpx; - height: 300rpx; -} - -.goods-list-container .empty-wrap .empty-tips .empty-content .content-text { - margin-top: 40rpx; -} - -.goods-list-container .price-container { - padding: 32rpx; - height: 100vh; - max-width: 632rpx; - background-color: #fff; - border-radius: 30rpx 0 0 30rpx; - box-sizing: border-box; -} - -.goods-list-container .price-between { - font-size: 26rpx; - font-weight: 500; - color: rgba(51, 51, 51, 1); -} - -.goods-list-container .price-ipts-wrap { - width: 100%; - display: flex; - align-items: center; - justify-content: space-around; - margin-top: 24rpx; - - --td-input-bg-color: rgba(245, 245, 245, 1); - --td-input-vertical-padding: 4rpx; - --td-input-border-color: transparent; -} - -.goods-list-container .price-ipts-wrap .price-divided { - width: 16rpx; - margin: 0 24rpx; - color: #333333; -} - -.goods-list-container .price-ipts-wrap .t-input__wrapper { - margin: 0 !important; -} - -.goods-list-container .price-ipts-wrap .t-input__content, -.goods-list-container .price-ipts-wrap .t-input__placeholder { - font-size: 24rpx !important; -} - -.goods-list-container .price-ipts-wrap .price-ipt { - border-radius: 8rpx; -} diff --git a/pages/goods/result/index.js b/pages/goods/result/index.js deleted file mode 100644 index a2da393..0000000 --- a/pages/goods/result/index.js +++ /dev/null @@ -1,262 +0,0 @@ -/* eslint-disable no-param-reassign */ -import { getSearchResult } from '../../../services/good/fetchSearchResult'; -import Toast from 'tdesign-miniprogram/toast/index'; - -const initFilters = { - overall: 1, - sorts: '', -}; - -Page({ - data: { - goodsList: [], - sorts: '', - overall: 1, - show: false, - minVal: '', - maxVal: '', - minSalePriceFocus: false, - maxSalePriceFocus: false, - filter: initFilters, - hasLoaded: false, - keywords: '', - loadMoreStatus: 0, - loading: true, - }, - - total: 0, - pageNum: 1, - pageSize: 30, - - onLoad(options) { - const { searchValue = '' } = options || {}; - this.setData( - { - keywords: searchValue, - }, - () => { - this.init(true); - }, - ); - }, - - generalQueryData(reset = false) { - const { filter, keywords, minVal, maxVal } = this.data; - const { pageNum, pageSize } = this; - const { sorts, overall } = filter; - const params = { - sort: 0, // 0 缁煎悎锛�1 浠锋牸 - pageNum: 1, - pageSize: 30, - keyword: keywords, - }; - - if (sorts) { - params.sort = 1; - params.sortType = sorts === 'desc' ? 1 : 0; - } - if (overall) { - params.sort = 0; - } else { - params.sort = 1; - } - params.minPrice = minVal ? minVal * 100 : 0; - params.maxPrice = maxVal ? maxVal * 100 : undefined; - if (reset) return params; - return { - ...params, - pageNum: pageNum + 1, - pageSize, - }; - }, - - async init(reset = true) { - const { loadMoreStatus, goodsList = [] } = this.data; - const params = this.generalQueryData(reset); - if (loadMoreStatus !== 0) return; - this.setData({ - loadMoreStatus: 1, - loading: true, - }); - try { - const result = await getSearchResult(params); - const code = 'Success'; - const data = result; - if (code.toUpperCase() === 'SUCCESS') { - const { spuList, totalCount = 0 } = data; - if (totalCount === 0 && reset) { - this.total = totalCount; - this.setData({ - emptyInfo: { - tip: '鎶辨瓑锛屾湭鎵惧埌鐩稿叧鍟嗗搧', - }, - hasLoaded: true, - loadMoreStatus: 0, - loading: false, - goodsList: [], - }); - return; - } - - const _goodsList = reset ? spuList : goodsList.concat(spuList); - _goodsList.forEach((v) => { - v.tags = v.spuTagList.map((u) => u.title); - v.hideKey = { desc: true }; - }); - const _loadMoreStatus = _goodsList.length === totalCount ? 2 : 0; - this.pageNum = params.pageNum || 1; - this.total = totalCount; - this.setData({ - goodsList: _goodsList, - loadMoreStatus: _loadMoreStatus, - }); - } else { - this.setData({ - loading: false, - }); - wx.showToast({ - title: '鏌ヨ澶辫触锛岃绋嶅�欓噸璇�', - }); - } - } catch (error) { - this.setData({ - loading: false, - }); - } - this.setData({ - hasLoaded: true, - loading: false, - }); - }, - - handleCartTap() { - wx.switchTab({ - url: '/pages/cart/index', - }); - }, - - handleSubmit() { - this.setData( - { - goodsList: [], - loadMoreStatus: 0, - }, - () => { - this.init(true); - }, - ); - }, - - onReachBottom() { - const { goodsList } = this.data; - const { total = 0 } = this; - if (goodsList.length === total) { - this.setData({ - loadMoreStatus: 2, - }); - return; - } - this.init(false); - }, - - handleAddCart() { - Toast({ - context: this, - selector: '#t-toast', - message: '鐐瑰嚮鍔犺喘', - }); - }, - - gotoGoodsDetail(e) { - const { index } = e.detail; - const { spuId } = this.data.goodsList[index]; - wx.navigateTo({ - url: `/pages/goods/details/index?spuId=${spuId}`, - }); - }, - - handleFilterChange(e) { - const { overall, sorts } = e.detail; - const { total } = this; - const _filter = { - sorts, - overall, - }; - this.setData({ - filter: _filter, - sorts, - overall, - }); - - this.pageNum = 1; - this.setData( - { - goodsList: [], - loadMoreStatus: 0, - }, - () => { - total && this.init(true); - }, - ); - }, - - showFilterPopup() { - this.setData({ - show: true, - }); - }, - - showFilterPopupClose() { - this.setData({ - show: false, - }); - }, - - onMinValAction(e) { - const { value } = e.detail; - this.setData({ minVal: value }); - }, - - onMaxValAction(e) { - const { value } = e.detail; - this.setData({ maxVal: value }); - }, - - reset() { - this.setData({ minVal: '', maxVal: '' }); - }, - - confirm() { - const { minVal, maxVal } = this.data; - let message = ''; - if (minVal && !maxVal) { - message = `浠锋牸鏈�灏忔槸${minVal}`; - } else if (!minVal && maxVal) { - message = `浠锋牸鑼冨洿鏄�0-${minVal}`; - } else if (minVal && maxVal && minVal <= maxVal) { - message = `浠锋牸鑼冨洿${minVal}-${this.data.maxVal}`; - } else { - message = '璇疯緭鍏ユ纭寖鍥�'; - } - if (message) { - Toast({ - context: this, - selector: '#t-toast', - message, - }); - } - this.pageNum = 1; - this.setData( - { - show: false, - minVal: '', - goodsList: [], - loadMoreStatus: 0, - maxVal: '', - }, - () => { - this.init(); - }, - ); - }, -}); diff --git a/pages/goods/result/index.json b/pages/goods/result/index.json deleted file mode 100644 index 130b48d..0000000 --- a/pages/goods/result/index.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "navigationBarTitleText": "鎼滅储", - "usingComponents": { - "t-search": "tdesign-miniprogram/search/search", - "t-input": "tdesign-miniprogram/input/input", - "t-empty": "tdesign-miniprogram/empty/empty", - "t-toast": "tdesign-miniprogram/toast/toast", - "goods-list": "/components/goods-list/index", - "filter": "/components/filter/index", - "filter-popup": "/components/filter-popup/index", - "load-more": "/components/load-more/index", - "t-icon": "tdesign-miniprogram/icon/icon" - }, - "onReachBottomDistance": 50 -} \ No newline at end of file diff --git a/pages/goods/result/index.wxml b/pages/goods/result/index.wxml deleted file mode 100644 index beb37fe..0000000 --- a/pages/goods/result/index.wxml +++ /dev/null @@ -1,66 +0,0 @@ -<view class="result-container"> - <t-search - t-class="t-search" - t-class-input-container="t-class__input-container" - t-class-left="t-search__left-icon" - t-class-input="t-search__input" - value="{{keywords}}" - leftIcon="" - placeholder="iPhone12pro" - bind:submit="handleSubmit" - > - <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" /> - </t-search> - <filter - wr-class="filter-container" - bind:change="handleFilterChange" - layout="{{layout}}" - sorts="{{sorts}}" - overall="{{overall}}" - bind:showFilterPopup="showFilterPopup" - > - <filter-popup - show="{{show}}" - slot="filterPopup" - bind:showFilterPopupClose="showFilterPopupClose" - bind:reset="reset" - bind:confirm="confirm" - > - <view class="price-container" slot="filterSlot"> - <view class="price-between">浠锋牸鍖洪棿</view> - <view class="price-ipts-wrap"> - <t-input - type="number" - t-class="price-ipt" - t-class-input="t-class-input" - placeholder="鏈�浣庝环" - value="{{minVal}}" - bindchange="onMinValAction" - /> - <view class="price-divided">-</view> - <t-input - type="number" - t-class="price-ipt" - t-class-input="t-class-input" - placeholder="鏈�楂樹环" - value="{{maxVal}}" - bindchange="onMaxValAction" - /> - </view> - </view> - </filter-popup> - </filter> - <view class="empty-wrap" wx:if="{{goodsList.length === 0 && hasLoaded}}"> - <t-empty t-class="empty-tips" size="240rpx" description="鏆傛棤鐩稿叧鍟嗗搧" /> - </view> - <view class="category-goods-list" wx:if="{{goodsList.length}}"> - <goods-list - wr-class="wr-goods-list" - goodsList="{{goodsList}}" - bind:click="gotoGoodsDetail" - bind:addcart="handleAddCart" - /> - </view> - <load-more wx:if="{{goodsList.length > 0}}" status="{{loadMoreStatus}}" no-more-text="娌℃湁鏇村浜�" /> -</view> -<t-toast id="t-toast" /> diff --git a/pages/goods/result/index.wxss b/pages/goods/result/index.wxss deleted file mode 100644 index 5fee10e..0000000 --- a/pages/goods/result/index.wxss +++ /dev/null @@ -1,114 +0,0 @@ -page { - background-color: #fff; -} - -page view { - box-sizing: border-box; -} - -.result-container { - display: block; -} - -.result-container .t-search { - padding: 0 30rpx; - background-color: #fff; -} - -.result-container .t-class__input-container { - height: 64rpx !important; - border-radius: 32rpx !important; -} - -.result-container .t-search__left-icon { - display: flex; - align-items: center; -} - -.result-container .t-search__input { - font-size: 28rpx !important; - color: #333 !important; -} - -.result-container .category-goods-list { - background-color: #f2f2f2; - overflow-y: scroll; - padding: 20rpx 24rpx; - -webkit-overflow-scrolling: touch; -} - -.result-container .wr-goods-list { - background: #f2f2f2 !important; -} - -.result-container .t-image__mask { - display: flex !important; -} - -.result-container .empty-wrap { - margin-top: 184rpx; - margin-bottom: 120rpx; - height: 300rpx; -} - -.result-container .empty-wrap .empty-tips .empty-content .content-text { - margin-top: 40rpx; -} - -.result-container .price-container { - padding: 32rpx; - height: 100vh; - max-width: 632rpx; - background-color: #fff; - border-radius: 30rpx 0 0 30rpx; -} - -.result-container .price-between { - font-size: 26rpx; - font-weight: 500; - color: rgba(51, 51, 51, 1); -} - -.result-container .price-ipts-wrap { - width: 100%; - display: flex; - flex-direction: row; - justify-content: space-around; - margin-top: 24rpx; -} - -.result-container .price-ipts-wrap .price-divided { - position: relative; - width: 22rpx; - margin: 0 20rpx; - color: #222427; -} - -.result-container .price-ipts-wrap .price-ipt { - box-sizing: border-box; - width: 246rpx; - font-size: 24rpx; - height: 56rpx; - padding: 0 24rpx; - text-align: center; - border-radius: 8rpx; - color: #333; - background: rgba(245, 245, 245, 1); -} - -.t-class-input { - font-size: 24rpx !important; -} - -.t-search__clear { - font-size: 40rpx !important; -} - -.result-container .price-ipts-wrap .price-ipt::after { - border: none !important; -} - -.result-container .t-input__control { - font-size: 24rpx !important; - text-align: center; -} diff --git a/pages/goods/search/index.js b/pages/goods/search/index.js deleted file mode 100644 index c726041..0000000 --- a/pages/goods/search/index.js +++ /dev/null @@ -1,119 +0,0 @@ -import { - getSearchHistory, - getSearchPopular, -} from '../../../services/good/fetchSearchHistory'; - -Page({ - data: { - historyWords: [], - popularWords: [], - searchValue: '', - dialog: { - title: '纭鍒犻櫎褰撳墠鍘嗗彶璁板綍', - showCancelButton: true, - message: '', - }, - dialogShow: false, - }, - - deleteType: 0, - deleteIndex: '', - - onShow() { - this.queryHistory(); - this.queryPopular(); - }, - - async queryHistory() { - try { - const data = await getSearchHistory(); - const code = 'Success'; - if (String(code).toUpperCase() === 'SUCCESS') { - const { historyWords = [] } = data; - this.setData({ - historyWords, - }); - } - } catch (error) { - console.error(error); - } - }, - - async queryPopular() { - try { - const data = await getSearchPopular(); - const code = 'Success'; - if (String(code).toUpperCase() === 'SUCCESS') { - const { popularWords = [] } = data; - this.setData({ - popularWords, - }); - } - } catch (error) { - console.error(error); - } - }, - - confirm() { - const { historyWords } = this.data; - const { deleteType, deleteIndex } = this; - historyWords.splice(deleteIndex, 1); - if (deleteType === 0) { - this.setData({ - historyWords, - dialogShow: false, - }); - } else { - this.setData({ historyWords: [], dialogShow: false }); - } - }, - - close() { - this.setData({ dialogShow: false }); - }, - - handleClearHistory() { - const { dialog } = this.data; - this.deleteType = 1; - this.setData({ - dialog: { - ...dialog, - message: '纭鍒犻櫎鎵�鏈夊巻鍙茶褰�', - }, - dialogShow: true, - }); - }, - - deleteCurr(e) { - const { index } = e.currentTarget.dataset; - const { dialog } = this.data; - this.deleteIndex = index; - this.setData({ - dialog: { - ...dialog, - message: '纭鍒犻櫎褰撳墠鍘嗗彶璁板綍', - deleteType: 0, - }, - dialogShow: true, - }); - }, - - handleHistoryTap(e) { - const { historyWords } = this.data; - const { dataset } = e.currentTarget; - const _searchValue = historyWords[dataset.index || 0] || ''; - if (_searchValue) { - wx.navigateTo({ - url: `/pages/goods/result/index?searchValue=${_searchValue}`, - }); - } - }, - - handleSubmit(e) { - const { value } = e.detail.value; - if (value.length === 0) return; - wx.navigateTo({ - url: `/pages/goods/result/index?searchValue=${value}`, - }); - }, -}); diff --git a/pages/goods/search/index.json b/pages/goods/search/index.json deleted file mode 100644 index 74abdf7..0000000 --- a/pages/goods/search/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "navigationBarTitleText": "鎼滅储", - "usingComponents": { - "t-search": "tdesign-miniprogram/search/search", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-dialog": "tdesign-miniprogram/dialog/dialog" - } -} diff --git a/pages/goods/search/index.wxml b/pages/goods/search/index.wxml deleted file mode 100644 index b50c96d..0000000 --- a/pages/goods/search/index.wxml +++ /dev/null @@ -1,61 +0,0 @@ -<view class="search-page"> - <t-search - t-class-input-container="t-class__input-container" - t-class-input="t-search__input" - value="{{searchValue}}" - leftIcon="" - placeholder="iPhone12pro" - bind:submit="handleSubmit" - focus - > - <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" /> - </t-search> - <view class="search-wrap"> - <view class="history-wrap"> - <view class="search-header"> - <text class="search-title">鍘嗗彶鎼滅储</text> - <text class="search-clear" bind:tap="handleClearHistory">娓呴櫎</text> - </view> - <view class="search-content"> - <view - class="search-item" - hover-class="hover-history-item" - wx:for="{{historyWords}}" - bind:tap="handleHistoryTap" - bindlongpress="deleteCurr" - data-index="{{index}}" - wx:key="*this" - > - {{item}} - </view> - </view> - </view> - <view class="popular-wrap"> - <view class="search-header"> - <text class="search-title">鐑棬鎼滅储</text> - </view> - <view class="search-content"> - <view - class="search-item" - hover-class="hover-history-item" - wx:for="{{popularWords}}" - bind:tap="handleHistoryTap" - data-index="{{index}}" - wx:key="*this" - > - {{item}} - </view> - </view> - </view> - </view> - <t-dialog - visible="{{dialogShow}}" - content="{{dialog.message}}" - bindconfirm="confirm" - bind:close="close" - confirm-btn="纭畾" - cancel-btn="{{dialog.showCancelButton ? '鍙栨秷' : null}}" - t-class-confirm="dialog__button-confirm" - t-class-cancel="dialog__button-cancel" - /> -</view> diff --git a/pages/goods/search/index.wxss b/pages/goods/search/index.wxss deleted file mode 100644 index 676603e..0000000 --- a/pages/goods/search/index.wxss +++ /dev/null @@ -1,79 +0,0 @@ -.search-page { - box-sizing: border-box; - width: 100vw; - height: 100vh; - padding: 0 30rpx; -} - -.search-page .t-class__input-container { - height: 64rpx !important; - border-radius: 32rpx !important; -} - -.search-page .t-search__input { - font-size: 28rpx !important; - color: #333 !important; -} - -.search-page .search-wrap { - margin-top: 44rpx; -} - -.search-page .history-wrap { - margin-bottom: 20px; -} - -.search-page .search-header { - display: flex; - flex-flow: row nowrap; - justify-content: space-between; - align-items: center; -} - -.search-page .search-title { - font-size: 30rpx; - font-family: PingFangSC-Semibold, PingFang SC; - font-weight: 600; - color: rgba(51, 51, 51, 1); - line-height: 42rpx; -} - -.search-page .search-clear { - font-size: 24rpx; - font-family: PingFang SC; - line-height: 32rpx; - color: #999999; - font-weight: normal; -} - -.search-page .search-content { - overflow: hidden; - display: flex; - flex-flow: row wrap; - justify-content: flex-start; - align-items: flex-start; - margin-top: 24rpx; -} - -.search-page .search-item { - color: #333333; - font-size: 24rpx; - line-height: 32rpx; - font-weight: normal; - margin-right: 24rpx; - margin-bottom: 24rpx; - background: #f5f5f5; - border-radius: 38rpx; - padding: 12rpx 24rpx; -} - -.search-page .hover-history-item { - position: relative; - top: 3rpx; - left: 3rpx; - box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1) inset; -} - -.add-notes__confirm { - color: #fa4126 !important; -} diff --git a/pages/home/home.js b/pages/home/home.js index c8ad668..bfe983c 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -424,7 +424,7 @@ goDetail(e) { const { book } = e.currentTarget.dataset; wx.navigateTo({ - url: `/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, + url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, }); }, getShoppingCartList() { @@ -496,7 +496,7 @@ console.log(e, 1) if (type == "tushufuwu") { wx.navigateTo({ - url: '/pages/bookServices/list/index' + url: '/packageBookService/pages/bookServices/list/index' }) } else { wx.showToast({ diff --git a/pages/home/home.json b/pages/home/home.json index 3193cbf..5bc8b6b 100644 --- a/pages/home/home.json +++ b/pages/home/home.json @@ -8,13 +8,11 @@ "t-loading": "tdesign-miniprogram/loading/loading", "t-swiper": "tdesign-miniprogram/swiper/swiper", "t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav", - "t-image": "/components/webp-image/index", + "t-image": "tdesign-miniprogram/image/image", "t-icon": "tdesign-miniprogram/icon/icon", "t-toast": "tdesign-miniprogram/toast/toast", "t-tabs": "tdesign-miniprogram/tabs/tabs", "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", - "goods-list": "/components/goods-list/index", - "load-more": "/components/load-more/index", "t-grid": "tdesign-miniprogram/grid/grid", "t-grid-item": "tdesign-miniprogram/grid-item/grid-item", "t-empty": "tdesign-miniprogram/empty/empty" diff --git a/pages/home/home.wxml b/pages/home/home.wxml index 3ecf648..21fbf69 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -6,10 +6,10 @@ </view> <view class="home-page-header"> <view class="bg"> - <image src="/static/images/home/home-bg@2x.png" mode="heightFix" class="image" /> + <image src="/static/images/home/home-bg.png" mode="heightFix" class="image" /> </view> <view class="search"> - <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" leftIcon="" bind:submit="onRetrievalPage" model:value="{{searchVal}}"> + <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" leftIcon="" bind:submit="onRetrievalPage" model:value="{{searchVal}}"> <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" bind:tap="navToSearchPage" /> </t-search> </view> @@ -202,6 +202,5 @@ </scroll-view> </view> </view> - <load-more list-is-empty="{{!goodsList.length}}" status="{{goodsListLoadStatus}}" bind:retry="onReTry" /> <t-toast id="t-toast" /> </view> \ No newline at end of file diff --git a/pages/order/after-service-detail/api.js b/pages/order/after-service-detail/api.js deleted file mode 100644 index 22d62fe..0000000 --- a/pages/order/after-service-detail/api.js +++ /dev/null @@ -1,34 +0,0 @@ -import { resp } from '../after-service-list/api'; -import dayjs from 'dayjs'; -import { mockIp, mockReqId } from '../../../utils/mock'; - -export const formatTime = (date, template) => dayjs(date).format(template); - -export function getRightsDetail({ rightsNo }) { - const _resq = { - data: {}, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 79, - success: true, - }; - _resq.data = - resp.data.dataList.filter((item) => item.rights.rightsNo === rightsNo) || - {}; - return Promise.resolve(_resq); -} - -export function cancelRights() { - const _resq = { - data: {}, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 79, - success: true, - }; - return Promise.resolve(_resq); -} diff --git a/pages/order/after-service-detail/index.js b/pages/order/after-service-detail/index.js deleted file mode 100644 index d90dba4..0000000 --- a/pages/order/after-service-detail/index.js +++ /dev/null @@ -1,205 +0,0 @@ -import Toast from 'tdesign-miniprogram/toast/index'; -import { ServiceType, ServiceTypeDesc, ServiceStatus } from '../config'; -import { formatTime, getRightsDetail } from './api'; - -const TitleConfig = { - [ServiceType.ORDER_CANCEL]: '閫�娆捐鎯�', - [ServiceType.ONLY_REFUND]: '閫�娆捐鎯�', - [ServiceType.RETURN_GOODS]: '閫�璐ч��娆捐鎯�', -}; - -Page({ - data: { - pageLoading: true, - serviceRaw: {}, - service: {}, - deliveryButton: {}, - gallery: { - current: 0, - show: false, - proofs: [], - }, - showProofs: false, - backRefresh: false, - }, - - onLoad(query) { - this.rightsNo = query.rightsNo; - this.inputDialog = this.selectComponent('#input-dialog'); - this.init(); - }, - - onShow() { - // 褰撲粠鍏朵粬椤甸潰杩斿洖锛屽苟涓� backRefresh 琚疆涓� true 鏃讹紝鍒锋柊鏁版嵁 - if (!this.data.backRefresh) return; - this.init(); - this.setData({ backRefresh: false }); - }, - - // 椤甸潰鍒锋柊锛屽睍绀轰笅鎷夊埛鏂� - onPullDownRefresh_(e) { - const { callback } = e.detail; - return this.getService().then(() => callback && callback()); - }, - - init() { - this.setData({ pageLoading: true }); - this.getService().then(() => { - this.setData({ pageLoading: false }); - }); - }, - - getService() { - const params = { rightsNo: this.rightsNo }; - return getRightsDetail(params).then((res) => { - const serviceRaw = res.data[0]; - // 婊ゆ帀濉啓杩愬崟鍙枫�佷慨鏀硅繍鍗曞彿鎸夐挳锛岃繖涓や釜鎸夐挳鐗规畩澶勭悊锛屼笉鍦ㄥ簳閮ㄦ寜閽爮灞曠ず - if (!serviceRaw.buttonVOs) serviceRaw.buttonVOs = []; - const deliveryButton = {}; - const service = { - id: serviceRaw.rights.rightsNo, - serviceNo: serviceRaw.rights.rightsNo, - storeName: serviceRaw.rights.storeName, - type: serviceRaw.rights.rightsType, - typeDesc: ServiceTypeDesc[serviceRaw.rights.rightsType], - status: serviceRaw.rights.rightsStatus, - statusIcon: this.genStatusIcon(serviceRaw.rights), - statusName: serviceRaw.rights.userRightsStatusName, - statusDesc: serviceRaw.rights.userRightsStatusDesc, - amount: serviceRaw.rights.refundRequestAmount, - goodsList: (serviceRaw.rightsItem || []).map((item, i) => ({ - id: i, - thumb: item.goodsPictureUrl, - title: item.goodsName, - specs: (item.specInfo || []).map((s) => s.specValues || ''), - itemRefundAmount: item.itemRefundAmount, - rightsQuantity: item.rightsQuantity, - })), - orderNo: serviceRaw.rights.orderNo, // 璁㈠崟缂栧彿 - rightsNo: serviceRaw.rights.rightsNo, // 鍞悗鏈嶅姟鍗曞彿 - rightsReasonDesc: serviceRaw.rights.rightsReasonDesc, // 鐢宠鍞悗鍘熷洜 - isRefunded: serviceRaw.rights.userRightsStatus === ServiceStatus.REFUNDED, // 鏄惁宸查��娆� - refundMethodList: (serviceRaw.refundMethodList || []).map((m) => ({ - name: m.refundMethodName, - amount: m.refundMethodAmount, - })), // 閫�娆炬槑缁� - refundRequestAmount: serviceRaw.rights.refundRequestAmount, // 鐢宠閫�娆鹃噾棰� - payTraceNo: serviceRaw.rightsRefund.traceNo, // 浜ゆ槗娴佹按鍙� - createTime: formatTime(parseFloat(`${serviceRaw.rights.createTime}`), 'YYYY-MM-DD HH:mm'), // 鐢宠鏃堕棿 - logisticsNo: serviceRaw.logisticsVO.logisticsNo, // 閫�璐х墿娴佸崟鍙� - logisticsCompanyName: serviceRaw.logisticsVO.logisticsCompanyName, // 閫�璐х墿娴佸叕鍙� - logisticsCompanyCode: serviceRaw.logisticsVO.logisticsCompanyCode, // 閫�璐х墿娴佸叕鍙� - remark: serviceRaw.logisticsVO.remark, // 閫�璐у娉� - receiverName: serviceRaw.logisticsVO.receiverName, // 鏀惰揣浜� - receiverPhone: serviceRaw.logisticsVO.receiverPhone, // 鏀惰揣浜虹數璇� - receiverAddress: this.composeAddress(serviceRaw), // 鏀惰揣浜哄湴鍧� - applyRemark: serviceRaw.rightsRefund.refundDesc, // 鐢宠閫�娆炬椂鐨勫~鍐欑殑璇存槑 - buttons: serviceRaw.buttonVOs || [], - logistics: serviceRaw.logisticsVO, - }; - const proofs = serviceRaw.rights.rightsImageUrls || []; - this.setData({ - serviceRaw, - service, - deliveryButton, - 'gallery.proofs': proofs, - showProofs: - serviceRaw.rights.userRightsStatus === ServiceStatus.PENDING_VERIFY && - (service.applyRemark || proofs.length > 0), - }); - wx.setNavigationBarTitle({ - title: TitleConfig[service.type], - }); - }); - }, - - composeAddress(service) { - return [ - service.logisticsVO.receiverProvince, - service.logisticsVO.receiverCity, - service.logisticsVO.receiverCountry, - service.logisticsVO.receiverArea, - service.logisticsVO.receiverAddress, - ] - .filter((item) => !!item) - .join(' '); - }, - - onRefresh() { - this.init(); - }, - - editLogistices() { - this.setData({ - inputDialogVisible: true, - }); - this.inputDialog.setData({ - cancelBtn: '鍙栨秷', - confirmBtn: '纭畾', - }); - this.inputDialog._onConfirm = () => { - Toast({ - message: '纭畾濉啓鐗╂祦鍗曞彿', - }); - }; - }, - - onProofTap(e) { - if (this.data.gallery.show) { - this.setData({ - 'gallery.show': false, - }); - return; - } - const { index } = e.currentTarget.dataset; - this.setData({ - 'gallery.show': true, - 'gallery.current': index, - }); - }, - - onGoodsCardTap(e) { - const { index } = e.currentTarget.dataset; - const goods = this.data.serviceRaw.rightsItem[index]; - wx.navigateTo({ url: `/pages/goods/details/index?skuId=${goods.skuId}` }); - }, - - onServiceNoCopy() { - wx.setClipboardData({ - data: this.data.service.serviceNo, - }); - }, - - onAddressCopy() { - wx.setClipboardData({ - data: `${this.data.service.receiverName} ${this.data.service.receiverPhone}\n${this.data.service.receiverAddress}`, - }); - }, - - /** 鑾峰彇鐘舵�両CON */ - genStatusIcon(item) { - const { userRightsStatus, afterSaleRequireType } = item; - switch (userRightsStatus) { - // 閫�娆炬垚鍔� - case ServiceStatus.REFUNDED: { - return 'succeed'; - } - // 宸插彇娑堛�佸凡鍏抽棴 - case ServiceStatus.CLOSED: { - return 'indent_close'; - } - default: { - switch (afterSaleRequireType) { - case 'REFUND_MONEY': { - return 'goods_refund'; - } - case 'REFUND_GOODS_MONEY': - return 'goods_return'; - default: { - return 'goods_return'; - } - } - } - } - }, -}); diff --git a/pages/order/after-service-detail/index.json b/pages/order/after-service-detail/index.json deleted file mode 100644 index 28e72ee..0000000 --- a/pages/order/after-service-detail/index.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "navigationBarTitleText": "", - "usingComponents": { - "wr-loading-content": "/components/loading-content/index", - "wr-price": "/components/price/index", - "wr-service-goods-card": "../components/order-goods-card/index", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", - "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh", - "t-grid": "tdesign-miniprogram/grid/grid", - "t-grid-item": "tdesign-miniprogram/grid-item/grid-item", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-input": "tdesign-miniprogram/input/input", - "t-swiper": "tdesign-miniprogram/swiper/swiper", - "t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav", - "wr-after-service-button-bar": "../components/after-service-button-bar/index", - "t-image": "/components/webp-image/index" - } -} \ No newline at end of file diff --git a/pages/order/after-service-detail/index.wxml b/pages/order/after-service-detail/index.wxml deleted file mode 100644 index 9ad5f79..0000000 --- a/pages/order/after-service-detail/index.wxml +++ /dev/null @@ -1,197 +0,0 @@ -<wr-loading-content position="fixed" type="spinner" wx:if="{{pageLoading}}" /> -<view class="page-container"> - <t-pull-down-refresh id="t-pull-down-refresh" bind:refresh="onPullDownRefresh_" t-class-indicator="t-class-indicator"> - <!-- 椤甸潰鍐呭 --> - <view class="service-detail safe-bottom"> - <!-- 鐘舵�佸強鎻忚堪 --> - <view class="service-detail__header"> - <view class="title"> - <t-icon prefix="wr" name="{{service.statusIcon}}" size="30px" /> - {{service.statusName}} - </view> - <view class="desc"> {{service.statusDesc}} </view> - </view> - <!-- 閫�娆鹃噾棰� --> - <view class="service-section__pay pay-result" wx:if="{{service.isRefunded}}"> - <t-cell - t-class-title="title" - t-class-note="right" - t-class="t-class-wrapper-first-child" - title="{{service.isRefunded ? '閫�娆鹃噾棰�' : '棰勮閫�娆鹃噾棰�'}}" - bordered="{{false}}" - > - <wr-price slot="note" price="{{service.refundRequestAmount}}" fill /> - </t-cell> - <t-cell - wx:for="{{service.refundMethodList}}" - wx:key="name" - wx:for-index="index" - wx:for-item="item" - t-class-title="t-cell-title" - t-class-note="t-cell-title" - t-class="t-class-wrapper" - title="{{item.name}}" - bordered="{{service.refundMethodList.length - 1 === index ? true : false}}" - > - <wr-price slot="note" price="{{item.amount}}" fill /> - </t-cell> - <block wx:if="{{service.isRefunded}}"> - <t-cell - title="" - t-class="t-class-wrapper-first-child" - t-class-description="label" - description="璇存槑锛氬井淇¢��娆惧悗锛屽彲浠ュ湪寰俊鏀粯璐﹀崟鏌ヨ锛屽疄闄呴��娆惧埌鏃堕棿鍙兘鍙楀埌閾惰澶勭悊鏃堕棿鐨勫奖鍝嶆湁涓�瀹氬欢鏃讹紝鍙互绋嶅悗鏌ョ湅" - /> - </block> - </view> - <!-- 鐗╂祦 --> - <view class="service-section logistics" wx:if="{{service.logisticsNo}}"> - <view class="service-section__title"> - <t-cell - align="top" - title="{{service.logisticsCompanyName + ' ' + service.logisticsNo}}" - bordered="{{false}}" - description="涔板宸插瘎鍑�" - arrow - > - <t-icon prefix="wr" color="#333333" name="deliver" size="40rpx" slot="left-icon" /> - </t-cell> - <view style="padding: 0 32rpx"> - <wr-after-service-button-bar service="{{service}}" /> - </view> - </view> - </view> - <!-- 鏀惰揣鍦板潃 --> - <view class="service-section goods-refund-address" wx:if="{{service.receiverName}}"> - <t-cell-group> - <t-cell align="top" title="閫�璐у湴鍧�" bordered="{{false}}"> - <t-icon prefix="wr" color="#333333" name="location" size="40rpx" slot="left-icon" /> - <view - slot="note" - class="right text-btn goods-refund-address-copy-btn" - hover-class="text-btn--active" - bindtap="onAddressCopy" - >澶嶅埗 - </view> - <view slot="description"> - <view> {{service.receiverAddress}} </view> - <view>鏀惰揣浜猴細{{service.receiverName}}</view> - <view>鏀惰揣浜烘墜鏈猴細{{service.receiverName}}</view> - </view> - </t-cell> - </t-cell-group> - </view> - <!-- 鍟嗗搧鍗$墖 --> - <view - class="service-section service-goods-card-wrap" - wx:if="{{service.goodsList && service.goodsList.length > 0}}" - > - <wr-service-goods-card - wx:for="{{service.goodsList}}" - wx:key="id" - wx:for-item="goods" - goods="{{goods}}" - no-top-line - bindtap="onGoodsCardTap" - data-index="{{index}}" - > - <view slot="footer" class="order-goods-card-footer"> - <wr-price - price="{{goods.itemRefundAmount}}" - fill - wr-class="order-goods-card-footer-price-class" - symbol-class="order-goods-card-footer-price-symbol" - decimal-class="order-goods-card-footer-price-decimal" - /> - <view class="order-goods-card-footer-num">x {{goods.rightsQuantity}}</view> - </view> - </wr-service-goods-card> - </view> - <!-- 閫�娆句俊鎭� --> - <view class="service-section__pay"> - <t-cell bordered="{{false}}" title="閫�娆句俊鎭�" t-class="t-refund-wrapper" t-class-title="t-refund-title" /> - <t-cell - bordered="{{false}}" - t-class="t-refund-wrapper" - t-class-title="t-refund-info" - t-class-note="t-refund-note" - title="璁㈠崟缂栧彿" - note="{{service.orderNo}}" - /> - <t-cell - bordered="{{false}}" - t-class="t-refund-wrapper" - t-class-title="t-refund-info" - t-class-note="t-refund-note" - title="鏈嶅姟鍗曞彿" - note="{{service.rightsNo}}" - > - <view slot="right-icon" class="text-btn" hover-class="text-btn--active" bindtap="onServiceNoCopy">澶嶅埗 </view> - </t-cell> - <t-cell - bordered="{{false}}" - t-class="t-refund-wrapper" - t-class-title="t-refund-info" - t-class-note="t-refund-note" - title="閫�娆惧師鍥�" - note="{{service.rightsReasonDesc}}" - /> - <t-cell - bordered="{{false}}" - t-class="t-refund-wrapper" - t-class-title="t-refund-info" - t-class-note="t-refund-note" - title="閫�娆鹃噾棰�" - > - <wr-price slot="note" price="{{service.refundRequestAmount}}" fill /> - </t-cell> - <t-cell - bordered="{{false}}" - t-class="t-refund-wrapper" - t-class-title="t-refund-info" - t-class-note="t-refund-note" - title="鐢宠鏃堕棿" - note="{{service.createTime}}" - /> - </view> - <!-- 鍑瘉/璇存槑 --> - <view class="service-section__pay" wx:if="{{showProofs}}"> - <t-cell - bordered="{{false}}" - title="鍑瘉/璇存槑" - t-class="t-refund-wrapper" - t-class-title="t-refund-info" - description="{{service.applyRemark}}" - /> - <t-grid border="{{false}}" column="{{3}}"> - <t-grid-item - t-class-image="t-refund-grid-image" - wx:for="{{gallery.proofs}}" - wx:key="index" - image="{{item}}" - bindclick="onProofTap" - data-index="{{index}}" - /> - </t-grid> - </view> - <t-swiper - wx:if="{{gallery.show}}" - current="{{gallery.current}}" - img-srcs="{{gallery.proofs}}" - full-screen - circular="{{false}}" - bindtap="onProofTap" - /> - </view> - </t-pull-down-refresh> -</view> -<t-toast id="t-toast" /> -<!-- 閫�娆捐鏄庡~鍐� --> -<t-dialog id="input-dialog" visible="{{inputDialogVisible}}"> - <view class="input-dialog__content" slot="content"> - <view style="color: #333333; padding-left: 32rpx">鐗╂祦鍗曞彿</view> - <t-input class="input" placeholder="璇疯緭鍏ョ墿娴佸崟鍙�" /> - <view class="tips">{{amountTip}}</view> - </view> -</t-dialog> -<t-dialog id="t-dialog" /> diff --git a/pages/order/after-service-detail/index.wxss b/pages/order/after-service-detail/index.wxss deleted file mode 100644 index 8431507..0000000 --- a/pages/order/after-service-detail/index.wxss +++ /dev/null @@ -1,435 +0,0 @@ -:host { - background-color: #f5f5f5; -} - -.service-detail { - position: relative; -} - -.service-detail wr-service-goods-card .wr-goods-card__body { - margin-left: 50rpx; -} - -.order-goods-card-footer { - display: flex; - width: calc(100% - 190rpx); - justify-content: space-between; - position: absolute; - bottom: 20rpx; - left: 190rpx; -} - -.order-goods-card-footer-num { - color: #999; - line-height: 40rpx; -} - -.service-detail .order-goods-card-footer .order-goods-card-footer-price-class { - font-size: 36rpx; - color: #333; - font-family: DIN Alternate; -} - -.service-detail .order-goods-card-footer .order-goods-card-footer-price-decimal { - font-size: 28rpx; - color: #333; - font-family: DIN Alternate; -} - -.service-detail .order-goods-card-footer .order-goods-card-footer-price-symbol { - color: #333; - font-size: 24rpx; - font-family: DIN Alternate; -} - -.service-detail .service-detail__header { - padding: 60rpx 0 48rpx 40rpx; - box-sizing: border-box; - height: 220rpx; - background-color: #fff; -} -.service-detail .service-detail__header .title, -.service-detail .service-detail__header .desc { - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; -} - -.service-detail .service-detail__header .title { - -webkit-line-clamp: 1; - font-size: 48rpx; - font-weight: bold; - color: #333; - display: flex; -} - -.service-detail .service-detail__header .desc { - -webkit-line-clamp: 2; - margin-top: 10rpx; - font-size: 28rpx; - color: #999; -} - -.service-detail .service-detail__header .desc .count-down { - color: #fff185; - display: inline; -} - -.service-detail .service-section { - margin: 20rpx 0 20rpx 0; - /* padding: 30rpx 32rpx; */ - width: auto; - border-radius: 8rpx; - background-color: white; - overflow: hidden; -} -.service-section__pay { - margin: 0 0 20rpx 0; - width: auto; - border-radius: 8rpx; - background-color: white; - overflow: hidden; -} -.service-detail .service-section__title { - color: #333333; - margin-bottom: 10rpx; - padding-bottom: 18rpx; - height: 224rpx; - position: relative; -} -.service-detail .service-section__title .icon { - margin-right: 16rpx; - font-size: 40rpx !important; -} -.service-detail .service-section__title .right { - flex: none; - font-weight: normal; - font-size: 26rpx; -} -.service-detail .section-content { - margin: 16rpx 0 0 52rpx; -} - -.service-detail .main { - font-size: 28rpx; - color: #222427; - font-weight: bold; -} - -.service-detail .main .phone-num { - margin-left: 16rpx; - display: inline; -} -.service-detail .label { - color: #999999; - font-size: 26rpx; -} - -.service-detail .custom-remark { - font-size: 26rpx; - line-height: 36rpx; - color: #333333; - word-wrap: break-word; -} -.service-detail .proofs { - margin-top: 20rpx; -} - -.service-detail .proofs .proof { - width: 100%; - height: 100%; - background-color: #f9f9f9; -} - -.service-detail .pay-result .t-cell-title, -.service-detail .pay-result .t-cell-value { - color: #666666; - font-size: 28rpx; -} - -.t-class-wrapper { - padding: 10rpx 24rpx !important; -} - -.t-class-wrapper-first-child { - padding: 24rpx !important; -} - -.service-detail .pay-result .wr-cell__value { - font-weight: bold; -} -.service-detail .right { - font-size: 36rpx; - color: #fa550f; - font-weight: bold; -} - -.service-detail .title { - font-weight: bold; -} - -.service-detail .pay-result .service-section__title .right.integer { - font-size: 48rpx; -} -.service-detail .pay-result .split-line { - position: relative; -} - -.service-detail .pay-result .split-line::after { - position: absolute; - display: block; - content: ' '; - height: 1px; - left: -50%; - right: -50%; - transform: scale(0.5); - background-color: #e6e6e6; -} - -.service-detail .pay-result .section-content { - margin-left: 0; -} - -.service-detail .pay-result .section-content .label { - color: #999999; - font-size: 24rpx; -} - -.service-detail .pay-result .wr-cell::after { - left: 0; -} - -.service-detail .footer-bar-wrapper { - height: 100rpx; -} - -.service-detail .footer-bar-wrapper .footer-bar { - position: fixed; - left: 0; - bottom: 0; - height: 100rpx; - width: 100vw; - box-sizing: border-box; - padding: 0 20rpx; - background-color: white; - display: flex; - justify-content: space-between; - align-items: center; -} - -.service-detail .text-btn { - display: inline; - box-sizing: border-box; - color: #333; - border: 2rpx solid #ddd; - border-radius: 32rpx; - margin-left: 10rpx; - padding: 0 16rpx; - font-weight: normal; - font-size: 24rpx; - line-height: 32rpx; -} -.service-detail .text-btn--active { - opacity: 0.5; -} - -.service-detail .specs-popup .bottom-btn { - color: #fa550f; -} -.service-detail .specs-popup .bottom-btn::after { - color: #fa550f; -} - -.dialog .dialog__button-confirm { - color: #fa550f; -} - -.page-container .order-goods-card > wr-goods-card .wr-goods-card__bottom .price { - top: 100rpx; - left: 10rpx; - position: absolute; - color: #333; -} - -.page-container .order-goods-card > wr-goods-card .wr-goods-card__num { - top: 100rpx; - right: 0; - position: absolute; -} - -.page-container .order-goods-card > wr-goods-card .wr-goods-card__bottom .price::before { - display: inline; - content: '閫�娆鹃噾棰�:'; - margin-right: 1em; - font-size: 24rpx; - color: #333333; - font-weight: normal; -} - -.page-container .wr-goods-card__specs { - margin: 14rpx 20rpx 0 0; -} - -.page-container .order-goods-card > wr-goods-card .wr-goods-card__title { - margin-right: 0; - -webkit-line-clamp: 1; - display: -webkit-box; - -webkit-box-orient: vertical; - overflow: hidden; - width: 80%; -} - -.page-container .order-card .header .store-name { - -webkit-line-clamp: 1; - display: -webkit-box; - -webkit-box-orient: vertical; - overflow: hidden; - width: 80%; -} - -.page-container .status-desc { - box-sizing: border-box; - padding: 22rpx 20rpx; - font-size: 26rpx; - line-height: 1.3; - text-align: left; - color: #333333; - background-color: #f5f5f5; - border-radius: 8rpx; - word-wrap: break-word; - margin-top: 40rpx; - margin-bottom: 20rpx; -} - -.page-container .header__right { - font-size: 24rpx; - color: #333333; - display: flex; - align-items: center; -} - -.page-container .header__right__icon { - color: #d05b27; - font-size: 16px !important; - margin-right: 10rpx; -} - -.page-container .wr-goods-card__thumb { - width: 140rpx; -} -.page-container .page-background { - position: absolute; - z-index: -1; - top: 0; - left: 0; - width: 100vw; - color: #fff; - overflow: hidden; -} -.page-container .page-background-img { - width: 100%; - height: 320rpx !important; -} -.page-container .navbar-bg .nav-back, -.page-container .navbar-bg .page-background { - background: linear-gradient(to right, rgba(250, 85, 15, 1) 0%, rgba(250, 85, 15, 0.6) 100%) !important; -} - -.page-container .navigation-bar__btn { - font-size: 40rpx !important; - font-weight: bold !important; - color: #333; -} - -.t-class-title { - color: #000; -} - -.refresh-bar { - background: linear-gradient(90deg, #ff6b44 0%, #ed3427 100%) !important; -} - -.page-container .navigation-bar__inner .navigation-bar__left { - padding-left: 16rpx; -} - -.t-refund-info { - font-size: 26rpx; - color: #666; -} - -.t-refund-grid-image { - width: 212rpx !important; - height: 212rpx !important; -} - -.t-refund-info-img { - width: 100%; - height: 100%; -} - -.t-refund-wrapper { - padding-top: 18rpx !important; - padding-bottom: 18rpx !important; -} - -.t-refund-title { - font-size: 28rpx; - color: #333; - font-weight: bold; -} - -.t-refund-note { - font-size: 26rpx; - color: #333 !important; -} - -.service-detail .logistics { - padding-top: 0; - padding-bottom: 0; - padding-right: 0; -} - -.service-section__title__header { - display: flex; - align-items: center; - color: #333; - font-weight: normal; - font-size: 32rpx; -} - -.safe-bottom { - padding-bottom: env(safe-area-inset-bottom); -} - -.service-section-logistics { - display: flex; - justify-content: center; - color: #fa4126; - align-items: center; - margin-top: 24rpx; -} - -.t-class-indicator { - color: #b9b9b9 !important; -} - -.service-detail .goods-refund-address { - padding-top: 0; - padding-bottom: 0; -} - -.service-detail .goods-refund-address .goods-refund-address-copy-btn { - position: absolute; - top: 22rpx; - right: 32rpx; -} - -.service-detail .service-goods-card-wrap { - padding: 0 32rpx; -} - -.t-button { - --td-button-default-color: #000; - --td-button-primary-text-color: #fa4126; -} diff --git a/pages/order/after-service-list/api.js b/pages/order/after-service-list/api.js deleted file mode 100644 index 68bbf56..0000000 --- a/pages/order/after-service-list/api.js +++ /dev/null @@ -1,1278 +0,0 @@ -/* eslint-disable */ -import { mockIp, mockReqId } from '../../../utils/mock'; - -export const resp = { - data: { - pageNum: 1, - pageSize: 10, - totalCount: 51, - states: { - audit: 1, - approved: 6, - complete: 2, - closed: 1, - }, - dataList: [ - { - buttonVOs: [ - { - name: '淇敼杩愬崟鍙�', - primary: false, - type: 4, - }, - { - name: '鏌ョ湅鐗╂祦', - primary: false, - type: 5, - }, - ], - saasId: '8888', - storeId: '2591', - uid: '88881046205', - refundMethodList: [ - { - refundMethodAmount: 99999, - refundMethodName: '寰俊鏀粯', - }, - { - refundMethodAmount: 100000, - refundMethodName: '閾惰鍗℃敮浠�', - }, - ], - createTime: '1596524705613', - rights: { - bizRightsStatus: 1, - bizRightsStatusName: '閫�娆鹃��璐�', - createTime: '1596524705613', - orderNo: '12313123123', - refundAmount: 99999, - refundRequestAmount: 999999, - rightsMethod: 1, - rightsNo: '123123423', - rightsParentNo: '78970', - rightsReasonDesc: '澶吹浜嗭紝涓嶆兂瑕佷簡', - rightsReasonType: 10, - rightsStatus: 50, - rightsStatusName: '宸插畬鎴�', - rightsType: 20, - saasId: 123, - shippingFee: 99, - shippingFeeBear: 1, - storeId: 123, - storeName: '澶х尗闆嗗洟鏃楄埌搴�', - uid: '123', - updateTime: '1596524705613', - userRightsStatus: 120, - userRightsStatusDesc: - '鍟嗗宸查��娆撅紝閫�鍥炶祫閲戝皢鍘熻矾涓変釜宸ヤ綔鏃ヨ繑鍥炴偍鐨勮处鎴�', - userRightsStatusName: '宸查��娆�', - afterSaleRequireType: 'REFUND_MONEY', - rightsImageUrls: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - ], - }, - rightsItem: [ - { - actualPrice: 888, - createTime: '1596524705613', - disconutInfo: '鐜板湪涓嬪崟锛岀珛鍒讳紭鎯�100鍏�', - goodsName: '灏忕背鎵嬫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - goodsViceType: 1, - itemDiscountAmount: 123123, - itemRefundAmount: 888, - itemStatus: 2, - itemTotalAmount: 9913, - orderNo: '12312333', - parentOrderNo: '1231234', - rightsId: 423423, - rightsNo: '112333', - rightsParentNo: '345345', - rightsQuantity: 12, - saasId: 123, - skuId: 812312, - specInfo: [ - { - specTitle: '娴嬭瘯dr瓒呴暱', - specValues: '瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1', - }, - { - specTitle: 'bwtgg01', - specValues: 'eee', - }, - ], - updateTime: '1596524705613', - }, - { - actualPrice: 9999, - createTime: '1596524705613', - disconutInfo: '鐜板湪涓嬪崟锛岀珛鍒讳紭鎯�100鍏�', - goodsName: '鍗庝负鎵嬫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - goodsViceType: 1, - itemDiscountAmount: 123123, - itemRefundAmount: 9999, - itemStatus: 2, - itemTotalAmount: 9913, - orderNo: '12312333', - parentOrderNo: '1231234', - rightsId: 423423, - rightsNo: '112333', - rightsParentNo: '345345', - rightsQuantity: 12, - saasId: 123, - skuId: 8123129, - specInfo: [ - { - specTitle: '娴嬭瘯dr瓒呴暱', - specValues: '瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1', - }, - { - specTitle: 'bwtgg01', - specValues: 'eee', - }, - ], - updateTime: '1596524705613', - }, - ], - rightsRefund: { - callbackTime: '1596524705613', - channel: '寰俊鏀粯', - channelTrxNo: '123123', - createTime: '1596524705613', - refundDesc: '鐢变簬鎮ㄤ俊瑾夎壇濂斤紝鍟嗗鍚屾剰閫�娆�', - memo: '鏃犳憳瑕�', - refundAmount: 9999, - refundStatus: 1, - requestTime: '1596524705613', - successTime: '1596524705613', - traceNo: '123123', - updateTime: '1596524705613', - }, - logisticsVO: { - logisticsType: 1, - logisticsNo: 'SF2380380982034', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '椤轰赴', - receiverAddressId: '20', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '娓呴璺尽榫欐咕', - receiverPostCode: '', - receiverLongitude: '113.880562', - receiverLatitude: '22.56271', - receiverIdentity: '88881046205', - receiverPhone: '18371736717', - receiverName: '鍛ㄦ澃浼�', - expectArrivalTime: null, - senderName: '鍒樺痉鍗�', - senderPhone: '1273109238123', - senderAddress: '鍖椾含甯傛槍骞冲尯澶т赴瀹跺洯涓夊彿妤煎洓鍗曞厓108鍙�', - sendTime: null, - arrivalTime: null, - nodes: [ - { - title: '宸茬鏀�', - icon: 'https://cdn-we-retail.ym.tencent.com/tsr/icon/order.png', - code: '200003', - desc: '鍟嗗宸茬鏀讹紝鎰熻阿浣跨敤椤轰赴锛屾湡寰呭啀娆′负鎮ㄦ湇鍔�', - date: '2020-09-11 11:34:53', - }, - { - title: '杩愯緭涓�', - icon: 'https://cdn-we-retail.ym.tencent.com/tsr/icon/deliver.png', - desc: '蹇欢宸插埌杈炬垚閮戒腑杞珯', - code: '200002', - date: '2020-07-16 11:16:31', - }, - { - title: '宸插瘎鍑�', - icon: 'https://cdn-we-retail.ym.tencent.com/tsr/icon/deliver.png', - desc: '涔板宸插瘎鍑猴紝鐗╂祦鎵胯繍鍟嗭細椤轰赴閫熻繍', - date: '2020-07-16 11:16:21', - }, - ], - }, - }, - { - buttonVOs: [ - { - name: '濉啓杩愬崟鍙�', - primary: false, - type: 3, - }, - ], - saasId: '8888', - storeId: '2591', - uid: '88881046205', - createTime: '1596524705613', - rights: { - rightsImageUrls: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - ], - bizRightsStatus: 1, - bizRightsStatusName: '閫�娆鹃��璐�', - createTime: '1596524705613', - orderNo: '12313123123', - refundAmount: 99999, - refundRequestAmount: 999999, - rightsMethod: 1, - rightsNo: '1231234231', - rightsParentNo: '78970', - rightsReasonDesc: '澶吹浜嗭紝涓嶆兂瑕佷簡', - rightsReasonType: 10, - rightsStatus: 20, - rightsStatusName: '宸插鏍�', - rightsType: 10, - saasId: 123, - shippingFee: 99, - shippingFeeBear: 1, - storeId: 123, - storeName: '澶х尗闆嗗洟鏃楄埌搴�', - uid: '123', - updateTime: '1596524705613', - userRightsStatus: 100, - userRightsStatusDesc: '鍟嗗宸插鏍哥‘璁わ紝棰勮1灏忔椂鍐呭彂璧烽��娆�', - userRightsStatusName: '鍟嗗宸插鏍�', - }, - rightsItem: [ - { - actualPrice: 888, - createTime: '1596524705613', - disconutInfo: '鐜板湪涓嬪崟锛岀珛鍒讳紭鎯�100鍏�', - goodsName: '灏忕背鎵嬫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - goodsViceType: 1, - itemDiscountAmount: 123123, - itemRefundAmount: 888, - itemStatus: 2, - itemTotalAmount: 9913, - orderNo: '12312333', - parentOrderNo: '1231234', - rightsId: 423423, - rightsNo: '112333', - rightsParentNo: '345345', - rightsQuantity: 12, - saasId: 123, - skuId: 812312, - specInfo: [ - { - specTitle: '娴嬭瘯dr瓒呴暱', - specValues: '瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1', - }, - { - specTitle: 'bwtgg01', - specValues: 'eee', - }, - ], - updateTime: '1596524705613', - }, - ], - rightsRefund: { - callbackTime: '1596524705613', - channel: '寰俊鏀粯', - channelTrxNo: '123123', - createTime: '1596524705613', - refundDesc: '鐢变簬鎮ㄤ俊瑾夎壇濂斤紝鍟嗗鍚屾剰閫�娆�', - memo: '鏃犳憳瑕�', - refundAmount: 9999, - refundStatus: 1, - requestTime: '1596524705613', - successTime: '1596524705613', - traceNo: '123123', - updateTime: '1596524705613', - }, - logisticsVO: { - logisticsType: 1, - logisticsNo: 'SA9208097023203', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '鐢抽�氬揩閫�', - receiverAddressId: '20', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '娓呴璺尽榫欐咕', - receiverPostCode: '', - receiverLongitude: '113.880562', - receiverLatitude: '22.56271', - receiverIdentity: '88881046205', - receiverPhone: '18371736717', - receiverName: '鍛ㄦ澃浼�', - expectArrivalTime: null, - senderName: '鍒樺痉鍗�', - senderPhone: '1273109238123', - senderAddress: '鍖椾含甯傛槍骞冲尯澶т赴瀹跺洯涓夊彿妤煎洓鍗曞厓108鍙�', - sendTime: null, - arrivalTime: null, - }, - }, - { - buttonVOs: [ - { - name: '鎾ら攢鐢宠', - primary: false, - type: 2, - }, - ], - saasId: '8888', - storeId: '2591', - uid: '88881046205', - createTime: '1596524705613', - rights: { - rightsImageUrls: [ - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - ], - bizRightsStatus: 1, - bizRightsStatusName: '閫�娆鹃��璐�', - createTime: '1596524705613', - orderNo: '12313123123', - refundAmount: 99999, - refundRequestAmount: 999999, - rightsMethod: 1, - rightsNo: '1231234232', - rightsParentNo: '78970', - rightsReasonDesc: '澶吹浜嗭紝涓嶆兂瑕佷簡', - rightsReasonType: 10, - rightsStatus: 60, - rightsStatusName: '宸插叧闂�', - rightsType: 10, - saasId: 123, - shippingFee: 99, - shippingFeeBear: 1, - storeId: 123, - storeName: '澶х尗闆嗗洟鏃楄埌搴�', - uid: '123', - updateTime: '1596524705613', - userRightsStatus: 100, - userRightsStatusDesc: '鍟嗗灏嗗敖蹇‘璁ゆ偍鐨勯��娆剧敵璇�', - userRightsStatusName: '绛夊緟鍟嗗瀹℃牳', - }, - rightsItem: [ - { - actualPrice: 888, - createTime: '1596524705613', - disconutInfo: '鐜板湪涓嬪崟锛岀珛鍒讳紭鎯�100鍏�', - goodsName: '灏忕背鎵嬫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - goodsViceType: 1, - itemDiscountAmount: 123123, - itemRefundAmount: 888, - itemStatus: 2, - itemTotalAmount: 9913, - orderNo: '12312333', - parentOrderNo: '1231234', - rightsId: 423423, - rightsNo: '112333', - rightsParentNo: '345345', - rightsQuantity: 12, - saasId: 123, - skuId: 812312, - specInfo: [ - { - specTitle: '娴嬭瘯dr瓒呴暱', - specValues: '瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1', - }, - { - specTitle: 'bwtgg01', - specValues: 'eee', - }, - ], - updateTime: '1596524705613', - }, - ], - rightsRefund: { - callbackTime: '1596524705613', - channel: '寰俊鏀粯', - channelTrxNo: '123123', - createTime: '1596524705613', - memo: '鏃犳憳瑕�', - refundAmount: 9999, - refundStatus: 1, - requestTime: '1596524705613', - successTime: '1596524705613', - traceNo: '123123', - updateTime: '1596524705613', - refundDesc: '瀹為檯鍟嗗搧涓庢弿杩颁笉绗�', - }, - logisticsVO: { - logisticsType: 1, - logisticsNo: 'SF9343043084', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '椤轰赴', - receiverAddressId: '20', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '娓呴璺尽榫欐咕', - receiverPostCode: '', - receiverLongitude: '113.880562', - receiverLatitude: '22.56271', - receiverIdentity: '88881046205', - receiverPhone: '18371736717', - receiverName: '鍛ㄦ澃浼�', - expectArrivalTime: null, - senderName: '鍒樺痉鍗�', - senderPhone: '1273109238123', - senderAddress: '鍖椾含甯傛槍骞冲尯澶т赴瀹跺洯涓夊彿妤煎洓鍗曞厓108鍙�', - sendTime: null, - arrivalTime: null, - }, - }, - { - buttonVOs: [], - saasId: '8888', - storeId: '2591', - uid: '88881046205', - createTime: '1596524705613', - refundMethodList: [ - { - refundMethodAmount: 99999, - refundMethodName: '寰俊鏀粯', - }, - { - refundMethodAmount: 100000, - refundMethodName: '閾惰鍗℃敮浠�', - }, - ], - rights: { - bizRightsStatus: 1, - bizRightsStatusName: '閫�娆鹃��璐�', - createTime: '1596524705613', - orderNo: '12313123123', - refundAmount: 99999, - refundRequestAmount: 999999, - rightsMethod: 1, - rightsNo: '1231234233', - rightsParentNo: '78970', - rightsReasonDesc: '澶吹浜嗭紝涓嶆兂瑕佷簡', - rightsReasonType: 10, - rightsStatus: 50, - rightsStatusName: '宸插畬鎴�', - rightsType: 10, - saasId: 123, - shippingFee: 99, - shippingFeeBear: 1, - storeId: 123, - storeName: - '澶х尗闆嗗洟鏃楄埌搴�-澶х尗闆嗗洟鏃楄埌搴�-澶х尗闆嗗洟鏃楄埌搴�-澶х尗闆嗗洟鏃楄埌搴�-澶х尗闆嗗洟鏃楄埌搴�-澶х尗闆嗗洟鏃楄埌搴�', - uid: '123', - updateTime: '1596524705613', - userRightsStatus: 160, - userRightsStatusDesc: '閫�娆�/鍞悗宸插畬鎴�', - userRightsStatusName: '宸插畬鎴�', - }, - rightsItem: [ - { - actualPrice: 888, - createTime: '1596524705613', - disconutInfo: '鐜板湪涓嬪崟锛岀珛鍒讳紭鎯�100鍏�', - goodsName: '灏忕背鎵嬫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - goodsViceType: 1, - itemDiscountAmount: 123123, - itemRefundAmount: 888, - itemStatus: 2, - itemTotalAmount: 9913, - orderNo: '12312333', - parentOrderNo: '1231234', - rightsId: 423423, - rightsNo: '112333', - rightsParentNo: '345345', - rightsQuantity: 12, - saasId: 123, - skuId: 812312, - specInfo: [ - { - specTitle: '娴嬭瘯dr瓒呴暱', - specValues: '瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1', - }, - { - specTitle: 'bwtgg01', - specValues: 'eee', - }, - ], - updateTime: '1596524705613', - }, - ], - rightsRefund: { - callbackTime: '1596524705613', - channel: '寰俊鏀粯', - channelTrxNo: '123123', - createTime: '1596524705613', - memo: '鏃犳憳瑕�', - refundAmount: 9999, - refundStatus: 1, - requestTime: '1596524705613', - successTime: '1596524705613', - traceNo: '123123', - updateTime: '1596524705613', - }, - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '20', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '娓呴璺尽榫欐咕', - receiverPostCode: '', - receiverLongitude: '113.880562', - receiverLatitude: '22.56271', - receiverIdentity: '88881046205', - receiverPhone: '18371736717', - receiverName: '鍛ㄦ澃浼�', - expectArrivalTime: null, - senderName: '鍒樺痉鍗�', - senderPhone: '1273109238123', - senderAddress: '鍖椾含甯傛槍骞冲尯澶т赴瀹跺洯涓夊彿妤煎洓鍗曞厓108鍙�', - sendTime: null, - arrivalTime: null, - }, - }, - { - buttonVOs: [ - { - name: '淇敼杩愬崟鍙�', - primary: false, - type: 4, - }, - ], - saasId: '8888', - storeId: '2591', - uid: '88881046205', - createTime: '1596524705613', - rights: { - bizRightsStatus: 1, - bizRightsStatusName: '閫�娆鹃��璐�', - createTime: '1596524705613', - orderNo: '12313123123', - refundAmount: 99999, - refundRequestAmount: 999999, - rightsMethod: 1, - rightsNo: '1231234234', - rightsParentNo: '78970', - rightsReasonDesc: '澶吹浜嗭紝涓嶆兂瑕佷簡', - rightsReasonType: 10, - rightsStatus: 20, - rightsStatusName: '宸插鏍�', - rightsType: 10, - saasId: 123, - shippingFee: 99, - shippingFeeBear: 1, - storeId: 123, - storeName: '澶х尗闆嗗洟鏃楄埌搴�', - uid: '123', - updateTime: '1596524705613', - userRightsStatus: 1, - userRightsStatusDesc: '鍟嗗宸插鏍哥‘璁わ紝棰勮1灏忔椂鍐呭彂璧烽��娆�', - userRightsStatusName: '鍟嗗宸插鏍�', - }, - rightsItem: [ - { - actualPrice: 888, - createTime: '1596524705613', - disconutInfo: '鐜板湪涓嬪崟锛岀珛鍒讳紭鎯�100鍏�', - goodsName: '灏忕背鎵嬫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - goodsViceType: 1, - itemDiscountAmount: 123123, - itemRefundAmount: 888, - itemStatus: 2, - itemTotalAmount: 9913, - orderNo: '12312333', - parentOrderNo: '1231234', - rightsId: 423423, - rightsNo: '112333', - rightsParentNo: '345345', - rightsQuantity: 12, - saasId: 123, - skuId: 812312, - specInfo: [ - { - specTitle: '娴嬭瘯dr瓒呴暱', - specValues: '瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1', - }, - { - specTitle: 'bwtgg01', - specValues: 'eee', - }, - ], - updateTime: '1596524705613', - }, - ], - rightsRefund: { - callbackTime: '1596524705613', - channel: '寰俊鏀粯', - channelTrxNo: '123123', - createTime: '1596524705613', - memo: '鏃犳憳瑕�', - refundAmount: 9999, - refundStatus: 1, - requestTime: '1596524705613', - successTime: '1596524705613', - traceNo: '123123', - updateTime: '1596524705613', - }, - logisticsVO: { - logisticsType: 1, - logisticsNo: '80900909', - logisticsStatus: null, - logisticsCompanyCode: '0004', - logisticsCompanyName: '椤轰赴蹇��', - remark: '璐ㄩ噺闂锛岀敵璇烽��璐ч��娆�', - receiverAddressId: '20', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '娓呴璺尽榫欐咕', - receiverPostCode: '', - receiverLongitude: '113.880562', - receiverLatitude: '22.56271', - receiverIdentity: '88881046205', - receiverPhone: '18371736717', - receiverName: '鍛ㄦ澃浼�', - expectArrivalTime: null, - senderName: '鍒樺痉鍗�', - senderPhone: '1273109238123', - senderAddress: '鍖椾含甯傛槍骞冲尯澶т赴瀹跺洯涓夊彿妤煎洓鍗曞厓108鍙�', - sendTime: null, - arrivalTime: null, - }, - }, - { - buttonVOs: [ - { - name: '鎾ら攢鐢宠', - primary: false, - type: 2, - }, - ], - saasId: '8888', - storeId: '2591', - uid: '88881046205', - createTime: '1596524705613', - rights: { - bizRightsStatus: 1, - bizRightsStatusName: '閫�娆鹃��璐�', - createTime: '1596524705613', - orderNo: '12313123123', - refundAmount: 99999, - refundRequestAmount: 999999, - rightsMethod: 1, - rightsNo: '1231234235', - rightsParentNo: '78970', - rightsReasonDesc: '澶吹浜嗭紝涓嶆兂瑕佷簡', - rightsReasonType: 10, - rightsStatus: 10, - rightsStatusName: '寰呭鏍�', - rightsType: 10, - saasId: 123, - shippingFee: 99, - shippingFeeBear: 1, - storeId: 123, - storeName: - '澶х尗闆嗗洟鏃楄埌搴�-澶х尗闆嗗洟鏃楄埌搴�-澶х尗闆嗗洟鏃楄埌搴�-澶х尗闆嗗洟鏃楄埌搴�-澶х尗闆嗗洟鏃楄埌搴�-澶х尗闆嗗洟鏃楄埌搴�-澶х尗闆嗗洟鏃楄埌搴�', - uid: '123', - updateTime: '1596524705613', - userRightsStatus: 1, - userRightsStatusDesc: - '鍟嗗灏嗗湪24灏忔椂鍐呭鏍革紝濡�24灏忔椂鍚庡晢瀹朵粛鏈鏍革紝绯荤粺灏嗚嚜鍔ㄥ鏍搁�氳繃', - userRightsStatusName: '寰呭晢瀹跺鏍�', - }, - rightsItem: [ - { - actualPrice: 888, - createTime: '1596524705613', - disconutInfo: '鐜板湪涓嬪崟锛岀珛鍒讳紭鎯�100鍏�', - goodsName: - '灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - goodsViceType: 1, - itemDiscountAmount: 123123, - itemRefundAmount: 888, - itemStatus: 2, - itemTotalAmount: 9913, - orderNo: '12312333', - parentOrderNo: '1231234', - rightsId: 423423, - rightsNo: '112333', - rightsParentNo: '345345', - rightsQuantity: 12, - saasId: 123, - skuId: 812312, - specInfo: [ - { - specTitle: '娴嬭瘯dr瓒呴暱', - specValues: '瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1', - }, - { - specTitle: 'bwtgg01', - specValues: 'eee', - }, - ], - updateTime: '1596524705613', - }, - ], - rightsRefund: { - callbackTime: '1596524705613', - channel: '寰俊鏀粯', - channelTrxNo: '123123', - createTime: '1596524705613', - memo: '鏃犳憳瑕�', - refundAmount: 9999, - refundStatus: 1, - requestTime: '1596524705613', - successTime: '1596524705613', - traceNo: '123123', - updateTime: '1596524705613', - }, - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '20', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '娓呴璺尽榫欐咕', - receiverPostCode: '', - receiverLongitude: '113.880562', - receiverLatitude: '22.56271', - receiverIdentity: '88881046205', - receiverPhone: '18371736717', - receiverName: '鍛ㄦ澃浼�', - expectArrivalTime: null, - senderName: '鍒樺痉鍗�', - senderPhone: '1273109238123', - senderAddress: '鍖椾含甯傛槍骞冲尯澶т赴瀹跺洯涓夊彿妤煎洓鍗曞厓108鍙�', - sendTime: null, - arrivalTime: null, - }, - }, - { - buttonVOs: [ - { - name: '淇敼杩愬崟鍙�', - primary: false, - type: 4, - }, - ], - saasId: '8888', - storeId: '2591', - uid: '88881046205', - createTime: '1596524705613', - rights: { - bizRightsStatus: 1, - bizRightsStatusName: '閫�娆鹃��璐�', - createTime: '1596524705613', - orderNo: '12313123123', - refundAmount: 99999, - refundRequestAmount: 999999, - rightsMethod: 1, - rightsNo: '1231234236', - rightsParentNo: '78970', - rightsReasonDesc: '澶吹浜嗭紝涓嶆兂瑕佷簡', - rightsReasonType: 10, - rightsStatus: 20, - rightsStatusName: '宸插鏍�', - rightsType: 10, - saasId: 123, - shippingFee: 99, - shippingFeeBear: 1, - storeId: 123, - storeName: '澶х尗闆嗗洟鏃楄埌搴�', - uid: '123', - updateTime: '1596524705613', - userRightsStatus: 1, - userRightsStatusDesc: '鍟嗗宸插鏍哥‘璁わ紝棰勮1灏忔椂鍐呭彂璧烽��娆�', - userRightsStatusName: '鍟嗗宸插鏍�', - }, - rightsItem: [ - { - actualPrice: 888, - createTime: '1596524705613', - disconutInfo: '鐜板湪涓嬪崟锛岀珛鍒讳紭鎯�100鍏�', - goodsName: '灏忕背鎵嬫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - goodsViceType: 1, - itemDiscountAmount: 123123, - itemRefundAmount: 888, - itemStatus: 2, - itemTotalAmount: 9913, - orderNo: '12312333', - parentOrderNo: '1231234', - rightsId: 423423, - rightsNo: '112333', - rightsParentNo: '345345', - rightsQuantity: 12, - saasId: 123, - skuId: 812312, - specInfo: [ - { - specTitle: '娴嬭瘯dr瓒呴暱', - specValues: '瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1', - }, - { - specTitle: 'bwtgg01', - specValues: 'eee', - }, - ], - updateTime: '1596524705613', - }, - ], - rightsRefund: { - callbackTime: '1596524705613', - channel: '寰俊鏀粯', - channelTrxNo: '123123', - createTime: '1596524705613', - memo: '鏃犳憳瑕�', - refundAmount: 9999, - refundStatus: 1, - requestTime: '1596524705613', - successTime: '1596524705613', - traceNo: '123123', - updateTime: '1596524705613', - }, - logisticsVO: { - logisticsType: 1, - logisticsNo: '90900808', - logisticsStatus: null, - logisticsCompanyCode: '0002', - logisticsCompanyName: '鐢抽�氬揩閫�', - remark: '璐ㄩ噺闂锛岀敵璇烽��璐ч��娆�', - receiverAddressId: '20', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '娓呴璺尽榫欐咕', - receiverPostCode: '', - receiverLongitude: '113.880562', - receiverLatitude: '22.56271', - receiverIdentity: '88881046205', - receiverPhone: '18371736717', - receiverName: '鍛ㄦ澃浼�', - expectArrivalTime: null, - senderName: '鍒樺痉鍗�', - senderPhone: '1273109238123', - senderAddress: '鍖椾含甯傛槍骞冲尯澶т赴瀹跺洯涓夊彿妤煎洓鍗曞厓108鍙�', - sendTime: null, - arrivalTime: null, - }, - }, - { - buttonVOs: [ - { - name: '濉啓杩愬崟鍙�', - primary: false, - type: 3, - }, - ], - saasId: '8888', - storeId: '2591', - uid: '88881046205', - createTime: '1596524705613', - rights: { - bizRightsStatus: 1, - bizRightsStatusName: '閫�娆鹃��璐�', - createTime: '1596524705613', - orderNo: '12313123123', - refundAmount: 99999, - refundRequestAmount: 999999, - rightsMethod: 1, - rightsNo: '1231234237', - rightsParentNo: '78970', - rightsReasonDesc: '澶吹浜嗭紝涓嶆兂瑕佷簡', - rightsReasonType: 10, - rightsStatus: 20, - rightsStatusName: '宸插鏍�', - rightsType: 10, - saasId: 123, - shippingFee: 99, - shippingFeeBear: 1, - storeId: 123, - storeName: '澶х尗闆嗗洟鏃楄埌搴�', - uid: '123', - updateTime: '1596524705613', - userRightsStatus: 1, - userRightsStatusDesc: '鍟嗗宸插鏍哥‘璁わ紝棰勮1灏忔椂鍐呭彂璧烽��娆�', - userRightsStatusName: '鍟嗗宸插鏍�', - }, - rightsItem: [ - { - actualPrice: 888, - createTime: '1596524705613', - disconutInfo: '鐜板湪涓嬪崟锛岀珛鍒讳紭鎯�100鍏�', - goodsName: '灏忕背鎵嬫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - goodsViceType: 1, - itemDiscountAmount: 123123, - itemRefundAmount: 888, - itemStatus: 2, - itemTotalAmount: 9913, - orderNo: '12312333', - parentOrderNo: '1231234', - rightsId: 423423, - rightsNo: '112333', - rightsParentNo: '345345', - rightsQuantity: 12, - saasId: 123, - skuId: 812312, - specInfo: [ - { - specTitle: '娴嬭瘯dr瓒呴暱', - specValues: '瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1', - }, - { - specTitle: 'bwtgg01', - specValues: 'eee', - }, - ], - updateTime: '1596524705613', - }, - ], - rightsRefund: { - callbackTime: '1596524705613', - channel: '寰俊鏀粯', - channelTrxNo: '123123', - createTime: '1596524705613', - memo: '鏃犳憳瑕�', - refundAmount: 9999, - refundStatus: 1, - requestTime: '1596524705613', - successTime: '1596524705613', - traceNo: '123123', - updateTime: '1596524705613', - }, - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '20', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '娓呴璺尽榫欐咕', - receiverPostCode: '', - receiverLongitude: '113.880562', - receiverLatitude: '22.56271', - receiverIdentity: '88881046205', - receiverPhone: '18371736717', - receiverName: '鍛ㄦ澃浼�', - expectArrivalTime: null, - senderName: '鍒樺痉鍗�', - senderPhone: '1273109238123', - senderAddress: '鍖椾含甯傛槍骞冲尯澶т赴瀹跺洯涓夊彿妤煎洓鍗曞厓108鍙�', - sendTime: null, - arrivalTime: null, - }, - }, - { - buttonVOs: [ - { - name: '鎾ら攢鐢宠', - primary: false, - type: 2, - }, - ], - saasId: '8888', - storeId: '2591', - uid: '88881046205', - createTime: '1596524705613', - rights: { - bizRightsStatus: 1, - bizRightsStatusName: '閫�娆鹃��璐�', - createTime: '1596524705613', - orderNo: '123131231238', - refundAmount: 99999, - refundRequestAmount: 999999, - rightsMethod: 1, - rightsNo: '1231234238', - rightsParentNo: '78970', - rightsReasonDesc: '澶吹浜嗭紝涓嶆兂瑕佷簡', - rightsReasonType: 10, - rightsStatus: 20, - rightsStatusName: '宸插鏍�', - rightsType: 10, - saasId: 123, - shippingFee: 99, - shippingFeeBear: 1, - storeId: 123, - storeName: '澶х尗闆嗗洟鏃楄埌搴�', - uid: '123', - updateTime: '1596524705613', - userRightsStatus: 1, - userRightsStatusDesc: '鍟嗗宸插鏍哥‘璁わ紝棰勮1灏忔椂鍐呭彂璧烽��娆�', - userRightsStatusName: '鍟嗗宸插鏍�', - }, - rightsItem: [ - { - actualPrice: 888, - createTime: '1596524705613', - disconutInfo: '鐜板湪涓嬪崟锛岀珛鍒讳紭鎯�100鍏�', - goodsName: '灏忕背鎵嬫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - goodsViceType: 1, - itemDiscountAmount: 123123, - itemRefundAmount: 888, - itemStatus: 2, - itemTotalAmount: 9913, - orderNo: '12312333', - parentOrderNo: '1231234', - rightsId: 423423, - rightsNo: '112333', - rightsParentNo: '345345', - rightsQuantity: 12, - saasId: 123, - skuId: 812312, - specInfo: [ - { - specTitle: '娴嬭瘯dr瓒呴暱', - specValues: '瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1', - }, - { - specTitle: 'bwtgg01', - specValues: 'eee', - }, - ], - updateTime: '1596524705613', - }, - ], - rightsRefund: { - callbackTime: '1596524705613', - channel: '寰俊鏀粯', - channelTrxNo: '123123', - createTime: '1596524705613', - memo: '鏃犳憳瑕�', - refundAmount: 9999, - refundStatus: 1, - requestTime: '1596524705613', - successTime: '1596524705613', - traceNo: '123123', - updateTime: '1596524705613', - }, - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '20', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '娓呴璺尽榫欐咕', - receiverPostCode: '', - receiverLongitude: '113.880562', - receiverLatitude: '22.56271', - receiverIdentity: '88881046205', - receiverPhone: '18371736717', - receiverName: '鍛ㄦ澃浼�', - expectArrivalTime: null, - senderName: '鍒樺痉鍗�', - senderPhone: '1273109238123', - senderAddress: '鍖椾含甯傛槍骞冲尯澶т赴瀹跺洯涓夊彿妤煎洓鍗曞厓108鍙�', - sendTime: null, - arrivalTime: null, - }, - }, - { - buttonVOs: [ - { - name: '濉啓杩愬崟鍙�', - primary: false, - type: 3, - }, - ], - saasId: '8888', - storeId: '2591', - uid: '88881046205', - createTime: '1596524705613', - rights: { - bizRightsStatus: 1, - bizRightsStatusName: '閫�娆鹃��璐�', - createTime: '1596524705613', - orderNo: '12313123123', - refundAmount: 99999, - refundRequestAmount: 999999, - rightsMethod: 1, - rightsNo: '1231234239', - rightsParentNo: '78970', - rightsReasonDesc: '澶吹浜嗭紝涓嶆兂瑕佷簡', - rightsReasonType: 10, - rightsStatus: 20, - rightsStatusName: '宸插鏍�', - rightsType: 10, - saasId: 123, - shippingFee: 99, - shippingFeeBear: 1, - storeId: 123, - storeName: '澶х尗闆嗗洟鏃楄埌搴�', - uid: '123', - updateTime: '1596524705613', - userRightsStatus: 1, - userRightsStatusDesc: '鍟嗗宸插鏍哥‘璁わ紝棰勮1灏忔椂鍐呭彂璧烽��娆�', - userRightsStatusName: '鍟嗗宸插鏍�', - }, - rightsItem: [ - { - actualPrice: 888, - createTime: '1596524705613', - disconutInfo: '鐜板湪涓嬪崟锛岀珛鍒讳紭鎯�100鍏�', - goodsName: - '灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満-灏忕背鎵嬫満', - goodsPictureUrl: - 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png', - goodsViceType: 1, - itemDiscountAmount: 123123, - itemRefundAmount: 888, - itemStatus: 2, - itemTotalAmount: 9913, - orderNo: '12312333', - parentOrderNo: '1231234', - rightsId: 423423, - rightsNo: '112333', - rightsParentNo: '345345', - rightsQuantity: 12, - saasId: 123, - skuId: 812312, - specInfo: [ - { - specTitle: '娴嬭瘯dr瓒呴暱', - specValues: '瓒呴暱娴嬭瘯瓒呴暱娴嬭瘯1', - }, - { - specTitle: 'bwtgg01', - specValues: 'eee', - }, - ], - updateTime: '1596524705613', - }, - ], - rightsRefund: { - callbackTime: '1596524705613', - channel: '寰俊鏀粯', - channelTrxNo: '123123', - createTime: '1596524705613', - memo: '鏃犳憳瑕�', - refundAmount: 9999, - refundStatus: 1, - requestTime: '1596524705613', - successTime: '1596524705613', - traceNo: '123123', - updateTime: '1596524705613', - }, - logisticsVO: { - logisticsType: 1, - logisticsNo: '', - logisticsStatus: null, - logisticsCompanyCode: '', - logisticsCompanyName: '', - receiverAddressId: '20', - provinceCode: '440000', - cityCode: '440300', - countryCode: '440306', - receiverProvince: '骞夸笢鐪�', - receiverCity: '娣卞湷甯�', - receiverCountry: '鍗楀北鍖�', - receiverArea: '', - receiverAddress: '娓呴璺尽榫欐咕', - receiverPostCode: '', - receiverLongitude: '113.880562', - receiverLatitude: '22.56271', - receiverIdentity: '88881046205', - receiverPhone: '18371736717', - receiverName: '鍛ㄦ澃浼�', - expectArrivalTime: null, - senderName: '鍒樺痉鍗�', - senderPhone: '1273109238123', - senderAddress: '鍖椾含甯傛槍骞冲尯澶т赴瀹跺洯涓夊彿妤煎洓鍗曞厓108鍙�', - sendTime: null, - arrivalTime: null, - }, - }, - ], - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 79, - success: true, -}; - -export function getRightsList({ parameter: { afterServiceStatus, pageNum } }) { - const _resq = JSON.parse(JSON.stringify(resp)); - if (pageNum > 3) _resq.data.dataList = []; - if (afterServiceStatus > -1) { - _resq.data.dataList = _resq.data.dataList.filter( - (item) => item.rights.rightsStatus === afterServiceStatus, - ); - } - return Promise.resolve(_resq); -} diff --git a/pages/order/after-service-list/index.js b/pages/order/after-service-list/index.js deleted file mode 100644 index 7cd0cd5..0000000 --- a/pages/order/after-service-list/index.js +++ /dev/null @@ -1,220 +0,0 @@ -import { getRightsList } from './api'; -import { AfterServiceStatus, ServiceType, ServiceTypeDesc } from '../config'; - -Page({ - page: { - size: 10, - num: 1, - }, - - data: { - tabs: [ - { - key: -1, - text: '鍏ㄩ儴', - }, - { - key: AfterServiceStatus.TO_AUDIT, - text: '寰呭鏍�', - }, - { - key: AfterServiceStatus.THE_APPROVED, - text: '宸插鏍�', - }, - { - key: AfterServiceStatus.COMPLETE, - text: '宸插畬鎴�', - }, - { - key: AfterServiceStatus.CLOSED, - text: '宸插叧闂�', - }, - ], - curTab: -1, - dataList: [], - listLoading: 0, // 0-鏈姞杞斤紝1-鍔犺浇涓紝2-宸插叏閮ㄥ姞杞� - pullDownRefreshing: false, // 涓嬫媺鍒锋柊鏃朵笉鏄剧ずload-more - emptyImg: - 'https://cdn-we-retail.ym.tencent.com/miniapp/order/empty-order-list.png', - backRefresh: false, - }, - - onLoad(query) { - let status = parseInt(query.status); - status = this.data.tabs.map((t) => t.key).includes(status) ? status : -1; - this.init(status); - this.pullDownRefresh = this.selectComponent('#wr-pull-down-refresh'); - }, - - onShow() { - // 褰撲粠鍏朵粬椤甸潰杩斿洖锛屽苟涓� backRefresh 琚疆涓� true 鏃讹紝鍒锋柊鏁版嵁 - if (!this.data.backRefresh) return; - this.onRefresh(); - this.setData({ - backRefresh: false, - }); - }, - - onReachBottom() { - if (this.data.listLoading === 0) { - this.getAfterServiceList(this.data.curTab); - } - }, - - onPageScroll(e) { - this.pullDownRefresh && this.pullDownRefresh.onPageScroll(e); - }, - - onPullDownRefresh_(e) { - const { callback } = e.detail; - this.setData({ - pullDownRefreshing: true, - }); // 涓嬫媺鍒锋柊鏃朵笉鏄剧ずload-more - this.refreshList(this.data.curTab) - .then(() => { - this.setData({ - pullDownRefreshing: false, - }); - callback && callback(); - }) - .catch((err) => { - this.setData({ - pullDownRefreshing: false, - }); - Promise.reject(err); - }); - }, - - init(status) { - status = status !== undefined ? status : this.data.curTab; - this.refreshList(status); - }, - - getAfterServiceList(statusCode = -1, reset = false) { - const params = { - parameter: { - pageSize: this.page.size, - pageNum: this.page.num, - }, - }; - if (statusCode !== -1) params.parameter.afterServiceStatus = statusCode; - this.setData({ - listLoading: 1, - }); - return getRightsList(params) - .then((res) => { - this.page.num++; - let dataList = []; - let { tabs } = this.data; - if (res && res.data && res.data.states) { - tabs = this.data.tabs.map((item) => { - switch (item.key) { - case AfterServiceStatus.TO_AUDIT: - item.info = res.data.states.audit; - break; - case AfterServiceStatus.THE_APPROVED: - item.info = res.data.states.approved; - break; - case AfterServiceStatus.COMPLETE: - item.info = res.data.states.complete; - break; - case AfterServiceStatus.CLOSED: - item.info = res.data.states.closed; - break; - } - return item; - }); - } - if (res && res.data && res.data.dataList) { - dataList = (res.data.dataList || []).map((_data) => { - return { - id: _data.rights.rightsNo, - serviceNo: _data.rights.rightsNo, - storeName: _data.rights.storeName, - type: _data.rights.rightsType, - typeDesc: ServiceTypeDesc[_data.rights.rightsType], - typeDescIcon: - _data.rightsType === ServiceType.ONLY_REFUND - ? 'money-circle' - : 'return-goods-1', - status: _data.rights.rightsStatus, - statusName: _data.rights.userRightsStatusName, - statusDesc: _data.rights.userRightsStatusDesc, - amount: _data.rights.refundAmount, - goodsList: _data.rightsItem.map((item, i) => ({ - id: i, - thumb: item.goodsPictureUrl, - title: item.goodsName, - specs: (item.specInfo || []).map((s) => s.specValues || ''), - itemRefundAmount: item.itemRefundAmount, - rightsQuantity: item.itemRefundAmount, - })), - storeId: _data.storeId, - buttons: _data.buttonVOs || [], - logisticsNo: _data.logisticsVO.logisticsNo, // 閫�璐х墿娴佸崟鍙� - logisticsCompanyName: _data.logisticsVO.logisticsCompanyName, // 閫�璐х墿娴佸叕鍙� - logisticsCompanyCode: _data.logisticsVO.logisticsCompanyCode, // 閫�璐х墿娴佸叕鍙� - remark: _data.logisticsVO.remark, // 閫�璐у娉� - logisticsVO: _data.logisticsVO, - }; - }); - } - return new Promise((resolve) => { - if (reset) { - this.setData( - { - dataList: [], - }, - () => resolve(), - ); - } else resolve(); - }).then(() => { - this.setData({ - tabs, - dataList: this.data.dataList.concat(dataList), - listLoading: dataList.length > 0 ? 0 : 2, - }); - }); - }) - .catch((err) => { - this.setData({ - listLoading: 3, - }); - return Promise.reject(err); - }); - }, - - onReTryLoad() { - this.getAfterServiceList(this.data.curTab); - }, - - onTabChange(e) { - const { value } = e.detail; - const tab = this.data.tabs.find((v) => v.key === value); - if (!tab) return; - this.refreshList(value); - }, - - refreshList(status = -1) { - this.page = { - size: 10, - num: 1, - }; - this.setData({ - curTab: status, - dataList: [], - }); - return this.getAfterServiceList(status, true); - }, - - onRefresh() { - this.refreshList(this.data.curTab); - }, - - // 鐐瑰嚮璁㈠崟鍗$墖 - onAfterServiceCardTap(e) { - wx.navigateTo({ - url: `/pages/order/after-service-detail/index?rightsNo=${e.currentTarget.dataset.order.id}`, - }); - }, -}); diff --git a/pages/order/after-service-list/index.json b/pages/order/after-service-list/index.json deleted file mode 100644 index 46b5d09..0000000 --- a/pages/order/after-service-list/index.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "navigationBarTitleText": "閫�娆�/鍞悗", - "usingComponents": { - "wr-load-more": "/components/load-more/index", - "wr-after-service-button-bar": "../components/after-service-button-bar/index", - "wr-price": "/components/price/index", - "wr-order-card": "../components/order-card/index", - "wr-goods-card": "../components/goods-card/index", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-empty": "tdesign-miniprogram/empty/empty", - "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh" - } -} \ No newline at end of file diff --git a/pages/order/after-service-list/index.wxml b/pages/order/after-service-list/index.wxml deleted file mode 100644 index 7b4f649..0000000 --- a/pages/order/after-service-list/index.wxml +++ /dev/null @@ -1,61 +0,0 @@ -<view class="page-container"> - <t-pull-down-refresh id="t-pull-down-refresh" bindrefresh="onPullDownRefresh_" t-class-indicator="t-class-indicator"> - <wr-order-card - wx:for="{{dataList}}" - wx:key="id" - wx:for-item="order" - wx:for-index="oIndex" - order="{{order}}" - data-order="{{order}}" - bindcardtap="onAfterServiceCardTap" - useTopRightSlot - header-class="header-class" - > - <view class="text-btn" slot="top-right"> - <view class="header__right"> - <t-icon prefix="wr" color="#FA4126" name="goods_refund" size="20px" slot="left-icon" /> - {{order.typeDesc}} - </view> - </view> - <wr-goods-card - wx:for="{{order.goodsList}}" - wx:key="id" - wx:for-item="goods" - wx:for-index="gIndex" - data="{{goods}}" - no-top-line="{{gIndex === 0}}" - > - <view slot="footer" class="order-goods-card-footer"> - <wr-price - price="{{goods.itemRefundAmount}}" - fill - wr-class="order-goods-card-footer-price-class" - symbol-class="order-goods-card-footer-price-symbol" - decimal-class="order-goods-card-footer-price-decimal" - /> - <view class="order-goods-card-footer-num">x {{goods.rightsQuantity}}</view> - </view> - </wr-goods-card> - <view slot="more"> - <view class="status-desc">{{order.statusDesc}}</view> - <wr-after-service-button-bar service="{{order}}" bindrefresh="onRefresh" /> - </view> - </wr-order-card> - <!-- 鍒楄〃鍔犺浇涓�/宸插叏閮ㄥ姞杞� --> - <wr-load-more - wx:if="{{!pullDownRefreshing}}" - list-is-empty="{{!dataList.length}}" - status="{{listLoading}}" - bindretry="onReTryLoad" - > - <!-- 绌烘�� --> - <view slot="empty" class="empty-wrapper"> - <t-empty size="240rpx" textColor="#999999" textSize="28rpx" src="{{emptyImg}}"> - 鏆傛棤閫�娆炬垨鍞悗鐢宠璁板綍 - </t-empty> - </view> - </wr-load-more> - </t-pull-down-refresh> -</view> -<t-toast id="t-toast" /> -<t-dialog id="t-dialog" /> diff --git a/pages/order/after-service-list/index.wxss b/pages/order/after-service-list/index.wxss deleted file mode 100644 index 8a784bf..0000000 --- a/pages/order/after-service-list/index.wxss +++ /dev/null @@ -1,104 +0,0 @@ -:host { - background-color: #f5f5f5; -} - -.list-loading { - height: 100rpx; -} - -.empty-wrapper { - height: calc(100vh - 88rpx); -} - -.page-container .order-goods-card-footer { - display: flex; - width: calc(100% - 190rpx); - justify-content: space-between; - position: absolute; - bottom: 20rpx; - left: 190rpx; -} - -.page-container .order-goods-card-footer .order-goods-card-footer-num { - color: #999; - line-height: 40rpx; -} - -.page-container .order-goods-card-footer .order-goods-card-footer-price-class { - font-size: 36rpx; - color: #333; - font-family: DIN Alternate; -} - -.page-container .order-goods-card-footer .order-goods-card-footer-price-decimal { - font-size: 28rpx; - color: #333; - font-family: DIN Alternate; -} - -.page-container .order-goods-card-footer .order-goods-card-footer-price-symbol { - color: #333; - font-size: 24rpx; - font-family: DIN Alternate; -} - -.page-container .wr-goods-card__specs { - margin: 14rpx 20rpx 0 0; -} - -.page-container .order-goods-card > wr-goods-card .wr-goods-card__title { - margin-right: 0; - -webkit-line-clamp: 1; -} - -.page-container .order-card .header .store-name { - width: 80%; - -webkit-line-clamp: 1; -} - -.page-container .order-card .header .store-name > view { - overflow: hidden; - width: 100%; - white-space: nowrap; - text-overflow: ellipsis; -} - -.page-container .status-desc { - box-sizing: border-box; - padding: 22rpx 20rpx; - font-size: 26rpx; - line-height: 1.3; - text-align: left; - color: #333333; - background-color: #f5f5f5; - border-radius: 8rpx; - word-wrap: break-word; - margin-top: 24rpx; - margin-bottom: 20rpx; -} - -.page-container .header__right { - font-size: 24rpx; - color: #fa4126; - display: flex; - align-items: center; -} - -.page-container .header__right__icon { - color: #d05b27; - font-size: 16px !important; - margin-right: 10rpx; -} - -.t-class-indicator { - color: #b9b9b9 !important; -} - -.page-container .header-class { - margin-bottom: 5rpx !important; -} - -.t-button { - --td-button-default-color: #000; - --td-button-primary-text-color: #fa4126; -} diff --git a/pages/order/apply-service/index.js b/pages/order/apply-service/index.js deleted file mode 100644 index 0642e69..0000000 --- a/pages/order/apply-service/index.js +++ /dev/null @@ -1,441 +0,0 @@ -import Dialog from 'tdesign-miniprogram/dialog/index'; -import Toast from 'tdesign-miniprogram/toast/index'; -import { priceFormat } from '../../../utils/util'; -import { OrderStatus, ServiceType, ServiceReceiptStatus } from '../config'; -import reasonSheet from '../components/reason-sheet/reasonSheet'; -import { - fetchRightsPreview, - dispatchConfirmReceived, - fetchApplyReasonList, - dispatchApplyService, -} from '../../../services/order/applyService'; - -Page({ - query: {}, - data: { - uploading: false, // 鍑瘉涓婁紶鐘舵�� - canApplyReturn: true, // 鏄惁鍙��璐� - goodsInfo: {}, - receiptStatusList: [ - { desc: '鏈敹鍒拌揣', status: ServiceReceiptStatus.NOT_RECEIPTED }, - { desc: '宸叉敹鍒拌揣', status: ServiceReceiptStatus.RECEIPTED }, - ], - applyReasons: [], - serviceType: null, // 20-浠呴��娆撅紝10-閫�璐ч��娆� - serviceFrom: { - returnNum: 1, - receiptStatus: { desc: '璇烽�夋嫨', status: null }, - applyReason: { desc: '璇烽�夋嫨', type: null }, - // max-濉啓涓婇檺(鍗曚綅鍒�)锛宑urrent-褰撳墠鍊�(鍗曚綅鍒�)锛宼emp杈撳叆妗嗕腑鐨勫��(鍗曚綅鍏�) - amount: { max: 0, current: 0, temp: 0, focus: false }, - remark: '', - rightsImageUrls: [], - }, - maxApplyNum: 2, // 鏈�澶у彲鐢宠鍞悗鐨勫晢鍝佹暟 - amountTip: '', - showReceiptStatusDialog: false, - validateRes: { - valid: false, - msg: '', - }, - submitting: false, - inputDialogVisible: false, - uploadGridConfig: { - column: 3, - width: 212, - height: 212, - }, - serviceRequireType: '', - }, - - setWatcher(key, callback) { - let lastData = this.data; - const keys = key.split('.'); - keys.slice(0, -1).forEach((k) => { - lastData = lastData[k]; - }); - const lastKey = keys[keys.length - 1]; - this.observe(lastData, lastKey, callback); - }, - - observe(data, k, callback) { - let val = data[k]; - Object.defineProperty(data, k, { - configurable: true, - enumerable: true, - set: (value) => { - val = value; - callback(); - }, - get: () => { - return val; - }, - }); - }, - - validate() { - let valid = true; - let msg = ''; - // 妫�鏌ュ繀濉」 - if (!this.data.serviceFrom.applyReason.type) { - valid = false; - msg = '璇峰~鍐欓��娆惧師鍥�'; - } else if (!this.data.serviceFrom.amount.current) { - valid = false; - msg = '璇峰~鍐欓��娆鹃噾棰�'; - } - if (this.data.serviceFrom.amount.current <= 0) { - valid = false; - msg = '閫�娆鹃噾棰濆繀椤诲ぇ浜�0'; - } - this.setData({ validateRes: { valid, msg } }); - }, - - onLoad(query) { - this.query = query; - if (!this.checkQuery()) return; - this.setData({ - canApplyReturn: query.canApplyReturn === 'true', - }); - this.init(); - this.inputDialog = this.selectComponent('#input-dialog'); - this.setWatcher('serviceFrom.returnNum', this.validate.bind(this)); - this.setWatcher('serviceFrom.applyReason', this.validate.bind(this)); - this.setWatcher('serviceFrom.amount', this.validate.bind(this)); - this.setWatcher('serviceFrom.rightsImageUrls', this.validate.bind(this)); - }, - - async init() { - try { - await this.refresh(); - } catch (e) {} - }, - - checkQuery() { - const { orderNo, skuId } = this.query; - if (!orderNo) { - Dialog.alert({ - content: '璇峰厛閫夋嫨璁㈠崟', - }).then(() => { - wx.redirectTo({ url: 'pages/order/order-list/index' }); - }); - return false; - } - if (!skuId) { - Dialog.alert({ - content: '璇峰厛閫夋嫨鍟嗗搧', - }).then(() => { - wx.redirectTo(`pages/order/order-detail/index?orderNo=${orderNo}`); - }); - return false; - } - return true; - }, - - async refresh() { - wx.showLoading({ title: 'loading' }); - try { - const res = await this.getRightsPreview(); - wx.hideLoading(); - const goodsInfo = { - id: res.data.skuId, - thumb: res.data.goodsInfo && res.data.goodsInfo.skuImage, - title: res.data.goodsInfo && res.data.goodsInfo.goodsName, - spuId: res.data.spuId, - skuId: res.data.skuId, - specs: ((res.data.goodsInfo && res.data.goodsInfo.specInfo) || []).map((s) => s.specValue), - paidAmountEach: res.data.paidAmountEach, - boughtQuantity: res.data.boughtQuantity, - }; - this.setData({ - goodsInfo, - 'serviceFrom.amount': { - max: res.data.refundableAmount, - current: res.data.refundableAmount, - }, - 'serviceFrom.returnNum': res.data.numOfSku, - amountTip: `鏈�澶氬彲鐢宠閫�娆韭� ${priceFormat(res.data.refundableAmount, 2)}锛屽惈鍙戣揣杩愯垂楼 ${priceFormat( - res.data.shippingFeeIncluded, - 2, - )}`, - maxApplyNum: res.data.numOfSkuAvailable, - }); - } catch (err) { - wx.hideLoading(); - throw err; - } - }, - - async getRightsPreview() { - const { orderNo, skuId, spuId } = this.query; - const params = { - orderNo, - skuId, - spuId, - numOfSku: this.data.serviceFrom.returnNum, - }; - const res = await fetchRightsPreview(params); - return res; - }, - - onApplyOnlyRefund() { - wx.setNavigationBarTitle({ title: '鐢宠閫�娆�' }); - this.setData({ serviceRequireType: 'REFUND_MONEY' }); - this.switchReceiptStatus(0); - }, - - onApplyReturnGoods() { - wx.setNavigationBarTitle({ title: '鐢宠閫�璐ч��娆�' }); - this.setData({ serviceRequireType: 'REFUND_GOODS' }); - const orderStatus = parseInt(this.query.orderStatus); - Promise.resolve() - .then(() => { - if (orderStatus === OrderStatus.PENDING_RECEIPT) { - return Dialog.confirm({ - title: '璁㈠崟鍟嗗搧鏄惁宸茬粡鏀跺埌璐�', - content: '', - confirmBtn: '纭鏀惰揣锛屽苟鐢宠閫�璐�', - cancelBtn: '鏈敹鍒拌揣', - }).then(() => { - return dispatchConfirmReceived({ - parameter: { - logisticsNo: this.query.logisticsNo, - orderNo: this.query.orderNo, - }, - }); - }); - } - return; - }) - .then(() => { - this.setData({ serviceType: ServiceType.RETURN_GOODS }); - this.switchReceiptStatus(1); - }); - }, - - onApplyReturnGoodsStatus() { - reasonSheet({ - show: true, - title: '閫夋嫨閫�娆惧師鍥�', - options: this.data.applyReasons.map((r) => ({ - title: r.desc, - })), - showConfirmButton: true, - showCancelButton: true, - emptyTip: '璇烽�夋嫨閫�娆惧師鍥�', - }).then((indexes) => { - this.setData({ - 'serviceFrom.applyReason': this.data.applyReasons[indexes[0]], - }); - }); - }, - - onChangeReturnNum(e) { - const { value } = e.detail; - this.setData({ - 'serviceFrom.returnNum': value, - }); - }, - - onApplyGoodsStatus() { - reasonSheet({ - show: true, - title: '璇烽�夋嫨鏀惰揣鐘舵��', - options: this.data.receiptStatusList.map((r) => ({ - title: r.desc, - })), - showConfirmButton: true, - emptyTip: '璇烽�夋嫨鏀惰揣鐘舵��', - }).then((indexes) => { - this.setData({ - 'serviceFrom.receiptStatus': this.data.receiptStatusList[indexes[0]], - }); - }); - }, - - switchReceiptStatus(index) { - const statusItem = this.data.receiptStatusList[index]; - // 娌℃湁鎵惧埌瀵瑰簲鐨勭姸鎬侊紝鍒欐竻绌�/鍒濆鍖� - if (!statusItem) { - this.setData({ - showReceiptStatusDialog: false, - 'serviceFrom.receiptStatus': { desc: '璇烽�夋嫨', status: null }, - 'serviceFrom.applyReason': { desc: '璇烽�夋嫨', type: null }, // 鏀惰揣鐘舵�佹敼鍙樻椂锛屽垵濮嬪寲鐢宠鍘熷洜 - applyReasons: [], - }); - return; - } - // 浠呴�変腑椤逛笌褰撳墠椤逛笉涓�鑷存椂锛屾墠鍒囨崲鐢宠鍘熷洜鍒楄〃applyReasons - if (!statusItem || statusItem.status === this.data.serviceFrom.receiptStatus.status) { - this.setData({ showReceiptStatusDialog: false }); - return; - } - this.getApplyReasons(statusItem.status).then((reasons) => { - this.setData({ - showReceiptStatusDialog: false, - 'serviceFrom.receiptStatus': statusItem, - 'serviceFrom.applyReason': { desc: '璇烽�夋嫨', type: null }, // 鏀惰揣鐘舵�佹敼鍙樻椂锛岄噸缃敵璇峰師鍥� - applyReasons: reasons, - }); - }); - }, - - getApplyReasons(receiptStatus) { - const params = { rightsReasonType: receiptStatus }; - return fetchApplyReasonList(params) - .then((res) => { - return res.data.rightsReasonList.map((reason) => ({ - type: reason.id, - desc: reason.desc, - })); - }) - .catch(() => { - return []; - }); - }, - - onReceiptStatusDialogConfirm(e) { - const { index } = e.currentTarget.dataset; - this.switchReceiptStatus(index); - }, - - onAmountTap() { - this.setData({ - 'serviceFrom.amount.temp': priceFormat(this.data.serviceFrom.amount.current), - 'serviceFrom.amount.focus': true, - inputDialogVisible: true, - }); - this.inputDialog.setData({ - cancelBtn: '鍙栨秷', - confirmBtn: '纭畾', - }); - this.inputDialog._onConfirm = () => { - this.setData({ - 'serviceFrom.amount.current': this.data.serviceFrom.amount.temp * 100, - }); - }; - this.inputDialog._onCancel = () => {}; - }, - - // 瀵硅緭鍏ョ殑鍊艰繘琛岃繃婊� - onAmountInput(e) { - let { value } = e.detail; - const regRes = value.match(/\d+(\.?\d*)?/); // 杈撳叆涓紝鍏佽鏈熬涓哄皬鏁扮偣 - value = regRes ? regRes[0] : ''; - this.setData({ 'serviceFrom.amount.temp': value }); - }, - - // 澶卞幓鐒︾偣鏃讹紝鏇翠弗鏍肩殑杩囨护骞惰浆鍖栦负float - onAmountBlur(e) { - let { value } = e.detail; - const regRes = value.match(/\d+(\.?\d+)?/); // 澶卞幓鐒︾偣鏃讹紝涓嶅厑璁告湯灏句负灏忔暟鐐� - value = regRes ? regRes[0] : '0'; - value = parseFloat(value) * 100; - if (value > this.data.serviceFrom.amount.max) { - value = this.data.serviceFrom.amount.max; - } - this.setData({ - 'serviceFrom.amount.temp': priceFormat(value), - 'serviceFrom.amount.focus': false, - }); - }, - - onAmountFocus() { - this.setData({ 'serviceFrom.amount.focus': true }); - }, - - onRemarkChange(e) { - const { value } = e.detail; - this.setData({ - 'serviceFrom.remark': value, - }); - }, - - // 鍙戣捣鐢宠鍞悗璇锋眰 - onSubmit() { - this.submitCheck().then(() => { - const params = { - rights: { - orderNo: this.query.orderNo, - refundRequestAmount: this.data.serviceFrom.amount.current, - rightsImageUrls: this.data.serviceFrom.rightsImageUrls, - rightsReasonDesc: this.data.serviceFrom.applyReason.desc, - rightsReasonType: this.data.serviceFrom.receiptStatus.status, - rightsType: this.data.serviceType, - }, - rightsItem: [ - { - itemTotalAmount: this.data.goodsInfo.price * this.data.serviceFrom.returnNum, - rightsQuantity: this.data.serviceFrom.returnNum, - skuId: this.query.skuId, - spuId: this.query.spuId, - }, - ], - refundMemo: this.data.serviceFrom.remark.current, - }; - this.setData({ submitting: true }); - // 鍙戣捣鐢宠鍞悗璇锋眰 - dispatchApplyService(params) - .then((res) => { - Toast({ - context: this, - selector: '#t-toast', - message: '鐢宠鎴愬姛', - icon: '', - }); - - wx.redirectTo({ - url: `/pages/order/after-service-detail/index?rightsNo=${res.data.rightsNo}`, - }); - }) - .then(() => this.setData({ submitting: false })) - .catch(() => this.setData({ submitting: false })); - }); - }, - - submitCheck() { - return new Promise((resolve) => { - const { msg, valid } = this.data.validateRes; - if (!valid) { - Toast({ - context: this, - selector: '#t-toast', - message: msg, - icon: '', - }); - return; - } - resolve(); - }); - }, - - handleSuccess(e) { - const { files } = e.detail; - this.setData({ - 'sessionFrom.rightsImageUrls': files, - }); - }, - - handleRemove(e) { - const { index } = e.detail; - const { - sessionFrom: { rightsImageUrls }, - } = this.data; - rightsImageUrls.splice(index, 1); - this.setData({ - 'sessionFrom.rightsImageUrls': rightsImageUrls, - }); - }, - - handleComplete() { - this.setData({ - uploading: false, - }); - }, - - handleSelectChange() { - this.setData({ - uploading: true, - }); - }, -}); diff --git a/pages/order/apply-service/index.json b/pages/order/apply-service/index.json deleted file mode 100644 index b5c4f62..0000000 --- a/pages/order/apply-service/index.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "navigationBarTitleText": "閫夋嫨鍞悗绫诲瀷", - "usingComponents": { - "wr-price": "/components/price/index", - "wr-order-goods-card": "../components/order-goods-card/index", - "wr-reason-sheet": "../components/reason-sheet/index", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-button": "tdesign-miniprogram/button/button", - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", - "t-stepper": "tdesign-miniprogram/stepper/stepper", - "t-popup": "tdesign-miniprogram/popup/popup", - "t-textarea": "tdesign-miniprogram/textarea/textarea", - "t-input": "tdesign-miniprogram/input/input", - "t-upload": "tdesign-miniprogram/upload/upload" - } -} \ No newline at end of file diff --git a/pages/order/apply-service/index.wxml b/pages/order/apply-service/index.wxml deleted file mode 100644 index b6471ea..0000000 --- a/pages/order/apply-service/index.wxml +++ /dev/null @@ -1,198 +0,0 @@ -<view class="select-service"> - <view class="order-goods-card"> - <wr-order-goods-card goods="{{goodsInfo}}" no-top-line thumb-class="order-goods-card-title-class"> - <view slot="footer" class="order-goods-card-footer"> - <wr-price - price="{{goodsInfo.paidAmountEach}}" - fill - wr-class="order-goods-card-footer-price-class" - symbol-class="order-goods-card-footer-price-symbol" - decimal-class="order-goods-card-footer-price-decimal" - /> - <view class="order-goods-card-footer-num">x {{goodsInfo.boughtQuantity}}</view> - </view> - </wr-order-goods-card> - </view> - <view wx:if="{{!serviceRequireType}}" class="service-choice"> - <t-cell-group> - <t-cell - title="鐢宠閫�娆撅紙鏃犻渶閫�璐э級" - arrow - description="娌℃敹鍒拌揣锛屾垨涓庡晢瀹跺崗鍟嗗悓鎰忎笉鐢ㄩ��璐у彧閫�娆�" - bindtap="onApplyOnlyRefund" - > - <t-icon - slot="left-icon" - prefix="wr" - class="t-cell__left__icon" - name="goods_refund" - size="48rpx" - color="#fa4126" - /> - </t-cell> - <t-cell - wx:if="{{canApplyReturn}}" - title="閫�璐ч��娆�" - description="宸叉敹鍒拌揣锛岄渶瑕侀��杩樻敹鍒扮殑鍟嗗搧" - arrow - bindtap="onApplyReturnGoods" - > - <t-icon - slot="left-icon" - prefix="wr" - class="t-cell__left__icon" - name="goods_return" - size="48rpx" - color="#fa4126" - /> - </t-cell> - <t-cell wx:else class="non-returnable" title="閫�璐ч��娆�" description="璇ュ晢鍝佷笉鏀寔閫�璐�"> - <t-icon - slot="left-icon" - prefix="wr" - class="t-cell__left__icon" - name="goods_return" - size="48rpx" - color="#fa4126" - /> - </t-cell> - </t-cell-group> - </view> - <!-- 鍞悗琛ㄥ崟 --> - <view wx:else class="service-form"> - <view class="service-from-group"> - <t-cell-group> - <t-cell title="鍟嗗搧鏀惰揣鐘舵��" arrow note="{{serviceFrom.receiptStatus.desc}}" bind:tap="onApplyGoodsStatus" /> - <t-cell - bordered="{{false}}" - title="閫�娆惧師鍥�" - wx:if="{{canApplyReturn}}" - note="{{serviceFrom.applyReason.desc}}" - arrow - bindtap="onApplyReturnGoodsStatus" - /> - </t-cell-group> - </view> - <view class="service-from-group"> - <t-cell-group> - <t-cell title="閫�娆惧晢鍝佹暟閲�"> - <t-stepper - slot="note" - theme="filled" - min="1" - max="{{maxApplyNum}}" - value="{{serviceFrom.returnNum}}" - bindchange="onChangeReturnNum" - /> - </t-cell> - <t-cell - title="閫�娆鹃噾棰�" - t-class-description="refund-money__description" - description="{{amountTip}}" - bind:tap="onAmountTap" - > - <view class="service-from-group__wrapper" slot="note"> - <wr-price - price="{{serviceFrom.amount.current}}" - fill - wr-class="refund-money-price-class" - symbol-class="refund-money-price-symbol" - decimal-class="refund-money-price-decimal" - /> - <view class="service-from-group__price"> - 淇敼 - <t-icon color="#bbb" name="chevron-right" size="30rpx" slot="left-icon" /> - </view> - </view> - </t-cell> - </t-cell-group> - </view> - <view class="service-from-group__textarea"> - <text class="textarea--label">閫�娆捐鏄�</text> - <t-textarea - style="height: 220rpx" - value="{{serviceFrom.remark}}" - t-class="textarea--content" - maxlength="200" - indicator - placeholder="閫�娆捐鏄庯紙閫夊~锛�" - bind:change="onRemarkChange" - /> - </view> - <view class="service-from-group__grid"> - <t-upload - media-type="{{['image','video']}}" - files="{{sessionFrom.rightsImageUrls}}" - bind:remove="handleRemove" - bind:success="handleSuccess" - bind:complete="handleComplete" - bind:select-change="handleSelectChange" - gridConfig="{{uploadGridConfig}}" - max="3" - > - <view slot="add-content" class="upload-addcontent-slot"> - <t-icon name="add" size="60rpx" /> - <view class="upload-desc"> - <text>涓婁紶鍑瘉</text> - <text>锛堟渶澶�3寮狅級</text> - </view> - </view> - </t-upload> - </view> - <view class="bottom-bar"> - <t-button - t-class="bottom-bar__btn {{validateRes.valid && !uploading ? '' : 'disabled'}}" - bindtap="onSubmit" - loading="{{submitting}}" - > - 鎻愪氦 - </t-button> - </view> - </view> -</view> -<!-- 鏀惰揣鐘舵�侀�夋嫨 --> -<t-popup visible="{{showReceiptStatusDialog}}" placement="bottom" bindclose="onReceiptStatusDialogConfirm"> - <view class="dialog--service-status" slot="content"> - <view class="options"> - <view - wx:for="{{receiptStatusList}}" - wx:key="status" - class="option" - hover-class="option--active" - bindtap="onReceiptStatusDialogConfirm" - data-index="{{index}}" - > - {{item.desc}} - </view> - </view> - <view class="cancel" hover-class="cancel--active" bindtap="onReceiptStatusDialogConfirm">鍙栨秷</view> - </view> -</t-popup> -<!-- 鐞嗙敱閫夋嫨 --> -<wr-reason-sheet id="wr-reason-sheet" /> -<!-- 閲戦濉啓 --> -<t-dialog - id="input-dialog" - visible="{{inputDialogVisible}}" - class="{{serviceFrom.amount.focus ? 'amount-dialog--focus' : ''}}" -> - <view class="input-dialog__title" slot="title">閫�娆鹃噾棰�</view> - <view class="input-dialog__content" slot="content"> - <t-input - t-class="input" - t-class-input="input-dialog__input" - t-class-label="input-dialog__label" - placeholder="" - value="{{serviceFrom.amount.temp}}" - type="digit" - focus="{{serviceFrom.amount.focus}}" - bindinput="onAmountInput" - bindfocus="onAmountFocus" - bindblur="onAmountBlur" - label="楼" - ></t-input> - <view class="tips">{{amountTip}}</view> - </view> -</t-dialog> -<t-dialog id="t-dialog" /> -<t-toast id="t-toast" /> diff --git a/pages/order/apply-service/index.wxss b/pages/order/apply-service/index.wxss deleted file mode 100644 index 86fb12f..0000000 --- a/pages/order/apply-service/index.wxss +++ /dev/null @@ -1,308 +0,0 @@ -:host { - background-color: #f5f5f5; -} -.select-service .service-form .service-from-group { - margin-top: 20rpx; -} -.select-service .service-form { - padding-bottom: calc(env(safe-area-inset-bottom) + 80rpx); -} - -.order-goods-card-footer { - display: flex; - width: calc(100% - 190rpx); - justify-content: space-between; - position: absolute; - bottom: 0; - left: 190rpx; -} - -.order-goods-card-footer-num { - color: #999; -} - -.select-service .order-goods-card-footer .order-goods-card-footer-price-class { - font-size: 36rpx; - color: #333; - font-family: DIN Alternate; -} -.select-service .order-goods-card-footer .order-goods-card-footer-price-decimal { - font-size: 28rpx; - color: #333; - font-family: DIN Alternate; -} -.select-service .order-goods-card-footer .order-goods-card-footer-price-symbol { - color: #333; - font-size: 24rpx; - font-family: DIN Alternate; -} - -.select-service .remark { - min-height: 110rpx; - border-radius: 10rpx; - margin-top: 20rpx; - background-color: #f5f5f5; -} -.select-service .remark::after { - border: none; -} - -.select-service .special-cell .special-cell-note { - display: flex; - flex-direction: column; -} - -.select-service .special-cell .wr-cell__title { - margin-right: 100rpx; -} - -.select-service .special-cell .special-cell-note-price-class { - font-size: 36rpx; - color: #fa4126; - font-family: DIN Alternate; -} -.select-service .special-cell .special-cell-note-price-decimal { - font-size: 28rpx; - color: #fa4126; - font-family: DIN Alternate; -} -.select-service .special-cell .special-cell-note-price-symbol { - color: #fa4126; - font-size: 24rpx; - font-family: DIN Alternate; -} - -.select-service .bottom-bar__btn { - width: 686rpx; - background-color: #fa4126; - color: white; - font-size: 32rpx; - border-radius: 48rpx; - position: absolute; - left: 50%; - top: 20rpx; - transform: translateX(-50%); -} -.select-service .bottom-bar__btn::after { - border: none; -} -.select-service .bottom-bar__btn.disabled { - background-color: #c6c6c6; - --td-button-default-active-bg-color: #c6c6c6; - --td-button-default-border-bg-color: #c6c6c6; -} -.select-service .bottom-bar__btn.disabled::after { - border: none; -} -.select-service .order-goods-card .wr-goods-card { - padding: 0 30rpx; -} - -.order-goods-card-footer { - display: flex; - width: calc(100% - 190rpx); - justify-content: space-between; - position: absolute; - bottom: 20rpx; - left: 190rpx; -} - -.order-goods-card-footer-num { - color: #999; - line-height: 40rpx; -} - -.order-goods-card-title-class { - width: 10rpx !important; -} - -.input-dialog__content .input-dialog__input { - font-size: 72rpx !important; - height: 64rpx; -} - -.t-input__label { - margin-right: 0 !important; -} - -.input-dialog__label { - font-size: 48rpx; - color: #333; -} - -.input-dialog__content .input-dialog__input, -.input-dialog__label { - height: 64rpx; - line-height: 64rpx !important; -} - -.input-dialog__content .input { - font-size: 48rpx; - padding-left: 0; - padding-right: 0; - --td-input-border-left-space: 0; -} - -.input-dialog__content .tips { - margin-top: 24rpx; - font-size: 24rpx; - color: #999999; -} - -.t-input__name { - width: 10rpx !important; -} - -.input-dialog__title { - color: #333; - font-size: 32rpx; - font-weight: normal; -} - -.dialog--service-status { - background-color: #f3f4f5; - overflow: hidden; -} -.dialog--service-status .options .option { - color: #333333; - font-size: 30rpx; - text-align: center; - height: 100rpx; - line-height: 100rpx; - background-color: white; -} -.dialog--service-status .options .option:not(:last-child) { - border-bottom: 1rpx solid #e6e6e6; -} -.dialog--service-status .options .option--active { - opacity: 0.5; -} -.dialog--service-status .options .option.main { - color: #fa4126; -} -.dialog--service-status .cancel { - color: #333333; - font-size: 30rpx; - text-align: center; - height: 100rpx; - line-height: 100rpx; - background-color: white; - margin-top: 20rpx; -} -.dialog--service-status .cancel--active { - opacity: 0.5; -} -.amount-dialog--focus .popup__content--center, -.remark-dialog--focus .popup__content--center { - top: 100rpx; - transform: translate(-50%, 0); -} -.dialog .dialog__button-confirm { - color: #fa4126; - color: var(--color-primary, #fa4126); -} -.select-service .bottom-bar { - background-color: #fff; - position: fixed; - bottom: 0; - left: 0; - width: 100%; - height: 158rpx; - z-index: 3; -} -.order-goods-card { - background: #fff; - margin-bottom: 24rpx; -} - -.service-from-group__wrapper { - display: flex; - flex-direction: column; - font-family: DIN Alternate; - font-weight: bold; - font-size: 36rpx; - text-align: right; - color: #fa4126; -} -.service-from-group__price { - display: flex; - align-items: center; - color: #bbb; - font-size: 24rpx; - position: relative; - left: 30rpx; -} -.textarea--label { -} -.service-from-group__textarea { - margin-top: 20rpx; - background-color: #fff; - padding: 32rpx 32rpx 24rpx; -} - -.textarea--content { - margin-top: 32rpx; - background: #f5f5f5 !important; - border-radius: 16rpx; -} -.service-from-group__textarea .t-textarea__wrapper .t-textarea__wrapper-textarea { - height: 136rpx; - box-sizing: border-box; -} -.service-from-group__grid { - padding: 0 32rpx 48rpx; - background: #fff; - margin-bottom: 148rpx; -} - -.upload-addcontent-slot { - background-color: #f5f5f5; - height: inherit; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; -} - -.refund-money__description { - font-size: 24rpx !important; -} - -.upload-desc { - text-align: center; - display: flex; - flex-direction: column; - font-size: 24rpx; - color: #999; -} - -.t-cell__left__icon { - position: relative; - top: -24rpx; - margin-right: 18rpx; -} - -.service-choice .t-cell__title-text { - color: #333; - font-weight: bold; -} - -.service-form .service-from-group .service-from-group__wrapper .refund-money-price-class { - font-size: 36rpx; - font-family: DIN Alternate; -} - -.service-form .service-from-group .service-from-group__wrapper .refund-money-price-decimal { - font-size: 28rpx; - font-family: DIN Alternate; -} - -.service-form .service-from-group .service-from-group__wrapper .refund-money-price-symbol { - font-size: 24rpx; - font-family: DIN Alternate; -} - -.t-button { - --td-button-default-color: #000; - --td-button-primary-text-color: #fa4126; -} diff --git a/pages/order/components/after-service-button-bar/index.js b/pages/order/components/after-service-button-bar/index.js deleted file mode 100644 index c1f813d..0000000 --- a/pages/order/components/after-service-button-bar/index.js +++ /dev/null @@ -1,95 +0,0 @@ -import Dialog from 'tdesign-miniprogram/dialog/index'; -import Toast from 'tdesign-miniprogram/toast/index'; - -import { cancelRights } from '../../after-service-detail/api'; -import { ServiceButtonTypes } from '../../config'; - -Component({ - properties: { - service: { - type: Object, - observer(service) { - const buttonsRight = service.buttons || service.buttonVOs || []; - this.setData({ - buttons: { - left: [], - right: buttonsRight, - }, - }); - }, - }, - }, - - data: { - service: {}, - buttons: { - left: [], - right: [], - }, - }, - - methods: { - // 鐐瑰嚮銆愯鍗曟搷浣溿�戞寜閽紝鏍规嵁鎸夐挳绫诲瀷鍒嗗彂 - onServiceBtnTap(e) { - const { type } = e.currentTarget.dataset; - switch (type) { - case ServiceButtonTypes.REVOKE: - this.onConfirm(this.data.service); - break; - case ServiceButtonTypes.FILL_TRACKING_NO: - this.onFillTrackingNo(this.data.service); - break; - case ServiceButtonTypes.CHANGE_TRACKING_NO: - this.onChangeTrackingNo(this.data.service); - break; - case ServiceButtonTypes.VIEW_DELIVERY: - this.viewDelivery(this.data.service); - break; - } - }, - - onFillTrackingNo(service) { - wx.navigateTo({ - url: `/pages/order/fill-tracking-no/index?rightsNo=${service.id}`, - }); - }, - - viewDelivery(service) { - wx.navigateTo({ - url: `/pages/order/delivery-detail/index?data=${JSON.stringify( - service.logistics || service.logisticsVO, - )}&source=2`, - }); - }, - - onChangeTrackingNo(service) { - wx.navigateTo({ - url: `/pages/order/fill-tracking-no/index?rightsNo=${ - service.id - }&logisticsNo=${service.logisticsNo}&logisticsCompanyName=${ - service.logisticsCompanyName - }&logisticsCompanyCode=${service.logisticsCompanyCode}&remark=${ - service.remark || '' - }`, - }); - }, - - onConfirm() { - Dialog.confirm({ - title: '鏄惁鎾ら攢閫�璐х敵璇凤紵', - content: '', - confirmBtn: '鎾ら攢鐢宠', - cancelBtn: '涓嶆挙閿�', - }).then(() => { - const params = { rightsNo: this.data.service.id }; - return cancelRights(params).then(() => { - Toast({ - context: this, - selector: '#t-toast', - message: '浣犵‘璁ゆ挙閿�鐢宠', - }); - }); - }); - }, - }, -}); diff --git a/pages/order/components/after-service-button-bar/index.json b/pages/order/components/after-service-button-bar/index.json deleted file mode 100644 index 75d1e24..0000000 --- a/pages/order/components/after-service-button-bar/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-button": "tdesign-miniprogram/button/button" - } -} diff --git a/pages/order/components/after-service-button-bar/index.wxml b/pages/order/components/after-service-button-bar/index.wxml deleted file mode 100644 index c19c824..0000000 --- a/pages/order/components/after-service-button-bar/index.wxml +++ /dev/null @@ -1,33 +0,0 @@ -<view class="btn-bar"> - <view class="left"> - <t-button - wx:for="{{buttons.left}}" - wx:key="type" - wx:for-item="leftBtn" - size="extra-small" - shape="round" - t-class="order-btn delete-btn" - catchtap="onServiceBtnTap" - data-type="{{leftBtn.type}}" - > - {{leftBtn.name}} - </t-button> - </view> - <view class="right"> - <t-button - wx:for="{{buttons.right}}" - wx:key="type" - wx:for-item="rightBtn" - size="extra-small" - variant="{{ rightBtn.primary ? 'base' : 'outline'}}" - shape="round" - t-class="order-btn {{rightBtn.primary ? 'primary' : 'normal'}}" - catchtap="onServiceBtnTap" - data-type="{{rightBtn.type}}" - open-type="{{ rightBtn.openType }}" - data-share="{{ rightBtn.dataShare }}" - > - {{rightBtn.name}} - </t-button> - </view> -</view> diff --git a/pages/order/components/after-service-button-bar/index.wxss b/pages/order/components/after-service-button-bar/index.wxss deleted file mode 100644 index e83597f..0000000 --- a/pages/order/components/after-service-button-bar/index.wxss +++ /dev/null @@ -1,43 +0,0 @@ -:host { - width: 100%; -} -.btn-bar { - display: flex; - justify-content: space-between; - align-items: center; - line-height: 1; -} -.btn-bar .order-btn { - background-color: inherit; - font-size: 26rpx; - padding: 16rpx 28rpx; - line-height: 1; - border-radius: unset; - min-width: 160rpx; - border-radius: 32rpx; - height: 60rpx; - margin-right: 10rpx; -} - -.btn-bar .left .order-btn:not(:first-child), -.btn-bar .right .order-btn:not(:first-child) { - margin-left: 20rpx; -} -.btn-bar .left .delete-btn { - font-size: 22rpx; -} -.btn-bar .left .delete-btn::after { - display: none; -} - -.btn-bar .right .normal { - --td-button-default-color: #333333; - --td-button-default-border-color: #dddddd; -} - -.btn-bar .right .primary { - --td-button-default-color: #fff; - --td-button-default-bg-color: #fa4126; - --td-button-default-border-color: #fa4126; - --td-button-default-active-bg-color: #fa42269c; -} diff --git a/pages/order/components/customer-service/index.js b/pages/order/components/customer-service/index.js deleted file mode 100644 index 419b97f..0000000 --- a/pages/order/components/customer-service/index.js +++ /dev/null @@ -1,38 +0,0 @@ -Component({ - externalClasses: ['wr-class'], - - properties: { - phoneNumber: String, - desc: String, - }, - - data: { - show: false, - }, - - methods: { - onBtnTap() { - this.setData({ - show: true, - }); - }, - - onDialogClose() { - this.setData({ - show: false, - }); - }, - - onCall() { - const { phoneNumber } = this.properties; - wx.makePhoneCall({ - phoneNumber, - }); - }, - onCallOnlineService() { - wx.showToast({ - title: '浣犵偣鍑讳簡鍦ㄧ嚎瀹㈡湇', - }); - }, - }, -}); diff --git a/pages/order/components/customer-service/index.json b/pages/order/components/customer-service/index.json deleted file mode 100644 index 6e4c04e..0000000 --- a/pages/order/components/customer-service/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-popup": "tdesign-miniprogram/popup/popup" - } -} diff --git a/pages/order/components/customer-service/index.wxml b/pages/order/components/customer-service/index.wxml deleted file mode 100644 index f5413a4..0000000 --- a/pages/order/components/customer-service/index.wxml +++ /dev/null @@ -1,23 +0,0 @@ -<!-- 鑱旂郴瀹㈡湇鎸夐挳 --> -<view class="wr-class customer-service text-btn" hover-class="text-btn--active" bindtap="onBtnTap">鑱旂郴瀹㈡湇</view> -<!-- 鑱旂郴瀹㈡湇寮规 --> -<t-popup visible="{{show}}" placement="bottom" bind:visible-change="onDialogClose"> - <view class="dialog--customer-service"> - <view class="content" wx:if="{{desc}}"> - <view class="title">鏈嶅姟鏃堕棿:</view> - <text class="subtitle">{{desc}}</text> - </view> - <view class="options"> - <view - class="option main" - hover-class="text-btn--active" - wx:if="{{phoneNumber}}" - bindtap="onCall" - >鍛煎彨 {{phoneNumber}} - </view> - <view class="option main online" hover-class="text-btn--active" bindtap="onCallOnlineService">鍦ㄧ嚎瀹㈡湇</view> - <view class="option" hover-class="text-btn--active" bindtap="onDialogClose">鍙栨秷</view> - </view> - </view> -</t-popup> - diff --git a/pages/order/components/customer-service/index.wxss b/pages/order/components/customer-service/index.wxss deleted file mode 100644 index 75f0363..0000000 --- a/pages/order/components/customer-service/index.wxss +++ /dev/null @@ -1,48 +0,0 @@ -.text-btn { - display: inline; - color: #333; - font-size: 24rpx; -} -.text-btn--active { - opacity: 0.5; -} -.dialog--customer-service { - background-color: #f3f4f5; - overflow: hidden; -} -.dialog--customer-service .content { - font-size: 26rpx; - margin: 32rpx 30rpx; - text-align: center; -} -.dialog--customer-service .content .title { - display: inline; - color: #999999; - font-weight: bold; -} -.dialog--customer-service .content .subtitle { - display: inline; - color: #999999; -} -.dialog--customer-service .options .option { - color: #333333; - font-size: 30rpx; - text-align: center; - height: 100rpx; - line-height: 100rpx; - background-color: white; -} -.dialog--customer-service .options .option:not(:last-child) { - margin-bottom: 20rpx; -} -.dialog--customer-service .options .option--active { - opacity: 0.5; -} -.dialog--customer-service .options .option.main { - color: #333; -} -.dialog--customer-service .options .option.online { - position: relative; - top: -17rpx; - margin-bottom: 2rpx; -} diff --git a/pages/order/components/goods-card/index.js b/pages/order/components/goods-card/index.js deleted file mode 100644 index a4409e3..0000000 --- a/pages/order/components/goods-card/index.js +++ /dev/null @@ -1,264 +0,0 @@ -Component({ - options: { - multipleSlots: true, // 鍦ㄧ粍浠跺畾涔夋椂鐨勯�夐」涓惎鐢ㄥslot鏀寔 - addGlobalClass: true, - }, - intersectionObserverContext: null, - - externalClasses: [ - 'card-class', - 'title-class', - 'desc-class', - 'num-class', - 'thumb-class', - 'specs-class', - 'price-class', - 'origin-price-class', - 'price-prefix-class', - ], - - relations: { - '../order-card/index': { - type: 'ancestor', - linked(target) { - this.parent = target; - }, - }, - }, - - properties: { - hidden: { - // 璁剧疆涓簄ull浠h〃涓嶅仛绫诲瀷杞崲 - type: null, - value: false, - observer(hidden) { - // null灏辨槸浠h〃娌℃湁璁剧疆锛屾病鏈夎缃殑璇濅笉setData锛岄槻姝㈢鍏堢粍浠惰Е鍙戠殑setHidden鎿嶄綔琚鐩� - if (hidden !== null) { - this.setHidden(!!hidden); - } - }, - }, - id: { - type: String, - // `goods-card-88888888` - // 涓嶈兘鍦ㄨ繖閲屽啓鐢熸垚閫昏緫锛屽鏋滃湪杩欓噷鍐欙紝閭d箞鍋囪鏈夊涓猤oods-list鏃讹紝浠栦滑灏嗗叡浜繖涓�� - value: '', - observer: (id) => { - this.genIndependentID(id); - if (this.properties.thresholds?.length) { - this.createIntersectionObserverHandle(); - } - }, - }, - data: { - type: Object, - observer(goods) { - // 鏈塈D鐨勫晢鍝佹墠娓叉煋 - if (!goods) { - return; - } - - /** 鍒掔嚎浠锋槸鍚︽湁鏁� */ - let isValidityLinePrice = true; - // 鍒ゆ柇涓�娆″垝绾夸环鏍兼槸鍚﹀悎鐞� - if ( - goods.originPrice && - goods.price && - goods.originPrice < goods.price - ) { - isValidityLinePrice = false; - } - - // 鏁插畾鎹㈣鏁伴噺榛樿鍊� - if (goods.lineClamp === undefined || goods.lineClamp <= 0) { - // tag鏁扮粍闀垮害 澶т簬0 涓� 鍙 - // 鎸囧畾鎹㈣涓�1琛� - if ((goods.tags?.length || 0) > 0 && !goods.hideKey?.tags) { - goods.lineClamp = 1; - } else { - goods.lineClamp = 2; - } - } - - this.setData({ goods, isValidityLinePrice }); - }, - }, - layout: { - type: String, - value: 'horizontal', - }, - thumbMode: { - type: String, - value: 'aspectFill', - }, - thumbWidth: Number, - thumbHeight: Number, - priceFill: { - type: Boolean, - value: true, - }, - currency: { - type: String, - value: '楼', - }, - lazyLoad: { - type: Boolean, - value: false, - }, - centered: { - type: Boolean, - value: false, - }, - showCart: { - type: Boolean, - value: false, - }, - pricePrefix: { - type: String, - value: '', - }, - cartSize: { - type: Number, - value: 48, - }, - cartColor: { - type: String, - value: '#FA550F', - }, - /** 鍏冪礌鍙鐩戞帶闃堝��, 鏁扮粍闀垮害澶т簬0灏卞垱寤� */ - thresholds: { - type: Array, - value: [], - observer(current) { - if (current && current.length) { - this.createIntersectionObserverHandle(); - } else { - this.clearIntersectionObserverHandle(); - } - }, - }, - specsIconClassPrefix: { - type: String, - value: 'wr', - }, - specsIcon: { - type: String, - value: 'expand_more', - }, - addCartIconClassPrefix: { - type: String, - value: 'wr', - }, - addCartIcon: { - type: String, - value: 'cart', - }, - }, - - data: { - hiddenInData: false, - independentID: '', - goods: { id: '' }, - /** 淇濊瘉鍒掔嚎浠锋牸涓嶅皬浜庡師浠凤紝鍚﹀垯涓嶆覆鏌撳垝绾夸环 */ - isValidityLinePrice: false, - }, - - lifetimes: { - ready() { - this.init(); - }, - detached() { - this.clear(); - }, - }, - - methods: { - clickHandle() { - this.triggerEvent('click', { goods: this.data.goods }); - }, - clickThumbHandle() { - this.triggerEvent('thumb', { goods: this.data.goods }); - }, - clickTagHandle(evt) { - const { index } = evt.currentTarget.dataset; - this.triggerEvent('tag', { goods: this.data.goods, index }); - }, - // 鍔犲叆璐墿杞� - addCartHandle(e) { - const { id } = e.currentTarget; - const { id: cardID } = e.currentTarget.dataset; - this.triggerEvent('add-cart', { - ...e.detail, - id, - cardID, - goods: this.data.goods, - }); - }, - genIndependentID(id, cb) { - let independentID; - if (id) { - independentID = id; - } else { - // `goods-card-88888888` - independentID = `goods-card-${~~(Math.random() * 10 ** 8)}`; - } - this.setData({ independentID }, cb); - }, - - init() { - const { thresholds, id, hidden } = this.properties; - if (hidden !== null) { - this.setHidden(!!hidden); - } - - this.genIndependentID(id || '', () => { - if (thresholds && thresholds.length) { - this.createIntersectionObserverHandle(); - } - }); - }, - - clear() { - this.clearIntersectionObserverHandle(); - }, - - setHidden(hidden) { - this.setData({ hiddenInData: !!hidden }); - }, - - createIntersectionObserverHandle() { - if (this.intersectionObserverContext || !this.data.independentID) { - return; - } - - this.intersectionObserverContext = wx - .createIntersectionObserver(this, { - thresholds: this.properties.thresholds, - }) - .relativeToViewport(); - - this.intersectionObserverContext.observe( - `#${this.data.independentID}`, - (res) => { - this.intersectionObserverCB(res); - }, - ); - }, - intersectionObserverCB(ob) { - this.triggerEvent('ob', { - goods: this.data.goods, - context: this.intersectionObserverContext, - ob, - }); - }, - clearIntersectionObserverHandle() { - if (this.intersectionObserverContext) { - try { - this.intersectionObserverContext.disconnect(); - } catch (e) {} - - this.intersectionObserverContext = null; - } - }, - }, -}); diff --git a/pages/order/components/goods-card/index.json b/pages/order/components/goods-card/index.json deleted file mode 100644 index 0dbb3d8..0000000 --- a/pages/order/components/goods-card/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "component": true, - "usingComponents": { - "price": "/components/price/index", - "t-image": "/components/webp-image/index", - "t-icon": "tdesign-miniprogram/icon/icon" - } -} \ No newline at end of file diff --git a/pages/order/components/goods-card/index.wxml b/pages/order/components/goods-card/index.wxml deleted file mode 100644 index b14aed5..0000000 --- a/pages/order/components/goods-card/index.wxml +++ /dev/null @@ -1,77 +0,0 @@ -<view - id="{{independentID}}" - class="wr-goods-card card-class {{ layout }} {{ centered ? 'center' : ''}}" - bind:tap="clickHandle" - data-goods="{{ goods }}" - hidden="{{hiddenInData}}" -> - <view class="wr-goods-card__main"> - <view class="wr-goods-card__thumb thumb-class" bind:tap="clickThumbHandle"> - <!-- data-src 鏄柟渚垮姞璐姩鐢昏鍙栧浘鐗囩敤鐨� --> - <t-image - t-class="wr-goods-card__thumb-com" - wx:if="{{ !!goods.thumb && !goods.hideKey.thumb }}" - src="{{ goods.thumb }}" - mode="{{ thumbMode }}" - lazy-load="{{ lazyLoad }}" - /> - <slot name="thumb-cover" /> - </view> - - <view class="wr-goods-card__body"> - <view class="wr-goods-card__long_content"> - <view wx:if="{{ goods.title && !goods.hideKey.title }}" class="wr-goods-card__title title-class" style="-webkit-line-clamp: {{ goods.lineClamp }};"> - <slot name="before-title" /> - {{ goods.title }} - </view> - <slot name="after-title" /> - <view wx:if="{{ goods.desc && !goods.hideKey.desc }}" class="wr-goods-card__desc desc-class">{{ goods.desc }}</view> - <slot name="after-desc" /> - <view wx:if="{{ goods.specs && goods.specs.length > 0 && !goods.hideKey.specs }}" class="wr-goods-card__specs__desc specs-class" bind:tap="clickSpecsHandle"> - <view class="wr-goods-card__specs__desc-text">{{ goods.specs }}</view> - </view> - <view class="goods_tips" wx:if="{{goods.stockQuantity !== 0 && goods.quantity >= goods.stockQuantity}}">搴撳瓨涓嶈冻</view> - </view> - - <view class="wr-goods-card__short_content"> - <block wx:if="{{goods.stockQuantity !== 0}}"> - <view wx:if="{{ pricePrefix }}" class="wr-goods-card__price__prefix price-prefix-class">{{ pricePrefix }}</view> - <slot name="price-prefix" /> - <view wx:if="{{ goods.price && !goods.hideKey.price }}" class="wr-goods-card__price"> - <price - wr-class="price-class" - symbol="{{currency}}" - price="{{goods.price}}" - fill="{{priceFill}}" - decimalSmaller - /> - </view> - <view wx:if="{{ goods.originPrice && !goods.hideKey.originPrice && isValidityLinePrice }}" class="wr-goods-card__origin-price"> - <price - wr-class="origin-price-class" - symbol="{{currency}}" - price="{{goods.originPrice}}" - fill="{{priceFill}}" - /> - </view> - <slot name="origin-price" /> - <view wx:if="{{goods.num && !goods.hideKey.num}}" class="wr-goods-card__num num-class"> - <text class="wr-goods-card__num__prefix">x </text> - {{ goods.num }} - </view> - </block> - <block wx:else> - <view class="no_storage"> - <view>璇烽噸鏂伴�夋嫨鍟嗗搧瑙勬牸</view> - <view class="no_storage__right">閲嶉��</view> - </view> - </block> - - </view> - <slot name="append-body" /> - </view> - <slot name="footer" /> - </view> - <slot name="append-card" /> -</view> - diff --git a/pages/order/components/goods-card/index.wxss b/pages/order/components/goods-card/index.wxss deleted file mode 100644 index 7bcb096..0000000 --- a/pages/order/components/goods-card/index.wxss +++ /dev/null @@ -1,254 +0,0 @@ -.wr-goods-card { - box-sizing: border-box; - font-size: 24rpx; -} -.wr-goods-card__main { - position: relative; - display: flex; - line-height: 1; - flex-direction: row; - background: transparent; - padding: 16rpx 0rpx; -} -.wr-goods-card.center .wr-goods-card__main { - align-items: center; - justify-content: center; -} -.wr-goods-card__thumb { - flex-shrink: 0; - position: relative; - width: 176rpx; - height: 176rpx; -} -.wr-goods-card__thumb-com { - width: 176rpx; - height: 176rpx; - border-radius: 8rpx; - overflow: hidden; -} -.wr-goods-card__thumb:empty { - display: none; - margin: 0; -} - -.wr-goods-card__body { - display: flex; - margin: 0 0 0 16rpx; - flex-direction: row; - flex: 1 1 auto; - min-height: 176rpx; -} -.wr-goods-card__long_content { - display: flex; - flex-direction: column; - overflow: hidden; - flex: 1 1 auto; -} -.wr-goods-card__long_content .goods_tips { - width: 100%; - margin-top: 16rpx; - text-align: right; - color: #fa4126; - font-size: 24rpx; - line-height: 32rpx; - font-weight: bold; -} -.wr-goods-card__title { - flex-shrink: 0; - font-size: 28rpx; - color: #333; - line-height: 40rpx; - font-weight: 400; - display: -webkit-box; - -webkit-box-orient: vertical; - overflow: hidden; - word-break: break-word; -} -.wr-goods-card__title__prefix-tags { - display: inline-flex; -} -.wr-goods-card__title__prefix-tags .prefix-tag { - margin: 0 8rpx 0 0; -} -.wr-goods-card__desc { - font-size: 24rpx; - color: #f5f5f5; - line-height: 40rpx; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; -} -.wr-goods-card__specs__desc, -.wr-goods-card__specs__text { - font-size: 24rpx; - height: 32rpx; - line-height: 32rpx; - color: #999999; - margin: 8rpx 0; -} -.wr-goods-card__specs__desc { - display: flex; - align-self: flex-start; - flex-direction: row; -} -.wr-goods-card__specs__desc-text { - height: 100%; - max-width: 380rpx; - word-break: break-all; - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 1; -} -.wr-goods-card__specs__desc-icon { - line-height: inherit; - margin-left: 8rpx; - font-size: 24rpx; - color: #bbb; -} -.wr-goods-card__specs__text { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 1; - overflow: hidden; - text-overflow: ellipsis; - word-break: break-all; -} -.wr-goods-card__tags { - display: flex; - flex-direction: row; - flex-wrap: wrap; - margin: 16rpx 0 0 0; -} -.wr-goods-card__tag { - color: #fa550f; - background: transparent; - font-size: 20rpx; - border: 1rpx solid #fa550f; - padding: 0 8rpx; - height: 30rpx; - line-height: 30rpx; - margin: 0 8rpx 8rpx 0; - display: block; - overflow: hidden; - white-space: nowrap; - word-break: keep-all; - text-overflow: ellipsis; -} -.wr-goods-card__short_content { - display: flex; - flex-direction: column; - justify-content: flex-start; - align-items: flex-end; - margin: 0 0 0 46rpx; -} -.wr-goods-card__price__prefix { - order: 0; - color: #666; - margin: 0; -} -.wr-goods-card__price { - white-space: nowrap; - font-weight: bold; - order: 1; - color: #fa4126; - font-size: 36rpx; - margin: 0; - line-height: 48rpx; -} -.wr-goods-card__origin-price { - white-space: nowrap; - font-weight: normal; - order: 2; - color: #aaaaaa; - font-size: 24rpx; - margin: 0; -} -.wr-goods-card__num { - white-space: nowrap; - order: 4; - font-size: 24rpx; - color: #999; - margin: 20rpx 0 0 auto; -} -.wr-goods-card__num__prefix { - color: inherit; -} -.wr-goods-card__add-cart { - order: 3; - margin: auto 0 0 auto; -} -.wr-goods-card.horizontal-wrap .wr-goods-card__thumb { - width: 192rpx; - height: 192rpx; - border-radius: 8rpx; - overflow: hidden; -} -.wr-goods-card.horizontal-wrap .wr-goods-card__body { - flex-direction: column; -} -.wr-goods-card.horizontal-wrap .wr-goods-card__short_content { - flex-direction: row; - align-items: center; - margin: 16rpx 0 0 0; -} - -.wr-goods-card.horizontal-wrap .wr-goods-card__num { - margin: 0 0 0 auto; -} -.wr-goods-card.vertical .wr-goods-card__main { - padding: 0 0 22rpx 0; - flex-direction: column; -} -.wr-goods-card.vertical .wr-goods-card__thumb { - width: 340rpx; - height: 340rpx; -} -.wr-goods-card.vertical .wr-goods-card__body { - margin: 20rpx 20rpx 0 20rpx; - flex-direction: column; -} -.wr-goods-card.vertical .wr-goods-card__long_content { - overflow: hidden; -} -.wr-goods-card.vertical .wr-goods-card__title { - line-height: 36rpx; -} -.wr-goods-card.vertical .wr-goods-card__short_content { - margin: 20rpx 0 0 0; -} -.wr-goods-card.vertical .wr-goods-card__price { - order: 2; - color: #fa4126; - margin: 20rpx 0 0 0; -} -.wr-goods-card.vertical .wr-goods-card__origin-price { - order: 1; -} -.wr-goods-card.vertical .wr-goods-card__add-cart { - position: absolute; - bottom: 20rpx; - right: 20rpx; -} - -.wr-goods-card__short_content .no_storage { - display: flex; - align-items: center; - justify-content: space-between; - height: 40rpx; - color: #333; - font-size: 24rpx; - line-height: 32rpx; - width: 100%; -} - -.no_storage .no_storage__right { - width: 80rpx; - height: 40rpx; - border-radius: 20rpx; - border: 2rpx solid #fa4126; - line-height: 40rpx; - text-align: center; - color: #fa4126; -} diff --git a/pages/order/components/noGoods/noGood.wxs b/pages/order/components/noGoods/noGood.wxs deleted file mode 100644 index f9b13d0..0000000 --- a/pages/order/components/noGoods/noGood.wxs +++ /dev/null @@ -1,17 +0,0 @@ -var isOnlyBack = function (data) { - return data.limitGoodsList || (data.inValidGoodsList && !data.storeGoodsList); -}; - -var isShowChangeAddress = function (data) { - return data.abnormalDeliveryGoodsList; -}; - -var isShowKeepPay = function (data) { - return data.outOfStockGoodsList || (data.storeGoodsList && data.inValidGoodsList); -}; - -module.exports = { - isOnlyBack: isOnlyBack, - isShowChangeAddress: isShowChangeAddress, - isShowKeepPay: isShowKeepPay, -}; diff --git a/pages/order/components/noGoods/noGoods.js b/pages/order/components/noGoods/noGoods.js deleted file mode 100644 index 53b6f86..0000000 --- a/pages/order/components/noGoods/noGoods.js +++ /dev/null @@ -1,57 +0,0 @@ -Component({ - properties: { - settleDetailData: { - type: Object, - value: {}, - observer(settleDetailData) { - const { - outOfStockGoodsList, - abnormalDeliveryGoodsList, - inValidGoodsList, - limitGoodsList, - } = settleDetailData; - // 寮圭獥閫昏緫 闄愯喘 瓒呭嚭閰嶉�佽寖鍥� 澶辨晥 搴撳瓨涓嶈冻; - const tempList = - limitGoodsList || - abnormalDeliveryGoodsList || - inValidGoodsList || - outOfStockGoodsList || - []; - - tempList.forEach((goods, index) => { - goods.id = index; - goods.unSettlementGoods && - goods.unSettlementGoods.forEach((ele) => { - ele.name = ele.goodsName; - ele.price = ele.payPrice; - ele.imgUrl = ele.image; - }); - }); - this.setData({ - // settleDetailData, - goodsList: tempList, - }); - }, - }, - }, - - data: { - goodList: [], - }, - methods: { - onCard(e) { - const { item } = e.currentTarget.dataset; - if (item === 'cart') { - // 璐墿杞� - Navigator.gotoPage('/cart'); - } else if (item === 'orderSure') { - // 缁撶畻椤� - this.triggerEvent('change', undefined); - } - }, - onDelive() { - // 淇敼閰嶉�佸湴鍧� - Navigator.gotoPage('/address', { type: 'orderSure' }); - }, - }, -}); diff --git a/pages/order/components/noGoods/noGoods.json b/pages/order/components/noGoods/noGoods.json deleted file mode 100644 index 31f62da..0000000 --- a/pages/order/components/noGoods/noGoods.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "component": true, - "usingComponents": { - "wr-order-card": "/pages/order/components/order-card/index", - "wr-goods-card": "/components/goods-card/index", - "wr-order-goods-card": "/pages/order/components/order-goods-card/index" - } -} \ No newline at end of file diff --git a/pages/order/components/noGoods/noGoods.wxml b/pages/order/components/noGoods/noGoods.wxml deleted file mode 100644 index 04cc10a..0000000 --- a/pages/order/components/noGoods/noGoods.wxml +++ /dev/null @@ -1,53 +0,0 @@ -<wxs src="./noGood.wxs" module="order" /> - -<view class="goods-fail"> - <block wx:if="{{settleDetailData.limitGoodsList && settleDetailData.limitGoodsList.length >0}}"> - <view class="title">闄愯喘鍟嗗搧淇℃伅</view> - <view class="info">浠ヤ笅鍟嗗搧闄愯喘鏁伴噺锛屽缓璁偍淇敼鍟嗗搧鏁伴噺</view> - </block> - <block - wx:elif="{{settleDetailData.abnormalDeliveryGoodsList && settleDetailData.abnormalDeliveryGoodsList.length >0}}" - > - <view class="title">涓嶆敮鎸侀厤閫�</view> - <view class="info">浠ヤ笅搴楅摵鐨勫晢鍝佷笉鏀寔閰嶉�侊紝璇锋洿鏀瑰湴鍧�鎴栧幓鎺夊搴斿簵閾哄晢鍝佸啀杩涜缁撶畻</view> - </block> - <block wx:elif="{{order.isShowKeepPay(settleDetailData)}}"> - <view class="title">閮ㄥ垎鍟嗗搧搴撳瓨涓嶈冻鎴栧け鏁�</view> - <view class="info">璇疯繑鍥炶喘鐗╄溅閲嶆柊閫夋嫨鍟嗗搧锛屽鏋滅户缁粨绠楀皢鑷姩蹇界暐搴撳瓨涓嶈冻鎴栧け鏁堢殑鍟嗗搧銆�</view> - </block> - <block wx:elif="{{settleDetailData.inValidGoodsList && settleDetailData.inValidGoodsList.length > 0}}"> - <view class="title">鍏ㄩ儴鍟嗗搧搴撳瓨涓嶈冻鎴栧け鏁�</view> - <view class="info">璇疯繑鍥炶喘鐗╄溅閲嶆柊閫夋嫨鍟嗗搧</view> - </block> - <scroll-view - scroll-y="true" - style="max-height: 500rpx" - bindscrolltoupper="upper" - bindscrolltolower="lower" - bindscroll="scroll" - > - <view class="goods-list" wx:for="{{goodsList}}" wx:for-item="goods" wx:key="index"> - <wr-order-card wx:if="{{goods}}" order="{{goods}}"> - <wr-order-goods-card - wx:for="{{goods.unSettlementGoods}}" - wx:key="id" - wx:for-item="goods" - wx:for-index="gIndex" - goods="{{goods}}" - no-top-line="{{gIndex === 0}}" - /> - </wr-order-card> - </view> - </scroll-view> - <view class="goods-fail-btn"> - <view bindtap="onCard" data-item="cart" class="btn {{order.isOnlyBack(settleDetailData) ? 'limit' : ''}}"> - 杩斿洖璐墿杞� - </view> - <view wx:if="{{order.isShowChangeAddress(settleDetailData)}}" bindtap="onDelive" class="btn origin"> - 淇敼閰嶉�佸湴鍧� - </view> - <view wx:elif="{{order.isShowKeepPay(settleDetailData)}}" bindtap="onCard" data-item="orderSure" class="btn origin"> - 缁х画缁撶畻 - </view> - </view> -</view> diff --git a/pages/order/components/noGoods/noGoods.wxss b/pages/order/components/noGoods/noGoods.wxss deleted file mode 100644 index 0331d40..0000000 --- a/pages/order/components/noGoods/noGoods.wxss +++ /dev/null @@ -1,68 +0,0 @@ -/* 灞傜骇瀹氫箟 -@z-index-0: 1; -@z-index-1: 100; -@z-index-2: 200; -@z-index-5: 500; -@z-index-component: 1000; // 閫氱敤缁勪欢绾у埆 -@z-index-dropdown: @z-index-component; -@z-index-sticky: @z-index-component + 20; -@z-index-fixed: @z-index-component + 30; -@z-index-modal-backdrop:@z-index-component + 40; -@z-index-modal:@z-index-component + 50; -@z-index-popover:@z-index-component + 60; -@z-index-tooltip:@z-index-component + 70; -*/ -/* var() css鍙橀噺閫傞厤*/ -.goods-fail { - display: block; - background: #fff; - font-size: 30rpx; - border-radius: 20rpx 20rpx 0 0; -} -.goods-fail .title { - display: inline-block; - width: 100%; - text-align: center; - margin-top: 30rpx; - line-height: 42rpx; - font-weight: bold; - font-size: 32rpx; -} -.goods-fail .info { - display: block; - font-size: 26rpx; - font-weight: 400; - line-height: 36rpx; - margin: 20rpx auto 10rpx; - text-align: center; - width: 560rpx; - color: #999; -} -.goods-fail .goods-fail-btn { - display: flex; - padding: 30rpx; - justify-content: space-between; - align-items: center; - font-size: 30rpx; -} -.goods-fail .goods-fail-btn .btn { - width: 330rpx; - height: 80rpx; - line-height: 80rpx; - border-radius: 8rpx; - text-align: center; - border: 1rpx solid #999; - background: #fff; - font-size: 32rpx; - color: #666; -} -.goods-fail .goods-fail-btn .btn.origin, -.goods-fail .goods-fail-btn .btn.limit { - color: #fa550f; - color: var(--color-primary, #fa550f); - border: 1rpx solid #fa550f; - border: 1rpx solid var(--color-primary, #fa550f); -} -.goods-fail .goods-fail-btn .btn.limit { - flex-grow: 1; -} diff --git a/pages/order/components/order-button-bar/index.js b/pages/order/components/order-button-bar/index.js deleted file mode 100644 index a01e307..0000000 --- a/pages/order/components/order-button-bar/index.js +++ /dev/null @@ -1,210 +0,0 @@ -import Toast from 'tdesign-miniprogram/toast/index'; -import Dialog from 'tdesign-miniprogram/dialog/index'; -import { OrderButtonTypes } from '../../config'; - -Component({ - options: { - addGlobalClass: true, - }, - properties: { - order: { - type: Object, - observer(order) { - // 鍒ゅ畾鏈変紶goodsIndex 锛屽垯璁や负鏄晢鍝乥utton bar, 浠呮樉绀虹敵璇峰敭鍚庢寜閽� - if (this.properties?.goodsIndex !== null) { - const goods = order.goodsList[Number(this.properties.goodsIndex)]; - this.setData({ - buttons: { - left: [], - right: (goods.buttons || []).filter((b) => b.type == OrderButtonTypes.APPLY_REFUND), - }, - }); - return; - } - // 璁㈠崟鐨刡utton bar 涓嶆樉绀虹敵璇峰敭鍚庢寜閽� - const buttonsRight = (order.buttons || []) - // .filter((b) => b.type !== OrderButtonTypes.APPLY_REFUND) - .map((button) => { - //閭�璇峰ソ鍙嬫嫾鍥㈡寜閽� - if (button.type === OrderButtonTypes.INVITE_GROUPON && order.groupInfoVo) { - const { - groupInfoVo: { groupId, promotionId, remainMember, groupPrice }, - goodsList, - } = order; - const goodsImg = goodsList[0] && goodsList[0].imgUrl; - const goodsName = goodsList[0] && goodsList[0].name; - return { - ...button, - openType: 'share', - dataShare: { - goodsImg, - goodsName, - groupId, - promotionId, - remainMember, - groupPrice, - storeId: order.storeId, - }, - }; - } - return button; - }); - // 鍒犻櫎璁㈠崟鎸夐挳鍗曠嫭鎸埌宸︿晶 - const deleteBtnIndex = buttonsRight.findIndex((b) => b.type === OrderButtonTypes.DELETE); - let buttonsLeft = []; - if (deleteBtnIndex > -1) { - buttonsLeft = buttonsRight.splice(deleteBtnIndex, 1); - } - this.setData({ - buttons: { - left: buttonsLeft, - right: buttonsRight, - }, - }); - }, - }, - goodsIndex: { - type: Number, - value: null, - }, - isBtnMax: { - type: Boolean, - value: false, - }, - }, - - data: { - order: {}, - buttons: { - left: [], - right: [], - }, - }, - - methods: { - // 鐐瑰嚮銆愯鍗曟搷浣溿�戞寜閽紝鏍规嵁鎸夐挳绫诲瀷鍒嗗彂 - onOrderBtnTap(e) { - const { type } = e.currentTarget.dataset; - switch (type) { - case OrderButtonTypes.DELETE: - this.onDelete(this.data.order); - break; - case OrderButtonTypes.CANCEL: - this.onCancel(this.data.order); - break; - case OrderButtonTypes.CONFIRM: - this.onConfirm(this.data.order); - break; - case OrderButtonTypes.PAY: - this.onPay(this.data.order); - break; - case OrderButtonTypes.APPLY_REFUND: - this.onApplyRefund(this.data.order); - break; - case OrderButtonTypes.VIEW_REFUND: - this.onViewRefund(this.data.order); - break; - case OrderButtonTypes.COMMENT: - this.onAddComment(this.data.order); - break; - case OrderButtonTypes.INVITE_GROUPON: - //鍒嗕韩閭�璇峰ソ鍙嬫嫾鍥� - break; - case OrderButtonTypes.REBUY: - this.onBuyAgain(this.data.order); - } - }, - - onCancel() { - Toast({ - context: this, - selector: '#t-toast', - message: '浣犵偣鍑讳簡鍙栨秷璁㈠崟', - icon: 'check-circle', - }); - }, - - onConfirm() { - Dialog.confirm({ - title: '纭鏄惁宸茬粡鏀跺埌璐э紵', - content: '', - confirmBtn: '纭鏀惰揣', - cancelBtn: '鍙栨秷', - }) - .then(() => { - Toast({ - context: this, - selector: '#t-toast', - message: '浣犵‘璁や簡纭鏀惰揣', - icon: 'check-circle', - }); - }) - .catch(() => { - Toast({ - context: this, - selector: '#t-toast', - message: '浣犲彇娑堜簡纭鏀惰揣', - icon: 'check-circle', - }); - }); - }, - - onPay() { - Toast({ - context: this, - selector: '#t-toast', - message: '浣犵偣鍑讳簡鍘绘敮浠�', - icon: 'check-circle', - }); - }, - - onBuyAgain() { - Toast({ - context: this, - selector: '#t-toast', - message: '浣犵偣鍑讳簡鍐嶆璐拱', - icon: 'check-circle', - }); - }, - - onApplyRefund(order) { - const goods = order.goodsList[this.properties.goodsIndex]; - const params = { - orderNo: order.orderNo, - skuId: goods?.skuId ?? '19384938948343', - spuId: goods?.spuId ?? '28373847384343', - orderStatus: order.status, - logisticsNo: order.logisticsNo, - price: goods?.price ?? 89, - num: goods?.num ?? 89, - createTime: order.createTime, - orderAmt: order.totalAmount, - payAmt: order.amount, - canApplyReturn: true, - }; - const paramsStr = Object.keys(params) - .map((k) => `${k}=${params[k]}`) - .join('&'); - wx.navigateTo({ url: `/pages/order/apply-service/index?${paramsStr}` }); - }, - - onViewRefund() { - Toast({ - context: this, - selector: '#t-toast', - message: '浣犵偣鍑讳簡鏌ョ湅閫�娆�', - icon: '', - }); - }, - - /** 娣诲姞璁㈠崟璇勮 */ - onAddComment(order) { - const imgUrl = order?.goodsList?.[0]?.thumb; - const title = order?.goodsList?.[0]?.title; - const specs = order?.goodsList?.[0]?.specs; - wx.navigateTo({ - url: `/pages/goods/comments/create/index?specs=${specs}&title=${title}&orderNo=${order?.orderNo}&imgUrl=${imgUrl}`, - }); - }, - }, -}); diff --git a/pages/order/components/order-button-bar/index.json b/pages/order/components/order-button-bar/index.json deleted file mode 100644 index 3084bb3..0000000 --- a/pages/order/components/order-button-bar/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-button": "tdesign-miniprogram/button/button", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-dialog": "tdesign-miniprogram/dialog/dialog" - } -} \ No newline at end of file diff --git a/pages/order/components/order-button-bar/index.wxml b/pages/order/components/order-button-bar/index.wxml deleted file mode 100644 index 492b87a..0000000 --- a/pages/order/components/order-button-bar/index.wxml +++ /dev/null @@ -1,37 +0,0 @@ -<view class="btn-bar"> - <view class="left"> - <t-button - wx:for="{{buttons.left}}" - wx:key="type" - wx:for-item="leftBtn" - size="extra-small" - shape="round" - t-class="{{isBtnMax ? 't-button--max':'t-button'}} order-btn delete-btn" - hover-class="order-btn--active" - catchtap="onOrderBtnTap" - data-type="{{leftBtn.type}}" - > - {{leftBtn.name}} - </t-button> - </view> - <view class="right"> - <t-button - wx:for="{{buttons.right}}" - wx:key="type" - wx:for-item="rightBtn" - size="extra-small" - variant="{{ rightBtn.primary ? 'base' : 'outline'}}" - shape="round" - t-class="{{isBtnMax ? 't-button--max':'t-button'}} order-btn {{rightBtn.primary ? 'primary' : 'normal'}}" - hover-class="order-btn--active" - catchtap="onOrderBtnTap" - data-type="{{rightBtn.type}}" - open-type="{{ rightBtn.openType }}" - data-share="{{ rightBtn.dataShare }}" - > - {{rightBtn.name}} - </t-button> - </view> -</view> -<t-toast id="t-toast" /> -<t-dialog id="t-dialog" /> diff --git a/pages/order/components/order-button-bar/index.wxss b/pages/order/components/order-button-bar/index.wxss deleted file mode 100644 index 73385a2..0000000 --- a/pages/order/components/order-button-bar/index.wxss +++ /dev/null @@ -1,54 +0,0 @@ -:host { - width: 100%; -} -.btn-bar { - display: flex; - justify-content: space-between; - align-items: center; - line-height: 1; -} -.btn-bar .order-btn { - line-height: 1; - /* border-radius: unset; */ - /* min-width: 160rpx; */ -} - -.btn-bar .right { - display: flex; - align-items: center; -} -.btn-bar .t-button { - width: 160rpx; - font-weight: 400; - margin-left: 24rpx; -} -.btn-bar .t-button--max { - width: 176rpx; - margin-left: 24rpx; - - --td-button-extra-small-height: 72rpx; -} - -.btn-bar .left .delete-btn { - font-size: 22rpx; -} -.btn-bar .left .delete-btn::after { - display: none; -} - -.btn-bar .right .normal { - --td-button-default-color: #333333; - --td-button-default-border-color: #dddddd; -} - -.btn-bar .right .primary { - --td-button-default-color: #fff; - --td-button-default-bg-color: #fa4126; - --td-button-default-border-color: #fa4126; - --td-button-default-active-bg-color: #fa42269c; -} - -.t-button { - --td-button-default-color: #000; - --td-button-primary-text-color: #fa4126; -} diff --git a/pages/order/components/order-card/index.js b/pages/order/components/order-card/index.js deleted file mode 100644 index 636e66d..0000000 --- a/pages/order/components/order-card/index.js +++ /dev/null @@ -1,90 +0,0 @@ -Component({ - externalClasses: ['wr-class', 'header-class', 'title-class'], - - options: { - multipleSlots: true, - }, - - relations: { - '../order-goods-card/index': { - type: 'descendant', - linked(target) { - this.children.push(target); - this.setHidden(); - }, - unlinked(target) { - this.children = this.children.filter((item) => item !== target); - }, - }, - '../goods-card/index': { - type: 'descendant', - linked(target) { - this.children.push(target); - this.setHidden(); - }, - unlinked(target) { - this.children = this.children.filter((item) => item !== target); - }, - }, - '../specs-goods-card/index': { - type: 'descendant', - linked(target) { - this.children.push(target); - this.setHidden(); - }, - unlinked(target) { - this.children = this.children.filter((item) => item !== target); - }, - }, - }, - - created() { - this.children = []; - }, - - properties: { - order: { - type: Object, - observer(order) { - if (!order?.goodsList) return; - const goodsCount = order.goodsList.length; - this.setData({ - goodsCount, - }); - }, - }, - useTopRightSlot: Boolean, - // 鍒濆鏄剧ず鐨勫晢鍝佹暟閲忥紝瓒呭嚭閮ㄥ垎浼氶殣钘忋�� - defaultShowNum: { - type: null, - value: 10, - }, - useLogoSlot: { - type: Boolean, - value: false, - }, - }, - - data: { - showAll: true, // 鏄惁灞曠ず鎵�鏈夊晢鍝侊紝璁剧疆涓篺alse锛屽彲浠ヤ娇鐢ㄥ睍寮�鏇村鍔熻兘 - goodsCount: 0, - }, - - methods: { - setHidden() { - const isHidden = !this.data.showAll; - this.children.forEach( - (c, i) => i >= this.properties.defaultShowNum && c.setHidden(isHidden), - ); - }, - - onOrderCardTap() { - this.triggerEvent('cardtap'); - }, - - onShowMoreTap() { - this.setData({ showAll: true }, () => this.setHidden()); - this.triggerEvent('showall'); - }, - }, -}); diff --git a/pages/order/components/order-card/index.json b/pages/order/components/order-card/index.json deleted file mode 100644 index 8c3cde6..0000000 --- a/pages/order/components/order-card/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-image": "/components/webp-image/index", - "t-icon": "tdesign-miniprogram/icon/icon" - } -} \ No newline at end of file diff --git a/pages/order/components/order-card/index.wxml b/pages/order/components/order-card/index.wxml deleted file mode 100644 index 21f32d0..0000000 --- a/pages/order/components/order-card/index.wxml +++ /dev/null @@ -1,30 +0,0 @@ -<view class="order-card wr-class" bind:tap="onOrderCardTap"> - <view class="header header-class"> - <view class="store-name title-class"> - <block wx:if="{{!useLogoSlot}}"> - <t-image wx:if="{{order.storeLogo}}" t-class="store-name__logo" src="{{order.storeLogo}}" /> - <t-icon - wx:else - prefix="wr" - class="store-name__logo" - name="store" - size="inherit" - color="inherit" - /> - <view class="store-name__label">{{order.storeName}}</view> - </block> - <slot wx:else name="top-left" /> - </view> - <view wx:if="{{!useTopRightSlot}}" class="order-status">{{order.statusDesc}}</view> - <slot wx:else name="top-right" /> - </view> - <view class="slot-wrapper"> - <slot/> - </view> - <view wx:if="{{goodsCount > defaultShowNum && !showAll}}" class="more-mask" catchtap="onShowMoreTap"> - 灞曞紑鍟嗗搧淇℃伅锛堝叡 {{goodsCount}} 涓級 - <t-icon name="chevron-down" size="32rpx" /> - </view> - <slot name="more" /> -</view> - diff --git a/pages/order/components/order-card/index.wxss b/pages/order/components/order-card/index.wxss deleted file mode 100644 index d241796..0000000 --- a/pages/order/components/order-card/index.wxss +++ /dev/null @@ -1,45 +0,0 @@ -.order-card { - margin: 24rpx 0; - padding: 24rpx 32rpx 24rpx; - background-color: white; - border-radius: 8rpx; -} -.order-card .header { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 24rpx; -} -.order-card .header .store-name { - font-size: 28rpx; - font-weight: normal; - color: #333333; - display: flex; - align-items: center; - line-height: 40rpx; -} -.order-card .header .store-name__logo { - margin-right: 16rpx; - font-size: 40rpx; - width: 48rpx; - height: 48rpx; -} -.order-card .header .store-name__label { - max-width: 500rpx; - overflow: hidden; - text-overflow: ellipsis; - word-break: break-all; - white-space: nowrap; -} -.order-card .header .order-status { - font-size: 26rpx; - line-height: 40rpx; - color: #fa4126; -} -.order-card .more-mask { - padding: 20rpx 0; - text-align: center; - background-color: white; - color: #fa4126; - font-size: 24rpx; -} diff --git a/pages/order/components/order-goods-card/index.js b/pages/order/components/order-goods-card/index.js deleted file mode 100644 index edaf299..0000000 --- a/pages/order/components/order-goods-card/index.js +++ /dev/null @@ -1,43 +0,0 @@ -Component({ - options: { - addGlobalClass: true, - multipleSlots: true, // 鍦ㄧ粍浠跺畾涔夋椂鐨勯�夐」涓惎鐢ㄥslot鏀寔 - }, - - relations: { - '../order-card/index': { - type: 'ancestor', - linked(target) { - this.parent = target; - }, - }, - }, - - properties: { - goods: Object, - thumbWidth: Number, - thumbHeight: Number, - thumbWidthInPopup: Number, - thumbHeightInPopup: Number, - noTopLine: Boolean, - step: Boolean, - stepDisabled: Boolean, - }, - - data: { - goods: {}, - hidden: false, - }, - - methods: { - setHidden(hidden) { - if (this.data.hidden === hidden) return; - this.setData({ hidden }); - }, - - onNumChange(e) { - const { value } = e.detail; - this.triggerEvent('num-change', { value }); - }, - }, -}); diff --git a/pages/order/components/order-goods-card/index.json b/pages/order/components/order-goods-card/index.json deleted file mode 100644 index 7743bba..0000000 --- a/pages/order/components/order-goods-card/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-stepper": "tdesign-miniprogram/stepper/stepper", - "goods-card": "../specs-goods-card/index" - } -} \ No newline at end of file diff --git a/pages/order/components/order-goods-card/index.wxml b/pages/order/components/order-goods-card/index.wxml deleted file mode 100644 index 59778e8..0000000 --- a/pages/order/components/order-goods-card/index.wxml +++ /dev/null @@ -1,29 +0,0 @@ -<goods-card - class="order-goods-card {{ step ? 'order-goods-card--step' : '' }}" - wx:if="{{!hidden}}" - data="{{goods}}" - thumb-width="{{thumbWidth}}" - thumb-height="{{thumbHeight}}" - thumb-width-in-popup="{{thumbWidthInPopup}}" - thumb-height-in-popup="{{thumbHeightInPopup}}" -> - <t-stepper - wx:if="{{ step }}" - slot="append-body" - disabled="{{ step ? stepDisabled : ''}}" - value="{{goods.quantity}}" - min="{{ 1 }}" - theme="filled" - bindminus="onNumChange" - bindplus="onNumChange" - bindblur="onNumChange" - /> - <!-- 閫忎紶good-card缁勪欢鐨剆lot --> - <slot name="thumb-cover" slot="thumb-cover" /> - <slot name="after-title" slot="after-title" /> - <slot name="after-desc" slot="after-desc" /> - <slot name="price-prefix" slot="price-prefix" /> - <slot name="append-body" slot="append-body" /> - <slot name="footer" slot="footer" /> - <slot name="append-card" slot="append-card" /> -</goods-card> diff --git a/pages/order/components/reason-sheet/index.js b/pages/order/components/reason-sheet/index.js deleted file mode 100644 index e5741e6..0000000 --- a/pages/order/components/reason-sheet/index.js +++ /dev/null @@ -1,114 +0,0 @@ -Component({ - properties: { - show: Boolean, - title: String, - options: { - type: Object, - observer() { - this.init(); - }, - }, - multiple: { - type: Boolean, - observer() { - this.init(); - }, - }, - showConfirmButton: Boolean, - showCloseButton: Boolean, - confirmButtonText: { - type: String, - value: '纭畾', - }, - cancelButtonText: { - type: String, - value: '鍙栨秷', - }, - emptyTip: { - type: String, - value: '璇烽�夋嫨', - }, - }, - - data: { - _options: [], - checkedIndexes: [], - }, - - methods: { - attached() { - this.toast = this.selectComponent('#t-toast'); - }, - - init() { - const checkedIndexes = []; - const _options = this.properties.options.map((opt, i) => { - const checked = !!opt.checked; - if (checked) { - if (this.properties.multiple) checkedIndexes[0] = i; - else checkedIndexes.push(i); - } - return { - title: opt.title, - checked, - }; - }); - this.setData({ checkedIndexes, _options }); - }, - - onOptionTap(e) { - const { index } = e.currentTarget.dataset; - const { checkedIndexes } = this.data; - let data = {}; - if (this.properties.multiple) { - if (checkedIndexes.includes(index)) { - checkedIndexes.splice(index, 1); - data = { checkedIndexes, [`_options[${index}].checked`]: false }; - } else { - checkedIndexes.push(index); - data = { checkedIndexes, [`_options[${index}].checked`]: true }; - } - } else { - if (checkedIndexes[0] === index) { - // 鍗曢�変笉鍙彇娑堥�夋嫨 - return; - } - data = { - [`_options[${index}].checked`]: true, - checkedIndexes: [index], - }; - if (checkedIndexes[0] !== undefined) { - data[`_options[${checkedIndexes[0]}].checked`] = false; - } - } - this.setData(data); - this.triggerEvent('select', { index }); - this._onOptionTap && this._onOptionTap(index); - if (!this.properties.showConfirmButton && !this.properties.multiple) { - // 娌℃湁纭鎸夐挳涓旀槸鍗曢�夌殑鎯呭喌涓嬶紝閫夋嫨閫夐」鍒欒嚜鍔ㄧ‘瀹� - this._onConfirm && this._onConfirm([index]); - this.setData({ show: false }); - } - }, - - onCancel() { - this.triggerEvent('cancel'); - this._onCancel && this._onCancel(); - this.setData({ show: false }); - }, - - onConfirm() { - if (this.data.checkedIndexes.length === 0) { - this.toast.show({ - icon: '', - text: this.properties.emptyTip, - }); - return; - } - const indexed = this.data.checkedIndexes; - this.triggerEvent('confirm', { indexed }); - this._onConfirm && this._onConfirm(indexed); - this.setData({ show: false }); - }, - }, -}); diff --git a/pages/order/components/reason-sheet/index.json b/pages/order/components/reason-sheet/index.json deleted file mode 100644 index a22be6b..0000000 --- a/pages/order/components/reason-sheet/index.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon", - "t-popup": "tdesign-miniprogram/popup/popup", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-button": "tdesign-miniprogram/button/button" - } -} \ No newline at end of file diff --git a/pages/order/components/reason-sheet/index.wxml b/pages/order/components/reason-sheet/index.wxml deleted file mode 100644 index 35a5df2..0000000 --- a/pages/order/components/reason-sheet/index.wxml +++ /dev/null @@ -1,50 +0,0 @@ -<t-popup - visible="{{show}}" - placement="bottom" - bind:visible-change="onCancel" - close-btn="{{showCloseButton}}" -> - <view class="popup-content"> - <view class="header"> - {{title}} - </view> - <view class="options"> - <t-cell - wx:for="{{_options}}" - wx:key="title" - t-class="cell" - title="{{item.title}}" - bindclick="onOptionTap" - data-index="{{index}}" - border="{{false}}" - > - <view slot="right-icon"> - <t-icon - name="check-circle-filled" - size="36rpx" - color="#fa4126" - wx:if="{{item.checked}}" - /> - <t-icon - name="circle" - size="36rpx" - color="#C7C7C7" - wx:else - /> - </view> - </t-cell> - </view> - <view class="button-bar" wx:if="{{showConfirmButton}}"> - <t-button - class="btnWrapper" - wx:if="{{showConfirmButton}}" - t-class="btn" - bindtap="onConfirm" - > - {{confirmButtonText}} - </t-button> - </view> - </view> -</t-popup> -<t-toast id="t-toast" /> - diff --git a/pages/order/components/reason-sheet/index.wxss b/pages/order/components/reason-sheet/index.wxss deleted file mode 100644 index ed92d44..0000000 --- a/pages/order/components/reason-sheet/index.wxss +++ /dev/null @@ -1,47 +0,0 @@ -page view { - box-sizing: border-box; -} -.popup-content { - background-color: white; - color: #222427; - border-radius: 20rpx 20rpx 0 0; - overflow: hidden; -} -.popup-content .header { - height: 100rpx; - line-height: 100rpx; - text-align: center; - vertical-align: middle; - font-size: 32rpx; - font-weight: bold; - position: relative; -} -.popup-content .options { - max-height: 60vh; - overflow-y: scroll; - -webkit-overflow-scrolling: touch; -} -.popup-content .options .cell { - height: 100rpx; - align-items: center; - font-size: 30rpx; - color: #333333; -} -.popup-content .button-bar { - width: 100%; - padding: 20rpx 30rpx; - display: flex; - flex-wrap: nowrap; - align-items: center; - justify-content: space-between; - padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); -} -.popup-content .button-bar .btn { - width: 100%; - background: #fa4126; - color: #fff; - border-radius: 48rpx; -} -.button-bar .btnWrapper { - width: 100%; -} diff --git a/pages/order/components/reason-sheet/reasonSheet.js b/pages/order/components/reason-sheet/reasonSheet.js deleted file mode 100644 index 384f68f..0000000 --- a/pages/order/components/reason-sheet/reasonSheet.js +++ /dev/null @@ -1,25 +0,0 @@ -function getInstance(context, selector = '#wr-reason-sheet') { - if (!context) { - const pages = getCurrentPages(); - const page = pages[pages.length - 1]; - context = page; - } - const instance = context && context.selectComponent(selector); - if (!instance) { - console.warn(`鏈壘鍒皉eason-sheet缁勪欢,璇锋鏌elector鏄惁姝g‘`); - return null; - } - return instance; -} - -export default function (options) { - const { context, selector, ..._options } = options; - return new Promise((resolve, reject) => { - const instance = getInstance(context, selector); - if (instance) { - instance.setData(Object.assign({}, _options)); - instance._onCancel = () => reject(); - instance._onConfirm = (indexes) => resolve(indexes); - } - }); -} diff --git a/pages/order/components/selectCoupons/mock.js b/pages/order/components/selectCoupons/mock.js deleted file mode 100644 index 6e67895..0000000 --- a/pages/order/components/selectCoupons/mock.js +++ /dev/null @@ -1,22 +0,0 @@ -export const couponsData = { - couponResultList: [ - { - couponVO: { - condition: '婊�200鍏冨彲鐢�', - couponId: 11, - endTime: 1584530282686, - name: '鎶樻墸鍒�', - profit: '5.5鎶�', - promotionCode: 90, - promotionSubCode: 1, - scopeText: '閮ㄥ垎鍟嗗搧鍙敤', - startTime: 1584530282686, - storeId: 90, - value: 550, - type: 2, - }, - status: 0, // 0:鏈嬀閫夈��1:鍕鹃�夈��-1:缃伆 - }, - ], - reduce: 1000, -}; diff --git a/pages/order/components/selectCoupons/selectCoupon.wxs b/pages/order/components/selectCoupons/selectCoupon.wxs deleted file mode 100644 index 8c4ce2e..0000000 --- a/pages/order/components/selectCoupons/selectCoupon.wxs +++ /dev/null @@ -1,16 +0,0 @@ -function formatDays(value) { - if (value < 10) { - return '0' + value; - } - return value; -} -var dateFormat = function (d) { - var date = getDate(+d); - return ( - date.getFullYear() + - '-' + - formatDays(date.getMonth() + 1) + - formatDays(date.getDate()) - ); -}; -module.exports.dateFormat = dateFormat; diff --git a/pages/order/components/selectCoupons/selectCoupons.js b/pages/order/components/selectCoupons/selectCoupons.js deleted file mode 100644 index 235ffba..0000000 --- a/pages/order/components/selectCoupons/selectCoupons.js +++ /dev/null @@ -1,160 +0,0 @@ -import dayjs from 'dayjs'; -import { couponsData } from './mock'; - -const emptyCouponImg = `https://cdn-we-retail.ym.tencent.com/miniapp/coupon/ordersure-coupon-newempty.png`; - -Component({ - properties: { - storeId: String, - promotionGoodsList: { - type: Array, - value: [], - }, - orderSureCouponList: { - type: Array, - value: [], - }, - couponsShow: { - type: Boolean, - value: false, - observer(couponsShow) { - if (couponsShow) { - const { promotionGoodsList, orderSureCouponList, storeId } = - this.data; - const products = - promotionGoodsList && - promotionGoodsList.map((goods) => { - this.storeId = goods.storeId; - return { - skuId: goods.skuId, - spuId: goods.spuId, - storeId: goods.storeId, - selected: true, - quantity: goods.num, - prices: { - sale: goods.settlePrice, - }, - }; - }); - const selectedCoupons = - orderSureCouponList && - orderSureCouponList.map((ele) => { - return { - promotionId: ele.promotionId, - storeId: ele.storeId, - couponId: ele.couponId, - }; - }); - this.setData({ - products, - }); - this.coupons({ - products, - selectedCoupons, - storeId, - }).then((res) => { - this.initData(res); - }); - } - }, - }, - }, - data: { - emptyCouponImg, - goodsList: [], - selectedList: [], - couponsList: [], - orderSureCouponList: [], - promotionGoodsList: [], - }, - methods: { - initData(data = {}) { - const { couponResultList = [], reduce = 0 } = data; - const selectedList = []; - let selectedNum = 0; - const couponsList = - couponResultList && - couponResultList.map((coupon) => { - const { status, couponVO } = coupon; - const { - couponId, - condition = '', - endTime = 0, - name = '', - startTime = 0, - value, - type, - } = couponVO; - if (status === 1) { - selectedNum++; - selectedList.push({ - couponId, - promotionId: ruleId, - storeId: this.storeId, - }); - } - const val = type === 2 ? value / 100 : value / 10; - return { - key: couponId, - title: name, - isSelected: false, - timeLimit: `${dayjs(+startTime).format('YYYY-MM-DD')}-${dayjs( - +endTime, - ).format('YYYY-MM-DD')}`, - value: val, - status: status === -1 ? 'useless' : 'default', - desc: condition, - type, - tag: '', - }; - }); - this.setData({ - selectedList, - couponsList, - reduce, - selectedNum, - }); - }, - selectCoupon(e) { - const { key } = e.currentTarget.dataset; - const { couponsList, selectedList } = this.data; - couponsList.forEach((coupon) => { - if (coupon.key === key) { - coupon.isSelected = !coupon.isSelected; - } - }); - - const couponSelected = couponsList.filter( - (coupon) => coupon.isSelected === true, - ); - - this.setData({ - selectedList: [...selectedList, ...couponSelected], - couponsList: [...couponsList], - }); - - this.triggerEvent('sure', { - selectedList: [...selectedList, ...couponSelected], - }); - }, - hide() { - this.setData({ - couponsShow: false, - }); - }, - coupons(coupon = {}) { - return new Promise((resolve, reject) => { - if (coupon?.selectedCoupons) { - resolve({ - couponResultList: couponsData.couponResultList, - reduce: couponsData.reduce, - }); - } - return reject({ - couponResultList: [], - reduce: undefined, - }); - }); - }, - }, -}); diff --git a/pages/order/components/selectCoupons/selectCoupons.json b/pages/order/components/selectCoupons/selectCoupons.json deleted file mode 100644 index c46dc55..0000000 --- a/pages/order/components/selectCoupons/selectCoupons.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-popup": "tdesign-miniprogram/popup/popup", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-image": "/components/webp-image/index", - "wr-price": "/components/price/index", - "coupon-card": "/pages/coupon/components/ui-coupon-card/index" - } -} \ No newline at end of file diff --git a/pages/order/components/selectCoupons/selectCoupons.wxml b/pages/order/components/selectCoupons/selectCoupons.wxml deleted file mode 100644 index 10b8898..0000000 --- a/pages/order/components/selectCoupons/selectCoupons.wxml +++ /dev/null @@ -1,43 +0,0 @@ -<wxs src="./selectCoupon.wxs" module="m1" /> - - -<t-popup visible="{{couponsShow}}" placement="bottom" bind:visible-change="hide"> - <view class="select-coupons"> - <view class="title">閫夋嫨浼樻儬鍒�</view> - <block wx:if="{{couponsList && couponsList.length > 0}}"> - <view class="info"> - <block wx:if="{{!selectedNum}}">浣犳湁{{couponsList.length}}寮犲彲鐢ㄤ紭鎯犲埜</block> - <block wx:else> - 宸查�変腑{{selectedNum}}寮犳帹鑽愪紭鎯犲埜, 鍏辨姷鎵� - <wr-price fill="{{false}}" price="{{reduce || 0}}" /> - </block> - </view> - <scroll-view class="coupons-list" scroll-y="true"> - <view class="coupons-wrap"> - <block wx:for="{{couponsList}}" wx:key="index" wx:for-item="coupon"> - <coupon-card - title="{{coupon.title}}" - type="{{coupon.type}}" - status="{{coupon.status}}" - desc="{{coupon.desc}}" - value="{{coupon.value}}" - tag="{{coupon.tag}}" - timeLimit="{{coupon.timeLimit}}" - > - <view class="slot-radio" slot="operator"> - <t-icon bindtap="selectCoupon" data-key="{{coupon.key}}" name="{{coupon.isSelected ? 'check-circle-filled' : 'circle'}}" color="#fa4126" size="40rpx"/> - </view> - </coupon-card> - <view class="disable" wx:if="{{coupon.status == 'useless'}}">姝や紭鎯犲埜涓嶈兘鍜屽凡鍕鹃�夌殑浼樻儬鍒稿彔鍔犱娇鐢�</view> - </block> - </view> - </scroll-view> - </block> - <view wx:else class="couponp-empty-wrap"> - <t-image t-class="couponp-empty-img" src="{{emptyCouponImg}}" /> - <view class="couponp-empty-title">鏆傛棤浼樻儬鍒�</view> - </view> - <view class="coupons-cover" /> - </view> -</t-popup> - diff --git a/pages/order/components/selectCoupons/selectCoupons.wxss b/pages/order/components/selectCoupons/selectCoupons.wxss deleted file mode 100644 index a8c795f..0000000 --- a/pages/order/components/selectCoupons/selectCoupons.wxss +++ /dev/null @@ -1,104 +0,0 @@ -.select-coupons { - background: #fff; - width: 100%; - position: relative; - border-radius: 20rpx 20rpx 0 0; - padding-top: 28rpx; - padding-bottom: env(safe-area-inset-bottom); -} -.select-coupons .title { - width: 100%; - text-align: center; - font-size: 32rpx; - color: #333; - font-weight: 600; - line-height: 44rpx; -} -.select-coupons .info { - width: 100%; - height: 34rpx; - font-size: 24rpx; - color: #999; - line-height: 34rpx; - margin: 20rpx 0; - padding: 0 20rpx; -} -.select-coupons .info .price { - color: #fa4126; -} -.select-coupons .coupons-list { - max-height: 500rpx; -} -.select-coupons .coupons-list .coupons-wrap { - padding: 0rpx 20rpx; -} -.select-coupons .coupons-list .disable { - font-size: 24rpx; - color: #ff2525; - padding-top: 20rpx; -} -.select-coupons .coupons-list .slot-radio { - position: absolute; - right: 22rpx; - top: 50%; - transform: translateY(-50%); - display: inline-block; -} -.select-coupons .coupons-list .slot-radio .wr-check-filled { - font-size: 36rpx; -} -.select-coupons .coupons-list .slot-radio .check { - width: 36rpx; -} -.select-coupons .coupons-list .slot-radio .text-primary { - color: #fa4126; -} -.select-coupons .coupons-list .slot-radio .wr-check { - font-size: 36rpx; -} -.select-coupons .coupons-list .slot-radio .wr-uncheck { - font-size: 36rpx; - color: #999; -} -.select-coupons .couponp-empty-wrap { - padding: 40rpx; -} -.select-coupons .couponp-empty-wrap .couponp-empty-img { - display: block; - width: 240rpx; - height: 240rpx; - margin: 0 auto; -} -.select-coupons .couponp-empty-wrap .couponp-empty-title { - font-size: 28rpx; - color: #999; - text-align: center; - line-height: 40rpx; - margin-top: 40rpx; -} -.select-coupons .coupons-cover { - height: 112rpx; - width: 100%; - box-sizing: border-box; - margin-top: 30rpx; - padding: 12rpx 32rpx; - display: flex; - justify-content: space-between; - align-items: center; -} -.select-coupons .coupons-cover .btn { - width: 332rpx; - height: 88rpx; - text-align: center; - line-height: 88rpx; - font-size: 32rpx; - border-radius: 44rpx; - box-sizing: border-box; - border: 2rpx solid #dddddd; - color: #333333; -} -.select-coupons .coupons-cover .red { - border-color: #fa4126; - background-color: #fa4126; - color: #ffffff; -} diff --git a/pages/order/components/specs-goods-card/index.js b/pages/order/components/specs-goods-card/index.js deleted file mode 100644 index d5cd284..0000000 --- a/pages/order/components/specs-goods-card/index.js +++ /dev/null @@ -1,132 +0,0 @@ -Component({ - options: { - addGlobalClass: true, - multipleSlots: true, // 鍦ㄧ粍浠跺畾涔夋椂鐨勯�夐」涓惎鐢ㄥslot鏀寔 - }, - - externalClasses: [ - 'title-class', - 'desc-class', - 'num-class', - 'thumb-class', - 'specs-class', - 'price-class', - 'origin-price-class', - 'price-prefix-class', - ], - - relations: { - '../order-card/index': { - type: 'ancestor', - linked(target) { - this.parent = target; - }, - }, - }, - - properties: { - id: String, - hidden: { - // 璁剧疆涓簄ull浠h〃涓嶅仛绫诲瀷杞崲 - type: null, - observer(hidden) { - // null灏辨槸浠h〃娌℃湁璁剧疆锛屾病鏈夎缃殑璇濅笉setData锛岄槻姝㈢鍏堢粍浠惰Е鍙戠殑setHidden鎿嶄綔琚鐩� - if (hidden !== null) { - this.setHidden(!!hidden); - } - }, - }, - data: Object, - layout: { - type: String, - value: 'horizontal', - }, - thumbMode: { - type: String, - value: 'aspectFill', - }, - thumbWidth: Number, - thumbHeight: Number, - thumbWidthInPopup: Number, - thumbHeightInPopup: Number, - priceFill: { - type: Boolean, - value: true, - }, - currency: { - type: String, - value: '楼', - }, - lazyLoad: Boolean, - centered: Boolean, - showCart: Boolean, - pricePrefix: String, - cartSize: { - type: Number, - value: 48, - }, - cartColor: { - type: String, - value: '#FA550F', - }, - disablePopup: Boolean, - }, - - data: { - hiddenInData: false, - specsPopup: { - insert: false, - show: false, - }, - }, - - currentInTapSpecs: false, - - lifetimes: { - ready() { - const { hidden } = this.properties; - if (hidden !== null) { - this.setHidden(!!hidden); - } - }, - }, - - methods: { - closeSpecsPopup() { - this.setData({ - 'specsPopup.show': false, - }); - this.triggerEvent('specsclose', { good: this.properties.data }); - }, - - removeSpecsPopup() { - this.setData({ - 'specsPopup.insert': false, - }); - }, - - onClick(e) { - if (this.currentInTapSpecs) { - this.currentInTapSpecs = false; - return; - } - this.triggerEvent('click', e.detail); - }, - - onClickThumb(e) { - this.triggerEvent('thumb', e.detail); - }, - - onClickTag(e) { - this.triggerEvent('tag', e.detail); - }, - - onClickCart(e) { - this.triggerEvent('add-cart', e.detail); - }, - - setHidden(hidden) { - this.setData({ hiddenInData: !!hidden }); - }, - }, -}); diff --git a/pages/order/components/specs-goods-card/index.json b/pages/order/components/specs-goods-card/index.json deleted file mode 100644 index ccbce72..0000000 --- a/pages/order/components/specs-goods-card/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "goods-card": "../goods-card/index" - } -} \ No newline at end of file diff --git a/pages/order/components/specs-goods-card/index.wxml b/pages/order/components/specs-goods-card/index.wxml deleted file mode 100644 index f6f2a38..0000000 --- a/pages/order/components/specs-goods-card/index.wxml +++ /dev/null @@ -1,40 +0,0 @@ -<goods-card - class="wr-specs-goods-card" - id="{{id}}" - layout="{{layout}}" - data="{{data}}" - currency="{{currency}}" - price-fill="{{priceFill}}" - lazy-load="{{lazyLoad}}" - centered="{{centered}}" - thumb-mode="{{thumbMode}}" - thumb-width="{{thumbWidth}}" - thumb-height="{{thumbHeight}}" - show-cart="{{showCart}}" - cart-size="{{cartSize}}" - cart-color="{{cartColor}}" - card-class="{{index === goodsList.length - 1 ? 'wr-goods-card__no-border' : 'wr-goods-card'}}" - title-class="title-class" - desc-class="desc-class" - num-class="num-class" - thumb-class="thumb-class" - specs-class="specs-class" - price-class="price-class" - origin-price-class="origin-price-class" - price-prefix-class="price-prefix-class" - bind:thumb="onClickThumb" - bind:tag="onClickTag" - bind:add-cart="onClickCart" - bind:click="onClick" - hidden="{{hiddenInData}}" -> - <!-- 閫忎紶good-card缁勪欢鐨剆lot --> - <slot name="thumb-cover" slot="thumb-cover" /> - <slot name="after-title" slot="after-title" /> - <slot name="after-desc" slot="after-desc" /> - <slot name="price-prefix" slot="price-prefix" /> - <slot name="append-body" slot="append-body" /> - <slot name="footer" slot="footer" /> - <slot name="append-card" slot="append-card" /> -</goods-card> - diff --git a/pages/order/components/specs-goods-card/index.wxss b/pages/order/components/specs-goods-card/index.wxss deleted file mode 100644 index e69de29..0000000 --- a/pages/order/components/specs-goods-card/index.wxss +++ /dev/null diff --git a/pages/order/config.js b/pages/order/config.js deleted file mode 100644 index 20a3317..0000000 --- a/pages/order/config.js +++ /dev/null @@ -1,94 +0,0 @@ -export const OrderStatus = { - PENDING_PAYMENT: 5, // 寰呮敮浠� - PENDING_DELIVERY: 10, // 寰呭彂璐� - PENDING_RECEIPT: 40, // 寰呮敹璐� - COMPLETE: 50, // 宸插畬鎴�/寰呰瘎浠� - PAYMENT_TIMEOUT: 80, // 宸插彇娑堬紝鏀粯瓒呮椂 - CANCELED_NOT_PAYMENT: 80, // 宸插彇娑堬紝鏈敮浠樹富鍔ㄥ彇娑� - CANCELED_PAYMENT: 80, // 宸插彇娑堬紝宸叉敮浠樹富鍔ㄥ彇娑� - CANCELED_REJECTION: 80, // 宸插彇娑堬紝鎷掓敹 -}; - -// 鍞悗鐘舵�� 10:寰呭鏍�,20:宸插鏍�,30:宸叉敹璐�,40:鏀惰揣寮傚父,50:宸插畬鎴�,60:宸插叧闂�; -export const AfterServiceStatus = { - TO_AUDIT: 10, // 寰呭鏍� - THE_APPROVED: 20, // 宸插鏍� - HAVE_THE_GOODS: 30, // 宸叉敹璐� - ABNORMAL_RECEIVING: 40, // 鏀惰揣寮傚父 - COMPLETE: 50, // 宸插畬鎴� - CLOSED: 60, // 宸插叧闂� -}; - -// 鍞悗绫诲瀷 -export const ServiceType = { - RETURN_GOODS: 10, // 閫�璐ч��娆� - ONLY_REFUND: 20, // 浠呴��娆� - ORDER_CANCEL: 30, // 鏀粯鍚庡彇娑� -}; - -export const ServiceTypeDesc = { - [ServiceType.RETURN_GOODS]: '閫�璐�', - [ServiceType.ONLY_REFUND]: '閫�娆�', - [ServiceType.ORDER_CANCEL]: '鏀粯鍚庡彇娑�', -}; - -// 璁㈠崟鎸夐挳绫诲瀷 -export const OrderButtonTypes = { - PAY: 1, // 浠樻 - CANCEL: 2, // 鍙栨秷璁㈠崟 - CONFIRM: 3, // 纭鏀惰揣 - APPLY_REFUND: 4, // 鐢宠鍞悗 - VIEW_REFUND: 5, // 鏌ョ湅閫�娆� - COMMENT: 6, // 璇勪环 - DELETE: 7, // 鍒犻櫎璁㈠崟 - DELIVERY: 8, // 鏌ョ湅鐗╂祦 - REBUY: 9, // 鍐嶆璐拱 - INVITE_GROUPON: 11, //閭�璇峰ソ鍙嬫嫾鍥� -}; - -// 鍞悗鏈嶅姟鎸夐挳绫诲瀷 -export const ServiceButtonTypes = { - REVOKE: 2, // 鎾ら攢 - FILL_TRACKING_NO: 3, // 濉啓杩愬崟鍙� - CHANGE_TRACKING_NO: 4, // 淇敼杩愬崟鍙� - VIEW_DELIVERY: 5, // 鏌ョ湅鐗╂祦 -}; - -// 鍞悗鐘舵�� -export const ServiceStatus = { - PENDING_VERIFY: 100, //寰呭鏍� - VERIFIED: 110, // 宸插鏍稿緟瀵勫洖鍟嗗搧 - PENDING_DELIVERY: 120, // 绛夊緟涔板瀵勫洖鍟嗗搧 - PENDING_RECEIPT: 130, // 宸插瘎鍥炲晢鍝侊紝寰呮敹璐� - RECEIVED: 140, // 宸叉敹璐� - EXCEPTION: 150, // 鏀惰揣寮傚父 - REFUNDED: 160, // 宸查��娆� - CLOSED: 170, // 宸插叧闂� -}; - -// 鍞悗鏀惰揣鐘舵�� -export const ServiceReceiptStatus = { - RECEIPTED: 1, // 宸叉敹鍒拌揣 - NOT_RECEIPTED: 2, // 鏈敹鍒拌揣 -}; - -// 鐗╂祦鑺傜偣 -export const LogisticsNodeTypes = { - SUBMITTED: 200001, // 宸叉彁浜よ鍗� - PAYMENTED: 200002, // 宸蹭粯娆�/宸蹭笅鍗� - SHIPPED: 200003, // 宸插彂璐� - CANCELED: 200004, // 宸插彇娑� - RECEIVED: 200005, // 宸茬鏀� - ADDRESS_CHANGED: 200006, // 宸蹭慨鏀瑰湴鍧� - IN_TRANSIT: 200007, // 杩愯緭涓� -}; - -export const LogisticsIconMap = { - [LogisticsNodeTypes.SUBMITTED]: '', - [LogisticsNodeTypes.PAYMENTED]: 'credit_card', - [LogisticsNodeTypes.SHIPPED]: 'deliver', - [LogisticsNodeTypes.CANCELED]: '', - [LogisticsNodeTypes.RECEIVED]: 'check', - [LogisticsNodeTypes.ADDRESS_CHANGED]: '', - [LogisticsNodeTypes.IN_TRANSIT]: 'yunshuzhong', -}; diff --git a/pages/order/delivery-detail/index.js b/pages/order/delivery-detail/index.js deleted file mode 100644 index f10ff02..0000000 --- a/pages/order/delivery-detail/index.js +++ /dev/null @@ -1,43 +0,0 @@ -Page({ - data: { - logisticsData: { - logisticsNo: '', - nodes: [], - company: '', - phoneNumber: '', - }, - active: 0, - }, - - onLoad(query) { - let data; - try { - data = JSON.parse(decodeURIComponent(query.data || '{}')); - } catch (e) { - console.warn('鐗╂祦鑺傜偣鏁版嵁瑙f瀽澶辫触', e); - } - if (Number(query.source) === 2) { - const service = { - company: data.logisticsCompanyName, - logisticsNo: data.logisticsNo, - nodes: data.nodes, - }; - this.setData({ - logisticsData: service, - }); - } else if (data) { - this.setData({ logisticsData: data }); - } - }, - - onLogisticsNoCopy() { - wx.setClipboardData({ data: this.data.logisticsData.logisticsNo }); - }, - - onCall() { - const { phoneNumber } = this.data.logisticsData; - wx.makePhoneCall({ - phoneNumber, - }); - }, -}); diff --git a/pages/order/delivery-detail/index.json b/pages/order/delivery-detail/index.json deleted file mode 100644 index 2ba9163..0000000 --- a/pages/order/delivery-detail/index.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "navigationBarTitleText": "鐗╂祦淇℃伅", - "usingComponents": { - "t-cell": "tdesign-miniprogram/cell/cell", - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", - "t-image": "/components/webp-image/index", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-steps": "tdesign-miniprogram/steps/steps", - "t-step": "tdesign-miniprogram/step-item/step-item" - } -} \ No newline at end of file diff --git a/pages/order/delivery-detail/index.wxml b/pages/order/delivery-detail/index.wxml deleted file mode 100644 index b5a8bf5..0000000 --- a/pages/order/delivery-detail/index.wxml +++ /dev/null @@ -1,91 +0,0 @@ -<wxs module="isUrl"> - var isUrl = function(item) { - return item.indexOf('http') > -1; - } - module.exports = { - isUrl: isUrl, - } -</wxs> - -<view class="page-section cells" wx:if="{{logisticsData.logisticsNo || logisticsData.company}}"> - <t-cell-group> - <t-cell - title="蹇�掑崟鍙�" - t-class-title="wr-cell__title" - t-class-note="wr-cell__value" - t-class-left="order-group__left" - wx:if="{{logisticsData.logisticsNo}}" - bordered="{{false}}" - > - <text slot="note" class="logistics-no">{{logisticsData.logisticsNo}}</text> - <view - slot="right-icon" - class="text-btn" - hover-class="text-btn--active" - bindtap="onLogisticsNoCopy" - >澶嶅埗 - </view> - </t-cell> - <t-cell - title="鐗╂祦鍏徃" - t-class-title="wr-cell__title" - t-class-note="wr-cell__value" - t-class-left="order-group__left" - bordered="{{false}}" - wx:if="{{logisticsData.company}}" - note="{{logisticsData.company + (logisticsData.phoneNumber ? '-' + logisticsData.phoneNumber : '')}}" - > - <view - slot="right-icon" - class="text-btn" - hover-class="text-btn--active" - bindtap="onCall" - wx:if="{{logisticsData.phoneNumber}}" - > - 鎷ㄦ墦 - </view> - </t-cell> - </t-cell-group> -</view> -<view class="page-section cell-steps"> - <t-steps - class="page-section__steps" - t-class="steps" - layout="vertical" - current="{{active}}" - > - <t-step - class="steps" - t-class-title="step-title" - wx:for="{{logisticsData.nodes}}" - wx:for-item="item" - wx:for-index="index" - wx:key="index" - title="{{item.title}}" - icon="slot" - > - <block wx:if="{{isUrl.isUrl(item.icon)}}"> - <t-image - class="cell-steps__imgWrapper" - slot="icon" - t-class="cell-steps__img" - src="{{item.icon}}" - /> - </block> - <block wx:else> - <t-icon - slot="icon" - size="32rpx" - prefix="wr" - color="{{index === 0 ? '#ef5433' : '#bbb'}}" - name="{{item.icon}}" - /> - </block> - <view slot="content"> - <view class="step-desc">{{item.desc}}</view> - <view class="step-date">{{item.date}}</view> - </view> - </t-step> - </t-steps> -</view> - diff --git a/pages/order/delivery-detail/index.wxss b/pages/order/delivery-detail/index.wxss deleted file mode 100644 index 6a2524c..0000000 --- a/pages/order/delivery-detail/index.wxss +++ /dev/null @@ -1,99 +0,0 @@ -page { - background-color: #f5f5f5; -} -.page-section { - margin-top: 24rpx; - background-color: white; -} -.page-section .order-group__left { - margin-right: 0 !important; -} -.cell-steps { - padding: 8rpx; -} -.wr-cell__title { - flex: none; - font-size: 28rpx; - color: #666; -} -.wr-cell__value { - flex: auto; - margin-left: 30rpx; - font-size: 28rpx; - color: #333 !important; -} -.logistics-no { - display: inline-block; - text-align: left; - word-break: break-all; - color: #333; -} -.text-btn { - margin-left: 20rpx; - display: inline; - font-size: 24rpx; - padding: 0 15rpx; - border: 1rpx solid #ddd; - border-radius: 28rpx; - color: #333; -} -.text-btn--active { - opacity: 0.5; -} -.steps .step-title { - font-weight: bold; - color: #333 !important; - font-size: 30rpx; -} -.steps .step-desc { - color: #333333; - font-size: 28rpx; -} -.steps .step-date { - color: #999999; - font-size: 24rpx; -} - -.cell-steps__img, -.cell-steps__imgWrapper { - width: 48rpx; - height: 48rpx; -} - -.steps - .t-step--vertical.t-step--default-anchor - .t-steps-item--process - .t-steps-item__icon-number { - background: #ffece9 !important; - color: white !important; - border: none; -} - -.steps - .t-step--vertical.t-step--default-anchor - .t-steps-item--default - .t-steps-item__icon-number { - color: white !important; - background: #f5f5f5 !important; - border: none; -} - -.steps - .t-step--vertical.t-step--default-anchor.t-step--not-last-child - .t-steps-item__inner::after { - top: 48rpx; - height: calc(100% - 44rpx - 4rpx); -} - -.steps - .t-step--vertical.t-step--default-anchor.t-step--not-last-child - .t-steps-item__inner::after, -.steps - .t-step--vertical.t-step--default-anchor.t-step--not-last-child - .t-steps-item--default - .t-steps-item__inner:after { - background: #f5f5f5 !important; -} -.page-section__steps { - padding: 24rpx; -} diff --git a/pages/order/fill-tracking-no/api.js b/pages/order/fill-tracking-no/api.js deleted file mode 100644 index 33f41de..0000000 --- a/pages/order/fill-tracking-no/api.js +++ /dev/null @@ -1,71 +0,0 @@ -import { mockIp, mockReqId } from '../../../utils/mock'; - -export function create() { - const _resq = { - data: null, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 79, - success: true, - }; - return Promise.resolve(_resq); -} - -export function update() { - const _resq = { - data: null, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 79, - success: true, - }; - return Promise.resolve(_resq); -} - -export function getDeliverCompanyList() { - const _resq = { - data: [ - { - name: '涓�氬揩閫�', - code: '0001', - }, - { - name: '鐢抽�氬揩閫�', - code: '0002', - }, - { - name: '鍦嗛�氬揩閫�', - code: '0003', - }, - { - name: '椤轰赴蹇��', - code: '0004', - }, - { - name: '鐧句笘蹇��', - code: '0005', - }, - { - name: '闊佃揪蹇��', - code: '0006', - }, - { - name: '閭斂蹇��', - code: '0007', - }, - { - name: '涓扮綉蹇��', - code: '0008', - }, - { - name: '椤轰赴鐩撮偖', - code: '0009', - }, - ], - }; - return Promise.resolve(_resq); -} diff --git a/pages/order/fill-tracking-no/index.js b/pages/order/fill-tracking-no/index.js deleted file mode 100644 index dd6ff3b..0000000 --- a/pages/order/fill-tracking-no/index.js +++ /dev/null @@ -1,190 +0,0 @@ -import Dialog from 'tdesign-miniprogram/dialog/index'; -import Toast from 'tdesign-miniprogram/toast/index'; -import reasonSheet from '../components/reason-sheet/reasonSheet'; -import { getDeliverCompanyList, create, update } from './api'; - -Page({ - deliveryCompanyList: [], - - data: { - trackingNo: '', - remark: '', - deliveryCompany: null, - submitActived: false, - submitting: false, - }, - onLoad(query) { - const { - rightsNo = '', - logisticsNo = '', - logisticsCompanyName = '', - logisticsCompanyCode = '', - remark = '', - } = query; - - if (!rightsNo) { - Dialog.confirm({ - title: '璇烽�夋嫨鍞悗鍗曪紵', - content: '', - confirmBtn: '纭', - }).then(() => { - wx.navigateBack({ backRefresh: true }); - }); - } - this.rightsNo = rightsNo; - if (logisticsNo) { - wx.setNavigationBarTitle({ - title: '淇敼杩愬崟鍙�', - fail() {}, - }); - this.isChange = true; - this.setData({ - deliveryCompany: { - name: logisticsCompanyName, - code: logisticsCompanyCode, - }, - trackingNo: logisticsNo, - remark, - submitActived: true, - }); - } - this.setWatcher('trackingNo', this.checkParams.bind(this)); - this.setWatcher('deliveryCompany', this.checkParams.bind(this)); - }, - - setWatcher(key, callback) { - let lastData = this.data; - const keys = key.split('.'); - keys.slice(0, -1).forEach((k) => { - lastData = lastData[k]; - }); - const lastKey = keys[keys.length - 1]; - this.observe(lastData, lastKey, callback); - }, - - observe(data, k, callback) { - let val = data[k]; - Object.defineProperty(data, k, { - configurable: true, - enumerable: true, - set: (value) => { - val = value; - callback(); - }, - get: () => { - return val; - }, - }); - }, - - getDeliveryCompanyList() { - if (this.deliveryCompanyList.length > 0) { - return Promise.resolve(this.deliveryCompanyList); - } - return getDeliverCompanyList().then((res) => { - this.deliveryCompanyList = res.data || []; - return this.deliveryCompanyList; - }); - }, - - onInput(e) { - const { key } = e.currentTarget.dataset; - const { value } = e.detail; - this.setData({ [key]: value }); - }, - - onCompanyTap() { - this.getDeliveryCompanyList().then((deliveryCompanyList) => { - reasonSheet({ - show: true, - title: '閫夋嫨鐗╂祦鍏徃', - options: deliveryCompanyList.map((company) => ({ - title: company.name, - checked: this.data.deliveryCompany - ? company.code === this.data.deliveryCompany.code - : false, - })), - showConfirmButton: true, - showCancelButton: true, - emptyTip: '璇烽�夋嫨鐗╂祦鍏徃', - }).then((indexes) => { - this.setData({ - deliveryCompany: deliveryCompanyList[indexes[0]], - }); - }); - }); - }, - - checkParams() { - const res = { errMsg: '', require: false }; - - if (!this.data.trackingNo) { - res.errMsg = '璇峰~鍐欒繍鍗曞彿'; - res.require = true; - } else if (!this.data.deliveryCompany) { - res.errMsg = '璇烽�夋嫨鐗╂祦鍏徃'; - res.require = true; - } - this.setData({ submitActived: !res.require }); - return res; - }, - - onSubmit() { - const checkRes = this.checkParams(); - if (checkRes.errMsg) { - Toast({ - context: this, - selector: '#t-toast', - message: checkRes.errMsg, - icon: '', - }); - return; - } - - const { - trackingNo, - remark, - deliveryCompany: { code, name }, - } = this.data; - - const params = { - rightsNo: this.rightsNo, - logisticsCompanyCode: code, - logisticsCompanyName: name, - logisticsNo: trackingNo, - remark, - }; - const api = this.isChange ? create : update; - this.setData({ submitting: true }); - api(params) - .then(() => { - this.setData({ submitting: false }); - Toast({ - context: this, - selector: '#t-toast', - message: '淇濆瓨鎴愬姛', - icon: '', - }); - setTimeout(() => wx.navigateBack({ backRefresh: true }), 1000); - }) - .catch(() => { - this.setData({ submitting: false }); - }); - }, - - onScanTap() { - wx.scanCode({ - scanType: ['barCode'], - success: (res) => { - Toast({ - context: this, - selector: '#t-toast', - message: '鎵爜鎴愬姛', - icon: '', - }); - this.setData({ trackingNo: res.result }); - }, - fail: () => {}, - }); - }, -}); diff --git a/pages/order/fill-tracking-no/index.json b/pages/order/fill-tracking-no/index.json deleted file mode 100644 index bd1bb20..0000000 --- a/pages/order/fill-tracking-no/index.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "navigationBarTitleText": "濉啓杩愬崟鍙�", - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", - "t-textarea": "tdesign-miniprogram/textarea/textarea", - "t-input": "tdesign-miniprogram/input/input", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-button": "tdesign-miniprogram/button/button", - "ui-reason-sheet": "../components/reason-sheet/index" - } -} \ No newline at end of file diff --git a/pages/order/fill-tracking-no/index.wxml b/pages/order/fill-tracking-no/index.wxml deleted file mode 100644 index 7949a0e..0000000 --- a/pages/order/fill-tracking-no/index.wxml +++ /dev/null @@ -1,51 +0,0 @@ -<view class="fill-tracking-no"> - <view class="notice-bar">璇峰~鍐欐纭殑閫�璐у寘瑁硅繍鍗曚俊鎭紝浠ュ厤褰卞搷閫�娆捐繘搴�</view> - <view class="fill-tracking-no__form"> - <t-cell-group> - <t-cell title="杩愬崟鍙�" t-class-title="t-cell-title-width"> - <t-input - slot="note" - borderless - t-class="t-cell__value" - type="text" - value="{{trackingNo}}" - maxlength="30" - placeholder="璇疯緭鍏ョ墿娴佸崟鍙�" - bind:change="onInput" - data-key="trackingNo" - /> - - <t-icon slot="right-icon" name="scan" t-class="icon-scan" bindtap="onScanTap" /> - </t-cell> - <t-cell - t-class-title="t-cell-title-width" - t-class-note="{{deliveryCompany && deliveryCompany.name ? 't-cell__value' : 't-cell__placeholder'}}" - title="鐗╂祦鍏徃" - note="{{deliveryCompany && deliveryCompany.name || '璇烽�夋嫨鐗╂祦鍏徃'}}" - arrow - bindtap="onCompanyTap" - /> - </t-cell-group> - <view class="textarea-wrapper"> - <text>澶囨敞淇℃伅</text> - </view> - <t-textarea - t-class="t-textarea-wrapper" - type="text" - value="{{remark}}" - maxlength="140" - autosize - placeholder="閫夊~椤癸紝濡傛湁澶氫釜鍖呰9瀵勫洖锛岃娉ㄦ槑鍏惰繍鍗曚俊鎭�" - bind:change="onInput" - data-key="remark" - /> - </view> - <view class="fill-tracking-no__button-bar"> - <t-button t-class="btn {{ submitActived ? 'confirmBtn' : 'disabled' }}" loading="{{submitting}}" bindtap="onSubmit"> - 淇濆瓨 - </t-button> - </view> -</view> -<ui-reason-sheet id="wr-reason-sheet" /> -<t-toast id="t-toast" /> -<t-dialog id="t-dialog" /> diff --git a/pages/order/fill-tracking-no/index.wxss b/pages/order/fill-tracking-no/index.wxss deleted file mode 100644 index 726ab89..0000000 --- a/pages/order/fill-tracking-no/index.wxss +++ /dev/null @@ -1,103 +0,0 @@ -@import '../../../style/theme.wxss'; - -:host { - background-color: #f5f5f5; -} - -.notice-bar { - padding: 24rpx 30rpx; - text-align: center; - font-size: 26rpx; - color: #e17349; - background: #fefcef; -} - -.fill-tracking-no__form { - margin-top: 20rpx; -} - -.fill-tracking-no__form .t-cell__note { - justify-content: flex-start; -} - -.fill-tracking-no__form .t-cell__value { - color: #333 !important; - font-size: 30rpx; - text-align: left; - padding: 0; -} - -.fill-tracking-no__form .t-cell__value::after { - border: none !important; -} - -.fill-tracking-no__form .t-cell__value .t-textarea__wrapper { - padding: 0; -} - -.fill-tracking-no__form .t-input__control, -.fill-tracking-no__form .t-textarea__placeholder, -.fill-tracking-no__form .t-cell__placeholder { - font-size: 30rpx !important; -} - -.fill-tracking-no__form .t-textarea__placeholder, -.fill-tracking-no__form .t-cell__placeholder { - color: #bbbbbb !important; -} - -.t-textarea__note { - width: 100%; -} - -.fill-tracking-no__button-bar { - margin: 38rpx 30rpx 0; -} - -.fill-tracking-no__button-bar .btn { - background-color: transparent; - font-size: 32rpx; - width: 100%; - border-radius: 48rpx; -} - -.fill-tracking-no__button-bar .btn:first-child { - margin-bottom: 20rpx; -} - -.fill-tracking-no__button-bar .btn.confirmBtn { - background: #fa4126; - color: #fff; -} - -.fill-tracking-no__button-bar .btn.disabled { - background-color: #c6c6c6; - color: #fff; -} - -.t-cell-title-width { - width: 160rpx; - flex: none !important; -} -.textarea-wrapper { - background: #fff; - display: flex; - align-items: flex-start; - padding: 24rpx 32rpx 0 32rpx; -} -.t-textarea-wrapper { - box-sizing: border-box; -} - -.fill-tracking-no__form .t-input__wrapper { - margin: 0 !important; -} - -.fill-tracking-no__form { - --td-input-vertical-padding: 0; -} - -.t-button { - --td-button-default-color: #aeb3b7; - --td-button-primary-text-color: #fa4126; -} diff --git a/pages/order/invoice/index.js b/pages/order/invoice/index.js deleted file mode 100644 index 5333802..0000000 --- a/pages/order/invoice/index.js +++ /dev/null @@ -1,38 +0,0 @@ -import { fetchOrderDetail } from '../../../services/order/orderDetail'; - -Page({ - data: { - invoice: {}, - }, - onLoad({ orderNo }) { - this.orderNo = orderNo; - this.init(); - }, - init() { - this.getDetail(); - }, - getDetail() { - const params = { - parameter: this.orderNo, - }; - return fetchOrderDetail(params).then((res) => { - const order = res.data; - - const invoice = { - buyerName: order?.invoiceVO?.buyerName, //涓汉鎴栧叕鍙稿悕绉� - buyerTaxNo: order?.invoiceVO?.buyerTaxNo, //绋庡彿 - buyerPhone: order?.invoiceVO?.buyerPhone, //鎵嬫満 - email: order?.invoiceVO?.email, //閭 - titleType: order?.invoiceVO?.titleType === 1 ? '涓汉' : '鍏徃', //鍙戠エ鎶ご 1-涓汉 2-鍏徃 - ontentType: order?.invoiceVO?.ontentType === 1 ? '鍟嗗搧鏄庣粏' : '2绫诲埆', //鍙戠エ鍐呭 1-鏄庣粏 2绫诲埆 - invoiceType: - order?.invoiceVO?.invoiceType === 5 ? '鐢靛瓙鏅�氬彂绁�' : '涓嶅紑鍙戠エ', //鏄惁寮�绁� 0-涓嶅紑 5-鐢靛瓙鍙戠エ - isInvoice: order?.invoiceVO?.buyerName ? '宸插紑绁�' : '鏈紑绁�', - money: order?.invoiceVO?.money, - }; - this.setData({ - invoice, - }); - }); - }, -}); diff --git a/pages/order/invoice/index.json b/pages/order/invoice/index.json deleted file mode 100644 index ea83b65..0000000 --- a/pages/order/invoice/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "navigationBarTitleText": "鍙戠エ璇︽儏", - "usingComponents": { - "t-cell": "tdesign-miniprogram/cell/cell", - "t-button": "tdesign-miniprogram/button/button", - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group" - } -} diff --git a/pages/order/invoice/index.wxml b/pages/order/invoice/index.wxml deleted file mode 100644 index b3bc794..0000000 --- a/pages/order/invoice/index.wxml +++ /dev/null @@ -1,40 +0,0 @@ -<view class="invoice-detail"> - <view class="invoice-detail-box"> - <view class="invoice-detail-title">鍙戠エ璇︽儏</view> - <view class="invoice-detail-box-row"> - <view class="invoice-detail-box-title">鍙戠エ绫诲瀷</view> - <view class="invoice-detail-box-value">{{invoice.invoiceType}}</view> - </view> - <view class="invoice-detail-box-row"> - <view class="invoice-detail-box-title">鍙戠エ鎶ご</view> - <view class="invoice-detail-box-value">{{invoice.buyerName}}</view> - </view> - <view class="invoice-detail-box-row"> - <view class="invoice-detail-box-title">绾崇◣浜鸿瘑鍒彿</view> - <view class="invoice-detail-box-value">{{invoice.buyerTaxNo}}</view> - </view> - <view class="invoice-detail-box-row"> - <view class="invoice-detail-box-title">鍙戠エ鍐呭</view> - <view class="invoice-detail-box-value">{{invoice.ontentType}}</view> - </view> - <view class="invoice-detail-box-row"> - <view class="invoice-detail-box-title">鍙戠エ閲戦</view> - <view class="invoice-detail-box-value">{{invoice.money}}</view> - </view> - </view> - <view class="invoice-detail-box"> - <view class="invoice-detail-title">鏀剁エ浜轰俊鎭�</view> - <view class="invoice-detail-box-row"> - <view class="invoice-detail-box-title">閭</view> - <view class="invoice-detail-box-value">{{invoice.email}}</view> - </view> - <view class="invoice-detail-box-row"> - <view class="invoice-detail-box-title">鎵嬫満鍙�</view> - <view class="invoice-detail-box-value">{{invoice.buyerPhone}}</view> - </view> - <view class="invoice-detail-box-row"> - <view class="invoice-detail-box-title">寮�绁ㄧ姸鎬�</view> - <view class="invoice-detail-box-value">{{invoice.isInvoice}}</view> - </view> - </view> -</view> diff --git a/pages/order/invoice/index.wxss b/pages/order/invoice/index.wxss deleted file mode 100644 index 0a0379b..0000000 --- a/pages/order/invoice/index.wxss +++ /dev/null @@ -1,31 +0,0 @@ -:host { - background-color: #f5f5f5; -} - -.invoice-detail .invoice-detail-box { - background-color: #fff; - padding: 24rpx 32rpx; - margin-top: 24rpx; -} - -.invoice-detail-title { - font-size: 14px; - font-weight: 600; -} - -.invoice-detail-box-row { - display: flex; - margin-top: 44rpx; -} - -.invoice-detail-box-title { - font-size: 13px; - color: #666666; - width: 156rpx; - margin-right: 32rpx; -} - -.invoice-detail-box-value { - font-size: 13px; - color: #333333; -} diff --git a/pages/order/order-confirm/components/address-card/index.js b/pages/order/order-confirm/components/address-card/index.js deleted file mode 100644 index 96cf8ef..0000000 --- a/pages/order/order-confirm/components/address-card/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * @Author: rileycai - * @Date: 2022-03-05 16:47:16 - * @LastEditTime: 2022-03-05 16:48:32 - * @LastEditors: rileycai - * @Description: - * @FilePath: /tdesign-miniprogram-starter/pages/order/order-confirm/components/address-card/index.js - */ -Component({ - externalClasses: ['wr-class'], - properties: { - addressData: { - type: Object, - value: {}, - }, - }, - methods: { - onAddressTap() { - this.triggerEvent('addressclick'); - }, - onAddTap() { - this.triggerEvent('addclick'); - }, - }, -}); diff --git a/pages/order/order-confirm/components/address-card/index.json b/pages/order/order-confirm/components/address-card/index.json deleted file mode 100644 index 08ecc96..0000000 --- a/pages/order/order-confirm/components/address-card/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-cell": "tdesign-miniprogram/cell/cell", - "t-icon": "tdesign-miniprogram/icon/icon" - } -} diff --git a/pages/order/order-confirm/components/address-card/index.wxml b/pages/order/order-confirm/components/address-card/index.wxml deleted file mode 100644 index 9cf86f4..0000000 --- a/pages/order/order-confirm/components/address-card/index.wxml +++ /dev/null @@ -1,46 +0,0 @@ -<wxs module="utils"> - var hidePhoneNum = function(array) { - if (!array) return; - var mphone = array.substring(0, 3) + '****' + array.substring(7); - return mphone; - } - module.exports = { - hidePhoneNum:hidePhoneNum - } -</wxs> - -<view class="address-card wr-class"> - <t-cell wx:if="{{addressData && addressData.detailAddress}}" bindtap="onAddressTap" hover> - <view class="order-address" slot="title"> - <t-icon name="location" color="#333333" size="40rpx" /> - <view class="address-content"> - <view class="title"> - <view class="address-tag" wx:if="{{addressData.addressTag}}"> - {{addressData.addressTag}} - </view> - {{addressData.provinceName}} {{addressData.cityName}} {{addressData.districtName}} - </view> - <view class="detail">{{addressData.detailAddress}}</view> - <view class="info"> - {{addressData.name}} {{utils.hidePhoneNum(addressData.phone)}} - </view> - </view> - <t-icon - class="address__right" - name="chevron-right" - color="#BBBBBB" - size="40rpx" - /> - </view> - </t-cell> - <t-cell - wx:else - bindtap="onAddTap" - title="娣诲姞鏀惰揣鍦板潃" - hover - > - <t-icon name="add-circle" slot="left-icon" size="40rpx" /> - </t-cell> - <view class="top-line" /> -</view> - diff --git a/pages/order/order-confirm/components/address-card/index.wxss b/pages/order/order-confirm/components/address-card/index.wxss deleted file mode 100644 index aaff4bd..0000000 --- a/pages/order/order-confirm/components/address-card/index.wxss +++ /dev/null @@ -1,66 +0,0 @@ -.address-card { - background: #fff; - margin: 0rpx 0rpx 24rpx; -} -.address-card .wr-cell__title { - color: #999; - margin-left: 6rpx; -} -.address-card .order-address { - display: flex; - width: 100%; -} -.address-card .order-address .address-content { - flex: 1; -} -.order-address .address__right { - align-self: center; -} -.address-card .order-address .title { - display: flex; - align-items: center; - height: 40rpx; - font-size: 28rpx; - font-weight: normal; - color: #999999; - line-height: 40rpx; -} -.address-card .order-address .title .address-tag { - width: 52rpx; - height: 29rpx; - border: 1rpx solid #0091ff; - background-color: rgba(122, 167, 251, 0.1); - text-align: center; - line-height: 29rpx; - border-radius: 8rpx; - color: #0091ff; - font-size: 20rpx; - margin-right: 12rpx; -} -.address-card .order-address .detail { - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - font-size: 36rpx; - font-weight: bold; - color: #333333; - line-height: 48rpx; - margin: 8rpx 0; -} -.address-card .order-address .info { - height: 40rpx; - font-size: 28rpx; - font-weight: normal; - color: #333333; - line-height: 40rpx; -} -.address-card .top-line { - width: 100%; - height: 6rpx; - background-color: #fff; - background-image: url(https://cdn-we-retail.ym.tencent.com/miniapp/order/stripe.png); - background-repeat: repeat-x; - display: block; -} diff --git a/pages/order/order-confirm/getNotes.wxs b/pages/order/order-confirm/getNotes.wxs deleted file mode 100644 index 935962c..0000000 --- a/pages/order/order-confirm/getNotes.wxs +++ /dev/null @@ -1,11 +0,0 @@ -var getNotes = function (storeInfoList, storeIndex) { - if (!storeInfoList) { - return ''; - } - var storeInfo = storeInfoList[storeIndex]; - if (!storeInfo) { - return ''; - } - return storeInfoList[storeIndex].remark; -}; -module.exports = getNotes; diff --git a/pages/order/order-confirm/handleInvoice.wxs b/pages/order/order-confirm/handleInvoice.wxs deleted file mode 100644 index 30e50f9..0000000 --- a/pages/order/order-confirm/handleInvoice.wxs +++ /dev/null @@ -1,11 +0,0 @@ -var handleInvoice = function (invoiceData) { - if (!invoiceData || invoiceData.invoiceType == 0) { - return '鏆備笉寮�鍙戠エ'; - } - var title = invoiceData.titleType == 2 ? '鍏徃' : '涓汉'; - var content = invoiceData.contentType == 2 ? '鍟嗗搧绫诲埆' : '鍟嗗搧鏄庣粏'; - return invoiceData.email - ? '鐢靛瓙鏅�氬彂绁� (' + content + ' - ' + title + ')' - : '鏆備笉寮�鍙戠エ'; -}; -module.exports = handleInvoice; diff --git a/pages/order/order-confirm/index.js b/pages/order/order-confirm/index.js deleted file mode 100644 index 8ac2566..0000000 --- a/pages/order/order-confirm/index.js +++ /dev/null @@ -1,571 +0,0 @@ -import Toast from 'tdesign-miniprogram/toast/index'; -import { fetchSettleDetail } from '../../../services/order/orderConfirm'; -import { commitPay, wechatPayOrder } from './pay'; -import { getAddressPromise } from '../../usercenter/address/list/util'; - -const stripeImg = `https://cdn-we-retail.ym.tencent.com/miniapp/order/stripe.png`; - -Page({ - data: { - placeholder: '澶囨敞淇℃伅', - stripeImg, - loading: false, - settleDetailData: { - storeGoodsList: [], //姝e父涓嬪崟鍟嗗搧鍒楄〃 - outOfStockGoodsList: [], //搴撳瓨涓嶈冻鍟嗗搧 - abnormalDeliveryGoodsList: [], // 涓嶈兘姝e父閰嶉�佸晢鍝� - inValidGoodsList: [], // 澶辨晥鎴栬�呭簱瀛樹笉瓒� - limitGoodsList: [], //闄愯喘鍟嗗搧 - couponList: [], //闂ㄥ簵浼樻儬鍒镐俊鎭� - }, // 鑾峰彇缁撶畻椤佃鎯� data - orderCardList: [], // 浠呯敤浜庡晢鍝佸崱鐗囧睍绀� - couponsShow: false, // 鏄剧ず浼樻儬鍒哥殑寮规 - invoiceData: { - email: '', // 鍙戠エ鍙戦�侀偖绠� - buyerTaxNo: '', // 绋庡彿 - invoiceType: null, // 寮�绁ㄧ被鍨� 1锛氬鍊肩◣涓撶敤鍙戠エ锛� 2锛氬鍊肩◣鏅�氬彂绁紱 3锛氬鍊肩◣鐢靛瓙鍙戠エ锛�4锛氬鍊肩◣鍗峰紡鍙戠エ锛�5锛氬尯鍧楅摼鐢靛瓙鍙戠エ銆� - buyerPhone: '', //鎵嬫満鍙� - buyerName: '', //涓汉鎴栧叕鍙稿悕绉� - titleType: '', // 鍙戠エ鎶ご 1-鍏徃 2-涓汉 - contentType: '', //鍙戠エ鍐呭 1-鏄庣粏 2-绫诲埆 - }, - goodsRequestList: [], - userAddressReq: null, - popupShow: false, // 涓嶅湪閰嶉�佽寖鍥� 澶辨晥 搴撳瓨涓嶈冻 鍟嗗搧灞曠ず寮规 - notesPosition: 'center', - storeInfoList: [], - storeNoteIndex: 0, //褰撳墠濉啓澶囨敞闂ㄥ簵index - promotionGoodsList: [], //褰撳墠闂ㄥ簵鍟嗗搧鍒楄〃(浼樻儬鍒�) - couponList: [], //褰撳墠闂ㄥ簵鎵�閫変紭鎯犲埜 - submitCouponList: [], //鎵�鏈夐棬搴楁墍閫変紭鎯犲埜 - currentStoreId: null, //褰撳墠浼樻儬鍒竤toreId - userAddress: null, - }, - - payLock: false, - noteInfo: [], - tempNoteInfo: [], - onLoad(options) { - this.setData({ - loading: true, - }); - this.handleOptionsParams(options); - }, - onShow() { - const invoiceData = wx.getStorageSync('invoiceData'); - if (invoiceData) { - //澶勭悊鍙戠エ - this.invoiceData = invoiceData; - this.setData({ - invoiceData, - }); - wx.removeStorageSync('invoiceData'); - } - }, - - init() { - this.setData({ - loading: true, - }); - const { goodsRequestList } = this; - this.handleOptionsParams({ goodsRequestList }); - }, - // 澶勭悊涓嶅悓鎯呭喌涓嬭烦杞埌缁撶畻椤垫椂闇�瑕佺殑鍙傛暟 - handleOptionsParams(options, couponList) { - let { goodsRequestList } = this; // 鍟嗗搧鍒楄〃 - let { userAddressReq } = this; // 鏀惰揣鍦板潃 - - const storeInfoList = []; // 闂ㄥ簵鍒楄〃 - // 濡傛灉鏄粠鍦板潃閫夋嫨椤甸潰杩斿洖锛屽垯浣跨敤鍦板潃鏄鹃�夋嫨椤甸潰鏂伴�夋嫨鐨勫湴鍧�鍘昏幏鍙栫粨绠楁暟鎹� - if (options.userAddressReq) { - userAddressReq = options.userAddressReq; - } - if (options.type === 'cart') { - // 浠庤喘鐗╄溅璺宠浆杩囨潵鏃讹紝鑾峰彇浼犲叆鐨勫晢鍝佸垪琛ㄦ暟鎹� - const goodsRequestListJson = wx.getStorageSync('order.goodsRequestList'); - goodsRequestList = JSON.parse(goodsRequestListJson); - } else if (typeof options.goodsRequestList === 'string') { - goodsRequestList = JSON.parse(options.goodsRequestList); - } - //鑾峰彇缁撶畻椤佃姹傛暟鎹垪琛� - const storeMap = {}; - goodsRequestList.forEach((goods) => { - if (!storeMap[goods.storeId]) { - storeInfoList.push({ - storeId: goods.storeId, - storeName: goods.storeName, - }); - storeMap[goods.storeId] = true; - } - }); - this.goodsRequestList = goodsRequestList; - this.storeInfoList = storeInfoList; - const params = { - goodsRequestList, - storeInfoList, - userAddressReq, - couponList, - }; - fetchSettleDetail(params).then( - (res) => { - this.setData({ - loading: false, - }); - this.initData(res.data); - }, - () => { - //鎺ュ彛寮傚父澶勭悊 - this.handleError(); - }, - ); - }, - initData(resData) { - // 杞崲鍟嗗搧鍗$墖鏄剧ず鏁版嵁 - const data = this.handleResToGoodsCard(resData); - this.userAddressReq = resData.userAddress; - - if (resData.userAddress) { - this.setData({ userAddress: resData.userAddress }); - } - this.setData({ settleDetailData: data }); - this.isInvalidOrder(data); - }, - - isInvalidOrder(data) { - // 澶辨晥 涓嶅湪閰嶉�佽寖鍥� 闄愯喘鐨勫晢鍝� 鎻愮ず寮圭獥 - if ( - (data.limitGoodsList && data.limitGoodsList.length > 0) || - (data.abnormalDeliveryGoodsList && - data.abnormalDeliveryGoodsList.length > 0) || - (data.inValidGoodsList && data.inValidGoodsList.length > 0) - ) { - this.setData({ popupShow: true }); - return true; - } - this.setData({ popupShow: false }); - if (data.settleType === 0) { - return true; - } - return false; - }, - - handleError() { - Toast({ - context: this, - selector: '#t-toast', - message: '缁撶畻寮傚父, 璇风◢鍚庨噸璇�', - duration: 2000, - icon: '', - }); - - setTimeout(() => { - wx.navigateBack(); - }, 1500); - this.setData({ - loading: false, - }); - }, - getRequestGoodsList(storeGoodsList) { - const filterStoreGoodsList = []; - storeGoodsList && - storeGoodsList.forEach((store) => { - const { storeName } = store; - store.skuDetailVos && - store.skuDetailVos.forEach((goods) => { - const data = goods; - data.storeName = storeName; - filterStoreGoodsList.push(data); - }); - }); - return filterStoreGoodsList; - }, - handleGoodsRequest(goods, isOutStock = false) { - const { - reminderStock, - quantity, - storeId, - uid, - saasId, - spuId, - goodsName, - skuId, - storeName, - roomId, - } = goods; - const resQuantity = isOutStock ? reminderStock : quantity; - return { - quantity: resQuantity, - storeId, - uid, - saasId, - spuId, - goodsName, - skuId, - storeName, - roomId, - }; - }, - handleResToGoodsCard(data) { - // 杞崲鏁版嵁 绗﹀悎 goods-card灞曠ず - const orderCardList = []; // 璁㈠崟鍗$墖鍒楄〃 - const storeInfoList = []; - const submitCouponList = []; //浣跨敤浼樻儬鍒稿垪琛�; - - data.storeGoodsList && - data.storeGoodsList.forEach((ele) => { - const orderCard = { - id: ele.storeId, - storeName: ele.storeName, - status: 0, - statusDesc: '', - amount: ele.storeTotalPayAmount, - goodsList: [], - }; // 璁㈠崟鍗$墖 - ele.skuDetailVos.forEach((item, index) => { - orderCard.goodsList.push({ - id: index, - thumb: item.image, - title: item.goodsName, - specs: item.skuSpecLst.map((s) => s.specValue), // 瑙勬牸鍒楄〃 string[] - price: item.tagPrice || item.settlePrice || '0', // 浼樺厛鍙栭檺鏃舵椿鍔ㄤ环 - settlePrice: item.settlePrice, - titlePrefixTags: item.tagText ? [{ text: item.tagText }] : [], - num: item.quantity, - skuId: item.skuId, - spuId: item.spuId, - storeId: item.storeId, - }); - }); - - storeInfoList.push({ - storeId: ele.storeId, - storeName: ele.storeName, - remark: '', - }); - submitCouponList.push({ - storeId: ele.storeId, - couponList: ele.couponList || [], - }); - this.noteInfo.push(''); - this.tempNoteInfo.push(''); - orderCardList.push(orderCard); - }); - - this.setData({ orderCardList, storeInfoList, submitCouponList }); - return data; - }, - onGotoAddress() { - /** 鑾峰彇涓�涓狿romise */ - getAddressPromise() - .then((address) => { - this.handleOptionsParams({ - userAddressReq: { ...address, checked: true }, - }); - }) - .catch(() => {}); - - const { userAddressReq } = this; // 鏀惰揣鍦板潃 - - let id = ''; - - if (userAddressReq?.id) { - id = `&id=${userAddressReq.id}`; - } - - wx.navigateTo({ - url: `/pages/usercenter/address/list/index?selectMode=1&isOrderSure=1${id}`, - }); - }, - onNotes(e) { - const { storenoteindex: storeNoteIndex } = e.currentTarget.dataset; - // 娣诲姞澶囨敞淇℃伅 - this.setData({ - dialogShow: true, - storeNoteIndex, - }); - }, - onInput(e) { - const { storeNoteIndex } = this.data; - this.noteInfo[storeNoteIndex] = e.detail.value; - }, - onBlur() { - this.setData({ - notesPosition: 'center', - }); - }, - onFocus() { - this.setData({ - notesPosition: 'self', - }); - }, - onTap() { - this.setData({ - placeholder: '', - }); - }, - onNoteConfirm() { - // 澶囨敞淇℃伅 纭鎸夐挳 - const { storeInfoList, storeNoteIndex } = this.data; - this.tempNoteInfo[storeNoteIndex] = this.noteInfo[storeNoteIndex]; - storeInfoList[storeNoteIndex].remark = this.noteInfo[storeNoteIndex]; - - this.setData({ - dialogShow: false, - storeInfoList, - }); - }, - onNoteCancel() { - // 澶囨敞淇℃伅 鍙栨秷鎸夐挳 - const { storeNoteIndex } = this.data; - this.noteInfo[storeNoteIndex] = this.tempNoteInfo[storeNoteIndex]; - this.setData({ - dialogShow: false, - }); - }, - - onSureCommit() { - // 鍟嗗搧搴撳瓨涓嶈冻缁х画缁撶畻 - const { settleDetailData } = this.data; - const { outOfStockGoodsList, storeGoodsList, inValidGoodsList } = - settleDetailData; - if ( - (outOfStockGoodsList && outOfStockGoodsList.length > 0) || - (inValidGoodsList && storeGoodsList) - ) { - // 鍚堝苟姝e父鍟嗗搧 鍜� 搴撳瓨 涓嶈冻鍟嗗搧缁х画鏀粯 - // 杩囨护涓嶅繀瑕佺殑鍙傛暟 - const filterOutGoodsList = []; - outOfStockGoodsList && - outOfStockGoodsList.forEach((outOfStockGoods) => { - const { storeName } = outOfStockGoods; - outOfStockGoods.unSettlementGoods.forEach((ele) => { - const data = ele; - data.quantity = ele.reminderStock; - data.storeName = storeName; - filterOutGoodsList.push(data); - }); - }); - const filterStoreGoodsList = this.getRequestGoodsList(storeGoodsList); - const goodsRequestList = filterOutGoodsList.concat(filterStoreGoodsList); - this.handleOptionsParams({ goodsRequestList }); - } - }, - // 鎻愪氦璁㈠崟 - submitOrder() { - const { - settleDetailData, - userAddressReq, - invoiceData, - storeInfoList, - submitCouponList, - } = this.data; - const { goodsRequestList } = this; - - if (!userAddressReq && !settleDetailData.userAddress) { - Toast({ - context: this, - selector: '#t-toast', - message: '璇锋坊鍔犳敹璐у湴鍧�', - duration: 2000, - icon: 'help-circle', - }); - - return; - } - if ( - this.payLock || - !settleDetailData.settleType || - !settleDetailData.totalAmount - ) { - return; - } - this.payLock = true; - const resSubmitCouponList = this.handleCouponList(submitCouponList); - const params = { - userAddressReq: settleDetailData.userAddress || userAddressReq, - goodsRequestList: goodsRequestList, - userName: settleDetailData.userAddress.name || userAddressReq.name, - totalAmount: settleDetailData.totalPayAmount, //鍙栦紭鎯犲悗鐨勭粨绠楅噾棰� - invoiceRequest: null, - storeInfoList, - couponList: resSubmitCouponList, - }; - if (invoiceData && invoiceData.email) { - params.invoiceRequest = invoiceData; - } - commitPay(params).then( - (res) => { - this.payLock = false; - const { data } = res; - // 鎻愪氦鍑虹幇 澶辨晥 涓嶅湪閰嶉�佽寖鍥� 闄愯喘鐨勫晢鍝� 鎻愮ず寮圭獥 - if (this.isInvalidOrder(data)) { - return; - } - if (res.code === 'Success') { - this.handlePay(data, settleDetailData); - } else { - Toast({ - context: this, - selector: '#t-toast', - message: res.msg || '鎻愪氦璁㈠崟瓒呮椂锛岃绋嶅悗閲嶈瘯', - duration: 2000, - icon: '', - }); - setTimeout(() => { - // 鎻愪氦鏀粯澶辫触 杩斿洖璐墿杞� - wx.navigateBack(); - }, 2000); - } - }, - (err) => { - this.payLock = false; - if ( - err.code === 'CONTAINS_INSUFFICIENT_GOODS' || - err.code === 'TOTAL_AMOUNT_DIFFERENT' - ) { - Toast({ - context: this, - selector: '#t-toast', - message: err.msg || '鏀粯寮傚父', - duration: 2000, - icon: '', - }); - this.init(); - } else if (err.code === 'ORDER_PAY_FAIL') { - Toast({ - context: this, - selector: '#t-toast', - message: '鏀粯澶辫触', - duration: 2000, - icon: 'close-circle', - }); - setTimeout(() => { - wx.redirectTo({ url: '/order/list' }); - }); - } else if (err.code === 'ILLEGAL_CONFIG_PARAM') { - Toast({ - context: this, - selector: '#t-toast', - message: - '鏀粯澶辫触锛屽井淇℃敮浠樺晢鎴峰彿璁剧疆鏈夎锛岃鍟嗗閲嶆柊妫�鏌ユ敮浠樿缃��', - duration: 2000, - icon: 'close-circle', - }); - setTimeout(() => { - wx.redirectTo({ url: '/order/list' }); - }); - } else { - Toast({ - context: this, - selector: '#t-toast', - message: err.msg || '鎻愪氦鏀粯瓒呮椂锛岃绋嶅悗閲嶈瘯', - duration: 2000, - icon: '', - }); - setTimeout(() => { - // 鎻愪氦鏀粯澶辫触 杩斿洖璐墿杞� - wx.navigateBack(); - }, 2000); - } - }, - ); - }, - - // 澶勭悊鏀粯 - handlePay(data, settleDetailData) { - const { channel, payInfo, tradeNo, interactId, transactionId } = data; - const { totalAmount, totalPayAmount } = settleDetailData; - const payOrderInfo = { - payInfo: payInfo, - orderId: tradeNo, - orderAmt: totalAmount, - payAmt: totalPayAmount, - interactId: interactId, - tradeNo: tradeNo, - transactionId: transactionId, - }; - - if (channel === 'wechat') { - wechatPayOrder(payOrderInfo); - } - }, - - hide() { - // 闅愯棌 popup - this.setData({ - 'settleDetailData.abnormalDeliveryGoodsList': [], - }); - }, - onReceipt() { - // 璺宠浆 寮�鍙戠エ - const invoiceData = this.invoiceData || {}; - wx.navigateTo({ - url: `/pages/order/receipt/index?invoiceData=${JSON.stringify( - invoiceData, - )}`, - }); - }, - - onCoupons(e) { - const { submitCouponList, currentStoreId } = this.data; - const { goodsRequestList } = this; - const { selectedList } = e.detail; - const tempSubmitCouponList = submitCouponList.map((storeCoupon) => { - return { - couponList: - storeCoupon.storeId === currentStoreId - ? selectedList - : storeCoupon.couponList, - }; - }); - const resSubmitCouponList = this.handleCouponList(tempSubmitCouponList); - //纭畾閫夋嫨浼樻儬鍒� - this.handleOptionsParams({ goodsRequestList }, resSubmitCouponList); - this.setData({ couponsShow: false }); - }, - onOpenCoupons(e) { - const { storeid } = e.currentTarget.dataset; - this.setData({ - couponsShow: true, - currentStoreId: storeid, - }); - }, - - handleCouponList(storeCouponList) { - //澶勭悊闂ㄥ簵浼樻儬鍒� 杞崲鎴愭帴鍙i渶瑕� - if (!storeCouponList) return []; - const resSubmitCouponList = []; - storeCouponList.forEach((ele) => { - resSubmitCouponList.push(...ele.couponList); - }); - return resSubmitCouponList; - }, - - onGoodsNumChange(e) { - const { - detail: { value }, - currentTarget: { - dataset: { goods }, - }, - } = e; - const index = this.goodsRequestList.findIndex( - ({ storeId, spuId, skuId }) => - goods.storeId === storeId && - goods.spuId === spuId && - goods.skuId === skuId, - ); - if (index >= 0) { - // eslint-disable-next-line no-confusing-arrow - const goodsRequestList = this.goodsRequestList.map((item, i) => - i === index ? { ...item, quantity: value } : item, - ); - this.handleOptionsParams({ goodsRequestList }); - } - }, - - onPopupChange() { - this.setData({ - popupShow: !this.data.popupShow, - }); - }, -}); diff --git a/pages/order/order-confirm/index.json b/pages/order/order-confirm/index.json deleted file mode 100644 index 11f25ac..0000000 --- a/pages/order/order-confirm/index.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "navigationBarTitleText": "璁㈠崟纭", - "usingComponents": { - "t-popup": "tdesign-miniprogram/popup/popup", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-textarea": "tdesign-miniprogram/textarea/textarea", - "price": "/components/price/index", - "select-coupons": "../components/selectCoupons/selectCoupons", - "no-goods": "../components/noGoods/noGoods", - "t-image": "/components/webp-image/index", - "address-card": "./components/address-card/index" - } -} \ No newline at end of file diff --git a/pages/order/order-confirm/index.wxml b/pages/order/order-confirm/index.wxml deleted file mode 100644 index 6d909e6..0000000 --- a/pages/order/order-confirm/index.wxml +++ /dev/null @@ -1,151 +0,0 @@ -<wxs module="order" src="./order.wxs" /> - -<wxs module="handleInvoice" src="./handleInvoice.wxs" /> -<wxs module="getNotes" src="./getNotes.wxs" /> -<view class="order-sure" wx:if="{{!loading}}"> - <address-card addressData="{{userAddress}}" bind:addclick="onGotoAddress" bind:addressclick="onGotoAddress" /> - <view - class="order-wrapper" - wx:for="{{settleDetailData.storeGoodsList}}" - wx:for-item="stores" - wx:for-index="storeIndex" - wx:key="storeIndex" - > - <view class="store-wrapper"> - <t-icon prefix="wr" size="40rpx" color="#333333" name="store" class="store-logo" /> - {{stores.storeName}} - </view> - <view - wx:if="{{orderCardList[storeIndex].goodsList.length > 0}}" - wx:for="{{orderCardList[storeIndex].goodsList}}" - wx:for-item="goods" - wx:for-index="gIndex" - wx:key="id" - class="goods-wrapper" - > - <t-image src="{{goods.thumb}}" t-class="goods-image" mode="aspectFill" /> - <view class="goods-content"> - <view class="goods-title">{{goods.title}}</view> - <view>{{goods.specs}}</view> - </view> - <view class="goods-right"> - <price wr-class="goods-price" price="{{goods.price}}" fill="{{true}}" decimalSmaller /> - <view class="goods-num">x{{goods.num}}</view> - </view> - </view> - </view> - <view class="pay-detail"> - <view class="pay-item"> - <text>鍟嗗搧鎬婚</text> - <price - fill - decimalSmaller - wr-class="pay-item__right font-bold" - price="{{settleDetailData.totalSalePrice || '0'}}" - /> - </view> - <view class="pay-item"> - <text>杩愯垂</text> - <view class="pay-item__right font-bold"> - <block wx:if="{{settleDetailData.totalDeliveryFee && settleDetailData.totalDeliveryFee != 0}}"> - + - <price fill decimalSmaller price="{{settleDetailData.totalDeliveryFee}}" /> - </block> - <text wx:else>鍏嶈繍璐�</text> - </view> - </view> - <view class="pay-item"> - <text>娲诲姩浼樻儬</text> - <view class="pay-item__right primary font-bold"> - - - <price fill price="{{settleDetailData.totalPromotionAmount || 0}}" /> - </view> - </view> - <view class="pay-item"> - <text>浼樻儬鍒�</text> - <view - class="pay-item__right" - data-storeid="{{settleDetailData.storeGoodsList[0].storeId}}" - catchtap="onOpenCoupons" - > - <block wx:if="{{submitCouponList.length}}"> - <block wx:if="{{settleDetailData.totalCouponAmount && settleDetailData.totalCouponAmount !== '0'}}"> - -<price fill decimalSmaller price="{{settleDetailData.totalCouponAmount}}" /> - </block> - <block wx:else>閫夋嫨浼樻儬鍒�</block> - </block> - <text wx:else>鏃犲彲鐢�</text> - <t-icon name="chevron-right" size="32rpx" color="#BBBBBB" /> - </view> - </view> - <view class="pay-item" wx:if="{{settleDetailData.invoiceSupport}}"> - <text>鍙戠エ</text> - <view class="pay-item__right" catchtap="onReceipt"> - <text>{{handleInvoice(invoiceData)}}</text> - <t-icon name="chevron-right" size="32rpx" color="#BBBBBB" /> - </view> - </view> - <view class="pay-item"> - <text>璁㈠崟澶囨敞</text> - <view class="pay-item__right" data-storenoteindex="{{0}}" catchtap="onNotes"> - <text class="pay-remark" - >{{getNotes(storeInfoList, 0) ? getNotes(storeInfoList, 0) :'閫夊~锛屽缓璁厛鍜屽晢瀹舵矡閫氱‘璁�'}}</text - > - <t-icon name="chevron-right" size="32rpx" color="#BBBBBB" /> - </view> - </view> - </view> - <view class="amount-wrapper"> - <view class="pay-amount"> - <text class="order-num">鍏眥{settleDetailData.totalGoodsCount}}浠�</text> - <text>灏忚</text> - <price class="total-price" price="{{settleDetailData.totalPayAmount}}" fill="{{false}}" decimalSmaller /> - </view> - </view> - <view class="wx-pay-cover"> - <view class="wx-pay"> - <price decimalSmaller fill class="price" price="{{settleDetailData.totalPayAmount || '0'}}" /> - <view class="submit-btn {{ settleDetailData.settleType === 1 ? '':'btn-gray'}}" bindtap="submitOrder"> - 鎻愪氦璁㈠崟 - </view> - </view> - </view> - <t-dialog - t-class="add-notes" - title="濉啓澶囨敞淇℃伅" - visible="{{dialogShow}}" - confirm-btn="纭" - cancel-btn="鍙栨秷" - t-class-content="add-notes__content" - t-class-confirm="dialog__button-confirm" - t-class-cancel="dialog__button-cancel" - bindconfirm="onNoteConfirm" - bindcancel="onNoteCancel" - > - <t-textarea - slot="content" - focus="{{dialogShow}}" - class="notes" - t-class="add-notes__textarea" - value="{{storeInfoList[storeNoteIndex] && storeInfoList[storeNoteIndex].remark}}" - placeholder="澶囨敞淇℃伅" - t-class-textarea="add-notes__textarea__font" - bindfocus="onFocus" - bindblur="onBlur" - bindchange="onInput" - maxlength="{{50}}" - /> - </t-dialog> - <t-popup visible="{{popupShow}}" placement="bottom" bind:visible-change="onPopupChange"> - <no-goods slot="content" bind:change="onSureCommit" settleDetailData="{{settleDetailData}}" /> - </t-popup> - <select-coupons - bind:sure="onCoupons" - storeId="{{currentStoreId}}" - orderSureCouponList="{{couponList}}" - promotionGoodsList="{{promotionGoodsList}}" - couponsShow="{{couponsShow}}" - /> -</view> -<t-toast id="t-toast" /> -<t-dialog id="t-dialog" /> diff --git a/pages/order/order-confirm/index.wxss b/pages/order/order-confirm/index.wxss deleted file mode 100644 index 8b201c8..0000000 --- a/pages/order/order-confirm/index.wxss +++ /dev/null @@ -1,221 +0,0 @@ -.order-sure { - box-sizing: border-box; - background: #f6f6f6; - padding: 24rpx 0 calc(env(safe-area-inset-bottom) + 136rpx); - min-height: 100vh; -} - -.order-sure .wx-pay-cover { - position: fixed; - left: 0; - bottom: 0; - right: 0; - z-index: 10; - background: #fff; - height: 112rpx; - padding-bottom: env(safe-area-inset-bottom); -} -.order-sure .wx-pay-cover .wx-pay { - width: 100%; - height: 100rpx; - box-sizing: border-box; - padding: 0rpx 32rpx; - display: flex; - justify-content: space-between; - align-items: center; -} -.order-sure .wx-pay-cover .wx-pay .price { - color: #fa4126; - font-weight: bold; - font-size: 63rpx; - line-height: 88rpx; -} - -.order-sure .wx-pay-cover .wx-pay .submit-btn { - height: 80rpx; - width: 240rpx; - border-radius: 40rpx; - background-color: #fa4126; - color: #ffffff; - line-height: 80rpx; - font-weight: bold; - font-size: 28rpx; - text-align: center; -} -.order-sure .wx-pay-cover .wx-pay .btn-gray { - background: #cccccc; -} - -.order-wrapper .store-wrapper { - width: 100%; - height: 96rpx; - box-sizing: border-box; - padding: 0 32rpx; - display: flex; - align-items: center; - font-size: 28rpx; - line-height: 40rpx; - color: #333333; - background-color: #ffffff; -} -.order-wrapper .store-wrapper .store-logo { - margin-right: 16rpx; -} -.order-wrapper .goods-wrapper { - width: 100%; - box-sizing: border-box; - padding: 16rpx 32rpx; - display: flex; - align-items: flex-start; - justify-content: space-between; - font-size: 24rpx; - line-height: 32rpx; - color: #999999; - background-color: #ffffff; -} -.goods-wrapper .goods-image { - width: 176rpx; - height: 176rpx; - border-radius: 8rpx; - overflow: hidden; - margin-right: 16rpx; -} -.goods-wrapper .goods-content { - flex: 1; -} - -.goods-wrapper .goods-content .goods-title { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; - text-overflow: ellipsis; - font-size: 28rpx; - line-height: 40rpx; - margin-bottom: 12rpx; - color: #333333; - margin-right: 16rpx; -} - -.goods-wrapper .goods-right { - min-width: 128rpx; - display: flex; - flex-direction: column; - align-items: flex-end; -} - -.goods-right .goods-price { - color: #333333; - font-size: 32rpx; - line-height: 48rpx; - font-weight: bold; - margin-bottom: 16rpx; -} - -.goods-right .goods-num { - text-align: right; -} - -.order-sure .pay-detail { - background-color: #ffffff; - padding: 16rpx 32rpx; - width: 100%; - box-sizing: border-box; -} - -.order-sure .pay-detail .pay-item { - width: 100%; - height: 72rpx; - display: flex; - align-items: center; - justify-content: space-between; - font-size: 26rpx; - line-height: 36rpx; - color: #666666; -} -.order-sure .pay-detail .pay-item .pay-item__right { - color: #333333; - font-size: 24rpx; - display: flex; - align-items: center; - justify-content: flex-end; - max-width: 400rpx; -} -.order-sure .pay-detail .pay-item .pay-item__right .pay-remark { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - max-width: 400rpx; - text-overflow: ellipsis; - overflow: hidden; -} -.order-sure .pay-detail .pay-item .font-bold { - font-weight: bold; -} -.order-sure .pay-detail .pay-item .primary { - color: #fa4126; -} - -.add-notes .add-notes__content { - --td-textarea-background-color: #f5f5f5; -} - -.add-notes .t-textarea__placeholder { - color: #aeb3b7; -} - -.add-notes .add-notes__textarea__font { - font-size: 26rpx; -} -.add-notes .add-notes__textarea { - margin-top: 32rpx; -} - -.order-sure .add-notes .dialog__message { - border-radius: 8rpx; -} - -.order-sure .add-notes .dialog__button-cancel::after { - border-right: 0; -} - -.order-sure .amount-wrapper { - width: 100%; - box-sizing: border-box; - background-color: #ffffff; - padding: 0rpx 32rpx; - height: 96rpx; -} - -.order-sure .pay-amount { - width: 100%; - height: 96rpx; - display: flex; - align-items: center; - justify-content: flex-end; - font-size: 28rpx; - color: #333333; - position: relative; -} -.order-sure .pay-amount::after { - position: absolute; - content: ' '; - top: 0; - left: 0; - width: 200%; - height: 200%; - transform: scale(0.5); - transform-origin: 0 0; - border-top: 2rpx solid #f5f5f5; -} -.order-sure .pay-amount .order-num { - color: #999999; - padding-right: 8rpx; -} - -.order-sure .pay-amount .total-price { - font-size: 36rpx; - color: #fa4126; - font-weight: bold; - padding-left: 8rpx; -} diff --git a/pages/order/order-confirm/order.wxs b/pages/order/order-confirm/order.wxs deleted file mode 100644 index 42f3de1..0000000 --- a/pages/order/order-confirm/order.wxs +++ /dev/null @@ -1,8 +0,0 @@ -var toHide = function (array) { - if (!array) return; - var mphone = array.substring(0, 3) + '****' + array.substring(7); - return mphone; -}; -module.exports = { - toHide: toHide, -}; diff --git a/pages/order/order-confirm/pay.js b/pages/order/order-confirm/pay.js deleted file mode 100644 index 0c27c3c..0000000 --- a/pages/order/order-confirm/pay.js +++ /dev/null @@ -1,115 +0,0 @@ -import Dialog from 'tdesign-miniprogram/dialog/index'; -import Toast from 'tdesign-miniprogram/toast/index'; - -import { dispatchCommitPay } from '../../../services/order/orderConfirm'; - -// 鐪熷疄鐨勬彁浜ゆ敮浠� -export const commitPay = (params) => { - return dispatchCommitPay({ - goodsRequestList: params.goodsRequestList, // 寰呯粨绠楃殑鍟嗗搧闆嗗悎 - invoiceRequest: params.invoiceRequest, // 鍙戠エ淇℃伅 - // isIgnore: params.isIgnore || false, // 鍒犳帀 鏄惁蹇借搴撳瓨涓嶈冻鍜屽晢鍝佸け鏁�,缁х画缁撶畻,true=缁х画缁撶畻 璐墿杞﹁璧嬪�糵alse - userAddressReq: params.userAddressReq, // 鍦板潃淇℃伅(鐢ㄦ埛鍦ㄨ喘鐗╅�夋嫨鏇存崲鍦板潃) - currency: params.currency || 'CNY', // 鏀粯璐у竵: 浜烘皯甯�=CNY锛岀編鍏�=USD - logisticsType: params.logisticsType || 1, // 閰嶉�佹柟寮� 0=鏃犻渶閰嶉�� 1=蹇�� 2=鍟嗗 3=鍚屽煄 4=鑷彁 - // orderMark: params.orderMark, // 涓嬪崟澶囨敞 - orderType: params.orderType || 0, // 璁㈠崟绫诲瀷 0=鏅�氳鍗� 1=铏氭嫙璁㈠崟 - payType: params.payType || 1, // 鏀粯绫诲瀷(0=绾夸笂銆�1=绾夸笅) - totalAmount: params.totalAmount, // 鏂板瀛楁"totalAmount"鎬荤殑鏀粯閲戦 - userName: params.userName, // 鐢ㄦ埛鍚� - payWay: 1, - authorizationCode: '', //loginCode, // 鐧诲綍鍑瘉 - storeInfoList: params.storeInfoList, //澶囨敞淇℃伅鍒楄〃 - couponList: params.couponList, - groupInfo: params.groupInfo, - }); -}; - -export const paySuccess = (payOrderInfo) => { - const { payAmt, tradeNo, groupId, promotionId } = payOrderInfo; - // 鏀粯鎴愬姛 - Toast({ - context: this, - selector: '#t-toast', - message: '鏀粯鎴愬姛', - duration: 2000, - icon: 'check-circle', - }); - - const params = { - totalPaid: payAmt, - orderNo: tradeNo, - }; - if (groupId) { - params.groupId = groupId; - } - if (promotionId) { - params.promotionId = promotionId; - } - const paramsStr = Object.keys(params) - .map((k) => `${k}=${params[k]}`) - .join('&'); - // 璺宠浆鏀粯缁撴灉椤甸潰 - wx.redirectTo({ url: `/pages/order/pay-result/index?${paramsStr}` }); -}; - -export const payFail = (payOrderInfo, resultMsg) => { - if (resultMsg === 'requestPayment:fail cancel') { - if (payOrderInfo.dialogOnCancel) { - //缁撶畻椤碉紝鍙栨秷浠樻锛宒ialog鎻愮ず - Dialog.confirm({ - title: '鏄惁鏀惧純浠樻', - content: '鍟嗗搧鍙兘寰堝揩灏变細琚姠绌哄摝锛屾槸鍚︽斁寮冧粯娆撅紵', - confirmBtn: '鏀惧純', - cancelBtn: '缁х画浠樻', - }).then(() => { - wx.redirectTo({ url: '/pages/order/order-list/index' }); - }); - } else { - //璁㈠崟鍒楄〃椤碉紝璁㈠崟璇︽儏椤碉紝鍙栨秷浠樻锛宼oast鎻愮ず - Toast({ - context: this, - selector: '#t-toast', - message: '鏀粯鍙栨秷', - duration: 2000, - icon: 'close-circle', - }); - } - } else { - Toast({ - context: this, - selector: '#t-toast', - message: `鏀粯澶辫触锛�${resultMsg}`, - duration: 2000, - icon: 'close-circle', - }); - setTimeout(() => { - wx.redirectTo({ url: '/pages/order/order-list/index' }); - }, 2000); - } -}; - -// 寰俊鏀粯鏂瑰紡 -export const wechatPayOrder = (payOrderInfo) => { - // const payInfo = JSON.parse(payOrderInfo.payInfo); - // const { timeStamp, nonceStr, signType, paySign } = payInfo; - return new Promise((resolve) => { - // demo 涓洿鎺ヨ蛋鏀粯鎴愬姛 - paySuccess(payOrderInfo); - resolve(); - /* wx.requestPayment({ - timeStamp, - nonceStr, - package: payInfo.package, - signType, - paySign, - success: function () { - paySuccess(payOrderInfo); - resolve(); - }, - fail: function (err) { - payFail(payOrderInfo, err.errMsg); - }, - }); */ - }); -}; diff --git a/pages/order/order-detail/index.js b/pages/order/order-detail/index.js deleted file mode 100644 index 8c09aee..0000000 --- a/pages/order/order-detail/index.js +++ /dev/null @@ -1,288 +0,0 @@ -import { formatTime } from '../../../utils/util'; -import { OrderStatus, LogisticsIconMap } from '../config'; -import { - fetchBusinessTime, - fetchOrderDetail, -} from '../../../services/order/orderDetail'; -import Toast from 'tdesign-miniprogram/toast/index'; -import { getAddressPromise } from '../../usercenter/address/list/util'; - -Page({ - data: { - pageLoading: true, - order: {}, // 鍚庡彴杩斿洖鐨勫師濮嬫暟鎹� - _order: {}, // 鍐呴儴浣跨敤鍜屾彁渚涚粰 order-card 鐨勬暟鎹� - storeDetail: {}, - countDownTime: null, - addressEditable: false, - backRefresh: false, // 鐢ㄤ簬鎺ユ敹鍏朵粬椤甸潰back鏃剁殑鐘舵�� - formatCreateTime: '', //鏍煎紡鍖栬鍗曞垱寤烘椂闂� - logisticsNodes: [], - /** 璁㈠崟璇勮鐘舵�� */ - orderHasCommented: true, - }, - - onLoad(query) { - this.orderNo = query.orderNo; - this.init(); - this.navbar = this.selectComponent('#navbar'); - this.pullDownRefresh = this.selectComponent('#wr-pull-down-refresh'); - }, - - onShow() { - // 褰撲粠鍏朵粬椤甸潰杩斿洖锛屽苟涓� backRefresh 琚疆涓� true 鏃讹紝鍒锋柊鏁版嵁 - if (!this.data.backRefresh) return; - this.onRefresh(); - this.setData({ backRefresh: false }); - }, - - onPageScroll(e) { - this.pullDownRefresh && this.pullDownRefresh.onPageScroll(e); - }, - - onImgError(e) { - if (e.detail) { - console.error('img 鍔犺浇澶辫触'); - } - }, - - // 椤甸潰鍒濆鍖栵紝浼氬睍绀簆ageLoading - init() { - this.setData({ pageLoading: true }); - this.getStoreDetail(); - this.getDetail() - .then(() => { - this.setData({ pageLoading: false }); - }) - .catch((e) => { - console.error(e); - }); - }, - - // 椤甸潰鍒锋柊锛屽睍绀轰笅鎷夊埛鏂� - onRefresh() { - this.init(); - // 濡傛灉涓婁竴椤典负璁㈠崟鍒楄〃锛岄�氱煡鍏跺埛鏂版暟鎹� - const pages = getCurrentPages(); - const lastPage = pages[pages.length - 2]; - if (lastPage) { - lastPage.data.backRefresh = true; - } - }, - - // 椤甸潰鍒锋柊锛屽睍绀轰笅鎷夊埛鏂� - onPullDownRefresh_(e) { - const { callback } = e.detail; - return this.getDetail().then(() => callback && callback()); - }, - - getDetail() { - const params = { - parameter: this.orderNo, - }; - return fetchOrderDetail(params).then((res) => { - const order = res.data; - const _order = { - id: order.orderId, - orderNo: order.orderNo, - parentOrderNo: order.parentOrderNo, - storeId: order.storeId, - storeName: order.storeName, - status: order.orderStatus, - statusDesc: order.orderStatusName, - amount: order.paymentAmount, - totalAmount: order.goodsAmountApp, - logisticsNo: order.logisticsVO.logisticsNo, - goodsList: (order.orderItemVOs || []).map((goods) => - Object.assign({}, goods, { - id: goods.id, - thumb: goods.goodsPictureUrl, - title: goods.goodsName, - skuId: goods.skuId, - spuId: goods.spuId, - specs: (goods.specifications || []).map((s) => s.specValue), - price: goods.tagPrice ? goods.tagPrice : goods.actualPrice, // 鍟嗗搧閿�鍞崟浠�, 浼樺厛鍙栭檺鏃舵椿鍔ㄤ环 - num: goods.buyQuantity, - titlePrefixTags: goods.tagText ? [{ text: goods.tagText }] : [], - buttons: goods.buttonVOs || [], - }), - ), - buttons: order.buttonVOs || [], - createTime: order.createTime, - receiverAddress: this.composeAddress(order), - groupInfoVo: order.groupInfoVo, - }; - this.setData({ - order, - _order, - formatCreateTime: formatTime( - parseFloat(`${order.createTime}`), - 'YYYY-MM-DD HH:mm', - ), // 鏍煎紡鍖栬鍗曞垱寤烘椂闂� - countDownTime: this.computeCountDownTime(order), - addressEditable: - [OrderStatus.PENDING_PAYMENT, OrderStatus.PENDING_DELIVERY].includes( - order.orderStatus, - ) && order.orderSubStatus !== -1, // 璁㈠崟姝e湪鍙栨秷瀹℃牳鏃朵笉鍏佽淇敼鍦板潃锛堜絾鏄繑鍥炵殑鐘舵�佺爜涓庡緟鍙戣揣涓�鑷达級 - isPaid: !!order.paymentVO.paySuccessTime, - invoiceStatus: this.datermineInvoiceStatus(order), - invoiceDesc: order.invoiceDesc, - invoiceType: - order.invoiceVO?.invoiceType === 5 ? '鐢靛瓙鏅�氬彂绁�' : '涓嶅紑鍙戠エ', //鏄惁寮�绁� 0-涓嶅紑 5-鐢靛瓙鍙戠エ - logisticsNodes: this.flattenNodes(order.trajectoryVos || []), - }); - }); - }, - - // 灞曞紑鐗╂祦鑺傜偣 - flattenNodes(nodes) { - return (nodes || []).reduce((res, node) => { - return (node.nodes || []).reduce((res1, subNode, index) => { - res1.push({ - title: index === 0 ? node.title : '', // 瀛愯妭鐐逛腑浠呯涓�涓樉绀簍itle - desc: subNode.status, - date: formatTime(+subNode.timestamp, 'YYYY-MM-DD HH:mm:ss'), - icon: index === 0 ? LogisticsIconMap[node.code] || '' : '', // 瀛愯妭鐐逛腑浠呯涓�涓樉绀篿con - }); - return res1; - }, res); - }, []); - }, - - datermineInvoiceStatus(order) { - // 1-宸插紑绁� - // 2-鏈紑绁紙鍙ˉ寮�锛� - // 3-鏈紑绁� - // 4-闂ㄥ簵涓嶆敮鎸佸紑绁� - return order.invoiceStatus; - }, - - // 鎷兼帴鐪佸競鍖� - composeAddress(order) { - return [ - //order.logisticsVO.receiverProvince, - order.logisticsVO.receiverCity, - order.logisticsVO.receiverCountry, - order.logisticsVO.receiverArea, - order.logisticsVO.receiverAddress, - ] - .filter((s) => !!s) - .join(' '); - }, - - getStoreDetail() { - fetchBusinessTime().then((res) => { - const storeDetail = { - storeTel: res.data.telphone, - storeBusiness: res.data.businessTime.join('\n'), - }; - this.setData({ storeDetail }); - }); - }, - - // 浠呭寰呮敮浠樼姸鎬佽绠椾粯娆惧�掕鏃� - // 杩斿洖鏃堕棿鑻ユ槸澶т簬2020.01.01锛岃鏄庤繑鍥炵殑鏄叧闂椂闂达紝鍚﹀垯璇存槑杩斿洖鐨勭洿鎺ュ氨鏄墿浣欐椂闂� - computeCountDownTime(order) { - if (order.orderStatus !== OrderStatus.PENDING_PAYMENT) return null; - return order.autoCancelTime > 1577808000000 - ? order.autoCancelTime - Date.now() - : order.autoCancelTime; - }, - - onCountDownFinish() { - //this.setData({ countDownTime: -1 }); - const { countDownTime, order } = this.data; - if ( - countDownTime > 0 || - (order && order.groupInfoVo && order.groupInfoVo.residueTime > 0) - ) { - this.onRefresh(); - } - }, - - onGoodsCardTap(e) { - const { index } = e.currentTarget.dataset; - const goods = this.data.order.orderItemVOs[index]; - wx.navigateTo({ url: `/pages/goods/details/index?spuId=${goods.spuId}` }); - }, - - onEditAddressTap() { - getAddressPromise() - .then((address) => { - this.setData({ - 'order.logisticsVO.receiverName': address.name, - 'order.logisticsVO.receiverPhone': address.phone, - '_order.receiverAddress': address.address, - }); - }) - .catch(() => {}); - - wx.navigateTo({ - url: `/pages/usercenter/address/list/index?selectMode=1`, - }); - }, - - onOrderNumCopy() { - wx.setClipboardData({ - data: this.data.order.orderNo, - }); - }, - - onDeliveryNumCopy() { - wx.setClipboardData({ - data: this.data.order.logisticsVO.logisticsNo, - }); - }, - - onToInvoice() { - wx.navigateTo({ - url: `/pages/order/invoice/index?orderNo=${this.data._order.orderNo}`, - }); - }, - - onSuppleMentInvoice() { - wx.navigateTo({ - url: `/pages/order/receipt/index?orderNo=${this.data._order.orderNo}`, - }); - }, - - onDeliveryClick() { - const logisticsData = { - nodes: this.data.logisticsNodes, - company: this.data.order.logisticsVO.logisticsCompanyName, - logisticsNo: this.data.order.logisticsVO.logisticsNo, - phoneNumber: this.data.order.logisticsVO.logisticsCompanyTel, - }; - wx.navigateTo({ - url: `/pages/order/delivery-detail/index?data=${encodeURIComponent( - JSON.stringify(logisticsData), - )}`, - }); - }, - - /** 璺宠浆璁㈠崟璇勪环 */ - navToCommentCreate() { - wx.navigateTo({ - url: `/pages/order/createComment/index?orderNo=${this.orderNo}`, - }); - }, - - /** 璺宠浆鎷煎洟璇︽儏/鍒嗕韩椤�*/ - toGrouponDetail() { - wx.showToast({ title: '鐐瑰嚮浜嗘嫾鍥�' }); - }, - - clickService() { - Toast({ - context: this, - selector: '#t-toast', - message: '鎮ㄧ偣鍑讳簡鑱旂郴瀹㈡湇', - }); - }, - - onOrderInvoiceView() { - wx.navigateTo({ - url: `/pages/order/invoice/index?orderNo=${this.orderNo}`, - }); - }, -}); diff --git a/pages/order/order-detail/index.json b/pages/order/order-detail/index.json deleted file mode 100644 index b8bbaec..0000000 --- a/pages/order/order-detail/index.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "navigationBarTitleText": "璁㈠崟璇︽儏", - "usingComponents": { - "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh", - "t-button": "tdesign-miniprogram/button/button", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-image": "/components/webp-image/index", - "t-count-down": "tdesign-miniprogram/count-down/count-down", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "price": "/components/price/index", - "order-card": "../components/order-card/index", - "order-goods-card": "../components/order-goods-card/index", - "order-button-bar": "../components/order-button-bar/index" - } -} \ No newline at end of file diff --git a/pages/order/order-detail/index.wxml b/pages/order/order-detail/index.wxml deleted file mode 100644 index f27bf9e..0000000 --- a/pages/order/order-detail/index.wxml +++ /dev/null @@ -1,159 +0,0 @@ -<t-pull-down-refresh id="t-pull-down-refresh" bindrefresh="onPullDownRefresh_" t-class-indicator="t-class-indicator"> - <!-- 椤甸潰鍐呭 --> - <view class="order-detail"> - <view class="header"> - <view class="order-detail__header"> - <view class="title">{{_order.statusDesc}}</view> - <view class="desc"> - <block wx:if="{{ order.holdStatus === 1 }}"> - <block wx:if="{{ order.groupInfoVo.residueTime > 0 }}"> - 鎷煎洟鍓╀綑 - <t-count-down - time="{{order.groupInfoVo.residueTime}}" - format="HH灏忔椂mm鍒唖s绉�" - t-class="count-down" - bindfinish="onCountDownFinish" - /> - <view>杩囨椂鑷姩鍙栨秷</view> - </block> - </block> - <block wx:elif="{{countDownTime === null}}">{{order.orderSatusRemark || ''}}</block> - <block wx:elif="{{countDownTime > 0}}"> - 鍓� - <t-count-down - time="{{countDownTime}}" - format="HH灏忔椂mm鍒唖s绉�" - t-class="count-down" - bindfinish="onCountDownFinish" - /> - 鏀粯锛岃繃鏃惰鍗曞皢浼氬彇娑� - </block> - <block wx:else>瓒呮椂鏈敮浠�</block> - </view> - </view> - - <!-- 鐗╂祦 --> - <view class="order-logistics" wx:if="{{logisticsNodes[0]}}" bindtap="onDeliveryClick"> - <t-icon name="deliver" size="40rpx" class="logistics-icon" prefix="wr" /> - <view class="logistics-content"> - <view>{{logisticsNodes[0].desc}}</view> - <view class="logistics-time">{{logisticsNodes[0].date}}</view> - </view> - <t-icon class="logistics-back" name="arrow_forward" size="36rpx" prefix="wr" /> - </view> - <view class="border-bottom" wx:if="{{logisticsNodes[0]}}" /> - <!-- 鏀惰揣鍦板潃 --> - <view class="order-logistics"> - <t-icon name="location" size="40rpx" class="logistics-icon" prefix="wr" /> - <view class="logistics-content"> - <view>{{order.logisticsVO.receiverName + ' '}}{{order.logisticsVO.receiverPhone}}</view> - <view class="logistics-time">{{_order.receiverAddress}}</view> - </view> - <view wx:if="{{addressEditable}}" class="edit-text" bindtap="onEditAddressTap"> 淇敼 </view> - </view> - </view> - <!-- 搴楅摵鍙婂晢鍝� --> - <order-card order="{{_order}}" use-top-right-slot> - <order-goods-card - wx:for="{{_order.goodsList}}" - wx:key="id" - wx:for-item="goods" - wx:for-index="gIndex" - goods="{{goods}}" - no-top-line="{{gIndex === 0}}" - bindtap="onGoodsCardTap" - data-index="{{gIndex}}" - > - <order-button-bar - slot="append-card" - class="goods-button-bar" - order="{{_order}}" - bindrefresh="onRefresh" - goodsIndex="{{gIndex}}" - /> - </order-goods-card> - <view class="pay-detail"> - <view class="pay-item"> - <text>鍟嗗搧鎬婚</text> - <price fill decimalSmaller wr-class="pay-item__right font-bold" price="{{order.totalAmount || '0'}}" /> - </view> - <view class="pay-item"> - <text>杩愯垂</text> - <view class="pay-item__right font-bold"> - <block wx:if="{{order.freightFee}}"> - + - <price fill decimalSmaller price="{{order.freightFee}}" /> - </block> - <text wx:else>鍏嶈繍璐�</text> - </view> - </view> - <view class="pay-item"> - <text>娲诲姩浼樻儬</text> - <view class="pay-item__right primary font-bold"> - - - <price fill price="{{order.discountAmount || 0}}" /> - </view> - </view> - <view class="pay-item"> - <text>浼樻儬鍒�</text> - <view class="pay-item__right" catchtap="onOpenCoupons"> - <block wx:if="{{order.couponAmount}}"> - - - <price fill decimalSmaller price="{{order.couponAmount}}" /> - </block> - <text wx:else>鏃犲彲鐢�</text> - <!-- <t-icon name="chevron-right" size="32rpx" color="#BBBBBB" /> --> - </view> - </view> - <view class="pay-item"> - <text>{{isPaid ? '瀹炰粯' : '搴斾粯'}}</text> - <price - fill - decimalSmaller - wr-class="pay-item__right font-bold primary max-size" - price="{{order.paymentAmount || '0'}}" - /> - </view> - </view> - </order-card> - <view class="pay-detail padding-inline"> - <view class="pay-item"> - <text>璁㈠崟缂栧彿</text> - <view class="pay-item__right" bindtap="onOrderNumCopy"> - <text class="order-no">{{order.orderNo}}</text> - <view class="pay-item__right__copy">澶嶅埗</view> - </view> - </view> - <view class="pay-item"> - <text>涓嬪崟鏃堕棿</text> - <view class="pay-item__right"> - <text class="order-no normal-color">{{formatCreateTime}}</text> - </view> - </view> - <view class="border-bottom border-bottom-margin" /> - <view class="pay-item"> - <text>鍙戠エ</text> - <view class="pay-item__right" bindtap="onOrderInvoiceView"> - <text class="order-no normal-color">{{invoiceType}}</text> - <view class="pay-item__right__copy">鏌ョ湅</view> - </view> - </view> - <view class="pay-item"> - <text>澶囨敞</text> - <view class="pay-item__right"> - <text class="order-no normal-color">{{order.remark || '-'}}</text> - </view> - </view> - <view class="border-bottom border-bottom-margin" /> - <view class="pay-service" wx:if="{{storeDetail && storeDetail.storeTel}}" catch:tap="clickService"> - <t-icon name="service" size="40rpx" /> - <text decode="{{true}}"> 鑱旂郴瀹㈡湇</text> - </view> - </view> - </view> - <view wx:if="{{_order.buttons.length > 0}}" class="bottom-bar"> - <order-button-bar order="{{_order}}" bindrefresh="onRefresh" isBtnMax /> - </view> -</t-pull-down-refresh> -<t-toast id="t-toast" /> -<t-dialog id="t-dialog" /> diff --git a/pages/order/order-detail/index.wxss b/pages/order/order-detail/index.wxss deleted file mode 100644 index 6bae005..0000000 --- a/pages/order/order-detail/index.wxss +++ /dev/null @@ -1,245 +0,0 @@ -:host { - background-color: #f8f8f8; -} - -.order-detail { - width: 100%; - box-sizing: border-box; - padding: 0rpx 0rpx calc(env(safe-area-inset-bottom) + 144rpx); -} - -.order-detail .count-down { - color: #ffffff; -} -.order-detail .header { - width: 100%; - background-color: #ffffff; -} -.order-detail .order-detail__header { - width: 700rpx; - height: 200rpx; - border-radius: 24rpx; - margin: 0 auto; - overflow: hidden; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/template/order-bg.png'); - background-repeat: no-repeat; - background-size: contain; -} -.order-detail .order-detail__header .title, -.order-detail .order-detail__header .desc { - color: #ffffff; - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; -} -.order-detail .order-detail__header .title { - -webkit-line-clamp: 1; - font-size: 44rpx; - line-height: 64rpx; - margin-bottom: 8rpx; - font-weight: bold; -} -.order-detail .order-detail__header .desc { - -webkit-line-clamp: 2; - font-size: 24rpx; - line-height: 32rpx; -} -.order-detail .order-detail__header .desc .count-down { - display: inline; -} -.order-detail .order-logistics { - box-sizing: border-box; - padding: 32rpx; - width: 100%; - background-color: #ffffff; - overflow: hidden; - color: #333333; - font-size: 32rpx; - line-height: 48rpx; - display: flex; - position: relative; -} - -.order-logistics .logistics-icon { - width: 40rpx; - height: 40rpx; - margin-right: 16rpx; - margin-top: 4rpx; -} - -.order-logistics .logistics-content { - flex: 1; -} - -.order-logistics .logistics-content .logistics-time { - font-size: 28rpx; - line-height: 40rpx; - color: #999999; - margin-top: 12rpx; -} - -.order-logistics .logistics-back { - color: #999999; - align-self: center; -} - -.order-logistics .edit-text { - color: #fa4126; - font-size: 26rpx; - line-height: 36rpx; -} - -.order-detail .border-bottom { - margin: 0 auto; - width: 686rpx; - scale: 1 0.5; - height: 2rpx; - background-color: #e5e5e5; -} - -.order-detail .border-bottom-margin { - margin: 16rpx auto; -} - -.order-detail .pay-detail { - background-color: #ffffff; - width: 100%; - box-sizing: border-box; -} - -.order-detail .padding-inline { - padding: 16rpx 32rpx; -} - -.order-detail .pay-detail .pay-item { - width: 100%; - height: 72rpx; - display: flex; - align-items: center; - justify-content: space-between; - font-size: 26rpx; - line-height: 36rpx; - color: #666666; - background-color: #ffffff; -} -.order-detail .pay-detail .pay-item .pay-item__right { - color: #333333; - font-size: 24rpx; - display: flex; - align-items: center; - justify-content: flex-end; - max-width: 400rpx; -} -.order-detail .pay-detail .pay-item .pay-item__right .pay-remark { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - max-width: 400rpx; - text-overflow: ellipsis; - overflow: hidden; -} -.order-detail .pay-detail .pay-item .font-bold { - font-weight: bold; -} -.order-detail .pay-detail .pay-item .primary { - color: #fa4126; -} -.order-detail .pay-detail .pay-item .max-size { - font-size: 36rpx; - line-height: 48rpx; -} - -.pay-item .pay-item__right .pay-item__right__copy { - width: 80rpx; - height: 40rpx; - text-align: center; - font-size: 24rpx; - line-height: 40rpx; - color: #333333; - position: relative; -} - -.pay-item .pay-item__right .pay-item__right__copy::before { - position: absolute; - content: ''; - width: 200%; - height: 200%; - border-radius: 40rpx; - border: 2rpx solid #dddddd; - transform: scale(0.5); - left: 0; - top: 0; - transform-origin: left top; -} - -.pay-item .pay-item__right .order-no { - color: #333333; - font-size: 26rpx; - line-height: 40rpx; - padding-right: 16rpx; -} - -.pay-item .pay-item__right .normal-color { - color: #333333; -} - -.order-detail .pay-detail .pay-service { - width: 100%; - height: 72rpx; - display: flex; - align-items: center; - justify-content: center; - font-size: 32rpx; - line-height: 36rpx; - color: #333333; - background-color: #ffffff; -} - -.bottom-bar { - position: fixed; - left: 0; - bottom: 0; - right: 0; - z-index: 10; - background: #fff; - height: 112rpx; - width: 686rpx; - padding: 0rpx 32rpx env(safe-area-inset-bottom); - display: flex; - align-items: center; -} - -.bottom-bar::before { - position: absolute; - content: ''; - width: 200%; - height: 200%; - border-top: 2rpx solid #dddddd; - transform: scale(0.5); - left: 0; - top: 0; - transform-origin: left top; -} - -.goods-button-bar { - height: 112rpx; - width: 686rpx; - margin-bottom: 16rpx; -} - -.t-class-indicator { - color: #b9b9b9 !important; -} - -.add-notes__confirm { - color: #fa4126 !important; -} - -.t-button { - --td-button-default-color: #000; - --td-button-primary-text-color: #fa4126; -} diff --git a/pages/order/order-list/index.js b/pages/order/order-list/index.js deleted file mode 100644 index c62315b..0000000 --- a/pages/order/order-list/index.js +++ /dev/null @@ -1,189 +0,0 @@ -import { OrderStatus } from '../config'; -import { - fetchOrders, - fetchOrdersCount, -} from '../../../services/order/orderList'; -import { cosThumb } from '../../../utils/util'; - -Page({ - page: { - size: 5, - num: 1, - }, - - data: { - tabs: [ - { key: -1, text: '鍏ㄩ儴' }, - { key: OrderStatus.PENDING_PAYMENT, text: '寰呬粯娆�', info: '' }, - { key: OrderStatus.PENDING_DELIVERY, text: '寰呭彂璐�', info: '' }, - { key: OrderStatus.PENDING_RECEIPT, text: '寰呮敹璐�', info: '' }, - { key: OrderStatus.COMPLETE, text: '宸插畬鎴�', info: '' }, - ], - curTab: -1, - orderList: [], - listLoading: 0, - pullDownRefreshing: false, - emptyImg: - 'https://cdn-we-retail.ym.tencent.com/miniapp/order/empty-order-list.png', - backRefresh: false, - status: -1, - }, - - onLoad(query) { - let status = parseInt(query.status); - status = this.data.tabs.map((t) => t.key).includes(status) ? status : -1; - this.init(status); - this.pullDownRefresh = this.selectComponent('#wr-pull-down-refresh'); - }, - - onShow() { - if (!this.data.backRefresh) return; - this.onRefresh(); - this.setData({ backRefresh: false }); - }, - - onReachBottom() { - if (this.data.listLoading === 0) { - this.getOrderList(this.data.curTab); - } - }, - - onPageScroll(e) { - this.pullDownRefresh && this.pullDownRefresh.onPageScroll(e); - }, - - onPullDownRefresh_(e) { - const { callback } = e.detail; - this.setData({ pullDownRefreshing: true }); - this.refreshList(this.data.curTab) - .then(() => { - this.setData({ pullDownRefreshing: false }); - callback && callback(); - }) - .catch((err) => { - this.setData({ pullDownRefreshing: false }); - Promise.reject(err); - }); - }, - - init(status) { - status = status !== undefined ? status : this.data.curTab; - this.setData({ - status, - }); - this.refreshList(status); - }, - - getOrderList(statusCode = -1, reset = false) { - const params = { - parameter: { - pageSize: this.page.size, - pageNum: this.page.num, - }, - }; - if (statusCode !== -1) params.parameter.orderStatus = statusCode; - this.setData({ listLoading: 1 }); - return fetchOrders(params) - .then((res) => { - this.page.num++; - let orderList = []; - if (res && res.data && res.data.orders) { - orderList = (res.data.orders || []).map((order) => { - return { - id: order.orderId, - orderNo: order.orderNo, - parentOrderNo: order.parentOrderNo, - storeId: order.storeId, - storeName: order.storeName, - status: order.orderStatus, - statusDesc: order.orderStatusName, - amount: order.paymentAmount, - totalAmount: order.totalAmount, - logisticsNo: order.logisticsVO.logisticsNo, - createTime: order.createTime, - goodsList: (order.orderItemVOs || []).map((goods) => ({ - id: goods.id, - thumb: cosThumb(goods.goodsPictureUrl, 70), - title: goods.goodsName, - skuId: goods.skuId, - spuId: goods.spuId, - specs: (goods.specifications || []).map( - (spec) => spec.specValue, - ), - price: goods.tagPrice ? goods.tagPrice : goods.actualPrice, - num: goods.buyQuantity, - titlePrefixTags: goods.tagText ? [{ text: goods.tagText }] : [], - })), - buttons: order.buttonVOs || [], - groupInfoVo: order.groupInfoVo, - freightFee: order.freightFee, - }; - }); - } - return new Promise((resolve) => { - if (reset) { - this.setData({ orderList: [] }, () => resolve()); - } else resolve(); - }).then(() => { - this.setData({ - orderList: this.data.orderList.concat(orderList), - listLoading: orderList.length > 0 ? 0 : 2, - }); - }); - }) - .catch((err) => { - this.setData({ listLoading: 3 }); - return Promise.reject(err); - }); - }, - - onReTryLoad() { - this.getOrderList(this.data.curTab); - }, - - onTabChange(e) { - const { value } = e.detail; - this.setData({ - status: value, - }); - this.refreshList(value); - }, - - getOrdersCount() { - return fetchOrdersCount().then((res) => { - const tabsCount = res.data || []; - const { tabs } = this.data; - tabs.forEach((tab) => { - const tabCount = tabsCount.find((c) => c.tabType === tab.key); - if (tabCount) { - tab.info = tabCount.orderNum; - } - }); - this.setData({ tabs }); - }); - }, - - refreshList(status = -1) { - this.page = { - size: this.page.size, - num: 1, - }; - this.setData({ curTab: status, orderList: [] }); - - return Promise.all([ - this.getOrderList(status, true), - this.getOrdersCount(), - ]); - }, - - onRefresh() { - this.refreshList(this.data.curTab); - }, - - onOrderCardTap(e) { - const { order } = e.currentTarget.dataset; - wx.navigateTo({ - url: `/pages/order/order-detail/index?orderNo=${order.orderNo}`, - }); - }, -}); diff --git a/pages/order/order-list/index.json b/pages/order/order-list/index.json deleted file mode 100644 index d6c7978..0000000 --- a/pages/order/order-list/index.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "navigationBarTitleText": "鎴戠殑璁㈠崟", - "usingComponents": { - "t-tabs": "tdesign-miniprogram/tabs/tabs", - "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", - "t-empty": "tdesign-miniprogram/empty/empty", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh", - "load-more": "/components/load-more/index", - "order-button-bar": "../components/order-button-bar/index", - "price": "/components/price/index", - "order-card": "../components/order-card/index", - "specs-goods-card": "../components/specs-goods-card/index" - } -} \ No newline at end of file diff --git a/pages/order/order-list/index.wxml b/pages/order/order-list/index.wxml deleted file mode 100644 index c0d4343..0000000 --- a/pages/order/order-list/index.wxml +++ /dev/null @@ -1,85 +0,0 @@ -<view class="page-container"> - <view class="tab-bar"> - <view class="tab-bar__placeholder" /> - <t-tabs - t-class="tab-bar__inner" - t-class-active="tab-bar__active" - t-class-track="t-tabs-track" - bind:change="onTabChange" - value="{{status}}" - style="position: fixed; top: 0; left: 0; z-index: 100" - > - <t-tab-panel - wx:for="{{tabs}}" - wx:for-index="index" - wx:for-item="item" - wx:key="index" - label="{{item.text}}" - value="{{item.key}}" - /> - </t-tabs> - </view> - <t-pull-down-refresh - id="pull-down-refresh" - normal-bar-height="{{200}}" - max-bar-height="{{272}}" - refreshTimeout="{{3000}}" - background="#f5f5f5" - use-loading-slot - loading-size="60rpx" - bindrefresh="onPullDownRefresh_" - t-class-indicator="t-class-indicator" - > - <order-card - wx:for="{{orderList}}" - wx:key="id" - wx:for-item="order" - wx:for-index="oIndex" - order="{{order}}" - defaultShowNum="{{3}}" - data-order="{{order}}" - bindcardtap="onOrderCardTap" - useLogoSlot - > - <view slot="top-left" class="order-number"> - <text decode>璁㈠崟鍙� </text> - {{order.orderNo}} - </view> - <specs-goods-card - wx:for="{{order.goodsList}}" - wx:key="id" - wx:for-item="goods" - wx:for-index="gIndex" - data="{{goods}}" - no-top-line="{{gIndex === 0}}" - /> - <view slot="more"> - <view class="price-total"> - <text>鎬讳环</text> - <price fill price="{{order.totalAmount + ''}}" /> - <text>锛岃繍璐�</text> - <price fill price="{{order.freightFee + ''}}" /> - <text decode> </text> - <text class="bold-price" decode="{{true}}">瀹炰粯 </text> - <price fill class="real-pay" price="{{order.amount + ''}}" decimalSmaller /> - </view> - <!-- 璁㈠崟鎸夐挳鏍� --> - <order-button-bar order="{{order}}" bindrefresh="onRefresh" data-order="{{order}}" /> - </view> - </order-card> - <!-- 鍒楄〃鍔犺浇涓�/宸插叏閮ㄥ姞杞� --> - <load-more - wx:if="{{!pullDownRefreshing}}" - list-is-empty="{{!orderList.length}}" - status="{{listLoading}}" - bindretry="onReTryLoad" - > - <!-- 绌烘�� --> - <view slot="empty" class="empty-wrapper"> - <t-empty t-class="t-empty-text" src="{{emptyImg}}">鏆傛棤鐩稿叧璁㈠崟</t-empty> - </view> - </load-more> - </t-pull-down-refresh> -</view> -<t-toast id="t-toast" /> -<t-dialog id="t-dialog" /> diff --git a/pages/order/order-list/index.wxss b/pages/order/order-list/index.wxss deleted file mode 100644 index 0fd5d0e..0000000 --- a/pages/order/order-list/index.wxss +++ /dev/null @@ -1,109 +0,0 @@ -:host { - background-color: #f5f5f5; -} -.page-container .tab-bar__placeholder, -.page-container .tab-bar__inner { - height: 88rpx; - line-height: 88rpx; - background: #fff; -} -.page-container .tab-bar__inner { - font-size: 26rpx; - color: #333333; - position: fixed; - width: 100vw; - top: 0; - left: 0; -} -.page-container .tab-bar__inner.order-nav .order-nav-item .bottom-line { - bottom: 12rpx; -} -.tab-bar__inner .t-tabs-is-active { - color: #fa4126 !important; -} - -.tab-bar__inner .t-tabs-track { - background: #fa4126 !important; -} - -.page-container .tab-bar__active { - font-size: 28rpx; -} -.page-container .specs-popup .bottom-btn { - color: #fa4126; - color: var(--color-primary, #fa4126); -} -.page-container .specs-popup .bottom-btn::after { - border-color: #fa4126; - border-color: var(--color-primary, #fa4126); -} -.dialog .dialog__button-confirm { - color: #fa4126; - color: var(--color-primary, #fa4126); -} -.list-loading { - height: 100rpx; -} -.empty-wrapper { - height: calc(100vh - 88rpx); -} -.btn-bar { - margin-top: 20rpx; -} -.load-more { - margin: 0 24rpx; -} -wr-order-goods-card:not(:first-child) .wr-goods-card { - margin-top: 40rpx; -} - -.price-total { - font-size: 24rpx; - line-height: 32rpx; - color: #999999; - padding-top: 10rpx; - width: 100%; - display: flex; - align-items: baseline; - justify-content: flex-end; -} -.price-total .bold-price { - color: #333333; - font-size: 28rpx; - line-height: 40rpx; - color: #333333; -} -.price-total .real-pay { - font-size: 36rpx; - line-height: 48rpx; - color: #fa4126; - font-weight: bold; -} - -.t-tabs.t-tabs--top .t-tabs-scroll { - border: none !important; -} -.t-empty-text { - font-size: 28rpx; - color: #999; -} - -.page-container .order-number { - color: #666666; - font-size: 28rpx; -} -.t-class-indicator { - color: #b9b9b9 !important; -} -.tab-bar .tab-bar__active { - color: #333333 !important; -} - -.tab-bar .t-tabs-track { - background: #333333 !important; -} - -.t-button { - --td-button-default-color: #000; - --td-button-primary-text-color: #fa4126; -} diff --git a/pages/order/pay-result/index.js b/pages/order/pay-result/index.js deleted file mode 100644 index bd6dad6..0000000 --- a/pages/order/pay-result/index.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * @Author: rileycai - * @Date: 2022-03-14 21:18:07 - * @LastEditTime: 2022-03-22 21:17:16 - * @LastEditors: rileycai - * @Description: - * @FilePath: /tdesign-miniprogram-starter/pages/order/pay-result/index.js - */ -Page({ - data: { - totalPaid: 0, - orderNo: '', - groupId: '', - groupon: null, - spu: null, - adUrl: '', - }, - - onLoad(options) { - const { totalPaid = 0, orderNo = '', groupId = '' } = options; - this.setData({ - totalPaid, - orderNo, - groupId, - }); - }, - - onTapReturn(e) { - const target = e.currentTarget.dataset.type; - const { orderNo } = this.data; - if (target === 'home') { - wx.switchTab({ url: '/pages/home/home' }); - } else if (target === 'orderList') { - wx.navigateTo({ - url: `/pages/order/order-list/index?orderNo=${orderNo}`, - }); - } else if (target === 'order') { - wx.navigateTo({ - url: `/pages/order/order-detail/index?orderNo=${orderNo}`, - }); - } - }, - - navBackHandle() { - wx.navigateBack(); - }, -}); diff --git a/pages/order/pay-result/index.json b/pages/order/pay-result/index.json deleted file mode 100644 index f572818..0000000 --- a/pages/order/pay-result/index.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "navigationBarTitleText": "鏀粯缁撴灉", - "navigationStyle": "custom", - "usingComponents": { - "t-navbar": "tdesign-miniprogram/navbar/navbar", - "t-icon": "tdesign-miniprogram/icon/icon", - "price": "/components/price/index" - } -} \ No newline at end of file diff --git a/pages/order/pay-result/index.wxml b/pages/order/pay-result/index.wxml deleted file mode 100644 index 3153fe6..0000000 --- a/pages/order/pay-result/index.wxml +++ /dev/null @@ -1,22 +0,0 @@ -<t-navbar background="#ffffff" left-icon="slot" /> -<view class="pay-result"> - <view class="pay-status"> - <t-icon name="check-circle-filled" size="60rpx" color="#47D368" /> - <text>鏀粯鎴愬姛</text> - </view> - <view class="pay-money"> - 寰俊鏀粯锛� - <price - wx:if="{{totalPaid}}" - price="{{totalPaid}}" - wr-class="pay-money__price" - decimalSmaller - fill - /> - </view> - <view class="btn-wrapper"> - <view class="status-btn" data-type="orderList" bindtap="onTapReturn">鏌ョ湅璁㈠崟</view> - <view class="status-btn" data-type="home" bindtap="onTapReturn">杩斿洖棣栭〉</view> - </view> -</view> - diff --git a/pages/order/pay-result/index.wxss b/pages/order/pay-result/index.wxss deleted file mode 100644 index abe1b25..0000000 --- a/pages/order/pay-result/index.wxss +++ /dev/null @@ -1,54 +0,0 @@ -.pay-result { - display: flex; - flex-direction: column; - align-items: center; - width: 100%; -} - -.pay-result .pay-status { - margin-top: 100rpx; - font-size: 48rpx; - line-height: 72rpx; - font-weight: bold; - color: #333333; - display: flex; - align-items: center; -} -.pay-result .pay-status text { - padding-left: 12rpx; -} -.pay-result .pay-money { - color: #666666; - font-size: 28rpx; - line-height: 48rpx; - margin-top: 28rpx; - display: flex; - align-items: baseline; -} - -.pay-result .pay-money .pay-money__price { - font-size: 36rpx; - line-height: 48rpx; - color: #fa4126; -} -.pay-result .btn-wrapper { - margin-top: 48rpx; - padding: 12rpx 32rpx; - display: flex; - align-items: center; - justify-content: space-between; - width: 100%; - box-sizing: border-box; -} - -.pay-result .btn-wrapper .status-btn { - height: 88rpx; - width: 334rpx; - border-radius: 44rpx; - border: 2rpx solid #fa4126; - color: #fa4126; - font-size: 28rpx; - font-weight: bold; - line-height: 88rpx; - text-align: center; -} diff --git a/pages/order/receipt/index.js b/pages/order/receipt/index.js deleted file mode 100644 index 3d03225..0000000 --- a/pages/order/receipt/index.js +++ /dev/null @@ -1,182 +0,0 @@ -/* eslint-disable no-nested-ternary */ -import Dialog from 'tdesign-miniprogram/dialog/index'; -import Toast from 'tdesign-miniprogram/toast/index'; -import { dispatchSupplementInvoice } from '../../../services/order/orderConfirm'; - -const invoiceJson = { - info: [ - '1.鏍规嵁褰撳湴绋庡姟灞�鐨勮姹傦紝寮�鍏锋湁鏁堢殑浼佷笟鍙戠エ闇�濉啓绋庡姟灞�鐧昏璇佸彿銆傚紑鍏蜂釜浜哄彂绁ㄤ笉闇�瑕佸~鍐欑撼绋庝汉璇嗗埆鐮併�� ', - '2.鐢靛瓙鏅�氬彂绁細 鐢靛瓙鏅�氬彂绁ㄦ槸绋庡眬璁ゅ彲鐨勬湁鏁堥浠樻鍑瘉锛屽叾娉曞緥鏁堝姏銆佸熀鏈敤閫斿強浣跨敤瑙勫畾鍚岀焊璐ㄥ彂绁紝濡傞渶绾歌川鍙戠エ鍙嚜琛屼笅杞芥墦鍗般�� ', - '3.澧炲�肩◣涓撶敤鍙戠エ锛� 澧炲�肩◣鍙戠エ鏆傛椂涓嶅彲寮�锛屽彲鏌ョ湅銆婂紑灞�澧炲�肩◣鍙戠エ銆嬫垨鑷寸數400-633-6868銆�', - ], - codeTitle: [ - '1.浠�涔堟槸绾崇◣浜鸿瘑鍒彿/缁熶竴绀句細淇$敤浠g爜锛� 绾崇◣浜鸿瘑鍒彿锛屼竴寰嬬敱15浣嶃��17浣嶃��18鎴栬��20浣嶇爜锛堝瓧绗﹀瀷锛夌粍鎴愶紝鍏朵腑锛氫紒涓氥�佷簨涓氬崟浣嶇瓑缁勭粐鏈烘瀯绾崇◣浜猴紝浠ュ浗瀹惰川閲忕洃鐫f楠屾鐤�诲眬缂栧埗鐨�9浣嶇爜锛堝叾涓尯鍒嗕富鐮佷綅涓庢牎妫�浣嶄箣闂寸殑鈥溾�斺�濈鐪佺暐涓嶆墦鍗帮級骞跺湪鍏垛�滅撼绋庝汉璇嗗埆鍙封�濄�傚浗瀹剁◣鍔℃�诲眬涓嬭揪鐨勭撼绋庝汉浠g爜涓�15浣嶏紝鍏朵腑锛�1鈥�2浣嶄负鐪併�佸競浠g爜锛�3鈥�6浣嶄负鍦板尯浠g爜锛�7鈥�8浣嶄负缁忔祹鎬ц川浠g爜锛�9鈥�10浣嶈涓氫唬鐮侊紝11鈥�15浣嶄负鍚勫湴鍖鸿嚜璁剧殑椤哄簭鐮併��', - '2.鍏ユ埛鑾峰彇/鐭ユ檽绾崇◣浜鸿瘑鍒彿/缁熶竴绀句細淇$敤浠g爜锛� 绾崇◣浜鸿瘑鍒彿鏄◣鍔$櫥璁拌瘉涓婄殑鍙风爜锛岄�氬父绠�绉颁负鈥滅◣鍙封�濓紝姣忎釜浼佷笟鐨勭撼绋庝汉璇嗗埆鍙烽兘鏄敮涓�鐨勩�傝繖涓睘浜庢瘡涓汉鑷繁涓旂粓韬笉鍙樼殑鏁板瓧浠g爜寰堝彲鑳芥垚涓烘垜浠殑绗簩寮犫�滆韩浠借瘉鈥濄�� ', - ], -}; - -Page({ - orderNo: '', - data: { - receiptIndex: 0, - addressTagsIndex: 0, - goodsClassesIndex: 0, - dialogShow: false, - codeShow: false, - receipts: [ - { title: '涓嶅紑鍙戠エ', id: 0, name: 'receipt' }, - { title: '鐢靛瓙鍙戠エ', id: 1, name: 'receipt' }, - ], - addressTags: [ - { title: '涓汉', id: 0, name: 'addressTags', type: 1 }, - { title: '鍏徃', id: 1, name: 'addressTags', type: 2 }, - ], - goodsClasses: [ - { title: '鍟嗗搧鏄庣粏', id: 0, name: 'goodsClasses' }, - { title: '鍟嗗搧绫诲埆', id: 1, name: 'goodsClasses' }, - ], - name: '', - componentName: '', - code: '', - phone: '', - email: '', - invoiceInfo: invoiceJson, - }, - onLoad(query) { - const { orderNo, invoiceData } = query; - const tempData = JSON.parse(invoiceData || '{}'); - const invoice = { - receiptIndex: tempData.invoiceType === 5 ? 1 : 0, - name: tempData.buyerName || '', - email: tempData.email || '', - phone: tempData.buyerPhone || '', - addressTagsIndex: tempData.titleType === 2 ? 1 : 0, - goodsClassesIndex: tempData.contentType === 2 ? 1 : 0, - code: tempData.buyerTaxNo || '', - componentName: tempData.titleType === 2 ? tempData.buyerName : '', - }; - this.orderNo = orderNo; - this.setData({ ...invoice }); - }, - onLabels(e) { - const { item } = e.currentTarget.dataset; - const nameIndex = `${item.name}Index`; - this.setData({ [nameIndex]: item.id }); - }, - onInput(e) { - const { addressTagsIndex } = this.data; - const { item } = e.currentTarget.dataset; - const { value } = e.detail; - const key = - item === 'name' - ? addressTagsIndex === 0 - ? 'name' - : 'componentName' - : item === 'code' - ? addressTagsIndex === 0 - ? 'phone' - : 'code' - : 'email'; - this.setData({ [key]: value }); - }, - onSure() { - const result = this.checkSure(); - if (!result) { - Dialog.alert({ - title: '璇峰~鍐欏彂绁ㄤ俊鎭�', - content: '', - confirmBtn: '纭', - }); - return; - } - const { - receiptIndex, - addressTagsIndex, - receipts, - addressTags, - name, - componentName, - code, - phone, - email, - goodsClassesIndex, - } = this.data; - - const data = { - buyerName: addressTagsIndex === 0 ? name : componentName, - buyerTaxNo: code, - buyerPhone: phone, - email, - titleType: addressTags[addressTagsIndex].type, - contentType: goodsClassesIndex === 0 ? 1 : 2, - invoiceType: receiptIndex === 1 ? 5 : 0, - }; - if (this.orderNo) { - if (this.submitting) return; - const params = { - parameter: { - orderNo: this.orderNo, - invoiceVO: data, - }, - }; - this.submitting = true; - dispatchSupplementInvoice(params) - .then(() => { - Toast({ - context: this, - selector: '#t-toast', - message: '淇濆瓨鎴愬姛', - duration: 2000, - icon: '', - }); - setTimeout(() => { - this.submitting = false; - wx.navigateBack({ delta: 1 }); - }, 1000); - }) - .catch((err) => { - this.submitting = false; - console.error(err); - }); - } else { - Object.assign(data, { - receipts: receipts[receiptIndex], - addressTags: addressTags[addressTagsIndex], - }); - wx.setStorageSync('invoiceData', data); - wx.navigateBack({ delta: 1 }); - } - }, - checkSure() { - const { name, componentName, code, phone, email, addressTagsIndex, receiptIndex } = this.data; - if (receiptIndex === 0) { - return true; - } - if (addressTagsIndex === 0) { - if (!name.length || !phone.length) { - return false; - } - } else if (addressTagsIndex === 1) { - if (!componentName.length || !code.length) { - return false; - } - } - if (!email.length) { - return false; - } - return true; - }, - onDialogTap() { - const { dialogShow } = this.data; - this.setData({ - dialogShow: !dialogShow, - codeShow: false, - }); - }, - onKnoeCode() { - this.setData({ - dialogShow: !this.data.dialogShow, - codeShow: true, - }); - }, -}); diff --git a/pages/order/receipt/index.json b/pages/order/receipt/index.json deleted file mode 100644 index 5996047..0000000 --- a/pages/order/receipt/index.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "navigationBarTitleText": "鍙戠エ", - "usingComponents": { - "t-cell": "tdesign-miniprogram/cell/cell", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-input": "tdesign-miniprogram/input/input", - "t-button": "tdesign-miniprogram/button/button" - } -} diff --git a/pages/order/receipt/index.wxml b/pages/order/receipt/index.wxml deleted file mode 100644 index a79397b..0000000 --- a/pages/order/receipt/index.wxml +++ /dev/null @@ -1,135 +0,0 @@ -<view class="receipt"> - <view class="title"> - <t-cell class="receipt-cell" title="鍙戠エ" bordered="{{false}}" t-class-left="cell-left"> - <view slot="right-icon" class="btn-wrap"> - <view - bindtap="onLabels" - data-item="{{item}}" - class="btn {{receiptIndex === index ? 'active-btn' : ''}}" - wx:for="{{receipts}}" - wx:for-item="item" - wx:key="index" - > - {{item.title}} - </view> - </view> - </t-cell> - </view> - <block wx:if="{{receiptIndex === 1}}"> - <t-cell class="receipt-cell" title="鍙戠エ鎶ご" t-class-left="cell-left"> - <view class="btn-wrap" slot="right-icon"> - <view - class="btn {{addressTagsIndex === index ? 'active-btn':'' }}" - bindtap="onLabels" - data-item="{{tag}}" - wx:for="{{addressTags}}" - wx:for-item="tag" - wx:key="index" - > - {{tag.title}} - </view> - </view> - </t-cell> - <t-cell - class="receipt-cell" - title="{{addressTagsIndex === 0 ? '濮撳悕':'鍏徃鍚嶇О'}}" - t-class-left="cell-left" - t-class-right="cell-right" - > - <t-input - slot="right-icon" - borderless - t-class="input-com" - value="{{addressTagsIndex === 0 ? name:componentName}}" - bindchange="onInput" - data-item="name" - type="" - placeholder="{{addressTagsIndex === 0 ? '璇疯緭鍏ユ偍鐨勫鍚�':'璇疯緭鍏ュ叕鍙稿悕绉�'}}" - /> - </t-cell> - <t-cell - class="receipt-cell" - title="{{addressTagsIndex === 0 ? '鎵嬫満鍙�':'璇嗗埆鍙�'}}" - t-class-left="cell-left" - t-class-right="cell-right" - > - <view class="addressTagsIndex-cell" slot="right-icon"> - <t-input - t-class="input-com" - borderless - value="{{addressTagsIndex === 0 ? phone:code}}" - bindchange="onInput" - data-item="code" - type="" - placeholder="{{addressTagsIndex === 0 ? '璇疯緭鍏ユ偍鐨勬墜鏈哄彿':'璇疯緭鍏ョ撼绋庝汉璇嗗埆鍙�'}}" - /> - <t-icon wx:if="{{addressTagsIndex === 1}}" name="help-circle" size="30rpx" bindtap="onKnoeCode" /> - </view> - </t-cell> - <t-cell - class="receipt-cell" - title="鐢靛瓙閭" - bordered="{{false}}" - t-class-left="cell-left" - t-class-right="cell-right" - > - <t-input - slot="right-icon" - t-class="input-com" - borderless - value="{{email}}" - bindchange="onInput" - data-item="email" - type="" - placeholder="璇疯緭鍏ラ偖绠辩敤浜庢帴鏀剁數瀛愬彂绁�" - /> - </t-cell> - <view class="receipt-info"> - <t-cell class="receipt-cell" title="鍙戠エ鍐呭" bordered="{{false}}" t-class-left="cell-left"> - <view class="btn-wrap" slot="right-icon"> - <view - class="btn {{goodsClassesIndex ===index ? 'active-btn':''}}" - bindtap="onLabels" - data-item="{{good}}" - wx:for="{{goodsClasses}}" - wx:for-item="good" - wx:key="index" - > - {{good.title}} - </view> - </view> - </t-cell> - <view class="title">鍙戠エ鍐呭灏嗘樉绀鸿缁嗗晢鍝佸悕绉颁笌浠锋牸淇℃伅锛屽彂绁ㄩ噾棰濅负瀹為檯鏀粯閲戦锛屼笉鍖呭惈浼樻儬绛夋墸鍑忛噾棰�</view> - </view> - <view class="receipt-know" bindtap="onDialogTap"> - 鍙戠エ椤荤煡 - <t-icon name="help-circle" size="30rpx" /> - </view> - <t-dialog - title="{{codeShow ? '绾崇◣浜鸿瘑鍒彿璇存槑':'鍙戠エ椤荤煡'}}" - bindconfirm="onDialogTap" - class="dialog-receipt" - visible="{{dialogShow}}" - confirm-btn="鎴戠煡閬撲簡" - > - <view class="srcoll-view-wrap" slot="content"> - <scroll-view class="dialog-info" scroll-x="{{false}}" scroll-y="{{true}}"> - <view class="info-wrap"> - <view class="info" wx:if="{{!codeShow}}"> - <view class="title" wx:for="{{invoiceInfo.info}}" wx:key="index" wx:for-item="item"> {{item}} </view> - </view> - <view class="info" wx:else> - <view class="title" wx:for="{{invoiceInfo.codeTitle}}" wx:key="index" wx:for-item="item"> {{item}} </view> - </view> - </view> - </scroll-view> - </view> - </t-dialog> - </block> - <view wx:else></view> - <view class="safe-area-bottom receipt-btn"> - <t-button t-class="receipt-btn-con" bindtap="onSure">纭畾</t-button> - </view> -</view> -<t-toast id="t-toast" /> -<t-dialog id="t-dialog" /> diff --git a/pages/order/receipt/index.wxss b/pages/order/receipt/index.wxss deleted file mode 100644 index c12d654..0000000 --- a/pages/order/receipt/index.wxss +++ /dev/null @@ -1,220 +0,0 @@ -@import '../../../style/theme.wxss'; - -.receipt { - height: 100vh; - background: #f5f5f5; - position: relative; - padding-top: 20rpx; - - --td-input-vertical-padding: 0; -} - -.receipt-cell .t-cell__title { - width: 144rpx; - padding-right: 32rpx; - flex: none !important; -} - -.receipt .t-input__wrapper { - margin: 0 !important; -} -.srcoll-view-wrap { - margin-top: 20rpx; -} -.receipt .flex { - display: flex; - align-items: center; - justify-content: space-between; -} -.receipt .head-title { - color: #333; - font-size: 30rpx; - font-weight: bold; -} -.receipt .btn-wrap { - display: flex; -} -.receipt .btn-wrap .btn { - width: 128rpx; - background: #f5f5f5; - font-size: 24rpx; - color: #333; - margin-right: 22rpx; - text-align: center; - border-radius: 8rpx; - position: relative; - border: 2rpx solid #f5f5f5; -} -.receipt .btn-wrap .active-btn { - background-color: transparent; - border-color: #fa4126; - color: #fa4126; -} -.receipt .title { - width: 100%; - background-color: #fff; - margin-bottom: 20rpx; -} - -.receipt .receipt-label { - display: flex; -} -.receipt .receipt-label .btn { - width: 128rpx; - background: #f5f5f5; - font-size: 24rpx; - color: #333; - margin-left: 22rpx; - text-align: center; - border-radius: 8rpx; - border: 2rpx solid #f5f5f5; -} -.receipt .receipt-label .active-btn { - background-color: transparent; - border-color: #fa4126; - color: #fa4126; -} -.receipt .receipt-label .wr-cell__title { - font-size: 30rpx; - color: #333; - font-weight: bold; -} -.receipt .receipt-content { - background: #fff; - margin-top: 20rpx; -} -.receipt .receipt-content .addressTags { - padding: 0 30rpx; - height: 100rpx; -} -.receipt .receipt-content .addressTags .btn-wrap { - display: flex; -} -.receipt .receipt-content .line { - width: 720rpx; - margin-left: 30rpx; - background-color: #e6e6e6; - height: 1rpx; -} -.receipt .receipt-content .receipt-input { - display: flex; - padding: 0 30rpx; - align-items: center; - height: 100rpx; - color: #666; -} -.receipt .receipt-content .receipt-input .title { - color: #333; - display: inline-block; - width: 140rpx; - margin-right: 30rpx; - font-size: 30rpx; - font-weight: bold; -} -.input-com { - display: inline-block; - flex: 1; - font-size: 30rpx; - font-weight: 400; - line-height: 30rpx; - padding: 0 !important; - color: #666; -} -.input-com::after { - border: none !important; -} - -.receipt .receipt-content .receipt-input .wr-icon { - font-size: 28rpx !important; - margin-left: 20rpx; -} -.receipt .receipt-info { - background: #fff; - margin-top: 20rpx; -} -.receipt .receipt-info .info-con { - padding: 0 30rpx; - height: 100rpx; -} -.receipt .receipt-info .title { - font-size: 24rpx; - color: #999999; - line-height: 36rpx; - padding: 0 30rpx 20rpx; - box-sizing: border-box; -} -.receipt .receipt-know { - display: flex; - align-items: center; - font-size: 26rpx; - font-weight: 400; - color: #999999; - padding: 20rpx 30rpx; - line-height: 26rpx; -} -.receipt .receipt-know .icon { - margin-left: 16rpx; - font-size: 26rpx; -} -.receipt .dialog-receipt .dialog__message { - padding: 0; -} -.receipt .dialog-receipt .dialog-info { - max-height: 622rpx; -} -.receipt .dialog-receipt .info-wrap { - padding: 0 18rpx; -} -.receipt .dialog-receipt .info .title { - display: inline-block; - font-size: 28rpx; - font-weight: 400; - color: #999; - line-height: 40rpx; - margin-bottom: 40rpx; - text-align: left; -} -.receipt .receipt-btn { - position: fixed; - bottom: 0; - left: 0; - right: 0; - z-index: 100; - background: #fff; - width: 100%; - padding: 0 20rpx; - box-sizing: border-box; - padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); -} -.receipt .receipt-btn .receipt-btn-con { - margin-top: 20rpx; - display: inline-block; - width: 100%; - line-height: 80rpx; - background: #fa4126; - text-align: center; - color: #fff; - border-radius: 48rpx; -} - -.cell-left { - margin-right: 0 !important; -} - -.cell-right { - display: flex; - justify-content: flex-start; - width: 480rpx; -} - -.addressTagsIndex-cell { - display: flex; - align-items: center; - justify-content: space-between; - width: 100%; -} - -.t-button { - --td-button-default-color: #000; - --td-button-primary-text-color: #fa4126; -} diff --git a/pages/personalCenter/downloads/index.js b/pages/personalCenter/downloads/index.js deleted file mode 100644 index e3df2c0..0000000 --- a/pages/personalCenter/downloads/index.js +++ /dev/null @@ -1,149 +0,0 @@ -const app = getApp(); -import moment from 'moment' -Page({ - - /** - * 椤甸潰鐨勫垵濮嬫暟鎹� - */ - data: { - list: [], - //鍒嗛〉 - page: 1, - limit: 10, - pageTotalCount: 0, - bottomLoading: false, - isMoreData: false, - // 杩斿洖椤堕儴 - isBackTop: false, - setScrollValue: 0, - skeletonLoding: true, - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - onLoad(options) { - console.log(options); - this.getDataList(false); - }, - - getDataList(isReachBottom) { - app.MG.ugc.getTopicMessageList({ - appRefCode: app.config.appRefCode, - topicIdOrRefCode: "productDownLoad", - start: this.data.page * this.data.limit - this.data.limit, - size: this.data.limit, - sort: { - type: "Desc", - field: "CreateDate" - } - }) - .then(res => { - try { - if (res.datas.length > 0) { - res.datas.forEach((item) => { - item.createDate = moment(item.createDate).format("YYYY-MM-DD HH:mm:ss"); - item.updateDate = moment(item.updateDate).format("YYYY-MM-DD HH:mm:ss"); - if (item.feedBack) { - item.feedBack = JSON.parse(item.feedBack); - } - if (item.content) { - item.product = JSON.parse(item.content)[0]; - } - }); - - let dataList = res.datas; - - //瑙﹀簳鍔犺浇鏂版暟鎹苟淇濈暀鑰佹暟鎹� - if (isReachBottom) { - dataList = [...this.data.list, ...dataList] //灏嗘柊鏁版嵁鍔犲叆鑰佹暟鎹腑 - } - this.setData({ - list: dataList, - pageTotalCount: res.totalSize, - bottomLoading: false, - isMoreData: dataList.length > 0 ? false : true, - skeletonLoding: false, - }) - } else { - this.setData({ - skeletonLoding: false, - }) - } - } catch (error) { - console.log(error) - } - }) - }, - - goBookDetails(e) { - const { book } = e.currentTarget.dataset; - wx.navigateTo({ - url: `/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, - }); - }, - - /** - * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 - */ - onPullDownRefresh() { - if (this._freshing) return - this.setData({ - page: 1, - limit: 10, - pageTotalCount: 0, - bottomLoading: false, - isMoreData: false - }) - this._freshing = true; - this.setData({ - triggered: false, - }) - this.getDataList(false); - this._freshing = false - }, - - /** - * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� - */ - onReachBottom() { - this.setData({ - bottomLoading: true, - isMoreData: false - }) - let bool = false; - if (this.data.pageTotalCount > this.data.list.length) { - bool = true; - this.setData({ - page: this.data.page + 1, - }) - } else { - setTimeout(() => { - this.setData({ - bottomLoading: false, - isMoreData: true - }) - }, 100) - return false; - } - this.getDataList(bool); - }, - // 鐩戝惉婊氬姩璺濈 - onPageScroll(e) { - if (e && e.scrollTop >= 1000) { - this.setData({ - isBackTop: true - }) - } else { - this.setData({ - isBackTop: false - }) - } - }, - /** - * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/pages/personalCenter/index.js b/pages/personalCenter/index.js index 7b52b27..cda03ed 100644 --- a/pages/personalCenter/index.js +++ b/pages/personalCenter/index.js @@ -3,13 +3,13 @@ { title: '鎴戠殑璁㈠崟', icon: '/static/images/personal/order.png', - url: '/pages/personalCenter/myOrder/index', + url: '/packagePersonal/pages/myOrder/index', type: 'order', }, { title: '婵�娲诲晢鍝�', icon: '/static/images/personal/jihuo.png', - url: '/pages/personalCenter/activateProduct/index', + url: '/packagePersonal/pages/activateProduct/index', type: 'activateProduct', }, { @@ -21,19 +21,19 @@ { title: '鎴戠殑鏀惰棌', icon: '/static/images/personal/wodeshoucang.png', - url: '/pages/personalCenter/myCollection/index', + url: '/packagePersonal/pages/myCollection/index', type: 'collection', }, { title: '鎴戠殑涓嬭浇', icon: '/static/images/personal/download.png', - url: '/pages/personalCenter/downloads/index', + url: '/packagePersonal/pages/downloads/index', type: 'download', }, { title: '鏍蜂功鐢宠', icon: '/static/images/personal/yangshushenqing.png', - url: '/pages/personalCenter/sampleBooks/index', + url: '/packagePersonal/pages/sampleBooks/index', type: 'sampleBook', }, { @@ -45,7 +45,7 @@ { title: '鍑轰功鐢宠', icon: '/static/images/personal/chushu.png', - url: '/pages/personalCenter/publishBooks/index', + url: '/packagePersonal/pages/publishBooks/index', type: 'publishBooks', } ]; @@ -53,13 +53,13 @@ { title: '鎴戠殑娑堟伅', icon: '/static/images/personal/notification.png', - url: '/pages/personalCenter/myMassage/index', + url: '/packagePersonal/pages/myMassage/index', type: 'message', }, { title: '寤鸿涓庡弽棣�', icon: '/static/images/personal/feedback.png', - url: '/pages/personalCenter/feedBack/index', + url: '/packagePersonal/pages/feedBack/index', type: 'feedback', } ]; @@ -67,13 +67,13 @@ { title: '鍏充簬鎴戜滑', icon: '/static/images/personal/about.png', - url: '/pages/aboutUs/index?types=jsek_aboutUs', + url: '/packagePersonal/pages/aboutUs/index?types=jsek_aboutUs', type: 'aboutUs', }, { title: '鑱旂郴鎴戜滑', icon: '/static/images/personal/contact.png', - url: '/pages/aboutUs/index?types=jsek_contactUs', + url: '/packagePersonal/pages/aboutUs/index?types=jsek_contactUs', type: 'contact', } ]; @@ -178,7 +178,7 @@ //鏁欏笀璁よ瘉 toCertification() { wx.navigateTo({ - url: "/pages/teacherCertification/index", + url: "/packageDomain/pages/teacherCertification/index", }); }, diff --git a/pages/personalCenter/index.json b/pages/personalCenter/index.json index 9081e9f..a7c0c31 100644 --- a/pages/personalCenter/index.json +++ b/pages/personalCenter/index.json @@ -3,7 +3,7 @@ "navigationStyle": "custom", "usingComponents": { "t-user-center-card": "./components/user-center-card/index", - "t-image": "/components/webp-image/index" + "t-image": "tdesign-miniprogram/image/image" }, "enablePullDownRefresh": true } \ No newline at end of file diff --git a/pages/personalCenter/myCollection/index.js b/pages/personalCenter/myCollection/index.js deleted file mode 100644 index 9bbc225..0000000 --- a/pages/personalCenter/myCollection/index.js +++ /dev/null @@ -1,192 +0,0 @@ -const app = getApp(); -Page({ - - /** - * 椤甸潰鐨勫垵濮嬫暟鎹� - */ - data: { - active: 0, - activeName: "FavoriteBookCity", - tabList: [ - { - label: '鍥句功', - key: 0, - linkType: 'FavoriteBookCity', - }, - { - label: '璇剧▼', - key: 1, - linkType: 'Favoriteclass', - } - ], - list: [], - //鍒嗛〉 - page: 1, - limit: 18, - pageTotalCount: 0, - bottomLoading: false, - isMoreData: false, - // 杩斿洖椤堕儴 - isBackTop: false, - setScrollValue: 0, - skeletonLoding: true, - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - onLoad(options) { - console.log(options); - this.getDataList(false); - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 - */ - onReady() { - - }, - - tabBookClick(item) { - console.log(item, 1) - let that = this; - let info = this.data.tabList[item.detail.value] - that.setData({ - skeletonLoding: true, - active: item.detail.value, - activeName: info.linkType, - list: [], - page: 1, - bottomLoading: false, - isMoreData: false, - }) - that.getDataList(false); - }, - getDataList(isReachBottom) { - app.MG.store.getProductList({ - handelEBooK: true, - queryType: "AppUserProductLink", - linkType: this.data.activeName, - paging: { - start: this.data.page * this.data.limit - this.data.limit, - size: this.data.limit - }, - fields: { - author: [] - } - }).then((res) => { - try { - if (res.datas.length > 0) { - let dataList = res.datas; - //瑙﹀簳鍔犺浇鏂版暟鎹苟淇濈暀鑰佹暟鎹� - if (isReachBottom) { - dataList = [...this.data.list, ...dataList] //灏嗘柊鏁版嵁鍔犲叆鑰佹暟鎹腑 - } - this.setData({ - list: dataList, - pageTotalCount: res.total, - bottomLoading: false, - isMoreData: dataList.length > 0 ? false : true, - skeletonLoding: false, - loading: false - }) - } else { - this.setData({ - skeletonLoding: false, - loading: false - }) - } - } catch (error) { - console.log(error) - } - }) - }, - /** - * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 - */ - onPullDownRefresh() { - if (this._freshing) return - this.setData({ - // list: [], - page: 1, - limit: 18, - pageTotalCount: 0, - bottomLoading: false, - isMoreData: false - }) - this._freshing = true; - this.setData({ - triggered: false, - }) - this.getDataList(false); - this._freshing = false - }, - - /** - * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� - */ - onReachBottom() { - this.setData({ - bottomLoading: true, - isMoreData: false - }) - let bool = false; - if (this.data.pageTotalCount > this.data.list.length) { - bool = true; - this.setData({ - page: this.data.page + 1, - }) - } else { - setTimeout(() => { - this.setData({ - bottomLoading: false, - isMoreData: true - }) - }, 100) - return false; - } - this.getDataList(bool); - }, - - setCoolect(itemData) { - let that = this; - let info = itemData.currentTarget.dataset.info; - wx.showModal({ - title: '鎻愮ず', //鎻愮ず鐨勬爣棰� - content: '纭畾瑕佸彇娑堟敹钘忥紵', //鎻愮ず鐨勫唴瀹� - success: function (res) { - if (res.confirm) { - app.MG.store - .delProductLink({ - productIds: [info.id], - linkType: that.data.activeName, - }) - .then(() => { - wx.showToast({ - title: "鏀惰棌宸插彇娑�", - icon: 'success', - duration: 1000, - }) - this.getDataList(false) - }); - } else if (res.cancel) { - console.log('鐢ㄦ埛鐐瑰嚮浜嗗彇娑�') - } - } - }) - }, - goBookDetails(e) { - const { book } = e.currentTarget.dataset; - wx.navigateTo({ - url: `/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, - }); - }, - - - /** - * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/pages/personalCenter/myMassage/index.js b/pages/personalCenter/myMassage/index.js deleted file mode 100644 index a4fbd0f..0000000 --- a/pages/personalCenter/myMassage/index.js +++ /dev/null @@ -1,157 +0,0 @@ -import moment from 'moment' -const app = getApp(); -Page({ - /** - * 椤甸潰鐨勫垵濮嬫暟鎹� - */ - data: { - list: [], - //鍒嗛〉 - page: 1, - limit: 10, - pageTotalCount: 0, - bottomLoading: false, - isMoreData: false, - // 杩斿洖椤堕儴 - isBackTop: false, - setScrollValue: 0, - skeletonLoding: true, - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - onLoad(options) { - this.getDataList(false); - console.log(options); - }, - - getDataList(isReachBottom) { - app.MG.app.getAppMessageList({ - appRefCode: app.config.appRefCode, - start: this.data.page * this.data.limit - this.data.limit, - size: this.data.limit, - sort: { - type: "Desc", - field: "CreateDate" - } - }) - .then(res => { - try { - if (res.datas.length > 0) { - res.datas.forEach((item) => { - item.createDate = moment(item.createDate).format("YYYY-MM-DD HH:mm"); - }); - - let dataList = res.datas; - - //瑙﹀簳鍔犺浇鏂版暟鎹苟淇濈暀鑰佹暟鎹� - if (isReachBottom) { - dataList = [...this.data.list, ...dataList] //灏嗘柊鏁版嵁鍔犲叆鑰佹暟鎹腑 - } - this.setData({ - list: dataList, - pageTotalCount: res.totalSize, - bottomLoading: false, - isMoreData: dataList.length > 0 ? false : true, - skeletonLoding: false, - }) - } else { - this.setData({ - skeletonLoding: false, - }) - } - } catch (error) { - console.log(error) - } - }) - }, - - toList(itemData) { - let info = itemData.currentTarget.dataset.info; - wx.navigateTo({ - url: "/pages/personalCenter/myMassage/massageDetail/index?id=" + info.id, - }); - }, - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 - */ - onReady() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず - */ - onShow() { - - }, - - /** - * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 - */ - onPullDownRefresh() { - if (this._freshing) return - this.setData({ - page: 1, - limit: 10, - pageTotalCount: 0, - bottomLoading: false, - isMoreData: false - }) - this._freshing = true; - this.setData({ - triggered: false, - }) - this.getDataList(false); - this._freshing = false - }, - - /** - * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� - */ - onReachBottom() { - this.setData({ - bottomLoading: true, - isMoreData: false - }) - let bool = false; - if (this.data.pageTotalCount > this.data.list.length) { - bool = true; - this.setData({ - page: this.data.page + 1, - }) - } else { - setTimeout(() => { - this.setData({ - bottomLoading: false, - isMoreData: true - }) - }, 100) - return false; - } - this.getDataList(bool); - - }, - - // 鐩戝惉婊氬姩璺濈 - onPageScroll(e) { - if (e && e.scrollTop >= 1000) { - this.setData({ - isBackTop: true - }) - } else { - this.setData({ - isBackTop: false - }) - } - }, - - /** - * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/pages/promotion-detail/index.js b/pages/promotion-detail/index.js deleted file mode 100644 index dd6614e..0000000 --- a/pages/promotion-detail/index.js +++ /dev/null @@ -1,57 +0,0 @@ -import Toast from 'tdesign-miniprogram/toast/index'; -import { fetchPromotion } from '../../services/promotion/detail'; - -Page({ - data: { - list: [], - banner: '', - time: 0, - showBannerDesc: false, - statusTag: '', - }, - - onLoad(query) { - const promotionID = parseInt(query.promotion_id); - this.getGoodsList(promotionID); - }, - - getGoodsList(promotionID) { - fetchPromotion(promotionID).then( - ({ list, banner, time, showBannerDesc, statusTag }) => { - const goods = list.map((item) => ({ - ...item, - tags: item.tags.map((v) => v.title), - })); - this.setData({ - list: goods, - banner, - time, - showBannerDesc, - statusTag, - }); - }, - ); - }, - - goodClickHandle(e) { - const { index } = e.detail; - const { spuId } = this.data.list[index]; - wx.navigateTo({ url: `/pages/goods/details/index?spuId=${spuId}` }); - }, - - cardClickHandle() { - Toast({ - context: this, - selector: '#t-toast', - message: '鐐瑰嚮鍔犺喘', - }); - }, - - bannerClickHandle() { - Toast({ - context: this, - selector: '#t-toast', - message: '鐐瑰嚮瑙勫垯璇︽儏', - }); - }, -}); diff --git a/pages/promotion-detail/index.json b/pages/promotion-detail/index.json deleted file mode 100644 index 2eb4145..0000000 --- a/pages/promotion-detail/index.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "navigationBarTitleText": "钀ラ攢璇︽儏", - "usingComponents": { - "t-toast": "tdesign-miniprogram/toast/toast", - "t-image": "/components/webp-image/index", - "t-icon": "tdesign-miniprogram/icon/icon", - "count-down": "tdesign-miniprogram/count-down/count-down", - "goods-list": "/components/goods-list/index" - } -} \ No newline at end of file diff --git a/pages/promotion-detail/index.wxml b/pages/promotion-detail/index.wxml deleted file mode 100644 index be5b5c8..0000000 --- a/pages/promotion-detail/index.wxml +++ /dev/null @@ -1,76 +0,0 @@ -<view id="js-page-wrap" class="promotion-detail-container"> - <view wx:if="{{banner}}" class="wrap" id="{{independentID}}"> - <view class="banner-wrap"> - <t-image - src="{{banner}}" - mode="aspectFill" - webp="{{true}}" - t-class="t-class-promotion-head" - /> - <view wx:if="{{!showBannerDesc && (time >= 0 || statusTag === 'finish')}}" class="count-down-wrap in-banner-count-down-wrap"> - <block wx:if="{{statusTag === 'finish'}}"> - <view class="status-tag {{statusTag}}">宸茬粨鏉�</view> - <text class="count-down-label">娲诲姩宸茬粨鏉�</text> - </block> - <block wx:else> - <view wx:if="{{statusTag === 'before'}}" class="status-tag {{statusTag}}"> - 鏈紑濮� - </view> - <text class="count-down-label">璺濈粨鏉熶粎鍓�</text> - <count-down - wx:if="{{time > 0}}" - t-class="wr-cd-class" - time="{{time}}" - format="DD澶� HH:mm:ss" - bind:finish="countDownFinishHandle" - /> - </block> - <view class="detail-entry" bind:tap="bannerClickHandle"> - <text class="detail-entry-label">瑙勫垯璇︽儏</text> - <t-icon name="chevron-right" size="34rpx" style="color: #999" /> - </view> - </view> - <view wx:if="{{showBannerDesc && (useBannerDescSlot || time >= 0 || statusTag === 'finish')}}" class="banner-desc-wrap"> - <block wx:if="{{useBannerDescSlot}}"> - <slot name="banner-desc" /> - </block> - <block wx:else> - <view class="count-down-wrap after-banner-count-down-wrap"> - <block wx:if="{{statusTag === 'finish'}}"> - <view class="status-tag {{statusTag}}">宸茬粨鏉�</view> - <text class="count-down-label">娲诲姩宸茬粨鏉�</text> - </block> - <block wx:else> - <view wx:if="{{statusTag === 'before'}}" class="status-tag {{statusTag}}"> - 鏈紑濮� - </view> - <text class="count-down-label">璺濈粨鏉熶粎鍓�</text> - <count-down - class="{{cdClass}}" - wr-class="wr-cd-class" - wx:if="{{time > 0}}" - time="{{time}}" - format="DD澶� HH:mm:ss" - bind:finish="countDownFinishHandle" - /> - </block> - <view class="detail-entry" bind:tap="bannerClickHandle"> - <text class="detail-entry-label">瑙勫垯璇︽儏</text> - <t-icon name="chevron-right" size="34rpx" style="color: #999" /> - </view> - </view> - </block> - </view> - </view> - </view> - <view wx:if="{{list && list.length>0}}" class="promotion-goods-list"> - <goods-list - wr-class="goods-list-container" - goodsList="{{list}}" - bind:click="goodClickHandle" - bind:addcart="cardClickHandle" - /> - </view> - <t-toast id="t-toast" /> -</view> - diff --git a/pages/promotion-detail/index.wxss b/pages/promotion-detail/index.wxss deleted file mode 100644 index 2151b7a..0000000 --- a/pages/promotion-detail/index.wxss +++ /dev/null @@ -1,111 +0,0 @@ -.promotion-detail-container .wrap { - display: block; - padding: 0 24rpx; - background: linear-gradient(#fff, #f5f5f5); -} - -.promotion-detail-container .t-class-promotion-head { - width: 702rpx; - height: 160rpx; - border-radius: 8rpx; -} - -.promotion-detail-container .wrap .count-down-wrap { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: baseline; - line-height: 34rpx; -} - -.promotion-detail-container .wrap .count-down-wrap.in-banner-count-down-wrap { - position: absolute; - bottom: 32rpx; - left: 32rpx; - right: 32rpx; -} - -.promotion-detail-container .wrap .count-down-wrap .status-tag { - height: 32rpx; - line-height: 32rpx; - font-size: 20rpx; - margin-right: 12rpx; - border-radius: 16rpx; - padding: 0 12rpx; -} - -.promotion-detail-container .wrap .count-down-wrap .status-tag.before { - color: #fff; - background-color: #ff9853; -} - -.promotion-detail-container .wrap .count-down-wrap .status-tag.finish { - color: #fff; - background-color: #ccc; -} - -.promotion-detail-container .wrap .count-down-wrap .count-down-label { - color: #666; - font-size: 24rpx; - margin-right: 0.5em; -} - -.promotion-detail-container .wrap .count-down-wrap .detail-entry { - margin-left: auto; - height: 40rpx; -} - -.promotion-detail-container .wrap .count-down-wrap .detail-entry-label { - color: #fff; - font-size: 24rpx; - margin-right: 12rpx; -} - -.promotion-detail-container - .wrap - .count-down-wrap.after-banner-count-down-wrap { - padding: 10rpx; -} - -.promotion-detail-container - .wrap - .count-down-wrap.after-banner-count-down-wrap - .detail-entry { - display: flex; - align-items: center; -} - -.promotion-detail-container - .wrap - .count-down-wrap.after-banner-count-down-wrap - .detail-entry-label { - color: #999; - margin-right: 0; -} - -.promotion-detail-container .wrap .gl-empty-wrap { - margin-top: 180rpx; -} - -.promotion-detail-container .wrap .gl-empty-img { - width: 240rpx; - height: 240rpx; - display: block; - margin: 0 auto; -} - -.promotion-detail-container .wrap .gl-empty-label { - font-size: 28rpx; - color: #999; - margin-top: 40rpx; - text-align: center; -} - -.promotion-detail-container .goods-list-container { - background: #f5f5f5 !important; -} - -.promotion-detail-container .promotion-goods-list { - padding: 20rpx 24rpx; - background-color: #f5f5f5; -} diff --git a/pages/retrievalPage/index.js b/pages/retrievalPage/index.js index 060d8f2..e2ff6dd 100644 --- a/pages/retrievalPage/index.js +++ b/pages/retrievalPage/index.js @@ -527,7 +527,7 @@ console.log(e.currentTarget.dataset.item); const item = e.currentTarget.dataset.item wx.navigateTo({ - url: '/pages/bookServices/detail/index?id=' + item.id + '&name' + item.name + url: '/packageBookService/pages/bookServices/detail/index?id=' + item.id + '&name' + item.name }) diff --git a/pages/sampleBookList/applicationForm/index.js b/pages/sampleBookList/applicationForm/index.js deleted file mode 100644 index c102bba..0000000 --- a/pages/sampleBookList/applicationForm/index.js +++ /dev/null @@ -1,306 +0,0 @@ -import { worksDataBytool } from "../../../assets/js/toolClass.js"; -const app = getApp(); -Page({ - data: { - userInfo: null, - active: 0, - description: "", //鐢宠瑙勫垯 - teacherInfo: { - workInfo: null, - schoolName: "", - courseName: "", - }, - contactInfo: { - fullName: "", - phone: "", - detailedAddress: "" - }, - paperBookList: [], //鏍蜂功鍗曠焊璐ㄤ功 - electronicBookList: [], //鏍蜂功鍗曠數瀛愪功 - ebookCount: 0, - paperBookCount: 0, - bookList: [], - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - onLoad() { }, - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず - */ - onShow() { - if (wx.getStorageSync(app.config.userInfoKey)) { - this.setData({ - userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey)) - }) - if (this.data.userInfo.role == 'Teacher') { - this.setData({ - teacherInfo: { - schoolName: JSON.parse(this.data.userInfo.data).schoolName, - courseName: JSON.parse(this.data.userInfo.data).courseName, - }, - contactInfo: { - fullName: JSON.parse(this.data.userInfo.data).fullName, - phone: JSON.parse(this.data.userInfo.data).phone, - detailedAddress: JSON.parse(this.data.userInfo.data).detailedAddress - } - }) - } - if (wx.getStorageSync("paperBookList")) { - this.setData({ - paperBookList: JSON.parse(wx.getStorageSync("paperBookList")), - bookList: JSON.parse(wx.getStorageSync("paperBookList")) - }) - } - if (wx.getStorageSync("electronicBookList")) { - this.setData({ - electronicBookList: JSON.parse(wx.getStorageSync("electronicBookList")) - }) - } - this.getSelectBookCount(); - this.getSelectPaperBookCount(); - this.getPaperType(); - } else { - wx.navigateTo({ - url: "/pages/testLogin/index", - }); - } - - }, - - tabClick(item) { - let that = this; - if (item.detail.value == '1') { - that.setData({ - active: item.detail.value, - bookList: this.data.electronicBookList - }) - this.getElectronType(); - } else { - that.setData({ - active: item.detail.value, - bookList: this.data.paperBookList - }) - this.getPaperType(); - } - }, - - getElectronType() { - app.MG.resource.getCmsTypeByRefCode({ refCodes: ['jsek_electronicSampleBook'] }).then((res) => { - this.setData({ - description: res[0].description, - teacherInfo: { - workInfo: res[0].cmsTypeLinks[0].children - }, - }) - }) - }, - getPaperType() { - app.MG.resource.getCmsTypeByRefCode({ - refCodes: ['jsek_paperVersionSampleBook'] - }). - then((res) => { - if (res && res.length > 0) { - this.setData({ - description: res[0].description, - teacherInfo: { - workInfo: res[0].cmsTypeLinks[0].children - }, - }) - } - }) - }, - //鑾峰彇褰撳墠宸茬敵璇锋鏁帮紙鐢靛瓙锛� - getSelectBookCount() { - let that = this; - app.MG.app.getTicketResult({ - ticketRefCodeOrGuid: 'electronicSampleBookapplyNum', - roleId: that.data.userInfo.roleId - }) - .then((res) => { - let num = res.totalCount - res.usedCount; - that.setData({ - ebookCount: num - }) - }) - }, - //鑾峰彇褰撳墠宸茬敵璇锋鏁帮紙绾歌川锛� - getSelectPaperBookCount() { - let that = this; - app.MG.app.getTicketResult({ - ticketRefCodeOrGuid: 'paperSampleBookapplyNum', - roleId: that.data.userInfo.roleId - }) - .then((res) => { - let count = res.totalCount - res.usedCount; - that.setData({ - paperBookCount: count, - }) - }) - }, - - submit() { - let that = this; - if (that.data.bookList.length > 0) { - if (that.data.active == '1' && that.data.ebookCount == 0) { - wx.showToast({ - title: "鎮ㄧ殑鐢靛瓙鏍蜂功鐢宠娆℃暟宸茬敤灏斤紝鑻ヨ缁х画锛岃鑱旂郴绠$悊鍛橈紒", - icon: 'none', - duration: 1000, - }) - return - } - if (that.data.active == '0' && that.data.paperBookCount == 0) { - wx.showToast({ - title: "鎮ㄧ殑绾歌川鏍蜂功鐢宠娆℃暟宸茬敤灏斤紝鑻ヨ缁х画锛岃鑱旂郴绠$悊鍛橈紒", - icon: 'none', - duration: 1000, - }) - return - } - let data = {} - let applyInfo = {} - if (that.data.active == '1') { - data = { - topicIdOrRefCode: 'applyBook', - name: that.data.userInfo.name || '', - content: JSON.stringify(that.data.bookList), - state: 'WaitAudit', - type: 'applyForEbook', - cmsTypeRefCode: 'jsek_electronicSampleBook', - newDataListRequest: worksDataBytool(that.data.teacherInfo.workInfo, that.data.teacherInfo) - } - applyInfo = { - ticketRefCodeOrGuid: 'electronicSampleBookapplyNum', - roleId: userStore.userInfo.roleId, - refType: 'applyBook' - } - } else { - if (!(that.data.contactInfo.fullName && that.data.contactInfo.phone && that.data.contactInfo.detailedAddress)) { - wx.showToast({ - title: "璇峰皢鏀惰揣浜轰俊鎭~鍐欏畬鏁达紒", - icon: 'none', - duration: 1000, - }) - return - } - const mailAddress = JSON.stringify(that.data.contactInfo) - that.setData({ - teacherInfo: { - detailedAddress: mailAddress, - } - }) - data = { - topicIdOrRefCode: 'applyEntityBook', - name: that.data.userInfo.name || '', - content: JSON.stringify(that.data.bookList), - state: 'WaitAudit', - type: 'applyForPbook', - cmsTypeRefCode: 'jsek_paperVersionSampleBook', - newDataListRequest: worksDataBytool(that.data.teacherInfo.workInfo, that.data.teacherInfo) - } - applyInfo = { - ticketRefCodeOrGuid: 'paperSampleBookapplyNum', - roleId: that.data.userInfo.roleId, - refType: 'applyEntityBook' - } - } - app.MG.ugc.newTopicMessage(data).then((res) => { - if (res) { - app.MG.app.useTicket(applyInfo).then(() => { - if (that.data.active == '1') { - that.setData({ - electronicBookList: [], - bookList: [], - }) - wx.setStorageSync("electronicBookList", that.data.electronicBookList); - } else { - that.setData({ - paperBookList: [], - bookList: [], - }) - wx.setStorageSync("paperBookList", that.data.paperBookList); - } - - wx.showModal({ - title: '鎻愮ず锛�', //鎻愮ず鐨勬爣棰� - content: '鎮ㄧ殑鏍蜂功鐢宠宸叉彁浜わ紝绠$悊鍛樺鏍镐腑锛佺敵璇风姸鎬佸湪銆愪釜浜轰腑蹇冣�旀牱涔︾敵璇枫�戜腑鏌ヨ銆�', //鎻愮ず鐨勫唴瀹� - success: function (res) { - if (res.confirm) { - wx.navigateTo({ - url: "/pages/personalCenter/sampleBooks/index", - }); - } else if (res.cancel) { - } - } - }) - }) - } - }) - } else { - wx.showToast({ - title: "鎮ㄨ繕鏈�夋嫨鍥句功鍔犲叆鐢宠鍗曪紒", - icon: 'none', - duration: 1000, - }) - } - - }, - - onDelete(e) { - let that = this; - const item = e.currentTarget.dataset.book; - wx.showModal({ - title: '鎻愮ず锛�', //鎻愮ず鐨勬爣棰� - content: '纭畾瑕佸垹闄よ涔﹀悧锛�', //鎻愮ず鐨勫唴瀹� - success: function (res) { - if (res.confirm) { - if (that.data.active == '1') { - that.data.electronicBookList.forEach((obj, index) => { - if (obj.id == item.id) { - that.data.electronicBookList.splice(index, 1); - } - }) - that.setData({ - bookList: that.data.electronicBookList - }) - wx.setStorageSync("electronicBookList", that.data.electronicBookList); - } else { - that.data.paperBookList.forEach((obj, index) => { - if (obj.id == item.id) { - that.data.paperBookList.splice(index, 1); - } - }) - that.setData({ - bookList: this.data.paperBookList - }) - wx.setStorageSync("paperBookList", that.data.paperBookList); - } - } else if (res.cancel) { - } - } - }) - }, - - /** - * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 - */ - onPullDownRefresh() { - - }, - - /** - * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� - */ - onReachBottom() { - - }, - - /** - * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/pages/sampleBookList/index.js b/pages/sampleBookList/index.js deleted file mode 100644 index 8dc8a7f..0000000 --- a/pages/sampleBookList/index.js +++ /dev/null @@ -1,995 +0,0 @@ -const app = getApp(); -Page({ - - /** - * 椤甸潰鐨勫垵濮嬫暟鎹� - */ - data: { - barHeight: '', - navBarHeight: '', - searchValue: '', - userInfo: null, - path: '*', - pathList: [], - - bookList: [], - //楂樼骇鍒嗙被 - iconList: { - value: "", - options: [], - }, - //涓�绾у垎绫� - stairList: { - value: '', - options: [], - }, - //浜岀骇鍒嗙被 - secondList: { - value: [], - options: [], - }, - //閲嶇偣椤圭洰 - majorProjectList: { - value: [], - options: [], - }, - //鏂板舰鎬佹暀鏉� - newTextBook: { - value: [], - options: [], - }, - //楂樼骇鍒嗙被閫変腑 - assortCheck: { - name: '', - code: '', - }, - - stairCode: '', // 涓�绾у垎绫婚�変腑椤� - secondCode: '', // 浜岀骇鍒嗙被閫変腑椤� - sort: '', // 鎺掑簭 - //鍒嗛〉 - page: 1, - limit: 10, - pageTotalCount: 0, - bottomLoading: false, - isMoreData: false, - // 杩斿洖椤堕儴 - isBackTop: false, - setScrollValue: 0, - skeletonLoding: true, - alreadyPaperBookList: [], //宸茬敵璇风焊璐ㄦ牱涔� - alreadyElectronicBookList: [], //宸茬敵璇风數瀛愭牱涔� - paperBookList: [], //鏍蜂功鍗曠焊璐ㄤ功 - electronicBookList: [], //鏍蜂功鍗曠數瀛愪功 - paperBookCount: 0, //绾歌川涔﹀墿浣欐鏁� - ebookCount: 0, //鐢靛瓙涔﹀墿浣欐鏁� - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - onLoad(options) { - const systInfo = wx.getSystemInfoSync(); - const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 - const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� - this.setData({ - barHeight: systInfo.statusBarHeight, - navBarHeight: navBarHeight, - }); - // 鎼滅储璧嬪�� - if (options && options.searchValue) { - this.setData({ - searchValue: options.searchValue, - }); - } - // 楂樼骇鍒嗙被璧嬪�� - if (options && options.assortCode) { - this.setData({ - assortCheck: { - name: options.assorName, - code: options.assortCode, - 'iconList.value': options.assortCode - }, - }); - } - if (this.data.assortCheck.code) { - // 鑾峰彇涓�绾у垎绫� - this.getStairList(this.data.assortCheck.code); - } - // 涓�绾у垎绫诲拰path璧嬪�� - if (options && options.assortCode && options.stairCode) { - this.setData({ - 'stairList.value': options.stairCode, - stairCode: options.stairCode, - path: `${options.assortCode}\\${options.stairCode}`, - }); - } - // 浜岀骇鍒嗙被璧嬪�� - if (options && options.secondCode) { - this.setData({ - secondCode: options.secondCode, - pathList: [{ - Path: options.secondCode, - Type: '*', - StoreRefCode: app.config.goodsStore, - } - ], - }) - } - this.getIconTypeList(); - this.getBookList(false); - // 鑾峰彇閲嶇偣椤圭洰 - this.getProjectList('bookClassification'); - //鏂板舰鎬佹暀鏉� - this.getProjectList('newFormsTextbooks'); - if (wx.getStorageSync(app.config.tokenKey)) { - this.getAlreadyPBookList() - this.getAlreadyEBookList() - } - if (wx.getStorageSync(app.config.userInfoKey)) { - this.setData({ - userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey)) - }) - } - if (wx.getStorageSync("paperBookList")) { - this.setData({ - paperBookList: wx.getStorageSync("paperBookList") - }) - } - if (wx.getStorageSync("electronicBookList")) { - this.setData({ - electronicBookList: wx.getStorageSync("electronicBookList") - }) - } - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 - */ - onReady() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず - */ - onShow() { - - }, - goBack() { - wx.navigateBack(); - }, - //鑾峰彇楂樼骇鍒嗙被 - getIconTypeList() { - let query = { - path: '*', - filterList: [ - { - value: 'Normal', - field: 'state' - } - ], - queryType: '\\', - searchList: [], - size: '5', - start: '0', - storeRefCode: app.config.goodsStore, - sort: { type: 'Asc', field: 'LinkOrder' } - } - app.MG.store.getStoreChannelList(query).then((res) => { - let list = []; - if (res.datas.length > 0) ( - res.datas.forEach((item) => { - item.value = item.refCode; - item.label = item.name; - if (item.refCode == 'jsek_higherEducation') { - list.push(item) - } - if (item.refCode == 'jsek_vocationalEducation') { - list.push(item) - } - - }) - ) - this.setData({ - 'iconList.options': list, - 'iconList.value': this.data.assortCode, - }); - }) - }, - // 鑾峰彇涓�绾у垪琛� - getStairList(path) { - const query = { - path, - filterList: [], - queryType: '\\', - searchList: [], - size: '30', - start: '0', - storeRefCode: app.config.goodsStore, - sort: { type: 'Asc', field: 'LinkOrder' }, - }; - app.MG.store.getStoreChannelList(query).then(async (res) => { - let options = []; - if (res.datas.length > 0) { - for (let index = 0; index < res.datas.length; index++) { - let item = res.datas[index]; - options.push({ - value: item.refCode, - label: item.name, - }); - } - } - this.setData({ - 'stairList.options': options, - 'stairList.value': this.data.stairCode, - }); - }); - }, - // 鑾峰彇涓�绾у垎绫讳笅浜岀骇鍒嗙被 - getSecondList(path) { - let options = []; - let query = { - path, - filterList: [], - queryType: '\\', - searchList: [], - size: '30', - start: '0', - storeRefCode: app.config.goodsStore, - sort: { type: 'Asc', field: 'LinkOrder' }, - }; - app.MG.store.getStoreChannelList(query).then((res) => { - if (res.datas.length > 0) { - for (let index = 0; index < res.datas.length; index++) { - const item = res.datas[index]; - options.push({ - value: `${item.pathLinks[0].linkPath}\\${item.id}`, - label: item.name, - }); - } - } - this.setData({ - 'secondList.options': options, - }); - const second = [this.data.secondCode] - this.setData({ - 'secondList.value': second - }) - }); - }, - // 鑾峰彇閲嶇偣椤圭洰 - getProjectList(type) { - const options = []; - const arr = []; - let array = []; - const query = { - refCodes: [type], - }; - app.MG.store.getProductTypeField(query).then((res) => { - array = JSON.parse(res[0].config).option; - for (let index = 0; index < array.length; index++) { - const element = array[index]; - if (element.child) { - for (let index = 0; index < element.child.length; index++) { - const item = element.child[index]; - arr.push(item); - } - } - } - if (type == 'bookClassification') { - for (let index = 0; index < arr.length; index++) { - const element = arr[index]; - options.push({ - value: element.value, - label: element.name, - }); - } - this.setData({ - 'majorProjectList.options': options, - }); - } else if (type == 'newFormsTextbooks') { - for (let index = 0; index < arr.length; index++) { - const element = arr[index]; - options.push({ - value: element.value, - label: element.name, - }); - } - this.setData({ - 'newTextBook.options': options, - }); - console.log('閲嶇偣椤圭洰', this.data.newTextBook); - } - }); - }, - // 鑾峰彇鍥句功鍒楄〃 - getBookList(isReachBottom) { - let that = this; - let sort; - let pathObj = {}; - if (that.data.pathList.length) { - pathObj = { - subAccess: this.data.pathList, - }; - } else { - pathObj = { - path: that.data.path, - queryType: '*', - }; - } - if (that.data.sort) { - sort = { - Name: that.data.sort, - BaseType: '', - }; - } else { - sort = { - type: 'Desc', - field: 'ViewCount', - }; - } - // 鎼滅储 - let searchObj = {}; - if (that.data.searchValue) { - searchObj = { - 'Name*': that.data.searchValue, - '||author*': that.data.searchValue, - '||isbn*': that.data.searchValue, - '||seriesName*': that.data.searchValue, - }; - } - const query = { - ...pathObj, - filterList: [ - { - value: 'Normal', - field: 'state', - }, - ], - sort, - coverSize: { - height: 145, - }, - paging: { - start: that.data.page * that.data.limit - that.data.limit, - size: that.data.limit - }, - fields: { - author: [], - isbn: [], - publicationDate: [], - isApplyBook: [], - 'isApplyBook>': ['1'], - ...searchObj, - }, - }; - app.MG.store.getProductList(query).then((res) => { - try { - if (res.datas.length > 0) { - res.datas.forEach((item) => { - item.paperDisabled = false - item.paperChecked = false - item.electronDisabled = false - item.electronChecked = false - if (item.purchasedSaleMethodIdList.indexOf(item.defaultSaleMethodId) > -1) { - item.electronDisabled = true - item.electronChecked = true - } - if (that.data.alreadyPaperBookList.length > 0) { - that.data.alreadyPaperBookList.forEach((pBook) => { - pBook.content.forEach((pBookItem) => { - if (pBookItem.id === item.id && pBook.state == 'WaitAudit') { - item.paperDisabled = true - item.paperChecked = true - } - if (pBookItem.id === item.id && pBook.state == 'Normal') { - item.paperDisabled = false - } - }) - }) - } - if (that.data.alreadyElectronicBookList.length > 0) { - that.data.alreadyElectronicBookList.forEach((eBook) => { - eBook.content.forEach((eBookItem) => { - if (eBookItem.id === item.id && !eBook.isExpiry && eBook.state != 'Reject') { - item.electronDisabled = true - item.electronChecked = true - } - }) - }) - } - if (that.data.paperBookList.length > 0) { - for (let i = 0; i < that.data.paperBookList.length; i++) { - if (that.data.paperBookList[i].id == item.id) { - item.paperChecked = true - } - } - } - if (that.data.electronicBookList.length > 0) { - for (let i = 0; i < that.data.electronicBookList.length; i++) { - if (that.data.electronicBookList[i].id == item.id) { - item.electronChecked = true - } - } - } - }); - let list = res.datas; - //瑙﹀簳鍔犺浇鏂版暟鎹苟淇濈暀鑰佹暟鎹� - if (isReachBottom) { - list = [...this.data.bookList, ...list] //灏嗘柊鏁版嵁鍔犲叆鑰佹暟鎹腑 - } - that.setData({ - bookList: list, - pageTotalCount: res.total, - bottomLoading: false, - isMoreData: list.length > 0 ? false : true, - skeletonLoding: false, - loading: false - }) - } else { - that.setData({ - skeletonLoding: false, - loading: false - }) - } - } catch (error) { - console.log(error) - } - }); - }, - //楂樼骇鍒嗙被閫夋嫨 - onChangeIcon(e) { - this.setData({ - assortCheck: { - code: e.detail.value, - }, - stairCode: '', - secondCode: '', - path: `${e.detail.value}`, - 'iconList.value': e.detail.value, - }); - this.getBookList(false); - this.getStairList(this.data.assortCheck.code); - - }, - // 涓�绾у垎绫诲垏鎹� - onChangeStair(e) { - const path = e.detail.value.length - ? `${this.data.assortCheck.code}\\${e.detail.value}` - : this.data.assortCheck.code; - this.setData({ - pathList: [], - stairCode: e.detail.value, - secondCode: '', - path: path, - 'stairList.value': e.detail.value, - }); - this.getBookList(false); - this.getSecondList(path); - }, - // 浜岀骇鍒嗙被鍒囨崲 - onChangeSecond(e) { - const pathList = []; - for (let index = 0; index < e.detail.value.length; index++) { - const element = e.detail.value[index]; - pathList.push({ - Path: element, - Type: '*', - StoreRefCode: app.config.goodsStore, - }); - } - this.setData({ - pathList: pathList, - 'secondList.value': e.detail.value, - }); - - }, - // - onConfirmSecond() { - this.getBookList(false); - }, - // 閲嶇偣椤圭洰鏀瑰彉 - changeMajorProject(e) { - this.setData({ - 'majorProjectList.value': e.detail.value, - }); - this.getBookList(false); - }, - // 閲嶇偣椤圭洰閲嶇疆 - resetMajorProject() { - this.setData({ - 'majorProjectList.value': [], - }); - this.getBookList(false); - }, - changeNewText(e) { - this.setData({ - 'newTextBook.value': e.detail.value, - }); - this.getBookList(false); - }, - resetNewText() { - this.setData({ - 'newTextBook.value': [], - }); - this.getBookList(false); - }, - // 鎺掑簭鎸夐挳 - sortClick() { - if (!this.data.sort.length) { - this.setData({ - sort: 'Desc', - }); - } else if (this.data.sort == 'Desc') { - this.setData({ - sort: 'Asc', - }); - } else if (this.data.sort == 'Asc') { - this.setData({ - sort: '', - }); - } - let path; - if (this.data.secondCode) { - path = this.data.secondCode; - } else if (this.data.stairCode) { - path = `${this.data.assortCheck.code - }\\${this.data.stairCode}`; - } else { - path = this.data.assortCheck.code; - } - this.setData({ - path: path, - }); - this.getBookList(false); - }, - // 鎼滅储鍥句功 - searchBook(e) { - console.log(e.detail.value); - this.setData({ - searchValue: e.detail.value, - }); - this.getBookList(false); - }, - // 璺宠浆鍥句功璇︽儏 - goDetail(e) { - const { book } = e.currentTarget.dataset; - wx.navigateTo({ - url: `/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, - }); - }, - //鑾峰彇宸茬敵璇风焊璐ㄦ牱涔� - getAlreadyPBookList() { - const data = { - start: 0, - size: 9999, - topicIdOrRefCode: 'applyEntityBook', - appRefCode: app.config.appRefCode, - sort: { - type: 'Desc', - field: 'CreateDate' - } - } - app.MG.ugc.getTopicMessageList(data).then((res) => { - res.datas.map((item) => { - if (item.content) { - item.content = JSON.parse(item.content) - } - }) - this.setData({ - alreadyPaperBookList: res.datas, - }); - }) - }, - //鑾峰彇宸茬敵璇风數瀛愭牱涔� - getAlreadyEBookList() { - const data = { - start: 0, - size: 9999, - topicIdOrRefCode: 'applyBook', - appRefCode: app.config.appRefCode, - sort: { - type: 'Desc', - field: 'CreateDate' - } - } - app.MG.ugc.getTopicMessageList(data).then((res) => { - let list = [] - res.datas.map((item) => { - if (item.feedBack) { - item.feedBack = JSON.parse(item.feedBack) - if (item.feedBack.endDate) { - let times = new Date(item.feedBack.endDate + ' 23:59:59').getTime() - let currentDate = new Date().getTime() - if (times < currentDate) { - item.isExpiry = true - } - } - } - if (item.content) { - item.content = JSON.parse(item.content) - } - if (item.state != 'Reject') { - list.push(item) - } - }) - this.setData({ - alreadyElectronicBookList: list, - }); - }) - }, - - - - /** - * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 - */ - onPullDownRefresh() { - if (this._freshing) return - this.setData({ - page: 1, - limit: 10, - pageTotalCount: 0, - bottomLoading: false, - isMoreData: false - }) - this._freshing = true; - this.setData({ - triggered: false, - }) - this.getBookList(false); - this._freshing = false - }, - - /** - * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� - */ - onReachBottom() { - this.setData({ - bottomLoading: true, - isMoreData: false - }) - let bool = false; - if (this.data.pageTotalCount > this.data.bookList.length) { - bool = true; - this.setData({ - page: this.data.page + 1, - }) - - } else { - setTimeout(() => { - this.setData({ - bottomLoading: false, - isMoreData: true - }) - }, 100) - return false; - } - this.getBookList(bool); - }, - //绾歌川鏍蜂功 - onChangePaper(e) { - const item = e.currentTarget.dataset.book; - let role = this.data.userInfo != null ? this.data.userInfo.role : null - if (role) { - if (item.paperDisabled) { - wx.showToast({ - title: "璇ユ牱涔﹀凡鐢宠", - icon: 'none', - duration: 1000, - }) - return - } - - if (item.paperChecked) { - if (this.data.paperBookList.length > 0) { - this.data.paperBookList.forEach((obj, index) => { - if (obj.id == item.id) { - this.data.paperBookList.splice(index, 1); - } - }) - } - item.paperChecked = false; - if (this.data.bookList.length > 0) { - this.data.bookList.forEach(i => { - if (i.id == item.id) { - i.paperChecked = false; - } - }) - } - wx.showToast({ - title: "宸蹭粠鏍蜂功鐢宠鍗曠Щ闄�", - icon: 'none', - duration: 1000, - }) - wx.setStorageSync("paperBookList", JSON.stringify(this.data.paperBookList)); - return - } - if (role == 'Teacher') { - this.getSelectPaperBookCount(item) - } else { - item.paperChecked = false - wx.showModal({ - title: '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', //鎻愮ず鐨勬爣棰� - content: '璇峰厛杩涜鏁欏笀璁よ瘉锛�', //鎻愮ず鐨勫唴瀹� - success: function (res) { - if (res.confirm) { - wx.navigateTo({ - url: "/pages/teacherCertification/index", - }); - } else if (res.cancel) { - item.paperChecked = false - } - } - }) - } - } else { - item.paperChecked = false - } - }, - getSelectPaperBookCount(item) { - app.MG.app - .getTicketResult({ - ticketRefCodeOrGuid: 'paperSampleBookapplyNum', - roleId: this.data.userInfo.roleId - }) - .then((res) => { - this.setData({ - paperBookCount: res.totalCount - res.usedCount - }) - if (!item.paperDisabled) { - this.getAlreadyBookList(item, 'pBook') - } - }) - }, - //閫夋嫨鐢靛瓙鏍蜂功 - onChangeElectron(e) { - const item = e.currentTarget.dataset.book; - let role = this.data.userInfo != null ? this.data.userInfo.role : null; - if (role) { - if (item.electronDisabled) { - wx.showToast({ - title: "璇ユ牱涔﹀凡鐢宠", - icon: 'none', - duration: 1000, - }) - return - } - if (item.electronChecked) { - if (this.data.electronicBookList) { - this.data.electronicBookList.forEach((obj, index) => { - if (obj.id == item.id) { - this.data.electronicBookList.splice(index, 1); - } - }) - } - if (this.data.bookList.length > 0) { - this.data.bookList.forEach(i => { - if (i.id == item.id) { - i.electronChecked = false; - } - }) - } - item.electronChecked = false; - wx.showToast({ - title: "宸蹭粠鏍蜂功鐢宠鍗曠Щ闄�", - icon: 'none', - duration: 1000, - }) - wx.setStorageSync("electronicBookList", JSON.stringify(this.data.electronicBookList)); - return - } - if (role == 'Teacher') { - //鏈夋棤瀛愬晢鍝侊紝瀛愬晢鍝佹湁鏃犵數瀛愪功鏂囦欢 - const obj = { - path: '*', - queryType: 'SubProduct', - sort: { - type: 'Desc', - field: 'CreateDate' - }, - paging: { - start: 0, - size: 6 - }, - mainProductId: item.id, - fields: { - bookshelf_pdf: [], - bookshelf_protectedEpub: [], - } - } - app.MG.store.getProductList(obj).then((res) => { - if (res.datas.length > 0) { - if (res.datas[0].bookshelf_pdf || res.datas[0].bookshelf_protectedEpub) { - this.getSelectBookCount(item) - } else { - wx.showToast({ - title: "鏆傛棤鐢靛瓙涔︽枃浠�,璇疯仈绯荤鐞嗗憳!", - icon: 'none', - duration: 1000, - }) - } - } else { - this.getSelectBookCount(item) - } - }) - } else { - item.electronChecked = false - wx.showModal({ - title: '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', //鎻愮ず鐨勬爣棰� - content: '璇峰厛杩涜鏁欏笀璁よ瘉锛�', //鎻愮ず鐨勫唴瀹� - success: function (res) { - if (res.confirm) { - wx.navigateTo({ - url: "/pages/teacherCertification/index", - }); - } else if (res.cancel) { - item.electronChecked = false - } - } - }) - } - } - }, - getSelectBookCount(item) { - app.MG.app - .getTicketResult({ - ticketRefCodeOrGuid: 'electronicSampleBookapplyNum', - roleId: this.data.userInfo.roleId - }) - .then((res) => { - this.setData({ - ebookCount: res.totalCount - res.usedCount - }) - if (!item.electronDisabled) { - this.getAlreadyBookList(item, 'eBook') - } - }) - }, - - getAlreadyBookList(item, type) { - let itemAttr = null - let isHas = false - itemAttr = { - id: item.id, - title: item.name || '-', - icon: item.icon, - checked: false, - defaultSaleMethodId: item.defaultSaleMethodId, - md5: item.datas.Icon, - author: item.author || '-', - price: item.price || '-', - isbn: item.isbn || '-', - publicationDate: item.publicationDate - } - - if (type == 'eBook') { - if (this.data.ebookCount > 0) { - const eBookData = this.data.electronicBookList - if (eBookData.length == 2) { - item.electronChecked = false - wx.showToast({ - title: "姣忔鏈�澶氬彧鍙敵璇�2鏈牱涔�", - icon: 'none', - duration: 1000, - }) - return false - } - if (eBookData.length > 0) { - for (let i = 0; i < eBookData.length; i++) { - if (eBookData[i].id == item.id) { - isHas = true - } - } - if (!isHas) { - wx.showToast({ - title: "娣诲姞鎴愬姛锛屽湪鏍蜂功鐢宠鍗曠瓑鎮ㄥ摝~", - icon: "none", - duration: 1000, - }) - this.setData({ - electronicBookList: [...this.data.electronicBookList, ...[item]] - }) - wx.setStorageSync("electronicBookList", JSON.stringify(this.data.electronicBookList)); - } else { - item.electronChecked = false - wx.showToast({ - title: "璇ヤ功宸插湪娓呭崟鍒楄〃涓�", - icon: "none", - duration: 1000, - }) - } - } else { - wx.showToast({ - title: "娣诲姞鎴愬姛锛屽湪鏍蜂功鐢宠鍗曠瓑鎮ㄥ摝~", - icon: "none", - duration: 1000, - }) - this.setData({ - electronicBookList: [...this.data.electronicBookList, ...[item]] - }) - wx.setStorageSync("electronicBookList", JSON.stringify(this.data.electronicBookList)); - } - } else { - item.electronChecked = false - wx.showToast({ - title: "鎮ㄧ殑鐢靛瓙鏍蜂功鐢宠娆℃暟宸茬敤灏斤紝鑻ヨ缁х画锛岃鑱旂郴绠$悊鍛橈紒", - icon: "none", - duration: 1000, - }) - } - } else { - if (this.data.paperBookCount > 0) { - const pBookData = this.data.paperBookList - if (pBookData.length == 2) { - item.paperChecked = false - wx.showToast({ - title: "姣忔鏈�澶氬彧鍙敵璇�2鏈牱涔�", - icon: 'none', - duration: 1000, - }) - return false - } - if (pBookData.length > 0) { - for (let i = 0; i < pBookData.length; i++) { - if (pBookData[i].id == item.id) { - isHas = true - } - } - if (!isHas) { - item.paperChecked = true - wx.showToast({ - title: "娣诲姞鎴愬姛锛屽湪鏍蜂功鐢宠鍗曠瓑鎮ㄥ摝~", - icon: 'none', - duration: 1000, - }) - this.setData({ - paperBookList: [...this.data.paperBookList, ...[item]] - }) - wx.setStorageSync("paperBookList", JSON.stringify(this.data.paperBookList)); - console.log(this.data.paperBookList, "3") - } else { - item.paperChecked = false - wx.showToast({ - title: "璇ヤ功宸插湪娓呭崟鍒楄〃涓�", - icon: 'none', - duration: 1000, - }) - } - } else { - item.paperChecked = true; - wx.showToast({ - title: "娣诲姞鎴愬姛锛屽湪鏍蜂功鐢宠鍗曠瓑鎮ㄥ摝~", - icon: 'none', - duration: 1000, - }) - this.setData({ - paperBookList: [item] - }) - wx.setStorageSync("paperBookList", JSON.stringify(this.data.paperBookList)); - console.log(this.data.paperBookList, "4") - } - } else { - item.paperChecked = false - wx.showToast({ - title: "鎮ㄧ殑绾歌川鏍蜂功鐢宠娆℃暟宸茬敤灏斤紝鑻ヨ缁х画锛岃鑱旂郴绠$悊鍛橈紒", - icon: 'none', - duration: 1000, - }) - } - } - }, - //鍘绘牱涔︾敵璇峰崟 - goApply() { - wx.navigateTo({ - url: "/pages/sampleBookList/applicationForm/index", - }); - }, - /** - * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/pages/student/index.js b/pages/student/index.js new file mode 100644 index 0000000..9a56f81 --- /dev/null +++ b/pages/student/index.js @@ -0,0 +1,66 @@ +// pages/student/index.js +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/bookServices/webpage/index.json b/pages/student/index.json similarity index 100% copy from pages/bookServices/webpage/index.json copy to pages/student/index.json diff --git a/pages/student/index.wxml b/pages/student/index.wxml new file mode 100644 index 0000000..0c697e8 --- /dev/null +++ b/pages/student/index.wxml @@ -0,0 +1,2 @@ +<!--pages/student/index.wxml--> +<text> 瀛︿範</text> diff --git a/pages/student/index.wxss b/pages/student/index.wxss new file mode 100644 index 0000000..f32601b --- /dev/null +++ b/pages/student/index.wxss @@ -0,0 +1 @@ +/* pages/student/index.wxss */ \ No newline at end of file diff --git a/pages/usercenter/address/edit/index.js b/pages/usercenter/address/edit/index.js deleted file mode 100644 index 33b2f19..0000000 --- a/pages/usercenter/address/edit/index.js +++ /dev/null @@ -1,356 +0,0 @@ -import Toast from 'tdesign-miniprogram/toast/index'; -import { fetchDeliveryAddress } from '../../../../services/address/fetchAddress'; -import { areaData } from '../../../../config/index'; -import { resolveAddress, rejectAddress } from './util'; - -const innerPhoneReg = '^1(?:3\\d|4[4-9]|5[0-35-9]|6[67]|7[0-8]|8\\d|9\\d)\\d{8}$'; -const innerNameReg = '^[a-zA-Z\\d\\u4e00-\\u9fa5]+$'; -const labelsOptions = [ - { id: 0, name: '瀹�' }, - { id: 1, name: '鍏徃' }, -]; - -Page({ - options: { - multipleSlots: true, - }, - externalClasses: ['theme-wrapper-class'], - data: { - locationState: { - labelIndex: null, - addressId: '', - addressTag: '', - cityCode: '', - cityName: '', - countryCode: '', - countryName: '', - detailAddress: '', - districtCode: '', - districtName: '', - isDefault: false, - name: '', - phone: '', - provinceCode: '', - provinceName: '', - isEdit: false, - isOrderDetail: false, - isOrderSure: false, - }, - areaData: areaData, - labels: labelsOptions, - areaPickerVisible: false, - submitActive: false, - visible: false, - labelValue: '', - columns: 3, - }, - privateData: { - verifyTips: '', - }, - onLoad(options) { - const { id } = options; - this.init(id); - }, - - onUnload() { - if (!this.hasSava) { - rejectAddress(); - } - }, - - hasSava: false, - - init(id) { - if (id) { - this.getAddressDetail(Number(id)); - } - }, - getAddressDetail(id) { - fetchDeliveryAddress(id).then((detail) => { - this.setData({ locationState: detail }, () => { - const { isLegal, tips } = this.onVerifyInputLegal(); - this.setData({ - submitActive: isLegal, - }); - this.privateData.verifyTips = tips; - }); - }); - }, - onInputValue(e) { - const { item } = e.currentTarget.dataset; - if (item === 'address') { - const { selectedOptions = [] } = e.detail; - this.setData( - { - 'locationState.provinceCode': selectedOptions[0].value, - 'locationState.provinceName': selectedOptions[0].label, - 'locationState.cityName': selectedOptions[1].label, - 'locationState.cityCode': selectedOptions[1].value, - 'locationState.districtCode': selectedOptions[2].value, - 'locationState.districtName': selectedOptions[2].label, - areaPickerVisible: false, - }, - () => { - const { isLegal, tips } = this.onVerifyInputLegal(); - this.setData({ - submitActive: isLegal, - }); - this.privateData.verifyTips = tips; - }, - ); - } else { - const { value = '' } = e.detail; - this.setData( - { - [`locationState.${item}`]: value, - }, - () => { - const { isLegal, tips } = this.onVerifyInputLegal(); - this.setData({ - submitActive: isLegal, - }); - this.privateData.verifyTips = tips; - }, - ); - } - }, - onPickArea() { - this.setData({ areaPickerVisible: true }); - }, - onPickLabels(e) { - const { item } = e.currentTarget.dataset; - const { - locationState: { labelIndex = undefined }, - labels = [], - } = this.data; - let payload = { - labelIndex: item, - addressTag: labels[item].name, - }; - if (item === labelIndex) { - payload = { labelIndex: null, addressTag: '' }; - } - this.setData({ - 'locationState.labelIndex': payload.labelIndex, - }); - this.triggerEvent('triggerUpdateValue', payload); - }, - addLabels() { - this.setData({ - visible: true, - }); - }, - confirmHandle() { - const { labels, labelValue } = this.data; - this.setData({ - visible: false, - labels: [...labels, { id: labels[labels.length - 1].id + 1, name: labelValue }], - labelValue: '', - }); - }, - cancelHandle() { - this.setData({ - visible: false, - labelValue: '', - }); - }, - onCheckDefaultAddress({ detail }) { - const { value } = detail; - this.setData({ - 'locationState.isDefault': value, - }); - }, - - onVerifyInputLegal() { - const { name, phone, detailAddress, districtName } = this.data.locationState; - const prefixPhoneReg = String(this.properties.phoneReg || innerPhoneReg); - const prefixNameReg = String(this.properties.nameReg || innerNameReg); - const nameRegExp = new RegExp(prefixNameReg); - const phoneRegExp = new RegExp(prefixPhoneReg); - - if (!name || !name.trim()) { - return { - isLegal: false, - tips: '璇峰~鍐欐敹璐т汉', - }; - } - if (!nameRegExp.test(name)) { - return { - isLegal: false, - tips: '鏀惰揣浜轰粎鏀寔杈撳叆涓枃銆佽嫳鏂囷紙鍖哄垎澶у皬鍐欙級銆佹暟瀛�', - }; - } - if (!phone || !phone.trim()) { - return { - isLegal: false, - tips: '璇峰~鍐欐墜鏈哄彿', - }; - } - if (!phoneRegExp.test(phone)) { - return { - isLegal: false, - tips: '璇峰~鍐欐纭殑鎵嬫満鍙�', - }; - } - if (!districtName || !districtName.trim()) { - return { - isLegal: false, - tips: '璇烽�夋嫨鐪佸競鍖轰俊鎭�', - }; - } - if (!detailAddress || !detailAddress.trim()) { - return { - isLegal: false, - tips: '璇峰畬鍠勮缁嗗湴鍧�', - }; - } - if (detailAddress && detailAddress.trim().length > 50) { - return { - isLegal: false, - tips: '璇︾粏鍦板潃涓嶈兘瓒呰繃50涓瓧绗�', - }; - } - return { - isLegal: true, - tips: '娣诲姞鎴愬姛', - }; - }, - - builtInSearch({ code, name }) { - return new Promise((resolve, reject) => { - wx.getSetting({ - success: (res) => { - if (res.authSetting[code] === false) { - wx.showModal({ - title: `鑾峰彇${name}澶辫触`, - content: `鑾峰彇${name}澶辫触锛岃鍦ㄣ�愬彸涓婅銆�-灏忕▼搴忋�愯缃�戦」涓紝灏嗐��${name}銆戝紑鍚�俙, - confirmText: '鍘昏缃�', - confirmColor: '#FA550F', - cancelColor: '鍙栨秷', - success(res) { - if (res.confirm) { - wx.openSetting({ - success(settinRes) { - if (settinRes.authSetting[code] === true) { - resolve(); - } else { - console.warn('鐢ㄦ埛鏈墦寮�鏉冮檺', name, code); - reject(); - } - }, - }); - } else { - reject(); - } - }, - fail() { - reject(); - }, - }); - } else { - resolve(); - } - }, - fail() { - reject(); - }, - }); - }); - }, - - onSearchAddress() { - this.builtInSearch({ code: 'scope.userLocation', name: '鍦板潃浣嶇疆' }).then(() => { - wx.chooseLocation({ - success: (res) => { - if (res.name) { - this.triggerEvent('addressParse', { - address: res.address, - name: res.name, - latitude: res.latitude, - longitude: res.longitude, - }); - } else { - Toast({ - context: this, - selector: '#t-toast', - message: '鍦扮偣涓虹┖锛岃閲嶆柊閫夋嫨', - icon: '', - duration: 1000, - }); - } - }, - fail: function (res) { - console.warn(`wx.chooseLocation fail: ${JSON.stringify(res)}`); - if (res.errMsg !== 'chooseLocation:fail cancel') { - Toast({ - context: this, - selector: '#t-toast', - message: '鍦扮偣閿欒锛岃閲嶆柊閫夋嫨', - icon: '', - duration: 1000, - }); - } - }, - }); - }); - }, - formSubmit() { - const { submitActive } = this.data; - if (!submitActive) { - Toast({ - context: this, - selector: '#t-toast', - message: this.privateData.verifyTips, - icon: '', - duration: 1000, - }); - return; - } - const { locationState } = this.data; - - this.hasSava = true; - - resolveAddress({ - saasId: '88888888', - uid: `88888888205500`, - authToken: null, - id: locationState.addressId, - addressId: locationState.addressId, - phone: locationState.phone, - name: locationState.name, - countryName: locationState.countryName, - countryCode: locationState.countryCode, - provinceName: locationState.provinceName, - provinceCode: locationState.provinceCode, - cityName: locationState.cityName, - cityCode: locationState.cityCode, - districtName: locationState.districtName, - districtCode: locationState.districtCode, - detailAddress: locationState.detailAddress, - isDefault: locationState.isDefault === 1 ? 1 : 0, - addressTag: locationState.addressTag, - latitude: locationState.latitude, - longitude: locationState.longitude, - storeId: null, - }); - - wx.navigateBack({ delta: 1 }); - }, - - getWeixinAddress(e) { - const { locationState } = this.data; - const weixinAddress = e.detail; - this.setData( - { - locationState: { ...locationState, ...weixinAddress }, - }, - () => { - const { isLegal, tips } = this.onVerifyInputLegal(); - this.setData({ - submitActive: isLegal, - }); - this.privateData.verifyTips = tips; - }, - ); - }, -}); diff --git a/pages/usercenter/address/edit/index.json b/pages/usercenter/address/edit/index.json deleted file mode 100644 index ca45b59..0000000 --- a/pages/usercenter/address/edit/index.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "navigationBarTitleText": "娣诲姞鏂板湴鍧�", - "usingComponents": { - "t-textarea": "tdesign-miniprogram/textarea/textarea", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-input": "tdesign-miniprogram/input/input", - "t-button": "tdesign-miniprogram/button/button", - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-switch": "tdesign-miniprogram/switch/switch", - "t-location": "/pages/usercenter/components/t-location/index", - "t-cascader": "tdesign-miniprogram/cascader/cascader" - } -} \ No newline at end of file diff --git a/pages/usercenter/address/edit/index.wxml b/pages/usercenter/address/edit/index.wxml deleted file mode 100644 index e8d46a9..0000000 --- a/pages/usercenter/address/edit/index.wxml +++ /dev/null @@ -1,134 +0,0 @@ -<view class="address-detail"> - <view class="divider-line" /> - <t-location - title="鑾峰彇寰俊鏀惰幏鍦板潃" - isCustomStyle - t-class="address-detail-wx-location" - bind:change="getWeixinAddress" - > - <t-icon class="address-detail-wx-arrow" name="arrow_forward" prefix="wr" color="#bbb" size="32rpx" /> - </t-location> - <view class="divider-line" /> - <view class="form-address"> - <form class="form-content"> - <t-cell-group> - <t-cell class="form-cell" t-class-title="t-cell-title" title="鏀惰揣浜�" t-class-note="t-cell-note"> - <t-input - class="t-input" - slot="note" - t-class="field-text" - borderless - data-item="name" - maxlength="20" - type="text" - value="{{locationState.name}}" - placeholder="鎮ㄧ殑濮撳悕" - bind:change="onInputValue" - /> - </t-cell> - <t-cell class="form-cell" t-class-title="t-cell-title" title="鎵嬫満鍙�"> - <t-input - slot="note" - class="t-input" - t-class="field-text" - borderless - type="number" - value="{{locationState.phone}}" - maxlength="11" - placeholder="鑱旂郴鎮ㄧ殑鎵嬫満鍙�" - bind:change="onInputValue" - data-item="phone" - /> - </t-cell> - <t-cell class="form-cell" t-class-title="t-cell-title" title="鍦板尯"> - <t-input - slot="note" - class="t-input" - t-class="field-text" - borderless - placeholder="鐪�/甯�/鍖�" - data-item="address" - value="{{locationState.provinceName ? locationState.provinceName+'/':'' }}{{locationState.cityName ? locationState.cityName+'/':''}}{{locationState.districtName}}" - catch:tap="onPickArea" - disabled - /> - <t-icon slot="right-icon" t-class="map" prefix="wr" name="location" catch:tap="onSearchAddress" /> - </t-cell> - <t-cell class="form-cell" t-class-title="t-cell-title" title="璇︾粏鍦板潃" bordered="{{false}}"> - <view slot="note" class="textarea__wrapper"> - <t-textarea - slot="note" - type="text" - value="{{locationState.detailAddress}}" - placeholder="闂ㄧ墝鍙风瓑(渚嬪:10鏍�1001鍙�)" - autosize - bind:change="onInputValue" - data-item="detailAddress" - /> - </view> - </t-cell> - - <view class="divider-line" /> - <t-cell - class="form-cell" - t-class-note="t-cell-note address__tag" - t-class-title="t-cell-title" - title="鏍囩" - bordered="{{false}}" - > - <view class="t-input address-flex-box" slot="note"> - <t-button - wx:for="{{labels}}" - wx:for-item="label" - wx:key="index" - size="extra-small" - t-class="label-list {{locationState.labelIndex === index ? 'active-btn':''}}" - bindtap="onPickLabels" - data-item="{{index}}" - > - {{label.name}} - </t-button> - <t-button size="extra-small" t-class="label-list" bindtap="addLabels"> - <t-icon name="add" size="40rpx" color="#bbb" /> - </t-button> - </view> - </t-cell> - <view class="divider-line" /> - <t-cell title="璁剧疆涓洪粯璁ゆ敹璐у湴鍧�" bordered="{{false}}"> - <t-switch - value="{{locationState.isDefault}}" - slot="note" - colors="{{['#0ABF5B', '#c6c6c6']}}" - bind:change="onCheckDefaultAddress" - /> - </t-cell> - </t-cell-group> - <view class="submit"> - <t-button shape="round" block disabled="{{!submitActive}}" bind:tap="formSubmit"> 淇濆瓨 </t-button> - </view> - </form> - </view> - <t-cascader - data-item="address" - data-type="1" - visible="{{areaPickerVisible}}" - theme="tab" - options="{{areaData}}" - value="{{locationState.districtCode}}" - title="閫夋嫨鍦板尯" - bind:change="onInputValue" - ></t-cascader> -</view> -<t-dialog - visible="{{visible}}" - t-class-confirm="dialog__button-confirm" - t-class-cancel="dialog__button-cancel" - title="濉啓鏍囩鍚嶇О" - confirm-btn="纭畾" - cancel-btn="鍙栨秷" - bind:confirm="confirmHandle" - bind:cancel="cancelHandle" -> - <t-input slot="content" class="dialog__input" model:value="{{labelValue}}" placeholder="璇疯緭鍏ユ爣绛惧悕绉�" borderless /> -</t-dialog> -<t-toast id="t-toast" /> diff --git a/pages/usercenter/address/edit/index.wxss b/pages/usercenter/address/edit/index.wxss deleted file mode 100644 index f89e06f..0000000 --- a/pages/usercenter/address/edit/index.wxss +++ /dev/null @@ -1,95 +0,0 @@ -page { - background-color: #f5f5f5; -} -page .divider-line { - width: 100%; - height: 20rpx; - background-color: #f5f5f5; -} -.address-flex-box { - display: flex; - flex-wrap: wrap; -} -.address-detail { - font-size: 30rpx; -} -.address-detail-wx-location { - background: #fff; - padding: 24rpx 32rpx; - display: flex; - align-items: center; - justify-content: space-between; -} -.address-detail-wx-arrow { - align-items: flex-end; -} - -.form-cell .t-cell__title { - width: 144rpx; - padding-right: 32rpx; - flex: none !important; -} - -.textarea__wrapper { - width: 100%; -} - -.textarea__wrapper .t-textarea { - padding: 0 !important; -} - -.form-address .map { - font-size: 48rpx !important; - margin-left: 20rpx; - color: #9d9d9f; -} - -.address__tag { - justify-content: flex-start !important; -} - -.form-address .label-list { - background: #f5f5f5; - color: #333; - min-width: 100rpx; - margin-right: 32rpx; - font-size: 26rpx; - border: 2rpx solid transparent; - width: auto; -} -.form-address .label-list::after { - content: none; -} -.form-address .active-btn { - color: #fa4126; - border: 2rpx solid #fa4126; - background: rgba(255, 95, 21, 0.04); -} -.form-address .active-btn::after { - border: 4rpx solid #ff5f15; -} - -.submit { - box-sizing: border-box; - padding: 64rpx 30rpx 88rpx 30rpx; -} -.submit .btn-submit-address { - background: #fa4126 !important; - color: #fff !important; -} - -.dialog__button-confirm { - color: #fa4126 !important; -} - -.form-address .form-content { - --td-input-vertical-padding: 0; -} - -.dialog__input { - margin-top: 32rpx; - border-radius: 8rpx; - box-sizing: border-box; - --td-input-vertical-padding: 12px; - --td-input-bg-color: #f3f3f3; -} diff --git a/pages/usercenter/address/edit/util.js b/pages/usercenter/address/edit/util.js deleted file mode 100644 index 17d619a..0000000 --- a/pages/usercenter/address/edit/util.js +++ /dev/null @@ -1,33 +0,0 @@ -let addressPromise = []; - -/** 鍦板潃缂栬緫Promise */ -export const getAddressPromise = () => { - let resolver; - let rejecter; - const nextPromise = new Promise((resolve, reject) => { - resolver = resolve; - rejecter = reject; - }); - - addressPromise.push({ resolver, rejecter }); - - return nextPromise; -}; - -/** 鐢ㄦ埛淇濆瓨浜嗕竴涓湴鍧� */ -export const resolveAddress = (address) => { - const allAddress = [...addressPromise]; - addressPromise = []; - - console.info('鐢ㄦ埛淇濆瓨浜嗕竴涓湴鍧�', address); - - allAddress.forEach(({ resolver }) => resolver(address)); -}; - -/** 鍙栨秷缂栬緫 */ -export const rejectAddress = () => { - const allAddress = [...addressPromise]; - addressPromise = []; - - allAddress.forEach(({ rejecter }) => rejecter(new Error('cancel'))); -}; diff --git a/pages/usercenter/address/list/index.js b/pages/usercenter/address/list/index.js deleted file mode 100644 index 7e24d37..0000000 --- a/pages/usercenter/address/list/index.js +++ /dev/null @@ -1,191 +0,0 @@ -/* eslint-disable no-param-reassign */ -import { fetchDeliveryAddressList } from '../../../../services/address/fetchAddress'; -import Toast from 'tdesign-miniprogram/toast/index'; -import { resolveAddress, rejectAddress } from './util'; -import { getAddressPromise } from '../edit/util'; - -Page({ - data: { - addressList: [], - deleteID: '', - showDeleteConfirm: false, - isOrderSure: false, - }, - - /** 閫夋嫨妯″紡 */ - selectMode: false, - /** 鏄惁宸茬粡閫夋嫨鍦板潃锛屼笉缃负true鐨勮瘽椤甸潰绂诲紑鏃朵細瑙﹀彂鍙栨秷閫夋嫨琛屼负 */ - hasSelect: false, - - onLoad(query) { - const { selectMode = '', isOrderSure = '', id = '' } = query; - this.setData({ - isOrderSure: !!isOrderSure, - id, - }); - this.selectMode = !!selectMode; - this.init(); - }, - - init() { - this.getAddressList(); - }, - onUnload() { - if (this.selectMode && !this.hasSelect) { - rejectAddress(); - } - }, - getAddressList() { - const { id } = this.data; - fetchDeliveryAddressList().then((addressList) => { - addressList.forEach((address) => { - if (address.id === id) { - address.checked = true; - } - }); - this.setData({ addressList }); - }); - }, - getWXAddressHandle() { - wx.chooseAddress({ - success: (res) => { - if (res.errMsg.indexOf('ok') === -1) { - Toast({ - context: this, - selector: '#t-toast', - message: res.errMsg, - icon: '', - duration: 1000, - }); - return; - } - Toast({ - context: this, - selector: '#t-toast', - message: '娣诲姞鎴愬姛', - icon: '', - duration: 1000, - }); - const { length: len } = this.data.addressList; - this.setData({ - [`addressList[${len}]`]: { - name: res.userName, - phoneNumber: res.telNumber, - address: `${res.provinceName}${res.cityName}${res.countryName}${res.detailInfo}`, - isDefault: 0, - tag: '寰俊鍦板潃', - id: len, - }, - }); - }, - }); - }, - confirmDeleteHandle({ detail }) { - const { id } = detail || {}; - if (id !== undefined) { - this.setData({ deleteID: id, showDeleteConfirm: true }); - Toast({ - context: this, - selector: '#t-toast', - message: '鍦板潃鍒犻櫎鎴愬姛', - theme: 'success', - duration: 1000, - }); - } else { - Toast({ - context: this, - selector: '#t-toast', - message: '闇�瑕佺粍浠跺簱鍙戞柊鐗堟墠鑳芥嬁鍒板湴鍧�ID', - icon: '', - duration: 1000, - }); - } - }, - deleteAddressHandle(e) { - const { id } = e.currentTarget.dataset; - this.setData({ - addressList: this.data.addressList.filter((address) => address.id !== id), - deleteID: '', - showDeleteConfirm: false, - }); - }, - editAddressHandle({ detail }) { - this.waitForNewAddress(); - - const { id } = detail || {}; - wx.navigateTo({ url: `/pages/usercenter/address/edit/index?id=${id}` }); - }, - selectHandle({ detail }) { - if (this.selectMode) { - this.hasSelect = true; - resolveAddress(detail); - wx.navigateBack({ delta: 1 }); - } else { - this.editAddressHandle({ detail }); - } - }, - createHandle() { - this.waitForNewAddress(); - wx.navigateTo({ url: '/pages/usercenter/address/edit/index' }); - }, - - waitForNewAddress() { - getAddressPromise() - .then((newAddress) => { - let addressList = [...this.data.addressList]; - - newAddress.phoneNumber = newAddress.phone; - newAddress.address = `${newAddress.provinceName}${newAddress.cityName}${newAddress.districtName}${newAddress.detailAddress}`; - newAddress.tag = newAddress.addressTag; - - if (!newAddress.addressId) { - newAddress.id = `${addressList.length}`; - newAddress.addressId = `${addressList.length}`; - - if (newAddress.isDefault === 1) { - addressList = addressList.map((address) => { - address.isDefault = 0; - - return address; - }); - } else { - newAddress.isDefault = 0; - } - - addressList.push(newAddress); - } else { - addressList = addressList.map((address) => { - if (address.addressId === newAddress.addressId) { - return newAddress; - } - return address; - }); - } - - addressList.sort((prevAddress, nextAddress) => { - if (prevAddress.isDefault && !nextAddress.isDefault) { - return -1; - } - if (!prevAddress.isDefault && nextAddress.isDefault) { - return 1; - } - return 0; - }); - - this.setData({ - addressList: addressList, - }); - }) - .catch((e) => { - if (e.message !== 'cancel') { - Toast({ - context: this, - selector: '#t-toast', - message: '鍦板潃缂栬緫鍙戠敓閿欒', - icon: '', - duration: 1000, - }); - } - }); - }, -}); diff --git a/pages/usercenter/address/list/index.json b/pages/usercenter/address/list/index.json deleted file mode 100644 index 1e59a76..0000000 --- a/pages/usercenter/address/list/index.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "navigationBarTitleText": "鏀惰揣鍦板潃", - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon", - "t-image": "/components/webp-image/index", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-address-item": "../../components/ui-address-item/index", - "t-location": "../../components/t-location/index", - "t-empty": "tdesign-miniprogram/empty/empty" - } -} \ No newline at end of file diff --git a/pages/usercenter/address/list/index.wxml b/pages/usercenter/address/list/index.wxml deleted file mode 100644 index c9d85d3..0000000 --- a/pages/usercenter/address/list/index.wxml +++ /dev/null @@ -1,49 +0,0 @@ -<view class="address-container"> - <view class="address-list" wx:if="{{addressList.length > 0}}"> - <block - wx:for="{{addressList}}" - wx:for-index="index" - wx:for-item="address" - wx:key="addressId" - > - <t-address-item - isDrawLine="{{index+1 !== addressList.length}}" - extra-space="{{extraSpace}}" - class-prefix="ym" - address="{{address}}" - data-id="{{address.id}}" - bind:onSelect="selectHandle" - bind:onDelete="deleteAddressHandle" - bind:onEdit="editAddressHandle" - /> - </block> - </view> - <view wx:else class="no-address"> - <t-empty icon="" description="鏆傛棤鏀惰揣鍦板潃锛岃刀蹇坊鍔犲惂" /> - </view> - <view class="bottom-fixed"> - <view class="btn-wrap"> - <t-location - title="寰俊鍦板潃瀵煎叆" - isOrderSure="{{isOrderSure}}" - isDisabledBtn="{{addressList.length >= 20}}" - navigateUrl="/pages/usercenter/address/edit/index" - navigateEvent="onWeixinAddressPassed" - t-class="location-btn" - isCustomStyle="{{true}}" - bind:navigate="waitForNewAddress" - /> - <view class="address-btn {{addressList.length >= 20 ? 'btn-default':''}}" bind:tap="createHandle"> - <t-icon - name="add" - size="48rpx" - color="#fff" - t-class="custom-class" - /> - <text>鏂板缓鏀惰揣鍦板潃</text> - </view> - </view> - <view class="footer" wx:if="{{addressList.length >= 20}}">鏈�澶氭敮鎸佹坊鍔�20涓敹璐у湴鍧�</view> - </view> -</view> -<t-toast id="t-toast" /> diff --git a/pages/usercenter/address/list/index.wxss b/pages/usercenter/address/list/index.wxss deleted file mode 100644 index 05b2554..0000000 --- a/pages/usercenter/address/list/index.wxss +++ /dev/null @@ -1,109 +0,0 @@ -page { - background: #f5f5f5; - height: 100%; -} -.address-container { - display: flex; - flex-direction: column; - align-items: stretch; - padding-bottom: calc(env(safe-area-inset-bottom) + 172rpx); -} -.address-container .address-list { - font-size: 24rpx; - background-color: #ffffff; - -webkit-overflow-scrolling: touch; -} -.address-list .no-address { - width: 750rpx; - padding-top: 30vh; - display: flex; - flex-direction: column; - justify-content: flex-start; - align-items: center; -} -.address-list .no-address__icon { - width: 224rpx; - height: 224rpx; -} -.address-list .no-address__text { - font-size: 28rpx; - line-height: 40rpx; - color: #999999; - margin-top: 24rpx; -} -.address-container .bottom-fixed { - border-top: 1rpx solid #e5e5e5; - position: fixed; - bottom: 0; - left: 0; - right: 0; - z-index: 1000; - background: #fff; - display: flex; - justify-content: center; - flex-direction: column; - align-items: center; - padding: 12rpx 32rpx calc(env(safe-area-inset-bottom) + 12rpx) 32rpx; -} -.address-container .btn-wrap { - width: 100%; - display: flex; - justify-content: space-between; - align-items: center; - font-size: 32rpx; - font-weight: bold; -} -.address-container .btn-wrap .location-btn { - width: 332rpx; - height: 88rpx; - display: flex; - justify-content: center; - align-items: center; - background-color: #ffffff; - color: #333; - position: relative; -} -.address-container .btn-wrap .location-btn::after { - content: ''; - position: absolute; /* 鎶婄埗瑙嗗浘璁剧疆涓簉elative锛屾柟渚垮畾浣�*/ - top: 0; - left: 0; - width: 200%; - height: 200%; - transform: scale(0.5); - transform-origin: 0 0; - box-sizing: border-box; - border-radius: 88rpx; - border: #dddddd 2rpx solid; -} -.address-container .btn-wrap .address-btn { - width: 332rpx; - height: 88rpx; - display: flex; - justify-content: center; - align-items: center; - background-color: #fa4126; - border-radius: 44rpx; - color: #fff; -} -.address-container .btn-wrap .btn-default { - background: #c6c6c6; -} -.address-container .bottom-fixed .footer { - margin-top: 10rpx; - display: inline-block; - width: 100%; - text-align: center; - font-size: 24rpx; - font-weight: 400; - color: #ff2525; - line-height: 60rpx; - height: 60rpx; -} -.address-container .message { - margin-top: 48rpx; -} -.address-container .custom-class { - margin-right: 12rpx; - font-weight: normal; -} diff --git a/pages/usercenter/address/list/util.js b/pages/usercenter/address/list/util.js deleted file mode 100644 index 953f8d0..0000000 --- a/pages/usercenter/address/list/util.js +++ /dev/null @@ -1,31 +0,0 @@ -let addressPromise = []; - -/** 鑾峰彇涓�涓湴鍧�閫夋嫨Promise */ -export const getAddressPromise = () => { - let resolver; - let rejecter; - const nextPromise = new Promise((resolve, reject) => { - resolver = resolve; - rejecter = reject; - }); - - addressPromise.push({ resolver, rejecter }); - - return nextPromise; -}; - -/** 鐢ㄦ埛閫夋嫨浜嗕竴涓湴鍧� */ -export const resolveAddress = (address) => { - const allAddress = [...addressPromise]; - addressPromise = []; - - allAddress.forEach(({ resolver }) => resolver(address)); -}; - -/** 鐢ㄦ埛娌℃湁閫夋嫨浠讳綍鍦板潃鍙槸杩斿洖涓婁竴椤典簡 */ -export const rejectAddress = () => { - const allAddress = [...addressPromise]; - addressPromise = []; - - allAddress.forEach(({ rejecter }) => rejecter(new Error('cancel'))); -}; diff --git a/pages/usercenter/components/order-group/index.js b/pages/usercenter/components/order-group/index.js deleted file mode 100644 index 5bfe0f6..0000000 --- a/pages/usercenter/components/order-group/index.js +++ /dev/null @@ -1,37 +0,0 @@ -Component({ - externalClasses: ['title-class', 'icon-class', 'number-class'], - options: { - multipleSlots: true, - }, - properties: { - orderTagInfos: { - type: Array, - value: [], - }, - title: { - type: String, - value: '鎴戠殑璁㈠崟', - }, - desc: { - type: String, - value: '鍏ㄩ儴璁㈠崟', - }, - isTop: { - type: Boolean, - value: true, - }, - classPrefix: { - type: String, - value: 'wr', - }, - }, - methods: { - onClickItem(e) { - this.triggerEvent('onClickItem', e.currentTarget.dataset.item); - }, - - onClickTop() { - this.triggerEvent('onClickTop', {}); - }, - }, -}); diff --git a/pages/usercenter/components/order-group/index.json b/pages/usercenter/components/order-group/index.json deleted file mode 100644 index c22feda..0000000 --- a/pages/usercenter/components/order-group/index.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-cell": "tdesign-miniprogram/cell/cell", - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", - "t-badge": "tdesign-miniprogram/badge/badge", - "t-icon": "tdesign-miniprogram/icon/icon" - } -} \ No newline at end of file diff --git a/pages/usercenter/components/order-group/index.wxml b/pages/usercenter/components/order-group/index.wxml deleted file mode 100644 index de56e28..0000000 --- a/pages/usercenter/components/order-group/index.wxml +++ /dev/null @@ -1,37 +0,0 @@ -<view class="order-group"> - <t-cell-group wx:if="{{isTop}}"> - <t-cell - t-class="order-group__top" - t-class-left="order-group__left" - t-class-title="order-group__top__title" - t-class-note="order-group__top__note" - title="{{title}}" - note="{{desc}}" - bordered="{{false}}" - arrow - bind:tap="onClickTop" - /> - </t-cell-group> - <view class="order-group__content"> - <view - class="order-group__item" - wx:for="{{orderTagInfos}}" - wx:for-item="item" - wx:key="index" - data-item="{{item}}" - bindtap="onClickItem" - > - <view class="order-group__item__icon icon-class"> - <t-badge count="{{item.orderNum}}" max-count="{{99}}" color="#FF4646"> - <t-icon - prefix="{{classPrefix}}" - name="{{item.iconName}}" - size="56rpx" - customStyle="background-image: -webkit-linear-gradient(90deg, #6a6a6a 0%,#929292 100%);-webkit-background-clip: text;-webkit-text-fill-color: transparent;" - /> - </t-badge> - </view> - <view class="order-group__item__title title-class">{{item.title}}</view> - </view> - </view> -</view> diff --git a/pages/usercenter/components/order-group/index.wxss b/pages/usercenter/components/order-group/index.wxss deleted file mode 100644 index 59b9aa1..0000000 --- a/pages/usercenter/components/order-group/index.wxss +++ /dev/null @@ -1,56 +0,0 @@ -.order-group { - margin-bottom: 24rpx; - background-color: #ffffff; - border-radius: 16rpx 16rpx 0 0; -} -.order-group .order-group__top { - padding: 24rpx 18rpx 24rpx 32rpx; - border-radius: 16rpx 16rpx 0 0; -} -.order-group__top___title { - font-size: 32rpx; - line-height: 48rpx; - font-weight: bold; -} -.order-group__top__note { - font-size: 28rpx; -} -.order-group__content { - overflow: hidden; - width: 100%; - height: 164rpx; - display: flex; - background-color: #fff; - border-radius: 0 0 16rpx 16rpx; -} -.order-group__item { - overflow: hidden; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - flex: 1; -} -.order-group__item:first-child { - border-radius: 0 0 0 16rpx; -} -.order-group__item:last-child { - border-radius: 0 0 16rpx 0; -} -.order-group__item__title { - font-size: 24rpx; - color: #666; - line-height: 32rpx; -} -.order-group__item__icon { - margin-bottom: 20rpx; - width: 56rpx; - height: 56rpx; - position: relative; -} -.order-group__top__title { - font-weight: bold; -} -.order-group .order-group__left { - margin-right: 0; -} diff --git a/pages/usercenter/components/t-location/index.js b/pages/usercenter/components/t-location/index.js deleted file mode 100644 index a1417ba..0000000 --- a/pages/usercenter/components/t-location/index.js +++ /dev/null @@ -1,124 +0,0 @@ -import { getPermission } from '../../../../utils/getPermission'; -import { phoneRegCheck } from '../../../../utils/util'; -import Toast from 'tdesign-miniprogram/toast/index'; -import { addressParse } from '../../../../utils/addressParse'; -import { resolveAddress, rejectAddress } from '../../address/list/util'; - -Component({ - externalClasses: ['t-class'], - properties: { - title: { - type: String, - }, - navigateUrl: { - type: String, - }, - navigateEvent: { - type: String, - }, - isCustomStyle: { - type: Boolean, - value: false, - }, - isDisabledBtn: { - type: Boolean, - value: false, - }, - isOrderSure: { - type: Boolean, - value: false, - }, - }, - methods: { - getWxLocation() { - if (this.properties.isDisabledBtn) return; - getPermission({ code: 'scope.address', name: '閫氳鍦板潃' }).then(() => { - wx.chooseAddress({ - success: async (options) => { - const { provinceName, cityName, countyName, detailInfo, userName, telNumber } = options; - - if (!phoneRegCheck(telNumber)) { - Toast({ - context: this, - selector: '#t-toast', - message: '璇峰~鍐欐纭殑鎵嬫満鍙�', - }); - return; - } - - const target = { - name: userName, - phone: telNumber, - countryName: '涓浗', - countryCode: 'chn', - detailAddress: detailInfo, - provinceName: provinceName, - cityName: cityName, - districtName: countyName, - isDefault: false, - isOrderSure: this.properties.isOrderSure, - }; - - try { - const { provinceCode, cityCode, districtCode } = await addressParse(provinceName, cityName, countyName); - - const params = Object.assign(target, { - provinceCode, - cityCode, - districtCode, - }); - if (this.properties.isOrderSure) { - this.onHandleSubmit(params); - } else if (this.properties.navigateUrl != '') { - const { navigateEvent } = this.properties; - this.triggerEvent('navigate'); - wx.navigateTo({ - url: this.properties.navigateUrl, - success: function (res) { - res.eventChannel.emit(navigateEvent, params); - }, - }); - } else { - this.triggerEvent('change', params); - } - } catch (error) { - wx.showToast({ title: '鍦板潃瑙f瀽鍑洪敊锛岃绋嶅悗鍐嶈瘯', icon: 'none' }); - } - }, - fail(err) { - console.warn('鏈�夋嫨寰俊鏀惰揣鍦板潃', err); - }, - }); - }); - }, - - async queryAddress(addressId) { - try { - const { data } = await apis.userInfo.queryAddress({ addressId }); - return data.userAddressVO; - } catch (err) { - console.error('鏌ヨ鍦板潃閿欒', err); - throw err; - } - }, - - findPage(pageRouteUrl) { - const currentRoutes = getCurrentPages().map((v) => v.route); - return currentRoutes.indexOf(pageRouteUrl); - }, - - async onHandleSubmit(params) { - try { - const orderPageDeltaNum = this.findPage('pages/order/order-confirm/index'); - if (orderPageDeltaNum > -1) { - wx.navigateBack({ delta: 1 }); - resolveAddress(params); - return; - } - } catch (err) { - rejectAddress(params); - console.error(err); - } - }, - }, -}); diff --git a/pages/usercenter/components/t-location/index.json b/pages/usercenter/components/t-location/index.json deleted file mode 100644 index 4e3dc86..0000000 --- a/pages/usercenter/components/t-location/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-cell": "tdesign-miniprogram/cell/cell", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-toast": "tdesign-miniprogram/toast/toast" - } -} \ No newline at end of file diff --git a/pages/usercenter/components/t-location/index.wxml b/pages/usercenter/components/t-location/index.wxml deleted file mode 100644 index 692c5c8..0000000 --- a/pages/usercenter/components/t-location/index.wxml +++ /dev/null @@ -1,16 +0,0 @@ -<view class="wx-address t-class" bind:tap="getWxLocation"> - <block wx:if="{{isCustomStyle}}"> - <view class="wx-address-custom"> - <t-icon prefix="wr" t-class="weixin" color="#0ABF5B" name="wechat" size="48rpx" /> - <text>{{title}}</text> - </view> - <slot /> - </block> - <block wx:else> - <t-cell title="{{title}}" title-class="cell__title" wr-class="cell" border="{{false}}"> - <t-icon t-class="weixin" slot="icon" color="#0ABF5B" name="logo-windows" size="48rpx" /> - <t-icon slot="right-icon" name="chevron-right" class="custom-icon" color="#bbb" /> - </t-cell> - </block> -</view> -<t-toast id="t-toast" /> diff --git a/pages/usercenter/components/t-location/index.wxss b/pages/usercenter/components/t-location/index.wxss deleted file mode 100644 index 4ba6cbc..0000000 --- a/pages/usercenter/components/t-location/index.wxss +++ /dev/null @@ -1,19 +0,0 @@ -.wx-address .weixin { - display: inline-block; - font-size: 48rpx !important; - margin-right: 20rpx; - font-weight: normal; -} -.wx-address .cell { - padding: 32rpx 30rpx; - border-radius: 8rpx; -} -.wx-address .cell__title { - font-size: 30rpx; - color: #333333; -} -.wx-address-custom { - display: flex; - align-items: center; - font-size: 32rpx; -} diff --git a/pages/usercenter/components/ui-address-item/index.js b/pages/usercenter/components/ui-address-item/index.js deleted file mode 100644 index 467bbf7..0000000 --- a/pages/usercenter/components/ui-address-item/index.js +++ /dev/null @@ -1,46 +0,0 @@ -Component({ - options: { - addGlobalClass: true, - multipleSlots: true, - }, - properties: { - address: { - type: Object, - value: {}, - }, - customIcon: { - type: String, - value: 'edit-1', - }, - extraSpace: { - type: Boolean, - value: true, - }, - isDrawLine: { - type: Boolean, - value: true, - }, - }, - externalClasses: [ - 'item-wrapper-class', - 'title-class', - 'default-tag-class', - 'normal-tag-class', - 'address-info-class', - 'delete-class', - ], - methods: { - onDelete(e) { - const { item } = e.currentTarget.dataset; - this.triggerEvent('onDelete', item); - }, - onSelect(e) { - const { item } = e.currentTarget.dataset; - this.triggerEvent('onSelect', item); - }, - onEdit(e) { - const { item } = e.currentTarget.dataset; - this.triggerEvent('onEdit', item); - }, - }, -}); diff --git a/pages/usercenter/components/ui-address-item/index.json b/pages/usercenter/components/ui-address-item/index.json deleted file mode 100644 index 0f9fe0f..0000000 --- a/pages/usercenter/components/ui-address-item/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon", - "t-tag": "tdesign-miniprogram/tag/tag", - "t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell" - } -} diff --git a/pages/usercenter/components/ui-address-item/index.wxml b/pages/usercenter/components/ui-address-item/index.wxml deleted file mode 100644 index 26c44fd..0000000 --- a/pages/usercenter/components/ui-address-item/index.wxml +++ /dev/null @@ -1,30 +0,0 @@ -<wxs module="phoneReg"> - var toHide = function(array) { var mphone = array.substring(0, 3) + '****' + array.substring(7); return mphone; } - module.exports.toHide = toHide; -</wxs> -<view class="address-item-wrapper item-wrapper-class"> - <t-swipe-cell class="swipe-out"> - <view class="address {{isDrawLine ? 'draw-line' : ''}}" bindtap="onSelect" data-item="{{address}}"> - <view class="address-left" wx:if="{{extraSpace}}"> - <t-icon wx:if="{{address.checked}}" name="check" color="#FA4126" class-prefix="{{classPrefix}}" size="46rpx" /> - </view> - <view class="address-content"> - <view class="title title-class"> - <text class="text-style">{{address.name}}</text> - <text>{{phoneReg.toHide(address.phoneNumber || '')}}</text> - </view> - <view class="label-adds"> - <text class="adds address-info-class"> - <text wx:if="{{address.isDefault === 1}}" class="tag tag-default default-tag-class">榛樿</text> - <text wx:if="{{address.tag}}" class="tag tag-primary normal-tag-class">{{address.tag}}</text> - <text class="address-text">{{address.address}}</text> - </text> - </view> - </view> - <view catch:tap="onEdit" data-item="{{address}}" class="address-edit"> - <t-icon name="{{customIcon}}" class-prefix="{{classPrefix}}" size="46rpx" color="#BBBBBB" /> - </view> - </view> - <view slot="right" class="swipe-right-del delete-class" bindtap="onDelete" data-item="{{address}}"> 鍒犻櫎 </view> - </t-swipe-cell> -</view> diff --git a/pages/usercenter/components/ui-address-item/index.wxss b/pages/usercenter/components/ui-address-item/index.wxss deleted file mode 100644 index 5ce1ea9..0000000 --- a/pages/usercenter/components/ui-address-item/index.wxss +++ /dev/null @@ -1,103 +0,0 @@ -.address-item-wrapper { - overflow: hidden; -} -.address-item-wrapper .swipe-out .wr-swiper-cell { - margin-top: 20rpx; -} -.address-item-wrapper .swipe-out .swipe-right-del { - display: flex; - justify-content: center; - align-items: center; - width: 144rpx; - height: 100%; - background-color: #fa4126; - color: #fff; - font-size: 28rpx; - line-height: 40rpx; -} -.address-item-wrapper .draw-line { - position: relative; -} -.address-item-wrapper .draw-line::after { - content: ''; - position: absolute; - bottom: 0; - left: 32rpx; - width: 200%; - height: 2rpx; - transform: scale(0.5); - transform-origin: 0 0; - box-sizing: border-box; - border-bottom: #e5e5e5 2rpx solid; -} -.address-item-wrapper .address { - display: flex; - justify-content: space-between; - align-items: center; - padding: 32rpx; - background-color: #fff; -} -.address-item-wrapper .address .address-edit { - padding: 20rpx 0 20rpx 46rpx; -} -.address-item-wrapper .address .address-left { - width: 80rpx; - display: flex; - justify-content: center; -} -.address-item-wrapper .address .address-content { - display: flex; - flex-direction: column; - flex: 1; -} -.address-item-wrapper .address .address-content .title { - font-size: 32rpx; - line-height: 48rpx; - margin-bottom: 16rpx; - color: #333333; - font-weight: bold; - display: flex; -} -.address-item-wrapper .address .address-content .title .text-style { - margin-right: 8rpx; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - max-width: 280rpx; -} -.address-item-wrapper .address .address-content .label-adds { - display: flex; -} -.address-item-wrapper .address .address-content .label-adds .adds { - display: -webkit-box; - overflow: hidden; - text-overflow: ellipsis; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - color: #999999; -} -.address-item-wrapper .address .address-content .label-adds .tag { - display: inline-block; - padding: 0rpx 8rpx; - min-width: 40rpx; - height: 32rpx; - border-radius: 18rpx; - font-size: 20rpx; - line-height: 32rpx; - text-align: center; - margin-right: 8rpx; - vertical-align: text-top; -} -.address-item-wrapper .address .address-content .label-adds .tag-default { - background: #ffece9; - color: #fa4126; -} -.address-item-wrapper .address .address-content .label-adds .tag-primary { - background: #f0f1ff; - color: #5a66ff; -} -.address-item-wrapper .address .address-content .label-adds .address-text { - font-size: 28rpx; - line-height: 40rpx; - color: #999999; -} diff --git a/pages/usercenter/components/ui-select-picker/index.js b/pages/usercenter/components/ui-select-picker/index.js deleted file mode 100644 index fff68cc..0000000 --- a/pages/usercenter/components/ui-select-picker/index.js +++ /dev/null @@ -1,73 +0,0 @@ -Component({ - properties: { - show: { - type: Boolean, - observer(show) { - if (!show) return; - this.updateDivisions(); - }, - }, - title: { - type: String, - value: '', - }, - value: { - type: String, - value: '', - observer() { - if (!this.data.show) return; - this.updateDivisions(); - }, - }, - pickerOptions: { - type: Array, - value: [], - observer() { - if (!this.data.show) return; - this.updateDivisions(); - }, - }, - headerVisible: { - type: Boolean, - value: true, - }, - }, - data: { - pickerValue: [], - }, - methods: { - updateDivisions() { - const { pickerOptions, value } = this.data; - const index = (pickerOptions || []).findIndex( - (item) => item.code === value, - ); - - setTimeout(() => { - this.setData({ pickerValue: index >= 0 ? [index] : [0] }); - }, 0); - }, - - getAreaByIndex(indexes) { - const { pickerOptions } = this.data; - return pickerOptions[indexes.toString()]; - }, - - onChange(e) { - const currentValue = e.detail.value; - const target = this.getAreaByIndex(currentValue); - if (target === null) return; - - this.setData({ pickerValue: currentValue }); - this.triggerEvent('change', { value: target.code, target: target }); - }, - - onConfirm() { - const target = this.getAreaByIndex(this.data.pickerValue); - this.triggerEvent('confirm', { value: target?.code, target }); - }, - - onClose() { - this.triggerEvent('close'); - }, - }, -}); diff --git a/pages/usercenter/components/ui-select-picker/index.json b/pages/usercenter/components/ui-select-picker/index.json deleted file mode 100644 index 6e4c04e..0000000 --- a/pages/usercenter/components/ui-select-picker/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-popup": "tdesign-miniprogram/popup/popup" - } -} diff --git a/pages/usercenter/components/ui-select-picker/index.wxml b/pages/usercenter/components/ui-select-picker/index.wxml deleted file mode 100644 index 6e3cddc..0000000 --- a/pages/usercenter/components/ui-select-picker/index.wxml +++ /dev/null @@ -1,21 +0,0 @@ -<t-popup visible="{{show}}" placement="bottom"> - <view class="city-picker-box" slot="content"> - <view wx:if="{{headerVisible}}" class="city-picker-header city-picker-more"> - <view class="btn" hover-class="btn__active" catch:tap="onClose">鍙栨秷</view> - <view wx:if="{{title}}" class="title">{{title}}</view> - <view class="btn primary" hover-class="btn__active" catch:tap="onConfirm">纭畾</view> - </view> - <view wx:else class="city-picker-header"> - <view wx:if="{{title}}" class="title">{{title}}</view> - </view> - <picker-view class="picker" indicator-class="picker-center-row" value="{{pickerValue}}" bind:change="onChange"> - <picker-view-column class="picker-column"> - <view wx:for="{{ pickerOptions }}" wx:key="code">{{ item.name }}</view> - </picker-view-column> - </picker-view> - <view class="city-picker-footer" wx:if="{{!headerVisible}}"> - <view class="btn" hover-class="btn__active" catch:tap="onClose">鍙栨秷</view> - <view class="btn primary" hover-class="btn__active" catch:tap="onConfirm">纭畾</view> - </view> - </view> -</t-popup> diff --git a/pages/usercenter/components/ui-select-picker/index.wxss b/pages/usercenter/components/ui-select-picker/index.wxss deleted file mode 100644 index 3e977be..0000000 --- a/pages/usercenter/components/ui-select-picker/index.wxss +++ /dev/null @@ -1,102 +0,0 @@ -.city-picker-container { - opacity: 0; - position: fixed; - top: 100vh; - left: 0; - right: 0; - height: 100vh; - z-index: 100; -} -.city-picker-container.show { - top: 0; - opacity: 1; -} -.city-picker-container.show .city-picker-box { - bottom: 0; -} -.city-picker-shadow { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, 0.65); -} -.city-picker-header { - height: 100rpx; - line-height: 100rpx; - text-align: center; - font-size: 32rpx; - color: #333333; -} -.city-picker-more { - display: flex; - justify-content: space-between; - align-items: center; -} -.city-picker-footer { - height: 100rpx; - display: flex; - justify-content: space-between; - align-items: center; -} -.city-picker-footer .btn { - width: 330rpx; - height: 80rpx; - line-height: 80rpx; - text-align: center; - color: #666666; - font-size: 32rpx; - position: relative; -} -.city-picker-footer .btn__active { - opacity: 0.5; -} -.city-picker-footer .btn::after { - display: block; - content: ' '; - position: absolute; - left: -50%; - right: -50%; - top: -50%; - bottom: -50%; - transform: scale(0.5); - border: 1rpx solid #999999; - border-radius: 16rpx; -} -.city-picker-footer .btn.primary { - color: #fa550f; -} -.city-picker-footer .btn.primary::after { - border-color: #fa550f; -} -.picker-column:not(:first-child) { - margin-left: 40rpx; -} -.city-picker-box { - position: absolute; - bottom: -100%; - transition: 0.3s bottom ease-in-out; - left: 0; - right: 0; - z-index: 100; - background-color: #fff; - padding: 0 30rpx; - color: #333333; - font-size: 34rpx; - border-radius: 20rpx 20rpx 0 0; - padding-bottom: env(safe-area-inset-bottom); -} -.show .city-picker-shadow { - display: block; -} -.picker { - height: 300rpx; - margin: 50rpx 0; - line-height: 88rpx; - text-align: center; -} -/* 浼间箮灏忕▼搴弍icker-view鐨刡ug锛宨ndicator-class浠卙eight鐢熸晥锛屽叾浠栬濡俵ine-height銆乼ext-align绛夋斁鍒扮埗class涓缃� */ -.picker-center-row { - height: 88rpx; -} diff --git a/pages/usercenter/components/user-center-card/index.js b/pages/usercenter/components/user-center-card/index.js deleted file mode 100644 index 47593c4..0000000 --- a/pages/usercenter/components/user-center-card/index.js +++ /dev/null @@ -1,35 +0,0 @@ -const AuthStepType = { - ONE: 1, - TWO: 2, - THREE: 3, -}; - -Component({ - options: { - multipleSlots: true, - }, - properties: { - currAuthStep: { - type: Number, - value: AuthStepType.ONE, - }, - userInfo: { - type: Object, - value: {}, - }, - isNeedGetUserInfo: { - type: Boolean, - value: false, - }, - }, - data: { - defaultAvatarUrl: - 'https://cdn-we-retail.ym.tencent.com/miniapp/usercenter/icon-user-center-avatar@2x.png', - AuthStepType, - }, - methods: { - gotoUserEditPage() { - this.triggerEvent('gotoUserEditPage'); - }, - }, -}); diff --git a/pages/usercenter/components/user-center-card/index.json b/pages/usercenter/components/user-center-card/index.json deleted file mode 100644 index e169f6f..0000000 --- a/pages/usercenter/components/user-center-card/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "component": true, - "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon", - "t-avatar": "tdesign-miniprogram/avatar/avatar" - } -} \ No newline at end of file diff --git a/pages/usercenter/components/user-center-card/index.wxml b/pages/usercenter/components/user-center-card/index.wxml deleted file mode 100644 index ad11e7d..0000000 --- a/pages/usercenter/components/user-center-card/index.wxml +++ /dev/null @@ -1,34 +0,0 @@ -<view class="user-center-card"> - <!-- 鏈櫥褰曠殑鎯呭喌 --> - <block wx:if="{{currAuthStep === AuthStepType.ONE}}"> - <view class="user-center-card__header" bind:tap="gotoUserEditPage"> - <t-avatar image="{{userInfo.avatarUrl || defaultAvatarUrl}}" class="user-center-card__header__avatar" /> - <view class="user-center-card__header__name">{{'璇风櫥褰�'}}</view> - </view> - </block> - <!-- 宸茬櫥褰曚絾鏈巿鏉冪敤鎴蜂俊鎭儏鍐� --> - <block wx:if="{{currAuthStep === AuthStepType.TWO}}"> - <view class="user-center-card__header"> - <t-avatar image="{{userInfo.avatarUrl || defaultAvatarUrl}}" class="user-center-card__header__avatar" /> - <view class="user-center-card__header__name">{{userInfo.nickName || '寰俊鐢ㄦ埛'}}</view> - <!-- 闇�瑕佹巿鏉冪敤鎴蜂俊鎭紝閫氳繃slot娣诲姞寮圭獥 --> - <view class="user-center-card__header__transparent" wx:if="{{isNeedGetUserInfo}}"> - <slot name="getUserInfo" /> - </view> - <!-- 涓嶉渶瑕佹巿鏉冪敤鎴蜂俊鎭紝浠嶇劧瑙﹀彂gotoUserEditPage浜嬩欢 --> - <view class="user-center-card__header__transparent" bind:tap="gotoUserEditPage" wx:else></view> - </view> - </block> - <!-- 宸茬櫥褰曚笖宸茬粡鎺堟潈鐢ㄦ埛淇℃伅鐨勬儏鍐� --> - <block wx:if="{{currAuthStep === AuthStepType.THREE}}"> - <view class="user-center-card__header" bind:tap="gotoUserEditPage"> - <t-avatar - t-class="avatar" - mode="aspectFill" - class="user-center-card__header__avatar" - image="{{userInfo.avatarUrl || defaultAvatarUrl}}" - /> - <view class="user-center-card__header__name">{{userInfo.nickName || '寰俊鐢ㄦ埛'}}</view> - </view> - </block> -</view> diff --git a/pages/usercenter/components/user-center-card/index.wxss b/pages/usercenter/components/user-center-card/index.wxss deleted file mode 100644 index 2b488c1..0000000 --- a/pages/usercenter/components/user-center-card/index.wxss +++ /dev/null @@ -1,48 +0,0 @@ -.user-center-card { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 480rpx; - background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/template/user-center-bg-v1.png'); - background-size: cover; - background-repeat: no-repeat; - padding: 0 24rpx; -} -.user-center-card__header { - margin-top: 192rpx; - margin-bottom: 48rpx; - height: 96rpx; - line-height: 48rpx; - display: flex; - justify-content: flex-start; - align-items: center; - color: #333; - position: relative; -} -.user-center-card__header__avatar { - width: 96rpx; - height: 96rpx; - border-radius: 48rpx; - overflow: hidden; -} - -.user-center-card__header__name { - font-size: 36rpx; - line-height: 48rpx; - color: #333; - font-weight: bold; - margin-left: 24rpx; - margin-right: 16rpx; -} -.user-center-card__header__transparent { - position: absolute; - left: 0; - top: 0; - background-color: transparent; - height: 100%; - width: 100%; -} -.user-center-card__icon { - line-height: 96rpx; -} diff --git a/pages/usercenter/index.js b/pages/usercenter/index.js deleted file mode 100644 index 33a7d94..0000000 --- a/pages/usercenter/index.js +++ /dev/null @@ -1,240 +0,0 @@ -import { fetchUserCenter } from '../../services/usercenter/fetchUsercenter'; -import Toast from 'tdesign-miniprogram/toast/index'; - -const menuData = [ - [ - { - title: '鏀惰揣鍦板潃', - tit: '', - url: '', - type: 'address', - }, - { - title: '浼樻儬鍒�', - tit: '', - url: '', - type: 'coupon', - }, - { - title: '绉垎', - tit: '', - url: '', - type: 'point', - }, - ], - [ - { - title: '甯姪涓績', - tit: '', - url: '', - type: 'help-center', - }, - { - title: '瀹㈡湇鐑嚎', - tit: '', - url: '', - type: 'service', - icon: 'service', - }, - ], -]; - -const orderTagInfos = [ - { - title: '寰呬粯娆�', - iconName: 'wallet', - orderNum: 0, - tabType: 5, - status: 1, - }, - { - title: '寰呭彂璐�', - iconName: 'deliver', - orderNum: 0, - tabType: 10, - status: 1, - }, - { - title: '寰呮敹璐�', - iconName: 'package', - orderNum: 0, - tabType: 40, - status: 1, - }, - { - title: '寰呰瘎浠�', - iconName: 'comment', - orderNum: 0, - tabType: 60, - status: 1, - }, - { - title: '閫�娆�/鍞悗', - iconName: 'exchang', - orderNum: 0, - tabType: 0, - status: 1, - }, -]; - -const getDefaultData = () => ({ - showMakePhone: false, - userInfo: { - avatarUrl: '', - nickName: '姝e湪鐧诲綍...', - phoneNumber: '', - }, - menuData, - orderTagInfos, - customerServiceInfo: {}, - currAuthStep: 1, - showKefu: true, - versionNo: '', -}); - -Page({ - data: getDefaultData(), - - onLoad() { - this.getVersionInfo(); - }, - - onShow() { - this.getTabBar().init(); - this.init(); - }, - onPullDownRefresh() { - this.init(); - }, - - init() { - this.fetUseriInfoHandle(); - }, - - fetUseriInfoHandle() { - fetchUserCenter().then( - ({ - userInfo, - countsData, - orderTagInfos: orderInfo, - customerServiceInfo, - }) => { - // eslint-disable-next-line no-unused-expressions - menuData?.[0].forEach((v) => { - countsData.forEach((counts) => { - if (counts.type === v.type) { - // eslint-disable-next-line no-param-reassign - v.tit = counts.num; - } - }); - }); - const info = orderTagInfos.map((v, index) => ({ - ...v, - ...orderInfo[index], - })); - this.setData({ - userInfo, - menuData, - orderTagInfos: info, - customerServiceInfo, - currAuthStep: 2, - }); - wx.stopPullDownRefresh(); - }, - ); - }, - - onClickCell({ currentTarget }) { - const { type } = currentTarget.dataset; - - switch (type) { - case 'address': { - wx.navigateTo({ url: '/pages/usercenter/address/list/index' }); - break; - } - case 'service': { - this.openMakePhone(); - break; - } - case 'help-center': { - Toast({ - context: this, - selector: '#t-toast', - message: '浣犵偣鍑讳簡甯姪涓績', - icon: '', - duration: 1000, - }); - break; - } - case 'point': { - Toast({ - context: this, - selector: '#t-toast', - message: '浣犵偣鍑讳簡绉垎鑿滃崟', - icon: '', - duration: 1000, - }); - break; - } - case 'coupon': { - wx.navigateTo({ url: '/pages/coupon/coupon-list/index' }); - break; - } - default: { - Toast({ - context: this, - selector: '#t-toast', - message: '鏈煡璺宠浆', - icon: '', - duration: 1000, - }); - break; - } - } - }, - - jumpNav(e) { - const status = e.detail.tabType; - - if (status === 0) { - wx.navigateTo({ url: '/pages/order/after-service-list/index' }); - } else { - wx.navigateTo({ url: `/pages/order/order-list/index?status=${status}` }); - } - }, - - jumpAllOrder() { - wx.navigateTo({ url: '/pages/order/order-list/index' }); - }, - - openMakePhone() { - this.setData({ showMakePhone: true }); - }, - - closeMakePhone() { - this.setData({ showMakePhone: false }); - }, - - call() { - wx.makePhoneCall({ - phoneNumber: this.data.customerServiceInfo.servicePhone, - }); - }, - - gotoUserEditPage() { - const { currAuthStep } = this.data; - if (currAuthStep === 2) { - wx.navigateTo({ url: '/pages/usercenter/person-info/index' }); - } else { - this.fetUseriInfoHandle(); - } - }, - - getVersionInfo() { - const versionInfo = wx.getAccountInfoSync(); - const { version, envVersion = __wxConfig } = versionInfo.miniProgram; - this.setData({ - versionNo: envVersion === 'release' ? version : envVersion, - }); - }, -}); diff --git a/pages/usercenter/index.json b/pages/usercenter/index.json deleted file mode 100644 index 398a70b..0000000 --- a/pages/usercenter/index.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "navigationBarTitleText": "涓汉涓績", - "navigationStyle": "custom", - "usingComponents": { - "t-popup": "tdesign-miniprogram/popup/popup", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-user-center-card": "./components/user-center-card/index", - "t-order-group": "./components/order-group/index", - "t-toast": "tdesign-miniprogram/toast/toast" - }, - "enablePullDownRefresh": true -} \ No newline at end of file diff --git a/pages/usercenter/index.wxml b/pages/usercenter/index.wxml deleted file mode 100644 index 77db47b..0000000 --- a/pages/usercenter/index.wxml +++ /dev/null @@ -1,47 +0,0 @@ -<t-user-center-card - userInfo="{{userInfo}}" - isPhoneHide="{{true}}" - name-class="custom-name-class" - phone-class="custom-phone-class" - avatar-class="customer-avatar-class" - currAuthStep="{{currAuthStep}}" - bind:gotoUserEditPage="gotoUserEditPage" -/> -<view class="content-wrapper"> - <view class="order-group-wrapper"> - <t-order-group orderTagInfos="{{orderTagInfos}}" bind:onClickTop="jumpAllOrder" bind:onClickItem="jumpNav" /> - </view> - <view wx:for="{{menuData}}" wx:key="item" class="cell-box"> - <t-cell-group> - <t-cell - wx:for="{{item}}" - wx:for-item="xitem" - wx:for-index="xindex" - wx:key="xindex" - title="{{xitem.title}}" - arrow="{{!xitem.icon}}" - note="{{xitem.tit}}" - data-type="{{xitem.type}}" - bordered="{{false}}" - bind:click="onClickCell" - t-class="t-cell-padding" - t-class-note="order-group-note" - t-class-left="order-group__left" - > - <t-icon name="{{xitem.icon}}" size="48rpx" slot="note" /> - </t-cell> - </t-cell-group> - </view> -</view> -<view class="footer__version" wx:if="{{versionNo !== ''}}">褰撳墠鐗堟湰 {{versionNo}}</view> -<t-popup visible="{{showMakePhone}}" placement="bottom" bind:visible-change="closeMakePhone" data-index="2"> - <view class="popup-content"> - <view class="popup-title border-bottom-1px" wx:if="{{customerServiceInfo.serviceTimeDuration}}"> - 鏈嶅姟鏃堕棿: {{customerServiceInfo.serviceTimeDuration}} - </view> - <view class="popup-phone {{showKefu ? 'border-bottom-1px' : ''}}" bind:tap="call">鐢佃瘽瀹㈡湇</view> - <button class="popup-phone border-bottom-1px online" open-type="contact" wx:if="{{showKefu}}">鍦ㄧ嚎瀹㈡湇</button> - <view class="popup-close" bind:tap="closeMakePhone">鍙栨秷</view> - </view> -</t-popup> -<t-toast id="t-toast" /> diff --git a/pages/usercenter/index.wxss b/pages/usercenter/index.wxss deleted file mode 100644 index 6a8e0f4..0000000 --- a/pages/usercenter/index.wxss +++ /dev/null @@ -1,156 +0,0 @@ -page { - background-color: #f5f5f5; -} - -.content-wrapper { - margin-top: 340rpx; - position: relative; - padding: 0 30rpx; -} - -.main-content { - height: 500rpx; -} - -.order-group-wrapper { - margin-bottom: 16rpx; -} - -.order-group-note { - font-size: 28rpx; -} - -.cell-box { - border-radius: 10rpx; - overflow: hidden; - margin-bottom: 20rpx; -} - -.icon-color { - color: #aaa; -} - -.cell-class { - height: 100rpx; - display: flex; - align-items: center; -} - -.order-content { - overflow: hidden; - width: 100%; - display: flex; - background-color: #fff; - border-radius: 16rpx; -} - -.order-item { - flex: 1; - height: 180rpx; - overflow: hidden; - position: relative; - text-align: center; -} - -.order-content-box { - margin: auto; - position: absolute; - width: 100%; - top: 50%; - left: 50%; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); -} - -.order-content-t { - margin-top: 10rpx; - font-size: 24rpx; - color: #333; - letter-spacing: 0; - text-align: center; -} - -.popup-content { - background: #f5f5f5; - margin-bottom: env(safe-area-inset-bottom); - border-radius: 16rpx 16rpx 0 0; -} - -.popup-content .popup-title { - background: #fff; - text-align: center; - font-size: 24rpx; - color: #999; - height: 112rpx; - text-align: center; - line-height: 112rpx; - border-radius: 16rpx 16rpx 0 0; -} - -.border-bottom-1px { - position: relative; -} - -.border-bottom-1px::after { - position: absolute; - display: block; - content: ''; - box-sizing: border-box; - top: 0; - left: 0; - width: 200%; - height: 200%; - transform: scale(0.5); - transform-origin: left top; - border-bottom: 2rpx solid #e5e5e5; -} - -.popup-content .popup-phone, -.popup-content .popup-close { - background: #fff; - height: 100rpx; - display: flex; - justify-content: center; - align-items: center; - text-align: center; - font-size: 30rpx; - font-family: PingFangSC-Regular, PingFang SC; - font-weight: 400; - color: #333; -} - -.popup-content .popup-phone.online { - margin-bottom: 20rpx; -} - -.popup-content .popup-phone.online::after { - content: none; -} - -.popup-content .popup-close { - color: #333; - border: 0; - margin-top: 16rpx; -} - -.my-order { - border-radius: 10rpx; -} - -.footer__version { - text-align: center; - margin-top: 50rpx; - color: #999; - margin-bottom: 4rpx; - font-size: 24rpx; - line-height: 32rpx; -} - -.cell-box .order-group__left { - margin-right: 0; -} - -.cell-box .t-cell-padding { - padding: 24rpx 18rpx 24rpx 32rpx; -} \ No newline at end of file diff --git a/pages/usercenter/name-edit/index.js b/pages/usercenter/name-edit/index.js deleted file mode 100644 index 57e4e3d..0000000 --- a/pages/usercenter/name-edit/index.js +++ /dev/null @@ -1,19 +0,0 @@ -Page({ - data: { - nameValue: '', - }, - onLoad(options) { - const { name } = options; - this.setData({ - nameValue: name, - }); - }, - onSubmit() { - wx.navigateBack({ backRefresh: true }); - }, - clearContent() { - this.setData({ - nameValue: '', - }); - }, -}); diff --git a/pages/usercenter/name-edit/index.json b/pages/usercenter/name-edit/index.json deleted file mode 100644 index efc7e5f..0000000 --- a/pages/usercenter/name-edit/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "navigationBarTitleText": "鏄电О", - "usingComponents": { - "t-input": "tdesign-miniprogram/input/input", - "t-icon": "tdesign-miniprogram/icon/icon", - "t-button": "tdesign-miniprogram/button/button" - } -} diff --git a/pages/usercenter/name-edit/index.wxml b/pages/usercenter/name-edit/index.wxml deleted file mode 100644 index 2ceb518..0000000 --- a/pages/usercenter/name-edit/index.wxml +++ /dev/null @@ -1,14 +0,0 @@ -<view class="name-edit"> - <t-input - borderless - model:value="{{nameValue}}" - placeholder="璇疯緭鍏ユ枃瀛�" - label="鏄电О" - clearable - bind:clear="clearContent" - /> - <view class="name-edit__input--desc"> 鏈�澶氬彲杈撳叆15涓瓧 </view> - <view class="name-edit__wrapper"> - <t-button block shape="round" disabled="{{!nameValue}}" bind:tap="onSubmit">淇濆瓨</t-button> - </view> -</view> diff --git a/pages/usercenter/name-edit/index.wxss b/pages/usercenter/name-edit/index.wxss deleted file mode 100644 index 61674b3..0000000 --- a/pages/usercenter/name-edit/index.wxss +++ /dev/null @@ -1,18 +0,0 @@ -page { - background-color: #f5f5f5; -} -page view { - box-sizing: border-box; -} -.name-edit { - padding-top: 20rpx; -} -.name-edit .name-edit__input--desc { - font-size: 26rpx; - padding: 16rpx 32rpx; - color: #999; - margin-bottom: 200rpx; -} -.name-edit .name-edit__wrapper { - margin: 0 32rpx; -} diff --git a/pages/usercenter/person-info/index.js b/pages/usercenter/person-info/index.js deleted file mode 100644 index fb5db98..0000000 --- a/pages/usercenter/person-info/index.js +++ /dev/null @@ -1,122 +0,0 @@ -import { fetchPerson } from '../../../services/usercenter/fetchPerson'; -import { phoneEncryption } from '../../../utils/util'; -import Toast from 'tdesign-miniprogram/toast/index'; - -Page({ - data: { - personInfo: { - avatarUrl: '', - nickName: '', - gender: 0, - phoneNumber: '', - }, - showUnbindConfirm: false, - pickerOptions: [ - { - name: '鐢�', - code: '1', - }, - { - name: '濂�', - code: '2', - }, - ], - typeVisible: false, - genderMap: ['', '鐢�', '濂�'], - }, - onLoad() { - this.init(); - }, - init() { - this.fetchData(); - }, - fetchData() { - fetchPerson().then((personInfo) => { - this.setData({ - personInfo, - 'personInfo.phoneNumber': phoneEncryption(personInfo.phoneNumber), - }); - }); - }, - onClickCell({ currentTarget }) { - const { dataset } = currentTarget; - const { nickName } = this.data.personInfo; - - switch (dataset.type) { - case 'gender': - this.setData({ - typeVisible: true, - }); - break; - case 'name': - wx.navigateTo({ - url: `/pages/usercenter/name-edit/index?name=${nickName}`, - }); - break; - case 'avatarUrl': - this.toModifyAvatar(); - break; - default: { - break; - } - } - }, - onClose() { - this.setData({ - typeVisible: false, - }); - }, - onConfirm(e) { - const { value } = e.detail; - this.setData( - { - typeVisible: false, - 'personInfo.gender': value, - }, - () => { - Toast({ - context: this, - selector: '#t-toast', - message: '璁剧疆鎴愬姛', - theme: 'success', - }); - }, - ); - }, - async toModifyAvatar() { - try { - const tempFilePath = await new Promise((resolve, reject) => { - wx.chooseImage({ - count: 1, - sizeType: ['compressed'], - sourceType: ['album', 'camera'], - success: (res) => { - const { path, size } = res.tempFiles[0]; - if (size <= 10485760) { - resolve(path); - } else { - reject({ errMsg: '鍥剧墖澶у皬瓒呭嚭闄愬埗锛岃閲嶆柊涓婁紶' }); - } - }, - fail: (err) => reject(err), - }); - }); - const tempUrlArr = tempFilePath.split('/'); - const tempFileName = tempUrlArr[tempUrlArr.length - 1]; - Toast({ - context: this, - selector: '#t-toast', - message: `宸查�夋嫨鍥剧墖-${tempFileName}`, - theme: 'success', - }); - } catch (error) { - if (error.errMsg === 'chooseImage:fail cancel') return; - Toast({ - context: this, - selector: '#t-toast', - message: error.errMsg || error.msg || '淇敼澶村儚鍑洪敊浜�', - theme: 'error', - }); - } - }, -}); diff --git a/pages/usercenter/person-info/index.json b/pages/usercenter/person-info/index.json deleted file mode 100644 index e63dcc5..0000000 --- a/pages/usercenter/person-info/index.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "navigationBarTitleText": "涓汉璧勬枡", - "usingComponents": { - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-button": "tdesign-miniprogram/button/button", - "t-image": "/components/webp-image/index", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-select-picker": "../components/ui-select-picker/index" - } -} \ No newline at end of file diff --git a/pages/usercenter/person-info/index.wxml b/pages/usercenter/person-info/index.wxml deleted file mode 100644 index 15f7aa3..0000000 --- a/pages/usercenter/person-info/index.wxml +++ /dev/null @@ -1,54 +0,0 @@ -<view class="person-info"> - <t-cell-group> - <t-cell - title="澶村儚" - center="{{true}}" - data-type="avatarUrl" - bind:click="onClickCell" - arrow - t-class-left="order-group__left" - > - <t-image slot="note" src="{{personInfo.avatarUrl}}" t-class="avatarUrl" mode="aspectFill" /> - </t-cell> - <t-cell - title="鏄电О" - arrow - note="{{personInfo.nickName}}" - data-type="name" - bind:click="onClickCell" - t-class="t-cell-class" - t-class-left="order-group__left" - /> - <t-cell - title="鎬у埆" - arrow - note="{{genderMap[personInfo.gender]}}" - data-type="gender" - bind:click="onClickCell" - t-class="t-cell-class" - t-class-left="order-group__left" - /> - <t-cell - bordered="{{false}}" - title="鎵嬫満鍙�" - arrow - note="{{personInfo.phoneNumber ? personInfo.phoneNumber : '鍘荤粦瀹氭墜鏈哄彿'}}" - data-type="phoneNumber" - bind:click="onClickCell" - t-class="t-cell-class" - t-class-left="order-group__left" - /> - </t-cell-group> -</view> -<view class="person-info__wrapper"> - <view class="person-info__btn" bind:tap="openUnbindConfirm"> 鍒囨崲璐﹀彿鐧诲綍 </view> -</view> -<t-select-picker - show="{{typeVisible}}" - picker-options="{{pickerOptions}}" - title="閫夋嫨鎬у埆" - value="{{personInfo.gender}}" - bind:confirm="onConfirm" - bind:close="onClose" -/> -<t-toast id="t-toast" /> diff --git a/pages/usercenter/person-info/index.wxss b/pages/usercenter/person-info/index.wxss deleted file mode 100644 index cb4eb70..0000000 --- a/pages/usercenter/person-info/index.wxss +++ /dev/null @@ -1,45 +0,0 @@ -:host { - background-color: #f5f5f5; -} -page view { - box-sizing: border-box; -} -.person-info { - padding-top: 20rpx; -} - -.person-info__btn { - width: 100%; - border: 2rpx solid #ddd; - border-radius: 48rpx; - padding: 18rpx 0; - display: flex; - align-self: center; - justify-content: center; -} -.person-info__wrapper { - width: 100%; - padding: 0 32rpx; - padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx); - position: absolute; - bottom: 0; - left: 0; -} - -.avatarUrl { - width: 80rpx; - height: 80rpx; - border-radius: 50% !important; - overflow: hidden; -} - -.t-class-confirm { - color: #fa550f !important; -} - -.person-info .order-group__left { - margin-right: 0; -} -.person-info .t-cell-class { - height: 112rpx; -} diff --git a/services/activity/fetchActivity.js b/services/activity/fetchActivity.js deleted file mode 100644 index e9aefa6..0000000 --- a/services/activity/fetchActivity.js +++ /dev/null @@ -1,20 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇娲诲姩鍒楄〃 */ -function mockFetchActivity(ID = 0) { - const { delay } = require('../_utils/delay'); - const { getActivity } = require('../../model/activity'); - - return delay().then(() => getActivity(ID)); -} - -/** 鑾峰彇娲诲姩鍒楄〃 */ -export function fetchActivity(ID = 0) { - if (config.useMock) { - return mockFetchActivity(ID); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/activity/fetchActivityList.js b/services/activity/fetchActivityList.js deleted file mode 100644 index 2522aff..0000000 --- a/services/activity/fetchActivityList.js +++ /dev/null @@ -1,20 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇娲诲姩鍒楄〃 */ -function mockFetchActivityList(pageIndex = 1, pageSize = 20) { - const { delay } = require('../_utils/delay'); - const { getActivityList } = require('../../model/activities'); - - return delay().then(() => getActivityList(pageIndex, pageSize)); -} - -/** 鑾峰彇娲诲姩鍒楄〃 */ -export function fetchActivityList(pageIndex = 1, pageSize = 20) { - if (config.useMock) { - return mockFetchActivityList(pageIndex, pageSize); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/address/fetchAddress.js b/services/address/fetchAddress.js deleted file mode 100644 index 9525ab0..0000000 --- a/services/address/fetchAddress.js +++ /dev/null @@ -1,48 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇鏀惰揣鍦板潃 */ -function mockFetchDeliveryAddress(id) { - const { delay } = require('../_utils/delay'); - const { genAddress } = require('../../model/address'); - - return delay().then(() => genAddress(id)); -} - -/** 鑾峰彇鏀惰揣鍦板潃 */ -export function fetchDeliveryAddress(id = 0) { - if (config.useMock) { - return mockFetchDeliveryAddress(id); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} - -/** 鑾峰彇鏀惰揣鍦板潃鍒楄〃 */ -function mockFetchDeliveryAddressList(len = 0) { - const { delay } = require('../_utils/delay'); - const { genAddressList } = require('../../model/address'); - - return delay().then(() => - genAddressList(len).map((address) => { - return { - ...address, - phoneNumber: address.phone, - address: `${address.provinceName}${address.cityName}${address.districtName}${address.detailAddress}`, - tag: address.addressTag, - }; - }), - ); -} - -/** 鑾峰彇鏀惰揣鍦板潃鍒楄〃 */ -export function fetchDeliveryAddressList(len = 10) { - if (config.useMock) { - return mockFetchDeliveryAddressList(len); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/comments/fetchComments.js b/services/comments/fetchComments.js deleted file mode 100644 index 9bd1155..0000000 --- a/services/comments/fetchComments.js +++ /dev/null @@ -1,18 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇鍟嗗搧璇勮 */ -function mockFetchComments(parmas) { - const { delay } = require('../_utils/delay'); - const { getGoodsAllComments } = require('../../model/comments'); - return delay().then(() => getGoodsAllComments(parmas)); -} - -/** 鑾峰彇鍟嗗搧璇勮 */ -export function fetchComments(parmas) { - if (config.useMock) { - return mockFetchComments(parmas); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/comments/fetchCommentsCount.js b/services/comments/fetchCommentsCount.js deleted file mode 100644 index cbb09d0..0000000 --- a/services/comments/fetchCommentsCount.js +++ /dev/null @@ -1,18 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇鍟嗗搧璇勮鏁� */ -function mockFetchCommentsCount(ID = 0) { - const { delay } = require('../_utils/delay'); - const { getGoodsCommentsCount } = require('../../model/comments'); - return delay().then(() => getGoodsCommentsCount(ID)); -} - -/** 鑾峰彇鍟嗗搧璇勮鏁� */ -export function fetchCommentsCount(ID = 0) { - if (config.useMock) { - return mockFetchCommentsCount(ID); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/coupon/index.js b/services/coupon/index.js deleted file mode 100644 index a0010e0..0000000 --- a/services/coupon/index.js +++ /dev/null @@ -1,65 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇浼樻儬鍒稿垪琛� */ -function mockFetchCoupon(status) { - const { delay } = require('../_utils/delay'); - const { getCouponList } = require('../../model/coupon'); - return delay().then(() => getCouponList(status)); -} - -/** 鑾峰彇浼樻儬鍒稿垪琛� */ -export function fetchCouponList(status = 'default') { - if (config.useMock) { - return mockFetchCoupon(status); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} - -/** 鑾峰彇浼樻儬鍒� 璇︽儏 */ -function mockFetchCouponDetail(id, status) { - const { delay } = require('../_utils/delay'); - const { getCoupon } = require('../../model/coupon'); - const { genAddressList } = require('../../model/address'); - - return delay().then(() => { - const result = { - detail: getCoupon(id, status), - storeInfoList: genAddressList(), - }; - - result.detail.useNotes = `1涓鍗曢檺鐢�1寮狅紝闄よ繍璐瑰埜澶栵紝涓嶈兘涓庡叾瀹冪被鍨嬬殑浼樻儬鍒稿彔鍔犱娇鐢紙杩愯垂鍒搁櫎澶栵級\n2.浠呴�傜敤浜庡悇鍖哄煙姝e父鍞崠鍟嗗搧锛屼笉鏀寔鍥㈣喘銆佹姠璐�侀鍞被鍟嗗搧`; - result.detail.storeAdapt = `鍟嗗煄閫氱敤`; - - if (result.detail.type === 'price') { - result.detail.desc = `鍑忓厤 ${result.detail.value / 100} 鍏僠; - - if (result.detail.base) { - result.detail.desc += `锛屾弧${result.detail.base / 100}鍏冨彲鐢╜; - } - - result.detail.desc += '銆�'; - } else if (result.detail.type === 'discount') { - result.detail.desc = `${result.detail.value}鎶榒; - - if (result.detail.base) { - result.detail.desc += `锛屾弧${result.detail.base / 100}鍏冨彲鐢╜; - } - - result.detail.desc += '銆�'; - } - - return result; - }); -} - -/** 鑾峰彇浼樻儬鍒� 璇︽儏 */ -export function fetchCouponDetail(id, status = 'default') { - if (config.useMock) { - return mockFetchCouponDetail(id, status); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/good/comments/fetchCommentDetail.js b/services/good/comments/fetchCommentDetail.js deleted file mode 100644 index fce338d..0000000 --- a/services/good/comments/fetchCommentDetail.js +++ /dev/null @@ -1,20 +0,0 @@ -import { config } from '../../../config/index'; -import { queryCommentDetail } from '../../../model/comments/queryDetail'; -/** 鑾峰彇鍟嗗搧璇勪环鏁版嵁 */ -function mockQueryCommentDetail(params) { - const { delay } = require('../../_utils/delay'); - const data = queryCommentDetail(params); - return delay().then(() => { - return data; - }); -} - -/** 鑾峰彇璇勪环璇︽儏 */ -export function getCommentDetail(params) { - if (config.useMock) { - return mockQueryCommentDetail(params); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/good/fetchCategoryList.js b/services/good/fetchCategoryList.js deleted file mode 100644 index adf6ba4..0000000 --- a/services/good/fetchCategoryList.js +++ /dev/null @@ -1,18 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇鍟嗗搧鍒楄〃 */ -function mockFetchGoodCategory() { - const { delay } = require('../_utils/delay'); - const { getCategoryList } = require('../../model/category'); - return delay().then(() => getCategoryList()); -} - -/** 鑾峰彇鍟嗗搧鍒楄〃 */ -export function getCategoryList() { - if (config.useMock) { - return mockFetchGoodCategory(); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/good/fetchGood.js b/services/good/fetchGood.js deleted file mode 100644 index 7a196d4..0000000 --- a/services/good/fetchGood.js +++ /dev/null @@ -1,18 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇鍟嗗搧鍒楄〃 */ -function mockFetchGood(ID = 0) { - const { delay } = require('../_utils/delay'); - const { genGood } = require('../../model/good'); - return delay().then(() => genGood(ID)); -} - -/** 鑾峰彇鍟嗗搧鍒楄〃 */ -export function fetchGood(ID = 0) { - if (config.useMock) { - return mockFetchGood(ID); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/good/fetchGoods.js b/services/good/fetchGoods.js deleted file mode 100644 index 16618c8..0000000 --- a/services/good/fetchGoods.js +++ /dev/null @@ -1,29 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇鍟嗗搧鍒楄〃 */ -function mockFetchGoodsList(pageIndex = 1, pageSize = 20) { - const { delay } = require('../_utils/delay'); - const { getGoodsList } = require('../../model/goods'); - return delay().then(() => - getGoodsList(pageIndex, pageSize).map((item) => { - return { - spuId: item.spuId, - thumb: item.primaryImage, - title: item.title, - price: item.minSalePrice, - originPrice: item.maxLinePrice, - tags: item.spuTagList.map((tag) => tag.title), - }; - }), - ); -} - -/** 鑾峰彇鍟嗗搧鍒楄〃 */ -export function fetchGoodsList(pageIndex = 1, pageSize = 20) { - if (config.useMock) { - return mockFetchGoodsList(pageIndex, pageSize); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/good/fetchGoodsDetailsComments.js b/services/good/fetchGoodsDetailsComments.js deleted file mode 100644 index 95a11c4..0000000 --- a/services/good/fetchGoodsDetailsComments.js +++ /dev/null @@ -1,37 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇鍟嗗搧璇︽儏椤佃瘎璁烘暟 */ -function mockFetchGoodDetailsCommentsCount(spuId = 0) { - const { delay } = require('../_utils/delay'); - const { - getGoodsDetailsCommentsCount, - } = require('../../model/detailsComments'); - return delay().then(() => getGoodsDetailsCommentsCount(spuId)); -} - -/** 鑾峰彇鍟嗗搧璇︽儏椤佃瘎璁烘暟 */ -export function getGoodsDetailsCommentsCount(spuId = 0) { - if (config.useMock) { - return mockFetchGoodDetailsCommentsCount(spuId); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} - -/** 鑾峰彇鍟嗗搧璇︽儏椤佃瘎璁� */ -function mockFetchGoodDetailsCommentList(spuId = 0) { - const { delay } = require('../_utils/delay'); - const { getGoodsDetailsComments } = require('../../model/detailsComments'); - return delay().then(() => getGoodsDetailsComments(spuId)); -} - -/** 鑾峰彇鍟嗗搧璇︽儏椤佃瘎璁� */ -export function getGoodsDetailsCommentList(spuId = 0) { - if (config.useMock) { - return mockFetchGoodDetailsCommentList(spuId); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/good/fetchGoodsList.js b/services/good/fetchGoodsList.js deleted file mode 100644 index 1650b9b..0000000 --- a/services/good/fetchGoodsList.js +++ /dev/null @@ -1,39 +0,0 @@ -/* eslint-disable no-param-reassign */ -import { config } from '../../config/index'; - -/** 鑾峰彇鍟嗗搧鍒楄〃 */ -function mockFetchGoodsList(params) { - const { delay } = require('../_utils/delay'); - const { getSearchResult } = require('../../model/search'); - - const data = getSearchResult(params); - - if (data.spuList.length) { - data.spuList.forEach((item) => { - item.spuId = item.spuId; - item.thumb = item.primaryImage; - item.title = item.title; - item.price = item.minSalePrice; - item.originPrice = item.maxLinePrice; - item.desc = ''; - if (item.spuTagList) { - item.tags = item.spuTagList.map((tag) => tag.title); - } else { - item.tags = []; - } - }); - } - return delay().then(() => { - return data; - }); -} - -/** 鑾峰彇鍟嗗搧鍒楄〃 */ -export function fetchGoodsList(params) { - if (config.useMock) { - return mockFetchGoodsList(params); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/good/fetchSearchHistory.js b/services/good/fetchSearchHistory.js deleted file mode 100644 index 3a73963..0000000 --- a/services/good/fetchSearchHistory.js +++ /dev/null @@ -1,35 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇鎼滅储鍘嗗彶 */ -function mockSearchHistory() { - const { delay } = require('../_utils/delay'); - const { getSearchHistory } = require('../../model/search'); - return delay().then(() => getSearchHistory()); -} - -/** 鑾峰彇鎼滅储鍘嗗彶 */ -export function getSearchHistory() { - if (config.useMock) { - return mockSearchHistory(); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} - -/** 鑾峰彇鎼滅储鍘嗗彶 */ -function mockSearchPopular() { - const { delay } = require('../_utils/delay'); - const { getSearchPopular } = require('../../model/search'); - return delay().then(() => getSearchPopular()); -} - -/** 鑾峰彇鎼滅储鍘嗗彶 */ -export function getSearchPopular() { - if (config.useMock) { - return mockSearchPopular(); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/good/fetchSearchResult.js b/services/good/fetchSearchResult.js deleted file mode 100644 index 5b42851..0000000 --- a/services/good/fetchSearchResult.js +++ /dev/null @@ -1,38 +0,0 @@ -/* eslint-disable no-param-reassign */ -import { config } from '../../config/index'; - -/** 鑾峰彇鎼滅储鍘嗗彶 */ -function mockSearchResult(params) { - const { delay } = require('../_utils/delay'); - const { getSearchResult } = require('../../model/search'); - - const data = getSearchResult(params); - - if (data.spuList.length) { - data.spuList.forEach((item) => { - item.spuId = item.spuId; - item.thumb = item.primaryImage; - item.title = item.title; - item.price = item.minSalePrice; - item.originPrice = item.maxLinePrice; - if (item.spuTagList) { - item.tags = item.spuTagList.map((tag) => ({ title: tag.title })); - } else { - item.tags = []; - } - }); - } - return delay().then(() => { - return data; - }); -} - -/** 鑾峰彇鎼滅储鍘嗗彶 */ -export function getSearchResult(params) { - if (config.useMock) { - return mockSearchResult(params); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/home/home.js b/services/home/home.js index 186668c..d1d92a2 100644 --- a/services/home/home.js +++ b/services/home/home.js @@ -1,4 +1,4 @@ -import { config } from '../../config/index'; + /** 鑾峰彇棣栭〉鏁版嵁 */ function mockFetchHome() { const { delay } = require('../_utils/delay'); @@ -51,13 +51,13 @@ text: '鏁欏笀璁よ瘉', key: 7, icon: '/static/images/home/jiaoshirenzheng@2x.png', - url: '/pages/teacherCertification/index', + url: '/packageDomain/pages/teacherCertification/index', }, { text: '鏍蜂功鐢宠', key: 8, icon: '/static/images/home/yangshushenqing@2x.png', - url: '/pages/sampleBookList/index', + url: '/packageDomain/pages/sampleBookList/index', }, { text: '鎴戣鍑轰功', @@ -72,10 +72,5 @@ /** 鑾峰彇棣栭〉鏁版嵁 */ export function fetchHome() { - if (config.useMock) { - return mockFetchHome(); - } - return new Promise((resolve) => { - resolve('real api'); - }); + return mockFetchHome(); } diff --git a/services/order/applyService.js b/services/order/applyService.js deleted file mode 100644 index c66930a..0000000 --- a/services/order/applyService.js +++ /dev/null @@ -1,70 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇鍞悗鍗昺ock鏁版嵁 */ -function mockFetchRightsPreview(params) { - const { delay } = require('../_utils/delay'); - const { genRightsPreview } = require('../../model/order/applyService'); - - return delay().then(() => genRightsPreview(params)); -} - -/** 鑾峰彇鍞悗鍗曟暟鎹� */ -export function fetchRightsPreview(params) { - if (config.useMock) { - return mockFetchRightsPreview(params); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} - -/** 纭鏀惰揣 */ -export function dispatchConfirmReceived() { - if (config.useMock) { - const { delay } = require('../_utils/delay'); - return delay(); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} - -/** 鑾峰彇鍙�夌殑mock鍞悗鍘熷洜鍒楄〃 */ -function mockFetchApplyReasonList(params) { - const { delay } = require('../_utils/delay'); - const { genApplyReasonList } = require('../../model/order/applyService'); - - return delay().then(() => genApplyReasonList(params)); -} - -/** 鑾峰彇鍙�夌殑鍞悗鍘熷洜鍒楄〃 */ -export function fetchApplyReasonList(params) { - if (config.useMock) { - return mockFetchApplyReasonList(params); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} - -/** 鍙戣捣mock鍞悗鐢宠 */ -function mockDispatchApplyService(params) { - const { delay } = require('../_utils/delay'); - const { applyService } = require('../../model/order/applyService'); - - return delay().then(() => applyService(params)); -} - -/** 鍙戣捣鍞悗鐢宠 */ -export function dispatchApplyService(params) { - if (config.useMock) { - return mockDispatchApplyService(params); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/order/orderConfirm.js b/services/order/orderConfirm.js deleted file mode 100644 index 4d34744..0000000 --- a/services/order/orderConfirm.js +++ /dev/null @@ -1,69 +0,0 @@ -import { config } from '../../config/index'; -import { mockIp, mockReqId } from '../../utils/mock'; - -/** 鑾峰彇缁撶畻mock鏁版嵁 */ -function mockFetchSettleDetail(params) { - const { delay } = require('../_utils/delay'); - const { genSettleDetail } = require('../../model/order/orderConfirm'); - - return delay().then(() => genSettleDetail(params)); -} - -/** 鎻愪氦mock璁㈠崟 */ -function mockDispatchCommitPay() { - const { delay } = require('../_utils/delay'); - - return delay().then(() => ({ - data: { - isSuccess: true, - tradeNo: '350930961469409099', - payInfo: '{}', - code: null, - transactionId: 'E-200915180100299000', - msg: null, - interactId: '15145', - channel: 'wechat', - limitGoodsList: null, - }, - code: 'Success', - msg: null, - requestId: mockReqId(), - clientIp: mockIp(), - rt: 891, - success: true, - })); -} - -/** 鑾峰彇缁撶畻鏁版嵁 */ -export function fetchSettleDetail(params) { - if (config.useMock) { - return mockFetchSettleDetail(params); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} - -/* 鎻愪氦璁㈠崟 */ -export function dispatchCommitPay(params) { - if (config.useMock) { - return mockDispatchCommitPay(params); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} - -/** 寮�鍙戠エ */ -export function dispatchSupplementInvoice() { - if (config.useMock) { - const { delay } = require('../_utils/delay'); - return delay(); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/order/orderDetail.js b/services/order/orderDetail.js deleted file mode 100644 index 3e7d797..0000000 --- a/services/order/orderDetail.js +++ /dev/null @@ -1,39 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇璁㈠崟璇︽儏mock鏁版嵁 */ -function mockFetchOrderDetail(params) { - const { delay } = require('../_utils/delay'); - const { genOrderDetail } = require('../../model/order/orderDetail'); - - return delay().then(() => genOrderDetail(params)); -} - -/** 鑾峰彇璁㈠崟璇︽儏鏁版嵁 */ -export function fetchOrderDetail(params) { - if (config.useMock) { - return mockFetchOrderDetail(params); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} - -/** 鑾峰彇瀹㈡湇mock鏁版嵁 */ -function mockFetchBusinessTime(params) { - const { delay } = require('../_utils/delay'); - const { genBusinessTime } = require('../../model/order/orderDetail'); - - return delay().then(() => genBusinessTime(params)); -} - -/** 鑾峰彇瀹㈡湇鏁版嵁 */ -export function fetchBusinessTime(params) { - if (config.useMock) { - return mockFetchBusinessTime(params); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/order/orderList.js b/services/order/orderList.js deleted file mode 100644 index f4a9e7a..0000000 --- a/services/order/orderList.js +++ /dev/null @@ -1,39 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇璁㈠崟鍒楄〃mock鏁版嵁 */ -function mockFetchOrders(params) { - const { delay } = require('../_utils/delay'); - const { genOrders } = require('../../model/order/orderList'); - - return delay(200).then(() => genOrders(params)); -} - -/** 鑾峰彇璁㈠崟鍒楄〃鏁版嵁 */ -export function fetchOrders(params) { - if (config.useMock) { - return mockFetchOrders(params); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} - -/** 鑾峰彇璁㈠崟鍒楄〃mock鏁版嵁 */ -function mockFetchOrdersCount(params) { - const { delay } = require('../_utils/delay'); - const { genOrdersCount } = require('../../model/order/orderList'); - - return delay().then(() => genOrdersCount(params)); -} - -/** 鑾峰彇璁㈠崟鍒楄〃缁熻 */ -export function fetchOrdersCount(params) { - if (config.useMock) { - return mockFetchOrdersCount(params); - } - - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/order/orderSubmitComment.js b/services/order/orderSubmitComment.js deleted file mode 100644 index 5e3ea36..0000000 --- a/services/order/orderSubmitComment.js +++ /dev/null @@ -1,22 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇璇勪环鍟嗗搧 */ -function mockGetGoods(parameter) { - const { delay } = require('../_utils/delay'); - const { getGoods } = require('../../model/submitComment'); - const data = getGoods(parameter); - - return delay().then(() => { - return data; - }); -} - -/** 鑾峰彇璇勪环鍟嗗搧 */ -export function getGoods(parameter) { - if (config.useMock) { - return mockGetGoods(parameter); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/promotion/detail.js b/services/promotion/detail.js deleted file mode 100644 index 841f723..0000000 --- a/services/promotion/detail.js +++ /dev/null @@ -1,18 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇鍟嗗搧鍒楄〃 */ -function mockFetchPromotion(ID = 0) { - const { delay } = require('../_utils/delay'); - const { getPromotion } = require('../../model/promotion'); - return delay().then(() => getPromotion(ID)); -} - -/** 鑾峰彇鍟嗗搧鍒楄〃 */ -export function fetchPromotion(ID = 0) { - if (config.useMock) { - return mockFetchPromotion(ID); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/usercenter/fetchPerson.js b/services/usercenter/fetchPerson.js deleted file mode 100644 index bd31178..0000000 --- a/services/usercenter/fetchPerson.js +++ /dev/null @@ -1,28 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇涓汉涓績淇℃伅 */ -function mockFetchPerson() { - const { delay } = require('../_utils/delay'); - const { genSimpleUserInfo } = require('../../model/usercenter'); - const { genAddress } = require('../../model/address'); - const address = genAddress(); - return delay().then(() => ({ - ...genSimpleUserInfo(), - address: { - provinceName: address.provinceName, - provinceCode: address.provinceCode, - cityName: address.cityName, - cityCode: address.cityCode, - }, - })); -} - -/** 鑾峰彇涓汉涓績淇℃伅 */ -export function fetchPerson() { - if (config.useMock) { - return mockFetchPerson(); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/services/usercenter/fetchUsercenter.js b/services/usercenter/fetchUsercenter.js deleted file mode 100644 index b187644..0000000 --- a/services/usercenter/fetchUsercenter.js +++ /dev/null @@ -1,18 +0,0 @@ -import { config } from '../../config/index'; - -/** 鑾峰彇涓汉涓績淇℃伅 */ -function mockFetchUserCenter() { - const { delay } = require('../_utils/delay'); - const { genUsercenter } = require('../../model/usercenter'); - return delay(200).then(() => genUsercenter()); -} - -/** 鑾峰彇涓汉涓績淇℃伅 */ -export function fetchUserCenter() { - if (config.useMock) { - return mockFetchUserCenter(); - } - return new Promise((resolve) => { - resolve('real api'); - }); -} diff --git a/static/images/home/home-bg.png b/static/images/home/home-bg.png new file mode 100644 index 0000000..114a5bf --- /dev/null +++ b/static/images/home/home-bg.png Binary files differ diff --git a/static/images/home/home-bg@2x.png b/static/images/home/home-bg@2x.png deleted file mode 100644 index 67d356b..0000000 --- a/static/images/home/home-bg@2x.png +++ /dev/null Binary files differ diff --git a/static/images/home/zuoxia-p@2x.png b/static/images/home/zuoxia-p@2x.png deleted file mode 100644 index 33fe156..0000000 --- a/static/images/home/zuoxia-p@2x.png +++ /dev/null Binary files differ diff --git a/static/images/resourceDetailsMyAudio/video-bg.png b/static/images/resourceDetailsMyAudio/video-bg.png index ef7692f..aea1cc5 100644 --- a/static/images/resourceDetailsMyAudio/video-bg.png +++ b/static/images/resourceDetailsMyAudio/video-bg.png Binary files differ -- Gitblit v1.9.1