Showing preview only (2,430K chars total). Download the full file or copy to clipboard to get everything.
Repository: OpenIMSDK/Open-IM-Uniapp-Demo
Branch: main
Commit: 89eb4ec57636
Files: 594
Total size: 2.0 MB
Directory structure:
gitextract_8upx_llr/
├── .gitignore
├── .prettierignore
├── App.vue
├── LICENSE
├── Readme.md
├── api/
│ └── login.js
├── common/
│ ├── config.js
│ ├── demo.scss
│ ├── emojis.js
│ ├── mixin.js
│ └── props.js
├── components/
│ ├── AreaPicker/
│ │ ├── areaCode.js
│ │ └── index.vue
│ ├── ChooseIndexFooter/
│ │ ├── SelectedMember.vue
│ │ └── index.vue
│ ├── ChooseIndexList/
│ │ └── index.vue
│ ├── CustomNavBar/
│ │ └── index.vue
│ ├── MyAvatar/
│ │ └── index.vue
│ ├── SettingItem/
│ │ └── index.vue
│ ├── UserItem/
│ │ └── index.vue
│ └── gaoyia-parse/
│ ├── components/
│ │ ├── wxParseAudio.vue
│ │ ├── wxParseImg.vue
│ │ ├── wxParseTable.vue
│ │ ├── wxParseTemplate0.vue
│ │ ├── wxParseTemplate1.vue
│ │ ├── wxParseTemplate10.vue
│ │ ├── wxParseTemplate11.vue
│ │ ├── wxParseTemplate2.vue
│ │ ├── wxParseTemplate3.vue
│ │ ├── wxParseTemplate4.vue
│ │ ├── wxParseTemplate5.vue
│ │ ├── wxParseTemplate6.vue
│ │ ├── wxParseTemplate7.vue
│ │ ├── wxParseTemplate8.vue
│ │ ├── wxParseTemplate9.vue
│ │ └── wxParseVideo.vue
│ ├── libs/
│ │ ├── html2json.js
│ │ ├── htmlparser.js
│ │ └── wxDiscode.js
│ ├── parse.css
│ └── parse.vue
├── constant/
│ ├── comp.js
│ ├── event.js
│ ├── im.js
│ └── index.js
├── index.html
├── main.js
├── manifest.json
├── package.json
├── pages/
│ ├── common/
│ │ ├── contactChoose/
│ │ │ └── index.vue
│ │ ├── createGroup/
│ │ │ └── index.vue
│ │ ├── detailsFileds/
│ │ │ └── index.vue
│ │ ├── groupCard/
│ │ │ └── index.vue
│ │ ├── markOrIDPage/
│ │ │ └── index.vue
│ │ ├── searchUserOrGroup/
│ │ │ └── index.vue
│ │ ├── sendAddRequest/
│ │ │ └── index.vue
│ │ ├── userCard/
│ │ │ ├── components/
│ │ │ │ └── UserInfoRowItem.vue
│ │ │ └── index.vue
│ │ ├── userCardMore/
│ │ │ └── index.vue
│ │ └── webviewWrapper/
│ │ └── index.vue
│ ├── contact/
│ │ ├── applicationDetails/
│ │ │ └── index.vue
│ │ ├── applicationList/
│ │ │ ├── ApplicationItem.vue
│ │ │ └── index.vue
│ │ ├── applicationListDetails/
│ │ │ └── index.vue
│ │ ├── contactAdd/
│ │ │ ├── ActionItem.vue
│ │ │ └── index.vue
│ │ ├── friendList/
│ │ │ └── index.vue
│ │ ├── groupList/
│ │ │ ├── GroupItem.vue
│ │ │ └── index.vue
│ │ ├── index/
│ │ │ ├── components/
│ │ │ │ └── ContactMenus.vue
│ │ │ └── index.vue
│ │ ├── searchUserOrGroup/
│ │ │ └── index.vue
│ │ └── switchJoinGroup/
│ │ └── index.vue
│ ├── conversation/
│ │ ├── chating/
│ │ │ ├── components/
│ │ │ │ ├── ChatingFooter/
│ │ │ │ │ ├── ChatingActionBar.vue
│ │ │ │ │ ├── CustomEditor.vue
│ │ │ │ │ └── index.vue
│ │ │ │ ├── ChatingHeader.vue
│ │ │ │ ├── ChatingList.vue
│ │ │ │ └── MessageItem/
│ │ │ │ ├── ErrorMessageRender.vue
│ │ │ │ ├── MediaMessageRender.vue
│ │ │ │ ├── TextMessageRender.vue
│ │ │ │ └── index.vue
│ │ │ └── index.vue
│ │ ├── conversationList/
│ │ │ ├── components/
│ │ │ │ ├── ChatHeader.vue
│ │ │ │ └── ConversationItem.vue
│ │ │ └── index.vue
│ │ ├── groupManage/
│ │ │ └── index.vue
│ │ ├── groupMemberList/
│ │ │ ├── components/
│ │ │ │ └── GroupMemberListHeader.vue
│ │ │ └── index.vue
│ │ ├── groupSettings/
│ │ │ ├── components/
│ │ │ │ ├── ActionSheet.vue
│ │ │ │ └── GroupMemberRow.vue
│ │ │ └── index.vue
│ │ ├── singleSettings/
│ │ │ └── index.vue
│ │ └── updateGroupOrNickname/
│ │ └── index.vue
│ ├── login/
│ │ ├── index.vue
│ │ ├── registerOrForget/
│ │ │ └── index.vue
│ │ ├── setPassword/
│ │ │ └── index.vue
│ │ ├── setSelfInfo/
│ │ │ └── index.vue
│ │ └── verifyCode/
│ │ └── index.vue
│ ├── profile/
│ │ ├── about/
│ │ │ └── index.vue
│ │ ├── accountSetting/
│ │ │ └── index.vue
│ │ ├── blockList/
│ │ │ └── index.vue
│ │ ├── index/
│ │ │ └── index.vue
│ │ └── selfInfo/
│ │ ├── InfoItem.vue
│ │ └── index.vue
│ └── workbench/
│ └── index/
│ └── index.vue
├── pages.json
├── static/
│ └── wasm_exec.js
├── store/
│ ├── getters.js
│ ├── index.js
│ └── modules/
│ ├── contact.js
│ ├── conversation.js
│ ├── message.js
│ └── user.js
├── styles/
│ ├── common.scss
│ ├── global.scss
│ └── login.scss
├── uni.scss
├── uni_modules/
│ ├── Sansnn-uQRCode/
│ │ ├── changelog.md
│ │ ├── components/
│ │ │ ├── u-qrcode/
│ │ │ │ └── u-qrcode.vue
│ │ │ └── uqrcode/
│ │ │ └── uqrcode.vue
│ │ ├── js_sdk/
│ │ │ ├── gcanvas/
│ │ │ │ ├── bridge/
│ │ │ │ │ └── bridge-weex.js
│ │ │ │ ├── context-2d/
│ │ │ │ │ ├── FillStyleLinearGradient.js
│ │ │ │ │ ├── FillStylePattern.js
│ │ │ │ │ ├── FillStyleRadialGradient.js
│ │ │ │ │ └── RenderingContext.js
│ │ │ │ ├── context-webgl/
│ │ │ │ │ ├── ActiveInfo.js
│ │ │ │ │ ├── Buffer.js
│ │ │ │ │ ├── Framebuffer.js
│ │ │ │ │ ├── GLenum.js
│ │ │ │ │ ├── GLmethod.js
│ │ │ │ │ ├── GLtype.js
│ │ │ │ │ ├── Program.js
│ │ │ │ │ ├── Renderbuffer.js
│ │ │ │ │ ├── RenderingContext.js
│ │ │ │ │ ├── Shader.js
│ │ │ │ │ ├── ShaderPrecisionFormat.js
│ │ │ │ │ ├── Texture.js
│ │ │ │ │ ├── UniformLocation.js
│ │ │ │ │ └── classUtils.js
│ │ │ │ ├── env/
│ │ │ │ │ ├── canvas.js
│ │ │ │ │ ├── image.js
│ │ │ │ │ └── tool.js
│ │ │ │ └── index.js
│ │ │ └── uqrcode/
│ │ │ ├── package.json
│ │ │ └── uqrcode.js
│ │ ├── license.md
│ │ ├── package.json
│ │ └── readme.md
│ ├── mp-html/
│ │ ├── README.md
│ │ ├── changelog.md
│ │ ├── components/
│ │ │ └── mp-html/
│ │ │ ├── mp-html.vue
│ │ │ ├── node/
│ │ │ │ └── node.vue
│ │ │ └── parser.js
│ │ ├── package.json
│ │ └── static/
│ │ └── app-plus/
│ │ └── mp-html/
│ │ ├── js/
│ │ │ └── handler.js
│ │ └── local.html
│ ├── uni-scss/
│ │ ├── changelog.md
│ │ ├── index.scss
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── styles/
│ │ │ ├── index.scss
│ │ │ ├── setting/
│ │ │ │ ├── _border.scss
│ │ │ │ ├── _color.scss
│ │ │ │ ├── _radius.scss
│ │ │ │ ├── _space.scss
│ │ │ │ ├── _styles.scss
│ │ │ │ ├── _text.scss
│ │ │ │ └── _variables.scss
│ │ │ └── tools/
│ │ │ └── functions.scss
│ │ ├── theme.scss
│ │ └── variables.scss
│ ├── uni-swipe-action/
│ │ ├── changelog.md
│ │ ├── components/
│ │ │ ├── uni-swipe-action/
│ │ │ │ └── uni-swipe-action.vue
│ │ │ └── uni-swipe-action-item/
│ │ │ ├── bindingx.js
│ │ │ ├── isPC.js
│ │ │ ├── mpalipay.js
│ │ │ ├── mpother.js
│ │ │ ├── mpwxs.js
│ │ │ ├── render.js
│ │ │ ├── uni-swipe-action-item.vue
│ │ │ └── wx.wxs
│ │ ├── package.json
│ │ └── readme.md
│ ├── uview-ui/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── changelog.md
│ │ ├── components/
│ │ │ ├── u--form/
│ │ │ │ └── u--form.vue
│ │ │ ├── u--image/
│ │ │ │ └── u--image.vue
│ │ │ ├── u--input/
│ │ │ │ └── u--input.vue
│ │ │ ├── u--text/
│ │ │ │ └── u--text.vue
│ │ │ ├── u--textarea/
│ │ │ │ └── u--textarea.vue
│ │ │ ├── u-action-sheet/
│ │ │ │ ├── props.js
│ │ │ │ └── u-action-sheet.vue
│ │ │ ├── u-album/
│ │ │ │ ├── props.js
│ │ │ │ └── u-album.vue
│ │ │ ├── u-alert/
│ │ │ │ ├── props.js
│ │ │ │ └── u-alert.vue
│ │ │ ├── u-avatar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-avatar.vue
│ │ │ ├── u-avatar-group/
│ │ │ │ ├── props.js
│ │ │ │ └── u-avatar-group.vue
│ │ │ ├── u-back-top/
│ │ │ │ ├── props.js
│ │ │ │ └── u-back-top.vue
│ │ │ ├── u-badge/
│ │ │ │ ├── props.js
│ │ │ │ └── u-badge.vue
│ │ │ ├── u-button/
│ │ │ │ ├── nvue.scss
│ │ │ │ ├── props.js
│ │ │ │ ├── u-button.vue
│ │ │ │ └── vue.scss
│ │ │ ├── u-calendar/
│ │ │ │ ├── header.vue
│ │ │ │ ├── month.vue
│ │ │ │ ├── props.js
│ │ │ │ ├── u-calendar.vue
│ │ │ │ └── util.js
│ │ │ ├── u-car-keyboard/
│ │ │ │ ├── props.js
│ │ │ │ └── u-car-keyboard.vue
│ │ │ ├── u-cell/
│ │ │ │ ├── props.js
│ │ │ │ └── u-cell.vue
│ │ │ ├── u-cell-group/
│ │ │ │ ├── props.js
│ │ │ │ └── u-cell-group.vue
│ │ │ ├── u-checkbox/
│ │ │ │ ├── props.js
│ │ │ │ └── u-checkbox.vue
│ │ │ ├── u-checkbox-group/
│ │ │ │ ├── props.js
│ │ │ │ └── u-checkbox-group.vue
│ │ │ ├── u-circle-progress/
│ │ │ │ ├── props.js
│ │ │ │ └── u-circle-progress.vue
│ │ │ ├── u-code/
│ │ │ │ ├── props.js
│ │ │ │ └── u-code.vue
│ │ │ ├── u-code-input/
│ │ │ │ ├── props.js
│ │ │ │ └── u-code-input.vue
│ │ │ ├── u-col/
│ │ │ │ ├── props.js
│ │ │ │ └── u-col.vue
│ │ │ ├── u-collapse/
│ │ │ │ ├── props.js
│ │ │ │ └── u-collapse.vue
│ │ │ ├── u-collapse-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-collapse-item.vue
│ │ │ ├── u-column-notice/
│ │ │ │ ├── props.js
│ │ │ │ └── u-column-notice.vue
│ │ │ ├── u-count-down/
│ │ │ │ ├── props.js
│ │ │ │ ├── u-count-down.vue
│ │ │ │ └── utils.js
│ │ │ ├── u-count-to/
│ │ │ │ ├── props.js
│ │ │ │ └── u-count-to.vue
│ │ │ ├── u-datetime-picker/
│ │ │ │ ├── props.js
│ │ │ │ └── u-datetime-picker.vue
│ │ │ ├── u-divider/
│ │ │ │ ├── props.js
│ │ │ │ └── u-divider.vue
│ │ │ ├── u-dropdown/
│ │ │ │ ├── props.js
│ │ │ │ └── u-dropdown.vue
│ │ │ ├── u-dropdown-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-dropdown-item.vue
│ │ │ ├── u-empty/
│ │ │ │ ├── props.js
│ │ │ │ └── u-empty.vue
│ │ │ ├── u-form/
│ │ │ │ ├── props.js
│ │ │ │ └── u-form.vue
│ │ │ ├── u-form-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-form-item.vue
│ │ │ ├── u-gap/
│ │ │ │ ├── props.js
│ │ │ │ └── u-gap.vue
│ │ │ ├── u-grid/
│ │ │ │ ├── props.js
│ │ │ │ └── u-grid.vue
│ │ │ ├── u-grid-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-grid-item.vue
│ │ │ ├── u-icon/
│ │ │ │ ├── icons.js
│ │ │ │ ├── props.js
│ │ │ │ └── u-icon.vue
│ │ │ ├── u-image/
│ │ │ │ ├── props.js
│ │ │ │ └── u-image.vue
│ │ │ ├── u-index-anchor/
│ │ │ │ ├── props.js
│ │ │ │ └── u-index-anchor.vue
│ │ │ ├── u-index-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-index-item.vue
│ │ │ ├── u-index-list/
│ │ │ │ ├── props.js
│ │ │ │ └── u-index-list.vue
│ │ │ ├── u-input/
│ │ │ │ ├── props.js
│ │ │ │ └── u-input.vue
│ │ │ ├── u-keyboard/
│ │ │ │ ├── props.js
│ │ │ │ └── u-keyboard.vue
│ │ │ ├── u-line/
│ │ │ │ ├── props.js
│ │ │ │ └── u-line.vue
│ │ │ ├── u-line-progress/
│ │ │ │ ├── props.js
│ │ │ │ └── u-line-progress.vue
│ │ │ ├── u-link/
│ │ │ │ ├── props.js
│ │ │ │ └── u-link.vue
│ │ │ ├── u-list/
│ │ │ │ ├── props.js
│ │ │ │ └── u-list.vue
│ │ │ ├── u-list-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-list-item.vue
│ │ │ ├── u-loading-icon/
│ │ │ │ ├── props.js
│ │ │ │ └── u-loading-icon.vue
│ │ │ ├── u-loading-page/
│ │ │ │ ├── props.js
│ │ │ │ └── u-loading-page.vue
│ │ │ ├── u-loadmore/
│ │ │ │ ├── props.js
│ │ │ │ └── u-loadmore.vue
│ │ │ ├── u-modal/
│ │ │ │ ├── props.js
│ │ │ │ └── u-modal.vue
│ │ │ ├── u-navbar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-navbar.vue
│ │ │ ├── u-no-network/
│ │ │ │ ├── props.js
│ │ │ │ └── u-no-network.vue
│ │ │ ├── u-notice-bar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-notice-bar.vue
│ │ │ ├── u-notify/
│ │ │ │ ├── props.js
│ │ │ │ └── u-notify.vue
│ │ │ ├── u-number-box/
│ │ │ │ ├── props.js
│ │ │ │ └── u-number-box.vue
│ │ │ ├── u-number-keyboard/
│ │ │ │ ├── props.js
│ │ │ │ └── u-number-keyboard.vue
│ │ │ ├── u-overlay/
│ │ │ │ ├── props.js
│ │ │ │ └── u-overlay.vue
│ │ │ ├── u-parse/
│ │ │ │ ├── node/
│ │ │ │ │ └── node.vue
│ │ │ │ ├── parser.js
│ │ │ │ ├── props.js
│ │ │ │ └── u-parse.vue
│ │ │ ├── u-picker/
│ │ │ │ ├── props.js
│ │ │ │ └── u-picker.vue
│ │ │ ├── u-picker-column/
│ │ │ │ ├── props.js
│ │ │ │ └── u-picker-column.vue
│ │ │ ├── u-popup/
│ │ │ │ ├── props.js
│ │ │ │ └── u-popup.vue
│ │ │ ├── u-radio/
│ │ │ │ ├── props.js
│ │ │ │ └── u-radio.vue
│ │ │ ├── u-radio-group/
│ │ │ │ ├── props.js
│ │ │ │ └── u-radio-group.vue
│ │ │ ├── u-rate/
│ │ │ │ ├── props.js
│ │ │ │ └── u-rate.vue
│ │ │ ├── u-read-more/
│ │ │ │ ├── props.js
│ │ │ │ └── u-read-more.vue
│ │ │ ├── u-row/
│ │ │ │ ├── props.js
│ │ │ │ └── u-row.vue
│ │ │ ├── u-row-notice/
│ │ │ │ ├── props.js
│ │ │ │ └── u-row-notice.vue
│ │ │ ├── u-safe-bottom/
│ │ │ │ ├── props.js
│ │ │ │ └── u-safe-bottom.vue
│ │ │ ├── u-scroll-list/
│ │ │ │ ├── nvue.js
│ │ │ │ ├── other.js
│ │ │ │ ├── props.js
│ │ │ │ ├── scrollWxs.wxs
│ │ │ │ └── u-scroll-list.vue
│ │ │ ├── u-search/
│ │ │ │ ├── props.js
│ │ │ │ └── u-search.vue
│ │ │ ├── u-skeleton/
│ │ │ │ ├── props.js
│ │ │ │ └── u-skeleton.vue
│ │ │ ├── u-slider/
│ │ │ │ ├── mpother.js
│ │ │ │ ├── mpwxs.js
│ │ │ │ ├── mpwxs.wxs
│ │ │ │ ├── nvue - 副本.js
│ │ │ │ ├── nvue.js
│ │ │ │ ├── props.js
│ │ │ │ └── u-slider.vue
│ │ │ ├── u-status-bar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-status-bar.vue
│ │ │ ├── u-steps/
│ │ │ │ ├── props.js
│ │ │ │ └── u-steps.vue
│ │ │ ├── u-steps-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-steps-item.vue
│ │ │ ├── u-sticky/
│ │ │ │ ├── props.js
│ │ │ │ └── u-sticky.vue
│ │ │ ├── u-subsection/
│ │ │ │ ├── props.js
│ │ │ │ └── u-subsection.vue
│ │ │ ├── u-swipe-action/
│ │ │ │ ├── props.js
│ │ │ │ └── u-swipe-action.vue
│ │ │ ├── u-swipe-action-item/
│ │ │ │ ├── index - backup.wxs
│ │ │ │ ├── index.wxs
│ │ │ │ ├── nvue - backup.js
│ │ │ │ ├── nvue.js
│ │ │ │ ├── props.js
│ │ │ │ ├── u-swipe-action-item.vue
│ │ │ │ └── wxs.js
│ │ │ ├── u-swiper/
│ │ │ │ ├── props.js
│ │ │ │ └── u-swiper.vue
│ │ │ ├── u-swiper-indicator/
│ │ │ │ ├── props.js
│ │ │ │ └── u-swiper-indicator.vue
│ │ │ ├── u-switch/
│ │ │ │ ├── props.js
│ │ │ │ └── u-switch.vue
│ │ │ ├── u-tabbar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tabbar.vue
│ │ │ ├── u-tabbar-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tabbar-item.vue
│ │ │ ├── u-table/
│ │ │ │ ├── props.js
│ │ │ │ └── u-table.vue
│ │ │ ├── u-tabs/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tabs.vue
│ │ │ ├── u-tabs-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tabs-item.vue
│ │ │ ├── u-tag/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tag.vue
│ │ │ ├── u-td/
│ │ │ │ ├── props.js
│ │ │ │ └── u-td.vue
│ │ │ ├── u-text/
│ │ │ │ ├── props.js
│ │ │ │ ├── u-text.vue
│ │ │ │ └── value.js
│ │ │ ├── u-textarea/
│ │ │ │ ├── props.js
│ │ │ │ └── u-textarea.vue
│ │ │ ├── u-toast/
│ │ │ │ └── u-toast.vue
│ │ │ ├── u-toolbar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-toolbar.vue
│ │ │ ├── u-tooltip/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tooltip.vue
│ │ │ ├── u-tr/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tr.vue
│ │ │ ├── u-transition/
│ │ │ │ ├── nvue.ani-map.js
│ │ │ │ ├── props.js
│ │ │ │ ├── transition.js
│ │ │ │ ├── u-transition.vue
│ │ │ │ └── vue.ani-style.scss
│ │ │ ├── u-upload/
│ │ │ │ ├── mixin.js
│ │ │ │ ├── props.js
│ │ │ │ ├── u-upload.vue
│ │ │ │ └── utils.js
│ │ │ └── uview-ui/
│ │ │ └── uview-ui.vue
│ │ ├── index.js
│ │ ├── index.scss
│ │ ├── libs/
│ │ │ ├── config/
│ │ │ │ ├── color.js
│ │ │ │ ├── config.js
│ │ │ │ ├── props/
│ │ │ │ │ ├── actionSheet.js
│ │ │ │ │ ├── album.js
│ │ │ │ │ ├── alert.js
│ │ │ │ │ ├── avatar.js
│ │ │ │ │ ├── avatarGroup.js
│ │ │ │ │ ├── backtop.js
│ │ │ │ │ ├── badge.js
│ │ │ │ │ ├── button.js
│ │ │ │ │ ├── calendar.js
│ │ │ │ │ ├── carKeyboard.js
│ │ │ │ │ ├── cell.js
│ │ │ │ │ ├── cellGroup.js
│ │ │ │ │ ├── checkbox.js
│ │ │ │ │ ├── checkboxGroup.js
│ │ │ │ │ ├── circleProgress.js
│ │ │ │ │ ├── code.js
│ │ │ │ │ ├── codeInput.js
│ │ │ │ │ ├── col.js
│ │ │ │ │ ├── collapse.js
│ │ │ │ │ ├── collapseItem.js
│ │ │ │ │ ├── columnNotice.js
│ │ │ │ │ ├── countDown.js
│ │ │ │ │ ├── countTo.js
│ │ │ │ │ ├── datetimePicker.js
│ │ │ │ │ ├── divider.js
│ │ │ │ │ ├── empty.js
│ │ │ │ │ ├── form.js
│ │ │ │ │ ├── formItem.js
│ │ │ │ │ ├── gap.js
│ │ │ │ │ ├── grid.js
│ │ │ │ │ ├── gridItem.js
│ │ │ │ │ ├── icon.js
│ │ │ │ │ ├── image.js
│ │ │ │ │ ├── indexAnchor.js
│ │ │ │ │ ├── indexList.js
│ │ │ │ │ ├── input.js
│ │ │ │ │ ├── keyboard.js
│ │ │ │ │ ├── line.js
│ │ │ │ │ ├── lineProgress.js
│ │ │ │ │ ├── link.js
│ │ │ │ │ ├── list.js
│ │ │ │ │ ├── listItem.js
│ │ │ │ │ ├── loadingIcon.js
│ │ │ │ │ ├── loadingPage.js
│ │ │ │ │ ├── loadmore.js
│ │ │ │ │ ├── modal.js
│ │ │ │ │ ├── navbar.js
│ │ │ │ │ ├── noNetwork.js
│ │ │ │ │ ├── noticeBar.js
│ │ │ │ │ ├── notify.js
│ │ │ │ │ ├── numberBox.js
│ │ │ │ │ ├── numberKeyboard.js
│ │ │ │ │ ├── overlay.js
│ │ │ │ │ ├── parse.js
│ │ │ │ │ ├── picker.js
│ │ │ │ │ ├── popup.js
│ │ │ │ │ ├── radio.js
│ │ │ │ │ ├── radioGroup.js
│ │ │ │ │ ├── rate.js
│ │ │ │ │ ├── readMore.js
│ │ │ │ │ ├── row.js
│ │ │ │ │ ├── rowNotice.js
│ │ │ │ │ ├── scrollList.js
│ │ │ │ │ ├── search.js
│ │ │ │ │ ├── section.js
│ │ │ │ │ ├── skeleton.js
│ │ │ │ │ ├── slider.js
│ │ │ │ │ ├── statusBar.js
│ │ │ │ │ ├── steps.js
│ │ │ │ │ ├── stepsItem.js
│ │ │ │ │ ├── sticky.js
│ │ │ │ │ ├── subsection.js
│ │ │ │ │ ├── swipeAction.js
│ │ │ │ │ ├── swipeActionItem.js
│ │ │ │ │ ├── swiper.js
│ │ │ │ │ ├── swipterIndicator.js
│ │ │ │ │ ├── switch.js
│ │ │ │ │ ├── tabbar.js
│ │ │ │ │ ├── tabbarItem.js
│ │ │ │ │ ├── tabs.js
│ │ │ │ │ ├── tag.js
│ │ │ │ │ ├── text.js
│ │ │ │ │ ├── textarea.js
│ │ │ │ │ ├── toast.js
│ │ │ │ │ ├── toolbar.js
│ │ │ │ │ ├── tooltip.js
│ │ │ │ │ ├── transition.js
│ │ │ │ │ └── upload.js
│ │ │ │ ├── props.js
│ │ │ │ └── zIndex.js
│ │ │ ├── css/
│ │ │ │ ├── color.scss
│ │ │ │ ├── common.scss
│ │ │ │ ├── components.scss
│ │ │ │ ├── flex.scss
│ │ │ │ ├── h5.scss
│ │ │ │ ├── mixin.scss
│ │ │ │ ├── mp.scss
│ │ │ │ ├── nvue.scss
│ │ │ │ └── vue.scss
│ │ │ ├── function/
│ │ │ │ ├── colorGradient.js
│ │ │ │ ├── debounce.js
│ │ │ │ ├── digit.js
│ │ │ │ ├── index.js
│ │ │ │ ├── platform.js
│ │ │ │ ├── test.js
│ │ │ │ └── throttle.js
│ │ │ ├── luch-request/
│ │ │ │ ├── adapters/
│ │ │ │ │ └── index.js
│ │ │ │ ├── core/
│ │ │ │ │ ├── InterceptorManager.js
│ │ │ │ │ ├── Request.js
│ │ │ │ │ ├── buildFullPath.js
│ │ │ │ │ ├── defaults.js
│ │ │ │ │ ├── dispatchRequest.js
│ │ │ │ │ ├── mergeConfig.js
│ │ │ │ │ └── settle.js
│ │ │ │ ├── helpers/
│ │ │ │ │ ├── buildURL.js
│ │ │ │ │ ├── combineURLs.js
│ │ │ │ │ └── isAbsoluteURL.js
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.js
│ │ │ │ ├── utils/
│ │ │ │ │ └── clone.js
│ │ │ │ └── utils.js
│ │ │ ├── mixin/
│ │ │ │ ├── button.js
│ │ │ │ ├── mixin.js
│ │ │ │ ├── mpMixin.js
│ │ │ │ ├── mpShare.js
│ │ │ │ ├── openType.js
│ │ │ │ ├── style.js
│ │ │ │ └── touch.js
│ │ │ └── util/
│ │ │ ├── async-validator.js
│ │ │ ├── calendar.js
│ │ │ ├── dayjs.js
│ │ │ ├── emitter.js
│ │ │ └── route.js
│ │ ├── package.json
│ │ └── theme.scss
│ └── z-paging/
│ ├── changelog.md
│ ├── components/
│ │ ├── z-paging/
│ │ │ ├── components/
│ │ │ │ ├── z-paging-load-more.vue
│ │ │ │ └── z-paging-refresh.vue
│ │ │ ├── config/
│ │ │ │ └── index.js
│ │ │ ├── css/
│ │ │ │ ├── z-paging-main.css
│ │ │ │ └── z-paging-static.css
│ │ │ ├── i18n/
│ │ │ │ ├── en.json
│ │ │ │ ├── index.js
│ │ │ │ ├── zh-Hans.json
│ │ │ │ └── zh-Hant.json
│ │ │ ├── js/
│ │ │ │ ├── modules/
│ │ │ │ │ ├── back-to-top.js
│ │ │ │ │ ├── data-handle.js
│ │ │ │ │ ├── empty.js
│ │ │ │ │ ├── i18n.js
│ │ │ │ │ ├── load-more.js
│ │ │ │ │ ├── loading.js
│ │ │ │ │ ├── nvue.js
│ │ │ │ │ ├── refresher.js
│ │ │ │ │ ├── scroller.js
│ │ │ │ │ └── virtual-list.js
│ │ │ │ ├── z-paging-config.js
│ │ │ │ ├── z-paging-constant.js
│ │ │ │ ├── z-paging-enum.js
│ │ │ │ ├── z-paging-interceptor.js
│ │ │ │ ├── z-paging-main.js
│ │ │ │ ├── z-paging-mixin.js
│ │ │ │ ├── z-paging-static.js
│ │ │ │ └── z-paging-utils.js
│ │ │ ├── wxs/
│ │ │ │ ├── z-paging-renderjs.js
│ │ │ │ └── z-paging-wxs.wxs
│ │ │ └── z-paging.vue
│ │ ├── z-paging-cell/
│ │ │ └── z-paging-cell.vue
│ │ ├── z-paging-empty-view/
│ │ │ └── z-paging-empty-view.vue
│ │ ├── z-paging-swiper/
│ │ │ └── z-paging-swiper.vue
│ │ └── z-paging-swiper-item/
│ │ └── z-paging-swiper-item.vue
│ ├── package.json
│ └── readme.md
└── util/
├── common.js
├── imCommon.js
├── pinyin.js
└── request/
├── index.js
├── requestInterceptors.js
└── responseInterceptors.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
package-lock.json
.hbuilderx
uniCloud-aliyun
# plugin
/nativeplugins
# testing
/coverage
# production
/build
/unpackage/cache
/unpackage/debug
/unpackage/dist
/unpackage/resources
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# electron output
/dist
# db
OpenIM_*
# plugin
/nativeplugins
================================================
FILE: .prettierignore
================================================
/node_modules/
/nativeplugins/
================================================
FILE: App.vue
================================================
<script>
import { mapGetters, mapActions } from "vuex";
import IMSDK, {
IMMethods,
MessageType,
SessionType,
} from "openim-uniapp-polyfill";
import config from "./common/config";
import { getDbDir, toastWithCallback } from "@/util/common.js";
import { conversationSort } from "@/util/imCommon";
import { PageEvents, UpdateMessageTypes } from "@/constant";
export default {
onLaunch: function () {
console.log("App Launch");
this.setGlobalIMlistener();
this.tryLogin();
// #ifdef H5
console.error(
`暂时不支持运行到 Web,如果需要移动端的 Web 项目,参考 [H5 demo](https://github.com/openimsdk/openim-h5-demo)`
);
// #endif
// #ifdef MP-WEIXIN
console.error(`暂时不支持运行到小程序端`);
// #endif
},
onShow: function () {
console.log("App Show");
IMSDK.asyncApi(IMSDK.IMMethods.SetAppBackgroundStatus, IMSDK.uuid(), false);
},
onHide: function () {
console.log("App Hide");
IMSDK.asyncApi(IMSDK.IMMethods.SetAppBackgroundStatus, IMSDK.uuid(), true);
},
computed: {
...mapGetters([
"storeConversationList",
"storeCurrentConversation",
"storeCurrentUserID",
"storeSelfInfo",
"storeRecvFriendApplications",
"storeRecvGroupApplications",
"storeHistoryMessageList",
"storeIsSyncing",
"storeGroupList",
]),
},
methods: {
...mapActions("message", ["pushNewMessage", "updateOneMessage"]),
...mapActions("conversation", ["updateCurrentMemberInGroup"]),
...mapActions("contact", [
"updateFriendInfo",
"pushNewFriend",
"updateBlackInfo",
"pushNewBlack",
"pushNewGroup",
"updateGroupInfo",
"pushNewRecvFriendApplition",
"updateRecvFriendApplition",
"pushNewSentFriendApplition",
"updateSentFriendApplition",
"pushNewRecvGroupApplition",
"updateRecvGroupApplition",
"pushNewSentGroupApplition",
"updateSentGroupApplition",
]),
setGlobalIMlistener() {
console.log("setGlobalIMlistener");
// init
const kickHander = (message) => {
toastWithCallback(message, () => {
uni.removeStorage({
key: "IMToken",
});
uni.removeStorage({
key: "BusinessToken",
});
uni.$u.route("/pages/login/index");
});
};
IMSDK.subscribe(IMSDK.IMEvents.OnKickedOffline, (data) => {
kickHander("您的账号在其他设备登录,请重新登陆!");
});
IMSDK.subscribe(IMSDK.IMEvents.OnUserTokenExpired, (data) => {
kickHander("您的登录已过期,请重新登陆!");
});
IMSDK.subscribe(IMSDK.IMEvents.OnUserTokenInvalid, (data) => {
kickHander("您的登录已无效,请重新登陆!");
});
// sync
const syncStartHandler = ({ data }) => {
this.$store.commit("user/SET_IS_SYNCING", true);
this.$store.commit("user/SET_REINSTALL", data);
};
const syncProgressHandler = ({ data }) => {
this.$store.commit("user/SET_PROGRESS", data);
};
const syncFinishHandler = () => {
uni.hideLoading();
this.$store.dispatch("conversation/getConversationList");
this.$store.dispatch("contact/getFriendList");
this.$store.dispatch("contact/getGrouplist");
this.$store.dispatch("conversation/getUnReadCount");
this.$store.commit("user/SET_IS_SYNCING", false);
};
const syncFailedHandler = () => {
uni.hideLoading();
uni.$u.toast("同步消息失败");
this.$store.dispatch("conversation/getConversationList");
this.$store.dispatch("conversation/getUnReadCount");
this.$store.commit("user/SET_IS_SYNCING", false);
};
IMSDK.subscribe(IMSDK.IMEvents.OnSyncServerStart, syncStartHandler);
IMSDK.subscribe(IMSDK.IMEvents.OnSyncServerFinish, syncFinishHandler);
IMSDK.subscribe(IMSDK.IMEvents.OnSyncServerFailed, syncFailedHandler);
IMSDK.subscribe(IMSDK.IMEvents.OnSyncServerProgress, syncProgressHandler);
// self
const selfInfoUpdateHandler = ({ data }) => {
this.$store.commit("user/SET_SELF_INFO", {
...this.storeSelfInfo,
...data,
});
};
IMSDK.subscribe(IMSDK.IMEvents.OnSelfInfoUpdated, selfInfoUpdateHandler);
// message
const newMessagesHandler = ({ data }) => {
if (this.storeIsSyncing) {
return;
}
data.forEach(this.handleNewMessage);
};
IMSDK.subscribe(IMSDK.IMEvents.OnRecvNewMessages, newMessagesHandler);
// friend
const friendInfoChangeHandler = ({ data }) => {
uni.$emit(IMSDK.IMEvents.OnFriendInfoChanged, { data });
this.updateFriendInfo({
friendInfo: data,
});
};
const friendAddedHandler = ({ data }) => {
this.pushNewFriend(data);
};
const friendDeletedHander = ({ data }) => {
this.updateFriendInfo({
friendInfo: data,
isRemove: true,
});
};
IMSDK.subscribe(
IMSDK.IMEvents.OnFriendInfoChanged,
friendInfoChangeHandler
);
IMSDK.subscribe(IMSDK.IMEvents.OnFriendAdded, friendAddedHandler);
IMSDK.subscribe(IMSDK.IMEvents.OnFriendDeleted, friendDeletedHander);
// blacklist
const blackAddedHandler = ({ data }) => {
this.pushNewBlack(data);
};
const blackDeletedHandler = ({ data }) => {
this.updateBlackInfo({
blackInfo: data,
isRemove: true,
});
};
IMSDK.subscribe(IMSDK.IMEvents.OnBlackAdded, blackAddedHandler);
IMSDK.subscribe(IMSDK.IMEvents.OnBlackDeleted, blackDeletedHandler);
// group
const joinedGroupAddedHandler = ({ data }) => {
this.pushNewGroup(data);
};
const joinedGroupDeletedHandler = ({ data }) => {
this.updateGroupInfo({
groupInfo: data,
isRemove: true,
});
};
const groupInfoChangedHandler = ({ data }) => {
this.updateGroupInfo({
groupInfo: data,
});
};
const groupMemberInfoChangedHandler = ({ data }) => {
uni.$emit(IMSDK.IMEvents.OnGroupMemberInfoChanged, { data });
if (data.groupID === this.storeCurrentConversation?.groupID) {
this.updateCurrentMemberInGroup(data);
}
};
IMSDK.subscribe(
IMSDK.IMEvents.OnJoinedGroupAdded,
joinedGroupAddedHandler
);
IMSDK.subscribe(
IMSDK.IMEvents.OnJoinedGroupDeleted,
joinedGroupDeletedHandler
);
IMSDK.subscribe(
IMSDK.IMEvents.OnGroupInfoChanged,
groupInfoChangedHandler
);
IMSDK.subscribe(
IMSDK.IMEvents.OnGroupMemberInfoChanged,
groupMemberInfoChangedHandler
);
// application
const friendApplicationNumHandler = ({ data }) => {
const isRecv = data.toUserID === this.storeCurrentUserID;
if (isRecv) {
this.pushNewRecvFriendApplition(data);
} else {
this.pushNewSentFriendApplition(data);
}
};
const friendApplicationAccessHandler = ({ data }) => {
const isRecv = data.toUserID === this.storeCurrentUserID;
if (isRecv) {
this.updateRecvFriendApplition({
application: data,
});
} else {
this.updateSentFriendApplition({
application: data,
});
}
};
const groupApplicationNumHandler = ({ data }) => {
const isRecv = data.userID !== this.storeCurrentUserID;
if (isRecv) {
this.pushNewRecvGroupApplition(data);
} else {
this.pushNewSentGroupApplition(data);
}
};
const groupApplicationAccessHandler = ({ data }) => {
const isRecv = data.userID !== this.storeCurrentUserID;
if (isRecv) {
this.updateRecvGroupApplition({
application: data,
});
} else {
this.updateSentGroupApplition({
application: data,
});
}
};
IMSDK.subscribe(
IMSDK.IMEvents.OnFriendApplicationAdded,
friendApplicationNumHandler
);
IMSDK.subscribe(
IMSDK.IMEvents.OnFriendApplicationAccepted,
friendApplicationAccessHandler
);
IMSDK.subscribe(
IMSDK.IMEvents.OnFriendApplicationRejected,
friendApplicationAccessHandler
);
IMSDK.subscribe(
IMSDK.IMEvents.OnGroupApplicationAdded,
groupApplicationNumHandler
);
IMSDK.subscribe(
IMSDK.IMEvents.OnGroupApplicationAccepted,
groupApplicationAccessHandler
);
IMSDK.subscribe(
IMSDK.IMEvents.OnGroupApplicationRejected,
groupApplicationAccessHandler
);
// conversation
const totalUnreadCountChangedHandler = ({ data }) => {
if (this.storeIsSyncing) {
return;
}
this.$store.commit("conversation/SET_UNREAD_COUNT", data);
};
const newConversationHandler = ({ data }) => {
if (this.storeIsSyncing) {
return;
}
const result = [...data, ...this.storeConversationList];
this.$store.commit(
"conversation/SET_CONVERSATION_LIST",
conversationSort(result)
);
};
const conversationChangedHandler = ({ data }) => {
if (this.storeIsSyncing) {
return;
}
let filterArr = [];
console.log(data);
const chids = data.map((ch) => ch.conversationID);
filterArr = this.storeConversationList.filter(
(tc) => !chids.includes(tc.conversationID)
);
const idx = data.findIndex(
(c) =>
c.conversationID === this.storeCurrentConversation.conversationID
);
if (idx !== -1)
this.$store.commit(
"conversation/SET_CURRENT_CONVERSATION",
data[idx]
);
const result = [...data, ...filterArr];
this.$store.commit(
"conversation/SET_CONVERSATION_LIST",
conversationSort(result)
);
};
IMSDK.subscribe(
IMSDK.IMEvents.OnTotalUnreadMessageCountChanged,
totalUnreadCountChangedHandler
);
IMSDK.subscribe(IMSDK.IMEvents.OnNewConversation, newConversationHandler);
IMSDK.subscribe(
IMSDK.IMEvents.OnConversationChanged,
conversationChangedHandler
);
},
tryLogin() {
const initStore = () => {
this.$store.dispatch("user/getSelfInfo");
this.$store.dispatch("conversation/getConversationList");
this.$store.dispatch("conversation/getUnReadCount");
this.$store.dispatch("contact/getBlacklist");
this.$store.dispatch("contact/getRecvFriendApplications");
this.$store.dispatch("contact/getSentFriendApplications");
this.$store.dispatch("contact/getRecvGroupApplications");
this.$store.dispatch("contact/getSentGroupApplications");
uni.switchTab({
url: "/pages/conversation/conversationList/index?isRedirect=true",
});
};
getDbDir()
.then(async (path) => {
const flag = await IMSDK.asyncApi(IMMethods.InitSDK, IMSDK.uuid(), {
systemType: "uni-app",
apiAddr: config.getApiUrl(), // SDK的API接口地址。如:http://xxx:10002
wsAddr: config.getWsUrl(), // SDK的websocket地址。如: ws://xxx:10001
dataDir: path, // 数据存储路径
logLevel: 6,
logFilePath: path,
isLogStandardOutput: true,
isExternalExtensions: false,
});
if (!flag) {
plus.navigator.closeSplashscreen();
uni.$u.toast("初始化IMSDK失败!");
return;
}
const status = await IMSDK.asyncApi(
IMSDK.IMMethods.GetLoginStatus,
IMSDK.uuid()
);
if (status === 3) {
initStore();
return;
}
const IMToken = uni.getStorageSync("IMToken");
const IMUserID = uni.getStorageSync("IMUserID");
if (IMToken && IMUserID) {
IMSDK.asyncApi(IMSDK.IMMethods.Login, IMSDK.uuid(), {
userID: IMUserID,
token: IMToken,
})
.then(initStore)
.catch((err) => {
console.log(err);
uni.removeStorage({
key: "IMToken",
});
uni.removeStorage({
key: "BusinessToken",
});
plus.navigator.closeSplashscreen();
});
} else {
plus.navigator.closeSplashscreen();
}
})
.catch((err) => {
console.log("get dir failed");
console.log(err);
plus.navigator.closeSplashscreen();
});
},
handleNewMessage(newServerMsg) {
if (this.inCurrentConversation(newServerMsg)) {
if (
newServerMsg.contentType !== MessageType.TypingMessage &&
newServerMsg.contentType !== MessageType.RevokeMessage
) {
newServerMsg.isAppend = true;
this.pushNewMessage(newServerMsg);
setTimeout(() => uni.$emit(PageEvents.ScrollToBottom, true));
uni.$u.debounce(this.markConversationAsRead, 2000);
}
}
},
inCurrentConversation(newServerMsg) {
switch (newServerMsg.sessionType) {
case SessionType.Single:
return (
newServerMsg.sendID === this.storeCurrentConversation.userID ||
(newServerMsg.sendID === this.storeCurrentUserID &&
newServerMsg.recvID === this.storeCurrentConversation.userID)
);
case SessionType.WorkingGroup:
return newServerMsg.groupID === this.storeCurrentConversation.groupID;
case SessionType.Notification:
return newServerMsg.sendID === this.storeCurrentConversation.userID;
default:
return false;
}
},
markConversationAsRead() {
IMSDK.asyncApi(
IMSDK.IMMethods.MarkConversationMessageAsRead,
IMSDK.uuid(),
this.storeCurrentConversation.conversationID
);
},
},
};
</script>
<style lang="scss">
/*每个页面公共css */
@import "@/uni_modules/uview-ui/index.scss";
@import "@/styles/login.scss";
@import "@/styles/global.scss";
uni-page-body {
height: 100vh;
overflow: hidden;
}
.uni-tabbar .uni-tabbar__icon {
width: 28px !important;
height: 28px !important;
}
</style>
================================================
FILE: LICENSE
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
================================================
FILE: Readme.md
================================================
<p align="center">
<a href="https://openim.io">
<img src="./docs/images/logo.jpg" width="60%" height="30%"/>
</a>
</p>
# OpenIM Uniapp 💬💻
<p>
<a href="https://docs.openim.io/">OpenIM Docs</a>
•
<a href="https://github.com/openimsdk/open-im-server">OpenIM Server</a>
•
<a href="https://github.com/openimsdk/open-im-sdk-uniapp">open-im-sdk-uniapp</a>
•
<a href="https://github.com/openimsdk/openim-sdk-core">openim-sdk-core</a>
</p>
OpenIM 为开发者提供开源即时通讯 SDK,作为 Twilio、Sendbird 等云服务的替代方案。借助 OpenIM,开发者可以构建安全可靠的即时通讯应用,如 WeChat、Zoom、Slack 等。
本仓库基于开源版 OpenIM SDK 开发,提供了一款基于 uniapp 的即时通讯应用。您可以使用此应用程序作为 OpenIM SDK 的参考实现。本项目引用了 `openim-uniapp-polyfill`,可以构建安卓程序和 iOS 程序。
<p align="center">
<img src="./docs/images/preview1.png" alt="Preview" width="32%"/>
<span style="display: inline-block; width: 16px;"></span>
<img src="./docs/images/preview2.png" alt="Preview" width="32%"/>
</p>
## 授权许可 :page_facing_up:
本仓库采用 GNU Affero 通用公共许可证第 3 版 (AGPL-3.0) 进行许可,并受以下附加条款的约束。**不允许用于商业用途**。详情请参阅 [此处](./LICENSE)。
## 开发环境
在开始开发之前,请确保您的系统已安装以下软件:
- **HBuilderX**:最新版本
- **Node.js**:版本 ≥ 16.x([手动安装](https://nodejs.org/dist/latest-v20.x/) 或使用 [nvm](https://github.com/nvm-sh/nvm) 进行版本管理)
- **npm**:版本 ≥ 6.x(随 Node.js 一起安装)
- **Git**:用于代码版本控制
同时,您需要确保已经[部署](https://docs.openim.io/zh-Hans/guides/gettingStarted/dockerCompose)了最新版本的 OpenIM Server。接下来,您可以编译项目并连接自己的服务端进行测试。
## 运行环境
本应用支持以下操作系统版本:
| 浏览器/操作系统 | 版本 | 状态 |
| --------------- | ----------------- | ---- |
| **iOS** | 13.0 及以上 | ✅ |
| **Android** | 24 及以上 | ✅ |
### 说明
- `只支持` Uniapp 打包成 Android/iOS 应用。并且 SDK 也暂未支持 UniappX (开发中)。
- 暂时 `不支持` 运行到 Web,如果需要移动端的 Web 项目,参考 [H5 demo](https://github.com/openimsdk/openim-h5-demo)。
- 暂时 `不支持` 运行到小程序端。
- 暂时 `不支持` 一对一音视频。如果需要使用,可以运行其他仓库的项目。
## 快速开始
按照以下步骤设置本地开发环境:
1. 拉取代码
```bash
git clone https://github.com/openimsdk/open-im-uniapp-demo.git
cd open-im-uniapp-demo
```
2. 安装依赖
```bash
npm install
```
3. 修改配置
- `common/config.js`
> 如果没有修改过服务端默认端口,则只需要修改`BASE_HOST`为您的服务器 ip 即可,如需配置域名和 https 访问,可以参考[nginx 配置](https://docs.openim.io/zh-Hans/guides/gettingStarted/nginxDomainConfig),并采用最下方的配置项,并修改`BASE_DOMAIN`为您的域名。
```javascript
const BASE_HOST = 'your-server-ip'
const CHAT_URL = `http://${BASE_HOST}:10008`
const API_URL = `http://${BASE_HOST}:10002`
const WS_URL = `ws://${BASE_HOST}:10001`
// const BASE_DOMAIN = 'your-server-domain'
// const CHAT_URL = `http://${BASE_DOMAIN}/chat`
// const API_URL = `http://${BASE_DOMAIN}/api`
// const WS_URL = `ws://${BASE_DOMAIN}/msg_gateway`
```
4. 修改为您自己的 AppID
- 使用 Hbuilder 打开 manifest.json

5. 导入原生插件
- 使用 Hbuilder 打开 manifest.json

- 选择云插件需要选择您的项目 Appid 和输入 Android 包名称

6. 云打包自定义调试基座
- 菜单 -> 运行 -> 运行到手机或模拟器 -> 制作自定义调试基座 (使用自己的包名)

7. 在真实的机器或模拟器上运行 ( iOS 仅支持在真机调试 )
- 菜单 -> 运行 -> 运行到手机或模拟器 -> 运行到Android App基座

8. 开始开发测试! 🎉
## 音视频通话
一对一音视频通话,多人音视频通话、视频会议请联系邮箱 [contact@openim.io](mailto:contact@openim.io)
## 构建 🚀
### 使用原生App 云打包
- 菜单 -> 发行 -> 原生App-云打包

## 功能列表
### 说明
| 功能模块 | 功能项 | 状态 |
| ------------------ | --------------------------------------------------------- | ---- |
| **账号功能** | 手机号注册\邮箱注册\验证码登录 | ✅ |
| | 个人信息查看\修改 | ✅ |
| | 修改密码\忘记密码 | ✅ |
| **好友功能** | 查找\申请\搜索\添加\删除好友 | ✅ |
| | 同意\拒绝好友申请 | ✅ |
| | 好友备注 | ✅ |
| | 是否允许添加好友 | ✅ |
| | 好友列表\好友资料实时同步 | ✅ |
| **黑名单功能** | 限制消息 | ✅ |
| | 黑名单列表实时同步 | ✅ |
| | 添加\移出黑名单 | ✅ |
| **群组功能** | 创建\解散群组 | ✅ |
| | 申请加群\邀请加群\退出群组\移除群成员 | ✅ |
| | 群名/群头像更改/群资料变更通知和实时同步 | ✅ |
| | 群成员邀请进群 | ✅ |
| | 群主转让 | ✅ |
| | 群主、管理员同意进群申请 | ✅ |
| | 搜索群成员 | ✅ |
| **消息功能** | 离线消息 | ✅ |
| | 漫游消息 | ✅ |
| | 多端消息 | ✅ |
| | 历史消息 | ✅ |
| | 消息删除 | ✅ |
| | 消息清空 | ✅ |
| | 消息复制 | ✅ |
| | 单聊正在输入 | ✅ |
| | 新消息勿扰 | ✅ |
| | 清空聊天记录 | ✅ |
| | 新成员查看群聊历史消息 | ✅ |
| | 新消息提示 | ✅ |
| | 文本消息 | ✅ |
| | 图片消息 | ✅ |
| | 视频消息 | ✅ |
| | 表情消息 | ✅ |
| | 文件消息 | ✅ |
| | 语音消息 | ✅ |
| | 名片消息 | ✅ |
| | 地理位置消息 | ✅ |
| | 自定义消息 | ✅ |
| **会话功能** | 置顶会话 | ✅ |
| | 会话已读 | ✅ |
| | 会话免打扰 | ✅ |
| **REST API** | 认证管理 | ✅ |
| | 用户管理 | ✅ |
| | 关系链管理 | ✅ |
| | 群组管理 | ✅ |
| | 会话管理 | ✅ |
| | 消息管理 | ✅ |
| **Webhook** | 群组回调 | ✅ |
| | 消息回调 | ✅ |
| | 推送回调 | ✅ |
| | 关系链回调 | ✅ |
| | 用户回调 | ✅ |
| **容量和性能** | 1 万好友 | ✅ |
| | 10 万人大群 | ✅ |
| | 秒级同步 | ✅ |
| | 集群部署 | ✅ |
| | 互踢策略 | ✅ |
| **在线状态** | 所有平台不互踢 | ✅ |
| | 每个平台各只能登录一个设备 | ✅ |
| | PC 端、移动端、Pad 端、Web 端、小程序端各只能登录一个设备 | ✅ |
| | PC 端不互踢,其他平台总计一个设备 | ✅ |
| **文件类对象存储** | 支持私有化部署 minio | ✅ |
| | 支持 COS、OSS、Kodo、S3 公有云 | ✅ |
| **推送** | 消息在线实时推送 | ✅ |
| | 消息离线推送,支持个推,Firebase | ✅ |
更多高级功能、音视频通话、视频会议 请联系邮箱 [contact@openim.io](mailto:contact@openim.io)
## 加入社区 :busts_in_silhouette:
- 🚀 [加入我们的 Slack 社区](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q)
- :eyes: [加入我们的微信群](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
## 常见问题
1. 直接运行无法使用?
答:必须严格按照文档操作,导入原生插件和制作自定义基座才能运行。
2. iOS 制作自定义基座失败?
答:插件源码不能经过其他操作系统。只能在 MacOS 环境下载插件、制作自定义基座和云打包。
3. 如何使用地图、定位?
答: [参考文档](CONFIGKEY.md)
4. 如何使用离线推送?
答: [参考文档](CONFIGKEY.md)
================================================
FILE: api/login.js
================================================
// 登录
export const businessLogin = (params) =>
uni.$u?.http.post("/account/login", JSON.stringify(params));
export const businessSendSms = (params) =>
uni.$u?.http.post("/account/code/send", JSON.stringify(params));
export const businessVerifyCode = (params) =>
uni.$u?.http.post("/account/code/verify", JSON.stringify(params));
export const businessRegister = (params) =>
uni.$u?.http.post("/account/register", JSON.stringify(params));
export const businessReset = (params) =>
uni.$u?.http.post("/account/password/reset", JSON.stringify(params));
export const businessModify = (params) =>
uni.$u?.http.post(
"/account/password/change",
JSON.stringify({
...params,
}),
{
header: {
token: uni.getStorageSync("BusinessToken"),
},
}
);
// 用户信息
export const businessInfoUpdate = (params) =>
uni.$u?.http.post(
"/user/update",
JSON.stringify({
...params,
}),
{
header: {
token: uni.getStorageSync("BusinessToken"),
},
}
);
export const businessGetUserInfo = (userID) =>
uni.$u?.http.post(
"/user/find/full",
JSON.stringify({
userIDs: [userID],
}),
{
header: {
token: uni.getStorageSync("BusinessToken"),
},
}
);
export const businessSearchUserInfo = (keyword) =>
uni.$u?.http.post(
"/user/search/full",
JSON.stringify({
keyword,
pagination: {
pageNumber: 1,
showNumber: 10,
},
}),
{
header: {
token: uni.getStorageSync("BusinessToken"),
},
}
);
export const businessSearchUser = (keyword) =>
uni.$u?.http.post(
"/friend/search",
JSON.stringify({
keyword,
pagination: {
pageNumber: 1,
showNumber: 99,
},
}),
{
header: {
token: uni.getStorageSync("BusinessToken"),
},
}
);
================================================
FILE: common/config.js
================================================
// const BASE_HOST = 'your-server-ip'
// const CHAT_URL = `http://${BASE_HOST}:10008`
// const API_URL = `http://${BASE_HOST}:10002`
// const WS_URL = `ws://${BASE_HOST}:10001`
const BASE_DOMAIN = 'web.rentsoft.cn'
const CHAT_URL = `https://${BASE_DOMAIN}/chat`
const API_URL = `https://${BASE_DOMAIN}/api`
const WS_URL = `wss://${BASE_DOMAIN}/msg_gateway`
const version = 'Uniapp-Demo'
const getRegisterUrl = () => uni.getStorageSync("IMRegisteUrl") || CHAT_URL;
const getApiUrl = () => uni.getStorageSync("IMApiUrl") || API_URL;
const getWsUrl = () => uni.getStorageSync("IMWsUrl") || WS_URL;
module.exports = {
version,
getRegisterUrl,
getApiUrl,
getWsUrl,
};
================================================
FILE: common/demo.scss
================================================
.u-block {
padding: 14px;
&__section {
margin-bottom: 10px;
}
&__title {
margin-top: 10px;
font-size: 15px;
color: $u-content-color;
margin-bottom: 10px;
}
&__flex {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
}
}
// 使用了cell组件的icon图片样式
.u-cell-icon {
width: 36rpx;
height: 36rpx;
margin-right: 8rpx;
}
.u-page {
padding: 15px 15px 40px 15px;
}
.u-demo-block {
flex: 1;
margin-bottom: 23px;
&__content {
@include flex(column);
}
&__title {
font-size: 14px;
color: rgb(143, 156, 162);
margin-bottom: 8px;
@include flex;
}
}
================================================
FILE: common/emojis.js
================================================
export const emojis = [
"😀",
"😃",
"😄",
"😁",
"😆",
"😅",
"🤣",
"😂",
"🙂",
"🙃",
"😉",
"😊",
"😇",
"🥰",
"😍",
"🤩",
"😘",
"😗",
"😚",
"😙",
"😋",
"😛",
"😜",
"🤪",
"😝",
"🤑",
"🤗",
"🤭",
"🤫",
"🤔",
];
export default emojis;
================================================
FILE: common/mixin.js
================================================
export default {
data() {
return {};
},
};
================================================
FILE: common/props.js
================================================
uni.$u.props.gap.bgColor = "#f3f4f6";
uni.$u.props.gap.height = "10";
================================================
FILE: components/AreaPicker/areaCode.js
================================================
export const areaCode = [
{ label: "中国", value: "86" },
{ label: "马来西亚", value: "60" },
{ label: "印度尼西亚", value: "62" },
{ label: "菲律宾", value: "63" },
{ label: "新加坡", value: "65" },
{ label: "泰国", value: "66" },
{ label: "文莱", value: "673" },
{ label: "日本", value: "81" },
{ label: "韩国", value: "82" },
{ label: "越南", value: "84" },
{ label: "朝鲜", value: "850" },
{ label: "香港(中国)", value: "852" },
{ label: "澳门(中国)", value: "853" },
{ label: "柬埔寨", value: "855" },
{ label: "老挝", value: "856" },
{ label: "台湾(中国)", value: "886" },
{ label: "孟加拉国", value: "880" },
{ label: "土耳其", value: "90" },
{ label: "印度", value: "91" },
{ label: "巴基斯坦", value: "92" },
{ label: "阿富汗", value: "93" },
{ label: "斯里兰卡", value: "94" },
{ label: "缅甸", value: "95" },
{ label: "马尔代夫", value: "960" },
{ label: "黎巴嫩", value: "961" },
{ label: "约旦", value: "962" },
{ label: "叙利亚", value: "963" },
{ label: "伊拉克", value: "964" },
{ label: "科威特", value: "965" },
{ label: "沙特阿拉伯", value: "966" },
{ label: "阿曼", value: "968" },
{ label: "以色列", value: "972" },
{ label: "巴林", value: "973" },
{ label: "卡塔尔", value: "974" },
{ label: "不丹", value: "975" },
{ label: "蒙古", value: "976" },
{ label: "尼泊尔", value: "977" },
{ label: "伊朗", value: "98" },
{ label: "塞浦路斯", value: "357" },
{ label: "巴勒斯坦", value: "970" },
{ label: "阿联酋", value: "971" },
{ label: "俄罗斯联邦", value: "7" },
{ label: "希腊", value: "30" },
{ label: "荷兰", value: "31" },
{ label: "比利时", value: "32" },
{ label: "法国", value: "33" },
{ label: "西班牙", value: "34" },
{ label: "直布罗陀", value: "350" },
{ label: "葡萄牙", value: "351" },
{ label: "卢森堡", value: "352" },
{ label: "爱尔兰", value: "353" },
{ label: "冰岛", value: "354" },
{ label: "阿尔巴尼亚", value: "355" },
{ label: "马耳他", value: "356" },
{ label: "安道尔", value: "376" },
{ label: "芬兰", value: "358" },
{ label: "保加利亚", value: "359" },
{ label: "匈牙利", value: "36" },
{ label: "德国", value: "49" },
{ label: "南斯拉夫", value: "381" },
{ label: "意大利", value: "39" },
{ label: "圣马力诺", value: "378" },
{ label: "梵蒂冈", value: "3906698" },
{ label: "罗马尼亚", value: "40" },
{ label: "瑞士", value: "41" },
{ label: "列支敦士登", value: "423" },
{ label: "奥地利", value: "43" },
{ label: "英国", value: "44" },
{ label: "丹麦", value: "45" },
{ label: "瑞典", value: "46" },
{ label: "挪威", value: "47" },
{ label: "波兰", value: "48" },
{ label: "捷克", value: "420" },
{ label: "斯洛伐克", value: "421" },
{ label: "摩纳哥", value: "377" },
{ label: "马其顿", value: "389" },
{ label: "科罗地亚", value: "385" },
{ label: "斯洛文尼亚", value: "386" },
{ label: "波斯尼亚和塞哥维那", value: "387" },
{ label: "亚美尼亚共和国", value: "374" },
{ label: "白俄罗斯共和国", value: "375" },
{ label: "格鲁吉亚共和国", value: "995" },
{ label: "哈萨克斯坦共和国", value: "7" },
{ label: "吉尔吉斯坦共和国", value: "996" },
{ label: "乌兹别克斯坦共和国", value: "998" },
{ label: "塔吉克斯坦共和国", value: "992" },
{ label: "土库曼斯坦共和国", value: "993" },
{ label: "乌克兰", value: "380" },
{ label: "立陶宛", value: "370" },
{ label: "拉脱维亚", value: "371" },
{ label: "爱沙尼亚", value: "372" },
{ label: "摩尔多瓦", value: "373" },
{ label: "埃及", value: "20" },
{ label: "摩洛哥", value: "212" },
{ label: "阿尔及利亚", value: "213" },
{ label: "突尼斯", value: "216" },
{ label: "利比亚", value: "218" },
{ label: "冈比亚", value: "220" },
{ label: "塞内加尔", value: "221" },
{ label: "毛里塔尼亚", value: "222" },
{ label: "马里", value: "223" },
{ label: "几内亚", value: "224" },
{ label: "科特迪瓦", value: "225" },
{ label: "布基拉法索", value: "226" },
{ label: "尼日尔", value: "227" },
{ label: "多哥", value: "228" },
{ label: "贝宁", value: "229" },
{ label: "毛里求斯", value: "230" },
{ label: "利比里亚", value: "231" },
{ label: "塞拉利昂", value: "232" },
{ label: "加纳", value: "233" },
{ label: "尼日利亚", value: "234" },
{ label: "乍得", value: "235" },
{ label: "中非", value: "236" },
{ label: "喀麦隆", value: "237" },
{ label: "佛得角", value: "238" },
{ label: "圣多美", value: "239" },
{ label: "普林西比", value: "239" },
];
================================================
FILE: components/AreaPicker/index.vue
================================================
<template>
<u-picker
:show="show"
:defaultIndex="defaultIndex"
:columns="columns"
keyName="label"
@cancel="cancel"
@confirm="confirm"
/>
</template>
<script>
import { areaCode } from "./areaCode";
export default {
data() {
return {
show: false,
defaultIndex: [0],
};
},
methods: {
init() {
this.show = true;
},
confirm({ value }) {
const item = value[0];
this.$emit("chooseArea", item.value);
this.show = false;
},
cancel() {
this.show = false;
},
},
computed: {
columns() {
const list = areaCode.map((i) => {
return { label: `${i.label} +${i.value}`, value: i.value };
});
return [list];
},
},
};
</script>
<style lang="scss" scoped></style>
================================================
FILE: components/ChooseIndexFooter/SelectedMember.vue
================================================
<template>
<view class="selected_item">
<view class="left_info">
<my-avatar
:src="source.faceURL"
:desc="source.nickname || source.showName"
:isGroup="Boolean(source.groupID)"
size="42"
/>
<text>{{ source.nickname || source.groupName || source.showName }}</text>
</view>
<view>
<u-button @click="action" plain text="移除" type="primary" />
</view>
</view>
</template>
<script>
import MyAvatar from "@/components/MyAvatar/index.vue";
export default {
name: "",
components: {
MyAvatar,
},
props: {
source: Object,
},
data() {
return {};
},
methods: {
action() {
this.$emit("removeItem");
},
},
mounted() {
console.log(this.source);
},
};
</script>
<style lang="scss" scoped>
.selected_item {
@include btwBox();
padding: 20rpx 0;
.left_info {
@include vCenterBox();
.u-avatar {
margin-right: 24rpx;
}
}
.u-button {
height: 48rpx;
}
}
</style>
================================================
FILE: components/ChooseIndexFooter/index.vue
================================================
<template>
<view class="member_checked_desc">
<view @click="showSelected = true" class="left_info">
<view class="select_num">
<text class="text">{{ `已选择(${choosedData.length})` }}</text>
<u-icon name="arrow-up" size="14" color="#007aff" />
</view>
<view class="select_list">{{ selectedStr }}</view>
</view>
<view class="">
<u-button
:loading="comfirmLoading"
@click="clickComfirm"
:disabled="choosedData.length === 0"
type="primary"
:text="
isRemove
? '移除'
: `确定(${choosedData.length}${
maxLength > 0 ? `/${maxLength}` : ``
})`
"
/>
<u-popup round="24" :show="showSelected" mode="bottom" @close="close">
<view class="selected_container">
<view class="top_desc">
<text>{{ `已选择(${choosedData.length})` }}</text>
<text @click="close" class="comfirm_text">确认</text>
</view>
<u-list class="selected_list">
<u-list-item
v-for="item in choosedData"
:key="item.userID || item.groupID"
>
<selected-member @removeItem="removeItem(item)" :source="item" />
</u-list-item>
</u-list>
</view>
</u-popup>
</view>
</view>
</template>
<script>
import SelectedMember from "./SelectedMember.vue";
export default {
name: "ChooseIndexFooter",
components: {
SelectedMember,
},
props: {
isRemove: Boolean,
choosedData: Array,
comfirmLoading: Boolean,
maxLength: Number,
},
data() {
return {
showSelected: false,
showConfirmModal: false,
};
},
computed: {
selectedStr() {
return this.choosedData
.map((item) => item.nickname || item.showName || item.groupName)
.join("、");
},
},
methods: {
close() {
this.showSelected = false;
},
removeItem(item) {
this.$emit("removeItem", item);
},
clickComfirm() {
this.$emit("confirm");
},
},
};
</script>
<style lang="scss" scoped>
.member_checked_desc {
@include btwBox();
background-color: #fff;
align-items: flex-start;
padding: 24rpx 44rpx 0;
height: 60px;
max-height: 60px;
box-shadow: 0px -1px 4px 1px rgba(0, 0, 0, 0.04);
.left_info {
@include colBox(false);
.select_num {
display: flex;
align-items: center;
color: $uni-color-primary;
}
.select_list {
font-size: 24rpx;
color: #8e9ab0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 50vw;
}
.text {
font-size: 30rpx;
margin-right: 24rpx;
}
}
.u-button {
background-color: #0089ff;
height: 40px;
margin: 0;
}
}
.selected_container {
padding: 44rpx;
.top_desc {
@include btwBox();
margin-bottom: 20rpx;
.comfirm_text {
color: $uni-color-primary;
margin-right: 24rpx;
}
}
.selected_list {
height: 60vh !important;
overflow-y: auto;
}
}
</style>
================================================
FILE: components/ChooseIndexList/index.vue
================================================
<template>
<u-index-list
@scrolltolower="scrolltolower"
class="user_list"
:style="{ height: height }"
:index-list="indexList"
>
<template v-for="(item, index) in itemArr">
<u-index-item :key="index">
<u-index-anchor
class="user_anchor"
:text="indexList[index]"
></u-index-anchor>
<user-item
@itemClick="itemClick"
@updateCheck="updateCheck"
:checked="checkedIDList.includes(cell.userID)"
:disabled="disabledIDList.includes(cell.userID)"
:checkVisible="showCheck"
v-for="cell in item"
:item="cell"
:key="cell.userID"
/>
</u-index-item>
</template>
</u-index-list>
</template>
<script>
import UserItem from "../UserItem/index.vue";
export default {
name: "ChooseIndexList",
components: {
UserItem,
},
props: {
height: {
type: String,
default: "0px",
},
indexList: {
type: Array,
default: () => [],
},
itemArr: {
type: Array,
default: () => [],
},
checkedIDList: {
type: Array,
default: () => [],
},
disabledIDList: {
type: Array,
default: () => [],
},
showCheck: {
type: Boolean,
default: false,
},
},
data() {
return {};
},
methods: {
itemClick(item) {
this.$emit("itemClick", item);
},
updateCheck(item) {
this.$emit("updateCheck", item);
},
scrolltolower() {
this.$emit("scrolltolower");
},
},
};
</script>
<style scoped lang="scss">
.user_list {
flex: 1;
/deep/uni-scroll-view {
max-height: 100% !important;
}
}
.user_anchor {
background-color: #f8f8f8 !important;
border: none !important;
}
</style>
================================================
FILE: components/CustomNavBar/index.vue
================================================
<template>
<u-navbar :title="title" placeholder class="custom_nav_bar">
<template slot="left">
<slot name="left">
<view class="u-nav-slot">
<img
@click="leftClick"
class="back_icon"
width="12"
height="20"
src="static/images/common_left_arrow.png"
alt=""
srcset=""
/>
</view>
</slot>
</template>
<template slot="center">
<slot name="center"></slot>
</template>
<template slot="right">
<slot name="more">
<view @click="rightClick" v-if="more" class="u-nav-slot">
<u-icon
class="more_dot"
name="more-dot-fill"
size="23"
color="#0C1C33"
></u-icon>
</view>
</slot>
</template>
</u-navbar>
</template>
<script>
export default {
name: "",
components: {},
props: {
title: {
type: String,
},
more: {
type: Boolean,
default: false,
},
route: {
type: Boolean,
default: true,
},
},
data() {
return {};
},
methods: {
leftClick() {
if (this.route) {
uni.navigateBack();
}
this.$emit("leftClick");
},
rightClick() {
this.$emit("rightClick");
},
},
};
</script>
<style lang="scss" scoped>
.custom_nav_bar {
/deep/ .u-navbar__content__left {
padding: 0;
}
/deep/ .u-navbar__content__right {
padding: 0;
}
.back_icon {
padding: 24rpx;
margin-left: 20rpx;
}
.more_dot {
padding: 24rpx;
margin-right: 20rpx;
}
}
</style>
================================================
FILE: components/MyAvatar/index.vue
================================================
<template>
<u-avatar
@longpress="longpress"
@click="click"
@onError="errorHandle"
:src="getAvatarUrl"
:text="avatarText"
bgColor="#0089FF"
:defaultUrl="getDdefaultUrl"
:shape="shape"
:size="size"
mode="aspectFill"
font-size="14"
>
</u-avatar>
</template>
<script>
import defaultGroupIcon from "static/images/contact_my_group.png";
import defaultNotifyIcon from "static/images/default_notify_icon.png";
export default {
name: "MyAvatar",
props: {
src: String,
shape: {
type: String,
default: "square",
},
size: {
type: String,
default: "40",
},
isGroup: {
type: Boolean,
default: false,
},
isNotify: {
type: Boolean,
default: false,
},
desc: String,
},
data() {
return {
avatarText: undefined,
};
},
computed: {
getAvatarUrl() {
if (this.src) {
return this.src;
}
if (this.isGroup) {
return defaultGroupIcon;
}
if (this.isNotify) {
return defaultNotifyIcon;
}
this.avatarText = this.desc ? this.desc.slice(0, 1) : "未知";
return "";
},
getDdefaultUrl() {
return this.isGroup ? defaultGroupIcon : undefined;
},
},
methods: {
errorHandle() {
this.avatarText = this.desc ? this.desc.slice(0, 1) : "未知";
},
redirectShow() {
if (this.avatarText) {
this.avatarText = undefined;
}
},
click() {
this.$emit("click");
},
longpress() {
this.$emit("longpress");
},
},
watch: {
src() {
this.redirectShow();
},
desc() {
this.redirectShow();
},
},
};
</script>
<style></style>
================================================
FILE: components/SettingItem/index.vue
================================================
<template>
<view
@click="onClick"
class="setting_item"
:class="{ setting_item_border: border }"
>
<text :style="{ color: danger ? '#FF381F' : '$uni-text-color' }">{{
title
}}</text>
<u-switch
:loading="loading"
@change="onChange"
:asyncChange="true"
v-if="is_switch"
size="20"
:value="switchValue"
/>
<view v-else class="setting_right">
<slot></slot>
<u-icon v-if="arrow" name="arrow-right" color="#999" size="18" />
</view>
</view>
</template>
<script>
export default {
name: "",
components: {},
props: {
title: String,
danger: {
type: Boolean,
default: false,
},
is_switch: {
type: Boolean,
default: false,
},
switchValue: {
type: Boolean,
default: false,
},
loading: {
type: Boolean,
default: false,
},
border: {
type: Boolean,
default: true,
},
arrow: {
type: Boolean,
default: true,
},
},
data() {
return {};
},
methods: {
onClick() {
this.$emit("click");
},
onChange(value) {
this.$emit("switch", value);
},
},
};
</script>
<style lang="scss" scoped>
.setting_item {
@include btwBox();
padding: 24rpx 36rpx;
color: $uni-text-color;
.setting_right {
@include vCenterBox();
}
&_border {
border-bottom: 1px solid rgba(153, 153, 153, 0.2);
}
}
</style>
================================================
FILE: components/UserItem/index.vue
================================================
<template>
<view @click="clickItem" class="user_item">
<view
v-if="checkVisible"
class="check_wrap"
:class="{ check_wrap_active: checked, check_wrap_disabled: disabled }"
>
<u-icon v-show="checked" name="checkbox-mark" size="12" color="#fff" />
</view>
<my-avatar
:src="item.faceURL"
:desc="item.remark || item.nickname || item.showName"
:isGroup="item.groupName !== undefined || isGroupConversation"
size="42"
/>
<view class="user_item_details">
<text class="user_name">{{
item.remark || item.nickname || item.groupName || item.showName
}}</text>
<text v-if="item.roleLevel === 100" class="user_role">群主</text>
<text v-if="item.roleLevel === 60" class="user_role admin_role"
>管理员</text
>
<!-- <view class="bottom_line" /> -->
</view>
<slot name="action"></slot>
</view>
</template>
<script>
import MyAvatar from "@/components/MyAvatar/index.vue";
import { SessionType } from "openim-uniapp-polyfill";
export default {
name: "UserItem",
components: {
MyAvatar,
},
props: {
checkVisible: {
type: Boolean,
default: false,
},
checked: {
type: Boolean,
default: false,
},
disabled: {
type: Boolean,
default: false,
},
item: Object,
},
data() {
return {};
},
computed: {
isGroupConversation() {
return this.item.conversationType === SessionType.WorkingGroup;
},
},
methods: {
clickItem() {
if (!this.disabled) {
this.$emit(this.checkVisible ? "updateCheck" : "itemClick", this.item);
}
},
},
};
</script>
<style lang="scss" scoped>
.user_item {
@include vCenterBox();
padding: 24rpx 44rpx;
color: $uni-text-color;
position: relative;
.check_wrap {
@include centerBox();
box-sizing: border-box;
width: 40rpx;
min-width: 40rpx;
height: 40rpx;
min-height: 40rpx;
border: 2px solid #979797;
border-radius: 50%;
margin-top: 16rpx;
margin-right: 24rpx;
&_active {
background-color: #1d6bed;
border: none;
}
&_disabled {
background-color: #c8c9cc;
}
}
&_details {
@include vCenterBox();
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-left: 24rpx;
width: 100%;
position: relative;
.bottom_line {
height: 1px;
width: 100%;
background-color: #f0f0f0;
position: absolute;
bottom: -44rpx;
}
.user_name {
@include nomalEllipsis();
max-width: 60%;
color: $uni-text-color;
}
.user_role {
font-size: 34rpx;
// background-color: #f4da9a;
// color: #FF8C00;
padding: 8rpx 24rpx;
border-radius: 24rpx;
margin-left: 24rpx;
color: $u-tips-color;
}
.admin_role {
color: $u-tips-color;
// background-color: #A2C9F8;
// color: #2691ED;
}
}
}
.u-list-item:last-child {
.bottom_line {
height: 0;
}
}
</style>
================================================
FILE: components/gaoyia-parse/components/wxParseAudio.vue
================================================
<template>
<!-- '<audio/>' 组件不再维护,建议使用能力更强的 'uni.createInnerAudioContext' 接口 有时间再改-->
<!--增加audio标签支持-->
<audio
:id="node.attr.id"
:class="node.classStr"
:style="node.styleStr"
:src="node.attr.src"
:loop="node.attr.loop"
:poster="node.attr.poster"
:name="node.attr.name"
:author="node.attr.author"
controls
></audio>
</template>
<script>
export default {
name: "wxParseAudio",
props: {
node: {
type: Object,
default() {
return {};
},
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseImg.vue
================================================
<template>
<image
:mode="node.attr.mode"
:lazy-load="node.attr.lazyLoad"
:class="node.classStr"
:style="newStyleStr || node.styleStr"
:data-src="node.attr.src"
:src="node.attr.src"
@tap="wxParseImgTap"
@load="wxParseImgLoad"
/>
</template>
<script>
export default {
name: "wxParseImg",
data() {
return {
newStyleStr: "",
preview: false,
};
},
inject: ["parseWidth"],
mounted() {},
props: {
node: {
type: Object,
default() {
return {};
},
},
},
methods: {
wxParseImgTap(e) {
if (!this.preview) return;
const { src } = e.currentTarget.dataset;
if (!src) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
// TODO 遍历获取父节点执行方法
parent = parent.$parent;
}
parent.preview(src, e);
},
// 图片视觉宽高计算函数区
wxParseImgLoad(e) {
const { src } = e.currentTarget.dataset;
if (!src) return;
let { width, height } = e.mp.detail;
const recal = this.wxAutoImageCal(width, height);
const { imageheight, imageWidth } = recal;
const { padding, mode } = this.node.attr; //删除padding
// const { mode } = this.node.attr;
const { styleStr } = this.node;
const imageHeightStyle =
mode === "widthFix" ? "" : `height: ${imageheight}px;`;
this.newStyleStr = `${styleStr}; ${imageHeightStyle}; width: ${imageWidth}px; padding: 0 ${+padding}px;`; //删除padding
// this.newStyleStr = `${styleStr}; ${imageHeightStyle}; width: ${imageWidth}px;`;
},
// 计算视觉优先的图片宽高
wxAutoImageCal(originalWidth, originalHeight) {
// 获取图片的原始长宽
const windowWidth = this.parseWidth.value;
const results = {};
if (originalWidth < 60 || originalHeight < 60) {
const { src } = this.node.attr;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.removeImageUrl(src);
this.preview = false;
}
// 判断按照那种方式进行缩放
if (originalWidth > windowWidth) {
// 在图片width大于手机屏幕width时候
results.imageWidth = windowWidth;
results.imageheight = windowWidth * (originalHeight / originalWidth);
} else {
// 否则展示原来的数据
results.imageWidth = originalWidth;
results.imageheight = originalHeight;
}
return results;
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTable.vue
================================================
<template>
<div class="tablebox">
<rich-text
:nodes="nodes"
:class="node.classStr"
:style="'user-select:' + parseSelect"
></rich-text>
</div>
</template>
<script>
export default {
name: "wxParseTable",
props: {
node: {
type: Object,
default() {
return {};
},
},
},
inject: ["parseSelect"],
data() {
return {
nodes: [],
};
},
mounted() {
this.nodes = this.loadNode([this.node]);
},
methods: {
loadNode(node) {
let obj = [];
for (let children of node) {
if (children.node == "element") {
let t = {
name: children.tag,
attrs: {
class: children.classStr,
// style: children.styleStr,
},
children: children.nodes ? this.loadNode(children.nodes) : [],
};
obj.push(t);
} else if (children.node == "text") {
obj.push({
type: "text",
text: children.text,
});
}
}
return obj;
},
},
};
</script>
<style>
@import url("../parse.css");
</style>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate0.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<wx-parse-template :node="node" />
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img
:node="node"
v-else-if="node.tag == 'img'"
:style="node.styleStr"
/>
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
// #ifdef APP-PLUS | H5
import wxParseTemplate from "./wxParseTemplate0";
// #endif
// #ifdef MP
import wxParseTemplate from "./wxParseTemplate1";
// #endif
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
// #ifdef APP-PLUS | H5
name: "wxParseTemplate",
// #endif
// #ifdef MP
name: "wxParseTemplate0",
// #endif
props: {
node: {},
},
components: {
wxParseTemplate,
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset; // TODO currentTarget才有dataset
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
// TODO 遍历获取父节点执行方法
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate1.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<wx-parse-template :node="node" />
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img
:node="node"
v-else-if="node.tag == 'img'"
:style="node.styleStr"
/>
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
import wxParseTemplate from "./wxParseTemplate2";
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
name: "wxParseTemplate1",
props: {
node: {},
},
components: {
wxParseTemplate,
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset;
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate10.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<wx-parse-template :node="node" />
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img
:node="node"
v-else-if="node.tag == 'img'"
:style="node.styleStr"
/>
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
import wxParseTemplate from "./wxParseTemplate11";
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
name: "wxParseTemplate10",
props: {
node: {},
},
components: {
wxParseTemplate,
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset;
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate11.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<rich-text
:nodes="node"
:class="node.classStr"
:style="'user-select:' + parseSelect"
></rich-text>
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<rich-text
:nodes="node"
:class="node.classStr"
:style="'user-select:' + parseSelect"
></rich-text>
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<rich-text
:nodes="node"
:class="node.classStr"
:style="'user-select:' + parseSelect"
></rich-text>
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img :node="node" v-else-if="node.tag == 'img'" />
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<rich-text
:nodes="node"
:class="node.classStr"
:style="'user-select:' + parseSelect"
></rich-text>
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
name: "wxParseTemplate11",
props: {
node: {},
},
components: {
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset;
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate2.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<wx-parse-template :node="node" />
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img
:node="node"
v-else-if="node.tag == 'img'"
:style="node.styleStr"
/>
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
import wxParseTemplate from "./wxParseTemplate3";
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
name: "wxParseTemplate2",
props: {
node: {},
},
components: {
wxParseTemplate,
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset;
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate3.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<wx-parse-template :node="node" />
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img
:node="node"
v-else-if="node.tag == 'img'"
:style="node.styleStr"
/>
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
import wxParseTemplate from "./wxParseTemplate4";
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
name: "wxParseTemplate3",
props: {
node: {},
},
components: {
wxParseTemplate,
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset;
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate4.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<wx-parse-template :node="node" />
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img
:node="node"
v-else-if="node.tag == 'img'"
:style="node.styleStr"
/>
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
import wxParseTemplate from "./wxParseTemplate5";
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
name: "wxParseTemplate4",
props: {
node: {},
},
components: {
wxParseTemplate,
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset;
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate5.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<wx-parse-template :node="node" />
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img
:node="node"
v-else-if="node.tag == 'img'"
:style="node.styleStr"
/>
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
import wxParseTemplate from "./wxParseTemplate6";
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
name: "wxParseTemplate5",
props: {
node: {},
},
components: {
wxParseTemplate,
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset;
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate6.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<wx-parse-template :node="node" />
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img
:node="node"
v-else-if="node.tag == 'img'"
:style="node.styleStr"
/>
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
import wxParseTemplate from "./wxParseTemplate7";
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
name: "wxParseTemplate6",
props: {
node: {},
},
components: {
wxParseTemplate,
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset;
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate7.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<wx-parse-template :node="node" />
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img
:node="node"
v-else-if="node.tag == 'img'"
:style="node.styleStr"
/>
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
import wxParseTemplate from "./wxParseTemplate8";
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
name: "wxParseTemplate7",
props: {
node: {},
},
components: {
wxParseTemplate,
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset;
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate8.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<wx-parse-template :node="node" />
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img
:node="node"
v-else-if="node.tag == 'img'"
:style="node.styleStr"
/>
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
import wxParseTemplate from "./wxParseTemplate9";
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
name: "wxParseTemplate8",
props: {
node: {},
},
components: {
wxParseTemplate,
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset;
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseTemplate9.vue
================================================
<template>
<!--判断是否是标签节点-->
<block v-if="node.node == 'element'">
<!--button类型-->
<button
v-if="node.tag == 'button'"
type="default"
size="mini"
:class="node.classStr"
:style="node.styleStr"
>
<wx-parse-template :node="node" />
</button>
<!--a类型-->
<view
v-else-if="node.tag == 'a'"
@click="wxParseATap(node.attr, $event)"
:class="node.classStr"
:data-href="node.attr.href"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--li类型-->
<view
v-else-if="node.tag == 'li'"
:class="node.classStr"
:style="node.styleStr"
>
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
<!--table类型-->
<wx-parse-table
v-else-if="node.tag == 'table'"
:class="node.classStr"
:style="node.styleStr"
:node="node"
/>
<!--br类型-->
<!-- #ifndef H5 -->
<text v-else-if="node.tag == 'br'">\n</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<br v-else-if="node.tag == 'br'" />
<!-- #endif -->
<!--video类型-->
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
<!--audio类型-->
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
<!--img类型-->
<wx-parse-img
:node="node"
v-else-if="node.tag == 'img'"
:style="node.styleStr"
/>
<!--其他标签-->
<view v-else :class="node.classStr" :style="node.styleStr">
<block v-for="(node, index) of node.nodes" :key="index">
<wx-parse-template :node="node" />
</block>
</view>
</block>
<!--判断是否是文本节点-->
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
</template>
<script>
import wxParseTemplate from "./wxParseTemplate10";
import wxParseImg from "./wxParseImg";
import wxParseVideo from "./wxParseVideo";
import wxParseAudio from "./wxParseAudio";
import wxParseTable from "./wxParseTable";
export default {
name: "wxParseTemplate9",
props: {
node: {},
},
components: {
wxParseTemplate,
wxParseImg,
wxParseVideo,
wxParseAudio,
wxParseTable,
},
methods: {
wxParseATap(attr, e) {
const { href } = e.currentTarget.dataset;
if (!href) return;
let parent = this.$parent;
while (!parent.preview || typeof parent.preview !== "function") {
parent = parent.$parent;
}
parent.navigate(href, e, attr);
},
},
};
</script>
================================================
FILE: components/gaoyia-parse/components/wxParseVideo.vue
================================================
<template>
<!--增加video标签支持,并循环添加-->
<view :class="node.classStr" :style="node.styleStr">
<video
:class="node.classStr"
:style="node.styleStr"
class="video-video"
:src="node.attr.src"
></video>
</view>
</template>
<script>
export default {
name: "wxParseVideo",
props: {
node: {},
},
};
</script>
================================================
FILE: components/gaoyia-parse/libs/html2json.js
================================================
/**
* html2Json 改造来自: https://github.com/Jxck/html2json
*
*
* author: Di (微信小程序开发工程师)
* organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
* 垂直微信小程序开发交流社区
*
* github地址: https://github.com/icindy/wxParse
*
* for: 微信小程序富文本解析
* detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
*/
import wxDiscode from "./wxDiscode";
import HTMLParser from "./htmlparser";
function makeMap(str) {
const obj = {};
const items = str.split(",");
for (let i = 0; i < items.length; i += 1) obj[items[i]] = true;
return obj;
}
// Block Elements - HTML 5
const block = makeMap(
"br,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video",
);
// Inline Elements - HTML 5
const inline = makeMap(
"a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var",
);
// Elements that you can, intentionally, leave open
// (and which close themselves)
const closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
function removeDOCTYPE(html) {
const isDocument = /<body.*>([^]*)<\/body>/.test(html);
return isDocument ? RegExp.$1 : html;
}
function trimHtml(html) {
return html
.replace(/<!--.*?-->/gi, "")
.replace(/\/\*.*?\*\//gi, "")
.replace(/[ ]+</gi, "<")
.replace(/<script[^]*<\/script>/gi, "")
.replace(/<style[^]*<\/style>/gi, "");
}
function getScreenInfo() {
const screen = {};
wx.getSystemInfo({
success: (res) => {
screen.width = res.windowWidth;
screen.height = res.windowHeight;
},
});
return screen;
}
function html2json(html, customHandler, imageProp, host) {
// 处理字符串
html = removeDOCTYPE(html);
html = trimHtml(html);
html = wxDiscode.strDiscode(html);
// 生成node节点
const bufArray = [];
const results = {
nodes: [],
imageUrls: [],
};
const screen = getScreenInfo();
function Node(tag) {
this.node = "element";
this.tag = tag;
this.$screen = screen;
}
HTMLParser(html, {
start(tag, attrs, unary) {
// node for this element
const node = new Node(tag);
if (bufArray.length !== 0) {
const parent = bufArray[0];
if (parent.nodes === undefined) {
parent.nodes = [];
}
}
if (block[tag]) {
node.tagType = "block";
} else if (inline[tag]) {
node.tagType = "inline";
} else if (closeSelf[tag]) {
node.tagType = "closeSelf";
}
node.attr = attrs.reduce((pre, attr) => {
const { name } = attr;
let { value } = attr;
if (name === "class") {
node.classStr = value;
}
// has multi attibutes
// make it array of attribute
if (name === "style") {
node.styleStr = value;
}
if (value.match(/ /)) {
value = value.split(" ");
}
// if attr already exists
// merge it
if (pre[name]) {
if (Array.isArray(pre[name])) {
// already array, push to last
pre[name].push(value);
} else {
// single value, make it array
pre[name] = [pre[name], value];
}
} else {
// not exist, put it
pre[name] = value;
}
return pre;
}, {});
// 优化样式相关属性
if (node.classStr) {
node.classStr += ` ${node.tag}`;
} else {
node.classStr = node.tag;
}
if (node.tagType === "inline") {
node.classStr += " inline";
}
// 对img添加额外数据
if (node.tag === "img") {
let imgUrl = node.attr.src;
imgUrl = wxDiscode.urlToHttpUrl(imgUrl, imageProp.domain);
Object.assign(node.attr, imageProp, {
src: imgUrl || "",
});
if (imgUrl) {
results.imageUrls.push(imgUrl);
}
}
// 处理a标签属性
if (node.tag === "a") {
node.attr.href = node.attr.href || "";
}
// 处理font标签样式属性
if (node.tag === "font") {
const fontSize = [
"x-small",
"small",
"medium",
"large",
"x-large",
"xx-large",
"-webkit-xxx-large",
];
const styleAttrs = {
color: "color",
face: "font-family",
size: "font-size",
};
if (!node.styleStr) node.styleStr = "";
Object.keys(styleAttrs).forEach((key) => {
if (node.attr[key]) {
const value =
key === "size" ? fontSize[node.attr[key] - 1] : node.attr[key];
node.styleStr += `${styleAttrs[key]}: ${value};`;
}
});
}
// 临时记录source资源
if (node.tag === "source") {
results.source = node.attr.src;
}
if (customHandler.start) {
customHandler.start(node, results);
}
if (unary) {
// if this tag doesn't have end tag
// like <img src="hoge.png"/>
// add to parents
const parent = bufArray[0] || results;
if (parent.nodes === undefined) {
parent.nodes = [];
}
parent.nodes.push(node);
} else {
bufArray.unshift(node);
}
},
end(tag) {
// merge into parent tag
const node = bufArray.shift();
if (node.tag !== tag) {
console.error("invalid state: mismatch end tag");
}
// 当有缓存source资源时于于video补上src资源
if (node.tag === "video" && results.source) {
node.attr.src = results.source;
delete results.source;
}
if (customHandler.end) {
customHandler.end(node, results);
}
if (bufArray.length === 0) {
results.nodes.push(node);
} else {
const parent = bufArray[0];
if (!parent.nodes) {
parent.nodes = [];
}
parent.nodes.push(node);
}
},
chars(text) {
if (!text.trim()) return;
const node = {
node: "text",
text,
};
if (customHandler.chars) {
customHandler.chars(node, results);
}
if (bufArray.length === 0) {
results.nodes.push(node);
} else {
const parent = bufArray[0];
if (parent.nodes === undefined) {
parent.nodes = [];
}
parent.nodes.push(node);
}
},
});
return results;
}
export default html2json;
================================================
FILE: components/gaoyia-parse/libs/htmlparser.js
================================================
/**
*
* htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser
*
* author: Di (微信小程序开发工程师)
* organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
* 垂直微信小程序开发交流社区
*
* github地址: https://github.com/icindy/wxParse
*
* for: 微信小程序富文本解析
* detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
*/
// Regular Expressions for parsing tags and attributes
const startTag =
/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z0-9_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
const endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
const attr =
/([a-zA-Z0-9_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
function makeMap(str) {
const obj = {};
const items = str.split(",");
for (let i = 0; i < items.length; i += 1) obj[items[i]] = true;
return obj;
}
// Empty Elements - HTML 5
const empty = makeMap(
"area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr",
);
// Block Elements - HTML 5
const block = makeMap(
"address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video",
);
// Inline Elements - HTML 5
const inline = makeMap(
"a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var",
);
// Elements that you can, intentionally, leave open
// (and which close themselves)
const closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
// Attributes that have their values filled in disabled="disabled"
const fillAttrs = makeMap(
"checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected",
);
function HTMLParser(html, handler) {
let index;
let chars;
let match;
let last = html;
const stack = [];
stack.last = () => stack[stack.length - 1];
function parseEndTag(tag, tagName) {
// If no tag name is provided, clean shop
let pos;
if (!tagName) {
pos = 0;
} else {
// Find the closest opened tag of the same type
tagName = tagName.toLowerCase();
for (pos = stack.length - 1; pos >= 0; pos -= 1) {
if (stack[pos] === tagName) break;
}
}
if (pos >= 0) {
// Close all the open elements, up the stack
for (let i = stack.length - 1; i >= pos; i -= 1) {
if (handler.end) handler.end(stack[i]);
}
// Remove the open elements from the stack
stack.length = pos;
}
}
function parseStartTag(tag, tagName, rest, unary) {
tagName = tagName.toLowerCase();
if (block[tagName]) {
while (stack.last() && inline[stack.last()]) {
parseEndTag("", stack.last());
}
}
if (closeSelf[tagName] && stack.last() === tagName) {
parseEndTag("", tagName);
}
unary = empty[tagName] || !!unary;
if (!unary) stack.push(tagName);
if (handler.start) {
const attrs = [];
rest.replace(attr, function genAttr(matches, name) {
const value =
arguments[2] ||
arguments[3] ||
arguments[4] ||
(fillAttrs[name] ? name : "");
attrs.push({
name,
value,
escaped: value.replace(/(^|[^\\])"/g, '$1\\"'), // "
});
});
if (handler.start) {
handler.start(tagName, attrs, unary);
}
}
}
while (html) {
chars = true;
if (html.indexOf("</") === 0) {
match = html.match(endTag);
if (match) {
html = html.substring(match[0].length);
match[0].replace(endTag, parseEndTag);
chars = false;
}
// start tag
} else if (html.indexOf("<") === 0) {
match = html.match(startTag);
if (match) {
html = html.substring(match[0].length);
match[0].replace(startTag, parseStartTag);
chars = false;
}
}
if (chars) {
index = html.indexOf("<");
let text = "";
while (index === 0) {
text += "<";
html = html.substring(1);
index = html.indexOf("<");
}
text += index < 0 ? html : html.substring(0, index);
html = index < 0 ? "" : html.substring(index);
if (handler.chars) handler.chars(text);
}
if (html === last) throw new Error(`Parse Error: ${html}`);
last = html;
}
// Clean up any remaining tags
parseEndTag();
}
export default HTMLParser;
================================================
FILE: components/gaoyia-parse/libs/wxDiscode.js
================================================
// HTML 支持的数学符号
function strNumDiscode(str) {
str = str.replace(/∀|∀|∀/g, "∀");
str = str.replace(/∂|∂|∂/g, "∂");
str = str.replace(/∃|∃|∃/g, "∃");
str = str.replace(/∅|∅|∅/g, "∅");
str = str.replace(/∇|∇|∇/g, "∇");
str = str.replace(/∈|∈|∈/g, "∈");
str = str.replace(/∉|∉|∉/g, "∉");
str = str.replace(/∋|∋|∋/g, "∋");
str = str.replace(/∏|∏|∏/g, "∏");
str = str.replace(/∑|∑|∑/g, "∑");
str = str.replace(/−|−|−/g, "−");
str = str.replace(/∗|∗|∗/g, "∗");
str = str.replace(/√|√|√/g, "√");
str = str.replace(/∝|∝|∝/g, "∝");
str = str.replace(/∞|∞|∞/g, "∞");
str = str.replace(/∠|∠|∠/g, "∠");
str = str.replace(/∧|∧|∧/g, "∧");
str = str.replace(/∨|∨|∨/g, "∨");
str = str.replace(/∩|∩|∩/g, "∩");
str = str.replace(/∪|∪|∪/g, "∪");
str = str.replace(/∫|∫|∫/g, "∫");
str = str.replace(/∴|∴|∴/g, "∴");
str = str.replace(/∼|∼|∼/g, "∼");
str = str.replace(/≅|≅|≅/g, "≅");
str = str.replace(/≈|≈|≈/g, "≈");
str = str.replace(/≠|≠|≠/g, "≠");
str = str.replace(/≤|≤|≤/g, "≤");
str = str.replace(/≥|≥|≥/g, "≥");
str = str.replace(/⊂|⊂|⊂/g, "⊂");
str = str.replace(/⊃|⊃|⊃/g, "⊃");
str = str.replace(/⊄|⊄|⊄/g, "⊄");
str = str.replace(/⊆|⊆|⊆/g, "⊆");
str = str.replace(/⊇|⊇|⊇/g, "⊇");
str = str.replace(/⊕|⊕|⊕/g, "⊕");
str = str.replace(/⊗|⊗|⊗/g, "⊗");
str = str.replace(/⊥|⊥|⊥/g, "⊥");
str = str.replace(/⋅|⋅|⋅/g, "⋅");
return str;
}
// HTML 支持的希腊字母
function strGreeceDiscode(str) {
str = str.replace(/Α|Α|Α/g, "Α");
str = str.replace(/Β|Β|Β/g, "Β");
str = str.replace(/Γ|Γ|Γ/g, "Γ");
str = str.replace(/Δ|Δ|Δ/g, "Δ");
str = str.replace(/Ε|Ε|Ε/g, "Ε");
str = str.replace(/Ζ|Ζ|Ζ/g, "Ζ");
str = str.replace(/Η|Η|Η/g, "Η");
str = str.replace(/Θ|Θ|Θ/g, "Θ");
str = str.replace(/Ι|Ι|Ι/g, "Ι");
str = str.replace(/Κ|Κ|Κ/g, "Κ");
str = str.replace(/Λ|Λ|Λ/g, "Λ");
str = str.replace(/Μ|Μ|Μ/g, "Μ");
str = str.replace(/Ν|Ν|Ν/g, "Ν");
str = str.replace(/Ξ|Ν|Ν/g, "Ν");
str = str.replace(/Ο|Ο|Ο/g, "Ο");
str = str.replace(/Π|Π|Π/g, "Π");
str = str.replace(/Ρ|Ρ|Ρ/g, "Ρ");
str = str.replace(/Σ|Σ|Σ/g, "Σ");
str = str.replace(/Τ|Τ|Τ/g, "Τ");
str = str.replace(/Υ|Υ|Υ/g, "Υ");
str = str.replace(/Φ|Φ|Φ/g, "Φ");
str = str.replace(/Χ|Χ|Χ/g, "Χ");
str = str.replace(/Ψ|Ψ|Ψ/g, "Ψ");
str = str.replace(/Ω|Ω|Ω/g, "Ω");
str = str.replace(/α|α|α/g, "α");
str = str.replace(/β|β|β/g, "β");
str = str.replace(/γ|γ|γ/g, "γ");
str = str.replace(/δ|δ|δ/g, "δ");
str = str.replace(/ε|ε|ε/g, "ε");
str = str.replace(/ζ|ζ|ζ/g, "ζ");
str = str.replace(/η|η|η/g, "η");
str = str.replace(/θ|θ|θ/g, "θ");
str = str.replace(/ι|ι|ι/g, "ι");
str = str.replace(/κ|κ|κ/g, "κ");
str = str.replace(/λ|λ|λ/g, "λ");
str = str.replace(/μ|μ|μ/g, "μ");
str = str.replace(/ν|ν|ν/g, "ν");
str = str.replace(/ξ|ξ|ξ/g, "ξ");
str = str.replace(/ο|ο|ο/g, "ο");
str = str.replace(/π|π|π/g, "π");
str = str.replace(/ρ|ρ|ρ/g, "ρ");
str = str.replace(/ς|ς|ς/g, "ς");
str = str.replace(/σ|σ|σ/g, "σ");
str = str.replace(/τ|τ|τ/g, "τ");
str = str.replace(/υ|υ|υ/g, "υ");
str = str.replace(/φ|φ|φ/g, "φ");
str = str.replace(/χ|χ|χ/g, "χ");
str = str.replace(/ψ|ψ|ψ/g, "ψ");
str = str.replace(/ω|ω|ω/g, "ω");
str = str.replace(/ϑ|ϑ|ϑ/g, "ϑ");
str = str.replace(/ϒ|ϒ|ϒ/g, "ϒ");
str = str.replace(/ϖ|ϖ|ϖ/g, "ϖ");
str = str.replace(/·|·|·/g, "·");
return str;
}
function strcharacterDiscode(str) {
// 加入常用解析
// str = str.replace(/ | | /g, " ");
// str = str.replace(/ | | /g, ' ');
// str = str.replace(/ | /g, '<span class=\'spaceshow\'> </span>');
// str = str.replace(/ | | /g, ' ');
// str = str.replace(/"|"|"/g, "\"");
// str = str.replace(/'|'|'/g, "'");
// str = str.replace(/´|´|´/g, "´");
// str = str.replace(/×|×|×/g, "×");
// str = str.replace(/÷|÷|÷/g, "÷");
// str = str.replace(/&|&|&/g, '&');
// str = str.replace(/<|<|</g, '<');
// str = str.replace(/>|>|>/g, '>');
str = str.replace(/ | | /g, "<span class='spaceshow'> </span>");
str = str.replace(
/ | | /g,
"<span class='spaceshow'> </span>",
);
str = str.replace(/ | /g, "<span class='spaceshow'> </span>");
str = str.replace(
/ | | /g,
"<span class='spaceshow'> </span>",
);
str = str.replace(/"|"|"/g, '"');
str = str.replace(/"|'|'/g, "'");
str = str.replace(/´|´|´/g, "´");
str = str.replace(/×|×|×/g, "×");
str = str.replace(/÷|÷|÷/g, "÷");
str = str.replace(/&|&|&/g, "&");
str = str.replace(/<|<|</g, "<");
str = str.replace(/>|>|>/g, ">");
return str;
}
// HTML 支持的其他实体
function strOtherDiscode(str) {
str = str.replace(/Œ|Œ|Œ/g, "Œ");
str = str.replace(/œ|œ|œ/g, "œ");
str = str.replace(/Š|Š|Š/g, "Š");
str = str.replace(/š|š|š/g, "š");
str = str.replace(/Ÿ|Ÿ|Ÿ/g, "Ÿ");
str = str.replace(/ƒ|ƒ|ƒ/g, "ƒ");
str = str.replace(/ˆ|ˆ|ˆ/g, "ˆ");
str = str.replace(/˜|˜|˜/g, "˜");
str = str.replace(
/ |$#8201;| /g,
"<span class='spaceshow'> </span>",
);
str = str.replace(
/‌|‌|‌/g,
"<span class='spaceshow'></span>",
);
str = str.replace(
/‍|$#8205;|‍/g,
"<span class='spaceshow'></span>",
);
str = str.replace(
/‎|$#8206;|‎/g,
"<span class='spaceshow'></span>",
);
str = str.replace(
/‏|‏|‏/g,
"<span class='spaceshow'></span>",
);
str = str.replace(/–|–|–/g, "–");
str = str.replace(/—|—|—/g, "—");
str = str.replace(/‘|‘|‘/g, "‘");
str = str.replace(/’|’|’/g, "’");
str = str.replace(/‚|‚|‚/g, "‚");
str = str.replace(/“|“|“/g, "“");
str = str.replace(/”|”|”/g, "”");
str = str.replace(/„|„|„/g, "„");
str = str.replace(/†|†|†/g, "†");
str = str.replace(/‡|‡|‡/g, "‡");
str = str.replace(/•|•|•/g, "•");
str = str.replace(/…|…|…/g, "…");
str = str.replace(/‰|‰|‰/g, "‰");
str = str.replace(/′|′|′/g, "′");
str = str.replace(/″|″|″/g, "″");
str = str.replace(/‹|‹|‹/g, "‹");
str = str.replace(/›|›|›/g, "›");
str = str.replace(/‾|‾|‾/g, "‾");
str = str.replace(/€|€|€/g, "€");
str = str.replace(/™|™|™/g, "™");
str = str.replace(/←|←|←/g, "←");
str = str.replace(/↑|↑|↑/g, "↑");
str = str.replace(/→|→|→/g, "→");
str = str.replace(/↓|↓|↓/g, "↓");
str = str.replace(/↔|↔|↔/g, "↔");
str = str.replace(/↵|↵|↵/g, "↵");
str = str.replace(/⌈|⌈|⌈/g, "⌈");
str = str.replace(/⌉|⌉|⌉/g, "⌉");
str = str.replace(/⌊|⌊|⌊/g, "⌊");
str = str.replace(/⌋|⌋|⌋/g, "⌋");
str = str.replace(/◊|◊|◊/g, "◊");
str = str.replace(/♠|♠|♠/g, "♠");
str = str.replace(/♣|♣|♣/g, "♣");
str = str.replace(/♥|♥|♥/g, "♥");
str = str.replace(/♦|♦|♦/g, "♦");
return str;
}
function strDiscode(str) {
str = strNumDiscode(str);
str = strGreeceDiscode(str);
str = strcharacterDiscode(str);
str = strOtherDiscode(str);
return str;
}
function urlToHttpUrl(url, domain) {
if (/^\/\//.test(url)) {
return `https:${url}`;
} else if (/^\//.test(url)) {
return `https://${domain}${url}`;
}
return url;
}
export default {
strDiscode,
urlToHttpUrl,
};
================================================
FILE: components/gaoyia-parse/parse.css
================================================
/**
* author: Di (微信小程序开发工程师)
* organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
* 垂直微信小程序开发交流社区
*
* github地址: https://github.com/icindy/wxParse
*
* for: 微信小程序富文本解析
* detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
*/
/**
* 请在全局下引入该文件,@import '/static/wxParse.css';
*/
.wxParse {
user-select: none;
width: 100%;
font-family: Helvetica, "PingFangSC", "Microsoft Yahei", "微软雅黑", Arial,
sans-serif;
color: #0c1c33;
line-height: 1.5;
font-size: 1em;
text-align: justify; /* //左右两端对齐 */
}
.wxParse view,
.wxParse uni-view {
word-break: break-word;
}
.wxParse .p {
padding-bottom: 0.5em;
clear: both;
/* letter-spacing: 0;//字间距 */
}
.wxParse .inline {
display: inline;
margin: 0;
padding: 0;
}
.wxParse .div {
margin: 0;
padding: 0;
display: block;
}
.wxParse .h1 {
font-size: 2em;
line-height: 1.2em;
margin: 0.67em 0;
}
.wxParse .h2 {
font-size: 1.5em;
margin: 0.83em 0;
}
.wxParse .h3 {
font-size: 1.17em;
margin: 1em 0;
}
.wxParse .h4 {
margin: 1.33em 0;
}
.wxParse .h5 {
font-size: 0.83em;
margin: 1.67em 0;
}
.wxParse .h6 {
font-size: 0.83em;
margin: 1.67em 0;
}
.wxParse .h1,
.wxParse .h2,
.wxParse .h3,
.wxParse .h4,
.wxParse .h5,
.wxParse .h6,
.wxParse .b,
.wxParse .strong {
font-weight: bolder;
}
.wxParse .i,
.wxParse .cite,
.wxParse .em,
.wxParse .var,
.wxParse .address {
font-style: italic;
}
.wxParse .spaceshow {
white-space: pre;
}
.wxParse .pre,
.wxParse .tt,
.wxParse .code,
.wxParse .kbd,
.wxParse .samp {
font-family: monospace;
}
.wxParse .pre {
overflow: auto;
background: #f5f5f5;
padding: 16upx;
white-space: pre;
margin: 1em 0upx;
font-size: 24upx;
}
.wxParse .code {
overflow: auto;
padding: 16upx;
white-space: pre;
margin: 1em 0upx;
background: #f5f5f5;
font-size: 24upx;
}
.wxParse .big {
font-size: 1.17em;
}
.wxParse .small,
.wxParse .sub,
.wxParse .sup {
font-size: 0.83em;
}
.wxParse .sub {
vertical-align: sub;
}
.wxParse .sup {
vertical-align: super;
}
.wxParse .s,
.wxParse .strike,
.wxParse .del {
text-decoration: line-through;
}
.wxParse .strong,
.wxParse .text,
.wxParse .span,
.wxParse .s {
display: inline;
}
.wxParse .a {
color: deepskyblue;
}
.wxParse .video {
text-align: center;
margin: 22upx 0;
}
.wxParse .video-video {
width: 100%;
}
.wxParse .uni-image {
max-width: 100%;
}
.wxParse .img {
display: block;
max-width: 100%;
margin-bottom: 0em; /* //与p标签底部padding同时修改 */
overflow: hidden;
}
.wxParse .blockquote {
margin: 10upx 0;
padding: 22upx 0 22upx 22upx;
font-family: Courier, Calibri, "宋体";
background: #f5f5f5;
border-left: 6upx solid #dbdbdb;
}
.wxParse .blockquote .p {
margin: 0;
}
.wxParse .ul,
.wxParse .ol {
display: block;
margin: 1em 0;
padding-left: 2em;
}
.wxParse .ol {
list-style-type: disc;
}
.wxParse .ol {
list-style-type: decimal;
}
.wxParse .ol > weixin-parse-template,
.wxParse .ul > weixin-parse-template {
display: list-item;
align-items: baseline;
text-align: match-parent;
}
.wxParse .ol > .li,
.wxParse .ul > .li {
display: list-item;
align-items: baseline;
text-align: match-parent;
}
.wxParse .ul .ul,
.wxParse .ol .ul {
list-style-type: circle;
}
.wxParse .ol .ol .ul,
.wxParse .ol .ul .ul,
.wxParse .ul .ol .ul,
.wxParse .ul .ul .ul {
list-style-type: square;
}
.wxParse .u {
text-decoration: underline;
}
.wxParse .hide {
display: none;
}
.wxParse .del {
display: inline;
}
.wxParse .figure {
overflow: hidden;
}
.wxParse .tablebox {
overflow: auto;
background-color: #f5f5f5;
background: #f5f5f5;
font-size: 13px;
padding: 8px;
}
.wxParse .table .table,
.wxParse .table {
border-collapse: collapse;
box-sizing: border-box;
/* 内边框 */
/* width: 100%; */
overflow: auto;
white-space: pre;
}
.wxParse .tbody {
border-collapse: collapse;
box-sizing: border-box;
/* 内边框 */
border: 1px solid #dadada;
}
.wxParse .table .thead,
.wxParse .table .tfoot,
.wxParse .table .th {
border-collapse: collapse;
box-sizing: border-box;
background: #ececec;
font-weight: 40;
}
.wxParse .table .tr {
border-collapse: collapse;
box-sizing: border-box;
/* border: 2px solid #F0AD4E; */
overflow: auto;
}
.wxParse .table .th,
.wxParse .table .td {
border-collapse: collapse;
box-sizing: border-box;
border: 2upx solid #dadada;
overflow: auto;
}
.wxParse .audio,
.wxParse .uni-audio-default {
display: block;
}
================================================
FILE: components/gaoyia-parse/parse.vue
================================================
<!--**
* forked from:https://github.com/F-loat/mpvue-wxParse
*
* github地址: https://github.com/dcloudio/uParse
*
* for: uni-app框架下 富文本解析
*
* 优化 by gaoyia@qq.com https://github.com/gaoyia/parse
*/-->
<template>
<!--基础元素-->
<div class="wxParse" :class="className" :style="'user-select:' + userSelect">
<block v-for="(node, index) of nodes" :key="index" v-if="!loading">
<wxParseTemplate :node="node" />
</block>
</div>
</template>
<script>
import HtmlToJson from "./libs/html2json";
import wxParseTemplate from "./components/wxParseTemplate0";
export default {
name: "wxParse",
props: {
// user-select:none;
userSelect: {
type: String,
default: "text", //none |text| all | element
},
imgOptions: {
type: [Object, Boolean],
default: function () {
return {
loop: false,
indicator: "number",
longPressActions: false,
// longPressActions: {
// itemList: ['发送给朋友', '保存图片', '收藏'],
// success: function (res) {
// console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
// },
// fail: function (res) {
// console.log(res.errMsg);
// }
// }
// }
};
},
},
loading: {
type: Boolean,
default: false,
},
className: {
type: String,
default: "",
},
content: {
type: String,
default: "",
},
noData: {
type: String,
default: '<div style="color: red;">数据不能为空</div>',
},
startHandler: {
type: Function,
default() {
return (node) => {
node.attr.class = null;
node.attr.style = null;
};
},
},
endHandler: {
type: Function,
default: null,
},
charsHandler: {
type: Function,
default: null,
},
imageProp: {
type: Object,
default() {
return {
mode: "aspectFit",
padding: 0,
lazyLoad: false,
domain: "",
};
},
},
},
components: {
wxParseTemplate,
},
data() {
return {
nodes: {},
imageUrls: [],
wxParseWidth: {
value: 0,
},
};
},
computed: {},
mounted() {
this.setHtml();
},
methods: {
setHtml() {
this.getWidth().then((data) => {
this.wxParseWidth.value = data;
});
let {
content,
noData,
imageProp,
startHandler,
endHandler,
charsHandler,
} = this;
let parseData = content || noData;
let customHandler = {
start: startHandler,
end: endHandler,
chars: charsHandler,
};
let results = HtmlToJson(parseData, customHandler, imageProp, this);
this.imageUrls = results.imageUrls;
// this.nodes = results.nodes;
this.nodes = [];
results.nodes.forEach((item) => {
setTimeout(() => {
this.nodes.push(item);
}, 0);
});
},
getWidth() {
return new Promise((res, rej) => {
// #ifndef MP-ALIPAY || MP-BAIDU
uni
.createSelectorQuery()
.in(this)
.select(".wxParse")
.fields(
{
size: true,
scrollOffset: true,
},
(data) => {
res(data.width);
},
)
.exec();
// #endif
// #ifdef MP-BAIDU
const query = swan.createSelectorQuery();
query.select(".wxParse").boundingClientRect();
query.exec((obj) => {
const rect = obj[0];
if (rect) {
res(rect.width);
}
});
// #endif
// #ifdef MP-ALIPAY
my.createSelectorQuery()
.select(".wxParse")
.boundingClientRect()
.exec((ret) => {
res(ret[0].width);
});
// #endif
});
},
navigate(href, $event, attr) {
console.log(href, attr);
this.$emit("navigate", href, $event);
},
preview(src, $event) {
// if (!this.imageUrls.length || typeof this.imgOptions === 'boolean') {
// } else {
// uni.previewImage({
// current: src,
// urls: this.imageUrls,
// loop: this.imgOptions.loop,
// indicator: this.imgOptions.indicator,
// longPressActions: this.imgOptions.longPressActions
// });
// }
// this.$emit('preview', src, $event);
},
removeImageUrl(src) {
const { imageUrls } = this;
imageUrls.splice(imageUrls.indexOf(src), 1);
},
},
// 父组件中提供
provide() {
return {
parseWidth: this.wxParseWidth,
parseSelect: this.userSelect,
// 提示:provide 和 inject 绑定并不是可响应的。这是刻意为之的。然而,如果你传入了一个可监听的对象,那么其对象的属性还是可响应的。
};
},
watch: {
content() {
this.setHtml();
},
// content: {
// handler: function(newVal, oldVal) {
// if (newVal !== oldVal) {
//
// }
// },
// deep: true
// }
},
};
</script>
================================================
FILE: constant/comp.js
================================================
export const ChatingFooterActionTypes = {
Album: "Album",
};
export const ContactMenuTypes = {
NewFriend: "NewFriend",
NewGroup: "NewGroup",
MyFriend: "MyFriend",
MyGroup: "MyGroup",
};
export const GroupMemberListTypes = {
Preview: "Preview",
Transfer: "Transfer",
Kickout: "Kickout",
};
export const ContactChooseTypes = {
Invite: "Invite",
GetList: "GetList",
};
export const UpdateMessageTypes = {
Overall: "Overall",
KeyWords: "KeyWords",
};
export const SmsUserFor = {
Register: 1,
Reset: 2,
Login: 3,
};
export const CustomMessageStatus = {
Success: "success",
Cancel: "cancel",
Canceled: "canceled",
Refuse: "refuse",
Refused: "refused",
Timeout: "timeout",
AccessByOther: "accessByOther",
};
================================================
FILE: constant/event.js
================================================
export const PageEvents = {
GlobalToast: "GlobalToast",
ScrollToBottom: "ScrollToBottom",
RtcCall: "RtcCall"
};
================================================
FILE: constant/im.js
================================================
import { MessageType } from "openim-uniapp-polyfill";
export const CustomType = {
VideoCall: "c100",
VoiceCall: "c101",
Call: 901,
MassMsg: 903,
};
export const Platform = {
1: 'iOS',
2: 'Android',
3: 'PC',
4: 'PC',
5: 'Web'
};
export const noticeMessageTypes = [
MessageType.RevokeMessage,
MessageType.FriendAdded,
MessageType.GroupCreated,
MessageType.GroupInfoUpdated,
MessageType.MemberQuit,
MessageType.GroupOwnerTransferred,
MessageType.MemberKicked,
MessageType.MemberInvited,
MessageType.MemberEnter,
MessageType.GroupDismissed,
MessageType.GroupMemberMuted,
MessageType.GroupMuted,
MessageType.GroupCancelMuted,
MessageType.GroupMemberCancelMuted,
MessageType.GroupNameUpdated,
MessageType.BurnMessageChange,
];
export const GroupSystemMessageTypes = [
MessageType.GroupCreated,
MessageType.GroupInfoUpdated,
MessageType.MemberQuit,
MessageType.GroupOwnerTransferred,
MessageType.MemberKicked,
MessageType.MemberInvited,
MessageType.MemberEnter,
MessageType.GroupDismissed,
MessageType.GroupMemberMuted,
MessageType.GroupMuted,
MessageType.GroupCancelMuted,
MessageType.GroupMemberCancelMuted,
MessageType.GroupNameUpdated
];
================================================
FILE: constant/index.js
================================================
export * from "./im";
export * from "./comp";
export * from "./event";
================================================
FILE: index.html
================================================
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport =
"CSS" in window &&
typeof CSS.supports === "function" &&
(CSS.supports("top: env(a)") || CSS.supports("top: constant(a)"));
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ", viewport-fit=cover" : "") +
'" />',
);
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>
================================================
FILE: main.js
================================================
import App from "./App";
import Vue from "vue";
// vuex
import store from "./store";
// 引入全局uView
import uView from "@/uni_modules/uview-ui";
Vue.use(uView);
Vue.prototype.$store = store;
Vue.config.productionTip = false;
App.mpType = "app";
const app = new Vue({
store,
...App,
});
// 引入请求封装
require("./util/request/index")(app);
app.$mount();
================================================
FILE: manifest.json
================================================
{
"name" : "IM-UCB",
"appid" : "__UNI__60BFCE0",
"description" : "",
"versionName" : "toc_base_open 3.3.4",
"versionCode" : 334,
"transformPx" : false,
"app-plus" : {
"bounce" : "none",
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : true,
"autoclose" : false,
"delay" : 0
},
"modules" : {
"VideoPlayer" : {},
"Camera" : {},
"Record" : {},
"Geolocation" : {},
"Maps" : {}
},
"distribute" : {
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
"minSdkVersion" : 21
},
"ios" : {
"dSYMs" : false,
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "请求获取读取相册权限",
"NSPhotoLibraryAddUsageDescription" : "请求获取存入相册权限",
"NSCameraUsageDescription" : "请求获取摄像头权限",
"NSMicrophoneUsageDescription" : "请求获取麦克风权限",
"NSLocationWhenInUseUsageDescription" : "请求获取位置权限",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "请求获取位置权限",
"NSLocationAlwaysUsageDescription" : "请求获取位置权限",
"NSBluetoothAlwaysUsageDescription" : "请求获取蓝牙权限"
}
},
"sdkConfigs" : {
"ad" : {},
"geolocation" : {},
"maps" : {},
"share" : {},
"statics" : {},
"speech" : {}
},
"splashscreen" : {
"androidStyle" : "default",
"iosStyle" : "common",
"android" : {
"hdpi" : "unpackage/res/cover/480_762.9.png",
"xhdpi" : "unpackage/res/cover/720_1242.9.png",
"xxhdpi" : "unpackage/res/cover/1080_1882.9.png"
}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
},
"nativePlugins" : {
"Tuoyun-OpenIMSDK" : {
"__plugin_info__" : {
"name" : "OpenIM SDK",
"description" : "OpenIM:由IM技术专家打造的基于 Go 实现的即时通讯(IM)项目,从服务端到客户端SDK开源即时通讯(IM)整体解决方案,可以轻松替代第三方IM云服务,打造具备聊天、社交功能的app。",
"platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=6577",
"android_package_name" : "",
"ios_bundle_id" : "com.tuoyun.uni",
"isCloud" : true,
"bought" : 1,
"pid" : "6577",
"parameters" : {}
}
}
},
"uniStatistics" : {
"enable" : false
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false,
"version" : "2"
},
"vueVersion" : "2",
"h5" : {
"template" : "",
"sdkConfigs" : {
"maps" : {}
},
"devServer" : {
"port" : 8080, //端口号
"disableHostCheck" : true,
"proxy" : {
"/apiv2" : {
"target" : "https://www.pgyer.com/", //目标接口域名
"changeOrigin" : true, //是否跨域
"secure" : true // 设置支持https协议的代理
}
}
}
}
}
================================================
FILE: package.json
================================================
{
"dependencies": {
"date-fns": "^2.30.0",
"dayjs": "^1.11.6",
"image-tools": "^1.4.0",
"md5": "^2.3.0",
"@openim/client-sdk": "^0.0.11-ahpha.1",
"openim-uniapp-polyfill": "^1.4.1",
"uuid": "^9.0.0"
}
}
================================================
FILE: pages/common/contactChoose/index.vue
================================================
<template>
<view class="contact_choose_container">
<custom-nav-bar title="联系人" />
<view class="search_bar_wrap">
<u-search
shape="square"
placeholder="搜索"
:showAction="false"
v-model="keyword"
/>
</view>
<view class="tab_container">
<template v-if="activeTab === 0">
<setting-item
@click="tabChange(tabs[0].idx)"
:title="tabs[0].title"
:border="false"
/>
<view class="tab_pane"></view>
</template>
<template v-else>
<view class="tab_pane" v-show="activeTab === 1">
<choose-index-list
@updateCheck="updateCheckedUser"
:indexList="getChooseData.indexList"
:itemArr="getChooseData.dataList"
:checkedIDList="checkedUserIDList"
:disabledIDList="disabledUserIDList"
:showCheck="true"
/>
</view>
</template>
</view>
<choose-index-footer
:comfirmLoading="comfirmLoading"
@removeItem="updateCheckedUserOrGroup"
@confirm="confirm"
:choosedData="getCheckedInfo"
/>
</view>
</template>
<script>
import { mapGetters } from "vuex";
import { ContactChooseTypes } from "@/constant";
import { formatChooseData, toastWithCallback } from "@/util/common";
import IMSDK from "openim-uniapp-polyfill";
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import UserItem from "@/components/UserItem/index.vue";
import ChooseIndexList from "@/components/ChooseIndexList/index.vue";
import ChooseIndexFooter from "@/components/ChooseIndexFooter/index.vue";
import SettingItem from "@/components/SettingItem/index.vue";
export default {
components: {
CustomNavBar,
UserItem,
ChooseIndexList,
ChooseIndexFooter,
SettingItem,
},
data() {
return {
keyword: "",
type: ContactChooseTypes.Card,
activeTab: 0,
groupID: "",
checkedUserIDList: [],
disabledUserIDList: [],
comfirmLoading: false,
tabs: [
{
idx: 1,
title: "我的好友",
},
],
};
},
computed: {
...mapGetters([
"storeFriendList",
"storeCurrentConversation",
"storeCurrentUserID",
"storeConversationList",
]),
getChooseData() {
if (this.keyword) {
return {
indexList: ["#"],
dataList: [
this.storeFriendList.filter(
(friend) =>
friend.nickname.includes(this.keyword) ||
friend.remark.includes(this.keyword)
),
],
};
}
return formatChooseData(this.storeFriendList);
},
getCheckedInfo() {
const tmpUserIDList = [...this.checkedUserIDList];
const checkedFriends = this.storeFriendList.filter((friend) => {
const idx = tmpUserIDList.findIndex(
(userID) => userID === friend.userID
);
if (idx > -1) {
tmpUserIDList.splice(idx, 1);
}
return idx > -1;
});
return [...checkedFriends];
},
},
onLoad(options) {
const {
groupID,
type,
checkedUserIDList,
} = options;
this.type = type;
this.groupID = groupID;
this.checkedUserIDList = checkedUserIDList
? JSON.parse(checkedUserIDList)
: [];
if (this.type === ContactChooseTypes.Invite) {
this.checkDisabledUser();
}
},
methods: {
checkDisabledUser() {
const friendIDList = this.storeFriendList.map((friend) => friend.userID);
IMSDK.asyncApi("getUsersInGroup", IMSDK.uuid(), {
groupID: this.groupID,
userIDList: friendIDList,
}).then(({ data }) => {
this.disabledUserIDList = data;
});
},
tabChange(idx) {
this.keyword = "";
this.activeTab = idx;
},
updateCheckedUserOrGroup(item) {
if (item.userID) {
this.updateCheckedUser(item);
}
},
updateCheckedUser({ userID }) {
if (this.checkedUserIDList.includes(userID)) {
const idx = this.checkedUserIDList.findIndex((item) => item === userID);
const tmpArr = [...this.checkedUserIDList];
tmpArr.splice(idx, 1);
this.checkedUserIDList = [...tmpArr];
} else {
this.checkedUserIDList = [...this.checkedUserIDList, userID];
}
},
confirm() {
if (this.activeTab) {
this.activeTab = 0;
return;
}
this.comfirmLoading = true;
if (this.type === ContactChooseTypes.GetList) {
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2];
prevPage.$vm.getCheckedUsers(this.getCheckedInfo);
this.comfirmLoading = false;
uni.navigateBack({
delta: 1,
});
return;
}
if (this.type === ContactChooseTypes.Invite) {
IMSDK.asyncApi(IMSDK.IMMethods.InviteUserToGroup, IMSDK.uuid(), {
groupID: this.groupID,
reason: "",
userIDList: this.getCheckedInfo.map((user) => user.userID),
})
.then(() => {
toastWithCallback("操作成功", () => uni.navigateBack());
this.comfirmLoading = false;
})
.catch(() => toastWithCallback("操作失败"));
return;
}
this.comfirmLoading = false;
},
},
onBackPress() {
if (this.activeTab) {
this.activeTab = 0;
return true;
}
return false;
},
};
</script>
<style lang="scss" scoped>
/deep/.u-popup {
flex: none;
}
.contact_choose_container {
height: 100vh;
display: flex;
flex-direction: column;
.search_bar_wrap {
height: 34px;
padding: 12px 22px;
}
.tab_container {
@include colBox(false);
flex: 1;
overflow: hidden;
.setting_item {
padding: 32rpx 36rpx;
}
.title {
height: 60rpx;
display: flex;
justify-content: start;
align-items: center;
// padding: 16rpx 8rpx;
background: #f8f9fa;
color: #8e9ab0;
font-size: 24rpx;
}
.tabs_bar {
@include vCenterBox();
justify-content: space-evenly;
.tab_item {
@include colBox(false);
align-items: center;
image {
width: 50px;
height: 50px;
}
}
}
.tab_pane {
display: flex;
flex-direction: column;
flex: 1;
overflow: hidden;
.member_list {
flex: 1;
height: 80% !important;
/deep/uni-scroll-view {
max-height: 100% !important;
}
}
.user_list {
height: 100% !important;
}
.member_anchor {
background-color: #f8f8f8 !important;
border: none !important;
}
}
}
}
</style>
================================================
FILE: pages/common/createGroup/index.vue
================================================
<template>
<view class="create_group_container">
<custom-nav-bar title="发起群聊" />
<u-toast ref="uToast"></u-toast>
<view class="main">
<view class="group_base_info">
<my-avatar
@click="chooseImage"
:isGroup="true"
:src="groupFaceUrl"
size="44"
/>
<u--input
placeholder="取个群名称方便后续搜索"
border="none"
maxlength="16"
v-model="groupName"
></u--input>
</view>
<view class="member_row" @click="toChooseMember">
<view class="desc_title">
<text>群成员</text>
<text>{{ `${checkedMemberList.length}人` }}</text>
</view>
<view class="member_list">
<view
v-for="member in checkedMemberList.slice(0, 5)"
:key="member.userID"
class="member_item"
>
<my-avatar :src="member.userID" :desc="member.nickname" size="42" />
</view>
</view>
</view>
</view>
<view class="action_bar">
<u-button
:loading="createLoading"
:disabled="disabledCreate"
@click="complateCreate"
type="primary"
text="完成创建"
></u-button>
</view>
</view>
</template>
<script>
import { ContactChooseTypes } from "@/constant";
import IMSDK, {
GroupType,
IMMethods,
SessionType,
} from "openim-uniapp-polyfill";
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import MyAvatar from "@/components/MyAvatar/index.vue";
import { navigateToDesignatedConversation } from "@/util/imCommon";
import { getPurePath, toastWithCallback } from "@/util/common";
export default {
components: {
CustomNavBar,
MyAvatar,
},
data() {
return {
groupName: "",
groupFaceUrl: "",
checkedMemberList: [],
fileList: [],
createLoading: false,
};
},
computed: {
disabledCreate() {
return !this.groupName || this.checkedMemberList.length === 0;
},
},
onLoad(options) {
const { checkedMemberList } = options;
this.checkedMemberList = checkedMemberList
? JSON.parse(checkedMemberList)
: [];
},
methods: {
toChooseMember() {
const checkedIDList = this.checkedMemberList.map(
(member) => member.userID,
);
uni.navigateTo({
url: `/pages/common/contactChoose/index?type=${
ContactChooseTypes.GetList
}&checkedUserIDList=${JSON.stringify(checkedIDList)}`,
});
},
complateCreate() {
this.createLoading = true;
const options = {
adminUserIDs: [],
memberUserIDs: this.checkedMemberList.map((member) => member.userID),
groupInfo: {
groupType: GroupType.WorkingGroup,
groupName: this.groupName,
faceURL: this.groupFaceUrl,
},
};
IMSDK.asyncApi(IMSDK.IMMethods.CreateGroup, IMSDK.uuid(), options)
.then(({ data }) => {
toastWithCallback("创建成功", () =>
navigateToDesignatedConversation(
data.groupID,
SessionType.WorkingGroup,
true,
),
);
})
.finally(() => (this.createLoading = false));
},
getCheckedUsers(list) {
this.checkedMemberList = [...list];
},
chooseImage() {
uni.chooseImage({
count: 1,
sizeType: ["compressed"],
success: async ({ tempFilePaths }) => {
const path = tempFilePaths[0];
const nameIdx = path.lastIndexOf("/") + 1;
const typeIdx = path.lastIndexOf(".") + 1;
const fileName = path.slice(nameIdx);
const fileType = path.slice(typeIdx);
try {
const {
data: { url },
} = await IMSDK.asyncApi(IMMethods.UploadFile, IMSDK.uuid(), {
filepath: getPurePath(tempFilePaths[0]),
name: fileName,
contentType: fileType,
uuid: IMSDK.uuid(),
});
this.groupFaceUrl = url;
} catch (error) {
uni.$u.toast("上传失败");
}
},
fail: function (err) {
uni.$u.toast("上传失败");
},
});
},
},
};
</script>
<style lang="scss">
.create_group_container {
@include colBox(false);
height: 100vh;
background-color: #f6f6f6;
.main {
display: flex;
flex-direction: column;
flex: 1;
}
.group_base_info {
@include vCenterBox();
padding: 44rpx;
background-color: #fff;
margin: 36rpx 0;
.u-input {
margin-left: 48rpx;
}
}
.member_row {
padding: 44rpx;
background-color: #fff;
color: #999;
.desc_title {
@include vCenterBox();
justify-content: space-between;
}
.member_list {
display: flex;
flex-wrap: wrap;
margin-top: 24rpx;
.member_item {
@include colBox(false);
align-items: center;
margin-right: 12rpx;
.member_name {
@include nomalEllipsis();
max-width: 42px;
margin-top: 12rpx;
}
}
}
}
.action_bar {
background-color: #fff;
padding: 44rpx 44rpx;
}
}
</style>
================================================
FILE: pages/common/detailsFileds/index.vue
================================================
<template>
<view class="details_container">
<custom-nav-bar title="个人资料" />
<view class="info_list">
<user-info-row-item class="info_item" lable="头像" arrow>
<my-avatar
:src="sourceInfo.faceURL"
:desc="sourceInfo.nickname"
size="26"
/>
</user-info-row-item>
<user-info-row-item class="info_item" lable="昵称" arrow>
<text class="right_content">{{ sourceInfo.nickname }}</text>
</user-info-row-item>
<user-info-row-item class="info_item" lable="性别" arrow>
<text class="right_content">{{ getGender }}</text>
</user-info-row-item>
<user-info-row-item class="info_item" lable="生日" arrow>
<text class="right_content">{{ getBirthStr }}</text>
</user-info-row-item>
</view>
<view class="info_list">
<user-info-row-item class="info_item" lable="手机号码" arrow>
<text class="right_content">{{ sourceInfo.phoneNumber || "-" }}</text>
</user-info-row-item>
<user-info-row-item class="info_item" lable="邮箱" arrow>
<text class="right_content">{{ sourceInfo.email || "-" }}</text>
</user-info-row-item>
</view>
</view>
</template>
<script>
import dayjs from "dayjs";
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import MyAvatar from "@/components/MyAvatar/index.vue";
import UserInfoRowItem from "../userCard/components/UserInfoRowItem.vue";
export default {
components: {
CustomNavBar,
MyAvatar,
UserInfoRowItem,
},
data() {
return {
sourceInfo: {},
};
},
computed: {
getGender() {
if (this.sourceInfo.gender === 1) {
return "男";
}
if (this.sourceInfo.gender === 2) {
return "女";
}
return "保密";
},
getBirthStr() {
const birth = this.sourceInfo.birth ?? 0;
return dayjs(birth).format("YYYY-MM-DD");
},
},
onLoad(options) {
const { sourceInfo } = options;
this.sourceInfo = JSON.parse(sourceInfo);
},
};
</script>
<style lang="scss" scoped>
.details_container {
@include colBox(false);
height: 100vh;
background-color: #f6f6f6;
.info_list {
border-radius: 6px;
overflow: hidden;
margin: 24rpx;
.info_item {
background-color: #fff;
// border-bottom: 1px solid rgba(153, 153, 153, 0.3);
.right_content {
color: #999;
}
}
}
}
</style>
================================================
FILE: pages/common/groupCard/index.vue
================================================
<template>
<view class="group_card_container">
<custom-nav-bar title="" />
<u-toast ref="uToast"></u-toast>
<view class="main">
<view class="base_info">
<my-avatar :src="sourceGroupInfo.faceURL" :isGroup="true" size="48" />
<view>
<view class="group_name">
<text>{{ sourceGroupInfo.groupName }}</text>
<text v-if="!!sourceGroupInfo.memberCount"
>({{ sourceGroupInfo.memberCount }})</text
>
</view>
<view class="create_time">
<u-icon name="clock" color="#999" size="14"></u-icon>
<text>{{ getCreateTime }}</text>
</view>
</view>
</view>
<view
v-if="!!sourceGroupInfo.memberCount"
@click="toMemberList"
class="member_row info_row"
>
<view class="member_desc">
<text>群成员</text>
<text class="member_count">{{
`${sourceGroupInfo.memberCount}人`
}}</text>
<u-icon name="arrow-right" color="#999" size="18"></u-icon>
</view>
<view class="member_list">
<my-avatar
v-for="member in getRenderMemberList"
:key="member.userID"
class="member_item"
size="42"
:src="member.faceURL"
:desc="member.nickname"
></my-avatar>
<u-avatar
bgColor="#5496EB"
icon="more-dot-fill"
shape="square"
size="42"
></u-avatar>
</view>
</view>
<view class="info_row">
<user-info-row-item lable="群ID号" :content="sourceGroupInfo.groupID" />
</view>
</view>
<view class="action_row">
<u-button type="primary" v-if="!isJoinedGroup" @click="joinGroup"
>申请加入该群</u-button
>
<u-button type="primary" v-else @click="chatingInGroup">发消息</u-button>
</view>
</view>
</template>
<script>
import { GroupMemberListTypes } from "@/constant";
import { navigateToDesignatedConversation } from "@/util/imCommon";
import IMSDK, {
GroupVerificationType,
SessionType,
} from "openim-uniapp-polyfill";
import dayjs from "dayjs";
import MyAvatar from "@/components/MyAvatar/index.vue";
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import UserInfoRowItem from "../userCard/components/UserInfoRowItem.vue";
import userIcon from "static/images/contact_my_friend.png";
export default {
components: {
CustomNavBar,
MyAvatar,
UserInfoRowItem,
},
data() {
return {
sourceID: "",
isScan: false,
sourceGroupInfo: {},
groupMemberList: [],
};
},
computed: {
isJoinedGroup() {
return (
this.$store.getters.storeGroupList.findIndex(
(group) => group.groupID === this.sourceID,
) !== -1
);
},
getCreateTime() {
return dayjs(this.sourceGroupInfo.createTime).format("YYYY-MM-DD");
},
getRenderMemberList() {
if (this.isJoinedGroup) {
this.groupMemberList;
return this.groupMemberList;
}
const memberCount = this.sourceGroupInfo.memberCount ?? 0;
return new Array(memberCount >= 6 ? 6 : memberCount)
.fill(1)
.map((item, idx) => ({
userID: idx,
src: userIcon,
}));
},
},
onLoad(options) {
const { sourceID, sourceInfo, isScan } = options;
this.isScan = !!isScan;
if (sourceID) {
this.sourceID = sourceID;
this.getSourceGroupInfo();
} else {
const info = JSON.parse(sourceInfo);
this.sourceID = info.groupID;
this.sourceGroupInfo = {
...info,
};
}
this.getGroupMemberList();
},
methods: {
toMemberList() {
if (this.isJoinedGroup) {
this.$store.dispatch("conversation/getCurrentGroup", this.sourceID);
this.$store.dispatch(
"conversation/getCurrentMemberInGroup",
this.sourceID,
);
uni.navigateTo({
url: `/pages/conversation/groupMemberList/index?type=${GroupMemberListTypes.Preview}&groupID=${this.sourceID}`,
});
}
},
joinGroup() {
uni.$u.route("/pages/common/sendAddRequest/index", {
isGroup: true,
sourceID: this.sourceID,
isScan: this.isScan,
notNeedVerification:
this.sourceGroupInfo.needVerification ===
GroupVerificationType.AllNot,
sessionType: SessionType.WorkingGroup,
});
},
chatingInGroup() {
navigateToDesignatedConversation(
this.sourceID,
SessionType.WorkingGroup,
).catch(() => this.showToast("获取会话信息失败"));
},
async getSourceGroupInfo() {
let info = null;
if (this.isJoinedGroup) {
info = this.$store.getters.storeGroupList.find(
(group) => group.groupID === this.sourceID,
);
} else {
try {
const { data } = await IMSDK.asyncApi(
IMSDK.IMMethods.GetSpecifiedGroupsInfo,
IMSDK.uuid(),
[this.sourceID],
);
info = data[0] ?? {};
} catch (e) {
info = {};
}
}
this.sourceGroupInfo = {
...info,
};
},
getGroupMemberList() {
if (this.isJoinedGroup) {
IMSDK.asyncApi(IMSDK.IMMethods.GetGroupMemberList, IMSDK.uuid(), {
groupID: this.sourceID,
filter: 0,
offset: 0,
count: 6,
}).then(({ data }) => {
this.groupMemberList = [...data];
});
}
},
showToast(message) {
this.$refs.uToast.show({
message,
});
},
},
};
</script>
<style lang="scss" scoped>
.group_card_container {
@include colBox(false);
height: 100vh;
background-color: #f6f6f6;
.main {
display: flex;
flex-direction: column;
flex: 1;
}
.base_info {
@include vCenterBox();
background-color: #fff;
padding: 44rpx;
margin-bottom: 18rpx;
.u-avatar {
margin-right: 24rpx;
}
.group_name {
display: flex;
margin-bottom: 12rpx;
}
.create_time {
@include vCenterBox();
justify-content: center;
color: #adadad;
font-size: 26rpx;
.u-icon {
margin-right: 12rpx;
}
}
}
.member_row {
padding: 24rpx 44rpx;
.member_desc {
margin-bottom: 24rpx;
position: relative;
.member_count {
font-size: 28rpx;
color: #adadad;
margin-left: 24rpx;
}
.u-icon {
position: absolute;
right: 0;
top: 0;
}
}
.member_list {
display: flex;
.member_item {
margin-right: 12rpx;
&:nth-child(7) {
margin-right: 0;
}
}
}
}
.info_row {
background-color: #fff;
margin-bottom: 24rpx;
/deep/ .content {
color: #adadad;
}
}
.action_row {
background-color: #fff;
padding: 44rpx 44rpx;
}
.online_state {
@include vCenterBox();
margin-left: 24rpx;
font-size: 24rpx;
color: #999;
.dot {
background-color: #10cc64;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
margin-right: 12rpx;
}
}
}
</style>
================================================
FILE: pages/common/markOrIDPage/index.vue
================================================
<template>
<view class="mark_id_container">
<custom-nav-bar :title="getTitle">
<view class="nav_right_action" slot="more">
<text v-show="!loading" @click="saveOrCopy">{{ getConfirmText }}</text>
<u-loading-icon v-show="loading" />
</view>
</custom-nav-bar>
<view class="content_row">
<u-input
:disabled="!isRemark && !isSelfNickname"
v-model="content"
disabledColor="transparent"
maxlength="16"
placeholder="请输入内容"
clearable
>
</u-input>
</view>
</view>
</template>
<script>
import IMSDK from "openim-uniapp-polyfill";
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import { businessInfoUpdate } from "@/api/login";
export default {
components: {
CustomNavBar,
},
props: {},
data() {
return {
content: "",
isRemark: false,
isSelfNickname: false,
sourceInfo: {},
loading: false,
};
},
computed: {
getTitle() {
if (this.isRemark) {
return "设置备注";
}
if (this.isSelfNickname) {
return "我的姓名";
}
return "ID号";
},
getConfirmText() {
return this.isRemark || this.isSelfNickname ? "保存" : "复制";
},
},
onLoad(options) {
const { isRemark, isSelfNickname, sourceInfo } = options;
this.sourceInfo = JSON.parse(sourceInfo);
this.isRemark = !!isRemark;
if (this.isRemark) {
this.content = this.sourceInfo.remark;
}
this.isSelfNickname = !!isSelfNickname;
if (this.isSelfNickname) {
this.content = this.sourceInfo.nickname;
}
},
methods: {
async saveOrCopy() {
if (this.isRemark) {
this.loading = true;
IMSDK.asyncApi(IMSDK.IMMethods.SetFriendRemark, IMSDK.uuid(), {
toUserID: this.sourceInfo.userID,
remark: this.content,
})
.then(() => {
uni.$u.toast("设置成功");
setTimeout(() => uni.navigateBack(), 1000);
})
.catch((error) => {
console.log(error);
uni.$u.toast("设置失败");
})
.finally(() => (this.loading = false));
} else if (this.isSelfNickname) {
this.loading = true;
try {
await businessInfoUpdate({
userID: this.sourceInfo.userID,
nickname: this.content,
});
await this.$store.dispatch("user/updateBusinessInfo");
uni.$u.toast("修改成功");
setTimeout(() => uni.navigateBack(), 1000);
} catch (e) {
console.log(e);
uni.$u.toast("修改失败");
}
this.loading = false;
} else {
uni.setClipboardData({
data: this.sourceInfo.userID,
success: () => {
uni.hideToast();
this.$nextTick(() => {
uni.$u.toast("复制成功");
});
},
});
}
},
},
};
</script>
<style lang="scss" scoped>
.mark_id_container {
@include colBox(false);
height: 100vh;
.nav_right_action {
margin-right: 36rpx;
}
.content_row {
margin-top: 96rpx;
margin: 72rpx 44rpx 0;
.u-input {
background-color: #e8eaef;
}
.u-button {
height: 60rpx;
}
}
}
</style>
================================================
FILE: pages/common/searchUserOrGroup/index.vue
================================================
<template>
<view class="search_container">
<custom-nav-bar :route="false">
<view slot="left"> </view>
<view class="search_bar" slot="center">
<u-search
actionText="取消"
@change="keywordChange"
@custom="cancel"
@search="startSearch"
shape="square"
:placeholder="getPlaceholder"
v-model="keyword"
/>
</view>
</custom-nav-bar>
<view v-show="!empty && !searching" @click="startSearch(keyword)" class="result_row">
<image class="icon" :src="getIcon" alt="" />
<view class="">
<text>查找:</text>
<text>{{ keyword }}</text>
</view>
</view>
<view v-show="searching && !empty" class="result_row result_row_empty">
<u-loading-icon></u-loading-icon>
</view>
<view v-show="empty" class="result_row result_row_empty">
<text>未搜索到相关结果</text>
</view>
</view>
</template>
<script>
import IMSDK from "openim-uniapp-polyfill";
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import searchGroup from "static/images/contact_add_join_group_fill.png";
import searchUser from "static/images/contact_add_search_user_fill.png";
import { businessSearchUserInfo } from "@/api/login";
export default {
components: {
CustomNavBar,
},
data() {
return {
keyword: "",
searching: false,
empty: false,
isSearchGroup: false,
};
},
computed: {
getIcon() {
return this.isSearchGroup ? searchGroup : searchUser;
},
getPlaceholder() {
return this.isSearchGroup ? "请输入群聊ID" : "搜索ID或手机号添加好友";
},
},
onLoad(options) {
const { isSearchGroup } = options;
this.isSearchGroup = JSON.parse(isSearchGroup);
},
methods: {
cancel() {
console.log("cancel");
uni.navigateBack();
},
keywordChange() {
if (this.empty) {
this.empty = !this.empty;
}
},
async startSearch(value) {
if (!value) return;
this.searching = true;
try {
if (this.isSearchGroup) {
let info = this.$store.getters.storeGroupList.find(
(item) => item.groupID === value,
);
if (!info) {
const { data } = await IMSDK.asyncApi(
IMSDK.IMMethods.GetSpecifiedGroupsInfo,
IMSDK.uuid(),
[value],
);
info = data[0];
}
if (info) {
uni.navigateTo({
url: `/pages/common/groupCard/index?sourceInfo=${JSON.stringify(
info,
)}`,
});
} else {
this.empty = true;
}
} else {
let info = this.$store.getters.storeFriendList.find(
(item) => item.userID === value,
);
if (!info) {
const { total, users } = await businessSearchUserInfo(value);
if (total > 0) {
const { data } = await IMSDK.asyncApi(
IMSDK.IMMethods.GetUsersInfo,
IMSDK.uuid(),
[users[0].userID],
);
const imData = data[0];
info = {
...imData,
...users[0],
};
}
}
if (info) {
uni.navigateTo({
url: `/pages/common/userCard/index?sourceInfo=${JSON.stringify(
info,
)}`,
});
} else {
this.empty = true;
}
}
} catch (e) {
//TODO handle the exception
}
this.searching = false;
},
},
};
</script>
<style lang="scss" scoped>
.search_container {
height: 100vh;
background-color: #f8f8f8;
.search_bar {
width: 100%;
padding: 0 44rpx;
}
.result_row {
@include vCenterBox();
padding: 24rpx 44rpx;
font-size: 28rpx;
color: $uni-text-color;
background-color: #fff;
.icon {
width: 20px;
height: 20px;
margin-right: 24rpx;
}
&_empty {
display: flex;
justify-content: center;
color: #999;
}
}
}
</style>
================================================
FILE: pages/common/sendAddRequest/index.vue
================================================
<template>
<view class="request_join_container">
<custom-nav-bar :title="isGroup ? '群聊验证' : '好友验证'">
<view class="top_right_btn" slot="more">
<u-button @click="sendRequest" text="发送" type="primary"></u-button>
</view>
</custom-nav-bar>
<text class="title">{{ `发送${isGroup ? "入群" : "好友"}申请` }}</text>
<view class="input_container">
<u--textarea
height="120"
v-model="reason"
border="none"
placeholder="请输入内容"
maxlength="20"
count
>
</u--textarea>
</view>
</view>
</template>
<script>
import IMSDK, { GroupJoinSource } from "openim-uniapp-polyfill";
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import { navigateToDesignatedConversation } from "@/util/imCommon";
export default {
components: {
CustomNavBar,
},
data() {
return {
reason: "",
sourceID: "",
isGroup: false,
isScan: false,
notNeedVerification: false,
sessionType: 0,
};
},
onLoad(options) {
const { isGroup, sourceID, isScan, notNeedVerification, sessionType } =
options;
this.isGroup = JSON.parse(isGroup);
this.isScan = JSON.parse(isScan);
this.sourceID = sourceID;
this.notNeedVerification = JSON.parse(notNeedVerification);
this.sessionType = sessionType ?? 0;
},
methods: {
sendRequest() {
let func;
if (this.isGroup) {
const joinSource = this.isScan
? GroupJoinSource.QrCode
: GroupJoinSource.Search;
func = IMSDK.asyncApi(IMSDK.IMMethods.JoinGroup, IMSDK.uuid(), {
groupID: this.sourceID,
reqMsg: this.reason,
joinSource,
});
} else {
func = IMSDK.asyncApi(IMSDK.IMMethods.AddFriend, IMSDK.uuid(), {
toUserID: this.sourceID,
reqMsg: this.reason,
});
}
func
.then(() => {
uni.$u.toast(this.notNeedVerification ? "你已加入该群" : "发送成功");
setTimeout(() => {
if (this.notNeedVerification) {
navigateToDesignatedConversation(
this.sourceID,
Number(this.sessionType),
).catch(() => this.showToast("获取会话信息失败"));
} else {
uni.navigateBack();
}
}, 1000);
})
.catch((err) => {
console.log(err);
uni.$u.toast("发送失败");
});
},
showToast(message) {
this.$refs.uToast.show({
message,
});
},
},
};
</script>
<style lang="scss">
.request_join_container {
@include colBox(false);
height: 100vh;
background-color: #f6f6f6;
.top_right_btn {
margin-right: 44rpx;
.u-button {
height: 48rpx;
}
}
.title {
font-size: 28rpx;
color: #999;
margin: 24rpx 44rpx;
}
.input_container {
/deep/.u-textarea {
padding: 24rpx 44rpx !important;
}
}
}
</style>
================================================
FILE: pages/common/userCard/components/UserInfoRowItem.vue
================================================
<template>
<view @click="click" class="row_item" :class="{ arrow_right: arrow }">
<view class="title">
<text>{{ lable }}</text>
</view>
<view class="content">
<text>{{ content }}</text>
</view>
<slot>
<u-icon v-if="arrow" name="arrow-right" color="#999" size="20"></u-icon>
</slot>
</view>
</template>
<script>
export default {
name: "",
components: {},
props: {
lable: String,
content: String,
arrow: {
type: Boolean,
default: false,
},
},
data() {
return {};
},
methods: {
click() {
this.$emit("click");
},
gitextract_8upx_llr/
├── .gitignore
├── .prettierignore
├── App.vue
├── LICENSE
├── Readme.md
├── api/
│ └── login.js
├── common/
│ ├── config.js
│ ├── demo.scss
│ ├── emojis.js
│ ├── mixin.js
│ └── props.js
├── components/
│ ├── AreaPicker/
│ │ ├── areaCode.js
│ │ └── index.vue
│ ├── ChooseIndexFooter/
│ │ ├── SelectedMember.vue
│ │ └── index.vue
│ ├── ChooseIndexList/
│ │ └── index.vue
│ ├── CustomNavBar/
│ │ └── index.vue
│ ├── MyAvatar/
│ │ └── index.vue
│ ├── SettingItem/
│ │ └── index.vue
│ ├── UserItem/
│ │ └── index.vue
│ └── gaoyia-parse/
│ ├── components/
│ │ ├── wxParseAudio.vue
│ │ ├── wxParseImg.vue
│ │ ├── wxParseTable.vue
│ │ ├── wxParseTemplate0.vue
│ │ ├── wxParseTemplate1.vue
│ │ ├── wxParseTemplate10.vue
│ │ ├── wxParseTemplate11.vue
│ │ ├── wxParseTemplate2.vue
│ │ ├── wxParseTemplate3.vue
│ │ ├── wxParseTemplate4.vue
│ │ ├── wxParseTemplate5.vue
│ │ ├── wxParseTemplate6.vue
│ │ ├── wxParseTemplate7.vue
│ │ ├── wxParseTemplate8.vue
│ │ ├── wxParseTemplate9.vue
│ │ └── wxParseVideo.vue
│ ├── libs/
│ │ ├── html2json.js
│ │ ├── htmlparser.js
│ │ └── wxDiscode.js
│ ├── parse.css
│ └── parse.vue
├── constant/
│ ├── comp.js
│ ├── event.js
│ ├── im.js
│ └── index.js
├── index.html
├── main.js
├── manifest.json
├── package.json
├── pages/
│ ├── common/
│ │ ├── contactChoose/
│ │ │ └── index.vue
│ │ ├── createGroup/
│ │ │ └── index.vue
│ │ ├── detailsFileds/
│ │ │ └── index.vue
│ │ ├── groupCard/
│ │ │ └── index.vue
│ │ ├── markOrIDPage/
│ │ │ └── index.vue
│ │ ├── searchUserOrGroup/
│ │ │ └── index.vue
│ │ ├── sendAddRequest/
│ │ │ └── index.vue
│ │ ├── userCard/
│ │ │ ├── components/
│ │ │ │ └── UserInfoRowItem.vue
│ │ │ └── index.vue
│ │ ├── userCardMore/
│ │ │ └── index.vue
│ │ └── webviewWrapper/
│ │ └── index.vue
│ ├── contact/
│ │ ├── applicationDetails/
│ │ │ └── index.vue
│ │ ├── applicationList/
│ │ │ ├── ApplicationItem.vue
│ │ │ └── index.vue
│ │ ├── applicationListDetails/
│ │ │ └── index.vue
│ │ ├── contactAdd/
│ │ │ ├── ActionItem.vue
│ │ │ └── index.vue
│ │ ├── friendList/
│ │ │ └── index.vue
│ │ ├── groupList/
│ │ │ ├── GroupItem.vue
│ │ │ └── index.vue
│ │ ├── index/
│ │ │ ├── components/
│ │ │ │ └── ContactMenus.vue
│ │ │ └── index.vue
│ │ ├── searchUserOrGroup/
│ │ │ └── index.vue
│ │ └── switchJoinGroup/
│ │ └── index.vue
│ ├── conversation/
│ │ ├── chating/
│ │ │ ├── components/
│ │ │ │ ├── ChatingFooter/
│ │ │ │ │ ├── ChatingActionBar.vue
│ │ │ │ │ ├── CustomEditor.vue
│ │ │ │ │ └── index.vue
│ │ │ │ ├── ChatingHeader.vue
│ │ │ │ ├── ChatingList.vue
│ │ │ │ └── MessageItem/
│ │ │ │ ├── ErrorMessageRender.vue
│ │ │ │ ├── MediaMessageRender.vue
│ │ │ │ ├── TextMessageRender.vue
│ │ │ │ └── index.vue
│ │ │ └── index.vue
│ │ ├── conversationList/
│ │ │ ├── components/
│ │ │ │ ├── ChatHeader.vue
│ │ │ │ └── ConversationItem.vue
│ │ │ └── index.vue
│ │ ├── groupManage/
│ │ │ └── index.vue
│ │ ├── groupMemberList/
│ │ │ ├── components/
│ │ │ │ └── GroupMemberListHeader.vue
│ │ │ └── index.vue
│ │ ├── groupSettings/
│ │ │ ├── components/
│ │ │ │ ├── ActionSheet.vue
│ │ │ │ └── GroupMemberRow.vue
│ │ │ └── index.vue
│ │ ├── singleSettings/
│ │ │ └── index.vue
│ │ └── updateGroupOrNickname/
│ │ └── index.vue
│ ├── login/
│ │ ├── index.vue
│ │ ├── registerOrForget/
│ │ │ └── index.vue
│ │ ├── setPassword/
│ │ │ └── index.vue
│ │ ├── setSelfInfo/
│ │ │ └── index.vue
│ │ └── verifyCode/
│ │ └── index.vue
│ ├── profile/
│ │ ├── about/
│ │ │ └── index.vue
│ │ ├── accountSetting/
│ │ │ └── index.vue
│ │ ├── blockList/
│ │ │ └── index.vue
│ │ ├── index/
│ │ │ └── index.vue
│ │ └── selfInfo/
│ │ ├── InfoItem.vue
│ │ └── index.vue
│ └── workbench/
│ └── index/
│ └── index.vue
├── pages.json
├── static/
│ └── wasm_exec.js
├── store/
│ ├── getters.js
│ ├── index.js
│ └── modules/
│ ├── contact.js
│ ├── conversation.js
│ ├── message.js
│ └── user.js
├── styles/
│ ├── common.scss
│ ├── global.scss
│ └── login.scss
├── uni.scss
├── uni_modules/
│ ├── Sansnn-uQRCode/
│ │ ├── changelog.md
│ │ ├── components/
│ │ │ ├── u-qrcode/
│ │ │ │ └── u-qrcode.vue
│ │ │ └── uqrcode/
│ │ │ └── uqrcode.vue
│ │ ├── js_sdk/
│ │ │ ├── gcanvas/
│ │ │ │ ├── bridge/
│ │ │ │ │ └── bridge-weex.js
│ │ │ │ ├── context-2d/
│ │ │ │ │ ├── FillStyleLinearGradient.js
│ │ │ │ │ ├── FillStylePattern.js
│ │ │ │ │ ├── FillStyleRadialGradient.js
│ │ │ │ │ └── RenderingContext.js
│ │ │ │ ├── context-webgl/
│ │ │ │ │ ├── ActiveInfo.js
│ │ │ │ │ ├── Buffer.js
│ │ │ │ │ ├── Framebuffer.js
│ │ │ │ │ ├── GLenum.js
│ │ │ │ │ ├── GLmethod.js
│ │ │ │ │ ├── GLtype.js
│ │ │ │ │ ├── Program.js
│ │ │ │ │ ├── Renderbuffer.js
│ │ │ │ │ ├── RenderingContext.js
│ │ │ │ │ ├── Shader.js
│ │ │ │ │ ├── ShaderPrecisionFormat.js
│ │ │ │ │ ├── Texture.js
│ │ │ │ │ ├── UniformLocation.js
│ │ │ │ │ └── classUtils.js
│ │ │ │ ├── env/
│ │ │ │ │ ├── canvas.js
│ │ │ │ │ ├── image.js
│ │ │ │ │ └── tool.js
│ │ │ │ └── index.js
│ │ │ └── uqrcode/
│ │ │ ├── package.json
│ │ │ └── uqrcode.js
│ │ ├── license.md
│ │ ├── package.json
│ │ └── readme.md
│ ├── mp-html/
│ │ ├── README.md
│ │ ├── changelog.md
│ │ ├── components/
│ │ │ └── mp-html/
│ │ │ ├── mp-html.vue
│ │ │ ├── node/
│ │ │ │ └── node.vue
│ │ │ └── parser.js
│ │ ├── package.json
│ │ └── static/
│ │ └── app-plus/
│ │ └── mp-html/
│ │ ├── js/
│ │ │ └── handler.js
│ │ └── local.html
│ ├── uni-scss/
│ │ ├── changelog.md
│ │ ├── index.scss
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── styles/
│ │ │ ├── index.scss
│ │ │ ├── setting/
│ │ │ │ ├── _border.scss
│ │ │ │ ├── _color.scss
│ │ │ │ ├── _radius.scss
│ │ │ │ ├── _space.scss
│ │ │ │ ├── _styles.scss
│ │ │ │ ├── _text.scss
│ │ │ │ └── _variables.scss
│ │ │ └── tools/
│ │ │ └── functions.scss
│ │ ├── theme.scss
│ │ └── variables.scss
│ ├── uni-swipe-action/
│ │ ├── changelog.md
│ │ ├── components/
│ │ │ ├── uni-swipe-action/
│ │ │ │ └── uni-swipe-action.vue
│ │ │ └── uni-swipe-action-item/
│ │ │ ├── bindingx.js
│ │ │ ├── isPC.js
│ │ │ ├── mpalipay.js
│ │ │ ├── mpother.js
│ │ │ ├── mpwxs.js
│ │ │ ├── render.js
│ │ │ ├── uni-swipe-action-item.vue
│ │ │ └── wx.wxs
│ │ ├── package.json
│ │ └── readme.md
│ ├── uview-ui/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── changelog.md
│ │ ├── components/
│ │ │ ├── u--form/
│ │ │ │ └── u--form.vue
│ │ │ ├── u--image/
│ │ │ │ └── u--image.vue
│ │ │ ├── u--input/
│ │ │ │ └── u--input.vue
│ │ │ ├── u--text/
│ │ │ │ └── u--text.vue
│ │ │ ├── u--textarea/
│ │ │ │ └── u--textarea.vue
│ │ │ ├── u-action-sheet/
│ │ │ │ ├── props.js
│ │ │ │ └── u-action-sheet.vue
│ │ │ ├── u-album/
│ │ │ │ ├── props.js
│ │ │ │ └── u-album.vue
│ │ │ ├── u-alert/
│ │ │ │ ├── props.js
│ │ │ │ └── u-alert.vue
│ │ │ ├── u-avatar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-avatar.vue
│ │ │ ├── u-avatar-group/
│ │ │ │ ├── props.js
│ │ │ │ └── u-avatar-group.vue
│ │ │ ├── u-back-top/
│ │ │ │ ├── props.js
│ │ │ │ └── u-back-top.vue
│ │ │ ├── u-badge/
│ │ │ │ ├── props.js
│ │ │ │ └── u-badge.vue
│ │ │ ├── u-button/
│ │ │ │ ├── nvue.scss
│ │ │ │ ├── props.js
│ │ │ │ ├── u-button.vue
│ │ │ │ └── vue.scss
│ │ │ ├── u-calendar/
│ │ │ │ ├── header.vue
│ │ │ │ ├── month.vue
│ │ │ │ ├── props.js
│ │ │ │ ├── u-calendar.vue
│ │ │ │ └── util.js
│ │ │ ├── u-car-keyboard/
│ │ │ │ ├── props.js
│ │ │ │ └── u-car-keyboard.vue
│ │ │ ├── u-cell/
│ │ │ │ ├── props.js
│ │ │ │ └── u-cell.vue
│ │ │ ├── u-cell-group/
│ │ │ │ ├── props.js
│ │ │ │ └── u-cell-group.vue
│ │ │ ├── u-checkbox/
│ │ │ │ ├── props.js
│ │ │ │ └── u-checkbox.vue
│ │ │ ├── u-checkbox-group/
│ │ │ │ ├── props.js
│ │ │ │ └── u-checkbox-group.vue
│ │ │ ├── u-circle-progress/
│ │ │ │ ├── props.js
│ │ │ │ └── u-circle-progress.vue
│ │ │ ├── u-code/
│ │ │ │ ├── props.js
│ │ │ │ └── u-code.vue
│ │ │ ├── u-code-input/
│ │ │ │ ├── props.js
│ │ │ │ └── u-code-input.vue
│ │ │ ├── u-col/
│ │ │ │ ├── props.js
│ │ │ │ └── u-col.vue
│ │ │ ├── u-collapse/
│ │ │ │ ├── props.js
│ │ │ │ └── u-collapse.vue
│ │ │ ├── u-collapse-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-collapse-item.vue
│ │ │ ├── u-column-notice/
│ │ │ │ ├── props.js
│ │ │ │ └── u-column-notice.vue
│ │ │ ├── u-count-down/
│ │ │ │ ├── props.js
│ │ │ │ ├── u-count-down.vue
│ │ │ │ └── utils.js
│ │ │ ├── u-count-to/
│ │ │ │ ├── props.js
│ │ │ │ └── u-count-to.vue
│ │ │ ├── u-datetime-picker/
│ │ │ │ ├── props.js
│ │ │ │ └── u-datetime-picker.vue
│ │ │ ├── u-divider/
│ │ │ │ ├── props.js
│ │ │ │ └── u-divider.vue
│ │ │ ├── u-dropdown/
│ │ │ │ ├── props.js
│ │ │ │ └── u-dropdown.vue
│ │ │ ├── u-dropdown-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-dropdown-item.vue
│ │ │ ├── u-empty/
│ │ │ │ ├── props.js
│ │ │ │ └── u-empty.vue
│ │ │ ├── u-form/
│ │ │ │ ├── props.js
│ │ │ │ └── u-form.vue
│ │ │ ├── u-form-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-form-item.vue
│ │ │ ├── u-gap/
│ │ │ │ ├── props.js
│ │ │ │ └── u-gap.vue
│ │ │ ├── u-grid/
│ │ │ │ ├── props.js
│ │ │ │ └── u-grid.vue
│ │ │ ├── u-grid-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-grid-item.vue
│ │ │ ├── u-icon/
│ │ │ │ ├── icons.js
│ │ │ │ ├── props.js
│ │ │ │ └── u-icon.vue
│ │ │ ├── u-image/
│ │ │ │ ├── props.js
│ │ │ │ └── u-image.vue
│ │ │ ├── u-index-anchor/
│ │ │ │ ├── props.js
│ │ │ │ └── u-index-anchor.vue
│ │ │ ├── u-index-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-index-item.vue
│ │ │ ├── u-index-list/
│ │ │ │ ├── props.js
│ │ │ │ └── u-index-list.vue
│ │ │ ├── u-input/
│ │ │ │ ├── props.js
│ │ │ │ └── u-input.vue
│ │ │ ├── u-keyboard/
│ │ │ │ ├── props.js
│ │ │ │ └── u-keyboard.vue
│ │ │ ├── u-line/
│ │ │ │ ├── props.js
│ │ │ │ └── u-line.vue
│ │ │ ├── u-line-progress/
│ │ │ │ ├── props.js
│ │ │ │ └── u-line-progress.vue
│ │ │ ├── u-link/
│ │ │ │ ├── props.js
│ │ │ │ └── u-link.vue
│ │ │ ├── u-list/
│ │ │ │ ├── props.js
│ │ │ │ └── u-list.vue
│ │ │ ├── u-list-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-list-item.vue
│ │ │ ├── u-loading-icon/
│ │ │ │ ├── props.js
│ │ │ │ └── u-loading-icon.vue
│ │ │ ├── u-loading-page/
│ │ │ │ ├── props.js
│ │ │ │ └── u-loading-page.vue
│ │ │ ├── u-loadmore/
│ │ │ │ ├── props.js
│ │ │ │ └── u-loadmore.vue
│ │ │ ├── u-modal/
│ │ │ │ ├── props.js
│ │ │ │ └── u-modal.vue
│ │ │ ├── u-navbar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-navbar.vue
│ │ │ ├── u-no-network/
│ │ │ │ ├── props.js
│ │ │ │ └── u-no-network.vue
│ │ │ ├── u-notice-bar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-notice-bar.vue
│ │ │ ├── u-notify/
│ │ │ │ ├── props.js
│ │ │ │ └── u-notify.vue
│ │ │ ├── u-number-box/
│ │ │ │ ├── props.js
│ │ │ │ └── u-number-box.vue
│ │ │ ├── u-number-keyboard/
│ │ │ │ ├── props.js
│ │ │ │ └── u-number-keyboard.vue
│ │ │ ├── u-overlay/
│ │ │ │ ├── props.js
│ │ │ │ └── u-overlay.vue
│ │ │ ├── u-parse/
│ │ │ │ ├── node/
│ │ │ │ │ └── node.vue
│ │ │ │ ├── parser.js
│ │ │ │ ├── props.js
│ │ │ │ └── u-parse.vue
│ │ │ ├── u-picker/
│ │ │ │ ├── props.js
│ │ │ │ └── u-picker.vue
│ │ │ ├── u-picker-column/
│ │ │ │ ├── props.js
│ │ │ │ └── u-picker-column.vue
│ │ │ ├── u-popup/
│ │ │ │ ├── props.js
│ │ │ │ └── u-popup.vue
│ │ │ ├── u-radio/
│ │ │ │ ├── props.js
│ │ │ │ └── u-radio.vue
│ │ │ ├── u-radio-group/
│ │ │ │ ├── props.js
│ │ │ │ └── u-radio-group.vue
│ │ │ ├── u-rate/
│ │ │ │ ├── props.js
│ │ │ │ └── u-rate.vue
│ │ │ ├── u-read-more/
│ │ │ │ ├── props.js
│ │ │ │ └── u-read-more.vue
│ │ │ ├── u-row/
│ │ │ │ ├── props.js
│ │ │ │ └── u-row.vue
│ │ │ ├── u-row-notice/
│ │ │ │ ├── props.js
│ │ │ │ └── u-row-notice.vue
│ │ │ ├── u-safe-bottom/
│ │ │ │ ├── props.js
│ │ │ │ └── u-safe-bottom.vue
│ │ │ ├── u-scroll-list/
│ │ │ │ ├── nvue.js
│ │ │ │ ├── other.js
│ │ │ │ ├── props.js
│ │ │ │ ├── scrollWxs.wxs
│ │ │ │ └── u-scroll-list.vue
│ │ │ ├── u-search/
│ │ │ │ ├── props.js
│ │ │ │ └── u-search.vue
│ │ │ ├── u-skeleton/
│ │ │ │ ├── props.js
│ │ │ │ └── u-skeleton.vue
│ │ │ ├── u-slider/
│ │ │ │ ├── mpother.js
│ │ │ │ ├── mpwxs.js
│ │ │ │ ├── mpwxs.wxs
│ │ │ │ ├── nvue - 副本.js
│ │ │ │ ├── nvue.js
│ │ │ │ ├── props.js
│ │ │ │ └── u-slider.vue
│ │ │ ├── u-status-bar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-status-bar.vue
│ │ │ ├── u-steps/
│ │ │ │ ├── props.js
│ │ │ │ └── u-steps.vue
│ │ │ ├── u-steps-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-steps-item.vue
│ │ │ ├── u-sticky/
│ │ │ │ ├── props.js
│ │ │ │ └── u-sticky.vue
│ │ │ ├── u-subsection/
│ │ │ │ ├── props.js
│ │ │ │ └── u-subsection.vue
│ │ │ ├── u-swipe-action/
│ │ │ │ ├── props.js
│ │ │ │ └── u-swipe-action.vue
│ │ │ ├── u-swipe-action-item/
│ │ │ │ ├── index - backup.wxs
│ │ │ │ ├── index.wxs
│ │ │ │ ├── nvue - backup.js
│ │ │ │ ├── nvue.js
│ │ │ │ ├── props.js
│ │ │ │ ├── u-swipe-action-item.vue
│ │ │ │ └── wxs.js
│ │ │ ├── u-swiper/
│ │ │ │ ├── props.js
│ │ │ │ └── u-swiper.vue
│ │ │ ├── u-swiper-indicator/
│ │ │ │ ├── props.js
│ │ │ │ └── u-swiper-indicator.vue
│ │ │ ├── u-switch/
│ │ │ │ ├── props.js
│ │ │ │ └── u-switch.vue
│ │ │ ├── u-tabbar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tabbar.vue
│ │ │ ├── u-tabbar-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tabbar-item.vue
│ │ │ ├── u-table/
│ │ │ │ ├── props.js
│ │ │ │ └── u-table.vue
│ │ │ ├── u-tabs/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tabs.vue
│ │ │ ├── u-tabs-item/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tabs-item.vue
│ │ │ ├── u-tag/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tag.vue
│ │ │ ├── u-td/
│ │ │ │ ├── props.js
│ │ │ │ └── u-td.vue
│ │ │ ├── u-text/
│ │ │ │ ├── props.js
│ │ │ │ ├── u-text.vue
│ │ │ │ └── value.js
│ │ │ ├── u-textarea/
│ │ │ │ ├── props.js
│ │ │ │ └── u-textarea.vue
│ │ │ ├── u-toast/
│ │ │ │ └── u-toast.vue
│ │ │ ├── u-toolbar/
│ │ │ │ ├── props.js
│ │ │ │ └── u-toolbar.vue
│ │ │ ├── u-tooltip/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tooltip.vue
│ │ │ ├── u-tr/
│ │ │ │ ├── props.js
│ │ │ │ └── u-tr.vue
│ │ │ ├── u-transition/
│ │ │ │ ├── nvue.ani-map.js
│ │ │ │ ├── props.js
│ │ │ │ ├── transition.js
│ │ │ │ ├── u-transition.vue
│ │ │ │ └── vue.ani-style.scss
│ │ │ ├── u-upload/
│ │ │ │ ├── mixin.js
│ │ │ │ ├── props.js
│ │ │ │ ├── u-upload.vue
│ │ │ │ └── utils.js
│ │ │ └── uview-ui/
│ │ │ └── uview-ui.vue
│ │ ├── index.js
│ │ ├── index.scss
│ │ ├── libs/
│ │ │ ├── config/
│ │ │ │ ├── color.js
│ │ │ │ ├── config.js
│ │ │ │ ├── props/
│ │ │ │ │ ├── actionSheet.js
│ │ │ │ │ ├── album.js
│ │ │ │ │ ├── alert.js
│ │ │ │ │ ├── avatar.js
│ │ │ │ │ ├── avatarGroup.js
│ │ │ │ │ ├── backtop.js
│ │ │ │ │ ├── badge.js
│ │ │ │ │ ├── button.js
│ │ │ │ │ ├── calendar.js
│ │ │ │ │ ├── carKeyboard.js
│ │ │ │ │ ├── cell.js
│ │ │ │ │ ├── cellGroup.js
│ │ │ │ │ ├── checkbox.js
│ │ │ │ │ ├── checkboxGroup.js
│ │ │ │ │ ├── circleProgress.js
│ │ │ │ │ ├── code.js
│ │ │ │ │ ├── codeInput.js
│ │ │ │ │ ├── col.js
│ │ │ │ │ ├── collapse.js
│ │ │ │ │ ├── collapseItem.js
│ │ │ │ │ ├── columnNotice.js
│ │ │ │ │ ├── countDown.js
│ │ │ │ │ ├── countTo.js
│ │ │ │ │ ├── datetimePicker.js
│ │ │ │ │ ├── divider.js
│ │ │ │ │ ├── empty.js
│ │ │ │ │ ├── form.js
│ │ │ │ │ ├── formItem.js
│ │ │ │ │ ├── gap.js
│ │ │ │ │ ├── grid.js
│ │ │ │ │ ├── gridItem.js
│ │ │ │ │ ├── icon.js
│ │ │ │ │ ├── image.js
│ │ │ │ │ ├── indexAnchor.js
│ │ │ │ │ ├── indexList.js
│ │ │ │ │ ├── input.js
│ │ │ │ │ ├── keyboard.js
│ │ │ │ │ ├── line.js
│ │ │ │ │ ├── lineProgress.js
│ │ │ │ │ ├── link.js
│ │ │ │ │ ├── list.js
│ │ │ │ │ ├── listItem.js
│ │ │ │ │ ├── loadingIcon.js
│ │ │ │ │ ├── loadingPage.js
│ │ │ │ │ ├── loadmore.js
│ │ │ │ │ ├── modal.js
│ │ │ │ │ ├── navbar.js
│ │ │ │ │ ├── noNetwork.js
│ │ │ │ │ ├── noticeBar.js
│ │ │ │ │ ├── notify.js
│ │ │ │ │ ├── numberBox.js
│ │ │ │ │ ├── numberKeyboard.js
│ │ │ │ │ ├── overlay.js
│ │ │ │ │ ├── parse.js
│ │ │ │ │ ├── picker.js
│ │ │ │ │ ├── popup.js
│ │ │ │ │ ├── radio.js
│ │ │ │ │ ├── radioGroup.js
│ │ │ │ │ ├── rate.js
│ │ │ │ │ ├── readMore.js
│ │ │ │ │ ├── row.js
│ │ │ │ │ ├── rowNotice.js
│ │ │ │ │ ├── scrollList.js
│ │ │ │ │ ├── search.js
│ │ │ │ │ ├── section.js
│ │ │ │ │ ├── skeleton.js
│ │ │ │ │ ├── slider.js
│ │ │ │ │ ├── statusBar.js
│ │ │ │ │ ├── steps.js
│ │ │ │ │ ├── stepsItem.js
│ │ │ │ │ ├── sticky.js
│ │ │ │ │ ├── subsection.js
│ │ │ │ │ ├── swipeAction.js
│ │ │ │ │ ├── swipeActionItem.js
│ │ │ │ │ ├── swiper.js
│ │ │ │ │ ├── swipterIndicator.js
│ │ │ │ │ ├── switch.js
│ │ │ │ │ ├── tabbar.js
│ │ │ │ │ ├── tabbarItem.js
│ │ │ │ │ ├── tabs.js
│ │ │ │ │ ├── tag.js
│ │ │ │ │ ├── text.js
│ │ │ │ │ ├── textarea.js
│ │ │ │ │ ├── toast.js
│ │ │ │ │ ├── toolbar.js
│ │ │ │ │ ├── tooltip.js
│ │ │ │ │ ├── transition.js
│ │ │ │ │ └── upload.js
│ │ │ │ ├── props.js
│ │ │ │ └── zIndex.js
│ │ │ ├── css/
│ │ │ │ ├── color.scss
│ │ │ │ ├── common.scss
│ │ │ │ ├── components.scss
│ │ │ │ ├── flex.scss
│ │ │ │ ├── h5.scss
│ │ │ │ ├── mixin.scss
│ │ │ │ ├── mp.scss
│ │ │ │ ├── nvue.scss
│ │ │ │ └── vue.scss
│ │ │ ├── function/
│ │ │ │ ├── colorGradient.js
│ │ │ │ ├── debounce.js
│ │ │ │ ├── digit.js
│ │ │ │ ├── index.js
│ │ │ │ ├── platform.js
│ │ │ │ ├── test.js
│ │ │ │ └── throttle.js
│ │ │ ├── luch-request/
│ │ │ │ ├── adapters/
│ │ │ │ │ └── index.js
│ │ │ │ ├── core/
│ │ │ │ │ ├── InterceptorManager.js
│ │ │ │ │ ├── Request.js
│ │ │ │ │ ├── buildFullPath.js
│ │ │ │ │ ├── defaults.js
│ │ │ │ │ ├── dispatchRequest.js
│ │ │ │ │ ├── mergeConfig.js
│ │ │ │ │ └── settle.js
│ │ │ │ ├── helpers/
│ │ │ │ │ ├── buildURL.js
│ │ │ │ │ ├── combineURLs.js
│ │ │ │ │ └── isAbsoluteURL.js
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.js
│ │ │ │ ├── utils/
│ │ │ │ │ └── clone.js
│ │ │ │ └── utils.js
│ │ │ ├── mixin/
│ │ │ │ ├── button.js
│ │ │ │ ├── mixin.js
│ │ │ │ ├── mpMixin.js
│ │ │ │ ├── mpShare.js
│ │ │ │ ├── openType.js
│ │ │ │ ├── style.js
│ │ │ │ └── touch.js
│ │ │ └── util/
│ │ │ ├── async-validator.js
│ │ │ ├── calendar.js
│ │ │ ├── dayjs.js
│ │ │ ├── emitter.js
│ │ │ └── route.js
│ │ ├── package.json
│ │ └── theme.scss
│ └── z-paging/
│ ├── changelog.md
│ ├── components/
│ │ ├── z-paging/
│ │ │ ├── components/
│ │ │ │ ├── z-paging-load-more.vue
│ │ │ │ └── z-paging-refresh.vue
│ │ │ ├── config/
│ │ │ │ └── index.js
│ │ │ ├── css/
│ │ │ │ ├── z-paging-main.css
│ │ │ │ └── z-paging-static.css
│ │ │ ├── i18n/
│ │ │ │ ├── en.json
│ │ │ │ ├── index.js
│ │ │ │ ├── zh-Hans.json
│ │ │ │ └── zh-Hant.json
│ │ │ ├── js/
│ │ │ │ ├── modules/
│ │ │ │ │ ├── back-to-top.js
│ │ │ │ │ ├── data-handle.js
│ │ │ │ │ ├── empty.js
│ │ │ │ │ ├── i18n.js
│ │ │ │ │ ├── load-more.js
│ │ │ │ │ ├── loading.js
│ │ │ │ │ ├── nvue.js
│ │ │ │ │ ├── refresher.js
│ │ │ │ │ ├── scroller.js
│ │ │ │ │ └── virtual-list.js
│ │ │ │ ├── z-paging-config.js
│ │ │ │ ├── z-paging-constant.js
│ │ │ │ ├── z-paging-enum.js
│ │ │ │ ├── z-paging-interceptor.js
│ │ │ │ ├── z-paging-main.js
│ │ │ │ ├── z-paging-mixin.js
│ │ │ │ ├── z-paging-static.js
│ │ │ │ └── z-paging-utils.js
│ │ │ ├── wxs/
│ │ │ │ ├── z-paging-renderjs.js
│ │ │ │ └── z-paging-wxs.wxs
│ │ │ └── z-paging.vue
│ │ ├── z-paging-cell/
│ │ │ └── z-paging-cell.vue
│ │ ├── z-paging-empty-view/
│ │ │ └── z-paging-empty-view.vue
│ │ ├── z-paging-swiper/
│ │ │ └── z-paging-swiper.vue
│ │ └── z-paging-swiper-item/
│ │ └── z-paging-swiper-item.vue
│ ├── package.json
│ └── readme.md
└── util/
├── common.js
├── imCommon.js
├── pinyin.js
└── request/
├── index.js
├── requestInterceptors.js
└── responseInterceptors.js
SYMBOL INDEX (954 symbols across 99 files)
FILE: common/config.js
constant BASE_DOMAIN (line 6) | const BASE_DOMAIN = 'web.rentsoft.cn'
constant CHAT_URL (line 7) | const CHAT_URL = `https://${BASE_DOMAIN}/chat`
constant API_URL (line 8) | const API_URL = `https://${BASE_DOMAIN}/api`
constant WS_URL (line 9) | const WS_URL = `wss://${BASE_DOMAIN}/msg_gateway`
FILE: common/mixin.js
method data (line 2) | data() {
FILE: components/gaoyia-parse/libs/html2json.js
function makeMap (line 18) | function makeMap(str) {
function removeDOCTYPE (line 39) | function removeDOCTYPE(html) {
function trimHtml (line 44) | function trimHtml(html) {
function getScreenInfo (line 53) | function getScreenInfo() {
function html2json (line 64) | function html2json(html, customHandler, imageProp, host) {
FILE: components/gaoyia-parse/libs/htmlparser.js
function makeMap (line 22) | function makeMap(str) {
function HTMLParser (line 53) | function HTMLParser(html, handler) {
FILE: components/gaoyia-parse/libs/wxDiscode.js
function strNumDiscode (line 2) | function strNumDiscode(str) {
function strGreeceDiscode (line 44) | function strGreeceDiscode(str) {
function strcharacterDiscode (line 102) | function strcharacterDiscode(str) {
function strOtherDiscode (line 140) | function strOtherDiscode(str) {
function strDiscode (line 207) | function strDiscode(str) {
function urlToHttpUrl (line 215) | function urlToHttpUrl(url, domain) {
FILE: static/wasm_exec.js
method writeSync (line 57) | writeSync(fd, buf) {
method write (line 66) | write(fd, buf, offset, length, position, callback) {
method chmod (line 74) | chmod(path, mode, callback) {
method chown (line 77) | chown(path, uid, gid, callback) {
method close (line 80) | close(fd, callback) {
method fchmod (line 83) | fchmod(fd, mode, callback) {
method fchown (line 86) | fchown(fd, uid, gid, callback) {
method fstat (line 89) | fstat(fd, callback) {
method fsync (line 92) | fsync(fd, callback) {
method ftruncate (line 95) | ftruncate(fd, length, callback) {
method lchown (line 98) | lchown(path, uid, gid, callback) {
method link (line 101) | link(path, link, callback) {
method lstat (line 104) | lstat(path, callback) {
method mkdir (line 107) | mkdir(path, perm, callback) {
method open (line 110) | open(path, flags, mode, callback) {
method read (line 113) | read(fd, buffer, offset, length, position, callback) {
method readdir (line 116) | readdir(path, callback) {
method readlink (line 119) | readlink(path, callback) {
method rename (line 122) | rename(from, to, callback) {
method rmdir (line 125) | rmdir(path, callback) {
method stat (line 128) | stat(path, callback) {
method symlink (line 131) | symlink(path, link, callback) {
method truncate (line 134) | truncate(path, length, callback) {
method unlink (line 137) | unlink(path, callback) {
method utimes (line 140) | utimes(path, atime, mtime, callback) {
method getuid (line 148) | getuid() {
method getgid (line 151) | getgid() {
method geteuid (line 154) | geteuid() {
method getegid (line 157) | getegid() {
method getgroups (line 160) | getgroups() {
method umask (line 165) | umask() {
method cwd (line 168) | cwd() {
method chdir (line 171) | chdir() {
method getRandomValues (line 180) | getRandomValues(b) {
method now (line 193) | now() {
method constructor (line 220) | constructor() {
method run (line 608) | async run(instance) {
method _resume (line 688) | _resume() {
method _makeFuncWrapper (line 698) | _makeFuncWrapper(id) {
FILE: store/modules/contact.js
method SET_FRIEND_LIST (line 17) | SET_FRIEND_LIST(state, list) {
method SET_BLACK_LIST (line 20) | SET_BLACK_LIST(state, list) {
method SET_GROUP_LIST (line 23) | SET_GROUP_LIST(state, list) {
method SET_RECV_FRIEND_APPLICATIONS (line 26) | SET_RECV_FRIEND_APPLICATIONS(state, list) {
method SET_SENT_FRIEND_APPLICATIONS (line 29) | SET_SENT_FRIEND_APPLICATIONS(state, list) {
method SET_RECV_GROUP_APPLICATIONS (line 32) | SET_RECV_GROUP_APPLICATIONS(state, list) {
method SET_SENT_GROUP_APPLICATIONS (line 35) | SET_SENT_GROUP_APPLICATIONS(state, list) {
method getFriendList (line 41) | async getFriendList({ commit }) {
method getGrouplist (line 65) | async getGrouplist({ commit }) {
method getBlacklist (line 87) | getBlacklist({ commit }) {
method getRecvFriendApplications (line 92) | getRecvFriendApplications({ commit }) {
method getSentFriendApplications (line 100) | getSentFriendApplications({ commit }) {
method getRecvGroupApplications (line 108) | getRecvGroupApplications({ commit }) {
method getSentGroupApplications (line 116) | getSentGroupApplications({ commit }) {
method pushNewFriend (line 124) | pushNewFriend({ commit, state }, friendInfo) {
method updateFriendInfo (line 131) | updateFriendInfo({ commit, state }, { friendInfo, isRemove = false }) {
method pushNewBlack (line 146) | pushNewBlack({ commit, state }, blackInfo) {
method updateBlackInfo (line 153) | updateBlackInfo({ commit, state }, { blackInfo, isRemove = false }) {
method pushNewGroup (line 168) | pushNewGroup({ commit, state }, groupInfo) {
method updateGroupInfo (line 175) | updateGroupInfo(
method pushNewRecvFriendApplition (line 197) | pushNewRecvFriendApplition({ commit, state }, application) {
method updateRecvFriendApplition (line 207) | updateRecvFriendApplition(
method pushNewSentFriendApplition (line 227) | pushNewSentFriendApplition({ commit, state }, application) {
method updateSentFriendApplition (line 237) | updateSentFriendApplition(
method pushNewRecvGroupApplition (line 257) | pushNewRecvGroupApplition({ commit, state }, application) {
method updateRecvGroupApplition (line 265) | updateRecvGroupApplition(
method pushNewSentGroupApplition (line 283) | pushNewSentGroupApplition({ commit, state }, application) {
method updateSentGroupApplition (line 293) | updateSentGroupApplition(
FILE: store/modules/conversation.js
method SET_CONVERSATION_LIST (line 13) | SET_CONVERSATION_LIST(state, list) {
method SET_CURRENT_CONVERSATION (line 16) | SET_CURRENT_CONVERSATION(state, conversation) {
method SET_UNREAD_COUNT (line 21) | SET_UNREAD_COUNT(state, count) {
method SET_CURRENT_GROUP (line 34) | SET_CURRENT_GROUP(state, group) {
method SET_CURRENT_MEMBER_IN_GROUP (line 39) | SET_CURRENT_MEMBER_IN_GROUP(state, member) {
method getConversationList (line 47) | async getConversationList({ state, commit }, isFirstPage = true) {
method getCurrentGroup (line 68) | getCurrentGroup({ commit }, groupID) {
method getCurrentMemberInGroup (line 75) | getCurrentMemberInGroup({ commit, rootState }, groupID) {
method getUnReadCount (line 83) | getUnReadCount({ commit }) {
method updateCurrentMemberInGroup (line 91) | updateCurrentMemberInGroup({ commit, state }, memberInfo) {
method resetConversationState (line 100) | resetConversationState({ commit }) {
FILE: store/modules/message.js
method SET_HISTORY_MESSAGE_LIST (line 11) | SET_HISTORY_MESSAGE_LIST(state, list) {
method SET_HAS_MORE_MESSAGE (line 14) | SET_HAS_MORE_MESSAGE(state, hasMore) {
method getHistoryMesageList (line 20) | async getHistoryMesageList({ commit, state }, params) {
method pushNewMessage (line 46) | pushNewMessage({ commit, state }, message) {
method updateOneMessage (line 49) | updateOneMessage(
method resetMessageState (line 76) | resetMessageState({ commit }) {
FILE: store/modules/user.js
method SET_SELF_INFO (line 15) | SET_SELF_INFO(state, info) {
method SET_AUTH_DATA (line 20) | SET_AUTH_DATA(state, data) {
method SET_IS_SYNCING (line 25) | SET_IS_SYNCING(state, data) {
method SET_REINSTALL (line 28) | SET_REINSTALL(state, data) {
method SET_PROGRESS (line 31) | SET_PROGRESS(state, data) {
method getSelfInfo (line 37) | async getSelfInfo({ commit }) {
method updateBusinessInfo (line 55) | async updateBusinessInfo({ commit, state }) {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/bridge/bridge-weex.js
function joinArray (line 31) | function joinArray(arr, sep) {
method texImage2D (line 172) | texImage2D(componentId, ...args) {
method texSubImage2D (line 199) | texSubImage2D(componentId, target, level, xoffset, yoffset, format, type...
method bindImageTexture (line 212) | bindImageTexture(componentId, src, imageId) {
method perloadImage (line 216) | perloadImage([url, id], callback) {
method measureText (line 224) | measureText(text, fontStyle, componentId) {
method getImageData (line 228) | getImageData (componentId, x, y, w, h, callback) {
method putImageData (line 232) | putImageData (componentId, data, x, y, w, h, callback) {
method toTempFilePath (line 236) | toTempFilePath(componentId, x, y, width, height, destWidth, destHeight, ...
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleLinearGradient.js
class FillStyleLinearGradient (line 1) | class FillStyleLinearGradient {
method constructor (line 3) | constructor(x0, y0, x1, y1) {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStylePattern.js
class FillStylePattern (line 1) | class FillStylePattern {
method constructor (line 2) | constructor(img, pattern) {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleRadialGradient.js
class FillStyleRadialGradient (line 1) | class FillStyleRadialGradient {
method constructor (line 2) | constructor(x0, y0, r0, x1, y1, r1) {
method addColorStop (line 9) | addColorStop(pos, color) {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/RenderingContext.js
class CanvasRenderingContext2D (line 10) | class CanvasRenderingContext2D {
method constructor (line 44) | constructor() {
method setFillStyle (line 49) | setFillStyle(value) {
method fillStyle (line 53) | set fillStyle(value) {
method fillStyle (line 96) | get fillStyle() {
method globalAlpha (line 100) | get globalAlpha() {
method setGlobalAlpha (line 104) | setGlobalAlpha(value) {
method globalAlpha (line 108) | set globalAlpha(value) {
method strokeStyle (line 114) | get strokeStyle() {
method setStrokeStyle (line 118) | setStrokeStyle(value) {
method strokeStyle (line 122) | set strokeStyle(value) {
method lineWidth (line 153) | get lineWidth() {
method setLineWidth (line 157) | setLineWidth(value) {
method lineWidth (line 161) | set lineWidth(value) {
method lineCap (line 166) | get lineCap() {
method setLineCap (line 170) | setLineCap(value) {
method lineCap (line 174) | set lineCap(value) {
method lineJoin (line 179) | get lineJoin() {
method setLineJoin (line 183) | setLineJoin(value) {
method lineJoin (line 187) | set lineJoin(value) {
method miterLimit (line 192) | get miterLimit() {
method setMiterLimit (line 196) | setMiterLimit(value) {
method miterLimit (line 200) | set miterLimit(value) {
method globalCompositeOperation (line 205) | get globalCompositeOperation() {
method globalCompositeOperation (line 209) | set globalCompositeOperation(value) {
method textAlign (line 254) | get textAlign() {
method setTextAlign (line 258) | setTextAlign(value) {
method textAlign (line 262) | set textAlign(value) {
method textBaseline (line 289) | get textBaseline() {
method setTextBaseline (line 293) | setTextBaseline(value) {
method textBaseline (line 297) | set textBaseline(value) {
method font (line 327) | get font() {
method setFontSize (line 331) | setFontSize(size) {
method font (line 353) | set font(value) {
method setTransform (line 358) | setTransform(a, b, c, d, tx, ty) {
method transform (line 366) | transform(a, b, c, d, tx, ty) {
method resetTransform (line 374) | resetTransform() {
method scale (line 378) | scale(a, d) {
method rotate (line 383) | rotate(angle) {
method translate (line 388) | translate(tx, ty) {
method save (line 392) | save() {
method restore (line 397) | restore() {
method createPattern (line 402) | createPattern(img, pattern) {
method createLinearGradient (line 411) | createLinearGradient(x0, y0, x1, y1) {
method strokeRect (line 423) | strokeRect(x, y, w, h) {
method clearRect (line 428) | clearRect(x, y, w, h) {
method clip (line 433) | clip() {
method resetClip (line 437) | resetClip() {
method closePath (line 441) | closePath() {
method moveTo (line 445) | moveTo(x, y) {
method lineTo (line 449) | lineTo(x, y) {
method bezierCurveTo (line 457) | bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y, ) {
method arcTo (line 463) | arcTo(x1, y1, x2, y2, radius) {
method beginPath (line 467) | beginPath() {
method fillRect (line 472) | fillRect(x, y, w, h) {
method rect (line 477) | rect(x, y, w, h) {
method fill (line 481) | fill() {
method stroke (line 485) | stroke(path) {
method arc (line 489) | arc(x, y, radius, startAngle, endAngle, anticlockwise) {
method fillText (line 503) | fillText(text, x, y) {
method measureText (line 517) | measureText(text) {
method drawImage (line 525) | drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) {
method __drawImage (line 557) | __drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) {
method _flush (line 596) | _flush(reserve, callback) {
method _redrawflush (line 603) | _redrawflush(reserve, callback) {
method draw (line 611) | draw(reserve, callback) {
method getImageData (line 637) | getImageData(x, y, w, h, callback) {
method putImageData (line 646) | putImageData(data, x, y, w, h, callback) {
method toTempFilePath (line 657) | toTempFilePath(x, y, width, height, destWidth, destHeight, fileType, q...
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ActiveInfo.js
class WebGLActiveInfo (line 1) | class WebGLActiveInfo {
method constructor (line 4) | constructor({
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Buffer.js
function uuid (line 5) | function uuid(id) {
class WebGLBuffer (line 9) | class WebGLBuffer {
method constructor (line 12) | constructor(id) {
method uuid (line 18) | uuid() {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Framebuffer.js
function uuid (line 5) | function uuid(id) {
class WebGLFramebuffer (line 9) | class WebGLFramebuffer {
method constructor (line 12) | constructor(id) {
method uuid (line 18) | uuid() {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Program.js
function uuid (line 5) | function uuid(id) {
class WebGLProgram (line 9) | class WebGLProgram {
method constructor (line 12) | constructor(id) {
method uuid (line 18) | uuid() {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Renderbuffer.js
function uuid (line 5) | function uuid(id) {
class WebGLRenderbuffer (line 9) | class WebGLRenderbuffer {
method constructor (line 12) | constructor(id) {
method uuid (line 18) | uuid() {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/RenderingContext.js
function joinArray (line 15) | function joinArray(arr, sep) {
class WebGLRenderingContext (line 50) | class WebGLRenderingContext {
method constructor (line 56) | constructor(canvas, type, attrs) {
method canvas (line 69) | get canvas() {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Shader.js
function uuid (line 5) | function uuid(id) {
class WebGLShader (line 9) | class WebGLShader {
method constructor (line 12) | constructor(id, type) {
method uuid (line 19) | uuid() {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ShaderPrecisionFormat.js
class WebGLShaderPrecisionFormat (line 1) | class WebGLShaderPrecisionFormat {
method constructor (line 4) | constructor({
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Texture.js
function uuid (line 5) | function uuid(id) {
class WebGLTexture (line 9) | class WebGLTexture {
method constructor (line 12) | constructor(id, type) {
method uuid (line 19) | uuid() {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/UniformLocation.js
function uuid (line 5) | function uuid(id) {
class WebGLUniformLocation (line 9) | class WebGLUniformLocation {
method constructor (line 12) | constructor(id, type) {
method uuid (line 19) | uuid() {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/classUtils.js
function getTransferedObjectUUID (line 1) | function getTransferedObjectUUID(name, id) {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/canvas.js
class GCanvas (line 4) | class GCanvas {
method constructor (line 12) | constructor(id, { disableAutoSwap }) {
method getContext (line 23) | getContext(type) {
method reset (line 69) | reset() {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/image.js
class GImage (line 5) | class GImage {
method constructor (line 9) | constructor() {
method width (line 19) | get width() {
method width (line 22) | set width(v) {
method height (line 26) | get height() {
method height (line 30) | set height(v) {
method src (line 34) | get src() {
method src (line 38) | set src(v) {
method addEventListener (line 63) | addEventListener(name, listener) {
method removeEventListener (line 71) | removeEventListener(name, listener) {
method onload (line 79) | get onload() {
method onload (line 83) | set onload(v) {
method onerror (line 87) | get onerror() {
method onerror (line 91) | set onerror(v) {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/tool.js
function ArrayBufferToBase64 (line 2) | function ArrayBufferToBase64 (buffer) {
function Base64ToUint8ClampedArray (line 11) | function Base64ToUint8ClampedArray(base64String) {
FILE: uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/index.js
function enable (line 13) | function enable(el, { bridge, debug, disableAutoSwap, disableComboComman...
FILE: uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js
function o (line 37) | function o(o){this.mode=d.MODE_8BIT_BYTE,this.data=o}
function e (line 37) | function e(o,e){this.typeNumber=o,this.errorCorrectLevel=e,this.modules=...
function r (line 37) | function r(o,e){if(null==o.length)throw new Error(o.length+"/"+e);for(va...
function t (line 37) | function t(o,e){this.totalCount=o,this.dataCount=e}
function i (line 37) | function i(){this.buffer=new Array,this.length=0}
function n (line 37) | function n(){function o(t,i,n){t().then(o=>{i(o)}).catch(o=>{n(o)}).fina...
function a (line 37) | function a(o){this.errMsg=o}
function u (line 37) | function u(o,e){var r=this.data="",t=this.size=200,i=this.typeNumber=-1,...
method set (line 37) | set(o){m=u.getLoadImage(o)}
method setOptions (line 37) | setOptions(o){var e,r,t,i,n,a,d,s,g,l,h,c,m,f,v,C,p,b,y,k,I,w,B,T,P,S,A,...
method make (line 37) | make(){this.foregroundColor===this.backgroundColor&&console.error("[uQRC...
method paintData (line 37) | paintData(){let{dynamicSize:o,margin:e,backgroundColor:r,foregroundColor...
method paintPositionProbe (line 37) | paintPositionProbe(){let{modules:o,moduleCount:e,positionProbeBackground...
method paintSeparator (line 37) | paintSeparator(){let{modules:o,moduleCount:e,separatorColor:r}=this;[[7,...
method paintPositionAdjust (line 37) | paintPositionAdjust(){let{typeNumber:o,modules:e,moduleCount:r,foregroun...
method paintTiming (line 37) | paintTiming(){let{modules:o,moduleCount:e,timingForegroundColor:r,timing...
method paintDarkBlock (line 37) | paintDarkBlock(){let{modules:o,moduleCount:e,darkBlockColor:r}=this;var ...
method paintTypeNumber (line 37) | paintTypeNumber(){let{typeNumber:o,modules:e,moduleCount:r,typeNumberBac...
method getDrawModules (line 37) | getDrawModules(){let o=this.drawModules=[],{modules:e,moduleCount:r,dyna...
method getModuleIsBack (line 37) | getModuleIsBack(o,e){var r=this.moduleCount;return!(0>o||0>e||o>=r||e>=r...
method drawCanvas (line 37) | drawCanvas(){let{canvasContext:o,foregroundColor:e,backgroundColor:r,que...
method draw (line 37) | draw(){return this.drawCanvas()}
method styleDefault (line 37) | async styleDefault(){let{drawModules:o,canvasContext:e,backgroundColor:r...
FILE: uni_modules/mp-html/components/mp-html/parser.js
function makeMap (line 102) | function makeMap (str) {
function decodeEntity (line 117) | function decodeEntity (str, amp) {
function mergeNodes (line 145) | function mergeNodes (nodes) {
function Parser (line 165) | function Parser (vm) {
function Lexer (line 1135) | function Lexer (handler) {
FILE: uni_modules/mp-html/static/app-plus/mp-html/js/handler.js
function t (line 1) | function t(t){for(var e=Object.create(null),n=t.attributes.length;n--;)e...
function e (line 1) | function e(){a[1]&&(this.src=a[1],this.onerror=null),this.onclick=null,t...
function n (line 1) | function n(){window.unloadimgs-=1,0===window.unloadimgs&&uni.postMessage...
function o (line 1) | function o(r,s,c){for(var d=0;d<r.length;d++)!function(d){var u=r[d],l=v...
FILE: uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js
method data (line 9) | data() {
method show (line 14) | show(newVal) {
method leftOptions (line 24) | leftOptions() {
method rightOptions (line 28) | rightOptions(newVal) {
method created (line 32) | created() {
method mounted (line 38) | mounted() {
method init (line 53) | init() {
method onClick (line 64) | onClick(index, item, position) {
method touchstart (line 71) | touchstart(e) {
method touchend (line 112) | touchend(e) {
method bindTiming (line 117) | bindTiming(x) {
method range (line 153) | range(num, mix, max) {
method open (line 160) | open(type) {
method close (line 167) | close() {
method animation (line 175) | animation(type) {
method setEmit (line 216) | setEmit(x, type) {
method move (line 237) | move(ref, value) {
method getEl (line 258) | getEl(el) {
method getSelectorQuery (line 264) | getSelectorQuery() {
method getDom (line 285) | getDom(str) {
FILE: uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js
function isPC (line 1) | function isPC() {
FILE: uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpalipay.js
method data (line 2) | data() {
method show (line 12) | show(newVal) {
method created (line 22) | created() {
method mounted (line 28) | mounted() {
method appTouchStart (line 35) | appTouchStart(e) {
method appTouchEnd (line 42) | appTouchEnd(e, index, item, position) {
method onChange (line 61) | onChange(e) {
method touchstart (line 65) | touchstart(e) {
method touchmove (line 72) | touchmove(e) {}
method touchend (line 73) | touchend(e) {
method move (line 88) | move(moveX) {
method open (line 124) | open(type) {
method close (line 132) | close() {
method animation (line 148) | animation(type) {
method getSlide (line 163) | getSlide(x) {}
method getQuerySelect (line 164) | getQuerySelect() {
FILE: uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js
constant MIN_DISTANCE (line 4) | const MIN_DISTANCE = 10;
method data (line 6) | data() {
method show (line 19) | show(newVal) {
method left (line 23) | left() {
method buttonShow (line 26) | buttonShow(newVal) {
method leftOptions (line 30) | leftOptions() {
method rightOptions (line 33) | rightOptions() {
method mounted (line 37) | mounted() {
method init (line 45) | init() {
method closeSwipe (line 55) | closeSwipe(e) {
method appTouchStart (line 60) | appTouchStart(e) {
method appTouchEnd (line 67) | appTouchEnd(e, index, item, position) {
method touchstart (line 82) | touchstart(e) {
method touchmove (line 89) | touchmove(e) {
method touchend (line 99) | touchend() {
method move (line 107) | move(value) {
method range (line 121) | range(num, min, max) {
method moveDirection (line 129) | moveDirection(left) {
method openState (line 158) | openState(type) {
method close (line 188) | close() {
method getDirection (line 191) | getDirection(x, y) {
method resetTouchStatus (line 205) | resetTouchStatus() {
method stopTouchStart (line 217) | stopTouchStart(event) {
method stopTouchMove (line 228) | stopTouchMove(event) {
method getSelectorQuery (line 237) | getSelectorQuery() {
FILE: uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js
method data (line 12) | data() {
method show (line 18) | show(newVal) {
method created (line 22) | created() {
method mounted (line 28) | mounted() {
method closeSwipe (line 33) | closeSwipe(e) {
method change (line 39) | change(e) {
method appTouchStart (line 46) | appTouchStart(e) {
method appTouchEnd (line 54) | appTouchEnd(e, index, item, position) {
method onClickForPC (line 70) | onClickForPC(index, item, position) {
FILE: uni_modules/uni-swipe-action/components/uni-swipe-action-item/render.js
constant MIN_DISTANCE (line 1) | const MIN_DISTANCE = 10;
method showWatch (line 3) | showWatch(newVal, oldVal, ownerInstance, instance, self) {
method touchstart (line 24) | touchstart(e, ownerInstance, self) {
method touchmove (line 49) | touchmove(e, ownerInstance, self) {
method touchend (line 76) | touchend(e, ownerInstance, self) {
method move (line 96) | move(value, instance, ownerInstance, self) {
method getDom (line 117) | getDom(instance, ownerInstance, self) {
method getDisabledType (line 128) | getDisabledType(value) {
method range (line 138) | range(num, min, max) {
method moveDirection (line 150) | moveDirection(left, ins, ownerInstance, self) {
method openState (line 183) | openState(type, ins, ownerInstance, self) {
method getDirection (line 219) | getDirection(x, y) {
method resetTouchStatus (line 233) | resetTouchStatus(instance, self) {
method stopTouchStart (line 246) | stopTouchStart(event, ownerInstance, self) {
method stopTouchMove (line 259) | stopTouchMove(event, self) {
FILE: uni_modules/uview-ui/components/u-avatar-group/props.js
method validator (line 41) | validator(value) {
FILE: uni_modules/uview-ui/components/u-avatar/props.js
method validator (line 67) | validator(n) {
FILE: uni_modules/uview-ui/components/u-calendar/util.js
method setMonth (line 4) | setMonth() {
FILE: uni_modules/uview-ui/components/u-count-down/utils.js
function padZero (line 2) | function padZero(num, targetLength = 2) {
constant SECOND (line 9) | const SECOND = 1000
constant MINUTE (line 10) | const MINUTE = 60 * SECOND
constant HOUR (line 11) | const HOUR = 60 * MINUTE
constant DAY (line 12) | const DAY = 24 * HOUR
function parseTimeData (line 13) | function parseTimeData(time) {
function parseFormat (line 27) | function parseFormat(format, timeData) {
function isSameSecond (line 60) | function isSameSecond(time1, time2) {
FILE: uni_modules/uview-ui/components/u-dropdown-item/props.js
method default (line 16) | default() {
FILE: uni_modules/uview-ui/components/u-parse/parser.js
function makeMap (line 71) | function makeMap(str) {
function decodeEntity (line 88) | function decodeEntity(str, amp) {
function parser (line 116) | function parser(vm) {
function lexer (line 872) | function lexer(handler) {
FILE: uni_modules/uview-ui/components/u-scroll-list/nvue.js
method nvueScrollHandler (line 7) | nvueScrollHandler(e) {
FILE: uni_modules/uview-ui/components/u-slider/mpother.js
method value (line 6) | value(n) {
method mounted (line 13) | mounted() {
method init (line 17) | init() {
method getSliderRect (line 21) | getSliderRect() {
method canNotDo (line 31) | canNotDo() {
method getTouchX (line 35) | getTouchX(e) {
method formatStep (line 38) | formatStep(value) {
method emitEvent (line 43) | emitEvent(event, value) {
method setTouchStatus (line 47) | setTouchStatus(status) {
method onTouchStart (line 50) | onTouchStart(e) {
method onTouchMove (line 58) | onTouchMove(e) {
method onTouchEnd (line 72) | onTouchEnd() {
method updateSliderPlacement (line 80) | updateSliderPlacement(value, drag, event) {
method onClick (line 103) | onClick(e) {
FILE: uni_modules/uview-ui/components/u-slider/mpwxs.js
method data (line 2) | data() {
method mounted (line 16) | mounted() {
method init (line 20) | init() {
method getSliderRect (line 24) | getSliderRect() {
method updateValue (line 34) | updateValue(value) {
method emitEvent (line 38) | emitEvent(e) {
FILE: uni_modules/uview-ui/components/u-slider/nvue - 副本.js
method data (line 13) | data() {
method value (line 29) | value(n) {
method mounted (line 37) | mounted() {
method init (line 41) | init() {
method getSliderRect (line 46) | getSliderRect() {
method initButtonStyle (line 57) | initButtonStyle({
method emitEvent (line 64) | emitEvent(event, value) {
method formatStep (line 67) | formatStep(value) {
method onTouchStart (line 72) | onTouchStart(e) {
method initX (line 158) | initX() {
FILE: uni_modules/uview-ui/components/u-slider/nvue.js
method data (line 13) | data() {
method value (line 25) | value(n) {
method mounted (line 33) | mounted() {
method init (line 37) | init() {
method getSliderRect (line 46) | getSliderRect() {
method initButtonStyle (line 58) | initButtonStyle({
method emitEvent (line 65) | emitEvent(event, value) {
method onTouchStart (line 69) | async onTouchStart(e) {
method onTouchMove (line 85) | onTouchMove(e) {
method updateValue (line 134) | updateValue(value, end, drag) {
method initX (line 159) | initX() {
method format (line 182) | format(value) {
method getRange (line 185) | getRange() {
FILE: uni_modules/uview-ui/components/u-swipe-action-item/nvue - backup.js
method data (line 7) | data() {
method getDuratin (line 28) | getDuratin() {
method handler (line 42) | handler(n) {
method mounted (line 53) | mounted() {
method close (line 59) | close() {
method touchstart (line 63) | touchstart(event) {
method touchmove (line 72) | touchmove(event) {
method touchend (line 113) | touchend(event) {
method moveSwipeAction (line 148) | moveSwipeAction(moveX) {
method closeSwipeAction (line 182) | closeSwipeAction() {
method openSwipeAction (line 214) | openSwipeAction() {
method queryRect (line 251) | queryRect() {
method getRectByDom (line 262) | getRectByDom(ref) {
FILE: uni_modules/uview-ui/components/u-swipe-action-item/nvue.js
method data (line 7) | data() {
method getDuratin (line 17) | getDuratin() {
method show (line 29) | show(n) {
method mounted (line 37) | mounted() {
method initialize (line 41) | initialize() {
method closeHandler (line 45) | closeHandler() {
method clickHandler (line 52) | clickHandler() {
method onTouchstart (line 63) | onTouchstart(e) {
method unbindBindingX (line 116) | unbindBindingX() {
method queryRect (line 127) | queryRect() {
method getRectByDom (line 140) | getRectByDom(ref) {
method moveCellByAnimation (line 148) | moveCellByAnimation(status = 'open') {
method getContentRef (line 167) | getContentRef() {
method beforeDestroy (line 170) | beforeDestroy() {
FILE: uni_modules/uview-ui/components/u-swipe-action-item/props.js
method default (line 31) | default() {
FILE: uni_modules/uview-ui/components/u-swipe-action-item/wxs.js
method closeHandler (line 4) | closeHandler() {
method setState (line 7) | setState(status) {
method closeOther (line 10) | closeOther() {
FILE: uni_modules/uview-ui/components/u-text/value.js
method value (line 4) | value() {
method formatName (line 69) | formatName(name) {
FILE: uni_modules/uview-ui/components/u-transition/transition.js
method clickHandler (line 26) | clickHandler() {
method vueEnter (line 31) | vueEnter() {
method vueLeave (line 54) | vueLeave() {
method nvueEnter (line 76) | nvueEnter() {
method nvueLeave (line 114) | nvueLeave() {
method onTransitionEnd (line 145) | onTransitionEnd() {
FILE: uni_modules/uview-ui/components/u-upload/mixin.js
method handler (line 7) | handler(val) {
FILE: uni_modules/uview-ui/components/u-upload/utils.js
function pickExclude (line 1) | function pickExclude(obj, keys) {
function formatImage (line 14) | function formatImage(res) {
function formatVideo (line 27) | function formatVideo(res) {
function formatMedia (line 42) | function formatMedia(res) {
function formatFile (line 52) | function formatFile(res) {
function chooseFile (line 63) | function chooseFile({
FILE: uni_modules/uview-ui/libs/function/colorGradient.js
function colorGradient (line 7) | function colorGradient(startColor = 'rgb(0, 0, 0)', endColor = 'rgb(255,...
function hexToRgb (line 36) | function hexToRgb(sColor, str = true) {
function rgbToHex (line 64) | function rgbToHex(rgb) {
function colorToRgba (line 103) | function colorToRgba(color, alpha) {
FILE: uni_modules/uview-ui/libs/function/debounce.js
function debounce (line 11) | function debounce(func, wait = 500, immediate = false) {
FILE: uni_modules/uview-ui/libs/function/digit.js
function strip (line 8) | function strip(num, precision = 15) {
function digitLength (line 17) | function digitLength(num) {
function float2Fixed (line 29) | function float2Fixed(num) {
function checkBoundary (line 42) | function checkBoundary(num) {
function iteratorOperation (line 56) | function iteratorOperation(arr, operation) {
function times (line 71) | function times(...nums) {
function plus (line 91) | function plus(...nums) {
function minus (line 107) | function minus(...nums) {
function divide (line 121) | function divide(...nums) {
function round (line 139) | function round(num, ratio) {
function enableBoundaryChecking (line 154) | function enableBoundaryChecking(flag = true) {
FILE: uni_modules/uview-ui/libs/function/index.js
function range (line 9) | function range(min = 0, max = 0, value = 0) {
function getPx (line 19) | function getPx(value, unit = false) {
function sleep (line 35) | function sleep(value = 30) {
function os (line 47) | function os() {
function sys (line 54) | function sys() {
function random (line 63) | function random(min, max) {
function guid (line 76) | function guid(len = 32, firstU = true, radix = null) {
function $parent (line 112) | function $parent(name = undefined) {
function addStyle (line 134) | function addStyle(customStyle, target = 'object') {
function addUnit (line 173) | function addUnit(value = 'auto', unit = uni?.$u?.config?.unit ?? 'px') {
function deepClone (line 184) | function deepClone(obj) {
function deepMerge (line 206) | function deepMerge(target = {}, source = {}) {
function error (line 232) | function error(err) {
function randomArray (line 244) | function randomArray(array = []) {
function timeFormat (line 281) | function timeFormat(dateTime = null, formatStr = 'yyyy-mm-dd') {
function timeFrom (line 335) | function timeFrom(timestamp = null, format = 'yyyy-mm-dd') {
function trim (line 377) | function trim(str, pos = 'both') {
function queryParams (line 400) | function queryParams(data = {}, isPrefix = true, arrayFormat = 'brackets...
function toast (line 457) | function toast(title, duration = 2000) {
function type2icon (line 470) | function type2icon(type = 'success', fill = false) {
function priceFormat (line 507) | function priceFormat(number, decimals = 0, decimalPoint = '.', thousands...
function getDuration (line 536) | function getDuration(value, unit = true) {
function padZero (line 551) | function padZero(value) {
function formValidate (line 560) | function formValidate(instance, event) {
function getProperty (line 576) | function getProperty(obj, key) {
function setProperty (line 603) | function setProperty(obj, key, value) {
function page (line 639) | function page() {
function pages (line 648) | function pages() {
function setConfig (line 660) | function setConfig({
FILE: uni_modules/uview-ui/libs/function/test.js
function email (line 4) | function email(value) {
function mobile (line 11) | function mobile(value) {
function url (line 18) | function url(value) {
function date (line 26) | function date(value) {
function dateISO (line 36) | function dateISO(value) {
function number (line 43) | function number(value) {
function string (line 50) | function string(value) {
function digits (line 57) | function digits(value) {
function idCard (line 64) | function idCard(value) {
function carNo (line 73) | function carNo(value) {
function amount (line 89) | function amount(value) {
function chinese (line 97) | function chinese(value) {
function letter (line 105) | function letter(value) {
function enOrNum (line 112) | function enOrNum(value) {
function contains (line 121) | function contains(value, param) {
function range (line 128) | function range(value, param) {
function rangeLength (line 135) | function rangeLength(value, param) {
function landline (line 142) | function landline(value) {
function empty (line 150) | function empty(value) {
function jsonString (line 176) | function jsonString(value) {
function array (line 194) | function array(value) {
function object (line 204) | function object(value) {
function code (line 211) | function code(value, len = 6) {
function func (line 219) | function func(value) {
function promise (line 227) | function promise(value) {
function image (line 234) | function image(value) {
function video (line 244) | function video(value) {
function regExp (line 254) | function regExp(o) {
FILE: uni_modules/uview-ui/libs/function/throttle.js
function throttle (line 11) | function throttle(func, wait = 500, immediate = true) {
FILE: uni_modules/uview-ui/libs/luch-request/core/InterceptorManager.js
function InterceptorManager (line 3) | function InterceptorManager() {
FILE: uni_modules/uview-ui/libs/luch-request/core/Request.js
class Request (line 21) | class Request {
method constructor (line 36) | constructor(arg = {}) {
method setConfig (line 52) | setConfig(f) {
method middleware (line 56) | middleware(config) {
method request (line 87) | request(config = {}) {
method get (line 91) | get(url, options = {}) {
method post (line 99) | post(url, data, options = {}) {
method put (line 109) | put(url, data, options = {}) {
method delete (line 121) | delete(url, data, options = {}) {
method connect (line 133) | connect(url, data, options = {}) {
method head (line 145) | head(url, data, options = {}) {
method options (line 157) | options(url, data, options = {}) {
method trace (line 169) | trace(url, data, options = {}) {
method upload (line 180) | upload(url, config = {}) {
method download (line 186) | download(url, config = {}) {
FILE: uni_modules/uview-ui/libs/luch-request/core/buildFullPath.js
function buildFullPath (line 15) | function buildFullPath(baseURL, requestedURL) {
FILE: uni_modules/uview-ui/libs/luch-request/core/settle.js
function settle (line 8) | function settle(resolve, reject, response) {
FILE: uni_modules/uview-ui/libs/luch-request/helpers/buildURL.js
function encode (line 5) | function encode(val) {
function buildURL (line 23) | function buildURL(url, params) {
FILE: uni_modules/uview-ui/libs/luch-request/helpers/combineURLs.js
function combineURLs (line 10) | function combineURLs(baseURL, relativeURL) {
FILE: uni_modules/uview-ui/libs/luch-request/helpers/isAbsoluteURL.js
function isAbsoluteURL (line 9) | function isAbsoluteURL(url) {
FILE: uni_modules/uview-ui/libs/luch-request/index.d.ts
type AnyObject (line 1) | type AnyObject = Record<string | number | symbol, any>
type HttpPromise (line 2) | type HttpPromise<T> = Promise<HttpResponse<T>>;
type Tasks (line 3) | type Tasks = UniApp.RequestTask | UniApp.UploadTask | UniApp.DownloadTask
type RequestTask (line 4) | interface RequestTask {
type HttpRequestConfig (line 9) | interface HttpRequestConfig<T = Tasks> {
type HttpResponse (line 59) | interface HttpResponse<T = any> {
type HttpUploadResponse (line 67) | interface HttpUploadResponse<T = any> {
type HttpDownloadResponse (line 73) | interface HttpDownloadResponse extends HttpResponse {
type HttpError (line 76) | interface HttpError {
type HttpInterceptorManager (line 84) | interface HttpInterceptorManager<V, E = V> {
class HttpRequest (line 115) | class HttpRequest extends HttpRequestAbstract { }
FILE: uni_modules/uview-ui/libs/luch-request/utils.js
function isArray (line 13) | function isArray(val) {
function isObject (line 23) | function isObject(val) {
function isDate (line 33) | function isDate(val) {
function isURLSearchParams (line 43) | function isURLSearchParams(val) {
function forEach (line 59) | function forEach(obj, fn) {
function isBoolean (line 91) | function isBoolean(val) {
function isPlainObject (line 100) | function isPlainObject(obj) {
function deepMerge (line 112) | function deepMerge(/* obj1, obj2, obj3, ... */) {
function isUndefined (line 129) | function isUndefined(val) {
FILE: uni_modules/uview-ui/libs/luch-request/utils/clone.js
function _instanceof (line 5) | function _instanceof(obj, type) {
function clone (line 53) | function clone(parent, circular, depth, prototype, includeNonEnumerable) {
function __objToStr (line 232) | function __objToStr(o) {
function __isDate (line 237) | function __isDate(o) {
function __isArray (line 242) | function __isArray(o) {
function __isRegExp (line 247) | function __isRegExp(o) {
function __getRegExpFlags (line 252) | function __getRegExpFlags(re) {
FILE: uni_modules/uview-ui/libs/mixin/mixin.js
method data (line 24) | data() {
method onLoad (line 27) | onLoad() {
method created (line 31) | created() {
method $u (line 39) | $u() {
method bem (line 61) | bem() {
method openPage (line 88) | openPage(urlKey = 'url') {
method $uGetRect (line 100) | $uGetRect(selector, all) {
method getParentData (line 115) | getParentData(parentName = '') {
method preventEvent (line 135) | preventEvent(e) {
method noop (line 139) | noop(e) {
method onReachBottom (line 143) | onReachBottom() {
method beforeDestroy (line 146) | beforeDestroy() {
FILE: uni_modules/uview-ui/libs/mixin/mpShare.js
method onLoad (line 2) | onLoad() {
method onShareAppMessage (line 10) | onShareAppMessage() {
FILE: uni_modules/uview-ui/libs/mixin/openType.js
method onGetUserInfo (line 6) | onGetUserInfo(event) {
method onContact (line 9) | onContact(event) {
method onGetPhoneNumber (line 12) | onGetPhoneNumber(event) {
method onError (line 15) | onError(event) {
method onLaunchApp (line 18) | onLaunchApp(event) {
method onOpenSetting (line 21) | onOpenSetting(event) {
FILE: uni_modules/uview-ui/libs/mixin/style.js
method viewStyle (line 214) | viewStyle() {
method getUnit (line 223) | getUnit(unit = '') {
FILE: uni_modules/uview-ui/libs/mixin/touch.js
constant MIN_DISTANCE (line 1) | const MIN_DISTANCE = 10
function getDirection (line 3) | function getDirection(x, y) {
method getTouchPoint (line 15) | getTouchPoint(e) {
method resetTouchStatus (line 37) | resetTouchStatus() {
method touchStart (line 44) | touchStart(event) {
method touchMove (line 50) | touchMove(event) {
FILE: uni_modules/uview-ui/libs/util/async-validator.js
function _extends (line 1) | function _extends() {
function convertFieldsError (line 34) | function convertFieldsError(errors) {
function format (line 45) | function format() {
function isNativeStringType (line 99) | function isNativeStringType(type) {
function isEmptyValue (line 103) | function isEmptyValue(value, type) {
function asyncParallelArray (line 119) | function asyncParallelArray(arr, func, callback) {
function asyncSerialArray (line 138) | function asyncSerialArray(arr, func, callback) {
function flattenObjArr (line 161) | function flattenObjArr(objArr) {
function asyncMap (line 169) | function asyncMap(objArr, option, func, callback) {
function complementError (line 232) | function complementError(rule) {
function deepMerge (line 246) | function deepMerge(target, source) {
function required (line 276) | function required(rule, value, source, errors, options, type) {
function whitespace (line 294) | function whitespace(rule, value, source, errors, options) {
function type (line 372) | function type(rule, value, source, errors, options) {
function range (line 402) | function range(rule, value, source, errors, options) {
constant ENUM (line 450) | const ENUM = 'enum'
function enumerable (line 463) | function enumerable(rule, value, source, errors, options) {
function pattern$1 (line 483) | function pattern$1(rule, value, source, errors, options) {
function string (line 524) | function string(rule, value, callback, source, options) {
function method (line 560) | function method(rule, value, callback, source, options) {
function number (line 590) | function number(rule, value, callback, source, options) {
function _boolean (line 625) | function _boolean(rule, value, callback, source, options) {
function regexp (line 655) | function regexp(rule, value, callback, source, options) {
function integer (line 685) | function integer(rule, value, callback, source, options) {
function floatFn (line 716) | function floatFn(rule, value, callback, source, options) {
function array (line 747) | function array(rule, value, callback, source, options) {
function object (line 778) | function object(rule, value, callback, source, options) {
function enumerable$1 (line 809) | function enumerable$1(rule, value, callback, source, options) {
function pattern$2 (line 842) | function pattern$2(rule, value, callback, source, options) {
function date (line 861) | function date(rule, value, callback, source, options) {
function required$1 (line 892) | function required$1(rule, value, callback, source, options) {
function type$1 (line 899) | function type$1(rule, value, callback, source, options) {
function any (line 930) | function any(rule, value, callback, source, options) {
function newMessages (line 965) | function newMessages() {
function Schema (line 1028) | function Schema(descriptor) {
function complete (line 1090) | function complete(results) {
function addFullfield (line 1184) | function addFullfield(key, schema) {
function cb (line 1188) | function cb(e) {
FILE: uni_modules/uview-ui/libs/util/dayjs.js
method z (line 30) | z(t) {
method a (line 45) | a(t) {
method p (line 48) | p(h) {
method u (line 62) | u(t) {
function d (line 97) | function d(t) {
FILE: uni_modules/uview-ui/libs/util/emitter.js
function broadcast (line 7) | function broadcast(componentName, eventName, params) {
method dispatch (line 25) | dispatch(componentName, eventName, params) {
method broadcast (line 47) | broadcast(componentName, eventName, params) {
FILE: uni_modules/uview-ui/libs/util/route.js
class Router (line 6) | class Router {
method constructor (line 7) | constructor() {
method addRootPath (line 24) | addRootPath(url) {
method mixinParam (line 29) | mixinParam(url, params) {
method route (line 47) | async route(options = {}, params = {}) {
method openPage (line 85) | openPage(config) {
FILE: uni_modules/z-paging/components/z-paging/js/modules/back-to-top.js
method data (line 44) | data() {
method finalEnableBackToTop (line 52) | finalEnableBackToTop() {
method finalBackToTopThreshold (line 55) | finalBackToTopThreshold() {
method finalBackToTopStyle (line 58) | finalBackToTopStyle() {
method _backToTopClick (line 71) | _backToTopClick() {
method _checkShouldShowBackToTop (line 76) | _checkShouldShowBackToTop(scrollTop) {
FILE: uni_modules/z-paging/components/z-paging/js/modules/data-handle.js
method data (line 129) | data (){
method pageSize (line 159) | pageSize() {
method finalConcat (line 162) | finalConcat() {
method finalUseCache (line 165) | finalUseCache() {
method finalCacheKey (line 171) | finalCacheKey() {
method isFirstPage (line 175) | isFirstPage() {
method totalData (line 180) | totalData(newVal, oldVal) {
method currentData (line 183) | currentData(newVal, oldVal) {
method useChatRecordMode (line 186) | useChatRecordMode(newVal, oldVal) {
method handler (line 192) | handler(newVal) {
method handler (line 199) | handler(newVal) {
method complete (line 208) | complete(data, success = true) {
method completeByKey (line 213) | completeByKey(data, dataKey = null, success = true) {
method completeByTotal (line 224) | completeByTotal(data, total, success = true) {
method completeByNoMore (line 256) | completeByNoMore(data, nomore, success = true) {
method addData (line 263) | addData(data, success = true) {
method addDataFromTop (line 286) | addDataFromTop(data, toTop = true, toTopWithAnimate = true) {
method resetTotalData (line 299) | resetTotalData(data) {
method addChatRecordData (line 308) | addChatRecordData(data, toBottom = true, toBottomWithAnimate = true) {
method setLocalPaging (line 337) | setLocalPaging(data, success = true) {
method reload (line 347) | reload(animate = this.showRefresherWhenReload) {
method refresh (line 361) | refresh() {
method updateCache (line 379) | updateCache() {
method clean (line 385) | clean() {
method clear (line 390) | clear() {
method doChatRecordLoadMore (line 394) | doChatRecordLoadMore() {
method _preReload (line 398) | _preReload(animate = this.showRefresherWhenReload, isFromMounted = true) {
method _reload (line 438) | _reload(isClean = false, isFromMounted = false, isUserPullDown = false) {
method _addData (line 474) | _addData(data, success, isLocal) {
method _totalDataChange (line 543) | _totalDataChange(newVal, oldVal, eventThrow=true) {
method _currentDataChange (line 580) | _currentDataChange(newVal, oldVal) {
method _localPagingQueryList (line 669) | _localPagingQueryList(pageNo, pageSize, localPagingLoadingTime, callback) {
method _saveLocalCache (line 679) | _saveLocalCache(data) {
method _setListByLocalCache (line 683) | _setListByLocalCache() {
method _callMyParentList (line 688) | _callMyParentList(newVal) {
method _callMyParentQuery (line 697) | _callMyParentQuery(customPageNo = 0, customPageSize = 0) {
method _emitQuery (line 715) | _emitQuery(pageNo, pageSize, from){
method _callDataPromise (line 721) | _callDataPromise(success, totalList) {
method _checkDataType (line 728) | _checkDataType(data, success, isLocal) {
FILE: uni_modules/z-paging/components/z-paging/js/modules/empty.js
method finalEmptyViewImg (line 108) | finalEmptyViewImg() {
method finalShowEmptyViewReload (line 111) | finalShowEmptyViewReload() {
method showEmpty (line 114) | showEmpty() {
method _emptyViewReload (line 126) | _emptyViewReload() {
method _emptyViewClick (line 143) | _emptyViewClick() {
FILE: uni_modules/z-paging/components/z-paging/js/modules/i18n.js
method data (line 11) | data() {
method finalLanguage (line 17) | finalLanguage() {
method finalRefresherDefaultText (line 26) | finalRefresherDefaultText() {
method finalRefresherPullingText (line 29) | finalRefresherPullingText() {
method finalRefresherRefreshingText (line 32) | finalRefresherRefreshingText() {
method finalRefresherCompleteText (line 35) | finalRefresherCompleteText() {
method finalRefresherUpdateTimeTextMap (line 38) | finalRefresherUpdateTimeTextMap() {
method finalLoadingMoreDefaultText (line 46) | finalLoadingMoreDefaultText() {
method finalLoadingMoreLoadingText (line 49) | finalLoadingMoreLoadingText() {
method finalLoadingMoreNoMoreText (line 52) | finalLoadingMoreNoMoreText() {
method finalLoadingMoreFailText (line 55) | finalLoadingMoreFailText() {
method finalEmptyViewText (line 58) | finalEmptyViewText() {
method finalEmptyViewReloadText (line 61) | finalEmptyViewReloadText() {
method finalEmptyViewErrorText (line 64) | finalEmptyViewErrorText() {
method finalSystemLoadingText (line 67) | finalSystemLoadingText() {
method getLanguage (line 73) | getLanguage() {
method _getI18nText (line 77) | _getI18nText(key, value) {
method _language2Local (line 88) | _language2Local(language) {
FILE: uni_modules/z-paging/components/z-paging/js/modules/load-more.js
method data (line 121) | data() {
method zLoadMoreConfig (line 134) | zLoadMoreConfig() {
method finalLoadingMoreThemeStyle (line 154) | finalLoadingMoreThemeStyle() {
method showLoadingMoreDefault (line 157) | showLoadingMoreDefault() {
method showLoadingMoreLoading (line 160) | showLoadingMoreLoading() {
method showLoadingMoreNoMore (line 163) | showLoadingMoreNoMore() {
method showLoadingMoreFail (line 166) | showLoadingMoreFail() {
method showLoadingMoreCustom (line 169) | showLoadingMoreCustom() {
method pageReachBottom (line 175) | pageReachBottom() {
method doLoadMore (line 179) | doLoadMore(type) {
method _checkScrolledToBottom (line 183) | _checkScrolledToBottom(scrollDiff, checked = false) {
method _onLoadingMore (line 213) | _onLoadingMore(from = 'click') {
method _doLoadingMore (line 235) | _doLoadingMore() {
method _preCheckShowNoMoreInside (line 251) | _preCheckShowNoMoreInside(newVal, scrollViewNode, pagingContainerNode) {
method _checkShowNoMoreInside (line 266) | async _checkShowNoMoreInside(totalData, oldScrollViewNode, oldPagingCont...
method _showLoadingMore (line 297) | _showLoadingMore(type) {
FILE: uni_modules/z-paging/components/z-paging/js/modules/loading.js
method data (line 33) | data() {
method loadingStatus (line 40) | loadingStatus(newVal) {
method loading (line 55) | loading(newVal){
method showLoading (line 62) | showLoading() {
method finalShowSystemLoading (line 72) | finalShowSystemLoading() {
method _startLoading (line 78) | _startLoading(isReload = false) {
method _endSystemLoadingAndRefresh (line 85) | _endSystemLoadingAndRefresh(){
FILE: uni_modules/z-paging/components/z-paging/js/modules/nvue.js
method data (line 63) | data() {
method handler (line 80) | handler(newVal) {
method nScopedSlots (line 90) | nScopedSlots() {
method nWaterfallColumnCount (line 98) | nWaterfallColumnCount() {
method nWaterfallColumnWidth (line 102) | nWaterfallColumnWidth() {
method nWaterfallColumnGap (line 105) | nWaterfallColumnGap() {
method nWaterfallLeftGap (line 108) | nWaterfallLeftGap() {
method nWaterfallRightGap (line 111) | nWaterfallRightGap() {
method nViewIs (line 114) | nViewIs() {
method nSafeAreaBottomHeight (line 118) | nSafeAreaBottomHeight() {
method nChatRecordRotateStyle (line 121) | nChatRecordRotateStyle() {
method finalNvueListIs (line 124) | finalNvueListIs() {
method finalNvueSuperListIs (line 130) | finalNvueSuperListIs() {
method finalNvueRefresherEnabled (line 133) | finalNvueRefresherEnabled() {
method mounted (line 138) | mounted(){
method _nOnScroll (line 149) | _nOnScroll(e) {
method _nOnRrefresh (line 157) | _nOnRrefresh() {
method _nOnPullingdown (line 164) | _nOnPullingdown(e) {
method _nRefresherEnd (line 171) | _nRefresherEnd(doEnd = true) {
method _nDoRefresherEndAnimation (line 184) | _nDoRefresherEndAnimation(height, translateY, animate = true, checkStack...
method _nOnLoadmore (line 230) | _nOnLoadmore() {
method _nGetWaterfallConfig (line 235) | _nGetWaterfallConfig(key, defaultValue) {
method _nUpdateRefresherWidth (line 239) | _nUpdateRefresherWidth() {
FILE: uni_modules/z-paging/components/z-paging/js/modules/refresher.js
method data (line 190) | data() {
method handler (line 228) | handler(newVal) {
method refresherStatus (line 235) | refresherStatus(newVal) {
method pullDownDisTimeStamp (line 243) | pullDownDisTimeStamp() {
method finalRefresherEnabled (line 246) | finalRefresherEnabled() {
method finalRefresherThreshold (line 251) | finalRefresherThreshold() {
method finalRefresherFixedBacHeight (line 263) | finalRefresherFixedBacHeight() {
method finalRefresherThemeStyle (line 266) | finalRefresherThemeStyle() {
method finalRefresherOutRate (line 269) | finalRefresherOutRate() {
method finalRefresherPullRate (line 275) | finalRefresherPullRate() {
method finalRefresherTransform (line 280) | finalRefresherTransform() {
method finalShowRefresherWhenReload (line 284) | finalShowRefresherWhenReload() {
method finalRefresherTriggered (line 287) | finalRefresherTriggered() {
method showRefresher (line 291) | showRefresher() {
method hasTouchmove (line 304) | hasTouchmove(){
method endRefresh (line 319) | endRefresh(){
method handleRefresherStatusChanged (line 324) | handleRefresherStatusChanged(func) {
method _onRefresh (line 328) | _onRefresh(fromScrollView = false,isUserPullDown = true) {
method _onRestore (line 352) | _onRestore() {
method _refresherTouchstart (line 359) | _refresherTouchstart(e) {
method _handleRefresherTouchstart (line 367) | _handleRefresherTouchstart(touch) {
method _refresherTouchmove (line 383) | _refresherTouchmove(e) {
method _handleRefresherTouchmove (line 430) | _handleRefresherTouchmove(moveDis, touch) {
method _refresherTouchend (line 445) | _refresherTouchend(e) {
method _handleRefresherTouchend (line 457) | _handleRefresherTouchend(moveDis) {
method _handleListTouchstart (line 486) | _handleListTouchstart() {
method _handleScrollViewDisableBounce (line 493) | _handleScrollViewDisableBounce({ bounce }) {
method _handleWxsPullingDownStatusChange (line 502) | _handleWxsPullingDownStatusChange(onPullingDown) {
method _handleWxsPullingDown (line 509) | _handleWxsPullingDown({ moveDis, diffDis }){
method _handleTouchDirectionChange (line 513) | _handleTouchDirectionChange({ direction }) {
method _handlePropUpdate (line 517) | _handlePropUpdate(){
method _refresherEnd (line 521) | _refresherEnd(shouldEndLoadingDelay = true, fromAddData = false, isUserP...
method _doRefresherRefreshAnimate (line 584) | _doRefresherRefreshAnimate() {
method _doRefresherLoad (line 608) | _doRefresherLoad(isUserPullDown = true) {
method _getFinalRefresherMoveDis (line 614) | _getFinalRefresherMoveDis(moveDis) {
method _touchDisabled (line 629) | _touchDisabled() {
method _updateCustomRefresherHeight (line 635) | _updateCustomRefresherHeight() {
method _emitTouchmove (line 646) | _emitTouchmove(e) {
method _cleanRefresherCompleteTimeout (line 655) | _cleanRefresherCompleteTimeout() {
method _cleanRefresherEndTimeout (line 662) | _cleanRefresherEndTimeout() {
FILE: uni_modules/z-paging/components/z-paging/js/modules/scroller.js
method data (line 51) | data() {
method oldScrollTop (line 65) | oldScrollTop(newVal) {
method pageScrollTop (line 68) | pageScrollTop(newVal) {
method handler (line 72) | handler(newVal) {
method finalScrollTop (line 87) | finalScrollTop(newVal) {
method finalScrollWithAnimation (line 94) | finalScrollWithAnimation() {
method finalScrollViewStyle (line 102) | finalScrollViewStyle() {
method finalScrollTop (line 109) | finalScrollTop() {
method finalIsOldWebView (line 112) | finalIsOldWebView() {
method scrollToTop (line 118) | scrollToTop(animate, checkReverse = true) {
method scrollToBottom (line 139) | scrollToBottom(animate, checkReverse = true) {
method scrollIntoViewById (line 160) | scrollIntoViewById(sel, offset, animate) {
method scrollIntoViewByNodeTop (line 164) | scrollIntoViewByNodeTop(nodeTop, offset, animate) {
method scrollToY (line 171) | scrollToY(y, offset, animate) {
method scrollIntoViewByIndex (line 178) | scrollIntoViewByIndex(index, offset, animate) {
method scrollIntoViewByView (line 182) | scrollIntoViewByView(view, offset, animate) {
method updatePageScrollTop (line 186) | updatePageScrollTop(value) {
method updatePageScrollTopHeight (line 190) | updatePageScrollTopHeight() {
method updatePageScrollBottomHeight (line 194) | updatePageScrollBottomHeight() {
method updateLeftAndRightWidth (line 198) | updateLeftAndRightWidth() {
method updateScrollViewScrollTop (line 204) | updateScrollViewScrollTop(scrollTop, animate = true) {
method _onScrollToUpper (line 214) | _onScrollToUpper() {
method _onScrollToLower (line 225) | _onScrollToLower(e) {
method _scrollToTop (line 229) | _scrollToTop(animate = true, isPrivate = true) {
method _scrollToBottom (line 275) | async _scrollToBottom(animate = true) {
method _scrollIntoView (line 313) | _scrollIntoView(sel, offset = 0, animate = false, finishCallback) {
method _scrollIntoViewByNodeTop (line 351) | _scrollIntoViewByNodeTop(nodeTop, offset = 0, animate = false) {
method _scrollToY (line 355) | _scrollToY(y, offset = 0, animate = false, addScrollTop = false) {
method _scroll (line 371) | _scroll(e) {
method _doCheckScrollViewShouldFullHeight (line 382) | _doCheckScrollViewShouldFullHeight(totalData) {
method _checkScrollViewShouldFullHeight (line 399) | async _checkScrollViewShouldFullHeight(callback) {
method _scrollTopChange (line 418) | _scrollTopChange(newVal, isPageScrollTop){
method _updatePageScrollTopOrBottomHeight (line 430) | _updatePageScrollTopOrBottomHeight(type) {
method _updateLeftAndRightWidth (line 463) | _updateLeftAndRightWidth(){
FILE: uni_modules/z-paging/components/z-paging/js/modules/virtual-list.js
method data (line 79) | data() {
method realTotalData (line 105) | realTotalData(newVal) {
method virtualList (line 120) | virtualList(newVal){
method finalUseVirtualList (line 126) | finalUseVirtualList() {
method finalUseInnerList (line 132) | finalUseInnerList() {
method finalCellKeyName (line 135) | finalCellKeyName() {
method finalVirtualPageHeight (line 143) | finalVirtualPageHeight(){
method virtualRangePageHeight (line 146) | virtualRangePageHeight(){
method virtualScrollDisTimeStamp (line 149) | virtualScrollDisTimeStamp() {
method didUpdateVirtualListCell (line 155) | didUpdateVirtualListCell(index) {
method didDeleteVirtualListCell (line 175) | didDeleteVirtualListCell(index) {
method _virtualListInit (line 188) | _virtualListInit() {
method _updateFixedCellHeight (line 201) | _updateFixedCellHeight() {
method _updateDynamicCellHeight (line 219) | _updateDynamicCellHeight(list) {
method _setCellIndex (line 247) | _setCellIndex(list, isFirstPage) {
method _updateVirtualScroll (line 271) | _updateVirtualScroll(scrollTop, scrollDiff = 0) {
method _updateFixedTopRangeIndex (line 340) | _updateFixedTopRangeIndex(scrollIndex) {
method _updateFixedBottomRangeIndex (line 348) | _updateFixedBottomRangeIndex(scrollIndex) {
method _updateVirtualList (line 357) | _updateVirtualList() {
method _resetDynamicListState (line 367) | _resetDynamicListState(resetVirtualList = false) {
method _resetTopRange (line 376) | _resetTopRange() {
method _checkVirtualListScroll (line 382) | _checkVirtualListScroll() {
method _innerCellClick (line 395) | _innerCellClick(item, index) {
FILE: uni_modules/z-paging/components/z-paging/js/z-paging-config.js
function setConfig (line 7) | function setConfig(value) {
function getConfig (line 11) | function getConfig() {
FILE: uni_modules/z-paging/components/z-paging/js/z-paging-interceptor.js
function handleQuery (line 4) | function handleQuery(callback) {
function _handleQuery (line 13) | function _handleQuery(pageNo, pageSize, from){
function handleLanguage2Local (line 22) | function handleLanguage2Local(callback) {
function _handleLanguage2Local (line 31) | function _handleLanguage2Local(language, local){
function _getApp (line 40) | function _getApp(){
FILE: uni_modules/z-paging/components/z-paging/js/z-paging-main.js
method data (line 50) | data() {
method created (line 180) | created(){
method mounted (line 186) | mounted() {
method destroyed (line 230) | destroyed() {
method unmounted (line 234) | unmounted() {
method handler (line 240) | handler(newVal) {
method autoHeight (line 247) | autoHeight(newVal) {
method autoHeightAddition (line 250) | autoHeightAddition(newVal) {
method finalPagingStyle (line 255) | finalPagingStyle() {
method finalLowerThreshold (line 279) | finalLowerThreshold() {
method finalPagingContentStyle (line 282) | finalPagingContentStyle() {
method safeAreaBottom (line 289) | safeAreaBottom() {
method renderJsIgnore (line 300) | renderJsIgnore() {
method windowHeight (line 308) | windowHeight() {
method windowTop (line 311) | windowTop() {
method windowBottom (line 320) | windowBottom() {
method isOldWebView (line 328) | isOldWebView() {
method isIosAndH5 (line 343) | isIosAndH5() {
method zSlots (line 349) | zSlots() {
method getVersion (line 364) | getVersion() {
method setSpecialEffects (line 368) | setSpecialEffects(args) {
method setListSpecialEffects (line 372) | setListSpecialEffects(args) {
method _doVibrateShort (line 382) | _doVibrateShort() {
method _setAutoHeight (line 400) | async _setAutoHeight(shouldFullHeight = true, scrollViewNode = null) {
method _getCssSafeAreaInsetBottom (line 427) | _getCssSafeAreaInsetBottom(){
method _updateInsideOfPaging (line 438) | _updateInsideOfPaging() {
method _getNodeClientRect (line 446) | _getNodeClientRect(select, inDom = true, scrollOffset = false) {
method _cleanTimeout (line 473) | _cleanTimeout(timeout) {
method _onEmit (line 481) | _onEmit() {
method _offEmit (line 519) | _offEmit(){
FILE: uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js
method onPullDownRefresh (line 4) | onPullDownRefresh() {
method onPageScroll (line 8) | onPageScroll(e) {
method onReachBottom (line 15) | onReachBottom() {
method isPagingRefNotFound (line 20) | isPagingRefNotFound() {
FILE: uni_modules/z-paging/components/z-paging/js/z-paging-utils.js
function gc (line 24) | function gc(key, defaultValue) {
function getTouch (line 42) | function getTouch(e) {
function getTouchFromZPaging (line 63) | function getTouchFromZPaging(target) {
function getParent (line 81) | function getParent(parent) {
function consoleErr (line 88) | function consoleErr(err) {
function setRefesrherTime (line 93) | function setRefesrherTime(time, key) {
function getRefesrherTime (line 100) | function getRefesrherTime() {
function getRefesrherTimeByKey (line 105) | function getRefesrherTimeByKey(key) {
function getRefesrherFormatTimeByKey (line 111) | function getRefesrherFormatTimeByKey(key, textMap) {
function convertToPx (line 118) | function convertToPx(text) {
function getTime (line 136) | function getTime() {
function getInstanceId (line 141) | function getInstanceId() {
function _timeFormat (line 152) | function _timeFormat(time, textMap) {
function _dateDayFormat (line 171) | function _dateDayFormat(date, showYear = true) {
function _dateTimeFormat (line 179) | function _dateTimeFormat(date) {
function _fullZeroToTwo (line 186) | function _fullZeroToTwo(str) {
function _toKebab (line 192) | function _toKebab(value) {
FILE: uni_modules/z-paging/components/z-paging/wxs/z-paging-renderjs.js
method mounted (line 13) | mounted() {
method renderPropIsIosAndH5Change (line 21) | renderPropIsIosAndH5Change(newVal) {
method _handleTouch (line 26) | _handleTouch() {
method _handleTouchstart (line 37) | _handleTouchstart(e) {
method _handleTouchmove (line 45) | _handleTouchmove(e) {
method _removeAllEventListener (line 54) | _removeAllEventListener(){
Condensed preview — 594 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,533K chars).
[
{
"path": ".gitignore",
"chars": 519,
"preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
},
{
"path": ".prettierignore",
"chars": 30,
"preview": "/node_modules/\n/nativeplugins/"
},
{
"path": "App.vue",
"chars": 14516,
"preview": "<script>\nimport { mapGetters, mapActions } from \"vuex\";\nimport IMSDK, {\n IMMethods,\n MessageType,\n SessionType,\n} fro"
},
{
"path": "LICENSE",
"chars": 34523,
"preview": " GNU AFFERO GENERAL PUBLIC LICENSE\n Version 3, 19 November 2007\n\n Copyright (C)"
},
{
"path": "Readme.md",
"chars": 9379,
"preview": "<p align=\"center\">\n <a href=\"https://openim.io\">\n <img src=\"./docs/images/logo.jpg\" width=\"60%\" height=\"30%\"/>"
},
{
"path": "api/login.js",
"chars": 1886,
"preview": "// 登录\nexport const businessLogin = (params) =>\n uni.$u?.http.post(\"/account/login\", JSON.stringify(params));\nexport con"
},
{
"path": "common/config.js",
"chars": 675,
"preview": "// const BASE_HOST = 'your-server-ip'\n// const CHAT_URL = `http://${BASE_HOST}:10008`\n// const API_URL = `http://${BASE_"
},
{
"path": "common/demo.scss",
"chars": 620,
"preview": ".u-block {\n padding: 14px;\n &__section {\n margin-bottom: 10px;\n }\n &__title {\n margin-top: 10px;\n font-size"
},
{
"path": "common/emojis.js",
"chars": 261,
"preview": "export const emojis = [\n \"😀\",\n \"😃\",\n \"😄\",\n \"😁\",\n \"😆\",\n \"😅\",\n \"🤣\",\n \"😂\",\n \"🙂\",\n \"🙃\",\n \"😉\",\n \"😊\",\n \"😇\",\n \"🥰\""
},
{
"path": "common/mixin.js",
"chars": 51,
"preview": "export default {\n data() {\n return {};\n },\n};\n"
},
{
"path": "common/props.js",
"chars": 70,
"preview": "uni.$u.props.gap.bgColor = \"#f3f4f6\";\nuni.$u.props.gap.height = \"10\";\n"
},
{
"path": "components/AreaPicker/areaCode.js",
"chars": 4067,
"preview": "export const areaCode = [\n { label: \"中国\", value: \"86\" },\n { label: \"马来西亚\", value: \"60\" },\n { label: \"印度尼西亚\", value: \""
},
{
"path": "components/AreaPicker/index.vue",
"chars": 792,
"preview": "<template>\n <u-picker\n :show=\"show\"\n :defaultIndex=\"defaultIndex\"\n :columns=\"columns\"\n keyName=\"label\"\n "
},
{
"path": "components/ChooseIndexFooter/SelectedMember.vue",
"chars": 1005,
"preview": "<template>\n <view class=\"selected_item\">\n <view class=\"left_info\">\n <my-avatar\n :src=\"source.faceURL\"\n "
},
{
"path": "components/ChooseIndexFooter/index.vue",
"chars": 3108,
"preview": "<template>\n <view class=\"member_checked_desc\">\n <view @click=\"showSelected = true\" class=\"left_info\">\n <view cl"
},
{
"path": "components/ChooseIndexList/index.vue",
"chars": 1782,
"preview": "<template>\n <u-index-list\n @scrolltolower=\"scrolltolower\"\n class=\"user_list\"\n :style=\"{ height: height }\"\n "
},
{
"path": "components/CustomNavBar/index.vue",
"chars": 1632,
"preview": "<template>\n <u-navbar :title=\"title\" placeholder class=\"custom_nav_bar\">\n <template slot=\"left\">\n <slot name=\"l"
},
{
"path": "components/MyAvatar/index.vue",
"chars": 1728,
"preview": "<template>\n <u-avatar\n @longpress=\"longpress\"\n @click=\"click\"\n @onError=\"errorHandle\"\n :src=\"getAvatarUrl\"\n"
},
{
"path": "components/SettingItem/index.vue",
"chars": 1449,
"preview": "<template>\n <view\n @click=\"onClick\"\n class=\"setting_item\"\n :class=\"{ setting_item_border: border }\"\n >\n <t"
},
{
"path": "components/UserItem/index.vue",
"chars": 3082,
"preview": "<template>\n <view @click=\"clickItem\" class=\"user_item\">\n <view\n v-if=\"checkVisible\"\n class=\"check_wrap\"\n "
},
{
"path": "components/gaoyia-parse/components/wxParseAudio.vue",
"chars": 538,
"preview": "<template>\n <!-- '<audio/>' 组件不再维护,建议使用能力更强的 'uni.createInnerAudioContext' 接口 有时间再改-->\n <!--增加audio标签支持-->\n <audio\n "
},
{
"path": "components/gaoyia-parse/components/wxParseImg.vue",
"chars": 2509,
"preview": "<template>\n <image\n :mode=\"node.attr.mode\"\n :lazy-load=\"node.attr.lazyLoad\"\n :class=\"node.classStr\"\n :style"
},
{
"path": "components/gaoyia-parse/components/wxParseTable.vue",
"chars": 1140,
"preview": "<template>\n <div class=\"tablebox\">\n <rich-text\n :nodes=\"nodes\"\n :class=\"node.classStr\"\n :style=\"'user"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate0.vue",
"chars": 2866,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate1.vue",
"chars": 2608,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate10.vue",
"chars": 2610,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate11.vue",
"chars": 2897,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate2.vue",
"chars": 2608,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate3.vue",
"chars": 2608,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate4.vue",
"chars": 2608,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate5.vue",
"chars": 2608,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate6.vue",
"chars": 2608,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate7.vue",
"chars": 2608,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate8.vue",
"chars": 2608,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseTemplate9.vue",
"chars": 2609,
"preview": "<template>\n <!--判断是否是标签节点-->\n <block v-if=\"node.node == 'element'\">\n <!--button类型-->\n <button\n v-if=\"node.t"
},
{
"path": "components/gaoyia-parse/components/wxParseVideo.vue",
"chars": 345,
"preview": "<template>\n <!--增加video标签支持,并循环添加-->\n <view :class=\"node.classStr\" :style=\"node.styleStr\">\n <video\n :class=\"no"
},
{
"path": "components/gaoyia-parse/libs/html2json.js",
"chars": 6696,
"preview": "/**\n * html2Json 改造来自: https://github.com/Jxck/html2json\n *\n *\n * author: Di (微信小程序开发工程师)\n * organization: WeAppDev(微信小程"
},
{
"path": "components/gaoyia-parse/libs/htmlparser.js",
"chars": 4709,
"preview": "/**\n *\n * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser\n *\n * author: Di (微信小程序开发工程师)\n * organi"
},
{
"path": "components/gaoyia-parse/libs/wxDiscode.js",
"chars": 9732,
"preview": "// HTML 支持的数学符号\nfunction strNumDiscode(str) {\n str = str.replace(/∀|∀|∀/g, \"∀\");\n str = str.replac"
},
{
"path": "components/gaoyia-parse/parse.css",
"chars": 4451,
"preview": "/**\n * author: Di (微信小程序开发工程师)\n * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)\n * 垂直微信小程序开发交流社区\n *\n * "
},
{
"path": "components/gaoyia-parse/parse.vue",
"chars": 5099,
"preview": "<!--**\n * forked from:https://github.com/F-loat/mpvue-wxParse\n *\n * github地址: https://github.com/dcloudio/uParse\n *\n * f"
},
{
"path": "constant/comp.js",
"chars": 751,
"preview": "export const ChatingFooterActionTypes = {\n Album: \"Album\",\n};\n\nexport const ContactMenuTypes = {\n NewFriend: \"NewFrien"
},
{
"path": "constant/event.js",
"chars": 118,
"preview": "export const PageEvents = {\n GlobalToast: \"GlobalToast\",\n ScrollToBottom: \"ScrollToBottom\",\n RtcCall: \"RtcCall\"\n};\n"
},
{
"path": "constant/im.js",
"chars": 1215,
"preview": "import { MessageType } from \"openim-uniapp-polyfill\";\n\nexport const CustomType = {\n VideoCall: \"c100\",\n VoiceCall: \"c1"
},
{
"path": "constant/index.js",
"chars": 71,
"preview": "export * from \"./im\";\nexport * from \"./comp\";\nexport * from \"./event\";\n"
},
{
"path": "index.html",
"chars": 710,
"preview": "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <script>\n var coverSupport =\n \"CS"
},
{
"path": "main.js",
"chars": 355,
"preview": "import App from \"./App\";\nimport Vue from \"vue\";\n\n// vuex\nimport store from \"./store\";\n\n// 引入全局uView\nimport uView from \"@"
},
{
"path": "manifest.json",
"chars": 7684,
"preview": "{\n \"name\" : \"IM-UCB\",\n \"appid\" : \"__UNI__60BFCE0\",\n \"description\" : \"\",\n \"versionName\" : \"toc_base_open 3.3."
},
{
"path": "package.json",
"chars": 235,
"preview": "{\n \"dependencies\": {\n \"date-fns\": \"^2.30.0\",\n \"dayjs\": \"^1.11.6\",\n \"image-tools\": \"^1.4.0\",\n \"md5\": \"^2.3.0"
},
{
"path": "pages/common/contactChoose/index.vue",
"chars": 6767,
"preview": "<template>\n <view class=\"contact_choose_container\">\n <custom-nav-bar title=\"联系人\" />\n\n <view class=\"search_bar_wra"
},
{
"path": "pages/common/createGroup/index.vue",
"chars": 5200,
"preview": "<template>\n <view class=\"create_group_container\">\n <custom-nav-bar title=\"发起群聊\" />\n <u-toast ref=\"uToast\"></u-toa"
},
{
"path": "pages/common/detailsFileds/index.vue",
"chars": 2405,
"preview": "<template>\n <view class=\"details_container\">\n <custom-nav-bar title=\"个人资料\" />\n\n <view class=\"info_list\">\n <u"
},
{
"path": "pages/common/groupCard/index.vue",
"chars": 7270,
"preview": "<template>\n <view class=\"group_card_container\">\n <custom-nav-bar title=\"\" />\n <u-toast ref=\"uToast\"></u-toast>\n\n "
},
{
"path": "pages/common/markOrIDPage/index.vue",
"chars": 3256,
"preview": "<template>\n <view class=\"mark_id_container\">\n <custom-nav-bar :title=\"getTitle\">\n <view class=\"nav_right_action"
},
{
"path": "pages/common/searchUserOrGroup/index.vue",
"chars": 4152,
"preview": "<template>\n <view class=\"search_container\">\n <custom-nav-bar :route=\"false\">\n <view slot=\"left\"> </view>\n "
},
{
"path": "pages/common/sendAddRequest/index.vue",
"chars": 2948,
"preview": "<template>\n <view class=\"request_join_container\">\n <custom-nav-bar :title=\"isGroup ? '群聊验证' : '好友验证'\">\n <view c"
},
{
"path": "pages/common/userCard/components/UserInfoRowItem.vue",
"chars": 821,
"preview": "<template>\n <view @click=\"click\" class=\"row_item\" :class=\"{ arrow_right: arrow }\">\n <view class=\"title\">\n <text"
},
{
"path": "pages/common/userCard/index.vue",
"chars": 6685,
"preview": "<template>\n <view class=\"user_card_container\">\n <u-loading-page :loading=\"isLoading\" loading-text=\"loading...\"></u-l"
},
{
"path": "pages/common/userCardMore/index.vue",
"chars": 3761,
"preview": "<template>\n <view class=\"user_more_container\">\n <custom-nav-bar title=\"好友设置\" />\n\n <view class=\"info_row\">\n <"
},
{
"path": "pages/common/webviewWrapper/index.vue",
"chars": 251,
"preview": "<template>\n <web-view :src=\"url\"></web-view>\n</template>\n\n<script>\nexport default {\n data() {\n return {\n url: "
},
{
"path": "pages/contact/applicationDetails/index.vue",
"chars": 6139,
"preview": "<template>\n <view class=\"page_container\">\n <custom-nav-bar :title=\"isGroupApplication ? '群通知' : '好友请求'\" />\n\n <vie"
},
{
"path": "pages/contact/applicationList/ApplicationItem.vue",
"chars": 5826,
"preview": "<template>\n <view @click=\"clickItem\" class=\"application_item\">\n <my-avatar\n :src=\"getAvatarUrl\"\n :isGroup="
},
{
"path": "pages/contact/applicationList/index.vue",
"chars": 4196,
"preview": "<template>\n <view class=\"application_list_container\">\n <custom-nav-bar :title=\"isGroupApplication ? '新的群聊' : '新的好友'\""
},
{
"path": "pages/contact/applicationListDetails/index.vue",
"chars": 1963,
"preview": "<template>\n <view class=\"application_list_container\">\n <custom-nav-bar :title=\"getTitle\" />\n\n <u-list class=\"appl"
},
{
"path": "pages/contact/contactAdd/ActionItem.vue",
"chars": 1225,
"preview": "<template>\n <view class=\"action_item\" @click=\"onClick\">\n <slot name=\"icon\">\n <view class=\"action_icon\">\n "
},
{
"path": "pages/contact/contactAdd/index.vue",
"chars": 2070,
"preview": "<template>\n <view class=\"contact_add_container\">\n <custom-nav-bar title=\"添加\" />\n\n <view class=\"action_row\">\n "
},
{
"path": "pages/contact/friendList/index.vue",
"chars": 2107,
"preview": "<template>\n <view class=\"friend_list_container\">\n <custom-nav-bar title=\"我的好友\" />\n <view class=\"search_bar_wrap\">"
},
{
"path": "pages/contact/groupList/GroupItem.vue",
"chars": 1050,
"preview": "<template>\n <view @click=\"toGroupCard\" class=\"group_item\">\n <my-avatar :src=\"groupInfo.faceURL\" :isGroup=\"true\" size"
},
{
"path": "pages/contact/groupList/index.vue",
"chars": 3506,
"preview": "<template>\n <view class=\"group_list_container\">\n <custom-nav-bar title=\"我的群组\">\n\n </custom-nav-bar>\n <view clas"
},
{
"path": "pages/contact/index/components/ContactMenus.vue",
"chars": 3336,
"preview": "<template>\n <view class=\"\">\n <view class=\"menu_list\">\n <view\n @click=\"menuClick(item)\"\n v-for=\"it"
},
{
"path": "pages/contact/index/index.vue",
"chars": 1646,
"preview": "<template>\n <view class=\"contact_container\">\n <custom-nav-bar>\n <view class=\"contact_title\" slot=\"left\">\n "
},
{
"path": "pages/contact/searchUserOrGroup/index.vue",
"chars": 979,
"preview": "<template>\n <view class=\"search_group_container\">\n <custom-nav-bar title=\"搜索群组\" />\n <view class=\"search_bar_wrap\""
},
{
"path": "pages/contact/switchJoinGroup/index.vue",
"chars": 1837,
"preview": "<template>\n <view class=\"switch_join_container\">\n <custom-nav-bar title=\"加入群聊\" />\n\n <view class=\"action_row\">\n "
},
{
"path": "pages/conversation/chating/components/ChatingFooter/ChatingActionBar.vue",
"chars": 1476,
"preview": "<template>\n <view class=\"chat_action_bar\">\n <u-row class=\"action_row\">\n <u-col\n v-for=\"item in actionLis"
},
{
"path": "pages/conversation/chating/components/ChatingFooter/CustomEditor.vue",
"chars": 1796,
"preview": "<template>\n <view\n class=\"editor_wrap\"\n >\n <editor\n :placeholder=\"placeholder\"\n id=\"editor2\"\n @re"
},
{
"path": "pages/conversation/chating/components/ChatingFooter/index.vue",
"chars": 7931,
"preview": "<template>\n <view>\n <view>\n <view class=\"chat_footer\">\n <view class=\"input_content\">\n <CustomEd"
},
{
"path": "pages/conversation/chating/components/ChatingHeader.vue",
"chars": 5710,
"preview": "<template>\n <u-navbar @click=\"click\" placeholder class=\"chating_header\">\n <view @click=\"routeBack\" class=\"u-nav-slot"
},
{
"path": "pages/conversation/chating/components/ChatingList.vue",
"chars": 5932,
"preview": "<template>\n <scroll-view\n :scroll-with-animation=\"withAnimation\"\n @click=\"click\"\n id=\"scroll_view\"\n :style="
},
{
"path": "pages/conversation/chating/components/MessageItem/ErrorMessageRender.vue",
"chars": 273,
"preview": "<template>\n <view class=\"text_message_container bg_container\">\n <view> [暂未支持的消息类型] </view>\n </view>\n</template>\n\n<s"
},
{
"path": "pages/conversation/chating/components/MessageItem/MediaMessageRender.vue",
"chars": 1611,
"preview": "<template>\n <view class=\"media_message_container\" @click=\"clickMediaItem\">\n <u--image\n @load=\"onLoaded\"\n :"
},
{
"path": "pages/conversation/chating/components/MessageItem/TextMessageRender.vue",
"chars": 566,
"preview": "<template>\n <view class=\"text_message_container bg_container\">\n <mp-html\n :previewImg=\"false\"\n :showImgMen"
},
{
"path": "pages/conversation/chating/components/MessageItem/index.vue",
"chars": 6792,
"preview": "<template>\n <view\n v-if=\"!getNoticeContent\"\n :id=\"`auchor${source.clientMsgID}`\"\n class=\"message_item\"\n :cl"
},
{
"path": "pages/conversation/chating/index.vue",
"chars": 3619,
"preview": "<template>\n <view :style=\"{ backgroundColor: '#f8f8f8' }\" class=\"chating_container\">\n <chating-header\n @click=\""
},
{
"path": "pages/conversation/conversationList/components/ChatHeader.vue",
"chars": 7795,
"preview": "<template>\n <view class=\"chat_header\">\n <view class=\"self_info\">\n <my-avatar\n :src=\"storeSelfInfo.faceUR"
},
{
"path": "pages/conversation/conversationList/components/ConversationItem.vue",
"chars": 3457,
"preview": "<template>\n <view @tap.prevent=\"clickConversationItem\" class=\"conversation_item\">\n <view class=\"pinned\" v-if=\"source"
},
{
"path": "pages/conversation/conversationList/index.vue",
"chars": 2728,
"preview": "<template>\n <view class=\"conversation_container\">\n <chat-header ref=\"chatHeaderRef\" />\n <scroll-view\n class="
},
{
"path": "pages/conversation/groupManage/index.vue",
"chars": 1217,
"preview": "<template>\n <view class=\"group_settings_container\">\n <custom-nav-bar title=\"群管理\" />\n <view class=\"setting_row\">\n "
},
{
"path": "pages/conversation/groupMemberList/components/GroupMemberListHeader.vue",
"chars": 2322,
"preview": "<template>\n <custom-nav-bar @leftClick=\"leftClick\" :title=\"getTitle\">\n </custom-nav-bar>\n</template>\n\n<script>\nimport "
},
{
"path": "pages/conversation/groupMemberList/index.vue",
"chars": 8329,
"preview": "<template>\n <view @click=\"pageClick\" class=\"group_members_container\">\n <group-member-list-header\n ref=\"navHeade"
},
{
"path": "pages/conversation/groupSettings/components/ActionSheet.vue",
"chars": 1168,
"preview": "<template>\n <u-action-sheet\n safeAreaInsetBottom\n closeOnClickOverlay\n @close=\"onClose\"\n @select=\"onSelect\""
},
{
"path": "pages/conversation/groupSettings/components/GroupMemberRow.vue",
"chars": 4282,
"preview": "<template>\n <view @click=\"toMemberList\" class=\"member_row\">\n <!-- <view class=\"member_title\">\n <text>群成员</text>"
},
{
"path": "pages/conversation/groupSettings/index.vue",
"chars": 9104,
"preview": "<template>\n <view class=\"group_settings_container\">\n <custom-nav-bar title=\"群聊设置\" />\n <view class=\"group_settings"
},
{
"path": "pages/conversation/singleSettings/index.vue",
"chars": 2358,
"preview": "<template>\n <view class=\"single_settings_container\">\n <custom-nav-bar title=\"好友设置\" />\n\n <view class=\"row_wrap\">\n "
},
{
"path": "pages/conversation/updateGroupOrNickname/index.vue",
"chars": 1943,
"preview": "<template>\n <view class=\"page_container\">\n <custom-nav-bar :title=\"getTitle\">\n <view class=\"nav_right_action\" s"
},
{
"path": "pages/login/index.vue",
"chars": 10806,
"preview": "<template>\n <view class=\"page_container\">\n <view class=\"login\">\n <view class=\"logo\">\n <img src=\"static/i"
},
{
"path": "pages/login/registerOrForget/index.vue",
"chars": 3525,
"preview": "<template>\n <view class=\"register_container content_with_back\">\n <view class=\"back_icon\">\n <u-icon name=\"arrow-"
},
{
"path": "pages/login/setPassword/index.vue",
"chars": 4308,
"preview": "<template>\n <view class=\"set_password_container content_with_back\">\n <view class=\"title\">重置密码</view>\n <u-form\n "
},
{
"path": "pages/login/setSelfInfo/index.vue",
"chars": 5156,
"preview": "<template>\n <view class=\"set_info_container content_with_back\">\n <view class=\"title\">设置信息</view>\n <u-form\n c"
},
{
"path": "pages/login/verifyCode/index.vue",
"chars": 3885,
"preview": "<template>\n <view class=\"verify_code content_with_back\">\n <view class=\"back_icon\">\n <u-icon name=\"arrow-left\" b"
},
{
"path": "pages/profile/about/index.vue",
"chars": 2979,
"preview": "<template>\n <view class=\"page_container\">\n <custom-nav-bar title=\"关于我们\" />\n <view class=\"logo_area\">\n <image"
},
{
"path": "pages/profile/accountSetting/index.vue",
"chars": 930,
"preview": "<template>\n <view class=\"page_container\">\n <custom-nav-bar title=\"账号设置\" />\n\n <view class=\"info_wrap\">\n <sett"
},
{
"path": "pages/profile/blockList/index.vue",
"chars": 2470,
"preview": "<template>\n <view class=\"page_container\">\n <custom-nav-bar title=\"通讯录黑名单\" />\n\n <u-list v-if=\"blockList.length > 0"
},
{
"path": "pages/profile/index/index.vue",
"chars": 5267,
"preview": "<template>\n <view class=\"page_container\">\n <view class=\"self_info_row\"></view>\n\n <view class=\"info_card\">\n <"
},
{
"path": "pages/profile/selfInfo/InfoItem.vue",
"chars": 1308,
"preview": "<template>\n <view @click=\"clickItem\" class=\"info_item\">\n <view class=\"left_label\">\n <text>{{ title }}</text>\n "
},
{
"path": "pages/profile/selfInfo/index.vue",
"chars": 5021,
"preview": "<template>\n <view class=\"page_container\">\n <custom-nav-bar title=\"个人资料\" />\n\n <view class=\"info_wrap\">\n <info"
},
{
"path": "pages/workbench/index/index.vue",
"chars": 543,
"preview": "<template>\n <web-view :src=\"linkUrl\"></web-view>\n</template>\n\n<script>\nexport default {\n data() {\n return {\n l"
},
{
"path": "pages.json",
"chars": 7068,
"preview": "{\n \"pages\": [\n //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages\n {\n \"path\": \"pages/login/i"
},
{
"path": "static/wasm_exec.js",
"chars": 22059,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "store/getters.js",
"chars": 1307,
"preview": "export default {\n storeConversationList: (state) => state.conversation.conversationList,\n storeCurrentConversation: (s"
},
{
"path": "store/index.js",
"chars": 407,
"preview": "import Vue from \"vue\";\nimport Vuex from \"vuex\";\nimport user from \"./modules/user\";\nimport contact from \"./modules/contac"
},
{
"path": "store/modules/contact.js",
"chars": 8801,
"preview": "import { v4 as uuidv4 } from \"uuid\";\nimport IMSDK from \"openim-uniapp-polyfill\";\n\nconst state = {\n friendList: [],\n bl"
},
{
"path": "store/modules/conversation.js",
"chars": 2795,
"preview": "import { v4 as uuidv4 } from \"uuid\";\nimport IMSDK from \"openim-uniapp-polyfill\";\n\nconst state = {\n conversationList: []"
},
{
"path": "store/modules/message.js",
"chars": 2318,
"preview": "import IMSDK, { MessageStatus, MessageType } from \"openim-uniapp-polyfill\";\nimport { v4 as uuidv4 } from \"uuid\";\nimport "
},
{
"path": "store/modules/user.js",
"chars": 1589,
"preview": "import { v4 as uuidv4 } from \"uuid\";\nimport IMSDK from \"openim-uniapp-polyfill\";\nimport { businessGetUserInfo } from \"@/"
},
{
"path": "styles/common.scss",
"chars": 656,
"preview": "@mixin colBox($isBtw) {\n display: flex;\n flex-direction: column;\n @if $isBtw {\n justify-content: space-between;\n "
},
{
"path": "styles/global.scss",
"chars": 285,
"preview": ".page_container {\n display: flex;\n flex-direction: column;\n height: 100vh;\n}\n\nimage {\n image-rendering: -moz-crisp-e"
},
{
"path": "styles/login.scss",
"chars": 724,
"preview": ".content_with_back {\n padding: 0 64rpx;\n\n .back_icon {\n padding-top: 50rpx;\n padding-bottom: 100rpx;\n }\n\n .tit"
},
{
"path": "uni.scss",
"chars": 1743,
"preview": "/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预"
},
{
"path": "uni_modules/Sansnn-uQRCode/changelog.md",
"chars": 83,
"preview": "## 3.6.5(2022-10-14)\n修复组件size值为string类型时,调用toTempFilePath导出临时文件路径失败; \n优化组件加载本地图片。\n"
},
{
"path": "uni_modules/Sansnn-uQRCode/components/u-qrcode/u-qrcode.vue",
"chars": 33547,
"preview": "<!-- ---------------------------------------------------------------------\n// uQRCode二维码生成插件 v3.6.5\n// \n// uQRCode是一款基于J"
},
{
"path": "uni_modules/Sansnn-uQRCode/components/uqrcode/uqrcode.vue",
"chars": 33547,
"preview": "<!-- ---------------------------------------------------------------------\n// uQRCode二维码生成插件 v3.6.5\n// \n// uQRCode是一款基于J"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/bridge/bridge-weex.js",
"chars": 7461,
"preview": "const isWeex = typeof WXEnvironment !== 'undefined';\nconst isWeexIOS = isWeex && /ios/i.test(WXEnvironment.platform);\nco"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleLinearGradient.js",
"chars": 504,
"preview": "class FillStyleLinearGradient {\n\n constructor(x0, y0, x1, y1) {\n this._start_pos = { _x: x0, _y: y0 };\n "
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStylePattern.js",
"chars": 154,
"preview": "class FillStylePattern {\n constructor(img, pattern) {\n this._style = pattern;\n this._img = img;\n }\n}"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleRadialGradient.js",
"chars": 515,
"preview": "class FillStyleRadialGradient {\n constructor(x0, y0, r0, x1, y1, r1) {\n this._start_pos = { _x: x0, _y: y0, _r"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/RenderingContext.js",
"chars": 17416,
"preview": "import FillStylePattern from './FillStylePattern';\nimport FillStyleLinearGradient from './FillStyleLinearGradient';\nimpo"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ActiveInfo.js",
"chars": 212,
"preview": "export default class WebGLActiveInfo {\n className = 'WebGLActiveInfo';\n\n constructor({\n type, name, size\n "
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Buffer.js",
"chars": 337,
"preview": "import {getTransferedObjectUUID} from './classUtils';\n\nconst name = 'WebGLBuffer';\n\nfunction uuid(id) {\n return getTr"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Framebuffer.js",
"chars": 347,
"preview": "import {getTransferedObjectUUID} from './classUtils';\n\nconst name = 'WebGLFrameBuffer';\n\nfunction uuid(id) {\n return "
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLenum.js",
"chars": 8637,
"preview": "export default {\n \"DEPTH_BUFFER_BIT\": 256,\n \"STENCIL_BUFFER_BIT\": 1024,\n \"COLOR_BUFFER_BIT\": 16384,\n \"POINTS"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLmethod.js",
"chars": 4497,
"preview": "let i = 1;\n\nconst GLmethod = {};\n\nGLmethod.activeTexture = i++; //1\nGLmethod.attachShader = i++;\nGLmethod.bindAt"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLtype.js",
"chars": 332,
"preview": "const GLtype = {};\n\n[\n \"GLbitfield\", \n \"GLboolean\",\n \"GLbyte\",\n \"GLclampf\",\n \"GLenum\",\n \"GLfloat\",\n"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Program.js",
"chars": 339,
"preview": "import {getTransferedObjectUUID} from './classUtils';\n\nconst name = 'WebGLProgram';\n\nfunction uuid(id) {\n return getT"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Renderbuffer.js",
"chars": 349,
"preview": "import {getTransferedObjectUUID} from './classUtils';\n\nconst name = 'WebGLRenderBuffer';\n\nfunction uuid(id) {\n return"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/RenderingContext.js",
"chars": 36749,
"preview": "import GLenum from './GLenum';\nimport ActiveInfo from './ActiveInfo';\nimport Buffer from './Buffer';\nimport Framebuffer "
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Shader.js",
"chars": 369,
"preview": "import {getTransferedObjectUUID} from './classUtils';\n\nconst name = 'WebGLShader';\n\nfunction uuid(id) {\n return getTr"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ShaderPrecisionFormat.js",
"chars": 273,
"preview": "export default class WebGLShaderPrecisionFormat {\n className = 'WebGLShaderPrecisionFormat';\n\n constructor({\n "
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Texture.js",
"chars": 371,
"preview": "import {getTransferedObjectUUID} from './classUtils';\n\nconst name = 'WebGLTexture';\n\nfunction uuid(id) {\n return getT"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/UniformLocation.js",
"chars": 387,
"preview": "import {getTransferedObjectUUID} from './classUtils';\n\nconst name = 'WebGLUniformLocation';\n\nfunction uuid(id) {\n ret"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/classUtils.js",
"chars": 95,
"preview": "export function getTransferedObjectUUID(name, id) {\n return `${name.toLowerCase()}-${id}`;\n}"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/canvas.js",
"chars": 1852,
"preview": "import GContext2D from '../context-2d/RenderingContext';\nimport GContextWebGL from '../context-webgl/RenderingContext';\n"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/image.js",
"chars": 1968,
"preview": "let incId = 1;\n\nconst noop = function () { };\n\nclass GImage {\n\n static GBridge = null;\n\n constructor() {\n t"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/tool.js",
"chars": 673,
"preview": "\nexport function ArrayBufferToBase64 (buffer) {\n var binary = '';\n var bytes = new Uint8ClampedArray(buffer);\n "
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/index.js",
"chars": 1280,
"preview": "import GCanvas from './env/canvas';\nimport GImage from './env/image';\n\nimport GWebGLRenderingContext from './context-web"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/package.json",
"chars": 223,
"preview": "{\n \"name\": \"uqrcode\",\n \"version\": \"3.6.0\",\n \"description\": \"\",\n \"main\": \"uqrcode.js\",\n \"scripts\": {\n \"test\": \"ec"
},
{
"path": "uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js",
"chars": 35801,
"preview": "//---------------------------------------------------------------------\n// uQRCode二维码生成插件 v3.6.0 Basic\n// \n// uQRCode是一款"
},
{
"path": "uni_modules/Sansnn-uQRCode/license.md",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "uni_modules/Sansnn-uQRCode/package.json",
"chars": 1601,
"preview": "{\n \"id\": \"Sansnn-uQRCode\",\n \"displayName\": \"uQRCode 全端二维码生成插件 支持nvue 支持nodejs服务端\",\n \"version\": \"3.6.5\",\n \"descriptio"
},
{
"path": "uni_modules/Sansnn-uQRCode/readme.md",
"chars": 16225,
"preview": "# 介绍\n\n`uQRCode`是一款基于`Javascript`环境开发的二维码生成插件,适用所有`Javascript`运行环境的前端应用和`Node.js`应用。\n\n`uQRCode`可扩展性高,它支持自定义渲染二维码,可通过`uQRC"
},
{
"path": "uni_modules/mp-html/README.md",
"chars": 5821,
"preview": "## 为减小组件包的大小,默认组件包中不包含编辑、latex 公式等扩展功能,需要使用扩展功能的请参考下方的 插件扩展 栏的说明\n\n## 功能介绍\n- 全端支持(含 `v3、NVUE`)\n- 支持丰富的标签(包括 `table`、`vide"
},
{
"path": "uni_modules/mp-html/changelog.md",
"chars": 8195,
"preview": "## v2.4.0(2022-08-27)\n1. `A` 增加了 [setPlaybackRate](https://jin-yufeng.gitee.io/mp-html/#/advanced/api#setPlaybackRate) 的"
},
{
"path": "uni_modules/mp-html/components/mp-html/mp-html.vue",
"chars": 13315,
"preview": "<template>\n <view id=\"_root\" :class=\"(selectable?'_select ':'')+'_root'\" :style=\"containerStyle\">\n <slot v-if=\"!node"
},
{
"path": "uni_modules/mp-html/components/mp-html/node/node.vue",
"chars": 15350,
"preview": "<template>\n <view :id=\"attrs.id\" :class=\"'_block _'+name+' '+attrs.class\" :style=\"attrs.style\">\n <block v-for=\"(n, i"
},
{
"path": "uni_modules/mp-html/components/mp-html/parser.js",
"chars": 37790,
"preview": "/**\n * @fileoverview html 解析器\n */\n\n// 配置\nconst config = {\n // 信任的标签(保持标签名不变)\n trustTags: makeMap('a,abbr,ad,audio,b,bl"
},
{
"path": "uni_modules/mp-html/package.json",
"chars": 1929,
"preview": "{\n \"id\": \"mp-html\",\n \"displayName\": \"mp-html 富文本组件【全端支持,支持编辑、latex等扩展】\",\n \"version\": \"v2.4.0\",\n \"description"
},
{
"path": "uni_modules/mp-html/static/app-plus/mp-html/js/handler.js",
"chars": 2806,
"preview": "\"use strict\";function t(t){for(var e=Object.create(null),n=t.attributes.length;n--;)e[t.attributes[n].name]=t.attributes"
},
{
"path": "uni_modules/mp-html/static/app-plus/mp-html/local.html",
"chars": 519,
"preview": "<head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1,minimum-scale=1,maximum-sc"
},
{
"path": "uni_modules/uni-scss/changelog.md",
"chars": 153,
"preview": "## 1.0.3(2022-01-21)\n- 优化 组件示例\n## 1.0.2(2021-11-22)\n- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题\n## 1.0.1(2021-11-22)\n- 修复 vue3中scss语法"
},
{
"path": "uni_modules/uni-scss/index.scss",
"chars": 31,
"preview": "@import './styles/index.scss';\n"
},
{
"path": "uni_modules/uni-scss/package.json",
"chars": 1580,
"preview": "{\n \"id\": \"uni-scss\",\n \"displayName\": \"uni-scss 辅助样式\",\n \"version\": \"1.0.3\",\n \"description\": \"uni-sass是uni-ui提供的一套全局样式"
},
{
"path": "uni_modules/uni-scss/readme.md",
"chars": 200,
"preview": "`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。\n\n### [查看文档](https://uniapp.dcloud.io/compone"
},
{
"path": "uni_modules/uni-scss/styles/index.scss",
"chars": 237,
"preview": "@import './setting/_variables.scss';\n@import './setting/_border.scss';\n@import './setting/_color.scss';\n@import './setti"
},
{
"path": "uni_modules/uni-scss/styles/setting/_border.scss",
"chars": 49,
"preview": ".uni-border {\n\tborder: 1px $uni-border-1 solid;\n}"
},
{
"path": "uni_modules/uni-scss/styles/setting/_color.scss",
"chars": 1391,
"preview": "\n// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐\n// @mixin get-styles($k,$c) {\n// \t@if $k == size or $k == weight{\n// \t\tfo"
},
{
"path": "uni_modules/uni-scss/styles/setting/_radius.scss",
"chars": 1430,
"preview": "@mixin radius($r,$d:null ,$important: false){\n $radius-value:map-get($uni-radius, $r) if($important, !important, null);"
},
{
"path": "uni_modules/uni-scss/styles/setting/_space.scss",
"chars": 1214,
"preview": "\n@mixin fn($space,$direction,$size,$n) {\n\t@if $n {\n\t\t#{$space}-#{$direction}: #{$size*$uni-space-root}px\n\t} @else {\n\t\t #"
},
{
"path": "uni_modules/uni-scss/styles/setting/_styles.scss",
"chars": 3227,
"preview": "/* #ifndef APP-NVUE */\n\n$-color-white:#fff;\n$-color-black:#000;\n@mixin base-style($color) {\n\tcolor: #fff;\n\tbackground-co"
},
{
"path": "uni_modules/uni-scss/styles/setting/_text.scss",
"chars": 394,
"preview": "@mixin get-styles($k,$c) {\n\t@if $k == size or $k == weight{\n\t\tfont-#{$k}:#{$c}\n\t}@else{\n\t\t#{$k}:#{$c}\n\t}\n}\n\n@each $key, "
},
{
"path": "uni_modules/uni-scss/styles/setting/_variables.scss",
"chars": 3455,
"preview": "// @use \"sass:math\";\n@import '../tools/functions.scss';\n// 间距基础倍数\n$uni-space-root: 2 !default;\n// 边框半径默认值\n$uni-radius-r"
},
{
"path": "uni_modules/uni-scss/styles/tools/functions.scss",
"chars": 636,
"preview": "// 合并 map\n@function map-deep-merge($parent-map, $child-map){\n\t$result: $parent-map;\n\t@each $key, $child in $child-map {\n"
},
{
"path": "uni_modules/uni-scss/theme.scss",
"chars": 561,
"preview": "// 间距基础倍数\n$uni-space-root: 2;\n// 边框半径默认值\n$uni-radius-root:5px;\n// 主色\n$uni-primary: #2979ff;\n// 辅助色\n$uni-success: #4cd964"
},
{
"path": "uni_modules/uni-scss/variables.scss",
"chars": 1512,
"preview": "@import './styles/setting/_variables.scss';\n// 间距基础倍数\n$uni-space-root: 2;\n// 边框半径默认值\n$uni-radius-root:5px;\n\n// 主色\n$uni-p"
},
{
"path": "uni_modules/uni-swipe-action/changelog.md",
"chars": 1361,
"preview": "## 1.3.8(2023-04-13)\n- 修复`uni-swipe-action`和`uni-swipe-action-item`不同时使用导致 closeOther 方法报错的 bug\n## 1.3.7(2022-06-06)\n- 修"
},
{
"path": "uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action.vue",
"chars": 1100,
"preview": "<template>\n\t<view>\n\t\t<slot></slot>\n\t</view>\n</template>\n\n<script>\n\t/**\n\t * SwipeAction 滑动操作\n\t * @description 通过滑动触发选项的容器"
},
{
"path": "uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js",
"chars": 6419,
"preview": "let bindIngXMixins = {}\n\n// #ifdef APP-NVUE\nconst BindingX = uni.requireNativePlugin('bindingx');\nconst dom = uni.requir"
},
{
"path": "uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js",
"chars": 311,
"preview": "export function isPC() {\n\tvar userAgentInfo = navigator.userAgent;\n\tvar Agents = [\"Android\", \"iPhone\", \"SymbianOS\", \"Win"
},
{
"path": "uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpalipay.js",
"chars": 3837,
"preview": "export default {\n\tdata() {\n\t\treturn {\n\t\t\tx: 0,\n\t\t\ttransition: false,\n\t\t\twidth: 0,\n\t\t\tviewWidth: 0,\n\t\t\tswipeShow: 0\n\t\t}\n\t"
},
{
"path": "uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js",
"chars": 5355,
"preview": "let otherMixins = {}\n\n// #ifndef APP-PLUS|| MP-WEIXIN || H5\nconst MIN_DISTANCE = 10;\notherMixins = {\n\tdata() {\n\t\t// TO"
},
{
"path": "uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js",
"chars": 1494,
"preview": "let mpMixins = {}\nlet is_pc = null\n// #ifdef H5\nimport {\n\tisPC\n} from \"./isPC\"\nis_pc = isPC()\n// #endif\n// #ifdef APP-VU"
},
{
"path": "uni_modules/uni-swipe-action/components/uni-swipe-action-item/render.js",
"chars": 6520,
"preview": "const MIN_DISTANCE = 10;\nexport default {\n\tshowWatch(newVal, oldVal, ownerInstance, instance, self) {\n\t\tvar state = self"
},
{
"path": "uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.vue",
"chars": 10054,
"preview": "<template>\n\t<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->\n\t<!-- #ifdef APP-VUE || MP-WEIXIN || H5 -->\n\t<view class=\"uni-swipe\">\n\t\t"
},
{
"path": "uni_modules/uni-swipe-action/components/uni-swipe-action-item/wx.wxs",
"chars": 7544,
"preview": "var MIN_DISTANCE = 10;\n\n/**\n * 判断当前是否为H5、app-vue\n */\nvar IS_HTML5 = false\nif (typeof window === 'object') IS_HTML5 = tru"
},
{
"path": "uni_modules/uni-swipe-action/package.json",
"chars": 1405,
"preview": "{\n\t\"id\": \"uni-swipe-action\",\n\t\"displayName\": \"uni-swipe-action 滑动操作\",\n\t\"version\": \"1.3.8\",\n\t\"description\": \"SwipeAction "
},
{
"path": "uni_modules/uni-swipe-action/readme.md",
"chars": 236,
"preview": "\n\n## SwipeAction 滑动操作\n> **组件名:uni-swipe-action**\n> 代码块: `uSwipeAction`、`uSwipeActionItem`\n\n\n通过滑动触发选项的容器\n\n### [查看文档](http"
},
{
"path": "uni_modules/uview-ui/LICENSE",
"chars": 1071,
"preview": "MIT License\n\nCopyright (c) 2020 www.uviewui.com\n\nPermission is hereby granted, free of charge, to any person obtaining a"
},
{
"path": "uni_modules/uview-ui/README.md",
"chars": 2271,
"preview": "<p align=\"center\">\n <img alt=\"logo\" src=\"https://uviewui.com/common/logo.png\" width=\"120\" height=\"120\" style=\"margin-"
},
{
"path": "uni_modules/uview-ui/changelog.md",
"chars": 10306,
"preview": "## 2.0.34(2022-09-25)\n# uView2.0重磅发布,利剑出鞘,一统江湖\n\n1. `u-input`、`u-textarea`增加`ignoreCompositionEvent`属性\n2. 修复`route`方法调用可能"
},
{
"path": "uni_modules/uview-ui/components/u--form/u--form.vue",
"chars": 1722,
"preview": "<template>\n\t<uvForm\n\t\tref=\"uForm\"\n\t\t:model=\"model\"\n\t\t:rules=\"rules\"\n\t\t:errorType=\"errorType\"\n\t\t:borderBottom=\"borderBott"
},
{
"path": "uni_modules/uview-ui/components/u--image/u--image.vue",
"chars": 1006,
"preview": "<template>\n\t<uvImage \n\t\t:src=\"src\"\n\t\t:mode=\"mode\"\n\t\t:width=\"width\"\n\t\t:height=\"height\"\n\t\t:shape=\"shape\"\n\t\t:radius=\"radius"
},
{
"path": "uni_modules/uview-ui/components/u--input/u--input.vue",
"chars": 1915,
"preview": "<template>\n\t<uvInput \n\t\t:value=\"value\"\n\t\t:type=\"type\"\n\t\t:fixed=\"fixed\"\n\t\t:disabled=\"disabled\"\n\t\t:disabledColor=\"disabled"
},
{
"path": "uni_modules/uview-ui/components/u--text/u--text.vue",
"chars": 1046,
"preview": "<template>\n <uvText\n :type=\"type\"\n :show=\"show\"\n :text=\"text\"\n :prefixIcon=\"prefixIcon\"\n "
},
{
"path": "uni_modules/uview-ui/components/u--textarea/u--textarea.vue",
"chars": 1290,
"preview": "<template>\n\t<uvTextarea\n\t\t:value=\"value\"\n\t\t:placeholder=\"placeholder\"\n\t\t:height=\"height\"\n\t\t:confirmType=\"confirmType\"\n\t\t"
},
{
"path": "uni_modules/uview-ui/components/u-action-sheet/props.js",
"chars": 1457,
"preview": "export default {\n props: {\n // 操作菜单是否展示 (默认false)\n show: {\n type: Boolean,\n defau"
},
{
"path": "uni_modules/uview-ui/components/u-action-sheet/u-action-sheet.vue",
"chars": 8828,
"preview": "\n<template>\n\t<u-popup\n\t :show=\"show\"\n\t mode=\"bottom\"\n\t @close=\"closeHandler\"\n\t :safeAreaInsetBottom=\"safeAre"
},
{
"path": "uni_modules/uview-ui/components/u-album/props.js",
"chars": 1775,
"preview": "export default {\n props: {\n // 图片地址,Array<String>|Array<Object>形式\n urls: {\n type: Array,\n "
},
{
"path": "uni_modules/uview-ui/components/u-album/u-album.vue",
"chars": 7523,
"preview": "<template>\n\t<view class=\"u-album\">\n\t\t<view class=\"u-album__row\" ref=\"u-album__row\" v-for=\"(arr, index) in showUrls\" :for"
},
{
"path": "uni_modules/uview-ui/components/u-alert/props.js",
"chars": 1059,
"preview": "export default {\n props: {\n // 显示文字\n title: {\n type: String,\n default: uni.$u.pro"
},
{
"path": "uni_modules/uview-ui/components/u-alert/u-alert.vue",
"chars": 4845,
"preview": "<template>\n\t<u-transition\n\t mode=\"fade\"\n\t :show=\"show\"\n\t>\n\t\t<view\n\t\t class=\"u-alert\"\n\t\t :class=\"[`u-alert--$"
},
{
"path": "uni_modules/uview-ui/components/u-avatar/props.js",
"chars": 2014,
"preview": "export default {\n props: {\n // 头像图片路径(不能为相对路径)\n src: {\n type: String,\n default: u"
},
{
"path": "uni_modules/uview-ui/components/u-avatar/u-avatar.vue",
"chars": 8000,
"preview": "<template>\n\t<view class=\"u-avatar\" :class=\"[`u-avatar--${shape}`]\" :style=\"[{\n\t\t\tbackgroundColor: (text || icon) ? (rand"
}
]
// ... and 394 more files (download for full content)
About this extraction
This page contains the full source code of the OpenIMSDK/Open-IM-Uniapp-Demo GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 594 files (2.0 MB), approximately 561.2k tokens, and a symbol index with 954 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.