Repository: lilishop/lilishop-uniapp
Branch: master
Commit: 919af44fda34
Files: 480
Total size: 2.7 MB
Directory structure:
gitextract_99qg1lqg/
├── .gitignore
├── App.vue
├── CustomStoryboard/
│ └── LaunchScreen.storyboard
├── LICENSE
├── README.md
├── androidPrivacy.json
├── api/
│ ├── address.js
│ ├── after-sale.js
│ ├── article.js
│ ├── common.js
│ ├── connect.js
│ ├── entry.js
│ ├── goods.js
│ ├── home.js
│ ├── im.js
│ ├── login.js
│ ├── members.js
│ ├── message.js
│ ├── order.js
│ ├── passport.js
│ ├── point.js
│ ├── promotions.js
│ ├── safe.js
│ ├── store.js
│ └── trade.js
├── components/
│ ├── Sansnn-uQRCode/
│ │ └── uqrcode.js
│ ├── default-page/
│ │ └── default-page.vue
│ ├── m-airbtn/
│ │ └── index.vue
│ ├── m-buy/
│ │ ├── README.md
│ │ ├── goods.vue
│ │ ├── popup.js
│ │ └── popup.scss
│ ├── m-canvas/
│ │ ├── README.md
│ │ └── index.vue
│ ├── m-city/
│ │ └── m-city.vue
│ ├── m-goods-list/
│ │ ├── README.md
│ │ ├── base-list.vue
│ │ ├── common.vue
│ │ ├── list.vue
│ │ └── promotion.vue
│ ├── m-goods-recommend/
│ │ ├── README.md
│ │ └── index.vue
│ ├── m-placard/
│ │ └── index.vue
│ ├── m-search-revision/
│ │ └── m-search-revision.vue
│ ├── m-share/
│ │ ├── index.vue
│ │ └── mp-share.scss
│ ├── m-take-down-sale-goods/
│ │ └── index.vue
│ ├── popups/
│ │ └── popups.vue
│ ├── uni-load-more/
│ │ └── uni-load-more.vue
│ ├── uni-number-box.vue
│ ├── uniMap.vue
│ ├── verification/
│ │ ├── animation.css
│ │ ├── icon.css
│ │ └── verification.vue
│ └── verify-code/
│ └── verify-code.vue
├── config/
│ ├── api.js
│ └── config.js
├── hybrid/
│ └── html/
│ ├── advertise/
│ │ └── advertise.html
│ ├── css/
│ │ └── advertise.css
│ ├── error.html
│ └── js/
│ └── webView.js
├── js_sdk/
│ ├── amap-wx.130.js
│ ├── h5-copy/
│ │ └── h5-copy.js
│ ├── lili-pay/
│ │ └── wx-pay.js
│ ├── t-jwt/
│ │ └── jwt.js
│ ├── u-draw-poster/
│ │ ├── draw-poster.d.ts
│ │ ├── draw-poster.js
│ │ ├── extends/
│ │ │ ├── create-from-list/
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── create-gcanvas/
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── draw-function/
│ │ │ │ ├── draw-image-fit.d.ts
│ │ │ │ ├── draw-image-fit.js
│ │ │ │ ├── draw-image.d.ts
│ │ │ │ ├── draw-image.js
│ │ │ │ ├── draw-round-image.d.ts
│ │ │ │ ├── draw-round-image.js
│ │ │ │ ├── fill-round-rect.d.ts
│ │ │ │ ├── fill-round-rect.js
│ │ │ │ ├── fill-warp-text.d.ts
│ │ │ │ ├── fill-warp-text.js
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.js
│ │ │ │ ├── round-rect.d.ts
│ │ │ │ ├── round-rect.js
│ │ │ │ ├── stroke-round-rect.d.ts
│ │ │ │ └── stroke-round-rect.js
│ │ │ ├── draw-painter/
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ └── draw-qr-code/
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ ├── uQRCode.d.ts
│ │ │ └── uQRCode.js
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── package.json
│ │ └── utils/
│ │ ├── global.d.ts
│ │ ├── global.js
│ │ ├── interface.d.ts
│ │ ├── interface.js
│ │ ├── object-sizing.d.ts
│ │ ├── object-sizing.js
│ │ ├── utils.d.ts
│ │ ├── utils.js
│ │ ├── wx-utils.d.ts
│ │ └── wx-utils.js
│ └── wa-permission/
│ └── permission.js
├── lib/
│ └── request/
│ ├── adapters/
│ │ └── index.js
│ ├── core/
│ │ ├── InterceptorManager.js
│ │ ├── Request.js
│ │ ├── buildFullPath.js
│ │ ├── defaults.js
│ │ ├── dispatchRequest.js
│ │ ├── mergeConfig.js
│ │ └── settle.js
│ ├── helpers/
│ │ ├── buildURL.js
│ │ ├── combineURLs.js
│ │ └── isAbsoluteURL.js
│ ├── index.js
│ └── utils.js
├── main.js
├── manifest.json
├── pages/
│ ├── cart/
│ │ ├── coupon/
│ │ │ ├── couponCenter.vue
│ │ │ ├── couponDetail.vue
│ │ │ ├── index.vue
│ │ │ └── myCoupon.vue
│ │ └── payment/
│ │ ├── error.vue
│ │ ├── payOrder.vue
│ │ ├── shareOrderGoods.vue
│ │ └── success.vue
│ ├── floor/
│ │ └── empty.vue
│ ├── mine/
│ │ ├── address/
│ │ │ ├── add.vue
│ │ │ ├── address.scss
│ │ │ ├── address.vue
│ │ │ ├── addressManage.vue
│ │ │ └── storeAddress.vue
│ │ ├── deposit/
│ │ │ ├── index.vue
│ │ │ ├── info.vue
│ │ │ ├── operation.vue
│ │ │ ├── recharge.vue
│ │ │ ├── style.scss
│ │ │ └── withdrawal.vue
│ │ ├── distribution/
│ │ │ ├── achievement.vue
│ │ │ ├── auth.vue
│ │ │ ├── history.vue
│ │ │ ├── home.vue
│ │ │ ├── join.vue
│ │ │ ├── list.vue
│ │ │ └── withdrawal.vue
│ │ ├── help/
│ │ │ └── tips.vue
│ │ ├── im/
│ │ │ ├── index-app.scss
│ │ │ ├── index.vue
│ │ │ ├── list.vue
│ │ │ └── socket.js
│ │ ├── msgTips/
│ │ │ ├── main.vue
│ │ │ ├── packageMsg/
│ │ │ │ ├── index.vue
│ │ │ │ └── logisticsDetail.vue
│ │ │ ├── serviceMsg/
│ │ │ │ └── index.vue
│ │ │ └── sysMsg/
│ │ │ └── index.vue
│ │ ├── myCollect.vue
│ │ ├── myTracks.vue
│ │ ├── point/
│ │ │ └── myPoint.vue
│ │ ├── set/
│ │ │ ├── editionIntro.vue
│ │ │ ├── feedBack.vue
│ │ │ ├── personMsg.vue
│ │ │ ├── securityCenter/
│ │ │ │ ├── bindMobile.vue
│ │ │ │ ├── editLoginPassword.vue
│ │ │ │ ├── editPassword.vue
│ │ │ │ ├── faceLogin.vue
│ │ │ │ ├── fingerLogin.vue
│ │ │ │ ├── securityCenter.vue
│ │ │ │ └── updatePwdTab.vue
│ │ │ ├── setUp.vue
│ │ │ └── versionFunctionList.vue
│ │ └── signIn.vue
│ ├── navigation/
│ │ └── search/
│ │ ├── search.scss
│ │ └── searchPage.vue
│ ├── order/
│ │ ├── afterSales/
│ │ │ ├── afterSales.vue
│ │ │ ├── afterSalesDetail.vue
│ │ │ ├── afterSalesDetailExpress.vue
│ │ │ ├── afterSalesSelect.vue
│ │ │ ├── applyDetail.vue
│ │ │ ├── applyProgress.vue
│ │ │ └── applySuccess.vue
│ │ ├── complain/
│ │ │ ├── complain.vue
│ │ │ ├── complainInfo.vue
│ │ │ └── complainList.vue
│ │ ├── deliverDetail.vue
│ │ ├── evaluate/
│ │ │ ├── evaluateDetail.vue
│ │ │ ├── myEvaluate.vue
│ │ │ └── releaseEvaluate.vue
│ │ ├── fillorder.vue
│ │ ├── goods.scss
│ │ ├── invoice/
│ │ │ ├── invoiceDetail.vue
│ │ │ └── setInvoice.vue
│ │ ├── myOrder.vue
│ │ └── orderDetail.vue
│ ├── passport/
│ │ ├── article.vue
│ │ ├── entry/
│ │ │ └── seller/
│ │ │ ├── control.vue
│ │ │ ├── entry.scss
│ │ │ ├── index.vue
│ │ │ ├── step1.vue
│ │ │ ├── step2.vue
│ │ │ └── step3.vue
│ │ ├── login.scss
│ │ ├── login.vue
│ │ ├── scannerCodeLoginConfirm.vue
│ │ ├── wechatH5Login.vue
│ │ └── wechatMPLogin.vue
│ ├── product/
│ │ ├── askList.vue
│ │ ├── comment.vue
│ │ ├── customerservice/
│ │ │ └── index.vue
│ │ ├── goods.vue
│ │ ├── licencePhoto.vue
│ │ ├── product/
│ │ │ ├── evaluation/
│ │ │ │ └── -evaluation.vue
│ │ │ ├── goods/
│ │ │ │ ├── -goods-desc.vue
│ │ │ │ ├── -goods-intro.vue
│ │ │ │ ├── -goods-recommend.vue
│ │ │ │ └── -goods-swiper.vue
│ │ │ ├── mp-goods.scss
│ │ │ ├── popup/
│ │ │ │ ├── address.vue
│ │ │ │ └── popup.js
│ │ │ ├── product.scss
│ │ │ ├── promotion/
│ │ │ │ ├── -promotion-assemble-list.vue
│ │ │ │ ├── -promotion-assemble-promotions.vue
│ │ │ │ ├── -promotion-coupon.vue
│ │ │ │ ├── -promotion-details.vue
│ │ │ │ ├── -promotion.vue
│ │ │ │ ├── README.md
│ │ │ │ ├── group.scss
│ │ │ │ └── promotion_type.js
│ │ │ ├── shop/
│ │ │ │ └── -shop.vue
│ │ │ └── style.scss
│ │ ├── shopList.vue
│ │ ├── shopPage.vue
│ │ └── shopPageGoods.vue
│ ├── promotion/
│ │ ├── bargain/
│ │ │ ├── detail.vue
│ │ │ ├── list.vue
│ │ │ └── log.vue
│ │ ├── joinGroup.vue
│ │ ├── lives.vue
│ │ ├── point/
│ │ │ ├── detail.vue
│ │ │ ├── pointList.vue
│ │ │ └── user.vue
│ │ ├── seckill.vue
│ │ └── style.scss
│ └── tabbar/
│ ├── cart/
│ │ ├── cart.scss
│ │ ├── cartList.vue
│ │ └── mp-carui.scss
│ ├── category/
│ │ └── category.vue
│ ├── home/
│ │ ├── index.vue
│ │ ├── template/
│ │ │ ├── advertising.scss
│ │ │ ├── fetch_coupon.vue
│ │ │ ├── tpl.js
│ │ │ ├── tpl.scss
│ │ │ ├── tpl_banner.vue
│ │ │ ├── tpl_flex_five.vue
│ │ │ ├── tpl_flex_four.vue
│ │ │ ├── tpl_flex_one.vue
│ │ │ ├── tpl_flex_three.vue
│ │ │ ├── tpl_flex_two.vue
│ │ │ ├── tpl_goods.vue
│ │ │ ├── tpl_group.vue
│ │ │ ├── tpl_hot_zone.vue
│ │ │ ├── tpl_integral.vue
│ │ │ ├── tpl_join_group.vue
│ │ │ ├── tpl_left_one_right_two.vue
│ │ │ ├── tpl_left_two_right_one.vue
│ │ │ ├── tpl_menu.vue
│ │ │ ├── tpl_notice.vue
│ │ │ ├── tpl_promotions_detail.vue
│ │ │ ├── tpl_search.vue
│ │ │ ├── tpl_spike.vue
│ │ │ ├── tpl_text_picture.vue
│ │ │ ├── tpl_title.vue
│ │ │ ├── tpl_top_one_bottom_two.vue
│ │ │ └── tpl_top_two_bottom_one.vue
│ │ ├── title.vue
│ │ ├── views.vue
│ │ └── web-view.vue
│ ├── screen/
│ │ └── fullScreen.vue
│ ├── special/
│ │ └── special.vue
│ └── user/
│ ├── my.vue
│ ├── similarGoods.vue
│ └── utils/
│ └── tool.vue
├── pages.json
├── plugins/
│ └── APPUpdate/
│ ├── APPUpdate.md
│ └── index.js
├── pushGithub.sh
├── store/
│ └── index.js
├── uni.scss
├── uni_modules/
│ ├── Sansnn-uQRCode/
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ ├── changelog.md
│ │ ├── common/
│ │ │ ├── cache.js
│ │ │ ├── queue.js
│ │ │ └── types/
│ │ │ ├── cache.d.ts
│ │ │ └── queue.d.ts
│ │ ├── components/
│ │ │ ├── u-qrcode/
│ │ │ │ └── u-qrcode.vue
│ │ │ └── uqrcode/
│ │ │ └── uqrcode.vue
│ │ ├── js_sdk/
│ │ │ ├── gcanvas/
│ │ │ │ ├── bridge/
│ │ │ │ │ └── bridge-weex.js
│ │ │ │ ├── context-2d/
│ │ │ │ │ ├── FillStyleLinearGradient.js
│ │ │ │ │ ├── FillStylePattern.js
│ │ │ │ │ ├── FillStyleRadialGradient.js
│ │ │ │ │ └── RenderingContext.js
│ │ │ │ ├── context-webgl/
│ │ │ │ │ ├── ActiveInfo.js
│ │ │ │ │ ├── Buffer.js
│ │ │ │ │ ├── Framebuffer.js
│ │ │ │ │ ├── GLenum.js
│ │ │ │ │ ├── GLmethod.js
│ │ │ │ │ ├── GLtype.js
│ │ │ │ │ ├── Program.js
│ │ │ │ │ ├── Renderbuffer.js
│ │ │ │ │ ├── RenderingContext.js
│ │ │ │ │ ├── Shader.js
│ │ │ │ │ ├── ShaderPrecisionFormat.js
│ │ │ │ │ ├── Texture.js
│ │ │ │ │ ├── UniformLocation.js
│ │ │ │ │ └── classUtils.js
│ │ │ │ ├── env/
│ │ │ │ │ ├── canvas.js
│ │ │ │ │ ├── image.js
│ │ │ │ │ └── tool.js
│ │ │ │ └── index.js
│ │ │ └── uqrcode/
│ │ │ └── uqrcode.js
│ │ └── package.json
│ └── okingtz-cropper/
│ ├── changelog.md
│ ├── components/
│ │ └── okingtz-cropper/
│ │ └── okingtz-cropper.vue
│ ├── package.json
│ └── readme.md
├── utils/
│ ├── Foundation.js
│ ├── RegExp.js
│ ├── emojis.js
│ ├── filters.js
│ ├── md5.js
│ ├── request.js
│ ├── socket_service.js
│ ├── storage.js
│ ├── tools.js
│ └── uuid.modified.js
├── uview-ui/
│ ├── LICENSE
│ ├── components/
│ │ ├── u-action-sheet/
│ │ │ └── u-action-sheet.vue
│ │ ├── u-alert-tips/
│ │ │ └── u-alert-tips.vue
│ │ ├── u-avatar/
│ │ │ └── u-avatar.vue
│ │ ├── u-avatar-cropper/
│ │ │ ├── u-avatar-cropper.vue
│ │ │ └── weCropper.js
│ │ ├── u-back-top/
│ │ │ └── u-back-top.vue
│ │ ├── u-badge/
│ │ │ └── u-badge.vue
│ │ ├── u-button/
│ │ │ └── u-button.vue
│ │ ├── u-calendar/
│ │ │ └── u-calendar.vue
│ │ ├── u-car-keyboard/
│ │ │ └── u-car-keyboard.vue
│ │ ├── u-card/
│ │ │ └── u-card.vue
│ │ ├── u-cell-group/
│ │ │ └── u-cell-group.vue
│ │ ├── u-cell-item/
│ │ │ └── u-cell-item.vue
│ │ ├── u-checkbox/
│ │ │ └── u-checkbox.vue
│ │ ├── u-checkbox-group/
│ │ │ └── u-checkbox-group.vue
│ │ ├── u-circle-progress/
│ │ │ └── u-circle-progress.vue
│ │ ├── u-col/
│ │ │ └── u-col.vue
│ │ ├── u-collapse/
│ │ │ └── u-collapse.vue
│ │ ├── u-collapse-item/
│ │ │ └── u-collapse-item.vue
│ │ ├── u-column-notice/
│ │ │ └── u-column-notice.vue
│ │ ├── u-count-down/
│ │ │ └── u-count-down.vue
│ │ ├── u-count-to/
│ │ │ └── u-count-to.vue
│ │ ├── u-divider/
│ │ │ └── u-divider.vue
│ │ ├── u-dropdown-list/
│ │ │ └── u-dropdown-list.vue
│ │ ├── u-empty/
│ │ │ └── u-empty.vue
│ │ ├── u-field/
│ │ │ └── u-field.vue
│ │ ├── u-form/
│ │ │ └── u-form.vue
│ │ ├── u-form-item/
│ │ │ └── u-form-item.vue
│ │ ├── u-full-screen/
│ │ │ └── u-full-screen.vue
│ │ ├── u-gap/
│ │ │ └── u-gap.vue
│ │ ├── u-grid/
│ │ │ └── u-grid.vue
│ │ ├── u-grid-item/
│ │ │ └── u-grid-item.vue
│ │ ├── u-icon/
│ │ │ └── u-icon.vue
│ │ ├── u-image/
│ │ │ └── u-image.vue
│ │ ├── u-index-anchor/
│ │ │ └── u-index-anchor.vue
│ │ ├── u-index-list/
│ │ │ └── u-index-list.vue
│ │ ├── u-input/
│ │ │ └── u-input.vue
│ │ ├── u-keyboard/
│ │ │ └── u-keyboard.vue
│ │ ├── u-lazy-load/
│ │ │ └── u-lazy-load.vue
│ │ ├── u-line/
│ │ │ └── u-line.vue
│ │ ├── u-line-progress/
│ │ │ └── u-line-progress.vue
│ │ ├── u-link/
│ │ │ └── u-link.vue
│ │ ├── u-loading/
│ │ │ └── u-loading.vue
│ │ ├── u-loading-page/
│ │ │ └── u-loading-page.vue
│ │ ├── u-loadmore/
│ │ │ └── u-loadmore.vue
│ │ ├── u-mask/
│ │ │ └── u-mask.vue
│ │ ├── u-message-input/
│ │ │ └── u-message-input.vue
│ │ ├── u-modal/
│ │ │ └── u-modal.vue
│ │ ├── u-navbar/
│ │ │ └── u-navbar.vue
│ │ ├── u-no-network/
│ │ │ └── u-no-network.vue
│ │ ├── u-notice-bar/
│ │ │ └── u-notice-bar.vue
│ │ ├── u-number-box/
│ │ │ └── u-number-box.vue
│ │ ├── u-number-keyboard/
│ │ │ └── u-number-keyboard.vue
│ │ ├── u-parse/
│ │ │ ├── libs/
│ │ │ │ ├── CssHandler.js
│ │ │ │ ├── MpHtmlParser.js
│ │ │ │ ├── config.js
│ │ │ │ ├── handler.wxs
│ │ │ │ └── trees.vue
│ │ │ └── u-parse.vue
│ │ ├── u-picker/
│ │ │ └── u-picker.vue
│ │ ├── u-popup/
│ │ │ └── u-popup.vue
│ │ ├── u-radio/
│ │ │ └── u-radio.vue
│ │ ├── u-radio-group/
│ │ │ └── u-radio-group.vue
│ │ ├── u-rate/
│ │ │ └── u-rate.vue
│ │ ├── u-read-more/
│ │ │ └── u-read-more.vue
│ │ ├── u-row/
│ │ │ └── u-row.vue
│ │ ├── u-row-notice/
│ │ │ └── u-row-notice.vue
│ │ ├── u-search/
│ │ │ └── u-search.vue
│ │ ├── u-section/
│ │ │ └── u-section.vue
│ │ ├── u-select/
│ │ │ └── u-select.vue
│ │ ├── u-skeleton/
│ │ │ └── u-skeleton.vue
│ │ ├── u-slider/
│ │ │ └── u-slider.vue
│ │ ├── u-steps/
│ │ │ └── u-steps.vue
│ │ ├── u-sticky/
│ │ │ └── u-sticky.vue
│ │ ├── u-subsection/
│ │ │ └── u-subsection.vue
│ │ ├── u-swipe-action/
│ │ │ └── u-swipe-action.vue
│ │ ├── u-swiper/
│ │ │ └── u-swiper.vue
│ │ ├── u-switch/
│ │ │ └── u-switch.vue
│ │ ├── u-tabbar/
│ │ │ └── u-tabbar.vue
│ │ ├── u-table/
│ │ │ └── u-table.vue
│ │ ├── u-tabs/
│ │ │ └── u-tabs.vue
│ │ ├── u-tabs-swiper/
│ │ │ └── u-tabs-swiper.vue
│ │ ├── u-tag/
│ │ │ └── u-tag.vue
│ │ ├── u-td/
│ │ │ └── u-td.vue
│ │ ├── u-th/
│ │ │ └── u-th.vue
│ │ ├── u-time-line/
│ │ │ └── u-time-line.vue
│ │ ├── u-time-line-item/
│ │ │ └── u-time-line-item.vue
│ │ ├── u-toast/
│ │ │ └── u-toast.vue
│ │ ├── u-top-tips/
│ │ │ └── u-top-tips.vue
│ │ ├── u-tr/
│ │ │ └── u-tr.vue
│ │ ├── u-upload/
│ │ │ └── u-upload.vue
│ │ ├── u-verification-code/
│ │ │ └── u-verification-code.vue
│ │ └── u-waterfall/
│ │ └── u-waterfall.vue
│ ├── iconfont.css
│ ├── index.js
│ ├── index.scss
│ ├── libs/
│ │ ├── config/
│ │ │ ├── config.js
│ │ │ └── zIndex.js
│ │ ├── css/
│ │ │ ├── color.scss
│ │ │ ├── common.scss
│ │ │ ├── style.components.scss
│ │ │ ├── style.h5.scss
│ │ │ ├── style.mp.scss
│ │ │ ├── style.nvue.scss
│ │ │ └── style.vue.scss
│ │ ├── function/
│ │ │ ├── $parent.js
│ │ │ ├── addUnit.js
│ │ │ ├── bem.js
│ │ │ ├── color.js
│ │ │ ├── colorGradient.js
│ │ │ ├── debounce.js
│ │ │ ├── deepClone.js
│ │ │ ├── deepMerge.js
│ │ │ ├── getParent.js
│ │ │ ├── guid.js
│ │ │ ├── md5.js
│ │ │ ├── queryParams.js
│ │ │ ├── random.js
│ │ │ ├── randomArray.js
│ │ │ ├── route.js
│ │ │ ├── sys.js
│ │ │ ├── test.js
│ │ │ ├── throttle.js
│ │ │ ├── timeFormat.js
│ │ │ ├── timeFrom.js
│ │ │ ├── toast.js
│ │ │ ├── trim.js
│ │ │ └── type2icon.js
│ │ ├── mixin/
│ │ │ ├── mixin.js
│ │ │ └── mpShare.js
│ │ ├── request/
│ │ │ └── index.js
│ │ ├── store/
│ │ │ └── index.js
│ │ └── util/
│ │ ├── area.js
│ │ ├── async-validator.js
│ │ ├── city.js
│ │ ├── emitter.js
│ │ └── province.js
│ ├── package.json
│ └── theme.scss
└── vue.config.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# OSX
#
.DS_Store
node_modules/
#Intellij idea
.idea/
/idea/
.vscode/
/unpackage/
.hbuilderx/launch.json
.project.config.json
.project.private.config.json
================================================
FILE: App.vue
================================================
================================================
FILE: CustomStoryboard/LaunchScreen.storyboard
================================================
================================================
FILE: LICENSE
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
.
================================================
FILE: README.md
================================================
## Lilishop B2B2C 商城系统
### 商城介绍
**官网**:https://pickmall.cn
**更多 README**:https://gitee.com/beijing_hongye_huicheng/lilishop/blob/master/README.md
**演示站点**:https://m-b2b2c.pickmall.cn/ 账号:13011111111 验证码:111111
**商城 小程序/公众号/APP**:扫描二维码

