commit db948825b2e62edcedf1c97edfe399e4d160068d Author: luyisha Date: Fri Jun 9 09:41:02 2023 +0800 初始 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b163ca8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/unpackage diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100644 index 0000000..81f13f4 --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,16 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..21a949f --- /dev/null +++ b/App.vue @@ -0,0 +1,85 @@ + + + diff --git a/common/css/common.css b/common/css/common.css new file mode 100644 index 0000000..85f3c50 --- /dev/null +++ b/common/css/common.css @@ -0,0 +1,965 @@ +/* iconfont */ + +.container, +input { + font-family: PingFang-Medium, + PingFangSC-Regular, + Heiti, + Heiti SC, + DroidSans, + DroidSansFallback, + sans-serif !important; + -webkit-font-smoothing: antialiased; +} + +/* image { + will-change: transform +} */ + +button::after { + content: none !important; +} + +.price-font-family { + font-family: Number-Font !important; +} + +.tab-container { + padding-bottom: 96upx; +} + +.tab-padding-container { + padding-bottom: calc(96upx + 20px); +} + +.b-f { + background: #fff; +} + +.b-0 { + background: #000000; +} + +.b-e6 { + background-color: #f6f6f6; +} + +.tf-180 { + -moz-transform: rotate(-180deg); + -ms-transform: rotate(-180deg); + -o-transform: rotate(-180deg); + transform: rotate(-180deg); +} + +.tf-90 { + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + -o-transform: rotate(90deg); + transform: rotate(90deg); +} + +.dis-block { + display: block; +} + +.dis-il-block { + display: inline-block; +} + +.dis-flex { + display: flex !important; + /* flex-wrap: wrap; */ +} + +.flex-box { + flex: 1; + width: 0; +} + +.flex-shrink { + flex-shrink: 0; +} + +.flex-warp { + flex-wrap: wrap; +} + +.flex-dir-row { + flex-direction: row; +} + +.flex-dir-column { + flex-direction: column; +} + +.flex-x-center { + /* display: flex; */ + justify-content: center; +} + +.flex-x-between { + justify-content: space-between; +} + +.flex-x-around { + justify-content: space-around; +} + +.flex-x-end { + justify-content: flex-end; +} + +.flex-x-start { + justify-content: flex-start; +} + +.flex-y-center { + align-items: center; +} + +.flex-y-end { + align-items: flex-end; +} + +.flex-y-line { + align-items: baseline; +} + +.flex-five { + box-sizing: border-box; + flex: 0 0 50%; +} + +.flex-three { + float: left; + width: 33.3%; +} + +.flex-four { + box-sizing: border-box; + flex: 0 0 25%; +} + +.t-l { + text-align: left; +} + +.t-c { + text-align: center; +} + +.t-r { + text-align: right; +} + +.p-a { + position: absolute; +} + +.p-r { + position: relative; +} + +.fl { + float: left; +} + +.fr { + float: right; +} + +.clear::after { + clear: both; + content: " "; + display: table; +} + +.oh { + overflow: hidden; +} + +.tb-lr-center { + display: -webkit-box; + display: -ms-flexbox; + display: flex !important; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.f-58 { + font-size: 58upx; +} + +.f-50 { + font-size: 50upx; +} + +.f-48 { + font-size: 48upx; +} + +.f-44 { + font-size: 44upx; +} + +.f-42 { + font-size: 42upx; +} + +.f-40 { + font-size: 40upx; +} + +.f-38 { + font-size: 38upx; +} + +.f-36 { + font-size: 36upx; +} + +.f-34 { + font-size: 34upx; +} + +.f-32 { + font-size: 32upx; +} + +.f-31 { + font-size: 31upx; +} + +.f-30 { + font-size: 30upx; +} + +.f-29 { + font-size: 29upx; +} + +.f-28 { + font-size: 28upx; +} + +.f-26 { + font-size: 26upx; +} + +.f-25 { + font-size: 25upx; +} + +.f-24 { + font-size: 24upx; +} + +.f-22 { + font-size: 22upx; +} + +.f-20 { + font-size: 20upx; +} + +.f-w { + font-weight: 700; +} + +.f-n { + font-weight: 400; +} + +.col-f { + color: #fff; +} + +.col-c { + color: #CCCCCC; +} + +.col-a { + color: #AAAAAA; +} + +.col-0 { + color: #000; +} + +.col-3 { + color: #333; +} + +.col-6 { + color: #666; +} + +.col-7 { + color: #777; +} + +.col-8 { + color: #888; +} + +.col-9 { + color: #999; +} + +.col-98 { + color: #989898 +} + +.col-f4 { + color: #FF4444; +} + +.color-f02 { + color: #F02E24; +} + +.col-gr { + color: rgb(146, 208, 80); +} + +.col-917952 { + color: #917952; +} + +.col-m { + color: #FE504F !important; +} + +.col-s { + color: #FFD940 !important; +} + +.col-green { + color: #0ed339 !important; +} + +.cont-box { + padding: 30upx; +} + +.cont-bot { + margin-bottom: 120upx; +} + +.padding-box { + padding: 0 30upx; + box-sizing: border-box; +} + +.padding-box-all { + padding: 30upx; + box-sizing: border-box; +} + +.padding-box36 { + padding: 0 36upx; + box-sizing: border-box; +} + +.padding-all-box36 { + padding: 36upx; + box-sizing: border-box; +} + +.p-top-10 { + padding-top: 10upx; +} + +.p-top-20 { + padding-top: 20upx; +} + +.p-top-50 { + padding-top: 50upx; +} + +.p-btm-50 { + padding-bottom: 50upx; +} + +.p-top-bom-10 { + padding: 10upx 0; +} + +.p-top-bom-20 { + padding: 20upx 0; +} + +.p-top-bom-30 { + padding: 30upx 0; +} + +.p-top-bom-40 { + padding: 40upx 0; +} + +.p-top-bom-50 { + padding: 50upx 0; +} + +.pl-12 { + padding-left: 12px; +} + +.pr-12 { + padding-right: 12px; +} + +.p-b-20 { + padding-bottom: 20upx; +} + +.pr-6 { + padding-right: 6px; +} + +.m-top4 { + margin-top: 4upx; +} + +.m-top10 { + margin-top: 10upx; +} + +.m-top16 { + margin-top: 16upx; +} + +.m-top20 { + margin-top: 20upx; +} + +.m-top30 { + margin-top: 30upx; +} + +.m-top40 { + margin-top: 40upx; +} + +.m-btm36 { + margin-bottom: 36upx; +} + +.m-btm10 { + margin-bottom: 10upx; +} + +.m-btm20 { + margin-bottom: 20upx; +} + +.m-btm15 { + margin-bottom: 15upx; +} + +.m-btm20 { + margin-bottom: 20upx; +} + +.m-btm30 { + margin-bottom: 30upx; +} + +.m-btm40 { + margin-bottom: 40upx; +} + +.m-btm50 { + margin-bottom: 50upx; +} + +.m-btm60 { + margin-bottom: 60upx; +} + +.m-btm80 { + margin-bottom: 80upx; +} + +.m-btm90 { + margin-bottom: 90upx; +} + +.m-btm100 { + margin-bottom: 100upx; +} + +.m-left10 { + margin-left: 10upx; +} + +.m-left12 { + margin-left: 12upx; +} + +.m-left30 { + margin-left: 30upx; +} + +.m-right10 { + margin-right: 10upx; +} + +.m-right12 { + margin-right: 12upx; +} + +.m-right20 { + margin-right: 20upx; +} + +.m-right30 { + margin-right: 30upx; +} + +.m-right40 { + margin-right: 40upx; +} + +.m-right50 { + margin-right: 50upx; +} + +.m-right70 { + margin-right: 70upx; +} + +.m-top-btm50 { + margin: 50upx 0; +} + +.m-top-btm40 { + margin: 40upx 0; +} + +.m-top-btm30 { + margin: 30upx 0; +} + +.m-top-btm20 { + margin: 20upx 0; +} + +.m-top-btm10 { + margin: 10upx 0; +} + +.m-top-btm6 { + margin: 6upx 0; +} + +.p-top-40 { + padding-top: 40upx; +} + +.p-bottom { + padding-bottom: 112upx; +} + +.p-right-30 { + padding-right: 30upx; +} + +.p-left-right-20 { + padding: 0 20upx; +} + +.p-left-right-28 { + padding: 0 28upx; +} + +.p-left-right-30 { + padding: 0 30upx; +} + +.p-left-right-40 { + padding: 0 40upx; +} + +.m-left-right-6 { + margin: 0 6upx; +} + +.m-left-right-10 { + margin: 0 10upx; +} + +.m-left-right-20 { + margin: 0 20upx; +} + +.m-left-right-30 { + margin: 0 30upx; +} + +.m-left-right-40 { + margin: 0 40upx; +} + +.onelist-hidden { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.twolist-hidden { + display: -webkit-box; + word-break: break-all; + text-overflow: ellipsis; + overflow: hidden; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.b-r { + border-right: 1upx solid #eee; + +} + +.b-b { + border-bottom: 1upx solid #eee; +} + +.b-t { + border-top: 1upx solid #eee; +} + +.ts-1 { + -moz-transition: all 0.1s; + -o-transition: all 0.1s; + transition: all 0.1s; +} + +.ts-2 { + -moz-transition: all 0.2s; + -o-transition: all 0.2s; + transition: all 0.2s; +} + +.ts-3 { + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + transition: all 0.3s; +} + +.ts-5 { + -moz-transition: all 0.5s; + -o-transition: all 0.5s; + transition: all 0.5s; +} + +/* 字体颜色 */ + +.c-ff4444 { + color: #FF4444; +} + +/* 无样式button (用于伪submit) */ + +.btn-normal { + display: block; + margin: 0; + padding: 0; + line-height: normal; + background: none; + border-radius: 0; + box-shadow: none; + border: none; + font-size: unset; + text-align: unset; + overflow: visible; +} + +.btn-normal:after { + border: none; +} + +.btn-normal.button-hover { + color: inherit; +} + +/* 模板消息按钮 */ +.report-btn { + position: absolute !important; + top: 0; + left: 0; + right: 0; + bottom: 0; + opacity: 0; +} + + +/* 内容标题直 */ +.module-title { + color: #333333; + font-size: 30upx; + text-align: center; + height: 86upx; + line-height: 86upx; + font-weight: bold; + position: relative; + background: #FFFFFF; +} + +.module-title::after { + content: " "; + position: absolute; + left: 50%; + bottom: 0; + transform: translateX(-50%); + width: 40upx; + height: 8upx; + background: #FFD940; + border-radius: 20upx; +} + +/* 内容标题直弯 */ +.module-title-w { + color: #333333; + font-size: 30upx; + text-align: center; + height: 86upx; + line-height: 86upx; + font-weight: bold; + position: relative; + background: #FFFFFF; +} + +.module-content { + padding: 30upx; + background: #FFFFFF; +} + +.bor-radius-10 { + border-radius: 6upx; +} + +.bor-radius-10upx { + border-radius: 10upx; +} + +/* loading动画 */ +.ball-clip-rotate-pulse { + position: absolute; + top: 36%; + left: 50%; + transform: scale(1) translateY(-15px); +} + +.ball-clip-rotate-pulse::after { + content: "努力加载中..."; + position: absolute; + top: 50%; + bottom: 0; + transform: translate(-50%, 3em); + font-size: 26upx; + line-height: 2em; + text-align: center; + width: 10em; + letter-spacing: 2upx; + color: #666666; +} + +.ball-clip-rotate-pulse>view { + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + position: absolute; + top: 0px; + left: 0px; + border-radius: 100%; +} + +.ball-clip-rotate-pulse>view:first-child { + background: #FFD940; + height: 16px; + width: 16px; + top: 7px; + left: -7px; + -webkit-animation: scale 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; + animation: scale 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; +} + +.ball-clip-rotate-pulse>view:last-child { + position: absolute; + border: 2px solid #FFF; + width: 30px; + height: 30px; + left: -16px; + top: -2px; + background: transparent; + border: 2px solid; + border-color: #ffe26e transparent #ffe26e transparent; + -webkit-animation: rotate 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; + animation: rotate 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; + -webkit-animation-duration: 1s; + animation-duration: 1s; +} + +@keyframes rotate { + 0% { + -webkit-transform: rotate(0deg) scale(1); + transform: rotate(0deg) scale(1); + } + + 50% { + -webkit-transform: rotate(180deg) scale(0.6); + transform: rotate(180deg) scale(0.6); + } + + 100% { + -webkit-transform: rotate(360deg) scale(1); + transform: rotate(360deg) scale(1); + } +} + +@keyframes scale { + 30% { + -webkit-transform: scale(0.3); + transform: scale(0.3); + } + + 100% { + -webkit-transform: scale(1); + transform: scale(1); + } +} + +.diy-loading { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +.loading-image { + width: 60upx; + height: 60upx; + display: block; + margin: 0 auto; +} + +.loading-text { + font-size: 26upx; + line-height: 2em; + text-align: center; + width: 10em; + letter-spacing: 2upx; + color: #666666; +} + +/* 0.5px边框 */ +.border-line, +.border-vertical { + position: relative; +} + +.border-line::after { + content: " "; + position: absolute; + border-top: 1px solid #EEEEEE; + transform-origin: 0 0; + transform: scaleY(0.5); + z-index: 2; +} + +.border-vertical::after { + content: " "; + position: absolute; + border-left: 1px solid #F7F7F7; + transform-origin: 0 0; + transform: scaleX(0.5); + z-index: 2; +} + +.border-vertical.border-left::after { + top: 0; + left: 0; + bottom: 0; +} + +.border-line.border-top::after { + left: 0; + top: 0; + right: 0; +} + +.border-line.border-bottom::after { + left: 0; + bottom: 0; + right: 0; +} + +.diy-nav-list .border-bottom::after { + left: 30upx; +} + +.diy-nav-list .border-bottom.item-icon::after { + left: 100upx; +} + +.diy-nav-list .border-bottom:last-child::after { + content: none; +} + +.uni-picker-container { + z-index: 1003; +} + +.uni-picker-container .uni-picker { + z-index: 1003; +} + +.audio-main { + position: fixed; + right: 50upx; + top: 10%; + z-index: 10; +} + +.audio-bg { + position: relative; +} + +.audio-bg .audio-gif { + width: 100upx; + height: 100upx; + background-size: 100upx 100upx; + background-repeat: no-repeat; +} + +.audio-bg .audio-gif .audio-png { + position: absolute; + background-size: 80upx 80upx; + animation: rotate2d 1.2s linear infinite; + z-index: -1; + width: 80upx; + height: 80upx; +} + +.audio-bg.stop-audio .audio-gif { + background: none !important; +} + +.audio-bg.stop-audio .audio-png { + animation: none; +} + +@keyframes rotate2d { + from { + transform: rotate(0) + } + + to { + transform: rotate(360deg) + } +} diff --git a/common/css/diyPages.css b/common/css/diyPages.css new file mode 100644 index 0000000..0f64a15 --- /dev/null +++ b/common/css/diyPages.css @@ -0,0 +1,696 @@ +/* 团购样式5 */ +.groupon_goods5-pading{ + padding: 20upx 30upx 0; +} +.groupon_goods5-list { + flex-wrap: nowrap; +} + +.groupon_goods5-list-item .groupon_goods5-image { + width: 250upx; + height: 250upx; + background-repeat: no-repeat; + background-position: center; + background-size: 250upx 250upx; +} +.groupon_goods5-title{ + height: 2.6em; + line-height: 1.3em; +} +.groupon_goods5-price .now-price { + color: #f64031; +} + +.groupon_goods5-price .old-price { + color: #CCCCCC; + text-decoration: line-through; +} + + +/* 通用商品 */ +.public_goods_goods-price .now-price { + color: #f64031; +} + +.public_goods_goods-price .old-price { + color: #CCCCCC; + text-decoration: line-through; + margin-left: 30upx; +} + + +/* 商家信息2 */ +.store-two-main .store-two-left { + width: 170upx; + height: 170upx; + background-position: center; + background-size: 170upx 170upx; + background-repeat: no-repeat; + flex-shrink: 0; +} + +.store-two-main .store-two-right { + width: 100%; +} + +.store-two-right .store-two-title { + height: 2.6em; + line-height: 1.3em; + width: 400upx; +} + +.store-two-score .icon-shoucangxiao { + font-size: 28upx; + color: rgb(255, 153, 0); +} + +.store-two-score .icon-shoucangxiao>text { + margin-left: 10upx; + color: red; +} + +.store-time-tag{ + padding: 3upx 10upx; + background-color: rgba(0,0,0,0.3); + color: #FFFFFF; + position: absolute; + left: 20upx; + bottom: 20upx; + font-size: 24upx; + border-radius: 6upx; +} + + + + +/* 抢购6 */ +.diy-goods3-item .goods3-item-image { + width: 100%; + height: 400upx; + background-repeat: no-repeat; + background-position: center; + background-size: 100% 400upx; + border-radius: 10upx 10upx 0 0; +} + +.goods3-item-image .goods-image-gift { + position: absolute; + left: 0; + top: 40upx; + background-color: #27ce00; + border-radius: 0 8upx 8upx 0; + padding: 6upx 10upx; +} + +.goods3-price .goods3-nowPrice { + color: red; +} + +.goods3-price .goods3-oldPrice { + text-decoration: line-through; + color: #8c8b8b; +} + +.goods-all-vip .goods-all-vip-label { + color: #DDCDA0; + padding: 0 2upx 0 2upx; + background-color: #363636; + border-radius: 6upx; +} + +.goods-all-vip .goods-all-vip-price { + color: #363636; +} + +/* 招聘统计 */ + +.invite-statistics{ + padding: 10upx 30upx; +} + +.invite-statistics-item{ + /* padding: 30upx; */ + border-radius: 20upx; + /* border: 1upx; */ + width: 25%; + border: 1upx solid #EEEEEE; + margin-right: 20upx; +} + +.statistics-item-num{ + font-size: 36upx; + padding: 30upx 30upx 0; + font-family: DINPro; + font-weight: bold; + color: #333333; +} + +.statistics-item-class{ + padding: 0 0upx; + font-size: 24upx; + height: 40upx; + font-family: PingFang SC; + font-weight: 500; + color: #BBBBBB; + text-align: center; +} + +.statistics-item-img{ + height: 90upx; + position: relative; + border-radius: 0 0 20upx 0upx; +} + +.statistics-item-image{ + width: 60upx; + height: 60upx; + position: absolute; + right: 0upx; + bottom: 1upx; + border-radius: 0 0 20upx 0upx; +} + +.enterprise-img{ + width: 120upx; + height: 120upx; + border-radius: 10upx; +} + +.enterprise-name{ + font-size: 32upx; + font-family: PingFang SC; + font-weight: bold; + color: #333333; +} + +.enterprise-nature{ + font-size: 24upx; + font-family: PingFang SC; + color: #999999; + padding: 6upx 0; +} +.enterprise-content{ + padding-left: 20upx; +} + +.enterprise-item{ + padding: 30upx 0; + border-bottom: 1upx solid #EEEEEE; +} +.enterprise-item:last-child{ + border: none; +} + +.enterprise2-title{ + font-size: 32upx; + font-family: PingFang SC; + font-weight: bold; + color: #333333; + flex: 0.5; +} +.enterprise2-more{ + text-align: right; + font-size: 32upx; + font-family: PingFang SC; + font-weight: bold; + color: #999999; + flex: 0.5; +} + +.enterprise2-item{ + width: 240upx; + height: 340upx; + background-color: #B4B5C7; + border-radius: 15upx; + margin-right: 30upx; +} + +.enterprise2-item-img{ + width: 240upx; + height: 200upx; + border-radius: 15upx 15upx 0 0upx; +} +.enterprise2-item-name{ + font-size: 32upx; + font-family: PingFang SC; + font-weight: 500; + color: #FFFFFF; + padding: 20upx 20upx; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; +} + +.enterprise2-item-invite{ + font-size: 26upx; + font-family: PingFang SC; + font-weight: 500; + color: #FFFFFF; + /* padding-bottom: 20upx; */ + padding: 0 20upx 20upx; +} +.enterprise2-box{ + overflow-y: scroll; + padding: 30upx 0 10upx; + display: flex; + +} +.recruit_enterprise2-box{ + /* overflow: auto; */ + overflow: hidden; +} +.recruit_recruit-name{ + font-size: 32upx; + font-family: PingFang SC; + font-weight: bold; + color: #333333; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + flex: 0.5; +} + +.recruit_recruit-top{ + padding: 1upx 6upx; + background-color: #FF4444; + color: #FFFFFF; + font-size: 24upx; + font-weight: 500; + border-radius: 4upx; + margin-left: 20upx; +} + +.recruit_recruit-salary{ + font-size: 32upx; + font-family: DINPro; + font-weight: 500; + color: #FF4444; + flex: 0.5; + text-align: right; +} +.recruit_recruit-tags{ + flex: 0.75; + height: 50upx; + overflow: hidden; +} +.recruit_recruit-tags-item{ + padding: 5upx 20upx; + border-radius: 4upx; + font-size: 24upx; + font-family: PingFang SC; + font-weight: 400; + color: #666666; + margin-right: 20upx; +} +.recruit_recruit-region{ + font-size: 28upx; + font-family: DINPro; + font-weight: 500; + line-height: 50upx; + text-align: right; + color: #999999; + flex: 0.25; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; +} +.recruit_recruit-imgbox{ + flex: 0.2; +} +.recruit_recruit-img{ + width: 120upx; + height: 120upx; + border-radius: 10upx; + border: 1upx solid #FFFFFF; +} +.recruit_recruit-left{ + flex: 0.8; + padding-left: 20upx; +} +.recruit-left-nature{ + font-size: 26upx; + color: #999999; + vertical-align: bottom; + padding-top: 20upx; +} +.recruit_recruit-right{ + /* flex: 0.3; */ +} +.recruit-left-name{ + font-size: 28upx; + vertical-align: bottom; + margin-bottom: 30upx; + /* line-height: 60upx; */ +} +.recruit-left-region{ + font-size: 28upx; + font-family: DINPro; + font-weight: 500; + line-height: 50upx; + text-align: right; + color: #999999; + flex: 0.3; + width: 200upx; + overflow: hidden;/*超出部分隐藏*/ + white-space: nowrap;/*不换行*/ + text-overflow:ellipsis;/*超出部分文字以...显示*/ +} +.recruit_recruit{ + border-bottom: 1upx solid #EEEEEE; +} +.recruit_recruit:last-child{ + border: none; +} +.recruit_resume-imgbox{ + flex: 0.3; +} +.recruit_resume-content{ + flex: 0.7; +} +.recruit_resume-img{ + width: 150upx; + height: 150upx; + border-radius: 50%; +} +.recruit_resume-title{ + font-size: 32upx; + font-family: PingFang SC; + font-weight: bold; + color: #333333; + flex: 0.5; +} +.recruit_resume-salary{ + flex: 0.5; + font-size: 32upx; + font-family: PingFang SC; + font-weight: bold; + color: #ff4444; + text-align: right; +} +.recruit_resume-data{ + font-size: 26upx; + font-family: PingFang SC; + font-weight: 500; + color: #999999; + padding: 15upx 0; +} +.recruit_resume-tags{ + flex: 0.8; + height: 50upx; + overflow: hidden; +} +.recruit_resume-site{ + flex: 0.2; + font-size: 26upx; + color: #999999; + text-align: right; + line-height: 52upx; +} +.recruit_resume-tagitem{ + padding: 5upx 10upx; + font-size: 26upx; + background-color: #007AFF; + border-radius: 4upx; + margin-right: 10upx; +} +.recruit_resume-item{ + margin-bottom: 50upx; +} + +/* 相亲 */ +.blind{ + /* padding: 30upx; */ + margin: 30upx; +} +.blind-item{ + padding: 30upx; + width: 335upx; + box-sizing: border-box; + height: 171upx; + background: #F8F8F8; + opacity: 1; + border-radius: 20upx; +} +.nav-content { + width: 690rpx; + margin: 0 auto 0; + display: flex; + flex-wrap: wrap; + justify-content:space-between; + +} +.nav-item { + width: 335rpx; + height: auto; + border-radius: 20rpx; + overflow: hidden; + background-color: #F8F8F8; + margin-bottom: 20rpx; +} + +/* 家政 */ +.housekeeping{ + padding: 30upx; + margin: 0 auto 0; + display: flex; + flex-wrap: wrap; + justify-content:space-between; +} + +.housekeeping:after { content: ""; + flex:0 0 45%; } + +.housekeeping-issue{ + height: 90upx; + line-height: 90upx; + color: #FFFFFF; + font-size: 28upx; + text-align: center; + /* margin-right: 20upx; */ + border-radius: 20upx; + margin-top: 50upx; +} + +.housekeeping-lose{ + width: 45%; +} + +.housekeeping3{ + padding: 30upx; + margin: 0 auto 0; + display: flex; + flex-wrap: wrap; + justify-content:space-between; +} + +.housekeeping3:after { content: ""; + flex:0 0 30%; } + +.housekeeping-issue3{ + flex:0 0 30%; + height: 90upx; + line-height: 90upx; + background-color: #A59AFF; + color: #FFFFFF; + font-size: 28upx; + text-align: center; + /* margin-right: 20upx; */ + border-radius: 20upx; + margin-bottom: 20upx; +} + +.housekeeping-lose3{ + width: 30%; +} + +.housekeeping-enter{ + width: 335upx; + height: 90upx; + line-height: 90upx; + background-color: #FDAD28; + color: #FFFFFF; + font-size: 28upx; + text-align: center; + /* margin-right: 20upx; */ + border-radius: 20upx; + margin-bottom: 20upx; +} + +.housekeeping-image{ + height: 30upx; + width: 30upx; + margin-right: 20upx; + margin-top: 30upx; + vertical-align: top; +} + +.referralWaiter{ + padding: 30upx; +} + +.referralWaiter-content{ + padding: 30upx 0; + overflow: auto; +} + +.referralWaiter-item{ + background-color: #F8F8F8; + margin-right: 20upx; + padding-bottom: 15upx; + border-radius: 20upx; + display: inline-block; + max-width: 330upx; + position: relative; +} + +.referral-tag{ + background-color: rgba(239,155,155,0.6); + color: #FFFFFF; + height: 36upx; + padding: 0 10upx; + font-size: 20upx; + display: inline-block; + line-height: 36upx; + border-radius: 10upx; + position: absolute; + left: 20upx; + top: 20upx; + z-index: 99; +} + +.refText{ + font-size: 20upx; + color: #ff4444; + font-weight:700; + padding-right: 20upx; + display: inline-block; + width: 200upx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.referralWaiter-item-img{ + width: 330upx; + height: 186upx; + border-radius: 20upx 20upx 0 0; +} + +.homemaking-tags{ + padding: 22upx 20upx; + height: 36upx; + line-height: 38upx; + overflow: hidden; + +} + +.homemaking-btn{ + height: 40upx; + font-size: 20upx; + padding: 0 20upx; + line-height: 40upx; + background: linear-gradient(180deg, #72AAFD 0%, #6094FD 100%); + display: inline-block; + color: #FFFFFF; + border-radius: 10upx; + margin-right: 20upx; +} + +.homemaking-tags-item{ + /* width: 100upx; */ + height: 32upx; + line-height: 32upx; + font-size: 20upx; + text-align: center; + background-color: #EEEEEE; + color: #999999; + padding: 0 10upx; + border-radius: 6upx; + display: inline-block; + margin-right: 10upx; + margin-bottom: 10upx; +} + +.homemaking-name{ + width: 300upx; + margin-left: 20upx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.homemakingList-boex{ + padding: 20upx 30upx; + background-color: #F8F8F8; +} + +.enter-box{ + position: relative; + width: 690upx; + padding: 30upx; + padding-bottom: 170upx; + background-color: #FFFFFF; + border-radius: 30upx 30upx 0 0; +} + +.enter-img{ + width: 50upx; + height: 50upx; + position: absolute; + right: 30upx; + top: 30upx; +} + +.IndividualsIn{ + margin-top: 60upx; + padding: 35upx 40upx; + border-radius: 20upx; + background: #72AAFD; + display: flex; +} + +.IndividualsInImg{ + width: 110upx; + height: 110upx; +} + +.IndividualsInright{ + height: 28upx; + width: 56upx; + line-height: 110upx; +} + +.vcssopen{ + /* width:580upx; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; */ +} + +.linkRed{ + width: 600upx; + height: 752upx; + position: relative; + border-radius: 30upx; +} +.redmt{ + margin-top: 100upx; +} +.redmtf{ + margin-top: 40upx; +} +.bnnerBox{ + position: absolute; + left: 50%; + bottom: 10upx; + /* width: 100upx; */ + transform: translateX(-50%); +} +.bnnerItem{ + width: 15upx; + height: 15upx; + border-radius: 60upx; + background-color: #ffffff; + display: inline-block; + margin-right: 10upx; +} \ No newline at end of file diff --git a/common/css/iconfont.css b/common/css/iconfont.css new file mode 100644 index 0000000..98bb4de --- /dev/null +++ b/common/css/iconfont.css @@ -0,0 +1,3082 @@ +@font-face { + font-family: "iconfont"; + src: url('https://at.alicdn.com/t/font_453360_ifl5gbn650g.ttf?t=1575942588038') format('truetype'); /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ + +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-appreciate:before { + content: "\e644"; +} + +.icon-check:before { + content: "\e645"; +} + +.icon-close:before { + content: "\e646"; +} + +.icon-edit:before { + content: "\e649"; +} + +.icon-emoji:before { + content: "\e64a"; +} + +.icon-favorfill:before { + content: "\e64b"; +} + +.icon-favor:before { + content: "\e64c"; +} + +.icon-loading:before { + content: "\e64f"; +} + +.icon-locationfill:before { + content: "\e650"; +} + +.icon-location:before { + content: "\e651"; +} + +.icon-phone:before { + content: "\e652"; +} + +.icon-roundcheckfill:before { + content: "\e656"; +} + +.icon-roundcheck:before { + content: "\e657"; +} + +.icon-roundclosefill:before { + content: "\e658"; +} + +.icon-roundclose:before { + content: "\e659"; +} + +.icon-roundrightfill:before { + content: "\e65a"; +} + +.icon-roundright:before { + content: "\e65b"; +} + +.icon-search:before { + content: "\e65c"; +} + +.icon-taxi:before { + content: "\e65d"; +} + +.icon-timefill:before { + content: "\e65e"; +} + +.icon-time:before { + content: "\e65f"; +} + +.icon-unfold:before { + content: "\e661"; +} + +.icon-warnfill:before { + content: "\e662"; +} + +.icon-warn:before { + content: "\e663"; +} + +.icon-camerafill:before { + content: "\e664"; +} + +.icon-camera:before { + content: "\e665"; +} + +.icon-commentfill:before { + content: "\e666"; +} + +.icon-comment:before { + content: "\e667"; +} + +.icon-likefill:before { + content: "\e668"; +} + +.icon-like:before { + content: "\e669"; +} + +.icon-notificationfill:before { + content: "\e66a"; +} + +.icon-notification:before { + content: "\e66b"; +} + +.icon-order:before { + content: "\e66c"; +} + +.icon-samefill:before { + content: "\e66d"; +} + +.icon-same:before { + content: "\e66e"; +} + +.icon-deliver:before { + content: "\e671"; +} + +.icon-evaluate:before { + content: "\e672"; +} + +.icon-pay:before { + content: "\e673"; +} + +.icon-send:before { + content: "\e675"; +} + +.icon-shop:before { + content: "\e676"; +} + +.icon-ticket:before { + content: "\e677"; +} + +.icon-wang:before { + content: "\e678"; +} + +.icon-back:before { + content: "\e679"; +} + +.icon-cascades:before { + content: "\e67c"; +} + +.icon-discover:before { + content: "\e67e"; +} + +.icon-list:before { + content: "\e682"; +} + +.icon-more:before { + content: "\e684"; +} + +.icon-scan:before { + content: "\e689"; +} + +.icon-settings:before { + content: "\e68a"; +} + +.icon-questionfill:before { + content: "\e690"; +} + +.icon-question:before { + content: "\e691"; +} + +.icon-shopfill:before { + content: "\e697"; +} + +.icon-form:before { + content: "\e699"; +} + +.icon-wangfill:before { + content: "\e69a"; +} + +.icon-pic:before { + content: "\e69b"; +} + +.icon-filter:before { + content: "\e69c"; +} + +.icon-footprint:before { + content: "\e69d"; +} + +.icon-top:before { + content: "\e69e"; +} + +.icon-pulldown:before { + content: "\e69f"; +} + +.icon-pullup:before { + content: "\e6a0"; +} + +.icon-right:before { + content: "\e6a3"; +} + +.icon-refresh:before { + content: "\e6a4"; +} + +.icon-moreandroid:before { + content: "\e6a5"; +} + +.icon-deletefill:before { + content: "\e6a6"; +} + +.icon-refund:before { + content: "\e6ac"; +} + +.icon-cart:before { + content: "\e6af"; +} + +.icon-qrcode:before { + content: "\e6b0"; +} + +.icon-remind:before { + content: "\e6b2"; +} + +.icon-delete:before { + content: "\e6b4"; +} + +.icon-profile:before { + content: "\e6b7"; +} + +.icon-home:before { + content: "\e6b8"; +} + +.icon-cartfill:before { + content: "\e6b9"; +} + +.icon-discoverfill:before { + content: "\e6ba"; +} + +.icon-homefill:before { + content: "\e6bb"; +} + +.icon-message:before { + content: "\e6bc"; +} + +.icon-addressbook:before { + content: "\e6bd"; +} + +.icon-link:before { + content: "\e6bf"; +} + +.icon-lock:before { + content: "\e6c0"; +} + +.icon-unlock:before { + content: "\e6c2"; +} + +.icon-vip:before { + content: "\e6c3"; +} + +.icon-weibo:before { + content: "\e6c4"; +} + +.icon-activity:before { + content: "\e6c5"; +} + +.icon-big:before { + content: "\e6c7"; +} + +.icon-friendaddfill:before { + content: "\e6c9"; +} + +.icon-friendadd:before { + content: "\e6ca"; +} + +.icon-friendfamous:before { + content: "\e6cb"; +} + +.icon-friend:before { + content: "\e6cc"; +} + +.icon-goods:before { + content: "\e6cd"; +} + +.icon-selection:before { + content: "\e6ce"; +} + +.icon-tmall:before { + content: "\e6cf"; +} + +.icon-explore:before { + content: "\e6d2"; +} + +.icon-present:before { + content: "\e6d3"; +} + +.icon-squarecheckfill:before { + content: "\e6d4"; +} + +.icon-square:before { + content: "\e6d5"; +} + +.icon-squarecheck:before { + content: "\e6d6"; +} + +.icon-round:before { + content: "\e6d7"; +} + +.icon-roundaddfill:before { + content: "\e6d8"; +} + +.icon-roundadd:before { + content: "\e6d9"; +} + +.icon-add:before { + content: "\e6da"; +} + +.icon-notificationforbidfill:before { + content: "\e6db"; +} + +.icon-explorefill:before { + content: "\e6dd"; +} + +.icon-fold:before { + content: "\e6de"; +} + +.icon-game:before { + content: "\e6df"; +} + +.icon-redpacket:before { + content: "\e6e0"; +} + +.icon-selectionfill:before { + content: "\e6e1"; +} + +.icon-similar:before { + content: "\e6e2"; +} + +.icon-appreciatefill:before { + content: "\e6e3"; +} + +.icon-infofill:before { + content: "\e6e4"; +} + +.icon-info:before { + content: "\e6e5"; +} + +.icon-tao:before { + content: "\e6e8"; +} + +.icon-mobiletao:before { + content: "\e6e9"; +} + +.icon-forwardfill:before { + content: "\e6ea"; +} + +.icon-forward:before { + content: "\e6eb"; +} + +.icon-rechargefill:before { + content: "\e6ec"; +} + +.icon-recharge:before { + content: "\e6ed"; +} + +.icon-vipcard:before { + content: "\e6ee"; +} + +.icon-voice:before { + content: "\e6ef"; +} + +.icon-voicefill:before { + content: "\e6f0"; +} + +.icon-friendfavor:before { + content: "\e6f1"; +} + +.icon-wifi:before { + content: "\e6f2"; +} + +.icon-share:before { + content: "\e6f3"; +} + +.icon-wefill:before { + content: "\e6f4"; +} + +.icon-we:before { + content: "\e6f5"; +} + +.icon-lightauto:before { + content: "\e6f6"; +} + +.icon-lightforbid:before { + content: "\e6f7"; +} + +.icon-lightfill:before { + content: "\e6f8"; +} + +.icon-camerarotate:before { + content: "\e6f9"; +} + +.icon-light:before { + content: "\e6fa"; +} + +.icon-barcode:before { + content: "\e6fb"; +} + +.icon-flashlightclose:before { + content: "\e6fc"; +} + +.icon-flashlightopen:before { + content: "\e6fd"; +} + +.icon-searchlist:before { + content: "\e6fe"; +} + +.icon-service:before { + content: "\e6ff"; +} + +.icon-sort:before { + content: "\e700"; +} + +.icon-1212:before { + content: "\e702"; +} + +.icon-down:before { + content: "\e703"; +} + +.icon-mobile:before { + content: "\e704"; +} + +.icon-mobilefill:before { + content: "\e705"; +} + +.icon-copy:before { + content: "\e706"; +} + +.icon-countdownfill:before { + content: "\e707"; +} + +.icon-countdown:before { + content: "\e708"; +} + +.icon-noticefill:before { + content: "\e709"; +} + +.icon-notice:before { + content: "\e70a"; +} + +.icon-qiang:before { + content: "\e70b"; +} + +.icon-upstagefill:before { + content: "\e70e"; +} + +.icon-upstage:before { + content: "\e70f"; +} + +.icon-babyfill:before { + content: "\e710"; +} + +.icon-baby:before { + content: "\e711"; +} + +.icon-brandfill:before { + content: "\e712"; +} + +.icon-brand:before { + content: "\e713"; +} + +.icon-choicenessfill:before { + content: "\e714"; +} + +.icon-choiceness:before { + content: "\e715"; +} + +.icon-clothesfill:before { + content: "\e716"; +} + +.icon-clothes:before { + content: "\e717"; +} + +.icon-creativefill:before { + content: "\e718"; +} + +.icon-creative:before { + content: "\e719"; +} + +.icon-female:before { + content: "\e71a"; +} + +.icon-keyboard:before { + content: "\e71b"; +} + +.icon-male:before { + content: "\e71c"; +} + +.icon-newfill:before { + content: "\e71d"; +} + +.icon-new:before { + content: "\e71e"; +} + +.icon-pullleft:before { + content: "\e71f"; +} + +.icon-pullright:before { + content: "\e720"; +} + +.icon-rankfill:before { + content: "\e721"; +} + +.icon-rank:before { + content: "\e722"; +} + +.icon-bad:before { + content: "\e723"; +} + +.icon-cameraadd:before { + content: "\e724"; +} + +.icon-focus:before { + content: "\e725"; +} + +.icon-friendfill:before { + content: "\e726"; +} + +.icon-cameraaddfill:before { + content: "\e727"; +} + +.icon-rectangle390:before { + content: "\e600"; +} + +.icon-icon:before { + content: "\e602"; +} + +.icon-zhuanzhang:before { + content: "\e603"; +} + +.icon-xinyongqiahuankuan:before { + content: "\e604"; +} + +.icon-dangmianfu:before { + content: "\e605"; +} + +.icon-shuidianmei:before { + content: "\e606"; +} + +.icon-shoujichongzhi:before { + content: "\e607"; +} + +.icon-qinmifu:before { + content: "\e608"; +} + +.icon-gupiao:before { + content: "\e609"; +} + +.icon-youxichongzhi:before { + content: "\e60a"; +} + +.icon-shoukuan:before { + content: "\e60b"; +} + +.icon-jipiao:before { + content: "\e60c"; +} + +.icon-huilvhuansuan:before { + content: "\e60d"; +} + +.icon-taobao:before { + content: "\e60e"; +} + +.icon-jizhang:before { + content: "\e60f"; +} + +.icon-lvyoutehui:before { + content: "\e610"; +} + +.icon-caipiao:before { + content: "\e611"; +} + +.icon-aa:before { + content: "\e612"; +} + +.icon-kuaidi:before { + content: "\e613"; +} + +.icon-guojihuikuan:before { + content: "\e614"; +} + +.icon-aixinjuanzeng:before { + content: "\e615"; +} + +.icon-diandian:before { + content: "\e616"; +} + +.icon-huafeiqiazhuanrang:before { + content: "\e617"; +} + +.icon-aliyouxi:before { + content: "\e618"; +} + +.icon-shoujibaoling:before { + content: "\e619"; +} + +.icon-tianmaobao:before { + content: "\e61a"; +} + +.icon-qianbaopengyou:before { + content: "\e61b"; +} + +.icon-dache:before { + content: "\e61c"; +} + +.icon-kuaiqiang:before { + content: "\e61d"; +} + +.icon-suishendai:before { + content: "\e61f"; +} + +.icon-xiaoyuanyiqiatong:before { + content: "\e620"; +} + +.icon-zhaocaibao:before { + content: "\e621"; +} + +.icon-yulebao:before { + content: "\e622"; +} + +.icon-wodebaozhang:before { + content: "\e623"; +} + +.icon-huiyuantequan:before { + content: "\e624"; +} + +.icon-chenggong:before { + content: "\e625"; +} + +.icon-shibai:before { + content: "\e626"; +} + +.icon-jingshi:before { + content: "\e627"; +} + +.icon-tishi:before { + content: "\e628"; +} + +.icon-bangzhu:before { + content: "\e629"; +} + +.icon-dengdai:before { + content: "\e62a"; +} + +.icon-xiangji:before { + content: "\e62b"; +} + +.icon-shoujitongxunlu:before { + content: "\e62c"; +} + +.icon-shezhi:before { + content: "\e62d"; +} + +.icon-wode:before { + content: "\e62e"; +} + +.icon-sousuo:before { + content: "\e62f"; +} + +.icon-liebiao:before { + content: "\e630"; +} + +.icon-bianji:before { + content: "\e631"; +} + +.icon-shanchu:before { + content: "\e632"; +} + +.icon-fenxiang:before { + content: "\e633"; +} + +.icon-ditu:before { + content: "\e634"; +} + +.icon-tianjia:before { + content: "\e635"; +} + +.icon-bangzhuxiantiao:before { + content: "\e636"; +} + +.icon-gengduo:before { + content: "\e637"; +} + +.icon-saoyisao:before { + content: "\e638"; +} + +.icon-fukuanma:before { + content: "\e639"; +} + +.icon-chengshifuwu:before { + content: "\e63a"; +} + +.icon-jiaoyujiaofei:before { + content: "\e63b"; +} + +.icon-yangchengtongchongzhi:before { + content: "\e63c"; +} + +.icon-chengshiyiqiatong:before { + content: "\e63d"; +} + +.icon-yiban:before { + content: "\e63e"; +} + +.icon-canyin:before { + content: "\e63f"; +} + +.icon-gouwu:before { + content: "\e640"; +} + +.icon-fushi:before { + content: "\e641"; +} + +.icon-jiaotong:before { + content: "\e642"; +} + +.icon-yule:before { + content: "\e643"; +} + +.icon-shejiao:before { + content: "\e647"; +} + +.icon-jujia:before { + content: "\e648"; +} + +.icon-tongxun:before { + content: "\e64d"; +} + +.icon-lingshi:before { + content: "\e64e"; +} + +.icon-meirong:before { + content: "\e653"; +} + +.icon-yundong:before { + content: "\e654"; +} + +.icon-lvxing:before { + content: "\e655"; +} + +.icon-shuma:before { + content: "\e660"; +} + +.icon-xuexi:before { + content: "\e66f"; +} + +.icon-yiliao:before { + content: "\e670"; +} + +.icon-shuji:before { + content: "\e674"; +} + +.icon-chongwu:before { + content: "\e67a"; +} + +.icon-caipiao1:before { + content: "\e67b"; +} + +.icon-qiche:before { + content: "\e67d"; +} + +.icon-bangong:before { + content: "\e67f"; +} + +.icon-zhufang:before { + content: "\e680"; +} + +.icon-weixiu:before { + content: "\e681"; +} + +.icon-haizi:before { + content: "\e683"; +} + +.icon-changbei:before { + content: "\e685"; +} + +.icon-liwu:before { + content: "\e686"; +} + +.icon-lijin:before { + content: "\e687"; +} + +.icon-huankuan:before { + content: "\e688"; +} + +.icon-juanzeng:before { + content: "\e68b"; +} + +.icon-licai:before { + content: "\e68c"; +} + +.icon-gongzi:before { + content: "\e68d"; +} + +.icon-jianzhi:before { + content: "\e68e"; +} + +.icon-licaishouyi:before { + content: "\e68f"; +} + +.icon-qitashouru:before { + content: "\e692"; +} + +.icon-zidingyileimu:before { + content: "\e693"; +} + +.icon-tianjialeimu:before { + content: "\e694"; +} + +.icon-zhifubaoa:before { + content: "\e695"; +} + +.icon-zhifubaob:before { + content: "\e696"; +} + +.icon-fuwuchuanga:before { + content: "\e698"; +} + +.icon-fuwuchuangb:before { + content: "\e6a1"; +} + +.icon-tansuoa:before { + content: "\e6a2"; +} + +.icon-tansuob:before { + content: "\e6a7"; +} + +.icon-caifua:before { + content: "\e6a8"; +} + +.icon-caifub:before { + content: "\e6a9"; +} + +.icon-apps:before { + content: "\e729"; +} + +.icon-paintfill:before { + content: "\e72a"; +} + +.icon-paint:before { + content: "\e72b"; +} + +.icon-picfill:before { + content: "\e72c"; +} + +.icon-refresharrow:before { + content: "\e72d"; +} + +.icon-markfill:before { + content: "\e730"; +} + +.icon-mark:before { + content: "\e731"; +} + +.icon-presentfill:before { + content: "\e732"; +} + +.icon-repeal:before { + content: "\e733"; +} + +.icon-album:before { + content: "\e734"; +} + +.icon-peoplefill:before { + content: "\e735"; +} + +.icon-people:before { + content: "\e736"; +} + +.icon-servicefill:before { + content: "\e737"; +} + +.icon-repair:before { + content: "\e738"; +} + +.icon-file:before { + content: "\e739"; +} + +.icon-repairfill:before { + content: "\e73a"; +} + +.icon-taoxiaopu:before { + content: "\e73b"; +} + +.icon-attentionfill:before { + content: "\e73c"; +} + +.icon-attention:before { + content: "\e73d"; +} + +.icon-commandfill:before { + content: "\e73e"; +} + +.icon-command:before { + content: "\e73f"; +} + +.icon-communityfill:before { + content: "\e740"; +} + +.icon-community:before { + content: "\e741"; +} + +.icon-read:before { + content: "\e742"; +} + +.icon-suan:before { + content: "\e743"; +} + +.icon-hua:before { + content: "\e744"; +} + +.icon-ju:before { + content: "\e745"; +} + +.icon-tian:before { + content: "\e748"; +} + +.icon-calendar:before { + content: "\e74a"; +} + +.icon-cut:before { + content: "\e74b"; +} + +.icon-magic:before { + content: "\e74c"; +} + +.icon-backwardfill:before { + content: "\e74d"; +} + +.icon-playfill:before { + content: "\e74f"; +} + +.icon-stop:before { + content: "\e750"; +} + +.icon-tagfill:before { + content: "\e751"; +} + +.icon-tag:before { + content: "\e752"; +} + +.icon-group:before { + content: "\e753"; +} + +.icon-all:before { + content: "\e755"; +} + +.icon-backdelete:before { + content: "\e756"; +} + +.icon-hotfill:before { + content: "\e757"; +} + +.icon-hot:before { + content: "\e758"; +} + +.icon-post:before { + content: "\e759"; +} + +.icon-radiobox:before { + content: "\e75b"; +} + +.icon-rounddown:before { + content: "\e75c"; +} + +.icon-upload:before { + content: "\e75d"; +} + +.icon-writefill:before { + content: "\e760"; +} + +.icon-write:before { + content: "\e761"; +} + +.icon-radioboxfill:before { + content: "\e763"; +} + +.icon-punch:before { + content: "\e764"; +} + +.icon-shake:before { + content: "\e765"; +} + +.icon-add1:before { + content: "\e767"; +} + +.icon-move:before { + content: "\e768"; +} + +.icon-safe:before { + content: "\e769"; +} + +.icon-haodian:before { + content: "\e76d"; +} + +.icon-mao:before { + content: "\e76e"; +} + +.icon-qi:before { + content: "\e76f"; +} + +.icon-ye:before { + content: "\e770"; +} + +.icon-juhuasuan:before { + content: "\e771"; +} + +.icon-taoqianggou:before { + content: "\e772"; +} + +.icon-tianmao:before { + content: "\e773"; +} + +.icon-activityfill:before { + content: "\e775"; +} + +.icon-crownfill:before { + content: "\e776"; +} + +.icon-crown:before { + content: "\e777"; +} + +.icon-goodsfill:before { + content: "\e778"; +} + +.icon-messagefill:before { + content: "\e779"; +} + +.icon-profilefill:before { + content: "\e77a"; +} + +.icon-sound:before { + content: "\e77b"; +} + +.icon-sponsorfill:before { + content: "\e77c"; +} + +.icon-sponsor:before { + content: "\e77d"; +} + +.icon-upblock:before { + content: "\e77e"; +} + +.icon-weblock:before { + content: "\e77f"; +} + +.icon-weunblock:before { + content: "\e780"; +} + +.icon-1111:before { + content: "\e782"; +} + +.icon-my:before { + content: "\e78b"; +} + +.icon-myfill:before { + content: "\e78c"; +} + +.icon-emojifill:before { + content: "\e78d"; +} + +.icon-emojiflashfill:before { + content: "\e78e"; +} + +.icon-flashbuyfill-copy:before { + content: "\e78f"; +} + +.icon-text:before { + content: "\e791"; +} + +.icon-goodsfavor:before { + content: "\e794"; +} + +.icon-musicfill:before { + content: "\e795"; +} + +.icon-musicforbidfill:before { + content: "\e796"; +} + +.icon-xiamiforbid:before { + content: "\e797"; +} + +.icon-xiami:before { + content: "\e798"; +} + +.icon-roundleftfill:before { + content: "\e799"; +} + +.icon-triangledownfill:before { + content: "\e79b"; +} + +.icon-triangleupfill:before { + content: "\e79c"; +} + +.icon-roundleftfill-copy:before { + content: "\e79e"; +} + +.icon-weixin:before { + content: "\e6ab"; +} + +.icon-pulldown1:before { + content: "\e79f"; +} + +.icon-emojilight:before { + content: "\e7a1"; +} + +.icon-keyboardlight:before { + content: "\e7a3"; +} + +.icon-recordfill:before { + content: "\e7a4"; +} + +.icon-recordlight:before { + content: "\e7a5"; +} + +.icon-record:before { + content: "\e7a6"; +} + +.icon-roundaddlight:before { + content: "\e7a7"; +} + +.icon-soundlight:before { + content: "\e7a8"; +} + +.icon-cardboardfill:before { + content: "\e7a9"; +} + +.icon-cardboard:before { + content: "\e7aa"; +} + +.icon-formfill:before { + content: "\e7ab"; +} + +.icon-coin:before { + content: "\e7ac"; +} + +.icon-sortlight:before { + content: "\e7ad"; +} + +.icon-cardboardforbid:before { + content: "\e7af"; +} + +.icon-circlefill:before { + content: "\e7b0"; +} + +.icon-circle:before { + content: "\e7b1"; +} + +.icon-attentionforbid:before { + content: "\e7b2"; +} + +.icon-attentionforbidfill:before { + content: "\e7b3"; +} + +.icon-attentionfavorfill:before { + content: "\e7b4"; +} + +.icon-attentionfavor:before { + content: "\e7b5"; +} + +.icon-piclight:before { + content: "\e7b7"; +} + +.icon-shoplight:before { + content: "\e7b8"; +} + +.icon-voicelight:before { + content: "\e7b9"; +} + +.icon-attentionfavorfill-copy:before { + content: "\e7ba"; +} + +.icon-full:before { + content: "\e7bc"; +} + +.icon-mail:before { + content: "\e7bd"; +} + +.icon-peoplelist:before { + content: "\e7be"; +} + +.icon-logo:before { + content: "\e6aa"; +} + +.icon-daohang1:before { + content: "\e6ad"; +} + +.icon-goodsnewfill:before { + content: "\e7bf"; +} + +.icon-goodsnew:before { + content: "\e7c0"; +} + +.icon-medalfill:before { + content: "\e7c1"; +} + +.icon-medal:before { + content: "\e7c2"; +} + +.icon-newsfill:before { + content: "\e7c3"; +} + +.icon-newshotfill:before { + content: "\e7c4"; +} + +.icon-newshot:before { + content: "\e7c5"; +} + +.icon-news:before { + content: "\e7c6"; +} + +.icon-videofill:before { + content: "\e7c7"; +} + +.icon-video:before { + content: "\e7c8"; +} + +.icon-askfill:before { + content: "\e7c9"; +} + +.icon-ask:before { + content: "\e7ca"; +} + +.icon-exit:before { + content: "\e7cb"; +} + +.icon-skinfill:before { + content: "\e7cc"; +} + +.icon-skin:before { + content: "\e7cd"; +} + +.icon-moneybagfill:before { + content: "\e7ce"; +} + +.icon-usefullfill:before { + content: "\e7cf"; +} + +.icon-usefull:before { + content: "\e7d0"; +} + +.icon-moneybag:before { + content: "\e7d1"; +} + +.icon-redpacket_fill:before { + content: "\e7d3"; +} + +.icon-subscription:before { + content: "\e7d4"; +} + +.icon-home_light:before { + content: "\e7d5"; +} + +.icon-my_light:before { + content: "\e7d6"; +} + +.icon-community_light:before { + content: "\e7d7"; +} + +.icon-cart_light:before { + content: "\e7d8"; +} + +.icon-we_light:before { + content: "\e7d9"; +} + +.icon-home_fill_light:before { + content: "\e7da"; +} + +.icon-cart_fill_light:before { + content: "\e7db"; +} + +.icon-community_fill_light:before { + content: "\e7dc"; +} + +.icon-my_fill_light:before { + content: "\e7dd"; +} + +.icon-we_fill_light:before { + content: "\e7de"; +} + +.icon-skin_light:before { + content: "\e7df"; +} + +.icon-search_light:before { + content: "\e7e0"; +} + +.icon-scan_light:before { + content: "\e7e1"; +} + +.icon-people_list_light:before { + content: "\e7e2"; +} + +.icon-message_light:before { + content: "\e7e3"; +} + +.icon-close_light:before { + content: "\e7e4"; +} + +.icon-add_light:before { + content: "\e7e5"; +} + +.icon-profile_light:before { + content: "\e7e6"; +} + +.icon-service_light:before { + content: "\e7e7"; +} + +.icon-friend_add_light:before { + content: "\e7e8"; +} + +.icon-edit_light:before { + content: "\e7e9"; +} + +.icon-camera_light:before { + content: "\e7ea"; +} + +.icon-hot_light:before { + content: "\e7eb"; +} + +.icon-refresh_light:before { + content: "\e7ec"; +} + +.icon-back_light:before { + content: "\e7ed"; +} + +.icon-share_light:before { + content: "\e7ee"; +} + +.icon-comment_light:before { + content: "\e7ef"; +} + +.icon-appreciate_light:before { + content: "\e7f0"; +} + +.icon-favor_light:before { + content: "\e7f1"; +} + +.icon-appreciate_fill_light:before { + content: "\e7f2"; +} + +.icon-comment_fill_light:before { + content: "\e7f3"; +} + +.icon-wang_light:before { + content: "\e7f4"; +} + +.icon-more_android_light:before { + content: "\e7f5"; +} + +.icon-friend_light:before { + content: "\e7f6"; +} + +.icon-more_light:before { + content: "\e7f7"; +} + +.icon-goods_favor_light:before { + content: "\e7f8"; +} + +.icon-goods_new_fill_light:before { + content: "\e7f9"; +} + +.icon-goods_new_light:before { + content: "\e7fa"; +} + +.icon-goods_light:before { + content: "\e7fb"; +} + +.icon-medal_fill_light:before { + content: "\e7fc"; +} + +.icon-medal_light:before { + content: "\e7fd"; +} + +.icon-news_fill_light:before { + content: "\e7fe"; +} + +.icon-news_hot_fill_light:before { + content: "\e7ff"; +} + +.icon-news_hot_light:before { + content: "\e800"; +} + +.icon-news_light:before { + content: "\e801"; +} + +.icon-video_fill_light:before { + content: "\e802"; +} + +.icon-message_fill_light:before { + content: "\e803"; +} + +.icon-form_light:before { + content: "\e804"; +} + +.icon-video_light:before { + content: "\e805"; +} + +.icon-search_list_light:before { + content: "\e806"; +} + +.icon-form_fill_light:before { + content: "\e807"; +} + +.icon-global_light:before { + content: "\e808"; +} + +.icon-global:before { + content: "\e809"; +} + +.icon-favor_fill_light:before { + content: "\e80a"; +} + +.icon-delete_light:before { + content: "\e80b"; +} + +.icon-back_android:before { + content: "\e80c"; +} + +.icon-back_android_light:before { + content: "\e80d"; +} + +.icon-down_light:before { + content: "\e80e"; +} + +.icon-round_close_light:before { + content: "\e80f"; +} + +.icon-round_close_fill_light:before { + content: "\e810"; +} + +.icon-expressman:before { + content: "\e811"; +} + +.icon-punch_light:before { + content: "\e812"; +} + +.icon-evaluate_fill:before { + content: "\e813"; +} + +.icon-furniture:before { + content: "\e814"; +} + +.icon-dress:before { + content: "\e815"; +} + +.icon-coffee:before { + content: "\e816"; +} + +.icon-sports:before { + content: "\e817"; +} + +.icon-group_light:before { + content: "\e818"; +} + +.icon-location_light:before { + content: "\e819"; +} + +.icon-attention_light:before { + content: "\e81a"; +} + +.icon-group_fill_light:before { + content: "\e81b"; +} + +.icon-group_fill:before { + content: "\e81c"; +} + +.icon-play_forward_fill:before { + content: "\e81d"; +} + +.icon-shoucang:before { + content: "\e86d"; +} + +.icon-guanbijiantou:before { + content: "\e86e"; +} + +.icon-shoucang1:before { + content: "\e86f"; +} + +.icon-sousuo1:before { + content: "\e870"; +} + +.icon-fenxiang1:before { + content: "\e871"; +} + +.icon-xiaoxi:before { + content: "\e872"; +} + +.icon-xihuan:before { + content: "\e873"; +} + +.icon-xihuan1:before { + content: "\e874"; +} + +.icon-zan:before { + content: "\e875"; +} + +.icon-zan1:before { + content: "\e876"; +} + +.icon-huafu:before { + content: "\e877"; +} + +.icon-lvjing:before { + content: "\e878"; +} + +.icon-huafu1:before { + content: "\e879"; +} + +.icon-fanzhuanjingtou:before { + content: "\e87a"; +} + +.icon-paizhao:before { + content: "\e87b"; +} + +.icon-shanguangdengdakai:before { + content: "\e87c"; +} + +.icon-shanguangdengzidong:before { + content: "\e87d"; +} + +.icon-huafu2:before { + content: "\e87e"; +} + +.icon-huafu3:before { + content: "\e87f"; +} + +.icon-shanguangdengguanbi:before { + content: "\e880"; +} + +.icon-paizhao1:before { + content: "\e881"; +} + +.icon-kuaitui:before { + content: "\e882"; +} + +.icon-bianda:before { + content: "\e883"; +} + +.icon-kuaijin:before { + content: "\e884"; +} + +.icon-xuanzhuanshouji:before { + content: "\e885"; +} + +.icon-liangdu:before { + content: "\e886"; +} + +.icon-yanjingmoshi:before { + content: "\e887"; +} + +.icon-zanting:before { + content: "\e888"; +} + +.icon-yinliang:before { + content: "\e889"; +} + +.icon-vrbofangqi:before { + content: "\e88a"; +} + +.icon-suoxiao:before { + content: "\e88b"; +} + +.icon-bofang:before { + content: "\e88c"; +} + +.icon-yueduxiao:before { + content: "\e88d"; +} + +.icon-xialajiantouxiao:before { + content: "\e88e"; +} + +.icon-dingweixiao:before { + content: "\e88f"; +} + +.icon-vrbofangqi1:before { + content: "\e890"; +} + +.icon-jingxuan:before { + content: "\e891"; +} + +.icon-zhekou:before { + content: "\e892"; +} + +.icon-tishi1:before { + content: "\e893"; +} + +.icon-shuiguo:before { + content: "\e894"; +} + +.icon-huiyi:before { + content: "\e895"; +} + +.icon-youhuiquan:before { + content: "\e896"; +} + +.icon-jianshen:before { + content: "\e897"; +} + +.icon-chufang:before { + content: "\e898"; +} + +.icon-ditu1:before { + content: "\e899"; +} + +.icon-zanxiao:before { + content: "\e89a"; +} + +.icon-huiyuanqia:before { + content: "\e89b"; +} + +.icon-jiesonghuoche:before { + content: "\e89c"; +} + +.icon-changyongxinxi:before { + content: "\e89d"; +} + +.icon-fanchengjipiao:before { + content: "\e89e"; +} + +.icon-chujingchaoshi:before { + content: "\e89f"; +} + +.icon-jiudian:before { + content: "\e8a0"; +} + +.icon-shoujian:before { + content: "\e8a1"; +} + +.icon-shaixuan:before { + content: "\e8a2"; +} + +.icon-jiesongji:before { + content: "\e8a3"; +} + +.icon-tupian:before { + content: "\e8a4"; +} + +.icon-zengjia:before { + content: "\e8a5"; +} + +.icon-neirong2:before { + content: "\e8a6"; +} + +.icon-daohang:before { + content: "\e8a7"; +} + +.icon-wenda:before { + content: "\e8a8"; +} + +.icon-fujian:before { + content: "\e8a9"; +} + +.icon-ganxie:before { + content: "\e8aa"; +} + +.icon-gengduo1:before { + content: "\e8ab"; +} + +.icon-gouwu1:before { + content: "\e8ac"; +} + +.icon-ganxie1:before { + content: "\e8ad"; +} + +.icon-huodongxiangqu:before { + content: "\e8ae"; +} + +.icon-huidaodingbu:before { + content: "\e8af"; +} + +.icon-dianhua:before { + content: "\e8b0"; +} + +.icon-huodongxiangqu1:before { + content: "\e8b1"; +} + +.icon-jinrujiantou:before { + content: "\e8b2"; +} + +.icon-jieban:before { + content: "\e8b3"; +} + +.icon-kefu:before { + content: "\e8b4"; +} + +.icon-liebiao1:before { + content: "\e8b5"; +} + +.icon-jingdian:before { + content: "\e8b6"; +} + +.icon-jingdian1:before { + content: "\e8b7"; +} + +.icon-mulu:before { + content: "\e8b8"; +} + +.icon-neirong:before { + content: "\e8b9"; +} + +.icon-naozhong:before { + content: "\e8ba"; +} + +.icon-pinglun:before { + content: "\e8bb"; +} + +.icon-saoyisao1:before { + content: "\e8bc"; +} + +.icon-qianzheng:before { + content: "\e8bd"; +} + +.icon-shouqijiantouxiao:before { + content: "\e8be"; +} + +.icon-toutiao:before { + content: "\e8bf"; +} + +.icon-shezhi1:before { + content: "\e8c0"; +} + +.icon-tuichu:before { + content: "\e8c1"; +} + +.icon-jinnang:before { + content: "\e8c2"; +} + +.icon-wenda1:before { + content: "\e8c3"; +} + +.icon-wifi1:before { + content: "\e8c4"; +} + +.icon-wifidianhuaqia:before { + content: "\e8c5"; +} + +.icon-changge:before { + content: "\e8c6"; +} + +.icon-dianpu:before { + content: "\e8c7"; +} + +.icon-baoxiandingdan:before { + content: "\e8c8"; +} + +.icon-anquanzhongxin:before { + content: "\e8c9"; +} + +.icon-dingdanchulizhong:before { + content: "\e8ca"; +} + +.icon-dingdandaifukuan:before { + content: "\e8cb"; +} + +.icon-dingdan:before { + content: "\e8cc"; +} + +.icon-dingdanjihe:before { + content: "\e8cd"; +} + +.icon-faxian:before { + content: "\e8ce"; +} + +.icon-chujingyou:before { + content: "\e8cf"; +} + +.icon-dingdanyichenggong:before { + content: "\e8d0"; +} + +.icon-gouwu2:before { + content: "\e8d1"; +} + +.icon-gouwuche:before { + content: "\e8d2"; +} + +.icon-dujia:before { + content: "\e8d3"; +} + +.icon-hongbao:before { + content: "\e8d4"; +} + +.icon-huochepiao:before { + content: "\e8d5"; +} + +.icon-jihuozhongzhuan:before { + content: "\e8d6"; +} + +.icon-jiudian1:before { + content: "\e8d7"; +} + +.icon-licheng:before { + content: "\e8d8"; +} + +.icon-guojijipiao:before { + content: "\e8d9"; +} + +.icon-lichengdixian:before { + content: "\e8da"; +} + +.icon-jipiao1:before { + content: "\e8db"; +} + +.icon-lichengfanbei:before { + content: "\e8dc"; +} + +.icon-mudedi:before { + content: "\e8dd"; +} + +.icon-qichepiao:before { + content: "\e8de"; +} + +.icon-lubiao:before { + content: "\e8df"; +} + +.icon-qitadingdan:before { + content: "\e8e0"; +} + +.icon-rili:before { + content: "\e8e1"; +} + +.icon-shikebiao:before { + content: "\e8e2"; +} + +.icon-shoudiantongguan:before { + content: "\e8e3"; +} + +.icon-shoudiantongkai:before { + content: "\e8e4"; +} + +.icon-taideng:before { + content: "\e8e5"; +} + +.icon-shouye:before { + content: "\e8e6"; +} + +.icon-weilaijiudian:before { + content: "\e8e7"; +} + +.icon-xiangqing:before { + content: "\e8e8"; +} + +.icon-wangwang:before { + content: "\e8e9"; +} + +.icon-wode1:before { + content: "\e8ea"; +} + +.icon-hangcheng:before { + content: "\e8eb"; +} + +.icon-yuyuedingdan:before { + content: "\e8ec"; +} + +.icon-zuche:before { + content: "\e8ed"; +} + +.icon-zhoubianyou:before { + content: "\e8ee"; +} + +.icon-yijianfankui:before { + content: "\e8ef"; +} + +.icon-bangzhu1:before { + content: "\e8f0"; +} + +.icon-bofang1:before { + content: "\e8f1"; +} + +.icon-bangdan:before { + content: "\e8f2"; +} + +.icon-bangdan1:before { + content: "\e8f3"; +} + +.icon-feiyongbaohan:before { + content: "\e8f4"; +} + +.icon-ditudingwei:before { + content: "\e8f5"; +} + +.icon-canyin1:before { + content: "\e8f6"; +} + +.icon-fanhui:before { + content: "\e8f7"; +} + +.icon-gantanhao:before { + content: "\e8f8"; +} + +.icon-feiyongbuhan:before { + content: "\e8f9"; +} + +.icon-gengduo2:before { + content: "\e8fa"; +} + +.icon-huiyuan:before { + content: "\e8fb"; +} + +.icon-jia:before { + content: "\e8fc"; +} + +.icon-jian:before { + content: "\e8fd"; +} + +.icon-jingdianwanfa:before { + content: "\e8fe"; +} + +.icon-jingdianwanfa1:before { + content: "\e8ff"; +} + +.icon-jiaoxing:before { + content: "\e900"; +} + +.icon-kuandai:before { + content: "\e901"; +} + +.icon-qianzheng1:before { + content: "\e902"; +} + +.icon-shibai1:before { + content: "\e903"; +} + +.icon-qiehuan:before { + content: "\e904"; +} + +.icon-shijian:before { + content: "\e905"; +} + +.icon-shuaxin:before { + content: "\e906"; +} + +.icon-tingche:before { + content: "\e907"; +} + +.icon-reshui:before { + content: "\e908"; +} + +.icon-xiaolian:before { + content: "\e909"; +} + +.icon-weizhixiangqing:before { + content: "\e90a"; +} + +.icon-tuikuan:before { + content: "\e90b"; +} + +.icon-youji:before { + content: "\e90c"; +} + +.icon-xuanzuo:before { + content: "\e90d"; +} + +.icon-youji1:before { + content: "\e90e"; +} + +.icon-zhengque:before { + content: "\e90f"; +} + +.icon-youyongchi:before { + content: "\e910"; +} + +.icon-huabeizhangdan:before { + content: "\e911"; +} + +.icon-guojihuochepiao:before { + content: "\e912"; +} + +.icon-menpiao:before { + content: "\e913"; +} + +.icon-shangwu:before { + content: "\e914"; +} + +.icon-zaocan:before { + content: "\e915"; +} + +.icon-shaixuan1:before { + content: "\e916"; +} + +.icon-shaixuan2:before { + content: "\e917"; +} + +.icon-fanhuijiantou:before { + content: "\e918"; +} + +.icon-guoneiyou:before { + content: "\e919"; +} + +.icon-youlun:before { + content: "\e91a"; +} + +.icon-menpiao1:before { + content: "\e91b"; +} + +.icon-dangdiwanle:before { + content: "\e91c"; +} + +.icon-dangdiwanle1:before { + content: "\e91d"; +} + +.icon-pinglunxiao:before { + content: "\e91e"; +} + +.icon-jinrujiantouxiao:before { + content: "\e91f"; +} + +.icon-dingweixiao1:before { + content: "\e920"; +} + +.icon-guanbixiao:before { + content: "\e921"; +} + +.icon-shoucangxiao:before { + content: "\e922"; +} + +.icon-shoucangxiao1:before { + content: "\e923"; +} + +.icon-gaoxiao:before { + content: "\e924"; +} + +.icon-lishixiao:before { + content: "\e925"; +} + +.icon-jiazaixiao:before { + content: "\e926"; +} + +.icon-lishixiao1:before { + content: "\e927"; +} + +.icon-duigouxiao:before { + content: "\e928"; +} + +.icon-dixiao:before { + content: "\e929"; +} + +.icon-wenxiao:before { + content: "\e92a"; +} + +.icon-duigouzhong:before { + content: "\e92b"; +} + +.icon-feijizhong:before { + content: "\e92c"; +} + +.icon-huanzhong:before { + content: "\e92d"; +} + +.icon-quzhong:before { + content: "\e92e"; +} + +.icon-quzhong1:before { + content: "\e92f"; +} + +.icon-fanzhong:before { + content: "\e930"; +} + +.icon-biaodankongjianshanchu:before { + content: "\e931"; +} + +.icon-biaodankongjianlianxiren:before { + content: "\e932"; +} + +.icon-shanchu1:before { + content: "\e933"; +} + +.icon-banxiao:before { + content: "\e934"; +} + +.icon-xiuxiao:before { + content: "\e935"; +} + +.icon-remendibiaoxiao:before { + content: "\e936"; +} + +.icon-ditiexiao:before { + content: "\e937"; +} + +.icon-cuicuxiao:before { + content: "\e938"; +} + +.icon-duquanjing:before { + content: "\e939"; +} + +.icon-shangquanxiao:before { + content: "\e93a"; +} + +.icon-biaodankongjiandanxuan:before { + content: "\e93b"; +} + +.icon-zantianchongxiao:before { + content: "\e93c"; +} + +.icon-biaodankongjianfuxuan:before { + content: "\e93d"; +} + +.icon-biaodankongjianfuxuankong:before { + content: "\e93e"; +} + +.icon-chaxunfancheng:before { + content: "\e93f"; +} + +.icon-chaxunchufadaoda:before { + content: "\e940"; +} + +.icon-wenhaoxiao:before { + content: "\e941"; +} + +.icon-icon-test:before { + content: "\e942"; +} + +.icon-xiangxiajiantoucuxiao:before { + content: "\e943"; +} + +.icon-chufadaodaxiao:before { + content: "\e944"; +} + +.icon-daxiao:before { + content: "\e945"; +} + +.icon-bujifapiao:before { + content: "\e946"; +} + +.icon-gongxianghangbanxiao:before { + content: "\e947"; +} + +.icon-dijiaqushi:before { + content: "\e948"; +} + +.icon-tejiajipiaobiaoqian:before { + content: "\e949"; +} + +.icon-hangbanyanwu:before { + content: "\e94a"; +} + +.icon-tuijianjipiao:before { + content: "\e94b"; +} + +.icon-fangxinfei:before { + content: "\e94c"; +} + +.icon-qiehuanchengshi:before { + content: "\e94d"; +} + +.icon-tuijianqiche:before { + content: "\e94e"; +} + +.icon-taocan-suoxiao:before { + content: "\e94f"; +} + +.icon-wenda2:before { + content: "\e950"; +} + +.icon-weizhidifang:before { + content: "\e951"; +} + +.icon-hangliexiao:before { + content: "\e952"; +} + +.icon-wopu:before { + content: "\e953"; +} + +.icon-xiugai:before { + content: "\e954"; +} + +.icon-zhinan:before { + content: "\e955"; +} + +.icon-zengzhifuwu:before { + content: "\e956"; +} + +.icon-yingerpiaobuzhichi:before { + content: "\e957"; +} + +.icon-yingerpiaozhichi:before { + content: "\e958"; +} + +.icon-jipiaoxiaoxiala:before { + content: "\e959"; +} + +.icon-jinrujiantouxiao1:before { + content: "\e95a"; +} + +.icon-lishihangcheng:before { + content: "\e95b"; +} + +.icon-sousuoxiao:before { + content: "\e95c"; +} + +.icon-xiangjixiao:before { + content: "\e95d"; +} + +.icon-xiangshangjiantoucuxiao:before { + content: "\e95e"; +} + +.icon-huochepiaomianxing:before { + content: "\e95f"; +} + +.icon-xuzhixiao:before { + content: "\e960"; +} + +.icon-fenxiangxiao:before { + content: "\e961"; +} + +.icon-wangfandijia:before { + content: "\e962"; +} + +.icon-hangbandongtai:before { + content: "\e963"; +} + +.icon-guanbishixin:before { + content: "\e964"; +} + +.icon-fanhuijiantouxiangqingye:before { + content: "\e965"; +} + +.icon-duigou-weigouxuan:before { + content: "\e966"; +} + +.icon-kouling:before { + content: "\e967"; +} + +.icon-lianjie:before { + content: "\e968"; +} + +.icon-subscription_light:before { + content: "\e81e"; +} + +.icon-deliver_fill:before { + content: "\e81f"; +} + +.icon-notice_forbid_fill:before { + content: "\e820"; +} + +.icon-qr_code_light:before { + content: "\e821"; +} + +.icon-qichebanci:before { + content: "\e969"; +} + +.icon-chengnianrennan:before { + content: "\e96a"; +} + +.icon-chengnianrennv:before { + content: "\e96b"; +} + +.icon-youleyuan:before { + content: "\e96c"; +} + +.icon-zhifubao:before { + content: "\e96d"; +} + +.icon-gantanhaozhong:before { + content: "\e96e"; +} + +.icon-pailie:before { + content: "\e96f"; +} + +.icon-dibiao:before { + content: "\e970"; +} + +.icon-woshuohao:before { + content: "\e971"; +} + +.icon-woshuohao1:before { + content: "\e972"; +} + +.icon-paihang:before { + content: "\e973"; +} + +.icon-settings_light:before { + content: "\e822"; +} + +.icon-lingquanzhongxin:before { + content: "\e974"; +} + +.icon-xingqiu:before { + content: "\e975"; +} + +.icon-pdf:before { + content: "\e976"; +} + +.icon-guojijiudian:before { + content: "\e977"; +} + +.icon-kezhangongyu:before { + content: "\e978"; +} + +.icon-youxian:before { + content: "\e979"; +} + +.icon-dangritui:before { + content: "\e97a"; +} + +.icon-pick:before { + content: "\e823"; +} + +.icon-dianhua1:before { + content: "\e72e"; +} + +.icon-ARsaoyisao:before { + content: "\e97b"; +} + +.icon-jinrujiantou1:before { + content: "\e97c"; +} + +.icon-triangledownfill-after::after { + content: "\e79b"; + position: absolute; + font-size: 20rpx; + top: -14rpx; + right: -50%; + color: #818181; +} diff --git a/common/css/iconfont.ttf b/common/css/iconfont.ttf new file mode 100644 index 0000000..2127d20 Binary files /dev/null and b/common/css/iconfont.ttf differ diff --git a/common/css/new_iconfont.css b/common/css/new_iconfont.css new file mode 100644 index 0000000..21e6e91 --- /dev/null +++ b/common/css/new_iconfont.css @@ -0,0 +1,17 @@ +@font-face { + font-family: "new_iconfont"; + src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMgAA0AAAAABywAAALMAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GVgCCQhEICoIcgXwLCgABNgIkAxAEIAWFCAcxGxgGEZWbbcl+JGSnhZeMumdLbKWaRok38fC8Tv1zJbl5ZQK7gLg1mfqBYQJeiWn16XLXh21UhZqSePDTd43fxyfwvO3ebf8GEihlGaWSQBM309pEk3NaWyAKu2hNisOAohedNrY9bn19e7DXZ33iH5w3HmpLt5K1FgLeu6tvgo8uWtpFO3WgEdogE3K5UCBDRBwlsp29ClwKXh+PikSm1LTAsl2zd5j2fSfqyWurtTYwwHkIQI4cnQSYJBfopNANhULwfadqFezS/gcEiCEAUeBwPw8BP0v8qgwUICGhjMOAAgBpleo3al40y7df0KZyTeR11zZsfGHr8tVXtdpxVaW8u9Jo7eNv171z4Vu1b1YuuO+66++/+94Ho+6BjQGdura7r+XQWnOHA3Ca4x7/xFUNKpN3r/kzrbrt9llpfs0NaX6a9fDD5aar1o5defXTl146tctttw59seeWHkt6Lhm5aHbvy5vf/vrh0///2qF52+pDZ2tmf/n57Cazxqyb3WzVn3/Najpr3rzZr/393PNDh77//pNfpVkzZzq6N69Z1eSGAF94zc3lmv7lM3suBwLB/oYdb97cdNJ/qWGhYS92d/Wl/PEckgwEjTFXgPzy/xqgCKBAwd0ChbIEMjTQAFUALXyOAFobJEBIVgmQqXFQgFxyToBCcocAJQ09g4B6kq8Q0MDAmCFAQy3jGrlIfQxAJ0IzM4hMExuJXDMnwQK9jChp40GinmbeIBqo+Hl8Q33ikAZmEhaehozpUMafnVmjQRiBrlx32vkej/+RvV0oG9znAzx50U+jLeA/tabBm0vsL2+xymlKYgRYifWXTEQFH8MDb6nnMatNpCAUUMFi1KPuSXzCa5oRNVmMCs9CDBzi+9ctKsSwduNvrPILKPlv3/cBJAhNbjgupJxmrFEPFtZ8mfk5GD82KYNgF7hy7h4gIaLRHaseStY=) format('woff2'), + url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAT8AA0AAAAABywAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAE4AAAABoAAAAciLzFRUdERUYAAATAAAAAHgAAAB4AKQAKT1MvMgAAAaAAAABCAAAAVjyKSA5jbWFwAAAB9AAAAD4AAAFCAA/px2dhc3AAAAS4AAAACAAAAAj//wADZ2x5ZgAAAkAAAAEMAAABHLwdyl5oZWFkAAABMAAAAC4AAAA2FpLiAmhoZWEAAAFgAAAAHQAAACQHlAOFaG10eAAAAeQAAAAPAAAAEAwAAKVsb2NhAAACNAAAAAoAAAAKAI4AAG1heHAAAAGAAAAAHwAAACABFgBhbmFtZQAAA0wAAAFJAAACiCnmEVVwb3N0AAAEmAAAAB8AAAAxw4Fw13jaY2BkYGAA4mpu8dx4fpuvDNwsDCBws8dfDk4v/X+SeRsziMvBwASiAP3ZCZIAAHjaY2BkYGBu+N/AEMPCAALM2xgYGVABCwBUeAMiAAAAeNpjYGRgYGBhCGXgYAABJiDmAkIGhv9gPgMAEbsBeAB42mNgZGFgnMDAysDA1Ml0hoGBoR9CM75mMGLkAIoysDIzYAUBaa4pDA7PZJ7JMDf8b2CIYW5gaAAKM4LkAN8dDBMAAHjaY2GAABYIXgoAASUAsgB42mNgYGBmgGAZBkYGELAB8hjBfBYGBSDNAoRA/jOZ//8hpORzqEoGRjYGGJOBkQlIMDGgAkaGYQ8AWxUHvAAAAAAAAAAAAAAAjgAAeNo9zLFKw1AUxvFzUs+5oaWxSUtTKDRpxcSKqDQ36aQoFEQQQRChuLn5Fj5C6eAotqDuCjq4q10EJxdBfITqnKs3Iq4f/+8HJlx8T3K3OQAHXPBhCdZgE/ZgH2C+tYJBbMskanY8rLJADl0Mm+VllEmnWuGwZWHDWMdYBuWslV1MsrLyV+L/+DvN6Q37Jo8ob+K2STeMrC75dIAbI/UyCaNoV8aBXS+Kmu85/rWgDyLsUomnROqOnh9w9VVtmdQjNs7YylN6xWJxAY+nNCZNioI2S6SeZu4H6J2rN9Si3EmGjufXRLFuu356wu9sER4yfdKsVvnrMVMb1NNPo08Fi9IjPmjjEH4AfSs82HjafZA9TgMxEIWf8wckEkIgqF1RANr8lCkTKfQIpaNINt6QaNdeeZ1IOQEtFQeg5RgcgBsg0XIKXpZJkyJr7ejzm5nnsQGc4xsK/98l7oQVjvEoXMERMuEq9RfhGvlduI4WPoUb1H+Em7hVA+EWLtQbHVTthLub0m3LCmcYCFdwiifhKvWVcI38KlzHFT6EG9S/hJsY41e4hWtlqQzhYTBBYJxBY4oN4wIxHCySMgbWoTn0ZhLMTE83ehE7mzgbKO9XYpcDHmg554Ap7T23Zr5KJ/5gy4HUmG4eBUu2KY0uInQoG18snNXdqHOw/Z7ttrTYv2uBNcfsUQ1s1Pw92zPSSGwMr5CSNfIyt6QSU49oa6zxu2cp1vNeCIlOvMv0iMeaNHU6925p4sDi5/KMHH20uZI996gcPmNZCHm/3U7EIIpdhj+T2HEZAAAAeNpjYGKAAC4wyciADljAokyMTGzZiXlZmYkAC3YCjAAAAAAB//8AAgABAAAADAAAABYAAAACAAEAAwADAAEABAAAAAIAAAAAeNpjYGBgZACCq0vUOUD0zR5/ORgNADpjBU4AAA==) format('woff'); +} + +.new_iconfont { + font-family: "new_iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-kanjia:before { + content: "\e61c"; +} diff --git a/common/css/old_diyPages.css b/common/css/old_diyPages.css new file mode 100644 index 0000000..7b3ad3b --- /dev/null +++ b/common/css/old_diyPages.css @@ -0,0 +1,1642 @@ +.notice { + background-color: #fff; + display: -webkit-flex; + display: flex; + -webkit-justify-content: space-between; + justify-content: space-between; + overflow: hidden; +} + +.diy-notice-icon { + width: 118upx; + height: 30upx; + background-size: 118upx 30upx; + background-repeat: no-repeat; +} + +.notice-l { + -webkit-flex-shrink: 0; + flex-shrink: 0; + position: relative; +} + +.notice-l.style1 { + width: 40upx; + height: 40upx; + padding: 20upx; +} + +.notice-l.style1:after { + content: ""; + width: 2upx; + height: 36%; + background-color: #e2e2e2; + position: absolute; + top: 32%; + right: 0; +} + +.notice-l.style2 { + color: #ff4f4f; + padding: 20upx; + padding-right: 0; +} + +.notice-l.style2 .span { + height: 40upx; + line-height: 40upx; + padding: 0 20upx; + background-color: #ffe1e1; + border-radius: 100upx; + font-size: 28upx; +} + +.notice-l.style3 .span { + height: 40upx; + line-height: 40upx; + color: #FE433F; + font-weight: 700; + font-size: 32upx; + padding: 20upx 0 20upx 20upx; + display: inline-block; + position: relative; +} + +.notice-l .i { + color: #ff9900; + font-size: 36upx; + margin-top: -2upx; +} + +.notice-r { + height: 80upx; + line-height: 80upx; + font-size: 24upx; + padding: 0 0 0 40upx; + -webkit-flex: 1; + flex: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.notice-r swiper { + height: 80upx !important; +} + +.notice-r swiper swiper-item .a { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + /* position: relative; */ +} + +.movbox{ + position: relative; + height: 80upx; + font-size: 24upx; +} + +.move{ + position: absolute; + height: 80upx; + line-height: 80upx; + /* left: 0; */ + +} + + +.notice-r-i { + height: 40upx; + line-height: 40upx; + padding-top: 20upx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* magic_cube 图片魔方 */ +.magic_cube { + width: 100vw; + height: 100vw; + max-height: 100vw; + overflow: hidden; + position: relative; +} + +.magic_cube-d-f { + width: 100%; + height: 100%; + position: relative; +} + +.magic_cube-d { + width: 100%; + height: 100%; + margin-top: 0 !important; + position: relative; +} + +.magic_cube-i { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + position: absolute; +} + +.magic_cube-i-d { + width: 100%; + height: 100%; +} + +.magic_cube-i .image { + width: 100%; + height: 100%; + object-fit: initial; + display: block; +} + +/* picturew 图片橱窗1 */ +.imgwindow { + background-color: #fff; +} + +.imgwindow:after { + content: ""; + display: block; + clear: both; +} + +.imgwindow-i { + width: 25%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; +} + +.imgwindow-i-d .image { + width: 100%; + display: block; +} + +/* picturew2 图片橱窗2 */ +.picturew2-i { + width: 100%; +} + +.picturew2-i-d { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.picturew2-i .image { + width: 100%; + display: block; +} + +/* picturew3 图片橱窗3 */ +.picturew3 { + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-justify-content: flex-start; + justify-content: flex-start; +} + +.picturew3-i { + width: 50%; +} + +.picturew3-i-d { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.picturew3-i .image { + width: 100%; + display: block; +} + +/* picturew4 图片橱窗4 */ +.picturew4:after { + content: ""; + clear: both; + display: block; +} + +.picturew4-i { + width: 50vw; + height: 25vw; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; +} + +.picturew4-i:nth-child(1) { + height: 50vw; +} + +.picturew4-i-d { + height: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.picturew4-i .image { + width: 100%; + height: 100%; + display: block; +} + +/* picturew5 图片橱窗5 */ +.picturew5:after { + content: ""; + clear: both; + display: block; +} + +.picturew5-i { + width: 50vw; + height: 25vw; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; +} + +.picturew5-i:nth-child(1) { + height: 50vw; +} + +.picturew5-i:nth-child(3), +.picturew5-i:nth-child(4) { + width: 25vw; +} + +.picturew5-i-d { + height: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.picturew5-i .image { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} + +/* picturew6 图片橱窗6 */ +.picturew6 { + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-justify-content: flex-start; + justify-content: flex-start; +} + +.picturew6-i { + width: calc(100% / 3); +} + +.picturew6-i-d { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.picturew6-i .image { + width: 100%; + display: block; +} + +/* pictures 图片展播 */ +.pictures { + width: 100%; + overflow: auto; +} + +.pictures-d:after { + content: ""; + clear: both; + display: block; +} + +.picturesd { + width: 100% !important; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.pictures-i { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; +} + +.pictures-i .image { + position: relative; +} + +.pictures-i .image .image { + width: 100%; + /* height: 200upx; */ + background-repeat: no-repeat; +} + + +.pictures-i .image .title { + position: absolute; + height: 50upx; + line-height: 50upx; + width: 100%; + background: rgba(0, 0, 0, .3); + color: #fff; + margin: 0; + padding: 0 10upx; + bottom: 0; + left: 0; + right: 0; + font-size: 28upx; + display: block; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.pictures-i .text { + font-size: 28upx; + height: 50upx; + line-height: 50upx; + display: block; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + padding: 0 .25rem; + position: relative; +} + +.pictures-i.row-2 { + width: 50%; +} + +.pictures-i.row-3 { + width: 33.33%; +} + +.pictures-i.row-4 { + width: 25%; +} + +.pictures-i.row-5 { + width: 20%; +} + +/* banner 图片轮播 */ +.imgswiper { + background-color: #fff; +} + +.imgmarginlr { + margin: 0 30upx; +} + +.banner-swiper-Item { + border-radius: 10upx; +} + +/* .imgswiper .swiper { + width: 100%; + height: auto +} + */ + +.imgswiper swiper-item .image { + width: 100%; + height: 100%; + display: block; +} + +/* richtext 富文本 */ +.richtext { + background-color: #fff; +} + +/* title 标题1 */ +.titlebar { + line-height: 42upx; + font-size: 32upx; + padding: 0 30upx; + background-color: #ffffff; + position: relative; +} + +.titlebar-d { + line-height: 42upx; + display: inline-block; +} + +.titlebar .i { + font-size: 34upx; + margin-right: 10upx; + display: inline; +} + +.titlebar .text { + display: inline; +} + +.titlebar .more { + height: 42upx; + line-height: 42upx; + color: #FE433F; + font-size: 30upx; + position: absolute; + top: 0; + right: 30upx; + display: inline-block; +} + +.titlebar .more .a { + color: #999; +} + +.titlebar .more .a .span { + display: inline; +} + +.titlebar .more .a .i { + font-size: 32upx; + vertical-align: -2upx; + display: inline; +} + +/* title2 标题2 */ +.titlebar2 { + padding: 0 30upx; + position: relative; +} + +.titlebar2 .h1 { + font-weight: normal; + font-size: 36upx; +} + +.titlebar2 .p { + line-height: 42upx; + color: #999; + font-size: 24upx; +} + +.titlebar2 .more { + height: 102upx; + line-height: 102upx; + color: #FE433F; + font-size: 30upx; + position: absolute; + top: 0; + right: 30upx; + display: inline-block; +} + +.titlebar2 .more .a { + color: #999; +} + +.titlebar2 .more .a .span { + display: inline; +} + +.titlebar2 .more .a .i { + font-size: 32upx; + vertical-align: -2upx; + display: inline; +} + +/* search 搜索框 */ +.searchbox { + padding: 20upx 30upx; + background-color: #f1f1f2; +} + +.searchbox-d { + width: calc(100% - 40upx); + height: 56upx; + padding: 8upx 20upx; + background-color: #ffffff; + box-shadow: 0 0 2upx rgba(0, 0, 0, .1); + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; +} + +.searchbox-d-inl { + height: 48upx; + line-height: 48upx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; +} + +.searchbox .i { + font-size: 28upx; + margin-right: 10upx; + display: inline; +} + +.searchbox .text { + font-size: 24upx; + display: inline; + width: 400rpx; + line-height: 50upx; + height: 50upx; +} + +.searchbox .radius { + border-radius: 10upx; +} + +.searchbox .round { + border-radius: 100upx; +} + +.searchbox2 { + display: -webkit-flex; + display: flex; + -webkit-justify-content: space-between; + justify-content: space-between; +} + +.searchbox2-l { + margin-right: 20upx; + max-width: 360upx; +} + +.searchbox2-l>image { + width: 40upx; + height: 40upx; + margin-right: 4upx; + flex-shrink: 0; +} + +.searchbox2-l .i { + font-size: 32upx; + font-weight: 600; + padding-left: 20upx; + display: inline; +} + +.searchbox2-r { + -webkit-flex: 1; + flex: 1; + display: -webkit-flex; + display: flex; + -webkit-justify-content: space-between; + justify-content: space-between; + overflow: hidden; +} + +/* search3 搜索框3 */ +.searchbox3 { + background-color: #f1f1f1; + overflow: hidden; + position: relative; +} + +.searchbox3-d { + height: 80upx; + line-height: 68upx; + padding: 10upx 30upx; + display: flex; + justify-content: space-between; + position: relative; + box-sizing: initial; +} + +.searchbox3-l { + color: #000; + font-size: 36upx; + font-style: italic; + font-family: SimHei; +} + +.searchbox3-r-d { + width: 180upx; + height: 56upx; + line-height: 56upx; + color: #808080; + font-size: 28upx; + text-align: center; + margin-top: 12upx; + background-color: #d9d9d9; + border-radius: 40upx; +} + +.searchbox3-r-d .i { + font-size: 32upx; + margin-right: 10upx; + vertical-align: -2upx; +} + +@keyframes move_wave { + 0% { + transform: translateX(0) translateZ(0) scaleY(1); + } + + 100% { + transform: translateX(-66.66666%) translateZ(0) scaleY(1); + } +} + +.search-wave { + width: 100%; + height: 28upx; + position: absolute; + left: 0; + bottom: 0; + overflow: hidden; +} + +.search-wave-d { + width: 300%; + height: 100%; + animation: move_wave 4s linear infinite; + animation-delay: 0s; + display: -webkit-flex; + display: flex; + justify-content: flex-start; +} + +.search-wave-i { + width: 100%; + height: 100%; + position: relative; +} + +.search-wave-i .image { + width: 100%; + height: 100%; + vertical-align: middle; +} + +/* line 辅助线 */ +.subline { + height: 2upx; +} + +.subline-d { + height: 0; +} + +/* menu 按钮组 */ +.btngroup-d { + padding: 0 0 10upx; + display: -webkit-flex; + display: flex; + -webkit-justify-content: flex-start; + justify-content: flex-start; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; +} + +.btngroup-i { + padding-top: 20upx; +} + +.btngroup-i-t { + padding: 0 15upx; +} + +.btngroup-i-t-icon { + width: 84upx; + height: 84upx; + margin: 0 auto 8upx; + background-position: center; + background-size: cover; +} + +.btngroup-i-t-icon .image { + width: 84upx; + height: 84upx; + background-repeat: no-repeat; + background-size: 100% 100% !important; + -webkit-background-size: cover; + -o-background-size: cover; + background-position: center center; +} + +.btngroup-i-c { + height: 42upx; + line-height: 42upx; + font-size: 28upx; + color: #333; + text-align: center; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.btngroupImage.radius { + border-radius: 20upx; + background-size: cover; + background-position: center 0; +} + +.btngroupImage.circle { + border-radius: 200upx; + background-size: cover; + background-position: center 0; +} + +/* blank 辅助空白 */ +.sublank { + background-color: #fff; +} + +/* picture 单图组 */ +.oneimgroup { + background-color: #fff; +} + +.oneimgroup-i { + width: 100%; +} + +.oneimgroup-i .image { + width: 100%; + display: block; +} + +/* rush_goods3 rush_goods3 rush_goods3 抢购3、团购3与优惠券3 */ +.goodslist { + padding: 30upx; + background-color: #fff; +} + +.goodslist-i .rush_goods_mask_img { + width: calc(((100vw - 60upx) / 1.8) * 0.7); + height: calc(((100vw - 60upx) / 1.8) * 0.7); +} + +.goodslist-i { + margin-top: 50upx; +} + +.goodslist-i:first-child { + margin-top: 0; +} + +.goodslist-i-t { + height: calc((100vw - 60upx) / 1.8); + position: relative; + overflow: hidden; +} + +.goodslist-i-t .image { + width: 100%; + height: 100%; + border-radius: 4upx; +} + +.goodslist-i-c-t { + color: #999; + font-size: 24upx; + margin-top: 20upx; + display: -webkit-flex; + display: flex; + justify-content: space-between; +} + +.goodslist-i-c-t-l { + padding-right: 20upx; + -webkit-flex-shrink: 1; + flex-shrink: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.goodslist-i-c-t-l { + -webkit-flex: 1; + flex: 1; +} + +.goodslist-i-c-c { + line-height: 48upx; + font-size: 32upx; + margin-top: 20upx; +} + +.goodslist-i-c-c .i { + height: 48upx; + line-height: 48upx; + font-size: 28upx; + font-style: normal; + margin-right: 10upx; + padding: 0 18upx; + background-color: #FFD93F; + border-radius: 4upx; + display: inline-block; +} + +.goodslist-i-c-c2 { + margin-top: 20upx; + display: -webkit-flex; + display: flex; + -webkit-justify-content: space-between; + justify-content: space-between; +} + +.goodslist-i-c-c2 .h1 { + color: #f64031; + font-size: 40upx; + -webkit-flex-shrink: 1; + flex-shrink: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: normal; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; +} + +.goodslist-i-c-c2 .h1 text { + position: relative; + top: -2upx; + margin-left: 4upx; +} + +.goodslist-i-c-c2 .h1 .i { + font-size: 24upx; + font-weight: normal; + vertical-align: 2upx; + margin-left: -2upx; +} + +.goodslist-i-c-c2 .h1 .span { + color: #363636; + font-size: 22upx; + font-style: normal; + font-weight: normal; + vertical-align: 2upx; + margin-left: 20upx; + display: inline; +} + +.goodslist-i-c-c2 .h1 .span .i { + height: 28upx; + line-height: 30upx; + color: #DDCDA0; + font-size: 22upx; + vertical-align: 0; + margin-left: 0; + margin-right: 4upx; + padding: 0 4upx; + background-color: #363636; + border-radius: 6upx; + display: inline-block; +} + +.goodslist-i-c-c2 .h2 { + width: 144upx; + height: 56upx; + line-height: 56upx; + color: #fff; + font-size: 28upx; + text-align: center; + font-weight: normal; + background-color: #FF4040; + border-radius: 8upx; + -webkit-flex-shrink: 0; + flex-shrink: 0; +} + +.goodslist-i-c-c2 .sell-out { + color: #808080; + background-color: #D2D2D2; +} + +.goodslist-i-c-b { + margin-top: 20upx; +} + +.goodslist-i-c-b .p { + color: #999; + font-size: 24upx; + margin-top: 6upx; + display: -webkit-flex; + display: flex; + justify-content: space-between; +} + +.goodslist-i-c-b .span { + text-decoration: line-through; +} + +.goodslist-i-c-b .em { + font-style: normal; +} + + + +/* public_goods 通用商品 */ +.transverse .transverse_list::-webkit-scrollbar { + width: 0; + height: 0; + color: transparent; +} + +.transverse { + font-size: 30upx; + /* background-color: #fff; */ +} + +.transverse .transverse_list { + width: auto; +} + +.goods_father { + padding: 30upx 0 10upx 0; + display: flex; + justify-content: flex-start; +} + +.transverse .transverse_list .goods_item { + width: calc(100vw / 2.4); + padding: 0 10upx; + flex: 0 0 auto; +} + +.transverse .transverse_list .goods_item:first-child { + padding-left: 30upx; +} + +.transverse .transverse_list .goods_item:last-child { + padding-right: 30upx; +} + +.transverse .transverse_list .goods_item .goods_img { + width: calc(100vw / 2.4); + height: calc(100vw / 2.4); + position: relative; +} + +.transverse .transverse_list .goods_item .goods_img .image { + display: block; + width: 100%; + height: 100%; +} + +.transverse .transverse_list .goods_item .goods_tit { + line-height: 42upx; + color: #333; + font-size: 26upx; + margin: 20upx 0 5upx 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: normal; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.transverse .transverse_list .goods_item .goods_price { + display: flex; + align-items: baseline; +} + +.transverse .transverse_list .goods_item .goods_price .present_price { + color: #f64031; + display: flex; + align-items: baseline; + font-size: 26upx; +} + +.transverse .transverse_list .goods_item .goods_price .present_price view { + font-size: 40upx; + padding-right: 8upx; +} + +.transverse .transverse_list .goods_item .goods_price .original_price { + color: #cccccc; + text-decoration: line-through; + padding-left: 20upx; + font-size: 26upx; +} + +/* shop 商家信息 */ +.b-color-f8 { + padding: 20upx 30upx; + background-color: #F8F8F8; +} + +.shangjia-i { + overflow: hidden; + margin-top: 6upx; + position: relative; + background-color: #fff; + margin-bottom: 20upx; + border-radius: 10upx; +} + +.shangjia-i:first-child { + margin-top: 0; +} + +.shangjiaISty { + padding-bottom: 0; +} + +.shangjiaISty .shangjia-i-t { + padding: 30upx 30upx 16upx 30upx; +} + +.shangjia-i-t { + padding: 30upx 30upx 0 30upx; + display: -webkit-flex; + display: flex; + -webkit-justify-content: space-between; + justify-content: space-between; +} + +.shangjia-i-t:active { + background-color: #f3f3f3; +} + +.shangjia-i-l { + width: 180upx; + height: 180upx; + border-radius: 6upx; + -webkit-flex-shrink: 0; + flex-shrink: 0; +} + +.shangjia-i-l .image { + width: 100%; + height: 100%; + border-radius: 6upx; +} + +.shangjia-i-r { + /* height: 194upx; */ + -webkit-flex: 1; + flex: 1; + padding-left: 20upx; +} + +.shangjia-i-r-d { + /* height: 180upx; */ + padding-bottom: 10upx; +} + +.shangjiaISty .shangjia-i-r-d { + padding-bottom: 0; + border-bottom: none; +} + +.shangjia-i-r-t1 { + height: 42upx; + line-height: 42upx; + font-size: 30upx; +} + +.shangjia-i-r-t2 { + position: relative; + height: 42upx; + line-height: 42upx; + padding: 4upx 0; +} + +.shangjia-i-r-t2 .icon-shoucangxiao { + font-size: 26upx; + display: inline; + margin-right: 10upx; + float: left; +} + +.shangjia-i-r-t2 .star { + display: inline-block; + position: absolute; + height: 42upx; +} + +.shangjia-i-r-t2 .star:after { + content: ""; + clear: both; + display: block; +} + +.shangjia-i-r-t2-icon { + height: 46upx; +} + +.star-grade { + margin-left: 180upx; +} + +.shangjia-i-r-t2 .star-dark .icon-shoucangxiao { + z-index: 1; +} + +.star-dark .icon-shoucangxiao { + color: #eee; +} + +.star-light .icon-shoucangxiao { + color: #FF4444; +} + +.shangjia-i-r-t2 .star-light { + z-index: 1; +} + +.shangjia-i-r-t2 .star-width { + height: 42upx; + overflow: hidden; + word-break: keep-all; + white-space: nowrap; +} +.tags_view{ + display: inline-block; + padding: 2upx 10upx; + margin-right: 10upx; + border-radius: 20upx 20upx 20upx 0upx; + border:1upx solid rgba(153,153,153,0.4); + font-size: 20upx; + } +.shangjia-i-r-t3 { + position: relative; + height: 42upx; + line-height: 42upx; + color: #666666; + font-size: 26upx; + overflow: hidden; + word-break: keep-all; + white-space: nowrap; +} + +.shangjia-i-r-t4 { + width: 420upx; + position: relative; + color: #666666; + font-size: 26upx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + margin-top: 8upx; +} + +.shangjia-i-b { + line-height: 40upx; + color: #666666; + font-size: 26upx; + padding: 2upx 30upx 12upx 30upx; + position: relative; + padding-left: 230upx; +} + +.shangjia-i-b-i { + height: 42upx; + margin-top: 6upx; + padding-right: 42upx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.shangjia-i-b-i:first-child { + margin-top: 0; +} + +.shangjia-i-b .i { + width: 42upx; + height: 42upx; + line-height: 42upx; + font-size: 28upx; + text-align: right; + position: absolute; + top: 10upx; + right: 30upx; + display: inline-block; + color: #999999; +} + +.shangjia-i-b .em { + width: 34upx; + height: 34upx; + line-height: 34upx; + text-align: center; + color: #fff; + font-style: normal; + border-radius: 4upx; + display: inline-block; + font-size: 24upx; +} + +.shangjia-i-b .qiang { + background-color: #FF7FCA; +} + +.shangjia-i-b .li { + background-color: #FF7FCA; +} +.shangjia-i-b .kan { + background-color: #FF4444; +} +.shangjia-i-b .ka { + background-color: #FFA530; +} + +.shangjia-i-b .hui { + background-color: #ff8400; +} + +.shangjia-i-b .pin { + background-color: #14DCD5; +} + +.shangjia-i-b .tuan { + background-color: #FF834C; +} + +.shangjia-i-b-i { + height: 42upx; + line-height: 42upx; +} + +.shangjia-i-b-i .span { + margin-left: 8upx; + display: inline; + font-size: 24upx; + color: #666666; +} + +.shangjia-i-b-t2 { + height: 42upx; + line-height: 42upx; + margin-top: 6upx; +} + +.shangjia-i-b-t2 .em { + margin-right: 14upx; + display: inline-block; +} + +.shangjia-i-b-t2 .em:last-child { + margin-right: 0; +} + +/* headline 头条1 */ +.goodstop-i { + width: calc(100vw - 60upx); + margin-bottom: 20upx; + padding: 40upx 30upx; + background-color: #fff; +} + +.goodstop-i:last-child { + margin-bottom: 0; +} + +.goodstop-i .h1 { + line-height: 52upx; + font-size: 36upx; + letter-spacing: 4upx; + font-weight: normal; +} + +.goodstop-i-t { + width: calc(100vw - 60upx); + height: calc((100vw - 30upx) / 1.8); + margin-top: 30upx; + position: relative; +} + +.goodstop-i-t-tag { + position: absolute; + top: 20upx; + left: 20upx; +} + +.goodstop-i-t-tag .i { + height: 52upx; + line-height: 52upx; + font-size: 24upx; + font-style: normal; + margin-left: 10upx; + padding: 0 14upx; + background-color: #FFD93F; + border-radius: 4upx; + display: inline; +} + +.goodstop-i-t-tag .i:first-child { + margin-left: 0; +} + +.goodstop-i-t .image { + width: 100%; + height: 100%; +} + +.goodstop-i-c .h2 { + height: 84upx; + line-height: 42upx; + font-size: 24upx; + color: #888; + font-weight: normal; + margin-top: 20upx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.goodstop-i-c .p { + height: 60upx; + line-height: 60upx; + font-size: 28upx; + color: #888; + margin-top: 20upx; + display: -webkit-flex; + display: flex; + justify-content: space-between; +} + +.goodstop-i-c .p .span { + line-height: 60upx; + -webkit-flex-shrink: 1; + flex-shrink: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: -webkit-flex; + display: flex; + justify-content: flex-start; +} + +.goodstop-i-c .p .span .i { + width: 60upx; + height: 60upx; + margin-right: 20upx; + border-radius: 50%; + display: block; +} + +.goodstop-i-c .p .span .b { + font-weight: normal; + display: block; +} + +.goodstop-i-c .p .span .i .image { + width: 100%; + height: 100%; + border-radius: 50%; +} + +.goodstop-i-c .p .em { + font-style: normal; + -webkit-flex-shrink: 0; + flex-shrink: 0; +} + +/* community 社群 */ +.diyPages-community{ + padding: 20upx 30upx; +} + +/* goods_detail-2 样式 */ +.goods2-coupon-style .i { + color: rgb(221, 205, 136); + font-size: 24upx; + margin-top: -2upx; + background-color: #000000; + border-radius: 10upx; + padding: 0 8upx; +} + +/* 乐豆 */ +.LeBeans{ + background: linear-gradient(to right,#F22D25,#FB6331); + position: relative; +} + +.goods3-margin-16 { + margin-right: 32upx; +} + +.goods3-margin-16 text { + position: relative; + top: -2upx; + font-size: 28upx; + margin-left: 6upx; +} + +.shop3-title-width { + width: 300upx; +} + +.store-containerIcon image { + width: 30upx; + height: 30upx; +} + +.coupon-progress { + width: 216upx; + height: 24upx; + background: rgba(255, 120, 120, .2); + border-radius: 12upx; +} + +.coupon-progress-already { + position: absolute; + left: 0; + right: 0; + top: 0; + background-color: #FF4444; + height: 100%; + border-radius: 12upx; + z-index: 2; + max-width: 100%; +} + +.rush-price-box { + margin-bottom: 14upx; +} + +.coupon-stk { + position: absolute; + width: 216upx; + height: 24upx; + left: 0; + top: 50%; + transform: translateY(-50%); + z-index: 3; +} + +.coupon-stk .shrink { + transform: scale(0.85); +} + +.coupon-btn { + position: absolute; + right: 20upx; + bottom: 24upx; + width: 130upx; + height: 50upx; + line-height: 50upx; + border-radius: 26upx; +} + +.qglist-i-t-bar { + height: 64upx; + line-height: 64upx; + padding-top: 66upx; + background: -webkit-linear-gradient(90deg, #FF7E42, #FB2F52); + background: linear-gradient(90deg, #FF7E42, #FB2F52); + border-radius: 140upx 0 0 140upx; + position: absolute; + top: -72upx; + right: 0upx; +} + +.qglist-i-t-bar-d { + display: -webkit-flex; + display: flex; + justify-content: flex-start; +} + +.qglist-i-t-bar-l { + color: #fff; + font-size: 28upx; + padding: 0 40upx 0 30upx; +} + +.qglist-i-t-bar-l .i { + font-size: 32upx; + vertical-align: -2upx; + margin-right: 8upx; + display: inline; +} + +.qglist-i-t-bar-l .em { + font-style: normal; + font-weight: 600; + display: inline; +} + +.qglist-i-t-bar-r { + padding: 10.8upx 20upx 10.8upx 0; +} + +.qglist-i-t-bar-r:after { + content: ""; + display: block; + clear: both; +} + +.qglist-i-t-bar-r .i { + width: 40upx; + height: 40upx; + margin-left: -16upx; + border-radius: 50%; + float: left; +} + +.qglist-i-t-bar-r .i .image { + width: 100%; + height: 100%; + border-radius: 50%; +} + +.Rank-logo { + position: absolute; + left: 0; + top: 0; + width: 120upx; + height: 50upx; + line-height: 50upx; + border-radius: 0 40upx 40upx 0; + background: #FF4040; + color: #FFFFFF; +} + +/* #ifdef H5 */ +.swiperBanner-marbtm /deep/ .uni-swiper-dots.uni-swiper-dots-horizontal { + /** + * 距离底部高度 + */ + margin-bottom: 0; +} + +.swiperBanner_dotsquare /deep/ .uni-swiper-dot { + border-radius: 0 !important; +} + +.swiperBanner_rectangle /deep/ .uni-swiper-dot { + width: 40upx; + border-radius: 0 !important; +} + +.swiperBanner_left /deep/ .uni-swiper-dots.uni-swiper-dots-horizontal { + left: 15% !important; +} + +.swiperBanner_right /deep/ .uni-swiper-dots.uni-swiper-dots-horizontal { + left: 85% !important; +} + +.swiperBanner-marbtm /deep/ .uni-swiper-dots.uni-swiper-dots-horizontal { + /** + * 距离底部高度 + */ + margin-bottom: 0; +} + +.swiperBanner_dotsquare { + border-radius: 0 !important; +} + +.swiperBanner_rectangle { + width: 40upx; + height: 20upx; + border-radius: 0 !important; +} + +.swiperBanner_left { + left: 8% !important; +} + +.swiperBanner_right { + right: 8% !important; + left: auto!important; +} + +/* #endif */ +.goods_img .rush_goods_mask{ + position: absolute; + left: 0; + right: 0; + top: 0; + background-color: rgba(0, 0, 0, .5); +} +.goods_img .rush_goods_mask .img{ + width: calc(100vw / 2.4); + height: calc(100vw / 2.47); + +} \ No newline at end of file diff --git a/common/js/app.js b/common/js/app.js new file mode 100644 index 0000000..6bc302f --- /dev/null +++ b/common/js/app.js @@ -0,0 +1,1392 @@ +/** + * tabBar页面路径列表 (用于链接跳转时判断) + * tabBarLinks为常量, 无需修改 + */ +import Store from "@/store" +import util from "@/common/js/util.js" +// #ifdef H5 +import wxApi from "@/common/js/wxApi.js" +// import manifest from "@/manifest.json" +// #endif +const tabBarLinks = [ + 'pages/mainPages/index/index', + 'pages/mainPages/headline/index', + 'pages/mainPages/userCenter/userCenter', + 'pages/mainPages/index/diypage?type=1', + 'pages/mainPages/index/diypage?type=2', + 'pages/mainPages/index/diypage?type=3', + 'pages/mainPages/index/diypage?type=4', + 'pages/mainPages/index/diypage?type=5', + 'pages/mainPages/index/diypage?type=6', + 'pages/mainPages/index/diypage?type=7' +]; +const Base64 = util.Base64; + +// 工具类 + +let App = { + /** + * 全局变量 + */ + globalData: { + user_id: null, + }, + // api地址 + api_root: '', + scanCode: false, + aid: '', + // 图片地址 + img_root: '', + imgfix: '', + + siteInfo: {}, + postData: {}, + loginstate:false, + base:null, + routers:null, + languageStatus:0, + /** + * 设置项目基础信息 + */ + setSiteInfo() { + // uni.setStorageSync('head_id', '24') + let version = require("@/siteinfo.json"); + this.base = version.base; + this.routers = version.routers; + // #ifdef H5 + let url = location.href, + uniacid; + if (process.env.NODE_ENV === 'development') { + uni.setStorageSync("uniacid", 1); + this.siteInfo = { + "siteroot": "https://citydev.weliam.com.cn", + "uniacid": "1", + "name": "weliam_smartcity", + "weliamv": "1.0.0" + }; + } else { + if (location.href.indexOf("/h5/?#/pages/") === -1) { + let reg = new RegExp("\/h5/.*?\#/"); + url = url.replace(reg, "/h5/#/"); + } + //获取当前请求域名 + + uniacid = util.getParams("i", url.split("#")[1], true); + let siteroot = location.protocol + "//" + location.hostname, + sitetoken = App.getClientType(), + name = location.href.split('/addons/')[1].split('/h5/')[0], + token = (sitetoken == 1) ? App.getCookie("weliam_user_token") : uni.getStorageSync('weliam_user_token'), + head_id = (location.href.indexOf("&token") === -1 ? location.href.split("head_id=")[1] : location.href.split("&")[ + 1].split("head_id=")[1]) || ""; + let head_ids = head_id.split("&")[0]; + if (head_id && !!head_id) { + // debugger + uni.setStorageSync('head_id', head_ids); + uni.setStorageSync('dating_head_id', head_ids); + }; + + this.siteInfo = { + siteroot, + name, + uniacid, + weliamv: version.weliamv, + token + } + url = url.split("&token=")[0]; + history.replaceState(null, null, `${this.base}#` + url.split("#")[1]); + } + if(url.indexOf('pages/mainPages/postDetails/postDetails') != -1){ + // + let urls = url.split('/#/')[1]; + urls = urls.replace('mainPages', "subPages"); + this.navigationTo({ + url:urls + }); + return + } + // #endif + // #ifndef H5 + this.siteInfo = version; + // #endif + this.imgfix = uni.getStorageSync('imgPrefix'); + }, + + /** + * 设置api地址 + */ + setAppRoot(aids) { + this.aid = aids + ','; + let App = this, + siteroot = null, + postData = { + source: "1", + mode: "2", + }, + weliam_user_token = this.getCookie("weliam_user_token"); + siteroot = this.siteInfo.siteroot + `${this.routers}`; + + this.aid = this.aid.replace(/,/g, ''); + this.api_root = siteroot + 'uniapp.php?i=' + this.siteInfo.uniacid + (!!this.siteInfo.token ? '&token=' + + this.siteInfo.token : ''); + if (this.api_root.indexOf('aid') === -1) { + this.api_root + '&aid=' + this.aid; + } + this.img_root = this.siteInfo.siteroot + `${this.base}/resource/image/`; + this.img_root_new = this.siteInfo.siteroot + `addons/weliam_smartcity/data/img/`; + let apiObj = this.urlToObj(this.api_root); + if (!!apiObj.token && apiObj.token !== "undefined") { + uni.setStorageSync('weliam_user_token', apiObj.token) + } else { + // this._post_form('&p=member&do=login&source=1&mode=2', {}, (res) => { + // console.log(res); + // }); + } + }, + /** + * 小程序启动场景 + */ + onStartupScene(query) { + if (query && !!query.head_id) { + // debugger + uni.setStorageSync('head_id', query.head_id); + uni.setStorageSync('dating_head_id', query.head_id); + } + }, + /** + * 获取小程序信息 + */ + updateAppInfo() { + let App = this; + App._post_form('&do=GetPlatformInfor', {}, function(result) { + Store.commit("APPINFO", result.data); + App.languageStatus = result.data.languageStatus; + uni.setStorage({ + key: 'phone', + data: result.data.phone, + success: function() {} + }); + uni.removeStorageSync('platformInfor'); + uni.setStorage({ + key: 'platformInfor', + data: result.data, + success: function() {} + }); + }); + }, + + //更新提示 + up(){ + const updateManager = uni.getUpdateManager(); + + updateManager.onCheckForUpdate(function (res) { + // 请求完新版本信息的回调 + console.log(res.hasUpdate); + }); + + updateManager.onUpdateReady(function (res) { + uni.showModal({ + title: '更新提示', + content: '新版本已经准备好,是否重启应用?', + success(res) { + if (res.confirm) { + // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 + updateManager.applyUpdate(); + } + } + }); + + }); + + updateManager.onUpdateFailed(function (res) { + // 新的版本下载失败; + uni.showModal({ + title: '升级失败', + content: '新版本下载失败,请检查网络!', + showCancel: false + }); + }); + + }, + + //获取用户设置 + userSettings(){ + let App = this; + App._post_form('&do=CustomerService', {}, function(result) { + uni.removeStorageSync('CustomerService'); + uni.removeStorageSync('btnleftAndbottom'); + let ratio; + uni.getSystemInfo({ + success: function(wh) { + ratio = wh.windowWidth / result.data.imgstyle.width; + } + }); + let imgstyle = { //imgstyle为根据接口获取用户设置的宽高,根据设备进行比例转换,以达到无论多少宽高都要占满宽度。 + width:ratio * result.data.imgstyle.width, + height:ratio * result.data.imgstyle.height + }; + uni.setStorageSync('imgstyle',imgstyle); + + + let ratios; + uni.getSystemInfo({ + success: function(wh) { + ratios = wh.windowWidth / result.data.listimgstyle.width; + } + }); + //listimgstyle应用场景为内部页面的轮播图 + let listimgstyle = { + width:ratios * result.data.listimgstyle.width, + height:ratios * result.data.listimgstyle.height + }; + uni.setStorageSync('listimgstyle',listimgstyle); + uni.setStorageSync('CustomerService',result.data); + }); + }, + //SDK经纬度获取 + wxApiCallback(path) { + let _this = this; + uni.removeStorageSync('memberCityAreaid'); + // #ifdef H5 + wxApi.wxRegister(() => { + jWeixin.getLocation({ + type: 'gcj02', + success: function(res) { + uni.setStorageSync('curLoction', res); + let data = { + aid: this.aid, + lat: res.latitude, + lng: res.longitude + } + let curtimestamp = new Date().getTime(); //当前时间 + let lastredpackeTime = uni.getStorageSync('locationGetTime'); // 最后次时间; + let now_packetTime = !!lastredpackeTime ? ((curtimestamp - lastredpackeTime) / 1000 / 60 % 60) : ""; + if(!!now_packetTime && now_packetTime < 2) return + if(path == 'pages/mainPages/index/index'){ + _this._post_form('&do=Aidtip', data, (reource) => { + if(reource.data.status == 1){ + _this.showError( + `定位到您在${reource.data.memberCityName},是否切换到该地区?`, + data => { + if (data.confirm) { + uni.setStorageSync('memberCityAreaid',reource.data.memberCityAreaid); + _this.setAppRoot(reource.data.memberCityAid); + App.navigationToH5(false,`${this.base}#/?i=${_this.siteInfo.uniacid}&aid=${reource.data.memberCityAid}`); + window.location.reload(); + }else{ + let timestamp = (new Date()).getTime(); + uni.setStorageSync('locationGetTime', timestamp) + } + }, + true + ); + } + return + }) + } + } + }); + }) + // #endif + // #ifndef H5 + App.getLocation().then(res => { + let data = { + aid: this.aid, + lat: res.latitude, + lng: res.longitude + } + let curtimestamp = new Date().getTime(); //当前时间 + let lastredpackeTime = uni.getStorageSync('locationGetTime'); // 最后时间; + let now_packetTime = !!lastredpackeTime ? ((curtimestamp - lastredpackeTime) / 1000 / 60 % 60) : ""; + if(!!now_packetTime && now_packetTime < 2) return + if(path == 'pages/mainPages/index/index'){ + _this._post_form('&do=Aidtip', data, (reource) => { + uni.setStorageSync('curLoction', res); + if(reource.data.status == 1){ + _this.showError( + `定位到您在${reource.data.memberCityName},是否切换到该地区?`, + data => { + if (data.confirm) { + uni.setStorageSync('memberCityAreaid',reource.data.memberCityAreaid); + _this.setAppRoot(reource.data.memberCityAid); + App.navigationTo({ + url: 'pages/mainPages/index/index' + }); + }else{ + let timestamp = (new Date()).getTime(); + uni.setStorageSync('locationGetTime', timestamp) + } + }, + true + ); + } + + }) + } + }) + // #endif + }, + + /** + * 跳转链接转换 + */ + navgatetoLink() { + let App = this; + App._post_form('&do=TransformationLink', {}, (res) => { + uni.setStorageSync('pagelinkList', res.data); + }) + }, + getCookie(cookieName) { + // #ifdef H5 + let cookies = document.cookie, + cookiesArr = cookies.split(";"); + for (let i = 0; i < cookiesArr.length; i++) { + let arr = cookiesArr[i].split("="); + arr[0] = arr[0].replace(/ /g, '') + if (arr[0] === cookieName) { + return arr[1]; + } + } + return ""; + // #endif + return ""; + }, + getuserToken() { + return uni.getStorageSync('weliam_user_token') + }, + /** + * 获取tabBar页面路径列表 + */ + getTabBarLinks() { + return tabBarLinks; + }, + /** + * 执行用户登录 + */ + doLogin() { + // 保存当前页面 + let App = this, + clientType = App.getClientType(), + pages = getCurrentPages(), + + url = ""; + // if(App.loginstate){ + + // // return + // } + if (pages.length > 0) { + let currentPage = pages[pages.length - 1], + pageOptions = (clientType === "1" || clientType === "2" ? currentPage : currentPage.$vm).$mp.query; + ("pages/mainPages/login/login" != currentPage.route) && uni.setStorageSync("currentPage", { + route: currentPage.route, + options: pageOptions + }); + } + // // 跳转授权页面 + // if (clientType === "2") { + // url = "pages/mainPages/login/login" + // } else if(clientType === "3") { + // url = "pages/mainPages/login/minLogin" + // } + App.navigationTo({ + url + }); + }, + + /** + * 微信公众号登陆 + */ + openWxLogin(Navurl) { + let App = this; + // #ifdef H5 + location.href = Navurl; + // #endif + }, + /** + * 判断当前客户端类型 + */ + getClientType() { + // 1 公众号 2h5 3微信 + // #ifdef MP-WEIXIN + return "3"; + // #endif + + // #ifdef H5 + let ua = navigator.userAgent.toLowerCase(); //获取判断用的对象 + if (ua.match(/MicroMessenger/i) == "micromessenger") { + return "1"; + } + return "2"; + // #endif + + //#ifdef APP-PLUS + return "3"; + //#endif + }, + + // 获取浏览器内核版本号 + + getBrowser(n) { + // #ifdef H5 + let ua = navigator.userAgent.toLowerCase(), + s, + name = '', + ver = 0; + //探测浏览器 + (s = ua.match(/msie ([\d.]+)/)) ? _set("ie", _toFixedVersion(s[1])): + (s = ua.match(/firefox\/([\d.]+)/)) ? _set("firefox", _toFixedVersion(s[1])) : + (s = ua.match(/chrome\/([\d.]+)/)) ? _set("chrome", _toFixedVersion(s[1])) : + (s = ua.match(/opera.([\d.]+)/)) ? _set("opera", _toFixedVersion(s[1])) : + (s = ua.match(/version\/([\d.]+).*safari/)) ? _set("safari", _toFixedVersion(s[1])) : 0; + + function _toFixedVersion(ver, floatLength) { + ver = ('' + ver).replace(/_/g, '.'); + floatLength = floatLength || 1; + ver = String(ver).split('.'); + ver = ver[0] + '.' + (ver[1] || '0'); + ver = Number(ver).toFixed(floatLength); + return ver; + } + + function _set(bname, bver) { + name = bname; + ver = bver; + } + return (n == 'n' ? name : (n == 'v' ? ver : name + ver)); + //getBrowser("n"); // 所获得的就是浏览器所用内核。 + //getBrowser("v");// 所获得的就是浏览器的版本号。 + //getBrowser();// 所获得的就是浏览器内核加版本号。 + // #endif + }, + + /** + * 验证是否存在user_info + */ + validateUserInfo() { + let user_info = uni.getStorageSync('userInfo'); + return !!uni.getStorageSync('userInfo'); + }, + + /** + * 显示成功提示框 + */ + showSuccess(msg, callback) { + uni.showToast({ + title: msg, + icon: 'success', + mask: true, + duration: 1500, + success() { + callback && (setTimeout(function() { + callback(); + }, 1500)); + } + }); + }, + + /** + * 显示失败提示框 + */ + showError(msg, callback, showCancel = false) { + uni.showModal({ + title: '友情提示', + content: msg, + showCancel: showCancel, + success(res) { + callback && callback(res); + } + }); + }, + + /** + * @param {Object} url 请求地址转换 + */ + transformUrl(url) { + return this.api_root + url; + }, + + /** + * get请求 + */ + _get(url, data, success, fail, complete) { + this.weRequest("GET", url, data, success, fail, complete); + }, + + /** + * post提交 + */ + _post_form(url, data, success, fail, complete) { + this.weRequest("POST", url, data, success, fail, complete); + }, + + weRequest(method, url, data, success, fail, complete) { + let App = this, + // uniacid = App.getUniacid(), + requestUrl = App.transformUrl(url), + pages = getCurrentPages(), + currentRegion = uni.getStorageSync('currentRegion'), + agencyData = uni.getStorageSync('agencyData'), + token = uni.getStorageSync('weliam_user_token'), + source = App.getClientType(), //1公众号 2H5 3微信小程序 + loginTimer = null; + // console.log(url.indexOf('&p=dating') == -1?requestUrl:requestUrl + '&dating_head_id=' + uni.getStorageSync('dating_head_id'),'当前请求'); + // 构造请求参数 + data = data || {}; + data.wxapp_id = App.siteInfo.uniacid; + data.aid = this.aid || agencyData.aid || ""; + data.token = uni.getStorageSync('weliam_user_token'); + data.source = source; + + // //#ifdef APP-PLUS + // data.source = "3"; + // //#endif + // //#ifdef H5 + // data.source = "4"; + // //#endif + uni.request({ + url:url.indexOf('&p=dating') == -1?requestUrl:requestUrl + '&dating_head_id=' + uni.getStorageSync('dating_head_id'), + header: { + 'content-type': method === "POST" ? "application/x-www-form-urlencoded" : "application/json", + }, + method: method, + data: data, + success(res) { + //#ifdef H5 + let post = requestUrl.split('&do=')[1]; + let local; + let onoption; + if(post == 'GetPlatformInfor'){ + if(location.href.indexOf(".cn/") != -1){ + local = location.href.split('.cn/')[0] + '.cn/'; + onoption = location.href.split('.cn/')[1]; + }else{ + local = location.href.split('.com/')[0] + '.com/'; + onoption = location.href.split('.com/')[1]; + } + if(res.data.data.targetDmain.length > 0){ + res.data.data.targetDmain.map(item=>{ + if(item == local){ + location.href = res.data.data.endDmain + onoption; + } + }) + } + // location.href = 'https://yys.163.com/' + // App.openWxLogin('www.baidu.com'); + }; + //#endif + + if (res.statusCode !== 200 || typeof res.data !== 'object') { + if(url == '&do=getItemParams') return + App.showError(`网络请求出错:${url}`, () => { + fail && fail(res); + }); + return false; + } + // + if (res.data.errno === 5 || res.data.message == "请先登录"){ + uni.showToast({ + title: '请先登录', + icon:'none' + }) + setTimeout(()=>{ + uni.navigateTo({ + url: '/pages/mainPages/login/minLogin' + }) + }, 2000) + } + if (res.data.errno === 2 || res.data.data.relogin == 1) { + uni.removeStorage('weliam_user_token'); + + if (pages.length > 0) { + // #ifdef H5 + + + if (source === "2") { + App.doLogin() + } else { + let currentPage = pages[pages.length - 1], + currentPageRoute = pages[pages.length - 1].route, + currentPageUrl, + pageQuery = currentPage.$mp.query, + referrer_id = pageQuery.head_id || App.siteInfo.head_id, + vueurl = currentPageRoute + '?' + App.urlEncode(pageQuery) + (!!referrer_id ? '&head_id=' + referrer_id : ""); + currentPageUrl = res.data.data.weChat_login + '&vueurl=' + encodeURIComponent(vueurl); + App.openWxLogin(currentPageUrl); + } + return false + // #endif + }else{ + App.doLogin() + } + } else if (res.data.errno === 0) { + success && success(res.data); + } else if (res.data.errno === 1) { + // debugger + let post = requestUrl.split('&do=')[1]; + if(post == 'phoneDecrypt'){ + fail && fail(res); + return false; + } + let type = uni.getStorageSync('TextSubstitution').flag074; + + //#ifdef MP-WEIXIN + let pages = getCurrentPages(), + + currentPageObj = pages[pages.length - 1], + currentPage = currentPageObj.route; + //#endif + //#ifdef H5 + let currentPage = location.href.split('?')[0].split('#/')[1]; + //#endif + + if(res.data.message == '请先绑定手机号' && type == 1 && currentPage != 'pages/subPages2/cleanCustom/bindingPhone'){ + // debugger + uni.showModal({ + showCancel:false, + content:res.data.message, + success() { + // debugger + App.navigationTo({ + url: 'pages/subPages2/cleanCustom/bindingPhone' + }); + } + }) + + return + } + // debugger + //判断是否为会员特供,从而转入会员开卡页面,因error皆为1无法判断,只能用文字判断 + if(res.data.message == '该商品会员特供,请先成为会员' || res.data.message == '当前商品为会员限定,请先成为会员!'|| res.data.message == '此商品会员特供,请先开通会员'){ + // debugger + uni.showModal({ + title:'温馨提示', + content:res.data.message, + success() { + if (res.confirm) { + App.navigationTo({ + url: 'pages/mainPages/memberCard/getMembership/getMembership?card=nhave' + }); + } else if (res.cancel) { + return + } + // debugger + + } + }) + + return + } + if (!!res.data.data.mergeflag) { + //错误回调函数 + fail && fail(res); + return false; + } else { + // + + // let postis = requestUrl.split('&do=')[1]; + // if(postis == 'useDiscountCard'){ + // App.navigationTo({}) + // } + // console.log(url); + // + if(url.indexOf('&p=distribution') != -1 && url.indexOf('&do=cashWithdrawalApply') == -1){ + if(url.indexOf('&do=applyCondition') != -1){ + return + }else if(url.indexOf('&do=disApply') != -1){ + + }else{ + if(res.data.data.mustmobile != 1){ + App.navigationTo({ + url: res.data.data.url, + navType: 'reLaunch' + }) + } + return false + } + + } + + // 相亲模块判断是否填写个人资料 + if(url.indexOf('&p=dating') != -1 && res.data.data.is_perfect == 1) { + App.showError(res.data.message, () => { + uni.reLaunch({ + url: '/pages/subPages2/blindDate/form/userInfo' + }) + }) + return + } + if(url.indexOf('&p=dating') != -1 && res.data.data.dating_is_matchmaker == 1) { + App.showError(res.data.message, () => { + uni.reLaunch({ + url: '/pages/subPages2/blindDate/form/matchmakerApply' + }) + }) + return + } + // 相亲模块动态列表会员专区时,非会员跳转到开通会员 或者详情页面查看资料会员失效时跳转至开通页面 + if( + (url.indexOf('&p=dating&do=dynamicList') != -1 && res.data.data.dating_is_vip == 1) || + (url.indexOf('p=dating&do=seeMemberInfo') != -1 && res.data.errno == 1) + ) { + App.showError(res.data.message,() => { + uni.reLaunch({ + url: '/pages/subPages2/blindDate/member/open' + }) + }) + return + } + + // 看不懂。。。 + App.showError(res.data.message, function() { + fail && fail(res); + if(res.data.message == '该商品会员特供,请先成为会员' || res.data.message == '当前商品为会员限定,请先成为会员!'){ + App.navigationTo({ + url: 'pages/mainPages/memberCard/getMembership/getMembership?card=nhave' + }); + return + } + uni.reLaunch({ + url: '/' + res.data.data.url + }) + }) + return false; + } + } else if (res.data.errno === 5 && !App.loginstate) { + // #ifdef MP-WEIXIN || APP-PLUS + App.doLogin(); + App.loginstate = true; + setTimeout(()=>{ + App.loginstate = false; + },1000) + // #endif + } + }, + fail(res) {}, + complete(res) { + complete && complete(res); + } + }); + }, + // 推荐人id + saveRefereeId() { + if (!!Store.state.recomid) { + return Store.state.recomid + } + }, + getImgUrl() { + let App = this; + let a = this.siteInfo.uniacid; + App._post_form('&do=GetimgPrefix', {}, res => { + App.imgfix = res.data.imgPrefix; + uni.setStorageSync('imgPrefix', res.data.imgPrefix); + return App.imgfix + }); + + }, + + + clipboard(data){ + const textarea = document.createElement('textarea'); + textarea.value = data; + textarea.readOnly = 'readOnly'; + document.body.appendChild(textarea); + textarea.select(); + textarea.setSelectionRange(0, data.length); + document.execCommand('copy'); + textarea.remove(); + textarea.style.display="none"; + uni.showToast({ + icon:'none', + title:'复制成功' + }) + }, + getSetInfo() { + let data = { + type:0 + } + uni.setStorageSync('getSetInfo',data); + let App = this; + App._post_form('&p=Im&do=getSetInfo', {}, res => { + console.log(res) + uni.setStorageSync('getSetInfo', res.data); + }); + + }, + getAreaId(location = "", cityname = "", areaid = "", callback, isSwitchCity = false) { + let memberCityAreaid = uni.getStorageSync('memberCityAreaid'); + let App = this, + pages = getCurrentPages(), + navType = pages.length > 1 ? 'reLaunch' : 'navigate', + + // requestData = { + // lat: !!location.lat ? (location.lat || location.latitude) : "", + // lng: !!location.lng ? (location.lng || location.longitude) : "", + // cityname, + // areaid, + // }; + + requestData = { + lat: location.lat || location.latitude || "", + lng: location.lng || location.longitude || "", + cityname, + areaid: areaid || memberCityAreaid + }; + App._post_form('&do=GetAid', requestData, res => { + this.aid = res.data.aid; + if (res.data.status === 1 || res.data.status === 2) { + let agencyData = { + areaname: res.data.areaname, + aid: "", + lat: res.data.lat, + lng: res.data.lng + }; + if (location) { + uni.setStorageSync('agencyData', res.data); + } else { + uni.setStorageSync('agencyData', agencyData); + } + + App.setAppRoot(agencyData.aid); + App.getImgUrl(); + App.navigationTo({ + url: `pages/mainPages/notOpen/notOpen?city_agent_status=${res.data.status}&city_agent_name=${res.data.name}&joinPhone=${res.data.phone}`, + navType + }) + return false; + } else if (res.data.status === 3) { + App.navigationTo({ + url: `pages/subPages/city/city`, + navType + }) + } else { + if (!isSwitchCity) { + uni.setStorageSync('agencyData', res.data); + App.setAppRoot(res.data.aid); + } + callback && callback(res) + } + }) + }, + wxShareInfo() { + let App = this; + App._post_form('&do=Shareinfo', {}, res => { + Store.commit('MPSHAREINFO', res.data) + }) + }, + dealershareInfo(callback, type = "11") { + let App = this; + App._post_form('&do=Shareinfo', { + type + }, res => { + callback && callback(res) + }) + }, + /** + * 清除登录缓存 + */ + removeCurrentPage() { + uni.removeStorageSync("currentPage"); + }, + /** + * 对象转URL + */ + urlEncode(data) { + var _result = []; + for (var key in data) { + var value = data[key]; + if (value.constructor == Array) { + value.forEach(function(_value) { + _result.push(key + "=" + _value); + }); + } else { + _result.push(key + '=' + value); + } + } + return _result.join('&'); + }, + /** + * url转对象 + */ + urlToObj(str) { + var obj = {}; + var arr1 = str.split("?"); + var arr2 = arr1[1].split("&"); + for (var i = 0; i < arr2.length; i++) { + var res = arr2[i].split("="); + obj[res[0]] = res[1]; + } + return obj; + }, + + /** + * 获取url参数 + */ + getQueryString(name,url) { + let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); + let r = url.substr(1).match(reg); + if (r != null) { + return unescape(r[2]); + } + return null; + 8 }, + /** + * 通用指定跳转链接方法 + * url:跳转链接 navType:{navigate,rediRect,reLaunch,wxParse富文本}跳转方法, pageUrl 是否使用接口路径 success跳转成功回调 + */ + navigationTo({ + url, + navType = 'navigate', + success + }) { + let App = this, + tabBarLinks = App.getTabBarLinks(), + isTabBar = tabBarLinks.includes(url), + pageUrl = url.indexOf('http') !== -1 || url.indexOf('./index') !== -1, + isprogram = url.indexOf('appid') !== -1 || url.indexOf('appurl') !== -1, + istel = url.indexOf('tel') !== -1, + indet = url.indexOf('indet') !== -1; + // #ifdef H5 + let pagetitle = uni.getStorageSync('TextSubstitution'); + document.title = pagetitle.sysname || '⁣​'; + // #endif + + // #ifndef H5 + // debugger + if (isprogram) { + let parmsArr = url.split(','), + appId = parmsArr[0].split('appid:')[1], + path = parmsArr[1].split('appurl:')[1]; + if (!!appId && !!path) { + uni.navigateToMiniProgram({ + appId, + path, + success(res) { + console.log('success', res) + // 打开成功 + }, + fail(err) { + console.log('err', err) + } + }) + } + }; + // #endif + if (istel) { + let tel = url.split("tel:")[1]; + uni.makePhoneCall({ + phoneNumber: tel + }) + }; + if (navType === 'wxParse') { + location.href = url + }; + if (pageUrl) { + // #ifndef H5 + url = encodeURIComponent(url) + uni.redirectTo({ + url: `/pages/subPages/webview/webview?urlsrc=${url}` + }); + // #endif + // #ifdef H5 + let pagelink_list = uni.getStorageSync('pagelinkList'), + isPageIndex = url.indexOf('./index') !== -1, + isParms = url.indexOf('?') !== -1; + + if (isParms) { + let params = App.urlToObj(url), + pageLine_name = `${params.p}/${params.ac}/${params.do}`; + if (!!params['p'] && !!params['ac'] && !!params['do']) { + for (let key in pagelink_list) { + let isPage_link = pageLine_name.indexOf(key) !== -1; + if (isPage_link) { + let navUrl = pagelink_list[pageLine_name], + newParams = params; + delete newParams['p']; + delete newParams['ac']; + delete newParams['do']; + delete newParams['c']; + delete newParams['m']; + navUrl += (navUrl.indexOf("?") !== -1 ? "&" : "?") + App.urlEncode(newParams); + // tabBar页面 + + if (isTabBar) { + + uni.redirectTo({ + url: '/' + navUrl + }) + } else { + // 普通页面 + uni.navigateTo({ + url: '/' + navUrl + }); + } + } + } + } else { + location.href = url + } + } else { + App.navigationToH5(isPageIndex, url) + } + // #endif + } else { + // #ifdef H5 + if (url.indexOf("i=") === -1) { + url += (url.indexOf("?") !== -1 ? "&i=" : "?i=") + App.siteInfo.uniacid; + } + // #endif + if (navType === 'navigate') { + if (isTabBar) { + uni.redirectTo({ + url: '/' + url + }) + } else { + // 普通页面 + uni.navigateTo({ + url: '/' + url + }); + } + } else if (navType === 'rediRect') { + uni.redirectTo({ + url: '/' + url, + success + }) + } else if (navType === 'reLaunch') { + uni.reLaunch({ + url: '/' + url, + success + }) + } + } + }, + // h5跳转 + navigationToH5(isPageIndex, url) { + let App = this; + // debugger + if (isPageIndex) { + // #ifdef H5 + let pageIndexUrl = `${App.api_root}${url.split("./")[1]}`; + location.href = pageIndexUrl + // #endif + } else { + // #ifdef H5 + location.href = url + // #endif + } + }, + /** + * 记录formId + */ + saveFormId(temp_type) { + let App = this; + App._post_form('&do=TempId', { + temp_type + }, res => { + let formList = res.data, + idsArray = []; + if (formList.length > 0) { + formList.map((val => { + idsArray.push(val.temp_id) + })) + let encodeFormList = JSON.stringify(formList), + base = new Base64, + encodeStr = base.encode(encodeFormList); + uni.requestSubscribeMessage({ + tmplIds: idsArray, + success(idsres) { + let tmpIdsArray = []; + for (let [key, val] of Object.entries(idsres)) { + if (val === 'accept') { + tmpIdsArray.push(key) + } + } + App._post_form('&do=SetFromId', { + form_id: tmpIdsArray, + info: encodeStr + }, res => { + console.log(res) + }); + }, + fail(err) { + console.log(err) + } + }) + } + }) + }, + //浏览器上传图片 + browser_upload(number = 1){ + return new Promise((resolve, reject) => { + let imageData; + uni.chooseImage({ + count: number, //默认9 + sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album','camera'], //从相册选择 + success: function (res) { + // let imageData = await App._upLoad(filePaths); + // return + resolve(res) + } + }); + }) + + }, + //上传图片 + _upLoad(url) { + let App = this; + return new Promise((resolve, reject) => { + uni.uploadFile({ + url: App.api_root + '&do=uploadFiles', + filePath: url, + fileType: "image", + name: 'file', + success(res) { + console.log(res, 'success') + if (res.statusCode !== 200 || typeof res.data !== 'string') { + App.showError('网络请求出错'); + return false; + } else { + if (res.code === 0) { + App.showError(res.data.msg); + return false; + } else { + resolve(JSON.parse(res.data)); + } + } + }, + fail(res) { + console.log(res, 'fail') + uni.hideLoading(); + uni.showModal({ + title: "上传失败", + content: JSON.stringify(res), + showCancel: false + }); + reject(); + }, + complete() { + uni.hideToast(); //隐藏Toast + } + }) + }); + }, + _MYupLoad(url) { + let App = this; + return new Promise((resolve, reject) => { + uni.uploadFile({ + url: App.api_root + '&do=StudentUploadFiles', + filePath: url, + fileType: "image", + name: 'file', + success(res) { + if (res.statusCode !== 200 || typeof res.data !== 'string') { + App.showError('网络请求出错'); + return false; + } else { + if (res.code === 0) { + App.showError(res.data.msg); + return false; + } else { + resolve(JSON.parse(res.data)); + } + } + }, + fail(res) { + uni.hideLoading(); + uni.showModal({ + title: "上传失败", + content: JSON.stringify(res), + showCancel: false + }); + reject(); + }, + complete() { + uni.hideToast(); //隐藏Toast + } + }) + }); + }, + /** + * 获取当前页面栈 + */ + getCurrentPage() { + //1-导入 2-微信小程序 3-H5 4-公众号 5-安卓 6-苹果 7-渠道1小程序 8-百度小程序 9-头条小程序 + let App = this, + pages = getCurrentPages(), + clientType = App.getClientType(), + currentPage = pages[pages.length - 1], + pageInstance = null; + if (clientType === "2" || clientType === "7" || clientType === "9") { + pageInstance = currentPage.$vm; + } else if (clientType === "3" || clientType === "4") { + pageInstance = currentPage; + } else { + pageInstance = currentPage.rootVM; + } + return pageInstance; + }, + + /** + * 全屏加载 + */ + // showLoading() { + // let App = this, + // page = App.getCurrentPage(); + // !!page.$refs.loading && page.$refs.loading.showLoading(); + // }, + // hideLoading(time = 500) { + // let App = this, + // page = App.getCurrentPage(); + // setTimeout(() => { + // !!page.$refs.loading && page.$refs.loading.hideLoading(); + // }, time); + // }, + + /** + * 获取当前经纬度 + */ + getLocation() { + let App = this, + clientType = App.getClientType(); + return new Promise((resolve, reject) => { + let LocationType = clientType === "3" ? uni : wxApi; + LocationType.getLocation({ + type: "gcj02", // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' + success(res) { + resolve(res); + }, + fail(res) { + resolve({ + latitude: "", + longitude: "" + }); + }, + complete(res) { + console.log(res); + } + }); + }) + }, + /** + * 查看位置 + */ + openLocation(options) { + let App = this; + if (!!options.location) { + // let gps = util.baidu_To_qq(options.latitude, options.longitude); + uni.openLocation({ + name: options.storename, + address: options.address, + latitude: Number(options.location.lat), + longitude: Number(options.location.lng), + success() { + options.success && options.success(); + } + }); + } else { + App.showError("经纬度信息不完整,请确认后重试"); + } + }, + + /** + * 商品富文本数据切割,避免一次性加载数据量超大 + * @param {type} + */ + // wxParseLazyLoad(padding = 0, content, dataKey) { + // //商品富文本数据切割,避免一次性加载数据量超大 + // let sliceLen = 20, //懒加载数据切割长度 + // currentPage = this.getCurrentPage(), + // transData = {}, //存放转化后的数据 + // bindData = {}, //存放当前绑定的数据 + // nodePage = 0, + // nodesList = [], + // imageProp = { + // mode: 'aspectFit', + // padding, + // lazyLoad: false, + // domain: '', + // }; + // transData = HtmlToJson(content, {}, imageProp); + // if (transData.nodes.length > sliceLen) { + // let nodes = transData.nodes; + // for (let i = 0, len = nodes.length; i < len; i += sliceLen) { + // nodesList.push(nodes.slice(i, i + sliceLen)); + // } + // bindData.imageUrls = transData.imageUrls; + // bindData.nodes = nodesList[0]; + // } else { + // bindData = transData; + // } + // currentPage[dataKey] = bindData; + // if (nodesList.length > 0) { + // for (let i = 1; i < nodesList.length; i++) { + // setTimeout(() => { + // currentPage[dataKey].nodes.push(...nodesList[i]); + // }, 800); + // } + // } + // }, + + // 获取地址和个人信息 + getInt() { + let _this = this, + user_token = uni.getStorageSync('weliam_user_token'); + if (user_token && !!user_token) { + _this._post_form('&p=member&do=memberInfo', {}, res => { + uni.setStorageSync('userinfo', res.data); + }); + }; + + if (uni.getStorageSync('cityList') == undefined || uni.getStorageSync('cityList') == '') { + let data = {} + _this._post_form('&do=CityInfo', data, res => { + uni.setStorageSync('cityList', res.data); + }) + } + // #ifdef H5 + let pagetitle = uni.getStorageSync('TextSubstitution'); + document.title = pagetitle.sysname || '⁣​'; + // #endif + _this._post_form('&do=TextSubstitution', {}, res => { + uni.setStorageSync('TextSubstitution', res.data); + // #ifndef H5 + let pages = getCurrentPages(), + curPage = pages[pages.length - 1], + filterList = [ + 'pages/mainPages/Settled/Settled', + 'pages/subPages/merchant/sendDynamic/sendDynamic', + 'pages/subPages/postRelease/postRelease', + 'pages/mainPages/comment/comment' + ]; + if (res.data.examineing === "1") { + Store.commit("ISWXAUDIT", false); + if (!!curPage && filterList.includes(curPage.route)) { + _this.navigationTo({ + url: 'pages/mainPages/index/index', + navType: 'reLaunch' + }) + } + } + if(res.data.sysname && curPage.route.indexOf('pages/subPages2/redClothes/redClothes') == -1){ + // 不需要吧 + // uni.setNavigationBarTitle({ + // title: res.data.sysname + // }); + } + // #endif + + // #ifdef H5 + let locations = location.href; + if(res.data.sysname && locations.indexOf('pages/subPages2/redClothes/redClothes') == -1){ + console.log('app.js执行',res.data.sysname) + // uni.setNavigationBarTitle({ + // title: + // }); + document.title = res.data.sysname + } + // #endif + }) + } +} +export default { + ...App +} diff --git a/common/js/ms-openMap/openMap.js b/common/js/ms-openMap/openMap.js new file mode 100644 index 0000000..ff3abcf --- /dev/null +++ b/common/js/ms-openMap/openMap.js @@ -0,0 +1,96 @@ +import TransformCoordinate from './transformCoordinate.js' +function openMapByDefault(latitude, longitude, name) { + uni.openLocation({ + latitude: latitude, + longitude: longitude, + name: name, + fail: () => { + uni.showModal({ + content: '打开地图失败,请重试' + }) + }, + }) +} +function openMapByAndroid(latitude, longitude, name) { + let url = ''; // 回调地址 + let identity = ''; // 程序名称 + if(plus.runtime.isApplicationExist({pname: 'com.baidu.BaiduMap'})) { // baidumap + url = `baidumap://map/marker?location=${latitude},${longitude}&title=${name}&coord_type=gcj02&src=andr.baidu.openAPIdemo` + identity = 'com.baidu.BaiduMap' + openURL(url, identity) + } + else if(plus.runtime.isApplicationExist({pname: 'com.autonavi.minimap'})) { // 高德 + url = `androidamap://viewMap?sourceApplication=appname&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0` + identity = 'com.autonavi.minimap' + openURL(url, identity) + } + else { + openMapByDefault(latitude, longitude, name) + } +} +function openMapByIos(latitude, longitude, name) { + let url = ''; // 回调地址 + let errorCB = ''; // url失败的回调地址 + let identity = ''; // 程序名称 + + if(plus.runtime.isApplicationExist({action: 'baidumap://'})) { // baidumap + url = `baidumap://map/marker?location=${latitude},${longitude}&title=${name}&content=${name}&src=ios.baidu.openAPIdemo&coord_type=gcj02`; + openURL(url, identity) + } + else if(plus.runtime.isApplicationExist({action: 'iosamap://'})) { // 高德 + url = `iosamap://viewMap?sourceApplication=applicationName&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0` + openURL(url, identity) + } + else { + openMapByDefault(latitude, longitude, name) + } +} +function openURL(url, identity ) { + let newurl = encodeURI(url); + plus.runtime.openURL( newurl, function(res){ + uni.showModal({ + content: res.message + }) + }, identity); +} +function getCoordByType(longitude, latitude, coord_type) { + switch (coord_type){ + case 'gcj02': + return [longitude, latitude] + break; + case 'bd09': + return TransformCoordinate.bd09togcj02(longitude, latitude) + break; + case 'wgs84': + return TransformCoordinate.wgs84togcj02(longitude, latitude) + break; + default: + return [longitude, latitude] + break; + } +} +export default { + /* 打开地图 */ + openMap(latitude, longitude, name, coord_type='gcj02') { + let arr = getCoordByType(longitude, latitude, coord_type) + // #ifdef APP-PLUS + switch(uni.getSystemInfoSync().platform){ + case 'android': + console.log('运行Android上') + openMapByAndroid(arr[1], arr[0], name) + break; + case 'ios': + console.log('运行iOS上') + openMapByIos(arr[1], arr[0], name) + break; + default: + openMapByDefault(arr[1], arr[0], name) + console.log('运行在开发者工具上') + break; + } + // #endif + // #ifndef APP-PLUS + openMapByDefault(arr[1], arr[0], name) + // #endif + } +} \ No newline at end of file diff --git a/common/js/ms-openMap/transformCoordinate.js b/common/js/ms-openMap/transformCoordinate.js new file mode 100644 index 0000000..425c296 --- /dev/null +++ b/common/js/ms-openMap/transformCoordinate.js @@ -0,0 +1,126 @@ +/** + * Created by Wandergis on 2015/7/8. + * 提供了百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换 + */ + +//定义一些常量 +var x_PI = 3.14159265358979324 * 3000.0 / 180.0; +var PI = 3.1415926535897932384626; +var a = 6378245.0; +var ee = 0.00669342162296594323; + +/** + * 百度坐标系 (BD-09) 与 火星坐标系 (GCJ-02)的转换 + * 即 百度 转 谷歌、高德 + * @param bd_lon + * @param bd_lat + * @returns {*[]} + */ +function bd09togcj02(bd_lon, bd_lat) { + var x_pi = 3.14159265358979324 * 3000.0 / 180.0; + var x = bd_lon - 0.0065; + var y = bd_lat - 0.006; + var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi); + var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi); + var gg_lng = z * Math.cos(theta); + var gg_lat = z * Math.sin(theta); + return [gg_lng, gg_lat] +} + +/** + * 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换 + * 即谷歌、高德 转 百度 + * @param lng + * @param lat + * @returns {*[]} + */ +function gcj02tobd09(lng, lat) { + var z = Math.sqrt(lng * lng + lat * lat) + 0.00002 * Math.sin(lat * x_PI); + var theta = Math.atan2(lat, lng) + 0.000003 * Math.cos(lng * x_PI); + var bd_lng = z * Math.cos(theta) + 0.0065; + var bd_lat = z * Math.sin(theta) + 0.006; + return [bd_lng, bd_lat] +} + +/** + * WGS84转GCj02 + * @param lng + * @param lat + * @returns {*[]} + */ +function wgs84togcj02(lng, lat) { + if (out_of_china(lng, lat)) { + return [lng, lat] + } + else { + var dlat = transformlat(lng - 105.0, lat - 35.0); + var dlng = transformlng(lng - 105.0, lat - 35.0); + var radlat = lat / 180.0 * PI; + var magic = Math.sin(radlat); + magic = 1 - ee * magic * magic; + var sqrtmagic = Math.sqrt(magic); + dlat = (dlat * 180.0) / ((a * (1 - ee)) / (magic * sqrtmagic) * PI); + dlng = (dlng * 180.0) / (a / sqrtmagic * Math.cos(radlat) * PI); + var mglat = lat + dlat; + var mglng = lng + dlng; + return [mglng, mglat] + } +} + +/** + * GCJ02 转换为 WGS84 + * @param lng + * @param lat + * @returns {*[]} + */ +function gcj02towgs84(lng, lat) { + if (out_of_china(lng, lat)) { + return [lng, lat] + } + else { + var dlat = transformlat(lng - 105.0, lat - 35.0); + var dlng = transformlng(lng - 105.0, lat - 35.0); + var radlat = lat / 180.0 * PI; + var magic = Math.sin(radlat); + magic = 1 - ee * magic * magic; + var sqrtmagic = Math.sqrt(magic); + dlat = (dlat * 180.0) / ((a * (1 - ee)) / (magic * sqrtmagic) * PI); + dlng = (dlng * 180.0) / (a / sqrtmagic * Math.cos(radlat) * PI); + mglat = lat + dlat; + mglng = lng + dlng; + return [lng * 2 - mglng, lat * 2 - mglat] + } +} + +function transformlat(lng, lat) { + var ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * Math.sqrt(Math.abs(lng)); + ret += (20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0 / 3.0; + ret += (20.0 * Math.sin(lat * PI) + 40.0 * Math.sin(lat / 3.0 * PI)) * 2.0 / 3.0; + ret += (160.0 * Math.sin(lat / 12.0 * PI) + 320 * Math.sin(lat * PI / 30.0)) * 2.0 / 3.0; + return ret +} + +function transformlng(lng, lat) { + var ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * Math.sqrt(Math.abs(lng)); + ret += (20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0 / 3.0; + ret += (20.0 * Math.sin(lng * PI) + 40.0 * Math.sin(lng / 3.0 * PI)) * 2.0 / 3.0; + ret += (150.0 * Math.sin(lng / 12.0 * PI) + 300.0 * Math.sin(lng / 30.0 * PI)) * 2.0 / 3.0; + return ret +} + +/** + * 判断是否在国内,不在国内则不做偏移 + * @param lng + * @param lat + * @returns {boolean} + */ +function out_of_china(lng, lat) { + return (lng < 72.004 || lng > 137.8347) || ((lat < 0.8293 || lat > 55.8271) || false); +} + +export default { + bd09togcj02: bd09togcj02, // 百度坐标系 (BD-09) 与 火星坐标系 (GCJ-02)的转换 + gcj02tobd09: gcj02tobd09, // 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换 + wgs84togcj02: wgs84togcj02, // + gcj02towgs84: gcj02towgs84, +} \ No newline at end of file diff --git a/common/js/pageListMixin.js b/common/js/pageListMixin.js new file mode 100644 index 0000000..690e032 --- /dev/null +++ b/common/js/pageListMixin.js @@ -0,0 +1,22 @@ +let mixin = { + data() { + return { + showTopBtn: false, + pageScroll: 0, + } + }, + methods: { + + }, + /** + * 显示/隐藏 返回顶部按钮 + */ + onPageScroll({scrollTop}) { + let _this = this; + _this.$util.debounce(200,()=>{ + _this.pageScroll = scrollTop; + }) + }, +} + +export default mixin diff --git a/common/js/qqmap-wx-jssdk.min.js b/common/js/qqmap-wx-jssdk.min.js new file mode 100644 index 0000000..8fa1477 --- /dev/null +++ b/common/js/qqmap-wx-jssdk.min.js @@ -0,0 +1 @@ +var ERROR_CONF = { KEY_ERR: 311, KEY_ERR_MSG: 'key格式错误', PARAM_ERR: 310, PARAM_ERR_MSG: '请求参数信息有误', SYSTEM_ERR: 600, SYSTEM_ERR_MSG: '系统错误', WX_ERR_CODE: 1000, WX_OK_CODE: 200 }; var BASE_URL = 'https://apis.map.qq.com/ws/'; var URL_SEARCH = BASE_URL + 'place/v1/search'; var URL_SUGGESTION = BASE_URL + 'place/v1/suggestion'; var URL_GET_GEOCODER = BASE_URL + 'geocoder/v1/'; var URL_CITY_LIST = BASE_URL + 'district/v1/list'; var URL_AREA_LIST = BASE_URL + 'district/v1/getchildren'; var URL_DISTANCE = BASE_URL + 'distance/v1/'; var URL_DIRECTION = BASE_URL + 'direction/v1/'; var MODE = { driving: 'driving', transit: 'transit' }; var EARTH_RADIUS = 6378136.49; var Utils = { safeAdd(x, y) { var lsw = (x & 0xffff) + (y & 0xffff); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xffff) }, bitRotateLeft(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)) }, md5cmn(q, a, b, x, s, t) { return this.safeAdd(this.bitRotateLeft(this.safeAdd(this.safeAdd(a, q), this.safeAdd(x, t)), s), b) }, md5ff(a, b, c, d, x, s, t) { return this.md5cmn((b & c) | (~b & d), a, b, x, s, t) }, md5gg(a, b, c, d, x, s, t) { return this.md5cmn((b & d) | (c & ~d), a, b, x, s, t) }, md5hh(a, b, c, d, x, s, t) { return this.md5cmn(b ^ c ^ d, a, b, x, s, t) }, md5ii(a, b, c, d, x, s, t) { return this.md5cmn(c ^ (b | ~d), a, b, x, s, t) }, binlMD5(x, len) { x[len >> 5] |= 0x80 << (len % 32); x[((len + 64) >>> 9 << 4) + 14] = len; var i; var olda; var oldb; var oldc; var oldd; var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; for (i = 0; i < x.length; i += 16) { olda = a; oldb = b; oldc = c; oldd = d; a = this.md5ff(a, b, c, d, x[i], 7, -680876936); d = this.md5ff(d, a, b, c, x[i + 1], 12, -389564586); c = this.md5ff(c, d, a, b, x[i + 2], 17, 606105819); b = this.md5ff(b, c, d, a, x[i + 3], 22, -1044525330); a = this.md5ff(a, b, c, d, x[i + 4], 7, -176418897); d = this.md5ff(d, a, b, c, x[i + 5], 12, 1200080426); c = this.md5ff(c, d, a, b, x[i + 6], 17, -1473231341); b = this.md5ff(b, c, d, a, x[i + 7], 22, -45705983); a = this.md5ff(a, b, c, d, x[i + 8], 7, 1770035416); d = this.md5ff(d, a, b, c, x[i + 9], 12, -1958414417); c = this.md5ff(c, d, a, b, x[i + 10], 17, -42063); b = this.md5ff(b, c, d, a, x[i + 11], 22, -1990404162); a = this.md5ff(a, b, c, d, x[i + 12], 7, 1804603682); d = this.md5ff(d, a, b, c, x[i + 13], 12, -40341101); c = this.md5ff(c, d, a, b, x[i + 14], 17, -1502002290); b = this.md5ff(b, c, d, a, x[i + 15], 22, 1236535329); a = this.md5gg(a, b, c, d, x[i + 1], 5, -165796510); d = this.md5gg(d, a, b, c, x[i + 6], 9, -1069501632); c = this.md5gg(c, d, a, b, x[i + 11], 14, 643717713); b = this.md5gg(b, c, d, a, x[i], 20, -373897302); a = this.md5gg(a, b, c, d, x[i + 5], 5, -701558691); d = this.md5gg(d, a, b, c, x[i + 10], 9, 38016083); c = this.md5gg(c, d, a, b, x[i + 15], 14, -660478335); b = this.md5gg(b, c, d, a, x[i + 4], 20, -405537848); a = this.md5gg(a, b, c, d, x[i + 9], 5, 568446438); d = this.md5gg(d, a, b, c, x[i + 14], 9, -1019803690); c = this.md5gg(c, d, a, b, x[i + 3], 14, -187363961); b = this.md5gg(b, c, d, a, x[i + 8], 20, 1163531501); a = this.md5gg(a, b, c, d, x[i + 13], 5, -1444681467); d = this.md5gg(d, a, b, c, x[i + 2], 9, -51403784); c = this.md5gg(c, d, a, b, x[i + 7], 14, 1735328473); b = this.md5gg(b, c, d, a, x[i + 12], 20, -1926607734); a = this.md5hh(a, b, c, d, x[i + 5], 4, -378558); d = this.md5hh(d, a, b, c, x[i + 8], 11, -2022574463); c = this.md5hh(c, d, a, b, x[i + 11], 16, 1839030562); b = this.md5hh(b, c, d, a, x[i + 14], 23, -35309556); a = this.md5hh(a, b, c, d, x[i + 1], 4, -1530992060); d = this.md5hh(d, a, b, c, x[i + 4], 11, 1272893353); c = this.md5hh(c, d, a, b, x[i + 7], 16, -155497632); b = this.md5hh(b, c, d, a, x[i + 10], 23, -1094730640); a = this.md5hh(a, b, c, d, x[i + 13], 4, 681279174); d = this.md5hh(d, a, b, c, x[i], 11, -358537222); c = this.md5hh(c, d, a, b, x[i + 3], 16, -722521979); b = this.md5hh(b, c, d, a, x[i + 6], 23, 76029189); a = this.md5hh(a, b, c, d, x[i + 9], 4, -640364487); d = this.md5hh(d, a, b, c, x[i + 12], 11, -421815835); c = this.md5hh(c, d, a, b, x[i + 15], 16, 530742520); b = this.md5hh(b, c, d, a, x[i + 2], 23, -995338651); a = this.md5ii(a, b, c, d, x[i], 6, -198630844); d = this.md5ii(d, a, b, c, x[i + 7], 10, 1126891415); c = this.md5ii(c, d, a, b, x[i + 14], 15, -1416354905); b = this.md5ii(b, c, d, a, x[i + 5], 21, -57434055); a = this.md5ii(a, b, c, d, x[i + 12], 6, 1700485571); d = this.md5ii(d, a, b, c, x[i + 3], 10, -1894986606); c = this.md5ii(c, d, a, b, x[i + 10], 15, -1051523); b = this.md5ii(b, c, d, a, x[i + 1], 21, -2054922799); a = this.md5ii(a, b, c, d, x[i + 8], 6, 1873313359); d = this.md5ii(d, a, b, c, x[i + 15], 10, -30611744); c = this.md5ii(c, d, a, b, x[i + 6], 15, -1560198380); b = this.md5ii(b, c, d, a, x[i + 13], 21, 1309151649); a = this.md5ii(a, b, c, d, x[i + 4], 6, -145523070); d = this.md5ii(d, a, b, c, x[i + 11], 10, -1120210379); c = this.md5ii(c, d, a, b, x[i + 2], 15, 718787259); b = this.md5ii(b, c, d, a, x[i + 9], 21, -343485551); a = this.safeAdd(a, olda); b = this.safeAdd(b, oldb); c = this.safeAdd(c, oldc); d = this.safeAdd(d, oldd) } return [a, b, c, d] }, binl2rstr(input) { var i; var output = ''; var length32 = input.length * 32; for (i = 0; i < length32; i += 8) { output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff) } return output }, rstr2binl(input) { var i; var output = []; output[(input.length >> 2) - 1] = undefined; for (i = 0; i < output.length; i += 1) { output[i] = 0 } var length8 = input.length * 8; for (i = 0; i < length8; i += 8) { output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32) } return output }, rstrMD5(s) { return this.binl2rstr(this.binlMD5(this.rstr2binl(s), s.length * 8)) }, rstrHMACMD5(key, data) { var i; var bkey = this.rstr2binl(key); var ipad = []; var opad = []; var hash; ipad[15] = opad[15] = undefined; if (bkey.length > 16) { bkey = this.binlMD5(bkey, key.length * 8) } for (i = 0; i < 16; i += 1) { ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5c5c5c5c } hash = this.binlMD5(ipad.concat(this.rstr2binl(data)), 512 + data.length * 8); return this.binl2rstr(this.binlMD5(opad.concat(hash), 512 + 128)) }, rstr2hex(input) { var hexTab = '0123456789abcdef'; var output = ''; var x; var i; for (i = 0; i < input.length; i += 1) { x = input.charCodeAt(i); output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f) } return output }, str2rstrUTF8(input) { return unescape(encodeURIComponent(input)) }, rawMD5(s) { return this.rstrMD5(this.str2rstrUTF8(s)) }, hexMD5(s) { return this.rstr2hex(this.rawMD5(s)) }, rawHMACMD5(k, d) { return this.rstrHMACMD5(this.str2rstrUTF8(k), str2rstrUTF8(d)) }, hexHMACMD5(k, d) { return this.rstr2hex(this.rawHMACMD5(k, d)) }, md5(string, key, raw) { if (!key) { if (!raw) { return this.hexMD5(string) } return this.rawMD5(string) } if (!raw) { return this.hexHMACMD5(key, string) } return this.rawHMACMD5(key, string) }, getSig(requestParam, sk, feature, mode) { var sig = null; var requestArr = []; Object.keys(requestParam).sort().forEach(function (key) { requestArr.push(key + '=' + requestParam[key]) }); if (feature == 'search') { sig = '/ws/place/v1/search?' + requestArr.join('&') + sk } if (feature == 'suggest') { sig = '/ws/place/v1/suggestion?' + requestArr.join('&') + sk } if (feature == 'reverseGeocoder') { sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk } if (feature == 'geocoder') { sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk } if (feature == 'getCityList') { sig = '/ws/district/v1/list?' + requestArr.join('&') + sk } if (feature == 'getDistrictByCityId') { sig = '/ws/district/v1/getchildren?' + requestArr.join('&') + sk } if (feature == 'calculateDistance') { sig = '/ws/distance/v1/?' + requestArr.join('&') + sk } if (feature == 'direction') { sig = '/ws/direction/v1/' + mode + '?' + requestArr.join('&') + sk } sig = this.md5(sig); return sig }, location2query(data) { if (typeof data == 'string') { return data } var query = ''; for (var i = 0; i < data.length; i++) { var d = data[i]; if (!!query) { query += ';' } if (d.location) { query = query + d.location.lat + ',' + d.location.lng } if (d.latitude && d.longitude) { query = query + d.latitude + ',' + d.longitude } } return query }, rad(d) { return d * Math.PI / 180.0 }, getEndLocation(location) { var to = location.split(';'); var endLocation = []; for (var i = 0; i < to.length; i++) { endLocation.push({ lat: parseFloat(to[i].split(',')[0]), lng: parseFloat(to[i].split(',')[1]) }) } return endLocation }, getDistance(latFrom, lngFrom, latTo, lngTo) { var radLatFrom = this.rad(latFrom); var radLatTo = this.rad(latTo); var a = radLatFrom - radLatTo; var b = this.rad(lngFrom) - this.rad(lngTo); var distance = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLatFrom) * Math.cos(radLatTo) * Math.pow(Math.sin(b / 2), 2))); distance = distance * EARTH_RADIUS; distance = Math.round(distance * 10000) / 10000; return parseFloat(distance.toFixed(0)) }, getWXLocation(success, fail, complete) { wx.getLocation({ type: 'gcj02', success: success, fail: fail, complete: complete }) }, getLocationParam(location) { if (typeof location == 'string') { var locationArr = location.split(','); if (locationArr.length === 2) { location = { latitude: location.split(',')[0], longitude: location.split(',')[1] } } else { location = {} } } return location }, polyfillParam(param) { param.success = param.success || function () { }; param.fail = param.fail || function () { }; param.complete = param.complete || function () { } }, checkParamKeyEmpty(param, key) { if (!param[key]) { var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + key + '参数格式有误'); param.fail(errconf); param.complete(errconf); return true } return false }, checkKeyword(param) { return !this.checkParamKeyEmpty(param, 'keyword') }, checkLocation(param) { var location = this.getLocationParam(param.location); if (!location || !location.latitude || !location.longitude) { var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + ' location参数格式有误'); param.fail(errconf); param.complete(errconf); return false } return true }, buildErrorConfig(errCode, errMsg) { return { status: errCode, message: errMsg } }, handleData(param, data, feature) { if (feature == 'search') { var searchResult = data.data; var searchSimplify = []; for (var i = 0; i < searchResult.length; i++) { searchSimplify.push({ id: searchResult[i].id || null, title: searchResult[i].title || null, latitude: searchResult[i].location && searchResult[i].location.lat || null, longitude: searchResult[i].location && searchResult[i].location.lng || null, address: searchResult[i].address || null, category: searchResult[i].category || null, tel: searchResult[i].tel || null, adcode: searchResult[i].ad_info && searchResult[i].ad_info.adcode || null, city: searchResult[i].ad_info && searchResult[i].ad_info.city || null, district: searchResult[i].ad_info && searchResult[i].ad_info.district || null, province: searchResult[i].ad_info && searchResult[i].ad_info.province || null }) } param.success(data, { searchResult: searchResult, searchSimplify: searchSimplify }) } else if (feature == 'suggest') { var suggestResult = data.data; var suggestSimplify = []; for (var i = 0; i < suggestResult.length; i++) { suggestSimplify.push({ adcode: suggestResult[i].adcode || null, address: suggestResult[i].address || null, category: suggestResult[i].category || null, city: suggestResult[i].city || null, district: suggestResult[i].district || null, id: suggestResult[i].id || null, latitude: suggestResult[i].location && suggestResult[i].location.lat || null, longitude: suggestResult[i].location && suggestResult[i].location.lng || null, province: suggestResult[i].province || null, title: suggestResult[i].title || null, type: suggestResult[i].type || null }) } param.success(data, { suggestResult: suggestResult, suggestSimplify: suggestSimplify }) } else if (feature == 'reverseGeocoder') { var reverseGeocoderResult = data.result; var reverseGeocoderSimplify = { address: reverseGeocoderResult.address || null, latitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lat || null, longitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lng || null, adcode: reverseGeocoderResult.ad_info && reverseGeocoderResult.ad_info.adcode || null, city: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.city || null, district: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.district || null, nation: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.nation || null, province: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.province || null, street: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street || null, street_number: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street_number || null, recommend: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.recommend || null, rough: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.rough || null }; if (reverseGeocoderResult.pois) { var pois = reverseGeocoderResult.pois; var poisSimplify = []; for (var i = 0; i < pois.length; i++) { poisSimplify.push({ id: pois[i].id || null, title: pois[i].title || null, latitude: pois[i].location && pois[i].location.lat || null, longitude: pois[i].location && pois[i].location.lng || null, address: pois[i].address || null, category: pois[i].category || null, adcode: pois[i].ad_info && pois[i].ad_info.adcode || null, city: pois[i].ad_info && pois[i].ad_info.city || null, district: pois[i].ad_info && pois[i].ad_info.district || null, province: pois[i].ad_info && pois[i].ad_info.province || null }) } param.success(data, { reverseGeocoderResult: reverseGeocoderResult, reverseGeocoderSimplify: reverseGeocoderSimplify, pois: pois, poisSimplify: poisSimplify }) } else { param.success(data, { reverseGeocoderResult: reverseGeocoderResult, reverseGeocoderSimplify: reverseGeocoderSimplify }) } } else if (feature == 'geocoder') { var geocoderResult = data.result; var geocoderSimplify = { title: geocoderResult.title || null, latitude: geocoderResult.location && geocoderResult.location.lat || null, longitude: geocoderResult.location && geocoderResult.location.lng || null, adcode: geocoderResult.ad_info && geocoderResult.ad_info.adcode || null, province: geocoderResult.address_components && geocoderResult.address_components.province || null, city: geocoderResult.address_components && geocoderResult.address_components.city || null, district: geocoderResult.address_components && geocoderResult.address_components.district || null, street: geocoderResult.address_components && geocoderResult.address_components.street || null, street_number: geocoderResult.address_components && geocoderResult.address_components.street_number || null, level: geocoderResult.level || null }; param.success(data, { geocoderResult: geocoderResult, geocoderSimplify: geocoderSimplify }) } else if (feature == 'getCityList') { var provinceResult = data.result[0]; var cityResult = data.result[1]; var districtResult = data.result[2]; param.success(data, { provinceResult: provinceResult, cityResult: cityResult, districtResult: districtResult }) } else if (feature == 'getDistrictByCityId') { var districtByCity = data.result[0]; param.success(data, districtByCity) } else if (feature == 'calculateDistance') { var calculateDistanceResult = data.result.elements; var distance = []; for (var i = 0; i < calculateDistanceResult.length; i++) { distance.push(calculateDistanceResult[i].distance) } param.success(data, { calculateDistanceResult: calculateDistanceResult, distance: distance }) } else if (feature == 'direction') { var direction = data.result.routes; param.success(data, direction) } else { param.success(data) } }, buildWxRequestConfig(param, options, feature) { var that = this; options.header = { "content-type": "application/json" }; options.method = 'GET'; options.success = function (res) { var data = res.data; if (data.status === 0) { that.handleData(param, data, feature) } else { param.fail(data) } }; options.fail = function (res) { res.statusCode = ERROR_CONF.WX_ERR_CODE; param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)) }; options.complete = function (res) { var statusCode = +res.statusCode; switch (statusCode) { case ERROR_CONF.WX_ERR_CODE: { param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)); break } case ERROR_CONF.WX_OK_CODE: { var data = res.data; if (data.status === 0) { param.complete(data) } else { param.complete(that.buildErrorConfig(data.status, data.message)) } break } default: { param.complete(that.buildErrorConfig(ERROR_CONF.SYSTEM_ERR, ERROR_CONF.SYSTEM_ERR_MSG)) } } }; return options }, locationProcess(param, locationsuccess, locationfail, locationcomplete) { var that = this; locationfail = locationfail || function (res) { res.statusCode = ERROR_CONF.WX_ERR_CODE; param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)) }; locationcomplete = locationcomplete || function (res) { if (res.statusCode == ERROR_CONF.WX_ERR_CODE) { param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)) } }; if (!param.location) { that.getWXLocation(locationsuccess, locationfail, locationcomplete) } else if (that.checkLocation(param)) { var location = Utils.getLocationParam(param.location); locationsuccess(location) } } }; class QQMapWX { constructor(options) { if (!options.key) { throw Error('key值不能为空') } this.key = options.key }; search(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (!Utils.checkKeyword(options)) { return } var requestParam = { keyword: options.keyword, orderby: options.orderby || '_distance', page_size: options.page_size || 10, page_index: options.page_index || 1, output: 'json', key: that.key }; if (options.address_format) { requestParam.address_format = options.address_format } if (options.filter) { requestParam.filter = options.filter } var distance = options.distance || "1000"; var auto_extend = options.auto_extend || 1; var region = null; var rectangle = null; if (options.region) { region = options.region } if (options.rectangle) { rectangle = options.rectangle } var locationsuccess = function (result) { if (region && !rectangle) { requestParam.boundary = "region(" + region + "," + auto_extend + "," + result.latitude + "," + result.longitude + ")"; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'search') } } else if (rectangle && !region) { requestParam.boundary = "rectangle(" + rectangle + ")"; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'search') } } else { requestParam.boundary = "nearby(" + result.latitude + "," + result.longitude + "," + distance + "," + auto_extend + ")"; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'search') } } wx.request(Utils.buildWxRequestConfig(options, { url: URL_SEARCH, data: requestParam }, 'search')) }; Utils.locationProcess(options, locationsuccess) }; getSuggestion(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (!Utils.checkKeyword(options)) { return } var requestParam = { keyword: options.keyword, region: options.region || '全国', region_fix: options.region_fix || 0, policy: options.policy || 0, page_size: options.page_size || 10, page_index: options.page_index || 1, get_subpois: options.get_subpois || 0, output: 'json', key: that.key }; if (options.address_format) { requestParam.address_format = options.address_format } if (options.filter) { requestParam.filter = options.filter } if (options.location) { var locationsuccess = function (result) { requestParam.location = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_SUGGESTION, data: requestParam }, "suggest")) }; Utils.locationProcess(options, locationsuccess) } else { if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_SUGGESTION, data: requestParam }, "suggest")) } }; reverseGeocoder(options) { var that = this; options = options || {}; Utils.polyfillParam(options); var requestParam = { coord_type: options.coord_type || 5, get_poi: options.get_poi || 0, output: 'json', key: that.key }; if (options.poi_options) { requestParam.poi_options = options.poi_options } var locationsuccess = function (result) { requestParam.location = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'reverseGeocoder') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_GET_GEOCODER, data: requestParam }, 'reverseGeocoder')) }; Utils.locationProcess(options, locationsuccess) }; geocoder(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'address')) { return } var requestParam = { address: options.address, output: 'json', key: that.key }; if (options.region) { requestParam.region = options.region } if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'geocoder') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_GET_GEOCODER, data: requestParam }, 'geocoder')) }; getCityList(options) { var that = this; options = options || {}; Utils.polyfillParam(options); var requestParam = { output: 'json', key: that.key }; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'getCityList') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_CITY_LIST, data: requestParam }, 'getCityList')) }; getDistrictByCityId(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'id')) { return } var requestParam = { id: options.id || '', output: 'json', key: that.key }; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'getDistrictByCityId') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_AREA_LIST, data: requestParam }, 'getDistrictByCityId')) }; calculateDistance(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'to')) { return } var requestParam = { mode: options.mode || 'walking', to: Utils.location2query(options.to), output: 'json', key: that.key }; if (options.from) { options.location = options.from } if (requestParam.mode == 'straight') { var locationsuccess = function (result) { var locationTo = Utils.getEndLocation(requestParam.to); var data = { message: "query ok", result: { elements: [] }, status: 0 }; for (var i = 0; i < locationTo.length; i++) { data.result.elements.push({ distance: Utils.getDistance(result.latitude, result.longitude, locationTo[i].lat, locationTo[i].lng), duration: 0, from: { lat: result.latitude, lng: result.longitude }, to: { lat: locationTo[i].lat, lng: locationTo[i].lng } }) } var calculateResult = data.result.elements; var distanceResult = []; for (var i = 0; i < calculateResult.length; i++) { distanceResult.push(calculateResult[i].distance) } return options.success(data, { calculateResult: calculateResult, distanceResult: distanceResult }) }; Utils.locationProcess(options, locationsuccess) } else { var locationsuccess = function (result) { requestParam.from = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'calculateDistance') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_DISTANCE, data: requestParam }, 'calculateDistance')) }; Utils.locationProcess(options, locationsuccess) } }; direction(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'to')) { return } var requestParam = { output: 'json', key: that.key }; if (typeof options.to == 'string') { requestParam.to = options.to } else { requestParam.to = options.to.latitude + ',' + options.to.longitude } var SET_URL_DIRECTION = null; options.mode = options.mode || MODE.driving; SET_URL_DIRECTION = URL_DIRECTION + options.mode; if (options.from) { options.location = options.from } if (options.mode == MODE.driving) { if (options.from_poi) { requestParam.from_poi = options.from_poi } if (options.heading) { requestParam.heading = options.heading } if (options.speed) { requestParam.speed = options.speed } if (options.accuracy) { requestParam.accuracy = options.accuracy } if (options.road_type) { requestParam.road_type = options.road_type } if (options.to_poi) { requestParam.to_poi = options.to_poi } if (options.from_track) { requestParam.from_track = options.from_track } if (options.waypoints) { requestParam.waypoints = options.waypoints } if (options.policy) { requestParam.policy = options.policy } if (options.plate_number) { requestParam.plate_number = options.plate_number } } if (options.mode == MODE.transit) { if (options.departure_time) { requestParam.departure_time = options.departure_time } if (options.policy) { requestParam.policy = options.policy } } var locationsuccess = function (result) { requestParam.from = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'direction', options.mode) } wx.request(Utils.buildWxRequestConfig(options, { url: SET_URL_DIRECTION, data: requestParam }, 'direction')) }; Utils.locationProcess(options, locationsuccess) } }; module.exports = QQMapWX; \ No newline at end of file diff --git a/common/js/recorder.js b/common/js/recorder.js new file mode 100644 index 0000000..5aa67c7 --- /dev/null +++ b/common/js/recorder.js @@ -0,0 +1,12 @@ +/*! + * + * js-audio-recorder - js audio recorder plugin + * + * @version v1.0.7 + * @homepage https://github.com/2fps/recorder + * @author 2fps (https://www.zhuyuntao.cn) + * @license MIT + * + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Recorder=e():t.Recorder=e()}(this,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e,n){"use strict";function i(t,e,n){for(var i=0;ie?e:n,u=r,c=new ArrayBuffer(44+t.byteLength),l=new DataView(c),f=o,p=0;i(l,p,"RIFF"),p+=4,l.setUint32(p,36+t.byteLength,a),i(l,p+=4,"WAVE"),i(l,p+=4,"fmt "),p+=4,l.setUint32(p,16,a),p+=4,l.setUint16(p,1,a),p+=2,l.setUint16(p,f,a),p+=2,l.setUint32(p,s,a),p+=4,l.setUint32(p,f*s*(u/8),a),p+=4,l.setUint16(p,f*(u/8),a),p+=2,l.setUint16(p,u,a),i(l,p+=2,"data"),p+=4,l.setUint32(p,t.byteLength,a),p+=4;for(var d=0;d44&&s.default.play(t.buffer)},e.prototype.getPlayTime=function(){return s.default.getPlayTime()},e.prototype.pausePlay=function(){!this.isrecording&&this.isplaying&&(this.isplaying=!1,this.onpauseplay&&this.onpauseplay(),s.default.pausePlay())},e.prototype.resumePlay=function(){this.isrecording||this.isplaying||(this.isplaying=!0,this.onresumeplay&&this.onresumeplay(),s.default.resumePlay())},e.prototype.stopPlay=function(){this.isrecording||(this.isplaying=!1,this.onstopplay&&this.onstopplay(),s.default.stopPlay())},e.prototype.destroy=function(){return s.default.destroyPlay(),this.destroyRecord()},e.prototype.getRecordAnalyseData=function(){return this.getAnalyseData()},e.prototype.getPlayAnalyseData=function(){return s.default.getAnalyseData()},e.prototype.getPCM=function(){this.stop();var t=this.getData();return t=a.compress(t,this.inputSampleRate,this.outputSampleRate),a.encodePCM(t,this.oututSampleBits,this.littleEdian)},e.prototype.getPCMBlob=function(){return new Blob([this.getPCM()])},e.prototype.downloadPCM=function(t){void 0===t&&(t="recorder");var e=this.getPCMBlob();r.downloadPCM(e,t)},e.prototype.getWAV=function(){var t=this.getPCM();return a.encodeWAV(t,this.inputSampleRate,this.outputSampleRate,this.config.numChannels,this.oututSampleBits,this.littleEdian)},e.prototype.getWAVBlob=function(){return new Blob([this.getWAV()],{type:"audio/wav"})},e.prototype.downloadWAV=function(t){void 0===t&&(t="recorder");var e=this.getWAVBlob();r.downloadWAV(e,t)},e.prototype.download=function(t,e,n){r.download(t,e,n)},e.prototype.getChannelData=function(){var t=this.getPCM(),e=t.byteLength,n=this.littleEdian,i={left:null,right:null};if(2===this.config.numChannels){var o=new DataView(new ArrayBuffer(e/2)),r=new DataView(new ArrayBuffer(e/2));if(16===this.config.sampleBits)for(var a=0;a { + let ojbItem = setObj; + setObj = !!setObj ? setObj[itemKey] : that[itemKey]; + }); + that.$set(setObj, keys[keys.length - 1], val); + } + }); +} +export default setData diff --git a/common/js/util.js b/common/js/util.js new file mode 100644 index 0000000..8453e7b --- /dev/null +++ b/common/js/util.js @@ -0,0 +1,338 @@ +/** + * 工具类 + */ +/* + * @description: 公用方法文件 + * @author: 杨智源,吴潇 + * @update: 2018-12-26 + * 使用方式: this.$util.方法名 + */ +const util = { + /** + * 时间戳格式化 + * @param {Number} datetime 时间戳(秒) + * @param {String} formateType 时间戳所需处理的方式 normal(月日时分),info(年月日时分秒),rule(年月日时分秒,date(年月日) + * @param {String} joinType 日期间隔符号 + * @return {String} 日期字符串 + */ + formatTime(datetime, formateType, joinType) { + const date = new Date(Number(datetime) * 1000), + year = date.getFullYear(), + month = date.getMonth() + 1, + day = date.getDate(), + hour = date.getHours(), + minute = date.getMinutes(), + second = date.getSeconds(), + formatNumber = function formatNumber(n) { + n = n.toString(); + return n[1] ? n : '0' + n; + }, + timeType = { + 'normal': [ + [month, day], + [hour, minute] + ], + 'info': [ + [year, month, day], + [hour, minute, second] + ], + 'rule': [ + [year, month, day], + [hour, minute] + ], + }; + if (formateType == 'date') { + return [year, month, day].map(formatNumber).join(joinType); + } else { + return timeType[formateType][0].map(formatNumber).join(joinType) + ' ' + timeType[formateType][1].map(formatNumber) + .join(':'); + } + }, + + /** + * 计算距离时间 + * @param {String} dateStr 时间格式字符串 yyyy-mm-dd HH:MM:ss + * @return {String} 日期字符串 + */ + dateDistance(dateStr) { + let UNITS = { + '年': 31557600000, + '月': 2629800000, + '天': 86400000, + '小时': 3600000, + '分钟': 60000, + '秒': 1000 + }, + humanize = function(milliseconds) { + var humanize = ''; + for (var key in UNITS) { + if (milliseconds >= UNITS[key]) { + humanize = Math.floor(milliseconds / UNITS[key]) + key + '前'; + break; + } + } + return humanize || '刚刚'; + }, + format = function(dateStr) { + var date = parse(dateStr) + var diff = Date.now() - date.getTime(); + if (diff < UNITS['天']) { + return humanize(diff); + } + var _format = function(number) { + return (number < 10 ? ('0' + number) : number); + }; + return date.getFullYear() + '/' + _format(date.getMonth() + 1) + '/' + _format(date.getDay()) + '-' + + _format(date.getHours()) + ':' + _format(date.getMinutes()); + }, + parse = function(str) { //将"yyyy-mm-dd HH:MM:ss"格式的字符串,转化为一个Date对象 + var a = str.split(/[^0-9]/); + return new Date(a[0], a[1] - 1, a[2], a[3], a[4], a[5]); + }; + return format(dateStr); + }, + + /** + * Base64编码解码 + * @return {String} Base64字符串 + * 使用方法:new Base64().encode(String) , new Base64().decode(String) + */ + Base64() { + var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + + // 编码 + this.encode = function(input) { + var output = ""; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0; + input = _utf8_encode(input); + while (i < input.length) { + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + enc1 = chr1 >> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); + enc4 = chr3 & 63; + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; + } + output = output + + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + + _keyStr.charAt(enc3) + _keyStr.charAt(enc4); + } + return output; + } + + // 解码 + this.decode = function(input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + while (i < input.length) { + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + output = output + String.fromCharCode(chr1); + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + } + output = _utf8_decode(output); + return output; + } + + let _utf8_encode = function(string) { + string = string.replace(/\r\n/g, "\n"); + var utftext = ""; + for (var n = 0; n < string.length; n++) { + var c = string.charCodeAt(n); + if (c < 128) { + utftext += String.fromCharCode(c); + } else if ((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + return utftext; + } + + let _utf8_decode = function(utftext) { + var string = ""; + var i = 0; + var c2 = 0, + c1 = c2, + c = c1; + while (i < utftext.length) { + c = utftext.charCodeAt(i); + if (c < 128) { + string += String.fromCharCode(c); + i++; + } else if ((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i + 1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } else { + c2 = utftext.charCodeAt(i + 1); + var c3 = utftext.charCodeAt(i + 2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + } + return string; + } + }, + + /** + * 获取对象里每一项的值(代替Object.values()) + * @param {Object} obj 一个对象 + * @return {String} 一个给定对象自身的所有属性值的数组 + */ + objectValues(obj) { + let valuesArray = [] + if (obj) { + for (let key in obj) { + valuesArray.push(obj[key]); + } + } + return valuesArray + }, + + /** + * 请求转换成Promise对象 + * @param {Object} options 请求参数 + * @param {Object} pageObj 当前页面实例 + * @param {Boolean} isToken 请求是否需要携带用户token + * @returns {Promise} Promise对象 + */ + requestPromise(options, pageObj, isToken = false) { + return new Promise((resolve, reject) => { + pageObj.$request({ ...options + }, res => resolve(res), pageObj, isToken); + }); + }, + + /** + * scene解码 + */ + scene_decode(e) { + if (e === undefined) + return {}; + let scene = decodeURIComponent(e), + params = scene.split(','), + data = {}; + for (let i in params) { + var val = params[i].split(':'); + val.length > 0 && val[0] && (data[val[0]] = val[1] || null) + } + return data; + }, + + /** + * 防止滚动触发多次函数 + * @param {Number} wait 重复间隔 + * @param {Function} handler 处理操作 + */ + scorllTimert: null, + debounce(wait, handler) { + let that = this; + return (() => { + // 每次触发 scroll 时先清除定时器 + clearTimeout(that.scorllTimert); + that.scorllTimert = setTimeout(() => { + handler(); + }, wait); + })(); + }, + + /** + * 获取url链接参数 + * @param {String} name 需要获取的参数名 + * @param {String} params url链接 + * @param {Boolean} ishref 是否使用完整的href路径作为正则匹配的参数 默认为否 + */ + getParams(name, params, ishref = !1) { + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); + var r = !!params ? (ishref ? params.includes('?') && params.split('?')[1].match(reg) : params.match(reg)) : null; + if (Object.prototype.toString.call(r) == "[object Array]") { + return r[2]; + } + if (r != null) { + return unescape(r[2]); + } + return r || null; + }, + + /** + * 坐标系转换 + */ + // bd09转gcj02 + baidu_To_qq(lat, lon) { + let x_pi = 3.14159265358979324 * 3000.0 / 180.0, + x = lon - 0.0065, + y = lat - 0.006, + z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi), + theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi), + latitude = z * Math.cos(theta), + longitude = z * Math.sin(theta), + gps = { + latitude, + longitude + }; + return gps; + }, + //gcj02转bd09 + qq_To_baidu(lat, lng) { + let x_PI = 3.14159265358979324 * 3000.0 / 180.0, + z = Math.sqrt(lng * lng + lat * lat) + 0.00002 * Math.sin(lat * x_PI), + theta = Math.atan2(lat, lng) + 0.000003 * Math.cos(lng * x_PI), + latitude = z * Math.cos(theta) + 0.0065, + longitude = z * Math.sin(theta) + 0.006, + gps = { + latitude, + longitude + }; + return gps; + }, + + // 浮点数计算 + // @digit {Number} 浮点数乘以的次方 + // 加法 + additionFloat(one,two,digit){ + let num=((one*digit)+(two*digit))/digit + return num; + }, + // 减法 + subtractionFloat(one,two,digit){ + let num=((one*digit)-(two*digit))/digit + return num; + }, + // 乘法 + multiplicationFloat(one,two,digit){ + let num=((one*digit)*(two*digit))/(digit*digit) + return num; + }, + // 除法 + divisionFloat(one,two,digit){ + let num=((one*digit)/(two*digit))/(digit*digit) + return num; + }, + +}; +export default util diff --git a/common/js/wxApi.js b/common/js/wxApi.js new file mode 100644 index 0000000..2102982 --- /dev/null +++ b/common/js/wxApi.js @@ -0,0 +1,234 @@ +import App from "@/common/js/app.js" +const wxApi = { + configData: null, + /** + * [wxRegister 微信Api初始化] + */ + wxRegister(callback) { + let _this = this, + signUrl = encodeURIComponent(location.href.split("#")[0]), + jsApiList = ["hideAllNonBaseMenuItem", "onMenuShareTimeline", "onMenuShareAppMessage", "openBusinessView", + "scanQRCode", + "getLocation", "chooseImage", "uploadImage", "openAddress", "openLocation", "translateVoice", 'stopRecord', + 'startRecord', "WeixinJSBridgeReady",'playVoice',"uploadVoice","downloadVoice","updateAppMessageShareData","updateTimelineShareData" + ]; + App._post_form("&do=getJssdk", { + sign_url: signUrl + }, (res) => { + let data = res.data; + jWeixin.config({ + debug: false, // 开启调试模式 + appId: data.appId, // 必填,公众号的唯一标识 + timestamp: data.timestamp, // 必填,生成签名的时间戳 + nonceStr: data.nonceStr, // 必填,生成签名的随机串 + signature: data.signature, // 必填,签名 + jsApiList: jsApiList ,// 必填,需要使用的JS接口列表 + openTagList:['wx-open-launch-weapp','wx-open-subscribe'] + }); + jWeixin.ready(() => { + // jWeixin.hideMenuItems({ + // menuList: ["menuItem:copyUrl"] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮 + // }); + callback && callback(); + }); + _this.configData = { + ...data, + url: signUrl + } + jWeixin.error((optinos) => { + // config信息验证失败会执行error函数, + //如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看, + //也可以在返回的res参数中查看,对于SPA可以在这里更新签名。 + console.log(optinos, 'optinos',_this.configData.url) + // App.showError(optinos.errMsg) + }); + // jWeixin.success((options) => { + // console.log(optinos, 'optinos') + // }) + // wx.ready(function() { + // wx.hideMenuItems({ + // menuList: ["menuItem:copyUrl"] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮 + // }); + // }); + // jWeixin.ready(function() { + // jWeixin.hideMenuItems({ + // menuList: ["menuItem:copyUrl","menuItem:editTag","menuItem:delete","menuItem:originPage","menuItem:readMode", "menuItem:openWithQQBrowser", "menuItem:openWithSafari","menuItem:share:email","menuItem:share:brand","menuItem:share:qq","menuItem:share:QZone"] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮 + // }); + // }); + }); + }, + wxShare(options){ + jWeixin.onMenuShareAppMessage(options); + jWeixin.onMenuShareTimeline(options); + // jWeixin.updateAppMessageShareData(options); + // jWeixin.updateTimelineShareData(options); + }, + oldWxShare(options) { + jWeixin.onMenuShareAppMessage(options); + jWeixin.onMenuShareTimeline(options); + jWeixin.updateAppMessageShareData(options); + jWeixin.updateTimelineShareData(options); + // jWeixin.onMenuShareTimeline({ + // title: options.title, // 分享标题 + // desc: options.desc, // 分享描述 + // link: options.link, // 分享链接 + // imgUrl: options.imgUrl, // 分享图标 + // success: function() { + // // 用户点击了分享后执行的回调函数 + // }, + // }) + }, + WxopenLocation(lat, lng, storename, address) { + jWeixin.openLocation({ + latitude: Number(lat), // 纬度,浮点数,范围为90 ~ -90 + longitude: Number(lng), // 经度,浮点数,范围为180 ~ -180。 + name: storename, // 位置名 + address: address, // 地址详情说明 + scale: 14, // 地图缩放级别,整形值,范围从1~28。默认为最大 + infoUrl: '' // 在查看位置界面底部显示的超链接,可点击跳转 + }); + }, + wxPay(options) { + jWeixin.chooseWXPay({ + timestamp: options.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 + nonceStr: options.nonceStr, // 支付签名随机串,不长于 32 位 + package: options.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*) + signType: options.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5' + paySign: options.paySign, // 支付签名 + success(res) { + // 支付成功后的回调函数 + options.success && options.success(res) + }, + cancel(res) { + options.cancel && options.cancel(res) + }, + fail(res) { + options.fail && options.fail(res) + } + }); + }, + scanQRCode(callback) { + jWeixin.scanQRCode({ + needResult: 0, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果, + scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有 + complete(res) { + callback && callback(res); + } + }); + }, + hideMenuItem() { + jWeixin.hideAllNonBaseMenuItem(); + }, + getLocation(optinos) { + jWeixin.getLocation(optinos); + }, + getLocation1() { + jWeixin.getLocation({ + type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' + success: function(res) { + jWeixin.openLocation({ + latitude: res.latitude, // 纬度,浮点数,范围为90 ~ -90 + longitude: res.longitude, // 经度,浮点数,范围为180 ~ -180。 + name: '', // 位置名 + address: '', // 地址详情说明 + scale: 14, // 地图缩放级别,整形值,范围从1~28。默认为最大 + infoUrl: '' // 在查看位置界面底部显示的超链接,可点击跳转 + }); + } + }); + }, + // 选取图片 + choseImage(callback,num=1) { + + jWeixin.chooseImage({ + count: num, // 默认9 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + complete: function(res) { + callback && callback(res); + } + }); + + }, + //上传图片 + uoloadIg(localId, callback) { + debugger + // App._upLoad() + jWeixin.uploadImage({ + localId: localId, // 需要上传的图片的本地ID,由chooseImage接口获得 + isShowProgressTips: 1, // 默认为1,显示进度提示 + complete: function(res) { + callback && callback(res) + } + }); + }, + /** + * 微信好物圈 + */ + wxGoodsCircle(queryString, success, fail) { + jWeixin.openBusinessView({ + businessType: 'friendGoodsRecommend', + queryString: queryString, + success(res) { + success && success(res); + }, + fail(res) { + fail && fail(res); + } + }) + }, + wxOpenAddress(callback) { + console.info(jWeixin) + jWeixin.openAddress({ + success(res) { + callback && callback(res) + }, + fail(errMsg) { + callback && callback(errMsg) + console.info('我失败了') + } + }) + }, + // 监听录音自动停止接口 + wxStartRecord() { + console.info('startRecord') + jWeixin.startRecord({}) + }, + // 停止录音接口 + wxStopRecord(callback) { + console.info('wxStopRecord') + jWeixin.stopRecord({ + success: function(res) { + console.info('localId', res.localId) + callback && callback(res.localId) + + } + }) + }, + //监听播放录音 + wxPlayVoice(id){ + jWeixin.playVoice({ + localId:id + }) + }, + //录音上传 + wxUploadVoice(localId,callback){ + jWeixin.uploadVoice({ + localId:localId, + success: function (res) { + callback && callback(res.serverId); + } + }) + }, + // 识别音频并返回识别结果接口 + wxTranslateVoice(localId, callback) { + jWeixin.translateVoice({ + localId: localId, // 需要识别的音频的本地Id,由录音相关接口获得 + isShowProgressTips: 1, // 默认为1,显示进度提示 + success: function(res) { + callback && callback(res.translateResult) // 语音识别的结果 + } + }) + } +} +export default wxApi diff --git a/components/.DS_Store b/components/.DS_Store new file mode 100644 index 0000000..37fdde6 Binary files /dev/null and b/components/.DS_Store differ diff --git a/components/drag-button/drag-button.vue b/components/drag-button/drag-button.vue new file mode 100644 index 0000000..f8151ff --- /dev/null +++ b/components/drag-button/drag-button.vue @@ -0,0 +1,599 @@ + + + + + diff --git a/components/hx-jump-ball/hx-jump-ball.vue b/components/hx-jump-ball/hx-jump-ball.vue new file mode 100644 index 0000000..8c93bf5 --- /dev/null +++ b/components/hx-jump-ball/hx-jump-ball.vue @@ -0,0 +1,233 @@ + + + + + diff --git a/components/invinbg-image-cropper/.DS_Store b/components/invinbg-image-cropper/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/components/invinbg-image-cropper/.DS_Store differ diff --git a/components/invinbg-image-cropper/invinbg-image-cropper.vue b/components/invinbg-image-cropper/invinbg-image-cropper.vue new file mode 100644 index 0000000..91cef1d --- /dev/null +++ b/components/invinbg-image-cropper/invinbg-image-cropper.vue @@ -0,0 +1,759 @@ + + + + + \ No newline at end of file diff --git a/components/jin-edit/jin-edit.vue b/components/jin-edit/jin-edit.vue new file mode 100644 index 0000000..c468658 --- /dev/null +++ b/components/jin-edit/jin-edit.vue @@ -0,0 +1,404 @@ + + + + + diff --git a/components/jin-edit/jin-icons.vue b/components/jin-edit/jin-icons.vue new file mode 100644 index 0000000..b85d216 --- /dev/null +++ b/components/jin-edit/jin-icons.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/components/junyi-h5-copy/junyi-h5-copy.js b/components/junyi-h5-copy/junyi-h5-copy.js new file mode 100644 index 0000000..91fff37 --- /dev/null +++ b/components/junyi-h5-copy/junyi-h5-copy.js @@ -0,0 +1,18 @@ +export default function h5Copy(content) { + + if (!document.queryCommandSupported('copy')) { + // 不支持 + return false + } + + let textarea = document.createElement("textarea") + textarea.value = content + textarea.readOnly = "readOnly" + document.body.appendChild(textarea) + textarea.select() // 选择对象 + textarea.setSelectionRange(0, content.length) //核心 + let result = document.execCommand("copy") // 执行浏览器复制命令 + textarea.remove() + return result + +} \ No newline at end of file diff --git a/components/jyf-parser/jyf-parser.vue b/components/jyf-parser/jyf-parser.vue new file mode 100644 index 0000000..8e95787 --- /dev/null +++ b/components/jyf-parser/jyf-parser.vue @@ -0,0 +1,698 @@ + + + + + diff --git a/components/jyf-parser/libs/CssHandler.js b/components/jyf-parser/libs/CssHandler.js new file mode 100644 index 0000000..8000377 --- /dev/null +++ b/components/jyf-parser/libs/CssHandler.js @@ -0,0 +1,97 @@ +const cfg = require('./config.js'), + isLetter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + +function CssHandler(tagStyle) { + var styles = Object.assign(Object.create(null), cfg.userAgentStyles); + for (var item in tagStyle) + styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item]; + this.styles = styles; +} +CssHandler.prototype.getStyle = function(data) { + this.styles = new parser(data, this.styles).parse(); +} +CssHandler.prototype.match = function(name, attrs) { + var tmp, matched = (tmp = this.styles[name]) ? tmp + ';' : ''; + if (attrs.class) { + var items = attrs.class.split(' '); + for (var i = 0, item; item = items[i]; i++) + if (tmp = this.styles['.' + item]) + matched += tmp + ';'; + } + if (tmp = this.styles['#' + attrs.id]) + matched += tmp + ';'; + return matched; +} +module.exports = CssHandler; + +function parser(data, init) { + this.data = data; + this.floor = 0; + this.i = 0; + this.list = []; + this.res = init; + this.state = this.Space; +} +parser.prototype.parse = function() { + for (var c; c = this.data[this.i]; this.i++) + this.state(c); + return this.res; +} +parser.prototype.section = function() { + return this.data.substring(this.start, this.i); +} +// 状态机 +parser.prototype.Space = function(c) { + if (c == '.' || c == '#' || isLetter(c)) { + this.start = this.i; + this.state = this.Name; + } else if (c == '/' && this.data[this.i + 1] == '*') + this.Comment(); + else if (!cfg.blankChar[c] && c != ';') + this.state = this.Ignore; +} +parser.prototype.Comment = function() { + this.i = this.data.indexOf('*/', this.i) + 1; + if (!this.i) this.i = this.data.length; + this.state = this.Space; +} +parser.prototype.Ignore = function(c) { + if (c == '{') this.floor++; + else if (c == '}' && !--this.floor) this.state = this.Space; +} +parser.prototype.Name = function(c) { + if (cfg.blankChar[c]) { + this.list.push(this.section()); + this.state = this.NameSpace; + } else if (c == '{') { + this.list.push(this.section()); + this.Content(); + } else if (c == ',') { + this.list.push(this.section()); + this.Comma(); + } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') + this.state = this.Ignore; +} +parser.prototype.NameSpace = function(c) { + if (c == '{') this.Content(); + else if (c == ',') this.Comma(); + else if (!cfg.blankChar[c]) this.state = this.Ignore; +} +parser.prototype.Comma = function() { + while (cfg.blankChar[this.data[++this.i]]); + if (this.data[this.i] == '{') this.Content(); + else { + this.start = this.i--; + this.state = this.Name; + } +} +parser.prototype.Content = function() { + this.start = ++this.i; + if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length; + var content = this.section(); + for (var i = 0, item; item = this.list[i++];) + if (this.res[item]) this.res[item] += ';' + content; + else this.res[item] = content; + this.list = []; + this.state = this.Space; +} diff --git a/components/jyf-parser/libs/MpHtmlParser.js b/components/jyf-parser/libs/MpHtmlParser.js new file mode 100644 index 0000000..ccd15a5 --- /dev/null +++ b/components/jyf-parser/libs/MpHtmlParser.js @@ -0,0 +1,546 @@ +/** + * html 解析器 + * @tutorial https://github.com/jin-yufeng/Parser + * @version 20200524 + * @author JinYufeng + * @listens MIT + */ +const cfg = require('./config.js'), + blankChar = cfg.blankChar, + CssHandler = require('./CssHandler.js'), + windowWidth = uni.getSystemInfoSync().windowWidth; +var emoji; + +function MpHtmlParser(data, options = {}) { + this.attrs = {}; + this.CssHandler = new CssHandler(options.tagStyle, windowWidth); + this.data = data; + this.domain = options.domain; + this.DOM = []; + this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0; + options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http'; + this.options = options; + this.state = this.Text; + this.STACK = []; + // 工具函数 + this.bubble = () => { + for (var i = this.STACK.length, item; item = this.STACK[--i];) { + if (cfg.richOnlyTags[item.name]) { + if (item.name == 'table' && !Object.hasOwnProperty.call(item, 'c')) item.c = 1; + return false; + } + item.c = 1; + } + return true; + } + this.decode = (val, amp) => { + var i = -1, + j, en; + while (1) { + if ((i = val.indexOf('&', i + 1)) == -1) break; + if ((j = val.indexOf(';', i + 2)) == -1) break; + if (val[i + 1] == '#') { + en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j)); + if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1); + } else { + en = val.substring(i + 1, j); + if (cfg.entities[en] || en == amp) + val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1); + } + } + return val; + } + this.getUrl = url => { + if (url[0] == '/') { + if (url[1] == '/') url = this.options.prot + ':' + url; + else if (this.domain) url = this.domain + url; + } else if (this.domain && url.indexOf('data:') != 0 && !url.includes('://')) + url = this.domain + '/' + url; + return url; + } + this.isClose = () => this.data[this.i] == '>' || (this.data[this.i] == '/' && this.data[this.i + 1] == '>'); + this.section = () => this.data.substring(this.start, this.i); + this.parent = () => this.STACK[this.STACK.length - 1]; + this.siblings = () => this.STACK.length ? this.parent().children : this.DOM; +} +MpHtmlParser.prototype.parse = function() { + if (emoji) this.data = emoji.parseEmoji(this.data); + for (var c; c = this.data[this.i]; this.i++) + this.state(c); + if (this.state == this.Text) this.setText(); + while (this.STACK.length) this.popNode(this.STACK.pop()); + if (this.DOM.length) { + this.DOM[0].PoweredBy = 'Parser'; + if (this.title) this.DOM[0].title = this.title; + } + return this.DOM; +} +// 设置属性 +MpHtmlParser.prototype.setAttr = function() { + var name = this.attrName.toLowerCase(); + if (cfg.trustAttrs[name]) { + var val = this.attrVal; + if (val) { + if (name == 'src') this.attrs[name] = this.getUrl(this.decode(val, 'amp')); + else if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp'); + else this.attrs[name] = val; + } else if (cfg.boolAttrs[name]) this.attrs[name] = 'T'; + } + this.attrVal = ''; + while (blankChar[this.data[this.i]]) this.i++; + if (this.isClose()) this.setNode(); + else { + this.start = this.i; + this.state = this.AttrName; + } +} +// 设置文本节点 +MpHtmlParser.prototype.setText = function() { + var back, text = this.section(); + if (!text) return; + text = (cfg.onText && cfg.onText(text, () => back = true)) || text; + if (back) { + this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i); + let j = this.start + text.length; + for (this.i = this.start; this.i < j; this.i++) this.state(this.data[this.i]); + return; + } + if (!this.pre) { + // 合并空白符 + var tmp = []; + for (let i = text.length, c; c = text[--i];) + if (!blankChar[c] || (!blankChar[tmp[0]] && (c = ' '))) tmp.unshift(c); + text = tmp.join(''); + } + this.siblings().push({ + type: 'text', + text: this.decode(text) + }); +} +// 设置元素节点 +MpHtmlParser.prototype.setNode = function() { + var node = { + name: this.tagName.toLowerCase(), + attrs: this.attrs + }, + close = cfg.selfClosingTags[node.name]; + this.attrs = {}; + if (!cfg.ignoreTags[node.name]) { + // 处理属性 + var attrs = node.attrs, + style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''), + styleObj = {}; + if (attrs.id) { + if (this.options.compress & 1) attrs.id = void 0; + else if (this.options.useAnchor) this.bubble(); + } + if ((this.options.compress & 2) && attrs.class) attrs.class = void 0; + switch (node.name) { + case 'a': + case 'ad': // #ifdef APP-PLUS + case 'iframe': + // #endif + this.bubble(); + break; + case 'font': + if (attrs.color) { + styleObj['color'] = attrs.color; + attrs.color = void 0; + } + if (attrs.face) { + styleObj['font-family'] = attrs.face; + attrs.face = void 0; + } + if (attrs.size) { + var size = parseInt(attrs.size); + if (size < 1) size = 1; + else if (size > 7) size = 7; + var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']; + styleObj['font-size'] = map[size - 1]; + attrs.size = void 0; + } + break; + case 'embed': + // #ifndef APP-PLUS + var src = node.attrs.src || '', + type = node.attrs.type || ''; + if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8')) + node.name = 'video'; + else if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes( + '.aac')) + node.name = 'audio'; + else break; + if (node.attrs.autostart) + node.attrs.autoplay = 'T'; + node.attrs.controls = 'T'; + // #endif + // #ifdef APP-PLUS + this.bubble(); + break; + // #endif + case 'video': + case 'audio': + if (!attrs.id) attrs.id = node.name + (++this[`${node.name}Num`]); + else this[`${node.name}Num`]++; + if (node.name == 'video') { + if (this.videoNum > 3) + node.lazyLoad = 1; + if (attrs.width) { + styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px'); + attrs.width = void 0; + } + if (attrs.height) { + styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px'); + attrs.height = void 0; + } + } + attrs.source = []; + if (attrs.src) { + attrs.source.push(attrs.src); + attrs.src = void 0; + } + if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T'; + this.bubble(); + break; + case 'td': + case 'th': + if (attrs.colspan || attrs.rowspan) + for (var k = this.STACK.length, item; item = this.STACK[--k];) + if (item.name == 'table') { + item.c = void 0; + break; + } + } + if (attrs.align) { + styleObj['text-align'] = attrs.align; + attrs.align = void 0; + } + // 压缩 style + var styles = style.split(';'); + style = ''; + for (var i = 0, len = styles.length; i < len; i++) { + var info = styles[i].split(':'); + if (info.length < 2) continue; + let key = info[0].trim().toLowerCase(), + value = info.slice(1).join(':').trim(); + if (value.includes('-webkit') || value.includes('-moz') || value.includes('-ms') || value.includes('-o') || value.includes( + 'safe')) + style += `;${key}:${value}`; + else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) + styleObj[key] = value; + } + if (node.name == 'img') { + if (attrs['data-src']) { + attrs.src = attrs.src || attrs['data-src']; + attrs['data-src'] = void 0; + } + if (attrs.src && !attrs.ignore) { + if (this.bubble()) + attrs.i = (this.imgNum++).toString(); + else attrs.ignore = 'T'; + } + if (attrs.ignore) styleObj['max-width'] = '100%'; + var width; + if (styleObj.width) width = styleObj.width; + else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : attrs.width + 'px'; + if (width) { + styleObj.width = width; + attrs.width = '100%'; + if (parseInt(width) > windowWidth) { + styleObj.height = ''; + if (attrs.height) attrs.height = void 0; + } + } + if (styleObj.height) { + attrs.height = styleObj.height; + styleObj.height = ''; + } else if (attrs.height && !attrs.height.includes('%')) + attrs.height += 'px'; + } + for (var key in styleObj) { + var value = styleObj[key]; + if (!value) continue; + if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1; + // 填充链接 + if (value.includes('url')) { + var j = value.indexOf('('); + if (j++ != -1) { + while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) j++; + value = value.substr(0, j) + this.getUrl(value.substr(j)); + } + } + // 转换 rpx + else if (value.includes('rpx')) + value = value.replace(/[0-9.]+\s*rpx/g, $ => parseFloat($) * windowWidth / 750 + 'px'); + else if (key == 'white-space' && value.includes('pre')) + this.pre = node.pre = true; + style += `;${key}:${value}`; + } + style = style.substr(1); + if (style) attrs.style = style; + if (!close) { + node.children = []; + if (node.name == 'pre' && cfg.highlight) { + this.remove(node); + this.pre = node.pre = true; + } + this.siblings().push(node); + this.STACK.push(node); + } else if (!cfg.filter || cfg.filter(node, this) != false) + this.siblings().push(node); + } else { + if (!close) this.remove(node); + else if (node.name == 'source') { + var parent = this.parent(); + if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) + parent.attrs.source.push(node.attrs.src); + } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href; + } + if (this.data[this.i] == '/') this.i++; + this.start = this.i + 1; + this.state = this.Text; +} +// 移除标签 +MpHtmlParser.prototype.remove = function(node) { + var name = node.name, + j = this.i; + // 处理 svg + var handleSvg = () => { + var src = this.data.substring(j, this.i + 1); + if (!node.attrs.xmlns) src = ' xmlns="http://www.w3.org/2000/svg"' + src; + var i = j; + while (this.data[j] != '<') j--; + src = this.data.substring(j, i) + src; + var parent = this.parent(); + if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) + parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style; + this.siblings().push({ + name: 'img', + attrs: { + src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'), + style: (/vertical[^;]+/.exec(node.attrs.style) || []).shift(), + ignore: 'T' + } + }) + } + if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++); + while (1) { + if ((this.i = this.data.indexOf('', this.i)) == -1) this.i = this.data.length; + if (name == 'svg') handleSvg(); + return; + } + } +} +// 节点出栈处理 +MpHtmlParser.prototype.popNode = function(node) { + // 空白符处理 + if (node.pre) { + node.pre = this.pre = void 0; + for (let i = this.STACK.length; i--;) + if (this.STACK[i].pre) + this.pre = true; + } + var siblings = this.siblings(), + len = siblings.length, + childs = node.children; + if (node.name == 'head' || (cfg.filter && cfg.filter(node, this) == false)) + return siblings.pop(); + var attrs = node.attrs; + // 替换一些标签名 + if (cfg.blockTags[node.name]) node.name = 'div'; + else if (!cfg.trustTags[node.name]) node.name = 'span'; + // 去除块标签前后空串 + if (node.name == 'div' || node.name == 'p' || node.name[0] == 't') { + if (len > 1 && siblings[len - 2].text == ' ') + siblings.splice(--len - 1, 1); + if (childs.length && childs[childs.length - 1].text == ' ') + childs.pop(); + } + // 处理列表 + if (node.c && (node.name == 'ul' || node.name == 'ol')) { + if ((node.attrs.style || '').includes('list-style:none')) { + for (let i = 0, child; child = childs[i++];) + if (child.name == 'li') + child.name = 'div'; + } else if (node.name == 'ul') { + var floor = 1; + for (let i = this.STACK.length; i--;) + if (this.STACK[i].name == 'ul') floor++; + if (floor != 1) + for (let i = childs.length; i--;) + childs[i].floor = floor; + } else { + for (let i = 0, num = 1, child; child = childs[i++];) + if (child.name == 'li') { + child.type = 'ol'; + child.num = ((num, type) => { + if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26); + if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26); + if (type == 'i' || type == 'I') { + num = (num - 1) % 99 + 1; + var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'], + ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'], + res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || ''); + if (type == 'i') return res.toLowerCase(); + return res; + } + return num; + })(num++, attrs.type) + '.'; + } + } + } + // 处理表格的边框 + if (node.name == 'table') { + var padding = attrs.cellpadding, + spacing = attrs.cellspacing, + border = attrs.border; + if (node.c) { + this.bubble(); + attrs.style = (attrs.style || '') + ';display:table'; + if (!padding) padding = 2; + if (!spacing) spacing = 2; + } + if (border) attrs.style = `border:${border}px solid gray;${attrs.style || ''}`; + if (spacing) attrs.style = `border-spacing:${spacing}px;${attrs.style || ''}`; + if (border || padding || node.c) + (function f(ns) { + for (var i = 0, n; n = ns[i]; i++) { + if (n.type == 'text') continue; + var style = n.attrs.style || ''; + if (node.c && n.name[0] == 't') { + n.c = 1; + style += ';display:table-' + (n.name == 'th' || n.name == 'td' ? 'cell' : (n.name == 'tr' ? 'row' : 'row-group')); + } + if (n.name == 'th' || n.name == 'td') { + if (border) style = `border:${border}px solid gray;${style}`; + if (padding) style = `padding:${padding}px;${style}`; + } else f(n.children || []); + if (style) n.attrs.style = style; + } + })(childs) + if (this.options.autoscroll) { + var table = Object.assign({}, node); + node.name = 'div'; + node.attrs = { + style: 'overflow:scroll' + } + node.children = [table]; + } + } + this.CssHandler.pop && this.CssHandler.pop(node); + // 自动压缩 + if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') + siblings[len - 1] = childs[0]; +} +// 状态机 +MpHtmlParser.prototype.Text = function(c) { + if (c == '<') { + var next = this.data[this.i + 1], + isLetter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + if (isLetter(next)) { + this.setText(); + this.start = this.i + 1; + this.state = this.TagName; + } else if (next == '/') { + this.setText(); + if (isLetter(this.data[++this.i + 1])) { + this.start = this.i + 1; + this.state = this.EndTag; + } else this.Comment(); + } else if (next == '!') { + this.setText(); + this.Comment(); + } + } +} +MpHtmlParser.prototype.Comment = function() { + var key; + if (this.data.substring(this.i + 2, this.i + 4) == '--') key = '-->'; + else if (this.data.substring(this.i + 2, this.i + 9) == '[CDATA[') key = ']]>'; + else key = '>'; + if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length; + else this.i += key.length - 1; + this.start = this.i + 1; + this.state = this.Text; +} +MpHtmlParser.prototype.TagName = function(c) { + if (blankChar[c]) { + this.tagName = this.section(); + while (blankChar[this.data[this.i]]) this.i++; + if (this.isClose()) this.setNode(); + else { + this.start = this.i; + this.state = this.AttrName; + } + } else if (this.isClose()) { + this.tagName = this.section(); + this.setNode(); + } +} +MpHtmlParser.prototype.AttrName = function(c) { + var blank = blankChar[c]; + if (blank) { + this.attrName = this.section(); + c = this.data[this.i]; + } + if (c == '=') { + if (!blank) this.attrName = this.section(); + while (blankChar[this.data[++this.i]]); + this.start = this.i--; + this.state = this.AttrValue; + } else if (blank) this.setAttr(); + else if (this.isClose()) { + this.attrName = this.section(); + this.setAttr(); + } +} +MpHtmlParser.prototype.AttrValue = function(c) { + if (c == '"' || c == "'") { + this.start++; + if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length; + this.attrVal = this.section(); + this.i++; + } else { + for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++); + this.attrVal = this.section(); + } + this.setAttr(); +} +MpHtmlParser.prototype.EndTag = function(c) { + if (blankChar[c] || c == '>' || c == '/') { + var name = this.section().toLowerCase(); + for (var i = this.STACK.length; i--;) + if (this.STACK[i].name == name) break; + if (i != -1) { + var node; + while ((node = this.STACK.pop()).name != name) this.popNode(node); + this.popNode(node); + } else if (name == 'p' || name == 'br') + this.siblings().push({ + name, + attrs: {} + }); + this.i = this.data.indexOf('>', this.i); + this.start = this.i + 1; + if (this.i == -1) this.i = this.data.length; + else this.state = this.Text; + } +} +module.exports = MpHtmlParser; diff --git a/components/jyf-parser/libs/config.js b/components/jyf-parser/libs/config.js new file mode 100644 index 0000000..c3339d8 --- /dev/null +++ b/components/jyf-parser/libs/config.js @@ -0,0 +1,98 @@ +/* 配置文件 */ +// #ifndef H5 +const canIUse = wx.canIUse('editor'); // 高基础库标识,用于兼容 +// #endif +module.exports = { + // 出错占位图 + errorImg: null, + // 过滤器函数 + filter: null, + // 代码高亮函数 + highlight: null, + // 文本处理函数 + onText: null, + // 实体编码列表 + entities: { + quot: '"', + apos: "'", + semi: ';', + nbsp: '\xA0', + ensp: '\u2002', + emsp: '\u2003', + ndash: '–', + mdash: '—', + middot: '·', + lsquo: '‘', + rsquo: '’', + ldquo: '“', + rdquo: '”', + bull: '•', + hellip: '…' + }, + blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'), + // 块级标签,将被转为 div + blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,section' + ( + // #ifndef H5 + canIUse ? '' : + // #endif + ',pre')), + // 将被移除的标签 + ignoreTags: makeMap( + 'area,base,canvas,frame,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr' + // #ifndef H5 + + (canIUse ? ',rp' : '') + // #endif + // #ifndef APP-PLUS + + ',iframe' + // #endif + ), + // 只能被 rich-text 显示的标签 + richOnlyTags: makeMap('a,colgroup,fieldset,legend,picture,table,navigator' + // #ifndef H5 + + (canIUse ? ',bdi,bdo,caption,rt,ruby' : '') + // #endif + ), + // 自闭合的标签 + selfClosingTags: makeMap( + 'area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr' + ), + // 信任的属性 + trustAttrs: makeMap( + 'align,allowfullscreen,alt,app-id,author,autoplay,autostart,border,cellpadding,cellspacing,class,color,colspan,controls,data-src,dir,face,height,href,id,ignore,loop,media,muted,name,path,poster,rowspan,size,span,src,start,style,type,unit-id,width,xmlns' + ), + // bool 型的属性 + boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'), + // 信任的标签 + trustTags: makeMap( + 'a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video' + // #ifndef H5 + + (canIUse ? ',bdi,bdo,caption,pre,rt,ruby' : '') + // #endif + // #ifdef APP-PLUS + + ',embed,iframe' + // #endif + ), + // 默认的标签样式 + userAgentStyles: { + address: 'font-style:italic', + big: 'display:inline;font-size:1.2em', + blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px', + caption: 'display:table-caption;text-align:center', + center: 'text-align:center', + cite: 'font-style:italic', + dd: 'margin-left:40px', + mark: 'background-color:yellow', + pre: 'font-family:monospace;white-space:pre;overflow:scroll', + s: 'text-decoration:line-through', + small: 'display:inline;font-size:0.8em', + u: 'text-decoration:underline' + } +} + +function makeMap(str) { + var map = Object.create(null), + list = str.split(','); + for (var i = list.length; i--;) + map[list[i]] = true; + return map; +} diff --git a/components/jyf-parser/libs/handler.sjs b/components/jyf-parser/libs/handler.sjs new file mode 100644 index 0000000..79c7739 --- /dev/null +++ b/components/jyf-parser/libs/handler.sjs @@ -0,0 +1,20 @@ +var inline = { + abbr: 1, + b: 1, + big: 1, + code: 1, + del: 1, + em: 1, + i: 1, + ins: 1, + label: 1, + q: 1, + small: 1, + span: 1, + strong: 1 +} +export default { + use: function(item) { + return !item.c && !inline[item.name] && (item.attrs.style || '').indexOf('display:inline') == -1 + } +} diff --git a/components/jyf-parser/libs/handler.wxs b/components/jyf-parser/libs/handler.wxs new file mode 100644 index 0000000..ad9b15b --- /dev/null +++ b/components/jyf-parser/libs/handler.wxs @@ -0,0 +1,20 @@ +var inline = { + abbr: 1, + b: 1, + big: 1, + code: 1, + del: 1, + em: 1, + i: 1, + ins: 1, + label: 1, + q: 1, + small: 1, + span: 1, + strong: 1 +} +module.exports = { + use: function(item) { + return !item.c && !inline[item.name] && (item.attrs.style || '').indexOf('display:inline') == -1 + } +} diff --git a/components/jyf-parser/libs/trees.vue b/components/jyf-parser/libs/trees.vue new file mode 100644 index 0000000..9bdb6fe --- /dev/null +++ b/components/jyf-parser/libs/trees.vue @@ -0,0 +1,526 @@ + + + + + diff --git a/pages/mainPages/agreement/agreement.vue b/pages/mainPages/agreement/agreement.vue new file mode 100644 index 0000000..558fba0 --- /dev/null +++ b/pages/mainPages/agreement/agreement.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/pages/mainPages/businessDetails/businessDetails.vue b/pages/mainPages/businessDetails/businessDetails.vue new file mode 100644 index 0000000..7b6646e --- /dev/null +++ b/pages/mainPages/businessDetails/businessDetails.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/pages/mainPages/cashApplication/cashApplication.vue b/pages/mainPages/cashApplication/cashApplication.vue new file mode 100644 index 0000000..bfe4393 --- /dev/null +++ b/pages/mainPages/cashApplication/cashApplication.vue @@ -0,0 +1,392 @@ + + + + + diff --git a/pages/mainPages/comment/comment.vue b/pages/mainPages/comment/comment.vue new file mode 100644 index 0000000..14f3b35 --- /dev/null +++ b/pages/mainPages/comment/comment.vue @@ -0,0 +1,576 @@ + + + + + diff --git a/pages/mainPages/econdaryClassification/econdaryClassification.vue b/pages/mainPages/econdaryClassification/econdaryClassification.vue new file mode 100644 index 0000000..6b6ab0b --- /dev/null +++ b/pages/mainPages/econdaryClassification/econdaryClassification.vue @@ -0,0 +1,869 @@ + + + + + diff --git a/pages/mainPages/express/express.vue b/pages/mainPages/express/express.vue new file mode 100644 index 0000000..c13539b --- /dev/null +++ b/pages/mainPages/express/express.vue @@ -0,0 +1,217 @@ + + + + + diff --git a/pages/mainPages/headline/headlineDetail.vue b/pages/mainPages/headline/headlineDetail.vue new file mode 100644 index 0000000..0507df4 --- /dev/null +++ b/pages/mainPages/headline/headlineDetail.vue @@ -0,0 +1,1393 @@ + + + + + diff --git a/pages/mainPages/headline/index.vue b/pages/mainPages/headline/index.vue new file mode 100644 index 0000000..308df26 --- /dev/null +++ b/pages/mainPages/headline/index.vue @@ -0,0 +1,343 @@ + + + + + diff --git a/pages/mainPages/headline/message.vue b/pages/mainPages/headline/message.vue new file mode 100644 index 0000000..9c05452 --- /dev/null +++ b/pages/mainPages/headline/message.vue @@ -0,0 +1,131 @@ + + + + diff --git a/pages/subPages/businesscard/formcard/formcard.vue b/pages/subPages/businesscard/formcard/formcard.vue new file mode 100644 index 0000000..15c04fe --- /dev/null +++ b/pages/subPages/businesscard/formcard/formcard.vue @@ -0,0 +1,872 @@ + + + + diff --git a/pages/subPages/businesscard/mycard/mycard.vue b/pages/subPages/businesscard/mycard/mycard.vue new file mode 100644 index 0000000..30b37cf --- /dev/null +++ b/pages/subPages/businesscard/mycard/mycard.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/pages/subPages/buyOrder/index.vue b/pages/subPages/buyOrder/index.vue new file mode 100644 index 0000000..51480cd --- /dev/null +++ b/pages/subPages/buyOrder/index.vue @@ -0,0 +1,311 @@ + + + + + diff --git a/pages/subPages/callpge/index.vue b/pages/subPages/callpge/index.vue new file mode 100644 index 0000000..2f8c107 --- /dev/null +++ b/pages/subPages/callpge/index.vue @@ -0,0 +1,443 @@ + + + + diff --git a/pages/subPages/city/city.vue b/pages/subPages/city/city.vue new file mode 100644 index 0000000..3516c27 --- /dev/null +++ b/pages/subPages/city/city.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/pages/subPages/city/selectAddress.vue b/pages/subPages/city/selectAddress.vue new file mode 100644 index 0000000..a6c4b4c --- /dev/null +++ b/pages/subPages/city/selectAddress.vue @@ -0,0 +1,338 @@ + + + + + diff --git a/pages/subPages/commentList/commentList.vue b/pages/subPages/commentList/commentList.vue new file mode 100644 index 0000000..4366099 --- /dev/null +++ b/pages/subPages/commentList/commentList.vue @@ -0,0 +1,145 @@ + + + + + + diff --git a/pages/subPages/consumptionRecords/consumptionRecords.vue b/pages/subPages/consumptionRecords/consumptionRecords.vue new file mode 100644 index 0000000..1aa443f --- /dev/null +++ b/pages/subPages/consumptionRecords/consumptionRecords.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/pages/subPages/consumptionRecords/details.vue b/pages/subPages/consumptionRecords/details.vue new file mode 100644 index 0000000..50b628e --- /dev/null +++ b/pages/subPages/consumptionRecords/details.vue @@ -0,0 +1,181 @@ + + + + + diff --git a/pages/subPages/coupon/coupon.vue b/pages/subPages/coupon/coupon.vue new file mode 100644 index 0000000..fb39c37 --- /dev/null +++ b/pages/subPages/coupon/coupon.vue @@ -0,0 +1,928 @@ + + + + + diff --git a/pages/subPages/coupon/couponDetails/couponDetails.vue b/pages/subPages/coupon/couponDetails/couponDetails.vue new file mode 100644 index 0000000..99ecc37 --- /dev/null +++ b/pages/subPages/coupon/couponDetails/couponDetails.vue @@ -0,0 +1,413 @@ + + + + + diff --git a/pages/subPages/createCommodity/index.less b/pages/subPages/createCommodity/index.less new file mode 100644 index 0000000..ff3fd66 --- /dev/null +++ b/pages/subPages/createCommodity/index.less @@ -0,0 +1,350 @@ + +.optionsMbPackage { + padding: 20upx; +} +.optionsMb { + margin: 0 auto 20upx auto; + width: 730upx; + border-radius: 10upx; + background: #ffffff; +} +.specScoll { + max-height: 800upx; +} +.addBranchMbPackage { + padding: 0 0 0 20upx; + height: 80upx; +} +.addBranchPackage { + padding: 0 20upx; + height: 80upx; + > text { + line-height: 80upx; + font-size: 26upx; + color: #ff4444; + } +} +.addBranchButton { +} +.specsMb { + margin: 0 0 20upx 0; +} +.textRight { + text-align: right; +} +.specsMbTitle { + height: 80upx; +} +.specImg { + width: 30upx; + height: 30upx; +} +.specsMbPackage { + padding: 0 20upx; + background: #ffffff; +} +.specsAddButton { + width: 750upx; + height: 80upx; + background: rgba(255, 255, 255, 1); + text-align: center; + > text { + line-height: 80upx; + font-size: 30upx; + color: #ff4444; + } +} +.mbView { + height: 600upx; +} +.addRuleButton { + width: 200upx; + height: 70upx; + text-align: center; + margin-top: 20upx; + background: rgba(255, 68, 68, 1); + border-radius: 10upx; + > text { + font-size: 24upx; + color: rgba(255, 255, 255, 1); + line-height: 70upx; + } +} +.ruleTitle { + width: 200upx; +} +.ruleMbPackage { + padding: 20upx; +} +.verMid { + vertical-align: middle; +} +.ruleInput { + font-size: 28upx; + color: rgba(51, 51, 51, 1); + width: 400upx; +} +.ruleMb { + margin-bottom: 10upx; + background: #f8f8f8; + border-radius: 10upx; +} +.disInline { + display: inline-block; +} +.colorRed { + color: #ff4444; +} +.rulePackage { + padding: 30upx; +} +.tipsPackage { + padding: 30upx; +} +.full { + height: 20upx; +} +.marT20Auto { + margin: 20upx auto 0 auto; +} +.submitButton { + width: 690upx; + height: 80upx; + background: rgba(255, 68, 68, 1); + border-radius: 40upx; + text-align: center; + > text { + line-height: 80upx; + font-size: 28upx; + color: rgba(255, 255, 255, 1); + } +} +.presettagsMb { + margin: 0 20upx 20upx 0; + display: inline-block; + height: 40upx; + padding: 0 10upx; + text-align: center; + border-radius: 25upx; + border: 1upx solid #666666; + > text { + line-height: 40upx; + font-size: 24upx; + color: #666666; + } +} +.presettagsCMb { + margin: 0 20upx 20upx 0; + display: inline-block; + height: 40upx; + padding: 0 10upx; + text-align: center; + border-radius: 25upx; + background: #ff4444; + border: 1upx solid rgba(0, 0, 0, 0); + > text { + line-height: 40upx; + font-size: 24upx; + color: #ffffff; + } +} +.presettagsView_body { + padding: 30upx; +} +.presettagsView_title { + padding: 30upx; +} +.closePresettags { + width: 40upx; + height: 40upx; + overflow: hidden; + > image { + width: 40upx; + height: 40upx; + } +} +.dis-flex { + display: flex; + justify-content: space-between; +} +.ruleView { + width: 750upx; + background: #ffffff; +} +.submitSpecs { + position: absolute; + bottom: 20upx; + left: 30upx; + width: 690upx; + height: 80upx; + text-align: center; + background: #ff4444; + border-radius: 40upx; + > text { + font-size: 26upx; + line-height: 80upx; + color: #ffffff; + } +} +.submitSpec{ + background-color: #FFFFFF; + height: 80upx; + line-height: 80upx; + color: #FF4444; + text-align: center; + position: fixed; + bottom: 15%; + width: 100%; +} +.specsView { + position: absolute; + left: 0; + right: 0; + top: 0; + z-index: 9999; + width: 750upx; + background-color: #f8f8f8; +} + +.presettagsView { + width: 750upx; + background: #ffffff; +} +.imgPreview { + overflow: hidden; + width: 157upx; + height: 157upx; + background: gray; + margin-right: 37upx; + margin-bottom: 10upx; + border-radius: 10upx; + > image { + width: 157upx; + height: 157upx; + } +} +.pickerPackage { + display: inline-block; +} +.userImgUpdata { + width: 157upx; + height: 157upx; + background: rgba(246, 246, 246, 1); + border: 1upx solid rgba(204, 204, 204, 1); + border-radius: 10upx; + text-align: center; + > image { + margin-top: 53upx; + width: 53upx; + height: 53upx; + } +} +.dataPicker1 { + width: 70upx; + height: 82upx; + display: inline-block; +} +.timePickerView { + vertical-align: middle; + display: inline-block; + margin-left: 49upx; + width: 350upx; + height: 80upx; + > span { + line-height: 80upx; + vertical-align: top; + margin: 0 10upx; + font-size: 24upx; + + color: rgba(51, 51, 51, 1); + } +} +.createCommodity { + font-size: 0; + background: #f6f6f6; + overflow-x: hidden !important; +} +.main { + background: #ffffff; +} +.mianPackage { + padding: 0; + margin: 0 30upx; +} +.inputView { + height: 80upx; +} +.uploadView { + > view { + display: inline-block; + } +} +.dis-flex { + display: flex; + justify-content: space-between; +} +.specInput { + height: 80upx; + font-size: 28upx; + color: rgba(51, 51, 51, 1); +} +.marL10 { + margin-left: 10upx; +} +.titleTetx { + font-size: 28upx; + line-height: 80upx; + color: rgba(153, 153, 153, 1); +} +.uploadTetx { + display: inline-block; + width: 220upx; + font-size: 28upx; + line-height: 80upx; + color: rgba(153, 153, 153, 1); +} +.verMid { + vertical-align: middle; +} +.rightImg { + width: 20upx; + height: 20upx; +} +.contentTetx { + text-align: right; + max-width: 500upx; + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-right: 10upx; + font-size: 28upx; + line-height: 80upx; + color: #333333; +} +.timeTetx { + text-align: right; + max-width: 230upx; + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-right: 10upx; + font-size: 28upx; + line-height: 80upx; + color: #333333; +} +.uploadButton { + margin: 20upx 0upx 20upx 20upx; +} +.marT20 { + margin-top: 20upx; +} +.inputMain { + text-align: right; + width: 400upx; + height: 80upx; + font-size: 28upx; + line-height: 80upx; + color: #333333; +} \ No newline at end of file diff --git a/pages/subPages/createCommodity/index.vue b/pages/subPages/createCommodity/index.vue new file mode 100644 index 0000000..5ff08d4 --- /dev/null +++ b/pages/subPages/createCommodity/index.vue @@ -0,0 +1,2161 @@ + + + + + diff --git a/pages/subPages/customer/customer.vue b/pages/subPages/customer/customer.vue new file mode 100644 index 0000000..b59260b --- /dev/null +++ b/pages/subPages/customer/customer.vue @@ -0,0 +1,166 @@ + + + + + diff --git a/pages/subPages/dealer/apply/apply.vue b/pages/subPages/dealer/apply/apply.vue new file mode 100644 index 0000000..1f2aaf4 --- /dev/null +++ b/pages/subPages/dealer/apply/apply.vue @@ -0,0 +1,567 @@ + + + + diff --git a/pages/subPages/dealer/client/client.vue b/pages/subPages/dealer/client/client.vue new file mode 100644 index 0000000..9f4fe90 --- /dev/null +++ b/pages/subPages/dealer/client/client.vue @@ -0,0 +1,371 @@ + + + + diff --git a/pages/subPages/dealer/contactway/contactway.vue b/pages/subPages/dealer/contactway/contactway.vue new file mode 100644 index 0000000..d3901c5 --- /dev/null +++ b/pages/subPages/dealer/contactway/contactway.vue @@ -0,0 +1,642 @@ + + + + diff --git a/pages/subPages/dealer/earnings/earnings.vue b/pages/subPages/dealer/earnings/earnings.vue new file mode 100644 index 0000000..c61f8d2 --- /dev/null +++ b/pages/subPages/dealer/earnings/earnings.vue @@ -0,0 +1,278 @@ + + + + diff --git a/pages/subPages/dealer/gener/gener.vue b/pages/subPages/dealer/gener/gener.vue new file mode 100644 index 0000000..4cdea19 --- /dev/null +++ b/pages/subPages/dealer/gener/gener.vue @@ -0,0 +1,383 @@ + + + + diff --git a/pages/subPages/dealer/index/index.vue b/pages/subPages/dealer/index/index.vue new file mode 100644 index 0000000..8b53be4 --- /dev/null +++ b/pages/subPages/dealer/index/index.vue @@ -0,0 +1,981 @@ + + + + diff --git a/pages/subPages/dealer/level/level.vue b/pages/subPages/dealer/level/level.vue new file mode 100644 index 0000000..6747eef --- /dev/null +++ b/pages/subPages/dealer/level/level.vue @@ -0,0 +1,404 @@ + + + + + diff --git a/pages/subPages/dealer/myStore/myStore.vue b/pages/subPages/dealer/myStore/myStore.vue new file mode 100644 index 0000000..5c5f78c --- /dev/null +++ b/pages/subPages/dealer/myStore/myStore.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/pages/subPages/dealer/myStoreDetails/myStoreDetails.vue b/pages/subPages/dealer/myStoreDetails/myStoreDetails.vue new file mode 100644 index 0000000..80f6be0 --- /dev/null +++ b/pages/subPages/dealer/myStoreDetails/myStoreDetails.vue @@ -0,0 +1,492 @@ + + + + + diff --git a/pages/subPages/dealer/rank/rank.vue b/pages/subPages/dealer/rank/rank.vue new file mode 100644 index 0000000..49e1db2 --- /dev/null +++ b/pages/subPages/dealer/rank/rank.vue @@ -0,0 +1,257 @@ + + + + diff --git a/pages/subPages/dealer/richtext/setrich.vue b/pages/subPages/dealer/richtext/setrich.vue new file mode 100644 index 0000000..caf7470 --- /dev/null +++ b/pages/subPages/dealer/richtext/setrich.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/pages/subPages/dealer/setshop/setshop.vue b/pages/subPages/dealer/setshop/setshop.vue new file mode 100644 index 0000000..50e0748 --- /dev/null +++ b/pages/subPages/dealer/setshop/setshop.vue @@ -0,0 +1,326 @@ + + + + diff --git a/pages/subPages/dealer/template/template.vue b/pages/subPages/dealer/template/template.vue new file mode 100644 index 0000000..c01189e --- /dev/null +++ b/pages/subPages/dealer/template/template.vue @@ -0,0 +1,33 @@ + + + + diff --git a/pages/subPages/dealer/withdraw/withdraw.vue b/pages/subPages/dealer/withdraw/withdraw.vue new file mode 100644 index 0000000..6a30e87 --- /dev/null +++ b/pages/subPages/dealer/withdraw/withdraw.vue @@ -0,0 +1,543 @@ + + + + + diff --git a/pages/subPages/dealer/withdraw/withdrawrecord.vue b/pages/subPages/dealer/withdraw/withdrawrecord.vue new file mode 100644 index 0000000..9a0665c --- /dev/null +++ b/pages/subPages/dealer/withdraw/withdrawrecord.vue @@ -0,0 +1,218 @@ + + + + diff --git a/pages/subPages/forgetPassword/forgetPassword.vue b/pages/subPages/forgetPassword/forgetPassword.vue new file mode 100644 index 0000000..395b66c --- /dev/null +++ b/pages/subPages/forgetPassword/forgetPassword.vue @@ -0,0 +1,378 @@ + + + + + diff --git a/pages/subPages/goods/index.css b/pages/subPages/goods/index.css new file mode 100644 index 0000000..87b0087 --- /dev/null +++ b/pages/subPages/goods/index.css @@ -0,0 +1,1219 @@ +.container { + background-color: #F7F7F7; +} + +.wfView {} + +.getTip { + width: 750upx; + height: 623upx; + background: rgba(255, 255, 255, 1); + border-radius: 20upx 20upx 0upx 0upx; +} + +.LeBeans{ + background: linear-gradient(to right,#F22C24,#FA6331); + padding: 20upx; + margin-bottom: 50upx; + border-radius: 15upx; + position: relative; +} + +.conversion{ + padding:8upx 15upx 20upx; + background-color: rgba(255,255,255,0.3); + position: absolute; + right: 0; + width: 105upx; + height: 25upx; + vertical-align: top; + top: 50%; + transform: translateY(-50%); + border-radius: 60upx 0upx 0upx 60upx; +} + +.popFull { + height: 100upx; + width: 750upx; +} + +.getTip_package { + padding: 30upx; +} + +.getTip_main { + margin-top: 55upx; + height: 443upx; +} + +.getTip_text { + font-size: 24upx; +} + +.getTip_title { + text-align: center; + font-size: 30upx; + color: rgba(51, 51, 51, 1); +} + +.wfViewMain { + width: 630upx; + background: rgba(255, 255, 255, 1); + border-radius: 10upx; +} + +.wfTitle { + width: 630upx; + height: 200upx; + +} + +.wfTitleImage { + width: 630upx; + height: 200upx; +} + +.wfBodyPackage { + padding: 20upx 30upx; +} + +.textarea{ + font-size: 28upx; +} + +.wfBodyText { + font-size: 26upx; + color: rgba(51, 51, 51, 1); +} + +.wfViewClose { + margin: 80upx auto 0 auto; + width: 48upx; + height: 48upx; +} + +.closeImg { + width: 48upx; + height: 48upx; +} + +/* 商品头部 */ +.goods-header { + position: relative; + z-index: 1; +} + +.goods-viewed { + position: absolute; + bottom: 5%; + right: 0; + font-size: 24upx; + padding: 6upx 12upx; + border-radius: 50upx 0 0 50upx; + background: rgba(0, 0, 0, .4); + color: #FFFFFF; + z-index: 5; +} + +.lxPack { + display: flex; + justify-content: space-between; + line-height: 44upx; +} + +.lx { + text-align: center; + width: 44upx; + height: 44upx; + background: rgba(255, 68, 68, 1); + border-radius: 50%; + overflow: hidden; +} + +.advfei{ + background: -webkit-linear-gradient(90deg, #ff4444 ,#FF8032 ); /* Safari 5.1 - 6.0 */ + background: -o-linear-gradient(90deg, #ff4444, #FF8032); /* Opera 11.1 - 12.0 */ + background: -moz-linear-gradient(90deg, #ff4444 , #FF8032); /* Firefox 3.6 - 15 */ + background: linear-gradient(90deg, #ff4444 , #FF8032); /* 标准的语法(必须放在最后) */ + position: absolute; + font-size: 28upx; + bottom: 150upx; + left: 20upx; + width: 90vw; + padding: 20upx 20upx; + /* background-color: #FFF0B2; */ + display: flex; + border-radius: 10upx; +} + +.lxImg { + width: 30upx; + height: 30upx; + margin-top: 8upx; +} + +.goods-swiper { + width: 100vw; + /* height: 50vh; */ + position: relative; + z-index: 1; +} + +.swiper-item { + height: 100vw; +} + +.goods-header .coupon-Image { + width: 100vw; + height: 100vw; + display: block; +} + +.goods-swiper .swiper-item image { + width: 100%; + height: 100%; + display: block; +} + +/* 弹幕购买提示 */ +.success-tips { + position: fixed; + bottom: 83%; + left: 30upx; + height: 54upx; + line-height: 54upx; + background: rgba(0, 0, 0, .5); + border-radius: 50px; + z-index: 50; + padding: 0 12upx 0 6upx; + opacity: 0; + transition: opacity .4s; +} + +.success-tips.show { + opacity: 1; +} + +/* */ +.success-tips .success-avatar { + width: 40upx; + height: 40upx; + display: block; + border-radius: 50%; +} + +.success-tips .success-goods { + max-width: 450upx; +} + +/* 商品详情 */ +.goods-content { + box-sizing: border-box; +} + +.goods-price-box { + padding-bottom: 12upx; +} + +.goods-content .goods-price .goods-price-now { + color: rgba(254, 80, 79, 1); +} + +.goods-content .goods-price .goods-price-now image { + width: 56upx; + height: 56upx; +} + +.goods-content .goods-price .goods-price-now .credit { + color: rgba(254, 80, 79, 1); +} + +.money-label { + display: inline-block; + margin-right: 6upx; +} + +.goods-content .goods-price .goods-price-old { + font-size: 24upx; + color: rgba(153, 153, 153, 1); + line-height: 52upx; + margin-left: 16upx; + text-decoration: line-through; +} + +.goods-content .goods-browse { + font-size: 24upx; + color: rgba(153, 153, 153, 1); + line-height: 60upx; +} + +.goods-title-mian { + letter-spacing: 2upx; + line-height: 1.3em; +} + +.activity-item image { + width: 26upx; + height: 26upx; + display: block; + margin-right: 12upx; +} + +/* 会员卡 */ +.member-box { + background: linear-gradient(0deg, rgba(235, 194, 135, 1) 0%, rgba(237, 214, 170, 1) 100%); + border-radius: 10upx; +} + +.member-title { + width: 360upx; +} + +.member-left image { + width: 60upx; + height: 60upx; + display: block; +} + +.member-fontColor { + color: #8C5200; +} + +.member-fontColor-cut { + width: 2upx; + height: 26upx; + background: #8C5200; + opacity: .5; + margin: 0 20upx; +} + +.member-right { + flex: 1; + background: linear-gradient(105deg, transparent 10.5%, #333333 12.5%, #333333 50.5%, #333333 50.5%); + color: #EED196; + height: 60upx; + line-height: 60upx; + padding-left: 20upx; + border-radius: 10upx 10upx 10upx 0; +} + +.member-right text { + font-size: 24upx; + margin-left: 10upx; +} + +/* 邀请 */ +.already-box-padding { + padding: 30upx 30upx 0; +} + +.goods-already-box { + box-shadow: 0 2upx 12upx 0 rgba(221, 221, 221, 0.34); + border-radius: 10upx; +} + +.goods-already-box .goods-already { + padding: 0 0 30upx 0; +} + +.goods-already-box .goods-already .goods-already-num { + color: #333333; + line-height: 1.2em; +} + +.goods-already-box .goods-already .goods-already-user { + margin-top: 15upx; + height: 68upx; +} + +.goods-already-box .goods-already .goods-already-user .user-avatar { + width: 55upx; + height: 55upx; + border-radius: 55upx; + display: inline-block; + margin-right: -12upx; + position: relative; + vertical-align: top; +} + +.goods-already-box .goods-already .goods-already-user .user-avatar.user-more { + background: #F2F2F2; + color: #BBBBBB; + text-align: center; + line-height: 50upx; + z-index: 1; +} + +.goods-already-box .goods-already .goods-invite { + color: #333333; + width: 230upx; + height: 60upx; + line-height: 60upx; + font-size: 22upx; + text-align: center; + border-radius: 50upx; + position: relative; + margin-bottom: 1%; + z-index: 1; + background: linear-gradient(0deg, rgba(245, 182, 32, 1) 0%, rgba(246, 210, 70, 1) 100%); +} + +.goods-already-box .goods-already .goods-invite button { + position: absolute; + width: 100%; + height: 100%; + opacity: 0; +} + +.goods-already-box .goods-already .goods-invite-reward { + position: absolute; + right: 3%; + top: -15%; + z-index: 2; + height: 50upx; + color: #FFFFFF; + line-height: 50upx; + background: linear-gradient(90deg, rgba(254, 80, 79, 1), rgba(254, 133, 79, 1)); + box-shadow: 0 2upx 10upx 0 rgba(254, 80, 79, 0.54); + border-radius: 8upx; + text-align: center; + font-size: 20upx; + padding: 0 20upx; +} + +.goods-already-box .goods-already .goods-invite-reward::after { + content: " "; + position: absolute; + left: 50%; + bottom: -28upx; + transform: translateX(-50%); + border-width: 15upx; + border-style: solid; + border-color: #FE6C4F transparent transparent transparent; +} + +/* 标题花边样式 */ +.lace-style .lace-1 { + position: absolute; + /* left: 35%; */ + top: 14upx; + width: 14upx; + height: 14upx; + background: rgba(255, 68, 68, 1); + border-radius: 50%; +} + +.lace-style .lace-2 { + position: absolute; + /* left: 34%; */ + top: 18upx; + width: 14upx; + height: 14upx; + background: rgba(255, 68, 68, 1); + opacity: 0.2; + border-radius: 50%; +} + +.containar-title-left .lace-1 { + left: 35%; +} + +.containar-title-right .lace-1 { + right: 35%; +} + +.containar-title-left .lace-2 { + left: -8upx; +} + +.containar-title-right .lace-2 { + right: -8upx; +} + +/* 搭配商品样式 */ +.match-goods { + background: rgba(255, 255, 255, 1); + box-shadow: 0 4upx 12upx 0 rgba(221, 221, 221, 0.34); + border-radius: 10upx; +} + +.match-goods-info .goods-info-left { + width: 160upx; + height: 160upx; + background-size: 160upx 160upx; + background-repeat: no-repeat; + background-image: url('https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1726110657,2456852062&fm=26&gp=0.jpg'); + flex-shrink: 0; +} + +.match-goods-info .goods-info-right .goods-info-right-title { + height: 2, 6em; + line-height: 1, 3em; +} + +.match-goods-price .match-buy-btn { + background-color: #ff4444; + width: 146upx; + height: 54upx; + line-height: 54upx; + background: rgba(255, 68, 68, 1); + border-radius: 30upx; +} + +/* 使用流程 */ +.use-flow-item { + width: 24%; +} + +.use-flow-item .use-order { + width: 34upx; + height: 34upx; + line-height: 34upx; + background: rgba(255, 68, 68, 1); + box-shadow: 0 2upx 6upx 0 rgba(205, 2, 2, 0.35); + border-radius: 50%; + margin: 0 auto 30upx; +} + +.use-cut { + position: absolute; + top: 11%; + width: 194upx; + border-top: 1px solid #EEEEEE; + transform-origin: 0 0; + transform: scaleY(0.5); + z-index: 2; +} + +.use-cut-left { + left: 19%; +} + +.use-cut-right { + right: 19%; +} + +.store-addressInfo-icon { + width: 44upx; + height: 44upx; + line-height: 44upx; + background: rgba(255, 68, 68, 1); + border-radius: 50%; + font-size: 24upx; + flex-shrink: 0; +} + +/* 详情tabBar */ +/* 商品详情 */ +.goods-detail-nav {} + +.goods-detail-nav .goods-detail-nav-item { + color: #999999; + font-size: 30upx; + text-align: center; + height: 86upx; + line-height: 86upx; + position: relative; +} + +.goods-detail-nav .goods-detail-nav-item.active { + color: #333333; + font-weight: bold; +} + +.select-nav-items { + position: absolute; + left: 50%; + top: 30upx; + width: 56upx; + height: 10upx; + transform: translateX(-50%); +} +/* #ifndef H5 */ + /* 仅在app平台显示 */ + .select-nav-items { + position: absolute; + left: 50%; + top: 75upx; + width: 56upx; + height: 10upx; + transform: translateX(-50%); + } +/* #endif */ + +/* #ifdef H5 */ + /* 仅在app平台显示 */ + .select-nav-items { + position: absolute; + left: 50%; + top: 30upx; + width: 56upx; + height: 10upx; + transform: translateX(-50%); + } +/* #endif */ +.select-nav-items image { + width: 100%; + height: 100%; +} + +/* 商品评价 */ +.evaluation-item { + padding: 30upx 0; +} + +.evaluation-item:first-child { + border-top: 0; +} + +.evaluation-all { + width: 270upx; + height: 70upx; + border: 1px solid rgba(238, 238, 238, 1); + border-radius: 38upx; + margin: 30upx auto 0; + padding-left: 20upx; +} + +.evaluation-all-iconfont { + color: #333333; + font-size: 36upx; +} + +.evaluation-user image { + width: 60upx; + height: 60upx; + display: block; + border-radius: 50%; + margin-right: 10upx; +} + +.evaluation-grade .iconfont { + width: 36upx; + height: 36upx; + line-height: 36upx; + font-size: 28upx; + display: block; + color: #CCCCCC; +} + +.evaluation-grade .iconfont.select { + color: #FF4444 +} + +.evaluation-bd { + margin-top: 20upx; +} + +.evaluation-imgs { + margin-top: 12upx; +} + +.evaluation-imgs image { + width: 220upx; + margin: 0 10upx 20upx 0; + height: 220upx; + border-radius: 6upx; +} + +.reply-content-item .reply-content-itemfont { + vertical-align: middle; + margin-right: 14upx; +} + +/* 底部菜单 */ +.goods-footer { + + background: #FFFFFF; + text-align: center; + height: 100upx; + position: fixed; + left: 0; + right: 0; + bottom: 0; +} + +.goods-footer-crted { + text-align: center; + height: 100upx; + line-height: 80upx; + position: fixed; + left: 0%; + right: 0; + bottom: 0; + z-index: 30; +} + +.goods-footer-item { + flex: 1; + box-sizing: border-box; + height: 100upx; + align-items: center; + position: relative; +} + +.goods-footer-item>button { + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + opacity: 0; + z-index: 8; +} + +.goods-footer-item image { + width: 30upx; + height: 30upx; + display: inline-block; + margin: 0 20upx; +} + +.goods-footer-item .goods-footer-item-text { + font-size: 24upx; + line-height: 1.5em; + color: #333333; + text-align: center; +} + +.goods-footer .goods-footer-btn { + width: 352upx; + height: 72upx; + line-height: 72upx; + text-align: center; + border-radius: 50upx; + color: #FFFFFF; + background: #FE504F; + font-size: 28upx; + font-weight: bold; + margin: 17upx 30upx 0 0; + overflow: hidden; +} + +.goods-footer.footer-padding { + padding-bottom: 20px +} + +.goods-footer .footer-btn { + width: 100%; + text-align: center; +} + +.goods-footer .goods-spread-btn { + background: #FFD940; +} + +.go-buy { + margin-right: 30upx; + height: 80upx; + border-radius: 40upx; +} + +.alrea-remind-go-buy { + background-color: rgb(172, 177, 172); +} + +.remind-go-buy { + background-color: #2AC418; +} + +.star-go-buy { + background-color: #FF4444; +} + +.end-go-buy { + background-color: #C0C0C0; +} + +.go-buy-crted { + background-color: #FF4444; + margin: 0 30upx; + height: 80upx; + border-radius: 40upx; +} + +.unqualified-gobuy { + background-color: #C0C0C0; + margin-right: 30upx; + height: 80upx; + border-radius: 40upx; + color: #FFFFFF; +} + +.out_buy-left { + width: 100%; + height: 100%; + background-color: #FF4444; + border-radius: 40upx 0 0 40upx; +} + +.out_buy-leftTop { + margin-top: 6upx; +} + +.out_buy-right { + width: 100%; + height: 100%; + /* border-radius: 0 40upx 40upx 0; */ +} + +/* 活动未开始或者已结束状态 */ +.havebtn { + background-color: #EEEEEE; + line-height: 80upx; +} + +/* 活动开始状态 */ +.starbtn { + background-color: #FFD200; +} + +/* 拼团按钮 */ +.group-go-buy { + width: 50%; + margin-right: 30upx; + height: 80upx; + border-radius: 40upx; +} + +/* 砍价 */ + +.bargainbtn { + line-height: 70upx; +} + +.bargain-buy-box { + background: rgba(255, 248, 245, 1); + border-radius: 10upx; +} + +.bargain-buy-top-title { + color: #FF4444; +} + +.icon-right-buybarainIcon { + font-size: 24upx; +} + +.bargain-countdown { + height: 110upx; + background-size: 100% 110upx; + background-repeat: no-repeat; + padding: 0 30upx 0; +} + +.bargain-label-box { + border-radius: 4upx; + padding: 4upx 8upx; +} + +.bargain-label-box>image { + width: 34upx; + height: 34upx; + display: block; +} + +.bargain-label-box>view { + color: #F02E24; +} + +.bargain-label-icon-rush { + color: #333333 !important; + left: -6%; + top: 20%; +} + +.bargain-label-icon-bargin { + color: #FFFFFF !important; + left: -12%; + top: 20%; +} + +.bargain-label-icon { + position: absolute; + /* transform: translateY(-50%); */ + font-size: 24upx; + transform: rotate(90deg); +} + +.bargain-countdown-oldPrice { + transform: scale(.95, .95); + text-decoration: line-through; +} + +.bargain-countdown-oldPrice text { + margin-left: 10upx; +} + +.countdownTime-style text { + height: 38upx; + line-height: 38upx; + border-radius: 4upx; + padding: 4upx 6upx; +} + +.countdownTime-style-color1 text { + background: #F02E24; + color: #FFFFFF; +} + +.countdownTime-style-color2 text { + background: rgba(255, 255, 255, 1); + color: #F02E24; +} + +/* 抢购倒计时 */ +.rush_logo { + width: 70upx; + height: 70upx; + display: block; +} + +.rush-label-box { + background-color: #333333; + color: #EED196; + border-radius: 4upx; + padding: 4upx 8upx; +} + +/* 拼团倒计时 */ +.group-countdown { + height: 110upx; + background-size: 100% 110upx; + background-repeat: no-repeat; + padding: 0 30upx 0; +} + +.group-countdown-oldPrice { + transform: scale(.95, .95); +} + +.group-countdown-num { + height: 34upx; + border: 1px solid rgba(255, 255, 255, 1); + border-radius: 4upx; +} + +.group-countdown-numGroup { + padding: 0 0 0 10upx; +} + +.group-countdown-num-logo { + padding: 0 8upx; + width: 28upx; + height: 100%; + line-height: 34upx; +} + +.group-countdown-num-logo>image { + width: 30upx; + height: 26upx; +} + +.group-countdown-title { + transform: scale(.9, .9); +} + +.groupcountdownTime-style text { + height: 38upx; + line-height: 38upx; + background: rgba(255, 255, 255, 1); + border-radius: 4upx; + color: #F02E24; + padding: 2upx 6upx; +} + +.group-countdown-nowPrice>text { + vertical-align: bottom; +} + +/* 拼团列表 */ +.group-list-content .group-list-title>text { + color: #FF4444; +} + +.group-list-moreicon { + font-size: 24upx; + color: #999999; +} + +.group-detail .group-item-logo { + width: 60upx; + height: 60upx; + background-repeat: no-repeat; + background-size: 60upx 60upx; + border-radius: 50%; +} + +.clustering-num { + color: #FF4444; +} + +.group-list-item-btn { + width: 126upx; + height: 52upx; + line-height: 52upx; + border-radius: 26upx; +} + +.group-list-item-btn-isEndTimefalse { + background: rgba(255, 68, 68, 1); +} + +.group-list-item-btn-isEndTimeTrue { + background: #CCCCCC +} + +/* 社群 */ +.goods-community { + padding-top: 20upx; +} + +.community-user .community-user-img { + width: 68upx; + height: 68upx; + display: block; + margin-right: 20upx; + border-radius: 50%; +} + +.community-add { + /* width: 110upx; */ + padding: 0 20upx; + height: 54upx; + line-height: 54upx; + border-radius: 10upx; + font-size: 24upx; +} + +.community-add-bgcolor { + background-color: #2AC418; +} + +.community-detail { + border-radius: 20upx; + overflow: hidden; +} + +.community-detail .community-header { + width: 70vw; + height: 120upx; + line-height: 120upx; + overflow: hidden !important; +} + +.community-detail .community-header .community-header-text { + z-index: 2; +} + +.community-detail .community-header::after { + content: " "; + position: absolute; + top: -160upx; + left: -25%; + width: 150%; + height: 280upx; + border-radius: 60%; + background: linear-gradient(0deg, rgba(228, 63, 53, 1), rgba(253, 92, 79, 1)); + z-index: 1; +} + +.community-detail .community-body { + padding: 50upx; +} + +.community-detail .community-phone { + height: 80upx; + line-height: 80upx; + margin: 0 30upx 30upx; + padding: 0 20upx 0 8upx; + border-radius: 10upx; + background: #F6F6F6; +} + +.community-detail .community-number .community-number-icon { + width: 60upx; + height: 60upx; + display: block; + /* margin-right: 15upx; */ +} + +.community-detail .community-bdial { + width: 96upx; + height: 52upx; + line-height: 52upx; + background-color: #FF4444; + border-radius: 10upx; + color: #FFFFFF; +} + +.community-detail .community-reply { + width: 200upx; + height: 70upx; + line-height: 70upx; + background: linear-gradient(0deg, rgba(255, 115, 115, 1) 0%, rgba(255, 68, 68, 1) 100%); + border-radius: 35upx; + margin: 0 auto 30upx; +} + +.community-detail .community-qrcodeimg { + width: 366upx; + height: 366upx; + display: block; + margin: 0 auto 30upx; +} + +.bargain-countdown-right-loading { + width: 100upx; + height: 80upx; +} + +.partLoaing { + position: absolute; + right: 20%; + top: 0; +} + +.store-addressInfo-onelist { + width: 87%; +} + +.masking { + position: fixed; + /* width: 100%; + height: 100%; */ + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 100; + background: rgba(0, 0, 0, .5); + /* display: none */ +} + +.to-share { + position: fixed !important; + z-index: 1009; + right: 10upx; + top: 0; + overflow: auto; + width: 500upx; + height: 380upx; +} + +.limit-rushBox { + box-shadow: 0 2rpx 12rpx 0 rgba(221, 221, 221, 0.34); + border-radius: 10rpx; +} + +.progress-box { + width: 280upx; + height: 24upx; + border-radius: 12upx; + background-color: #FEB2B2; +} + +.progress-bar { + background-image: linear-gradient(60deg, #FF4444 0, #FF4444 9%, #ff6c6c 0, #ff6c6c 12%, #FF4444 0, #FF4444 18%, #ff6c6c 0, #ff6c6c 21%, #FF4444 0, #FF4444 27%, #ff6c6c 0, #ff6c6c 30%, #FF4444 0, #FF4444 37%, #ff6c6c 0, #ff6c6c 40%, #FF4444 0, #FF4444 47%, #ff6c6c 0, #ff6c6c 50%, #FF4444 0, #FF4444 57%, #ff6c6c 0, #ff6c6c 60%, #FF4444 0, #FF4444 67%, #ff6c6c 0, #ff6c6c 70%, #FF4444 0, #FF4444 77%, #ff6c6c 0, #ff6c6c 80%, #FF4444 0, #FF4444 87%, #ff6c6c 0, #ff6c6c 90%, #FF4444 0, #FF4444 100%); + position: absolute; + left: 0; + right: 0; + top: 0; + height: 100%; + border-radius: 12upx; + z-index: 2; + max-width: 100%; +} + +.switchShow{ + position: absolute; + bottom: 80upx; + width: 220upx; + left: 50%; + z-index: 99; + transform: translateX(-50%); +} +.switchImg{ + width: 80upx; + height: 40upx; + color: #333333; + border: 1upx solid #FFFFFF; + border-radius: 60upx; + line-height: 40upx; + font-size: 24upx; + background-color: rgba(255,255,255,0.3); + text-align: center; +} +.switchVideo{ + width: 80upx; + height: 40upx; + color: #FFFFFF; + border: 1upx solid #FF4444; + border-radius: 60upx; + line-height: 40upx; + font-size: 24upx; + background-color: #FF4444; + text-align: center; +} +.switchImg-icon{ + font-size: 24upx; +} + +.default-progress-bar { + position: absolute; + width: 280upx; + height: 24upx; + left: 0; + top: 50%; + transform: translateY(-50%); + z-index: 3; +} + +.default-progress-bar .shrink { + transform: scale(0.85); +} + +.audio-main { + position: fixed; + right: 50upx; + top: 10%; + z-index: 10; +} + +.audio-bg { + position: relative; +} + +.audio-bg .audio-gif { + width: 100upx; + height: 100upx; + background-size: 100upx 100upx; + background-repeat: no-repeat; +} + +.audio-bg .audio-gif .audio-png { + position: absolute; + background-size: 80upx 80upx; + animation: rotate2d 1.2s linear infinite; + z-index: -1; + width: 80upx; + height: 80upx; +} + +.audio-bg.stop-audio .audio-gif { + background: none !important; +} + +.audio-bg.stop-audio .audio-png { + animation: none; +} + +@keyframes rotate2d { + from { + transform: rotate(0) + } + + to { + transform: rotate(360deg) + } +} diff --git a/pages/subPages/goods/index.vue b/pages/subPages/goods/index.vue new file mode 100644 index 0000000..0163c6e --- /dev/null +++ b/pages/subPages/goods/index.vue @@ -0,0 +1,2493 @@ + + + + diff --git a/pages/subPages/merchant/set/set.vue b/pages/subPages/merchant/set/set.vue new file mode 100644 index 0000000..a9ee288 --- /dev/null +++ b/pages/subPages/merchant/set/set.vue @@ -0,0 +1,1860 @@ + + + + + diff --git a/pages/subPages/merchant/storePcLogin/storePcLogin.vue b/pages/subPages/merchant/storePcLogin/storePcLogin.vue new file mode 100644 index 0000000..6b199f3 --- /dev/null +++ b/pages/subPages/merchant/storePcLogin/storePcLogin.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/pages/subPages/mineCollection/mineCollection.vue b/pages/subPages/mineCollection/mineCollection.vue new file mode 100644 index 0000000..6a44d1b --- /dev/null +++ b/pages/subPages/mineCollection/mineCollection.vue @@ -0,0 +1,549 @@ + + + + + diff --git a/pages/subPages/myPost/myPost.vue b/pages/subPages/myPost/myPost.vue new file mode 100644 index 0000000..5db449c --- /dev/null +++ b/pages/subPages/myPost/myPost.vue @@ -0,0 +1,305 @@ + + + + + diff --git a/pages/subPages/orderList/afterSale/afterSale.vue b/pages/subPages/orderList/afterSale/afterSale.vue new file mode 100644 index 0000000..fa11160 --- /dev/null +++ b/pages/subPages/orderList/afterSale/afterSale.vue @@ -0,0 +1,943 @@ + + + + + diff --git a/pages/subPages/orderList/orderDetails/orderDetails.vue b/pages/subPages/orderList/orderDetails/orderDetails.vue new file mode 100644 index 0000000..e35b4f0 --- /dev/null +++ b/pages/subPages/orderList/orderDetails/orderDetails.vue @@ -0,0 +1,1611 @@ + + + + + diff --git a/pages/subPages/orderList/orderList.vue b/pages/subPages/orderList/orderList.vue new file mode 100644 index 0000000..aa8f65d --- /dev/null +++ b/pages/subPages/orderList/orderList.vue @@ -0,0 +1,890 @@ + + + + + diff --git a/pages/subPages/orderList/orderTakeout/orderTakeout.vue b/pages/subPages/orderList/orderTakeout/orderTakeout.vue new file mode 100644 index 0000000..a5a3f32 --- /dev/null +++ b/pages/subPages/orderList/orderTakeout/orderTakeout.vue @@ -0,0 +1,381 @@ + + + + + + diff --git a/pages/subPages/paySuccess/paySuccess.vue b/pages/subPages/paySuccess/paySuccess.vue new file mode 100644 index 0000000..77fa83b --- /dev/null +++ b/pages/subPages/paySuccess/paySuccess.vue @@ -0,0 +1,822 @@ + + + + + diff --git a/pages/subPages/postDetails/postDetails.less b/pages/subPages/postDetails/postDetails.less new file mode 100644 index 0000000..3e62558 --- /dev/null +++ b/pages/subPages/postDetails/postDetails.less @@ -0,0 +1,1246 @@ +/* css */ +.replyViewPackage { + padding: 30upx; +} +.full { + width: 750upx; + height: 98upx; +} +.marT10{ + margin-top: 10upx; +} +.marT18{ + margin-top: 18upx; +} +.qbBottomNavLeft { + display: flex !important; + justify-content: space-around !important; + vertical-align: top; + height: 98upx; + width: 100%; + > view { + vertical-align: middle; + display: inline-block; + text-align: center; + > view { + width: 50upx; + margin: auto; + > image { + width: 40upx; + height: 40upx; + } + } + > span { + font-size: 20upx; + + font-weight: bold; + color: rgba(51, 51, 51, 1); + } + } +} +.qbBottomNavCenter { + display: inline-block; + vertical-align: top; + width: 180upx; + height: 60upx; + background: rgba(23, 209, 23, 1); + border-radius: 30upx; + text-align: center; + > view { + vertical-align: middle; + display: inline-block; + margin: 10upx auto 0 auto; + width: 40upx; + > image { + width: 40upx; + height: 40upx; + } + } + > span { + line-height: 60upx; + vertical-align: middle; + font-size:24upx !important; + color:rgba(255,255,255,1) !important; + } +} +.qbBottomNavRight { + vertical-align: top; + width: 180upx; + height: 60upx; + background: rgba(255, 68, 68, 1); + border-radius: 30upx; + text-align: center; + > view { + vertical-align: middle; + display: inline-block; + margin: 10upx auto 0 auto; + width: 40upx; + > image { + width: 40upx; + height: 40upx; + } + } + > span { + line-height: 60upx; + vertical-align: middle; + font-size:24upx !important; + color:rgba(255,255,255,1) !important; + } +} +.qbBottomNav { + left: 0; + width: 750upx; + height: 98upx; + background: #ffffff; + position: fixed; + z-index: 99; + bottom: 0; + > view { + display: inline-block; + } +} + +.audit{ + width: 92%; + padding: 20upx 30upx; + background-color: #ffffff; + position: fixed; + bottom: 0; + left: 0; + z-index: 99; +} + +.auditNotPass{ + width: 335upx; + height: 60upx; + background-color: #ff4444; + border-radius: 60upx; + line-height: 60upx; + text-align: center; + color: #ffffff; + font-size: 24upx; + font-weight: 500; + float: left; +} + +.auditPass{ + width: 335upx; + height: 60upx; + background-color: #17D117; + border-radius: 60upx; + line-height: 60upx; + text-align: center; + color: #ffffff; + font-size: 24upx; + font-weight: 500; + float: right; +} + +.refuseCause{ + width: 608upx; + height: 588upx; + background-color: #ffffff; + border-radius: 20upx; + padding: 30upx 40upx 50upx 40upx; + box-sizing: border-box; +} + +.refuseTitle{ + padding-top: 20upx; + padding-bottom: 50upx; + text-align: center; + font-size: 30upx; + font-weight: 500; + position: relative; +} + +.iconstyle{ + position: absolute; + right: 0; + top: 0; + font-size: 40upx; + color: #959595; +} + +.refuseText{ + width: 528upx; + height: 280upx; + padding: 30upx; + box-sizing: border-box; + background-color: #f8f8f8; + font-size: 28upx; +} + +.confirmRefuse{ + width: 528upx; + height: 80upx; + line-height: 80upx; + background-color: #ff4444; + text-align: center; + font-size: 28upx; + border-radius: 60upx; + margin-top: 40upx; + color: #ffffff; +} + +.pdShopMbDiscountLeft { + > view { + margin-top: 20upx; + > view { + vertical-align: middle; + width: 24upx; + height: 24upx; + border-radius: 2upx; + display: inline-block; + text-align: center; + > span { + line-height: 24upx; + font-size: 20upx; + color: rgba(255, 255, 255, 1); + } + } + > span { + vertical-align: middle; + margin-left: 10upx; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + width: 305upx; + font-size: 24upx; + + color: rgba(102, 102, 102, 1); + } + } +} +.pdShopMbDiscount { + display: flex; + justify-content: space-between; + > view { + display: inline-block; + vertical-align: top; + } +} +.pdShopMbType { + > view { + margin-top: 10upx; + > span { + font-size: 24upx; + + color: rgba(153, 153, 153, 1); + } + } +} +.pdShopMbPf { + margin-top: 10upx; + display: flex; + justify-content: space-between; + > view { + vertical-align: middle; + display: inline-block; + > image { + vertical-align: middle; + margin-right: 10upx; + width: 25upx; + height: 25upx; + } + > span { + vertical-align: middle; + font-size: 24upx; + color: rgba(153, 153, 153, 1); + } + } + > span { + vertical-align: middle; + font-size: 24upx; + color: rgba(153, 153, 153, 1); + } +} +.pdShopMbRight { + width: 510upx; + padding-left: 10upx; +} +.pdShopMbName { + display: flex; + justify-content: space-between; + > span { + font-size: 30upx; + + font-weight: bold; + color: rgba(0, 0, 0, 1); + } + > view { + display: inline-block; + > image { + height: 0; + width: 28upx; + height: 28upx; + } + } +} +.pdShopMbLeft { + width: 159upx; + height: 159upx; + border-radius: 10upx; + overflow: hidden; + > image { + width: 159upx; + height: 159upx; + } +} +.pdShopMb { + border-bottom: 1upx solid rgba(238, 238, 238, 1); + padding-bottom: 30upx; + margin: 40upx 0 0 0; + > view { + display: inline-block; + vertical-align: top; + } +} +.pdShopTitle { + display: flex; + justify-content: space-between; + > span:nth-child(1) { + vertical-align: middle; + font-size: 32upx; + + font-weight: bold; + color: rgba(51, 51, 51, 1); + } + > span:nth-child(2) { + line-height: 40upx; + vertical-align: middle; + font-size: 24upx; + + color: rgba(153, 153, 153, 1); + } +} +.pdShopPackage { + padding: 30upx; +} +.pdShop { + margin: 20upx 0 0 0; + width: 750upx; + background: rgba(255, 255, 255, 1); +} +.moreComment { + margin: 20upx 0 0 0; + text-align: center; + > span { + font-size: 28upx; + + color: rgba(153, 153, 153, 1); + vertical-align: middle; + } + > image { + height: 30upx; + margin-left: 10upx; + vertical-align: middle; + width: 30upx; + } +} +.qbReplyMb { + margin-top: 20upx; + > view { + margin-top: 20upx; + } +} +.replyName { + font-size: 24upx; + + color: rgba(66, 128, 197, 1); +} +.mh { + font-size: 24upx; + + color: rgba(66, 128, 197, 1); +} +.name { + margin-left: 10upx; + font-size: 24upx; + + color: rgba(66, 128, 197, 1); +} +.hf { + font-size: 24upx; + + color: #333333; +} +.text { + margin-left: 20upx; + font-size: 24upx; + + color: #999999; +} +.pdCommentMbReplyPackage { + padding: 30upx; + > view { + margin: 20upx 0 0 0; + } + > view:nth-child(1) { + margin: 0; + } +} +.pdCommentMbReply { + margin: 20upx 0; + width: 626upx; + background: rgba(248, 248, 248, 1); + border-radius: 4upx; +} +.pdCommentMbMain { + margin: 15upx 0 0 0; + > view:nth-child(1) { + > span { + font-size: 28upx; + color: rgba(51, 51, 51, 1); + } + } + > view:nth-child(2) { + margin-top: 20upx; + > span { + font-size: 24upx; + color: rgba(51, 51, 51, 1); + } + } + > view:nth-child(1) { + > text { + font-size: 28upx; + color: rgba(51, 51, 51, 1); + } + } + > view:nth-child(2) { + margin-top: 20upx; + > text { + font-size: 24upx; + color: rgba(51, 51, 51, 1); + } + } +} +.pdCommentMbRightPackage { + padding-left: 15upx; +} +.pdCommentMbRight { + width: 626upx; +} +.pdCommentMbRightTitle { + display: flex; + justify-content: space-between; + > span { + line-height: 48upx; + vertical-align: middle; + font-size: 28upx; + + font-weight: bold; + color: rgba(51, 51, 51, 1); + } + > view { + display: inline-block; + vertical-align: middle; + width: 112upx; + height: 50upx; + background: rgba(248, 248, 248, 1); + border-radius: 4upx; + text-align: center; + line-height: 50upx; + > image { + vertical-align: middle; + width: 30upx; + height: 30upx; + } + > span { + margin-left: 10upx; + line-height: 50upx; + vertical-align: middle; + font-size: 24upx; + + color: rgba(51, 51, 51, 1); + } + } +} +.pdCommentMbLeft { + width: 48upx; + height: 48upx; + overflow: hidden; + border-radius: 50%; + > image { + width: 48upx; + height: 48upx; + } +} +.pdCommentMb { + margin: 40upx 0 0 0; + > view { + display: inline-block; + vertical-align: top; + } +} +.pdCommentTitle { + display: flex; + justify-content: space-between; + > span:nth-child(1) { + vertical-align: middle; + font-size: 32upx; + font-weight: bold; + color: rgba(51, 51, 51, 1); + } + > span:nth-child(2) { + vertical-align: middle; + font-size: 28upx; + color: rgba(66, 128, 197, 1); + } +} +.pdComment { + margin: 20upx 0 0 0; + width: 750upx; + background: rgba(255, 255, 255, 1); +} +.pdCommentPackage { + padding: 30upx; +} +.pdHbFoot { + margin: 30upx 0 0 0; + text-align: center; + > span { + font-size: 24upx; + + color: rgba(255, 255, 255, 1); + } +} +.pdHbMbRight { + > span { + line-height: 73upx; + font-size: 28upx; + + color: rgba(209, 56, 59, 1); + } +} +.pdHbMbLeftInfo { + margin-left: 15upx; + > view:nth-child(1) { + > span { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; + width: 209upx; + font-size: 28upx; + + color: rgba(51, 51, 51, 1); + vertical-align: middle; + } + > view { + margin-left: 10upx; + display: inline-block; + vertical-align: middle; + width: 110upx; + height: 34upx; + background: rgba(255, 196, 31, 1); + border-radius: 4upx; + text-align: center; + > span { + line-height: 34upx; + font-size: 20upx; + + color: rgba(255, 255, 255, 1); + } + } + } + > view:nth-child(2) { + > span { + font-size: 28upx; + + color: rgba(51, 51, 51, 1); + } + } +} +.pdHbMbLeftImg { + width: 74upx; + height: 74upx; + border-radius: 50%; + background-size: 74upx 74upx; + background-repeat: no-repeat; +} +.pdHbMbLeft { + > view { + display: inline-block; + vertical-align: middle; + } +} +.pdHbMb { + margin-top: 40upx; + display: flex; + justify-content: space-between; + > view { + display: inline-block; + vertical-align: middle; + } +} +.pdHbMb1 { + margin-bottom: 15upx; + display: flex; + justify-content: space-between; + > view { + display: inline-block; + vertical-align: middle; + } +} +.pdHbBodyPackage { + padding: 40upx 30upx; + > view:nth-child(1) { + margin-top: 0; + } +} +.pdHbBody { + margin: 20upx 0 0 0; + width: 630upx; + background: rgba(255, 255, 255, 0.9); + border-radius: 20upx; +} +.pdHbTitle { + text-align: center; + > span { + font-size: 24upx; + + color: rgba(255, 255, 255, 1); + } +} +.pdHbPackage { + padding: 30upx; +} +.pdHb { + margin: 20upx auto 0 auto; + width: 690upx; + background: rgba(209, 56, 59, 1); + border-radius: 20upx; +} +.pdAuthorFootPackage { + padding: 30upx; + > view { + margin-right: 50upx; + display: inline-block; + vertical-align: middle; + > span { + margin-left: 10upx; + vertical-align: middle; + font-size: 24upx; + } + > image { + vertical-align: middle; + width: 40upx; + height: 40upx; + } + } +} +.pdAuthorRight { + vertical-align: middle; + > image { + margin: 25upx 0 0 0; + width: 18upx; + height: 25upx; + } +} +.pdAuthorLeft { + vertical-align: middle; + > view { + vertical-align: middle; + display: inline-block; + } + > view:nth-child(1) { + width: 80upx; + height: 80upx; + border-radius: 50%; + overflow: hidden; + > image { + width: 80upx; + height: 80upx; + } + } + > view:nth-child(2) { + margin-left: 20upx; + > view:nth-child(1) { + > span { + font-size: 28upx; + + color: rgba(51, 51, 51, 1); + } + } + > view:nth-child(2) { + > span { + font-size: 24upx; + + color: rgba(153, 153, 153, 1); + } + } + } +} +.pdAuthorTitlePackage { + padding: 30upx; + border-bottom: 1upx solid rgba(248, 248, 248, 1); + display: flex; + justify-content: space-between; + > view { + vertical-align: middle; + display: inline-block; + } +} +.pdAuthor { + margin: 20upx 0 0 0; + width: 750upx; + background: rgba(255, 255, 255, 1); +} +.postDetails { + font-size: 0; + background: #f8f8f8; +} +page { + background: #f8f8f8; + overflow-x: hidden; +} +.postDetailsInfo { + width: 750upx; + background: rgba(255, 255, 255, 1); +} +.postDetailsInfoPackage { + padding: 30upx; +} +.postDetailsInfoTitle { + display: flex; + justify-content: space-between; + > view { + display: inline-block; + vertical-align: middle; + } +} +.pdHead { + width: 54upx; + height: 54upx; + overflow: hidden; + border-radius: 50%; + > image { + width: 54upx; + height: 54upx; + } +} +.postTitleLeft { + > view { + display: inline-block; + vertical-align: middle; + } +} +.pdRZ { + margin-left: 20upx; + > view:nth-child(1) { + > span { + vertical-align: middle; + font-size: 28upx; + + color: rgba(51, 51, 51, 1); + } + > image { + margin-left: 10upx; + vertical-align: middle; + width: 40upx; + height: 40upx; + } + } +} +.publishInfo { + margin-top: 15upx; + > view { + display: inline-block; + vertical-align: middle; + width: 102upx; + height: 34upx; + line-height: 30upx; + background: rgba(255, 68, 68, 1); + border-radius: 4upx; + text-align: center; + > span { + font-size: 20upx; + color: rgba(255, 255, 255, 1); + } + } + > span { + margin-left: 15upx; + vertical-align: middle; + font-size: 24upx; + + color: rgba(153, 153, 153, 1); + } +} +.postTitleRight { + > image { + vertical-align: middle; + width: 69upx; + height: 70upx; + } + > span { + vertical-align: middle; + font-size: 26upx; + + color: rgba(255, 68, 68, 1); + } +} +.topTips { + > image { + position: relative; + width: 58upx; + height: 58upx; + bottom: 118upx; + right: 35upx; + } +} +.pdTips { + margin-top: 14upx; + > view { + margin-right: 10upx; + display: inline-block; + vertical-align: middle; + border: 1upx solid rgba(33, 150, 243, 1); + border-radius: 4upx; + text-align: center; + > span { + padding: 5upx 10upx; + font-size: 20upx; + } + } +} +.pdMain { + margin-top: 20upx; + > text { + font-size: 28upx; + color: rgba(51, 51, 51, 1); + } +} +.pdImg { + margin: 10upx 0 0 0; + > view { + margin: 20upx auto 0 auto; + width: 690upx; + > img { + width: 690upx; + } + } +} +.pdVideo { + margin: 10upx 0 0 0; + > view { + margin: 20upx auto 0 auto; + width: 690upx; + > video { + width: 690upx; + } + } +} +.videoClo{ + position: absolute; + left: 0upx; + top: 0; + height: 100%; + width: 690upx; + z-index: 999; + filter: blur(0rpx); +} +.videoCloBtn{ + width: 150upx; + height: 50upx; + line-height: 50upx; + text-align: center; + background-color: #ff4444; + color: #ffffff; + font-size: 28upx; + position: absolute; + border-radius: 10upx; + left: 50%; + top: 40%; + transform: translate(-50%); + +} +.pdWhere { + margin: 30upx 0 0 0; + display: flex; + justify-content: space-between; + > view:nth-child(1) { + > image { + vertical-align: middle; + width: 25upx; + height: 25upx; + } + > span { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + width: 400upx; + display: inline-block; + vertical-align: middle; + font-size: 24upx; + + color: rgba(33, 150, 243, 1); + } + } + > view:nth-child(2) { + > span { + font-size: 24upx; + + color: rgba(33, 150, 243, 1); + } + } + > view { + display: inline-block; + } +} +.pdFlow { + margin: 30upx 0 0 0; + display: flex; + justify-content: space-between; + > view { + vertical-align: middle; + display: inline-block; + } + > view:nth-child(1) { + > span { + vertical-align: middle; + font-size: 24upx; + + color: rgba(153, 153, 153, 1); + } + > span:nth-child(2) { + margin-left: 30upx; + } + } + > view:nth-child(2) { + > image { + vertical-align: middle; + width: 35upx; + height: 35upx; + } + > span { + vertical-align: middle; + margin-left: 10upx; + font-size: 24upx; + + font-weight: bold; + color: rgba(51, 51, 51, 1); + } + } +} +.pdFabulous { + position: relative; + z-index: 5; + margin: 35upx auto 0 auto; + width: 690upx; + height: 87upx; + background: rgba(248, 248, 248, 1); + border-radius: 4upx; + > image { + margin-left: 30upx; + vertical-align: middle; + width: 34upx; + height: 35upx; + } + > span { + margin-left: 15upx; + line-height: 87upx; + vertical-align: middle; + font-size: 24upx; + + color: rgba(153, 153, 153, 1); + } + > view { + margin-left: 10upx; + vertical-align: middle; + display: inline-block; + width: 38upx; + height: 39upx; + border-radius: 50%; + border: 1upx solid rgba(255, 255, 255, 1); + overflow: hidden; + > image { + width: 38upx; + height: 39upx; + } + } +} + +.floatView { + display: inline-block !important; + z-index: 1; + position: absolute; + width: 45upx !important; + height: 45upx !important; + border-radius: 0 !important; + background: rgba(248, 248, 248, 1) !important; + transform: rotate(45deg) !important; + bottom: 60upx !important; + left: 20upx !important; + border: none !important; +} +.replyInput { + background: rgba(248, 248, 248, 1); + width: 500upx; + height: 200upx; + vertical-align: middle; + margin: 20upx auto 0 auto; + background: white; + font-size: 24upx; + + color: rgba(51, 51, 51, 1); + > textarea { + background: rgba(248, 248, 248, 1); + width: 500upx !important; + height: 200upx !important; + } +} +.sendButton { + text-align: center; + margin: 20upx auto 0 auto; + width: 292upx; + height: 74upx; + background: #3388ff; + border-radius: 37upx; + + > span { + line-height: 74upx; + font-size: 24upx; + + color: #ffffff; + } +} +.replyView { + border: 1upx solid rgba(0, 0, 0, 0); + width: 600upx; + background: rgba(255, 255, 255, 1); + border-radius: 20upx; + background: #f8f8f8; +} +.getRed { + position: fixed; + bottom: 0; + left: 0; + width: 750upx; + height: 98upx; + background: rgba(255, 68, 68, 1); + text-align: center; + z-index: 99; + > span { + line-height: 98upx; + font-size: 28upx; + + color: rgba(255, 255, 255, 1); + } +} +.getRedView { + width: 641upx; + height: 916upx; + border-radius: 50upx; + background-size: 100%; + position: relative; +} +.getRedViewTips { + position: relative; + bottom: 70upx; + margin: 0 auto 0 auto; + width: 460upx; + > image { + width: 460upx; + height: 130upx; + } +} +.redViewMoney { + text-align: center; + > span { + font-size: 36upx; + + font-weight: bold; + color: rgba(205, 59, 60, 1); + } +} +.getRedButton { + margin: 50upx auto 0 auto; + width: 188upx; + height: 188upx; + background: rgba(236, 202, 154, 1); + border: 4upx solid rgba(222, 70, 57, 1); + box-shadow: 0px 4upx 24upx 0px rgba(209, 56, 59, 0.4); + border-radius: 50%; + text-align: center; + > span { + line-height: 188upx; + font-size: 95upx; + + font-weight: bold; + color: rgba(51, 51, 51, 1); + } +} +.sendRedUser { + width: 176upx; + margin: 70upx auto 0 auto; + text-align: center; + border-bottom: 1upx solid rgba(255, 255, 255, 1); + padding-bottom: 20upx; + > view { + margin: 15upx 0 0 0; + > span { + font-size: 28upx; + + font-weight: bold; + color: rgba(255, 255, 255, 1); + } + } +} +.getRedBottom { + text-align: center; + width: 330upx; + margin: 183upx auto 0 auto; + > span { + font-size: 24upx; + + color: rgba(248, 199, 124, 1); + } +} +.getRedList { + width: 641upx; + height: 916upx; + background: rgba(209, 56, 59, 1); + border-radius: 50upx; + background-size: 100%; +} +.getRedListFull { + height: 75upx; +} +.sendRedImg { + margin: 0 auto 0 auto; + width: 146upx; + height: 146upx; + border-radius: 50%; + overflow: hidden; + > image { + width: 146upx; + height: 146upx; + } +} +.sendRedUesr { + text-align: center; + margin-top: 20upx; + > image { + width: 90upx; + height: 90upx; + } + > view { + display: inline-block; + > view { + > span { + font-size: 28upx; + + font-weight: bold; + color: rgba(255, 255, 255, 1); + } + } + } +} +.redNumber1 { + margin-top: 45upx; + text-align: center; + > span { + font-size: 24upx; + color: rgba(255, 255, 255, 1); + } +} +.scrollRed { + overflow: hidden; + margin: 40upx auto 0 auto; + width: 590upx; + height: 388upx; + background: rgba(255, 255, 255, 0.9); + border-radius: 40upx; +} +.scrollRedPackage { + padding: 30upx; +} +.pdHbMbLeftImg { + width: 73upx; + height: 73upx; + border-radius: 50%; + overflow: hidden; + > image { + width: 73upx; + height: 73upx; + } +} +.getRedNumber { + margin: auto; + width: 590upx; + background: rgba(255, 242, 197, 1); + border-radius: 40upx; +} +.getRedNumberPackage { + padding: 40upx 50upx; +} +.getRedNumberTitle { + text-align: center; + > span { + margin-left: 15upx; + vertical-align: middle; + font-size: 24upx; + lor: rgba(209, 56, 59, 1); + } + > image { + vertical-align: middle; + width: 40upx; + height: 40upx; + } +} +.getRedNumberBody { + white-space: nowrap; + > view { + margin: 30upx 0 0 100upx; + > image { + position: relative; + right: 140upx; + vertical-align: middle; + width: 175upx; + height: 180upx; + } + background: #ffffff; + display: inline-block; + vertical-align: middle; + width: 354upx; + height: 186upx; + box-shadow: 0px 2upx 24upx 0px rgba(255, 138, 229, 0.35); + text-align: center; + > span { + position: relative; + right: 70upx; + vertical-align: middle; + line-height: 186upx; + font-size: 24upx; + color: rgba(199, 63, 75, 1); + > span { + font-size: 36upx; + } + } + } +} +.getRedNumberFoot { + margin: 20upx 0 0 0; + text-align: center; + > image { + vertical-align: middle; + width: 40upx; + height: 40upx; + } + > span { + vertical-align: middle; + margin-left: 15upx; + font-size: 24upx; + color: rgba(231, 194, 64, 1); + } +} +.shareBtn { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 2; + opacity: 0; +} diff --git a/pages/subPages/postDetails/postDetails.vue b/pages/subPages/postDetails/postDetails.vue new file mode 100644 index 0000000..4079689 --- /dev/null +++ b/pages/subPages/postDetails/postDetails.vue @@ -0,0 +1,1790 @@ + + + + + diff --git a/pages/subPages/postRelease/postRelease.vue b/pages/subPages/postRelease/postRelease.vue new file mode 100644 index 0000000..baf644a --- /dev/null +++ b/pages/subPages/postRelease/postRelease.vue @@ -0,0 +1,1542 @@ + + + + + diff --git a/pages/subPages/receivingAddress/addReceivingAddress/addReceivingAddress.vue b/pages/subPages/receivingAddress/addReceivingAddress/addReceivingAddress.vue new file mode 100644 index 0000000..ccad2cf --- /dev/null +++ b/pages/subPages/receivingAddress/addReceivingAddress/addReceivingAddress.vue @@ -0,0 +1,690 @@ + + + + + diff --git a/pages/subPages/receivingAddress/receivingAddress.vue b/pages/subPages/receivingAddress/receivingAddress.vue new file mode 100644 index 0000000..8426b25 --- /dev/null +++ b/pages/subPages/receivingAddress/receivingAddress.vue @@ -0,0 +1,309 @@ + + + + + diff --git a/pages/subPages/redpacket/myredpacket.vue b/pages/subPages/redpacket/myredpacket.vue new file mode 100644 index 0000000..4cde41a --- /dev/null +++ b/pages/subPages/redpacket/myredpacket.vue @@ -0,0 +1,866 @@ + + + + + diff --git a/pages/subPages/redpacket/redsquare.vue b/pages/subPages/redpacket/redsquare.vue new file mode 100644 index 0000000..7d43f54 --- /dev/null +++ b/pages/subPages/redpacket/redsquare.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/pages/subPages/register/register.vue b/pages/subPages/register/register.vue new file mode 100644 index 0000000..a8b3dfe --- /dev/null +++ b/pages/subPages/register/register.vue @@ -0,0 +1,517 @@ + + + + + diff --git a/pages/subPages/search/search.vue b/pages/subPages/search/search.vue new file mode 100644 index 0000000..84f98d1 --- /dev/null +++ b/pages/subPages/search/search.vue @@ -0,0 +1,460 @@ + + + + + diff --git a/pages/subPages/shareMaterials/index.vue b/pages/subPages/shareMaterials/index.vue new file mode 100644 index 0000000..2ce0246 --- /dev/null +++ b/pages/subPages/shareMaterials/index.vue @@ -0,0 +1,416 @@ + + + + + diff --git a/pages/subPages/signdesk/index/index.vue b/pages/subPages/signdesk/index/index.vue new file mode 100644 index 0000000..327f0e2 --- /dev/null +++ b/pages/subPages/signdesk/index/index.vue @@ -0,0 +1,500 @@ + + + + + diff --git a/pages/subPages/signdesk/rank/rank.vue b/pages/subPages/signdesk/rank/rank.vue new file mode 100644 index 0000000..fca81e6 --- /dev/null +++ b/pages/subPages/signdesk/rank/rank.vue @@ -0,0 +1,322 @@ + + + + + diff --git a/pages/subPages/signdesk/record/record.vue b/pages/subPages/signdesk/record/record.vue new file mode 100644 index 0000000..79d7600 --- /dev/null +++ b/pages/subPages/signdesk/record/record.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/pages/subPages/special/rushspeci/rushspeci.vue b/pages/subPages/special/rushspeci/rushspeci.vue new file mode 100644 index 0000000..f8e4f63 --- /dev/null +++ b/pages/subPages/special/rushspeci/rushspeci.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/pages/subPages/submitOrder/submitOrder.vue b/pages/subPages/submitOrder/submitOrder.vue new file mode 100644 index 0000000..b03f3e5 --- /dev/null +++ b/pages/subPages/submitOrder/submitOrder.vue @@ -0,0 +1,2139 @@ + + + + + + + \ No newline at end of file diff --git a/pages/subPages/webview/webview.vue b/pages/subPages/webview/webview.vue new file mode 100644 index 0000000..bf9b8cf --- /dev/null +++ b/pages/subPages/webview/webview.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/pages/subPages/writeRecord/index.vue b/pages/subPages/writeRecord/index.vue new file mode 100644 index 0000000..7f8efaf --- /dev/null +++ b/pages/subPages/writeRecord/index.vue @@ -0,0 +1,840 @@ + + + + + diff --git a/pages/subPages2/blindDate/dynamics/detail.vue b/pages/subPages2/blindDate/dynamics/detail.vue new file mode 100644 index 0000000..299c1eb --- /dev/null +++ b/pages/subPages2/blindDate/dynamics/detail.vue @@ -0,0 +1,504 @@ + + + + + diff --git a/pages/subPages2/blindDate/dynamics/edit.vue b/pages/subPages2/blindDate/dynamics/edit.vue new file mode 100644 index 0000000..ecee8f4 --- /dev/null +++ b/pages/subPages2/blindDate/dynamics/edit.vue @@ -0,0 +1,565 @@ + + + + + diff --git a/pages/subPages2/homemaking/pubService/pubService.vue b/pages/subPages2/homemaking/pubService/pubService.vue new file mode 100644 index 0000000..48b6ba7 --- /dev/null +++ b/pages/subPages2/homemaking/pubService/pubService.vue @@ -0,0 +1,734 @@ + + + + + diff --git a/pagesA/campusActivities/index.vue b/pagesA/campusActivities/index.vue new file mode 100644 index 0000000..1b64599 --- /dev/null +++ b/pagesA/campusActivities/index.vue @@ -0,0 +1,101 @@ + + + + + diff --git a/pagesA/campusActivities/myActivities.vue b/pagesA/campusActivities/myActivities.vue new file mode 100644 index 0000000..5ab0f8b --- /dev/null +++ b/pagesA/campusActivities/myActivities.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/pagesA/commentSubject/commentSubject.vue b/pagesA/commentSubject/commentSubject.vue new file mode 100644 index 0000000..3071639 --- /dev/null +++ b/pagesA/commentSubject/commentSubject.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/pagesA/follow_fans/fans.vue b/pagesA/follow_fans/fans.vue new file mode 100644 index 0000000..89a8e27 --- /dev/null +++ b/pagesA/follow_fans/fans.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/pagesA/follow_fans/follow.vue b/pagesA/follow_fans/follow.vue new file mode 100644 index 0000000..59cbbe7 --- /dev/null +++ b/pagesA/follow_fans/follow.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/pagesA/identityList/bloggerCertification.vue b/pagesA/identityList/bloggerCertification.vue new file mode 100644 index 0000000..3423639 --- /dev/null +++ b/pagesA/identityList/bloggerCertification.vue @@ -0,0 +1,401 @@ + + + + + diff --git a/pagesA/identityList/identityList.vue b/pagesA/identityList/identityList.vue new file mode 100644 index 0000000..6f9aba9 --- /dev/null +++ b/pagesA/identityList/identityList.vue @@ -0,0 +1,112 @@ + + + + + diff --git a/pagesA/identityList/teacherCertification.vue b/pagesA/identityList/teacherCertification.vue new file mode 100644 index 0000000..68a7624 --- /dev/null +++ b/pagesA/identityList/teacherCertification.vue @@ -0,0 +1,376 @@ + + + + + diff --git a/pagesA/informationHot/informationHot.vue b/pagesA/informationHot/informationHot.vue new file mode 100644 index 0000000..80d715b --- /dev/null +++ b/pagesA/informationHot/informationHot.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/pagesA/instantMessenger/instantMessenger.vue b/pagesA/instantMessenger/instantMessenger.vue new file mode 100644 index 0000000..39e9523 --- /dev/null +++ b/pagesA/instantMessenger/instantMessenger.vue @@ -0,0 +1,1739 @@ + + + + + diff --git a/pagesA/rule_center/rule_center.vue b/pagesA/rule_center/rule_center.vue new file mode 100644 index 0000000..63cf257 --- /dev/null +++ b/pagesA/rule_center/rule_center.vue @@ -0,0 +1,101 @@ + + + + + diff --git a/pagesA/studentIdentification/studentIdentification.vue b/pagesA/studentIdentification/studentIdentification.vue new file mode 100644 index 0000000..40ddaab --- /dev/null +++ b/pagesA/studentIdentification/studentIdentification.vue @@ -0,0 +1,512 @@ + + + + + diff --git a/pagesA/topSearch/topSearch.vue b/pagesA/topSearch/topSearch.vue new file mode 100644 index 0000000..c6917f8 --- /dev/null +++ b/pagesA/topSearch/topSearch.vue @@ -0,0 +1,163 @@ + + + + + diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..f89aae2 --- /dev/null +++ b/project.config.json @@ -0,0 +1,29 @@ +{ + "appid": "wx0c70dd5cbbd75583", + "compileType": "miniprogram", + "libVersion": "2.30.0", + "packOptions": { + "ignore": [], + "include": [] + }, + "setting": { + "coverView": true, + "es6": true, + "postcss": true, + "minified": true, + "enhance": true, + "showShadowRootInWxmlPanel": true, + "packNpmRelationList": [], + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "condition": false + }, + "condition": {}, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + } +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 0000000..7cfc084 --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,21 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "weliam-smartcity-smartcity-app-master", + "setting": { + "compileHotReLoad": true, + "urlCheck": false + }, + "condition": { + "miniprogram": { + "list": [ + { + "name": "", + "pathName": "pages/mainPages/index/index", + "query": "", + "launchMode": "default", + "scene": null + } + ] + } + } +} \ No newline at end of file diff --git a/siteinfo.json b/siteinfo.json new file mode 100644 index 0000000..1c41d6e --- /dev/null +++ b/siteinfo.json @@ -0,0 +1,8 @@ +{ + "siteroot": "https://qingyuan.xingtongworld.com/", + "uniacid": "1", + "base":"/addons/weliam_smartcity/h5/", + "routers":"/addons/weliam_smartcity/core/common/", + "name": "weliam_smartcity", + "weliamv": "1.0.0" +} diff --git a/static/Influencer-rafiki.png b/static/Influencer-rafiki.png new file mode 100644 index 0000000..64edf2f Binary files /dev/null and b/static/Influencer-rafiki.png differ diff --git a/static/Learning-cuate.png b/static/Learning-cuate.png new file mode 100644 index 0000000..8c173e3 Binary files /dev/null and b/static/Learning-cuate.png differ diff --git a/static/Learning-pana.png b/static/Learning-pana.png new file mode 100644 index 0000000..f3c397f Binary files /dev/null and b/static/Learning-pana.png differ diff --git a/static/chooseCade/BG.png b/static/chooseCade/BG.png new file mode 100644 index 0000000..4b9c4c0 Binary files /dev/null and b/static/chooseCade/BG.png differ diff --git a/static/chooseCade/biaoqing.png b/static/chooseCade/biaoqing.png new file mode 100644 index 0000000..49fe31e Binary files /dev/null and b/static/chooseCade/biaoqing.png differ diff --git a/static/chooseCade/chooseCadecc.png b/static/chooseCade/chooseCadecc.png new file mode 100644 index 0000000..6907e90 Binary files /dev/null and b/static/chooseCade/chooseCadecc.png differ diff --git a/static/chooseCade/chooseCades.png b/static/chooseCade/chooseCades.png new file mode 100644 index 0000000..6ae4d68 Binary files /dev/null and b/static/chooseCade/chooseCades.png differ diff --git a/static/chooseCade/chooseCadex.png b/static/chooseCade/chooseCadex.png new file mode 100644 index 0000000..fbc533c Binary files /dev/null and b/static/chooseCade/chooseCadex.png differ diff --git a/static/chooseCade/qian.png b/static/chooseCade/qian.png new file mode 100644 index 0000000..67901eb Binary files /dev/null and b/static/chooseCade/qian.png differ diff --git a/static/chooseCade/reddogbg.png b/static/chooseCade/reddogbg.png new file mode 100644 index 0000000..87050fb Binary files /dev/null and b/static/chooseCade/reddogbg.png differ diff --git a/static/home_123.png b/static/home_123.png new file mode 100644 index 0000000..8d7c70e Binary files /dev/null and b/static/home_123.png differ diff --git a/static/hot_list_logo.png b/static/hot_list_logo.png new file mode 100644 index 0000000..aae5029 Binary files /dev/null and b/static/hot_list_logo.png differ diff --git a/static/icon_certificate.png b/static/icon_certificate.png new file mode 100644 index 0000000..2c4c5a0 Binary files /dev/null and b/static/icon_certificate.png differ diff --git a/static/icon_position.png b/static/icon_position.png new file mode 100644 index 0000000..d60b492 Binary files /dev/null and b/static/icon_position.png differ diff --git a/static/logo.png b/static/logo.png new file mode 100644 index 0000000..c4ddbaf Binary files /dev/null and b/static/logo.png differ diff --git a/static/mb-plus.png b/static/mb-plus.png new file mode 100644 index 0000000..b82cb2c Binary files /dev/null and b/static/mb-plus.png differ diff --git a/static/partner-rafiki.png b/static/partner-rafiki.png new file mode 100644 index 0000000..90b3896 Binary files /dev/null and b/static/partner-rafiki.png differ diff --git a/static/rule.png b/static/rule.png new file mode 100644 index 0000000..1d15e2f Binary files /dev/null and b/static/rule.png differ diff --git a/store/actions.js b/store/actions.js new file mode 100644 index 0000000..0c55d4c --- /dev/null +++ b/store/actions.js @@ -0,0 +1,34 @@ +import App from "@/common/js/app.js" +const action = { + getTabBarData({ + commit + }) { + let _this = this; + App._post_form("&p=headline&do=headlineMenu", {}, res => { + commit("HIDDENTABBAR", true); + commit("SETTABBAR", res.data); + // let tabBarData = res.data[0], + // sotrList = res.data.name_list, + // checkList = tabBarData.checkList, + // data = tabBarData.menu.data, + // style = tabBarData.menu.style, + // list = []; + // for (let key in data) { + // let tabItem = data[key], + // item = { + // name: tabItem.name, + // pagePath: tabItem.linkurl, + // text: tabItem.text, + // iconPath: tabItem.iconPath.file_path, + // selectedIconPath: tabItem.iconactivePath.file_path, + // }; + // list.push(item); + // } + // //不同平台底部菜单顺序调整 + // list.sort((a, b) => { + // return sotrList.indexOf(a.name) - sotrList.indexOf(b.name); + // }); + }) + } +} +export default action diff --git a/store/index.js b/store/index.js new file mode 100644 index 0000000..f583083 --- /dev/null +++ b/store/index.js @@ -0,0 +1,43 @@ +import Vue from 'vue' +import Vuex from 'vuex' + +import mutations from './mutations' +import actions from './actions.js' + +Vue.use(Vuex) + +const store = new Vuex.Store({ + state: { + appInfo: {}, + aidCity: { + aid: '0', + cityname: '' + }, + userInfo: '', + ruzhushow: false, + kefushow: false, + phoneshow: false, + advertShow: false, + advertFlag: false, + codetime: '', + orderList: '', + cmtShareAppMsg: '', + tabBar: null, //底部菜单数据 + hiddenTabBar: false, //隐藏底部菜单 + dealerInfo:{} ,//分销设置信息 + recomid:null ,//推荐人id + istabcontro:0 ,//选项卡1 + selectCity:0 ,// 第一次进来选择地址 + wxlogin:0 ,// 微信判断第一次登陆 + mpshareInfo : {} ,//微信公共分享, + isCardshare:0, + couplePacket:0, //新人红包 + festivalPacket:0, // 节日红包 + isWxAudit:true, //小程序审核判断 + storePrice:{}//同城配送购物车数据 + }, + // actions, + mutations +}) + +export default store diff --git a/store/mutation-types.js b/store/mutation-types.js new file mode 100644 index 0000000..330c4fb --- /dev/null +++ b/store/mutation-types.js @@ -0,0 +1,24 @@ +export const APPINFO = 'APPINFO' +export const AIDCITY = 'AIDCITY' +export const USERINFO = 'USERINFO' +export const RUZHU = 'RUZHU' +export const KEFU = 'KEFU' +export const PHONE = 'PHONE' +export const ADVERT = 'ADVERT' +export const ADVERTFLAG = 'ADVERTFLAG' +export const CODETIME = 'CODETIME' +export const ORDERLIST = 'ORDERLIST' +export const CMTSHAREAPPMSG = 'CMTSHAREAPPMSG' +export const SETTABBAR = 'SETTABBAR' +export const HIDDENTABBAR = 'HIDDENTABBAR' +export const DEALERINFO = 'DEALERINFO' +export const RECOMID = 'RECOMID' +export const ISTABCONTRO = 'ISTABCONTRO' +export const SELECTCITY = 'SELECTCITY' +export const WXLOGIN = 'WXLOGIN' +export const MPSHAREINFO = 'MPSHAREINFO' +export const ISCARDSHARE = 'ISCARDSHARE' +export const COUPLEPACKET = 'COUPLEPACKET' +export const FESTIVALPACKET = 'FESTIVALPACKET' +export const ISWXAUDIT = 'ISWXAUDIT' +export const STOREPRICES = 'STOREPRICES' diff --git a/store/mutations.js b/store/mutations.js new file mode 100644 index 0000000..fab05a9 --- /dev/null +++ b/store/mutations.js @@ -0,0 +1,102 @@ +import { + APPINFO, + AIDCITY, + USERINFO, + RUZHU, + KEFU, + PHONE, + ADVERT, + ADVERTFLAG, + CODETIME, + ORDERLIST, + CMTSHAREAPPMSG, + SETTABBAR, + HIDDENTABBAR, + DEALERINFO, + RECOMID, + ISTABCONTRO, + SELECTCITY, + WXLOGIN, + MPSHAREINFO, + DEALERSHAREINFO, + ISCARDSHARE, + COUPLEPACKET, + FESTIVALPACKET, + ISWXAUDIT, + STOREPRICES +} from './mutation-types' + +export default { + [APPINFO](state, val) { + state.appInfo = val + }, + [AIDCITY](state, val) { + state.aidCity = val + }, + [USERINFO](state, val) { + state.userInfo = val + }, + [RUZHU](state, val) { + state.ruzhushow = val + }, + [KEFU](state, val) { + state.kefushow = val + }, + [PHONE](state, val) { + state.phoneshow = val + }, + [ADVERT](state, val) { + state.advertShow = val + }, + [ADVERTFLAG](state, val) { + state.advertFlag = val + }, + [CODETIME](state, val) { + state.codetime = val + }, + [ORDERLIST](state, val) { + state.orderList = val + }, + [CMTSHAREAPPMSG](state, val) { + state.cmtShareAppMsg = val + }, + [SETTABBAR](state, val) { + state.tabBar = val; + }, + [HIDDENTABBAR](state, val) { + state.hiddenTabBar = val; + }, + [DEALERINFO](state, val) { + state.dealerInfo = val; + }, + [RECOMID](state, val) { + state.recomid = val; + }, + [ISTABCONTRO](state, val) { + state.istabcontro = val + }, + [SELECTCITY](state, val) { + state.selectCity = val; + }, + [WXLOGIN](state, val) { + state.wxlogin = val; + }, + [MPSHAREINFO](state, val) { + state.mpshareInfo = val; + }, + [ISCARDSHARE](state,val){ + state.isCardshare = val; + }, + [COUPLEPACKET](state,val){ + state.couplePacket = val; + }, + [FESTIVALPACKET](state,val){ + state.festivalPacket = val; + }, + [ISWXAUDIT](state,val){ + state.isWxAudit = val; + }, + [STOREPRICES](state,val){ + state.storePrice = val; + } +} diff --git a/uni.scss b/uni.scss new file mode 100644 index 0000000..f0f426c --- /dev/null +++ b/uni.scss @@ -0,0 +1,76 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +/* 颜色变量 */ + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:24upx; +$uni-font-size-base:28upx; +$uni-font-size-lg:32upx; + +/* 图片尺寸 */ +$uni-img-size-sm:40upx; +$uni-img-size-base:52upx; +$uni-img-size-lg:80upx; + +/* Border Radius */ +$uni-border-radius-sm: 4upx; +$uni-border-radius-base: 6upx; +$uni-border-radius-lg: 12upx; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 10px; +$uni-spacing-row-base: 20upx; +$uni-spacing-row-lg: 30upx; + +/* 垂直间距 */ +$uni-spacing-col-sm: 8upx; +$uni-spacing-col-base: 16upx; +$uni-spacing-col-lg: 24upx; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:40upx; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:36upx; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:30upx; \ No newline at end of file diff --git a/uni_modules/uni-datetime-picker/changelog.md b/uni_modules/uni-datetime-picker/changelog.md new file mode 100644 index 0000000..d737c8f --- /dev/null +++ b/uni_modules/uni-datetime-picker/changelog.md @@ -0,0 +1,130 @@ +## 2.2.21(2023-02-20) +- 修复 firefox 浏览器显示区域点击无法拉起日历弹框的Bug [详情](https://ask.dcloud.net.cn/question/163362) +## 2.2.20(2023-02-17) +- 优化 值为空依然选中当天问题 +- 优化 提供 default-value 属性支持配置选择器打开时默认显示的时间 +- 优化 非范围选择未选择日期时间,点击确认按钮选中当前日期时间 +- 优化 字节小程序日期时间范围选择,底部日期换行问题 +## 2.2.19(2023-02-09) +- 修复 2.2.18 引起范围选择配置 end 选择无效的Bug [详情](https://github.com/dcloudio/uni-ui/issues/686) +## 2.2.18(2023-02-08) +- 修复 移动端范围选择change事件触发异常的Bug [详情](https://github.com/dcloudio/uni-ui/issues/684) +- 优化 PC端输入日期格式错误时返回当前日期时间 +- 优化 PC端输入日期时间超出 start、end 限制的Bug +- 优化 移动端日期时间范围用法时间展示不完整问题 +## 2.2.17(2023-02-04) +- 修复 小程序端绑定 Date 类型报错的Bug [详情](https://github.com/dcloudio/uni-ui/issues/679) +- 修复 vue3 time-picker 无法显示绑定时分秒的Bug +## 2.2.16(2023-02-02) +- 修复 字节小程序报错的Bug +## 2.2.15(2023-02-02) +- 修复 某些情况切换月份错误的Bug +## 2.2.14(2023-01-30) +- 修复 某些情况切换月份错误的Bug [详情](https://ask.dcloud.net.cn/question/162033) +## 2.2.13(2023-01-10) +- 修复 多次加载组件造成内存占用的Bug +## 2.2.12(2022-12-01) +- 修复 vue3 下 i18n 国际化初始值不正确的Bug +## 2.2.11(2022-09-19) +- 修复 支付宝小程序样式错乱的Bug [详情](https://github.com/dcloudio/uni-app/issues/3861) +## 2.2.10(2022-09-19) +- 修复 反向选择日期范围,日期显示异常的Bug [详情](https://ask.dcloud.net.cn/question/153401?item_id=212892&rf=false) +## 2.2.9(2022-09-16) +- 可以使用 uni-scss 控制主题色 +## 2.2.8(2022-09-08) +- 修复 close事件无效的Bug +## 2.2.7(2022-09-05) +- 修复 移动端 maskClick 无效的Bug [详情](https://ask.dcloud.net.cn/question/140824) +## 2.2.6(2022-06-30) +- 优化 组件样式,调整了组件图标大小、高度、颜色等,与uni-ui风格保持一致 +## 2.2.5(2022-06-24) +- 修复 日历顶部年月及底部确认未国际化的Bug +## 2.2.4(2022-03-31) +- 修复 Vue3 下动态赋值,单选类型未响应的Bug +## 2.2.3(2022-03-28) +- 修复 Vue3 下动态赋值未响应的Bug +## 2.2.2(2021-12-10) +- 修复 clear-icon 属性在小程序平台不生效的Bug +## 2.2.1(2021-12-10) +- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的Bug +## 2.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源 [详情](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移 [https://uniapp.dcloud.io/component/uniui/uni-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker) +## 2.1.5(2021-11-09) +- 新增 提供组件设计资源,组件样式调整 +## 2.1.4(2021-09-10) +- 修复 hide-second 在移动端的Bug +- 修复 单选赋默认值时,赋值日期未高亮的Bug +- 修复 赋默认值时,移动端未正确显示时间的Bug +## 2.1.3(2021-09-09) +- 新增 hide-second 属性,支持只使用时分,隐藏秒 +## 2.1.2(2021-09-03) +- 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次 +- 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法 +- 优化 调整字号大小,美化日历界面 +- 修复 因国际化导致的 placeholder 失效的Bug +## 2.1.1(2021-08-24) +- 新增 支持国际化 +- 优化 范围选择器在 pc 端过宽的问题 +## 2.1.0(2021-08-09) +- 新增 适配 vue3 +## 2.0.19(2021-08-09) +- 新增 支持作为 uni-forms 子组件相关功能 +- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的Bug +## 2.0.18(2021-08-05) +- 修复 type 属性动态赋值无效的Bug +- 修复 ‘确认’按钮被 tabbar 遮盖 bug +- 修复 组件未赋值时范围选左、右日历相同的Bug +## 2.0.17(2021-08-04) +- 修复 范围选未正确显示当前值的Bug +- 修复 h5 平台(移动端)报错 'cale' of undefined 的Bug +## 2.0.16(2021-07-21) +- 新增 return-type 属性支持返回 date 日期对象 +## 2.0.15(2021-07-14) +- 修复 单选日期类型,初始赋值后不在当前日历的Bug +- 新增 clearIcon 属性,显示框的清空按钮可配置显示隐藏(仅 pc 有效) +- 优化 移动端移除显示框的清空按钮,无实际用途 +## 2.0.14(2021-07-14) +- 修复 组件赋值为空,界面未更新的Bug +- 修复 start 和 end 不能动态赋值的Bug +- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的Bug +## 2.0.13(2021-07-08) +- 修复 范围选择不能动态赋值的Bug +## 2.0.12(2021-07-08) +- 修复 范围选择的初始时间在一个月内时,造成无法选择的bug +## 2.0.11(2021-07-08) +- 优化 弹出层在超出视窗边缘定位不准确的问题 +## 2.0.10(2021-07-08) +- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的Bug +- 优化 弹出层在超出视窗边缘被遮盖的问题 +## 2.0.9(2021-07-07) +- 新增 maskClick 事件 +- 修复 特殊情况日历 rpx 布局错误的Bug,rpx -> px +- 修复 范围选择时清空返回值不合理的bug,['', ''] -> [] +## 2.0.8(2021-07-07) +- 新增 日期时间显示框支持插槽 +## 2.0.7(2021-07-01) +- 优化 添加 uni-icons 依赖 +## 2.0.6(2021-05-22) +- 修复 图标在小程序上不显示的Bug +- 优化 重命名引用组件,避免潜在组件命名冲突 +## 2.0.5(2021-05-20) +- 优化 代码目录扁平化 +## 2.0.4(2021-05-12) +- 新增 组件示例地址 +## 2.0.3(2021-05-10) +- 修复 ios 下不识别 '-' 日期格式的Bug +- 优化 pc 下弹出层添加边框和阴影 +## 2.0.2(2021-05-08) +- 修复 在 admin 中获取弹出层定位错误的bug +## 2.0.1(2021-05-08) +- 修复 type 属性向下兼容,默认值从 date 变更为 datetime +## 2.0.0(2021-04-30) +- 支持日历形式的日期+时间的范围选择 + > 注意:此版本不向后兼容,不再支持单独时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker) +## 1.0.6(2021-03-18) +- 新增 hide-second 属性,时间支持仅选择时、分 +- 修复 选择跟显示的日期不一样的Bug +- 修复 chang事件触发2次的Bug +- 修复 分、秒 end 范围错误的Bug +- 优化 更好的 nvue 适配 diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue new file mode 100644 index 0000000..1b1a2eb --- /dev/null +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue new file mode 100644 index 0000000..560acc1 --- /dev/null +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue @@ -0,0 +1,944 @@ + + + + + diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json new file mode 100644 index 0000000..9acf1ab --- /dev/null +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json @@ -0,0 +1,22 @@ +{ + "uni-datetime-picker.selectDate": "select date", + "uni-datetime-picker.selectTime": "select time", + "uni-datetime-picker.selectDateTime": "select datetime", + "uni-datetime-picker.startDate": "start date", + "uni-datetime-picker.endDate": "end date", + "uni-datetime-picker.startTime": "start time", + "uni-datetime-picker.endTime": "end time", + "uni-datetime-picker.ok": "ok", + "uni-datetime-picker.clear": "clear", + "uni-datetime-picker.cancel": "cancel", + "uni-datetime-picker.year": "-", + "uni-datetime-picker.month": "", + "uni-calender.MON": "MON", + "uni-calender.TUE": "TUE", + "uni-calender.WED": "WED", + "uni-calender.THU": "THU", + "uni-calender.FRI": "FRI", + "uni-calender.SAT": "SAT", + "uni-calender.SUN": "SUN", + "uni-calender.confirm": "confirm" +} diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js new file mode 100644 index 0000000..de7509c --- /dev/null +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json new file mode 100644 index 0000000..d2df5e7 --- /dev/null +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json @@ -0,0 +1,22 @@ +{ + "uni-datetime-picker.selectDate": "选择日期", + "uni-datetime-picker.selectTime": "选择时间", + "uni-datetime-picker.selectDateTime": "选择日期时间", + "uni-datetime-picker.startDate": "开始日期", + "uni-datetime-picker.endDate": "结束日期", + "uni-datetime-picker.startTime": "开始时间", + "uni-datetime-picker.endTime": "结束时间", + "uni-datetime-picker.ok": "确定", + "uni-datetime-picker.clear": "清除", + "uni-datetime-picker.cancel": "取消", + "uni-datetime-picker.year": "年", + "uni-datetime-picker.month": "月", + "uni-calender.SUN": "日", + "uni-calender.MON": "一", + "uni-calender.TUE": "二", + "uni-calender.WED": "三", + "uni-calender.THU": "四", + "uni-calender.FRI": "五", + "uni-calender.SAT": "六", + "uni-calender.confirm": "确认" +} \ No newline at end of file diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json new file mode 100644 index 0000000..d23fa3c --- /dev/null +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json @@ -0,0 +1,22 @@ +{ + "uni-datetime-picker.selectDate": "選擇日期", + "uni-datetime-picker.selectTime": "選擇時間", + "uni-datetime-picker.selectDateTime": "選擇日期時間", + "uni-datetime-picker.startDate": "開始日期", + "uni-datetime-picker.endDate": "結束日期", + "uni-datetime-picker.startTime": "開始时间", + "uni-datetime-picker.endTime": "結束时间", + "uni-datetime-picker.ok": "確定", + "uni-datetime-picker.clear": "清除", + "uni-datetime-picker.cancel": "取消", + "uni-datetime-picker.year": "年", + "uni-datetime-picker.month": "月", + "uni-calender.SUN": "日", + "uni-calender.MON": "一", + "uni-calender.TUE": "二", + "uni-calender.WED": "三", + "uni-calender.THU": "四", + "uni-calender.FRI": "五", + "uni-calender.SAT": "六", + "uni-calender.confirm": "確認" +} \ No newline at end of file diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue new file mode 100644 index 0000000..04113ac --- /dev/null +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue @@ -0,0 +1,933 @@ + + + + + diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue new file mode 100644 index 0000000..c6d93f2 --- /dev/null +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue @@ -0,0 +1,1026 @@ + + + + diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js new file mode 100644 index 0000000..98e6b79 --- /dev/null +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js @@ -0,0 +1,464 @@ +class Calendar { + constructor({ + date, + selected, + startDate, + endDate, + range, + // multipleStatus + } = {}) { + // 当前日期 + this.date = this.getDate(new Date()) // 当前初入日期 + // 打点信息 + this.selected = selected || []; + // 范围开始 + this.startDate = startDate + // 范围结束 + this.endDate = endDate + this.range = range + // 多选状态 + this.cleanMultipleStatus() + // 每周日期 + this.weeks = {} + // this._getWeek(this.date.fullDate) + // this.multipleStatus = multipleStatus + this.lastHover = false + } + /** + * 设置日期 + * @param {Object} date + */ + setDate(date) { + this.selectDate = this.getDate(date) + this._getWeek(this.selectDate.fullDate) + } + + /** + * 清理多选状态 + */ + cleanMultipleStatus() { + this.multipleStatus = { + before: '', + after: '', + data: [] + } + } + + /** + * 重置开始日期 + */ + resetSatrtDate(startDate) { + // 范围开始 + this.startDate = startDate + + } + + /** + * 重置结束日期 + */ + resetEndDate(endDate) { + // 范围结束 + this.endDate = endDate + } + + /** + * 获取任意时间 + */ + getDate(date, AddDayCount = 0, str = 'day') { + if (!date) { + date = new Date() + } + if (typeof date !== 'object') { + date = date.replace(/-/g, '/') + } + const dd = new Date(date) + switch (str) { + case 'day': + dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期 + break + case 'month': + if (dd.getDate() === 31 && AddDayCount>0) { + dd.setDate(dd.getDate() + AddDayCount) + } else { + const preMonth = dd.getMonth() + dd.setMonth(preMonth + AddDayCount) // 获取AddDayCount天后的日期 + const nextMonth = dd.getMonth() + // 处理 pre 切换月份目标月份为2月没有当前日(30 31) 切换错误问题 + if(AddDayCount<0 && preMonth!==0 && nextMonth-preMonth>AddDayCount){ + dd.setMonth(nextMonth+(nextMonth-preMonth+AddDayCount)) + } + // 处理 next 切换月份目标月份为2月没有当前日(30 31) 切换错误问题 + if(AddDayCount>0 && nextMonth-preMonth>AddDayCount){ + dd.setMonth(nextMonth-(nextMonth-preMonth-AddDayCount)) + } + } + break + case 'year': + dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期 + break + } + const y = dd.getFullYear() + const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0 + const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0 + return { + fullDate: y + '-' + m + '-' + d, + year: y, + month: m, + date: d, + day: dd.getDay() + } + } + + + /** + * 获取上月剩余天数 + */ + _getLastMonthDays(firstDay, full) { + let dateArr = [] + for (let i = firstDay; i > 0; i--) { + const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate() + dateArr.push({ + date: beforeDate, + month: full.month - 1, + disable: true + }) + } + return dateArr + } + /** + * 获取本月天数 + */ + _currentMonthDys(dateData, full) { + let dateArr = [] + let fullDate = this.date.fullDate + for (let i = 1; i <= dateData; i++) { + let isinfo = false + let nowDate = full.year + '-' + (full.month < 10 ? + full.month : full.month) + '-' + (i < 10 ? + '0' + i : i) + // 是否今天 + let isDay = fullDate === nowDate + // 获取打点信息 + let info = this.selected && this.selected.find((item) => { + if (this.dateEqual(nowDate, item.date)) { + return item + } + }) + + // 日期禁用 + let disableBefore = true + let disableAfter = true + if (this.startDate) { + // let dateCompBefore = this.dateCompare(this.startDate, fullDate) + // disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate) + disableBefore = this.dateCompare(this.startDate, nowDate) + } + + if (this.endDate) { + // let dateCompAfter = this.dateCompare(fullDate, this.endDate) + // disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate) + disableAfter = this.dateCompare(nowDate, this.endDate) + } + let multiples = this.multipleStatus.data + let checked = false + let multiplesStatus = -1 + if (this.range) { + if (multiples) { + multiplesStatus = multiples.findIndex((item) => { + return this.dateEqual(item, nowDate) + }) + } + if (multiplesStatus !== -1) { + checked = true + } + } + let data = { + fullDate: nowDate, + year: full.year, + date: i, + multiple: this.range ? checked : false, + beforeMultiple: this.isLogicBefore(nowDate, this.multipleStatus.before, this.multipleStatus.after), + afterMultiple: this.isLogicAfter(nowDate, this.multipleStatus.before, this.multipleStatus.after), + month: full.month, + disable: !(disableBefore && disableAfter), + isDay, + userChecked: false + } + if (info) { + data.extraInfo = info + } + + dateArr.push(data) + } + return dateArr + } + /** + * 获取下月天数 + */ + _getNextMonthDays(surplus, full) { + let dateArr = [] + for (let i = 1; i < surplus + 1; i++) { + dateArr.push({ + date: i, + month: Number(full.month) + 1, + disable: true + }) + } + return dateArr + } + + /** + * 获取当前日期详情 + * @param {Object} date + */ + getInfo(date) { + if (!date) { + date = new Date() + } + const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate) + return dateInfo + } + + /** + * 比较时间大小 + */ + dateCompare(startDate, endDate) { + // 计算截止时间 + startDate = new Date(startDate.replace('-', '/').replace('-', '/')) + // 计算详细项的截止时间 + endDate = new Date(endDate.replace('-', '/').replace('-', '/')) + if (startDate <= endDate) { + return true + } else { + return false + } + } + + /** + * 比较时间是否相等 + */ + dateEqual(before, after) { + // 计算截止时间 + before = new Date(before.replace('-', '/').replace('-', '/')) + // 计算详细项的截止时间 + after = new Date(after.replace('-', '/').replace('-', '/')) + if (before.getTime() - after.getTime() === 0) { + return true + } else { + return false + } + } + + /** + * 比较真实起始日期 + */ + + isLogicBefore(currentDay, before, after) { + let logicBefore = before + if (before && after) { + logicBefore = this.dateCompare(before, after) ? before : after + } + return this.dateEqual(logicBefore, currentDay) + } + + isLogicAfter(currentDay, before, after) { + let logicAfter = after + if (before && after) { + logicAfter = this.dateCompare(before, after) ? after : before + } + return this.dateEqual(logicAfter, currentDay) + } + + /** + * 获取日期范围内所有日期 + * @param {Object} begin + * @param {Object} end + */ + geDateAll(begin, end) { + var arr = [] + var ab = begin.split('-') + var ae = end.split('-') + var db = new Date() + db.setFullYear(ab[0], ab[1] - 1, ab[2]) + var de = new Date() + de.setFullYear(ae[0], ae[1] - 1, ae[2]) + var unixDb = db.getTime() - 24 * 60 * 60 * 1000 + var unixDe = de.getTime() - 24 * 60 * 60 * 1000 + for (var k = unixDb; k <= unixDe;) { + k = k + 24 * 60 * 60 * 1000 + arr.push(this.getDate(new Date(parseInt(k))).fullDate) + } + return arr + } + + /** + * 获取多选状态 + */ + setMultiple(fullDate) { + let { + before, + after + } = this.multipleStatus + if (!this.range) return + if (before && after) { + if (!this.lastHover) { + this.lastHover = true + return + } + this.multipleStatus.before = fullDate + this.multipleStatus.after = '' + this.multipleStatus.data = [] + this.multipleStatus.fulldate = '' + this.lastHover = false + } else { + if (!before) { + this.multipleStatus.before = fullDate + this.lastHover = false + } else { + this.multipleStatus.after = fullDate + if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { + this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus + .after); + } else { + this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus + .before); + } + this.lastHover = true + } + } + this._getWeek(fullDate) + } + + /** + * 鼠标 hover 更新多选状态 + */ + setHoverMultiple(fullDate) { + let { + before, + after + } = this.multipleStatus + + if (!this.range) return + if (this.lastHover) return + + if (!before) { + this.multipleStatus.before = fullDate + } else { + this.multipleStatus.after = fullDate + if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { + this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after); + } else { + this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before); + } + } + this._getWeek(fullDate) + } + + /** + * 更新默认值多选状态 + */ + setDefaultMultiple(before, after) { + this.multipleStatus.before = before + this.multipleStatus.after = after + if (before && after) { + if (this.dateCompare(before, after)) { + this.multipleStatus.data = this.geDateAll(before, after); + this._getWeek(after) + } else { + this.multipleStatus.data = this.geDateAll(after, before); + this._getWeek(before) + } + } + } + + /** + * 获取每周数据 + * @param {Object} dateData + */ + _getWeek(dateData) { + const { + fullDate, + year, + month, + date, + day + } = this.getDate(dateData) + let firstDay = new Date(year, month - 1, 1).getDay() + let currentDay = new Date(year, month, 0).getDate() + let dates = { + lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天 + currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数 + nextMonthDays: [], // 下个月开始几天 + weeks: [] + } + let canlender = [] + const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length) + dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData)) + canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays) + let weeks = {} + // 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天 + for (let i = 0; i < canlender.length; i++) { + if (i % 7 === 0) { + weeks[parseInt(i / 7)] = new Array(7) + } + weeks[parseInt(i / 7)][i % 7] = canlender[i] + } + this.canlender = canlender + this.weeks = weeks + } +} + +function getDateTime(date, hideSecond){ + return `${getDate(date)} ${getTime(date, hideSecond)}` +} + +function getDate(date) { + date = fixIosDateFormat(date) + date = new Date(date) + const year = date.getFullYear() + const month = date.getMonth()+1 + const day = date.getDate() + return `${year}-${addZero(month)}-${addZero(day)}` +} + +function getTime(date, hideSecond){ + date = fixIosDateFormat(date) + date = new Date(date) + const hour = date.getHours() + const minute = date.getMinutes() + const second = date.getSeconds() + return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}` +} + +function addZero(num) { + if(num < 10){ + num = `0${num}` + } + return num +} + +function getDefaultSecond(hideSecond) { + return hideSecond ? '00:00' : '00:00:00' +} + +function dateCompare(startDate, endDate) { + startDate = new Date(startDate.replace(/-/g, '/')) + endDate = new Date(endDate.replace(/-/g, '/')) + return startDate <= endDate +} + +function checkDate(date){ + const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g + return date.match(dateReg) +} + +function fixIosDateFormat(value) { + // #ifndef MP + if (typeof value === 'string') { + value = value.replace(/-/g, '/') + } + // #endif + return value +} + +export {Calendar, getDateTime, getDate, getTime, addZero, getDefaultSecond, dateCompare, checkDate, fixIosDateFormat} \ No newline at end of file diff --git a/uni_modules/uni-datetime-picker/package.json b/uni_modules/uni-datetime-picker/package.json new file mode 100644 index 0000000..25fbb6c --- /dev/null +++ b/uni_modules/uni-datetime-picker/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-datetime-picker", + "displayName": "uni-datetime-picker 日期选择器", + "version": "2.2.21", + "description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择", + "keywords": [ + "uni-datetime-picker", + "uni-ui", + "uniui", + "日期时间选择器", + "日期时间" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "n" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/uni_modules/uni-datetime-picker/readme.md b/uni_modules/uni-datetime-picker/readme.md new file mode 100644 index 0000000..162fbef --- /dev/null +++ b/uni_modules/uni-datetime-picker/readme.md @@ -0,0 +1,21 @@ + + +> `重要通知:组件升级更新 2.0.0 后,支持日期+时间范围选择,组件 ui 将使用日历选择日期,ui 变化较大,同时支持 PC 和 移动端。此版本不向后兼容,不再支持单独的时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)。若仍需使用旧版本,可在插件市场下载*非uni_modules版本*,旧版本将不再维护` + +## DatetimePicker 时间选择器 + +> **组件名:uni-datetime-picker** +> 代码块: `uDatetimePicker` + + +该组件的优势是,支持**时间戳**输入和输出(起始时间、终止时间也支持时间戳),可**同时选择**日期和时间。 + +若只是需要单独选择日期和时间,不需要时间戳输入和输出,可使用原生的 picker 组件。 + +**_点击 picker 默认值规则:_** + +- 若设置初始值 value, 会显示在 picker 显示框中 +- 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/uni_modules/uni-icons/changelog.md b/uni_modules/uni-icons/changelog.md new file mode 100644 index 0000000..6449885 --- /dev/null +++ b/uni_modules/uni-icons/changelog.md @@ -0,0 +1,22 @@ +## 1.3.5(2022-01-24) +- 优化 size 属性可以传入不带单位的字符串数值 +## 1.3.4(2022-01-24) +- 优化 size 支持其他单位 +## 1.3.3(2022-01-17) +- 修复 nvue 有些图标不显示的bug,兼容老版本图标 +## 1.3.2(2021-12-01) +- 优化 示例可复制图标名称 +## 1.3.1(2021-11-23) +- 优化 兼容旧组件 type 值 +## 1.3.0(2021-11-19) +- 新增 更多图标 +- 优化 自定义图标使用方式 +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons) +## 1.1.7(2021-11-08) +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.5(2021-05-12) +- 新增 组件示例地址 +## 1.1.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/uni_modules/uni-icons/components/uni-icons/icons.js b/uni_modules/uni-icons/components/uni-icons/icons.js new file mode 100644 index 0000000..7889936 --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/icons.js @@ -0,0 +1,1169 @@ +export default { + "id": "2852637", + "name": "uniui图标库", + "font_family": "uniicons", + "css_prefix_text": "uniui-", + "description": "", + "glyphs": [ + { + "icon_id": "25027049", + "name": "yanse", + "font_class": "color", + "unicode": "e6cf", + "unicode_decimal": 59087 + }, + { + "icon_id": "25027048", + "name": "wallet", + "font_class": "wallet", + "unicode": "e6b1", + "unicode_decimal": 59057 + }, + { + "icon_id": "25015720", + "name": "settings-filled", + "font_class": "settings-filled", + "unicode": "e6ce", + "unicode_decimal": 59086 + }, + { + "icon_id": "25015434", + "name": "shimingrenzheng-filled", + "font_class": "auth-filled", + "unicode": "e6cc", + "unicode_decimal": 59084 + }, + { + "icon_id": "24934246", + "name": "shop-filled", + "font_class": "shop-filled", + "unicode": "e6cd", + "unicode_decimal": 59085 + }, + { + "icon_id": "24934159", + "name": "staff-filled-01", + "font_class": "staff-filled", + "unicode": "e6cb", + "unicode_decimal": 59083 + }, + { + "icon_id": "24932461", + "name": "VIP-filled", + "font_class": "vip-filled", + "unicode": "e6c6", + "unicode_decimal": 59078 + }, + { + "icon_id": "24932462", + "name": "plus_circle_fill", + "font_class": "plus-filled", + "unicode": "e6c7", + "unicode_decimal": 59079 + }, + { + "icon_id": "24932463", + "name": "folder_add-filled", + "font_class": "folder-add-filled", + "unicode": "e6c8", + "unicode_decimal": 59080 + }, + { + "icon_id": "24932464", + "name": "yanse-filled", + "font_class": "color-filled", + "unicode": "e6c9", + "unicode_decimal": 59081 + }, + { + "icon_id": "24932465", + "name": "tune-filled", + "font_class": "tune-filled", + "unicode": "e6ca", + "unicode_decimal": 59082 + }, + { + "icon_id": "24932455", + "name": "a-rilidaka-filled", + "font_class": "calendar-filled", + "unicode": "e6c0", + "unicode_decimal": 59072 + }, + { + "icon_id": "24932456", + "name": "notification-filled", + "font_class": "notification-filled", + "unicode": "e6c1", + "unicode_decimal": 59073 + }, + { + "icon_id": "24932457", + "name": "wallet-filled", + "font_class": "wallet-filled", + "unicode": "e6c2", + "unicode_decimal": 59074 + }, + { + "icon_id": "24932458", + "name": "paihangbang-filled", + "font_class": "medal-filled", + "unicode": "e6c3", + "unicode_decimal": 59075 + }, + { + "icon_id": "24932459", + "name": "gift-filled", + "font_class": "gift-filled", + "unicode": "e6c4", + "unicode_decimal": 59076 + }, + { + "icon_id": "24932460", + "name": "fire-filled", + "font_class": "fire-filled", + "unicode": "e6c5", + "unicode_decimal": 59077 + }, + { + "icon_id": "24928001", + "name": "refreshempty", + "font_class": "refreshempty", + "unicode": "e6bf", + "unicode_decimal": 59071 + }, + { + "icon_id": "24926853", + "name": "location-ellipse", + "font_class": "location-filled", + "unicode": "e6af", + "unicode_decimal": 59055 + }, + { + "icon_id": "24926735", + "name": "person-filled", + "font_class": "person-filled", + "unicode": "e69d", + "unicode_decimal": 59037 + }, + { + "icon_id": "24926703", + "name": "personadd-filled", + "font_class": "personadd-filled", + "unicode": "e698", + "unicode_decimal": 59032 + }, + { + "icon_id": "24923351", + "name": "back", + "font_class": "back", + "unicode": "e6b9", + "unicode_decimal": 59065 + }, + { + "icon_id": "24923352", + "name": "forward", + "font_class": "forward", + "unicode": "e6ba", + "unicode_decimal": 59066 + }, + { + "icon_id": "24923353", + "name": "arrowthinright", + "font_class": "arrow-right", + "unicode": "e6bb", + "unicode_decimal": 59067 + }, + { + "icon_id": "24923353", + "name": "arrowthinright", + "font_class": "arrowthinright", + "unicode": "e6bb", + "unicode_decimal": 59067 + }, + { + "icon_id": "24923354", + "name": "arrowthinleft", + "font_class": "arrow-left", + "unicode": "e6bc", + "unicode_decimal": 59068 + }, + { + "icon_id": "24923354", + "name": "arrowthinleft", + "font_class": "arrowthinleft", + "unicode": "e6bc", + "unicode_decimal": 59068 + }, + { + "icon_id": "24923355", + "name": "arrowthinup", + "font_class": "arrow-up", + "unicode": "e6bd", + "unicode_decimal": 59069 + }, + { + "icon_id": "24923355", + "name": "arrowthinup", + "font_class": "arrowthinup", + "unicode": "e6bd", + "unicode_decimal": 59069 + }, + { + "icon_id": "24923356", + "name": "arrowthindown", + "font_class": "arrow-down", + "unicode": "e6be", + "unicode_decimal": 59070 + },{ + "icon_id": "24923356", + "name": "arrowthindown", + "font_class": "arrowthindown", + "unicode": "e6be", + "unicode_decimal": 59070 + }, + { + "icon_id": "24923349", + "name": "arrowdown", + "font_class": "bottom", + "unicode": "e6b8", + "unicode_decimal": 59064 + },{ + "icon_id": "24923349", + "name": "arrowdown", + "font_class": "arrowdown", + "unicode": "e6b8", + "unicode_decimal": 59064 + }, + { + "icon_id": "24923346", + "name": "arrowright", + "font_class": "right", + "unicode": "e6b5", + "unicode_decimal": 59061 + }, + { + "icon_id": "24923346", + "name": "arrowright", + "font_class": "arrowright", + "unicode": "e6b5", + "unicode_decimal": 59061 + }, + { + "icon_id": "24923347", + "name": "arrowup", + "font_class": "top", + "unicode": "e6b6", + "unicode_decimal": 59062 + }, + { + "icon_id": "24923347", + "name": "arrowup", + "font_class": "arrowup", + "unicode": "e6b6", + "unicode_decimal": 59062 + }, + { + "icon_id": "24923348", + "name": "arrowleft", + "font_class": "left", + "unicode": "e6b7", + "unicode_decimal": 59063 + }, + { + "icon_id": "24923348", + "name": "arrowleft", + "font_class": "arrowleft", + "unicode": "e6b7", + "unicode_decimal": 59063 + }, + { + "icon_id": "24923334", + "name": "eye", + "font_class": "eye", + "unicode": "e651", + "unicode_decimal": 58961 + }, + { + "icon_id": "24923335", + "name": "eye-filled", + "font_class": "eye-filled", + "unicode": "e66a", + "unicode_decimal": 58986 + }, + { + "icon_id": "24923336", + "name": "eye-slash", + "font_class": "eye-slash", + "unicode": "e6b3", + "unicode_decimal": 59059 + }, + { + "icon_id": "24923337", + "name": "eye-slash-filled", + "font_class": "eye-slash-filled", + "unicode": "e6b4", + "unicode_decimal": 59060 + }, + { + "icon_id": "24923305", + "name": "info-filled", + "font_class": "info-filled", + "unicode": "e649", + "unicode_decimal": 58953 + }, + { + "icon_id": "24923299", + "name": "reload-01", + "font_class": "reload", + "unicode": "e6b2", + "unicode_decimal": 59058 + }, + { + "icon_id": "24923195", + "name": "mic_slash_fill", + "font_class": "micoff-filled", + "unicode": "e6b0", + "unicode_decimal": 59056 + }, + { + "icon_id": "24923165", + "name": "map-pin-ellipse", + "font_class": "map-pin-ellipse", + "unicode": "e6ac", + "unicode_decimal": 59052 + }, + { + "icon_id": "24923166", + "name": "map-pin", + "font_class": "map-pin", + "unicode": "e6ad", + "unicode_decimal": 59053 + }, + { + "icon_id": "24923167", + "name": "location", + "font_class": "location", + "unicode": "e6ae", + "unicode_decimal": 59054 + }, + { + "icon_id": "24923064", + "name": "starhalf", + "font_class": "starhalf", + "unicode": "e683", + "unicode_decimal": 59011 + }, + { + "icon_id": "24923065", + "name": "star", + "font_class": "star", + "unicode": "e688", + "unicode_decimal": 59016 + }, + { + "icon_id": "24923066", + "name": "star-filled", + "font_class": "star-filled", + "unicode": "e68f", + "unicode_decimal": 59023 + }, + { + "icon_id": "24899646", + "name": "a-rilidaka", + "font_class": "calendar", + "unicode": "e6a0", + "unicode_decimal": 59040 + }, + { + "icon_id": "24899647", + "name": "fire", + "font_class": "fire", + "unicode": "e6a1", + "unicode_decimal": 59041 + }, + { + "icon_id": "24899648", + "name": "paihangbang", + "font_class": "medal", + "unicode": "e6a2", + "unicode_decimal": 59042 + }, + { + "icon_id": "24899649", + "name": "font", + "font_class": "font", + "unicode": "e6a3", + "unicode_decimal": 59043 + }, + { + "icon_id": "24899650", + "name": "gift", + "font_class": "gift", + "unicode": "e6a4", + "unicode_decimal": 59044 + }, + { + "icon_id": "24899651", + "name": "link", + "font_class": "link", + "unicode": "e6a5", + "unicode_decimal": 59045 + }, + { + "icon_id": "24899652", + "name": "notification", + "font_class": "notification", + "unicode": "e6a6", + "unicode_decimal": 59046 + }, + { + "icon_id": "24899653", + "name": "staff", + "font_class": "staff", + "unicode": "e6a7", + "unicode_decimal": 59047 + }, + { + "icon_id": "24899654", + "name": "VIP", + "font_class": "vip", + "unicode": "e6a8", + "unicode_decimal": 59048 + }, + { + "icon_id": "24899655", + "name": "folder_add", + "font_class": "folder-add", + "unicode": "e6a9", + "unicode_decimal": 59049 + }, + { + "icon_id": "24899656", + "name": "tune", + "font_class": "tune", + "unicode": "e6aa", + "unicode_decimal": 59050 + }, + { + "icon_id": "24899657", + "name": "shimingrenzheng", + "font_class": "auth", + "unicode": "e6ab", + "unicode_decimal": 59051 + }, + { + "icon_id": "24899565", + "name": "person", + "font_class": "person", + "unicode": "e699", + "unicode_decimal": 59033 + }, + { + "icon_id": "24899566", + "name": "email-filled", + "font_class": "email-filled", + "unicode": "e69a", + "unicode_decimal": 59034 + }, + { + "icon_id": "24899567", + "name": "phone-filled", + "font_class": "phone-filled", + "unicode": "e69b", + "unicode_decimal": 59035 + }, + { + "icon_id": "24899568", + "name": "phone", + "font_class": "phone", + "unicode": "e69c", + "unicode_decimal": 59036 + }, + { + "icon_id": "24899570", + "name": "email", + "font_class": "email", + "unicode": "e69e", + "unicode_decimal": 59038 + }, + { + "icon_id": "24899571", + "name": "personadd", + "font_class": "personadd", + "unicode": "e69f", + "unicode_decimal": 59039 + }, + { + "icon_id": "24899558", + "name": "chatboxes-filled", + "font_class": "chatboxes-filled", + "unicode": "e692", + "unicode_decimal": 59026 + }, + { + "icon_id": "24899559", + "name": "contact", + "font_class": "contact", + "unicode": "e693", + "unicode_decimal": 59027 + }, + { + "icon_id": "24899560", + "name": "chatbubble-filled", + "font_class": "chatbubble-filled", + "unicode": "e694", + "unicode_decimal": 59028 + }, + { + "icon_id": "24899561", + "name": "contact-filled", + "font_class": "contact-filled", + "unicode": "e695", + "unicode_decimal": 59029 + }, + { + "icon_id": "24899562", + "name": "chatboxes", + "font_class": "chatboxes", + "unicode": "e696", + "unicode_decimal": 59030 + }, + { + "icon_id": "24899563", + "name": "chatbubble", + "font_class": "chatbubble", + "unicode": "e697", + "unicode_decimal": 59031 + }, + { + "icon_id": "24881290", + "name": "upload-filled", + "font_class": "upload-filled", + "unicode": "e68e", + "unicode_decimal": 59022 + }, + { + "icon_id": "24881292", + "name": "upload", + "font_class": "upload", + "unicode": "e690", + "unicode_decimal": 59024 + }, + { + "icon_id": "24881293", + "name": "weixin", + "font_class": "weixin", + "unicode": "e691", + "unicode_decimal": 59025 + }, + { + "icon_id": "24881274", + "name": "compose", + "font_class": "compose", + "unicode": "e67f", + "unicode_decimal": 59007 + }, + { + "icon_id": "24881275", + "name": "qq", + "font_class": "qq", + "unicode": "e680", + "unicode_decimal": 59008 + }, + { + "icon_id": "24881276", + "name": "download-filled", + "font_class": "download-filled", + "unicode": "e681", + "unicode_decimal": 59009 + }, + { + "icon_id": "24881277", + "name": "pengyouquan", + "font_class": "pyq", + "unicode": "e682", + "unicode_decimal": 59010 + }, + { + "icon_id": "24881279", + "name": "sound", + "font_class": "sound", + "unicode": "e684", + "unicode_decimal": 59012 + }, + { + "icon_id": "24881280", + "name": "trash-filled", + "font_class": "trash-filled", + "unicode": "e685", + "unicode_decimal": 59013 + }, + { + "icon_id": "24881281", + "name": "sound-filled", + "font_class": "sound-filled", + "unicode": "e686", + "unicode_decimal": 59014 + }, + { + "icon_id": "24881282", + "name": "trash", + "font_class": "trash", + "unicode": "e687", + "unicode_decimal": 59015 + }, + { + "icon_id": "24881284", + "name": "videocam-filled", + "font_class": "videocam-filled", + "unicode": "e689", + "unicode_decimal": 59017 + }, + { + "icon_id": "24881285", + "name": "spinner-cycle", + "font_class": "spinner-cycle", + "unicode": "e68a", + "unicode_decimal": 59018 + }, + { + "icon_id": "24881286", + "name": "weibo", + "font_class": "weibo", + "unicode": "e68b", + "unicode_decimal": 59019 + }, + { + "icon_id": "24881288", + "name": "videocam", + "font_class": "videocam", + "unicode": "e68c", + "unicode_decimal": 59020 + }, + { + "icon_id": "24881289", + "name": "download", + "font_class": "download", + "unicode": "e68d", + "unicode_decimal": 59021 + }, + { + "icon_id": "24879601", + "name": "help", + "font_class": "help", + "unicode": "e679", + "unicode_decimal": 59001 + }, + { + "icon_id": "24879602", + "name": "navigate-filled", + "font_class": "navigate-filled", + "unicode": "e67a", + "unicode_decimal": 59002 + }, + { + "icon_id": "24879603", + "name": "plusempty", + "font_class": "plusempty", + "unicode": "e67b", + "unicode_decimal": 59003 + }, + { + "icon_id": "24879604", + "name": "smallcircle", + "font_class": "smallcircle", + "unicode": "e67c", + "unicode_decimal": 59004 + }, + { + "icon_id": "24879605", + "name": "minus-filled", + "font_class": "minus-filled", + "unicode": "e67d", + "unicode_decimal": 59005 + }, + { + "icon_id": "24879606", + "name": "micoff", + "font_class": "micoff", + "unicode": "e67e", + "unicode_decimal": 59006 + }, + { + "icon_id": "24879588", + "name": "closeempty", + "font_class": "closeempty", + "unicode": "e66c", + "unicode_decimal": 58988 + }, + { + "icon_id": "24879589", + "name": "clear", + "font_class": "clear", + "unicode": "e66d", + "unicode_decimal": 58989 + }, + { + "icon_id": "24879590", + "name": "navigate", + "font_class": "navigate", + "unicode": "e66e", + "unicode_decimal": 58990 + }, + { + "icon_id": "24879591", + "name": "minus", + "font_class": "minus", + "unicode": "e66f", + "unicode_decimal": 58991 + }, + { + "icon_id": "24879592", + "name": "image", + "font_class": "image", + "unicode": "e670", + "unicode_decimal": 58992 + }, + { + "icon_id": "24879593", + "name": "mic", + "font_class": "mic", + "unicode": "e671", + "unicode_decimal": 58993 + }, + { + "icon_id": "24879594", + "name": "paperplane", + "font_class": "paperplane", + "unicode": "e672", + "unicode_decimal": 58994 + }, + { + "icon_id": "24879595", + "name": "close", + "font_class": "close", + "unicode": "e673", + "unicode_decimal": 58995 + }, + { + "icon_id": "24879596", + "name": "help-filled", + "font_class": "help-filled", + "unicode": "e674", + "unicode_decimal": 58996 + }, + { + "icon_id": "24879597", + "name": "plus-filled", + "font_class": "paperplane-filled", + "unicode": "e675", + "unicode_decimal": 58997 + }, + { + "icon_id": "24879598", + "name": "plus", + "font_class": "plus", + "unicode": "e676", + "unicode_decimal": 58998 + }, + { + "icon_id": "24879599", + "name": "mic-filled", + "font_class": "mic-filled", + "unicode": "e677", + "unicode_decimal": 58999 + }, + { + "icon_id": "24879600", + "name": "image-filled", + "font_class": "image-filled", + "unicode": "e678", + "unicode_decimal": 59000 + }, + { + "icon_id": "24855900", + "name": "locked-filled", + "font_class": "locked-filled", + "unicode": "e668", + "unicode_decimal": 58984 + }, + { + "icon_id": "24855901", + "name": "info", + "font_class": "info", + "unicode": "e669", + "unicode_decimal": 58985 + }, + { + "icon_id": "24855903", + "name": "locked", + "font_class": "locked", + "unicode": "e66b", + "unicode_decimal": 58987 + }, + { + "icon_id": "24855884", + "name": "camera-filled", + "font_class": "camera-filled", + "unicode": "e658", + "unicode_decimal": 58968 + }, + { + "icon_id": "24855885", + "name": "chat-filled", + "font_class": "chat-filled", + "unicode": "e659", + "unicode_decimal": 58969 + }, + { + "icon_id": "24855886", + "name": "camera", + "font_class": "camera", + "unicode": "e65a", + "unicode_decimal": 58970 + }, + { + "icon_id": "24855887", + "name": "circle", + "font_class": "circle", + "unicode": "e65b", + "unicode_decimal": 58971 + }, + { + "icon_id": "24855888", + "name": "checkmarkempty", + "font_class": "checkmarkempty", + "unicode": "e65c", + "unicode_decimal": 58972 + }, + { + "icon_id": "24855889", + "name": "chat", + "font_class": "chat", + "unicode": "e65d", + "unicode_decimal": 58973 + }, + { + "icon_id": "24855890", + "name": "circle-filled", + "font_class": "circle-filled", + "unicode": "e65e", + "unicode_decimal": 58974 + }, + { + "icon_id": "24855891", + "name": "flag", + "font_class": "flag", + "unicode": "e65f", + "unicode_decimal": 58975 + }, + { + "icon_id": "24855892", + "name": "flag-filled", + "font_class": "flag-filled", + "unicode": "e660", + "unicode_decimal": 58976 + }, + { + "icon_id": "24855893", + "name": "gear-filled", + "font_class": "gear-filled", + "unicode": "e661", + "unicode_decimal": 58977 + }, + { + "icon_id": "24855894", + "name": "home", + "font_class": "home", + "unicode": "e662", + "unicode_decimal": 58978 + }, + { + "icon_id": "24855895", + "name": "home-filled", + "font_class": "home-filled", + "unicode": "e663", + "unicode_decimal": 58979 + }, + { + "icon_id": "24855896", + "name": "gear", + "font_class": "gear", + "unicode": "e664", + "unicode_decimal": 58980 + }, + { + "icon_id": "24855897", + "name": "smallcircle-filled", + "font_class": "smallcircle-filled", + "unicode": "e665", + "unicode_decimal": 58981 + }, + { + "icon_id": "24855898", + "name": "map-filled", + "font_class": "map-filled", + "unicode": "e666", + "unicode_decimal": 58982 + }, + { + "icon_id": "24855899", + "name": "map", + "font_class": "map", + "unicode": "e667", + "unicode_decimal": 58983 + }, + { + "icon_id": "24855825", + "name": "refresh-filled", + "font_class": "refresh-filled", + "unicode": "e656", + "unicode_decimal": 58966 + }, + { + "icon_id": "24855826", + "name": "refresh", + "font_class": "refresh", + "unicode": "e657", + "unicode_decimal": 58967 + }, + { + "icon_id": "24855808", + "name": "cloud-upload", + "font_class": "cloud-upload", + "unicode": "e645", + "unicode_decimal": 58949 + }, + { + "icon_id": "24855809", + "name": "cloud-download-filled", + "font_class": "cloud-download-filled", + "unicode": "e646", + "unicode_decimal": 58950 + }, + { + "icon_id": "24855810", + "name": "cloud-download", + "font_class": "cloud-download", + "unicode": "e647", + "unicode_decimal": 58951 + }, + { + "icon_id": "24855811", + "name": "cloud-upload-filled", + "font_class": "cloud-upload-filled", + "unicode": "e648", + "unicode_decimal": 58952 + }, + { + "icon_id": "24855813", + "name": "redo", + "font_class": "redo", + "unicode": "e64a", + "unicode_decimal": 58954 + }, + { + "icon_id": "24855814", + "name": "images-filled", + "font_class": "images-filled", + "unicode": "e64b", + "unicode_decimal": 58955 + }, + { + "icon_id": "24855815", + "name": "undo-filled", + "font_class": "undo-filled", + "unicode": "e64c", + "unicode_decimal": 58956 + }, + { + "icon_id": "24855816", + "name": "more", + "font_class": "more", + "unicode": "e64d", + "unicode_decimal": 58957 + }, + { + "icon_id": "24855817", + "name": "more-filled", + "font_class": "more-filled", + "unicode": "e64e", + "unicode_decimal": 58958 + }, + { + "icon_id": "24855818", + "name": "undo", + "font_class": "undo", + "unicode": "e64f", + "unicode_decimal": 58959 + }, + { + "icon_id": "24855819", + "name": "images", + "font_class": "images", + "unicode": "e650", + "unicode_decimal": 58960 + }, + { + "icon_id": "24855821", + "name": "paperclip", + "font_class": "paperclip", + "unicode": "e652", + "unicode_decimal": 58962 + }, + { + "icon_id": "24855822", + "name": "settings", + "font_class": "settings", + "unicode": "e653", + "unicode_decimal": 58963 + }, + { + "icon_id": "24855823", + "name": "search", + "font_class": "search", + "unicode": "e654", + "unicode_decimal": 58964 + }, + { + "icon_id": "24855824", + "name": "redo-filled", + "font_class": "redo-filled", + "unicode": "e655", + "unicode_decimal": 58965 + }, + { + "icon_id": "24841702", + "name": "list", + "font_class": "list", + "unicode": "e644", + "unicode_decimal": 58948 + }, + { + "icon_id": "24841489", + "name": "mail-open-filled", + "font_class": "mail-open-filled", + "unicode": "e63a", + "unicode_decimal": 58938 + }, + { + "icon_id": "24841491", + "name": "hand-thumbsdown-filled", + "font_class": "hand-down-filled", + "unicode": "e63c", + "unicode_decimal": 58940 + }, + { + "icon_id": "24841492", + "name": "hand-thumbsdown", + "font_class": "hand-down", + "unicode": "e63d", + "unicode_decimal": 58941 + }, + { + "icon_id": "24841493", + "name": "hand-thumbsup-filled", + "font_class": "hand-up-filled", + "unicode": "e63e", + "unicode_decimal": 58942 + }, + { + "icon_id": "24841494", + "name": "hand-thumbsup", + "font_class": "hand-up", + "unicode": "e63f", + "unicode_decimal": 58943 + }, + { + "icon_id": "24841496", + "name": "heart-filled", + "font_class": "heart-filled", + "unicode": "e641", + "unicode_decimal": 58945 + }, + { + "icon_id": "24841498", + "name": "mail-open", + "font_class": "mail-open", + "unicode": "e643", + "unicode_decimal": 58947 + }, + { + "icon_id": "24841488", + "name": "heart", + "font_class": "heart", + "unicode": "e639", + "unicode_decimal": 58937 + }, + { + "icon_id": "24839963", + "name": "loop", + "font_class": "loop", + "unicode": "e633", + "unicode_decimal": 58931 + }, + { + "icon_id": "24839866", + "name": "pulldown", + "font_class": "pulldown", + "unicode": "e632", + "unicode_decimal": 58930 + }, + { + "icon_id": "24813798", + "name": "scan", + "font_class": "scan", + "unicode": "e62a", + "unicode_decimal": 58922 + }, + { + "icon_id": "24813786", + "name": "bars", + "font_class": "bars", + "unicode": "e627", + "unicode_decimal": 58919 + }, + { + "icon_id": "24813788", + "name": "cart-filled", + "font_class": "cart-filled", + "unicode": "e629", + "unicode_decimal": 58921 + }, + { + "icon_id": "24813790", + "name": "checkbox", + "font_class": "checkbox", + "unicode": "e62b", + "unicode_decimal": 58923 + }, + { + "icon_id": "24813791", + "name": "checkbox-filled", + "font_class": "checkbox-filled", + "unicode": "e62c", + "unicode_decimal": 58924 + }, + { + "icon_id": "24813794", + "name": "shop", + "font_class": "shop", + "unicode": "e62f", + "unicode_decimal": 58927 + }, + { + "icon_id": "24813795", + "name": "headphones", + "font_class": "headphones", + "unicode": "e630", + "unicode_decimal": 58928 + }, + { + "icon_id": "24813796", + "name": "cart", + "font_class": "cart", + "unicode": "e631", + "unicode_decimal": 58929 + } + ] +} diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue new file mode 100644 index 0000000..86e7444 --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons.css b/uni_modules/uni-icons/components/uni-icons/uniicons.css new file mode 100644 index 0000000..2f56eab --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/uniicons.css @@ -0,0 +1,663 @@ +.uniui-color:before { + content: "\e6cf"; +} + +.uniui-wallet:before { + content: "\e6b1"; +} + +.uniui-settings-filled:before { + content: "\e6ce"; +} + +.uniui-auth-filled:before { + content: "\e6cc"; +} + +.uniui-shop-filled:before { + content: "\e6cd"; +} + +.uniui-staff-filled:before { + content: "\e6cb"; +} + +.uniui-vip-filled:before { + content: "\e6c6"; +} + +.uniui-plus-filled:before { + content: "\e6c7"; +} + +.uniui-folder-add-filled:before { + content: "\e6c8"; +} + +.uniui-color-filled:before { + content: "\e6c9"; +} + +.uniui-tune-filled:before { + content: "\e6ca"; +} + +.uniui-calendar-filled:before { + content: "\e6c0"; +} + +.uniui-notification-filled:before { + content: "\e6c1"; +} + +.uniui-wallet-filled:before { + content: "\e6c2"; +} + +.uniui-medal-filled:before { + content: "\e6c3"; +} + +.uniui-gift-filled:before { + content: "\e6c4"; +} + +.uniui-fire-filled:before { + content: "\e6c5"; +} + +.uniui-refreshempty:before { + content: "\e6bf"; +} + +.uniui-location-filled:before { + content: "\e6af"; +} + +.uniui-person-filled:before { + content: "\e69d"; +} + +.uniui-personadd-filled:before { + content: "\e698"; +} + +.uniui-back:before { + content: "\e6b9"; +} + +.uniui-forward:before { + content: "\e6ba"; +} + +.uniui-arrow-right:before { + content: "\e6bb"; +} + +.uniui-arrowthinright:before { + content: "\e6bb"; +} + +.uniui-arrow-left:before { + content: "\e6bc"; +} + +.uniui-arrowthinleft:before { + content: "\e6bc"; +} + +.uniui-arrow-up:before { + content: "\e6bd"; +} + +.uniui-arrowthinup:before { + content: "\e6bd"; +} + +.uniui-arrow-down:before { + content: "\e6be"; +} + +.uniui-arrowthindown:before { + content: "\e6be"; +} + +.uniui-bottom:before { + content: "\e6b8"; +} + +.uniui-arrowdown:before { + content: "\e6b8"; +} + +.uniui-right:before { + content: "\e6b5"; +} + +.uniui-arrowright:before { + content: "\e6b5"; +} + +.uniui-top:before { + content: "\e6b6"; +} + +.uniui-arrowup:before { + content: "\e6b6"; +} + +.uniui-left:before { + content: "\e6b7"; +} + +.uniui-arrowleft:before { + content: "\e6b7"; +} + +.uniui-eye:before { + content: "\e651"; +} + +.uniui-eye-filled:before { + content: "\e66a"; +} + +.uniui-eye-slash:before { + content: "\e6b3"; +} + +.uniui-eye-slash-filled:before { + content: "\e6b4"; +} + +.uniui-info-filled:before { + content: "\e649"; +} + +.uniui-reload:before { + content: "\e6b2"; +} + +.uniui-micoff-filled:before { + content: "\e6b0"; +} + +.uniui-map-pin-ellipse:before { + content: "\e6ac"; +} + +.uniui-map-pin:before { + content: "\e6ad"; +} + +.uniui-location:before { + content: "\e6ae"; +} + +.uniui-starhalf:before { + content: "\e683"; +} + +.uniui-star:before { + content: "\e688"; +} + +.uniui-star-filled:before { + content: "\e68f"; +} + +.uniui-calendar:before { + content: "\e6a0"; +} + +.uniui-fire:before { + content: "\e6a1"; +} + +.uniui-medal:before { + content: "\e6a2"; +} + +.uniui-font:before { + content: "\e6a3"; +} + +.uniui-gift:before { + content: "\e6a4"; +} + +.uniui-link:before { + content: "\e6a5"; +} + +.uniui-notification:before { + content: "\e6a6"; +} + +.uniui-staff:before { + content: "\e6a7"; +} + +.uniui-vip:before { + content: "\e6a8"; +} + +.uniui-folder-add:before { + content: "\e6a9"; +} + +.uniui-tune:before { + content: "\e6aa"; +} + +.uniui-auth:before { + content: "\e6ab"; +} + +.uniui-person:before { + content: "\e699"; +} + +.uniui-email-filled:before { + content: "\e69a"; +} + +.uniui-phone-filled:before { + content: "\e69b"; +} + +.uniui-phone:before { + content: "\e69c"; +} + +.uniui-email:before { + content: "\e69e"; +} + +.uniui-personadd:before { + content: "\e69f"; +} + +.uniui-chatboxes-filled:before { + content: "\e692"; +} + +.uniui-contact:before { + content: "\e693"; +} + +.uniui-chatbubble-filled:before { + content: "\e694"; +} + +.uniui-contact-filled:before { + content: "\e695"; +} + +.uniui-chatboxes:before { + content: "\e696"; +} + +.uniui-chatbubble:before { + content: "\e697"; +} + +.uniui-upload-filled:before { + content: "\e68e"; +} + +.uniui-upload:before { + content: "\e690"; +} + +.uniui-weixin:before { + content: "\e691"; +} + +.uniui-compose:before { + content: "\e67f"; +} + +.uniui-qq:before { + content: "\e680"; +} + +.uniui-download-filled:before { + content: "\e681"; +} + +.uniui-pyq:before { + content: "\e682"; +} + +.uniui-sound:before { + content: "\e684"; +} + +.uniui-trash-filled:before { + content: "\e685"; +} + +.uniui-sound-filled:before { + content: "\e686"; +} + +.uniui-trash:before { + content: "\e687"; +} + +.uniui-videocam-filled:before { + content: "\e689"; +} + +.uniui-spinner-cycle:before { + content: "\e68a"; +} + +.uniui-weibo:before { + content: "\e68b"; +} + +.uniui-videocam:before { + content: "\e68c"; +} + +.uniui-download:before { + content: "\e68d"; +} + +.uniui-help:before { + content: "\e679"; +} + +.uniui-navigate-filled:before { + content: "\e67a"; +} + +.uniui-plusempty:before { + content: "\e67b"; +} + +.uniui-smallcircle:before { + content: "\e67c"; +} + +.uniui-minus-filled:before { + content: "\e67d"; +} + +.uniui-micoff:before { + content: "\e67e"; +} + +.uniui-closeempty:before { + content: "\e66c"; +} + +.uniui-clear:before { + content: "\e66d"; +} + +.uniui-navigate:before { + content: "\e66e"; +} + +.uniui-minus:before { + content: "\e66f"; +} + +.uniui-image:before { + content: "\e670"; +} + +.uniui-mic:before { + content: "\e671"; +} + +.uniui-paperplane:before { + content: "\e672"; +} + +.uniui-close:before { + content: "\e673"; +} + +.uniui-help-filled:before { + content: "\e674"; +} + +.uniui-paperplane-filled:before { + content: "\e675"; +} + +.uniui-plus:before { + content: "\e676"; +} + +.uniui-mic-filled:before { + content: "\e677"; +} + +.uniui-image-filled:before { + content: "\e678"; +} + +.uniui-locked-filled:before { + content: "\e668"; +} + +.uniui-info:before { + content: "\e669"; +} + +.uniui-locked:before { + content: "\e66b"; +} + +.uniui-camera-filled:before { + content: "\e658"; +} + +.uniui-chat-filled:before { + content: "\e659"; +} + +.uniui-camera:before { + content: "\e65a"; +} + +.uniui-circle:before { + content: "\e65b"; +} + +.uniui-checkmarkempty:before { + content: "\e65c"; +} + +.uniui-chat:before { + content: "\e65d"; +} + +.uniui-circle-filled:before { + content: "\e65e"; +} + +.uniui-flag:before { + content: "\e65f"; +} + +.uniui-flag-filled:before { + content: "\e660"; +} + +.uniui-gear-filled:before { + content: "\e661"; +} + +.uniui-home:before { + content: "\e662"; +} + +.uniui-home-filled:before { + content: "\e663"; +} + +.uniui-gear:before { + content: "\e664"; +} + +.uniui-smallcircle-filled:before { + content: "\e665"; +} + +.uniui-map-filled:before { + content: "\e666"; +} + +.uniui-map:before { + content: "\e667"; +} + +.uniui-refresh-filled:before { + content: "\e656"; +} + +.uniui-refresh:before { + content: "\e657"; +} + +.uniui-cloud-upload:before { + content: "\e645"; +} + +.uniui-cloud-download-filled:before { + content: "\e646"; +} + +.uniui-cloud-download:before { + content: "\e647"; +} + +.uniui-cloud-upload-filled:before { + content: "\e648"; +} + +.uniui-redo:before { + content: "\e64a"; +} + +.uniui-images-filled:before { + content: "\e64b"; +} + +.uniui-undo-filled:before { + content: "\e64c"; +} + +.uniui-more:before { + content: "\e64d"; +} + +.uniui-more-filled:before { + content: "\e64e"; +} + +.uniui-undo:before { + content: "\e64f"; +} + +.uniui-images:before { + content: "\e650"; +} + +.uniui-paperclip:before { + content: "\e652"; +} + +.uniui-settings:before { + content: "\e653"; +} + +.uniui-search:before { + content: "\e654"; +} + +.uniui-redo-filled:before { + content: "\e655"; +} + +.uniui-list:before { + content: "\e644"; +} + +.uniui-mail-open-filled:before { + content: "\e63a"; +} + +.uniui-hand-down-filled:before { + content: "\e63c"; +} + +.uniui-hand-down:before { + content: "\e63d"; +} + +.uniui-hand-up-filled:before { + content: "\e63e"; +} + +.uniui-hand-up:before { + content: "\e63f"; +} + +.uniui-heart-filled:before { + content: "\e641"; +} + +.uniui-mail-open:before { + content: "\e643"; +} + +.uniui-heart:before { + content: "\e639"; +} + +.uniui-loop:before { + content: "\e633"; +} + +.uniui-pulldown:before { + content: "\e632"; +} + +.uniui-scan:before { + content: "\e62a"; +} + +.uniui-bars:before { + content: "\e627"; +} + +.uniui-cart-filled:before { + content: "\e629"; +} + +.uniui-checkbox:before { + content: "\e62b"; +} + +.uniui-checkbox-filled:before { + content: "\e62c"; +} + +.uniui-shop:before { + content: "\e62f"; +} + +.uniui-headphones:before { + content: "\e630"; +} + +.uniui-cart:before { + content: "\e631"; +} diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons.ttf b/uni_modules/uni-icons/components/uni-icons/uniicons.ttf new file mode 100644 index 0000000..835f33b Binary files /dev/null and b/uni_modules/uni-icons/components/uni-icons/uniicons.ttf differ diff --git a/uni_modules/uni-icons/package.json b/uni_modules/uni-icons/package.json new file mode 100644 index 0000000..d1c4e77 --- /dev/null +++ b/uni_modules/uni-icons/package.json @@ -0,0 +1,86 @@ +{ + "id": "uni-icons", + "displayName": "uni-icons 图标", + "version": "1.3.5", + "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", + "keywords": [ + "uni-ui", + "uniui", + "icon", + "图标" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.2.14" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-icons/readme.md b/uni_modules/uni-icons/readme.md new file mode 100644 index 0000000..86234ba --- /dev/null +++ b/uni_modules/uni-icons/readme.md @@ -0,0 +1,8 @@ +## Icons 图标 +> **组件名:uni-icons** +> 代码块: `uIcons` + +用于展示 icons 图标 。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 diff --git a/uni_modules/uni-scss/changelog.md b/uni_modules/uni-scss/changelog.md new file mode 100644 index 0000000..b863bb0 --- /dev/null +++ b/uni_modules/uni-scss/changelog.md @@ -0,0 +1,8 @@ +## 1.0.3(2022-01-21) +- 优化 组件示例 +## 1.0.2(2021-11-22) +- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题 +## 1.0.1(2021-11-22) +- 修复 vue3中scss语法兼容问题 +## 1.0.0(2021-11-18) +- init diff --git a/uni_modules/uni-scss/index.scss b/uni_modules/uni-scss/index.scss new file mode 100644 index 0000000..1744a5f --- /dev/null +++ b/uni_modules/uni-scss/index.scss @@ -0,0 +1 @@ +@import './styles/index.scss'; diff --git a/uni_modules/uni-scss/package.json b/uni_modules/uni-scss/package.json new file mode 100644 index 0000000..7cc0ccb --- /dev/null +++ b/uni_modules/uni-scss/package.json @@ -0,0 +1,82 @@ +{ + "id": "uni-scss", + "displayName": "uni-scss 辅助样式", + "version": "1.0.3", + "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。", + "keywords": [ + "uni-scss", + "uni-ui", + "辅助样式" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "JS SDK", + "通用 SDK" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "n", + "联盟": "n" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/uni_modules/uni-scss/readme.md b/uni_modules/uni-scss/readme.md new file mode 100644 index 0000000..b7d1c25 --- /dev/null +++ b/uni_modules/uni-scss/readme.md @@ -0,0 +1,4 @@ +`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/uni_modules/uni-scss/styles/index.scss b/uni_modules/uni-scss/styles/index.scss new file mode 100644 index 0000000..ffac4fe --- /dev/null +++ b/uni_modules/uni-scss/styles/index.scss @@ -0,0 +1,7 @@ +@import './setting/_variables.scss'; +@import './setting/_border.scss'; +@import './setting/_color.scss'; +@import './setting/_space.scss'; +@import './setting/_radius.scss'; +@import './setting/_text.scss'; +@import './setting/_styles.scss'; diff --git a/uni_modules/uni-scss/styles/setting/_border.scss b/uni_modules/uni-scss/styles/setting/_border.scss new file mode 100644 index 0000000..12a11c3 --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_border.scss @@ -0,0 +1,3 @@ +.uni-border { + border: 1px $uni-border-1 solid; +} \ No newline at end of file diff --git a/uni_modules/uni-scss/styles/setting/_color.scss b/uni_modules/uni-scss/styles/setting/_color.scss new file mode 100644 index 0000000..1ededd9 --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_color.scss @@ -0,0 +1,66 @@ + +// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐 +// @mixin get-styles($k,$c) { +// @if $k == size or $k == weight{ +// font-#{$k}:#{$c} +// }@else{ +// #{$k}:#{$c} +// } +// } +$uni-ui-color:( + // 主色 + primary: $uni-primary, + primary-disable: $uni-primary-disable, + primary-light: $uni-primary-light, + // 辅助色 + success: $uni-success, + success-disable: $uni-success-disable, + success-light: $uni-success-light, + warning: $uni-warning, + warning-disable: $uni-warning-disable, + warning-light: $uni-warning-light, + error: $uni-error, + error-disable: $uni-error-disable, + error-light: $uni-error-light, + info: $uni-info, + info-disable: $uni-info-disable, + info-light: $uni-info-light, + // 中性色 + main-color: $uni-main-color, + base-color: $uni-base-color, + secondary-color: $uni-secondary-color, + extra-color: $uni-extra-color, + // 背景色 + bg-color: $uni-bg-color, + // 边框颜色 + border-1: $uni-border-1, + border-2: $uni-border-2, + border-3: $uni-border-3, + border-4: $uni-border-4, + // 黑色 + black:$uni-black, + // 白色 + white:$uni-white, + // 透明 + transparent:$uni-transparent +) !default; +@each $key, $child in $uni-ui-color { + .uni-#{"" + $key} { + color: $child; + } + .uni-#{"" + $key}-bg { + background-color: $child; + } +} +.uni-shadow-sm { + box-shadow: $uni-shadow-sm; +} +.uni-shadow-base { + box-shadow: $uni-shadow-base; +} +.uni-shadow-lg { + box-shadow: $uni-shadow-lg; +} +.uni-mask { + background-color:$uni-mask; +} diff --git a/uni_modules/uni-scss/styles/setting/_radius.scss b/uni_modules/uni-scss/styles/setting/_radius.scss new file mode 100644 index 0000000..9a0428b --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_radius.scss @@ -0,0 +1,55 @@ +@mixin radius($r,$d:null ,$important: false){ + $radius-value:map-get($uni-radius, $r) if($important, !important, null); + // Key exists within the $uni-radius variable + @if (map-has-key($uni-radius, $r) and $d){ + @if $d == t { + border-top-left-radius:$radius-value; + border-top-right-radius:$radius-value; + }@else if $d == r { + border-top-right-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == b { + border-bottom-left-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == l { + border-top-left-radius:$radius-value; + border-bottom-left-radius:$radius-value; + }@else if $d == tl { + border-top-left-radius:$radius-value; + }@else if $d == tr { + border-top-right-radius:$radius-value; + }@else if $d == br { + border-bottom-right-radius:$radius-value; + }@else if $d == bl { + border-bottom-left-radius:$radius-value; + } + }@else{ + border-radius:$radius-value; + } +} + +@each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $key} { + @include radius($key) + } + }@else{ + .uni-radius { + @include radius($key) + } + } +} + +@each $direction in t, r, b, l,tl, tr, br, bl { + @each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $direction}-#{"" + $key} { + @include radius($key,$direction,false) + } + }@else{ + .uni-radius-#{$direction} { + @include radius($key,$direction,false) + } + } + } +} diff --git a/uni_modules/uni-scss/styles/setting/_space.scss b/uni_modules/uni-scss/styles/setting/_space.scss new file mode 100644 index 0000000..3c89528 --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_space.scss @@ -0,0 +1,56 @@ + +@mixin fn($space,$direction,$size,$n) { + @if $n { + #{$space}-#{$direction}: #{$size*$uni-space-root}px + } @else { + #{$space}-#{$direction}: #{-$size*$uni-space-root}px + } +} +@mixin get-styles($direction,$i,$space,$n){ + @if $direction == t { + @include fn($space, top,$i,$n); + } + @if $direction == r { + @include fn($space, right,$i,$n); + } + @if $direction == b { + @include fn($space, bottom,$i,$n); + } + @if $direction == l { + @include fn($space, left,$i,$n); + } + @if $direction == x { + @include fn($space, left,$i,$n); + @include fn($space, right,$i,$n); + } + @if $direction == y { + @include fn($space, top,$i,$n); + @include fn($space, bottom,$i,$n); + } + @if $direction == a { + @if $n { + #{$space}:#{$i*$uni-space-root}px; + } @else { + #{$space}:#{-$i*$uni-space-root}px; + } + } +} + +@each $orientation in m,p { + $space: margin; + @if $orientation == m { + $space: margin; + } @else { + $space: padding; + } + @for $i from 0 through 16 { + @each $direction in t, r, b, l, x, y, a { + .uni-#{$orientation}#{$direction}-#{$i} { + @include get-styles($direction,$i,$space,true); + } + .uni-#{$orientation}#{$direction}-n#{$i} { + @include get-styles($direction,$i,$space,false); + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-scss/styles/setting/_styles.scss b/uni_modules/uni-scss/styles/setting/_styles.scss new file mode 100644 index 0000000..689afec --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_styles.scss @@ -0,0 +1,167 @@ +/* #ifndef APP-NVUE */ + +$-color-white:#fff; +$-color-black:#000; +@mixin base-style($color) { + color: #fff; + background-color: $color; + border-color: mix($-color-black, $color, 8%); + &:not([hover-class]):active { + background: mix($-color-black, $color, 10%); + border-color: mix($-color-black, $color, 20%); + color: $-color-white; + outline: none; + } +} +@mixin is-color($color) { + @include base-style($color); + &[loading] { + @include base-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &[loading], + &:not([hover-class]):active { + color: $-color-white; + border-color: mix(darken($color,10%), $-color-white); + background-color: mix($color, $-color-white); + } + } + +} +@mixin base-plain-style($color) { + color:$color; + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 70%); + &:not([hover-class]):active { + background: mix($-color-white, $color, 80%); + color: $color; + outline: none; + border-color: mix($-color-white, $color, 50%); + } +} +@mixin is-plain($color){ + &[plain] { + @include base-plain-style($color); + &[loading] { + @include base-plain-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &:active { + color: mix($-color-white, $color, 40%); + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 80%); + } + } + } +} + + +.uni-btn { + margin: 5px; + color: #393939; + border:1px solid #ccc; + font-size: 16px; + font-weight: 200; + background-color: #F9F9F9; + // TODO 暂时处理边框隐藏一边的问题 + overflow: visible; + &::after{ + border: none; + } + + &:not([type]),&[type=default] { + color: #999; + &[loading] { + background: none; + &::before { + margin-right:5px; + } + } + + + + &[disabled]{ + color: mix($-color-white, #999, 60%); + &, + &[loading], + &:active { + color: mix($-color-white, #999, 60%); + background-color: mix($-color-white,$-color-black , 98%); + border-color: mix($-color-white, #999, 85%); + } + } + + &[plain] { + color: #999; + background: none; + border-color: $uni-border-1; + &:not([hover-class]):active { + background: none; + color: mix($-color-white, $-color-black, 80%); + border-color: mix($-color-white, $-color-black, 90%); + outline: none; + } + &[disabled]{ + &, + &[loading], + &:active { + background: none; + color: mix($-color-white, #999, 60%); + border-color: mix($-color-white, #999, 85%); + } + } + } + } + + &:not([hover-class]):active { + color: mix($-color-white, $-color-black, 50%); + } + + &[size=mini] { + font-size: 16px; + font-weight: 200; + border-radius: 8px; + } + + + + &.uni-btn-small { + font-size: 14px; + } + &.uni-btn-mini { + font-size: 12px; + } + + &.uni-btn-radius { + border-radius: 999px; + } + &[type=primary] { + @include is-color($uni-primary); + @include is-plain($uni-primary) + } + &[type=success] { + @include is-color($uni-success); + @include is-plain($uni-success) + } + &[type=error] { + @include is-color($uni-error); + @include is-plain($uni-error) + } + &[type=warning] { + @include is-color($uni-warning); + @include is-plain($uni-warning) + } + &[type=info] { + @include is-color($uni-info); + @include is-plain($uni-info) + } +} +/* #endif */ diff --git a/uni_modules/uni-scss/styles/setting/_text.scss b/uni_modules/uni-scss/styles/setting/_text.scss new file mode 100644 index 0000000..a34d08f --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_text.scss @@ -0,0 +1,24 @@ +@mixin get-styles($k,$c) { + @if $k == size or $k == weight{ + font-#{$k}:#{$c} + }@else{ + #{$k}:#{$c} + } +} + +@each $key, $child in $uni-headings { + /* #ifndef APP-NVUE */ + .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ + /* #ifdef APP-NVUE */ + .container .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ +} diff --git a/uni_modules/uni-scss/styles/setting/_variables.scss b/uni_modules/uni-scss/styles/setting/_variables.scss new file mode 100644 index 0000000..557d3d7 --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_variables.scss @@ -0,0 +1,146 @@ +// @use "sass:math"; +@import '../tools/functions.scss'; +// 间距基础倍数 +$uni-space-root: 2 !default; +// 边框半径默认值 +$uni-radius-root:5px !default; +$uni-radius: () !default; +// 边框半径断点 +$uni-radius: map-deep-merge( + ( + 0: 0, + // TODO 当前版本暂时不支持 sm 属性 + // 'sm': math.div($uni-radius-root, 2), + null: $uni-radius-root, + 'lg': $uni-radius-root * 2, + 'xl': $uni-radius-root * 6, + 'pill': 9999px, + 'circle': 50% + ), + $uni-radius +); +// 字体家族 +$body-font-family: 'Roboto', sans-serif !default; +// 文本 +$heading-font-family: $body-font-family !default; +$uni-headings: () !default; +$letterSpacing: -0.01562em; +$uni-headings: map-deep-merge( + ( + 'h1': ( + size: 32px, + weight: 300, + line-height: 50px, + // letter-spacing:-0.01562em + ), + 'h2': ( + size: 28px, + weight: 300, + line-height: 40px, + // letter-spacing: -0.00833em + ), + 'h3': ( + size: 24px, + weight: 400, + line-height: 32px, + // letter-spacing: normal + ), + 'h4': ( + size: 20px, + weight: 400, + line-height: 30px, + // letter-spacing: 0.00735em + ), + 'h5': ( + size: 16px, + weight: 400, + line-height: 24px, + // letter-spacing: normal + ), + 'h6': ( + size: 14px, + weight: 500, + line-height: 18px, + // letter-spacing: 0.0125em + ), + 'subtitle': ( + size: 12px, + weight: 400, + line-height: 20px, + // letter-spacing: 0.00937em + ), + 'body': ( + font-size: 14px, + font-weight: 400, + line-height: 22px, + // letter-spacing: 0.03125em + ), + 'caption': ( + 'size': 12px, + 'weight': 400, + 'line-height': 20px, + // 'letter-spacing': 0.03333em, + // 'text-transform': false + ) + ), + $uni-headings +); + + + +// 主色 +$uni-primary: #2979ff !default; +$uni-primary-disable:lighten($uni-primary,20%) !default; +$uni-primary-light: lighten($uni-primary,25%) !default; + +// 辅助色 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 +$uni-success: #18bc37 !default; +$uni-success-disable:lighten($uni-success,20%) !default; +$uni-success-light: lighten($uni-success,25%) !default; + +$uni-warning: #f3a73f !default; +$uni-warning-disable:lighten($uni-warning,20%) !default; +$uni-warning-light: lighten($uni-warning,25%) !default; + +$uni-error: #e43d33 !default; +$uni-error-disable:lighten($uni-error,20%) !default; +$uni-error-light: lighten($uni-error,25%) !default; + +$uni-info: #8f939c !default; +$uni-info-disable:lighten($uni-info,20%) !default; +$uni-info-light: lighten($uni-info,25%) !default; + +// 中性色 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 +$uni-main-color: #3a3a3a !default; // 主要文字 +$uni-base-color: #6a6a6a !default; // 常规文字 +$uni-secondary-color: #909399 !default; // 次要文字 +$uni-extra-color: #c7c7c7 !default; // 辅助说明 + +// 边框颜色 +$uni-border-1: #F0F0F0 !default; +$uni-border-2: #EDEDED !default; +$uni-border-3: #DCDCDC !default; +$uni-border-4: #B9B9B9 !default; + +// 常规色 +$uni-black: #000000 !default; +$uni-white: #ffffff !default; +$uni-transparent: rgba($color: #000000, $alpha: 0) !default; + +// 背景色 +$uni-bg-color: #f7f7f7 !default; + +/* 水平间距 */ +$uni-spacing-sm: 8px !default; +$uni-spacing-base: 15px !default; +$uni-spacing-lg: 30px !default; + +// 阴影 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default; +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default; +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default; + +// 蒙版 +$uni-mask: rgba($color: #000000, $alpha: 0.4) !default; diff --git a/uni_modules/uni-scss/styles/tools/functions.scss b/uni_modules/uni-scss/styles/tools/functions.scss new file mode 100644 index 0000000..ac6f63e --- /dev/null +++ b/uni_modules/uni-scss/styles/tools/functions.scss @@ -0,0 +1,19 @@ +// 合并 map +@function map-deep-merge($parent-map, $child-map){ + $result: $parent-map; + @each $key, $child in $child-map { + $parent-has-key: map-has-key($result, $key); + $parent-value: map-get($result, $key); + $parent-type: type-of($parent-value); + $child-type: type-of($child); + $parent-is-map: $parent-type == map; + $child-is-map: $child-type == map; + + @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){ + $result: map-merge($result, ( $key: $child )); + }@else { + $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) )); + } + } + @return $result; +}; diff --git a/uni_modules/uni-scss/theme.scss b/uni_modules/uni-scss/theme.scss new file mode 100644 index 0000000..80ee62f --- /dev/null +++ b/uni_modules/uni-scss/theme.scss @@ -0,0 +1,31 @@ +// 间距基础倍数 +$uni-space-root: 2; +// 边框半径默认值 +$uni-radius-root:5px; +// 主色 +$uni-primary: #2979ff; +// 辅助色 +$uni-success: #4cd964; +// 警告色 +$uni-warning: #f0ad4e; +// 错误色 +$uni-error: #dd524d; +// 描述色 +$uni-info: #909399; +// 中性色 +$uni-main-color: #303133; +$uni-base-color: #606266; +$uni-secondary-color: #909399; +$uni-extra-color: #C0C4CC; +// 背景色 +$uni-bg-color: #f5f5f5; +// 边框颜色 +$uni-border-1: #DCDFE6; +$uni-border-2: #E4E7ED; +$uni-border-3: #EBEEF5; +$uni-border-4: #F2F6FC; + +// 常规色 +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); diff --git a/uni_modules/uni-scss/variables.scss b/uni_modules/uni-scss/variables.scss new file mode 100644 index 0000000..1c062d4 --- /dev/null +++ b/uni_modules/uni-scss/variables.scss @@ -0,0 +1,62 @@ +@import './styles/setting/_variables.scss'; +// 间距基础倍数 +$uni-space-root: 2; +// 边框半径默认值 +$uni-radius-root:5px; + +// 主色 +$uni-primary: #2979ff; +$uni-primary-disable:mix(#fff,$uni-primary,50%); +$uni-primary-light: mix(#fff,$uni-primary,80%); + +// 辅助色 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 +$uni-success: #18bc37; +$uni-success-disable:mix(#fff,$uni-success,50%); +$uni-success-light: mix(#fff,$uni-success,80%); + +$uni-warning: #f3a73f; +$uni-warning-disable:mix(#fff,$uni-warning,50%); +$uni-warning-light: mix(#fff,$uni-warning,80%); + +$uni-error: #e43d33; +$uni-error-disable:mix(#fff,$uni-error,50%); +$uni-error-light: mix(#fff,$uni-error,80%); + +$uni-info: #8f939c; +$uni-info-disable:mix(#fff,$uni-info,50%); +$uni-info-light: mix(#fff,$uni-info,80%); + +// 中性色 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 +$uni-main-color: #3a3a3a; // 主要文字 +$uni-base-color: #6a6a6a; // 常规文字 +$uni-secondary-color: #909399; // 次要文字 +$uni-extra-color: #c7c7c7; // 辅助说明 + +// 边框颜色 +$uni-border-1: #F0F0F0; +$uni-border-2: #EDEDED; +$uni-border-3: #DCDCDC; +$uni-border-4: #B9B9B9; + +// 常规色 +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); + +// 背景色 +$uni-bg-color: #f7f7f7; + +/* 水平间距 */ +$uni-spacing-sm: 8px; +$uni-spacing-base: 15px; +$uni-spacing-lg: 30px; + +// 阴影 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5); +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2); +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5); + +// 蒙版 +$uni-mask: rgba($color: #000000, $alpha: 0.4); diff --git a/version.json b/version.json new file mode 100644 index 0000000..8a673a6 --- /dev/null +++ b/version.json @@ -0,0 +1,6 @@ +{ + "siteroot": "https://citydev.weliam.com.cn", + "uniacid": "1", + "name": "weliam_smartcity", + "weliamv": "1.0.0" +} diff --git a/vuex/LICENSE b/vuex/LICENSE new file mode 100644 index 0000000..478332a --- /dev/null +++ b/vuex/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016 Evan You + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vuex/README.md b/vuex/README.md new file mode 100644 index 0000000..37e6c5e --- /dev/null +++ b/vuex/README.md @@ -0,0 +1,29 @@ +# Vuex [![Build Status](https://circleci.com/gh/vuejs/vuex/tree/dev.png?style=shield)](https://circleci.com/gh/vuejs/vuex) + +> Centralized State Management for Vue.js. + +

+ +

+ +- [What is Vuex?](http://vuex.vuejs.org/en/intro.html) +- [Full Documentation](http://vuex.vuejs.org/) + +## Examples + +- [Counter](https://github.com/vuejs/vuex/tree/dev/examples/counter) +- [Counter with Hot Reload](https://github.com/vuejs/vuex/tree/dev/examples/counter-hot) +- [TodoMVC](https://github.com/vuejs/vuex/tree/dev/examples/todomvc) +- [Flux Chat](https://github.com/vuejs/vuex/tree/dev/examples/chat) +- [Shopping Cart](https://github.com/vuejs/vuex/tree/dev/examples/shopping-cart) + +Running the examples: + +``` bash +$ npm install +$ npm run dev # serve examples at localhost:8080 +``` + +## License + +[MIT](http://opensource.org/licenses/MIT) diff --git a/vuex/dist/logger.d.ts b/vuex/dist/logger.d.ts new file mode 100644 index 0000000..9863e85 --- /dev/null +++ b/vuex/dist/logger.d.ts @@ -0,0 +1,15 @@ +/** + * Types for the logger plugin. + * This file must be put alongside the JavaScript file of the logger. + */ + +import { Payload, Plugin } from "../types/index"; + +export interface LoggerOption { + collapsed?: boolean; + filter?:

(mutation: P, stateBefore: S, stateAfter: S) => boolean; + transformer?: (state: S) => any; + mutationTransformer?:

(mutation: P) => any; +} + +export default function createLogger(option: LoggerOption): Plugin; diff --git a/vuex/dist/logger.js b/vuex/dist/logger.js new file mode 100644 index 0000000..1a551e0 --- /dev/null +++ b/vuex/dist/logger.js @@ -0,0 +1,122 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.createVuexLogger = factory()); +}(this, (function () { 'use strict'; + +/** + * Get the first item that pass the test + * by second argument function + * + * @param {Array} list + * @param {Function} f + * @return {*} + */ +function find (list, f) { + return list.filter(f)[0] +} + +/** + * Deep copy the given object considering circular structure. + * This function caches all nested objects and its copies. + * If it detects circular structure, use cached copy to avoid infinite loop. + * + * @param {*} obj + * @param {Array} cache + * @return {*} + */ +function deepCopy (obj, cache) { + if ( cache === void 0 ) cache = []; + + // just return if obj is immutable value + if (obj === null || typeof obj !== 'object') { + return obj + } + + // if obj is hit, it is in circular structure + var hit = find(cache, function (c) { return c.original === obj; }); + if (hit) { + return hit.copy + } + + var copy = Array.isArray(obj) ? [] : {}; + // put the copy into cache at first + // because we want to refer it in recursive deepCopy + cache.push({ + original: obj, + copy: copy + }); + + Object.keys(obj).forEach(function (key) { + copy[key] = deepCopy(obj[key], cache); + }); + + return copy +} + +/** + * forEach for object + */ + +// Credits: borrowed code from fcomb/redux-logger + +function createLogger (ref) { + if ( ref === void 0 ) ref = {}; + var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true; + var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; }; + var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; }; + var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; }; + var logger = ref.logger; if ( logger === void 0 ) logger = console; + + return function (store) { + var prevState = deepCopy(store.state); + + store.subscribe(function (mutation, state) { + if (typeof logger === 'undefined') { + return + } + var nextState = deepCopy(state); + + if (filter(mutation, prevState, nextState)) { + var time = new Date(); + var formattedTime = " @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)); + var formattedMutation = mutationTransformer(mutation); + var message = "mutation " + (mutation.type) + formattedTime; + var startMessage = collapsed + ? logger.groupCollapsed + : logger.group; + + // render + try { + startMessage.call(logger, message); + } catch (e) { + console.log(message); + } + + logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState)); + logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation); + logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState)); + + try { + logger.groupEnd(); + } catch (e) { + logger.log('—— log end ——'); + } + } + + prevState = nextState; + }); + } +} + +function repeat (str, times) { + return (new Array(times + 1)).join(str) +} + +function pad (num, maxLength) { + return repeat('0', maxLength - num.toString().length) + num +} + +return createLogger; + +}))); diff --git a/vuex/dist/vuex.common.js b/vuex/dist/vuex.common.js new file mode 100644 index 0000000..8a0b2ab --- /dev/null +++ b/vuex/dist/vuex.common.js @@ -0,0 +1,932 @@ +/** + * vuex v3.0.1 + * (c) 2017 Evan You + * @license MIT + */ +'use strict'; + +var applyMixin = function (Vue) { + var version = Number(Vue.version.split('.')[0]); + + if (version >= 2) { + Vue.mixin({ beforeCreate: vuexInit }); + } else { + // override init and inject vuex init procedure + // for 1.x backwards compatibility. + var _init = Vue.prototype._init; + Vue.prototype._init = function (options) { + if ( options === void 0 ) options = {}; + + options.init = options.init + ? [vuexInit].concat(options.init) + : vuexInit; + _init.call(this, options); + }; + } + + /** + * Vuex init hook, injected into each instances init hooks list. + */ + + function vuexInit () { + var options = this.$options; + // store injection + if (options.store) { + this.$store = typeof options.store === 'function' + ? options.store() + : options.store; + } else if (options.parent && options.parent.$store) { + this.$store = options.parent.$store; + } + } +}; + +var devtoolHook = + typeof window !== 'undefined' && + window.__VUE_DEVTOOLS_GLOBAL_HOOK__; + +function devtoolPlugin (store) { + if (!devtoolHook) { return } + + store._devtoolHook = devtoolHook; + + devtoolHook.emit('vuex:init', store); + + devtoolHook.on('vuex:travel-to-state', function (targetState) { + store.replaceState(targetState); + }); + + store.subscribe(function (mutation, state) { + devtoolHook.emit('vuex:mutation', mutation, state); + }); +} + +/** + * Get the first item that pass the test + * by second argument function + * + * @param {Array} list + * @param {Function} f + * @return {*} + */ +/** + * Deep copy the given object considering circular structure. + * This function caches all nested objects and its copies. + * If it detects circular structure, use cached copy to avoid infinite loop. + * + * @param {*} obj + * @param {Array} cache + * @return {*} + */ + + +/** + * forEach for object + */ +function forEachValue (obj, fn) { + Object.keys(obj).forEach(function (key) { return fn(obj[key], key); }); +} + +function isObject (obj) { + return obj !== null && typeof obj === 'object' +} + +function isPromise (val) { + return val && typeof val.then === 'function' +} + +function assert (condition, msg) { + if (!condition) { throw new Error(("[vuex] " + msg)) } +} + +var Module = function Module (rawModule, runtime) { + this.runtime = runtime; + this._children = Object.create(null); + this._rawModule = rawModule; + var rawState = rawModule.state; + this.state = (typeof rawState === 'function' ? rawState() : rawState) || {}; +}; + +var prototypeAccessors$1 = { namespaced: { configurable: true } }; + +prototypeAccessors$1.namespaced.get = function () { + return !!this._rawModule.namespaced +}; + +Module.prototype.addChild = function addChild (key, module) { + this._children[key] = module; +}; + +Module.prototype.removeChild = function removeChild (key) { + delete this._children[key]; +}; + +Module.prototype.getChild = function getChild (key) { + return this._children[key] +}; + +Module.prototype.update = function update (rawModule) { + this._rawModule.namespaced = rawModule.namespaced; + if (rawModule.actions) { + this._rawModule.actions = rawModule.actions; + } + if (rawModule.mutations) { + this._rawModule.mutations = rawModule.mutations; + } + if (rawModule.getters) { + this._rawModule.getters = rawModule.getters; + } +}; + +Module.prototype.forEachChild = function forEachChild (fn) { + forEachValue(this._children, fn); +}; + +Module.prototype.forEachGetter = function forEachGetter (fn) { + if (this._rawModule.getters) { + forEachValue(this._rawModule.getters, fn); + } +}; + +Module.prototype.forEachAction = function forEachAction (fn) { + if (this._rawModule.actions) { + forEachValue(this._rawModule.actions, fn); + } +}; + +Module.prototype.forEachMutation = function forEachMutation (fn) { + if (this._rawModule.mutations) { + forEachValue(this._rawModule.mutations, fn); + } +}; + +Object.defineProperties( Module.prototype, prototypeAccessors$1 ); + +var ModuleCollection = function ModuleCollection (rawRootModule) { + // register root module (Vuex.Store options) + this.register([], rawRootModule, false); +}; + +ModuleCollection.prototype.get = function get (path) { + return path.reduce(function (module, key) { + return module.getChild(key) + }, this.root) +}; + +ModuleCollection.prototype.getNamespace = function getNamespace (path) { + var module = this.root; + return path.reduce(function (namespace, key) { + module = module.getChild(key); + return namespace + (module.namespaced ? key + '/' : '') + }, '') +}; + +ModuleCollection.prototype.update = function update$1 (rawRootModule) { + update([], this.root, rawRootModule); +}; + +ModuleCollection.prototype.register = function register (path, rawModule, runtime) { + var this$1 = this; + if ( runtime === void 0 ) runtime = true; + + if (process.env.NODE_ENV !== 'production') { + assertRawModule(path, rawModule); + } + + var newModule = new Module(rawModule, runtime); + if (path.length === 0) { + this.root = newModule; + } else { + var parent = this.get(path.slice(0, -1)); + parent.addChild(path[path.length - 1], newModule); + } + + // register nested modules + if (rawModule.modules) { + forEachValue(rawModule.modules, function (rawChildModule, key) { + this$1.register(path.concat(key), rawChildModule, runtime); + }); + } +}; + +ModuleCollection.prototype.unregister = function unregister (path) { + var parent = this.get(path.slice(0, -1)); + var key = path[path.length - 1]; + if (!parent.getChild(key).runtime) { return } + + parent.removeChild(key); +}; + +function update (path, targetModule, newModule) { + if (process.env.NODE_ENV !== 'production') { + assertRawModule(path, newModule); + } + + // update target module + targetModule.update(newModule); + + // update nested modules + if (newModule.modules) { + for (var key in newModule.modules) { + if (!targetModule.getChild(key)) { + if (process.env.NODE_ENV !== 'production') { + console.warn( + "[vuex] trying to add a new module '" + key + "' on hot reloading, " + + 'manual reload is needed' + ); + } + return + } + update( + path.concat(key), + targetModule.getChild(key), + newModule.modules[key] + ); + } + } +} + +var functionAssert = { + assert: function (value) { return typeof value === 'function'; }, + expected: 'function' +}; + +var objectAssert = { + assert: function (value) { return typeof value === 'function' || + (typeof value === 'object' && typeof value.handler === 'function'); }, + expected: 'function or object with "handler" function' +}; + +var assertTypes = { + getters: functionAssert, + mutations: functionAssert, + actions: objectAssert +}; + +function assertRawModule (path, rawModule) { + Object.keys(assertTypes).forEach(function (key) { + if (!rawModule[key]) { return } + + var assertOptions = assertTypes[key]; + + forEachValue(rawModule[key], function (value, type) { + assert( + assertOptions.assert(value), + makeAssertionMessage(path, key, type, value, assertOptions.expected) + ); + }); + }); +} + +function makeAssertionMessage (path, key, type, value, expected) { + var buf = key + " should be " + expected + " but \"" + key + "." + type + "\""; + if (path.length > 0) { + buf += " in module \"" + (path.join('.')) + "\""; + } + buf += " is " + (JSON.stringify(value)) + "."; + return buf +} + +var Vue; // bind on install + +var Store = function Store (options) { + var this$1 = this; + if ( options === void 0 ) options = {}; + + // Auto install if it is not done yet and `window` has `Vue`. + // To allow users to avoid auto-installation in some cases, + // this code should be placed here. See #731 + if (!Vue && typeof window !== 'undefined' && window.Vue) { + install(window.Vue); + } + + if (process.env.NODE_ENV !== 'production') { + assert(Vue, "must call Vue.use(Vuex) before creating a store instance."); + assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser."); + assert(this instanceof Store, "Store must be called with the new operator."); + } + + var plugins = options.plugins; if ( plugins === void 0 ) plugins = []; + var strict = options.strict; if ( strict === void 0 ) strict = false; + + var state = options.state; if ( state === void 0 ) state = {}; + if (typeof state === 'function') { + state = state() || {}; + } + + // store internal state + this._committing = false; + this._actions = Object.create(null); + this._actionSubscribers = []; + this._mutations = Object.create(null); + this._wrappedGetters = Object.create(null); + this._modules = new ModuleCollection(options); + this._modulesNamespaceMap = Object.create(null); + this._subscribers = []; + this._watcherVM = new Vue(); + + // bind commit and dispatch to self + var store = this; + var ref = this; + var dispatch = ref.dispatch; + var commit = ref.commit; + this.dispatch = function boundDispatch (type, payload) { + return dispatch.call(store, type, payload) + }; + this.commit = function boundCommit (type, payload, options) { + return commit.call(store, type, payload, options) + }; + + // strict mode + this.strict = strict; + + // init root module. + // this also recursively registers all sub-modules + // and collects all module getters inside this._wrappedGetters + installModule(this, state, [], this._modules.root); + + // initialize the store vm, which is responsible for the reactivity + // (also registers _wrappedGetters as computed properties) + resetStoreVM(this, state); + + // apply plugins + plugins.forEach(function (plugin) { return plugin(this$1); }); + + if (Vue.config.devtools) { + devtoolPlugin(this); + } +}; + +var prototypeAccessors = { state: { configurable: true } }; + +prototypeAccessors.state.get = function () { + return this._vm._data.$$state +}; + +prototypeAccessors.state.set = function (v) { + if (process.env.NODE_ENV !== 'production') { + assert(false, "Use store.replaceState() to explicit replace store state."); + } +}; + +Store.prototype.commit = function commit (_type, _payload, _options) { + var this$1 = this; + + // check object-style commit + var ref = unifyObjectStyle(_type, _payload, _options); + var type = ref.type; + var payload = ref.payload; + var options = ref.options; + + var mutation = { type: type, payload: payload }; + var entry = this._mutations[type]; + if (!entry) { + if (process.env.NODE_ENV !== 'production') { + console.error(("[vuex] unknown mutation type: " + type)); + } + return + } + this._withCommit(function () { + entry.forEach(function commitIterator (handler) { + handler(payload); + }); + }); + this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); }); + + if ( + process.env.NODE_ENV !== 'production' && + options && options.silent + ) { + console.warn( + "[vuex] mutation type: " + type + ". Silent option has been removed. " + + 'Use the filter functionality in the vue-devtools' + ); + } +}; + +Store.prototype.dispatch = function dispatch (_type, _payload) { + var this$1 = this; + + // check object-style dispatch + var ref = unifyObjectStyle(_type, _payload); + var type = ref.type; + var payload = ref.payload; + + var action = { type: type, payload: payload }; + var entry = this._actions[type]; + if (!entry) { + if (process.env.NODE_ENV !== 'production') { + console.error(("[vuex] unknown action type: " + type)); + } + return + } + + this._actionSubscribers.forEach(function (sub) { return sub(action, this$1.state); }); + + return entry.length > 1 + ? Promise.all(entry.map(function (handler) { return handler(payload); })) + : entry[0](payload) +}; + +Store.prototype.subscribe = function subscribe (fn) { + return genericSubscribe(fn, this._subscribers) +}; + +Store.prototype.subscribeAction = function subscribeAction (fn) { + return genericSubscribe(fn, this._actionSubscribers) +}; + +Store.prototype.watch = function watch (getter, cb, options) { + var this$1 = this; + + if (process.env.NODE_ENV !== 'production') { + assert(typeof getter === 'function', "store.watch only accepts a function."); + } + return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options) +}; + +Store.prototype.replaceState = function replaceState (state) { + var this$1 = this; + + this._withCommit(function () { + this$1._vm._data.$$state = state; + }); +}; + +Store.prototype.registerModule = function registerModule (path, rawModule, options) { + if ( options === void 0 ) options = {}; + + if (typeof path === 'string') { path = [path]; } + + if (process.env.NODE_ENV !== 'production') { + assert(Array.isArray(path), "module path must be a string or an Array."); + assert(path.length > 0, 'cannot register the root module by using registerModule.'); + } + + this._modules.register(path, rawModule); + installModule(this, this.state, path, this._modules.get(path), options.preserveState); + // reset store to update getters... + resetStoreVM(this, this.state); +}; + +Store.prototype.unregisterModule = function unregisterModule (path) { + var this$1 = this; + + if (typeof path === 'string') { path = [path]; } + + if (process.env.NODE_ENV !== 'production') { + assert(Array.isArray(path), "module path must be a string or an Array."); + } + + this._modules.unregister(path); + this._withCommit(function () { + var parentState = getNestedState(this$1.state, path.slice(0, -1)); + Vue.delete(parentState, path[path.length - 1]); + }); + resetStore(this); +}; + +Store.prototype.hotUpdate = function hotUpdate (newOptions) { + this._modules.update(newOptions); + resetStore(this, true); +}; + +Store.prototype._withCommit = function _withCommit (fn) { + var committing = this._committing; + this._committing = true; + fn(); + this._committing = committing; +}; + +Object.defineProperties( Store.prototype, prototypeAccessors ); + +function genericSubscribe (fn, subs) { + if (subs.indexOf(fn) < 0) { + subs.push(fn); + } + return function () { + var i = subs.indexOf(fn); + if (i > -1) { + subs.splice(i, 1); + } + } +} + +function resetStore (store, hot) { + store._actions = Object.create(null); + store._mutations = Object.create(null); + store._wrappedGetters = Object.create(null); + store._modulesNamespaceMap = Object.create(null); + var state = store.state; + // init all modules + installModule(store, state, [], store._modules.root, true); + // reset vm + resetStoreVM(store, state, hot); +} + +function resetStoreVM (store, state, hot) { + var oldVm = store._vm; + + // bind store public getters + store.getters = {}; + var wrappedGetters = store._wrappedGetters; + var computed = {}; + forEachValue(wrappedGetters, function (fn, key) { + // use computed to leverage its lazy-caching mechanism + computed[key] = function () { return fn(store); }; + Object.defineProperty(store.getters, key, { + get: function () { return store._vm[key]; }, + enumerable: true // for local getters + }); + }); + + // use a Vue instance to store the state tree + // suppress warnings just in case the user has added + // some funky global mixins + var silent = Vue.config.silent; + Vue.config.silent = true; + store._vm = new Vue({ + data: { + $$state: state + }, + computed: computed + }); + Vue.config.silent = silent; + + // enable strict mode for new vm + if (store.strict) { + enableStrictMode(store); + } + + if (oldVm) { + if (hot) { + // dispatch changes in all subscribed watchers + // to force getter re-evaluation for hot reloading. + store._withCommit(function () { + oldVm._data.$$state = null; + }); + } + Vue.nextTick(function () { return oldVm.$destroy(); }); + } +} + +function installModule (store, rootState, path, module, hot) { + var isRoot = !path.length; + var namespace = store._modules.getNamespace(path); + + // register in namespace map + if (module.namespaced) { + store._modulesNamespaceMap[namespace] = module; + } + + // set state + if (!isRoot && !hot) { + var parentState = getNestedState(rootState, path.slice(0, -1)); + var moduleName = path[path.length - 1]; + store._withCommit(function () { + Vue.set(parentState, moduleName, module.state); + }); + } + + var local = module.context = makeLocalContext(store, namespace, path); + + module.forEachMutation(function (mutation, key) { + var namespacedType = namespace + key; + registerMutation(store, namespacedType, mutation, local); + }); + + module.forEachAction(function (action, key) { + var type = action.root ? key : namespace + key; + var handler = action.handler || action; + registerAction(store, type, handler, local); + }); + + module.forEachGetter(function (getter, key) { + var namespacedType = namespace + key; + registerGetter(store, namespacedType, getter, local); + }); + + module.forEachChild(function (child, key) { + installModule(store, rootState, path.concat(key), child, hot); + }); +} + +/** + * make localized dispatch, commit, getters and state + * if there is no namespace, just use root ones + */ +function makeLocalContext (store, namespace, path) { + var noNamespace = namespace === ''; + + var local = { + dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) { + var args = unifyObjectStyle(_type, _payload, _options); + var payload = args.payload; + var options = args.options; + var type = args.type; + + if (!options || !options.root) { + type = namespace + type; + if (process.env.NODE_ENV !== 'production' && !store._actions[type]) { + console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type)); + return + } + } + + return store.dispatch(type, payload) + }, + + commit: noNamespace ? store.commit : function (_type, _payload, _options) { + var args = unifyObjectStyle(_type, _payload, _options); + var payload = args.payload; + var options = args.options; + var type = args.type; + + if (!options || !options.root) { + type = namespace + type; + if (process.env.NODE_ENV !== 'production' && !store._mutations[type]) { + console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type)); + return + } + } + + store.commit(type, payload, options); + } + }; + + // getters and state object must be gotten lazily + // because they will be changed by vm update + Object.defineProperties(local, { + getters: { + get: noNamespace + ? function () { return store.getters; } + : function () { return makeLocalGetters(store, namespace); } + }, + state: { + get: function () { return getNestedState(store.state, path); } + } + }); + + return local +} + +function makeLocalGetters (store, namespace) { + var gettersProxy = {}; + + var splitPos = namespace.length; + Object.keys(store.getters).forEach(function (type) { + // skip if the target getter is not match this namespace + if (type.slice(0, splitPos) !== namespace) { return } + + // extract local getter type + var localType = type.slice(splitPos); + + // Add a port to the getters proxy. + // Define as getter property because + // we do not want to evaluate the getters in this time. + Object.defineProperty(gettersProxy, localType, { + get: function () { return store.getters[type]; }, + enumerable: true + }); + }); + + return gettersProxy +} + +function registerMutation (store, type, handler, local) { + var entry = store._mutations[type] || (store._mutations[type] = []); + entry.push(function wrappedMutationHandler (payload) { + handler.call(store, local.state, payload); + }); +} + +function registerAction (store, type, handler, local) { + var entry = store._actions[type] || (store._actions[type] = []); + entry.push(function wrappedActionHandler (payload, cb) { + var res = handler.call(store, { + dispatch: local.dispatch, + commit: local.commit, + getters: local.getters, + state: local.state, + rootGetters: store.getters, + rootState: store.state + }, payload, cb); + if (!isPromise(res)) { + res = Promise.resolve(res); + } + if (store._devtoolHook) { + return res.catch(function (err) { + store._devtoolHook.emit('vuex:error', err); + throw err + }) + } else { + return res + } + }); +} + +function registerGetter (store, type, rawGetter, local) { + if (store._wrappedGetters[type]) { + if (process.env.NODE_ENV !== 'production') { + console.error(("[vuex] duplicate getter key: " + type)); + } + return + } + store._wrappedGetters[type] = function wrappedGetter (store) { + return rawGetter( + local.state, // local state + local.getters, // local getters + store.state, // root state + store.getters // root getters + ) + }; +} + +function enableStrictMode (store) { + store._vm.$watch(function () { return this._data.$$state }, function () { + if (process.env.NODE_ENV !== 'production') { + assert(store._committing, "Do not mutate vuex store state outside mutation handlers."); + } + }, { deep: true, sync: true }); +} + +function getNestedState (state, path) { + return path.length + ? path.reduce(function (state, key) { return state[key]; }, state) + : state +} + +function unifyObjectStyle (type, payload, options) { + if (isObject(type) && type.type) { + options = payload; + payload = type; + type = type.type; + } + + if (process.env.NODE_ENV !== 'production') { + assert(typeof type === 'string', ("Expects string as the type, but found " + (typeof type) + ".")); + } + + return { type: type, payload: payload, options: options } +} + +function install (_Vue) { + if (Vue && _Vue === Vue) { + if (process.env.NODE_ENV !== 'production') { + console.error( + '[vuex] already installed. Vue.use(Vuex) should be called only once.' + ); + } + return + } + Vue = _Vue; + applyMixin(Vue); +} + +var mapState = normalizeNamespace(function (namespace, states) { + var res = {}; + normalizeMap(states).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedState () { + var state = this.$store.state; + var getters = this.$store.getters; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapState', namespace); + if (!module) { + return + } + state = module.context.state; + getters = module.context.getters; + } + return typeof val === 'function' + ? val.call(this, state, getters) + : state[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +var mapMutations = normalizeNamespace(function (namespace, mutations) { + var res = {}; + normalizeMap(mutations).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedMutation () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var commit = this.$store.commit; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapMutations', namespace); + if (!module) { + return + } + commit = module.context.commit; + } + return typeof val === 'function' + ? val.apply(this, [commit].concat(args)) + : commit.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +var mapGetters = normalizeNamespace(function (namespace, getters) { + var res = {}; + normalizeMap(getters).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + val = namespace + val; + res[key] = function mappedGetter () { + if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) { + return + } + if (process.env.NODE_ENV !== 'production' && !(val in this.$store.getters)) { + console.error(("[vuex] unknown getter: " + val)); + return + } + return this.$store.getters[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +var mapActions = normalizeNamespace(function (namespace, actions) { + var res = {}; + normalizeMap(actions).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedAction () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var dispatch = this.$store.dispatch; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapActions', namespace); + if (!module) { + return + } + dispatch = module.context.dispatch; + } + return typeof val === 'function' + ? val.apply(this, [dispatch].concat(args)) + : dispatch.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +var createNamespacedHelpers = function (namespace) { return ({ + mapState: mapState.bind(null, namespace), + mapGetters: mapGetters.bind(null, namespace), + mapMutations: mapMutations.bind(null, namespace), + mapActions: mapActions.bind(null, namespace) +}); }; + +function normalizeMap (map) { + return Array.isArray(map) + ? map.map(function (key) { return ({ key: key, val: key }); }) + : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); }) +} + +function normalizeNamespace (fn) { + return function (namespace, map) { + if (typeof namespace !== 'string') { + map = namespace; + namespace = ''; + } else if (namespace.charAt(namespace.length - 1) !== '/') { + namespace += '/'; + } + return fn(namespace, map) + } +} + +function getModuleByNamespace (store, helper, namespace) { + var module = store._modulesNamespaceMap[namespace]; + if (process.env.NODE_ENV !== 'production' && !module) { + console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace)); + } + return module +} + +var index = { + Store: Store, + install: install, + version: '3.0.1', + mapState: mapState, + mapMutations: mapMutations, + mapGetters: mapGetters, + mapActions: mapActions, + createNamespacedHelpers: createNamespacedHelpers +}; + +module.exports = index; diff --git a/vuex/dist/vuex.esm.js b/vuex/dist/vuex.esm.js new file mode 100644 index 0000000..bb1c596 --- /dev/null +++ b/vuex/dist/vuex.esm.js @@ -0,0 +1,931 @@ +/** + * vuex v3.0.1 + * (c) 2017 Evan You + * @license MIT + */ +var applyMixin = function (Vue) { + var version = Number(Vue.version.split('.')[0]); + + if (version >= 2) { + Vue.mixin({ beforeCreate: vuexInit }); + } else { + // override init and inject vuex init procedure + // for 1.x backwards compatibility. + var _init = Vue.prototype._init; + Vue.prototype._init = function (options) { + if ( options === void 0 ) options = {}; + + options.init = options.init + ? [vuexInit].concat(options.init) + : vuexInit; + _init.call(this, options); + }; + } + + /** + * Vuex init hook, injected into each instances init hooks list. + */ + + function vuexInit () { + var options = this.$options; + // store injection + if (options.store) { + this.$store = typeof options.store === 'function' + ? options.store() + : options.store; + } else if (options.parent && options.parent.$store) { + this.$store = options.parent.$store; + } + } +}; + +var devtoolHook = + typeof window !== 'undefined' && + window.__VUE_DEVTOOLS_GLOBAL_HOOK__; + +function devtoolPlugin (store) { + if (!devtoolHook) { return } + + store._devtoolHook = devtoolHook; + + devtoolHook.emit('vuex:init', store); + + devtoolHook.on('vuex:travel-to-state', function (targetState) { + store.replaceState(targetState); + }); + + store.subscribe(function (mutation, state) { + devtoolHook.emit('vuex:mutation', mutation, state); + }); +} + +/** + * Get the first item that pass the test + * by second argument function + * + * @param {Array} list + * @param {Function} f + * @return {*} + */ +/** + * Deep copy the given object considering circular structure. + * This function caches all nested objects and its copies. + * If it detects circular structure, use cached copy to avoid infinite loop. + * + * @param {*} obj + * @param {Array} cache + * @return {*} + */ + + +/** + * forEach for object + */ +function forEachValue (obj, fn) { + Object.keys(obj).forEach(function (key) { return fn(obj[key], key); }); +} + +function isObject (obj) { + return obj !== null && typeof obj === 'object' +} + +function isPromise (val) { + return val && typeof val.then === 'function' +} + +function assert (condition, msg) { + if (!condition) { throw new Error(("[vuex] " + msg)) } +} + +var Module = function Module (rawModule, runtime) { + this.runtime = runtime; + this._children = Object.create(null); + this._rawModule = rawModule; + var rawState = rawModule.state; + this.state = (typeof rawState === 'function' ? rawState() : rawState) || {}; +}; + +var prototypeAccessors$1 = { namespaced: { configurable: true } }; + +prototypeAccessors$1.namespaced.get = function () { + return !!this._rawModule.namespaced +}; + +Module.prototype.addChild = function addChild (key, module) { + this._children[key] = module; +}; + +Module.prototype.removeChild = function removeChild (key) { + delete this._children[key]; +}; + +Module.prototype.getChild = function getChild (key) { + return this._children[key] +}; + +Module.prototype.update = function update (rawModule) { + this._rawModule.namespaced = rawModule.namespaced; + if (rawModule.actions) { + this._rawModule.actions = rawModule.actions; + } + if (rawModule.mutations) { + this._rawModule.mutations = rawModule.mutations; + } + if (rawModule.getters) { + this._rawModule.getters = rawModule.getters; + } +}; + +Module.prototype.forEachChild = function forEachChild (fn) { + forEachValue(this._children, fn); +}; + +Module.prototype.forEachGetter = function forEachGetter (fn) { + if (this._rawModule.getters) { + forEachValue(this._rawModule.getters, fn); + } +}; + +Module.prototype.forEachAction = function forEachAction (fn) { + if (this._rawModule.actions) { + forEachValue(this._rawModule.actions, fn); + } +}; + +Module.prototype.forEachMutation = function forEachMutation (fn) { + if (this._rawModule.mutations) { + forEachValue(this._rawModule.mutations, fn); + } +}; + +Object.defineProperties( Module.prototype, prototypeAccessors$1 ); + +var ModuleCollection = function ModuleCollection (rawRootModule) { + // register root module (Vuex.Store options) + this.register([], rawRootModule, false); +}; + +ModuleCollection.prototype.get = function get (path) { + return path.reduce(function (module, key) { + return module.getChild(key) + }, this.root) +}; + +ModuleCollection.prototype.getNamespace = function getNamespace (path) { + var module = this.root; + return path.reduce(function (namespace, key) { + module = module.getChild(key); + return namespace + (module.namespaced ? key + '/' : '') + }, '') +}; + +ModuleCollection.prototype.update = function update$1 (rawRootModule) { + update([], this.root, rawRootModule); +}; + +ModuleCollection.prototype.register = function register (path, rawModule, runtime) { + var this$1 = this; + if ( runtime === void 0 ) runtime = true; + + if (process.env.NODE_ENV !== 'production') { + assertRawModule(path, rawModule); + } + + var newModule = new Module(rawModule, runtime); + if (path.length === 0) { + this.root = newModule; + } else { + var parent = this.get(path.slice(0, -1)); + parent.addChild(path[path.length - 1], newModule); + } + + // register nested modules + if (rawModule.modules) { + forEachValue(rawModule.modules, function (rawChildModule, key) { + this$1.register(path.concat(key), rawChildModule, runtime); + }); + } +}; + +ModuleCollection.prototype.unregister = function unregister (path) { + var parent = this.get(path.slice(0, -1)); + var key = path[path.length - 1]; + if (!parent.getChild(key).runtime) { return } + + parent.removeChild(key); +}; + +function update (path, targetModule, newModule) { + if (process.env.NODE_ENV !== 'production') { + assertRawModule(path, newModule); + } + + // update target module + targetModule.update(newModule); + + // update nested modules + if (newModule.modules) { + for (var key in newModule.modules) { + if (!targetModule.getChild(key)) { + if (process.env.NODE_ENV !== 'production') { + console.warn( + "[vuex] trying to add a new module '" + key + "' on hot reloading, " + + 'manual reload is needed' + ); + } + return + } + update( + path.concat(key), + targetModule.getChild(key), + newModule.modules[key] + ); + } + } +} + +var functionAssert = { + assert: function (value) { return typeof value === 'function'; }, + expected: 'function' +}; + +var objectAssert = { + assert: function (value) { return typeof value === 'function' || + (typeof value === 'object' && typeof value.handler === 'function'); }, + expected: 'function or object with "handler" function' +}; + +var assertTypes = { + getters: functionAssert, + mutations: functionAssert, + actions: objectAssert +}; + +function assertRawModule (path, rawModule) { + Object.keys(assertTypes).forEach(function (key) { + if (!rawModule[key]) { return } + + var assertOptions = assertTypes[key]; + + forEachValue(rawModule[key], function (value, type) { + assert( + assertOptions.assert(value), + makeAssertionMessage(path, key, type, value, assertOptions.expected) + ); + }); + }); +} + +function makeAssertionMessage (path, key, type, value, expected) { + var buf = key + " should be " + expected + " but \"" + key + "." + type + "\""; + if (path.length > 0) { + buf += " in module \"" + (path.join('.')) + "\""; + } + buf += " is " + (JSON.stringify(value)) + "."; + return buf +} + +var Vue; // bind on install + +var Store = function Store (options) { + var this$1 = this; + if ( options === void 0 ) options = {}; + + // Auto install if it is not done yet and `window` has `Vue`. + // To allow users to avoid auto-installation in some cases, + // this code should be placed here. See #731 + if (!Vue && typeof window !== 'undefined' && window.Vue) { + install(window.Vue); + } + + if (process.env.NODE_ENV !== 'production') { + assert(Vue, "must call Vue.use(Vuex) before creating a store instance."); + assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser."); + assert(this instanceof Store, "Store must be called with the new operator."); + } + + var plugins = options.plugins; if ( plugins === void 0 ) plugins = []; + var strict = options.strict; if ( strict === void 0 ) strict = false; + + var state = options.state; if ( state === void 0 ) state = {}; + if (typeof state === 'function') { + state = state() || {}; + } + + // store internal state + this._committing = false; + this._actions = Object.create(null); + this._actionSubscribers = []; + this._mutations = Object.create(null); + this._wrappedGetters = Object.create(null); + this._modules = new ModuleCollection(options); + this._modulesNamespaceMap = Object.create(null); + this._subscribers = []; + this._watcherVM = new Vue(); + + // bind commit and dispatch to self + var store = this; + var ref = this; + var dispatch = ref.dispatch; + var commit = ref.commit; + this.dispatch = function boundDispatch (type, payload) { + return dispatch.call(store, type, payload) + }; + this.commit = function boundCommit (type, payload, options) { + return commit.call(store, type, payload, options) + }; + + // strict mode + this.strict = strict; + + // init root module. + // this also recursively registers all sub-modules + // and collects all module getters inside this._wrappedGetters + installModule(this, state, [], this._modules.root); + + // initialize the store vm, which is responsible for the reactivity + // (also registers _wrappedGetters as computed properties) + resetStoreVM(this, state); + + // apply plugins + plugins.forEach(function (plugin) { return plugin(this$1); }); + + if (Vue.config.devtools) { + devtoolPlugin(this); + } +}; + +var prototypeAccessors = { state: { configurable: true } }; + +prototypeAccessors.state.get = function () { + return this._vm._data.$$state +}; + +prototypeAccessors.state.set = function (v) { + if (process.env.NODE_ENV !== 'production') { + assert(false, "Use store.replaceState() to explicit replace store state."); + } +}; + +Store.prototype.commit = function commit (_type, _payload, _options) { + var this$1 = this; + + // check object-style commit + var ref = unifyObjectStyle(_type, _payload, _options); + var type = ref.type; + var payload = ref.payload; + var options = ref.options; + + var mutation = { type: type, payload: payload }; + var entry = this._mutations[type]; + if (!entry) { + if (process.env.NODE_ENV !== 'production') { + console.error(("[vuex] unknown mutation type: " + type)); + } + return + } + this._withCommit(function () { + entry.forEach(function commitIterator (handler) { + handler(payload); + }); + }); + this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); }); + + if ( + process.env.NODE_ENV !== 'production' && + options && options.silent + ) { + console.warn( + "[vuex] mutation type: " + type + ". Silent option has been removed. " + + 'Use the filter functionality in the vue-devtools' + ); + } +}; + +Store.prototype.dispatch = function dispatch (_type, _payload) { + var this$1 = this; + + // check object-style dispatch + var ref = unifyObjectStyle(_type, _payload); + var type = ref.type; + var payload = ref.payload; + + var action = { type: type, payload: payload }; + var entry = this._actions[type]; + if (!entry) { + if (process.env.NODE_ENV !== 'production') { + console.error(("[vuex] unknown action type: " + type)); + } + return + } + + this._actionSubscribers.forEach(function (sub) { return sub(action, this$1.state); }); + + return entry.length > 1 + ? Promise.all(entry.map(function (handler) { return handler(payload); })) + : entry[0](payload) +}; + +Store.prototype.subscribe = function subscribe (fn) { + return genericSubscribe(fn, this._subscribers) +}; + +Store.prototype.subscribeAction = function subscribeAction (fn) { + return genericSubscribe(fn, this._actionSubscribers) +}; + +Store.prototype.watch = function watch (getter, cb, options) { + var this$1 = this; + + if (process.env.NODE_ENV !== 'production') { + assert(typeof getter === 'function', "store.watch only accepts a function."); + } + return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options) +}; + +Store.prototype.replaceState = function replaceState (state) { + var this$1 = this; + + this._withCommit(function () { + this$1._vm._data.$$state = state; + }); +}; + +Store.prototype.registerModule = function registerModule (path, rawModule, options) { + if ( options === void 0 ) options = {}; + + if (typeof path === 'string') { path = [path]; } + + if (process.env.NODE_ENV !== 'production') { + assert(Array.isArray(path), "module path must be a string or an Array."); + assert(path.length > 0, 'cannot register the root module by using registerModule.'); + } + + this._modules.register(path, rawModule); + installModule(this, this.state, path, this._modules.get(path), options.preserveState); + // reset store to update getters... + resetStoreVM(this, this.state); +}; + +Store.prototype.unregisterModule = function unregisterModule (path) { + var this$1 = this; + + if (typeof path === 'string') { path = [path]; } + + if (process.env.NODE_ENV !== 'production') { + assert(Array.isArray(path), "module path must be a string or an Array."); + } + + this._modules.unregister(path); + this._withCommit(function () { + var parentState = getNestedState(this$1.state, path.slice(0, -1)); + Vue.delete(parentState, path[path.length - 1]); + }); + resetStore(this); +}; + +Store.prototype.hotUpdate = function hotUpdate (newOptions) { + this._modules.update(newOptions); + resetStore(this, true); +}; + +Store.prototype._withCommit = function _withCommit (fn) { + var committing = this._committing; + this._committing = true; + fn(); + this._committing = committing; +}; + +Object.defineProperties( Store.prototype, prototypeAccessors ); + +function genericSubscribe (fn, subs) { + if (subs.indexOf(fn) < 0) { + subs.push(fn); + } + return function () { + var i = subs.indexOf(fn); + if (i > -1) { + subs.splice(i, 1); + } + } +} + +function resetStore (store, hot) { + store._actions = Object.create(null); + store._mutations = Object.create(null); + store._wrappedGetters = Object.create(null); + store._modulesNamespaceMap = Object.create(null); + var state = store.state; + // init all modules + installModule(store, state, [], store._modules.root, true); + // reset vm + resetStoreVM(store, state, hot); +} + +function resetStoreVM (store, state, hot) { + var oldVm = store._vm; + + // bind store public getters + store.getters = {}; + var wrappedGetters = store._wrappedGetters; + var computed = {}; + forEachValue(wrappedGetters, function (fn, key) { + // use computed to leverage its lazy-caching mechanism + computed[key] = function () { return fn(store); }; + Object.defineProperty(store.getters, key, { + get: function () { return store._vm[key]; }, + enumerable: true // for local getters + }); + }); + + // use a Vue instance to store the state tree + // suppress warnings just in case the user has added + // some funky global mixins + var silent = Vue.config.silent; + Vue.config.silent = true; + store._vm = new Vue({ + data: { + $$state: state + }, + computed: computed + }); + Vue.config.silent = silent; + + // enable strict mode for new vm + if (store.strict) { + enableStrictMode(store); + } + + if (oldVm) { + if (hot) { + // dispatch changes in all subscribed watchers + // to force getter re-evaluation for hot reloading. + store._withCommit(function () { + oldVm._data.$$state = null; + }); + } + Vue.nextTick(function () { return oldVm.$destroy(); }); + } +} + +function installModule (store, rootState, path, module, hot) { + var isRoot = !path.length; + var namespace = store._modules.getNamespace(path); + + // register in namespace map + if (module.namespaced) { + store._modulesNamespaceMap[namespace] = module; + } + + // set state + if (!isRoot && !hot) { + var parentState = getNestedState(rootState, path.slice(0, -1)); + var moduleName = path[path.length - 1]; + store._withCommit(function () { + Vue.set(parentState, moduleName, module.state); + }); + } + + var local = module.context = makeLocalContext(store, namespace, path); + + module.forEachMutation(function (mutation, key) { + var namespacedType = namespace + key; + registerMutation(store, namespacedType, mutation, local); + }); + + module.forEachAction(function (action, key) { + var type = action.root ? key : namespace + key; + var handler = action.handler || action; + registerAction(store, type, handler, local); + }); + + module.forEachGetter(function (getter, key) { + var namespacedType = namespace + key; + registerGetter(store, namespacedType, getter, local); + }); + + module.forEachChild(function (child, key) { + installModule(store, rootState, path.concat(key), child, hot); + }); +} + +/** + * make localized dispatch, commit, getters and state + * if there is no namespace, just use root ones + */ +function makeLocalContext (store, namespace, path) { + var noNamespace = namespace === ''; + + var local = { + dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) { + var args = unifyObjectStyle(_type, _payload, _options); + var payload = args.payload; + var options = args.options; + var type = args.type; + + if (!options || !options.root) { + type = namespace + type; + if (process.env.NODE_ENV !== 'production' && !store._actions[type]) { + console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type)); + return + } + } + + return store.dispatch(type, payload) + }, + + commit: noNamespace ? store.commit : function (_type, _payload, _options) { + var args = unifyObjectStyle(_type, _payload, _options); + var payload = args.payload; + var options = args.options; + var type = args.type; + + if (!options || !options.root) { + type = namespace + type; + if (process.env.NODE_ENV !== 'production' && !store._mutations[type]) { + console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type)); + return + } + } + + store.commit(type, payload, options); + } + }; + + // getters and state object must be gotten lazily + // because they will be changed by vm update + Object.defineProperties(local, { + getters: { + get: noNamespace + ? function () { return store.getters; } + : function () { return makeLocalGetters(store, namespace); } + }, + state: { + get: function () { return getNestedState(store.state, path); } + } + }); + + return local +} + +function makeLocalGetters (store, namespace) { + var gettersProxy = {}; + + var splitPos = namespace.length; + Object.keys(store.getters).forEach(function (type) { + // skip if the target getter is not match this namespace + if (type.slice(0, splitPos) !== namespace) { return } + + // extract local getter type + var localType = type.slice(splitPos); + + // Add a port to the getters proxy. + // Define as getter property because + // we do not want to evaluate the getters in this time. + Object.defineProperty(gettersProxy, localType, { + get: function () { return store.getters[type]; }, + enumerable: true + }); + }); + + return gettersProxy +} + +function registerMutation (store, type, handler, local) { + var entry = store._mutations[type] || (store._mutations[type] = []); + entry.push(function wrappedMutationHandler (payload) { + handler.call(store, local.state, payload); + }); +} + +function registerAction (store, type, handler, local) { + var entry = store._actions[type] || (store._actions[type] = []); + entry.push(function wrappedActionHandler (payload, cb) { + var res = handler.call(store, { + dispatch: local.dispatch, + commit: local.commit, + getters: local.getters, + state: local.state, + rootGetters: store.getters, + rootState: store.state + }, payload, cb); + if (!isPromise(res)) { + res = Promise.resolve(res); + } + if (store._devtoolHook) { + return res.catch(function (err) { + store._devtoolHook.emit('vuex:error', err); + throw err + }) + } else { + return res + } + }); +} + +function registerGetter (store, type, rawGetter, local) { + if (store._wrappedGetters[type]) { + if (process.env.NODE_ENV !== 'production') { + console.error(("[vuex] duplicate getter key: " + type)); + } + return + } + store._wrappedGetters[type] = function wrappedGetter (store) { + return rawGetter( + local.state, // local state + local.getters, // local getters + store.state, // root state + store.getters // root getters + ) + }; +} + +function enableStrictMode (store) { + store._vm.$watch(function () { return this._data.$$state }, function () { + if (process.env.NODE_ENV !== 'production') { + assert(store._committing, "Do not mutate vuex store state outside mutation handlers."); + } + }, { deep: true, sync: true }); +} + +function getNestedState (state, path) { + return path.length + ? path.reduce(function (state, key) { return state[key]; }, state) + : state +} + +function unifyObjectStyle (type, payload, options) { + if (isObject(type) && type.type) { + options = payload; + payload = type; + type = type.type; + } + + if (process.env.NODE_ENV !== 'production') { + assert(typeof type === 'string', ("Expects string as the type, but found " + (typeof type) + ".")); + } + + return { type: type, payload: payload, options: options } +} + +function install (_Vue) { + if (Vue && _Vue === Vue) { + if (process.env.NODE_ENV !== 'production') { + console.error( + '[vuex] already installed. Vue.use(Vuex) should be called only once.' + ); + } + return + } + Vue = _Vue; + applyMixin(Vue); +} + +var mapState = normalizeNamespace(function (namespace, states) { + var res = {}; + normalizeMap(states).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedState () { + var state = this.$store.state; + var getters = this.$store.getters; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapState', namespace); + if (!module) { + return + } + state = module.context.state; + getters = module.context.getters; + } + return typeof val === 'function' + ? val.call(this, state, getters) + : state[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +var mapMutations = normalizeNamespace(function (namespace, mutations) { + var res = {}; + normalizeMap(mutations).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedMutation () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var commit = this.$store.commit; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapMutations', namespace); + if (!module) { + return + } + commit = module.context.commit; + } + return typeof val === 'function' + ? val.apply(this, [commit].concat(args)) + : commit.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +var mapGetters = normalizeNamespace(function (namespace, getters) { + var res = {}; + normalizeMap(getters).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + val = namespace + val; + res[key] = function mappedGetter () { + if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) { + return + } + if (process.env.NODE_ENV !== 'production' && !(val in this.$store.getters)) { + console.error(("[vuex] unknown getter: " + val)); + return + } + return this.$store.getters[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +var mapActions = normalizeNamespace(function (namespace, actions) { + var res = {}; + normalizeMap(actions).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedAction () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var dispatch = this.$store.dispatch; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapActions', namespace); + if (!module) { + return + } + dispatch = module.context.dispatch; + } + return typeof val === 'function' + ? val.apply(this, [dispatch].concat(args)) + : dispatch.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +var createNamespacedHelpers = function (namespace) { return ({ + mapState: mapState.bind(null, namespace), + mapGetters: mapGetters.bind(null, namespace), + mapMutations: mapMutations.bind(null, namespace), + mapActions: mapActions.bind(null, namespace) +}); }; + +function normalizeMap (map) { + return Array.isArray(map) + ? map.map(function (key) { return ({ key: key, val: key }); }) + : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); }) +} + +function normalizeNamespace (fn) { + return function (namespace, map) { + if (typeof namespace !== 'string') { + map = namespace; + namespace = ''; + } else if (namespace.charAt(namespace.length - 1) !== '/') { + namespace += '/'; + } + return fn(namespace, map) + } +} + +function getModuleByNamespace (store, helper, namespace) { + var module = store._modulesNamespaceMap[namespace]; + if (process.env.NODE_ENV !== 'production' && !module) { + console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace)); + } + return module +} + +var index_esm = { + Store: Store, + install: install, + version: '3.0.1', + mapState: mapState, + mapMutations: mapMutations, + mapGetters: mapGetters, + mapActions: mapActions, + createNamespacedHelpers: createNamespacedHelpers +}; + +export { Store, install, mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers }; +export default index_esm; diff --git a/vuex/dist/vuex.js b/vuex/dist/vuex.js new file mode 100644 index 0000000..26340c5 --- /dev/null +++ b/vuex/dist/vuex.js @@ -0,0 +1,938 @@ +/** + * vuex v3.0.1 + * (c) 2017 Evan You + * @license MIT + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.Vuex = factory()); +}(this, (function () { 'use strict'; + +var applyMixin = function (Vue) { + var version = Number(Vue.version.split('.')[0]); + + if (version >= 2) { + Vue.mixin({ beforeCreate: vuexInit }); + } else { + // override init and inject vuex init procedure + // for 1.x backwards compatibility. + var _init = Vue.prototype._init; + Vue.prototype._init = function (options) { + if ( options === void 0 ) options = {}; + + options.init = options.init + ? [vuexInit].concat(options.init) + : vuexInit; + _init.call(this, options); + }; + } + + /** + * Vuex init hook, injected into each instances init hooks list. + */ + + function vuexInit () { + var options = this.$options; + // store injection + if (options.store) { + this.$store = typeof options.store === 'function' + ? options.store() + : options.store; + } else if (options.parent && options.parent.$store) { + this.$store = options.parent.$store; + } + } +}; + +var devtoolHook = + typeof window !== 'undefined' && + window.__VUE_DEVTOOLS_GLOBAL_HOOK__; + +function devtoolPlugin (store) { + if (!devtoolHook) { return } + + store._devtoolHook = devtoolHook; + + devtoolHook.emit('vuex:init', store); + + devtoolHook.on('vuex:travel-to-state', function (targetState) { + store.replaceState(targetState); + }); + + store.subscribe(function (mutation, state) { + devtoolHook.emit('vuex:mutation', mutation, state); + }); +} + +/** + * Get the first item that pass the test + * by second argument function + * + * @param {Array} list + * @param {Function} f + * @return {*} + */ +/** + * Deep copy the given object considering circular structure. + * This function caches all nested objects and its copies. + * If it detects circular structure, use cached copy to avoid infinite loop. + * + * @param {*} obj + * @param {Array} cache + * @return {*} + */ + + +/** + * forEach for object + */ +function forEachValue (obj, fn) { + Object.keys(obj).forEach(function (key) { return fn(obj[key], key); }); +} + +function isObject (obj) { + return obj !== null && typeof obj === 'object' +} + +function isPromise (val) { + return val && typeof val.then === 'function' +} + +function assert (condition, msg) { + if (!condition) { throw new Error(("[vuex] " + msg)) } +} + +var Module = function Module (rawModule, runtime) { + this.runtime = runtime; + this._children = Object.create(null); + this._rawModule = rawModule; + var rawState = rawModule.state; + this.state = (typeof rawState === 'function' ? rawState() : rawState) || {}; +}; + +var prototypeAccessors$1 = { namespaced: { configurable: true } }; + +prototypeAccessors$1.namespaced.get = function () { + return !!this._rawModule.namespaced +}; + +Module.prototype.addChild = function addChild (key, module) { + this._children[key] = module; +}; + +Module.prototype.removeChild = function removeChild (key) { + delete this._children[key]; +}; + +Module.prototype.getChild = function getChild (key) { + return this._children[key] +}; + +Module.prototype.update = function update (rawModule) { + this._rawModule.namespaced = rawModule.namespaced; + if (rawModule.actions) { + this._rawModule.actions = rawModule.actions; + } + if (rawModule.mutations) { + this._rawModule.mutations = rawModule.mutations; + } + if (rawModule.getters) { + this._rawModule.getters = rawModule.getters; + } +}; + +Module.prototype.forEachChild = function forEachChild (fn) { + forEachValue(this._children, fn); +}; + +Module.prototype.forEachGetter = function forEachGetter (fn) { + if (this._rawModule.getters) { + forEachValue(this._rawModule.getters, fn); + } +}; + +Module.prototype.forEachAction = function forEachAction (fn) { + if (this._rawModule.actions) { + forEachValue(this._rawModule.actions, fn); + } +}; + +Module.prototype.forEachMutation = function forEachMutation (fn) { + if (this._rawModule.mutations) { + forEachValue(this._rawModule.mutations, fn); + } +}; + +Object.defineProperties( Module.prototype, prototypeAccessors$1 ); + +var ModuleCollection = function ModuleCollection (rawRootModule) { + // register root module (Vuex.Store options) + this.register([], rawRootModule, false); +}; + +ModuleCollection.prototype.get = function get (path) { + return path.reduce(function (module, key) { + return module.getChild(key) + }, this.root) +}; + +ModuleCollection.prototype.getNamespace = function getNamespace (path) { + var module = this.root; + return path.reduce(function (namespace, key) { + module = module.getChild(key); + return namespace + (module.namespaced ? key + '/' : '') + }, '') +}; + +ModuleCollection.prototype.update = function update$1 (rawRootModule) { + update([], this.root, rawRootModule); +}; + +ModuleCollection.prototype.register = function register (path, rawModule, runtime) { + var this$1 = this; + if ( runtime === void 0 ) runtime = true; + + { + assertRawModule(path, rawModule); + } + + var newModule = new Module(rawModule, runtime); + if (path.length === 0) { + this.root = newModule; + } else { + var parent = this.get(path.slice(0, -1)); + parent.addChild(path[path.length - 1], newModule); + } + + // register nested modules + if (rawModule.modules) { + forEachValue(rawModule.modules, function (rawChildModule, key) { + this$1.register(path.concat(key), rawChildModule, runtime); + }); + } +}; + +ModuleCollection.prototype.unregister = function unregister (path) { + var parent = this.get(path.slice(0, -1)); + var key = path[path.length - 1]; + if (!parent.getChild(key).runtime) { return } + + parent.removeChild(key); +}; + +function update (path, targetModule, newModule) { + { + assertRawModule(path, newModule); + } + + // update target module + targetModule.update(newModule); + + // update nested modules + if (newModule.modules) { + for (var key in newModule.modules) { + if (!targetModule.getChild(key)) { + { + console.warn( + "[vuex] trying to add a new module '" + key + "' on hot reloading, " + + 'manual reload is needed' + ); + } + return + } + update( + path.concat(key), + targetModule.getChild(key), + newModule.modules[key] + ); + } + } +} + +var functionAssert = { + assert: function (value) { return typeof value === 'function'; }, + expected: 'function' +}; + +var objectAssert = { + assert: function (value) { return typeof value === 'function' || + (typeof value === 'object' && typeof value.handler === 'function'); }, + expected: 'function or object with "handler" function' +}; + +var assertTypes = { + getters: functionAssert, + mutations: functionAssert, + actions: objectAssert +}; + +function assertRawModule (path, rawModule) { + Object.keys(assertTypes).forEach(function (key) { + if (!rawModule[key]) { return } + + var assertOptions = assertTypes[key]; + + forEachValue(rawModule[key], function (value, type) { + assert( + assertOptions.assert(value), + makeAssertionMessage(path, key, type, value, assertOptions.expected) + ); + }); + }); +} + +function makeAssertionMessage (path, key, type, value, expected) { + var buf = key + " should be " + expected + " but \"" + key + "." + type + "\""; + if (path.length > 0) { + buf += " in module \"" + (path.join('.')) + "\""; + } + buf += " is " + (JSON.stringify(value)) + "."; + return buf +} + +var Vue; // bind on install + +var Store = function Store (options) { + var this$1 = this; + if ( options === void 0 ) options = {}; + + // Auto install if it is not done yet and `window` has `Vue`. + // To allow users to avoid auto-installation in some cases, + // this code should be placed here. See #731 + if (!Vue && typeof window !== 'undefined' && window.Vue) { + install(window.Vue); + } + + { + assert(Vue, "must call Vue.use(Vuex) before creating a store instance."); + assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser."); + assert(this instanceof Store, "Store must be called with the new operator."); + } + + var plugins = options.plugins; if ( plugins === void 0 ) plugins = []; + var strict = options.strict; if ( strict === void 0 ) strict = false; + + var state = options.state; if ( state === void 0 ) state = {}; + if (typeof state === 'function') { + state = state() || {}; + } + + // store internal state + this._committing = false; + this._actions = Object.create(null); + this._actionSubscribers = []; + this._mutations = Object.create(null); + this._wrappedGetters = Object.create(null); + this._modules = new ModuleCollection(options); + this._modulesNamespaceMap = Object.create(null); + this._subscribers = []; + this._watcherVM = new Vue(); + + // bind commit and dispatch to self + var store = this; + var ref = this; + var dispatch = ref.dispatch; + var commit = ref.commit; + this.dispatch = function boundDispatch (type, payload) { + return dispatch.call(store, type, payload) + }; + this.commit = function boundCommit (type, payload, options) { + return commit.call(store, type, payload, options) + }; + + // strict mode + this.strict = strict; + + // init root module. + // this also recursively registers all sub-modules + // and collects all module getters inside this._wrappedGetters + installModule(this, state, [], this._modules.root); + + // initialize the store vm, which is responsible for the reactivity + // (also registers _wrappedGetters as computed properties) + resetStoreVM(this, state); + + // apply plugins + plugins.forEach(function (plugin) { return plugin(this$1); }); + + if (Vue.config.devtools) { + devtoolPlugin(this); + } +}; + +var prototypeAccessors = { state: { configurable: true } }; + +prototypeAccessors.state.get = function () { + return this._vm._data.$$state +}; + +prototypeAccessors.state.set = function (v) { + { + assert(false, "Use store.replaceState() to explicit replace store state."); + } +}; + +Store.prototype.commit = function commit (_type, _payload, _options) { + var this$1 = this; + + // check object-style commit + var ref = unifyObjectStyle(_type, _payload, _options); + var type = ref.type; + var payload = ref.payload; + var options = ref.options; + + var mutation = { type: type, payload: payload }; + var entry = this._mutations[type]; + if (!entry) { + { + console.error(("[vuex] unknown mutation type: " + type)); + } + return + } + this._withCommit(function () { + entry.forEach(function commitIterator (handler) { + handler(payload); + }); + }); + this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); }); + + if ( + "development" !== 'production' && + options && options.silent + ) { + console.warn( + "[vuex] mutation type: " + type + ". Silent option has been removed. " + + 'Use the filter functionality in the vue-devtools' + ); + } +}; + +Store.prototype.dispatch = function dispatch (_type, _payload) { + var this$1 = this; + + // check object-style dispatch + var ref = unifyObjectStyle(_type, _payload); + var type = ref.type; + var payload = ref.payload; + + var action = { type: type, payload: payload }; + var entry = this._actions[type]; + if (!entry) { + { + console.error(("[vuex] unknown action type: " + type)); + } + return + } + + this._actionSubscribers.forEach(function (sub) { return sub(action, this$1.state); }); + + return entry.length > 1 + ? Promise.all(entry.map(function (handler) { return handler(payload); })) + : entry[0](payload) +}; + +Store.prototype.subscribe = function subscribe (fn) { + return genericSubscribe(fn, this._subscribers) +}; + +Store.prototype.subscribeAction = function subscribeAction (fn) { + return genericSubscribe(fn, this._actionSubscribers) +}; + +Store.prototype.watch = function watch (getter, cb, options) { + var this$1 = this; + + { + assert(typeof getter === 'function', "store.watch only accepts a function."); + } + return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options) +}; + +Store.prototype.replaceState = function replaceState (state) { + var this$1 = this; + + this._withCommit(function () { + this$1._vm._data.$$state = state; + }); +}; + +Store.prototype.registerModule = function registerModule (path, rawModule, options) { + if ( options === void 0 ) options = {}; + + if (typeof path === 'string') { path = [path]; } + + { + assert(Array.isArray(path), "module path must be a string or an Array."); + assert(path.length > 0, 'cannot register the root module by using registerModule.'); + } + + this._modules.register(path, rawModule); + installModule(this, this.state, path, this._modules.get(path), options.preserveState); + // reset store to update getters... + resetStoreVM(this, this.state); +}; + +Store.prototype.unregisterModule = function unregisterModule (path) { + var this$1 = this; + + if (typeof path === 'string') { path = [path]; } + + { + assert(Array.isArray(path), "module path must be a string or an Array."); + } + + this._modules.unregister(path); + this._withCommit(function () { + var parentState = getNestedState(this$1.state, path.slice(0, -1)); + Vue.delete(parentState, path[path.length - 1]); + }); + resetStore(this); +}; + +Store.prototype.hotUpdate = function hotUpdate (newOptions) { + this._modules.update(newOptions); + resetStore(this, true); +}; + +Store.prototype._withCommit = function _withCommit (fn) { + var committing = this._committing; + this._committing = true; + fn(); + this._committing = committing; +}; + +Object.defineProperties( Store.prototype, prototypeAccessors ); + +function genericSubscribe (fn, subs) { + if (subs.indexOf(fn) < 0) { + subs.push(fn); + } + return function () { + var i = subs.indexOf(fn); + if (i > -1) { + subs.splice(i, 1); + } + } +} + +function resetStore (store, hot) { + store._actions = Object.create(null); + store._mutations = Object.create(null); + store._wrappedGetters = Object.create(null); + store._modulesNamespaceMap = Object.create(null); + var state = store.state; + // init all modules + installModule(store, state, [], store._modules.root, true); + // reset vm + resetStoreVM(store, state, hot); +} + +function resetStoreVM (store, state, hot) { + var oldVm = store._vm; + + // bind store public getters + store.getters = {}; + var wrappedGetters = store._wrappedGetters; + var computed = {}; + forEachValue(wrappedGetters, function (fn, key) { + // use computed to leverage its lazy-caching mechanism + computed[key] = function () { return fn(store); }; + Object.defineProperty(store.getters, key, { + get: function () { return store._vm[key]; }, + enumerable: true // for local getters + }); + }); + + // use a Vue instance to store the state tree + // suppress warnings just in case the user has added + // some funky global mixins + var silent = Vue.config.silent; + Vue.config.silent = true; + store._vm = new Vue({ + data: { + $$state: state + }, + computed: computed + }); + Vue.config.silent = silent; + + // enable strict mode for new vm + if (store.strict) { + enableStrictMode(store); + } + + if (oldVm) { + if (hot) { + // dispatch changes in all subscribed watchers + // to force getter re-evaluation for hot reloading. + store._withCommit(function () { + oldVm._data.$$state = null; + }); + } + Vue.nextTick(function () { return oldVm.$destroy(); }); + } +} + +function installModule (store, rootState, path, module, hot) { + var isRoot = !path.length; + var namespace = store._modules.getNamespace(path); + + // register in namespace map + if (module.namespaced) { + store._modulesNamespaceMap[namespace] = module; + } + + // set state + if (!isRoot && !hot) { + var parentState = getNestedState(rootState, path.slice(0, -1)); + var moduleName = path[path.length - 1]; + store._withCommit(function () { + Vue.set(parentState, moduleName, module.state); + }); + } + + var local = module.context = makeLocalContext(store, namespace, path); + + module.forEachMutation(function (mutation, key) { + var namespacedType = namespace + key; + registerMutation(store, namespacedType, mutation, local); + }); + + module.forEachAction(function (action, key) { + var type = action.root ? key : namespace + key; + var handler = action.handler || action; + registerAction(store, type, handler, local); + }); + + module.forEachGetter(function (getter, key) { + var namespacedType = namespace + key; + registerGetter(store, namespacedType, getter, local); + }); + + module.forEachChild(function (child, key) { + installModule(store, rootState, path.concat(key), child, hot); + }); +} + +/** + * make localized dispatch, commit, getters and state + * if there is no namespace, just use root ones + */ +function makeLocalContext (store, namespace, path) { + var noNamespace = namespace === ''; + + var local = { + dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) { + var args = unifyObjectStyle(_type, _payload, _options); + var payload = args.payload; + var options = args.options; + var type = args.type; + + if (!options || !options.root) { + type = namespace + type; + if ("development" !== 'production' && !store._actions[type]) { + console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type)); + return + } + } + + return store.dispatch(type, payload) + }, + + commit: noNamespace ? store.commit : function (_type, _payload, _options) { + var args = unifyObjectStyle(_type, _payload, _options); + var payload = args.payload; + var options = args.options; + var type = args.type; + + if (!options || !options.root) { + type = namespace + type; + if ("development" !== 'production' && !store._mutations[type]) { + console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type)); + return + } + } + + store.commit(type, payload, options); + } + }; + + // getters and state object must be gotten lazily + // because they will be changed by vm update + Object.defineProperties(local, { + getters: { + get: noNamespace + ? function () { return store.getters; } + : function () { return makeLocalGetters(store, namespace); } + }, + state: { + get: function () { return getNestedState(store.state, path); } + } + }); + + return local +} + +function makeLocalGetters (store, namespace) { + var gettersProxy = {}; + + var splitPos = namespace.length; + Object.keys(store.getters).forEach(function (type) { + // skip if the target getter is not match this namespace + if (type.slice(0, splitPos) !== namespace) { return } + + // extract local getter type + var localType = type.slice(splitPos); + + // Add a port to the getters proxy. + // Define as getter property because + // we do not want to evaluate the getters in this time. + Object.defineProperty(gettersProxy, localType, { + get: function () { return store.getters[type]; }, + enumerable: true + }); + }); + + return gettersProxy +} + +function registerMutation (store, type, handler, local) { + var entry = store._mutations[type] || (store._mutations[type] = []); + entry.push(function wrappedMutationHandler (payload) { + handler.call(store, local.state, payload); + }); +} + +function registerAction (store, type, handler, local) { + var entry = store._actions[type] || (store._actions[type] = []); + entry.push(function wrappedActionHandler (payload, cb) { + var res = handler.call(store, { + dispatch: local.dispatch, + commit: local.commit, + getters: local.getters, + state: local.state, + rootGetters: store.getters, + rootState: store.state + }, payload, cb); + if (!isPromise(res)) { + res = Promise.resolve(res); + } + if (store._devtoolHook) { + return res.catch(function (err) { + store._devtoolHook.emit('vuex:error', err); + throw err + }) + } else { + return res + } + }); +} + +function registerGetter (store, type, rawGetter, local) { + if (store._wrappedGetters[type]) { + { + console.error(("[vuex] duplicate getter key: " + type)); + } + return + } + store._wrappedGetters[type] = function wrappedGetter (store) { + return rawGetter( + local.state, // local state + local.getters, // local getters + store.state, // root state + store.getters // root getters + ) + }; +} + +function enableStrictMode (store) { + store._vm.$watch(function () { return this._data.$$state }, function () { + { + assert(store._committing, "Do not mutate vuex store state outside mutation handlers."); + } + }, { deep: true, sync: true }); +} + +function getNestedState (state, path) { + return path.length + ? path.reduce(function (state, key) { return state[key]; }, state) + : state +} + +function unifyObjectStyle (type, payload, options) { + if (isObject(type) && type.type) { + options = payload; + payload = type; + type = type.type; + } + + { + assert(typeof type === 'string', ("Expects string as the type, but found " + (typeof type) + ".")); + } + + return { type: type, payload: payload, options: options } +} + +function install (_Vue) { + if (Vue && _Vue === Vue) { + { + console.error( + '[vuex] already installed. Vue.use(Vuex) should be called only once.' + ); + } + return + } + Vue = _Vue; + applyMixin(Vue); +} + +var mapState = normalizeNamespace(function (namespace, states) { + var res = {}; + normalizeMap(states).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedState () { + var state = this.$store.state; + var getters = this.$store.getters; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapState', namespace); + if (!module) { + return + } + state = module.context.state; + getters = module.context.getters; + } + return typeof val === 'function' + ? val.call(this, state, getters) + : state[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +var mapMutations = normalizeNamespace(function (namespace, mutations) { + var res = {}; + normalizeMap(mutations).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedMutation () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var commit = this.$store.commit; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapMutations', namespace); + if (!module) { + return + } + commit = module.context.commit; + } + return typeof val === 'function' + ? val.apply(this, [commit].concat(args)) + : commit.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +var mapGetters = normalizeNamespace(function (namespace, getters) { + var res = {}; + normalizeMap(getters).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + val = namespace + val; + res[key] = function mappedGetter () { + if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) { + return + } + if ("development" !== 'production' && !(val in this.$store.getters)) { + console.error(("[vuex] unknown getter: " + val)); + return + } + return this.$store.getters[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +var mapActions = normalizeNamespace(function (namespace, actions) { + var res = {}; + normalizeMap(actions).forEach(function (ref) { + var key = ref.key; + var val = ref.val; + + res[key] = function mappedAction () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var dispatch = this.$store.dispatch; + if (namespace) { + var module = getModuleByNamespace(this.$store, 'mapActions', namespace); + if (!module) { + return + } + dispatch = module.context.dispatch; + } + return typeof val === 'function' + ? val.apply(this, [dispatch].concat(args)) + : dispatch.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +var createNamespacedHelpers = function (namespace) { return ({ + mapState: mapState.bind(null, namespace), + mapGetters: mapGetters.bind(null, namespace), + mapMutations: mapMutations.bind(null, namespace), + mapActions: mapActions.bind(null, namespace) +}); }; + +function normalizeMap (map) { + return Array.isArray(map) + ? map.map(function (key) { return ({ key: key, val: key }); }) + : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); }) +} + +function normalizeNamespace (fn) { + return function (namespace, map) { + if (typeof namespace !== 'string') { + map = namespace; + namespace = ''; + } else if (namespace.charAt(namespace.length - 1) !== '/') { + namespace += '/'; + } + return fn(namespace, map) + } +} + +function getModuleByNamespace (store, helper, namespace) { + var module = store._modulesNamespaceMap[namespace]; + if ("development" !== 'production' && !module) { + console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace)); + } + return module +} + +var index = { + Store: Store, + install: install, + version: '3.0.1', + mapState: mapState, + mapMutations: mapMutations, + mapGetters: mapGetters, + mapActions: mapActions, + createNamespacedHelpers: createNamespacedHelpers +}; + +return index; + +}))); diff --git a/vuex/dist/vuex.min.js b/vuex/dist/vuex.min.js new file mode 100644 index 0000000..5d05b52 --- /dev/null +++ b/vuex/dist/vuex.min.js @@ -0,0 +1,6 @@ +/** + * vuex v3.0.1 + * (c) 2017 Evan You + * @license MIT + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Vuex=e()}(this,function(){"use strict";function t(t){$&&(t._devtoolHook=$,$.emit("vuex:init",t),$.on("vuex:travel-to-state",function(e){t.replaceState(e)}),t.subscribe(function(t,e){$.emit("vuex:mutation",t,e)}))}function e(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function n(t){return null!==t&&"object"==typeof t}function o(t){return t&&"function"==typeof t.then}function i(t,e,n){if(e.update(n),n.modules)for(var o in n.modules){if(!e.getChild(o))return;i(t.concat(o),e.getChild(o),n.modules[o])}}function r(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function s(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;a(t,n,[],t._modules.root,!0),c(t,n,e)}function c(t,n,o){var i=t._vm;t.getters={};var r={};e(t._wrappedGetters,function(e,n){r[n]=function(){return e(t)},Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var s=j.config.silent;j.config.silent=!0,t._vm=new j({data:{$$state:n},computed:r}),j.config.silent=s,t.strict&&d(t),i&&(o&&t._withCommit(function(){i._data.$$state=null}),j.nextTick(function(){return i.$destroy()}))}function a(t,e,n,o,i){var r=!n.length,s=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[s]=o),!r&&!i){var c=m(e,n.slice(0,-1)),f=n[n.length-1];t._withCommit(function(){j.set(c,f,o.state)})}var d=o.context=u(t,s,n);o.forEachMutation(function(e,n){p(t,s+n,e,d)}),o.forEachAction(function(e,n){var o=e.root?n:s+n,i=e.handler||e;h(t,o,i,d)}),o.forEachGetter(function(e,n){l(t,s+n,e,d)}),o.forEachChild(function(o,r){a(t,e,n.concat(r),o,i)})}function u(t,e,n){var o=""===e,i={dispatch:o?t.dispatch:function(n,o,i){var r=v(n,o,i),s=r.payload,c=r.options,a=r.type;return c&&c.root||(a=e+a),t.dispatch(a,s)},commit:o?t.commit:function(n,o,i){var r=v(n,o,i),s=r.payload,c=r.options,a=r.type;c&&c.root||(a=e+a),t.commit(a,s,c)}};return Object.defineProperties(i,{getters:{get:o?function(){return t.getters}:function(){return f(t,e)}},state:{get:function(){return m(t.state,n)}}}),i}function f(t,e){var n={},o=e.length;return Object.keys(t.getters).forEach(function(i){if(i.slice(0,o)===e){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return t.getters[i]},enumerable:!0})}}),n}function p(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,o.state,e)})}function h(t,e,n,i){(t._actions[e]||(t._actions[e]=[])).push(function(e,r){var s=n.call(t,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:t.getters,rootState:t.state},e,r);return o(s)||(s=Promise.resolve(s)),t._devtoolHook?s.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):s})}function l(t,e,n,o){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)})}function d(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}function m(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function v(t,e,o){return n(t)&&t.type&&(o=e,e=t,t=t.type),{type:t,payload:e,options:o}}function _(t){j&&t===j||w(j=t)}function y(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function g(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function b(t,e,n){var o=t._modulesNamespaceMap[n];return o}var w=function(t){function e(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[e].concat(t.init):e,n.call(this,t)}}},$="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,M=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},O={namespaced:{configurable:!0}};O.namespaced.get=function(){return!!this._rawModule.namespaced},M.prototype.addChild=function(t,e){this._children[t]=e},M.prototype.removeChild=function(t){delete this._children[t]},M.prototype.getChild=function(t){return this._children[t]},M.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},M.prototype.forEachChild=function(t){e(this._children,t)},M.prototype.forEachGetter=function(t){this._rawModule.getters&&e(this._rawModule.getters,t)},M.prototype.forEachAction=function(t){this._rawModule.actions&&e(this._rawModule.actions,t)},M.prototype.forEachMutation=function(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)},Object.defineProperties(M.prototype,O);var E=function(t){this.register([],t,!1)};E.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},E.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")},"")},E.prototype.update=function(t){i([],this.root,t)},E.prototype.register=function(t,n,o){var i=this;void 0===o&&(o=!0);var r=new M(n,o);0===t.length?this.root=r:this.get(t.slice(0,-1)).addChild(t[t.length-1],r),n.modules&&e(n.modules,function(e,n){i.register(t.concat(n),e,o)})},E.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var j,C=function(e){var n=this;void 0===e&&(e={}),!j&&"undefined"!=typeof window&&window.Vue&&_(window.Vue);var o=e.plugins;void 0===o&&(o=[]);var i=e.strict;void 0===i&&(i=!1);var r=e.state;void 0===r&&(r={}),"function"==typeof r&&(r=r()||{}),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new E(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new j;var s=this,u=this,f=u.dispatch,p=u.commit;this.dispatch=function(t,e){return f.call(s,t,e)},this.commit=function(t,e,n){return p.call(s,t,e,n)},this.strict=i,a(this,r,[],this._modules.root),c(this,r),o.forEach(function(t){return t(n)}),j.config.devtools&&t(this)},x={state:{configurable:!0}};x.state.get=function(){return this._vm._data.$$state},x.state.set=function(t){},C.prototype.commit=function(t,e,n){var o=this,i=v(t,e,n),r=i.type,s=i.payload,c=(i.options,{type:r,payload:s}),a=this._mutations[r];a&&(this._withCommit(function(){a.forEach(function(t){t(s)})}),this._subscribers.forEach(function(t){return t(c,o.state)}))},C.prototype.dispatch=function(t,e){var n=this,o=v(t,e),i=o.type,r=o.payload,s={type:i,payload:r},c=this._actions[i];if(c)return this._actionSubscribers.forEach(function(t){return t(s,n.state)}),c.length>1?Promise.all(c.map(function(t){return t(r)})):c[0](r)},C.prototype.subscribe=function(t){return r(t,this._subscribers)},C.prototype.subscribeAction=function(t){return r(t,this._actionSubscribers)},C.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},C.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},C.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),a(this,this.state,t,this._modules.get(t),n.preserveState),c(this,this.state)},C.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=m(e.state,t.slice(0,-1));j.delete(n,t[t.length-1])}),s(this)},C.prototype.hotUpdate=function(t){this._modules.update(t),s(this,!0)},C.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(C.prototype,x);var k=g(function(t,e){var n={};return y(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=b(this.$store,0,t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[o].vuex=!0}),n}),G=g(function(t,e){var n={};return y(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var r=b(this.$store,0,t);if(!r)return;o=r.context.commit}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n}),S=g(function(t,e){var n={};return y(e).forEach(function(e){var o=e.key,i=e.val;i=t+i,n[o]=function(){if(!t||b(this.$store,0,t))return this.$store.getters[i]},n[o].vuex=!0}),n}),A=g(function(t,e){var n={};return y(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var r=b(this.$store,0,t);if(!r)return;o=r.context.dispatch}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n});return{Store:C,install:_,version:"3.0.1",mapState:k,mapMutations:G,mapGetters:S,mapActions:A,createNamespacedHelpers:function(t){return{mapState:k.bind(null,t),mapGetters:S.bind(null,t),mapMutations:G.bind(null,t),mapActions:A.bind(null,t)}}}}); \ No newline at end of file diff --git a/vuex/package.json b/vuex/package.json new file mode 100644 index 0000000..c8d64c9 --- /dev/null +++ b/vuex/package.json @@ -0,0 +1,105 @@ +{ + "_from": "vuex@^3.0.1", + "_id": "vuex@3.0.1", + "_inBundle": false, + "_integrity": "sha1-52E1Lr4K9TfUu3Vam53Evj3379I=", + "_location": "/vuex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "vuex@^3.0.1", + "name": "vuex", + "escapedName": "vuex", + "rawSpec": "^3.0.1", + "saveSpec": null, + "fetchSpec": "^3.0.1" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "http://registry.npm.taobao.org/vuex/download/vuex-3.0.1.tgz", + "_shasum": "e761352ebe0af537d4bb755a9b9dc4be3df7efd2", + "_spec": "vuex@^3.0.1", + "_where": "C:\\Users\\Administrator\\Desktop\\mv-project", + "author": { + "name": "Evan You" + }, + "bugs": { + "url": "https://github.com/vuejs/vuex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "state management for Vue.js", + "devDependencies": { + "babel-core": "^6.22.1", + "babel-loader": "^7.1.2", + "babel-plugin-transform-object-rest-spread": "^6.23.0", + "babel-polyfill": "^6.22.0", + "babel-preset-env": "^1.5.1", + "chromedriver": "^2.32.3", + "cross-spawn": "^5.0.1", + "css-loader": "^0.28.7", + "eslint": "^3.19.0", + "eslint-plugin-vue-libs": "^1.2.0", + "express": "^4.14.1", + "gitbook-plugin-edit-link": "^2.0.2", + "gitbook-plugin-github": "^3.0.0", + "gitbook-plugin-prism": "^2.3.0", + "gitbook-plugin-theme-vuejs": "^1.1.0", + "jasmine": "2.8.0", + "jasmine-core": "2.8.0", + "nightwatch": "^0.9.12", + "nightwatch-helpers": "^1.2.0", + "phantomjs-prebuilt": "^2.1.14", + "rollup": "^0.50.0", + "rollup-plugin-buble": "^0.16.0", + "rollup-plugin-replace": "^2.0.0", + "rollup-watch": "^4.3.1", + "selenium-server": "^2.53.1", + "todomvc-app-css": "^2.1.0", + "typescript": "^2.5.3", + "uglify-js": "^3.1.2", + "vue": "^2.5.0", + "vue-loader": "^13.3.0", + "vue-template-compiler": "^2.5.0", + "webpack": "^3.7.1", + "webpack-dev-middleware": "^1.10.0", + "webpack-hot-middleware": "^2.19.1" + }, + "files": [ + "dist", + "types/index.d.ts", + "types/helpers.d.ts", + "types/vue.d.ts" + ], + "homepage": "https://github.com/vuejs/vuex#readme", + "license": "MIT", + "main": "dist/vuex.common.js", + "module": "dist/vuex.esm.js", + "name": "vuex", + "repository": { + "type": "git", + "url": "git+https://github.com/vuejs/vuex.git" + }, + "scripts": { + "build": "npm run build:main && npm run build:logger", + "build:logger": "rollup -c build/rollup.logger.config.js", + "build:main": "node build/build.main.js", + "dev": "node examples/server.js", + "dev:dist": "rollup -wm -c build/rollup.dev.config.js", + "docs": "cd docs && gitbook install && gitbook serve", + "docs:deploy": "cd docs && ./deploy.sh", + "lint": "eslint src test", + "release": "bash build/release.sh", + "test": "npm run lint && npm run test:types && npm run test:unit && npm run test:ssr && npm run test:e2e", + "test:e2e": "node test/e2e/runner.js", + "test:ssr": "rollup -c build/rollup.dev.config.js && VUE_ENV=server jasmine JASMINE_CONFIG_PATH=test/unit/jasmine.json", + "test:types": "tsc -p types/test", + "test:unit": "rollup -c build/rollup.dev.config.js && jasmine JASMINE_CONFIG_PATH=test/unit/jasmine.json" + }, + "typings": "types/index.d.ts", + "unpkg": "dist/vuex.js", + "version": "3.0.1" +} diff --git a/vuex/types/README.md b/vuex/types/README.md new file mode 100644 index 0000000..2e0d5d6 --- /dev/null +++ b/vuex/types/README.md @@ -0,0 +1,7 @@ +This is the TypeScript declaration of Vuex. + +## Testing + +```sh +$ tsc -p test/tsconfig.json +``` diff --git a/vuex/types/helpers.d.ts b/vuex/types/helpers.d.ts new file mode 100644 index 0000000..e866504 --- /dev/null +++ b/vuex/types/helpers.d.ts @@ -0,0 +1,68 @@ +import Vue from 'vue'; +import { Dispatch, Commit } from './index'; + +type Dictionary = { [key: string]: T }; +type Computed = () => any; +type MutationMethod = (...args: any[]) => void; +type ActionMethod = (...args: any[]) => Promise; + +interface Mapper { + (map: string[]): Dictionary; + (map: Dictionary): Dictionary; +} + +interface MapperWithNamespace { + (namespace: string, map: string[]): Dictionary; + (namespace: string, map: Dictionary): Dictionary; +} + +interface FunctionMapper { + (map: Dictionary<(this: typeof Vue, fn: F, ...args: any[]) => any>): Dictionary; +} + +interface FunctionMapperWithNamespace { + ( + namespace: string, + map: Dictionary<(this: typeof Vue, fn: F, ...args: any[]) => any> + ): Dictionary; +} + +interface MapperForState { + ( + map: Dictionary<(this: typeof Vue, state: S, getters: any) => any> + ): Dictionary; +} + +interface MapperForStateWithNamespace { + ( + namespace: string, + map: Dictionary<(this: typeof Vue, state: S, getters: any) => any> + ): Dictionary; +} + +interface NamespacedMappers { + mapState: Mapper & MapperForState; + mapMutations: Mapper & FunctionMapper; + mapGetters: Mapper; + mapActions: Mapper & FunctionMapper; +} + +export declare const mapState: Mapper + & MapperWithNamespace + & MapperForState + & MapperForStateWithNamespace; + +export declare const mapMutations: Mapper + & MapperWithNamespace + & FunctionMapper + & FunctionMapperWithNamespace; + +export declare const mapGetters: Mapper + & MapperWithNamespace; + +export declare const mapActions: Mapper + & MapperWithNamespace + & FunctionMapper + & FunctionMapperWithNamespace; + +export declare function createNamespacedHelpers(namespace: string): NamespacedMappers; diff --git a/vuex/types/index.d.ts b/vuex/types/index.d.ts new file mode 100644 index 0000000..a504790 --- /dev/null +++ b/vuex/types/index.d.ts @@ -0,0 +1,128 @@ +import _Vue, { WatchOptions } from "vue"; + +// augment typings of Vue.js +import "./vue"; + +export * from "./helpers"; + +export declare class Store { + constructor(options: StoreOptions); + + readonly state: S; + readonly getters: any; + + replaceState(state: S): void; + + dispatch: Dispatch; + commit: Commit; + + subscribe

(fn: (mutation: P, state: S) => any): () => void; + watch(getter: (state: S) => T, cb: (value: T, oldValue: T) => void, options?: WatchOptions): () => void; + + registerModule(path: string, module: Module, options?: ModuleOptions): void; + registerModule(path: string[], module: Module, options?: ModuleOptions): void; + + unregisterModule(path: string): void; + unregisterModule(path: string[]): void; + + hotUpdate(options: { + actions?: ActionTree; + mutations?: MutationTree; + getters?: GetterTree; + modules?: ModuleTree; + }): void; +} + +export declare function install(Vue: typeof _Vue): void; + +export interface Dispatch { + (type: string, payload?: any, options?: DispatchOptions): Promise; +

(payloadWithType: P, options?: DispatchOptions): Promise; +} + +export interface Commit { + (type: string, payload?: any, options?: CommitOptions): void; +

(payloadWithType: P, options?: CommitOptions): void; +} + +export interface ActionContext { + dispatch: Dispatch; + commit: Commit; + state: S; + getters: any; + rootState: R; + rootGetters: any; +} + +export interface Payload { + type: string; +} + +export interface MutationPayload extends Payload { + payload: any; +} + +export interface DispatchOptions { + root?: boolean; +} + +export interface CommitOptions { + silent?: boolean; + root?: boolean; +} + +export interface StoreOptions { + state?: S; + getters?: GetterTree; + actions?: ActionTree; + mutations?: MutationTree; + modules?: ModuleTree; + plugins?: Plugin[]; + strict?: boolean; +} + +type ActionHandler = (injectee: ActionContext, payload: any) => any; +interface ActionObject { + root?: boolean; + handler: ActionHandler; +} + +export type Getter = (state: S, getters: any, rootState: R, rootGetters: any) => any; +export type Action = ActionHandler | ActionObject; +export type Mutation = (state: S, payload: any) => any; +export type Plugin = (store: Store) => any; + +export interface Module { + namespaced?: boolean; + state?: S | (() => S); + getters?: GetterTree; + actions?: ActionTree; + mutations?: MutationTree; + modules?: ModuleTree; +} + +export interface ModuleOptions{ + preserveState?: boolean +} + +export interface GetterTree { + [key: string]: Getter; +} + +export interface ActionTree { + [key: string]: Action; +} + +export interface MutationTree { + [key: string]: Mutation; +} + +export interface ModuleTree { + [key: string]: Module; +} + +declare const _default: { + Store: typeof Store; + install: typeof install; +} +export default _default; diff --git a/vuex/types/vue.d.ts b/vuex/types/vue.d.ts new file mode 100644 index 0000000..302fc4e --- /dev/null +++ b/vuex/types/vue.d.ts @@ -0,0 +1,18 @@ +/** + * Extends interfaces in Vue.js + */ + +import Vue, { ComponentOptions } from "vue"; +import { Store } from "./index"; + +declare module "vue/types/options" { + interface ComponentOptions { + store?: Store; + } +} + +declare module "vue/types/vue" { + interface Vue { + $store: Store; + } +}