commit 609f748248c24bbe8de43117f7cf137d511e1cbf Author: itgaojian Date: Sat Jul 15 14:25:28 2023 +0800 初始化项目 diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..115cc02 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,31 @@ +/* + * Eslint config file + * Documentation: https://eslint.org/docs/user-guide/configuring/ + * Install the Eslint extension before using this feature. + */ +module.exports = { + env: { + es6: true, + browser: true, + node: true, + }, + ecmaFeatures: { + modules: true, + }, + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + }, + globals: { + wx: true, + App: true, + Page: true, + getCurrentPages: true, + getApp: true, + Component: true, + requirePlugin: true, + requireMiniProgram: true, + }, + // extends: 'eslint:recommended', + rules: {}, +} diff --git a/app.js b/app.js new file mode 100644 index 0000000..155a395 --- /dev/null +++ b/app.js @@ -0,0 +1,51 @@ +// app.js +var restAjax = require('./utils/restAjax.js'); +var request = require('./utils/request.js'); +App({ + restAjax: restAjax, + http: request, + apis: restAjax.apis, + urls:request.apis, + baseUrls: restAjax.baseUrl, + onLaunch() { + this.globalData.windowHeight = wx.getSystemInfoSync().windowHeight + //设置状态栏 + wx.getSystemInfo({ + success: e => { + this.globalData.StatusBar = e.statusBarHeight; + let capsule = wx.getMenuButtonBoundingClientRect(); + if (capsule) { + this.globalData.Custom = capsule; + this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight; + } else { + this.globalData.CustomBar = e.statusBarHeight + 50; + } + } + }) + + }, + + // 获取用户信息 + getUserInfo: function () { + var self = this + app.restAjax.get(app.restAjax.path('{loginUrl}app/user/get-app-user', [app.personIntroUrl]), {}, { + headers: { + token: app.globalData.token + } + }, function (code, data) { + app.globalData.userInfo = data + }, function (code, data) { + app.dialog.msg(data.msg); + }); + }, + + globalData: { + userIcon: '', + userInfo: {}, + currentCommunity: { + communityId: '', + communityName: '切换社区' + }, + token: '' + } +}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..e867308 --- /dev/null +++ b/app.json @@ -0,0 +1,102 @@ +{ + "style": "v2", + "sitemapLocation": "sitemap.json", + "pages": [ + "pages/index/index", + "pages/center/contact/contactDetail", + "pages/center/case/caseList", + "pages/center/case/caseLog", + "pages/center/case/caseHandle", + "pages/center/contact", + "pages/card/cardDetail", + "pages/card/cardList", + "pages/center/center", + "pages/neighbor/neighbor", + "pages/neighbor/circle/new", + "pages/neighbor/help/new", + "pages/neighbor/circle/circleList", + "pages/neighbor/circle/circleDetail", + "pages/neighbor/help/helpList", + "pages/neighbor/help/helpDetail", + "pages/law/law", + "pages/news/newsDetail", + "pages/news/newsList", + "pages/serve/orgDetail", + "pages/serve/serve", + "pages/serve/orgList", + "pages/serve/settle", + "pages/serve/newsList", + "pages/report/report", + "pages/talk/talkDetail", + "pages/talk/myTalk", + "pages/talk/talk", + "pages/talk/newTalk", + "pages/community/join/joinDetail", + "pages/community/join/select", + "pages/community/joinCommunity", + "pages/community/selectCommunity", + "pages/community/changeCommunity", + "pages/checkIn/checkInDetail", + "pages/checkIn/checkIn", + "pages/mine/myCard/myCard", + "pages/mine/myCardDetail/myCardDetail", + "pages/mine/otherCard/othercarddetail", + "pages/columnlist/columnlist", + "pages/serve/serviceDetail" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#FF4949", + "navigationBarTitleText": "市域自治与互助", + "navigationBarTextStyle": "white" + }, + "tabBar": { + "color": "#000000", + "selectedColor": "#f55054", + "borderStyle": "black", + "list": [{ + "text": "城市社区", + "pagePath": "pages/index/index", + "iconPath": "images/home.png", + "selectedIconPath": "images/home-on.png" + }, + { + "text": "便民知识", + "pagePath": "pages/law/law", + "iconPath": "images/law.png", + "selectedIconPath": "images/law-on.png" + }, + { + "text": "热点推送", + "pagePath": "pages/neighbor/neighbor", + "iconPath": "images/neighbor.png", + "selectedIconPath": "images/neighbor-on.png" + }, + { + "text": "我的", + "pagePath": "pages/center/center", + "iconPath": "images/my.png", + "selectedIconPath": "images/my-on.png" + } + ] + }, + "subPackages": [{ + "root": "packagecard/", + "pages": [ + "cardList/cardList", + "cardDetail/cardDetail", + "moments/publish/momentpublish", + "moments/edit/momentedit", + "moments/list/momentslist", + "moments/publish/momentpublishline", + "sharePage/sharePage", + "moments/list/momentsshowlist", + "moments/momentsdetail/momentsdetail", + "moments/showlist/showlist", + "sharePage/cardcode", + "common/corpperimg/cropperimg" + ] + }] + + +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..449a061 --- /dev/null +++ b/app.wxss @@ -0,0 +1,10113 @@ +[is="vant/dist/icon/index"] { + align-items: center; + display: inline-flex; + justify-content: center; +} + +[is="vant/dist/loading/index"] { + font-size: 0; + line-height: 1; +} + +[is="vant/dist/tab/index"] { + flex-shrink: 0; + width: 100%; +} + +[is="vant/dist/tabbar-item/index"] { + flex: 1; +} + +page { + --red: #e54d42; + --orange: #f37b1d; + --yellow: #fbbd08; + --olive: #8dc63f; + --green: #39b54a; + --cyan: #1cbbb4; + --blue: #0054bd; + --purple: #6739b6; + --mauve: #9c26b0; + --pink: #e03997; + --brown: #a5673f; + --grey: #8799a3; + --black: #333; + --darkGray: #666; + --gray: #999; + --ghostWhite: #f1f1f1; + --white: #fff; + --depBlack: #000; + --redLight: #fadbd9; + --orangeLight: #fde6d2; + --yellowLight: #e6b980; + --oliveLight: #e8f4d9; + --greenLight: #d7f0db; + --cyanLight: #d2f1f0; + --blueLight: #cce6ff; + --purpleLight: #e1d7f0; + --mauveLight: #ebd4ef; + --pinkLight: #f9d7ea; + --brownLight: #ede1d9; + --greyLight: #e7ebed; + --gradualRed: linear-gradient(45deg, #f43f3b, #ec008c); + --gradualRed2: linear-gradient(85deg, #f08482, #ff4949); + --gradualRed3: linear-gradient(45deg, #f74e4b, #e90e0e); + --gradualOrange: linear-gradient(45deg, #ff9700, #ed1c24); + --gradualGreen: linear-gradient(45deg, #39b54a, #8dc63f); + --gradualPurple: linear-gradient(45deg, #9000ff, #5e00ff); + --gradualPink: linear-gradient(45deg, #ec008c, #6739b6); + --gradualBlue: linear-gradient(45deg, #0081ff, #1cbbb4); + --gradualWhite: linear-gradient(45deg, #fff, #f8f8f8); + --gradualGray: linear-gradient(85deg, #faf9f9, #f5f2f2); + --gradualYellow: linear-gradient(85deg, #f4dbb8, #e6b980); + --gradualYellow2: linear-gradient(0deg, #ffb957, #e6b980); + --ShadowSize: 6rpx 6rpx 8rpx; + --redShadow: rgba(204, 69, 59, .2); + --orangeShadow: rgba(217, 109, 26, .2); + --yellowShadow: rgba(224, 170, 7, .2); + --oliveShadow: rgba(124, 173, 55, .2); + --greenShadow: rgba(48, 156, 63, .2); + --cyanShadow: rgba(28, 187, 180, .2); + --blueShadow: rgba(0, 102, 204, .2); + --purpleShadow: rgba(88, 48, 156, .2); + --mauveShadow: rgba(133, 33, 150, .2); + --pinkShadow: rgba(199, 50, 134, .2); + --brownShadow: rgba(140, 88, 53, .2); + --greyShadow: rgba(114, 130, 138, .2); + --grayShadow: rgba(114, 130, 138, .2); + --blackShadow: rgba(26, 26, 26, .2); + background-color: var(--ghostWhite); + color: var(--black); + font-family: Helvetica Neue, Helvetica, sans-serif; + font-size: 28rpx; +} + +button, +image, +input, +label, +navigator, +scroll-view, +swiper, +textarea, +view { + box-sizing: border-box; +} + +.round { + border-radius: 5000rpx; +} + +.radius { + border-radius: 6rpx; +} + +image { + display: inline-block; + max-width: 100%; + position: relative; + z-index: 0; +} + +image.loading::before { + background-color: #f5f5f5; + content: ""; + display: block; + height: 100%; + position: absolute; + width: 100%; + z-index: -2; +} + +image.loading::after { + animation: cuIcon-spin 2s linear infinite; + bottom: 0; + color: #ccc; + content: "\e7f1"; + display: block; + font-family: cuIcon; + font-size: 32rpx; + height: 32rpx; + left: 0; + line-height: 32rpx; + margin: auto; + position: absolute; + right: 0; + top: 0; + width: 32rpx; + z-index: -1; +} + +.response { + width: 100%; +} + +checkbox, +radio, +switch { + position: relative; +} + +switch::after, +switch::before { + bottom: 0; + color: var(--white) !important; + content: "\e645"; + font-family: cuIcon; + font-size: 26rpx; + height: 26px; + left: 0rpx; + line-height: 26px; + margin: auto; + pointer-events: none; + position: absolute; + text-align: center; + top: 0; + transform: scale(0, 0); + transition: all .3s ease-in-out 0s; + width: 50%; + z-index: 9; +} + +switch::before { + content: "\e646"; + left: auto; + right: 0; +} + +switch.checked::after, +switch::before, +switch[checked]::after { + transform: scale(1, 1); +} + +switch.checked::before, +switch[checked]::before { + transform: scale(0, 0); +} + +checkbox::before, +radio::before { + color: var(--white) !important; + content: "\e645"; + font-family: cuIcon; + font-size: 32rpx; + line-height: 16px; + margin-top: -8px; + pointer-events: none; + position: absolute; + right: 5px; + top: 50%; + transform: scale(1, 1); + transition: all .3s ease-in-out 0s; + z-index: 9; +} + +checkbox .wx-checkbox-input, +radio .wx-radio-input { + height: 20px; + margin: 0; + width: 20px; +} + +checkbox.round .wx-checkbox-input { + border-radius: 100rpx; +} + +switch .wx-switch-input { + border: none; + border-radius: 100rpx; + height: 26px; + margin: 0; + padding: 0 24px; + width: 48px; +} + +switch .wx-switch-input:not([class*="bg-"]) { + background: var(--grey) !important; +} + +switch .wx-switch-input::after { + border-radius: 100rpx; + bottom: 0rpx; + height: 26px; + left: 0rpx; + margin: auto; + position: absolute; + top: 0rpx; + transform: scale(.9, .9); + transition: all .1s ease-in-out 0s; + width: 26px; +} + +switch .wx-switch-input.wx-switch-input-checked::after { + box-shadow: none; + left: 22px; + margin: auto; + transform: scale(.9, .9); +} + +radio-group { + display: inline-block; +} + +switch.radius .wx-switch-input, +switch.radius .wx-switch-input::after, +switch.radius .wx-switch-input::before { + border-radius: 10rpx; +} + +checkbox .wx-checkbox-input::before, +radio .wx-radio-input::before, +radio.radio::before, +switch .wx-switch-input::before { + display: none; +} + +radio.radio[checked]::after { + background-color: initial; + border: 8px solid var(--white) !important; + border-radius: 200rpx; + bottom: 0; + content: ""; + display: block; + height: 8px; + left: 0rpx; + margin: auto; + position: absolute; + right: 0; + top: 0rpx; + width: 8px; + z-index: 999; +} + +.switch-sex::after { + content: "\e71c"; +} + +.switch-sex::before { + content: "\e71a"; +} + +.switch-sex .wx-switch-input { + background: var(--red) !important; + border-color: var(--red) !important; +} + +.switch-sex[checked] .wx-switch-input { + background: var(--blue) !important; + border-color: var(--blue) !important; +} + +checkbox.red[checked] .wx-checkbox-input, +radio.red[checked] .wx-radio-input, +switch.red[checked] .wx-switch-input { + border-color: var(--red) !important; +} + +checkbox.orange[checked] .wx-checkbox-input, +radio.orange[checked] .wx-radio-input, +switch.orange[checked] .wx-switch-input { + border-color: var(--orange) !important; +} + +checkbox.yellow[checked] .wx-checkbox-input, +radio.yellow[checked] .wx-radio-input, +switch.yellow[checked] .wx-switch-input { + border-color: var(--yellow) !important; +} + +checkbox.olive[checked] .wx-checkbox-input, +radio.olive[checked] .wx-radio-input, +switch.olive[checked] .wx-switch-input { + border-color: var(--olive) !important; +} + +checkbox.green[checked] .wx-checkbox-input, +checkbox[checked] .wx-checkbox-input, +radio.green[checked] .wx-radio-input, +switch.green[checked] .wx-switch-input { + border-color: var(--green) !important; +} + +checkbox.cyan[checked] .wx-checkbox-input, +radio.cyan[checked] .wx-radio-input, +switch.cyan[checked] .wx-switch-input { + border-color: var(--cyan) !important; +} + +checkbox.blue[checked] .wx-checkbox-input, +radio.blue[checked] .wx-radio-input, +switch.blue[checked] .wx-switch-input { + border-color: var(--blue) !important; +} + +checkbox.purple[checked] .wx-checkbox-input, +radio.purple[checked] .wx-radio-input, +switch.purple[checked] .wx-switch-input { + border-color: var(--purple) !important; +} + +checkbox.mauve[checked] .wx-checkbox-input, +radio.mauve[checked] .wx-radio-input, +switch.mauve[checked] .wx-switch-input { + border-color: var(--mauve) !important; +} + +checkbox.pink[checked] .wx-checkbox-input, +radio.pink[checked] .wx-radio-input, +switch.pink[checked] .wx-switch-input { + border-color: var(--pink) !important; +} + +checkbox.brown[checked] .wx-checkbox-input, +radio.brown[checked] .wx-radio-input, +switch.brown[checked] .wx-switch-input { + border-color: var(--brown) !important; +} + +checkbox.gray[checked] .wx-checkbox-input, +checkbox.grey[checked] .wx-checkbox-input, +radio.gray[checked] .wx-radio-input, +radio.grey[checked] .wx-radio-input, +switch.gray[checked] .wx-switch-input, +switch.grey[checked] .wx-switch-input { + border-color: var(--grey) !important; +} + +checkbox.black[checked] .wx-checkbox-input, +radio.black[checked] .wx-radio-input, +switch.black[checked] .wx-switch-input { + border-color: var(--black) !important; +} + +checkbox.white[checked] .wx-checkbox-input, +radio.white[checked] .wx-radio-input, +switch.white[checked] .wx-switch-input { + border-color: var(--white) !important; +} + +checkbox.red[checked] .wx-checkbox-input, +radio.red[checked] .wx-radio-input, +switch.red[checked] .wx-switch-input.wx-switch-input-checked { + background-color: var(--red) !important; + color: var(--white) !important; +} + +checkbox.orange[checked] .wx-checkbox-input, +radio.orange[checked] .wx-radio-input, +switch.orange[checked] .wx-switch-input { + background-color: var(--orange) !important; + color: var(--white) !important; +} + +checkbox.yellow[checked] .wx-checkbox-input, +radio.yellow[checked] .wx-radio-input, +switch.yellow[checked] .wx-switch-input { + background-color: var(--yellow) !important; + color: var(--black) !important; +} + +checkbox.olive[checked] .wx-checkbox-input, +radio.olive[checked] .wx-radio-input, +switch.olive[checked] .wx-switch-input { + background-color: var(--olive) !important; + color: var(--white) !important; +} + +checkbox.green[checked] .wx-checkbox-input, +checkbox[checked] .wx-checkbox-input, +radio.green[checked] .wx-radio-input, +radio[checked] .wx-radio-input, +switch.green[checked] .wx-switch-input, +switch[checked] .wx-switch-input { + background-color: var(--green) !important; + color: var(--white) !important; +} + +checkbox.cyan[checked] .wx-checkbox-input, +radio.cyan[checked] .wx-radio-input, +switch.cyan[checked] .wx-switch-input { + background-color: var(--cyan) !important; + color: var(--white) !important; +} + +checkbox.blue[checked] .wx-checkbox-input, +radio.blue[checked] .wx-radio-input, +switch.blue[checked] .wx-switch-input { + background-color: var(--blue) !important; + color: var(--white) !important; +} + +checkbox.purple[checked] .wx-checkbox-input, +radio.purple[checked] .wx-radio-input, +switch.purple[checked] .wx-switch-input { + background-color: var(--purple) !important; + color: var(--white) !important; +} + +checkbox.mauve[checked] .wx-checkbox-input, +radio.mauve[checked] .wx-radio-input, +switch.mauve[checked] .wx-switch-input { + background-color: var(--mauve) !important; + color: var(--white) !important; +} + +checkbox.pink[checked] .wx-checkbox-input, +radio.pink[checked] .wx-radio-input, +switch.pink[checked] .wx-switch-input { + background-color: var(--pink) !important; + color: var(--white) !important; +} + +checkbox.brown[checked] .wx-checkbox-input, +radio.brown[checked] .wx-radio-input, +switch.brown[checked] .wx-switch-input { + background-color: var(--brown) !important; + color: var(--white) !important; +} + +checkbox.grey[checked] .wx-checkbox-input, +radio.grey[checked] .wx-radio-input, +switch.grey[checked] .wx-switch-input { + background-color: var(--grey) !important; + color: var(--white) !important; +} + +checkbox.gray[checked] .wx-checkbox-input, +radio.gray[checked] .wx-radio-input, +switch.gray[checked] .wx-switch-input { + background-color: #f0f0f0 !important; + color: var(--black) !important; +} + +checkbox.black[checked] .wx-checkbox-input, +radio.black[checked] .wx-radio-input, +switch.black[checked] .wx-switch-input { + background-color: var(--black) !important; + color: var(--white) !important; +} + +checkbox.white[checked] .wx-checkbox-input, +radio.white[checked] .wx-radio-input, +switch.white[checked] .wx-switch-input { + background-color: var(--white) !important; + color: var(--black) !important; +} + +.dashed, +.dashed-bottom, +.dashed-left, +.dashed-right, +.dashed-top, +.solid, +.solid-bottom, +.solid-left, +.solid-right, +.solid-top, +.solids, +.solids-bottom, +.solids-left, +.solids-right, +.solids-top { + position: relative; +} + +.dashed-bottom::after, +.dashed-left::after, +.dashed-right::after, +.dashed-top::after, +.dashed::after, +.solid-bottom::after, +.solid-left::after, +.solid-right::after, +.solid-top::after, +.solid::after, +.solids-bottom::after, +.solids-left::after, +.solids-right::after, +.solids-top::after, +.solids::after { + border-radius: inherit; + box-sizing: border-box; + content: " "; + height: 200%; + left: 0; + pointer-events: none; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; +} + +.solid::after { + border: 1rpx solid rgba(0, 0, 0, .1); +} + +.solid-top::after { + border-top: 1rpx solid rgba(0, 0, 0, .1); +} + +.solid-right::after { + border-right: 1rpx solid rgba(0, 0, 0, .1); +} + +.solid-bottom::after { + border-bottom: 1rpx solid rgba(0, 0, 0, .1); +} + +.solid-left::after { + border-left: 1rpx solid rgba(0, 0, 0, .1); +} + +.solids::after { + border: 8rpx solid #eee; +} + +.solids-top::after { + border-top: 8rpx solid #eee; +} + +.solids-right::after { + border-right: 8rpx solid #eee; +} + +.solids-bottom::after { + border-bottom: 8rpx solid #eee; +} + +.solids-left::after { + border-left: 8rpx solid #eee; +} + +.dashed::after { + border: 1rpx dashed #ddd; +} + +.dashed-top::after { + border-top: 1rpx dashed #ddd; +} + +.dashed-right::after { + border-right: 1rpx dashed #ddd; +} + +.dashed-bottom::after { + border-bottom: 1rpx dashed #ddd; +} + +.dashed-left::after { + border-left: 1rpx dashed #ddd; +} + +.shadow[class*="white"] { + --ShadowSize: 0 1rpx 6rpx; +} + +.shadow-lg { + --ShadowSize: 0rpx 40rpx 100rpx 0rpx; +} + +.shadow-warp { + box-shadow: 0 0 10rpx rgba(0, 0, 0, .1); + position: relative; +} + +.shadow-warp:after, +.shadow-warp:before { + bottom: 30rpx; + box-shadow: 0 30rpx 20rpx rgba(0, 0, 0, .2); + content: ""; + left: 20rpx; + position: absolute; + top: 20rpx; + transform: rotate(-3deg); + width: 50%; + z-index: -1; +} + +.shadow-warp:after { + left: auto; + right: 20rpx; + transform: rotate(3deg); +} + +.shadow-blur { + position: relative; +} + +.shadow-blur::before { + background: inherit; + border-radius: inherit; + content: ""; + display: block; + filter: blur(10rpx); + height: 100%; + left: 10rpx; + opacity: .4; + position: absolute; + top: 10rpx; + transform: scale(1, 1); + transform-origin: 0 0; + width: 100%; + z-index: -1; +} + +.cu-btn { + align-items: center; + border: 0rpx; + box-sizing: border-box; + display: inline-flex; + font-size: 28rpx; + height: 90rpx; + justify-content: center; + line-height: 1; + margin-left: 0; + margin-right: 0; + overflow: visible; + padding: 20rpx 30rpx; + position: relative; + text-align: center; + text-decoration: none; + transform: translate(0rpx, 0rpx); +} + +.cu-btn::after { + background-color: #f5f5f5; + display: none; +} + +.cu-btn:active, +.cu-btn:focus { + background-color: #f5f5f5; + color: #000; +} + +.cu-btn:not([class*="bg-"]) { + background-color: #f0f0f0; +} + +.cu-btn[class*="line"] { + background-color: initial; +} + +.cu-btn[class*="line"]::after { + border: 1rpx solid; + border-radius: 12rpx; + box-sizing: border-box; + content: " "; + display: block; + height: 200%; + left: 0; + pointer-events: none; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; + z-index: 1; +} + +.cu-btn.foot { + box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, .1); + z-index: 1024; +} + +.cu-btn.foot, +.foot { + bottom: 0; + position: fixed; + width: 100%; +} + +.foot { + z-index: 10; +} + +.cu-btn.round[class*="line"]::after { + border-radius: 1000rpx; +} + +.cu-btn.radius[class*="line"]::after { + border-radius: 10rpx; +} + +.cu-btn[class*="lines"]::after { + border: 6rpx solid; +} + +.cu-btn[class*="bg-"]::after { + display: none; +} + +.cu-btn.sm { + font-size: 20rpx; + height: 48rpx; + padding: 0 20rpx; +} + +.cu-btn.lg { + font-size: 32rpx; + height: 80rpx; + padding: 0 40rpx; +} + +.cu-btn.icon.sm { + height: 48rpx; + width: 48rpx; +} + +.cu-btn.icon { + border-radius: 500rpx; + height: 64rpx; + padding: 0; + width: 64rpx; +} + +button.icon.lg { + height: 80rpx; + width: 80rpx; +} + +.image-32 { + height: 64rpx; + width: 64rpx; +} + +.image-64 { + height: 128rpx; + width: 128rpx; +} + +.cu-btn.shadow-blur::before { + filter: blur(6rpx); + left: 4rpx; + opacity: .6; + top: 4rpx; +} + +.cu-btn.button-hover { + transform: translate(1rpx, 1rpx); +} + +.block { + display: block; +} + +.cu-btn.block { + display: flex; +} + +.cu-btn[disabled] { + color: var(--white); + opacity: .6; +} + +.cu-tag { + align-items: center; + box-sizing: border-box; + display: inline-flex; + font-family: Helvetica Neue, Helvetica, sans-serif; + height: 48rpx; + justify-content: center; + padding: 0rpx 16rpx; + position: relative; + vertical-align: middle; + white-space: nowrap; +} + +.cu-tag:not([class*="bg"]):not([class*="line"]) { + background-color: var(--ghostWhite); +} + +.cu-tag[class*="line-"]::after { + border: 1rpx solid; + border-radius: inherit; + box-sizing: border-box; + content: " "; + height: 200%; + left: 0; + pointer-events: none; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; + z-index: 1; +} + +.cu-tag.radius[class*="line"]::after { + border-radius: 12rpx; +} + +.cu-tag.round[class*="line"]::after { + border-radius: 1000rpx; +} + +.cu-tag[class*="line-"]::after { + border-radius: 0; +} + +.cu-tag+.cu-tag { + margin-left: 10rpx; +} + +.cu-tag.sm { + font-size: 20rpx; + height: 32rpx; + padding: 0rpx 12rpx; +} + +.cu-tag.lg { + font-size: 24rpx; + height: 20px; + padding: 0rpx 12rpx; +} + +.cu-capsule { + display: inline-flex; + vertical-align: middle; +} + +.cu-capsule+.cu-capsule { + margin-left: 0rpx; +} + +.cu-capsule .cu-tag { + margin: 0; +} + +.cu-capsule .cu-tag[class*="line-"]:last-child::after { + border-left: 0rpx solid transparent; +} + +.cu-capsule .cu-tag[class*="line-"]:first-child::after { + border-right: 0rpx solid transparent; +} + +.cu-capsule.radius .cu-tag:first-child { + border-bottom-left-radius: 6rpx; + border-top-left-radius: 6rpx; +} + +.cu-capsule.radius .cu-tag:last-child::after, +.cu-capsule.radius .cu-tag[class*="line-"] { + border-bottom-right-radius: 12rpx; + border-top-right-radius: 12rpx; +} + +.cu-capsule.round .cu-tag:first-child { + border-bottom-left-radius: 200rpx; + border-top-left-radius: 200rpx; + text-indent: 4rpx; +} + +.cu-capsule.round .cu-tag:last-child, +.cu-capsule.round .cu-tag:last-child::after { + border-bottom-right-radius: 200rpx; + border-top-right-radius: 200rpx; + text-indent: -4rpx; +} + +.cu-tag.badge { + border-radius: 200rpx; + color: var(--white); + font-size: 20rpx; + height: 28rpx; + padding: 0rpx 10rpx; + position: absolute; + right: -10rpx; + top: -10rpx; +} + +.cu-tag.badge:not([class*="bg-"]) { + background-color: #dd514c; +} + +.cu-tag.badgegray { + border-radius: 200rpx; + color: var(--white); + font-size: 20rpx; + height: 28rpx; + padding: 0rpx 10rpx; + position: absolute; + right: -10rpx; + top: -10rpx; +} + +.cu-tag.badgegray:not([class*="bg-"]) { + background-color: #555; +} + +.cu-tag:empty:not([class*="cuIcon-"]) { + height: 16rpx; + padding: 0rpx; + right: -4rpx; + top: -4rpx; + width: 16rpx; +} + +.cu-tag[class*="cuIcon-"] { + height: 32rpx; + right: -4rpx; + top: -4rpx; + width: 32rpx; +} + +.cu-avatar { + align-items: center; + background-color: #ccc; + background-position: 50%; + background-size: cover; + color: var(--white); + display: inline-flex; + font-size: 1.5em; + font-variant: small-caps; + height: 64rpx; + justify-content: center; + margin: 0; + padding: 0; + position: relative; + text-align: center; + vertical-align: middle; + white-space: nowrap; + width: 64rpx; +} + +.cu-avatar.sm { + font-size: 1em; + height: 48rpx; + width: 48rpx; +} + +.cu-avatar.lg { + font-size: 2em; + height: 96rpx; + width: 96rpx; +} + +.cu-avatar.xl { + font-size: 2.5em; + height: 128rpx; + width: 128rpx; +} + +.cu-avatar .avatar-text { + font-size: .4em; +} + +.cu-avatar-group { + direction: rtl; + display: inline-block; + padding: 0 10rpx 0 40rpx; + unicode-bidi: bidi-override; +} + +.cu-avatar-group .cu-avatar { + border: 4rpx solid var(--ghostWhite); + margin-left: -30rpx; + vertical-align: middle; +} + +.cu-avatar-group .cu-avatar.sm { + border: 1rpx solid var(--ghostWhite); + margin-left: -20rpx; +} + +.cu-progress { + align-items: center; + background-color: #ebeef5; + display: inline-flex; + height: 28rpx; + overflow: hidden; + width: 100%; +} + +.cu-progress+text, +.cu-progress+view { + line-height: 1; +} + +.cu-progress.xs { + height: 10rpx; +} + +.cu-progress.sm { + height: 20rpx; +} + +.cu-progress view { + color: var(--white); + height: 100%; + justify-content: space-around; + justify-items: flex-end; + transition: width .6s ease; + width: 0; +} + +.cu-progress text, +.cu-progress view { + align-items: center; + display: flex; + font-size: 20rpx; +} + +.cu-progress text { + color: var(--black); + text-indent: 10rpx; +} + +.cu-progress.text-progress { + padding-right: 60rpx; +} + +.cu-progress.striped view { + background-image: linear-gradient(45deg, hsla(0, 0%, 100%, .15) 25%, transparent 0, transparent 50%, hsla(0, 0%, 100%, .15) 0, hsla(0, 0%, 100%, .15) 75%, transparent 0, transparent); + background-size: 72rpx 72rpx; +} + +.cu-progress.active view { + animation: progress-stripes 2s linear infinite; +} + +@-webkit-keyframes progress-stripes { + from { + background-position: 72rpx 0; + } + + to { + background-position: 0 0; + } +} + +@keyframes progress-stripes { + from { + background-position: 72rpx 0; + } + + to { + background-position: 0 0; + } +} + +.cu-load { + display: block; + line-height: 3em; + text-align: center; +} + +.cu-load::before { + display: inline-block; + font-family: cuIcon; + margin-right: 6rpx; +} + +.cu-load.loading::before { + animation: cuIcon-spin 2s linear infinite; + content: "\e67a"; +} + +.cu-load.loading::after { + content: "加载中..."; +} + +.cu-load.over::before { + content: "\e64a"; +} + +.cu-load.over::after { + content: "没有更多了"; +} + +.cu-load.erro::before { + content: "\e658"; +} + +.cu-load.erro::after { + content: "加载失败"; +} + +.cu-load.load-icon::before { + font-size: 32rpx; +} + +.cu-load.load-icon.over, +.cu-load.load-icon::after { + display: none; +} + +.cu-load.load-modal { + align-items: center; + background-color: var(--white); + border-radius: 10rpx; + bottom: 140rpx; + box-shadow: 0 0 0rpx 2000rpx rgba(0, 0, 0, .5); + display: flex; + flex-direction: column; + font-size: 28rpx; + height: 260rpx; + justify-content: center; + left: 0; + line-height: 2.4em; + margin: auto; + position: fixed; + right: 0; + top: 0; + width: 260rpx; + z-index: 9999; +} + +.cu-load.load-modal [class*="cuIcon-"] { + font-size: 60rpx; +} + +.cu-load.load-modal image { + height: 70rpx; + width: 70rpx; +} + +.cu-load.load-modal::after { + animation: cuIcon-spin 1s linear infinite; + background-color: var(--white); + border: 6rpx solid rgba(0, 0, 0, .05); + border-left: 6rpx solid var(--orange); + border-radius: 50%; + content: ""; + font-size: 10px; + height: 200rpx; + position: absolute; + width: 200rpx; + z-index: -1; +} + +.load-progress { + left: 0; + pointer-events: none; + position: fixed; + top: 0; + width: 100%; + z-index: 2000; +} + +.load-progress.hide { + display: none; +} + +.load-progress .load-progress-bar { + height: 4rpx; + overflow: hidden; + position: relative; + transition: all .2s ease 0s; + width: 100%; +} + +.load-progress .load-progress-spinner { + display: block; + position: absolute; + right: 10rpx; + top: 10rpx; + z-index: 2000; +} + +.load-progress .load-progress-spinner::after { + animation: load-progress-spinner .4s linear infinite; + border: 4rpx solid transparent; + border-left-color: inherit; + border-radius: 50%; + border-top-color: inherit; + box-sizing: border-box; + content: ""; + display: block; + height: 24rpx; + width: 24rpx; +} + +@-webkit-keyframes load-progress-spinner { + 0% { + transform: rotate(0); + } + + 100% { + transform: rotate(1turn); + } +} + +@keyframes load-progress-spinner { + 0% { + transform: rotate(0); + } + + 100% { + transform: rotate(1turn); + } +} + +.grayscale { + filter: grayscale(1); +} + +.cu-list>.cu-item { + transform: translateX(0rpx); + transition: all .6s ease-in-out 0s; +} + +.cu-list>.cu-item.move-cur { + transform: translateX(-260rpx); +} + +.cu-list>.cu-item .move { + display: flex; + height: 100%; + position: absolute; + right: 0; + transform: translateX(100%); + width: 260rpx; +} + +.cu-list>.cu-item .move view { + align-items: center; + display: flex; + flex: 1; + justify-content: center; +} + +.cu-list.menu-avatar { + overflow: hidden; +} + +.cu-list.menu-avatar>.cu-item { + align-items: center; + background-color: var(--white); + display: flex; + height: 160rpx; + justify-content: flex-end; + padding-right: 10rpx; + position: relative; +} + +.cu-list.menu-avatar>.cu-item>.cu-avatar { + left: 30rpx; + position: absolute; +} + +.cu-list.menu-avatar>.cu-item .flex .text-cut { + max-width: 510rpx; +} + +.cu-list.menu-avatar>.cu-item .content { + left: 165rpx; + line-height: 1.6em; + position: absolute; + width: calc(100% - 96rpx - 60rpx - 120rpx - 20rpx); +} + +.cu-list.menu-avatar>.cu-item .content.flex-sub { + width: calc(100% - 96rpx - 60rpx - 20rpx); +} + +.cu-list.menu-avatar>.cu-item .content>view:first-child { + align-items: center; + display: flex; + font-size: 30rpx; +} + +.cu-list.menu-avatar>.cu-item .content .cu-tag.sm { + display: inline-block; + font-size: 16rpx; + height: 28rpx; + line-height: 32rpx; + margin-left: 10rpx; +} + +.cu-list.menu-avatar>.cu-item .action { + text-align: center; + width: 120rpx; +} + +.cu-list.menu-avatar>.cu-item .action view+view { + margin-top: 10rpx; +} + +.cu-list.menu-avatar.comment>.cu-item .content { + flex: 1; + left: 0; + position: relative; + width: auto; +} + +.cu-list.menu-avatar.comment>.cu-item { + height: auto; + padding: 30rpx 30rpx 30rpx 120rpx; +} + +.cu-list.menu-avatar.comment .cu-avatar { + align-self: flex-start; +} + +.cu-list.menu>.cu-item { + align-items: center; + background-color: var(--white); + display: flex; + justify-content: space-between; + min-height: 100rpx; + padding: 0 30rpx; + position: relative; +} + +.cu-list.menu>.cu-item:last-child:after { + border: none; +} + +.border-line { + border: 1rpx solid #ddd; + border-radius: 10rpx; +} + +.cu-list.menu>.cu-item:after { + border-bottom: 1rpx solid #ddd; + border-radius: inherit; + box-sizing: border-box; + content: " "; + height: 200%; + left: 0; + pointer-events: none; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; +} + +.cu-list.menu>.cu-item.grayscale { + background-color: #f5f5f5; +} + +.cu-list.menu>.cu-item.cur { + background-color: #fcf7e9; +} + +.cu-list.menu>.cu-item.arrow { + padding-right: 90rpx; +} + +.cu-list.menu>.cu-item.arrow:before { + bottom: 0; + color: var(--grey); + content: "\e6a3"; + display: block; + font-family: cuIcon; + font-size: 34rpx; + height: 30rpx; + line-height: 30rpx; + margin: auto; + position: absolute; + right: 30rpx; + text-align: center; + top: 0; + width: 30rpx; +} + +.cu-list.menu>.cu-item button.content { + background-color: initial; + justify-content: flex-start; + padding: 0; +} + +.cu-list.menu>.cu-item button.content:after { + display: none; +} + +.cu-list.menu>.cu-item .cu-avatar-group .cu-avatar { + border-color: var(--white); +} + +.cu-list.menu>.cu-item .content>view:first-child { + align-items: center; + display: flex; +} + +.cu-list.menu>.cu-item .content>text[class*=cuIcon] { + display: inline-block; + margin-right: 10rpx; + text-align: center; + width: 1.6em; +} + +.cu-list.menu>.cu-item .content>image { + display: inline-block; + height: 1.6em; + margin-right: 10rpx; + vertical-align: middle; + width: 1.6em; +} + +.cu-list.menu>.cu-item .content { + flex: 1; + font-size: 30rpx; + line-height: 1.6em; +} + +.cu-list.menu>.cu-item .content .cu-tag.sm { + display: inline-block; + font-size: 16rpx; + height: 28rpx; + line-height: 32rpx; + margin-left: 10rpx; +} + +.cu-list.menu>.cu-item .action .cu-tag:empty { + right: 10rpx; +} + +.cu-list.menu { + display: block; + overflow: hidden; +} + +.cu-list.menu.sm-border>.cu-item:after { + left: 30rpx; + width: calc(200% - 120rpx); +} + +.cu-list.grid>.cu-item { + display: flex; + flex-direction: column; + padding: 20rpx 0 30rpx; + position: relative; + transition-duration: 0s; +} + +.cu-list.grid>.cu-item:after { + border-bottom: 1px solid rgba(0, 0, 0, .1); + border-radius: inherit; + border-right: 1px solid rgba(0, 0, 0, .1); + box-sizing: border-box; + content: " "; + height: 200%; + left: 0; + pointer-events: none; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; +} + +.cu-list.grid>.cu-item text { + color: #888; + display: block; + font-size: 26rpx; + line-height: 40rpx; + margin-top: 10rpx; +} + +.cu-list.grid>.cu-item [class*=cuIcon] { + display: block; + font-size: 48rpx; + margin-top: 20rpx; + position: relative; + width: 100%; +} + +.cu-list.grid>.cu-item .cu-tag { + left: 50%; + margin-left: 20rpx; + right: auto; +} + +.cu-list.grid { + background-color: var(--white); + text-align: center; +} + +.cu-list.grid.no-border>.cu-item { + padding-bottom: 20rpx; + padding-top: 10rpx; +} + +.cu-list.grid.no-border>.cu-item:after { + border: none; +} + +.cu-list.grid.no-border { + padding: 0rpx 20rpx; +} + +.cu-list.grid.col-3>.cu-item:nth-child(3n):after, +.cu-list.grid.col-4>.cu-item:nth-child(4n):after, +.cu-list.grid.col-5>.cu-item:nth-child(5n):after { + border-right-width: 0; +} + +.cu-list.card-menu { + border-radius: 5rpx; + margin-left: 15rpx; + margin-right: 15rpx; + overflow: hidden; +} + +.cu-bar { + justify-content: space-between; + min-height: 60rpx; + position: relative; +} + +.cu-bar, +.cu-bar .action { + align-items: center; + display: flex; +} + +.cu-bar .action { + height: 100%; + justify-content: center; + max-width: 100%; +} + +.cu-bar .action.border-title { + position: relative; + top: -10rpx; +} + +.cu-bar .action.border-title text[class*="bg-"]:last-child { + bottom: -.5rem; + height: 6rpx; + left: 0; + min-width: 2rem; + position: absolute; +} + +.cu-bar .action.sub-title { + position: relative; + top: -.2rem; +} + +.cu-bar .action.sub-title text { + position: relative; + z-index: 1; +} + +.cu-bar .action.sub-title text[class*="bg-"]:last-child { + border-radius: 6rpx; + bottom: -.2rem; + display: inline-block; + height: .6rem; + left: .6rem; + opacity: .3; + position: absolute; + width: 100%; + z-index: 0; +} + +.cu-bar .action.sub-title text[class*="text-"]:last-child { + bottom: -.7rem; + display: inline-block; + font-size: 36rpx; + font-weight: 900; + left: .5rem; + opacity: .2; + position: absolute; + text-align: right; + z-index: 0; +} + +.cu-bar.justify-center .action.border-title text:last-child, +.cu-bar.justify-center .action.sub-title text:last-child { + left: 0; + margin: auto; + right: 0; + text-align: center; +} + +.cu-bar .action:first-child { + font-size: 30rpx; + margin-left: 20rpx; +} + +.cu-bar .action text.text-cut { + text-align: left; + width: 100%; +} + +.cu-bar .cu-avatar:first-child { + margin-left: 20rpx; +} + +.cu-bar .action:first-child>text[class*="cuIcon-"] { + margin-left: -.3em; + margin-right: .3em; +} + +.cu-bar .action:last-child { + margin-right: 30rpx; +} + +.cu-bar .action>text[class*="cuIcon-"], +.cu-bar .action>view[class*="cuIcon-"] { + font-size: 36rpx; +} + +.cu-bar .action>text[class*="cuIcon-"]+text[class*="cuIcon-"] { + margin-left: .5em; +} + +.cu-bar .content { + bottom: 0; + cursor: none; + font-size: 32rpx; + height: 60rpx; + left: 0; + line-height: 60rpx; + margin: auto; + overflow: hidden; + position: absolute; + right: 0; + text-align: center; + text-overflow: ellipsis; + top: 0; + white-space: nowrap; + width: calc(100% - 340rpx); +} + +.cu-bar.ios .content { + bottom: 7px; + font-size: 32rpx; + height: 30px; + line-height: 30px; +} + +.cu-bar.btn-group { + justify-content: space-around; +} + +.cu-bar.btn-group button { + flex: 1; + margin: 0 20rpx; + max-width: 50%; + padding: 20rpx 32rpx; +} + +.cu-bar .search-form { + align-items: center; + background-color: #f5f5f5; + color: var(--black); + display: flex; + flex: 1; + font-size: 24rpx; + height: 64rpx; + line-height: 64rpx; + margin: 0 30rpx; +} + +.cu-bar .search-form+.action { + margin-right: 30rpx; +} + +.cu-bar .search-form input { + background-color: initial; + flex: 1; + font-size: 26rpx; + height: 64rpx; + line-height: 64rpx; + padding-right: 30rpx; +} + +.cu-bar .search-form [class*="cuIcon-"] { + margin: 0 .5em 0 .8em; +} + +.cu-bar .search-form [class*="cuIcon-"]::before { + top: 0rpx; +} + +.cu-bar.fixed, +.nav.fixed { + box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, .1); + position: fixed; + top: 0; + width: 100%; + z-index: 1024; +} + +.cu-bar.foot { + bottom: 0; + box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, .1); + position: fixed; + width: 100%; + z-index: 1024; +} + +.cu-bar.tabbar { + padding: 0 0 calc(env(safe-area-inset-bottom) / 2); +} + +.cu-bar.tabbar, +.cu-tabbar-height { + height: calc(100rpx + env(safe-area-inset-bottom) / 2); +} + +.cu-tabbar-height { + min-height: 100rpx; +} + +.cu-bar.tabbar.shadow { + box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, .1); +} + +.cu-bar.tabbar .action { + display: block; + flex: 1; + font-size: 22rpx; + height: auto; + line-height: 1; + margin: 0; + overflow: initial; + padding: 0; + position: relative; + text-align: center; +} + +.cu-bar.tabbar.shop .action { + flex: initial; + width: 140rpx; +} + +.cu-bar.tabbar .action.add-action { + background-color: inherit; + padding-top: 50rpx; + position: relative; + z-index: 2; +} + +.cu-bar.tabbar .action.add-action [class*="cuIcon-"] { + border-radius: 50%; + font-size: 50rpx; + height: 70rpx; + left: 0; + line-height: 70rpx; + margin: auto; + padding: 0; + position: absolute; + right: 0; + top: -35rpx; + width: 70rpx; + z-index: 2; +} + +.cu-bar.tabbar .action.add-action::after { + border-radius: 50rpx; + box-shadow: 0 -3rpx 8rpx rgba(0, 0, 0, .08); + height: 100rpx; + top: -50rpx; + z-index: 0; +} + +.cu-bar.tabbar .action.add-action::after, +.cu-bar.tabbar .action.add-action::before { + background-color: inherit; + content: ""; + left: 0; + margin: auto; + position: absolute; + right: 0; + width: 100rpx; +} + +.cu-bar.tabbar .action.add-action::before { + bottom: 30rpx; + height: 30rpx; + z-index: 1; +} + +.cu-bar.tabbar .btn-group { + align-items: center; + display: flex; + flex: 1; + justify-content: space-around; + padding: 0 10rpx; +} + +.cu-bar.tabbar button.action::after { + border: 0; +} + +.cu-bar.tabbar .action [class*="cuIcon-"] { + display: block; + font-size: 40rpx; + height: auto; + margin: 0 auto 10rpx; + position: relative; + text-align: center; + width: 100rpx; +} + +.cu-bar.tabbar .action .cuIcon-cu-image { + margin: 0 auto; +} + +.cu-bar.tabbar .action .cuIcon-cu-image image { + display: inline-block; + height: 50rpx; + width: 50rpx; +} + +.cu-bar.tabbar .submit { + align-items: center; + align-self: stretch; + display: flex; + flex: 2; + justify-content: center; + position: relative; + text-align: center; +} + +.cu-bar.tabbar .submit:last-child { + flex: 2.6; +} + +.cu-bar.tabbar .submit+.submit { + flex: 2; +} + +.cu-bar.tabbar.border .action::before { + border-right: 1rpx solid rgba(0, 0, 0, .1); + content: " "; + height: 200%; + left: 0; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; + z-index: 3; +} + +.cu-bar.tabbar.border .action:last-child:before { + display: none; +} + +.cu-bar.input { + background-color: var(--white); + padding-right: 20rpx; +} + +.cu-bar.input input { + flex: 1; + font-size: 30rpx; + height: 64rpx; + line-height: 64rpx; + margin: 0 20rpx; + min-height: 64rpx; + overflow: initial; +} + +.cu-bar.input .action { + margin-left: 20rpx; +} + +.cu-bar.input .action [class*="cuIcon-"] { + font-size: 48rpx; +} + +.cu-bar.input input+.action { + margin-left: 0rpx; + margin-right: 20rpx; +} + +.cu-bar.input .action:first-child [class*="cuIcon-"] { + margin-left: 0rpx; +} + +.cu-custom { + display: block; + position: relative; +} + +.cu-custom .cu-bar .content { + width: calc(100% - 440rpx); +} + +.cu-custom .cu-bar .content image { + height: 60rpx; + width: 240rpx; +} + +.cu-custom .cu-bar { + box-shadow: 0rpx 0rpx 0rpx; + min-height: 0; + padding-right: 220rpx; + z-index: 9999; +} + +.cu-custom .cu-bar .border-custom { + background: rgba(0, 0, 0, .15); + border-radius: 1000rpx; + height: 30px; + position: relative; +} + +.cu-custom .cu-bar .border-custom::after { + border: 1rpx solid var(--white); + border-radius: inherit; + height: 200%; + opacity: .5; + top: 0; + width: 200%; +} + +.cu-custom .cu-bar .border-custom::after, +.cu-custom .cu-bar .border-custom::before { + box-sizing: border-box; + content: " "; + left: 0; + pointer-events: none; + position: absolute; + transform: scale(.5); + transform-origin: 0 0; +} + +.cu-custom .cu-bar .border-custom::before { + background-color: var(--white); + height: 110%; + margin: auto; + opacity: .6; + right: 0; + top: 22.5%; + width: 1rpx; +} + +.cu-custom .cu-bar .border-custom text { + display: block; + flex: 1; + font-size: 34rpx; + margin: auto !important; + text-align: center; +} + +.nav { + white-space: nowrap; +} + +::-webkit-scrollbar { + display: none; +} + +.nav .cu-item { + display: inline-block; + height: 90rpx; + line-height: 90rpx; + margin: 0 10rpx; + padding: 0 20rpx; +} + +.nav .cu-item.cur { + border-bottom: 4rpx solid; +} + +.cu-timeline { + background-color: var(--white); + display: block; +} + +.cu-timeline .cu-time { + color: #888; + display: block; + font-size: 26rpx; + padding: 20rpx 0; + text-align: center; + width: 120rpx; +} + +.cu-timeline>.cu-item { + display: block; + padding: 30rpx 30rpx 30rpx 120rpx; + position: relative; + z-index: 0; +} + +.cu-timeline>.cu-item:not([class*="text-"]) { + color: #ccc; +} + +.cu-timeline>.cu-item::after { + background-color: #ddd; + content: ""; + display: block; + height: 100%; + left: 60rpx; + position: absolute; + top: 0; + width: 1rpx; + z-index: 8; +} + +.cu-timeline>.cu-item::before { + background-color: var(--white); + border: none; + display: block; + font-family: cuIcon; + height: 50rpx; + left: 36rpx; + line-height: 50rpx; + position: absolute; + text-align: center; + top: 36rpx; + width: 50rpx; + z-index: 9; +} + +.cu-timeline>.cu-item:not([class*="cuIcon-"])::before { + content: "\e763"; +} + +.cu-timeline>.cu-item[class*="cuIcon-"]::before { + background-color: var(--white); + border: none; + height: 50rpx; + left: 36rpx; + line-height: 50rpx; + text-align: center; + width: 50rpx; +} + +.cu-timeline>.cu-item>.content { + border-radius: 6rpx; + display: block; + line-height: 1.6; + padding: 30rpx; +} + +.cu-timeline>.cu-item>.content:not([class*="bg-"]) { + background-color: var(--ghostWhite); + color: var(--black); +} + +.cu-timeline>.cu-item>.content+.content { + margin-top: 20rpx; +} + +.cu-chat { + flex-direction: column; +} + +.cu-chat, +.cu-chat .cu-item { + display: flex; +} + +.cu-chat .cu-item { + padding: 30rpx 30rpx 70rpx; + position: relative; +} + +.cu-chat .cu-item>.cu-avatar { + height: 80rpx; + width: 80rpx; +} + +.cu-chat .cu-item>.main { + align-items: center; + display: flex; + margin: 0 40rpx; + max-width: calc(100% - 260rpx); +} + +.cu-chat .cu-item>image { + height: 320rpx; +} + +.cu-chat .cu-item>.main .content { + align-items: center; + border-radius: 6rpx; + display: inline-flex; + font-size: 30rpx; + line-height: 40rpx; + max-width: 100%; + min-height: 80rpx; + padding: 20rpx; + position: relative; + text-align: left; +} + +.cu-chat .cu-item>.main .content:not([class*="bg-"]) { + background-color: var(--white); + color: var(--black); +} + +.cu-chat .cu-item .date { + bottom: 20rpx; + color: var(--grey); + font-size: 24rpx; + left: 160rpx; + position: absolute; + width: calc(100% - 320rpx); +} + +.cu-chat .cu-item .action { + align-items: center; + display: flex; + padding: 0 30rpx; +} + +.cu-chat .cu-item>.main .content::after { + background-color: inherit; + content: ""; + display: inline-block; + height: 24rpx; + left: -12rpx; + overflow: hidden; + position: absolute; + right: auto; + top: 27rpx; + transform: rotate(45deg); + width: 24rpx; + z-index: 100; +} + +.cu-chat .cu-item.self>.main .content::after { + left: auto; + right: -12rpx; +} + +.cu-chat .cu-item>.main .content::before { + background-color: inherit; + content: ""; + display: inline-block; + filter: blur(5rpx); + height: 24rpx; + left: -12rpx; + opacity: .3; + overflow: hidden; + position: absolute; + right: auto; + top: 30rpx; + transform: rotate(45deg); + width: 24rpx; + z-index: -1; +} + +.cu-chat .cu-item>.main .content:not([class*="bg-"])::before { + background-color: var(--black); + opacity: .1; +} + +.cu-chat .cu-item.self>.main .content::before { + left: auto; + right: -12rpx; +} + +.cu-chat .cu-item.self { + justify-content: flex-end; + text-align: right; +} + +.cu-chat .cu-info { + background-color: rgba(0, 0, 0, .2); + border-radius: 6rpx; + color: var(--white); + display: inline-block; + font-size: 24rpx; + line-height: 1.4; + margin: 20rpx auto; + max-width: 400rpx; + padding: 8rpx 12rpx; +} + +.cu-card, +.cu-card>.cu-item { + display: block; + overflow: hidden; +} + +.cu-card>.cu-item { + background-color: var(--white); + border-radius: 10rpx; + margin: 10rpx; +} + +.cu-card>.cu-item.shadow-blur { + overflow: initial; +} + +.cu-card.no-card>.cu-item { + border-radius: 0rpx; + margin: 0rpx; +} + +.cu-card .grid.grid-square { + margin-bottom: -20rpx; +} + +.cu-card.case .image { + position: relative; +} + +.cu-card.case .image image { + width: 100%; +} + +.cu-card.case .image .cu-tag { + left: 0; + position: absolute; + top: 0; +} + +.cu-card.case .image .cu-bar { + background-color: initial; + bottom: 0; + padding: 0rpx 30rpx; + position: absolute; + width: 100%; +} + +.cu-card.case.no-card .image { + border-radius: 10rpx; + margin: 30rpx 30rpx 0; + overflow: hidden; +} + +.cu-card.dynamic { + display: block; +} + +.cu-card.dynamic>.cu-item { + background-color: var(--white); + display: block; + overflow: hidden; +} + +.cu-card.dynamic>.cu-item>.text-content { + font-size: 30rpx; + margin-bottom: 20rpx; + max-height: 6.4em; + overflow: hidden; + padding: 0 30rpx; +} + +.cu-card.dynamic>.cu-item .square-img { + border-radius: 6rpx; + height: 200rpx; + width: 100%; +} + +.cu-card.dynamic>.cu-item .only-img { + border-radius: 6rpx; + height: 320rpx; + width: 100%; +} + +.cu-card.article { + display: block; +} + +.cu-card.article>.cu-item { + padding-bottom: 30rpx; +} + +.cu-card.article>.cu-item .title { + color: var(--black); + font-size: 30rpx; + font-weight: 900; + line-height: 100rpx; + padding: 0 30rpx; +} + +.cu-card.article>.cu-item .content { + display: flex; + padding: 0 30rpx; +} + +.cu-card.article>.cu-item .content>image { + border-radius: 6rpx; + height: 8.4em; + margin-right: 20rpx; + width: 240rpx; +} + +.cu-card.article>.cu-item .content .desc { + display: flex; + flex: 1; + flex-direction: column; + justify-content: space-between; +} + +.cu-card.article>.cu-item .content .text-content { + color: #888; + font-size: 28rpx; + height: 4.8em; + overflow: hidden; +} + +.cu-form-group { + align-items: center; + background-color: var(--white); + display: flex; + justify-content: space-between; + width: 100%; +} + +.cu-form-group+.cu-form-group { + border-top: 1rpx solid #eee; +} + +.cu-form-group .title { + font-size: 32rpx; + padding-right: 20rpx; + position: relative; + text-align: justify; +} + +.cu-form-group .title-right { + text-align: right; +} + +.cu-form-group .title-left, +.cu-form-group .title-right { + font-size: 30rpx; + height: 60rpx; + line-height: 60rpx; + padding-right: 20rpx; + position: relative; +} + +.cu-form-group .title-left { + text-align: left; +} + +.cu-form-group input { + color: #555; + flex: 1; + font-size: 30rpx; + padding-right: 20rpx; +} + +.cu-form-group .content { + color: #000; +} + +.cu-form-group .content, +.cu-form-group .content-red { + flex: 1; + font-size: 30rpx; + padding-right: 20rpx; + text-align: right; +} + +.cu-form-group .content-red { + color: red; +} + +.cu-form-group .content-left { + color: #000; + flex: 1; + font-size: 30rpx; + padding-right: 20rpx; + text-align: left; +} + +.cu-form-group>text[class*="cuIcon-"] { + box-sizing: border-box; + font-size: 36rpx; + padding: 0; +} + +.cu-form-group textarea { + flex: 1; + font-size: 28rpx; + height: 10em; + line-height: 1.2em; + margin: 0rpx; + padding: 15rpx; + width: 100%; +} + +.cu-form-group.align-start .title { + height: 1em; + line-height: 1em; + margin-top: 32rpx; +} + +.cu-form-group picker { + flex: 1; + overflow: hidden; + padding-right: 40rpx; + position: relative; +} + +.cu-form-group picker .picker { + font-size: 32rpx; + text-align: right; +} + +.cu-form-group picker .picker, +.cu-form-group picker .picker-left { + line-height: 60rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; +} + +.cu-form-group picker .picker-left { + font-size: 28rpx; + text-align: left; +} + +.cu-form-group picker::after { + bottom: 0; + color: var(--grey); + content: "\e6a3"; + display: block; + font-family: cuIcon; + font-size: 34rpx; + line-height: 60rpx; + margin: auto; + position: absolute; + right: -20rpx; + text-align: center; + top: 0; + width: 60rpx; +} + +.cu-form-group textarea[disabled], +.cu-form-group textarea[disabled] .placeholder { + color: transparent; +} + +.cu-modal { + backface-visibility: hidden; + background: rgba(0, 0, 0, .6); + bottom: 0; + left: 0; + opacity: 0; + outline: 0; + perspective: 2000rpx; + pointer-events: none; + position: fixed; + right: 0; + text-align: center; + top: 0; + transform: scale(1.185); + transition: all .3s ease-in-out 0s; + z-index: 1110; +} + +.cu-modal::before { + content: "\200B"; + display: inline-block; + height: 100%; + vertical-align: middle; +} + +.cu-modal.show { + opacity: 1; + overflow-x: hidden; + overflow-y: auto; + pointer-events: auto; + transform: scale(1); + transition-duration: .3s; +} + +.cu-dialog { + background-color: #f8f8f8; + border-radius: 10rpx; + display: inline-block; + margin-left: auto; + margin-right: auto; + max-width: 100%; + overflow: hidden; + position: relative; + vertical-align: middle; + width: 680rpx; +} + +.cu-modal.bottom-modal::before { + vertical-align: bottom; +} + +.cu-modal.bottom-modal .cu-dialog { + border-radius: 0; + width: 100%; +} + +.cu-modal.bottom-modal { + margin-bottom: -1000rpx; +} + +.cu-modal.bottom-modal.show { + margin-bottom: 0; +} + +.cu-modal.drawer-modal { + display: flex; + transform: scale(1); +} + +.cu-modal.drawer-modal .cu-dialog { + border-radius: 0; + height: 100%; + margin: initial; + min-width: 200rpx; + transition-duration: .3s; +} + +.cu-modal.drawer-modal.justify-start .cu-dialog { + transform: translateX(-100%); +} + +.cu-modal.drawer-modal.justify-end .cu-dialog { + transform: translateX(100%); +} + +.cu-modal.drawer-modal.show .cu-dialog { + transform: translateX(0); +} + +.cu-modal .cu-dialog>.cu-bar:first-child .action { + margin-right: 0; + min-height: 100rpx; + min-width: 100rpx; +} + +swiper .a-swiper-dot { + background: rgba(0, 0, 0, .3); + border-radius: 50%; + display: inline-block; + height: 16rpx; + vertical-align: middle; + width: 16rpx; +} + +swiper[class*="-dot"] .wx-swiper-dots { + align-items: center; + display: flex; + justify-content: center; + width: 100%; +} + +swiper.square-dot .wx-swiper-dot { + background-color: var(--white); + border-radius: 20rpx; + height: 10rpx; + margin: 0 8rpx !important; + opacity: .4; + width: 10rpx; +} + +swiper.square-dot .wx-swiper-dot.wx-swiper-dot-active { + opacity: 1; + width: 30rpx; +} + +swiper.round-dot .wx-swiper-dot { + height: 10rpx; + margin: 4rpx 8rpx !important; + position: relative; + width: 10rpx; +} + +swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active::after { + background-color: var(--white); + border-radius: 20rpx; + bottom: 0; + content: ""; + height: 10rpx; + left: 0rpx; + margin: auto; + position: absolute; + right: 0; + top: 0rpx; + width: 10rpx; +} + +swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active { + height: 18rpx; + width: 18rpx; +} + +.screen-swiper { + min-height: 375rpx; +} + +.screen-swiper-lg { + min-height: 245rpx; +} + +.screen-swiper.xl { + height: 600rpx; +} + +.screen-swiper image, +.screen-swiper video, +.swiper-item image, +.swiper-item video { + display: block; + height: 100%; + margin: 0; + pointer-events: none; + width: 100%; +} + +.card-swiper { + height: 420rpx !important; +} + +.card-swiper swiper-item { + box-sizing: border-box; + left: 70rpx; + overflow: initial; + padding: 40rpx 0rpx 70rpx; + width: 610rpx !important; +} + +.card-swiper swiper-item .swiper-item { + border-radius: 10rpx; + display: block; + height: 100%; + overflow: hidden; + transform: scale(.9); + transition: all .2s ease-in 0s; + width: 100%; +} + +.card-swiper swiper-item.cur .swiper-item { + transform: none; + transition: all .2s ease-in 0s; +} + +.tower-swiper { + height: 420rpx; + max-width: 750rpx; + overflow: hidden; + position: relative; +} + +.tower-swiper .tower-item { + bottom: 0; + height: 380rpx; + left: 50%; + margin: auto; + opacity: 1; + position: absolute; + top: 0; + transition: all .2s ease-in 0s; + width: 300rpx; +} + +.tower-swiper .tower-item.none { + opacity: 0; +} + +.tower-swiper .tower-item .swiper-item { + border-radius: 6rpx; + height: 100%; + overflow: hidden; + width: 100%; +} + +.cu-steps { + display: flex; +} + +scroll-view.cu-steps { + display: block; + white-space: nowrap; +} + +scroll-view.cu-steps .cu-item { + display: inline-block; +} + +.cu-steps .cu-item { + flex: 1; + min-width: 100rpx; + position: relative; + text-align: center; +} + +.cu-steps .cu-item:not([class*="text-"]) { + color: var(--grey); +} + +.cu-steps .cu-item .num, +.cu-steps .cu-item [class*="cuIcon-"] { + display: block; + font-size: 40rpx; + line-height: 80rpx; +} + +.cu-steps .cu-item::after, +.cu-steps .cu-item::before, +.cu-steps.steps-arrow .cu-item::after, +.cu-steps.steps-arrow .cu-item::before { + border-bottom: 1px solid #ccc; + content: ""; + display: block; + height: 0; + left: calc(0px - (100% - 80rpx) / 2); + position: absolute; + top: 40rpx; + width: calc(100% - 80rpx); + z-index: 0; +} + +.cu-steps.steps-arrow .cu-item::after, +.cu-steps.steps-arrow .cu-item::before { + border-bottom-width: 0; + bottom: 0; + color: #ccc; + content: "\e6a3"; + font-family: cuIcon; + height: 30rpx; + line-height: 30rpx; + margin: auto; + top: 0; +} + +.cu-steps.steps-bottom .cu-item::after, +.cu-steps.steps-bottom .cu-item::before { + bottom: 40rpx; + top: auto; +} + +.cu-steps .cu-item::after { + border-bottom: 1px solid; + transition: all .3s ease-in-out 0s; + width: 0; +} + +.cu-steps .cu-item[class*="text-"]::after { + color: currentColor; + width: calc(100% - 80rpx); +} + +.cu-steps .cu-item:first-child::after, +.cu-steps .cu-item:first-child::before { + display: none; +} + +.cu-steps .cu-item .num { + border: 1px solid; + border-radius: 50%; + font-size: 24rpx; + height: 40rpx; + line-height: 40rpx; + margin: 20rpx auto; + overflow: hidden; + position: relative; + width: 40rpx; +} + +.cu-steps .cu-item[class*="text-"] .num { + background-color: currentColor; +} + +.cu-steps .cu-item .num::after, +.cu-steps .cu-item .num::before { + bottom: 0; + content: attr(data-index); + left: 0; + margin: auto; + position: absolute; + right: 0; + top: 0; + transform: translateY(0rpx); + transition: all .3s ease-in-out 0s; +} + +.cu-steps .cu-item[class*="text-"] .num::before { + color: var(--white); + transform: translateY(-40rpx); +} + +.cu-steps .cu-item .num::after { + color: var(--white); + transform: translateY(40rpx); + transition: all .3s ease-in-out 0s; +} + +.cu-steps .cu-item[class*="text-"] .num::after { + color: var(--white); + content: "\e645"; + font-family: cuIcon; + transform: translateY(0rpx); +} + +.cu-steps .cu-item[class*="text-"] .num.err::after { + content: "\e646"; +} + +.flex { + display: flex; +} + +.basis-xs { + flex-basis: 20%; +} + +.basis-sm { + flex-basis: 40%; +} + +.basis-df { + flex-basis: 50%; +} + +.basis-lg { + flex-basis: 60%; +} + +.basis-xl { + flex-basis: 80%; +} + +.flex-sub { + flex: 1; +} + +.flex-twice { + flex: 2; +} + +.flex-treble { + flex: 3; +} + +.flex-direction { + flex-direction: column; +} + +.flex-wrap { + flex-wrap: wrap; +} + +.flex-nowrap { + flex-wrap: nowrap; +} + +.align-start { + align-items: flex-start; +} + +.align-end { + align-items: flex-end; +} + +.align-center { + align-items: center; +} + +.self-start { + align-self: flex-start; +} + +.self-center { + align-self: flex-center; +} + +.selfcenter { + align-self: center; +} + +.self-end { + align-self: flex-end; +} + +.self-stretch { + align-self: stretch; +} + +.align-stretch { + align-items: stretch; +} + +.justify-start { + justify-content: flex-start; +} + +.justify-end { + justify-content: flex-end; +} + +.justify-center { + justify-content: center; +} + +.justify-between { + justify-content: space-between; +} + +.justify-around { + justify-content: space-around; +} + +.grid { + display: flex; + flex-wrap: wrap; +} + +.grid.grid-square { + overflow: hidden; +} + +.grid.grid-square .cu-tag { + background-color: rgba(0, 0, 0, .5); + border-bottom-left-radius: 6rpx; + height: auto; + padding: 6rpx 12rpx; + position: absolute; + right: 0; + top: 0; +} + +.grid.grid-square>view>text[class*="cuIcon-"] { + align-items: center; + bottom: 0; + color: var(--grey); + display: flex; + flex-direction: column; + font-size: 52rpx; + justify-content: center; + left: 0; + margin: auto; + position: absolute; + right: 0; + top: 0; +} + +.grid.grid-square>view { + border-radius: 6rpx; + margin-right: 15rpx; + overflow: hidden; + position: relative; +} + +.grid.grid-square>view.bg-img image { + height: 100%; + position: absolute; + width: 100%; +} + +.grid.col-1.grid-square>view { + height: 0; + margin-right: 0; + padding-bottom: 100%; +} + +.grid.col-2.grid-square>view { + height: 0; + padding-bottom: calc((100% - 20rpx)/2); + width: calc((100% - 20rpx)/2); +} + +.grid.col-3.grid-square>view { + height: 0; + padding-bottom: calc((100% - 30rpx)/3); + width: calc((100% - 30rpx)/3); +} + +.grid.col-4.grid-square>view { + height: 0; + padding-bottom: calc((100% - 60rpx)/4); + width: calc((100% - 60rpx)/4); +} + +.grid.col-5.grid-square>view { + height: 0; + padding-bottom: calc((100% - 80rpx)/5); + width: calc((100% - 80rpx)/5); +} + +.grid.col-2.grid-square>view:nth-child(2n), +.grid.col-3.grid-square>view:nth-child(3n), +.grid.col-4.grid-square>view:nth-child(4n), +.grid.col-5.grid-square>view:nth-child(5n) { + margin-right: 0; +} + +.grid.col-1>view { + width: 100%; +} + +.grid.col-2>view { + width: 50%; +} + +.grid.col-3>view { + width: 33.33%; +} + +.grid.col-4>view { + width: 25%; +} + +.grid.col-5>view { + width: 20%; +} + +.margin-0 { + margin: 0; +} + +.margin-xs { + margin: 10rpx; +} + +.margin-sm { + margin: 20rpx; +} + +.margin { + margin: 30rpx; +} + +.margin-lg { + margin: 40rpx; +} + +.margin-xl { + margin: 50rpx; +} + +.margin-top-ls { + margin-top: 2rpx; +} + +.margin-top-xs { + margin-top: 10rpx; +} + +.margin-top-sm { + margin-top: 20rpx; +} + +.margin-top { + margin-top: 30rpx; +} + +.margin-top-lg { + margin-top: 40rpx; +} + +.margin-top-xl { + margin-top: 50rpx; +} + +.margin-right-xs { + margin-right: 10rpx; +} + +.margin-right-sm { + margin-right: 20rpx; +} + +.margin-right { + margin-right: 30rpx; +} + +.margin-right-lg { + margin-right: 40rpx; +} + +.margin-right-xl { + margin-right: 50rpx; +} + +.margin-bottom-xs { + margin-bottom: 10rpx; +} + +.margin-bottom-sm { + margin-bottom: 20rpx; +} + +.margin-bottom { + margin-bottom: 30rpx; +} + +.margin-bottom-lg { + margin-bottom: 40rpx; +} + +.margin-bottom-xl { + margin-bottom: 50rpx; +} + +.margin-bottom-xxl { + margin-bottom: 80rpx; +} + +.margin-bottom-xxxl { + margin-bottom: 130rpx; +} + +.margin-left-xs { + margin-left: 10rpx; +} + +.margin-left-sm { + margin-left: 20rpx; +} + +.margin-left { + margin-left: 30rpx; +} + +.margin-left-lg { + margin-left: 40rpx; +} + +.margin-left-xl { + margin-left: 50rpx; +} + +.margin-lr-xs { + margin-left: 10rpx; + margin-right: 10rpx; +} + +.margin-lr-sm { + margin-left: 20rpx; + margin-right: 20rpx; +} + +.margin-lr { + margin-left: 30rpx; + margin-right: 30rpx; +} + +.margin-lr-lg { + margin-left: 40rpx; + margin-right: 40rpx; +} + +.margin-lr-xl { + margin-left: 50rpx; + margin-right: 50rpx; +} + +.margin-tb-xs { + margin-bottom: 10rpx; + margin-top: 10rpx; +} + +.margin-tb-sm { + margin-bottom: 20rpx; + margin-top: 20rpx; +} + +.margin-tb { + margin-bottom: 30rpx; + margin-top: 30rpx; +} + +.margin-tb-lg { + margin-bottom: 40rpx; + margin-top: 40rpx; +} + +.margin-tb-xl { + margin-bottom: 50rpx; + margin-top: 50rpx; +} + +.padding-0 { + padding: 0; +} + +.padding-xs { + padding: 10rpx; +} + +.padding-sm { + padding: 20rpx; +} + +.padding { + padding: 30rpx; +} + +.padding-lg { + padding: 40rpx; +} + +.padding-xl { + padding: 50rpx; +} + +.padding-top-xs { + padding-top: 10rpx; +} + +.padding-top-sm { + padding-top: 20rpx; +} + +.padding-top { + padding-top: 30rpx; +} + +.padding-top-lg { + padding-top: 40rpx; +} + +.padding-top-xl { + padding-top: 50rpx; +} + +.padding-right-xs { + padding-right: 10rpx; +} + +.padding-right-sm { + padding-right: 20rpx; +} + +.padding-right { + padding-right: 30rpx; +} + +.padding-right-lg { + padding-right: 40rpx; +} + +.padding-right-xl { + padding-right: 50rpx; +} + +.padding-bottom-xs { + padding-bottom: 10rpx; +} + +.padding-bottom-sm { + padding-bottom: 20rpx; +} + +.padding-bottom { + padding-bottom: 30rpx; +} + +.padding-bottom-lg { + padding-bottom: 40rpx; +} + +.padding-bottom-xl { + padding-bottom: 50rpx; +} + +.padding-bottom-xxl { + padding-bottom: 80rpx; +} + +.padding-left-xs { + padding-left: 10rpx; +} + +.padding-left-sm { + padding-left: 20rpx; +} + +.padding-left { + padding-left: 30rpx; +} + +.padding-left-lg { + padding-left: 40rpx; +} + +.padding-left-xl { + padding-left: 50rpx; +} + +.padding-lr-xs { + padding-left: 10rpx; + padding-right: 10rpx; +} + +.padding-lr-sm { + padding-left: 20rpx; + padding-right: 20rpx; +} + +.padding-lr { + padding-left: 30rpx; + padding-right: 30rpx; +} + +.padding-lr-lg { + padding-left: 40rpx; + padding-right: 40rpx; +} + +.padding-lr-xl { + padding-left: 50rpx; + padding-right: 50rpx; +} + +.padding-tb-xs { + padding-bottom: 10rpx; + padding-top: 10rpx; +} + +.padding-tb-sm { + padding-bottom: 20rpx; + padding-top: 20rpx; +} + +.padding-tb { + padding-bottom: 30rpx; + padding-top: 30rpx; +} + +.padding-tb-lg { + padding-bottom: 40rpx; + padding-top: 40rpx; +} + +.padding-tb-xl { + padding-bottom: 50rpx; + padding-top: 50rpx; +} + +.cf::after, +.cf::before { + content: " "; + display: table; +} + +.cf::after { + clear: both; +} + +.fl { + float: left; +} + +.fr { + float: right; +} + +.line-red::after, +.lines-red::after { + border-color: var(--red); +} + +.line-orange::after, +.lines-orange::after { + border-color: var(--orange); +} + +.line-yellow::after, +.lines-yellow::after { + border-color: var(--yellow); +} + +.line-olive::after, +.lines-olive::after { + border-color: var(--olive); +} + +.line-green::after, +.lines-green::after { + border-color: var(--green); +} + +.line-cyan::after, +.lines-cyan::after { + border-color: var(--cyan); +} + +.line-blue::after, +.lines-blue::after { + border-color: var(--blue); +} + +.line-purple::after, +.lines-purple::after { + border-color: var(--purple); +} + +.line-mauve::after, +.lines-mauve::after { + border-color: var(--mauve); +} + +.line-pink::after, +.lines-pink::after { + border-color: var(--pink); +} + +.line-brown::after, +.lines-brown::after { + border-color: var(--brown); +} + +.line-grey::after, +.lines-grey::after { + border-color: var(--grey); +} + +.line-gray::after, +.lines-gray::after { + border-color: var(--gray); +} + +.line-black::after, +.lines-black::after { + border-color: var(--black); +} + +.line-white::after, +.lines-white::after { + border-color: var(--white); +} + +.bg-red { + background-color: var(--red); + color: var(--white); +} + +.bg-yellowlight { + background-color: var(--yellowLight); + color: var(--white); +} + +.line-yellowlight2 { + color: var(--yellowLight); +} + +.bg-orange { + background-color: var(--orange); + color: var(--white); +} + +.bg-yellow { + background-color: var(--yellow); + color: var(--black); +} + +.bg-yellow-light { + color: var(--yellowLight); +} + +.bg-yellow-light-2 { + background-image: var(--gradualYellow2); + color: var(--white); +} + +.bg-yellow-light-1 { + background-color: var(--yellowLight); + color: var(--white); +} + +.bg-yellow-light-3 { + color: var(--yellowLight); +} + +.bg-olive { + background-color: var(--olive); + color: var(--white); +} + +.bg-green { + background-color: var(--green); + color: var(--white); +} + +.bg-cyan { + background-color: var(--cyan); +} + +.bg-blue, +.bg-cyan { + color: var(--white); +} + +.bg-blue { + background-color: var(--yellowLight); +} + +.bg-purple { + background-color: var(--purple); + color: var(--white); +} + +.bg-mauve { + background-color: var(--mauve); + color: var(--white); +} + +.bg-pink { + background-color: var(--pink); + color: var(--white); +} + +.bg-brown { + background-color: var(--brown); + color: var(--white); +} + +.bg-grey { + background-color: var(--grey); +} + +.bg-grey, +.text-color { + color: var(--white); +} + +.bg-gray { + background-color: #f0f0f0; + color: var(--black); +} + +.bg-trgray { + background-color: #f8f8f8; + color: var(--black); +} + +.bg-black { + background-color: var(--black); + color: var(--white); +} + +.bg-black-tr { + background: rgba(0, 0, 0, .4); + color: var(--white); +} + +.bg-white { + background-color: var(--white); + color: var(--darkGray); +} + +.bg-shadeTop { + background-image: linear-gradient(#000, rgba(0, 0, 0, .01)); + color: var(--white); +} + +.bg-shadeBottom { + background-image: linear-gradient(rgba(0, 0, 0, .01), #000); + color: var(--white); +} + +.bg-red.light { + background-color: var(--redLight); + color: var(--red); +} + +.bg-orange.light { + background-color: var(--orangeLight); + color: var(--orange); +} + +.bg-yellow.light { + background-color: var(--yellowLight); + color: var(--yellow); +} + +.bg-olive.light { + background-color: var(--oliveLight); + color: var(--olive); +} + +.bg-green.light { + background-color: var(--greenLight); + color: var(--green); +} + +.bg-cyan.light { + background-color: var(--cyanLight); + color: var(--cyan); +} + +.bg-blue.light { + background-color: var(--blueLight); + color: var(--blue); +} + +.bg-purple.light { + background-color: var(--purpleLight); + color: var(--purple); +} + +.bg-mauve.light { + background-color: var(--mauveLight); + color: var(--mauve); +} + +.bg-pink.light { + background-color: var(--pinkLight); + color: var(--pink); +} + +.bg-brown.light { + background-color: var(--brownLight); + color: var(--brown); +} + +.bg-grey.light { + background-color: var(--greyLight); + color: var(--grey); +} + +.bg-gradual-red { + background-image: var(--gradualRed); + color: var(--white); +} + +.bg-gradual-red-3 { + background-image: var(--gradualRed3); + color: var(--white); +} + +.bg-gradual-orange { + background-image: var(--gradualOrange); + color: var(--white); +} + +.bg-gradual-green { + background-image: var(--gradualGreen); + color: var(--white); +} + +.bg-gradual-purple { + background-image: var(--gradualPurple); + color: var(--white); +} + +.bg-gradual-pink { + background-image: var(--gradualPink); + color: var(--white); +} + +.bg-yellow-yellow { + background-image: var(--gradualYellow); + color: var(--white); +} + +.bg-red-red { + background-image: var(--gradualRed2); + color: var(--white); +} + +.bg-gradual-blue { + background-image: var(--gradualBlue); + color: var(--white); +} + +.bg-gradual-gray { + background-image: var(--gradualGray); + color: var(--white); +} + +.shadow[class*="-red"] { + box-shadow: var(--ShadowSize) var(--redShadow); +} + +.shadow[class*="-orange"] { + box-shadow: var(--ShadowSize) var(--orangeShadow); +} + +.shadow[class*="-yellow"] { + box-shadow: var(--ShadowSize) var(--yellowShadow); +} + +.shadow[class*="-olive"] { + box-shadow: var(--ShadowSize) var(--oliveShadow); +} + +.shadow[class*="-green"] { + box-shadow: var(--ShadowSize) var(--greenShadow); +} + +.shadow[class*="-cyan"] { + box-shadow: var(--ShadowSize) var(--cyanShadow); +} + +.shadow[class*="-blue"] { + box-shadow: var(--ShadowSize) var(--blueShadow); +} + +.shadow[class*="-purple"] { + box-shadow: var(--ShadowSize) var(--purpleShadow); +} + +.shadow[class*="-mauve"] { + box-shadow: var(--ShadowSize) var(--mauveShadow); +} + +.shadow[class*="-pink"] { + box-shadow: var(--ShadowSize) var(--pinkShadow); +} + +.shadow[class*="-brown"] { + box-shadow: var(--ShadowSize) var(--brownShadow); +} + +.shadow[class*="-grey"] { + box-shadow: var(--ShadowSize) var(--greyShadow); +} + +.shadow[class*="-gray"] { + box-shadow: var(--ShadowSize) var(--grayShadow); +} + +.shadow[class*="-black"], +.shadow[class*="-white"] { + box-shadow: var(--ShadowSize) var(--blackShadow); +} + +.text-shadow[class*="-red"] { + text-shadow: var(--ShadowSize) var(--redShadow); +} + +.text-shadow[class*="-orange"] { + text-shadow: var(--ShadowSize) var(--orangeShadow); +} + +.text-shadow[class*="-yellow"] { + text-shadow: var(--ShadowSize) var(--yellowShadow); +} + +.text-shadow[class*="-olive"] { + text-shadow: var(--ShadowSize) var(--oliveShadow); +} + +.text-shadow[class*="-green"] { + text-shadow: var(--ShadowSize) var(--greenShadow); +} + +.text-shadow[class*="-cyan"] { + text-shadow: var(--ShadowSize) var(--cyanShadow); +} + +.text-shadow[class*="-blue"] { + text-shadow: var(--ShadowSize) var(--blueShadow); +} + +.text-shadow[class*="-purple"] { + text-shadow: var(--ShadowSize) var(--purpleShadow); +} + +.text-shadow[class*="-mauve"] { + text-shadow: var(--ShadowSize) var(--mauveShadow); +} + +.text-shadow[class*="-pink"] { + text-shadow: var(--ShadowSize) var(--pinkShadow); +} + +.text-shadow[class*="-brown"] { + text-shadow: var(--ShadowSize) var(--brownShadow); +} + +.text-shadow[class*="-grey"] { + text-shadow: var(--ShadowSize) var(--greyShadow); +} + +.text-shadow[class*="-gray"] { + text-shadow: var(--ShadowSize) var(--grayShadow); +} + +.text-shadow[class*="-black"] { + text-shadow: var(--ShadowSize) var(--blackShadow); +} + +.bg-img { + background-position: 50%; + background-repeat: no-repeat; + background-size: cover; + margin-bottom: 15rpx; +} + +.bg-mask { + background-color: var(--black); + position: relative; +} + +.bg-mask::after { + background-color: rgba(0, 0, 0, .4); + border-radius: inherit; + bottom: 0; + content: ""; + display: block; + height: 100%; + left: 0; + position: absolute; + right: 0; + top: 0; + width: 100%; +} + +.bg-mask cover-view, +.bg-mask view { + position: relative; + z-index: 5; +} + +.bg-video { + position: relative; +} + +.bg-video video { + display: block; + height: 100%; + object-fit: cover; + pointer-events: none; + position: absolute; + top: 0; + width: 100%; + z-index: 0; +} + +.text-xs { + font-size: 20rpx; +} + +.text-sm { + font-size: 24rpx; +} + +.text-df { + font-size: 28rpx; +} + +.text-lg { + font-size: 32rpx; +} + +.text-xl { + font-size: 36rpx; +} + +.text-xxl { + font-size: 44rpx; +} + +.text-sl { + font-size: 80rpx; +} + +.text-xsl { + font-size: 120rpx; +} + +.text-Abc { + text-transform: Capitalize; +} + +.text-ABC { + text-transform: Uppercase; +} + +.text-abc { + text-transform: Lowercase; +} + +.text-price::before { + content: "¥"; + font-size: 80%; + margin-right: 4rpx; +} + +.text-cut, +.text-cut-width { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.text-cut-width { + width: 370rpx; +} + +.text-bold { + font-weight: 700; +} + +.text-center { + text-align: center; +} + +.text-content { + line-height: 1.6; +} + +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.line-red, +.lines-red, +.text-red { + color: var(--red); +} + +.line-orange, +.lines-orange, +.text-orange { + color: var(--orange); +} + +.line-yellow, +.lines-yellow, +.text-yellow { + color: var(--yellow); +} + +.line-olive, +.lines-olive, +.text-olive { + color: var(--olive); +} + +.line-green, +.lines-green, +.text-green { + color: var(--green); +} + +.line-cyan, +.lines-cyan, +.text-cyan { + color: var(--cyan); +} + +.line-blue, +.lines-blue, +.text-blue { + color: var(--blue); +} + +.line-purple, +.lines-purple, +.text-purple { + color: var(--purple); +} + +.line-mauve, +.lines-mauve, +.text-mauve { + color: var(--mauve); +} + +.line-pink, +.lines-pink, +.text-pink { + color: var(--pink); +} + +.line-brown, +.lines-brown, +.text-brown { + color: var(--brown); +} + +.line-grey, +.lines-grey, +.text-grey { + color: var(--grey); +} + +.line-gray, +.lines-gray, +.text-gray { + color: var(--gray); +} + +.text-gray2 { + color: #333; +} + +.line-black, +.lines-black, +.text-black { + color: var(--black); +} + +.line-depblack, +.lines-depblack, +l .text-depblack { + color: var(--depBlack); +} + +.line-white, +.lines-white, +.text-white { + color: var(--white); +} + +.comment-line-box { + justify-content: space-around; +} + +.comment-line-box, +.comment-line-input-box { + align-items: center; + background-color: #fff; + display: flex; + flex-direction: row; + padding: 15rpx; + width: 100%; +} + +.comment-line-input-box { + border-radius: 5rpx; + color: #000; + justify-content: center; +} + +.comment-line-input-box text { + word-wrap: break-word; + color: #000; + display: block; + font-size: 28rpx; + visibility: hidden; + word-break: break-all; +} + +.comment-line-input-box .weui-textarea { + background-color: #f2f2f2; + border-radius: 10rpx; + height: 180rpx; + padding: 15rpx; + text-align: left; + width: 80%; +} + +.comment-line-input { + background-color: #f0f0f0; + flex-grow: 0.8; + font-size: 28rpx; + height: 70rpx; + line-height: 70rpx; + padding: 15rpx; + text-align: left; +} + +.comment-line-btn { + background-color: #e6b980; + border-radius: 5rpx; + color: #fff; + font-size: 28rpx; + margin-left: 15rpx; + padding: 15rpx; + text-align: center; + width: 20%; +} + +.comment-box { + background-color: #fff; + justify-content: space-around; + width: 100%; +} + +.comment-box, +.comment-box .input { + align-items: center; + display: flex; + flex-direction: row; +} + +.comment-box .input { + background-color: #f0f0f0; + border-radius: 15rpx; + flex: 6; + justify-content: center; + padding: 15rpx 0rpx; +} + +.click-white { + background-color: #fff; +} + +.comment-content-box { + align-items: flex-end; + display: flex; + flex-direction: row; + justify-content: center; + padding: 15rpx; + width: 100%; +} + +.comment-content-box .btn { + color: red; + flex-grow: 0.1; + font-size: 32rpx; + text-align: center; +} + +.comment-content-input { + align-items: flex-start; + background-color: #f0f0f0; + border-radius: 10rpx; + display: flex; + flex-direction: column; + flex-grow: 0.9; + font-size: 28rpx; + justify-content: center; + min-height: 200rpx; + padding: 15rpx; +} + +.comment-content-input textarea { + font-size: 28rpx; + height: 180rpx; + width: 100%; +} + +.comment-content-funcs { + align-items: center; + display: flex; + flex-direction: row; + justify-content: flex-end; + padding: 0rpx 15rpx 15rpx; + width: 100%; +} + +.comment-comment-funcs .icons { + font-size: 50rpx; + padding: 0rpx 15rpx; +} + +.icon-comment { + flex: 2; + font-size: 50rpx; + text-align: center; +} + +.icon-comment:nth-child(1) { + margin-left: 15rpx; +} + +.comment-list-box { + align-items: center; + background-color: #fff; + display: flex; + flex-direction: column; + justify-content: flex-start; + margin-bottom: 100rpx; + margin-top: 15rpx; + min-height: 1000rpx; + padding: 15rpx; + width: 100%; +} + +.comment-list-title { + color: #000; + font-size: 32rpx; +} + +.comment-list-item-box, +.comment-list-title { + align-items: flex-start; + display: flex; + flex-direction: column; + justify-content: center; + width: 100%; +} + +.comment-list-item-box { + margin: 15rpx 0rpx; +} + +.comment-list-item-box:nth-child(1) { + margin: 25rpx 0rpx 15rpx; +} + +.comment-list-item-content { + font-size: 28rpx; + margin-left: 64rpx; + padding: 15rpx 0rpx; + width: 90%; +} + +.comment-count { + background-color: #f0f0f0; + border-radius: 10rpx; + font-size: 24rpx; + padding: 0rpx 15rpx; +} + +.restore-content-box { + align-items: flex-start; + border-bottom: 1rpx solid #f3f3f3; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0rpx 15rpx 15rpx; +} + +.line { + background-color: #f3f3f3; + height: 1rpx; + padding: 0rpx 15rpx; + width: 100%; +} + +.restore-content-title { + align-items: center; + display: flex; + flex-direction: row; + justify-content: flex-start; + width: 100%; +} + +.restore-content-title text { + color: #000; + font-size: 32rpx; + margin: 0rpx 0rpx 0rpx 15rpx; +} + +.restore-content-title image { + border-radius: 50%; + height: 64rpx; + width: 64rpx; +} + +.dialog-content { + height: 50%; + width: 100%; +} + +.restore-content { + font-size: 28rpx; + margin-left: 75rpx; + padding: 15rpx 0rpx; + width: 90%; +} + +.item-title-box { + padding-right: 30rpx; +} + +.item-title-box, +.restore-box { + align-items: center; + display: flex; + flex-direction: row; + justify-content: space-between; + width: 100%; +} + +.restore-box { + padding: 15rpx 30rpx 15rpx 64rpx; +} + +.comment-input { + background-color: #f3f3f3; + border-radius: 5rpx; + height: 70rpx; + line-height: 70rpx; + padding: 0rpx 15rpx; + text-align: left; + width: 80%; +} + +.comment-item-title { + align-items: center; + display: flex; + flex-direction: row; + justify-content: flex-start; + width: 100%; +} + +.comment-item-title image { + border-radius: 50%; + height: 48rpx; + width: 48rpx; +} + +.comment-item-title .comment-user-name { + color: #000; + font-size: 28rpx; + line-height: 48rpx; + margin-left: 15rpx; + text-align: center; +} + +.func-items { + justify-content: space-between; + padding: 15rpx; + width: 100%; +} + +.func-item, +.func-items { + align-items: center; + display: flex; + flex-direction: row; +} + +.func-item { + border-right: 1rpx solid #f8f8f8; + color: #000; + flex: 1; + justify-content: center; + width: 23%; +} + +.func-item:last-child { + border-right: 0rpx; +} + +.func-item:active { + background-color: #f3f3f3; + color: #dfdfdf; +} + +.func-item image { + height: 48rpx; + width: 48rpx; +} + +.func-item text { + margin-left: 10rpx; + text-align: center; +} + +.options-box { + box-shadow: 0rpx 2rpx 2rpx rgba(4, 0, 0, .2); + flex-direction: column; + flex-wrap: wrap; + justify-content: flex-start; + padding: 15rpx; + width: 100%; +} + +.options-box, +.options-box .item { + display: flex; +} + +.options-box .item { + align-items: center; + border-radius: 20rpx; + flex-direction: row; + font-size: 28rpx; + justify-content: space-between; + min-width: 20%; + padding: 7.5rpx 0rpx; +} + +.options-box .item:nth-child(1) { + padding: 0rpx 0rpx 7.5rpx; +} + +.loading-box { + display: flex; + justify-content: center; + width: 100%; +} + +.play-box { + margin-left: 20rpx; + padding: 10rpx 0rpx; +} + +.play-box, +.play-box-shadow { + align-items: center; + background-color: #fff; + border-radius: 15rpx; + display: flex; + flex-direction: column; + justify-content: center; + width: 80%; +} + +.play-box-shadow { + box-shadow: 0 4rpx 8rpx 0 rgba(0, 0, 0, .2), 0 6rpx 20rpx 0 rgba(0, 0, 0, .19); + margin-bottom: 15rpx; + padding: 15rpx; + position: relative; +} + +.play-box-shadow-little { + background-color: #fff; + border-radius: 15rpx; + box-shadow: 0 0 4rpx 0 rgba(0, 0, 0, .2), 0 0 10rpx 0 rgba(0, 0, 0, .04); + justify-content: center; + margin-bottom: 15rpx; + position: relative; +} + +.page-box, +.play-box-shadow-little { + align-items: center; + display: flex; + flex-direction: column; + padding: 15rpx; + width: 100%; +} + +.page-box { + background: #f7f7f7; +} + +.play-box-arrow-flex { + align-items: center; + display: flex; + justify-content: center; + position: absolute; + width: 100%; +} + +.play-box-arrow-pos { + height: 100%; + left: 40rpx; + position: absolute; + top: 40rpx; + width: 100%; +} + +.shadow-box { + border: 1rpx solid #f9f9f9; + border-radius: 10rpx; + width: 100%; +} + +.border-blue-radius { + border: 1rpx solid #0054bd; + border-radius: 20rpx; + color: #0054bd; +} + +.border-blue-radius:active { + border: 1rpx solid #9b9c9c; + border-radius: 20rpx; + color: #000; +} + +.play-box image { + height: 60rpx; + width: 60rpx; +} + +.play-box image:active { + background-color: #cccaca; + border-radius: 50%; +} + +.play-box-shadow image { + height: 60rpx; + width: 60rpx; +} + +.play-box-shadow image:active { + background-color: #cccaca; + border-radius: 50%; +} + +.play-box-shadow-little image { + height: 60rpx; + width: 60rpx; +} + +.play-box-shadow-little image:active { + background-color: #cccaca; + border-radius: 50%; +} + +.text-left input { + text-align: right; +} + +.text-length-hint-right { + font-size: 32rpx; + margin-top: 10rpx; + padding-right: 20rpx; + text-align: right; + width: 100%; +} + +.line-gray-sm { + background-color: var(--gray); + height: 10rpx; +} + +.line-gray-ssm { + align-self: center; + background-color: #f8f8f8; + height: 2rpx; + width: 95%; +} + +.line-gray-xs { + height: 20rpx; +} + +.line-gray-lg, +.line-gray-xs { + background-color: var(--gray); +} + +.line-gray-lg { + height: 30rpx; +} + +.line-gray-xl { + background-color: var(--gray); + height: 40rpx; +} + +.hint-title { + align-items: center; + color: #000; + display: flex; + flex-direction: row; + font-size: 32rpx; + height: 90rpx; + justify-content: center; +} + +.hint-title image { + height: 48rpx; + width: 48rpx; +} + +.hint-title text { + left: -30rpx; + position: relative; + top: 1px; +} + +.cardTitle { + background-color: #fff; + border: 1px dashed gray; + color: #fff; + font-size: 80rpx; + font-weight: 300; + padding: 20rpx 40rpx; + position: relative; + text-align: center; + text-shadow: 0 0 6rpx rgba(0, 0, 0, .3); +} + +.border-bottom-sm { + border-bottom: 1rpx solid #eee; +} + +.card-title-sm { + background-color: #fff; + border: 1px dashed gray; + color: #fff; + font-size: 60rpx; + font-weight: 300; + margin: 10rpx; + padding: 0rpx 20rpx; + position: relative; + text-align: center; +} + +.cardTitle::before { + border-radius: 20rpx; + display: block; + height: 6rpx; + position: absolute; + transform: skew(10deg, 0deg); + width: 60rpx; +} + +.cardTitle::after { + border-radius: 6rpx; + bottom: 76rpx; + display: block; + height: 24rpx; + left: 90rpx; + opacity: .1; + position: absolute; + width: 140rpx; +} + +@font-face { + font-display: swap; + font-family: iconfont; + font-style: normal; + font-weight: 400; + src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAL0AA0AAAAABuAAAAKeAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GVgCCQhEICoFIgUsLCgABNgIkAxAEIAWFCAc7G/EFyI7CtuUTYyoihNONcXgQEVRrZM/uPqJC9R9w0UQSwQIK9+ACqNiRAwSbikMy4vzv/ctzs6kgViBK4/2V3m7glqriKpOmpCuok+pM3Exrgwaysdw21XlCXbQtisOAogDTae0fEzfw24P9u77x786VNuXwyeFSiMvjICscjo1CwPvVkXr4sLDtwZ6b0IxekIQsCwUJUcQRNaS96QAchtfHf5FRT1KTWceSTTktSP/lghbRRDVhgwNchgBkZPQhMJ1IoI+pIVAUwS+X/wqWuL6AgKglAJFAuJ+HoJ43qgoJFFCPwHywCkABQMzvbGi83DBxfd/dKasq55m43zjwNvpPRXXJ6ut9d6P/0ermpr0rb93/ZnJpVf9JXfisafAKE91rytdv4eEfTJyfNueJmqipKfDaOeU29Orq7Twm1WjvFnrp7ayKsR51Tkn9eqdWhr2Fet0UeZpk8UsLg0KCNkPLBMKpx9qLE/bq7Gff8/Xv787eyuRLAAJBx5fpxfXWyX/1TcWgdquqJvJaVgHqJRAM199QAPmcAACUAigorEMo5iOQ0KgRFYBOtyBAj2AEQr0VCCR1diKQ1dstQFHvtAA1mjwDgVr1voJAo6kxFwSadMVRWZQGTIFAhnaZZNJqI5m1M4AFHSNr9Fona7U7Jhut8lzeZDh2wcw8Okwj7tgtfDRpF0o1U1MRcjgzGt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Ys8K40DWawgz9alqfe+luMZ/KmxQJB6W2jg+2HZbYfjmDcnSJhnfBMjjIIiIvX2E9LYTE4fbJyjK/AY/cWSx79xOhntUFcKXiEYi0eB2McO5ZKMroVCaPu5UpQSQlFZY5KHttBC+SOWUsSu14IO5gdbfykbAHjafZA9TgMxEIWf8wckEkIgqF1RANr8lCkTKfQIpaNINt6QaNdeeZ1IOQEtFQeg5RgcgBsg0XIKXpZJkyJr7ejzm5nnsQGc4xsK/98l7oQVjvEoXMERMuEq9RfhGvlduI4WPoUb1H+Em7hVA+EWLtQbHVTthLub0m3LCmcYCFdwiifhKvWVcI38KlzHFT6EG9S/hJsY41e4hWtlqQzhYTBBYJxBY4oN4wIxHCySMgbWoTn0ZhLMTE83ehE7mzgbKO9XYpcDHmg554Ap7T23Zr5KJ/5gy4HUmG4eBUu2KY0uInQoG18snNXdqHOw/Z7ttrTYv2uBNcfsUQ1s1Pw92zPSSGwMr5CSNfIyt6QSU49oa6zxu2cp1vNeCIlOvMv0iMeaNHU6925p4sDi5/KMHH20uZI996gcPmNZCHm/3U7EIIpdhj+T2HEZAAAAeNpjYGKAAC4wyciADljAokyMTAKJxSWpRZnF2cW6hrrJ+QWVADoqBkcAAAAAAAAB//8AAgABAAAADAAAABYAAAACAAEAAwADAAEABAAAAAIAAAAAeNpjYGBgZACCq0vUOUD0nflZD2E0AER/BzYAAA==) format("woff"), url(iconfont.ttf-do-not-use-local-path-./class/main.wxss&1&70816) format("truetype"); +} + +.iconfont { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-family: iconfont !important; + font-size: 12rpx; + font-style: normal; +} + +.icon-star-red:before { + color: red; + content: "\e618"; +} + +.tab-bar { + background: #fff; + flex-direction: column; + left: 0; + position: fixed; + right: 0; + z-index: 100; +} + +.tab-bar, +.tab-bar-box { + display: flex; + width: 100%; +} + +.tab-bar-box { + align-items: center; + flex-direction: row; + justify-content: space-between; +} + +@-webkit-keyframes cuIcon-spin { + 0% { + transform: rotate(0); + } + + 100% { + transform: rotate(359deg); + } +} + +@keyframes cuIcon-spin { + 0% { + transform: rotate(0); + } + + 100% { + transform: rotate(359deg); + } +} + +.iconfont-spin { + animation: cuIcon-spin 2s linear infinite; + display: inline-block; +} + +.iconfont-pulse { + animation: cuIcon-spin 1s steps(8) infinite; + display: inline-block; +} + +[class*="cuIcon-"] { + font-family: cuIcon; + font-size: inherit; + font-style: normal; +} + +@font-face { + font-family: cuIcon; + src: url("//at.alicdn.com/t/font_533566_yfq2d9wdij.eot?t=1545239985831"); + src: url("//at.alicdn.com/t/font_533566_yfq2d9wdij.eot?t=1545239985831#iefix") format("embedded-opentype"), url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAKQcAAsAAAABNKAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8dkoiY21hcAAAAYAAAAiaAAATkilZPq9nbHlmAAAKHAAAjqoAAQkUOjYlCmhlYWQAAJjIAAAALwAAADYUMoFgaGhlYQAAmPgAAAAfAAAAJAhwBcpobXR4AACZGAAAABkAAAScnSIAAGxvY2EAAJk0AAACUAAAAlAhX2C+bWF4cAAAm4QAAAAfAAAAIAJAAOpuYW1lAACbpAAAAUUAAAJtPlT+fXBvc3QAAJzsAAAHLQAADMYi8KXJeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWScwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMbzQZ27438AQw9zA0AAUZgTJAQDhHQwVeJzN1/nf1mMaxvHP9ZQiSUKWbCXZ1+w7Q0NqImNJhSSSZSyTlMQYs9hlLGPKMoRBMyU1tlIiIrKUfeycZyOpkCVLc1zPYbz8BzPdr7fb8/yQ2/29zuM6TmA5oIlsIU31460U6r+O1m9L4++b0KLx902bnq6fL+ICmtE0GqJltIl20TE6R5foHj3jmD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LIcS0+djakEnrrjDgW3TBS+Yq9yhQwHb4TpRc+4fHhaMK/P02c28dEeteeEYf3z98jjpJ2zsXRpbLsaqzVQueeNu++4050ZTrmdtFk1LkVEzp3sjuA9sJmz1t7m5l+xta3JwvX+MuGWHLnMc3G/Ta6u7Yfye3fvFGQd8zd3y9G/1b415YErR3FzW9QU8ZmXJG8XibbllL4e4MEqatTTg+crn8waZrtfW/gthnmJTAAAA") format("woff"), url("//at.alicdn.com/t/font_533566_yfq2d9wdij.ttf?t=1545239985831") format("truetype"), url("//at.alicdn.com/t/font_533566_yfq2d9wdij.svg?t=1545239985831#iconfont") format("svg"); +} + +.cuIcon-appreciate:before { + content: "\e644"; +} + +.cuIcon-check:before { + content: "\e645"; +} + +.cuIcon-close:before { + content: "\e646"; +} + +.cuIcon-edit:before { + content: "\e649"; +} + +.cuIcon-emoji:before { + content: "\e64a"; +} + +.cuIcon-favorfill:before { + content: "\e64b"; +} + +.cuIcon-favor:before { + content: "\e64c"; +} + +.cuIcon-loading:before { + content: "\e64f"; +} + +.cuIcon-locationfill:before { + content: "\e650"; +} + +.cuIcon-location:before { + content: "\e651"; +} + +.cuIcon-phone:before { + content: "\e652"; +} + +.cuIcon-roundcheckfill:before { + content: "\e656"; +} + +.cuIcon-roundcheck:before { + content: "\e657"; +} + +.cuIcon-roundclosefill:before { + content: "\e658"; +} + +.cuIcon-roundclose:before { + content: "\e659"; +} + +.cuIcon-roundrightfill:before { + content: "\e65a"; +} + +.cuIcon-roundright:before { + content: "\e65b"; +} + +.cuIcon-search:before { + content: "\e65c"; +} + +.cuIcon-taxi:before { + content: "\e65d"; +} + +.cuIcon-timefill:before { + content: "\e65e"; +} + +.cuIcon-time:before { + content: "\e65f"; +} + +.cuIcon-unfold:before { + content: "\e661"; +} + +.cuIcon-warnfill:before { + content: "\e662"; +} + +.cuIcon-warn:before { + content: "\e663"; +} + +.cuIcon-camerafill:before { + content: "\e664"; +} + +.cuIcon-camera:before { + content: "\e665"; +} + +.cuIcon-commentfill:before { + content: "\e666"; +} + +.cuIcon-comment:before { + content: "\e667"; +} + +.cuIcon-likefill:before { + content: "\e668"; +} + +.cuIcon-like:before { + content: "\e669"; +} + +.cuIcon-notificationfill:before { + content: "\e66a"; +} + +.cuIcon-notification:before { + content: "\e66b"; +} + +.cuIcon-order:before { + content: "\e66c"; +} + +.cuIcon-samefill:before { + content: "\e66d"; +} + +.cuIcon-same:before { + content: "\e66e"; +} + +.cuIcon-deliver:before { + content: "\e671"; +} + +.cuIcon-evaluate:before { + content: "\e672"; +} + +.cuIcon-pay:before { + content: "\e673"; +} + +.cuIcon-send:before { + content: "\e675"; +} + +.cuIcon-shop:before { + content: "\e676"; +} + +.cuIcon-ticket:before { + content: "\e677"; +} + +.cuIcon-back:before { + content: "\e679"; +} + +.cuIcon-cascades:before { + content: "\e67c"; +} + +.cuIcon-discover:before { + content: "\e67e"; +} + +.cuIcon-list:before { + content: "\e682"; +} + +.cuIcon-more:before { + content: "\e684"; +} + +.cuIcon-scan:before { + content: "\e689"; +} + +.cuIcon-settings:before { + content: "\e68a"; +} + +.cuIcon-questionfill:before { + content: "\e690"; +} + +.cuIcon-question:before { + content: "\e691"; +} + +.cuIcon-shopfill:before { + content: "\e697"; +} + +.cuIcon-form:before { + content: "\e699"; +} + +.cuIcon-pic:before { + content: "\e69b"; +} + +.cuIcon-filter:before { + content: "\e69c"; +} + +.cuIcon-footprint:before { + content: "\e69d"; +} + +.cuIcon-top:before { + content: "\e69e"; +} + +.cuIcon-pulldown:before { + content: "\e69f"; +} + +.cuIcon-pullup:before { + content: "\e6a0"; +} + +.cuIcon-right:before { + content: "\e6a3"; +} + +.cuIcon-refresh:before { + content: "\e6a4"; +} + +.cuIcon-moreandroid:before { + content: "\e6a5"; +} + +.cuIcon-deletefill:before { + content: "\e6a6"; +} + +.cuIcon-refund:before { + content: "\e6ac"; +} + +.cuIcon-cart:before { + content: "\e6af"; +} + +.cuIcon-qrcode:before { + content: "\e6b0"; +} + +.cuIcon-remind:before { + content: "\e6b2"; +} + +.cuIcon-delete:before { + content: "\e6b4"; +} + +.cuIcon-profile:before { + content: "\e6b7"; +} + +.cuIcon-home:before { + content: "\e6b8"; +} + +.cuIcon-cartfill:before { + content: "\e6b9"; +} + +.cuIcon-discoverfill:before { + content: "\e6ba"; +} + +.cuIcon-homefill:before { + content: "\e6bb"; +} + +.cuIcon-message:before { + content: "\e6bc"; +} + +.cuIcon-addressbook:before { + content: "\e6bd"; +} + +.cuIcon-link:before { + content: "\e6bf"; +} + +.cuIcon-lock:before { + content: "\e6c0"; +} + +.cuIcon-unlock:before { + content: "\e6c2"; +} + +.cuIcon-vip:before { + content: "\e6c3"; +} + +.cuIcon-weibo:before { + content: "\e6c4"; +} + +.cuIcon-activity:before { + content: "\e6c5"; +} + +.cuIcon-friendaddfill:before { + content: "\e6c9"; +} + +.cuIcon-friendadd:before { + content: "\e6ca"; +} + +.cuIcon-friendfamous:before { + content: "\e6cb"; +} + +.cuIcon-friend:before { + content: "\e6cc"; +} + +.cuIcon-goods:before { + content: "\e6cd"; +} + +.cuIcon-selection:before { + content: "\e6ce"; +} + +.cuIcon-explore:before { + content: "\e6d2"; +} + +.cuIcon-present:before { + content: "\e6d3"; +} + +.cuIcon-squarecheckfill:before { + content: "\e6d4"; +} + +.cuIcon-square:before { + content: "\e6d5"; +} + +.cuIcon-squarecheck:before { + content: "\e6d6"; +} + +.cuIcon-round:before { + content: "\e6d7"; +} + +.cuIcon-roundaddfill:before { + content: "\e6d8"; +} + +.cuIcon-roundadd:before { + content: "\e6d9"; +} + +.cuIcon-add:before { + content: "\e6da"; +} + +.cuIcon-notificationforbidfill:before { + content: "\e6db"; +} + +.cuIcon-explorefill:before { + content: "\e6dd"; +} + +.cuIcon-fold:before { + content: "\e6de"; +} + +.cuIcon-game:before { + content: "\e6df"; +} + +.cuIcon-redpacket:before { + content: "\e6e0"; +} + +.cuIcon-selectionfill:before { + content: "\e6e1"; +} + +.cuIcon-similar:before { + content: "\e6e2"; +} + +.cuIcon-appreciatefill:before { + content: "\e6e3"; +} + +.cuIcon-infofill:before { + content: "\e6e4"; +} + +.cuIcon-info:before { + content: "\e6e5"; +} + +.cuIcon-forwardfill:before { + content: "\e6ea"; +} + +.cuIcon-forward:before { + content: "\e6eb"; +} + +.cuIcon-rechargefill:before { + content: "\e6ec"; +} + +.cuIcon-recharge:before { + content: "\e6ed"; +} + +.cuIcon-vipcard:before { + content: "\e6ee"; +} + +.cuIcon-voice:before { + content: "\e6ef"; +} + +.cuIcon-voicefill:before { + content: "\e6f0"; +} + +.cuIcon-friendfavor:before { + content: "\e6f1"; +} + +.cuIcon-wifi:before { + content: "\e6f2"; +} + +.cuIcon-share:before { + content: "\e6f3"; +} + +.cuIcon-wefill:before { + content: "\e6f4"; +} + +.cuIcon-we:before { + content: "\e6f5"; +} + +.cuIcon-lightauto:before { + content: "\e6f6"; +} + +.cuIcon-lightforbid:before { + content: "\e6f7"; +} + +.cuIcon-lightfill:before { + content: "\e6f8"; +} + +.cuIcon-camerarotate:before { + content: "\e6f9"; +} + +.cuIcon-light:before { + content: "\e6fa"; +} + +.cuIcon-barcode:before { + content: "\e6fb"; +} + +.cuIcon-flashlightclose:before { + content: "\e6fc"; +} + +.cuIcon-flashlightopen:before { + content: "\e6fd"; +} + +.cuIcon-searchlist:before { + content: "\e6fe"; +} + +.cuIcon-service:before { + content: "\e6ff"; +} + +.cuIcon-sort:before { + content: "\e700"; +} + +.cuIcon-down:before { + content: "\e703"; +} + +.cuIcon-mobile:before { + content: "\e704"; +} + +.cuIcon-mobilefill:before { + content: "\e705"; +} + +.cuIcon-copy:before { + content: "\e706"; +} + +.cuIcon-countdownfill:before { + content: "\e707"; +} + +.cuIcon-countdown:before { + content: "\e708"; +} + +.cuIcon-noticefill:before { + content: "\e709"; +} + +.cuIcon-notice:before { + content: "\e70a"; +} + +.cuIcon-upstagefill:before { + content: "\e70e"; +} + +.cuIcon-upstage:before { + content: "\e70f"; +} + +.cuIcon-babyfill:before { + content: "\e710"; +} + +.cuIcon-baby:before { + content: "\e711"; +} + +.cuIcon-brandfill:before { + content: "\e712"; +} + +.cuIcon-brand:before { + content: "\e713"; +} + +.cuIcon-choicenessfill:before { + content: "\e714"; +} + +.cuIcon-choiceness:before { + content: "\e715"; +} + +.cuIcon-clothesfill:before { + content: "\e716"; +} + +.cuIcon-clothes:before { + content: "\e717"; +} + +.cuIcon-creativefill:before { + content: "\e718"; +} + +.cuIcon-creative:before { + content: "\e719"; +} + +.cuIcon-female:before { + content: "\e71a"; +} + +.cuIcon-keyboard:before { + content: "\e71b"; +} + +.cuIcon-male:before { + content: "\e71c"; +} + +.cuIcon-newfill:before { + content: "\e71d"; +} + +.cuIcon-new:before { + content: "\e71e"; +} + +.cuIcon-pullleft:before { + content: "\e71f"; +} + +.cuIcon-pullright:before { + content: "\e720"; +} + +.cuIcon-rankfill:before { + content: "\e721"; +} + +.cuIcon-rank:before { + content: "\e722"; +} + +.cuIcon-bad:before { + content: "\e723"; +} + +.cuIcon-cameraadd:before { + content: "\e724"; +} + +.cuIcon-focus:before { + content: "\e725"; +} + +.cuIcon-friendfill:before { + content: "\e726"; +} + +.cuIcon-cameraaddfill:before { + content: "\e727"; +} + +.cuIcon-apps:before { + content: "\e729"; +} + +.cuIcon-paintfill:before { + content: "\e72a"; +} + +.cuIcon-paint:before { + content: "\e72b"; +} + +.cuIcon-picfill:before { + content: "\e72c"; +} + +.cuIcon-refresharrow:before { + content: "\e72d"; +} + +.cuIcon-colorlens:before { + content: "\e6e6"; +} + +.cuIcon-markfill:before { + content: "\e730"; +} + +.cuIcon-mark:before { + content: "\e731"; +} + +.cuIcon-presentfill:before { + content: "\e732"; +} + +.cuIcon-repeal:before { + content: "\e733"; +} + +.cuIcon-album:before { + content: "\e734"; +} + +.cuIcon-peoplefill:before { + content: "\e735"; +} + +.cuIcon-people:before { + content: "\e736"; +} + +.cuIcon-servicefill:before { + content: "\e737"; +} + +.cuIcon-repair:before { + content: "\e738"; +} + +.cuIcon-file:before { + content: "\e739"; +} + +.cuIcon-repairfill:before { + content: "\e73a"; +} + +.cuIcon-taoxiaopu:before { + content: "\e73b"; +} + +.cuIcon-weixin:before { + content: "\e612"; +} + +.cuIcon-attentionfill:before { + content: "\e73c"; +} + +.cuIcon-attention:before { + content: "\e73d"; +} + +.cuIcon-commandfill:before { + content: "\e73e"; +} + +.cuIcon-command:before { + content: "\e73f"; +} + +.cuIcon-communityfill:before { + content: "\e740"; +} + +.cuIcon-community:before { + content: "\e741"; +} + +.cuIcon-read:before { + content: "\e742"; +} + +.cuIcon-calendar:before { + content: "\e74a"; +} + +.cuIcon-cut:before { + content: "\e74b"; +} + +.cuIcon-magic:before { + content: "\e74c"; +} + +.cuIcon-backwardfill:before { + content: "\e74d"; +} + +.cuIcon-playfill:before { + content: "\e74f"; +} + +.cuIcon-stop:before { + content: "\e750"; +} + +.cuIcon-tagfill:before { + content: "\e751"; +} + +.cuIcon-tag:before { + content: "\e752"; +} + +.cuIcon-group:before { + content: "\e753"; +} + +.cuIcon-all:before { + content: "\e755"; +} + +.cuIcon-backdelete:before { + content: "\e756"; +} + +.cuIcon-hotfill:before { + content: "\e757"; +} + +.cuIcon-hot:before { + content: "\e758"; +} + +.cuIcon-post:before { + content: "\e759"; +} + +.cuIcon-radiobox:before { + content: "\e75b"; +} + +.cuIcon-rounddown:before { + content: "\e75c"; +} + +.cuIcon-upload:before { + content: "\e75d"; +} + +.cuIcon-writefill:before { + content: "\e760"; +} + +.cuIcon-write:before { + content: "\e761"; +} + +.cuIcon-radioboxfill:before { + content: "\e763"; +} + +.cuIcon-punch:before { + content: "\e764"; +} + +.cuIcon-shake:before { + content: "\e765"; +} + +.cuIcon-move:before { + content: "\e768"; +} + +.cuIcon-safe:before { + content: "\e769"; +} + +.cuIcon-activityfill:before { + content: "\e775"; +} + +.cuIcon-crownfill:before { + content: "\e776"; +} + +.cuIcon-crown:before { + content: "\e777"; +} + +.cuIcon-goodsfill:before { + content: "\e778"; +} + +.cuIcon-messagefill:before { + content: "\e779"; +} + +.cuIcon-profilefill:before { + content: "\e77a"; +} + +.cuIcon-sound:before { + content: "\e77b"; +} + +.cuIcon-sponsorfill:before { + content: "\e77c"; +} + +.cuIcon-sponsor:before { + content: "\e77d"; +} + +.cuIcon-upblock:before { + content: "\e77e"; +} + +.cuIcon-weblock:before { + content: "\e77f"; +} + +.cuIcon-weunblock:before { + content: "\e780"; +} + +.cuIcon-my:before { + content: "\e78b"; +} + +.cuIcon-myfill:before { + content: "\e78c"; +} + +.cuIcon-emojifill:before { + content: "\e78d"; +} + +.cuIcon-emojiflashfill:before { + content: "\e78e"; +} + +.cuIcon-flashbuyfill:before { + content: "\e78f"; +} + +.cuIcon-text:before { + content: "\e791"; +} + +.cuIcon-goodsfavor:before { + content: "\e794"; +} + +.cuIcon-musicfill:before { + content: "\e795"; +} + +.cuIcon-musicforbidfill:before { + content: "\e796"; +} + +.cuIcon-card:before { + content: "\e624"; +} + +.cuIcon-triangledownfill:before { + content: "\e79b"; +} + +.cuIcon-triangleupfill:before { + content: "\e79c"; +} + +.cuIcon-roundleftfill-copy:before { + content: "\e79e"; +} + +.cuIcon-font:before { + content: "\e76a"; +} + +.cuIcon-title:before { + content: "\e82f"; +} + +.cuIcon-recordfill:before { + content: "\e7a4"; +} + +.cuIcon-record:before { + content: "\e7a6"; +} + +.cuIcon-cardboardfill:before { + content: "\e7a9"; +} + +.cuIcon-cardboard:before { + content: "\e7aa"; +} + +.cuIcon-formfill:before { + content: "\e7ab"; +} + +.cuIcon-coin:before { + content: "\e7ac"; +} + +.cuIcon-cardboardforbid:before { + content: "\e7af"; +} + +.cuIcon-circlefill:before { + content: "\e7b0"; +} + +.cuIcon-circle:before { + content: "\e7b1"; +} + +.cuIcon-attentionforbid:before { + content: "\e7b2"; +} + +.cuIcon-attentionforbidfill:before { + content: "\e7b3"; +} + +.cuIcon-attentionfavorfill:before { + content: "\e7b4"; +} + +.cuIcon-attentionfavor:before { + content: "\e7b5"; +} + +.cuIcon-titles:before { + content: "\e701"; +} + +.cuIcon-icloading:before { + content: "\e67a"; +} + +.cuIcon-full:before { + content: "\e7bc"; +} + +.cuIcon-mail:before { + content: "\e7bd"; +} + +.cuIcon-peoplelist:before { + content: "\e7be"; +} + +.cuIcon-goodsnewfill:before { + content: "\e7bf"; +} + +.cuIcon-goodsnew:before { + content: "\e7c0"; +} + +.cuIcon-medalfill:before { + content: "\e7c1"; +} + +.cuIcon-medal:before { + content: "\e7c2"; +} + +.cuIcon-newsfill:before { + content: "\e7c3"; +} + +.cuIcon-newshotfill:before { + content: "\e7c4"; +} + +.cuIcon-newshot:before { + content: "\e7c5"; +} + +.cuIcon-news:before { + content: "\e7c6"; +} + +.cuIcon-videofill:before { + content: "\e7c7"; +} + +.cuIcon-video:before { + content: "\e7c8"; +} + +.cuIcon-exit:before { + content: "\e7cb"; +} + +.cuIcon-skinfill:before { + content: "\e7cc"; +} + +.cuIcon-skin:before { + content: "\e7cd"; +} + +.cuIcon-moneybagfill:before { + content: "\e7ce"; +} + +.cuIcon-usefullfill:before { + content: "\e7cf"; +} + +.cuIcon-usefull:before { + content: "\e7d0"; +} + +.cuIcon-moneybag:before { + content: "\e7d1"; +} + +.cuIcon-redpacket_fill:before { + content: "\e7d3"; +} + +.cuIcon-subscription:before { + content: "\e7d4"; +} + +.cuIcon-loading1:before { + content: "\e633"; +} + +.cuIcon-github:before { + content: "\e692"; +} + +.cuIcon-global:before { + content: "\e7eb"; +} + +.cuIcon-settingsfill:before { + content: "\e6ab"; +} + +.cuIcon-back_android:before { + content: "\e7ed"; +} + +.cuIcon-expressman:before { + content: "\e7ef"; +} + +.cuIcon-evaluate_fill:before { + content: "\e7f0"; +} + +.cuIcon-group_fill:before { + content: "\e7f5"; +} + +.cuIcon-play_forward_fill:before { + content: "\e7f6"; +} + +.cuIcon-deliver_fill:before { + content: "\e7f7"; +} + +.cuIcon-notice_forbid_fill:before { + content: "\e7f8"; +} + +.cuIcon-fork:before { + content: "\e60c"; +} + +.cuIcon-pick:before { + content: "\e7fa"; +} + +.cuIcon-wenzi:before { + content: "\e6a7"; +} + +.cuIcon-ellipse:before { + content: "\e600"; +} + +.cuIcon-qr_code:before { + content: "\e61b"; +} + +.cuIcon-dianhua:before { + content: "\e64d"; +} + +.cuIcon-icon:before { + content: "\e602"; +} + +.cuIcon-loading2:before { + content: "\e7f1"; +} + +.cuIcon-btn:before { + content: "\e601"; +} + +page { + --red: #e54d42; + --orange: #f37b1d; + --yellow: #fbbd08; + --olive: #8dc63f; + --green: #39b54a; + --cyan: #1cbbb4; + --blue: #0054bd; + --purple: #6739b6; + --mauve: #9c26b0; + --pink: #e03997; + --brown: #a5673f; + --grey: #8799a3; + --black: #333; + --darkGray: #666; + --gray: #aaa; + --ghostWhite: #f4f4f4; + --white: #fff; + --depBlack: #000; + --redLight: #fadbd9; + --orangeLight: #fde6d2; + --yellowLight: #ff4949; + --oliveLight: #e8f4d9; + --greenLight: #d7f0db; + --cyanLight: #d2f1f0; + --blueLight: #cce6ff; + --purpleLight: #e1d7f0; + --mauveLight: #ebd4ef; + --pinkLight: #f9d7ea; + --brownLight: #ede1d9; + --greyLight: #e7ebed; + --gradualRed: linear-gradient(45deg, #f43f3b, #ec008c); + --gradualOrange: linear-gradient(45deg, #ff9700, #ed1c24); + --gradualGreen: linear-gradient(45deg, #39b54a, #8dc63f); + --gradualPurple: linear-gradient(45deg, #9000ff, #5e00ff); + --gradualPink: linear-gradient(45deg, #ec008c, #6739b6); + --gradualBlue: linear-gradient(45deg, #0081ff, #1cbbb4); + --gradualWhite: linear-gradient(45deg, #fff, #f8f8f8); + --gradualGray: linear-gradient(85deg, #faf9f9, #f5f2f2); + --gradualYellow: linear-gradient(85deg, #f4dbb8, #e6b980); + --ShadowSize: 6rpx 6rpx 8rpx; + --redShadow: rgba(204, 69, 59, .2); + --orangeShadow: rgba(217, 109, 26, .2); + --yellowShadow: rgba(224, 170, 7, .2); + --oliveShadow: rgba(124, 173, 55, .2); + --greenShadow: rgba(48, 156, 63, .2); + --cyanShadow: rgba(28, 187, 180, .2); + --blueShadow: rgba(0, 102, 204, .2); + --purpleShadow: rgba(88, 48, 156, .2); + --mauveShadow: rgba(133, 33, 150, .2); + --pinkShadow: rgba(199, 50, 134, .2); + --brownShadow: rgba(140, 88, 53, .2); + --greyShadow: rgba(114, 130, 138, .2); + --grayShadow: rgba(114, 130, 138, .2); + --blackShadow: rgba(26, 26, 26, .2); + background-color: var(--ghostWhite); + color: var(--black); + font-family: Helvetica Neue, Helvetica, sans-serif; + font-size: 28rpx; +} + +button, +image, +input, +label, +navigator, +scroll-view, +swiper, +textarea, +view { + box-sizing: border-box; +} + +.round { + border-radius: 5000rpx; +} + +.radius { + border-radius: 6rpx; +} + +image { + display: inline-block; + max-width: 100%; + position: relative; + z-index: 0; +} + +image.loading::before { + background-color: #f5f5f5; + content: ""; + display: block; + height: 100%; + position: absolute; + width: 100%; + z-index: -2; +} + +image.loading::after { + animation: cuIcon-spin 2s linear infinite; + bottom: 0; + color: #ccc; + content: "\e7f1"; + display: block; + font-family: cuIcon; + font-size: 32rpx; + height: 32rpx; + left: 0; + line-height: 32rpx; + margin: auto; + position: absolute; + right: 0; + top: 0; + width: 32rpx; + z-index: -1; +} + +.response { + width: 100%; +} + +checkbox, +radio, +switch { + position: relative; +} + +switch::after, +switch::before { + bottom: 0; + color: var(--white) !important; + content: "\e645"; + font-family: cuIcon; + font-size: 26rpx; + height: 26px; + left: 0rpx; + line-height: 26px; + margin: auto; + pointer-events: none; + position: absolute; + text-align: center; + top: 0; + transform: scale(0, 0); + transition: all .3s ease-in-out 0s; + width: 50%; + z-index: 9; +} + +switch::before { + content: "\e646"; + left: auto; + right: 0; +} + +switch.checked::after, +switch::before, +switch[checked]::after { + transform: scale(1, 1); +} + +switch.checked::before, +switch[checked]::before { + transform: scale(0, 0); +} + +checkbox::before, +radio::before { + color: var(--white) !important; + content: "\e645"; + font-family: cuIcon; + font-size: 32rpx; + line-height: 16px; + margin-top: -8px; + pointer-events: none; + position: absolute; + right: 5px; + top: 50%; + transform: scale(1, 1); + transition: all .3s ease-in-out 0s; + z-index: 9; +} + +checkbox .wx-checkbox-input, +radio .wx-radio-input { + height: 20px; + margin: 0; + width: 20px; +} + +checkbox.round .wx-checkbox-input { + border-radius: 100rpx; +} + +switch .wx-switch-input { + border: none; + border-radius: 100rpx; + height: 26px; + margin: 0; + padding: 0 24px; + width: 48px; +} + +switch .wx-switch-input:not([class*="bg-"]) { + background: var(--grey) !important; +} + +switch .wx-switch-input::after { + border-radius: 100rpx; + bottom: 0rpx; + height: 26px; + left: 0rpx; + margin: auto; + position: absolute; + top: 0rpx; + transform: scale(.9, .9); + transition: all .1s ease-in-out 0s; + width: 26px; +} + +switch .wx-switch-input.wx-switch-input-checked::after { + box-shadow: none; + left: 22px; + margin: auto; + transform: scale(.9, .9); +} + +radio-group { + display: inline-block; +} + +switch.radius .wx-switch-input, +switch.radius .wx-switch-input::after, +switch.radius .wx-switch-input::before { + border-radius: 10rpx; +} + +checkbox .wx-checkbox-input::before, +radio .wx-radio-input::before, +radio.radio::before, +switch .wx-switch-input::before { + display: none; +} + +radio.radio[checked]::after { + background-color: initial; + border: 8px solid var(--white) !important; + border-radius: 200rpx; + bottom: 0; + content: ""; + display: block; + height: 8px; + left: 0rpx; + margin: auto; + position: absolute; + right: 0; + top: 0rpx; + width: 8px; + z-index: 999; +} + +.switch-sex::after { + content: "\e71c"; +} + +.switch-sex::before { + content: "\e71a"; +} + +.switch-sex .wx-switch-input { + background: var(--red) !important; + border-color: var(--red) !important; +} + +.switch-sex[checked] .wx-switch-input { + background: var(--blue) !important; + border-color: var(--blue) !important; +} + +checkbox.red[checked] .wx-checkbox-input, +radio.red[checked] .wx-radio-input, +switch.red[checked] .wx-switch-input { + border-color: var(--red) !important; +} + +checkbox.orange[checked] .wx-checkbox-input, +radio.orange[checked] .wx-radio-input, +switch.orange[checked] .wx-switch-input { + border-color: var(--orange) !important; +} + +checkbox.yellow[checked] .wx-checkbox-input, +radio.yellow[checked] .wx-radio-input, +switch.yellow[checked] .wx-switch-input { + border-color: var(--yellow) !important; +} + +checkbox.olive[checked] .wx-checkbox-input, +radio.olive[checked] .wx-radio-input, +switch.olive[checked] .wx-switch-input { + border-color: var(--olive) !important; +} + +checkbox.green[checked] .wx-checkbox-input, +checkbox[checked] .wx-checkbox-input, +radio.green[checked] .wx-radio-input, +switch.green[checked] .wx-switch-input { + border-color: var(--green) !important; +} + +checkbox.cyan[checked] .wx-checkbox-input, +radio.cyan[checked] .wx-radio-input, +switch.cyan[checked] .wx-switch-input { + border-color: var(--cyan) !important; +} + +checkbox.blue[checked] .wx-checkbox-input, +radio.blue[checked] .wx-radio-input, +switch.blue[checked] .wx-switch-input { + border-color: var(--blue) !important; +} + +checkbox.purple[checked] .wx-checkbox-input, +radio.purple[checked] .wx-radio-input, +switch.purple[checked] .wx-switch-input { + border-color: var(--purple) !important; +} + +checkbox.mauve[checked] .wx-checkbox-input, +radio.mauve[checked] .wx-radio-input, +switch.mauve[checked] .wx-switch-input { + border-color: var(--mauve) !important; +} + +checkbox.pink[checked] .wx-checkbox-input, +radio.pink[checked] .wx-radio-input, +switch.pink[checked] .wx-switch-input { + border-color: var(--pink) !important; +} + +checkbox.brown[checked] .wx-checkbox-input, +radio.brown[checked] .wx-radio-input, +switch.brown[checked] .wx-switch-input { + border-color: var(--brown) !important; +} + +checkbox.gray[checked] .wx-checkbox-input, +checkbox.grey[checked] .wx-checkbox-input, +radio.gray[checked] .wx-radio-input, +radio.grey[checked] .wx-radio-input, +switch.gray[checked] .wx-switch-input, +switch.grey[checked] .wx-switch-input { + border-color: var(--grey) !important; +} + +checkbox.black[checked] .wx-checkbox-input, +radio.black[checked] .wx-radio-input, +switch.black[checked] .wx-switch-input { + border-color: var(--black) !important; +} + +checkbox.white[checked] .wx-checkbox-input, +radio.white[checked] .wx-radio-input, +switch.white[checked] .wx-switch-input { + border-color: var(--white) !important; +} + +checkbox.red[checked] .wx-checkbox-input, +radio.red[checked] .wx-radio-input, +switch.red[checked] .wx-switch-input.wx-switch-input-checked { + background-color: var(--red) !important; + color: var(--white) !important; +} + +checkbox.orange[checked] .wx-checkbox-input, +radio.orange[checked] .wx-radio-input, +switch.orange[checked] .wx-switch-input { + background-color: var(--orange) !important; + color: var(--white) !important; +} + +checkbox.yellow[checked] .wx-checkbox-input, +radio.yellow[checked] .wx-radio-input, +switch.yellow[checked] .wx-switch-input { + background-color: var(--yellow) !important; + color: var(--black) !important; +} + +checkbox.olive[checked] .wx-checkbox-input, +radio.olive[checked] .wx-radio-input, +switch.olive[checked] .wx-switch-input { + background-color: var(--olive) !important; + color: var(--white) !important; +} + +checkbox.green[checked] .wx-checkbox-input, +checkbox[checked] .wx-checkbox-input, +radio.green[checked] .wx-radio-input, +radio[checked] .wx-radio-input, +switch.green[checked] .wx-switch-input, +switch[checked] .wx-switch-input { + background-color: var(--green) !important; + color: var(--white) !important; +} + +checkbox.cyan[checked] .wx-checkbox-input, +radio.cyan[checked] .wx-radio-input, +switch.cyan[checked] .wx-switch-input { + background-color: var(--cyan) !important; + color: var(--white) !important; +} + +checkbox.blue[checked] .wx-checkbox-input, +radio.blue[checked] .wx-radio-input, +switch.blue[checked] .wx-switch-input { + background-color: var(--blue) !important; + color: var(--white) !important; +} + +checkbox.purple[checked] .wx-checkbox-input, +radio.purple[checked] .wx-radio-input, +switch.purple[checked] .wx-switch-input { + background-color: var(--purple) !important; + color: var(--white) !important; +} + +checkbox.mauve[checked] .wx-checkbox-input, +radio.mauve[checked] .wx-radio-input, +switch.mauve[checked] .wx-switch-input { + background-color: var(--mauve) !important; + color: var(--white) !important; +} + +checkbox.pink[checked] .wx-checkbox-input, +radio.pink[checked] .wx-radio-input, +switch.pink[checked] .wx-switch-input { + background-color: var(--pink) !important; + color: var(--white) !important; +} + +checkbox.brown[checked] .wx-checkbox-input, +radio.brown[checked] .wx-radio-input, +switch.brown[checked] .wx-switch-input { + background-color: var(--brown) !important; + color: var(--white) !important; +} + +checkbox.grey[checked] .wx-checkbox-input, +radio.grey[checked] .wx-radio-input, +switch.grey[checked] .wx-switch-input { + background-color: var(--grey) !important; + color: var(--white) !important; +} + +checkbox.gray[checked] .wx-checkbox-input, +radio.gray[checked] .wx-radio-input, +switch.gray[checked] .wx-switch-input { + background-color: #f0f0f0 !important; + color: var(--black) !important; +} + +checkbox.black[checked] .wx-checkbox-input, +radio.black[checked] .wx-radio-input, +switch.black[checked] .wx-switch-input { + background-color: var(--black) !important; + color: var(--white) !important; +} + +checkbox.white[checked] .wx-checkbox-input, +radio.white[checked] .wx-radio-input, +switch.white[checked] .wx-switch-input { + background-color: var(--white) !important; + color: var(--black) !important; +} + +.dashed, +.dashed-bottom, +.dashed-left, +.dashed-right, +.dashed-top, +.solid, +.solid-bottom, +.solid-left, +.solid-right, +.solid-top, +.solids, +.solids-bottom, +.solids-left, +.solids-right, +.solids-top { + position: relative; +} + +.dashed-bottom::after, +.dashed-left::after, +.dashed-right::after, +.dashed-top::after, +.dashed::after, +.solid-bottom::after, +.solid-left::after, +.solid-right::after, +.solid-top::after, +.solid::after, +.solids-bottom::after, +.solids-left::after, +.solids-right::after, +.solids-top::after, +.solids::after { + border-radius: inherit; + box-sizing: border-box; + content: " "; + height: 200%; + left: 0; + pointer-events: none; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; +} + +.solid::after { + border: 1rpx solid rgba(0, 0, 0, .1); +} + +.solid-top::after { + border-top: 1rpx solid rgba(0, 0, 0, .1); +} + +.solid-right::after { + border-right: 1rpx solid rgba(0, 0, 0, .1); +} + +.solid-bottom::after { + border-bottom: 1rpx solid rgba(0, 0, 0, .1); +} + +.solid-left::after { + border-left: 1rpx solid rgba(0, 0, 0, .1); +} + +.solids::after { + border: 8rpx solid #eee; +} + +.solids-top::after { + border-top: 8rpx solid #eee; +} + +.solids-right::after { + border-right: 8rpx solid #eee; +} + +.solids-bottom::after { + border-bottom: 8rpx solid #eee; +} + +.solids-left::after { + border-left: 8rpx solid #eee; +} + +.dashed::after { + border: 1rpx dashed #ddd; +} + +.dashed-top::after { + border-top: 1rpx dashed #ddd; +} + +.dashed-right::after { + border-right: 1rpx dashed #ddd; +} + +.dashed-bottom::after { + border-bottom: 1rpx dashed #ddd; +} + +.dashed-left::after { + border-left: 1rpx dashed #ddd; +} + +.shadow[class*="white"] { + --ShadowSize: 0 1rpx 6rpx; +} + +.shadow-lg { + --ShadowSize: 0rpx 40rpx 100rpx 0rpx; +} + +.shadow-warp { + box-shadow: 0 0 10rpx rgba(0, 0, 0, .1); + position: relative; +} + +.shadow-warp:after, +.shadow-warp:before { + bottom: 30rpx; + box-shadow: 0 30rpx 20rpx rgba(0, 0, 0, .2); + content: ""; + left: 20rpx; + position: absolute; + top: 20rpx; + transform: rotate(-3deg); + width: 50%; + z-index: -1; +} + +.shadow-warp:after { + left: auto; + right: 20rpx; + transform: rotate(3deg); +} + +.shadow-blur { + position: relative; +} + +.shadow-blur::before { + background: inherit; + border-radius: inherit; + content: ""; + display: block; + filter: blur(10rpx); + height: 100%; + left: 10rpx; + opacity: .4; + position: absolute; + top: 10rpx; + transform: scale(1, 1); + transform-origin: 0 0; + width: 100%; + z-index: -1; +} + +.cu-btn { + align-items: center; + border: 0rpx; + box-sizing: border-box; + display: inline-flex; + font-size: 28rpx; + height: 90rpx; + justify-content: center; + line-height: 1; + margin-left: 0; + margin-right: 0; + overflow: visible; + padding: 20rpx 30rpx; + position: relative; + text-align: center; + text-decoration: none; + transform: translate(0rpx, 0rpx); +} + +.cu-btn::after { + background-color: #f5f5f5; + display: none; +} + +.cu-btn:active, +.cu-btn:focus { + background-color: #f5f5f5; + color: #000; +} + +.cu-btn:not([class*="bg-"]) { + background-color: #f0f0f0; +} + +.cu-btn[class*="line"] { + background-color: initial; +} + +.cu-btn[class*="line"]::after { + border: 1rpx solid; + border-radius: 12rpx; + box-sizing: border-box; + content: " "; + display: block; + height: 200%; + left: 0; + pointer-events: none; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; + z-index: 1; +} + +.cu-btn.foot { + box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, .1); + z-index: 1024; +} + +.cu-btn.foot, +.foot { + bottom: 0; + position: fixed; + width: 100%; +} + +.foot { + z-index: 10; +} + +.cu-btn.round[class*="line"]::after { + border-radius: 1000rpx; +} + +.cu-btn.radius[class*="line"]::after { + border-radius: 10rpx; +} + +.cu-btn[class*="lines"]::after { + border: 6rpx solid; +} + +.cu-btn[class*="bg-"]::after { + display: none; +} + +.cu-btn.sm { + font-size: 20rpx; + height: 48rpx; + padding: 0 20rpx; +} + +.cu-btn.lg { + font-size: 32rpx; + height: 80rpx; + padding: 0 40rpx; +} + +.cu-btn.icon.sm { + height: 48rpx; + width: 48rpx; +} + +.cu-btn.icon { + border-radius: 500rpx; + height: 64rpx; + padding: 0; + width: 64rpx; +} + +button.icon.lg { + height: 80rpx; + width: 80rpx; +} + +.image-32 { + height: 64rpx; + width: 64rpx; +} + +.image-64 { + height: 128rpx; + width: 128rpx; +} + +.cu-btn.shadow-blur::before { + filter: blur(6rpx); + left: 4rpx; + opacity: .6; + top: 4rpx; +} + +.cu-btn.button-hover { + transform: translate(1rpx, 1rpx); +} + +.block { + display: block; +} + +.cu-btn.block { + display: flex; +} + +.cu-btn[disabled] { + color: var(--white); + opacity: .6; +} + +.cu-tag { + align-items: center; + box-sizing: border-box; + display: inline-flex; + font-family: Helvetica Neue, Helvetica, sans-serif; + height: 48rpx; + justify-content: center; + padding: 0rpx 16rpx; + position: relative; + vertical-align: middle; + white-space: nowrap; +} + +.cu-tag:not([class*="bg"]):not([class*="line"]) { + background-color: var(--ghostWhite); +} + +.cu-tag[class*="line-"]::after { + border: 1rpx solid; + border-radius: inherit; + box-sizing: border-box; + content: " "; + height: 200%; + left: 0; + pointer-events: none; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; + z-index: 1; +} + +.cu-tag.radius[class*="line"]::after { + border-radius: 12rpx; +} + +.cu-tag.round[class*="line"]::after { + border-radius: 1000rpx; +} + +.cu-tag[class*="line-"]::after { + border-radius: 0; +} + +.cu-tag+.cu-tag { + margin-left: 10rpx; +} + +.cu-tag.sm { + font-size: 20rpx; + height: 32rpx; + padding: 0rpx 12rpx; +} + +.cu-tag.lg { + font-size: 24rpx; + height: 20px; + padding: 0rpx 12rpx; +} + +.cu-capsule { + display: inline-flex; + vertical-align: middle; +} + +.cu-capsule+.cu-capsule { + margin-left: 0rpx; +} + +.cu-capsule .cu-tag { + margin: 0; +} + +.cu-capsule .cu-tag[class*="line-"]:last-child::after { + border-left: 0rpx solid transparent; +} + +.cu-capsule .cu-tag[class*="line-"]:first-child::after { + border-right: 0rpx solid transparent; +} + +.cu-capsule.radius .cu-tag:first-child { + border-bottom-left-radius: 6rpx; + border-top-left-radius: 6rpx; +} + +.cu-capsule.radius .cu-tag:last-child::after, +.cu-capsule.radius .cu-tag[class*="line-"] { + border-bottom-right-radius: 12rpx; + border-top-right-radius: 12rpx; +} + +.cu-capsule.round .cu-tag:first-child { + border-bottom-left-radius: 200rpx; + border-top-left-radius: 200rpx; + text-indent: 4rpx; +} + +.cu-capsule.round .cu-tag:last-child, +.cu-capsule.round .cu-tag:last-child::after { + border-bottom-right-radius: 200rpx; + border-top-right-radius: 200rpx; + text-indent: -4rpx; +} + +.cu-tag.badge { + border-radius: 200rpx; + color: var(--white); + font-size: 20rpx; + height: 28rpx; + padding: 0rpx 10rpx; + position: absolute; + right: -10rpx; + top: -10rpx; +} + +.cu-tag.badge:not([class*="bg-"]) { + background-color: #dd514c; +} + +.cu-tag.badgegray { + border-radius: 200rpx; + color: var(--white); + font-size: 20rpx; + height: 28rpx; + padding: 0rpx 10rpx; + position: absolute; + right: -10rpx; + top: -10rpx; +} + +.cu-tag.badgegray:not([class*="bg-"]) { + background-color: #555; +} + +.cu-tag:empty:not([class*="cuIcon-"]) { + height: 16rpx; + padding: 0rpx; + right: -4rpx; + top: -4rpx; + width: 16rpx; +} + +.cu-tag[class*="cuIcon-"] { + height: 32rpx; + right: -4rpx; + top: -4rpx; + width: 32rpx; +} + +.cu-avatar { + align-items: center; + background-color: #ccc; + background-position: 50%; + background-size: cover; + color: var(--white); + display: inline-flex; + font-size: 1.5em; + font-variant: small-caps; + height: 64rpx; + justify-content: center; + margin: 0; + padding: 0; + position: relative; + text-align: center; + vertical-align: middle; + white-space: nowrap; + width: 64rpx; +} + +.cu-avatar.sm { + font-size: 1em; + height: 48rpx; + width: 48rpx; +} + +.cu-avatar.lg { + font-size: 2em; + height: 96rpx; + width: 96rpx; +} + +.cu-avatar.xl { + font-size: 2.5em; + height: 128rpx; + width: 128rpx; +} + +.cu-avatar .avatar-text { + font-size: .4em; +} + +.cu-avatar-group { + direction: rtl; + display: inline-block; + padding: 0 10rpx 0 40rpx; + unicode-bidi: bidi-override; +} + +.cu-avatar-group .cu-avatar { + border: 4rpx solid var(--ghostWhite); + margin-left: -30rpx; + vertical-align: middle; +} + +.cu-avatar-group .cu-avatar.sm { + border: 1rpx solid var(--ghostWhite); + margin-left: -20rpx; +} + +.cu-progress { + align-items: center; + background-color: #ebeef5; + display: inline-flex; + height: 28rpx; + overflow: hidden; + width: 100%; +} + +.cu-progress+text, +.cu-progress+view { + line-height: 1; +} + +.cu-progress.xs { + height: 10rpx; +} + +.cu-progress.sm { + height: 20rpx; +} + +.cu-progress view { + color: var(--white); + height: 100%; + justify-content: space-around; + justify-items: flex-end; + transition: width .6s ease; + width: 0; +} + +.cu-progress text, +.cu-progress view { + align-items: center; + display: flex; + font-size: 20rpx; +} + +.cu-progress text { + color: var(--black); + text-indent: 10rpx; +} + +.cu-progress.text-progress { + padding-right: 60rpx; +} + +.cu-progress.striped view { + background-image: linear-gradient(45deg, hsla(0, 0%, 100%, .15) 25%, transparent 0, transparent 50%, hsla(0, 0%, 100%, .15) 0, hsla(0, 0%, 100%, .15) 75%, transparent 0, transparent); + background-size: 72rpx 72rpx; +} + +.cu-progress.active view { + animation: progress-stripes 2s linear infinite; +} + +@-webkit-keyframes progress-stripes { + from { + background-position: 72rpx 0; + } + + to { + background-position: 0 0; + } +} + +@keyframes progress-stripes { + from { + background-position: 72rpx 0; + } + + to { + background-position: 0 0; + } +} + +.cu-load { + display: block; + line-height: 3em; + text-align: center; +} + +.cu-load::before { + display: inline-block; + font-family: cuIcon; + margin-right: 6rpx; +} + +.cu-load.loading::before { + animation: cuIcon-spin 2s linear infinite; + content: "\e67a"; +} + +.cu-load.loading::after { + content: "加载中..."; +} + +.cu-load.over::before { + content: "\e64a"; +} + +.cu-load.over::after { + content: "没有更多了"; +} + +.cu-load.erro::before { + content: "\e658"; +} + +.cu-load.erro::after { + content: "加载失败"; +} + +.cu-load.load-icon::before { + font-size: 32rpx; +} + +.cu-load.load-icon.over, +.cu-load.load-icon::after { + display: none; +} + +.cu-load.load-modal { + align-items: center; + background-color: var(--white); + border-radius: 10rpx; + bottom: 140rpx; + box-shadow: 0 0 0rpx 2000rpx rgba(0, 0, 0, .5); + display: flex; + flex-direction: column; + font-size: 28rpx; + height: 260rpx; + justify-content: center; + left: 0; + line-height: 2.4em; + margin: auto; + position: fixed; + right: 0; + top: 0; + width: 260rpx; + z-index: 9999; +} + +.cu-load.load-modal [class*="cuIcon-"] { + font-size: 60rpx; +} + +.cu-load.load-modal image { + height: 70rpx; + width: 70rpx; +} + +.cu-load.load-modal::after { + animation: cuIcon-spin 1s linear infinite; + background-color: var(--white); + border: 6rpx solid rgba(0, 0, 0, .05); + border-left: 6rpx solid var(--orange); + border-radius: 50%; + content: ""; + font-size: 10px; + height: 200rpx; + position: absolute; + width: 200rpx; + z-index: -1; +} + +.load-progress { + left: 0; + pointer-events: none; + position: fixed; + top: 0; + width: 100%; + z-index: 2000; +} + +.load-progress.hide { + display: none; +} + +.load-progress .load-progress-bar { + height: 4rpx; + overflow: hidden; + position: relative; + transition: all .2s ease 0s; + width: 100%; +} + +.load-progress .load-progress-spinner { + display: block; + position: absolute; + right: 10rpx; + top: 10rpx; + z-index: 2000; +} + +.load-progress .load-progress-spinner::after { + animation: load-progress-spinner .4s linear infinite; + border: 4rpx solid transparent; + border-left-color: inherit; + border-radius: 50%; + border-top-color: inherit; + box-sizing: border-box; + content: ""; + display: block; + height: 24rpx; + width: 24rpx; +} + +@-webkit-keyframes load-progress-spinner { + 0% { + transform: rotate(0); + } + + 100% { + transform: rotate(1turn); + } +} + +@keyframes load-progress-spinner { + 0% { + transform: rotate(0); + } + + 100% { + transform: rotate(1turn); + } +} + +.grayscale { + filter: grayscale(1); +} + +.cu-list+.cu-list { + margin-top: 30rpx; +} + +.cu-list>.cu-item { + transform: translateX(0rpx); + transition: all .6s ease-in-out 0s; +} + +.cu-list>.cu-item.move-cur { + transform: translateX(-260rpx); +} + +.cu-list>.cu-item .move { + display: flex; + height: 100%; + position: absolute; + right: 0; + transform: translateX(100%); + width: 260rpx; +} + +.cu-list>.cu-item .move view { + align-items: center; + display: flex; + flex: 1; + justify-content: center; +} + +.cu-list.menu-avatar { + overflow: hidden; +} + +.cu-list.menu-avatar>.cu-item { + align-items: center; + background-color: var(--white); + display: flex; + height: 160rpx; + justify-content: flex-end; + padding-right: 10rpx; + position: relative; +} + +.cu-list.menu-avatar>.cu-item>.cu-avatar { + left: 30rpx; + position: absolute; +} + +.cu-list.menu-avatar>.cu-item .flex .text-cut { + max-width: 510rpx; +} + +.cu-list.menu-avatar>.cu-item .content { + left: 165rpx; + line-height: 1.6em; + position: absolute; + width: calc(100% - 96rpx - 60rpx - 120rpx - 20rpx); +} + +.cu-list.menu-avatar>.cu-item .content.flex-sub { + width: calc(100% - 96rpx - 60rpx - 20rpx); +} + +.cu-list.menu-avatar>.cu-item .content>view:first-child { + align-items: center; + display: flex; + font-size: 30rpx; +} + +.cu-list.menu-avatar>.cu-item .content .cu-tag.sm { + display: inline-block; + font-size: 16rpx; + height: 28rpx; + line-height: 32rpx; + margin-left: 10rpx; +} + +.cu-list.menu-avatar>.cu-item .action { + text-align: center; + width: 120rpx; +} + +.cu-list.menu-avatar>.cu-item .action view+view { + margin-top: 10rpx; +} + +.cu-list.menu-avatar.comment>.cu-item .content { + flex: 1; + left: 0; + position: relative; + width: auto; +} + +.cu-list.menu-avatar.comment>.cu-item { + height: auto; + padding: 30rpx 30rpx 30rpx 120rpx; +} + +.cu-list.menu-avatar.comment .cu-avatar { + align-self: flex-start; +} + +.cu-list.menu>.cu-item { + align-items: center; + background-color: var(--white); + display: flex; + justify-content: space-between; + min-height: 100rpx; + padding: 0 30rpx; + position: relative; +} + +.cu-list.menu>.cu-item:last-child:after { + border: none; +} + +.border-line { + border: 1rpx solid #ddd; + border-radius: 10rpx; +} + +.cu-list.menu>.cu-item:after { + border-bottom: 1rpx solid #ddd; + border-radius: inherit; + box-sizing: border-box; + content: " "; + height: 200%; + left: 0; + pointer-events: none; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; +} + +.cu-list.menu>.cu-item.grayscale { + background-color: #f5f5f5; +} + +.cu-list.menu>.cu-item.cur { + background-color: #fcf7e9; +} + +.cu-list.menu>.cu-item.arrow { + padding-right: 90rpx; +} + +.cu-list.menu>.cu-item.arrow:before { + bottom: 0; + color: var(--grey); + content: "\e6a3"; + display: block; + font-family: cuIcon; + font-size: 34rpx; + height: 30rpx; + line-height: 30rpx; + margin: auto; + position: absolute; + right: 30rpx; + text-align: center; + top: 0; + width: 30rpx; +} + +.cu-list.menu>.cu-item button.content { + background-color: initial; + justify-content: flex-start; + padding: 0; +} + +.cu-list.menu>.cu-item button.content:after { + display: none; +} + +.cu-list.menu>.cu-item .cu-avatar-group .cu-avatar { + border-color: var(--white); +} + +.cu-list.menu>.cu-item .content>view:first-child { + align-items: center; + display: flex; +} + +.cu-list.menu>.cu-item .content>text[class*=cuIcon] { + display: inline-block; + margin-right: 10rpx; + text-align: center; + width: 1.6em; +} + +.cu-list.menu>.cu-item .content>image { + display: inline-block; + height: 1.6em; + margin-right: 10rpx; + vertical-align: middle; + width: 1.6em; +} + +.cu-list.menu>.cu-item .content { + flex: 1; + font-size: 30rpx; + line-height: 1.6em; +} + +.cu-list.menu>.cu-item .content .cu-tag.sm { + display: inline-block; + font-size: 16rpx; + height: 28rpx; + line-height: 32rpx; + margin-left: 10rpx; +} + +.cu-list.menu>.cu-item .action .cu-tag:empty { + right: 10rpx; +} + +.cu-list.menu { + display: block; + overflow: hidden; +} + +.cu-list.menu.sm-border>.cu-item:after { + left: 30rpx; + width: calc(200% - 120rpx); +} + +.cu-list.grid>.cu-item { + display: flex; + flex-direction: column; + padding: 20rpx 0 30rpx; + position: relative; + transition-duration: 0s; +} + +.cu-list.grid>.cu-item:after { + border-bottom: 1px solid rgba(0, 0, 0, .1); + border-radius: inherit; + border-right: 1px solid rgba(0, 0, 0, .1); + box-sizing: border-box; + content: " "; + height: 200%; + left: 0; + pointer-events: none; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; +} + +.cu-list.grid>.cu-item text { + color: #888; + display: block; + font-size: 26rpx; + line-height: 40rpx; + margin-top: 10rpx; +} + +.cu-list.grid>.cu-item [class*=cuIcon] { + display: block; + font-size: 48rpx; + margin-top: 20rpx; + position: relative; + width: 100%; +} + +.cu-list.grid>.cu-item .cu-tag { + left: 50%; + margin-left: 20rpx; + right: auto; +} + +.cu-list.grid { + background-color: var(--white); + text-align: center; +} + +.cu-list.grid.no-border>.cu-item { + padding-bottom: 20rpx; + padding-top: 10rpx; +} + +.cu-list.grid.no-border>.cu-item:after { + border: none; +} + +.cu-list.grid.no-border { + padding: 0rpx 20rpx; +} + +.cu-list.grid.col-3>.cu-item:nth-child(3n):after, +.cu-list.grid.col-4>.cu-item:nth-child(4n):after, +.cu-list.grid.col-5>.cu-item:nth-child(5n):after { + border-right-width: 0; +} + +.cu-list.card-menu { + border-radius: 20rpx; + margin-left: 30rpx; + margin-right: 30rpx; + overflow: hidden; +} + +.cu-bar { + justify-content: space-between; + min-height: 60rpx; + position: relative; +} + +.cu-bar, +.cu-bar .action { + align-items: center; + display: flex; +} + +.cu-bar .action { + height: 100%; + justify-content: center; + max-width: 100%; +} + +.cu-bar .action.border-title { + position: relative; + top: -10rpx; +} + +.cu-bar .action.border-title text[class*="bg-"]:last-child { + bottom: -.5rem; + height: 6rpx; + left: 0; + min-width: 2rem; + position: absolute; +} + +.cu-bar .action.sub-title { + position: relative; + top: -.2rem; +} + +.cu-bar .action.sub-title text { + position: relative; + z-index: 1; +} + +.cu-bar .action.sub-title text[class*="bg-"]:last-child { + border-radius: 6rpx; + bottom: -.2rem; + display: inline-block; + height: .6rem; + left: .6rem; + opacity: .3; + position: absolute; + width: 100%; + z-index: 0; +} + +.cu-bar .action.sub-title text[class*="text-"]:last-child { + bottom: -.7rem; + display: inline-block; + font-size: 36rpx; + font-weight: 900; + left: .5rem; + opacity: .2; + position: absolute; + text-align: right; + z-index: 0; +} + +.cu-bar.justify-center .action.border-title text:last-child, +.cu-bar.justify-center .action.sub-title text:last-child { + left: 0; + margin: auto; + right: 0; + text-align: center; +} + +.cu-bar .action:first-child { + font-size: 30rpx; + margin-left: 20rpx; +} + +.cu-bar .action text.text-cut { + text-align: left; + width: 100%; +} + +.cu-bar .cu-avatar:first-child { + margin-left: 20rpx; +} + +.cu-bar .action:first-child>text[class*="cuIcon-"] { + margin-left: -.3em; + margin-right: .3em; +} + +.cu-bar .action:last-child { + margin-right: 30rpx; +} + +.cu-bar .action>text[class*="cuIcon-"], +.cu-bar .action>view[class*="cuIcon-"] { + font-size: 36rpx; +} + +.cu-bar .action>text[class*="cuIcon-"]+text[class*="cuIcon-"] { + margin-left: .5em; +} + +.cu-bar .content { + bottom: 0; + cursor: none; + font-size: 32rpx; + height: 60rpx; + left: 0; + line-height: 60rpx; + margin: auto; + overflow: hidden; + position: absolute; + right: 0; + text-align: center; + text-overflow: ellipsis; + top: 0; + white-space: nowrap; + width: calc(100% - 340rpx); +} + +.cu-bar.ios .content { + bottom: 7px; + font-size: 32rpx; + height: 30px; + line-height: 30px; +} + +.cu-bar.btn-group { + justify-content: space-around; +} + +.cu-bar.btn-group button { + flex: 1; + margin: 0 20rpx; + max-width: 50%; + padding: 20rpx 32rpx; +} + +.cu-bar .search-form { + align-items: center; + background-color: #f5f5f5; + color: var(--black); + display: flex; + flex: 1; + font-size: 24rpx; + height: 64rpx; + line-height: 64rpx; + margin: 0 30rpx; +} + +.cu-bar .search-form+.action { + margin-right: 30rpx; +} + +.cu-bar .search-form input { + background-color: initial; + flex: 1; + font-size: 26rpx; + height: 64rpx; + line-height: 64rpx; + padding-right: 30rpx; +} + +.cu-bar .search-form [class*="cuIcon-"] { + margin: 0 .5em 0 .8em; +} + +.cu-bar .search-form [class*="cuIcon-"]::before { + top: 0rpx; +} + +.cu-bar.fixed, +.nav.fixed { + box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, .1); + position: fixed; + top: 0; + width: 100%; + z-index: 1024; +} + +.cu-bar.foot { + bottom: 0; + box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, .1); + position: fixed; + width: 100%; + z-index: 1024; +} + +.cu-bar.tabbar { + padding: 0 0 calc(env(safe-area-inset-bottom) / 2); +} + +.cu-bar.tabbar, +.cu-tabbar-height { + height: calc(100rpx + env(safe-area-inset-bottom) / 2); +} + +.cu-tabbar-height { + min-height: 100rpx; +} + +.cu-bar.tabbar.shadow { + box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, .1); +} + +.cu-bar.tabbar .action { + display: block; + flex: 1; + font-size: 22rpx; + height: auto; + line-height: 1; + margin: 0; + overflow: initial; + padding: 0; + position: relative; + text-align: center; +} + +.cu-bar.tabbar.shop .action { + flex: initial; + width: 140rpx; +} + +.cu-bar.tabbar .action.add-action { + background-color: inherit; + padding-top: 50rpx; + position: relative; + z-index: 2; +} + +.cu-bar.tabbar .action.add-action [class*="cuIcon-"] { + border-radius: 50%; + font-size: 50rpx; + height: 70rpx; + left: 0; + line-height: 70rpx; + margin: auto; + padding: 0; + position: absolute; + right: 0; + top: -35rpx; + width: 70rpx; + z-index: 2; +} + +.cu-bar.tabbar .action.add-action::after { + border-radius: 50rpx; + box-shadow: 0 -3rpx 8rpx rgba(0, 0, 0, .08); + height: 100rpx; + top: -50rpx; + z-index: 0; +} + +.cu-bar.tabbar .action.add-action::after, +.cu-bar.tabbar .action.add-action::before { + background-color: inherit; + content: ""; + left: 0; + margin: auto; + position: absolute; + right: 0; + width: 100rpx; +} + +.cu-bar.tabbar .action.add-action::before { + bottom: 30rpx; + height: 30rpx; + z-index: 1; +} + +.cu-bar.tabbar .btn-group { + align-items: center; + display: flex; + flex: 1; + justify-content: space-around; + padding: 0 10rpx; +} + +.cu-bar.tabbar button.action::after { + border: 0; +} + +.cu-bar.tabbar .action [class*="cuIcon-"] { + display: block; + font-size: 40rpx; + height: auto; + margin: 0 auto 10rpx; + position: relative; + text-align: center; + width: 100rpx; +} + +.cu-bar.tabbar .action .cuIcon-cu-image { + margin: 0 auto; +} + +.cu-bar.tabbar .action .cuIcon-cu-image image { + display: inline-block; + height: 50rpx; + width: 50rpx; +} + +.cu-bar.tabbar .submit { + align-items: center; + align-self: stretch; + display: flex; + flex: 2; + justify-content: center; + position: relative; + text-align: center; +} + +.cu-bar.tabbar .submit:last-child { + flex: 2.6; +} + +.cu-bar.tabbar .submit+.submit { + flex: 2; +} + +.cu-bar.tabbar.border .action::before { + border-right: 1rpx solid rgba(0, 0, 0, .1); + content: " "; + height: 200%; + left: 0; + position: absolute; + top: 0; + transform: scale(.5); + transform-origin: 0 0; + width: 200%; + z-index: 3; +} + +.cu-bar.tabbar.border .action:last-child:before { + display: none; +} + +.cu-bar.input { + background-color: var(--white); + padding-right: 20rpx; +} + +.cu-bar.input input { + flex: 1; + font-size: 30rpx; + height: 64rpx; + line-height: 64rpx; + margin: 0 20rpx; + min-height: 64rpx; + overflow: initial; +} + +.cu-bar.input .action { + margin-left: 20rpx; +} + +.cu-bar.input .action [class*="cuIcon-"] { + font-size: 48rpx; +} + +.cu-bar.input input+.action { + margin-left: 0rpx; + margin-right: 20rpx; +} + +.cu-bar.input .action:first-child [class*="cuIcon-"] { + margin-left: 0rpx; +} + +.cu-custom { + display: block; + position: relative; +} + +.cu-custom .cu-bar .content { + width: calc(100% - 440rpx); +} + +.cu-custom .cu-bar .content image { + height: 60rpx; + width: 240rpx; +} + +.cu-custom .cu-bar { + box-shadow: 0rpx 0rpx 0rpx; + min-height: 0; + padding-right: 220rpx; + z-index: 9999; +} + +.cu-custom .cu-bar .border-custom { + background: rgba(0, 0, 0, .15); + border-radius: 1000rpx; + height: 30px; + position: relative; +} + +.cu-custom .cu-bar .border-custom::after { + border: 1rpx solid var(--white); + border-radius: inherit; + height: 200%; + opacity: .5; + top: 0; + width: 200%; +} + +.cu-custom .cu-bar .border-custom::after, +.cu-custom .cu-bar .border-custom::before { + box-sizing: border-box; + content: " "; + left: 0; + pointer-events: none; + position: absolute; + transform: scale(.5); + transform-origin: 0 0; +} + +.cu-custom .cu-bar .border-custom::before { + background-color: var(--white); + height: 110%; + margin: auto; + opacity: .6; + right: 0; + top: 22.5%; + width: 1rpx; +} + +.cu-custom .cu-bar .border-custom text { + display: block; + flex: 1; + font-size: 34rpx; + margin: auto !important; + text-align: center; +} + +.nav { + white-space: nowrap; +} + +::-webkit-scrollbar { + display: none; +} + +.nav .cu-item { + display: inline-block; + height: 90rpx; + line-height: 90rpx; + margin: 0 10rpx; + padding: 0 20rpx; +} + +.nav .cu-item.cur { + border-bottom: 4rpx solid; +} + +.cu-timeline { + background-color: var(--white); + display: block; +} + +.cu-timeline .cu-time { + color: #888; + display: block; + font-size: 26rpx; + padding: 20rpx 0; + text-align: center; + width: 120rpx; +} + +.cu-timeline>.cu-item { + display: block; + padding: 30rpx 30rpx 30rpx 120rpx; + position: relative; + z-index: 0; +} + +.cu-timeline>.cu-item:not([class*="text-"]) { + color: #ccc; +} + +.cu-timeline>.cu-item::after { + background-color: #ddd; + content: ""; + display: block; + height: 100%; + left: 60rpx; + position: absolute; + top: 0; + width: 1rpx; + z-index: 8; +} + +.cu-timeline>.cu-item::before { + background-color: var(--white); + border: none; + display: block; + font-family: cuIcon; + height: 50rpx; + left: 36rpx; + line-height: 50rpx; + position: absolute; + text-align: center; + top: 36rpx; + width: 50rpx; + z-index: 9; +} + +.cu-timeline>.cu-item:not([class*="cuIcon-"])::before { + content: "\e763"; +} + +.cu-timeline>.cu-item[class*="cuIcon-"]::before { + background-color: var(--white); + border: none; + height: 50rpx; + left: 36rpx; + line-height: 50rpx; + text-align: center; + width: 50rpx; +} + +.cu-timeline>.cu-item>.content { + border-radius: 6rpx; + display: block; + line-height: 1.6; + padding: 30rpx; +} + +.cu-timeline>.cu-item>.content:not([class*="bg-"]) { + background-color: var(--ghostWhite); + color: var(--black); +} + +.cu-timeline>.cu-item>.content+.content { + margin-top: 20rpx; +} + +.cu-chat { + flex-direction: column; +} + +.cu-chat, +.cu-chat .cu-item { + display: flex; +} + +.cu-chat .cu-item { + padding: 30rpx 30rpx 70rpx; + position: relative; +} + +.cu-chat .cu-item>.cu-avatar { + height: 80rpx; + width: 80rpx; +} + +.cu-chat .cu-item>.main { + align-items: center; + display: flex; + margin: 0 40rpx; + max-width: calc(100% - 260rpx); +} + +.cu-chat .cu-item>image { + height: 320rpx; +} + +.cu-chat .cu-item>.main .content { + align-items: center; + border-radius: 6rpx; + display: inline-flex; + font-size: 30rpx; + line-height: 40rpx; + max-width: 100%; + min-height: 80rpx; + padding: 20rpx; + position: relative; + text-align: left; +} + +.cu-chat .cu-item>.main .content:not([class*="bg-"]) { + background-color: var(--white); + color: var(--black); +} + +.cu-chat .cu-item .date { + bottom: 20rpx; + color: var(--grey); + font-size: 24rpx; + left: 160rpx; + position: absolute; + width: calc(100% - 320rpx); +} + +.cu-chat .cu-item .action { + align-items: center; + display: flex; + padding: 0 30rpx; +} + +.cu-chat .cu-item>.main .content::after { + background-color: inherit; + content: ""; + display: inline-block; + height: 24rpx; + left: -12rpx; + overflow: hidden; + position: absolute; + right: auto; + top: 27rpx; + transform: rotate(45deg); + width: 24rpx; + z-index: 100; +} + +.cu-chat .cu-item.self>.main .content::after { + left: auto; + right: -12rpx; +} + +.cu-chat .cu-item>.main .content::before { + background-color: inherit; + content: ""; + display: inline-block; + filter: blur(5rpx); + height: 24rpx; + left: -12rpx; + opacity: .3; + overflow: hidden; + position: absolute; + right: auto; + top: 30rpx; + transform: rotate(45deg); + width: 24rpx; + z-index: -1; +} + +.cu-chat .cu-item>.main .content:not([class*="bg-"])::before { + background-color: var(--black); + opacity: .1; +} + +.cu-chat .cu-item.self>.main .content::before { + left: auto; + right: -12rpx; +} + +.cu-chat .cu-item.self { + justify-content: flex-end; + text-align: right; +} + +.cu-chat .cu-info { + background-color: rgba(0, 0, 0, .2); + border-radius: 6rpx; + color: var(--white); + display: inline-block; + font-size: 24rpx; + line-height: 1.4; + margin: 20rpx auto; + max-width: 400rpx; + padding: 8rpx 12rpx; +} + +.cu-card, +.cu-card>.cu-item { + display: block; + overflow: hidden; +} + +.cu-card>.cu-item { + background-color: var(--white); + border-radius: 10rpx; + margin: 10rpx; +} + +.cu-card>.cu-item.shadow-blur { + overflow: initial; +} + +.cu-card.no-card>.cu-item { + border-radius: 0rpx; + margin: 0rpx; +} + +.cu-card .grid.grid-square { + margin-bottom: -20rpx; +} + +.cu-card.case .image { + position: relative; +} + +.cu-card.case .image image { + width: 100%; +} + +.cu-card.case .image .cu-tag { + left: 0; + position: absolute; + top: 0; +} + +.cu-card.case .image .cu-bar { + background-color: initial; + bottom: 0; + padding: 0rpx 30rpx; + position: absolute; + width: 100%; +} + +.cu-card.case.no-card .image { + border-radius: 10rpx; + margin: 30rpx 30rpx 0; + overflow: hidden; +} + +.cu-card.dynamic { + display: block; +} + +.cu-card.dynamic>.cu-item { + background-color: var(--white); + display: block; + overflow: hidden; +} + +.cu-card.dynamic>.cu-item>.text-content { + font-size: 30rpx; + margin-bottom: 20rpx; + max-height: 6.4em; + overflow: hidden; + padding: 0 30rpx; +} + +.cu-card.dynamic>.cu-item .square-img { + border-radius: 6rpx; + height: 200rpx; + width: 100%; +} + +.cu-card.dynamic>.cu-item .only-img { + border-radius: 6rpx; + height: 320rpx; + width: 100%; +} + +.cu-card.article { + display: block; +} + +.cu-card.article>.cu-item { + padding-bottom: 30rpx; +} + +.cu-card.article>.cu-item .title { + color: var(--black); + font-size: 30rpx; + font-weight: 900; + line-height: 100rpx; + padding: 0 30rpx; +} + +.cu-card.article>.cu-item .content { + display: flex; + padding: 0 30rpx; +} + +.cu-card.article>.cu-item .content>image { + border-radius: 6rpx; + height: 8.4em; + margin-right: 20rpx; + width: 240rpx; +} + +.cu-card.article>.cu-item .content .desc { + display: flex; + flex: 1; + flex-direction: column; + justify-content: space-between; +} + +.cu-card.article>.cu-item .content .text-content { + color: #888; + font-size: 28rpx; + height: 4.8em; + overflow: hidden; +} + +.cu-form-group { + align-items: center; + background-color: var(--white); + display: flex; + justify-content: space-between; + min-height: 80rpx; +} + +.cu-form-group+.cu-form-group { + border-top: 1rpx solid #eee; +} + +.cu-form-group .title { + font-size: 32rpx; + line-height: 80rpx; + padding-right: 20rpx; + position: relative; + text-align: justify; +} + +.cu-form-group .title-right { + text-align: right; +} + +.cu-form-group .title-left, +.cu-form-group .title-right { + font-size: 30rpx; + height: 60rpx; + line-height: 60rpx; + padding-right: 20rpx; + position: relative; +} + +.cu-form-group .title-left { + text-align: left; +} + +.cu-form-group input { + color: #555; + flex: 1; + font-size: 30rpx; + padding-right: 20rpx; +} + +.cu-form-group .content { + color: #000; +} + +.cu-form-group .content, +.cu-form-group .content-red { + flex: 1; + font-size: 30rpx; + padding-right: 20rpx; + text-align: right; +} + +.cu-form-group .content-red { + color: red; +} + +.cu-form-group .content-left { + color: #000; + flex: 1; + font-size: 30rpx; + padding-right: 20rpx; + text-align: left; +} + +.cu-form-group>text[class*="cuIcon-"] { + box-sizing: border-box; + font-size: 36rpx; + padding: 0; +} + +.cu-form-group textarea { + flex: 1; + font-size: 28rpx; + height: 6em; + line-height: 1.2em; + margin: 0 0 30rpx; + padding: 10rpx; + width: 100%; +} + +.cu-form-group.align-start .title { + height: 1em; + line-height: 1em; + margin-top: 32rpx; +} + +.cu-form-group picker { + flex: 1; + overflow: hidden; + padding-right: 40rpx; + position: relative; +} + +.cu-form-group picker .picker { + font-size: 32rpx; + text-align: right; +} + +.cu-form-group picker .picker, +.cu-form-group picker .picker-left { + line-height: 60rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; +} + +.cu-form-group picker .picker-left { + font-size: 28rpx; + text-align: left; +} + +.cu-form-group picker::after { + bottom: 0; + color: var(--grey); + content: "\e6a3"; + display: block; + font-family: cuIcon; + font-size: 34rpx; + line-height: 60rpx; + margin: auto; + position: absolute; + right: -20rpx; + text-align: center; + top: 0; + width: 60rpx; +} + +.cu-form-group textarea[disabled], +.cu-form-group textarea[disabled] .placeholder { + color: transparent; +} + +.cu-modal { + backface-visibility: hidden; + background: rgba(0, 0, 0, .6); + bottom: 0; + left: 0; + opacity: 0; + outline: 0; + perspective: 2000rpx; + pointer-events: none; + position: fixed; + right: 0; + text-align: center; + top: 0; + transform: scale(1.185); + transition: all .3s ease-in-out 0s; + z-index: 1110; +} + +.cu-modal::before { + content: "\200B"; + display: inline-block; + height: 100%; + vertical-align: middle; +} + +.cu-modal.show { + opacity: 1; + overflow-x: hidden; + overflow-y: auto; + pointer-events: auto; + transform: scale(1); + transition-duration: .3s; +} + +.cu-dialog { + background-color: #f8f8f8; + border-radius: 10rpx; + display: inline-block; + margin-left: auto; + margin-right: auto; + max-width: 100%; + overflow: hidden; + position: relative; + vertical-align: middle; + width: 680rpx; +} + +.cu-modal.bottom-modal::before { + vertical-align: bottom; +} + +.cu-modal.bottom-modal .cu-dialog { + border-radius: 0; + width: 100%; +} + +.cu-modal.bottom-modal { + margin-bottom: -1000rpx; +} + +.cu-modal.bottom-modal.show { + margin-bottom: 0; +} + +.cu-modal.drawer-modal { + display: flex; + transform: scale(1); +} + +.cu-modal.drawer-modal .cu-dialog { + border-radius: 0; + height: 100%; + margin: initial; + min-width: 200rpx; + transition-duration: .3s; +} + +.cu-modal.drawer-modal.justify-start .cu-dialog { + transform: translateX(-100%); +} + +.cu-modal.drawer-modal.justify-end .cu-dialog { + transform: translateX(100%); +} + +.cu-modal.drawer-modal.show .cu-dialog { + transform: translateX(0); +} + +.cu-modal .cu-dialog>.cu-bar:first-child .action { + margin-right: 0; + min-height: 100rpx; + min-width: 100rpx; +} + +swiper .a-swiper-dot { + background: rgba(0, 0, 0, .3); + border-radius: 50%; + display: inline-block; + height: 16rpx; + vertical-align: middle; + width: 16rpx; +} + +swiper[class*="-dot"] .wx-swiper-dots { + align-items: center; + display: flex; + justify-content: center; + width: 100%; +} + +swiper.square-dot .wx-swiper-dot { + background-color: var(--white); + border-radius: 20rpx; + height: 10rpx; + margin: 0 8rpx !important; + opacity: .4; + width: 10rpx; +} + +swiper.square-dot .wx-swiper-dot.wx-swiper-dot-active { + opacity: 1; + width: 30rpx; +} + +swiper.round-dot .wx-swiper-dot { + height: 10rpx; + margin: 4rpx 8rpx !important; + position: relative; + width: 10rpx; +} + +swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active::after { + background-color: var(--white); + border-radius: 20rpx; + bottom: 0; + content: ""; + height: 10rpx; + left: 0rpx; + margin: auto; + position: absolute; + right: 0; + top: 0rpx; + width: 10rpx; +} + +swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active { + height: 18rpx; + width: 18rpx; +} + +.screen-swiper { + min-height: 375rpx; +} + +.screen-swiper-lg { + min-height: 245rpx; +} + +.screen-swiper.xl { + height: 600rpx; +} + +.screen-swiper image, +.screen-swiper video, +.swiper-item image, +.swiper-item video { + display: block; + height: 100%; + margin: 0; + pointer-events: none; + width: 100%; +} + +.card-swiper { + height: 420rpx !important; +} + +.card-swiper swiper-item { + box-sizing: border-box; + left: 70rpx; + overflow: initial; + padding: 40rpx 0rpx 70rpx; + width: 610rpx !important; +} + +.card-swiper swiper-item .swiper-item { + border-radius: 10rpx; + display: block; + height: 100%; + overflow: hidden; + transform: scale(.9); + transition: all .2s ease-in 0s; + width: 100%; +} + +.card-swiper swiper-item.cur .swiper-item { + transform: none; + transition: all .2s ease-in 0s; +} + +.tower-swiper { + height: 420rpx; + max-width: 750rpx; + overflow: hidden; + position: relative; +} + +.tower-swiper .tower-item { + bottom: 0; + height: 380rpx; + left: 50%; + margin: auto; + opacity: 1; + position: absolute; + top: 0; + transition: all .2s ease-in 0s; + width: 300rpx; +} + +.tower-swiper .tower-item.none { + opacity: 0; +} + +.tower-swiper .tower-item .swiper-item { + border-radius: 6rpx; + height: 100%; + overflow: hidden; + width: 100%; +} + +.cu-steps { + display: flex; +} + +scroll-view.cu-steps { + display: block; + white-space: nowrap; +} + +scroll-view.cu-steps .cu-item { + display: inline-block; +} + +.cu-steps .cu-item { + flex: 1; + min-width: 100rpx; + position: relative; + text-align: center; +} + +.cu-steps .cu-item:not([class*="text-"]) { + color: var(--grey); +} + +.cu-steps .cu-item .num, +.cu-steps .cu-item [class*="cuIcon-"] { + display: block; + font-size: 40rpx; + line-height: 80rpx; +} + +.cu-steps .cu-item::after, +.cu-steps .cu-item::before, +.cu-steps.steps-arrow .cu-item::after, +.cu-steps.steps-arrow .cu-item::before { + border-bottom: 1px solid #ccc; + content: ""; + display: block; + height: 0; + left: calc(0px - (100% - 80rpx) / 2); + position: absolute; + top: 40rpx; + width: calc(100% - 80rpx); + z-index: 0; +} + +.cu-steps.steps-arrow .cu-item::after, +.cu-steps.steps-arrow .cu-item::before { + border-bottom-width: 0; + bottom: 0; + color: #ccc; + content: "\e6a3"; + font-family: cuIcon; + height: 30rpx; + line-height: 30rpx; + margin: auto; + top: 0; +} + +.cu-steps.steps-bottom .cu-item::after, +.cu-steps.steps-bottom .cu-item::before { + bottom: 40rpx; + top: auto; +} + +.cu-steps .cu-item::after { + border-bottom: 1px solid; + transition: all .3s ease-in-out 0s; + width: 0; +} + +.cu-steps .cu-item[class*="text-"]::after { + color: currentColor; + width: calc(100% - 80rpx); +} + +.cu-steps .cu-item:first-child::after, +.cu-steps .cu-item:first-child::before { + display: none; +} + +.cu-steps .cu-item .num { + border: 1px solid; + border-radius: 50%; + font-size: 24rpx; + height: 40rpx; + line-height: 40rpx; + margin: 20rpx auto; + overflow: hidden; + position: relative; + width: 40rpx; +} + +.cu-steps .cu-item[class*="text-"] .num { + background-color: currentColor; +} + +.cu-steps .cu-item .num::after, +.cu-steps .cu-item .num::before { + bottom: 0; + content: attr(data-index); + left: 0; + margin: auto; + position: absolute; + right: 0; + top: 0; + transform: translateY(0rpx); + transition: all .3s ease-in-out 0s; +} + +.cu-steps .cu-item[class*="text-"] .num::before { + color: var(--white); + transform: translateY(-40rpx); +} + +.cu-steps .cu-item .num::after { + color: var(--white); + transform: translateY(40rpx); + transition: all .3s ease-in-out 0s; +} + +.cu-steps .cu-item[class*="text-"] .num::after { + color: var(--white); + content: "\e645"; + font-family: cuIcon; + transform: translateY(0rpx); +} + +.cu-steps .cu-item[class*="text-"] .num.err::after { + content: "\e646"; +} + +.flex { + display: flex; +} + +.basis-xs { + flex-basis: 20%; +} + +.basis-sm { + flex-basis: 40%; +} + +.basis-df { + flex-basis: 50%; +} + +.basis-lg { + flex-basis: 60%; +} + +.basis-xl { + flex-basis: 80%; +} + +.flex-sub { + flex: 1; +} + +.flex-twice { + flex: 2; +} + +.flex-treble { + flex: 3; +} + +.flex-direction { + flex-direction: column; +} + +.flex-wrap { + flex-wrap: wrap; +} + +.flex-nowrap { + flex-wrap: nowrap; +} + +.align-start { + align-items: flex-start; +} + +.align-end { + align-items: flex-end; +} + +.align-center { + align-items: center; +} + +.self-start { + align-self: flex-start; +} + +.self-center { + align-self: flex-center; +} + +.selfcenter { + align-self: center; +} + +.self-end { + align-self: flex-end; +} + +.self-stretch { + align-self: stretch; +} + +.align-stretch { + align-items: stretch; +} + +.justify-start { + justify-content: flex-start; +} + +.justify-end { + justify-content: flex-end; +} + +.justify-center { + justify-content: center; +} + +.justify-between { + justify-content: space-between; +} + +.justify-around { + justify-content: space-around; +} + +.grid { + display: flex; + flex-wrap: wrap; +} + +.grid.grid-square { + overflow: hidden; +} + +.grid.grid-square .cu-tag { + background-color: rgba(0, 0, 0, .5); + border-bottom-left-radius: 6rpx; + height: auto; + padding: 6rpx 12rpx; + position: absolute; + right: 0; + top: 0; +} + +.grid.grid-square>view>text[class*="cuIcon-"] { + align-items: center; + bottom: 0; + color: var(--grey); + display: flex; + flex-direction: column; + font-size: 52rpx; + justify-content: center; + left: 0; + margin: auto; + position: absolute; + right: 0; + top: 0; +} + +.grid.grid-square>view { + border-radius: 6rpx; + margin-bottom: 20rpx; + margin-right: 20rpx; + overflow: hidden; + position: relative; +} + +.grid.grid-square>view.bg-img image { + height: 100%; + position: absolute; + width: 100%; +} + +.grid.col-1.grid-square>view { + height: 0; + margin-right: 0; + padding-bottom: 100%; +} + +.grid.col-2.grid-square>view { + height: 0; + padding-bottom: calc((100% - 20rpx)/2); + width: calc((100% - 20rpx)/2); +} + +.grid.col-3.grid-square>view { + height: 0; + padding-bottom: calc((100% - 40rpx)/3); + width: calc((100% - 40rpx)/3); +} + +.grid.col-4.grid-square>view { + height: 0; + padding-bottom: calc((100% - 60rpx)/4); + width: calc((100% - 60rpx)/4); +} + +.grid.col-5.grid-square>view { + height: 0; + padding-bottom: calc((100% - 80rpx)/5); + width: calc((100% - 80rpx)/5); +} + +.grid.col-2.grid-square>view:nth-child(2n), +.grid.col-3.grid-square>view:nth-child(3n), +.grid.col-4.grid-square>view:nth-child(4n), +.grid.col-5.grid-square>view:nth-child(5n) { + margin-right: 0; +} + +.grid.col-1>view { + width: 100%; +} + +.grid.col-2>view { + width: 50%; +} + +.grid.col-3>view { + width: 33.33%; +} + +.grid.col-4>view { + width: 25%; +} + +.grid.col-5>view { + width: 20%; +} + +.margin-0 { + margin: 0; +} + +.margin-xs { + margin: 10rpx; +} + +.margin-sm { + margin: 20rpx; +} + +.margin { + margin: 30rpx; +} + +.margin-lg { + margin: 40rpx; +} + +.margin-xl { + margin: 50rpx; +} + +.margin-top-ls { + margin-top: 2rpx; +} + +.margin-top-xs { + margin-top: 10rpx; +} + +.margin-top-sm { + margin-top: 20rpx; +} + +.margin-top { + margin-top: 30rpx; +} + +.margin-top-lg { + margin-top: 40rpx; +} + +.margin-top-xl { + margin-top: 50rpx; +} + +.margin-right-xs { + margin-right: 10rpx; +} + +.margin-right-sm { + margin-right: 20rpx; +} + +.margin-right { + margin-right: 30rpx; +} + +.margin-right-lg { + margin-right: 40rpx; +} + +.margin-right-xl { + margin-right: 50rpx; +} + +.margin-bottom-xs { + margin-bottom: 10rpx; +} + +.margin-bottom-sm { + margin-bottom: 20rpx; +} + +.margin-bottom { + margin-bottom: 30rpx; +} + +.margin-bottom-lg { + margin-bottom: 40rpx; +} + +.margin-bottom-xl { + margin-bottom: 50rpx; +} + +.margin-bottom-xxl { + margin-bottom: 80rpx; +} + +.margin-bottom-xxxl { + margin-bottom: 130rpx; +} + +.margin-left-xs { + margin-left: 10rpx; +} + +.margin-left-sm { + margin-left: 20rpx; +} + +.margin-left { + margin-left: 30rpx; +} + +.margin-left-lg { + margin-left: 40rpx; +} + +.margin-left-xl { + margin-left: 50rpx; +} + +.margin-lr-xs { + margin-left: 10rpx; + margin-right: 10rpx; +} + +.margin-lr-sm { + margin-left: 20rpx; + margin-right: 20rpx; +} + +.margin-lr { + margin-left: 30rpx; + margin-right: 30rpx; +} + +.margin-lr-lg { + margin-left: 40rpx; + margin-right: 40rpx; +} + +.margin-lr-xl { + margin-left: 50rpx; + margin-right: 50rpx; +} + +.margin-tb-xs { + margin-bottom: 10rpx; + margin-top: 10rpx; +} + +.margin-tb-sm { + margin-bottom: 20rpx; + margin-top: 20rpx; +} + +.margin-tb { + margin-bottom: 30rpx; + margin-top: 30rpx; +} + +.margin-tb-lg { + margin-bottom: 40rpx; + margin-top: 40rpx; +} + +.margin-tb-xl { + margin-bottom: 50rpx; + margin-top: 50rpx; +} + +.padding-0 { + padding: 0; +} + +.padding-xs { + padding: 10rpx; +} + +.padding-sm { + padding: 20rpx; +} + +.padding { + padding: 30rpx; +} + +.padding-lg { + padding: 40rpx; +} + +.padding-xl { + padding: 50rpx; +} + +.padding-top-xs { + padding-top: 10rpx; +} + +.padding-top-sm { + padding-top: 20rpx; +} + +.padding-top { + padding-top: 30rpx; +} + +.padding-top-lg { + padding-top: 40rpx; +} + +.padding-top-xl { + padding-top: 50rpx; +} + +.padding-right-xs { + padding-right: 10rpx; +} + +.padding-right-sm { + padding-right: 20rpx; +} + +.padding-right { + padding-right: 30rpx; +} + +.padding-right-lg { + padding-right: 40rpx; +} + +.padding-right-xl { + padding-right: 50rpx; +} + +.padding-bottom-xs { + padding-bottom: 10rpx; +} + +.padding-bottom-sm { + padding-bottom: 20rpx; +} + +.padding-bottom { + padding-bottom: 30rpx; +} + +.padding-bottom-lg { + padding-bottom: 40rpx; +} + +.padding-bottom-xl { + padding-bottom: 50rpx; +} + +.padding-bottom-xxl { + padding-bottom: 80rpx; +} + +.padding-left-xs { + padding-left: 10rpx; +} + +.padding-left-sm { + padding-left: 20rpx; +} + +.padding-left { + padding-left: 30rpx; +} + +.padding-left-lg { + padding-left: 40rpx; +} + +.padding-left-xl { + padding-left: 50rpx; +} + +.padding-lr-xs { + padding-left: 10rpx; + padding-right: 10rpx; +} + +.padding-lr-sm { + padding-left: 20rpx; + padding-right: 20rpx; +} + +.padding-lr { + padding-left: 30rpx; + padding-right: 30rpx; +} + +.padding-lr-lg { + padding-left: 40rpx; + padding-right: 40rpx; +} + +.padding-lr-xl { + padding-left: 50rpx; + padding-right: 50rpx; +} + +.padding-tb-xs { + padding-bottom: 10rpx; + padding-top: 10rpx; +} + +.padding-tb-sm { + padding-bottom: 20rpx; + padding-top: 20rpx; +} + +.padding-tb { + padding-bottom: 30rpx; + padding-top: 30rpx; +} + +.padding-tb-lg { + padding-bottom: 40rpx; + padding-top: 40rpx; +} + +.padding-tb-xl { + padding-bottom: 50rpx; + padding-top: 50rpx; +} + +.cf::after, +.cf::before { + content: " "; + display: table; +} + +.cf::after { + clear: both; +} + +.fl { + float: left; +} + +.fr { + float: right; +} + +.line-red::after, +.lines-red::after { + border-color: var(--red); +} + +.line-orange::after, +.lines-orange::after { + border-color: var(--orange); +} + +.line-yellow::after, +.lines-yellow::after { + border-color: var(--yellow); +} + +.line-olive::after, +.lines-olive::after { + border-color: var(--olive); +} + +.line-green::after, +.lines-green::after { + border-color: var(--green); +} + +.line-cyan::after, +.lines-cyan::after { + border-color: var(--cyan); +} + +.line-blue::after, +.lines-blue::after { + border-color: var(--blue); +} + +.line-purple::after, +.lines-purple::after { + border-color: var(--purple); +} + +.line-mauve::after, +.lines-mauve::after { + border-color: var(--mauve); +} + +.line-pink::after, +.lines-pink::after { + border-color: var(--pink); +} + +.line-brown::after, +.lines-brown::after { + border-color: var(--brown); +} + +.line-grey::after, +.lines-grey::after { + border-color: var(--grey); +} + +.line-gray::after, +.lines-gray::after { + border-color: var(--gray); +} + +.line-black::after, +.lines-black::after { + border-color: var(--black); +} + +.line-white::after, +.lines-white::after { + border-color: var(--white); +} + +.bg-red { + background-color: var(--red); + color: var(--white); +} + +.bg-orange { + background-color: var(--orange); + color: var(--white); +} + +.bg-yellow { + background-color: var(--yellow); + color: var(--black); +} + +.bg-yellow-light { + color: var(--yellowLight); +} + +.bg-yellow-light-1 { + background-color: var(--yellowLight); + color: var(--white); +} + +.bg-olive { + background-color: var(--olive); + color: var(--white); +} + +.bg-green { + background-color: var(--green); + color: var(--white); +} + +.bg-cyan { + background-color: var(--cyan); +} + +.bg-blue, +.bg-cyan { + color: var(--white); +} + +.bg-blue { + background-color: var(--yellowLight); +} + +.bg-purple { + background-color: var(--purple); + color: var(--white); +} + +.bg-mauve { + background-color: var(--mauve); + color: var(--white); +} + +.bg-pink { + background-color: var(--pink); + color: var(--white); +} + +.bg-brown { + background-color: var(--brown); + color: var(--white); +} + +.bg-grey { + background-color: var(--grey); +} + +.bg-grey, +.text-color { + color: var(--white); +} + +.bg-gray { + background-color: #f0f0f0; + color: var(--black); +} + +.bg-trgray { + background-color: #f8f8f8; + color: var(--black); +} + +.bg-black { + background-color: var(--black); + color: var(--white); +} + +.bg-black-tr { + background: rgba(0, 0, 0, .4); + color: var(--white); +} + +.bg-white { + background-color: var(--white); + color: var(--darkGray); +} + +.bg-shadeTop { + background-image: linear-gradient(#000, rgba(0, 0, 0, .01)); + color: var(--white); +} + +.bg-shadeBottom { + background-image: linear-gradient(rgba(0, 0, 0, .01), #000); + color: var(--white); +} + +.bg-red.light { + background-color: var(--redLight); + color: var(--red); +} + +.bg-orange.light { + background-color: var(--orangeLight); + color: var(--orange); +} + +.bg-yellow.light { + background-color: var(--yellowLight); + color: var(--yellow); +} + +.bg-olive.light { + background-color: var(--oliveLight); + color: var(--olive); +} + +.bg-green.light { + background-color: var(--greenLight); + color: var(--green); +} + +.bg-cyan.light { + background-color: var(--cyanLight); + color: var(--cyan); +} + +.bg-blue.light { + background-color: var(--blueLight); + color: var(--blue); +} + +.bg-purple.light { + background-color: var(--purpleLight); + color: var(--purple); +} + +.bg-mauve.light { + background-color: var(--mauveLight); + color: var(--mauve); +} + +.bg-pink.light { + background-color: var(--pinkLight); + color: var(--pink); +} + +.bg-brown.light { + background-color: var(--brownLight); + color: var(--brown); +} + +.bg-grey.light { + background-color: var(--greyLight); + color: var(--grey); +} + +.bg-gradual-red { + background-image: var(--gradualRed); + color: var(--white); +} + +.bg-gradual-orange { + background-image: var(--gradualOrange); + color: var(--white); +} + +.bg-gradual-green { + background-image: var(--gradualGreen); + color: var(--white); +} + +.bg-gradual-purple { + background-image: var(--gradualPurple); + color: var(--white); +} + +.bg-gradual-pink { + background-image: var(--gradualPink); + color: var(--white); +} + +.bg-yellow-yellow { + background-image: var(--gradualYellow); + color: var(--white); +} + +.bg-gradual-blue { + background-image: var(--gradualBlue); + color: var(--white); +} + +.bg-gradual-gray { + background-image: var(--gradualGray); + color: var(--white); +} + +.shadow[class*="-red"] { + box-shadow: var(--ShadowSize) var(--redShadow); +} + +.shadow[class*="-orange"] { + box-shadow: var(--ShadowSize) var(--orangeShadow); +} + +.shadow[class*="-yellow"] { + box-shadow: var(--ShadowSize) var(--yellowShadow); +} + +.shadow[class*="-olive"] { + box-shadow: var(--ShadowSize) var(--oliveShadow); +} + +.shadow[class*="-green"] { + box-shadow: var(--ShadowSize) var(--greenShadow); +} + +.shadow[class*="-cyan"] { + box-shadow: var(--ShadowSize) var(--cyanShadow); +} + +.shadow[class*="-blue"] { + box-shadow: var(--ShadowSize) var(--blueShadow); +} + +.shadow[class*="-purple"] { + box-shadow: var(--ShadowSize) var(--purpleShadow); +} + +.shadow[class*="-mauve"] { + box-shadow: var(--ShadowSize) var(--mauveShadow); +} + +.shadow[class*="-pink"] { + box-shadow: var(--ShadowSize) var(--pinkShadow); +} + +.shadow[class*="-brown"] { + box-shadow: var(--ShadowSize) var(--brownShadow); +} + +.shadow[class*="-grey"] { + box-shadow: var(--ShadowSize) var(--greyShadow); +} + +.shadow[class*="-gray"] { + box-shadow: var(--ShadowSize) var(--grayShadow); +} + +.shadow[class*="-black"], +.shadow[class*="-white"] { + box-shadow: var(--ShadowSize) var(--blackShadow); +} + +.text-shadow[class*="-red"] { + text-shadow: var(--ShadowSize) var(--redShadow); +} + +.text-shadow[class*="-orange"] { + text-shadow: var(--ShadowSize) var(--orangeShadow); +} + +.text-shadow[class*="-yellow"] { + text-shadow: var(--ShadowSize) var(--yellowShadow); +} + +.text-shadow[class*="-olive"] { + text-shadow: var(--ShadowSize) var(--oliveShadow); +} + +.text-shadow[class*="-green"] { + text-shadow: var(--ShadowSize) var(--greenShadow); +} + +.text-shadow[class*="-cyan"] { + text-shadow: var(--ShadowSize) var(--cyanShadow); +} + +.text-shadow[class*="-blue"] { + text-shadow: var(--ShadowSize) var(--blueShadow); +} + +.text-shadow[class*="-purple"] { + text-shadow: var(--ShadowSize) var(--purpleShadow); +} + +.text-shadow[class*="-mauve"] { + text-shadow: var(--ShadowSize) var(--mauveShadow); +} + +.text-shadow[class*="-pink"] { + text-shadow: var(--ShadowSize) var(--pinkShadow); +} + +.text-shadow[class*="-brown"] { + text-shadow: var(--ShadowSize) var(--brownShadow); +} + +.text-shadow[class*="-grey"] { + text-shadow: var(--ShadowSize) var(--greyShadow); +} + +.text-shadow[class*="-gray"] { + text-shadow: var(--ShadowSize) var(--grayShadow); +} + +.text-shadow[class*="-black"] { + text-shadow: var(--ShadowSize) var(--blackShadow); +} + +.bg-img { + background-position: 50%; + background-repeat: no-repeat; + background-size: cover; +} + +.bg-mask { + background-color: var(--black); + position: relative; +} + +.bg-mask::after { + background-color: rgba(0, 0, 0, .4); + border-radius: inherit; + bottom: 0; + content: ""; + display: block; + height: 100%; + left: 0; + position: absolute; + right: 0; + top: 0; + width: 100%; +} + +.bg-mask cover-view, +.bg-mask view { + position: relative; + z-index: 5; +} + +.bg-video { + position: relative; +} + +.bg-video video { + display: block; + height: 100%; + object-fit: cover; + pointer-events: none; + position: absolute; + top: 0; + width: 100%; + z-index: 0; +} + +.text-xs { + font-size: 20rpx; +} + +.text-sm { + font-size: 24rpx; +} + +.text-df { + font-size: 28rpx; +} + +.text-lg { + font-size: 32rpx; +} + +.text-xl { + font-size: 36rpx; +} + +.text-xxl { + font-size: 44rpx; +} + +.text-sl { + font-size: 80rpx; +} + +.text-xsl { + font-size: 120rpx; +} + +.text-Abc { + text-transform: Capitalize; +} + +.text-ABC { + text-transform: Uppercase; +} + +.text-abc { + text-transform: Lowercase; +} + +.text-price::before { + content: "¥"; + font-size: 80%; + margin-right: 4rpx; +} + +.text-cut, +.text-cut-width { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.text-cut-width { + width: 370rpx; +} + +.text-bold { + font-weight: 700; +} + +.text-center { + text-align: center; +} + +.text-content { + line-height: 1.6; +} + +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.line-red, +.lines-red, +.text-red { + color: var(--red); +} + +.line-orange, +.lines-orange, +.text-orange { + color: var(--orange); +} + +.line-yellow, +.lines-yellow, +.text-yellow { + color: var(--yellow); +} + +.line-olive, +.lines-olive, +.text-olive { + color: var(--olive); +} + +.line-green, +.lines-green, +.text-green { + color: var(--green); +} + +.line-cyan, +.lines-cyan, +.text-cyan { + color: var(--cyan); +} + +.line-blue, +.lines-blue, +.text-blue { + color: var(--blue); +} + +.line-purple, +.lines-purple, +.text-purple { + color: var(--purple); +} + +.line-mauve, +.lines-mauve, +.text-mauve { + color: var(--mauve); +} + +.line-pink, +.lines-pink, +.text-pink { + color: var(--pink); +} + +.line-brown, +.lines-brown, +.text-brown { + color: var(--brown); +} + +.line-grey, +.lines-grey, +.text-grey { + color: var(--grey); +} + +.line-gray, +.lines-gray, +.text-gray { + color: var(--gray); +} + +.text-gray2 { + color: #333; +} + +.line-black, +.lines-black, +.text-black { + color: var(--black); +} + +.line-depblack, +.lines-depblack, +l .text-depblack { + color: var(--depBlack); +} + +.line-white, +.lines-white, +.text-white { + color: var(--white); +} + +.play-box { + background-color: #fff; + border-radius: 15rpx; + flex-direction: column; + margin-left: 20rpx; + padding: 10rpx 0rpx; + width: 80%; +} + +.play-box, +.play-box-arrow-flex { + align-items: center; + display: flex; + justify-content: center; +} + +.play-box-arrow-flex, +.play-box-arrow-pos { + height: 100%; + position: absolute; + width: 100%; +} + +.play-box-arrow-pos { + left: 40rpx; + top: 40rpx; +} + +.shadow-box { + border: 1rpx solid #f9f9f9; + border-radius: 10rpx; + width: 100%; +} + +.border-blue-radius { + border: 1rpx solid #0054bd; + border-radius: 20rpx; + color: #0054bd; +} + +.border-blue-radius:active { + border: 1rpx solid #9b9c9c; + border-radius: 20rpx; + color: #000; +} + +.play-box image { + height: 60rpx; + width: 60rpx; +} + +.play-box image:active { + background-color: #cccaca; + border-radius: 50%; +} + +.text-left input { + text-align: right; +} + +.text-length-hint-right { + font-size: 32rpx; + margin-top: 10rpx; + padding-right: 20rpx; + text-align: right; + width: 100%; +} + +.line-gray-sm { + background-color: var(--gray); + height: 10rpx; +} + +.line-gray-ssm { + align-self: center; + background-color: #f3f3f3; + height: 2rpx; + width: 95%; +} + +.line-gray-xs { + height: 20rpx; +} + +.line-gray-lg, +.line-gray-xs { + background-color: var(--gray); +} + +.line-gray-lg { + height: 30rpx; +} + +.line-gray-xl { + background-color: var(--gray); + height: 40rpx; +} + +.hint-title { + align-items: center; + color: #000; + display: flex; + flex-direction: row; + font-size: 32rpx; + height: 90rpx; + justify-content: center; +} + +.hint-title image { + height: 48rpx; + width: 48rpx; +} + +.hint-title text { + left: -30rpx; + position: relative; + top: 1px; +} + +.cardTitle { + background-color: #fff; + border: 1px dashed gray; + color: #fff; + font-size: 80rpx; + font-weight: 300; + padding: 20rpx 40rpx; + position: relative; + text-align: center; + text-shadow: 0 0 6rpx rgba(0, 0, 0, .3); +} + +.border-bottom-sm { + border-bottom: 1rpx solid #eee; +} + +.card-title-sm { + background-color: #fff; + border: 1px dashed gray; + color: #fff; + font-size: 60rpx; + font-weight: 300; + margin: 10rpx; + padding: 0rpx 20rpx; + position: relative; + text-align: center; +} + +.cardTitle::before { + border-radius: 20rpx; + display: block; + height: 6rpx; + position: absolute; + transform: skew(10deg, 0deg); + width: 60rpx; +} + +.cardTitle::after { + border-radius: 6rpx; + bottom: 76rpx; + display: block; + height: 24rpx; + left: 90rpx; + opacity: .1; + position: absolute; + width: 140rpx; +} + +@font-face { + font-display: swap; + font-family: iconfont; + font-style: normal; + font-weight: 400; + src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAL0AA0AAAAABuAAAAKeAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GVgCCQhEICoFIgUsLCgABNgIkAxAEIAWFCAc7G/EFyI7CtuUTYyoihNONcXgQEVRrZM/uPqJC9R9w0UQSwQIK9+ACqNiRAwSbikMy4vzv/ctzs6kgViBK4/2V3m7glqriKpOmpCuok+pM3Exrgwaysdw21XlCXbQtisOAogDTae0fEzfw24P9u77x786VNuXwyeFSiMvjICscjo1CwPvVkXr4sLDtwZ6b0IxekIQsCwUJUcQRNaS96QAchtfHf5FRT1KTWceSTTktSP/lghbRRDVhgwNchgBkZ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WpRZnF2cW6hrrJ+QWVADoqBkcAAAAAAAAB//8AAgABAAAADAAAABYAAAACAAEAAwADAAEABAAAAAIAAAAAeNpjYGBgZACCq0vUOUD0nflZD2E0AER/BzYAAA==) format("woff"), url(iconfont.ttf-do-not-use-local-path-./app.wxss&1&62897) format("truetype"); +} + +.iconfont { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-family: iconfont !important; + font-size: 12rpx; + font-style: normal; +} + +.icon-star-red:before { + color: #f55054; + content: "\e618"; +} + +.container { + padding: 20rpx; +} + +.join-btn { + background-color: #f55054; + border-radius: 25rpx; + color: #fff; +} + +.border-btn, +.join-btn { + font-size: 32rpx; + height: 50rpx; + line-height: 50rpx; + margin-top: 25rpx; + padding: 0 15rpx; +} + +.border-btn { + border: 1px solid #f55054; + border-radius: 25rpx; + color: #f55054; +} + +.cut-text { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} \ No newline at end of file diff --git a/images/home-on.png b/images/home-on.png new file mode 100644 index 0000000..98670f2 Binary files /dev/null and b/images/home-on.png differ diff --git a/images/home.png b/images/home.png new file mode 100644 index 0000000..fcf1860 Binary files /dev/null and b/images/home.png differ diff --git a/images/ic_address_icon.png b/images/ic_address_icon.png new file mode 100644 index 0000000..7c2d2af Binary files /dev/null and b/images/ic_address_icon.png differ diff --git a/images/ic_audio_play.png b/images/ic_audio_play.png new file mode 100644 index 0000000..d296040 Binary files /dev/null and b/images/ic_audio_play.png differ diff --git a/images/ic_audio_playing.png b/images/ic_audio_playing.png new file mode 100644 index 0000000..c67cf01 Binary files /dev/null and b/images/ic_audio_playing.png differ diff --git a/images/ic_audio_rewind.png b/images/ic_audio_rewind.png new file mode 100644 index 0000000..b8fb0f5 Binary files /dev/null and b/images/ic_audio_rewind.png differ diff --git a/images/ic_audio_speed.png b/images/ic_audio_speed.png new file mode 100644 index 0000000..e480941 Binary files /dev/null and b/images/ic_audio_speed.png differ diff --git a/images/ic_call_phone_icon.png b/images/ic_call_phone_icon.png new file mode 100644 index 0000000..c3c8e2f Binary files /dev/null and b/images/ic_call_phone_icon.png differ diff --git a/images/ic_code_icon.png b/images/ic_code_icon.png new file mode 100644 index 0000000..ccfb678 Binary files /dev/null and b/images/ic_code_icon.png differ diff --git a/images/ic_column_icon.png b/images/ic_column_icon.png new file mode 100644 index 0000000..d0a4bfe Binary files /dev/null and b/images/ic_column_icon.png differ diff --git a/images/ic_corner_mark_bg.png b/images/ic_corner_mark_bg.png new file mode 100644 index 0000000..fdcbb7f Binary files /dev/null and b/images/ic_corner_mark_bg.png differ diff --git a/images/ic_email_icon.png b/images/ic_email_icon.png new file mode 100644 index 0000000..661ffab Binary files /dev/null and b/images/ic_email_icon.png differ diff --git a/images/ic_empty_data.png b/images/ic_empty_data.png new file mode 100644 index 0000000..ec1e560 Binary files /dev/null and b/images/ic_empty_data.png differ diff --git a/images/ic_empty_desc.png b/images/ic_empty_desc.png new file mode 100644 index 0000000..66824c8 Binary files /dev/null and b/images/ic_empty_desc.png differ diff --git a/images/ic_empty_map.png b/images/ic_empty_map.png new file mode 100644 index 0000000..f1b9542 Binary files /dev/null and b/images/ic_empty_map.png differ diff --git a/images/ic_empty_text.png b/images/ic_empty_text.png new file mode 100644 index 0000000..79e9d00 Binary files /dev/null and b/images/ic_empty_text.png differ diff --git a/images/ic_empty_voice.png b/images/ic_empty_voice.png new file mode 100644 index 0000000..e9dac8f Binary files /dev/null and b/images/ic_empty_voice.png differ diff --git a/images/ic_hot_number_bg.png b/images/ic_hot_number_bg.png new file mode 100644 index 0000000..727d265 Binary files /dev/null and b/images/ic_hot_number_bg.png differ diff --git a/images/ic_phone_icon.png b/images/ic_phone_icon.png new file mode 100644 index 0000000..097f601 Binary files /dev/null and b/images/ic_phone_icon.png differ diff --git a/images/ic_record_start.png b/images/ic_record_start.png new file mode 100644 index 0000000..a13d65f Binary files /dev/null and b/images/ic_record_start.png differ diff --git a/images/ic_share_icon.png b/images/ic_share_icon.png new file mode 100644 index 0000000..2990e53 Binary files /dev/null and b/images/ic_share_icon.png differ diff --git a/images/ic_share_img.png b/images/ic_share_img.png new file mode 100644 index 0000000..3bc772b Binary files /dev/null and b/images/ic_share_img.png differ diff --git a/images/ic_squareness_del.png b/images/ic_squareness_del.png new file mode 100644 index 0000000..8b50cee Binary files /dev/null and b/images/ic_squareness_del.png differ diff --git a/images/ic_user_default.png b/images/ic_user_default.png new file mode 100644 index 0000000..ef30c1e Binary files /dev/null and b/images/ic_user_default.png differ diff --git a/images/ic_voice_record.gif b/images/ic_voice_record.gif new file mode 100644 index 0000000..5cf6cd6 Binary files /dev/null and b/images/ic_voice_record.gif differ diff --git a/images/ic_wechart_icon.png b/images/ic_wechart_icon.png new file mode 100644 index 0000000..0b9b8d2 Binary files /dev/null and b/images/ic_wechart_icon.png differ diff --git a/images/law-on.png b/images/law-on.png new file mode 100644 index 0000000..cfc6c1c Binary files /dev/null and b/images/law-on.png differ diff --git a/images/law.png b/images/law.png new file mode 100644 index 0000000..fe8f863 Binary files /dev/null and b/images/law.png differ diff --git a/images/my-on.png b/images/my-on.png new file mode 100644 index 0000000..99cb0c3 Binary files /dev/null and b/images/my-on.png differ diff --git a/images/my.png b/images/my.png new file mode 100644 index 0000000..8c23572 Binary files /dev/null and b/images/my.png differ diff --git a/images/neighbor-on.png b/images/neighbor-on.png new file mode 100644 index 0000000..0a5b254 Binary files /dev/null and b/images/neighbor-on.png differ diff --git a/images/neighbor.png b/images/neighbor.png new file mode 100644 index 0000000..677b857 Binary files /dev/null and b/images/neighbor.png differ diff --git a/images/share_count.png b/images/share_count.png new file mode 100644 index 0000000..6e2c3dc Binary files /dev/null and b/images/share_count.png differ diff --git a/images/title-bg.png b/images/title-bg.png new file mode 100644 index 0000000..a7e94e2 Binary files /dev/null and b/images/title-bg.png differ diff --git a/images/view-count.png b/images/view-count.png new file mode 100644 index 0000000..23bc6a3 Binary files /dev/null and b/images/view-count.png differ diff --git a/packagecard/cardDetail/cardDetail.js b/packagecard/cardDetail/cardDetail.js new file mode 100755 index 0000000..05dd1b1 --- /dev/null +++ b/packagecard/cardDetail/cardDetail.js @@ -0,0 +1,339 @@ +var e = require("../../@babel/runtime/helpers/defineProperty"), t = getApp(); + +require("../../utils/util.js"); + +Page({ + data: { + preview: "", + showHide: !1, + isLoading: !1, + isMain: "", + cardPersonId: "", + choose_index: 0, + active: 0, + cardUrl: t.baseUrls.baseCardUrl, + areaList: [], + cardInfo: {}, + bgImg: "", + fontFamilyList: [], + useFontFamily: "", + cardId: "", + cardHeight: "", + shareTicket: "", + encryptedData: "", + iv: "", + isFromOut: !1, + token: "", + oldToken: "", + fromMine: !1, + imgTempSrc: "", + currentIndex: 0, + windowWidth: t.globalData.windowWidth, + scale: 1, + pageType: null + }, + tabChange: function(e) { + this.setData({ + active: e.detail + }), 0 == this.data.active || (1 == this.data.active ? 1 == t.globalData.servicePageType ? wx.redirectTo({ + url: "/pages/shop/catalog/bannerlist/bannerlist" + }) : 2 == t.globalData.servicePageType ? wx.redirectTo({ + url: "/pages/shop/catalog/column/column" + }) : 3 == t.globalData.servicePageType ? wx.redirectTo({ + url: "/pages/shop/catalog/list/list" + }) : 4 == t.globalData.servicePageType && wx.redirectTo({ + url: "/pages/shop/bespeak/bespeak" + }) : wx.redirectTo({ + url: "/pages/mine/index/index" + })); + }, + createMyCard: function() { + var e = this; + wx.showLoading({ + title: "生成中...", + success: function() { + e.setData({ + isLoading: !0 + }); + } + }); + for (var a = { + pictureTemplateId: e.data.cardId, + cardTemplateUseAreaList: [] + }, r = 0; r < e.data.areaList.length; r++) if ("1" != e.data.areaList[r].templateAreaType) { + var o = { + cardTemplateUseId: "", + picturesTemplateAreaId: e.data.areaList[r].picturesTemplateAreaId, + templateAreaFile: e.data.areaList[r].templateAreaFile, + templateAreaFontValue: e.data.areaList[r].templateAreaFontValue + }; + a.cardTemplateUseAreaList.push(o); + } + t.http.post(t.urls.creatCard, { + data: a, + header: { + token: t.globalData.token + } + }).then(function(t) { + console.log(t), "200" == t.statusCode && e.getMineCardList(); + }).catch(function(t) { + e.setData({ + isLoading: !1, + showHide: !1 + }); + }); + }, + getMineCardList: function() { + var e = this; + t.http.get(t.urls.getMyCard, { + header: { + token: t.globalData.token + }, + data: {} + }).then(function(t) { + e.setData({ + cardList: t.data + }), t.data.length > 0 && (e.setDefaultCard(t.data[0].cardTemplateUseId), console.log(e.data.pageType), + "org" == e.data.pageType ? e.saveOrgCard(t.data[0].cardTemplateUseId) : e.saveCardIdToSyzl(t.data[0].cardTemplateUseId)); + }).catch(function(t) { + wx.hideLoading({}), e.setData({ + isLoading: !1, + showHide: !1 + }); + }); + }, + saveCardIdToSyzl: function(e) { + console.log("设置网格员名片" + e); + var a = this; + t.restAjax.put(t.restAjax.path(t.apis.doUpdateCard, [ t.baseUrls.requestUrl, a.data.id ]), { + cardSysId: e + }, { + headers: { + token: t.globalData.token + } + }, function(e, t) { + console.log(e), console.log(t), "200" == e && a.onShowHintDialog(); + }, function(e, t) { + wx.hideLoading({}), wx.showToast({ + icon: "none", + title: "设置名片失败" + }), console.log(e), console.log(t); + }); + }, + saveOrgCard: function(e) { + var a = this; + t.restAjax.put(t.restAjax.path(t.apis.doUpdateOrg, [ t.baseUrls.requestUrl, a.data.id ]), { + cardSysId: e + }, { + headers: { + token: t.globalData.token + } + }, function(e, t) { + "200" == e && a.onShowHintDialog(); + }, function(e, t) { + wx.hideLoading({}), wx.showToast({ + icon: "none", + title: "设置名片失败" + }), console.log(t); + }); + }, + setDefaultCard: function(e) { + t.http.put(t.urls.setDefaultCard.format({ + cardTemplateUseId: e + }), { + header: { + token: t.globalData.token + } + }).then(function(e) {}).catch(function(e) {}); + }, + onShowHintDialog: function() { + var e = this; + wx.hideLoading({ + success: function(t) { + e.setData({ + isLoading: !1 + }), wx.showModal({ + content: "恭喜您名片创建成功,如需查看请到(我的 → 我的卡包)", + cancelText: "继续创建", + confirmText: "返回列表", + cancelColor: "#333333", + confirmColor: "#333333", + success: function(t) { + t.confirm ? e.backList() : e.continueCreate(); + } + }); + } + }); + }, + inputBlur: function(e) { + var t = e.detail.value, a = e.currentTarget.dataset.num, r = e.currentTarget.dataset.item, o = r.templateAreaFontLength; + "" != t && o > 0 && (t = t.substr(0, o), this.data.areaList[a].templateAreaFontValue = t, + this.data.areaList[a].focus = !1, this.setData({ + areaList: this.data.areaList + })), "1" != r.templateAreaServerLink && this.getFileId(a); + }, + choosePhoto: function(e) { + var t = e.currentTarget.dataset.cur, a = e.currentTarget.dataset.item; + console.log(t), this.setData({ + currentIndex: t + }); + var r = a.templateAreaWidth / a.templateAreaHeight; + wx.chooseImage({ + count: 1, + sourceType: [ "album", "camera" ], + success: function(e) { + wx.navigateTo({ + url: "/packagecard/common/corpperimg/cropperimg?imgSrc=" + e.tempFiles[0].path + "&scale=" + r + }); + } + }); + }, + doUploadImg: function(a) { + var r = this; + wx.showLoading({ + title: "上传中..." + }), t.http.upload(t.urls.doUploadImg, { + path: a, + name: "image", + header: { + token: t.globalData.token + } + }).then(function(t) { + wx.hideLoading({}), t = JSON.parse(t); + var a = "areaList[" + r.data.currentIndex + "].templateAreaFile"; + r.setData(e({}, a, t.data)), wx.showToast({ + title: "上传成功", + duration: 1500 + }), r.setData({ + imgTempSrc: "", + currentIndex: 0 + }); + }).catch(function(e) { + r.setData({ + imgTempSrc: "", + currentIndex: 0 + }); + }); + }, + getNameCard: function() { + var e = this; + e.data.fromMine && e.data.cardPersonId, t.http.get(t.urls.getCardDetail.format({ + cardTemplateId: e.data.cardId + }), { + header: { + token: t.globalData.token + }, + data: {} + }).then(function(t) { + var a = t.data.areaList, r = t.data.picturesTemplateWidth / e.data.windowWidth; + t.data.picturesTemplateWidth = t.data.picturesTemplateWidth / r, t.data.picturesTemplateHeight = t.data.picturesTemplateHeight / r; + for (var o = 0; o < a.length; o++) "1" == a[o].templateAreaFontCenter ? a[o].templateAreaFontCenter = "left" : "2" == a[o].templateAreaFontCenter ? a[o].templateAreaFontCenter = "center" : a[o].templateAreaFontCenter = "right", + "0" == a[o].templateAreaFontBold ? a[o].templateAreaFontBold = "normal" : "1" == a[o].templateAreaFontBold ? a[o].templateAreaFontBold = "bold" : a[o].templateAreaFontStyle = "italic", + a[o].templateAreaFontSize = a[o].templateAreaFontSize / r + "px", a[o].templateAreaHeight = a[o].templateAreaHeight / r, + a[o].templateAreaWidth = a[o].templateAreaWidth / r, a[o].templateAreaDown = a[o].templateAreaDown / r, + a[o].templateAreaTop = a[o].templateAreaTop / r, a[o].templateAreaRight = a[o].templateAreaRight / r, + a[o].templateAreaLeft = a[o].templateAreaLeft / r; + e.setData({ + cardInfo: t.data, + areaList: a + }); + }).catch(function(e) {}); + }, + getNameCradArea: function() { + var e = this, a = []; + t.restAjax.get(t.restAjax.path("{cardUrl}app/cardtemplatearea/listcardtemplateareabytemplateid/" + e.data.cardId, [ t.tradeUrl ]), {}, { + headers: { + token: t.globalData.token + } + }, function(t, r) { + for (var o = 0; o < r.length; o++) if (r[o].focus = !1, "1" != r[o].templateAreaType) a.push(r[o]); else { + var n = parseInt(r[o].templateAreaFontSize.replace("px", "")); + n = Math.floor(750 * n / wx.getSystemInfoSync().windowWidth) + "rpx", r[o].templateAreaFontSize = n, + a.push(r[o]); + } + e.setData({ + areaList: a + }); + }, function(e, a) { + t.dialog.msg(a.msg); + }); + }, + editInfo: function(t) { + var a = t.currentTarget.dataset.num, r = t.detail.value, o = "areaList[" + a + "].templateAreaFontValue"; + this.setData(e({}, o, r)); + }, + giveFocus: function(t) { + console.log(t.currentTarget.dataset.cur); + var a = "areaList[" + t.currentTarget.dataset.cur + "].focus"; + this.setData(e({}, a, !0)); + }, + continueCreate: function() { + this.setData({ + showHide: !1 + }); + }, + backList: function() { + wx.navigateBack({ + delta: 1 + }); + }, + getUserInfo: function() { + t.restAjax.get(t.restAjax.path("{loginUrl}app/user/get-app-user", [ t.personIntroUrl ]), {}, { + headers: { + token: t.globalData.token + } + }, function(e, a) { + t.globalData.userInfo = a; + }, function(e, a) { + t.dialog.msg(a.msg); + }); + }, + getFileId: function(a) { + var r = this, o = a, n = r.data.areaList[o].templateAreaFontValue; + console.log(n); + var i = r.data.areaList[o].picturesTemplateAreaId; + t.http.get(t.urls.getFileId.format({ + picturesTemplateAreaId: i + }), { + header: { + token: t.globalData.token + }, + data: { + content: n + } + }).then(function(t) { + console.log(t.data); + var a = "areaList[" + o + "].templateAreaFile"; + r.setData(e({}, a, t.data.data)); + }).catch(function(e) {}); + }, + onLoad: function(e) { + this.setData({ + cardId: e.id, + token: t.globalData.token, + pageType: e.type, + id: e.taskId + }), this.getNameCard(); + }, + postRecord: function(e) { + t.restAjax.post(t.restAjax.path("{loginUrl}app/cardtemplateforwardingrecord/savecardtemplateforwardingrecord", [ t.tradeUrl ]), { + encryptedData: e.encryptedData, + iv: e.iv, + templateUseId: this.data.cardId, + templateFromUserId: this.data.oldToken, + templateToUserId: this.data.token + }, { + headers: { + token: this.data.token + } + }, function(e, t) { + console.log("1" + t); + }, function(e, a) { + t.dialog.msg(a.msg); + }); + }, + openPage: function() {}, + onShow: function() { + console.log(this.data.imgTempSrc), "" != this.data.imgTempSrc && this.doUploadImg(this.data.imgTempSrc); + } +}); \ No newline at end of file diff --git a/packagecard/cardDetail/cardDetail.json b/packagecard/cardDetail/cardDetail.json new file mode 100644 index 0000000..df4a807 --- /dev/null +++ b/packagecard/cardDetail/cardDetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "创建名片" +} \ No newline at end of file diff --git a/packagecard/cardDetail/cardDetail.wxml b/packagecard/cardDetail/cardDetail.wxml new file mode 100755 index 0000000..bc72bbc --- /dev/null +++ b/packagecard/cardDetail/cardDetail.wxml @@ -0,0 +1,55 @@ + + + + {{item.templateAreaFontValue}} + + + + + {{item.templateAreaFontValue}} + + + + + + 适用行业:{{cardInfo.templateIndustryName}} + + + + + + {{item.templateAreaName}} + 最多输入{{item.templateAreaFontLength}}个字符 + + + + + + + + + + {{item.templateAreaName}} + 最多输入1张图片 + + + + + + + + + + + + + + + 创建成功 + 恭喜您名片创建成功,如需查看请到(我的 → 我的卡包) + + 继续创建 + 返回模板 + + + diff --git a/packagecard/cardDetail/cardDetail.wxss b/packagecard/cardDetail/cardDetail.wxss new file mode 100755 index 0000000..4f9bee1 --- /dev/null +++ b/packagecard/cardDetail/cardDetail.wxss @@ -0,0 +1,215 @@ +.card { + box-sizing: border-box; + height: 0; + position: relative; + width: 100%; + z-index: 100; +} + +.card-bgImg { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.area-box { + background: none!important; + white-space: nowrap; + z-index: 111; +} + +.area-box image { + height: 100%; + width: 100%; +} + +.card-info { + margin-top: 15rpx; + padding-bottom: 100rpx; + width: 100%; +} + +.card-title { + background: #fff; + font-size: 30rpx; + padding: 15rpx; + width: 100%; +} + +.row { + background: #fff; +} + +.row,.row-ver { + border-bottom: 1rpx solid #f5f5f5; + display: flex; +} + +.row-ver { + background-color: #fff; + flex-direction: column; + padding: 15rpx; +} + +.row-ver:nth-child(1) { + padding: 15rpx 15rpx 7.5rpx; +} + +.row-ver:last-child { + padding: 7.5rpx 15rpx 15rpx; +} + +.item-title { + color: grey; + flex: 1; + font-size: 32rpx; + line-height: 50rpx; +} + +.item-title-box { + flex-direction: row; + justify-content: space-between; + margin-top: 7.5rpx; +} + +.item-input,.item-title-box { + align-items: center; + display: flex; +} + +.item-input { + box-sizing: border-box; + flex: 4; + margin-top: 15rpx; +} + +.item-input input { + color: #333; + font-size: 32rpx; + height: 50rpx; + text-align: left; + width: 100%; +} + +.item-input image { + max-width: 70%; +} + +.item-code-input image { + max-height: 160rpx; + max-width: 35%; +} + +.hide-link { + background: rgba(0,0,0,.6); + bottom: 0; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 1000; +} + +.hide { + background: #fff; + border-radius: 10rpx; + flex-direction: column; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 60%; +} + +.hide,.hide-btn { + align-items: center; + display: flex; + justify-content: center; +} + +.hide-btn { + background: #1d7ff0; + border-bottom-left-radius: 10rpx; + border-bottom-right-radius: 10rpx; + color: #fff; + font-size: 30rpx; + height: 60rpx; + width: 50%; +} + +.hide-btn:nth-child(1) { + background: #e6b980; + border-bottom-left-radius: 10rpx; + border-bottom-right-radius: 0rpx; +} + +.hide-btn:last-child { + border-bottom-left-radius: 0rpx; + border-bottom-right-radius: 10rpx; +} + +.hide-text { + color: #000; + font-size: 36rpx; + padding: 50rpx 30rpx; +} + +.hide-title { + color: #ffc107; + font-size: 43rpx; + padding: 10rpx; +} + +.hide-btn-box { + display: flex; + justify-content: space-between; + width: 100%; +} + +.input-box { + width: 100%; +} + +.content-box { + align-items: center; + display: flex; + flex-direction: column; + justify-content: center; + padding: 15rpx; + width: 100%; +} + +.cuIcon-cameraadd { + font-size: 60rpx; +} + +.card-img-box { + align-items: center; + display: flex; + flex-direction: row; + justify-content: space-between; + margin-right: 40rpx; +} + +.card-img-box image { + height: 200rpx; + width: 200rpx; +} + +.hint-txt { + color: #fd9494; + font-size: 24rpx; + text-align: right; +} + +.wrap-line { + white-space: pre-line; +} + +.wrap-center { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} \ No newline at end of file diff --git a/packagecard/cardList/cardList.js b/packagecard/cardList/cardList.js new file mode 100755 index 0000000..bba00b7 --- /dev/null +++ b/packagecard/cardList/cardList.js @@ -0,0 +1,152 @@ +var e = getApp(); + +Page({ + data: { + imgUrl: e.baseUrls.baseCardUrl, + cardList: [], + currentIndex: 0, + optionsList: [], + isNeedPay: !1, + needPayPrice: 0, + needPayTeamPrice: 0, + curTypeId: "", + isRefreshing: !1, + isRefresh: !1, + isShowCodeInput: !1, + code: "", + contentHeight: e.globalData.windowHeight, + pageType: null, + id: "" + }, + onLoad: function(e) { + this.setData({ + pageType: e.type, + id: e.id + }); + }, + onShow: function() { + this.dorefreshList(); + }, + dorefreshList: function() { + this.setData({ + isRefresh: !1, + isRefreshing: !0, + cardList: [] + }), this.getPayState(); + }, + getOptionsList: function() { + var t = this; + wx.showLoading({ + title: "加载中..." + }), e.http.get(e.urls.getDictionaryList.format({ + dataParentId: "4bf68c60-eac5-480d-b5e1-15203d0282f9" + }), { + header: { + token: e.globalData.token + } + }).then(function(e) { + wx.hideLoading({}), e.data.length > 0 && (t.setData({ + optionsList: e.data, + curTypeId: e.data[t.data.currentIndex].dataId + }), t.getList()); + }).catch(function(e) { + console.log(e), t.setData({ + isRefreshing: !1 + }); + }); + }, + getList: function() { + var t = this; + wx.showLoading({ + title: "加载中..." + }), e.http.get(e.urls.getCardList, { + header: { + token: e.globalData.token + }, + data: { + templateType: t.data.curTypeId, + page: "1", + rows: "2" + } + }).then(function(e) { + wx.hideLoading({}), e.data.forEach(function(e) { + e.picturesTemplateNumber > 1e3 && e.picturesTemplateNumber < 1e4 ? e.number = e.picturesTemplateNumber / 1e3 + "K+" : e.picturesTemplateNumber > 1e4 && e.picturesTemplateNumber < 1e6 ? e.number = e.picturesTemplateNumber / 1e4 + "W+" : e.number = e.picturesTemplateNumber; + }), t.setData({ + cardList: e.data, + isRefreshing: !1 + }); + }).catch(function(e) { + wx.hideLoading({}), t.setData({ + isRefreshing: !1 + }); + }); + }, + goDetail: function(e) { + var t = e.currentTarget.dataset.id, a = e.currentTarget.dataset.ispay, i = e.currentTarget.dataset.price, n = e.currentTarget.dataset.paystate; + this.data.isNeedPay ? wx.navigateTo({ + url: "/packagecard/paypage/paypage?price=" + this.data.needPayPrice + "&teamprice=" + this.data.needPayTeamPrice + "&displayTreaty=1&type=1" + }) : "1" == a ? n ? wx.navigateTo({ + url: "../cardDetail/cardDetail?id=" + t + "&type=" + this.data.pageType + "&taskId=" + this.data.id + }) : wx.navigateTo({ + url: "/packagecard/paypage/paypage?price=" + i + "&type=2" + }) : wx.navigateTo({ + url: "../cardDetail/cardDetail?id=" + t + "&type=" + this.data.pageType + "&taskId=" + this.data.id + }); + }, + onChange: function(e) { + this.setData({ + currentIndex: e.detail.index, + curTypeId: this.data.optionsList[e.detail.index].dataId, + cardList: [] + }), this.getList(); + }, + getPayState: function() { + var t = this; + wx.showLoading({ + title: "加载中..." + }), e.http.get(e.urls.getPayState, { + header: { + token: e.globalData.token + } + }).then(function(e) { + wx.hideLoading({}), console.log(e.data), t.setData({ + isNeedPay: !1, + needPayPrice: e.data.cardChargePrice, + needPayTeamPrice: e.data.cardChargeDepartmentPrice + }), t.getOptionsList(); + }).catch(function(e) { + t.setData({ + isRefreshing: !1 + }); + }); + }, + onPullDownRefresh: function() { + this.getList(); + }, + onClose: function(e) { + this.setData({ + isShowCodeInput: !1 + }); + }, + inpuWatch: function(e) { + this.setData({ + code: e.detail.value + }); + }, + codeCreate: function(e) { + "" == this.data.code ? wx.showToast({ + title: "请输入邀请码", + icon: "none" + }) : wx.navigateTo({ + url: "/packagecard/paypage/paypage?price=" + this.data.needPayPrice + "&teamprice=" + this.data.needPayTeamPrice + "&displayTreaty=1&type=1&code=" + this.data.code + }); + }, + noCodeCreate: function(e) { + wx.navigateTo({ + url: "/packagecard/paypage/paypage?price=" + _self.data.needPayPrice + "&teamprice=" + _self.data.needPayTeamPrice + "&displayTreaty=1&type=1" + }); + }, + loadMore: function() { + console.log("触底了"); + } +}); \ No newline at end of file diff --git a/packagecard/cardList/cardList.json b/packagecard/cardList/cardList.json new file mode 100644 index 0000000..d9c0bcc --- /dev/null +++ b/packagecard/cardList/cardList.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "模板选择" +} \ No newline at end of file diff --git a/packagecard/cardList/cardList.wxml b/packagecard/cardList/cardList.wxml new file mode 100755 index 0000000..e82c4a7 --- /dev/null +++ b/packagecard/cardList/cardList.wxml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + ¥ {{item.templatePrice}} + + + 免费 + + + + + + 使用次数:{{item.number}} + + + + + + + + + + + + + 邀请码 + + + + + + + + diff --git a/packagecard/cardList/cardList.wxss b/packagecard/cardList/cardList.wxss new file mode 100755 index 0000000..9d7b63e --- /dev/null +++ b/packagecard/cardList/cardList.wxss @@ -0,0 +1,122 @@ +.card { + background: #fff; + border-radius: 10rpx; + box-shadow: 0 0 20rpx #eee; + margin: 0rpx 0rpx 15rpx; + padding: 15rpx; + width: 100%; +} + +.card:nth-child(1) { + padding: 0rpx 0rpx 7.5rpx; +} + +.card:last-child { + padding: 7.5rpx 0rpx 15rpx; +} + +.card-img { + border-radius: 10rpx; + height: 400rpx; + margin-top: 15rpx; + position: relative; + width: 100%; +} + +.card-name { + font-size: 36rpx; + padding: 15rpx 0rpx 0rpx 15rpx; +} + +.price-box { + left: 0rpx; + position: absolute; + top: 0rpx; + z-index: 3; +} + +.price-box,.price-box image { + height: 128rpx; + width: 128rpx; +} + +.price-text { + color: #fff; + left: 45%; + top: 25%; + transform: rotate(45deg); +} + +.price,.price-text { + font-size: 32rpx; + position: absolute; + z-index: 3; +} + +.price { + color: #ff0; + left: 65rpx; + top: -20rpx; + transform: rotate(-45deg) translate(-50%,-50%); + width: 100%; +} + +.number-box { + bottom: 0rpx; + height: 128rpx; + position: absolute; + right: 0rpx; + width: 128rpx; +} + +.number-box image { + border-radius: 0rpx; + height: 100%; + margin-top: 0rpx; + width: 100%; +} + +.number-content { + color: #fff; + font-size: 18rpx; + position: absolute; + right: -70rpx; + text-align: center; + top: 30rpx; + transform: rotate(-45deg) translate(-50%,-50%); + width: 100%; +} + +.code-box { + display: flex; + flex-direction: column; + height: 100%; + justify-content: space-between; + width: 100%; +} + +.code-box input { + background-color: #f2f2f2; + border: 1rpx solid #f2f2f2; + border-radius: 10rpx; + font-size: 28rpx; + height: 80rpx; + line-height: 80rpx; + text-align: center; + width: 95%; +} + +.code-box .code-title { + color: var(--yellowLight); + font-size: 38rpx; + margin-top: 15rpx; + padding-bottom: 15rpx; + text-align: center; +} + +.code-box .btns { + align-items: center; + display: flex; + flex-direction: row; + justify-content: space-between; +} \ No newline at end of file diff --git a/packagecard/common/corpperimg/cropperimg.js b/packagecard/common/corpperimg/cropperimg.js new file mode 100755 index 0000000..9cf3273 --- /dev/null +++ b/packagecard/common/corpperimg/cropperimg.js @@ -0,0 +1,58 @@ +getApp(); + +Page({ + data: { + imgSrc: "", + scale: 1, + src: "", + width: 250, + height: 250 + }, + onLoad: function(e) { + wx.setNavigationBarTitle({ + title: "图片裁剪" + }), this.cropper = this.selectComponent("#image-cropper"), this.setData({ + src: e.imgSrc + }), wx.showLoading({ + title: "加载中" + }); + }, + cropperload: function(e) { + console.log("cropper初始化完成"); + }, + loadimage: function(e) { + console.log("图片加载完成", e.detail), wx.hideLoading(), this.cropper.imgReset(); + }, + clickcut: function(e) { + console.log(e.detail); + var t = getCurrentPages(); + (t.length >= 2 ? t[t.length - 2] : void 0).setData({ + imgTempSrc: e.detail.url + }), wx.navigateBack({}); + }, + cropperDone: function(e) { + var t = e.detail, o = t.src, a = (t.cropperData, getCurrentPages()); + (a.length >= 2 ? a[a.length - 2] : void 0).setData({ + imgTempSrc: o + }); + }, + cropperCancel: function() { + wx.navigateBack({}); + }, + doCropperDone: function(e) { + var t = getCurrentPages(); + (t.length >= 2 ? t[t.length - 2] : void 0).setData({ + imgTempSrc: e + }), wx.navigateBack({}); + }, + cropperFail: function(e) { + e.detail; + console.log(e), wx.showToast({ + title: "裁剪失败,请重试", + icon: "none", + success: function() { + wx.navigateBack({}); + } + }); + } +}); \ No newline at end of file diff --git a/packagecard/common/corpperimg/cropperimg.json b/packagecard/common/corpperimg/cropperimg.json new file mode 100644 index 0000000..804c9e6 --- /dev/null +++ b/packagecard/common/corpperimg/cropperimg.json @@ -0,0 +1,26 @@ +{ + "usingComponents": { + "image-cropper": "/vant/dist/cropper/index", + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "disableScroll": true +} \ No newline at end of file diff --git a/packagecard/common/corpperimg/cropperimg.wxml b/packagecard/common/corpperimg/cropperimg.wxml new file mode 100755 index 0000000..4c3739d --- /dev/null +++ b/packagecard/common/corpperimg/cropperimg.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packagecard/common/corpperimg/cropperimg.wxss b/packagecard/common/corpperimg/cropperimg.wxss new file mode 100755 index 0000000..e69de29 diff --git a/packagecard/moments/edit/momentedit.js b/packagecard/moments/edit/momentedit.js new file mode 100755 index 0000000..6481a00 --- /dev/null +++ b/packagecard/moments/edit/momentedit.js @@ -0,0 +1,846 @@ +var t = require("../../../@babel/runtime/helpers/defineProperty"), a = getApp(), e = wx.getRecorderManager(), i = wx.createInnerAudioContext(), s = requirePlugin("chooseLocation"), n = { + latitude: 39.89631551, + longitude: 116.323459711 +}; + +Page({ + data: { + uploadCount: 0, + uploadVideoCount: 0, + currentIndex: 0, + columnId: "", + uId: "", + fieldList: [], + textList: [], + textareaList: [], + audioList: [], + videoList: [], + photoList: [], + linkList: [], + locationList: [], + isShowText: !1, + isShowDesc: !1, + isShowPhoto: !1, + isShowLink: !1, + isShowAudio: !1, + isShowVideo: !1, + isShowTags: !1, + isShowType: !1, + tempText: "", + tempDesc: "", + linkStr: "", + map: null, + waitFlag: !1, + isStartRecord: !1, + speck_time: 0, + speedStep: 5, + setInter: "", + currentItem: void 0, + isAuthAudio: !1, + title: "栏目内容修改", + curLat: 0, + curLng: 0, + isRecording: !1, + maxDuration: 60, + displayType: [ { + name: "九宫格", + id: 1 + }, { + name: "轮播", + id: 2 + }, { + name: "轮播(自动)", + id: 3 + }, { + name: "平铺", + id: 4 + } ], + selDisplayType: 1, + displayTypeStr: "九宫格" + }, + onLoad: function(t) { + this.setData({ + columnId: t.id, + uId: t.uid, + title: t.title + "修改" + }), wx.setNavigationBarTitle({ + title: t.title + "修改" + }); + this.checkPermission(), this.getMomentContent(); + }, + getMomentContent: function() { + wx.showLoading({ + title: "加载中..." + }); + var t = this; + a.http.get(a.urls.getMomentsContent.format({ + configColumnId: t.data.columnId, + uid: t.data.uId + }), { + header: { + token: a.globalData.token + } + }).then(function(a) { + wx.hideLoading({}), t.buildDetail(a.data); + }).catch(function(t) { + wx.hideLoading({}), console.log(t); + }); + }, + buildDetail: function(t) { + var e = this; + t.list.forEach(function(t) { + switch (t.dataType) { + case "2": + var i = t.value.split("@"), s = i[0].split(","); + if (i.length > 1) switch (i[1]) { + case "1": + e.setData({ + selDisplayType: "1", + displayTypeStr: "九宫格" + }); + break; + + case "2": + e.setData({ + selDisplayType: "2", + displayTypeStr: "轮播" + }); + break; + + case "3": + e.setData({ + selDisplayType: "3", + displayTypeStr: "轮播(自动)" + }); + break; + + case "4": + e.setData({ + selDisplayType: "4", + displayTypeStr: "平铺" + }); + } + var n = []; + s.forEach(function(t) { + if (t.length > 0) { + var e = { + id: t, + path: a.baseUrls.baseCardUrl + t + }; + n.push(e); + } + }), t.valueList = n; + break; + + case "4": + s = t.value.split(","), n = []; + for (var o = 0; o < s.length; o++) if (s[o].length > 0) { + var d = s[o].split("&"), r = a.baseUrls.baseCardUrl + d[0], l = a.baseUrls.baseCardUrl + d[1], u = { + id: d[0], + thumbId: d[1], + path: r, + imgPath: l + }; + n.push(u); + } + t.valueList = n; + break; + + case "3": + s = t.value.split(","), n = []; + s.forEach(function(t) { + if (t.length > 0) { + var e = t.split("&"), i = "00:00", s = 100; + if (e.length > 1) { + var o = e[1]; + s = o; + var d = parseInt(o / 60), r = parseInt(o % 60); + i = (d > 9 ? d : "0" + d) + ":" + (+r > 9 ? r : "0" + r); + } + var l = { + id: e[0], + path: a.baseUrls.baseCardUrl + e[0], + isPlay: !1, + duration: s, + curDuation: 0, + curDurationStr: "00:00", + totalDurationStr: i + }; + n.push(l); + } + }), t.valueList = n; + break; + + case "6": + s = t.value.split("-"), n = []; + s.forEach(function(t) { + if (t.length > 0) { + var a = t.split(","), e = { + name: "", + address: "", + latitude: a[0], + longitude: a[1] + }; + n.push(e); + } + }), t.valueList = n; + break; + + case "8": + t.dictionariesList.forEach(function(a) { + -1 != t.value.indexOf(a.dataId) && (t.selValue = a.dataName); + }); + break; + + case "9": + var c = ""; + t.dictionariesList.forEach(function(a) { + -1 != t.value.indexOf(a.dataId) ? (c += a.dataName + ",", a.isSel = !0) : a.isSel = !1; + }), c = c.substr(0, c.length - 1), t.selValue = c; + } + }), e.setData({ + fieldList: t.list + }); + }, + showMutliSel: function(t) { + this.setData({ + isShowTags: !0, + currentIndex: t.currentTarget.dataset.index + }); + }, + pickerChange: function(t) { + var a = t.currentTarget.dataset.index, e = t.detail.value; + this.data.fieldList[a].index = e, this.data.fieldList[a].value = this.data.fieldList[a].dictionariesList[e].dataId, + this.data.fieldList[a].selValue = this.data.fieldList[a].dictionariesList[e].dataName, + this.setData({ + fieldList: this.data.fieldList + }); + }, + inputText: function(t) { + var a = t.currentTarget.dataset.index; + this.data.fieldList[a].value = t.detail.value, this.setData({ + fieldList: this.data.fieldList + }); + }, + checkPermission: function() { + var t = this; + wx.getSetting({ + success: function(a) { + var e = a.authSetting["scope.record"]; + void 0 === e ? wx.authorize({ + scope: "scope.record", + success: function() { + t.setData({ + isAuthAudio: !0 + }); + }, + fail: function() { + t.setData({ + isAuthAudio: !1 + }); + } + }) : e || t.openSetting(); + } + }); + }, + openSetting: function() { + wx.showModal({ + title: "提示", + content: "发布内容需要您授权录音权限.", + success: function(t) { + t.confirm && wx.openSetting({ + withSubscriptions: !0 + }); + } + }); + }, + onShow: function() { + if (null != s.getLocation()) { + var t = this.data.fieldList[this.data.curMapIndex]; + t.valueList.length < t.maxCount && (this.data.fieldList[this.data.curMapIndex].valueList.push(s.getLocation()), + this.setData({ + fieldList: this.data.fieldList + })); + } + var a = this; + wx.getSetting({ + withSubscriptions: !0, + success: function(t) { + var e = t.authSetting["scope.record"]; + a.setData({ + isAuthAudio: e + }); + } + }); + }, + onUnload: function() { + s.setLocation(null), this.setData({ + map: null + }); + }, + chooseVideo: function(t) { + var a = this, e = t.currentTarget.dataset.item, i = e.maxCount - e.valueList.length, s = t.currentTarget.dataset.index; + wx.chooseMedia({ + count: Number.parseInt(i), + mediaType: [ "video" ], + sourceType: [ "camera", "album" ], + maxDuration: 60, + success: function(t) { + t.tempFiles.length > 0 && (t.tempFiles[0].duration <= a.data.maxDuration ? a.doUploadVideo(s, t.tempFiles, a.data.uploadVideoCount) : wx.showToast({ + title: "视频最长60秒", + icon: "none" + })); + }, + fail: function(t) {} + }); + }, + doUploadVideo: function(t, e, i) { + wx.showLoading({ + title: "上传中..." + }); + var s = this, n = e.length; + s.data.uploadVideoCount < n ? a.http.upload(a.urls.doUploadVideo, { + path: e[s.data.uploadVideoCount].tempFilePath, + name: "video", + header: { + token: a.globalData.token + } + }).then(function(a) { + wx.hideLoading({}); + var i = JSON.parse(a).data; + s.doUploadVideoImg(t, i, e, s.data.uploadVideoCount); + }).catch(function(a) { + wx.hideLoading({}), s.setData({ + uploadVideoCount: ++s.data.uploadVideoCount + }), s.doUploadVideo(t, e, s.data.uploadVideoCount); + }) : (wx.hideLoading({}), s.setData({ + uploadVideoCount: 0 + })); + }, + doUploadVideoImg: function(t, e, i, s) { + wx.showLoading({ + title: "上传中..." + }); + var n = this; + a.http.upload(a.urls.doUploadImg, { + path: i[n.data.uploadVideoCount].thumbTempFilePath, + name: "image", + header: { + token: a.globalData.token + } + }).then(function(s) { + console.log(s), wx.hideLoading({}); + var o = a.baseUrls.baseCardUrl + e, d = a.baseUrls.baseCardUrl + JSON.parse(s).data, r = JSON.parse(s).data, l = { + id: e, + thumbId: r, + path: o, + imgPath: d + }; + n.data.fieldList[t].valueList.push(l), n.setData({ + fieldList: n.data.fieldList + }), n.setData({ + uploadVideoCount: ++n.data.uploadVideoCount + }), n.doUploadVideo(t, i, n.data.uploadVideoCount); + }).catch(function(a) { + console.log(a), wx.hideLoading({}), n.setData({ + uploadVideoCount: ++n.data.uploadVideoCount + }), n.doUploadVideo(t, i, n.data.uploadVideoCount); + }); + }, + viewVideo: function(t) { + var a = [ { + url: t.currentTarget.dataset.url, + type: "video" + } ]; + wx.previewMedia({ + sources: a, + current: 0, + showmenu: !1 + }); + }, + delVideo: function(t) { + var a = this, e = t.currentTarget.dataset.index, i = t.currentTarget.dataset.idx; + wx.showModal({ + title: "提示", + content: "确定要删除该视频吗?", + cancelText: "取消", + confirmText: "确定", + success: function(t) { + t.confirm && (a.data.fieldList[e].valueList.splice(i, 1), a.setData({ + fieldList: a.data.fieldList + })); + } + }); + }, + addLink: function() { + for (var t = null, a = 0; a < this.data.items.length; a++) if ("LINK" == this.data.items[a].type) { + t = this.data.items[a]; + break; + } + if (this.data.linkList.length < t.count) { + if ("" == this.data.linkStr) return void wx.showToast({ + title: "请输入文字内容", + icon: "error" + }); + this.data.linkList.push(this.data.linkStr), this.setData({ + linkList: this.data.linkList, + linkStr: "" + }), this.data.linkList.length == t.count && this.setData({ + isShowLink: !1 + }); + } + }, + addDesc: function() { + for (var t = null, a = 0; a < this.data.items.length; a++) if ("TEXTAREA" == this.data.items[a].type) { + t = this.data.items[a]; + break; + } + if (this.data.textareaList.length < t.count) { + if ("" == this.data.tempDesc) return void wx.showToast({ + title: "请输入文字内容", + icon: "error" + }); + this.data.textareaList.push(this.data.tempDesc), this.setData({ + textareaList: this.data.textareaList, + tempDesc: "" + }), this.data.textareaList.length == t.count && this.setData({ + isShowDesc: !1 + }); + } + }, + addStr: function() { + for (var t = null, a = 0; a < this.data.items.length; a++) if ("TEXT" == this.data.items[a].type) { + t = this.data.items[a]; + break; + } + if (this.data.textList.length < t.count) { + if ("" == this.data.tempText) return void wx.showToast({ + title: "请输入文字内容", + icon: "error" + }); + this.data.textList.push(this.data.tempText), this.setData({ + textList: this.data.textList, + tempText: "" + }), this.data.textList.length == t.count && this.setData({ + isShowText: !1 + }); + } + }, + delText: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该条数据吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.textList.splice(t.currentTarget.dataset.index, 1), a.setData({ + textList: a.data.textList + })); + } + }); + }, + delLink: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该条数据吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.linkList.splice(t.currentTarget.dataset.index, 1), a.setData({ + linkList: a.data.linkList + })); + } + }); + }, + delDesc: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该条数据吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.textareaList.splice(t.currentTarget.dataset.index, 1), a.setData({ + textareaList: a.data.textareaList + })); + } + }); + }, + confirmSel: function(t) { + var a = t.detail, e = (a.piacker, a.value); + this.setData({ + selDisplayType: e.id, + displayTypeStr: e.name, + isShowType: !1 + }); + }, + cancelSel: function(t) { + this.setData({ + isShowType: !1 + }); + }, + textInput: function(a) { + this.setData(t({}, a.currentTarget.id, a.detail.value)); + }, + onHide: function(t) { + this.setData({ + isShowText: !1, + isShowDesc: !1, + isShowPhoto: !1, + isShowLink: !1, + isShowAudio: !1, + isShowVideo: !1, + isShowTags: !1 + }); + }, + chooseTags: function(t) { + var a = t.currentTarget.dataset.idx; + this.data.fieldList[this.data.currentIndex].dictionariesList[a].isSel = !this.data.fieldList[this.data.currentIndex].dictionariesList[a].isSel, + this.setData({ + fieldList: this.data.fieldList + }); + var e = "", i = ""; + this.data.fieldList[this.data.currentIndex].dictionariesList.forEach(function(t) { + t.isSel && (e += t.dataName + ",", i += t.dataId + ","); + }), e = e.substr(0, e.length - 1), i = i.substr(0, i.length - 1), this.data.fieldList[this.data.currentIndex].selValue = e, + this.data.fieldList[this.data.currentIndex].value = i, this.setData({ + fieldList: this.data.fieldList + }); + }, + selTags: function() { + this.setData({ + isShowTags: !1 + }); + }, + choosePhoto: function(t) { + var a = this, e = t.currentTarget.dataset.item, i = t.currentTarget.dataset.index, s = e.maxCount - e.valueList.length; + wx.chooseImage({ + count: Number.parseInt(s), + sourceType: [ "album", "camera" ], + success: function(t) { + a.doUploadImg(i, t.tempFilePaths, a.data.uploadCount); + }, + fail: function(t) {} + }); + }, + delImg: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该图片吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.fieldList[t.currentTarget.dataset.itemindex].valueList.splice(t.currentTarget.dataset.index, 1), + a.setData({ + fieldList: a.data.fieldList + })); + } + }); + }, + viewImg: function(t) { + var a = [ t.currentTarget.dataset.url ]; + wx.previewImage({ + urls: a, + current: t.currentTarget.dataset.url + }); + }, + doUploadImg: function(t, e, i) { + wx.showLoading({ + title: "上传中..." + }); + var s = this, n = e.length; + s.data.uploadCount < n ? a.http.upload(a.urls.doUploadImg, { + path: e[s.data.uploadCount], + name: "image", + header: { + token: a.globalData.token + } + }).then(function(i) { + wx.hideLoading({}); + var n = JSON.parse(i).data, o = { + id: n, + path: a.baseUrls.baseCardUrl + n + }; + s.data.fieldList[t].valueList.push(o), s.setData({ + fieldList: s.data.fieldList + }), s.setData({ + uploadCount: ++s.data.uploadCount + }), s.doUploadImg(t, e, s.data.uploadCount); + }).catch(function(a) { + wx.hideLoading({}), s.setData({ + uploadCount: ++s.data.uploadCount + }), s.doUploadImg(t, e, s.data.uploadCount); + }) : (wx.hideLoading({}), s.setData({ + uploadCount: 0 + })); + }, + chooseLocation: function(t) { + var a = t.currentTarget.dataset.index; + this.setData({ + curMapIndex: a + }); + var e = JSON.stringify(n); + wx.navigateTo({ + url: "plugin://chooseLocation/index?key=".concat("HVDBZ-KJGKF-DNMJR-JHEWI-H2HN7-23BMS", "&referer=").concat("市域自治与互助", "&location=").concat(e, "&category=").concat("生活服务,娱乐休闲") + }); + }, + delMap: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该条数据吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.fieldList[t.currentTarget.dataset.index].valueList.splice(t.currentTarget.dataset.idx, 1), + a.setData({ + fieldList: a.data.fieldList + })); + } + }); + }, + delAudio: function(t) { + console.log(t); + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该音频吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.fieldList[t.currentTarget.dataset.index].valueList.splice(t.currentTarget.dataset.idx, 1), + a.setData({ + fieldList: a.data.fieldList + })); + } + }); + }, + doStartRecord: function() { + var t = this; + wx.getSetting({ + success: function(a) { + a.authSetting["scope.record"] ? t.startRecord() : wx.authorize({ + scope: "scope.record", + success: function() { + t.startRecord(); + } + }); + } + }); + }, + startRecord: function() { + var t = this; + t.data.setInter = setInterval(function() { + var a = parseInt(t.data.speck_time + 1); + t.setData({ + speck_time: parseInt(a), + isStartRecord: !0 + }), t.data.speck_time > 0 && t.data.speck_time <= 59 ? t.start() : (clearInterval(t.data.setInter), + t.stop(), wx.showToast({ + title: "录音最长60S哦!", + duration: 2e3, + icon: "none" + })); + }, 1e3); + }, + doEndRecord: function() { + clearInterval(this.data.setInter), this.data.speck_time > 3 ? (clearInterval(this.data.setInter), + this.stop(!0), this.setData({ + speck_time: "0", + isStartRecord: !1 + })) : (clearInterval(this.data.setInter), this.stop(!1), wx.showToast({ + title: "录制时间过短", + duration: 2e3, + icon: "none" + }), this.setData({ + speck_time: "0", + isStartRecord: !1 + })); + }, + start: function() { + e.start({ + duration: 6e4, + format: "mp3" + }), e.onStart(function() { + console.log("recorder start"); + }), e.onError(function(t) { + console.log(t), _self.stop(!1); + }); + }, + stop: function(t) { + var a = this; + e.stop(), e.onStop(function(e) { + t && a.doUploadAudio(e); + }); + }, + doUploadAudio: function(t) { + wx.showLoading({ + title: "上传中..." + }); + var e = this; + a.http.upload(a.urls.doUploadAudio, { + path: t.tempFilePath, + name: "audio", + header: { + token: a.globalData.token + } + }).then(function(i) { + if (wx.hideLoading({}), e.data.fieldList[e.data.currentIndex].valueList.length < e.data.currentItem.maxCount) { + wx.hideLoading({}); + var s = JSON.parse(i).data, n = a.baseUrls.baseCardUrl + s, o = parseInt(t.duration / 1e3), d = parseInt(o / 60), r = parseInt(o % 60), l = { + id: s, + path: n, + isPlay: !1, + duration: o, + curDuation: 0, + curDurationStr: "00:00", + totalDurationStr: (d > 9 ? d : "0" + d) + ":" + (+r > 9 ? r : "0" + r) + }; + e.data.fieldList[e.data.currentIndex].valueList.push(l), e.setData({ + fieldList: e.data.fieldList + }), e.data.fieldList[e.data.currentIndex].valueList.length == e.data.currentItem.maxCount && e.setData({ + isShowAudio: !1 + }); + } + }).catch(function(t) {}); + }, + play: function(t) { + var a = t.currentTarget.dataset.index, e = t.currentTarget.dataset.idx, s = t.currentTarget.dataset.item, n = this; + n.data.fieldList[a].valueList.forEach(function(t) { + t.isPlay && i.stop(), t.isPlay = !1, t.curDuation = 0, t.curDuationStr = "00:00"; + }), s.isPlay || ((i = wx.createInnerAudioContext()).src = n.data.fieldList[a].valueList[e].path, + i.autoplay = !0), i.onPlay(function() { + n.data.fieldList[a].valueList[e].isPlay = !0, n.setData({ + fieldList: n.data.fieldList + }); + }), i.onCanplay(function(t) {}), i.onStop(function(t) { + n.data.fieldList[a].valueList[e].isPlay = !1, n.data.fieldList[a].valueList[e].curDuration = 0, + n.data.fieldList[a].valueList[e].curDurationStr = "00:00", n.setData({ + fieldList: n.data.fieldList + }); + }), i.onEnded(function(t) { + n.data.fieldList[a].valueList[e].isPlay = !1, n.data.fieldList[a].valueList[e].curDuration = 0, + n.data.fieldList[a].valueList[e].curDurationStr = "00:00", n.setData({ + fieldList: n.data.fieldList + }); + }), i.onError(function(t) { + n.data.fieldList[a].valueList[e].isPlay = !1, n.data.fieldList[a].valueList[e].curDuration = 0, + n.data.fieldList[a].valueList[e].curDurationStr = "00:00", n.setData({ + fieldList: n.data.fieldList + }); + }), i.onSeeking(function() { + console.log(i.currentTime); + }), i.onWaiting(function() {}), i.onTimeUpdate(function() { + if (i.duration != 1 / 0) { + n.data.fieldList[a].valueList[e].curDuration = parseInt(i.currentTime), n.data.fieldList[a].valueList[e].duration = parseInt(i.duration), + console.log(i.duration); + var t = parseInt(i.currentTime / 60), s = parseInt(i.currentTime % 60), o = parseInt(i.duration / 60), d = parseInt(i.duration % 60), r = t > 9 ? t : "0" + t, l = s > 9 ? s : "0" + s, u = o > 9 ? o : "0" + o, c = +d > 9 ? d : "0" + d; + n.data.fieldList[a].valueList[e].curDurationStr = r + ":" + l, n.data.fieldList[a].valueList[e].totalDurationStr = u + ":" + c, + n.setData({ + fieldList: n.data.fieldList + }); + } + }); + }, + rewind: function(t) { + var a = t.currentTarget.dataset.index, e = t.currentTarget.dataset.idx; + t.currentTarget.dataset.item.isPlay && (this.data.fieldList[a].valueList[e].curDuration = this.data.fieldList[a].valueList[e].curDuration - this.data.speedStep, + i.seek(this.data.fieldList[a].valueList[e].curDuration), this.setData({ + fieldList: this.data.fieldList + })); + }, + speed: function(t) { + var a = t.currentTarget.dataset.index, e = t.currentTarget.dataset.idx; + t.currentTarget.dataset.item.isPlay && (this.data.fieldList[a].valueList[e].curDuration = this.data.fieldList[a].valueList[e].curDuration + this.data.speedStep, + i.seek(this.data.fieldList[a].valueList[e].curDuration), this.setData({ + fieldList: this.data.fieldList + })); + }, + slider4change: function(t) { + t.currentTarget.dataset.item.isPlay && i.seek(t.detail.value); + }, + showDialog: function(t) { + console.log(t), this.setData({ + isShowAudio: !0, + currentItem: t.currentTarget.dataset.item, + currentIndex: t.currentTarget.dataset.index + }); + }, + doPublish: function() { + if (this.checkParams()) { + wx.showToast({ + title: "保存中..." + }); + var t = this.buildParams(); + console.log(t), a.http.post(a.urls.doSaveMoments.format({ + configColumnId: this.data.columnId + }), { + data: t, + header: { + token: a.globalData.token + } + }).then(function(t) { + wx.hideLoading({}); + var a = getCurrentPages(); + a[a.length - 2].setData({ + isRefresh: !0 + }), wx.navigateBack({ + delta: 1 + }); + }).catch(function(t) { + console.log(t); + }); + } + }, + checkParams: function() { + for (var t = !0, a = 0; a < this.data.fieldList.length; a++) { + var e = this.data.fieldList[a]; + if (e.must) if ("1" == e.dataType || "7" == e.dataType || "8" == e.dataType || "9" == e.dataType) { + if (e.value.length <= 0) { + wx.showToast({ + title: "请输入或选择" + e.comment, + icon: "none" + }), t = !1; + break; + } + } else if (e.valueList.length <= 0) { + wx.showToast({ + title: "请上传" + e.comment, + icon: "none" + }), t = !1; + break; + } + } + return t; + }, + buildParams: function() { + for (var t = { + uid: this.data.uId + }, a = 0; a < this.data.fieldList.length; a++) { + var e = this.data.fieldList[a]; + if ("1" == e.dataType || "7" == e.dataType || "8" == e.dataType || "9" == e.dataType) e.value.length > 0 && (t[e.name] = e.value); else if (e.valueList.length > 0) { + var i = ""; + "6" == e.dataType ? e.valueList.forEach(function(t) { + i += t.latitude + "," + t.longitude + "-"; + }) : "4" == e.dataType ? e.valueList.forEach(function(t) { + i += t.id + "&" + t.thumbId + ","; + }) : "3" == e.dataType ? e.valueList.forEach(function(t) { + i += t.id + "&" + t.duration + ","; + }) : "2" == e.dataType ? (e.valueList.forEach(function(t) { + i += t.id + ","; + }), i = i.substr(0, i.length - 1), i += "@" + this.data.selDisplayType) : e.valueList.forEach(function(t) { + i += t.id + ","; + }), "2" != e.dataType && (i = i.substr(0, i.length - 1)), t[e.name] = i; + } + } + return t; + }, + showDisplayType: function(t) { + this.setData({ + isShowType: !0 + }); + } +}); \ No newline at end of file diff --git a/packagecard/moments/edit/momentedit.json b/packagecard/moments/edit/momentedit.json new file mode 100644 index 0000000..91de62c --- /dev/null +++ b/packagecard/moments/edit/momentedit.json @@ -0,0 +1,24 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + } +} \ No newline at end of file diff --git a/packagecard/moments/edit/momentedit.wxml b/packagecard/moments/edit/momentedit.wxml new file mode 100755 index 0000000..2078efb --- /dev/null +++ b/packagecard/moments/edit/momentedit.wxml @@ -0,0 +1,222 @@ + + + + + + {{item.comment}} + + + + + + + {{item.comment}} + + + + + + + + + + + + {{item.comment}}{{item.valueList.length}}/{{item.maxCount}} + + + + {{displayTypeStr}} + + + + + + + + + + + + + + + + + + + + + + {{item.comment}} + + {{item.valueList.length}}/{{item.maxCount}} + + + + + + + + {{audio.curDurationStr}} + + {{audio.totalDurationStr}} + + + + + + + + + + + + + + + + 语音,可以给名片访客留下更深的印象 + + + 点击添加 + + + + + {{item.comment}} + {{item.valueList.length}}/{{item.maxCount}} + + + + + + + + + + + + + + + + + + {{item.comment}} + + + + + + + {{item.comment}} + + + + + + + + {{m.name}}-{{m.address}} + + + + + + + + + + + + + 在地图上选取一个地点 + + + 点击添加 + + + + + {{item.comment}} + + {{item.selValue}} + + + + + + {{item.comment}} + + {{item.selValue}} + + + + + + + + + + + + + + + + + 00:{{speck_time>9?speck_time:'0'+speck_time}} + 长按录音 + + + + {{audioFile.isPlay?'播放中:'+speck_time+'秒':'时长:'+audioFile.duration+'秒'}} + + 点击播放 + 删除 + + + + + + + 点击添加 + + + + + + 点击添加 + + + + + 相册 + 相机 + + + + + 相册 + 相机 + + + + + + 点击添加 + + + + + + + {{item.dataName}} + + + + + + + diff --git a/packagecard/moments/edit/momentedit.wxss b/packagecard/moments/edit/momentedit.wxss new file mode 100755 index 0000000..06e17cb --- /dev/null +++ b/packagecard/moments/edit/momentedit.wxss @@ -0,0 +1,41 @@ +van-action-sheet input { + height: 60rpx; + line-height: 60rpx; + padding-left: 10rpx; +} + +van-action-sheet input,van-action-sheet textarea { + border: 1px solid #c2c2c2; + border-radius: 10rpx; + margin-top: 9rpx; +} + +van-action-sheet textarea { + padding: 10rpx; +} + +van-action-sheet .line { + border-bottom: 1rpx solid #f5f5f5; + border-top: 1rpx solid #f5f5f5; +} + +van-action-sheet .line,van-action-sheet .noline { + height: 90rpx; + line-height: 90rpx; + text-align: center; + width: 90%; +} + +van-action-sheet .line:active,van-action-sheet .noline:active { + background-color: #f5f5f5; + color: #000; +} + +.item-bottom-margin { + margin-bottom: 15rpx; + width: 100%; +} + +.item-padding { + padding: 15rpx; +} \ No newline at end of file diff --git a/packagecard/moments/list/momentslist.js b/packagecard/moments/list/momentslist.js new file mode 100755 index 0000000..c1fb657 --- /dev/null +++ b/packagecard/moments/list/momentslist.js @@ -0,0 +1,268 @@ +var t = getApp(), a = wx.createInnerAudioContext(); + +Page({ + data: { + columnId: "", + type: "", + speedStep: 5, + waitFlag: !1, + configMode: "2", + dataList: [], + count: 2, + isLoadMore: !1, + imgUrl: t.baseUrls.baseCardUrl, + isRefresh: !1, + title: "栏目内容" + }, + onLoad: function(t) { + console.log(t.mode), this.setData({ + columnId: t.id, + configMode: t.mode, + type: t.type, + title: t.title + }), wx.setNavigationBarTitle({ + title: t.title + }), this.getList(); + }, + onShow: function() { + this.data.isRefresh && (wx.startPullDownRefresh({}), this.setData({ + isRefresh: !1 + })); + }, + getList: function() { + var a = this; + wx.showLoading({ + title: "加载中..." + }), t.http.get(t.urls.getMomentsList.format({ + configColumnId: a.data.columnId + }), { + header: { + token: t.globalData.token + }, + data: { + backSystem: "backSystem" + } + }).then(function(i) { + wx.hideLoading({}), i.data.forEach(function(i) { + i.list.forEach(function(i) { + switch (i.dataType) { + case "2": + var e = i.value.split("@"), s = e[0].split(","); + e.length > 1 ? i.dataMode = e[1] : i.dataMode = "1"; + for (var n = [], r = 0; r < s.length; r++) if ("" != s[r]) { + var d = { + path: a.data.imgUrl + s[r], + imgPath: "../../../images/ic_temp.png" + }; + n.push(d); + } + i.valueList = n; + break; + + case "4": + for (s = i.value.split(","), n = [], r = 0; r < s.length; r++) if ("" != s[r]) { + var o = s[r].split("&"); + d = { + path: t.baseUrls.baseCardUrl + o[0], + imgPath: t.baseUrls.baseCardUrl + o[1] + }; + n.push(d); + } + i.valueList = n; + break; + + case "6": + for (s = i.value.split("-"), n = [], r = 0; r < s.length; r++) if ("" != s[r]) { + var u = s[r].split(","); + d = { + latitude: u[0], + longitude: u[1] + }; + n.push(d); + } + i.valueList = n; + break; + + case "3": + for (s = i.value.split(","), n = [], r = 0; r < s.length; r++) if ("" != s[r]) { + var l = "00:00"; + if ((o = s[r].split("&")).length > 1) { + var c = o[1], h = parseInt(c / 60), L = parseInt(c % 60); + l = (h > 9 ? h : "0" + h) + ":" + (+L > 9 ? L : "0" + L); + } + d = { + path: a.data.imgUrl + o[0], + isPlay: !1, + duration: 100, + curDuation: 0, + curDurationStr: "00:00", + totalDurationStr: l + }; + n.push(d); + } + i.valueList = n; + break; + + case "8": + i.dictionariesList.forEach(function(t) { + -1 != i.value.indexOf(t.dataId) && (i.selValue = t.dataName); + }); + break; + + case "9": + i.dictionariesList.forEach(function(t) { + -1 != i.value.indexOf(t.dataId) ? t.isSel = !0 : t.isSel = !1; + }); + } + }); + }), a.setData({ + dataList: i.data + }), wx.stopPullDownRefresh({}); + }).catch(function(t) { + console.log(t), wx.stopPullDownRefresh({}); + }); + }, + toggleHandler: function(t) { + for (var a = t.currentTarget.dataset.index, i = 0; i < this.data.trendsList.length; i++) a == i && (this.data.trendsList[a].auto = !0, + this.data.trendsList[a].seeMore = !1); + this.setData({ + trendsList: this.data.trendsList + }); + }, + toggleContent: function(t) { + for (var a = t.currentTarget.dataset.index, i = 0; i < this.data.trendsList.length; i++) a == i && (this.data.trendsList[a].auto = !0, + this.data.trendsList[a].seeMore = !0); + this.setData({ + trendsList: this.data.trendsList + }); + }, + viewImg: function(t) { + wx.previewImage({ + urls: [ t.currentTarget.dataset.url ] + }); + }, + viewVideo: function(t) { + var a = t.currentTarget.dataset.url; + wx.previewMedia({ + sources: [ { + url: a, + type: "video" + } ] + }); + }, + onPullDownRefresh: function() { + this.getList(); + }, + onReachBottom: function() { + console.log("触底了"); + }, + play: function(t) { + var i = t.currentTarget.dataset.index, e = t.currentTarget.dataset.item, s = t.currentTarget.dataset.idx, n = t.currentTarget.dataset.i, r = this; + r.data.dataList.forEach(function(t) { + t.list.forEach(function(t) { + t.valueList && t.valueList.forEach(function(t) { + t.isPlay && a.stop(), t.isPlay = !1, t.curDuation = 0, t.curDuationStr = "00:00"; + }); + }); + }), e.isPlay || ((a = wx.createInnerAudioContext()).src = r.data.dataList[i].list[s].valueList[n].path, + a.autoplay = !0), a.onPlay(function() { + r.data.dataList[i].list[s].valueList[n].isPlay = !0, r.setData({ + dataList: r.data.dataList + }); + }), a.onCanplay(function(t) {}), a.onStop(function(t) { + r.data.dataList[i].list[s].valueList[n].isPlay = !1, r.data.dataList[i].list[s].valueList[n].curDuration = 0, + r.data.dataList[i].list[s].valueList[n].curDurationStr = "00:00", r.setData({ + dataList: r.data.dataList + }); + }), a.onEnded(function(t) { + r.data.dataList[i].list[s].valueList[n].isPlay = !1, r.data.dataList[i].list[s].valueList[n].curDuration = 0, + r.data.dataList[i].list[s].valueList[n].curDurationStr = "00:00", r.setData({ + dataList: r.data.dataList + }); + }), a.onError(function(t) { + r.data.dataList[i].list[s].valueList[n].isPlay = !1, r.data.dataList[i].list[s].valueList[n].curDuration = 0, + r.data.dataList[i].list[s].valueList[n].curDurationStr = "00:00", r.setData({ + dataList: r.data.dataList + }); + }), a.onSeeking(function() { + console.log(a.currentTime); + }), a.onWaiting(function() {}), a.onTimeUpdate(function() { + if (a.duration != 1 / 0) { + r.data.dataList[i].list[s].valueList[n].curDuration = parseInt(a.currentTime), r.data.dataList[i].list[s].valueList[n].duration = parseInt(a.duration); + var t = parseInt(a.currentTime / 60), e = parseInt(a.currentTime % 60), d = parseInt(a.duration / 60), o = parseInt(a.duration % 60), u = t > 9 ? t : "0" + t, l = e > 9 ? e : "0" + e, c = d > 9 ? d : "0" + d, h = +o > 9 ? o : "0" + o; + r.data.dataList[i].list[s].valueList[n].curDurationStr = u + ":" + l, r.data.dataList[i].list[s].valueList[n].totalDurationStr = c + ":" + h, + r.setData({ + dataList: r.data.dataList + }); + } + }); + }, + rewind: function(t) { + var i = t.currentTarget.dataset.index, e = t.currentTarget.dataset.item, s = t.currentTarget.dataset.idx, n = t.currentTarget.dataset.i; + e.isPlay && (this.data.dataList[i].list[s].valueList[n].curDuration = this.data.dataList[i].list[s].valueList[n].curDuration - this.data.speedStep, + a.seek(this.data.dataList[i].list[s].valueList[n].curDuration), this.setData({ + dataList: this.data.dataList + })); + }, + speed: function(t) { + var i = t.currentTarget.dataset.index, e = t.currentTarget.dataset.item, s = t.currentTarget.dataset.idx, n = t.currentTarget.dataset.i; + e.isPlay && (this.data.dataList[i].list[s].valueList[n].curDuration = this.data.dataList[i].list[s].valueList[n].curDuration + this.data.speedStep, + a.seek(this.data.dataList[i].list[s].valueList[n].curDuration), this.setData({ + dataList: this.data.dataList + })); + }, + slider4change: function(t) { + t.currentTarget.dataset.index; + t.currentTarget.dataset.item.isPlay && a.seek(t.detail.value); + }, + delItem: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该条数据吗?", + cancelText: "取消", + confirmText: "确定", + success: function(i) { + i.confirm && a.doDelMoment(t.currentTarget.dataset.index); + } + }); + }, + doDelMoment: function(a) { + var i = this; + wx.showLoading({ + title: "删除中..." + }); + var e = this.data.dataList[a]; + t.http.delete(t.urls.doDelMoment.format({ + configColumnId: this.data.columnId, + uid: e.uid + }), { + header: { + token: t.globalData.token + } + }).then(function(t) { + wx.hideLoading({}), wx.showToast({ + title: "删除成功", + icon: "success" + }), i.data.dataList.splice(a, 1), i.setData({ + dataList: i.data.dataList + }), wx.startPullDownRefresh({}); + }).catch(function(t) { + console.log(t), wx.hideLoading({}); + }); + }, + doPublish: function() { + wx.navigateTo({ + url: "../publish/momentpublishline?id=" + this.data.columnId + "&title=" + this.data.title + }); + }, + editMoment: function(t) { + var a = this.data.dataList[t.currentTarget.dataset.index]; + wx.navigateTo({ + url: "../edit/momentedit?id=" + this.data.columnId + "&uid=" + a.uid + "&title=" + this.data.title + }); + }, + onUnload: function(t) { + a && a.stop(); + } +}); \ No newline at end of file diff --git a/packagecard/moments/list/momentslist.json b/packagecard/moments/list/momentslist.json new file mode 100644 index 0000000..2015974 --- /dev/null +++ b/packagecard/moments/list/momentslist.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "enablePullDownRefresh": true +} \ No newline at end of file diff --git a/packagecard/moments/list/momentslist.wxml b/packagecard/moments/list/momentslist.wxml new file mode 100755 index 0000000..6a6a978 --- /dev/null +++ b/packagecard/moments/list/momentslist.wxml @@ -0,0 +1,94 @@ + + + + 发表时间:{{item.gmtCreate}} + + + + + 该条数据存在违规内容,请修改后重新发布. + 违规描述:{{item.checkRemark}} + + + + + + + {{columnId=='de7b5e22-64f9-4c60-a1f9-6ac004dfb9a8'?child.comment+':':''}}{{child.value}} + + + + + + + + + + + + + + + + + + + + + + + + {{audio.curDurationStr}} + + {{audio.totalDurationStr}} + + + + + + + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + {{child.selValue}} + + + + + + {{item.dataName}} + + + + + + + + + + + + + 加载中... + diff --git a/packagecard/moments/list/momentslist.wxss b/packagecard/moments/list/momentslist.wxss new file mode 100755 index 0000000..bd34275 --- /dev/null +++ b/packagecard/moments/list/momentslist.wxss @@ -0,0 +1,81 @@ +.box { + margin: 0rpx 10rpx; +} + +.text_box { + line-height: 48rpx; +} + +.textFour_box,.text_box { + font-size: 30rpx; + font-weight: 400; + width: 100%; +} + +.textFour_box { + line-height: 26px; + text-align: justify; +} + +.toggle-icon { + height: 25rpx; + width: 25rpx; +} + +.text_toggloe_box { + align-items: center; + display: flex; + flex-direction: row; + justify-content: left; + margin: 10rpx 0; +} + +.text_toggle_text { + color: #000; + font-size: 30rpx; + line-height: 32rpx; + margin-right: 10rpx; +} + +.three { + line-clamp: 3; + -webkit-box-orient: vertical; + display: -webkit-box; + overflow: hidden; + text-overflow: -o-ellipsis-lastline; + text-overflow: ellipsis; +} + +.item-box { + margin: 7.5rpx 15rpx; +} + +.item-box:nth-child(1) { + margin: 15rpx 15rpx 7.5rpx; +} + +.movie-box { + align-items: center; + display: flex; + flex-direction: row; + justify-content: center; +} + +.movie-box,.movie-box image { + border-radius: 10rpx; + height: 350rpx; + width: 100%; +} + +.column-item { + margin: 0rpx; + padding: 7.5rpx 15rpx; +} + +.column-item:nth-child(1) { + padding: 15rpx 15rpx 7.5rpx; +} + +.column-item:last-child { + padding: 7.5rpx 15rpx 15rpx; +} \ No newline at end of file diff --git a/packagecard/moments/list/momentsshowlist.js b/packagecard/moments/list/momentsshowlist.js new file mode 100755 index 0000000..c6eba5f --- /dev/null +++ b/packagecard/moments/list/momentsshowlist.js @@ -0,0 +1,8 @@ +var a = getApp(); + +Page({ + data: { + url: "https://cbc.wgink.ink/systemcard/app/cardconfigarticle/listrelease?token=" + a.globalData.token + }, + onLoad: function(a) {} +}); \ No newline at end of file diff --git a/packagecard/moments/list/momentsshowlist.json b/packagecard/moments/list/momentsshowlist.json new file mode 100644 index 0000000..91de62c --- /dev/null +++ b/packagecard/moments/list/momentsshowlist.json @@ -0,0 +1,24 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + } +} \ No newline at end of file diff --git a/packagecard/moments/list/momentsshowlist.wxml b/packagecard/moments/list/momentsshowlist.wxml new file mode 100755 index 0000000..34c346a --- /dev/null +++ b/packagecard/moments/list/momentsshowlist.wxml @@ -0,0 +1 @@ + diff --git a/packagecard/moments/list/momentsshowlist.wxss b/packagecard/moments/list/momentsshowlist.wxss new file mode 100755 index 0000000..e69de29 diff --git a/packagecard/moments/momentsdetail/momentsdetail.js b/packagecard/moments/momentsdetail/momentsdetail.js new file mode 100755 index 0000000..8a1ff5f --- /dev/null +++ b/packagecard/moments/momentsdetail/momentsdetail.js @@ -0,0 +1,606 @@ +var t = getApp(), a = wx.createInnerAudioContext(); + +Page({ + data: { + actions: [ { + className: "dialog-content" + } ], + dataList: [], + isShowCommentInput: !1, + collectSwitch: "1", + likeSwitch: "1", + commentSwitch: "1", + shareSwitch: "1", + speedStep: 5, + waitFlag: !1, + avatarUrl: t.globalData.userInfo.avatarUrl, + imgUrl: t.baseUrls.baseCardUrl, + uId: "", + columnId: "", + publishTime: "", + isShowComment: !1, + maxVideo: 1, + maxPhoto: 1, + commentValue: "", + mediaBean: null, + uploadCount: 0, + uploadVideoCount: 0, + maxDuration: 60, + dataId: "", + commentList: [], + commentCount: 0, + currentPage: 1, + curUserId: t.globalData.currentUserId, + isShowRestore: !1, + restoreList: [], + currentCommentItem: void 0, + currentType: 2, + restorePage: 1, + restoreCount: 0, + likeStatus: !1, + collectStatus: !1, + restoreLikeStatus: !1, + contentHeight: t.globalData.windowHeight + }, + onLoad: function(t) { + this.setData({ + uId: t.uId, + columnId: t.cId, + dataId: t.uId, + collectSwitch: t.collectSwitch, + likeSwitch: t.likeSwitch, + commentSwitch: t.commentSwitch, + shareSwitch: t.shareSwitch + }), wx.setNavigationBarTitle({ + title: "详情" + }), "3" == t.collectSwitch || "4" == t.collectSwitch || "3" == t.likeSwitch && "4" == t.likeSwitch || "3" == t.shareSwitch || "4" == t.shareSwitch || "3" == t.commentSwitch || "4" == t.commentSwitch ? this.setData({ + isShowCommentInput: !0 + }) : this.setData({ + isShowCommentInput: !1 + }), this.getMainMoment(), this.getCommentList(), this.getColumnContentHandle(this.data.uId, 2); + }, + getMainMoment: function() { + wx.showLoading({ + title: "加载中..." + }); + var a = this; + t.http.get(t.urls.getMomentsContent.format({ + configColumnId: a.data.columnId, + uid: a.data.uId + }), { + header: { + token: t.globalData.token + } + }).then(function(t) { + wx.hideLoading({}), a.buildDetail(t.data); + }).catch(function(t) { + wx.hideLoading({}), console.log(t); + }); + }, + getColumnContentHandle: function(a, e) { + var n = this; + wx.showLoading({ + title: "加载中..." + }), t.http.get(t.urls.getColumnContentHandle.format({ + projectId: "column", + businessIds: a + }), { + header: { + token: t.globalData.token + } + }).then(function(t) { + wx.hideLoading({}), t.data.length > 0 && (2 == e ? n.setData({ + likeStatus: t.data[0].likeStatus, + collectStatus: t.data[0].collectStatus + }) : 2 == n.data.currentType ? (n.data.commentList.forEach(function(a) { + t.data.forEach(function(t) { + a.contentCommentId == t.businessId && (a.likeStatus = t.likeStatus, a.contentCommentLike = t.likeCount, + a.contentCommentSubCount = t.commentCount); + }); + }), n.setData({ + commentList: n.data.commentList + })) : (n.data.restoreList.forEach(function(a) { + t.data.forEach(function(t) { + a.contentCommentId == t.businessId && (a.likeStatus = t.likeStatus, a.contentCommentLike = t.likeCount, + a.contentCommentSubCount = t.commentCount); + }); + }), n.setData({ + restoreList: n.data.restoreList + }))); + }).catch(function(t) {}); + }, + buildDetail: function(a) { + this.setData({ + publishTime: a.gmtCreate + }), a.list.forEach(function(a) { + switch (a.dataType) { + case "2": + var e = a.value.split("@"); + e.length > 1 ? a.dataMode = e[1] : a.dataMode = "1"; + var n = e[0].split(","), o = []; + n.forEach(function(a) { + if (a.length > 0) { + var e = { + id: a, + path: t.baseUrls.baseCardUrl + a + }; + o.push(e); + } + }), a.valueList = o; + break; + + case "4": + n = a.value.split(","), o = []; + for (var i = 0; i < n.length; i++) if (n[i].length > 0) { + var s = n[i].split("&"), r = { + path: t.baseUrls.baseCardUrl + s[0], + imgPath: t.baseUrls.baseCardUrl + s[1] + }; + o.push(r); + } + a.valueList = o; + break; + + case "3": + n = a.value.split(","), o = []; + n.forEach(function(a) { + if (a.length > 0) { + var e = a.split("&"), n = "00:00"; + if (e.length > 1) { + var i = e[1], s = parseInt(i / 60), r = parseInt(i % 60); + n = (s > 9 ? s : "0" + s) + ":" + (+r > 9 ? r : "0" + r); + } + var d = { + id: e[0], + path: t.baseUrls.baseCardUrl + e[0], + isPlay: !1, + duration: 100, + curDuation: 0, + curDurationStr: "00:00", + totalDurationStr: n + }; + o.push(d); + } + }), a.valueList = o; + break; + + case "6": + n = a.value.split("-"), o = []; + n.forEach(function(t) { + if (t.length > 0) { + var a = t.split(","), e = { + name: "", + address: "", + latitude: a[0], + longitude: a[1] + }; + o.push(e); + } + }), a.valueList = o; + break; + + case "8": + a.dictionariesList.forEach(function(t) { + -1 != a.value.indexOf(t.dataId) && (a.selValue = t.dataName); + }); + break; + + case "9": + var d = ""; + a.dictionariesList.forEach(function(t) { + -1 != a.value.indexOf(t.dataId) ? (d += t.dataName + ",", t.isSel = !0) : t.isSel = !1; + }), d = d.substr(0, d.length - 1), a.selValue = d; + } + }), this.setData({ + dataList: a.list + }); + }, + getCommentList: function() { + var a = this; + t.http.get(t.urls.getCommentList.format({ + projectId: "column", + businessId: a.data.dataId + }), { + header: { + token: t.globalData.token + }, + data: { + page: a.data.currentPage + } + }).then(function(t) { + wx.hideLoading({}); + var e = ""; + t.data.rows.forEach(function(t) { + t.likeStatus = !1, e += t.contentCommentId + ","; + }), a.data.commentList = a.data.commentList.concat(t.data.rows), a.setData({ + commentList: a.data.commentList, + commentCount: t.data.total + }), e.length > 0 && a.getColumnContentHandle(e, 3); + }).catch(function(t) { + console.log(res); + }); + }, + getRestoreList: function() { + var a = this; + t.http.get(t.urls.getCommentList.format({ + projectId: "column", + businessId: a.data.dataId + }), { + header: { + token: t.globalData.token + }, + data: { + page: a.data.restorePage + } + }).then(function(t) { + wx.hideLoading({}); + var e = ""; + t.data.rows.forEach(function(t) { + t.likeStatus = !1, e += t.contentCommentId + ","; + }), a.data.restoreList = a.data.restoreList.concat(t.data.rows), a.setData({ + restoreList: a.data.restoreList, + restoreCount: t.data.total, + isShowRestore: !0 + }), e.length > 0 && a.getColumnContentHandle(e, 3); + }).catch(function(t) { + console.log(res); + }); + }, + viewImg: function(t) { + var a = []; + t.currentTarget.dataset.values.forEach(function(t) { + a.push(t.path); + }), wx.previewImage({ + urls: a, + current: t.currentTarget.dataset.cur + }); + }, + viewVideo: function(t) { + var a = t.currentTarget.dataset.url; + wx.previewMedia({ + sources: [ { + url: a, + type: "video" + } ] + }); + }, + play: function(t) { + var e = this, n = t.currentTarget.dataset.index, o = t.currentTarget.dataset.i, i = t.currentTarget.dataset.a, s = t.currentTarget.dataset.item; + e.data.dataList.forEach(function(t) { + t.list.forEach(function(t) { + "3" == t.dataType && t.valueList && t.valueList.forEach(function(t) { + t.isPlay && a.stop(), t.isPlay = !1, t.curDuration = 0, t.curDuationStr = "00:00"; + }); + }); + }), s.isPlay ? a.stop() : ((a = wx.createInnerAudioContext()).src = e.data.dataList[n].list[o].valueList[i].path + ".mp3", + a.autoplay = !0, console.log(e.data.dataList[n].list[o].valueList[i].path)), a.onPlay(function() { + console.log("onPlay"), e.data.dataList[n].list[o].valueList[i].isPlay = !0, e.setData({ + dataList: e.data.dataList + }); + }), a.onCanplay(function(t) {}), a.onStop(function(t) { + console.log("停止播放"), e.data.dataList[n].list[o].valueList[i].isPlay = !1, e.data.dataList[n].list[o].valueList[i].curDuration = 0, + e.data.dataList[n].list[o].valueList[i].curDurationStr = "00:00", e.setData({ + dataList: e.data.dataList + }), a.destroy(); + }), a.onEnded(function(t) { + console.log(t), console.log("播放完毕"), e.data.dataList[n].list[o].valueList[i].isPlay = !1, + e.data.dataList[n].list[o].valueList[i].curDuration = 0, e.data.dataList[n].list[o].valueList[i].curDurationStr = "00:00", + e.setData({ + dataList: e.data.dataList + }), a.destroy(); + }), a.onError(function(t) { + console.log("播放错误"), console.log(t), e.data.dataList[n].list[o].valueList[i].isPlay = !1, + e.data.dataList[n].list[o].valueList[i].curDuration = 0, e.data.dataList[n].list[o].valueList[i].curDurationStr = "00:00", + e.setData({ + dataList: e.data.dataList + }), a.destroy(); + }), a.onSeeking(function() {}), a.onWaiting(function() {}), a.onTimeUpdate(function() { + if (a.duration != 1 / 0) { + e.data.dataList[n].list[o].valueList[i].curDuration = parseInt(a.currentTime), e.data.dataList[n].list[o].valueList[i].duration = parseInt(a.duration); + var t = parseInt(a.currentTime / 60), s = parseInt(a.currentTime % 60), r = parseInt(a.duration / 60), d = parseInt(a.duration % 60), c = t > 9 ? t : "0" + t, u = s > 9 ? s : "0" + s, l = r > 9 ? r : "0" + r, m = +d > 9 ? d : "0" + d; + e.data.dataList[n].list[o].valueList[i].curDurationStr = c + ":" + u, e.data.dataList[n].list[o].valueList[i].totalDurationStr = l + ":" + m, + e.setData({ + dataList: e.data.dataList + }); + } + }); + }, + rewind: function(t) { + var e = t.currentTarget.dataset.index, n = t.currentTarget.dataset.item, o = (t.currentTarget.dataset.idx, + t.currentTarget.dataset.a), i = t.currentTarget.dataset.i; + n.isPlay && (this.data.dataList[e].list[i].valueList[o].curDuration = this.data.dataList[e].list[i].valueList[o].curDuration - this.data.speedStep, + a.seek(this.data.dataList[e].list[i].valueList[o].curDuration), this.setData({ + dataList: this.data.dataList + })); + }, + speed: function(t) { + var e = t.currentTarget.dataset.index, n = t.currentTarget.dataset.item, o = (t.currentTarget.dataset.idx, + t.currentTarget.dataset.a), i = t.currentTarget.dataset.i; + n.isPlay && (this.data.dataList[e].list[i].valueList[o].curDuration = this.data.dataList[e].list[i].valueList[o].curDuration + this.data.speedStep, + a.seek(this.data.dataList[e].list[i].valueList[o].curDuration), this.setData({ + dataList: this.data.dataList + })); + }, + slider4change: function(t) { + t.currentTarget.dataset.index; + t.currentTarget.dataset.item.isPlay && a.seek(t.detail.value); + }, + shareRecord: function(a) { + var e = this; + t.http.post(t.urls.shareRecord, { + header: { + token: t.globalData.token + }, + data: { + cardTemplateUseId: e.data.cardInfo.cardTemplateUseId, + cardTemplateDispatchParentId: "", + cardTemplateDispatchId: a + } + }).then(function(t) { + console.log(t.data), e.setData({ + shareRecordId: t.data.data + }); + }); + }, + inputWatch: function(t) { + this.setData({ + commentValue: t.detail.value + }); + }, + delMedia: function() { + var t = this; + wx.showModal({ + title: "警告", + content: "确定要删除该数据吗?", + success: function(a) { + a.confirm && t.setData({ + mediaBean: null + }); + } + }); + }, + delComment: function(t) { + var a = this, e = t.currentTarget.dataset.id, n = t.currentTarget.dataset.idx; + wx.showModal({ + title: "提示", + content: "确定要删除该评论吗?", + success: function(t) { + t.confirm && a.doDelComment(e, n); + } + }); + }, + doDelComment: function(a, e) { + var n = this; + wx.showLoading({ + title: "删除中..." + }), t.http.delete(t.urls.doDelComment.format({ + ids: a + }), { + header: { + token: t.globalData.token + } + }).then(function(t) { + wx.hideLoading({}), wx.showToast({ + title: "删除成功" + }), 2 == n.data.currentType ? (n.data.commentList.splice(e, 1), n.setData({ + commentList: n.data.commentList + })) : (n.data.restoreList.splice(e, 1), n.data.commentList.forEach(function(t) { + t.contentCommentId == n.data.dataId && t.contentCommentSubCount--; + }), n.setData({ + restoreList: n.data.restoreList, + commentList: n.data.commentList + })); + }).catch(function(t) {}); + }, + doCommentToComment: function(t) { + var a = t.currentTarget.dataset.id, e = t.currentTarget.dataset.item; + this.setData({ + dataId: a, + currentPage: 1, + restoreList: [], + currentCommentItem: e, + currentType: 3 + }), this.getRestoreList(); + }, + showComment: function() { + this.setData({ + isShowComment: !0 + }); + }, + onCloseDialog: function(t) { + this.setData({ + isShowComment: !1 + }); + }, + onCloseRestore: function(t) { + this.setData({ + isShowRestore: !1, + currentType: 2, + dataId: this.data.uId, + restoreList: [], + currentCommentItem: void 0 + }); + }, + chooseImg: function() { + var t = this; + wx.chooseImage({ + count: t.data.maxPhoto, + sourceType: [ "album", "camera" ], + success: function(a) { + a.tempFilePaths.length > 0 && t.doUploadImg(a.tempFilePaths); + }, + fail: function(t) {} + }); + }, + doUploadImg: function(a) { + wx.showLoading({ + title: "上传中..." + }); + var e = this; + t.http.upload(t.urls.doUploadImg, { + path: a[0], + name: "image", + header: { + token: t.globalData.token + } + }).then(function(a) { + wx.hideLoading({}); + var n = JSON.parse(a).data, o = t.baseUrls.baseCardUrl + n, i = { + id: n, + type: "image", + coverPath: o, + path: o + }; + e.setData({ + mediaBean: i + }); + }).catch(function(t) { + wx.hideLoading({}), e.setData({ + mediaBean: null + }); + }); + }, + chooseVideo: function() { + var t = this; + wx.chooseMedia({ + count: t.data.maxVideo, + mediaType: [ "video" ], + sourceType: [ "camera", "album" ], + maxDuration: 60, + success: function(a) { + console.log(a), a.tempFiles.length > 0 && (a.tempFiles[0].duration <= t.data.maxDuration ? t.doUploadVideo(a.tempFiles) : wx.showToast({ + title: "视频最长60秒", + icon: "none" + })); + }, + fail: function(t) {} + }); + }, + doUploadVideo: function(a) { + wx.showLoading({ + title: "上传中..." + }); + var e = this; + t.http.upload(t.urls.doUploadVideo, { + path: a[0].tempFilePath, + name: "video", + header: { + token: t.globalData.token + } + }).then(function(n) { + wx.hideLoading({}); + var o = JSON.parse(n).data, i = t.baseUrls.baseCardUrl + o, s = { + id: o, + type: "video", + coverPath: a[0].thumbTempFilePath, + path: i + }; + e.setData({ + mediaBean: s + }); + }).catch(function(t) { + wx.hideLoading({}), e.setData({ + mediaBean: null + }); + }); + }, + doSubmitComment: function(t) { + console.log(t); + var a = t.currentTarget.dataset.id; + this.data.commentValue.length > 0 ? this.doSaveComment(a) : wx.showToast({ + title: "请输入要发布的内容", + icon: "none" + }); + }, + doSaveComment: function(a) { + var e = this; + wx.showLoading({ + title: "保存中..." + }), t.http.post(t.urls.doSaveComment, { + header: { + token: t.globalData.token + }, + data: { + businessId: a, + projectId: "column", + contentCommentContent: e.data.commentValue + } + }).then(function(t) { + wx.hideLoading({}), wx.showToast({ + title: "评论成功" + }), 2 == e.data.currentType ? (e.setData({ + commentValue: "", + isShowComment: !1, + currentPage: 1, + commentList: [], + commentCount: 0 + }), e.getCommentList()) : (e.data.commentList.forEach(function(t) { + t.contentCommentId == a && t.contentCommentSubCount++; + }), e.setData({ + commentValue: "", + isShowComment: !1, + restorePage: 1, + restoreList: [], + restoreCount: 0, + commentList: e.data.commentList + }), e.getRestoreList()); + }).catch(function(t) { + wx.hideLoading({}), e.setData({ + isShowComment: !1 + }); + }); + }, + doLike: function(a) { + var e = this, n = a.currentTarget.dataset.type, o = "2" == n ? e.data.uId : a.currentTarget.dataset.id, i = -1; + "4" == n ? e.data.commentList.forEach(function(t, a) { + t.contentCommentId == o && (i = a); + }) : i = a.currentTarget.dataset.idx; + var s = "2" == n ? e.data.likeStatus : a.currentTarget.dataset.like, r = ""; + r = s ? "取消中..." : "保存中...", wx.showLoading({ + title: r + }), t.http.post(t.urls.doSaveLike, { + header: { + token: t.globalData.token + }, + data: { + businessId: o, + projectId: "column" + } + }).then(function(t) { + wx.hideLoading({}), "2" == n ? e.setData({ + likeStatus: !s + }) : 2 == e.data.currentType ? (s ? (e.data.commentList[i].contentCommentLike--, + e.data.commentList[i].likeStatus = !1) : (e.data.commentList[i].contentCommentLike++, + e.data.commentList[i].likeStatus = !0), e.setData({ + commentList: e.data.commentList + })) : "4" == n ? (s ? (e.data.commentList[i].contentCommentLike--, e.data.commentList[i].likeStatus = !1, + e.data.currentCommentItem.likeStatus = !1) : (e.data.commentList[i].contentCommentLike++, + e.data.commentList[i].likeStatus = !0, e.data.currentCommentItem.likeStatus = !0), + e.setData({ + commentList: e.data.commentList, + currentCommentItem: e.data.currentCommentItem + })) : (s ? (e.data.restoreList[i].contentCommentLike--, e.data.restoreList[i].likeStatus = !1) : (e.data.restoreList[i].contentCommentLike++, + e.data.restoreList[i].likeStatus = !0), e.setData({ + restoreList: e.data.restoreList + })); + }).catch(function(t) {}); + }, + doCollect: function(a) { + var e = this, n = ""; + n = e.data.collectStatus ? "取消收藏..." : "收藏中...", wx.showLoading({ + title: n + }), t.http.post(t.urls.doSaveCollect, { + header: { + token: t.globalData.token + }, + data: { + businessId: e.data.uId, + projectId: "column" + } + }).then(function(t) { + wx.hideLoading({}), e.data.collectStatus = !e.data.collectStatus, e.setData({ + collectStatus: e.data.collectStatus + }); + }).catch(function(t) {}); + } +}); \ No newline at end of file diff --git a/packagecard/moments/momentsdetail/momentsdetail.json b/packagecard/moments/momentsdetail/momentsdetail.json new file mode 100644 index 0000000..1eeb0ee --- /dev/null +++ b/packagecard/moments/momentsdetail/momentsdetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "详情" +} \ No newline at end of file diff --git a/packagecard/moments/momentsdetail/momentsdetail.wxml b/packagecard/moments/momentsdetail/momentsdetail.wxml new file mode 100755 index 0000000..5ca39e7 --- /dev/null +++ b/packagecard/moments/momentsdetail/momentsdetail.wxml @@ -0,0 +1,211 @@ + + + + + + + + + + {{child.value}} + + 来源:网络 + 发布时间:{{publishTime}} + + + {{child.value}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{audio.curDurationStr}} + + {{audio.totalDurationStr}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + + + + {{child.comment}}: + {{child.selValue}} + + + + + + + + + {{child.comment}} + + + + {{ss.dataName}} + + + + + + + + + + + + 评论{{commentCount}} + + + + + + + {{item.contentCommentUserName}} + + + {{item.contentCommentLike}} + + + + {{item.contentCommentContent}} + + {{item.contentCommentSubCount}} 回复 + + + + + + + + + + + + + 写评论... + + + + + + + + + + + 写评论... + + + + + + + + + + 发布 + + + + + + + {{currentCommentItem.contentCommentUserName}} + + {{currentCommentItem.contentCommentContent}} + + + 全部回复 + + + + + + {{item.contentCommentUserName}} + + + {{item.contentCommentLike}} + + + + {{item.contentCommentContent}} + + + + + + + + + + + diff --git a/packagecard/moments/momentsdetail/momentsdetail.wxss b/packagecard/moments/momentsdetail/momentsdetail.wxss new file mode 100755 index 0000000..ecdc8a4 --- /dev/null +++ b/packagecard/moments/momentsdetail/momentsdetail.wxss @@ -0,0 +1,665 @@ +.card-container { + box-sizing: border-box; + height: 0; +} + +.share-btn { + background: #eee; +} + +.card { + background: #fff; + box-sizing: border-box; + height: 0; + overflow: hidden; + position: relative; + width: 100%; +} + +.area-box { + white-space: nowrap; + word-break: break-all; +} + +.card-bgImg { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.person { + padding: 20rpx; +} + +.dynamic-container { + background-color: #fff; + border-radius: 20rpx; + margin-top: -50rpx; + padding: 20rpx; + position: relative; +} + +.dynamic-title image { + height: 30rpx; + margin-top: -4rpx; + vertical-align: middle; + width: 30rpx; +} + +.catelog-title { + justify-content: space-between; + position: relative; +} + +.catelog-title,.catelog-title .action { + align-items: center; + display: flex; +} + +.catelog-title .action { + justify-content: center; + max-width: 100%; + padding-right: 30rpx; +} + +.title { + background: #0054bd; + border-top-left-radius: 48rpx; + border-top-right-radius: 48rpx; + color: #fff; + display: inline-block; + font-size: 30rpx; + margin-bottom: -50rpx; + padding: 10rpx 60rpx 60rpx 10rpx; + position: relative; +} + +.title text { + margin-left: 20rpx; +} + +.column-box,.column-content { + background-color: #fff; + display: flex; + flex-direction: column; + width: 100%; +} + +.column-content { + border-radius: 48rpx; + box-shadow: 0 2px 2px #f0f0f0; + padding: 10rpx 20rpx 40rpx; + z-index: 2; +} + +.intro-title image,.serve-title image { + height: 30rpx; + margin-top: -4px; + vertical-align: middle; + width: 28rpx; +} + +.person-content { + background: #fff; + border-radius: 20rpx; + color: #000; + font-size: 30rpx; + letter-spacing: 2rpx; + line-height: 40rpx; + margin-top: -30rpx; + padding: 20rpx; + position: relative; + word-break: break-all; +} + +.company-title { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; +} + +.company-title image { + height: 140rpx; + width: 140rpx; +} + +.company-name { + align-items: center; + display: flex; + font-size: 34rpx; + height: 140rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 520rpx; +} + +.company-content { + background: #fff; + border-radius: 20rpx; + margin-top: -30rpx; + padding: 20rpx; + position: relative; +} + +.company-content image { + border-radius: 20rpx; + height: 300rpx; + width: 100%; +} + +.company .person-content { + margin-top: 0; +} + +.dynamic-title { + display: block; + margin: 0 auto; + width: 710rpx; +} + +.dynamic-box { + background: #fff; + border-radius: 20rpx; + height: 400rpx; + margin-bottom: 20rpx; + overflow: hidden; + position: relative; +} + +.dynamic-box image { + height: 400rpx; + width: 100%; +} + +.dynamic-text { + background: rgba(0,0,0,.6); + bottom: 0; + color: #fff; + font-size: 30rpx; + left: 0; + line-height: 60rpx; + padding: 0 10rpx; + position: absolute; + right: 0; +} + +.person-info { + border-bottom: 1px solid #eee; + display: flex; + justify-content: space-between; + padding-bottom: 20rpx; +} + +.avatar { + border-radius: 50%; + height: 120rpx; + overflow: hidden; + width: 120rpx; +} + +.avatar image { + height: 100%; + width: 100%; +} + +.person-name { + width: 530rpx; +} + +.name { + color: #000; + font-size: 32rpx; + margin: 15rpx 0 10rpx; +} + +.time { + color: #b2b2b2; +} + +.dynamic-content { + margin: 20rpx 0; +} + +.dynamic-img { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + position: relative; +} + +.dynamic-img image { + height: 160rpx; + margin-bottom: 10rpx; + margin-right: 2%; + width: 32%; +} + +.dynamic-img image:nth-child(3n) { + margin-right: 0; +} + +.dynamic-img-text { + background: rgba(0,0,0,.6); + bottom: 3rpx; + color: #fff; + font-size: 32rpx; + left: 0; + line-height: 70rpx; + padding: 0 20rpx; + position: absolute; + right: 0; +} + +.dynamic-good { + display: flex; + justify-content: space-between; + margin: 10rpx 0; +} + +.good-count { + color: #333; + font-size: 28rpx; +} + +.good-btn image { + height: 40rpx; + vertical-align: top; + width: 40rpx; +} + +.dynamic-reply { + background: #eee; + margin-top: 15rpx; + padding: 15rpx; +} + +.reply { + color: #000; + font-size: 32rpx; + margin-bottom: 5rpx; +} + +.reply-name { + display: inline; + font-weight: 700; +} + +.dynamic-reply-input { + margin-top: 10rpx; +} + +.dynamic-reply-input input { + border-bottom: 1px solid #eee; + height: 60rpx; + width: 100%; +} + +.creat-card { + align-items: center; + background: #0054bd; + border-radius: 50%; + bottom: 20rpx; + box-sizing: border-box; + flex-direction: column; + height: 140rpx; + justify-content: center; + padding: 20rpx; + position: fixed; + right: 20rpx; + width: 140rpx; + z-index: 100; +} + +.creat-card image { + height: 60rpx; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 80rpx; +} + +.share-save { + display: flex; + justify-content: space-between; + text-align: center; +} + +.share-btn { + background: none; + color: #1296db; +} + +.save-btn,.share-btn { + border: 1px solid #1296db; + font-weight: 400; +} + +.save-btn { + background: #1296db; + color: #fff; +} + +.bottom-btn { + margin-top: 20rpx; + padding: 0 20rpx; + white-space: nowrap; + width: 100%; +} + +.phone-box .icon { + height: 30rpx; + vertical-align: top; + width: 30rpx; +} + +.wechate-box .icon { + height: 30rpx; + vertical-align: top; + width: 35rpx; +} + +.email-box .icon { + height: 30rpx; + vertical-align: top; + width: 30rpx; +} + +.bottom-btn-box { + border: 1px solid #ddd; + border-radius: 10rpx; + box-sizing: border-box; + display: inline-block; + line-height: 30rpx; + margin-right: 10rpx; + min-width: 32%; + padding: 20rpx; +} + +.bottom-text { + margin-top: 10rpx; +} + +.top-box { + width: 100%; +} + +.good { + background-color: #fff; + display: flex; + justify-content: space-between; + padding-bottom: 20rpx; + padding-left: 20rpx; +} + +.good-avatar,.good-click { + color: #333; + line-height: 45rpx; +} + +.column-item { + margin: 0rpx; + padding: 7.5rpx 15rpx; +} + +.column-item:nth-child(1) { + padding: 15rpx 15rpx 7.5rpx; +} + +.column-item:last-child { + padding: 7.5rpx 15rpx 15rpx; +} + +.good-click { + display: flex; +} + +.view-count { + border-right: 1px solid grey; +} + +.view-count,.view-count-no { + color: grey; + display: flex; + flex-direction: row; + font-size: 36rpx; + margin-right: 30rpx; + padding-right: 30rpx; +} + +.view-count-no { + align-items: center; +} + +.good-avatar image { + height: 100%; + width: 100%; +} + +.good-click image { + height: 38rpx; + width: 38rpx; +} + +.view-count image,.view-count-no image { + height: 32rpx; + width: 32rpx; +} + +.avatar-list { + display: inline-block; + height: 45rpx; + margin-right: 10rpx; + vertical-align: top; + width: 45rpx; +} + +.mid { + background: #0054bd; + border-top-left-radius: 60rpx; + border-top-right-radius: 60rpx; + margin-top: -20rpx; + padding: 40rpx 0 80rpx; + position: relative; +} + +.mid,.mid-box { + display: flex; +} + +.mid-box { + align-items: center; + background: none; + border-right: 1px solid #2f82ea; + flex: 1; + flex-direction: column; + font-weight: 400; + justify-content: center; + padding: 0!important; + width: auto!important; +} + +.mid-box:last-child { + border: none; +} + +.mid-box image { + height: 60rpx; + margin-bottom: 20rpx; + width: 60rpx; +} + +.mid-box-text { + color: #fff; + font-size: 30rpx; +} + +.mid-btn { + background: #fff; + border-top-left-radius: 60rpx; + border-top-right-radius: 60rpx; + flex-wrap: wrap; + margin-top: -60rpx; + padding: 30rpx; + position: relative; +} + +.mid-btn,.mid-btn-box { + display: flex; + justify-content: space-between; +} + +.mid-btn-box { + background: #eee; + border-radius: 20rpx; + box-sizing: border-box; + flex-shrink: 0; + margin-bottom: 20rpx; + padding: 15rpx; + width: 49%; +} + +.mid-btn-box:nth-child(3),.mid-btn-box:nth-child(4) { + margin-bottom: 0; +} + +.mid-btn-box image { + height: 80rpx; + width: 80rpx; +} + +.mid-btn-text { + width: 200rpx; +} + +.text-top { + color: #000; + font-size: 30rpx; + line-height: 45rpx; +} + +.text-bottom { + color: #898989; + font-size: 26rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.bar-code { + background: rgba(0,0,0,.6); + bottom: 0; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 999; +} + +.bar-code .content { + align-items: center; + background: #fff; + border-radius: 10rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + left: 50%; + max-width: 96%; + min-height: 50%; + min-width: 80%; + padding: 20rpx; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.code-title { + font-weight: 700; +} + +.code-title,.code-txt { + color: #000; + font-size: 32rpx; +} + +.bar-code image { + height: 300rpx; + width: 300rpx; +} + +.news-title { + background: #fff; + flex-direction: column; + padding: 20rpx; + width: 100%; +} + +.news-title,.news-title-desc-box { + display: flex; +} + +.news-title-desc-box { + flex-direction: row; + justify-content: space-between; + margin-top: 15rpx; +} + +.news-title-desc { + color: #9e9a9a; + font-size: 28rpx; + text-align: right; +} + +.news-title-text { + color: #000; + font-size: 36rpx; + text-align: center; +} + +.news-content { + color: #333; + font-size: 30rpx; + line-height: 50rpx; +} + +.movie-item { + height: 280rpx; + padding-bottom: 0; + width: 100%; +} + +.movie-box { + align-items: center; + display: flex; + flex-direction: row; + justify-content: center; +} + +.movie-box,.movie-box image { + border-radius: 10rpx; + height: 350rpx; + width: 100%; +} + +.comment-item { + align-items: center; + display: flex; + flex-direction: column; + justify-content: space-between; + width: 100%; +} + +.comment-item image { + height: 128rpx; + width: 128rpx; +} + +.comment-content { + align-items: flex-start; + display: flex; + flex-direction: row; + justify-content: left; +} \ No newline at end of file diff --git a/packagecard/moments/publish/momentpublish.js b/packagecard/moments/publish/momentpublish.js new file mode 100755 index 0000000..6959ac7 --- /dev/null +++ b/packagecard/moments/publish/momentpublish.js @@ -0,0 +1,742 @@ +var t = getApp(), a = wx.getRecorderManager(), e = wx.createInnerAudioContext(), i = requirePlugin("chooseLocation"), s = { + latitude: 39.90877, + longitude: 116.39695 +}; + +Page({ + data: { + maringHeight: t.globalData.CustomBar, + fieldList: [ { + type: "text" + }, { + type: "video" + }, { + type: "audio" + }, { + type: "map" + }, { + type: "select" + }, { + type: "textarea" + }, { + type: "link" + }, { + type: "photo" + } ], + valueList: [], + isShowInput: !1, + isShowPhoto: !1, + isShowVideo: !1, + isShowLink: !1, + isShowSelect: !1, + isShowAudio: !1, + curTextValue: "", + curLinkText: "", + isShowEdit: !1, + currentIndex: -1, + photoList: [], + videoList: [], + curSelPhotoDisplay: "1", + curVideoDisplay: "1", + curTextAlign: "1", + curFieldTypeIndex: 0, + curFieldType: "text", + selDirection: "1", + isInsert: !1, + topBoxHeight: 100, + audioFile: null, + audioDuration: 0, + isRecording: !1, + speedStep: 5, + sourceType: "add", + insertIndex: -1, + optionsList: [ { + id: "1", + name: "选项一", + isSel: !1 + }, { + id: "2", + name: "选项二", + isSel: !1 + }, { + id: "3", + name: "选项三", + isSel: !1 + }, { + id: "4", + name: "选项四", + isSel: !1 + }, { + id: "5", + name: "选项五", + isSel: !1 + } ] + }, + onLoad: function(t) { + this.setData({ + columnId: t.id + }), this.checkPermission(), this.countBoxHeight(); + }, + countBoxHeight: function() { + var t = this, a = wx.createSelectorQuery(); + a.select("#top-box").boundingClientRect(), a.exec(function(a) { + t.setData({ + topBoxHeight: a[0].height + 7 + }); + }); + }, + onShow: function() { + var t = this; + if (null != i.getLocation()) { + var a = i.getLocation(), e = { + type: "map" + }; + e.value = a, "add" == t.data.sourceType ? t.data.valueList.push(e) : t.data.valueList.splice(t.data.currentIndex, "edit" == t.data.sourceType ? 1 : 0, e), + t.setData({ + valueList: t.data.valueList + }); + } + wx.getSetting({ + withSubscriptions: !0, + success: function(a) { + var e = a.authSetting["scope.record"]; + t.setData({ + isAuthAudio: e + }); + } + }); + }, + showType: function(t) { + switch (t.currentTarget.dataset.type) { + case "text": + case "textarea": + this.setData({ + isShowInput: !0 + }); + break; + + case "video": + this.chooseVideo(); + break; + + case "audio": + this.checkRecordPermission(); + break; + + case "photo": + this.chooseImg(); + break; + + case "map": + this.doChooseLocation(); + break; + + case "select": + this.setData({ + isShowSelect: !0 + }); + break; + + case "link": + this.setData({ + isShowLink: !0 + }); + } + }, + chooseImg: function() { + var t = this; + wx.chooseImage({ + count: 9, + sourceType: [ "album", "camera" ], + success: function(a) { + console.log(a), a.tempFilePaths.forEach(function(a) { + var e = {}; + e.path = a, t.data.photoList.push(e); + }), t.setData({ + photoList: t.data.photoList, + isShowPhoto: !0 + }); + }, + fail: function(t) { + -1 == t.errMsg.indexOf("fail cancel") && wx.showToast({ + title: "请重新选择", + icon: "error" + }); + } + }); + }, + chooseVideo: function() { + var t = this; + wx.chooseMedia({ + count: 9, + mediaType: [ "video" ], + sourceType: [ "album", "camera" ], + maxDuration: 60, + success: function(a) { + a.tempFiles.forEach(function(a) { + var e = {}; + e.path = a.tempFilePath, e.coverPath = a.thumbTempFilePath, t.data.videoList.push(e); + }), t.setData({ + videoList: t.data.videoList, + isShowVideo: !0 + }); + }, + fail: function(t) { + -1 == t.errMsg.indexOf("fail cancel") && wx.showToast({ + title: "请重新选择", + icon: "error" + }); + } + }); + }, + showEditBox: function(t) { + var a = t.currentTarget.dataset.idx; + this.data.currentIndex == a ? this.setData({ + currentIndex: -1 + }) : this.setData({ + currentIndex: a + }); + }, + chooseDirection: function(t) { + var a = t.currentTarget.dataset.idx; + this.setData({ + selDirection: a + }); + }, + choosePhotoDisplay: function(t) { + var a = t.currentTarget.dataset.type; + this.setData({ + curSelPhotoDisplay: a + }); + }, + chooseVideoDisplay: function(t) { + var a = t.currentTarget.dataset.type; + this.setData({ + curVideoDisplay: a + }); + }, + chooseTextAlign: function(t) { + var a = t.currentTarget.dataset.type; + this.setData({ + curTextAlign: a + }); + }, + chooseFieldType: function(t) { + var a = t.currentTarget.dataset.idx, e = t.currentTarget.dataset.type; + this.setData({ + curFieldTypeIndex: a, + curFieldType: e + }); + }, + confirmPhoto: function() { + if (this.data.photoList.length > 0) { + var t = []; + this.data.photoList.forEach(function(a) { + var e = {}; + e.path = a.path, t.push(e); + }); + var a = { + type: "photo" + }; + a.valueList = t, a.displayType = this.data.curSelPhotoDisplay, "add" == this.data.sourceType ? this.data.valueList.push(a) : this.data.valueList.splice(this.data.currentIndex, "edit" == this.data.sourceType ? 1 : 0, a), + this.setData({ + valueList: this.data.valueList, + photoList: [], + curSelPhotoDisplay: 1, + isShowPhoto: !1 + }); + } else wx.showToast({ + title: "请选择图片", + icon: "error" + }); + }, + confirmVideo: function() { + if (this.data.videoList.length > 0) { + var t = []; + this.data.videoList.forEach(function(a) { + var e = {}; + e.path = a.path, e.coverPath = a.coverPath, t.push(e); + }); + var a = { + type: "video" + }; + a.valueList = t, a.displayType = this.data.curVideoDisplay, "add" == this.data.sourceType ? this.data.valueList.push(a) : this.data.valueList.splice(this.data.currentIndex, "edit" == this.data.sourceType ? 1 : 0, a), + this.setData({ + valueList: this.data.valueList, + videoList: [], + curVideoDisplay: 1, + isShowVideo: !1, + currentIndex: -1, + sourceType: "add" + }); + } else wx.showToast({ + title: "请选择视频", + icon: "error" + }); + }, + doInsert: function() { + var t = -1; + switch (t = 1 == this.data.selDirection ? this.data.currentIndex : ++this.data.currentIndex, + this.setData({ + insertIndex: t, + sourceType: "insert", + isInsert: !1 + }), this.data.curFieldType) { + case "text": + case "textarea": + this.setData({ + isShowInput: !0 + }); + break; + + case "video": + this.chooseVideo(); + break; + + case "audio": + this.checkRecordPermission(); + break; + + case "photo": + this.chooseImg(); + break; + + case "map": + this.doChooseLocation(); + break; + + case "select": + this.setData({ + isShowSelect: !0 + }); + break; + + case "link": + this.setData({ + isShowLink: !0 + }); + } + }, + hideEditBox: function() { + this.setData({ + currentIndex: -1 + }); + }, + onClose: function() { + this.setData({ + isShowInput: !1, + isShowLink: !1, + isShowSelect: !1, + sourceType: "add" + }); + }, + inputWatch: function(t) { + this.setData({ + curTextValue: t.detail.value + }); + }, + inputLink: function(t) { + this.setData({ + curLinkText: t.detail.value + }); + }, + doConfirmLink: function() { + if ("" == this.data.curLinkText) wx.showToast({ + title: "请输入链接", + icon: "error" + }); else { + var t = { + type: "link" + }; + t.value = this.data.curLinkText, "add" == this.data.sourceType ? this.data.valueList.push(t) : this.data.valueList.splice(this.data.currentIndex, "edit" == this.data.sourceType ? 1 : 0, t), + this.setData({ + valueList: this.data.valueList, + curLinkText: "", + isShowLink: !1 + }); + } + }, + doConfirmInput: function() { + if ("" == this.data.curTextValue) wx.showToast({ + title: "请输入内容", + icon: "error" + }); else { + var t = { + type: "text" + }; + t.value = this.data.curTextValue; + var a = "left"; + switch (this.data.curTextAlign) { + case "1": + a = "left"; + break; + + case "2": + a = "center"; + break; + + case "3": + a = "right"; + } + t.textAlign = a, "add" == this.data.sourceType ? this.data.valueList.push(t) : this.data.valueList.splice(this.data.currentIndex, "edit" == this.data.sourceType ? 1 : 0, t), + this.setData({ + valueList: this.data.valueList, + curTextValue: "", + isShowInput: !1, + curTextAlign: "1" + }); + } + }, + checkPermission: function() { + var t = this; + wx.getSetting({ + success: function(a) { + var e = a.authSetting["scope.record"]; + void 0 === e ? wx.authorize({ + scope: "scope.record", + success: function() { + t.setData({ + isAuthAudio: !0 + }); + }, + fail: function() { + t.setData({ + isAuthAudio: !1 + }); + } + }) : e || t.openSetting(); + } + }); + }, + openSetting: function() { + wx.showModal({ + title: "提示", + content: "发布内容需要您授权录音权限.", + success: function(t) { + t.confirm && wx.openSetting({ + withSubscriptions: !0 + }); + } + }); + }, + viewPhoto: function(t) { + var a = t.currentTarget.dataset.url; + wx.previewImage({ + urls: [ a ] + }); + }, + delPhoto: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该图片吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.photoList.splice(t.currentTarget.dataset.index, 1), a.setData({ + photoList: a.data.photoList + })); + } + }); + }, + viewVideo: function(t) { + var a = t.currentTarget.dataset.idx, e = t.currentTarget.dataset.index, i = this.data.valueList[e].valueList[a].path, s = {}; + s.url = i, s.type = "video", wx.previewMedia({ + sources: [ s ] + }); + }, + delVideo: function(t) { + var a = this, e = t.currentTarget.dataset.index; + wx.showModal({ + title: "提示", + content: "确定要删除该视频吗?", + success: function(t) { + t.confirm && (a.data.videoList.splice(e, 1), a.setData({ + videoList: a.data.videoList + })); + } + }); + }, + doChooseLocation: function(t) { + var a = JSON.stringify(s); + wx.navigateTo({ + url: "plugin://chooseLocation/index?key=".concat("HVDBZ-KJGKF-DNMJR-JHEWI-H2HN7-23BMS", "&referer=").concat("市域自治与互助", "&location=").concat(a, "&category=").concat("生活服务,娱乐休闲") + }); + }, + editItem: function(t) { + var a = t.currentTarget.dataset.index; + switch (this.setData({ + sourceType: "edit" + }), this.data.valueList[a].type) { + case "text": + case "textarea": + var e = "1"; + e = "left" == this.data.valueList[a].textAlign ? "1" : "center" == this.data.valueList[a].textAlign ? "2" : "3", + this.setData({ + isShowInput: !0, + curTextValue: this.data.valueList[a].value, + curTextAlign: e + }); + break; + + case "video": + this.setData({ + curVideoDisplay: this.data.valueList[a].displayType, + videoList: this.data.valueList[a].valueList, + isShowVideo: !0 + }); + break; + + case "audio": + this.checkRecordPermission(); + break; + + case "photo": + this.setData({ + curSelPhotoDisplay: this.data.valueList[a].displayType, + photoList: this.data.valueList[a].valueList, + isShowPhoto: !0 + }); + break; + + case "map": + s.latitude = this.data.valueList[a].value.latitude, s.longitude = this.data.valueList[a].value.longitude, + this.doChooseLocation(); + break; + + case "select": + break; + + case "link": + this.setData({ + curLinkText: this.data.valueList[a].value, + isShowLink: !0 + }); + } + }, + insertItem: function(t) { + this.setData({ + isInsert: !this.data.isInsert + }); + }, + delItem: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该条数据吗?", + success: function(t) { + t.confirm && (a.data.valueList.splice(a.data.currentIndex, 1), a.setData({ + valueList: a.data.valueList, + currentIndex: -1 + })); + } + }); + }, + chooseTags: function(t) { + var a = t.currentTarget.dataset.idx, e = t.currentTarget.dataset.item; + this.data.optionsList[a].isSel = !e.isSel, this.setData({ + optionsList: this.data.optionsList + }); + }, + doConfirmSel: function() { + var t = []; + this.data.optionsList.forEach(function(a) { + a.isSel && t.push(a); + }); + var a = { + type: "select" + }; + a.valueList = t, this.data.valueList.push(a), this.data.optionsList.forEach(function(t) { + t.isSel = !1; + }), this.setData({ + valueList: this.data.valueList, + isShowSelect: !1, + optionsList: this.data.optionsList + }); + }, + doConfirmAudio: function() { + this.data.audioFile.isPlay && e.stop(); + var t = { + type: "audio" + }; + t.value = this.data.audioFile, this.data.audioFile.curDurationStr = "00:00", this.data.audioFile.curDuration = 0, + this.data.audioFile.isPlay = !1, "add" == this.data.sourceType ? this.data.valueList.push(t) : this.data.valueList.splice(this.data.currentIndex, "edit" == this.data.sourceType ? 1 : 0, t), + this.setData({ + valueList: this.data.valueList, + audioFile: null, + isShowAudio: !1 + }); + }, + checkRecordPermission: function() { + var t = this; + wx.getSetting({ + success: function(a) { + a.authSetting["scope.record"] ? t.setData({ + isShowAudio: !0 + }) : wx.authorize({ + scope: "scope.record", + success: function() { + t.setData({ + isShowAudio: !0 + }); + } + }); + } + }); + }, + startRecord: function() { + var t = this; + t.data.setInter = setInterval(function() { + var a = parseInt(t.data.audioDuration + 1); + t.setData({ + audioDuration: parseInt(a), + isRecording: !0 + }); + }, 1e3), t.start(); + }, + start: function() { + console.log("开始录音"); + a.start({ + duration: 6e4, + format: "mp3" + }), a.onStart(function() { + console.log("recorder start"); + }), a.onError(function(t) { + console.log(t), _self.stop(!1); + }); + }, + doEndRecord: function() { + var t = this; + clearInterval(t.data.setInter), a.stop(), a.onStop(function(a) { + t.data.audioDuration < 10 ? wx.showToast({ + title: "录音时长需大于10秒", + icon: "none" + }) : (a.isPlay = !1, a.durationStr = t.data.audioDuration + "", a.duration = t.data.audioDuration, + a.totalDurationStr = "00:" + (t.data.audioDuration > 9 ? t.data.audioDuration : "0" + t.data.audioDuration), + a.curDurationStr = "00:00", a.curDuration = 0, a.isPlay = !1, t.setData({ + audioFile: a + })), t.setData({ + audioDuration: 0, + isRecording: !1 + }); + }); + }, + delAudio: function() { + var t = this; + wx.showModal({ + title: "警告", + content: "确定要删除该条录音吗?", + success: function(a) { + a.confirm && t.setData({ + audioFile: null + }); + } + }); + }, + closePop: function(t) { + var a = t.currentTarget.dataset.type, i = this; + a && "audio" == a && (null != i.data.audioFile ? (i.data.audioFile.isPlay && e.stop(), + wx.showModal({ + title: "警告", + content: "关闭录音弹窗将清除当前录制的音频文件,确定要关闭吗?", + success: function(t) { + t.confirm && i.setData({ + audioFile: null, + isShowAudio: !1 + }); + } + })) : i.setData({ + isShowAudio: !1 + })), this.setData({ + isShowPhoto: !1, + isShowEdit: !1, + isShowVideo: !1, + isShowSelect: !1, + sourceType: "add" + }); + }, + slider4change: function(t) { + var a = t.currentTarget.dataset.item, i = t.currentTarget.dataset.type, s = t.currentTarget.dataset.idx, o = Number.parseInt(t.detail.value); + a.isPlay && (e.pause(), e.seek(o), setTimeout(function() { + e.play(); + }, 500), "record" == i ? (this.data.audioFile.curDuration = o, this.data.audioFile.curDurationStr = "00:" + (o > 9 ? o : "0" + o), + console.log(this.data.audioFile), this.setData({ + audioFile: this.data.audioFile + })) : (this.data.valueList[s].value.curDuration = o, this.data.valueList[s].value.curDurationStr = "00:" + (o > 9 ? o : "0" + o), + this.setData({ + valueList: this.data.valueList + }))); + }, + play: function(t) { + var a = t.currentTarget.dataset.item, i = this, s = t.currentTarget.dataset.type, o = t.currentTarget.dataset.idx; + a.isPlay ? e.stop() : ((e = wx.createInnerAudioContext()).src = a.tempFilePath, + e.autoplay = !0), e.onPlay(function() { + "record" == s ? (i.data.audioFile.isPlay = !0, i.setData({ + audioFile: i.data.audioFile + })) : (i.data.valueList[o].value.isPlay = !0, i.setData({ + valueList: i.data.valueList + })); + }), e.onStop(function(t) { + "record" == s ? i.setAudioDefault() : i.setShowAudioDefault(o); + }), e.onEnded(function(t) { + "record" == s ? i.setAudioDefault() : i.setShowAudioDefault(o); + }), e.onError(function(t) { + wx.showToast({ + title: "播放失败", + icon: "error" + }), "record" == s ? i.setAudioDefault() : i.setShowAudioDefault(o); + }), e.onTimeUpdate(function() { + var t = e.currentTime; + if ("record" == s) { + i.data.audioFile.curDuration = t; + var a = Number.parseInt(i.data.audioFile.curDuration); + i.data.audioFile.curDurationStr = "00:" + (a > 9 ? a : "0" + a), i.setData({ + audioFile: i.data.audioFile + }); + } else { + i.data.valueList[o].value.curDuration = t; + var u = Number.parseInt(i.data.valueList[o].value.curDuration); + i.data.valueList[o].value.curDurationStr = "00:" + (u > 9 ? a : "0" + u), i.setData({ + valueList: i.data.valueList + }); + } + }); + }, + setAudioDefault: function() { + null != this.data.audioFile && (this.data.audioFile.curDurationStr = "00:00", this.data.audioFile.curDuration = 0, + this.data.audioFile.isPlay = !1, this.setData({ + audioFile: this.data.audioFile + })); + }, + setShowAudioDefault: function(t) { + this.data.valueList[t].value.curDurationStr = "00:00", this.data.valueList[t].value.curDuration = 0, + this.data.valueList[t].value.isPlay = !1, this.setData({ + valueList: this.data.valueList + }); + }, + rewind: function(t) { + var a = t.currentTarget.dataset.item, i = t.currentTarget.dataset.idx, s = t.currentTarget.dataset.type; + a.isPlay && ("record" == s ? (this.data.audioFile.curDuration = this.data.audioFile.curDuration - this.data.speedStep, + e.seek(this.data.audioFile.curDuration), this.setData({ + audioFile: this.data.audioFile + })) : (this.data.valueList[i].value.curDuration = this.data.valueList[i].value.curDuration - this.data.speedStep, + e.seek(this.data.valueList[i].value.curDuration), this.setData({ + valueList: this.data.valueList + }))); + }, + speed: function(t) { + var a = t.currentTarget.dataset.item, i = t.currentTarget.dataset.idx, s = t.currentTarget.dataset.type; + a.isPlay && ("record" == s ? (this.data.audioFile.curDuration = this.data.audioFile.curDuration + this.data.speedStep, + e.seek(this.data.audioFile.curDuration), this.setData({ + audioFile: this.data.audioFile + })) : (this.data.valueList[i].value.curDuration = this.data.valueList[i].value.curDuration + this.data.speedStep, + e.seek(this.data.valueList[i].value.curDuration), this.setData({ + valueList: this.data.valueList + }))); + }, + onUnload: function() { + i.setLocation(null), this.setData({ + map: null + }); + } +}); \ No newline at end of file diff --git a/packagecard/moments/publish/momentpublish.json b/packagecard/moments/publish/momentpublish.json new file mode 100644 index 0000000..91de62c --- /dev/null +++ b/packagecard/moments/publish/momentpublish.json @@ -0,0 +1,24 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + } +} \ No newline at end of file diff --git a/packagecard/moments/publish/momentpublish.wxml b/packagecard/moments/publish/momentpublish.wxml new file mode 100755 index 0000000..ccaab7a --- /dev/null +++ b/packagecard/moments/publish/momentpublish.wxml @@ -0,0 +1,307 @@ + + + 本栏目可以发布 + + + + + + 文本 + + + + 图片 + + + + 视频 + + + + 音频 + + + + 选项 + + + + 定位 + + + + 链接 + + + + + + + + + + + {{item.value}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{item.value.curDurationStr}} + + {{item.value.totalDurationStr}} + + + + + + + + + + + + + {{item.value.name}}-{{item.value.address}} + + + + + + + + + {{item.value}} + + + + {{options.name}} + + + + + + + 编辑 + + + + 插入 + + + + 删除 + + + + + 方向: + + + + + + 内容上 + + + + + + 内容下 + + + + + 类型: + + + + {{it.type}} + + + + + + + + + + + + + + + 文本 + + + + 文字居左 + + + + 文字居中 + + + + 文字居右 + + + + + + + + + + + 链接 + + + + + + + + + + + 00:{{audioDuration>9?audioDuration:'0'+audioDuration}} + {{isRecording?'正在录音':'长按录音'}} + + + + + {{audioFile.curDurationStr}} + + {{audioFile.totalDurationStr}} + + + + + + + + + + + + + + + + + 图片 {{photoList.length}}/9 + + + + + + + + + 九宫格 + + + + 轮播 + + + + 轮播(自动) + + + + 平铺 + + + + + + + + + + + + + + + + + + + + + + 视频 {{videoList.length}}/9 + + + + + + + + + 九宫格 + + + + 平铺 + + + + + + + + + + + + + + + + + + + + + + {{item.name}} + + + + + + + diff --git a/packagecard/moments/publish/momentpublish.wxss b/packagecard/moments/publish/momentpublish.wxss new file mode 100755 index 0000000..e7cb755 --- /dev/null +++ b/packagecard/moments/publish/momentpublish.wxss @@ -0,0 +1,220 @@ +.page-box-2 { + align-items: flex-start; + background-color: #fff; + display: flex; + flex-direction: column; + margin: 15rpx; + padding: 15rpx; +} + +van-action-sheet input { + height: 60rpx; + line-height: 60rpx; + padding-left: 10rpx; +} + +van-action-sheet input,van-action-sheet textarea { + border: 1px solid #c2c2c2; + border-radius: 10rpx; + margin-top: 9rpx; +} + +van-action-sheet textarea { + padding: 10rpx; +} + +van-action-sheet .line { + border-bottom: 1rpx solid #f5f5f5; + border-top: 1rpx solid #f5f5f5; +} + +van-action-sheet .line,van-action-sheet .noline { + height: 90rpx; + line-height: 90rpx; + text-align: center; + width: 90%; +} + +van-action-sheet .line:active,van-action-sheet .noline:active { + background-color: #f5f5f5; + color: #000; +} + +.type-box { + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-start; + width: 100%; +} + +.type-box,.type-box .item { + align-items: center; + display: flex; +} + +.type-box .item { + flex-direction: column; + justify-content: center; +} + +.type-box image { + height: 84rpx; + width: 84rpx; +} + +.input-box { + align-items: flex-start; + display: flex; + flex-direction: column; + justify-content: center; + padding: 15rpx; + width: 100%; +} + +.input-box .title { + color: #000; + font-size: 32rpx; +} + +.input-box textarea { + color: #000; + font-size: 28rpx; + height: 200rpx; + width: 100%; +} + +.control-box,.input-box textarea { + border: 1rpx solid #f5f5f5; + margin-top: 15rpx; + padding: 15rpx; +} + +.control-box { + align-items: center; + display: flex; + flex-direction: row; + justify-content: space-around; +} + +.control-box .item { + flex-grow: 1; + font-size: 32rpx; + text-align: center; +} + +.item-input { + border-radius: 10rpx; + height: 80rpx; + line-height: 80rpx; + margin-top: 15rpx; + padding-left: 15rpx; + text-align: left; + width: 100%; +} + +.control-box .item:active,.item-input { + background-color: #f5f5f5; +} + +.control-box .item:nth-child(2) { + border-left: 1rpx solid #f5f5f5; + border-right: 1rpx solid #f5f5f5; + font-size: 32rpx; + margin-right: 15rpx; + padding: 0rpx 15rpx; +} + +.item-box { + align-items: flex-start; + flex-direction: column; +} + +.item-box,.movie-box { + display: flex; + justify-content: center; + width: 100%; +} + +.movie-box { + align-items: center; + border-radius: 10rpx; + flex-direction: row; + height: 350rpx; + margin-top: 15rpx; +} + +.movie-box:nth-child(1) { + margin-top: 0rpx; +} + +.movie-box image { + border-radius: 10rpx; + height: 350rpx; + width: 100%; +} + +.choose-box { + align-items: center; + display: flex; + flex-direction: row; + flex-wrap: wrap; + font-size: 32rpx; + justify-content: flex-start; + width: 100%; +} + +.choose-box .item-text { + margin-left: 15rpx; +} + +.choose-box .item-text:nth-child(1),.choose-item:nth-child(1) { + margin-left: 0rpx; +} + +.choose-box .item { + margin-left: 15rpx; + padding: 8rpx; +} + +.choose-box .item:nth-child(1) { + margin-left: 0rpx; +} + +.dir-box { + justify-content: flex-start; +} + +.dir-box,.dir-parent-box { + align-items: center; + display: flex; + flex-direction: row; + width: 100%; +} + +.dir-parent-box { + justify-content: center; + margin-top: 15rpx; +} + +.dir-parent-box .title { + width: 120rpx; +} + +.sel-item { + margin: 15rpx; +} + +.sel-border { + border: 1rpx solid #e6b980; + border-radius: 10rpx; + padding: 15rpx; +} + +.audio-box { + align-items: center; + display: flex; + flex-direction: row; + justify-content: center; + min-height: 400rpx; + width: 100%; +} \ No newline at end of file diff --git a/packagecard/moments/publish/momentpublishline.js b/packagecard/moments/publish/momentpublishline.js new file mode 100755 index 0000000..4f40e56 --- /dev/null +++ b/packagecard/moments/publish/momentpublishline.js @@ -0,0 +1,759 @@ +var t = require("../../../@babel/runtime/helpers/defineProperty"), a = getApp(), e = wx.getRecorderManager(), i = wx.createInnerAudioContext(), s = requirePlugin("chooseLocation"), n = { + latitude: 39.90877, + longitude: 116.39695 +}; + +Page({ + data: { + uploadCount: 0, + uploadVideoCount: 0, + currentIndex: 0, + columnId: "", + fieldList: [], + textList: [], + textareaList: [], + audioList: [], + videoList: [], + photoList: [], + linkList: [], + locationList: [], + isShowText: !1, + isShowDesc: !1, + isShowPhoto: !1, + isShowLink: !1, + isShowAudio: !1, + isShowVideo: !1, + isShowTags: !1, + isShowType: !1, + tempText: "", + tempDesc: "", + linkStr: "", + map: null, + waitFlag: !1, + isStartRecord: !1, + speck_time: 0, + speedStep: 5, + setInter: "", + currentItem: void 0, + isAuthAudio: !1, + title: "栏目内容发布", + curMutliIndex: 0, + displayType: [ { + name: "九宫格", + id: 1 + }, { + name: "轮播", + id: 2 + }, { + name: "轮播(自动)", + id: 3 + }, { + name: "平铺", + id: 4 + } ], + selDisplayType: 1, + displayTypeStr: "九宫格", + maxDuration: 60 + }, + onLoad: function(t) { + this.setData({ + columnId: t.id, + title: t.title + "发布" + }), wx.setNavigationBarTitle({ + title: t.title + "发布" + }); + this.checkPermission(), this.getFieldList(); + }, + getFieldList: function() { + wx.showLoading({ + title: "加载中..." + }); + var t = this; + a.http.get(a.urls.getMomentsField.format({ + configColumnId: t.data.columnId + }), { + header: { + token: a.globalData.token + } + }).then(function(a) { + wx.hideLoading({}), a.data.forEach(function(t, a) { + switch (t.order = a, t.dataType) { + case "2": + case "3": + case "4": + case "5": + case "6": + t.valueList = []; + break; + + case "8": + t.index = 0, t.value = t.dictionariesList[0].dataId; + break; + + case "9": + t.selValue = "请选择", t.selIndexs = [], t.dictionariesList.forEach(function(t) { + t.isSel = !1; + }); + } + }), t.setData({ + fieldList: a.data + }); + }).catch(function(t) { + wx.hideLoading({}), console.log(t); + }); + }, + inputText: function(t) { + var a, e = t.currentTarget.dataset.index; + 1 != t.currentTarget.dataset.type ? ((a = this).data.fieldList[e].value = t.detail.value, + a.setData({ + fieldList: a.data.fieldList + })) : ((a = this).data.fieldList[e].order = t.detail.value, a.setData({ + fieldList: a.data.fieldList + })); + }, + checkPermission: function() { + var t = this; + wx.getSetting({ + success: function(a) { + var e = a.authSetting["scope.record"]; + void 0 === e ? wx.authorize({ + scope: "scope.record", + success: function() { + t.setData({ + isAuthAudio: !0 + }); + }, + fail: function() { + t.setData({ + isAuthAudio: !1 + }); + } + }) : e || t.openSetting(); + } + }); + }, + openSetting: function() { + wx.showModal({ + title: "提示", + content: "发布内容需要您授权录音权限.", + success: function(t) { + t.confirm && wx.openSetting({ + withSubscriptions: !0 + }); + } + }); + }, + onShow: function() { + if (null != s.getLocation()) { + var t = this.data.fieldList[this.data.curMapIndex]; + t.valueList.length < t.maxCount && (this.data.fieldList[this.data.curMapIndex].valueList.push(s.getLocation()), + this.setData({ + fieldList: this.data.fieldList + })); + } + var a = this; + wx.getSetting({ + withSubscriptions: !0, + success: function(t) { + var e = t.authSetting["scope.record"]; + a.setData({ + isAuthAudio: e + }); + } + }); + }, + pickerChange: function(t) { + var a = t.currentTarget.dataset.index, e = t.detail.value; + this.data.fieldList[a].index = e, this.data.fieldList[a].value = this.data.fieldList[a].dictionariesList[e].dataId, + this.setData({ + fieldList: this.data.fieldList + }); + }, + confirmSel: function(t) { + var a = t.detail, e = (a.piacker, a.value); + this.setData({ + selDisplayType: e.id, + displayTypeStr: e.name, + isShowType: !1 + }); + }, + cancelSel: function(t) { + this.setData({ + isShowType: !1 + }); + }, + onUnload: function() { + s.setLocation(null), this.setData({ + map: null + }); + }, + chooseVideo: function(t) { + var a = this, e = t.currentTarget.dataset.item, i = e.maxCount - e.valueList.length, s = t.currentTarget.dataset.index; + wx.chooseMedia({ + count: Number.parseInt(i), + mediaType: [ "video" ], + sourceType: [ "camera", "album" ], + maxDuration: 60, + success: function(t) { + console.log(t), t.tempFiles.length > 0 && (t.tempFiles[0].duration <= a.data.maxDuration ? a.doUploadVideo(s, t.tempFiles, a.data.uploadVideoCount) : wx.showToast({ + title: "视频最长60秒", + icon: "none" + })); + }, + fail: function(t) {} + }); + }, + doUploadVideo: function(t, e, i) { + wx.showLoading({ + title: "上传中..." + }); + var s = this, n = e.length; + s.data.uploadVideoCount < n ? a.http.upload(a.urls.doUploadVideo, { + path: e[s.data.uploadVideoCount].tempFilePath, + name: "video", + header: { + token: a.globalData.token + } + }).then(function(a) { + wx.hideLoading({}); + var i = JSON.parse(a).data; + s.doUploadVideoImg(t, i, e, s.data.uploadVideoCount); + }).catch(function(a) { + wx.hideLoading({}), s.setData({ + uploadVideoCount: ++s.data.uploadVideoCount + }), s.doUploadVideo(t, e, s.data.uploadVideoCount); + }) : (wx.hideLoading({}), s.setData({ + uploadVideoCount: 0 + })); + }, + doUploadVideoImg: function(t, e, i, s) { + wx.showLoading({ + title: "上传中..." + }); + var n = this; + a.http.upload(a.urls.doUploadImg, { + path: i[n.data.uploadVideoCount].thumbTempFilePath, + name: "image", + header: { + token: a.globalData.token + } + }).then(function(s) { + console.log(s), wx.hideLoading({}); + var o = a.baseUrls.baseCardUrl + e, d = a.baseUrls.baseCardUrl + JSON.parse(s).data, r = JSON.parse(s).data, l = { + id: e, + thumbId: r, + path: o, + imgPath: d + }; + n.data.fieldList[t].valueList.push(l), n.setData({ + fieldList: n.data.fieldList + }), n.setData({ + uploadVideoCount: ++n.data.uploadVideoCount + }), n.doUploadVideo(t, i, n.data.uploadVideoCount); + }).catch(function(a) { + console.log(a), wx.hideLoading({}), n.setData({ + uploadVideoCount: ++n.data.uploadVideoCount + }), n.doUploadVideo(t, i, n.data.uploadVideoCount); + }); + }, + viewVideo: function(t) { + var a = [ { + url: t.currentTarget.dataset.url, + type: "video" + } ]; + wx.previewMedia({ + sources: a, + current: 0, + showmenu: !1 + }); + }, + delVideo: function(t) { + var a = this, e = t.currentTarget.dataset.index, i = t.currentTarget.dataset.idx; + wx.showModal({ + title: "提示", + content: "确定要删除该视频吗?", + cancelText: "取消", + confirmText: "确定", + success: function(t) { + t.confirm && (a.data.fieldList[e].valueList.splice(i, 1), a.setData({ + fieldList: a.data.fieldList + })); + } + }); + }, + addLink: function() { + for (var t = null, a = 0; a < this.data.items.length; a++) if ("LINK" == this.data.items[a].type) { + t = this.data.items[a]; + break; + } + if (this.data.linkList.length < t.count) { + if ("" == this.data.linkStr) return void wx.showToast({ + title: "请输入文字内容", + icon: "error" + }); + this.data.linkList.push(this.data.linkStr), this.setData({ + linkList: this.data.linkList, + linkStr: "" + }), this.data.linkList.length == t.count && this.setData({ + isShowLink: !1 + }); + } + }, + addDesc: function() { + for (var t = null, a = 0; a < this.data.items.length; a++) if ("TEXTAREA" == this.data.items[a].type) { + t = this.data.items[a]; + break; + } + if (this.data.textareaList.length < t.count) { + if ("" == this.data.tempDesc) return void wx.showToast({ + title: "请输入文字内容", + icon: "error" + }); + this.data.textareaList.push(this.data.tempDesc), this.setData({ + textareaList: this.data.textareaList, + tempDesc: "" + }), this.data.textareaList.length == t.count && this.setData({ + isShowDesc: !1 + }); + } + }, + addStr: function() { + for (var t = null, a = 0; a < this.data.items.length; a++) if ("TEXT" == this.data.items[a].type) { + t = this.data.items[a]; + break; + } + if (this.data.textList.length < t.count) { + if ("" == this.data.tempText) return void wx.showToast({ + title: "请输入文字内容", + icon: "error" + }); + this.data.textList.push(this.data.tempText), this.setData({ + textList: this.data.textList, + tempText: "" + }), this.data.textList.length == t.count && this.setData({ + isShowText: !1 + }); + } + }, + delText: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该条数据吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.textList.splice(t.currentTarget.dataset.index, 1), a.setData({ + textList: a.data.textList + })); + } + }); + }, + delLink: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该条数据吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.linkList.splice(t.currentTarget.dataset.index, 1), a.setData({ + linkList: a.data.linkList + })); + } + }); + }, + delDesc: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该条数据吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.textareaList.splice(t.currentTarget.dataset.index, 1), a.setData({ + textareaList: a.data.textareaList + })); + } + }); + }, + textInput: function(a) { + this.setData(t({}, a.currentTarget.id, a.detail.value)); + }, + onHide: function(t) { + this.setData({ + isShowText: !1, + isShowDesc: !1, + isShowPhoto: !1, + isShowLink: !1, + isShowAudio: !1, + isShowVideo: !1, + isShowTags: !1, + isShowType: !1 + }); + }, + chooseTags: function(t) { + var a = t.currentTarget.dataset.idx; + this.data.fieldList[this.data.currentIndex].dictionariesList[a].isSel = !this.data.fieldList[this.data.currentIndex].dictionariesList[a].isSel, + this.setData({ + fieldList: this.data.fieldList + }); + var e = "", i = ""; + this.data.fieldList[this.data.currentIndex].dictionariesList.forEach(function(t) { + t.isSel && (e += t.dataName + ",", i += t.dataId + ","); + }), e = e.substr(0, e.length - 1), i = i.substr(0, i.length - 1), this.data.fieldList[this.data.currentIndex].selValue = e, + this.data.fieldList[this.data.currentIndex].value = i, this.setData({ + fieldList: this.data.fieldList + }); + }, + selTags: function() { + this.setData({ + isShowTags: !1 + }); + }, + choosePhoto: function(t) { + var a = this, e = t.currentTarget.dataset.item, i = t.currentTarget.dataset.index, s = e.maxCount - e.valueList.length; + wx.chooseImage({ + count: Number.parseInt(s), + sourceType: [ "album", "camera" ], + success: function(t) { + console.log(t), a.doUploadImg(i, t.tempFilePaths, a.data.uploadCount); + }, + fail: function(t) {} + }); + }, + delImg: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该图片吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.fieldList[t.currentTarget.dataset.itemindex].valueList.splice(t.currentTarget.dataset.index, 1), + a.setData({ + fieldList: a.data.fieldList + })); + } + }); + }, + viewImg: function(t) { + var a = [ t.currentTarget.dataset.url ]; + wx.previewImage({ + urls: a, + current: t.currentTarget.dataset.url + }); + }, + doUploadImg: function(t, e, i) { + wx.showLoading({ + title: "上传中..." + }); + var s = this, n = e.length; + s.data.uploadCount < n ? a.http.upload(a.urls.doUploadImg, { + path: e[s.data.uploadCount], + name: "image", + header: { + token: a.globalData.token + } + }).then(function(i) { + wx.hideLoading({}); + var n = JSON.parse(i).data, o = { + id: n, + path: a.baseUrls.baseCardUrl + n + }; + s.data.fieldList[t].valueList.push(o), s.setData({ + fieldList: s.data.fieldList + }), s.setData({ + uploadCount: ++s.data.uploadCount + }), s.doUploadImg(t, e, s.data.uploadCount); + }).catch(function(a) { + wx.hideLoading({}), s.setData({ + uploadCount: ++s.data.uploadCount + }), s.doUploadImg(t, e, s.data.uploadCount); + }) : (wx.hideLoading({}), s.setData({ + uploadCount: 0 + })); + }, + chooseLocation: function(t) { + var a = t.currentTarget.dataset.index; + this.setData({ + curMapIndex: a + }); + var e = JSON.stringify(n); + wx.navigateTo({ + url: "plugin://chooseLocation/index?key=".concat("HVDBZ-KJGKF-DNMJR-JHEWI-H2HN7-23BMS", "&referer=").concat("市域自治与互助", "&location=").concat(e, "&category=").concat("生活服务,娱乐休闲") + }); + }, + delMap: function(t) { + wx.showModal({ + title: "提示", + content: "确定要删除该条数据吗?", + cancelText: "取消", + confirmText: "确定", + success: function(a) { + a.confirm && (_self.data.fieldList[t.currentTarget.dataset.index].valueList.splice(t.currentTarget.dataset.idx, 1), + _self.setData({ + fieldList: _self.data.fieldList + })); + } + }); + }, + delAudio: function(t) { + var a = this; + wx.showModal({ + title: "提示", + content: "确定要删除该音频吗?", + cancelText: "取消", + confirmText: "确定", + success: function(e) { + e.confirm && (a.data.fieldList[t.currentTarget.dataset.index].valueList.splice(t.currentTarget.dataset.idx, 1), + a.setData({ + fieldList: a.data.fieldList + })); + } + }); + }, + doStartRecord: function() { + var t = this; + wx.getSetting({ + success: function(a) { + a.authSetting["scope.record"] ? t.startRecord() : wx.authorize({ + scope: "scope.record", + success: function() { + t.startRecord(); + } + }); + } + }); + }, + startRecord: function() { + var t = this; + t.data.setInter = setInterval(function() { + var a = parseInt(t.data.speck_time + 1); + t.setData({ + speck_time: parseInt(a), + isStartRecord: !0 + }), t.data.speck_time > 0 && t.data.speck_time <= 59 ? t.start() : (clearInterval(t.data.setInter), + t.stop(), wx.showToast({ + title: "录音最长60S哦!", + duration: 2e3, + icon: "none" + })); + }, 1e3); + }, + doEndRecord: function() { + clearInterval(this.data.setInter), this.data.speck_time > 10 ? (clearInterval(this.data.setInter), + this.stop(!0), this.setData({ + speck_time: "0", + isStartRecord: !1 + })) : (clearInterval(this.data.setInter), this.stop(!1), wx.showToast({ + title: "时间需大于10秒", + duration: 2e3, + icon: "none" + }), this.setData({ + speck_time: "0", + isStartRecord: !1 + })); + }, + start: function() { + e.start({ + duration: 6e4, + format: "mp3" + }), e.onStart(function() { + console.log("recorder start"); + }), e.onError(function(t) { + console.log(t), _self.stop(!1); + }); + }, + stop: function(t) { + var a = this; + e.stop(), e.onStop(function(e) { + t && a.doUploadAudio(e); + }); + }, + doUploadAudio: function(t) { + wx.showLoading({ + title: "上传中..." + }); + var e = this; + a.http.upload(a.urls.doUploadAudio, { + path: t.tempFilePath, + name: "audio", + header: { + token: a.globalData.token + } + }).then(function(i) { + if (wx.hideLoading({}), e.data.fieldList[e.data.currentIndex].valueList.length < e.data.currentItem.maxCount) { + wx.hideLoading({}); + var s = JSON.parse(i).data, n = a.baseUrls.baseCardUrl + s, o = parseInt(t.duration / 1e3), d = parseInt(o / 60), r = parseInt(o % 60), l = { + id: s, + path: n, + isPlay: !1, + duration: o, + curDuation: 0, + curDurationStr: "00:00", + totalDurationStr: (d > 9 ? d : "0" + d) + ":" + (+r > 9 ? r : "0" + r) + }; + e.data.fieldList[e.data.currentIndex].valueList.push(l), e.setData({ + fieldList: e.data.fieldList + }), e.data.fieldList[e.data.currentIndex].valueList.length == e.data.currentItem.maxCount && e.setData({ + isShowAudio: !1 + }); + } + }).catch(function(t) {}); + }, + play: function(t) { + var a = t.currentTarget.dataset.index, e = t.currentTarget.dataset.idx, s = t.currentTarget.dataset.item, n = this; + n.data.fieldList[a].valueList.forEach(function(t) { + t.isPlay && i.stop(), t.isPlay = !1, t.curDuation = 0, t.curDuationStr = "00:00"; + }), s.isPlay || ((i = wx.createInnerAudioContext()).src = n.data.fieldList[a].valueList[e].path, + i.autoplay = !0), i.onPlay(function() { + n.data.fieldList[a].valueList[e].isPlay = !0, n.setData({ + fieldList: n.data.fieldList + }); + }), i.onCanplay(function(t) { + n.data.waitFlag && (i.play(), n.setData({ + waitFlag: !1 + })); + }), i.onStop(function(t) { + n.data.fieldList[a].valueList[e].isPlay = !1, n.data.fieldList[a].valueList[e].curDuration = 0, + n.data.fieldList[a].valueList[e].curDurationStr = "00:00", n.setData({ + fieldList: n.data.fieldList + }); + }), i.onEnded(function(t) { + n.data.fieldList[a].valueList[e].isPlay = !1, n.data.fieldList[a].valueList[e].curDuration = 0, + n.data.fieldList[a].valueList[e].curDurationStr = "00:00", n.setData({ + fieldList: n.data.fieldList + }); + }), i.onError(function(t) { + n.data.fieldList[a].valueList[e].isPlay = !1, n.data.fieldList[a].valueList[e].curDuration = 0, + n.data.fieldList[a].valueList[e].curDurationStr = "00:00", n.setData({ + fieldList: n.data.fieldList + }); + }), i.onSeeking(function() { + console.log(i.currentTime); + }), i.onWaiting(function() { + i.pause(), n.setData({ + waitFlag: !0 + }); + }), i.onTimeUpdate(function() { + if (i.duration != 1 / 0) { + n.data.fieldList[a].valueList[e].curDuration = parseInt(i.currentTime), n.data.fieldList[a].valueList[e].duration = parseInt(i.duration), + console.log(i.duration); + var t = parseInt(i.currentTime / 60), s = parseInt(i.currentTime % 60), o = parseInt(i.duration / 60), d = parseInt(i.duration % 60), r = t > 9 ? t : "0" + t, l = s > 9 ? s : "0" + s, u = o > 9 ? o : "0" + o, c = +d > 9 ? d : "0" + d; + n.data.fieldList[a].valueList[e].curDurationStr = r + ":" + l, n.data.fieldList[a].valueList[e].totalDurationStr = u + ":" + c, + n.setData({ + fieldList: n.data.fieldList + }); + } + }); + }, + rewind: function(t) { + var a = t.currentTarget.dataset.index, e = t.currentTarget.dataset.idx; + t.currentTarget.dataset.item.isPlay && (this.data.fieldList[a].valueList[e].curDuration = this.data.fieldList[a].valueList[e].curDuration - this.data.speedStep, + i.seek(this.data.fieldList[a].valueList[e].curDuration), this.setData({ + fieldList: this.data.fieldList + })); + }, + speed: function(t) { + var a = t.currentTarget.dataset.index, e = t.currentTarget.dataset.idx; + t.currentTarget.dataset.item.isPlay && (this.data.fieldList[a].valueList[e].curDuration = this.data.fieldList[a].valueList[e].curDuration + this.data.speedStep, + i.seek(this.data.fieldList[a].valueList[e].curDuration), this.setData({ + fieldList: this.data.fieldList + })); + }, + slider4change: function(t) { + t.currentTarget.dataset.item.isPlay && i.seek(t.detail.value); + }, + showDialog: function(t) { + console.log(t), this.setData({ + isShowAudio: !0, + currentItem: t.currentTarget.dataset.item, + currentIndex: t.currentTarget.dataset.index + }); + }, + showDisplayType: function(t) { + this.setData({ + isShowType: !0 + }); + }, + chooseDisplayType: function(t) { + var a = t.currentTarget.dataset.id; + this.setData({ + selDisplayType: a + }); + }, + showMutliSel: function(t) { + this.setData({ + isShowTags: !0, + currentIndex: t.currentTarget.dataset.index + }); + }, + doPublish: function() { + if (this.checkParams()) { + wx.showToast({ + title: "保存中..." + }); + var t = this.buildParams(); + console.log(t), a.http.post(a.urls.doSaveMoments.format({ + configColumnId: this.data.columnId + }), { + data: t, + header: { + token: a.globalData.token + } + }).then(function(t) { + wx.hideLoading({}); + var a = getCurrentPages(); + a[a.length - 2].setData({ + isRefresh: !0 + }), wx.navigateBack({ + delta: 1 + }); + }).catch(function(t) { + console.log(t); + }); + } + }, + checkParams: function() { + for (var t = !0, a = 0; a < this.data.fieldList.length; a++) { + var e = this.data.fieldList[a]; + if (e.must) if ("1" == e.dataType || "7" == e.dataType || "8" == e.dataType || "9" == e.dataType) { + if (e.value.length <= 0) { + wx.showToast({ + title: "请输入或选择" + e.comment, + icon: "none" + }), t = !1; + break; + } + } else if (e.valueList.length <= 0) { + wx.showToast({ + title: "请上传" + e.comment, + icon: "none" + }), t = !1; + break; + } + } + return t; + }, + buildParams: function() { + for (var t = {}, a = 0; a < this.data.fieldList.length; a++) { + var e = this.data.fieldList[a]; + if ("1" == e.dataType || "7" == e.dataType || "8" == e.dataType || "9" == e.dataType) e.value.length > 0 && (t[e.name] = e.value); else if (e.valueList.length > 0) { + var i = ""; + "6" == e.dataType ? e.valueList.forEach(function(t) { + i += t.latitude + "," + t.longitude + "-"; + }) : "4" == e.dataType ? e.valueList.forEach(function(t) { + i += t.id + "&" + t.thumbId + ","; + }) : "3" == e.dataType ? e.valueList.forEach(function(t) { + i += t.id + "&" + t.duration + ","; + }) : "2" == e.dataType ? (e.valueList.forEach(function(t) { + i += t.id + ","; + }), i = i.substr(0, i.length - 1), i += "@" + this.data.selDisplayType) : e.valueList.forEach(function(t) { + i += t.id + ","; + }), "2" != e.dataType && (i = i.substr(0, i.length - 1)), t[e.name] = i; + } + } + return t; + } +}); \ No newline at end of file diff --git a/packagecard/moments/publish/momentpublishline.json b/packagecard/moments/publish/momentpublishline.json new file mode 100644 index 0000000..91de62c --- /dev/null +++ b/packagecard/moments/publish/momentpublishline.json @@ -0,0 +1,24 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + } +} \ No newline at end of file diff --git a/packagecard/moments/publish/momentpublishline.wxml b/packagecard/moments/publish/momentpublishline.wxml new file mode 100755 index 0000000..0248cfa --- /dev/null +++ b/packagecard/moments/publish/momentpublishline.wxml @@ -0,0 +1,225 @@ + + + + + + {{item.comment}} + + + + + + + {{item.comment}} + + + + + + + + + + + + {{item.comment}}{{item.valueList.length}}/{{item.maxCount}} + + + + + + + + {{it.name}} + + + + + + + + + + + + + + + + + + + + {{item.comment}} + + {{item.valueList.length}}/{{item.maxCount}} + + + + + + + + {{audio.curDurationStr}} + + {{audio.totalDurationStr}} + + + + + + + + + + + + + + + + 语音,可以给名片访客留下更深的印象 + + + 点击添加 + + + + + {{item.comment}} + {{item.valueList.length}}/{{item.maxCount}} + + + + + + + + + + + + + + + + + + {{item.comment}} + + + + + + + {{item.comment}} + + + + + + + + {{m.name}}-{{m.address}} + + + + + + + + + + + + + 在地图上选取一个地点 + + + 点击添加 + + + + + {{item.comment}} + + {{item.dictionariesList[item.index].dataName}} + + + + + + {{item.comment}} + + {{item.selValue}} + + + + + + + + + + + + + + + + + + 00:{{speck_time>9?speck_time:'0'+speck_time}} + 长按录音 + + + + {{audioFile.isPlay?'播放中:'+speck_time+'秒':'时长:'+audioFile.duration+'秒'}} + + 点击播放 + 删除 + + + + + + + 点击添加 + + + + + + 点击添加 + + + + + 相册 + 相机 + + + + + 相册 + 相机 + + + + + + 点击添加 + + + + + + + {{item.dataName}} + + + + + + + diff --git a/packagecard/moments/publish/momentpublishline.wxss b/packagecard/moments/publish/momentpublishline.wxss new file mode 100755 index 0000000..7d10764 --- /dev/null +++ b/packagecard/moments/publish/momentpublishline.wxss @@ -0,0 +1,45 @@ +van-action-sheet input { + height: 60rpx; + line-height: 60rpx; + padding-left: 10rpx; +} + +van-action-sheet input,van-action-sheet textarea { + border: 1px solid #c2c2c2; + border-radius: 10rpx; + margin-top: 9rpx; +} + +van-action-sheet textarea { + padding: 10rpx; +} + +van-action-sheet .line { + border-bottom: 1rpx solid #f5f5f5; + border-top: 1rpx solid #f5f5f5; +} + +van-action-sheet .line,van-action-sheet .noline { + height: 90rpx; + line-height: 90rpx; + text-align: center; + width: 90%; +} + +van-action-sheet .line:active,van-action-sheet .noline:active { + background-color: #f5f5f5; + color: #000; +} + +.cu-form-group .title { + min-width: calc(4em + 30rpx); +} + +.item-bottom-margin { + margin-bottom: 15rpx; + width: 100%; +} + +.item-padding { + padding: 15rpx; +} \ No newline at end of file diff --git a/packagecard/moments/showlist/showlist.js b/packagecard/moments/showlist/showlist.js new file mode 100755 index 0000000..8c3e00e --- /dev/null +++ b/packagecard/moments/showlist/showlist.js @@ -0,0 +1,320 @@ +var t = getApp(), a = wx.createInnerAudioContext(); + +Page({ + data: { + currentIndex: 0, + tabList: [], + curId: "", + tempUserId: "", + dataList: [], + speedStep: 5, + waitFlag: !1, + topHeight: t.globalData.CustomBar, + currentTab: "", + count: 3 + }, + onLoad: function(t) { + console.log(t.userId), this.setData({ + curId: t.id, + tempUserId: t.userId + }), wx.setNavigationBarTitle({ + title: "栏目" + }), this.getTabs(); + }, + getTabs: function() { + var a = this; + wx.showLoading({ + title: "加载中..." + }), t.http.get(t.urls.getMainColumn, { + header: { + token: t.globalData.token + }, + data: { + cardTemplateUseId: a.data.tempUserId + } + }).then(function(t) { + for (var e = 0; e < t.data.length; e++) t.data[e].configColumnId == a.data.curId && a.setData({ + currentTab: t.data[e], + currentIndex: e + }); + wx.hideLoading({}), a.setData({ + tabList: t.data + }), a.getMainMoment(a.data.curId); + }).catch(function(t) { + wx.hideLoading({}); + }); + }, + onChange: function(t) { + var a = t.detail.index, e = this.data.tabList[a].configColumnId; + console.log(e); + this.setData({ + currentIndex: a, + currentTab: this.data.tabList[a] + }), this.getMainMoment(e); + }, + getMainMoment: function(a) { + wx.showLoading({ + title: "加载中..." + }); + var e = this; + t.http.get(t.urls.getMainMoment.format({ + configColumnId: a + }), { + header: { + token: t.globalData.token + }, + data: { + userId: e.data.tempUserId + } + }).then(function(t) { + wx.hideLoading({}), e.buildMainData(t.data); + }).catch(function(t) { + wx.hideLoading({}); + }); + }, + buildMainData: function(a) { + var e = this, i = ""; + a.forEach(function(a) { + var n = e.data.tabList[e.data.currentIndex], s = "2" == n.configColumnCollect || "4" == n.configColumnCollect || "2" == n.configColumnLike && "4" == n.configColumnLike || "2" == n.configColumnDispatch || "4" == n.configColumnDispatch || "2" == n.configColumnComment || "4" == n.configColumnComment; + a.cId = e.data.tabList[e.data.currentIndex].configColumnId, a.collectSwitch = e.data.tabList[e.data.currentIndex].configColumnCollect, + a.commentSwitch = e.data.tabList[e.data.currentIndex].configColumnComment, a.shareSwitch = e.data.tabList[e.data.currentIndex].configColumnDispatch, + a.likeSwitch = e.data.tabList[e.data.currentIndex].configColumnLike, a.funcSwitch = s, + i += a.uid + ",", a.collectCount = 0, a.collectStatus = !1, a.commentCount = 0, + a.dispatchCount = 0, a.likeCount = 0, a.likeStatus = !1, a.scansCount = 0, a.list.forEach(function(a) { + switch (a.dataType) { + case "2": + var e = a.value.split("@"); + e.length > 1 ? a.dataMode = e[1] : a.dataMode = "1"; + var i = e[0].split(","), n = []; + i.forEach(function(a) { + if (a.length > 0) { + var e = { + id: a, + path: t.baseUrls.baseCardUrl + a + }; + n.push(e); + } + }), a.valueList = n; + break; + + case "3": + i = a.value.split(","), n = []; + i.forEach(function(a) { + if (a.length > 0) { + var e = a.split("&"), i = "00:00"; + if (e.length > 1) { + var s = e[1], d = parseInt(s / 60), r = parseInt(s % 60); + i = (d > 9 ? d : "0" + d) + ":" + (+r > 9 ? r : "0" + r); + } + var o = { + id: e[0], + path: t.baseUrls.baseCardUrl + e[0], + isPlay: !1, + duration: 1e5, + curDuration: 0, + curDurationStr: "00:00", + totalDurationStr: i + }; + n.push(o); + } + }), a.valueList = n; + break; + + case "4": + i = a.value.split(","), n = []; + for (var s = 0; s < i.length; s++) if (i[s].length > 0) { + var d = i[s].split("&"), r = { + path: t.baseUrls.baseCardUrl + d[0], + imgPath: t.baseUrls.baseCardUrl + d[1] + }; + n.push(r); + } + a.valueList = n; + break; + + case "6": + i = a.value.split("-"), n = []; + i.forEach(function(t) { + if (t.length > 0) { + var a = t.split(","), e = { + name: "", + address: "", + latitude: a[0], + longitude: a[1] + }; + n.push(e); + } + }), a.valueList = n; + break; + + case "8": + a.dictionariesList.forEach(function(t) { + -1 != a.value.indexOf(t.dataId) && (a.selValue = t.dataName); + }); + break; + + case "9": + a.dictionariesList.forEach(function(t) { + -1 != a.value.indexOf(t.dataId) ? t.isSel = !0 : t.isSel = !1; + }); + } + }); + }), e.setData({ + dataList: a + }), e.data.dataList.length > 0 && e.getColumnContentHandle(i); + }, + getColumnContentHandle: function(a) { + var e = this; + wx.showLoading({ + title: "加载中..." + }), t.http.get(t.urls.getColumnContentHandle.format({ + projectId: "column", + businessIds: a + }), { + header: { + token: t.globalData.token + } + }).then(function(t) { + wx.hideLoading({}), t.data.forEach(function(t) { + e.data.dataList.forEach(function(a) { + a.uid == t.businessId && (a.collectCount = t.collectCount, a.collectStatus = t.collectStatus, + a.commentCount = t.commentCount, a.dispatchCount = t.dispatchCount, a.likeCount = t.likeCount, + a.likeStatus = t.likeStatus, a.scansCount = t.scansCount); + }); + }), e.setData({ + dataList: e.data.dataList + }); + }).catch(function(t) {}); + }, + viewImg: function(t) { + var a = [], e = t.currentTarget.dataset.values; + this.setData({ + isNeedRefresh: !1 + }), e.forEach(function(t) { + a.push(t.path); + }), wx.previewImage({ + urls: a, + current: t.currentTarget.dataset.cur + }); + }, + viewVideo: function(t) { + var a = t.currentTarget.dataset.url; + wx.previewMedia({ + sources: [ { + url: a, + type: "video" + } ] + }); + }, + play: function(t) { + var e = this, i = t.currentTarget.dataset.index, n = t.currentTarget.dataset.i, s = t.currentTarget.dataset.a, d = t.currentTarget.dataset.item; + e.data.dataList.forEach(function(t) { + t.list.forEach(function(t) { + "3" == t.dataType && t.valueList && t.valueList.forEach(function(t) { + t.isPlay && a.stop(), t.isPlay = !1, t.curDuration = 0, t.curDuationStr = "00:00"; + }); + }); + }), d.isPlay ? a.stop() : ((a = wx.createInnerAudioContext()).src = e.data.dataList[i].list[n].valueList[s].path + ".mp3", + a.autoplay = !0), a.onPlay(function() { + console.log("onPlay"), e.data.dataList[i].list[n].valueList[s].isPlay = !0, e.setData({ + dataList: e.data.dataList + }); + }), a.onCanplay(function(t) {}), a.onStop(function(t) { + e.data.dataList[i].list[n].valueList[s].isPlay = !1, e.data.dataList[i].list[n].valueList[s].curDuration = 0, + e.data.dataList[i].list[n].valueList[s].curDurationStr = "00:00", e.setData({ + dataList: e.data.dataList + }), a.destroy(); + }), a.onEnded(function(t) { + e.data.dataList[i].list[n].valueList[s].isPlay = !1, e.data.dataList[i].list[n].valueList[s].curDuration = 0, + e.data.dataList[i].list[n].valueList[s].curDurationStr = "00:00", e.setData({ + dataList: e.data.dataList + }), a.destroy(); + }), a.onError(function(t) { + e.data.dataList[i].list[n].valueList[s].isPlay = !1, e.data.dataList[i].list[n].valueList[s].curDuration = 0, + e.data.dataList[i].list[n].valueList[s].curDurationStr = "00:00", e.setData({ + dataList: e.data.dataList + }), a.destroy(); + }), a.onSeeking(function() {}), a.onWaiting(function() {}), a.onTimeUpdate(function() { + if (a.duration != 1 / 0) { + e.data.dataList[i].list[n].valueList[s].curDuration = parseInt(a.currentTime), e.data.dataList[i].list[n].valueList[s].duration = parseInt(a.duration); + var t = parseInt(a.currentTime / 60), d = parseInt(a.currentTime % 60), r = parseInt(a.duration / 60), o = parseInt(a.duration % 60), u = t > 9 ? t : "0" + t, c = d > 9 ? d : "0" + d, l = r > 9 ? r : "0" + r, h = +o > 9 ? o : "0" + o; + e.data.dataList[i].list[n].valueList[s].curDurationStr = u + ":" + c, e.data.dataList[i].list[n].valueList[s].totalDurationStr = l + ":" + h, + e.setData({ + dataList: e.data.dataList + }); + } + }); + }, + rewind: function(t) { + var e = t.currentTarget.dataset.index, i = t.currentTarget.dataset.item, n = t.currentTarget.dataset.a, s = t.currentTarget.dataset.i; + i.isPlay && (this.data.dataList[e].list[s].valueList[n].curDuration = this.data.dataList[e].list[s].valueList[n].curDuration - this.data.speedStep, + a.seek(this.data.dataList[e].list[s].valueList[n].curDuration), this.setData({ + dataList: this.data.dataList + })); + }, + speed: function(t) { + var e = t.currentTarget.dataset.index, i = t.currentTarget.dataset.item, n = t.currentTarget.dataset.a, s = t.currentTarget.dataset.i; + i.isPlay && (this.data.dataList[e].list[s].valueList[n].curDuration = this.data.dataList[e].list[s].valueList[n].curDuration + this.data.speedStep, + a.seek(this.data.dataList[e].list[s].valueList[n].curDuration), this.setData({ + dataList: this.data.dataList + })); + }, + slider4change: function(t) { + t.currentTarget.dataset.index; + t.currentTarget.dataset.item.isPlay && a.seek(t.detail.value); + }, + onUnload: function(t) { + a && a.stop(); + }, + showDetail: function(t) { + if (-1 != this.data.currentTab.configColumnType.indexOf("dda5007c-5fb7-48f2-8537-3cb8ea298242")) { + var a = this.data.currentTab.configColumnId, e = t.currentTarget.dataset.uid; + console.log(t), wx.navigateTo({ + url: "/packagecard/moments/momentsdetail/momentsdetail?uId=" + e + "&cId=" + a + }); + } + }, + showComment: function(t) { + var a = t.currentTarget.dataset.cid, e = t.currentTarget.dataset.uid, i = t.currentTarget.dataset.like, n = "&collectSwitch=" + t.currentTarget.dataset.collect + "&likeSwitch=" + i + "&commentSwitch=" + t.currentTarget.dataset.comment + "&shareSwitch=" + t.currentTarget.dataset.share; + console.log(n), wx.navigateTo({ + url: "/packagecard/moments/momentsdetail/momentsdetail?uId=" + e + "&cId=" + a + n + }); + }, + doLike: function(a) { + var e = this, i = a.currentTarget.dataset.item, n = a.currentTarget.dataset.index, s = ""; + s = i.likeStatus ? "取消中..." : "保存中...", wx.showLoading({ + title: s + }), t.http.post(t.urls.doSaveLike, { + header: { + token: t.globalData.token + }, + data: { + businessId: i.uid, + projectId: "column" + } + }).then(function(t) { + wx.hideLoading({}), e.data.dataList[n].likeStatus = !i.likeStatus, i.likeStatus ? --e.data.dataList[n].likeCount : ++e.data.dataList[n].likeCount, + e.setData({ + dataList: e.data.dataList + }); + }).catch(function(t) {}); + }, + doCollect: function(a) { + var e = this, i = a.currentTarget.dataset.item, n = a.currentTarget.dataset.index, s = ""; + s = i.collectStatus ? "取消收藏..." : "收藏中...", wx.showLoading({ + title: s + }), t.http.post(t.urls.doSaveCollect, { + header: { + token: t.globalData.token + }, + data: { + businessId: i.uid, + projectId: "column" + } + }).then(function(t) { + wx.hideLoading({}), e.data.dataList[n].collectStatus = !i.collectStatus, e.setData({ + dataList: e.data.dataList + }); + }).catch(function(t) {}); + } +}); \ No newline at end of file diff --git a/packagecard/moments/showlist/showlist.json b/packagecard/moments/showlist/showlist.json new file mode 100644 index 0000000..91de62c --- /dev/null +++ b/packagecard/moments/showlist/showlist.json @@ -0,0 +1,24 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + } +} \ No newline at end of file diff --git a/packagecard/moments/showlist/showlist.wxml b/packagecard/moments/showlist/showlist.wxml new file mode 100755 index 0000000..b551418 --- /dev/null +++ b/packagecard/moments/showlist/showlist.wxml @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{audio.curDurationStr}} + + {{audio.totalDurationStr}} + + + + + + + + + + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + + + {{child.comment}}: + {{child.selValue}} + + + + + + + + + {{child.comment}} + + + + {{ss.dataName}} + + + + + + + + + + 收藏 + + + + {{item.commentCount>1000?'1000+':item.commentCount}} + + + + {{item.likeCount>1000?'1000+':item.likeCount}} + + + + + + + + + + + diff --git a/packagecard/moments/showlist/showlist.wxss b/packagecard/moments/showlist/showlist.wxss new file mode 100755 index 0000000..fbf5cc6 --- /dev/null +++ b/packagecard/moments/showlist/showlist.wxss @@ -0,0 +1,648 @@ +.tab { + background: #fff; + flex-direction: row; + height: 80rpx; + left: 0; + position: fixed; + right: 0; + z-index: 100; +} + +.tab,.tab-box { + display: flex; +} + +.tab-box { + align-items: center; + color: #000; + font-size: 32rpx; + justify-content: center; +} + +.tab-box.active { + border-bottom: 2px solid #055fe6; + box-sizing: border-box; + color: #055fe6; +} + +.movie-item { + height: 280rpx; + padding-bottom: 0; + width: 100%; +} + +.card-container { + box-sizing: border-box; + height: 0; +} + +.share-btn { + background: #eee; +} + +.card { + background: #fff; + box-sizing: border-box; + height: 0; + overflow: hidden; + position: relative; + width: 100%; +} + +.area-box { + white-space: nowrap; + word-break: break-all; +} + +.card-bgImg { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.person { + padding: 20rpx; +} + +.dynamic-container { + background-color: #fff; + border-radius: 20rpx; + margin-top: -50rpx; + padding: 20rpx; + position: relative; +} + +.dynamic-title image { + height: 30rpx; + margin-top: -4rpx; + vertical-align: middle; + width: 30rpx; +} + +.catelog-title { + justify-content: space-between; + position: relative; +} + +.catelog-title,.catelog-title .action { + align-items: center; + display: flex; +} + +.catelog-title .action { + justify-content: center; + max-width: 100%; + padding-right: 30rpx; +} + +.title { + background: #0054bd; + border-top-left-radius: 48rpx; + border-top-right-radius: 48rpx; + color: #fff; + display: inline-block; + font-size: 30rpx; + margin-bottom: -50rpx; + padding: 10rpx 60rpx 60rpx 10rpx; + position: relative; +} + +.title text { + margin-left: 20rpx; +} + +.column-box,.column-content { + background-color: #fff; + display: flex; + flex-direction: column; + width: 100%; +} + +.column-content { + border-radius: 10rpx; + box-shadow: 0 2px 2px #f0f0f0; + z-index: 2; +} + +.intro-title image,.serve-title image { + height: 30rpx; + margin-top: -4px; + vertical-align: middle; + width: 28rpx; +} + +.person-content { + background: #fff; + border-radius: 20rpx; + color: #000; + font-size: 30rpx; + letter-spacing: 2rpx; + line-height: 40rpx; + margin-top: -30rpx; + padding: 20rpx; + position: relative; + word-break: break-all; +} + +.column-item { + margin: 0rpx; + padding: 7.5rpx 15rpx; +} + +.column-item:nth-child(1) { + padding: 15rpx 15rpx 7.5rpx; +} + +.column-item:last-child { + padding: 7.5rpx 15rpx 15rpx; +} + +.img-item { + border-radius: 5rpx; + width: 100%; +} + +.img-item:last-child,.img-item:nth-child(1) { + padding: 7.5rpx 0rpx; +} + +.movie-box { + align-items: center; + display: flex; + flex-direction: row; + justify-content: center; +} + +.movie-box,.movie-box image { + border-radius: 10rpx; + height: 350rpx; + width: 100%; +} + +.company-title { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; +} + +.company-title image { + height: 140rpx; + width: 140rpx; +} + +.company-name { + align-items: center; + display: flex; + font-size: 34rpx; + height: 140rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 520rpx; +} + +.company-content { + background: #fff; + border-radius: 20rpx; + margin-top: -30rpx; + padding: 20rpx; + position: relative; +} + +.company-content image { + border-radius: 20rpx; + height: 300rpx; + width: 100%; +} + +.company .person-content { + margin-top: 0; +} + +.dynamic-title { + display: block; + margin: 0 auto; + width: 710rpx; +} + +.dynamic-box { + background: #fff; + border-radius: 20rpx; + height: 400rpx; + margin-bottom: 20rpx; + overflow: hidden; + position: relative; +} + +.dynamic-box image { + height: 400rpx; + width: 100%; +} + +.dynamic-text { + background: rgba(0,0,0,.6); + bottom: 0; + color: #fff; + font-size: 30rpx; + left: 0; + line-height: 60rpx; + padding: 0 10rpx; + position: absolute; + right: 0; +} + +.person-info { + border-bottom: 1px solid #eee; + display: flex; + justify-content: space-between; + padding-bottom: 20rpx; +} + +.avatar { + border-radius: 50%; + height: 120rpx; + overflow: hidden; + width: 120rpx; +} + +.avatar image { + height: 100%; + width: 100%; +} + +.person-name { + width: 530rpx; +} + +.name { + color: #000; + font-size: 32rpx; + margin: 15rpx 0 10rpx; +} + +.time { + color: #b2b2b2; +} + +.dynamic-content { + margin: 20rpx 0; +} + +.dynamic-img { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + position: relative; +} + +.dynamic-img image { + height: 160rpx; + margin-bottom: 10rpx; + margin-right: 2%; + width: 32%; +} + +.dynamic-img image:nth-child(3n) { + margin-right: 0; +} + +.dynamic-img-text { + background: rgba(0,0,0,.6); + bottom: 3rpx; + color: #fff; + font-size: 32rpx; + left: 0; + line-height: 70rpx; + padding: 0 20rpx; + position: absolute; + right: 0; +} + +.dynamic-good { + display: flex; + justify-content: space-between; + margin: 10rpx 0; +} + +.good-count { + color: #333; + font-size: 28rpx; +} + +.good-btn image { + height: 40rpx; + vertical-align: top; + width: 40rpx; +} + +.dynamic-reply { + background: #eee; + margin-top: 15rpx; + padding: 15rpx; +} + +.reply { + color: #000; + font-size: 32rpx; + margin-bottom: 5rpx; +} + +.reply-name { + display: inline; + font-weight: 700; +} + +.dynamic-reply-input { + margin-top: 10rpx; +} + +.dynamic-reply-input input { + border-bottom: 1px solid #eee; + height: 60rpx; + width: 100%; +} + +.creat-card { + align-items: center; + background: #0054bd; + border-radius: 50%; + bottom: 20rpx; + box-sizing: border-box; + flex-direction: column; + height: 140rpx; + justify-content: center; + padding: 20rpx; + position: fixed; + right: 20rpx; + width: 140rpx; + z-index: 100; +} + +.creat-card image { + height: 60rpx; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 80rpx; +} + +.share-save { + display: flex; + justify-content: space-between; + text-align: center; +} + +.share-btn { + background: none; + color: #1296db; +} + +.save-btn,.share-btn { + border: 1px solid #1296db; + font-weight: 400; +} + +.save-btn { + background: #1296db; + color: #fff; +} + +.bottom-btn { + margin-top: 20rpx; + padding: 0 20rpx; + white-space: nowrap; + width: 100%; +} + +.phone-box .icon { + height: 30rpx; + vertical-align: top; + width: 30rpx; +} + +.wechate-box .icon { + height: 30rpx; + vertical-align: top; + width: 35rpx; +} + +.email-box .icon { + height: 30rpx; + vertical-align: top; + width: 30rpx; +} + +.bottom-btn-box { + border: 1px solid #ddd; + border-radius: 10rpx; + box-sizing: border-box; + display: inline-block; + line-height: 30rpx; + margin-right: 10rpx; + min-width: 32%; + padding: 20rpx; +} + +.bottom-text { + margin-top: 10rpx; +} + +.top-box { + background-color: #f7f7f7; +} + +.good,.top-box { + padding-bottom: 20rpx; +} + +.good { + background-color: #fff; + display: flex; + justify-content: space-between; + padding-left: 20rpx; +} + +.good-avatar,.good-click { + color: #333; + line-height: 45rpx; +} + +.good-click { + display: flex; +} + +.view-count { + border-right: 1px solid grey; +} + +.view-count,.view-count-no { + color: grey; + display: flex; + flex-direction: row; + font-size: 36rpx; + margin-right: 30rpx; + padding-right: 30rpx; +} + +.view-count-no { + align-items: center; +} + +.good-avatar image { + height: 100%; + width: 100%; +} + +.good-click image { + height: 38rpx; + width: 38rpx; +} + +.view-count image,.view-count-no image { + height: 32rpx; + width: 32rpx; +} + +.avatar-list { + display: inline-block; + height: 45rpx; + margin-right: 10rpx; + vertical-align: top; + width: 45rpx; +} + +.mid { + background: #0054bd; + border-top-left-radius: 60rpx; + border-top-right-radius: 60rpx; + margin-top: -20rpx; + padding: 40rpx 0 80rpx; + position: relative; +} + +.mid,.mid-box { + display: flex; +} + +.mid-box { + align-items: center; + background: none; + border-right: 1px solid #2f82ea; + flex: 1; + flex-direction: column; + font-weight: 400; + justify-content: center; + padding: 0!important; + width: auto!important; +} + +.mid-box:last-child { + border: none; +} + +.mid-box image { + height: 60rpx; + margin-bottom: 20rpx; + width: 60rpx; +} + +.mid-box-text { + color: #fff; + font-size: 30rpx; +} + +.mid-btn { + background: #fff; + border-top-left-radius: 60rpx; + border-top-right-radius: 60rpx; + flex-wrap: wrap; + margin-top: -60rpx; + padding: 30rpx; + position: relative; +} + +.mid-btn,.mid-btn-box { + display: flex; + justify-content: space-between; +} + +.mid-btn-box { + background: #eee; + border-radius: 20rpx; + box-sizing: border-box; + flex-shrink: 0; + margin-bottom: 20rpx; + padding: 15rpx; + width: 49%; +} + +.mid-btn-box:nth-child(3),.mid-btn-box:nth-child(4) { + margin-bottom: 0; +} + +.mid-btn-box image { + height: 80rpx; + width: 80rpx; +} + +.mid-btn-text { + width: 200rpx; +} + +.text-top { + color: #000; + font-size: 30rpx; + line-height: 45rpx; +} + +.text-bottom { + color: #898989; + font-size: 26rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.bar-code { + background: rgba(0,0,0,.6); + bottom: 0; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 999; +} + +.bar-code .content { + align-items: center; + background: #fff; + border-radius: 10rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + left: 50%; + max-width: 96%; + min-height: 50%; + min-width: 80%; + padding: 20rpx; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.code-title { + font-weight: 700; +} + +.code-title,.code-txt { + color: #000; + font-size: 32rpx; +} + +.bar-code image { + height: 300rpx; + width: 300rpx; +} \ No newline at end of file diff --git a/packagecard/sharePage/cardcode.js b/packagecard/sharePage/cardcode.js new file mode 100755 index 0000000..8bbc916 --- /dev/null +++ b/packagecard/sharePage/cardcode.js @@ -0,0 +1,55 @@ +var a = getApp(); + +Page({ + data: { + imgUrl: a.baseUrls.baseCardUrl, + animationData: {}, + cardImg: "", + id: "", + contentHeight: a.globalData.windowHeight, + translateUp: {}, + translateDown: {}, + animDuration: 800 + }, + onLoad: function(a) { + this.setData({ + cardImg: a.cardImg, + id: a.id + }), wx.setNavigationBarTitle({ + title: "名片分享" + }); + }, + onReady: function() { + var a = this; + this.setData({ + animationData: {}, + translateDown: {}, + translateUp: {} + }); + var t = wx.createAnimation({ + duration: a.data.animDuration, + timingFunction: "linear", + transformOrigin: "50% 50% 0" + }); + t.rotate(180).step(); + var n = wx.createAnimation({ + duration: a.data.animDuration, + timingFunction: "linear", + transformOrigin: "50% 50% 0" + }); + n.translateY(160).step(); + var i = wx.createAnimation({ + duration: a.data.animDuration, + timingFunction: "linear", + transformOrigin: "50% 50% 0" + }); + i.translateY(-160).step(), this.setData({ + animationData: t.export() + }), setTimeout(function() { + a.setData({ + translateUp: n.export(), + translateDown: i.export() + }); + }, a.data.time); + } +}); \ No newline at end of file diff --git a/packagecard/sharePage/cardcode.json b/packagecard/sharePage/cardcode.json new file mode 100644 index 0000000..91de62c --- /dev/null +++ b/packagecard/sharePage/cardcode.json @@ -0,0 +1,24 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + } +} \ No newline at end of file diff --git a/packagecard/sharePage/cardcode.wxml b/packagecard/sharePage/cardcode.wxml new file mode 100755 index 0000000..57427c7 --- /dev/null +++ b/packagecard/sharePage/cardcode.wxml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/packagecard/sharePage/cardcode.wxss b/packagecard/sharePage/cardcode.wxss new file mode 100755 index 0000000..8cc24a5 --- /dev/null +++ b/packagecard/sharePage/cardcode.wxss @@ -0,0 +1,33 @@ +.content-box { + align-items: center; + background: #fff; + border-radius: 10rpx; + display: flex; + flex-direction: column; + justify-content: center; + min-width: 100%; +} + +.image1 { + align-self: center; + height: 70%; + width: 70%; +} + +.box { + align-items: center; + display: flex; + justify-content: center; + padding: 15rpx; + z-index: 1; +} + +.box,.image2 { + position: absolute; + width: 95%; +} + +.image2 { + box-shadow: 1rpx 1rpx 5rpx #f5f5f5; + z-index: 2; +} \ No newline at end of file diff --git a/packagecard/sharePage/sharePage.js b/packagecard/sharePage/sharePage.js new file mode 100755 index 0000000..675688a --- /dev/null +++ b/packagecard/sharePage/sharePage.js @@ -0,0 +1,442 @@ +var t, a = require("../../@babel/runtime/helpers/defineProperty"), e = getApp(), r = wx.createInnerAudioContext(); + +Page({ + data: (t = { + active: 0, + curIndex: 0, + token: "", + cardTemplateUseId: "", + cardTemplateDispatchId: "", + cardInfo: {}, + areaList: [], + haveCard: !1, + bgImg: "" + }, a(t, "areaList", []), a(t, "cardHeight", ""), a(t, "cardInfo", {}), a(t, "cardUrl", e.baseUrls.baseCardUrl), + a(t, "personIntro", {}), a(t, "companyIntro", {}), a(t, "shareImg", ""), a(t, "phoneTxt", ""), + a(t, "emailTxt", ""), a(t, "wechateTxt", ""), a(t, "addressTxt", ""), a(t, "viewInfo", {}), + a(t, "forwardCount", ""), a(t, "imgUrl", e.baseUrls.baseCardUrl), a(t, "personId", ""), + a(t, "shareRecordId", ""), a(t, "nameTxt", "名片"), a(t, "dataList", []), a(t, "isShowBarCode", !1), + a(t, "browUserList", []), a(t, "tempUserId", ""), a(t, "shareImgUrl", ""), t), + doLogin: function() { + var t = this; + wx.showLoading({ + title: "加载中..." + }), wx.login({ + success: function(a) { + e.http.post(e.urls.wxLogin, { + data: { + jsCode: a.code + } + }).then(function(a) { + wx.hideLoading({}); + var r = a.data.data.split("_")[0]; + wx.setStorageSync("token", r), wx.setStorageSync("bindPhone", a.data.data.split("_")[1]), + t.setData({ + token: r + }), e.globalData.token = r, t.getCardId(); + }).catch(function(t) { + wx.hideLoading({}), console.log(t); + }); + } + }); + }, + saveCheckRecord: function() { + console.log("1123"), e.http.post(e.urls.checkRecord, { + header: { + token: e.globalData.token + }, + data: { + cardTemplateUseId: this.data.cardTemplateUseId, + cardTemplateDispatchId: this.data.cardTemplateDispatchId + } + }).then(function(t) { + console.log(t); + }).catch(function(t) { + console.log(t); + }); + }, + getCard: function() { + var t = this; + e.http.get(e.urls.shareCard.format({ + cardTemplateUseId: t.data.cardTemplateUseId + }), { + header: { + token: e.globalData.token + }, + data: {} + }).then(function(a) { + console.log(a.data); + for (var e = a.data.areaList, r = 0; r < e.length; r++) "1" == e[r].templateAreaFontCenter ? e[r].templateAreaFontCenter = "left" : "2" == e[r].templateAreaFontCenter ? e[r].templateAreaFontCenter = "center" : e[r].templateAreaFontCenter = "right", + "0" == e[r].templateAreaFontBold ? e[r].templateAreaFontBold = "normal" : "1" == e[r].templateAreaFontBold ? e[r].templateAreaFontBold = "bold" : e[r].templateAreaFontStyle = "italic", + "phone" == e[r].templateAreaSource ? t.setData({ + phoneTxt: e[r].templateAreaFontValue + }) : "wechat" == e[r].templateAreaSource ? t.setData({ + wechatTxt: e[r].templateAreaFontValue + }) : "email" == e[r].templateAreaSource ? t.setData({ + emailTxt: e[r].templateAreaFontValue + }) : "address" == e[r].templateAreaSource ? t.setData({ + addressTxt: e[r].templateAreaFontValue + }) : "name" == e[r].templateAreaSource && t.setData({ + nameTxt: e[r].templateAreaFontValue + }); + t.setData({ + cardInfo: a.data, + areaList: e, + dataList: [] + }), a.data && (t.toSaveLocalImg(a.data.cardTemplateUseDispatchPhoto), t.getBrowCardUserList(a.data.cardTemplateUseId), + t.setData({ + tempUserId: a.data.creator + }), t.getMainColumn(a.data.creator)); + }); + }, + getMainColumn: function(t) { + var a = this; + e.http.get(e.urls.getMainColumn, { + header: { + token: e.globalData.token + }, + data: { + cardTemplateUseId: t + } + }).then(function(e) { + wx.showLoading({ + title: "加载中..." + }), console.log(e.data), a.getMainMoment(e.data, t, 0); + }).catch(function(t) {}); + }, + getMainMoment: function(t, a, r) { + var s = this; + r < t.length ? e.http.get(e.urls.getMainMoment.format({ + configColumnId: t[s.data.curIndex].configColumnId + }), { + header: { + token: e.globalData.token + }, + data: { + userId: a + } + }).then(function(e) { + if (e.data.length > 0) { + var r = { + cId: t[s.data.curIndex].configColumnId, + type: t[s.data.curIndex].configColumnType, + name: t[s.data.curIndex].configColumnName, + mode: t[s.data.curIndex].configTableMode, + list: e.data.slice(0, t[s.data.curIndex].configColumnRowCount) + }; + s.data.dataList.push(r); + } + s.setData({ + curIndex: ++s.data.curIndex + }), s.getMainMoment(t, a, s.data.curIndex); + }).catch(function(e) { + s.setData({ + curIndex: ++s.data.curIndex + }), s.getMainMoment(t, a, s.data.curIndex); + }) : (wx.hideLoading({}), wx.stopPullDownRefresh({}), s.buildMainData()); + }, + buildMainData: function() { + this.data.dataList.forEach(function(t) { + t.list.forEach(function(t) { + t.list.forEach(function(t) { + switch (t.dataType) { + case "2": + var a = t.value.split(","), r = []; + a.forEach(function(t) { + var a = { + id: t, + path: e.baseUrls.baseCardUrl + t + }; + r.push(a); + }), t.valueList = r; + break; + + case "3": + a = t.value.split(","), r = []; + a.forEach(function(t) { + var a = { + id: t, + path: e.baseUrls.baseCardUrl + t, + isPlay: !1, + duration: 1e5, + curDuration: 0, + curDurationStr: "00:00", + totalDurationStr: "00:00" + }; + r.push(a); + }), t.valueList = r; + break; + + case "4": + a = t.value.split(","), r = []; + for (var s = 0; s < a.length; s++) { + var i = a[s].split("&"), n = { + path: e.baseUrls.baseCardUrl + i[0], + imgPath: e.baseUrls.baseCardUrl + i[1] + }; + r.push(n); + } + t.valueList = r; + break; + + case "6": + a = t.value.split("-"), r = []; + a.forEach(function(t) { + var a = t.split(","), e = { + name: "", + address: "", + latitude: a[0], + longitude: a[1] + }; + r.push(e); + }), t.valueList = r; + break; + + case "8": + t.dictionariesList.forEach(function(a) { + -1 != t.value.indexOf(a.dataId) && (t.selValue = a.dataName); + }); + break; + + case "9": + t.dictionariesList.forEach(function(a) { + -1 != t.value.indexOf(a.dataId) ? a.isSel = !0 : a.isSel = !1; + }); + } + }); + }); + }), this.setData({ + curIndex: 0, + dataList: this.data.dataList + }); + }, + includedCard: function() { + e.http.post(e.urls.includedCard, { + header: { + token: e.globalData.token + }, + data: { + cardTemplateUseBagId: "", + cardTemplateUseId: this.data.cardInfo.cardTemplateUseId, + cardTemplateUseStar: "", + cardTemplateUseTag: "", + cardTemplateUseTop: "" + } + }).then(function(t) { + "200" == t.statusCode && wx.showToast({ + title: "加入卡包成功!" + }); + }); + }, + getCardId: function() { + var t = this; + e.http.get(e.urls.getCardUseId.format({ + cardTemplateDispatchId: t.data.cardTemplateDispatchId + }), { + header: { + token: e.globalData.token + } + }).then(function(a) { + t.setData({ + cardTemplateUseId: a.data.cardTemplateUseDTO.cardTemplateUseId + }), t.getCard(), t.saveCheckRecord(); + }); + }, + onLoad: function(t) { + this.setData({ + cardTemplateDispatchId: t.cardTemplateDispatchId + }), this.doLogin(); + }, + makeCall: function() { + var t = this.data.phoneTxt; + t && wx.makePhoneCall({ + phoneNumber: t + }); + }, + copyText: function(t) { + var a = t.currentTarget.dataset.text; + a && wx.setClipboardData({ + data: a, + success: function() {} + }); + }, + showBarCode: function() { + this.setData({ + isShowBarCode: !0 + }); + }, + hideBarCode: function() { + this.setData({ + isShowBarCode: !1 + }); + }, + onShareAppMessage: function(t) { + if (wx.showShareMenu({ + withShareTicket: !0, + success: function(t) { + console.log(t); + } + }), "button" == t.from) { + var a = this.buildId(); + return this.shareRecord(a), { + title: "名片分享", + path: "/pages/sharePage/sharePage?cardTemplateDispatchId=" + a, + imageUrl: this.data.shareImgUrl + }; + } + }, + getBrowCardUserList: function(t) { + var a = this; + e.http.get(e.urls.getCardBrowUserList, { + header: { + token: e.globalData.token + }, + data: { + page: "1", + rows: "7", + cardTemplateUseId: t + } + }).then(function(t) { + t.data && a.setData({ + browUserList: t.data.rows + }); + }).catch(function(t) { + console.log(t); + }); + }, + shareRecord: function(t) { + var a = this; + e.http.post(e.urls.shareRecord, { + header: { + token: e.globalData.token + }, + data: { + cardTemplateUseId: a.data.cardInfo.cardTemplateUseId, + cardTemplateDispatchParentId: a.data.cardTemplateDispatchId, + cardTemplateDispatchId: t + } + }).then(function(t) { + console.log(t.data), a.setData({ + shareRecordId: t.data.data + }); + }); + }, + buildId: function() { + for (var t = [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" ], a = "", e = 0; e < 36; e++) { + a += t[parseInt(61 * Math.random())]; + } + return a; + }, + viewImg: function(t) { + wx.previewImage({ + urls: [ t.currentTarget.dataset.url ] + }); + }, + viewVideo: function(t) { + var a = t.currentTarget.dataset.url; + wx.previewMedia({ + sources: [ { + url: a, + type: "video" + } ] + }); + }, + play: function(t) { + var a = this, e = t.currentTarget.dataset.index, s = t.currentTarget.dataset.idx, i = t.currentTarget.dataset.i, n = t.currentTarget.dataset.a, d = t.currentTarget.dataset.item; + a.data.dataList.forEach(function(t) { + t.list.forEach(function(t) { + t.list.forEach(function(t) { + "3" == t.dataType && t.valueList && t.valueList.forEach(function(t) { + t.isPlay && r.stop(), t.isPlay = !1, t.curDuration = 0, t.curDuationStr = "00:00"; + }); + }); + }); + }), d.isPlay ? r.stop() : ((r = wx.createInnerAudioContext()).src = a.data.dataList[e].list[s].list[i].valueList[n].path + ".mp3", + r.autoplay = !0, console.log(a.data.dataList[e].list[s].list[i].valueList[n].path)), + r.onPlay(function() { + console.log("onPlay"), a.data.dataList[e].list[s].list[i].valueList[n].isPlay = !0, + a.setData({ + dataList: a.data.dataList + }); + }), r.onCanplay(function(t) {}), r.onStop(function(t) { + console.log("停止播放"), a.data.dataList[e].list[s].list[i].valueList[n].isPlay = !1, + a.data.dataList[e].list[s].list[i].valueList[n].curDuration = 0, a.data.dataList[e].list[s].list[i].valueList[n].curDurationStr = "00:00", + a.setData({ + dataList: a.data.dataList + }), r.destroy(); + }), r.onEnded(function(t) { + console.log(t), console.log("播放完毕"), a.data.dataList[e].list[s].list[i].valueList[n].isPlay = !1, + a.data.dataList[e].list[s].list[i].valueList[n].curDuration = 0, a.data.dataList[e].list[s].list[i].valueList[n].curDurationStr = "00:00", + a.setData({ + dataList: a.data.dataList + }), r.destroy(); + }), r.onError(function(t) { + console.log("播放错误"), console.log(t), a.data.dataList[e].list[s].list[i].valueList[n].isPlay = !1, + a.data.dataList[e].list[s].list[i].valueList[n].curDuration = 0, a.data.dataList[e].list[s].list[i].valueList[n].curDurationStr = "00:00", + a.setData({ + dataList: a.data.dataList + }), r.destroy(); + }), r.onSeeking(function() {}), r.onWaiting(function() {}), r.onTimeUpdate(function() { + if (r.duration != 1 / 0) { + a.data.dataList[e].list[s].list[i].valueList[n].curDuration = parseInt(r.currentTime), + a.data.dataList[e].list[s].list[i].valueList[n].duration = parseInt(r.duration); + var t = parseInt(r.currentTime / 60), d = parseInt(r.currentTime % 60), o = parseInt(r.duration / 60), l = parseInt(r.duration % 60), c = t > 9 ? t : "0" + t, u = d > 9 ? d : "0" + d, h = o > 9 ? o : "0" + o, p = +l > 9 ? l : "0" + l; + a.data.dataList[e].list[s].list[i].valueList[n].curDurationStr = c + ":" + u, a.data.dataList[e].list[s].list[i].valueList[n].totalDurationStr = h + ":" + p, + a.setData({ + dataList: a.data.dataList + }); + } + }); + }, + rewind: function(t) { + var a = t.currentTarget.dataset.index, e = t.currentTarget.dataset.item, s = t.currentTarget.dataset.idx, i = t.currentTarget.dataset.a, n = t.currentTarget.dataset.i; + e.isPlay && (this.data.dataList[a].list[s].list[n].valueList[i].curDuration = this.data.dataList[a].list[s].list[n].valueList[i].curDuration - this.data.speedStep, + r.seek(this.data.dataList[a].list[s].list[n].valueList[i].curDuration), this.setData({ + dataList: this.data.dataList + })); + }, + speed: function(t) { + var a = t.currentTarget.dataset.index, e = t.currentTarget.dataset.item, s = t.currentTarget.dataset.idx, i = t.currentTarget.dataset.a, n = t.currentTarget.dataset.i; + e.isPlay && (this.data.dataList[a].list[s].list[n].valueList[i].curDuration = this.data.dataList[a].list[s].list[n].valueList[i].curDuration + this.data.speedStep, + r.seek(this.data.dataList[a].list[s].list[n].valueList[i].curDuration), this.setData({ + dataList: this.data.dataList + })); + }, + slider4change: function(t) { + t.currentTarget.dataset.index; + t.currentTarget.dataset.item.isPlay && r.seek(t.detail.value); + }, + toSaveLocalImg: function(t) { + var a = t, e = wx.env.USER_DATA_PATH + "/indexshare.png", r = a.replace(/^data:image\/\w+;base64,/, ""); + wx.getFileSystemManager().writeFileSync(e, r, "base64"), this.setData({ + shareImgUrl: e + }); + }, + goHome: function() { + wx.switchTab({ + url: "/pages/index/index" + }); + }, + showDetail: function(t) { + if (-1 != t.currentTarget.dataset.ctype.indexOf("dda5007c-5fb7-48f2-8537-3cb8ea298242")) { + var a = t.currentTarget.dataset.cid, e = t.currentTarget.dataset.id; + wx.navigateTo({ + url: "../moments/momentsdetail/momentsdetail?uId=" + e + "&cId=" + a + }); + } + }, + showMore: function(t) { + var a = t.currentTarget.dataset.item; + if ("2" == a.mode) { + var e = t.currentTarget.dataset.userid, r = t.currentTarget.dataset.idx; + wx.navigateTo({ + url: "../../pages/moments/showlist/showlist?id=" + a.cId + "&userId=" + e + "&index=" + r + }); + } + }, + onChange: function(t) { + this.setData({ + active: t.detail + }); + } +}); \ No newline at end of file diff --git a/packagecard/sharePage/sharePage.json b/packagecard/sharePage/sharePage.json new file mode 100644 index 0000000..91de62c --- /dev/null +++ b/packagecard/sharePage/sharePage.json @@ -0,0 +1,24 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + } +} \ No newline at end of file diff --git a/packagecard/sharePage/sharePage.wxml b/packagecard/sharePage/sharePage.wxml new file mode 100755 index 0000000..c397d7c --- /dev/null +++ b/packagecard/sharePage/sharePage.wxml @@ -0,0 +1,220 @@ + + + + + + + {{item.templateAreaFontValue}} + + + + + + + + + + + 加入卡包 + + + + 名片码 + + + + + + + 电话 + {{phoneTxt}} + + + + + + 微信 + {{wechateTxt}} + + + + + + 邮箱 + {{emailTxt}} + + + + + + 地址 + {{addressTxt}} + + + + + + + + + + + + + + {{cardInfo.cardTemplateUseScansNumber>999?'999+':cardInfo.cardTemplateUseScansNumber}} + + + + {{cardInfo.cardTemplateUseDispatchNumber>999?'999+':cardInfo.cardTemplateUseDispatchNumber}} + + + + + + + + + + + {{item.name}} + + + 更多 + + + + + + + + {{child.value}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{audio.curDurationStr}} + + {{audio.totalDurationStr}} + + + + + + + + + + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + + + {{child.comment}}: + {{child.selValue}} + + + + + + + + + {{child.comment}} + + + + {{ss.dataName}} + + + + 详情 > + + + + + + + + + + + + + + + + + 一段话 + + 有可能还会与其他内容重叠。元素的背景会延伸穿过内边距。不允许指定负边距值。 + + + + + + + + 首页 + 服务 + diff --git a/packagecard/sharePage/sharePage.wxss b/packagecard/sharePage/sharePage.wxss new file mode 100755 index 0000000..fd1e289 --- /dev/null +++ b/packagecard/sharePage/sharePage.wxss @@ -0,0 +1,585 @@ +page { + background: #f7f7f7; +} + +.card-container { + box-sizing: border-box; + height: 0; +} + +.share-btn { + background: #eee; +} + +.card { + background: #fff; + box-sizing: border-box; + height: 0; + overflow: hidden; + position: relative; + width: 100%; +} + +.area-box { + white-space: nowrap; + word-break: break-all; +} + +.card-bgImg { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.person { + padding: 20rpx; +} + +.dynamic-container { + background-color: #fff; + border-radius: 20rpx; + margin-top: -50rpx; + padding: 20rpx; + position: relative; +} + +.dynamic-title image { + height: 30rpx; + margin-top: -4rpx; + vertical-align: middle; + width: 30rpx; +} + +.catelog-title { + justify-content: space-between; + position: relative; +} + +.catelog-title,.catelog-title .action { + align-items: center; + display: flex; +} + +.catelog-title .action { + justify-content: center; + max-width: 100%; + padding-right: 30rpx; +} + +.title { + background: #0054bd; + border-top-left-radius: 48rpx; + border-top-right-radius: 48rpx; + color: #fff; + display: inline-block; + font-size: 30rpx; + margin-bottom: -50rpx; + padding: 10rpx 60rpx 60rpx 10rpx; + position: relative; +} + +.title text { + margin-left: 20rpx; +} + +.column-box,.column-content { + background-color: #fff; + display: flex; + flex-direction: column; + width: 100%; +} + +.column-content { + border-radius: 48rpx; + box-shadow: 0 2px 2px #f0f0f0; + padding: 10rpx 20rpx 40rpx; + z-index: 2; +} + +.intro-title image,.serve-title image { + height: 30rpx; + margin-top: -4px; + vertical-align: middle; + width: 28rpx; +} + +.person-content { + background: #fff; + border-radius: 20rpx; + color: #000; + font-size: 30rpx; + letter-spacing: 2rpx; + line-height: 40rpx; + margin-top: -30rpx; + padding: 20rpx; + position: relative; + word-break: break-all; +} + +.company-title { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; +} + +.company-title image { + height: 140rpx; + width: 140rpx; +} + +.company-name { + align-items: center; + display: flex; + font-size: 34rpx; + height: 140rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 520rpx; +} + +.company-content { + background: #fff; + border-radius: 20rpx; + margin-top: -30rpx; + padding: 20rpx; + position: relative; +} + +.company-content image { + border-radius: 20rpx; + height: 300rpx; + width: 100%; +} + +.company .person-content { + margin-top: 0; +} + +.dynamic-title { + display: block; + margin: 0 auto; + width: 710rpx; +} + +.dynamic-box { + background: #fff; + border-radius: 20rpx; + height: 400rpx; + margin-bottom: 20rpx; + overflow: hidden; + position: relative; +} + +.dynamic-box image { + height: 400rpx; + width: 100%; +} + +.dynamic-text { + background: rgba(0,0,0,.6); + bottom: 0; + color: #fff; + font-size: 30rpx; + left: 0; + line-height: 60rpx; + padding: 0 10rpx; + position: absolute; + right: 0; +} + +.person-info { + border-bottom: 1px solid #eee; + display: flex; + justify-content: space-between; + padding-bottom: 20rpx; +} + +.avatar { + border-radius: 50%; + height: 120rpx; + overflow: hidden; + width: 120rpx; +} + +.avatar image { + height: 100%; + width: 100%; +} + +.person-name { + width: 530rpx; +} + +.name { + color: #000; + font-size: 32rpx; + margin: 15rpx 0 10rpx; +} + +.time { + color: #b2b2b2; +} + +.dynamic-content { + margin: 20rpx 0; +} + +.dynamic-img { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + position: relative; +} + +.dynamic-img image { + height: 160rpx; + margin-bottom: 10rpx; + margin-right: 2%; + width: 32%; +} + +.dynamic-img image:nth-child(3n) { + margin-right: 0; +} + +.dynamic-img-text { + background: rgba(0,0,0,.6); + bottom: 3rpx; + color: #fff; + font-size: 32rpx; + left: 0; + line-height: 70rpx; + padding: 0 20rpx; + position: absolute; + right: 0; +} + +.dynamic-good { + display: flex; + justify-content: space-between; + margin: 10rpx 0; +} + +.good-count { + color: #333; + font-size: 28rpx; +} + +.good-btn image { + height: 40rpx; + vertical-align: top; + width: 40rpx; +} + +.dynamic-reply { + background: #eee; + margin-top: 15rpx; + padding: 15rpx; +} + +.reply { + color: #000; + font-size: 32rpx; + margin-bottom: 5rpx; +} + +.reply-name { + display: inline; + font-weight: 700; +} + +.dynamic-reply-input { + margin-top: 10rpx; +} + +.dynamic-reply-input input { + border-bottom: 1px solid #eee; + height: 60rpx; + width: 100%; +} + +.creat-card { + align-items: center; + background: #0054bd; + border-radius: 50%; + bottom: 20rpx; + box-sizing: border-box; + flex-direction: column; + height: 140rpx; + justify-content: center; + padding: 20rpx; + position: fixed; + right: 20rpx; + width: 140rpx; + z-index: 100; +} + +.creat-card image { + height: 60rpx; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 80rpx; +} + +.share-save { + display: flex; + justify-content: space-between; + text-align: center; +} + +.share-btn { + background: none; + color: #1296db; +} + +.save-btn,.share-btn { + border: 1px solid #1296db; + font-weight: 400; +} + +.save-btn { + background: #1296db; + color: #fff; +} + +.bottom-btn { + margin-top: 20rpx; + padding: 0 20rpx; + white-space: nowrap; + width: 100%; +} + +.phone-box .icon { + height: 30rpx; + vertical-align: top; + width: 30rpx; +} + +.wechate-box .icon { + height: 30rpx; + vertical-align: top; + width: 35rpx; +} + +.email-box .icon { + height: 30rpx; + vertical-align: top; + width: 30rpx; +} + +.bottom-btn-box { + border: 1px solid #ddd; + border-radius: 10rpx; + box-sizing: border-box; + display: inline-block; + line-height: 30rpx; + margin-right: 10rpx; + min-width: 32%; + padding: 20rpx; +} + +.bottom-text { + margin-top: 10rpx; +} + +.top-box { + background-color: #f7f7f7; +} + +.good,.top-box { + padding-bottom: 20rpx; +} + +.good { + background-color: #fff; + display: flex; + justify-content: space-between; + padding-left: 20rpx; +} + +.good-avatar,.good-click { + color: #333; + line-height: 45rpx; +} + +.good-click { + display: flex; +} + +.view-count { + border-right: 1px solid grey; +} + +.view-count,.view-count-no { + color: grey; + display: flex; + flex-direction: row; + font-size: 36rpx; + margin-right: 30rpx; + padding-right: 30rpx; +} + +.view-count-no { + align-items: center; +} + +.good-avatar image { + height: 100%; + width: 100%; +} + +.good-click image { + height: 38rpx; + width: 38rpx; +} + +.view-count image,.view-count-no image { + height: 32rpx; + width: 32rpx; +} + +.avatar-list { + display: inline-block; + height: 45rpx; + margin-right: 10rpx; + vertical-align: top; + width: 45rpx; +} + +.mid { + background: #0054bd; + border-top-left-radius: 60rpx; + border-top-right-radius: 60rpx; + margin-top: -20rpx; + padding: 40rpx 0 80rpx; + position: relative; +} + +.mid,.mid-box { + display: flex; +} + +.mid-box { + align-items: center; + background: none; + border-right: 1px solid #2f82ea; + flex: 1; + flex-direction: column; + font-weight: 400; + justify-content: center; + padding: 0!important; + width: auto!important; +} + +.mid-box:last-child { + border: none; +} + +.mid-box image { + height: 60rpx; + margin-bottom: 20rpx; + width: 60rpx; +} + +.mid-box-text { + color: #fff; + font-size: 30rpx; +} + +.mid-btn { + background: #fff; + border-top-left-radius: 60rpx; + border-top-right-radius: 60rpx; + flex-wrap: wrap; + margin-top: -60rpx; + padding: 30rpx; + position: relative; +} + +.mid-btn,.mid-btn-box { + display: flex; + justify-content: space-between; +} + +.mid-btn-box { + background: #eee; + border-radius: 20rpx; + box-sizing: border-box; + flex-shrink: 0; + margin-bottom: 20rpx; + padding: 15rpx; + width: 49%; +} + +.mid-btn-box:nth-child(3),.mid-btn-box:nth-child(4) { + margin-bottom: 0; +} + +.mid-btn-box image { + height: 80rpx; + width: 80rpx; +} + +.mid-btn-text { + width: 200rpx; +} + +.text-top { + color: #000; + font-size: 30rpx; + line-height: 45rpx; +} + +.text-bottom { + color: #898989; + font-size: 26rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.bar-code { + background: rgba(0,0,0,.6); + bottom: 0; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 999; +} + +.bar-code .content { + align-items: center; + background: #fff; + border-radius: 10rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + left: 50%; + max-width: 96%; + min-height: 50%; + min-width: 80%; + padding: 20rpx; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.code-title { + font-weight: 700; +} + +.code-title,.code-txt { + color: #000; + font-size: 32rpx; +} + +.bar-code image { + height: 300rpx; + width: 300rpx; +} \ No newline at end of file diff --git a/pages/card/cardDetail.js b/pages/card/cardDetail.js new file mode 100644 index 0000000..670ec32 --- /dev/null +++ b/pages/card/cardDetail.js @@ -0,0 +1,105 @@ +var a = getApp(); + +Page({ + data: { + token: a.globalData.token, + serviceUrl: a.baseUrls.serviceUrl, + baseImgUrl: a.baseUrls.baseImgUrl, + cardType: "", + realName: "张三", + intro: "简介简介简介简介简介简介简介简介简介", + phone: "0471-3360077", + address: "呼和浩特市新城区", + qrCode: "", + photo: "" + }, + onLoad: function(a) { + this.setData({ + cardType: a.type + }); + }, + choosePhoto: function() { + var e = this; + wx.chooseImage({ + count: 1, + sourceType: [ "album", "camera" ], + success: function(t) { + wx.showToast({ + title: "上传中", + icon: "loading" + }); + var o = t.tempFiles[0].path; + a.restAjax.file(a.restAjax.path(a.apis.uploadImg, [ a.baseUrls.serviceUrl ]), o, "image", { + headers: { + token: a.globalData.token + } + }, function(a, t) { + if ("200" == a) { + var o = JSON.parse(t).data; + e.setData({ + photo: o + }), wx.hideToast(); + } + }, function(a, e) { + console.log(e); + }); + } + }); + }, + chooseQrCode: function() { + var e = this; + wx.chooseImage({ + count: 1, + sourceType: [ "album", "camera" ], + success: function(t) { + wx.showToast({ + title: "上传中", + icon: "loading" + }); + var o = t.tempFiles[0].path; + a.restAjax.file(a.restAjax.path(a.apis.uploadImg, [ a.baseUrls.serviceUrl ]), o, "image", { + headers: { + token: a.globalData.token + } + }, function(a, t) { + if ("200" == a) { + var o = JSON.parse(t).data; + e.setData({ + qrCode: o + }), wx.hideToast(); + } + }, function(a, e) { + console.log(e); + }); + } + }); + }, + submitCreate: function() { + var e = { + address: this.data.address, + job: this.data.intro, + realName: this.data.realName, + photo: this.data.photo, + qrCode: this.data.qrCode, + templateId: this.data.cardType + }; + a.restAjax.post(a.restAjax.path(a.apis.submitCreateCard, [ a.baseUrls.requestUrl ]), e, { + headers: { + token: a.globalData.token + } + }, function(a, e) { + "200" == a && wx.showToast({ + title: "创建成功!" + }); + }, function(a, e) { + console.log(e); + }); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/card/cardDetail.json b/pages/card/cardDetail.json new file mode 100644 index 0000000..df4a807 --- /dev/null +++ b/pages/card/cardDetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "创建名片" +} \ No newline at end of file diff --git a/pages/card/cardDetail.wxml b/pages/card/cardDetail.wxml new file mode 100644 index 0000000..2266d28 --- /dev/null +++ b/pages/card/cardDetail.wxml @@ -0,0 +1,62 @@ + + + + + + + {{realName}} + {{intro}} ... + + {{phone}} + + {{address}} + + + + + + + 编辑名片 + + 姓名: + + + + + + 简介: + + + + + + 电话: + + + + + + 位置: + + + + + + 照片: + + + + + + + + 二维码: + + + + + + + + + + 创建名片 + diff --git a/pages/card/cardDetail.wxss b/pages/card/cardDetail.wxss new file mode 100644 index 0000000..fcd103f --- /dev/null +++ b/pages/card/cardDetail.wxss @@ -0,0 +1,142 @@ +.container { + margin-bottom: 120rpx; +} + +.card { + background-color: #fff; + height: 0; + padding-bottom: 56%; + position: relative; + width: 100%; +} + +.photo { + bottom: 0; + left: 20rpx; + position: absolute; + top: 0; +} + +.photo image { + height: 100%; +} + +.name { + font-size: 36rpx; + font-weight: 700; + top: 40rpx; +} + +.desc,.name { + left: 340rpx; + position: absolute; +} + +.desc { + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + display: -webkit-box; + font-size: 30rpx; + overflow: hidden; + top: 125rpx; +} + +.phone { + bottom: 60rpx; + color: #a8a8a8; + font-size: 28rpx; + left: 340rpx; + line-height: 30rpx; + position: absolute; +} + +.phone image { + height: 30rpx; + margin-top: -8rpx; + vertical-align: middle; + width: 30rpx; +} + +.position { + bottom: 20rpx; +} + +.qr-code { + bottom: 30rpx; + height: 60rpx; + position: absolute; + right: 24rpx; + width: 60rpx; +} + +.qr-code image { + height: 100%; + width: 100%; +} + +.edite-card { + background-color: #fff; + margin-top: 20rpx; + padding: 20rpx; +} + +.title { + font-size: 32rpx; + margin-bottom: 15rpx; +} + +.card-row { + border-top: 1px solid #ddd; + display: flex; + justify-content: space-between; + padding: 15rpx 0; +} + +.row-name { + font-size: 32rpx; + width: 30%; +} + +.row-content { + text-align: right; + width: 70%; +} + +.row-content input { + font-size: 32rpx; + width: 100%; +} + +.add-photo { + border: 1px solid #a1a1a1; + border-radius: 10rpx; + display: inline-block; + font-size: 60rpx; + font-weight: 400; + height: 100rpx; + line-height: 100rpx; + text-align: center; + width: 100rpx; +} + +.create-card { + background-color: #fff; + bottom: 0; + left: 0; + padding: 20rpx; + position: fixed; + right: 0; +} + +.create-btn { + background-color: #ff4949; + border-radius: 40rpx; + color: #fff; + font-size: 32rpx; + line-height: 60rpx; + text-align: center; +} + +.photo-img,.qrCode-img { + width: 200rpx; +} \ No newline at end of file diff --git a/pages/card/cardList.js b/pages/card/cardList.js new file mode 100644 index 0000000..659ea8e --- /dev/null +++ b/pages/card/cardList.js @@ -0,0 +1,17 @@ +Page({ + data: {}, + checkDetail: function(n) { + var o = n.currentTarget.dataset.type; + wx.navigateTo({ + url: "./cardDetail?type=" + o + }); + }, + onLoad: function(n) {}, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/card/cardList.json b/pages/card/cardList.json new file mode 100644 index 0000000..81c0032 --- /dev/null +++ b/pages/card/cardList.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "名片" +} \ No newline at end of file diff --git a/pages/card/cardList.wxml b/pages/card/cardList.wxml new file mode 100644 index 0000000..9f64ee4 --- /dev/null +++ b/pages/card/cardList.wxml @@ -0,0 +1,6 @@ + + + + 名片模板 + + diff --git a/pages/card/cardList.wxss b/pages/card/cardList.wxss new file mode 100644 index 0000000..600c5b1 --- /dev/null +++ b/pages/card/cardList.wxss @@ -0,0 +1,13 @@ +.card-box { + background-color: #fff; + margin-bottom: 20rpx; +} + +.card-box image { + width: 100%; +} + +.card-name { + font-size: 32rpx; + padding: 15rpx; +} \ No newline at end of file diff --git a/pages/center/case/caseHandle.js b/pages/center/case/caseHandle.js new file mode 100644 index 0000000..d2359f1 --- /dev/null +++ b/pages/center/case/caseHandle.js @@ -0,0 +1,266 @@ +var t = getApp(); + +require("../../../utils/WSCoordinate.js"); + +Page({ + data: { + reportId: "", + baseUrl: t.baseUrls.serviceUrl, + imgUrl: t.baseUrls.baseImgUrl, + sourceUrl: t.baseUrls.sourceUrl, + handleSummary: "", + handleImg: [], + markers: [], + caseDetail: {}, + content: "", + videoId: "", + handleDetail: {} + }, + getDetail: function() { + var e = this; + t.restAjax.get(t.restAjax.path(t.apis.myCaseDetail, [ t.baseUrls.requestUrl, e.data.reportId ]), {}, { + headers: { + token: t.globalData.token + } + }, function(t, a) { + a.reportPhotos ? a.reportPhotos = a.reportPhotos.split(",") : a.reportPhotos = [], + "1" == a.handleStatus && e.getHandleList(); + var o = [ { + iconPath: e.data.sourceUrl + "marker_red.png", + id: 1, + latitude: a.reportLat, + longitude: a.reportLng, + width: "30", + height: "30" + } ]; + e.setData({ + caseDetail: a, + markers: o + }); + }, function(t, e) { + console.log(e); + }); + }, + playRecord: function() { + var t = wx.createInnerAudioContext(); + t.src = this.data.caseUrl + this.data.imgUrl + this.data.caseDetail.reportAudio, + t.play(); + }, + handleCase: function() { + for (var e, a = 0; a < this.data.handleImg.length; a++) 0 == a ? e = this.data.handleImg[a] : e += "," + this.data.handleImg[a]; + var o = { + handleSummary: this.data.handleSummary, + taskId: this.data.reportId, + handlePhotos: e + }; + t.restAjax.post(t.restAjax.path(t.apis.handleCase, [ t.baseUrls.caseUrl ]), o, { + headers: { + token: t.globalData.token + } + }, function(t, e) { + console.log(e); + }, function(t, e) { + console.log(e); + }); + }, + uploadImage: function() { + var e = this; + wx.chooseImage({ + count: 9 - e.data.handleImg.length, + sourceType: [ "album", "camera" ], + success: function(a) { + wx.showToast({ + title: "上传中", + icon: "loading" + }); + for (var o = 0; o < a.tempFiles.length; o++) { + var s = a.tempFiles[o].path; + t.restAjax.file(t.restAjax.path(t.apis.uploadImg, [ t.baseUrls.caseUrl ]), s, "image", { + headers: { + token: t.globalData.token + } + }, function(t, a) { + if ("200" == t) { + console.log(a); + var o = JSON.parse(a).data, s = e.data.handleImg; + s.push(o), e.setData({ + handleImg: s + }), wx.hideToast(); + } + }, function(t, e) { + console.log(e); + }); + } + } + }); + }, + deleteSource: function(t) { + var e = t.currentTarget.dataset.cur; + this.data.handleImg.splice(e, 1), this.setData({ + handleImg: this.data.handleImg + }); + }, + previewImg: function(t) { + var e = t.currentTarget.dataset.src; + wx.previewImage({ + current: e, + urls: this.data.caseDetail.reportPhotos + }); + }, + acceptance: function() { + for (var e = this, a = e.data.caseDetail, o = "", s = 0; s < a.reportPhotos.length; s++) s < a.reportPhotos.length - 1 ? o += a.reportPhotos[s] + "," : o += a.reportPhotos[s]; + a.reportPhotos = o, a.isAccept = "1", t.restAjax.put(t.restAjax.path(t.apis.updateCaseStatus, [ t.baseUrls.requestUrl, e.data.reportId ]), a, { + headers: { + token: t.globalData.token + } + }, function(t, a) { + "200" == t && (wx.showToast({ + title: "受理成功", + icon: "success" + }), e.getDetail()); + }, function(t, e) { + console.log(e); + }); + }, + notAcceptance: function() { + var e = this; + wx.showModal({ + cancelColor: "cancelColor", + content: "确认不予受理该事件?", + success: function(a) { + if (a.confirm) { + for (var o = e.data.caseDetail, s = "", n = 0; n < o.reportPhotos.length; n++) n < o.reportPhotos.length - 1 ? s += o.reportPhotos[n] + "," : s += o.reportPhotos[n]; + o.reportPhotos = s, console.log(o), o.isAccept = "-1", t.restAjax.put(t.restAjax.path(t.apis.updateCaseStatus, [ t.baseUrls.requestUrl, e.data.reportId ]), o, { + headers: { + token: t.globalData.token + } + }, function(t, a) { + "200" == t && (wx.showToast({ + title: "不予受理成功", + icon: "success" + }), e.getDetail()); + }, function(t, e) { + console.log(e); + }); + } + } + }); + }, + uploadVideo: function() { + var e = this; + wx.chooseVideo({ + sourceType: [ "album", "camera" ], + maxDuration: 60, + camera: "back", + success: function(a) { + wx.showToast({ + title: "上传中", + icon: "loading" + }); + var o = a.tempFilePath; + t.restAjax.file(t.restAjax.path(t.apis.uploadVideo, [ t.baseUrls.caseUrl ]), o, "video", { + headers: { + token: t.globalData.token + } + }, function(t, a) { + if ("200" == t) { + var o = JSON.parse(a).data; + e.setData({ + videoId: o + }), wx.hideToast(); + } + }, function(t, e) { + console.log(e); + }); + } + }); + }, + deleteVideo: function() { + this.setData({ + videoId: "" + }); + }, + handleComplete: function() { + if (this.data.content) { + for (var e = "", a = 0; a < this.data.handleImg.length; a++) a < this.data.handleImg.length - 1 ? e += this.data.handleImg[a] + "," : e += this.data.handleImg[a]; + var o = { + content: this.data.content, + photo: e, + reportId: this.data.reportId, + video: this.data.videoId + }; + t.restAjax.post(t.restAjax.path(t.apis.handleCase, [ t.baseUrls.requestUrl ]), o, { + headers: { + token: t.globalData.token + } + }, function(t, e) { + "200" == t && (wx.showToast({ + title: "处理成功!", + icon: "success" + }), setTimeout(function() { + wx.navigateBack({ + delta: 1 + }); + }, 1500)); + }, function(t, e) { + console.log(e); + }); + } else wx.showToast({ + title: "请输入事件处理说明", + icon: "error" + }); + }, + getHandleList: function() { + var e = this; + t.restAjax.get(t.restAjax.path(t.apis.getHandleList, [ t.baseUrls.requestUrl ]), { + reportId: e.data.reportId + }, { + headers: { + token: t.globalData.token + } + }, function(t, a) { + a[0].photo && (a[0].photo = a[0].photo.split(",")), e.setData({ + handleDetail: a[0] + }); + }, function(t, e) { + console.log(e); + }); + }, + caseRedundancies: function() { + var e = this; + wx.showModal({ + cancelColor: "cancelColor", + content: "确认转派该事件?", + success: function(a) { + a.confirm && t.restAjax.put(t.restAjax.path(t.apis.caseRedundancies, [ t.baseUrls.requestUrl, e.data.reportId ]), {}, { + headers: { + token: t.globalData.token + } + }, function(t, e) { + "200" == t && (wx.showToast({ + title: "转派成功!", + icon: "success" + }), setTimeout(function() { + wx.navigateBack({ + delta: 1 + }); + }, 1500)); + }, function(t, e) { + console.log(e); + }); + } + }); + }, + onLoad: function(t) { + this.setData({ + reportId: t.reportId + }), this.getDetail(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/center/case/caseHandle.json b/pages/center/case/caseHandle.json new file mode 100644 index 0000000..0abcd32 --- /dev/null +++ b/pages/center/case/caseHandle.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "事件详情" +} \ No newline at end of file diff --git a/pages/center/case/caseHandle.wxml b/pages/center/case/caseHandle.wxml new file mode 100644 index 0000000..a8e0eaf --- /dev/null +++ b/pages/center/case/caseHandle.wxml @@ -0,0 +1,117 @@ + + 基本信息 + + + * 事件类型 + {{caseDetail.caseTypeName1}} + + + + * 事件类型 + {{caseDetail.caseTypeName2}} + + + + * 事发地区 + {{caseDetail.reportAreaName}} + + + + * 事发位置 + {{caseDetail.reportLng}},{{caseDetail.reportLat}} + + + + + + + 详细信息 + + + * 事件说明 + + + + + + 事件图片 + + + + + + + + 视频 + + + + + + + 录音 + 播放录音 + + + + 事件处理 + + + * 事件处理说明 + + + + + + 事件处理图片 + + + + + + + + + + + 事件处理视频 + + + + + + + + + + + 处理完成 + 转派 + 受理 + 不予受理 + + + + 事件处理 + + + * 事件处理说明 + + + + + + 事件处理图片 + + + + + + + + 事件处理视频 + + + + + + + diff --git a/pages/center/case/caseHandle.wxss b/pages/center/case/caseHandle.wxss new file mode 100644 index 0000000..2cffc98 --- /dev/null +++ b/pages/center/case/caseHandle.wxss @@ -0,0 +1,360 @@ +page { + background-color: #fafafa; +} + +.report { + background-color: #fff; + border-radius: 10rpx; + box-shadow: 0 2px 8px 0 rgba(35,24,21,.1); + box-sizing: border-box; + margin: 20rpx auto; + padding: 20rpx 30rpx; + width: 710rpx; +} + +.title { + color: #333; + font-size: 36rpx; + margin-bottom: 20rpx; +} + +.title text { + color: red; +} + +.row { + background-color: #f2f1f6; + border-radius: 10rpx; + display: flex; + flex-wrap: wrap; + font-size: 32rpx; + justify-content: space-between; + margin-bottom: 15rpx; + padding: 15rpx; +} + +.row:last-child { + margin-bottom: 0; +} + +.row-name { + border-right: 1px solid #9b9a9f; + flex-shrink: 0; + height: 40rpx; + width: 200rpx; +} + +.row-name text { + color: red; +} + +.row-main { + flex-shrink: 0; + text-align: right; + width: 410rpx; + word-break: break-all; +} + +.submit { + background: #fff; + bottom: 0; + display: flex; + justify-content: space-between; + left: 0; + padding: 20rpx; + position: fixed; + right: 0; +} + +.submit-btn { + background-color: #118aff; + border-radius: 10rpx; + color: #fff; + flex-shrink: 0; + font-size: 36rpx; + height: 80rpx; + line-height: 80rpx; + text-align: center; + width: 32%; +} + +.btn2 { + background-color: #56b6de; +} + +.btn3 { + background-color: #d70715; +} + +.file { + background-color: #fff; + box-shadow: 0 2px 8px 0 rgba(35,24,21,.1); + box-sizing: border-box; + margin: 0 auto 20rpx; + padding: 20rpx 30rpx; + width: 710rpx; +} + +.file,.file-box { + border-radius: 10rpx; +} + +.file-box { + background-color: #f2f1f6; + margin-bottom: 20rpx; + padding: 15rpx; +} + +.file-box:last-child { + margin-bottom: 0; +} + +.file-title { + font-size: 30rpx; +} + +.file-title text { + color: red; +} + +.file-content { + font-size: 0; + margin-top: 10rpx; +} + +.img-box1 { + display: inline-block; + height: 155rpx; + margin-bottom: 10rpx; + margin-right: 2%; + overflow: hidden; + text-align: center; + vertical-align: top; + width: 32%; +} + +.img-box1 image { + height: 100%; +} + +.file-content image:nth-child(3n) { + margin-right: 0; +} + +.file-content textarea { + font-size: 30rpx; + height: 150rpx; + width: 100%; +} + +.upload-btn { + border: 2px solid #333; + border-radius: 10rpx; + display: inline-block; + font-size: 60rpx; + height: 100rpx; + line-height: 100rpx; + text-align: center; + vertical-align: top; + width: 100rpx; +} + +.voice-box { + display: flex; + justify-content: space-between; + padding: 0; +} + +.voice-box image { + margin-top: -7rpx; + vertical-align: middle; + width: 35rpx; +} + +.voice-title { + font-size: 30rpx; + line-height: 80rpx; + margin-left: 15rpx; +} + +.record-btn { + background-color: #118aff; + color: #fff; + line-height: 80rpx; + padding: 0 15rpx; +} + +.delay,.record-btn { + border-radius: 10rpx; +} + +.delay { + background-color: #fff; + box-shadow: 0 2px 8px 0 rgba(35,24,21,.1); + box-sizing: border-box; + margin: 0 auto 20rpx; + padding: 20rpx 30rpx; + width: 710rpx; +} + +.delay-box { + background-color: #f2f1f6; + padding: 20rpx; +} + +.delay-content { + background-color: #fff; + border-radius: 10rpx; + margin-bottom: 20rpx; + padding: 20rpx; +} + +.delay-content:last-child { + margin-bottom: 0; +} + +.delay-top { + border-bottom: 1px dashed #eee; + padding-bottom: 15rpx; +} + +.delay-reason { + color: #333; + display: flex; + font-size: 32rpx; + justify-content: space-between; +} + +.reason { + line-height: 60rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 65%; +} + +.delay-status { + border-radius: 30rpx; + padding: 10rpx 15rpx; +} + +.status1 { + background-color: #fce8e1; + color: #ec0400; +} + +.status2 { + background-color: #e9f2ff; + color: #0fa6ff; +} + +.delay-text { + color: #333; + font-size: 30rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.delay-bottom { + color: #0e89ff; + font-size: 30rpx; + margin-top: 10rpx; +} + +.delay-bottom image { + margin-top: -7rpx; + vertical-align: middle; + width: 40rpx; +} + +.handle { + background-color: #fff; + border-radius: 10rpx; + box-shadow: 0 2px 8px 0 rgba(35,24,21,.1); + box-sizing: border-box; + margin: 0 auto 130rpx; + padding: 20rpx 30rpx; + width: 710rpx; +} + +.handle-box { + background-color: #f2f1f6; + border-radius: 10rpx; + margin-bottom: 20rpx; + padding: 15rpx; +} + +.handle-box textarea { + height: 150rpx; + width: 100%; +} + +.handle-img .upload-btn { + flex-shrink: 0; + height: 100rpx; + vertical-align: top; + width: 100rpx; +} + +.img-box { + display: inline-block; + height: 100rpx; + margin-right: 2%; + position: relative; + text-align: center; + width: 32%; +} + +.delete { + height: 35rpx!important; + position: absolute; + right: -18rpx; + top: -18rpx; + width: 35rpx!important; +} + +.img-box:nth-child(3n) { + margin-right: 0; +} + +.img-box image { + height: 100rpx; + width: 100%; +} + +.map { + margin-top: 10rpx; +} + +.map,.map map { + width: 100%; +} + +.handle-btn { + display: flex; + justify-content: space-between; +} + +.handle-btn-box { + background-color: #f55054; + border-radius: 10rpx; + color: #fff; + flex-shrink: 0; + line-height: 60rpx; + margin-right: 2%; + text-align: center; + width: 49%; +} + +.handle-btn-box:last-child { + margin-right: 0; +} + +.video-box { + position: relative; +} + +.video-box video { + width: 100%; +} \ No newline at end of file diff --git a/pages/center/case/caseList.js b/pages/center/case/caseList.js new file mode 100644 index 0000000..5f6bc80 --- /dev/null +++ b/pages/center/case/caseList.js @@ -0,0 +1,81 @@ +var t = require("../../../@babel/runtime/helpers/defineProperty"), e = getApp(); + +Page({ + data: { + sourceUrl: e.baseUrls.sourceUrl, + page: { + page: 1, + rows: 10, + isAccpet: "", + handleStatus: "", + areaCode: wx.getStorageSync("areaCode") + }, + baseUrl: e.baseUrls.caseUrl, + imgUrl: e.baseUrls.baseImgUrl, + caseList: [] + }, + getList: function() { + var a = this; + e.restAjax.get(e.restAjax.path(e.apis.myCaseList, [ e.baseUrls.requestUrl ]), a.data.page, { + headers: { + token: e.globalData.token + } + }, function(e, s) { + if (s.rows.length > 0) { + for (var o = a.data.caseList, i = 0; i < s.rows.length; i++) s.rows[i].reportPhotos && (s.rows[i].reportPhotos = s.rows[i].reportPhotos.split(",")[0]), + o.push(s.rows[i]); + a.setData({ + caseList: o + }); + } else wx.showToast({ + title: "暂无更多", + icon: "none" + }), a.setData(t({}, "page.page", a.data.page.page - 1)); + console.log(s); + }, function(t, e) { + console.log(e); + }); + }, + goDetail: function(t) { + var e = t.currentTarget.dataset.id; + wx.navigateTo({ + url: "./caseHandle?reportId=" + e + }); + }, + checkLog: function(t) { + var e = t.currentTarget.dataset.log; + wx.navigateTo({ + url: "./caseLog?businessId=" + e + }); + }, + doEvaluate: function(t) { + wx.navigateTo({ + url: "../evaluate/evaluate?reportId=" + t.currentTarget.dataset.id + }); + }, + onLoad: function(e) { + console.log(e.isAccept), "0" != e.isAccept && "1" != e.isAccept || (this.setData(t({}, "page.isAccept", e.isAccept)), + "0" == e.isAccept ? wx.setNavigationBarTitle({ + title: "待受理" + }) : wx.setNavigationBarTitle({ + title: "已受理" + })), "3" == e.isAccept && wx.setNavigationBarTitle({ + title: "我的收藏" + }), e.handleStatus && (this.setData(t({}, "page.handleStatus", "2")), wx.setNavigationBarTitle({ + title: "已完结" + })); + }, + onReady: function() {}, + onShow: function() { + this.setData({ + caseList: [] + }), this.getList(); + }, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() { + this.setData(t({}, "page.page", this.data.page.page + 1)), this.getList(); + }, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/center/case/caseList.json b/pages/center/case/caseList.json new file mode 100644 index 0000000..fd36624 --- /dev/null +++ b/pages/center/case/caseList.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "我的上报" +} \ No newline at end of file diff --git a/pages/center/case/caseList.wxml b/pages/center/case/caseList.wxml new file mode 100644 index 0000000..9196484 --- /dev/null +++ b/pages/center/case/caseList.wxml @@ -0,0 +1,23 @@ + + + + + + + + + + + {{item.caseTypeName1}} + {{item.caseStatus}} + + 编码:{{item.reportCode}} + 上报时间:{{item.gmtCreate}} + 处理结果:{{item.reportResultText}} + + + + + {{item.reportAreaName}} + + diff --git a/pages/center/case/caseList.wxss b/pages/center/case/caseList.wxss new file mode 100644 index 0000000..402bccc --- /dev/null +++ b/pages/center/case/caseList.wxss @@ -0,0 +1,127 @@ +page { + background-color: #fafafa; +} + +.list { + padding: 20rpx; +} + +.case-box { + background-color: #fff; + border-radius: 12rpx; + box-shadow: 0 2px 8px 0 rgba(35,24,21,.1); + margin-bottom: 20rpx; + padding: 20rpx 30rpx; +} + +.top { + border-bottom: 1px dashed #ddd; + display: flex; + justify-content: space-between; + padding-bottom: 20rpx; +} + +.case-img { + height: 120rpx; + overflow: hidden; + text-align: center; + width: 120rpx; +} + +.case-img image { + border-radius: 10rpx; + height: 100%; +} + +.case-info { + display: inline-flex; + width: 510rpx; +} + +.case-text-box { + width: 100%; +} + +.case-title { + display: flex; + justify-content: space-between; +} + +.case-title-text { + font-size: 34rpx; + font-weight: 700; +} + +.case-text,.case-title-text { + color: #333; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.case-text { + font-size: 28rpx; +} + +.case-status { + width: 160rpx; +} + +.status { + background-color: #e7f3ff; + border-radius: 30rpx; + color: #f55054; + font-size: 32rpx; + margin-bottom: 10rpx; + padding: 8rpx 15rpx; + text-align: center; +} + +.status2 { + background-color: #fff7ec; + color: #bb5912; + margin-bottom: 0; +} + +.bottom { + color: #f55054; + line-height: 45rpx; + margin-top: 10rpx; +} + +.bottom image { + height: 38rpx; + margin-top: -5rpx; + vertical-align: middle; + width: 45rpx; +} + +.btn-box { + border-top: 1px dashed #ddd; + font-size: 0; + padding-top: 15rpx; +} + +.btn { + border-radius: 10rpx; + color: #fff; + display: inline-block; + font-size: 32rpx; + line-height: 60rpx; + margin-right: 2%; + text-align: center; + width: 32%; +} + +.btn1 { + background-color: #f55054; +} + +.btn2 { + background-color: #56b6de; +} + +.btn3 { + background-color: #d70715; + margin-right: 0; +} \ No newline at end of file diff --git a/pages/center/case/caseLog.js b/pages/center/case/caseLog.js new file mode 100644 index 0000000..2326789 --- /dev/null +++ b/pages/center/case/caseLog.js @@ -0,0 +1,34 @@ +var n = getApp(); + +Page({ + data: { + businessId: "", + logList: [] + }, + getLog: function() { + var o = this; + n.restAjax.get(n.restAjax.path(n.apis.getLog, [ n.baseUrls.requestUrl, o.data.businessId ]), {}, { + headers: { + token: n.globalData.token + } + }, function(n, t) { + console.log(t), o.setData({ + logList: t + }); + }, function(n, o) { + console.log(o); + }); + }, + onLoad: function(n) { + this.setData({ + businessId: n.businessId + }), this.getLog(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/center/case/caseLog.json b/pages/center/case/caseLog.json new file mode 100644 index 0000000..91de62c --- /dev/null +++ b/pages/center/case/caseLog.json @@ -0,0 +1,24 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + } +} \ No newline at end of file diff --git a/pages/center/case/caseLog.wxml b/pages/center/case/caseLog.wxml new file mode 100644 index 0000000..4500168 --- /dev/null +++ b/pages/center/case/caseLog.wxml @@ -0,0 +1,36 @@ + + + {{item.nodeStateTime}} + + + 节点名称: + {{item.nodeName}} + + + 开始时间: + {{item.nodeStateTime}} + + + 结束时间: + {{item.nodeEndTime}} + + + 耗时: + {{item.nodeTimeConsuming}} + + + 处理人: + {{item.nodeUserName}} + + + 处理状态: + 已完成 + 进行中 + + + 说明: + {{item.nodeSummary}} + + + + diff --git a/pages/center/case/caseLog.wxss b/pages/center/case/caseLog.wxss new file mode 100644 index 0000000..1daaf30 --- /dev/null +++ b/pages/center/case/caseLog.wxss @@ -0,0 +1,56 @@ +page { + background-color: #fafafa; +} + +.log { + padding: 20rpx 30rpx; +} + +.log-box { + border-left: 5px solid #dfefff; + padding: 0 0 20rpx 35rpx; + position: relative; +} + +.log-box::before { + background-color: #3096fa; + border: 5px solid #dfefff; + border-radius: 50%; + box-sizing: border-box; + content: ""; + display: block; + height: 40rpx; + left: -25rpx; + position: absolute; + top: 0; + width: 40rpx; +} + +.log-time { + color: #333; + font-size: 36rpx; +} + +.log-info { + background-color: #fff; + border: 1px solid #eee; + border-radius: 20rpx; + margin-top: 10rpx; + padding: 15rpx; +} + +.log-row { + border-bottom: 1px solid #eee; + display: flex; + font-size: 30rpx; + line-height: 60rpx; +} + +.row-name { + text-align: right; + width: 25%; +} + +.red { + color: red; +} \ No newline at end of file diff --git a/pages/center/center.js b/pages/center/center.js new file mode 100644 index 0000000..31f2024 --- /dev/null +++ b/pages/center/center.js @@ -0,0 +1,396 @@ +var a = getApp(), r = require("../../utils/md5.js"); + +Page({ + data: { + token: a.globalData.token, + sourceUrl: a.baseUrls.sourceUrl, + userIcon: "", + userName: "", + curCommunityName: "", + gridList: [], + serviceUrl: a.baseUrls.serviceUrl, + baseImgUrl: a.baseUrls.baseImgUrl, + userNameText: "", + userPassword: "", + showAuthentication: !1, + isLoading: !1, + menuList: [], + imgUrl: a.baseUrls.baseCardUrl, + isShow: !0, + isOpen: !0, + Height: 0, + isBindPhone: !0, + isShowCardBag: !1, + userGridList: [], + userOrgList: [], + isCreate: !1 + }, + callPhone: function (t) { + var e = t.currentTarget.dataset.item; + console.log(e), wx.makePhoneCall({ + phoneNumber: e + "" + }); + }, + checkPermission: function () { + var t = this; + try { + var e = wx.getStorageSync("name"), a = wx.getStorageSync("userIcon"); + e ? this.setData({ + name: e, + userIcon: a + }) : wx.showModal({ + title: "提示", + content: "小程序需要您微信头像以及昵称用于展示,请授权.", + showCancel: !1, + success: function (e) { + e.confirm && t.getUserProfile(3); + } + }); + } catch (t) { + t = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(t); + wx.showToast({ + title: "获取信息失败", + icon: "error" + }); + } + }, + getUserProfile: function (t) { + var e = this; + wx.getUserProfile({ + desc: "获取微信头像以及昵称用于展示", + success: function (t) { + wx.setStorage({ + data: t.userInfo.nickName, + key: "name" + }), wx.setStorage({ + data: t.userInfo.avatarUrl, + key: "userIcon" + }), e.setData({ + name: t.userInfo.nickName, + userIcon: t.userInfo.avatarUrl + }), a.globalData.userIcon = t.userInfo.avatarUrl, a.globalData.userInfo = t.userInfo; + }, + fail: function (t) { + wx.showToast({ + title: "获取个人信息失败", + icon: "error" + }); + } + }); + }, + getHelpCount: function () { + var t = this; + a.restAjax.get(a.restAjax.path(a.apis.getHelpCount, [a.baseUrls.requestUrl]), { + problemTypeId: "b99f796f-b3a0-4d52-b10e-6e387ebbcc1b", + areaCode: wx.getStorageSync("areaCode") + }, { + headers: { + token: a.globalData.token + } + }, function (e, a) { + t.setData({ + helpCount: a.data + }); + }, function (t, e) { + console.log(e); + }); + }, + getFriendCount: function () { + var t = this; + a.restAjax.get(a.restAjax.path(a.apis.getHelpCount, [a.baseUrls.requestUrl]), { + problemTypeId: "99cf4a4e-22a2-49b2-9274-4519cd47cefd" + }, { + headers: { + token: a.globalData.token + } + }, function (e, a) { + t.setData({ + friendCount: a.data + }); + }, function (t, e) { + console.log(e); + }); + }, + getOtherCount: function () { + var t = this; + a.restAjax.get(a.restAjax.path(a.apis.getHelpCount, [a.baseUrls.requestUrl]), { + problemTypeId: "02a11dc0-9656-4504-8c11-030a28914ff3" + }, { + headers: { + token: a.globalData.token + } + }, function (e, a) { + t.setData({ + otherCount: a.data + }); + }, function (t, e) { + console.log(e); + }); + }, + checkGrid: function () { + this.setData({ + showAuthentication: !0 + }), wx.hideTabBar({ + animation: !1 + }); + }, + getGridList: function () { + var t = this; + a.restAjax.get(a.restAjax.path(a.apis.getGridListPage, [a.baseUrls.requestUrl]), { + page: 1, + rows: 3, + areaCode: wx.getStorageSync("areaCode") + }, { + headers: { + token: a.globalData.token + } + }, function (e, a) { + "200" == e && t.setData({ + gridList: a.rows + }); + }, function (t, e) { + console.log(e); + }); + }, + doAuthentication: function () { + var t = this; + if (!t.data.isLoading) { + var e = { + userName: t.data.userNameText, + passWord: r.hexMD5(r.hexMD5(r.hexMD5(t.data.userPassword))) + }; + t.setData({ + isLoading: !0 + }), a.restAjax.get(a.restAjax.path(a.apis.checkGrid, [a.baseUrls.requestUrl]), e, { + headers: { + token: a.globalData.token + } + }, function (e, a) { + wx.hideLoading(), a.data ? (wx.showToast({ + title: "认证成功!", + icon: "success" + }), t.setData({ + showAuthentication: !1, + userNameText: "", + userPassword: "", + isLoading: !1 + }), wx.showTabBar({ + animation: !1 + }), t.getGridList(), wx.navigateTo({ + url: "/packagecard/cardList/cardList?type=grid&id=" + a.data + })) : (wx.showToast({ + title: "认证失败!", + icon: "error" + }), t.setData({ + isLoading: !1 + })); + }, function (e, a) { + console.log(a), wx.showToast({ + title: a.msg, + icon: "error" + }), t.setData({ + isLoading: !1 + }); + }); + } + }, + closeAuthentication: function () { + this.setData({ + showAuthentication: !1, + userNameText: "", + userPassword: "" + }), wx.showTabBar({ + animation: !1 + }); + }, + checkGridMore: function () { + wx.navigateTo({ + url: "./contact" + }); + }, + checkMoreCase: function () { + wx.navigateTo({ + url: "./case/caseList" + }); + }, + checkCaseStatus: function (t) { + var e = t.currentTarget.dataset.status, a = ""; + a = "2" == e ? "?handleStatus=2" : "?isAccept=" + e, wx.navigateTo({ + url: "./case/caseList" + a + }); + }, + contactGrid: function (t) { + var e = t.currentTarget.dataset.item; + console.log(e), wx.navigateTo({ + url: "./contact/contactDetail?gridMiniId=" + e.cardSysId + "&title=" + e.userUserName + }); + }, + onload(options) { + this.getHelpCount(); + this.getFriendCount(); + this.getOtherCount(); + if (!wx.getStorageSync("userIcon")) { + this.checkPermission(); + } + + }, + checkPermission() { + var t = this; + try { + var e = wx.getStorageSync("name"), a = wx.getStorageSync("userIcon"); + e ? this.setData({ + name: e, + userIcon: a + }) : wx.showModal({ + title: "提示", + content: "小程序需要您微信头像以及昵称用于展示,请授权.", + showCancel: !1, + success: function (e) { + e.confirm && t.getUserProfile(3); + } + }); + } catch (t) { + wx.showToast({ + title: "获取信息失败", + icon: "error" + }); + } + }, + getUserProfile(t) { + var e = this; + wx.getUserProfile({ + desc: "获取微信头像以及昵称用于展示", + success: function (t) { + wx.setStorage({ + data: t.userInfo.nickName, + key: "name" + }), wx.setStorage({ + data: t.userInfo.avatarUrl, + key: "userIcon" + }), e.setData({ + userName: t.userInfo.nickName, + userIcon: t.userInfo.avatarUrl + }), a.globalData.userIcon = t.userInfo.avatarUrl, a.globalData.userInfo = t.userInfo; + }, + fail: function (t) { + wx.showToast({ + title: "获取个人信息失败", + icon: "error" + }); + } + }); + }, + goColumnList(t) { + var e = t.currentTarget.dataset.item; + if ("1" == e.configColumnGroupTargetMode) { + var a = e.configColumnGroupTargetUrl; + console.log(a), -1 != a.indexOf("/mine/myCard/myCard") || -1 != a.indexOf("/packagecard/cardList/cardList") ? (this.setData({ + isShowCardBag: !0 + }), -1 != a.indexOf("/mine/myCard/myCard") && this.setData({ + isCreate: !1 + }), -1 != a.indexOf("/packagecard/cardList/cardList") && this.setData({ + isCreate: !0 + })) : wx.navigateTo({ + url: a + }); + } else "2" == e.configColumnGroupTargetMode || "3" == e.configColumnGroupTargetMode || wx.navigateTo({ + url: "../columnlist/columnlist?id=" + e.configColumnGroupId + "&title=" + e.configColumnGroupName + }); + }, + onShow() { + this.getGridList(), this.setData({ + userIcon: wx.getStorageSync("userIcon"), + userName: wx.getStorageSync("name"), + curCommunityName: wx.getStorageSync("curCommunityName") + }), this.getMineIsGrid(); + }, + getMineIsGrid() { + var t = this; + a.restAjax.get(a.restAjax.path(a.apis.getMineIsGrid, [a.baseUrls.requestUrl]), null, { + headers: { + token: a.globalData.token + } + }, function (e, a) { + t.setData({ + userGridList: a + }), t.getMineOrgList(); + }, function (e, a) { + console.log(a), t.getMineOrgList(); + }); + }, + getMineOrgList() { + var _self = this; + a.restAjax.get(a.restAjax.path(a.apis.getMineOrg, [a.baseUrls.requestUrl]), null, { + headers: { + token: a.globalData.token + } + }, function (e, a) { + _self.setData({ + userOrgList: a + }); + var r = null != _self.data.userGridList && null != _self.data.userGridLis && _self.data.userGridList.length > 0, o = null != _self.data.userOrgList && null != _self.data.userOrgList && _self.data.userOrgList.length > 0; + (r || o) && _self.getItemList(); + }, function (t, e) { + console.log(e); + }); + }, + getItemList() { + wx.showLoading({ + title: "加载中..." + }); + var t = this; + console.log(a.urls.getMenuList) + a.http.get(a.urls.getMenuList, { + header: { + token: a.globalData.token + } + }).then(function (e) { + var a = e.data; + wx.stopPullDownRefresh({}), wx.hideLoading({}); + var r = !0; + a.forEach(function (t) { + t.configColumnList.sort(function (t, e) { + return t.configColumnGroupOrder - e.configColumnGroupOrder; + }), "创建名片" == t.configColumnGroupName && (r = !1); + }), t.setData({ + menuList: a, + isShow: r + }); + }).catch(function (t) { + console.log(t), wx.stopPullDownRefresh({}), wx.hideLoading({}); + }); + }, + imgHeight(t) { + var e = wx.getSystemInfoSync().windowWidth * t.detail.height / t.detail.width * .88 + "px"; + this.setData({ + Height: e + }); + }, + toFunction(t) { + console.log(t); + var e = ""; + this.data.menuList.forEach(function (t) { + "3" == t.configColumnGroupDirection && (e = t.configColumnGroupTargetUrl); + }), -1 != e.indexOf("/packagecard/cardList/cardList") ? this.setData({ + isShowCardBag: !0, + isCreate: !0 + }) : wx.navigateTo({ + url: e + }); + }, + onHide(t) { + this.setData({ + isShowCardBag: !1 + }); + }, + changeCard(t) { + console.log(t.currentTarget.dataset.type), console.log(t.currentTarget.dataset.item); + var e = t.currentTarget.dataset.item, a = ""; + a = 1 == t.currentTarget.dataset.type ? this.data.isCreate ? "/packagecard/cardList/cardList?type=grid&id=" + e.gridMiniId : "/pages/mine/myCard/myCard?type=grid&id=" + e.gridMiniId : this.data.isCreate ? "/packagecard/cardList/cardList?type=org&id=" + e.organizationId : "/pages/mine/myCard/myCard?type=org&id=" + e.organizationId, + wx.navigateTo({ + url: a + }), this.setData({ + isShowCardBag: !1 + }); + } +}) \ No newline at end of file diff --git a/pages/center/center.json b/pages/center/center.json new file mode 100644 index 0000000..5458f6c --- /dev/null +++ b/pages/center/center.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "我的" +} \ No newline at end of file diff --git a/pages/center/center.wxml b/pages/center/center.wxml new file mode 100644 index 0000000..ac1123c --- /dev/null +++ b/pages/center/center.wxml @@ -0,0 +1,188 @@ + + + + 网格员认证>> + + + + + 我的事件 + 查看更多 + + + + + + 待受理 + + + + 已受理 + + + + 已完结 + + + + 我的收藏 + + + + + + 快速反馈 + 查看更多 + + + + + + + {{item.userUserName}} + 网格员 + 立即联系 + + + + + + 邻里互助 + + + 交友 + {{friendCount}} + + + 求助 + {{helpCount}} + + + 其他 + {{otherCount}} + + + + + 快速拨号 + + + 人力资源社会保障热线 + 12333 + + + 住房公积金 + 12329 + + + 市民服务热线 + 12345 + + + 市长热线 + 12320 + + + + + + + + + + + + 立即认证 + + + + + + + + + {{group.configColumnGroupName}} + + + + + {{item.configColumnName}} + + + + + + + + {{group.configColumnGroupName}} + {{group.configColumnGroupRemark}} + + + + + + + {{group.configColumnGroupName}} + + + + + + + + + + + + + + + + + + + + + + + + + + + 网格员 + + + + {{item.areaName}} + + + + + + + + 生活服务 + + + + {{item.unitName}} + + + 地址:{{item.communityName}}-{{item.streetName}} + + + + + + + diff --git a/pages/center/center.wxss b/pages/center/center.wxss new file mode 100644 index 0000000..84aca20 --- /dev/null +++ b/pages/center/center.wxss @@ -0,0 +1,729 @@ +.center-top { + background-color: #ff4949; + border-bottom-left-radius: 120rpx; + border-bottom-right-radius: 120rpx; + padding: 20rpx 20rpx 120rpx 40rpx; +} + +.user-info { + display: flex; +} + +.user-info image { + border-radius: 50%; + height: 120rpx; + margin-right: 20rpx; + width: 120rpx; +} + +.name { + color: #fff; + font-size: 34rpx; + margin: 10rpx 0; +} + +.user-community { + background-color: rgba(0,0,0,.22); + border-radius: 34rpx; + color: #fff; + font-size: 28rpx; + line-height: 50rpx; + padding: 0 20rpx; + text-align: center; +} + +.integral { + display: flex; + margin-top: 40rpx; +} + +.integral-box { + flex: 1; + text-align: center; +} + +.integral-count { + color: #fff; + font-size: 40rpx; +} + +.integral-name { + color: #fff; + font-size: 28rpx; +} + +.case,.contact,.help { + background-color: #fff; + border-radius: 14rpx; + box-sizing: border-box; + margin: -100rpx auto 0; + padding: 20rpx; + position: relative; + width: 710rpx; +} + +.case { + padding: 25rpx 20rpx; +} + +.case-title { + display: flex; + justify-content: space-between; + margin-bottom: 20rpx; + padding: 0 20rpx; +} + +.help-title { + padding: 0; +} + +.title { + font-size: 30rpx; + font-weight: 700; +} + +.more { + color: #a6a6a6; + font-size: 28rpx; +} + +.case-count,.contact-people { + display: flex; +} + +.case-count-box { + flex: 1; + text-align: center; +} + +.case-count-box image { + height: 80rpx; + width: 80rpx; +} + +.case-count-name { + color: #010101; + font-size: 30rpx; +} + +.contact { + background-color: initial; + margin-top: 20rpx; + padding: 0; +} + +.contact-container { + overflow-x: auto; + white-space: nowrap; +} + +.contact-box { + background-color: #fff; + border-radius: 14rpx; + display: inline-block; + margin-right: 3%; + padding: 20rpx; + text-align: center; + width: 32%; +} + +.contact-box:last-child { + margin-right: 0; +} + +.contact-box image { + border-radius: 50%; + height: 100rpx; + width: 100rpx; +} + +.contact-name { + color: #101010; + font-size: 32rpx; + margin-top: 15rpx; +} + +.contact-type { + color: #a6a6a6; + font-size: 28rpx; +} + +.contact-btn { + background-color: #ff4949; + border-radius: 25rpx; + color: #fff; + font-size: 28rpx; + height: 50rpx; + line-height: 50rpx; + margin: 25rpx auto 0; + padding: 0 10rpx; + width: 140rpx; +} + +.help { + margin-top: 20rpx; +} + +.help-type { + display: flex; + height: 60rpx; + justify-content: space-between; + line-height: 60rpx; +} + +.type-name { + color: #101010; + font-size: 30rpx; +} + +.type-count { + color: #9b9b9b; + font-size: 30rpx; +} + +.card { + margin-top: 20rpx; +} + +.user-btn { + display: flex; + justify-content: space-between; + width: 100%; +} + +.btn { + background-color: #db2a2a; + border-radius: 40rpx; + border-radius: 30rpx 0 0 30rpx; + color: #fff; + height: 60rpx; + line-height: 60rpx; + margin-right: -20rpx; + margin-top: 30rpx; + padding: 0 15rpx 0 30rpx; +} + +.authentication { + background-color: rgba(0,0,0,.6); + bottom: 0; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 9999; +} + +.authentication-container { + font-size: 0; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 710rpx; +} + +.authentication-container image { + width: 100%; +} + +.authentication-box { + background-color: #fff; + padding: 60rpx 40rpx; +} + +.authentication-box input { + background-color: #f3f3f3; + box-sizing: border-box; + height: 80rpx; + margin-bottom: 20rpx; + padding: 0 30rpx; +} + +.authentication-box input,.authentication-btn { + border-radius: 40rpx; + font-size: 32rpx; + width: 100%; +} + +.authentication-btn { + background-color: #f55054; + color: #fff; + line-height: 80rpx; + text-align: center; +} + +.authentication-img { + position: relative; +} + +.close { + height: 50rpx; + position: absolute; + right: -15rpx; + top: -25rpx; + width: 50rpx!important; +} + +.no-padding { + padding: 0; +} + +.more image { + height: 24rpx; + margin-top: 8rpx; + vertical-align: top; +} + +.UCenter-bg { + align-items: flex-start; + color: #fff; + display: flex; + flex-direction: column; + font-weight: 300; + height: 400rpx; + justify-content: center; + overflow: hidden; + position: relative; + top: 0; + width: 100%; +} + +.UCenter-bg .user-info { + align-items: center; + align-self: center; + display: flex; + flex-direction: row; + height: 200rpx; + position: absolute; + width: 85%; +} + +.user-info .user-icon { + border-radius: 50%; + height: 136rpx; + width: 136rpx; +} + +.vip-box { + color: #fff; + left: 80rpx; + position: absolute; + top: 300rpx; +} + +.vip-box .title { + font-size: 32rpx; + font-weight: 700; +} + +.vip-box .msg { + font-size: 28rpx; +} + +.sign-txt { + align-self: center; + color: #fff; + font-size: 28rpx; + font-weight: 700; + position: absolute; + top: 280rpx; + width: 80%; +} + +.sign-txt,.user-content { + display: flex; +} + +.user-content { + flex-direction: column; + justify-content: space-between; + margin: 30rpx; +} + +.user-content .title { + color: #fff; + font-size: 38rpx; + font-weight: 700; + margin-bottom: 15rpx; +} + +.user-content .des { + color: #fff; + font-size: 32rpx; + margin-top: 15rpx; +} + +.UCenter-bg image { + height: 400px; + width: 100%; +} + +.UCenter-bg .icon { + height: 48rpx; + width: 48rpx; +} + +.UCenter-bg .icons { + position: absolute; + right: 15rpx; + z-index: 10; +} + +.scroll-content { + display: flex; + flex-direction: column; + min-height: 300rpx; + width: 100%; + z-index: 99; +} + +.UCenter-bg .gif-wave { + bottom: 0; + position: absolute; + width: 100%; +} + +.UCenter-bg .gif-wave,.mapBox,map { + height: 100rpx; + left: 0; + mix-blend-mode: screen; + z-index: 99; +} + +.mapBox,map { + height: 300rpx; + width: 750rpx; +} + +.play-box { + align-items: center; + background-color: #fff; + border-radius: 15rpx; + box-shadow: 10px 10px 5px #cacaca; + display: flex; + flex-direction: column; + justify-content: center; + margin-left: 20rpx; + padding: 10rpx 0rpx; + width: 80%; +} + +.play-box image { + height: 60rpx; + width: 60rpx; +} + +.creat-card { + align-items: center; + background: #e6b980; + border-radius: 50%; + bottom: 20rpx; + box-sizing: border-box; + flex-direction: column; + height: 140rpx; + justify-content: center; + padding: 20rpx; + position: fixed; + right: 20rpx; + width: 140rpx; + z-index: 100; +} + +.order-box { + background-color: #fff; + flex-direction: row; + justify-content: space-between; + margin: 15rpx; + padding: 15rpx; +} + +.order-box,.order-item { + align-items: center; + display: flex; +} + +.order-item { + flex-direction: column; + justify-content: center; + width: 128rpx; +} + +.order-item image { + height: 64rpx; + width: 64rpx; +} + +.order-item text { + margin-top: 15rpx; +} + +.purse-box { + background-color: #fff; + flex-direction: column; + justify-content: center; + margin: 0rpx 15rpx 15rpx; + padding: 15rpx; +} + +.purse-box,.purse-title { + align-items: center; + display: flex; +} + +.purse-title { + flex-direction: row; + justify-content: space-between; + width: 100%; +} + +.purse-title .title { + color: #000; + font-size: 32rpx; +} + +.purse-title .hint { + color: #5f5f5f; + font-size: 28rpx; +} + +.purse-content-box { + flex-direction: row; + justify-content: space-around; +} + +.purse-content-box,.purse-content-box .item { + align-items: center; + color: #000; + display: flex; + font-size: 28rpx; + width: 100%; +} + +.purse-content-box .item { + flex-direction: column; + justify-content: center; +} + +.purse-content-box .item:nth-child(2) { + border-left: 1rpx solid #dfdfdf; + border-right: 1rpx solid #dfdfdf; +} + +.marketing-box { + justify-content: space-around; + margin-top: 15rpx; +} + +.marketing-box,.marketing-box .item { + align-items: center; + color: #000; + display: flex; + flex-direction: row; + font-size: 28rpx; + width: 100%; +} + +.marketing-box .item { + background-color: #f5f5f5; + border-radius: 10rpx; + justify-content: center; +} + +.marketing-box .item:active { + background-color: #fcfcfc; + color: #000; +} + +.marketing-box .item:nth-child(2) { + margin-left: 15rpx; +} + +.price { + color: #000; + font-size: 32rpx; + height: 64rpx; + line-height: 64rpx; + overflow: hidden; + text-align: center; + text-overflow: ellipsis; + white-space: nowrap; + width: 180rpx; +} + +.img-48 { + height: 48rpx; + width: 48rpx; +} + +.money-box { + align-items: center; + background-color: #f5f5f5; + display: flex; + flex-direction: row; + justify-content: space-around; + width: 66%; +} + +.moeny-box-2 { + justify-content: center; + width: 33%; +} + +.moeny-box-2,.money-box .item { + align-items: center; + display: flex; + flex-direction: column; + height: 145rpx; +} + +.money-box .item { + justify-content: space-between; + padding: 15rpx; + z-index: 2; +} + +.img-bg-128 { + height: 145rpx; + position: absolute; + width: 33%; +} + +.item-white { + align-items: center; + color: #fff; + display: flex; + flex-direction: column; + font-size: 28rpx; + height: 145rpx; + justify-content: space-between; + padding: 15rpx; + z-index: 2; +} + +.money-box .item image { + height: 64rpx; + width: 64rpx; +} + +.bg-box { + align-items: center; + background-color: #f5f5f5; + border-radius: 10rpx; + display: flex; + flex-direction: row; + justify-content: space-around; + margin-top: 15rpx; + width: 100%; +} + +.img-64 { + height: 64rpx; + width: 64rpx; +} + +.text-28 { + color: #000; + font-size: 28rpx; + margin-top: 15rpx; +} + +.creat-card image { + height: 60rpx; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 80rpx; +} + +.item-box { + align-items: center; + background-color: #fff; + display: flex; + flex-direction: row; + height: 128rpx; + padding: 15rpx; + width: 100%; +} + +.item-img { + height: 96rpx; + width: 96rpx; +} + +.item-content { + display: flex; + flex-direction: column; + justify-content: center; + min-height: 128rpx; + padding: 15rpx; + width: 80%; +} + +.group-box { + background-color: #fff; + margin: 5rpx 15rpx 0rpx; +} + +.group-box:nth-child(1) { + margin: 0rpx 15rpx; +} + +.ver-box { + display: flex; + flex-direction: column; +} + +.ver-box-title { + color: #000; + font-size: 32rpx; + font-weight: 700; + padding: 15rpx 15rpx 0rpx; +} + +.ver-box-list { + align-items: flex-start; + flex-direction: row; + justify-content: flex-start; + padding-left: 15rpx; +} + +.ver-box-items,.ver-box-list { + display: flex; +} + +.ver-box-items { + align-items: center; + flex-direction: column; + justify-content: center; + margin: 15rpx; +} + +.ver-box-items text { + font-size: 24rpx; + margin-top: 15rpx; + max-width: 96rpx; +} + +.ver-box-items:nth-child(1) { + margin: 15rpx 15rpx 15rpx 0rpx; +} + +.ver-box-items image { + border-radius: 10rpx; + height: 96rpx; + width: 96rpx; +} + +.other-name { + align-items: center; + display: flex; + flex-direction: row; + font-size: 14px; + height: 120rpx; + justify-content: center; + overflow: hidden; + text-align: center; + text-overflow: ellipsis; + white-space: pre-line; +} \ No newline at end of file diff --git a/pages/center/contact.js b/pages/center/contact.js new file mode 100644 index 0000000..d7bc9b9 --- /dev/null +++ b/pages/center/contact.js @@ -0,0 +1,43 @@ +var t = getApp(); + +Page({ + data: { + token: t.globalData.token, + serviceUrl: t.baseUrls.serviceUrl, + baseImgUrl: t.baseUrls.baseImgUrl, + sourceUrl: t.baseUrls.sourceUrl, + gridList: [] + }, + getGridList: function() { + var e = this; + t.restAjax.get(t.restAjax.path(t.apis.getGridList, [ t.baseUrls.requestUrl ]), { + areaCode: wx.getStorageSync("areaCode") + }, { + headers: { + token: t.globalData.token + } + }, function(t, a) { + e.setData({ + gridList: a + }); + }, function(t, e) { + console.log(e); + }); + }, + contactGrid: function(t) { + var e = t.currentTarget.dataset.item; + wx.navigateTo({ + url: "./contact/contactDetail?gridMiniId=" + e.cardSysId + }); + }, + onLoad: function(t) { + this.getGridList(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/center/contact.json b/pages/center/contact.json new file mode 100644 index 0000000..558cf58 --- /dev/null +++ b/pages/center/contact.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "快速反馈" +} \ No newline at end of file diff --git a/pages/center/contact.wxml b/pages/center/contact.wxml new file mode 100644 index 0000000..cd7af52 --- /dev/null +++ b/pages/center/contact.wxml @@ -0,0 +1,13 @@ + + + + + + + {{item.userUserName}} + 网格员 + + + 立即联系 + + diff --git a/pages/center/contact.wxss b/pages/center/contact.wxss new file mode 100644 index 0000000..64fa950 --- /dev/null +++ b/pages/center/contact.wxss @@ -0,0 +1,47 @@ +.contact { + background-color: #fff; + padding: 0 20rpx; +} + +.contact-box { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; + padding: 20rpx 0; +} + +.contact-box:last-child { + border-bottom: none; +} + +.contact-info { + display: flex; +} + +.contact-info image { + border-radius: 50%; + height: 120rpx; + margin-right: 10rpx; + width: 120rpx; +} + +.name { + font-size: 34rpx; + margin: 15rpx 0 10rpx; +} + +.type { + color: #a6a6a6; + font-size: 28rpx; +} + +.contact-btn { + background-color: #ff4949; + border-radius: 40rpx; + color: #fff; + font-size: 32rpx; + height: 50rpx; + line-height: 50rpx; + margin-top: 25rpx; + padding: 0 15rpx; +} \ No newline at end of file diff --git a/pages/center/contact/contactDetail.js b/pages/center/contact/contactDetail.js new file mode 100644 index 0000000..931f7f2 --- /dev/null +++ b/pages/center/contact/contactDetail.js @@ -0,0 +1,920 @@ +var t = getApp(), a = wx.createInnerAudioContext(); + +Page({ + data: { + token: t.globalData.token, + serviceUrl: t.baseUrls.serviceUrl, + baseImgUrl: t.baseUrls.baseImgUrl, + imgUrl: t.baseUrls.baseCardUrl, + sourceUrl: t.baseUrls.sourceUrl, + cardUrl: t.baseUrls.baseCardUrl, + gridMiniId: "", + gridDetail: {}, + showCode: !1, + nameTxt: "名片", + dataList: [], + curIndex: 0, + speedStep: 5, + waitFlag: !1, + avatarUrl: t.globalData.userInfo.avatarUrl, + areaList: [], + cardHeight: "", + cardInfo: {}, + personIntro: {}, + companyIntro: {}, + shareImg: "", + phoneTxt: "未录入", + emailTxt: "未录入", + wechateTxt: "未录入", + addressTxt: "未录入", + forwardCount: "", + shareRecordId: "", + isShowBarCode: !1, + browUserList: [], + isShowBrowseUser: !1, + shareImgUrl: "", + tempUserId: "", + cardTemplateDispatchId: "", + cardTemplateUseId: "", + isShowCard: !1, + otherCardList: [], + isPlayAudio: !1, + audioId: "", + count: 3, + isMine: 1, + isDefault: !0, + animationData: {}, + isShowBtn: !1, + isShowPhone: !1, + isBindPhone: !1, + isNeedRefresh: !0, + isShowComment: !1, + posterId: "", + isShowPoster: !1, + defaultBtnIcon: "/images/ic_share_img.png" + }, + onLoad: function(t) { + this.checkPermission(), t.cardTemplateDispatchId && this.setData({ + cardTemplateDispatchId: t.cardTemplateDispatchId, + isMine: 2 + }), "" != t.title && null != t.title && wx.setNavigationBarTitle({ + title: t.title + }), this.buildId(), console.log(null != t.gridMiniId && "" != t.gridMiniId), console.log(t.gridMiniId), + null != t.gridMiniId && "" != t.gridMiniId ? (console.log("获取名片"), this.setData({ + cardTemplateUseId: t.gridMiniId + }), this.getCard()) : this.getDefault(); + }, + doLogin: function() { + var a = this; + wx.showLoading({ + title: "加载中..." + }), wx.login({ + success: function(e) { + t.http.post(t.urls.wxLogin, { + data: { + jsCode: e.code + } + }).then(function(e) { + wx.hideLoading({}); + var s = e.data.data.split("_")[0], o = e.data.data.split("_")[1]; + a.setData({ + isBindPhone: 0 == o + }), wx.setStorageSync("token", s), wx.setStorageSync("bindPhone", o), t.globalData.token = s, + a.doSaveUserInfo(), a.getInfo(), 2 == a.data.isMine ? "" != a.data.cardTemplateDispatchId && a.getCardId() : a.getDefault(), + a.getOtherCard(2), a.getBtnIcon(); + }).catch(function(t) { + wx.hideLoading({}); + }); + } + }); + }, + getBtnIcon: function() { + var a = this; + t.http.get(t.urls.getIndexIcon, { + header: { + token: t.globalData.token + } + }).then(function(t) { + t.data.data && a.setData({ + defaultBtnIcon: a.data.imgUrl + t.data.data + }); + }).catch(function(t) {}); + }, + doSaveUserInfo: function() { + try { + var a = wx.getStorageSync("name"), e = wx.getStorageSync("userIcon"); + a && t.http.put(t.urls.doSaveUserInfo, { + header: { + token: t.globalData.token + }, + data: { + avatarUrl: e, + nickName: a + } + }).then(function(t) {}).catch(function(t) { + console.log(t); + }); + } catch (t) { + t = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(t); + console.log(t); + } + }, + getMainColumn: function(a) { + var e = this; + e.setData({ + dataList: [] + }), t.http.get(t.urls.getMainColumn, { + header: { + token: t.globalData.token + }, + data: { + creator: a + } + }).then(function(t) { + wx.showLoading({ + title: "加载中..." + }), e.getMainMoment(t.data, a, 0); + }).catch(function(t) { + wx.stopPullDownRefresh({}); + }); + }, + getMainBaseUserInfo: function(a) { + var e = this; + t.http.get(t.urls.getMainMoment.format({ + configColumnId: "de7b5e22-64f9-4c60-a1f9-6ac004dfb9a8" + }), { + header: { + token: t.globalData.token + }, + data: { + userId: a + } + }).then(function(t) { + t.data.length > 0 ? (e.setData({ + isShowBtn: !0 + }), t.data[0].list.forEach(function(t) { + switch (t.name) { + case "phone": + e.setData({ + phoneTxt: t.value + }); + break; + + case "wechat": + e.setData({ + wechateTxt: t.value + }); + break; + + case "email": + e.setData({ + emailTxt: t.value + }); + break; + + case "address": + e.setData({ + addressTxt: t.value + }); + } + })) : e.setData({ + isShowBtn: !1 + }); + }).catch(function(t) { + console.log(t); + }); + }, + onClose: function() { + this.setData({ + isShowPoster: !1, + isShowBrowseUser: !1 + }); + }, + getMainMoment: function(a, e, s) { + var o = this; + s < a.length ? t.http.get(t.urls.getMainMoment.format({ + configColumnId: a[o.data.curIndex].configColumnId + }), { + header: { + token: t.globalData.token + }, + data: { + userId: e + } + }).then(function(t) { + if (t.data.length > 0) { + var s = a[o.data.curIndex], n = { + funcSwitch: "2" == s.configColumnCollect || "4" == s.configColumnCollect || "2" == s.configColumnLike && "4" == s.configColumnLike || "2" == s.configColumnDispatch || "4" == s.configColumnDispatch || "2" == s.configColumnComment || "4" == s.configColumnComment, + collectSwitch: a[o.data.curIndex].configColumnCollect, + commentSwitch: a[o.data.curIndex].configColumnComment, + shareSwitch: a[o.data.curIndex].configColumnDispatch, + likeSwitch: a[o.data.curIndex].configColumnLike, + cId: a[o.data.curIndex].configColumnId, + type: a[o.data.curIndex].configColumnType, + name: a[o.data.curIndex].configColumnName, + mode: a[o.data.curIndex].configTableMode, + list: t.data.slice(0, a[o.data.curIndex].configColumnRowCount) + }; + o.data.dataList.push(n); + } + o.setData({ + curIndex: ++o.data.curIndex + }), o.getMainMoment(a, e, o.data.curIndex); + }).catch(function(t) { + o.setData({ + curIndex: ++o.data.curIndex + }), a[o.data.curIndex] && o.getMainMoment(a, e, o.data.curIndex); + }) : (wx.hideLoading({}), wx.stopPullDownRefresh({}), o.buildMainData()); + }, + buildMainData: function() { + var t = this, a = ""; + t.data.dataList.forEach(function(e) { + e.list.forEach(function(e) { + a += e.uid + ",", e.collectCount = 0, e.collectStatus = !1, e.commentCount = 0, + e.dispatchCount = 0, e.likeCount = 0, e.likeStatus = !1, e.scansCount = 0, e.list.forEach(function(a) { + switch (a.dataType) { + case "2": + var e = a.value.split("@"); + e.length > 1 ? a.dataMode = e[1] : a.dataMode = "1"; + var s = e[0].split(","), o = []; + s.forEach(function(a) { + if ("" != a) { + var e = { + id: a, + path: t.data.imgUrl + a + }; + o.push(e); + } + }), a.valueList = o; + break; + + case "3": + s = a.value.split(","), o = []; + s.forEach(function(a) { + if ("" != a) { + var e = a.split("&"), s = "00:00"; + if (e.length > 1) { + var n = e[1], r = parseInt(n / 60), i = parseInt(n % 60); + s = (r > 9 ? r : "0" + r) + ":" + (+i > 9 ? i : "0" + i); + } + var d = { + id: e[0], + path: t.data.imgUrl + e[0], + isPlay: !1, + duration: 1e5, + curDuration: 0, + curDurationStr: "00:00", + totalDurationStr: s + }; + o.push(d); + } + }), a.valueList = o; + break; + + case "4": + s = a.value.split(","), o = []; + for (var n = 0; n < s.length; n++) if ("" != s[n]) { + var r = s[n].split("&"), i = { + path: t.data.imgUrl + r[0], + imgPath: t.data.imgUrl + r[1] + }; + o.push(i); + } + a.valueList = o; + break; + + case "6": + s = a.value.split("-"), o = []; + s.forEach(function(t) { + if ("" != t) { + var a = t.split(","), e = { + name: "", + address: "", + latitude: a[0], + longitude: a[1] + }; + o.push(e); + } + }), a.valueList = o; + break; + + case "8": + a.dictionariesList.forEach(function(t) { + -1 != a.value.indexOf(t.dataId) && (a.selValue = t.dataName); + }); + break; + + case "9": + a.dictionariesList.forEach(function(t) { + -1 != a.value.indexOf(t.dataId) ? t.isSel = !0 : t.isSel = !1; + }); + } + }); + }); + }), t.setData({ + curIndex: 0, + dataList: t.data.dataList + }), t.getColumnContentHandle(a); + }, + getColumnContentHandle: function(a) { + var e = this; + wx.showLoading({ + title: "加载中..." + }), t.http.get(t.urls.getColumnContentHandle.format({ + projectId: "column", + businessIds: a + }), { + header: { + token: t.globalData.token + } + }).then(function(t) { + wx.hideLoading({}), t.data.forEach(function(t) { + e.data.dataList.forEach(function(a) { + a.list.forEach(function(a) { + a.uid == t.businessId && (a.collectCount = t.collectCount, a.collectStatus = t.collectStatus, + a.commentCount = t.commentCount, a.dispatchCount = t.dispatchCount, a.likeCount = t.likeCount, + a.likeStatus = t.likeStatus, a.scansCount = t.scansCount); + }); + }); + }), e.setData({ + curIndex: 0, + dataList: e.data.dataList + }); + }).catch(function(t) {}); + }, + showMore: function(t) { + var a = t.currentTarget.dataset.item; + if ("2" == a.mode) { + var e = t.currentTarget.dataset.userid, s = t.currentTarget.dataset.idx; + this.setData({ + isNeedRefresh: !1 + }), wx.navigateTo({ + url: "/packagecard/moments/showlist/showlist?id=" + a.cId + "&userId=" + e + "&index=" + s + }); + } + }, + onPullDownRefresh: function() { + "" != t.globalData.token ? (this.setData({ + isNeedRefresh: !0 + }), 2 == this.data.isMine ? "" != this.data.cardTemplateUseId && (this.setData({ + dataList: [], + cardInfo: null, + areaList: null + }), this.getCard()) : 3 == this.data.isMine ? (this.setData({ + dataList: [], + cardInfo: null, + areaList: null + }), this.getBrowUserCard()) : this.getDefault(), this.getOtherCard(2), this.getBtnIcon()) : this.doLogin(); + }, + viewImg: function(t) { + var a = [], e = t.currentTarget.dataset.values; + this.setData({ + isNeedRefresh: !1 + }), e.forEach(function(t) { + a.push(t.path); + }), wx.previewImage({ + urls: a, + current: t.currentTarget.dataset.cur + }); + }, + viewVideo: function(t) { + var a = t.currentTarget.dataset.url; + this.setData({ + isNeedRefresh: !1 + }), wx.previewMedia({ + sources: [ { + url: a, + type: "video" + } ] + }); + }, + play: function(t) { + var e = this, s = t.currentTarget.dataset.index, o = t.currentTarget.dataset.idx, n = t.currentTarget.dataset.i, r = t.currentTarget.dataset.a, i = t.currentTarget.dataset.item; + console.log(e.data.isPlayAudio), e.data.isPlayAudio ? (e.data.dataList.forEach(function(t) { + t.list.forEach(function(t) { + t.list.forEach(function(t) { + "3" == t.dataType && t.valueList && t.valueList.forEach(function(t) { + t.isPlay = !1, t.curDuration = 0, t.curDuationStr = "00:00"; + }); + }); + }); + }), e.setData({ + dataList: e.data.dataList + }), a.stop(), e.data.audioId != i.id && (wx.showLoading({ + title: "加载中..." + }), setTimeout(function() { + wx.hideLoading({}), a.src = e.data.dataList[s].list[o].list[n].valueList[r].path + ".mp3", + a.startTime = 0, a.autoplay = !0, e.data.dataList[s].list[o].list[n].valueList[r].isPlay = !0, + e.setData({ + dataList: e.data.dataList, + isPlayAudio: !0, + audioId: i.id + }); + }, 1500))) : (a.src = e.data.dataList[s].list[o].list[n].valueList[r].path + ".mp3", + a.startTime = 0, a.autoplay = !0, a.play(), e.data.dataList[s].list[o].list[n].valueList[r].isPlay = !0, + e.setData({ + dataList: e.data.dataList, + isPlayAudio: !0, + audioId: i.id + })), a.onPlay(function() {}), a.onCanplay(function(t) {}), a.onStop(function(t) { + console.log("onStop==="), e.data.dataList[s].list[o].list[n].valueList[r].isPlay = !1, + e.data.dataList[s].list[o].list[n].valueList[r].curDuration = 0, e.data.dataList[s].list[o].list[n].valueList[r].curDurationStr = "00:00", + e.setData({ + dataList: e.data.dataList, + isPlayAudio: !1 + }); + }), a.onEnded(function(t) { + console.log(t), console.log("播放完毕"), e.data.dataList[s].list[o].list[n].valueList[r].isPlay = !1, + e.data.dataList[s].list[o].list[n].valueList[r].curDuration = 0, e.data.dataList[s].list[o].list[n].valueList[r].curDurationStr = "00:00", + e.setData({ + dataList: e.data.dataList, + isPlayAudio: !1 + }); + }), a.onError(function(t) { + console.log("播放错误"), console.log(t), e.data.dataList[s].list[o].list[n].valueList[r].isPlay = !1, + e.data.dataList[s].list[o].list[n].valueList[r].curDuration = 0, e.data.dataList[s].list[o].list[n].valueList[r].curDurationStr = "00:00", + e.setData({ + dataList: e.data.dataList, + isPlayAudio: !1 + }); + }), a.onSeeking(function() {}); + }, + goList: function() { + wx.navigateTo({ + url: "/packagecard/cardList/cardList" + }); + }, + getPersonIntro: function() { + var a = this; + t.restAjax.get(t.restAjax.path("{personIntroUrl}app/userexpand/get/" + t.globalData.userInfo.userId, [ t.personIntroUrl ]), {}, { + headers: { + token: t.globalData.token + } + }, function(t, e) { + a.setData({ + personIntro: e + }); + }, function(a, e) { + t.dialog.msg(e.msg); + }); + }, + getUserInfo: function() { + var a = this; + t.restAjax.get(t.restAjax.path("{loginUrl}app/user/get-app-user", [ t.personIntroUrl ]), {}, { + headers: { + token: t.globalData.token + } + }, function(e, s) { + t.globalData.userInfo = s, a.getList(); + }, function(a, e) { + t.dialog.msg(e.msg); + }); + }, + getInfo: function() { + t.http.get(t.urls.getUserBaseInfo, { + header: { + token: t.globalData.token + } + }).then(function(a) { + wx.setStorageSync("usercode", a.data.userCode), t.globalData.currentUserId = a.data.userId; + }).catch(function(t) { + console.log(t); + }); + }, + getDefault: function() { + var a = this; + t.globalData.showUserId = "", a.setData({ + cardInfo: {}, + areaList: [] + }), t.http.get(t.urls.getDefaultCard, { + header: { + token: t.globalData.token + }, + data: {} + }).then(function(e) { + var s = e.data.areaList; + s.forEach(function(t) { + "name" == t.templateAreaSource && a.setData({ + nameTxt: t.templateAreaFontValue + }); + }), a.setData({ + cardInfo: e.data, + isDefault: "1" == e.data.cardTemplateUseSystem, + areaList: s, + dataList: [] + }), e.data && (a.toSaveLocalImg(e.data.cardTemplateUseDispatchPhoto), a.getBrowCardUserList(e.data.cardTemplateUseId), + a.setData({ + tempUserId: e.data.creator, + cardTemplateUseId: e.data.cardTemplateUseId + }), t.globalData.userId = e.data.creator, a.getMainColumn(e.data.creator), a.getMainBaseUserInfo(e.data.creator)); + }).catch(function(t) {}); + }, + getBrowCardUserList: function(a) { + var e = this; + t.http.get(t.urls.getCardBrowUserList, { + header: { + token: t.globalData.token + }, + data: { + page: "1", + rows: "7", + cardTemplateUseId: a + } + }).then(function(t) { + t.data && e.setData({ + browUserList: t.data.rows + }); + }).catch(function(t) { + console.log(t); + }); + }, + addContact: function() { + wx.addPhoneContact({ + firstName: this.data.nameTxt, + mobilePhoneNumber: this.data.phoneNum + }); + }, + includedCard: function() { + t.http.post(t.urls.includedCard, { + header: { + token: t.globalData.token + }, + data: { + cardTemplateUseBagId: "", + cardTemplateUseId: this.data.cardInfo.cardTemplateUseId, + cardTemplateUseStar: "", + cardTemplateUseTag: "", + cardTemplateUseTop: "" + } + }).then(function(t) { + console.log(t.data), wx.showToast({ + title: "加入卡包成功!" + }); + }).catch(function(t) {}); + }, + getBrowUserCard: function() { + var a = this; + a.setData({ + cardInfo: {}, + areaList: [] + }), t.http.get(t.urls.getBrowUserCard.format({ + userId: a.data.cardTemplateUseId + }), { + header: { + token: t.globalData.token + }, + data: {} + }).then(function(e) { + t.globalData.showUserId = e.data.creator, wx.stopPullDownRefresh({}); + var s = e.data.areaList; + s.forEach(function(t) { + "name" == t.templateAreaSource && a.setData({ + nameTxt: t.templateAreaFontValue + }); + }), a.setData({ + cardInfo: e.data, + areaList: s, + dataList: [] + }), e.data && (a.toSaveLocalImg(e.data.cardTemplateUseDispatchPhoto), a.getBrowCardUserList(e.data.cardTemplateUseId), + t.globalData.userId = e.data.creator, a.setData({ + tempUserId: e.data.creator + }), a.getMainColumn(e.data.creator), a.getMainBaseUserInfo(e.data.creator)); + }).catch(function(t) { + wx.stopPullDownRefresh({}); + }); + }, + makeCall: function() { + var t = this.data.phoneTxt; + t && wx.makePhoneCall({ + phoneNumber: t + }); + }, + copyText: function(t) { + var a = t.currentTarget.dataset.text; + a && wx.setClipboardData({ + data: a, + success: function() {} + }); + }, + checkPermission: function() { + var t = this; + try { + var a = wx.getStorageSync("name"), e = wx.getStorageSync("userIcon"); + a ? this.setData({ + name: a, + userIcon: e + }) : wx.showModal({ + title: "提示", + content: "小程序需要您微信头像以及昵称用于展示,请授权.", + showCancel: !1, + success: function(a) { + a.confirm && t.getUserProfile(3); + } + }); + } catch (t) { + t = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(t); + wx.showToast({ + title: "获取信息失败", + icon: "error" + }); + } + }, + getPhoneNumber: function(a) { + var e = this, s = a.detail.iv, o = a.detail.encryptedData; + console.log(o), o && (wx.showLoading({ + title: "绑定中..." + }), t.http.put(t.urls.doUpdatePhone, { + header: { + token: t.globalData.token + }, + data: { + iv: s, + encryptedData: o + } + }).then(function(a) { + wx.hideLoading({}), wx.setStorageSync("token", a.data.data), wx.setStorageSync("bindPhone", 0), + e.setData({ + isBindPhone: !0 + }), t.globalData.token = a.data.data, wx.showToast({ + title: "绑定成功", + success: function(t) { + wx.navigateTo({ + url: "/packagecard/cardList/cardList" + }); + } + }); + }).catch(function(t) {})); + }, + getUserProfile: function(a) { + var e = this; + wx.getUserProfile({ + desc: "获取微信头像以及昵称用于展示", + success: function(a) { + wx.setStorage({ + data: a.userInfo.nickName, + key: "name" + }), wx.setStorage({ + data: a.userInfo.avatarUrl, + key: "userIcon" + }), e.setData({ + name: a.userInfo.nickName, + userIcon: a.userInfo.avatarUrl + }), t.globalData.userIcon = a.userInfo.avatarUrl, t.globalData.userInfo = a.userInfo, + e.selectComponent("#head").refreshCart(); + }, + fail: function(t) { + wx.showToast({ + title: "获取信息失败", + icon: "error" + }); + } + }); + }, + buildId: function() { + for (var t = [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" ], a = "", e = 0; e < 36; e++) { + a += t[parseInt(61 * Math.random())]; + } + return a; + }, + showBarCode: function() { + this.setData({ + isNeedRefresh: !1 + }); + wx.navigateTo({ + url: "/packagecard/sharePage/cardcode?cardImg=" + this.data.cardInfo.cardTemplateUsePhotoUrl + "&id=" + this.data.cardInfo.cardTemplateUseBarcode + }); + }, + hideBarCode: function() { + this.setData({ + isShowBarCode: !1 + }), wx.showTabBar(); + }, + shareRecord: function(a) { + var e = this; + t.http.post(t.urls.shareRecord, { + header: { + token: t.globalData.token + }, + data: { + cardTemplateUseId: e.data.cardInfo.cardTemplateUseId, + cardTemplateDispatchParentId: "", + cardTemplateDispatchId: a + } + }).then(function(t) { + e.setData({ + shareRecordId: t.data.data + }); + }); + }, + onShareAppMessage: function(t) { + console.log(t); + wx.showShareMenu({ + withShareTicket: !0, + success: function(t) { + console.log(t); + } + }); + var a = t.target.dataset.sharetype; + if (!a || "2" != a) { + var e = this.buildId(); + return this.shareRecord(e), { + title: "您好,这是我的电子名片,请查看.", + path: "/pages/index/index?cardTemplateDispatchId=" + e, + imageUrl: this.data.shareImgUrl + }; + } + var s = t.target.dataset.item; + t.target.dataset.idx, t.target.dataset.index; + console.log(s); + }, + toSaveLocalImg: function(t) { + var a = t, e = wx.env.USER_DATA_PATH + "/indexshare.png", s = a.replace(/^data:image\/\w+;base64,/, ""); + wx.getFileSystemManager().writeFileSync(e, s, "base64"), this.setData({ + shareImgUrl: e + }); + }, + showDetail: function(t) { + if (-1 != t.currentTarget.dataset.ctype.indexOf("dda5007c-5fb7-48f2-8537-3cb8ea298242")) { + var a = t.currentTarget.dataset.cid, e = t.currentTarget.dataset.id, s = t.currentTarget.dataset.like, o = "&collectSwitch=" + t.currentTarget.dataset.collect + "&likeSwitch=" + s + "&commentSwitch=" + t.currentTarget.dataset.comment + "&shareSwitch=" + t.currentTarget.dataset.share; + wx.navigateTo({ + url: "/packagecard/moments/momentsdetail/momentsdetail?uId=" + e + "&cId=" + a + o + }); + } + }, + getCardId: function() { + var a = this; + t.http.get(t.urls.getCardUseId.format({ + cardTemplateDispatchId: a.data.cardTemplateDispatchId + }), { + header: { + token: t.globalData.token + } + }).then(function(t) { + a.setData({ + cardTemplateUseId: t.data.cardTemplateUseDTO.cardTemplateUseId + }), a.getCard(), a.saveCheckRecord(); + }); + }, + getCard: function() { + var a = this; + t.http.get(t.urls.shareCard.format({ + cardTemplateUseId: a.data.cardTemplateUseId + }), { + header: { + token: t.globalData.token + }, + data: {} + }).then(function(e) { + var s = e.data.areaList; + s.forEach(function(t) { + "name" == t.templateAreaSource && a.setData({ + nameTxt: t.templateAreaFontValue + }); + }), a.setData({ + cardInfo: e.data, + areaList: s, + dataList: [] + }), e.data && (a.toSaveLocalImg(e.data.cardTemplateUseDispatchPhoto), a.getBrowCardUserList(e.data.cardTemplateUseId), + t.globalData.userId = e.data.creator, a.setData({ + tempUserId: e.data.creator + }), a.getMainColumn(e.data.creator), a.getMainBaseUserInfo(e.data.creator)); + }).catch(function(t) {}); + }, + saveCheckRecord: function() { + t.http.post(t.urls.checkRecord, { + header: { + token: t.globalData.token + }, + data: { + cardTemplateUseId: this.data.cardTemplateUseId, + cardTemplateDispatchId: this.data.cardTemplateDispatchId + } + }).then(function(t) { + console.log(t); + }).catch(function(t) { + console.log(t); + }); + }, + onHide: function(t) { + this.setData({ + isShowCard: !1, + isShowPhone: !1 + }), a && a.stop(); + }, + showCardHistory: function(t) { + this.data.otherCardList.length > 0 ? this.setData({ + isShowCard: !0 + }) : this.getOtherCard(1); + }, + getOtherCard: function(a) { + var e = this; + e.setData({ + otherCardList: [] + }), t.http.get(t.urls.getBrowseHistoryList, { + header: { + token: t.globalData.token + }, + data: { + page: 1, + rows: 7, + homePage: 1 + } + }).then(function(t) { + t.data.rows.length > 0 && e.buildOtherCardList(t.data.rows), 1 == a && e.setData({ + isShowCard: !0 + }); + }).catch(function(t) {}); + }, + changeCard: function(t) { + var a = t.currentTarget.dataset.item, e = t.currentTarget.dataset.type; + 1 == e ? (this.setData({ + cardTemplateDispatchId: "", + cardTemplateUseId: "", + isShowCard: !1, + isMine: 1, + isDefault: !1 + }), this.getDefault()) : 2 == e ? (this.setData({ + cardTemplateUseId: "", + isShowCard: !1, + isMine: 2, + isDefault: !0 + }), this.getCard()) : 4 == e ? (this.setData({ + cardTemplateUseId: a.creator, + isShowCard: !1, + isMine: 3, + isDefault: !0, + isShowBrowseUser: !1 + }), this.getBrowUserCard()) : (this.setData({ + cardTemplateUseId: a.cardTemplateUseId, + isShowCard: !1, + isMine: 2, + isDefault: !0 + }), this.getCard()); + }, + buildOtherCardList: function(t) { + var a, e = this; + t.forEach(function(t) { + var s = t.cardTemplateUseDTO.areaList; + a = {}, s.forEach(function(t) { + "name" == t.templateAreaSource ? a.name = t.templateAreaFontValue : "phone" == t.templateAreaSource ? a.phone = t.templateAreaFontValue : "address" == t.templateAreaSource ? a.address = t.templateAreaFontValue : "department" == t.templateAreaSource && (a.department = t.templateAreaFontValue); + }), a.cardTemplateUseId = t.cardTemplateUseId, e.data.otherCardList.push(a); + }), e.setData({ + otherCardList: e.data.otherCardList + }); + }, + onShow: function(t) {}, + onCloseDialog: function() { + this.setData({ + isShowComment: !1 + }); + }, + showBrowseUser: function() { + this.data.browUserList.length > 0 && this.setData({ + isShowBrowseUser: !0 + }); + }, + showComment: function(t) { + var a = t.currentTarget.dataset.cid, e = t.currentTarget.dataset.uid, s = t.currentTarget.dataset.like, o = "&collectSwitch=" + t.currentTarget.dataset.collect + "&likeSwitch=" + s + "&commentSwitch=" + t.currentTarget.dataset.comment + "&shareSwitch=" + t.currentTarget.dataset.share; + console.log(o), wx.navigateTo({ + url: "/packagecard/moments/momentsdetail/momentsdetail?uId=" + e + "&cId=" + a + o + }); + }, + doLike: function(a) { + var e = this, s = a.currentTarget.dataset.item, o = a.currentTarget.dataset.idx, n = a.currentTarget.dataset.index, r = ""; + r = s.likeStatus ? "取消中..." : "保存中...", wx.showLoading({ + title: r + }), t.http.post(t.urls.doSaveLike, { + header: { + token: t.globalData.token + }, + data: { + businessId: s.uid, + projectId: "column" + } + }).then(function(t) { + wx.hideLoading({}), e.data.dataList[n].list[o].likeStatus = !s.likeStatus, s.likeStatus ? --e.data.dataList[n].list[o].likeCount : ++e.data.dataList[n].list[o].likeCount, + e.setData({ + dataList: e.data.dataList + }); + }).catch(function(t) {}); + }, + doCollect: function(a) { + var e = this, s = a.currentTarget.dataset.item, o = a.currentTarget.dataset.idx, n = a.currentTarget.dataset.index, r = ""; + r = s.collectStatus ? "取消收藏..." : "收藏中...", wx.showLoading({ + title: r + }), t.http.post(t.urls.doSaveCollect, { + header: { + token: t.globalData.token + }, + data: { + businessId: s.uid, + projectId: "column" + } + }).then(function(t) { + wx.hideLoading({}), e.data.dataList[n].list[o].collectStatus = !s.collectStatus, + e.setData({ + dataList: e.data.dataList + }); + }).catch(function(t) {}); + } +}); \ No newline at end of file diff --git a/pages/center/contact/contactDetail.json b/pages/center/contact/contactDetail.json new file mode 100644 index 0000000..5c974ac --- /dev/null +++ b/pages/center/contact/contactDetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "立即联系" +} \ No newline at end of file diff --git a/pages/center/contact/contactDetail.wxml b/pages/center/contact/contactDetail.wxml new file mode 100644 index 0000000..b384a82 --- /dev/null +++ b/pages/center/contact/contactDetail.wxml @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + 02/ + + + 加入卡包 + + + + 03/ + + + 名片码 + + + + + + + 拨打电话 + + {{phoneTxt}} + + + + + 添加微信 + + {{wechateTxt}} + + + + + 邮箱 + + {{emailTxt}} + + + + + 地址 + + {{addressTxt}} + + + + + + + + + + + + + {{cardInfo.cardTemplateUseScansNumber>999?'999+':cardInfo.cardTemplateUseScansNumber}} + + + + {{cardInfo.cardTemplateUseDispatchNumber>999?'999+':cardInfo.cardTemplateUseDispatchNumber}} + + + + + + + + + + + + + {{item.name}} + + + 更多 + + + + + + + + + + + + {{child.value}} + + + + + + + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{audio.curDurationStr}} + + {{audio.totalDurationStr}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + + + + {{child.comment}}: + {{child.selValue}} + + + + + + + + + {{child.comment}} + + + + {{ss.dataName}} + + + + + + + + + + + 收藏 + + + + {{it.commentCount>1000?'1000+':it.commentCount}} + + + + {{it.likeCount>1000?'1000+':it.likeCount}} + + + + + + + + + + + + + + + + + 十而百智慧名片 + + 一份信心,一份努力,一份成功;十分信心,十分努力,十分成功. + + + + diff --git a/pages/center/contact/contactDetail.wxss b/pages/center/contact/contactDetail.wxss new file mode 100644 index 0000000..3403f3c --- /dev/null +++ b/pages/center/contact/contactDetail.wxss @@ -0,0 +1,779 @@ +.container { + margin-bottom: 120rpx; +} + +.top-bg { + background-color: #ff4949; + border-bottom-left-radius: 80rpx; + border-bottom-right-radius: 80rpx; + left: 0; + padding: 20rpx 20rpx 150rpx; + position: absolute; + right: 0; + top: 0; + z-index: -10; +} + +.card-container { + box-sizing: border-box; +} + +.share-btn { + background: #eee; +} + +.card { + box-sizing: border-box; + overflow: hidden; + position: relative; + width: 100%; +} + +.area-box { + white-space: nowrap; + word-break: break-all; + z-index: 111; +} + +.card-bgImg { + width: 100%; +} + +.person { + padding: 20rpx; +} + +.dynamic-container { + background-color: #fff; + border-radius: 20rpx; + margin-top: -50rpx; + padding: 20rpx; + position: relative; +} + +.dynamic-title image { + height: 30rpx; + margin-top: -4rpx; + vertical-align: middle; + width: 30rpx; +} + +.catelog-title { + justify-content: space-between; + padding: 15rpx; + position: relative; +} + +.catelog-title,.catelog-title .action { + align-items: center; + display: flex; +} + +.catelog-title .action { + justify-content: center; + max-width: 100%; +} + +.title { + color: #000; + display: inline-block; + font-size: 30rpx; + position: relative; +} + +.title text { + margin-left: 20rpx; +} + +.column-box { + flex-direction: column; +} + +.column-box,.column-box-row { + background-color: #fff; + display: flex; + width: 100%; +} + +.column-box-row { + align-items: center; + flex-direction: row; + padding: 15rpx; +} + +.column-item { + margin: 0rpx; + padding: 7.5rpx 15rpx; +} + +.column-item:nth-child(1) { + padding: 15rpx 15rpx 7.5rpx; +} + +.column-item:last-child { + padding: 7.5rpx 15rpx 15rpx; +} + +.img-item { + border-radius: 5rpx; + width: 100%; +} + +.img-item:last-child,.img-item:nth-child(1) { + padding: 7.5rpx 0rpx; +} + +.column-content { + background-color: #fff; + border-radius: 10rpx; + box-shadow: 0 2px 2px #f0f0f0; + display: flex; + flex-direction: column; + width: 100%; + z-index: 2; +} + +.intro-title image,.serve-title image { + height: 30rpx; + margin-top: -4px; + vertical-align: middle; + width: 28rpx; +} + +.person-content { + background: #fff; + border-radius: 20rpx; + color: #000; + font-size: 30rpx; + letter-spacing: 2rpx; + line-height: 40rpx; + margin-top: -30rpx; + padding: 20rpx; + position: relative; + word-break: break-all; +} + +.company-title { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; +} + +.company-title image { + height: 140rpx; + width: 140rpx; +} + +.company-name { + align-items: center; + display: flex; + font-size: 34rpx; + height: 140rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 520rpx; +} + +.company-content { + background: #fff; + border-radius: 20rpx; + margin-top: -30rpx; + padding: 20rpx; + position: relative; +} + +.company-content image { + border-radius: 20rpx; + height: 300rpx; + width: 100%; +} + +.company .person-content { + margin-top: 0; +} + +.dynamic-title { + display: block; + margin: 0 auto; + width: 710rpx; +} + +.dynamic-box { + background: #fff; + border-radius: 20rpx; + height: 400rpx; + margin-bottom: 20rpx; + overflow: hidden; + position: relative; +} + +.dynamic-box image { + height: 400rpx; + width: 100%; +} + +.dynamic-text { + background: rgba(0,0,0,.6); + bottom: 0; + color: #fff; + font-size: 30rpx; + left: 0; + line-height: 60rpx; + padding: 0 10rpx; + position: absolute; + right: 0; +} + +.person-info { + border-bottom: 1px solid #eee; + display: flex; + justify-content: space-between; + padding-bottom: 20rpx; +} + +.avatar { + border-radius: 50%; + height: 120rpx; + overflow: hidden; + width: 120rpx; +} + +.avatar image { + height: 100%; + width: 100%; +} + +.person-name { + width: 530rpx; +} + +.name { + color: #000; + font-size: 32rpx; + margin: 15rpx 0 10rpx; +} + +.time { + color: #b2b2b2; +} + +.dynamic-content { + margin: 20rpx 0; +} + +.dynamic-img { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + position: relative; +} + +.dynamic-img image { + height: 160rpx; + margin-bottom: 10rpx; + margin-right: 2%; + width: 32%; +} + +.dynamic-img image:nth-child(3n) { + margin-right: 0; +} + +.dynamic-img-text { + background: rgba(0,0,0,.6); + bottom: 3rpx; + color: #fff; + font-size: 32rpx; + left: 0; + line-height: 70rpx; + padding: 0 20rpx; + position: absolute; + right: 0; +} + +.dynamic-good { + display: flex; + justify-content: space-between; + margin: 10rpx 0; +} + +.good-count { + color: #333; + font-size: 28rpx; +} + +.good-btn image { + height: 40rpx; + vertical-align: top; + width: 40rpx; +} + +.dynamic-reply { + background: #eee; + margin-top: 15rpx; + padding: 15rpx; +} + +.reply { + color: #000; + font-size: 32rpx; + margin-bottom: 5rpx; +} + +.reply-name { + display: inline; + font-weight: 700; +} + +.dynamic-reply-input { + margin-top: 10rpx; +} + +.dynamic-reply-input input { + border-bottom: 1px solid #eee; + height: 60rpx; + width: 100%; +} + +.creat-card { + background: #e6b980; + padding: 20rpx; +} + +.creat-card,.creat-card-box { + align-items: center; + border-radius: 50%; + bottom: 20rpx; + box-sizing: border-box; + flex-direction: column; + height: 140rpx; + justify-content: center; + position: fixed; + right: 20rpx; + width: 140rpx; + z-index: 100; +} + +.creat-card-box button { + height: 60rpx; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 80rpx; +} + +.creat-card-box image { + border-radius: 50%; + height: 100%; + width: 100%; +} + +.share-save { + display: flex; + justify-content: space-between; + text-align: center; +} + +.share-btn { + background: none; + border: 1px solid #e6b980; + color: #1296db; + font-weight: 400; +} + +.save-btn { + background: #1296db; + border: 1px solid #1296db; + color: #fff; + font-weight: 400; +} + +.bottom-btn { + margin-top: 20rpx; + padding: 0 20rpx; + white-space: nowrap; + width: 100%; +} + +.phone-box .icon { + height: 30rpx; + vertical-align: top; + width: 30rpx; +} + +.wechate-box .icon { + height: 30rpx; + vertical-align: top; + width: 35rpx; +} + +.email-box .icon { + height: 30rpx; + vertical-align: top; + width: 30rpx; +} + +.bottom-btn-box { + border: 1px solid #ddd; + border-radius: 10rpx; + box-sizing: border-box; + display: inline-block; + line-height: 30rpx; + margin-right: 10rpx; + min-width: 32%; + padding: 20rpx; +} + +.bottom-text { + margin-top: 10rpx; +} + +.good,.top-box { + width: 100%; +} + +.good { + background-color: #fff; + display: flex; + justify-content: space-between; + padding: 15rpx; +} + +.good-avatar,.good-click { + color: #333; + line-height: 45rpx; +} + +.good-avatar { + font-size: 0; + min-width: 180rpx; +} + +.good-click { + display: flex; +} + +.view-count { + border-right: 1px solid grey; + justify-content: center; +} + +.view-count,.view-count-no { + align-items: center; + color: grey; + display: flex; + flex-direction: row; + font-size: 36rpx; +} + +.view-count-no { + margin-left: 15rpx; +} + +.good-avatar image { + border-radius: 50%; + height: 100%; + width: 100%; +} + +.good-click image { + height: 38rpx; + width: 38rpx; +} + +.view-count image,.view-count-no image { + height: 32rpx; + width: 32rpx; +} + +.movie-item { + height: 280rpx; + padding-bottom: 0; + width: 100%; +} + +.avatar-list { + border: 2px solid #fff; + border-radius: 50%; + display: inline-block; + height: 45rpx; + margin-left: -15rpx; + position: relative; + vertical-align: top; + width: 45rpx; +} + +.avatar-list:first-child { + margin-left: 0; +} + +.mid { + background: #fff; + position: relative; +} + +.mid,.mid-box { + display: flex; + width: 100%; +} + +.mid-box { + align-items: left; + background-color: #fff; + border: 2rpx solid #eac390; + border-radius: 10rpx; + flex: 1; + flex-direction: column; + font-weight: 400; + justify-content: left; + padding: 15rpx; +} + +.mid-box:nth-child(1) { + background: #fff; +} + +.mid-box:nth-child(2) { + margin-left: 15rpx; +} + +.mid-box:last-child { + border: none; + border-radius: 10rpx; + margin-left: 15rpx; +} + +.mid-box image { + height: 48rpx; + width: 48rpx; +} + +.mid-box-text { + color: #000; +} + +.mid-box-text,.mid-box-text-white { + font-size: 28rpx; + font-weight: 700; + text-align: left; +} + +.mid-box-text-white { + color: #fff; +} + +.mid-btn { + background: #fff; + border: 1rpx solid #ebebeb; + border-radius: 15rpx; + box-shadow: 10rpx 10rpx 20rpx 20rpx #e4e4e426; + flex-direction: column; + flex-wrap: nowrap; + justify-content: center; + margin-top: 15rpx; + position: relative; + width: 100%; +} + +.mid-btn,.mid-btn-box { + display: flex; +} + +.mid-btn-box { + align-items: center; + box-sizing: border-box; + flex-direction: row; + flex-shrink: 0; + justify-content: space-between; +} + +.mid-btn-box:nth-child(1) { + padding: 15rpx 15rpx 7.5rpx; +} + +.mid-btn-box:nth-child(2),.mid-btn-box:nth-child(3) { + padding: 7.5rpx 15rpx; +} + +.mid-btn-box:nth-child(4) { + padding: 7.5rpx 15rpx 15rpx; +} + +.mid-btn-title { + align-items: center; + display: flex; + flex: 3; + flex-direction: row; + justify-content: flex-start; +} + +.mid-btn-title .image { + height: 48rpx; + width: 48rpx; +} + +.movie-box { + align-items: center; + display: flex; + flex-direction: row; + justify-content: center; +} + +.movie-box,.movie-box image { + border-radius: 10rpx; + height: 350rpx; + width: 100%; +} + +.mid-btn-title text { + color: #333; + font-size: 28rpx; + margin-left: 15rpx; +} + +.mid-btn-box image { + height: 80rpx; + width: 80rpx; +} + +.mid-btn-text { + width: 200rpx; +} + +.text-top { + color: #000; + font-size: 30rpx; + line-height: 45rpx; +} + +.text-bottom { + color: #898989; + font-size: 26rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.bar-code { + background: rgba(0,0,0,.6); +} + +.bar-code,.bar-code-tr { + bottom: 0; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 999; +} + +.bar-code-tr { + background: transparent; +} + +.bar-code .content { + align-items: center; + background: #fff; + border-radius: 10rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + left: 50%; + max-width: 96%; + min-height: 45%; + min-width: 60%; + padding: 20rpx; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.code-title { + font-weight: 700; +} + +.code-title,.code-txt { + color: #000; + font-size: 32rpx; +} + +.bar-code image { + height: 300rpx; + width: 300rpx; +} + +.func-box { + justify-content: space-between; + margin-top: 10rpx; +} + +.brow-box,.func-box { + align-items: center; + display: flex; + flex-direction: column; +} + +.brow-box { + background-color: #fff; + justify-content: center; + padding: 15rpx; + width: 100%; +} + +.brow-box-title { + color: #000; + font-size: 32rpx; +} + +.brow-item { + align-items: center; + border-bottom: 1rpx solid #f8f8f8; + display: flex; + flex-direction: row; + justify-content: space-between; + padding: 15rpx; + width: 100%; +} + +.brow-item image { + border-radius: 50%; + height: 48rpx; + width: 48rpx; +} + +.brow-item .uname { + color: #000; + font-size: 32rpx; +} + +.brow-container { + align-items: center; + display: flex; + flex-direction: column; + justify-content: center; + width: 100%; +} + +.brow-content { + background-color: #fff; + border-radius: 10rpx; + height: 650rpx; + margin-top: 100rpx; + padding: 15rpx; + width: 100%; +} + +.other-name { + align-items: center; + display: flex; + flex-direction: row; + font-size: 14px; + height: 120rpx; + justify-content: center; + overflow: hidden; + text-align: center; + text-overflow: ellipsis; + white-space: pre-line; +} \ No newline at end of file diff --git a/pages/checkIn/checkIn.js b/pages/checkIn/checkIn.js new file mode 100644 index 0000000..f719893 --- /dev/null +++ b/pages/checkIn/checkIn.js @@ -0,0 +1,45 @@ +var e = getApp(); + +Page({ + data: { + token: e.globalData.token, + sourceUrl: e.baseUrls.sourceUrl, + userIcon: "", + name: "", + isChecked: !1 + }, + getIsCheckedIn: function() { + var n = this; + e.restAjax.get(e.restAjax.path(e.apis.isCheckedIn, [ e.baseUrls.requestUrl, wx.getStorageSync("curCommunityId") ]), {}, { + headers: { + token: e.globalData.token + } + }, function(e, t) { + "yes" == t && n.setData({ + isChecked: !0 + }); + }, function(e, n) { + console.log(n); + }); + }, + doCheckIn: function() { + wx.navigateTo({ + url: "./checkInDetail" + }); + }, + onLoad: function(e) { + this.setData({ + userIcon: wx.getStorageSync("userIcon"), + name: wx.getStorageSync("name") + }); + }, + onReady: function() {}, + onShow: function() { + this.getIsCheckedIn(); + }, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/checkIn/checkIn.json b/pages/checkIn/checkIn.json new file mode 100644 index 0000000..0e27b60 --- /dev/null +++ b/pages/checkIn/checkIn.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "党员报到" +} \ No newline at end of file diff --git a/pages/checkIn/checkIn.wxml b/pages/checkIn/checkIn.wxml new file mode 100644 index 0000000..70b93b9 --- /dev/null +++ b/pages/checkIn/checkIn.wxml @@ -0,0 +1,20 @@ + + + + + + + + + + 立即报到 + + + + 我已承办社区事务(0) + + diff --git a/pages/checkIn/checkIn.wxss b/pages/checkIn/checkIn.wxss new file mode 100644 index 0000000..3cbfddb --- /dev/null +++ b/pages/checkIn/checkIn.wxss @@ -0,0 +1,79 @@ +.top-img image { + width: 100%; +} + +.person-info { + margin-top: -126rpx; + padding: 0 20rpx; + position: relative; +} + +.person-info-box { + background-color: #fff; + border-radius: 10rpx; + box-shadow: 0 2px 4px 0 rgba(0,0,0,.05); + display: flex; + justify-content: space-between; + padding: 20rpx; +} + +.person-info-box image { + border-radius: 50%; + height: 120rpx; + width: 120rpx; +} + +.user-info { + display: inline-block; + margin-left: 20rpx; + vertical-align: top; +} + +.user-name { + font-size: 36rpx; + font-weight: 700; + line-height: 70rpx; +} + +.check-status { + font-size: 30rpx; + height: 40rpx; + line-height: 40rpx; + margin-top: 0; +} + +.not-check { + background-color: #eee; + color: #ccc; +} + +.affair { + background-color: #fff; + box-sizing: border-box; + margin: 20rpx auto 0; + padding: 20rpx; + width: 710rpx; +} + +.affair text { + color: red; +} + +.affair-title { + border-left: 5px solid #ff4949; + color: #101010; + font-size: 32rpx; + padding-left: 20rpx; +} + +.checkin-btn { + background-color: #ff4949; + border-radius: 30rpx; + color: #fff; + font-size: 28rpx; + height: 60rpx; + line-height: 60rpx; + margin-top: 30rpx; + text-align: center; + width: 160rpx; +} \ No newline at end of file diff --git a/pages/checkIn/checkInDetail.js b/pages/checkIn/checkInDetail.js new file mode 100644 index 0000000..3bd9c45 --- /dev/null +++ b/pages/checkIn/checkInDetail.js @@ -0,0 +1,157 @@ +var a = getApp(); + +Page({ + data: { + token: a.globalData.token, + array: [], + index: 0, + sexSelected: "", + communityArray: [], + communityIndex: 0, + communitySelected: "", + neighbourArray: [ "请选择所在小区" ], + neighbourIndex: 0, + date: "请选择出生日期", + partyDate: "请选择入党时间", + floorNum: "", + roomNum: "", + affair: "", + realName: "", + workUnit: "", + isLoading: !1 + }, + bindPickerChange: function(a) { + this.setData({ + index: a.detail.value, + sexSelected: this.data.sexAll[a.detail.value - 1].dataId + }); + }, + bindDateChange: function(a) { + this.setData({ + date: a.detail.value + }); + }, + bindPartyDateChange: function(a) { + this.setData({ + partyDate: a.detail.value + }); + }, + bindCommunityPickerChange: function(a) { + this.setData({ + communityIndex: a.detail.value, + communitySelected: this.data.communityAll[a.detail.value - 1].communityId + }); + }, + bindNeighbourPickerChange: function(a) { + this.setData({ + neighbourIndex: a.detail.value + }); + }, + submitCheckIn: function() { + var e = this; + if (!e.data.isLoading) { + var t = { + userName: e.data.realName, + sexId: e.data.sexSelected, + sexName: e.data.sexAll[e.data.index - 1].dataName, + birthday: e.data.date, + joinTime: e.data.partyDate, + workUnit: e.data.workUnit, + workUnitValue: "非ID", + community: e.data.communitySelected, + residential: e.data.communityAll[e.data.neighbourIndex - 1].residential, + residentialValue: e.data.communityAll[e.data.neighbourIndex - 1].residentialValue, + building: e.data.floorNum, + buildingValue: "非ID", + houseNumber: e.data.roomNum, + houseNumberValue: "非ID", + ability: e.data.affair, + areaCode: wx.getStorageSync("areaCode") + }; + e.setData({ + isLoading: !0 + }), a.restAjax.post(a.restAjax.path(a.apis.submitCheckIn, [ a.baseUrls.requestUrl ]), t, { + headers: { + token: a.globalData.token + } + }, function(a, t) { + wx.showToast({ + title: "报到成功", + icon: "success" + }), setTimeout(function() { + e.setData({ + isLoading: !1 + }), wx.navigateBack({ + delta: 1 + }); + }, 1500); + }, function(a, t) { + console.log(t), e.setData({ + isLoading: !1 + }); + }); + } + }, + getSex: function() { + var e = this; + a.restAjax.get(a.restAjax.path(a.apis.getDictionary, [ a.baseUrls.serviceUrl, "4ef46940-76ab-4758-b5f0-0cbc93ffc660" ]), {}, { + headers: { + token: a.globalData.token + } + }, function(a, t) { + console.log(t); + for (var n = [ "请选择性别" ], i = 0; i < t.length; i++) n.push(t[i].dataName); + e.setData({ + array: n, + sexAll: t + }); + }, function(a, e) { + console.log(e); + }); + }, + getMyCommunity: function() { + var e = this; + a.restAjax.get(a.restAjax.path(a.apis.mycommunity, [ a.baseUrls.requestUrl ]), {}, { + headers: { + token: a.globalData.token + } + }, function(a, t) { + for (var n = [ "请选择所在社区" ], i = e.data.neighbourArray, o = 0; o < t.length; o++) n.push(t[o].communityName), + "ID" == t[o].residentialValue ? e.getResidential(t[o].residential) : i.push(t[o].residential); + e.setData({ + communityArray: n, + communityAll: t + }); + }, function(a, e) { + console.log(e); + }); + }, + getResidential: function(e) { + var t = this; + a.restAjax.get(a.restAjax.path(a.apis.getResidential, [ a.baseUrls.communityUrl, e ]), {}, { + headers: { + token: a.globalData.token + } + }, function(a, e) { + var n = t.data.neighbourArray; + n.push(e.residentialName), t.setData({ + neighbourArray: n + }); + }, function(a, e) { + console.log(e); + }); + }, + onLoad: function(a) { + this.getSex(), this.getMyCommunity(), this.setData({ + curCommunityName: wx.getStorageSync("curCommunityName") ? wx.getStorageSync("curCommunityName") : "切换社区", + curCommunityId: wx.getStorageSync("curCommunityId") ? wx.getStorageSync("curCommunityId") : "" + }); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/checkIn/checkInDetail.json b/pages/checkIn/checkInDetail.json new file mode 100644 index 0000000..0e27b60 --- /dev/null +++ b/pages/checkIn/checkInDetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "党员报到" +} \ No newline at end of file diff --git a/pages/checkIn/checkInDetail.wxml b/pages/checkIn/checkInDetail.wxml new file mode 100644 index 0000000..ecdf37d --- /dev/null +++ b/pages/checkIn/checkInDetail.wxml @@ -0,0 +1,81 @@ + 温馨提示:绑定房屋需要您在首页加入并选择您所在的社区。 + + + 当前社区 + {{curCommunityName}} + + + + 姓名 + + + + + + 性别 + + + {{array[index]}} + + + + + 出生日期 + + + {{date}} + + + + + 入党时间 + + + {{partyDate}} + + + + + 工作单位 + + + + + + 所在居住社区 + + + {{communityArray[communityIndex]}} + + + + + 所在小区 + + + {{neighbourArray[neighbourIndex]}} + + + + + 所在楼栋 + + + + + + 单元/门牌号 + + + + + + 适合承办事务 + + + + + + + 立即报到 + diff --git a/pages/checkIn/checkInDetail.wxss b/pages/checkIn/checkInDetail.wxss new file mode 100644 index 0000000..831dcbf --- /dev/null +++ b/pages/checkIn/checkInDetail.wxss @@ -0,0 +1,78 @@ +.tips { + color: #101010; + font-size: 28rpx; + padding: 20rpx; +} + +.detail { + background-color: #fff; + padding: 0 20rpx; +} + +.row { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; +} + +.row-name { + color: rgba(36,40,46,.5); + font-size: 32rpx; + line-height: 80rpx; + width: 30%; +} + +.row-content { + height: 80rpx; + text-align: right; + width: 70%; +} + +.row-content input { + box-sizing: border-box; + color: #24282e; + height: 100%; + padding: 0 10rpx; + width: 100%; +} + +.input-color { + color: #24282e; +} + +.row-content picker { + color: #24282e; + line-height: 80rpx; +} + +.submit-join { + background-color: #fff; + bottom: 0; + left: 0; + padding: 20rpx; + position: fixed; + right: 0; +} + +.join-btn { + background-color: #ff4949; + border-radius: 40rpx; + font-size: 36rpx; + height: 80rpx; + line-height: 80rpx; + margin-top: 0; + text-align: center; +} + +.community { + background-color: #fff; + color: rgba(36,40,46,.5); + font-size: 30rpx; + line-height: 80rpx; + padding: 0 20rpx; +} + +.community-name { + border-bottom: 1px solid #ddd; + font-size: 32rpx; +} \ No newline at end of file diff --git a/pages/columnlist/columnlist.js b/pages/columnlist/columnlist.js new file mode 100644 index 0000000..b7b3517 --- /dev/null +++ b/pages/columnlist/columnlist.js @@ -0,0 +1,55 @@ +var t = getApp(); + +Page({ + data: { + groupId: "", + menuList: [], + title: "栏目", + imgUrl: t.baseUrls.baseCardUrl + }, + onLoad: function(t) { + this.setData({ + groupId: t.id, + title: t.title + }), wx.setNavigationBarTitle({ + title: t.title + }), this.getList(); + }, + getList: function() { + wx.showLoading({ + title: "加载中..." + }); + var e = this; + t.http.get(t.urls.getColumnListByGroupId, { + header: { + token: t.globalData.token + }, + data: { + configColumnGroupId: e.data.groupId + } + }).then(function(t) { + wx.hideLoading({}), e.setData({ + menuList: t.data + }); + }).catch(function(t) { + wx.hideLoading({}); + }); + }, + choosePage: function(t) { + var e = t.currentTarget.dataset.path, a = t.currentTarget.dataset.type, i = t.currentTarget.dataset.item; + switch (a) { + case "1": + case "3": + wx.navigateTo({ + url: e + "?id=" + i.configColumnId + "&mode=" + i.configTableMode + "&type=" + i.configColumnType + "&title=" + i.configColumnName + }); + break; + + case "2": + wx.navigateToMiniProgram({ + appId: "", + success: function(t) {} + }); + } + } +}); \ No newline at end of file diff --git a/pages/columnlist/columnlist.json b/pages/columnlist/columnlist.json new file mode 100644 index 0000000..91de62c --- /dev/null +++ b/pages/columnlist/columnlist.json @@ -0,0 +1,24 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + } +} \ No newline at end of file diff --git a/pages/columnlist/columnlist.wxml b/pages/columnlist/columnlist.wxml new file mode 100644 index 0000000..eff7f5a --- /dev/null +++ b/pages/columnlist/columnlist.wxml @@ -0,0 +1,21 @@ + + + + + + + + {{group.configColumnName}} + + + {{group.configColumnRemark}} + + + + + + + + + + diff --git a/pages/columnlist/columnlist.wxss b/pages/columnlist/columnlist.wxss new file mode 100644 index 0000000..e69de29 diff --git a/pages/community/changeCommunity.js b/pages/community/changeCommunity.js new file mode 100644 index 0000000..9f13fcc --- /dev/null +++ b/pages/community/changeCommunity.js @@ -0,0 +1,159 @@ +var e = require("../../@babel/runtime/helpers/defineProperty"), a = getApp(); + +Page({ + data: { + token: a.globalData.token, + sourceUrl: a.baseUrls.sourceUrl, + areaList: [], + areaIndex: 0, + areaAll: [], + areaSelected: "", + areaName: "", + communityList: [], + myCommunityList: [], + page: { + rows: 10, + page: 1, + areaCode: "" + } + }, + getAreaList: function() { + var t = this; + a.restAjax.get(a.restAjax.path(a.apis.getArea, [ a.baseUrls.serviceUrl, "110889" ]), {}, { + headers: { + token: a.globalData.token + } + }, function(a, r) { + for (var n = t.data.areaList, o = 0; o < r.length; o++) n.push(r[o].areaName); + t.setData(e({ + areaList: n, + areaAll: r, + areaSelected: r[0].areaCode, + areaName: r[0].areaName + }, "page.areaCode", r[0].areaCode)), t.getCommunity(); + }, function(e, a) { + console.log(a); + }); + }, + getCommunity: function() { + var t = this, r = t.data.page; + t.data.keywords && (r.keywords = t.data.keywords), a.restAjax.get(a.restAjax.path(a.apis.getCommunityListPage, [ a.baseUrls.communityUrl ]), r, { + headers: { + token: a.globalData.token + } + }, function(a, r) { + if (1 == t.data.page.page) t.setData({ + communityList: r.rows + }); else if (r.rows.length > 0) { + for (var n = t.data.communityList, o = 0; o < r.rows.length; o++) n.push(r.rows[o]); + t.setData({ + communityList: n + }); + } else t.setData(e({}, "page.page", t.data.page.page - 1)); + r.rows.length < 10 && t.setData({ + haveMore: !1 + }); + }, function(e, a) { + console.log(a); + }); + }, + bindAreaPickerChange: function(a) { + var t; + this.setData((t = { + areaIndex: a.detail.value, + areaSelected: this.data.areaAll[a.detail.value].areaCode + }, e(t, "page.areaCode", this.data.areaAll[a.detail.value].areaCode), e(t, "page.page", 1), + e(t, "haveMore", !0), t)), this.getCommunity(); + }, + getMyCommunity: function() { + var e = this; + a.restAjax.get(a.restAjax.path(a.apis.mycommunity, [ a.baseUrls.requestUrl ]), {}, { + headers: { + token: a.globalData.token + } + }, function(a, t) { + e.setData({ + myCommunityList: t + }); + }, function(e, a) { + console.log(a); + }); + }, + otherCommunity: function() { + wx.navigateTo({ + url: "./selectCommunity" + }); + }, + selectCommunity: function(e) { + var t = { + communityId: e.currentTarget.dataset.item.communityId, + communityName: e.currentTarget.dataset.item.communityName + }; + a.globalData.currentCommunity = t, wx.setStorage({ + data: e.currentTarget.dataset.item.communityName, + key: "curCommunityName" + }), wx.setStorage({ + data: e.currentTarget.dataset.item.communityId, + key: "curCommunityId" + }), wx.setStorage({ + data: e.currentTarget.dataset.item.locationCode, + key: "areaCode" + }), wx.setStorage({ + data: parseInt(e.currentTarget.dataset.item.areaLevel), + key: "areaLevel" + }), wx.reLaunch({ + url: "../index/index" + }); + }, + selectMyCommunity: function(e) { + var t = { + communityId: e.currentTarget.dataset.item.communityId, + communityName: e.currentTarget.dataset.item.communityName + }; + a.globalData.currentCommunity = t, wx.setStorage({ + data: e.currentTarget.dataset.item.communityName, + key: "curCommunityName" + }), wx.setStorage({ + data: e.currentTarget.dataset.item.communityId, + key: "curCommunityId" + }), wx.setStorage({ + data: e.currentTarget.dataset.item.areaCode, + key: "areaCode" + }), wx.setStorage({ + data: "4", + key: "areaLevel" + }), wx.reLaunch({ + url: "../index/index" + }); + }, + loadMore: function() { + this.setData(e({}, "page.page", this.data.page.page + 1)), this.getCommunity(); + }, + enterCurrentArea: function() { + wx.setStorage({ + data: this.data.areaAll[this.data.areaIndex].areaName, + key: "curCommunityName" + }), wx.setStorage({ + data: this.data.areaAll[this.data.areaIndex].areaId, + key: "curCommunityId" + }), wx.setStorage({ + data: this.data.page.areaCode, + key: "areaCode" + }), wx.setStorage({ + data: parseInt(this.data.areaAll[this.data.areaIndex].areaLevel), + key: "areaLevel" + }), wx.reLaunch({ + url: "../index/index" + }); + }, + onLoad: function(e) { + this.getAreaList(), this.getMyCommunity(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/community/changeCommunity.json b/pages/community/changeCommunity.json new file mode 100644 index 0000000..9b12438 --- /dev/null +++ b/pages/community/changeCommunity.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "城市社区" +} \ No newline at end of file diff --git a/pages/community/changeCommunity.wxml b/pages/community/changeCommunity.wxml new file mode 100644 index 0000000..4422123 --- /dev/null +++ b/pages/community/changeCommunity.wxml @@ -0,0 +1,29 @@ + + + + {{areaList[areaIndex]}} + + + + + 选择社区 + + + + {{areaList[areaIndex]}} + + 进入 + + + {{item.communityName}} + 进入 + + 加载更多 + + + 我的社区 + + {{item.communityName}} + 进入 + + diff --git a/pages/community/changeCommunity.wxss b/pages/community/changeCommunity.wxss new file mode 100644 index 0000000..f372ea5 --- /dev/null +++ b/pages/community/changeCommunity.wxss @@ -0,0 +1,132 @@ +page { + background-color: #fff; +} + +.select { + color: rgba(36,40,46,.5); + font-size: 32rpx; + line-height: 80rpx; +} + +.community-box { + border-bottom: 1px solid #f9fafc; + display: flex; + font-size: 30rpx; + height: 90rpx; + justify-content: space-between; + line-height: 50rpx; + padding: 20rpx 0; +} + +.other-community { + border: 1px solid red; + border-radius: 10rpx; + color: red; + font-size: 32rpx; + height: 80rpx; + line-height: 80rpx; + margin-top: 20rpx; + text-align: center; +} + +.area { + border-bottom: 1px solid #f9fafc; + border-bottom-left-radius: 40rpx; + border-bottom-right-radius: 40rpx; + box-shadow: 0 4rpx 20rpx 0 rgba(0,0,0,.05); + line-height: 100rpx; + padding: 0 40rpx; +} + +.area picker { + font-size: 32rpx; +} + +.area picker image { + margin: -6rpx 10rpx 0 0; + vertical-align: middle; + width: 32rpx; +} + +.picker { + display: inline-flex; + justify-content: space-between; + width: 92%; +} + +.picker image { + margin-top: 30rpx!important; +} + +.community-name image { + height: 50rpx; + vertical-align: top; + width: 50rpx; +} + +.community-status { + border: 1px solid #ff4949; + border-radius: 40rpx; + color: #ff4949; + height: 50rpx; + line-height: 50rpx; + padding: 0 30rpx; +} + +.community { + min-height: 600rpx; + padding: 0 20rpx; +} + +.current-area { + border-bottom: 1px solid #f9fafc; + display: flex; + justify-content: space-between; + padding: 20rpx 0; +} + +.area-text image { + height: 50rpx; + margin-right: 20rpx; + width: 50rpx; +} + +.area-text { + color: #000; + display: flex; + font-size: 32rpx; +} + +.area-join,.area-text { + height: 50rpx; + line-height: 50rpx; +} + +.area-join { + background-color: #ff4949; + border: 1px solid #ff4949; + border-radius: 40rpx; + color: #fff; + padding: 0 30rpx; +} + +.community-name { + color: #7e7f82; + padding-left: 70rpx; +} + +.load-more { + font-size: 32rpx; + line-height: 80rpx; + text-align: center; +} + +.my-community { + border-top: 2px solid #f9fafc; + padding: 0 20rpx; +} + +.my-community .community-name { + color: #000; + padding-left: 0; +} \ No newline at end of file diff --git a/pages/community/join/joinDetail.js b/pages/community/join/joinDetail.js new file mode 100644 index 0000000..615984a --- /dev/null +++ b/pages/community/join/joinDetail.js @@ -0,0 +1,123 @@ +var a = getApp(); + +Page({ + data: { + token: a.globalData.token, + array: [ "商业住宅小区", "个人自建房" ], + index: 0, + xqArray: [], + xqAll: [], + xqIndex: 0, + xqSelected: "", + communityName: "", + communityId: "", + locationCode: "", + houseName: "", + roomNum: "", + floorNum: "", + isLoading: !1 + }, + bindPickerChange: function(a) { + this.setData({ + index: a.detail.value + }); + }, + bindPickerChange1: function(a) { + var t; + t = 0 == a.detail.value ? "" : this.data.xqAll[a.detail.value - 1].residentialId, + this.setData({ + xqIndex: a.detail.value, + xqSelected: t + }); + }, + submitJoin: function() { + var t = this; + if (!t.data.isLoading) { + if (0 == t.data.xqIndex && !t.data.houseName) return void wx.showToast({ + title: "请选择小区", + icon: "error" + }); + if (!t.data.floorNum) return void wx.showToast({ + title: "请输入楼栋", + icon: "error" + }); + if (!t.data.roomNum) return void wx.showToast({ + title: "请输入门牌号", + icon: "error" + }); + var o, e; + t.data.xqSelected ? (o = t.data.xqSelected, e = "ID") : (o = t.data.houseName, e = "非ID"); + var i = { + communityId: t.data.communityId, + areaId: t.data.communityId, + areaCode: t.data.locationCode, + communityName: t.data.communityName, + buildingType: t.data.array[t.data.index], + residential: o, + residentialValue: e, + building: t.data.floorNum, + houseNumber: t.data.roomNum, + buildingValue: "非ID", + houseNumberValue: "非ID", + locationCode: t.data.locationCode + }; + t.setData({ + isLoading: !0 + }), a.restAjax.post(a.restAjax.path(a.apis.joinCommunity, [ a.baseUrls.requestUrl ]), i, { + headers: { + token: a.globalData.token + } + }, function(a, o) { + wx.showToast({ + title: "加入成功", + icon: "success" + }), setTimeout(function() { + t.setData({ + isLoading: !1 + }), wx.navigateBack({ + delta: 2 + }); + }, 1500); + }, function(a, o) { + console.log(o), wx.showToast({ + title: o.msg, + icon: "error" + }), t.setData({ + isLoading: !1 + }); + }); + } + }, + getHouseList: function() { + var t = this; + a.restAjax.get(a.restAjax.path(a.apis.getHouse, [ a.baseUrls.communityUrl ]), { + areaCode: t.data.locationCode + }, { + headers: { + token: a.globalData.token + } + }, function(a, o) { + for (var e = [ "请选择小区" ], i = 0; i < o.length; i++) e.push(o[i].residentialName); + t.setData({ + xqArray: e, + xqAll: o + }); + }, function(a, t) { + console.log(t); + }); + }, + onLoad: function(a) { + this.setData({ + communityName: a.communityName, + communityId: a.communityId, + locationCode: a.locationCode + }), this.getHouseList(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/community/join/joinDetail.json b/pages/community/join/joinDetail.json new file mode 100644 index 0000000..c4c5006 --- /dev/null +++ b/pages/community/join/joinDetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "加入社区/村委会" +} \ No newline at end of file diff --git a/pages/community/join/joinDetail.wxml b/pages/community/join/joinDetail.wxml new file mode 100644 index 0000000..df2a1d7 --- /dev/null +++ b/pages/community/join/joinDetail.wxml @@ -0,0 +1,38 @@ +居民信息 + + + 当前社区居委会 + {{communityName}} + + + 建筑物类型 + + + {{array[index]}} + + + + + 小区 + + + {{xqArray[xqIndex]}} + + + + + 楼栋 + + + + + + 门牌号 + + + + + + + 加入 + diff --git a/pages/community/join/joinDetail.wxss b/pages/community/join/joinDetail.wxss new file mode 100644 index 0000000..db7ddb6 --- /dev/null +++ b/pages/community/join/joinDetail.wxss @@ -0,0 +1,65 @@ +.page-title { + font-size: 32rpx; + line-height: 80rpx; + padding: 0 20rpx; +} + +.join-info { + background-color: #fff; + padding: 0 20rpx; +} + +.join-row { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; +} + +.row-content,.row-name { + font-size: 32rpx; + height: 80rpx; + line-height: 80rpx; +} + +.row-content { + color: #aaa; + text-align: right; + width: 65%; +} + +.row-name { + width: 35%; +} + +.text-row .row-name { + width: 15%; +} + +.text-row .row-content { + width: 85%; +} + +.row-content input { + box-sizing: border-box; + height: 100%; + padding: 0 10rpx; + width: 100%; +} + +.submit-join { + background-color: #fff; + bottom: 0; + left: 0; + padding: 20rpx; + position: fixed; + right: 0; +} + +.join-btn { + border-radius: 40rpx; + font-size: 36rpx; + height: 80rpx; + line-height: 80rpx; + margin-top: 0; + text-align: center; +} \ No newline at end of file diff --git a/pages/community/join/select.js b/pages/community/join/select.js new file mode 100644 index 0000000..85e7678 --- /dev/null +++ b/pages/community/join/select.js @@ -0,0 +1,92 @@ +var e = getApp(); + +Page({ + data: { + token: e.globalData.token, + areaList: [ "请选择地区" ], + areaIndex: 0, + areaAll: [], + areaSelected: "", + officeList: [ "请选择办事处" ], + officeIndex: 0, + officeAll: [], + officeSelected: "", + committeeList: [] + }, + joinCommunity: function(e) { + var t = e.currentTarget.dataset.item; + wx.navigateTo({ + url: "./joinDetail?communityId=" + t.communityId + "&communityName=" + t.communityName + "&locationCode=" + t.locationCode + }); + }, + getAreaList: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getArea, [ e.baseUrls.serviceUrl, "110889" ]), {}, { + headers: { + token: e.globalData.token + } + }, function(e, a) { + for (var i = t.data.areaList, o = 0; o < a.length; o++) i.push(a[o].areaName); + t.setData({ + areaList: i, + areaAll: a + }); + }, function(e, t) { + console.log(t); + }); + }, + bindAreaPickerChange: function(e) { + this.setData({ + areaIndex: e.detail.value, + areaSelected: this.data.areaAll[e.detail.value - 1].areaId + }), this.getOfficeList(); + }, + getOfficeList: function(t) { + var a = this; + e.restAjax.get(e.restAjax.path(e.apis.getArea, [ e.baseUrls.serviceUrl, a.data.areaSelected ]), {}, { + headers: { + token: e.globalData.token + } + }, function(e, t) { + for (var i = a.data.officeList, o = 0; o < t.length; o++) i.push(t[o].areaName); + a.setData({ + officeList: i, + officeAll: t + }); + }, function(e, t) { + console.log(t); + }); + }, + bindOfficePickerChange: function(e) { + this.setData({ + officeIndex: e.detail.value, + officeSelected: this.data.officeAll[e.detail.value - 1].areaId + }), this.getCommunityList(); + }, + getCommunityList: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getCommunityList, [ e.baseUrls.communityUrl ]), { + parentCode: t.data.officeSelected + }, { + headers: { + token: e.globalData.token + } + }, function(e, a) { + t.setData({ + committeeList: a + }); + }, function(e, t) { + console.log(t); + }); + }, + onLoad: function(e) { + this.getAreaList(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/community/join/select.json b/pages/community/join/select.json new file mode 100644 index 0000000..2833bf5 --- /dev/null +++ b/pages/community/join/select.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "加入社区居委会/村委会" +} \ No newline at end of file diff --git a/pages/community/join/select.wxml b/pages/community/join/select.wxml new file mode 100644 index 0000000..0e2a8f5 --- /dev/null +++ b/pages/community/join/select.wxml @@ -0,0 +1,25 @@ + + + 选择区域 + + + {{areaList[areaIndex]}} + + + + + 选择办事处 + + + {{officeList[officeIndex]}} + + + + + + 请选择社区居委会/村委会 + + {{item.communityName}} + 加入 + + diff --git a/pages/community/join/select.wxss b/pages/community/join/select.wxss new file mode 100644 index 0000000..5cd0677 --- /dev/null +++ b/pages/community/join/select.wxss @@ -0,0 +1,61 @@ +.select { + background-color: #fff; + padding: 0 20rpx; +} + +.select-box { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; +} + +.select-box:last-child { + border-bottom: none; +} + +.select-lv { + font-size: 32rpx; + line-height: 80rpx; + width: 30%; +} + +picker { + height: 80rpx; + line-height: 80rpx; +} + +.select-join { + background-color: #fff; + margin-top: 20rpx; + padding: 0 20rpx; +} + +.join-title { + color: red; + font-size: 32rpx; + line-height: 80rpx; +} + +.join-box,.join-title { + border-bottom: 1px solid #ddd; +} + +.join-box { + display: flex; + justify-content: space-between; +} + +.join-name { + font-size: 32rpx; + line-height: 80rpx; + max-width: 70%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.border-btn { + margin-top: 15rpx; + text-align: center; + width: 140rpx; +} \ No newline at end of file diff --git a/pages/community/joinCommunity.js b/pages/community/joinCommunity.js new file mode 100644 index 0000000..cb46b18 --- /dev/null +++ b/pages/community/joinCommunity.js @@ -0,0 +1,60 @@ +var t = getApp(); + +Page({ + data: { + token: t.globalData.token, + communityList: [], + sourceUrl: t.baseUrls.sourceUrl + }, + getMyCommunity: function() { + var e = this; + t.restAjax.get(t.restAjax.path(t.apis.mycommunity, [ t.baseUrls.requestUrl ]), {}, { + headers: { + token: t.globalData.token + } + }, function(t, o) { + e.setData({ + communityList: o + }); + }, function(t, e) { + console.log(e); + }); + }, + quitCommunity: function(e) { + var o = e.currentTarget.dataset.id, n = e.currentTarget.dataset.community, a = this; + wx.showModal({ + cancelColor: "#000000", + title: "确认退出该社区?", + success: function(e) { + e.confirm && t.restAjax.delete(t.restAjax.path(t.apis.quitCommunity, [ t.baseUrls.requestUrl, o ]), {}, { + headers: { + token: t.globalData.token + } + }, function(t, e) { + var o = wx.getStorageSync("curCommunityId"); + n == o && (wx.removeStorageSync("areaCode"), wx.removeStorageSync("curCommunityId"), + wx.removeStorageSync("curCommunityName"), wx.removeStorageSync("areaLevel")), wx.showToast({ + title: "退出成功" + }), a.getMyCommunity(); + }, function(t, e) { + console.log(e); + }); + } + }); + }, + selectCommunity: function() { + wx.navigateTo({ + url: "./join/select" + }); + }, + onLoad: function(t) {}, + onReady: function() {}, + onShow: function() { + this.getMyCommunity(); + }, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/community/joinCommunity.json b/pages/community/joinCommunity.json new file mode 100644 index 0000000..f6fc9af --- /dev/null +++ b/pages/community/joinCommunity.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "所在社区" +} \ No newline at end of file diff --git a/pages/community/joinCommunity.wxml b/pages/community/joinCommunity.wxml new file mode 100644 index 0000000..53cb45f --- /dev/null +++ b/pages/community/joinCommunity.wxml @@ -0,0 +1,20 @@ + + 社区机构入驻 + 单位/店铺入驻 + + + + 所在社区 + 所在单位 + + + + {{item.communityName}} + 退出 + + + + + + 选择加入社区居委会 / 村委会 + diff --git a/pages/community/joinCommunity.wxss b/pages/community/joinCommunity.wxss new file mode 100644 index 0000000..9665850 --- /dev/null +++ b/pages/community/joinCommunity.wxss @@ -0,0 +1,80 @@ +.join { + background-color: #fff; + justify-content: space-between; + padding: 20rpx; +} + +.join,.join-btn-box { + display: flex; +} + +.join-btn-box { + align-items: center; + border: 1px solid red; + border-radius: 10rpx; + color: red; + font-size: 30rpx; + height: 80rpx; + justify-content: center; + width: 45%; +} + +.joined { + background-color: #fff; + margin-top: 20rpx; + padding: 0 20rpx 20rpx; +} + +.joined-tab { + border-bottom: 1px solid #ddd; +} + +.joined-tab,.joined-tab-box { + display: flex; +} + +.joined-tab-box { + align-items: center; + flex: 1; + font-size: 32rpx; + height: 80rpx; + justify-content: center; +} + +.joined-tab-box.active { + color: red; +} + +.joined-box { + border-bottom: 1px solid #ddd; + display: flex; + height: 80rpx; + justify-content: space-between; +} + +.joined-name { + font-size: 32rpx; + line-height: 80rpx; +} + +.quit { + margin-top: 15rpx; +} + +.select-btn { + align-items: center; + border-radius: 10rpx; + display: flex; + height: 80rpx; + justify-content: center; + margin-top: 20rpx; +} + +.no-data { + padding: 50rpx 0; + text-align: center; +} + +.no-data image { + width: 300rpx; +} \ No newline at end of file diff --git a/pages/community/selectCommunity.js b/pages/community/selectCommunity.js new file mode 100644 index 0000000..821371f --- /dev/null +++ b/pages/community/selectCommunity.js @@ -0,0 +1,107 @@ +var e = require("../../@babel/runtime/helpers/defineProperty"), a = getApp(); + +Page({ + data: { + token: a.globalData.token, + sourceUrl: a.baseUrls.sourceUrl, + areaList: [], + areaAll: [], + index: 0, + areaSelected: "", + page: { + rows: 10, + page: 1, + areaCode: "" + }, + keywords: "", + communityList: [], + haveMore: !0 + }, + enterCommunity: function(e) { + var t = { + communityId: e.currentTarget.dataset.communityId, + communityName: e.currentTarget.dataset.communityName + }; + a.globalData.currentCommunity = t, wx.setStorage({ + data: e.currentTarget.dataset.communityName, + key: "curCommunityName" + }), wx.setStorage({ + data: e.currentTarget.dataset.communityId, + key: "curCommunityId" + }), wx.setStorage({ + data: e.currentTarget.dataset.location, + key: "locationCode" + }), wx.reLaunch({ + url: "../index/index" + }); + }, + getArea: function() { + var t = this; + a.restAjax.get(a.restAjax.path(a.apis.getArea, [ a.baseUrls.serviceUrl, "110889" ]), {}, { + headers: { + token: a.globalData.token + } + }, function(a, o) { + for (var n = [], r = 0; r < o.length; r++) n.push(o[r].areaName); + t.setData(e({ + areaList: n, + areaAll: o, + areaSelected: o[0].areaCode + }, "page.areaCode", o[0].areaCode)), t.getCommunity(); + }, function(e, a) { + console.log(a); + }); + }, + bindPickerChange: function(a) { + var t; + this.setData((t = { + index: a.detail.value, + areaSelected: this.data.areaAll[a.detail.value].areaCode + }, e(t, "page.areaCode", this.data.areaAll[a.detail.value].areaCode), e(t, "page.page", 1), + e(t, "haveMore", !0), t)), this.getCommunity(); + }, + getCommunity: function() { + var t = this, o = t.data.page; + t.data.keywords && (o.keywords = t.data.keywords), a.restAjax.get(a.restAjax.path(a.apis.getCommunityListPage, [ a.baseUrls.communityUrl ]), o, { + headers: { + token: a.globalData.token + } + }, function(a, o) { + if (1 == t.data.page.page) t.setData({ + communityList: o.rows + }); else if (o.rows.length > 0) { + for (var n = t.data.communityList, r = 0; r < o.rows.length; r++) n.push(o.rows[r]); + t.setData({ + communityList: n + }); + } else t.setData(e({}, "page.page", t.data.page.page - 1)); + o.rows.length < 10 && t.setData({ + haveMore: !1 + }); + }, function(e, a) { + console.log(a); + }); + }, + loadMore: function() { + this.setData(e({}, "page.page", this.data.page.page + 1)), this.getCommunity(); + }, + selectCommunity: function(e) { + var t = { + communityId: e.currentTarget.dataset.item.communityId, + communityName: e.currentTarget.dataset.item.communityName + }; + a.globalData.currentCommunity = t, wx.reLaunch({ + url: "../index/index" + }); + }, + onLoad: function(e) { + this.getArea(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/community/selectCommunity.json b/pages/community/selectCommunity.json new file mode 100644 index 0000000..c13659c --- /dev/null +++ b/pages/community/selectCommunity.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "选择您的社区" +} \ No newline at end of file diff --git a/pages/community/selectCommunity.wxml b/pages/community/selectCommunity.wxml new file mode 100644 index 0000000..3549d20 --- /dev/null +++ b/pages/community/selectCommunity.wxml @@ -0,0 +1,25 @@ + + + + + {{areaList[index]}} + + + + + + + + + + + + + + {{item.communityName}} + + 进入社区 + + + 加载更多 + diff --git a/pages/community/selectCommunity.wxss b/pages/community/selectCommunity.wxss new file mode 100644 index 0000000..669eea7 --- /dev/null +++ b/pages/community/selectCommunity.wxss @@ -0,0 +1,83 @@ +.search,page { + background-color: #fff; +} + +.search { + display: flex; + justify-content: space-between; + left: 0; + padding: 20rpx; + position: fixed; + right: 0; + top: 0; + z-index: 100; +} + +.area { + font-size: 30rpx; + line-height: 60rpx; + width: 20%; +} + +.search-box { + border-radius: 40rpx; + overflow: hidden; + position: relative; + width: 78%; +} + +.search-box input { + background-color: #eee; + box-sizing: border-box; + height: 60rpx; + padding: 0 60rpx 0 10rpx; + width: 100%; +} + +.search-icon-box { + height: 60rpx; + position: absolute; + right: 0; + top: 0; + width: 60rpx; +} + +.search-icon-box image { + height: 35rpx; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 35rpx; +} + +.list { + margin-top: 80rpx; +} + +.community-box,.community-name { + display: flex; + justify-content: space-between; +} + +.community-box { + border-top: 1px solid #ddd; + padding: 20rpx 0; +} + +.community-name image { + height: 100rpx; + margin-right: 20rpx; + width: 100rpx; +} + +.community-name-text { + font-size: 32rpx; + line-height: 100rpx; +} + +.load-more { + font-size: 32rpx; + line-height: 80rpx; + text-align: center; +} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..40a2de3 --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,258 @@ +var t = getApp(); + +Page({ + data: { + token: t.globalData.token, + page: { + page: 1, + rows: 5, + newsTypeId: "52baf515-304c-46f2-911a-355d889346f2", + showArea: "6dcbb862-4b48-4dca-aee1-d78fd76adc05", + areaCode: "" + }, + noticeList: [], + serviceUrl: t.baseUrls.serviceUrl, + baseImgUrl: t.baseUrls.baseImgUrl, + cardInfo: {}, + curCommunity: wx.getStorageSync("curCommunityName"), + sourceUrl: t.baseUrls.sourceUrl, + isBindPhone: !1, + cardTemplateDispatchId: "" + }, + changeCommunity: function () { + wx.navigateTo({ + url: "../community/changeCommunity" + }); + }, + joinCommunity: function () { + wx.navigateTo({ + url: "../community/joinCommunity" + }); + }, + doCheckIn: function () { + wx.getStorageSync("curCommunityId") ? wx.getStorageSync("areaLevel") < 4 ? wx.showToast({ + title: "请选择至社区级", + icon: "error" + }) : wx.navigateTo({ + url: "../checkIn/checkIn" + }) : wx.showToast({ + title: "请先选择社区", + icon: "none" + }); + }, + goTalk: function () { + wx.getStorageSync("curCommunityId") ? wx.getStorageSync("areaLevel") < 4 ? wx.showToast({ + title: "请选择至社区级", + icon: "error" + }) : wx.navigateTo({ + url: "../talk/talk" + }) : wx.showToast({ + title: "请先选择社区", + icon: "none" + }); + }, + goReport: function () { + wx.getStorageSync("curCommunityId") ? wx.getStorageSync("areaLevel") < 4 ? wx.showToast({ + title: "请选择至社区级", + icon: "error" + }) : wx.navigateTo({ + url: "../report/report" + }) : wx.showToast({ + title: "请先加入并选择社区", + icon: "none" + }); + }, + goServe: function () { + wx.getStorageSync("curCommunityId") ? wx.getStorageSync("areaLevel") < 4 ? wx.showToast({ + title: "请选择至社区级", + icon: "error" + }) : wx.navigateTo({ + url: "../serve/serve" + }) : wx.showToast({ + title: "请先加入并选择社区", + icon: "none" + }); + }, + checkMoreNews: function () { + wx.navigateTo({ + url: "../news/newsList" + }); + }, + getNotice: function () { + var e = this; + t.restAjax.get(t.restAjax.path(t.apis.getNewsList, [t.baseUrls.requestUrl]), { + page: 1, + rows: 5, + newsTypeId: "52baf515-304c-46f2-911a-355d889346f2", + showArea: "6dcbb862-4b48-4dca-aee1-d78fd76adc05", + areaCode: wx.getStorageSync("areaCode") + }, { + headers: { + token: t.globalData.token + } + }, function (t, a) { + e.setData({ + noticeList: a.rows + }); + }, function (e, t) { + console.log(t); + }); + }, + checkNewsDetail: function (e) { + var t = e.currentTarget.dataset.id; + wx.navigateTo({ + url: "../news/newsDetail?newsId=" + t + }); + }, + doLogin: function () { + var _self= this; + wx.login({ + success: function (a) { + t.restAjax.post(t.restAjax.path(t.apis.doLogin, [t.baseUrls.serviceUrl]), { + jsCode: a.code + }, {}, function (a, o) { + var n = o.data.split("_")[0]; + var r = o.data.split("_")[1]; + if (wx.setStorageSync("bindPhone", r), t.globalData.token = n, _self.setData({ + token: t.globalData.token, + isBindPhone: 0 == r + }), "" != _self.data.cardId && null != _self.data.cardId ? (console.log(_self.data.cardId), + _self.getCard()) : _self.getDefaultCard(), _self.getNotice(), "" != _self.data.cardTemplateDispatchId && null != _self.data.cardTemplateDispatchId) { + var s = "/pages/mine/otherCard/othercarddetail?cardTemplateUseId=" + _self.data.cardTemplateDispatchId; + wx.navigateTo({ + url: s + }); + } + }, function (e, t) { + console.log(t); + }); + } + }); + }, + getDictionary: function () { + t.restAjax.get(t.restAjax.path(t.apis.getDictionary, [t.baseUrls.serviceUrl, "5879c4fc-d357-44a1-9126-394af36ffe63"]), {}, { + headers: { + token: this.data.token + } + }, function (e, t) { + console.log(t); + }, function (e, t) { + console.log(t); + }); + }, + getCard: function () { + var e = this; + t.restAjax.get(t.restAjax.path(t.apis.getCardSyzlDetail, [t.baseUrls.requestUrl, e.data.cardId]), {}, { + headers: { + token: e.data.token + } + }, function (t, a) { + e.setData({ + cardInfo: a + }), wx.setStorage({ + data: a.areaCode, + key: "areaCode" + }); + }, function (e, t) { + console.log(t); + }); + }, + getDefaultCard: function () { + var e = this; + t.restAjax.get(t.restAjax.path(t.apis.getDefaultSyzlCard, [t.baseUrls.requestUrl]), {}, { + headers: { + token: e.data.token + } + }, function (t, a) { + e.setData({ + cardInfo: a + }); + }, function (e, t) { + console.log(t); + }); + }, + getPhoneNumber: function (e) { + var a = this, o = e.detail.iv, n = e.detail.encryptedData; + console.log(n), n && (wx.showLoading({ + title: "绑定中..." + }), t.http.put(t.urls.doUpdatePhone, { + header: { + token: t.globalData.token + }, + data: { + iv: o, + encryptedData: n + } + }).then(function (e) { + wx.hideLoading({}), wx.setStorageSync("token", e.data.data), wx.setStorageSync("bindPhone", 0), + a.setData({ + isBindPhone: !0 + }), t.globalData.token = e.data.data, wx.showToast({ + title: "绑定成功", + success: function (e) { } + }); + }).catch(function (e) { })); + }, + checkPermission: function () { + var e = this; + try { + var t = wx.getStorageSync("name"), a = wx.getStorageSync("userIcon"); + t ? this.setData({ + name: t, + userIcon: a + }) : wx.showModal({ + title: "提示", + content: "小程序需要您微信头像以及昵称用于展示,请授权.", + showCancel: !1, + success: function (t) { + t.confirm && e.getUserProfile(3); + } + }); + } catch (e) { + e = VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.handleException(e); + console.log(e), wx.showToast({ + title: "获取信息失败", + icon: "error" + }); + } + }, + getUserProfile: function (e) { + var a = this; + wx.getUserProfile({ + desc: "获取微信头像以及昵称用于展示", + success: function (e) { + wx.setStorage({ + data: e.userInfo.nickName, + key: "name" + }), wx.setStorage({ + data: e.userInfo.avatarUrl, + key: "userIcon" + }), a.setData({ + name: e.userInfo.nickName, + userIcon: e.userInfo.avatarUrl + }), t.globalData.userIcon = e.userInfo.avatarUrl, t.globalData.userInfo = e.userInfo; + }, + fail: function (e) { + wx.showToast({ + title: "获取个人信息失败", + icon: "error" + }); + } + }); + }, + onLoad: function (e) { + e.cardTemplateDispatchId && this.setData({ + cardTemplateDispatchId: e.cardTemplateDispatchId + }), this.doLogin(), this.checkPermission(), wx.setStorage({ + data: "1", + key: "gridMiniId" + }); + }, + onShow: function () { + this.setData({ + curCommunityName: wx.getStorageSync("curCommunityName") ? wx.getStorageSync("curCommunityName") : "切换社区", + curCommunityId: wx.getStorageSync("curCommunityId") ? wx.getStorageSync("curCommunityId") : "", + curCommunity: wx.getStorageSync("curCommunityName") + }, "page.areaCode", wx.getStorageSync("areaCode") ? wx.getStorageSync("areaCode") : ""); + } +}); \ No newline at end of file diff --git a/pages/index/index.json b/pages/index/index.json new file mode 100644 index 0000000..9b12438 --- /dev/null +++ b/pages/index/index.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "城市社区" +} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml new file mode 100644 index 0000000..b136af8 --- /dev/null +++ b/pages/index/index.wxml @@ -0,0 +1,65 @@ + + {{curCommunityName}} + + 加入 + + + + + + + + {{cardInfo.realName}} + + {{cardInfo.phone}} + + {{cardInfo.address}} + + + + + + + + + {{curCommunity}} + + + + + + 党员报到 + + + + 公众咨询 + + + + 述求上报 + + + + 社情民意 + + + + + 便民公告 + 查看更多 + + + + + + + + {{item.title}} + {{item.summary}} + + {{item.source}} + {{item.gmtCreate}} + + + + diff --git a/pages/index/index.wxss b/pages/index/index.wxss new file mode 100644 index 0000000..cc1dd6b --- /dev/null +++ b/pages/index/index.wxss @@ -0,0 +1,312 @@ +.community { + background-color: #ff4949; + border-bottom-left-radius: 80rpx; + border-bottom-right-radius: 80rpx; + color: #fff; + display: flex; + font-size: 32rpx; + justify-content: space-between; + padding: 20rpx 20rpx 150rpx; +} + +.change-community { + font-size: 40rpx; +} + +.change-community image { + margin-top: -10rpx; + vertical-align: middle; +} + +.change-community image,.join-community image { + height: 28rpx; + width: 28rpx; +} + +.card-container { + margin-top: -140rpx; + padding: 20rpx; + position: relative; +} + +.card { + background-color: #fff; + border-radius: 10rpx; + box-sizing: border-box; + height: 0; + margin-bottom: 20rpx; + overflow: hidden; + padding-bottom: 56%; +} + +.card,.mid { + position: relative; + width: 100%; +} + +.mid,.mid-box { + display: flex; +} + +.mid-box { + align-items: left; + background-color: #fff; + border: 2rpx solid #eac390; + border-radius: 10rpx; + flex-direction: column; + flex-shrink: 0; + font-weight: 400; + justify-content: left; + margin-right: 2%!important; + padding: 10rpx; + width: 32%!important; +} + +.mid-box:last-child { + margin-right: 0; +} + +.mid-box text { + color: #ccc; + font-size: 15px; + height: 16px; + line-height: 16px; + text-align: center; +} + +.mid-box image { + height: 48rpx; + width: 48rpx; +} + +.mid-box-text { + font-size: 28rpx; + text-align: left; +} + +.good { + justify-content: space-between; + padding-bottom: 20rpx; + padding-left: 20rpx; + padding-top: 20rpx; + width: 100%; +} + +.good,.good-click { + display: flex; +} + +.good-avatar { + font-size: 0; +} + +.good-avatar,.good-click { + color: #333; + line-height: 45rpx; +} + +.view-count { + border-right: 1px solid grey; + margin-right: 30rpx; +} + +.view-count,.view-count-no { + color: grey; + display: flex; + flex-direction: row; + font-size: 36rpx; + padding-right: 30rpx; +} + +.view-count-no { + align-items: center; +} + +.view-count image,.view-count-no image { + height: 32rpx; + width: 32rpx; +} + +.tab { + background-color: #fff; + display: flex; + justify-content: space-between; + padding: 30rpx 0; +} + +.tab-box { + flex: 1; + text-align: center; +} + +.tab-box image { + height: 80rpx; + width: 80rpx; +} + +.tab-text { + font-size: 30rpx; + overflow: hidden; + padding: 0 10rpx; + text-overflow: ellipsis; + white-space: nowrap; +} + +.notice { + background-color: #fff; + margin-top: 15rpx; + padding: 20rpx; +} + +.notice-title { + font-size: 36rpx; + font-weight: 700; + margin-bottom: 20rpx; +} + +.notice-box,.notice-title { + display: flex; + justify-content: space-between; +} + +.notice-box { + border-bottom: 1px solid #f9fafc; + padding: 20rpx 0; +} + +.notice-box:last-child { + border-bottom: none; +} + +.title-text { + line-height: 50rpx; + padding-left: 20rpx; + position: relative; +} + +.title-text:after { + background-color: #f55054; + content: ""; + display: block; + height: 39rpx; + left: 0; + position: absolute; + top: 7rpx; + width: 5px; +} + +.notice-title-text { + font-size: 34rpx; +} + +.notice-more { + color: #bbb; + font-size: 28rpx; + font-weight: 400; + line-height: 50rpx; +} + +.notice-time { + color: hsla(0,0%,6%,.7); + font-size: 28rpx; + line-height: 45rpx; + margin: 6rpx 0; +} + +.notice-img { + height: 140rpx; + text-align: center; + width: 200rpx; +} + +.notice-img image { + height: 100%; +} + +.notice-info { + width: 490rpx; +} + +.card-area { + position: absolute; +} + +.photo { + bottom: 0; + left: 10px; + top: 0; + width: 300rpx; +} + +.photo image { + height: 100%; + max-width: 100%; +} + +.name { + font-size: 36rpx; + font-weight: 700; + left: 340rpx; + top: 40rpx; +} + +.phone { + bottom: 160rpx; + color: #a8a8a8; + font-size: 28rpx; + left: 340rpx; + line-height: 30rpx; +} + +.phone image { + height: 30rpx; + margin-top: -8rpx; + vertical-align: middle; + width: 30rpx; +} + +.position { + bottom: 120rpx; +} + +.qr-code { + bottom: 30rpx; + height: 60rpx; + position: absolute; + right: 24rpx; + width: 60rpx; +} + +.qr-code image { + height: 100%; + width: 100%; +} + +.notice-from { + display: flex; + font-size: 28rpx; + justify-content: space-between; +} + +.notice-more image { + height: 24rpx; + margin-top: 14rpx; + vertical-align: top; +} + +.card-img { + position: absolute; +} + +.card-img,.card-img image { + height: 100%; + width: 100%; +} + +.white-name { + color: #fff; + font-size: 34rpx; + font-weight: 400; + left: 10rpx; + top: 26rpx; +} \ No newline at end of file diff --git a/pages/law/law.js b/pages/law/law.js new file mode 100644 index 0000000..71184a3 --- /dev/null +++ b/pages/law/law.js @@ -0,0 +1,11 @@ +Page({ + data: {}, + onLoad: function(n) {}, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/law/law.json b/pages/law/law.json new file mode 100644 index 0000000..78f7e38 --- /dev/null +++ b/pages/law/law.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "AI法律" +} \ No newline at end of file diff --git a/pages/law/law.wxml b/pages/law/law.wxml new file mode 100644 index 0000000..62b737e --- /dev/null +++ b/pages/law/law.wxml @@ -0,0 +1 @@ + diff --git a/pages/law/law.wxss b/pages/law/law.wxss new file mode 100644 index 0000000..e69de29 diff --git a/pages/mine/myCard/myCard.js b/pages/mine/myCard/myCard.js new file mode 100644 index 0000000..3d11e9c --- /dev/null +++ b/pages/mine/myCard/myCard.js @@ -0,0 +1,190 @@ +var t = require("../../../@babel/runtime/helpers/defineProperty"), a = getApp(); + +Page({ + data: { + imgUrl: a.baseUrls.baseCardUrl, + cardList: [], + otherCardList: [], + historyList: [], + tab: 0, + oldArr: [], + token: "", + page: { + rows: 10, + page: 1 + }, + topHeight: a.globalData.CustomBar, + isRefresh: !1, + isDelPage: !1, + tabList: [ { + name: "我的名片" + }, { + name: "他人名片" + }, { + name: "浏览历史" + } ], + pageType: null, + id: "" + }, + onLoad: function(t) { + this.setData({ + token: a.globalData.token, + pageType: t.type, + id: t.id + }), this.getList(); + }, + onShow: function() { + this.data.isRefresh && (this.setData({ + isRefresh: !1 + }), wx.startPullDownRefresh({})); + }, + getList: function() { + var t = this; + wx.showLoading({ + title: "加载中..." + }), wx.showNavigationBarLoading(), a.http.get(a.urls.getMyCard, { + header: { + token: a.globalData.token + }, + data: {} + }).then(function(a) { + wx.hideLoading({}), t.setData({ + cardList: a.data + }), a.data.length > 0 && t.data.isDelPage && (t.setData({ + isDelPage: !1 + }), t.setDefaultCard(a.data[0].cardTemplateUseId)), wx.hideNavigationBarLoading(), + wx.stopPullDownRefresh(); + }).catch(function(t) { + wx.hideLoading({}), wx.hideNavigationBarLoading(), wx.stopPullDownRefresh(); + }); + }, + goDetail: function(t) { + var a = t.currentTarget.dataset.id; + wx.navigateTo({ + url: "../myCardDetail/myCardDetail?id=" + a + "&type=" + this.data.pageType + "&taskId=" + this.data.id + }); + }, + getOtherCard: function() { + wx.showLoading({ + title: "加载中..." + }); + var e = this; + a.http.get(a.urls.otherCardList, { + header: { + token: a.globalData.token + }, + data: {} + }).then(function(a) { + var s; + wx.hideLoading({}), wx.stopPullDownRefresh({}), a.data.rows.length > 0 ? (s = e.data.otherCardList.concat(a.data.rows), + e.setData({ + otherCardList: s + })) : e.setData(t({}, page.page, e.data.page.page - 1)); + }).catch(function(t) { + wx.hideLoading({}), wx.stopPullDownRefresh({}); + }); + }, + getHistory: function() { + wx.showLoading({ + title: "加载中..." + }); + var e = this; + a.http.get(a.urls.getBrowseHistoryList, { + header: { + token: a.globalData.token + } + }).then(function(a) { + var s; + if (wx.hideLoading({}), wx.stopPullDownRefresh({}), a.data.rows.length > 0) s = e.data.historyList.concat(a.data.rows), + e.setData({ + historyList: s + }); else { + e.setData(t({}, "_self.data.page.page", e.data.page.page - 1)); + } + }).catch(function(t) { + wx.hideLoading({}), wx.stopPullDownRefresh({}), console.log(t); + }); + }, + changeTab: function(t) { + var a = t.detail.index; + this.data.tab != a && (this.setData({ + tab: a + }), 0 == a ? (this.setData({ + cardList: [], + page: { + rows: 10, + page: 1 + } + }), this.getList()) : 1 == a ? (this.setData({ + otherCardList: [], + page: { + rows: 10, + page: 1 + } + }), this.getOtherCard()) : 2 == a && (this.setData({ + historyList: [], + page: { + rows: 10, + page: 1 + } + }), this.getHistory())); + }, + toggleTop: function(t) { + var e = this, s = t.currentTarget.dataset.bag, i = t.currentTarget.dataset.top; + i = "0" == i, a.http.put(a.urls.setTop.format({ + cardTemplateUseBagId: s, + cardTemplateUseTop: i + }), { + header: { + token: a.globalData.token + }, + data: {} + }).then(function(t) { + console.log(t.data), wx.showToast({ + title: "设置成功!" + }), e.setData({ + otherCardList: [] + }), e.getOtherCard(); + }); + }, + onPullDownRefresh: function() { + "0" == this.data.tab ? (this.setData({ + cardList: [], + page: { + rows: 10, + page: 1 + } + }), this.getList()) : "1" == this.data.tab ? (this.setData({ + otherCardList: [], + page: { + rows: 10, + page: 1 + } + }), this.getOtherCard()) : "2" == this.data.tab && (this.setData({ + historyList: [], + page: { + rows: 10, + page: 1 + } + }), this.getHistory()); + }, + onReachBottom: function() { + 1 == this.data.tab && (this.setData(t({}, page.page, this.data.page.page++)), this.getOtherCard()); + }, + showCard: function(t) { + wx.navigateTo({ + url: "../otherCard/othercarddetail?cardTemplateUseId=" + t.currentTarget.dataset.id + }); + }, + setDefaultCard: function(t) { + a.http.put(a.urls.setDefaultCard.format({ + cardTemplateUseId: t + }), { + header: { + token: this.data.token + } + }).then(function(t) { + wx.startPullDownRefresh({}); + }).catch(function(t) {}); + } +}); \ No newline at end of file diff --git a/pages/mine/myCard/myCard.json b/pages/mine/myCard/myCard.json new file mode 100644 index 0000000..817a99b --- /dev/null +++ b/pages/mine/myCard/myCard.json @@ -0,0 +1,26 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "enablePullDownRefresh": true, + "navigationBarTitleText": "我的名片" +} \ No newline at end of file diff --git a/pages/mine/myCard/myCard.wxml b/pages/mine/myCard/myCard.wxml new file mode 100644 index 0000000..7589402 --- /dev/null +++ b/pages/mine/myCard/myCard.wxml @@ -0,0 +1,58 @@ + + + + + + + + + + + 主名片 + + + + + + + + + + + + + + + 取消置顶 + 置顶 + + + + + + + + + + + + + + + 置顶 + + + + + + + {{list.creatorName}} + + 浏览时间:{{list.gmtCreate}} + + + + + + + diff --git a/pages/mine/myCard/myCard.wxss b/pages/mine/myCard/myCard.wxss new file mode 100644 index 0000000..9138554 --- /dev/null +++ b/pages/mine/myCard/myCard.wxss @@ -0,0 +1,139 @@ +.list { + padding: 100rpx 15rpx 15rpx; + position: relative; + z-index: 1; +} + +.card { + border-radius: 10rpx; + box-shadow: 0 0 20rpx #eee; + margin: 0rpx 0rpx 15rpx; + padding: 15rpx; +} + +.card-container { + height: 0; + position: relative; +} + +.card-img { + bottom: 0; + left: 0; + position: absolute; + right: 0; + top: 0; +} + +.card-img image { + height: 100%; + width: 100%; +} + +.card-name-sm { + align-items: center; + font-size: 25rpx; + margin-top: 15rpx; +} + +.main { + background: #e6b980; + opacity: .8; +} + +.main,.main-red { + border-bottom-right-radius: 20rpx; + border-top-left-radius: 20rpx; + color: #fff; + padding: 5rpx 15rpx; + position: absolute; + right: -15rpx; + top: -15rpx; + z-index: 10; +} + +.main-red { + background: red; + opacity: .5; +} + +.tab { + background: #fff; + height: 80rpx; + left: 0; + position: fixed; + right: 0; + z-index: 100; +} + +.tab,.tab-box { + display: flex; +} + +.tab-box { + align-items: center; + color: #000; + flex: 1; + font-size: 32rpx; + justify-content: center; +} + +.tab-box.active { + border-bottom: 2px solid #e6b980; + box-sizing: border-box; + color: #e6b980; +} + +.card { + background: #fff; + box-sizing: border-box; + position: relative; + width: 100%; + z-index: 100; +} + +.card-bgImg { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.area-box { + white-space: nowrap; +} + +.card-name { + font-size: 36rpx; +} + +.other-card { + justify-content: space-between; +} + +.card-img-box,.other-card { + display: flex; +} + +.card-img-box { + align-items: center; + flex-direction: row; + margin-right: 40rpx; +} + +.card-img-box image { + height: 200rpx; + width: 200rpx; +} + +.set-top { + background: #e6b980; + border-radius: 5rpx; + color: #fff; + padding: 0rpx 15rpx; +} + +.set-top:active { + background: #f5f5f5; + color: #000; +} \ No newline at end of file diff --git a/pages/mine/myCardDetail/myCardDetail.js b/pages/mine/myCardDetail/myCardDetail.js new file mode 100644 index 0000000..7a14d45 --- /dev/null +++ b/pages/mine/myCardDetail/myCardDetail.js @@ -0,0 +1,330 @@ +var t = require("../../../@babel/runtime/helpers/defineProperty"), e = getApp(); + +Page({ + data: { + preview: "", + showHide: !1, + isLoading: !1, + isMain: "", + cardPersonId: "", + choose_index: 0, + active: 0, + cardUrl: e.baseUrls.baseCardUrl, + areaList: [], + cardInfo: {}, + bgImg: "", + fontFamilyList: [], + useFontFamily: "", + cardId: "", + cardHeight: "", + shareTicket: "", + encryptedData: "", + iv: "", + isFromOut: !1, + token: "", + oldToken: "", + imgTempSrc: "", + currentIndex: 0, + windowWidth: e.globalData.windowWidth, + isShowBind: !1, + id: "" + }, + deleteCard: function() { + var t = this; + wx.showModal({ + cancelColor: "#000", + title: "提示", + content: "确认删除该名片?", + success: function(a) { + a.confirm && e.http.delete(e.urls.deleteCard.format({ + ids: t.data.cardId + }), { + header: { + token: t.data.token + } + }).then(function(e) { + "200" == e.statusCode && wx.showToast({ + title: "删除成功", + icon: "success", + success: function() { + var e = getCurrentPages(), a = e.length >= 2 ? e[e.length - 2] : void 0, r = "1" == t.data.cardInfo.cardTemplateUseDefault; + a.setData({ + isRefresh: !0, + isDelPage: r + }), wx.navigateBack({}); + } + }); + }).catch(function(t) {}); + } + }); + }, + updateCard: function(t) { + for (var a = [], r = 0; r < this.data.areaList.length; r++) { + var o = { + cardTemplateUseId: this.data.areaList[r].cardTemplateUseId, + cardTemplateUseAreaId: this.data.areaList[r].cardTemplateUseAreaId, + templateAreaFile: this.data.areaList[r].templateAreaFile, + templateAreaFontValue: this.data.areaList[r].templateAreaFontValue + }; + a.push(o); + } + var n = { + cardTemplateUseAreaList: a, + cardTemplateUseDefault: this.data.cardInfo.cardTemplateUseDefault, + cardTemplateUsePassword: this.data.cardInfo.cardTemplateUsePassword, + cardTemplateUseSwitch: this.data.cardInfo.cardTemplateUseSwitch, + cardTemplateUseId: this.data.cardInfo.cardTemplateUseId + }; + e.http.put(e.urls.updateMyCard.format({ + cardTemplateUseId: this.data.cardId + }), { + header: { + token: e.globalData.token + }, + data: n + }).then(function(t) { + "200" == t.statusCode && wx.showToast({ + title: "修改成功", + icon: "success", + success: function() { + var t = getCurrentPages(); + (t.length >= 2 ? t[t.length - 2] : void 0).setData({ + isRefresh: !0 + }), wx.navigateBack({}); + } + }); + }).catch(function(t) {}); + }, + onShow: function(t) { + "" != this.data.imgTempSrc && this.doUploadImg(this.data.imgTempSrc); + }, + inputBlur: function(t) { + var e = t.detail.value, a = t.currentTarget.dataset.num, r = t.currentTarget.dataset.item, o = r.templateAreaFontLength; + "" != e && o > 0 && (e = e.substr(0, o), this.data.areaList[a].templateAreaFontValue = e, + this.data.areaList[a].focus = !1, this.setData({ + areaList: this.data.areaList + })), "1" != r.templateAreaServerLink && this.getFileId(a); + }, + choosePhoto: function(t) { + var e = t.currentTarget.dataset.cur, a = t.currentTarget.dataset.item; + this.setData({ + currentIndex: e + }); + var r = a.templateAreaWidth / a.templateAreaHeight; + wx.chooseImage({ + count: 1, + sourceType: [ "album", "camera" ], + success: function(t) { + wx.navigateTo({ + url: "/packagecard/common/corpperimg/cropperimg?imgSrc=" + t.tempFiles[0].path + "&scale=" + r + }); + } + }); + }, + doUploadImg: function(a) { + var r = this; + wx.showLoading({ + title: "上传中..." + }), e.http.upload(e.urls.doUploadImg, { + path: a, + name: "image", + header: { + token: e.globalData.token + } + }).then(function(e) { + wx.hideLoading({}), e = JSON.parse(e); + var a = "areaList[" + r.data.currentIndex + "].templateAreaFile"; + r.setData(t({}, a, e.data)), wx.showToast({ + title: "上传成功", + duration: 1500 + }), r.setData({ + imgTempSrc: "", + currentIndex: 0 + }); + }).catch(function(t) { + r.setData({ + imgTempSrc: "", + currentIndex: 0 + }); + }); + }, + getPhoneNumber: function(t) { + console.log(t.detail.errMsg), console.log(t.detail.iv), console.log(t.detail.encryptedData); + }, + getNameCard: function() { + var t = this; + e.http.get(e.urls.getMyCardDetail.format({ + cardTemplateUseId: t.data.cardId + }), { + header: { + token: e.globalData.token + }, + data: {} + }).then(function(e) { + var a = e.data.areaList, r = e.data.cardTemplateUseWidth / t.data.windowWidth; + console.log(r + "===" + t.data.windowWidth), e.data.cardTemplateUseWidth = e.data.cardTemplateUseWidth / r, + e.data.cardTemplateUseHeight = e.data.cardTemplateUseHeight / r; + for (var o = 0; o < a.length; o++) a[o].templateAreaFontSize = a[o].templateAreaFontSize / r + "px", + a[o].templateAreaHeight = a[o].templateAreaHeight / r, a[o].templateAreaWidth = a[o].templateAreaWidth / r, + a[o].templateAreaDown = a[o].templateAreaDown / r, a[o].templateAreaTop = a[o].templateAreaTop / r, + a[o].templateAreaRight = a[o].templateAreaRight / r, a[o].templateAreaLeft = a[o].templateAreaLeft / r, + "1" == a[o].templateAreaFontCenter ? a[o].templateAreaFontCenter = "left" : "2" == a[o].templateAreaFontCenter ? a[o].templateAreaFontCenter = "center" : a[o].templateAreaFontCenter = "right", + "0" == a[o].templateAreaFontBold ? a[o].templateAreaFontBold = "normal" : "1" == a[o].templateAreaFontBold ? a[o].templateAreaFontBold = "bold" : a[o].templateAreaFontStyle = "italic"; + t.setData({ + cardInfo: e.data, + areaList: a + }); + }).catch(function(t) {}); + }, + saveCardIdToSyzl: function(t) { + console.log(t); + var a = { + cardSysId: t + }; + console.log(e.globalData.gridMiniCardId), e.restAjax.put(e.restAjax.path(e.apis.doUpdateCard, [ e.baseUrls.requestUrl, this.data.id ]), a, { + headers: { + token: this.data.token + } + }, function(t, e) { + console.log(e), wx.showToast({ + title: "设置成功", + icon: "success", + success: function() { + var t = getCurrentPages(); + (t.length >= 2 ? t[t.length - 2] : void 0).setData({ + isRefresh: !0 + }), wx.navigateBack({}); + } + }); + }, function(t, e) { + console.log(e); + }); + }, + saveOrgCard: function(t) { + var a = { + cardSysId: t + }; + e.restAjax.put(e.restAjax.path(e.apis.doUpdateOrg, [ e.baseUrls.requestUrl, this.data.id ]), a, { + headers: { + token: this.data.token + } + }, function(t, e) { + wx.showToast({ + title: "设置成功", + icon: "success", + success: function() { + var t = getCurrentPages(); + (t.length >= 2 ? t[t.length - 2] : void 0).setData({ + isRefresh: !0 + }), wx.navigateBack({}); + } + }); + }, function(t, e) { + console.log(e); + }); + }, + getNameCradArea: function() { + var t = this, a = []; + e.restAjax.get(e.restAjax.path("{cardUrl}app/cardtemplatearea/listcardtemplateareabytemplateid/" + t.data.cardId, [ e.tradeUrl ]), {}, { + headers: { + token: e.globalData.token + } + }, function(e, r) { + for (var o = 0; o < r.length; o++) if (r[o].focus = !1, "1" != r[o].templateAreaType) a.push(r[o]); else { + var n = parseInt(r[o].templateAreaFontSize.replace("px", "")); + n = Math.floor(750 * n / wx.getSystemInfoSync().windowWidth) + "rpx", r[o].templateAreaFontSize = n, + a.push(r[o]); + } + t.setData({ + areaList: a + }); + }, function(t, a) { + e.dialog.msg(a.msg); + }); + }, + editInfo: function(e) { + var a = e.currentTarget.dataset.num, r = e.detail.value, o = "areaList[" + a + "].templateAreaFontValue"; + this.setData(t({}, o, r)); + }, + giveFocus: function(e) { + var a = "areaList[" + e.currentTarget.dataset.cur + "].focus"; + this.setData(t({}, a, !0)); + }, + continueCreate: function() { + this.setData({ + showHide: !1 + }); + }, + backList: function() { + wx.navigateBack({ + delta: 1 + }); + }, + getUserInfo: function() { + e.restAjax.get(e.restAjax.path("{loginUrl}app/user/get-app-user", [ e.personIntroUrl ]), {}, { + headers: { + token: e.globalData.token + } + }, function(t, a) { + e.globalData.userInfo = a; + }, function(t, a) { + e.dialog.msg(a.msg); + }); + }, + getFileId: function(a) { + var r = this, o = a, n = r.data.areaList[o].templateAreaFontValue, s = r.data.areaList[o].picturesTemplateAreaId; + e.http.get(e.urls.getFileId.format({ + picturesTemplateAreaId: s + }), { + header: { + token: e.globalData.token + }, + data: { + content: n + } + }).then(function(e) { + console.log(e.data); + var a = "areaList[" + o + "].templateAreaFile"; + r.setData(t({}, a, e.data.data)); + }).catch(function(t) {}); + }, + setDefaultCard: function() { + var t = this; + e.http.put(e.urls.setDefaultCard.format({ + cardTemplateUseId: t.data.cardId + }), { + header: { + token: t.data.token + } + }).then(function(e) { + console.log(e), "200" == e.statusCode && (console.log(t.data.pageType), "org" == t.data.pageType ? t.saveOrgCard(t.data.cardId) : t.saveCardIdToSyzl(t.data.cardId)); + }).catch(function(t) {}); + }, + onLoad: function(t) { + this.setData({ + cardId: t.id, + token: e.globalData.token, + pageType: t.type, + id: t.taskId + }), console.log(this.data.pageType), this.getNameCard(); + }, + postRecord: function(t) { + e.restAjax.post(e.restAjax.path("{loginUrl}app/cardtemplateforwardingrecord/savecardtemplateforwardingrecord", [ e.tradeUrl ]), { + encryptedData: t.encryptedData, + iv: t.iv, + templateUseId: this.data.cardId, + templateFromUserId: this.data.oldToken, + templateToUserId: this.data.token + }, { + headers: { + token: this.data.token + } + }, function(t, e) { + console.log("1" + e); + }, function(t, a) { + e.dialog.msg(a.msg); + }); + }, + openPage: function() {}, + bindService: function() {} +}); \ No newline at end of file diff --git a/pages/mine/myCardDetail/myCardDetail.json b/pages/mine/myCardDetail/myCardDetail.json new file mode 100644 index 0000000..b2542c7 --- /dev/null +++ b/pages/mine/myCardDetail/myCardDetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "名片详情" +} \ No newline at end of file diff --git a/pages/mine/myCardDetail/myCardDetail.wxml b/pages/mine/myCardDetail/myCardDetail.wxml new file mode 100644 index 0000000..e7c93cb --- /dev/null +++ b/pages/mine/myCardDetail/myCardDetail.wxml @@ -0,0 +1,48 @@ + + + + {{item.templateAreaFontValue}} + + + + + {{item.templateAreaFontValue}} + + + + + + 适用行业:{{cardInfo.templateIndustryName}} + + + + + + {{item.templateAreaName}} + 最多输入{{item.templateAreaFontLength}}个字符 + + + + + + + + + + {{item.templateAreaName}} + 最多输入1张图片 + + + + + + + + + + + 提交修改 + 绑定服务 + 置顶名片 + 删除名片 + diff --git a/pages/mine/myCardDetail/myCardDetail.wxss b/pages/mine/myCardDetail/myCardDetail.wxss new file mode 100644 index 0000000..7e316f3 --- /dev/null +++ b/pages/mine/myCardDetail/myCardDetail.wxss @@ -0,0 +1,217 @@ +.card { + box-sizing: border-box; + height: 0; + position: relative; + width: 100%; + z-index: 100; +} + +.card-bgImg { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.area-box { + background: none!important; + white-space: nowrap; + z-index: 111; +} + +.area-box image { + height: 100%; + width: 100%; +} + +.card-info { + margin-top: 15rpx; + padding-bottom: 100rpx; + width: 100%; +} + +.card-title { + background: #fff; + font-size: 30rpx; + padding: 15rpx; + width: 100%; +} + +.row { + background: #fff; +} + +.row,.row-ver { + border-bottom: 1rpx solid #f5f5f5; + display: flex; +} + +.row-ver { + background-color: #fff; + flex-direction: column; + padding: 15rpx; +} + +.row-ver:nth-child(1) { + padding: 15rpx 15rpx 7.5rpx; +} + +.row-ver:last-child { + padding: 7.5rpx 15rpx 15rpx; +} + +.item-title { + color: grey; + flex: 1; + font-size: 32rpx; + line-height: 50rpx; +} + +.item-title-box { + flex-direction: row; + justify-content: space-between; + margin-top: 7.5rpx; +} + +.item-input,.item-title-box { + align-items: center; + display: flex; +} + +.item-input { + box-sizing: border-box; + flex: 4; + margin-top: 15rpx; +} + +.item-input input { + color: #333; + font-size: 32rpx; + height: 50rpx; + text-align: left; + width: 100%; +} + +.item-input image { + max-width: 70%; +} + +.item-code-input image { + max-height: 160rpx; + max-width: 35%; +} + +.hide-link { + background: rgba(0,0,0,.6); + bottom: 0; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 1000; +} + +.hide { + background: #fff; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 90%; +} + +.hide,.hide-btn { + border-radius: 10rpx; +} + +.hide-btn { + align-items: center; + background: #1296db; + color: #fff; + display: flex; + font-size: 30rpx; + height: 60rpx; + justify-content: center; + width: 49%; +} + +.hide-text { + color: #000; + font-size: 30rpx; +} + +.hide-btn-box { + display: flex; + justify-content: space-between; +} + +.input-box { + width: 100%; +} + +.content-box { + align-items: center; + display: flex; + flex-direction: column; + justify-content: center; + padding: 15rpx; + width: 100%; +} + +.cuIcon-cameraadd { + font-size: 60rpx; +} + +.card-img-box { + align-items: center; + display: flex; + flex-direction: row; + justify-content: space-between; + margin-right: 40rpx; +} + +.card-img-box image { + height: 200rpx; + width: 200rpx; +} + +.hint-txt { + color: #fd9494; + font-size: 24rpx; + text-align: right; +} + +.share { + background: #fff; + bottom: 0; + left: 0; + padding: 15rpx; + position: fixed; + right: 0; + text-align: center; + z-index: 1000; +} + +.share .btn { + background: #0054bd; + border-radius: 10rpx; + color: #fff; + display: inline-block; + font-size: 28rpx; + font-weight: 400; + height: 70rpx; + line-height: 70rpx; + margin-right: 2%; + text-align: center; + width: 32%!important; +} + +.share .btn:nth-child(1) { + background: coral; +} + +.share .btn:last-child { + background: #ff2525; + margin-right: 0; +} \ No newline at end of file diff --git a/pages/mine/otherCard/othercarddetail.js b/pages/mine/otherCard/othercarddetail.js new file mode 100644 index 0000000..e59dbf7 --- /dev/null +++ b/pages/mine/otherCard/othercarddetail.js @@ -0,0 +1,574 @@ +var t, a = require("../../../@babel/runtime/helpers/defineProperty"), e = getApp(), n = wx.createInnerAudioContext(); + +Page((a(t = { + data: { + nameTxt: "名片", + dataList: [], + curIndex: 0, + speedStep: 5, + waitFlag: !1, + avatarUrl: e.globalData.userInfo.avatarUrl, + areaList: [], + cardHeight: "", + cardInfo: {}, + cardUrl: e.baseUrls.baseCardUrl, + personIntro: {}, + companyIntro: {}, + shareImg: "", + phoneTxt: "未录入", + emailTxt: "未录入", + wechateTxt: "未录入", + addressTxt: "未录入", + viewInfo: {}, + forwardCount: "", + imgUrl: e.baseUrls.baseCardUrl, + shareRecordId: "", + isShowBarCode: !1, + browUserList: [], + shareImgUrl: "", + tempUserId: "", + cardTemplateDispatchId: "", + cardTemplateUseId: "", + isShowCard: !1, + otherCardList: [], + isPlayAudio: !1, + audioId: "", + count: 3, + animationData: {}, + isShowBtn: !1 + }, + onLoad: function(t) { + this.setData({ + cardTemplateUseId: t.cardTemplateUseId + }), this.buildId(), this.getCard(); + }, + getCard: function() { + var t = this; + e.http.get(e.urls.shareCard.format({ + cardTemplateUseId: t.data.cardTemplateUseId + }), { + header: { + token: e.globalData.token + } + }).then(function(a) { + var e = a.data.areaList; + e.forEach(function(a) { + "name" == a.templateAreaSource && t.setData({ + nameTxt: a.templateAreaFontValue + }); + }), t.setData({ + cardInfo: a.data, + areaList: e, + dataList: [] + }), a.data && (t.toSaveLocalImg(a.data.cardTemplateUseDispatchPhoto), t.getBrowCardUserList(a.data.cardTemplateUseId), + t.setData({ + tempUserId: a.data.creator + }), t.getMainColumn(a.data.creator), t.getMainBaseUserInfo(a.data.creator)); + }); + }, + toSaveLocalImg: function(t) { + var a = t, e = wx.env.USER_DATA_PATH + "/indexshare.png", n = a.replace(/^data:image\/\w+;base64,/, ""); + wx.getFileSystemManager().writeFileSync(e, n, "base64"), this.setData({ + shareImgUrl: e + }); + }, + getBrowCardUserList: function(t) { + var a = this; + e.http.get(e.urls.getCardBrowUserList, { + header: { + token: e.globalData.token + }, + data: { + page: "1", + rows: "7", + cardTemplateUseId: t + } + }).then(function(t) { + t.data && a.setData({ + browUserList: t.data.rows + }); + }).catch(function(t) { + console.log(t); + }); + }, + getMainColumn: function(t) { + var a = this; + a.setData({ + dataList: [] + }), e.http.get(e.urls.getMainColumn, { + header: { + token: e.globalData.token + }, + data: { + creator: t + } + }).then(function(e) { + wx.showLoading({ + title: "加载中..." + }), a.getMainMoment(e.data, t, 0); + }).catch(function(t) { + wx.stopPullDownRefresh({}); + }); + }, + getMainMoment: function(t, a, n) { + var i = this; + n < t.length ? e.http.get(e.urls.getMainMoment.format({ + configColumnId: t[i.data.curIndex].configColumnId + }), { + header: { + token: e.globalData.token + }, + data: { + userId: a + } + }).then(function(e) { + if (e.data.length > 0) { + var n = t[i.data.curIndex], o = { + funcSwitch: "2" == n.configColumnCollect || "4" == n.configColumnCollect || "2" == n.configColumnLike && "4" == n.configColumnLike || "2" == n.configColumnDispatch || "4" == n.configColumnDispatch || "2" == n.configColumnComment || "4" == n.configColumnComment, + collectSwitch: t[i.data.curIndex].configColumnCollect, + commentSwitch: t[i.data.curIndex].configColumnComment, + shareSwitch: t[i.data.curIndex].configColumnDispatch, + likeSwitch: t[i.data.curIndex].configColumnLike, + cId: t[i.data.curIndex].configColumnId, + type: t[i.data.curIndex].configColumnType, + name: t[i.data.curIndex].configColumnName, + mode: t[i.data.curIndex].configTableMode, + list: e.data.slice(0, t[i.data.curIndex].configColumnRowCount) + }; + i.data.dataList.push(o); + } + i.setData({ + curIndex: ++i.data.curIndex + }), i.getMainMoment(t, a, i.data.curIndex); + }).catch(function(e) { + i.setData({ + curIndex: ++i.data.curIndex + }), t[i.data.curIndex] && i.getMainMoment(t, a, i.data.curIndex); + }) : (wx.hideLoading({}), wx.stopPullDownRefresh({}), i.buildMainData()); + }, + buildMainData: function() { + var t = ""; + this.data.dataList.forEach(function(a) { + a.list.forEach(function(a) { + t += a.uid + ",", a.collectCount = 0, a.collectStatus = !1, a.commentCount = 0, + a.dispatchCount = 0, a.likeCount = 0, a.likeStatus = !1, a.scansCount = 0, a.list.forEach(function(t) { + switch (t.dataType) { + case "2": + if (t.value.length > 0) { + var a = t.value.split("@"); + a.length > 1 ? t.dataMode = a[1] : t.dataMode = "1"; + var n = a[0].split(","), i = []; + n.forEach(function(t) { + var a = { + id: t, + path: e.baseUrls.baseCardUrl + t + }; + i.push(a); + }), t.valueList = i; + } + break; + + case "3": + n = t.value.split(","), i = []; + n.forEach(function(t) { + if (t.length > 0) { + var a = t.split("&"), n = "00:00"; + if (a.length > 1) { + var o = a[1], s = parseInt(o / 60), r = parseInt(o % 60); + n = (s > 9 ? s : "0" + s) + ":" + (+r > 9 ? r : "0" + r); + } + var d = { + id: a[0], + path: e.baseUrls.baseCardUrl + a[0], + isPlay: !1, + duration: 1e5, + curDuration: 0, + curDurationStr: "00:00", + totalDurationStr: n + }; + i.push(d); + } + }), t.valueList = i; + break; + + case "4": + n = t.value.split(","), i = []; + for (var o = 0; o < n.length; o++) if (n[o].length > 0) { + var s = n[o].split("&"), r = { + path: e.baseUrls.baseCardUrl + s[0], + imgPath: e.baseUrls.baseCardUrl + s[1] + }; + i.push(r); + } + t.valueList = i; + break; + + case "6": + n = t.value.split("-"), i = []; + n.forEach(function(t) { + if (t.length > 0) { + var a = t.split(","), e = { + name: "", + address: "", + latitude: a[0], + longitude: a[1] + }; + i.push(e); + } + }), t.valueList = i; + break; + + case "8": + t.dictionariesList.forEach(function(a) { + -1 != t.value.indexOf(a.dataId) && (t.selValue = a.dataName); + }); + break; + + case "9": + t.dictionariesList.forEach(function(a) { + -1 != t.value.indexOf(a.dataId) ? a.isSel = !0 : a.isSel = !1; + }); + } + }); + }); + }), this.setData({ + curIndex: 0, + dataList: this.data.dataList + }), this.getColumnContentHandle(t); + }, + getColumnContentHandle: function(t) { + var a = this; + wx.showLoading({ + title: "加载中..." + }), e.http.get(e.urls.getColumnContentHandle.format({ + projectId: "column", + businessIds: t + }), { + header: { + token: e.globalData.token + } + }).then(function(t) { + wx.hideLoading({}), t.data.forEach(function(t) { + a.data.dataList.forEach(function(a) { + a.list.forEach(function(a) { + a.uid == t.businessId && (a.collectCount = t.collectCount, a.collectStatus = t.collectStatus, + a.commentCount = t.commentCount, a.dispatchCount = t.dispatchCount, a.likeCount = t.likeCount, + a.likeStatus = t.likeStatus, a.scansCount = t.scansCount); + }); + }); + }), a.setData({ + curIndex: 0, + dataList: a.data.dataList + }); + }).catch(function(t) {}); + }, + getMainBaseUserInfo: function(t) { + var a = this; + e.http.get(e.urls.getMainMoment.format({ + configColumnId: "de7b5e22-64f9-4c60-a1f9-6ac004dfb9a8" + }), { + header: { + token: e.globalData.token + }, + data: { + userId: t + } + }).then(function(t) { + t.data.length > 0 ? (a.setData({ + isShowBtn: !0 + }), t.data[0].list.forEach(function(t) { + switch (t.name) { + case "phone": + a.setData({ + phoneTxt: t.value + }); + break; + + case "wechat": + a.setData({ + wechateTxt: t.value + }); + break; + + case "email": + a.setData({ + emailTxt: t.value + }); + break; + + case "address": + a.setData({ + addressTxt: t.value + }); + } + })) : a.setData({ + isShowBtn: !1 + }); + }).catch(function(t) { + console.log(t); + }); + }, + buildId: function() { + for (var t = [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" ], a = "", e = 0; e < 36; e++) { + a += t[parseInt(61 * Math.random())]; + } + return a; + }, + showDetail: function(t) { + if (-1 != t.currentTarget.dataset.ctype.indexOf("dda5007c-5fb7-48f2-8537-3cb8ea298242")) { + var a = t.currentTarget.dataset.cid, e = t.currentTarget.dataset.id, n = t.currentTarget.dataset.like, i = "&collectSwitch=" + t.currentTarget.dataset.collect + "&likeSwitch=" + n + "&commentSwitch=" + t.currentTarget.dataset.comment + "&shareSwitch=" + t.currentTarget.dataset.share; + wx.navigateTo({ + url: "/packagecard/moments/momentsdetail/momentsdetail?uId=" + e + "&cId=" + a + i + }); + } + }, + onHide: function(t) { + this.setData({ + isShowCard: !1 + }), n && n.stop(); + }, + onShareAppMessage: function(t) { + wx.showShareMenu({ + withShareTicket: !0, + success: function(t) { + console.log(t); + } + }); + var a = this.buildId(); + return this.shareRecord(a), { + title: "您好,这是我的电子名片,请查看.", + path: "/pages/index/index?cardTemplateDispatchId=" + a, + imageUrl: this.data.shareImgUrl + }; + }, + shareRecord: function(t) { + var a = this; + e.http.post(e.urls.shareRecord, { + header: { + token: e.globalData.token + }, + data: { + cardTemplateUseId: a.data.cardInfo.cardTemplateUseId, + cardTemplateDispatchParentId: "", + cardTemplateDispatchId: t + } + }).then(function(t) { + a.setData({ + shareRecordId: t.data.data + }); + }); + }, + showBarCode: function() { + wx.navigateTo({ + url: "/packagecard/sharePage/cardcode?cardImg=" + this.data.cardInfo.cardTemplateUsePhotoUrl + "&id=" + this.data.cardInfo.cardTemplateUseBarcode + }); + }, + hideBarCode: function() { + this.setData({ + isShowBarCode: !1 + }), wx.showTabBar(); + }, + getForwardCount: function() { + var t = this; + e.restAjax.get(e.restAjax.path("{cardUrl}app/templateforwardingrecord/count", [ e.cardUrl ]), { + templateUseId: t.data.cardInfo.cardPersonId + }, { + headers: { + token: e.globalData.token + } + }, function(a, e) { + t.setData({ + forwardCount: e.data + }); + }, function(t, a) { + e.dialog.msg(a.msg); + }); + }, + copyText: function(t) { + var a = t.currentTarget.dataset.text; + a && wx.setClipboardData({ + data: a, + success: function() {} + }); + }, + includedCard: function() { + e.http.post(e.urls.includedCard, { + header: { + token: e.globalData.token + }, + data: { + cardTemplateUseBagId: "", + cardTemplateUseId: this.data.cardInfo.cardTemplateUseId, + cardTemplateUseStar: "", + cardTemplateUseTag: "", + cardTemplateUseTop: "" + } + }).then(function(t) { + console.log(t.data), wx.showToast({ + title: "加入卡包成功!" + }); + }).catch(function(t) {}); + }, + makeCall: function() { + var t = this.data.phoneTxt; + t && wx.makePhoneCall({ + phoneNumber: t + }); + }, + getViewCount: function() { + var t = this; + e.restAjax.get(e.restAjax.path("{cardUrl}app/templateviewrecord/getByTemplateUseId/" + t.data.cardInfo.cardPersonId, [ e.cardUrl ]), {}, { + headers: { + token: e.globalData.token + } + }, function(a, e) { + t.setData({ + viewInfo: e + }); + }, function(t, a) { + a.msg && e.dialog.msg(a.msg); + }); + } +}, "getBrowCardUserList", function(t) { + var a = this; + e.http.get(e.urls.getCardBrowUserList, { + header: { + token: e.globalData.token + }, + data: { + page: "1", + rows: "7", + cardTemplateUseId: t + } + }).then(function(t) { + t.data && a.setData({ + browUserList: t.data.rows + }); + }).catch(function(t) { + console.log(t); + }); +}), a(t, "addContact", function() { + wx.addPhoneContact({ + firstName: this.data.nameTxt, + mobilePhoneNumber: this.data.phoneNum + }); +}), a(t, "viewImg", function(t) { + var a = t.currentTarget.dataset.values, e = t.currentTarget.dataset.url, n = []; + a.forEach(function(t) { + n.push(t.path); + }), wx.previewImage({ + urls: n, + current: e + }); +}), a(t, "viewVideo", function(t) { + var a = t.currentTarget.dataset.url; + wx.previewMedia({ + sources: [ { + url: a, + type: "video" + } ] + }); +}), a(t, "play", function(t) { + var a = this, e = t.currentTarget.dataset.index, i = t.currentTarget.dataset.idx, o = t.currentTarget.dataset.i, s = t.currentTarget.dataset.a, r = t.currentTarget.dataset.item; + console.log(a.data.isPlayAudio), a.data.isPlayAudio ? (a.data.dataList.forEach(function(t) { + t.list.forEach(function(t) { + t.list.forEach(function(t) { + "3" == t.dataType && t.valueList && t.valueList.forEach(function(t) { + t.isPlay = !1, t.curDuration = 0, t.curDuationStr = "00:00"; + }); + }); + }); + }), a.setData({ + dataList: a.data.dataList + }), n.stop(), a.data.audioId != r.id && (wx.showLoading({ + title: "加载中..." + }), setTimeout(function() { + wx.hideLoading({}), n.src = a.data.dataList[e].list[i].list[o].valueList[s].path + ".mp3", + n.startTime = 0, n.autoplay = !0, a.data.dataList[e].list[i].list[o].valueList[s].isPlay = !0, + a.setData({ + dataList: a.data.dataList, + isPlayAudio: !0, + audioId: r.id + }); + }, 1500))) : (n.src = a.data.dataList[e].list[i].list[o].valueList[s].path + ".mp3", + n.startTime = 0, n.autoplay = !0, n.play(), a.data.dataList[e].list[i].list[o].valueList[s].isPlay = !0, + a.setData({ + dataList: a.data.dataList, + isPlayAudio: !0, + audioId: r.id + })), n.onPlay(function() {}), n.onCanplay(function(t) {}), n.onStop(function(t) { + console.log("onStop==="), a.data.dataList[e].list[i].list[o].valueList[s].isPlay = !1, + a.data.dataList[e].list[i].list[o].valueList[s].curDuration = 0, a.data.dataList[e].list[i].list[o].valueList[s].curDurationStr = "00:00", + a.setData({ + dataList: a.data.dataList, + isPlayAudio: !1 + }); + }), n.onEnded(function(t) { + console.log(t), console.log("播放完毕"), a.data.dataList[e].list[i].list[o].valueList[s].isPlay = !1, + a.data.dataList[e].list[i].list[o].valueList[s].curDuration = 0, a.data.dataList[e].list[i].list[o].valueList[s].curDurationStr = "00:00", + a.setData({ + dataList: a.data.dataList, + isPlayAudio: !1 + }); + }), n.onError(function(t) { + console.log("播放错误"), console.log(t), a.data.dataList[e].list[i].list[o].valueList[s].isPlay = !1, + a.data.dataList[e].list[i].list[o].valueList[s].curDuration = 0, a.data.dataList[e].list[i].list[o].valueList[s].curDurationStr = "00:00", + a.setData({ + dataList: a.data.dataList, + isPlayAudio: !1 + }); + }), n.onSeeking(function() {}); +}), a(t, "goList", function() { + wx.navigateTo({ + url: "/packagecard/cardList/cardList" + }); +}), a(t, "showMore", function(t) { + var a = t.currentTarget.dataset.item; + if ("2" == a.mode) { + var e = t.currentTarget.dataset.userid, n = t.currentTarget.dataset.idx; + wx.navigateTo({ + url: "/packagecard/moments/showlist/showlist?id=" + a.cId + "&userId=" + e + "&index=" + n + }); + } +}), a(t, "showComment", function(t) { + var a = t.currentTarget.dataset.cid, e = t.currentTarget.dataset.uid, n = t.currentTarget.dataset.like, i = "&collectSwitch=" + t.currentTarget.dataset.collect + "&likeSwitch=" + n + "&commentSwitch=" + t.currentTarget.dataset.comment + "&shareSwitch=" + t.currentTarget.dataset.share; + console.log(i), wx.navigateTo({ + url: "/packagecard/moments/momentsdetail/momentsdetail?uId=" + e + "&cId=" + a + i + }); +}), a(t, "doLike", function(t) { + var a = this, n = t.currentTarget.dataset.item, i = t.currentTarget.dataset.idx, o = t.currentTarget.dataset.index, s = ""; + s = n.likeStatus ? "取消中..." : "保存中...", wx.showLoading({ + title: s + }), e.http.post(e.urls.doSaveLike, { + header: { + token: e.globalData.token + }, + data: { + businessId: n.uid, + projectId: "column" + } + }).then(function(t) { + wx.hideLoading({}), a.data.dataList[o].list[i].likeStatus = !n.likeStatus, n.likeStatus ? --a.data.dataList[o].list[i].likeCount : ++a.data.dataList[o].list[i].likeCount, + a.setData({ + dataList: a.data.dataList + }); + }).catch(function(t) {}); +}), a(t, "doCollect", function(t) { + var a = this, n = t.currentTarget.dataset.item, i = t.currentTarget.dataset.idx, o = t.currentTarget.dataset.index, s = ""; + s = n.collectStatus ? "取消收藏..." : "收藏中...", wx.showLoading({ + title: s + }), e.http.post(e.urls.doSaveCollect, { + header: { + token: e.globalData.token + }, + data: { + businessId: n.uid, + projectId: "column" + } + }).then(function(t) { + wx.hideLoading({}), a.data.dataList[o].list[i].collectStatus = !n.collectStatus, + a.setData({ + dataList: a.data.dataList + }); + }).catch(function(t) {}); +}), t)); \ No newline at end of file diff --git a/pages/mine/otherCard/othercarddetail.json b/pages/mine/otherCard/othercarddetail.json new file mode 100644 index 0000000..b2542c7 --- /dev/null +++ b/pages/mine/otherCard/othercarddetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "名片详情" +} \ No newline at end of file diff --git a/pages/mine/otherCard/othercarddetail.wxml b/pages/mine/otherCard/othercarddetail.wxml new file mode 100644 index 0000000..caa4011 --- /dev/null +++ b/pages/mine/otherCard/othercarddetail.wxml @@ -0,0 +1,295 @@ + + + + + + + + + + + + + 02/ + + + 加入卡包 + + + + 03/ + + + 名片码 + + + + + + + 拨打电话 + + {{phoneTxt}} + + + + + 添加微信 + + {{wechateTxt}} + + + + + 邮箱 + + {{emailTxt}} + + + + + 地址 + + {{addressTxt}} + + + + + + + + + + + + + {{cardInfo.cardTemplateUseScansNumber>999?'999+':cardInfo.cardTemplateUseScansNumber}} + + + + {{cardInfo.cardTemplateUseDispatchNumber>999?'999+':cardInfo.cardTemplateUseDispatchNumber}} + + + + + + + + + + + + {{item.name}} + + + 更多 + + + + + + + + + + + + {{child.value}} + + + + + + + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{audio.curDurationStr}} + + {{audio.totalDurationStr}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + + + + {{child.comment}}: + {{child.selValue}} + + + + + + + + + {{child.comment}} + + + + {{ss.dataName}} + + + + + + + + + + + 收藏 + + + + {{it.commentCount>1000?'1000+':it.commentCount}} + + + + {{it.likeCount>1000?'1000+':it.likeCount}} + + + + + + + + + + + + + + + + + + 十而百智慧名片 + + 一份信心,一份努力,一份成功;十分信心,十分努力,十分成功. + + + + + + + + + 我的 + + + + + + {{item.name}} + + + + 电话:{{item.phone}} + + + 公司:{{item.department}} + + + 地址:{{item.address}} + + + + + + + diff --git a/pages/mine/otherCard/othercarddetail.wxss b/pages/mine/otherCard/othercarddetail.wxss new file mode 100644 index 0000000..7e7b02c --- /dev/null +++ b/pages/mine/otherCard/othercarddetail.wxss @@ -0,0 +1,679 @@ +.card-container { + box-sizing: border-box; +} + +.share-btn { + background: #eee; +} + +.card { + box-sizing: border-box; + overflow: hidden; + position: relative; + width: 100%; +} + +.area-box { + white-space: nowrap; + word-break: break-all; + z-index: 111; +} + +.card-bgImg { + width: 100%; +} + +.person { + padding: 20rpx; +} + +.dynamic-container { + background-color: #fff; + border-radius: 20rpx; + margin-top: -50rpx; + padding: 20rpx; + position: relative; +} + +.dynamic-title image { + height: 30rpx; + margin-top: -4rpx; + vertical-align: middle; + width: 30rpx; +} + +.catelog-title { + justify-content: space-between; + padding: 15rpx; + position: relative; +} + +.catelog-title,.catelog-title .action { + align-items: center; + display: flex; +} + +.catelog-title .action { + justify-content: center; + max-width: 100%; +} + +.title { + color: #000; + display: inline-block; + font-size: 30rpx; + position: relative; +} + +.title text { + margin-left: 20rpx; +} + +.column-box { + flex-direction: column; +} + +.column-box,.column-box-row { + background-color: #fff; + display: flex; + width: 100%; +} + +.column-box-row { + align-items: center; + flex-direction: row; + padding: 15rpx; +} + +.column-item { + margin: 0rpx; + padding: 7.5rpx 15rpx; +} + +.column-item:nth-child(1) { + padding: 15rpx 15rpx 7.5rpx; +} + +.column-item:last-child { + padding: 7.5rpx 15rpx 15rpx; +} + +.img-item { + border-radius: 5rpx; + width: 100%; +} + +.img-item:last-child,.img-item:nth-child(1) { + padding: 7.5rpx 0rpx; +} + +.column-content { + background-color: #fff; + border-radius: 10rpx; + box-shadow: 0 2px 2px #f0f0f0; + display: flex; + flex-direction: column; + width: 100%; + z-index: 2; +} + +.intro-title image,.serve-title image { + height: 30rpx; + margin-top: -4px; + vertical-align: middle; + width: 28rpx; +} + +.person-content { + background: #fff; + border-radius: 20rpx; + color: #000; + font-size: 30rpx; + letter-spacing: 2rpx; + line-height: 40rpx; + margin-top: -30rpx; + padding: 20rpx; + position: relative; + word-break: break-all; +} + +.company-title { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; +} + +.company-title image { + height: 140rpx; + width: 140rpx; +} + +.company-name { + align-items: center; + display: flex; + font-size: 34rpx; + height: 140rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 520rpx; +} + +.company-content { + background: #fff; + border-radius: 20rpx; + margin-top: -30rpx; + padding: 20rpx; + position: relative; +} + +.company-content image { + border-radius: 20rpx; + height: 300rpx; + width: 100%; +} + +.company .person-content { + margin-top: 0; +} + +.dynamic-title { + display: block; + margin: 0 auto; + width: 710rpx; +} + +.dynamic-box { + background: #fff; + border-radius: 20rpx; + height: 400rpx; + margin-bottom: 20rpx; + overflow: hidden; + position: relative; +} + +.dynamic-box image { + height: 400rpx; + width: 100%; +} + +.dynamic-text { + background: rgba(0,0,0,.6); + bottom: 0; + color: #fff; + font-size: 30rpx; + left: 0; + line-height: 60rpx; + padding: 0 10rpx; + position: absolute; + right: 0; +} + +.person-info { + border-bottom: 1px solid #eee; + display: flex; + justify-content: space-between; + padding-bottom: 20rpx; +} + +.avatar { + border-radius: 50%; + height: 120rpx; + overflow: hidden; + width: 120rpx; +} + +.avatar image { + height: 100%; + width: 100%; +} + +.person-name { + width: 530rpx; +} + +.name { + color: #000; + font-size: 32rpx; + margin: 15rpx 0 10rpx; +} + +.time { + color: #b2b2b2; +} + +.dynamic-content { + margin: 20rpx 0; +} + +.dynamic-img { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + position: relative; +} + +.dynamic-img image { + height: 160rpx; + margin-bottom: 10rpx; + margin-right: 2%; + width: 32%; +} + +.dynamic-img image:nth-child(3n) { + margin-right: 0; +} + +.dynamic-img-text { + background: rgba(0,0,0,.6); + bottom: 3rpx; + color: #fff; + font-size: 32rpx; + left: 0; + line-height: 70rpx; + padding: 0 20rpx; + position: absolute; + right: 0; +} + +.dynamic-good { + display: flex; + justify-content: space-between; + margin: 10rpx 0; +} + +.good-count { + color: #333; + font-size: 28rpx; +} + +.good-btn image { + height: 40rpx; + vertical-align: top; + width: 40rpx; +} + +.dynamic-reply { + background: #eee; + margin-top: 15rpx; + padding: 15rpx; +} + +.reply { + color: #000; + font-size: 32rpx; + margin-bottom: 5rpx; +} + +.reply-name { + display: inline; + font-weight: 700; +} + +.dynamic-reply-input { + margin-top: 10rpx; +} + +.dynamic-reply-input input { + border-bottom: 1px solid #eee; + height: 60rpx; + width: 100%; +} + +.creat-card { + align-items: center; + background: #e6b980; + border-radius: 50%; + bottom: 20rpx; + box-sizing: border-box; + flex-direction: column; + height: 140rpx; + justify-content: center; + padding: 20rpx; + position: fixed; + right: 20rpx; + width: 140rpx; + z-index: 100; +} + +.creat-card image { + height: 60rpx; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 80rpx; +} + +.share-save { + display: flex; + justify-content: space-between; + text-align: center; +} + +.share-btn { + background: none; + border: 1px solid #e6b980; + color: #1296db; + font-weight: 400; +} + +.save-btn { + background: #1296db; + border: 1px solid #1296db; + color: #fff; + font-weight: 400; +} + +.bottom-btn { + margin-top: 20rpx; + padding: 0 20rpx; + white-space: nowrap; + width: 100%; +} + +.phone-box .icon { + height: 30rpx; + vertical-align: top; + width: 30rpx; +} + +.wechate-box .icon { + height: 30rpx; + vertical-align: top; + width: 35rpx; +} + +.email-box .icon { + height: 30rpx; + vertical-align: top; + width: 30rpx; +} + +.bottom-btn-box { + border: 1px solid #ddd; + border-radius: 10rpx; + box-sizing: border-box; + display: inline-block; + line-height: 30rpx; + margin-right: 10rpx; + min-width: 32%; + padding: 20rpx; +} + +.bottom-text { + margin-top: 10rpx; +} + +.good,.top-box { + width: 100%; +} + +.good { + background-color: #fff; + display: flex; + justify-content: space-between; + padding: 15rpx; +} + +.good-avatar,.good-click { + color: #333; + line-height: 45rpx; +} + +.good-avatar { + font-size: 0; +} + +.good-click { + display: flex; +} + +.view-count { + border-right: 1px solid grey; + justify-content: center; +} + +.view-count,.view-count-no { + align-items: center; + color: grey; + display: flex; + flex-direction: row; + font-size: 36rpx; +} + +.view-count-no { + margin-left: 15rpx; +} + +.good-avatar image { + border-radius: 50%; + height: 100%; + width: 100%; +} + +.good-click image { + height: 38rpx; + width: 38rpx; +} + +.view-count image,.view-count-no image { + height: 32rpx; + width: 32rpx; +} + +.movie-item { + height: 280rpx; + padding-bottom: 0; + width: 100%; +} + +.avatar-list { + border: 2px solid #fff; + border-radius: 50%; + display: inline-block; + height: 45rpx; + margin-left: -15rpx; + position: relative; + vertical-align: top; + width: 45rpx; +} + +.avatar-list:first-child { + margin-left: 0; +} + +.mid { + background: #fff; + position: relative; +} + +.mid,.mid-box { + display: flex; + width: 100%; +} + +.mid-box { + align-items: left; + background-color: #fff; + border: 2rpx solid #eac390; + border-radius: 10rpx; + flex: 1; + flex-direction: column; + font-weight: 400; + justify-content: left; + padding: 15rpx; +} + +.mid-box:nth-child(1) { + background: #fff; +} + +.mid-box:nth-child(2) { + margin-left: 15rpx; +} + +.mid-box:last-child { + border: none; + border-radius: 10rpx; + margin-left: 15rpx; +} + +.mid-box image { + height: 48rpx; + width: 48rpx; +} + +.mid-box-text { + color: #000; +} + +.mid-box-text,.mid-box-text-white { + font-size: 28rpx; + font-weight: 700; + text-align: left; +} + +.mid-box-text-white { + color: #fff; +} + +.mid-btn { + background: #fff; + border: 1rpx solid #ebebeb; + border-radius: 15rpx; + box-shadow: 10rpx 10rpx 20rpx 20rpx #e4e4e426; + flex-direction: column; + flex-wrap: nowrap; + justify-content: center; + margin-top: 15rpx; + position: relative; + width: 100%; +} + +.mid-btn,.mid-btn-box { + display: flex; +} + +.mid-btn-box { + align-items: center; + box-sizing: border-box; + flex-direction: row; + flex-shrink: 0; + justify-content: space-between; +} + +.mid-btn-box:nth-child(1) { + padding: 15rpx 15rpx 7.5rpx; +} + +.mid-btn-box:nth-child(2),.mid-btn-box:nth-child(3) { + padding: 7.5rpx 15rpx; +} + +.mid-btn-box:nth-child(4) { + padding: 7.5rpx 15rpx 15rpx; +} + +.mid-btn-title { + align-items: center; + display: flex; + flex: 3; + flex-direction: row; + justify-content: flex-start; +} + +.mid-btn-title .image { + height: 48rpx; + width: 48rpx; +} + +.movie-box { + align-items: center; + display: flex; + flex-direction: row; + justify-content: center; +} + +.movie-box,.movie-box image { + border-radius: 10rpx; + height: 350rpx; + width: 100%; +} + +.mid-btn-title text { + color: #333; + font-size: 28rpx; + margin-left: 15rpx; +} + +.mid-btn-box image { + height: 80rpx; + width: 80rpx; +} + +.mid-btn-text { + width: 200rpx; +} + +.text-top { + color: #000; + font-size: 30rpx; + line-height: 45rpx; +} + +.text-bottom { + color: #898989; + font-size: 26rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.bar-code { + background: rgba(0,0,0,.6); +} + +.bar-code,.bar-code-tr { + bottom: 0; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 999; +} + +.bar-code-tr { + background: transparent; +} + +.bar-code .content { + align-items: center; + background: #fff; + border-radius: 10rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + left: 50%; + max-width: 96%; + min-height: 45%; + min-width: 60%; + padding: 20rpx; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.code-title { + font-weight: 700; +} + +.code-title,.code-txt { + color: #000; + font-size: 32rpx; +} + +.bar-code image { + height: 300rpx; + width: 300rpx; +} \ No newline at end of file diff --git a/pages/neighbor/circle/circleDetail.js b/pages/neighbor/circle/circleDetail.js new file mode 100644 index 0000000..518d27e --- /dev/null +++ b/pages/neighbor/circle/circleDetail.js @@ -0,0 +1,227 @@ +var e = getApp(); + +Page({ + data: { + token: e.globalData.token, + sourceUrl: e.baseUrls.sourceUrl, + neighborCircleId: "", + circleDetail: {}, + serviceUrl: e.baseUrls.serviceUrl, + baseImgUrl: e.baseUrls.baseImgUrl, + userIcon: "", + userName: "", + reply: "", + goodCount: 0, + isClickedGood: "no", + isGetFocus: !1, + placeholder: "写评论", + replyTo: "", + replyUserName: "", + isLoading: !1 + }, + getCircleDetai: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getCircleDetail, [ e.baseUrls.requestUrl, t.data.neighborCircleId ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + a.photo && (a.photo = a.photo.split(",")), t.setData({ + circleDetail: a + }); + }, function(e, t) { + console.log(t); + }); + }, + doReplyCircle: function() { + var t = this; + if (!t.data.isLoading) { + var a = { + content: t.data.reply, + headPortrait: t.data.userIcon, + neighborCircleId: t.data.neighborCircleId, + userName: t.data.userName + }; + t.setData({ + isLoading: !0 + }), e.restAjax.post(e.restAjax.path(e.apis.submitCircleReply, [ e.baseUrls.requestUrl ]), a, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (t.setData({ + isLoading: !1 + }), wx.showToast({ + title: "回复成功!", + icon: "success" + }), t.getReplyList(), t.setData({ + reply: "", + replyTo: "", + replyUserName: "", + placeholder: "讨论一下" + })); + }, function(e, a) { + console.log(a), t.setData({ + isLoading: !1 + }); + }); + } + }, + getReplyList: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getCircleReplyList, [ e.baseUrls.requestUrl ]), { + neighborCircleId: t.data.neighborCircleId + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + t.setData({ + replyList: a + }); + }, function(e, t) { + console.log(t); + }); + }, + clickGood: function() { + var t = this, a = { + headPortrait: t.data.userIcon, + userName: t.data.userName, + neighborCircleId: t.data.neighborCircleId + }; + e.restAjax.post(e.restAjax.path(e.apis.circleClickGood, [ e.baseUrls.requestUrl ]), a, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (t.getGoodCount(), t.getIsClicked()), console.log(a); + }, function(e, t) { + console.log(t); + }); + }, + getGoodCount: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getCircleGoodCount, [ e.baseUrls.requestUrl ]), { + neighborCircleId: t.data.neighborCircleId + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + t.setData({ + goodCount: a.data + }), console.log(a); + }, function(e, t) { + console.log(t); + }); + }, + getIsClicked: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.circleIsClicked, [ e.baseUrls.requestUrl, t.data.neighborCircleId ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + t.setData({ + isClickedGood: a + }), console.log(a); + }, function(e, t) { + console.log(t); + }); + }, + toggleGood: function() { + "yes" == this.data.isClickedGood ? this.cancelGood() : this.clickGood(); + }, + cancelGood: function() { + var t = this; + e.restAjax.delete(e.restAjax.path(e.apis.cancelGood, [ e.baseUrls.requestUrl, t.data.neighborCircleId ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (t.getIsClicked(), t.getGoodCount()), console.log(a); + }, function(e, t) { + console.log(t); + }); + }, + getFocus: function(e) { + var t = e.currentTarget.dataset.user, a = e.currentTarget.dataset.id, o = e.currentTarget.dataset.name; + console.log(a), this.setData({ + isGetFocus: !0, + placeholder: "回复" + t + ":", + replyTo: a, + replyUserName: o + }); + }, + inputBlur: function() { + this.data.reply || this.setData({ + placeholder: "讨论一下", + isGetFocus: !1 + }); + }, + doReply: function() { + this.data.replyTo ? this.doReplyReply() : this.doReplyCircle(); + }, + doReplyReply: function() { + var t = this; + if (!t.data.isLoading) { + var a = { + content: t.data.reply, + headPortrait: t.data.userIcon, + userName: t.data.userName, + neighborCircleId: t.data.neighborCircleId, + replyCommentId: t.data.replyTo, + replyNeighborCircleCommentId: t.data.replyTo, + replyUserName: t.data.replyUserName + }; + t.setData({ + isLoading: !0 + }), e.restAjax.post(e.restAjax.path(e.apis.submitCircleReply, [ e.baseUrls.requestUrl ]), a, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (t.setData({ + isLoading: !1 + }), wx.showToast({ + title: "评论成功!", + icon: "success" + }), t.getReplyList(), t.setData({ + reply: "", + replyTo: "", + replyUserName: "", + placeholder: "讨论一下" + })); + }, function(e, a) { + console.log(a), t.setData({ + isLoading: !1 + }); + }); + } + }, + viewImg: function(e) { + for (var t = this.data.serviceUrl + this.data.baseImgUrl + e.currentTarget.dataset.id, a = [], o = 0; o < this.data.circleDetail.photo.length; o++) { + var r = this.data.serviceUrl + this.data.baseImgUrl + this.data.circleDetail.photo[o]; + a.push(r); + } + wx.previewImage({ + current: t, + urls: a + }); + }, + onLoad: function(t) { + this.setData({ + neighborCircleId: t.neighborCircleId, + userIcon: wx.getStorageSync("userIcon"), + userName: wx.getStorageSync("name"), + token: e.globalData.token + }), this.getCircleDetai(), this.getReplyList(), this.getGoodCount(), this.getIsClicked(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/neighbor/circle/circleDetail.json b/pages/neighbor/circle/circleDetail.json new file mode 100644 index 0000000..0874e03 --- /dev/null +++ b/pages/neighbor/circle/circleDetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "邻里圈" +} \ No newline at end of file diff --git a/pages/neighbor/circle/circleDetail.wxml b/pages/neighbor/circle/circleDetail.wxml new file mode 100644 index 0000000..e0f205a --- /dev/null +++ b/pages/neighbor/circle/circleDetail.wxml @@ -0,0 +1,54 @@ + + + + + + + {{goodCount}} + + + {{circleDetail.content}} + {{circleDetail.problemTypeName}} + + + + + + + + + + + + + + + + + 回复 + + + + + {{item.content}} + + + {{child.userName}} 回复 {{child.replyUserName}} : {{child.content}} + + + + + + diff --git a/pages/neighbor/circle/circleDetail.wxss b/pages/neighbor/circle/circleDetail.wxss new file mode 100644 index 0000000..8cb2db8 --- /dev/null +++ b/pages/neighbor/circle/circleDetail.wxss @@ -0,0 +1,167 @@ +.help-detail { + background-color: #fff; + padding: 20rpx; +} + +.talk-user,.user-info { + display: flex; + justify-content: space-between; + margin-bottom: 10rpx; +} + +.user-info image { + border-radius: 50%; + height: 80rpx; + margin-right: 20rpx; + width: 80rpx; +} + +.good image { + height: 40rpx; + margin-right: 10rpx; + margin-top: -8rpx; + vertical-align: middle; + width: 40rpx; +} + +.name { + font-size: 32rpx; + line-height: 50rpx; +} + +.time { + color: #888; + font-size: 24rpx; +} + +.good text { + line-height: 80rpx; +} + +.talk-content { + font-size: 32rpx; + line-height: 40rpx; + margin-bottom: 20rpx; +} + +.help-type { + margin: 10rpx 0; +} + +.help-date,.help-type { + color: #bbb; + font-size: 28rpx; +} + +.explain { + background-color: #fff; + margin-top: 20rpx; + padding: 20rpx; +} + +.explain-title { + font-size: 32rpx; + font-weight: 700; + margin-bottom: 10rpx; +} + +.explain-detail { + font-size: 30rpx; + line-height: 60rpx; + min-height: 300rpx; +} + +.answer { + background-color: #fff; + border-top: 1px solid #ddd; + bottom: 0; + left: 0; + padding: 35rpx 20rpx; + position: fixed; + right: 0; +} + +.answer input { + background-color: #f0f0f0; + border-radius: 40rpx; + box-sizing: border-box; + font-size: 32rpx; + height: 70rpx; + padding: 0 20rpx; + width: 100%; +} + +.reply { + background-color: #fff; + margin-bottom: 140rpx; + margin-top: 20rpx; + padding: 20rpx; +} + +.reply-title { + font-size: 32rpx; + font-weight: 700; +} + +.reply-box { + border-bottom: 1px solid #ddd; + padding: 20rpx 0; +} + +.reply-box:last-child { + border-bottom: none; +} + +.photo-box { + display: inline-block; + height: 180rpx; + margin-bottom: 15rpx; + margin-right: 2%; + overflow: hidden; + position: relative; + text-align: center; + width: 32%; +} + +.photo-box:nth-child(3n) { + margin-right: 0; +} + +.photo-one { + height: auto; + max-height: 600rpx; + width: 50%; +} + +.photo-one image { + max-width: 100%; +} + +.photo-four image { + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.photo-four:nth-child(3) { + margin-right: 2%; +} + +.photo-more image { + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.reply-row { + background-color: #f7f7f7; + line-height: 60rpx; + padding: 0 10rpx; + word-break: break-all; +} + +.reply-row text { + font-weight: 700; +} \ No newline at end of file diff --git a/pages/neighbor/circle/circleList.js b/pages/neighbor/circle/circleList.js new file mode 100644 index 0000000..63bfb30 --- /dev/null +++ b/pages/neighbor/circle/circleList.js @@ -0,0 +1,47 @@ +var t = getApp(); + +Page({ + data: { + token: t.globalData.token, + circleList: [], + page: { + page: 1, + rows: 10 + }, + serviceUrl: t.baseUrls.serviceUrl, + baseImgUrl: t.baseUrls.baseImgUrl + }, + checkDetail: function(t) { + var e = t.currentTarget.dataset.id; + wx.navigateTo({ + url: "./circleDetail?neighborCircleId=" + e + }); + }, + getCircleList: function() { + var e = this; + t.restAjax.get(t.restAjax.path(t.apis.getCircleList, [ t.baseUrls.requestUrl ]), e.data.page, { + headers: { + token: t.globalData.token + } + }, function(t, o) { + for (var a = 0; a < o.rows.length; a++) o.rows[a].photo && (o.rows[a].photo = o.rows[a].photo.split(",")); + e.setData({ + circleList: o.rows + }); + }, function(t, e) { + console.log(e); + }); + }, + onLoad: function(e) { + this.setData({ + token: t.globalData.token + }), this.getCircleList(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/neighbor/circle/circleList.json b/pages/neighbor/circle/circleList.json new file mode 100644 index 0000000..0874e03 --- /dev/null +++ b/pages/neighbor/circle/circleList.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "邻里圈" +} \ No newline at end of file diff --git a/pages/neighbor/circle/circleList.wxml b/pages/neighbor/circle/circleList.wxml new file mode 100644 index 0000000..ba69c16 --- /dev/null +++ b/pages/neighbor/circle/circleList.wxml @@ -0,0 +1,22 @@ + + + + + + {{item.content}} + + + + + + + + + + diff --git a/pages/neighbor/circle/circleList.wxss b/pages/neighbor/circle/circleList.wxss new file mode 100644 index 0000000..cf3b348 --- /dev/null +++ b/pages/neighbor/circle/circleList.wxss @@ -0,0 +1,76 @@ +page { + background-color: #fff; +} + +.talk-user,.user-info { + display: flex; + justify-content: space-between; + margin-bottom: 10rpx; +} + +.user-info image { + height: 80rpx; + margin-right: 20rpx; + width: 80rpx; +} + +.good image { + height: 40rpx; + margin-top: -8rpx; + vertical-align: middle; + width: 40rpx; +} + +.name { + font-size: 32rpx; + line-height: 50rpx; +} + +.time { + color: #888; + font-size: 24rpx; +} + +.good text { + line-height: 80rpx; +} + +.talk-content { + font-size: 30rpx; + line-height: 40rpx; + margin-bottom: 20rpx; +} + +.talk-box { + border-bottom: 1px solid #f9fafc; + padding: 20rpx 0; +} + +.talk-box:last-child { + border-bottom: none; +} + +.talk-count { + color: #bbb; + display: flex; + font-size: 28rpx; + justify-content: space-between; + margin-top: 10rpx; +} + +.photo-box { + display: inline-block; + height: 150rpx; + margin-bottom: 15rpx; + margin-right: 2%; + text-align: center; + width: 32%; +} + +.photo-box:nth-child(3n) { + margin-right: 0; +} + +.photo-box image { + height: 100%; +} \ No newline at end of file diff --git a/pages/neighbor/circle/new.js b/pages/neighbor/circle/new.js new file mode 100644 index 0000000..8ebdf16 --- /dev/null +++ b/pages/neighbor/circle/new.js @@ -0,0 +1,161 @@ +var e = getApp(); + +Page({ + data: { + token: e.globalData.token, + sourceUrl: e.baseUrls.sourceUrl, + helpType: [], + index: 0, + helpTypeAll: [], + helpSelected: "", + content: "", + contentSupplement: "", + userIcon: wx.getStorageSync("userIcon"), + userName: wx.getStorageSync("name"), + imageList: [], + serviceUrl: e.baseUrls.serviceUrl, + baseImgUrl: e.baseUrls.baseImgUrl, + videoId: "", + communityId: "", + areaCode: "", + isLoading: !1 + }, + bindPickerChange: function(e) { + this.setData({ + index: e.detail.value, + helpSelected: this.data.helpTypeAll[e.detail.value - 1].dataId + }); + }, + submitHelp: function() { + var a = this; + if (!a.data.isLoading) { + var t = ""; + if (a.data.imageList.length > 0) for (var o = 0; o < a.data.imageList.length; o++) o != a.data.imageList.length - 1 ? t += a.data.imageList[o] + "," : t += a.data.imageList[o]; + var i = { + content: a.data.content, + contentSupplement: a.data.contentSupplement, + photo: t, + video: a.data.videoId, + videoCover: "", + headPortrait: a.data.userIcon, + nickName: a.data.userName, + communityId: a.data.communityId, + areaCode: a.data.areaCode + }; + a.setData({ + isLoading: !0 + }), e.restAjax.post(e.restAjax.path(e.apis.submitNeighborCircle, [ e.baseUrls.requestUrl ]), i, { + headers: { + token: e.globalData.token + } + }, function(e, t) { + "200" == e && (wx.showToast({ + title: "发布成功!", + icon: "success" + }), setTimeout(function() { + a.setData({ + isLoading: !1 + }), wx.navigateBack({ + delta: 1 + }); + }, 1500)), console.log(e); + }, function(e, t) { + console.log(t), a.setData({ + isLoading: !1 + }); + }); + } + }, + uploadImage: function() { + var a = this; + a.data.isLoading || wx.chooseImage({ + count: 9 - a.data.imageList.length, + sourceType: [ "album", "camera" ], + success: function(t) { + wx.showToast({ + title: "上传中", + icon: "loading" + }); + for (var o = function(o) { + n = t.tempFiles[o].path, e.restAjax.file(e.restAjax.path(e.apis.uploadImg, [ e.baseUrls.serviceUrl ]), n, "image", { + headers: { + token: e.globalData.token + } + }, function(e, i) { + if ("200" == e) { + var n = JSON.parse(i).data, s = a.data.imageList; + s.push(n), a.setData({ + imageList: s + }), o == t.tempFiles.length - 1 && a.setData({ + isLoading: !1 + }), wx.hideToast(); + } + }, function(e, t) { + console.log(t), a.setData({ + isLoading: !1 + }); + }); + }, i = 0; i < t.tempFiles.length; i++) { + var n; + o(i); + } + } + }); + }, + uploadVideo: function() { + var a = this; + a.data.isLoading || (a.setData({ + isLoading: !0 + }), wx.chooseVideo({ + sourceType: [ "album", "camera" ], + success: function(t) { + e.restAjax.file(e.restAjax.path(e.apis.uploadVideo, [ e.baseUrls.serviceUrl ]), t.tempFilePath, "video", { + headers: { + token: e.globalData.token + } + }, function(e, t) { + if ("200" == e) { + a.setData({ + isLoading: !1 + }); + var o = JSON.parse(t).data; + a.setData({ + videoId: o + }); + } + }, function(e, t) { + console.log(t), a.setData({ + isLoading: !1 + }); + }); + } + })); + }, + deleteImg: function(e) { + var a = e.currentTarget.dataset.cur, t = this.data.imageList; + t.splice(a, 1), this.setData({ + imageList: t + }); + }, + deleteVideo: function() { + this.setData({ + videoId: "" + }); + }, + onLoad: function(a) { + this.setData({ + communityId: a.communityId, + areaCode: a.areaCode, + userIcon: wx.getStorageSync("userIcon"), + userName: wx.getStorageSync("name"), + token: e.globalData.token + }); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/neighbor/circle/new.json b/pages/neighbor/circle/new.json new file mode 100644 index 0000000..0874e03 --- /dev/null +++ b/pages/neighbor/circle/new.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "邻里圈" +} \ No newline at end of file diff --git a/pages/neighbor/circle/new.wxml b/pages/neighbor/circle/new.wxml new file mode 100644 index 0000000..27a4f3e --- /dev/null +++ b/pages/neighbor/circle/new.wxml @@ -0,0 +1,27 @@ + + 邻里圈 + + + + + + + + + + 添加照片 + + + + + + + + + + + 添加视频 + + + + + 发布 + diff --git a/pages/neighbor/circle/new.wxss b/pages/neighbor/circle/new.wxss new file mode 100644 index 0000000..2c67ced --- /dev/null +++ b/pages/neighbor/circle/new.wxss @@ -0,0 +1,155 @@ +.new-help { + background-color: #fff; + margin-bottom: 100rpx; + padding: 20rpx; +} + +.new-title { + font-size: 32rpx; + font-weight: 700; +} + +.new-textarea,.new-title { + margin-bottom: 20rpx; +} + +.new-textarea input { + height: 60rpx; +} + +.new-textarea input,.new-textarea textarea { + border-bottom: 1px solid #ddd; + font-size: 32rpx; + width: 100%; +} + +.new-textarea textarea { + height: 400rpx; +} + +.new-textarea picker { + border-bottom: 1px solid #ddd; + font-size: 32rpx; + line-height: 60rpx; +} + +.submit { + margin: 20rpx auto; + width: 710rpx; +} + +.submit-btn { + background-color: rgba(36,40,46,.8); + border-radius: 16rpx; + height: 80rpx; + line-height: 80rpx; + margin-top: 0; + text-align: center; +} + +.upload-title { + font-size: 32rpx; + font-weight: 700; + line-height: 80rpx; +} + +.add { + align-items: center; + background-color: rgba(0,0,0,.05); + border: 1px solid hsla(0,0%,73%,.1); + box-sizing: border-box; + color: rgba(36,40,46,.5); + display: inline-flex; + flex-direction: column; + font-size: 30rpx; + height: 150rpx; + justify-content: center; + margin-bottom: 20rpx; + padding: 10rpx; + vertical-align: top; + width: 150rpx; +} + +.add-icon { + font-size: 40rpx; +} + +.image { + background-color: #fff; + display: inline-block; + height: 150rpx; + margin-bottom: 20rpx; + margin-right: 2%; + position: relative; + text-align: center; + vertical-align: top; + width: 32%; +} + +.image:nth-child(3n) { + margin-right: 0; +} + +.image image { + height: 100%; +} + +.add.video { + background-color: #000; + height: auto; + position: relative; + width: 100%; +} + +.add:nth-child(3n) { + margin-right: 0; +} + +.add image { + height: 100%; +} + +.delete { + height: 30rpx!important; + position: absolute; + right: -15rpx; + top: -15rpx; + width: 30rpx; +} + +.help-row { + background-color: #fff; + color: rgba(36,40,46,.5); + display: flex; + font-size: 32rpx; + height: 80rpx; + justify-content: space-between; + line-height: 80rpx; + margin: 20rpx 0; + padding: 0 20rpx; +} + +.help-row picker { + color: #24282e; +} + +.help-desc { + background-color: #fff; + padding: 20rpx; +} + +.desc-title { + color: rgba(36,40,46,.5); + font-size: 32rpx; + margin-bottom: 15rpx; +} + +.help-desc textarea { + font-size: 30rpx; + height: 300rpx; + width: 100%; +} + +.upload-file { + margin-top: 20rpx; +} \ No newline at end of file diff --git a/pages/neighbor/help/helpDetail.js b/pages/neighbor/help/helpDetail.js new file mode 100644 index 0000000..ebab764 --- /dev/null +++ b/pages/neighbor/help/helpDetail.js @@ -0,0 +1,164 @@ +var e = getApp(); + +Page({ + data: { + sourceUrl: e.baseUrls.sourceUrl, + token: e.globalData.token, + neighborId: "", + helpDetail: {}, + reply: "", + userIcon: "", + userName: "", + replyList: [], + serviceUrl: e.baseUrls.serviceUrl, + baseImgUrl: e.baseUrls.baseImgUrl, + isGetFocus: !1, + placeholder: "写评论", + replyTo: "", + replyUserName: "", + childNeighborId: "", + isLoading: !1 + }, + getHelpDetail: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getHelpDetail, [ e.baseUrls.requestUrl, t.data.neighborId ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + a.photo && (a.photo = a.photo.split(",")), t.setData({ + helpDetail: a + }); + }, function(e, t) { + console.log(t); + }); + }, + doReplyHelp: function() { + var t = this; + if (!t.data.isLoading) { + var a = { + content: t.data.reply, + headPortrait: t.data.userIcon, + neighborId: t.data.neighborId, + userName: t.data.userName + }; + t.setData({ + isLoading: !0 + }), e.restAjax.post(e.restAjax.path(e.apis.doReplyHelp, [ e.baseUrls.requestUrl ]), a, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (t.setData({ + isLoading: !1 + }), wx.showToast({ + title: "回复成功!", + icon: "success" + }), t.getRelyList(), t.setData({ + reply: "" + })); + }, function(e, a) { + console.log(a), t.setData({ + isLoading: !1 + }); + }); + } + }, + getRelyList: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getReplyList, [ e.baseUrls.requestUrl ]), { + neighborId: t.data.neighborId + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + t.setData({ + replyList: a + }), console.log(a); + }, function(e, t) { + console.log(t); + }); + }, + viewImg: function(e) { + for (var t = this.data.serviceUrl + this.data.baseImgUrl + e.currentTarget.dataset.id, a = [], o = 0; o < this.data.helpDetail.photo.length; o++) { + var s = this.data.serviceUrl + this.data.baseImgUrl + this.data.helpDetail.photo[o]; + a.push(s); + } + wx.previewImage({ + current: t, + urls: a + }); + }, + getFocus: function(e) { + var t = e.currentTarget.dataset.user, a = e.currentTarget.dataset.id, o = e.currentTarget.dataset.name, s = e.currentTarget.dataset.neighbor; + console.log(s), this.setData({ + isGetFocus: !0, + placeholder: "回复" + t + ":", + replyTo: a, + replyUserName: o, + childNeighborId: s + }); + }, + inputBlur: function() { + this.data.reply || this.setData({ + placeholder: "讨论一下", + isGetFocus: !1 + }); + }, + doReply: function() { + this.data.replyTo ? this.doReplyReply() : this.doReplyHelp(); + }, + doReplyReply: function() { + var t = this; + if (!t.data.isLoading) { + var a = { + content: t.data.reply, + headPortrait: t.data.userIcon, + userName: t.data.userName, + replyCommentId: t.data.replyTo, + replyUserName: t.data.replyUserName, + neighborId: t.data.childNeighborId, + replyNeighborCommentId: t.data.replyTo + }; + t.setData({ + isLoading: !0 + }), e.restAjax.post(e.restAjax.path(e.apis.doReplyHelp, [ e.baseUrls.requestUrl ]), a, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (t.setData({ + isLoading: !1 + }), wx.showToast({ + title: "评论成功!", + icon: "success" + }), t.getRelyList(), t.setData({ + reply: "", + replyTo: "", + replyUserName: "", + placeholder: "讨论一下" + })); + }, function(e, a) { + console.log(a), t.setData({ + isLoading: !1 + }); + }); + } + }, + onLoad: function(t) { + this.setData({ + neighborId: t.neighborId, + userIcon: wx.getStorageSync("userIcon"), + userName: wx.getStorageSync("name"), + token: e.globalData.token + }), this.getHelpDetail(), this.getRelyList(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/neighbor/help/helpDetail.json b/pages/neighbor/help/helpDetail.json new file mode 100644 index 0000000..d3b097f --- /dev/null +++ b/pages/neighbor/help/helpDetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "邻里互助" +} \ No newline at end of file diff --git a/pages/neighbor/help/helpDetail.wxml b/pages/neighbor/help/helpDetail.wxml new file mode 100644 index 0000000..2c8e761 --- /dev/null +++ b/pages/neighbor/help/helpDetail.wxml @@ -0,0 +1,49 @@ + + + + + {{helpDetail.content}} + {{helpDetail.problemTypeName}} + + + + + + + + + + + + + + + + + 回复 + + + + + {{item.content}} + + + {{child.userName}} 回复 {{child.replyUserName}} : {{child.content}} + + + + + + diff --git a/pages/neighbor/help/helpDetail.wxss b/pages/neighbor/help/helpDetail.wxss new file mode 100644 index 0000000..21c0b88 --- /dev/null +++ b/pages/neighbor/help/helpDetail.wxss @@ -0,0 +1,166 @@ +.help-detail { + background-color: #fff; + padding: 20rpx; +} + +.talk-user,.user-info { + display: flex; + justify-content: space-between; + margin-bottom: 10rpx; +} + +.user-info image { + border-radius: 50%; + height: 80rpx; + margin-right: 20rpx; + width: 80rpx; +} + +.good image { + height: 40rpx; + margin-top: -8rpx; + vertical-align: middle; + width: 40rpx; +} + +.name { + font-size: 32rpx; + line-height: 50rpx; +} + +.time { + color: #888; + font-size: 24rpx; +} + +.good text { + line-height: 80rpx; +} + +.talk-content { + font-size: 32rpx; + line-height: 40rpx; + margin-bottom: 20rpx; +} + +.help-type { + margin: 10rpx 0; +} + +.help-date,.help-type { + color: #bbb; + font-size: 28rpx; +} + +.explain { + background-color: #fff; + margin-top: 20rpx; + padding: 20rpx; +} + +.explain-title { + font-size: 32rpx; + font-weight: 700; + margin-bottom: 10rpx; +} + +.explain-detail { + font-size: 30rpx; + line-height: 60rpx; + min-height: 300rpx; +} + +.answer { + background-color: #fff; + border-top: 1px solid #ddd; + bottom: 0; + left: 0; + padding: 35rpx 20rpx; + position: fixed; + right: 0; +} + +.answer input { + background-color: #f0f0f0; + border-radius: 40rpx; + box-sizing: border-box; + font-size: 32rpx; + height: 70rpx; + padding: 0 20rpx; + width: 100%; +} + +.reply { + background-color: #fff; + margin-bottom: 140rpx; + margin-top: 10rpx; + padding: 20rpx; +} + +.reply-title { + font-size: 32rpx; + font-weight: 700; +} + +.reply-box { + border-bottom: 1px solid #ddd; + padding: 20rpx 0; +} + +.reply-box:last-child { + border-bottom: none; +} + +.photo-box { + display: inline-block; + height: 180rpx; + margin-bottom: 15rpx; + margin-right: 2%; + overflow: hidden; + position: relative; + text-align: center; + width: 32%; +} + +.photo-box:nth-child(3n) { + margin-right: 0; +} + +.photo-one { + height: auto; + max-height: 600rpx; + width: 50%; +} + +.photo-one image { + max-width: 100%; +} + +.photo-four image { + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.photo-four:nth-child(3) { + margin-right: 2%; +} + +.photo-more image { + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.reply-row { + background-color: #f7f7f7; + line-height: 60rpx; + padding: 0 10rpx; + word-break: break-all; +} + +.reply-row text { + font-weight: 700; +} \ No newline at end of file diff --git a/pages/neighbor/help/helpList.js b/pages/neighbor/help/helpList.js new file mode 100644 index 0000000..dddc186 --- /dev/null +++ b/pages/neighbor/help/helpList.js @@ -0,0 +1,63 @@ +var e = require("../../../@babel/runtime/helpers/defineProperty"), t = getApp(); + +Page({ + data: { + token: t.globalData.token, + helpList: [], + page: { + page: 1, + rows: 10, + communityId: "" + }, + haveMore: !0, + serviceUrl: t.baseUrls.serviceUrl, + baseImgUrl: t.baseUrls.baseImgUrl + }, + getHelpList: function() { + var a = this; + t.restAjax.get(t.restAjax.path(t.apis.getHelpList, [ t.baseUrls.requestUrl ]), a.data.page, { + headers: { + token: t.globalData.token + } + }, function(t, o) { + for (var s = 0; s < o.rows.length; s++) o.rows[s].photo && (o.rows[s].photo = o.rows[s].photo.split(",")); + if (1 == a.data.page.page) a.setData({ + helpList: o.rows + }); else if (o.rows.length > 0) { + for (var n = a.data.helpList, r = 0; r < o.rows.length; r++) n.push(o.rows[r]); + a.setData({ + helpList: n + }); + } else wx.showToast({ + title: "暂无更多", + icon: "none" + }), a.setData(e({}, "page.page", a.data.page.page - 1)); + o.rows.length < 10 && a.setData({ + haveMore: !1 + }); + }, function(e, t) { + console.log(t); + }); + }, + checkHelpDetail: function(e) { + var t = e.currentTarget.dataset.id; + wx.navigateTo({ + url: "./helpDetail?neighborId=" + t + }); + }, + loadMore: function() { + this.setData(e({}, "page.page", this.data.page.page + 1)), this.getHelpList(); + }, + onLoad: function(a) { + var o; + this.setData((e(o = {}, "page.communityId", a.communityId), e(o, "token", t.globalData.token), + o)), this.getHelpList(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/neighbor/help/helpList.json b/pages/neighbor/help/helpList.json new file mode 100644 index 0000000..d3b097f --- /dev/null +++ b/pages/neighbor/help/helpList.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "邻里互助" +} \ No newline at end of file diff --git a/pages/neighbor/help/helpList.wxml b/pages/neighbor/help/helpList.wxml new file mode 100644 index 0000000..a58fb6b --- /dev/null +++ b/pages/neighbor/help/helpList.wxml @@ -0,0 +1,27 @@ + + + + + + {{item.nickName}} + {{item.gmtCreate}} + + + {{item.content}} + + + + + + + + + + + + + + + + +加载更多 diff --git a/pages/neighbor/help/helpList.wxss b/pages/neighbor/help/helpList.wxss new file mode 100644 index 0000000..6630a5c --- /dev/null +++ b/pages/neighbor/help/helpList.wxss @@ -0,0 +1,120 @@ +page { + background-color: #fff; +} + +.help-container { + padding: 0 20rpx; +} + +.help-box { + border-bottom: 1px solid #f9fafc; + padding: 20rpx 0; +} + +.help-user { + display: flex; +} + +.help-user image { + border-radius: 50%; + height: 100rpx; + margin-right: 20rpx; + width: 100rpx; +} + +.user-name { + font-size: 30rpx; + font-weight: 700; + margin: 10rpx 0; +} + +.user-time { + color: #999; + font-size: 28rpx; +} + +.help-content { + color: #101010; + font-size: 32rpx; + margin-top: 20rpx; +} + +.new { + background-color: #ff4949; + border-radius: 50%; + bottom: 40rpx; + color: #fff; + font-size: 80rpx; + height: 120rpx; + line-height: 120rpx; + position: fixed; + right: 40rpx; + text-align: center; + width: 120rpx; +} + +.help-photo { + margin-top: 20rpx; +} + +.help-photo-box { + display: inline-block; + height: 150rpx; + margin-bottom: 20rpx; + margin-right: 2%; + overflow: hidden; + position: relative; + text-align: center; + width: 32%; +} + +.help-photo-box:nth-child(3n) { + margin-right: 0; +} + +.photo-one { + height: auto; + max-height: 600rpx; + width: 50%; +} + +.photo-one image { + max-width: 100%; +} + +.photo-four image { + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.photo-four:nth-child(3) { + margin-right: 2%; +} + +.photo-more image { + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.help-video { + margin-top: 20rpx; +} + +.help-video,.help-video video { + width: 100%; +} + +.help-more { + font-size: 32rpx; + line-height: 70rpx; +} + +.load-more { + font-size: 32rpx; + line-height: 80rpx; + text-align: center; +} \ No newline at end of file diff --git a/pages/neighbor/help/new.js b/pages/neighbor/help/new.js new file mode 100644 index 0000000..9252a2a --- /dev/null +++ b/pages/neighbor/help/new.js @@ -0,0 +1,187 @@ +var e = getApp(); + +Page({ + data: { + token: e.globalData.token, + sourceUrl: e.baseUrls.sourceUrl, + helpType: [], + index: 0, + helpTypeAll: [], + helpSelected: "", + content: "", + contentSupplement: "", + userIcon: wx.getStorageSync("userIcon"), + userName: wx.getStorageSync("name"), + imageList: [], + serviceUrl: e.baseUrls.serviceUrl, + baseImgUrl: e.baseUrls.baseImgUrl, + videoId: "", + communityId: "", + areaCode: "", + isLoading: !1 + }, + bindPickerChange: function(e) { + this.setData({ + index: e.detail.value, + helpSelected: this.data.helpTypeAll[e.detail.value - 1].dataId + }); + }, + getHelpType: function() { + var a = this; + e.restAjax.get(e.restAjax.path(e.apis.getDictionary, [ e.baseUrls.serviceUrl, "4fcf52f9-2e05-4cca-8966-83f0232f22e8" ]), { + areaCode: a.data.locationCode + }, { + headers: { + token: a.data.token + } + }, function(e, t) { + for (var o = [ "请选择互助类型" ], i = 0; i < t.length; i++) o.push(t[i].dataName); + a.setData({ + helpType: o, + helpTypeAll: t + }), console.log(t); + }, function(e, a) { + console.log(a); + }); + }, + submitHelp: function() { + var a = this; + if (!a.data.isLoading) { + if (0 == a.data.index) return void wx.showToast({ + title: "请选择发布类型", + icon: "error" + }); + var t = ""; + if (a.data.imageList.length > 0) for (var o = 0; o < a.data.imageList.length; o++) o != a.data.imageList.length - 1 ? t += a.data.imageList[o] + "," : t += a.data.imageList[o]; + var i = { + content: a.data.content, + contentSupplement: a.data.contentSupplement, + photo: t, + problemTypeId: a.data.helpSelected, + problemTypeName: a.data.helpTypeAll[a.data.index - 1].dataName, + video: a.data.videoId, + videoCover: "", + headPortrait: a.data.userIcon, + nickName: a.data.userName, + communityId: a.data.communityId, + areaCode: a.data.areaCode + }; + a.setData({ + isLoading: !0 + }), e.restAjax.post(e.restAjax.path(e.apis.submitHelp, [ e.baseUrls.requestUrl ]), i, { + headers: { + token: a.data.token + } + }, function(e, t) { + "200" == e && (wx.showToast({ + title: "发布成功!", + icon: "success" + }), setTimeout(function() { + a.setData({ + isLoading: !1 + }), wx.navigateBack({ + delta: 1 + }); + }, 1500)), console.log(e); + }, function(e, t) { + console.log(t), a.setData({ + isLoading: !1 + }); + }); + } + }, + uploadImage: function() { + var a = this; + a.data.isLoading || (a.setData({ + isLoading: !0 + }), wx.chooseImage({ + count: 9 - a.data.imageList.length, + sourceType: [ "album", "camera" ], + success: function(t) { + wx.showToast({ + title: "上传中", + icon: "loading" + }); + for (var o = function(o) { + n = t.tempFiles[o].path, e.restAjax.file(e.restAjax.path(e.apis.uploadImg, [ e.baseUrls.serviceUrl ]), n, "image", { + headers: { + token: e.globalData.token + } + }, function(e, i) { + if ("200" == e) { + var n = JSON.parse(i).data, s = a.data.imageList; + s.push(n), a.setData({ + imageList: s + }), o == t.tempFiles.length - 1 && a.setData({ + isLoading: !1 + }), wx.hideToast(); + } + }, function(e, t) { + console.log(t), a.setData({ + isLoading: !1 + }); + }); + }, i = 0; i < t.tempFiles.length; i++) { + var n; + o(i); + } + } + })); + }, + uploadVideo: function() { + var a = this; + a.data.isLoading || (a.setData({ + isLoading: !0 + }), wx.chooseVideo({ + sourceType: [ "album", "camera" ], + success: function(t) { + e.restAjax.file(e.restAjax.path(e.apis.uploadVideo, [ e.baseUrls.serviceUrl ]), t.tempFilePath, "video", { + headers: { + token: e.globalData.token + } + }, function(e, t) { + if ("200" == e) { + a.setData({ + isLoading: !1 + }); + var o = JSON.parse(t).data; + a.setData({ + videoId: o + }); + } + }, function(e, t) { + console.log(t), a.setData({ + isLoading: !1 + }); + }); + } + })); + }, + deleteImg: function(e) { + var a = e.currentTarget.dataset.cur, t = this.data.imageList; + t.splice(a, 1), this.setData({ + imageList: t + }); + }, + deleteVideo: function() { + this.setData({ + videoId: "" + }); + }, + onLoad: function(a) { + this.getHelpType(), this.setData({ + communityId: a.communityId, + areaCode: a.areaCode, + userIcon: wx.getStorageSync("userIcon"), + userName: wx.getStorageSync("name"), + token: e.globalData.token + }); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/neighbor/help/new.json b/pages/neighbor/help/new.json new file mode 100644 index 0000000..d3b097f --- /dev/null +++ b/pages/neighbor/help/new.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "邻里互助" +} \ No newline at end of file diff --git a/pages/neighbor/help/new.wxml b/pages/neighbor/help/new.wxml new file mode 100644 index 0000000..057aadb --- /dev/null +++ b/pages/neighbor/help/new.wxml @@ -0,0 +1,35 @@ + + 发布类型 + + + {{helpType[index]}} + + + + + 问题描述 + + + + + + + + + + 添加照片 + + + + + + + + + + + 添加视频 + + + + + 发布 + diff --git a/pages/neighbor/help/new.wxss b/pages/neighbor/help/new.wxss new file mode 100644 index 0000000..2c67ced --- /dev/null +++ b/pages/neighbor/help/new.wxss @@ -0,0 +1,155 @@ +.new-help { + background-color: #fff; + margin-bottom: 100rpx; + padding: 20rpx; +} + +.new-title { + font-size: 32rpx; + font-weight: 700; +} + +.new-textarea,.new-title { + margin-bottom: 20rpx; +} + +.new-textarea input { + height: 60rpx; +} + +.new-textarea input,.new-textarea textarea { + border-bottom: 1px solid #ddd; + font-size: 32rpx; + width: 100%; +} + +.new-textarea textarea { + height: 400rpx; +} + +.new-textarea picker { + border-bottom: 1px solid #ddd; + font-size: 32rpx; + line-height: 60rpx; +} + +.submit { + margin: 20rpx auto; + width: 710rpx; +} + +.submit-btn { + background-color: rgba(36,40,46,.8); + border-radius: 16rpx; + height: 80rpx; + line-height: 80rpx; + margin-top: 0; + text-align: center; +} + +.upload-title { + font-size: 32rpx; + font-weight: 700; + line-height: 80rpx; +} + +.add { + align-items: center; + background-color: rgba(0,0,0,.05); + border: 1px solid hsla(0,0%,73%,.1); + box-sizing: border-box; + color: rgba(36,40,46,.5); + display: inline-flex; + flex-direction: column; + font-size: 30rpx; + height: 150rpx; + justify-content: center; + margin-bottom: 20rpx; + padding: 10rpx; + vertical-align: top; + width: 150rpx; +} + +.add-icon { + font-size: 40rpx; +} + +.image { + background-color: #fff; + display: inline-block; + height: 150rpx; + margin-bottom: 20rpx; + margin-right: 2%; + position: relative; + text-align: center; + vertical-align: top; + width: 32%; +} + +.image:nth-child(3n) { + margin-right: 0; +} + +.image image { + height: 100%; +} + +.add.video { + background-color: #000; + height: auto; + position: relative; + width: 100%; +} + +.add:nth-child(3n) { + margin-right: 0; +} + +.add image { + height: 100%; +} + +.delete { + height: 30rpx!important; + position: absolute; + right: -15rpx; + top: -15rpx; + width: 30rpx; +} + +.help-row { + background-color: #fff; + color: rgba(36,40,46,.5); + display: flex; + font-size: 32rpx; + height: 80rpx; + justify-content: space-between; + line-height: 80rpx; + margin: 20rpx 0; + padding: 0 20rpx; +} + +.help-row picker { + color: #24282e; +} + +.help-desc { + background-color: #fff; + padding: 20rpx; +} + +.desc-title { + color: rgba(36,40,46,.5); + font-size: 32rpx; + margin-bottom: 15rpx; +} + +.help-desc textarea { + font-size: 30rpx; + height: 300rpx; + width: 100%; +} + +.upload-file { + margin-top: 20rpx; +} \ No newline at end of file diff --git a/pages/neighbor/neighbor.js b/pages/neighbor/neighbor.js new file mode 100644 index 0000000..5f5dfda --- /dev/null +++ b/pages/neighbor/neighbor.js @@ -0,0 +1,165 @@ +var t = require("../../@babel/runtime/helpers/defineProperty"), e = getApp(); + +Page({ + data: { + token: e.globalData.token, + sourceUrl: e.baseUrls.sourceUrl, + array: [], + index: 0, + communityList: [], + communitySelected: "", + areaCode: "", + page: { + page: 1, + rows: 5, + communityId: "" + }, + helpList: [], + circleList: [], + serviceUrl: e.baseUrls.serviceUrl, + baseImgUrl: e.baseUrls.baseImgUrl, + tab: "1", + isShowMenu: !1 + }, + checkHelpMore: function() { + "1" == this.data.tab ? wx.navigateTo({ + url: "./help/helpList?communityId=" + this.data.communitySelected + }) : wx.navigateTo({ + url: "./circle/circleList" + }); + }, + checkHelpDetail: function(t) { + var e = t.currentTarget.dataset.id; + wx.navigateTo({ + url: "./help/helpDetail?neighborId=" + e + }); + }, + bindPickerChange: function(e) { + var a; + this.setData((a = { + index: e.detail.value, + communitySelected: this.data.communityList[e.detail.value].communityId + }, t(a, "page.communityId", this.data.communityList[e.detail.value].communityId), + t(a, "areaCode", this.data.communityList[e.detail.value].areaCode), a)), wx.setStorage({ + data: e.detail.value, + key: "communityIndex" + }), "1" == this.data.tab ? this.getHelpList() : this.getCircleList(); + }, + newHelp: function() { + wx.navigateTo({ + url: "./help/new?communityId=" + this.data.communitySelected + "&areaCode=" + this.data.areaCode + }); + }, + newCircle: function() { + wx.navigateTo({ + url: "./circle/new?communityId=" + this.data.communitySelected + "&areaCode=" + this.data.areaCode + }); + }, + getHelpList: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getHelpList, [ e.baseUrls.requestUrl ]), t.data.page, { + headers: { + token: t.data.token + } + }, function(e, a) { + for (var n = 0; n < a.rows.length; n++) a.rows[n].photo && (a.rows[n].photo = a.rows[n].photo.split(",")); + t.setData({ + helpList: a.rows + }); + }, function(t, e) { + console.log(e); + }); + }, + getCircleList: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getCircleList, [ e.baseUrls.requestUrl ]), t.data.page, { + headers: { + token: t.data.token + } + }, function(e, a) { + for (var n = 0; n < a.rows.length; n++) a.rows[n].photo && (a.rows[n].photo = a.rows[n].photo.split(",")); + t.setData({ + helpList: a.rows + }); + }, function(t, e) { + console.log(e); + }); + }, + checkCircleDetail: function(t) { + var e = t.currentTarget.dataset.id; + wx.navigateTo({ + url: "./circle/circleDetail?neighborCircleId=" + e + }); + }, + getMyCommunity: function() { + var a = this; + e.restAjax.get(e.restAjax.path(e.apis.mycommunity, [ e.baseUrls.requestUrl ]), {}, { + headers: { + token: a.data.token + } + }, function(e, n) { + if (n.length > 0) { + for (var i, o = [], s = 0; s < n.length; s++) o.push(n[s].communityName); + a.setData((i = { + communityList: n, + array: o, + communitySelected: wx.getStorageSync("communityIndex") ? n[wx.getStorageSync("communityIndex")].communityId : n[0].communityId + }, t(i, "page.communityId", wx.getStorageSync("communityIndex") ? n[wx.getStorageSync("communityIndex")].communityId : n[0].communityId), + t(i, "areaCode", wx.getStorageSync("communityIndex") ? n[wx.getStorageSync("communityIndex")].areaCode : n[0].areaCode), + i)), "1" == a.data.tab ? a.getHelpList() : a.getCircleList(); + } else wx.showToast({ + title: "请先在首页加入您的社区", + icon: "none" + }), setTimeout(function() { + wx.switchTab({ + url: "../index/index" + }); + }, 1500); + }, function(t, e) { + console.log(e); + }); + }, + newContent: function() { + "1" == this.data.tab ? this.newHelp() : this.newCircle(); + }, + changeTab: function(e) { + var a = e.currentTarget.dataset.tab; + a != this.data.tab && ("1" == a ? (this.setData(t({ + tab: a + }, "page.page", 1)), this.getHelpList()) : (this.setData(t({ + tab: a + }, "page.page", 1)), this.getCircleList())); + }, + onLoad: function(t) { + this.setData({ + token: e.globalData.token + }); + }, + onReady: function() {}, + onShow: function() { + this.getMyCommunity(), this.getMenuIsShow(); + }, + getMenuIsShow: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getBtnIsShow, [ e.baseUrls.requestUrl, "neighbor" ]), null, { + headers: { + token: e.globalData.token + } + }, function(e, a) { + null != a && null != a ? t.setData({ + isShowMenu: 1 == a.isShow + }) : t.setData({ + isShowMenu: !1 + }); + }, function(e, a) { + t.setData({ + isShowMenu: !1 + }); + }); + }, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/neighbor/neighbor.json b/pages/neighbor/neighbor.json new file mode 100644 index 0000000..b2bf29b --- /dev/null +++ b/pages/neighbor/neighbor.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "热点推送" +} \ No newline at end of file diff --git a/pages/neighbor/neighbor.wxml b/pages/neighbor/neighbor.wxml new file mode 100644 index 0000000..26a3be6 --- /dev/null +++ b/pages/neighbor/neighbor.wxml @@ -0,0 +1,81 @@ + + + + + + + {{array[index]}} + + + + #邻里互助 + #助人为乐 + #求助 + + 和睦的邻里关系,对于能够为邻的人是一种幸福,同时也是社会和谐的基础。 + + + + + 邻里互助 + 邻里圈 + + + + + + + {{item.nickName}} {{item.problemTypeName}} + + {{item.gmtCreate}} + + + {{item.content}} + + + + + + + + + + + + + + + + + + + + {{item.nickName}} + {{item.gmtCreate}} + + + {{item.content}} + + + + + + + + + + + + + + + + + + + 查看更多 + + + + + diff --git a/pages/neighbor/neighbor.wxss b/pages/neighbor/neighbor.wxss new file mode 100644 index 0000000..89de6ee --- /dev/null +++ b/pages/neighbor/neighbor.wxss @@ -0,0 +1,211 @@ +.neighbor-top { + position: relative; +} + +.top-bg,.top-bg image { + width: 100%; +} + +.neighbor-info { + background-color: rgba(0,0,0,.6); + bottom: 0; + color: #fff; + left: 0; + padding: 20rpx; + position: absolute; + right: 0; + top: 0; +} + +.neighbor-info picker { + font-size: 40rpx; + margin-bottom: 30rpx; +} + +.neighbor-info .warm-tip { + font-size: 30rpx; +} + +.topic { + margin-bottom: 20rpx; +} + +.topic-box { + background-color: hsla(0,0%,100%,.35); + border-radius: 24rpx; + display: inline-block; + font-size: 30rpx; + height: 45rpx; + line-height: 45rpx; + margin-right: 20rpx; + padding: 0 15rpx; +} + +.neighbor-container { + background-color: #fff; + border-top-left-radius: 30rpx; + border-top-right-radius: 30rpx; + margin-top: -100rpx; + padding: 20rpx 20rpx 0; + position: relative; +} + +.tab-box { + color: #797979; + display: inline-block; + font-size: 32rpx; + line-height: 60rpx; + margin-right: 30rpx; +} + +.tab-box.active { + border-bottom: 2px solid #ff4949; + color: #000; + font-weight: 700; +} + +.help-box { + border-bottom: 1px solid #f9fafc; + padding: 20rpx 0; +} + +.help-user { + display: flex; +} + +.help-user image { + border-radius: 50%; + height: 100rpx; + margin-right: 20rpx; + width: 100rpx; +} + +.user-name { + font-size: 30rpx; + font-weight: 700; + margin: 10rpx 0; +} + +.user-name text { + background-color: #ff4949; + border-radius: 24rpx; + color: #fff; + font-size: 26rpx; + font-weight: 400; + padding: 5rpx 15rpx; +} + +.user-time { + color: #999; + font-size: 28rpx; +} + +.help-content { + color: #101010; + font-size: 32rpx; + margin-top: 20rpx; +} + +.new { + align-items: center; + background-color: #ff4949; + border-radius: 50%; + bottom: 40rpx; + color: #fff; + display: flex; + font-size: 0; + height: 120rpx; + justify-content: center; + position: fixed; + right: 40rpx; + width: 120rpx; +} + +.new image { + height: 60rpx; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.help-photo { + margin-top: 20rpx; +} + +.help-photo-box { + display: inline-block; + height: 180rpx; + margin-bottom: 20rpx; + margin-right: 2%; + overflow: hidden; + position: relative; + text-align: center; + width: 32%; +} + +.help-photo-box:nth-child(3n) { + margin-right: 0; +} + +.photo-one { + height: auto; + max-height: 600rpx; + width: 50%; +} + +.photo-one image { + max-width: 100%; +} + +.photo-four image { + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.photo-four:nth-child(3) { + margin-right: 2%; +} + +.photo-more image { + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); +} + +.help-video { + margin-top: 20rpx; + width: 65%; +} + +.help-video video { + width: 100%; +} + +.help-more { + font-size: 32rpx; + line-height: 70rpx; +} + +.no-data { + padding: 50rpx 0; + text-align: center; +} + +.no-data image { + width: 300rpx; +} + +.neighbor-tab { + margin-bottom: 30rpx; +} + +.picker image { + height: 28rpx; + margin-top: -10rpx; + vertical-align: middle; + width: 28rpx; +} \ No newline at end of file diff --git a/pages/news/newsDetail.js b/pages/news/newsDetail.js new file mode 100644 index 0000000..2deaeaf --- /dev/null +++ b/pages/news/newsDetail.js @@ -0,0 +1,200 @@ +var e = getApp(); + +Page({ + data: { + token: e.globalData.token, + sourceUrl: e.baseUrls.sourceUrl, + newsId: "", + newsDetail: {}, + reply: "", + userIcon: "", + userName: "", + replyList: [], + isCollect: "no", + isGetFocus: !1, + placeholder: "写评论", + replyTo: "", + replyUserName: "", + isLoading: !1 + }, + getNewsDetail: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getNewsDetail, [ e.baseUrls.requestUrl, t.data.newsId ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + t.setData({ + newsDetail: a + }); + }, function(e, t) { + console.log(t); + }); + }, + doReplyNews: function() { + var t = this; + if (!t.data.isLoading) { + if (!t.data.reply) return void wx.showToast({ + title: "评论不能为空", + icon: "error" + }); + var a = { + content: t.data.reply, + headPortrait: t.data.userIcon, + userName: t.data.userName, + newsId: t.data.newsId + }; + t.setData({ + isLoading: !0 + }), e.restAjax.post(e.restAjax.path(e.apis.submitNewsReply, [ e.baseUrls.requestUrl ]), a, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (t.getReplyList(), t.setData({ + reply: "", + isLoading: !1 + })); + }, function(e, a) { + console.log(a), t.setData({ + isLoading: !1 + }); + }); + } + }, + getReplyList: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getNewsReplyList, [ e.baseUrls.requestUrl ]), { + newsId: t.data.newsId + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + t.setData({ + replyList: a + }); + }, function(e, t) { + console.log(t); + }); + }, + getIsCollect: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.isCollectNews, [ e.baseUrls.requestUrl, t.data.newsId ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + t.setData({ + isCollect: a + }); + }, function(e, t) { + console.log(t); + }); + }, + toggleCollect: function() { + "no" == this.data.isCollect ? this.collectNews() : this.cancelCollect(); + }, + collectNews: function() { + var t = this; + e.restAjax.post(e.restAjax.path(e.apis.doCollectNews, [ e.baseUrls.requestUrl ]), { + newsId: t.data.newsId + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (wx.showToast({ + title: "收藏成功!", + icon: "success" + }), t.getIsCollect()); + }, function(e, t) { + console.log(t); + }); + }, + cancelCollect: function() { + var t = this; + e.restAjax.delete(e.restAjax.path(e.apis.cancelCollectNews, [ e.baseUrls.requestUrl, t.data.newsId ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (wx.showToast({ + title: "已取消收藏!", + icon: "success" + }), t.getIsCollect()); + }, function(e, t) { + console.log(t); + }); + }, + getFocus: function(e) { + var t = e.currentTarget.dataset.user, a = e.currentTarget.dataset.id, s = e.currentTarget.dataset.name; + this.setData({ + isGetFocus: !0, + placeholder: "回复" + t + ":", + replyTo: a, + replyUserName: s + }); + }, + inputBlur: function() { + this.data.reply || this.setData({ + placeholder: "讨论一下", + isGetFocus: !1 + }); + }, + doReply: function() { + this.data.replyTo ? this.doReplyReply() : this.doReplyNews(); + }, + doReplyReply: function() { + var t = this; + if (!t.data.isLoading) { + var a = { + content: t.data.reply, + headPortrait: t.data.userIcon, + userName: t.data.userName, + newsId: t.data.newsId, + commentId: t.data.replyTo, + replyCommentId: t.data.replyTo, + replyNewsCommentId: t.data.replyTo, + replyUserName: t.data.replyUserName + }; + t.setData({ + isLoading: !0 + }), e.restAjax.post(e.restAjax.path(e.apis.submitNewsReply, [ e.baseUrls.requestUrl ]), a, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (wx.showToast({ + title: "评论成功!", + icon: "success" + }), t.getReplyList(), t.setData({ + reply: "", + replyTo: "", + replyUserName: "", + placeholder: "讨论一下", + isLoading: !1 + })); + }, function(e, a) { + console.log(a), t.setData({ + isLoading: !1 + }); + }); + } + }, + onLoad: function(t) { + this.setData({ + newsId: t.newsId, + userIcon: wx.getStorageSync("userIcon"), + userName: wx.getStorageSync("name"), + token: e.globalData.token + }), this.getNewsDetail(), this.getReplyList(), this.getIsCollect(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/news/newsDetail.json b/pages/news/newsDetail.json new file mode 100644 index 0000000..2992ee6 --- /dev/null +++ b/pages/news/newsDetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "新闻" +} \ No newline at end of file diff --git a/pages/news/newsDetail.wxml b/pages/news/newsDetail.wxml new file mode 100644 index 0000000..6d3d04b --- /dev/null +++ b/pages/news/newsDetail.wxml @@ -0,0 +1,38 @@ + + + {{newsDetail.title}} + + 来源:{{newsDetail.source}} + {{newsDetail.sendTime}} + + + + + + + 评论区 + + + + + {{item.content}} + + + {{child.userName}} 回复 {{child.replyUserName}} : {{child.content}} + + + + + + + + + + + diff --git a/pages/news/newsDetail.wxss b/pages/news/newsDetail.wxss new file mode 100644 index 0000000..79a6ca6 --- /dev/null +++ b/pages/news/newsDetail.wxss @@ -0,0 +1,130 @@ +page { + background-color: #fff; +} + +.news-title { + border-bottom: 1px solid #fafafc; + margin-bottom: 20rpx; + padding-bottom: 20rpx; +} + +.title { + font-size: 36rpx; + font-weight: 700; + margin-bottom: 10rpx; +} + +.from-date { + color: #bbb; + display: flex; + font-size: 28rpx; + justify-content: space-between; +} + +.news-content { + border-bottom: 1px solid #fafafc; + font-size: 30rpx; + line-height: 60rpx; + min-height: 600rpx; +} + +.comment { + margin: 20rpx 0 130rpx; +} + +.comment-title { + font-size: 32rpx; + font-weight: 700; +} + +.talk-user,.user-info { + display: flex; + justify-content: space-between; + margin-bottom: 10rpx; +} + +.user-info image { + height: 80rpx; + margin-right: 20rpx; + width: 80rpx; +} + +.good image { + height: 40rpx; + margin-top: -8rpx; + vertical-align: middle; + width: 40rpx; +} + +.name { + font-size: 32rpx; + line-height: 50rpx; +} + +.time { + color: #888; + font-size: 24rpx; +} + +.good text { + line-height: 80rpx; +} + +.comment-box { + border-bottom: 1px solid #fafafc; + margin-top: 20rpx; + padding-bottom: 20rpx; +} + +.talk-content { + font-size: 30rpx; + line-height: 40rpx; +} + +.talk-time { + color: #bbb; + font-size: 28rpx; + margin-top: 10rpx; +} + +.do-reply { + background-color: #fff; + border-top: 1px solid #fafafc; + bottom: 0; + display: flex; + left: 0; + padding: 35rpx 20rpx; + position: fixed; + right: 0; + z-index: 100; +} + +.do-reply input { + background-color: #f0f0f0; + border-radius: 40rpx; + box-sizing: border-box; + height: 60rpx; + padding: 0 20rpx; + width: 80%; +} + +.collect { + height: 60rpx; + text-align: center; + width: 20%; +} + +.collect image { + height: 100%; +} + +.reply-row { + background-color: #f7f7f7; + line-height: 60rpx; + padding: 0 10rpx; + word-break: break-all; +} + +.reply-row text { + font-weight: 700; +} \ No newline at end of file diff --git a/pages/news/newsList.js b/pages/news/newsList.js new file mode 100644 index 0000000..8dbcdcf --- /dev/null +++ b/pages/news/newsList.js @@ -0,0 +1,86 @@ +var e = require("../../@babel/runtime/helpers/defineProperty"), t = getApp(); + +Page({ + data: { + token: t.globalData.token, + sourceUrl: t.baseUrls.sourceUrl, + newsType: [], + curType: "", + page: { + page: 1, + rows: 10, + newsTypeId: "", + areaCode: "" + }, + newsList: [], + serviceUrl: t.baseUrls.serviceUrl, + baseImgUrl: t.baseUrls.baseImgUrl + }, + getNewsType: function() { + var a = this; + t.restAjax.get(t.restAjax.path(t.apis.getNewsType, [ t.baseUrls.requestUrl ]), { + showArea: "6dcbb862-4b48-4dca-aee1-d78fd76adc05" + }, { + headers: { + token: a.data.token + } + }, function(t, s) { + var n; + a.setData((e(n = { + newsType: s + }, "page.newsTypeId", s[0].newsTypeId), e(n, "curType", s[0].newsTypeId), n)), a.getNewsList(); + }, function(e, t) { + console.log(t); + }); + }, + changeType: function(t) { + var a, s = t.currentTarget.dataset.id; + this.setData((e(a = { + curType: s + }, "page.newsTypeId", s), e(a, "page.page", 1), a)), this.getNewsList(); + }, + getNewsList: function() { + var a = this; + t.restAjax.get(t.restAjax.path(t.apis.getNewsList, [ t.baseUrls.requestUrl ]), a.data.page, { + headers: { + token: a.data.token + } + }, function(t, s) { + for (var n = 0; n < s.rows.length; n++) s.rows[n].photo && (s.rows[n].photo = s.rows[n].photo.split(",")); + if (1 == a.data.page.page) a.setData({ + newsList: s.rows + }); else if (s.rows.length > 0) { + for (var o = a.data.newsList, r = 0; r < s.rows.length; r++) o.push(s.rows[r]); + a.setData({ + newsList: o + }); + } else wx.showToast({ + title: "暂无更多", + icon: "none" + }), a.setData(e({}, "page.page", a.data.page.page - 1)); + }, function(e, t) { + console.log(t); + }); + }, + checkDetail: function(e) { + var t = e.currentTarget.dataset.id; + wx.navigateTo({ + url: "./newsDetail?newsId=" + t + }); + }, + onLoad: function(a) { + this.setData(e({ + token: t.globalData.token + }, "page.areaCode", wx.getStorageSync("areaCode") ? wx.getStorageSync("areaCode") : "")), + this.getNewsType(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() { + this.setData(e({}, "page.page", this.data.page.page + 1)), this.getNewsList(); + }, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/news/newsList.json b/pages/news/newsList.json new file mode 100644 index 0000000..04c0b6f --- /dev/null +++ b/pages/news/newsList.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "服务公告" +} \ No newline at end of file diff --git a/pages/news/newsList.wxml b/pages/news/newsList.wxml new file mode 100644 index 0000000..fadaddd --- /dev/null +++ b/pages/news/newsList.wxml @@ -0,0 +1,54 @@ + + {{item.typeName}} + + + + + + {{item.title}} + + + + + {{item.sendTime}} + + + + + + + {{item.title}} + {{item.sendTime}} + + + + + {{item.title}} + {{item.sendTime}} + + + + + + + + {{item.title}} + + + + + + + {{item.sendTime}} + + + + {{item.title}} + + {{item.sendTime}} + + + + + + diff --git a/pages/news/newsList.wxss b/pages/news/newsList.wxss new file mode 100644 index 0000000..81da2b7 --- /dev/null +++ b/pages/news/newsList.wxss @@ -0,0 +1,121 @@ +.news-type,page { + background-color: #fff; +} + +.news-type { + border-bottom: 1px solid #ddd; + display: flex; + flex-wrap: nowrap; + left: 0; + overflow-x: auto; + position: fixed; + right: 0; + top: 0; + z-index: 100; +} + +.type-box { + flex-shrink: 0; + font-size: 32rpx; + line-height: 80rpx; + text-align: center; + width: 25%; +} + +.type-box.active { + color: #f55054; +} + +.news-list { + margin-top: 80rpx; + padding: 20rpx; +} + +.news-box { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; + padding: 20rpx 0; +} + +.news-img { + height: 150rpx; + overflow: hidden; + text-align: center; + width: 30%; +} + +.news-img image { + border-radius: 10rpx; + height: 100%; +} + +.news-info { + width: 68%; +} + +.news-title { + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + display: -webkit-box; + font-size: 32rpx; + font-weight: 700; + overflow: hidden; +} + +.news-date { + color: #bbb; + font-size: 30rpx; + margin-top: 15rpx; +} + +.style3,.style4 { + flex-direction: column; +} + +.style3 .news-img,.style3 .news-info,.style4 .news-info { + width: 100%; +} + +.style3 .news-img { + height: auto; + margin-top: 10rpx; +} + +.style3 .news-img image,.style5 .news-info { + width: 100%; +} + +.style5 { + flex-direction: column; +} + +.news-img-container .img-box { + border-radius: 10rpx; + display: inline-block; + height: 150rpx; + margin-right: 2%; + text-align: center; + width: 32%; +} + +.img-box image { + height: 100%; +} + +.news-img-container .img-box:last-child { + margin-right: 0; +} + +.news-img-container { + margin-top: 10rpx; +} + +.no-data { + margin-top: 150rpx; + text-align: center; +} + +.no-data image { + width: 300rpx; +} \ No newline at end of file diff --git a/pages/report/report.js b/pages/report/report.js new file mode 100644 index 0000000..b3e2b0e --- /dev/null +++ b/pages/report/report.js @@ -0,0 +1,431 @@ +var e = getApp(), t = require("../../utils/WSCoordinate.js"); + +Page({ + data: { + sourceUrl: e.baseUrls.sourceUrl, + typeAll: [], + typeArray: [], + typeIdx: 0, + typeSelected: "", + typeSelectedCode: "", + typeSelectedName: "", + type2All: [], + type2Array: [ "请选择上级类型" ], + type2Idx: 0, + type2Selected: "", + type2SelectedName: "", + areaAll: [], + areaArray: [], + areaIdx: 0, + areaSelected: "", + areaSelectedName: "", + villageAll: [], + villageArray: [], + villageIdx: 0, + villageSelected: "", + villageSelectedName: "", + committeeAll: [], + committeeArray: [], + committeeIdx: 0, + committeeSelected: "", + committeeSelectedName: "", + recodePath: "", + recorderManager: wx.getRecorderManager(), + baseImgUrl: e.baseUrls.baseImgUrl, + caseUrl: e.baseUrls.caseUrl, + imageList: [], + videoId: "", + audioId: "", + latitude: "", + longitude: "", + reportAddress: "", + reportContent: "", + reportInfo: { + bGId: "", + casePartsObjId: "123", + casePartsObjName: "123", + caseTypeCode1: "", + caseTypeCode2: "", + caseTypeName1: "", + caseTypeName2: "", + reportAddress: "", + reportAreaCod: "", + reportAreaName: "例如北京市 / xx区 / xx街道 / xx", + reportAudio: "", + reportContent: "", + reportLat: "", + reportLng: "", + reportPhotos: "", + reportVideo: "" + }, + isLoading: !1 + }, + getArea: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getArea, [ e.baseUrls.caseUrl, "110889" ]), {}, { + headers: { + token: e.globalData.token + } + }, function(e, a) { + for (var o = [ "请选择区县" ], i = 0; i < a.length; i++) o.push(a[i].areaName); + t.setData({ + areaAll: a, + areaArray: o + }); + }, function(e, t) { + console.log(t); + }); + }, + getVillage: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getChildArea, [ e.baseUrls.caseUrl, t.data.areaSelected ]), {}, { + headers: { + token: e.globalData.token + } + }, function(e, a) { + for (var o = [ "请选择乡镇" ], i = 0; i < a.length; i++) o.push(a[i].areaName); + t.setData({ + villageAll: a, + villageArray: o + }); + }, function(e, t) { + console.log(t); + }); + }, + getCommittee: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getChildArea, [ e.baseUrls.caseUrl, t.data.villageSelected ]), {}, { + headers: { + token: e.globalData.token + } + }, function(e, a) { + for (var o = [ "请选择委员会" ], i = 0; i < a.length; i++) o.push(a[i].areaName); + t.setData({ + committeeAll: a, + committeeArray: o + }); + }, function(e, t) { + console.log(t); + }); + }, + getCaseType: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.caseType, [ e.baseUrls.caseUrl ]), {}, { + headers: { + token: e.globalData.token + } + }, function(e, a) { + for (var o = [ "请选择事件类型" ], i = 0; i < a.length; i++) o.push(a[i].name); + t.setData({ + typeAll: a, + typeArray: o + }); + }, function(e, t) { + console.log(t); + }); + }, + getCaseTypeChild: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.caseTypeChild + "/" + t.data.typeSelected, [ e.baseUrls.caseUrl ]), {}, { + headers: { + token: e.globalData.token + } + }, function(e, a) { + for (var o = [ "请选择事件类型" ], i = 0; i < a.length; i++) o.push(a[i].typeName); + t.setData({ + type2All: a, + type2Array: o + }); + }, function(e, t) { + console.log(t); + }); + }, + bindPickerChange: function(e) { + 0 != e.detail.value ? (this.setData({ + typeIdx: e.detail.value, + typeSelected: this.data.typeAll[e.detail.value - 1].id, + typeSelectedCode: this.data.typeAll[e.detail.value - 1].code, + typeSelectedName: this.data.typeAll[e.detail.value - 1].name + }), this.getCaseTypeChild()) : this.setData({ + typeIdx: 0, + typeSelected: "", + type2Array: [] + }); + }, + bindCaseTypeChange: function(e) { + 0 != e.detail.value ? this.setData({ + type2Idx: e.detail.value, + type2Selected: this.data.type2All[e.detail.value - 1].typeCode, + type2SelectedName: this.data.type2All[e.detail.value - 1].typeName + }) : this.setData({ + type2Idx: 0, + type2Selected: "" + }); + }, + bindAreaPickerChange: function(e) { + 0 != e.detail.value ? (this.setData({ + areaIdx: e.detail.value, + areaSelected: this.data.areaAll[e.detail.value - 1].areaCode, + areaSelectedName: this.data.areaAll[e.detail.value - 1].areaName + }), this.getVillage()) : this.setData({ + areaIdx: 0, + areaSelected: "", + villageArray: [], + committeeArray: [] + }); + }, + bindVillagePickerChange: function(e) { + 0 != e.detail.value ? (this.setData({ + villageIdx: e.detail.value, + villageSelected: this.data.villageAll[e.detail.value - 1].areaId, + villageSelectedName: this.data.villageAll[e.detail.value - 1].areaName + }), this.getCommittee()) : this.setData({ + villageIdx: 0, + villageSelected: "", + committeeArray: [] + }); + }, + bindCommitteePickerChange: function(e) { + 0 != e.detail.value ? this.setData({ + committeeIdx: e.detail.value, + committeeSelected: this.data.committeeAll[e.detail.value - 1].areaId, + committeeSelectedName: this.data.committeeAll[e.detail.value - 1].areaName + }) : this.setData({ + committeeIdx: 0, + committeeSelected: "" + }); + }, + recordVoice: function(e) { + this.setData({ + startTouch: e.touches[0] + }); + this.data.recorderManager.start({ + format: "mp3" + }), wx.showToast({ + title: "正在录音", + icon: "none", + duration: 6e4 + }); + }, + recordEnd: function() { + var t = this; + this.data.recorderManager.stop(), this.data.recorderManager.onStop(function(a) { + var o = a.tempFilePath; + wx.showToast({ + title: "上传中", + icon: "loading" + }), e.restAjax.file(e.restAjax.path(e.apis.uploadAudio, [ e.baseUrls.caseUrl ]), o, "audio", { + headers: { + token: e.globalData.token + } + }, function(e, a) { + var o = JSON.parse(a).data; + t.setData({ + audioId: o + }), wx.hideToast(); + }, function(e, t) { + console.log(t); + }); + }); + t = this; + wx.hideToast(); + }, + playRecord: function() { + var e = wx.createInnerAudioContext(); + e.src = this.data.caseUrl + this.data.baseImgUrl + this.data.audioId, e.play(); + }, + doLogin: function() { + wx.login({ + success: function(t) { + e.restAjax.post(e.restAjax.path(e.apis.login, [ e.baseUrls.loginUrl ]), { + jsCode: t.code + }, null, function(e, t) { + console.log(t); + }, function(t, a) { + e.dialog.msg(a.msg); + }); + } + }); + }, + uploadImage: function() { + var t = this; + t.data.isLoading || (t.setData({ + isLoading: !0 + }), wx.chooseImage({ + count: 9 - t.data.imageList.length, + sourceType: [ "album", "camera" ], + success: function(a) { + wx.showToast({ + title: "上传中", + icon: "loading" + }); + for (var o = 0; o < a.tempFiles.length; o++) { + var i = a.tempFiles[o].path; + e.restAjax.file(e.restAjax.path(e.apis.uploadImg, [ e.baseUrls.caseUrl ]), i, "image", { + headers: { + token: e.globalData.token + } + }, function(e, a) { + if ("200" == e) { + t.setData({ + isLoading: !1 + }); + var o = JSON.parse(a).data, i = t.data.imageList; + i.push(o), t.setData({ + imageList: i + }), wx.hideToast(); + } + }, function(e, a) { + console.log(a), t.setData({ + isLoading: !1 + }); + }); + } + } + })); + }, + uploadVideo: function() { + var t = this; + t.data.isLoading || (t.setData({ + isLoading: !0 + }), wx.chooseVideo({ + sourceType: [ "album", "camera" ], + maxDuration: 60, + camera: "back", + success: function(a) { + wx.showToast({ + title: "上传中", + icon: "loading" + }); + var o = a.tempFilePath; + e.restAjax.file(e.restAjax.path(e.apis.uploadVideo, [ e.baseUrls.caseUrl ]), o, "video", { + headers: { + token: e.globalData.token + } + }, function(e, a) { + if ("200" == e) { + var o = JSON.parse(a).data; + t.setData({ + videoId: o, + isLoading: !1 + }), wx.hideToast(); + } + }, function(e, a) { + console.log(a), t.setData({ + isLoading: !1 + }); + }); + } + })); + }, + chooseLocation: function() { + var e = this; + wx.chooseLocation({ + success: function(a) { + console.log(a); + var o = t.transformFromGCJToWGS(a.latitude, a.longitude); + console.log(o), e.setData({ + longitude: o.longitude, + latitude: o.latitude + }); + } + }); + }, + editInfo: function(e) { + "location" == e.currentTarget.dataset.type ? this.setData({ + reportAddress: e.detail.value + }) : this.setData({ + reportContent: e.detail.value + }); + }, + submitReport: function() { + var t = this; + if (!t.data.isLoading) { + if (!this.data.typeSelected) return void wx.showToast({ + title: "请选择事件类型", + icon: "error" + }); + if (!this.data.type2Selected) return void wx.showToast({ + title: "请选择事件类型", + icon: "error" + }); + if (!this.data.reportAddress) return void wx.showToast({ + title: "请输入事发位置", + icon: "error" + }); + if (!this.data.longitude && !this.data.latitude) return void wx.showToast({ + title: "请选择事发坐标", + icon: "error" + }); + if (!this.data.reportContent) return void wx.showToast({ + title: "请输入事件说明", + icon: "error" + }); + for (var a, o = "内蒙古自治区 / 乌兰察布市 / " + wx.getStorageSync("curCommunityName"), i = 0; i < t.data.imageList.length; i++) 0 == i ? a = t.data.imageList[i] : a += "," + t.data.imageList[i]; + var s = wx.getStorageSync("areaCode"), r = { + bGId: "", + casePartsObjId: "", + casePartsObjName: "", + caseTypeCode1: t.data.typeSelectedCode, + caseTypeCode2: t.data.type2Selected, + caseTypeName1: t.data.typeSelectedName, + caseTypeName2: t.data.type2SelectedName, + reportAddress: t.data.reportAddress, + reportAreaCode: s, + isSelf: "0", + reportAreaName: o, + reportAudio: t.data.audioId, + reportContent: t.data.reportContent, + reportLat: t.data.latitude, + reportLng: t.data.longitude, + reportPhotos: a, + reportVideo: t.data.videoId, + gridMiniId: wx.getStorageSync("gridMiniId") + }; + t.setData({ + isLoading: !0 + }), e.restAjax.post(e.restAjax.path(e.apis.submitReport, [ e.baseUrls.requestUrl ]), r, { + headers: { + token: "cVJWWXQ1UWpQWTQ1TDZMbEVtTmxiMlJVNkdvTzUwSTNHYzZaK3VTZmF0RXNITnQ3RXUxZ2F6eVU4dGpZWjFqWm5Pc0Fqd2l6MzAvMlZSckZaTkZITFZmVXk4YVNWVVErcEJ5SGZzVFRGeGFEenBMaDhZU0FFc1hnZ2RGc2hLUWZvMTJtWHRkcENmWThROTZFL2d5WDJxc0RBY2RzUkUzUzIyNlBmblFhUGdPZWdFY3JOeU5mME5veEk1aVU4a1hNMFNlaW1BemFwRjhRbXVRUUt1MTlObEViSTlhMUVoSEJDZ2ZFVTFYZlJNNGFoMTVOTXgyYytBdE96SUVmWmpYRQ==" + } + }, function(e, a) { + "200" == e && (wx.showToast({ + title: "上报成功", + icon: "success" + }), setTimeout(function() { + t.setData({ + isLoading: !1 + }), wx.navigateBack({ + delta: 1 + }); + }, 1500)); + }, function(e, a) { + console.log(a), t.setData({ + isLoading: !1 + }); + }); + } + }, + deleteSource: function(e) { + if ("video" == e.currentTarget.dataset.type) this.setData({ + videoId: "" + }); else { + var t = e.currentTarget.dataset.cur; + this.data.imageList.splice(t, 1), this.setData({ + imageList: this.data.imageList + }); + } + }, + onLoad: function(t) { + this.setData({ + token: e.globalData.token + }), this.getCaseType(), this.getArea(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/report/report.json b/pages/report/report.json new file mode 100644 index 0000000..b54f60f --- /dev/null +++ b/pages/report/report.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "事件上报" +} \ No newline at end of file diff --git a/pages/report/report.wxml b/pages/report/report.wxml new file mode 100644 index 0000000..20984dd --- /dev/null +++ b/pages/report/report.wxml @@ -0,0 +1,75 @@ + + 基本信息 + + + * 事件类型 + + + {{typeArray[typeIdx]}} + + + + + + * 事件类型 + + + {{type2Array[type2Idx]}} + + + + + + * 事发位置 + + + + + + + * 事发坐标 + + 点击选择事发位置坐标 + {{longitude}},{{latitude}} + + + + + 详细信息 + + + * 事件说明 + + + + + + 事件图片 + + + + + + + + + + + 视频 + + + + + + + + + + + + 录音 + 长按录音 + 播放录音 + + + + 上报 + diff --git a/pages/report/report.wxss b/pages/report/report.wxss new file mode 100644 index 0000000..11041ae --- /dev/null +++ b/pages/report/report.wxss @@ -0,0 +1,197 @@ +page { + background-color: #fafafa; +} + +.report { + background-color: #fff; + border-radius: 10rpx; + box-shadow: 0 2px 8px 0 rgba(35,24,21,.1); + box-sizing: border-box; + margin: 20rpx auto; + padding: 20rpx 30rpx; + width: 710rpx; +} + +.title { + color: #333; + font-size: 36rpx; + margin-bottom: 20rpx; +} + +.row { + background-color: #f2f1f6; + border-radius: 10rpx; + display: flex; + flex-wrap: wrap; + font-size: 32rpx; + justify-content: space-between; + margin-bottom: 15rpx; + padding: 15rpx; +} + +.row:last-child { + margin-bottom: 0; +} + +.row-name { + border-right: 1px solid #9b9a9f; + flex-shrink: 0; + width: 200rpx; +} + +.row-name text { + color: red; +} + +.row-main { + flex-shrink: 0; + overflow: hidden; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; + width: 410rpx; +} + +.submit { + background: #fff; + bottom: 0; + left: 0; + padding: 20rpx; + position: fixed; + right: 0; +} + +.submit-btn { + background-color: #f55054; + color: #fff; + font-size: 36rpx; + height: 80rpx; + line-height: 80rpx; + text-align: center; +} + +.file,.submit-btn { + border-radius: 10rpx; +} + +.file { + background-color: #fff; + box-shadow: 0 2px 8px 0 rgba(35,24,21,.1); + box-sizing: border-box; + margin: 0 auto 130rpx; + padding: 20rpx 30rpx; + width: 710rpx; +} + +.file-box { + background-color: #f2f1f6; + border-radius: 10rpx; + margin-bottom: 20rpx; + padding: 15rpx; +} + +.file-box:last-child { + margin-bottom: 0; +} + +.file-title { + font-size: 30rpx; +} + +.file-title text { + color: red; +} + +.file-content { + margin-top: 10rpx; +} + +.file-content textarea { + height: 150rpx; + width: 100%; +} + +.upload-btn { + border: 2px solid #333; + border-radius: 10rpx; + box-sizing: border-box; + font-size: 60rpx; + height: 100rpx; + line-height: 100rpx; + vertical-align: top; + width: 100rpx; +} + +.img-box,.upload-btn { + display: inline-block; + text-align: center; +} + +.img-box { + height: 150rpx; + margin-right: 2%; + position: relative; + width: 32%; +} + +.delete { + height: 35rpx!important; + position: absolute; + right: -18rpx; + top: -18rpx; + width: 35rpx!important; +} + +.img-box:nth-child(3n) { + margin-right: 0; +} + +.img-box image { + height: 150rpx; +} + +.video-box { + position: relative; + width: 100%; +} + +.video-box video { + width: 100%; +} + +.voice-box { + display: flex; + justify-content: space-between; + padding: 0; +} + +.voice-box image { + margin-top: -7rpx; + vertical-align: middle; + width: 35rpx; +} + +.voice-title { + font-size: 30rpx; + line-height: 80rpx; + margin-left: 15rpx; +} + +.record-btn { + background-color: #f55054; + border-radius: 10rpx; + color: #fff; + line-height: 80rpx; + padding: 0 15rpx; +} + +.map-box { + height: 300rpx; + margin-top: 10rpx; + width: 100%; +} + +.map { + height: 100%; + width: 100%; +} \ No newline at end of file diff --git a/pages/serve/newsList.js b/pages/serve/newsList.js new file mode 100644 index 0000000..1d49d44 --- /dev/null +++ b/pages/serve/newsList.js @@ -0,0 +1,83 @@ +var e = require("../../@babel/runtime/helpers/defineProperty"), t = getApp(); + +Page({ + data: { + token: t.globalData.token, + newsType: [], + curType: "", + page: { + page: 1, + rows: 10, + newsTypeId: "" + }, + newsList: [], + serviceUrl: t.baseUrls.serviceUrl, + baseImgUrl: t.baseUrls.baseImgUrl + }, + getNewsType: function() { + var a = this; + t.restAjax.get(t.restAjax.path(t.apis.getNewsType, [ t.baseUrls.requestUrl ]), { + showArea: "6dcbb862-4b48-4dca-aee1-d78fd76adc05" + }, { + headers: { + token: a.data.token + } + }, function(t, s) { + var n; + a.setData((e(n = { + newsType: s + }, "page.newsTypeId", s[0].newsTypeId), e(n, "curType", s[0].newsTypeId), n)), a.getNewsList(); + }, function(e, t) { + console.log(t); + }); + }, + changeType: function(t) { + var a, s = t.currentTarget.dataset.id; + this.setData((e(a = { + curType: s + }, "page.newsTypeId", s), e(a, "page.page", 1), a)), this.getNewsList(); + }, + getNewsList: function() { + var a = this; + t.restAjax.get(t.restAjax.path(t.apis.getNewsList, [ t.baseUrls.requestUrl ]), a.data.page, { + headers: { + token: a.data.token + } + }, function(t, s) { + for (var n = 0; n < s.rows.length; n++) s.rows[n].photo && (s.rows[n].photo = s.rows[n].photo.split(",")); + if (1 == a.data.page.page) a.setData({ + newsList: s.rows + }); else if (s.rows.length > 0) { + for (var o = a.data.newsList, r = 0; r < s.rows.length; r++) o.push(s.rows[r]); + a.setData({ + newsList: o + }); + } else wx.showToast({ + title: "暂无更多", + icon: "none" + }), a.setData(e({}, "page.page", a.data.page.page - 1)); + }, function(e, t) { + console.log(t); + }); + }, + checkDetail: function(e) { + var t = e.currentTarget.dataset.id; + wx.navigateTo({ + url: "../news/newsDetail?newsId=" + t + }); + }, + onLoad: function(e) { + this.setData({ + token: t.globalData.token + }), this.getNewsType(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() { + this.setData(e({}, "page.page", this.data.page.page + 1)), this.getNewsList(); + }, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/serve/newsList.json b/pages/serve/newsList.json new file mode 100644 index 0000000..04c0b6f --- /dev/null +++ b/pages/serve/newsList.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "服务公告" +} \ No newline at end of file diff --git a/pages/serve/newsList.wxml b/pages/serve/newsList.wxml new file mode 100644 index 0000000..79881a3 --- /dev/null +++ b/pages/serve/newsList.wxml @@ -0,0 +1,51 @@ + + {{item.typeName}} + + + + + + {{item.title}} + + + + + {{item.sendTime}} + + + + + + + {{item.title}} + {{item.sendTime}} + + + + + {{item.title}} + {{item.sendTime}} + + + + + + + + {{item.title}} + + + + + + + {{item.sendTime}} + + + + {{item.title}} + + {{item.sendTime}} + + + diff --git a/pages/serve/newsList.wxss b/pages/serve/newsList.wxss new file mode 100644 index 0000000..f1f5f01 --- /dev/null +++ b/pages/serve/newsList.wxss @@ -0,0 +1,112 @@ +.news-type,page { + background-color: #fff; +} + +.news-type { + border-bottom: 1px solid #ddd; + display: flex; + flex-wrap: nowrap; + left: 0; + overflow-x: auto; + position: fixed; + right: 0; + top: 0; + z-index: 100; +} + +.type-box { + flex-shrink: 0; + font-size: 32rpx; + line-height: 80rpx; + text-align: center; + width: 25%; +} + +.type-box.active { + color: #f55054; +} + +.news-list { + margin-top: 80rpx; + padding: 20rpx; +} + +.news-box { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; + padding: 20rpx 0; +} + +.news-img { + height: 150rpx; + overflow: hidden; + text-align: center; + width: 30%; +} + +.news-img image { + border-radius: 10rpx; + height: 100%; +} + +.news-info { + width: 68%; +} + +.news-title { + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + display: -webkit-box; + font-size: 32rpx; + font-weight: 700; + overflow: hidden; +} + +.news-date { + color: #bbb; + font-size: 30rpx; + margin-top: 15rpx; +} + +.style3,.style4 { + flex-direction: column; +} + +.style3 .news-img,.style3 .news-info,.style4 .news-info { + width: 100%; +} + +.style3 .news-img { + height: auto; + margin-top: 10rpx; +} + +.style3 .news-img image,.style5 .news-info { + width: 100%; +} + +.style5 { + flex-direction: column; +} + +.news-img-container .img-box { + border-radius: 10rpx; + display: inline-block; + height: 150rpx; + margin-right: 2%; + text-align: center; + width: 32%; +} + +.img-box image { + height: 100%; +} + +.news-img-container .img-box:last-child { + margin-right: 0; +} + +.news-img-container { + margin-top: 10rpx; +} \ No newline at end of file diff --git a/pages/serve/orgDetail.js b/pages/serve/orgDetail.js new file mode 100644 index 0000000..58e26da --- /dev/null +++ b/pages/serve/orgDetail.js @@ -0,0 +1,22 @@ +var n = getApp(); + +Page({ + data: { + sourceUrl: n.baseUrls.sourceUrl + }, + copyText: function(n) { + var o = n.currentTarget.dataset.text; + o && wx.setClipboardData({ + data: o, + success: function() {} + }); + }, + onLoad: function(n) {}, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/serve/orgDetail.json b/pages/serve/orgDetail.json new file mode 100644 index 0000000..91de62c --- /dev/null +++ b/pages/serve/orgDetail.json @@ -0,0 +1,24 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + } +} \ No newline at end of file diff --git a/pages/serve/orgDetail.wxml b/pages/serve/orgDetail.wxml new file mode 100644 index 0000000..5dc2c61 --- /dev/null +++ b/pages/serve/orgDetail.wxml @@ -0,0 +1,225 @@ + + + + + + + 02/ + + + 加入卡包 + + + + 03/ + + + 名片码 + + + + + + + 拨打电话 + + 13355556666 + + + + + 添加微信 + + dongbo + + + + + 邮箱 + + 358256383@qq.com + + + + + 地址 + + 地址 + + + + + + + + + + 999+ + + + + 999+ + + + + + + + + + + + {{item.name}} + + + 更多 + + + + + + + + + + + + {{child.value}} + + + + + + + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{audio.curDurationStr}} + + {{audio.totalDurationStr}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{child.value}} + + + + + + + + + + {{child.comment}}: + {{child.selValue}} + + + + + + + + + {{child.comment}} + + + + {{ss.dataName}} + + + + + + + + + + + 暂无数据 + diff --git a/pages/serve/orgDetail.wxss b/pages/serve/orgDetail.wxss new file mode 100644 index 0000000..b5e6dac --- /dev/null +++ b/pages/serve/orgDetail.wxss @@ -0,0 +1,157 @@ +.community { + display: flex; + justify-content: space-between; +} + +.card { + background-color: #ff0; + height: 0; + margin: 20rpx 0; + padding-bottom: 56%; + width: 100%; +} + +.mid { + position: relative; + width: 100%; +} + +.mid,.mid-box { + display: flex; +} + +.mid-box { + align-items: left; + background-color: #fff; + border: 2rpx solid #eac390; + border-radius: 10rpx; + flex-direction: column; + flex-shrink: 0; + font-weight: 400; + justify-content: left; + margin-right: 2%!important; + padding: 10rpx; + width: 32%!important; +} + +.mid-box:last-child { + margin-right: 0; +} + +.mid-box text { + color: #ccc; + font-size: 15px; + height: 16px; + line-height: 16px; + text-align: center; +} + +.mid-box image { + height: 48rpx; + width: 48rpx; +} + +.mid-box-text { + font-size: 28rpx; + text-align: left; +} + +.good { + justify-content: space-between; + padding-bottom: 20rpx; + padding-left: 20rpx; + padding-top: 20rpx; + width: 100%; +} + +.good,.good-click { + display: flex; +} + +.good-avatar { + font-size: 0; +} + +.good-avatar,.good-click { + color: #333; + line-height: 45rpx; +} + +.view-count { + border-right: 1px solid grey; + margin-right: 30rpx; +} + +.view-count,.view-count-no { + color: grey; + display: flex; + flex-direction: row; + font-size: 36rpx; + padding-right: 30rpx; +} + +.view-count-no { + align-items: center; +} + +.view-count image,.view-count-no image { + height: 32rpx; + width: 32rpx; +} + +.mid-btn { + background: #fff; + border: 1rpx solid #ebebeb; + border-radius: 15rpx; + box-shadow: 10rpx 10rpx 20rpx 20rpx #e4e4e426; + display: flex; + flex-direction: column; + flex-wrap: nowrap; + justify-content: center; + margin-top: 20rpx; + padding: 10rpx; + position: relative; + width: 100%; +} + +.mid-btn-box { + box-sizing: border-box; + flex-shrink: 0; + justify-content: space-between; + padding: 15rpx; +} + +.mid-btn-box,.mid-btn-title { + align-items: center; + display: flex; + flex-direction: row; +} + +.mid-btn-title { + flex: 3; + justify-content: flex-start; +} + +.mid-btn-title .image { + height: 48rpx; + width: 48rpx; +} + +.mid-btn-title text { + color: #333; + font-size: 28rpx; + margin-left: 20rpx; +} + +.mid-btn-box:nth-child(3),.mid-btn-box:nth-child(4) { + margin-bottom: 0; +} + +.mid-btn-box image { + height: 80rpx; + width: 80rpx; +} + +.mid-btn-text { + width: 200rpx; +} \ No newline at end of file diff --git a/pages/serve/orgList.js b/pages/serve/orgList.js new file mode 100644 index 0000000..3ca11f3 --- /dev/null +++ b/pages/serve/orgList.js @@ -0,0 +1,54 @@ +var e = getApp(); + +Page({ + data: { + token: e.globalData.token, + sourceUrl: e.baseUrls.sourceUrl, + orgList: [], + page: { + page: 1, + rows: 500, + areaCode: wx.getStorageSync("areaCode") + } + }, + getServeOrg: function() { + var o = this; + e.restAjax.get(e.restAjax.path(e.apis.getOrgList, [ e.baseUrls.requestUrl ]), { + page: 1, + rows: 500, + areaCode: wx.getStorageSync("areaCode") + }, { + headers: { + token: e.globalData.token + } + }, function(e, t) { + console.log(t), o.setData({ + orgList: t.rows + }); + }, function(e, o) { + console.log(o); + }); + }, + showDetail: function(e) { + console.log(e); + var o = e.currentTarget.dataset.item; + console.log(o), "" == o.cardSysId ? wx.showToast({ + title: "该服务机构未添加展示内容", + icon: "none" + }) : wx.navigateTo({ + url: "/pages/center/contact/contactDetail?gridMiniId=" + o.cardSysId + "&title=" + o.unitName + }); + }, + onLoad: function(o) { + this.setData({ + token: e.globalData.token + }), this.getServeOrg(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/serve/orgList.json b/pages/serve/orgList.json new file mode 100644 index 0000000..1fdde0a --- /dev/null +++ b/pages/serve/orgList.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "社区服务机构" +} \ No newline at end of file diff --git a/pages/serve/orgList.wxml b/pages/serve/orgList.wxml new file mode 100644 index 0000000..6d20912 --- /dev/null +++ b/pages/serve/orgList.wxml @@ -0,0 +1,9 @@ + + + + + {{item.unitName}} + 服务人员:0人 + + + diff --git a/pages/serve/orgList.wxss b/pages/serve/orgList.wxss new file mode 100644 index 0000000..ef321db --- /dev/null +++ b/pages/serve/orgList.wxss @@ -0,0 +1,34 @@ +.container { + background-color: #fff; +} + +.org-box { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; + padding: 20rpx 0; +} + +.org-box:last-child { + border-bottom: none; +} + +.org-box image { + height: 120rpx; + width: 120rpx; +} + +.org-info { + width: 570rpx; +} + +.org-name { + font-size: 34rpx; + font-weight: 700; + line-height: 70rpx; +} + +.org-count { + color: #bbb; + font-size: 28rpx; +} \ No newline at end of file diff --git a/pages/serve/serve.js b/pages/serve/serve.js new file mode 100644 index 0000000..5717ea9 --- /dev/null +++ b/pages/serve/serve.js @@ -0,0 +1,119 @@ +var e = getApp(); + +Page({ + data: { + token: e.globalData.token, + showSettleType: !1, + sourceUrl: e.baseUrls.sourceUrl, + settleType: "", + orgList: [], + page: { + page: 1, + rows: 3, + newsTypeId: "b163953b-ed22-4041-a79f-73d5deedd025" + }, + serveOrgList: [], + indicatorDots: !0, + vertical: !1, + autoplay: !0, + interval: 3e3, + duration: 500, + serviceUrl: e.baseUrls.serviceUrl, + baseImgUrl: e.baseUrls.baseImgUrl + }, + orgSettle: function(e) { + var t = e.currentTarget.dataset.type; + wx.navigateTo({ + url: "./settle?type=" + t + }); + }, + closeSettleType: function() { + this.setData({ + showSettleType: !1 + }); + }, + doSettle: function(e) { + var t = e.currentTarget.dataset.type, a = e.currentTarget.dataset.name; + this.setData({ + showSettleType: !1 + }), wx.navigateTo({ + url: "./settle?id=" + t + "&name=" + a + }); + }, + checkMoreOrg: function() { + wx.navigateTo({ + url: "./orgList" + }); + }, + showDetail: function(e) { + console.log(e); + var t = e.currentTarget.dataset.item; + console.log(t), "" == t.cardSysId ? wx.showToast({ + title: "该服务机构未添加展示内容", + icon: "none" + }) : wx.navigateTo({ + url: "/pages/center/contact/contactDetail?gridMiniId=" + t.cardSysId + "&title=" + t.unitName + }); + }, + getServeOrg: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getOrgList, [ e.baseUrls.requestUrl ]), { + pages: 1, + rows: 3, + areaCode: wx.getStorageSync("areaCode") + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + console.log(a), t.setData({ + serveOrgList: a.rows + }); + }, function(e, t) { + console.log(t); + }); + }, + getNotice: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getNewsList, [ e.baseUrls.requestUrl ]), { + pages: 1, + newsTypeId: "b163953b-ed22-4041-a79f-73d5deedd025", + areaCode: wx.getStorageSync("areaCode") + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + t.setData({ + noticeList: a.rows + }); + }, function(e, t) { + console.log(t); + }); + }, + checkNewsDetail: function(e) { + var t = e.currentTarget.dataset.id; + wx.navigateTo({ + url: "../news/newsDetail?newsId=" + t + }); + }, + checkMoreNews: function() { + wx.navigateTo({ + url: "./newsList" + }); + }, + onLoad: function(t) { + this.setData({ + token: e.globalData.token + }), this.getNotice(); + }, + onReady: function() {}, + onShow: function() { + this.getServeOrg(); + }, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/serve/serve.json b/pages/serve/serve.json new file mode 100644 index 0000000..b5eb133 --- /dev/null +++ b/pages/serve/serve.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "生活服务" +} \ No newline at end of file diff --git a/pages/serve/serve.wxml b/pages/serve/serve.wxml new file mode 100644 index 0000000..d57267b --- /dev/null +++ b/pages/serve/serve.wxml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + 社区服务机构 + 查看更多 + + + + + {{item.unitName}} + + + + + + + + + 服务公告 + 查看更多 + + + + + + + {{item.title}} + {{item.summary}} + {{item.gmtCreate}} + + + diff --git a/pages/serve/serve.wxss b/pages/serve/serve.wxss new file mode 100644 index 0000000..1f00c17 --- /dev/null +++ b/pages/serve/serve.wxss @@ -0,0 +1,255 @@ +.top-count image { + width: 100%; +} + +.settle-btn { + align-items: center; + background: #fff; + border-radius: 10rpx; + color: #f55054; + display: flex; + font-size: 32rpx; + height: 120rpx; + justify-content: center; + width: 48%; +} + +.swiper-box { + height: 345rpx; + margin-top: -325rpx; + padding: 0 20rpx; + position: relative; +} + +.swiper-box swiper { + border-radius: 30rpx; + height: 100%; + overflow: hidden; +} + +.swiper-box image { + width: 100%; +} + +.serve-org { + margin: 20rpx 0; + padding: 0 20rpx; +} + +.serve-title { + display: flex; + font-size: 36rpx; + justify-content: space-between; + margin-bottom: 20rpx; +} + +.title { + border-left: 5px solid #f55054; + font-weight: 700; + padding-left: 20rpx; +} + +.more { + color: #b5b5b5; + font-size: 30rpx; +} + +.org-list { + width: 100%; +} + +.org-box { + background-color: #fff; + border-radius: 10rpx; + box-shadow: 0 0 10rpx #ccc; + box-sizing: border-box; + display: inline-block; + margin-right: 2%; + padding: 20rpx; + text-align: center; + width: 32%; +} + +.org-box:last-child { + margin-right: 0; +} + +.org-box image { + border-radius: 50%; + height: 100rpx; + width: 100rpx; +} + +.org-name { + font-size: 32rpx; + font-weight: 700; + margin: 10rpx 0; +} + +.org-community { + color: #bbb; + font-size: 28rpx; +} + +.serve-join { + padding: 0 20rpx; +} + +.serve-join image { + width: 100%; +} + +.serve-news { + margin: 20rpx 0; + padding: 0 20rpx; +} + +.news-box { + background-color: #fff; + border-radius: 10rpx; + box-shadow: 0 0 10rpx #ccc; + margin-bottom: 20rpx; +} + +.news-top { + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; + padding: 20rpx; +} + +.news-info { + width: 68%; +} + +.news-img { + height: 150rpx; + width: 30%; +} + +.news-img image { + border-radius: 10rpx; + height: 100%; +} + +.news-title { + font-size: 34rpx; + font-weight: 700; +} + +.news-date { + color: #bbb; + font-size: 26rpx; + margin-top: 20rpx; +} + +.news-bottom { + font-size: 30rpx; + line-height: 60rpx; + padding: 0 20rpx; +} + +.settle-type { + background-color: rgba(0,0,0,.6); + bottom: 0; + left: 0; + position: fixed; + right: 0; + top: 0; +} + +.center { + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 710rpx; +} + +.type-container { + border-radius: 10rpx; + overflow: hidden; +} + +.type-box { + background-color: #fff; + border-bottom: 1px solid #ddd; + font-size: 32rpx; + line-height: 80rpx; + text-align: center; +} + +.type-box:last-child { + border-bottom: none; +} + +.close-btn { + border-radius: 40rpx; + font-size: 32rpx; + line-height: 80rpx; + text-align: center; +} + +.close-btn,.notice { + background-color: #fff; + margin-top: 20rpx; +} + +.notice { + padding: 20rpx; +} + +.notice-title { + font-size: 36rpx; + font-weight: 700; + margin-bottom: 20rpx; +} + +.notice-box,.notice-title { + display: flex; + justify-content: space-between; +} + +.notice-box { + border-bottom: 1px solid #ddd; + padding: 20rpx 0; +} + +.notice-box:last-child { + border-bottom: none; +} + +.title-text { + border-left: 5px solid #f55054; + padding-left: 20rpx; +} + +.notice-title-text { + font-size: 34rpx; +} + +.notice-more { + color: #bbb; + font-size: 28rpx; + font-weight: 400; +} + +.notice-time { + color: hsla(0,0%,6%,.7); + font-size: 28rpx; + line-height: 45rpx; +} + +.notice-img { + height: 140rpx; + text-align: center; + width: 200rpx; +} + +.notice-img image { + height: 100%; +} + +.notice-info { + width: 490rpx; +} \ No newline at end of file diff --git a/pages/serve/serviceDetail.js b/pages/serve/serviceDetail.js new file mode 100644 index 0000000..71184a3 --- /dev/null +++ b/pages/serve/serviceDetail.js @@ -0,0 +1,11 @@ +Page({ + data: {}, + onLoad: function(n) {}, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/serve/serviceDetail.json b/pages/serve/serviceDetail.json new file mode 100644 index 0000000..91de62c --- /dev/null +++ b/pages/serve/serviceDetail.json @@ -0,0 +1,24 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + } +} \ No newline at end of file diff --git a/pages/serve/serviceDetail.wxml b/pages/serve/serviceDetail.wxml new file mode 100644 index 0000000..9691810 --- /dev/null +++ b/pages/serve/serviceDetail.wxml @@ -0,0 +1 @@ +pages/serve/serviceDetail.wxml diff --git a/pages/serve/serviceDetail.wxss b/pages/serve/serviceDetail.wxss new file mode 100644 index 0000000..e69de29 diff --git a/pages/serve/settle.js b/pages/serve/settle.js new file mode 100644 index 0000000..3a5ba4d --- /dev/null +++ b/pages/serve/settle.js @@ -0,0 +1,351 @@ +var e = getApp(); + +Page({ + data: { + token: e.globalData.token, + sourceUrl: e.baseUrls.sourceUrl, + pageType: "1", + areaList: [], + areaIndex: 0, + areaAll: [], + areaSelected: "", + streetList: [], + streetIndex: 0, + streetAll: [], + streetSelected: "", + communityList: [], + communityIndex: 0, + communityAll: [], + communitySelected: "", + xqList: [], + xqIndex: 0, + xqAll: [], + xqSelected: "", + officeAddress: "", + orgIntro: "", + imageList: [], + serviceUrl: e.baseUrls.serviceUrl, + baseImgUrl: e.baseUrls.baseImgUrl, + locationCode: "", + unitName: "", + serviceMode: "", + shopType: "", + phone: "", + chargePerson: "", + residential: "", + curType: [], + typeIndex: 0, + typeAll: [], + typeSelected: "", + typeSelectedName: "", + isLoading: !1 + }, + bindTypePickerChange: function(e) { + this.setData({ + typeIndex: e.detail.value, + typeSelected: this.data.typeAll[e.detail.value].dataId, + typeSelectedName: this.data.typeAll[e.detail.value].dataName, + pageType: this.data.typeAll[e.detail.value].dataId + }); + }, + getArea: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getArea, [ e.baseUrls.serviceUrl, "110889" ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + for (var i = [ "请选择区县" ], o = 0; o < a.length; o++) i.push(a[o].areaName); + t.setData({ + areaList: i, + areaAll: a + }); + }, function(e, t) { + console.log(t); + }); + }, + bindAreaPickerChange: function(e) { + this.setData({ + areaIndex: e.detail.value, + areaSelected: this.data.areaAll[e.detail.value - 1].areaId + }), this.getStreet(); + }, + getStreet: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getArea, [ e.baseUrls.serviceUrl, t.data.areaSelected ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + for (var i = [ "请选择街道" ], o = 0; o < a.length; o++) i.push(a[o].areaName); + t.setData({ + streetList: i, + streetAll: a + }); + }, function(e, t) { + console.log(t); + }); + }, + bindStreetPickerChange: function(e) { + this.setData({ + streetIndex: e.detail.value, + streetSelected: this.data.streetAll[e.detail.value - 1].areaId + }), this.getCommunity(); + }, + getCommunity: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getCommunityList, [ e.baseUrls.communityUrl ]), { + parentCode: t.data.streetSelected + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + for (var i = [ "请选择社区" ], o = 0; o < a.length; o++) i.push(a[o].communityName); + t.setData({ + communityList: i, + communityAll: a + }), console.log(a); + }, function(e, t) { + console.log(t); + }); + }, + bindCommunityPickerChange: function(e) { + this.setData({ + communityIndex: e.detail.value, + communitySelected: this.data.communityAll[e.detail.value - 1].communityId, + locationCode: this.data.communityAll[e.detail.value - 1].locationCode + }), this.getHouseList(); + }, + uploadImage: function() { + var t = this; + t.data.isLoading || wx.chooseImage({ + count: 9 - t.data.imageList.length, + sourceType: [ "album", "camera" ], + success: function(a) { + wx.showToast({ + title: "上传中", + icon: "loading" + }), t.setData({ + isLoading: !0 + }); + for (var i = function(i) { + s = a.tempFiles[i].path, e.restAjax.file(e.restAjax.path(e.apis.uploadImg, [ e.baseUrls.serviceUrl ]), s, "image", { + headers: { + token: e.globalData.token + } + }, function(e, o) { + if ("200" == e) { + var s = JSON.parse(o).data, n = t.data.imageList; + n.push(s), t.setData({ + imageList: n + }), i == a.tempFiles.length - 1 && t.setData({ + isLoading: !1 + }), wx.hideToast(); + } + }, function(e, t) { + console.log(t); + }); + }, o = 0; o < a.tempFiles.length; o++) { + var s; + i(o); + } + } + }); + }, + getHouseList: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getHouse, [ e.baseUrls.communityUrl ]), { + areaCode: t.data.locationCode + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + console.log(a); + for (var i = [ "请选择小区" ], o = 0; o < a.length; o++) i.push(a[o].residentialName); + t.setData({ + xqList: i, + xqAll: a + }); + }, function(e, t) { + console.log(t); + }); + }, + bindXqPickerChange: function(e) { + this.setData({ + xqIndex: e.detail.value, + xqSelected: this.data.xqAll[e.detail.value - 1].residentialId + }); + }, + submitSettle: function() { + var t = this; + if (!t.data.isLoading) { + if ("0" == t.data.areaIndex) return void wx.showToast({ + title: "请选择区县", + icon: "error" + }); + if ("0" == t.data.streetIndex && t.data.streetAll.length > 1) return void wx.showToast({ + title: "请选择街道", + icon: "error" + }); + if ("0" == t.data.communityIndex && t.data.communityAll.length > 1) return void wx.showToast({ + title: "请选择社区", + icon: "error" + }); + if (!t.data.unitName) return void wx.showToast({ + title: "请填写单位名称", + icon: "error" + }); + if (!t.data.officeAddress && "612be328-bb06-48b7-877c-7d816012f273" == t.data.pageType) return void wx.showToast({ + title: "请填写办公地址", + icon: "error" + }); + if (!t.data.officeAddress && "3c97be91-b7e5-498f-b0dd-cd097521549f" == t.data.pageType) return void wx.showToast({ + title: "请填写营业地址", + icon: "error" + }); + if (!t.data.unitName && "612be328-bb06-48b7-877c-7d816012f273" == t.data.pageType) return void wx.showToast({ + title: "请填写单位名称", + icon: "error" + }); + if (!t.data.unitName && "3c97be91-b7e5-498f-b0dd-cd097521549f" == t.data.pageType) return void wx.showToast({ + title: "请填写店铺名称", + icon: "error" + }); + if (!t.data.shopType && "3c97be91-b7e5-498f-b0dd-cd097521549f" == t.data.pageType) return void wx.showToast({ + title: "请填写店铺品类", + icon: "error" + }); + if (!t.data.orgIntro) return void wx.showToast({ + title: "请填写机构简介", + icon: "error" + }); + if (!t.data.phone) return void wx.showToast({ + title: "请填写联系电话", + icon: "error" + }); + if (!t.data.chargePerson) return void wx.showToast({ + title: "请填写负责人姓名", + icon: "error" + }); + for (var a = "", i = 0; i < t.data.imageList.length; i++) a += t.data.imageList[i], + i != t.data.imageList.length - 1 && (a += ","); + "3c97be91-b7e5-498f-b0dd-cd097521549f" != t.data.pageType || t.data.shopType || wx.showToast({ + title: "请填写品类" + }); + var o = "", s = "非ID"; + if ("6c290901-39dd-4b69-a7aa-c27d253ab152" == t.data.pageType || "45ad4873-af80-4d03-973d-3b746a889948" == t.data.pageType) if ("0" == t.data.xqIndex) { + if (!t.data.residential) return void wx.showToast({ + title: "请选择或填写您的小区名称", + icon: "error" + }); + s = t.data.residential; + } else o = t.data.xqSelected, s = "ID"; + var n = { + organizationTypeId: t.data.pageType, + organizationTypeName: t.data.pageName, + cityId: t.data.areaSelected, + cityCode: t.data.areaAll[t.data.areaIndex - 1].areaCode, + cityName: t.data.areaAll[t.data.areaIndex - 1].areaName, + streetId: t.data.streetSelected, + streetCode: t.data.streetAll[t.data.streetIndex - 1].areaCode, + streetName: t.data.streetAll[t.data.streetIndex - 1].areaName, + communityId: t.data.communitySelected, + communityCode: t.data.communityAll[t.data.communityIndex - 1].locationCode, + communityName: t.data.communityAll[t.data.communityIndex - 1].communityName, + address: t.data.officeAddress, + introduction: t.data.orgIntro, + fileIds: a, + residential: o, + serviceMode: t.data.serviceMode, + unitName: t.data.unitName, + shopType: t.data.shopType, + shopTypeName: t.data.shopType, + phone: t.data.phone, + chargePerson: t.data.chargePerson, + residentialValue: s + }; + t.setData({ + isLoading: !0 + }), e.restAjax.post(e.restAjax.path(e.apis.submitSettle, [ e.baseUrls.requestUrl ]), n, { + headers: { + token: t.data.token + } + }, function(e, a) { + wx.showToast({ + title: "入驻成功", + icon: "success" + }), setTimeout(function() { + t.setData({ + isLoading: !1 + }), wx.redirectTo({ + url: "/packagecard/cardList/cardList?type=org&id=" + a.data + }); + }, 300); + }, function(e, a) { + console.log(a), t.setData({ + isLoading: !1 + }); + }); + } + }, + deleteImg: function(e) { + var t = e.currentTarget.dataset.cur, a = this.data.imageList; + a.splice(t, 1), this.setData({ + imageList: a + }); + }, + getOrgList: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getDictionary, [ e.baseUrls.serviceUrl, "8e981a56-afa1-4934-9d90-16aa1b8113ca" ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + for (var i = [], o = 0; o < a.length; o++) i.push(a[o].dataName); + t.setData({ + curType: i, + typeAll: a, + typeSelected: a[0].dataId, + typeSelectedName: a[0].dataName, + pageType: a[0].dataId + }); + }, function(e, t) { + console.log(t); + }); + }, + getStoreList: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getDictionary, [ e.baseUrls.serviceUrl, "4a44a891-8a0c-4cad-ada6-09ce99118e27" ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + for (var i = [], o = 0; o < a.length; o++) i.push(a[o].dataName); + t.setData({ + curType: i, + typeAll: a, + typeSelected: a[0].dataId, + typeSelectedName: a[0].dataName, + pageType: a[0].dataId + }); + }, function(e, t) { + console.log(t); + }); + }, + onLoad: function(t) { + this.setData({ + token: e.globalData.token + }), "1" == t.type ? this.getOrgList() : this.getStoreList(); + }, + onReady: function() { + this.getArea(); + }, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/serve/settle.json b/pages/serve/settle.json new file mode 100644 index 0000000..adf581d --- /dev/null +++ b/pages/serve/settle.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "服务机构入驻" +} \ No newline at end of file diff --git a/pages/serve/settle.wxml b/pages/serve/settle.wxml new file mode 100644 index 0000000..ad44790 --- /dev/null +++ b/pages/serve/settle.wxml @@ -0,0 +1,120 @@ + + + 入驻类型 + + + {{curType[typeIndex]}} + + + + + 请选择区县 + + + {{areaList[areaIndex]}} + + + + + 选择街道 + + + {{streetList[streetIndex]}} + + + + + 选择社区 + + + {{communityList[communityIndex]}} + + + + + 选择行政村 + + + {{communityList[communityIndex]}} + + + + + 选择小区 + + + {{xqList[xqIndex]}} + + + + + + + + 单位名称 + + + + + + 店铺名称 + + + + + + 品类 + + + + + + 物业服务方式 + + + + + + 营业地址 + + + + + + 办公地址 + + + + + + 机构简介 + + + + + + 联系电话 + + + + + + 负责人 + + + + + + + 上传资料 + + + + + + + + + + + 入驻 + diff --git a/pages/serve/settle.wxss b/pages/serve/settle.wxss new file mode 100644 index 0000000..f308a5c --- /dev/null +++ b/pages/serve/settle.wxss @@ -0,0 +1,132 @@ +.base-info { + background-color: #fff; + padding: 0 20rpx; +} + +.row { + border-bottom: 1px solid #ddd; + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} + +.row:last-child { + border-bottom: none; +} + +.row-name { + font-size: 32rpx; + line-height: 80rpx; + width: 30%; +} + +.row-content,.row-name { + flex-shrink: 0; +} + +.row-content { + text-align: right; + width: 70%; +} + +.residential { + width: 100%; +} + +.residential input { + height: 80rpx!important; +} + +.intro { + flex-direction: column; +} + +.intro .row-content { + text-align: left; + width: 100%; +} + +picker { + font-size: 32rpx; + line-height: 80rpx; +} + +.row-content input { + box-sizing: border-box; + font-size: 32rpx; + height: 100%; + padding: 0 10rpx; + width: 100%; +} + +.row-content textarea { + font-size: 32rpx; + height: 200rpx; + width: 100%; +} + +.upload-file { + background-color: #fff; + margin-bottom: 100rpx; + margin-top: 20rpx; + padding: 0 20rpx 20rpx; +} + +.upload-title { + font-size: 32rpx; + font-weight: 700; + line-height: 80rpx; +} + +.add { + background-color: #ccc; + color: #eee; + display: inline-block; + font-size: 60rpx; + height: 150rpx; + line-height: 150rpx; + margin-bottom: 20rpx; + margin-right: 2%; + text-align: center; + vertical-align: top; + width: 32%; +} + +.add.image { + background-color: #fff; + position: relative; +} + +.add:nth-child(3n) { + margin-right: 0; +} + +.add image { + height: 100%; +} + +.submit { + background-color: #fff; + bottom: 0; + left: 0; + padding: 20rpx; + position: fixed; + right: 0; +} + +.submit-btn { + background-color: #ff4949; + border-radius: 40rpx; + height: 60rpx; + line-height: 60rpx; + margin-top: 0; + text-align: center; +} + +.delete { + height: 30rpx!important; + position: absolute; + right: -15rpx; + top: -15rpx; + width: 30rpx; +} \ No newline at end of file diff --git a/pages/talk/myTalk.js b/pages/talk/myTalk.js new file mode 100644 index 0000000..0f021ff --- /dev/null +++ b/pages/talk/myTalk.js @@ -0,0 +1,20 @@ +var n = getApp(); + +Page({ + data: { + sourceUrl: n.baseUrls.sourceUrl + }, + checkDetail: function() { + wx.navigateTo({ + url: "./talkDetail" + }); + }, + onLoad: function(n) {}, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/talk/myTalk.json b/pages/talk/myTalk.json new file mode 100644 index 0000000..4acf8ae --- /dev/null +++ b/pages/talk/myTalk.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "我的微事我言" +} \ No newline at end of file diff --git a/pages/talk/myTalk.wxml b/pages/talk/myTalk.wxml new file mode 100644 index 0000000..a5996dd --- /dev/null +++ b/pages/talk/myTalk.wxml @@ -0,0 +1,87 @@ + + 我的发布 + 我的回复 + 我的赞 + + + + + + + + 100 + + + 请问阿斯顿发射点饭卡手动阀垃圾筐第三方接口问阿斯顿发射点饭卡手动阀垃圾筐第三 + + + + + + + + + + + + + + 100 + + + 请问阿斯顿发射点饭卡手动阀垃圾筐第三方接口问阿斯顿发射点饭卡手动阀垃圾筐第三 + + + + + + + + 100 + + + 请问阿斯顿发射点饭卡手动阀垃圾筐第三方接口问阿斯顿发射点饭卡手动阀垃圾筐第三 + + + + + + + + + + + + + + 100 + + + 请问阿斯顿发射点饭卡手动阀垃圾筐第三方接口问阿斯顿发射点饭卡手动阀垃圾筐第三 + + + diff --git a/pages/talk/myTalk.wxss b/pages/talk/myTalk.wxss new file mode 100644 index 0000000..af4ec27 --- /dev/null +++ b/pages/talk/myTalk.wxss @@ -0,0 +1,105 @@ +.tab { + background-color: #fff; + border-bottom: 1px solid #ddd; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 100; +} + +.tab,.tab-box { + display: flex; +} + +.tab-box { + align-items: center; + flex: 1; + font-size: 32rpx; + height: 100rpx; + justify-content: center; +} + +.tab-box.active { + border-bottom: 1px solid #f55054; + color: #f55054; +} + +.talk-container { + margin-top: 100rpx; +} + +.talk { + background-color: #fff; + border-bottom: 1px solid #ddd; + padding: 20rpx; +} + +.talk:last-child { + border-bottom: none; +} + +.talk-user,.user-info { + display: flex; + justify-content: space-between; + margin-bottom: 10rpx; +} + +.user-info image { + height: 80rpx; + margin-right: 20rpx; + width: 80rpx; +} + +.good image { + height: 40rpx; + margin-top: -8rpx; + vertical-align: middle; + width: 40rpx; +} + +.name { + font-size: 32rpx; + line-height: 50rpx; +} + +.time { + color: #888; + font-size: 24rpx; +} + +.good text { + line-height: 80rpx; +} + +.talk-content { + font-size: 30rpx; + line-height: 40rpx; +} + +.reply { + background-color: #eee; + margin-top: 10rpx; + padding: 20rpx; +} + +.reply-content { + padding-left: 100rpx; +} + +.photo-box { + display: inline-block; + height: 150rpx; + margin-right: 2%; + overflow: hidden; + text-align: center; + width: 32%; +} + +.photo-box:nth-child(3n) { + margin-right: 0; +} + +.photo-box image { + height: 100%; +} \ No newline at end of file diff --git a/pages/talk/newTalk.js b/pages/talk/newTalk.js new file mode 100644 index 0000000..feec01d --- /dev/null +++ b/pages/talk/newTalk.js @@ -0,0 +1,148 @@ +var a = getApp(); + +Page({ + data: { + token: a.globalData.token, + sourceUrl: a.baseUrls.sourceUrl, + content: "", + imageList: [], + videoId: "", + serviceUrl: a.baseUrls.serviceUrl, + baseImgUrl: a.baseUrls.baseImgUrl, + userIcon: "", + userName: "", + isLoading: !1 + }, + submitNewTalk: function() { + var e = this; + if (!e.data.isLoading) { + var t = ""; + if (e.data.imageList.length > 0) for (var o = 0; o < e.data.imageList.length; o++) o != e.data.imageList.length - 1 ? t += e.data.imageList[o] + "," : t += e.data.imageList[o]; + var s = { + content: e.data.content, + video: e.data.videoId, + videoCover: "", + photo: t, + headPortrait: e.data.userIcon, + nickName: e.data.userName, + areaCode: wx.getStorageSync("areaCode") + }; + e.setData({ + isLoading: !0 + }), a.restAjax.post(a.restAjax.path(a.apis.submitTalk, [ a.baseUrls.requestUrl ]), s, { + headers: { + token: a.globalData.token + } + }, function(a, t) { + "200" == a && (wx.showToast({ + title: "发布成功!", + icon: "success" + }), setTimeout(function() { + e.setData({ + isLoading: !1 + }), wx.navigateBack({ + delta: 1 + }); + }, 1500)); + }, function(a, t) { + console.log(t), e.setData({ + isLoading: !1 + }); + }); + } + }, + uploadImage: function() { + var e = this; + e.data.isLoading || (e.setData({ + isLoading: !0 + }), wx.chooseImage({ + count: 9 - e.data.imageList.length, + sourceType: [ "album", "camera" ], + success: function(t) { + wx.showToast({ + title: "上传中", + icon: "loading" + }); + for (var o = 0; o < t.tempFiles.length; o++) { + var s = t.tempFiles[o].path; + a.restAjax.file(a.restAjax.path(a.apis.uploadImg, [ a.baseUrls.serviceUrl ]), s, "image", { + headers: { + token: a.globalData.token + } + }, function(a, t) { + if ("200" == a) { + e.setData({ + isLoading: !1 + }); + var o = JSON.parse(t).data, s = e.data.imageList; + s.push(o), e.setData({ + imageList: s + }), wx.hideToast(); + } + }, function(a, t) { + console.log(t), e.setData({ + isLoading: !1 + }); + }); + } + } + })); + }, + uploadVideo: function() { + var e = this; + e.data.isLoading || (e.setData({ + isLoading: !0 + }), wx.chooseVideo({ + sourceType: [ "album", "camera" ], + success: function(t) { + a.restAjax.file(a.restAjax.path(a.apis.uploadVideo, [ a.baseUrls.serviceUrl ]), t.tempFilePath, "video", { + headers: { + token: a.globalData.token + } + }, function(a, t) { + if ("200" == a) { + e.setData({ + isLoading: !1 + }); + var o = JSON.parse(t).data; + e.setData({ + videoId: o + }); + } + }, function(a, t) { + console.log(t), e.setData({ + isLoading: !1 + }); + }); + } + })); + }, + deleteImg: function(a) { + var e = a.currentTarget.dataset.cur, t = this.data.imageList; + t.splice(e, 1), this.setData({ + imageList: t + }); + }, + deleteVideo: function() { + this.setData({ + videoId: "" + }); + }, + onLoad: function(e) { + this.setData({ + token: a.globalData.token + }); + }, + onReady: function() {}, + onShow: function() { + this.setData({ + userIcon: wx.getStorageSync("userIcon"), + userName: wx.getStorageSync("name") + }); + }, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/talk/newTalk.json b/pages/talk/newTalk.json new file mode 100644 index 0000000..eafc1f1 --- /dev/null +++ b/pages/talk/newTalk.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "发表微事" +} \ No newline at end of file diff --git a/pages/talk/newTalk.wxml b/pages/talk/newTalk.wxml new file mode 100644 index 0000000..d1160c7 --- /dev/null +++ b/pages/talk/newTalk.wxml @@ -0,0 +1,28 @@ + + + + + + 上传图片({{imageList.length}}/9) + + + + + + + + + + + + + 上传视频 + + + + + + + + + + +发表 diff --git a/pages/talk/newTalk.wxss b/pages/talk/newTalk.wxss new file mode 100644 index 0000000..d2bc82b --- /dev/null +++ b/pages/talk/newTalk.wxss @@ -0,0 +1,93 @@ +.content { + border-bottom: 1px solid #ddd; + height: 400rpx; +} + +.content textarea { + background-color: #fff; + box-sizing: border-box; + font-size: 32rpx; + height: 100%; + padding: 20rpx; + width: 100%; +} + +.upload { + padding: 20rpx; +} + +.upload-box { + margin-bottom: 20rpx; +} + +.upload-title { + font-size: 30rpx; + margin-bottom: 10rpx; +} + +.add,.upload-img { + display: inline-block; + height: 150rpx; + margin-bottom: 20rpx; + margin-right: 2%; + position: relative; + text-align: center; + vertical-align: top; + width: 32%; +} + +.upload-video { + height: auto; + width: 100%; +} + +.upload-video video { + width: 100%; +} + +.add,.upload-img:nth-child(3n) { + margin-right: 0; +} + +.upload-img .upload-photo { + height: auto; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 100%; +} + +.upload-img-box { + height: 150rpx; + overflow: hidden; + position: relative; + width: 100%; +} + +.add { + background-color: #ccc; + color: #eee; + font-size: 60rpx; + line-height: 150rpx; +} + +.delete { + height: 30rpx!important; + position: absolute; + right: -15rpx; + top: -15rpx; + width: 30rpx; +} + +.submit-new { + background-color: #f55054; + bottom: 0; + color: #fff; + font-size: 32rpx; + left: 0; + line-height: 100rpx; + position: fixed; + right: 0; + text-align: center; +} \ No newline at end of file diff --git a/pages/talk/talk.js b/pages/talk/talk.js new file mode 100644 index 0000000..db470db --- /dev/null +++ b/pages/talk/talk.js @@ -0,0 +1,94 @@ +var e = require("../../@babel/runtime/helpers/defineProperty"), t = getApp(); + +Page({ + data: { + token: t.globalData.token, + sourceUrl: t.baseUrls.sourceUrl, + page: { + page: 1, + rows: 5 + }, + talkList: [], + serviceUrl: t.baseUrls.serviceUrl, + baseImgUrl: t.baseUrls.baseImgUrl, + isShowMenu: !1 + }, + getTalkList: function() { + var a = this; + t.restAjax.get(t.restAjax.path(t.apis.getTalkList, [ t.baseUrls.requestUrl ]), { + pages: a.data.page, + areaCode: wx.getStorageSync("areaCode") + }, { + headers: { + token: t.globalData.token + } + }, function(t, o) { + if (o.rows.length > 0) { + for (var s = 0; s < o.rows.length; s++) o.rows[s].photo && (o.rows[s].photo = o.rows[s].photo.split(",")); + if (1 == a.data.page.page) a.setData({ + talkList: o.rows + }); else { + for (var n = a.data.talkList, l = 0; l < o.rows.length; l++) n.push(o.rows[l]); + a.setData({ + talkList: n + }); + } + } else wx.showToast({ + title: "暂无更多", + icon: "none" + }), a.data.page.page > 1 && a.setData(e({}, "page.page", a.data.page.page - 1)); + }, function(e, t) { + console.log(t); + }); + }, + newTalk: function() { + wx.navigateTo({ + url: "./newTalk" + }); + }, + checkMyTalk: function() { + wx.navigateTo({ + url: "./myTalk" + }); + }, + checkDetail: function(e) { + var t = e.currentTarget.dataset.id; + wx.navigateTo({ + url: "./talkDetail?trifleMyselfId=" + t + }); + }, + clickVideo: function() {}, + onLoad: function(e) {}, + getMenuIsShow: function() { + var e = this; + t.restAjax.get(t.restAjax.path(t.apis.getBtnIsShow, [ t.baseUrls.requestUrl, "talk" ]), null, { + headers: { + token: t.globalData.token + } + }, function(t, a) { + null != a && null != a ? e.setData({ + isShowMenu: 1 == a.isShow + }) : e.setData({ + isShowMenu: !1 + }); + }, function(t, a) { + e.setData({ + isShowMenu: !1 + }); + }); + }, + onReady: function() {}, + onShow: function() { + this.setData({ + token: t.globalData.token + }), this.getTalkList(), this.getMenuIsShow(); + }, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() { + var t = this.data.page.page + 1; + this.setData(e({}, "page.page", t)), this.getTalkList(); + }, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/talk/talk.json b/pages/talk/talk.json new file mode 100644 index 0000000..c62683f --- /dev/null +++ b/pages/talk/talk.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "公众咨询" +} \ No newline at end of file diff --git a/pages/talk/talk.wxml b/pages/talk/talk.wxml new file mode 100644 index 0000000..ee72ff1 --- /dev/null +++ b/pages/talk/talk.wxml @@ -0,0 +1,34 @@ + + + + + + {{item.content}} + + + + + + + + + + + + + + + + + + + + + ++ diff --git a/pages/talk/talk.wxss b/pages/talk/talk.wxss new file mode 100644 index 0000000..ad9f595 --- /dev/null +++ b/pages/talk/talk.wxss @@ -0,0 +1,144 @@ +.talk-container { + margin-bottom: 100rpx; +} + +.talk { + background-color: #fff; + margin-bottom: 10rpx; + padding: 20rpx; +} + +.talk-user,.user-info { + display: flex; + justify-content: space-between; + margin-bottom: 10rpx; +} + +.user-info image { + border-radius: 50%; + height: 80rpx; + margin-right: 20rpx; + width: 80rpx; +} + +.good image { + height: 40rpx; + margin-top: -8rpx; + vertical-align: middle; + width: 40rpx; +} + +.name { + font-size: 32rpx; + line-height: 50rpx; +} + +.time { + color: #888; + font-size: 24rpx; +} + +.good text { + line-height: 80rpx; +} + +.talk-content { + font-size: 30rpx; + line-height: 40rpx; + margin-bottom: 20rpx; +} + +.reply { + background-color: #eee; + margin-top: 10rpx; + padding: 20rpx; +} + +.reply-content { + padding-left: 100rpx; +} + +.photo-box { + display: inline-block; + height: 180rpx; + margin-right: 2%; + overflow: hidden; + position: relative; + text-align: center; + width: 32%; +} + +.photo-box:nth-child(3n) { + margin-right: 0; +} + +.photo-box image { + height: 100%; +} + +.my-talk { + background-color: #fff; + bottom: 0; + color: #f55054; + font-size: 32rpx; + left: 0; + line-height: 100rpx; + right: 0; +} + +.my-talk,.new-talk { + position: fixed; + text-align: center; +} + +.new-talk { + background-color: #f55054; + border-radius: 50%; + bottom: 120rpx; + color: #fff; + font-size: 60rpx; + height: 120rpx; + line-height: 120rpx; + right: 20rpx; + width: 120rpx; +} + +.video-box { + height: auto!important; + width: 65%; +} + +.video-box video { + width: 100%; +} + +.no-data { + margin-top: 150rpx; + text-align: center; +} + +.no-data image { + width: 300rpx; +} + +.photo-one { + height: auto; + width: 50%; +} + +.photo-one image { + max-width: 100%; +} + +.photo-four image,.photo-more image { + height: auto; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 100%; +} + +.photo-four:nth-child(3) { + margin-right: 2%; +} \ No newline at end of file diff --git a/pages/talk/talkDetail.js b/pages/talk/talkDetail.js new file mode 100644 index 0000000..9fce25a --- /dev/null +++ b/pages/talk/talkDetail.js @@ -0,0 +1,226 @@ +var e = getApp(); + +Page({ + data: { + sourceUrl: e.baseUrls.sourceUrl, + trifleMyselfId: "", + token: e.globalData.token, + talkDetail: {}, + serviceUrl: e.baseUrls.serviceUrl, + baseImgUrl: e.baseUrls.baseImgUrl, + reply: "", + userIcon: "", + userName: "", + replyList: [], + goodCount: 0, + isClickGood: "no", + clickGoodPeople: [], + isGetFocus: !1, + placeholder: "讨论一下", + replyTo: "", + replyUserName: "" + }, + getTalkDetail: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getTalkDetail, [ e.baseUrls.requestUrl, t.data.trifleMyselfId ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + a.photo && (a.photo = a.photo.split(",")), t.setData({ + talkDetail: a + }); + }, function(e, t) { + console.log(t); + }); + }, + doReplyTalk: function() { + var t = this, a = { + content: t.data.reply, + headPortrait: t.data.userIcon, + userName: t.data.userName, + trifleMyselfId: t.data.trifleMyselfId + }; + e.restAjax.post(e.restAjax.path(e.apis.replyTalk, [ e.baseUrls.requestUrl ]), a, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (wx.showToast({ + title: "评论成功!", + icon: "success" + }), t.setData({ + reply: "" + }), t.getReplyList()); + }, function(e, t) { + console.log(t); + }); + }, + getReplyList: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getTalkReplyList, [ e.baseUrls.requestUrl ]), { + trifleMyselfId: t.data.trifleMyselfId + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + t.setData({ + replyList: a + }); + }, function(e, t) { + console.log(t); + }); + }, + getGoodCount: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.getTalkGoodCount, [ e.baseUrls.requestUrl ]), { + trifleMyselfId: t.data.trifleMyselfId + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + t.setData({ + goodCount: a.data + }); + }, function(e, t) { + console.log(t); + }); + }, + getIsClickGood: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.talkIsClicked, [ e.baseUrls.requestUrl, t.data.trifleMyselfId ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + t.setData({ + isClickGood: a + }); + }, function(e, t) { + console.log(t); + }); + }, + toggleGood: function() { + "no" == this.data.isClickGood ? this.clickGood() : this.cancelGood(); + }, + getClickedPeople: function() { + var t = this; + e.restAjax.get(e.restAjax.path(e.apis.talkClickPeople, [ e.baseUrls.requestUrl ]), { + page: 1, + rows: 10, + trifleMyselfId: t.data.trifleMyselfId + }, { + headers: { + token: t.data.token + } + }, function(e, a) { + console.log(a), t.setData({ + clickGoodPeople: a.rows + }); + }, function(e, t) { + console.log(t); + }); + }, + clickGood: function() { + var t = this, a = { + trifleMyselfId: t.data.trifleMyselfId, + userName: t.data.userName, + headPortrait: t.data.userIcon + }; + e.restAjax.post(e.restAjax.path(e.apis.talkClickGood, [ e.baseUrls.requestUrl ]), a, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (t.getGoodCount(), t.getClickedPeople(), t.getIsClickGood()); + }, function(e, t) { + console.log(t); + }); + }, + cancelGood: function() { + var t = this; + e.restAjax.delete(e.restAjax.path(e.apis.talkCancelGood, [ e.baseUrls.requestUrl, t.data.trifleMyselfId ]), {}, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (t.getGoodCount(), t.getClickedPeople(), t.getIsClickGood()); + }, function(e, t) { + console.log(t); + }); + }, + getFocus: function(e) { + var t = e.currentTarget.dataset.user, a = e.currentTarget.dataset.id, o = e.currentTarget.dataset.name; + this.setData({ + isGetFocus: !0, + placeholder: "回复" + t + ":", + replyTo: a, + replyUserName: o + }); + }, + inputBlur: function() { + this.data.reply || this.setData({ + placeholder: "讨论一下", + isGetFocus: !1 + }); + }, + doReply: function() { + this.data.replyTo ? this.doReplyReply() : this.doReplyTalk(); + }, + doReplyReply: function() { + var t = this, a = { + content: t.data.reply, + headPortrait: t.data.userIcon, + userName: t.data.userName, + trifleMyselfId: t.data.trifleMyselfId, + commentId: t.data.replyTo, + replyCommentId: t.data.replyTo, + replyUserName: t.data.replyUserName + }; + e.restAjax.post(e.restAjax.path(e.apis.replyTalk, [ e.baseUrls.requestUrl ]), a, { + headers: { + token: t.data.token + } + }, function(e, a) { + "200" == e && (wx.showToast({ + title: "评论成功!", + icon: "success" + }), t.getReplyList(), t.setData({ + reply: "", + replyTo: "", + replyUserName: "", + placeholder: "讨论一下" + })); + }, function(e, t) { + console.log(t); + }); + }, + viewImg: function(e) { + for (var t = this.data.serviceUrl + this.data.baseImgUrl + e.currentTarget.dataset.id, a = [], o = 0; o < this.data.talkDetail.photo.length; o++) { + var s = this.data.serviceUrl + this.data.baseImgUrl + this.data.talkDetail.photo[o]; + a.push(s); + } + wx.previewImage({ + current: t, + urls: a + }); + }, + onLoad: function(t) { + this.setData({ + trifleMyselfId: t.trifleMyselfId, + userIcon: wx.getStorageSync("userIcon"), + userName: wx.getStorageSync("name"), + token: e.globalData.token + }), this.getTalkDetail(), this.getReplyList(), this.getGoodCount(), this.getIsClickGood(), + this.getClickedPeople(); + }, + onReady: function() {}, + onShow: function() {}, + onHide: function() {}, + onUnload: function() {}, + onPullDownRefresh: function() {}, + onReachBottom: function() {}, + onShareAppMessage: function() {} +}); \ No newline at end of file diff --git a/pages/talk/talkDetail.json b/pages/talk/talkDetail.json new file mode 100644 index 0000000..b25ed75 --- /dev/null +++ b/pages/talk/talkDetail.json @@ -0,0 +1,25 @@ +{ + "usingComponents": { + "van-tabbar": "/vant/dist/tabbar/index", + "van-tabbar-item": "/vant/dist/tabbar-item/index", + "van-swipe-cell": "/vant/dist/swipe-cell/index", + "van-cell-group": "/vant/dist/cell-group/index", + "van-cell": "/vant/dist/cell/index", + "van-empty": "/vant/dist/empty/index", + "van-action-sheet": "/vant/dist/action-sheet/index", + "van-submit-bar": "/vant/dist/submit-bar/index", + "van-stepper": "/vant/dist/stepper/index", + "van-image": "/vant/dist/image/index", + "van-loading": "/vant/dist/loading/index", + "van-switch": "/vant/dist/switch/index", + "van-tab": "/vant/dist/tab/index", + "van-tabs": "/vant/dist/tabs/index", + "van-picker": "/vant/dist/picker/index", + "van-popup": "/vant/dist/popup/index", + "van-dropdown-menu": "/vant/dist/dropdown-menu/index", + "van-dropdown-item": "/vant/dist/dropdown-item/index", + "van-collapse": "/vant/dist/collapse/index", + "van-collapse-item": "/vant/dist/collapse-item/index" + }, + "navigationBarTitleText": "微事我言" +} \ No newline at end of file diff --git a/pages/talk/talkDetail.wxml b/pages/talk/talkDetail.wxml new file mode 100644 index 0000000..45eac26 --- /dev/null +++ b/pages/talk/talkDetail.wxml @@ -0,0 +1,56 @@ + + + + + {{talkDetail.content}} + + + + + + + + + + + + + + + + + + + {{goodCount}}人点赞 + + + + + + + + + + + {{item.content}} + + + {{child.userName}} 回复 {{child.replyUserName}} : {{child.content}} + + + + + + diff --git a/pages/talk/talkDetail.wxss b/pages/talk/talkDetail.wxss new file mode 100644 index 0000000..7ee9c21 --- /dev/null +++ b/pages/talk/talkDetail.wxss @@ -0,0 +1,181 @@ +.talk { + background-color: #fff; + border-bottom: 1px solid #ddd; + padding: 20rpx; +} + +.talk:last-child { + border-bottom: none; +} + +.talk-user,.user-info { + display: flex; + justify-content: space-between; + margin-bottom: 10rpx; +} + +.user-info image { + border-radius: 50%; + height: 80rpx; + margin-right: 20rpx; + width: 80rpx; +} + +.good image { + height: 40rpx; + margin-top: -8rpx; + vertical-align: middle; + width: 40rpx; +} + +.name { + font-size: 32rpx; + line-height: 50rpx; +} + +.time { + color: #888; + font-size: 24rpx; +} + +.good text { + line-height: 80rpx; +} + +.talk-content { + font-size: 30rpx; + line-height: 40rpx; +} + +.reply-container { + margin-bottom: 100rpx; +} + +.reply { + background-color: #fff; + border-bottom: 1px solid #ddd; + padding: 20rpx; +} + +.reply:last-child { + border-bottom: none; +} + +.reply-content,.reply-reply { + padding-left: 100rpx; +} + +.reply-content { + margin-bottom: 20rpx; +} + +.photo-box { + display: inline-block; + height: 150rpx; + margin-right: 2%; + overflow: hidden; + position: relative; + text-align: center; + width: 32%; +} + +.photo-box:nth-child(3n) { + margin-right: 0; +} + +.click-good { + background-color: #fff; + display: flex; + justify-content: space-between; + margin: 20rpx 0; + padding: 20rpx; +} + +.good-text { + text-align: center; + width: 20%; +} + +.good-text image { + height: 40rpx; + width: 40rpx; +} + +.good-count { + font-size: 24rpx; +} + +.good-avatar { + width: 80%; +} + +.good-avatar image { + border: 1px solid #fff; + border-radius: 50%; + height: 50rpx; + margin: 12rpx 0 0 -15rpx; + width: 50rpx; +} + +.good-avatar image:first-child { + margin-left: 0; +} + +.reply .click-good { + background: none; +} + +.edit-reply { + background-color: #fff; + border-top: 1px solid #ddd; + bottom: 0; + left: 0; + padding: 20rpx; + position: fixed; + right: 0; +} + +.edit-reply input { + background-color: #eee; + border-radius: 40rpx; + height: 60rpx; + padding: 0 20rpx; +} + +.video-box { + height: auto!important; + width: 65%; +} + +.video-box video { + width: 100%; +} + +.reply-row { + background-color: #f7f7f7; + line-height: 60rpx; + padding: 0 10rpx; + word-break: break-all; +} + +.reply-row text { + font-weight: 700; +} + +.photo-one { + height: auto; + width: 50%; +} + +.photo-one image { + max-width: 100%; +} + +.photo-more image { + height: auto; + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%,-50%); + width: 100%; +} \ No newline at end of file diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..9235c0a --- /dev/null +++ b/project.config.json @@ -0,0 +1,29 @@ +{ + "appid": "wxa5e5552f8a3b1616", + "compileType": "miniprogram", + "libVersion": "2.31.1", + "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..200ac2c --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,8 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "city_card", + "setting": { + "compileHotReLoad": true, + "urlCheck": false + } +} \ No newline at end of file diff --git a/sitemap.json b/sitemap.json new file mode 100644 index 0000000..cd24f35 --- /dev/null +++ b/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file diff --git a/utils/WSCoordinate.js b/utils/WSCoordinate.js new file mode 100644 index 0000000..e64436f --- /dev/null +++ b/utils/WSCoordinate.js @@ -0,0 +1,67 @@ +function t(t, a) { + return a < 72.004 || a > 137.8347 || t < .8293 || t > 55.8271; +} + +function a(a, n) { + var i = .006693421622965943, u = 6378245, e = 3.141592653589793; + if (t(a, n)) a, n; else { + var r = function(t, a) { + var n = 3.141592653589793, i = 2 * t - 100 + 3 * a + .2 * a * a + .1 * t * a + .2 * Math.sqrt(Math.abs(t)); + return i += 2 * (20 * Math.sin(6 * t * n) + 20 * Math.sin(2 * t * n)) / 3, i += 2 * (20 * Math.sin(a * n) + 40 * Math.sin(a / 3 * n)) / 3, + i += 2 * (160 * Math.sin(a / 12 * n) + 320 * Math.sin(a * n / 30)) / 3; + }(n - 105, a - 35), o = function(t, a) { + var n = 3.141592653589793, i = 300 + t + 2 * a + .1 * t * t + .1 * t * a + .1 * Math.sqrt(Math.abs(t)); + return i += 2 * (20 * Math.sin(6 * t * n) + 20 * Math.sin(2 * t * n)) / 3, i += 2 * (20 * Math.sin(t * n) + 40 * Math.sin(t / 3 * n)) / 3, + i += 2 * (150 * Math.sin(t / 12 * n) + 300 * Math.sin(t / 30 * n)) / 3; + }(n - 105, a - 35), s = a / 180 * e, h = Math.sin(s); + h = 1 - i * h * h; + var M = Math.sqrt(h); + a += r = 180 * r / (u * (1 - i) / (h * M) * e), n += o = 180 * o / (u / M * Math.cos(s) * e); + } + return { + latitude: a, + longitude: n + }; +} + +function n(t, a, n) { + return t.latitude >= Math.min(a.latitude, n.latitude) && t.latitude <= Math.max(a.latitude, n.latitude) && t.longitude >= Math.min(a.longitude, n.longitude) && t.longitude <= Math.max(a.longitude, n.longitude); +} + +module.exports = { + isLocationOutOfChina: t, + transformFromWGSToGCJ: a, + transformFromGCJToBaidu: function(t, a) { + var n = 52.35987755982988, i = Math.sqrt(a * a + t * t) + 2e-5 * Math.sin(t * n), u = Math.atan2(t, a) + 3e-6 * Math.cos(a * n); + return { + latitude: i * Math.sin(u) + .006, + longitude: i * Math.cos(u) + .0065 + }; + }, + transformFromBaiduToGCJ: function(t, a) { + var n = 52.35987755982988, i = a - .0065, u = t - .006, e = Math.sqrt(i * i + u * u) - 2e-5 * Math.sin(u * n), r = Math.atan2(u, i) - 3e-6 * Math.cos(i * n); + return { + latitude: e * Math.sin(r), + longitude: e * Math.cos(r) + }; + }, + transformFromGCJToWGS: function(t, i) { + for (var u = t - .5, e = t + .5, r = i - .5, o = i + .5, s = 1, h = 30; ;) { + var M = a(u, r), d = a(u, o), l = a(e, r), f = a((u + e) / 2, (r + o) / 2); + if (s = Math.abs(f.latitude - t) + Math.abs(f.longitude - i), h-- <= 0 || s <= 1e-5) return { + latitude: (u + e) / 2, + longitude: (r + o) / 2 + }; + n({ + latitude: t, + longitude: i + }, M, f) ? (e = (u + e) / 2, o = (r + o) / 2) : n({ + latitude: t, + longitude: i + }, d, f) ? (e = (u + e) / 2, r = (r + o) / 2) : n({ + latitude: t, + longitude: i + }, l, f) ? (u = (u + e) / 2, o = (r + o) / 2) : (u = (u + e) / 2, r = (r + o) / 2); + } + } +}; \ No newline at end of file diff --git a/utils/api.js b/utils/api.js new file mode 100644 index 0000000..807bb19 --- /dev/null +++ b/utils/api.js @@ -0,0 +1,181 @@ +var baseUrls = { + baseImgUrl: "route/file/download/true/", + requestUrl: "https://www.wlcbsyzl.cn/systemmunicipalmini/", + communityUrl: "https://www.wlcbsyzl.cn/populationhouse/", + serviceUrl: "https://www.wlcbsyzl.cn/usercenter/", + caseUrl: "https://www.wlcbsyzl.cn/case/", + sourceUrl: "https://www.wlcbsyzl.cn/systemmunicipalmini/assets/weCharMiniFile/images/", + baseCardUrl: "https://www.wlcbsyzl.cn/citycard/route/file/download/true/", + url: "https://www.wlcbsyzl.cn/citycard/" +} + + + + +var apis = { + doLogin: "{baseUrl}wechat-miniapp/sign/default", + getCommunityList: "{baseUrl}app/community/list", + getCommunityListPage: "{baseUrl}app/community/listpagecommunity", + joinCommunity: "{baseUrl}app/joinCommunity/save", + getArea: "{baseUrl}app/area/listbyparentid/{areaId}", + getHouse: "{baseUrl}app/residential/list", + mycommunity: "{baseUrl}app/joinCommunity/list", + quitCommunity: "{baseUrl}app/joinCommunity/remove/{ids}", + getDictionary: "{baseUrl}app/data/listbyparentid/{dataParentId}", + getResidential: "{baseUrl}app/residential/get/{residentialId}", + submitCheckIn: "{baseUrl}app/partymemberreport/save", + getOrg: "{baseUrl}app/organization/save", + uploadImg: "{baseUrl}app/file/uploadimage", + uploadVideo: "{baseUrl}app/file/uploadvideo", + uploadAudio: "{baseUrl}app/file/uploadaudio", + submitSettle: "{baseUrl}app/organization/save", + getOrgList: "{baseUrl}app/organization/listpageorganization", + getMineOrg: "{baseUrl}app/organization/myorganize", + doUpdateOrg: "{baseUrl}app/organization/updateorganization/{organizationId}", + submitHelp: "{baseUrl}app/neighbor/save", + getHelpList: "{baseUrl}app/neighbor/listpageneighbor", + getHelpDetail: "{baseUrl}app/neighbor/get/{neighborId}", + doReplyHelp: "{baseUrl}app/neighborcomment/save", + getReplyList: "{baseUrl}app/neighborcomment/list", + submitTalk: "{baseUrl}app/triflemyself/save", + getTalkList: "{baseUrl}app/triflemyself/listpagetriflemyself", + getTalkDetail: "{baseUrl}app/triflemyself/get/{trifleMyselfId}", + replyTalk: "{baseUrl}app/comment/save", + getTalkReplyList: "{baseUrl}app/comment/list", + submitNeighborCircle: "{baseUrl}app/neighborcircle/save", + getCircleList: "{baseUrl}app/neighborcircle/listpageneighborcircle", + getCircleDetail: "{baseUrl}app/neighborcircle/get/{neighborCircleId}", + submitCircleReply: "{baseUrl}app/neighborcirclecomment/save", + getCircleReplyList: "{baseUrl}app/neighborcirclecomment/list", + circleClickGood: "{baseUrl}app/neighborcirclefabulous/save", + getCircleGoodCount: "{baseUrl}app/neighborcirclefabulous/count", + circleIsClicked: "{baseUrl}app/neighborcirclefabulous/has-fabulous/{neighborCircleId}", + cancelGood: "{baseUrl}app/neighborcirclefabulous/cancel/{ids}", + getTalkGoodCount: "{baseUrl}app/fabulous/count", + talkIsClicked: "{baseUrl}app/fabulous/has-fabulous/{neighborCircleId}", + talkClickPeople: "{baseUrl}app/fabulous/listpagefabulous", + talkClickGood: "{baseUrl}app/fabulous/save", + talkCancelGood: "{baseUrl}app/fabulous/cancel/{ids}", + getNewsType: "{baseUrl}app/newstype/list", + getNewsList: "{baseUrl}app/news/listpagenews", + getNewsDetail: "{baseUrl}app/news/get/{newsId}", + submitNewsReply: "{baseUrl}app/newscomment/save", + getNewsReplyList: "{baseUrl}app/newscomment/list", + isCollectNews: "{baseUrl}app/newscollection/has-collection/{newsId}", + doCollectNews: "{baseUrl}app/newscollection/save", + cancelCollectNews: "{baseUrl}app/newscollection/cancel/{ids}", + getDefaultSyzlCard: "{baseUrl}app/card/get-default", + + + getChildArea: "{baseUrl}app/area/listallbyparentid/{areaParentId}", + caseType: "{baseUrl}app/casetype/list-ztree", + caseTypeChild: "{baseUrl}app/casetype/listall-byparentid", + submitReport: "{baseUrl}app/report/save-miniapp", + getHelpCount: "{baseUrl}app/neighbor/count", + getCardSyzlDetail: "{baseUrl}app/card/get/{cardId}", + submitCreateCard: "{baseUrl}app/card/save", + doUpdateCard: "{baseUrl}app/gridmini/updategridmini/{gridMiniId}", + isCheckedIn: "{baseUrl}app/partymemberreport/has-report/{community}", + checkGrid: "{baseUrl}app/gridmini/authentication", + getGridListPage: "{baseUrl}app/gridmini/listpagegridmini", + getGridList: "{baseUrl}app/gridmini/list", + myCaseList: "{baseUrl}app/report/listpage-me", + getLog: "{baseUrl}app/reportlog/list-activity/{businessId}", + myCaseDetail: "{baseUrl}app/report/get/{reportId}", + updateCaseStatus: "{baseUrl}app/report/updatereport/{reportId}", + handleCase: "{baseUrl}app/reporthandle/save", + getHandleList: "{baseUrl}app/reporthandle/list", + getGirdDetail: "{baseUrl}app/gridmini/get/{gridMiniId}", + caseRedundancies: "{baseUrl}app/report/reassignment/{reportId}", + getMineIsGrid: "{baseUrl}app/gridmini/isGridUser", + getBtnIsShow: "{baseUrl}app/btnshow/getbytype/{type}", + doUploadImg: "app/file/uploadimage", + doUploadVideo: "app/file/uploadvideo", + doUploadAudio: "app/file/uploadaudio", + getMenuList: "app/cardconfigcolumngroup/list", + getMomentsList: "app/configcolumndata/list/{configColumnId}", + doSaveMoments: "app/configcolumndata/save/{configColumnId}", + getMomentsField: "app/configcolumndata/listfield/{configColumnId}", + doDelMoment: "app/configcolumndata/delete/{configColumnId}/{uid}", + getMomentsContent: "app/configcolumndata/get/{configColumnId}/{uid}", + getMainColumn: "app/cardconfigcolumn/listhome", + getColumnListByGroupId: "app/cardconfigcolumn/list", + getMainMoment: "app/configcolumndata/list/{configColumnId}", + getMineColumnList: "app/configcolumnset/list", + doSaveColumnDisplay: "app/configcolumnset/savedisplay", + doSaveColumnName: "app/configcolumnset/savename", + doOrderColumn: "app/configcolumnset/saveorder", + doSaveCollect: "app/contentcollect/save", + doSaveLike: "app/contentlike/save", + getPosterFavorList: "app/cardtemplate/mylistposter", + getColumnContentHandle: "app/contentcomment/countlist/{projectId}/{businessIds}", + doSaveComment: "app/contentcomment/save", + getCommentList: "app/contentcomment/listpagerelease/{projectId}/{businessId}", + doDelComment: "app/contentcomment/remove/{ids}", + getCardList: "app/cardtemplate/list", + getCardDetail: "app/cardtemplate/get/{cardTemplateId}", + creatCard: "app/cardtemplateuse/save", + getFileId: "app/pictruestemplatearea/createfile/{picturesTemplateAreaId}", + getMyCard: "app/cardtemplateuse/list", + getMyCardDetail: "app/cardtemplateuse/get/{cardTemplateUseId}", + updateMyCard: "app/cardtemplateuse/update/{cardTemplateUseId}", + setDefaultCard: "app/cardtemplateuse/default/{cardTemplateUseId}", + deleteCard: "app/cardtemplateuse/remove/{ids}", + getDefaultCard: "app/cardtemplateuse/getdefault", + getBrowUserCard: "app/cardtemplateuse/getdefault/{userId}", + shareRecord: "app/cardtemplatedispatch/save", + checkRecord: "app/cardtemplatescans/save", + shareCard: "app/cardtemplateuse/getdispatch/{cardTemplateUseId}", + includedCard: "app/cardtemplateusebag/save", + otherCardList: "app/cardtemplateusebag/listpage", + setTop: "app/cardtemplateusebag/updatetop/{cardTemplateUseBagId}/{cardTemplateUseTop}", + getCardUseId: "app/cardtemplatedispatch/get/{cardTemplateDispatchId}", + getBrowseHistoryList: "app/cardtemplatescans/listpage/1", + getCardBrowUserList: "app/cardtemplatescans/listhome", + getDictionaryList: "app/data/listallbyparentid/{dataParentId}", + getAreaDictionaryList: "app/area/listbyparentid/{areaParentId}", + getPayState: "app/cardcharge/getprice", +} + + + +// a(e, "), a(e, "), +// a(e, "), a(e, "), +// a(e, "), a(e, ""), +// a(e, "), a(e, "), +// a(e, "), a(e, "), +// a(e, "), a(e, "), +// a(e, "), a(e, "), +// a(e, "), a(e, ), +// a(e, "getGirdDetail", "{baseUrl}app/gridmini/get/{gridMiniId}"), a(e, "caseRedundancies", "{baseUrl}app/report/reassignment/{reportId}"), +// a(e, "getMineIsGrid", "{baseUrl}app/gridmini/isGridUser"), a(e, "getBtnIsShow", "{baseUrl}app/btnshow/getbytype/{type}"), +// a(e, "doUploadImg", "app/file/uploadimage"), a(e, "doUploadVideo", "app/file/uploadvideo"), +// a(e, "doUploadAudio", "app/file/uploadaudio"), a(e, "getMenuList", "app/cardconfigcolumngroup/list"), +// a(e, "getMomentsList", "app/configcolumndata/list/{configColumnId}"), a(e, "doSaveMoments", "app/configcolumndata/save/{configColumnId}"), +// a(e, "getMomentsField", "app/configcolumndata/listfield/{configColumnId}"), a(e, "doDelMoment", "app/configcolumndata/delete/{configColumnId}/{uid}"), +// a(e, "getMomentsContent", "app/configcolumndata/get/{configColumnId}/{uid}"), a(e, "getMainColumn", "app/cardconfigcolumn/listhome"), +// a(e, "getColumnListByGroupId", "app/cardconfigcolumn/list"), a(e, "getMainMoment", "app/configcolumndata/list/{configColumnId}"), +// a(e, "getMineColumnList", "app/configcolumnset/list"), a(e, "doSaveColumnDisplay", "app/configcolumnset/savedisplay"), +// a(e, "doSaveColumnName", "app/configcolumnset/savename"), a(e, "doOrderColumn", "app/configcolumnset/saveorder"), +// a(e, "doSaveCollect", "app/contentcollect/save"), a(e, "doSaveLike", "app/contentlike/save"), +// a(e, "getPosterFavorList", "app/cardtemplate/mylistposter"), a(e, "getColumnContentHandle", "app/contentcomment/countlist/{projectId}/{businessIds}"), +// a(e, "doSaveComment", "app/contentcomment/save"), a(e, "getCommentList", "app/contentcomment/listpagerelease/{projectId}/{businessId}"), +// a(e, "doDelComment", "app/contentcomment/remove/{ids}"), a(e, "getCardList", "app/cardtemplate/list"), +// a(e, "getCardDetail", "app/cardtemplate/get/{cardTemplateId}"), a(e, "creatCard", "app/cardtemplateuse/save"), +// a(e, "getFileId", "app/pictruestemplatearea/createfile/{picturesTemplateAreaId}"), +// a(e, "getMyCard", "app/cardtemplateuse/list"), a(e, "getMyCardDetail", "app/cardtemplateuse/get/{cardTemplateUseId}"), +// a(e, "updateMyCard", "app/cardtemplateuse/update/{cardTemplateUseId}"), a(e, "setDefaultCard", "app/cardtemplateuse/default/{cardTemplateUseId}"), +// a(e, "deleteCard", "app/cardtemplateuse/remove/{ids}"), a(e, "getDefaultCard", "app/cardtemplateuse/getdefault"), +// a(e, "getBrowUserCard", "app/cardtemplateuse/getdefault/{userId}"), a(e, "shareRecord", "app/cardtemplatedispatch/save"), +// a(e, "checkRecord", "app/cardtemplatescans/save"), a(e, "shareCard", "app/cardtemplateuse/getdispatch/{cardTemplateUseId}"), +// a(e, "includedCard", "app/cardtemplateusebag/save"), a(e, "otherCardList", "app/cardtemplateusebag/listpage"), +// a(e, "setTop", "app/cardtemplateusebag/updatetop/{cardTemplateUseBagId}/{cardTemplateUseTop}"), +// a(e, "getCardUseId", "app/cardtemplatedispatch/get/{cardTemplateDispatchId}"), a(e, "getBrowseHistoryList", "app/cardtemplatescans/listpage/1"), +// a(e, "getCardBrowUserList", "app/cardtemplatescans/listhome"), a(e, "getDictionaryList", "app/data/listallbyparentid/{dataParentId}"), +// a(e, "getAreaDictionaryList", "app/area/listbyparentid/{areaParentId}"), a(e, "getPayState", "app/cardcharge/getprice"), +// e); + +module.exports = { + apis, + baseUrls +} \ No newline at end of file diff --git a/utils/md5.js b/utils/md5.js new file mode 100644 index 0000000..dbc6f76 --- /dev/null +++ b/utils/md5.js @@ -0,0 +1,82 @@ +function r(r, n) { + var t = (65535 & r) + (65535 & n); + return (r >> 16) + (n >> 16) + (t >> 16) << 16 | 65535 & t; +} + +function n(n, t, e, u, o, c) { + return r((f = r(r(t, n), r(u, c))) << (a = o) | f >>> 32 - a, e); + var f, a; +} + +function t(r, t, e, u, o, c, f) { + return n(t & e | ~t & u, r, t, o, c, f); +} + +function e(r, t, e, u, o, c, f) { + return n(t & u | e & ~u, r, t, o, c, f); +} + +function u(r, t, e, u, o, c, f) { + return n(t ^ e ^ u, r, t, o, c, f); +} + +function o(r, t, e, u, o, c, f) { + return n(e ^ (t | ~u), r, t, o, c, f); +} + +function c(n) { + for (var c = 1732584193, f = -271733879, a = -1732584194, i = 271733878, h = 0; h < n.length; h += 16) { + var l = c, v = f, g = a, d = i; + c = t(c, f, a, i, n[h + 0], 7, -680876936), i = t(i, c, f, a, n[h + 1], 12, -389564586), + a = t(a, i, c, f, n[h + 2], 17, 606105819), f = t(f, a, i, c, n[h + 3], 22, -1044525330), + c = t(c, f, a, i, n[h + 4], 7, -176418897), i = t(i, c, f, a, n[h + 5], 12, 1200080426), + a = t(a, i, c, f, n[h + 6], 17, -1473231341), f = t(f, a, i, c, n[h + 7], 22, -45705983), + c = t(c, f, a, i, n[h + 8], 7, 1770035416), i = t(i, c, f, a, n[h + 9], 12, -1958414417), + a = t(a, i, c, f, n[h + 10], 17, -42063), f = t(f, a, i, c, n[h + 11], 22, -1990404162), + c = t(c, f, a, i, n[h + 12], 7, 1804603682), i = t(i, c, f, a, n[h + 13], 12, -40341101), + a = t(a, i, c, f, n[h + 14], 17, -1502002290), c = e(c, f = t(f, a, i, c, n[h + 15], 22, 1236535329), a, i, n[h + 1], 5, -165796510), + i = e(i, c, f, a, n[h + 6], 9, -1069501632), a = e(a, i, c, f, n[h + 11], 14, 643717713), + f = e(f, a, i, c, n[h + 0], 20, -373897302), c = e(c, f, a, i, n[h + 5], 5, -701558691), + i = e(i, c, f, a, n[h + 10], 9, 38016083), a = e(a, i, c, f, n[h + 15], 14, -660478335), + f = e(f, a, i, c, n[h + 4], 20, -405537848), c = e(c, f, a, i, n[h + 9], 5, 568446438), + i = e(i, c, f, a, n[h + 14], 9, -1019803690), a = e(a, i, c, f, n[h + 3], 14, -187363961), + f = e(f, a, i, c, n[h + 8], 20, 1163531501), c = e(c, f, a, i, n[h + 13], 5, -1444681467), + i = e(i, c, f, a, n[h + 2], 9, -51403784), a = e(a, i, c, f, n[h + 7], 14, 1735328473), + c = u(c, f = e(f, a, i, c, n[h + 12], 20, -1926607734), a, i, n[h + 5], 4, -378558), + i = u(i, c, f, a, n[h + 8], 11, -2022574463), a = u(a, i, c, f, n[h + 11], 16, 1839030562), + f = u(f, a, i, c, n[h + 14], 23, -35309556), c = u(c, f, a, i, n[h + 1], 4, -1530992060), + i = u(i, c, f, a, n[h + 4], 11, 1272893353), a = u(a, i, c, f, n[h + 7], 16, -155497632), + f = u(f, a, i, c, n[h + 10], 23, -1094730640), c = u(c, f, a, i, n[h + 13], 4, 681279174), + i = u(i, c, f, a, n[h + 0], 11, -358537222), a = u(a, i, c, f, n[h + 3], 16, -722521979), + f = u(f, a, i, c, n[h + 6], 23, 76029189), c = u(c, f, a, i, n[h + 9], 4, -640364487), + i = u(i, c, f, a, n[h + 12], 11, -421815835), a = u(a, i, c, f, n[h + 15], 16, 530742520), + c = o(c, f = u(f, a, i, c, n[h + 2], 23, -995338651), a, i, n[h + 0], 6, -198630844), + i = o(i, c, f, a, n[h + 7], 10, 1126891415), a = o(a, i, c, f, n[h + 14], 15, -1416354905), + f = o(f, a, i, c, n[h + 5], 21, -57434055), c = o(c, f, a, i, n[h + 12], 6, 1700485571), + i = o(i, c, f, a, n[h + 3], 10, -1894986606), a = o(a, i, c, f, n[h + 10], 15, -1051523), + f = o(f, a, i, c, n[h + 1], 21, -2054922799), c = o(c, f, a, i, n[h + 8], 6, 1873313359), + i = o(i, c, f, a, n[h + 15], 10, -30611744), a = o(a, i, c, f, n[h + 6], 15, -1560198380), + f = o(f, a, i, c, n[h + 13], 21, 1309151649), c = o(c, f, a, i, n[h + 4], 6, -145523070), + i = o(i, c, f, a, n[h + 11], 10, -1120210379), a = o(a, i, c, f, n[h + 2], 15, 718787259), + f = o(f, a, i, c, n[h + 9], 21, -343485551), c = r(c, l), f = r(f, v), a = r(a, g), + i = r(i, d); + } + return [ c, f, a, i ]; +} + +function f(r) { + for (var n = "", t = 0; t < 4 * r.length; t++) n += "0123456789abcdef".charAt(r[t >> 2] >> t % 4 * 8 + 4 & 15) + "0123456789abcdef".charAt(r[t >> 2] >> t % 4 * 8 & 15); + return n; +} + +function a(r) { + for (var n = 1 + (r.length + 8 >> 6), t = new Array(16 * n), e = 0; e < 16 * n; e++) t[e] = 0; + for (e = 0; e < r.length; e++) t[e >> 2] |= (255 & r.charCodeAt(e)) << e % 4 * 8; + return t[e >> 2] |= 128 << e % 4 * 8, t[16 * n - 2] = 8 * r.length, t; +} + +module.exports = { + hexMD5: function(r) { + return f(c(a(r))); + } +}; \ No newline at end of file diff --git a/utils/request.js b/utils/request.js new file mode 100644 index 0000000..194819b --- /dev/null +++ b/utils/request.js @@ -0,0 +1,325 @@ +const api = require('./api'); +/** + * 例子 + */ + +var methods = { + POST_METHOD: 'POST', + DELETE_METHOD: 'DELETE', + PUT_METHOD: 'PUT', + GET_METHOD: 'GET' +}; + +/** + * 新增 + * @param url + * @param dataObj + * @param args + * @param successCallback + * @param errorCallback + * @param completeCallback + */ +function postJson(url, args) { + return doAjax(url, methods.POST_METHOD, args); +} + +/** + * 删除 + * @param url + * @param dataObj + * @param args + * @param successCallback + * @param errorCallback + * @param completeCallback + */ +function deleteForm(url, args) { + return doAjax(url, methods.DELETE_METHOD, args); +} + +/** + * 修改 + * @param url + * @param dataObj + * @param args + * @param successCallback + * @param errorCallback + * @param completeCallback + */ +function putJson(url, args) { + return doAjax(url, methods.PUT_METHOD, args); +} + +/** + * 查询 + * @param url + * @param dataObj + * @param args + * @param successCallback + * @param errorCallback + * @param completeCallback + */ +function getForm(url, args) { + return doAjax(url, methods.GET_METHOD, args); +} + +/** + * 执行上传 + * @param url + * @param method + * @param dataObj + * @param args + * @param successCallback + * @param errorCallback + * @param completeCallback + */ +function doAjax(url, method, args) { + // var headers = {}; + // if (args != null && typeof (args.headers) != 'undefined' && args.headers != null) { + // headers = args.headers; + // } + return new Promise((success, errorback) => { + //构建请求Url + var requestUrl = api.baseUrls.url + url + wx.request({ + url: requestUrl, + method: method, + data: args.data || {}, + header: args.header || {}, + timeout: 50000, + dataType: 'json', + success: res => { + if (res.statusCode == 200) { + success(res) + } else { + errorback(res) + var hintMsg = '网络错误' + if (res.data && res.data.msg) { + hintMsg = res.data.msg + } + wx.showToast({ + title: hintMsg, + icon: 'none' + }) + } + }, + fail: err => { + wx.hideLoading({}) + errorback(err) + var hintMsg = '网络错误' + if (err.data && err.data.msg) { + hintMsg = err.data.msg + } + wx.showToast({ + title: hintMsg + '(100)', + icon: 'none' + }) + }, + }) + }) +} + +/** + * 检测是路径参数有重复值 + * @param pathArgArray + * @returns {boolean} + */ +function pathArgsHasSameValue(pathArgArray) { + var tempArgIndex = 0; + var tempArgs = pathArgArray[tempArgIndex]; + for (var i = (tempArgIndex + 1), item; item = pathArgArray[i]; i++) { + if (tempArgs == item) { + throw new Error('参数' + item + '有重复值!!!'); + } + if (i == pathArgArray.length - 1) { + tempArgs = pathArgArray[++tempArgIndex]; + i = tempArgIndex; + continue; + } + } +} + +/** + * 获取页面间传递的参数 + * @param url + */ +function getParamsArg(url) { + var params = url.split('?')[1]; + var paramsObj = {}; + if (typeof (params) == 'undefined' || params == null) { + return paramsObj; + } + var paramsKVs = params.split('&'); + for (var i = 0, item = null; item = paramsKVs[i++];) { + var kvs = item.split('='); + if (kvs.length == 1) { + paramsObj[kvs[0]] = null; + } + if (kvs.length == 2) { + paramsObj[kvs[0]] = decodeURI(kvs[1]); + } + } + return paramsObj; +} + +/** + * 构建路径 + * @param basePath 请求路径,{参数}, + * @param pathArgs 替换的路径参数,不能重复 + * @returns {*} + */ +function buildPath(basePath, pathArgs) { + var path = basePath; + if (!basePath || !(typeof (basePath) == 'string')) { + throw new Error('basePath必须为字符串!!!'); + } + if (!pathArgs || !Array.isArray(pathArgs)) { + throw new Error('pathArgs必须为数组!!!'); + } + var pathArgArray = basePath.match(/\{\w+\}/g); + if (!pathArgArray) { + return path; + } + pathArgsHasSameValue(pathArgArray); + for (var i = 0, item; item = pathArgArray[i]; i++) { + path = path.replace(item, pathArgs[i]); + } + return path; +} + +/** + * 通过form对象上传文件 + * @param url + * @param formData + * @param args + * @param successCallback + * @param errorCallback + * @param beforeCallback + * @param completeCallback + */ +function postFile(url, path, name, args, successCallback, errorCallback, completeCallback) { + var headers = {}; + if (args != null && typeof (args.headers) != 'undefined' && args.headers != null) { + headers = args.headers; + } + wx.uploadFile({ + filePath: path, + name: name, + url: url, + header: headers, + success: function (response) { + if (response.statusCode == 200) { + successCallback(response.statusCode, response.data, args); + } else { + if (errorCallback && typeof (errorCallback) == 'function') { + errorCallback(response.statusCode, response.data); + } + } + }, + fail: function (response) { + if (errorCallback && typeof errorCallback == 'function') { + errorCallback(response.statusCode, response.data) + } + }, + complete: function () { + if (completeCallback && typeof (completeCallback) == 'function') { + completeCallback(); + } + } + }) +}; +/** + * Promise 上传文件 + */ +function upload(url, params) { + return new Promise((success, errorback) => { + var requestUrl = api.baseUrls.url + url + wx.uploadFile({ + filePath: params.path, + name: params.name, + url: requestUrl, + header: params.header, + success: function (response) { + console.log('success') + if (response.statusCode == 200) { + success(response.data); + } else { + errorback(response) + if (typeof (response.data) != undefined) { + try { + var data = JSON.parse(response.data) + wx.showToast({ + title: data.msg, + icon: 'none' + }) + } catch (err) { + wx.showToast({ + title: '网络错误', + icon: 'error' + }) + } + } else { + wx.showToast({ + title: '网络错误', + icon: 'error' + }) + } + } + }, + fail: function (response) { + wx.hideLoading({}) + try { + if (typeof (response.data.msg) != undefined) { + wx.showToast({ + title: response.data.msg, + icon: 'none' + }) + } else { + wx.showToast({ + title: '网络错误(100)', + icon: 'error' + }) + } + } catch (err) { + wx.showToast({ + title: '网络错误(100)', + icon: 'error' + }) + } + } + }) + }) +} + +/** + * xss 转义 + * @param html + * @returns {string} + */ +function escape(html) { + return String(html || '').replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&') + .replace(//g, '>') + .replace(/'/g, ''').replace(/"/g, '"'); +} + +String.prototype.format = function (params) { + let s = this + for (let item in params) { + let re = new RegExp('{' + item + '}', 'gm') + s = s.replace(re, params[item]) + } + return s +} + + +module.exports = { + post: postJson, + delete: deleteForm, + put: putJson, + get: getForm, + params: getParamsArg, + path: buildPath, + escape: escape, + file: postFile, + upload: upload, + apis: api.apis +} \ No newline at end of file diff --git a/utils/restAjax.js b/utils/restAjax.js new file mode 100644 index 0000000..e3a8be6 --- /dev/null +++ b/utils/restAjax.js @@ -0,0 +1,239 @@ +const api = require('../utils/api'); + +var methods = { + POST_METHOD: 'POST', + DELETE_METHOD: 'DELETE', + PUT_METHOD: 'PUT', + GET_METHOD: 'GET' +}; + +/** + * 新增 + * @param url + * @param dataObj + * @param args + * @param successCallback + * @param errorCallback + * @param completeCallback + */ +function postJson(url, dataObj, args, successCallback, errorCallback, completeCallback) { + doAjax(url, methods.POST_METHOD, dataObj, args, successCallback, errorCallback, completeCallback); +} + +/** + * 删除 + * @param url + * @param dataObj + * @param args + * @param successCallback + * @param errorCallback + * @param completeCallback + */ +function deleteForm(url, dataObj, args, successCallback, errorCallback, completeCallback) { + doAjax(url, methods.DELETE_METHOD, dataObj, args, successCallback, errorCallback, completeCallback); +} + +/** + * 修改 + * @param url + * @param dataObj + * @param args + * @param successCallback + * @param errorCallback + * @param completeCallback + */ +function putJson(url, dataObj, args, successCallback, errorCallback, completeCallback) { + doAjax(url, methods.PUT_METHOD, dataObj, args, successCallback, errorCallback, completeCallback); +} + +/** + * 查询 + * @param url + * @param dataObj + * @param args + * @param successCallback + * @param errorCallback + * @param completeCallback + */ +function getForm(url, dataObj, args, successCallback, errorCallback, completeCallback) { + doAjax(url, methods.GET_METHOD, dataObj, args, successCallback, errorCallback, completeCallback); +} + +/** + * 执行上传 + * @param url + * @param method + * @param dataObj + * @param args + * @param successCallback + * @param errorCallback + * @param completeCallback + */ +function doAjax(url, method, dataObj, args, successCallback, errorCallback, completeCallback) { + var headers = {}; + if (args != null && typeof (args.headers) != 'undefined' && args.headers != null) { + headers = args.headers; + } + wx.request({ + url: url, + method: method, + data: dataObj, + header: headers, + dataType: 'json', + success: function (response) { + if (response.statusCode == 200) { + successCallback(response.statusCode, response.data, args); + } else { + if (errorCallback && typeof (errorCallback) == 'function') { + errorCallback(response.statusCode, response.data); + } + } + }, + fail: function (response) { + if (errorCallback && typeof errorCallback == 'function') { + errorCallback(response.statusCode, response) + } + }, + complete: function () { + if (completeCallback && typeof (completeCallback) == 'function') { + completeCallback(); + } + } + }) +} + +/** + * 检测是路径参数有重复值 + * @param pathArgArray + * @returns {boolean} + */ +function pathArgsHasSameValue(pathArgArray) { + var tempArgIndex = 0; + var tempArgs = pathArgArray[tempArgIndex]; + for (var i = (tempArgIndex + 1), item; item = pathArgArray[i]; i++) { + if (tempArgs == item) { + throw new Error('参数' + item + '有重复值!!!'); + } + if (i == pathArgArray.length - 1) { + tempArgs = pathArgArray[++tempArgIndex]; + i = tempArgIndex; + continue; + } + } +} + +/** + * 获取页面间传递的参数 + * @param url + */ +function getParamsArg(url) { + var params = url.split('?')[1]; + var paramsObj = {}; + if (typeof (params) == 'undefined' || params == null) { + return paramsObj; + } + var paramsKVs = params.split('&'); + for (var i = 0, item = null; item = paramsKVs[i++];) { + var kvs = item.split('='); + if (kvs.length == 1) { + paramsObj[kvs[0]] = null; + } + if (kvs.length == 2) { + paramsObj[kvs[0]] = decodeURI(kvs[1]); + } + } + return paramsObj; +} + +/** + * 构建路径 + * @param basePath 请求路径,{参数}, + * @param pathArgs 替换的路径参数,不能重复 + * @returns {*} + */ +function buildPath(basePath, pathArgs) { + var path = basePath; + if (!basePath || !(typeof (basePath) == 'string')) { + throw new Error('basePath必须为字符串!!!'); + } + if (!pathArgs || !Array.isArray(pathArgs)) { + throw new Error('pathArgs必须为数组!!!'); + } + var pathArgArray = basePath.match(/\{\w+\}/g); + if (!pathArgArray) { + return path; + } + pathArgsHasSameValue(pathArgArray); + for (var i = 0, item; item = pathArgArray[i]; i++) { + path = path.replace(item, pathArgs[i]); + } + return path; +} + +/** + * 通过form对象上传文件 + * @param url + * @param formData + * @param args + * @param successCallback + * @param errorCallback + * @param beforeCallback + * @param completeCallback + */ +function postFile(url, path, name, args, successCallback, errorCallback, completeCallback) { + var headers = {}; + if (args != null && typeof (args.headers) != 'undefined' && args.headers != null) { + headers = args.headers; + } + wx.uploadFile({ + filePath: path, + name: name, + url: url, + header: headers, + success: function (response) { + if (response.statusCode == 200) { + successCallback(response.statusCode, response.data, args); + } else { + if (errorCallback && typeof (errorCallback) == 'function') { + errorCallback(response.statusCode, response.data); + } + } + }, + fail: function (response) { + if (errorCallback && typeof errorCallback == 'function') { + errorCallback(response.statusCode, response.data) + } + }, + complete: function () { + if (completeCallback && typeof (completeCallback) == 'function') { + completeCallback(); + } + } + }) +}; + +/** + * xss 转义 + * @param html + * @returns {string} + */ +function escape(html) { + return String(html || '').replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&') + .replace(//g, '>') + .replace(/'/g, ''').replace(/"/g, '"'); +} + + + +module.exports = { + post: postJson, + delete: deleteForm, + put: putJson, + get: getForm, + params: getParamsArg, + path: buildPath, + escape: escape, + file: postFile, + apis: api.apis, + baseUrl: api.baseUrls +} \ No newline at end of file diff --git a/utils/util.js b/utils/util.js new file mode 100644 index 0000000..6959da9 --- /dev/null +++ b/utils/util.js @@ -0,0 +1,23 @@ +var t = function(t) { + return (t = t.toString())[1] ? t : "0".concat(t); +}; + +module.exports = { + formatTime: function(a) { + var n = a.getFullYear(), e = a.getMonth() + 1, o = a.getDate(), r = a.getHours(), i = a.getMinutes(), s = a.getSeconds(); + return "".concat([ n, e, o ].map(t).join("/"), " ").concat([ r, i, s ].map(t).join(":")); + }, + bdMapToQQMap: function(t, a) { + if (null == t || "" == t || null == a || "" == a) return [ t, a ]; + var n = 3.141592653589793, e = parseFloat(t) - .0065, o = parseFloat(a) - .006, r = Math.sqrt(e * e + o * o) - 2e-5 * Math.sin(o * n), i = Math.atan2(o, e) - 3e-6 * Math.cos(e * n); + return [ t = (r * Math.cos(i)).toFixed(7), a = (r * Math.sin(i)).toFixed(7) ]; + }, + qqMapToBMap: function(t, a) { + if (null == t || "" == t || null == a || "" == a) return [ t, a ]; + var n = 3.141592653589793, e = parseFloat(t), o = parseFloat(a), r = Math.sqrt(e * e + o * o) + 2e-5 * Math.sin(o * n), i = Math.atan2(o, e) + 3e-6 * Math.cos(e * n); + return [ t = (r * Math.cos(i) + .0065).toFixed(5), a = (r * Math.sin(i) + .006).toFixed(5) ]; + }, + isMobile: function(t) { + return !!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(t); + } +}; \ No newline at end of file diff --git a/vant/dist/action-sheet/index.d.ts b/vant/dist/action-sheet/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/action-sheet/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/action-sheet/index.js b/vant/dist/action-sheet/index.js new file mode 100755 index 0000000..042a906 --- /dev/null +++ b/vant/dist/action-sheet/index.js @@ -0,0 +1,70 @@ +import { VantComponent } from '../common/component'; +import { button } from '../mixins/button'; +VantComponent({ + mixins: [button], + props: { + show: Boolean, + title: String, + cancelText: String, + description: String, + round: { + type: Boolean, + value: true, + }, + zIndex: { + type: Number, + value: 100, + }, + actions: { + type: Array, + value: [], + }, + overlay: { + type: Boolean, + value: true, + }, + closeOnClickOverlay: { + type: Boolean, + value: true, + }, + closeOnClickAction: { + type: Boolean, + value: true, + }, + safeAreaInsetBottom: { + type: Boolean, + value: true, + }, + }, + methods: { + onSelect(event) { + const { index } = event.currentTarget.dataset; + const { actions, closeOnClickAction, canIUseGetUserProfile } = this.data; + const item = actions[index]; + if (item) { + this.$emit('select', item); + if (closeOnClickAction) { + this.onClose(); + } + if (item.openType === 'getUserInfo' && canIUseGetUserProfile) { + wx.getUserProfile({ + desc: item.getUserProfileDesc || ' ', + complete: (userProfile) => { + this.$emit('getuserinfo', userProfile); + }, + }); + } + } + }, + onCancel() { + this.$emit('cancel'); + }, + onClose() { + this.$emit('close'); + }, + onClickOverlay() { + this.$emit('click-overlay'); + this.onClose(); + }, + }, +}); diff --git a/vant/dist/action-sheet/index.json b/vant/dist/action-sheet/index.json new file mode 100755 index 0000000..19bf989 --- /dev/null +++ b/vant/dist/action-sheet/index.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-popup": "../popup/index", + "van-loading": "../loading/index" + } +} diff --git a/vant/dist/action-sheet/index.wxml b/vant/dist/action-sheet/index.wxml new file mode 100755 index 0000000..b04cc3a --- /dev/null +++ b/vant/dist/action-sheet/index.wxml @@ -0,0 +1,69 @@ + + + + + {{ title }} + + + + {{ description }} + + + + + + + + + + {{ cancelText }} + + + diff --git a/vant/dist/action-sheet/index.wxss b/vant/dist/action-sheet/index.wxss new file mode 100755 index 0000000..6248757 --- /dev/null +++ b/vant/dist/action-sheet/index.wxss @@ -0,0 +1,105 @@ +@import '../common/index.wxss'; + +.van-action-sheet { + max-height: 90% !important; + max-height: var(--action-sheet-max-height, 90%) !important; + color: #323233; + color: var(--action-sheet-item-text-color, #323233) +} + +.van-action-sheet__cancel, +.van-action-sheet__item { + padding: 14px 16px; + text-align: center; + font-size: 16px; + font-size: var(--action-sheet-item-font-size, 16px); + line-height: 22px; + line-height: var(--action-sheet-item-line-height, 22px); + background-color: #fff; + background-color: var(--action-sheet-item-background, #fff) +} + +.van-action-sheet__cancel--hover, +.van-action-sheet__item--hover { + background-color: #f2f3f5; + background-color: var(--active-color, #f2f3f5) +} + +.van-action-sheet__cancel:after, +.van-action-sheet__item:after { + border-width: 0 +} + +.van-action-sheet__cancel { + color: #646566; + color: var(--action-sheet-cancel-text-color, #646566) +} + +.van-action-sheet__gap { + display: block; + height: 8px; + height: var(--action-sheet-cancel-padding-top, 8px); + background-color: #f7f8fa; + background-color: var(--action-sheet-cancel-padding-color, #f7f8fa) +} + +.van-action-sheet__item--disabled { + color: #c8c9cc; + color: var(--action-sheet-item-disabled-text-color, #c8c9cc) +} + +.van-action-sheet__item--disabled.van-action-sheet__item--hover { + background-color: #fff; + background-color: var(--action-sheet-item-background, #fff) +} + +.van-action-sheet__subname { + margin-top: 8px; + margin-top: var(--padding-xs, 8px); + font-size: 12px; + font-size: var(--action-sheet-subname-font-size, 12px); + color: #969799; + color: var(--action-sheet-subname-color, #969799); + line-height: 20px; + line-height: var(--action-sheet-subname-line-height, 20px) +} + +.van-action-sheet__header { + text-align: center; + font-weight: 500; + font-weight: var(--font-weight-bold, 500); + font-size: 16px; + font-size: var(--action-sheet-header-font-size, 16px); + line-height: 48px; + line-height: var(--action-sheet-header-height, 48px) +} + +.van-action-sheet__description { + text-align: center; + padding: 20px 16px; + padding: 20px var(--padding-md, 16px); + color: #969799; + color: var(--action-sheet-description-color, #969799); + font-size: 14px; + font-size: var(--action-sheet-description-font-size, 14px); + line-height: 20px; + line-height: var(--action-sheet-description-line-height, 20px) +} + +.van-action-sheet__close { + position: absolute !important; + top: 0; + right: 0; + line-height: inherit !important; + padding: 0 16px; + padding: var(--action-sheet-close-icon-padding, 0 16px); + font-size: 22px !important; + font-size: var(--action-sheet-close-icon-size, 22px) !important; + color: #c8c9cc; + color: var(--action-sheet-close-icon-color, #c8c9cc) +} + +.van-action-sheet__loading { + display: -webkit-flex !important; + display: flex !important +} \ No newline at end of file diff --git a/vant/dist/area/index.d.ts b/vant/dist/area/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/area/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/area/index.js b/vant/dist/area/index.js new file mode 100755 index 0000000..3b3494d --- /dev/null +++ b/vant/dist/area/index.js @@ -0,0 +1,232 @@ +import { VantComponent } from '../common/component'; +import { pickerProps } from '../picker/shared'; +import { requestAnimationFrame } from '../common/utils'; +const EMPTY_CODE = '000000'; +VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: Object.assign(Object.assign({}, pickerProps), { + value: { + type: String, + observer(value) { + this.code = value; + this.setValues(); + }, + }, + areaList: { + type: Object, + value: {}, + observer: 'setValues', + }, + columnsNum: { + type: null, + value: 3, + }, + columnsPlaceholder: { + type: Array, + observer(val) { + this.setData({ + typeToColumnsPlaceholder: { + province: val[0] || '', + city: val[1] || '', + county: val[2] || '', + }, + }); + }, + }, + }), + data: { + columns: [{ values: [] }, { values: [] }, { values: [] }], + typeToColumnsPlaceholder: {}, + }, + mounted() { + requestAnimationFrame(() => { + this.setValues(); + }); + }, + methods: { + getPicker() { + if (this.picker == null) { + this.picker = this.selectComponent('.van-area__picker'); + } + return this.picker; + }, + onCancel(event) { + this.emit('cancel', event.detail); + }, + onConfirm(event) { + const { index } = event.detail; + let { value } = event.detail; + value = this.parseValues(value); + this.emit('confirm', { value, index }); + }, + emit(type, detail) { + detail.values = detail.value; + delete detail.value; + this.$emit(type, detail); + }, + parseValues(values) { + const { columnsPlaceholder } = this.data; + return values.map((value, index) => { + if ( + value && + (!value.code || value.name === columnsPlaceholder[index]) + ) { + return Object.assign(Object.assign({}, value), { + code: '', + name: '', + }); + } + return value; + }); + }, + onChange(event) { + const { index, picker, value } = event.detail; + this.code = value[index].code; + this.setValues().then(() => { + this.$emit('change', { + picker, + values: this.parseValues(picker.getValues()), + index, + }); + }); + }, + getConfig(type) { + const { areaList } = this.data; + return (areaList && areaList[`${type}_list`]) || {}; + }, + getList(type, code) { + if (type !== 'province' && !code) { + return []; + } + const { typeToColumnsPlaceholder } = this.data; + const list = this.getConfig(type); + let result = Object.keys(list).map((code) => ({ + code, + name: list[code], + })); + if (code != null) { + // oversea code + if (code[0] === '9' && type === 'city') { + code = '9'; + } + result = result.filter((item) => item.code.indexOf(code) === 0); + } + if (typeToColumnsPlaceholder[type] && result.length) { + // set columns placeholder + const codeFill = + type === 'province' + ? '' + : type === 'city' + ? EMPTY_CODE.slice(2, 4) + : EMPTY_CODE.slice(4, 6); + result.unshift({ + code: `${code}${codeFill}`, + name: typeToColumnsPlaceholder[type], + }); + } + return result; + }, + getIndex(type, code) { + let compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6; + const list = this.getList(type, code.slice(0, compareNum - 2)); + // oversea code + if (code[0] === '9' && type === 'province') { + compareNum = 1; + } + code = code.slice(0, compareNum); + for (let i = 0; i < list.length; i++) { + if (list[i].code.slice(0, compareNum) === code) { + return i; + } + } + return 0; + }, + setValues() { + const picker = this.getPicker(); + if (!picker) { + return; + } + let code = this.code || this.getDefaultCode(); + const provinceList = this.getList('province'); + const cityList = this.getList('city', code.slice(0, 2)); + const stack = []; + const indexes = []; + const { columnsNum } = this.data; + if (columnsNum >= 1) { + stack.push(picker.setColumnValues(0, provinceList, false)); + indexes.push(this.getIndex('province', code)); + } + if (columnsNum >= 2) { + stack.push(picker.setColumnValues(1, cityList, false)); + indexes.push(this.getIndex('city', code)); + if (cityList.length && code.slice(2, 4) === '00') { + [{ code }] = cityList; + } + } + if (columnsNum === 3) { + stack.push( + picker.setColumnValues( + 2, + this.getList('county', code.slice(0, 4)), + false + ) + ); + indexes.push(this.getIndex('county', code)); + } + return Promise.all(stack) + .catch(() => {}) + .then(() => picker.setIndexes(indexes)) + .catch(() => {}); + }, + getDefaultCode() { + const { columnsPlaceholder } = this.data; + if (columnsPlaceholder.length) { + return EMPTY_CODE; + } + const countyCodes = Object.keys(this.getConfig('county')); + if (countyCodes[0]) { + return countyCodes[0]; + } + const cityCodes = Object.keys(this.getConfig('city')); + if (cityCodes[0]) { + return cityCodes[0]; + } + return ''; + }, + getValues() { + const picker = this.getPicker(); + if (!picker) { + return []; + } + return this.parseValues(picker.getValues().filter((value) => !!value)); + }, + getDetail() { + const values = this.getValues(); + const area = { + code: '', + country: '', + province: '', + city: '', + county: '', + }; + if (!values.length) { + return area; + } + const names = values.map((item) => item.name); + area.code = values[values.length - 1].code; + if (area.code[0] === '9') { + area.country = names[1] || ''; + area.province = names[2] || ''; + } else { + area.province = names[0] || ''; + area.city = names[1] || ''; + area.county = names[2] || ''; + } + return area; + }, + reset(code) { + this.code = code || ''; + return this.setValues(); + }, + }, +}); diff --git a/vant/dist/area/index.json b/vant/dist/area/index.json new file mode 100755 index 0000000..a778e91 --- /dev/null +++ b/vant/dist/area/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-picker": "../picker/index" + } +} diff --git a/vant/dist/area/index.wxml b/vant/dist/area/index.wxml new file mode 100755 index 0000000..f7dc51f --- /dev/null +++ b/vant/dist/area/index.wxml @@ -0,0 +1,20 @@ + + + diff --git a/vant/dist/area/index.wxs b/vant/dist/area/index.wxs new file mode 100755 index 0000000..07723c1 --- /dev/null +++ b/vant/dist/area/index.wxs @@ -0,0 +1,8 @@ +/* eslint-disable */ +function displayColumns(columns, columnsNum) { + return columns.slice(0, +columnsNum); +} + +module.exports = { + displayColumns: displayColumns, +}; diff --git a/vant/dist/area/index.wxss b/vant/dist/area/index.wxss new file mode 100755 index 0000000..99694d6 --- /dev/null +++ b/vant/dist/area/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/vant/dist/button/index.d.ts b/vant/dist/button/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/button/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/button/index.js b/vant/dist/button/index.js new file mode 100755 index 0000000..f2fe270 --- /dev/null +++ b/vant/dist/button/index.js @@ -0,0 +1,58 @@ +import { VantComponent } from '../common/component'; +import { button } from '../mixins/button'; +import { openType } from '../mixins/open-type'; +import { canIUseFormFieldButton } from '../common/version'; +const mixins = [button, openType]; +if (canIUseFormFieldButton()) { + mixins.push('wx://form-field-button'); +} +VantComponent({ + mixins, + classes: ['hover-class', 'loading-class'], + data: { + baseStyle: '', + }, + props: { + formType: String, + icon: String, + classPrefix: { + type: String, + value: 'van-icon', + }, + plain: Boolean, + block: Boolean, + round: Boolean, + square: Boolean, + loading: Boolean, + hairline: Boolean, + disabled: Boolean, + loadingText: String, + customStyle: String, + loadingType: { + type: String, + value: 'circular', + }, + type: { + type: String, + value: 'default', + }, + dataset: null, + size: { + type: String, + value: 'normal', + }, + loadingSize: { + type: String, + value: '20px', + }, + color: String, + }, + methods: { + onClick() { + if (!this.data.loading) { + this.$emit('click'); + } + }, + noop() {}, + }, +}); diff --git a/vant/dist/button/index.json b/vant/dist/button/index.json new file mode 100755 index 0000000..e00a588 --- /dev/null +++ b/vant/dist/button/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-loading": "../loading/index" + } +} diff --git a/vant/dist/button/index.wxml b/vant/dist/button/index.wxml new file mode 100755 index 0000000..e4cec8a --- /dev/null +++ b/vant/dist/button/index.wxml @@ -0,0 +1,53 @@ + + + + diff --git a/vant/dist/button/index.wxs b/vant/dist/button/index.wxs new file mode 100755 index 0000000..8b649fe --- /dev/null +++ b/vant/dist/button/index.wxs @@ -0,0 +1,39 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); + +function rootStyle(data) { + if (!data.color) { + return data.customStyle; + } + + var properties = { + color: data.plain ? data.color : '#fff', + background: data.plain ? null : data.color, + }; + + // hide border when color is linear-gradient + if (data.color.indexOf('gradient') !== -1) { + properties.border = 0; + } else { + properties['border-color'] = data.color; + } + + return style([properties, data.customStyle]); +} + +function loadingColor(data) { + if (data.plain) { + return data.color ? data.color : '#c9c9c9'; + } + + if (data.type === 'default') { + return '#c9c9c9'; + } + + return '#fff'; +} + +module.exports = { + rootStyle: rootStyle, + loadingColor: loadingColor, +}; diff --git a/vant/dist/button/index.wxss b/vant/dist/button/index.wxss new file mode 100755 index 0000000..5a591fb --- /dev/null +++ b/vant/dist/button/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-button{position:relative;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:0;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%;height:44px;height:var(--button-default-height,44px);line-height:20px;line-height:var(--button-line-height,20px);font-size:16px;font-size:var(--button-default-font-size,16px);transition:opacity .2s;transition:opacity var(--animation-duration-fast,.2s);border-radius:2px;border-radius:var(--button-border-radius,2px)}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:" ";background-color:#000;background-color:var(--black,#000);border-color:#000;border-color:var(--black,#000)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#323233;color:var(--button-default-color,#323233);background:#fff;background:var(--button-default-background-color,#fff);border:1px solid #ebedf0;border:var(--button-border-width,1px) solid var(--button-default-border-color,#ebedf0)}.van-button--primary{color:#fff;color:var(--button-primary-color,#fff);background:#07c160;background:var(--button-primary-background-color,#07c160);border:1px solid #07c160;border:var(--button-border-width,1px) solid var(--button-primary-border-color,#07c160)}.van-button--info{color:#fff;color:var(--button-info-color,#fff);background:#1989fa;background:var(--button-info-background-color,#1989fa);border:1px solid #1989fa;border:var(--button-border-width,1px) solid var(--button-info-border-color,#1989fa)}.van-button--danger{color:#fff;color:var(--button-danger-color,#fff);background:#ee0a24;background:var(--button-danger-background-color,#ee0a24);border:1px solid #ee0a24;border:var(--button-border-width,1px) solid var(--button-danger-border-color,#ee0a24)}.van-button--warning{color:#fff;color:var(--button-warning-color,#fff);background:#ff976a;background:var(--button-warning-background-color,#ff976a);border:1px solid #ff976a;border:var(--button-border-width,1px) solid var(--button-warning-border-color,#ff976a)}.van-button--plain{background:#fff;background:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:#07c160;color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:#1989fa;color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:#ee0a24;color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:#ff976a;color:var(--button-warning-background-color,#ff976a)}.van-button--large{width:100%;height:50px;height:var(--button-large-height,50px)}.van-button--normal{padding:0 15px;font-size:14px;font-size:var(--button-normal-font-size,14px)}.van-button--small{min-width:60px;min-width:var(--button-small-min-width,60px);height:30px;height:var(--button-small-height,30px);padding:0 8px;padding:0 var(--padding-xs,8px);font-size:12px;font-size:var(--button-small-font-size,12px)}.van-button--mini{display:inline-block;min-width:50px;min-width:var(--button-mini-min-width,50px);height:22px;height:var(--button-mini-height,22px);font-size:10px;font-size:var(--button-mini-font-size,10px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:-webkit-flex;display:flex;width:100%}.van-button--round{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5;opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{min-width:1em;line-height:inherit!important;vertical-align:top}.van-button--hairline{padding-top:1px;border-width:0}.van-button--hairline:after{border-color:inherit;border-width:1px;border-radius:4px;border-radius:calc(var(--button-border-radius, 2px)*2)}.van-button--hairline.van-button--round:after{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0} \ No newline at end of file diff --git a/vant/dist/calendar/calendar.wxml b/vant/dist/calendar/calendar.wxml new file mode 100755 index 0000000..26938c1 --- /dev/null +++ b/vant/dist/calendar/calendar.wxml @@ -0,0 +1,65 @@ + +
+ +
+ + + + + + + + + + + + {{ + computed.getButtonDisabled(type, currentDate) + ? confirmDisabledText + : confirmText + }} + + +
diff --git a/vant/dist/calendar/components/header/index.d.ts b/vant/dist/calendar/components/header/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/calendar/components/header/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/calendar/components/header/index.js b/vant/dist/calendar/components/header/index.js new file mode 100755 index 0000000..bf9243f --- /dev/null +++ b/vant/dist/calendar/components/header/index.js @@ -0,0 +1,16 @@ +import { VantComponent } from '../../../common/component'; +VantComponent({ + props: { + title: { + type: String, + value: '日期选择', + }, + subtitle: String, + showTitle: Boolean, + showSubtitle: Boolean, + }, + data: { + weekdays: ['日', '一', '二', '三', '四', '五', '六'], + }, + methods: {}, +}); diff --git a/vant/dist/calendar/components/header/index.json b/vant/dist/calendar/components/header/index.json new file mode 100755 index 0000000..467ce29 --- /dev/null +++ b/vant/dist/calendar/components/header/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/vant/dist/calendar/components/header/index.wxml b/vant/dist/calendar/components/header/index.wxml new file mode 100755 index 0000000..eb8e4b4 --- /dev/null +++ b/vant/dist/calendar/components/header/index.wxml @@ -0,0 +1,16 @@ + + + + {{ title }} + + + + {{ subtitle }} + + + + + {{ item }} + + + diff --git a/vant/dist/calendar/components/header/index.wxss b/vant/dist/calendar/components/header/index.wxss new file mode 100755 index 0000000..4075e48 --- /dev/null +++ b/vant/dist/calendar/components/header/index.wxss @@ -0,0 +1 @@ +@import '../../../common/index.wxss';.van-calendar__header{-webkit-flex-shrink:0;flex-shrink:0;box-shadow:0 2px 10px rgba(125,126,128,.16);box-shadow:var(--calendar-header-box-shadow,0 2px 10px rgba(125,126,128,.16))}.van-calendar__header-subtitle,.van-calendar__header-title{text-align:center;height:44px;height:var(--calendar-header-title-height,44px);font-weight:500;font-weight:var(--font-weight-bold,500);line-height:44px;line-height:var(--calendar-header-title-height,44px)}.van-calendar__header-title+.van-calendar__header-title,.van-calendar__header-title:empty{display:none}.van-calendar__header-title:empty+.van-calendar__header-title{display:block!important}.van-calendar__weekdays{display:-webkit-flex;display:flex}.van-calendar__weekday{-webkit-flex:1;flex:1;text-align:center;font-size:12px;font-size:var(--calendar-weekdays-font-size,12px);line-height:30px;line-height:var(--calendar-weekdays-height,30px)} \ No newline at end of file diff --git a/vant/dist/calendar/components/month/index.d.ts b/vant/dist/calendar/components/month/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/calendar/components/month/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/calendar/components/month/index.js b/vant/dist/calendar/components/month/index.js new file mode 100755 index 0000000..4c872a9 --- /dev/null +++ b/vant/dist/calendar/components/month/index.js @@ -0,0 +1,157 @@ +import { VantComponent } from '../../../common/component'; +import { + getMonthEndDay, + compareDay, + getPrevDay, + getNextDay, +} from '../../utils'; +VantComponent({ + props: { + date: { + type: null, + observer: 'setDays', + }, + type: { + type: String, + observer: 'setDays', + }, + color: String, + minDate: { + type: null, + observer: 'setDays', + }, + maxDate: { + type: null, + observer: 'setDays', + }, + showMark: Boolean, + rowHeight: null, + formatter: { + type: null, + observer: 'setDays', + }, + currentDate: { + type: null, + observer: 'setDays', + }, + allowSameDay: Boolean, + showSubtitle: Boolean, + showMonthTitle: Boolean, + }, + data: { + visible: true, + days: [], + }, + methods: { + onClick(event) { + const { index } = event.currentTarget.dataset; + const item = this.data.days[index]; + if (item.type !== 'disabled') { + this.$emit('click', item); + } + }, + setDays() { + const days = []; + const startDate = new Date(this.data.date); + const year = startDate.getFullYear(); + const month = startDate.getMonth(); + const totalDay = getMonthEndDay( + startDate.getFullYear(), + startDate.getMonth() + 1 + ); + for (let day = 1; day <= totalDay; day++) { + const date = new Date(year, month, day); + const type = this.getDayType(date); + let config = { + date, + type, + text: day, + bottomInfo: this.getBottomInfo(type), + }; + if (this.data.formatter) { + config = this.data.formatter(config); + } + days.push(config); + } + this.setData({ days }); + }, + getMultipleDayType(day) { + const { currentDate } = this.data; + if (!Array.isArray(currentDate)) { + return ''; + } + const isSelected = (date) => + currentDate.some((item) => compareDay(item, date) === 0); + if (isSelected(day)) { + const prevDay = getPrevDay(day); + const nextDay = getNextDay(day); + const prevSelected = isSelected(prevDay); + const nextSelected = isSelected(nextDay); + if (prevSelected && nextSelected) { + return 'multiple-middle'; + } + if (prevSelected) { + return 'end'; + } + return nextSelected ? 'start' : 'multiple-selected'; + } + return ''; + }, + getRangeDayType(day) { + const { currentDate, allowSameDay } = this.data; + if (!Array.isArray(currentDate)) { + return; + } + const [startDay, endDay] = currentDate; + if (!startDay) { + return; + } + const compareToStart = compareDay(day, startDay); + if (!endDay) { + return compareToStart === 0 ? 'start' : ''; + } + const compareToEnd = compareDay(day, endDay); + if (compareToStart === 0 && compareToEnd === 0 && allowSameDay) { + return 'start-end'; + } + if (compareToStart === 0) { + return 'start'; + } + if (compareToEnd === 0) { + return 'end'; + } + if (compareToStart > 0 && compareToEnd < 0) { + return 'middle'; + } + }, + getDayType(day) { + const { type, minDate, maxDate, currentDate } = this.data; + if (compareDay(day, minDate) < 0 || compareDay(day, maxDate) > 0) { + return 'disabled'; + } + if (type === 'single') { + return compareDay(day, currentDate) === 0 ? 'selected' : ''; + } + if (type === 'multiple') { + return this.getMultipleDayType(day); + } + /* istanbul ignore else */ + if (type === 'range') { + return this.getRangeDayType(day); + } + }, + getBottomInfo(type) { + if (this.data.type === 'range') { + if (type === 'start') { + return '开始'; + } + if (type === 'end') { + return '结束'; + } + if (type === 'start-end') { + return '开始/结束'; + } + } + }, + }, +}); diff --git a/vant/dist/calendar/components/month/index.json b/vant/dist/calendar/components/month/index.json new file mode 100755 index 0000000..467ce29 --- /dev/null +++ b/vant/dist/calendar/components/month/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/vant/dist/calendar/components/month/index.wxml b/vant/dist/calendar/components/month/index.wxml new file mode 100755 index 0000000..55bab83 --- /dev/null +++ b/vant/dist/calendar/components/month/index.wxml @@ -0,0 +1,39 @@ + + + + + + {{ computed.formatMonthTitle(date) }} + + + + + {{ computed.getMark(date) }} + + + + + {{ item.topInfo }} + {{ item.text }} + + {{ item.bottomInfo }} + + + + + {{ item.topInfo }} + {{ item.text }} + + {{ item.bottomInfo }} + + + + + diff --git a/vant/dist/calendar/components/month/index.wxs b/vant/dist/calendar/components/month/index.wxs new file mode 100755 index 0000000..a057079 --- /dev/null +++ b/vant/dist/calendar/components/month/index.wxs @@ -0,0 +1,67 @@ +/* eslint-disable */ +var utils = require('../../utils.wxs'); + +function getMark(date) { + return getDate(date).getMonth() + 1; +} + +var ROW_HEIGHT = 64; + +function getDayStyle(type, index, date, rowHeight, color) { + var style = []; + var offset = getDate(date).getDay(); + + if (index === 0) { + style.push(['margin-left', (100 * offset) / 7 + '%']); + } + + if (rowHeight !== ROW_HEIGHT) { + style.push(['height', rowHeight + 'px']); + } + + if (color) { + if ( + type === 'start' || + type === 'end' || + type === 'multiple-selected' || + type === 'multiple-middle' + ) { + style.push(['background', color]); + } else if (type === 'middle') { + style.push(['color', color]); + } + } + + return style + .map(function(item) { + return item.join(':'); + }) + .join(';'); +} + +function formatMonthTitle(date) { + date = getDate(date); + return date.getFullYear() + '年' + (date.getMonth() + 1) + '月'; +} + +function getMonthStyle(visible, date, rowHeight) { + if (!visible) { + date = getDate(date); + + var totalDay = utils.getMonthEndDay( + date.getFullYear(), + date.getMonth() + 1 + ); + var offset = getDate(date).getDay(); + var padding = Math.ceil((totalDay + offset) / 7) * rowHeight; + + return 'padding-bottom:' + padding + 'px'; + } +} + +module.exports = { + getMark: getMark, + getDayStyle: getDayStyle, + formatMonthTitle: formatMonthTitle, + getMonthStyle: getMonthStyle +}; diff --git a/vant/dist/calendar/components/month/index.wxss b/vant/dist/calendar/components/month/index.wxss new file mode 100755 index 0000000..17c12f4 --- /dev/null +++ b/vant/dist/calendar/components/month/index.wxss @@ -0,0 +1 @@ +@import '../../../common/index.wxss';.van-calendar{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;height:100%;background-color:#fff;background-color:var(--calendar-background-color,#fff)}.van-calendar__month-title{text-align:center;height:44px;height:var(--calendar-header-title-height,44px);font-weight:500;font-weight:var(--font-weight-bold,500);font-size:14px;font-size:var(--calendar-month-title-font-size,14px);line-height:44px;line-height:var(--calendar-header-title-height,44px)}.van-calendar__days{position:relative;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);pointer-events:none;color:rgba(242,243,245,.8);color:var(--calendar-month-mark-color,rgba(242,243,245,.8));font-size:160px;font-size:var(--calendar-month-mark-font-size,160px)}.van-calendar__day,.van-calendar__selected-day{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:64px;height:var(--calendar-day-height,64px);font-size:16px;font-size:var(--calendar-day-font-size,16px)}.van-calendar__day--end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected,.van-calendar__day--start,.van-calendar__day--start-end{color:#fff;color:var(--calendar-range-edge-color,#fff);background-color:#ee0a24;background-color:var(--calendar-range-edge-background-color,#ee0a24)}.van-calendar__day--start{border-radius:4px 0 0 4px;border-radius:var(--border-radius-md,4px) 0 0 var(--border-radius-md,4px)}.van-calendar__day--end{border-radius:0 4px 4px 0;border-radius:0 var(--border-radius-md,4px) var(--border-radius-md,4px) 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:4px;border-radius:var(--border-radius-md,4px)}.van-calendar__day--middle{color:#ee0a24;color:var(--calendar-range-middle-color,#ee0a24)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;content:"";opacity:.1;opacity:var(--calendar-range-middle-background-opacity,.1)}.van-calendar__day--disabled{cursor:default;color:#c8c9cc;color:var(--calendar-day-disabled-color,#c8c9cc)}.van-calendar__bottom-info,.van-calendar__top-info{position:absolute;right:0;left:0;font-size:10px;font-size:var(--calendar-info-font-size,10px);line-height:14px;line-height:var(--calendar-info-line-height,14px)}@media (max-width:350px){.van-calendar__bottom-info,.van-calendar__top-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:54px;width:var(--calendar-selected-day-size,54px);height:54px;height:var(--calendar-selected-day-size,54px);color:#fff;color:var(--calendar-selected-day-color,#fff);background-color:#ee0a24;background-color:var(--calendar-selected-day-background-color,#ee0a24);border-radius:4px;border-radius:var(--border-radius-md,4px)} \ No newline at end of file diff --git a/vant/dist/calendar/index.d.ts b/vant/dist/calendar/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/calendar/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/calendar/index.js b/vant/dist/calendar/index.js new file mode 100755 index 0000000..d7b7f27 --- /dev/null +++ b/vant/dist/calendar/index.js @@ -0,0 +1,297 @@ +import { VantComponent } from '../common/component'; +import { + ROW_HEIGHT, + getNextDay, + compareDay, + copyDates, + calcDateNum, + formatMonthTitle, + compareMonth, + getMonths, + getDayByOffset, +} from './utils'; +import Toast from '../toast/toast'; +import { requestAnimationFrame } from '../common/utils'; +VantComponent({ + props: { + title: { + type: String, + value: '日期选择', + }, + color: String, + show: { + type: Boolean, + observer(val) { + if (val) { + this.initRect(); + this.scrollIntoView(); + } + }, + }, + formatter: null, + confirmText: { + type: String, + value: '确定', + }, + rangePrompt: String, + defaultDate: { + type: null, + observer(val) { + this.setData({ currentDate: val }); + this.scrollIntoView(); + }, + }, + allowSameDay: Boolean, + confirmDisabledText: String, + type: { + type: String, + value: 'single', + observer: 'reset', + }, + minDate: { + type: null, + value: Date.now(), + }, + maxDate: { + type: null, + value: new Date( + new Date().getFullYear(), + new Date().getMonth() + 6, + new Date().getDate() + ).getTime(), + }, + position: { + type: String, + value: 'bottom', + }, + rowHeight: { + type: null, + value: ROW_HEIGHT, + }, + round: { + type: Boolean, + value: true, + }, + poppable: { + type: Boolean, + value: true, + }, + showMark: { + type: Boolean, + value: true, + }, + showTitle: { + type: Boolean, + value: true, + }, + showConfirm: { + type: Boolean, + value: true, + }, + showSubtitle: { + type: Boolean, + value: true, + }, + safeAreaInsetBottom: { + type: Boolean, + value: true, + }, + closeOnClickOverlay: { + type: Boolean, + value: true, + }, + maxRange: { + type: null, + value: null, + }, + }, + data: { + subtitle: '', + currentDate: null, + scrollIntoView: '', + }, + created() { + this.setData({ + currentDate: this.getInitialDate(), + }); + }, + mounted() { + if (this.data.show || !this.data.poppable) { + this.initRect(); + this.scrollIntoView(); + } + }, + methods: { + reset() { + this.setData({ currentDate: this.getInitialDate() }); + this.scrollIntoView(); + }, + initRect() { + if (this.contentObserver != null) { + this.contentObserver.disconnect(); + } + const contentObserver = this.createIntersectionObserver({ + thresholds: [0, 0.1, 0.9, 1], + observeAll: true, + }); + this.contentObserver = contentObserver; + contentObserver.relativeTo('.van-calendar__body'); + contentObserver.observe('.month', (res) => { + if (res.boundingClientRect.top <= res.relativeRect.top) { + // @ts-ignore + this.setData({ subtitle: formatMonthTitle(res.dataset.date) }); + } + }); + }, + getInitialDate() { + const { type, defaultDate, minDate } = this.data; + if (type === 'range') { + const [startDay, endDay] = defaultDate || []; + return [ + startDay || minDate, + endDay || getNextDay(new Date(minDate)).getTime(), + ]; + } + if (type === 'multiple') { + return defaultDate || [minDate]; + } + return defaultDate || minDate; + }, + scrollIntoView() { + requestAnimationFrame(() => { + const { + currentDate, + type, + show, + poppable, + minDate, + maxDate, + } = this.data; + // @ts-ignore + const targetDate = type === 'single' ? currentDate : currentDate[0]; + const displayed = show || !poppable; + if (!targetDate || !displayed) { + return; + } + const months = getMonths(minDate, maxDate); + months.some((month, index) => { + if (compareMonth(month, targetDate) === 0) { + this.setData({ scrollIntoView: `month${index}` }); + return true; + } + return false; + }); + }); + }, + onOpen() { + this.$emit('open'); + }, + onOpened() { + this.$emit('opened'); + }, + onClose() { + this.$emit('close'); + }, + onClosed() { + this.$emit('closed'); + }, + onClickDay(event) { + const { date } = event.detail; + const { type, currentDate, allowSameDay } = this.data; + if (type === 'range') { + // @ts-ignore + const [startDay, endDay] = currentDate; + if (startDay && !endDay) { + const compareToStart = compareDay(date, startDay); + if (compareToStart === 1) { + this.select([startDay, date], true); + } else if (compareToStart === -1) { + this.select([date, null]); + } else if (allowSameDay) { + this.select([date, date]); + } + } else { + this.select([date, null]); + } + } else if (type === 'multiple') { + let selectedIndex; + // @ts-ignore + const selected = currentDate.some((dateItem, index) => { + const equal = compareDay(dateItem, date) === 0; + if (equal) { + selectedIndex = index; + } + return equal; + }); + if (selected) { + // @ts-ignore + const cancelDate = currentDate.splice(selectedIndex, 1); + this.setData({ currentDate }); + this.unselect(cancelDate); + } else { + // @ts-ignore + this.select([...currentDate, date]); + } + } else { + this.select(date, true); + } + }, + unselect(dateArray) { + const date = dateArray[0]; + if (date) { + this.$emit('unselect', copyDates(date)); + } + }, + select(date, complete) { + if (complete && this.data.type === 'range') { + const valid = this.checkRange(date); + if (!valid) { + // auto selected to max range if showConfirm + if (this.data.showConfirm) { + this.emit([ + date[0], + getDayByOffset(date[0], this.data.maxRange - 1), + ]); + } else { + this.emit(date); + } + return; + } + } + this.emit(date); + if (complete && !this.data.showConfirm) { + this.onConfirm(); + } + }, + emit(date) { + const getTime = (date) => (date instanceof Date ? date.getTime() : date); + this.setData({ + currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date), + }); + this.$emit('select', copyDates(date)); + }, + checkRange(date) { + const { maxRange, rangePrompt } = this.data; + if (maxRange && calcDateNum(date) > maxRange) { + Toast({ + context: this, + message: rangePrompt || `选择天数不能超过 ${maxRange} 天`, + }); + return false; + } + return true; + }, + onConfirm() { + if ( + this.data.type === 'range' && + !this.checkRange(this.data.currentDate) + ) { + return; + } + wx.nextTick(() => { + // @ts-ignore + this.$emit('confirm', copyDates(this.data.currentDate)); + }); + }, + }, +}); diff --git a/vant/dist/calendar/index.json b/vant/dist/calendar/index.json new file mode 100755 index 0000000..397d5ae --- /dev/null +++ b/vant/dist/calendar/index.json @@ -0,0 +1,10 @@ +{ + "component": true, + "usingComponents": { + "header": "./components/header/index", + "month": "./components/month/index", + "van-button": "../button/index", + "van-popup": "../popup/index", + "van-toast": "../toast/index" + } +} diff --git a/vant/dist/calendar/index.wxml b/vant/dist/calendar/index.wxml new file mode 100755 index 0000000..7df0b98 --- /dev/null +++ b/vant/dist/calendar/index.wxml @@ -0,0 +1,25 @@ + + + + + + + + + + + + diff --git a/vant/dist/calendar/index.wxs b/vant/dist/calendar/index.wxs new file mode 100755 index 0000000..2c04be1 --- /dev/null +++ b/vant/dist/calendar/index.wxs @@ -0,0 +1,37 @@ +/* eslint-disable */ +var utils = require('./utils.wxs'); + +function getMonths(minDate, maxDate) { + var months = []; + var cursor = getDate(minDate); + + cursor.setDate(1); + + do { + months.push(cursor.getTime()); + cursor.setMonth(cursor.getMonth() + 1); + } while (utils.compareMonth(cursor, getDate(maxDate)) !== 1); + + return months; +} + +function getButtonDisabled(type, currentDate) { + if (currentDate == null) { + return true; + } + + if (type === 'range') { + return !currentDate[0] || !currentDate[1]; + } + + if (type === 'multiple') { + return !currentDate.length; + } + + return !currentDate; +} + +module.exports = { + getMonths: getMonths, + getButtonDisabled: getButtonDisabled +}; diff --git a/vant/dist/calendar/index.wxss b/vant/dist/calendar/index.wxss new file mode 100755 index 0000000..9d78e0f --- /dev/null +++ b/vant/dist/calendar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-calendar{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;height:100%;height:var(--calendar-height,100%);background-color:#fff;background-color:var(--calendar-background-color,#fff)}.van-calendar__close-icon{top:11px}.van-calendar__popup--bottom,.van-calendar__popup--top{height:80%;height:var(--calendar-popup-height,80%)}.van-calendar__popup--left,.van-calendar__popup--right{height:100%}.van-calendar__body{-webkit-flex:1;flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__footer{-webkit-flex-shrink:0;flex-shrink:0;padding:0 16px;padding:0 var(--padding-md,16px)}.van-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer+.van-calendar__footer,.van-calendar__footer:empty{display:none}.van-calendar__footer:empty+.van-calendar__footer{display:block!important}.van-calendar__confirm{height:36px!important;height:var(--calendar-confirm-button-height,36px)!important;margin:7px 0!important;margin:var(--calendar-confirm-button-margin,7px 0)!important;line-height:34px!important;line-height:var(--calendar-confirm-button-line-height,34px)!important} \ No newline at end of file diff --git a/vant/dist/calendar/utils.d.ts b/vant/dist/calendar/utils.d.ts new file mode 100755 index 0000000..02af08d --- /dev/null +++ b/vant/dist/calendar/utils.d.ts @@ -0,0 +1,17 @@ +export declare const ROW_HEIGHT = 64; +export declare function formatMonthTitle(date: Date): string; +export declare function compareMonth( + date1: Date | number, + date2: Date | number +): 0 | 1 | -1; +export declare function compareDay( + day1: Date | number, + day2: Date | number +): 0 | 1 | -1; +export declare function getDayByOffset(date: Date, offset: number): Date; +export declare function getPrevDay(date: Date): Date; +export declare function getNextDay(date: Date): Date; +export declare function calcDateNum(date: [Date, Date]): number; +export declare function copyDates(dates: Date | Date[]): Date | Date[]; +export declare function getMonthEndDay(year: number, month: number): number; +export declare function getMonths(minDate: number, maxDate: number): number[]; diff --git a/vant/dist/calendar/utils.js b/vant/dist/calendar/utils.js new file mode 100755 index 0000000..281a35c --- /dev/null +++ b/vant/dist/calendar/utils.js @@ -0,0 +1,78 @@ +export const ROW_HEIGHT = 64; +export function formatMonthTitle(date) { + if (!(date instanceof Date)) { + date = new Date(date); + } + return `${date.getFullYear()}年${date.getMonth() + 1}月`; +} +export function compareMonth(date1, date2) { + if (!(date1 instanceof Date)) { + date1 = new Date(date1); + } + if (!(date2 instanceof Date)) { + date2 = new Date(date2); + } + const year1 = date1.getFullYear(); + const year2 = date2.getFullYear(); + const month1 = date1.getMonth(); + const month2 = date2.getMonth(); + if (year1 === year2) { + return month1 === month2 ? 0 : month1 > month2 ? 1 : -1; + } + return year1 > year2 ? 1 : -1; +} +export function compareDay(day1, day2) { + if (!(day1 instanceof Date)) { + day1 = new Date(day1); + } + if (!(day2 instanceof Date)) { + day2 = new Date(day2); + } + const compareMonthResult = compareMonth(day1, day2); + if (compareMonthResult === 0) { + const date1 = day1.getDate(); + const date2 = day2.getDate(); + return date1 === date2 ? 0 : date1 > date2 ? 1 : -1; + } + return compareMonthResult; +} +export function getDayByOffset(date, offset) { + date = new Date(date); + date.setDate(date.getDate() + offset); + return date; +} +export function getPrevDay(date) { + return getDayByOffset(date, -1); +} +export function getNextDay(date) { + return getDayByOffset(date, 1); +} +export function calcDateNum(date) { + const day1 = new Date(date[0]).getTime(); + const day2 = new Date(date[1]).getTime(); + return (day2 - day1) / (1000 * 60 * 60 * 24) + 1; +} +export function copyDates(dates) { + if (Array.isArray(dates)) { + return dates.map((date) => { + if (date === null) { + return date; + } + return new Date(date); + }); + } + return new Date(dates); +} +export function getMonthEndDay(year, month) { + return 32 - new Date(year, month - 1, 32).getDate(); +} +export function getMonths(minDate, maxDate) { + const months = []; + const cursor = new Date(minDate); + cursor.setDate(1); + do { + months.push(cursor.getTime()); + cursor.setMonth(cursor.getMonth() + 1); + } while (compareMonth(cursor, maxDate) !== 1); + return months; +} diff --git a/vant/dist/calendar/utils.wxs b/vant/dist/calendar/utils.wxs new file mode 100755 index 0000000..e57f6b3 --- /dev/null +++ b/vant/dist/calendar/utils.wxs @@ -0,0 +1,25 @@ +/* eslint-disable */ +function getMonthEndDay(year, month) { + return 32 - getDate(year, month - 1, 32).getDate(); +} + +function compareMonth(date1, date2) { + date1 = getDate(date1); + date2 = getDate(date2); + + var year1 = date1.getFullYear(); + var year2 = date2.getFullYear(); + var month1 = date1.getMonth(); + var month2 = date2.getMonth(); + + if (year1 === year2) { + return month1 === month2 ? 0 : month1 > month2 ? 1 : -1; + } + + return year1 > year2 ? 1 : -1; +} + +module.exports = { + getMonthEndDay: getMonthEndDay, + compareMonth: compareMonth +}; diff --git a/vant/dist/card/index.d.ts b/vant/dist/card/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/card/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/card/index.js b/vant/dist/card/index.js new file mode 100755 index 0000000..6aaf99f --- /dev/null +++ b/vant/dist/card/index.js @@ -0,0 +1,49 @@ +import { link } from '../mixins/link'; +import { VantComponent } from '../common/component'; +VantComponent({ + classes: [ + 'num-class', + 'desc-class', + 'thumb-class', + 'title-class', + 'price-class', + 'origin-price-class', + ], + mixins: [link], + props: { + tag: String, + num: String, + desc: String, + thumb: String, + title: String, + price: { + type: String, + observer: 'updatePrice', + }, + centered: Boolean, + lazyLoad: Boolean, + thumbLink: String, + originPrice: String, + thumbMode: { + type: String, + value: 'aspectFit', + }, + currency: { + type: String, + value: '¥', + }, + }, + methods: { + updatePrice() { + const { price } = this.data; + const priceArr = price.toString().split('.'); + this.setData({ + integerStr: priceArr[0], + decimalStr: priceArr[1] ? `.${priceArr[1]}` : '', + }); + }, + onClickThumb() { + this.jumpLink('thumbLink'); + }, + }, +}); diff --git a/vant/dist/card/index.json b/vant/dist/card/index.json new file mode 100755 index 0000000..e917407 --- /dev/null +++ b/vant/dist/card/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-tag": "../tag/index" + } +} diff --git a/vant/dist/card/index.wxml b/vant/dist/card/index.wxml new file mode 100755 index 0000000..62173e4 --- /dev/null +++ b/vant/dist/card/index.wxml @@ -0,0 +1,56 @@ + + + + + + + + + {{ tag }} + + + + + + + {{ title }} + + + {{ desc }} + + + + + + + + + {{ currency }} + {{ integerStr }} + {{ decimalStr }} + + + {{ currency }} {{ originPrice }} + + x {{ num }} + + + + + + + + + + diff --git a/vant/dist/card/index.wxss b/vant/dist/card/index.wxss new file mode 100755 index 0000000..a21a599 --- /dev/null +++ b/vant/dist/card/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-card{position:relative;box-sizing:border-box;padding:8px 16px;padding:var(--card-padding,8px 16px);font-size:12px;font-size:var(--card-font-size,12px);color:#323233;color:var(--card-text-color,#323233);background-color:#fafafa;background-color:var(--card-background-color,#fafafa)}.van-card__header{display:-webkit-flex;display:flex}.van-card__header--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:relative;-webkit-flex:none;flex:none;width:88px;width:var(--card-thumb-size,88px);height:88px;height:var(--card-thumb-size,88px);margin-right:8px;margin-right:var(--padding-xs,8px)}.van-card__thumb:empty{display:none}.van-card__img{width:100%;height:100%;border-radius:8px;border-radius:var(--border-radius-lg,8px)}.van-card__content{position:relative;display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:space-between;justify-content:space-between;min-width:0;min-height:88px;min-height:var(--card-thumb-size,88px)}.van-card__content--center{-webkit-justify-content:center;justify-content:center}.van-card__desc,.van-card__title{word-wrap:break-word}.van-card__title{font-weight:700;line-height:16px;line-height:var(--card-title-line-height,16px)}.van-card__desc{line-height:20px;line-height:var(--card-desc-line-height,20px);color:#646566;color:var(--card-desc-color,#646566)}.van-card__bottom{line-height:20px}.van-card__price{display:inline-block;font-weight:700;color:#ee0a24;color:var(--card-price-color,#ee0a24);font-size:12px;font-size:var(--card-price-font-size,12px)}.van-card__price-integer{font-size:16px;font-size:var(--card-price-integer-font-size,16px)}.van-card__price-decimal,.van-card__price-integer{font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif;font-family:var(--card-price-font-family,Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif)}.van-card__origin-price{display:inline-block;margin-left:5px;text-decoration:line-through;font-size:10px;font-size:var(--card-origin-price-font-size,10px);color:#646566;color:var(--card-origin-price-color,#646566)}.van-card__num{float:right}.van-card__tag{position:absolute!important;top:2px;left:0}.van-card__footer{-webkit-flex:none;flex:none;width:100%;text-align:right} \ No newline at end of file diff --git a/vant/dist/cell-group/index.d.ts b/vant/dist/cell-group/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/cell-group/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/cell-group/index.js b/vant/dist/cell-group/index.js new file mode 100755 index 0000000..99bcdb9 --- /dev/null +++ b/vant/dist/cell-group/index.js @@ -0,0 +1,10 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + title: String, + border: { + type: Boolean, + value: true, + }, + }, +}); diff --git a/vant/dist/cell-group/index.json b/vant/dist/cell-group/index.json new file mode 100755 index 0000000..467ce29 --- /dev/null +++ b/vant/dist/cell-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/vant/dist/cell-group/index.wxml b/vant/dist/cell-group/index.wxml new file mode 100755 index 0000000..6e0b471 --- /dev/null +++ b/vant/dist/cell-group/index.wxml @@ -0,0 +1,9 @@ + + {{ title }} + + + + diff --git a/vant/dist/cell-group/index.wxss b/vant/dist/cell-group/index.wxss new file mode 100755 index 0000000..edbccd5 --- /dev/null +++ b/vant/dist/cell-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-cell-group__title{padding:16px 16px 8px;padding:var(--cell-group-title-padding,16px 16px 8px);font-size:14px;font-size:var(--cell-group-title-font-size,14px);line-height:16px;line-height:var(--cell-group-title-line-height,16px);color:#969799;color:var(--cell-group-title-color,#969799)} \ No newline at end of file diff --git a/vant/dist/cell/index.d.ts b/vant/dist/cell/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/cell/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/cell/index.js b/vant/dist/cell/index.js new file mode 100755 index 0000000..a0123d1 --- /dev/null +++ b/vant/dist/cell/index.js @@ -0,0 +1,38 @@ +import { link } from '../mixins/link'; +import { VantComponent } from '../common/component'; +VantComponent({ + classes: [ + 'title-class', + 'label-class', + 'value-class', + 'right-icon-class', + 'hover-class', + ], + mixins: [link], + props: { + title: null, + value: null, + icon: String, + size: String, + label: String, + center: Boolean, + isLink: Boolean, + required: Boolean, + clickable: Boolean, + titleWidth: String, + customStyle: String, + arrowDirection: String, + useLabelSlot: Boolean, + border: { + type: Boolean, + value: true, + }, + titleStyle: String, + }, + methods: { + onClick(event) { + this.$emit('click', event.detail); + this.jumpLink(); + }, + }, +}); diff --git a/vant/dist/cell/index.json b/vant/dist/cell/index.json new file mode 100755 index 0000000..0a336c0 --- /dev/null +++ b/vant/dist/cell/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/vant/dist/cell/index.wxml b/vant/dist/cell/index.wxml new file mode 100755 index 0000000..7d7d746 --- /dev/null +++ b/vant/dist/cell/index.wxml @@ -0,0 +1,46 @@ + + + + + + + + + {{ title }} + + + + + {{ label }} + + + + + {{ value }} + + + + + + + + diff --git a/vant/dist/cell/index.wxs b/vant/dist/cell/index.wxs new file mode 100755 index 0000000..e3500c4 --- /dev/null +++ b/vant/dist/cell/index.wxs @@ -0,0 +1,17 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function titleStyle(data) { + return style([ + { + 'max-width': addUnit(data.titleWidth), + 'min-width': addUnit(data.titleWidth), + }, + data.titleStyle, + ]); +} + +module.exports = { + titleStyle: titleStyle, +}; diff --git a/vant/dist/cell/index.wxss b/vant/dist/cell/index.wxss new file mode 100755 index 0000000..605570d --- /dev/null +++ b/vant/dist/cell/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);font-size:14px;font-size:var(--cell-font-size,14px);line-height:24px;line-height:var(--cell-line-height,24px);color:#323233;color:var(--cell-text-color,#323233);background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff;background-color:var(--cell-background-color,#fff)}.van-cell__label{margin-top:3px;margin-top:var(--cell-label-margin-top,3px);font-size:12px;font-size:var(--cell-label-font-size,12px);line-height:18px;line-height:var(--cell-label-line-height,18px);color:#969799;color:var(--cell-label-color,#969799)}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle;color:#969799;color:var(--cell-value-color,#969799)}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px;height:var(--cell-line-height,24px);font-size:16px;font-size:var(--cell-icon-size,16px)}.van-cell__left-icon-wrap{margin-right:4px;margin-right:var(--padding-base,4px)}.van-cell__right-icon-wrap{margin-left:4px;margin-left:var(--padding-base,4px);color:#969799;color:var(--cell-right-icon-color,#969799)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:24px;line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5;background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;content:"*";left:8px;left:var(--padding-xs,8px);font-size:14px;font-size:var(--cell-font-size,14px);color:#ee0a24;color:var(--cell-required-color,#ee0a24)}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-top:var(--cell-large-vertical-padding,12px);padding-bottom:12px;padding-bottom:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:16px;font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:16px;font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:14px;font-size:var(--cell-large-label-font-size,14px)} \ No newline at end of file diff --git a/vant/dist/checkbox-group/index.d.ts b/vant/dist/checkbox-group/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/checkbox-group/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/checkbox-group/index.js b/vant/dist/checkbox-group/index.js new file mode 100755 index 0000000..1c87155 --- /dev/null +++ b/vant/dist/checkbox-group/index.js @@ -0,0 +1,31 @@ +import { useChildren } from '../common/relation'; +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + relation: useChildren('checkbox', function (target) { + this.updateChild(target); + }), + props: { + max: Number, + value: { + type: Array, + observer: 'updateChildren', + }, + disabled: { + type: Boolean, + observer: 'updateChildren', + }, + }, + methods: { + updateChildren() { + this.children.forEach((child) => this.updateChild(child)); + }, + updateChild(child) { + const { value, disabled } = this.data; + child.setData({ + value: value.indexOf(child.data.name) !== -1, + parentDisabled: disabled, + }); + }, + }, +}); diff --git a/vant/dist/checkbox-group/index.json b/vant/dist/checkbox-group/index.json new file mode 100755 index 0000000..467ce29 --- /dev/null +++ b/vant/dist/checkbox-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/vant/dist/checkbox-group/index.wxml b/vant/dist/checkbox-group/index.wxml new file mode 100755 index 0000000..4fa864c --- /dev/null +++ b/vant/dist/checkbox-group/index.wxml @@ -0,0 +1 @@ + diff --git a/vant/dist/checkbox-group/index.wxss b/vant/dist/checkbox-group/index.wxss new file mode 100755 index 0000000..99694d6 --- /dev/null +++ b/vant/dist/checkbox-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/vant/dist/checkbox/index.d.ts b/vant/dist/checkbox/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/checkbox/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/checkbox/index.js b/vant/dist/checkbox/index.js new file mode 100755 index 0000000..281f69a --- /dev/null +++ b/vant/dist/checkbox/index.js @@ -0,0 +1,74 @@ +import { useParent } from '../common/relation'; +import { VantComponent } from '../common/component'; +function emit(target, value) { + target.$emit('input', value); + target.$emit('change', value); +} +VantComponent({ + field: true, + relation: useParent('checkbox-group'), + classes: ['icon-class', 'label-class'], + props: { + value: Boolean, + disabled: Boolean, + useIconSlot: Boolean, + checkedColor: String, + labelPosition: { + type: String, + value: 'right', + }, + labelDisabled: Boolean, + shape: { + type: String, + value: 'round', + }, + iconSize: { + type: null, + value: 20, + }, + }, + data: { + parentDisabled: false, + }, + methods: { + emitChange(value) { + if (this.parent) { + this.setParentValue(this.parent, value); + } else { + emit(this, value); + } + }, + toggle() { + const { parentDisabled, disabled, value } = this.data; + if (!disabled && !parentDisabled) { + this.emitChange(!value); + } + }, + onClickLabel() { + const { labelDisabled, parentDisabled, disabled, value } = this.data; + if (!disabled && !labelDisabled && !parentDisabled) { + this.emitChange(!value); + } + }, + setParentValue(parent, value) { + const parentValue = parent.data.value.slice(); + const { name } = this.data; + const { max } = parent.data; + if (value) { + if (max && parentValue.length >= max) { + return; + } + if (parentValue.indexOf(name) === -1) { + parentValue.push(name); + emit(parent, parentValue); + } + } else { + const index = parentValue.indexOf(name); + if (index !== -1) { + parentValue.splice(index, 1); + emit(parent, parentValue); + } + } + }, + }, +}); diff --git a/vant/dist/checkbox/index.json b/vant/dist/checkbox/index.json new file mode 100755 index 0000000..0a336c0 --- /dev/null +++ b/vant/dist/checkbox/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/vant/dist/checkbox/index.wxml b/vant/dist/checkbox/index.wxml new file mode 100755 index 0000000..0c008d8 --- /dev/null +++ b/vant/dist/checkbox/index.wxml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + diff --git a/vant/dist/checkbox/index.wxs b/vant/dist/checkbox/index.wxs new file mode 100755 index 0000000..eb9c772 --- /dev/null +++ b/vant/dist/checkbox/index.wxs @@ -0,0 +1,20 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) { + var styles = { + 'font-size': addUnit(iconSize), + }; + + if (checkedColor && value && !disabled && !parentDisabled) { + styles['border-color'] = checkedColor; + styles['background-color'] = checkedColor; + } + + return style(styles); +} + +module.exports = { + iconStyle: iconStyle, +}; diff --git a/vant/dist/checkbox/index.wxss b/vant/dist/checkbox/index.wxss new file mode 100755 index 0000000..afaf37b --- /dev/null +++ b/vant/dist/checkbox/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px;line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;font-size:20px;font-size:var(--checkbox-size,20px);border:1px solid #c8c9cc;border:1px solid var(--checkbox-border-color,#c8c9cc);transition-duration:.2s;transition-duration:var(--checkbox-transition-duration,.2s)}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--checkbox-checked-icon-color,#1989fa)}.van-checkbox__icon--disabled{background-color:#ebedf0;background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c8c9cc;color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;margin-left:10px;margin-left:var(--checkbox-label-margin,10px);color:#323233;color:var(--checkbox-label-color,#323233)}.van-checkbox__label--left{float:left;margin:0 10px 0 0;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:#c8c9cc;color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0} \ No newline at end of file diff --git a/vant/dist/circle/canvas.d.ts b/vant/dist/circle/canvas.d.ts new file mode 100755 index 0000000..6aa52de --- /dev/null +++ b/vant/dist/circle/canvas.d.ts @@ -0,0 +1,6 @@ +/// +declare type CanvasContext = WechatMiniprogram.CanvasContext; +export declare function adaptor( + ctx: CanvasContext & Record +): CanvasContext; +export {}; diff --git a/vant/dist/circle/canvas.js b/vant/dist/circle/canvas.js new file mode 100755 index 0000000..c311335 --- /dev/null +++ b/vant/dist/circle/canvas.js @@ -0,0 +1,43 @@ +export function adaptor(ctx) { + // @ts-ignore + return Object.assign(ctx, { + setStrokeStyle(val) { + ctx.strokeStyle = val; + }, + setLineWidth(val) { + ctx.lineWidth = val; + }, + setLineCap(val) { + ctx.lineCap = val; + }, + setFillStyle(val) { + ctx.fillStyle = val; + }, + setFontSize(val) { + ctx.font = String(val); + }, + setGlobalAlpha(val) { + ctx.globalAlpha = val; + }, + setLineJoin(val) { + ctx.lineJoin = val; + }, + setTextAlign(val) { + ctx.textAlign = val; + }, + setMiterLimit(val) { + ctx.miterLimit = val; + }, + setShadow(offsetX, offsetY, blur, color) { + ctx.shadowOffsetX = offsetX; + ctx.shadowOffsetY = offsetY; + ctx.shadowBlur = blur; + ctx.shadowColor = color; + }, + setTextBaseline(val) { + ctx.textBaseline = val; + }, + createCircularGradient() {}, + draw() {}, + }); +} diff --git a/vant/dist/circle/index.d.ts b/vant/dist/circle/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/circle/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/circle/index.js b/vant/dist/circle/index.js new file mode 100755 index 0000000..c3a2894 --- /dev/null +++ b/vant/dist/circle/index.js @@ -0,0 +1,186 @@ +import { BLUE, WHITE } from '../common/color'; +import { VantComponent } from '../common/component'; +import { getSystemInfoSync } from '../common/utils'; +import { isObj } from '../common/validator'; +import { canIUseCanvas2d } from '../common/version'; +import { adaptor } from './canvas'; +function format(rate) { + return Math.min(Math.max(rate, 0), 100); +} +const PERIMETER = 2 * Math.PI; +const BEGIN_ANGLE = -Math.PI / 2; +const STEP = 1; +VantComponent({ + props: { + text: String, + lineCap: { + type: String, + value: 'round', + }, + value: { + type: Number, + value: 0, + observer: 'reRender', + }, + speed: { + type: Number, + value: 50, + }, + size: { + type: Number, + value: 100, + observer() { + this.drawCircle(this.currentValue); + }, + }, + fill: String, + layerColor: { + type: String, + value: WHITE, + }, + color: { + type: null, + value: BLUE, + observer() { + this.setHoverColor().then(() => { + this.drawCircle(this.currentValue); + }); + }, + }, + type: { + type: String, + value: '', + }, + strokeWidth: { + type: Number, + value: 4, + }, + clockwise: { + type: Boolean, + value: true, + }, + }, + data: { + hoverColor: BLUE, + }, + methods: { + getContext() { + const { type, size } = this.data; + if (type === '' || !canIUseCanvas2d()) { + const ctx = wx.createCanvasContext('van-circle', this); + return Promise.resolve(ctx); + } + const dpr = getSystemInfoSync().pixelRatio; + return new Promise((resolve) => { + wx.createSelectorQuery() + .in(this) + .select('#van-circle') + .node() + .exec((res) => { + const canvas = res[0].node; + const ctx = canvas.getContext(type); + if (!this.inited) { + this.inited = true; + canvas.width = size * dpr; + canvas.height = size * dpr; + ctx.scale(dpr, dpr); + } + resolve(adaptor(ctx)); + }); + }); + }, + setHoverColor() { + const { color, size } = this.data; + if (isObj(color)) { + return this.getContext().then((context) => { + const LinearColor = context.createLinearGradient(size, 0, 0, 0); + Object.keys(color) + .sort((a, b) => parseFloat(a) - parseFloat(b)) + .map((key) => + LinearColor.addColorStop(parseFloat(key) / 100, color[key]) + ); + this.hoverColor = LinearColor; + }); + } + this.hoverColor = color; + return Promise.resolve(); + }, + presetCanvas(context, strokeStyle, beginAngle, endAngle, fill) { + const { strokeWidth, lineCap, clockwise, size } = this.data; + const position = size / 2; + const radius = position - strokeWidth / 2; + context.setStrokeStyle(strokeStyle); + context.setLineWidth(strokeWidth); + context.setLineCap(lineCap); + context.beginPath(); + context.arc(position, position, radius, beginAngle, endAngle, !clockwise); + context.stroke(); + if (fill) { + context.setFillStyle(fill); + context.fill(); + } + }, + renderLayerCircle(context) { + const { layerColor, fill } = this.data; + this.presetCanvas(context, layerColor, 0, PERIMETER, fill); + }, + renderHoverCircle(context, formatValue) { + const { clockwise } = this.data; + // 结束角度 + const progress = PERIMETER * (formatValue / 100); + const endAngle = clockwise + ? BEGIN_ANGLE + progress + : 3 * Math.PI - (BEGIN_ANGLE + progress); + this.presetCanvas(context, this.hoverColor, BEGIN_ANGLE, endAngle); + }, + drawCircle(currentValue) { + const { size } = this.data; + this.getContext().then((context) => { + context.clearRect(0, 0, size, size); + this.renderLayerCircle(context); + const formatValue = format(currentValue); + if (formatValue !== 0) { + this.renderHoverCircle(context, formatValue); + } + context.draw(); + }); + }, + reRender() { + // tofector 动画暂时没有想到好的解决方案 + const { value, speed } = this.data; + if (speed <= 0 || speed > 1000) { + this.drawCircle(value); + return; + } + this.clearInterval(); + this.currentValue = this.currentValue || 0; + this.interval = setInterval(() => { + if (this.currentValue !== value) { + if (this.currentValue < value) { + this.currentValue += STEP; + } else { + this.currentValue -= STEP; + } + this.drawCircle(this.currentValue); + } else { + this.clearInterval(); + } + }, 1000 / speed); + }, + clearInterval() { + if (this.interval) { + clearInterval(this.interval); + this.interval = null; + } + }, + }, + mounted() { + this.currentValue = this.data.value; + this.setHoverColor().then(() => { + this.drawCircle(this.currentValue); + }); + }, + destroyed() { + this.clearInterval(); + }, +}); diff --git a/vant/dist/circle/index.json b/vant/dist/circle/index.json new file mode 100755 index 0000000..467ce29 --- /dev/null +++ b/vant/dist/circle/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/vant/dist/circle/index.wxml b/vant/dist/circle/index.wxml new file mode 100755 index 0000000..52bc59f --- /dev/null +++ b/vant/dist/circle/index.wxml @@ -0,0 +1,9 @@ + + + + + + + + {{ text }} + diff --git a/vant/dist/circle/index.wxss b/vant/dist/circle/index.wxss new file mode 100755 index 0000000..3ab63df --- /dev/null +++ b/vant/dist/circle/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-circle{position:relative;display:inline-block;text-align:center}.van-circle__text{position:absolute;top:50%;left:0;width:100%;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#323233;color:var(--circle-text-color,#323233)} \ No newline at end of file diff --git a/vant/dist/col/index.d.ts b/vant/dist/col/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/col/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/col/index.js b/vant/dist/col/index.js new file mode 100755 index 0000000..20f326f --- /dev/null +++ b/vant/dist/col/index.js @@ -0,0 +1,9 @@ +import { useParent } from '../common/relation'; +import { VantComponent } from '../common/component'; +VantComponent({ + relation: useParent('row'), + props: { + span: Number, + offset: Number, + }, +}); diff --git a/vant/dist/col/index.json b/vant/dist/col/index.json new file mode 100755 index 0000000..467ce29 --- /dev/null +++ b/vant/dist/col/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/vant/dist/col/index.wxml b/vant/dist/col/index.wxml new file mode 100755 index 0000000..975348b --- /dev/null +++ b/vant/dist/col/index.wxml @@ -0,0 +1,9 @@ + + + + + + diff --git a/vant/dist/col/index.wxs b/vant/dist/col/index.wxs new file mode 100755 index 0000000..507c1cb --- /dev/null +++ b/vant/dist/col/index.wxs @@ -0,0 +1,18 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function rootStyle(data) { + if (!data.gutter) { + return ''; + } + + return style({ + 'padding-right': addUnit(data.gutter / 2), + 'padding-left': addUnit(data.gutter / 2), + }); +} + +module.exports = { + rootStyle: rootStyle, +}; diff --git a/vant/dist/col/index.wxss b/vant/dist/col/index.wxss new file mode 100755 index 0000000..44c896a --- /dev/null +++ b/vant/dist/col/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-col{float:left;box-sizing:border-box}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%} \ No newline at end of file diff --git a/vant/dist/collapse-item/animate.d.ts b/vant/dist/collapse-item/animate.d.ts new file mode 100755 index 0000000..0c33c00 --- /dev/null +++ b/vant/dist/collapse-item/animate.d.ts @@ -0,0 +1,6 @@ +/// +export declare function setContentAnimate( + context: WechatMiniprogram.Component.TrivialInstance, + expanded: boolean, + mounted: boolean +): void; diff --git a/vant/dist/collapse-item/animate.js b/vant/dist/collapse-item/animate.js new file mode 100755 index 0000000..7ce1dae --- /dev/null +++ b/vant/dist/collapse-item/animate.js @@ -0,0 +1,70 @@ +import { canIUseAnimate } from '../common/version'; +import { getRect } from '../common/utils'; +function useAnimate(context, expanded, mounted, height) { + const selector = '.van-collapse-item__wrapper'; + if (expanded) { + context.animate( + selector, + [ + { height: 0, ease: 'ease-in-out', offset: 0 }, + { height: `${height}px`, ease: 'ease-in-out', offset: 1 }, + { height: `auto`, ease: 'ease-in-out', offset: 1 }, + ], + mounted ? 300 : 0, + () => { + context.clearAnimation(selector); + } + ); + return; + } + context.animate( + selector, + [ + { height: `${height}px`, ease: 'ease-in-out', offset: 0 }, + { height: 0, ease: 'ease-in-out', offset: 1 }, + ], + 300, + () => { + context.clearAnimation(selector); + } + ); +} +function useAnimation(context, expanded, mounted, height) { + const animation = wx.createAnimation({ + duration: 0, + timingFunction: 'ease-in-out', + }); + if (expanded) { + if (height === 0) { + animation.height('auto').top(1).step(); + } else { + animation + .height(height) + .top(1) + .step({ + duration: mounted ? 300 : 1, + }) + .height('auto') + .step(); + } + context.setData({ + animation: animation.export(), + }); + return; + } + animation.height(height).top(0).step({ duration: 1 }).height(0).step({ + duration: 300, + }); + context.setData({ + animation: animation.export(), + }); +} +export function setContentAnimate(context, expanded, mounted) { + getRect(context, '.van-collapse-item__content') + .then((rect) => rect.height) + .then((height) => { + canIUseAnimate() + ? useAnimate(context, expanded, mounted, height) + : useAnimation(context, expanded, mounted, height); + }); +} diff --git a/vant/dist/collapse-item/index.d.ts b/vant/dist/collapse-item/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/collapse-item/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/collapse-item/index.js b/vant/dist/collapse-item/index.js new file mode 100755 index 0000000..c44c27e --- /dev/null +++ b/vant/dist/collapse-item/index.js @@ -0,0 +1,59 @@ +import { VantComponent } from '../common/component'; +import { useParent } from '../common/relation'; +import { setContentAnimate } from './animate'; +VantComponent({ + classes: ['title-class', 'content-class'], + relation: useParent('collapse'), + props: { + name: null, + title: null, + value: null, + icon: String, + label: String, + disabled: Boolean, + clickable: Boolean, + border: { + type: Boolean, + value: true, + }, + isLink: { + type: Boolean, + value: true, + }, + }, + data: { + expanded: false, + }, + mounted() { + this.updateExpanded(); + this.mounted = true; + }, + methods: { + updateExpanded() { + if (!this.parent) { + return; + } + const { value, accordion } = this.parent.data; + const { children = [] } = this.parent; + const { name } = this.data; + const index = children.indexOf(this); + const currentName = name == null ? index : name; + const expanded = accordion + ? value === currentName + : (value || []).some((name) => name === currentName); + if (expanded !== this.data.expanded) { + setContentAnimate(this, expanded, this.mounted); + } + this.setData({ index, expanded }); + }, + onClick() { + if (this.data.disabled) { + return; + } + const { name, expanded } = this.data; + const index = this.parent.children.indexOf(this); + const currentName = name == null ? index : name; + this.parent.switch(currentName, !expanded); + }, + }, +}); diff --git a/vant/dist/collapse-item/index.json b/vant/dist/collapse-item/index.json new file mode 100755 index 0000000..0e5425c --- /dev/null +++ b/vant/dist/collapse-item/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index" + } +} diff --git a/vant/dist/collapse-item/index.wxml b/vant/dist/collapse-item/index.wxml new file mode 100755 index 0000000..ae4cc83 --- /dev/null +++ b/vant/dist/collapse-item/index.wxml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + diff --git a/vant/dist/collapse-item/index.wxss b/vant/dist/collapse-item/index.wxss new file mode 100755 index 0000000..0bb936c --- /dev/null +++ b/vant/dist/collapse-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;transition:-webkit-transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s),-webkit-transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c8c9cc!important;color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important;background-color:var(--white,#fff)!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__content{padding:15px;padding:var(--collapse-item-content-padding,15px);color:#969799;color:var(--collapse-item-content-text-color,#969799);font-size:13px;font-size:var(--collapse-item-content-font-size,13px);line-height:1.5;line-height:var(--collapse-item-content-line-height,1.5);background-color:#fff;background-color:var(--collapse-item-content-background-color,#fff)} \ No newline at end of file diff --git a/vant/dist/collapse/index.d.ts b/vant/dist/collapse/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/collapse/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/collapse/index.js b/vant/dist/collapse/index.js new file mode 100755 index 0000000..60e4611 --- /dev/null +++ b/vant/dist/collapse/index.js @@ -0,0 +1,44 @@ +import { VantComponent } from '../common/component'; +import { useChildren } from '../common/relation'; +VantComponent({ + relation: useChildren('collapse-item'), + props: { + value: { + type: null, + observer: 'updateExpanded', + }, + accordion: { + type: Boolean, + observer: 'updateExpanded', + }, + border: { + type: Boolean, + value: true, + }, + }, + methods: { + updateExpanded() { + this.children.forEach((child) => { + child.updateExpanded(); + }); + }, + switch(name, expanded) { + const { accordion, value } = this.data; + const changeItem = name; + if (!accordion) { + name = expanded + ? (value || []).concat(name) + : (value || []).filter((activeName) => activeName !== name); + } else { + name = expanded ? name : ''; + } + if (expanded) { + this.$emit('open', changeItem); + } else { + this.$emit('close', changeItem); + } + this.$emit('change', name); + this.$emit('input', name); + }, + }, +}); diff --git a/vant/dist/collapse/index.json b/vant/dist/collapse/index.json new file mode 100755 index 0000000..467ce29 --- /dev/null +++ b/vant/dist/collapse/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/vant/dist/collapse/index.wxml b/vant/dist/collapse/index.wxml new file mode 100755 index 0000000..fd4e171 --- /dev/null +++ b/vant/dist/collapse/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/vant/dist/collapse/index.wxss b/vant/dist/collapse/index.wxss new file mode 100755 index 0000000..99694d6 --- /dev/null +++ b/vant/dist/collapse/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/vant/dist/common/color.d.ts b/vant/dist/common/color.d.ts new file mode 100755 index 0000000..386f307 --- /dev/null +++ b/vant/dist/common/color.d.ts @@ -0,0 +1,7 @@ +export declare const RED = "#ee0a24"; +export declare const BLUE = "#1989fa"; +export declare const WHITE = "#fff"; +export declare const GREEN = "#07c160"; +export declare const ORANGE = "#ff976a"; +export declare const GRAY = "#323233"; +export declare const GRAY_DARK = "#969799"; diff --git a/vant/dist/common/color.js b/vant/dist/common/color.js new file mode 100755 index 0000000..6b285bd --- /dev/null +++ b/vant/dist/common/color.js @@ -0,0 +1,7 @@ +export const RED = '#ee0a24'; +export const BLUE = '#1989fa'; +export const WHITE = '#fff'; +export const GREEN = '#07c160'; +export const ORANGE = '#ff976a'; +export const GRAY = '#323233'; +export const GRAY_DARK = '#969799'; diff --git a/vant/dist/common/component.d.ts b/vant/dist/common/component.d.ts new file mode 100755 index 0000000..6b0a958 --- /dev/null +++ b/vant/dist/common/component.d.ts @@ -0,0 +1,8 @@ +/// +import { VantComponentOptions } from '../definitions/index'; +declare function VantComponent< + Data extends WechatMiniprogram.Component.DataOption, + Props extends WechatMiniprogram.Component.PropertyOption, + Methods extends WechatMiniprogram.Component.MethodOption +>(vantOptions: VantComponentOptions): void; +export { VantComponent }; diff --git a/vant/dist/common/component.js b/vant/dist/common/component.js new file mode 100755 index 0000000..5530c6f --- /dev/null +++ b/vant/dist/common/component.js @@ -0,0 +1,45 @@ +import { basic } from '../mixins/basic'; +function mapKeys(source, target, map) { + Object.keys(map).forEach((key) => { + if (source[key]) { + target[map[key]] = source[key]; + } + }); +} +function VantComponent(vantOptions) { + const options = {}; + mapKeys(vantOptions, options, { + data: 'data', + props: 'properties', + mixins: 'behaviors', + methods: 'methods', + beforeCreate: 'created', + created: 'attached', + mounted: 'ready', + destroyed: 'detached', + classes: 'externalClasses', + }); + // add default externalClasses + options.externalClasses = options.externalClasses || []; + options.externalClasses.push('custom-class'); + // add default behaviors + options.behaviors = options.behaviors || []; + options.behaviors.push(basic); + // add relations + const { relation } = vantOptions; + if (relation) { + options.relations = relation.relations; + options.behaviors.push(relation.mixin); + } + // map field to form-field behavior + if (vantOptions.field) { + options.behaviors.push('wx://form-field'); + } + // add default options + options.options = { + multipleSlots: true, + addGlobalClass: true, + }; + Component(options); +} +export { VantComponent }; diff --git a/vant/dist/common/index.wxss b/vant/dist/common/index.wxss new file mode 100755 index 0000000..ad44c84 --- /dev/null +++ b/vant/dist/common/index.wxss @@ -0,0 +1,83 @@ +.van-ellipsis { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis +} + +.van-multi-ellipsis--l2 { + -webkit-line-clamp: 2 +} + +.van-multi-ellipsis--l2, +.van-multi-ellipsis--l3 { + display: -webkit-box; + overflow: hidden; + text-overflow: ellipsis; + -webkit-box-orient: vertical +} + +.van-multi-ellipsis--l3 { + -webkit-line-clamp: 3 +} + +.van-clearfix:after { + display: table; + clear: both; + content: "" +} + +.van-hairline, +.van-hairline--bottom, +.van-hairline--left, +.van-hairline--right, +.van-hairline--surround, +.van-hairline--top, +.van-hairline--top-bottom { + position: relative +} + +.van-hairline--bottom:after, +.van-hairline--left:after, +.van-hairline--right:after, +.van-hairline--surround:after, +.van-hairline--top-bottom:after, +.van-hairline--top:after, +.van-hairline:after { + position: absolute; + box-sizing: border-box; + -webkit-transform-origin: center; + transform-origin: center; + content: " "; + pointer-events: none; + top: -50%; + right: -50%; + bottom: -50%; + left: -50%; + border: 0 solid #ebedf0; + -webkit-transform: scale(.5); + transform: scale(.5) +} + +.van-hairline--top:after { + border-top-width: 1px +} + +.van-hairline--left:after { + border-left-width: 1px +} + +.van-hairline--right:after { + border-right-width: 1px +} + +.van-hairline--bottom:after { + border-bottom-width: 1px +} + +.van-hairline--top-bottom:after { + border-width: 1px 0 +} + +.van-hairline--surround:after { + border-width: 1px +} \ No newline at end of file diff --git a/vant/dist/common/relation.d.ts b/vant/dist/common/relation.d.ts new file mode 100755 index 0000000..be5f2ee --- /dev/null +++ b/vant/dist/common/relation.d.ts @@ -0,0 +1,21 @@ +/// +declare type TrivialInstance = WechatMiniprogram.Component.TrivialInstance; +export declare function useParent( + name: string, + onEffect?: (this: TrivialInstance) => void +): { + relations: { + [x: string]: WechatMiniprogram.Component.RelationOption; + }; + mixin: string; +}; +export declare function useChildren( + name: string, + onEffect?: (this: TrivialInstance, target: TrivialInstance) => void +): { + relations: { + [x: string]: WechatMiniprogram.Component.RelationOption; + }; + mixin: string; +}; +export {}; diff --git a/vant/dist/common/relation.js b/vant/dist/common/relation.js new file mode 100755 index 0000000..99c1a49 --- /dev/null +++ b/vant/dist/common/relation.js @@ -0,0 +1,64 @@ +export function useParent(name, onEffect) { + const path = `../${name}/index`; + return { + relations: { + [path]: { + type: 'ancestor', + linked() { + onEffect && onEffect.call(this); + }, + linkChanged() { + onEffect && onEffect.call(this); + }, + unlinked() { + onEffect && onEffect.call(this); + }, + }, + }, + mixin: Behavior({ + created() { + Object.defineProperty(this, 'parent', { + get: () => this.getRelationNodes(path)[0], + }); + Object.defineProperty(this, 'index', { + // @ts-ignore + get: () => { + var _a, _b; + return (_b = + (_a = this.parent) === null || _a === void 0 + ? void 0 + : _a.children) === null || _b === void 0 + ? void 0 + : _b.indexOf(this); + }, + }); + }, + }), + }; +} +export function useChildren(name, onEffect) { + const path = `../${name}/index`; + return { + relations: { + [path]: { + type: 'descendant', + linked(target) { + onEffect && onEffect.call(this, target); + }, + linkChanged(target) { + onEffect && onEffect.call(this, target); + }, + unlinked(target) { + onEffect && onEffect.call(this, target); + }, + }, + }, + mixin: Behavior({ + created() { + Object.defineProperty(this, 'children', { + get: () => this.getRelationNodes(path) || [], + }); + }, + }), + }; +} diff --git a/vant/dist/common/style/clearfix.wxss b/vant/dist/common/style/clearfix.wxss new file mode 100755 index 0000000..a0ca838 --- /dev/null +++ b/vant/dist/common/style/clearfix.wxss @@ -0,0 +1 @@ +.van-clearfix:after{display:table;clear:both;content:""} \ No newline at end of file diff --git a/vant/dist/common/style/ellipsis.wxss b/vant/dist/common/style/ellipsis.wxss new file mode 100755 index 0000000..1e9dbc9 --- /dev/null +++ b/vant/dist/common/style/ellipsis.wxss @@ -0,0 +1 @@ +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3} \ No newline at end of file diff --git a/vant/dist/common/style/hairline.wxss b/vant/dist/common/style/hairline.wxss new file mode 100755 index 0000000..41246f9 --- /dev/null +++ b/vant/dist/common/style/hairline.wxss @@ -0,0 +1,55 @@ +.van-hairline, +.van-hairline--bottom, +.van-hairline--left, +.van-hairline--right, +.van-hairline--surround, +.van-hairline--top, +.van-hairline--top-bottom { + position: relative +} + +.van-hairline--bottom:after, +.van-hairline--left:after, +.van-hairline--right:after, +.van-hairline--surround:after, +.van-hairline--top-bottom:after, +.van-hairline--top:after, +.van-hairline:after { + position: absolute; + box-sizing: border-box; + -webkit-transform-origin: center; + transform-origin: center; + content: " "; + pointer-events: none; + top: -50%; + right: -50%; + bottom: -50%; + left: -50%; + border: 0 solid #ebedf0; + -webkit-transform: scale(.5); + transform: scale(.5) +} + +.van-hairline--top:after { + border-top-width: 1px +} + +.van-hairline--left:after { + border-left-width: 1px +} + +.van-hairline--right:after { + border-right-width: 1px +} + +.van-hairline--bottom:after { + border-bottom-width: 1px +} + +.van-hairline--top-bottom:after { + border-width: 1px 0 +} + +.van-hairline--surround:after { + border-width: 1px +} \ No newline at end of file diff --git a/vant/dist/common/style/mixins/clearfix.wxss b/vant/dist/common/style/mixins/clearfix.wxss new file mode 100755 index 0000000..e69de29 diff --git a/vant/dist/common/style/mixins/ellipsis.wxss b/vant/dist/common/style/mixins/ellipsis.wxss new file mode 100755 index 0000000..e69de29 diff --git a/vant/dist/common/style/mixins/hairline.wxss b/vant/dist/common/style/mixins/hairline.wxss new file mode 100755 index 0000000..e69de29 diff --git a/vant/dist/common/style/theme.wxss b/vant/dist/common/style/theme.wxss new file mode 100755 index 0000000..e69de29 diff --git a/vant/dist/common/style/var.wxss b/vant/dist/common/style/var.wxss new file mode 100755 index 0000000..e69de29 diff --git a/vant/dist/common/utils.d.ts b/vant/dist/common/utils.d.ts new file mode 100755 index 0000000..1ceccd1 --- /dev/null +++ b/vant/dist/common/utils.d.ts @@ -0,0 +1,30 @@ +/// +export declare function range(num: number, min: number, max: number): number; +export declare function nextTick(cb: (...args: any[]) => void): void; +export declare function getSystemInfoSync(): WechatMiniprogram.GetSystemInfoSyncResult; +export declare function addUnit(value?: string | number): string | undefined; +export declare function requestAnimationFrame( + cb: () => void +): number | WechatMiniprogram.NodesRef; +export declare function pickExclude(obj: unknown, keys: string[]): {}; +export declare function getRect( + context: WechatMiniprogram.Component.TrivialInstance, + selector: string +): Promise; +export declare function getAllRect( + context: WechatMiniprogram.Component.TrivialInstance, + selector: string +): Promise; +export declare function groupSetData( + context: WechatMiniprogram.Component.TrivialInstance, + cb: () => void +): void; +export declare function toPromise( + promiseLike: Promise | unknown +): Promise; +export declare function getCurrentPage(): T & + WechatMiniprogram.OptionalInterface & + WechatMiniprogram.Page.InstanceProperties & + WechatMiniprogram.Page.InstanceMethods> & + WechatMiniprogram.Page.Data> & + Record; diff --git a/vant/dist/common/utils.js b/vant/dist/common/utils.js new file mode 100755 index 0000000..8135171 --- /dev/null +++ b/vant/dist/common/utils.js @@ -0,0 +1,89 @@ +import { isDef, isNumber, isPlainObject, isPromise } from './validator'; +import { canIUseGroupSetData, canIUseNextTick } from './version'; +export function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +export function nextTick(cb) { + if (canIUseNextTick()) { + wx.nextTick(cb); + } else { + setTimeout(() => { + cb(); + }, 1000 / 30); + } +} +let systemInfo; +export function getSystemInfoSync() { + if (systemInfo == null) { + systemInfo = wx.getSystemInfoSync(); + } + return systemInfo; +} +export function addUnit(value) { + if (!isDef(value)) { + return undefined; + } + value = String(value); + return isNumber(value) ? `${value}px` : value; +} +export function requestAnimationFrame(cb) { + const systemInfo = getSystemInfoSync(); + if (systemInfo.platform === 'devtools') { + return setTimeout(() => { + cb(); + }, 1000 / 30); + } + return wx + .createSelectorQuery() + .selectViewport() + .boundingClientRect() + .exec(() => { + cb(); + }); +} +export function pickExclude(obj, keys) { + if (!isPlainObject(obj)) { + return {}; + } + return Object.keys(obj).reduce((prev, key) => { + if (!keys.includes(key)) { + prev[key] = obj[key]; + } + return prev; + }, {}); +} +export function getRect(context, selector) { + return new Promise((resolve) => { + wx.createSelectorQuery() + .in(context) + .select(selector) + .boundingClientRect() + .exec((rect = []) => resolve(rect[0])); + }); +} +export function getAllRect(context, selector) { + return new Promise((resolve) => { + wx.createSelectorQuery() + .in(context) + .selectAll(selector) + .boundingClientRect() + .exec((rect = []) => resolve(rect[0])); + }); +} +export function groupSetData(context, cb) { + if (canIUseGroupSetData()) { + context.groupSetData(cb); + } else { + cb(); + } +} +export function toPromise(promiseLike) { + if (isPromise(promiseLike)) { + return promiseLike; + } + return Promise.resolve(promiseLike); +} +export function getCurrentPage() { + const pages = getCurrentPages(); + return pages[pages.length - 1]; +} diff --git a/vant/dist/common/validator.d.ts b/vant/dist/common/validator.d.ts new file mode 100755 index 0000000..ae7c48f --- /dev/null +++ b/vant/dist/common/validator.d.ts @@ -0,0 +1,11 @@ +export declare function isFunction(val: unknown): val is Function; +export declare function isPlainObject( + val: unknown +): val is Record; +export declare function isPromise(val: unknown): val is Promise; +export declare function isDef(value: unknown): boolean; +export declare function isObj(x: unknown): x is Record; +export declare function isNumber(value: string): boolean; +export declare function isBoolean(value: unknown): value is boolean; +export declare function isImageUrl(url: string): boolean; +export declare function isVideoUrl(url: string): boolean; diff --git a/vant/dist/common/validator.js b/vant/dist/common/validator.js new file mode 100755 index 0000000..1c7d1e9 --- /dev/null +++ b/vant/dist/common/validator.js @@ -0,0 +1,30 @@ +export function isFunction(val) { + return typeof val === 'function'; +} +export function isPlainObject(val) { + return val !== null && typeof val === 'object' && !Array.isArray(val); +} +export function isPromise(val) { + return isPlainObject(val) && isFunction(val.then) && isFunction(val.catch); +} +export function isDef(value) { + return value !== undefined && value !== null; +} +export function isObj(x) { + const type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} +export function isNumber(value) { + return /^\d+(\.\d+)?$/.test(value); +} +export function isBoolean(value) { + return typeof value === 'boolean'; +} +const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i; +const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv)/i; +export function isImageUrl(url) { + return IMAGE_REGEXP.test(url); +} +export function isVideoUrl(url) { + return VIDEO_REGEXP.test(url); +} diff --git a/vant/dist/common/version.d.ts b/vant/dist/common/version.d.ts new file mode 100755 index 0000000..89c4ddd --- /dev/null +++ b/vant/dist/common/version.d.ts @@ -0,0 +1,6 @@ +export declare function canIUseModel(): boolean; +export declare function canIUseFormFieldButton(): boolean; +export declare function canIUseAnimate(): boolean; +export declare function canIUseGroupSetData(): boolean; +export declare function canIUseNextTick(): boolean; +export declare function canIUseCanvas2d(): boolean; diff --git a/vant/dist/common/version.js b/vant/dist/common/version.js new file mode 100755 index 0000000..34d698e --- /dev/null +++ b/vant/dist/common/version.js @@ -0,0 +1,45 @@ +import { getSystemInfoSync } from './utils'; +function compareVersion(v1, v2) { + v1 = v1.split('.'); + v2 = v2.split('.'); + const len = Math.max(v1.length, v2.length); + while (v1.length < len) { + v1.push('0'); + } + while (v2.length < len) { + v2.push('0'); + } + for (let i = 0; i < len; i++) { + const num1 = parseInt(v1[i], 10); + const num2 = parseInt(v2[i], 10); + if (num1 > num2) { + return 1; + } + if (num1 < num2) { + return -1; + } + } + return 0; +} +function gte(version) { + const system = getSystemInfoSync(); + return compareVersion(system.SDKVersion, version) >= 0; +} +export function canIUseModel() { + return gte('2.9.3'); +} +export function canIUseFormFieldButton() { + return gte('2.10.3'); +} +export function canIUseAnimate() { + return gte('2.9.0'); +} +export function canIUseGroupSetData() { + return gte('2.4.0'); +} +export function canIUseNextTick() { + return wx.canIUse('nextTick'); +} +export function canIUseCanvas2d() { + return gte('2.9.0'); +} diff --git a/vant/dist/count-down/index.d.ts b/vant/dist/count-down/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/count-down/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/count-down/index.js b/vant/dist/count-down/index.js new file mode 100755 index 0000000..78dbb88 --- /dev/null +++ b/vant/dist/count-down/index.js @@ -0,0 +1,99 @@ +import { VantComponent } from '../common/component'; +import { isSameSecond, parseFormat, parseTimeData } from './utils'; +function simpleTick(fn) { + return setTimeout(fn, 30); +} +VantComponent({ + props: { + useSlot: Boolean, + millisecond: Boolean, + time: { + type: Number, + observer: 'reset', + }, + format: { + type: String, + value: 'HH:mm:ss', + }, + autoStart: { + type: Boolean, + value: true, + }, + }, + data: { + timeData: parseTimeData(0), + formattedTime: '0', + }, + destroyed() { + clearTimeout(this.tid); + this.tid = null; + }, + methods: { + // 开始 + start() { + if (this.counting) { + return; + } + this.counting = true; + this.endTime = Date.now() + this.remain; + this.tick(); + }, + // 暂停 + pause() { + this.counting = false; + clearTimeout(this.tid); + }, + // 重置 + reset() { + this.pause(); + this.remain = this.data.time; + this.setRemain(this.remain); + if (this.data.autoStart) { + this.start(); + } + }, + tick() { + if (this.data.millisecond) { + this.microTick(); + } else { + this.macroTick(); + } + }, + microTick() { + this.tid = simpleTick(() => { + this.setRemain(this.getRemain()); + if (this.remain !== 0) { + this.microTick(); + } + }); + }, + macroTick() { + this.tid = simpleTick(() => { + const remain = this.getRemain(); + if (!isSameSecond(remain, this.remain) || remain === 0) { + this.setRemain(remain); + } + if (this.remain !== 0) { + this.macroTick(); + } + }); + }, + getRemain() { + return Math.max(this.endTime - Date.now(), 0); + }, + setRemain(remain) { + this.remain = remain; + const timeData = parseTimeData(remain); + if (this.data.useSlot) { + this.$emit('change', timeData); + } + this.setData({ + formattedTime: parseFormat(this.data.format, timeData), + }); + if (remain === 0) { + this.pause(); + this.$emit('finish'); + } + }, + }, +}); diff --git a/vant/dist/count-down/index.json b/vant/dist/count-down/index.json new file mode 100755 index 0000000..467ce29 --- /dev/null +++ b/vant/dist/count-down/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/vant/dist/count-down/index.wxml b/vant/dist/count-down/index.wxml new file mode 100755 index 0000000..e206e16 --- /dev/null +++ b/vant/dist/count-down/index.wxml @@ -0,0 +1,4 @@ + + + {{ formattedTime }} + diff --git a/vant/dist/count-down/index.wxss b/vant/dist/count-down/index.wxss new file mode 100755 index 0000000..bc33f5d --- /dev/null +++ b/vant/dist/count-down/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-count-down{color:#323233;color:var(--count-down-text-color,#323233);font-size:14px;font-size:var(--count-down-font-size,14px);line-height:20px;line-height:var(--count-down-line-height,20px)} \ No newline at end of file diff --git a/vant/dist/count-down/utils.d.ts b/vant/dist/count-down/utils.d.ts new file mode 100755 index 0000000..e4a58dd --- /dev/null +++ b/vant/dist/count-down/utils.d.ts @@ -0,0 +1,10 @@ +export declare type TimeData = { + days: number; + hours: number; + minutes: number; + seconds: number; + milliseconds: number; +}; +export declare function parseTimeData(time: number): TimeData; +export declare function parseFormat(format: string, timeData: TimeData): string; +export declare function isSameSecond(time1: number, time2: number): boolean; diff --git a/vant/dist/count-down/utils.js b/vant/dist/count-down/utils.js new file mode 100755 index 0000000..a9f05b8 --- /dev/null +++ b/vant/dist/count-down/utils.js @@ -0,0 +1,53 @@ +function padZero(num, targetLength = 2) { + let str = num + ''; + while (str.length < targetLength) { + str = '0' + str; + } + return str; +} +const SECOND = 1000; +const MINUTE = 60 * SECOND; +const HOUR = 60 * MINUTE; +const DAY = 24 * HOUR; +export function parseTimeData(time) { + const days = Math.floor(time / DAY); + const hours = Math.floor((time % DAY) / HOUR); + const minutes = Math.floor((time % HOUR) / MINUTE); + const seconds = Math.floor((time % MINUTE) / SECOND); + const milliseconds = Math.floor(time % SECOND); + return { + days, + hours, + minutes, + seconds, + milliseconds, + }; +} +export function parseFormat(format, timeData) { + const { days } = timeData; + let { hours, minutes, seconds, milliseconds } = timeData; + if (format.indexOf('DD') === -1) { + hours += days * 24; + } else { + format = format.replace('DD', padZero(days)); + } + if (format.indexOf('HH') === -1) { + minutes += hours * 60; + } else { + format = format.replace('HH', padZero(hours)); + } + if (format.indexOf('mm') === -1) { + seconds += minutes * 60; + } else { + format = format.replace('mm', padZero(minutes)); + } + if (format.indexOf('ss') === -1) { + milliseconds += seconds * 1000; + } else { + format = format.replace('ss', padZero(seconds)); + } + return format.replace('SSS', padZero(milliseconds, 3)); +} +export function isSameSecond(time1, time2) { + return Math.floor(time1 / 1000) === Math.floor(time2 / 1000); +} diff --git a/vant/dist/cropper/index.js b/vant/dist/cropper/index.js new file mode 100755 index 0000000..9a80a7a --- /dev/null +++ b/vant/dist/cropper/index.js @@ -0,0 +1,381 @@ +const defaultData = { + isShowCropper:false, + // 初始化的宽高 + cropperInitW: 750, + cropperInitH: 750, + // 动态的宽高 + cropperW: 750, + cropperH: 750, + // 动态的left top值 + cropperL: 0, + cropperT: 0, + + transL: 0, + transT: 0, + + // 图片缩放值 + scaleP: 0, + imageW: 0, + imageH: 0, + + // 裁剪框 宽高 + cutL: 0, + cutT: 0, + cutB: 0, + cutR: 0, + + qualityWidth: '', + innerAspectRadio: 750 / wx.getSystemInfoSync().windowWidth, + + C_CONSTANTS:{ + SCREEN_WIDTH : 750, + PAGE_X:0, // 手按下的x位置 + PAGE_Y:0, // 手按下y的位置 + PR : wx.getSystemInfoSync().pixelRatio, // dpi + T_PAGE_X:{}, // 手移动的时候x的位置 + T_PAGE_Y:{}, // 手移动的时候Y的位置 + CUT_L:0, // 初始化拖拽元素的left值 + CUT_T:0, // 初始化拖拽元素的top值 + CUT_R:0, // 初始化拖拽元素的 + CUT_B:0, // 初始化拖拽元素的 + CUT_W:0, // 初始化拖拽元素的宽度 + CUT_H:0, // 初始化拖拽元素的高度 + IMG_RATIO:0, // 图片比例 + IMG_REAL_W:0, // 图片实际的宽度 + IMG_REAL_H:0, // 图片实际的高度 + IMG_TYPE:'',//图片的格式 + DRAFG_MOVE_RATIO : 750 / wx.getSystemInfoSync().windowWidth //移动时候的比例 + } +}; +let data = {}; + +try{ + data = JSON.parse(JSON.stringify(defaultData)); +}catch(e){console.log(e)}; + +Component({ + properties: { + imageSrc:{ + type:String, + value:'', + observer(newVal, oldVal) { + if(newVal !== oldVal){ + this.setData({ + isShowCropper:true + },() => { + this.loadImage(); + }) + } + + } + }, + isCircleCrop:{ + type:Boolean, + value:false + }, + enableScale:{ + type:Boolean, + value:false + }, + ratio:{ + type:Number, + value:1 + } + }, + data, + ready(){ + if(this.data.isCircleCrop){ + //圆形裁剪 强制比例为1 + this.setData({ + ratio:1 + }) + } + }, + methods: { + loadImage() { + let {ratio,imageSrc} = this.data; + let {IMG_REAL_W,IMG_REAL_H,IMG_RATIO,SCREEN_WIDTH,IMG_TYPE} = this.data.C_CONSTANTS; + wx.getImageInfo({ + src: imageSrc, + success: res => { + IMG_REAL_W = res.width; + IMG_REAL_H = res.height; + IMG_RATIO = IMG_REAL_W / IMG_REAL_H; + IMG_TYPE = res.type === 'png' ? 'png' : 'jpg'; + // 根据图片的宽高显示不同的效果 保证图片可以正常显示 + let temp = {}; + let cropperData = {}; + if (IMG_RATIO >= 1) { + cropperData = { + cropperW: SCREEN_WIDTH, + cropperH: SCREEN_WIDTH / IMG_RATIO, + // 初始化left right + cropperL: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH) / 2), + cropperT: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH / IMG_RATIO) / 2) + } + if(ratio > 1){ + temp = { + cutL: (SCREEN_WIDTH - SCREEN_WIDTH / IMG_RATIO) / 2, + cutT: (SCREEN_WIDTH / IMG_RATIO - SCREEN_WIDTH / IMG_RATIO / ratio ) / 2, + cutR: SCREEN_WIDTH - (SCREEN_WIDTH - SCREEN_WIDTH / IMG_RATIO) / 2 - SCREEN_WIDTH / IMG_RATIO, + cutB: SCREEN_WIDTH / IMG_RATIO - (SCREEN_WIDTH / IMG_RATIO - SCREEN_WIDTH / IMG_RATIO / ratio ) / 2 - SCREEN_WIDTH / IMG_RATIO / ratio + } + }else{ + temp = { + cutT:0, + cutB:0, + cutL:(SCREEN_WIDTH - SCREEN_WIDTH / IMG_RATIO * ratio) / 2, + cutR: SCREEN_WIDTH - (SCREEN_WIDTH - SCREEN_WIDTH / IMG_RATIO * ratio) / 2 - SCREEN_WIDTH / IMG_RATIO * ratio + } + } + } else { + cropperData = { + cropperW: SCREEN_WIDTH * IMG_RATIO, + cropperH: SCREEN_WIDTH, + // 初始化left right + cropperL: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH * IMG_RATIO) / 2), + cropperT: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH) / 2) + } + if(ratio > 1){ + temp = { + cutL:0, + cutR:0, + cutT: (SCREEN_WIDTH - SCREEN_WIDTH * IMG_RATIO / ratio) / 2, + cutB: SCREEN_WIDTH - (SCREEN_WIDTH - SCREEN_WIDTH * IMG_RATIO / ratio) / 2 - SCREEN_WIDTH * IMG_RATIO / ratio + } + }else{ + temp = { + cutL: (SCREEN_WIDTH * IMG_RATIO - SCREEN_WIDTH * IMG_RATIO * ratio) / 2, + cutR: SCREEN_WIDTH * IMG_RATIO - (SCREEN_WIDTH * IMG_RATIO - SCREEN_WIDTH * IMG_RATIO * ratio) / 2 - SCREEN_WIDTH * IMG_RATIO * ratio, + cutT: (SCREEN_WIDTH - SCREEN_WIDTH * IMG_RATIO) / 2, + cutB: SCREEN_WIDTH - (SCREEN_WIDTH - SCREEN_WIDTH * IMG_RATIO) / 2 - SCREEN_WIDTH * IMG_RATIO + } + + } + } + this.setData({ + C_CONSTANTS:Object.assign({},this.data.C_CONSTANTS,{ + IMG_REAL_W, + IMG_REAL_H, + IMG_RATIO, + IMG_TYPE + }), + isShowCropper: true, + // 图片缩放值 + scaleP: IMG_REAL_W / SCREEN_WIDTH, + qualityWidth: IMG_REAL_W, + innerAspectRadio: IMG_RATIO, + ...temp, + ...cropperData + }) + } + }); + + }, + contentStartMove(e) { + this.setData({ + 'C_CONSTANTS.PAGE_X':e.touches[0].pageX, + 'C_CONSTANTS.PAGE_Y':e.touches[0].pageY + }) + }, + // 拖动时候触发的touchMove事件 + contentMoveing(e) { + let {PAGE_X,PAGE_Y,DRAFG_MOVE_RATIO} = this.data.C_CONSTANTS; + let {cutL,cutR,cutT,cutB} = this.data; + let dragLengthX = (PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO + let dragLengthY = (PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO + // 左移 + if (dragLengthX > 0) { + if (cutL - dragLengthX < 0) dragLengthX = cutL + } else { + if (cutR + dragLengthX < 0) dragLengthX = -cutR + } + + if (dragLengthY > 0) { + if (cutT - dragLengthY < 0) dragLengthY = cutT + } else { + if (cutB + dragLengthY < 0) dragLengthY = -cutB + } + this.setData({ + cutL: cutL - dragLengthX, + cutT: cutT - dragLengthY, + cutR: cutR + dragLengthX, + cutB: cutB + dragLengthY, + 'C_CONSTANTS.PAGE_X':e.touches[0].pageX, + 'C_CONSTANTS.PAGE_Y':e.touches[0].pageY + }); + }, + // 设置大小的时候触发的touchStart事件 + dragStart(e) { + let {cutL,cutR,cutT,cutB} = this.data; + this.setData({ + C_CONSTANTS:Object.assign({},this.data.C_CONSTANTS,{ + T_PAGE_X : e.touches[0].pageX, + T_PAGE_Y : e.touches[0].pageY, + CUT_L : cutL, + CUT_R : cutR, + CUT_B : cutB, + CUT_T : cutT + }) + }) + + }, + // 设置大小的时候触发的touchMove事件 + dragMove(e) { + let dragType = e.target.dataset.drag + let {ratio,cropperW,cropperH,cutL,cutT,cutR,cutB,enableScale} = this.data; + let {CUT_R,CUT_L,CUT_T,CUT_B,T_PAGE_X,T_PAGE_Y,DRAFG_MOVE_RATIO} = this.data.C_CONSTANTS; + let dragLength; + switch (dragType) { + case 'right': + dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO + if (CUT_R + dragLength < 0) dragLength = -CUT_R + cutR = CUT_R + dragLength; + if(enableScale){ + cutT = CUT_T + dragLength / ratio; + } + if(cutR < 0 || cutT < 0 || cutT > cropperH || cutR > cropperW) return; + break; + case 'left': + dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO + if (CUT_L - dragLength < 0) dragLength = CUT_L + if ((CUT_L - dragLength) > (this.data.cropperW - this.data.cutR)) dragLength = CUT_L - (this.data.cropperW - this.data.cutR) + cutL = CUT_L - dragLength; + if(enableScale){ + cutT = CUT_T - dragLength / ratio; + } + if(cutL < 0 || cutT < 0 || cutT > cropperH || cutL > cropperW) return; + break; + case 'top': + dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO + if (CUT_T - dragLength < 0) dragLength = CUT_T + if ((CUT_T - dragLength) > (this.data.cropperH - this.data.cutB)) dragLength = CUT_T - (this.data.cropperH - this.data.cutB) + cutT = CUT_T - dragLength; + if(enableScale){ + cutR = CUT_R - dragLength * ratio; + } + break; + case 'bottom': + dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO + if (CUT_B + dragLength < 0) dragLength = -CUT_B + cutB = CUT_B + dragLength; + if(enableScale){ + cutR = CUT_R + dragLength * ratio; + } + if(cutR < 0 || cutT < 0 || cutT > cropperH || cutR > cropperW) return; + break; + default:''; + } + this.setData({ + cutL, + cutT, + cutR, + cutB + }); + }, + contentTouchEnd(){}, + // 获取图片 + confirmCropper() { + const {isCircleCrop} = this.data;; + if(isCircleCrop){ + this.circleCrop() + }else{ + this.normalCropper(); + } + }, + + normalCropper(){ + let {imageSrc,cropperW,cropperH,cutL,cutT,cutR,cutB} = this.data; + let {IMG_REAL_W,IMG_REAL_H,IMG_TYPE} = this.data.C_CONSTANTS; + // 将图片写入画布 + const ctx = wx.createCanvasContext('cropper',this) + ctx.drawImage(imageSrc, 0, 0, IMG_REAL_W, IMG_REAL_H); + ctx.draw(true, () => { + // 获取画布要裁剪的位置和宽度 均为百分比 * 画布中图片的宽度 保证了在微信小程序中裁剪的图片模糊 位置不对的问题 canvasT = (_this.data.cutT / _this.data.cropperH) * (_this.data.imageH / pixelRatio) + let canvasW = ((cropperW - cutL - cutR) / cropperW) * IMG_REAL_W + let canvasH = ((cropperH - cutT - cutB) / cropperH) * IMG_REAL_H + let canvasL = (cutL / cropperW) * IMG_REAL_W + let canvasT = (cutT / cropperH) * IMG_REAL_H + wx.canvasToTempFilePath({ + x: canvasL, + y: canvasT, + width: canvasW, + height: canvasH, + destWidth: canvasW, + destHeight: canvasH, + fileType:IMG_TYPE || 'jpg', + canvasId: 'cropper', + success: (res) => { + //图片裁剪成功 + this.cancelCropper(); + this.triggerEvent('cropperDone', { + src:res.tempFilePath, + cropperData:{ + x: canvasL, + y: canvasT, + width: canvasW, + height: canvasH + } + }) + }, + fail:err =>{ + this.triggerEvent('cropperFail',err) + } + },this); + }) + }, + + circleCrop(){ + let {imageSrc,cropperW,cropperH,cutL,cutT,cutR,cutB} = this.data; + let {IMG_REAL_W,IMG_REAL_H,IMG_TYPE} = this.data.C_CONSTANTS; + // 将图片写入画布 + const ctx = wx.createCanvasContext('cropper',this) + let canvasW = ((cropperW - cutL - cutR) / cropperW) * IMG_REAL_W + let canvasL = (cutL / cropperW) * IMG_REAL_W + let canvasT = (cutT / cropperH) * IMG_REAL_H + + this.setData({ + canvasW:canvasW, + canvasH:canvasW + },() => { + ctx.arc(canvasW / 2,canvasW / 2,canvasW / 2,0,2 * Math.PI); + ctx.clip(); + ctx.drawImage(imageSrc, canvasL, canvasT, canvasW, canvasW,0,0,canvasW,canvasW); + ctx.draw(true, () => { + wx.canvasToTempFilePath({ + fileType:IMG_TYPE || 'jpg', + canvasId: 'cropper', + success: (res) => { + //图片裁剪成功 + this.cancelCropper(); + this.triggerEvent('cropperDone', { + src:res.tempFilePath, + cropperData:{ + x: canvasL, + y: canvasT, + width: canvasW, + height: canvasW + } + }) + }, + fail:err =>{ + this.triggerEvent('cropperFail',err) + } + },this); + }) + }) + }, + + cancelCropper(){ + let originData = {} + try{ + originData = JSON.parse(JSON.stringify(defaultData)) + }catch(e){}; + + this.setData({ + ...originData + }); + this.triggerEvent('cropperCancel') + } + } +}) \ No newline at end of file diff --git a/vant/dist/cropper/index.json b/vant/dist/cropper/index.json new file mode 100755 index 0000000..fba482a --- /dev/null +++ b/vant/dist/cropper/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/vant/dist/cropper/index.wxml b/vant/dist/cropper/index.wxml new file mode 100755 index 0000000..373095b --- /dev/null +++ b/vant/dist/cropper/index.wxml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vant/dist/cropper/index.wxss b/vant/dist/cropper/index.wxss new file mode 100755 index 0000000..08aa641 --- /dev/null +++ b/vant/dist/cropper/index.wxss @@ -0,0 +1,296 @@ +/* pages/wx-cropper/index.wxss */ +.wx-cropper-info { + position: fixed; + top: 140rpx; + left: 0; + right: 0; + bottom: 0; + display: block; + z-index: 10000; + align-items: center; + flex-direction: column; + height: 100%; + background: #000; +} + +.cropper-config { + display: flex; + position: fixed; + width: 100%; + bottom: 20rpx; +} + +.cropper-config .btn { + min-width: 300rpx; +} + +.cropper-config .cropper-confirm { + background: #fac208; +} + +.cropper-content { + min-height: 750rpx; + width: 100%; + height: 100%; +} + +.wx-corpper { + position: relative; + overflow: hidden; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; + -webkit-touch-callout: none; + box-sizing: border-box; +} + +.wx-corpper-content { + position: relative; +} + +.wx-corpper-content .img { + display: block; + width: 100%; + min-width: 0 !important; + max-width: none !important; + height: 100%; + min-height: 0 !important; + max-height: none !important; + image-orientation: 0deg !important; + margin: 0 auto; +} + +/* 移动图片效果 */ +.wx-cropper-drag-box { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + cursor: move; + background: rgba(0, 0, 0, 0.6); + z-index: 1; +} + +/* 内部的信息 */ +.wx-corpper-crop-box { + position: absolute; + background: rgba(255, 255, 255, 0.3); + z-index: 2; +} + +.wx-corpper-crop-box .wx-cropper-view-box { + position: relative; + display: block; + width: 100%; + height: 100%; + overflow: visible; + outline: 1px solid #69f; + outline-color: rgba(102, 153, 255, .75) +} + +/* 横向虚线 */ +.wx-cropper-dashed-h { + position: absolute; + top: 33.33333333%; + left: 0; + width: 100%; + height: 33.33333333%; + border-top: 1px dashed rgba(255, 255, 255, 0.5); + border-bottom: 1px dashed rgba(255, 255, 255, 0.5); +} + +/* 纵向虚线 */ +.wx-cropper-dashed-v { + position: absolute; + left: 33.33333333%; + top: 0; + width: 33.33333333%; + height: 100%; + border-left: 1px dashed rgba(255, 255, 255, 0.5); + border-right: 1px dashed rgba(255, 255, 255, 0.5); +} + +/* 四个方向的线 为了之后的拖动事件*/ +.wx-cropper-line-t { + position: absolute; + display: block; + width: 100%; + background-color: #69f; + top: 0; + left: 0; + height: 1px; + opacity: 0.1; + cursor: n-resize; +} + +.wx-cropper-line-t::before { + content: ''; + position: absolute; + top: 50%; + right: 0rpx; + width: 100%; + -webkit-transform: translate3d(0, -50%, 0); + transform: translate3d(0, -50%, 0); + bottom: 0; + height: 41rpx; + background: transparent; + z-index: 11; +} + +.wx-cropper-line-r { + position: absolute; + display: block; + background-color: #69f; + top: 0; + right: 0px; + width: 1px; + opacity: 0.1; + height: 100%; + cursor: e-resize; +} + +.wx-cropper-line-r::before { + content: ''; + position: absolute; + top: 0; + left: 50%; + width: 41rpx; + -webkit-transform: translate3d(-50%, 0, 0); + transform: translate3d(-50%, 0, 0); + bottom: 0; + height: 100%; + background: transparent; + z-index: 11; +} + +.wx-cropper-line-b { + position: absolute; + display: block; + width: 100%; + background-color: #69f; + bottom: 0; + left: 0; + height: 1px; + opacity: 0.1; + cursor: s-resize; +} + +.wx-cropper-line-b::before { + content: ''; + position: absolute; + top: 50%; + right: 0rpx; + width: 100%; + -webkit-transform: translate3d(0, -50%, 0); + transform: translate3d(0, -50%, 0); + bottom: 0; + height: 41rpx; + background: transparent; + z-index: 11; +} + +.wx-cropper-line-l { + position: absolute; + display: block; + background-color: #69f; + top: 0; + left: 0; + width: 1px; + opacity: 0.1; + height: 100%; + cursor: w-resize; +} + +.wx-cropper-line-l::before { + content: ''; + position: absolute; + top: 0; + left: 50%; + width: 41rpx; + -webkit-transform: translate3d(-50%, 0, 0); + transform: translate3d(-50%, 0, 0); + bottom: 0; + height: 100%; + background: transparent; + z-index: 11; +} + +.wx-cropper-point { + width: 5px; + height: 5px; + background-color: #69f; + opacity: .75; + position: absolute; + z-index: 3; +} + +.point-t { + top: -3px; + left: 50%; + margin-left: -3px; + cursor: n-resize; +} + +.point-tr { + top: -3px; + left: 100%; + margin-left: -3px; + cursor: n-resize; +} + +.point-r { + top: 50%; + left: 100%; + margin-left: -3px; + margin-top: -3px; + cursor: n-resize; +} + +.point-rb { + left: 100%; + top: 100%; + -webkit-transform: translate3d(-50%, -50%, 0); + transform: translate3d(-50%, -50%, 0); + cursor: n-resize; + /* width: 24rpx; */ + /* height: 24rpx; */ + background-color: #69f; + position: absolute; + z-index: 1112; + opacity: 1; +} + +.point-b { + left: 50%; + top: 100%; + margin-left: -3px; + margin-top: -3px; + cursor: n-resize; +} + +.point-bl { + left: 0%; + top: 100%; + margin-left: -3px; + margin-top: -3px; + cursor: n-resize; +} + +.point-l { + left: 0%; + top: 50%; + margin-left: -3px; + margin-top: -3px; + cursor: n-resize; +} + +.point-lt { + left: 0%; + top: 0%; + margin-left: -3px; + margin-top: -3px; + cursor: n-resize; +} \ No newline at end of file diff --git a/vant/dist/datetime-picker/index.d.ts b/vant/dist/datetime-picker/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/datetime-picker/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/datetime-picker/index.js b/vant/dist/datetime-picker/index.js new file mode 100755 index 0000000..75bd063 --- /dev/null +++ b/vant/dist/datetime-picker/index.js @@ -0,0 +1,324 @@ +import { VantComponent } from '../common/component'; +import { isDef } from '../common/validator'; +import { pickerProps } from '../picker/shared'; +const currentYear = new Date().getFullYear(); +function isValidDate(date) { + return isDef(date) && !isNaN(new Date(date).getTime()); +} +function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +function padZero(val) { + return `00${val}`.slice(-2); +} +function times(n, iteratee) { + let index = -1; + const result = Array(n < 0 ? 0 : n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} +function getTrueValue(formattedValue) { + if (formattedValue === undefined) { + formattedValue = '1'; + } + while (isNaN(parseInt(formattedValue, 10))) { + formattedValue = formattedValue.slice(1); + } + return parseInt(formattedValue, 10); +} +function getMonthEndDay(year, month) { + return 32 - new Date(year, month - 1, 32).getDate(); +} +const defaultFormatter = (type, value) => value; +VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: Object.assign(Object.assign({}, pickerProps), { + value: { + type: null, + observer: 'updateValue', + }, + filter: null, + type: { + type: String, + value: 'datetime', + observer: 'updateValue', + }, + showToolbar: { + type: Boolean, + value: true, + }, + formatter: { + type: null, + value: defaultFormatter, + }, + minDate: { + type: Number, + value: new Date(currentYear - 10, 0, 1).getTime(), + observer: 'updateValue', + }, + maxDate: { + type: Number, + value: new Date(currentYear + 10, 11, 31).getTime(), + observer: 'updateValue', + }, + minHour: { + type: Number, + value: 0, + observer: 'updateValue', + }, + maxHour: { + type: Number, + value: 23, + observer: 'updateValue', + }, + minMinute: { + type: Number, + value: 0, + observer: 'updateValue', + }, + maxMinute: { + type: Number, + value: 59, + observer: 'updateValue', + }, + }), + data: { + innerValue: Date.now(), + columns: [], + }, + methods: { + updateValue() { + const { data } = this; + const val = this.correctValue(data.value); + const isEqual = val === data.innerValue; + if (!isEqual) { + this.updateColumnValue(val).then(() => { + this.$emit('input', val); + }); + } else { + this.updateColumns(); + } + }, + getPicker() { + if (this.picker == null) { + this.picker = this.selectComponent('.van-datetime-picker'); + const { picker } = this; + const { setColumnValues } = picker; + picker.setColumnValues = (...args) => + setColumnValues.apply(picker, [...args, false]); + } + return this.picker; + }, + updateColumns() { + const { formatter = defaultFormatter } = this.data; + const results = this.getOriginColumns().map((column) => ({ + values: column.values.map((value) => formatter(column.type, value)), + })); + return this.set({ columns: results }); + }, + getOriginColumns() { + const { filter } = this.data; + const results = this.getRanges().map(({ type, range }) => { + let values = times(range[1] - range[0] + 1, (index) => { + let value = range[0] + index; + value = type === 'year' ? `${value}` : padZero(value); + return value; + }); + if (filter) { + values = filter(type, values); + } + return { type, values }; + }); + return results; + }, + getRanges() { + const { data } = this; + if (data.type === 'time') { + return [ + { + type: 'hour', + range: [data.minHour, data.maxHour], + }, + { + type: 'minute', + range: [data.minMinute, data.maxMinute], + }, + ]; + } + const { + maxYear, + maxDate, + maxMonth, + maxHour, + maxMinute, + } = this.getBoundary('max', data.innerValue); + const { + minYear, + minDate, + minMonth, + minHour, + minMinute, + } = this.getBoundary('min', data.innerValue); + const result = [ + { + type: 'year', + range: [minYear, maxYear], + }, + { + type: 'month', + range: [minMonth, maxMonth], + }, + { + type: 'day', + range: [minDate, maxDate], + }, + { + type: 'hour', + range: [minHour, maxHour], + }, + { + type: 'minute', + range: [minMinute, maxMinute], + }, + ]; + if (data.type === 'date') result.splice(3, 2); + if (data.type === 'year-month') result.splice(2, 3); + return result; + }, + correctValue(value) { + const { data } = this; + // validate value + const isDateType = data.type !== 'time'; + if (isDateType && !isValidDate(value)) { + value = data.minDate; + } else if (!isDateType && !value) { + const { minHour } = data; + value = `${padZero(minHour)}:00`; + } + // time type + if (!isDateType) { + let [hour, minute] = value.split(':'); + hour = padZero(range(hour, data.minHour, data.maxHour)); + minute = padZero(range(minute, data.minMinute, data.maxMinute)); + return `${hour}:${minute}`; + } + // date type + value = Math.max(value, data.minDate); + value = Math.min(value, data.maxDate); + return value; + }, + getBoundary(type, innerValue) { + const value = new Date(innerValue); + const boundary = new Date(this.data[`${type}Date`]); + const year = boundary.getFullYear(); + let month = 1; + let date = 1; + let hour = 0; + let minute = 0; + if (type === 'max') { + month = 12; + date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1); + hour = 23; + minute = 59; + } + if (value.getFullYear() === year) { + month = boundary.getMonth() + 1; + if (value.getMonth() + 1 === month) { + date = boundary.getDate(); + if (value.getDate() === date) { + hour = boundary.getHours(); + if (value.getHours() === hour) { + minute = boundary.getMinutes(); + } + } + } + } + return { + [`${type}Year`]: year, + [`${type}Month`]: month, + [`${type}Date`]: date, + [`${type}Hour`]: hour, + [`${type}Minute`]: minute, + }; + }, + onCancel() { + this.$emit('cancel'); + }, + onConfirm() { + this.$emit('confirm', this.data.innerValue); + }, + onChange() { + const { data } = this; + let value; + const picker = this.getPicker(); + const originColumns = this.getOriginColumns(); + if (data.type === 'time') { + const indexes = picker.getIndexes(); + value = `${+originColumns[0].values[indexes[0]]}:${+originColumns[1] + .values[indexes[1]]}`; + } else { + const indexes = picker.getIndexes(); + const values = indexes.map( + (value, index) => originColumns[index].values[value] + ); + const year = getTrueValue(values[0]); + const month = getTrueValue(values[1]); + const maxDate = getMonthEndDay(year, month); + let date = getTrueValue(values[2]); + if (data.type === 'year-month') { + date = 1; + } + date = date > maxDate ? maxDate : date; + let hour = 0; + let minute = 0; + if (data.type === 'datetime') { + hour = getTrueValue(values[3]); + minute = getTrueValue(values[4]); + } + value = new Date(year, month - 1, date, hour, minute); + } + value = this.correctValue(value); + this.updateColumnValue(value).then(() => { + this.$emit('input', value); + this.$emit('change', picker); + }); + }, + updateColumnValue(value) { + let values = []; + const { type } = this.data; + const formatter = this.data.formatter || defaultFormatter; + const picker = this.getPicker(); + if (type === 'time') { + const pair = value.split(':'); + values = [formatter('hour', pair[0]), formatter('minute', pair[1])]; + } else { + const date = new Date(value); + values = [ + formatter('year', `${date.getFullYear()}`), + formatter('month', padZero(date.getMonth() + 1)), + ]; + if (type === 'date') { + values.push(formatter('day', padZero(date.getDate()))); + } + if (type === 'datetime') { + values.push( + formatter('day', padZero(date.getDate())), + formatter('hour', padZero(date.getHours())), + formatter('minute', padZero(date.getMinutes())) + ); + } + } + return this.set({ innerValue: value }) + .then(() => this.updateColumns()) + .then(() => picker.setValues(values)); + }, + }, + created() { + const innerValue = this.correctValue(this.data.value); + this.updateColumnValue(innerValue).then(() => { + this.$emit('input', innerValue); + }); + }, +}); diff --git a/vant/dist/datetime-picker/index.json b/vant/dist/datetime-picker/index.json new file mode 100755 index 0000000..a778e91 --- /dev/null +++ b/vant/dist/datetime-picker/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-picker": "../picker/index" + } +} diff --git a/vant/dist/datetime-picker/index.wxml b/vant/dist/datetime-picker/index.wxml new file mode 100755 index 0000000..ade2202 --- /dev/null +++ b/vant/dist/datetime-picker/index.wxml @@ -0,0 +1,16 @@ + diff --git a/vant/dist/datetime-picker/index.wxss b/vant/dist/datetime-picker/index.wxss new file mode 100755 index 0000000..99694d6 --- /dev/null +++ b/vant/dist/datetime-picker/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/vant/dist/definitions/index.d.ts b/vant/dist/definitions/index.d.ts new file mode 100755 index 0000000..586e7bb --- /dev/null +++ b/vant/dist/definitions/index.d.ts @@ -0,0 +1,43 @@ +/// +interface VantComponentInstance { + parent: WechatMiniprogram.Component.TrivialInstance; + children: WechatMiniprogram.Component.TrivialInstance[]; + index: number; + $emit: ( + name: string, + detail?: unknown, + options?: WechatMiniprogram.Component.TriggerEventOption + ) => void; +} +export declare type VantComponentOptions< + Data extends WechatMiniprogram.Component.DataOption, + Props extends WechatMiniprogram.Component.PropertyOption, + Methods extends WechatMiniprogram.Component.MethodOption +> = { + data?: Data; + field?: boolean; + classes?: string[]; + mixins?: string[]; + props?: Props; + relation?: { + relations: Record; + mixin: string; + }; + methods?: Methods; + beforeCreate?: () => void; + created?: () => void; + mounted?: () => void; + destroyed?: () => void; +} & ThisType< + VantComponentInstance & + WechatMiniprogram.Component.Instance< + Data & { + name: string; + value: any; + }, + Props, + Methods + > & + Record +>; +export {}; diff --git a/vant/dist/definitions/index.js b/vant/dist/definitions/index.js new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/definitions/index.js @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/dialog/dialog.d.ts b/vant/dist/dialog/dialog.d.ts new file mode 100755 index 0000000..7144032 --- /dev/null +++ b/vant/dist/dialog/dialog.d.ts @@ -0,0 +1,80 @@ +/// +export declare type Action = 'confirm' | 'cancel' | 'overlay'; +interface DialogOptions { + lang?: string; + show?: boolean; + title?: string; + width?: string | number | null; + zIndex?: number; + theme?: string; + context?: + | WechatMiniprogram.Page.TrivialInstance + | WechatMiniprogram.Component.TrivialInstance; + message?: string; + overlay?: boolean; + selector?: string; + ariaLabel?: string; + className?: string; + customStyle?: string; + transition?: string; + /** + * @deprecated use beforeClose instead + */ + asyncClose?: boolean; + beforeClose?: null | ((action: Action) => Promise | void); + businessId?: number; + sessionFrom?: string; + overlayStyle?: string; + appParameter?: string; + messageAlign?: string; + sendMessageImg?: string; + showMessageCard?: boolean; + sendMessagePath?: string; + sendMessageTitle?: string; + confirmButtonText?: string; + cancelButtonText?: string; + showConfirmButton?: boolean; + showCancelButton?: boolean; + closeOnClickOverlay?: boolean; + confirmButtonOpenType?: string; +} +declare const Dialog: { + (options: DialogOptions): Promise< + WechatMiniprogram.Component.Instance< + Record, + Record, + Record, + Record, + false + > + >; + alert( + options: DialogOptions + ): Promise< + WechatMiniprogram.Component.Instance< + Record, + Record, + Record, + Record, + false + > + >; + confirm( + options: DialogOptions + ): Promise< + WechatMiniprogram.Component.Instance< + Record, + Record, + Record, + Record, + false + > + >; + close(): void; + stopLoading(): void; + currentOptions: DialogOptions; + defaultOptions: DialogOptions; + setDefaultOptions(options: DialogOptions): void; + resetDefaultOptions(): void; +}; +export default Dialog; diff --git a/vant/dist/dialog/dialog.js b/vant/dist/dialog/dialog.js new file mode 100755 index 0000000..542c07b --- /dev/null +++ b/vant/dist/dialog/dialog.js @@ -0,0 +1,84 @@ +let queue = []; +const defaultOptions = { + show: false, + title: '', + width: null, + theme: 'default', + message: '', + zIndex: 100, + overlay: true, + selector: '#van-dialog', + className: '', + asyncClose: false, + beforeClose: null, + transition: 'scale', + customStyle: '', + messageAlign: '', + overlayStyle: '', + confirmButtonText: '确认', + cancelButtonText: '取消', + showConfirmButton: true, + showCancelButton: false, + closeOnClickOverlay: false, + confirmButtonOpenType: '', +}; +let currentOptions = Object.assign({}, defaultOptions); +function getContext() { + const pages = getCurrentPages(); + return pages[pages.length - 1]; +} +const Dialog = (options) => { + options = Object.assign(Object.assign({}, currentOptions), options); + return new Promise((resolve, reject) => { + const context = options.context || getContext(); + const dialog = context.selectComponent(options.selector); + delete options.context; + delete options.selector; + if (dialog) { + dialog.setData( + Object.assign( + { + callback: (action, instance) => { + action === 'confirm' ? resolve(instance) : reject(instance); + }, + }, + options + ) + ); + wx.nextTick(() => { + dialog.setData({ show: true }); + }); + queue.push(dialog); + } else { + console.warn( + '未找到 van-dialog 节点,请确认 selector 及 context 是否正确' + ); + } + }); +}; +Dialog.alert = (options) => Dialog(options); +Dialog.confirm = (options) => + Dialog(Object.assign({ showCancelButton: true }, options)); +Dialog.close = () => { + queue.forEach((dialog) => { + dialog.close(); + }); + queue = []; +}; +Dialog.stopLoading = () => { + queue.forEach((dialog) => { + dialog.stopLoading(); + }); +}; +Dialog.currentOptions = currentOptions; +Dialog.defaultOptions = defaultOptions; +Dialog.setDefaultOptions = (options) => { + currentOptions = Object.assign(Object.assign({}, currentOptions), options); + Dialog.currentOptions = currentOptions; +}; +Dialog.resetDefaultOptions = () => { + currentOptions = Object.assign({}, defaultOptions); + Dialog.currentOptions = currentOptions; +}; +Dialog.resetDefaultOptions(); +export default Dialog; diff --git a/vant/dist/dialog/index.d.ts b/vant/dist/dialog/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/dialog/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/dialog/index.js b/vant/dist/dialog/index.js new file mode 100755 index 0000000..5388cda --- /dev/null +++ b/vant/dist/dialog/index.js @@ -0,0 +1,122 @@ +import { VantComponent } from '../common/component'; +import { button } from '../mixins/button'; +import { openType } from '../mixins/open-type'; +import { GRAY, RED } from '../common/color'; +import { toPromise } from '../common/utils'; +VantComponent({ + mixins: [button, openType], + props: { + show: { + type: Boolean, + observer(show) { + !show && this.stopLoading(); + }, + }, + title: String, + message: String, + theme: { + type: String, + value: 'default', + }, + useSlot: Boolean, + className: String, + customStyle: String, + asyncClose: Boolean, + messageAlign: String, + beforeClose: null, + overlayStyle: String, + useTitleSlot: Boolean, + showCancelButton: Boolean, + closeOnClickOverlay: Boolean, + confirmButtonOpenType: String, + width: null, + zIndex: { + type: Number, + value: 2000, + }, + confirmButtonText: { + type: String, + value: '确认', + }, + cancelButtonText: { + type: String, + value: '取消', + }, + confirmButtonColor: { + type: String, + value: RED, + }, + cancelButtonColor: { + type: String, + value: GRAY, + }, + showConfirmButton: { + type: Boolean, + value: true, + }, + overlay: { + type: Boolean, + value: true, + }, + transition: { + type: String, + value: 'scale', + }, + }, + data: { + loading: { + confirm: false, + cancel: false, + }, + callback: () => {}, + }, + methods: { + onConfirm() { + this.handleAction('confirm'); + }, + onCancel() { + this.handleAction('cancel'); + }, + onClickOverlay() { + this.close('overlay'); + }, + close(action) { + this.setData({ show: false }); + wx.nextTick(() => { + this.$emit('close', action); + const { callback } = this.data; + if (callback) { + callback(action, this); + } + }); + }, + stopLoading() { + this.setData({ + loading: { + confirm: false, + cancel: false, + }, + }); + }, + handleAction(action) { + this.$emit(action, { dialog: this }); + const { asyncClose, beforeClose } = this.data; + if (!asyncClose && !beforeClose) { + this.close(action); + return; + } + this.setData({ + [`loading.${action}`]: true, + }); + if (beforeClose) { + toPromise(beforeClose(action)).then((value) => { + if (value) { + this.close(action); + } else { + this.stopLoading(); + } + }); + } + }, + }, +}); diff --git a/vant/dist/dialog/index.json b/vant/dist/dialog/index.json new file mode 100755 index 0000000..43417fc --- /dev/null +++ b/vant/dist/dialog/index.json @@ -0,0 +1,9 @@ +{ + "component": true, + "usingComponents": { + "van-popup": "../popup/index", + "van-button": "../button/index", + "van-goods-action": "../goods-action/index", + "van-goods-action-button": "../goods-action-button/index" + } +} diff --git a/vant/dist/dialog/index.wxml b/vant/dist/dialog/index.wxml new file mode 100755 index 0000000..fd13bc9 --- /dev/null +++ b/vant/dist/dialog/index.wxml @@ -0,0 +1,113 @@ + + + + + + {{ title }} + + + + + {{ message }} + + + + + {{ cancelButtonText }} + + + {{ confirmButtonText }} + + + + + + {{ cancelButtonText }} + + + {{ confirmButtonText }} + + + diff --git a/vant/dist/dialog/index.wxss b/vant/dist/dialog/index.wxss new file mode 100755 index 0000000..c6bac95 --- /dev/null +++ b/vant/dist/dialog/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-dialog{top:45%!important;overflow:hidden;width:320px;width:var(--dialog-width,320px);font-size:16px;font-size:var(--dialog-font-size,16px);border-radius:16px;border-radius:var(--dialog-border-radius,16px);background-color:#fff;background-color:var(--dialog-background-color,#fff)}@media (max-width:321px){.van-dialog{width:90%;width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{text-align:center;padding-top:24px;padding-top:var(--dialog-header-padding-top,24px);font-weight:500;font-weight:var(--dialog-header-font-weight,500);line-height:24px;line-height:var(--dialog-header-line-height,24px)}.van-dialog__header--isolated{padding:24px 0;padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{overflow-y:auto;text-align:center;-webkit-overflow-scrolling:touch;font-size:14px;font-size:var(--dialog-message-font-size,14px);line-height:20px;line-height:var(--dialog-message-line-height,20px);max-height:60vh;max-height:var(--dialog-message-max-height,60vh);padding:24px;padding:var(--dialog-message-padding,24px)}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--hasTitle{padding-top:8px;padding-top:var(--dialog-has-title-message-padding-top,8px);color:#646566;color:var(--dialog-has-title-message-text-color,#646566)}.van-dialog__message--round-button{padding-bottom:16px;color:#323233}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__footer--round-button{position:relative!important;padding:8px 24px 16px!important}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0} \ No newline at end of file diff --git a/vant/dist/divider/index.d.ts b/vant/dist/divider/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/divider/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/divider/index.js b/vant/dist/divider/index.js new file mode 100755 index 0000000..e725740 --- /dev/null +++ b/vant/dist/divider/index.js @@ -0,0 +1,12 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + dashed: Boolean, + hairline: Boolean, + contentPosition: String, + fontSize: String, + borderColor: String, + textColor: String, + customStyle: String, + }, +}); diff --git a/vant/dist/divider/index.json b/vant/dist/divider/index.json new file mode 100755 index 0000000..a89ef4d --- /dev/null +++ b/vant/dist/divider/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} diff --git a/vant/dist/divider/index.wxml b/vant/dist/divider/index.wxml new file mode 100755 index 0000000..f6a5a45 --- /dev/null +++ b/vant/dist/divider/index.wxml @@ -0,0 +1,9 @@ + + + + + + diff --git a/vant/dist/divider/index.wxs b/vant/dist/divider/index.wxs new file mode 100755 index 0000000..215b14f --- /dev/null +++ b/vant/dist/divider/index.wxs @@ -0,0 +1,18 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function rootStyle(data) { + return style([ + { + 'border-color': data.borderColor, + color: data.textColor, + 'font-size': addUnit(data.fontSize), + }, + data.customStyle, + ]); +} + +module.exports = { + rootStyle: rootStyle, +}; diff --git a/vant/dist/divider/index.wxss b/vant/dist/divider/index.wxss new file mode 100755 index 0000000..c055e3a --- /dev/null +++ b/vant/dist/divider/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-divider{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin:16px 0;margin:var(--divider-margin,16px 0);color:#969799;color:var(--divider-text-color,#969799);font-size:14px;font-size:var(--divider-font-size,14px);line-height:24px;line-height:var(--divider-line-height,24px);border:0 solid #ebedf0;border-color:var(--divider-border-color,#ebedf0)}.van-divider:after,.van-divider:before{display:block;-webkit-flex:1;flex:1;box-sizing:border-box;height:1px;border-color:inherit;border-style:inherit;border-width:1px 0 0}.van-divider:before{content:""}.van-divider--hairline:after,.van-divider--hairline:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--center:before,.van-divider--left:before,.van-divider--right:before{margin-right:16px;margin-right:var(--divider-content-padding,16px)}.van-divider--center:after,.van-divider--left:after,.van-divider--right:after{content:"";margin-left:16px;margin-left:var(--divider-content-padding,16px)}.van-divider--left:before{max-width:10%;max-width:var(--divider-content-left-width,10%)}.van-divider--right:after{max-width:10%;max-width:var(--divider-content-right-width,10%)} \ No newline at end of file diff --git a/vant/dist/dropdown-item/index.d.ts b/vant/dist/dropdown-item/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/dropdown-item/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/dropdown-item/index.js b/vant/dist/dropdown-item/index.js new file mode 100755 index 0000000..95da1ee --- /dev/null +++ b/vant/dist/dropdown-item/index.js @@ -0,0 +1,111 @@ +import { useParent } from '../common/relation'; +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + relation: useParent('dropdown-menu', function () { + this.updateDataFromParent(); + }), + props: { + value: { + type: null, + observer: 'rerender', + }, + title: { + type: String, + observer: 'rerender', + }, + disabled: Boolean, + titleClass: { + type: String, + observer: 'rerender', + }, + options: { + type: Array, + value: [], + observer: 'rerender', + }, + popupStyle: String, + }, + data: { + transition: true, + showPopup: false, + showWrapper: false, + displayTitle: '', + }, + methods: { + rerender() { + wx.nextTick(() => { + var _a; + (_a = this.parent) === null || _a === void 0 + ? void 0 + : _a.updateItemListData(); + }); + }, + updateDataFromParent() { + if (this.parent) { + const { + overlay, + duration, + activeColor, + closeOnClickOverlay, + direction, + } = this.parent.data; + this.setData({ + overlay, + duration, + activeColor, + closeOnClickOverlay, + direction, + }); + } + }, + onOpen() { + this.$emit('open'); + }, + onOpened() { + this.$emit('opened'); + }, + onClose() { + this.$emit('close'); + }, + onClosed() { + this.$emit('closed'); + this.setData({ showWrapper: false }); + }, + onOptionTap(event) { + const { option } = event.currentTarget.dataset; + const { value } = option; + const shouldEmitChange = this.data.value !== value; + this.setData({ showPopup: false, value }); + this.$emit('close'); + this.rerender(); + if (shouldEmitChange) { + this.$emit('change', value); + } + }, + toggle(show, options = {}) { + var _a; + const { showPopup } = this.data; + if (typeof show !== 'boolean') { + show = !showPopup; + } + if (show === showPopup) { + return; + } + this.setData({ + transition: !options.immediate, + showPopup: show, + }); + if (show) { + (_a = this.parent) === null || _a === void 0 + ? void 0 + : _a.getChildWrapperStyle().then((wrapperStyle) => { + this.setData({ wrapperStyle, showWrapper: true }); + this.rerender(); + }); + } else { + this.rerender(); + } + }, + }, +}); diff --git a/vant/dist/dropdown-item/index.json b/vant/dist/dropdown-item/index.json new file mode 100755 index 0000000..88d5409 --- /dev/null +++ b/vant/dist/dropdown-item/index.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "van-popup": "../popup/index", + "van-cell": "../cell/index", + "van-icon": "../icon/index" + } +} diff --git a/vant/dist/dropdown-item/index.wxml b/vant/dist/dropdown-item/index.wxml new file mode 100755 index 0000000..dd75292 --- /dev/null +++ b/vant/dist/dropdown-item/index.wxml @@ -0,0 +1,48 @@ + + + + + + + {{ item.text }} + + + + + + + diff --git a/vant/dist/dropdown-item/index.wxss b/vant/dist/dropdown-item/index.wxss new file mode 100755 index 0000000..7cab3f2 --- /dev/null +++ b/vant/dist/dropdown-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-dropdown-item{position:fixed;right:0;left:0;overflow:hidden}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:#ee0a24;color:var(--dropdown-menu-option-active-color,#ee0a24)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit} \ No newline at end of file diff --git a/vant/dist/dropdown-item/shared.d.ts b/vant/dist/dropdown-item/shared.d.ts new file mode 100755 index 0000000..c90bd9e --- /dev/null +++ b/vant/dist/dropdown-item/shared.d.ts @@ -0,0 +1,5 @@ +export interface Option { + text: string; + value: string | number; + icon: string; +} diff --git a/vant/dist/dropdown-item/shared.js b/vant/dist/dropdown-item/shared.js new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/dropdown-item/shared.js @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/dropdown-menu/index.d.ts b/vant/dist/dropdown-menu/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/dropdown-menu/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/dropdown-menu/index.js b/vant/dist/dropdown-menu/index.js new file mode 100755 index 0000000..aba11b9 --- /dev/null +++ b/vant/dist/dropdown-menu/index.js @@ -0,0 +1,112 @@ +import { VantComponent } from '../common/component'; +import { useChildren } from '../common/relation'; +import { addUnit, getRect, getSystemInfoSync } from '../common/utils'; +let ARRAY = []; +VantComponent({ + field: true, + relation: useChildren('dropdown-item', function () { + this.updateItemListData(); + }), + props: { + activeColor: { + type: String, + observer: 'updateChildrenData', + }, + overlay: { + type: Boolean, + value: true, + observer: 'updateChildrenData', + }, + zIndex: { + type: Number, + value: 10, + }, + duration: { + type: Number, + value: 200, + observer: 'updateChildrenData', + }, + direction: { + type: String, + value: 'down', + observer: 'updateChildrenData', + }, + closeOnClickOverlay: { + type: Boolean, + value: true, + observer: 'updateChildrenData', + }, + closeOnClickOutside: { + type: Boolean, + value: true, + }, + }, + data: { + itemListData: [], + }, + beforeCreate() { + const { windowHeight } = getSystemInfoSync(); + this.windowHeight = windowHeight; + ARRAY.push(this); + }, + destroyed() { + ARRAY = ARRAY.filter((item) => item !== this); + }, + methods: { + updateItemListData() { + this.setData({ + itemListData: this.children.map((child) => child.data), + }); + }, + updateChildrenData() { + this.children.forEach((child) => { + child.updateDataFromParent(); + }); + }, + toggleItem(active) { + this.children.forEach((item, index) => { + const { showPopup } = item.data; + if (index === active) { + item.toggle(); + } else if (showPopup) { + item.toggle(false, { immediate: true }); + } + }); + }, + close() { + this.children.forEach((child) => { + child.toggle(false, { immediate: true }); + }); + }, + getChildWrapperStyle() { + const { zIndex, direction } = this.data; + return getRect(this, '.van-dropdown-menu').then((rect) => { + const { top = 0, bottom = 0 } = rect; + const offset = direction === 'down' ? bottom : this.windowHeight - top; + let wrapperStyle = `z-index: ${zIndex};`; + if (direction === 'down') { + wrapperStyle += `top: ${addUnit(offset)};`; + } else { + wrapperStyle += `bottom: ${addUnit(offset)};`; + } + return wrapperStyle; + }); + }, + onTitleTap(event) { + const { index } = event.currentTarget.dataset; + const child = this.children[index]; + if (!child.data.disabled) { + ARRAY.forEach((menuItem) => { + if ( + menuItem && + menuItem.data.closeOnClickOutside && + menuItem !== this + ) { + menuItem.close(); + } + }); + this.toggleItem(index); + } + }, + }, +}); diff --git a/vant/dist/dropdown-menu/index.json b/vant/dist/dropdown-menu/index.json new file mode 100755 index 0000000..467ce29 --- /dev/null +++ b/vant/dist/dropdown-menu/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/vant/dist/dropdown-menu/index.wxml b/vant/dist/dropdown-menu/index.wxml new file mode 100755 index 0000000..220dcb4 --- /dev/null +++ b/vant/dist/dropdown-menu/index.wxml @@ -0,0 +1,17 @@ + + + + + + + + {{ computed.displayTitle(item) }} + + + + + + \ No newline at end of file diff --git a/vant/dist/dropdown-menu/index.wxs b/vant/dist/dropdown-menu/index.wxs new file mode 100755 index 0000000..6538854 --- /dev/null +++ b/vant/dist/dropdown-menu/index.wxs @@ -0,0 +1,16 @@ +/* eslint-disable */ +function displayTitle(item) { + if (item.title) { + return item.title; + } + + var match = item.options.filter(function(option) { + return option.value === item.value; + }); + var displayTitle = match.length ? match[0].text : ''; + return displayTitle; +} + +module.exports = { + displayTitle: displayTitle +}; diff --git a/vant/dist/dropdown-menu/index.wxss b/vant/dist/dropdown-menu/index.wxss new file mode 100755 index 0000000..a410188 --- /dev/null +++ b/vant/dist/dropdown-menu/index.wxss @@ -0,0 +1,77 @@ +@import '../common/index.wxss'; + +.van-dropdown-menu { + display: -webkit-flex; + display: flex; + box-shadow: 0 2px 12px rgba(100, 101, 102, .12); + -webkit-user-select: none; + user-select: none; + height: 50px; + height: var(--dropdown-menu-height, 50px); + background-color: #fff; + background-color: var(--dropdown-menu-background-color, #fff) +} + +.van-dropdown-menu__item { + display: -webkit-flex; + display: flex; + -webkit-flex: 1; + flex: 1; + -webkit-align-items: center; + align-items: center; + -webkit-justify-content: center; + justify-content: center; + min-width: 0 +} + +.van-dropdown-menu__item:active { + opacity: .7 +} + +.van-dropdown-menu__item--disabled:active { + opacity: 1 +} + +.van-dropdown-menu__item--disabled .van-dropdown-menu__title { + color: #969799; + color: var(--dropdown-menu-title-disabled-text-color, #969799) +} + +.van-dropdown-menu__title { + position: relative; + box-sizing: border-box; + max-width: 100%; + padding: 0 8px; + padding: var(--dropdown-menu-title-padding, 0 8px); + color: #323233; + color: var(--dropdown-menu-title-text-color, #323233); + font-size: 14px; + font-size: var(--dropdown-menu-title-font-size, 14px); + line-height: 18px; + line-height: var(--dropdown-menu-title-line-height, 18px) +} + +.van-dropdown-menu__title:after { + position: absolute; + top: 50%; + right: -4px; + margin-top: -5px; + border-color: transparent transparent currentcolor currentcolor; + border-style: solid; + border-width: 3px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + opacity: .8; + content: "" +} + +.van-dropdown-menu__title--active { + color: #ee0a24; + color: var(--dropdown-menu-title-active-text-color, #ee0a24) +} + +.van-dropdown-menu__title--down:after { + margin-top: -1px; + -webkit-transform: rotate(135deg); + transform: rotate(135deg) +} \ No newline at end of file diff --git a/vant/dist/empty/index.d.ts b/vant/dist/empty/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/empty/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/empty/index.js b/vant/dist/empty/index.js new file mode 100755 index 0000000..32ec116 --- /dev/null +++ b/vant/dist/empty/index.js @@ -0,0 +1,10 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + description: String, + image: { + type: String, + value: 'default', + }, + }, +}); diff --git a/vant/dist/empty/index.json b/vant/dist/empty/index.json new file mode 100755 index 0000000..e8cfaaf --- /dev/null +++ b/vant/dist/empty/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/vant/dist/empty/index.wxml b/vant/dist/empty/index.wxml new file mode 100755 index 0000000..9c7b719 --- /dev/null +++ b/vant/dist/empty/index.wxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + {{ description }} + + + + + + diff --git a/vant/dist/empty/index.wxs b/vant/dist/empty/index.wxs new file mode 100755 index 0000000..9696dd4 --- /dev/null +++ b/vant/dist/empty/index.wxs @@ -0,0 +1,14 @@ +/* eslint-disable */ +var PRESETS = ['error', 'search', 'default', 'network']; + +function imageUrl(image) { + if (PRESETS.indexOf(image) !== -1) { + return 'https://img.yzcdn.cn/vant/empty-image-' + image + '.png'; + } + + return image; +} + +module.exports = { + imageUrl: imageUrl, +}; diff --git a/vant/dist/empty/index.wxss b/vant/dist/empty/index.wxss new file mode 100755 index 0000000..ea23d5f --- /dev/null +++ b/vant/dist/empty/index.wxss @@ -0,0 +1,49 @@ +@import '../common/index.wxss'; + +.van-empty { + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + flex-direction: column; + -webkit-align-items: center; + align-items: center; + -webkit-justify-content: center; + justify-content: center; + box-sizing: border-box; + padding: 10px 0 +} + +.van-empty__image { + width: 100px; + height: 100px +} + +.van-empty__image:empty { + display: none +} + +.van-empty__image__img { + width: 100%; + height: 100% +} + +.van-empty__image:not(:empty)+.van-empty__image { + display: none +} + +.van-empty__description { + margin-top: 16px; + padding: 0 60px; + color: #969799; + font-size: 14px; + line-height: 20px +} + +.van-empty__description:empty, +.van-empty__description:not(:empty)+.van-empty__description { + display: none +} + +.van-empty__bottom { + margin-top: 24px +} \ No newline at end of file diff --git a/vant/dist/field/index.d.ts b/vant/dist/field/index.d.ts new file mode 100755 index 0000000..cb0ff5c --- /dev/null +++ b/vant/dist/field/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vant/dist/field/index.js b/vant/dist/field/index.js new file mode 100755 index 0000000..fd3472d --- /dev/null +++ b/vant/dist/field/index.js @@ -0,0 +1,126 @@ +import { nextTick } from '../common/utils'; +import { VantComponent } from '../common/component'; +import { commonProps, inputProps, textareaProps } from './props'; +VantComponent({ + field: true, + classes: ['input-class', 'right-icon-class', 'label-class'], + props: Object.assign( + Object.assign( + Object.assign(Object.assign({}, commonProps), inputProps), + textareaProps + ), + { + size: String, + icon: String, + label: String, + error: Boolean, + center: Boolean, + isLink: Boolean, + leftIcon: String, + rightIcon: String, + autosize: null, + required: Boolean, + iconClass: String, + clickable: Boolean, + inputAlign: String, + customStyle: String, + errorMessage: String, + arrowDirection: String, + showWordLimit: Boolean, + errorMessageAlign: String, + readonly: { + type: Boolean, + observer: 'setShowClear', + }, + clearable: { + type: Boolean, + observer: 'setShowClear', + }, + border: { + type: Boolean, + value: true, + }, + titleWidth: { + type: String, + value: '6.2em', + }, + } + ), + data: { + focused: false, + innerValue: '', + showClear: false, + }, + created() { + this.value = this.data.value; + this.setData({ innerValue: this.value }); + }, + methods: { + onInput(event) { + const { value = '' } = event.detail || {}; + this.value = value; + this.setShowClear(); + this.emitChange(); + }, + onFocus(event) { + this.focused = true; + this.setShowClear(); + this.$emit('focus', event.detail); + }, + onBlur(event) { + this.focused = false; + this.setShowClear(); + this.$emit('blur', event.detail); + }, + onClickIcon() { + this.$emit('click-icon'); + }, + onClickInput(event) { + this.$emit('click-input', event.detail); + }, + onClear() { + this.setData({ innerValue: '' }); + this.value = ''; + this.setShowClear(); + nextTick(() => { + this.emitChange(); + this.$emit('clear', ''); + }); + }, + onConfirm(event) { + const { value = '' } = event.detail || {}; + this.value = value; + this.setShowClear(); + this.$emit('confirm', value); + }, + setValue(value) { + this.value = value; + this.setShowClear(); + if (value === '') { + this.setData({ innerValue: '' }); + } + this.emitChange(); + }, + onLineChange(event) { + this.$emit('linechange', event.detail); + }, + onKeyboardHeightChange(event) { + this.$emit('keyboardheightchange', event.detail); + }, + emitChange() { + this.setData({ value: this.value }); + nextTick(() => { + this.$emit('input', this.value); + this.$emit('change', this.value); + }); + }, + setShowClear() { + const { clearable, readonly } = this.data; + const { focused, value } = this; + this.setData({ + showClear: !!clearable && !!focused && !!value && !readonly, + }); + }, + noop() {}, + }, +}); diff --git a/vant/dist/field/index.json b/vant/dist/field/index.json new file mode 100755 index 0000000..5906c50 --- /dev/null +++ b/vant/dist/field/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index", + "van-icon": "../icon/index" + } +} diff --git a/vant/dist/field/index.wxml b/vant/dist/field/index.wxml new file mode 100755 index 0000000..9dc8b66 --- /dev/null +++ b/vant/dist/field/index.wxml @@ -0,0 +1,56 @@ + + + + + + + {{ label }} + + + + + + + + + + + + + + + + + + + + + {{ value.length >= maxlength ? maxlength : value.length }}/{{ maxlength }} + + + {{ errorMessage }} + + diff --git a/vant/dist/field/index.wxs b/vant/dist/field/index.wxs new file mode 100755 index 0000000..78575b9 --- /dev/null +++ b/vant/dist/field/index.wxs @@ -0,0 +1,18 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function inputStyle(autosize) { + if (autosize && autosize.constructor === 'Object') { + return style({ + 'min-height': addUnit(autosize.minHeight), + 'max-height': addUnit(autosize.maxHeight), + }); + } + + return ''; +} + +module.exports = { + inputStyle: inputStyle, +}; diff --git a/vant/dist/field/index.wxss b/vant/dist/field/index.wxss new file mode 100755 index 0000000..171f613 --- /dev/null +++ b/vant/dist/field/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-field{--cell-icon-size:16px;--cell-icon-size:var(--field-icon-size,16px)}.van-field__label{color:#646566;color:var(--field-label-color,#646566)}.van-field__label--disabled{color:#c8c9cc;color:var(--field-disabled-text-color,#c8c9cc)}.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{box-sizing:border-box;padding:3.6px 0;line-height:1.2em;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__control:empty+.van-field__control{display:block}.van-field__control{position:relative;display:none;box-sizing:border-box;width:100%;margin:0;padding:0;line-height:inherit;text-align:left;background-color:initial;border:0;resize:none;color:#323233;color:var(--field-input-text-color,#323233);height:24px;height:var(--cell-line-height,24px);min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__control:empty{display:none}.van-field__control--textarea{height:18px;height:var(--field-text-area-min-height,18px);min-height:18px;min-height:var(--field-text-area-min-height,18px)}.van-field__control--error{color:#ee0a24;color:var(--field-input-error-text-color,#ee0a24)}.van-field__control--disabled{background-color:initial;opacity:1;color:#c8c9cc;color:var(--field-input-disabled-text-color,#c8c9cc)}.van-field__control--center{text-align:center}.van-field__control--right{text-align:right}.van-field__control--custom{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__placeholder{position:absolute;top:0;right:0;left:0;pointer-events:none;color:#c8c9cc;color:var(--field-placeholder-text-color,#c8c9cc)}.van-field__placeholder--error{color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:24px;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;vertical-align:middle;padding:0 8px;padding:0 var(--padding-xs,8px);margin-right:-8px;margin-right:-var(--padding-xs,8px)}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{font-size:16px;font-size:var(--field-clear-icon-size,16px);color:#c8c9cc;color:var(--field-clear-icon-color,#c8c9cc)}.van-field__icon-container{font-size:16px;font-size:var(--field-icon-size,16px);color:#969799;color:var(--field-icon-container-color,#969799)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:8px;padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{text-align:left;font-size:12px;font-size:var(--field-error-message-text-font-size,12px);color:#ee0a24;color:var(--field-error-message-color,#ee0a24)}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{text-align:right;margin-top:4px;margin-top:var(--padding-base,4px);color:#646566;color:var(--field-word-limit-color,#646566);font-size:12px;font-size:var(--field-word-limit-font-size,12px);line-height:16px;line-height:var(--field-word-limit-line-height,16px)}.van-field__word-num{display:inline}.van-field__word-num--full{color:#ee0a24;color:var(--field-word-num-full-color,#ee0a24)} \ No newline at end of file diff --git a/vant/dist/field/input.wxml b/vant/dist/field/input.wxml new file mode 100755 index 0000000..3ecab24 --- /dev/null +++ b/vant/dist/field/input.wxml @@ -0,0 +1,27 @@ + diff --git a/vant/dist/field/props.d.ts b/vant/dist/field/props.d.ts new file mode 100755 index 0000000..5cd130a --- /dev/null +++ b/vant/dist/field/props.d.ts @@ -0,0 +1,4 @@ +/// +export declare const commonProps: WechatMiniprogram.Component.PropertyOption; +export declare const inputProps: WechatMiniprogram.Component.PropertyOption; +export declare const textareaProps: WechatMiniprogram.Component.PropertyOption; diff --git a/vant/dist/field/props.js b/vant/dist/field/props.js new file mode 100755 index 0000000..218749f --- /dev/null +++ b/vant/dist/field/props.js @@ -0,0 +1,63 @@ +export const commonProps = { + value: { + type: String, + observer(value) { + if (value !== this.value) { + this.setData({ innerValue: value }); + this.value = value; + } + }, + }, + placeholder: String, + placeholderStyle: String, + placeholderClass: String, + disabled: Boolean, + maxlength: { + type: Number, + value: -1, + }, + cursorSpacing: { + type: Number, + value: 50, + }, + autoFocus: Boolean, + focus: Boolean, + cursor: { + type: Number, + value: -1, + }, + selectionStart: { + type: Number, + value: -1, + }, + selectionEnd: { + type: Number, + value: -1, + }, + adjustPosition: { + type: Boolean, + value: true, + }, + holdKeyboard: Boolean, +}; +export const inputProps = { + type: { + type: String, + value: 'text', + }, + password: Boolean, + confirmType: String, + confirmHold: Boolean, +}; +export const textareaProps = { + autoHeight: Boolean, + fixed: Boolean, + showConfirmBar: { + type: Boolean, + value: true, + }, + disableDefaultPadding: { + type: Boolean, + value: true, + }, +}; diff --git a/vant/dist/field/textarea.wxml b/vant/dist/field/textarea.wxml new file mode 100755 index 0000000..5015a51 --- /dev/null +++ b/vant/dist/field/textarea.wxml @@ -0,0 +1,29 @@ +