## lilishop-uniapp如何在本地h5和微信小程序中运行
https://www.bilibili.com/video/BV17K8EemEh2/
## lilishop-uniapp如何打包h5到服务器
https://www.bilibili.com/video/BV1CX87exE64/
### 快速开始
#### 阅读文档
`uni-app` https://uniapp.dcloud.net.cn/api/
`vue2` https://v2.cn.vuejs.org/
`uView v1` https://v1.uviewui.com/
#### 环境
在开发之前保证本地安装了以下软件
`hbulider` https://www.dcloud.io/hbuilderx.html
### 技术栈
本项目技术栈为 `uni-app` + `scss` + `ES2015` + `uView` 提前学习和了解这些知识将帮助你更好地上手我们的项目。
### 安装
1. 克隆项目到本地
```shell
git clone https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
```
2. 从`hbulider`中打开项目
```shell
直接将项目拖进hbulider中点击运行即可
```
### 目录结构
```
├── api // 接口
├── components // 组件
├── config // 配置文件
├── CustomStartPage // 打包配置的开屏页
├── CustomStoryboard // ios自定义storyboard启动页
├── hybrid // 广告配置页
├── js_sdk // 封装的js_sdk
├── lib // 封装的部分方法
├── pages // 页面
├── plugins // 插件
├── static // 静态资源
├── store // vuex
├── utils // 工具类
├── uview-ui // uview
├── App.vue // 入口页面
├── main.js // 入口文件
├── manifest.json // hbulider配置文件
├── pages.json // 路由配置文件
├── uni.scss // 全局样式
└── vue.config.js // vue配置文件
```
### 运行
#### 运行在 h5
在`hbulider`中点击`运行`->`运行到浏览器`->`选择自己的浏览器九号`
#### 运行在微信小程序
1.需要保证本地要有`微信开发者工具` https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html
2.在`hbulider`中点击`运行`->`运行到小程序模拟器`->`微信开发者工具` 运行的时候需要配置小程序的`appid`,配置完成后即可运行
#### 运行 APP
##### 运行在安卓
在`hbulider`中点击`运行`->`运行到手机或模拟器`->`选择运行到安卓APP基座`
##### 运行在 IOS
在`hbulider`中点击`运行`->`运行到手机或模拟器`->`选择运行到IOS基座`
### 项目配置/开发
#### config配置
在根目录`config`下的`config`设置中配置了一些默认的配置,可以根据自己的需求进行修改
```
const name = "lilishop"; //全局商城name
const schemeName = "lilishop"; //唤醒app需要的schemeName
export default {
name: name,
schemeLink: `${schemeName}://`, //唤起app地址
downloadLink: "https://pickmall.cn/download-page/index.html", //下载地址,下载app的地址
shareLink: "https://m-b2b2c.pickmall.cn", //分享地址,也就是在h5中默认的复制地址
appid: "", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
aMapKey: "", //在高德中申请Web服务key
scanAuthNavigation: ["https://m-b2b2c.pickmall.cn/"], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
iosAppId: "id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
logo: "https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址
customerServiceMobile: "13161366885", //客服电话
customerServiceEmail: "lili@lili.com", //客服邮箱
imWebSrc: "https://im.pickmall.cn", //IM地址
baseWsUrl: "wss://im-api.pickmall.cn/lili/webSocket", // IM WS 地址
enableGetClipboard: false, //是否启用粘贴板获取 scanAuthNavigation 中的链接,如果匹配则会跳转到对应页面
enableMiniBarStartUpApp: true, //是否在h5中右侧浮空按钮点击启动app
/**
* 如需更换主题请修改此处以及uni.scss中的全局颜色
*/
mainColor: "#ff3c2a", // 主题色
lightColor: "#ff6b35", // 高亮主题色
aiderLightColor: "#ff9f28", // 辅助高亮颜色
defaultUserPhoto: "/static/missing-face.png", // 默认用户头像
enableFetchMobileLogin: false // 是否启用获取手机号登录 如果微信小程序提示封禁手机号获取权限 可将此选项设置成false作为备用登录方案
};
```
#### 组件
在根目录`components`下的`components`设置中配置了一些默认的组件,可以根据自己的需求进行修改或阅读组件详情代码以及README.md文档
#### 页面
在`pages`文件夹写入或修改页面代码,在`pages.json`中去配置页面路由,具体配置可以参考`pages.json` 或参考uni-app的文档
在微信小程序中默认启用分包操作,如果需要在微信小程序中使用分包,需要在`pages.json`中配置分包路径,具体配置可以参考`pages.json` 或参考uni-app的文档
#### 主题
1.现在`config`中设置主题色
2.在`uni.scss`中设置全局颜色
3.替换项目中一些icon以及图片的颜色
### 常见问题
#### 微信小程序移动端启动报错
小程序直播插件报错,在`manifest`中删除代码。

#### 微信小程序上传文件过大超出 2MB
1.关闭微信小程序,停止微信小程序运行
2.重新点击运行小程序模拟器,在最下方有一个 `运行时是否压缩代码` 勾选并重新运行
3.如果还是提示超出2MB,重新执行1步骤,然后点击`发行`->`小程序`即可
4.以上1-3步骤都不行,可以尝试删除一些自己开发的代码或本地的静态资源图片
#### 微信小程序在开发者工具中可以使用接口在测试版却不行
1.首先保证是否填写`request`合法域名 在微信小程序后台配置
2.需保证接口为https请求
request合法域名基础配置如下
```
https://buyer-api.pickmall.cn
https://common-api.pickmall.cn
https://im-api.pickmall.cn
https://restapi.amap.com
```
socket合法域名
```
wss://im-api.pickmall.cn
```
uploadFile合法域名
```
https://common-api.pickmall.cn
```
downloadFile合法域名
```
https://buyer-api.pickmall.cn
https://common-api.pickmall.cn
https://im-api.pickmall.cn
https://lilishop-oss.oss-cn-beijing.aliyuncs.com
```
#### 如何配置API
在根目录 `config` -> `api` 中配置开发环境以及生产环境 api 接口地址
#### 运行报错
初次运行时候可能因为本地环境缺少编译插件,这个时候一定要注意看报错信息,根据报错信息安装相应的插件即可
#### 如何配置微信小程序appid
在根目录 `manifest.json` 中配置微信小程序appid
#### 微信登录报错
需检查appId是否配置正确,在后台管理中信任登录的`appId`以及`appSecret`是否配置正确
================================================
FILE: androidPrivacy.json
================================================
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : " 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。 你可阅读《服务协议》和《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"second" : {
"title" : "确认提示",
"message" : " 进入应用前,你需先同意《服务协议》和《隐私政策》,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},
"styles" : {
"borderRadius" : "5px"
}
}
================================================
FILE: api/address.js
================================================
/**
* 收货地址相关API
*/
import { http, Method } from "@/utils/request.js";
import api from "@/config/api.js";
/**
* 获取收货地址列表
* @returns {AxiosPromise}
*/
export function getAddressList(pageNumber, pageSize) {
return http.request({
url: "/member/address",
method: Method.GET,
needToken: true,
params: { pageNumber, pageSize },
});
}
/**
* 获取物流公司
*/
export function getLogistics() {
return http.request({
url: "/other/logistics",
method: Method.GET,
needToken: true,
params: { pageNumber: 1, pageSize: 200, disabled: "OPEN" },
});
}
/**
* 通过cityCode获取地区代码
*/
export function getAddressCode(cityCode, townName) {
return http.request({
url: api.common + "/common/region/region",
method: Method.GET,
needToken: true,
params: { cityCode, townName },
});
}
/**
* 添加收货地址
* @param params 地址参数
* @returns {AxiosPromise}
*/
export function addAddress(data) {
return http.request({
url: "/member/address",
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
data: data,
});
}
/**
* 编辑地址
* @param id 地址ID
* @param params 地址参数
* @returns {AxiosPromise}
*/
export function editAddress(params) {
return http.request({
url: `/member/address`,
method: Method.PUT,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
data: params,
});
}
/**
* 删除收货地址
* @param id
*/
export function deleteAddress(id) {
return http.request({
url: `/member/address/delById/${id}`,
method: Method.DELETE,
needToken: true,
});
}
/**
* 根据ID获取会员收件地址
* @param id
*/
export function getAddressDetail(id) {
return http.request({
url: `/member/address/get/${id}`,
method: Method.GET,
loading: false,
needToken: true,
});
}
/**
*
*/
export function getAddressDefault() {
return http.request({
url: `/member/address/get/default`,
method: Method.GET,
loading: false,
needToken: true,
});
}
================================================
FILE: api/after-sale.js
================================================
/**
* 申请售后相关API
*/
import { http, Method } from "@/utils/request.js";
/**
* 获取售后列表
* @param params
* @returns {AxiosPromise}
*/
export function getAfterSale(params) {
return http.request({
url: "after-sales/refunds",
method: Method.GET,
needToken: true,
loading: false,
params,
});
}
/******************* 以下为新方法 ***********************/
/**
* 申请取消订单
* @param params
*/
export function applyCancelOrder(params) {
return http.request({
url: "after-sales/apply/cancel/order",
method: Method.POST,
needToken: true,
params,
});
}
/**
/**
* 获取商家售后收件地址
*/
export function getStoreAfterSaleAddress(sn) {
return http.request({
url: `/order/afterSale/getStoreAfterSaleAddress/${sn}`,
method: Method.GET,
needToken: true,
});
}
/**
* 取消售后
*/
export function cancelAfterSale(afterSaleSn) {
return http.request({
url: `/order/afterSale/cancel/${afterSaleSn}`,
method: Method.POST,
needToken: true,
});
}
/**
* 获取售后服务记录相关数据
* @param params 参数
*/
export function getAfterSaleList(params) {
return http.request({
url: `/order/afterSale/page`,
method: Method.GET,
needToken: true,
params,
});
}
/**
* 查看售后服务详情
* @param sn 售后服务单编号
*/
export function getServiceDetail(sn) {
return http.request({
url: `/order/afterSale/get/${sn}`,
method: Method.GET,
needToken: true,
});
}
/**
* 添加投诉
*/
export function addComplain(params) {
return http.request({
url: `/order/complain`,
method: Method.POST,
needToken: true,
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
data: params,
});
}
/**
* 取消投诉
*/
export function clearComplain(id, params) {
return http.request({
url: `/order/complain/status/${id}`,
method: Method.PUT,
needToken: true,
params,
});
}
/**
* 取消投诉
*/
export function getAfterSaleLog(sn) {
return http.request({
url: `/order/afterSale/get/getAfterSaleLog/${sn}`,
method: Method.GET,
needToken: true,
});
}
/**
* 投诉列表
*/
export function getComplain(params) {
return http.request({
url: `/order/complain`,
method: Method.GET,
needToken: true,
params,
});
}
/**
* 获取申请原因
*/
export function getAfterSaleReason(serviceType) {
return http.request({
url: `/order/afterSale/get/afterSaleReason/${serviceType}`,
method: Method.GET,
needToken: true,
});
}
/**
* 获取取消原因
*/
export function getClearReason() {
return http.request({
url: `/order/afterSale/get/afterSaleReason/CANCEL`,
method: Method.GET,
needToken: true,
});
}
/**
* 获取投诉原因
*/
export function getComplainReason() {
return http.request({
url: `/order/afterSale/get/afterSaleReason/COMPLAIN`,
method: Method.GET,
needToken: true,
});
}
/**
* 获取投诉详情
*/
export function getComplainDetail(id) {
return http.request({
url: `/order/complain/${id}`,
method: Method.GET,
needToken: true,
});
}
/**
* 获取申请售后页面信息
*/
export function getAfterSaleInfo(sn) {
return http.request({
url: `/order/afterSale/applyAfterSaleInfo/${sn}`,
method: Method.GET,
needToken: true,
});
}
/**
* 申请退货服务
* @param params
*/
export function applyReturn(orderItemSn, params) {
return http.request({
url: `/order/afterSale/save/${orderItemSn}`,
method: Method.POST,
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
data: params,
});
}
/**
* 填充物流信息
* @param afterSaleSn 售后服务单号
* @param params 参数信息
*/
export function fillShipInfo(afterSaleSn, params) {
return http.request({
url: `/order/afterSale/delivery/${afterSaleSn}`,
method: Method.POST,
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
data: params,
});
}
// 添加交易投诉对话
export function communication(params) {
return http.request({
url: `/order/complain/communication`,
method: Method.POST,
needToken: true,
params
});
}
================================================
FILE: api/article.js
================================================
/**
* 文章相关API
*/
import {http,Method} from '@/utils/request.js';
import api from '@/config/api.js';
/**
* 获取某个分类的文章列表
* @param category_type
*/
export function getArticleCategory(category_type) {
return http.request({
url: `${api.base}/pages/article-categories`,
method: Method.GET,
params: {category_type},
});
}
/**
* 获取文章详情
* @param type
*/
export function getArticleDetail(type) {
return http.request({
url: `/other/article/get/${type}`,
method: Method.GET,
});
}
/**
* 获取文章详情
* @param type
*/
export function getArticleDetailByType(type) {
return http.request({
url: `/other/article/type/${type}`,
method: Method.GET,
});
}
================================================
FILE: api/common.js
================================================
/**
* 公共API
*/
import { http, Method } from "@/utils/request.js";
import api from "@/config/api.js";
/**
* 获取地区数据
* @param id
*/
export function getRegionsById(id = 0) {
return http.request({
url: `${api.common}/common/region/item/${id}`,
method: Method.GET,
message: false,
});
}
// 获取IM接口前缀
export function getIMDetail() {
return http.request({
url: `${api.common}/IM`,
method: Method.GET,
message: false,
});
}
/**
* 文件上传地址
* @type {string}
*/
export const upload = api.common + "/common/upload/file";
================================================
FILE: api/connect.js
================================================
/**
* 信任登录相关API
*/
import {
http,
Method
} from '@/utils/request.js';
const request = http.request;
/**
* web 第三方登录
* @param {Object} code
*/
export function webConnect(code) {
return http.request({
url: `passport/connect/connect/login/web/${code}`,
method: Method.GET,
needToken: true,
header: {
"clientType": "H5"
}
});
}
export function openIdLogin(params, clientType) {
return http.request({
url: `passport/connect/connect/app/login`,
method: Method.POST,
needToken: true,
data: params,
header: {
"clientType": clientType
}
});
}
/**
* 第三方登录成功 回调接口
*/
export function loginCallback(state) {
return http.request({
url: `passport/connect/connect/result?state=${state}`,
method: Method.GET,
needToken: false
});
}
/**
* 小程序自动登录
* @param params
*/
export function mpAutoLogin(params) {
return http.request({
url: 'passport/connect/miniProgram/auto-login',
method: Method.GET,
params
});
}
================================================
FILE: api/entry.js
================================================
/**
* 入驻类相关api
*/
import { http, Method } from "@/utils/request.js";
// 获取当前用户的代理入驻详情
export function getCompanyDetail(params) {
return http.request({
url: "/store/store/apply",
method: Method.GET,
params,
});
}
// 申请店铺第一步-填写企业信息
export function applyFirst(params) {
return http.request({
url: "/store/store/apply/first",
method: Method.PUT,
params,
});
}
// 申请店铺第二步-填写银行
export function applySecond(params) {
return http.request({
url: "/store/store/apply/second",
method: Method.PUT,
params,
});
}
// 申请店铺第三步-填写银行
export function applyThird(params) {
return http.request({
url: "/store/store/apply/third",
method: Method.PUT,
params,
});
}
================================================
FILE: api/goods.js
================================================
/**
* 商品相关API
*/
import { http, Method } from "@/utils/request.js";
/**
* 从ES中获取相关商品品牌名称,分类名称及属性
*/
export function getGoodsMessage(goodsId) {
return http.request({
url: `/goods/goods/get/${goodsId}`,
method: Method.GET,
});
}
/**
* 从ES中获取相关商品品牌名称,分类名称及属性
*/
export function getGoodsRelated(params) {
return http.request({
url: `/goods/goods/es/related`,
method: Method.GET,
params,
});
}
/**
* 获取商品详情
* @param skuId 商品ID
* @returns {AxiosPromise}
*/
export function getGoods(skuId, goodsId) {
return http.request({
url: `/goods/goods/sku/${goodsId}/${skuId}`,
method: Method.GET,
});
}
/**
* 获取商品分销
* @param distributionId 商品分销ID
*/
export function getGoodsDistribution(distributionId) {
return http.request({
url: `/distribution/distribution/bindingDistribution/${distributionId}`,
method: Method.GET,
});
}
/**
* 获取商品列表
* @param params
* @returns {AxiosPromise}
*/
export function getGoodsList(params) {
return http.request({
url: "/goods/goods/es",
method: Method.GET,
params,
});
}
/**
* 获取上新商品列表
* @param params
* @returns {AxiosPromise}
*/
export function getGoodsListUplog(params) {
return http.request({
url: "goods/search/uplog",
method: Method.GET,
params,
});
}
/**
* 获取标签商品
* @param storeId 卖家id
* @param mark 标签 hot:热卖 new:新品 recommend:推荐
* @param num 获取个数
*/
export function getTagGoods(storeId, mark = "hot", num = 5) {
return http.request({
url: `goods/tags/${mark}/goods`,
method: Method.GET,
loading: false,
params: {
storeId,
mark,
num,
},
});
}
/**
* 获取标签商品
*/
export function getPlateformTagGoods(tag_id) {
return http.request({
url: `goods/tags/byid/${tag_id}`,
method: Method.GET,
loading: false,
});
}
/**
* 获取首页商品分类 左侧列表
* @param parent_id
*/
export function getCategoryList(id) {
return http.request({
url: `/goods/category/get/${id}`,
method: Method.GET,
loading: false,
});
}
/**
* 获取当前会员的分销商信息 可根据分销商信息查询待提现金额以及冻结金额等信息
*/
export function distribution() {
return http.request({
url: `/distribution/distribution`,
method: Method.GET,
});
}
/**
* 申请分销商
*/
export function applyDistribution(params) {
return http.request({
url: `/distribution/distribution`,
method: Method.POST,
params,
});
}
/**
* 分销商提现
*/
export function cash(params) {
return http.request({
url: `/distribution/cash`,
method: Method.POST,
params,
});
}
/**
* 分销商提现历史
*/
export function cashLog(params) {
return http.request({
url: `/distribution/cash`,
method: Method.GET,
params
});
}
/**
* 获取分销商分页订单列表
*/
export function distributionOrderList(params) {
return http.request({
url: `/distribution/distribution/distributionOrder`,
method: Method.GET,
params
});
}
/**
* 获取分销商商品列表
*/
export function distributionGoods(params) {
return http.request({
url: `/distribution/goods`,
method: Method.GET,
params,
});
}
/**
* 选择分销商品 分销商品id
*/
export function checkedDistributionGoods(params) {
return http.request({
url: `/distribution/goods/checked/${params.id}`,
method: Method.GET,
params
});
}
/**
* 获取 小程序码
*/
export function getMpCode(params){
return http.request({
url:`/passport/connect/miniProgram/mp/unlimited`,
method:Method.GET,
params
})
}
/**
* 根据shortlink 获取页面参数
*/
export function getMpScene(id){
return http.request({
url:`/passport/connect/miniProgram/mp/unlimited/scene?id=${id}`,
method:Method.GET,
})
}
================================================
FILE: api/home.js
================================================
import { http, Method } from "@/utils/request.js";
export function toSpecial(data) {
return http.request({
url: `/other/pageData/getSpecial`,
method: Method.GET,
data
});
}
/**
* 专题内容
*/
export function getSpecial(id) {
return http.request({
url: `/other/pageData/get/${id}`,
method: Method.GET,
});
}
/**
* 获取广告图
*/
export function getAdvertisement() {
return http.request({
url: "/advertisement",
method: Method.GET,
});
}
/**
* 获取首页商品分类
* @param parent_id
*/
export function getCategory(parent_id = 0) {
return http.request({
url: `goods/categories/${parent_id}/children`,
method: Method.GET,
loading: false,
});
}
/**
* 获取热门关键词
* @param num
*/
export function getHotKeywords(count) {
return http.request({
url: "/goods/goods/hot-words",
method: Method.GET,
loading: false,
params: { count },
});
}
/**
* 获取楼层数据
* @param client_type
* @param page_type
*/
export function getFloorData(params) {
return http.request({
url: `/other/pageData/getIndex?clientType=H5`,
method: "get",
params
});
}
/**
* 获取店铺楼层数据
*/
export function getFloorStoreData(params) {
return http.request({
url: `/other/pageData?pageClientType=H5`,
method: "get",
params
});
}
/**
* 获取获取首页分类数据
*/
export function getCategoryIndexData(parentId = 0) {
return http.request({
url: `/goods/category/get/${parentId}`,
method: "get",
});
}
================================================
FILE: api/im.js
================================================
import { http,Method } from "@/utils/request.js";
import api from "@/config/api.js";
/**
* 获取聊天详情接口
* @param {*} talkId
* @returns
*/
export function getTalk(talkId) {
return http.request({
url: `${api.im}/talk/${talkId}`,
method: Method.GET,
});
}
/**
* 获取与用户的聊天详情
* @param {*} talkId
* @returns
*/
export function getTalkByUser(userId) {
return http.request({
url: `${api.im}/talk/by/user/${userId}`,
method: Method.GET,
});
}
/**
* 获取聊天列表
* @param {*} talkId
* @returns
*/
export function getTalkList(params) {
return http.request({
url: `${api.im}/talk/list`,
method: Method.GET,
params
});
}
/**
* 获取聊天信息接口
* @param {*} params
* @returns
*/
export function getTalkMessage(params) {
return http.request({
url: `${api.im}/message`,
method: Method.GET,
params
});
}
/**
* 获取聊天信息接口
* @param {*} params
* @returns
*/
export function cleanUnreadMessage(params) {
return http.request({
url: `${api.im}/message/clean/unred`,
method: Method.PUT,
params
});
}
// 从商品页点击 客服 跳转 获取商品详情
export function jumpObtain(skuId, goodsId) {
return http.request({
url: `/goods/goods/sku/${goodsId}/${skuId}`,
method: Method.GET,
});
}
// 清除未读
// /im/message/clean/unred
export function clearmeaager() {
return http.request({
url: `${api.im}/message/clean/unred`,
method: Method.PUT,
});
}
================================================
FILE: api/login.js
================================================
import { http } from "@/utils/request.js";
import api from "@/config/api.js";
/**
* 通过短信重置密码
* @param mobile
*/
export function resetByMobile(params) {
return http.request({
url: `/passport/member/resetByMobile`,
method: "POST",
params,
});
}
/**
* 绑定手机号码
* @param mobile
*/
export function bindMobile(params) {
return http.request({
url: `/passport/member/bindMobile`,
method: "POST",
params,
});
}
//获取自动发券
export function getAutoCoup(){
return http.request({
url:`/promotion/coupon/activity`,
method:"GET",
needToken: true,
});
}
/**
* 账号密码登陆
* @params password
* @params username
*/
export function userLogin(params, clientType){
return http.request({
method: "POST",
url:`/passport/member/userLogin`,
data: params,
header: {
"content-type": "application/x-www-form-urlencoded",
clientType: clientType,
},
})
}
/**
* 发送验证码
* @param mobile
*/
export function sendMobile(mobile,type='LOGIN') {
return http.request({
url: `${api.common}/common/sms/${type}/${mobile}`,
method: "GET",
});
}
/**
* 短信登录
* @param mobile
* @param smsCode
*/
export function smsLogin(params, clientType) {
return http.request({
url: `/passport/member/smsLogin`,
method: "POST",
data: params,
header: {
"content-type": "application/x-www-form-urlencoded",
clientType: clientType,
},
});
}
/**
* 修改密码
* @param newPassword
* @param password
*/
export function modifyPass(params) {
return http.request({
url: `/passport/member/modifyPass`,
method: "PUT",
params,
});
}
/**
* 修改密码
* @param newPassword
* @param password
*/
export function resetPassword(params) {
return http.request({
url: `/passport/member/resetPassword`,
method: "POST",
params,
});
}
/**
* 刷新token
*/
export function refreshTokenFn(refresh_token) {
return http.request({
url: `/passport/member/refresh/${refresh_token}`,
method: "GET",
});
}
// 获取密码状态
export function logout () {
return http.request({
url: '/passport/member/logout',
method: "POST",
needToken: true,
})
}
export function scannerCodeLogin(params){
return http.request({
url: '/passport/member/app_scanner',
method: "POST",
params,
needToken: true,
});
}
export function scannerCodeLoginConfirm(params){
return http.request({
url: '/passport/member/app_confirm',
method: "POST",
params,
needToken: true,
});
}
// 注销用户
export function logoffConfirm() {
return http.request({
url: '/passport/member/cancellation',
method: "PUT",
needToken: true,
})
}
================================================
FILE: api/members.js
================================================
import storage from "@/utils/storage";
import { http, Method } from "@/utils/request.js";
/**
* 意见反馈
*/
export function feedBack(params) {
return http.request({
url: "/other/feedback",
method: Method.POST,
needToken: true,
params,
});
}
// 提现
export function withdrawalApply(params) {
return http.request({
url: "/wallet/wallet/withdrawal",
method: Method.POST,
needToken: true,
params,
});
}
/**
* 支付结果查询
* @param orderType 交易类型,可用值:TRADE,ORDER,RECHARGE
* @param sn 订单编号
*/
export function payCallback(params) {
return http.request({
url: `/payment/cashier/result`,
method: Method.GET,
params,
});
}
// 在线充值
export function recharge(params) {
return http.request({
url: "/trade/recharge",
method: Method.POST,
params,
});
}
/**
* 分页获取预存款充值记录
* @param params
*/
export function getUserRecharge(params) {
return http.request({
url: "/member/recharge",
method: Method.GET,
needToken: true,
params,
});
}
/**
* 分页获取预存款充值记录
* @param params
*/
export function getWalletLog(params) {
return http.request({
url: "/wallet/log",
method: Method.GET,
needToken: true,
params,
});
}
/**
* 获取优惠券列表
* @param params
*/
export function getCoupons(params) {
return http.request({
url: "/promotion/coupon/getCoupons",
method: Method.GET,
needToken: true,
params,
});
}
/**
* 领取优惠券
* @param couponId
*/
export function receiveCoupons(couponId) {
return http.request({
url: `/promotion/coupon/receive/${couponId}`,
method: Method.GET,
needToken: true,
});
}
/**
* 获取积分明细数据
* @param params
* @returns {AxiosPromise}
*/
export function getPointsData(params) {
return http.request({
url: "member/memberPointsHistory/getByPage",
method: Method.GET,
needToken: true,
params,
});
}
/**
* 获取我的评论列表
* @param params
* @returns {AxiosPromise}
*/
export function getComments(params) {
return http.request({
url: "/member/evaluation",
method: Method.GET,
needToken: true,
params,
});
}
/**
* 获取当前会员的浏览数量是多少
* @param params
* @returns {AxiosPromise}
*/
export function getFootprintNum(params) {
return http.request({
url: "/member/footprint/getFootprintNum",
method: Method.GET,
needToken: true,
params,
});
}
/**
* 订单评论
* @param params
*/
export function commentsMemberOrder(params) {
return http.request({
url: "/member/evaluation",
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
data: params,
});
}
/**
* 追加评论
* @param params
*/
export function AppendCommentsOrder(params) {
return http.request({
url: "members/comments/additional",
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
data: params,
});
}
// TODO 第一版本暂未实现此功能
/**
* 商品咨询
* @param goods_id
* @param ask_content
*/
export function consultating(goods_id, ask_content, anonymous) {
return http.request({
url: "members/asks",
method: Method.POST,
header: { "content-type": "application/x-www-form-urlencoded" },
needToken: true,
data: {
goods_id,
ask_content,
anonymous,
},
});
}
/**
* 获取商品收藏
* @param params
* @returns {AxiosPromise}
*/
export function getGoodsCollection(params, type) {
return http.request({
url: `/member/collection/${type}`,
method: Method.GET,
needToken: true,
loading: false,
message: false,
params,
});
}
/**
* 获取商品收藏
* @param params
* @returns {AxiosPromise}
*/
export function getStoreCollection(params, type) {
return http.request({
url: `/member/storeCollection/${type}`,
method: Method.GET,
needToken: true,
loading: false,
message: false,
params,
});
}
/**
* 收藏商品
* @returns {AxiosPromise}
*/
export function collectionGoods(type, id) {
return http.request({
url: `/member/collection/add/${type}/${id}`,
method: Method.POST,
needToken: true,
});
}
/**
* 删除商品收藏
* @param ids 收藏ID【集合或单个商品ID】
* @returns {AxiosPromise}
*/
export function deleteGoodsCollection(ids) {
if (Array.isArray(ids)) {
ids = ids.join(",");
}
return http.request({
url: `/member/collection/delete/GOODS/${ids}`,
method: Method.DELETE,
needToken: true,
});
}
/**
* 删除店铺收藏
* @param store_id
*/
export function deleteStoreCollection(store_id) {
return http.request({
url: `/member/storeCollection/delete/STORE/${store_id}`,
method: Method.DELETE,
needToken: true,
});
}
/**
* 获取商品是否被收藏
* @param good_id
*/
export function getGoodsIsCollect(type, good_id) {
return http.request({
url: `/member/collection/isCollection/${type}/${good_id}`,
method: Method.GET,
needToken: true,
loading: false,
});
}
/**
* 获取商品是否被收藏
* @param good_id
*/
export function getStoreIsCollect(type, store_id) {
return http.request({
url: `/member/storeCollection/isCollection/${type}/${store_id}`,
method: Method.GET,
needToken: true,
loading: false,
});
}
/**
* 收藏店铺
* @param store_id 店铺ID
* @returns {AxiosPromise}
*/
export function collectionStore(store_id) {
return http.request({
url: `/member/storeCollection/add/STORE/${store_id}`,
method: Method.POST,
needToken: true,
});
}
/**
* 获取当前登录的用户信息
* @returns {AxiosPromise}
*/
export function getUserInfo() {
return http.request({
url: "/passport/member",
method: Method.GET,
needToken: true,
});
}
/**
* 获取当前用户的预存款
* @returns {AxiosPromise}
*/
export function getUserWallet() {
return http.request({
url: "/wallet/wallet",
method: Method.GET,
needToken: true,
});
}
/**
* 保存用户信息
* @param params
* @returns {AxiosPromise}
*/
export function saveUserInfo(params) {
return http.request({
url: "/passport/member/editOwn",
method: Method.PUT,
header: { "content-type": "application/x-www-form-urlencoded" },
needToken: true,
data: params,
});
}
/**
* 添加发票
* @param params
*/
export function addReceipt(params) {
return http.request({
url: "/trade/receipt",
method: Method.POST,
needToken: true,
params,
});
}
/**
* 获取商品评论列表
* @param goodsId
* @param params
*/
export function getGoodsComments(goodsId, params) {
return http.request({
url: `/member/evaluation/${goodsId}/goodsEvaluation`,
method: Method.GET,
loading: false,
params,
});
}
/**
* 获取商品评论数量统计
* @param goodsId
*/
export function getGoodsCommentsCount(goodsId) {
return http.request({
url: `/member/evaluation/${goodsId}/evaluationNumber`,
method: Method.GET,
loading: false,
});
}
/**
* 获取未读消息数量信息
*/
export function getNoReadMessageNum() {
return http.request({
url: `members/member-nocice-logs/number`,
method: Method.GET,
needToken: true,
});
}
/**
* 我的足迹列表
* @param pageNumber pageSize
*
*/
export function myTrackList(params) {
return http.request({
url: `/member/footprint`,
method: Method.GET,
needToken: true,
params,
});
}
/**
* 根据id删除会员足迹
* @param id
*/
export function deleteHistoryListId(ids) {
return http.request({
url: `/member/footprint/delByIds/${ids}`,
method: Method.DELETE,
needToken: true,
});
}
/**
* 获取当前会员优惠券列表
* @param
*/
export function getMemberCoupons(data) {
return http.request({
url: `/promotion/coupon/getCoupons`,
method: Method.GET,
needToken: true,
params: data,
});
}
/**
* 获取当前会员可使用的优惠券数量
*
*/
export function getCouponsNum() {
return http.request({
url: `/promotion/coupon/getCouponsNum`,
method: Method.GET,
needToken: true,
});
}
/**
* 获取会员积分VO
* @param
*/
export function getMemberPointSum() {
return http.request({
url: `member/memberPointsHistory/getMemberPointsHistoryVO`,
method: Method.GET,
});
}
/**
* 获取会员积分VO
* @param
*/
export function withdrawalSettingVO() {
return http.request({
url: `/wallet/wallet/withdrawalSettingVO`,
method: Method.GET,
needToken: true,
});
}
================================================
FILE: api/message.js
================================================
/**
* 站内消息相关API
*/
import {http,Method} from '@/utils/request.js';
const request = http.request
import api from '@/config/api.js';
/**
* 获取微信消息订阅
* @param params
* @returns {AxiosPromise}
*/
export function getWeChatMpMessage() {
return http.request({
url: 'passport/connect/miniProgram/subscribeMessage',
method: Method.GET
});
}
/**
* 获取消息列表
* @param params
* @returns {AxiosPromise}
*/
export function getMessages(params) {
params = params || {};
params.pageSize = params.pageSize || 5;
return http.request({
url: 'members/member-nocice-logs',
method: Method.GET,
needToken: true,
params,
});
}
/**
* 标记消息为已读
* @param ids
*/
export function messageMarkAsRead(ids) {
return http.request({
url: `/message/member/${ids}`,
method: Method.PUT,
needToken: true,
});
}
//读取站内消息
export function editMessages(message_id,params){
return http.request({
url:`/message/member/${message_id}`,
method:Method.PUT,
needToken:true,
params
})
}
//获取站内消息
export function messages(params) {
return http.request({
url: "/message/member",
method: Method.GET,
needToken: true,
params,
});
}
/**
* 获取物流消息列表
* @param params
* @returns {AxiosPromise}
*/
export function getLogisticsMessages(params) {
params = params || {};
params.pageSize = params.pageSize || 5;
return http.request({
url: 'trade/logistics/message',
method: Method.GET,
needToken: true,
params,
});
}
/**
* @param appType
* @returns {AxiosPromise}
*
*/
export function getAppVersion(appType) {
return http.request({
url: `/other/appVersion/${appType}`,
method: Method.GET,
type:"manager"
});
}
/**
* @param appType
* @returns {AxiosPromise}
*
*/
export function getAppVersionList(type,data) {
return http.request({
url: `/other/appVersion/appVersion/${type}`,
method: Method.GET,
type:"manager",
data
});
}
================================================
FILE: api/order.js
================================================
/**
* 订单相关API
*/
import { http, Method } from "@/utils/request.js";
/**
* 选择发票
* @param params
*/
export function getReceipt(params) {
return http.request({
url: "/trade/carts/select/receipt",
method: Method.GET,
needToken: true,
params,
});
}
/**
* 选择发票
* @param id
*/
export function getReceiptDetail(id) {
return http.request({
url: `/trade/receipt/${id}`,
method: Method.GET,
needToken: true,
});
}
/**
* 选择配送方式
* @param params
*/
export function selectedShipMethod(params) {
return http.request({
url: "/trade/carts/shippingMethod",
method: Method.GET,
needToken: true,
params,
});
}
/**
* 获取订单列表
* @param params
*/
export function getOrderList(params) {
return http.request({
url: "/order/order",
method: Method.GET,
needToken: true,
params,
});
}
/**
* 获取订单详情
* @param orderSn 订单编号
*/
export function getOrderDetail(orderSn) {
return http.request({
url: `/order/order/${orderSn}`,
method: Method.GET,
needToken: true,
});
}
/**
* 取消订单
* @param orderSn 订单编号
* @param reason 取消原因
*/
export function cancelOrder(orderSn, reason) {
return http.request({
url: `/order/order/${orderSn}/cancel`,
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
data: reason,
});
}
/**
* 确认收货
* @param orderSn 订单编号
*/
export function confirmReceipt(orderSn) {
return http.request({
url: `/order/order/${orderSn}/receiving`,
method: Method.POST,
needToken: true,
});
}
/**
* 获取当前拼团订单的拼团分享信息
* @param {*} parentOrderSn
* @param {*} skuId
*/
export function getPinTuanShare(parentOrderSn,skuId) {
return http.request({
url: `promotion/pintuan/share`,
method: Method.GET,
needToken: true,
params:{parentOrderSn,skuId}
});
}
================================================
FILE: api/passport.js
================================================
/**
* Created by Andste on 2018/5/2.
* 用户认证相关API
*/
import storage from '@/utils/storage.js';
import {http, Method} from '@/utils/request.js';
import { md5 } from '@/utils/md5.js';
/**
* 普通登录
* @param username
* @param password
* @param captcha
*/
export function login(username, password, captcha) {
return http.request({
url: 'passport/login',
method: Method.POST,
params: {
username,
password: md5(password),
captcha,
uuid: storage.getUuid(),
},
});
}
/**
* 验证账户信息
* @param captcha
* @param account
*/
export function validAccount(captcha, account) {
return http.request({
url: 'passport/find-pwd',
method: Method.GET,
params: {
uuid: storage.getUuid(),
captcha,
account,
},
});
}
/**
* 发送找回密码短信
* @param uuid
* @param captcha
*/
export function sendFindPasswordSms(uuid,captcha) {
return http.request({
url: 'passport/find-pwd/send',
method: Method.POST,
header:{'content-type':"application/x-www-form-urlencoded"},
data: {
uuid:uuid,
captcha,
},
});
}
/**
* 校验找回密码验证码
* @param uuid
* @param sms_code
*/
export function validFindPasswordSms(uuid, sms_code) {
return http.request({
url: 'passport/find-pwd/valid',
method: Method.GET,
params: {
uuid,
sms_code,
},
});
}
/**
* 修改密码【找回密码用】
* @param password
* @param uuid
*/
export function changePassword(password, uuid) {
if (!uuid) {
uuid = storage.getUuid();
}
return http.request({
url: 'passport/find-pwd/update-password',
method: Method.PUT,
header:{'content-type':"application/x-www-form-urlencoded"},
data: {
uuid,
password: md5(password),
},
});
}
// 保存生物认证登录
export function setBiolofy(params) {
return http.request({
url: `passport/login/save/biology`,
method: 'POST',
params
})
}
================================================
FILE: api/point.js
================================================
import {http, Method} from '@/utils/request.js';
/**
* 签到
* @param params
*/
export function sign() {
return http.request({
url: '/members/sign',
method: Method.POST,
needToken: true,
});
}
/**
* 签到时间获取
* @param params
*/
export function signTime(time) {
return http.request({
url: '/members/sign?time='+time,
method: Method.GET,
needToken: true,
});
}
================================================
FILE: api/promotions.js
================================================
/**
* 促销相关API
*/
import { http, Method } from "@/utils/request.js";
/**
* 获取当前直播列表
*
* @param {*}
* @returns
*/
export function getLiveList(params) {
return http.request({
url: `broadcast/studio`,
method: Method.GET,
params,
});
}
/**
* 获取当前拼团活动的未成团的会员
*/
export function getPromotionGroupMember(pintuanId) {
return http.request({
url: `promotion/pintuan/${pintuanId}/members`,
method: Method.GET,
});
}
/** 获取拼团列表 */
export function getAssembleList(params) {
return http.request({
url: "promotion/pintuan",
method: Method.GET,
loading: false,
params,
});
}
/**
* 获取积分商城分类
*/
export function getPointsCategory() {
return http.request({
url: "/promotion/pointsGoods/category",
method: Method.GET,
});
}
/**
* 获取积分商城商品
* @param params
*/
export function getPointsGoods(params) {
return http.request({
url: "/promotion/pointsGoods",
method: Method.GET,
params,
});
}
/**
* 获取积分商城商品详情
* @param params
*/
export function getPointsGoodsDetail(id) {
return http.request({
url: "/promotion/pointsGoods/"+id,
method: Method.GET,
});
}
/**
* 获取限时抢购时间线 当天限时抢购信息
*/
export function getSeckillTimeLine() {
return http.request({
url: "promotion/seckill",
method: Method.GET,
});
}
/**
* 获取限时抢购商品 获取某个时刻的限时抢购商品信息
* @param params
*/
export function getSeckillTimeGoods(timeline) {
return http.request({
url: `promotion/seckill/${timeline}`,
method: Method.GET,
});
}
/**
* 获取全部优惠券
* @param params
*/
export function getAllCoupons(params) {
return http.request({
url: "/promotion/coupon",
method: Method.GET,
params,
});
}
/**
* 分页获取砍价商品
* @param params
*/
export function getBargainList(params) {
return http.request({
url: "/promotion/kanjiaGoods",
method: Method.GET,
params,
});
}
/**
* 分页获取砍价商品
* @param params
*/
export function getBargainDetail(id) {
return http.request({
url: `/promotion/kanjiaGoods/${id}`,
method: Method.GET,
});
}
/**
* 获取砍价活动
* @param params
*/
export function getBargainActivity(params) {
return http.request({
url: `/promotion/kanjiaGoods/getKanjiaActivity`,
method: Method.POST,
params,
});
}
/**
* 发起砍价活动
* @param params
*/
export function openBargain(params) {
return http.request({
url: `/promotion/kanjiaGoods`,
method: Method.POST,
header: { "content-type": "application/x-www-form-urlencoded" },
data: params,
});
}
/**
* 分页获取砍价活动-帮砍记录
*/
export function getBargainLog(params) {
return http.request({
url: `/promotion/kanjiaGoods/getKanjiaActivity/logs`,
method: Method.GET,
data: params,
});
}
/**
* 分页获取砍价活动-帮砍记录
*/
export function helpBargain(kanJiaActivityId) {
return http.request({
url: `promotion/kanjiaGoods/help/${kanJiaActivityId}`,
method: Method.POST,
});
}
/**
* 分页获取已参与的砍价活动
*/
export function getMineBargainLog(params) {
return http.request({
url: `/promotion/kanjiaGoods/kanjiaActivity/mine/`,
method: Method.GET,
params
});
}
================================================
FILE: api/safe.js
================================================
/**
* 安全相关API
*/
import {http,Method} from '@/utils/request.js';
import storage from "@/utils/storage.js"
import { md5 } from '@/utils/md5.js'
/**
* 发送绑定手机验证码
* @param mobile
* @param captcha
*/
export function sendBindMobileSms(mobile, captcha) {
return http.request({
url: `members/security/bind/send/${mobile}`,
method: Method.POST,
needToken: true,
header:{'content-type':"application/x-www-form-urlencoded"},
data: {
uuid: storage.getUuid(),
captcha,
},
});
}
/**
* 绑定手机号
* @param mobile
* @param sms_code
*/
export function bindMobile(mobile, sms_code) {
return http.request({
url: `members/security/bind/${mobile}`,
method: Method.PUT,
needToken: true,
data: {sms_code},
});
}
/**
* 发送手机验证码
* 在修改手机号和更改密码时通用
* @param captcha
*/
export function sendMobileSms(captcha) {
return http.request({
url: 'members/security/send',
method: Method.POST,
needToken: true,
header:{'content-type':"application/x-www-form-urlencoded"},
data: {
uuid: storage.getUuid(),
captcha,
},
});
}
/**
* 验证更换手机号短信
* @param sms_code
*/
export function validChangeMobileSms(sms_code) {
return http.request({
url: 'members/security/exchange-bind',
method: Method.GET,
needToken: true,
params: {sms_code},
});
}
/**
* 更换手机号
* @param mobile
* @param sms_code
*/
export function changeMobile(mobile, sms_code) {
return http.request({
url: `members/security/exchange-bind/${mobile}`,
method: Method.PUT,
header:{'content-type':"application/x-www-form-urlencoded"},
needToken: true,
data: {sms_code},
});
}
/**
* 更改密码
* @param captcha
* @param password
*/
export function changePassword(captcha, password) {
return http.request({
url: 'members/security/password',
method: Method.PUT,
header:{'content-type':"application/x-www-form-urlencoded"},
needToken: true,
data: {
uuid: storage.getUuid(),
captcha,
password: md5(password),
},
});
}
/**
* 获取当前实名认证进度
* @param email
* @param email_code
*/
export function contractStep() {
return http.request({
url: `members/contract/step`,
method: Method.GET,
needToken: true
})
}
/**
* 实名认证
* @param email
* @param email_code
*/
export function authentication(params) {
return http.request({
url: `members/contract/authentication`,
method: Method.POST,
needToken: true,
header:{'content-type':"application/x-www-form-urlencoded"},
data: params
})
}
================================================
FILE: api/store.js
================================================
/**
* 店铺相关API
*/
import {http, Method} from '@/utils/request.js';
/**
* 获取店铺列表
* @param params
*/
export function getStoreList(params) {
return http.request({
url: '/store/store',
method: Method.GET,
params,
});
}
/**
* 获取店铺基本信息
* @param storeId
*/
export function getStoreBaseInfo(storeId) {
return http.request({
url: `/store/store/get/detail/${storeId}`,
method: Method.GET,
loading: false,
});
}
/**
* 获取店铺分类
* @param id
*/
export function getStoreCategory(id) {
return http.request({
url: `/store/store/label/get/${id}`,
method: Method.GET,
});
}
/**
* 营业执照
* @param id
*/
export function getLicencePhoto(id) {
return http.request({
url: `/store/store/get/licencePhoto/${id}`,
method: Method.GET,
});
}
/**
* 获取自提点信息
* @param id
*/
export function getStoreAddress(storeId,params) {
return http.request({
url: `/store/address/page/${storeId}`,
method: Method.GET,
params
});
}
================================================
FILE: api/trade.js
================================================
/**
* 交♂易相关API
*/
import { http, Method } from "@/utils/request.js";
/**
* 获取购物车列表
* @param show_type 要显示的类型 all:全部 checked:已选中的
*/
export function getCarts() {
return http.request({
url: `/trade/carts/all`,
method: Method.GET,
needToken: true,
loading: false,
});
}
/**
* 获取购物车总数
* @param show_type 要显示的类型 all:全部 checked:已选中的
*/
export function getCartNum() {
return http.request({
url: `/trade/carts/count`,
method: Method.GET,
needToken: true,
loading: false,
});
}
/**
* 获取购物车可用优惠券数量
* @param way 购物车购买:CART/立即购买:BUY_NOW/拼团购买:PINTUAN / 积分购买:POINT
*/
export function getCartCouponNum(way) {
return http.request({
url: `/trade/carts/coupon/num?way=${way}`,
method: Method.GET,
needToken: true,
loading: false,
});
}
/**
* 添加货品到购物车
* @param skuId 产品ID
* @param num 产品的购买数量
* @param cartType 购物车类型,默认加入购物车
*/
export function addToCart(data) {
return http.request({
url: "/trade/carts",
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
data,
});
}
/**
* 更新购物车商品数量
* @param skuId
* @param num
*/
export function updateSkuNum(skuId, num = 1) {
return http.request({
url: `/trade/carts/sku/num/${skuId}`,
method: Method.POST,
header: { "content-type": "application/x-www-form-urlencoded" },
needToken: true,
data: { num },
});
}
/**
* 更新购物车货品选中状态
* @param skuId
* @param checked
*/
export function updateSkuChecked(skuId, checked) {
return http.request({
url: `/trade/carts/sku/checked/${skuId}`,
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
data: { checked },
});
}
/**
* 删除多个货品项
* @param skuIds
*/
export function deleteSkuItem(skuIds) {
return http.request({
url: `/trade/carts/sku/remove?skuIds=${skuIds}`,
method: Method.DELETE,
needToken: true,
});
}
/**
* 设置全部货品为选中或不选中
* @param checked
*/
export function checkAll(checked) {
return http.request({
url: "/trade/carts/sku/checked",
method: Method.POST,
needToken: true,
params: { checked },
});
}
/**
* 设置店铺内全部货品选中状态
* @param storeId
* @param checked
*/
export function checkStore(storeId, checked) {
return http.request({
url: `/trade/carts/store/${storeId}`,
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
data: { checked },
});
}
/**
* 获取结算参数
*/
export function getCheckoutParams(way) {
return http.request({
url: "/trade/carts/checked?way=" + way,
method: Method.GET,
needToken: true,
});
}
/**
* 设置收货地址ID
* @param addressId
*/
export function setAddressId(addressId,way) {
return http.request({
url: `/trade/carts/shippingAddress?shippingAddressId=${addressId}&way=${way}`,
method: Method.GET,
needToken: true,
});
}
/**
* 设置收货地址ID
* @param addressId
*/
export function setStoreAddressId(storeAddressId,way) {
return http.request({
url: `/trade/carts/storeAddress?storeAddressId=${storeAddressId}&way=${way}`,
method: Method.GET,
needToken: true,
});
}
/**
* 创建交易
*/
export function createTrade(params) {
return http.request({
url: "/trade/carts/create/trade",
method: Method.POST,
needToken: true,
message: false,
data:params,
});
}
/**
* 根据交易编号或订单编号查询收银台数据
* @param params
*/
export function getCashierData(params) {
return http.request({
url: "payment/cashier/tradeDetail",
method: Method.GET,
needToken: true,
params,
});
}
/**
* 发起支付
* @param paymentMethod
* @param paymentClient
* @param params
* @returns {*|*}
*/
export function initiatePay(paymentMethod, paymentClient, params) {
return http.request({
url: `payment/cashier/pay/${paymentMethod}/${paymentClient}`,
method: Method.GET,
needToken: true,
params,
});
}
/**
* 查询物流
* @param orderSn
*/
export function getExpress(orderSn) {
return http.request({
url: `/order/order/getTraces/${orderSn}`,
method: Method.POST,
needToken: true,
});
}
/**
* 获取当前会员的对于当前商品可使用的优惠券列表
*/
export function getMemberCanUse(data) {
return http.request({
url: `/promotion/coupon/canUse`,
method: Method.GET,
params: data,
});
}
/**
* 获取当前会员的优惠券列表
*/
export function getMemberCouponList(data) {
return http.request({
url: `/promotion/coupon/getCoupons`,
method: Method.GET,
params: data,
});
}
/**
* 使用优惠券
*/
export function useCoupon(params) {
return http.request({
url: `/trade/carts/select/coupon`,
method: Method.GET,
needToken: true,
params: params,
});
}
/**
* 更换参与活动
* @param params
*/
export function changeActivity(params) {
return http.request({
url: "trade/promotion",
method: Method.POST,
needToken: true,
data: params,
header: { "content-type": "application/x-www-form-urlencoded" },
});
}
/**
* 根据交易单号查询订单列表
* @param trade_sn
*/
export function reBuy(sn) {
return http.request({
url: `trade/carts/rebuy/${sn}`,
method: Method.POST,
needToken: true,
});
}
/**
* 获取全部配送方式
*/
export function shippingMethodList(params) {
return http.request({
url: `/trade/carts/shippingMethodList`,
method: Method.GET,
needToken: true,
params: params,
});
}
/**
* 提交配送方式
* @param params
*/
export function setShipMethod(params) {
return http.request({
url: "/trade/carts/shippingMethod",
method: Method.PUT,
needToken: true,
params,
});
}
// 查看包裹列表
export function getPackage(orderSn) {
return http.request({
url: `/order/order/getPackage/${orderSn}`,
method: Method.GET,
needToken: true,
});
}
================================================
FILE: components/Sansnn-uQRCode/uqrcode.js
================================================
// uqrcode.js 复制直接用
//---------------------------------------------------------------------
// github https://github.com/Sansnn/uQRCode
//---------------------------------------------------------------------
let uQRCode = {};
(function() {
//---------------------------------------------------------------------
// QRCode for JavaScript
//
// Copyright (c) 2009 Kazuhiko Arase
//
// URL: http://www.d-project.com/
//
// Licensed under the MIT license:
// http://www.opensource.org/licenses/mit-license.php
//
// The word "QR Code" is registered trademark of
// DENSO WAVE INCORPORATED
// http://www.denso-wave.com/qrcode/faqpatent-e.html
//
//---------------------------------------------------------------------
//---------------------------------------------------------------------
// QR8bitByte
//---------------------------------------------------------------------
function QR8bitByte(data) {
this.mode = QRMode.MODE_8BIT_BYTE;
this.data = data;
}
QR8bitByte.prototype = {
getLength: function(buffer) {
return this.data.length;
},
write: function(buffer) {
for (var i = 0; i < this.data.length; i++) {
// not JIS ...
buffer.put(this.data.charCodeAt(i), 8);
}
}
};
//---------------------------------------------------------------------
// QRCode
//---------------------------------------------------------------------
function QRCode(typeNumber, errorCorrectLevel) {
this.typeNumber = typeNumber;
this.errorCorrectLevel = errorCorrectLevel;
this.modules = null;
this.moduleCount = 0;
this.dataCache = null;
this.dataList = new Array();
}
QRCode.prototype = {
addData: function(data) {
var newData = new QR8bitByte(data);
this.dataList.push(newData);
this.dataCache = null;
},
isDark: function(row, col) {
if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {
throw new Error(row + "," + col);
}
return this.modules[row][col];
},
getModuleCount: function() {
return this.moduleCount;
},
make: function() {
// Calculate automatically typeNumber if provided is < 1
if (this.typeNumber < 1) {
var typeNumber = 1;
for (typeNumber = 1; typeNumber < 40; typeNumber++) {
var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel);
var buffer = new QRBitBuffer();
var totalDataCount = 0;
for (var i = 0; i < rsBlocks.length; i++) {
totalDataCount += rsBlocks[i].dataCount;
}
for (var i = 0; i < this.dataList.length; i++) {
var data = this.dataList[i];
buffer.put(data.mode, 4);
buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
data.write(buffer);
}
if (buffer.getLengthInBits() <= totalDataCount * 8)
break;
}
this.typeNumber = typeNumber;
}
this.makeImpl(false, this.getBestMaskPattern());
},
makeImpl: function(test, maskPattern) {
this.moduleCount = this.typeNumber * 4 + 17;
this.modules = new Array(this.moduleCount);
for (var row = 0; row < this.moduleCount; row++) {
this.modules[row] = new Array(this.moduleCount);
for (var col = 0; col < this.moduleCount; col++) {
this.modules[row][col] = null; //(col + row) % 3;
}
}
this.setupPositionProbePattern(0, 0);
this.setupPositionProbePattern(this.moduleCount - 7, 0);
this.setupPositionProbePattern(0, this.moduleCount - 7);
this.setupPositionAdjustPattern();
this.setupTimingPattern();
this.setupTypeInfo(test, maskPattern);
if (this.typeNumber >= 7) {
this.setupTypeNumber(test);
}
if (this.dataCache == null) {
this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);
}
this.mapData(this.dataCache, maskPattern);
},
setupPositionProbePattern: function(row, col) {
for (var r = -1; r <= 7; r++) {
if (row + r <= -1 || this.moduleCount <= row + r) continue;
for (var c = -1; c <= 7; c++) {
if (col + c <= -1 || this.moduleCount <= col + c) continue;
if ((0 <= r && r <= 6 && (c == 0 || c == 6)) ||
(0 <= c && c <= 6 && (r == 0 || r == 6)) ||
(2 <= r && r <= 4 && 2 <= c && c <= 4)) {
this.modules[row + r][col + c] = true;
} else {
this.modules[row + r][col + c] = false;
}
}
}
},
getBestMaskPattern: function() {
var minLostPoint = 0;
var pattern = 0;
for (var i = 0; i < 8; i++) {
this.makeImpl(true, i);
var lostPoint = QRUtil.getLostPoint(this);
if (i == 0 || minLostPoint > lostPoint) {
minLostPoint = lostPoint;
pattern = i;
}
}
return pattern;
},
createMovieClip: function(target_mc, instance_name, depth) {
var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);
var cs = 1;
this.make();
for (var row = 0; row < this.modules.length; row++) {
var y = row * cs;
for (var col = 0; col < this.modules[row].length; col++) {
var x = col * cs;
var dark = this.modules[row][col];
if (dark) {
qr_mc.beginFill(0, 100);
qr_mc.moveTo(x, y);
qr_mc.lineTo(x + cs, y);
qr_mc.lineTo(x + cs, y + cs);
qr_mc.lineTo(x, y + cs);
qr_mc.endFill();
}
}
}
return qr_mc;
},
setupTimingPattern: function() {
for (var r = 8; r < this.moduleCount - 8; r++) {
if (this.modules[r][6] != null) {
continue;
}
this.modules[r][6] = (r % 2 == 0);
}
for (var c = 8; c < this.moduleCount - 8; c++) {
if (this.modules[6][c] != null) {
continue;
}
this.modules[6][c] = (c % 2 == 0);
}
},
setupPositionAdjustPattern: function() {
var pos = QRUtil.getPatternPosition(this.typeNumber);
for (var i = 0; i < pos.length; i++) {
for (var j = 0; j < pos.length; j++) {
var row = pos[i];
var col = pos[j];
if (this.modules[row][col] != null) {
continue;
}
for (var r = -2; r <= 2; r++) {
for (var c = -2; c <= 2; c++) {
if (r == -2 || r == 2 || c == -2 || c == 2 ||
(r == 0 && c == 0)) {
this.modules[row + r][col + c] = true;
} else {
this.modules[row + r][col + c] = false;
}
}
}
}
}
},
setupTypeNumber: function(test) {
var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
for (var i = 0; i < 18; i++) {
var mod = (!test && ((bits >> i) & 1) == 1);
this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
}
for (var i = 0; i < 18; i++) {
var mod = (!test && ((bits >> i) & 1) == 1);
this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
}
},
setupTypeInfo: function(test, maskPattern) {
var data = (this.errorCorrectLevel << 3) | maskPattern;
var bits = QRUtil.getBCHTypeInfo(data);
// vertical
for (var i = 0; i < 15; i++) {
var mod = (!test && ((bits >> i) & 1) == 1);
if (i < 6) {
this.modules[i][8] = mod;
} else if (i < 8) {
this.modules[i + 1][8] = mod;
} else {
this.modules[this.moduleCount - 15 + i][8] = mod;
}
}
// horizontal
for (var i = 0; i < 15; i++) {
var mod = (!test && ((bits >> i) & 1) == 1);
if (i < 8) {
this.modules[8][this.moduleCount - i - 1] = mod;
} else if (i < 9) {
this.modules[8][15 - i - 1 + 1] = mod;
} else {
this.modules[8][15 - i - 1] = mod;
}
}
// fixed module
this.modules[this.moduleCount - 8][8] = (!test);
},
mapData: function(data, maskPattern) {
var inc = -1;
var row = this.moduleCount - 1;
var bitIndex = 7;
var byteIndex = 0;
for (var col = this.moduleCount - 1; col > 0; col -= 2) {
if (col == 6) col--;
while (true) {
for (var c = 0; c < 2; c++) {
if (this.modules[row][col - c] == null) {
var dark = false;
if (byteIndex < data.length) {
dark = (((data[byteIndex] >>> bitIndex) & 1) == 1);
}
var mask = QRUtil.getMask(maskPattern, row, col - c);
if (mask) {
dark = !dark;
}
this.modules[row][col - c] = dark;
bitIndex--;
if (bitIndex == -1) {
byteIndex++;
bitIndex = 7;
}
}
}
row += inc;
if (row < 0 || this.moduleCount <= row) {
row -= inc;
inc = -inc;
break;
}
}
}
}
};
QRCode.PAD0 = 0xEC;
QRCode.PAD1 = 0x11;
QRCode.createData = function(typeNumber, errorCorrectLevel, dataList) {
var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);
var buffer = new QRBitBuffer();
for (var i = 0; i < dataList.length; i++) {
var data = dataList[i];
buffer.put(data.mode, 4);
buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
data.write(buffer);
}
// calc num max data.
var totalDataCount = 0;
for (var i = 0; i < rsBlocks.length; i++) {
totalDataCount += rsBlocks[i].dataCount;
}
if (buffer.getLengthInBits() > totalDataCount * 8) {
throw new Error("code length overflow. (" +
buffer.getLengthInBits() +
">" +
totalDataCount * 8 +
")");
}
// end code
if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
buffer.put(0, 4);
}
// padding
while (buffer.getLengthInBits() % 8 != 0) {
buffer.putBit(false);
}
// padding
while (true) {
if (buffer.getLengthInBits() >= totalDataCount * 8) {
break;
}
buffer.put(QRCode.PAD0, 8);
if (buffer.getLengthInBits() >= totalDataCount * 8) {
break;
}
buffer.put(QRCode.PAD1, 8);
}
return QRCode.createBytes(buffer, rsBlocks);
}
QRCode.createBytes = function(buffer, rsBlocks) {
var offset = 0;
var maxDcCount = 0;
var maxEcCount = 0;
var dcdata = new Array(rsBlocks.length);
var ecdata = new Array(rsBlocks.length);
for (var r = 0; r < rsBlocks.length; r++) {
var dcCount = rsBlocks[r].dataCount;
var ecCount = rsBlocks[r].totalCount - dcCount;
maxDcCount = Math.max(maxDcCount, dcCount);
maxEcCount = Math.max(maxEcCount, ecCount);
dcdata[r] = new Array(dcCount);
for (var i = 0; i < dcdata[r].length; i++) {
dcdata[r][i] = 0xff & buffer.buffer[i + offset];
}
offset += dcCount;
var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
var modPoly = rawPoly.mod(rsPoly);
ecdata[r] = new Array(rsPoly.getLength() - 1);
for (var i = 0; i < ecdata[r].length; i++) {
var modIndex = i + modPoly.getLength() - ecdata[r].length;
ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0;
}
}
var totalCodeCount = 0;
for (var i = 0; i < rsBlocks.length; i++) {
totalCodeCount += rsBlocks[i].totalCount;
}
var data = new Array(totalCodeCount);
var index = 0;
for (var i = 0; i < maxDcCount; i++) {
for (var r = 0; r < rsBlocks.length; r++) {
if (i < dcdata[r].length) {
data[index++] = dcdata[r][i];
}
}
}
for (var i = 0; i < maxEcCount; i++) {
for (var r = 0; r < rsBlocks.length; r++) {
if (i < ecdata[r].length) {
data[index++] = ecdata[r][i];
}
}
}
return data;
}
//---------------------------------------------------------------------
// QRMode
//---------------------------------------------------------------------
var QRMode = {
MODE_NUMBER: 1 << 0,
MODE_ALPHA_NUM: 1 << 1,
MODE_8BIT_BYTE: 1 << 2,
MODE_KANJI: 1 << 3
};
//---------------------------------------------------------------------
// QRErrorCorrectLevel
//---------------------------------------------------------------------
var QRErrorCorrectLevel = {
L: 1,
M: 0,
Q: 3,
H: 2
};
//---------------------------------------------------------------------
// QRMaskPattern
//---------------------------------------------------------------------
var QRMaskPattern = {
PATTERN000: 0,
PATTERN001: 1,
PATTERN010: 2,
PATTERN011: 3,
PATTERN100: 4,
PATTERN101: 5,
PATTERN110: 6,
PATTERN111: 7
};
//---------------------------------------------------------------------
// QRUtil
//---------------------------------------------------------------------
var QRUtil = {
PATTERN_POSITION_TABLE: [
[],
[6, 18],
[6, 22],
[6, 26],
[6, 30],
[6, 34],
[6, 22, 38],
[6, 24, 42],
[6, 26, 46],
[6, 28, 50],
[6, 30, 54],
[6, 32, 58],
[6, 34, 62],
[6, 26, 46, 66],
[6, 26, 48, 70],
[6, 26, 50, 74],
[6, 30, 54, 78],
[6, 30, 56, 82],
[6, 30, 58, 86],
[6, 34, 62, 90],
[6, 28, 50, 72, 94],
[6, 26, 50, 74, 98],
[6, 30, 54, 78, 102],
[6, 28, 54, 80, 106],
[6, 32, 58, 84, 110],
[6, 30, 58, 86, 114],
[6, 34, 62, 90, 118],
[6, 26, 50, 74, 98, 122],
[6, 30, 54, 78, 102, 126],
[6, 26, 52, 78, 104, 130],
[6, 30, 56, 82, 108, 134],
[6, 34, 60, 86, 112, 138],
[6, 30, 58, 86, 114, 142],
[6, 34, 62, 90, 118, 146],
[6, 30, 54, 78, 102, 126, 150],
[6, 24, 50, 76, 102, 128, 154],
[6, 28, 54, 80, 106, 132, 158],
[6, 32, 58, 84, 110, 136, 162],
[6, 26, 54, 82, 110, 138, 166],
[6, 30, 58, 86, 114, 142, 170]
],
G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),
G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),
G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1),
getBCHTypeInfo: function(data) {
var d = data << 10;
while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15)));
}
return ((data << 10) | d) ^ QRUtil.G15_MASK;
},
getBCHTypeNumber: function(data) {
var d = data << 12;
while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18)));
}
return (data << 12) | d;
},
getBCHDigit: function(data) {
var digit = 0;
while (data != 0) {
digit++;
data >>>= 1;
}
return digit;
},
getPatternPosition: function(typeNumber) {
return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
},
getMask: function(maskPattern, i, j) {
switch (maskPattern) {
case QRMaskPattern.PATTERN000:
return (i + j) % 2 == 0;
case QRMaskPattern.PATTERN001:
return i % 2 == 0;
case QRMaskPattern.PATTERN010:
return j % 3 == 0;
case QRMaskPattern.PATTERN011:
return (i + j) % 3 == 0;
case QRMaskPattern.PATTERN100:
return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;
case QRMaskPattern.PATTERN101:
return (i * j) % 2 + (i * j) % 3 == 0;
case QRMaskPattern.PATTERN110:
return ((i * j) % 2 + (i * j) % 3) % 2 == 0;
case QRMaskPattern.PATTERN111:
return ((i * j) % 3 + (i + j) % 2) % 2 == 0;
default:
throw new Error("bad maskPattern:" + maskPattern);
}
},
getErrorCorrectPolynomial: function(errorCorrectLength) {
var a = new QRPolynomial([1], 0);
for (var i = 0; i < errorCorrectLength; i++) {
a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
}
return a;
},
getLengthInBits: function(mode, type) {
if (1 <= type && type < 10) {
// 1 - 9
switch (mode) {
case QRMode.MODE_NUMBER:
return 10;
case QRMode.MODE_ALPHA_NUM:
return 9;
case QRMode.MODE_8BIT_BYTE:
return 8;
case QRMode.MODE_KANJI:
return 8;
default:
throw new Error("mode:" + mode);
}
} else if (type < 27) {
// 10 - 26
switch (mode) {
case QRMode.MODE_NUMBER:
return 12;
case QRMode.MODE_ALPHA_NUM:
return 11;
case QRMode.MODE_8BIT_BYTE:
return 16;
case QRMode.MODE_KANJI:
return 10;
default:
throw new Error("mode:" + mode);
}
} else if (type < 41) {
// 27 - 40
switch (mode) {
case QRMode.MODE_NUMBER:
return 14;
case QRMode.MODE_ALPHA_NUM:
return 13;
case QRMode.MODE_8BIT_BYTE:
return 16;
case QRMode.MODE_KANJI:
return 12;
default:
throw new Error("mode:" + mode);
}
} else {
throw new Error("type:" + type);
}
},
getLostPoint: function(qrCode) {
var moduleCount = qrCode.getModuleCount();
var lostPoint = 0;
// LEVEL1
for (var row = 0; row < moduleCount; row++) {
for (var col = 0; col < moduleCount; col++) {
var sameCount = 0;
var dark = qrCode.isDark(row, col);
for (var r = -1; r <= 1; r++) {
if (row + r < 0 || moduleCount <= row + r) {
continue;
}
for (var c = -1; c <= 1; c++) {
if (col + c < 0 || moduleCount <= col + c) {
continue;
}
if (r == 0 && c == 0) {
continue;
}
if (dark == qrCode.isDark(row + r, col + c)) {
sameCount++;
}
}
}
if (sameCount > 5) {
lostPoint += (3 + sameCount - 5);
}
}
}
// LEVEL2
for (var row = 0; row < moduleCount - 1; row++) {
for (var col = 0; col < moduleCount - 1; col++) {
var count = 0;
if (qrCode.isDark(row, col)) count++;
if (qrCode.isDark(row + 1, col)) count++;
if (qrCode.isDark(row, col + 1)) count++;
if (qrCode.isDark(row + 1, col + 1)) count++;
if (count == 0 || count == 4) {
lostPoint += 3;
}
}
}
// LEVEL3
for (var row = 0; row < moduleCount; row++) {
for (var col = 0; col < moduleCount - 6; col++) {
if (qrCode.isDark(row, col) &&
!qrCode.isDark(row, col + 1) &&
qrCode.isDark(row, col + 2) &&
qrCode.isDark(row, col + 3) &&
qrCode.isDark(row, col + 4) &&
!qrCode.isDark(row, col + 5) &&
qrCode.isDark(row, col + 6)) {
lostPoint += 40;
}
}
}
for (var col = 0; col < moduleCount; col++) {
for (var row = 0; row < moduleCount - 6; row++) {
if (qrCode.isDark(row, col) &&
!qrCode.isDark(row + 1, col) &&
qrCode.isDark(row + 2, col) &&
qrCode.isDark(row + 3, col) &&
qrCode.isDark(row + 4, col) &&
!qrCode.isDark(row + 5, col) &&
qrCode.isDark(row + 6, col)) {
lostPoint += 40;
}
}
}
// LEVEL4
var darkCount = 0;
for (var col = 0; col < moduleCount; col++) {
for (var row = 0; row < moduleCount; row++) {
if (qrCode.isDark(row, col)) {
darkCount++;
}
}
}
var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
lostPoint += ratio * 10;
return lostPoint;
}
};
//---------------------------------------------------------------------
// QRMath
//---------------------------------------------------------------------
var QRMath = {
glog: function(n) {
if (n < 1) {
throw new Error("glog(" + n + ")");
}
return QRMath.LOG_TABLE[n];
},
gexp: function(n) {
while (n < 0) {
n += 255;
}
while (n >= 256) {
n -= 255;
}
return QRMath.EXP_TABLE[n];
},
EXP_TABLE: new Array(256),
LOG_TABLE: new Array(256)
};
for (var i = 0; i < 8; i++) {
QRMath.EXP_TABLE[i] = 1 << i;
}
for (var i = 8; i < 256; i++) {
QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^
QRMath.EXP_TABLE[i - 5] ^
QRMath.EXP_TABLE[i - 6] ^
QRMath.EXP_TABLE[i - 8];
}
for (var i = 0; i < 255; i++) {
QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;
}
//---------------------------------------------------------------------
// QRPolynomial
//---------------------------------------------------------------------
function QRPolynomial(num, shift) {
if (num.length == undefined) {
throw new Error(num.length + "/" + shift);
}
var offset = 0;
while (offset < num.length && num[offset] == 0) {
offset++;
}
this.num = new Array(num.length - offset + shift);
for (var i = 0; i < num.length - offset; i++) {
this.num[i] = num[i + offset];
}
}
QRPolynomial.prototype = {
get: function(index) {
return this.num[index];
},
getLength: function() {
return this.num.length;
},
multiply: function(e) {
var num = new Array(this.getLength() + e.getLength() - 1);
for (var i = 0; i < this.getLength(); i++) {
for (var j = 0; j < e.getLength(); j++) {
num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
}
}
return new QRPolynomial(num, 0);
},
mod: function(e) {
if (this.getLength() - e.getLength() < 0) {
return this;
}
var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e.get(0));
var num = new Array(this.getLength());
for (var i = 0; i < this.getLength(); i++) {
num[i] = this.get(i);
}
for (var i = 0; i < e.getLength(); i++) {
num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
}
// recursive call
return new QRPolynomial(num, 0).mod(e);
}
};
//---------------------------------------------------------------------
// QRRSBlock
//---------------------------------------------------------------------
function QRRSBlock(totalCount, dataCount) {
this.totalCount = totalCount;
this.dataCount = dataCount;
}
QRRSBlock.RS_BLOCK_TABLE = [
// L
// M
// Q
// H
// 1
[1, 26, 19],
[1, 26, 16],
[1, 26, 13],
[1, 26, 9],
// 2
[1, 44, 34],
[1, 44, 28],
[1, 44, 22],
[1, 44, 16],
// 3
[1, 70, 55],
[1, 70, 44],
[2, 35, 17],
[2, 35, 13],
// 4
[1, 100, 80],
[2, 50, 32],
[2, 50, 24],
[4, 25, 9],
// 5
[1, 134, 108],
[2, 67, 43],
[2, 33, 15, 2, 34, 16],
[2, 33, 11, 2, 34, 12],
// 6
[2, 86, 68],
[4, 43, 27],
[4, 43, 19],
[4, 43, 15],
// 7
[2, 98, 78],
[4, 49, 31],
[2, 32, 14, 4, 33, 15],
[4, 39, 13, 1, 40, 14],
// 8
[2, 121, 97],
[2, 60, 38, 2, 61, 39],
[4, 40, 18, 2, 41, 19],
[4, 40, 14, 2, 41, 15],
// 9
[2, 146, 116],
[3, 58, 36, 2, 59, 37],
[4, 36, 16, 4, 37, 17],
[4, 36, 12, 4, 37, 13],
// 10
[2, 86, 68, 2, 87, 69],
[4, 69, 43, 1, 70, 44],
[6, 43, 19, 2, 44, 20],
[6, 43, 15, 2, 44, 16],
// 11
[4, 101, 81],
[1, 80, 50, 4, 81, 51],
[4, 50, 22, 4, 51, 23],
[3, 36, 12, 8, 37, 13],
// 12
[2, 116, 92, 2, 117, 93],
[6, 58, 36, 2, 59, 37],
[4, 46, 20, 6, 47, 21],
[7, 42, 14, 4, 43, 15],
// 13
[4, 133, 107],
[8, 59, 37, 1, 60, 38],
[8, 44, 20, 4, 45, 21],
[12, 33, 11, 4, 34, 12],
// 14
[3, 145, 115, 1, 146, 116],
[4, 64, 40, 5, 65, 41],
[11, 36, 16, 5, 37, 17],
[11, 36, 12, 5, 37, 13],
// 15
[5, 109, 87, 1, 110, 88],
[5, 65, 41, 5, 66, 42],
[5, 54, 24, 7, 55, 25],
[11, 36, 12],
// 16
[5, 122, 98, 1, 123, 99],
[7, 73, 45, 3, 74, 46],
[15, 43, 19, 2, 44, 20],
[3, 45, 15, 13, 46, 16],
// 17
[1, 135, 107, 5, 136, 108],
[10, 74, 46, 1, 75, 47],
[1, 50, 22, 15, 51, 23],
[2, 42, 14, 17, 43, 15],
// 18
[5, 150, 120, 1, 151, 121],
[9, 69, 43, 4, 70, 44],
[17, 50, 22, 1, 51, 23],
[2, 42, 14, 19, 43, 15],
// 19
[3, 141, 113, 4, 142, 114],
[3, 70, 44, 11, 71, 45],
[17, 47, 21, 4, 48, 22],
[9, 39, 13, 16, 40, 14],
// 20
[3, 135, 107, 5, 136, 108],
[3, 67, 41, 13, 68, 42],
[15, 54, 24, 5, 55, 25],
[15, 43, 15, 10, 44, 16],
// 21
[4, 144, 116, 4, 145, 117],
[17, 68, 42],
[17, 50, 22, 6, 51, 23],
[19, 46, 16, 6, 47, 17],
// 22
[2, 139, 111, 7, 140, 112],
[17, 74, 46],
[7, 54, 24, 16, 55, 25],
[34, 37, 13],
// 23
[4, 151, 121, 5, 152, 122],
[4, 75, 47, 14, 76, 48],
[11, 54, 24, 14, 55, 25],
[16, 45, 15, 14, 46, 16],
// 24
[6, 147, 117, 4, 148, 118],
[6, 73, 45, 14, 74, 46],
[11, 54, 24, 16, 55, 25],
[30, 46, 16, 2, 47, 17],
// 25
[8, 132, 106, 4, 133, 107],
[8, 75, 47, 13, 76, 48],
[7, 54, 24, 22, 55, 25],
[22, 45, 15, 13, 46, 16],
// 26
[10, 142, 114, 2, 143, 115],
[19, 74, 46, 4, 75, 47],
[28, 50, 22, 6, 51, 23],
[33, 46, 16, 4, 47, 17],
// 27
[8, 152, 122, 4, 153, 123],
[22, 73, 45, 3, 74, 46],
[8, 53, 23, 26, 54, 24],
[12, 45, 15, 28, 46, 16],
// 28
[3, 147, 117, 10, 148, 118],
[3, 73, 45, 23, 74, 46],
[4, 54, 24, 31, 55, 25],
[11, 45, 15, 31, 46, 16],
// 29
[7, 146, 116, 7, 147, 117],
[21, 73, 45, 7, 74, 46],
[1, 53, 23, 37, 54, 24],
[19, 45, 15, 26, 46, 16],
// 30
[5, 145, 115, 10, 146, 116],
[19, 75, 47, 10, 76, 48],
[15, 54, 24, 25, 55, 25],
[23, 45, 15, 25, 46, 16],
// 31
[13, 145, 115, 3, 146, 116],
[2, 74, 46, 29, 75, 47],
[42, 54, 24, 1, 55, 25],
[23, 45, 15, 28, 46, 16],
// 32
[17, 145, 115],
[10, 74, 46, 23, 75, 47],
[10, 54, 24, 35, 55, 25],
[19, 45, 15, 35, 46, 16],
// 33
[17, 145, 115, 1, 146, 116],
[14, 74, 46, 21, 75, 47],
[29, 54, 24, 19, 55, 25],
[11, 45, 15, 46, 46, 16],
// 34
[13, 145, 115, 6, 146, 116],
[14, 74, 46, 23, 75, 47],
[44, 54, 24, 7, 55, 25],
[59, 46, 16, 1, 47, 17],
// 35
[12, 151, 121, 7, 152, 122],
[12, 75, 47, 26, 76, 48],
[39, 54, 24, 14, 55, 25],
[22, 45, 15, 41, 46, 16],
// 36
[6, 151, 121, 14, 152, 122],
[6, 75, 47, 34, 76, 48],
[46, 54, 24, 10, 55, 25],
[2, 45, 15, 64, 46, 16],
// 37
[17, 152, 122, 4, 153, 123],
[29, 74, 46, 14, 75, 47],
[49, 54, 24, 10, 55, 25],
[24, 45, 15, 46, 46, 16],
// 38
[4, 152, 122, 18, 153, 123],
[13, 74, 46, 32, 75, 47],
[48, 54, 24, 14, 55, 25],
[42, 45, 15, 32, 46, 16],
// 39
[20, 147, 117, 4, 148, 118],
[40, 75, 47, 7, 76, 48],
[43, 54, 24, 22, 55, 25],
[10, 45, 15, 67, 46, 16],
// 40
[19, 148, 118, 6, 149, 119],
[18, 75, 47, 31, 76, 48],
[34, 54, 24, 34, 55, 25],
[20, 45, 15, 61, 46, 16]
];
QRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) {
var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);
if (rsBlock == undefined) {
throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel);
}
var length = rsBlock.length / 3;
var list = new Array();
for (var i = 0; i < length; i++) {
var count = rsBlock[i * 3 + 0];
var totalCount = rsBlock[i * 3 + 1];
var dataCount = rsBlock[i * 3 + 2];
for (var j = 0; j < count; j++) {
list.push(new QRRSBlock(totalCount, dataCount));
}
}
return list;
}
QRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) {
switch (errorCorrectLevel) {
case QRErrorCorrectLevel.L:
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
case QRErrorCorrectLevel.M:
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
case QRErrorCorrectLevel.Q:
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
case QRErrorCorrectLevel.H:
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
default:
return undefined;
}
}
//---------------------------------------------------------------------
// QRBitBuffer
//---------------------------------------------------------------------
function QRBitBuffer() {
this.buffer = new Array();
this.length = 0;
}
QRBitBuffer.prototype = {
get: function(index) {
var bufIndex = Math.floor(index / 8);
return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) == 1;
},
put: function(num, length) {
for (var i = 0; i < length; i++) {
this.putBit(((num >>> (length - i - 1)) & 1) == 1);
}
},
getLengthInBits: function() {
return this.length;
},
putBit: function(bit) {
var bufIndex = Math.floor(this.length / 8);
if (this.buffer.length <= bufIndex) {
this.buffer.push(0);
}
if (bit) {
this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
}
this.length++;
}
};
//---------------------------------------------------------------------
// Support Chinese
//---------------------------------------------------------------------
function utf16To8(text) {
var result = '';
var c;
for (var i = 0; i < text.length; i++) {
c = text.charCodeAt(i);
if (c >= 0x0001 && c <= 0x007F) {
result += text.charAt(i);
} else if (c > 0x07FF) {
result += String.fromCharCode(0xE0 | c >> 12 & 0x0F);
result += String.fromCharCode(0x80 | c >> 6 & 0x3F);
result += String.fromCharCode(0x80 | c >> 0 & 0x3F);
} else {
result += String.fromCharCode(0xC0 | c >> 6 & 0x1F);
result += String.fromCharCode(0x80 | c >> 0 & 0x3F);
}
}
return result;
}
uQRCode = {
errorCorrectLevel: QRErrorCorrectLevel,
defaults: {
size: 354,
margin: 0,
backgroundColor: '#ffffff',
foregroundColor: '#000000',
fileType: 'png', // 'jpg', 'png'
errorCorrectLevel: QRErrorCorrectLevel.H,
typeNumber: -1
},
make: function(options) {
return new Promise((reslove, reject) => {
var defaultOptions = {
canvasId: options.canvasId,
componentInstance: options.componentInstance,
text: options.text,
size: this.defaults.size,
margin: this.defaults.margin,
backgroundColor: this.defaults.backgroundColor,
foregroundColor: this.defaults.foregroundColor,
fileType: this.defaults.fileType,
errorCorrectLevel: this.defaults.errorCorrectLevel,
typeNumber: this.defaults.typeNumber
};
if (options) {
for (var i in options) {
defaultOptions[i] = options[i];
}
}
options = defaultOptions;
if (!options.canvasId) {
console.error('uQRCode: Please set canvasId!');
return;
}
function createCanvas() {
var qrcode = new QRCode(options.typeNumber, options.errorCorrectLevel);
qrcode.addData(utf16To8(options.text));
qrcode.make();
var ctx = uni.createCanvasContext(options.canvasId, options.componentInstance);
ctx.setFillStyle(options.backgroundColor);
ctx.fillRect(0, 0, options.size, options.size);
var tileW = (options.size - options.margin * 2) / qrcode.getModuleCount();
var tileH = tileW;
for (var row = 0; row < qrcode.getModuleCount(); row++) {
for (var col = 0; col < qrcode.getModuleCount(); col++) {
var style = qrcode.isDark(row, col) ? options.foregroundColor : options.backgroundColor;
ctx.setFillStyle(style);
var x = Math.round(col * tileW) + options.margin;
var y = Math.round(row * tileH) + options.margin;
var w = Math.ceil((col + 1) * tileW) - Math.floor(col * tileW);
var h = Math.ceil((row + 1) * tileW) - Math.floor(row * tileW);
ctx.fillRect(x, y, w, h);
}
}
setTimeout(function() {
ctx.draw(false, (function() {
setTimeout(function() {
uni.canvasToTempFilePath({
canvasId: options.canvasId,
fileType: options.fileType,
width: options.size,
height: options.size,
destWidth: options.size,
destHeight: options.size,
success: function(res) {
let resData; // 将统一为base64格式
let tempFilePath = res.tempFilePath; // H5为base64,其他为相对路径
// #ifdef H5
resData = tempFilePath;
options.success && options.success(resData);
reslove(resData);
// #endif
// #ifdef APP-PLUS
const path = plus.io.convertLocalFileSystemURL(tempFilePath) // 绝对路径
let fileReader = new plus.io.FileReader();
fileReader.readAsDataURL(path);
fileReader.onloadend = res => {
resData = res.target.result;
options.success && options.success(resData);
reslove(resData);
};
// #endif
// #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO
uni.getFileSystemManager().readFile({
filePath: tempFilePath,
encoding: 'base64',
success: res => {
resData = 'data:image/png;base64,' + res.data;
options.success && options.success(resData);
reslove(resData);
}
})
// #endif
// #ifndef H5 || APP-PLUS || MP-WEIXIN || MP-QQ || MP-TOUTIAO
if (plus) {
const path = plus.io.convertLocalFileSystemURL(tempFilePath) // 绝对路径
let fileReader = new plus.io.FileReader();
fileReader.readAsDataURL(path);
fileReader.onloadend = res => {
resData = res.target.result;
options.success && options.success(resData);
reslove(resData);
};
} else {
uni.request({
url: tempFilePath,
method: 'GET',
responseType: 'arraybuffer',
success: res => {
resData = `data:image/png;base64,${uni.arrayBufferToBase64(res.data)}`; // 把arraybuffer转成base64
options.success && options.success(resData);
reslove(resData);
}
})
}
// #endif
},
fail: function(error) {
options.fail && options.fail(error);
reject(error);
},
complete: function(res) {
options.complete && options.complete(res);
}
}, options.componentInstance);
}, options.text.length + 100);
})());
}, 150);
}
createCanvas();
});
}
}
})()
export default uQRCode
================================================
FILE: components/default-page/default-page.vue
================================================
{{title}}
去逛逛
================================================
FILE: components/m-airbtn/index.vue
================================================
打开{{config.name}}
================================================
FILE: components/m-buy/README.md
================================================
## 购买组件
1.本组件是砍价,积分购买,参团等复用组
2.后续会将此组件和商品购买组件合并,文档后续再出
================================================
FILE: components/m-buy/goods.vue
================================================