├── .tgitconfig ├── vue.config.js ├── uview-ui ├── components │ ├── uview-v1 │ │ └── uview-v1.vue │ ├── u-loading-page │ │ └── u-loading-page.vue │ ├── u-parse │ │ └── libs │ │ │ └── handler.wxs │ ├── u-tr │ │ └── u-tr.vue │ ├── u-time-line │ │ └── u-time-line.vue │ ├── u-full-screen │ │ └── u-full-screen.vue │ ├── u-gap │ │ └── u-gap.vue │ ├── u-th │ │ └── u-th.vue │ ├── u-cell-group │ │ └── u-cell-group.vue │ ├── u-td │ │ └── u-td.vue │ ├── u-time-line-item │ │ └── u-time-line-item.vue │ ├── u-table │ │ └── u-table.vue │ ├── u-row │ │ └── u-row.vue │ ├── u-link │ │ └── u-link.vue │ ├── u-index-anchor │ │ └── u-index-anchor.vue │ ├── u-line │ │ └── u-line.vue │ └── u-collapse │ │ └── u-collapse.vue ├── libs │ ├── css │ │ ├── style.nvue.scss │ │ ├── style.components.scss │ │ ├── style.h5.scss │ │ └── style.mp.scss │ ├── function │ │ ├── bem.js │ │ ├── sys.js │ │ ├── toast.js │ │ ├── randomArray.js │ │ ├── random.js │ │ ├── addUnit.js │ │ ├── trim.js │ │ ├── $parent.js │ │ ├── deepClone.js │ │ ├── throttle.js │ │ ├── debounce.js │ │ ├── deepMerge.js │ │ ├── color.js │ │ ├── type2icon.js │ │ ├── getParent.js │ │ ├── guid.js │ │ ├── timeFrom.js │ │ ├── queryParams.js │ │ └── timeFormat.js │ ├── config │ │ ├── config.js │ │ └── zIndex.js │ ├── mixin │ │ ├── mpShare.js │ │ └── mixin.js │ ├── store │ │ └── index.js │ └── util │ │ ├── province.js │ │ └── emitter.js ├── index.scss ├── package.json ├── LICENSE └── theme.scss ├── static ├── bg │ ├── bg.png │ ├── bg-user.png │ ├── bg-community.png │ ├── scroll-bg-1.png │ └── scroll-bg-2.png ├── app │ └── logo.png ├── goods │ ├── 1.png │ ├── 10.png │ ├── 11.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── 7.png │ ├── 8.png │ ├── 9.png │ ├── detail.png │ ├── mall-1.png │ ├── mall-2.png │ ├── mall-3.png │ ├── points.png │ ├── points-1.png │ ├── points-2.png │ └── points-header.png ├── user │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── sex-0.png │ └── sex-1.png ├── nav │ ├── banner.png │ ├── nav-free.png │ ├── nav-sale.png │ ├── nav-sign.png │ ├── mall-nav-1.png │ ├── mall-nav-10.png │ ├── mall-nav-2.png │ ├── mall-nav-3.png │ ├── mall-nav-4.png │ ├── mall-nav-5.png │ ├── mall-nav-6.png │ ├── mall-nav-7.png │ ├── mall-nav-8.png │ ├── mall-nav-9.png │ ├── nav-points.png │ ├── icon/收藏帖子@2x.png │ ├── mine-order-2.png │ ├── mine-order-3.png │ ├── mine-order-4.png │ ├── mine-setting-1.png │ ├── mine-setting-2.png │ ├── mine-setting-3.png │ ├── mine-setting-4.png │ ├── mine-setting-5.png │ ├── mine-setting-6.png │ ├── mine-setting-7.png │ ├── nav-classify.png │ ├── nav-community.png │ ├── nav-discount.png │ ├── nav-recommond.png │ ├── mine-community-1.png │ ├── mine-community-2.png │ ├── mine-community-3.png │ └── mine-community-4.png ├── community │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── card-1.png │ ├── card-2.png │ └── card-3.png ├── nodata │ ├── fans.png │ ├── news.png │ ├── order.png │ ├── result.png │ ├── content.png │ ├── network.png │ └── collection.png ├── operate │ ├── check.png │ ├── checked.png │ ├── setting.png │ ├── copy-url.png │ ├── publish-post.png │ ├── wechat-share.png │ ├── edit-community.png │ ├── create-community.png │ ├── publish-community.png │ └── remove-community.png └── tabbar │ ├── home.png │ ├── mall.png │ ├── user.png │ ├── community.png │ ├── home_active.png │ ├── mall_active.png │ ├── user_active.png │ └── community_active.png ├── api ├── modules │ ├── base.js │ ├── community.js │ ├── mall.js │ └── user.js ├── index.js └── config.js ├── .gitignore ├── .github └── assets │ ├── home.jpg │ ├── login.jpg │ ├── mine.jpg │ ├── post.jpg │ ├── address.jpg │ ├── city-list.jpg │ ├── community.jpg │ ├── mine-list.jpg │ ├── order-list.jpg │ ├── order-pay.jpg │ ├── shop-cart.jpg │ ├── shop-home.jpg │ ├── mine-center.jpg │ ├── publish-post.jpg │ ├── shop-detail.jpg │ ├── order-express.jpg │ ├── order-after-sale.jpg │ └── publish-community.jpg ├── pages-mine ├── static │ ├── add.png │ ├── like.png │ ├── post.png │ ├── follow.png │ ├── user-bg.png │ ├── community.png │ ├── discounts-bg.png │ ├── like-active.png │ ├── post-active.png │ ├── follow-active.png │ ├── message-system.png │ ├── community-active.png │ ├── discounts-select.png │ ├── message-community.png │ ├── message-system-active.png │ └── message-community-active.png └── pages │ ├── setting.vue │ ├── fans.vue │ ├── discover.vue │ ├── follow.vue │ └── address │ ├── list.vue │ └── add-or-update.vue ├── pages-points ├── static │ ├── bg.png │ ├── points.png │ ├── publish.png │ ├── sign-3.png │ ├── sign-7.png │ ├── active-1.png │ ├── active-2.png │ ├── collection.png │ ├── over-order.png │ ├── points-sign.png │ ├── discounts-blue.png │ └── discounts-yellow.png └── components │ ├── points-goods-card.vue │ ├── user-info.vue │ └── task.vue ├── pages-community ├── static │ ├── bg.png │ ├── goods.png │ ├── community.png │ └── location.png ├── pages │ ├── index.vue │ ├── community │ │ ├── info-community-member.vue │ │ ├── info.vue │ │ ├── select.vue │ │ └── info-community-desc.vue │ └── post │ │ └── list.vue └── components │ ├── like-unlike-btn.vue │ ├── community │ ├── community-sub-desc.vue │ ├── community-member.vue │ └── community-header.vue │ └── post │ └── post-recommend-goods.vue ├── pages ├── start-page.vue ├── community │ ├── components │ │ ├── community-tag.vue │ │ ├── community-goods.vue │ │ ├── community-card.vue │ │ ├── community-hot-nav.vue │ │ ├── community-avatar.vue │ │ └── post-card-simple.vue │ ├── follow.vue │ ├── group.vue │ └── index.vue ├── home │ └── city-list.vue ├── mine │ └── components │ │ ├── user-info.vue │ │ └── user-card-operate.vue └── search.vue ├── pages-mall ├── static │ ├── express-dot.png │ ├── express-ing.png │ ├── express-over.png │ ├── icon-ali-pay.png │ ├── icon-wx-pay.png │ ├── select-item-1.png │ ├── select-item-2.png │ ├── select-item-3.png │ └── express-dot-active.png ├── components │ ├── after-sales │ │ ├── back-all.vue │ │ ├── back-status.vue │ │ ├── select-item.vue │ │ ├── back-goods.vue │ │ └── back-money.vue │ ├── express │ │ └── utils.js │ ├── line-info-operate.vue │ ├── order │ │ ├── submit-operate.vue │ │ ├── express-goods-card.vue │ │ ├── order-operate.vue │ │ ├── submit-goods-card.vue │ │ └── submit-discounts.vue │ ├── goods │ │ └── goods-select.vue │ └── evaluate-card.vue ├── pages │ ├── evaluate │ │ └── list.vue │ ├── goods │ │ └── list.vue │ ├── order │ │ ├── list.vue │ │ └── submit.vue │ └── after-sales │ │ └── apply.vue └── mixins │ └── order-operate.js ├── uni.scss ├── store ├── index.js └── modules │ └── user.js ├── utils ├── replace.js └── uniapp-api.js ├── components ├── img-swiper.vue ├── popup-empty.vue ├── tag.vue ├── navbar │ ├── navbar.vue │ └── navbar-round-img.vue ├── nav │ ├── label-count.vue │ └── icon-label-nav.vue ├── add-popup.vue ├── title-operate.vue ├── no-data.vue ├── tabs.vue ├── add-btn-fixed.vue └── select-reason.vue ├── .hbuilderx └── launch.json ├── LICENSE ├── mixins └── smsCode.js ├── main.js ├── template.h5.html └── App.vue /.tgitconfig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {} 2 | -------------------------------------------------------------------------------- /uview-ui/components/uview-v1/uview-v1.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /uview-ui/libs/css/style.nvue.scss: -------------------------------------------------------------------------------- 1 | .nvue { 2 | font-size: 24rpx; 3 | } -------------------------------------------------------------------------------- /static/bg/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/bg/bg.png -------------------------------------------------------------------------------- /api/modules/base.js: -------------------------------------------------------------------------------- 1 | export const useFileApi = (Vue, vm) => { 2 | return {} 3 | } 4 | -------------------------------------------------------------------------------- /static/app/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/app/logo.png -------------------------------------------------------------------------------- /static/goods/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/1.png -------------------------------------------------------------------------------- /static/goods/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/10.png -------------------------------------------------------------------------------- /static/goods/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/11.png -------------------------------------------------------------------------------- /static/goods/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/2.png -------------------------------------------------------------------------------- /static/goods/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/3.png -------------------------------------------------------------------------------- /static/goods/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/4.png -------------------------------------------------------------------------------- /static/goods/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/5.png -------------------------------------------------------------------------------- /static/goods/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/6.png -------------------------------------------------------------------------------- /static/goods/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/7.png -------------------------------------------------------------------------------- /static/goods/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/8.png -------------------------------------------------------------------------------- /static/goods/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/9.png -------------------------------------------------------------------------------- /static/user/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/user/1.png -------------------------------------------------------------------------------- /static/user/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/user/2.png -------------------------------------------------------------------------------- /static/user/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/user/3.png -------------------------------------------------------------------------------- /static/user/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/user/4.png -------------------------------------------------------------------------------- /static/user/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/user/5.png -------------------------------------------------------------------------------- /static/user/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/user/6.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | dist-ssr 5 | *.local 6 | unpackage 7 | -------------------------------------------------------------------------------- /static/bg/bg-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/bg/bg-user.png -------------------------------------------------------------------------------- /static/nav/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/banner.png -------------------------------------------------------------------------------- /static/user/sex-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/user/sex-0.png -------------------------------------------------------------------------------- /static/user/sex-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/user/sex-1.png -------------------------------------------------------------------------------- /.github/assets/home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/home.jpg -------------------------------------------------------------------------------- /.github/assets/login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/login.jpg -------------------------------------------------------------------------------- /.github/assets/mine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/mine.jpg -------------------------------------------------------------------------------- /.github/assets/post.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/post.jpg -------------------------------------------------------------------------------- /api/modules/community.js: -------------------------------------------------------------------------------- 1 | export const useCommunityApi = (Vue, vm) => { 2 | return {} 3 | } 4 | -------------------------------------------------------------------------------- /static/community/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/community/1.png -------------------------------------------------------------------------------- /static/community/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/community/2.png -------------------------------------------------------------------------------- /static/community/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/community/3.png -------------------------------------------------------------------------------- /static/community/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/community/4.png -------------------------------------------------------------------------------- /static/goods/detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/detail.png -------------------------------------------------------------------------------- /static/goods/mall-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/mall-1.png -------------------------------------------------------------------------------- /static/goods/mall-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/mall-2.png -------------------------------------------------------------------------------- /static/goods/mall-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/mall-3.png -------------------------------------------------------------------------------- /static/goods/points.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/points.png -------------------------------------------------------------------------------- /static/nav/nav-free.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/nav-free.png -------------------------------------------------------------------------------- /static/nav/nav-sale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/nav-sale.png -------------------------------------------------------------------------------- /static/nav/nav-sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/nav-sign.png -------------------------------------------------------------------------------- /static/nodata/fans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nodata/fans.png -------------------------------------------------------------------------------- /static/nodata/news.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nodata/news.png -------------------------------------------------------------------------------- /static/nodata/order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nodata/order.png -------------------------------------------------------------------------------- /static/nodata/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nodata/result.png -------------------------------------------------------------------------------- /static/operate/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/operate/check.png -------------------------------------------------------------------------------- /static/tabbar/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/tabbar/home.png -------------------------------------------------------------------------------- /static/tabbar/mall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/tabbar/mall.png -------------------------------------------------------------------------------- /static/tabbar/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/tabbar/user.png -------------------------------------------------------------------------------- /.github/assets/address.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/address.jpg -------------------------------------------------------------------------------- /pages-mine/static/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/add.png -------------------------------------------------------------------------------- /pages-mine/static/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/like.png -------------------------------------------------------------------------------- /pages-mine/static/post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/post.png -------------------------------------------------------------------------------- /pages-points/static/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/bg.png -------------------------------------------------------------------------------- /static/bg/bg-community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/bg/bg-community.png -------------------------------------------------------------------------------- /static/bg/scroll-bg-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/bg/scroll-bg-1.png -------------------------------------------------------------------------------- /static/bg/scroll-bg-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/bg/scroll-bg-2.png -------------------------------------------------------------------------------- /static/goods/points-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/points-1.png -------------------------------------------------------------------------------- /static/goods/points-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/points-2.png -------------------------------------------------------------------------------- /static/nav/mall-nav-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mall-nav-1.png -------------------------------------------------------------------------------- /static/nav/mall-nav-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mall-nav-10.png -------------------------------------------------------------------------------- /static/nav/mall-nav-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mall-nav-2.png -------------------------------------------------------------------------------- /static/nav/mall-nav-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mall-nav-3.png -------------------------------------------------------------------------------- /static/nav/mall-nav-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mall-nav-4.png -------------------------------------------------------------------------------- /static/nav/mall-nav-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mall-nav-5.png -------------------------------------------------------------------------------- /static/nav/mall-nav-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mall-nav-6.png -------------------------------------------------------------------------------- /static/nav/mall-nav-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mall-nav-7.png -------------------------------------------------------------------------------- /static/nav/mall-nav-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mall-nav-8.png -------------------------------------------------------------------------------- /static/nav/mall-nav-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mall-nav-9.png -------------------------------------------------------------------------------- /static/nav/nav-points.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/nav-points.png -------------------------------------------------------------------------------- /static/nodata/content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nodata/content.png -------------------------------------------------------------------------------- /static/nodata/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nodata/network.png -------------------------------------------------------------------------------- /static/operate/checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/operate/checked.png -------------------------------------------------------------------------------- /static/operate/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/operate/setting.png -------------------------------------------------------------------------------- /.github/assets/city-list.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/city-list.jpg -------------------------------------------------------------------------------- /.github/assets/community.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/community.jpg -------------------------------------------------------------------------------- /.github/assets/mine-list.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/mine-list.jpg -------------------------------------------------------------------------------- /.github/assets/order-list.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/order-list.jpg -------------------------------------------------------------------------------- /.github/assets/order-pay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/order-pay.jpg -------------------------------------------------------------------------------- /.github/assets/shop-cart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/shop-cart.jpg -------------------------------------------------------------------------------- /.github/assets/shop-home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/shop-home.jpg -------------------------------------------------------------------------------- /pages-community/static/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-community/static/bg.png -------------------------------------------------------------------------------- /pages-mine/static/follow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/follow.png -------------------------------------------------------------------------------- /pages-mine/static/user-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/user-bg.png -------------------------------------------------------------------------------- /pages/start-page.vue: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /static/community/card-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/community/card-1.png -------------------------------------------------------------------------------- /static/community/card-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/community/card-2.png -------------------------------------------------------------------------------- /static/community/card-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/community/card-3.png -------------------------------------------------------------------------------- /static/nav/icon/收藏帖子@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/icon/收藏帖子@2x.png -------------------------------------------------------------------------------- /static/nav/mine-order-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-order-2.png -------------------------------------------------------------------------------- /static/nav/mine-order-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-order-3.png -------------------------------------------------------------------------------- /static/nav/mine-order-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-order-4.png -------------------------------------------------------------------------------- /static/nav/mine-setting-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-setting-1.png -------------------------------------------------------------------------------- /static/nav/mine-setting-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-setting-2.png -------------------------------------------------------------------------------- /static/nav/mine-setting-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-setting-3.png -------------------------------------------------------------------------------- /static/nav/mine-setting-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-setting-4.png -------------------------------------------------------------------------------- /static/nav/mine-setting-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-setting-5.png -------------------------------------------------------------------------------- /static/nav/mine-setting-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-setting-6.png -------------------------------------------------------------------------------- /static/nav/mine-setting-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-setting-7.png -------------------------------------------------------------------------------- /static/nav/nav-classify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/nav-classify.png -------------------------------------------------------------------------------- /static/nav/nav-community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/nav-community.png -------------------------------------------------------------------------------- /static/nav/nav-discount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/nav-discount.png -------------------------------------------------------------------------------- /static/nav/nav-recommond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/nav-recommond.png -------------------------------------------------------------------------------- /static/nodata/collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nodata/collection.png -------------------------------------------------------------------------------- /static/operate/copy-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/operate/copy-url.png -------------------------------------------------------------------------------- /static/tabbar/community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/tabbar/community.png -------------------------------------------------------------------------------- /static/tabbar/home_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/tabbar/home_active.png -------------------------------------------------------------------------------- /static/tabbar/mall_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/tabbar/mall_active.png -------------------------------------------------------------------------------- /static/tabbar/user_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/tabbar/user_active.png -------------------------------------------------------------------------------- /uview-ui/libs/function/bem.js: -------------------------------------------------------------------------------- 1 | function bem(name, conf) { 2 | 3 | } 4 | 5 | module.exports.bem = bem; 6 | -------------------------------------------------------------------------------- /.github/assets/mine-center.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/mine-center.jpg -------------------------------------------------------------------------------- /.github/assets/publish-post.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/publish-post.jpg -------------------------------------------------------------------------------- /.github/assets/shop-detail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/shop-detail.jpg -------------------------------------------------------------------------------- /pages-mine/static/community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/community.png -------------------------------------------------------------------------------- /pages-points/static/points.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/points.png -------------------------------------------------------------------------------- /pages-points/static/publish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/publish.png -------------------------------------------------------------------------------- /pages-points/static/sign-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/sign-3.png -------------------------------------------------------------------------------- /pages-points/static/sign-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/sign-7.png -------------------------------------------------------------------------------- /static/goods/points-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/goods/points-header.png -------------------------------------------------------------------------------- /static/nav/mine-community-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-community-1.png -------------------------------------------------------------------------------- /static/nav/mine-community-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-community-2.png -------------------------------------------------------------------------------- /static/nav/mine-community-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-community-3.png -------------------------------------------------------------------------------- /static/nav/mine-community-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/nav/mine-community-4.png -------------------------------------------------------------------------------- /static/operate/publish-post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/operate/publish-post.png -------------------------------------------------------------------------------- /static/operate/wechat-share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/operate/wechat-share.png -------------------------------------------------------------------------------- /.github/assets/order-express.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/order-express.jpg -------------------------------------------------------------------------------- /pages-community/static/goods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-community/static/goods.png -------------------------------------------------------------------------------- /pages-mall/static/express-dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mall/static/express-dot.png -------------------------------------------------------------------------------- /pages-mall/static/express-ing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mall/static/express-ing.png -------------------------------------------------------------------------------- /pages-mall/static/express-over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mall/static/express-over.png -------------------------------------------------------------------------------- /pages-mall/static/icon-ali-pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mall/static/icon-ali-pay.png -------------------------------------------------------------------------------- /pages-mall/static/icon-wx-pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mall/static/icon-wx-pay.png -------------------------------------------------------------------------------- /pages-mine/static/discounts-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/discounts-bg.png -------------------------------------------------------------------------------- /pages-mine/static/like-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/like-active.png -------------------------------------------------------------------------------- /pages-mine/static/post-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/post-active.png -------------------------------------------------------------------------------- /pages-points/static/active-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/active-1.png -------------------------------------------------------------------------------- /pages-points/static/active-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/active-2.png -------------------------------------------------------------------------------- /pages-points/static/collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/collection.png -------------------------------------------------------------------------------- /pages-points/static/over-order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/over-order.png -------------------------------------------------------------------------------- /static/operate/edit-community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/operate/edit-community.png -------------------------------------------------------------------------------- /static/tabbar/community_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/tabbar/community_active.png -------------------------------------------------------------------------------- /.github/assets/order-after-sale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/order-after-sale.jpg -------------------------------------------------------------------------------- /.github/assets/publish-community.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/.github/assets/publish-community.jpg -------------------------------------------------------------------------------- /pages-community/pages/index.vue: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /pages-community/static/community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-community/static/community.png -------------------------------------------------------------------------------- /pages-community/static/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-community/static/location.png -------------------------------------------------------------------------------- /pages-mall/static/select-item-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mall/static/select-item-1.png -------------------------------------------------------------------------------- /pages-mall/static/select-item-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mall/static/select-item-2.png -------------------------------------------------------------------------------- /pages-mall/static/select-item-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mall/static/select-item-3.png -------------------------------------------------------------------------------- /pages-mine/static/follow-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/follow-active.png -------------------------------------------------------------------------------- /pages-mine/static/message-system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/message-system.png -------------------------------------------------------------------------------- /pages-points/static/points-sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/points-sign.png -------------------------------------------------------------------------------- /static/operate/create-community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/operate/create-community.png -------------------------------------------------------------------------------- /static/operate/publish-community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/operate/publish-community.png -------------------------------------------------------------------------------- /static/operate/remove-community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/static/operate/remove-community.png -------------------------------------------------------------------------------- /pages-mine/static/community-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/community-active.png -------------------------------------------------------------------------------- /pages-mine/static/discounts-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/discounts-select.png -------------------------------------------------------------------------------- /pages-mine/static/message-community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/message-community.png -------------------------------------------------------------------------------- /pages-points/static/discounts-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/discounts-blue.png -------------------------------------------------------------------------------- /pages-mall/static/express-dot-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mall/static/express-dot-active.png -------------------------------------------------------------------------------- /pages-points/static/discounts-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-points/static/discounts-yellow.png -------------------------------------------------------------------------------- /pages-mall/components/after-sales/back-all.vue: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /pages-mine/static/message-system-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/message-system-active.png -------------------------------------------------------------------------------- /uni.scss: -------------------------------------------------------------------------------- 1 | // 基于 uview-ui 的组件主题配置 2 | @import 'uview-ui/theme.scss'; 3 | 4 | // 基于 fun-uniapp-dev 的页面主题配置 5 | @import '@/theme.scss'; 6 | -------------------------------------------------------------------------------- /pages-mine/static/message-community-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kieranwv/ushop/HEAD/pages-mine/static/message-community-active.png -------------------------------------------------------------------------------- /pages-mine/pages/setting.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | Vue.use(Vuex) 4 | 5 | import user from './modules/user.js' 6 | 7 | export default new Vuex.Store({ 8 | modules: { 9 | user, 10 | } 11 | }) 12 | -------------------------------------------------------------------------------- /uview-ui/libs/css/style.components.scss: -------------------------------------------------------------------------------- 1 | // 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错 2 | @mixin vue-flex($direction: row) { 3 | /* #ifndef APP-NVUE */ 4 | display: flex; 5 | flex-direction: $direction; 6 | /* #endif */ 7 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /api/modules/mall.js: -------------------------------------------------------------------------------- 1 | export const useMallApi = (Vue, vm) => { 2 | return { 3 | // 查询商城轮播图 4 | getMallHomeData: () => vm.$u.get('/index'), 5 | 6 | // 查询分类 7 | getMallClassify: () => vm.$u.get('/category') 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /utils/replace.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 常用正则表达式替换方法 3 | * 4 | * @replaceSale 月销量,超过一万的加上'w+' 5 | */ 6 | 7 | // 月销量,超过一万的加上'w+' 8 | 9 | export const replaceSale = (sale) => { 10 | return sale > 10000 ? sale.replace(/\d{4}$/, 'w+') : sale 11 | } 12 | -------------------------------------------------------------------------------- /uview-ui/libs/config/config.js: -------------------------------------------------------------------------------- 1 | // 此版本发布于2020-12-17 2 | let version = '1.8.3'; 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/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 | -------------------------------------------------------------------------------- /api/modules/user.js: -------------------------------------------------------------------------------- 1 | export const useWxApi = (Vue, vm) => { 2 | return { 3 | // 获取openid 4 | getOpenId: (code) => vm.$u.get('/appletsUser/openId', { 5 | code 6 | }), 7 | // 通过openid登录 8 | loginByOpenId: (openId) => vm.$u.get('/appletsUser/loginByOpenId', { 9 | openId 10 | }) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /utils/uniapp-api.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 基于uniapp的api进行二次封装,便于全局管理 3 | * 4 | * @copyByUniappApi 全局复制到剪贴板方法 5 | */ 6 | 7 | // 全局复制到剪贴板方法 8 | export const copyByUniappApi = (data, msg = '已复制到剪贴板') => { 9 | uni.setClipboardData({ 10 | data: data.toString(), 11 | success: function() { 12 | uni.showToast({ 13 | title: msg, 14 | icon: 'none' 15 | }); 16 | } 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /uview-ui/components/u-loading-page/u-loading-page.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 22 | 23 | 26 | -------------------------------------------------------------------------------- /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 | // #ifdef MP-WEIXIN 14 | onShareTimeline() { 15 | return this.$u.mpShare 16 | } 17 | // #endif 18 | } 19 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /components/img-swiper.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /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/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/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/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 -------------------------------------------------------------------------------- /api/index.js: -------------------------------------------------------------------------------- 1 | // 用户模块api 2 | import { 3 | useWxApi 4 | } from './modules/user.js' 5 | 6 | // 基础模块api 7 | import { 8 | useFileApi 9 | } from './modules/base.js' 10 | 11 | // 商城模块api 12 | import { 13 | useMallApi 14 | } from './modules/mall.js' 15 | 16 | // 社区模块api 17 | import { 18 | useCommunityApi 19 | } from './modules/community.js' 20 | 21 | 22 | // 导出api全局安装方法 23 | export const installApiModules = (Vue, vm) => { 24 | vm.$u.api = Object.assign(useFileApi(Vue, vm), useWxApi(Vue, vm), useMallApi(Vue, vm), useCommunityApi(Vue, vm)) 25 | } 26 | -------------------------------------------------------------------------------- /uview-ui/components/u-tr/u-tr.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | 19 | 26 | -------------------------------------------------------------------------------- /.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" : "local" 8 | }, 9 | "default" : 10 | { 11 | "launchtype" : "local" 12 | }, 13 | "mp-weixin" : 14 | { 15 | "launchtype" : "local" 16 | }, 17 | "type" : "uniCloud" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /components/popup-empty.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 27 | 28 | 35 | -------------------------------------------------------------------------------- /components/tag.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 15 | 16 | 32 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pages-mine/pages/fans.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 20 | 21 | 27 | -------------------------------------------------------------------------------- /pages-mine/pages/discover.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 20 | 21 | 27 | -------------------------------------------------------------------------------- /pages-mine/pages/follow.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 20 | 21 | 27 | -------------------------------------------------------------------------------- /components/navbar/navbar.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pages-mall/components/express/utils.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | export const setAttribute = function(data) { 3 | if (Array.isArray(data) && data.length > 0) { 4 | return data.map((item, index) => { 5 | Vue.set(item, 'isFirstNode', false) 6 | return item 7 | }) 8 | } else { 9 | return [] 10 | } 11 | } 12 | 13 | export const changeAttribute = function(testStrList, targetList) { 14 | let cacheData = targetList; 15 | testStrList.forEach((item, index) => { 16 | let result_Index = targetList.findIndex(function(f_item, f_index) { 17 | return String(f_item.status) == item 18 | }) 19 | if (result_Index != -1) { 20 | cacheData[result_Index].isFirstNode = true; 21 | } 22 | }) 23 | return cacheData; 24 | } 25 | 26 | export default { 27 | setAttribute, 28 | changeAttribute 29 | } 30 | -------------------------------------------------------------------------------- /uview-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uview-ui", 3 | "version": "1.8.4", 4 | "description": "uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水", 5 | "main": "index.js", 6 | "keywords": [ 7 | "uview", 8 | "uView", 9 | "uni-app", 10 | "uni-app ui", 11 | "uniapp", 12 | "uviewui", 13 | "uview ui", 14 | "uviewUI", 15 | "uViewui", 16 | "uViewUI", 17 | "uView UI", 18 | "uni ui", 19 | "uni UI", 20 | "uniapp ui", 21 | "ui", 22 | "UI框架", 23 | "uniapp ui框架", 24 | "uniapp UI" 25 | ], 26 | "scripts": { 27 | "test": "echo \"Error: no test specified\" && exit 1" 28 | }, 29 | "repository": { 30 | "type": "git", 31 | "url": "" 32 | }, 33 | "devDependencies": { 34 | "node-sass": "^4.14.0", 35 | "sass-loader": "^8.0.2" 36 | }, 37 | "author": "uView", 38 | "license": "MIT" 39 | } 40 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /store/modules/user.js: -------------------------------------------------------------------------------- 1 | export default { 2 | namespaced: true, 3 | state: { 4 | // 微信基础信息 5 | WX_BASIC_INFO: {}, 6 | // 用户信息 7 | USER_INFO: {}, 8 | // 定位信息 9 | LOCATION_INFO: {} 10 | }, 11 | mutations: { 12 | // 更新定位信息 13 | COMMIT_LOACTION_INFO(state, data) { 14 | uni.setStorage({ 15 | key: 'LOCATION_INFO', 16 | data 17 | }) 18 | state.LOCATION_INFO = data 19 | }, 20 | // 更新用户信息 21 | COMMIT_USER_INFO(state, data) { 22 | uni.setStorage({ 23 | key: 'USER_INFO', 24 | data 25 | }) 26 | state.USER_INFO = data 27 | }, 28 | }, 29 | actions: { 30 | // 手机号+验证码登录方法 31 | loginByPhone() { 32 | 33 | }, 34 | 35 | // 微信登录方法 36 | loginByWx() { 37 | 38 | }, 39 | 40 | // 退出登录 41 | logout() { 42 | 43 | }, 44 | 45 | // 获取用户定位信息 46 | getLoaction() {} 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /pages-community/components/like-unlike-btn.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 17 | 18 | 38 | -------------------------------------------------------------------------------- /pages/community/components/community-tag.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 20 | 21 | 38 | -------------------------------------------------------------------------------- /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/components/u-time-line/u-time-line.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 23 | 24 | 44 | -------------------------------------------------------------------------------- /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; -------------------------------------------------------------------------------- /pages/community/follow.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /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/util/province.js: -------------------------------------------------------------------------------- 1 | var provinceData=[{"label":"北京市","value":"11"},{"label":"天津市","value":"12"},{"label":"河北省","value":"13"},{"label":"山西省","value":"14"},{"label":"内蒙古自治区","value":"15"},{"label":"辽宁省","value":"21"},{"label":"吉林省","value":"22"},{"label":"黑龙江省","value":"23"},{"label":"上海市","value":"31"},{"label":"江苏省","value":"32"},{"label":"浙江省","value":"33"},{"label":"安徽省","value":"34"},{"label":"福建省","value":"35"},{"label":"江西省","value":"36"},{"label":"山东省","value":"37"},{"label":"河南省","value":"41"},{"label":"湖北省","value":"42"},{"label":"湖南省","value":"43"},{"label":"广东省","value":"44"},{"label":"广西壮族自治区","value":"45"},{"label":"海南省","value":"46"},{"label":"重庆市","value":"50"},{"label":"四川省","value":"51"},{"label":"贵州省","value":"52"},{"label":"云南省","value":"53"},{"label":"西藏自治区","value":"54"},{"label":"陕西省","value":"61"},{"label":"甘肃省","value":"62"},{"label":"青海省","value":"63"},{"label":"宁夏回族自治区","value":"64"},{"label":"新疆维吾尔自治区","value":"65"},{"label":"台湾","value":"66"},{"label":"香港","value":"67"},{"label":"澳门","value":"68"}];export default provinceData; -------------------------------------------------------------------------------- /pages-mall/pages/evaluate/list.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 31 | 32 | 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Kaivan Wong 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/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. -------------------------------------------------------------------------------- /pages-community/pages/community/info-community-member.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 28 | 29 | 38 | -------------------------------------------------------------------------------- /pages-community/components/community/community-sub-desc.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | 42 | -------------------------------------------------------------------------------- /uview-ui/components/u-full-screen/u-full-screen.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 38 | 39 | 53 | -------------------------------------------------------------------------------- /pages-mall/components/after-sales/back-status.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 38 | 39 | 60 | -------------------------------------------------------------------------------- /components/nav/label-count.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 24 | 25 | 51 | -------------------------------------------------------------------------------- /mixins/smsCode.js: -------------------------------------------------------------------------------- 1 | const mixinSmsCode = { 2 | data() { 3 | return { 4 | smsCode: { 5 | countDownTime: 60, 6 | isGetting: false, 7 | getted: false, 8 | timer: null 9 | } 10 | } 11 | }, 12 | methods: { 13 | // 获取验证码方法 14 | getCode(PHONE_KEY, callBack) { 15 | if (!this[PHONE_KEY]) { 16 | uni.showToast({ 17 | icon: 'none', 18 | title: '请输入手机号' 19 | }); 20 | return; 21 | } 22 | uni.showLoading({ 23 | title: '正在获取验证码' 24 | }); 25 | callBack() 26 | }, 27 | 28 | // 验证码请求后续 29 | getSmsCodeOver() { 30 | uni.hideLoading(); 31 | this.smsCode.isGetting = true; 32 | this.smsCode.getted = true; 33 | this.smsCode.timer = setInterval(() => { 34 | if (this.smsCode.countDownTime > 0 && this.smsCode.countDownTime <= 60) { 35 | this.smsCode.countDownTime--; 36 | } else { 37 | this.resetCountDown(false); 38 | } 39 | }, 1000); 40 | }, 41 | 42 | // 倒计时初始化 43 | resetCountDown(isInit) { 44 | clearInterval(this.smsCode.timer); 45 | this.smsCode = { 46 | countDownTime: 60, 47 | isGetting: false, 48 | getted: isInit ? false : true, 49 | timer: null 50 | }; 51 | this.$forceUpdate(); 52 | }, 53 | } 54 | } 55 | 56 | export default mixinSmsCode 57 | -------------------------------------------------------------------------------- /pages-community/pages/community/info.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /pages-mall/pages/goods/list.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 38 | 39 | 44 | -------------------------------------------------------------------------------- /uview-ui/libs/css/style.mp.scss: -------------------------------------------------------------------------------- 1 | /* start--微信小程序编译后页面有组件名的元素,特别处理--start */ 2 | /* #ifdef MP-WEIXIN || MP-QQ */ 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 | 33 | u-dropdown { 34 | flex: 1; 35 | } 36 | /* #endif */ 37 | /* end-微信小程序编译后页面有组件名的元素,特别处理--end */ 38 | 39 | 40 | /* #ifdef MP-QQ || MP-TOUTIAO */ 41 | // 需要做这一切额外的兼容,都是因为TX的无能 42 | u-icon { 43 | line-height: 0; 44 | } 45 | /* #endif */ 46 | 47 | /* start--头条小程序编译后页面有组件名的元素,特别处理--start */ 48 | // 由于头条小程序不支持直接组件名形式写样式,目前只能在写组件的时候给组件加上对应的类名 49 | /* #ifdef MP-TOUTIAO */ 50 | .u-td, .u-th, .u-tr { 51 | flex: 1; 52 | align-self: stretch; 53 | } 54 | 55 | .u-row, .u-col { 56 | flex: 1; 57 | align-self: stretch; 58 | } 59 | 60 | // 避免小程序线条组件因为父组件display: flex;而失效 61 | .u-line { 62 | flex: 1; 63 | } 64 | 65 | .u-dropdown { 66 | flex: 1; 67 | } 68 | /* #endif */ 69 | /* end-头条小程序编译后页面有组件名的元素,特别处理--end */ 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /pages-mall/components/line-info-operate.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 28 | 29 | 58 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './App'; 3 | 4 | Vue.config.productionTip = false; 5 | 6 | App.mpType = 'app'; 7 | 8 | // 引入全局uview-ui 9 | import uView from 'uview-ui'; 10 | Vue.use(uView); 11 | 12 | // uview-ui对小程序分享的mixin封装 13 | let mpShare = require('uview-ui/libs/mixin/mpShare.js'); 14 | Vue.mixin(mpShare); 15 | 16 | // 引入全局组件 17 | import Navbar from '@/components/navbar/navbar.vue' 18 | Vue.component('Navbar', Navbar); 19 | import NoData from '@/components/no-data.vue' 20 | Vue.component('NoData', NoData); 21 | 22 | // 引入全局主题变量 23 | import appTheme from '@/theme.scss'; 24 | Vue.prototype.$appTheme = appTheme 25 | 26 | // 引入全局工具函数 27 | import { 28 | replaceSale 29 | } from '@/utils/replace.js' 30 | Vue.prototype.$replaceSale = replaceSale 31 | import { 32 | copyByUniappApi 33 | } from '@/utils/uniapp-api.js'; 34 | Vue.prototype.$copyByUniappApi = copyByUniappApi 35 | 36 | // 引入vuex 37 | import store from './store/index.js' 38 | Vue.prototype.$store = store 39 | 40 | const app = new Vue({ 41 | ...store, 42 | ...App 43 | }); 44 | 45 | // 以下内容需要在 new Vue() 之后引入注册,因为外部JS文件需要引用vue的实例,即this对象 46 | 47 | // 基于uview-ui的http配置 48 | import { 49 | installHttpConfig 50 | } from '@/api/config.js'; 51 | Vue.use(installHttpConfig, app); 52 | 53 | // http接口API全局 54 | import { 55 | installApiModules 56 | } from '@/api'; 57 | Vue.use(installApiModules, app); 58 | 59 | app.$mount(); 60 | -------------------------------------------------------------------------------- /uview-ui/components/u-gap/u-gap.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 51 | 52 | 55 | -------------------------------------------------------------------------------- /pages/community/group.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 40 | 41 | 47 | -------------------------------------------------------------------------------- /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/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: #5758f6; 13 | $u-type-primary-light: #ecf5ff; 14 | $u-type-primary-disabled: #a0cfff; 15 | $u-type-primary-dark: rgba(#5758f6, 0.8); 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-type-dark: #6d6e7b; 38 | $u-type-dark-disabled: #909399; 39 | $u-type-dark-dark: #909399; 40 | $u-type-dark-light: #909399; 41 | 42 | $u-type-white: #fff; 43 | $u-type-white-disabled: #efefef; 44 | $u-type-white-dark: #fff; 45 | $u-type-white-light: #fff; 46 | 47 | $u-form-item-height: 70rpx; 48 | $u-form-item-border-color: #dcdfe6; 49 | -------------------------------------------------------------------------------- /pages/community/components/community-goods.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 38 | 39 | 68 | -------------------------------------------------------------------------------- /components/nav/icon-label-nav.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 37 | 38 | 64 | -------------------------------------------------------------------------------- /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(dateTime = null, format = 'yyyy-mm-dd') { 10 | // 如果为null,则格式化当前时间 11 | if (!dateTime) dateTime = Number(new Date()); 12 | // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式 13 | if (dateTime.toString().length == 10) dateTime *= 1000; 14 | let timestamp = + new Date(Number(dateTime)); 15 | 16 | let timer = (Number(new Date()) - timestamp) / 1000; 17 | // 如果小于5分钟,则返回"刚刚",其他以此类推 18 | let tips = ''; 19 | switch (true) { 20 | case timer < 300: 21 | tips = '刚刚'; 22 | break; 23 | case timer >= 300 && timer < 3600: 24 | tips = parseInt(timer / 60) + '分钟前'; 25 | break; 26 | case timer >= 3600 && timer < 86400: 27 | tips = parseInt(timer / 3600) + '小时前'; 28 | break; 29 | case timer >= 86400 && timer < 2592000: 30 | tips = parseInt(timer / 86400) + '天前'; 31 | break; 32 | default: 33 | // 如果format为false,则无论什么时间戳,都显示xx之前 34 | if(format === false) { 35 | if(timer >= 2592000 && timer < 365 * 86400) { 36 | tips = parseInt(timer / (86400 * 30)) + '个月前'; 37 | } else { 38 | tips = parseInt(timer / (86400 * 365)) + '年前'; 39 | } 40 | } else { 41 | tips = timeFormat(timestamp, format); 42 | } 43 | } 44 | return tips; 45 | } 46 | 47 | export default timeFrom; 48 | -------------------------------------------------------------------------------- /pages-community/components/post/post-recommend-goods.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 51 | 52 | 60 | -------------------------------------------------------------------------------- /template.h5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | <%= htmlWebpackPlugin.options.title %> 10 | 11 | 12 | 13 | 16 | 21 | 22 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 |
37 | 38 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /components/add-popup.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 48 | 49 | 71 | -------------------------------------------------------------------------------- /uview-ui/components/u-th/u-th.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | 49 | 63 | -------------------------------------------------------------------------------- /pages-community/pages/post/list.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 54 | 55 | 60 | -------------------------------------------------------------------------------- /pages-points/components/points-goods-card.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 36 | 37 | 69 | -------------------------------------------------------------------------------- /components/title-operate.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 65 | 66 | 80 | -------------------------------------------------------------------------------- /uview-ui/components/u-cell-group/u-cell-group.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 51 | 52 | 71 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pages-mall/components/order/submit-operate.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 32 | 33 | 75 | -------------------------------------------------------------------------------- /components/no-data.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 52 | 53 | 81 | -------------------------------------------------------------------------------- /pages-community/pages/community/select.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 52 | 53 | 61 | -------------------------------------------------------------------------------- /uview-ui/components/u-td/u-td.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 51 | 52 | 67 | -------------------------------------------------------------------------------- /pages-mall/components/after-sales/select-item.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 38 | 39 | 76 | -------------------------------------------------------------------------------- /pages-mine/pages/address/list.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 58 | 59 | 77 | -------------------------------------------------------------------------------- /components/navbar/navbar-round-img.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 70 | 71 | 83 | -------------------------------------------------------------------------------- /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/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 | // 其他更多是格式化有如下: 25 | // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合 26 | function timeFormat(dateTime = null, fmt = 'yyyy-mm-dd') { 27 | // 如果为null,则格式化当前时间 28 | if (!dateTime) dateTime = Number(new Date()); 29 | // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式 30 | if (dateTime.toString().length == 10) dateTime *= 1000; 31 | let date = new Date(dateTime); 32 | let ret; 33 | let opt = { 34 | "y+": date.getFullYear().toString(), // 年 35 | "m+": (date.getMonth() + 1).toString(), // 月 36 | "d+": date.getDate().toString(), // 日 37 | "h+": date.getHours().toString(), // 时 38 | "M+": date.getMinutes().toString(), // 分 39 | "s+": date.getSeconds().toString() // 秒 40 | // 有其他格式化字符需求可以继续添加,必须转化成字符串 41 | }; 42 | for (let k in opt) { 43 | ret = new RegExp("(" + k + ")").exec(fmt); 44 | if (ret) { 45 | fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0"))) 46 | }; 47 | }; 48 | return fmt; 49 | } 50 | 51 | export default timeFormat 52 | -------------------------------------------------------------------------------- /pages-mall/components/order/express-goods-card.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 35 | 36 | 79 | -------------------------------------------------------------------------------- /pages-points/components/user-info.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 31 | 32 | 78 | -------------------------------------------------------------------------------- /components/tabs.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 82 | 83 | 87 | -------------------------------------------------------------------------------- /api/config.js: -------------------------------------------------------------------------------- 1 | // api请求地址 2 | export const HTTP_URL_DEV = 'http://sdyy.apicloud-system.com/cm-app-api' 3 | export const HTTP_URL_PROD = 'http://sdyy.apicloud-system.com/cm-app-api' 4 | 5 | // api前缀 6 | export const HTTP_URL_DEV_PREFIX = '/api' 7 | export const HTTP_URL_PROD_PREFIX = '/api' 8 | 9 | // 基于uview-ui的http配置 10 | export const UVIEWUI_HTTP_CONFIG = { 11 | // 地址 12 | baseUrl: process.env.NODE_ENV === 'development' ? 13 | HTTP_URL_DEV + HTTP_URL_DEV_PREFIX : HTTP_URL_PROD + HTTP_URL_PROD_PREFIX, 14 | // 请求方式 15 | method: 'GET', 16 | // 参数类型 17 | dataType: 'json', 18 | // 是否显示请求中的loading 19 | showLoading: true, 20 | // 请求loading中的文字提示 21 | loadingText: '请求中...', 22 | // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms 23 | loadingTime: 800, 24 | // 是否在拦截器中返回服务端的原始数据 25 | originalData: false, 26 | // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透 27 | loadingMask: true, 28 | // 配置请求头信息 29 | header: { 30 | 'content-type': 'application/json;charset=UTF-8', 31 | }, 32 | } 33 | 34 | // 此处配置请求拦截器 35 | export const httpRequest = (config) => { 36 | const token = uni.getStorageSync('APP_USER_TOKEN') 37 | config.headers = { 38 | Authorization: token 39 | } 40 | return config; 41 | } 42 | 43 | // 此处配置响应拦截器 44 | export const httpResponse = (res) => { 45 | if (res.status == 0 || 200) { 46 | return res 47 | } else if (res.status == 500 && process.env.NODE_ENV === 'development') { 48 | uni.showModal({ 49 | title: '仅在开发模式下提示', 50 | content: '错误信息:' + res.msg 51 | }) 52 | return res 53 | } else if (res.status == 500 && process.env.NODE_ENV === 'production') { 54 | uni.showToast({ 55 | title: '服务器异常,请联系客服!', 56 | icon: 'none', 57 | duration: 3000 58 | }) 59 | return res 60 | } 61 | } 62 | 63 | // http安装方法 64 | export const installHttpConfig = (Vue, vm) => { 65 | Vue.prototype.$u.http.setConfig(UVIEWUI_HTTP_CONFIG); 66 | Vue.prototype.$u.http.interceptor.request = httpRequest 67 | Vue.prototype.$u.http.interceptor.response = httpResponse 68 | } 69 | -------------------------------------------------------------------------------- /pages-mall/components/after-sales/back-goods.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 61 | 62 | 73 | -------------------------------------------------------------------------------- /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 | getParentData(parentName = '') { 29 | // 避免在created中去定义parent变量 30 | if(!this.parent) this.parent = false; 31 | // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this) 32 | // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性 33 | // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化 34 | this.parent = this.$u.$parent.call(this, parentName); 35 | if(this.parent) { 36 | // 历遍parentData中的属性,将parent中的同名属性赋值给parentData 37 | Object.keys(this.parentData).map(key => { 38 | this.parentData[key] = this.parent[key]; 39 | }); 40 | } 41 | }, 42 | // 阻止事件冒泡 43 | preventEvent(e) { 44 | e && e.stopPropagation && e.stopPropagation() 45 | } 46 | }, 47 | onReachBottom() { 48 | uni.$emit('uOnReachBottom') 49 | }, 50 | beforeDestroy() { 51 | // 判断当前页面是否存在parent和chldren,一般在checkbox和checkbox-group父子联动的场景会有此情况 52 | // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱 53 | if(this.parent && uni.$u.test.array(this.parent.children)) { 54 | // 组件销毁时,移除父组件中的children数组中对应的实例 55 | const childrenList = this.parent.children 56 | childrenList.map((child, index) => { 57 | // 如果相等,则移除 58 | if(child === this) { 59 | childrenList.splice(index, 1) 60 | } 61 | }) 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /pages/home/city-list.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 55 | 56 | 71 | -------------------------------------------------------------------------------- /pages-mall/pages/order/list.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 69 | 70 | 75 | -------------------------------------------------------------------------------- /pages/community/components/community-card.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 48 | 49 | 88 | -------------------------------------------------------------------------------- /uview-ui/components/u-time-line-item/u-time-line-item.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 52 | 53 | 84 | -------------------------------------------------------------------------------- /pages/mine/components/user-info.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 42 | 43 | 83 | -------------------------------------------------------------------------------- /App.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 71 | -------------------------------------------------------------------------------- /pages-mall/components/order/order-operate.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 34 | 35 | 76 | -------------------------------------------------------------------------------- /pages-mall/components/goods/goods-select.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 55 | 56 | 88 | -------------------------------------------------------------------------------- /pages/community/components/community-hot-nav.vue: -------------------------------------------------------------------------------- 1 | 14 | 58 | 59 | 91 | -------------------------------------------------------------------------------- /pages/community/index.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /uview-ui/components/u-table/u-table.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 76 | 77 | 85 | -------------------------------------------------------------------------------- /pages-mall/components/after-sales/back-money.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 64 | 65 | 76 | -------------------------------------------------------------------------------- /pages/mine/components/user-card-operate.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 49 | 50 | 82 | -------------------------------------------------------------------------------- /pages-community/pages/community/info-community-desc.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 36 | 37 | 83 | -------------------------------------------------------------------------------- /pages-mall/pages/order/submit.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 56 | 71 | -------------------------------------------------------------------------------- /pages-community/components/community/community-member.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 39 | 40 | 85 | -------------------------------------------------------------------------------- /pages-points/components/task.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 35 | 36 | 87 | -------------------------------------------------------------------------------- /uview-ui/components/u-row/u-row.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 65 | 66 | 85 | -------------------------------------------------------------------------------- /pages-community/components/community/community-header.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 47 | 48 | 94 | -------------------------------------------------------------------------------- /uview-ui/components/u-link/u-link.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 82 | 83 | 90 | -------------------------------------------------------------------------------- /pages-mall/components/evaluate-card.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 43 | 44 | 89 | -------------------------------------------------------------------------------- /pages/community/components/community-avatar.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 54 | 55 | 88 | -------------------------------------------------------------------------------- /uview-ui/components/u-index-anchor/u-index-anchor.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 68 | 69 | 90 | -------------------------------------------------------------------------------- /pages-mall/components/order/submit-goods-card.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 36 | 37 | 95 | -------------------------------------------------------------------------------- /pages-mine/pages/address/add-or-update.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 71 | 72 | 81 | -------------------------------------------------------------------------------- /uview-ui/components/u-line/u-line.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 77 | 78 | 85 | -------------------------------------------------------------------------------- /components/add-btn-fixed.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 71 | 72 | 92 | -------------------------------------------------------------------------------- /pages/search.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 71 | 72 | 80 | -------------------------------------------------------------------------------- /pages-mall/mixins/order-operate.js: -------------------------------------------------------------------------------- 1 | export const orderOperate = { 2 | data() { 3 | return { 4 | // 主题色 5 | appThemeColor: this.$appTheme.appThemeColor 6 | } 7 | }, 8 | methods: { 9 | // 去付款 10 | goPay() { 11 | uni.navigateTo({ 12 | url: '/pages-mall/pages/order/pay' 13 | }); 14 | }, 15 | 16 | // 查看详情 17 | goOrderInfo() { 18 | uni.setStorageSync('orderInfo', this.data); 19 | uni.navigateTo({ 20 | url: '/pages-mall/pages/order/detail' 21 | }); 22 | }, 23 | 24 | // 取消订单 25 | cancelOrder() { 26 | uni.showModal({ 27 | title: '提示', 28 | content: '是否取消当前订单?', 29 | confirmColor: this.appThemeColor, 30 | success: function(res) { 31 | if (res.confirm) { 32 | // TODO 接口 33 | } 34 | } 35 | }); 36 | }, 37 | 38 | // 提醒发货 39 | pushDelivery() { 40 | uni.showModal({ 41 | title: '提示', 42 | content: '是否对当前订单提醒发货?', 43 | confirmColor: this.appThemeColor, 44 | success: function(res) { 45 | if (res.confirm) { 46 | // TODO 接口 47 | } 48 | } 49 | }); 50 | }, 51 | 52 | // 查看物流 53 | goExpress() { 54 | uni.setStorageSync('orderInfo', this.data); 55 | uni.navigateTo({ 56 | url: '/pages-mall/pages/order/express' 57 | }) 58 | }, 59 | 60 | // 申请售后 61 | applyAfterSales() { 62 | uni.setStorageSync('orderInfo', this.data); 63 | uni.navigateTo({ 64 | url: '/pages-mall/pages/after-sales/apply' 65 | }) 66 | }, 67 | 68 | // 确认收货 69 | confirmReceipt() { 70 | uni.showModal({ 71 | title: '提示', 72 | content: '是否确认收货?', 73 | confirmColor: this.appThemeColor, 74 | success: function(res) { 75 | if (res.confirm) { 76 | // TODO 接口 77 | } 78 | } 79 | }); 80 | }, 81 | 82 | // 去评价 83 | goEvaluate() { 84 | uni.setStorageSync('orderInfo', this.data); 85 | uni.navigateTo({ 86 | url: '/pages-mall/pages/evaluate/add' 87 | }) 88 | }, 89 | 90 | // 删除记录 91 | deleteOrder() { 92 | uni.showModal({ 93 | title: '提示', 94 | content: '是否删除当前订单?', 95 | confirmColor: this.appThemeColor, 96 | success: function(res) { 97 | if (res.confirm) { 98 | // TODO 接口 99 | } 100 | } 101 | }); 102 | }, 103 | 104 | // 查看退款详情 105 | goBackMoney() { 106 | uni.setStorageSync('orderInfo', this.data); 107 | uni.navigateTo({ 108 | url: '/pages-mall/pages/after-sales/back' 109 | }) 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /uview-ui/components/u-collapse/u-collapse.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 96 | 97 | 100 | -------------------------------------------------------------------------------- /pages/community/components/post-card-simple.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 40 | 41 | 103 | -------------------------------------------------------------------------------- /pages-mall/components/order/submit-discounts.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 51 | 52 | 104 | -------------------------------------------------------------------------------- /components/select-reason.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 72 | 73 | 109 | -------------------------------------------------------------------------------- /pages-mall/pages/after-sales/apply.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 86 | 87 | 99 | --------------------------------------------------------------------------------