From 7a73b38bd533c1b999db9dcdc4b6f1116c12248f Mon Sep 17 00:00:00 2001 From: gxwebsoft Date: Fri, 4 Aug 2023 13:04:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 + .env.development | 2 + .env.production | 2 + .gitignore | 2 + .hbuilderx/launch.json | 20 + App.vue | 241 + README.md | 0 androidPrivacy.json | 14 + api/address.js | 47 + api/article/category.js | 11 + api/article/index.js | 17 + api/balance.js | 11 + api/balance/log.js | 11 + api/bargain/active.js | 23 + api/bargain/checkout.js | 17 + api/bargain/task.js | 35 + api/captcha.js | 17 + api/cart.js | 35 + api/cashier/index.js | 35 + api/category/index.js | 11 + api/checkout.js | 19 + api/comment.js | 23 + api/coupon.js | 16 + api/dealer/apply.js | 17 + api/dealer/index.js | 17 + api/dealer/order.js | 11 + api/dealer/poster.js | 11 + api/dealer/setting.js | 11 + api/dealer/team.js | 11 + api/dealer/withdraw.js | 17 + api/express.js | 11 + api/goods/index.js | 49 + api/goods/service.js | 11 + api/groupon/checkout.js | 17 + api/groupon/goods.js | 23 + api/groupon/setting.js | 11 + api/groupon/task.js | 23 + api/help.js | 11 + api/live/room.js | 11 + api/login/index.js | 36 + api/myCoupon.js | 22 + api/order.js | 48 + api/order/comment.js | 17 + api/page.js | 13 + api/points/log.js | 11 + api/recharge.js | 27 + api/recharge/order.js | 11 + api/recharge/plan.js | 11 + api/refund.js | 35 + api/region.js | 17 + api/setting.js | 11 + api/sharp/checkout.js | 17 + api/sharp/goods.js | 23 + api/sharp/home.js | 11 + api/shop.js | 17 + api/shop/order.js | 17 + api/upload.js | 18 + api/user.js | 34 + api/user/coupon.js | 11 + api/wxofficial.js | 17 + app.scss | 43 + common/constant/index.js | 3 + common/constant/paginate.js | 7 + common/enum/Client.js | 12 + common/enum/coupon/ApplyRange.js | 10 + common/enum/coupon/CouponType.js | 10 + common/enum/coupon/ExpireType.js | 10 + common/enum/coupon/index.js | 5 + common/enum/dealer/apply/ApplyStatus.js | 11 + common/enum/dealer/apply/ApplyType.js | 10 + common/enum/dealer/apply/index.js | 4 + common/enum/dealer/withdraw/ApplyStatus.js | 12 + common/enum/dealer/withdraw/PayType.js | 11 + common/enum/dealer/withdraw/index.js | 4 + common/enum/enum.js | 85 + common/enum/goods/GoodsType.js | 10 + common/enum/goods/SpecType.js | 10 + common/enum/goods/index.js | 4 + common/enum/groupon/ActiveStatus.js | 11 + common/enum/groupon/ActiveType.js | 11 + common/enum/groupon/GoodsStatus.js | 10 + common/enum/groupon/TaskStatus.js | 11 + common/enum/groupon/index.js | 6 + common/enum/live/LiveStatus.js | 15 + common/enum/live/index.js | 3 + common/enum/order/DeliveryStatus.js | 10 + common/enum/order/DeliveryType.js | 11 + common/enum/order/OrderSource.js | 11 + common/enum/order/OrderStatus.js | 12 + common/enum/order/OrderType.js | 10 + common/enum/order/PayStatus.js | 10 + common/enum/order/PayType.js | 10 + common/enum/order/ReceiptStatus.js | 10 + common/enum/order/delivery/DeliveryMethod.js | 11 + common/enum/order/delivery/index.js | 3 + common/enum/order/index.js | 17 + common/enum/order/refund/AuditStatus.js | 11 + common/enum/order/refund/RefundStatus.js | 12 + common/enum/order/refund/RefundType.js | 10 + common/enum/order/refund/index.js | 9 + common/enum/payment/Method.js | 11 + common/enum/payment/index.js | 3 + common/enum/setting/Key.js | 42 + common/enum/sharp/ActiveStatus.js | 11 + common/enum/sharp/GoodsStatus.js | 11 + common/enum/sharp/index.js | 4 + common/enum/store/page/category/Style.js | 12 + common/enum/store/page/category/index.js | 3 + common/model/Region.js | 57 + common/model/Setting.js | 99 + common/model/dealer/Setting.js | 58 + common/model/groupon/Setting.js | 52 + components/add-cart-btn/index.vue | 36 + components/add-cart-popup/index.vue | 178 + components/avatar-image/index.vue | 57 + components/countdown/index.vue | 183 + components/customer-btn/index.vue | 77 + components/empty/index.vue | 66 + components/goods-poster-popup/index.vue | 157 + components/goods-sku-popup/index.vue | 1367 + .../goods-sku-popup/number-box/index.vue | 450 + components/jyf-parser/jyf-parser.vue | 645 + components/jyf-parser/libs/CssHandler.js | 100 + components/jyf-parser/libs/MpHtmlParser.js | 580 + components/jyf-parser/libs/config.js | 80 + components/jyf-parser/libs/handler.wxs | 22 + components/jyf-parser/libs/trees.vue | 506 + .../mescroll-uni/components/mescroll-down.css | 55 + .../mescroll-uni/components/mescroll-down.vue | 47 + .../components/mescroll-empty.vue | 90 + .../mescroll-uni/components/mescroll-top.vue | 83 + .../mescroll-uni/components/mescroll-up.css | 47 + .../mescroll-uni/components/mescroll-up.vue | 39 + components/mescroll-uni/mescroll-body.css | 19 + components/mescroll-uni/mescroll-body.vue | 352 + components/mescroll-uni/mescroll-mixins.js | 65 + .../mescroll-uni/mescroll-uni-option.js | 37 + components/mescroll-uni/mescroll-uni.css | 36 + components/mescroll-uni/mescroll-uni.js | 799 + components/mescroll-uni/mescroll-uni.vue | 424 + .../mescroll-uni/mixins/mescroll-comp.js | 48 + .../mescroll-uni/mixins/mescroll-more-item.js | 59 + .../mescroll-uni/mixins/mescroll-more.js | 74 + components/mescroll-uni/wxs/mixins.js | 109 + components/mescroll-uni/wxs/renderjs.js | 92 + components/mescroll-uni/wxs/wxs.wxs | 268 + .../page/diyComponents/article/index.vue | 123 + .../page/diyComponents/banner/index.vue | 166 + .../page/diyComponents/bargain/index.vue | 184 + components/page/diyComponents/blank/index.vue | 31 + .../page/diyComponents/coupon/index.vue | 199 + components/page/diyComponents/empty.vue | 39 + components/page/diyComponents/goods/index.vue | 257 + .../page/diyComponents/groupon/index.vue | 212 + components/page/diyComponents/guide/index.vue | 36 + .../page/diyComponents/hotZone/index.vue | 67 + components/page/diyComponents/image/index.vue | 47 + components/page/diyComponents/mixin.js | 55 + .../page/diyComponents/navBar/index.vue | 87 + .../page/diyComponents/notice/index.vue | 40 + .../diyComponents/officialAccount/index.vue | 37 + .../page/diyComponents/richText/index.vue | 33 + .../page/diyComponents/search/index.vue | 76 + .../page/diyComponents/service/index.vue | 90 + components/page/diyComponents/sharp/index.vue | 251 + components/page/diyComponents/shop/index.vue | 97 + .../page/diyComponents/special/index.vue | 102 + components/page/diyComponents/video/index.vue | 38 + .../page/diyComponents/window/index.vue | 171 + components/page/index.vue | 156 + components/recommended/index.vue | 323 + components/search/index.vue | 69 + components/select-region/select-region.vue | 187 + components/share-sheet/index.vue | 369 + components/shortcut/index.vue | 293 + config.js | 31 + core/app.js | 230 + core/bootstrap.js | 20 + core/config/defaultConfig.js | 46 + core/config/index.js | 54 + core/mixins/app.js | 35 + core/payment/alipay.js | 91 + core/payment/index.js | 4 + core/payment/wechat.js | 180 + core/platform.js | 64 + js_sdk/ican-H5Api/ican-H5Api.js | 71 + js_sdk/queryStringify.js | 119 + main.js | 40 + manifest.json | 125 + .../@dcloudio/types/html5plus/plus.d.ts | 20694 ++++++++++++++++ node_modules/@dcloudio/types/index.d.ts | 2 + node_modules/@dcloudio/types/package.json | 14 + node_modules/@dcloudio/types/uni-app/app.d.ts | 201 + .../@dcloudio/types/uni-app/cloud.d.ts | 3097 +++ .../@dcloudio/types/uni-app/common.d.ts | 7 + .../@dcloudio/types/uni-app/index.d.ts | 7 + .../@dcloudio/types/uni-app/page.d.ts | 244 + node_modules/@dcloudio/types/uni-app/uni.d.ts | 16452 ++++++++++++ node_modules/@dcloudio/types/uni-app/vue.d.ts | 11 + node_modules/commander/History.md | 152 + node_modules/commander/Makefile | 7 + node_modules/commander/Readme.md | 270 + node_modules/commander/index.js | 1131 + node_modules/commander/package.json | 13 + node_modules/js-md5/CHANGELOG.md | 101 + node_modules/js-md5/LICENSE.txt | 20 + node_modules/js-md5/README.md | 76 + node_modules/js-md5/build/md5.min.js | 10 + node_modules/js-md5/package.json | 45 + node_modules/js-md5/src/md5.js | 683 + node_modules/js/History.md | 13 + node_modules/js/LICENSE | 21 + node_modules/js/README.md | 29 + node_modules/js/bin/js | 87 + node_modules/js/package.json | 12 + node_modules/keypress/README.md | 101 + node_modules/keypress/index.js | 346 + node_modules/keypress/package.json | 20 + node_modules/keypress/test.js | 28 + node_modules/luch-request/LICENSE.txt | 21 + node_modules/luch-request/history.md | 70 + node_modules/luch-request/package.json | 106 + node_modules/luch-request/readme.md | 260 + .../luch-request/src/lib/adapters/index.js | 100 + .../src/lib/core/InterceptorManager.js | 51 + .../luch-request/src/lib/core/Request.js | 197 + .../src/lib/core/buildFullPath.js | 20 + .../luch-request/src/lib/core/defaults.js | 31 + .../src/lib/core/dispatchRequest.js | 6 + .../luch-request/src/lib/core/mergeConfig.js | 103 + .../luch-request/src/lib/core/settle.js | 16 + .../luch-request/src/lib/helpers/buildURL.js | 64 + .../src/lib/helpers/combineURLs.js | 14 + .../src/lib/helpers/isAbsoluteURL.js | 14 + .../luch-request/src/lib/luch-request.d.ts | 120 + .../luch-request/src/lib/luch-request.js | 2 + node_modules/luch-request/src/lib/utils.js | 135 + .../luch-request/src/lib/utils/clone.js | 264 + package-lock.json | 110 + package.json | 9 + package/MyArea/MyArea.vue | 289 + package/MyStore/MyStore.vue | 378 + package/apply/components/delivery.vue | 282 + package/apply/components/index.vue | 415 + package/apply/components/partner.2.vue | 566 + package/apply/components/partner.vue | 327 + package/apply/components/personal.vue | 412 + package/apply/components/teamer.vue | 412 + package/apply/delivery.vue | 595 + package/apply/index.vue | 625 + package/apply/personal.vue | 604 + package/apply/select.vue | 80 + package/apply/teamer.vue | 605 + package/brand/components/search.vue | 67 + package/brand/detail.vue | 228 + package/brand/index.vue | 68 + package/city/index.vue | 76 + package/collection/components/goods.vue | 402 + package/collection/index.vue | 394 + package/dealer/apply.vue | 316 + package/dealer/driver.vue | 237 + package/dealer/index.vue | 321 + package/dealer/order.vue | 223 + package/dealer/poster.vue | 80 + package/dealer/team.vue | 236 + package/dealer/withdraw/apply.vue | 398 + package/dealer/withdraw/list.vue | 249 + package/deliver/address/create.vue | 206 + package/deliver/address/index.vue | 305 + package/deliver/address/update.vue | 244 + package/deliver/city-select.vue | 231 + package/deliver/my-order.vue | 322 + package/deliver/notice/index.vue | 271 + package/deliver/order-center.vue | 750 + package/equipment/cashier/index.vue | 460 + package/equipment/checkout/index.vue | 718 + package/equipment/components/Comment.vue | 159 + package/equipment/components/Service.vue | 158 + package/equipment/components/SkuPopup.vue | 179 + package/equipment/components/SlideImage.vue | 146 + package/equipment/components/search.vue | 69 + package/equipment/detail.scss | 229 + package/equipment/detail.vue | 348 + package/equipment/list.vue | 465 + package/follow/index.vue | 278 + package/footmark/components/goods.vue | 402 + package/footmark/index.vue | 398 + package/partner/partner.vue | 98 + package/salesman/profit/index.vue | 275 + package/salesman/qrcode/index.vue | 84 + package/salesman/storehouse/index.vue | 303 + package/shops/detail/components/commodity.vue | 321 + package/shops/detail/components/primary.vue | 110 + package/shops/detail/components/search.vue | 94 + package/shops/detail/components/secondary.vue | 180 + .../shops/detail/components/shop-banner.vue | 177 + package/shops/detail/index.scss | 228 + package/shops/detail/index.vue | 316 + package/shops/index.vue | 299 + package/solution/apply.vue | 232 + package/solution/article/index.vue | 238 + package/solution/buy/index.vue | 225 + package/solution/cashier/index.vue | 460 + package/solution/components/search.vue | 67 + package/solution/detail.vue | 107 + package/solution/index.vue | 109 + package/user/account/index.vue | 122 + package/user/address/create.vue | 206 + package/user/address/index.vue | 305 + package/user/address/update.vue | 244 + package/user/admin/index.vue | 109 + package/user/equipment/create.vue | 206 + package/user/equipment/detail.vue | 441 + package/user/equipment/index.vue | 358 + package/user/equipment/operation.vue | 440 + package/user/equipment/update.vue | 244 + package/user/goods/cashier.vue | 618 + package/user/goods/components/Comment.vue | 159 + package/user/goods/components/Service.vue | 158 + package/user/goods/components/SkuPopup.vue | 179 + package/user/goods/components/SlideImage.vue | 146 + package/user/goods/components/search.vue | 69 + package/user/goods/detail.scss | 228 + package/user/goods/detail.vue | 347 + package/user/goods/list.vue | 659 + package/user/notice/index.vue | 109 + package/user/order/index.vue | 521 + package/user/popularize/components/goods.vue | 402 + package/user/popularize/components/goods1.vue | 404 + package/user/popularize/index.vue | 395 + package/user/profile/index.vue | 90 + package/user/shop/index.vue | 116 + pages.json | 499 + pages/address/create.vue | 212 + pages/address/index.vue | 307 + pages/address/update.vue | 249 + pages/article/detail.vue | 107 + pages/article/index.vue | 251 + pages/bargain/goods/components/SkuPopup.vue | 167 + pages/bargain/goods/index.vue | 413 + pages/bargain/goods/style.scss | 298 + pages/bargain/index.vue | 479 + pages/bargain/task.vue | 838 + pages/cart/index.vue | 516 + pages/category/components/commodity.vue | 297 + pages/category/components/primary.vue | 110 + pages/category/components/secondary.vue | 180 + pages/category/index.vue | 166 + pages/chatgpt/chatgpt.vue | 367 + pages/checkout/cashier/index.vue | 601 + pages/checkout/checkout.vue | 378 + pages/checkout/index.vue | 601 + pages/checkout/style.scss | 475 + pages/comment/index.vue | 276 + pages/coupon/index.vue | 251 + pages/custom/index.vue | 120 + pages/dealer/apply.vue | 316 + pages/dealer/index.vue | 309 + pages/dealer/order.vue | 223 + pages/dealer/poster.vue | 80 + pages/dealer/team.vue | 267 + pages/dealer/withdraw/apply.vue | 358 + pages/dealer/withdraw/list.vue | 237 + pages/empty.vue | 29 + pages/equipment/detail.vue | 441 + pages/equipment/equipment.vue | 255 + pages/goods/components/Comment.vue | 159 + pages/goods/components/Service.vue | 158 + pages/goods/components/SkuPopup.vue | 189 + pages/goods/components/SlideImage.vue | 146 + pages/goods/detail.scss | 229 + pages/goods/detail.vue | 328 + pages/goods/list.vue | 463 + pages/groupon/goods/components/SkuPopup.vue | 214 + pages/groupon/goods/components/TaskList.vue | 193 + .../components/goods-sku-popup/index.vue | 1453 ++ .../goods-sku-popup/number-box/index.vue | 450 + pages/groupon/goods/index.vue | 382 + pages/groupon/goods/style.scss | 325 + pages/groupon/index.vue | 501 + pages/groupon/task/index.vue | 533 + pages/help/about.vue | 54 + pages/help/index.vue | 55 + pages/help/xieyi.vue | 55 + pages/index/index.vue | 179 + pages/live/index.vue | 257 + pages/login/components/main.vue | 377 + pages/login/components/mp-weixin-mobile.vue | 144 + pages/login/components/mp-weixin.vue | 238 + pages/login/components/wx-official.vue | 124 + pages/login/index.vue | 102 + pages/login/login.vue | 207 + pages/merchant/detail.vue | 330 + pages/merchant/merchant.vue | 323 + pages/my-coupon/index.vue | 307 + pages/notice/notice.vue | 311 + pages/order/comment/index.vue | 566 + pages/order/delivery.vue | 323 + pages/order/detail.vue | 1577 ++ pages/order/express/index.vue | 266 + pages/order/extract/check.vue | 835 + pages/order/index.vue | 811 + pages/points/log.vue | 127 + pages/refund/apply.vue | 434 + pages/refund/detail.vue | 481 + pages/refund/index.vue | 263 + pages/search/index.vue | 227 + pages/sharp/goods/components/SkuPopup.vue | 181 + pages/sharp/goods/index.vue | 339 + pages/sharp/goods/style.scss | 306 + pages/sharp/index.vue | 460 + pages/shop/detail.vue | 198 + pages/shop/extract.vue | 198 + pages/user/bind/index.vue | 311 + pages/user/equipment/index.vue | 355 + pages/user/index.vue | 759 + pages/user/personal/index.vue | 235 + pages/user/user.vue | 767 + pages/wallet/balance/log.vue | 127 + pages/wallet/index.vue | 167 + pages/wallet/recharge/index.vue | 507 + pages/wallet/recharge/order.vue | 127 + static/app-plus/privacy.html | 746 + static/app-plus/protocol.html | 604 + static/background/user-header.png | Bin 0 -> 129208 bytes static/background/user-header2.png | Bin 0 -> 24800 bytes static/channel/wechat.png | Bin 0 -> 2053 bytes static/default-avatar.png | Bin 0 -> 891 bytes static/empty-02.png | Bin 0 -> 8448 bytes static/empty.png | Bin 0 -> 2245 bytes static/goods/battery.png | Bin 0 -> 2344 bytes static/logo.png | Bin 0 -> 24451 bytes static/not-dealer.png | Bin 0 -> 3267 bytes static/order/refund-bg.png | Bin 0 -> 1625 bytes static/order/status/close.png | Bin 0 -> 2500 bytes static/order/status/received.png | Bin 0 -> 1482 bytes static/order/status/wait_deliver.png | Bin 0 -> 4370 bytes static/order/status/wait_pay.png | Bin 0 -> 1448 bytes static/order/status/wait_receipt.png | Bin 0 -> 2221 bytes static/privacy.html | 746 + static/protocol.html | 604 + static/star.svg | 2 + static/star1.svg | 2 + static/star2.svg | 2 + static/tabbar/cart-active.png | Bin 0 -> 2941 bytes static/tabbar/cart.png | Bin 0 -> 2654 bytes static/tabbar/cate-active.png | Bin 0 -> 2092 bytes static/tabbar/cate.png | Bin 0 -> 2021 bytes static/tabbar/cook-active.png | Bin 0 -> 3866 bytes static/tabbar/cook.png | Bin 0 -> 3697 bytes static/tabbar/home-active.png | Bin 0 -> 1892 bytes static/tabbar/home.png | Bin 0 -> 1822 bytes static/tabbar/notice-active.png | Bin 0 -> 2913 bytes static/tabbar/notice.png | Bin 0 -> 2881 bytes static/tabbar/user-active.png | Bin 0 -> 2180 bytes static/tabbar/user.png | Bin 0 -> 2077 bytes static/wallet.png | Bin 0 -> 17772 bytes store/getters.js | 10 + store/index.js | 24 + store/modules/app.js | 46 + store/modules/index.js | 5 + store/modules/theme.js | 40 + store/modules/user.js | 136 + store/mutation-types.js | 6 + template.h5.html | 30 + uni.scss | 90 + uni_modules/mp-html/README.md | 182 + uni_modules/mp-html/changelog.md | 69 + .../mp-html/components/mp-html/mp-html.vue | 435 + .../mp-html/components/mp-html/node/node.vue | 525 + .../mp-html/components/mp-html/parser.js | 1223 + uni_modules/mp-html/package.json | 79 + .../static/app-plus/mp-html/js/handler.js | 1 + .../app-plus/mp-html/js/uni.webview.min.js | 1 + .../static/app-plus/mp-html/local.html | 1 + uni_modules/uni-badge/changelog.md | 31 + .../components/uni-badge/uni-badge.vue | 268 + uni_modules/uni-badge/package.json | 85 + uni_modules/uni-badge/readme.md | 10 + uni_modules/uni-config-center/changelog.md | 6 + uni_modules/uni-config-center/package.json | 81 + uni_modules/uni-config-center/readme.md | 93 + .../common/uni-config-center/index.js | 1 + .../common/uni-config-center/package.json | 9 + .../uni-config-center/uni-id/config.json | 58 + .../alipay/alipayCertPublicKey_RSA2.crt | 43 + .../uni-pay/alipay/alipayRootCert.crt | 88 + .../uni-pay/alipay/appCertPublicKey.crt | 24 + .../uni-config-center/uni-pay/config.js | 23 + .../uni-pay/wxpay/apiclient_cert.p12 | 0 .../uni-pay/wxpay/apiclient_cert.pem | 3 + .../uni-pay/wxpay/apiclient_key.pem | 3 + .../uni-pay/【重要】请先看这里.md | 137 + uni_modules/uni-icons/changelog.md | 22 + .../uni-icons/components/uni-icons/icons.js | 1169 + .../components/uni-icons/uni-icons.vue | 96 + .../components/uni-icons/uniicons.css | 663 + .../components/uni-icons/uniicons.ttf | Bin 0 -> 35760 bytes uni_modules/uni-icons/package.json | 86 + uni_modules/uni-icons/readme.md | 8 + uni_modules/uni-id-common/changelog.md | 26 + uni_modules/uni-id-common/package.json | 87 + uni_modules/uni-id-common/readme.md | 3 + .../common/uni-id-common/index.js | 1 + .../common/uni-id-common/package.json | 16 + uni_modules/uni-list/changelog.md | 40 + .../components/uni-list-ad/uni-list-ad.vue | 107 + .../uni-list-chat/uni-list-chat.scss | 58 + .../uni-list-chat/uni-list-chat.vue | 571 + .../uni-list-item/uni-list-item.vue | 530 + .../uni-list/components/uni-list/uni-list.vue | 123 + .../components/uni-list/uni-refresh.vue | 65 + .../components/uni-list/uni-refresh.wxs | 87 + uni_modules/uni-list/package.json | 88 + uni_modules/uni-list/readme.md | 346 + uni_modules/uni-pay/changelog.md | 50 + .../uni-pay/components/uni-pay/uni-pay.vue | 829 + uni_modules/uni-pay/js_sdk/appleiap.js | 123 + uni_modules/uni-pay/js_sdk/js_sdk.js | 158 + uni_modules/uni-pay/package.json | 81 + .../ad-interactive-webview.vue | 18 + .../uni-pay/pages/pay-desk/pay-desk.vue | 116 + uni_modules/uni-pay/pages/success/success.vue | 233 + uni_modules/uni-pay/readme.md | 31 + uni_modules/uni-pay/static/alipay.png | Bin 0 -> 935 bytes uni_modules/uni-pay/static/wxpay.png | Bin 0 -> 1141 bytes .../cloudfunctions/common/uni-pay/LICENSE.md | 201 + .../cloudfunctions/common/uni-pay/index.js | 33 + .../common/uni-pay/package.json | 16 + .../cloudfunctions/uni-pay-co/common/error.js | 64 + .../uni-pay-co/config/permission.js | 9 + .../cloudfunctions/uni-pay-co/dao/index.js | 6 + .../cloudfunctions/uni-pay-co/dao/readme.md | 1 + .../uni-pay-co/dao/uniIdUsers.js | 25 + .../uni-pay-co/dao/uniPayOrders.js | 108 + .../cloudfunctions/uni-pay-co/index.obj.js | 268 + .../cloudfunctions/uni-pay-co/lang/en.js | 29 + .../cloudfunctions/uni-pay-co/lang/index.js | 22 + .../cloudfunctions/uni-pay-co/lang/zh-hans.js | 29 + .../cloudfunctions/uni-pay-co/libs/alipay.js | 145 + .../cloudfunctions/uni-pay-co/libs/common.js | 293 + .../cloudfunctions/uni-pay-co/libs/crypto.js | 82 + .../cloudfunctions/uni-pay-co/libs/index.js | 13 + .../cloudfunctions/uni-pay-co/libs/qrcode.js | 1 + .../cloudfunctions/uni-pay-co/libs/wxpay.js | 82 + .../uni-pay-co/middleware/access-control.js | 50 + .../uni-pay-co/middleware/auth.js | 21 + .../uni-pay-co/middleware/index.js | 7 + .../uni-pay-co/notify/appleiap.js | 78 + .../cloudfunctions/uni-pay-co/notify/test.js | 78 + .../uni-pay-co/notify/【重要】请先看这里.md | 51 + .../cloudfunctions/uni-pay-co/package.json | 17 + .../uni-pay-co/service/index.js | 5 + .../cloudfunctions/uni-pay-co/service/pay.js | 865 + .../uni-pay-co/uni-pay-co.param.js | 13 + .../uni-pay/uniCloud/database/db_init.json | 38 + uni_modules/uni-popup/changelog.md | 64 + .../components/uni-popup-dialog/keypress.js | 45 + .../uni-popup-dialog/uni-popup-dialog.vue | 276 + .../uni-popup-message/uni-popup-message.vue | 143 + .../uni-popup-share/uni-popup-share.vue | 187 + .../components/uni-popup/i18n/en.json | 7 + .../components/uni-popup/i18n/index.js | 8 + .../components/uni-popup/i18n/zh-Hans.json | 7 + .../components/uni-popup/i18n/zh-Hant.json | 7 + .../components/uni-popup/keypress.js | 45 + .../uni-popup/components/uni-popup/popup.js | 26 + .../components/uni-popup/uni-popup.vue | 474 + uni_modules/uni-popup/package.json | 87 + uni_modules/uni-popup/readme.md | 17 + uni_modules/uni-scss/changelog.md | 8 + uni_modules/uni-scss/index.scss | 1 + uni_modules/uni-scss/package.json | 82 + uni_modules/uni-scss/readme.md | 4 + uni_modules/uni-scss/styles/index.scss | 7 + .../uni-scss/styles/setting/_border.scss | 3 + .../uni-scss/styles/setting/_color.scss | 66 + .../uni-scss/styles/setting/_radius.scss | 55 + .../uni-scss/styles/setting/_space.scss | 56 + .../uni-scss/styles/setting/_styles.scss | 167 + .../uni-scss/styles/setting/_text.scss | 24 + .../uni-scss/styles/setting/_variables.scss | 146 + .../uni-scss/styles/tools/functions.scss | 19 + uni_modules/uni-scss/theme.scss | 31 + uni_modules/uni-scss/variables.scss | 62 + uni_modules/uni-transition/changelog.md | 20 + .../uni-transition/createAnimation.js | 128 + .../uni-transition/uni-transition.vue | 277 + uni_modules/uni-transition/package.json | 87 + uni_modules/uni-transition/readme.md | 11 + utils/app.js | 284 + utils/color.js | 67 + utils/iconfont.scss | 346 + utils/request/core/request.js | 143 + utils/request/core/utils.js | 102 + utils/request/index.js | 219 + utils/request/request.js | 7 + utils/request/request.md | 471 + utils/request/upload/qiniuUploader.js | 169 + utils/request/upload/upload.js | 208 + utils/request/upload/utils.js | 288 + utils/storage.js | 86 + utils/util.js | 259 + utils/utils.scss | 340 + utils/verify.js | 69 + uview-ui/LICENSE | 21 + uview-ui/README.md | 106 + .../u-action-sheet/u-action-sheet.vue | 190 + .../components/u-alert-tips/u-alert-tips.vue | 256 + .../u-avatar-cropper/u-avatar-cropper.vue | 290 + .../components/u-avatar-cropper/weCropper.js | 1265 + uview-ui/components/u-avatar/u-avatar.vue | 244 + uview-ui/components/u-back-top/u-back-top.vue | 153 + uview-ui/components/u-badge/u-badge.vue | 216 + uview-ui/components/u-button/u-button.vue | 596 + uview-ui/components/u-calendar/u-calendar.vue | 639 + .../u-car-keyboard/u-car-keyboard.vue | 257 + uview-ui/components/u-card/u-card.vue | 299 + .../components/u-cell-group/u-cell-group.vue | 70 + .../components/u-cell-item/u-cell-item.vue | 316 + .../u-checkbox-group/u-checkbox-group.vue | 123 + uview-ui/components/u-checkbox/u-checkbox.vue | 284 + .../u-circle-progress/u-circle-progress.vue | 220 + uview-ui/components/u-col/u-col.vue | 156 + .../u-collapse-item/u-collapse-item.vue | 204 + uview-ui/components/u-collapse/u-collapse.vue | 99 + .../u-column-notice/u-column-notice.vue | 237 + .../components/u-count-down/u-count-down.vue | 318 + uview-ui/components/u-count-to/u-count-to.vue | 241 + uview-ui/components/u-divider/u-divider.vue | 153 + .../u-dropdown-item/u-dropdown-item.vue | 132 + uview-ui/components/u-dropdown/u-dropdown.vue | 298 + uview-ui/components/u-empty/u-empty.vue | 193 + uview-ui/components/u-field/u-field.vue | 384 + .../components/u-form-item/u-form-item.vue | 431 + uview-ui/components/u-form/u-form.vue | 134 + .../u-full-screen/u-full-screen.vue | 52 + uview-ui/components/u-gap/u-gap.vue | 54 + .../components/u-grid-item/u-grid-item.vue | 126 + uview-ui/components/u-grid/u-grid.vue | 108 + uview-ui/components/u-icon/u-icon.vue | 336 + uview-ui/components/u-image/u-image.vue | 266 + .../u-index-anchor/u-index-anchor.vue | 89 + .../components/u-index-list/u-index-list.vue | 315 + uview-ui/components/u-input/u-input.vue | 387 + uview-ui/components/u-keyboard/u-keyboard.vue | 217 + .../components/u-lazy-load/u-lazy-load.vue | 244 + .../u-line-progress/u-line-progress.vue | 147 + uview-ui/components/u-line/u-line.vue | 84 + uview-ui/components/u-link/u-link.vue | 89 + .../u-loading-page/u-loading-page.vue | 25 + uview-ui/components/u-loading/u-loading.vue | 103 + uview-ui/components/u-loadmore/u-loadmore.vue | 203 + uview-ui/components/u-mask/u-mask.vue | 123 + .../u-message-input/u-message-input.vue | 311 + uview-ui/components/u-modal/u-modal.vue | 283 + uview-ui/components/u-navbar/u-navbar.vue | 315 + .../components/u-no-network/u-no-network.vue | 233 + .../components/u-notice-bar/u-notice-bar.vue | 272 + .../components/u-number-box/u-number-box.vue | 363 + .../u-number-keyboard/u-number-keyboard.vue | 158 + .../components/u-parse/libs/CssHandler.js | 100 + .../components/u-parse/libs/MpHtmlParser.js | 580 + uview-ui/components/u-parse/libs/config.js | 80 + uview-ui/components/u-parse/libs/handler.wxs | 22 + uview-ui/components/u-parse/libs/trees.vue | 505 + uview-ui/components/u-parse/u-parse.vue | 645 + uview-ui/components/u-picker/u-picker.vue | 676 + uview-ui/components/u-popup/u-popup.vue | 456 + .../u-radio-group/u-radio-group.vue | 128 + uview-ui/components/u-radio/u-radio.vue | 271 + uview-ui/components/u-rate/u-rate.vue | 275 + .../components/u-read-more/u-read-more.vue | 179 + .../components/u-row-notice/u-row-notice.vue | 269 + uview-ui/components/u-row/u-row.vue | 84 + uview-ui/components/u-search/u-search.vue | 342 + uview-ui/components/u-section/u-section.vue | 154 + uview-ui/components/u-select/u-select.vue | 417 + uview-ui/components/u-skeleton/u-skeleton.vue | 199 + uview-ui/components/u-slider/u-slider.vue | 257 + uview-ui/components/u-steps/u-steps.vue | 200 + uview-ui/components/u-sticky/u-sticky.vue | 157 + .../components/u-subsection/u-subsection.vue | 355 + .../u-swipe-action/u-swipe-action.vue | 255 + uview-ui/components/u-swiper/u-swiper.vue | 340 + uview-ui/components/u-switch/u-switch.vue | 163 + uview-ui/components/u-tabbar/u-tabbar.vue | 330 + uview-ui/components/u-table/u-table.vue | 84 + .../u-tabs-swiper/u-tabs-swiper.vue | 488 + uview-ui/components/u-tabs/u-tabs.vue | 368 + uview-ui/components/u-tag/u-tag.vue | 294 + uview-ui/components/u-td/u-td.vue | 66 + uview-ui/components/u-th/u-th.vue | 62 + .../u-time-line-item/u-time-line-item.vue | 83 + .../components/u-time-line/u-time-line.vue | 43 + uview-ui/components/u-toast/u-toast.vue | 220 + uview-ui/components/u-top-tips/u-top-tips.vue | 121 + uview-ui/components/u-tr/u-tr.vue | 25 + uview-ui/components/u-upload/u-upload.vue | 654 + .../u-verification-code.vue | 164 + .../components/u-waterfall/u-waterfall.vue | 176 + uview-ui/iconfont.css | 910 + uview-ui/index.js | 141 + uview-ui/index.scss | 23 + uview-ui/libs/config/config.js | 15 + uview-ui/libs/config/zIndex.js | 20 + uview-ui/libs/css/color.scss | 155 + uview-ui/libs/css/common.scss | 176 + uview-ui/libs/css/style.components.scss | 7 + uview-ui/libs/css/style.h5.scss | 8 + uview-ui/libs/css/style.mp.scss | 72 + uview-ui/libs/css/style.nvue.scss | 3 + uview-ui/libs/css/style.vue.scss | 175 + uview-ui/libs/function/$parent.js | 18 + uview-ui/libs/function/addUnit.js | 8 + uview-ui/libs/function/bem.js | 5 + uview-ui/libs/function/color.js | 37 + uview-ui/libs/function/colorGradient.js | 134 + uview-ui/libs/function/debounce.js | 29 + uview-ui/libs/function/deepClone.js | 23 + uview-ui/libs/function/deepMerge.js | 30 + uview-ui/libs/function/getParent.js | 47 + uview-ui/libs/function/guid.js | 41 + uview-ui/libs/function/md5.js | 385 + uview-ui/libs/function/queryParams.js | 58 + uview-ui/libs/function/random.js | 10 + uview-ui/libs/function/randomArray.js | 7 + uview-ui/libs/function/route.js | 122 + uview-ui/libs/function/sys.js | 9 + uview-ui/libs/function/test.js | 232 + uview-ui/libs/function/throttle.js | 32 + uview-ui/libs/function/timeFormat.js | 51 + uview-ui/libs/function/timeFrom.js | 47 + uview-ui/libs/function/toast.js | 9 + uview-ui/libs/function/trim.js | 15 + uview-ui/libs/function/type2icon.js | 35 + uview-ui/libs/mixin/mixin.js | 64 + uview-ui/libs/mixin/mpShare.js | 18 + uview-ui/libs/request/index.js | 169 + uview-ui/libs/store/index.js | 19 + uview-ui/libs/util/area.js | 1 + uview-ui/libs/util/async-validator.js | 1356 + uview-ui/libs/util/city.js | 1 + uview-ui/libs/util/emitter.js | 51 + uview-ui/libs/util/province.js | 1 + uview-ui/package.json | 39 + uview-ui/theme.scss | 38 + version.json | 3 + vue.config.js | 3 + websoft/api/article.js | 17 + websoft/api/chatgpt.js | 10 + websoft/api/dict.js | 9 + websoft/api/equipment-goods.js | 20 + websoft/api/equipment.js | 24 + websoft/api/index.js | 84 + websoft/api/login.js | 31 + websoft/api/merchant.js | 16 + websoft/api/order.js | 31 + websoft/api/payment.js | 32 + websoft/api/setting.js | 8 + websoft/api/test.js | 16 + websoft/api/upload.js | 8 + websoft/api/user.js | 14 + 当前是uniapp端的源码.txt | 1 + 764 files changed, 166417 insertions(+) create mode 100644 .env create mode 100644 .env.development create mode 100644 .env.production create mode 100755 .gitignore create mode 100755 .hbuilderx/launch.json create mode 100755 App.vue create mode 100644 README.md create mode 100755 androidPrivacy.json create mode 100755 api/address.js create mode 100755 api/article/category.js create mode 100755 api/article/index.js create mode 100755 api/balance.js create mode 100755 api/balance/log.js create mode 100755 api/bargain/active.js create mode 100755 api/bargain/checkout.js create mode 100755 api/bargain/task.js create mode 100755 api/captcha.js create mode 100755 api/cart.js create mode 100755 api/cashier/index.js create mode 100755 api/category/index.js create mode 100755 api/checkout.js create mode 100755 api/comment.js create mode 100755 api/coupon.js create mode 100755 api/dealer/apply.js create mode 100755 api/dealer/index.js create mode 100755 api/dealer/order.js create mode 100755 api/dealer/poster.js create mode 100755 api/dealer/setting.js create mode 100755 api/dealer/team.js create mode 100755 api/dealer/withdraw.js create mode 100755 api/express.js create mode 100755 api/goods/index.js create mode 100755 api/goods/service.js create mode 100755 api/groupon/checkout.js create mode 100755 api/groupon/goods.js create mode 100755 api/groupon/setting.js create mode 100755 api/groupon/task.js create mode 100755 api/help.js create mode 100755 api/live/room.js create mode 100755 api/login/index.js create mode 100755 api/myCoupon.js create mode 100755 api/order.js create mode 100755 api/order/comment.js create mode 100755 api/page.js create mode 100755 api/points/log.js create mode 100755 api/recharge.js create mode 100755 api/recharge/order.js create mode 100755 api/recharge/plan.js create mode 100755 api/refund.js create mode 100755 api/region.js create mode 100755 api/setting.js create mode 100755 api/sharp/checkout.js create mode 100755 api/sharp/goods.js create mode 100755 api/sharp/home.js create mode 100755 api/shop.js create mode 100755 api/shop/order.js create mode 100755 api/upload.js create mode 100755 api/user.js create mode 100755 api/user/coupon.js create mode 100755 api/wxofficial.js create mode 100755 app.scss create mode 100755 common/constant/index.js create mode 100755 common/constant/paginate.js create mode 100755 common/enum/Client.js create mode 100755 common/enum/coupon/ApplyRange.js create mode 100755 common/enum/coupon/CouponType.js create mode 100755 common/enum/coupon/ExpireType.js create mode 100755 common/enum/coupon/index.js create mode 100755 common/enum/dealer/apply/ApplyStatus.js create mode 100755 common/enum/dealer/apply/ApplyType.js create mode 100755 common/enum/dealer/apply/index.js create mode 100755 common/enum/dealer/withdraw/ApplyStatus.js create mode 100755 common/enum/dealer/withdraw/PayType.js create mode 100755 common/enum/dealer/withdraw/index.js create mode 100755 common/enum/enum.js create mode 100755 common/enum/goods/GoodsType.js create mode 100755 common/enum/goods/SpecType.js create mode 100755 common/enum/goods/index.js create mode 100755 common/enum/groupon/ActiveStatus.js create mode 100755 common/enum/groupon/ActiveType.js create mode 100755 common/enum/groupon/GoodsStatus.js create mode 100755 common/enum/groupon/TaskStatus.js create mode 100755 common/enum/groupon/index.js create mode 100755 common/enum/live/LiveStatus.js create mode 100755 common/enum/live/index.js create mode 100755 common/enum/order/DeliveryStatus.js create mode 100755 common/enum/order/DeliveryType.js create mode 100755 common/enum/order/OrderSource.js create mode 100755 common/enum/order/OrderStatus.js create mode 100755 common/enum/order/OrderType.js create mode 100755 common/enum/order/PayStatus.js create mode 100755 common/enum/order/PayType.js create mode 100755 common/enum/order/ReceiptStatus.js create mode 100755 common/enum/order/delivery/DeliveryMethod.js create mode 100755 common/enum/order/delivery/index.js create mode 100755 common/enum/order/index.js create mode 100755 common/enum/order/refund/AuditStatus.js create mode 100755 common/enum/order/refund/RefundStatus.js create mode 100755 common/enum/order/refund/RefundType.js create mode 100755 common/enum/order/refund/index.js create mode 100755 common/enum/payment/Method.js create mode 100755 common/enum/payment/index.js create mode 100755 common/enum/setting/Key.js create mode 100755 common/enum/sharp/ActiveStatus.js create mode 100755 common/enum/sharp/GoodsStatus.js create mode 100755 common/enum/sharp/index.js create mode 100755 common/enum/store/page/category/Style.js create mode 100755 common/enum/store/page/category/index.js create mode 100755 common/model/Region.js create mode 100755 common/model/Setting.js create mode 100755 common/model/dealer/Setting.js create mode 100755 common/model/groupon/Setting.js create mode 100755 components/add-cart-btn/index.vue create mode 100755 components/add-cart-popup/index.vue create mode 100755 components/avatar-image/index.vue create mode 100755 components/countdown/index.vue create mode 100755 components/customer-btn/index.vue create mode 100755 components/empty/index.vue create mode 100755 components/goods-poster-popup/index.vue create mode 100755 components/goods-sku-popup/index.vue create mode 100755 components/goods-sku-popup/number-box/index.vue create mode 100755 components/jyf-parser/jyf-parser.vue create mode 100755 components/jyf-parser/libs/CssHandler.js create mode 100755 components/jyf-parser/libs/MpHtmlParser.js create mode 100755 components/jyf-parser/libs/config.js create mode 100755 components/jyf-parser/libs/handler.wxs create mode 100755 components/jyf-parser/libs/trees.vue create mode 100755 components/mescroll-uni/components/mescroll-down.css create mode 100755 components/mescroll-uni/components/mescroll-down.vue create mode 100755 components/mescroll-uni/components/mescroll-empty.vue create mode 100755 components/mescroll-uni/components/mescroll-top.vue create mode 100755 components/mescroll-uni/components/mescroll-up.css create mode 100755 components/mescroll-uni/components/mescroll-up.vue create mode 100755 components/mescroll-uni/mescroll-body.css create mode 100755 components/mescroll-uni/mescroll-body.vue create mode 100755 components/mescroll-uni/mescroll-mixins.js create mode 100755 components/mescroll-uni/mescroll-uni-option.js create mode 100755 components/mescroll-uni/mescroll-uni.css create mode 100755 components/mescroll-uni/mescroll-uni.js create mode 100755 components/mescroll-uni/mescroll-uni.vue create mode 100755 components/mescroll-uni/mixins/mescroll-comp.js create mode 100755 components/mescroll-uni/mixins/mescroll-more-item.js create mode 100755 components/mescroll-uni/mixins/mescroll-more.js create mode 100755 components/mescroll-uni/wxs/mixins.js create mode 100755 components/mescroll-uni/wxs/renderjs.js create mode 100755 components/mescroll-uni/wxs/wxs.wxs create mode 100755 components/page/diyComponents/article/index.vue create mode 100755 components/page/diyComponents/banner/index.vue create mode 100755 components/page/diyComponents/bargain/index.vue create mode 100755 components/page/diyComponents/blank/index.vue create mode 100755 components/page/diyComponents/coupon/index.vue create mode 100755 components/page/diyComponents/empty.vue create mode 100755 components/page/diyComponents/goods/index.vue create mode 100755 components/page/diyComponents/groupon/index.vue create mode 100755 components/page/diyComponents/guide/index.vue create mode 100755 components/page/diyComponents/hotZone/index.vue create mode 100755 components/page/diyComponents/image/index.vue create mode 100755 components/page/diyComponents/mixin.js create mode 100755 components/page/diyComponents/navBar/index.vue create mode 100755 components/page/diyComponents/notice/index.vue create mode 100755 components/page/diyComponents/officialAccount/index.vue create mode 100755 components/page/diyComponents/richText/index.vue create mode 100755 components/page/diyComponents/search/index.vue create mode 100755 components/page/diyComponents/service/index.vue create mode 100755 components/page/diyComponents/sharp/index.vue create mode 100755 components/page/diyComponents/shop/index.vue create mode 100755 components/page/diyComponents/special/index.vue create mode 100755 components/page/diyComponents/video/index.vue create mode 100755 components/page/diyComponents/window/index.vue create mode 100755 components/page/index.vue create mode 100755 components/recommended/index.vue create mode 100755 components/search/index.vue create mode 100755 components/select-region/select-region.vue create mode 100755 components/share-sheet/index.vue create mode 100755 components/shortcut/index.vue create mode 100755 config.js create mode 100755 core/app.js create mode 100755 core/bootstrap.js create mode 100755 core/config/defaultConfig.js create mode 100755 core/config/index.js create mode 100755 core/mixins/app.js create mode 100755 core/payment/alipay.js create mode 100755 core/payment/index.js create mode 100644 core/payment/wechat.js create mode 100755 core/platform.js create mode 100755 js_sdk/ican-H5Api/ican-H5Api.js create mode 100755 js_sdk/queryStringify.js create mode 100755 main.js create mode 100755 manifest.json create mode 100644 node_modules/@dcloudio/types/html5plus/plus.d.ts create mode 100644 node_modules/@dcloudio/types/index.d.ts create mode 100644 node_modules/@dcloudio/types/package.json create mode 100644 node_modules/@dcloudio/types/uni-app/app.d.ts create mode 100644 node_modules/@dcloudio/types/uni-app/cloud.d.ts create mode 100644 node_modules/@dcloudio/types/uni-app/common.d.ts create mode 100644 node_modules/@dcloudio/types/uni-app/index.d.ts create mode 100644 node_modules/@dcloudio/types/uni-app/page.d.ts create mode 100644 node_modules/@dcloudio/types/uni-app/uni.d.ts create mode 100644 node_modules/@dcloudio/types/uni-app/vue.d.ts create mode 100644 node_modules/commander/History.md create mode 100644 node_modules/commander/Makefile create mode 100644 node_modules/commander/Readme.md create mode 100644 node_modules/commander/index.js create mode 100644 node_modules/commander/package.json create mode 100644 node_modules/js-md5/CHANGELOG.md create mode 100644 node_modules/js-md5/LICENSE.txt create mode 100644 node_modules/js-md5/README.md create mode 100644 node_modules/js-md5/build/md5.min.js create mode 100644 node_modules/js-md5/package.json create mode 100644 node_modules/js-md5/src/md5.js create mode 100644 node_modules/js/History.md create mode 100644 node_modules/js/LICENSE create mode 100644 node_modules/js/README.md create mode 100755 node_modules/js/bin/js create mode 100644 node_modules/js/package.json create mode 100644 node_modules/keypress/README.md create mode 100644 node_modules/keypress/index.js create mode 100644 node_modules/keypress/package.json create mode 100644 node_modules/keypress/test.js create mode 100644 node_modules/luch-request/LICENSE.txt create mode 100644 node_modules/luch-request/history.md create mode 100644 node_modules/luch-request/package.json create mode 100644 node_modules/luch-request/readme.md create mode 100644 node_modules/luch-request/src/lib/adapters/index.js create mode 100644 node_modules/luch-request/src/lib/core/InterceptorManager.js create mode 100644 node_modules/luch-request/src/lib/core/Request.js create mode 100644 node_modules/luch-request/src/lib/core/buildFullPath.js create mode 100644 node_modules/luch-request/src/lib/core/defaults.js create mode 100644 node_modules/luch-request/src/lib/core/dispatchRequest.js create mode 100644 node_modules/luch-request/src/lib/core/mergeConfig.js create mode 100644 node_modules/luch-request/src/lib/core/settle.js create mode 100644 node_modules/luch-request/src/lib/helpers/buildURL.js create mode 100644 node_modules/luch-request/src/lib/helpers/combineURLs.js create mode 100644 node_modules/luch-request/src/lib/helpers/isAbsoluteURL.js create mode 100644 node_modules/luch-request/src/lib/luch-request.d.ts create mode 100644 node_modules/luch-request/src/lib/luch-request.js create mode 100644 node_modules/luch-request/src/lib/utils.js create mode 100644 node_modules/luch-request/src/lib/utils/clone.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 package/MyArea/MyArea.vue create mode 100644 package/MyStore/MyStore.vue create mode 100755 package/apply/components/delivery.vue create mode 100644 package/apply/components/index.vue create mode 100644 package/apply/components/partner.2.vue create mode 100755 package/apply/components/partner.vue create mode 100644 package/apply/components/personal.vue create mode 100755 package/apply/components/teamer.vue create mode 100644 package/apply/delivery.vue create mode 100644 package/apply/index.vue create mode 100644 package/apply/personal.vue create mode 100644 package/apply/select.vue create mode 100644 package/apply/teamer.vue create mode 100755 package/brand/components/search.vue create mode 100644 package/brand/detail.vue create mode 100644 package/brand/index.vue create mode 100644 package/city/index.vue create mode 100755 package/collection/components/goods.vue create mode 100755 package/collection/index.vue create mode 100755 package/dealer/apply.vue create mode 100755 package/dealer/driver.vue create mode 100755 package/dealer/index.vue create mode 100755 package/dealer/order.vue create mode 100755 package/dealer/poster.vue create mode 100755 package/dealer/team.vue create mode 100755 package/dealer/withdraw/apply.vue create mode 100755 package/dealer/withdraw/list.vue create mode 100755 package/deliver/address/create.vue create mode 100755 package/deliver/address/index.vue create mode 100755 package/deliver/address/update.vue create mode 100644 package/deliver/city-select.vue create mode 100644 package/deliver/my-order.vue create mode 100644 package/deliver/notice/index.vue create mode 100644 package/deliver/order-center.vue create mode 100755 package/equipment/cashier/index.vue create mode 100755 package/equipment/checkout/index.vue create mode 100755 package/equipment/components/Comment.vue create mode 100755 package/equipment/components/Service.vue create mode 100755 package/equipment/components/SkuPopup.vue create mode 100755 package/equipment/components/SlideImage.vue create mode 100755 package/equipment/components/search.vue create mode 100755 package/equipment/detail.scss create mode 100755 package/equipment/detail.vue create mode 100755 package/equipment/list.vue create mode 100644 package/follow/index.vue create mode 100755 package/footmark/components/goods.vue create mode 100755 package/footmark/index.vue create mode 100644 package/partner/partner.vue create mode 100644 package/salesman/profit/index.vue create mode 100644 package/salesman/qrcode/index.vue create mode 100644 package/salesman/storehouse/index.vue create mode 100755 package/shops/detail/components/commodity.vue create mode 100755 package/shops/detail/components/primary.vue create mode 100755 package/shops/detail/components/search.vue create mode 100755 package/shops/detail/components/secondary.vue create mode 100755 package/shops/detail/components/shop-banner.vue create mode 100755 package/shops/detail/index.scss create mode 100755 package/shops/detail/index.vue create mode 100644 package/shops/index.vue create mode 100644 package/solution/apply.vue create mode 100644 package/solution/article/index.vue create mode 100644 package/solution/buy/index.vue create mode 100755 package/solution/cashier/index.vue create mode 100755 package/solution/components/search.vue create mode 100755 package/solution/detail.vue create mode 100644 package/solution/index.vue create mode 100644 package/user/account/index.vue create mode 100755 package/user/address/create.vue create mode 100755 package/user/address/index.vue create mode 100755 package/user/address/update.vue create mode 100644 package/user/admin/index.vue create mode 100755 package/user/equipment/create.vue create mode 100755 package/user/equipment/detail.vue create mode 100755 package/user/equipment/index.vue create mode 100755 package/user/equipment/operation.vue create mode 100755 package/user/equipment/update.vue create mode 100755 package/user/goods/cashier.vue create mode 100755 package/user/goods/components/Comment.vue create mode 100755 package/user/goods/components/Service.vue create mode 100755 package/user/goods/components/SkuPopup.vue create mode 100755 package/user/goods/components/SlideImage.vue create mode 100755 package/user/goods/components/search.vue create mode 100755 package/user/goods/detail.scss create mode 100755 package/user/goods/detail.vue create mode 100755 package/user/goods/list.vue create mode 100644 package/user/notice/index.vue create mode 100755 package/user/order/index.vue create mode 100755 package/user/popularize/components/goods.vue create mode 100755 package/user/popularize/components/goods1.vue create mode 100755 package/user/popularize/index.vue create mode 100644 package/user/profile/index.vue create mode 100644 package/user/shop/index.vue create mode 100755 pages.json create mode 100755 pages/address/create.vue create mode 100755 pages/address/index.vue create mode 100755 pages/address/update.vue create mode 100755 pages/article/detail.vue create mode 100755 pages/article/index.vue create mode 100755 pages/bargain/goods/components/SkuPopup.vue create mode 100755 pages/bargain/goods/index.vue create mode 100755 pages/bargain/goods/style.scss create mode 100755 pages/bargain/index.vue create mode 100755 pages/bargain/task.vue create mode 100755 pages/cart/index.vue create mode 100755 pages/category/components/commodity.vue create mode 100755 pages/category/components/primary.vue create mode 100755 pages/category/components/secondary.vue create mode 100755 pages/category/index.vue create mode 100644 pages/chatgpt/chatgpt.vue create mode 100755 pages/checkout/cashier/index.vue create mode 100644 pages/checkout/checkout.vue create mode 100755 pages/checkout/index.vue create mode 100755 pages/checkout/style.scss create mode 100755 pages/comment/index.vue create mode 100755 pages/coupon/index.vue create mode 100755 pages/custom/index.vue create mode 100755 pages/dealer/apply.vue create mode 100755 pages/dealer/index.vue create mode 100755 pages/dealer/order.vue create mode 100755 pages/dealer/poster.vue create mode 100755 pages/dealer/team.vue create mode 100755 pages/dealer/withdraw/apply.vue create mode 100755 pages/dealer/withdraw/list.vue create mode 100755 pages/empty.vue create mode 100755 pages/equipment/detail.vue create mode 100644 pages/equipment/equipment.vue create mode 100755 pages/goods/components/Comment.vue create mode 100755 pages/goods/components/Service.vue create mode 100755 pages/goods/components/SkuPopup.vue create mode 100755 pages/goods/components/SlideImage.vue create mode 100755 pages/goods/detail.scss create mode 100755 pages/goods/detail.vue create mode 100755 pages/goods/list.vue create mode 100755 pages/groupon/goods/components/SkuPopup.vue create mode 100755 pages/groupon/goods/components/TaskList.vue create mode 100755 pages/groupon/goods/components/goods-sku-popup/index.vue create mode 100755 pages/groupon/goods/components/goods-sku-popup/number-box/index.vue create mode 100755 pages/groupon/goods/index.vue create mode 100755 pages/groupon/goods/style.scss create mode 100755 pages/groupon/index.vue create mode 100755 pages/groupon/task/index.vue create mode 100755 pages/help/about.vue create mode 100755 pages/help/index.vue create mode 100755 pages/help/xieyi.vue create mode 100644 pages/index/index.vue create mode 100755 pages/live/index.vue create mode 100755 pages/login/components/main.vue create mode 100755 pages/login/components/mp-weixin-mobile.vue create mode 100755 pages/login/components/mp-weixin.vue create mode 100755 pages/login/components/wx-official.vue create mode 100755 pages/login/index.vue create mode 100755 pages/login/login.vue create mode 100644 pages/merchant/detail.vue create mode 100644 pages/merchant/merchant.vue create mode 100755 pages/my-coupon/index.vue create mode 100644 pages/notice/notice.vue create mode 100755 pages/order/comment/index.vue create mode 100755 pages/order/delivery.vue create mode 100755 pages/order/detail.vue create mode 100755 pages/order/express/index.vue create mode 100755 pages/order/extract/check.vue create mode 100755 pages/order/index.vue create mode 100755 pages/points/log.vue create mode 100755 pages/refund/apply.vue create mode 100755 pages/refund/detail.vue create mode 100755 pages/refund/index.vue create mode 100755 pages/search/index.vue create mode 100755 pages/sharp/goods/components/SkuPopup.vue create mode 100755 pages/sharp/goods/index.vue create mode 100755 pages/sharp/goods/style.scss create mode 100755 pages/sharp/index.vue create mode 100755 pages/shop/detail.vue create mode 100755 pages/shop/extract.vue create mode 100644 pages/user/bind/index.vue create mode 100644 pages/user/equipment/index.vue create mode 100755 pages/user/index.vue create mode 100755 pages/user/personal/index.vue create mode 100644 pages/user/user.vue create mode 100755 pages/wallet/balance/log.vue create mode 100755 pages/wallet/index.vue create mode 100755 pages/wallet/recharge/index.vue create mode 100755 pages/wallet/recharge/order.vue create mode 100755 static/app-plus/privacy.html create mode 100755 static/app-plus/protocol.html create mode 100755 static/background/user-header.png create mode 100755 static/background/user-header2.png create mode 100755 static/channel/wechat.png create mode 100755 static/default-avatar.png create mode 100755 static/empty-02.png create mode 100755 static/empty.png create mode 100644 static/goods/battery.png create mode 100644 static/logo.png create mode 100755 static/not-dealer.png create mode 100755 static/order/refund-bg.png create mode 100755 static/order/status/close.png create mode 100755 static/order/status/received.png create mode 100755 static/order/status/wait_deliver.png create mode 100755 static/order/status/wait_pay.png create mode 100755 static/order/status/wait_receipt.png create mode 100755 static/privacy.html create mode 100755 static/protocol.html create mode 100644 static/star.svg create mode 100644 static/star1.svg create mode 100644 static/star2.svg create mode 100755 static/tabbar/cart-active.png create mode 100755 static/tabbar/cart.png create mode 100755 static/tabbar/cate-active.png create mode 100755 static/tabbar/cate.png create mode 100644 static/tabbar/cook-active.png create mode 100644 static/tabbar/cook.png create mode 100755 static/tabbar/home-active.png create mode 100755 static/tabbar/home.png create mode 100644 static/tabbar/notice-active.png create mode 100644 static/tabbar/notice.png create mode 100755 static/tabbar/user-active.png create mode 100755 static/tabbar/user.png create mode 100755 static/wallet.png create mode 100755 store/getters.js create mode 100755 store/index.js create mode 100755 store/modules/app.js create mode 100755 store/modules/index.js create mode 100755 store/modules/theme.js create mode 100755 store/modules/user.js create mode 100755 store/mutation-types.js create mode 100755 template.h5.html create mode 100755 uni.scss create mode 100755 uni_modules/mp-html/README.md create mode 100755 uni_modules/mp-html/changelog.md create mode 100755 uni_modules/mp-html/components/mp-html/mp-html.vue create mode 100755 uni_modules/mp-html/components/mp-html/node/node.vue create mode 100755 uni_modules/mp-html/components/mp-html/parser.js create mode 100755 uni_modules/mp-html/package.json create mode 100755 uni_modules/mp-html/static/app-plus/mp-html/js/handler.js create mode 100755 uni_modules/mp-html/static/app-plus/mp-html/js/uni.webview.min.js create mode 100755 uni_modules/mp-html/static/app-plus/mp-html/local.html create mode 100644 uni_modules/uni-badge/changelog.md create mode 100644 uni_modules/uni-badge/components/uni-badge/uni-badge.vue create mode 100644 uni_modules/uni-badge/package.json create mode 100644 uni_modules/uni-badge/readme.md create mode 100644 uni_modules/uni-config-center/changelog.md create mode 100644 uni_modules/uni-config-center/package.json create mode 100644 uni_modules/uni-config-center/readme.md create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/index.js create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/package.json create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-pay/alipay/alipayCertPublicKey_RSA2.crt create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-pay/alipay/alipayRootCert.crt create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-pay/alipay/appCertPublicKey.crt create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-pay/config.js create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-pay/wxpay/apiclient_cert.p12 create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-pay/wxpay/apiclient_cert.pem create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-pay/wxpay/apiclient_key.pem create mode 100644 uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-pay/【重要】请先看这里.md create mode 100644 uni_modules/uni-icons/changelog.md create mode 100644 uni_modules/uni-icons/components/uni-icons/icons.js create mode 100644 uni_modules/uni-icons/components/uni-icons/uni-icons.vue create mode 100644 uni_modules/uni-icons/components/uni-icons/uniicons.css create mode 100644 uni_modules/uni-icons/components/uni-icons/uniicons.ttf create mode 100644 uni_modules/uni-icons/package.json create mode 100644 uni_modules/uni-icons/readme.md create mode 100644 uni_modules/uni-id-common/changelog.md create mode 100644 uni_modules/uni-id-common/package.json create mode 100644 uni_modules/uni-id-common/readme.md create mode 100644 uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/index.js create mode 100644 uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/package.json create mode 100644 uni_modules/uni-list/changelog.md create mode 100644 uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue create mode 100644 uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss create mode 100644 uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue create mode 100644 uni_modules/uni-list/components/uni-list-item/uni-list-item.vue create mode 100644 uni_modules/uni-list/components/uni-list/uni-list.vue create mode 100644 uni_modules/uni-list/components/uni-list/uni-refresh.vue create mode 100644 uni_modules/uni-list/components/uni-list/uni-refresh.wxs create mode 100644 uni_modules/uni-list/package.json create mode 100644 uni_modules/uni-list/readme.md create mode 100644 uni_modules/uni-pay/changelog.md create mode 100644 uni_modules/uni-pay/components/uni-pay/uni-pay.vue create mode 100644 uni_modules/uni-pay/js_sdk/appleiap.js create mode 100644 uni_modules/uni-pay/js_sdk/js_sdk.js create mode 100644 uni_modules/uni-pay/package.json create mode 100644 uni_modules/uni-pay/pages/ad-interactive-webview/ad-interactive-webview.vue create mode 100644 uni_modules/uni-pay/pages/pay-desk/pay-desk.vue create mode 100644 uni_modules/uni-pay/pages/success/success.vue create mode 100644 uni_modules/uni-pay/readme.md create mode 100644 uni_modules/uni-pay/static/alipay.png create mode 100644 uni_modules/uni-pay/static/wxpay.png create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/common/uni-pay/LICENSE.md create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/common/uni-pay/index.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/common/uni-pay/package.json create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/common/error.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/config/permission.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/dao/index.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/dao/readme.md create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/dao/uniIdUsers.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/dao/uniPayOrders.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/index.obj.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/lang/en.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/lang/index.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/lang/zh-hans.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/libs/alipay.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/libs/common.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/libs/crypto.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/libs/index.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/libs/qrcode.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/libs/wxpay.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/middleware/access-control.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/middleware/auth.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/middleware/index.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/notify/appleiap.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/notify/test.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/notify/【重要】请先看这里.md create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/package.json create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/service/index.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/service/pay.js create mode 100644 uni_modules/uni-pay/uniCloud/cloudfunctions/uni-pay-co/uni-pay-co.param.js create mode 100644 uni_modules/uni-pay/uniCloud/database/db_init.json create mode 100644 uni_modules/uni-popup/changelog.md create mode 100644 uni_modules/uni-popup/components/uni-popup-dialog/keypress.js create mode 100644 uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue create mode 100644 uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue create mode 100644 uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue create mode 100644 uni_modules/uni-popup/components/uni-popup/i18n/en.json create mode 100644 uni_modules/uni-popup/components/uni-popup/i18n/index.js create mode 100644 uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json create mode 100644 uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json create mode 100644 uni_modules/uni-popup/components/uni-popup/keypress.js create mode 100644 uni_modules/uni-popup/components/uni-popup/popup.js create mode 100644 uni_modules/uni-popup/components/uni-popup/uni-popup.vue create mode 100644 uni_modules/uni-popup/package.json create mode 100644 uni_modules/uni-popup/readme.md create mode 100644 uni_modules/uni-scss/changelog.md create mode 100644 uni_modules/uni-scss/index.scss create mode 100644 uni_modules/uni-scss/package.json create mode 100644 uni_modules/uni-scss/readme.md create mode 100644 uni_modules/uni-scss/styles/index.scss create mode 100644 uni_modules/uni-scss/styles/setting/_border.scss create mode 100644 uni_modules/uni-scss/styles/setting/_color.scss create mode 100644 uni_modules/uni-scss/styles/setting/_radius.scss create mode 100644 uni_modules/uni-scss/styles/setting/_space.scss create mode 100644 uni_modules/uni-scss/styles/setting/_styles.scss create mode 100644 uni_modules/uni-scss/styles/setting/_text.scss create mode 100644 uni_modules/uni-scss/styles/setting/_variables.scss create mode 100644 uni_modules/uni-scss/styles/tools/functions.scss create mode 100644 uni_modules/uni-scss/theme.scss create mode 100644 uni_modules/uni-scss/variables.scss create mode 100644 uni_modules/uni-transition/changelog.md create mode 100644 uni_modules/uni-transition/components/uni-transition/createAnimation.js create mode 100644 uni_modules/uni-transition/components/uni-transition/uni-transition.vue create mode 100644 uni_modules/uni-transition/package.json create mode 100644 uni_modules/uni-transition/readme.md create mode 100755 utils/app.js create mode 100755 utils/color.js create mode 100755 utils/iconfont.scss create mode 100755 utils/request/core/request.js create mode 100755 utils/request/core/utils.js create mode 100755 utils/request/index.js create mode 100755 utils/request/request.js create mode 100755 utils/request/request.md create mode 100755 utils/request/upload/qiniuUploader.js create mode 100755 utils/request/upload/upload.js create mode 100755 utils/request/upload/utils.js create mode 100755 utils/storage.js create mode 100755 utils/util.js create mode 100755 utils/utils.scss create mode 100755 utils/verify.js create mode 100755 uview-ui/LICENSE create mode 100755 uview-ui/README.md create mode 100755 uview-ui/components/u-action-sheet/u-action-sheet.vue create mode 100755 uview-ui/components/u-alert-tips/u-alert-tips.vue create mode 100755 uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue create mode 100755 uview-ui/components/u-avatar-cropper/weCropper.js create mode 100755 uview-ui/components/u-avatar/u-avatar.vue create mode 100755 uview-ui/components/u-back-top/u-back-top.vue create mode 100755 uview-ui/components/u-badge/u-badge.vue create mode 100755 uview-ui/components/u-button/u-button.vue create mode 100755 uview-ui/components/u-calendar/u-calendar.vue create mode 100755 uview-ui/components/u-car-keyboard/u-car-keyboard.vue create mode 100755 uview-ui/components/u-card/u-card.vue create mode 100755 uview-ui/components/u-cell-group/u-cell-group.vue create mode 100755 uview-ui/components/u-cell-item/u-cell-item.vue create mode 100755 uview-ui/components/u-checkbox-group/u-checkbox-group.vue create mode 100755 uview-ui/components/u-checkbox/u-checkbox.vue create mode 100755 uview-ui/components/u-circle-progress/u-circle-progress.vue create mode 100755 uview-ui/components/u-col/u-col.vue create mode 100755 uview-ui/components/u-collapse-item/u-collapse-item.vue create mode 100755 uview-ui/components/u-collapse/u-collapse.vue create mode 100755 uview-ui/components/u-column-notice/u-column-notice.vue create mode 100755 uview-ui/components/u-count-down/u-count-down.vue create mode 100755 uview-ui/components/u-count-to/u-count-to.vue create mode 100755 uview-ui/components/u-divider/u-divider.vue create mode 100755 uview-ui/components/u-dropdown-item/u-dropdown-item.vue create mode 100755 uview-ui/components/u-dropdown/u-dropdown.vue create mode 100755 uview-ui/components/u-empty/u-empty.vue create mode 100755 uview-ui/components/u-field/u-field.vue create mode 100755 uview-ui/components/u-form-item/u-form-item.vue create mode 100755 uview-ui/components/u-form/u-form.vue create mode 100755 uview-ui/components/u-full-screen/u-full-screen.vue create mode 100755 uview-ui/components/u-gap/u-gap.vue create mode 100755 uview-ui/components/u-grid-item/u-grid-item.vue create mode 100755 uview-ui/components/u-grid/u-grid.vue create mode 100755 uview-ui/components/u-icon/u-icon.vue create mode 100755 uview-ui/components/u-image/u-image.vue create mode 100755 uview-ui/components/u-index-anchor/u-index-anchor.vue create mode 100755 uview-ui/components/u-index-list/u-index-list.vue create mode 100755 uview-ui/components/u-input/u-input.vue create mode 100755 uview-ui/components/u-keyboard/u-keyboard.vue create mode 100755 uview-ui/components/u-lazy-load/u-lazy-load.vue create mode 100755 uview-ui/components/u-line-progress/u-line-progress.vue create mode 100755 uview-ui/components/u-line/u-line.vue create mode 100755 uview-ui/components/u-link/u-link.vue create mode 100755 uview-ui/components/u-loading-page/u-loading-page.vue create mode 100755 uview-ui/components/u-loading/u-loading.vue create mode 100755 uview-ui/components/u-loadmore/u-loadmore.vue create mode 100755 uview-ui/components/u-mask/u-mask.vue create mode 100755 uview-ui/components/u-message-input/u-message-input.vue create mode 100755 uview-ui/components/u-modal/u-modal.vue create mode 100755 uview-ui/components/u-navbar/u-navbar.vue create mode 100755 uview-ui/components/u-no-network/u-no-network.vue create mode 100755 uview-ui/components/u-notice-bar/u-notice-bar.vue create mode 100755 uview-ui/components/u-number-box/u-number-box.vue create mode 100755 uview-ui/components/u-number-keyboard/u-number-keyboard.vue create mode 100755 uview-ui/components/u-parse/libs/CssHandler.js create mode 100755 uview-ui/components/u-parse/libs/MpHtmlParser.js create mode 100755 uview-ui/components/u-parse/libs/config.js create mode 100755 uview-ui/components/u-parse/libs/handler.wxs create mode 100755 uview-ui/components/u-parse/libs/trees.vue create mode 100755 uview-ui/components/u-parse/u-parse.vue create mode 100755 uview-ui/components/u-picker/u-picker.vue create mode 100755 uview-ui/components/u-popup/u-popup.vue create mode 100755 uview-ui/components/u-radio-group/u-radio-group.vue create mode 100755 uview-ui/components/u-radio/u-radio.vue create mode 100755 uview-ui/components/u-rate/u-rate.vue create mode 100755 uview-ui/components/u-read-more/u-read-more.vue create mode 100755 uview-ui/components/u-row-notice/u-row-notice.vue create mode 100755 uview-ui/components/u-row/u-row.vue create mode 100755 uview-ui/components/u-search/u-search.vue create mode 100755 uview-ui/components/u-section/u-section.vue create mode 100755 uview-ui/components/u-select/u-select.vue create mode 100755 uview-ui/components/u-skeleton/u-skeleton.vue create mode 100755 uview-ui/components/u-slider/u-slider.vue create mode 100755 uview-ui/components/u-steps/u-steps.vue create mode 100755 uview-ui/components/u-sticky/u-sticky.vue create mode 100755 uview-ui/components/u-subsection/u-subsection.vue create mode 100755 uview-ui/components/u-swipe-action/u-swipe-action.vue create mode 100755 uview-ui/components/u-swiper/u-swiper.vue create mode 100755 uview-ui/components/u-switch/u-switch.vue create mode 100755 uview-ui/components/u-tabbar/u-tabbar.vue create mode 100755 uview-ui/components/u-table/u-table.vue create mode 100755 uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue create mode 100755 uview-ui/components/u-tabs/u-tabs.vue create mode 100755 uview-ui/components/u-tag/u-tag.vue create mode 100755 uview-ui/components/u-td/u-td.vue create mode 100755 uview-ui/components/u-th/u-th.vue create mode 100755 uview-ui/components/u-time-line-item/u-time-line-item.vue create mode 100755 uview-ui/components/u-time-line/u-time-line.vue create mode 100755 uview-ui/components/u-toast/u-toast.vue create mode 100755 uview-ui/components/u-top-tips/u-top-tips.vue create mode 100755 uview-ui/components/u-tr/u-tr.vue create mode 100755 uview-ui/components/u-upload/u-upload.vue create mode 100755 uview-ui/components/u-verification-code/u-verification-code.vue create mode 100755 uview-ui/components/u-waterfall/u-waterfall.vue create mode 100755 uview-ui/iconfont.css create mode 100755 uview-ui/index.js create mode 100755 uview-ui/index.scss create mode 100755 uview-ui/libs/config/config.js create mode 100755 uview-ui/libs/config/zIndex.js create mode 100755 uview-ui/libs/css/color.scss create mode 100755 uview-ui/libs/css/common.scss create mode 100755 uview-ui/libs/css/style.components.scss create mode 100755 uview-ui/libs/css/style.h5.scss create mode 100755 uview-ui/libs/css/style.mp.scss create mode 100755 uview-ui/libs/css/style.nvue.scss create mode 100755 uview-ui/libs/css/style.vue.scss create mode 100755 uview-ui/libs/function/$parent.js create mode 100755 uview-ui/libs/function/addUnit.js create mode 100755 uview-ui/libs/function/bem.js create mode 100755 uview-ui/libs/function/color.js create mode 100755 uview-ui/libs/function/colorGradient.js create mode 100755 uview-ui/libs/function/debounce.js create mode 100755 uview-ui/libs/function/deepClone.js create mode 100755 uview-ui/libs/function/deepMerge.js create mode 100755 uview-ui/libs/function/getParent.js create mode 100755 uview-ui/libs/function/guid.js create mode 100755 uview-ui/libs/function/md5.js create mode 100755 uview-ui/libs/function/queryParams.js create mode 100755 uview-ui/libs/function/random.js create mode 100755 uview-ui/libs/function/randomArray.js create mode 100755 uview-ui/libs/function/route.js create mode 100755 uview-ui/libs/function/sys.js create mode 100755 uview-ui/libs/function/test.js create mode 100755 uview-ui/libs/function/throttle.js create mode 100755 uview-ui/libs/function/timeFormat.js create mode 100755 uview-ui/libs/function/timeFrom.js create mode 100755 uview-ui/libs/function/toast.js create mode 100755 uview-ui/libs/function/trim.js create mode 100755 uview-ui/libs/function/type2icon.js create mode 100755 uview-ui/libs/mixin/mixin.js create mode 100755 uview-ui/libs/mixin/mpShare.js create mode 100755 uview-ui/libs/request/index.js create mode 100755 uview-ui/libs/store/index.js create mode 100755 uview-ui/libs/util/area.js create mode 100755 uview-ui/libs/util/async-validator.js create mode 100755 uview-ui/libs/util/city.js create mode 100755 uview-ui/libs/util/emitter.js create mode 100755 uview-ui/libs/util/province.js create mode 100755 uview-ui/package.json create mode 100755 uview-ui/theme.scss create mode 100644 version.json create mode 100644 vue.config.js create mode 100644 websoft/api/article.js create mode 100644 websoft/api/chatgpt.js create mode 100644 websoft/api/dict.js create mode 100644 websoft/api/equipment-goods.js create mode 100644 websoft/api/equipment.js create mode 100644 websoft/api/index.js create mode 100644 websoft/api/login.js create mode 100644 websoft/api/merchant.js create mode 100644 websoft/api/order.js create mode 100644 websoft/api/payment.js create mode 100644 websoft/api/setting.js create mode 100644 websoft/api/test.js create mode 100644 websoft/api/upload.js create mode 100644 websoft/api/user.js create mode 100755 当前是uniapp端的源码.txt diff --git a/.env b/.env new file mode 100644 index 0000000..dfecb1c --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +VITE_APP_NAME=云芯威BMS +API_URL=http://127.0.0.1:8081/api \ No newline at end of file diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..434d723 --- /dev/null +++ b/.env.development @@ -0,0 +1,2 @@ +VITE_APP_NAME=云芯威BMS +apiUrl=http://127.0.0.1:8081/api \ No newline at end of file diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..777cdb1 --- /dev/null +++ b/.env.production @@ -0,0 +1,2 @@ +VITE_APP_NAME=云芯威BMS +VITE_API_URL=https://open.gxwebsoft.com/api diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..17fa7b4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/unpackage +/utils/request-1.js diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100755 index 0000000..70e6d3e --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,20 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "remote" + }, + "mp-alipay" : + { + "launchtype" : "remote" + }, + "mp-weixin" : + { + "launchtype" : "remote" + }, + "type" : "uniCloud" + } + ] +} diff --git a/App.vue b/App.vue new file mode 100755 index 0000000..9997474 --- /dev/null +++ b/App.vue @@ -0,0 +1,241 @@ + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/androidPrivacy.json b/androidPrivacy.json new file mode 100755 index 0000000..4896361 --- /dev/null +++ b/androidPrivacy.json @@ -0,0 +1,14 @@ +{ + "version" : "1", + "prompt" : "template", + "title" : "服务协议和隐私政策", + "message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
  你可阅读《服务协议》《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", + "buttonAccept" : "同意并接受", + "buttonRefuse" : "暂不同意", + "second" : { + "title" : "确认提示", + "message" : "  进入应用前,你需先同意《服务协议》《隐私政策》,否则将退出应用。", + "buttonAccept" : "同意并继续", + "buttonRefuse" : "退出应用" + } +} diff --git a/api/address.js b/api/address.js new file mode 100755 index 0000000..43faa4d --- /dev/null +++ b/api/address.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'address/list', + defaultId: 'address/defaultId', + detail: 'address/detail', + add: 'address/add', + edit: 'address/edit', + setDefault: 'address/setDefault', + remove: 'address/remove' +} + +// 收货地址列表 +export const list = (param) => { + return request.get(api.list, param) +} + +// 默认收货地址ID +export const defaultId = (param) => { + return request.get(api.defaultId, param) +} + +// 收货地址详情 +export const detail = (addressId) => { + return request.get(api.detail, { addressId }) +} + +// 新增收货地址 +export const add = (data) => { + return request.post(api.add, { form: data }) +} + +// 编辑收货地址 +export const edit = (addressId, data) => { + return request.post(api.edit, { addressId, form: data }) +} + +// 设置默认收货地址 +export const setDefault = (addressId) => { + return request.post(api.setDefault, { addressId }) +} + +// 删除收货地址 +export const remove = (addressId) => { + return request.post(api.remove, { addressId }) +} diff --git a/api/article/category.js b/api/article/category.js new file mode 100755 index 0000000..62e0aeb --- /dev/null +++ b/api/article/category.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'article.category/list' +} + +// 页面数据 +export function list() { + return request.get(api.list) +} diff --git a/api/article/index.js b/api/article/index.js new file mode 100755 index 0000000..a5411f7 --- /dev/null +++ b/api/article/index.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'article/list', + detail: 'article/detail' +} + +// 文章列表 +export function list(param, option) { + return request.get(api.list, param, option) +} + +// 文章详情 +export function detail(articleId) { + return request.get(api.detail, { articleId }) +} diff --git a/api/balance.js b/api/balance.js new file mode 100755 index 0000000..62b0ef1 --- /dev/null +++ b/api/balance.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'balance.log/list' +} + +// 余额账单明细列表 +export const list = (param) => { + return request.get(api.list, param) +} diff --git a/api/balance/log.js b/api/balance/log.js new file mode 100755 index 0000000..153fb2a --- /dev/null +++ b/api/balance/log.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'balance.log/list' +} + +// 余额账单明细 +export const list = (param) => { + return request.get(api.list, param) +} diff --git a/api/bargain/active.js b/api/bargain/active.js new file mode 100755 index 0000000..6cc8d9e --- /dev/null +++ b/api/bargain/active.js @@ -0,0 +1,23 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'bargain.active/list', + detail: 'bargain.active/detail', + poster: 'bargain.active/poster' +} + +// 砍价活动会场列表 +export const list = (param) => { + return request.get(api.list, param) +} + +// 砍价活动详情 +export const detail = (activeId, param) => { + return request.get(api.detail, { activeId, ...param }) +} + +// 生成商品海报 +export const poster = param => { + return request.get(api.poster, param) +} diff --git a/api/bargain/checkout.js b/api/bargain/checkout.js new file mode 100755 index 0000000..b6365e5 --- /dev/null +++ b/api/bargain/checkout.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + order: 'bargain.checkout/order', + submit: 'bargain.checkout/submit' +} + +// 结算台订单信息 +export const order = (mode, param) => { + return request.get(api.order, { mode, ...param }) +} + +// 结算台订单提交 +export const submit = (mode, data) => { + return request.post(api.submit, { mode, ...data }, { isPrompt: false }) +} diff --git a/api/bargain/task.js b/api/bargain/task.js new file mode 100755 index 0000000..cd860bc --- /dev/null +++ b/api/bargain/task.js @@ -0,0 +1,35 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'bargain.task/list', + partake: 'bargain.task/partake', + detail: 'bargain.task/detail', + helpList: 'bargain.task/helpList', + helpCut: 'bargain.task/helpCut' +} + +// 我的砍价列表 +export const list = (param) => { + return request.get(api.list, param) +} + +// 创建砍价任务 +export const partake = (data) => { + return request.post(api.partake, data) +} + +// 获取砍价任务详情 +export const detail = (taskId, param) => { + return request.get(api.detail, { taskId, ...param }) +} + +// 获取砍价任务好友助力榜 +export const helpList = (taskId, param) => { + return request.get(api.helpList, { taskId, ...param }) +} + +// 帮砍一刀 +export const helpCut = (taskId, data) => { + return request.post(api.helpCut, { taskId, ...data }) +} diff --git a/api/captcha.js b/api/captcha.js new file mode 100755 index 0000000..6fff247 --- /dev/null +++ b/api/captcha.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + image: 'captcha/image', + sendSmsCaptcha: 'captcha/sendSmsCaptcha' +} + +// 图形验证码 +export function image() { + return request.get(api.image, {}, { load: false }) +} + +// 发送短信验证码 +export function sendSmsCaptcha(data) { + return request.post(api.sendSmsCaptcha, data, { load: false }) +} diff --git a/api/cart.js b/api/cart.js new file mode 100755 index 0000000..cba717e --- /dev/null +++ b/api/cart.js @@ -0,0 +1,35 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'cart/list', + total: 'cart/total', + add: 'cart/add', + update: 'cart/update', + clear: 'cart/clear' +} + +// 购物车列表 +export const list = () => { + return request.get(api.list, {}, { load: false }) +} + +// 购物车商品总数量 +export const total = () => { + return request.get(api.total, {}, { load: false }) +} + +// 加入购物车 +export const add = (goodsId, goodsSkuId, goodsNum) => { + return request.post(api.add, { goodsId, goodsSkuId, goodsNum }) +} + +// 更新购物车商品数量 +export const update = (goodsId, goodsSkuId, goodsNum) => { + return request.post(api.update, { goodsId, goodsSkuId, goodsNum }, { isPrompt: false }) +} + +// 删除购物车中指定记录 +export const clear = (cartIds = []) => { + return request.post(api.clear, { cartIds }) +} diff --git a/api/cashier/index.js b/api/cashier/index.js new file mode 100755 index 0000000..0710a62 --- /dev/null +++ b/api/cashier/index.js @@ -0,0 +1,35 @@ +import request from '@/utils/request' + +// api地址 +const api = { + orderInfo: 'cashier/orderInfo', + orderPay: 'cashier/orderPay', + tradeQuery: 'cashier/tradeQuery', +} + +/** + * 获取支付订单的信息 + * @param {Number} orderId + * @param {Object} param + */ +export function orderInfo(orderId, param) { + return request.get(api.orderInfo, { orderId, ...param }) +} + +/** + * 确认支付 + * @param {Number} orderId + * @param {Object} data + */ +export function orderPay(orderId, data) { + return request.post(api.orderPay, { orderId, ...data }) +} + +/** + * 交易查询 + * 查询第三方支付订单是否付款成功 + * @param {Object} param + */ +export function tradeQuery(param) { + return request.get(api.tradeQuery, param) +} diff --git a/api/category/index.js b/api/category/index.js new file mode 100755 index 0000000..7198be0 --- /dev/null +++ b/api/category/index.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'category/list' +} + +// 页面数据 +export function list() { + return request.get(api.list) +} diff --git a/api/checkout.js b/api/checkout.js new file mode 100755 index 0000000..db4a362 --- /dev/null +++ b/api/checkout.js @@ -0,0 +1,19 @@ +import request from '@/utils/request' + +// api地址 +const api = { + order: 'checkout/order', + submit: 'checkout/submit', +} + +// mode: 结算模式 (buyNow立即购买 cart购物车) + +// 结算台订单信息 +export const order = (mode, param) => { + return request.get(api.order, { mode, ...param }) +} + +// 结算台订单提交 +export const submit = (mode, data) => { + return request.post(api.submit, { mode, ...data }, { isPrompt: false }) +} diff --git a/api/comment.js b/api/comment.js new file mode 100755 index 0000000..c751c01 --- /dev/null +++ b/api/comment.js @@ -0,0 +1,23 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'comment/list', + listRows: 'comment/listRows', + total: 'comment/total' +} + +// 商品评价列表 +export const list = (goodsId, param, option) => { + return request.get(api.list, { ...param, goodsId }, option) +} + +// 商品评价列表 (限制数量, 用于商品详情页展示) +export const listRows = (goodsId, limit = 5) => { + return request.get(api.listRows, { goodsId, limit }) +} + +// 商品评分总数 +export const total = (goodsId) => { + return request.get(api.total, { goodsId }) +} diff --git a/api/coupon.js b/api/coupon.js new file mode 100755 index 0000000..706149c --- /dev/null +++ b/api/coupon.js @@ -0,0 +1,16 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'coupon/list' +} + +// 优惠券列表 +export const list = (param, option) => { + const options = { + isPrompt: true, //(默认 true 说明:本接口抛出的错误是否提示) + load: true, //(默认 true 说明:本接口是否提示加载动画) + ...option + } + return request.get(api.list, param, options) +} diff --git a/api/dealer/apply.js b/api/dealer/apply.js new file mode 100755 index 0000000..e736e2e --- /dev/null +++ b/api/dealer/apply.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + status: 'dealer.apply/status', + submit: 'dealer.apply/submit' +} + +// 分销商申请状态 +export const status = (param) => { + return request.get(api.status, param) +} + +// 提交分销商申请 +export const submit = (data) => { + return request.post(api.submit, data) +} diff --git a/api/dealer/index.js b/api/dealer/index.js new file mode 100755 index 0000000..faab2aa --- /dev/null +++ b/api/dealer/index.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + user: 'dealer/user', + center: 'dealer/center' +} + +// 分销商用户详情 +export const user = (param) => { + return request.get(api.user, param) +} + +// 分销商提现明细 +export const center = (param) => { + return request.get(api.center, param) +} diff --git a/api/dealer/order.js b/api/dealer/order.js new file mode 100755 index 0000000..165d3af --- /dev/null +++ b/api/dealer/order.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'dealer.order/list' +} + +// 分销商订单列表 +export const list = (param) => { + return request.get(api.list, param) +} diff --git a/api/dealer/poster.js b/api/dealer/poster.js new file mode 100755 index 0000000..c5a309b --- /dev/null +++ b/api/dealer/poster.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + qrcode: 'dealer.poster/qrcode' +} + +// 获取推广二维码 +export const qrcode = (param) => { + return request.get(api.qrcode, param) +} diff --git a/api/dealer/setting.js b/api/dealer/setting.js new file mode 100755 index 0000000..e51656b --- /dev/null +++ b/api/dealer/setting.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + data: 'dealer.setting/data' +} + +// 获取分销设置 (全部) +export const data = () => { + return request.get(api.data) +} diff --git a/api/dealer/team.js b/api/dealer/team.js new file mode 100755 index 0000000..5e541c2 --- /dev/null +++ b/api/dealer/team.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'dealer.team/list' +} + +// 我的团队列表 +export const list = (param) => { + return request.get(api.list, param) +} diff --git a/api/dealer/withdraw.js b/api/dealer/withdraw.js new file mode 100755 index 0000000..f859ca2 --- /dev/null +++ b/api/dealer/withdraw.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'dealer.withdraw/list', + submit: 'dealer.withdraw/submit' +} + +// 分销商提现明细 +export const list = (param) => { + return request.get(api.list, param) +} + +// 提交提现申请 +export const submit = (data) => { + return request.post(api.submit, data) +} diff --git a/api/express.js b/api/express.js new file mode 100755 index 0000000..b0db530 --- /dev/null +++ b/api/express.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'express/list' +} + +// 物流公司列表 +export const list = (param) => { + return request.get(api.list, param) +} diff --git a/api/goods/index.js b/api/goods/index.js new file mode 100755 index 0000000..45bc511 --- /dev/null +++ b/api/goods/index.js @@ -0,0 +1,49 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'goods/list', + detail: 'goods/detail', + basic: 'goods/basic', + specData: 'goods/specData', + skuInfo: 'goods/skuInfo', + recommended: 'goods/recommended', + poster: 'goods/poster' +} + +// 商品列表 +export const list = (param, option) => { + return request.get(api.list, param, option) +} + +// 商品详情(详细数据) +export const detail = (goodsId, verifyStatus, param) => { + verifyStatus = Number(verifyStatus) + return request.get(api.detail, { goodsId, verifyStatus, ...param }) +} + +// 商品详情(基本数据) +export const basic = (goodsId, verifyStatus, param) => { + verifyStatus = Number(verifyStatus) + return request.get(api.basic, { goodsId, verifyStatus, ...param }) +} + +// 获取商品规格数据 +export const specData = (goodsId) => { + return request.get(api.specData, { goodsId }) +} + +// 获取推荐的商品列表 +export const recommended = () => { + return request.get(api.recommended) +} + +// 获取商品的指定SKU信息 +export const skuInfo = (goodsId, goodsSkuId, param) => { + return request.get(api.skuInfo, { goodsId, goodsSkuId, ...param }) +} + +// 生成商品海报 +export const poster = param => { + return request.get(api.poster, param) +} diff --git a/api/goods/service.js b/api/goods/service.js new file mode 100755 index 0000000..4bc2e43 --- /dev/null +++ b/api/goods/service.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'goods.service/list' +} + +// 商品评价列表 +export function list(goodsId) { + return request.get(api.list, { goodsId }) +} diff --git a/api/groupon/checkout.js b/api/groupon/checkout.js new file mode 100755 index 0000000..82dbd2a --- /dev/null +++ b/api/groupon/checkout.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + order: 'groupon.checkout/order', + submit: 'groupon.checkout/submit' +} + +// 结算台订单信息 +export const order = (mode, param) => { + return request.get(api.order, { mode, ...param }) +} + +// 结算台订单提交 +export const submit = (mode, data) => { + return request.post(api.submit, { mode, ...data }, { isPrompt: false }) +} diff --git a/api/groupon/goods.js b/api/groupon/goods.js new file mode 100755 index 0000000..7e3b1d8 --- /dev/null +++ b/api/groupon/goods.js @@ -0,0 +1,23 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'groupon.goods/list', + detail: 'groupon.goods/detail', + poster: 'groupon.goods/poster' +} + +// 拼团商品列表 +export const list = (param) => { + return request.get(api.list, param) +} + +// 拼团商品详情 +export const detail = (grouponGoodsId, param) => { + return request.get(api.detail, { grouponGoodsId, ...param }) +} + +// 生成商品海报 +export const poster = param => { + return request.get(api.poster, param) +} diff --git a/api/groupon/setting.js b/api/groupon/setting.js new file mode 100755 index 0000000..0314773 --- /dev/null +++ b/api/groupon/setting.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + data: 'groupon.setting/data' +} + +// 获取拼团设置 +export const data = () => { + return request.get(api.data) +} diff --git a/api/groupon/task.js b/api/groupon/task.js new file mode 100755 index 0000000..cbaf4e3 --- /dev/null +++ b/api/groupon/task.js @@ -0,0 +1,23 @@ +import request from '@/utils/request' + +// api地址 +const api = { + myList: 'groupon.task/myList', + listByGoods: 'groupon.task/listByGoods', + detail: 'groupon.task/detail' +} + +// 我的拼团列表 +export const myList = param => { + return request.get(api.myList, param) +} + +// 获取拼单任务详情 +export const detail = (taskId, param) => { + return request.get(api.detail, { taskId, ...param }) +} + +// 我的拼团列表 +export const listByGoods = (grouponGoodsId, param) => { + return request.get(api.listByGoods, { grouponGoodsId, ...param }) +} diff --git a/api/help.js b/api/help.js new file mode 100755 index 0000000..150fa07 --- /dev/null +++ b/api/help.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'help/list' +} + +// 帮助中心列表 +export const list = (param) => { + return request.get(api.list, param) +} diff --git a/api/live/room.js b/api/live/room.js new file mode 100755 index 0000000..1ab7b04 --- /dev/null +++ b/api/live/room.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'live.room/list' +} + +// 获取直播间列表 +export const list = (param) => { + return request.get(api.list, param) +} diff --git a/api/login/index.js b/api/login/index.js new file mode 100755 index 0000000..8629cf7 --- /dev/null +++ b/api/login/index.js @@ -0,0 +1,36 @@ +import request from '@/utils/request' +import exp from 'constants' +import http from '@/websoft/api/index.js'; + +// api地址 +const api = { + login: 'passport/login', + loginMpWx: 'passport/loginMpWx', + loginWxOfficial: 'passport/loginWxOfficial', + loginMpWxMobile: 'passport/loginMpWxMobile', +} + +// 用户登录 (手机号+验证码) +export function login(data) { + return request.post(api.login, data) +} + +// 微信小程序快捷登录 (获取微信用户基本信息) +export function loginMpWx(data, option) { + return request.post(api.loginMpWx, data, option) +} + +// 微信公众号一键授权登录 (获取微信用户基本信息) +export function loginWxOfficial(data, option) { + return request.post(api.loginWxOfficial, data, option) +} + +// 微信小程序快捷登录 (授权手机号) +export function loginMpWxMobile(data, option) { + return request.post(api.loginMpWxMobile, data, option) +} + +// 支付宝小程序快捷登录 +export function LoginMpAlipay(data, option) { + return http.post('/login-alipay/login', data, option) +} \ No newline at end of file diff --git a/api/myCoupon.js b/api/myCoupon.js new file mode 100755 index 0000000..d84ea55 --- /dev/null +++ b/api/myCoupon.js @@ -0,0 +1,22 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'myCoupon/list', + receive: 'myCoupon/receive' +} + +// 我的优惠券列表 +export const list = (param, option) => { + const options = { + isPrompt: true, //(默认 true 说明:本接口抛出的错误是否提示) + load: true, //(默认 true 说明:本接口是否提示加载动画) + ...option + } + return request.get(api.list, param, options) +} + +// 领取优惠券 +export const receive = (couponId, data, option) => { + return request.post(api.receive, { couponId, ...data }, option) +} diff --git a/api/order.js b/api/order.js new file mode 100755 index 0000000..1113f06 --- /dev/null +++ b/api/order.js @@ -0,0 +1,48 @@ +import request from '@/utils/request' + +// api地址 +const api = { + todoCounts: 'order/todoCounts', + list: 'order/list', + detail: 'order/detail', + express: 'order/express', + cancel: 'order/cancel', + extractQrcode: 'order/extractQrcode', + receipt: 'order/receipt', + pay: 'order/pay' +} + +// 当前用户待处理的订单数量 +export function todoCounts(param, option) { + return request.get(api.todoCounts, param, option) +} + +// 我的订单列表 +export function list(param, option) { + return request.get(api.list, param, option) +} + +// 订单详情 +export function detail(orderId, param) { + return request.get(api.detail, { orderId, ...param }) +} + +// 获取物流信息 +export function express(orderId, param) { + return request.get(api.express, { orderId, ...param }) +} + +// 取消订单 +export function cancel(orderId, data) { + return request.post(api.cancel, { orderId, ...data }) +} + +// 确认收货 +export function receipt(orderId, data) { + return request.post(api.receipt, { orderId, ...data }) +} + +// 核销二维码 +export function extractQrcode(orderId, param) { + return request.get(api.extractQrcode, { orderId, ...param }) +} diff --git a/api/order/comment.js b/api/order/comment.js new file mode 100755 index 0000000..f0d57b8 --- /dev/null +++ b/api/order/comment.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'order.comment/list', + submit: 'order.comment/submit' +} + +// 待评价订单商品列表 +export const list = (orderId, param) => { + return request.get(api.list, { orderId, ...param }) +} + +// 创建商品评价 +export const submit = (orderId, data) => { + return request.post(api.submit, { orderId, form: data }) +} diff --git a/api/page.js b/api/page.js new file mode 100755 index 0000000..bc0a519 --- /dev/null +++ b/api/page.js @@ -0,0 +1,13 @@ +import request from '@/utils/request' + +// api地址 +const apiUri = { + detail: 'page/detail' +} + +// 页面数据 +export function detail(pageId) { + return request.get(apiUri.detail, { + pageId + }) +} diff --git a/api/points/log.js b/api/points/log.js new file mode 100755 index 0000000..bb7a6e7 --- /dev/null +++ b/api/points/log.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'points.log/list' +} + +// 积分明细列表 +export const list = (param) => { + return request.get(api.list, param) +} diff --git a/api/recharge.js b/api/recharge.js new file mode 100755 index 0000000..b6fd546 --- /dev/null +++ b/api/recharge.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +// api地址 +const api = { + center: 'recharge/center', + submit: 'recharge/submit', + tradeQuery: 'recharge/tradeQuery' +} + +// 充值中心页面数据 +export const center = (param) => { + return request.get(api.center, param) +} + +// 确认充值订单 +export const submit = (data) => { + return request.post(api.submit, { form: data }) +} + +/** + * 交易查询 + * 查询第三方支付订单是否付款成功 + * @param {Object} param + */ +export function tradeQuery(param) { + return request.get(api.tradeQuery, param) +} diff --git a/api/recharge/order.js b/api/recharge/order.js new file mode 100755 index 0000000..4cab383 --- /dev/null +++ b/api/recharge/order.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'recharge.order/list' +} + +// 我的充值记录列表 +export const list = (param) => { + return request.get(api.list, param) +} diff --git a/api/recharge/plan.js b/api/recharge/plan.js new file mode 100755 index 0000000..56f4550 --- /dev/null +++ b/api/recharge/plan.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'recharge.plan/list' +} + +// 充值套餐列表 +export const list = (param) => { + return request.get(api.list, param) +} diff --git a/api/refund.js b/api/refund.js new file mode 100755 index 0000000..d92af6e --- /dev/null +++ b/api/refund.js @@ -0,0 +1,35 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'refund/list', + goods: 'refund/goods', + apply: 'refund/apply', + detail: 'refund/detail', + delivery: 'refund/delivery' +} + +// 售后单列表 +export const list = (param, option) => { + return request.get(api.list, param, option) +} + +// 订单商品详情 +export const goods = (orderGoodsId, param) => { + return request.get(api.goods, { orderGoodsId, ...param }) +} + +// 申请售后 +export const apply = (orderGoodsId, data) => { + return request.post(api.apply, { orderGoodsId, form: data }) +} + +// 售后单详情 +export const detail = (orderRefundId, param) => { + return request.get(api.detail, { orderRefundId, ...param }) +} + +// 用户发货 +export const delivery = (orderRefundId, data) => { + return request.post(api.delivery, { orderRefundId, form: data }) +} diff --git a/api/region.js b/api/region.js new file mode 100755 index 0000000..d8ba090 --- /dev/null +++ b/api/region.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + all: 'region/all', + tree: 'region/tree' +} + +// 获取所有地区 +export const all = (param) => { + return request.get(api.all, param) +} + +// 获取所有地区(树状) +export const tree = (param) => { + return request.get(api.tree, param) +} diff --git a/api/setting.js b/api/setting.js new file mode 100755 index 0000000..5d3327e --- /dev/null +++ b/api/setting.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + data: 'setting/data' +} + +// 设置项详情 +export function data() { + return request.get(api.data) +} diff --git a/api/sharp/checkout.js b/api/sharp/checkout.js new file mode 100755 index 0000000..d884183 --- /dev/null +++ b/api/sharp/checkout.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + order: 'sharp.checkout/order', + submit: 'sharp.checkout/submit' +} + +// 结算台订单信息 +export const order = (mode, param) => { + return request.get(api.order, { mode, ...param }) +} + +// 结算台订单提交 +export const submit = (mode, data) => { + return request.post(api.submit, { mode, ...data }, { isPrompt: false }) +} diff --git a/api/sharp/goods.js b/api/sharp/goods.js new file mode 100755 index 0000000..b13ea3d --- /dev/null +++ b/api/sharp/goods.js @@ -0,0 +1,23 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'sharp.goods/list', + detail: 'sharp.goods/detail', + poster: 'sharp.goods/poster' +} + +// 秒杀活动商品列表 +export const list = (activeTimeId, param, option) => { + return request.get(api.list, { activeTimeId, ...param }, option) +} + +// 获取活动商品详情 +export const detail = (activeTimeId, sharpGoodsId, param) => { + return request.get(api.detail, { activeTimeId, sharpGoodsId, ...param }) +} + +// 生成商品海报 +export const poster = param => { + return request.get(api.poster, param) +} diff --git a/api/sharp/home.js b/api/sharp/home.js new file mode 100755 index 0000000..0b7b61d --- /dev/null +++ b/api/sharp/home.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + data: 'sharp.home/data' +} + +// 秒杀活动首页 +export const data = (param) => { + return request.get(api.data, param) +} diff --git a/api/shop.js b/api/shop.js new file mode 100755 index 0000000..17f43e2 --- /dev/null +++ b/api/shop.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + list: 'shop/list', + detail: 'shop/detail' +} + +// 自提门店列表 +export const list = (param) => { + return request.get(api.list, param) +} + +// 门店详情 +export const detail = (shopId) => { + return request.get(api.detail, { shopId }) +} diff --git a/api/shop/order.js b/api/shop/order.js new file mode 100755 index 0000000..be58f9a --- /dev/null +++ b/api/shop/order.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + detail: 'shop.order/detail', + extract: 'shop.order/extract' +} + +// 核销订单详情 [只有店员才能查看] +export function detail(orderId, param) { + return request.get(api.detail, { orderId, ...param }) +} + +// 确认核销 [已取货] +export function extract(orderId, param) { + return request.post(api.extract, { orderId, ...param }) +} diff --git a/api/upload.js b/api/upload.js new file mode 100755 index 0000000..4e28551 --- /dev/null +++ b/api/upload.js @@ -0,0 +1,18 @@ +import request from '@/utils/request' + +// api地址 +const api = { + image: 'upload/image' +} + +// 图片上传 +export const image = files => { + // 文件上传大小, 2M + const maxSize = 1024 * 1024 * 2 + // 执行上传 + return new Promise((resolve, reject) => { + request.urlFileUpload({ files, maxSize }) + .then(result => resolve(result.map(item => item.data.fileInfo.file_id), result)) + .catch(reject) + }) +} diff --git a/api/user.js b/api/user.js new file mode 100755 index 0000000..6e3c30c --- /dev/null +++ b/api/user.js @@ -0,0 +1,34 @@ +import request from '@/utils/request' + +// api地址 +const api = { + userInfo: 'user/info', + assets: 'user/assets', + bindMobile: 'user/bindMobile', + personal: 'user/personal' +} + +// 当前登录的用户信息 +export const info = (param, option) => { + const options = { + isPrompt: true, //(默认 true 说明:本接口抛出的错误是否提示) + load: true, //(默认 true 说明:本接口是否提示加载动画) + ...option + } + return request.get(api.userInfo, param, options) +} + +// 账户资产 +export const assets = (param, option) => { + return request.get(api.assets, param, option) +} + +// 绑定手机号 +export const bindMobile = (data, option) => { + return request.post(api.bindMobile, data, option) +} + +// 修改个人信息(头像昵称) +export const personal = (data, option) => { + return request.post(api.personal, data, option) +} diff --git a/api/user/coupon.js b/api/user/coupon.js new file mode 100755 index 0000000..3412566 --- /dev/null +++ b/api/user/coupon.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// api地址 +const api = { + receive: 'user.coupon/receive' +} + +// 优惠券列表 +export const receive = (data) => { + return request.post(api.receive, data) +} diff --git a/api/wxofficial.js b/api/wxofficial.js new file mode 100755 index 0000000..9cf08e9 --- /dev/null +++ b/api/wxofficial.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +// api地址 +const api = { + oauthUrl: 'wxofficial/oauthUrl', + oauthUserInfo: 'wxofficial/oauthUserInfo' +} + +// 获取授权登录地址 +export const oauthUrl = callbackUrl => { + return request.get(api.oauthUrl, { callbackUrl }) +} + +// 获取微信用户信息 +export const oauthUserInfo = code => { + return request.get(api.oauthUserInfo, { code }) +} diff --git a/app.scss b/app.scss new file mode 100755 index 0000000..3b14f3b --- /dev/null +++ b/app.scss @@ -0,0 +1,43 @@ +/* utils.scss */ +@import "/utils/utils.scss"; + +page { + background: #fafafa; +} + +@keyframes rotate { + 0% { + transform: rotate(0deg) scale(1); + } + + 100% { + transform: rotate(360deg) scale(1); + } +} + +/* #ifdef H5*/ + +uni-page { + box-shadow: 0 1rpx 44rpx rgba(169, 169, 169, .3); +} + +.uni-app--showlayout+uni-tabbar.uni-tabbar-bottom, +.uni-app--showlayout+uni-tabbar.uni-tabbar-bottom .uni-tabbar, +.uni-app--showlayout+uni-tabbar.uni-tabbar-top, +.uni-app--showlayout+uni-tabbar.uni-tabbar-top .uni-tabbar { + left: var(--window-left); + right: var(--window-right); +} + +.footer-fixed { + left: var(--window-left) !important; + right: var(--window-right) !important; +} + +.u-mask,.u-drawer { + left: var(--window-left) !important; + right: var(--window-right) !important; +} + +/* #endif */ + diff --git a/common/constant/index.js b/common/constant/index.js new file mode 100755 index 0000000..4c1c240 --- /dev/null +++ b/common/constant/index.js @@ -0,0 +1,3 @@ +import paginate from './paginate' + +export { paginate } diff --git a/common/constant/paginate.js b/common/constant/paginate.js new file mode 100755 index 0000000..0617b7e --- /dev/null +++ b/common/constant/paginate.js @@ -0,0 +1,7 @@ +export default { + data: [], // 列表数据 + current_page: 1, // 当前页码 + last_page: 1, // 最大页码 + per_page: 15, // 每页记录数 + total: 0, // 总记录数 +} diff --git a/common/enum/Client.js b/common/enum/Client.js new file mode 100755 index 0000000..c558f90 --- /dev/null +++ b/common/enum/Client.js @@ -0,0 +1,12 @@ +import Enum from './enum' + +/** + * 枚举类:客户端类型 + * ClientEnum + */ +export default new Enum([ + { key: 'APP', name: 'APP端', value: 'APP' }, + { key: 'H5', name: 'H5端', value: 'H5' }, + { key: 'H5_WEIXIN', name: '微信公众号端', value: 'H5-WEIXIN' }, + { key: 'MP_WEIXIN', name: '微信小程序端', value: 'MP-WEIXIN' }, +]) diff --git a/common/enum/coupon/ApplyRange.js b/common/enum/coupon/ApplyRange.js new file mode 100755 index 0000000..7422e62 --- /dev/null +++ b/common/enum/coupon/ApplyRange.js @@ -0,0 +1,10 @@ +import Enum from '../enum' + +/** + * 枚举类:优惠券适用范围 + * ApplyRangeEnum + */ +export default new Enum([ + { key: 'ALL', name: '全部商品', value: 10 }, + { key: 'SOME_GOODS', name: '指定商品', value: 20 } +]) diff --git a/common/enum/coupon/CouponType.js b/common/enum/coupon/CouponType.js new file mode 100755 index 0000000..5f56fda --- /dev/null +++ b/common/enum/coupon/CouponType.js @@ -0,0 +1,10 @@ +import Enum from '../enum' + +/** + * 枚举类:优惠券类型 + * CouponTypeEnum + */ +export default new Enum([ + { key: 'FULL_DISCOUNT', name: '满减券', value: 10 }, + { key: 'DISCOUNT', name: '折扣券', value: 20 } +]) diff --git a/common/enum/coupon/ExpireType.js b/common/enum/coupon/ExpireType.js new file mode 100755 index 0000000..269b36c --- /dev/null +++ b/common/enum/coupon/ExpireType.js @@ -0,0 +1,10 @@ +import Enum from '../enum' + +/** + * 枚举类:优惠券到期类型 + * ExpireTypeEnum + */ +export default new Enum([ + { key: 'RECEIVE', name: '领取后', value: 10 }, + { key: 'FIXED_TIME', name: '固定时间', value: 20 } +]) diff --git a/common/enum/coupon/index.js b/common/enum/coupon/index.js new file mode 100755 index 0000000..be1bdc8 --- /dev/null +++ b/common/enum/coupon/index.js @@ -0,0 +1,5 @@ +import ApplyRangeEnum from './ApplyRange' +import ExpireTypeEnum from './ExpireType' +import CouponTypeEnum from './CouponType' + +export { ApplyRangeEnum, CouponTypeEnum, ExpireTypeEnum } diff --git a/common/enum/dealer/apply/ApplyStatus.js b/common/enum/dealer/apply/ApplyStatus.js new file mode 100755 index 0000000..4808d4c --- /dev/null +++ b/common/enum/dealer/apply/ApplyStatus.js @@ -0,0 +1,11 @@ +import Enum from '../../enum' + +/** + * 枚举类:分销商审核状态 + * ApplyStatusEnum + */ +export default new Enum([ + { key: 'WAIT', name: '待审核', value: 10 }, + { key: 'PASSED', name: '审核通过', value: 20 }, + { key: 'REJECT', name: '驳回', value: 30 } +]) diff --git a/common/enum/dealer/apply/ApplyType.js b/common/enum/dealer/apply/ApplyType.js new file mode 100755 index 0000000..31b80a1 --- /dev/null +++ b/common/enum/dealer/apply/ApplyType.js @@ -0,0 +1,10 @@ +import Enum from '../../enum' + +/** + * 枚举类:分销商申请方式 + * ApplyTypeEnum + */ +export default new Enum([ + { key: 'AUDIT', name: '需后台审核', value: 10 }, + { key: 'PASS', name: '无需审核', value: 20 } +]) diff --git a/common/enum/dealer/apply/index.js b/common/enum/dealer/apply/index.js new file mode 100755 index 0000000..63844d6 --- /dev/null +++ b/common/enum/dealer/apply/index.js @@ -0,0 +1,4 @@ +import ApplyStatusEnum from './ApplyStatus' +import ApplyTypeEnum from './ApplyType' + +export { ApplyStatusEnum, ApplyTypeEnum } diff --git a/common/enum/dealer/withdraw/ApplyStatus.js b/common/enum/dealer/withdraw/ApplyStatus.js new file mode 100755 index 0000000..2297ebe --- /dev/null +++ b/common/enum/dealer/withdraw/ApplyStatus.js @@ -0,0 +1,12 @@ +import Enum from '../../enum' + +/** + * 枚举类:分销商提现申请状态 + * ApplyStatusEnum + */ +export default new Enum([ + { key: 'WAIT', name: '待审核', value: 10 }, + { key: 'PASSED', name: '审核通过', value: 20 }, + { key: 'REJECT', name: '驳回', value: 30 }, + { key: 'PAYMENT', name: '已打款', value: 40 } +]) diff --git a/common/enum/dealer/withdraw/PayType.js b/common/enum/dealer/withdraw/PayType.js new file mode 100755 index 0000000..2b0c23d --- /dev/null +++ b/common/enum/dealer/withdraw/PayType.js @@ -0,0 +1,11 @@ +import Enum from '../../enum' + +/** + * 枚举类:分销商体现打款方式 + * PayTypeEnum + */ +export default new Enum([ + { key: 'WECHAT', name: '微信零钱', value: 10 }, + { key: 'ALIPAY', name: '支付宝', value: 20 }, + { key: 'BANK_CARD', name: '银行卡', value: 30 } +]) diff --git a/common/enum/dealer/withdraw/index.js b/common/enum/dealer/withdraw/index.js new file mode 100755 index 0000000..9e8210c --- /dev/null +++ b/common/enum/dealer/withdraw/index.js @@ -0,0 +1,4 @@ +import PayTypeEnum from './PayType' +import ApplyStatusEnum from './ApplyStatus' + +export { PayTypeEnum, ApplyStatusEnum } diff --git a/common/enum/enum.js b/common/enum/enum.js new file mode 100755 index 0000000..0894708 --- /dev/null +++ b/common/enum/enum.js @@ -0,0 +1,85 @@ +/** + * 枚举类 + * Enum.IMAGE.name => "图片" + * Enum.getNameByKey('IMAGE') => "图片" + * Enum.getValueByKey('IMAGE') => 10 + * Enum.getNameByValue(10) => "图片" + * Enum.getData() => [{key: "IMAGE", name: "图片", value: 10}] + */ +class Enum { + constructor (param) { + const keyArr = [] + const valueArr = [] + + if (!Array.isArray(param)) { + throw new Error('param is not an array!') + } + + param.map(element => { + if (!element.key || !element.name) { + return + } + // 保存key值组成的数组,方便A.getName(name)类型的调用 + keyArr.push(element.key) + valueArr.push(element.value) + // 根据key生成不同属性值,以便A.B.name类型的调用 + this[element.key] = element + if (element.key !== element.value) { + this[element.value] = element + } + }) + + + // 保存源数组 + this.data = param + this.keyArr = keyArr + this.valueArr = valueArr + + // 防止被修改 + // Object.freeze(this) + } + + // 根据key得到对象 + keyOf (key) { + return this.data[this.keyArr.indexOf(key)] + } + + // 根据key得到对象 + valueOf (key) { + return this.data[this.valueArr.indexOf(key)] + } + + // 根据key获取name值 + getNameByKey (key) { + const prop = this.keyOf(key) + if (!prop) { + throw new Error('No enum constant' + key) + } + return prop.name + } + + // 根据value获取name值 + getNameByValue (value) { + const prop = this.valueOf(value) + if (!prop) { + throw new Error('No enum constant' + value) + } + return prop.name + } + + // 根据key获取value值 + getValueByKey (key) { + const prop = this.keyOf(key) + if (!prop) { + throw new Error('No enum constant' + key) + } + return prop.key + } + + // 返回源数组 + getData () { + return this.data + } +} + +export default Enum diff --git a/common/enum/goods/GoodsType.js b/common/enum/goods/GoodsType.js new file mode 100755 index 0000000..235af2a --- /dev/null +++ b/common/enum/goods/GoodsType.js @@ -0,0 +1,10 @@ +import Enum from '../enum' + +/** + * 枚举类:商品类型 + * GoodsTypeEnum + */ +export default new Enum([ + { key: 'PHYSICAL', name: '实物商品', value: 10 }, + { key: 'VIRTUAL', name: '虚拟商品', value: 20 } +]) diff --git a/common/enum/goods/SpecType.js b/common/enum/goods/SpecType.js new file mode 100755 index 0000000..ec7832e --- /dev/null +++ b/common/enum/goods/SpecType.js @@ -0,0 +1,10 @@ +import Enum from '../enum' + +/** + * 枚举类:商品规格类型 + * SpecTypeEnum + */ +export default new Enum([ + { key: 'SINGLE', name: '单规格', value: 10 }, + { key: 'MULTI', name: '多规格', value: 20 } +]) diff --git a/common/enum/goods/index.js b/common/enum/goods/index.js new file mode 100755 index 0000000..b057a95 --- /dev/null +++ b/common/enum/goods/index.js @@ -0,0 +1,4 @@ +import GoodsTypeEnum from './GoodsType' +import SpecTypeEnum from './SpecType' + +export { GoodsTypeEnum, SpecTypeEnum } diff --git a/common/enum/groupon/ActiveStatus.js b/common/enum/groupon/ActiveStatus.js new file mode 100755 index 0000000..77c0350 --- /dev/null +++ b/common/enum/groupon/ActiveStatus.js @@ -0,0 +1,11 @@ +import Enum from '../enum' + +/** + * 枚举类:拼团活动状态 + * GoodsStatusEnum + */ +export default new Enum([ + { key: 'STATE_BEGIN', name: '已开始', value: 10 }, + { key: 'STATE_SOON', name: '未开始', value: 20 }, + { key: 'STATE_END', name: '已结束', value: 30 } +]) diff --git a/common/enum/groupon/ActiveType.js b/common/enum/groupon/ActiveType.js new file mode 100755 index 0000000..0a89d33 --- /dev/null +++ b/common/enum/groupon/ActiveType.js @@ -0,0 +1,11 @@ +import Enum from '../enum' + +/** + * 枚举类:拼团类型 + * ActiveTypeEnum + */ +export default new Enum([ + { key: 'NORMAL', name: '普通拼团', value: 10, name2: '多人拼团' }, + { key: 'PULL_NEW', name: '老带新拼团', value: 20, name2: '新人团' }, + { key: 'STEPS', name: '阶梯拼团', value: 30, name2: '阶梯团' } +]) diff --git a/common/enum/groupon/GoodsStatus.js b/common/enum/groupon/GoodsStatus.js new file mode 100755 index 0000000..039a02c --- /dev/null +++ b/common/enum/groupon/GoodsStatus.js @@ -0,0 +1,10 @@ +import Enum from '../enum' + +/** + * 枚举类:拼团商品状态 + * GoodsStatusEnum + */ +export default new Enum([ + { key: 'NORMAL', name: '进行中', value: 10 }, + { key: 'FINISH', name: '已结束', value: 20 } +]) diff --git a/common/enum/groupon/TaskStatus.js b/common/enum/groupon/TaskStatus.js new file mode 100755 index 0000000..6299cfd --- /dev/null +++ b/common/enum/groupon/TaskStatus.js @@ -0,0 +1,11 @@ +import Enum from '../enum' + +/** + * 枚举类:拼单状态 + * TaskStatusEnum + */ +export default new Enum([ + { key: 'NORMAL', name: '进行中', value: 10 }, + { key: 'SUCCESS', name: '拼单成功', value: 20 }, + { key: 'FAIL', name: '拼单失败', value: 30 } +]) diff --git a/common/enum/groupon/index.js b/common/enum/groupon/index.js new file mode 100755 index 0000000..316d18e --- /dev/null +++ b/common/enum/groupon/index.js @@ -0,0 +1,6 @@ +import GoodsStatusEnum from './GoodsStatus' +import TaskStatusEnum from './TaskStatus' +import ActiveTypeEnum from './ActiveType' +import ActiveStatusEnum from './ActiveStatus' + +export { GoodsStatusEnum, TaskStatusEnum, ActiveTypeEnum, ActiveStatusEnum } diff --git a/common/enum/live/LiveStatus.js b/common/enum/live/LiveStatus.js new file mode 100755 index 0000000..cbb683e --- /dev/null +++ b/common/enum/live/LiveStatus.js @@ -0,0 +1,15 @@ +import Enum from '../enum' + +/** + * 枚举类:微信小程序直播间状态 + * LiveStatusEnum + */ +export default new Enum([ + { key: 101, name: '直播中', value: 101 }, + { key: 102, name: '未开始', value: 102 }, + { key: 103, name: '已结束', value: 103 }, + { key: 104, name: '禁播', value: 104 }, + { key: 105, name: '暂停中', value: 105 }, + { key: 106, name: '异常', value: 106 }, + { key: 107, name: '已过期', value: 107 } +]) diff --git a/common/enum/live/index.js b/common/enum/live/index.js new file mode 100755 index 0000000..d8a53cc --- /dev/null +++ b/common/enum/live/index.js @@ -0,0 +1,3 @@ +import LiveStatusEnum from './LiveStatus' + +export { LiveStatusEnum } diff --git a/common/enum/order/DeliveryStatus.js b/common/enum/order/DeliveryStatus.js new file mode 100755 index 0000000..ed55f95 --- /dev/null +++ b/common/enum/order/DeliveryStatus.js @@ -0,0 +1,10 @@ +import Enum from '../enum' + +/** + * 枚举类:订单发货状态 + * DeliveryStatusEnum + */ +export default new Enum([ + { key: 'NOT_DELIVERED', name: '未发货', value: 10 }, + { key: 'DELIVERED', name: '已发货', value: 20 } +]) diff --git a/common/enum/order/DeliveryType.js b/common/enum/order/DeliveryType.js new file mode 100755 index 0000000..230eb18 --- /dev/null +++ b/common/enum/order/DeliveryType.js @@ -0,0 +1,11 @@ +import Enum from '../enum' + +/** + * 枚举类:配送方式 + * DeliveryTypeEnum + */ +export default new Enum([ + { key: 'EXPRESS', name: '快递配送', value: 10 }, + { key: 'EXTRACT', name: '上门自提', value: 20 }, + { key: 'NOTHING', name: '无需配送', value: 30 } +]) diff --git a/common/enum/order/OrderSource.js b/common/enum/order/OrderSource.js new file mode 100755 index 0000000..e46062c --- /dev/null +++ b/common/enum/order/OrderSource.js @@ -0,0 +1,11 @@ +import Enum from '../enum' + +/** + * 枚举类:订单来源 + * OrderSourceEnum + */ +export default new Enum([ + { key: 'MASTER', name: '普通订单', value: 10 }, + { key: 'BARGAIN', name: '砍价订单', value: 20 }, + { key: 'SHARP', name: '秒杀订单', value: 30 } +]) diff --git a/common/enum/order/OrderStatus.js b/common/enum/order/OrderStatus.js new file mode 100755 index 0000000..f706e43 --- /dev/null +++ b/common/enum/order/OrderStatus.js @@ -0,0 +1,12 @@ +import Enum from '../enum' + +/** + * 枚举类:订单状态 + * OrderStatusEnum + */ +export default new Enum([ + { key: 'NORMAL', name: '进行中', value: 10 }, + { key: 'CANCELLED', name: '已取消', value: 20 }, + { key: 'APPLY_CANCEL', name: '待取消', value: 21 }, + { key: 'COMPLETED', name: '已完成', value: 30 } +]) diff --git a/common/enum/order/OrderType.js b/common/enum/order/OrderType.js new file mode 100755 index 0000000..de77681 --- /dev/null +++ b/common/enum/order/OrderType.js @@ -0,0 +1,10 @@ +import Enum from '../enum' + +/** + * 枚举类:订单类型 + * OrderTypeEnum + */ +export default new Enum([ + { key: 'PHYSICAL', name: '实物订单', value: 10 }, + { key: 'VIRTUAL', name: '虚拟订单', value: 20 } +]) diff --git a/common/enum/order/PayStatus.js b/common/enum/order/PayStatus.js new file mode 100755 index 0000000..f0e4b1d --- /dev/null +++ b/common/enum/order/PayStatus.js @@ -0,0 +1,10 @@ +import Enum from '../enum' + +/** + * 枚举类:订单支付状态 + * PayStatusEnum + */ +export default new Enum([ + { key: 'PENDING', name: '待支付', value: 10 }, + { key: 'SUCCESS', name: '已支付', value: 20 } +]) diff --git a/common/enum/order/PayType.js b/common/enum/order/PayType.js new file mode 100755 index 0000000..96612df --- /dev/null +++ b/common/enum/order/PayType.js @@ -0,0 +1,10 @@ +import Enum from '../enum' + +/** + * 枚举类:订单支付方式 + * PayTypeEnum + */ +export default new Enum([ + { key: 'BALANCE', name: '余额支付', value: 10 }, + { key: 'WECHAT', name: '微信支付', value: 20 } +]) diff --git a/common/enum/order/ReceiptStatus.js b/common/enum/order/ReceiptStatus.js new file mode 100755 index 0000000..34916a0 --- /dev/null +++ b/common/enum/order/ReceiptStatus.js @@ -0,0 +1,10 @@ +import Enum from '../enum' + +/** + * 枚举类:订单收货状态 + * ReceiptStatusEnum + */ +export default new Enum([ + { key: 'NOT_RECEIVED', name: '未收货', value: 10 }, + { key: 'RECEIVED', name: '已收货', value: 20 } +]) diff --git a/common/enum/order/delivery/DeliveryMethod.js b/common/enum/order/delivery/DeliveryMethod.js new file mode 100755 index 0000000..7d06cb1 --- /dev/null +++ b/common/enum/order/delivery/DeliveryMethod.js @@ -0,0 +1,11 @@ +import Enum from '../../enum' + +/** + * 枚举类:发货方式 + * DeliveryMethodEnum + */ +export default new Enum([ + { key: 'MANUAL', name: '手动发货', value: 10 }, + { key: 'UNWANTED', name: '无需物流', value: 20 }, + { key: 'EORDER', name: '电子面单', value: 30 } +]) diff --git a/common/enum/order/delivery/index.js b/common/enum/order/delivery/index.js new file mode 100755 index 0000000..171a078 --- /dev/null +++ b/common/enum/order/delivery/index.js @@ -0,0 +1,3 @@ +import DeliveryMethodEnum from './DeliveryMethod' + +export { DeliveryMethodEnum } diff --git a/common/enum/order/index.js b/common/enum/order/index.js new file mode 100755 index 0000000..56f507b --- /dev/null +++ b/common/enum/order/index.js @@ -0,0 +1,17 @@ +import DeliveryStatusEnum from './DeliveryStatus' +import DeliveryTypeEnum from './DeliveryType' +import OrderSourceEnum from './OrderSource' +import OrderStatusEnum from './OrderStatus' +import PayStatusEnum from './PayStatus' +import ReceiptStatusEnum from './ReceiptStatus' +import OrderTypeEnum from './OrderType' + +export { + DeliveryStatusEnum, + DeliveryTypeEnum, + OrderSourceEnum, + OrderStatusEnum, + PayStatusEnum, + ReceiptStatusEnum, + OrderTypeEnum +} diff --git a/common/enum/order/refund/AuditStatus.js b/common/enum/order/refund/AuditStatus.js new file mode 100755 index 0000000..2d9f5f0 --- /dev/null +++ b/common/enum/order/refund/AuditStatus.js @@ -0,0 +1,11 @@ +import Enum from '../../enum' + +/** + * 枚举类:商家审核状态 + * AuditStatusEnum + */ +export default new Enum([ + { key: 'WAIT', name: '待审核', value: 0 }, + { key: 'REVIEWED', name: '已同意', value: 10 }, + { key: 'REJECTED', name: '已拒绝', value: 20 } +]) diff --git a/common/enum/order/refund/RefundStatus.js b/common/enum/order/refund/RefundStatus.js new file mode 100755 index 0000000..78331b2 --- /dev/null +++ b/common/enum/order/refund/RefundStatus.js @@ -0,0 +1,12 @@ +import Enum from '../../enum' + +/** + * 枚举类:售后单状态 + * RefundStatusEnum + */ +export default new Enum([ + { key: 'NORMAL', name: '进行中', value: 0 }, + { key: 'REJECTED', name: '已拒绝', value: 10 }, + { key: 'COMPLETED', name: '已完成', value: 20 }, + { key: 'CANCELLED', name: '已取消', value: 30 } +]) diff --git a/common/enum/order/refund/RefundType.js b/common/enum/order/refund/RefundType.js new file mode 100755 index 0000000..63999cd --- /dev/null +++ b/common/enum/order/refund/RefundType.js @@ -0,0 +1,10 @@ +import Enum from '../../enum' + +/** + * 枚举类:售后类型 + * RefundTypeEnum + */ +export default new Enum([ + { key: 'RETURN', name: '退货退款', value: 10 }, + { key: 'EXCHANGE', name: '换货', value: 20 } +]) diff --git a/common/enum/order/refund/index.js b/common/enum/order/refund/index.js new file mode 100755 index 0000000..803b268 --- /dev/null +++ b/common/enum/order/refund/index.js @@ -0,0 +1,9 @@ +import AuditStatusEnum from './AuditStatus' +import RefundStatusEnum from './RefundStatus' +import RefundTypeEnum from './RefundType' + +export { + AuditStatusEnum, + RefundStatusEnum, + RefundTypeEnum +} diff --git a/common/enum/payment/Method.js b/common/enum/payment/Method.js new file mode 100755 index 0000000..e9213e4 --- /dev/null +++ b/common/enum/payment/Method.js @@ -0,0 +1,11 @@ +import Enum from '../enum' + +/** + * 枚举类:支付方式类型 + * PayMethodEnum + */ +export default new Enum([ + { key: 'WECHAT', name: '微信支付', value: 'wechat' }, + { key: 'ALIPAY', name: '支付宝支付', value: 'alipay' }, + { key: 'BALANCE', name: '余额支付', value: 'balance' } +]) diff --git a/common/enum/payment/index.js b/common/enum/payment/index.js new file mode 100755 index 0000000..030b061 --- /dev/null +++ b/common/enum/payment/index.js @@ -0,0 +1,3 @@ +import PayMethodEnum from './Method' + +export { PayMethodEnum } diff --git a/common/enum/setting/Key.js b/common/enum/setting/Key.js new file mode 100755 index 0000000..8bf7582 --- /dev/null +++ b/common/enum/setting/Key.js @@ -0,0 +1,42 @@ +import Enum from '../enum' + +/** + * 枚举类:设置项索引 + * SettingKeyEnum + */ +export default new Enum([{ + key: 'REGISTER', + name: '账户注册设置', + value: 'register' + }, + { + key: 'APP_THEME', + name: '店铺页面风格', + value: 'app_theme' + }, + { + key: 'PAGE_CATEGORY_TEMPLATE', + name: '分类页模板', + value: 'page_category_template' + }, + { + key: 'POINTS', + name: '积分设置', + value: 'points' + }, + { + key: 'RECHARGE', + name: '充值设置', + value: 'recharge' + }, + { + key: 'RECOMMENDED', + name: '商品推荐设置', + value: 'recommended' + }, + { + key: 'CUSTOMER', + name: '商城客服设置', + value: 'customer' + } +]) diff --git a/common/enum/sharp/ActiveStatus.js b/common/enum/sharp/ActiveStatus.js new file mode 100755 index 0000000..de89022 --- /dev/null +++ b/common/enum/sharp/ActiveStatus.js @@ -0,0 +1,11 @@ +import Enum from '../enum' + +/** + * 枚举类:整点秒杀-活动会场状态 + * ActiveStatusEnum + */ +export default new Enum([ + { key: 'STATE_BEGIN', name: '已开始', value: 10 }, + { key: 'STATE_SOON', name: '即将开始', value: 20 }, + { key: 'STATE_NOTICE', name: '预告', value: 30 } +]) diff --git a/common/enum/sharp/GoodsStatus.js b/common/enum/sharp/GoodsStatus.js new file mode 100755 index 0000000..f5eac32 --- /dev/null +++ b/common/enum/sharp/GoodsStatus.js @@ -0,0 +1,11 @@ +import Enum from '../enum' + +/** + * 枚举类:整点秒杀-活动商品状态 + * GoodsStatusEnum + */ +export default new Enum([ + { key: 'STATE_BEGIN', name: '已开始', value: 10 }, + { key: 'STATE_SOON', name: '未开始', value: 20 }, + { key: 'STATE_END', name: '已结束', value: 30 } +]) diff --git a/common/enum/sharp/index.js b/common/enum/sharp/index.js new file mode 100755 index 0000000..9a98bdb --- /dev/null +++ b/common/enum/sharp/index.js @@ -0,0 +1,4 @@ +import ActiveStatusEnum from './ActiveStatus' +import GoodsStatusEnum from './GoodsStatus' + +export { ActiveStatusEnum, GoodsStatusEnum } diff --git a/common/enum/store/page/category/Style.js b/common/enum/store/page/category/Style.js new file mode 100755 index 0000000..c33c486 --- /dev/null +++ b/common/enum/store/page/category/Style.js @@ -0,0 +1,12 @@ +import Enum from '../../../enum' + +/** + * 枚举类:地址类型 + * PageCategoryStyleEnum + */ +export default new Enum([ + { key: 'ONE_LEVEL_BIG', name: '一级分类[大图]', value: 10 }, + { key: 'ONE_LEVEL_SMALL', name: '一级分类[小图]', value: 11 }, + { key: 'TWO_LEVEL', name: '二级分类', value: 20 }, + { key: 'COMMODITY', name: '一级分类+商品', value: 30 } +]) diff --git a/common/enum/store/page/category/index.js b/common/enum/store/page/category/index.js new file mode 100755 index 0000000..bf350e1 --- /dev/null +++ b/common/enum/store/page/category/index.js @@ -0,0 +1,3 @@ +import PageCategoryStyleEnum from './Style' + +export { PageCategoryStyleEnum } diff --git a/common/model/Region.js b/common/model/Region.js new file mode 100755 index 0000000..a495513 --- /dev/null +++ b/common/model/Region.js @@ -0,0 +1,57 @@ +import * as Api from '@/api/region' +import storage from '@/utils/storage' + +const REGION_TREE = 'region_tree' + +/** + * 商品分类 model类 + * RegionModel + */ +export default { + + // 从服务端获取全部地区数据(树状) + getTreeDataFromApi () { + return new Promise((resolve, reject) => { + Api.tree().then(result => resolve(result.data.list)) + }) + }, + + // 获取所有地区(树状) + getTreeData () { + return new Promise((resolve, reject) => { + // 判断缓存中是否存在 + const data = storage.get(REGION_TREE) + // 从服务端获取全部地区数据 + if (data) { + resolve(data) + } else { + this.getTreeDataFromApi().then(list => { + // 缓存24小时 + storage.set(REGION_TREE, list, 24 * 60 * 60) + resolve(list) + }) + } + }) + }, + + // 获取所有地区的总数 + getCitysCount () { + return new Promise((resolve, reject) => { + // 获取所有地区(树状) + this.getTreeData().then(data => { + const cityIds = [] + // 遍历省份 + for (const pidx in data) { + const province = data[pidx] + // 遍历城市 + for (const cidx in province.city) { + const cityItem = province.city[cidx] + cityIds.push(cityItem.id) + } + } + resolve(cityIds.length) + }) + }) + } + +} diff --git a/common/model/Setting.js b/common/model/Setting.js new file mode 100755 index 0000000..c32be2a --- /dev/null +++ b/common/model/Setting.js @@ -0,0 +1,99 @@ +import store from '@/store' +import Config from '@/core/config' +import storage from '@/utils/storage' +import * as SettingApi from '@/api/setting' +import SettingKeyEnum from '@/common/enum/setting/Key' +import platform from '@/core/platform' + +const CACHE_KEY = 'Setting' +const OTHER = '_other' + +// 写入缓存, 到期时间10分钟 +const setStorage = (data) => { + const expireTime = 10 * 60 + storage.set(CACHE_KEY, data, expireTime) +} + +// 获取缓存中的数据 +const getStorage = () => { + return storage.get(CACHE_KEY) +} + +// 获取后端接口商城设置 (最新) +const getApiData = () => { + return new Promise((resolve, reject) => { + SettingApi.data() + .then(result => { + resolve(result.data.setting) + }) + }) +} + +/** + * 获取商城设置 + * 有缓存的情况下返回缓存, 没有缓存从后端api获取 + * @param {bool} isCache 是否从缓存中获取 [优点不用每次请求后端api 缺点后台更新设置后需等待时效性] + */ +const data = isCache => { + if (isCache == undefined) { + isCache = Config.get('enabledSettingCache') + } + return new Promise((resolve, reject) => { + const cacheData = getStorage() + if (isCache && cacheData) { + resolve(cacheData) + } else { + getApiData() + .then(data => { + setStorage(data) + resolve(data) + }) + } + }) +} + +// 获取商城设置(指定项) +const item = (key, isCache) => { + return new Promise((resolve, reject) => { + data(isCache).then(setting => resolve(setting[key])) + }) +} + +// 获取H5端访问地址 +const h5Url = (isCache = false) => { + return new Promise((resolve, reject) => { + data(isCache) + .then(setting => { + const h5Url = setting[OTHER]['h5Url'] + resolve(h5Url) + }) + }) +} + +// 设置全局自定义主题 +const setAppTheme = () => { + return new Promise((resolve, reject) => { + item(SettingKeyEnum.APP_THEME.value, false) + .then(appTheme => { + store.dispatch('SetAppTheme', appTheme) + resolve() + }) + }) +} + +// 是否显示客服按钮 (微信小程序客服只有在微信小程序端显示) +const isShowCustomerBtn = async () => { + const setting = await item(SettingKeyEnum.CUSTOMER.value, true) + if (!setting.enabled) { + return false + } + return setting.provider === 'wxqykf' || (setting.provider === 'mpwxkf' && platform === 'MP-WEIXIN') +} + +export default { + data, + item, + h5Url, + setAppTheme, + isShowCustomerBtn +} diff --git a/common/model/dealer/Setting.js b/common/model/dealer/Setting.js new file mode 100755 index 0000000..0d043e1 --- /dev/null +++ b/common/model/dealer/Setting.js @@ -0,0 +1,58 @@ +import * as SettingApi from '@/api/dealer/setting' +import storage from '@/utils/storage' + +const CACHE_KEY = 'Dealer-Setting' + +// 写入缓存, 到期时间30分钟 +const setStorage = (data) => { + const expireTime = 30 * 60 + storage.set(CACHE_KEY, data, expireTime) +} + +// 获取缓存中的数据 +const getStorage = () => { + return storage.get(CACHE_KEY) +} + +// 获取后端接口商城设置 (最新) +const getApiData = () => { + return new Promise((resolve, reject) => { + SettingApi.data() + .then(result => { + resolve(result.data.setting) + }) + }) +} + +/** + * 获取商城设置 + * 有缓存的情况下返回缓存, 没有缓存从后端api获取 + * @param {bool} isCache 是否从缓存中获取 + */ +const data = (isCache = false) => { + return new Promise((resolve, reject) => { + const cacheData = getStorage() + if (isCache && cacheData) { + resolve(cacheData) + } else { + getApiData().then(data => { + setStorage(data) + resolve(data) + }) + } + }) +} + +// 获取商城设置(指定项) +const item = (key, isCache = false) => { + return new Promise((resolve, reject) => { + data(isCache).then(setting => { + resolve(setting[key]) + }) + }) +} + +export default { + data, + item +} diff --git a/common/model/groupon/Setting.js b/common/model/groupon/Setting.js new file mode 100755 index 0000000..db7c284 --- /dev/null +++ b/common/model/groupon/Setting.js @@ -0,0 +1,52 @@ +import Config from '@/core/config' +import * as SettingApi from '@/api/groupon/setting' +import storage from '@/utils/storage' + +const CACHE_KEY = 'Groupon-Setting' + +// 写入缓存, 到期时间30分钟 +const setStorage = (data) => { + const expireTime = 30 * 60 + storage.set(CACHE_KEY, data, expireTime) +} + +// 获取缓存中的数据 +const getStorage = () => { + return storage.get(CACHE_KEY) +} + +// 获取后端接口商城设置 (最新) +const getApiData = () => { + return new Promise((resolve, reject) => { + SettingApi.data() + .then(result => { + resolve(result.data.setting) + }) + }) +} + +/** + * 获取商城设置 + * 有缓存的情况下返回缓存, 没有缓存从后端api获取 + * @param {bool} isCache 是否从缓存中获取 + */ +const data = (isCache = false) => { + if (isCache == undefined) { + isCache = Config.get('enabledSettingCache') + } + return new Promise((resolve, reject) => { + const cacheData = getStorage() + if (isCache && cacheData) { + resolve(cacheData) + } else { + getApiData().then(data => { + setStorage(data) + resolve(data) + }) + } + }) +} + +export default { + data +} diff --git a/components/add-cart-btn/index.vue b/components/add-cart-btn/index.vue new file mode 100755 index 0000000..3b73663 --- /dev/null +++ b/components/add-cart-btn/index.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/components/add-cart-popup/index.vue b/components/add-cart-popup/index.vue new file mode 100755 index 0000000..46ae2a8 --- /dev/null +++ b/components/add-cart-popup/index.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/components/avatar-image/index.vue b/components/avatar-image/index.vue new file mode 100755 index 0000000..f16e91b --- /dev/null +++ b/components/avatar-image/index.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/components/countdown/index.vue b/components/countdown/index.vue new file mode 100755 index 0000000..ce4208e --- /dev/null +++ b/components/countdown/index.vue @@ -0,0 +1,183 @@ + + + + + diff --git a/components/customer-btn/index.vue b/components/customer-btn/index.vue new file mode 100755 index 0000000..2a4b1e3 --- /dev/null +++ b/components/customer-btn/index.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/components/empty/index.vue b/components/empty/index.vue new file mode 100755 index 0000000..df7fa66 --- /dev/null +++ b/components/empty/index.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/components/goods-poster-popup/index.vue b/components/goods-poster-popup/index.vue new file mode 100755 index 0000000..71f5a6e --- /dev/null +++ b/components/goods-poster-popup/index.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/components/goods-sku-popup/index.vue b/components/goods-sku-popup/index.vue new file mode 100755 index 0000000..4969133 --- /dev/null +++ b/components/goods-sku-popup/index.vue @@ -0,0 +1,1367 @@ + + + + + diff --git a/components/goods-sku-popup/number-box/index.vue b/components/goods-sku-popup/number-box/index.vue new file mode 100755 index 0000000..ab8d9aa --- /dev/null +++ b/components/goods-sku-popup/number-box/index.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/components/jyf-parser/jyf-parser.vue b/components/jyf-parser/jyf-parser.vue new file mode 100755 index 0000000..2af1369 --- /dev/null +++ b/components/jyf-parser/jyf-parser.vue @@ -0,0 +1,645 @@ + + + + + diff --git a/components/jyf-parser/libs/CssHandler.js b/components/jyf-parser/libs/CssHandler.js new file mode 100755 index 0000000..75c6015 --- /dev/null +++ b/components/jyf-parser/libs/CssHandler.js @@ -0,0 +1,100 @@ +const cfg = require('./config.js'), + isLetter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + +function CssHandler(tagStyle) { + var styles = Object.assign(Object.create(null), cfg.userAgentStyles); + for (var item in tagStyle) + styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item]; + this.styles = styles; +} +CssHandler.prototype.getStyle = function(data) { + this.styles = new parser(data, this.styles).parse(); +} +CssHandler.prototype.match = function(name, attrs) { + var tmp, matched = (tmp = this.styles[name]) ? tmp + ';' : ''; + if (attrs.class) { + var items = attrs.class.split(' '); + for (var i = 0, item; item = items[i]; i++) + if (tmp = this.styles['.' + item]) + matched += tmp + ';'; + } + if (tmp = this.styles['#' + attrs.id]) + matched += tmp + ';'; + return matched; +} +module.exports = CssHandler; + +function parser(data, init) { + this.data = data; + this.floor = 0; + this.i = 0; + this.list = []; + this.res = init; + this.state = this.Space; +} +parser.prototype.parse = function() { + for (var c; c = this.data[this.i]; this.i++) + this.state(c); + return this.res; +} +parser.prototype.section = function() { + return this.data.substring(this.start, this.i); +} +// 状态机 +parser.prototype.Space = function(c) { + if (c == '.' || c == '#' || isLetter(c)) { + this.start = this.i; + this.state = this.Name; + } else if (c == '/' && this.data[this.i + 1] == '*') + this.Comment(); + else if (!cfg.blankChar[c] && c != ';') + this.state = this.Ignore; +} +parser.prototype.Comment = function() { + this.i = this.data.indexOf('*/', this.i) + 1; + if (!this.i) this.i = this.data.length; + this.state = this.Space; +} +parser.prototype.Ignore = function(c) { + if (c == '{') this.floor++; + else if (c == '}' && !--this.floor) { + this.list = []; + this.state = this.Space; + } +} +parser.prototype.Name = function(c) { + if (cfg.blankChar[c]) { + this.list.push(this.section()); + this.state = this.NameSpace; + } else if (c == '{') { + this.list.push(this.section()); + this.Content(); + } else if (c == ',') { + this.list.push(this.section()); + this.Comma(); + } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') + this.state = this.Ignore; +} +parser.prototype.NameSpace = function(c) { + if (c == '{') this.Content(); + else if (c == ',') this.Comma(); + else if (!cfg.blankChar[c]) this.state = this.Ignore; +} +parser.prototype.Comma = function() { + while (cfg.blankChar[this.data[++this.i]]); + if (this.data[this.i] == '{') this.Content(); + else { + this.start = this.i--; + this.state = this.Name; + } +} +parser.prototype.Content = function() { + this.start = ++this.i; + if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length; + var content = this.section(); + for (var i = 0, item; item = this.list[i++];) + if (this.res[item]) this.res[item] += ';' + content; + else this.res[item] = content; + this.list = []; + this.state = this.Space; +} diff --git a/components/jyf-parser/libs/MpHtmlParser.js b/components/jyf-parser/libs/MpHtmlParser.js new file mode 100755 index 0000000..aeb0fc3 --- /dev/null +++ b/components/jyf-parser/libs/MpHtmlParser.js @@ -0,0 +1,580 @@ +/** + * html 解析器 + * @tutorial https://github.com/jin-yufeng/Parser + * @version 20201029 + * @author JinYufeng + * @listens MIT + */ +const cfg = require('./config.js'), + blankChar = cfg.blankChar, + CssHandler = require('./CssHandler.js'), + windowWidth = uni.getSystemInfoSync().windowWidth; +var emoji; + +function MpHtmlParser(data, options = {}) { + this.attrs = {}; + this.CssHandler = new CssHandler(options.tagStyle, windowWidth); + this.data = data; + this.domain = options.domain; + this.DOM = []; + this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0; + options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http'; + this.options = options; + this.state = this.Text; + this.STACK = []; + // 工具函数 + this.bubble = () => { + for (var i = this.STACK.length, item; item = this.STACK[--i];) { + if (cfg.richOnlyTags[item.name]) return false; + item.c = 1; + } + return true; + } + this.decode = (val, amp) => { + var i = -1, + j, en; + while (1) { + if ((i = val.indexOf('&', i + 1)) == -1) break; + if ((j = val.indexOf(';', i + 2)) == -1) break; + if (val[i + 1] == '#') { + en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j)); + if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1); + } else { + en = val.substring(i + 1, j); + if (cfg.entities[en] || en == amp) + val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1); + } + } + return val; + } + this.getUrl = url => { + if (url[0] == '/') { + if (url[1] == '/') url = this.options.prot + ':' + url; + else if (this.domain) url = this.domain + url; + } else if (this.domain && url.indexOf('data:') != 0 && !url.includes('://')) + url = this.domain + '/' + url; + return url; + } + this.isClose = () => this.data[this.i] == '>' || (this.data[this.i] == '/' && this.data[this.i + 1] == '>'); + this.section = () => this.data.substring(this.start, this.i); + this.parent = () => this.STACK[this.STACK.length - 1]; + this.siblings = () => this.STACK.length ? this.parent().children : this.DOM; +} +MpHtmlParser.prototype.parse = function() { + if (emoji) this.data = emoji.parseEmoji(this.data); + for (var c; c = this.data[this.i]; this.i++) + this.state(c); + if (this.state == this.Text) this.setText(); + while (this.STACK.length) this.popNode(this.STACK.pop()); + return this.DOM; +} +// 设置属性 +MpHtmlParser.prototype.setAttr = function() { + var name = this.attrName.toLowerCase(), + val = this.attrVal; + if (cfg.boolAttrs[name]) this.attrs[name] = 'T'; + else if (val) { + if (name == 'src' || (name == 'data-src' && !this.attrs.src)) this.attrs.src = this.getUrl(this.decode(val, 'amp')); + else if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp'); + else if (name.substr(0, 5) != 'data-') this.attrs[name] = val; + } + this.attrVal = ''; + while (blankChar[this.data[this.i]]) this.i++; + if (this.isClose()) this.setNode(); + else { + this.start = this.i; + this.state = this.AttrName; + } +} +// 设置文本节点 +MpHtmlParser.prototype.setText = function() { + var back, text = this.section(); + if (!text) return; + text = (cfg.onText && cfg.onText(text, () => back = true)) || text; + if (back) { + this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i); + let j = this.start + text.length; + for (this.i = this.start; this.i < j; this.i++) this.state(this.data[this.i]); + return; + } + if (!this.pre) { + // 合并空白符 + var flag, tmp = []; + for (let i = text.length, c; c = text[--i];) + if (!blankChar[c]) { + tmp.unshift(c); + if (!flag) flag = 1; + } else { + if (tmp[0] != ' ') tmp.unshift(' '); + if (c == '\n' && flag == void 0) flag = 0; + } + if (flag == 0) return; + text = tmp.join(''); + } + this.siblings().push({ + type: 'text', + text: this.decode(text) + }); +} +// 设置元素节点 +MpHtmlParser.prototype.setNode = function() { + var node = { + name: this.tagName.toLowerCase(), + attrs: this.attrs + }, + close = cfg.selfClosingTags[node.name]; + if (this.options.nodes.length) node.type = 'node'; + this.attrs = {}; + if (!cfg.ignoreTags[node.name]) { + // 处理属性 + var attrs = node.attrs, + style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''), + styleObj = {}; + if (attrs.id) { + if (this.options.compress & 1) attrs.id = void 0; + else if (this.options.useAnchor) this.bubble(); + } + if ((this.options.compress & 2) && attrs.class) attrs.class = void 0; + switch (node.name) { + case 'a': + case 'ad': // #ifdef APP-PLUS + case 'iframe': + // #endif + this.bubble(); + break; + case 'font': + if (attrs.color) { + styleObj['color'] = attrs.color; + attrs.color = void 0; + } + if (attrs.face) { + styleObj['font-family'] = attrs.face; + attrs.face = void 0; + } + if (attrs.size) { + var size = parseInt(attrs.size); + if (size < 1) size = 1; + else if (size > 7) size = 7; + var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']; + styleObj['font-size'] = map[size - 1]; + attrs.size = void 0; + } + break; + case 'embed': + // #ifndef APP-PLUS + var src = node.attrs.src || '', + type = node.attrs.type || ''; + if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8')) + node.name = 'video'; + else if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes( + '.aac')) + node.name = 'audio'; + else break; + if (node.attrs.autostart) + node.attrs.autoplay = 'T'; + node.attrs.controls = 'T'; + // #endif + // #ifdef APP-PLUS + this.bubble(); + break; + // #endif + case 'video': + case 'audio': + if (!attrs.id) attrs.id = node.name + (++this[`${node.name}Num`]); + else this[`${node.name}Num`]++; + if (node.name == 'video') { + if (this.videoNum > 3) + node.lazyLoad = 1; + if (attrs.width) { + styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px'); + attrs.width = void 0; + } + if (attrs.height) { + styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px'); + attrs.height = void 0; + } + } + if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T'; + attrs.source = []; + if (attrs.src) { + attrs.source.push(attrs.src); + attrs.src = void 0; + } + this.bubble(); + break; + case 'td': + case 'th': + if (attrs.colspan || attrs.rowspan) + for (var k = this.STACK.length, item; item = this.STACK[--k];) + if (item.name == 'table') { + item.flag = 1; + break; + } + } + if (attrs.align) { + if (node.name == 'table') { + if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto'; + else styleObj['float'] = attrs.align; + } else styleObj['text-align'] = attrs.align; + attrs.align = void 0; + } + // 压缩 style + var styles = style.split(';'); + style = ''; + for (var i = 0, len = styles.length; i < len; i++) { + var info = styles[i].split(':'); + if (info.length < 2) continue; + let key = info[0].trim().toLowerCase(), + value = info.slice(1).join(':').trim(); + if (value[0] == '-' || value.includes('safe')) + style += `;${key}:${value}`; + else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) + styleObj[key] = value; + } + if (node.name == 'img') { + if (attrs.src && !attrs.ignore) { + if (this.bubble()) + attrs.i = (this.imgNum++).toString(); + else attrs.ignore = 'T'; + } + if (attrs.ignore) { + style += ';-webkit-touch-callout:none'; + styleObj['max-width'] = '100%'; + } + var width; + if (styleObj.width) width = styleObj.width; + else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : parseFloat(attrs.width) + 'px'; + if (width) { + styleObj.width = width; + attrs.width = '100%'; + if (parseInt(width) > windowWidth) { + styleObj.height = ''; + if (attrs.height) attrs.height = void 0; + } + } + if (styleObj.height) { + attrs.height = styleObj.height; + styleObj.height = ''; + } else if (attrs.height && !attrs.height.includes('%')) + attrs.height = parseFloat(attrs.height) + 'px'; + } + for (var key in styleObj) { + var value = styleObj[key]; + if (!value) continue; + if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1; + // 填充链接 + if (value.includes('url')) { + var j = value.indexOf('('); + if (j++ != -1) { + while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) j++; + value = value.substr(0, j) + this.getUrl(value.substr(j)); + } + } + // 转换 rpx + else if (value.includes('rpx')) + value = value.replace(/[0-9.]+\s*rpx/g, $ => parseFloat($) * windowWidth / 750 + 'px'); + else if (key == 'white-space' && value.includes('pre') && !close) + this.pre = node.pre = true; + style += `;${key}:${value}`; + } + style = style.substr(1); + if (style) attrs.style = style; + if (!close) { + node.children = []; + if (node.name == 'pre' && cfg.highlight) { + this.remove(node); + this.pre = node.pre = true; + } + this.siblings().push(node); + this.STACK.push(node); + } else if (!cfg.filter || cfg.filter(node, this) != false) + this.siblings().push(node); + } else { + if (!close) this.remove(node); + else if (node.name == 'source') { + var parent = this.parent(); + if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) + parent.attrs.source.push(node.attrs.src); + } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href; + } + if (this.data[this.i] == '/') this.i++; + this.start = this.i + 1; + this.state = this.Text; +} +// 移除标签 +MpHtmlParser.prototype.remove = function(node) { + var name = node.name, + j = this.i; + // 处理 svg + var handleSvg = () => { + var src = this.data.substring(j, this.i + 1); + node.attrs.xmlns = 'http://www.w3.org/2000/svg'; + for (var key in node.attrs) { + if (key == 'viewbox') src = ` viewBox="${node.attrs.viewbox}"` + src; + else if (key != 'style') src = ` ${key}="${node.attrs[key]}"` + src; + } + src = '', this.i)) == -1) this.i = this.data.length; + if (name == 'svg') handleSvg(); + return; + } + } +} +// 节点出栈处理 +MpHtmlParser.prototype.popNode = function(node) { + // 空白符处理 + if (node.pre) { + node.pre = this.pre = void 0; + for (let i = this.STACK.length; i--;) + if (this.STACK[i].pre) + this.pre = true; + } + var siblings = this.siblings(), + len = siblings.length, + childs = node.children; + if (node.name == 'head' || (cfg.filter && cfg.filter(node, this) == false)) + return siblings.pop(); + var attrs = node.attrs; + // 替换一些标签名 + if (cfg.blockTags[node.name]) node.name = 'div'; + else if (!cfg.trustTags[node.name]) node.name = 'span'; + // 处理列表 + if (node.c && (node.name == 'ul' || node.name == 'ol')) { + if ((node.attrs.style || '').includes('list-style:none')) { + for (let i = 0, child; child = childs[i++];) + if (child.name == 'li') + child.name = 'div'; + } else if (node.name == 'ul') { + var floor = 1; + for (let i = this.STACK.length; i--;) + if (this.STACK[i].name == 'ul') floor++; + if (floor != 1) + for (let i = childs.length; i--;) + childs[i].floor = floor; + } else { + for (let i = 0, num = 1, child; child = childs[i++];) + if (child.name == 'li') { + child.type = 'ol'; + child.num = ((num, type) => { + if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26); + if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26); + if (type == 'i' || type == 'I') { + num = (num - 1) % 99 + 1; + var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'], + ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'], + res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || ''); + if (type == 'i') return res.toLowerCase(); + return res; + } + return num; + })(num++, attrs.type) + '.'; + } + } + } + // 处理表格 + if (node.name == 'table') { + var padding = parseFloat(attrs.cellpadding), + spacing = parseFloat(attrs.cellspacing), + border = parseFloat(attrs.border); + if (node.c) { + if (isNaN(padding)) padding = 2; + if (isNaN(spacing)) spacing = 2; + } + if (border) attrs.style = `border:${border}px solid gray;${attrs.style || ''}`; + if (node.flag && node.c) { + // 有 colspan 或 rowspan 且含有链接的表格转为 grid 布局实现 + attrs.style = `${attrs.style || ''};${spacing ? `;grid-gap:${spacing}px` : ';border-left:0;border-top:0'}`; + var row = 1, + col = 1, + colNum, + trs = [], + children = [], + map = {}; + (function f(ns) { + for (var i = 0; i < ns.length; i++) { + if (ns[i].name == 'tr') trs.push(ns[i]); + else f(ns[i].children || []); + } + })(node.children) + for (let i = 0; i < trs.length; i++) { + for (let j = 0, td; td = trs[i].children[j]; j++) { + if (td.name == 'td' || td.name == 'th') { + while (map[row + '.' + col]) col++; + var cell = { + name: 'div', + c: 1, + attrs: { + style: (td.attrs.style || '') + (border ? `;border:${border}px solid gray` + (spacing ? '' : + ';border-right:0;border-bottom:0') : '') + (padding ? `;padding:${padding}px` : '') + }, + children: td.children + } + if (td.attrs.colspan) { + cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + parseInt(td.attrs.colspan)); + if (!td.attrs.rowspan) cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + 1); + col += parseInt(td.attrs.colspan) - 1; + } + if (td.attrs.rowspan) { + cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + parseInt(td.attrs.rowspan)); + if (!td.attrs.colspan) cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + 1); + for (var k = 1; k < td.attrs.rowspan; k++) map[(row + k) + '.' + col] = 1; + } + children.push(cell); + col++; + } + } + if (!colNum) { + colNum = col - 1; + attrs.style += `;grid-template-columns:repeat(${colNum},auto)` + } + col = 1; + row++; + } + node.children = children; + } else { + attrs.style = `border-spacing:${spacing}px;${attrs.style || ''}`; + if (border || padding) + (function f(ns) { + for (var i = 0, n; n = ns[i]; i++) { + if (n.name == 'th' || n.name == 'td') { + if (border) n.attrs.style = `border:${border}px solid gray;${n.attrs.style || ''}`; + if (padding) n.attrs.style = `padding:${padding}px;${n.attrs.style || ''}`; + } else f(n.children || []); + } + })(childs) + } + if (this.options.autoscroll) { + var table = Object.assign({}, node); + node.name = 'div'; + node.attrs = { + style: 'overflow:scroll' + } + node.children = [table]; + } + } + this.CssHandler.pop && this.CssHandler.pop(node); + // 自动压缩 + if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') + siblings[len - 1] = childs[0]; +} +// 状态机 +MpHtmlParser.prototype.Text = function(c) { + if (c == '<') { + var next = this.data[this.i + 1], + isLetter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + if (isLetter(next)) { + this.setText(); + this.start = this.i + 1; + this.state = this.TagName; + } else if (next == '/') { + this.setText(); + if (isLetter(this.data[++this.i + 1])) { + this.start = this.i + 1; + this.state = this.EndTag; + } else this.Comment(); + } else if (next == '!' || next == '?') { + this.setText(); + this.Comment(); + } + } +} +MpHtmlParser.prototype.Comment = function() { + var key; + if (this.data.substring(this.i + 2, this.i + 4) == '--') key = '-->'; + else if (this.data.substring(this.i + 2, this.i + 9) == '[CDATA[') key = ']]>'; + else key = '>'; + if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length; + else this.i += key.length - 1; + this.start = this.i + 1; + this.state = this.Text; +} +MpHtmlParser.prototype.TagName = function(c) { + if (blankChar[c]) { + this.tagName = this.section(); + while (blankChar[this.data[this.i]]) this.i++; + if (this.isClose()) this.setNode(); + else { + this.start = this.i; + this.state = this.AttrName; + } + } else if (this.isClose()) { + this.tagName = this.section(); + this.setNode(); + } +} +MpHtmlParser.prototype.AttrName = function(c) { + if (c == '=' || blankChar[c] || this.isClose()) { + this.attrName = this.section(); + if (blankChar[c]) + while (blankChar[this.data[++this.i]]); + if (this.data[this.i] == '=') { + while (blankChar[this.data[++this.i]]); + this.start = this.i--; + this.state = this.AttrValue; + } else this.setAttr(); + } +} +MpHtmlParser.prototype.AttrValue = function(c) { + if (c == '"' || c == "'") { + this.start++; + if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length; + this.attrVal = this.section(); + this.i++; + } else { + for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++); + this.attrVal = this.section(); + } + this.setAttr(); +} +MpHtmlParser.prototype.EndTag = function(c) { + if (blankChar[c] || c == '>' || c == '/') { + var name = this.section().toLowerCase(); + for (var i = this.STACK.length; i--;) + if (this.STACK[i].name == name) break; + if (i != -1) { + var node; + while ((node = this.STACK.pop()).name != name) this.popNode(node); + this.popNode(node); + } else if (name == 'p' || name == 'br') + this.siblings().push({ + name, + attrs: {} + }); + this.i = this.data.indexOf('>', this.i); + this.start = this.i + 1; + if (this.i == -1) this.i = this.data.length; + else this.state = this.Text; + } +} +module.exports = MpHtmlParser; diff --git a/components/jyf-parser/libs/config.js b/components/jyf-parser/libs/config.js new file mode 100755 index 0000000..1f772e9 --- /dev/null +++ b/components/jyf-parser/libs/config.js @@ -0,0 +1,80 @@ +/* 配置文件 */ +var cfg = { + // 出错占位图 + errorImg: null, + // 过滤器函数 + filter: null, + // 代码高亮函数 + highlight: null, + // 文本处理函数 + onText: null, + // 实体编码列表 + entities: { + quot: '"', + apos: "'", + semi: ';', + nbsp: '\xA0', + ensp: '\u2002', + emsp: '\u2003', + ndash: '–', + mdash: '—', + middot: '·', + lsquo: '‘', + rsquo: '’', + ldquo: '“', + rdquo: '”', + bull: '•', + hellip: '…' + }, + blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'), + boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'), + // 块级标签,将被转为 div + blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'), + // 将被移除的标签 + ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'), + // 只能被 rich-text 显示的标签 + richOnlyTags: makeMap('a,colgroup,fieldset,legend'), + // 自闭合的标签 + selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'), + // 信任的标签 + trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'), + // 默认的标签样式 + userAgentStyles: { + address: 'font-style:italic', + big: 'display:inline;font-size:1.2em', + blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px', + caption: 'display:table-caption;text-align:center', + center: 'text-align:center', + cite: 'font-style:italic', + dd: 'margin-left:40px', + mark: 'background-color:yellow', + pre: 'font-family:monospace;white-space:pre;overflow:scroll', + s: 'text-decoration:line-through', + small: 'display:inline;font-size:0.8em', + u: 'text-decoration:underline' + } +} + +function makeMap(str) { + var map = Object.create(null), + list = str.split(','); + for (var i = list.length; i--;) + map[list[i]] = true; + return map; +} + +// #ifdef MP-WEIXIN +if (wx.canIUse('editor')) { + cfg.blockTags.pre = void 0; + cfg.ignoreTags.rp = true; + Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby')); + Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby')); +} +// #endif + +// #ifdef APP-PLUS +cfg.ignoreTags.iframe = void 0; +Object.assign(cfg.trustTags, makeMap('embed,iframe')); +// #endif + +module.exports = cfg; diff --git a/components/jyf-parser/libs/handler.wxs b/components/jyf-parser/libs/handler.wxs new file mode 100755 index 0000000..d3b1aaa --- /dev/null +++ b/components/jyf-parser/libs/handler.wxs @@ -0,0 +1,22 @@ +var inline = { + abbr: 1, + b: 1, + big: 1, + code: 1, + del: 1, + em: 1, + i: 1, + ins: 1, + label: 1, + q: 1, + small: 1, + span: 1, + strong: 1, + sub: 1, + sup: 1 +} +module.exports = { + use: function(item) { + return !item.c && !inline[item.name] && (item.attrs.style || '').indexOf('display:inline') == -1 + } +} diff --git a/components/jyf-parser/libs/trees.vue b/components/jyf-parser/libs/trees.vue new file mode 100755 index 0000000..9c4d68b --- /dev/null +++ b/components/jyf-parser/libs/trees.vue @@ -0,0 +1,506 @@ +