├── .gitignore ├── App.vue ├── components ├── coolc-coupon │ └── coolc-coupon.vue ├── mix-list-cell.vue ├── package-lock.json ├── package.json └── uni-ui │ ├── uni-badge │ └── uni-badge.vue │ ├── uni-calendar │ ├── calendar.js │ ├── uni-calendar-item.vue │ ├── uni-calendar.vue │ └── util.js │ ├── uni-card │ └── uni-card.vue │ ├── uni-collapse-item │ └── uni-collapse-item.vue │ ├── uni-collapse │ └── uni-collapse.vue │ ├── uni-combox │ └── uni-combox.vue │ ├── uni-countdown │ └── uni-countdown.vue │ ├── uni-drawer │ └── uni-drawer.vue │ ├── uni-fab │ └── uni-fab.vue │ ├── uni-fav │ └── uni-fav.vue │ ├── uni-goods-nav │ └── uni-goods-nav.vue │ ├── uni-grid-item │ ├── uni-grid-item copy.vue │ └── uni-grid-item.vue │ ├── uni-grid │ └── uni-grid.vue │ ├── uni-icons │ ├── icons.js │ ├── uni-icons.vue │ └── uni.ttf │ ├── uni-indexed-list │ ├── uni-indexed-list-item.vue │ └── uni-indexed-list.vue │ ├── uni-link │ └── uni-link.vue │ ├── uni-list-ad │ └── uni-list-ad.vue │ ├── uni-list-chat │ ├── uni-list-chat.scss │ └── uni-list-chat.vue │ ├── uni-list-item │ └── uni-list-item.vue │ ├── uni-list │ ├── uni-list.vue │ ├── uni-refresh.vue │ └── uni-refresh.wxs │ ├── uni-load-more │ └── uni-load-more.vue │ ├── uni-nav-bar │ └── uni-nav-bar.vue │ ├── uni-notice-bar │ └── uni-notice-bar.vue │ ├── uni-number-box │ └── uni-number-box.vue │ ├── uni-pagination │ └── uni-pagination.vue │ ├── uni-popup-dialog │ └── uni-popup-dialog.vue │ ├── uni-popup-message │ └── uni-popup-message.vue │ ├── uni-popup-share │ └── uni-popup-share.vue │ ├── uni-popup │ ├── message.js │ ├── popup.js │ ├── share.js │ └── uni-popup.vue │ ├── uni-rate │ └── uni-rate.vue │ ├── uni-search-bar │ └── uni-search-bar.vue │ ├── uni-section │ └── uni-section.vue │ ├── uni-segmented-control │ └── uni-segmented-control.vue │ ├── uni-status-bar │ └── uni-status-bar.vue │ ├── uni-steps │ └── uni-steps.vue │ ├── uni-swipe-action-item │ ├── bindingx.js │ ├── index.wxs │ ├── mpalipay.js │ ├── mpother.js │ ├── mpwxs.js │ └── uni-swipe-action-item.vue │ ├── uni-swipe-action │ └── uni-swipe-action.vue │ ├── uni-swiper-dot │ └── uni-swiper-dot.vue │ ├── uni-tag │ └── uni-tag.vue │ ├── uni-test │ └── uni-test.vue │ ├── uni-title │ └── uni-title.vue │ └── uni-transition │ └── uni-transition.vue ├── image ├── 1.png ├── 2.png ├── 图层1.png ├── 图层2.png ├── 图层3.png └── 图层4.png ├── main.js ├── manifest.json ├── pages.json ├── pages ├── cart │ └── cart.vue ├── find │ └── find.vue ├── index │ └── index.vue └── mine │ ├── center.vue │ ├── hands.vue │ ├── home.vue │ ├── join.vue │ ├── login.vue │ ├── mine.vue │ ├── notice.vue │ ├── qusetion.vue │ └── service.vue ├── static ├── arc.png ├── icons │ ├── 发现 (1).png │ ├── 发现.png │ ├── 我的 (1).png │ ├── 我的.png │ ├── 订单 (1).png │ ├── 订单.png │ ├── 首页 (2).png │ └── 首页.png ├── missing-face.png └── yticon.ttf ├── uni.scss └── utils ├── html.js └── zgrequest.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .project 3 | unpackage/ 4 | .DS_Store -------------------------------------------------------------------------------- /App.vue: -------------------------------------------------------------------------------- 1 | 63 | -------------------------------------------------------------------------------- /components/coolc-coupon/coolc-coupon.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{item.seller_name}}使用 5 | ¥{{item.money}} 6 | {{item.end_time}}前使用 7 | 8 | 券号:{{item.ticket}} 9 | {{item.title}} 10 | 11 | 12 | 选择使用 13 | 立即使用 14 | 15 | 16 | 17 | 53 | 54 | -------------------------------------------------------------------------------- /components/mix-list-cell.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | {{title}} 14 | {{tips}} 15 | 18 | 19 | 20 | 21 | 22 | 23 | 76 | 77 | 120 | -------------------------------------------------------------------------------- /components/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "components", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@babel/runtime": { 8 | "version": "7.12.5", 9 | "resolved": "https://registry.npm.taobao.org/@babel/runtime/download/@babel/runtime-7.12.5.tgz?cache=0&sync_timestamp=1604443606981&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fruntime%2Fdownload%2F%40babel%2Fruntime-7.12.5.tgz", 10 | "integrity": "sha1-QQ5+SHRB4bNgwpvnFdhw2bmFiC4=", 11 | "requires": { 12 | "regenerator-runtime": "^0.13.4" 13 | } 14 | }, 15 | "@popperjs/core": { 16 | "version": "2.5.4", 17 | "resolved": "https://registry.npm.taobao.org/@popperjs/core/download/@popperjs/core-2.5.4.tgz?cache=0&sync_timestamp=1604076368519&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40popperjs%2Fcore%2Fdownload%2F%40popperjs%2Fcore-2.5.4.tgz", 18 | "integrity": "sha1-3iW12p9yeYWjdX/Vm10Cirp1hBo=" 19 | }, 20 | "@vant/icons": { 21 | "version": "1.4.0", 22 | "resolved": "https://registry.npm.taobao.org/@vant/icons/download/@vant/icons-1.4.0.tgz?cache=0&sync_timestamp=1604235300752&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vant%2Ficons%2Fdownload%2F%40vant%2Ficons-1.4.0.tgz", 23 | "integrity": "sha1-qR94lPLzQ1b3il1vi51PGkat0MU=" 24 | }, 25 | "@vant/popperjs": { 26 | "version": "1.0.2", 27 | "resolved": "https://registry.npm.taobao.org/@vant/popperjs/download/@vant/popperjs-1.0.2.tgz?cache=0&sync_timestamp=1607062513238&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vant%2Fpopperjs%2Fdownload%2F%40vant%2Fpopperjs-1.0.2.tgz", 28 | "integrity": "sha1-Ui1xZWI1Elo64I6ccBo7rm/YjXs=", 29 | "requires": { 30 | "@popperjs/core": "^2.5.4" 31 | } 32 | }, 33 | "@vue/babel-helper-vue-jsx-merge-props": { 34 | "version": "1.2.1", 35 | "resolved": "https://registry.npm.taobao.org/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.2.1.tgz?cache=0&sync_timestamp=1602851174430&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-helper-vue-jsx-merge-props%2Fdownload%2F%40vue%2Fbabel-helper-vue-jsx-merge-props-1.2.1.tgz", 36 | "integrity": "sha1-MWJKelBfsU2h1YAjclpMXycOaoE=" 37 | }, 38 | "regenerator-runtime": { 39 | "version": "0.13.7", 40 | "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.7.tgz", 41 | "integrity": "sha1-ysLazIoepnX+qrrriugziYrkb1U=" 42 | }, 43 | "vant": { 44 | "version": "2.11.2", 45 | "resolved": "https://registry.npm.taobao.org/vant/download/vant-2.11.2.tgz?cache=0&sync_timestamp=1607650039589&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvant%2Fdownload%2Fvant-2.11.2.tgz", 46 | "integrity": "sha1-I5xcysneJ2S0Ba/61AjGnbCwnaA=", 47 | "requires": { 48 | "@babel/runtime": "7.x", 49 | "@vant/icons": "1.4.0", 50 | "@vant/popperjs": "^1.0.0", 51 | "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", 52 | "vue-lazyload": "1.2.3" 53 | } 54 | }, 55 | "vue-lazyload": { 56 | "version": "1.2.3", 57 | "resolved": "https://registry.npm.taobao.org/vue-lazyload/download/vue-lazyload-1.2.3.tgz", 58 | "integrity": "sha1-kB+ewVx+bKeHgaK65KNDaGve2yw=" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /components/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "components", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "vant": "^2.11.2" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /components/uni-ui/uni-badge/uni-badge.vue: -------------------------------------------------------------------------------- 1 | 2 | {{ text }} 4 | 5 | 6 | 68 | 69 | 154 | -------------------------------------------------------------------------------- /components/uni-ui/uni-calendar/uni-calendar-item.vue: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | {{weeks.date}} 22 | 今天 30 | {{weeks.isDay?'今天': (weeks.lunar.IDayCn === '初一'?weeks.lunar.IMonthCn:weeks.lunar.IDayCn)}} 39 | {{weeks.extraInfo.info}} 49 | 50 | 51 | 52 | 53 | 86 | 87 | 171 | -------------------------------------------------------------------------------- /components/uni-ui/uni-collapse-item/uni-collapse-item.vue: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | {{ title }} 7 | 8 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 117 | 118 | 219 | -------------------------------------------------------------------------------- /components/uni-ui/uni-collapse/uni-collapse.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 47 | 60 | -------------------------------------------------------------------------------- /components/uni-ui/uni-combox/uni-combox.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{label}} 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | {{emptyTips}} 14 | 15 | 16 | {{item}} 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 127 | 128 | 214 | -------------------------------------------------------------------------------- /components/uni-ui/uni-countdown/uni-countdown.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ d }} 4 | 天 5 | {{ h }} 6 | {{ showColon ? ':' : '时' }} 7 | {{ i }} 8 | {{ showColon ? ':' : '分' }} 9 | {{ s }} 10 | 秒 11 | 12 | 13 | 175 | 212 | -------------------------------------------------------------------------------- /components/uni-ui/uni-drawer/uni-drawer.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 95 | 96 | 171 | -------------------------------------------------------------------------------- /components/uni-ui/uni-fav/uni-fav.vue: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | {{ checked ? contentText.contentFav : contentText.contentDefault }} 14 | 15 | 16 | 17 | 97 | 98 | 141 | -------------------------------------------------------------------------------- /components/uni-ui/uni-goods-nav/uni-goods-nav.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{ item.text }} 13 | 14 | {{ item.info }} 17 | 18 | 19 | 20 | 21 | {{ item.text }} 23 | 24 | 25 | 26 | 27 | 28 | 100 | 101 | 226 | -------------------------------------------------------------------------------- /components/uni-ui/uni-grid-item/uni-grid-item copy.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 70 | 71 | 168 | -------------------------------------------------------------------------------- /components/uni-ui/uni-grid-item/uni-grid-item.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 70 | 71 | 125 | -------------------------------------------------------------------------------- /components/uni-ui/uni-grid/uni-grid.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 107 | 108 | 142 | -------------------------------------------------------------------------------- /components/uni-ui/uni-icons/icons.js: -------------------------------------------------------------------------------- 1 | export default { 2 | "pulldown": "\ue588", 3 | "refreshempty": "\ue461", 4 | "back": "\ue471", 5 | "forward": "\ue470", 6 | "more": "\ue507", 7 | "more-filled": "\ue537", 8 | "scan": "\ue612", 9 | "qq": "\ue264", 10 | "weibo": "\ue260", 11 | "weixin": "\ue261", 12 | "pengyouquan": "\ue262", 13 | "loop": "\ue565", 14 | "refresh": "\ue407", 15 | "refresh-filled": "\ue437", 16 | "arrowthindown": "\ue585", 17 | "arrowthinleft": "\ue586", 18 | "arrowthinright": "\ue587", 19 | "arrowthinup": "\ue584", 20 | "undo-filled": "\ue7d6", 21 | "undo": "\ue406", 22 | "redo": "\ue405", 23 | "redo-filled": "\ue7d9", 24 | "bars": "\ue563", 25 | "chatboxes": "\ue203", 26 | "camera": "\ue301", 27 | "chatboxes-filled": "\ue233", 28 | "camera-filled": "\ue7ef", 29 | "cart-filled": "\ue7f4", 30 | "cart": "\ue7f5", 31 | "checkbox-filled": "\ue442", 32 | "checkbox": "\ue7fa", 33 | "arrowleft": "\ue582", 34 | "arrowdown": "\ue581", 35 | "arrowright": "\ue583", 36 | "smallcircle-filled": "\ue801", 37 | "arrowup": "\ue580", 38 | "circle": "\ue411", 39 | "eye-filled": "\ue568", 40 | "eye-slash-filled": "\ue822", 41 | "eye-slash": "\ue823", 42 | "eye": "\ue824", 43 | "flag-filled": "\ue825", 44 | "flag": "\ue508", 45 | "gear-filled": "\ue532", 46 | "reload": "\ue462", 47 | "gear": "\ue502", 48 | "hand-thumbsdown-filled": "\ue83b", 49 | "hand-thumbsdown": "\ue83c", 50 | "hand-thumbsup-filled": "\ue83d", 51 | "heart-filled": "\ue83e", 52 | "hand-thumbsup": "\ue83f", 53 | "heart": "\ue840", 54 | "home": "\ue500", 55 | "info": "\ue504", 56 | "home-filled": "\ue530", 57 | "info-filled": "\ue534", 58 | "circle-filled": "\ue441", 59 | "chat-filled": "\ue847", 60 | "chat": "\ue263", 61 | "mail-open-filled": "\ue84d", 62 | "email-filled": "\ue231", 63 | "mail-open": "\ue84e", 64 | "email": "\ue201", 65 | "checkmarkempty": "\ue472", 66 | "list": "\ue562", 67 | "locked-filled": "\ue856", 68 | "locked": "\ue506", 69 | "map-filled": "\ue85c", 70 | "map-pin": "\ue85e", 71 | "map-pin-ellipse": "\ue864", 72 | "map": "\ue364", 73 | "minus-filled": "\ue440", 74 | "mic-filled": "\ue332", 75 | "minus": "\ue410", 76 | "micoff": "\ue360", 77 | "mic": "\ue302", 78 | "clear": "\ue434", 79 | "smallcircle": "\ue868", 80 | "close": "\ue404", 81 | "closeempty": "\ue460", 82 | "paperclip": "\ue567", 83 | "paperplane": "\ue503", 84 | "paperplane-filled": "\ue86e", 85 | "person-filled": "\ue131", 86 | "contact-filled": "\ue130", 87 | "person": "\ue101", 88 | "contact": "\ue100", 89 | "images-filled": "\ue87a", 90 | "phone": "\ue200", 91 | "images": "\ue87b", 92 | "image": "\ue363", 93 | "image-filled": "\ue877", 94 | "location-filled": "\ue333", 95 | "location": "\ue303", 96 | "plus-filled": "\ue439", 97 | "plus": "\ue409", 98 | "plusempty": "\ue468", 99 | "help-filled": "\ue535", 100 | "help": "\ue505", 101 | "navigate-filled": "\ue884", 102 | "navigate": "\ue501", 103 | "mic-slash-filled": "\ue892", 104 | "search": "\ue466", 105 | "settings": "\ue560", 106 | "sound": "\ue590", 107 | "sound-filled": "\ue8a1", 108 | "spinner-cycle": "\ue465", 109 | "download-filled": "\ue8a4", 110 | "personadd-filled": "\ue132", 111 | "videocam-filled": "\ue8af", 112 | "personadd": "\ue102", 113 | "upload": "\ue402", 114 | "upload-filled": "\ue8b1", 115 | "starhalf": "\ue463", 116 | "star-filled": "\ue438", 117 | "star": "\ue408", 118 | "trash": "\ue401", 119 | "phone-filled": "\ue230", 120 | "compose": "\ue400", 121 | "videocam": "\ue300", 122 | "trash-filled": "\ue8dc", 123 | "download": "\ue403", 124 | "chatbubble-filled": "\ue232", 125 | "chatbubble": "\ue202", 126 | "cloud-download": "\ue8e4", 127 | "cloud-upload-filled": "\ue8e5", 128 | "cloud-upload": "\ue8e6", 129 | "cloud-download-filled": "\ue8e9", 130 | "headphones":"\ue8bf", 131 | "shop":"\ue609" 132 | } 133 | -------------------------------------------------------------------------------- /components/uni-ui/uni-icons/uni.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/components/uni-ui/uni-icons/uni.ttf -------------------------------------------------------------------------------- /components/uni-ui/uni-indexed-list/uni-indexed-list-item.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ list.key }} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {{ item.name }} 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 58 | 59 | 143 | -------------------------------------------------------------------------------- /components/uni-ui/uni-link/uni-link.vue: -------------------------------------------------------------------------------- 1 | 2 | {{text}} 4 | 5 | 6 | 68 | 69 | 74 | -------------------------------------------------------------------------------- /components/uni-ui/uni-list-ad/uni-list-ad.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 54 | 55 | 91 | -------------------------------------------------------------------------------- /components/uni-ui/uni-list-chat/uni-list-chat.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 这里是 uni-list 组件内置的常用样式变量 3 | * 如果需要覆盖样式,这里提供了基本的组件样式变量,您可以尝试修改这里的变量,去完成样式替换,而不用去修改源码 4 | * 5 | */ 6 | 7 | // 背景色 8 | $background-color : #fff; 9 | // 分割线颜色 10 | $divide-line-color : #e5e5e5; 11 | 12 | // 默认头像大小,如需要修改此值,注意同步修改 js 中的值 const avatarWidth = xx ,目前只支持方形头像 13 | // nvue 页面不支持修改头像大小 14 | $avatar-width : 45px ; 15 | 16 | // 头像边框 17 | $avatar-border-radius: 5px; 18 | $avatar-border-color: #eee; 19 | $avatar-border-width: 1px; 20 | 21 | // 标题文字样式 22 | $title-size : 16px; 23 | $title-color : #3b4144; 24 | $title-weight : normal; 25 | 26 | // 描述文字样式 27 | $note-size : 12px; 28 | $note-color : #999; 29 | $note-weight : normal; 30 | 31 | // 右侧额外内容默认样式 32 | $right-text-size : 12px; 33 | $right-text-color : #999; 34 | $right-text-weight : normal; 35 | 36 | // 角标样式 37 | // nvue 页面不支持修改圆点位置以及大小 38 | // 角标在左侧时,角标的位置,默认为 0 ,负数左/下移动,正数右/上移动 39 | $badge-left: 0px; 40 | $badge-top: 0px; 41 | 42 | // 显示圆点时,圆点大小 43 | $dot-width: 10px; 44 | $dot-height: 10px; 45 | 46 | // 显示角标时,角标大小和字体大小 47 | $badge-size : 18px; 48 | $badge-font : 12px; 49 | // 显示角标时,角标前景色 50 | $badge-color : #fff; 51 | // 显示角标时,角标背景色 52 | $badge-background-color : #ff5a5f; 53 | // 显示角标时,角标左右间距 54 | $badge-space : 6px; 55 | 56 | // 状态样式 57 | // 选中颜色 58 | $hover : #f5f5f5; 59 | -------------------------------------------------------------------------------- /components/uni-ui/uni-list/uni-list.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 57 | 107 | -------------------------------------------------------------------------------- /components/uni-ui/uni-list/uni-refresh.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 59 | 60 | 66 | -------------------------------------------------------------------------------- /components/uni-ui/uni-list/uni-refresh.wxs: -------------------------------------------------------------------------------- 1 | var pullDown = { 2 | threshold: 95, 3 | maxHeight: 200, 4 | callRefresh: 'onrefresh', 5 | callPullingDown: 'onpullingdown', 6 | refreshSelector: '.uni-refresh' 7 | }; 8 | 9 | function ready(newValue, oldValue, ownerInstance, instance) { 10 | var state = instance.getState() 11 | state.canPullDown = newValue; 12 | // console.log(newValue); 13 | } 14 | 15 | function touchStart(e, instance) { 16 | var state = instance.getState(); 17 | state.refreshInstance = instance.selectComponent(pullDown.refreshSelector); 18 | state.canPullDown = (state.refreshInstance != null && state.refreshInstance != undefined); 19 | if (!state.canPullDown) { 20 | return 21 | } 22 | 23 | // console.log("touchStart"); 24 | 25 | state.height = 0; 26 | state.touchStartY = e.touches[0].pageY || e.changedTouches[0].pageY; 27 | state.refreshInstance.setStyle({ 28 | 'height': 0 29 | }); 30 | state.refreshInstance.callMethod("onchange", true); 31 | } 32 | 33 | function touchMove(e, ownerInstance) { 34 | var instance = e.instance; 35 | var state = instance.getState(); 36 | if (!state.canPullDown) { 37 | return 38 | } 39 | 40 | var oldHeight = state.height; 41 | var endY = e.touches[0].pageY || e.changedTouches[0].pageY; 42 | var height = endY - state.touchStartY; 43 | if (height > pullDown.maxHeight) { 44 | return; 45 | } 46 | 47 | var refreshInstance = state.refreshInstance; 48 | refreshInstance.setStyle({ 49 | 'height': height + 'px' 50 | }); 51 | 52 | height = height < pullDown.maxHeight ? height : pullDown.maxHeight; 53 | state.height = height; 54 | refreshInstance.callMethod(pullDown.callPullingDown, { 55 | height: height 56 | }); 57 | } 58 | 59 | function touchEnd(e, ownerInstance) { 60 | var state = e.instance.getState(); 61 | if (!state.canPullDown) { 62 | return 63 | } 64 | 65 | state.refreshInstance.callMethod("onchange", false); 66 | 67 | var refreshInstance = state.refreshInstance; 68 | if (state.height > pullDown.threshold) { 69 | refreshInstance.callMethod(pullDown.callRefresh); 70 | return; 71 | } 72 | 73 | refreshInstance.setStyle({ 74 | 'height': 0 75 | }); 76 | } 77 | 78 | function propObserver(newValue, oldValue, instance) { 79 | pullDown = newValue; 80 | } 81 | 82 | module.exports = { 83 | touchmove: touchMove, 84 | touchstart: touchStart, 85 | touchend: touchEnd, 86 | propObserver: propObserver 87 | } 88 | -------------------------------------------------------------------------------- /components/uni-ui/uni-nav-bar/uni-nav-bar.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | {{ leftText }} 14 | 15 | 16 | 17 | 18 | 19 | {{ title }} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | {{ rightText }} 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 135 | 136 | 243 | -------------------------------------------------------------------------------- /components/uni-ui/uni-number-box/uni-number-box.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | - 5 | 6 | 7 | 8 | + 9 | 10 | 11 | 12 | 121 | 201 | -------------------------------------------------------------------------------- /components/uni-ui/uni-pagination/uni-pagination.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | {{ prevText }} 10 | 11 | 12 | 13 | {{ currentIndex }}/{{ maxPage || 0 }} 14 | 15 | 16 | 19 | 20 | 21 | 22 | {{ nextText }} 23 | 24 | 25 | 26 | 27 | 122 | 123 | 205 | -------------------------------------------------------------------------------- /components/uni-ui/uni-popup-dialog/uni-popup-dialog.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{title}} 5 | 6 | 7 | {{content}} 8 | 9 | 10 | 11 | 12 | 取消 13 | 14 | 15 | 确定 16 | 17 | 18 | 19 | 20 | 21 | 22 | 149 | 150 | 244 | -------------------------------------------------------------------------------- /components/uni-ui/uni-popup-message/uni-popup-message.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{message}} 4 | 5 | 6 | 7 | 68 | 117 | -------------------------------------------------------------------------------- /components/uni-ui/uni-popup-share/uni-popup-share.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{title}} 4 | 5 | 6 | 7 | 8 | {{item.text}} 9 | 10 | 11 | 12 | 13 | 14 | 取消 15 | 16 | 17 | 18 | 19 | 86 | 166 | -------------------------------------------------------------------------------- /components/uni-ui/uni-popup/message.js: -------------------------------------------------------------------------------- 1 | export default { 2 | created() { 3 | if (this.type === 'message') { 4 | // 不显示遮罩 5 | this.maskShow = false 6 | // 获取子组件对象 7 | this.childrenMsg = null 8 | } 9 | }, 10 | methods: { 11 | customOpen() { 12 | if (this.childrenMsg) { 13 | this.childrenMsg.open() 14 | } 15 | }, 16 | customClose() { 17 | if (this.childrenMsg) { 18 | this.childrenMsg.close() 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /components/uni-ui/uni-popup/popup.js: -------------------------------------------------------------------------------- 1 | import message from './message.js'; 2 | // 定义 type 类型:弹出类型:top/bottom/center 3 | const config = { 4 | // 顶部弹出 5 | top:'top', 6 | // 底部弹出 7 | bottom:'bottom', 8 | // 居中弹出 9 | center:'center', 10 | // 消息提示 11 | message:'top', 12 | // 对话框 13 | dialog:'center', 14 | // 分享 15 | share:'bottom', 16 | } 17 | 18 | export default { 19 | data(){ 20 | return { 21 | config:config 22 | } 23 | }, 24 | mixins: [message] 25 | } 26 | -------------------------------------------------------------------------------- /components/uni-ui/uni-popup/share.js: -------------------------------------------------------------------------------- 1 | export default { 2 | created() { 3 | if (this.type === 'share') { 4 | // 关闭点击 5 | this.mkclick = false 6 | } 7 | }, 8 | methods: { 9 | customOpen() { 10 | console.log('share 打开了'); 11 | }, 12 | customClose() { 13 | console.log('share 关闭了'); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /components/uni-ui/uni-popup/uni-popup.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 211 | 298 | -------------------------------------------------------------------------------- /components/uni-ui/uni-search-bar/uni-search-bar.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | {{ placeholder }} 15 | 16 | 17 | 18 | 19 | {{cancelText}} 20 | 21 | 22 | 23 | 139 | 140 | 207 | -------------------------------------------------------------------------------- /components/uni-ui/uni-section/uni-section.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{ title }} 8 | {{ subTitle }} 9 | 10 | 11 | 12 | 13 | 14 | 59 | 137 | -------------------------------------------------------------------------------- /components/uni-ui/uni-segmented-control/uni-segmented-control.vue: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | {{ item }} 18 | 19 | 20 | 21 | 22 | 85 | 86 | 139 | -------------------------------------------------------------------------------- /components/uni-ui/uni-status-bar/uni-status-bar.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 18 | 19 | 26 | -------------------------------------------------------------------------------- /components/uni-ui/uni-steps/uni-steps.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{item.title}} 7 | {{item.desc}} 8 | 9 | 10 | 11 | 13 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 80 | 81 | 257 | -------------------------------------------------------------------------------- /components/uni-ui/uni-swipe-action-item/index.wxs: -------------------------------------------------------------------------------- 1 | var MIN_DISTANCE = 10; 2 | 3 | /** 4 | * 监听页面内值的变化,主要用于动态开关swipe-action 5 | * @param {Object} newValue 6 | * @param {Object} oldValue 7 | * @param {Object} ownerInstance 8 | * @param {Object} instance 9 | */ 10 | function sizeReady(newValue, oldValue, ownerInstance, instance) { 11 | var state = instance.getState() 12 | var buttonPositions = JSON.parse(newValue) 13 | if (!buttonPositions || !buttonPositions.data || buttonPositions.data.length === 0) return 14 | state.leftWidth = buttonPositions.data[0].width 15 | state.rightWidth = buttonPositions.data[1].width 16 | state.threshold = instance.getDataset().threshold 17 | 18 | if (buttonPositions.show && buttonPositions.show !== 'none') { 19 | openState(buttonPositions.show, instance, ownerInstance) 20 | return 21 | } 22 | 23 | if (state.left) { 24 | openState('none', instance, ownerInstance) 25 | } 26 | resetTouchStatus(instance) 27 | } 28 | 29 | /** 30 | * 开始触摸操作 31 | * @param {Object} e 32 | * @param {Object} ins 33 | */ 34 | function touchstart(e, ins) { 35 | var instance = e.instance; 36 | var disabled = instance.getDataset().disabled 37 | var state = instance.getState(); 38 | // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 39 | disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false; 40 | if (disabled) return 41 | // 开始触摸时移除动画类 42 | instance.requestAnimationFrame(function(){ 43 | instance.removeClass('ani'); 44 | ins.callMethod('closeSwipe'); 45 | }) 46 | 47 | // 记录上次的位置 48 | state.x = state.left || 0 49 | // 计算滑动开始位置 50 | stopTouchStart(e, ins) 51 | } 52 | 53 | /** 54 | * 开始滑动操作 55 | * @param {Object} e 56 | * @param {Object} ownerInstance 57 | */ 58 | function touchmove(e, ownerInstance) { 59 | 60 | var instance = e.instance; 61 | var disabled = instance.getDataset().disabled 62 | var state = instance.getState() 63 | // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 64 | disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false; 65 | if (disabled) return 66 | // 是否可以滑动页面 67 | stopTouchMove(e); 68 | if (state.direction !== 'horizontal') { 69 | return; 70 | } 71 | 72 | if (e.preventDefault) { 73 | // 阻止页面滚动 74 | e.preventDefault() 75 | } 76 | 77 | move(state.x + state.deltaX, instance, ownerInstance) 78 | } 79 | 80 | /** 81 | * 结束触摸操作 82 | * @param {Object} e 83 | * @param {Object} ownerInstance 84 | */ 85 | function touchend(e, ownerInstance) { 86 | var instance = e.instance; 87 | var disabled = instance.getDataset().disabled 88 | var state = instance.getState() 89 | // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 90 | disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false; 91 | 92 | if (disabled) return 93 | // 滑动过程中触摸结束,通过阙值判断是开启还是关闭 94 | // fixed by mehaotian 定时器解决点击按钮,touchend 触发比 click 事件时机早的问题 ,主要是 ios13 95 | moveDirection(state.left, instance, ownerInstance) 96 | 97 | } 98 | 99 | /** 100 | * 设置移动距离 101 | * @param {Object} value 102 | * @param {Object} instance 103 | * @param {Object} ownerInstance 104 | */ 105 | function move(value, instance, ownerInstance) { 106 | value = value || 0 107 | var state = instance.getState() 108 | var leftWidth = state.leftWidth 109 | var rightWidth = state.rightWidth 110 | // 获取可滑动范围 111 | state.left = range(value, -rightWidth, leftWidth); 112 | instance.requestAnimationFrame(function(){ 113 | instance.setStyle({ 114 | transform: 'translateX(' + state.left + 'px)', 115 | '-webkit-transform': 'translateX(' + state.left + 'px)' 116 | }) 117 | }) 118 | 119 | } 120 | 121 | /** 122 | * 获取范围 123 | * @param {Object} num 124 | * @param {Object} min 125 | * @param {Object} max 126 | */ 127 | function range(num, min, max) { 128 | return Math.min(Math.max(num, min), max); 129 | } 130 | 131 | 132 | /** 133 | * 移动方向判断 134 | * @param {Object} left 135 | * @param {Object} value 136 | * @param {Object} ownerInstance 137 | * @param {Object} ins 138 | */ 139 | function moveDirection(left, ins, ownerInstance) { 140 | var state = ins.getState() 141 | var threshold = state.threshold 142 | var position = state.position 143 | var isopen = state.isopen || 'none' 144 | var leftWidth = state.leftWidth 145 | var rightWidth = state.rightWidth 146 | if (state.deltaX === 0) { 147 | openState('none', ins, ownerInstance) 148 | return 149 | } 150 | if ((isopen === 'none' && rightWidth > 0 && -left > threshold) || (isopen !== 'none' && rightWidth > 0 && rightWidth + 151 | left < threshold)) { 152 | // right 153 | openState('right', ins, ownerInstance) 154 | } else if ((isopen === 'none' && leftWidth > 0 && left > threshold) || (isopen !== 'none' && leftWidth > 0 && 155 | leftWidth - left < threshold)) { 156 | // left 157 | openState('left', ins, ownerInstance) 158 | } else { 159 | // default 160 | openState('none', ins, ownerInstance) 161 | } 162 | } 163 | 164 | 165 | /** 166 | * 开启状态 167 | * @param {Boolean} type 168 | * @param {Object} ins 169 | * @param {Object} ownerInstance 170 | */ 171 | function openState(type, ins, ownerInstance) { 172 | var state = ins.getState() 173 | var position = state.position 174 | var leftWidth = state.leftWidth 175 | var rightWidth = state.rightWidth 176 | var left = '' 177 | state.isopen = state.isopen ? state.isopen : 'none' 178 | switch (type) { 179 | case "left": 180 | left = leftWidth 181 | break 182 | case "right": 183 | left = -rightWidth 184 | break 185 | default: 186 | left = 0 187 | } 188 | 189 | // && !state.throttle 190 | 191 | if (state.isopen !== type ) { 192 | state.throttle = true 193 | ownerInstance.callMethod('change', { 194 | open: type 195 | }) 196 | 197 | } 198 | 199 | state.isopen = type 200 | // 添加动画类 201 | ins.requestAnimationFrame(function(){ 202 | ins.addClass('ani'); 203 | move(left, ins, ownerInstance) 204 | }) 205 | // 设置最终移动位置,理论上只要进入到这个函数,肯定是要打开的 206 | } 207 | 208 | 209 | function getDirection(x, y) { 210 | if (x > y && x > MIN_DISTANCE) { 211 | return 'horizontal'; 212 | } 213 | if (y > x && y > MIN_DISTANCE) { 214 | return 'vertical'; 215 | } 216 | return ''; 217 | } 218 | 219 | /** 220 | * 重置滑动状态 221 | * @param {Object} event 222 | */ 223 | function resetTouchStatus(instance) { 224 | var state = instance.getState(); 225 | state.direction = ''; 226 | state.deltaX = 0; 227 | state.deltaY = 0; 228 | state.offsetX = 0; 229 | state.offsetY = 0; 230 | } 231 | 232 | /** 233 | * 设置滑动开始位置 234 | * @param {Object} event 235 | */ 236 | function stopTouchStart(event) { 237 | var instance = event.instance; 238 | var state = instance.getState(); 239 | resetTouchStatus(instance); 240 | var touch = event.touches[0]; 241 | state.startX = touch.clientX; 242 | state.startY = touch.clientY; 243 | } 244 | 245 | /** 246 | * 滑动中,是否禁止打开 247 | * @param {Object} event 248 | */ 249 | function stopTouchMove(event) { 250 | var instance = event.instance; 251 | var state = instance.getState(); 252 | var touch = event.touches[0]; 253 | state.deltaX = touch.clientX - state.startX; 254 | state.deltaY = touch.clientY - state.startY; 255 | state.offsetX = Math.abs(state.deltaX); 256 | state.offsetY = Math.abs(state.deltaY); 257 | state.direction = state.direction || getDirection(state.offsetX, state.offsetY); 258 | } 259 | 260 | 261 | module.exports = { 262 | sizeReady: sizeReady, 263 | touchstart: touchstart, 264 | touchmove: touchmove, 265 | touchend: touchend 266 | } 267 | -------------------------------------------------------------------------------- /components/uni-ui/uni-swipe-action-item/mpalipay.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data() { 3 | return { 4 | x: 0, 5 | transition: false, 6 | width: 0, 7 | viewWidth: 0, 8 | swipeShow: 0 9 | } 10 | }, 11 | watch: { 12 | show(newVal) { 13 | if (this.autoClose) return 14 | if (newVal && newVal !== 'none' ) { 15 | this.transition = true 16 | this.open(newVal) 17 | } else { 18 | this.close() 19 | } 20 | } 21 | }, 22 | created() { 23 | if (this.swipeaction.children !== undefined) { 24 | this.swipeaction.children.push(this) 25 | } 26 | }, 27 | 28 | beforeDestroy() { 29 | this.swipeaction.children.forEach((item, index) => { 30 | if (item === this) { 31 | this.swipeaction.children.splice(index, 1) 32 | } 33 | }) 34 | }, 35 | mounted() { 36 | this.isopen = false 37 | setTimeout(() => { 38 | this.getQuerySelect() 39 | }, 50) 40 | }, 41 | methods: { 42 | appTouchStart(e) { 43 | const { 44 | clientX 45 | } = e.changedTouches[0] 46 | this.clientX = clientX 47 | this.timestamp = new Date().getTime() 48 | }, 49 | appTouchEnd(e, index, item, position) { 50 | const { 51 | clientX 52 | } = e.changedTouches[0] 53 | // fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题 54 | let diff = Math.abs(this.clientX - clientX) 55 | let time = (new Date().getTime()) - this.timestamp 56 | if (diff < 40 && time < 300) { 57 | this.$emit('click', { 58 | content: item, 59 | index, 60 | position 61 | }) 62 | } 63 | }, 64 | // onClick(index, item, position) { 65 | // this.$emit('click', { 66 | // content: item, 67 | // index, 68 | // position 69 | // }) 70 | // }, 71 | /** 72 | * 移动触发 73 | * @param {Object} e 74 | */ 75 | onChange(e) { 76 | this.moveX = e.detail.x 77 | this.isclose = false 78 | }, 79 | touchstart(e) { 80 | this.transition = false 81 | this.isclose = true 82 | this.autoClose && this.swipeaction.closeOther(this) 83 | }, 84 | touchmove(e) {}, 85 | touchend(e) { 86 | // 0的位置什么都不执行 87 | if (this.isclose && this.isopen === 'none') return 88 | if (this.isclose && this.isopen !== 'none') { 89 | this.transition = true 90 | this.close() 91 | } else { 92 | this.move(this.moveX + this.leftWidth) 93 | } 94 | }, 95 | 96 | /** 97 | * 移动 98 | * @param {Object} moveX 99 | */ 100 | move(moveX) { 101 | // 打开关闭的处理逻辑不太一样 102 | this.transition = true 103 | // 未打开状态 104 | if (!this.isopen || this.isopen === 'none') { 105 | if (moveX > this.threshold) { 106 | this.open('left') 107 | } else if (moveX < -this.threshold) { 108 | this.open('right') 109 | } else { 110 | this.close() 111 | } 112 | } else { 113 | if (moveX < 0 && moveX < this.rightWidth) { 114 | const rightX = this.rightWidth + moveX 115 | if (rightX < this.threshold) { 116 | this.open('right') 117 | } else { 118 | this.close() 119 | } 120 | } else if (moveX > 0 && moveX < this.leftWidth) { 121 | const leftX = this.leftWidth - moveX 122 | if (leftX < this.threshold) { 123 | this.open('left') 124 | } else { 125 | this.close() 126 | } 127 | } 128 | 129 | } 130 | 131 | }, 132 | 133 | /** 134 | * 打开 135 | */ 136 | open(type) { 137 | this.x = this.moveX 138 | this.animation(type) 139 | }, 140 | 141 | /** 142 | * 关闭 143 | */ 144 | close() { 145 | this.x = this.moveX 146 | // TODO 解决 x 值不更新的问题,所以会多触发一次 nextTick ,待优化 147 | this.$nextTick(() => { 148 | this.x = -this.leftWidth 149 | if(this.isopen!=='none'){ 150 | this.$emit('change', 'none') 151 | } 152 | this.isopen = 'none' 153 | }) 154 | }, 155 | 156 | /** 157 | * 执行结束动画 158 | * @param {Object} type 159 | */ 160 | animation(type) { 161 | this.$nextTick(() => { 162 | if (type === 'left') { 163 | this.x = 0 164 | } else { 165 | this.x = -this.rightWidth - this.leftWidth 166 | } 167 | 168 | if(this.isopen!==type){ 169 | this.$emit('change', type) 170 | } 171 | this.isopen = type 172 | }) 173 | 174 | }, 175 | getSlide(x) {}, 176 | getQuerySelect() { 177 | const query = uni.createSelectorQuery().in(this); 178 | query.selectAll('.movable-view--hock').boundingClientRect(data => { 179 | this.leftWidth = data[1].width 180 | this.rightWidth = data[2].width 181 | this.width = data[0].width 182 | this.viewWidth = this.width + this.rightWidth + this.leftWidth 183 | if (this.leftWidth === 0) { 184 | // TODO 疑似bug ,初始化的时候如果x 是0,会导致移动位置错误,所以让元素超出一点 185 | this.x = -0.1 186 | } else { 187 | this.x = -this.leftWidth 188 | } 189 | this.moveX = this.x 190 | this.$nextTick(() => { 191 | this.swipeShow = 1 192 | }) 193 | 194 | if (!this.buttonWidth) { 195 | this.disabledView = true 196 | } 197 | 198 | if (this.autoClose) return 199 | if (this.show !== 'none') { 200 | this.transition = true 201 | this.open(this.shows) 202 | } 203 | }).exec(); 204 | 205 | } 206 | } 207 | } 208 | -------------------------------------------------------------------------------- /components/uni-ui/uni-swipe-action-item/mpother.js: -------------------------------------------------------------------------------- 1 | const MIN_DISTANCE = 10; 2 | export default { 3 | data() { 4 | return { 5 | uniShow: false, 6 | left: 0, 7 | buttonShow: 'none', 8 | ani: false, 9 | moveLeft:'' 10 | } 11 | }, 12 | watch: { 13 | show(newVal) { 14 | if (this.autoClose) return 15 | this.openState(newVal) 16 | }, 17 | left(){ 18 | this.moveLeft = `translateX(${this.left}px)` 19 | }, 20 | buttonShow(newVal){ 21 | if (this.autoClose) return 22 | this.openState(newVal) 23 | }, 24 | leftOptions() { 25 | this.init() 26 | }, 27 | rightOptions() { 28 | this.init() 29 | } 30 | }, 31 | mounted() { 32 | // this.position = {} 33 | if (this.swipeaction.children !== undefined) { 34 | this.swipeaction.children.push(this) 35 | } 36 | this.init() 37 | }, 38 | beforeDestoy() { 39 | this.swipeaction.children.forEach((item, index) => { 40 | if (item === this) { 41 | this.swipeaction.children.splice(index, 1) 42 | } 43 | }) 44 | }, 45 | methods: { 46 | init(){ 47 | clearTimeout(this.timer) 48 | this.timer = setTimeout(() => { 49 | this.getSelectorQuery() 50 | }, 100) 51 | // 移动距离 52 | this.left = 0 53 | this.x = 0 54 | }, 55 | closeSwipe(e) { 56 | if (!this.autoClose) return 57 | this.swipeaction.closeOther(this) 58 | }, 59 | appTouchStart(e) { 60 | const { 61 | clientX 62 | } = e.changedTouches[0] 63 | this.clientX = clientX 64 | this.timestamp = new Date().getTime() 65 | }, 66 | appTouchEnd(e, index, item, position) { 67 | const { 68 | clientX 69 | } = e.changedTouches[0] 70 | // fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题 71 | let diff = Math.abs(this.clientX - clientX) 72 | let time = (new Date().getTime()) - this.timestamp 73 | if (diff < 40 && time < 300) { 74 | this.$emit('click', { 75 | content: item, 76 | index, 77 | position 78 | }) 79 | } 80 | }, 81 | touchstart(e) { 82 | if (this.disabled) return 83 | this.ani = false 84 | this.x = this.left || 0 85 | this.stopTouchStart(e) 86 | this.autoClose && this.closeSwipe() 87 | }, 88 | touchmove(e) { 89 | if (this.disabled) return 90 | // 是否可以滑动页面 91 | this.stopTouchMove(e); 92 | if (this.direction !== 'horizontal') { 93 | return; 94 | } 95 | 96 | this.move(this.x + this.deltaX) 97 | }, 98 | touchend() { 99 | if (this.disabled) return 100 | this.moveDirection(this.left) 101 | }, 102 | /** 103 | * 设置移动距离 104 | * @param {Object} value 105 | */ 106 | move(value) { 107 | value = value || 0 108 | const leftWidth = this.leftWidth 109 | const rightWidth = this.rightWidth 110 | // 获取可滑动范围 111 | this.left = this.range(value, -rightWidth, leftWidth); 112 | }, 113 | 114 | /** 115 | * 获取范围 116 | * @param {Object} num 117 | * @param {Object} min 118 | * @param {Object} max 119 | */ 120 | range(num, min, max) { 121 | return Math.min(Math.max(num, min), max); 122 | }, 123 | /** 124 | * 移动方向判断 125 | * @param {Object} left 126 | * @param {Object} value 127 | */ 128 | moveDirection(left) { 129 | const threshold = this.threshold 130 | const isopen = this.isopen || 'none' 131 | const leftWidth = this.leftWidth 132 | const rightWidth = this.rightWidth 133 | if (this.deltaX === 0) { 134 | this.openState('none') 135 | return 136 | } 137 | if ((isopen === 'none' && rightWidth > 0 && -left > threshold) || (isopen !== 'none' && rightWidth > 0 && rightWidth + 138 | left < threshold)) { 139 | // right 140 | this.openState('right') 141 | } else if ((isopen === 'none' && leftWidth > 0 && left > threshold) || (isopen !== 'none' && leftWidth > 0 && 142 | leftWidth - left < threshold)) { 143 | // left 144 | this.openState('left') 145 | } else { 146 | // default 147 | this.openState('none') 148 | } 149 | }, 150 | 151 | /** 152 | * 开启状态 153 | * @param {Boolean} type 154 | */ 155 | openState(type) { 156 | const leftWidth = this.leftWidth 157 | const rightWidth = this.rightWidth 158 | let left = '' 159 | this.isopen = this.isopen ? this.isopen : 'none' 160 | switch (type) { 161 | case "left": 162 | left = leftWidth 163 | break 164 | case "right": 165 | left = -rightWidth 166 | break 167 | default: 168 | left = 0 169 | } 170 | 171 | 172 | if (this.isopen !== type) { 173 | this.throttle = true 174 | this.$emit('change', type) 175 | } 176 | 177 | this.isopen = type 178 | // 添加动画类 179 | this.ani = true 180 | this.$nextTick(() => { 181 | this.move(left) 182 | }) 183 | // 设置最终移动位置,理论上只要进入到这个函数,肯定是要打开的 184 | }, 185 | close() { 186 | this.openState('none') 187 | }, 188 | getDirection(x, y) { 189 | if (x > y && x > MIN_DISTANCE) { 190 | return 'horizontal'; 191 | } 192 | if (y > x && y > MIN_DISTANCE) { 193 | return 'vertical'; 194 | } 195 | return ''; 196 | }, 197 | 198 | /** 199 | * 重置滑动状态 200 | * @param {Object} event 201 | */ 202 | resetTouchStatus() { 203 | this.direction = ''; 204 | this.deltaX = 0; 205 | this.deltaY = 0; 206 | this.offsetX = 0; 207 | this.offsetY = 0; 208 | }, 209 | 210 | /** 211 | * 设置滑动开始位置 212 | * @param {Object} event 213 | */ 214 | stopTouchStart(event) { 215 | this.resetTouchStatus(); 216 | const touch = event.touches[0]; 217 | this.startX = touch.clientX; 218 | this.startY = touch.clientY; 219 | }, 220 | 221 | /** 222 | * 滑动中,是否禁止打开 223 | * @param {Object} event 224 | */ 225 | stopTouchMove(event) { 226 | const touch = event.touches[0]; 227 | this.deltaX = touch.clientX - this.startX; 228 | this.deltaY = touch.clientY - this.startY; 229 | this.offsetX = Math.abs(this.deltaX); 230 | this.offsetY = Math.abs(this.deltaY); 231 | this.direction = this.direction || this.getDirection(this.offsetX, this.offsetY); 232 | }, 233 | 234 | getSelectorQuery() { 235 | const views = uni.createSelectorQuery().in(this) 236 | views 237 | .selectAll('.uni-swipe_button-group') 238 | .boundingClientRect(data => { 239 | let show = 'none' 240 | if (this.autoClose) { 241 | show = 'none' 242 | } else { 243 | show = this.show 244 | } 245 | this.leftWidth = data[0].width || 0 246 | this.rightWidth = data[1].width || 0 247 | this.buttonShow = show 248 | }) 249 | .exec() 250 | } 251 | } 252 | } 253 | -------------------------------------------------------------------------------- /components/uni-ui/uni-swipe-action-item/mpwxs.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data() { 3 | return { 4 | position: [], 5 | button: {}, 6 | btn: "[]" 7 | } 8 | }, 9 | // computed: { 10 | // pos() { 11 | // return JSON.stringify(this.position) 12 | // }, 13 | // btn() { 14 | // return JSON.stringify(this.button) 15 | // } 16 | // }, 17 | watch: { 18 | button: { 19 | handler(newVal) { 20 | this.btn = JSON.stringify(newVal) 21 | }, 22 | deep: true 23 | }, 24 | show(newVal) { 25 | if (this.autoClose) return 26 | if (!this.button) { 27 | this.init() 28 | return 29 | } 30 | this.button.show = newVal 31 | }, 32 | leftOptions() { 33 | this.init() 34 | }, 35 | rightOptions() { 36 | this.init() 37 | } 38 | }, 39 | created() { 40 | if (this.swipeaction.children !== undefined) { 41 | this.swipeaction.children.push(this) 42 | } 43 | }, 44 | mounted() { 45 | this.init() 46 | }, 47 | beforeDestroy() { 48 | this.swipeaction.children.forEach((item, index) => { 49 | if (item === this) { 50 | this.swipeaction.children.splice(index, 1) 51 | } 52 | }) 53 | }, 54 | methods: { 55 | init() { 56 | clearTimeout(this.swipetimer) 57 | this.swipetimer = setTimeout(() => { 58 | this.getButtonSize() 59 | }, 50) 60 | }, 61 | closeSwipe(e) { 62 | if (!this.autoClose) return 63 | this.swipeaction.closeOther(this) 64 | }, 65 | 66 | change(e) { 67 | this.$emit('change', e.open) 68 | let show = this.button.show 69 | if (show !== e.open) { 70 | this.button.show = e.open 71 | } 72 | 73 | }, 74 | 75 | appTouchStart(e) { 76 | const { 77 | clientX 78 | } = e.changedTouches[0] 79 | this.clientX = clientX 80 | this.timestamp = new Date().getTime() 81 | }, 82 | appTouchEnd(e, index, item, position) { 83 | const { 84 | clientX 85 | } = e.changedTouches[0] 86 | // fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题 87 | let diff = Math.abs(this.clientX - clientX) 88 | let time = (new Date().getTime()) - this.timestamp 89 | if (diff < 40 && time < 300) { 90 | this.$emit('click', { 91 | content: item, 92 | index, 93 | position 94 | }) 95 | } 96 | }, 97 | getButtonSize() { 98 | const views = uni.createSelectorQuery().in(this) 99 | views 100 | .selectAll('.uni-swipe_button-group') 101 | .boundingClientRect(data => { 102 | let show = 'none' 103 | if (this.autoClose) { 104 | show = 'none' 105 | } else { 106 | show = this.show 107 | } 108 | this.button = { 109 | data, 110 | show 111 | } 112 | }) 113 | .exec() 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /components/uni-ui/uni-swipe-action/uni-swipe-action.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /components/uni-ui/uni-swiper-dot/uni-swiper-dot.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | {{ (current+1)+"/"+info.length +' ' +info[current][field] }} 21 | 22 | 23 | {{ index+1 }} 26 | 27 | 28 | 29 | 30 | 116 | 117 | 202 | -------------------------------------------------------------------------------- /components/uni-ui/uni-tag/uni-tag.vue: -------------------------------------------------------------------------------- 1 | 2 | 11 | {{ text }} 12 | 13 | 14 | 15 | 86 | 87 | 231 | -------------------------------------------------------------------------------- /components/uni-ui/uni-test/uni-test.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 测试插件 4 | 5 | 6 | 7 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /components/uni-ui/uni-title/uni-title.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{title}} 4 | 5 | 6 | 7 | 116 | 117 | 171 | -------------------------------------------------------------------------------- /components/uni-ui/uni-transition/uni-transition.vue: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 217 | 218 | 280 | -------------------------------------------------------------------------------- /image/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/image/1.png -------------------------------------------------------------------------------- /image/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/image/2.png -------------------------------------------------------------------------------- /image/图层1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/image/图层1.png -------------------------------------------------------------------------------- /image/图层2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/image/图层2.png -------------------------------------------------------------------------------- /image/图层3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/image/图层3.png -------------------------------------------------------------------------------- /image/图层4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/image/图层4.png -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App' 3 | 4 | Vue.config.productionTip = false 5 | 6 | App.mpType = 'app' 7 | 8 | const app = new Vue({ 9 | ...App 10 | }) 11 | app.$mount() 12 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "项目框架", 3 | "appid" : "", 4 | "description" : "", 5 | "versionName" : "1.0.0", 6 | "versionCode" : "100", 7 | "transformPx" : false, 8 | /* 5+App特有相关 */ 9 | "app-plus" : { 10 | "usingComponents" : true, 11 | "nvueCompiler" : "uni-app", 12 | "compilerVersion" : 3, 13 | "splashscreen" : { 14 | "alwaysShowBeforeRender" : true, 15 | "waiting" : true, 16 | "autoclose" : true, 17 | "delay" : 0 18 | }, 19 | /* 模块配置 */ 20 | "modules" : {}, 21 | /* 应用发布信息 */ 22 | "distribute" : { 23 | /* android打包配置 */ 24 | "android" : { 25 | "permissions" : [ 26 | "", 27 | "", 28 | "", 29 | "", 30 | "", 31 | "", 32 | "", 33 | "", 34 | "", 35 | "", 36 | "", 37 | "", 38 | "", 39 | "", 40 | "", 41 | "", 42 | "", 43 | "", 44 | "", 45 | "", 46 | "", 47 | "" 48 | ] 49 | }, 50 | /* ios打包配置 */ 51 | "ios" : {}, 52 | /* SDK配置 */ 53 | "sdkConfigs" : {} 54 | } 55 | }, 56 | /* 快应用特有相关 */ 57 | "quickapp" : {}, 58 | /* 小程序特有相关 */ 59 | "mp-weixin" : { 60 | "appid" : "", 61 | "setting" : { 62 | "urlCheck" : false 63 | }, 64 | "usingComponents" : true 65 | }, 66 | "mp-alipay" : { 67 | "usingComponents" : true 68 | }, 69 | "mp-baidu" : { 70 | "usingComponents" : true 71 | }, 72 | "mp-toutiao" : { 73 | "usingComponents" : true 74 | }, 75 | "uniStatistics": { 76 | "enable": false 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /pages.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [{ 3 | "path": "pages/index/index", 4 | "style": { 5 | "navigationBarTitleText": "首页", 6 | "enablePullDownRefresh": false 7 | } 8 | }, { 9 | "path": "pages/find/find", 10 | "style": { 11 | "navigationBarTitleText": "发现", 12 | "enablePullDownRefresh": true 13 | } 14 | 15 | }, { 16 | "path": "pages/cart/cart", 17 | "style": { 18 | "navigationBarTitleText": "订单", 19 | "enablePullDownRefresh": false 20 | } 21 | 22 | }, { 23 | "path": "pages/mine/mine", 24 | "style": { 25 | "navigationBarTitleText": "我的", 26 | "enablePullDownRefresh": false, 27 | "navigationStyle":"custom" 28 | } 29 | } ,{ 30 | "path" : "pages/mine/login", 31 | "style" : 32 | { 33 | "navigationBarTitleText": "会员登录", 34 | "enablePullDownRefresh": false, 35 | "navigationStyle":"custom" 36 | } 37 | 38 | } 39 | ,{ 40 | "path" : "pages/mine/join", 41 | "style" : 42 | { 43 | "navigationBarTitleText": "如程会员", 44 | "enablePullDownRefresh": false, 45 | "navigationBarBackgroundColor":"#FFFFFF", 46 | "navigationBarTextStyle":"black" 47 | } 48 | 49 | },{ 50 | "path": "pages/mine/home", 51 | "style": { 52 | "navigationBarTitleText": "优惠券", 53 | "navigationBarBackgroundColor":"#FFFFFF", 54 | "navigationBarTextStyle":"black" 55 | } 56 | }, 57 | { 58 | "path": "pages/mine/center", 59 | "style": { 60 | "navigationBarTitleText": "兑换中心", 61 | "navigationBarBackgroundColor":"#FFFFFF", 62 | "navigationBarTextStyle":"black" 63 | } 64 | } 65 | ,{ 66 | "path" : "pages/mine/service", 67 | "style" : 68 | { 69 | "navigationBarTitleText": "选择客服", 70 | "enablePullDownRefresh": false, 71 | "navigationBarBackgroundColor":"#FFFFFF", 72 | "navigationBarTextStyle":"black" 73 | } 74 | 75 | } 76 | ,{ 77 | "path" : "pages/mine/qusetion", 78 | "style" : 79 | { 80 | "navigationBarTitleText": "常见问题", 81 | "enablePullDownRefresh": false, 82 | "navigationBarBackgroundColor":"#FFFFFF", 83 | "navigationBarTextStyle":"black" 84 | } 85 | 86 | } 87 | ,{ 88 | "path" : "pages/mine/hands", 89 | "style" : 90 | { 91 | "navigationBarTitleText": "酒店合作", 92 | "enablePullDownRefresh": false, 93 | "navigationBarBackgroundColor":"#FFFFFF", 94 | "navigationBarTextStyle":"black" 95 | } 96 | 97 | } 98 | ,{ 99 | "path" : "pages/mine/notice", 100 | "style" : 101 | { 102 | "navigationBarTitleText": "程客须知", 103 | "enablePullDownRefresh": false, 104 | "navigationBarBackgroundColor":"#FFFFFF", 105 | "navigationBarTextStyle":"black" 106 | } 107 | 108 | } 109 | ], 110 | "globalStyle": { 111 | "navigationBarTextStyle": "white", 112 | "navigationBarTitleText": "首页", 113 | "navigationBarBackgroundColor": "#1989fa", 114 | "backgroundColor": "#F8F8F8" 115 | }, 116 | "tabBar": { 117 | "list": [{ 118 | "pagePath": "pages/index/index", 119 | "text": "首页", 120 | "iconPath": "static/icons/首页.png", 121 | "selectedIconPath": "static/icons/首页 (2).png" 122 | }, 123 | { 124 | "pagePath": "pages/find/find", 125 | "text": "发现", 126 | "iconPath": "static/icons/发现.png", 127 | "selectedIconPath": "static/icons/发现 (1).png" 128 | }, 129 | { 130 | "pagePath": "pages/cart/cart", 131 | "text": "订单", 132 | "iconPath": "static/icons/订单.png", 133 | "selectedIconPath": "static/icons/订单 (1).png" 134 | }, 135 | { 136 | "pagePath": "pages/mine/mine", 137 | "text": "我的", 138 | "iconPath": "static/icons/我的.png", 139 | "selectedIconPath": "static/icons/我的 (1).png" 140 | } 141 | ] 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /pages/cart/cart.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 这是订单页面 4 | 5 | 6 | 7 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /pages/find/find.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 这是发现页面 4 | 5 | 6 | 7 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /pages/index/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 这是首页哈 4 | 5 | 6 | 7 | 22 | 23 | 26 | -------------------------------------------------------------------------------- /pages/mine/center.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 请输入兑换码 5 | 6 | 立即兑换 7 | 8 | 兑换说明 9 | 兑换中心仅对会员资格以及会员升级兑换,如需兑换优惠券请到个人中心内进行兑换 10 | 会员资格兑换及会员升级兑换规则请仔细阅读《如程会员协议》及 11 | 《如程任享会员升级规则》。一经兑换,则视为会员同意前述协议及规则,相应会员资格即生效 12 | 13 | 14 | 15 | 16 | 17 | 36 | 37 | 71 | -------------------------------------------------------------------------------- /pages/mine/hands.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /pages/mine/home.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 全面型优惠券 5 | 6 | 7 | 8 | 简洁型优惠券 9 | 10 | 11 | 12 | 13 | 14 | 52 | 53 | -------------------------------------------------------------------------------- /pages/mine/join.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 加入会员 19 | 为亲友开通 20 | 21 | 22 | 23 | 24 | 25 | 45 | 46 | 70 | -------------------------------------------------------------------------------- /pages/mine/login.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 登录 4 | 5 | 6 | 7 | 8 | 9 | 25 | 26 | 29 | -------------------------------------------------------------------------------- /pages/mine/notice.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 50 | 51 | 54 | -------------------------------------------------------------------------------- /pages/mine/qusetion.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 如程任享电子会员有效期自购当日起至1年后止;会员有效期期满后,会员有权益保留会员资格。续费金额以平台当时公示金额为准。 6 | 7 | 8 | 会员使用免费入住权益时,每次最高可预订1个免费房间,连续2晚。当您完成本次订单退房后可进行下一次预定。 9 | 10 | 11 | 会员有效期内,在如程所有合作酒店,会员享有不限次数、不限房型的免费入住权益。 12 | 13 | 14 | 在您本人入住的前提下,您可与家人朋友居住在一个房间。房间入住人数以酒店规则为准。 15 | 16 | 17 | 为了保证您的会员专属权益,您的如程任享仅供您本人使用。 18 | 19 | 20 | 不可以,会员在入住并办理完成退房手续后,可预订下次行程 21 | 22 | 23 | 订房是需要付房费作为保证金,保证金金额按该房间市场价格(标价)计算,具体以实际支付金额为准。在入住完成并退房办理完成后,该笔保证金将予以退还。 24 | 25 | 26 | 可以的。请您致电如程会员客服中心(400-872-9988),向客服申请开票,并提供相关开票信息:个人:邮箱、会员真实姓名;公司:邮箱、购买手机号、会员真实姓名、公司名称、公司税号、对公账号、开户银行、联系电话及地址 27 | 28 | 29 | 保证金将在退房完成后一个工作日内退还至会员付款的银行或其他收款账户中 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 56 | 57 | 60 | -------------------------------------------------------------------------------- /pages/mine/service.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 常见问题 7 | 8 | 9 | 10 | 11 | 在线客服(服务时间:10:00~24:00) 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 42 | 43 | 88 | -------------------------------------------------------------------------------- /static/arc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/static/arc.png -------------------------------------------------------------------------------- /static/icons/发现 (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/static/icons/发现 (1).png -------------------------------------------------------------------------------- /static/icons/发现.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/static/icons/发现.png -------------------------------------------------------------------------------- /static/icons/我的 (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/static/icons/我的 (1).png -------------------------------------------------------------------------------- /static/icons/我的.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/static/icons/我的.png -------------------------------------------------------------------------------- /static/icons/订单 (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/static/icons/订单 (1).png -------------------------------------------------------------------------------- /static/icons/订单.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/static/icons/订单.png -------------------------------------------------------------------------------- /static/icons/首页 (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/static/icons/首页 (2).png -------------------------------------------------------------------------------- /static/icons/首页.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/static/icons/首页.png -------------------------------------------------------------------------------- /static/missing-face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/static/missing-face.png -------------------------------------------------------------------------------- /static/yticon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WTTE/RCApplication/9ba4f852f9d5d51cde38fe099894a4cde697e9f6/static/yticon.ttf -------------------------------------------------------------------------------- /uni.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 这里是uni-app内置的常用样式变量 3 | * 4 | * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 5 | * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App 6 | * 7 | */ 8 | 9 | /** 10 | * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 11 | * 12 | * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 13 | */ 14 | 15 | /* 颜色变量 */ 16 | 17 | /* 行为相关颜色 */ 18 | $uni-color-primary: #007aff; 19 | $uni-color-success: #4cd964; 20 | $uni-color-warning: #f0ad4e; 21 | $uni-color-error: #dd524d; 22 | 23 | /* 文字基本颜色 */ 24 | $uni-text-color:#333;//基本色 25 | $uni-text-color-inverse:#fff;//反色 26 | $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 27 | $uni-text-color-placeholder: #808080; 28 | $uni-text-color-disable:#c0c0c0; 29 | 30 | /* 背景颜色 */ 31 | $uni-bg-color:#ffffff; 32 | $uni-bg-color-grey:#f8f8f8; 33 | $uni-bg-color-hover:#f1f1f1;//点击状态颜色 34 | $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 35 | 36 | /* 边框颜色 */ 37 | $uni-border-color:#c8c7cc; 38 | 39 | /* 尺寸变量 */ 40 | 41 | /* 文字尺寸 */ 42 | $uni-font-size-sm:24rpx; 43 | $uni-font-size-base:28rpx; 44 | $uni-font-size-lg:32rpx; 45 | 46 | /* 图片尺寸 */ 47 | $uni-img-size-sm:40rpx; 48 | $uni-img-size-base:52rpx; 49 | $uni-img-size-lg:80rpx; 50 | 51 | /* Border Radius */ 52 | $uni-border-radius-sm: 4rpx; 53 | $uni-border-radius-base: 6rpx; 54 | $uni-border-radius-lg: 12rpx; 55 | $uni-border-radius-circle: 50%; 56 | 57 | /* 水平间距 */ 58 | $uni-spacing-row-sm: 10px; 59 | $uni-spacing-row-base: 20rpx; 60 | $uni-spacing-row-lg: 30rpx; 61 | 62 | /* 垂直间距 */ 63 | $uni-spacing-col-sm: 8rpx; 64 | $uni-spacing-col-base: 16rpx; 65 | $uni-spacing-col-lg: 24rpx; 66 | 67 | /* 透明度 */ 68 | $uni-opacity-disabled: 0.3; // 组件禁用态的透明度 69 | 70 | /* 文章场景相关 */ 71 | $uni-color-title: #2C405A; // 文章标题颜色 72 | $uni-font-size-title:40rpx; 73 | $uni-color-subtitle: #555555; // 二级标题颜色 74 | $uni-font-size-subtitle:36rpx; 75 | $uni-color-paragraph: #3F536E; // 文章段落颜色 76 | $uni-font-size-paragraph:30rpx; 77 | 78 | 79 | /* 页面左右间距 */ 80 | $page-row-spacing: 30rpx; 81 | $page-color-base: #f8f8f8; 82 | $page-color-light: #f8f6fc; 83 | $base-color: #fa436a; 84 | 85 | /* 文字尺寸 */ 86 | $font-sm: 22rpx; 87 | $font-base: 28rpx; 88 | $font-lg: 32rpx; 89 | /*文字颜色*/ 90 | $font-color-dark: #303133; 91 | $font-color-base: #606266; 92 | $font-color-light: #909399; 93 | $font-color-disabled: #C0C4CC; 94 | $font-color-spec: #4399fc; 95 | /* 边框颜色 */ 96 | $border-color-dark: #DCDFE6; 97 | $border-color-base: #E4E7ED; 98 | /* 页面左右间距 */ 99 | $page-row-spacing:30upx; 100 | $page-color-base:#f8f8f8; 101 | $page-color-light:#f8f6fc; 102 | $page-p-l-t-r-30:30upx 30upx 0 30upx; 103 | $page-p-20:30upx; 104 | 105 | /* 文字尺寸 */ 106 | $font-sm:24upx; 107 | $font-base:28upx; 108 | $font-lg:32upx; 109 | 110 | /*文字颜色*/ 111 | $font-color-dark:#303133; 112 | $font-color-base:#606266; 113 | $font-color-light:#909399; 114 | $font-color-disabled:#C0C4CC; 115 | $font-color-spec:#d6003c; 116 | $font-color-gray:#999999; 117 | $font-color-red:#dd0037; 118 | $font-color-ccc:#cccccc; 119 | $font-color-999:#999999; 120 | $font-color-666:#666666; 121 | $font-color-333:#333333; 122 | $font-color-000:#000000; 123 | 124 | /* 边框颜色 */ 125 | $border-color-dark:#DCDFE6; 126 | $border-color-base:#E4E7ED; 127 | $border-color-light:#EBEEF5; 128 | 129 | /* 背景颜色 */ 130 | $image-bg-color:#eeeeee; 131 | $bgcolor_white:#ffffff; 132 | $all_bgcolor:#f4f4f4; 133 | $vui_bgcolor:#8c0027; 134 | 135 | /* 行为相关颜色 */ 136 | $color-primary:#fa436a; 137 | $color-success:#4cd964; 138 | $color-warning:#f0ad4e; 139 | $color-error:#dd524d; 140 | $border-color-light: #EBEEF5; 141 | /* 图片加载中颜色 */ 142 | $image-bg-color: #eee; 143 | /* 页面左右间距 */ 144 | $page-row-spacing:30upx; 145 | $page-color-base:#f8f8f8; 146 | $page-color-light:#f8f6fc; 147 | $page-p-l-t-r-30:30upx 30upx 0 30upx; 148 | $page-p-20:30upx; 149 | 150 | /* 文字尺寸 */ 151 | $font-sm:24upx; 152 | $font-base:28upx; 153 | $font-lg:32upx; 154 | 155 | /*文字颜色*/ 156 | $font-color-dark:#303133; 157 | $font-color-base:#606266; 158 | $font-color-light:#909399; 159 | $font-color-disabled:#C0C4CC; 160 | $font-color-spec:#d6003c; 161 | $font-color-gray:#999999; 162 | $font-color-red:#dd0037; 163 | $font-color-ccc:#cccccc; 164 | $font-color-999:#999999; 165 | $font-color-666:#666666; 166 | $font-color-333:#333333; 167 | $font-color-000:#000000; 168 | 169 | /* 边框颜色 */ 170 | $border-color-dark:#DCDFE6; 171 | $border-color-base:#E4E7ED; 172 | $border-color-light:#EBEEF5; 173 | 174 | /* 背景颜色 */ 175 | $image-bg-color:#eeeeee; 176 | $bgcolor_white:#ffffff; 177 | $all_bgcolor:#f4f4f4; 178 | $vui_bgcolor:#8c0027; 179 | 180 | /* 行为相关颜色 */ 181 | $color-primary:#fa436a; 182 | $color-success:#4cd964; 183 | $color-warning:#f0ad4e; 184 | $color-error:#dd524d; 185 | /* 行为相关颜色 */ 186 | $uni-color-primary:#fa436a; 187 | $uni-color-success: #4cd964; 188 | $uni-color-warning: #f0ad4e; 189 | $uni-color-error: #dd524d; 190 | 191 | -------------------------------------------------------------------------------- /utils/zgrequest.js: -------------------------------------------------------------------------------- 1 | const baseUrl = "https://capi.ructrip.com" 2 | 3 | export function myRequestGet(url, data) { 4 | return new Promise((resolve, reject) => { 5 | uni.request({ 6 | url: baseUrl + url, 7 | method: "GET", 8 | data: data, 9 | success: function(res) { 10 | console.log('GET成功', res), 11 | resolve(res.data) 12 | }, 13 | fail: function(err) { 14 | console.log('GET失败'), 15 | reject(err) 16 | } 17 | }) 18 | }) 19 | } 20 | 21 | 22 | export function myRequestPost(url, data) { 23 | return new Promise((resolve, reject) => { 24 | uni.request({ 25 | url: baseUrl + url, 26 | header: { 27 | 'Content-Type': 'application/json' 28 | }, 29 | method: "POST", 30 | data: data, 31 | success: function(res) { 32 | console.log('POST成功', res), 33 | resolve(res.data) 34 | }, 35 | fail: function(err) { 36 | console.log('POST失败'), 37 | reject(err) 38 | } 39 | }) 40 | }) 41 | } 42 | --------------------------------------------------------------------------------
兑换说明
兑换中心仅对会员资格以及会员升级兑换,如需兑换优惠券请到个人中心内进行兑换
会员资格兑换及会员升级兑换规则请仔细阅读《如程会员协议》及 11 | 《如程任享会员升级规则》。一经兑换,则视为会员同意前述协议及规则,相应会员资格即生效