├── .gitignore ├── .hbuilderx └── launch.json ├── .vscode └── launch.json ├── App.vue ├── CustomStartPage └── start-page.9.png ├── CustomStoryboard ├── 1@2x.png ├── 1@3x.png ├── 2@2x.png ├── 2@3x.png └── 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 │ ├── imgs │ └── domain.jpeg │ └── js │ └── webView.js ├── icon.png ├── 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.json ├── pages ├── cart │ ├── coupon │ │ ├── couponCenter.vue │ │ ├── couponDetail.vue │ │ ├── index.vue │ │ └── myCoupon.vue │ ├── payment │ │ ├── error.vue │ │ ├── payOrder.vue │ │ ├── shareOrderGoods.vue │ │ └── success.vue │ └── static │ │ └── pay.png ├── 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 │ ├── imgs │ │ └── line.png │ ├── 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 │ ├── static │ │ └── logo-title.png │ ├── 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 │ ├── static │ │ ├── head-sample.png │ │ ├── help-bargain.png │ │ ├── live.gif │ │ ├── live.png │ │ └── zan.gif │ └── 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 ├── plugins └── APPUpdate │ ├── APPUpdate.md │ └── index.js ├── pushGithub.sh ├── static ├── appleidButton@2x.png ├── bg.png ├── bg1.png ├── buy.png ├── cpauto1.png ├── emptyCart.png ├── exchange.png ├── img │ ├── main-bg.png │ ├── overdue.png │ ├── sort0.png │ ├── sort1.png │ ├── sort2.png │ ├── title.png │ └── used.png ├── index │ ├── arrow-down-1.png │ ├── arrow-down.png │ ├── arrow-up-1.png │ └── arrow-up.png ├── join-buy.png ├── logo.png ├── mine │ ├── Feedback.png │ ├── couponcenter.png │ ├── distribution.png │ ├── feedback.png │ ├── im.png │ ├── kanjia.png │ ├── logistics.png │ ├── myaddress.png │ ├── mycommit.png │ ├── mycoupon.png │ ├── myfavorite.png │ ├── myhistory.png │ ├── mypoint.png │ ├── pointgift.png │ ├── setting.png │ ├── share.png │ ├── shensu.png │ └── sign.png ├── missing-face.png ├── nodata.png ├── order │ ├── t1.png │ └── t3.png ├── point-bg.png ├── pointTrade │ ├── point_bg_1.png │ └── tradehall.png ├── seckill.png ├── star.png ├── tabbar │ ├── cart-s.png │ ├── cart.png │ ├── category-s.png │ ├── category.png │ ├── home-s.png │ ├── home.png │ ├── mine-s.png │ ├── mine.png │ ├── point-mall-s.png │ └── point-mall.png └── title.png ├── 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-cropper │ │ ├── u-avatar-cropper.vue │ │ └── weCropper.js │ ├── u-avatar │ │ └── u-avatar.vue │ ├── 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-group │ │ └── u-checkbox-group.vue │ ├── u-checkbox │ │ └── u-checkbox.vue │ ├── u-circle-progress │ │ └── u-circle-progress.vue │ ├── u-col │ │ └── u-col.vue │ ├── u-collapse-item │ │ └── u-collapse-item.vue │ ├── u-collapse │ │ └── u-collapse.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-item │ │ └── u-form-item.vue │ ├── u-form │ │ └── u-form.vue │ ├── u-full-screen │ │ └── u-full-screen.vue │ ├── u-gap │ │ └── u-gap.vue │ ├── u-grid-item │ │ └── u-grid-item.vue │ ├── u-grid │ │ └── u-grid.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-progress │ │ └── u-line-progress.vue │ ├── u-line │ │ └── u-line.vue │ ├── u-link │ │ └── u-link.vue │ ├── u-loading-page │ │ └── u-loading-page.vue │ ├── u-loading │ │ └── u-loading.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-group │ │ └── u-radio-group.vue │ ├── u-radio │ │ └── u-radio.vue │ ├── u-rate │ │ └── u-rate.vue │ ├── u-read-more │ │ └── u-read-more.vue │ ├── u-row-notice │ │ └── u-row-notice.vue │ ├── u-row │ │ └── u-row.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-swiper │ │ └── u-tabs-swiper.vue │ ├── u-tabs │ │ └── u-tabs.vue │ ├── u-tag │ │ └── u-tag.vue │ ├── u-td │ │ └── u-td.vue │ ├── u-th │ │ └── u-th.vue │ ├── u-time-line-item │ │ └── u-time-line-item.vue │ ├── u-time-line │ │ └── u-time-line.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 /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | node_modules/ 5 | 6 | #Intellij idea 7 | .idea/ 8 | /idea/ 9 | .vscode/ 10 | /unpackage/ 11 | .hbuilderx/launch.json 12 | .project.config.json 13 | .project.private.config.json 14 | -------------------------------------------------------------------------------- /.hbuilderx/launch.json: -------------------------------------------------------------------------------- 1 | { // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ 2 | // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 3 | "version": "0.0", 4 | "configurations": [{ 5 | "app-plus" : 6 | { 7 | "launchtype" : "remote" 8 | }, 9 | "default" : 10 | { 11 | "launchtype" : "remote" 12 | }, 13 | "h5" : 14 | { 15 | "launchtype" : "remote" 16 | }, 17 | "mp-weixin" : 18 | { 19 | "launchtype" : "remote" 20 | }, 21 | "type" : "uniCloud" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "pwa-chrome", 9 | "request": "launch", 10 | "name": "Launch Chrome against localhost", 11 | "url": "http://localhost:8080", 12 | "webRoot": "${workspaceFolder}" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /CustomStartPage/start-page.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/CustomStartPage/start-page.9.png -------------------------------------------------------------------------------- /CustomStoryboard/1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/CustomStoryboard/1@2x.png -------------------------------------------------------------------------------- /CustomStoryboard/1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/CustomStoryboard/1@3x.png -------------------------------------------------------------------------------- /CustomStoryboard/2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/CustomStoryboard/2@2x.png -------------------------------------------------------------------------------- /CustomStoryboard/2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/CustomStoryboard/2@3x.png -------------------------------------------------------------------------------- /androidPrivacy.json: -------------------------------------------------------------------------------- 1 | { 2 | "version" : "1", 3 | "prompt" : "template", 4 | "title" : "服务协议和隐私政策", 5 | "message" : " 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。 你可阅读《服务协议》和《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", 6 | "buttonAccept" : "同意并接受", 7 | "buttonRefuse" : "暂不同意", 8 | "second" : { 9 | "title" : "确认提示", 10 | "message" : " 进入应用前,你需先同意《服务协议》和《隐私政策》,否则将退出应用。", 11 | "buttonAccept" : "同意并继续", 12 | "buttonRefuse" : "退出应用" 13 | }, 14 | "styles" : { 15 | "borderRadius" : "5px" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /api/article.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 文章相关API 3 | */ 4 | 5 | import {http,Method} from '@/utils/request.js'; 6 | import api from '@/config/api.js'; 7 | 8 | /** 9 | * 获取某个分类的文章列表 10 | * @param category_type 11 | */ 12 | export function getArticleCategory(category_type) { 13 | return http.request({ 14 | url: `${api.base}/pages/article-categories`, 15 | method: Method.GET, 16 | params: {category_type}, 17 | }); 18 | } 19 | 20 | /** 21 | * 获取文章详情 22 | * @param type 23 | */ 24 | export function getArticleDetail(type) { 25 | return http.request({ 26 | url: `/other/article/get/${type}`, 27 | method: Method.GET, 28 | }); 29 | } 30 | 31 | /** 32 | * 获取文章详情 33 | * @param type 34 | */ 35 | export function getArticleDetailByType(type) { 36 | return http.request({ 37 | url: `/other/article/type/${type}`, 38 | method: Method.GET, 39 | }); 40 | } 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /api/common.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 公共API 3 | */ 4 | import { http, Method } from "@/utils/request.js"; 5 | import api from "@/config/api.js"; 6 | 7 | /** 8 | * 获取地区数据 9 | * @param id 10 | */ 11 | export function getRegionsById(id = 0) { 12 | return http.request({ 13 | url: `${api.common}/common/region/item/${id}`, 14 | method: Method.GET, 15 | message: false, 16 | }); 17 | } 18 | 19 | // 获取IM接口前缀 20 | export function getIMDetail() { 21 | return http.request({ 22 | url: `${api.common}/IM`, 23 | method: Method.GET, 24 | message: false, 25 | }); 26 | } 27 | 28 | /** 29 | * 文件上传地址 30 | * @type {string} 31 | */ 32 | export const upload = api.common + "/common/upload/file"; 33 | -------------------------------------------------------------------------------- /api/connect.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 信任登录相关API 3 | */ 4 | 5 | import { 6 | http, 7 | Method 8 | } from '@/utils/request.js'; 9 | const request = http.request; 10 | 11 | 12 | /** 13 | * web 第三方登录 14 | * @param {Object} code 15 | */ 16 | export function webConnect(code) { 17 | return http.request({ 18 | url: `passport/connect/connect/login/web/${code}`, 19 | method: Method.GET, 20 | needToken: true, 21 | header: { 22 | "clientType": "H5" 23 | } 24 | }); 25 | } 26 | export function openIdLogin(params, clientType) { 27 | return http.request({ 28 | url: `passport/connect/connect/app/login`, 29 | method: Method.POST, 30 | needToken: true, 31 | data: params, 32 | header: { 33 | "clientType": clientType 34 | } 35 | }); 36 | } 37 | 38 | /** 39 | * 第三方登录成功 回调接口 40 | */ 41 | export function loginCallback(state) { 42 | return http.request({ 43 | url: `passport/connect/connect/result?state=${state}`, 44 | method: Method.GET, 45 | needToken: false 46 | }); 47 | } 48 | 49 | 50 | 51 | /** 52 | * 小程序自动登录 53 | * @param params 54 | */ 55 | export function mpAutoLogin(params) { 56 | return http.request({ 57 | url: 'passport/connect/miniProgram/auto-login', 58 | method: Method.GET, 59 | params 60 | }); 61 | } 62 | -------------------------------------------------------------------------------- /api/entry.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 入驻类相关api 3 | */ 4 | 5 | import { http, Method } from "@/utils/request.js"; 6 | 7 | // 获取当前用户的代理入驻详情 8 | export function getCompanyDetail(params) { 9 | return http.request({ 10 | url: "/store/store/apply", 11 | method: Method.GET, 12 | params, 13 | }); 14 | } 15 | 16 | // 申请店铺第一步-填写企业信息 17 | export function applyFirst(params) { 18 | return http.request({ 19 | url: "/store/store/apply/first", 20 | method: Method.PUT, 21 | params, 22 | }); 23 | } 24 | 25 | // 申请店铺第二步-填写银行 26 | export function applySecond(params) { 27 | return http.request({ 28 | url: "/store/store/apply/second", 29 | method: Method.PUT, 30 | params, 31 | }); 32 | } 33 | 34 | // 申请店铺第三步-填写银行 35 | export function applyThird(params) { 36 | return http.request({ 37 | url: "/store/store/apply/third", 38 | method: Method.PUT, 39 | params, 40 | }); 41 | } 42 | -------------------------------------------------------------------------------- /api/home.js: -------------------------------------------------------------------------------- 1 | import { http, Method } from "@/utils/request.js"; 2 | 3 | export function toSpecial(data) { 4 | return http.request({ 5 | url: `/other/pageData/getSpecial`, 6 | method: Method.GET, 7 | data 8 | }); 9 | } 10 | /** 11 | * 专题内容 12 | */ 13 | export function getSpecial(id) { 14 | return http.request({ 15 | url: `/other/pageData/get/${id}`, 16 | method: Method.GET, 17 | }); 18 | } 19 | 20 | /** 21 | * 获取广告图 22 | */ 23 | export function getAdvertisement() { 24 | return http.request({ 25 | url: "/advertisement", 26 | method: Method.GET, 27 | }); 28 | } 29 | 30 | 31 | 32 | /** 33 | * 获取首页商品分类 34 | * @param parent_id 35 | */ 36 | export function getCategory(parent_id = 0) { 37 | return http.request({ 38 | url: `goods/categories/${parent_id}/children`, 39 | method: Method.GET, 40 | loading: false, 41 | }); 42 | } 43 | 44 | /** 45 | * 获取热门关键词 46 | * @param num 47 | */ 48 | export function getHotKeywords(count) { 49 | return http.request({ 50 | url: "/goods/goods/hot-words", 51 | method: Method.GET, 52 | loading: false, 53 | params: { count }, 54 | }); 55 | } 56 | 57 | /** 58 | * 获取楼层数据 59 | * @param client_type 60 | * @param page_type 61 | */ 62 | export function getFloorData(params) { 63 | return http.request({ 64 | url: `/other/pageData/getIndex?clientType=H5`, 65 | method: "get", 66 | params 67 | }); 68 | } 69 | 70 | /** 71 | * 获取店铺楼层数据 72 | */ 73 | export function getFloorStoreData(params) { 74 | return http.request({ 75 | url: `/other/pageData?pageClientType=H5`, 76 | method: "get", 77 | params 78 | }); 79 | } 80 | 81 | /** 82 | * 获取获取首页分类数据 83 | */ 84 | export function getCategoryIndexData(parentId = 0) { 85 | return http.request({ 86 | url: `/goods/category/get/${parentId}`, 87 | method: "get", 88 | }); 89 | } 90 | -------------------------------------------------------------------------------- /api/im.js: -------------------------------------------------------------------------------- 1 | import { http,Method } from "@/utils/request.js"; 2 | 3 | import api from "@/config/api.js"; 4 | 5 | /** 6 | * 获取聊天详情接口 7 | * @param {*} talkId 8 | * @returns 9 | */ 10 | export function getTalk(talkId) { 11 | return http.request({ 12 | url: `${api.im}/talk/${talkId}`, 13 | method: Method.GET, 14 | }); 15 | } 16 | 17 | /** 18 | * 获取与用户的聊天详情 19 | * @param {*} talkId 20 | * @returns 21 | */ 22 | export function getTalkByUser(userId) { 23 | return http.request({ 24 | url: `${api.im}/talk/by/user/${userId}`, 25 | method: Method.GET, 26 | }); 27 | } 28 | 29 | /** 30 | * 获取聊天列表 31 | * @param {*} talkId 32 | * @returns 33 | */ 34 | export function getTalkList(params) { 35 | return http.request({ 36 | url: `${api.im}/talk/list`, 37 | method: Method.GET, 38 | params 39 | }); 40 | } 41 | 42 | /** 43 | * 获取聊天信息接口 44 | * @param {*} params 45 | * @returns 46 | */ 47 | export function getTalkMessage(params) { 48 | return http.request({ 49 | url: `${api.im}/message`, 50 | method: Method.GET, 51 | params 52 | }); 53 | } 54 | 55 | /** 56 | * 获取聊天信息接口 57 | * @param {*} params 58 | * @returns 59 | */ 60 | export function cleanUnreadMessage(params) { 61 | return http.request({ 62 | url: `${api.im}/message/clean/unred`, 63 | method: Method.PUT, 64 | params 65 | }); 66 | } 67 | // 从商品页点击 客服 跳转 获取商品详情 68 | export function jumpObtain(skuId, goodsId) { 69 | return http.request({ 70 | url: `/goods/goods/sku/${goodsId}/${skuId}`, 71 | method: Method.GET, 72 | }); 73 | } 74 | // 清除未读 75 | // /im/message/clean/unred 76 | export function clearmeaager() { 77 | return http.request({ 78 | url: `${api.im}/message/clean/unred`, 79 | method: Method.PUT, 80 | }); 81 | } 82 | 83 | -------------------------------------------------------------------------------- /api/point.js: -------------------------------------------------------------------------------- 1 | 2 | import {http, Method} from '@/utils/request.js'; 3 | 4 | /** 5 | * 签到 6 | * @param params 7 | */ 8 | export function sign() { 9 | return http.request({ 10 | url: '/members/sign', 11 | method: Method.POST, 12 | needToken: true, 13 | }); 14 | } 15 | 16 | 17 | 18 | /** 19 | * 签到时间获取 20 | * @param params 21 | */ 22 | export function signTime(time) { 23 | return http.request({ 24 | url: '/members/sign?time='+time, 25 | method: Method.GET, 26 | needToken: true, 27 | }); 28 | } 29 | -------------------------------------------------------------------------------- /api/store.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 店铺相关API 3 | */ 4 | 5 | import {http, Method} from '@/utils/request.js'; 6 | 7 | 8 | 9 | 10 | /** 11 | * 获取店铺列表 12 | * @param params 13 | */ 14 | export function getStoreList(params) { 15 | return http.request({ 16 | url: '/store/store', 17 | method: Method.GET, 18 | params, 19 | }); 20 | } 21 | 22 | /** 23 | * 获取店铺基本信息 24 | * @param storeId 25 | */ 26 | export function getStoreBaseInfo(storeId) { 27 | return http.request({ 28 | url: `/store/store/get/detail/${storeId}`, 29 | method: Method.GET, 30 | loading: false, 31 | }); 32 | } 33 | 34 | /** 35 | * 获取店铺分类 36 | * @param id 37 | */ 38 | export function getStoreCategory(id) { 39 | return http.request({ 40 | url: `/store/store/label/get/${id}`, 41 | method: Method.GET, 42 | }); 43 | } 44 | 45 | 46 | /** 47 | * 营业执照 48 | * @param id 49 | */ 50 | export function getLicencePhoto(id) { 51 | return http.request({ 52 | url: `/store/store/get/licencePhoto/${id}`, 53 | method: Method.GET, 54 | }); 55 | } 56 | 57 | 58 | /** 59 | * 获取自提点信息 60 | * @param id 61 | */ 62 | export function getStoreAddress(storeId,params) { 63 | return http.request({ 64 | url: `/store/address/page/${storeId}`, 65 | method: Method.GET, 66 | params 67 | }); 68 | } 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /components/default-page/default-page.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{title}} 6 | 7 | 去逛逛 8 | 9 | 10 | 11 | 12 | 13 | 48 | 49 | 87 | -------------------------------------------------------------------------------- /components/m-buy/README.md: -------------------------------------------------------------------------------- 1 | ## 购买组件 2 | 1.本组件是砍价,积分购买,参团等复用组 3 | 2.后续会将此组件和商品购买组件合并,文档后续再出 4 | -------------------------------------------------------------------------------- /components/m-buy/popup.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | export default { 4 | height:"1000rpx", //弹出层高度 5 | mode:"bottom", //弹出层位置 6 | radius:"32", //圆角 rpx, 7 | close:false //能否点击遮罩退出 8 | } -------------------------------------------------------------------------------- /components/m-buy/popup.scss: -------------------------------------------------------------------------------- 1 | .view-class-title { 2 | font-size: 26rpx; 3 | color: #262626; 4 | 5 | font-weight: 700; 6 | height: 80rpx; 7 | line-height: 80rpx; 8 | } 9 | .confirmBtn { 10 | width: 90%; 11 | } 12 | .confirmBtn, 13 | .box-btn { 14 | line-height: 80rpx; 15 | height: 80rpx; 16 | 17 | background: $price-color; 18 | color: #fff; 19 | border-radius: 200px; 20 | text-align: center; 21 | margin: 5rpx auto; 22 | } 23 | 24 | .btns { 25 | display: flex; 26 | width: 100%; 27 | 28 | margin: 0 auto; 29 | } 30 | .goods-price-bigshow { 31 | font-size: 48rpx; 32 | font-weight: bold; 33 | } 34 | .box-btn { 35 | flex: 1; 36 | margin: 0 10rpx; 37 | } 38 | -------------------------------------------------------------------------------- /components/m-canvas/README.md: -------------------------------------------------------------------------------- 1 | ### 说明 https://ext.dcloud.net.cn/plugin?id=3237 2 | -------------------------------------------------------------------------------- /components/m-goods-list/README.md: -------------------------------------------------------------------------------- 1 | ## 商品列表展示 2 | 3 | ### OBJECT 参数说明 4 | 5 | | 属性 | 说明 | 类型 | 必填 | 6 | | ----------- | ---------------------------------------------------------- | ------- | ---- | 7 | | `res` | 显示数据 | Array | 是 | 8 | | `type` | 商品展示类型 oneColumns twoColumns ,默认展示一行两列商品 | String | 否 | 9 | | `storeName` | 是否展示店铺名称,默认展示 | Boolean | 否 | 10 | | `keywords` | 高亮展示搜索内容 | String | 否 | 11 | 12 | -------------------------------------------------------------------------------- /components/m-goods-list/common.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 66 | 67 | 70 | -------------------------------------------------------------------------------- /components/m-goods-recommend/README.md: -------------------------------------------------------------------------------- 1 | ## 商品推荐 2 | 3 | 4 | ### OBJECT 参数说明 5 | 属性|说明|类型|必填 6 | ---|---|---|--- 7 | `title`|标题,用于顶部显示的内容|String|否 8 | `pageSize`|显示多少条数据,建议是2的倍数,默认为12条|*|否 9 | `categoryId`|分类id|Function|否 10 | `storeId`|卖家id,搜索店铺商品的时候使用|String|否 -------------------------------------------------------------------------------- /components/m-share/mp-share.scss: -------------------------------------------------------------------------------- 1 | .share-btn { 2 | background: none; 3 | font-size: 24rpx; 4 | color: #666; 5 | display: flex; 6 | flex-direction: column; 7 | align-items: center; 8 | } 9 | -------------------------------------------------------------------------------- /components/m-take-down-sale-goods/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 该商品已下架 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 26 | 27 | 35 | -------------------------------------------------------------------------------- /config/api.js: -------------------------------------------------------------------------------- 1 | /** 2 | * base : 基础业务API 3 | * buyer : 买家API 4 | */ 5 | // 开发环境 6 | const dev = { 7 | im: "https://im-api.pickmall.cn", 8 | common: "https://common-api.pickmall.cn", 9 | buyer: "https://buyer-api.pickmall.cn", 10 | // common: "http://192.168.0.113:8890", 11 | // buyer: "http://192.168.0.113:8888", 12 | // im: "http://192.168.0.113:8885", 13 | }; 14 | // 生产环境 15 | const prod = { 16 | im: "https://im-api.pickmall.cn", 17 | common: "https://common-api.pickmall.cn", 18 | buyer: "https://buyer-api.pickmall.cn", 19 | }; 20 | 21 | //默认生产环境 22 | let api = dev; 23 | //如果是开发环境 24 | if (process.env.NODE_ENV == "development") { 25 | api = dev; 26 | } else { 27 | api = prod; 28 | } 29 | //微信小程序,app的打包方式建议为生产环境,所以这块直接条件编译赋值 30 | // #ifdef MP-WEIXIN || APP-PLUS 31 | api = prod; 32 | // #endif 33 | 34 | api.buyer += "/buyer"; 35 | api.common += "/common"; 36 | api.im += "/im"; 37 | export default { 38 | ...api, 39 | }; 40 | -------------------------------------------------------------------------------- /config/config.js: -------------------------------------------------------------------------------- 1 | const name = "lilishop"; //全局商城name 2 | const schemeName = "lilishop"; //唤醒app需要的schemeName 3 | export default { 4 | name: name, 5 | schemeLink: `${schemeName}://`, //唤起app地址 6 | downloadLink: "https://pickmall.cn/download-page/index.html", //下载地址,下载app的地址 7 | shareLink: "https://m-b2b2c.pickmall.cn", //分享地址,也就是在h5中默认的复制地址 8 | appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态) 9 | aMapKey: "1f78544934b66c9fbc0104117f663973", //在高德中申请Web服务key 10 | scanAuthNavigation: ["https://m-b2b2c.pickmall.cn/"], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转 11 | iosAppId: "id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看 12 | logo: "https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址 13 | customerServiceMobile: "13161366885", //客服电话 14 | customerServiceEmail: "lili@lili.com", //客服邮箱 15 | imWebSrc: "https://im.pickmall.cn", //IM地址 16 | baseWsUrl: "wss://im-api.pickmall.cn/lili/webSocket", // IM WS 地址 17 | enableGetClipboard: false, //是否启用粘贴板获取 scanAuthNavigation 中的链接,如果匹配则会跳转到对应页面 18 | enableMiniBarStartUpApp: true, //是否在h5中右侧浮空按钮点击启动app 19 | /** 20 | * 如需更换主题请修改此处以及uni.scss中的全局颜色 21 | */ 22 | mainColor: "#ff3c2a", // 主题色 23 | lightColor: "#ff6b35", // 高亮主题色 24 | aiderLightColor: "#ff9f28", // 辅助高亮颜色 25 | defaultUserPhoto: "/static/missing-face.png", // 默认用户头像 26 | enableFetchMobileLogin: false // 是否启用获取手机号登录 如果微信小程序提示封禁手机号获取权限 可将此选项设置成false作为备用登录方案 27 | }; 28 | -------------------------------------------------------------------------------- /hybrid/html/imgs/domain.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/hybrid/html/imgs/domain.jpeg -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/icon.png -------------------------------------------------------------------------------- /js_sdk/h5-copy/h5-copy.js: -------------------------------------------------------------------------------- 1 | export function h5Copy(content) { 2 | 3 | if (!document.queryCommandSupported('copy')) { 4 | // 不支持 5 | return false 6 | } 7 | 8 | let textarea = document.createElement("textarea") 9 | textarea.value = content 10 | textarea.readOnly = "readOnly" 11 | document.body.appendChild(textarea) 12 | textarea.select() // 选择对象 13 | textarea.setSelectionRange(0, content.length) //核心 14 | let result = document.execCommand("copy") // 执行浏览器复制命令 15 | textarea.remove() 16 | return result 17 | 18 | } 19 | 20 | 21 | 22 | /** 23 | * 获取系统剪贴板内容 24 | */ 25 | export function getClipboardData() { 26 | return new Promise((success, fail) => { 27 | // #ifndef H5 28 | uni.getClipboardData({ 29 | success: ({ data }) => success(data), 30 | fail 31 | }) 32 | // #endif 33 | 34 | // #ifdef H5 35 | try { 36 | navigator.clipboard.readText().then(success).catch(fail) 37 | } catch (error) { 38 | fail(error) 39 | } 40 | // #endif 41 | }) 42 | } -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/draw-poster.d.ts: -------------------------------------------------------------------------------- 1 | import { Canvas, DrawPosterCanvasCtx, CreateImagePathOptions, DrawPosterBuildOpts, DrawPosterUseOpts, drawPosterExtends, DrawPosterUseCtxOpts } from "./utils/interface"; 2 | declare type DrawPosterInstanceType = InstanceType & drawPosterExtends; 3 | declare class DrawPoster { 4 | canvas: Canvas; 5 | ctx: DrawPosterCanvasCtx; 6 | canvasId: string; 7 | loading: boolean; 8 | debugging: boolean; 9 | loadingText: string; 10 | createText: string; 11 | [key: string]: any; 12 | private executeOnions; 13 | private stopStatus; 14 | private drawType; 15 | /** 构建器, 构建返回当前实例, 并挂载多个方法 */ 16 | constructor(canvas: Canvas, ctx: DrawPosterCanvasCtx, canvasId: string, loading: boolean, debugging: boolean, loadingText: string, createText: string, tips: boolean); 17 | /** 提示器, 传入消息与数据 */ 18 | private debuggingLog; 19 | /** 传入挂载配置对象, 添加扩展方法 */ 20 | static use: (opts: DrawPosterUseOpts) => void; 21 | /** 传入挂载配置对象, 添加绘画扩展方法 */ 22 | static useCtx: (opts: DrawPosterUseCtxOpts) => void; 23 | /** 构建绘制海报矩形方法, 传入canvas选择器或配置对象, 返回绘制对象 */ 24 | static build: (options: string | DrawPosterBuildOpts, tips?: boolean) => Promise; 25 | /** 构建多个绘制海报矩形方法, 传入选择器或配置对象的数组, 返回多个绘制对象 */ 26 | static buildAll: (optionsAll: (string | DrawPosterBuildOpts)[]) => Promise<{ 27 | [key: string]: DrawPosterInstanceType; 28 | }>; 29 | /** 绘制器, 接收执行器函数, 添加到绘制容器中 */ 30 | draw: (execute: (ctx: DrawPosterCanvasCtx) => Promise | void) => void; 31 | /** 等待创建绘画, 成功后清空绘制器容器 */ 32 | awaitCreate: () => Promise; 33 | /** 创建canvas本地地址 @returns {string} 本地地址 */ 34 | createImagePath: (baseOptions?: CreateImagePathOptions) => Promise; 35 | /** 停止当前绘画, 调用则停止当前绘画堆栈的绘画 */ 36 | stop: () => void; 37 | } 38 | export default DrawPoster; 39 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/create-from-list/index.d.ts: -------------------------------------------------------------------------------- 1 | import { DrawPosterUseOpts } from '../../utils/interface'; 2 | export interface CreateLayerOpts { 3 | background?: string; 4 | self?: boolean; 5 | line?: boolean; 6 | lineHeight?: number; 7 | } 8 | export interface DrawRowOpt { 9 | text?: string; 10 | font?: string; 11 | color?: string; 12 | center?: boolean; 13 | width?: number; 14 | } 15 | declare const _default: DrawPosterUseOpts; 16 | /** 绘制表单扩展方法 */ 17 | export default _default; 18 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/create-gcanvas/index.d.ts: -------------------------------------------------------------------------------- 1 | import { DrawPosterUseOpts } from '../../utils/interface'; 2 | export * from './gcanvas'; 3 | declare const _default: DrawPosterUseOpts; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/create-gcanvas/index.js: -------------------------------------------------------------------------------- 1 | import { WeexBridge, enable, Image } from './gcanvas'; 2 | export * from './gcanvas'; 3 | import DrawPoster from "../../draw-poster"; 4 | DrawPoster.prototype['gcanvas'] = { 5 | WeexBridge, 6 | enable, 7 | Image 8 | }; 9 | export default {}; 10 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/draw-image-fit.d.ts: -------------------------------------------------------------------------------- 1 | import { DrawPosterUseCtxOpts } from '../../utils/interface'; 2 | import { ObjectFit, ObjectPosition, Size } from "../../utils/object-sizing"; 3 | export interface ImageFitOption { 4 | radius?: number; 5 | objectFit?: ObjectFit; 6 | intrinsicSize?: Size; 7 | specifiedSize?: Size; 8 | intrinsicPosition?: ObjectPosition; 9 | specifiedPosition?: [number, number]; 10 | } 11 | declare const _default: DrawPosterUseCtxOpts; 12 | export default _default; 13 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/draw-image-fit.js: -------------------------------------------------------------------------------- 1 | import { calculateConcreteRect } from "../../utils/object-sizing"; 2 | import uni from "../../utils/global"; 3 | export default { 4 | name: 'drawImageFit', 5 | handle: async (canvas, ctx, url, options) => { 6 | var _a, _b, _c; 7 | const [error, imageInfo] = await uni.getImageInfo({ src: url }); 8 | // 配置默认值 9 | const style = Object.assign({ radius: 0, objectFit: 'cover', intrinsicSize: { width: (_a = imageInfo === null || imageInfo === void 0 ? void 0 : imageInfo.width) !== null && _a !== void 0 ? _a : 100, height: (_b = imageInfo === null || imageInfo === void 0 ? void 0 : imageInfo.height) !== null && _b !== void 0 ? _b : 100 }, specifiedSize: { width: 100, height: 100 }, intrinsicPosition: ['center', 'center'], specifiedPosition: [0, 0] }, options); 10 | // 计算图片尺寸 11 | const drawImageInfo = calculateConcreteRect(style, style.intrinsicSize, style.specifiedSize); 12 | // 如有圆角, 则进行裁剪 13 | if (style.radius > 0) { 14 | ctx.save(); 15 | (_c = ctx.setFillStyle) === null || _c === void 0 ? void 0 : _c.call(ctx, 'transparent'); 16 | ctx.fillStyle = 'transparent'; 17 | ctx.fillRoundRect(style.specifiedPosition[0], style.specifiedPosition[1], style.specifiedSize.width, style.specifiedSize.height, style.radius); 18 | ctx.clip(); 19 | } 20 | const result = await ctx.drawImage(url, ...Object.values(drawImageInfo)); 21 | if (style.radius > 0) 22 | ctx.restore(); 23 | return result; 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/draw-image.d.ts: -------------------------------------------------------------------------------- 1 | import { DrawPosterUseCtxOpts } from '../../utils/interface'; 2 | declare const _default: DrawPosterUseCtxOpts; 3 | /** 等待绘制图片原型方法 */ 4 | export default _default; 5 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/draw-image.js: -------------------------------------------------------------------------------- 1 | import { downloadImgUrl } from '../../utils/wx-utils'; 2 | /** 等待绘制图片原型方法 */ 3 | export default { 4 | name: 'drawImage', 5 | init: (canvas, ctx) => { 6 | ctx.drawImageProto = ctx.drawImage; 7 | }, 8 | handle: async (canvas, ctx, url, sx, sy, sh, sw, dx, dy, dh, dw) => { 9 | // 下载路径 10 | const path = await downloadImgUrl(url); 11 | // 标记当前绘画存在图片绘制 12 | let result = false; 13 | // 基本绘制方法, 如果是 fit 方式, 则传入所有参数, 不然则只传入四个参数 14 | const baseDrawImage = (imageResource) => { 15 | const isFit = typeof dx === 'number' && typeof dw === 'number'; 16 | if (isFit) { 17 | ctx.drawImageProto(imageResource, sx, sy, sh, sw, dx, dy, dh, dw); 18 | } 19 | else { 20 | ctx.drawImageProto(imageResource, sx, sy, sh, sw); 21 | } 22 | }; 23 | // 如果是 context 绘制方式, 则直接绘制 24 | if (ctx.drawType === 'context') { 25 | baseDrawImage(path); 26 | result = true; 27 | } 28 | // 如果是 type2d 绘制方式, 则等待图片绘制完毕 29 | if (ctx.drawType === 'type2d') { 30 | result = await new Promise(resolve => { 31 | const image = canvas.createImage(); 32 | image.src = path; 33 | image.onload = () => { 34 | baseDrawImage(image); 35 | resolve(true); 36 | }; 37 | image.onerror = () => resolve(false); 38 | }); 39 | } 40 | return result; 41 | } 42 | }; 43 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/draw-round-image.d.ts: -------------------------------------------------------------------------------- 1 | import { DrawPosterUseCtxOpts } from '../../utils/interface'; 2 | declare const _default: DrawPosterUseCtxOpts; 3 | /** 绘制圆角图片原型方法 */ 4 | export default _default; 5 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/draw-round-image.js: -------------------------------------------------------------------------------- 1 | /** 绘制圆角图片原型方法 */ 2 | export default { 3 | name: 'drawRoundImage', 4 | handle: async (canvas, ctx, url, x, y, w, h, r = 15) => { 5 | var _a; 6 | ctx.save(); 7 | (_a = ctx.setFillStyle) === null || _a === void 0 ? void 0 : _a.call(ctx, 'transparent'); 8 | ctx.fillStyle = 'transparent'; 9 | ctx.fillRoundRect(x, y, w, h, r); 10 | ctx.clip(); 11 | const result = await ctx.drawImage(url, x, y, w, h); 12 | ctx.restore(); 13 | return result; 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/fill-round-rect.d.ts: -------------------------------------------------------------------------------- 1 | import { DrawPosterUseCtxOpts } from '../../utils/interface'; 2 | declare const _default: DrawPosterUseCtxOpts; 3 | /** 绘制填充圆角矩形方法 */ 4 | export default _default; 5 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/fill-round-rect.js: -------------------------------------------------------------------------------- 1 | /** 绘制填充圆角矩形方法 */ 2 | export default { 3 | name: 'fillRoundRect', 4 | handle: (canvas, ctx, x, y, w, h, r) => { 5 | ctx.roundRect(x, y, w, h, r, true); 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/fill-warp-text.d.ts: -------------------------------------------------------------------------------- 1 | import { DrawPosterUseCtxOpts } from '../../utils/interface'; 2 | declare const _default: DrawPosterUseCtxOpts; 3 | /** 绘制换行字体原型方法 */ 4 | export default _default; 5 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as drawImage } from "./draw-image"; 2 | export { default as roundRect } from "./round-rect"; 3 | export { default as fillRoundRect } from "./fill-round-rect"; 4 | export { default as strokeRoundRect } from "./stroke-round-rect"; 5 | export { default as fillWarpText } from "./fill-warp-text"; 6 | export { default as drawRoundImage } from "./draw-round-image"; 7 | export { default as drawImageFit } from "./draw-image-fit"; 8 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Mr.Mao 3 | * @LastEditors: Mr.Mao 4 | * @Date: 2020-11-11 20:43:33 5 | * @LastEditTime: 2021-01-02 00:16:59 6 | * @Description: 7 | * @任何一个傻子都能写出让电脑能懂的代码,而只有好的程序员可以写出让人能看懂的代码 8 | */ 9 | export { default as drawImage } from "./draw-image"; 10 | export { default as roundRect } from "./round-rect"; 11 | export { default as fillRoundRect } from "./fill-round-rect"; 12 | export { default as strokeRoundRect } from "./stroke-round-rect"; 13 | export { default as fillWarpText } from "./fill-warp-text"; 14 | export { default as drawRoundImage } from "./draw-round-image"; 15 | export { default as drawImageFit } from "./draw-image-fit"; 16 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/round-rect.d.ts: -------------------------------------------------------------------------------- 1 | import { DrawPosterUseCtxOpts } from '../../utils/interface'; 2 | declare const _default: DrawPosterUseCtxOpts; 3 | /** 绘制圆角矩形原型方法 */ 4 | export default _default; 5 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/round-rect.js: -------------------------------------------------------------------------------- 1 | /** 绘制圆角矩形原型方法 */ 2 | export default { 3 | name: 'roundRect', 4 | handle: (canvas, ctx, x, y, w, h, r = 15, fill = false, stroke = false) => { 5 | if (r === 0) { 6 | if (stroke) 7 | ctx.strokeRect(x, y, w, h); 8 | if (fill) 9 | ctx.fillRect(x, y, w, h); 10 | return; 11 | } 12 | if (w < 2 * r) { 13 | r = w / 2; 14 | } 15 | if (h < 2 * r) { 16 | r = h / 2; 17 | } 18 | // 开始绘制 19 | ctx.beginPath(); 20 | ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5); 21 | // 移动复制 22 | ctx.moveTo(x + r, y); 23 | ctx.lineTo(x + w - r, y); 24 | ctx.lineTo(x + w, y + r); 25 | // (x,y,z,j,f) x,y圆心z半径,j起始弧度f,终止弧度 26 | ctx.arc(x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2); 27 | ctx.lineTo(x + w, y + h - r); 28 | ctx.lineTo(x + w - r, y + h); 29 | ctx.arc(x + w - r, y + h - r, r, 0, Math.PI * 0.5); 30 | ctx.lineTo(x + r, y + h); 31 | ctx.lineTo(x, y + h - r); 32 | ctx.arc(x + r, y + h - r, r, Math.PI * 0.5, Math.PI); 33 | ctx.lineTo(x, y + r); 34 | ctx.lineTo(x + r, y); 35 | if (stroke) 36 | ctx.stroke(); 37 | if (fill) 38 | ctx.fill(); 39 | ctx.closePath(); 40 | } 41 | }; 42 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/stroke-round-rect.d.ts: -------------------------------------------------------------------------------- 1 | import { DrawPosterUseCtxOpts } from '../../utils/interface'; 2 | declare const _default: DrawPosterUseCtxOpts; 3 | /** 绘制填充圆角矩形方法 */ 4 | export default _default; 5 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-function/stroke-round-rect.js: -------------------------------------------------------------------------------- 1 | /** 绘制填充圆角矩形方法 */ 2 | export default { 3 | name: 'strokeRoundRect', 4 | handle: (canvas, ctx, x, y, w, h, r) => { 5 | ctx.roundRect(x, y, w, h, r, false, true); 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-qr-code/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | name: string; 3 | handle: any; 4 | errorCorrectLevel: any; 5 | }; 6 | export default _default; 7 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-qr-code/index.js: -------------------------------------------------------------------------------- 1 | import uQRCode from "./uQRCode"; 2 | export default { 3 | name: "drawQrCode", 4 | handle: uQRCode.make.bind(uQRCode), 5 | errorCorrectLevel: uQRCode.errorCorrectLevel 6 | }; 7 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/extends/draw-qr-code/uQRCode.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Mr.Mao 3 | * @LastEditors: Mr.Mao 4 | * @Date: 2021-01-02 13:30:58 5 | * @LastEditTime: 2021-01-02 13:31:27 6 | * @Description: 7 | * @任何一个傻子都能写出让电脑能懂的代码,而只有好的程序员可以写出让人能看懂的代码 8 | */ 9 | declare const uQRCode: any 10 | export default uQRCode -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/index.d.ts: -------------------------------------------------------------------------------- 1 | import { DrawPosterBuildOpts } from "./utils/interface"; 2 | import DrawPoster from "./draw-poster"; 3 | import drawQrCode from "./extends/draw-qr-code/index"; 4 | import createFromList from './extends/create-from-list/index'; 5 | import drawPainter from './extends/draw-painter/index'; 6 | declare const useDrawPoster: (options: string | DrawPosterBuildOpts) => Promise; 7 | declare const useDrawPosters: (optionsAll: (string | DrawPosterBuildOpts)[]) => Promise<{ 8 | [key: string]: DrawPoster & import("./utils/interface").drawPosterExtends; 9 | }>; 10 | export { DrawPoster, useDrawPoster, useDrawPosters, drawQrCode, drawPainter, createFromList }; 11 | export default DrawPoster; 12 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/index.js: -------------------------------------------------------------------------------- 1 | import * as dfucs from "./extends/draw-function/index"; 2 | import DrawPoster from "./draw-poster"; 3 | import drawQrCode from "./extends/draw-qr-code/index"; 4 | import createFromList from './extends/create-from-list/index'; 5 | import drawPainter from './extends/draw-painter/index'; 6 | DrawPoster.useCtx(dfucs.drawImage); 7 | DrawPoster.useCtx(dfucs.fillWarpText); 8 | DrawPoster.useCtx(dfucs.roundRect); 9 | DrawPoster.useCtx(dfucs.fillRoundRect); 10 | DrawPoster.useCtx(dfucs.strokeRoundRect); 11 | DrawPoster.useCtx(dfucs.drawRoundImage); 12 | DrawPoster.useCtx(dfucs.drawImageFit); 13 | const useDrawPoster = async (options) => { 14 | const dp = await DrawPoster.build(options); 15 | return dp; 16 | }; 17 | const useDrawPosters = async (optionsAll) => { 18 | const dps = await DrawPoster.buildAll(optionsAll); 19 | return dps; 20 | }; 21 | export { DrawPoster, useDrawPoster, useDrawPosters, drawQrCode, drawPainter, createFromList }; 22 | export default DrawPoster; 23 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "u-draw-poster", 3 | "name": "u-draw-poster uniVue2|3适用 海报绘制工具", 4 | "version": "1.1.5", 5 | "description": "全端支持,内置多种海报绘制方法、表单绘制、二维码生成,图片裁剪。原生开发体验,上手快,不污染组件数据", 6 | "keywords": [ 7 | "海报", 8 | "绘制", 9 | "分享", 10 | "小程序", 11 | "canvas" 12 | ] 13 | } -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/utils/global.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /** 当前环境类型 */ 3 | export declare type UniPlatforms = 'app-plus' | 'app-plus-nvue' | 'h5' | 'mp-weixin' | 'mp-alipay' | 'mp-baidu' | 'mp-toutiao' | 'mp-qq' | 'mp-360' | 'mp' | 'quickapp-webview' | 'quickapp-webview-union' | 'quickapp-webview-huawei' | undefined; 4 | export declare const PLATFORM: UniPlatforms; 5 | /** 全局对象 */ 6 | declare const _uni: UniApp.Uni; 7 | export default _uni; 8 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/utils/global.js: -------------------------------------------------------------------------------- 1 | var _a; 2 | export const PLATFORM = typeof process !== 'undefined' ? (_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.VUE_APP_PLATFORM : undefined; 3 | /** 全局对象 */ 4 | const _uni = (function () { 5 | if (typeof uni != "undefined") 6 | return uni; 7 | if (typeof wx != "undefined") 8 | return wx; 9 | return uni; 10 | })(); 11 | export default _uni; 12 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/utils/interface.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/utils/object-sizing.d.ts: -------------------------------------------------------------------------------- 1 | export declare type ObjectFit = "contain" | "cover"; 2 | export declare type ObjectPosition = ["left" | "center" | "right", "top" | "center" | "bottom"]; 3 | export interface Size { 4 | width: number; 5 | height: number; 6 | } 7 | /** 8 | * 用于计算图片的宽高比例 9 | * @see https://drafts.csswg.org/css-images-3/#sizing-terms 10 | * 11 | * ## 名词解释 12 | * ### intrinsic dimensions 13 | * 图片本身的尺寸 14 | * 15 | * ### specified size 16 | * 用户指定的元素尺寸 17 | * 18 | * ### concrete object size 19 | * 应用了 `objectFit` 之后图片的显示尺寸 20 | * 21 | * ### default object size 22 | */ 23 | export declare function calculateConcreteRect(style: { 24 | /** @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/object-fit */ 25 | objectFit?: ObjectFit; 26 | /** @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/object-position */ 27 | intrinsicPosition?: ObjectPosition; 28 | specifiedPosition?: [number, number]; 29 | }, intrinsicSize: Size, specifiedSize: Size): { 30 | sx: number; 31 | sy: number; 32 | sw: number; 33 | sh: number; 34 | dx: number; 35 | dy: number; 36 | dw: number; 37 | dh: number; 38 | }; 39 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/utils/utils.d.ts: -------------------------------------------------------------------------------- 1 | import { DrawPosterBuildOpts } from "./interface"; 2 | /** 是否是base64本地地址 */ 3 | export declare const isBaseUrl: (str: string) => boolean; 4 | /** 是否是小程序本地地址 */ 5 | export declare const isTmpUrl: (str: string) => boolean; 6 | /** 是否是网络地址 */ 7 | export declare const isNetworkUrl: (str: string) => boolean; 8 | /** 对象target挂载到对象current */ 9 | export declare const extendMount: (current: Record, target: Record, handle?: (extend: Function, target?: Record | undefined) => any) => void; 10 | /** 处理构建配置 */ 11 | export declare const handleBuildOpts: (options: string | DrawPosterBuildOpts) => { 12 | selector: string; 13 | componentThis: any; 14 | type2d: boolean; 15 | loading: boolean; 16 | debugging: boolean; 17 | loadingText: string; 18 | createText: string; 19 | gcanvas: boolean; 20 | }; 21 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/utils/utils.js: -------------------------------------------------------------------------------- 1 | import { PLATFORM } from "./global"; 2 | /** 是否是base64本地地址 */ 3 | export const isBaseUrl = (str) => { 4 | return /^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*?)\s*$/i.test(str); 5 | }; 6 | /** 是否是小程序本地地址 */ 7 | export const isTmpUrl = (str) => { 8 | return /http:\/\/temp\/wx/.test(str); 9 | }; 10 | /** 是否是网络地址 */ 11 | export const isNetworkUrl = (str) => { 12 | return /^(((ht|f)tps?):\/\/)?[\w-]+(\.[\w-]+)+([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?$/.test(str); 13 | }; 14 | /** 对象target挂载到对象current */ 15 | export const extendMount = (current, target, handle = (extend, target) => undefined) => { 16 | for (const key in target) { 17 | current[key] = handle(target[key].handle, target[key]) || target[key].handle; 18 | } 19 | }; 20 | /** 处理构建配置 */ 21 | export const handleBuildOpts = (options) => { 22 | let defaultOpts = { 23 | selector: '', 24 | componentThis: undefined, 25 | type2d: true, 26 | loading: false, 27 | debugging: false, 28 | loadingText: '绘制海报中...', 29 | createText: '生成图片中...', 30 | gcanvas: false 31 | }; 32 | if (typeof options === "string") { 33 | defaultOpts.selector = options; 34 | } 35 | else { 36 | defaultOpts = Object.assign(Object.assign({}, defaultOpts), options); 37 | } 38 | const oldSelector = defaultOpts.selector; 39 | if (PLATFORM === 'mp-weixin' && defaultOpts.type2d) { 40 | defaultOpts.selector = '#' + defaultOpts.selector; 41 | } 42 | if (!PLATFORM) { 43 | console.error('注意! draw-poster未开启uni条件编译! 当环境是微信小程序将不会动态切换为type2d模式'); 44 | console.error(`请在vue.config.js中的transpileDependencies中添加'uni-draw-poster'`); 45 | console.error(`或者可以在选择器字符串前缀中添加#来切换为type2d绘制`); 46 | defaultOpts.selector = oldSelector; 47 | } 48 | return defaultOpts; 49 | }; 50 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/utils/wx-utils.d.ts: -------------------------------------------------------------------------------- 1 | import { Canvas } from "./interface"; 2 | export declare const downloadImgUrl: (url: string) => Promise; 3 | export declare const getCanvas2dContext: (selector: string, componentThis?: any) => Promise; 4 | -------------------------------------------------------------------------------- /js_sdk/u-draw-poster/utils/wx-utils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Mr.Mao 3 | * @LastEditors: Mr.Mao 4 | * @Date: 2020-10-12 08:49:27 5 | * @LastEditTime: 2020-12-09 13:54:10 6 | * @Description: 7 | * @任何一个傻子都能写出让电脑能懂的代码,而只有好的程序员可以写出让人能看懂的代码 8 | */ 9 | import uni from "./global"; 10 | import { isBaseUrl, isNetworkUrl, isTmpUrl } from './utils'; 11 | // 下载指定地址图片, 如果不符合下载图片, 则直接返回 12 | export const downloadImgUrl = (url) => { 13 | const isLocalFile = isBaseUrl(url) || isTmpUrl(url) || !isNetworkUrl(url); 14 | return new Promise((resolve, reject) => { 15 | if (isLocalFile) { 16 | return resolve(url); 17 | } 18 | uni.downloadFile({ 19 | url, 20 | success: (res) => resolve(res.tempFilePath), 21 | fail: reject 22 | }); 23 | }); 24 | }; 25 | // 获取当前指定 node 节点 26 | export const getCanvas2dContext = (selector, componentThis) => { 27 | return new Promise(resolve => { 28 | const query = (componentThis ? 29 | uni.createSelectorQuery().in(componentThis) : 30 | uni.createSelectorQuery()); 31 | query.select(selector) 32 | .fields({ node: true }, res => { 33 | const node = res === null || res === void 0 ? void 0 : res.node; 34 | resolve(node || {}); 35 | }).exec(); 36 | }); 37 | }; 38 | -------------------------------------------------------------------------------- /lib/request/core/InterceptorManager.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | 4 | function InterceptorManager() { 5 | this.handlers = [] 6 | } 7 | 8 | /** 9 | * Add a new interceptor to the stack 10 | * 11 | * @param {Function} fulfilled The function to handle `then` for a `Promise` 12 | * @param {Function} rejected The function to handle `reject` for a `Promise` 13 | * 14 | * @return {Number} An ID used to remove interceptor later 15 | */ 16 | InterceptorManager.prototype.use = function use(fulfilled, rejected) { 17 | this.handlers.push({ 18 | fulfilled: fulfilled, 19 | rejected: rejected 20 | }) 21 | return this.handlers.length - 1 22 | } 23 | 24 | /** 25 | * Remove an interceptor from the stack 26 | * 27 | * @param {Number} id The ID that was returned by `use` 28 | */ 29 | InterceptorManager.prototype.eject = function eject(id) { 30 | if (this.handlers[id]) { 31 | this.handlers[id] = null 32 | } 33 | } 34 | 35 | /** 36 | * Iterate over all the registered interceptors 37 | * 38 | * This method is particularly useful for skipping over any 39 | * interceptors that may have become `null` calling `eject`. 40 | * 41 | * @param {Function} fn The function to call for each interceptor 42 | */ 43 | InterceptorManager.prototype.forEach = function forEach(fn) { 44 | this.handlers.forEach(h => { 45 | if (h !== null) { 46 | fn(h) 47 | } 48 | }) 49 | } 50 | 51 | export default InterceptorManager 52 | -------------------------------------------------------------------------------- /lib/request/core/buildFullPath.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import isAbsoluteURL from '../helpers/isAbsoluteURL' 4 | import combineURLs from '../helpers/combineURLs' 5 | 6 | /** 7 | * Creates a new URL by combining the baseURL with the requestedURL, 8 | * only when the requestedURL is not already an absolute URL. 9 | * If the requestURL is absolute, this function returns the requestedURL untouched. 10 | * 11 | * @param {string} baseURL The base URL 12 | * @param {string} requestedURL Absolute or relative URL to combine 13 | * @returns {string} The combined full path 14 | */ 15 | export default function buildFullPath(baseURL, requestedURL) { 16 | if (baseURL && !isAbsoluteURL(requestedURL)) { 17 | return combineURLs(baseURL, requestedURL) 18 | } 19 | return requestedURL 20 | } 21 | -------------------------------------------------------------------------------- /lib/request/core/defaults.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 默认的全局配置 3 | */ 4 | 5 | 6 | export default { 7 | baseURL: '', 8 | header: {}, 9 | method: 'GET', 10 | dataType: 'json', 11 | // #ifndef MP-ALIPAY || APP-PLUS 12 | responseType: 'text', 13 | // #endif 14 | custom: {}, 15 | // #ifdef MP-ALIPAY || MP-WEIXIN 16 | timeout: 30000, 17 | // #endif 18 | // #ifdef APP-PLUS 19 | sslVerify: true, 20 | // #endif 21 | // #ifdef H5 22 | withCredentials: false, 23 | // #endif 24 | validateStatus: function validateStatus(status) { 25 | return status >= 200 && status < 300 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/request/core/dispatchRequest.js: -------------------------------------------------------------------------------- 1 | import adapter from '../adapters/index' 2 | 3 | 4 | export default (config) => { 5 | config.header = config.header || {} 6 | return adapter(config) 7 | } 8 | -------------------------------------------------------------------------------- /lib/request/core/settle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Resolve or reject a Promise based on response status. 3 | * 4 | * @param {Function} resolve A function that resolves the promise. 5 | * @param {Function} reject A function that rejects the promise. 6 | * @param {object} response The response. 7 | */ 8 | export default function settle(resolve, reject, response) { 9 | const validateStatus = response.config.validateStatus 10 | const status = response.statusCode 11 | if (status && (!validateStatus || validateStatus(status))) { 12 | resolve(response) 13 | } else { 14 | reject(response) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/request/helpers/buildURL.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import * as utils from './../utils' 4 | 5 | function encode(val) { 6 | return encodeURIComponent(val). 7 | replace(/%40/gi, '@'). 8 | replace(/%3A/gi, ':'). 9 | replace(/%24/g, '$'). 10 | replace(/%2C/gi, ','). 11 | replace(/%20/g, '+'). 12 | replace(/%5B/gi, '['). 13 | replace(/%5D/gi, ']') 14 | } 15 | 16 | /** 17 | * Build a URL by appending params to the end 18 | * 19 | * @param {string} url The base of the url (e.g., http://www.google.com) 20 | * @param {object} [params] The params to be appended 21 | * @returns {string} The formatted url 22 | */ 23 | export default function buildURL(url, params) { 24 | /*eslint no-param-reassign:0*/ 25 | if (!params) { 26 | return url 27 | } 28 | 29 | var serializedParams 30 | if (utils.isURLSearchParams(params)) { 31 | serializedParams = params.toString() 32 | } else { 33 | var parts = [] 34 | 35 | utils.forEach(params, function serialize(val, key) { 36 | if (val === null || typeof val === 'undefined') { 37 | return 38 | } 39 | 40 | if (utils.isArray(val)) { 41 | key = key + '[]' 42 | } else { 43 | val = [val] 44 | } 45 | 46 | utils.forEach(val, function parseValue(v) { 47 | if (utils.isDate(v)) { 48 | v = v.toISOString() 49 | } else if (utils.isObject(v)) { 50 | v = JSON.stringify(v) 51 | } 52 | parts.push(encode(key) + '=' + encode(v)) 53 | }) 54 | }) 55 | 56 | serializedParams = parts.join('&') 57 | } 58 | 59 | if (serializedParams) { 60 | var hashmarkIndex = url.indexOf('#') 61 | if (hashmarkIndex !== -1) { 62 | url = url.slice(0, hashmarkIndex) 63 | } 64 | 65 | url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams 66 | } 67 | 68 | return url 69 | } 70 | -------------------------------------------------------------------------------- /lib/request/helpers/combineURLs.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /** 4 | * Creates a new URL by combining the specified URLs 5 | * 6 | * @param {string} baseURL The base URL 7 | * @param {string} relativeURL The relative URL 8 | * @returns {string} The combined URL 9 | */ 10 | export default function combineURLs(baseURL, relativeURL) { 11 | return relativeURL 12 | ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') 13 | : baseURL 14 | } 15 | -------------------------------------------------------------------------------- /lib/request/helpers/isAbsoluteURL.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /** 4 | * Determines whether the specified URL is absolute 5 | * 6 | * @param {string} url The URL to test 7 | * @returns {boolean} True if the specified URL is absolute, otherwise false 8 | */ 9 | export default function isAbsoluteURL(url) { 10 | // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). 11 | // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed 12 | // by any combination of letters, digits, plus, period, or hyphen. 13 | return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url) 14 | } 15 | -------------------------------------------------------------------------------- /lib/request/index.js: -------------------------------------------------------------------------------- 1 | import Request from './core/Request' 2 | export default Request 3 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import App from "./App"; 3 | import * as filters from "./utils/filters.js"; // global filter 4 | import uView from "uview-ui"; 5 | import store from "./store"; 6 | import config from '@/config/config'; 7 | import airBtn from "@/components/m-airbtn/index.vue"; 8 | import socketIO from './pages/mine/im/socket'; 9 | /** 10 | * 仅在h5中显示唤醒app功能 11 | * 在h5页面手动挂载 12 | * 13 | */ 14 | // #ifdef H5 15 | if (config.enableMiniBarStartUpApp) { 16 | let btn = Vue.component("airBtn", airBtn); //全局注册 17 | document.body.appendChild(new btn().$mount().$el); 18 | } 19 | // #endif 20 | 21 | // 引入uView对小程序分享的mixin封装 22 | let mpShare = require('uview-ui/libs/mixin/mpShare.js'); 23 | Vue.mixin(mpShare) 24 | 25 | /** 26 | * 全局filters 27 | */ 28 | 29 | Object.keys(filters).forEach((key) => { 30 | Vue.filter(key, filters[key]); 31 | }); 32 | 33 | // 引入Vuex 34 | Vue.prototype.$store = store; 35 | // Vue.prototype.socketIo = new socketIO(); 36 | Vue.use(uView); 37 | Vue.config.productionTip = false; 38 | 39 | 40 | /** 41 | * 注意! 42 | * 此处将常用的颜色嵌入到原型链上面 43 | * 颜色使用驼峰命名对应 uni.scss中全局颜色变量名 44 | * 如需更换主题请修改此处以及uni.scss中的全局颜色 45 | */ 46 | // 主题色 47 | Vue.prototype.$mainColor = config.mainColor; 48 | // 高亮主题色 49 | Vue.prototype.$lightColor = config.lightColor; 50 | // 辅助高亮颜色 51 | Vue.prototype.$aiderLightColor = config.aiderLightColor; 52 | 53 | 54 | App.mpType = "app"; 55 | 56 | const app = new Vue({ 57 | ...App, 58 | }); 59 | app.$mount(); 60 | -------------------------------------------------------------------------------- /pages/cart/payment/error.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/pages/cart/payment/error.vue -------------------------------------------------------------------------------- /pages/cart/static/pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/pages/cart/static/pay.png -------------------------------------------------------------------------------- /pages/floor/empty.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | 25 | -------------------------------------------------------------------------------- /pages/mine/deposit/info.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 23 | -------------------------------------------------------------------------------- /pages/mine/deposit/recharge.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 充值金额 6 | 7 | 8 | ¥ 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 充值 17 | 18 | 19 | 50 | -------------------------------------------------------------------------------- /pages/mine/deposit/style.scss: -------------------------------------------------------------------------------- 1 | /deep/ .u-input__input, 2 | .u-input { 3 | font-size: 80rpx !important; 4 | height: 102rpx !important; 5 | } 6 | /deep/ .u-input__input { 7 | height: 100%; 8 | font-size: 80rpx; 9 | } 10 | .content { 11 | display: flex; 12 | > .price { 13 | width: 60%; 14 | margin: 20rpx 0; 15 | font-size: 80rpx; 16 | display: flex; 17 | } 18 | > .all { 19 | justify-content: center; 20 | width: 40%; 21 | display: flex; 22 | flex-direction: column; 23 | align-items: flex-end; 24 | } 25 | } 26 | .-list { 27 | margin: 20rpx 0; 28 | background: #fff; 29 | padding: 16rpx 32rpx; 30 | } 31 | .title { 32 | font-size: 35rpx; 33 | } 34 | .light { 35 | opacity: 0.6; 36 | } 37 | .submit { 38 | margin: 80rpx auto; 39 | width: 94%; 40 | background: $light-color; 41 | height: 90rpx; 42 | color: #fff; 43 | border-radius: 10rpx; 44 | text-align: center; 45 | line-height: 90rpx; 46 | } -------------------------------------------------------------------------------- /pages/mine/distribution/achievement.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | -------------------------------------------------------------------------------- /pages/mine/help/tips.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 58 | -------------------------------------------------------------------------------- /pages/mine/set/securityCenter/fingerLogin.vue: -------------------------------------------------------------------------------- 1 | // TODO 第一版本暂无此功能 后续优化以及更新 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 开启后可使用指纹认证完成快捷登录,设置仅对本机生效。如需修改指纹,请在系统设置中操作。 10 | 11 | 12 | 13 | 68 | 69 | 71 | -------------------------------------------------------------------------------- /pages/mine/set/securityCenter/securityCenter.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 56 | 57 | 64 | -------------------------------------------------------------------------------- /pages/mine/set/securityCenter/updatePwdTab.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 27 | 28 | 35 | -------------------------------------------------------------------------------- /pages/mine/set/versionFunctionList.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{item.content}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 51 | 52 | -------------------------------------------------------------------------------- /pages/order/afterSales/applySuccess.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 售后申请提交成功 6 | 7 | 8 | 查看记录 9 | 10 | 11 | 回到主页 12 | 13 | 14 | 15 | 16 | 温馨提示: 17 | • 商品寄回地址将在审核通过后在申请记录中查询。 18 | • 提交服务单后,售后专员可能与您电话沟通,请保持手机畅通。 19 | • 退货处理成功后退款金额将原路返回到您的支持账户中; 20 | 21 | 22 | 23 | 24 | 50 | 51 | 89 | -------------------------------------------------------------------------------- /pages/order/goods.scss: -------------------------------------------------------------------------------- 1 | .goods-item-view { 2 | display: flex; 3 | flex-direction: row; 4 | justify-content: space-between; 5 | align-items: center; 6 | padding: 10rpx 30rpx; 7 | 8 | .goods-img {flex: 1;} 9 | 10 | .goods-info { 11 | padding-left: 30rpx; 12 | flex: 3; 13 | 14 | .goods-title { 15 | margin-bottom: 10rpx; 16 | color: $font-color-dark; 17 | } 18 | 19 | .goods-specs { 20 | font-size: 24rpx; 21 | margin-bottom: 10rpx; 22 | color: #cccccc; 23 | } 24 | 25 | .goods-price { 26 | font-size: 28rpx; 27 | margin-bottom: 10rpx; 28 | color: #ff5a10; 29 | } 30 | } 31 | 32 | .goods-num { 33 | >.good-complaint{ 34 | margin-top:10rpx; 35 | } 36 | text-align: center; 37 | flex: 1; 38 | width: 60rpx; 39 | color: $main-color; 40 | } 41 | } 42 | 43 | 44 | 45 | .seller-view { 46 | background-color: #fff; 47 | margin: 20rpx 0rpx; 48 | 49 | .seller-info { 50 | height: 70rpx; 51 | padding: 0 20rpx; 52 | 53 | .seller-name { 54 | font-size: 33rpx; 55 | font-weight: 600; 56 | display: flex; 57 | width: 100%; 58 | flex-direction: row; 59 | align-items: center; 60 | height: 90rpx; 61 | // justify-content: space-between; 62 | 63 | image { 64 | width: 32rpx; 65 | height: 30rpx; 66 | } 67 | 68 | .name { 69 | margin-left: 15rpx; 70 | margin-top: -2rpx; 71 | font-size: 28rpx; 72 | flex: 1; 73 | } 74 | 75 | .status { 76 | 77 | font-size: 26rpx; 78 | color: #ff6262; 79 | } 80 | } 81 | 82 | .order-sn { 83 | color: #ff0000; 84 | } 85 | } 86 | 87 | 88 | 89 | .btn-view { 90 | // padding: 25rpx 30rpx; 91 | margin-bottom: 60rpx; 92 | margin-right: 30rpx; 93 | 94 | .description { 95 | color: #909399; 96 | size: 25rpx; 97 | 98 | .price { 99 | color: #ff0000; 100 | } 101 | } 102 | 103 | .right-btn { 104 | float: right; 105 | } 106 | } 107 | } -------------------------------------------------------------------------------- /pages/order/imgs/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/pages/order/imgs/line.png -------------------------------------------------------------------------------- /pages/passport/article.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 39 | -------------------------------------------------------------------------------- /pages/passport/entry/seller/control.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /pages/passport/entry/seller/entry.scss: -------------------------------------------------------------------------------- 1 | .flag-title { 2 | font-size: 42rpx; 3 | font-weight: bold; 4 | } 5 | .submit, 6 | .notice { 7 | font-weight: bold; 8 | font-size: 28rpx; 9 | 10 | height: 92rpx; 11 | text-align: center; 12 | letter-spacing: 4rpx; 13 | line-height: 92rpx; 14 | border-radius: 20rpx; 15 | } 16 | .wrapper { 17 | padding:16rpx; 18 | } -------------------------------------------------------------------------------- /pages/passport/login.scss: -------------------------------------------------------------------------------- 1 | .sub-title { 2 | font-size: 24rpx; 3 | color: #999; 4 | } 5 | .cell { 6 | margin: 40rpx 0; 7 | } 8 | .login-ball { 9 | border-bottom-left-radius: 300rpx; 10 | height: 400rpx; 11 | position: relative; 12 | } 13 | 14 | /deep/ .u-form-item--right__content__slot { 15 | width: 100%; 16 | display: block; 17 | } 18 | 19 | .title { 20 | font-size: 48rpx; 21 | color: #000; 22 | text-align: center; 23 | } 24 | .privacy { 25 | font-size: 24upx; 26 | color: #999; 27 | text-align: center; 28 | margin-top: 360rpx; 29 | width: 100%; 30 | display: flex; 31 | justify-content: center; 32 | } 33 | span { 34 | color: $aider-light-color; 35 | } 36 | .form { 37 | padding: 0 72rpx; 38 | } 39 | .divider { 40 | margin: 30rpx 0 !important; 41 | } 42 | .submit { 43 | height: 80rpx; 44 | line-height: 80rpx; 45 | color: #fff; 46 | text-align: center; 47 | font-size: 30rpx; 48 | border-radius: 100px; 49 | } 50 | .logo { 51 | margin-top: 20rpx; 52 | width: 200rpx; 53 | height: 200rpx; 54 | text-align: center; 55 | } 56 | .logo-cell { 57 | text-align: center; 58 | } 59 | .text-tips { 60 | text-align: center; 61 | } 62 | .tips { 63 | position: absolute; 64 | bottom: 10rpx; 65 | width: 100%; 66 | 67 | text-align: center; 68 | } 69 | -------------------------------------------------------------------------------- /pages/passport/static/logo-title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/pages/passport/static/logo-title.png -------------------------------------------------------------------------------- /pages/product/customerservice/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /pages/product/licencePhoto.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 公司名称:{{storeData.companyName}} 4 | 公司地址:{{storeData.companyAddress}} 5 | 公司地址地区:{{storeData.companyAddressPath}} 6 | 员工人数:{{storeData.employeeNum}} 7 | 法定经营范围:{{storeData.scope}} 8 | 9 | 10 | 11 | 12 | 48 | 49 | -------------------------------------------------------------------------------- /pages/product/product/goods/-goods-desc.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /pages/product/product/goods/-goods-recommend.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 热门商品 4 | 5 | 6 | 7 | 8 | 17 | 18 | 21 | -------------------------------------------------------------------------------- /pages/product/product/mp-goods.scss: -------------------------------------------------------------------------------- 1 | 2 | .showBack { 3 | 4 | margin-top: calc( var(--status-bar-height) + 20px ) !important; 5 | 6 | } -------------------------------------------------------------------------------- /pages/product/product/popup/popup.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | export default { 4 | height:"1000rpx", //弹出层高度 5 | mode:"bottom", //弹出层位置 6 | radius:"32", //圆角 rpx, 7 | close:true //能否点击遮罩退出 8 | } -------------------------------------------------------------------------------- /pages/product/product/product.scss: -------------------------------------------------------------------------------- 1 | .recommend-box, 2 | .detail-box, 3 | .store-recommend, 4 | .store-info, 5 | .evaluate-box, 6 | .card-box, 7 | .group-list { 8 | border-radius: 32rpx; 9 | padding: 0rpx 32rpx 0 32rpx; 10 | background: #fff; 11 | overflow: hidden; 12 | margin: 20rpx 0; 13 | } 14 | .goods-recommend-title, 15 | .store-recommend-title, 16 | .evaluate-title, 17 | .group-name { 18 | color: #262626; 19 | font-size: 30rpx; 20 | font-weight: 700; 21 | height: 90rpx; 22 | line-height: 90rpx; 23 | padding-left: 14rpx; 24 | position: relative; 25 | &::before { 26 | background-image: linear-gradient(180deg, $price-color, $price-light-color); 27 | content: ""; 28 | position: absolute; 29 | left: 0; 30 | top: 50%; 31 | -webkit-transform: translateY(-50%); 32 | transform: translateY(-50%); 33 | width: 3px; 34 | height: 15px; 35 | } 36 | } 37 | .scroll_mask { 38 | height: 868rpx; 39 | // padding-bottom: 100rpx; 40 | overflow-y: auto; 41 | } 42 | 43 | .mask { 44 | height: 600px; 45 | } 46 | .card-box { 47 | padding-top: 0 !important; 48 | } 49 | .card-content { 50 | padding: 0 40rpx; 51 | flex: 8; 52 | } 53 | .card-flex { 54 | display: flex; 55 | align-items: center; 56 | font-size: 26rpx; 57 | padding: 36rpx 0; 58 | border-bottom: 2rpx solid #f9f9f9; 59 | } 60 | .card-title { 61 | flex: 1; 62 | color: #262626; 63 | font-weight: 700; 64 | } 65 | 66 | .down-goods{ 67 | font-size: 50rpx !important; 68 | } 69 | -------------------------------------------------------------------------------- /pages/product/product/promotion/README.md: -------------------------------------------------------------------------------- 1 | ### promotion 促销显示 2 | ### promotion-details 促销详情 3 | ### promotion-assemble-promotions 限时抢购,团购活动条 4 | ### promotion-assemble-group 拼团活动条 5 | ### promotion-assemble-list 拼团活动用户列表 6 | ### promotion-coupon 优惠券组件 -------------------------------------------------------------------------------- /pages/product/product/promotion/group.scss: -------------------------------------------------------------------------------- 1 | .group-wrapper { 2 | background: url("/static/exchange.png"); 3 | background-size: cover; 4 | } 5 | .u-group-row { 6 | width: 100%; 7 | padding: 0 32rpx; 8 | display: flex; 9 | height: 100rpx; 10 | align-items: center; 11 | justify-content: space-between; 12 | } 13 | .showBox_L { 14 | // background: #ff6262; 15 | height: 100%; 16 | color: #fff; 17 | flex: 2; 18 | } 19 | .flex-price { 20 | color: #fff; 21 | font-size: 48rpx; 22 | } 23 | .u-group-flex-left { 24 | display: flex; 25 | flex-direction: column; 26 | } 27 | .u-group-flex-left-span { 28 | line-height: 1.2; 29 | font-size: 32rpx; 30 | } 31 | .showBox_R { 32 | flex: 1; 33 | height: 100%; 34 | padding: 4rpx 0 !important; 35 | background: #ffe7e6 !important; 36 | text-align: center !important; 37 | } 38 | /deep/ .u-mode-light-error { 39 | border: none; 40 | } 41 | 42 | .u-group-flex { 43 | height: 100%; 44 | align-items: center; 45 | justify-content: space-between; 46 | } 47 | .u-group-flex, 48 | .u-group-flex-right { 49 | display: flex; 50 | } 51 | 52 | .u-group-flex-right { 53 | height: 100%; 54 | align-items: flex-end; 55 | display: flex; 56 | flex-direction: column; 57 | justify-content: center; 58 | } 59 | .old-price { 60 | color: #fff; 61 | text-decoration: line-through; 62 | font-size: 22rpx; 63 | opacity: 0.8; 64 | } 65 | .u-group-flex-left { 66 | height: 100%; 67 | } 68 | .group-bag { 69 | font-size: 20rpx; 70 | padding: 4rpx 20rpx; 71 | border-radius: 6rpx; 72 | margin-right: 20rpx; 73 | } 74 | .promotion { 75 | font-size: 22rpx; 76 | border: 2rpx solid $price-light-color; 77 | padding: 2rpx 6rpx; 78 | margin-left: 10rpx; 79 | line-height: 1; 80 | } 81 | -------------------------------------------------------------------------------- /pages/product/product/promotion/promotion_type.js: -------------------------------------------------------------------------------- 1 | const promotion = [ 2 | { 3 | title: "积分活动", 4 | value: "POINTS_GOODS", 5 | }, 6 | { 7 | title: "砍价活动", 8 | value: "KANJIA", 9 | }, 10 | { 11 | title: "单品立减", 12 | value: "MINUS", 13 | }, 14 | { 15 | title: "团购", 16 | value: "GROUPBUY", 17 | }, 18 | { 19 | title: "积分换购", 20 | value: "EXCHANGE", 21 | }, 22 | { 23 | title: "第二件半价", 24 | value: "HALF_PRICE", 25 | }, 26 | { 27 | title: "满减优惠", 28 | value: "FULL_DISCOUNT", 29 | }, 30 | { 31 | title: "限时抢购", 32 | value: "SECKILL", 33 | }, 34 | { 35 | title: "拼团", 36 | value: "PINTUAN", 37 | }, 38 | { 39 | title: "优惠券", 40 | value: "COUPON", 41 | }, 42 | ]; 43 | export default promotion 44 | /**格式化 */ 45 | export function formatType(val){ 46 | if(val != undefined){ 47 | promotion.forEach(item=>{ 48 | if(val == item.value){ 49 | return item.title 50 | } 51 | }) 52 | } 53 | } -------------------------------------------------------------------------------- /pages/product/shopPageGoods.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 暂无商品信息 7 | 8 | 9 | 10 | 11 | 12 | 13 | 62 | 63 | 78 | -------------------------------------------------------------------------------- /pages/promotion/point/user.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 你的可用积分:{{userInfo.point || 0}} 9 | 10 | 11 | 12 | 13 | 34 | -------------------------------------------------------------------------------- /pages/promotion/static/head-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/pages/promotion/static/head-sample.png -------------------------------------------------------------------------------- /pages/promotion/static/help-bargain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/pages/promotion/static/help-bargain.png -------------------------------------------------------------------------------- /pages/promotion/static/live.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/pages/promotion/static/live.gif -------------------------------------------------------------------------------- /pages/promotion/static/live.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/pages/promotion/static/live.png -------------------------------------------------------------------------------- /pages/promotion/static/zan.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/pages/promotion/static/zan.gif -------------------------------------------------------------------------------- /pages/tabbar/cart/cart.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/pages/tabbar/cart/cart.scss -------------------------------------------------------------------------------- /pages/tabbar/cart/mp-carui.scss: -------------------------------------------------------------------------------- 1 | .box2 { 2 | padding: 0 16rpx 0; 3 | margin: 0 16rpx 20rpx; 4 | 5 | } 6 | .uNumber{ 7 | display: flex; 8 | } -------------------------------------------------------------------------------- /pages/tabbar/home/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 41 | 42 | 44 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/advertising.scss: -------------------------------------------------------------------------------- 1 | .position-box{ 2 | position: absolute; 3 | right: 0; 4 | bottom: 0; 5 | } 6 | .join-box { 7 | display: flex; 8 | } 9 | .item-price { 10 | > span { 11 | font-size: 15px; 12 | font-weight: 500; 13 | color: #e1212b; 14 | } 15 | } 16 | .join-item { 17 | flex: 1; 18 | } 19 | .item-img { 20 | width: 75px; 21 | height: 75px; 22 | margin: 0 auto; 23 | display: block; 24 | } 25 | .item-img-box { 26 | position: relative; 27 | } 28 | .item-line-through { 29 | > span { 30 | font-size: 10px; 31 | font-weight: 400; 32 | text-decoration: line-through; 33 | color: #999; 34 | } 35 | } 36 | .item-position-tips { 37 | position: absolute; 38 | right: 0; 39 | color: #fff; 40 | font-size: 12px; 41 | bottom: 0; 42 | } 43 | .join-title { 44 | display: flex; 45 | justify-content: space-between; 46 | align-items: center; 47 | background: #fff; 48 | height: 50px; 49 | > div:nth-of-type(1) { 50 | font-size: 16px; 51 | font-weight: bold; 52 | } 53 | > div:nth-of-type(2) { 54 | font-size: 12px; 55 | color: #999; 56 | } 57 | } -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl.scss: -------------------------------------------------------------------------------- 1 | .image-mode { 2 | width: 100%; 3 | height: 100%; 4 | display: block; 5 | padding: 2rpx; 6 | } 7 | .layout { 8 | padding: 16rpx; 9 | margin: 8rpx 0; 10 | background: #fff; 11 | } 12 | .layout, 13 | .view-height-75, 14 | .view-height-150 { 15 | overflow: hidden; 16 | } 17 | .view-width-100 { 18 | width: 100%; 19 | } 20 | .view-height-75 { 21 | // height: 150rpx; 22 | } 23 | .view-height-150 { 24 | // height: 300rpx; 25 | flex: 1; 26 | } 27 | 28 | .view-height-85 { 29 | height: 170rpx; 30 | flex: 1; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_banner.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 35 | 38 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_flex_five.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 23 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_flex_four.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 23 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_flex_one.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 26 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_flex_three.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 26 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_flex_two.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 34 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_group.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ res.list[0].title }} 6 | 更多 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | ¥120.00 15 | 16 | 17 | ¥190.00 18 | 19 | 20 | 21 | 22 | 23 | 24 | 37 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_hot_zone.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 21 | 22 | 23 | 24 | 37 | 58 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_integral.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ res.list[0].title }} 6 | 更多 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20积分 15 | 16 | 17 | 30积分 18 | 19 | 20 | 21 | 22 | 23 | 24 | 31 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_join_group.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ res.list[0].title }} 6 | 更多 7 | 8 | 9 | 10 | 11 | 16 | 2人团 17 | 18 | 19 | ¥120.00 20 | 21 | 22 | ¥120.00 23 | 24 | 25 | 26 | 27 | 28 | 29 | 36 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_left_one_right_two.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 37 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_left_two_right_one.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 33 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_menu.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 17 | 18 | 19 | 20 | {{ item.title }} 21 | 22 | 23 | 24 | 25 | 37 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_notice.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 23 | 50 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_search.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ res.list[0].title }} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 38 | 64 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_spike.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ res.list[0].title }} 6 | 更多 7 | 8 | 9 | 10 | 11 | 16 | 17 | 18 | ¥120.00 19 | 20 | 21 | ¥190.00 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_title.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ res.list[0].title }} 6 | 7 | 8 | {{ res.list[0].title1 }} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 28 | 59 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_top_one_bottom_two.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 37 | -------------------------------------------------------------------------------- /pages/tabbar/home/template/tpl_top_two_bottom_one.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | 14 | 15 | 23 | 24 | 25 | 26 | 33 | 34 | 35 | 36 | 37 | 52 | 80 | -------------------------------------------------------------------------------- /pages/tabbar/home/web-view.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 45 | 46 | 54 | -------------------------------------------------------------------------------- /pushGithub.sh: -------------------------------------------------------------------------------- 1 | echo '开始推送github' 2 | echo '切换git地址' 3 | git remote rm origin 4 | 5 | git remote add origin git@github.com:hongyehuicheng/lilishop-uniapp.git 6 | echo '设置上传代码分支,推送github' 7 | git push --set-upstream origin master --force 8 | echo '推送github完成' 9 | git remote rm origin 10 | 11 | git remote add origin git@gitee.com:beijing_hongye_huicheng/lilishop-uniapp.git 12 | 13 | git pull origin master 14 | 15 | echo '切回gitee资源' 16 | git branch --set-upstream-to=origin/master master 17 | echo '设置git跟踪资源' 18 | 19 | -------------------------------------------------------------------------------- /static/appleidButton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/appleidButton@2x.png -------------------------------------------------------------------------------- /static/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/bg.png -------------------------------------------------------------------------------- /static/bg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/bg1.png -------------------------------------------------------------------------------- /static/buy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/buy.png -------------------------------------------------------------------------------- /static/cpauto1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/cpauto1.png -------------------------------------------------------------------------------- /static/emptyCart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/emptyCart.png -------------------------------------------------------------------------------- /static/exchange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/exchange.png -------------------------------------------------------------------------------- /static/img/main-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/img/main-bg.png -------------------------------------------------------------------------------- /static/img/overdue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/img/overdue.png -------------------------------------------------------------------------------- /static/img/sort0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/img/sort0.png -------------------------------------------------------------------------------- /static/img/sort1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/img/sort1.png -------------------------------------------------------------------------------- /static/img/sort2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/img/sort2.png -------------------------------------------------------------------------------- /static/img/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/img/title.png -------------------------------------------------------------------------------- /static/img/used.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/img/used.png -------------------------------------------------------------------------------- /static/index/arrow-down-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/index/arrow-down-1.png -------------------------------------------------------------------------------- /static/index/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/index/arrow-down.png -------------------------------------------------------------------------------- /static/index/arrow-up-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/index/arrow-up-1.png -------------------------------------------------------------------------------- /static/index/arrow-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/index/arrow-up.png -------------------------------------------------------------------------------- /static/join-buy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/join-buy.png -------------------------------------------------------------------------------- /static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/logo.png -------------------------------------------------------------------------------- /static/mine/Feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/Feedback.png -------------------------------------------------------------------------------- /static/mine/couponcenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/couponcenter.png -------------------------------------------------------------------------------- /static/mine/distribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/distribution.png -------------------------------------------------------------------------------- /static/mine/feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/feedback.png -------------------------------------------------------------------------------- /static/mine/im.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/im.png -------------------------------------------------------------------------------- /static/mine/kanjia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/kanjia.png -------------------------------------------------------------------------------- /static/mine/logistics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/logistics.png -------------------------------------------------------------------------------- /static/mine/myaddress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/myaddress.png -------------------------------------------------------------------------------- /static/mine/mycommit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/mycommit.png -------------------------------------------------------------------------------- /static/mine/mycoupon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/mycoupon.png -------------------------------------------------------------------------------- /static/mine/myfavorite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/myfavorite.png -------------------------------------------------------------------------------- /static/mine/myhistory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/myhistory.png -------------------------------------------------------------------------------- /static/mine/mypoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/mypoint.png -------------------------------------------------------------------------------- /static/mine/pointgift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/pointgift.png -------------------------------------------------------------------------------- /static/mine/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/setting.png -------------------------------------------------------------------------------- /static/mine/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/share.png -------------------------------------------------------------------------------- /static/mine/shensu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/shensu.png -------------------------------------------------------------------------------- /static/mine/sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/mine/sign.png -------------------------------------------------------------------------------- /static/missing-face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/missing-face.png -------------------------------------------------------------------------------- /static/nodata.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/nodata.png -------------------------------------------------------------------------------- /static/order/t1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/order/t1.png -------------------------------------------------------------------------------- /static/order/t3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/order/t3.png -------------------------------------------------------------------------------- /static/point-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/point-bg.png -------------------------------------------------------------------------------- /static/pointTrade/point_bg_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/pointTrade/point_bg_1.png -------------------------------------------------------------------------------- /static/pointTrade/tradehall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/pointTrade/tradehall.png -------------------------------------------------------------------------------- /static/seckill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/seckill.png -------------------------------------------------------------------------------- /static/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/star.png -------------------------------------------------------------------------------- /static/tabbar/cart-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/tabbar/cart-s.png -------------------------------------------------------------------------------- /static/tabbar/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/tabbar/cart.png -------------------------------------------------------------------------------- /static/tabbar/category-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/tabbar/category-s.png -------------------------------------------------------------------------------- /static/tabbar/category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/tabbar/category.png -------------------------------------------------------------------------------- /static/tabbar/home-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/tabbar/home-s.png -------------------------------------------------------------------------------- /static/tabbar/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/tabbar/home.png -------------------------------------------------------------------------------- /static/tabbar/mine-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/tabbar/mine-s.png -------------------------------------------------------------------------------- /static/tabbar/mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/tabbar/mine.png -------------------------------------------------------------------------------- /static/tabbar/point-mall-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/tabbar/point-mall-s.png -------------------------------------------------------------------------------- /static/tabbar/point-mall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/tabbar/point-mall.png -------------------------------------------------------------------------------- /static/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilishop/lilishop-uniapp/919af44fda349db65fac0808875d5d59050caf6e/static/title.png -------------------------------------------------------------------------------- /store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import Vuex from "vuex"; 3 | import storage from "@/utils/storage"; 4 | 5 | Vue.use(Vuex); 6 | 7 | const store = new Vuex.Store({ 8 | state: { 9 | isShowToast:false, // 是否在展示Toast中 10 | remark:[], //填写订单备注 11 | shareLink:"", //分享链接 12 | verificationKey: "", //获取key表示验证通过 13 | distributionId:"", //分销员Id 如果当前账户从未登录过时记录 14 | hasLogin: storage.getHasLogin(), 15 | userInfo: storage.getUserInfo(), 16 | uuid: storage.getUuid(), 17 | token: "", 18 | }, 19 | mutations: { 20 | login(state, userInfo) { 21 | state.userInfo = userInfo || {}; 22 | state.userName = 23 | userInfo.Name || userInfo.Nickname || userInfo.Username || "匿名用户"; 24 | state.hasLogin = true; 25 | }, 26 | logout(state) { 27 | state.userName = ""; 28 | state.hasLogin = false; 29 | }, 30 | 31 | // 设置填写订单中备注 32 | setRemark(state, remark) { 33 | state.remark = remark; 34 | } 35 | }, 36 | actions: {}, 37 | }); 38 | 39 | export default store; 40 | -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/changelog.md: -------------------------------------------------------------------------------- 1 | ## 4.0.6(2022-12-12) 2 | 修复`getDrawModules`,第一次获取结果正常,后续获取`tile`模块不存在的问题; 3 | 修复安卓type:normal因Canvas API使用了小数或为0的参数导致生成异常的问题(注:安卓非2d Canvas部分API参数不支持携带小数,部分API参数必须大于0)。 4 | ## 4.0.1(2022-11-28) 5 | 优化组件loading属性的表现; 6 | 新增组件type选项normal,以便于在某些条件编译初始为type=2d时还可以选择使用非2d组件类型; 7 | 修复组件条件编译在其他编辑器语法提示报错; 8 | 修复原生对es5的支持。 9 | ## 4.0.0(2022-11-21) 10 | v4版本源代码全面开放,开源地址:[https://github.com/Sansnn/uQRCode](https://github.com/Sansnn/uQRCode); 11 | 12 | 升级说明:v4为大版本更新,虽然已尽可能兼容上一代版本,但不可避免的还是存在一些细节差异,若更新后出现问题,请参考对照[v3 文档](https://uqrcode.cn/doc/v3),[v4 文档](https://uqrcode.cn/doc)进行修改。 13 | -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/common/cache.js: -------------------------------------------------------------------------------- 1 | export const cacheImageList = []; -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/common/queue.js: -------------------------------------------------------------------------------- 1 | function Queue() { 2 | let waitingQueue = this.waitingQueue = []; 3 | let isRunning = this.isRunning = false; // 记录是否有未完成的任务 4 | 5 | function execute(task, resolve, reject) { 6 | task() 7 | .then((data) => { 8 | resolve(data); 9 | }) 10 | .catch((e) => { 11 | reject(e); 12 | }) 13 | .finally(() => { 14 | // 等待任务队列中如果有任务,则触发它;否则设置isRunning = false,表示无任务状态 15 | if (waitingQueue.length) { 16 | const next = waitingQueue.shift(); 17 | execute(next.task, next.resolve, next.reject); 18 | } else { 19 | isRunning = false; 20 | } 21 | }); 22 | } 23 | this.exec = function(task) { 24 | return new Promise((resolve, reject) => { 25 | if (isRunning) { 26 | waitingQueue.push({ 27 | task, 28 | resolve, 29 | reject 30 | }); 31 | } else { 32 | isRunning = true; 33 | execute(task, resolve, reject); 34 | } 35 | }); 36 | } 37 | } 38 | 39 | /* 队列实例,某些平台一起使用多个组件时需要通过队列逐一绘制,否则部分绘制方法异常,nvue端的iOS gcanvas尤其明显,在不通过队列绘制时会出现图片丢失的情况 */ 40 | export const queueDraw = new Queue(); 41 | export const queueLoadImage = new Queue(); -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/common/types/cache.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*/common/cache' { 2 | export const cacheImageList: Array; 3 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/common/types/queue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*/common/queue' { 2 | export const queueDraw: any; 3 | export const queueLoadImage: any; 4 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleLinearGradient.js: -------------------------------------------------------------------------------- 1 | class FillStyleLinearGradient { 2 | 3 | constructor(x0, y0, x1, y1) { 4 | this._start_pos = { _x: x0, _y: y0 }; 5 | this._end_pos = { _x: x1, _y: y1 }; 6 | this._stop_count = 0; 7 | this._stops = [0, 0, 0, 0, 0]; 8 | } 9 | 10 | addColorStop = function (pos, color) { 11 | if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) { 12 | this._stops[this._stop_count] = { _pos: pos, _color: color }; 13 | this._stop_count++; 14 | } 15 | } 16 | } 17 | 18 | export default FillStyleLinearGradient; -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStylePattern.js: -------------------------------------------------------------------------------- 1 | class FillStylePattern { 2 | constructor(img, pattern) { 3 | this._style = pattern; 4 | this._img = img; 5 | } 6 | } 7 | 8 | export default FillStylePattern; -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleRadialGradient.js: -------------------------------------------------------------------------------- 1 | class FillStyleRadialGradient { 2 | constructor(x0, y0, r0, x1, y1, r1) { 3 | this._start_pos = { _x: x0, _y: y0, _r: r0 }; 4 | this._end_pos = { _x: x1, _y: y1, _r: r1 }; 5 | this._stop_count = 0; 6 | this._stops = [0, 0, 0, 0, 0]; 7 | } 8 | 9 | addColorStop(pos, color) { 10 | if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) { 11 | this._stops[this._stop_count] = { _pos: pos, _color: color }; 12 | this._stop_count++; 13 | } 14 | } 15 | } 16 | 17 | export default FillStyleRadialGradient; -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ActiveInfo.js: -------------------------------------------------------------------------------- 1 | export default class WebGLActiveInfo { 2 | className = 'WebGLActiveInfo'; 3 | 4 | constructor({ 5 | type, name, size 6 | }) { 7 | this.type = type; 8 | this.name = name; 9 | this.size = size; 10 | } 11 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Buffer.js: -------------------------------------------------------------------------------- 1 | import {getTransferedObjectUUID} from './classUtils'; 2 | 3 | const name = 'WebGLBuffer'; 4 | 5 | function uuid(id) { 6 | return getTransferedObjectUUID(name, id); 7 | } 8 | 9 | export default class WebGLBuffer { 10 | className = name; 11 | 12 | constructor(id) { 13 | this.id = id; 14 | } 15 | 16 | static uuid = uuid; 17 | 18 | uuid() { 19 | return uuid(this.id); 20 | } 21 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Framebuffer.js: -------------------------------------------------------------------------------- 1 | import {getTransferedObjectUUID} from './classUtils'; 2 | 3 | const name = 'WebGLFrameBuffer'; 4 | 5 | function uuid(id) { 6 | return getTransferedObjectUUID(name, id); 7 | } 8 | 9 | export default class WebGLFramebuffer { 10 | className = name; 11 | 12 | constructor(id) { 13 | this.id = id; 14 | } 15 | 16 | static uuid = uuid; 17 | 18 | uuid() { 19 | return uuid(this.id); 20 | } 21 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLtype.js: -------------------------------------------------------------------------------- 1 | const GLtype = {}; 2 | 3 | [ 4 | "GLbitfield", 5 | "GLboolean", 6 | "GLbyte", 7 | "GLclampf", 8 | "GLenum", 9 | "GLfloat", 10 | "GLint", 11 | "GLintptr", 12 | "GLsizei", 13 | "GLsizeiptr", 14 | "GLshort", 15 | "GLubyte", 16 | "GLuint", 17 | "GLushort" 18 | ].sort().map((typeName, i) => GLtype[typeName] = 1 >> (i + 1)); 19 | 20 | export default GLtype; 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Program.js: -------------------------------------------------------------------------------- 1 | import {getTransferedObjectUUID} from './classUtils'; 2 | 3 | const name = 'WebGLProgram'; 4 | 5 | function uuid(id) { 6 | return getTransferedObjectUUID(name, id); 7 | } 8 | 9 | export default class WebGLProgram { 10 | className = name; 11 | 12 | constructor(id) { 13 | this.id = id; 14 | } 15 | 16 | static uuid = uuid; 17 | 18 | uuid() { 19 | return uuid(this.id); 20 | } 21 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Renderbuffer.js: -------------------------------------------------------------------------------- 1 | import {getTransferedObjectUUID} from './classUtils'; 2 | 3 | const name = 'WebGLRenderBuffer'; 4 | 5 | function uuid(id) { 6 | return getTransferedObjectUUID(name, id); 7 | } 8 | 9 | export default class WebGLRenderbuffer { 10 | className = name; 11 | 12 | constructor(id) { 13 | this.id = id; 14 | } 15 | 16 | static uuid = uuid; 17 | 18 | uuid() { 19 | return uuid(this.id); 20 | } 21 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Shader.js: -------------------------------------------------------------------------------- 1 | import {getTransferedObjectUUID} from './classUtils'; 2 | 3 | const name = 'WebGLShader'; 4 | 5 | function uuid(id) { 6 | return getTransferedObjectUUID(name, id); 7 | } 8 | 9 | export default class WebGLShader { 10 | className = name; 11 | 12 | constructor(id, type) { 13 | this.id = id; 14 | this.type = type; 15 | } 16 | 17 | static uuid = uuid; 18 | 19 | uuid() { 20 | return uuid(this.id); 21 | } 22 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ShaderPrecisionFormat.js: -------------------------------------------------------------------------------- 1 | export default class WebGLShaderPrecisionFormat { 2 | className = 'WebGLShaderPrecisionFormat'; 3 | 4 | constructor({ 5 | rangeMin, rangeMax, precision 6 | }) { 7 | this.rangeMin = rangeMin; 8 | this.rangeMax = rangeMax; 9 | this.precision = precision; 10 | } 11 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Texture.js: -------------------------------------------------------------------------------- 1 | import {getTransferedObjectUUID} from './classUtils'; 2 | 3 | const name = 'WebGLTexture'; 4 | 5 | function uuid(id) { 6 | return getTransferedObjectUUID(name, id); 7 | } 8 | 9 | export default class WebGLTexture { 10 | className = name; 11 | 12 | constructor(id, type) { 13 | this.id = id; 14 | this.type = type; 15 | } 16 | 17 | static uuid = uuid; 18 | 19 | uuid() { 20 | return uuid(this.id); 21 | } 22 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/UniformLocation.js: -------------------------------------------------------------------------------- 1 | import {getTransferedObjectUUID} from './classUtils'; 2 | 3 | const name = 'WebGLUniformLocation'; 4 | 5 | function uuid(id) { 6 | return getTransferedObjectUUID(name, id); 7 | } 8 | 9 | export default class WebGLUniformLocation { 10 | className = name; 11 | 12 | constructor(id, type) { 13 | this.id = id; 14 | this.type = type; 15 | } 16 | 17 | static uuid = uuid; 18 | 19 | uuid() { 20 | return uuid(this.id); 21 | } 22 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/classUtils.js: -------------------------------------------------------------------------------- 1 | export function getTransferedObjectUUID(name, id) { 2 | return `${name.toLowerCase()}-${id}`; 3 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/canvas.js: -------------------------------------------------------------------------------- 1 | import GContext2D from '../context-2d/RenderingContext'; 2 | import GContextWebGL from '../context-webgl/RenderingContext'; 3 | 4 | export default class GCanvas { 5 | 6 | // static GBridge = null; 7 | 8 | id = null; 9 | 10 | _needRender = true; 11 | 12 | constructor(id, { disableAutoSwap }) { 13 | this.id = id; 14 | 15 | this._disableAutoSwap = disableAutoSwap; 16 | if (disableAutoSwap) { 17 | this._swapBuffers = () => { 18 | GCanvas.GBridge.render(this.id); 19 | } 20 | } 21 | } 22 | 23 | getContext(type) { 24 | 25 | let context = null; 26 | 27 | if (type.match(/webgl/i)) { 28 | context = new GContextWebGL(this); 29 | 30 | context.componentId = this.id; 31 | 32 | if (!this._disableAutoSwap) { 33 | const render = () => { 34 | if (this._needRender) { 35 | GCanvas.GBridge.render(this.id); 36 | this._needRender = false; 37 | } 38 | } 39 | setInterval(render, 16); 40 | } 41 | 42 | GCanvas.GBridge.callSetContextType(this.id, 1); // 0 for 2d; 1 for webgl 43 | } else if (type.match(/2d/i)) { 44 | context = new GContext2D(this); 45 | 46 | context.componentId = this.id; 47 | 48 | // const render = ( callback ) => { 49 | // 50 | // const commands = context._drawCommands; 51 | // context._drawCommands = ''; 52 | // 53 | // GCanvas.GBridge.render2d(this.id, commands, callback); 54 | // this._needRender = false; 55 | // } 56 | // //draw方法触发 57 | // context._flush = render; 58 | // //setInterval(render, 16); 59 | 60 | GCanvas.GBridge.callSetContextType(this.id, 0); 61 | } else { 62 | throw new Error('not supported context ' + type); 63 | } 64 | 65 | return context; 66 | 67 | } 68 | 69 | reset() { 70 | GCanvas.GBridge.callReset(this.id); 71 | } 72 | 73 | 74 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/tool.js: -------------------------------------------------------------------------------- 1 | 2 | export function ArrayBufferToBase64 (buffer) { 3 | var binary = ''; 4 | var bytes = new Uint8ClampedArray(buffer); 5 | for (var len = bytes.byteLength, i = 0; i < len; i++) { 6 | binary += String.fromCharCode(bytes[i]); 7 | } 8 | return btoa(binary); 9 | } 10 | 11 | export function Base64ToUint8ClampedArray(base64String) { 12 | const padding = '='.repeat((4 - base64String.length % 4) % 4); 13 | const base64 = (base64String + padding) 14 | .replace(/\-/g, '+') 15 | .replace(/_/g, '/'); 16 | 17 | const rawData = atob(base64); 18 | const outputArray = new Uint8ClampedArray(rawData.length); 19 | 20 | for (let i = 0; i < rawData.length; ++i) { 21 | outputArray[i] = rawData.charCodeAt(i); 22 | } 23 | return outputArray; 24 | } -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/index.js: -------------------------------------------------------------------------------- 1 | import GCanvas from './env/canvas'; 2 | import GImage from './env/image'; 3 | 4 | import GWebGLRenderingContext from './context-webgl/RenderingContext'; 5 | import GContext2D from './context-2d/RenderingContext'; 6 | 7 | import GBridgeWeex from './bridge/bridge-weex'; 8 | 9 | export let Image = GImage; 10 | 11 | export let WeexBridge = GBridgeWeex; 12 | 13 | export function enable(el, { bridge, debug, disableAutoSwap, disableComboCommands } = {}) { 14 | 15 | const GBridge = GImage.GBridge = GCanvas.GBridge = GWebGLRenderingContext.GBridge = GContext2D.GBridge = bridge; 16 | 17 | GBridge.callEnable(el.ref, [ 18 | 0, // renderMode: 0--RENDERMODE_WHEN_DIRTY, 1--RENDERMODE_CONTINUOUSLY 19 | -1, // hybridLayerType: 0--LAYER_TYPE_NONE 1--LAYER_TYPE_SOFTWARE 2--LAYER_TYPE_HARDWARE 20 | false, // supportScroll 21 | false, // newCanvasMode 22 | 1, // compatible 23 | 'white',// clearColor 24 | false // sameLevel: newCanvasMode = true && true => GCanvasView and Webview is same level 25 | ]); 26 | 27 | if (debug === true) { 28 | GBridge.callEnableDebug(); 29 | } 30 | if (disableComboCommands) { 31 | GBridge.callEnableDisableCombo(); 32 | } 33 | 34 | var canvas = new GCanvas(el.ref, { disableAutoSwap }); 35 | canvas.width = el.style.width; 36 | canvas.height = el.style.height; 37 | 38 | return canvas; 39 | }; -------------------------------------------------------------------------------- /uni_modules/Sansnn-uQRCode/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Sansnn-uQRCode", 3 | "displayName": "uQRCode 全端二维码生成插件 支持nvue 支持nodejs服务端", 4 | "version": "4.0.6", 5 | "description": "uQRCode是一款基于Javascript环境开发的二维码生成插件,适用所有Javascript运行环境的前端应用和Node.js。", 6 | "keywords": [ 7 | "二维码", 8 | "uQRCode", 9 | "qrcode", 10 | "qr" 11 | ], 12 | "repository": "https://github.com/Sansnn/uQRCode", 13 | "engines": { 14 | "HBuilderX": "^3.1.0" 15 | }, 16 | "dcloudext": { 17 | "sale": { 18 | "regular": { 19 | "price": "0.00" 20 | }, 21 | "sourcecode": { 22 | "price": "0.00" 23 | } 24 | }, 25 | "contact": { 26 | "qq": "" 27 | }, 28 | "declaration": { 29 | "ads": "无", 30 | "data": "无", 31 | "permissions": "无" 32 | }, 33 | "npmurl": "https://www.npmjs.com/package/uqrcodejs", 34 | "type": "sdk-js" 35 | }, 36 | "uni_modules": { 37 | "dependencies": [], 38 | "encrypt": [], 39 | "platforms": { 40 | "cloud": { 41 | "tcb": "y", 42 | "aliyun": "y" 43 | }, 44 | "client": { 45 | "App": { 46 | "app-vue": "y", 47 | "app-nvue": "y" 48 | }, 49 | "H5-mobile": { 50 | "Safari": "y", 51 | "Android Browser": "y", 52 | "微信浏览器(Android)": "y", 53 | "QQ浏览器(Android)": "y" 54 | }, 55 | "H5-pc": { 56 | "Chrome": "y", 57 | "IE": "y", 58 | "Edge": "y", 59 | "Firefox": "y", 60 | "Safari": "y" 61 | }, 62 | "小程序": { 63 | "微信": "y", 64 | "阿里": "y", 65 | "百度": "y", 66 | "字节跳动": "y", 67 | "QQ": "y" 68 | }, 69 | "快应用": { 70 | "华为": "y", 71 | "联盟": "y" 72 | }, 73 | "Vue": { 74 | "vue2": "y", 75 | "vue3": "y" 76 | } 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /uni_modules/okingtz-cropper/changelog.md: -------------------------------------------------------------------------------- 1 | ## 1.0.10(2023-06-13) 2 | 优化浏览器的环境下,裁剪框裁剪时,与滚动的冲突 3 | ## 1.0.9(2023-03-13) 4 | 1、canMove:是否可以移动裁剪框(默认true,可以移动); 5 | 2、canScale:是否可以放缩裁剪框(默认true,可以放缩); 6 | ## 1.0.8(2022-02-18) 7 | 1、提高保存图片的质量; 8 | 2、解决部分安卓、IOS手机图片无法保存的问题; 9 | 3、新年快乐 10 | ## 1.0.7(2021-09-24) 11 | ## 1.0.7(2021-09-24) 12 | 适配APP,解决APP无法获取到图片问题 13 | ## 1.0.6(2021-09-01) 14 | 解决上传大尺寸大图,绘制失败的问题 15 | ## 1.0.5(2021-08-20) 16 | 解决图片高大于宽,规定宽高比例 [5,2],裁切时实际比例变成了[2,5],不能实现按照比例来裁切 17 | ## 1.0.4(2021-08-19) 18 | 增加image图片地址watch,组件外更改图片地址时实时变更,非常感谢大佬(330***@163.com)的支持 19 | ## 1.0.3(2021-08-18) 20 | 增加属性original (默认值true) 是否按照原始大小裁切图片 21 | ## 1.0.2(2021-08-17) 22 | 新增属性 23 | 1. fileType 目标文件的类型,只支持 'jpg' 或 'png'。默认为 'jpg'; 24 | 2. quality 图片的质量,取值范围为 (0, 1],不在范围内时当作1.0处理(微信小程序:目前仅对 jpg 有效)。默认为 1; 25 | ## 1.0.1(2021-08-17) 26 | 1. 增加image属性,首次打开可以使用默认图 27 | 2. 增加maxCropper属性,打开时是否展示最大裁剪框 28 | ## 1.0.0(2021-08-03) 29 | 方便后期使用,发布头像上传裁切组件,不定时更新 30 | -------------------------------------------------------------------------------- /uni_modules/okingtz-cropper/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "okingtz-cropper", 3 | "displayName": "image-cropper", 4 | "version": "1.0.10", 5 | "description": "头像上传裁切组件", 6 | "keywords": [ 7 | "小程序", 8 | "图片裁切", 9 | "头像剪切", 10 | "图片剪切", 11 | "cropper" 12 | ], 13 | "repository": "https://gitee.com/okingt/cropper", 14 | "engines": { 15 | "HBuilderX": "^3.1.0" 16 | }, 17 | "dcloudext": { 18 | "sale": { 19 | "regular": { 20 | "price": "0.00" 21 | }, 22 | "sourcecode": { 23 | "price": "0.00" 24 | } 25 | }, 26 | "contact": { 27 | "qq": "" 28 | }, 29 | "declaration": { 30 | "ads": "无", 31 | "data": "插件不采集任何数据", 32 | "permissions": "无" 33 | }, 34 | "npmurl": "", 35 | "type": "component-vue" 36 | }, 37 | "uni_modules": { 38 | "dependencies": [], 39 | "encrypt": [], 40 | "platforms": { 41 | "cloud": { 42 | "tcb": "y", 43 | "aliyun": "y" 44 | }, 45 | "client": { 46 | "App": { 47 | "app-vue": "u", 48 | "app-nvue": "u" 49 | }, 50 | "H5-mobile": { 51 | "Safari": "y", 52 | "Android Browser": "y", 53 | "微信浏览器(Android)": "y", 54 | "QQ浏览器(Android)": "y" 55 | }, 56 | "H5-pc": { 57 | "Chrome": "y", 58 | "IE": "y", 59 | "Edge": "y", 60 | "Firefox": "y", 61 | "Safari": "y" 62 | }, 63 | "小程序": { 64 | "微信": "y", 65 | "阿里": "u", 66 | "百度": "u", 67 | "字节跳动": "u", 68 | "QQ": "u" 69 | }, 70 | "快应用": { 71 | "华为": "u", 72 | "联盟": "u" 73 | } 74 | } 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /utils/RegExp.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 各种正则表达式 3 | * mobile 手机号 4 | * email 电子邮箱 5 | * password 密码【6-20位】 6 | * integer 正整数【不包含0】 7 | * money 金钱 8 | * TINumber 纳税识别号 9 | * IDCard 身份证 10 | * userName 账户名称【汉字、字母、数字、“-”、“_”的组合】 11 | * URL URL 12 | * TEL 固定电话 13 | */ 14 | 15 | // 手机号 16 | export const mobile = /^0?(13[0-9]|14[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9])[0-9]{8}$/ 17 | 18 | // 电子邮箱 19 | export const email = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/ 20 | 21 | // 密码【6-20位】 22 | export const password = /^[@A-Za-z0-9!#$%^&*.~,]{6,20}$/ 23 | 24 | // 正整数【不包含0】 25 | export const integer = /^[1-9]\d*$/ 26 | 27 | // 正整数【包含0】 28 | export const Integer = /^[0-9]\d*$/ 29 | 30 | // 金钱 31 | export const money = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/ 32 | 33 | // 纳税识别号 34 | export const TINumber = /^((\d{6}[0-9A-Z]{9})|([0-9A-Za-z]{2}\d{6}[0-9A-Za-z]{10,12}))$/ 35 | 36 | // 身份证 37 | export const IDCard = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/ 38 | 39 | // 账户名称【汉字、字母、数字、“-”、“_”的组合】 40 | export const userName = /[A-Za-z0-9_\-\u4e00-\u9fa5]$/ 41 | 42 | // URL 43 | export const URL = 44 | /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/ 45 | 46 | // 固话 47 | export const TEL = /0\d{2,3}-\d{7,8}/ 48 | 49 | 50 | // 营业执照号 51 | export const licenseNum = /(^(?:(?![IOZSV])[\dA-Z]){2}\d{6}(?:(?![IOZSV])[\dA-Z]){10}$)|(^\d{15}$)/; 52 | -------------------------------------------------------------------------------- /utils/socket_service.js: -------------------------------------------------------------------------------- 1 | import store from '@/store/index' 2 | import config from '@/config/config.js' 3 | import storage from './storage'; 4 | export default class SocketService { 5 | /** 6 | * 单例 7 | */ 8 | static instance = null; 9 | static get Instance () { 10 | if (!this.instance) { 11 | this.instance = new SocketService(); 12 | } 13 | return this.instance; 14 | } 15 | 16 | // 和服务端连接的socket对象 17 | ws = null; 18 | 19 | // 存储回调函数 20 | callBackMapping = {}; 21 | 22 | // 标识是否连接成功 23 | connected = false; 24 | 25 | // 记录重试的次数 26 | sendRetryCount = 0; 27 | 28 | // 重新连接尝试的次数 29 | connectRetryCount = 0; 30 | 31 | // 定义连接服务器的方法 32 | connect () { 33 | // 连接服务器 34 | if (!window.WebSocket) { 35 | return console.log("您的浏览器不支持WebSocket"); 36 | } 37 | this.ws = new WebSocket(config.baseWsUrl + '/' + storage.getAccessToken()); 38 | // 连接成功的事件 39 | this.ws.onopen = () => { 40 | console.log("连接服务端成功"); 41 | this.connected = true; 42 | // 重置重新连接的次数 43 | this.connectRetryCount = 0; 44 | }; 45 | // 1.连接服务端失败 46 | // 2.当连接成功之后, 服务器关闭的情况(连接失败重连) 47 | this.ws.onclose = () => { 48 | console.log("连接服务端失败"); 49 | this.connected = false; 50 | this.connectRetryCount++; 51 | setTimeout(() => { 52 | this.connect(); 53 | }, 500 * this.connectRetryCount); 54 | }; 55 | // 得到服务端发送过来的数据 56 | this.ws.onmessage = (msg) => { 57 | // console.log(msg.data) 58 | this.registerCallBack(msg.data); 59 | }; 60 | } 61 | // 回调函数的注册 62 | registerCallBack (callBack) { 63 | // console.log("回调函数的注册", callBack); 64 | this.callBackMapping = callBack; 65 | } 66 | 67 | // 取消某一个回调函数 68 | unRegisterCallBack (callBack) { 69 | console.log("取消某一个回调函数", callBack); 70 | this.callBackMapping = null; 71 | } 72 | 73 | // 发送数据的方法 74 | send (data) { 75 | // 判断此时此刻有没有连接成功 76 | if (this.connected) { 77 | this.sendRetryCount = 0; 78 | this.ws.send(data); 79 | } else { 80 | this.sendRetryCount++; 81 | setTimeout(() => { 82 | this.send(data); 83 | }, this.sendRetryCount * 500); 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /uview-ui/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 www.uviewui.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /uview-ui/components/u-cell-group/u-cell-group.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{title}} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 51 | 52 | 70 | -------------------------------------------------------------------------------- /uview-ui/components/u-full-screen/u-full-screen.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 38 | 39 | 53 | -------------------------------------------------------------------------------- /uview-ui/components/u-gap/u-gap.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 51 | 52 | 55 | -------------------------------------------------------------------------------- /uview-ui/components/u-grid/u-grid.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 77 | 78 | 96 | -------------------------------------------------------------------------------- /uview-ui/components/u-index-anchor/u-index-anchor.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ index }} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 63 | 64 | 85 | -------------------------------------------------------------------------------- /uview-ui/components/u-link/u-link.vue: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 82 | 83 | 90 | -------------------------------------------------------------------------------- /uview-ui/components/u-loading-page/u-loading-page.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 22 | 23 | 26 | -------------------------------------------------------------------------------- /uview-ui/components/u-parse/libs/handler.wxs: -------------------------------------------------------------------------------- 1 | var inline = { 2 | abbr: 1, 3 | b: 1, 4 | big: 1, 5 | code: 1, 6 | del: 1, 7 | em: 1, 8 | i: 1, 9 | ins: 1, 10 | label: 1, 11 | q: 1, 12 | small: 1, 13 | span: 1, 14 | strong: 1, 15 | sub: 1, 16 | sup: 1 17 | } 18 | module.exports = { 19 | use: function(item) { 20 | return !item.c && !inline[item.name] && (item.attrs.style || '').indexOf('display:inline') == -1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /uview-ui/components/u-row/u-row.vue: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 65 | 66 | 85 | -------------------------------------------------------------------------------- /uview-ui/components/u-table/u-table.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 81 | 82 | 96 | -------------------------------------------------------------------------------- /uview-ui/components/u-th/u-th.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 39 | 40 | 54 | -------------------------------------------------------------------------------- /uview-ui/components/u-time-line-item/u-time-line-item.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 52 | 53 | 84 | -------------------------------------------------------------------------------- /uview-ui/components/u-time-line/u-time-line.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 23 | 24 | 44 | -------------------------------------------------------------------------------- /uview-ui/components/u-tr/u-tr.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 18 | 19 | 26 | -------------------------------------------------------------------------------- /uview-ui/index.scss: -------------------------------------------------------------------------------- 1 | // 引入公共基础类 2 | @import "./libs/css/common.scss"; 3 | @import "./libs/css/color.scss"; 4 | 5 | // 非nvue的样式 6 | /* #ifndef APP-NVUE */ 7 | @import "./libs/css/style.vue.scss"; 8 | /* #endif */ 9 | 10 | // nvue的特有样式 11 | /* #ifdef APP-NVUE */ 12 | @import "./libs/css/style.nvue.scss"; 13 | /* #endif */ 14 | 15 | // 小程序特有的样式 16 | /* #ifdef MP */ 17 | @import "./libs/css/style.mp.scss"; 18 | /* #endif */ 19 | 20 | // H5特有的样式 21 | /* #ifdef H5 */ 22 | @import "./libs/css/style.h5.scss"; 23 | /* #endif */ -------------------------------------------------------------------------------- /uview-ui/libs/config/config.js: -------------------------------------------------------------------------------- 1 | // 此版本发布于2020-08-06 2 | let version = '1.6.0'; 3 | 4 | export default { 5 | v: version, 6 | version: version, 7 | // 主题名称 8 | type: [ 9 | 'primary', 10 | 'success', 11 | 'info', 12 | 'error', 13 | 'warning' 14 | ] 15 | } -------------------------------------------------------------------------------- /uview-ui/libs/config/zIndex.js: -------------------------------------------------------------------------------- 1 | // uniapp在H5中各API的z-index值如下: 2 | /** 3 | * actionsheet: 999 4 | * modal: 999 5 | * navigate: 998 6 | * tabbar: 998 7 | * toast: 999 8 | */ 9 | 10 | export default { 11 | toast: 10090, 12 | noNetwork: 10080, 13 | // popup包含popup,actionsheet,keyboard,picker的值 14 | popup: 10075, 15 | mask: 10070, 16 | navbar: 980, 17 | topTips: 975, 18 | sticky: 970, 19 | indexListSticky: 965, 20 | } -------------------------------------------------------------------------------- /uview-ui/libs/css/style.components.scss: -------------------------------------------------------------------------------- 1 | .demo { 2 | 3 | } -------------------------------------------------------------------------------- /uview-ui/libs/css/style.h5.scss: -------------------------------------------------------------------------------- 1 | /* H5的时候,隐藏滚动条 */ 2 | ::-webkit-scrollbar { 3 | display: none; 4 | width: 0 !important; 5 | height: 0 !important; 6 | -webkit-appearance: none; 7 | background: transparent; 8 | } 9 | -------------------------------------------------------------------------------- /uview-ui/libs/css/style.mp.scss: -------------------------------------------------------------------------------- 1 | /* start--微信小程序编译后页面有组件名的元素,特别处理--start */ 2 | /* #ifdef MP-WEIXIN */ 3 | u-td, u-th { 4 | flex: 1; 5 | align-self: stretch; 6 | } 7 | 8 | .u-td { 9 | height: 100%; 10 | } 11 | 12 | u-icon { 13 | display: inline-flex; 14 | align-items: center; 15 | } 16 | 17 | // 各家小程序宫格组件外层设置为100%,避免受到父元素display: flex;的影响 18 | u-grid { 19 | width: 100%; 20 | flex: 0 0 100%; 21 | } 22 | 23 | // 避免小程序线条组件因为父组件display: flex;而失效 24 | u-line { 25 | flex: 1; 26 | } 27 | 28 | u-switch { 29 | display: inline-flex; 30 | align-items: center; 31 | } 32 | /* #endif */ 33 | /* end-微信小程序编译后页面有组件名的元素,特别处理--end */ -------------------------------------------------------------------------------- /uview-ui/libs/css/style.nvue.scss: -------------------------------------------------------------------------------- 1 | .nvue { 2 | font-size: 24rpx; 3 | } -------------------------------------------------------------------------------- /uview-ui/libs/function/$parent.js: -------------------------------------------------------------------------------- 1 | // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法 2 | // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx 3 | // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name 4 | // 值(默认为undefined),就是查找最顶层的$parent 5 | export default function $parent(name = undefined) { 6 | let parent = this.$parent; 7 | // 通过while历遍,这里主要是为了H5需要多层解析的问题 8 | while (parent) { 9 | // 父组件 10 | if (parent.$options && parent.$options.name !== name) { 11 | // 如果组件的name不相等,继续上一级寻找 12 | parent = parent.$parent; 13 | } else { 14 | return parent; 15 | } 16 | } 17 | return false; 18 | } -------------------------------------------------------------------------------- /uview-ui/libs/function/addUnit.js: -------------------------------------------------------------------------------- 1 | import validation from './test.js'; 2 | 3 | // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾 4 | export default function addUnit(value = 'auto', unit = 'rpx') { 5 | value = String(value); 6 | // 用uView内置验证规则中的number判断是否为数值 7 | return validation.number(value) ? `${value}${unit}` : value; 8 | } -------------------------------------------------------------------------------- /uview-ui/libs/function/bem.js: -------------------------------------------------------------------------------- 1 | function bem(name, conf) { 2 | 3 | } 4 | 5 | module.exports.bem = bem; 6 | -------------------------------------------------------------------------------- /uview-ui/libs/function/color.js: -------------------------------------------------------------------------------- 1 | // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供 2 | // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20) 3 | let color = { 4 | primary: "#2979ff", 5 | primaryDark: "#2b85e4", 6 | primaryDisabled: "#a0cfff", 7 | primaryLight: "#ecf5ff", 8 | bgColor: "#f3f4f6", 9 | 10 | info: "#909399", 11 | infoDark: "#82848a", 12 | infoDisabled: "#c8c9cc", 13 | infoLight: "#f4f4f5", 14 | 15 | warning: "#ff9900", 16 | warningDark: "#f29100", 17 | warningDisabled: "#fcbd71", 18 | warningLight: "#fdf6ec", 19 | 20 | error: "#fa3534", 21 | errorDark: "#dd6161", 22 | errorDisabled: "#fab6b6", 23 | errorLight: "#fef0f0", 24 | 25 | success: "#19be6b", 26 | successDark: "#18b566", 27 | successDisabled: "#71d5a1", 28 | successLight: "#dbf1e1", 29 | 30 | mainColor: "#303133", 31 | contentColor: "#606266", 32 | tipsColor: "#909399", 33 | lightColor: "#c0c4cc", 34 | borderColor: "#e4e7ed" 35 | } 36 | 37 | export default color; -------------------------------------------------------------------------------- /uview-ui/libs/function/debounce.js: -------------------------------------------------------------------------------- 1 | let timeout = null; 2 | 3 | /** 4 | * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数 5 | * 6 | * @param {Function} func 要执行的回调函数 7 | * @param {Number} wait 延时的时间 8 | * @param {Boolean} immediate 是否立即执行 9 | * @return null 10 | */ 11 | function debounce(func, wait = 500, immediate = false) { 12 | // 清除定时器 13 | if (timeout !== null) clearTimeout(timeout); 14 | // 立即执行,此类情况一般用不到 15 | if (immediate) { 16 | var callNow = !timeout; 17 | timeout = setTimeout(function() { 18 | timeout = null; 19 | }, wait); 20 | if (callNow) typeof func === 'function' && func(); 21 | } else { 22 | // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法 23 | timeout = setTimeout(function() { 24 | typeof func === 'function' && func(); 25 | }, wait); 26 | } 27 | } 28 | 29 | export default debounce 30 | -------------------------------------------------------------------------------- /uview-ui/libs/function/deepClone.js: -------------------------------------------------------------------------------- 1 | // 判断arr是否为一个数组,返回一个bool值 2 | function isArray (arr) { 3 | return Object.prototype.toString.call(arr) === '[object Array]'; 4 | } 5 | 6 | // 深度克隆 7 | function deepClone (obj) { 8 | // 对常见的“非”值,直接返回原来值 9 | if([null, undefined, NaN, false].includes(obj)) return obj; 10 | if(typeof obj !== "object" && typeof obj !== 'function') { 11 | //原始类型直接返回 12 | return obj; 13 | } 14 | var o = isArray(obj) ? [] : {}; 15 | for(let i in obj) { 16 | if(obj.hasOwnProperty(i)){ 17 | o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i]; 18 | } 19 | } 20 | return o; 21 | } 22 | 23 | export default deepClone; 24 | -------------------------------------------------------------------------------- /uview-ui/libs/function/deepMerge.js: -------------------------------------------------------------------------------- 1 | import deepClone from "./deepClone"; 2 | 3 | // JS对象深度合并 4 | function deepMerge(target = {}, source = {}) { 5 | target = deepClone(target); 6 | if (typeof target !== 'object' || typeof source !== 'object') return false; 7 | for (var prop in source) { 8 | if (!source.hasOwnProperty(prop)) continue; 9 | if (prop in target) { 10 | if (typeof target[prop] !== 'object') { 11 | target[prop] = source[prop]; 12 | } else { 13 | if (typeof source[prop] !== 'object') { 14 | target[prop] = source[prop]; 15 | } else { 16 | if (target[prop].concat && source[prop].concat) { 17 | target[prop] = target[prop].concat(source[prop]); 18 | } else { 19 | target[prop] = deepMerge(target[prop], source[prop]); 20 | } 21 | } 22 | } 23 | } else { 24 | target[prop] = source[prop]; 25 | } 26 | } 27 | return target; 28 | } 29 | 30 | export default deepMerge; -------------------------------------------------------------------------------- /uview-ui/libs/function/getParent.js: -------------------------------------------------------------------------------- 1 | // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法 2 | // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx 3 | export default function getParent(name, keys) { 4 | let parent = this.$parent; 5 | // 通过while历遍,这里主要是为了H5需要多层解析的问题 6 | while (parent) { 7 | // 父组件 8 | if (parent.$options.name !== name) { 9 | // 如果组件的name不相等,继续上一级寻找 10 | parent = parent.$parent; 11 | } else { 12 | let data = {}; 13 | // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找 14 | if(Array.isArray(keys)) { 15 | keys.map(val => { 16 | data[val] = parent[val] ? parent[val] : ''; 17 | }) 18 | } else { 19 | // 历遍传过来的对象参数 20 | for(let i in keys) { 21 | // 如果子组件有此值则用,无此值则用父组件的值 22 | // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值 23 | if(Array.isArray(keys[i])) { 24 | if(keys[i].length) { 25 | data[i] = keys[i]; 26 | } else { 27 | data[i] = parent[i]; 28 | } 29 | } else if(keys[i].constructor === Object) { 30 | // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值 31 | if(Object.keys(keys[i]).length) { 32 | data[i] = keys[i]; 33 | } else { 34 | data[i] = parent[i]; 35 | } 36 | } else { 37 | // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数 38 | data[i] = (keys[i] || keys[i] === false) ? keys[i] : parent[i]; 39 | } 40 | } 41 | } 42 | return data; 43 | } 44 | } 45 | 46 | return {}; 47 | } -------------------------------------------------------------------------------- /uview-ui/libs/function/guid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85 3 | * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier) 4 | * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题 5 | * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱 6 | * v-for的时候,推荐使用后端返回的id而不是循环的index 7 | * @param {Number} len uuid的长度 8 | * @param {Boolean} firstU 将返回的首字母置为"u" 9 | * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制 10 | */ 11 | function guid(len = 32, firstU = true, radix = null) { 12 | let chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split(''); 13 | let uuid = []; 14 | radix = radix || chars.length; 15 | 16 | if (len) { 17 | // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位 18 | for (let i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix]; 19 | } else { 20 | let r; 21 | // rfc4122标准要求返回的uuid中,某些位为固定的字符 22 | uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; 23 | uuid[14] = '4'; 24 | 25 | for (let i = 0; i < 36; i++) { 26 | if (!uuid[i]) { 27 | r = 0 | Math.random() * 16; 28 | uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r]; 29 | } 30 | } 31 | } 32 | // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class 33 | if (firstU) { 34 | uuid.shift(); 35 | return 'u' + uuid.join(''); 36 | } else { 37 | return uuid.join(''); 38 | } 39 | } 40 | 41 | export default guid; 42 | -------------------------------------------------------------------------------- /uview-ui/libs/function/queryParams.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 对象转url参数 3 | * @param {*} data,对象 4 | * @param {*} isPrefix,是否自动加上"?" 5 | */ 6 | function queryParams(data = {}, isPrefix = true, arrayFormat = 'brackets') { 7 | let prefix = isPrefix ? '?' : '' 8 | let _result = [] 9 | if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets'; 10 | for (let key in data) { 11 | let value = data[key] 12 | // 去掉为空的参数 13 | if (['', undefined, null].indexOf(value) >= 0) { 14 | continue; 15 | } 16 | // 如果值为数组,另行处理 17 | if (value.constructor === Array) { 18 | // e.g. {ids: [1, 2, 3]} 19 | switch (arrayFormat) { 20 | case 'indices': 21 | // 结果: ids[0]=1&ids[1]=2&ids[2]=3 22 | for (let i = 0; i < value.length; i++) { 23 | _result.push(key + '[' + i + ']=' + value[i]) 24 | } 25 | break; 26 | case 'brackets': 27 | // 结果: ids[]=1&ids[]=2&ids[]=3 28 | value.forEach(_value => { 29 | _result.push(key + '[]=' + _value) 30 | }) 31 | break; 32 | case 'repeat': 33 | // 结果: ids=1&ids=2&ids=3 34 | value.forEach(_value => { 35 | _result.push(key + '=' + _value) 36 | }) 37 | break; 38 | case 'comma': 39 | // 结果: ids=1,2,3 40 | let commaStr = ""; 41 | value.forEach(_value => { 42 | commaStr += (commaStr ? "," : "") + _value; 43 | }) 44 | _result.push(key + '=' + commaStr) 45 | break; 46 | default: 47 | value.forEach(_value => { 48 | _result.push(key + '[]=' + _value) 49 | }) 50 | } 51 | } else { 52 | _result.push(key + '=' + value) 53 | } 54 | } 55 | return _result.length ? prefix + _result.join('&') : '' 56 | } 57 | 58 | export default queryParams; 59 | -------------------------------------------------------------------------------- /uview-ui/libs/function/random.js: -------------------------------------------------------------------------------- 1 | function random(min, max) { 2 | if (min >= 0 && max > 0 && max >= min) { 3 | let gab = max - min + 1; 4 | return Math.floor(Math.random() * gab + min); 5 | } else { 6 | return 0; 7 | } 8 | } 9 | 10 | export default random; 11 | -------------------------------------------------------------------------------- /uview-ui/libs/function/randomArray.js: -------------------------------------------------------------------------------- 1 | // 打乱数组 2 | function randomArray(array = []) { 3 | // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0 4 | return array.sort(() => Math.random() - 0.5); 5 | } 6 | 7 | export default randomArray 8 | -------------------------------------------------------------------------------- /uview-ui/libs/function/sys.js: -------------------------------------------------------------------------------- 1 | export function os() { 2 | return uni.getSystemInfoSync().platform; 3 | }; 4 | 5 | export function sys() { 6 | return uni.getSystemInfoSync(); 7 | } 8 | 9 | 10 | -------------------------------------------------------------------------------- /uview-ui/libs/function/throttle.js: -------------------------------------------------------------------------------- 1 | let timer, flag; 2 | /** 3 | * 节流原理:在一定时间内,只能触发一次 4 | * 5 | * @param {Function} func 要执行的回调函数 6 | * @param {Number} wait 延时的时间 7 | * @param {Boolean} immediate 是否立即执行 8 | * @return null 9 | */ 10 | function throttle(func, wait = 500, immediate = true) { 11 | if (immediate) { 12 | if (!flag) { 13 | flag = true; 14 | // 如果是立即执行,则在wait毫秒内开始时执行 15 | typeof func === 'function' && func(); 16 | timer = setTimeout(() => { 17 | flag = false; 18 | }, wait); 19 | } 20 | } else { 21 | if (!flag) { 22 | flag = true 23 | // 如果是非立即执行,则在wait毫秒内的结束处执行 24 | timer = setTimeout(() => { 25 | flag = false 26 | typeof func === 'function' && func(); 27 | }, wait); 28 | } 29 | 30 | } 31 | }; 32 | export default throttle 33 | -------------------------------------------------------------------------------- /uview-ui/libs/function/timeFormat.js: -------------------------------------------------------------------------------- 1 | // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序 2 | // 所以这里做一个兼容polyfill的兼容处理 3 | if (!String.prototype.padStart) { 4 | // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解 5 | String.prototype.padStart = function(maxLength, fillString = ' ') { 6 | if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError( 7 | 'fillString must be String') 8 | let str = this 9 | // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉 10 | if (str.length >= maxLength) return String(str) 11 | 12 | let fillLength = maxLength - str.length, 13 | times = Math.ceil(fillLength / fillString.length) 14 | while (times >>= 1) { 15 | fillString += fillString 16 | if (times === 1) { 17 | fillString += fillString 18 | } 19 | } 20 | return fillString.slice(0, fillLength) + str; 21 | } 22 | } 23 | 24 | function timeFormat(timestamp = null, fmt = 'yyyy-mm-dd') { 25 | // 其他更多是格式化有如下: 26 | // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合 27 | timestamp = parseInt(timestamp); 28 | // 如果为null,则格式化当前时间 29 | if (!timestamp) timestamp = Number(new Date()); 30 | // 判断用户输入的时间戳是秒还是毫秒,一般前端js获取的时间戳是毫秒(13位),后端传过来的为秒(10位) 31 | if (timestamp.toString().length == 10) timestamp *= 1000; 32 | let date = new Date(timestamp); 33 | let ret; 34 | let opt = { 35 | "y+": date.getFullYear().toString(), // 年 36 | "m+": (date.getMonth() + 1).toString(), // 月 37 | "d+": date.getDate().toString(), // 日 38 | "h+": date.getHours().toString(), // 时 39 | "M+": date.getMinutes().toString(), // 分 40 | "s+": date.getSeconds().toString() // 秒 41 | // 有其他格式化字符需求可以继续添加,必须转化成字符串 42 | }; 43 | for (let k in opt) { 44 | ret = new RegExp("(" + k + ")").exec(fmt); 45 | if (ret) { 46 | fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0"))) 47 | }; 48 | }; 49 | return fmt; 50 | } 51 | 52 | export default timeFormat 53 | -------------------------------------------------------------------------------- /uview-ui/libs/function/timeFrom.js: -------------------------------------------------------------------------------- 1 | import timeFormat from '../../libs/function/timeFormat.js'; 2 | 3 | /** 4 | * 时间戳转为多久之前 5 | * @param String timestamp 时间戳 6 | * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式; 7 | * 如果为布尔值false,无论什么时间,都返回多久以前的格式 8 | */ 9 | function timeFrom(timestamp = null, format = 'yyyy-mm-dd') { 10 | if (timestamp == null) timestamp = Number(new Date()); 11 | timestamp = parseInt(timestamp); 12 | // 判断用户输入的时间戳是秒还是毫秒,一般前端js获取的时间戳是毫秒(13位),后端传过来的为秒(10位) 13 | if (timestamp.toString().length == 10) timestamp *= 1000; 14 | var timer = (new Date()).getTime() - timestamp; 15 | timer = parseInt(timer / 1000); 16 | // 如果小于5分钟,则返回"刚刚",其他以此类推 17 | let tips = ''; 18 | switch (true) { 19 | case timer < 300: 20 | tips = '刚刚'; 21 | break; 22 | case timer >= 300 && timer < 3600: 23 | tips = parseInt(timer / 60) + '分钟前'; 24 | break; 25 | case timer >= 3600 && timer < 86400: 26 | tips = parseInt(timer / 3600) + '小时前'; 27 | break; 28 | case timer >= 86400 && timer < 2592000: 29 | tips = parseInt(timer / 86400) + '天前'; 30 | break; 31 | default: 32 | // 如果format为false,则无论什么时间戳,都显示xx之前 33 | if(format === false) { 34 | if(timer >= 2592000 && timer < 365 * 86400) { 35 | tips = parseInt(timer / (86400 * 30)) + '个月前'; 36 | } else { 37 | tips = parseInt(timer / (86400 * 365)) + '年前'; 38 | } 39 | } else { 40 | tips = timeFormat(timestamp, format); 41 | } 42 | } 43 | return tips; 44 | } 45 | 46 | export default timeFrom; 47 | -------------------------------------------------------------------------------- /uview-ui/libs/function/toast.js: -------------------------------------------------------------------------------- 1 | function toast(title, duration = 1500) { 2 | uni.showToast({ 3 | title: title, 4 | icon: 'none', 5 | duration: duration 6 | }) 7 | } 8 | 9 | export default toast 10 | -------------------------------------------------------------------------------- /uview-ui/libs/function/trim.js: -------------------------------------------------------------------------------- 1 | function trim(str, pos = 'both') { 2 | if (pos == 'both') { 3 | return str.replace(/^\s+|\s+$/g, ""); 4 | } else if (pos == "left") { 5 | return str.replace(/^\s*/, ''); 6 | } else if (pos == 'right') { 7 | return str.replace(/(\s*$)/g, ""); 8 | } else if (pos == 'all') { 9 | return str.replace(/\s+/g, ""); 10 | } else { 11 | return str; 12 | } 13 | } 14 | 15 | export default trim 16 | -------------------------------------------------------------------------------- /uview-ui/libs/function/type2icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 根据主题type值,获取对应的图标 3 | * @param String type 主题名称,primary|info|error|warning|success 4 | * @param String fill 是否使用fill填充实体的图标 5 | */ 6 | function type2icon(type = 'success', fill = false) { 7 | // 如果非预置值,默认为success 8 | if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success'; 9 | let iconName = ''; 10 | // 目前(2019-12-12),info和primary使用同一个图标 11 | switch (type) { 12 | case 'primary': 13 | iconName = 'info-circle'; 14 | break; 15 | case 'info': 16 | iconName = 'info-circle'; 17 | break; 18 | case 'error': 19 | iconName = 'close-circle'; 20 | break; 21 | case 'warning': 22 | iconName = 'error-circle'; 23 | break; 24 | case 'success': 25 | iconName = 'checkmark-circle'; 26 | break; 27 | default: 28 | iconName = 'checkmark-circle'; 29 | } 30 | // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的 31 | if (fill) iconName += '-fill'; 32 | return iconName; 33 | } 34 | 35 | export default type2icon 36 | -------------------------------------------------------------------------------- /uview-ui/libs/mixin/mixin.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | data() { 3 | return {} 4 | }, 5 | onLoad() { 6 | // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出 7 | this.$u.getRect = this.$uGetRect 8 | }, 9 | methods: { 10 | // 查询节点信息 11 | // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21) 12 | // 解决办法为在组件根部再套一个没有任何作用的view元素 13 | $uGetRect(selector, all) { 14 | return new Promise(resolve => { 15 | uni.createSelectorQuery(). 16 | in(this)[all ? 'selectAll' : 'select'](selector) 17 | .boundingClientRect(rect => { 18 | if (all && Array.isArray(rect) && rect.length) { 19 | resolve(rect) 20 | } 21 | if (!all && rect) { 22 | resolve(rect) 23 | } 24 | }) 25 | .exec() 26 | }) 27 | } 28 | }, 29 | onReachBottom() { 30 | uni.$emit('uOnReachBottom') 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /uview-ui/libs/mixin/mpShare.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | onLoad() { 3 | // 设置默认的转发参数 4 | this.$u.mpShare = { 5 | title: '', // 默认为小程序名称 6 | path: '', // 默认为当前页面路径 7 | imageUrl: '' // 默认为当前页面的截图 8 | } 9 | }, 10 | onShareAppMessage() { 11 | return this.$u.mpShare 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /uview-ui/libs/store/index.js: -------------------------------------------------------------------------------- 1 | // 暂时不用vuex模块方式实现,将该方法直接放入到/store/index.js中 2 | const module = { 3 | actions: { 4 | $uStore({rootState}, params) { 5 | let nameArr = params.name.split('.'); 6 | if(nameArr.length >= 2) { 7 | let obj = rootState[nameArr[0]]; 8 | for(let i = 1; i < nameArr.length - 1; i ++) { 9 | obj = obj[nameArr[i]]; 10 | } 11 | obj[nameArr[nameArr.length - 1]] = params.value; 12 | } else { 13 | rootState[params.name] = params.value; 14 | } 15 | } 16 | } 17 | } 18 | 19 | export default module -------------------------------------------------------------------------------- /uview-ui/libs/util/emitter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 递归使用 call 方式this指向 3 | * @param componentName // 需要找的组件的名称 4 | * @param eventName // 事件名称 5 | * @param params // 需要传递的参数 6 | */ 7 | function broadcast(componentName, eventName, params) { 8 | // 循环子节点找到名称一样的子节点 否则 递归 当前子节点 9 | this.$children.map(child=>{ 10 | if (componentName===child.$options.name) { 11 | child.$emit.apply(child,[eventName].concat(params)) 12 | }else { 13 | broadcast.apply(child,[componentName,eventName].concat(params)) 14 | } 15 | }) 16 | } 17 | export default { 18 | methods: { 19 | /** 20 | * 派发 (向上查找) (一个) 21 | * @param componentName // 需要找的组件的名称 22 | * @param eventName // 事件名称 23 | * @param params // 需要传递的参数 24 | */ 25 | dispatch(componentName, eventName, params) { 26 | let parent = this.$parent || this.$root;//$parent 找到最近的父节点 $root 根节点 27 | let name = parent.$options.name; // 获取当前组件实例的name 28 | // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点 29 | // 循环出当前名称的一样的组件实例 30 | while (parent && (!name||name!==componentName)) { 31 | parent = parent.$parent; 32 | if (parent) { 33 | name = parent.$options.name; 34 | } 35 | } 36 | // 有节点表示当前找到了name一样的实例 37 | if (parent) { 38 | parent.$emit.apply(parent,[eventName].concat(params)) 39 | } 40 | }, 41 | /** 42 | * 广播 (向下查找) (广播多个) 43 | * @param componentName // 需要找的组件的名称 44 | * @param eventName // 事件名称 45 | * @param params // 需要传递的参数 46 | */ 47 | broadcast(componentName, eventName, params) { 48 | broadcast.call(this,componentName, eventName, params) 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /uview-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uview-ui", 3 | "version": "1.6.0", 4 | "description": "uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水", 5 | "main": "index.js", 6 | "keywords": ["uview", "uView", "uni-app", "uni-app ui", "uniapp", "uviewui", "uview ui", "uviewUI", "uViewui", "uViewUI", "uView UI", "uni ui", "uni UI", "uniapp ui", "ui", "UI框架", "uniapp ui框架", "uniapp UI"], 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "" 13 | }, 14 | "devDependencies": { 15 | "node-sass": "^4.14.0", 16 | "sass-loader": "^8.0.2" 17 | }, 18 | "author": "uView", 19 | "license": "MIT" 20 | } 21 | -------------------------------------------------------------------------------- /uview-ui/theme.scss: -------------------------------------------------------------------------------- 1 | // 此文件为uView的主题变量,这些变量目前只能通过uni.scss引入才有效,另外由于 2 | // uni.scss中引入的样式会同时混入到全局样式文件和单独每一个页面的样式中,造成微信程序包太大, 3 | // 故uni.scss只建议放scss变量名相关样式,其他的样式可以通过main.js或者App.vue引入 4 | 5 | $u-main-color: #303133; 6 | $u-content-color: #606266; 7 | $u-tips-color: #909399; 8 | $u-light-color: #c0c4cc; 9 | $u-border-color: #e4e7ed; 10 | $u-bg-color: #f3f4f6; 11 | 12 | $u-type-primary: #2979ff; 13 | $u-type-primary-light: #ecf5ff; 14 | $u-type-primary-disabled: #a0cfff; 15 | $u-type-primary-dark: #2b85e4; 16 | 17 | $u-type-warning: #ff9900; 18 | $u-type-warning-disabled: #fcbd71; 19 | $u-type-warning-dark: #f29100; 20 | $u-type-warning-light: #fdf6ec; 21 | 22 | $u-type-success: #19be6b; 23 | $u-type-success-disabled: #71d5a1; 24 | $u-type-success-dark: #18b566; 25 | $u-type-success-light: #dbf1e1; 26 | 27 | $u-type-error: #fa3534; 28 | $u-type-error-disabled: #fab6b6; 29 | $u-type-error-dark: #dd6161; 30 | $u-type-error-light: #fef0f0; 31 | 32 | $u-type-info: #909399; 33 | $u-type-info-disabled: #c8c9cc; 34 | $u-type-info-dark: #82848a; 35 | $u-type-info-light: #f4f4f5; 36 | 37 | $u-form-item-height: 70rpx; 38 | $u-form-item-border-color: #dcdfe6; 39 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | 2 | // module.exports = { 3 | // /** 4 | // * 此处为发行h5,微信小程序,app中删除console 5 | // * 如需显示console 需要注释此处重新运行 6 | // */ 7 | // chainWebpack: (config) => { 8 | // // 发行或运行时启用了压缩时会生效 9 | // config.optimization.minimizer('terser').tap((args) => { 10 | // const compress = args[0].terserOptions.compress 11 | // // 非 App 平台移除 console 代码(包含所有 console 方法,如 log,debug,info...) 12 | // compress.drop_console = true 13 | // compress.pure_funcs = [ 14 | // '__f__', // App 平台 vue 移除日志代码 15 | // // 'console.debug' // 可移除指定的 console 方法 16 | // ] 17 | // return args 18 | // }) 19 | // } 20 | // } --------------------------------------------------------------------------------
公司名称:{{storeData.companyName}}
公司地址:{{storeData.companyAddress}}
公司地址地区:{{storeData.companyAddressPath}}
员工人数:{{storeData.employeeNum}}
法定经营范围:{{storeData.scope}}